From 36b1f4629c83f580e3c7bf97eca55cc1be88bc8f Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 29 Jun 2024 03:28:16 +0000 Subject: [PATCH] classref: Sync with current master branch (811ce36) --- classes/class_@gdscript.rst | 319 +- classes/class_@globalscope.rst | 1247 +++--- classes/class_aabb.rst | 463 +- classes/class_acceptdialog.rst | 151 +- classes/class_aescontext.rst | 29 +- classes/class_animatablebody2d.rst | 9 +- classes/class_animatablebody3d.rst | 15 +- classes/class_animatedsprite2d.rst | 121 +- classes/class_animatedsprite3d.rst | 93 +- classes/class_animatedtexture.rst | 63 +- classes/class_animation.rst | 489 +- classes/class_animationlibrary.rst | 78 +- classes/class_animationmixer.rst | 899 ++++ classes/class_animationnode.rst | 177 +- classes/class_animationnodeadd2.rst | 1 + classes/class_animationnodeadd3.rst | 3 +- classes/class_animationnodeanimation.rst | 130 +- classes/class_animationnodeblend2.rst | 5 +- classes/class_animationnodeblend3.rst | 1 + classes/class_animationnodeblendspace1d.rst | 83 +- classes/class_animationnodeblendspace2d.rst | 123 +- classes/class_animationnodeblendtree.rst | 77 +- classes/class_animationnodeoneshot.rst | 78 +- classes/class_animationnodeoutput.rst | 5 +- classes/class_animationnodestatemachine.rst | 143 +- ...lass_animationnodestatemachineplayback.rst | 63 +- ...ss_animationnodestatemachinetransition.rst | 110 +- classes/class_animationnodesub2.rst | 1 + classes/class_animationnodesync.rst | 9 +- classes/class_animationnodetimescale.rst | 5 +- classes/class_animationnodetimeseek.rst | 1 + classes/class_animationnodetransition.rst | 85 +- classes/class_animationplayer.rst | 604 +-- classes/class_animationrootnode.rst | 1 + classes/class_animationtree.rst | 426 +- classes/class_area2d.rst | 158 +- classes/class_area3d.rst | 206 +- classes/class_array.rst | 483 +- classes/class_arraymesh.rst | 137 +- classes/class_arrayoccluder3d.rst | 32 +- classes/class_aspectratiocontainer.rst | 29 +- classes/class_astar2d.rst | 167 +- classes/class_astar3d.rst | 179 +- classes/class_astargrid2d.rst | 264 +- classes/class_atlastexture.rst | 25 +- classes/class_audiobuslayout.rst | 1 + classes/class_audioeffect.rst | 39 +- classes/class_audioeffectamplify.rst | 7 +- classes/class_audioeffectbandlimitfilter.rst | 1 + classes/class_audioeffectbandpassfilter.rst | 1 + classes/class_audioeffectcapture.rst | 61 +- classes/class_audioeffectchorus.rst | 237 +- classes/class_audioeffectcompressor.rst | 43 +- classes/class_audioeffectdelay.rst | 97 +- classes/class_audioeffectdistortion.rst | 37 +- classes/class_audioeffecteq.rst | 21 +- classes/class_audioeffecteq10.rst | 1 + classes/class_audioeffecteq21.rst | 1 + classes/class_audioeffecteq6.rst | 1 + classes/class_audioeffectfilter.rst | 43 +- classes/class_audioeffecthardlimiter.rst | 112 + classes/class_audioeffecthighpassfilter.rst | 1 + classes/class_audioeffecthighshelffilter.rst | 1 + classes/class_audioeffectinstance.rst | 43 +- classes/class_audioeffectlimiter.rst | 27 +- classes/class_audioeffectlowpassfilter.rst | 1 + classes/class_audioeffectlowshelffilter.rst | 1 + classes/class_audioeffectnotchfilter.rst | 1 + classes/class_audioeffectpanner.rst | 7 +- classes/class_audioeffectphaser.rst | 31 +- classes/class_audioeffectpitchshift.rst | 23 +- classes/class_audioeffectrecord.rst | 35 +- classes/class_audioeffectreverb.rst | 51 +- classes/class_audioeffectspectrumanalyzer.rst | 27 +- ...ss_audioeffectspectrumanalyzerinstance.rst | 37 +- classes/class_audioeffectstereoenhance.rst | 19 +- classes/class_audiolistener2d.rst | 24 +- classes/class_audiolistener3d.rst | 30 +- classes/class_audiosample.rst | 33 + classes/class_audiosampleplayback.rst | 33 + classes/class_audioserver.rst | 385 +- classes/class_audiostream.rst | 174 +- classes/class_audiostreamgenerator.rst | 54 +- .../class_audiostreamgeneratorplayback.rst | 45 +- classes/class_audiostreaminteractive.rst | 555 +++ classes/class_audiostreammicrophone.rst | 3 + classes/class_audiostreammp3.rst | 39 +- classes/class_audiostreamoggvorbis.rst | 96 +- classes/class_audiostreamplayback.rst | 151 +- .../class_audiostreamplaybackinteractive.rst | 74 + .../class_audiostreamplaybackoggvorbis.rst | 1 + classes/class_audiostreamplaybackplaylist.rst | 24 + .../class_audiostreamplaybackpolyphonic.rst | 37 +- .../class_audiostreamplaybackresampled.rst | 25 +- .../class_audiostreamplaybacksynchronized.rst | 26 + classes/class_audiostreamplayer.rst | 179 +- classes/class_audiostreamplayer2d.rst | 187 +- classes/class_audiostreamplayer3d.rst | 189 +- classes/class_audiostreamplaylist.rst | 189 + classes/class_audiostreampolyphonic.rst | 7 +- classes/class_audiostreamrandomizer.rst | 75 +- classes/class_audiostreamsynchronized.rst | 153 + classes/class_audiostreamwav.rst | 78 +- classes/class_backbuffercopy.rst | 19 +- classes/class_basebutton.rst | 115 +- classes/class_basematerial3d.rst | 836 ++-- classes/class_basis.rst | 630 ++- classes/class_bitmap.rst | 81 +- classes/class_bone2d.rst | 69 +- classes/class_boneattachment3d.rst | 60 +- classes/class_bonemap.rst | 31 +- classes/class_bool.rst | 91 +- classes/class_boxcontainer.rst | 25 +- classes/class_boxmesh.rst | 25 +- classes/class_boxoccluder3d.rst | 14 +- classes/class_boxshape3d.rst | 13 +- classes/class_button.rst | 346 +- classes/class_buttongroup.rst | 23 +- classes/class_callable.rst | 228 +- classes/class_callbacktweener.rst | 11 +- classes/class_camera2d.rst | 241 +- classes/class_camera3d.rst | 230 +- classes/class_cameraattributes.rst | 31 +- classes/class_cameraattributesphysical.rst | 66 +- classes/class_cameraattributespractical.rst | 57 +- classes/class_camerafeed.rst | 43 +- classes/class_cameraserver.rst | 41 +- classes/class_cameratexture.rst | 19 +- classes/class_canvasgroup.rst | 19 +- classes/class_canvasitem.rst | 557 +-- classes/class_canvasitemmaterial.rst | 41 +- classes/class_canvaslayer.rst | 87 +- classes/class_canvasmodulate.rst | 10 +- classes/class_canvastexture.rst | 52 +- classes/class_capsulemesh.rst | 25 +- classes/class_capsuleshape2d.rst | 13 +- classes/class_capsuleshape3d.rst | 15 +- classes/class_centercontainer.rst | 7 +- classes/class_characterbody2d.rst | 221 +- classes/class_characterbody3d.rst | 231 +- classes/class_charfxtransform.rst | 142 +- classes/class_checkbox.rst | 297 +- classes/class_checkbutton.rst | 297 +- classes/class_circleshape2d.rst | 7 +- classes/class_classdb.rst | 183 +- classes/class_codeedit.rst | 1259 +++--- classes/class_codehighlighter.rst | 135 +- classes/class_collisionobject2d.rst | 235 +- classes/class_collisionobject3d.rst | 197 +- classes/class_collisionpolygon2d.rst | 41 +- classes/class_collisionpolygon3d.rst | 27 +- classes/class_collisionshape2d.rst | 37 +- classes/class_collisionshape3d.rst | 37 +- classes/class_color.rst | 611 +-- classes/class_colorpicker.rst | 171 +- classes/class_colorpickerbutton.rst | 257 +- classes/class_colorrect.rst | 9 +- classes/class_compositor.rst | 67 + classes/class_compositoreffect.rst | 301 ++ classes/class_compressedcubemap.rst | 5 +- classes/class_compressedcubemaparray.rst | 5 +- classes/class_compressedtexture2d.rst | 15 +- classes/class_compressedtexture2darray.rst | 3 +- classes/class_compressedtexture3d.rst | 15 +- classes/class_compressedtexturelayered.rst | 15 +- classes/class_concavepolygonshape2d.rst | 15 +- classes/class_concavepolygonshape3d.rst | 25 +- classes/class_conetwistjoint3d.rst | 47 +- classes/class_configfile.rst | 121 +- classes/class_confirmationdialog.rst | 19 +- classes/class_container.rst | 41 +- classes/class_control.rst | 1105 ++--- classes/class_convexpolygonshape2d.rst | 21 +- classes/class_convexpolygonshape3d.rst | 11 +- classes/class_cpuparticles2d.rst | 475 +- classes/class_cpuparticles3d.rst | 845 ++-- classes/class_crypto.rst | 164 +- classes/class_cryptokey.rst | 42 +- classes/class_csgbox3d.rst | 13 +- classes/class_csgcombiner3d.rst | 1 + classes/class_csgcylinder3d.rst | 37 +- classes/class_csgmesh3d.rst | 17 +- classes/class_csgpolygon3d.rst | 107 +- classes/class_csgprimitive3d.rst | 7 +- classes/class_csgshape3d.rst | 85 +- classes/class_csgsphere3d.rst | 31 +- classes/class_csgtorus3d.rst | 37 +- classes/class_csharpscript.rst | 11 +- classes/class_cubemap.rst | 11 +- classes/class_cubemaparray.rst | 19 +- classes/class_curve.rst | 143 +- classes/class_curve2d.rst | 139 +- classes/class_curve3d.rst | 175 +- classes/class_curvetexture.rst | 25 +- classes/class_curvexyztexture.rst | 29 +- classes/class_cylindermesh.rst | 43 +- classes/class_cylindershape3d.rst | 23 +- classes/class_dampedspringjoint2d.rst | 27 +- classes/class_decal.rst | 110 +- classes/class_dictionary.rst | 230 +- classes/class_diraccess.rst | 260 +- classes/class_directionallight2d.rst | 16 +- classes/class_directionallight3d.rst | 66 +- classes/class_displayserver.rst | 1747 +++++--- classes/class_dtlsserver.rst | 21 +- classes/class_editorcommandpalette.rst | 19 +- classes/class_editordebuggerplugin.rst | 87 +- classes/class_editordebuggersession.rst | 67 +- classes/class_editorexportplatform.rst | 39 +- classes/class_editorexportplatformandroid.rst | 581 +-- classes/class_editorexportplatformios.rst | 2426 +++++++++- .../class_editorexportplatformlinuxbsd.rst | 69 +- classes/class_editorexportplatformmacos.rst | 2646 +++++++++-- classes/class_editorexportplatformpc.rst | 17 + classes/class_editorexportplatformweb.rst | 242 +- classes/class_editorexportplatformwindows.rst | 300 +- classes/class_editorexportplugin.rst | 382 +- classes/class_editorfeatureprofile.rst | 75 +- classes/class_editorfiledialog.rst | 264 +- classes/class_editorfilesystem.rst | 69 +- classes/class_editorfilesystemdirectory.rst | 87 +- ...itorfilesystemimportformatsupportquery.rst | 27 +- classes/class_editorimportplugin.rst | 127 +- classes/class_editorinspector.rst | 41 +- classes/class_editorinspectorplugin.rst | 81 +- classes/class_editorinterface.rst | 463 +- classes/class_editornode3dgizmo.rst | 219 +- classes/class_editornode3dgizmoplugin.rst | 201 +- classes/class_editorpaths.rst | 45 +- classes/class_editorplugin.rst | 613 +-- classes/class_editorproperty.rst | 123 +- .../class_editorresourceconversionplugin.rst | 29 +- classes/class_editorresourcepicker.rst | 63 +- classes/class_editorresourcepreview.rst | 37 +- .../class_editorresourcepreviewgenerator.rst | 53 +- classes/class_editorresourcetooltipplugin.rst | 29 +- classes/class_editorsceneformatimporter.rst | 93 +- .../class_editorsceneformatimporterblend.rst | 3 +- ...ass_editorsceneformatimporterfbx2gltf.rst} | 13 +- .../class_editorsceneformatimportergltf.rst | 1 + .../class_editorsceneformatimporterufbx.rst | 33 + classes/class_editorscenepostimport.rst | 21 +- classes/class_editorscenepostimportplugin.rst | 123 +- classes/class_editorscript.rst | 39 +- classes/class_editorscriptpicker.rst | 7 +- classes/class_editorselection.rst | 39 +- classes/class_editorsettings.rst | 3031 +++++++++---- classes/class_editorspinslider.rst | 45 +- classes/class_editorsyntaxhighlighter.rst | 21 +- .../class_editortranslationparserplugin.rst | 21 +- classes/class_editorundoredomanager.rst | 91 +- classes/class_editorvcsinterface.rst | 248 +- classes/class_encodedobjectasid.rst | 7 +- classes/class_enetconnection.rst | 121 +- classes/class_enetmultiplayerpeer.rst | 43 +- classes/class_enetpacketpeer.rst | 107 +- classes/class_engine.rst | 393 +- classes/class_enginedebugger.rst | 245 +- classes/class_engineprofiler.rst | 27 +- classes/class_environment.rst | 751 ++-- classes/class_expression.rst | 27 +- classes/class_fastnoiselite.rst | 143 +- classes/class_fbxdocument.rst | 35 + classes/class_fbxstate.rst | 65 + classes/class_fileaccess.rst | 547 ++- classes/class_filedialog.rst | 280 +- classes/class_filesystemdock.rst | 49 +- classes/class_float.rst | 231 +- classes/class_flowcontainer.rst | 123 +- classes/class_fogmaterial.rst | 39 +- classes/class_fogvolume.rst | 28 +- classes/class_font.rst | 261 +- classes/class_fontfile.rst | 595 +-- classes/class_fontvariation.rst | 85 +- classes/class_framebuffercacherd.rst | 60 + classes/class_gdextension.rst | 101 +- classes/class_gdextensionmanager.rst | 112 +- classes/class_gdscript.rst | 9 +- classes/class_generic6dofjoint3d.rst | 615 +-- classes/class_geometry2d.rst | 149 +- classes/class_geometry3d.rst | 119 +- classes/class_geometryinstance3d.rst | 132 +- classes/class_gltfaccessor.rst | 180 +- classes/class_gltfanimation.rst | 86 +- classes/class_gltfbufferview.rst | 139 +- classes/class_gltfcamera.rst | 59 +- classes/class_gltfdocument.rst | 191 +- classes/class_gltfdocumentextension.rst | 238 +- ...tfdocumentextensionconvertimportermesh.rst | 8 + classes/class_gltflight.rst | 97 +- classes/class_gltfmesh.rst | 125 +- classes/class_gltfnode.rst | 162 +- classes/class_gltfphysicsbody.rst | 152 +- classes/class_gltfphysicsshape.rst | 109 +- classes/class_gltfskeleton.rst | 64 +- classes/class_gltfskin.rst | 88 +- classes/class_gltfspecgloss.rst | 33 +- classes/class_gltfstate.rst | 464 +- classes/class_gltftexture.rst | 22 +- classes/class_gltftexturesampler.rst | 32 +- classes/class_gpuparticles2d.rst | 263 +- classes/class_gpuparticles3d.rst | 323 +- classes/class_gpuparticlesattractor3d.rst | 29 +- classes/class_gpuparticlesattractorbox3d.rst | 13 +- .../class_gpuparticlesattractorsphere3d.rst | 13 +- ...ass_gpuparticlesattractorvectorfield3d.rst | 19 +- classes/class_gpuparticlescollision3d.rst | 11 +- classes/class_gpuparticlescollisionbox3d.rst | 13 +- ...ass_gpuparticlescollisionheightfield3d.rst | 35 +- classes/class_gpuparticlescollisionsdf3d.rst | 51 +- .../class_gpuparticlescollisionsphere3d.rst | 13 +- classes/class_gradient.rst | 105 +- classes/class_gradienttexture1d.rst | 25 +- classes/class_gradienttexture2d.rst | 57 +- classes/class_graphedit.rst | 804 +++- classes/class_graphelement.rst | 277 ++ classes/class_graphframe.rst | 299 ++ classes/class_graphnode.rst | 869 +--- classes/class_gridcontainer.rst | 17 +- classes/class_gridmap.rst | 242 +- classes/class_groovejoint2d.rst | 13 +- classes/class_hashingcontext.rst | 39 +- classes/class_hboxcontainer.rst | 30 +- classes/class_heightmapshape3d.rst | 102 +- classes/class_hflowcontainer.rst | 44 +- classes/class_hingejoint3d.rst | 97 +- classes/class_hmaccontext.rst | 21 +- classes/class_hscrollbar.rst | 170 +- classes/class_hseparator.rst | 44 +- classes/class_hslider.rst | 142 +- classes/class_hsplitcontainer.rst | 72 +- classes/class_httpclient.rst | 137 +- classes/class_httprequest.rst | 125 +- classes/class_image.rst | 559 ++- classes/class_imageformatloader.rst | 15 +- classes/class_imageformatloaderextension.rst | 33 +- classes/class_imagetexture.rst | 33 +- classes/class_imagetexture3d.rst | 15 +- classes/class_imagetexturelayered.rst | 17 +- classes/class_immediatemesh.rst | 72 +- classes/class_importermesh.rst | 147 +- classes/class_importermeshinstance3d.rst | 180 +- classes/class_input.rst | 411 +- classes/class_inputevent.rst | 116 +- classes/class_inputeventaction.rst | 58 +- classes/class_inputeventfromwindow.rst | 7 +- classes/class_inputeventgesture.rst | 9 +- classes/class_inputeventjoypadbutton.rst | 24 +- classes/class_inputeventjoypadmotion.rst | 16 +- classes/class_inputeventkey.rst | 169 +- classes/class_inputeventmagnifygesture.rst | 9 +- classes/class_inputeventmidi.rst | 122 +- classes/class_inputeventmouse.rst | 29 +- classes/class_inputeventmousebutton.rst | 38 +- classes/class_inputeventmousemotion.rst | 101 +- classes/class_inputeventpangesture.rst | 9 +- classes/class_inputeventscreendrag.rst | 119 +- classes/class_inputeventscreentouch.rst | 33 +- classes/class_inputeventshortcut.rst | 9 +- classes/class_inputeventwithmodifiers.rst | 51 +- classes/class_inputmap.rst | 83 +- classes/class_instanceplaceholder.rst | 21 +- classes/class_int.rst | 290 +- classes/class_intervaltweener.rst | 1 + classes/class_ip.rst | 74 +- classes/class_itemlist.rst | 421 +- classes/class_javaclass.rst | 14 +- classes/class_javaclasswrapper.rst | 24 +- classes/class_javascriptbridge.rst | 53 +- classes/class_javascriptobject.rst | 1 + classes/class_jnisingleton.rst | 1 + classes/class_joint2d.rst | 64 +- classes/class_joint3d.rst | 68 +- classes/class_json.rst | 45 +- classes/class_jsonrpc.rst | 55 +- classes/class_kinematiccollision2d.rst | 81 +- classes/class_kinematiccollision3d.rst | 87 +- classes/class_label.rst | 213 +- classes/class_label3d.rst | 229 +- classes/class_labelsettings.rst | 55 +- classes/class_light2d.rst | 109 +- classes/class_light3d.rst | 191 +- classes/class_lightmapgi.rst | 213 +- classes/class_lightmapgidata.rst | 72 +- classes/class_lightmapper.rst | 1 + classes/class_lightmapperrd.rst | 1 + classes/class_lightmapprobe.rst | 5 +- classes/class_lightoccluder2d.rst | 23 +- classes/class_line2d.rst | 220 +- classes/class_lineedit.rst | 345 +- classes/class_linkbutton.rst | 137 +- classes/class_mainloop.rst | 74 +- classes/class_margincontainer.rst | 20 +- classes/class_marker2d.rst | 7 +- classes/class_marker3d.rst | 7 +- classes/class_marshalls.rst | 39 +- classes/class_material.rst | 99 +- classes/class_menubar.rst | 221 +- classes/class_menubutton.rst | 264 +- classes/class_mesh.rst | 239 +- .../class_meshconvexdecompositionsettings.rst | 87 +- classes/class_meshdatatool.rst | 265 +- classes/class_meshinstance2d.rst | 15 +- classes/class_meshinstance3d.rst | 139 +- classes/class_meshlibrary.rst | 141 +- classes/class_meshtexture.rst | 19 +- classes/class_methodtweener.rst | 23 +- classes/class_missingnode.rst | 42 +- classes/class_missingresource.rst | 23 +- classes/class_mobilevrinterface.rst | 104 +- classes/class_moviewriter.rst | 71 +- classes/class_multimesh.rst | 207 +- classes/class_multimeshinstance2d.rst | 18 +- classes/class_multimeshinstance3d.rst | 14 +- classes/class_multiplayerapi.rst | 98 +- classes/class_multiplayerapiextension.rst | 89 +- classes/class_multiplayerpeer.rst | 106 +- classes/class_multiplayerpeerextension.rst | 196 +- classes/class_multiplayerspawner.rst | 58 +- classes/class_multiplayersynchronizer.rst | 80 +- classes/class_mutex.rst | 21 +- classes/class_nativemenu.rst | 1335 ++++++ classes/class_navigationagent2d.rst | 361 +- classes/class_navigationagent3d.rst | 398 +- classes/class_navigationlink2d.rst | 97 +- classes/class_navigationlink3d.rst | 97 +- classes/class_navigationmesh.rst | 248 +- classes/class_navigationmeshgenerator.rst | 35 +- ...ass_navigationmeshsourcegeometrydata2d.rst | 272 ++ ...ass_navigationmeshsourcegeometrydata3d.rst | 171 +- classes/class_navigationobstacle2d.rst | 143 +- classes/class_navigationobstacle3d.rst | 163 +- .../class_navigationpathqueryparameters2d.rst | 95 +- .../class_navigationpathqueryparameters3d.rst | 95 +- classes/class_navigationpathqueryresult2d.rst | 45 +- classes/class_navigationpathqueryresult3d.rst | 45 +- classes/class_navigationpolygon.rst | 460 +- classes/class_navigationregion2d.rst | 178 +- classes/class_navigationregion3d.rst | 115 +- classes/class_navigationserver2d.rst | 1055 +++-- classes/class_navigationserver3d.rst | 1193 +++-- classes/class_ninepatchrect.rst | 73 +- classes/class_node.rst | 1640 ++++--- classes/class_node2d.rst | 151 +- classes/class_node3d.rst | 382 +- classes/class_node3dgizmo.rst | 12 +- classes/class_nodepath.rst | 271 +- classes/class_noise.rst | 59 +- classes/class_noisetexture2d.rst | 77 +- classes/class_noisetexture3d.rst | 59 +- classes/class_object.rst | 666 +-- classes/class_occluder3d.rst | 22 +- classes/class_occluderinstance3d.rst | 44 +- classes/class_occluderpolygon2d.rst | 23 +- classes/class_offlinemultiplayerpeer.rst | 1 + classes/class_oggpacketsequence.rst | 43 +- classes/class_oggpacketsequenceplayback.rst | 1 + classes/class_omnilight3d.rst | 34 +- classes/class_openxraction.rst | 29 +- classes/class_openxractionmap.rst | 81 +- classes/class_openxractionset.rst | 39 +- classes/class_openxrapiextension.rst | 388 ++ classes/class_openxrcompositionlayer.rst | 181 + .../class_openxrcompositionlayercylinder.rst | 124 + .../class_openxrcompositionlayerequirect.rst | 143 + classes/class_openxrcompositionlayerquad.rst | 67 + .../class_openxrextensionwrapperextension.rst | 540 +++ classes/class_openxrhand.rst | 141 +- classes/class_openxrinteractionprofile.rst | 29 +- ...class_openxrinteractionprofilemetadata.rst | 108 + classes/class_openxrinterface.rst | 792 +++- classes/class_openxripbinding.rst | 41 +- classes/class_optimizedtranslation.rst | 9 +- classes/class_optionbutton.rst | 508 +-- classes/class_ormmaterial3d.rst | 3 +- classes/class_os.rst | 899 ++-- classes/class_packedbytearray.rst | 437 +- classes/class_packedcolorarray.rst | 181 +- classes/class_packeddatacontainer.rst | 15 +- classes/class_packeddatacontainerref.rst | 9 +- classes/class_packedfloat32array.rst | 179 +- classes/class_packedfloat64array.rst | 181 +- classes/class_packedint32array.rst | 179 +- classes/class_packedint64array.rst | 181 +- classes/class_packedscene.rst | 41 +- classes/class_packedstringarray.rst | 183 +- classes/class_packedvector2array.rst | 195 +- classes/class_packedvector3array.rst | 193 +- classes/class_packedvector4array.rst | 492 ++ classes/class_packetpeer.rst | 47 +- classes/class_packetpeerdtls.rst | 29 +- classes/class_packetpeerextension.rst | 35 +- classes/class_packetpeerstream.rst | 19 +- classes/class_packetpeerudp.rst | 85 +- classes/class_panel.rst | 9 +- classes/class_panelcontainer.rst | 5 +- classes/class_panoramaskymaterial.rst | 46 +- classes/class_parallax2d.rst | 246 + classes/class_parallaxbackground.rst | 37 +- classes/class_parallaxlayer.rst | 43 +- classes/class_particleprocessmaterial.rst | 1008 +++-- classes/class_path2d.rst | 7 +- classes/class_path3d.rst | 9 +- classes/class_pathfollow2d.rst | 43 +- classes/class_pathfollow3d.rst | 65 +- classes/class_pckpacker.rst | 23 +- classes/class_performance.rst | 49 +- classes/class_physicalbone2d.rst | 48 +- classes/class_physicalbone3d.rst | 180 +- classes/class_physicalbonesimulator3d.rst | 122 + classes/class_physicalskymaterial.rst | 71 +- classes/class_physicsbody2d.rst | 51 +- classes/class_physicsbody3d.rst | 99 +- classes/class_physicsdirectbodystate2d.rst | 231 +- ...lass_physicsdirectbodystate2dextension.rst | 531 +-- classes/class_physicsdirectbodystate3d.rst | 239 +- ...lass_physicsdirectbodystate3dextension.rst | 371 +- classes/class_physicsdirectspacestate2d.rst | 39 +- ...ass_physicsdirectspacestate2dextension.rst | 57 +- classes/class_physicsdirectspacestate3d.rst | 43 +- ...ass_physicsdirectspacestate3dextension.rst | 65 +- classes/class_physicsmaterial.rst | 27 +- .../class_physicspointqueryparameters2d.rst | 63 +- .../class_physicspointqueryparameters3d.rst | 53 +- classes/class_physicsrayqueryparameters2d.rst | 81 +- classes/class_physicsrayqueryparameters3d.rst | 91 +- classes/class_physicsserver2d.rst | 849 ++-- classes/class_physicsserver2dextension.rst | 1679 +++---- classes/class_physicsserver2dmanager.rst | 15 +- classes/class_physicsserver3d.rst | 1519 +++++-- classes/class_physicsserver3dextension.rst | 1519 +++---- classes/class_physicsserver3dmanager.rst | 15 +- ..._physicsserver3drenderingserverhandler.rst | 81 +- .../class_physicsshapequeryparameters2d.rst | 93 +- .../class_physicsshapequeryparameters3d.rst | 93 +- .../class_physicstestmotionparameters2d.rst | 73 +- .../class_physicstestmotionparameters3d.rst | 83 +- classes/class_physicstestmotionresult2d.rst | 81 +- classes/class_physicstestmotionresult3d.rst | 87 +- classes/class_pinjoint2d.rst | 108 +- classes/class_pinjoint3d.rst | 37 +- classes/class_placeholdercubemap.rst | 11 +- classes/class_placeholdercubemaparray.rst | 11 +- classes/class_placeholdermaterial.rst | 1 + classes/class_placeholdermesh.rst | 7 +- classes/class_placeholdertexture2d.rst | 7 +- classes/class_placeholdertexture2darray.rst | 1 + classes/class_placeholdertexture3d.rst | 7 +- classes/class_placeholdertexturelayered.rst | 13 +- classes/class_plane.rst | 163 +- classes/class_planemesh.rst | 33 +- classes/class_pointlight2d.rst | 28 +- classes/class_pointmesh.rst | 1 + classes/class_polygon2d.rst | 161 +- classes/class_polygonoccluder3d.rst | 16 +- classes/class_polygonpathfinder.rst | 51 +- classes/class_popup.rst | 3 +- classes/class_popupmenu.rst | 727 +-- classes/class_popuppanel.rst | 5 +- classes/class_portablecompressedtexture2d.rst | 73 +- classes/class_primitivemesh.rst | 65 +- classes/class_prismmesh.rst | 31 +- classes/class_proceduralskymaterial.rst | 106 +- classes/class_progressbar.rst | 93 +- classes/class_projection.rst | 243 +- classes/class_projectsettings.rst | 2876 ++++++++---- classes/class_propertytweener.rst | 67 +- classes/class_quadmesh.rst | 5 +- classes/class_quadoccluder3d.rst | 14 +- classes/class_quaternion.rst | 381 +- classes/class_randomnumbergenerator.rst | 89 +- classes/class_range.rst | 95 +- classes/class_raycast2d.rst | 164 +- classes/class_raycast3d.rst | 198 +- classes/class_rdattachmentformat.rst | 19 +- classes/class_rdframebufferpass.rst | 41 +- classes/class_rdpipelinecolorblendstate.rst | 43 +- ...ss_rdpipelinecolorblendstateattachment.rst | 75 +- classes/class_rdpipelinedepthstencilstate.rst | 207 +- classes/class_rdpipelinemultisamplestate.rst | 41 +- .../class_rdpipelinerasterizationstate.rst | 89 +- ...class_rdpipelinespecializationconstant.rst | 13 +- classes/class_rdsamplerstate.rst | 101 +- classes/class_rdshaderfile.rst | 27 +- classes/class_rdshadersource.rst | 51 +- classes/class_rdshaderspirv.rst | 99 +- classes/class_rdtextureformat.rst | 71 +- classes/class_rdtextureview.rst | 31 +- classes/class_rduniform.rst | 45 +- classes/class_rdvertexattribute.rst | 31 +- classes/class_rect2.rst | 288 +- classes/class_rect2i.rst | 258 +- classes/class_rectangleshape2d.rst | 11 +- classes/class_refcounted.rst | 35 +- classes/class_referencerect.rst | 19 +- classes/class_reflectionprobe.rst | 109 +- classes/class_regex.rst | 65 +- classes/class_regexmatch.rst | 41 +- classes/class_remotetransform2d.rst | 39 +- classes/class_remotetransform3d.rst | 39 +- classes/class_renderdata.rst | 106 + classes/class_renderdataextension.rst | 104 + classes/class_renderdatard.rst | 35 + classes/class_renderingdevice.rst | 1121 +++-- classes/class_renderingserver.rst | 3947 ++++++++++------- classes/class_renderscenebuffers.rst | 64 + .../class_renderscenebuffersconfiguration.rst | 217 + classes/class_renderscenebuffersextension.rst | 102 + classes/class_renderscenebuffersrd.rst | 356 ++ classes/class_renderscenedata.rst | 140 + classes/class_renderscenedataextension.rst | 130 + classes/class_renderscenedatard.rst | 33 + classes/class_resource.rst | 183 +- classes/class_resourceformatloader.rst | 115 +- classes/class_resourceformatsaver.rst | 47 +- classes/class_resourceimporter.rst | 3 +- classes/class_resourceimporterbitmap.rst | 31 +- classes/class_resourceimporterbmfont.rst | 55 +- .../class_resourceimportercsvtranslation.rst | 39 +- classes/class_resourceimporterdynamicfont.rst | 143 +- classes/class_resourceimporterimage.rst | 17 +- classes/class_resourceimporterimagefont.rst | 121 +- .../class_resourceimporterlayeredtexture.rst | 93 +- classes/class_resourceimportermp3.rst | 53 +- classes/class_resourceimporterobj.rst | 75 +- classes/class_resourceimporteroggvorbis.rst | 96 +- classes/class_resourceimporterscene.rst | 227 +- classes/class_resourceimportershaderfile.rst | 10 +- classes/class_resourceimportertexture.rst | 167 +- .../class_resourceimportertextureatlas.rst | 36 +- classes/class_resourceimporterwav.rst | 89 +- classes/class_resourceloader.rst | 111 +- classes/class_resourcepreloader.rst | 39 +- classes/class_resourcesaver.rst | 31 +- classes/class_resourceuid.rst | 53 +- classes/class_ribbontrailmesh.rst | 39 +- classes/class_richtexteffect.rst | 13 +- classes/class_richtextlabel.rst | 862 ++-- classes/class_rid.rst | 69 +- classes/class_rigidbody2d.rst | 253 +- classes/class_rigidbody3d.rst | 259 +- classes/class_rootmotionview.rst | 37 +- classes/class_scenemultiplayer.rst | 93 +- classes/class_scenereplicationconfig.rst | 152 +- classes/class_scenestate.rst | 131 +- classes/class_scenetree.rst | 390 +- classes/class_scenetreetimer.rst | 11 +- classes/class_script.rst | 136 +- classes/class_scriptcreatedialog.rst | 11 +- classes/class_scripteditor.rst | 94 +- classes/class_scripteditorbase.rst | 45 +- classes/class_scriptextension.rst | 319 +- classes/class_scriptlanguage.rst | 64 + classes/class_scriptlanguageextension.rst | 601 ++- classes/class_scrollbar.rst | 178 +- classes/class_scrollcontainer.rst | 89 +- classes/class_segmentshape2d.rst | 13 +- classes/class_semaphore.rst | 21 +- classes/class_separationrayshape2d.rst | 15 +- classes/class_separationrayshape3d.rst | 15 +- classes/class_separator.rst | 44 + classes/class_shader.rst | 35 +- classes/class_shaderglobalsoverride.rst | 10 +- classes/class_shaderinclude.rst | 7 +- classes/class_shadermaterial.rst | 29 +- classes/class_shape2d.rst | 45 +- classes/class_shape3d.rst | 21 +- classes/class_shapecast2d.rst | 169 +- classes/class_shapecast3d.rst | 185 +- classes/class_shortcut.rst | 27 +- classes/class_signal.rst | 91 +- classes/class_skeleton2d.rst | 53 +- classes/class_skeleton3d.rst | 502 ++- classes/class_skeletonik3d.rst | 114 +- classes/class_skeletonmodification2d.rst | 83 +- classes/class_skeletonmodification2dccdik.rst | 107 +- .../class_skeletonmodification2dfabrik.rst | 65 +- .../class_skeletonmodification2djiggle.rst | 167 +- .../class_skeletonmodification2dlookat.rst | 83 +- ...ss_skeletonmodification2dphysicalbones.rst | 43 +- ...lass_skeletonmodification2dstackholder.rst | 17 +- .../class_skeletonmodification2dtwoboneik.rst | 77 +- classes/class_skeletonmodificationstack2d.rst | 77 +- classes/class_skeletonmodifier3d.rst | 156 + classes/class_skeletonprofile.rst | 175 +- classes/class_skeletonprofilehumanoid.rst | 60 + classes/class_skin.rst | 69 +- classes/class_skinreference.rst | 40 +- classes/class_sky.rst | 27 +- classes/class_slider.rst | 172 +- classes/class_sliderjoint3d.rst | 201 +- classes/class_softbody3d.rst | 159 +- classes/class_spheremesh.rst | 31 +- classes/class_sphereoccluder3d.rst | 14 +- classes/class_sphereshape3d.rst | 9 +- classes/class_spinbox.rst | 74 +- classes/class_splitcontainer.rst | 61 +- classes/class_spotlight3d.rst | 37 +- classes/class_springarm3d.rst | 53 +- classes/class_sprite2d.rst | 103 +- classes/class_sprite3d.rst | 53 +- classes/class_spritebase3d.rst | 159 +- classes/class_spriteframes.rst | 109 +- classes/class_standardmaterial3d.rst | 3 +- classes/class_staticbody2d.rst | 21 +- classes/class_staticbody3d.rst | 27 +- classes/class_statusindicator.rst | 168 + classes/class_streampeer.rst | 195 +- classes/class_streampeerbuffer.rst | 47 +- classes/class_streampeerextension.rst | 43 +- classes/class_streampeergzip.rst | 29 +- classes/class_streampeertcp.rst | 59 +- classes/class_streampeertls.rst | 41 +- classes/class_string.rst | 845 ++-- classes/class_stringname.rst | 782 ++-- classes/class_stylebox.rst | 91 +- classes/class_styleboxempty.rst | 1 + classes/class_styleboxflat.rst | 205 +- classes/class_styleboxline.rst | 31 +- classes/class_styleboxtexture.rst | 125 +- classes/class_subviewport.rst | 47 +- classes/class_subviewportcontainer.rst | 56 +- classes/class_surfacetool.rst | 223 +- classes/class_syntaxhighlighter.rst | 57 +- classes/class_systemfont.rst | 101 +- classes/class_tabbar.rst | 450 +- classes/class_tabcontainer.rst | 493 +- classes/class_tcpserver.rst | 41 +- classes/class_textedit.rst | 1605 ++++--- classes/class_textline.rst | 180 +- classes/class_textmesh.rst | 120 +- classes/class_textparagraph.rst | 284 +- classes/class_textserver.rst | 1594 ++++--- classes/class_textserveradvanced.rst | 1 + classes/class_textserverdummy.rst | 1 + classes/class_textserverextension.rst | 2669 ++++++----- classes/class_textserverfallback.rst | 1 + classes/class_textservermanager.rst | 55 +- classes/class_texture.rst | 1 + classes/class_texture2d.rst | 117 +- classes/class_texture2darray.rst | 9 +- classes/class_texture2darrayrd.rst | 31 + classes/class_texture2drd.rst | 67 + classes/class_texture3d.rst | 97 +- classes/class_texture3drd.rst | 65 + classes/class_texturebutton.rst | 65 +- classes/class_texturecubemaparrayrd.rst | 31 + classes/class_texturecubemaprd.rst | 31 + classes/class_texturelayered.rst | 105 +- classes/class_texturelayeredrd.rst | 67 + classes/class_textureprogressbar.rst | 135 +- classes/class_texturerect.rst | 41 +- classes/class_theme.rst | 395 +- classes/class_themedb.rst | 47 +- classes/class_thread.rst | 45 +- classes/class_tiledata.rst | 239 +- classes/class_tilemap.rst | 542 ++- classes/class_tilemaplayer.rst | 782 ++++ classes/class_tilemappattern.rst | 65 +- classes/class_tileset.rst | 523 +-- classes/class_tilesetatlassource.rst | 294 +- .../class_tilesetscenescollectionsource.rst | 69 +- classes/class_tilesetsource.rst | 39 +- classes/class_time.rst | 143 +- classes/class_timer.rst | 104 +- classes/class_tlsoptions.rst | 107 +- classes/class_torusmesh.rst | 25 +- classes/class_touchscreenbutton.rst | 69 +- classes/class_transform2d.rst | 291 +- classes/class_transform3d.rst | 305 +- classes/class_translation.rst | 73 +- classes/class_translationserver.rst | 135 +- classes/class_tree.rst | 779 ++-- classes/class_treeitem.rst | 745 ++-- classes/class_trianglemesh.rst | 1 + classes/class_tubetrailmesh.rst | 49 +- classes/class_tween.rst | 185 +- classes/class_tweener.rst | 3 +- classes/class_udpserver.rst | 55 +- classes/class_undoredo.rst | 179 +- classes/class_uniformsetcacherd.rst | 60 + classes/class_upnp.rst | 89 +- classes/class_upnpdevice.rst | 69 +- classes/class_variant.rst | 11 +- classes/class_vboxcontainer.rst | 32 +- classes/class_vector2.rst | 531 ++- classes/class_vector2i.rst | 349 +- classes/class_vector3.rst | 571 ++- classes/class_vector3i.rst | 351 +- classes/class_vector4.rst | 411 +- classes/class_vector4i.rst | 345 +- classes/class_vehiclebody3d.rst | 21 +- classes/class_vehiclewheel3d.rst | 115 +- classes/class_vflowcontainer.rst | 44 +- classes/class_videostream.rst | 26 +- classes/class_videostreamplayback.rst | 127 +- classes/class_videostreamplayer.rst | 116 +- classes/class_videostreamtheora.rst | 1 + classes/class_viewport.rst | 780 ++-- classes/class_viewporttexture.rst | 27 +- classes/class_visibleonscreenenabler2d.rst | 27 +- classes/class_visibleonscreenenabler3d.rst | 39 +- classes/class_visibleonscreennotifier2d.rst | 31 +- classes/class_visibleonscreennotifier3d.rst | 37 +- classes/class_visualinstance3d.rst | 67 +- classes/class_visualshader.rst | 168 +- classes/class_visualshadernode.rst | 94 +- classes/class_visualshadernodebillboard.rst | 15 +- .../class_visualshadernodebooleanconstant.rst | 7 +- ...class_visualshadernodebooleanparameter.rst | 13 +- classes/class_visualshadernodeclamp.rst | 9 +- .../class_visualshadernodecolorconstant.rst | 7 +- classes/class_visualshadernodecolorfunc.rst | 9 +- classes/class_visualshadernodecolorop.rst | 9 +- .../class_visualshadernodecolorparameter.rst | 13 +- classes/class_visualshadernodecomment.rst | 42 +- classes/class_visualshadernodecompare.rst | 25 +- classes/class_visualshadernodeconstant.rst | 1 + classes/class_visualshadernodecubemap.rst | 25 +- ...class_visualshadernodecubemapparameter.rst | 1 + .../class_visualshadernodecurvetexture.rst | 7 +- .../class_visualshadernodecurvexyztexture.rst | 7 +- classes/class_visualshadernodecustom.rst | 237 +- .../class_visualshadernodederivativefunc.rst | 25 +- classes/class_visualshadernodedeterminant.rst | 1 + .../class_visualshadernodedistancefade.rst | 1 + classes/class_visualshadernodedotproduct.rst | 1 + classes/class_visualshadernodeexpression.rst | 7 +- classes/class_visualshadernodefaceforward.rst | 1 + .../class_visualshadernodefloatconstant.rst | 7 +- classes/class_visualshadernodefloatfunc.rst | 9 +- classes/class_visualshadernodefloatop.rst | 9 +- .../class_visualshadernodefloatparameter.rst | 39 +- classes/class_visualshadernodeframe.rst | 192 + classes/class_visualshadernodefresnel.rst | 1 + ...class_visualshadernodeglobalexpression.rst | 1 + classes/class_visualshadernodegroupbase.rst | 129 +- classes/class_visualshadernodeif.rst | 11 +- classes/class_visualshadernodeinput.rst | 17 +- classes/class_visualshadernodeintconstant.rst | 7 +- classes/class_visualshadernodeintfunc.rst | 9 +- classes/class_visualshadernodeintop.rst | 9 +- .../class_visualshadernodeintparameter.rst | 39 +- classes/class_visualshadernodeis.rst | 11 +- ...class_visualshadernodelinearscenedepth.rst | 1 + classes/class_visualshadernodemix.rst | 9 +- classes/class_visualshadernodemultiplyadd.rst | 9 +- .../class_visualshadernodeouterproduct.rst | 1 + classes/class_visualshadernodeoutput.rst | 1 + classes/class_visualshadernodeparameter.rst | 15 +- .../class_visualshadernodeparameterref.rst | 7 +- ...ss_visualshadernodeparticleaccelerator.rst | 9 +- ...ass_visualshadernodeparticleboxemitter.rst | 1 + ...s_visualshadernodeparticleconevelocity.rst | 1 + .../class_visualshadernodeparticleemit.rst | 9 +- .../class_visualshadernodeparticleemitter.rst | 7 +- ...ss_visualshadernodeparticlemeshemitter.rst | 19 +- ...lshadernodeparticlemultiplybyaxisangle.rst | 7 +- .../class_visualshadernodeparticleoutput.rst | 1 + ...ass_visualshadernodeparticlerandomness.rst | 9 +- ...ss_visualshadernodeparticleringemitter.rst | 1 + ..._visualshadernodeparticlesphereemitter.rst | 1 + .../class_visualshadernodeproximityfade.rst | 1 + classes/class_visualshadernoderandomrange.rst | 1 + classes/class_visualshadernoderemap.rst | 1 + ....rst => class_visualshadernodereroute.rst} | 29 +- .../class_visualshadernoderesizablebase.rst | 9 +- .../class_visualshadernoderotationbyaxis.rst | 31 + classes/class_visualshadernodesample3d.rst | 9 +- ...visualshadernodescreennormalworldspace.rst | 31 + .../class_visualshadernodescreenuvtosdf.rst | 1 + classes/class_visualshadernodesdfraymarch.rst | 1 + .../class_visualshadernodesdftoscreenuv.rst | 1 + classes/class_visualshadernodesmoothstep.rst | 9 +- classes/class_visualshadernodestep.rst | 9 +- classes/class_visualshadernodeswitch.rst | 11 +- classes/class_visualshadernodetexture.rst | 25 +- .../class_visualshadernodetexture2darray.rst | 7 +- ...isualshadernodetexture2darrayparameter.rst | 1 + ...ass_visualshadernodetexture2dparameter.rst | 1 + classes/class_visualshadernodetexture3d.rst | 7 +- ...ass_visualshadernodetexture3dparameter.rst | 1 + ...class_visualshadernodetextureparameter.rst | 61 +- ...ualshadernodetextureparametertriplanar.rst | 1 + classes/class_visualshadernodetexturesdf.rst | 1 + ...class_visualshadernodetexturesdfnormal.rst | 1 + ...class_visualshadernodetransformcompose.rst | 3 +- ...lass_visualshadernodetransformconstant.rst | 7 +- ...ass_visualshadernodetransformdecompose.rst | 3 +- .../class_visualshadernodetransformfunc.rst | 9 +- classes/class_visualshadernodetransformop.rst | 11 +- ...ass_visualshadernodetransformparameter.rst | 13 +- ...class_visualshadernodetransformvecmult.rst | 11 +- .../class_visualshadernodeuintconstant.rst | 7 +- classes/class_visualshadernodeuintfunc.rst | 9 +- classes/class_visualshadernodeuintop.rst | 9 +- .../class_visualshadernodeuintparameter.rst | 13 +- classes/class_visualshadernodeuvfunc.rst | 9 +- .../class_visualshadernodeuvpolarcoord.rst | 1 + classes/class_visualshadernodevarying.rst | 13 +- .../class_visualshadernodevaryinggetter.rst | 1 + .../class_visualshadernodevaryingsetter.rst | 1 + .../class_visualshadernodevec2constant.rst | 7 +- .../class_visualshadernodevec2parameter.rst | 13 +- .../class_visualshadernodevec3constant.rst | 7 +- .../class_visualshadernodevec3parameter.rst | 13 +- .../class_visualshadernodevec4constant.rst | 7 +- .../class_visualshadernodevec4parameter.rst | 13 +- classes/class_visualshadernodevectorbase.rst | 9 +- .../class_visualshadernodevectorcompose.rst | 1 + .../class_visualshadernodevectordecompose.rst | 1 + .../class_visualshadernodevectordistance.rst | 1 + classes/class_visualshadernodevectorfunc.rst | 9 +- classes/class_visualshadernodevectorlen.rst | 1 + classes/class_visualshadernodevectorop.rst | 9 +- .../class_visualshadernodevectorrefract.rst | 1 + ...visualshadernodeworldpositionfromdepth.rst | 31 + classes/class_voxelgi.rst | 45 +- classes/class_voxelgidata.rst | 89 +- classes/class_vscrollbar.rst | 174 +- classes/class_vseparator.rst | 44 +- classes/class_vslider.rst | 146 +- classes/class_vsplitcontainer.rst | 72 +- classes/class_weakref.rst | 9 +- classes/class_webrtcdatachannel.rst | 85 +- classes/class_webrtcdatachannelextension.rst | 147 +- classes/class_webrtcmultiplayerpeer.rst | 51 +- classes/class_webrtcpeerconnection.rst | 93 +- .../class_webrtcpeerconnectionextension.rst | 91 +- classes/class_websocketmultiplayerpeer.rst | 73 +- classes/class_websocketpeer.rst | 137 +- classes/class_webxrinterface.rst | 143 +- classes/class_window.rst | 837 ++-- classes/class_workerthreadpool.rst | 55 +- classes/class_world2d.rst | 19 +- classes/class_world3d.rst | 37 +- classes/class_worldboundaryshape2d.rst | 15 +- classes/class_worldboundaryshape3d.rst | 7 +- classes/class_worldenvironment.rst | 41 +- classes/class_x509certificate.rst | 34 +- classes/class_xmlparser.rst | 198 +- classes/class_xranchor3d.rst | 24 +- classes/class_xrbodymodifier3d.rst | 189 + classes/class_xrbodytracker.rst | 875 ++++ classes/class_xrcamera3d.rst | 1 + classes/class_xrcontroller3d.rst | 53 +- classes/class_xrcontrollertracker.rst | 54 + classes/class_xrfacemodifier3d.rst | 97 + classes/class_xrfacetracker.rst | 1290 ++++++ classes/class_xrhandmodifier3d.rst | 134 + classes/class_xrhandtracker.rst | 583 +++ classes/class_xrinterface.rst | 242 +- classes/class_xrinterfaceextension.rst | 294 +- classes/class_xrnode3d.rst | 92 +- classes/class_xrorigin3d.rst | 23 +- classes/class_xrpose.rst | 56 +- classes/class_xrpositionaltracker.rst | 168 +- classes/class_xrserver.rst | 169 +- classes/class_xrtracker.rst | 126 + classes/class_xrvrs.rst | 115 + classes/class_zippacker.rst | 35 +- classes/class_zipreader.rst | 43 +- classes/index.rst | 71 +- 963 files changed, 90134 insertions(+), 53077 deletions(-) create mode 100644 classes/class_animationmixer.rst create mode 100644 classes/class_audioeffecthardlimiter.rst create mode 100644 classes/class_audiosample.rst create mode 100644 classes/class_audiosampleplayback.rst create mode 100644 classes/class_audiostreaminteractive.rst create mode 100644 classes/class_audiostreamplaybackinteractive.rst create mode 100644 classes/class_audiostreamplaybackplaylist.rst create mode 100644 classes/class_audiostreamplaybacksynchronized.rst create mode 100644 classes/class_audiostreamplaylist.rst create mode 100644 classes/class_audiostreamsynchronized.rst create mode 100644 classes/class_compositor.rst create mode 100644 classes/class_compositoreffect.rst rename classes/{class_editorsceneformatimporterfbx.rst => class_editorsceneformatimporterfbx2gltf.rst} (74%) create mode 100644 classes/class_editorsceneformatimporterufbx.rst create mode 100644 classes/class_fbxdocument.rst create mode 100644 classes/class_fbxstate.rst create mode 100644 classes/class_framebuffercacherd.rst create mode 100644 classes/class_graphelement.rst create mode 100644 classes/class_graphframe.rst create mode 100644 classes/class_nativemenu.rst create mode 100644 classes/class_navigationmeshsourcegeometrydata2d.rst create mode 100644 classes/class_openxrapiextension.rst create mode 100644 classes/class_openxrcompositionlayer.rst create mode 100644 classes/class_openxrcompositionlayercylinder.rst create mode 100644 classes/class_openxrcompositionlayerequirect.rst create mode 100644 classes/class_openxrcompositionlayerquad.rst create mode 100644 classes/class_openxrextensionwrapperextension.rst create mode 100644 classes/class_openxrinteractionprofilemetadata.rst create mode 100644 classes/class_packedvector4array.rst create mode 100644 classes/class_parallax2d.rst create mode 100644 classes/class_physicalbonesimulator3d.rst create mode 100644 classes/class_renderdata.rst create mode 100644 classes/class_renderdataextension.rst create mode 100644 classes/class_renderdatard.rst create mode 100644 classes/class_renderscenebuffers.rst create mode 100644 classes/class_renderscenebuffersconfiguration.rst create mode 100644 classes/class_renderscenebuffersextension.rst create mode 100644 classes/class_renderscenebuffersrd.rst create mode 100644 classes/class_renderscenedata.rst create mode 100644 classes/class_renderscenedataextension.rst create mode 100644 classes/class_renderscenedatard.rst create mode 100644 classes/class_skeletonmodifier3d.rst create mode 100644 classes/class_statusindicator.rst create mode 100644 classes/class_texture2darrayrd.rst create mode 100644 classes/class_texture2drd.rst create mode 100644 classes/class_texture3drd.rst create mode 100644 classes/class_texturecubemaparrayrd.rst create mode 100644 classes/class_texturecubemaprd.rst create mode 100644 classes/class_texturelayeredrd.rst create mode 100644 classes/class_tilemaplayer.rst create mode 100644 classes/class_uniformsetcacherd.rst create mode 100644 classes/class_visualshadernodeframe.rst rename classes/{class_godotsharp.rst => class_visualshadernodereroute.rst} (53%) create mode 100644 classes/class_visualshadernoderotationbyaxis.rst create mode 100644 classes/class_visualshadernodescreennormalworldspace.rst create mode 100644 classes/class_visualshadernodeworldpositionfromdepth.rst create mode 100644 classes/class_xrbodymodifier3d.rst create mode 100644 classes/class_xrbodytracker.rst create mode 100644 classes/class_xrcontrollertracker.rst create mode 100644 classes/class_xrfacemodifier3d.rst create mode 100644 classes/class_xrfacetracker.rst create mode 100644 classes/class_xrhandmodifier3d.rst create mode 100644 classes/class_xrhandtracker.rst create mode 100644 classes/class_xrtracker.rst create mode 100644 classes/class_xrvrs.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 889fab9491f..637da62db00 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -36,37 +36,37 @@ Methods .. table:: :widths: auto - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color8` **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`assert` **(** :ref:`bool` condition, :ref:`String` message="" **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`char` **(** :ref:`int` char **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`convert` **(** :ref:`Variant` what, :ref:`int` type **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`dict_to_inst` **(** :ref:`Dictionary` dictionary **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_stack` **(** **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`inst_to_dict` **(** :ref:`Object` instance **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_instance_of` **(** :ref:`Variant` value, :ref:`Variant` type **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`len` **(** :ref:`Variant` var **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`load` **(** :ref:`String` path **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`preload` **(** :ref:`String` path **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_debug` **(** ... **)** |vararg| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_stack` **(** **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`range` **(** ... **)** |vararg| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`type_exists` **(** :ref:`StringName` type **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color8`\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`assert`\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`char`\ (\ char\: :ref:`int`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`convert`\ (\ what\: :ref:`Variant`, type\: :ref:`int`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`dict_to_inst`\ (\ dictionary\: :ref:`Dictionary`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_stack`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`inst_to_dict`\ (\ instance\: :ref:`Object`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_instance_of`\ (\ value\: :ref:`Variant`, type\: :ref:`Variant`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`len`\ (\ var\: :ref:`Variant`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`load`\ (\ path\: :ref:`String`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`preload`\ (\ path\: :ref:`String`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_debug`\ (\ ...\ ) |vararg| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_stack`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`range`\ (\ ...\ ) |vararg| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`type_exists`\ (\ type\: :ref:`StringName`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,7 +81,7 @@ Constants .. rst-class:: classref-constant -**PI** = ``3.14159265358979`` +**PI** = ``3.14159265358979`` :ref:`🔗` Constant that represents how many times the diameter of a circle fits around its perimeter. This is equivalent to ``TAU / 2``, or 180 degrees in rotations. @@ -89,7 +89,7 @@ Constant that represents how many times the diameter of a circle fits around its .. rst-class:: classref-constant -**TAU** = ``6.28318530717959`` +**TAU** = ``6.28318530717959`` :ref:`🔗` The circle constant, the circumference of the unit circle in radians. This is equivalent to ``PI * 2``, or 360 degrees in rotations. @@ -97,7 +97,7 @@ The circle constant, the circumference of the unit circle in radians. This is eq .. rst-class:: classref-constant -**INF** = ``inf`` +**INF** = ``inf`` :ref:`🔗` Positive floating-point infinity. This is the result of floating-point division when the divisor is ``0.0``. For negative infinity, use ``-INF``. Dividing by ``-0.0`` will result in negative infinity if the numerator is positive, so dividing by ``0.0`` is not the same as dividing by ``-0.0`` (despite ``0.0 == -0.0`` returning ``true``). @@ -107,7 +107,7 @@ Positive floating-point infinity. This is the result of floating-point division .. rst-class:: classref-constant -**NAN** = ``nan`` +**NAN** = ``nan`` :ref:`🔗` "Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. @@ -124,16 +124,43 @@ Annotations .. rst-class:: classref-annotation -**@export** **(** **)** +**@export**\ (\ ) :ref:`🔗` Mark the following property as exported (editable in the Inspector dock and saved to disk). To control the type of the exported property, use the type hint notation. :: + extends Node + + enum Direction {LEFT, RIGHT, UP, DOWN} + + # Built-in types. @export var string = "" @export var int_number = 5 @export var float_number: float = 5 + + # Enums. + @export var type: Variant.Type + @export var format: Image.Format + @export var direction: Direction + + # Resources. @export var image: Image + @export var custom_resource: CustomResource + + # Nodes. + @export var node: Node + @export var custom_node: CustomNode + + # Typed arrays. + @export var int_array: Array[int] + @export var direction_array: Array[Direction] + @export var image_array: Array[Image] + @export var node_array: Array[Node] + +\ **Note:** Custom resources and nodes should be registered as global classes using ``class_name``, since the Inspector currently only supports global classes. Otherwise, a less specific type will be exported instead. + +\ **Note:** Node export is only supported in :ref:`Node`-derived classes and has a number of other limitations. .. rst-class:: classref-item-separator @@ -143,7 +170,7 @@ Mark the following property as exported (editable in the Inspector dock and save .. rst-class:: classref-annotation -**@export_category** **(** :ref:`String` name **)** +**@export_category**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Define a new category for the following exported properties. This helps to organize properties in the Inspector dock. @@ -165,15 +192,34 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY` -Export a :ref:`Color` property without allowing its transparency (:ref:`Color.a`) to be edited. +Export a :ref:`Color`, :ref:`Array`\ \[:ref:`Color`\ \], or :ref:`PackedColorArray` property without allowing its transparency (:ref:`Color.a`) to be edited. See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA`. :: @export_color_no_alpha var dye_color: Color + @export_color_no_alpha var dye_colors: Array[Color] + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GDScript_annotation_@export_custom: + +.. rst-class:: classref-annotation + +**@export_custom**\ (\ hint\: :ref:`PropertyHint`, hint_string\: :ref:`String`, usage\: |bitfield|\[:ref:`PropertyUsageFlags`\] = 6\ ) :ref:`🔗` + +Allows you to set a custom hint, hint string, and usage flags for the exported property. Note that there's no validation done in GDScript, it will just pass the parameters to the editor. + +:: + + @export_custom(PROPERTY_HINT_NONE, "suffix:m") var suffix: Vector3 + +\ **Note:** Regardless of the ``usage`` value, the :ref:`@GlobalScope.PROPERTY_USAGE_SCRIPT_VARIABLE` flag is always added, as with any explicitly declared script variable. .. rst-class:: classref-item-separator @@ -183,15 +229,16 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_COLOR_NO_ALPHA` -Export a :ref:`String` property as a path to a directory. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_dir` to allow picking from the entire filesystem. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], or :ref:`PackedStringArray` property as a path to a directory. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_dir` to allow picking from the entire filesystem. See also :ref:`@GlobalScope.PROPERTY_HINT_DIR`. :: @export_dir var sprite_folder_path: String + @export_dir var sprite_folder_paths: Array[String] .. rst-class:: classref-item-separator @@ -201,9 +248,9 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_DIR` names, ... **)** |vararg| +**@export_enum**\ (\ names\: :ref:`String`, ...\ ) |vararg| :ref:`🔗` -Export an :ref:`int` or :ref:`String` property as an enumerated list of options. If the property is an :ref:`int`, then the index of the value is stored, in the same order the values are provided. You can add explicit values using a colon. If the property is a :ref:`String`, then the value is stored. +Export an :ref:`int`, :ref:`String`, :ref:`Array`\ \[:ref:`int`\ \], :ref:`Array`\ \[:ref:`String`\ \], :ref:`PackedByteArray`, :ref:`PackedInt32Array`, :ref:`PackedInt64Array`, or :ref:`PackedStringArray` property as an enumerated list of options (or an array of options). If the property is an :ref:`int`, then the index of the value is stored, in the same order the values are provided. You can add explicit values using a colon. If the property is a :ref:`String`, then the value is stored. See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM`. @@ -212,6 +259,9 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM` hints="", ... **)** |vararg| +**@export_exp_easing**\ (\ hints\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` Export a floating-point property with an easing editor widget. Additional hints can be provided to adjust the behavior of the widget. ``"attenuation"`` flips the curve, which makes it more intuitive for editing attenuation properties. ``"positive_only"`` limits values to only be greater than or equal to zero. @@ -245,6 +298,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_EXP_EASING` filter="", ... **)** |vararg| +**@export_file**\ (\ filter\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` -Export a :ref:`String` property as a path to a file. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_file` to allow picking from the entire filesystem. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], or :ref:`PackedStringArray` property as a path to a file. The path will be limited to the project folder and its subfolders. See :ref:`@export_global_file` to allow picking from the entire filesystem. If ``filter`` is provided, only matching files will be available for picking. @@ -266,6 +320,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_FILE` names, ... **)** |vararg| +**@export_flags**\ (\ names\: :ref:`String`, ...\ ) |vararg| :ref:`🔗` Export an integer property as a bit flag field. This allows to store several "checked" or ``true`` values with one property, and comfortably select them from the Inspector dock. @@ -306,6 +361,12 @@ You can also combine several flags: @export_flags("A:16", "B", "C") var x +You can also use the annotation on :ref:`Array`\ \[:ref:`int`\ \], :ref:`PackedByteArray`, :ref:`PackedInt32Array`, and :ref:`PackedInt64Array`\ + +:: + + @export_flags("Fire", "Water", "Earth", "Wind") var phase_elements: Array[int] + .. rst-class:: classref-item-separator ---- @@ -314,7 +375,7 @@ You can also combine several flags: .. rst-class:: classref-annotation -**@export_flags_2d_navigation** **(** **)** +**@export_flags_2d_navigation**\ (\ ) :ref:`🔗` Export an integer property as a bit flag field for 2D navigation layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_navigation/layer_1`. @@ -323,6 +384,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_NAVIGATION` Export an integer property as a bit flag field for 2D physics layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_physics/layer_1`. @@ -341,6 +403,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_PHYSICS` Export an integer property as a bit flag field for 2D render layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/2d_render/layer_1`. @@ -359,6 +422,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_2D_RENDER` Export an integer property as a bit flag field for 3D navigation layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_navigation/layer_1`. @@ -377,6 +441,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_NAVIGATION` Export an integer property as a bit flag field for 3D physics layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_physics/layer_1`. @@ -395,6 +460,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_PHYSICS` Export an integer property as a bit flag field for 3D render layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/3d_render/layer_1`. @@ -413,6 +479,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_3D_RENDER` Export an integer property as a bit flag field for navigation avoidance layers. The widget in the Inspector dock will use the layer names defined in :ref:`ProjectSettings.layer_names/avoidance/layer_1`. @@ -431,6 +498,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_LAYERS_AVOIDANCE` -Export a :ref:`String` property as an absolute path to a directory. The path can be picked from the entire filesystem. See :ref:`@export_dir` to limit it to the project folder and its subfolders. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], or :ref:`PackedStringArray` property as an absolute path to a directory. The path can be picked from the entire filesystem. See :ref:`@export_dir` to limit it to the project folder and its subfolders. See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_DIR`. :: @export_global_dir var sprite_folder_path: String + @export_global_dir var sprite_folder_paths: Array[String] .. rst-class:: classref-item-separator @@ -458,9 +527,9 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_DIR` filter="", ... **)** |vararg| +**@export_global_file**\ (\ filter\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` -Export a :ref:`String` property as an absolute path to a file. The path can be picked from the entire filesystem. See :ref:`@export_file` to limit it to the project folder and its subfolders. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], or :ref:`PackedStringArray` property as an absolute path to a file. The path can be picked from the entire filesystem. See :ref:`@export_file` to limit it to the project folder and its subfolders. If ``filter`` is provided, only matching files will be available for picking. @@ -470,6 +539,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE` name, :ref:`String` prefix="" **)** +**@export_group**\ (\ name\: :ref:`String`, prefix\: :ref:`String` = ""\ ) :ref:`🔗` Define a new group for the following exported properties. This helps to organize properties in the Inspector dock. Groups can be added with an optional ``prefix``, which would make group to only consider properties that have this prefix. The grouping will break on the first property that doesn't have a prefix. The prefix is also removed from the property's name in the Inspector dock. @@ -510,15 +580,16 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` -Export a :ref:`String` property with a large :ref:`TextEdit` widget instead of a :ref:`LineEdit`. This adds support for multiline content and makes it easier to edit large amount of text stored in the property. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], :ref:`PackedStringArray`, :ref:`Dictionary` or :ref:`Array`\ \[:ref:`Dictionary`\ \] property with a large :ref:`TextEdit` widget instead of a :ref:`LineEdit`. This adds support for multiline content and makes it easier to edit large amount of text stored in the property. See also :ref:`@GlobalScope.PROPERTY_HINT_MULTILINE_TEXT`. :: @export_multiline var character_biography + @export_multiline var npc_dialogs: Array[String] .. rst-class:: classref-item-separator @@ -528,15 +599,18 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_MULTILINE_TEXT` type="", ... **)** |vararg| +**@export_node_path**\ (\ type\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` -Export a :ref:`NodePath` property with a filter for allowed node types. +Export a :ref:`NodePath` or :ref:`Array`\ \[:ref:`NodePath`\ \] property with a filter for allowed node types. See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES`. :: @export_node_path("Button", "TouchScreenButton") var some_button + @export_node_path("Button", "TouchScreenButton") var many_buttons: Array[NodePath] + +\ **Note:** The type must be a native class or a globally registered script (using the ``class_name`` keyword) that inherits :ref:`Node`. .. rst-class:: classref-item-separator @@ -546,15 +620,16 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES` placeholder **)** +**@export_placeholder**\ (\ placeholder\: :ref:`String`\ ) :ref:`🔗` -Export a :ref:`String` property with a placeholder text displayed in the editor widget when no value is present. +Export a :ref:`String`, :ref:`Array`\ \[:ref:`String`\ \], or :ref:`PackedStringArray` property with a placeholder text displayed in the editor widget when no value is present. See also :ref:`@GlobalScope.PROPERTY_HINT_PLACEHOLDER_TEXT`. :: @export_placeholder("Name in lowercase") var character_id: String + @export_placeholder("Name in lowercase") var friend_ids: Array[String] .. rst-class:: classref-item-separator @@ -564,13 +639,13 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_PLACEHOLDER_TEXT` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| +**@export_range**\ (\ min\: :ref:`float`, max\: :ref:`float`, step\: :ref:`float` = 1.0, extra_hints\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` -Export an :ref:`int` or :ref:`float` property as a range value. The range must be defined by ``min`` and ``max``, as well as an optional ``step`` and a variety of extra hints. The ``step`` defaults to ``1`` for integer properties. For floating-point numbers this value depends on your ``EditorSettings.interface/inspector/default_float_step`` setting. +Export an :ref:`int`, :ref:`float`, :ref:`Array`\ \[:ref:`int`\ \], :ref:`Array`\ \[:ref:`float`\ \], :ref:`PackedByteArray`, :ref:`PackedInt32Array`, :ref:`PackedInt64Array`, :ref:`PackedFloat32Array`, or :ref:`PackedFloat64Array` property as a range value. The range must be defined by ``min`` and ``max``, as well as an optional ``step`` and a variety of extra hints. The ``step`` defaults to ``1`` for integer properties. For floating-point numbers this value depends on your :ref:`EditorSettings.interface/inspector/default_float_step` setting. If hints ``"or_greater"`` and ``"or_less"`` are provided, the editor widget will not cap the value at range boundaries. The ``"exp"`` hint will make the edited values on range to change exponentially. The ``"hide_slider"`` hint will hide the slider element of the editor widget. -Hints also allow to indicate the units for the edited value. Using ``"radians"`` you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock. ``"degrees"`` allows to add a degree sign as a unit suffix. Finally, a custom suffix can be provided using ``"suffix:unit"``, where "unit" can be any string. +Hints also allow to indicate the units for the edited value. Using ``"radians_as_degrees"`` you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). ``"degrees"`` allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using ``"suffix:unit"``, where "unit" can be any string. See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE`. @@ -579,11 +654,12 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE` + +Export a property with :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for :ref:`@tool` scripts. Also the property value is copied when :ref:`Resource.duplicate` or :ref:`Node.duplicate` is called, unlike non-exported variables. + +:: + + var a # Not stored in the file, not displayed in the editor. + @export_storage var b # Stored in the file, not displayed in the editor. + @export var c: int # Stored in the file, displayed in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GDScript_annotation_@export_subgroup: .. rst-class:: classref-annotation -**@export_subgroup** **(** :ref:`String` name, :ref:`String` prefix="" **)** +**@export_subgroup**\ (\ name\: :ref:`String`, prefix\: :ref:`String` = ""\ ) :ref:`🔗` Define a new subgroup for the following exported properties. This helps to organize properties in the Inspector dock. Subgroups work exactly like groups, except they need a parent group to exist. See :ref:`@export_group`. @@ -621,9 +715,9 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` icon_path **)** +**@icon**\ (\ icon_path\: :ref:`String`\ ) :ref:`🔗` -Add a custom icon to the current script. The script must be registered as a global class using the ``class_name`` keyword for this to have a visible effect. The icon specified at ``icon_path`` is displayed in the Scene dock for every node of that class, as well as in various editor dialogs. +Add a custom icon to the current script. The icon specified at ``icon_path`` is displayed in the Scene dock for every node of that class, as well as in various editor dialogs. :: @@ -631,9 +725,9 @@ Add a custom icon to the current script. The script must be registered as a glob \ **Note:** Only the script can have a custom icon. Inner classes are not supported. -\ **Note:** As annotations describe their subject, the ``@icon`` annotation must be placed before the class definition and inheritance. +\ **Note:** As annotations describe their subject, the :ref:`@icon` annotation must be placed before the class definition and inheritance. -\ **Note:** Unlike other annotations, the argument of the ``@icon`` annotation must be a string literal (constant expressions are not supported). +\ **Note:** Unlike other annotations, the argument of the :ref:`@icon` annotation must be a string literal (constant expressions are not supported). .. rst-class:: classref-item-separator @@ -643,9 +737,9 @@ Add a custom icon to the current script. The script must be registered as a glob .. rst-class:: classref-annotation -**@onready** **(** **)** +**@onready**\ (\ ) :ref:`🔗` -Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. +Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. :: @@ -659,13 +753,13 @@ Mark the following property as assigned when the :ref:`Node` is read .. rst-class:: classref-annotation -**@rpc** **(** :ref:`String` mode="authority", :ref:`String` sync="call_remote", :ref:`String` transfer_mode="unreliable", :ref:`int` transfer_channel=0 **)** +**@rpc**\ (\ mode\: :ref:`String` = "authority", sync\: :ref:`String` = "call_remote", transfer_mode\: :ref:`String` = "unreliable", transfer_channel\: :ref:`int` = 0\ ) :ref:`🔗` Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. -If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting `call_local` to `true`. +If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting ``call_local`` to ``true``. The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_mode`. @@ -692,10 +786,14 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value .. rst-class:: classref-annotation -**@static_unload** **(** **)** +**@static_unload**\ (\ ) :ref:`🔗` Make a script with static variables to not persist after all references are lost. If the script is loaded again the static variables will revert to their default values. +\ **Note:** As annotations describe their subject, the :ref:`@static_unload` annotation must be placed before the class definition and inheritance. + +\ **Warning:** Currently, due to a bug, scripts are never freed, even if :ref:`@static_unload` annotation is used. + .. rst-class:: classref-item-separator ---- @@ -704,7 +802,7 @@ Make a script with static variables to not persist after all references are lost .. rst-class:: classref-annotation -**@tool** **(** **)** +**@tool**\ (\ ) :ref:`🔗` Mark the current script as a tool script, allowing it to be loaded and executed by the editor. See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_editor>`. @@ -713,7 +811,7 @@ Mark the current script as a tool script, allowing it to be loaded and executed @tool extends Node -\ **Note:** As annotations describe their subject, the ``@tool`` annotation must be placed before the class definition and inheritance. +\ **Note:** As annotations describe their subject, the :ref:`@tool` annotation must be placed before the class definition and inheritance. .. rst-class:: classref-item-separator @@ -723,7 +821,7 @@ Mark the current script as a tool script, allowing it to be loaded and executed .. rst-class:: classref-annotation -**@warning_ignore** **(** :ref:`String` warning, ... **)** |vararg| +**@warning_ignore**\ (\ warning\: :ref:`String`, ...\ ) |vararg| :ref:`🔗` Mark the following statement to ignore the specified ``warning``. See :doc:`GDScript warning system <../tutorials/scripting/gdscript/warning_system>`. @@ -748,7 +846,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Color` **Color8** **(** :ref:`int` r8, :ref:`int` g8, :ref:`int` b8, :ref:`int` a8=255 **)** +:ref:`Color` **Color8**\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) :ref:`🔗` Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. @@ -768,7 +866,7 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` .. rst-class:: classref-method -void **assert** **(** :ref:`bool` condition, :ref:`String` message="" **)** +|void| **assert**\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) :ref:`🔗` Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error` for reporting errors to project developers or add-on users. @@ -785,6 +883,8 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile assert(speed >= 0 and speed < 20) # You can also combine the two conditional statements in one check. assert(speed < 20, "the speed limit is 20") # Show a message. +\ **Note:** :ref:`assert` is a keyword, not a function. So you cannot access it as a :ref:`Callable` or use it inside expressions. + .. rst-class:: classref-item-separator ---- @@ -793,7 +893,7 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile .. rst-class:: classref-method -:ref:`String` **char** **(** :ref:`int` char **)** +:ref:`String` **char**\ (\ char\: :ref:`int`\ ) :ref:`🔗` Returns a single character (as a :ref:`String`) of the given Unicode code point (which is compatible with ASCII code). @@ -811,7 +911,9 @@ Returns a single character (as a :ref:`String`) of the given Unico .. rst-class:: classref-method -:ref:`Variant` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** +:ref:`Variant` **convert**\ (\ what\: :ref:`Variant`, type\: :ref:`int`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`@GlobalScope.type_convert` instead. Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type` values. @@ -832,7 +934,7 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r .. rst-class:: classref-method -:ref:`Object` **dict_to_inst** **(** :ref:`Dictionary` dictionary **)** +:ref:`Object` **dict_to_inst**\ (\ dictionary\: :ref:`Dictionary`\ ) :ref:`🔗` Converts a ``dictionary`` (created with :ref:`inst_to_dict`) back to an Object instance. Can be useful for deserializing. @@ -844,7 +946,7 @@ Converts a ``dictionary`` (created with :ref:`inst_to_dict` **get_stack** **(** **)** +:ref:`Array` **get_stack**\ (\ ) :ref:`🔗` Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack`. @@ -861,7 +963,7 @@ Returns an array of dictionaries representing the current call stack. See also : Starting from ``_ready()``, ``bar()`` would print: -:: +.. code:: text [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] @@ -877,7 +979,7 @@ Starting from ``_ready()``, ``bar()`` would print: .. rst-class:: classref-method -:ref:`Dictionary` **inst_to_dict** **(** :ref:`Object` instance **)** +:ref:`Dictionary` **inst_to_dict**\ (\ instance\: :ref:`Object`\ ) :ref:`🔗` Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing. @@ -893,7 +995,7 @@ Returns the passed ``instance`` converted to a Dictionary. Can be useful for ser Prints out: -:: +.. code:: text [@subpath, @path, foo] [, res://test.gd, bar] @@ -906,7 +1008,7 @@ Prints out: .. rst-class:: classref-method -:ref:`bool` **is_instance_of** **(** :ref:`Variant` value, :ref:`Variant` type **)** +:ref:`bool` **is_instance_of**\ (\ value\: :ref:`Variant`, type\: :ref:`Variant`\ ) :ref:`🔗` Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value must be one of the following: @@ -916,7 +1018,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus - A :ref:`Script` (you can use any class, including inner one). -Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays) and is more performant. Use the operator instead of this method if you do not need dynamic type checking. +Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking. Examples: @@ -939,9 +1041,9 @@ See also :ref:`@GlobalScope.typeof`, :ref:`typ .. rst-class:: classref-method -:ref:`int` **len** **(** :ref:`Variant` var **)** +:ref:`int` **len**\ (\ var\: :ref:`Variant`\ ) :ref:`🔗` -Returns the length of the given Variant ``var``. The length can be the character count of a :ref:`String`, the element count of any array type or the size of a :ref:`Dictionary`. For every other Variant type, a run-time error is generated and execution is stopped. +Returns the length of the given Variant ``var``. The length can be the character count of a :ref:`String` or :ref:`StringName`, the element count of any array type, or the size of a :ref:`Dictionary`. For every other Variant type, a run-time error is generated and execution is stopped. :: @@ -959,9 +1061,9 @@ Returns the length of the given Variant ``var``. The length can be the character .. rst-class:: classref-method -:ref:`Resource` **load** **(** :ref:`String` path **)** +:ref:`Resource` **load**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. +Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. This method is equivalent of using :ref:`ResourceLoader.load` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. @@ -970,7 +1072,7 @@ Returns a :ref:`Resource` from the filesystem located at the abs # Load a scene called "main" located in the root of the project directory and cache it in a variable. var main = load("res://main.tscn") # main will contain a PackedScene resource. -\ **Important:** The path must be absolute. A relative path will always return ``null``. +\ **Important:** Relative paths are *not* relative to the script calling this method, instead it is prefixed with ``"res://"``. Loading from relative paths might not work as expected. This function is a simplified version of :ref:`ResourceLoader.load`, which can be used for more advanced scenarios. @@ -986,7 +1088,7 @@ This function is a simplified version of :ref:`ResourceLoader.load` **preload** **(** :ref:`String` path **)** +:ref:`Resource` **preload**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Returns a :ref:`Resource` from the filesystem located at ``path``. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires ``path`` to be a constant :ref:`String`. If you want to load a resource from a dynamic/variable path, use :ref:`load`. @@ -997,6 +1099,8 @@ Returns a :ref:`Resource` from the filesystem located at ``path` # Create instance of a scene. var diamond = preload("res://diamond.tscn").instantiate() +\ **Note:** :ref:`preload` is a keyword, not a function. So you cannot access it as a :ref:`Callable`. + .. rst-class:: classref-item-separator ---- @@ -1005,13 +1109,13 @@ Returns a :ref:`Resource` from the filesystem located at ``path` .. rst-class:: classref-method -void **print_debug** **(** ... **)** |vararg| +|void| **print_debug**\ (\ ...\ ) |vararg| :ref:`🔗` Like :ref:`@GlobalScope.print`, but includes the current stack frame when running with the debugger turned on. The output in the console may look like the following: -:: +.. code:: text Test print At: res://test.gd:15:_process() @@ -1026,13 +1130,13 @@ The output in the console may look like the following: .. rst-class:: classref-method -void **print_stack** **(** **)** +|void| **print_stack**\ (\ ) :ref:`🔗` Prints a stack trace at the current code location. See also :ref:`get_stack`. The output in the console may look like the following: -:: +.. code:: text Frame 0 - res://test.gd:16 in function '_process' @@ -1048,7 +1152,7 @@ The output in the console may look like the following: .. rst-class:: classref-method -:ref:`Array` **range** **(** ... **)** |vararg| +:ref:`Array` **range**\ (\ ...\ ) |vararg| :ref:`🔗` Returns an array with the given range. :ref:`range` can be called in three ways: @@ -1081,7 +1185,7 @@ To iterate over an :ref:`Array` backwards, use: Output: -:: +.. code:: text 9 6 @@ -1096,7 +1200,7 @@ To iterate over :ref:`float`, convert them in the loop. Output: -:: +.. code:: text 0.3 0.2 @@ -1110,7 +1214,7 @@ Output: .. rst-class:: classref-method -:ref:`bool` **type_exists** **(** :ref:`StringName` type **)** +:ref:`bool` **type_exists**\ (\ type\: :ref:`StringName`\ ) :ref:`🔗` Returns ``true`` if the given :ref:`Object`-derived class exists in :ref:`ClassDB`. Note that :ref:`Variant` data types are not registered in :ref:`ClassDB`. @@ -1126,3 +1230,4 @@ Returns ``true`` if the given :ref:`Object`-derived class exists i .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 98833dc5d12..a1308bea25e 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -51,6 +51,8 @@ Properties +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`DisplayServer` | :ref:`DisplayServer` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`EditorInterface` | :ref:`EditorInterface` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Engine` | :ref:`Engine` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`EngineDebugger` | :ref:`EngineDebugger` | @@ -61,8 +63,6 @@ Properties +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Geometry3D` | :ref:`Geometry3D` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`GodotSharp` | :ref:`GodotSharp` | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`IP` | :ref:`IP` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Input` | :ref:`Input` | @@ -75,6 +75,8 @@ Properties +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`Marshalls` | :ref:`Marshalls` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`NativeMenu` | :ref:`NativeMenu` | + +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`NavigationMeshGenerator` | :ref:`NavigationMeshGenerator` | +---------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`NavigationServer2D` | :ref:`NavigationServer2D` | @@ -124,221 +126,235 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`abs` **(** :ref:`Variant` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`absf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`absi` **(** :ref:`int` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`acos` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`asin` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`atan` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`atan2` **(** :ref:`float` y, :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_derivative` **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_interpolate` **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`bytes_to_var` **(** :ref:`PackedByteArray` bytes **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`bytes_to_var_with_objects` **(** :ref:`PackedByteArray` bytes **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`ceil` **(** :ref:`Variant` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`ceilf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`ceili` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`clamp` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`clampf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`clampi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cos` **(** :ref:`float` angle_rad **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cosh` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_angle` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_angle_in_time` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`cubic_interpolate_in_time` **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`db_to_linear` **(** :ref:`float` db **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`deg_to_rad` **(** :ref:`float` deg **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`ease` **(** :ref:`float` x, :ref:`float` curve **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`error_string` **(** :ref:`int` error **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`exp` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`floor` **(** :ref:`Variant` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`floorf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`floori` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`fmod` **(** :ref:`float` x, :ref:`float` y **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`fposmod` **(** :ref:`float` x, :ref:`float` y **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`hash` **(** :ref:`Variant` variable **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`instance_from_id` **(** :ref:`int` instance_id **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`inverse_lerp` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`float` a, :ref:`float` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_inf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_instance_id_valid` **(** :ref:`int` id **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_instance_valid` **(** :ref:`Variant` instance **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_nan` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_same` **(** :ref:`Variant` a, :ref:`Variant` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_zero_approx` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`lerp` **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`lerp_angle` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`lerpf` **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`linear_to_db` **(** :ref:`float` lin **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`log` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`max` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`maxf` **(** :ref:`float` a, :ref:`float` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`maxi` **(** :ref:`int` a, :ref:`int` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`min` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`minf` **(** :ref:`float` a, :ref:`float` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`mini` **(** :ref:`int` a, :ref:`int` b **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`move_toward` **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`nearest_po2` **(** :ref:`int` value **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`pingpong` **(** :ref:`float` value, :ref:`float` length **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`posmod` **(** :ref:`int` x, :ref:`int` y **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`pow` **(** :ref:`float` base, :ref:`float` exp **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_rich` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_verbose` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`printerr` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`printraw` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`prints` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`printt` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_error` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_warning` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`rad_to_deg` **(** :ref:`float` rad **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`rand_from_seed` **(** :ref:`int` seed **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randf` **(** **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randf_range` **(** :ref:`float` from, :ref:`float` to **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`randfn` **(** :ref:`float` mean, :ref:`float` deviation **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`randi` **(** **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`randi_range` **(** :ref:`int` from, :ref:`int` to **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`randomize` **(** **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`remap` **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rid_allocate_id` **(** **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`rid_from_int64` **(** :ref:`int` base **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`round` **(** :ref:`Variant` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`roundf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`roundi` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seed` **(** :ref:`int` base **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`sign` **(** :ref:`Variant` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`signf` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`signi` **(** :ref:`int` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sin` **(** :ref:`float` angle_rad **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sinh` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`smoothstep` **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`snapped` **(** :ref:`Variant` x, :ref:`Variant` step **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`snappedf` **(** :ref:`float` x, :ref:`float` step **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`snappedi` **(** :ref:`float` x, :ref:`int` step **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sqrt` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`step_decimals` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`str` **(** ... **)** |vararg| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`str_to_var` **(** :ref:`String` string **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tan` **(** :ref:`float` angle_rad **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tanh` **(** :ref:`float` x **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`typeof` **(** :ref:`Variant` variable **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`var_to_bytes` **(** :ref:`Variant` variable **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`var_to_bytes_with_objects` **(** :ref:`Variant` variable **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`var_to_str` **(** :ref:`Variant` variable **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`weakref` **(** :ref:`Variant` obj **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`wrap` **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`wrapf` **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`wrapi` **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`abs`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`absf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`absi`\ (\ x\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`acos`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`acosh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_difference`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`asin`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`asinh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atan`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atan2`\ (\ y\: :ref:`float`, x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`atanh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_derivative`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_interpolate`\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`bytes_to_var`\ (\ bytes\: :ref:`PackedByteArray`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`bytes_to_var_with_objects`\ (\ bytes\: :ref:`PackedByteArray`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`ceil`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`ceilf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`ceili`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`clamp`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`clampf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`clampi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cos`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cosh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_angle_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`cubic_interpolate_in_time`\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`db_to_linear`\ (\ db\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`deg_to_rad`\ (\ deg\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`ease`\ (\ x\: :ref:`float`, curve\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`error_string`\ (\ error\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`exp`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`floor`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`floorf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`floori`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`fmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`fposmod`\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`instance_from_id`\ (\ instance_id\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`inverse_lerp`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_inf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_instance_id_valid`\ (\ id\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_instance_valid`\ (\ instance\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_nan`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same`\ (\ a\: :ref:`Variant`, b\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_zero_approx`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`lerp`\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lerp_angle`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lerpf`\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`linear_to_db`\ (\ lin\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`log`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`max`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`maxf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`maxi`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`min`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`minf`\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mini`\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`move_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`nearest_po2`\ (\ value\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pingpong`\ (\ value\: :ref:`float`, length\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`posmod`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`pow`\ (\ base\: :ref:`float`, exp\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_rich`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_verbose`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printerr`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printraw`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`prints`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`printt`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_error`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_warning`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rad_to_deg`\ (\ rad\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`rand_from_seed`\ (\ seed\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf`\ (\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randf_range`\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randfn`\ (\ mean\: :ref:`float`, deviation\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi`\ (\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`randi_range`\ (\ from\: :ref:`int`, to\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`randomize`\ (\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`remap`\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rid_allocate_id`\ (\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`rid_from_int64`\ (\ base\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotate_toward`\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`round`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`roundf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`roundi`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seed`\ (\ base\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`sign`\ (\ x\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`signf`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`signi`\ (\ x\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sin`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sinh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`smoothstep`\ (\ from\: :ref:`float`, to\: :ref:`float`, x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`snapped`\ (\ x\: :ref:`Variant`, step\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`snappedf`\ (\ x\: :ref:`float`, step\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`snappedi`\ (\ x\: :ref:`float`, step\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sqrt`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`step_decimals`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`str`\ (\ ...\ ) |vararg| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`str_to_var`\ (\ string\: :ref:`String`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tan`\ (\ angle_rad\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tanh`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`type_convert`\ (\ variant\: :ref:`Variant`, type\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`type_string`\ (\ type\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`typeof`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`var_to_bytes`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`var_to_bytes_with_objects`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`var_to_str`\ (\ variable\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`weakref`\ (\ obj\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`wrap`\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`wrapf`\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`wrapi`\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -353,7 +369,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Side**: +enum **Side**: :ref:`🔗` .. _class_@GlobalScope_constant_SIDE_LEFT: @@ -395,7 +411,7 @@ Bottom side, usually used for :ref:`Control` or :ref:`StyleBox` .. _class_@GlobalScope_constant_CORNER_TOP_LEFT: @@ -437,7 +453,7 @@ Bottom-left corner. .. rst-class:: classref-enumeration -enum **Orientation**: +enum **Orientation**: :ref:`🔗` .. _class_@GlobalScope_constant_VERTICAL: @@ -463,7 +479,7 @@ General horizontal alignment, usually used for :ref:`Separator` .. rst-class:: classref-enumeration -enum **ClockDirection**: +enum **ClockDirection**: :ref:`🔗` .. _class_@GlobalScope_constant_CLOCKWISE: @@ -489,7 +505,7 @@ Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90` .. _class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_LEFT: @@ -531,7 +547,7 @@ Expand row to fit width, usually for text-derived classes. .. rst-class:: classref-enumeration -enum **VerticalAlignment**: +enum **VerticalAlignment**: :ref:`🔗` .. _class_@GlobalScope_constant_VERTICAL_ALIGNMENT_TOP: @@ -573,7 +589,7 @@ Expand rows to fit height, usually for text-derived classes. .. rst-class:: classref-enumeration -enum **InlineAlignment**: +enum **InlineAlignment**: :ref:`🔗` .. _class_@GlobalScope_constant_INLINE_ALIGNMENT_TOP_TO: @@ -687,7 +703,7 @@ A bit mask for ``INLINE_ALIGNMENT_TO_*`` alignment constants. .. rst-class:: classref-enumeration -enum **EulerOrder**: +enum **EulerOrder**: :ref:`🔗` .. _class_@GlobalScope_constant_EULER_ORDER_XYZ: @@ -745,7 +761,7 @@ Specifies that Euler angles should be in ZYX order. When composing, the order is .. rst-class:: classref-enumeration -enum **Key**: +enum **Key**: :ref:`🔗` .. _class_@GlobalScope_constant_KEY_NONE: @@ -1683,6 +1699,38 @@ Launch Shortcut E key. Launch Shortcut F key. +.. _class_@GlobalScope_constant_KEY_GLOBE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_GLOBE** = ``4194416`` + +"Globe" key on Mac / iPad keyboard. + +.. _class_@GlobalScope_constant_KEY_KEYBOARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_KEYBOARD** = ``4194417`` + +"On-screen keyboard" key on iPad keyboard. + +.. _class_@GlobalScope_constant_KEY_JIS_EISU: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_JIS_EISU** = ``4194418`` + +英数 key on Mac keyboard. + +.. _class_@GlobalScope_constant_KEY_JIS_KANA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Key` **KEY_JIS_KANA** = ``4194419`` + +かな key on Mac keyboard. + .. _class_@GlobalScope_constant_KEY_UNKNOWN: .. rst-class:: classref-enumeration-constant @@ -2259,38 +2307,6 @@ Z key. § key. -.. _class_@GlobalScope_constant_KEY_GLOBE: - -.. rst-class:: classref-enumeration-constant - -:ref:`Key` **KEY_GLOBE** = ``4194416`` - -"Globe" key on Mac / iPad keyboard. - -.. _class_@GlobalScope_constant_KEY_KEYBOARD: - -.. rst-class:: classref-enumeration-constant - -:ref:`Key` **KEY_KEYBOARD** = ``4194417`` - -"On-screen keyboard" key iPad keyboard. - -.. _class_@GlobalScope_constant_KEY_JIS_EISU: - -.. rst-class:: classref-enumeration-constant - -:ref:`Key` **KEY_JIS_EISU** = ``4194418`` - -英数 key on Mac keyboard. - -.. _class_@GlobalScope_constant_KEY_JIS_KANA: - -.. rst-class:: classref-enumeration-constant - -:ref:`Key` **KEY_JIS_KANA** = ``4194419`` - -かな key on Mac keyboard. - .. rst-class:: classref-item-separator ---- @@ -2299,7 +2315,7 @@ Z key. .. rst-class:: classref-enumeration -flags **KeyModifierMask**: +flags **KeyModifierMask**: :ref:`🔗` .. _class_@GlobalScope_constant_KEY_CODE_MASK: @@ -2377,11 +2393,47 @@ Group Switch key mask. ---- +.. _enum_@GlobalScope_KeyLocation: + +.. rst-class:: classref-enumeration + +enum **KeyLocation**: :ref:`🔗` + +.. _class_@GlobalScope_constant_KEY_LOCATION_UNSPECIFIED: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyLocation` **KEY_LOCATION_UNSPECIFIED** = ``0`` + +Used for keys which only appear once, or when a comparison doesn't need to differentiate the ``LEFT`` and ``RIGHT`` versions. + +For example, when using :ref:`InputEvent.is_match`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED` will match any :ref:`KeyLocation` on the passed event. + +.. _class_@GlobalScope_constant_KEY_LOCATION_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyLocation` **KEY_LOCATION_LEFT** = ``1`` + +A key which is to the left of its twin. + +.. _class_@GlobalScope_constant_KEY_LOCATION_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`KeyLocation` **KEY_LOCATION_RIGHT** = ``2`` + +A key which is to the right of its twin. + +.. rst-class:: classref-item-separator + +---- + .. _enum_@GlobalScope_MouseButton: .. rst-class:: classref-enumeration -enum **MouseButton**: +enum **MouseButton**: :ref:`🔗` .. _class_@GlobalScope_constant_MOUSE_BUTTON_NONE: @@ -2471,7 +2523,7 @@ Extra mouse button 2. This is sometimes present, usually to the sides of the mou .. rst-class:: classref-enumeration -flags **MouseButtonMask**: +flags **MouseButtonMask**: :ref:`🔗` .. _class_@GlobalScope_constant_MOUSE_BUTTON_MASK_LEFT: @@ -2521,7 +2573,7 @@ Extra mouse button 2 mask. .. rst-class:: classref-enumeration -enum **JoyButton**: +enum **JoyButton**: :ref:`🔗` .. _class_@GlobalScope_constant_JOY_BUTTON_INVALID: @@ -2585,7 +2637,7 @@ Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button. :ref:`JoyButton` **JOY_BUTTON_START** = ``6`` -Game controller SDL start button. Corresponds to the Nintendo + button. +Game controller SDL start button. Corresponds to the Sony Options, Xbox Menu, Nintendo + button. .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK: @@ -2729,7 +2781,7 @@ The maximum number of game controller buttons supported by the engine. The actua .. rst-class:: classref-enumeration -enum **JoyAxis**: +enum **JoyAxis**: :ref:`🔗` .. _class_@GlobalScope_constant_JOY_AXIS_INVALID: @@ -2811,7 +2863,7 @@ The maximum number of game controller axes: OpenVR supports up to 5 Joysticks ma .. rst-class:: classref-enumeration -enum **MIDIMessage**: +enum **MIDIMessage**: :ref:`🔗` .. _class_@GlobalScope_constant_MIDI_MESSAGE_NONE: @@ -2819,7 +2871,7 @@ enum **MIDIMessage**: :ref:`MIDIMessage` **MIDI_MESSAGE_NONE** = ``0`` -Enum value which doesn't correspond to any MIDI message. This is used to initialize :ref:`MIDIMessage` properties with a generic state. +Does not correspond to any MIDI message. This is the default value of :ref:`InputEventMIDI.message`. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF: @@ -2827,7 +2879,9 @@ Enum value which doesn't correspond to any MIDI message. This is used to initial :ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_OFF** = ``8`` -MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON` with zero velocity instead. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI message sent when a note is released. + +\ **Note:** Not all MIDI devices send this message; some may send :ref:`MIDI_MESSAGE_NOTE_ON` with :ref:`InputEventMIDI.velocity` set to ``0``. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: @@ -2835,7 +2889,7 @@ MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MID :ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_ON** = ``9`` -MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF`, but implementations vary. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI message sent when a note is pressed. .. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH: @@ -2843,7 +2897,7 @@ MIDI note ON message. Some MIDI devices send this event with velocity zero inste :ref:`MIDIMessage` **MIDI_MESSAGE_AFTERTOUCH** = ``10`` -MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out". +MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE: @@ -2851,7 +2905,7 @@ MIDI aftertouch message. This message is most often sent by pressing down on the :ref:`MIDIMessage` **MIDI_MESSAGE_CONTROL_CHANGE** = ``11`` -MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers. +MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the `General MIDI specification `__ for a small list. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PROGRAM_CHANGE: @@ -2859,7 +2913,7 @@ MIDI control change message. This message is sent when a controller value change :ref:`MIDIMessage` **MIDI_MESSAGE_PROGRAM_CHANGE** = ``12`` -MIDI program change message. This message sent when the program patch number changes. +MIDI message sent when the MIDI device changes its current instrument (also called *program* or *preset*). .. _class_@GlobalScope_constant_MIDI_MESSAGE_CHANNEL_PRESSURE: @@ -2867,7 +2921,7 @@ MIDI program change message. This message sent when the program patch number cha :ref:`MIDIMessage` **MIDI_MESSAGE_CHANNEL_PRESSURE** = ``13`` -MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys. +MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of :ref:`MIDI_MESSAGE_AFTERTOUCH`. .. _class_@GlobalScope_constant_MIDI_MESSAGE_PITCH_BEND: @@ -2875,7 +2929,7 @@ MIDI channel pressure message. This message is most often sent by pressing down :ref:`MIDIMessage` **MIDI_MESSAGE_PITCH_BEND** = ``14`` -MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically). +MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_EXCLUSIVE: @@ -2883,7 +2937,9 @@ MIDI pitch bend message. This message is sent to indicate a change in the pitch :ref:`MIDIMessage` **MIDI_MESSAGE_SYSTEM_EXCLUSIVE** = ``240`` -MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot. +MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it. + +\ **Note:** Getting this message's data from :ref:`InputEventMIDI` is not implemented. .. _class_@GlobalScope_constant_MIDI_MESSAGE_QUARTER_FRAME: @@ -2891,7 +2947,9 @@ MIDI system exclusive message. This has behavior exclusive to the device you're :ref:`MIDIMessage` **MIDI_MESSAGE_QUARTER_FRAME** = ``241`` -MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot. +MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to :ref:`MIDI_MESSAGE_TIMING_CLOCK`. + +\ **Note:** Getting this message's data from :ref:`InputEventMIDI` is not implemented. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_POSITION_POINTER: @@ -2899,7 +2957,9 @@ MIDI quarter frame message. Contains timing information that is used to synchron :ref:`MIDIMessage` **MIDI_MESSAGE_SONG_POSITION_POINTER** = ``242`` -MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot. +MIDI message sent to jump onto a new position in the current sequence or song. + +\ **Note:** Getting this message's data from :ref:`InputEventMIDI` is not implemented. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SONG_SELECT: @@ -2907,7 +2967,9 @@ MIDI song position pointer message. Gives the number of 16th notes since the sta :ref:`MIDIMessage` **MIDI_MESSAGE_SONG_SELECT** = ``243`` -MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot. +MIDI message sent to select a sequence or song to play. + +\ **Note:** Getting this message's data from :ref:`InputEventMIDI` is not implemented. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TUNE_REQUEST: @@ -2915,7 +2977,7 @@ MIDI song select message. Specifies which sequence or song is to be played. Gett :ref:`MIDIMessage` **MIDI_MESSAGE_TUNE_REQUEST** = ``246`` -MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators. +MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message. .. _class_@GlobalScope_constant_MIDI_MESSAGE_TIMING_CLOCK: @@ -2923,7 +2985,7 @@ MIDI tune request message. Upon receiving a tune request, all analog synthesizer :ref:`MIDIMessage` **MIDI_MESSAGE_TIMING_CLOCK** = ``248`` -MIDI timing clock message. Sent 24 times per quarter note when synchronization is required. +MIDI message sent 24 times after :ref:`MIDI_MESSAGE_QUARTER_FRAME`, to keep connected MIDI devices synchronized. .. _class_@GlobalScope_constant_MIDI_MESSAGE_START: @@ -2931,7 +2993,7 @@ MIDI timing clock message. Sent 24 times per quarter note when synchronization i :ref:`MIDIMessage` **MIDI_MESSAGE_START** = ``250`` -MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks. +MIDI message sent to start the current sequence or song from the beginning. .. _class_@GlobalScope_constant_MIDI_MESSAGE_CONTINUE: @@ -2939,7 +3001,7 @@ MIDI start message. Start the current sequence playing. This message will be fol :ref:`MIDIMessage` **MIDI_MESSAGE_CONTINUE** = ``251`` -MIDI continue message. Continue at the point the sequence was stopped. +MIDI message sent to resume from the point the current sequence or song was paused. .. _class_@GlobalScope_constant_MIDI_MESSAGE_STOP: @@ -2947,7 +3009,7 @@ MIDI continue message. Continue at the point the sequence was stopped. :ref:`MIDIMessage` **MIDI_MESSAGE_STOP** = ``252`` -MIDI stop message. Stop the current sequence. +MIDI message sent to pause the current sequence or song. .. _class_@GlobalScope_constant_MIDI_MESSAGE_ACTIVE_SENSING: @@ -2955,7 +3017,7 @@ MIDI stop message. Stop the current sequence. :ref:`MIDIMessage` **MIDI_MESSAGE_ACTIVE_SENSING** = ``254`` -MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive. +MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message. .. _class_@GlobalScope_constant_MIDI_MESSAGE_SYSTEM_RESET: @@ -2963,7 +3025,7 @@ MIDI active sensing message. This message is intended to be sent repeatedly to t :ref:`MIDIMessage` **MIDI_MESSAGE_SYSTEM_RESET** = ``255`` -MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself. +MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on. .. rst-class:: classref-item-separator @@ -2973,7 +3035,7 @@ MIDI system reset message. Reset all receivers in the system to power-up status. .. rst-class:: classref-enumeration -enum **Error**: +enum **Error**: :ref:`🔗` .. _class_@GlobalScope_constant_OK: @@ -3393,7 +3455,7 @@ Printer on fire error (This is an easter egg, no built-in methods return this er .. rst-class:: classref-enumeration -enum **PropertyHint**: +enum **PropertyHint**: :ref:`🔗` .. _class_@GlobalScope_constant_PROPERTY_HINT_NONE: @@ -3413,7 +3475,7 @@ Hints that an :ref:`int` or :ref:`float` property should \ **Example:** ``"-360,360,1,or_greater,or_less"``. -Additionally, other keywords can be included: ``"exp"`` for exponential range editing, ``"radians"`` for editing radian angles in degrees, ``"degrees"`` to hint at an angle and ``"hide_slider"`` to hide the slider. +Additionally, other keywords can be included: ``"exp"`` for exponential range editing, ``"radians_as_degrees"`` for editing radian angles in degrees (the range values are also in degrees), ``"degrees"`` to hint at an angle and ``"hide_slider"`` to hide the slider. .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM: @@ -3599,7 +3661,7 @@ Hints that a :ref:`Color` property should be edited without affecti :ref:`PropertyHint` **PROPERTY_HINT_OBJECT_ID** = ``22`` - +Hints that the property's value is an object encoded as object ID, with its type specified in the hint string. Used by the debugger. .. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING: @@ -3682,6 +3744,8 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24`` +**Deprecated:** This hint is not used by the engine. + .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG: @@ -3690,7 +3754,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``25`` - +Hints that an object is too big to be sent via the debugger. .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES: @@ -3698,7 +3762,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``26`` - +Hints that the hint string specifies valid node types for property of type :ref:`NodePath`. .. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE: @@ -3706,7 +3770,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_SAVE_FILE** = ``27`` - +Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the project's directory. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. See also :ref:`FileDialog.filters`. .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE: @@ -3714,7 +3778,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``28`` - +Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path for the file to be saved at. The dialog has access to the entire filesystem. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. See also :ref:`FileDialog.filters`. .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID: @@ -3722,6 +3786,8 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_INT_IS_OBJECTID** = ``29`` +**Deprecated:** This hint is not used by the engine. + .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER: @@ -3730,7 +3796,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_INT_IS_POINTER** = ``30`` - +Hints that an :ref:`int` property is a pointer. Used by GDExtension. .. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE: @@ -3738,7 +3804,7 @@ Examples: :ref:`PropertyHint` **PROPERTY_HINT_ARRAY_TYPE** = ``31`` - +Hints that a property is an :ref:`Array` with the stored type specified in the hint string. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: @@ -3762,7 +3828,7 @@ Hints that a dictionary property is string translation map. Dictionary keys are :ref:`PropertyHint` **PROPERTY_HINT_NODE_TYPE** = ``34`` - +Hints that a property is an instance of a :ref:`Node`-derived type, optionally specified via the hint string (e.g. ``"Node2D"``). Editing it will show a dialog for picking a node from the scene. .. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT: @@ -3796,7 +3862,7 @@ Represents the size of the :ref:`PropertyHint` e .. rst-class:: classref-enumeration -flags **PropertyUsageFlags**: +flags **PropertyUsageFlags**: :ref:`🔗` .. _class_@GlobalScope_constant_PROPERTY_USAGE_NONE: @@ -3876,7 +3942,7 @@ Used to group properties together in the editor in a subgroup (under a group). S :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512`` - +The property is a bitfield, i.e. it contains multiple flags represented as bits. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE: @@ -3908,7 +3974,7 @@ The property is a script variable which should be serialized and saved in the sc :ref:`PropertyUsageFlags` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192`` - +The property value of type :ref:`Object` will be stored even if its value is ``null``. .. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED: @@ -3916,7 +3982,7 @@ The property is a script variable which should be serialized and saved in the sc :ref:`PropertyUsageFlags` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384`` - +If this property is modified, all inspector fields will be refreshed. .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE: @@ -3924,6 +3990,8 @@ The property is a script variable which should be serialized and saved in the sc :ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768`` +**Deprecated:** This flag is not used by the engine. + .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM: @@ -3932,7 +4000,7 @@ The property is a script variable which should be serialized and saved in the sc :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536`` - +The property is an enum, i.e. it only takes named integer constants from its associated enumeration. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: @@ -3940,7 +4008,7 @@ The property is a script variable which should be serialized and saved in the sc :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072`` - +If property has ``nil`` as default value, its type will be :ref:`Variant`. .. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY: @@ -3980,7 +4048,7 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``4194304`` - +The :ref:`NodePath` property will always be relative to the scene's root. Mostly useful for local resources. .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT: @@ -3988,7 +4056,7 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``8388608`` - +Use when a resource is created on the fly, i.e. the getter will always return a different instance. :ref:`ResourceSaver` needs this information to properly save such resources. .. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS: @@ -3996,7 +4064,7 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``16777216`` - +Inserting an animation key frame of this property will automatically increment the value, allowing to easily keyframe multiple values in a row. .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE: @@ -4004,6 +4072,8 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``33554432`` +**Deprecated:** This flag is not used by the engine. + .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT: @@ -4012,7 +4082,7 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``67108864`` - +When this property is a :ref:`Resource` and base object is a :ref:`Node`, a resource instance will be automatically created whenever the node is created in the editor. .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING: @@ -4020,7 +4090,7 @@ The property is only shown in the editor if modern renderers are supported (the :ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``134217728`` - +The property is considered a basic setting and will appear even when advanced mode is disabled. Used for project settings. .. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY: @@ -4062,7 +4132,7 @@ Default usage but without showing the property in the editor (storage). .. rst-class:: classref-enumeration -flags **MethodFlags**: +flags **MethodFlags**: :ref:`🔗` .. _class_@GlobalScope_constant_METHOD_FLAG_NORMAL: @@ -4118,7 +4188,7 @@ Flag for a static method. :ref:`MethodFlags` **METHOD_FLAG_OBJECT_CORE** = ``64`` -Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. +Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -4136,7 +4206,7 @@ Default method flags (normal). .. rst-class:: classref-enumeration -enum **Variant.Type**: +enum **Variant.Type**: :ref:`🔗` .. _class_@GlobalScope_constant_TYPE_NIL: @@ -4442,11 +4512,19 @@ Variable is of type :ref:`PackedVector3Array`. Variable is of type :ref:`PackedColorArray`. +.. _class_@GlobalScope_constant_TYPE_PACKED_VECTOR4_ARRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Variant.Type` **TYPE_PACKED_VECTOR4_ARRAY** = ``38`` + +Variable is of type :ref:`PackedVector4Array`. + .. _class_@GlobalScope_constant_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Variant.Type` **TYPE_MAX** = ``38`` +:ref:`Variant.Type` **TYPE_MAX** = ``39`` Represents the size of the :ref:`Variant.Type` enum. @@ -4458,7 +4536,7 @@ Represents the size of the :ref:`Variant.Type` e .. rst-class:: classref-enumeration -enum **Variant.Operator**: +enum **Variant.Operator**: :ref:`🔗` .. _class_@GlobalScope_constant_OP_EQUAL: @@ -4681,7 +4759,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AudioServer` **AudioServer** +:ref:`AudioServer` **AudioServer** :ref:`🔗` The :ref:`AudioServer` singleton. @@ -4693,7 +4771,7 @@ The :ref:`AudioServer` singleton. .. rst-class:: classref-property -:ref:`CameraServer` **CameraServer** +:ref:`CameraServer` **CameraServer** :ref:`🔗` The :ref:`CameraServer` singleton. @@ -4705,7 +4783,7 @@ The :ref:`CameraServer` singleton. .. rst-class:: classref-property -:ref:`ClassDB` **ClassDB** +:ref:`ClassDB` **ClassDB** :ref:`🔗` The :ref:`ClassDB` singleton. @@ -4717,7 +4795,7 @@ The :ref:`ClassDB` singleton. .. rst-class:: classref-property -:ref:`DisplayServer` **DisplayServer** +:ref:`DisplayServer` **DisplayServer** :ref:`🔗` The :ref:`DisplayServer` singleton. @@ -4725,11 +4803,25 @@ The :ref:`DisplayServer` singleton. ---- +.. _class_@GlobalScope_property_EditorInterface: + +.. rst-class:: classref-property + +:ref:`EditorInterface` **EditorInterface** :ref:`🔗` + +The :ref:`EditorInterface` singleton. + +\ **Note:** Only available in editor builds. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_property_Engine: .. rst-class:: classref-property -:ref:`Engine` **Engine** +:ref:`Engine` **Engine** :ref:`🔗` The :ref:`Engine` singleton. @@ -4741,7 +4833,7 @@ The :ref:`Engine` singleton. .. rst-class:: classref-property -:ref:`EngineDebugger` **EngineDebugger** +:ref:`EngineDebugger` **EngineDebugger** :ref:`🔗` The :ref:`EngineDebugger` singleton. @@ -4753,7 +4845,7 @@ The :ref:`EngineDebugger` singleton. .. rst-class:: classref-property -:ref:`GDExtensionManager` **GDExtensionManager** +:ref:`GDExtensionManager` **GDExtensionManager** :ref:`🔗` The :ref:`GDExtensionManager` singleton. @@ -4765,7 +4857,7 @@ The :ref:`GDExtensionManager` singleton. .. rst-class:: classref-property -:ref:`Geometry2D` **Geometry2D** +:ref:`Geometry2D` **Geometry2D** :ref:`🔗` The :ref:`Geometry2D` singleton. @@ -4777,7 +4869,7 @@ The :ref:`Geometry2D` singleton. .. rst-class:: classref-property -:ref:`Geometry3D` **Geometry3D** +:ref:`Geometry3D` **Geometry3D** :ref:`🔗` The :ref:`Geometry3D` singleton. @@ -4785,23 +4877,11 @@ The :ref:`Geometry3D` singleton. ---- -.. _class_@GlobalScope_property_GodotSharp: - -.. rst-class:: classref-property - -:ref:`GodotSharp` **GodotSharp** - -The :ref:`GodotSharp` singleton. - -.. rst-class:: classref-item-separator - ----- - .. _class_@GlobalScope_property_IP: .. rst-class:: classref-property -:ref:`IP` **IP** +:ref:`IP` **IP** :ref:`🔗` The :ref:`IP` singleton. @@ -4813,7 +4893,7 @@ The :ref:`IP` singleton. .. rst-class:: classref-property -:ref:`Input` **Input** +:ref:`Input` **Input** :ref:`🔗` The :ref:`Input` singleton. @@ -4825,7 +4905,7 @@ The :ref:`Input` singleton. .. rst-class:: classref-property -:ref:`InputMap` **InputMap** +:ref:`InputMap` **InputMap** :ref:`🔗` The :ref:`InputMap` singleton. @@ -4837,7 +4917,7 @@ The :ref:`InputMap` singleton. .. rst-class:: classref-property -:ref:`JavaClassWrapper` **JavaClassWrapper** +:ref:`JavaClassWrapper` **JavaClassWrapper** :ref:`🔗` The :ref:`JavaClassWrapper` singleton. @@ -4851,7 +4931,7 @@ The :ref:`JavaClassWrapper` singleton. .. rst-class:: classref-property -:ref:`JavaScriptBridge` **JavaScriptBridge** +:ref:`JavaScriptBridge` **JavaScriptBridge** :ref:`🔗` The :ref:`JavaScriptBridge` singleton. @@ -4865,7 +4945,7 @@ The :ref:`JavaScriptBridge` singleton. .. rst-class:: classref-property -:ref:`Marshalls` **Marshalls** +:ref:`Marshalls` **Marshalls** :ref:`🔗` The :ref:`Marshalls` singleton. @@ -4873,11 +4953,25 @@ The :ref:`Marshalls` singleton. ---- +.. _class_@GlobalScope_property_NativeMenu: + +.. rst-class:: classref-property + +:ref:`NativeMenu` **NativeMenu** :ref:`🔗` + +The :ref:`NativeMenu` singleton. + +\ **Note:** Only implemented on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_property_NavigationMeshGenerator: .. rst-class:: classref-property -:ref:`NavigationMeshGenerator` **NavigationMeshGenerator** +:ref:`NavigationMeshGenerator` **NavigationMeshGenerator** :ref:`🔗` The :ref:`NavigationMeshGenerator` singleton. @@ -4889,7 +4983,7 @@ The :ref:`NavigationMeshGenerator` singleton. .. rst-class:: classref-property -:ref:`NavigationServer2D` **NavigationServer2D** +:ref:`NavigationServer2D` **NavigationServer2D** :ref:`🔗` The :ref:`NavigationServer2D` singleton. @@ -4901,7 +4995,7 @@ The :ref:`NavigationServer2D` singleton. .. rst-class:: classref-property -:ref:`NavigationServer3D` **NavigationServer3D** +:ref:`NavigationServer3D` **NavigationServer3D** :ref:`🔗` The :ref:`NavigationServer3D` singleton. @@ -4913,7 +5007,7 @@ The :ref:`NavigationServer3D` singleton. .. rst-class:: classref-property -:ref:`OS` **OS** +:ref:`OS` **OS** :ref:`🔗` The :ref:`OS` singleton. @@ -4925,7 +5019,7 @@ The :ref:`OS` singleton. .. rst-class:: classref-property -:ref:`Performance` **Performance** +:ref:`Performance` **Performance** :ref:`🔗` The :ref:`Performance` singleton. @@ -4937,7 +5031,7 @@ The :ref:`Performance` singleton. .. rst-class:: classref-property -:ref:`PhysicsServer2D` **PhysicsServer2D** +:ref:`PhysicsServer2D` **PhysicsServer2D** :ref:`🔗` The :ref:`PhysicsServer2D` singleton. @@ -4949,7 +5043,7 @@ The :ref:`PhysicsServer2D` singleton. .. rst-class:: classref-property -:ref:`PhysicsServer2DManager` **PhysicsServer2DManager** +:ref:`PhysicsServer2DManager` **PhysicsServer2DManager** :ref:`🔗` The :ref:`PhysicsServer2DManager` singleton. @@ -4961,7 +5055,7 @@ The :ref:`PhysicsServer2DManager` singleton. .. rst-class:: classref-property -:ref:`PhysicsServer3D` **PhysicsServer3D** +:ref:`PhysicsServer3D` **PhysicsServer3D** :ref:`🔗` The :ref:`PhysicsServer3D` singleton. @@ -4973,7 +5067,7 @@ The :ref:`PhysicsServer3D` singleton. .. rst-class:: classref-property -:ref:`PhysicsServer3DManager` **PhysicsServer3DManager** +:ref:`PhysicsServer3DManager` **PhysicsServer3DManager** :ref:`🔗` The :ref:`PhysicsServer3DManager` singleton. @@ -4985,7 +5079,7 @@ The :ref:`PhysicsServer3DManager` singleton. .. rst-class:: classref-property -:ref:`ProjectSettings` **ProjectSettings** +:ref:`ProjectSettings` **ProjectSettings** :ref:`🔗` The :ref:`ProjectSettings` singleton. @@ -4997,7 +5091,7 @@ The :ref:`ProjectSettings` singleton. .. rst-class:: classref-property -:ref:`RenderingServer` **RenderingServer** +:ref:`RenderingServer` **RenderingServer** :ref:`🔗` The :ref:`RenderingServer` singleton. @@ -5009,7 +5103,7 @@ The :ref:`RenderingServer` singleton. .. rst-class:: classref-property -:ref:`ResourceLoader` **ResourceLoader** +:ref:`ResourceLoader` **ResourceLoader** :ref:`🔗` The :ref:`ResourceLoader` singleton. @@ -5021,7 +5115,7 @@ The :ref:`ResourceLoader` singleton. .. rst-class:: classref-property -:ref:`ResourceSaver` **ResourceSaver** +:ref:`ResourceSaver` **ResourceSaver** :ref:`🔗` The :ref:`ResourceSaver` singleton. @@ -5033,7 +5127,7 @@ The :ref:`ResourceSaver` singleton. .. rst-class:: classref-property -:ref:`ResourceUID` **ResourceUID** +:ref:`ResourceUID` **ResourceUID** :ref:`🔗` The :ref:`ResourceUID` singleton. @@ -5045,7 +5139,7 @@ The :ref:`ResourceUID` singleton. .. rst-class:: classref-property -:ref:`TextServerManager` **TextServerManager** +:ref:`TextServerManager` **TextServerManager** :ref:`🔗` The :ref:`TextServerManager` singleton. @@ -5057,7 +5151,7 @@ The :ref:`TextServerManager` singleton. .. rst-class:: classref-property -:ref:`ThemeDB` **ThemeDB** +:ref:`ThemeDB` **ThemeDB** :ref:`🔗` The :ref:`ThemeDB` singleton. @@ -5069,7 +5163,7 @@ The :ref:`ThemeDB` singleton. .. rst-class:: classref-property -:ref:`Time` **Time** +:ref:`Time` **Time** :ref:`🔗` The :ref:`Time` singleton. @@ -5081,7 +5175,7 @@ The :ref:`Time` singleton. .. rst-class:: classref-property -:ref:`TranslationServer` **TranslationServer** +:ref:`TranslationServer` **TranslationServer** :ref:`🔗` The :ref:`TranslationServer` singleton. @@ -5093,7 +5187,7 @@ The :ref:`TranslationServer` singleton. .. rst-class:: classref-property -:ref:`WorkerThreadPool` **WorkerThreadPool** +:ref:`WorkerThreadPool` **WorkerThreadPool** :ref:`🔗` The :ref:`WorkerThreadPool` singleton. @@ -5105,7 +5199,7 @@ The :ref:`WorkerThreadPool` singleton. .. rst-class:: classref-property -:ref:`XRServer` **XRServer** +:ref:`XRServer` **XRServer** :ref:`🔗` The :ref:`XRServer` singleton. @@ -5122,7 +5216,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant` **abs** **(** :ref:`Variant` x **)** +:ref:`Variant` **abs**\ (\ x\: :ref:`Variant`\ ) :ref:`🔗` Returns the absolute value of a :ref:`Variant` parameter ``x`` (i.e. non-negative value). Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. @@ -5156,7 +5250,7 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i .. rst-class:: classref-method -:ref:`float` **absf** **(** :ref:`float` x **)** +:ref:`float` **absf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the absolute value of float parameter ``x`` (i.e. positive value). @@ -5173,7 +5267,7 @@ Returns the absolute value of float parameter ``x`` (i.e. positive value). .. rst-class:: classref-method -:ref:`int` **absi** **(** :ref:`int` x **)** +:ref:`int` **absi**\ (\ x\: :ref:`int`\ ) :ref:`🔗` Returns the absolute value of int parameter ``x`` (i.e. positive value). @@ -5190,7 +5284,7 @@ Returns the absolute value of int parameter ``x`` (i.e. positive value). .. rst-class:: classref-method -:ref:`float` **acos** **(** :ref:`float` x **)** +:ref:`float` **acos**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos` from returning :ref:`@GDScript.NAN`. @@ -5203,11 +5297,42 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` ---- +.. _class_@GlobalScope_method_acosh: + +.. rst-class:: classref-method + +:ref:`float` **acosh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` + +Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh` from returning :ref:`@GDScript.NAN`. + +:: + + var a = acosh(2) # Returns 1.31695789692482 + cosh(a) # Returns 2 + + var b = acosh(-1) # Returns 0 + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_angle_difference: + +.. rst-class:: classref-method + +:ref:`float` **angle_difference**\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) :ref:`🔗` + +Returns the difference between the two angles, in the range of ``[-PI, +PI]``. When ``from`` and ``to`` are opposite, returns ``-PI`` if ``from`` is smaller than ``to``, or ``PI`` otherwise. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_asin: .. rst-class:: classref-method -:ref:`float` **asin** **(** :ref:`float` x **)** +:ref:`float` **asin**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin` from returning :ref:`@GDScript.NAN`. @@ -5220,11 +5345,28 @@ Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. `` ---- +.. _class_@GlobalScope_method_asinh: + +.. rst-class:: classref-method + +:ref:`float` **asinh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` + +Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space. + +:: + + var a = asinh(0.9) # Returns 0.8088669356527824 + sinh(a) # Returns 0.9 + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_atan: .. rst-class:: classref-method -:ref:`float` **atan** **(** :ref:`float` x **)** +:ref:`float` **atan**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry. @@ -5244,7 +5386,7 @@ If ``x`` is between ``-PI / 2`` and ``PI / 2`` (inclusive), ``atan(tan(x))`` is .. rst-class:: classref-method -:ref:`float` **atan2** **(** :ref:`float` y, :ref:`float` x **)** +:ref:`float` **atan2**\ (\ y\: :ref:`float`, x\: :ref:`float`\ ) :ref:`🔗` Returns the arc tangent of ``y/x`` in radians. Use to get the angle of tangent ``y/x``. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. @@ -5258,11 +5400,33 @@ Important note: The Y coordinate comes first, by convention. ---- +.. _class_@GlobalScope_method_atanh: + +.. rst-class:: classref-method + +:ref:`float` **atanh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` + +Returns the hyperbolic arc (also called inverse) tangent of ``x``, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if ``x`` is between -1 and 1 (non-inclusive). + +In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh` from returning :ref:`@GDScript.NAN`. + +:: + + var a = atanh(0.9) # Returns 1.47221948958322 + tanh(a) # Returns 0.9 + + var b = atanh(-2) # Returns -inf + tanh(b) # Returns -1 + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_bezier_derivative: .. rst-class:: classref-method -:ref:`float` **bezier_derivative** **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** +:ref:`float` **bezier_derivative**\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) :ref:`🔗` Returns the derivative at the given ``t`` on a one-dimensional `Bézier curve `__ defined by the given ``control_1``, ``control_2``, and ``end`` points. @@ -5274,7 +5438,7 @@ Returns the derivative at the given ``t`` on a one-dimensional `Bézier curve ` **bezier_interpolate** **(** :ref:`float` start, :ref:`float` control_1, :ref:`float` control_2, :ref:`float` end, :ref:`float` t **)** +:ref:`float` **bezier_interpolate**\ (\ start\: :ref:`float`, control_1\: :ref:`float`, control_2\: :ref:`float`, end\: :ref:`float`, t\: :ref:`float`\ ) :ref:`🔗` Returns the point at the given ``t`` on a one-dimensional `Bézier curve `__ defined by the given ``control_1``, ``control_2``, and ``end`` points. @@ -5286,7 +5450,7 @@ Returns the point at the given ``t`` on a one-dimensional `Bézier curve ` **bytes_to_var** **(** :ref:`PackedByteArray` bytes **)** +:ref:`Variant` **bytes_to_var**\ (\ bytes\: :ref:`PackedByteArray`\ ) :ref:`🔗` Decodes a byte array back to a :ref:`Variant` value, without decoding objects. @@ -5300,7 +5464,7 @@ Decodes a byte array back to a :ref:`Variant` value, without deco .. rst-class:: classref-method -:ref:`Variant` **bytes_to_var_with_objects** **(** :ref:`PackedByteArray` bytes **)** +:ref:`Variant` **bytes_to_var_with_objects**\ (\ bytes\: :ref:`PackedByteArray`\ ) :ref:`🔗` Decodes a byte array back to a :ref:`Variant` value. Decoding objects is allowed. @@ -5314,9 +5478,9 @@ Decodes a byte array back to a :ref:`Variant` value. Decoding obj .. rst-class:: classref-method -:ref:`Variant` **ceil** **(** :ref:`Variant` x **)** +:ref:`Variant` **ceil**\ (\ x\: :ref:`Variant`\ ) :ref:`🔗` -Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -5335,7 +5499,7 @@ See also :ref:`floor`, :ref:`round` **ceilf** **(** :ref:`float` x **)** +:ref:`float` **ceilf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. @@ -5349,7 +5513,7 @@ A type-safe version of :ref:`ceil`, returning a .. rst-class:: classref-method -:ref:`int` **ceili** **(** :ref:`float` x **)** +:ref:`int` **ceili**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. @@ -5363,7 +5527,7 @@ A type-safe version of :ref:`ceil`, returning an .. rst-class:: classref-method -:ref:`Variant` **clamp** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** +:ref:`Variant` **clamp**\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) :ref:`🔗` Clamps the ``value``, returning a :ref:`Variant` not less than ``min`` and not more than ``max``. Any values that can be compared with the less than and greater than operators will work. @@ -5374,20 +5538,10 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var b = clamp(8.1, 0.9, 5.5) # b is 5.5 - - var c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5)) - # c is (-3.2, -2) - - var d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6)) - # d is (2, 6) - - var e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1)) - # e is (-3, -2, 5.4) - - var f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6)) - # f is (-4, -5, -6) -\ **Note:** For better type safety, use :ref:`clampf`, :ref:`clampi`, :ref:`Vector2.clamp`, :ref:`Vector2i.clamp`, :ref:`Vector3.clamp`, :ref:`Vector3i.clamp`, :ref:`Vector4.clamp`, :ref:`Vector4i.clamp`, or :ref:`Color.clamp`. +\ **Note:** For better type safety, use :ref:`clampf`, :ref:`clampi`, :ref:`Vector2.clamp`, :ref:`Vector2i.clamp`, :ref:`Vector3.clamp`, :ref:`Vector3i.clamp`, :ref:`Vector4.clamp`, :ref:`Vector4i.clamp`, or :ref:`Color.clamp` (not currently supported by this method). + +\ **Note:** When using this on vectors it will *not* perform component-wise clamping, and will pick ``min`` if ``value < min`` or ``max`` if ``value > max``. To perform component-wise clamping use the methods listed above. .. rst-class:: classref-item-separator @@ -5397,7 +5551,7 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` .. rst-class:: classref-method -:ref:`float` **clampf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** +:ref:`float` **clampf**\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`🔗` Clamps the ``value``, returning a :ref:`float` not less than ``min`` and not more than ``max``. @@ -5417,7 +5571,7 @@ Clamps the ``value``, returning a :ref:`float` not less than ``min` .. rst-class:: classref-method -:ref:`int` **clampi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** +:ref:`int` **clampi**\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) :ref:`🔗` Clamps the ``value``, returning an :ref:`int` not less than ``min`` and not more than ``max``. @@ -5437,7 +5591,7 @@ Clamps the ``value``, returning an :ref:`int` not less than ``min`` a .. rst-class:: classref-method -:ref:`float` **cos** **(** :ref:`float` angle_rad **)** +:ref:`float` **cos**\ (\ angle_rad\: :ref:`float`\ ) :ref:`🔗` Returns the cosine of angle ``angle_rad`` in radians. @@ -5455,7 +5609,7 @@ Returns the cosine of angle ``angle_rad`` in radians. .. rst-class:: classref-method -:ref:`float` **cosh** **(** :ref:`float` x **)** +:ref:`float` **cosh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the hyperbolic cosine of ``x`` in radians. @@ -5471,7 +5625,7 @@ Returns the hyperbolic cosine of ``x`` in radians. .. rst-class:: classref-method -:ref:`float` **cubic_interpolate** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** +:ref:`float` **cubic_interpolate**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values. @@ -5483,7 +5637,7 @@ Cubic interpolates between two values by the factor defined in ``weight`` with ` .. rst-class:: classref-method -:ref:`float` **cubic_interpolate_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** +:ref:`float` **cubic_interpolate_angle**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. @@ -5495,11 +5649,11 @@ Cubic interpolates between two rotation values with shortest path by the factor .. rst-class:: classref-method -:ref:`float` **cubic_interpolate_angle_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** +:ref:`float` **cubic_interpolate_angle_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`🔗` Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. -It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. .. rst-class:: classref-item-separator @@ -5509,7 +5663,7 @@ It can perform smoother interpolation than ``cubic_interpolate()`` by the time v .. rst-class:: classref-method -:ref:`float` **cubic_interpolate_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** +:ref:`float` **cubic_interpolate_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`🔗` Cubic interpolates between two values by the factor defined in ``weight`` with ``pre`` and ``post`` values. @@ -5523,7 +5677,7 @@ It can perform smoother interpolation than :ref:`cubic_interpolate` **db_to_linear** **(** :ref:`float` db **)** +:ref:`float` **db_to_linear**\ (\ db\: :ref:`float`\ ) :ref:`🔗` Converts from decibels to linear energy (audio). @@ -5535,7 +5689,7 @@ Converts from decibels to linear energy (audio). .. rst-class:: classref-method -:ref:`float` **deg_to_rad** **(** :ref:`float` deg **)** +:ref:`float` **deg_to_rad**\ (\ deg\: :ref:`float`\ ) :ref:`🔗` Converts an angle expressed in degrees to radians. @@ -5551,11 +5705,11 @@ Converts an angle expressed in degrees to radians. .. rst-class:: classref-method -:ref:`float` **ease** **(** :ref:`float` x, :ref:`float` curve **)** +:ref:`float` **ease**\ (\ x\: :ref:`float`, curve\: :ref:`float`\ ) :ref:`🔗` Returns an "eased" value of ``x`` based on an easing function defined with ``curve``. This easing function is based on an exponent. The ``curve`` can be any floating-point number, with specific values leading to the following behaviors: -:: +.. code:: text - Lower than -1.0 (exclusive): Ease in-out - 1.0: Linear @@ -5577,7 +5731,7 @@ See also :ref:`smoothstep`. If you need to .. rst-class:: classref-method -:ref:`String` **error_string** **(** :ref:`int` error **)** +:ref:`String` **error_string**\ (\ error\: :ref:`int`\ ) :ref:`🔗` Returns a human-readable name for the given :ref:`Error` code. @@ -5596,11 +5750,11 @@ Returns a human-readable name for the given :ref:`Error .. rst-class:: classref-method -:ref:`float` **exp** **(** :ref:`float` x **)** +:ref:`float` **exp**\ (\ x\: :ref:`float`\ ) :ref:`🔗` -The natural exponential function. It raises the mathematical constant **e** to the power of ``x`` and returns it. +The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it. -\ **e** has an approximate value of 2.71828, and can be obtained with ``exp(1)``. +\ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``. For exponents to other bases use the method :ref:`pow`. @@ -5616,9 +5770,9 @@ For exponents to other bases use the method :ref:`pow` **floor** **(** :ref:`Variant` x **)** +:ref:`Variant` **floor**\ (\ x\: :ref:`Variant`\ ) :ref:`🔗` -Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -5637,7 +5791,7 @@ See also :ref:`ceil`, :ref:`round` **floorf** **(** :ref:`float` x **)** +:ref:`float` **floorf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. @@ -5651,7 +5805,7 @@ A type-safe version of :ref:`floor`, returning .. rst-class:: classref-method -:ref:`int` **floori** **(** :ref:`float` x **)** +:ref:`int` **floori**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. @@ -5667,7 +5821,7 @@ A type-safe version of :ref:`floor`, returning .. rst-class:: classref-method -:ref:`float` **fmod** **(** :ref:`float` x, :ref:`float` y **)** +:ref:`float` **fmod**\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) :ref:`🔗` Returns the floating-point remainder of ``x`` divided by ``y``, keeping the sign of ``x``. @@ -5685,7 +5839,7 @@ For the integer remainder operation, use the ``%`` operator. .. rst-class:: classref-method -:ref:`float` **fposmod** **(** :ref:`float` x, :ref:`float` y **)** +:ref:`float` **fposmod**\ (\ x\: :ref:`float`, y\: :ref:`float`\ ) :ref:`🔗` Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally in positive and negative. @@ -5696,9 +5850,9 @@ Returns the floating-point modulus of ``x`` divided by ``y``, wrapping equally i var x = i * 0.5 - 1.5 print("%4.1f %4.1f | %4.1f" % [x, fmod(x, 1.5), fposmod(x, 1.5)]) -Produces: +Prints: -:: +.. code:: text (x) (fmod(x, 1.5)) (fposmod(x, 1.5)) -1.5 -0.0 | 0.0 @@ -5717,7 +5871,7 @@ Produces: .. rst-class:: classref-method -:ref:`int` **hash** **(** :ref:`Variant` variable **)** +:ref:`int` **hash**\ (\ variable\: :ref:`Variant`\ ) :ref:`🔗` Returns the integer hash of the passed ``variable``. @@ -5742,7 +5896,7 @@ Returns the integer hash of the passed ``variable``. .. rst-class:: classref-method -:ref:`Object` **instance_from_id** **(** :ref:`int` instance_id **)** +:ref:`Object` **instance_from_id**\ (\ instance_id\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id`. @@ -5782,7 +5936,7 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All .. rst-class:: classref-method -:ref:`float` **inverse_lerp** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +:ref:`float` **inverse_lerp**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp` on the result of :ref:`inverse_lerp` if this is not desired. @@ -5806,7 +5960,7 @@ See also :ref:`lerp`, which performs the reverse .. rst-class:: classref-method -:ref:`bool` **is_equal_approx** **(** :ref:`float` a, :ref:`float` b **)** +:ref:`bool` **is_equal_approx**\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) :ref:`🔗` Returns ``true`` if ``a`` and ``b`` are approximately equal to each other. @@ -5822,7 +5976,7 @@ Infinity values of the same sign are considered equal. .. rst-class:: classref-method -:ref:`bool` **is_finite** **(** :ref:`float` x **)** +:ref:`bool` **is_finite**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN`, positive infinity, or negative infinity. @@ -5834,7 +5988,7 @@ Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN` **is_inf** **(** :ref:`float` x **)** +:ref:`bool` **is_inf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns ``true`` if ``x`` is either positive infinity or negative infinity. @@ -5846,7 +6000,7 @@ Returns ``true`` if ``x`` is either positive infinity or negative infinity. .. rst-class:: classref-method -:ref:`bool` **is_instance_id_valid** **(** :ref:`int` id **)** +:ref:`bool` **is_instance_id_valid**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Returns ``true`` if the Object that corresponds to ``id`` is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID. @@ -5858,7 +6012,7 @@ Returns ``true`` if the Object that corresponds to ``id`` is a valid object (e.g .. rst-class:: classref-method -:ref:`bool` **is_instance_valid** **(** :ref:`Variant` instance **)** +:ref:`bool` **is_instance_valid**\ (\ instance\: :ref:`Variant`\ ) :ref:`🔗` Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted from memory). @@ -5870,7 +6024,7 @@ Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted fr .. rst-class:: classref-method -:ref:`bool` **is_nan** **(** :ref:`float` x **)** +:ref:`bool` **is_nan**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. @@ -5882,7 +6036,7 @@ Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. .. rst-class:: classref-method -:ref:`bool` **is_same** **(** :ref:`Variant` a, :ref:`Variant` b **)** +:ref:`bool` **is_same**\ (\ a\: :ref:`Variant`, b\: :ref:`Variant`\ ) :ref:`🔗` Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Returns ``true``, for reference types, if the references of ``a`` and ``b`` are the same. @@ -5904,7 +6058,7 @@ Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Retu These are :ref:`Variant` value types: ``null``, :ref:`bool`, :ref:`int`, :ref:`float`, :ref:`String`, :ref:`StringName`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`, :ref:`Rect2`, :ref:`Rect2i`, :ref:`Transform2D`, :ref:`Transform3D`, :ref:`Plane`, :ref:`Quaternion`, :ref:`AABB`, :ref:`Basis`, :ref:`Projection`, :ref:`Color`, :ref:`NodePath`, :ref:`RID`, :ref:`Callable` and :ref:`Signal`. -These are :ref:`Variant` reference types: :ref:`Object`, :ref:`Dictionary`, :ref:`Array`, :ref:`PackedByteArray`, :ref:`PackedInt32Array`, :ref:`PackedInt64Array`, :ref:`PackedFloat32Array`, :ref:`PackedFloat64Array`, :ref:`PackedStringArray`, :ref:`PackedVector2Array`, :ref:`PackedVector3Array` and :ref:`PackedColorArray`. +These are :ref:`Variant` reference types: :ref:`Object`, :ref:`Dictionary`, :ref:`Array`, :ref:`PackedByteArray`, :ref:`PackedInt32Array`, :ref:`PackedInt64Array`, :ref:`PackedFloat32Array`, :ref:`PackedFloat64Array`, :ref:`PackedStringArray`, :ref:`PackedVector2Array`, :ref:`PackedVector3Array`, :ref:`PackedVector4Array`, and :ref:`PackedColorArray`. .. rst-class:: classref-item-separator @@ -5914,7 +6068,7 @@ These are :ref:`Variant` reference types: :ref:`Object` **is_zero_approx** **(** :ref:`float` x **)** +:ref:`bool` **is_zero_approx**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns ``true`` if ``x`` is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon. @@ -5928,7 +6082,7 @@ This function is faster than using :ref:`is_equal_approx` **lerp** **(** :ref:`Variant` from, :ref:`Variant` to, :ref:`Variant` weight **)** +:ref:`Variant` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) :ref:`🔗` Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clamp` on the result of this function. @@ -5950,7 +6104,7 @@ See also :ref:`inverse_lerp` which perfo .. rst-class:: classref-method -:ref:`float` **lerp_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +:ref:`float` **lerp_angle**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0. @@ -5976,7 +6130,7 @@ Similar to :ref:`lerp`, but interpolates correct .. rst-class:: classref-method -:ref:`float` **lerpf** **(** :ref:`float` from, :ref:`float` to, :ref:`float` weight **)** +:ref:`float` **lerpf**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`🔗` Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` on the result of this function. @@ -5994,7 +6148,7 @@ See also :ref:`inverse_lerp` which perfo .. rst-class:: classref-method -:ref:`float` **linear_to_db** **(** :ref:`float` lin **)** +:ref:`float` **linear_to_db**\ (\ lin\: :ref:`float`\ ) :ref:`🔗` Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). @@ -6015,7 +6169,7 @@ Converts from linear energy to decibels (audio). This can be used to implement v .. rst-class:: classref-method -:ref:`float` **log** **(** :ref:`float` x **)** +:ref:`float` **log**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the `natural logarithm `__ of ``x`` (base `[i]e[/i] `__, with *e* being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth. @@ -6035,7 +6189,7 @@ Returns the `natural logarithm .. rst-class:: classref-method -:ref:`Variant` **max** **(** ... **)** |vararg| +:ref:`Variant` **max**\ (\ ...\ ) |vararg| :ref:`🔗` Returns the maximum of the given numeric values. This function can take any number of arguments. @@ -6043,6 +6197,8 @@ Returns the maximum of the given numeric values. This function can take any numb max(1, 7, 3, -6, 5) # Returns 7 +\ **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using ``x < y``. To perform component-wise maximum, use :ref:`Vector2.max`, :ref:`Vector2i.max`, :ref:`Vector3.max`, :ref:`Vector3i.max`, :ref:`Vector4.max`, and :ref:`Vector4i.max`. + .. rst-class:: classref-item-separator ---- @@ -6051,7 +6207,7 @@ Returns the maximum of the given numeric values. This function can take any numb .. rst-class:: classref-method -:ref:`float` **maxf** **(** :ref:`float` a, :ref:`float` b **)** +:ref:`float` **maxf**\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) :ref:`🔗` Returns the maximum of two :ref:`float` values. @@ -6068,7 +6224,7 @@ Returns the maximum of two :ref:`float` values. .. rst-class:: classref-method -:ref:`int` **maxi** **(** :ref:`int` a, :ref:`int` b **)** +:ref:`int` **maxi**\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) :ref:`🔗` Returns the maximum of two :ref:`int` values. @@ -6085,7 +6241,7 @@ Returns the maximum of two :ref:`int` values. .. rst-class:: classref-method -:ref:`Variant` **min** **(** ... **)** |vararg| +:ref:`Variant` **min**\ (\ ...\ ) |vararg| :ref:`🔗` Returns the minimum of the given numeric values. This function can take any number of arguments. @@ -6093,6 +6249,8 @@ Returns the minimum of the given numeric values. This function can take any numb min(1, 7, 3, -6, 5) # Returns -6 +\ **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using ``x < y``. To perform component-wise minimum, use :ref:`Vector2.min`, :ref:`Vector2i.min`, :ref:`Vector3.min`, :ref:`Vector3i.min`, :ref:`Vector4.min`, and :ref:`Vector4i.min`. + .. rst-class:: classref-item-separator ---- @@ -6101,7 +6259,7 @@ Returns the minimum of the given numeric values. This function can take any numb .. rst-class:: classref-method -:ref:`float` **minf** **(** :ref:`float` a, :ref:`float` b **)** +:ref:`float` **minf**\ (\ a\: :ref:`float`, b\: :ref:`float`\ ) :ref:`🔗` Returns the minimum of two :ref:`float` values. @@ -6118,7 +6276,7 @@ Returns the minimum of two :ref:`float` values. .. rst-class:: classref-method -:ref:`int` **mini** **(** :ref:`int` a, :ref:`int` b **)** +:ref:`int` **mini**\ (\ a\: :ref:`int`, b\: :ref:`int`\ ) :ref:`🔗` Returns the minimum of two :ref:`int` values. @@ -6135,7 +6293,7 @@ Returns the minimum of two :ref:`int` values. .. rst-class:: classref-method -:ref:`float` **move_toward** **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** +:ref:`float` **move_toward**\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) :ref:`🔗` Moves ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``. @@ -6156,11 +6314,9 @@ Use a negative ``delta`` value to move away. .. rst-class:: classref-method -:ref:`int` **nearest_po2** **(** :ref:`int` value **)** +:ref:`int` **nearest_po2**\ (\ value\: :ref:`int`\ ) :ref:`🔗` -Returns the nearest equal or larger power of 2 for the integer ``value``. - -In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such that ``value <= a`` for some non-negative integer ``n``. +Returns the smallest integer power of 2 that is greater than or equal to ``value``. :: @@ -6171,7 +6327,7 @@ In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such th nearest_po2(0) # Returns 0 (this may not be expected) nearest_po2(-1) # Returns 0 (this may not be expected) -\ **Warning:** Due to the way it is implemented, this function returns ``0`` rather than ``1`` for negative values of ``value`` (in reality, 1 is the smallest integer power of 2). +\ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged. .. rst-class:: classref-item-separator @@ -6181,7 +6337,7 @@ In other words, returns the smallest value ``a`` where ``a = pow(2, n)`` such th .. rst-class:: classref-method -:ref:`float` **pingpong** **(** :ref:`float` value, :ref:`float` length **)** +:ref:`float` **pingpong**\ (\ value\: :ref:`float`, length\: :ref:`float`\ ) :ref:`🔗` Wraps ``value`` between ``0`` and the ``length``. If the limit is reached, the next value the function returns is decreased to the ``0`` side or increased to the ``length`` side (like a triangle wave). If ``length`` is less than zero, it becomes positive. @@ -6206,7 +6362,7 @@ Wraps ``value`` between ``0`` and the ``length``. If the limit is reached, the n .. rst-class:: classref-method -:ref:`int` **posmod** **(** :ref:`int` x, :ref:`int` y **)** +:ref:`int` **posmod**\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) :ref:`🔗` Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in positive and negative. @@ -6216,9 +6372,9 @@ Returns the integer modulus of ``x`` divided by ``y`` that wraps equally in posi for i in range(-3, 4): print("%2d %2d | %2d" % [i, i % 3, posmod(i, 3)]) -Produces: +Prints: -:: +.. code:: text (i) (i % 3) (posmod(i, 3)) -3 0 | 0 @@ -6237,7 +6393,7 @@ Produces: .. rst-class:: classref-method -:ref:`float` **pow** **(** :ref:`float` base, :ref:`float` exp **)** +:ref:`float` **pow**\ (\ base\: :ref:`float`, exp\: :ref:`float`\ ) :ref:`🔗` Returns the result of ``base`` raised to the power of ``exp``. @@ -6256,7 +6412,7 @@ In GDScript, this is the equivalent of the ``**`` operator. .. rst-class:: classref-method -void **print** **(** ... **)** |vararg| +|void| **print**\ (\ ...\ ) |vararg| :ref:`🔗` Converts one or more arguments of any type to string in the best way possible and prints them to the console. @@ -6285,7 +6441,7 @@ Converts one or more arguments of any type to string in the best way possible an .. rst-class:: classref-method -void **print_rich** **(** ... **)** |vararg| +|void| **print_rich**\ (\ ...\ ) |vararg| :ref:`🔗` Converts one or more arguments of any type to string in the best way possible and prints them to the console. @@ -6314,6 +6470,8 @@ When printing to standard output, the supported subset of BBCode is converted to \ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. +\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open` when clicked. + .. rst-class:: classref-item-separator ---- @@ -6322,7 +6480,7 @@ When printing to standard output, the supported subset of BBCode is converted to .. rst-class:: classref-method -void **print_verbose** **(** ... **)** |vararg| +|void| **print_verbose**\ (\ ...\ ) |vararg| :ref:`🔗` If verbose mode is enabled (:ref:`OS.is_stdout_verbose` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console. @@ -6334,7 +6492,7 @@ If verbose mode is enabled (:ref:`OS.is_stdout_verbose` Prints one or more arguments to strings in the best way possible to standard error line. @@ -6359,10 +6517,12 @@ Prints one or more arguments to strings in the best way possible to standard err .. rst-class:: classref-method -void **printraw** **(** ... **)** |vararg| +|void| **printraw**\ (\ ...\ ) |vararg| :ref:`🔗` Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike :ref:`print`, no newline is automatically added at the end. +\ **Note:** The OS terminal is *not* the same as the editor's Output dock. The output sent to the OS terminal can be seen when running Godot from a terminal. On Windows, this requires using the ``console.exe`` executable. + .. tabs:: @@ -6390,7 +6550,7 @@ Prints one or more arguments to strings in the best way possible to the OS termi .. rst-class:: classref-method -void **prints** **(** ... **)** |vararg| +|void| **prints**\ (\ ...\ ) |vararg| :ref:`🔗` Prints one or more arguments to the console with a space between each argument. @@ -6415,7 +6575,7 @@ Prints one or more arguments to the console with a space between each argument. .. rst-class:: classref-method -void **printt** **(** ... **)** |vararg| +|void| **printt**\ (\ ...\ ) |vararg| :ref:`🔗` Prints one or more arguments to the console with a tab between each argument. @@ -6440,7 +6600,7 @@ Prints one or more arguments to the console with a tab between each argument. .. rst-class:: classref-method -void **push_error** **(** ... **)** |vararg| +|void| **push_error**\ (\ ...\ ) |vararg| :ref:`🔗` Pushes an error message to Godot's built-in debugger and to the OS terminal. @@ -6467,7 +6627,7 @@ Pushes an error message to Godot's built-in debugger and to the OS terminal. .. rst-class:: classref-method -void **push_warning** **(** ... **)** |vararg| +|void| **push_warning**\ (\ ...\ ) |vararg| :ref:`🔗` Pushes a warning message to Godot's built-in debugger and to the OS terminal. @@ -6492,7 +6652,7 @@ Pushes a warning message to Godot's built-in debugger and to the OS terminal. .. rst-class:: classref-method -:ref:`float` **rad_to_deg** **(** :ref:`float` rad **)** +:ref:`float` **rad_to_deg**\ (\ rad\: :ref:`float`\ ) :ref:`🔗` Converts an angle expressed in radians to degrees. @@ -6510,7 +6670,7 @@ Converts an angle expressed in radians to degrees. .. rst-class:: classref-method -:ref:`PackedInt64Array` **rand_from_seed** **(** :ref:`int` seed **)** +:ref:`PackedInt64Array` **rand_from_seed**\ (\ seed\: :ref:`int`\ ) :ref:`🔗` Given a ``seed``, returns a :ref:`PackedInt64Array` of size ``2``, where its first element is the randomized :ref:`int` value, and the second element is the same as ``seed``. Passing the same ``seed`` consistently returns the same array. @@ -6531,9 +6691,9 @@ Given a ``seed``, returns a :ref:`PackedInt64Array` of s .. rst-class:: classref-method -:ref:`float` **randf** **(** **)** +:ref:`float` **randf**\ (\ ) :ref:`🔗` -Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive). +Returns a random floating-point value between ``0.0`` and ``1.0`` (inclusive). .. tabs:: @@ -6556,9 +6716,9 @@ Returns a random floating point value between ``0.0`` and ``1.0`` (inclusive). .. rst-class:: classref-method -:ref:`float` **randf_range** **(** :ref:`float` from, :ref:`float` to **)** +:ref:`float` **randf_range**\ (\ from\: :ref:`float`, to\: :ref:`float`\ ) :ref:`🔗` -Returns a random floating point value between ``from`` and ``to`` (inclusive). +Returns a random floating-point value between ``from`` and ``to`` (inclusive). .. tabs:: @@ -6583,9 +6743,11 @@ Returns a random floating point value between ``from`` and ``to`` (inclusive). .. rst-class:: classref-method -:ref:`float` **randfn** **(** :ref:`float` mean, :ref:`float` deviation **)** +:ref:`float` **randfn**\ (\ mean\: :ref:`float`, deviation\: :ref:`float`\ ) :ref:`🔗` + +Returns a `normally-distributed `__, pseudo-random floating-point value from the specified ``mean`` and a standard ``deviation``. This is also known as a Gaussian distribution. -Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution. +\ **Note:** This method uses the `Box-Muller transform `__ algorithm. .. rst-class:: classref-item-separator @@ -6595,7 +6757,7 @@ Returns a normally-distributed pseudo-random floating point value using Box-Mull .. rst-class:: classref-method -:ref:`int` **randi** **(** **)** +:ref:`int` **randi**\ (\ ) :ref:`🔗` Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval ``[0, N - 1]`` (where N is smaller than 2^32). @@ -6626,7 +6788,7 @@ Returns a random unsigned 32-bit integer. Use remainder to obtain a random value .. rst-class:: classref-method -:ref:`int` **randi_range** **(** :ref:`int` from, :ref:`int` to **)** +:ref:`int` **randi_range**\ (\ from\: :ref:`int`, to\: :ref:`int`\ ) :ref:`🔗` Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). If ``to`` is lesser than ``from``, they are swapped. @@ -6653,7 +6815,7 @@ Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). .. rst-class:: classref-method -void **randomize** **(** **)** +|void| **randomize**\ (\ ) :ref:`🔗` Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time. @@ -6667,7 +6829,7 @@ Randomizes the seed (or the internal state) of the random number generator. The .. rst-class:: classref-method -:ref:`float` **remap** **(** :ref:`float` value, :ref:`float` istart, :ref:`float` istop, :ref:`float` ostart, :ref:`float` ostop **)** +:ref:`float` **remap**\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) :ref:`🔗` Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp` and :ref:`inverse_lerp`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp` on the result of this function. @@ -6677,6 +6839,8 @@ Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also For complex use cases where multiple ranges are needed, consider using :ref:`Curve` or :ref:`Gradient` instead. +\ **Note:** If ``istart == istop``, the return value is undefined (most likely NaN, INF, or -INF). + .. rst-class:: classref-item-separator ---- @@ -6685,9 +6849,9 @@ For complex use cases where multiple ranges are needed, consider using :ref:`Cur .. rst-class:: classref-method -:ref:`int` **rid_allocate_id** **(** **)** +:ref:`int` **rid_allocate_id**\ (\ ) :ref:`🔗` -Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers. +Allocates a unique ID which can be used by the implementation to construct an RID. This is used mainly from native extensions to implement servers. .. rst-class:: classref-item-separator @@ -6697,9 +6861,25 @@ Allocates a unique ID which can be used by the implementation to construct a RID .. rst-class:: classref-method -:ref:`RID` **rid_from_int64** **(** :ref:`int` base **)** +:ref:`RID` **rid_from_int64**\ (\ base\: :ref:`int`\ ) :ref:`🔗` + +Creates an RID from a ``base``. This is used mainly from native extensions to build servers. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_rotate_toward: + +.. rst-class:: classref-method + +:ref:`float` **rotate_toward**\ (\ from\: :ref:`float`, to\: :ref:`float`, delta\: :ref:`float`\ ) :ref:`🔗` + +Rotates ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``. + +Similar to :ref:`move_toward`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. -Creates a RID from a ``base``. This is used mainly from native extensions to build servers. +If ``delta`` is negative, this function will rotate away from ``to``, toward the opposite angle, and will not go past the opposite angle. .. rst-class:: classref-item-separator @@ -6709,9 +6889,9 @@ Creates a RID from a ``base``. This is used mainly from native extensions to bui .. rst-class:: classref-method -:ref:`Variant` **round** **(** :ref:`Variant` x **)** +:ref:`Variant` **round**\ (\ x\: :ref:`Variant`\ ) :ref:`🔗` -Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`. +Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: @@ -6731,7 +6911,7 @@ See also :ref:`floor`, :ref:`ceil` **roundf** **(** :ref:`float` x **)** +:ref:`float` **roundf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. @@ -6745,7 +6925,7 @@ A type-safe version of :ref:`round`, returning .. rst-class:: classref-method -:ref:`int` **roundi** **(** :ref:`float` x **)** +:ref:`int` **roundi**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. @@ -6759,7 +6939,7 @@ A type-safe version of :ref:`round`, returning .. rst-class:: classref-method -void **seed** **(** :ref:`int` base **)** +|void| **seed**\ (\ base\: :ref:`int`\ ) :ref:`🔗` Sets the seed for the random number generator to ``base``. Setting the seed manually can ensure consistent, repeatable results for most random functions. @@ -6794,15 +6974,18 @@ Sets the seed for the random number generator to ``base``. Setting the seed manu .. rst-class:: classref-method -:ref:`Variant` **sign** **(** :ref:`Variant` x **)** +:ref:`Variant` **sign**\ (\ x\: :ref:`Variant`\ ) :ref:`🔗` -Returns the same type of :ref:`Variant` as ``x``, with ``-1`` for negative values, ``1`` for positive values, and ``0`` for zeros. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. +Returns the same type of :ref:`Variant` as ``x``, with ``-1`` for negative values, ``1`` for positive values, and ``0`` for zeros. For ``nan`` values it returns 0. + +Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. :: sign(-6.0) # Returns -1 sign(0.0) # Returns 0 sign(6.0) # Returns 1 + sign(NAN) # Returns 0 sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) @@ -6816,15 +6999,16 @@ Returns the same type of :ref:`Variant` as ``x``, with ``-1`` for .. rst-class:: classref-method -:ref:`float` **signf** **(** :ref:`float` x **)** +:ref:`float` **signf**\ (\ x\: :ref:`float`\ ) :ref:`🔗` -Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero. +Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero. For ``nan`` values of ``x`` it returns 0.0. :: signf(-6.5) # Returns -1.0 signf(0.0) # Returns 0.0 signf(6.5) # Returns 1.0 + signf(NAN) # Returns 0.0 .. rst-class:: classref-item-separator @@ -6834,7 +7018,7 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` .. rst-class:: classref-method -:ref:`int` **signi** **(** :ref:`int` x **)** +:ref:`int` **signi**\ (\ x\: :ref:`int`\ ) :ref:`🔗` Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if ``x`` is zero. @@ -6852,7 +7036,7 @@ Returns ``-1`` if ``x`` is negative, ``1`` if ``x`` is positive, and ``0`` if if .. rst-class:: classref-method -:ref:`float` **sin** **(** :ref:`float` angle_rad **)** +:ref:`float` **sin**\ (\ angle_rad\: :ref:`float`\ ) :ref:`🔗` Returns the sine of angle ``angle_rad`` in radians. @@ -6869,7 +7053,7 @@ Returns the sine of angle ``angle_rad`` in radians. .. rst-class:: classref-method -:ref:`float` **sinh** **(** :ref:`float` x **)** +:ref:`float` **sinh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the hyperbolic sine of ``x``. @@ -6886,7 +7070,7 @@ Returns the hyperbolic sine of ``x``. .. rst-class:: classref-method -:ref:`float` **smoothstep** **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** +:ref:`float` **smoothstep**\ (\ from\: :ref:`float`, to\: :ref:`float`, x\: :ref:`float`\ ) :ref:`🔗` Returns the result of smoothly interpolating the value of ``x`` between ``0`` and ``1``, based on the where ``x`` lies with respect to the edges ``from`` and ``to``. @@ -6913,9 +7097,9 @@ Compared to :ref:`ease` with a curve value of `` .. rst-class:: classref-method -:ref:`Variant` **snapped** **(** :ref:`Variant` x, :ref:`Variant` step **)** +:ref:`Variant` **snapped**\ (\ x\: :ref:`Variant`, step\: :ref:`Variant`\ ) :ref:`🔗` -Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals. +Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating-point number to an arbitrary number of decimals. The returned value is the same type of :ref:`Variant` as ``step``. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. @@ -6938,9 +7122,9 @@ See also :ref:`ceil`, :ref:`floor` **snappedf** **(** :ref:`float` x, :ref:`float` step **)** +:ref:`float` **snappedf**\ (\ x\: :ref:`float`, step\: :ref:`float`\ ) :ref:`🔗` -Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating point number to an arbitrary number of decimals. +Returns the multiple of ``step`` that is the closest to ``x``. This can also be used to round a floating-point number to an arbitrary number of decimals. A type-safe version of :ref:`snapped`, returning a :ref:`float`. @@ -6957,7 +7141,7 @@ A type-safe version of :ref:`snapped`, return .. rst-class:: classref-method -:ref:`int` **snappedi** **(** :ref:`float` x, :ref:`int` step **)** +:ref:`int` **snappedi**\ (\ x\: :ref:`float`, step\: :ref:`int`\ ) :ref:`🔗` Returns the multiple of ``step`` that is the closest to ``x``. @@ -6976,7 +7160,7 @@ A type-safe version of :ref:`snapped`, return .. rst-class:: classref-method -:ref:`float` **sqrt** **(** :ref:`float` x **)** +:ref:`float` **sqrt**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the square root of ``x``, where ``x`` is a non-negative number. @@ -6996,7 +7180,7 @@ Returns the square root of ``x``, where ``x`` is a non-negative number. .. rst-class:: classref-method -:ref:`int` **step_decimals** **(** :ref:`float` x **)** +:ref:`int` **step_decimals**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation. @@ -7014,7 +7198,7 @@ Returns the position of the first non-zero digit, after the decimal point. Note .. rst-class:: classref-method -:ref:`String` **str** **(** ... **)** |vararg| +:ref:`String` **str**\ (\ ...\ ) |vararg| :ref:`🔗` Converts one or more arguments of any :ref:`Variant` type to a :ref:`String` in the best way possible. @@ -7033,7 +7217,7 @@ Converts one or more arguments of any :ref:`Variant` type to a :r .. rst-class:: classref-method -:ref:`Variant` **str_to_var** **(** :ref:`String` string **)** +:ref:`Variant` **str_to_var**\ (\ string\: :ref:`String`\ ) :ref:`🔗` Converts a formatted ``string`` that was returned by :ref:`var_to_str` to the original :ref:`Variant`. @@ -7062,7 +7246,7 @@ Converts a formatted ``string`` that was returned by :ref:`var_to_str` **tan** **(** :ref:`float` angle_rad **)** +:ref:`float` **tan**\ (\ angle_rad\: :ref:`float`\ ) :ref:`🔗` Returns the tangent of angle ``angle_rad`` in radians. @@ -7078,7 +7262,7 @@ Returns the tangent of angle ``angle_rad`` in radians. .. rst-class:: classref-method -:ref:`float` **tanh** **(** :ref:`float` x **)** +:ref:`float` **tanh**\ (\ x\: :ref:`float`\ ) :ref:`🔗` Returns the hyperbolic tangent of ``x``. @@ -7091,11 +7275,55 @@ Returns the hyperbolic tangent of ``x``. ---- +.. _class_@GlobalScope_method_type_convert: + +.. rst-class:: classref-method + +:ref:`Variant` **type_convert**\ (\ variant\: :ref:`Variant`, type\: :ref:`int`\ ) :ref:`🔗` + +Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Type` values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric :ref:`String`\ s to :ref:`int`, and converting most things to :ref:`String`. + +If the type conversion cannot be done, this method will return the default value for that type, for example converting :ref:`Rect2` to :ref:`Vector2` will always return :ref:`Vector2.ZERO`. This method will never show error messages as long as ``type`` is a valid Variant type. + +The returned value is a :ref:`Variant`, but the data inside and its type will be the same as the requested type. + +:: + + type_convert("Hi!", TYPE_INT) # Returns 0 + type_convert("123", TYPE_INT) # Returns 123 + type_convert(123.4, TYPE_INT) # Returns 123 + type_convert(5, TYPE_VECTOR2) # Returns (0, 0) + type_convert("Hi!", TYPE_NIL) # Returns null + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_type_string: + +.. rst-class:: classref-method + +:ref:`String` **type_string**\ (\ type\: :ref:`int`\ ) :ref:`🔗` + +Returns a human-readable name of the given ``type``, using the :ref:`Variant.Type` values. + +:: + + print(TYPE_INT) # Prints 2. + print(type_string(TYPE_INT)) # Prints "int". + print(type_string(TYPE_STRING)) # Prints "String". + +See also :ref:`typeof`. + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_typeof: .. rst-class:: classref-method -:ref:`int` **typeof** **(** :ref:`Variant` variable **)** +:ref:`int` **typeof**\ (\ variable\: :ref:`Variant`\ ) :ref:`🔗` Returns the internal type of the given ``variable``, using the :ref:`Variant.Type` values. @@ -7109,6 +7337,8 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ else: print("Unexpected result") +See also :ref:`type_string`. + .. rst-class:: classref-item-separator ---- @@ -7117,12 +7347,14 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ .. rst-class:: classref-method -:ref:`PackedByteArray` **var_to_bytes** **(** :ref:`Variant` variable **)** +:ref:`PackedByteArray` **var_to_bytes**\ (\ variable\: :ref:`Variant`\ ) :ref:`🔗` Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var`. \ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects`. +\ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. + .. rst-class:: classref-item-separator ---- @@ -7131,10 +7363,12 @@ Encodes a :ref:`Variant` value to a byte array, without encoding .. rst-class:: classref-method -:ref:`PackedByteArray` **var_to_bytes_with_objects** **(** :ref:`Variant` variable **)** +:ref:`PackedByteArray` **var_to_bytes_with_objects**\ (\ variable\: :ref:`Variant`\ ) :ref:`🔗` Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects`. +\ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. + .. rst-class:: classref-item-separator ---- @@ -7143,7 +7377,7 @@ Encodes a :ref:`Variant` value to a byte array. Encoding objects .. rst-class:: classref-method -:ref:`String` **var_to_str** **(** :ref:`Variant` variable **)** +:ref:`String` **var_to_str**\ (\ variable\: :ref:`Variant`\ ) :ref:`🔗` Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var`. @@ -7164,7 +7398,7 @@ Converts a :ref:`Variant` ``variable`` to a formatted :ref:`Strin Prints: -:: +.. code:: text { "a": 1, @@ -7181,9 +7415,9 @@ Prints: .. rst-class:: classref-method -:ref:`Variant` **weakref** **(** :ref:`Variant` obj **)** +:ref:`Variant` **weakref**\ (\ obj\: :ref:`Variant`\ ) :ref:`🔗` -Returns a weak reference to an object, or ``null`` if ``obj`` is invalid. +Returns a :ref:`WeakRef` instance holding a weak reference to ``obj``. Returns an empty :ref:`WeakRef` instance if ``obj`` is ``null``. Prints an error and returns ``null`` if ``obj`` is neither :ref:`Object`-derived nor ``null``. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. @@ -7195,7 +7429,7 @@ A weak reference to an object is not enough to keep the object alive: when the o .. rst-class:: classref-method -:ref:`Variant` **wrap** **(** :ref:`Variant` value, :ref:`Variant` min, :ref:`Variant` max **)** +:ref:`Variant` **wrap**\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) :ref:`🔗` Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. @@ -7220,7 +7454,7 @@ Variant types :ref:`int` and :ref:`float` are supported. .. rst-class:: classref-method -:ref:`float` **wrapf** **(** :ref:`float` value, :ref:`float` min, :ref:`float` max **)** +:ref:`float` **wrapf**\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`🔗` Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. @@ -7241,7 +7475,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating \ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod`, so prefer using that instead. -\ ``wrapf`` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. +\ :ref:`wrapf` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. .. rst-class:: classref-item-separator @@ -7251,7 +7485,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating .. rst-class:: classref-method -:ref:`int` **wrapi** **(** :ref:`int` value, :ref:`int` min, :ref:`int` max **)** +:ref:`int` **wrapi**\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) :ref:`🔗` Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. @@ -7272,3 +7506,4 @@ Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creatin .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index a8b724131d1..9a6fc2a5519 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -17,13 +17,13 @@ A 3D axis-aligned bounding box. Description ----------- -**AABB** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +The **AABB** built-in :ref:`Variant` type represents an axis-aligned bounding box in a 3D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector3`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **AABB** itself is axis-aligned, it can be combined with :ref:`Transform3D` to represent a rotated or skewed bounding box. -It uses floating-point coordinates. The 2D counterpart to **AABB** is :ref:`Rect2`. +It uses floating-point coordinates. The 2D counterpart to **AABB** is :ref:`Rect2`. There is no version of **AABB** that uses integer coordinates. -Negative values for :ref:`size` are not supported and will not work for most methods. Use :ref:`abs` to get an AABB with a positive size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs` to get an equivalent **AABB** with a non-negative size. -\ **Note:** Unlike :ref:`Rect2`, **AABB** does not have a variant that uses integer coordinates. +\ **Note:** In a boolean context, a **AABB** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector3.ZERO`). Otherwise, it always evaluates to ``true``. .. note:: @@ -64,13 +64,13 @@ Constructors .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`AABB` **(** **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`AABB` **(** :ref:`AABB` from **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`AABB` **(** :ref:`Vector3` position, :ref:`Vector3` size **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB`\ (\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB`\ (\ from\: :ref:`AABB`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`AABB`\ (\ position\: :ref:`Vector3`, size\: :ref:`Vector3`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -80,57 +80,57 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`abs` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`encloses` **(** :ref:`AABB` with **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`expand` **(** :ref:`Vector3` to_point **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_center` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_endpoint` **(** :ref:`int` idx **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_longest_axis` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_longest_axis_index` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_longest_axis_size` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_shortest_axis` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_shortest_axis_index` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_shortest_axis_size` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_support` **(** :ref:`Vector3` dir **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_volume` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`grow` **(** :ref:`float` by **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_point` **(** :ref:`Vector3` point **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_surface` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_volume` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`intersection` **(** :ref:`AABB` with **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`intersects` **(** :ref:`AABB` with **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`intersects_plane` **(** :ref:`Plane` plane **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`intersects_ray` **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`intersects_segment` **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`AABB` aabb **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`merge` **(** :ref:`AABB` with **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`abs`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`encloses`\ (\ with\: :ref:`AABB`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`expand`\ (\ to_point\: :ref:`Vector3`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_center`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_endpoint`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_longest_axis`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_longest_axis_index`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_longest_axis_size`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_shortest_axis`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_shortest_axis_index`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_shortest_axis_size`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_support`\ (\ dir\: :ref:`Vector3`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_volume`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`grow`\ (\ by\: :ref:`float`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point`\ (\ point\: :ref:`Vector3`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_surface`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_volume`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`intersection`\ (\ with\: :ref:`AABB`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`intersects`\ (\ with\: :ref:`AABB`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`intersects_plane`\ (\ plane\: :ref:`Plane`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`intersects_ray`\ (\ from\: :ref:`Vector3`, dir\: :ref:`Vector3`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`intersects_segment`\ (\ from\: :ref:`Vector3`, to\: :ref:`Vector3`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ aabb\: :ref:`AABB`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`merge`\ (\ with\: :ref:`AABB`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -140,13 +140,13 @@ Operators .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`AABB` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`operator *` **(** :ref:`Transform3D` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`AABB` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`AABB`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`operator *`\ (\ right\: :ref:`Transform3D`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`AABB`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -161,9 +161,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **end** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **end** = ``Vector3(0, 0, 0)`` :ref:`🔗` -Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +The ending point. This is usually the corner on the top-right and forward of the bounding box, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. .. rst-class:: classref-item-separator @@ -173,9 +173,9 @@ Ending corner. This is calculated as ``position + size``. Setting this value wil .. rst-class:: classref-property -:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **position** = ``Vector3(0, 0, 0)`` :ref:`🔗` -Beginning corner. Typically has values lower than :ref:`end`. +The origin point. This is usually the corner on the bottom-left and back of the bounding box. .. rst-class:: classref-item-separator @@ -185,11 +185,11 @@ Beginning corner. Typically has values lower than :ref:`end` **size** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **size** = ``Vector3(0, 0, 0)`` :ref:`🔗` -Size from :ref:`position` to :ref:`end`. Typically, all components are positive. +The bounding box's width, height, and depth starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -If the size is negative, you can use :ref:`abs` to fix it. +\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Godot assume that the :ref:`position` is the bottom-left-back corner, and the :ref:`end` is the top-right-forward corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. .. rst-class:: classref-section-separator @@ -204,9 +204,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`AABB` **AABB** **(** **)** +:ref:`AABB` **AABB**\ (\ ) :ref:`🔗` -Constructs a default-initialized **AABB** with default (zero) values of :ref:`position` and :ref:`size`. +Constructs an **AABB** with its :ref:`position` and :ref:`size` set to :ref:`Vector3.ZERO`. .. rst-class:: classref-item-separator @@ -214,7 +214,7 @@ Constructs a default-initialized **AABB** with default (zero) values of :ref:`po .. rst-class:: classref-constructor -:ref:`AABB` **AABB** **(** :ref:`AABB` from **)** +:ref:`AABB` **AABB**\ (\ from\: :ref:`AABB`\ ) Constructs an **AABB** as a copy of the given **AABB**. @@ -224,9 +224,9 @@ Constructs an **AABB** as a copy of the given **AABB**. .. rst-class:: classref-constructor -:ref:`AABB` **AABB** **(** :ref:`Vector3` position, :ref:`Vector3` size **)** +:ref:`AABB` **AABB**\ (\ position\: :ref:`Vector3`, size\: :ref:`Vector3`\ ) -Constructs an **AABB** from a position and size. +Constructs an **AABB** by ``position`` and ``size``. .. rst-class:: classref-section-separator @@ -241,9 +241,30 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AABB` **abs** **(** **)** |const| +:ref:`AABB` **abs**\ (\ ) |const| :ref:`🔗` -Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. +Returns an **AABB** equivalent to this bounding box, with its width, height, and depth modified to be non-negative values. + + +.. tabs:: + + .. code-tab:: gdscript + + var box = AABB(Vector3(5, 0, 5), Vector3(-20, -10, -5)) + var absolute = box.abs() + print(absolute.position) # Prints (-15, -10, 0) + print(absolute.size) # Prints (20, 10, 5) + + .. code-tab:: csharp + + var box = new Aabb(new Vector3(5, 0, 5), new Vector3(-20, -10, -5)); + var absolute = box.Abs(); + GD.Print(absolute.Position); // Prints (-15, -10, 0) + GD.Print(absolute.Size); // Prints (20, 10, 5) + + + +\ **Note:** It's recommended to use this method when :ref:`size` is negative, as most other methods in Godot assume that the :ref:`size`'s components are greater than ``0``. .. rst-class:: classref-item-separator @@ -253,9 +274,34 @@ Returns an AABB with equivalent position and size, modified so that the most-neg .. rst-class:: classref-method -:ref:`bool` **encloses** **(** :ref:`AABB` with **)** |const| +:ref:`bool` **encloses**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`🔗` + +Returns ``true`` if this bounding box *completely* encloses the ``with`` box. The edges of both boxes are included. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4)) + var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3)) + var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8)) + + print(a.encloses(a)) # Prints true + print(a.encloses(b)) # Prints true + print(a.encloses(c)) # Prints false + + .. code-tab:: csharp + + var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4)); + var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3)); + var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8)); + + GD.Print(a.Encloses(a)); // Prints True + GD.Print(a.Encloses(b)); // Prints True + GD.Print(a.Encloses(c)); // Prints False + -Returns ``true`` if this **AABB** completely encloses another one. .. rst-class:: classref-item-separator @@ -265,28 +311,36 @@ Returns ``true`` if this **AABB** completely encloses another one. .. rst-class:: classref-method -:ref:`AABB` **expand** **(** :ref:`Vector3` to_point **)** |const| +:ref:`AABB` **expand**\ (\ to_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` -Returns a copy of this **AABB** expanded to include a given point. - -\ **Example:**\ +Returns a copy of this bounding box expanded to align the edges with the given ``to_point``, if necessary. .. tabs:: .. code-tab:: gdscript - # position (-3, 2, 0), size (1, 1, 1) - var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1)) - # position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2) - var box2 = box.expand(Vector3(0, -1, 2)) + var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5)) + + box = box.expand(Vector3(10, 0, 0)) + print(box.position) # Prints (0, 0, 0) + print(box.size) # Prints (10, 2, 5) + + box = box.expand(Vector3(-5, 0, 5)) + print(box.position) # Prints (-5, 0, 0) + print(box.size) # Prints (15, 2, 5) .. code-tab:: csharp - // position (-3, 2, 0), size (1, 1, 1) - var box = new Aabb(new Vector3(-3, 2, 0), new Vector3(1, 1, 1)); - // position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2) - var box2 = box.Expand(new Vector3(0, -1, 2)); + var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5)); + + box = box.Expand(new Vector3(10, 0, 0)); + GD.Print(box.Position); // Prints (0, 0, 0) + GD.Print(box.Size); // Prints (10, 2, 5) + + box = box.Expand(new Vector3(-5, 0, 5)); + GD.Print(box.Position); // Prints (-5, 0, 0) + GD.Print(box.Size); // Prints (15, 2, 5) @@ -298,9 +352,9 @@ Returns a copy of this **AABB** expanded to include a given point. .. rst-class:: classref-method -:ref:`Vector3` **get_center** **(** **)** |const| +:ref:`Vector3` **get_center**\ (\ ) |const| :ref:`🔗` -Returns the center of the **AABB**, which is equal to :ref:`position` + (:ref:`size` / 2). +Returns the center point of the bounding box. This is the same as ``position + (size / 2.0)``. .. rst-class:: classref-item-separator @@ -310,9 +364,9 @@ Returns the center of the **AABB**, which is equal to :ref:`position` **get_endpoint** **(** :ref:`int` idx **)** |const| +:ref:`Vector3` **get_endpoint**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` -Gets the position of the 8 endpoints of the **AABB** in space. +Returns the position of one of the 8 vertices that compose this bounding box. With a ``idx`` of ``0`` this is the same as :ref:`position`, and a ``idx`` of ``7`` is the same as :ref:`end`. .. rst-class:: classref-item-separator @@ -322,9 +376,32 @@ Gets the position of the 8 endpoints of the **AABB** in space. .. rst-class:: classref-method -:ref:`Vector3` **get_longest_axis** **(** **)** |const| +:ref:`Vector3` **get_longest_axis**\ (\ ) |const| :ref:`🔗` + +Returns the longest normalized axis of this bounding box's :ref:`size`, as a :ref:`Vector3` (:ref:`Vector3.RIGHT`, :ref:`Vector3.UP`, or :ref:`Vector3.BACK`). + + +.. tabs:: + + .. code-tab:: gdscript + + var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8)) + + print(box.get_longest_axis()) # Prints (0, 0, 1) + print(box.get_longest_axis_index()) # Prints 2 + print(box.get_longest_axis_size()) # Prints 8 + + .. code-tab:: csharp + + var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8)); + + GD.Print(box.GetLongestAxis()); // Prints (0, 0, 1) + GD.Print(box.GetLongestAxisIndex()); // Prints 2 + GD.Print(box.GetLongestAxisSize()); // Prints 8 + -Returns the normalized longest axis of the **AABB**. + +See also :ref:`get_longest_axis_index` and :ref:`get_longest_axis_size`. .. rst-class:: classref-item-separator @@ -334,9 +411,11 @@ Returns the normalized longest axis of the **AABB**. .. rst-class:: classref-method -:ref:`int` **get_longest_axis_index** **(** **)** |const| +:ref:`int` **get_longest_axis_index**\ (\ ) |const| :ref:`🔗` + +Returns the index to the longest axis of this bounding box's :ref:`size` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). -Returns the index of the longest axis of the **AABB** (according to :ref:`Vector3`'s ``AXIS_*`` constants). +For an example, see :ref:`get_longest_axis`. .. rst-class:: classref-item-separator @@ -346,9 +425,11 @@ Returns the index of the longest axis of the **AABB** (according to :ref:`Vector .. rst-class:: classref-method -:ref:`float` **get_longest_axis_size** **(** **)** |const| +:ref:`float` **get_longest_axis_size**\ (\ ) |const| :ref:`🔗` + +Returns the longest dimension of this bounding box's :ref:`size`. -Returns the scalar length of the longest axis of the **AABB**. +For an example, see :ref:`get_longest_axis`. .. rst-class:: classref-item-separator @@ -358,9 +439,32 @@ Returns the scalar length of the longest axis of the **AABB**. .. rst-class:: classref-method -:ref:`Vector3` **get_shortest_axis** **(** **)** |const| +:ref:`Vector3` **get_shortest_axis**\ (\ ) |const| :ref:`🔗` -Returns the normalized shortest axis of the **AABB**. +Returns the shortest normaalized axis of this bounding box's :ref:`size`, as a :ref:`Vector3` (:ref:`Vector3.RIGHT`, :ref:`Vector3.UP`, or :ref:`Vector3.BACK`). + + +.. tabs:: + + .. code-tab:: gdscript + + var box = AABB(Vector3(0, 0, 0), Vector3(2, 4, 8)) + + print(box.get_shortest_axis()) # Prints (1, 0, 0) + print(box.get_shortest_axis_index()) # Prints 0 + print(box.get_shortest_axis_size()) # Prints 2 + + .. code-tab:: csharp + + var box = new Aabb(new Vector3(0, 0, 0), new Vector3(2, 4, 8)); + + GD.Print(box.GetShortestAxis()); // Prints (1, 0, 0) + GD.Print(box.GetShortestAxisIndex()); // Prints 0 + GD.Print(box.GetShortestAxisSize()); // Prints 2 + + + +See also :ref:`get_shortest_axis_index` and :ref:`get_shortest_axis_size`. .. rst-class:: classref-item-separator @@ -370,9 +474,11 @@ Returns the normalized shortest axis of the **AABB**. .. rst-class:: classref-method -:ref:`int` **get_shortest_axis_index** **(** **)** |const| +:ref:`int` **get_shortest_axis_index**\ (\ ) |const| :ref:`🔗` -Returns the index of the shortest axis of the **AABB** (according to :ref:`Vector3`::AXIS\* enum). +Returns the index to the shortest axis of this bounding box's :ref:`size` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). + +For an example, see :ref:`get_shortest_axis`. .. rst-class:: classref-item-separator @@ -382,9 +488,11 @@ Returns the index of the shortest axis of the **AABB** (according to :ref:`Vecto .. rst-class:: classref-method -:ref:`float` **get_shortest_axis_size** **(** **)** |const| +:ref:`float` **get_shortest_axis_size**\ (\ ) |const| :ref:`🔗` + +Returns the shortest dimension of this bounding box's :ref:`size`. -Returns the scalar length of the shortest axis of the **AABB**. +For an example, see :ref:`get_shortest_axis`. .. rst-class:: classref-item-separator @@ -394,9 +502,9 @@ Returns the scalar length of the shortest axis of the **AABB**. .. rst-class:: classref-method -:ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** |const| +:ref:`Vector3` **get_support**\ (\ dir\: :ref:`Vector3`\ ) |const| :ref:`🔗` -Returns the support point in a given direction. This is useful for collision detection algorithms. +Returns the vertex's position of this bounding box that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms. .. rst-class:: classref-item-separator @@ -406,9 +514,9 @@ Returns the support point in a given direction. This is useful for collision det .. rst-class:: classref-method -:ref:`float` **get_volume** **(** **)** |const| +:ref:`float` **get_volume**\ (\ ) |const| :ref:`🔗` -Returns the volume of the **AABB**. +Returns the bounding box's volume. This is equivalent to ``size.x * size.y * size.z``. See also :ref:`has_volume`. .. rst-class:: classref-item-separator @@ -418,9 +526,34 @@ Returns the volume of the **AABB**. .. rst-class:: classref-method -:ref:`AABB` **grow** **(** :ref:`float` by **)** |const| +:ref:`AABB` **grow**\ (\ by\: :ref:`float`\ ) |const| :ref:`🔗` + +Returns a copy of this bounding box extended on all sides by the given amount ``by``. A negative amount shrinks the box instead. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4) + print(a.position) # Prints (0, 0, 0) + print(a.size) # Prints (16, 16, 16) + + var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2) + print(b.position) # Prints (-2, -2, -2) + print(b.size) # Prints (12, 8, 6) + + .. code-tab:: csharp + + var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4); + GD.Print(a.Position); // Prints (0, 0, 0) + GD.Print(a.Size); // Prints (16, 16, 16) + + var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2); + GD.Print(b.Position); // Prints (-2, -2, -2) + GD.Print(b.Size); // Prints (12, 8, 6) + -Returns a copy of the **AABB** grown a given number of units towards all the sides. .. rst-class:: classref-item-separator @@ -430,11 +563,11 @@ Returns a copy of the **AABB** grown a given number of units towards all the sid .. rst-class:: classref-method -:ref:`bool` **has_point** **(** :ref:`Vector3` point **)** |const| +:ref:`bool` **has_point**\ (\ point\: :ref:`Vector3`\ ) |const| :ref:`🔗` -Returns ``true`` if the **AABB** contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks. +Returns ``true`` if the bounding box contains the given ``point``. By convention, points exactly on the right, top, and front sides are **not** included. -\ **Note:** This method is not reliable for **AABB** with a *negative size*. Use :ref:`abs` to get a positive sized equivalent **AABB** to check for contained points. +\ **Note:** This method is not reliable for **AABB** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid bounding box. .. rst-class:: classref-item-separator @@ -444,9 +577,9 @@ Returns ``true`` if the **AABB** contains a point. Points on the faces of the AA .. rst-class:: classref-method -:ref:`bool` **has_surface** **(** **)** |const| +:ref:`bool` **has_surface**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if the **AABB** has a surface or a length, and ``false`` if the **AABB** is empty (all components of :ref:`size` are zero or negative). +Returns ``true`` if this bounding box has a surface or a length, that is, at least one component of :ref:`size` is greater than ``0``. Otherwise, returns ``false``. .. rst-class:: classref-item-separator @@ -456,9 +589,9 @@ Returns ``true`` if the **AABB** has a surface or a length, and ``false`` if the .. rst-class:: classref-method -:ref:`bool` **has_volume** **(** **)** |const| +:ref:`bool` **has_volume**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if the **AABB** has a volume, and ``false`` if the **AABB** is flat, empty, or has a negative :ref:`size`. +Returns ``true`` if this bounding box's width, height, and depth are all positive. See also :ref:`get_volume`. .. rst-class:: classref-item-separator @@ -468,9 +601,34 @@ Returns ``true`` if the **AABB** has a volume, and ``false`` if the **AABB** is .. rst-class:: classref-method -:ref:`AABB` **intersection** **(** :ref:`AABB` with **)** |const| +:ref:`AABB` **intersection**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`🔗` + +Returns the intersection between this bounding box and ``with``. If the boxes do not intersect, returns an empty **AABB**. If the boxes intersect at the edge, returns a flat **AABB** with no volume (see :ref:`has_surface` and :ref:`has_volume`). + -Returns the intersection between two **AABB**. An empty AABB (size ``(0, 0, 0)``) is returned on failure. +.. tabs:: + + .. code-tab:: gdscript + + var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8)) + var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4)) + + var intersection = box1.intersection(box2) + print(intersection.position) # Prints (2, 0, 2) + print(intersection.size) # Prints (3, 2, 4) + + .. code-tab:: csharp + + var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8)); + var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4)); + + var intersection = box1.Intersection(box2); + GD.Print(intersection.Position); // Prints (2, 0, 2) + GD.Print(intersection.Size); // Prints (3, 2, 4) + + + +\ **Note:** If you only need to know whether two bounding boxes are intersecting, use :ref:`intersects`, instead. .. rst-class:: classref-item-separator @@ -480,9 +638,9 @@ Returns the intersection between two **AABB**. An empty AABB (size ``(0, 0, 0)`` .. rst-class:: classref-method -:ref:`bool` **intersects** **(** :ref:`AABB` with **)** |const| +:ref:`bool` **intersects**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`🔗` -Returns ``true`` if the **AABB** overlaps with another. +Returns ``true`` if this bounding box overlaps with the box ``with``. The edges of both boxes are *always* excluded. .. rst-class:: classref-item-separator @@ -492,9 +650,9 @@ Returns ``true`` if the **AABB** overlaps with another. .. rst-class:: classref-method -:ref:`bool` **intersects_plane** **(** :ref:`Plane` plane **)** |const| +:ref:`bool` **intersects_plane**\ (\ plane\: :ref:`Plane`\ ) |const| :ref:`🔗` -Returns ``true`` if the **AABB** is on both sides of a plane. +Returns ``true`` if this bounding box is on both sides of the given ``plane``. .. rst-class:: classref-item-separator @@ -504,9 +662,11 @@ Returns ``true`` if the **AABB** is on both sides of a plane. .. rst-class:: classref-method -:ref:`Variant` **intersects_ray** **(** :ref:`Vector3` from, :ref:`Vector3` dir **)** |const| +:ref:`Variant` **intersects_ray**\ (\ from\: :ref:`Vector3`, dir\: :ref:`Vector3`\ ) |const| :ref:`🔗` -Returns the point of intersection of the given ray with this **AABB** or ``null`` if there is no intersection. Ray length is infinite. +Returns the first point where this bounding box and the given ray intersect, as a :ref:`Vector3`. If no intersection occurs, returns ``null``. + +The ray begin at ``from``, faces ``dir`` and extends towards infinity. .. rst-class:: classref-item-separator @@ -516,9 +676,11 @@ Returns the point of intersection of the given ray with this **AABB** or ``null` .. rst-class:: classref-method -:ref:`Variant` **intersects_segment** **(** :ref:`Vector3` from, :ref:`Vector3` to **)** |const| +:ref:`Variant` **intersects_segment**\ (\ from\: :ref:`Vector3`, to\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the first point where this bounding box and the given segment intersect, as a :ref:`Vector3`. If no intersection occurs, returns ``null``. -Returns the point of intersection between ``from`` and ``to`` with this **AABB** or ``null`` if there is no intersection. +The segment begins at ``from`` and ends at ``to``. .. rst-class:: classref-item-separator @@ -528,9 +690,9 @@ Returns the point of intersection between ``from`` and ``to`` with this **AABB** .. rst-class:: classref-method -:ref:`bool` **is_equal_approx** **(** :ref:`AABB` aabb **)** |const| +:ref:`bool` **is_equal_approx**\ (\ aabb\: :ref:`AABB`\ ) |const| :ref:`🔗` -Returns ``true`` if this **AABB** and ``aabb`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -540,9 +702,9 @@ Returns ``true`` if this **AABB** and ``aabb`` are approximately equal, by calli .. rst-class:: classref-method -:ref:`bool` **is_finite** **(** **)** |const| +:ref:`bool` **is_finite**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if this **AABB** is finite, by calling :ref:`@GlobalScope.is_finite` on each component. +Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -552,9 +714,9 @@ Returns ``true`` if this **AABB** is finite, by calling :ref:`@GlobalScope.is_fi .. rst-class:: classref-method -:ref:`AABB` **merge** **(** :ref:`AABB` with **)** |const| +:ref:`AABB` **merge**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`🔗` -Returns a larger **AABB** that contains both this **AABB** and ``with``. +Returns an **AABB** that encloses both this bounding box and ``with`` around the edges. See also :ref:`encloses`. .. rst-class:: classref-section-separator @@ -569,9 +731,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`AABB` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`AABB`\ ) :ref:`🔗` -Returns ``true`` if the AABBs are not equal. +Returns ``true`` if the :ref:`position` or :ref:`size` of both bounding boxes are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. @@ -583,9 +745,13 @@ Returns ``true`` if the AABBs are not equal. .. rst-class:: classref-operator -:ref:`AABB` **operator *** **(** :ref:`Transform3D` right **)** +:ref:`AABB` **operator ***\ (\ right\: :ref:`Transform3D`\ ) :ref:`🔗` + +Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse`. -Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse`. .. rst-class:: classref-item-separator @@ -595,9 +761,9 @@ Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` **operator ==** **(** :ref:`AABB` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`AABB`\ ) :ref:`🔗` -Returns ``true`` if the AABBs are exactly equal. +Returns ``true`` if both :ref:`position` and :ref:`size` of the bounding boxes are exactly equal, respectively. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. @@ -608,3 +774,4 @@ Returns ``true`` if the AABBs are exactly equal. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 93961f13b83..2b2c4273d7f 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -31,27 +31,29 @@ Properties .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_close_on_escape` | ``true`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | :ref:`dialog_text` | ``""`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ok_button_text` | ``"OK"`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_close_on_escape` | ``true`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`dialog_text` | ``""`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | keep_title_visible | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ok_button_text` | ``"OK"`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -61,19 +63,19 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Button` | :ref:`add_button` **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Button` | :ref:`add_cancel_button` **(** :ref:`String` name **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Label` | :ref:`get_label` **(** **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Button` | :ref:`get_ok_button` **(** **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_text_enter` **(** :ref:`Control` line_edit **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_button` **(** :ref:`Control` button **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`add_button`\ (\ text\: :ref:`String`, right\: :ref:`bool` = false, action\: :ref:`String` = ""\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`add_cancel_button`\ (\ name\: :ref:`String`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Label` | :ref:`get_label`\ (\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`get_ok_button`\ (\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_text_enter`\ (\ line_edit\: :ref:`LineEdit`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_button`\ (\ button\: :ref:`Button`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -83,6 +85,10 @@ Theme Properties .. table:: :widths: auto + +---------------------------------+---------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`buttons_min_height` | ``0`` | + +---------------------------------+---------------------------------------------------------------------------------+--------+ + | :ref:`int` | :ref:`buttons_min_width` | ``0`` | +---------------------------------+---------------------------------------------------------------------------------+--------+ | :ref:`int` | :ref:`buttons_separation` | ``10`` | +---------------------------------+---------------------------------------------------------------------------------+--------+ @@ -102,7 +108,7 @@ Signals .. rst-class:: classref-signal -**canceled** **(** **)** +**canceled**\ (\ ) :ref:`🔗` Emitted when the dialog is closed or the button created with :ref:`add_cancel_button` is pressed. @@ -114,7 +120,7 @@ Emitted when the dialog is closed or the button created with :ref:`add_cancel_bu .. rst-class:: classref-signal -**confirmed** **(** **)** +**confirmed**\ (\ ) :ref:`🔗` Emitted when the dialog is accepted, i.e. the OK button is pressed. @@ -126,7 +132,7 @@ Emitted when the dialog is accepted, i.e. the OK button is pressed. .. rst-class:: classref-signal -**custom_action** **(** :ref:`StringName` action **)** +**custom_action**\ (\ action\: :ref:`StringName`\ ) :ref:`🔗` Emitted when a custom button is pressed. See :ref:`add_button`. @@ -143,12 +149,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **dialog_autowrap** = ``false`` +:ref:`bool` **dialog_autowrap** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autowrap** **(** :ref:`bool` value **)** -- :ref:`bool` **has_autowrap** **(** **)** +- |void| **set_autowrap**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_autowrap**\ (\ ) Sets autowrapping for the text in the dialog. @@ -160,12 +166,12 @@ Sets autowrapping for the text in the dialog. .. rst-class:: classref-property -:ref:`bool` **dialog_close_on_escape** = ``true`` +:ref:`bool` **dialog_close_on_escape** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_close_on_escape** **(** :ref:`bool` value **)** -- :ref:`bool` **get_close_on_escape** **(** **)** +- |void| **set_close_on_escape**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_close_on_escape**\ (\ ) If ``true``, the dialog will be hidden when the escape key (:ref:`@GlobalScope.KEY_ESCAPE`) is pressed. @@ -177,12 +183,12 @@ If ``true``, the dialog will be hidden when the escape key (:ref:`@GlobalScope.K .. rst-class:: classref-property -:ref:`bool` **dialog_hide_on_ok** = ``true`` +:ref:`bool` **dialog_hide_on_ok** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_hide_on_ok** **(** :ref:`bool` value **)** -- :ref:`bool` **get_hide_on_ok** **(** **)** +- |void| **set_hide_on_ok**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_hide_on_ok**\ (\ ) If ``true``, the dialog is hidden when the OK button is pressed. You can set it to ``false`` if you want to do e.g. input validation when receiving the :ref:`confirmed` signal, and handle hiding the dialog in your own logic. @@ -196,12 +202,12 @@ If ``true``, the dialog is hidden when the OK button is pressed. You can set it .. rst-class:: classref-property -:ref:`String` **dialog_text** = ``""`` +:ref:`String` **dialog_text** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String` value **)** -- :ref:`String` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_text**\ (\ ) The text displayed by the dialog. @@ -213,12 +219,12 @@ The text displayed by the dialog. .. rst-class:: classref-property -:ref:`String` **ok_button_text** = ``"OK"`` +:ref:`String` **ok_button_text** = ``"OK"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ok_button_text** **(** :ref:`String` value **)** -- :ref:`String` **get_ok_button_text** **(** **)** +- |void| **set_ok_button_text**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_ok_button_text**\ (\ ) The text displayed by the OK button (see :ref:`get_ok_button`). @@ -235,7 +241,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Button` **add_button** **(** :ref:`String` text, :ref:`bool` right=false, :ref:`String` action="" **)** +:ref:`Button` **add_button**\ (\ text\: :ref:`String`, right\: :ref:`bool` = false, action\: :ref:`String` = ""\ ) :ref:`🔗` Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. ``action`` will be passed to the :ref:`custom_action` signal when pressed. @@ -251,7 +257,7 @@ You can use :ref:`remove_button` method .. rst-class:: classref-method -:ref:`Button` **add_cancel_button** **(** :ref:`String` name **)** +:ref:`Button` **add_cancel_button**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Adds a button with label ``name`` and a cancel action to the dialog and returns the created button. @@ -265,7 +271,7 @@ You can use :ref:`remove_button` method .. rst-class:: classref-method -:ref:`Label` **get_label** **(** **)** +:ref:`Label` **get_label**\ (\ ) :ref:`🔗` Returns the label used for built-in text. @@ -279,7 +285,7 @@ Returns the label used for built-in text. .. rst-class:: classref-method -:ref:`Button` **get_ok_button** **(** **)** +:ref:`Button` **get_ok_button**\ (\ ) :ref:`🔗` Returns the OK :ref:`Button` instance. @@ -293,7 +299,7 @@ Returns the OK :ref:`Button` instance. .. rst-class:: classref-method -void **register_text_enter** **(** :ref:`Control` line_edit **)** +|void| **register_text_enter**\ (\ line_edit\: :ref:`LineEdit`\ ) :ref:`🔗` Registers a :ref:`LineEdit` in the dialog. When the enter key is pressed, the dialog will be accepted. @@ -305,7 +311,7 @@ Registers a :ref:`LineEdit` in the dialog. When the enter key is .. rst-class:: classref-method -void **remove_button** **(** :ref:`Control` button **)** +|void| **remove_button**\ (\ button\: :ref:`Button`\ ) :ref:`🔗` Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button` added with :ref:`add_button` or :ref:`add_cancel_button` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action` or :ref:`canceled` signals. @@ -318,11 +324,35 @@ Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``butt Theme Property Descriptions --------------------------- +.. _class_AcceptDialog_theme_constant_buttons_min_height: + +.. rst-class:: classref-themeproperty + +:ref:`int` **buttons_min_height** = ``0`` :ref:`🔗` + +The minimum height of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AcceptDialog_theme_constant_buttons_min_width: + +.. rst-class:: classref-themeproperty + +:ref:`int` **buttons_min_width** = ``0`` :ref:`🔗` + +The minimum width of each button in the bottom row (such as OK/Cancel) in pixels. This can be increased to make buttons with short texts easier to click/tap. + +.. rst-class:: classref-item-separator + +---- + .. _class_AcceptDialog_theme_constant_buttons_separation: .. rst-class:: classref-themeproperty -:ref:`int` **buttons_separation** = ``10`` +:ref:`int` **buttons_separation** = ``10`` :ref:`🔗` The size of the vertical space between the dialog's content and the button row. @@ -334,7 +364,7 @@ The size of the vertical space between the dialog's content and the button row. .. rst-class:: classref-themeproperty -:ref:`StyleBox` **panel** +:ref:`StyleBox` **panel** :ref:`🔗` The panel that fills the background of the window. @@ -345,3 +375,4 @@ The panel that fills the background of the window. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index b28ed7eddae..064fc6b0b32 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -104,15 +104,15 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`finish` **(** **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`get_iv_state` **(** **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`start` **(** :ref:`Mode` mode, :ref:`PackedByteArray` key, :ref:`PackedByteArray` iv=PackedByteArray() **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`update` **(** :ref:`PackedByteArray` src **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`finish`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`get_iv_state`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start`\ (\ mode\: :ref:`Mode`, key\: :ref:`PackedByteArray`, iv\: :ref:`PackedByteArray` = PackedByteArray()\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`update`\ (\ src\: :ref:`PackedByteArray`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -127,7 +127,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗` .. _class_AESContext_constant_MODE_ECB_ENCRYPT: @@ -182,7 +182,7 @@ Method Descriptions .. rst-class:: classref-method -void **finish** **(** **)** +|void| **finish**\ (\ ) :ref:`🔗` Close this AES context so it can be started again. See :ref:`start`. @@ -194,7 +194,7 @@ Close this AES context so it can be started again. See :ref:`start` **get_iv_state** **(** **)** +:ref:`PackedByteArray` **get_iv_state**\ (\ ) :ref:`🔗` Get the current IV state for this context (IV gets updated when calling :ref:`update`). You normally don't need this function. @@ -208,7 +208,7 @@ Get the current IV state for this context (IV gets updated when calling :ref:`up .. rst-class:: classref-method -:ref:`Error` **start** **(** :ref:`Mode` mode, :ref:`PackedByteArray` key, :ref:`PackedByteArray` iv=PackedByteArray() **)** +:ref:`Error` **start**\ (\ mode\: :ref:`Mode`, key\: :ref:`PackedByteArray`, iv\: :ref:`PackedByteArray` = PackedByteArray()\ ) :ref:`🔗` Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes must always be provided, while an ``iv`` (initialization vector) of exactly 16 bytes, is only needed when ``mode`` is either :ref:`MODE_CBC_ENCRYPT` or :ref:`MODE_CBC_DECRYPT`. @@ -220,7 +220,7 @@ Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes .. rst-class:: classref-method -:ref:`PackedByteArray` **update** **(** :ref:`PackedByteArray` src **)** +:ref:`PackedByteArray` **update**\ (\ src\: :ref:`PackedByteArray`\ ) :ref:`🔗` Run the desired operation for this AES context. Will return a :ref:`PackedByteArray` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start` for mode of operation. @@ -233,3 +233,4 @@ Run the desired operation for this AES context. Will return a :ref:`PackedByteAr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index 1d1ade07434..98c5ae61472 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -19,7 +19,7 @@ A 2D physics body that can't be moved by external forces. When moved manually, i Description ----------- -An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D`. +An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationMixer`\ s (with :ref:`AnimationMixer.callback_mode_process` set to :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`), and :ref:`RemoteTransform2D`. When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **sync_to_physics** = ``true`` +:ref:`bool` **sync_to_physics** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sync_to_physics** **(** :ref:`bool` value **)** -- :ref:`bool` **is_sync_to_physics_enabled** **(** **)** +- |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide`. @@ -64,3 +64,4 @@ If ``true``, the body's movement will be synchronized to the physics frame. This .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index fbb83dc160c..9d1cd5e624b 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -19,7 +19,7 @@ A 3D physics body that can't be moved by external forces. When moved manually, i Description ----------- -An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D`. +An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationMixer`\ s (with :ref:`AnimationMixer.callback_mode_process` set to :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`), and :ref:`RemoteTransform3D`. When **AnimatableBody3D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. @@ -28,11 +28,11 @@ When **AnimatableBody3D** is moved, its linear and angular velocity are estimate Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -59,12 +59,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **sync_to_physics** = ``true`` +:ref:`bool` **sync_to_physics** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sync_to_physics** **(** :ref:`bool` value **)** -- :ref:`bool` **is_sync_to_physics_enabled** **(** **)** +- |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide`. @@ -75,3 +75,4 @@ If ``true``, the body's movement will be synchronized to the physics frame. This .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 14694f60e1b..8c909164789 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -28,7 +28,7 @@ Tutorials - :doc:`2D Sprite animation <../tutorials/2d/2d_sprite_animation>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group @@ -68,21 +68,21 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playing_speed` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pause` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`StringName` name=&"", :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_backwards` **(** :ref:`StringName` name=&"" **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frame_and_progress` **(** :ref:`int` frame, :ref:`float` progress **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playing_speed`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pause`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_backwards`\ (\ name\: :ref:`StringName` = &""\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_and_progress`\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -97,7 +97,7 @@ Signals .. rst-class:: classref-signal -**animation_changed** **(** **)** +**animation_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`animation` changes. @@ -109,10 +109,12 @@ Emitted when :ref:`animation` changes .. rst-class:: classref-signal -**animation_finished** **(** **)** +**animation_finished**\ (\ ) :ref:`🔗` Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. +\ **Note:** This signal is not emitted if an animation is looping. + .. rst-class:: classref-item-separator ---- @@ -121,7 +123,7 @@ Emitted when the animation reaches the end, or the start if it is played in reve .. rst-class:: classref-signal -**animation_looped** **(** **)** +**animation_looped**\ (\ ) :ref:`🔗` Emitted when the animation loops. @@ -133,7 +135,7 @@ Emitted when the animation loops. .. rst-class:: classref-signal -**frame_changed** **(** **)** +**frame_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`frame` changes. @@ -145,7 +147,7 @@ Emitted when :ref:`frame` changes. .. rst-class:: classref-signal -**sprite_frames_changed** **(** **)** +**sprite_frames_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`sprite_frames` changes. @@ -162,12 +164,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName` **animation** = ``&"default"`` +:ref:`StringName` **animation** = ``&"default"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_animation** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_animation** **(** **)** +- |void| **set_animation**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_animation**\ (\ ) The current animation from the :ref:`sprite_frames` resource. If this value is changed, the :ref:`frame` counter and the :ref:`frame_progress` are reset. @@ -179,12 +181,12 @@ The current animation from the :ref:`sprite_frames` **autoplay** = ``""`` +:ref:`String` **autoplay** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`String` value **)** -- :ref:`String` **get_autoplay** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_autoplay**\ (\ ) The key of the animation to play when the scene loads. @@ -196,15 +198,17 @@ The key of the animation to play when the scene loads. .. rst-class:: classref-property -:ref:`bool` **centered** = ``true`` +:ref:`bool` **centered** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_centered** **(** :ref:`bool` value **)** -- :ref:`bool` **is_centered** **(** **)** +- |void| **set_centered**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_centered**\ (\ ) If ``true``, texture will be centered. +\ **Note:** For games with a pixel art aesthetic, textures may appear deformed when centered. This is caused by their position being between pixels. To prevent this, set this property to ``false``, or consider enabling :ref:`ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel` and :ref:`ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel`. + .. rst-class:: classref-item-separator ---- @@ -213,12 +217,12 @@ If ``true``, texture will be centered. .. rst-class:: classref-property -:ref:`bool` **flip_h** = ``false`` +:ref:`bool` **flip_h** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool` value **)** -- :ref:`bool` **is_flipped_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_flipped_h**\ (\ ) If ``true``, texture is flipped horizontally. @@ -230,12 +234,12 @@ If ``true``, texture is flipped horizontally. .. rst-class:: classref-property -:ref:`bool` **flip_v** = ``false`` +:ref:`bool` **flip_v** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool` value **)** -- :ref:`bool` **is_flipped_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_flipped_v**\ (\ ) If ``true``, texture is flipped vertically. @@ -247,12 +251,12 @@ If ``true``, texture is flipped vertically. .. rst-class:: classref-property -:ref:`int` **frame** = ``0`` +:ref:`int` **frame** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frame** **(** :ref:`int` value **)** -- :ref:`int` **get_frame** **(** **)** +- |void| **set_frame**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_frame**\ (\ ) The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. @@ -264,12 +268,12 @@ The displayed animation frame's index. Setting this property also resets :ref:`f .. rst-class:: classref-property -:ref:`float` **frame_progress** = ``0.0`` +:ref:`float` **frame_progress** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frame_progress** **(** :ref:`float` value **)** -- :ref:`float` **get_frame_progress** **(** **)** +- |void| **set_frame_progress**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_frame_progress**\ (\ ) The progress value between ``0.0`` and ``1.0`` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from ``1.0`` to ``0.0``. @@ -281,12 +285,12 @@ The progress value between ``0.0`` and ``1.0`` until the current frame transitio .. rst-class:: classref-property -:ref:`Vector2` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_offset**\ (\ ) The texture's drawing offset. @@ -298,12 +302,12 @@ The texture's drawing offset. .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) The speed scaling ratio. For example, if this value is ``1``, then the animation plays at normal speed. If it's ``0.5``, then it plays at half speed. If it's ``2``, then it plays at double speed. @@ -317,12 +321,12 @@ If set to a negative value, the animation is played in reverse. If set to ``0``, .. rst-class:: classref-property -:ref:`SpriteFrames` **sprite_frames** +:ref:`SpriteFrames` **sprite_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sprite_frames** **(** :ref:`SpriteFrames` value **)** -- :ref:`SpriteFrames` **get_sprite_frames** **(** **)** +- |void| **set_sprite_frames**\ (\ value\: :ref:`SpriteFrames`\ ) +- :ref:`SpriteFrames` **get_sprite_frames**\ (\ ) The :ref:`SpriteFrames` resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the :ref:`SpriteFrames` resource. @@ -339,7 +343,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_playing_speed** **(** **)** |const| +:ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`🔗` Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. @@ -353,7 +357,7 @@ Returns a negative value if the current animation is playing backwards. .. rst-class:: classref-method -:ref:`bool` **is_playing** **(** **)** |const| +:ref:`bool` **is_playing**\ (\ ) |const| :ref:`🔗` Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale` and/or ``custom_speed`` are ``0``). @@ -365,7 +369,7 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale .. rst-class:: classref-method -void **pause** **(** **)** +|void| **pause**\ (\ ) :ref:`🔗` Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. @@ -379,7 +383,7 @@ See also :ref:`stop`. .. rst-class:: classref-method -void **play** **(** :ref:`StringName` name=&"", :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** +|void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`🔗` Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). @@ -393,7 +397,7 @@ If this method is called with that same animation ``name``, or with no ``name`` .. rst-class:: classref-method -void **play_backwards** **(** :ref:`StringName` name=&"" **)** +|void| **play_backwards**\ (\ name\: :ref:`StringName` = &""\ ) :ref:`🔗` Plays the animation with key ``name`` in reverse. @@ -407,7 +411,7 @@ This method is a shorthand for :ref:`play` w .. rst-class:: classref-method -void **set_frame_and_progress** **(** :ref:`int` frame, :ref:`float` progress **)** +|void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`🔗` The setter of :ref:`frame` resets the :ref:`frame_progress` to ``0.0`` implicitly, but this method avoids that. @@ -436,7 +440,7 @@ This is useful when you want to carry over the current :ref:`frame_progress` Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. @@ -447,3 +451,4 @@ Stops the currently playing animation. The animation position is reset to ``0`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 00d764ef917..46feb6c7589 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -58,21 +58,21 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playing_speed` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pause` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`StringName` name=&"", :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_backwards` **(** :ref:`StringName` name=&"" **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frame_and_progress` **(** :ref:`int` frame, :ref:`float` progress **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playing_speed`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pause`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_backwards`\ (\ name\: :ref:`StringName` = &""\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_and_progress`\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,7 +87,7 @@ Signals .. rst-class:: classref-signal -**animation_changed** **(** **)** +**animation_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`animation` changes. @@ -99,10 +99,12 @@ Emitted when :ref:`animation` changes .. rst-class:: classref-signal -**animation_finished** **(** **)** +**animation_finished**\ (\ ) :ref:`🔗` Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. +\ **Note:** This signal is not emitted if an animation is looping. + .. rst-class:: classref-item-separator ---- @@ -111,7 +113,7 @@ Emitted when the animation reaches the end, or the start if it is played in reve .. rst-class:: classref-signal -**animation_looped** **(** **)** +**animation_looped**\ (\ ) :ref:`🔗` Emitted when the animation loops. @@ -123,7 +125,7 @@ Emitted when the animation loops. .. rst-class:: classref-signal -**frame_changed** **(** **)** +**frame_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`frame` changes. @@ -135,7 +137,7 @@ Emitted when :ref:`frame` changes. .. rst-class:: classref-signal -**sprite_frames_changed** **(** **)** +**sprite_frames_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`sprite_frames` changes. @@ -152,12 +154,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName` **animation** = ``&"default"`` +:ref:`StringName` **animation** = ``&"default"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_animation** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_animation** **(** **)** +- |void| **set_animation**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_animation**\ (\ ) The current animation from the :ref:`sprite_frames` resource. If this value is changed, the :ref:`frame` counter and the :ref:`frame_progress` are reset. @@ -169,12 +171,12 @@ The current animation from the :ref:`sprite_frames` **autoplay** = ``""`` +:ref:`String` **autoplay** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`String` value **)** -- :ref:`String` **get_autoplay** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_autoplay**\ (\ ) The key of the animation to play when the scene loads. @@ -186,12 +188,12 @@ The key of the animation to play when the scene loads. .. rst-class:: classref-property -:ref:`int` **frame** = ``0`` +:ref:`int` **frame** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frame** **(** :ref:`int` value **)** -- :ref:`int` **get_frame** **(** **)** +- |void| **set_frame**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_frame**\ (\ ) The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. @@ -203,12 +205,12 @@ The displayed animation frame's index. Setting this property also resets :ref:`f .. rst-class:: classref-property -:ref:`float` **frame_progress** = ``0.0`` +:ref:`float` **frame_progress** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frame_progress** **(** :ref:`float` value **)** -- :ref:`float` **get_frame_progress** **(** **)** +- |void| **set_frame_progress**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_frame_progress**\ (\ ) The progress value between ``0.0`` and ``1.0`` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from ``1.0`` to ``0.0``. @@ -220,12 +222,12 @@ The progress value between ``0.0`` and ``1.0`` until the current frame transitio .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) The speed scaling ratio. For example, if this value is ``1``, then the animation plays at normal speed. If it's ``0.5``, then it plays at half speed. If it's ``2``, then it plays at double speed. @@ -239,12 +241,12 @@ If set to a negative value, the animation is played in reverse. If set to ``0``, .. rst-class:: classref-property -:ref:`SpriteFrames` **sprite_frames** +:ref:`SpriteFrames` **sprite_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sprite_frames** **(** :ref:`SpriteFrames` value **)** -- :ref:`SpriteFrames` **get_sprite_frames** **(** **)** +- |void| **set_sprite_frames**\ (\ value\: :ref:`SpriteFrames`\ ) +- :ref:`SpriteFrames` **get_sprite_frames**\ (\ ) The :ref:`SpriteFrames` resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the :ref:`SpriteFrames` resource. @@ -261,7 +263,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_playing_speed** **(** **)** |const| +:ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`🔗` Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. @@ -275,7 +277,7 @@ Returns a negative value if the current animation is playing backwards. .. rst-class:: classref-method -:ref:`bool` **is_playing** **(** **)** |const| +:ref:`bool` **is_playing**\ (\ ) |const| :ref:`🔗` Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale` and/or ``custom_speed`` are ``0``). @@ -287,7 +289,7 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale .. rst-class:: classref-method -void **pause** **(** **)** +|void| **pause**\ (\ ) :ref:`🔗` Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. @@ -301,7 +303,7 @@ See also :ref:`stop`. .. rst-class:: classref-method -void **play** **(** :ref:`StringName` name=&"", :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** +|void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`🔗` Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). @@ -315,7 +317,7 @@ If this method is called with that same animation ``name``, or with no ``name`` .. rst-class:: classref-method -void **play_backwards** **(** :ref:`StringName` name=&"" **)** +|void| **play_backwards**\ (\ name\: :ref:`StringName` = &""\ ) :ref:`🔗` Plays the animation with key ``name`` in reverse. @@ -329,7 +331,7 @@ This method is a shorthand for :ref:`play` w .. rst-class:: classref-method -void **set_frame_and_progress** **(** :ref:`int` frame, :ref:`float` progress **)** +|void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`🔗` The setter of :ref:`frame` resets the :ref:`frame_progress` to ``0.0`` implicitly, but this method avoids that. @@ -358,7 +360,7 @@ This is useful when you want to carry over the current :ref:`frame_progress` Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. @@ -369,3 +371,4 @@ Stops the currently playing animation. The animation position is reset to ``0`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index 32877b2fa79..da38191a1f6 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -10,6 +10,8 @@ AnimatedTexture =============== +**Deprecated:** This class does not work properly in current versions and may be removed in the future. There is currently no equivalent workaround. + **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Proxy texture for simple frame-based animations. @@ -29,8 +31,6 @@ The playback of the animation is controlled by the :ref:`speed_scale` | :ref:`get_frame_duration` **(** :ref:`int` frame **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_frame_texture` **(** :ref:`int` frame **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frame_duration` **(** :ref:`int` frame, :ref:`float` duration **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frame_texture` **(** :ref:`int` frame, :ref:`Texture2D` texture **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_frame_duration`\ (\ frame\: :ref:`int`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_frame_texture`\ (\ frame\: :ref:`int`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_duration`\ (\ frame\: :ref:`int`, duration\: :ref:`float`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_texture`\ (\ frame\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,7 +84,7 @@ Constants .. rst-class:: classref-constant -**MAX_FRAMES** = ``256`` +**MAX_FRAMES** = ``256`` :ref:`🔗` The maximum number of frames supported by **AnimatedTexture**. If you need more frames in your animation, use :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`. @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **current_frame** +:ref:`int` **current_frame** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_current_frame** **(** :ref:`int` value **)** -- :ref:`int` **get_current_frame** **(** **)** +- |void| **set_current_frame**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_current_frame**\ (\ ) Sets the currently visible frame of the texture. Setting this frame while playing resets the current frame time, so the newly selected frame plays for its whole configured frame duration. @@ -118,12 +118,12 @@ Sets the currently visible frame of the texture. Setting this frame while playin .. rst-class:: classref-property -:ref:`int` **frames** = ``1`` +:ref:`int` **frames** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frames** **(** :ref:`int` value **)** -- :ref:`int` **get_frames** **(** **)** +- |void| **set_frames**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_frames**\ (\ ) Number of frames to use in the animation. While you can create the frames independently with :ref:`set_frame_texture`, you need to set this value for the animation to take new frames into account. The maximum number of frames is :ref:`MAX_FRAMES`. @@ -135,12 +135,12 @@ Number of frames to use in the animation. While you can create the frames indepe .. rst-class:: classref-property -:ref:`bool` **one_shot** = ``false`` +:ref:`bool` **one_shot** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool` value **)** -- :ref:`bool` **get_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_one_shot**\ (\ ) If ``true``, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set :ref:`pause` to ``true``. @@ -152,12 +152,12 @@ If ``true``, the animation will only play once and will not loop back to the fir .. rst-class:: classref-property -:ref:`bool` **pause** = ``false`` +:ref:`bool` **pause** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pause** **(** :ref:`bool` value **)** -- :ref:`bool` **get_pause** **(** **)** +- |void| **set_pause**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_pause**\ (\ ) If ``true``, the animation will pause where it currently is (i.e. at :ref:`current_frame`). The animation will continue from where it was paused when changing this property to ``false``. @@ -169,12 +169,12 @@ If ``true``, the animation will pause where it currently is (i.e. at :ref:`curre .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. @@ -191,7 +191,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_frame_duration** **(** :ref:`int` frame **)** |const| +:ref:`float` **get_frame_duration**\ (\ frame\: :ref:`int`\ ) |const| :ref:`🔗` Returns the given ``frame``'s duration, in seconds. @@ -203,7 +203,7 @@ Returns the given ``frame``'s duration, in seconds. .. rst-class:: classref-method -:ref:`Texture2D` **get_frame_texture** **(** :ref:`int` frame **)** |const| +:ref:`Texture2D` **get_frame_texture**\ (\ frame\: :ref:`int`\ ) |const| :ref:`🔗` Returns the given frame's :ref:`Texture2D`. @@ -215,7 +215,7 @@ Returns the given frame's :ref:`Texture2D`. .. rst-class:: classref-method -void **set_frame_duration** **(** :ref:`int` frame, :ref:`float` duration **)** +|void| **set_frame_duration**\ (\ frame\: :ref:`int`, duration\: :ref:`float`\ ) :ref:`🔗` Sets the duration of any given ``frame``. The final duration is affected by the :ref:`speed_scale`. If set to ``0``, the frame is skipped during playback. @@ -227,7 +227,7 @@ Sets the duration of any given ``frame``. The final duration is affected by the .. rst-class:: classref-method -void **set_frame_texture** **(** :ref:`int` frame, :ref:`Texture2D` texture **)** +|void| **set_frame_texture**\ (\ frame\: :ref:`int`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` Assigns a :ref:`Texture2D` to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID :ref:`frames` - 1. @@ -240,3 +240,4 @@ You can define any number of textures up to :ref:`MAX_FRAMES` | :ref:`length` | ``1.0`` | - +------------------------------------------+------------------------------------------------------+---------+ - | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | - +------------------------------------------+------------------------------------------------------+---------+ - | :ref:`float` | :ref:`step` | ``0.1`` | - +------------------------------------------+------------------------------------------------------+---------+ + +------------------------------------------+--------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`capture_included` | ``false`` | + +------------------------------------------+--------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`length` | ``1.0`` | + +------------------------------------------+--------------------------------------------------------------------+---------------+ + | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | + +------------------------------------------+--------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`step` | ``0.0333333`` | + +------------------------------------------+--------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -81,141 +85,141 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_track` **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`animation_track_get_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`animation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`animation_track_set_key_animation` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`audio_track_get_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`audio_track_get_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`audio_track_get_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`audio_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Resource` stream, :ref:`float` start_offset=0, :ref:`float` end_offset=0 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`audio_track_is_use_blend` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`audio_track_set_key_end_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`audio_track_set_key_start_offset` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`audio_track_set_key_stream` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`audio_track_set_use_blend` **(** :ref:`int` track_idx, :ref:`bool` enable **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`bezier_track_get_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`bezier_track_get_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`bezier_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0) **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`bezier_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bezier_track_set_key_in_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` in_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bezier_track_set_key_out_handle` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` out_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bezier_track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`blend_shape_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`blend_shape_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compress` **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`copy_track` **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_track` **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_track_count` **(** **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`method_track_get_name` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`method_track_get_params` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`position_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`position_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_track` **(** :ref:`int` track_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rotation_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`rotation_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`scale_track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`scale_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`track_find_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`FindMode` find_mode=0 **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`track_get_interpolation_loop_wrap` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InterpolationType` | :ref:`track_get_interpolation_type` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`track_get_key_count` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`track_get_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`track_get_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`track_get_key_value` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`track_get_path` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TrackType` | :ref:`track_get_type` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`track_insert_key` **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`track_is_compressed` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`track_is_enabled` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`track_is_imported` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_move_down` **(** :ref:`int` track_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_move_to` **(** :ref:`int` track_idx, :ref:`int` to_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_move_up` **(** :ref:`int` track_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_remove_key` **(** :ref:`int` track_idx, :ref:`int` key_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_remove_key_at_time` **(** :ref:`int` track_idx, :ref:`float` time **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_enabled` **(** :ref:`int` track_idx, :ref:`bool` enabled **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_imported` **(** :ref:`int` track_idx, :ref:`bool` imported **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_interpolation_loop_wrap` **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_interpolation_type` **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_key_time` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_key_transition` **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_key_value` **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_set_path` **(** :ref:`int` track_idx, :ref:`NodePath` path **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`track_swap` **(** :ref:`int` track_idx, :ref:`int` with_idx **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UpdateMode` | :ref:`value_track_get_update_mode` **(** :ref:`int` track_idx **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`value_track_interpolate` **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`value_track_set_update_mode` **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** | - +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_track`\ (\ type\: :ref:`TrackType`, at_position\: :ref:`int` = -1\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`animation_track_get_key_animation`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`animation_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, animation\: :ref:`StringName`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`animation_track_set_key_animation`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, animation\: :ref:`StringName`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio_track_get_key_end_offset`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`audio_track_get_key_start_offset`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`audio_track_get_key_stream`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, stream\: :ref:`Resource`, start_offset\: :ref:`float` = 0, end_offset\: :ref:`float` = 0\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio_track_is_use_blend`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`audio_track_set_key_end_offset`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, offset\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`audio_track_set_key_start_offset`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, offset\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`audio_track_set_key_stream`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, stream\: :ref:`Resource`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`audio_track_set_use_blend`\ (\ track_idx\: :ref:`int`, enable\: :ref:`bool`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_track_get_key_in_handle`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`bezier_track_get_key_out_handle`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_track_get_key_value`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bezier_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, value\: :ref:`float`, in_handle\: :ref:`Vector2` = Vector2(0, 0), out_handle\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`bezier_track_interpolate`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bezier_track_set_key_in_handle`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, in_handle\: :ref:`Vector2`, balanced_value_time_ratio\: :ref:`float` = 1.0\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bezier_track_set_key_out_handle`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, out_handle\: :ref:`Vector2`, balanced_value_time_ratio\: :ref:`float` = 1.0\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bezier_track_set_key_value`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, value\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`blend_shape_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, amount\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_shape_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compress`\ (\ page_size\: :ref:`int` = 8192, fps\: :ref:`int` = 120, split_tolerance\: :ref:`float` = 4.0\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`copy_track`\ (\ track_idx\: :ref:`int`, to_animation\: :ref:`Animation`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_track`\ (\ path\: :ref:`NodePath`, type\: :ref:`TrackType`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_track_count`\ (\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`method_track_get_name`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`method_track_get_params`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`position_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, position\: :ref:`Vector3`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`position_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_track`\ (\ track_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rotation_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, rotation\: :ref:`Quaternion`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`rotation_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`scale_track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, scale\: :ref:`Vector3`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`scale_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`track_find_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, find_mode\: :ref:`FindMode` = 0, limit\: :ref:`bool` = false, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`track_get_interpolation_loop_wrap`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InterpolationType` | :ref:`track_get_interpolation_type`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`track_get_key_count`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`track_get_key_time`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`track_get_key_transition`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`track_get_key_value`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`track_get_path`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TrackType` | :ref:`track_get_type`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`track_insert_key`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, key\: :ref:`Variant`, transition\: :ref:`float` = 1\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`track_is_compressed`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`track_is_enabled`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`track_is_imported`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_move_down`\ (\ track_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_move_to`\ (\ track_idx\: :ref:`int`, to_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_move_up`\ (\ track_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_remove_key`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_remove_key_at_time`\ (\ track_idx\: :ref:`int`, time\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_enabled`\ (\ track_idx\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_imported`\ (\ track_idx\: :ref:`int`, imported\: :ref:`bool`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_interpolation_loop_wrap`\ (\ track_idx\: :ref:`int`, interpolation\: :ref:`bool`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_interpolation_type`\ (\ track_idx\: :ref:`int`, interpolation\: :ref:`InterpolationType`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_key_time`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, time\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_key_transition`\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, transition\: :ref:`float`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_key_value`\ (\ track_idx\: :ref:`int`, key\: :ref:`int`, value\: :ref:`Variant`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_set_path`\ (\ track_idx\: :ref:`int`, path\: :ref:`NodePath`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`track_swap`\ (\ track_idx\: :ref:`int`, with_idx\: :ref:`int`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UpdateMode` | :ref:`value_track_get_update_mode`\ (\ track_idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`value_track_interpolate`\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`value_track_set_update_mode`\ (\ track_idx\: :ref:`int`, mode\: :ref:`UpdateMode`\ ) | + +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -230,7 +234,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TrackType**: +enum **TrackType**: :ref:`🔗` .. _class_Animation_constant_TYPE_VALUE: @@ -312,7 +316,7 @@ Animation tracks play animations in other :ref:`AnimationPlayer` .. _class_Animation_constant_INTERPOLATION_NEAREST: @@ -366,7 +370,7 @@ Cubic interpolation with shortest path rotation. .. rst-class:: classref-enumeration -enum **UpdateMode**: +enum **UpdateMode**: :ref:`🔗` .. _class_Animation_constant_UPDATE_CONTINUOUS: @@ -390,7 +394,7 @@ Update at the keyframes. :ref:`UpdateMode` **UPDATE_CAPTURE** = ``2`` -Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds. +Same as :ref:`UPDATE_CONTINUOUS` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also :ref:`AnimationMixer.capture`, :ref:`AnimationPlayer.playback_auto_capture`, and :ref:`AnimationPlayer.play_with_capture`. .. rst-class:: classref-item-separator @@ -400,7 +404,7 @@ Same as linear interpolation, but also interpolates from the current value (i.e. .. rst-class:: classref-enumeration -enum **LoopMode**: +enum **LoopMode**: :ref:`🔗` .. _class_Animation_constant_LOOP_NONE: @@ -434,7 +438,7 @@ Repeats playback and reverse playback at both ends of the animation. .. rst-class:: classref-enumeration -enum **LoopedFlag**: +enum **LoopedFlag**: :ref:`🔗` .. _class_Animation_constant_LOOPED_FLAG_NONE: @@ -468,7 +472,7 @@ This flag indicates that the animation has reached the start of the animation an .. rst-class:: classref-enumeration -enum **FindMode**: +enum **FindMode**: :ref:`🔗` .. _class_Animation_constant_FIND_MODE_NEAREST: @@ -503,16 +507,32 @@ Finds only the key with matching the time. Property Descriptions --------------------- +.. _class_Animation_property_capture_included: + +.. rst-class:: classref-property + +:ref:`bool` **capture_included** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`bool` **is_capture_included**\ (\ ) + +Returns ``true`` if the capture track is included. This is a cached readonly value for performance. + +.. rst-class:: classref-item-separator + +---- + .. _class_Animation_property_length: .. rst-class:: classref-property -:ref:`float` **length** = ``1.0`` +:ref:`float` **length** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float` value **)** -- :ref:`float` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_length**\ (\ ) The total length of the animation (in seconds). @@ -526,12 +546,12 @@ The total length of the animation (in seconds). .. rst-class:: classref-property -:ref:`LoopMode` **loop_mode** = ``0`` +:ref:`LoopMode` **loop_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_mode** **(** :ref:`LoopMode` value **)** -- :ref:`LoopMode` **get_loop_mode** **(** **)** +- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) +- :ref:`LoopMode` **get_loop_mode**\ (\ ) Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. @@ -543,12 +563,12 @@ Determines the behavior of both ends of the animation timeline during animation .. rst-class:: classref-property -:ref:`float` **step** = ``0.1`` +:ref:`float` **step** = ``0.0333333`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_step** **(** :ref:`float` value **)** -- :ref:`float` **get_step** **(** **)** +- |void| **set_step**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_step**\ (\ ) The animation step value. @@ -565,7 +585,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **add_track** **(** :ref:`TrackType` type, :ref:`int` at_position=-1 **)** +:ref:`int` **add_track**\ (\ type\: :ref:`TrackType`, at_position\: :ref:`int` = -1\ ) :ref:`🔗` Adds a track to the Animation. @@ -577,7 +597,7 @@ Adds a track to the Animation. .. rst-class:: classref-method -:ref:`StringName` **animation_track_get_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`StringName` **animation_track_get_key_animation**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the animation name at the key identified by ``key_idx``. The ``track_idx`` must be the index of an Animation Track. @@ -589,7 +609,7 @@ Returns the animation name at the key identified by ``key_idx``. The ``track_idx .. rst-class:: classref-method -:ref:`int` **animation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`StringName` animation **)** +:ref:`int` **animation_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, animation\: :ref:`StringName`\ ) :ref:`🔗` Inserts a key with value ``animation`` at the given ``time`` (in seconds). The ``track_idx`` must be the index of an Animation Track. @@ -601,7 +621,7 @@ Inserts a key with value ``animation`` at the given ``time`` (in seconds). The ` .. rst-class:: classref-method -void **animation_track_set_key_animation** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`StringName` animation **)** +|void| **animation_track_set_key_animation**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, animation\: :ref:`StringName`\ ) :ref:`🔗` Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx`` must be the index of an Animation Track. @@ -613,7 +633,7 @@ Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx`` .. rst-class:: classref-method -:ref:`float` **audio_track_get_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`float` **audio_track_get_key_end_offset**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the end offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. @@ -627,7 +647,7 @@ End offset is the number of seconds cut off at the ending of the audio stream. .. rst-class:: classref-method -:ref:`float` **audio_track_get_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`float` **audio_track_get_key_start_offset**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the start offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. @@ -641,7 +661,7 @@ Start offset is the number of seconds cut off at the beginning of the audio stre .. rst-class:: classref-method -:ref:`Resource` **audio_track_get_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`Resource` **audio_track_get_key_stream**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track. @@ -653,7 +673,7 @@ Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` .. rst-class:: classref-method -:ref:`int` **audio_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Resource` stream, :ref:`float` start_offset=0, :ref:`float` end_offset=0 **)** +:ref:`int` **audio_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, stream\: :ref:`Resource`, start_offset\: :ref:`float` = 0, end_offset\: :ref:`float` = 0\ ) :ref:`🔗` Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of an Audio Track. @@ -667,7 +687,7 @@ Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` m .. rst-class:: classref-method -:ref:`bool` **audio_track_is_use_blend** **(** :ref:`int` track_idx **)** |const| +:ref:`bool` **audio_track_is_use_blend**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the track at ``track_idx`` will be blended with other animations. @@ -679,7 +699,7 @@ Returns ``true`` if the track at ``track_idx`` will be blended with other animat .. rst-class:: classref-method -void **audio_track_set_key_end_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** +|void| **audio_track_set_key_end_offset**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, offset\: :ref:`float`\ ) :ref:`🔗` Sets the end offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track. @@ -691,7 +711,7 @@ Sets the end offset of the key identified by ``key_idx`` to value ``offset``. Th .. rst-class:: classref-method -void **audio_track_set_key_start_offset** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` offset **)** +|void| **audio_track_set_key_start_offset**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, offset\: :ref:`float`\ ) :ref:`🔗` Sets the start offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track. @@ -703,7 +723,7 @@ Sets the start offset of the key identified by ``key_idx`` to value ``offset``. .. rst-class:: classref-method -void **audio_track_set_key_stream** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Resource` stream **)** +|void| **audio_track_set_key_stream**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, stream\: :ref:`Resource`\ ) :ref:`🔗` Sets the stream of the key identified by ``key_idx`` to value ``stream``. The ``track_idx`` must be the index of an Audio Track. @@ -715,7 +735,7 @@ Sets the stream of the key identified by ``key_idx`` to value ``stream``. The `` .. rst-class:: classref-method -void **audio_track_set_use_blend** **(** :ref:`int` track_idx, :ref:`bool` enable **)** +|void| **audio_track_set_use_blend**\ (\ track_idx\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` Sets whether the track will be blended with other animations. If ``true``, the audio playback volume changes depending on the blend value. @@ -727,7 +747,7 @@ Sets whether the track will be blended with other animations. If ``true``, the a .. rst-class:: classref-method -:ref:`Vector2` **bezier_track_get_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`Vector2` **bezier_track_get_key_in_handle**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. @@ -739,7 +759,7 @@ Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` mu .. rst-class:: classref-method -:ref:`Vector2` **bezier_track_get_key_out_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`Vector2` **bezier_track_get_key_out_handle**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. @@ -751,7 +771,7 @@ Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` m .. rst-class:: classref-method -:ref:`float` **bezier_track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`float` **bezier_track_get_key_value**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the value of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track. @@ -763,7 +783,7 @@ Returns the value of the key identified by ``key_idx``. The ``track_idx`` must b .. rst-class:: classref-method -:ref:`int` **bezier_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` value, :ref:`Vector2` in_handle=Vector2(0, 0), :ref:`Vector2` out_handle=Vector2(0, 0) **)** +:ref:`int` **bezier_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, value\: :ref:`float`, in_handle\: :ref:`Vector2` = Vector2(0, 0), out_handle\: :ref:`Vector2` = Vector2(0, 0)\ ) :ref:`🔗` Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track. @@ -777,7 +797,7 @@ Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` m .. rst-class:: classref-method -:ref:`float` **bezier_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time **)** |const| +:ref:`float` **bezier_track_interpolate**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`\ ) |const| :ref:`🔗` Returns the interpolated value at the given ``time`` (in seconds). The ``track_idx`` must be the index of a Bezier Track. @@ -789,7 +809,7 @@ Returns the interpolated value at the given ``time`` (in seconds). The ``track_i .. rst-class:: classref-method -void **bezier_track_set_key_in_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` in_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** +|void| **bezier_track_set_key_in_handle**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, in_handle\: :ref:`Vector2`, balanced_value_time_ratio\: :ref:`float` = 1.0\ ) :ref:`🔗` Sets the in handle of the key identified by ``key_idx`` to value ``in_handle``. The ``track_idx`` must be the index of a Bezier Track. @@ -801,7 +821,7 @@ Sets the in handle of the key identified by ``key_idx`` to value ``in_handle``. .. rst-class:: classref-method -void **bezier_track_set_key_out_handle** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`Vector2` out_handle, :ref:`float` balanced_value_time_ratio=1.0 **)** +|void| **bezier_track_set_key_out_handle**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, out_handle\: :ref:`Vector2`, balanced_value_time_ratio\: :ref:`float` = 1.0\ ) :ref:`🔗` Sets the out handle of the key identified by ``key_idx`` to value ``out_handle``. The ``track_idx`` must be the index of a Bezier Track. @@ -813,7 +833,7 @@ Sets the out handle of the key identified by ``key_idx`` to value ``out_handle`` .. rst-class:: classref-method -void **bezier_track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` value **)** +|void| **bezier_track_set_key_value**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, value\: :ref:`float`\ ) :ref:`🔗` Sets the value of the key identified by ``key_idx`` to the given value. The ``track_idx`` must be the index of a Bezier Track. @@ -825,7 +845,7 @@ Sets the value of the key identified by ``key_idx`` to the given value. The ``tr .. rst-class:: classref-method -:ref:`int` **blend_shape_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`float` amount **)** +:ref:`int` **blend_shape_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, amount\: :ref:`float`\ ) :ref:`🔗` Inserts a key in a given blend shape track. Returns the key index. @@ -837,7 +857,7 @@ Inserts a key in a given blend shape track. Returns the key index. .. rst-class:: classref-method -:ref:`float` **blend_shape_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +:ref:`float` **blend_shape_track_interpolate**\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the interpolated blend shape value at the given time (in seconds). The ``track_idx`` must be the index of a blend shape track. @@ -849,7 +869,7 @@ Returns the interpolated blend shape value at the given time (in seconds). The ` .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clear the animation (clear all tracks and reset all). @@ -861,7 +881,7 @@ Clear the animation (clear all tracks and reset all). .. rst-class:: classref-method -void **compress** **(** :ref:`int` page_size=8192, :ref:`int` fps=120, :ref:`float` split_tolerance=4.0 **)** +|void| **compress**\ (\ page_size\: :ref:`int` = 8192, fps\: :ref:`int` = 120, split_tolerance\: :ref:`float` = 4.0\ ) :ref:`🔗` Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. @@ -875,9 +895,9 @@ Compress the animation and all its tracks in-place. This will make :ref:`track_i .. rst-class:: classref-method -void **copy_track** **(** :ref:`int` track_idx, :ref:`Animation` to_animation **)** +|void| **copy_track**\ (\ track_idx\: :ref:`int`, to_animation\: :ref:`Animation`\ ) :ref:`🔗` -Adds a new track that is a copy of the given track from ``to_animation``. +Adds a new track to ``to_animation`` that is a copy of the given track from this animation. .. rst-class:: classref-item-separator @@ -887,7 +907,7 @@ Adds a new track that is a copy of the given track from ``to_animation``. .. rst-class:: classref-method -:ref:`int` **find_track** **(** :ref:`NodePath` path, :ref:`TrackType` type **)** |const| +:ref:`int` **find_track**\ (\ path\: :ref:`NodePath`, type\: :ref:`TrackType`\ ) |const| :ref:`🔗` Returns the index of the specified track. If the track is not found, return -1. @@ -899,7 +919,7 @@ Returns the index of the specified track. If the track is not found, return -1. .. rst-class:: classref-method -:ref:`int` **get_track_count** **(** **)** |const| +:ref:`int` **get_track_count**\ (\ ) |const| :ref:`🔗` Returns the amount of tracks in the animation. @@ -911,7 +931,7 @@ Returns the amount of tracks in the animation. .. rst-class:: classref-method -:ref:`StringName` **method_track_get_name** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`StringName` **method_track_get_name**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the method name of a method track. @@ -923,7 +943,7 @@ Returns the method name of a method track. .. rst-class:: classref-method -:ref:`Array` **method_track_get_params** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`Array` **method_track_get_params**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the arguments values to be called on a method track for a given key in a given track. @@ -935,7 +955,7 @@ Returns the arguments values to be called on a method track for a given key in a .. rst-class:: classref-method -:ref:`int` **position_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` position **)** +:ref:`int` **position_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, position\: :ref:`Vector3`\ ) :ref:`🔗` Inserts a key in a given 3D position track. Returns the key index. @@ -947,7 +967,7 @@ Inserts a key in a given 3D position track. Returns the key index. .. rst-class:: classref-method -:ref:`Vector3` **position_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +:ref:`Vector3` **position_track_interpolate**\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the interpolated position value at the given time (in seconds). The ``track_idx`` must be the index of a 3D position track. @@ -959,7 +979,7 @@ Returns the interpolated position value at the given time (in seconds). The ``tr .. rst-class:: classref-method -void **remove_track** **(** :ref:`int` track_idx **)** +|void| **remove_track**\ (\ track_idx\: :ref:`int`\ ) :ref:`🔗` Removes a track by specifying the track index. @@ -971,7 +991,7 @@ Removes a track by specifying the track index. .. rst-class:: classref-method -:ref:`int` **rotation_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Quaternion` rotation **)** +:ref:`int` **rotation_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, rotation\: :ref:`Quaternion`\ ) :ref:`🔗` Inserts a key in a given 3D rotation track. Returns the key index. @@ -983,7 +1003,7 @@ Inserts a key in a given 3D rotation track. Returns the key index. .. rst-class:: classref-method -:ref:`Quaternion` **rotation_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +:ref:`Quaternion` **rotation_track_interpolate**\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the interpolated rotation value at the given time (in seconds). The ``track_idx`` must be the index of a 3D rotation track. @@ -995,7 +1015,7 @@ Returns the interpolated rotation value at the given time (in seconds). The ``tr .. rst-class:: classref-method -:ref:`int` **scale_track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Vector3` scale **)** +:ref:`int` **scale_track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, scale\: :ref:`Vector3`\ ) :ref:`🔗` Inserts a key in a given 3D scale track. Returns the key index. @@ -1007,7 +1027,7 @@ Inserts a key in a given 3D scale track. Returns the key index. .. rst-class:: classref-method -:ref:`Vector3` **scale_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +:ref:`Vector3` **scale_track_interpolate**\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the interpolated scale value at the given time (in seconds). The ``track_idx`` must be the index of a 3D scale track. @@ -1019,10 +1039,16 @@ Returns the interpolated scale value at the given time (in seconds). The ``track .. rst-class:: classref-method -:ref:`int` **track_find_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`FindMode` find_mode=0 **)** |const| +:ref:`int` **track_find_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, find_mode\: :ref:`FindMode` = 0, limit\: :ref:`bool` = false, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. +If ``limit`` is ``true``, it does not return keys outside the animation range. + +If ``backward`` is ``true``, the direction is reversed in methods that rely on one directional processing. + +For example, in case ``find_mode`` is :ref:`FIND_MODE_NEAREST`, if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if ``backward`` is ``true``, the first key found is retrieved after the position. + .. rst-class:: classref-item-separator ---- @@ -1031,7 +1057,7 @@ Finds the key index by time in a given track. Optionally, only find it if the ap .. rst-class:: classref-method -:ref:`bool` **track_get_interpolation_loop_wrap** **(** :ref:`int` track_idx **)** |const| +:ref:`bool` **track_get_interpolation_loop_wrap**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default. @@ -1043,7 +1069,7 @@ Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New .. rst-class:: classref-method -:ref:`InterpolationType` **track_get_interpolation_type** **(** :ref:`int` track_idx **)** |const| +:ref:`InterpolationType` **track_get_interpolation_type**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the interpolation type of a given track. @@ -1055,7 +1081,7 @@ Returns the interpolation type of a given track. .. rst-class:: classref-method -:ref:`int` **track_get_key_count** **(** :ref:`int` track_idx **)** |const| +:ref:`int` **track_get_key_count**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the number of keys in a given track. @@ -1067,7 +1093,7 @@ Returns the number of keys in a given track. .. rst-class:: classref-method -:ref:`float` **track_get_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`float` **track_get_key_time**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the time at which the key is located. @@ -1079,7 +1105,7 @@ Returns the time at which the key is located. .. rst-class:: classref-method -:ref:`float` **track_get_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`float` **track_get_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). @@ -1091,7 +1117,7 @@ Returns the transition curve (easing) for a specific key (see the built-in math .. rst-class:: classref-method -:ref:`Variant` **track_get_key_value** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** |const| +:ref:`Variant` **track_get_key_value**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the value of a given key in a given track. @@ -1103,7 +1129,7 @@ Returns the value of a given key in a given track. .. rst-class:: classref-method -:ref:`NodePath` **track_get_path** **(** :ref:`int` track_idx **)** |const| +:ref:`NodePath` **track_get_path**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Gets the path of a track. For more information on the path format, see :ref:`track_set_path`. @@ -1115,7 +1141,7 @@ Gets the path of a track. For more information on the path format, see :ref:`tra .. rst-class:: classref-method -:ref:`TrackType` **track_get_type** **(** :ref:`int` track_idx **)** |const| +:ref:`TrackType` **track_get_type**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Gets the type of a track. @@ -1127,7 +1153,7 @@ Gets the type of a track. .. rst-class:: classref-method -:ref:`int` **track_insert_key** **(** :ref:`int` track_idx, :ref:`float` time, :ref:`Variant` key, :ref:`float` transition=1 **)** +:ref:`int` **track_insert_key**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`, key\: :ref:`Variant`, transition\: :ref:`float` = 1\ ) :ref:`🔗` Inserts a generic key in a given track. Returns the key index. @@ -1139,7 +1165,7 @@ Inserts a generic key in a given track. Returns the key index. .. rst-class:: classref-method -:ref:`bool` **track_is_compressed** **(** :ref:`int` track_idx **)** |const| +:ref:`bool` **track_is_compressed**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress`. @@ -1151,7 +1177,7 @@ Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref: .. rst-class:: classref-method -:ref:`bool` **track_is_enabled** **(** :ref:`int` track_idx **)** |const| +:ref:`bool` **track_is_enabled**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the track at index ``track_idx`` is enabled. @@ -1163,7 +1189,7 @@ Returns ``true`` if the track at index ``track_idx`` is enabled. .. rst-class:: classref-method -:ref:`bool` **track_is_imported** **(** :ref:`int` track_idx **)** |const| +:ref:`bool` **track_is_imported**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if the given track is imported. Else, return ``false``. @@ -1175,7 +1201,7 @@ Returns ``true`` if the given track is imported. Else, return ``false``. .. rst-class:: classref-method -void **track_move_down** **(** :ref:`int` track_idx **)** +|void| **track_move_down**\ (\ track_idx\: :ref:`int`\ ) :ref:`🔗` Moves a track down. @@ -1187,7 +1213,7 @@ Moves a track down. .. rst-class:: classref-method -void **track_move_to** **(** :ref:`int` track_idx, :ref:`int` to_idx **)** +|void| **track_move_to**\ (\ track_idx\: :ref:`int`, to_idx\: :ref:`int`\ ) :ref:`🔗` Changes the index position of track ``track_idx`` to the one defined in ``to_idx``. @@ -1199,7 +1225,7 @@ Changes the index position of track ``track_idx`` to the one defined in ``to_idx .. rst-class:: classref-method -void **track_move_up** **(** :ref:`int` track_idx **)** +|void| **track_move_up**\ (\ track_idx\: :ref:`int`\ ) :ref:`🔗` Moves a track up. @@ -1211,7 +1237,7 @@ Moves a track up. .. rst-class:: classref-method -void **track_remove_key** **(** :ref:`int` track_idx, :ref:`int` key_idx **)** +|void| **track_remove_key**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) :ref:`🔗` Removes a key by index in a given track. @@ -1223,7 +1249,7 @@ Removes a key by index in a given track. .. rst-class:: classref-method -void **track_remove_key_at_time** **(** :ref:`int` track_idx, :ref:`float` time **)** +|void| **track_remove_key_at_time**\ (\ track_idx\: :ref:`int`, time\: :ref:`float`\ ) :ref:`🔗` Removes a key at ``time`` in a given track. @@ -1235,7 +1261,7 @@ Removes a key at ``time`` in a given track. .. rst-class:: classref-method -void **track_set_enabled** **(** :ref:`int` track_idx, :ref:`bool` enabled **)** +|void| **track_set_enabled**\ (\ track_idx\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` Enables/disables the given track. Tracks are enabled by default. @@ -1247,7 +1273,7 @@ Enables/disables the given track. Tracks are enabled by default. .. rst-class:: classref-method -void **track_set_imported** **(** :ref:`int` track_idx, :ref:`bool` imported **)** +|void| **track_set_imported**\ (\ track_idx\: :ref:`int`, imported\: :ref:`bool`\ ) :ref:`🔗` Sets the given track as imported or not. @@ -1259,7 +1285,7 @@ Sets the given track as imported or not. .. rst-class:: classref-method -void **track_set_interpolation_loop_wrap** **(** :ref:`int` track_idx, :ref:`bool` interpolation **)** +|void| **track_set_interpolation_loop_wrap**\ (\ track_idx\: :ref:`int`, interpolation\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the track at ``track_idx`` wraps the interpolation loop. @@ -1271,7 +1297,7 @@ If ``true``, the track at ``track_idx`` wraps the interpolation loop. .. rst-class:: classref-method -void **track_set_interpolation_type** **(** :ref:`int` track_idx, :ref:`InterpolationType` interpolation **)** +|void| **track_set_interpolation_type**\ (\ track_idx\: :ref:`int`, interpolation\: :ref:`InterpolationType`\ ) :ref:`🔗` Sets the interpolation type of a given track. @@ -1283,7 +1309,7 @@ Sets the interpolation type of a given track. .. rst-class:: classref-method -void **track_set_key_time** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` time **)** +|void| **track_set_key_time**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, time\: :ref:`float`\ ) :ref:`🔗` Sets the time of an existing key. @@ -1295,7 +1321,7 @@ Sets the time of an existing key. .. rst-class:: classref-method -void **track_set_key_transition** **(** :ref:`int` track_idx, :ref:`int` key_idx, :ref:`float` transition **)** +|void| **track_set_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, transition\: :ref:`float`\ ) :ref:`🔗` Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). @@ -1307,7 +1333,7 @@ Sets the transition curve (easing) for a specific key (see the built-in math fun .. rst-class:: classref-method -void **track_set_key_value** **(** :ref:`int` track_idx, :ref:`int` key, :ref:`Variant` value **)** +|void| **track_set_key_value**\ (\ track_idx\: :ref:`int`, key\: :ref:`int`, value\: :ref:`Variant`\ ) :ref:`🔗` Sets the value of an existing key. @@ -1319,7 +1345,7 @@ Sets the value of an existing key. .. rst-class:: classref-method -void **track_set_path** **(** :ref:`int` track_idx, :ref:`NodePath` path **)** +|void| **track_set_path**\ (\ track_idx\: :ref:`int`, path\: :ref:`NodePath`\ ) :ref:`🔗` Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ``":"``. @@ -1333,7 +1359,7 @@ For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local .. rst-class:: classref-method -void **track_swap** **(** :ref:`int` track_idx, :ref:`int` with_idx **)** +|void| **track_swap**\ (\ track_idx\: :ref:`int`, with_idx\: :ref:`int`\ ) :ref:`🔗` Swaps the track ``track_idx``'s index position with the track ``with_idx``. @@ -1345,7 +1371,7 @@ Swaps the track ``track_idx``'s index position with the track ``with_idx``. .. rst-class:: classref-method -:ref:`UpdateMode` **value_track_get_update_mode** **(** :ref:`int` track_idx **)** |const| +:ref:`UpdateMode` **value_track_get_update_mode**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the update mode of a value track. @@ -1357,10 +1383,12 @@ Returns the update mode of a value track. .. rst-class:: classref-method -:ref:`Variant` **value_track_interpolate** **(** :ref:`int` track_idx, :ref:`float` time_sec **)** |const| +:ref:`Variant` **value_track_interpolate**\ (\ track_idx\: :ref:`int`, time_sec\: :ref:`float`, backward\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track. +A ``backward`` mainly affects the direction of key retrieval of the track with :ref:`UPDATE_DISCRETE` converted by :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to match the result with :ref:`track_find_key`. + .. rst-class:: classref-item-separator ---- @@ -1369,7 +1397,7 @@ Returns the interpolated value at the given time (in seconds). The ``track_idx`` .. rst-class:: classref-method -void **value_track_set_update_mode** **(** :ref:`int` track_idx, :ref:`UpdateMode` mode **)** +|void| **value_track_set_update_mode**\ (\ track_idx\: :ref:`int`, mode\: :ref:`UpdateMode`\ ) :ref:`🔗` Sets the update mode (see :ref:`UpdateMode`) of a value track. @@ -1380,3 +1408,4 @@ Sets the update mode (see :ref:`UpdateMode`) of a val .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index 58047aa5f91..458c410a0a3 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -30,37 +30,25 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- - -.. table:: - :widths: auto - - +-------------------------------------+-----------------------------------------------------+--------+ - | :ref:`Dictionary` | :ref:`_data` | ``{}`` | - +-------------------------------------+-----------------------------------------------------+--------+ - -.. rst-class:: classref-reftable-group - Methods ------- .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`add_animation` **(** :ref:`StringName` name, :ref:`Animation` animation **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`get_animation_list` **(** **)** |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_animation` **(** :ref:`StringName` name **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_animation` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_animation`\ (\ name\: :ref:`StringName`, animation\: :ref:`Animation`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Animation` | :ref:`get_animation`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_animation_list`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_animation`\ (\ name\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_animation`\ (\ name\: :ref:`StringName`, newname\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,7 +63,7 @@ Signals .. rst-class:: classref-signal -**animation_added** **(** :ref:`StringName` name **)** +**animation_added**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when an :ref:`Animation` is added, under the key ``name``. @@ -87,7 +75,7 @@ Emitted when an :ref:`Animation` is added, under the key ``name .. rst-class:: classref-signal -**animation_changed** **(** :ref:`StringName` name **)** +**animation_changed**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. ``name`` is the key of the animation that was changed. @@ -101,7 +89,7 @@ See also :ref:`Resource.changed`, which this acts .. rst-class:: classref-signal -**animation_removed** **(** :ref:`StringName` name **)** +**animation_removed**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when an :ref:`Animation` stored with the key ``name`` is removed. @@ -113,7 +101,7 @@ Emitted when an :ref:`Animation` stored with the key ``name`` i .. rst-class:: classref-signal -**animation_renamed** **(** :ref:`StringName` name, :ref:`StringName` to_name **)** +**animation_renamed**\ (\ name\: :ref:`StringName`, to_name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when the key for an :ref:`Animation` is changed, from ``name`` to ``to_name``. @@ -123,25 +111,6 @@ Emitted when the key for an :ref:`Animation` is changed, from ` .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_AnimationLibrary_property__data: - -.. rst-class:: classref-property - -:ref:`Dictionary` **_data** = ``{}`` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Method Descriptions ------------------- @@ -149,7 +118,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **add_animation** **(** :ref:`StringName` name, :ref:`Animation` animation **)** +:ref:`Error` **add_animation**\ (\ name\: :ref:`StringName`, animation\: :ref:`Animation`\ ) :ref:`🔗` Adds the ``animation`` to the library, accessible by the key ``name``. @@ -161,7 +130,7 @@ Adds the ``animation`` to the library, accessible by the key ``name``. .. rst-class:: classref-method -:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| +:ref:`Animation` **get_animation**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the :ref:`Animation` with the key ``name``. If the animation does not exist, ``null`` is returned and an error is logged. @@ -173,7 +142,7 @@ Returns the :ref:`Animation` with the key ``name``. If the anim .. rst-class:: classref-method -:ref:`StringName[]` **get_animation_list** **(** **)** |const| +:ref:`Array`\[:ref:`StringName`\] **get_animation_list**\ (\ ) |const| :ref:`🔗` Returns the keys for the :ref:`Animation`\ s stored in the library. @@ -185,7 +154,7 @@ Returns the keys for the :ref:`Animation`\ s stored in the libr .. rst-class:: classref-method -:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_animation**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if the library stores an :ref:`Animation` with ``name`` as the key. @@ -197,7 +166,7 @@ Returns ``true`` if the library stores an :ref:`Animation` with .. rst-class:: classref-method -void **remove_animation** **(** :ref:`StringName` name **)** +|void| **remove_animation**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes the :ref:`Animation` with the key ``name``. @@ -209,7 +178,7 @@ Removes the :ref:`Animation` with the key ``name``. .. rst-class:: classref-method -void **rename_animation** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +|void| **rename_animation**\ (\ name\: :ref:`StringName`, newname\: :ref:`StringName`\ ) :ref:`🔗` Changes the key of the :ref:`Animation` associated with the key ``name`` to ``newname``. @@ -220,3 +189,4 @@ Changes the key of the :ref:`Animation` associated with the key .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst new file mode 100644 index 00000000000..f452889138d --- /dev/null +++ b/classes/class_animationmixer.rst @@ -0,0 +1,899 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationMixer.xml. + +.. _class_AnimationMixer: + +AnimationMixer +============== + +**Inherits:** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree` + +Base class for :ref:`AnimationPlayer` and :ref:`AnimationTree`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for :ref:`AnimationPlayer` and :ref:`AnimationTree` to manage animation lists. It also has general properties and methods for playback and blending. + +After instantiating the playback information data within the extended class, the blending is processed by the **AnimationMixer**. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`active` | ``true`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`AnimationCallbackModeDiscrete` | :ref:`callback_mode_discrete` | ``1`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`AnimationCallbackModeMethod` | :ref:`callback_mode_method` | ``0`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`AnimationCallbackModeProcess` | :ref:`callback_mode_process` | ``1`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`deterministic` | ``false`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`reset_on_save` | ``true`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | + +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_post_process_key_value`\ (\ animation\: :ref:`Animation`, track\: :ref:`int`, value\: :ref:`Variant`, object_id\: :ref:`int`, object_sub_idx\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_animation_library`\ (\ name\: :ref:`StringName`, library\: :ref:`AnimationLibrary`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`advance`\ (\ delta\: :ref:`float`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`capture`\ (\ name\: :ref:`StringName`, duration\: :ref:`float`, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_caches`\ (\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation`\ (\ animation\: :ref:`Animation`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation_library`\ (\ animation\: :ref:`Animation`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Animation` | :ref:`get_animation`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationLibrary` | :ref:`get_animation_library`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_animation_library_list`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_animation_list`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation_library`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_animation_library`\ (\ name\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_animation_library`\ (\ name\: :ref:`StringName`, newname\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_AnimationMixer_signal_animation_finished: + +.. rst-class:: classref-signal + +**animation_finished**\ (\ anim_name\: :ref:`StringName`\ ) :ref:`🔗` + +Notifies when an animation finished playing. + +\ **Note:** This signal is not emitted if an animation is looping. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_libraries_updated: + +.. rst-class:: classref-signal + +**animation_libraries_updated**\ (\ ) :ref:`🔗` + +Notifies when the animation libraries have changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_list_changed: + +.. rst-class:: classref-signal + +**animation_list_changed**\ (\ ) :ref:`🔗` + +Notifies when an animation list is changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_started: + +.. rst-class:: classref-signal + +**animation_started**\ (\ anim_name\: :ref:`StringName`\ ) :ref:`🔗` + +Notifies when an animation starts playing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_caches_cleared: + +.. rst-class:: classref-signal + +**caches_cleared**\ (\ ) :ref:`🔗` + +Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_mixer_applied: + +.. rst-class:: classref-signal + +**mixer_applied**\ (\ ) :ref:`🔗` + +Notifies when the blending result related have been applied to the target objects. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_mixer_updated: + +.. rst-class:: classref-signal + +**mixer_updated**\ (\ ) :ref:`🔗` + +Notifies when the property related process have been updated. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_AnimationMixer_AnimationCallbackModeProcess: + +.. rst-class:: classref-enumeration + +enum **AnimationCallbackModeProcess**: :ref:`🔗` + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS** = ``0`` + +Process animation during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`). This is especially useful when animating physics bodies. + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_IDLE** = ``1`` + +Process animation during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`). + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_MANUAL** = ``2`` + +Do not process animation. Use :ref:`advance` to process the animation manually. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AnimationMixer_AnimationCallbackModeMethod: + +.. rst-class:: classref-enumeration + +enum **AnimationCallbackModeMethod**: :ref:`🔗` + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_DEFERRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeMethod` **ANIMATION_CALLBACK_MODE_METHOD_DEFERRED** = ``0`` + +Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing. + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeMethod` **ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE** = ``1`` + +Make method calls immediately when reached in the animation. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AnimationMixer_AnimationCallbackModeDiscrete: + +.. rst-class:: classref-enumeration + +enum **AnimationCallbackModeDiscrete**: :ref:`🔗` + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeDiscrete` **ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT** = ``0`` + +An :ref:`Animation.UPDATE_DISCRETE` track value takes precedence when blending :ref:`Animation.UPDATE_CONTINUOUS` or :ref:`Animation.UPDATE_CAPTURE` track values and :ref:`Animation.UPDATE_DISCRETE` track values. + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeDiscrete` **ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE** = ``1`` + +An :ref:`Animation.UPDATE_CONTINUOUS` or :ref:`Animation.UPDATE_CAPTURE` track value takes precedence when blending the :ref:`Animation.UPDATE_CONTINUOUS` or :ref:`Animation.UPDATE_CAPTURE` track values and the :ref:`Animation.UPDATE_DISCRETE` track values. This is the default behavior for :ref:`AnimationPlayer`. + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeDiscrete` **ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS** = ``2`` + +Always treat the :ref:`Animation.UPDATE_DISCRETE` track value as :ref:`Animation.UPDATE_CONTINUOUS` with :ref:`Animation.INTERPOLATION_NEAREST`. This is the default behavior for :ref:`AnimationTree`. + +If a value track has non-numeric type key values, it is internally converted to use :ref:`ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE` with :ref:`Animation.UPDATE_DISCRETE`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AnimationMixer_property_active: + +.. rst-class:: classref-property + +:ref:`bool` **active** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_active**\ (\ ) + +If ``true``, the **AnimationMixer** will be processing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_audio_max_polyphony: + +.. rst-class:: classref-property + +:ref:`int` **audio_max_polyphony** = ``32`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_audio_max_polyphony**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_audio_max_polyphony**\ (\ ) + +The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. + +For example, if this value is ``32`` and the animation has two audio tracks, the two :ref:`AudioStreamPlayer`\ s assigned can play simultaneously up to ``32`` voices each. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_callback_mode_discrete: + +.. rst-class:: classref-property + +:ref:`AnimationCallbackModeDiscrete` **callback_mode_discrete** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_callback_mode_discrete**\ (\ value\: :ref:`AnimationCallbackModeDiscrete`\ ) +- :ref:`AnimationCallbackModeDiscrete` **get_callback_mode_discrete**\ (\ ) + +Ordinarily, tracks can be set to :ref:`Animation.UPDATE_DISCRETE` to update infrequently, usually when using nearest interpolation. + +However, when blending with :ref:`Animation.UPDATE_CONTINUOUS` several results are considered. The :ref:`callback_mode_discrete` specify it explicitly. See also :ref:`AnimationCallbackModeDiscrete`. + +To make the blended results look good, it is recommended to set this to :ref:`ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to update every frame during blending. Other values exist for compatibility and they are fine if there is no blending, but not so, may produce artifacts. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_callback_mode_method: + +.. rst-class:: classref-property + +:ref:`AnimationCallbackModeMethod` **callback_mode_method** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_callback_mode_method**\ (\ value\: :ref:`AnimationCallbackModeMethod`\ ) +- :ref:`AnimationCallbackModeMethod` **get_callback_mode_method**\ (\ ) + +The call mode used for "Call Method" tracks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_callback_mode_process: + +.. rst-class:: classref-property + +:ref:`AnimationCallbackModeProcess` **callback_mode_process** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_callback_mode_process**\ (\ value\: :ref:`AnimationCallbackModeProcess`\ ) +- :ref:`AnimationCallbackModeProcess` **get_callback_mode_process**\ (\ ) + +The process notification in which to update animations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_deterministic: + +.. rst-class:: classref-property + +:ref:`bool` **deterministic** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_deterministic**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_deterministic**\ (\ ) + +If ``true``, the blending uses the deterministic algorithm. The total weight is not normalized and the result is accumulated with an initial value (``0`` or a ``"RESET"`` animation if present). + +This means that if the total amount of blending is ``0.0``, the result is equal to the ``"RESET"`` animation. + +If the number of tracks between the blended animations is different, the animation with the missing track is treated as if it had the initial value. + +If ``false``, The blend does not use the deterministic algorithm. The total weight is normalized and always ``1.0``. If the number of tracks between the blended animations is different, nothing is done about the animation that is missing a track. + +\ **Note:** In :ref:`AnimationTree`, the blending with :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeSub2` or the weight greater than ``1.0`` may produce unexpected results. + +For example, if :ref:`AnimationNodeAdd2` blends two nodes with the amount ``1.0``, then total weight is ``2.0`` but it will be normalized to make the total amount ``1.0`` and the result will be equal to :ref:`AnimationNodeBlend2` with the amount ``0.5``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_reset_on_save: + +.. rst-class:: classref-property + +:ref:`bool` **reset_on_save** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_reset_on_save_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_reset_on_save_enabled**\ (\ ) + +This is used by the editor. If set to ``true``, the scene will be saved with the effects of the reset animation (the animation with the key ``"RESET"``) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. + +This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_root_motion_track: + +.. rst-class:: classref-property + +:ref:`NodePath` **root_motion_track** = ``NodePath("")`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_root_motion_track**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_root_motion_track**\ (\ ) + +The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by ``":"``. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``. + +If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D` or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position`, :ref:`get_root_motion_rotation`, :ref:`get_root_motion_scale` and :ref:`RootMotionView`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_root_node: + +.. rst-class:: classref-property + +:ref:`NodePath` **root_node** = ``NodePath("..")`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_root_node**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_root_node**\ (\ ) + +The node which node path references will travel from. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AnimationMixer_private_method__post_process_key_value: + +.. rst-class:: classref-method + +:ref:`Variant` **_post_process_key_value**\ (\ animation\: :ref:`Animation`, track\: :ref:`int`, value\: :ref:`Variant`, object_id\: :ref:`int`, object_sub_idx\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +A virtual function for processing after getting a key during playback. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_add_animation_library: + +.. rst-class:: classref-method + +:ref:`Error` **add_animation_library**\ (\ name\: :ref:`StringName`, library\: :ref:`AnimationLibrary`\ ) :ref:`🔗` + +Adds ``library`` to the animation player, under the key ``name``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_advance: + +.. rst-class:: classref-method + +|void| **advance**\ (\ delta\: :ref:`float`\ ) :ref:`🔗` + +Manually advance the animations by the specified time (in seconds). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_capture: + +.. rst-class:: classref-method + +|void| **capture**\ (\ name\: :ref:`StringName`, duration\: :ref:`float`, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) :ref:`🔗` + +If the animation track specified by ``name`` has an option :ref:`Animation.UPDATE_CAPTURE`, stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded. + +After this it will interpolate with current animation blending result during the playback process for the time specified by ``duration``, working like a crossfade. + +You can specify ``trans_type`` as the curve for the interpolation. For better results, it may be appropriate to specify :ref:`Tween.TRANS_LINEAR` for cases where the first key of the track begins with a non-zero value or where the key value does not change, and :ref:`Tween.TRANS_QUAD` for cases where the key value changes linearly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_clear_caches: + +.. rst-class:: classref-method + +|void| **clear_caches**\ (\ ) :ref:`🔗` + +**AnimationMixer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_find_animation: + +.. rst-class:: classref-method + +:ref:`StringName` **find_animation**\ (\ animation\: :ref:`Animation`\ ) |const| :ref:`🔗` + +Returns the key of ``animation`` or an empty :ref:`StringName` if not found. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_find_animation_library: + +.. rst-class:: classref-method + +:ref:`StringName` **find_animation_library**\ (\ animation\: :ref:`Animation`\ ) |const| :ref:`🔗` + +Returns the key for the :ref:`AnimationLibrary` that contains ``animation`` or an empty :ref:`StringName` if not found. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation: + +.. rst-class:: classref-method + +:ref:`Animation` **get_animation**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the :ref:`Animation` with the key ``name``. If the animation does not exist, ``null`` is returned and an error is logged. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_library: + +.. rst-class:: classref-method + +:ref:`AnimationLibrary` **get_animation_library**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. + +To get the **AnimationMixer**'s global animation library, use ``get_animation_library("")``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_library_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`StringName`\] **get_animation_library_list**\ (\ ) |const| :ref:`🔗` + +Returns the list of stored library keys. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_list: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_animation_list**\ (\ ) |const| :ref:`🔗` + +Returns the list of stored animation keys. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_position**\ (\ ) |const| :ref:`🔗` + +Retrieve the motion delta of position with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. + +If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_POSITION_3D`, returns ``Vector3(0, 0, 0)``. + +See also :ref:`root_motion_track` and :ref:`RootMotionView`. + +The most basic example is applying position to :ref:`CharacterBody3D`: + + +.. tabs:: + + .. code-tab:: gdscript + + var current_rotation: Quaternion + + func _process(delta): + if Input.is_action_just_pressed("animate"): + current_rotation = get_quaternion() + state_machine.travel("Animate") + var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta + set_velocity(velocity) + move_and_slide() + + + +By using this in combination with :ref:`get_root_motion_position_accumulator`, you can apply the root motion position more correctly to account for the rotation of the node. + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta + set_velocity(velocity) + move_and_slide() + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_position_accumulator: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_position_accumulator**\ (\ ) |const| :ref:`🔗` + +Retrieve the blended value of the position tracks with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. + +This is useful in cases where you want to respect the initial key values of the animation. + +For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in the previous frame and then an animation with only one key ``Vector3(1, 0, 1)`` is played in the next frame, the difference can be calculated as follows: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_position_accumulator: Vector3 + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() + var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator + prev_root_motion_position_accumulator = current_root_motion_position_accumulator + transform.origin += difference + + + +However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_rotation: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_root_motion_rotation**\ (\ ) |const| :ref:`🔗` + +Retrieve the motion delta of rotation with the :ref:`root_motion_track` as a :ref:`Quaternion` that can be used elsewhere. + +If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_ROTATION_3D`, returns ``Quaternion(0, 0, 0, 1)``. + +See also :ref:`root_motion_track` and :ref:`RootMotionView`. + +The most basic example is applying rotation to :ref:`CharacterBody3D`: + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_rotation_accumulator: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_root_motion_rotation_accumulator**\ (\ ) |const| :ref:`🔗` + +Retrieve the blended value of the rotation tracks with the :ref:`root_motion_track` as a :ref:`Quaternion` that can be used elsewhere. + +This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position`. + +Also, this is useful in cases where you want to respect the initial key values of the animation. + +For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is played in the previous frame and then an animation with only one key ``Quaternion(0, 0.707, 0, 0.707)`` is played in the next frame, the difference can be calculated as follows: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_rotation_accumulator: Quaternion + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() + var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator + prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator + transform.basis *= difference + + + +However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_scale: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_scale**\ (\ ) |const| :ref:`🔗` + +Retrieve the motion delta of scale with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. + +If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_SCALE_3D`, returns ``Vector3(0, 0, 0)``. + +See also :ref:`root_motion_track` and :ref:`RootMotionView`. + +The most basic example is applying scale to :ref:`CharacterBody3D`: + + +.. tabs:: + + .. code-tab:: gdscript + + var current_scale: Vector3 = Vector3(1, 1, 1) + var scale_accum: Vector3 = Vector3(1, 1, 1) + + func _process(delta): + if Input.is_action_just_pressed("animate"): + current_scale = get_scale() + scale_accum = Vector3(1, 1, 1) + state_machine.travel("Animate") + scale_accum += animation_tree.get_root_motion_scale() + set_scale(current_scale * scale_accum) + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_scale_accumulator: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_scale_accumulator**\ (\ ) |const| :ref:`🔗` + +Retrieve the blended value of the scale tracks with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. + +For example, if an animation with only one key ``Vector3(1, 1, 1)`` is played in the previous frame and then an animation with only one key ``Vector3(2, 2, 2)`` is played in the next frame, the difference can be calculated as follows: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_scale_accumulator: Vector3 + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator() + var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator + prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator + transform.basis = transform.basis.scaled(difference) + + + +However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_has_animation: + +.. rst-class:: classref-method + +:ref:`bool` **has_animation**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if the **AnimationMixer** stores an :ref:`Animation` with key ``name``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_has_animation_library: + +.. rst-class:: classref-method + +:ref:`bool` **has_animation_library**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if the **AnimationMixer** stores an :ref:`AnimationLibrary` with key ``name``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_remove_animation_library: + +.. rst-class:: classref-method + +|void| **remove_animation_library**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` + +Removes the :ref:`AnimationLibrary` associated with the key ``name``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_rename_animation_library: + +.. rst-class:: classref-method + +|void| **rename_animation_library**\ (\ name\: :ref:`StringName`, newname\: :ref:`StringName`\ ) :ref:`🔗` + +Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 0b1e89fa87f..4131ee692e4 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -25,6 +25,16 @@ Base resource for :ref:`AnimationTree` nodes. In general, i Inherit this when creating animation nodes mainly for use in :ref:`AnimationNodeBlendTree`, otherwise :ref:`AnimationRootNode` should be used instead. +You can access the time information as read-only parameter which is processed and stored in the previous frame for all nodes except :ref:`AnimationNodeOutput`. + +\ **Note:** If multiple inputs exist in the **AnimationNode**, which time information takes precedence depends on the type of **AnimationNode**. + +:: + + var current_length = $AnimationTree[parameters/AnimationNodeName/current_length] + var current_position = $AnimationTree[parameters/AnimationNodeName/current_position] + var current_delta = $AnimationTree[parameters/AnimationNodeName/current_delta] + .. rst-class:: classref-introduction-group Tutorials @@ -52,49 +62,49 @@ Methods .. table:: :widths: auto - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`add_input` **(** :ref:`String` name **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_animation` **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`LoopedFlag` looped_flag=0 **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`blend_input` **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`blend_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find_input` **(** :ref:`String` name **)** |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_input_count` **(** **)** |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_input_name` **(** :ref:`int` input **)** |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_parameter` **(** :ref:`StringName` name **)** |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_path_filtered` **(** :ref:`NodePath` path **)** |const| | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_input` **(** :ref:`int` index **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_filter_path` **(** :ref:`NodePath` path, :ref:`bool` enable **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`set_input_name` **(** :ref:`int` input, :ref:`String` name **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_parameter` **(** :ref:`StringName` name, :ref:`Variant` value **)** | - +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_caption`\ (\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNode` | :ref:`_get_child_by_name`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_child_nodes`\ (\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_parameter_default_value`\ (\ parameter\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_get_parameter_list`\ (\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_filter`\ (\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_parameter_read_only`\ (\ parameter\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_process`\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`add_input`\ (\ name\: :ref:`String`\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`blend_animation`\ (\ animation\: :ref:`StringName`, time\: :ref:`float`, delta\: :ref:`float`, seeked\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, looped_flag\: :ref:`LoopedFlag` = 0\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_input`\ (\ input_index\: :ref:`int`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`blend_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find_input`\ (\ name\: :ref:`String`\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_input_count`\ (\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_input_name`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_parameter`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_path_filtered`\ (\ path\: :ref:`NodePath`\ ) |const| | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_input`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_filter_path`\ (\ path\: :ref:`NodePath`, enable\: :ref:`bool`\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_input_name`\ (\ input\: :ref:`int`, name\: :ref:`String`\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -109,7 +119,7 @@ Signals .. rst-class:: classref-signal -**animation_node_removed** **(** :ref:`int` object_id, :ref:`String` name **)** +**animation_node_removed**\ (\ object_id\: :ref:`int`, name\: :ref:`String`\ ) :ref:`🔗` Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. @@ -121,7 +131,7 @@ Emitted by nodes that inherit from this class and that have an internal tree whe .. rst-class:: classref-signal -**animation_node_renamed** **(** :ref:`int` object_id, :ref:`String` old_name, :ref:`String` new_name **)** +**animation_node_renamed**\ (\ object_id\: :ref:`int`, old_name\: :ref:`String`, new_name\: :ref:`String`\ ) :ref:`🔗` Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, and :ref:`AnimationNodeBlendTree`. @@ -133,7 +143,7 @@ Emitted by nodes that inherit from this class and that have an internal tree whe .. rst-class:: classref-signal -**tree_changed** **(** **)** +**tree_changed**\ (\ ) :ref:`🔗` Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeStateMachine`, :ref:`AnimationNodeBlendTree` and :ref:`AnimationNodeTransition`. @@ -150,7 +160,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FilterAction**: +enum **FilterAction**: :ref:`🔗` .. _class_AnimationNode_constant_FILTER_IGNORE: @@ -197,12 +207,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **filter_enabled** +:ref:`bool` **filter_enabled** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_filter_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_filter_enabled** **(** **)** +- |void| **set_filter_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_filter_enabled**\ (\ ) If ``true``, filtering is enabled. @@ -215,11 +225,11 @@ If ``true``, filtering is enabled. Method Descriptions ------------------- -.. _class_AnimationNode_method__get_caption: +.. _class_AnimationNode_private_method__get_caption: .. rst-class:: classref-method -:ref:`String` **_get_caption** **(** **)** |virtual| |const| +:ref:`String` **_get_caption**\ (\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to override the text caption for this animation node. @@ -227,11 +237,11 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_child_by_name: +.. _class_AnimationNode_private_method__get_child_by_name: .. rst-class:: classref-method -:ref:`AnimationNode` **_get_child_by_name** **(** :ref:`StringName` name **)** |virtual| |const| +:ref:`AnimationNode` **_get_child_by_name**\ (\ name\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a child animation node by its ``name``. @@ -239,23 +249,23 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_child_nodes: +.. _class_AnimationNode_private_method__get_child_nodes: .. rst-class:: classref-method -:ref:`Dictionary` **_get_child_nodes** **(** **)** |virtual| |const| +:ref:`Dictionary` **_get_child_nodes**\ (\ ) |virtual| |const| :ref:`🔗` -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all children animation nodes in order as a ``name: node`` dictionary. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return all child animation nodes in order as a ``name: node`` dictionary. .. rst-class:: classref-item-separator ---- -.. _class_AnimationNode_method__get_parameter_default_value: +.. _class_AnimationNode_private_method__get_parameter_default_value: .. rst-class:: classref-method -:ref:`Variant` **_get_parameter_default_value** **(** :ref:`StringName` parameter **)** |virtual| |const| +:ref:`Variant` **_get_parameter_default_value**\ (\ parameter\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return the default value of a ``parameter``. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. @@ -263,11 +273,11 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__get_parameter_list: +.. _class_AnimationNode_private_method__get_parameter_list: .. rst-class:: classref-method -:ref:`Array` **_get_parameter_list** **(** **)** |virtual| |const| +:ref:`Array` **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. @@ -275,11 +285,11 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__has_filter: +.. _class_AnimationNode_private_method__has_filter: .. rst-class:: classref-method -:ref:`bool` **_has_filter** **(** **)** |virtual| |const| +:ref:`bool` **_has_filter**\ (\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the blend tree editor should display filter editing on this animation node. @@ -287,11 +297,11 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__is_parameter_read_only: +.. _class_AnimationNode_private_method__is_parameter_read_only: .. rst-class:: classref-method -:ref:`bool` **_is_parameter_read_only** **(** :ref:`StringName` parameter **)** |virtual| |const| +:ref:`bool` **_is_parameter_read_only**\ (\ parameter\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return whether the ``parameter`` is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. @@ -299,17 +309,19 @@ When inheriting from :ref:`AnimationRootNode`, implemen ---- -.. _class_AnimationNode_method__process: +.. _class_AnimationNode_private_method__process: .. rst-class:: classref-method -:ref:`float` **_process** **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| +:ref:`float` **_process**\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` + +**Deprecated:** Currently this is mostly useless as there is a lack of many APIs to extend AnimationNode by GDScript. It is planned that a more flexible API using structures will be provided in the future. When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this animation node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. Here, call the :ref:`blend_input`, :ref:`blend_node` or :ref:`blend_animation` functions. You can also use :ref:`get_parameter` and :ref:`set_parameter` to modify local memory. -This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called). +This function should return the delta. .. rst-class:: classref-item-separator @@ -319,7 +331,7 @@ This function should return the time left for the current animation to finish (i .. rst-class:: classref-method -:ref:`bool` **add_input** **(** :ref:`String` name **)** +:ref:`bool` **add_input**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Adds an input to the animation node. This is only useful for animation nodes created for use in an :ref:`AnimationNodeBlendTree`. If the addition fails, returns ``false``. @@ -331,7 +343,7 @@ Adds an input to the animation node. This is only useful for animation nodes cre .. rst-class:: classref-method -void **blend_animation** **(** :ref:`StringName` animation, :ref:`float` time, :ref:`float` delta, :ref:`bool` seeked, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`LoopedFlag` looped_flag=0 **)** +|void| **blend_animation**\ (\ animation\: :ref:`StringName`, time\: :ref:`float`, delta\: :ref:`float`, seeked\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, looped_flag\: :ref:`LoopedFlag` = 0\ ) :ref:`🔗` Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. @@ -345,7 +357,7 @@ A ``looped_flag`` is used by internal processing immediately after the loop. See .. rst-class:: classref-method -:ref:`float` **blend_input** **(** :ref:`int` input_index, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** +:ref:`float` **blend_input**\ (\ input_index\: :ref:`int`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) :ref:`🔗` Blend an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). @@ -357,9 +369,9 @@ Blend an input. This is only useful for animation nodes created for an :ref:`Ani .. rst-class:: classref-method -:ref:`float` **blend_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`float` blend, :ref:`FilterAction` filter=0, :ref:`bool` sync=true, :ref:`bool` test_only=false **)** +:ref:`float` **blend_node**\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) :ref:`🔗` -Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, else editors will not display your animation node for addition. +Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from :ref:`AnimationRootNode` instead, otherwise editors will not display your animation node for addition. .. rst-class:: classref-item-separator @@ -369,7 +381,7 @@ Blend another animation node (in case this animation node contains children anim .. rst-class:: classref-method -:ref:`int` **find_input** **(** :ref:`String` name **)** |const| +:ref:`int` **find_input**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` Returns the input index which corresponds to ``name``. If not found, returns ``-1``. @@ -381,7 +393,7 @@ Returns the input index which corresponds to ``name``. If not found, returns ``- .. rst-class:: classref-method -:ref:`int` **get_input_count** **(** **)** |const| +:ref:`int` **get_input_count**\ (\ ) |const| :ref:`🔗` Amount of inputs in this animation node, only useful for animation nodes that go into :ref:`AnimationNodeBlendTree`. @@ -393,7 +405,7 @@ Amount of inputs in this animation node, only useful for animation nodes that go .. rst-class:: classref-method -:ref:`String` **get_input_name** **(** :ref:`int` input **)** |const| +:ref:`String` **get_input_name**\ (\ input\: :ref:`int`\ ) |const| :ref:`🔗` Gets the name of an input by index. @@ -405,7 +417,7 @@ Gets the name of an input by index. .. rst-class:: classref-method -:ref:`Variant` **get_parameter** **(** :ref:`StringName` name **)** |const| +:ref:`Variant` **get_parameter**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. @@ -417,7 +429,7 @@ Gets the value of a parameter. Parameters are custom local memory used for your .. rst-class:: classref-method -:ref:`bool` **is_path_filtered** **(** :ref:`NodePath` path **)** |const| +:ref:`bool` **is_path_filtered**\ (\ path\: :ref:`NodePath`\ ) |const| :ref:`🔗` Returns whether the given path is filtered. @@ -429,7 +441,7 @@ Returns whether the given path is filtered. .. rst-class:: classref-method -void **remove_input** **(** :ref:`int` index **)** +|void| **remove_input**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Removes an input, call this only when inactive. @@ -441,7 +453,7 @@ Removes an input, call this only when inactive. .. rst-class:: classref-method -void **set_filter_path** **(** :ref:`NodePath` path, :ref:`bool` enable **)** +|void| **set_filter_path**\ (\ path\: :ref:`NodePath`, enable\: :ref:`bool`\ ) :ref:`🔗` Adds or removes a path for the filter. @@ -453,7 +465,7 @@ Adds or removes a path for the filter. .. rst-class:: classref-method -:ref:`bool` **set_input_name** **(** :ref:`int` input, :ref:`String` name **)** +:ref:`bool` **set_input_name**\ (\ input\: :ref:`int`, name\: :ref:`String`\ ) :ref:`🔗` Sets the name of the input at the given ``input`` index. If the setting fails, returns ``false``. @@ -465,7 +477,7 @@ Sets the name of the input at the given ``input`` index. If the setting fails, r .. rst-class:: classref-method -void **set_parameter** **(** :ref:`StringName` name, :ref:`Variant` value **)** +|void| **set_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`🔗` Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. @@ -476,3 +488,4 @@ Sets a custom parameter. These are used as local memory, because resources can b .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index 64a130851eb..c23b86a53bb 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -39,3 +39,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index 47d014cfbeb..f77b8f847b6 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -38,7 +38,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -47,3 +47,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 0402128cad7..734212e8862 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -28,9 +28,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -40,11 +40,21 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ - | :ref:`StringName` | :ref:`animation` | ``&""`` | - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ - | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | - +-------------------------------------------------------+-------------------------------------------------------------------+---------+ + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`animation` | ``&""`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`LoopMode` | :ref:`loop_mode` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`PlayMode` | :ref:`play_mode` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`start_offset` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`stretch_time_scale` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`timeline_length` | | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`use_custom_timeline` | ``false`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -59,7 +69,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PlayMode**: +enum **PlayMode**: :ref:`🔗` .. _class_AnimationNodeAnimation_constant_PLAY_MODE_FORWARD: @@ -90,12 +100,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName` **animation** = ``&""`` +:ref:`StringName` **animation** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_animation** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_animation** **(** **)** +- |void| **set_animation**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_animation**\ (\ ) Animation to use as an output. It is one of the animations provided by :ref:`AnimationTree.anim_player`. @@ -103,19 +113,110 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani ---- +.. _class_AnimationNodeAnimation_property_loop_mode: + +.. rst-class:: classref-property + +:ref:`LoopMode` **loop_mode** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) +- :ref:`LoopMode` **get_loop_mode**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeAnimation_property_play_mode: .. rst-class:: classref-property -:ref:`PlayMode` **play_mode** = ``0`` +:ref:`PlayMode` **play_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_play_mode** **(** :ref:`PlayMode` value **)** -- :ref:`PlayMode` **get_play_mode** **(** **)** +- |void| **set_play_mode**\ (\ value\: :ref:`PlayMode`\ ) +- :ref:`PlayMode` **get_play_mode**\ (\ ) Determines the playback direction of the animation. +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_start_offset: + +.. rst-class:: classref-property + +:ref:`float` **start_offset** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_start_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_start_offset**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. + +This is useful for adjusting which foot steps first in 3D walking animations. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_stretch_time_scale: + +.. rst-class:: classref-property + +:ref:`bool` **stretch_time_scale** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stretch_time_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_stretching_time_scale**\ (\ ) + +If ``true``, scales the time so that the length specified in :ref:`timeline_length` is one cycle. + +This is useful for matching the periods of walking and running animations. + +If ``false``, the original animation length is respected. If you set the loop to :ref:`loop_mode`, the animation will loop in :ref:`timeline_length`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_timeline_length: + +.. rst-class:: classref-property + +:ref:`float` **timeline_length** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_timeline_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_timeline_length**\ (\ ) + +If :ref:`use_custom_timeline` is ``true``, offset the start position of the animation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeAnimation_property_use_custom_timeline: + +.. rst-class:: classref-property + +:ref:`bool` **use_custom_timeline** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_custom_timeline**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_custom_timeline**\ (\ ) + +If ``true``, :ref:`AnimationNode` provides an animation based on the :ref:`Animation` resource with some parameters adjusted. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -123,3 +224,4 @@ Determines the playback direction of the animation. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index f9cee33de6b..53a14c5473b 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -30,9 +30,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -41,3 +41,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index 67782a4afed..4b7837d7e5a 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -45,3 +45,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index 6401bd1796b..a2647c28662 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -62,21 +62,21 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_blend_point` **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_point_count` **(** **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationRootNode` | :ref:`get_blend_point_node` **(** :ref:`int` point **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_point_position` **(** :ref:`int` point **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_blend_point` **(** :ref:`int` point **)** | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_point_node` **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_point_position` **(** :ref:`int` point, :ref:`float` pos **)** | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_blend_point`\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`float`, at_index\: :ref:`int` = -1\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_point_count`\ (\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationRootNode` | :ref:`get_blend_point_node`\ (\ point\: :ref:`int`\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_point_position`\ (\ point\: :ref:`int`\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_blend_point`\ (\ point\: :ref:`int`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_point_node`\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_point_position`\ (\ point\: :ref:`int`, pos\: :ref:`float`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,7 +91,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BlendMode**: +enum **BlendMode**: :ref:`🔗` .. _class_AnimationNodeBlendSpace1D_constant_BLEND_MODE_INTERPOLATED: @@ -130,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BlendMode` **blend_mode** = ``0`` +:ref:`BlendMode` **blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_mode** **(** :ref:`BlendMode` value **)** -- :ref:`BlendMode` **get_blend_mode** **(** **)** +- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) +- :ref:`BlendMode` **get_blend_mode**\ (\ ) Controls the interpolation between animations. See :ref:`BlendMode` constants. @@ -147,12 +147,12 @@ Controls the interpolation between animations. See :ref:`BlendMode` **max_space** = ``1.0`` +:ref:`float` **max_space** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_space** **(** :ref:`float` value **)** -- :ref:`float` **get_max_space** **(** **)** +- |void| **set_max_space**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_space**\ (\ ) The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point`. @@ -164,12 +164,12 @@ The blend space's axis's upper limit for the points' position. See :ref:`add_ble .. rst-class:: classref-property -:ref:`float` **min_space** = ``-1.0`` +:ref:`float` **min_space** = ``-1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_min_space** **(** :ref:`float` value **)** -- :ref:`float` **get_min_space** **(** **)** +- |void| **set_min_space**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_min_space**\ (\ ) The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point`. @@ -181,12 +181,12 @@ The blend space's axis's lower limit for the points' position. See :ref:`add_ble .. rst-class:: classref-property -:ref:`float` **snap** = ``0.1`` +:ref:`float` **snap** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_snap** **(** :ref:`float` value **)** -- :ref:`float` **get_snap** **(** **)** +- |void| **set_snap**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_snap**\ (\ ) Position increment to snap to when moving a point on the axis. @@ -198,12 +198,12 @@ Position increment to snap to when moving a point on the axis. .. rst-class:: classref-property -:ref:`bool` **sync** = ``false`` +:ref:`bool` **sync** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_sync** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_sync** **(** **)** +- |void| **set_use_sync**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_sync**\ (\ ) If ``false``, the blended animations' frame are stopped when the blend value is ``0``. @@ -217,12 +217,12 @@ If ``true``, forcing the blended animations to advance frame. .. rst-class:: classref-property -:ref:`String` **value_label** = ``"value"`` +:ref:`String` **value_label** = ``"value"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_value_label** **(** :ref:`String` value **)** -- :ref:`String` **get_value_label** **(** **)** +- |void| **set_value_label**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_value_label**\ (\ ) Label of the virtual axis of the blend space. @@ -239,7 +239,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`float` pos, :ref:`int` at_index=-1 **)** +|void| **add_blend_point**\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`float`, at_index\: :ref:`int` = -1\ ) :ref:`🔗` Adds a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array. @@ -251,7 +251,7 @@ Adds a new point that represents a ``node`` on the virtual axis at a given posit .. rst-class:: classref-method -:ref:`int` **get_blend_point_count** **(** **)** |const| +:ref:`int` **get_blend_point_count**\ (\ ) |const| :ref:`🔗` Returns the number of points on the blend axis. @@ -263,7 +263,7 @@ Returns the number of points on the blend axis. .. rst-class:: classref-method -:ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| +:ref:`AnimationRootNode` **get_blend_point_node**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the :ref:`AnimationNode` referenced by the point at index ``point``. @@ -275,7 +275,7 @@ Returns the :ref:`AnimationNode` referenced by the point at .. rst-class:: classref-method -:ref:`float` **get_blend_point_position** **(** :ref:`int` point **)** |const| +:ref:`float` **get_blend_point_position**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the point at index ``point``. @@ -287,7 +287,7 @@ Returns the position of the point at index ``point``. .. rst-class:: classref-method -void **remove_blend_point** **(** :ref:`int` point **)** +|void| **remove_blend_point**\ (\ point\: :ref:`int`\ ) :ref:`🔗` Removes the point at index ``point`` from the blend axis. @@ -299,7 +299,7 @@ Removes the point at index ``point`` from the blend axis. .. rst-class:: classref-method -void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +|void| **set_blend_point_node**\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) :ref:`🔗` Changes the :ref:`AnimationNode` referenced by the point at index ``point``. @@ -311,7 +311,7 @@ Changes the :ref:`AnimationNode` referenced by the point at .. rst-class:: classref-method -void **set_blend_point_position** **(** :ref:`int` point, :ref:`float` pos **)** +|void| **set_blend_point_position**\ (\ point\: :ref:`int`, pos\: :ref:`float`\ ) :ref:`🔗` Updates the position of the point at index ``point`` on the blend axis. @@ -322,3 +322,4 @@ Updates the position of the point at index ``point`` on the blend axis. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index 3c18fb7f6db..506b47bff25 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -32,7 +32,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -68,29 +68,29 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_blend_point` **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_triangle` **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` at_index=-1 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_point_count` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationRootNode` | :ref:`get_blend_point_node` **(** :ref:`int` point **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_blend_point_position` **(** :ref:`int` point **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_triangle_count` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_triangle_point` **(** :ref:`int` triangle, :ref:`int` point **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_blend_point` **(** :ref:`int` point **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_triangle` **(** :ref:`int` triangle **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_point_node` **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_point_position` **(** :ref:`int` point, :ref:`Vector2` pos **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_blend_point`\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`Vector2`, at_index\: :ref:`int` = -1\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_triangle`\ (\ x\: :ref:`int`, y\: :ref:`int`, z\: :ref:`int`, at_index\: :ref:`int` = -1\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_point_count`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationRootNode` | :ref:`get_blend_point_node`\ (\ point\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_blend_point_position`\ (\ point\: :ref:`int`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_triangle_count`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_triangle_point`\ (\ triangle\: :ref:`int`, point\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_blend_point`\ (\ point\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_triangle`\ (\ triangle\: :ref:`int`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_point_node`\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_point_position`\ (\ point\: :ref:`int`, pos\: :ref:`Vector2`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -105,7 +105,7 @@ Signals .. rst-class:: classref-signal -**triangles_updated** **(** **)** +**triangles_updated**\ (\ ) :ref:`🔗` Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. @@ -122,7 +122,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BlendMode**: +enum **BlendMode**: :ref:`🔗` .. _class_AnimationNodeBlendSpace2D_constant_BLEND_MODE_INTERPOLATED: @@ -161,12 +161,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **auto_triangles** = ``true`` +:ref:`bool` **auto_triangles** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_triangles** **(** :ref:`bool` value **)** -- :ref:`bool` **get_auto_triangles** **(** **)** +- |void| **set_auto_triangles**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_auto_triangles**\ (\ ) If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. @@ -178,12 +178,12 @@ If ``true``, the blend space is triangulated automatically. The mesh updates eve .. rst-class:: classref-property -:ref:`BlendMode` **blend_mode** = ``0`` +:ref:`BlendMode` **blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_mode** **(** :ref:`BlendMode` value **)** -- :ref:`BlendMode` **get_blend_mode** **(** **)** +- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) +- :ref:`BlendMode` **get_blend_mode**\ (\ ) Controls the interpolation between animations. See :ref:`BlendMode` constants. @@ -195,12 +195,12 @@ Controls the interpolation between animations. See :ref:`BlendMode` **max_space** = ``Vector2(1, 1)`` +:ref:`Vector2` **max_space** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_space** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_max_space** **(** **)** +- |void| **set_max_space**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_max_space**\ (\ ) The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point`. @@ -212,12 +212,12 @@ The blend space's X and Y axes' upper limit for the points' position. See :ref:` .. rst-class:: classref-property -:ref:`Vector2` **min_space** = ``Vector2(-1, -1)`` +:ref:`Vector2` **min_space** = ``Vector2(-1, -1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_min_space** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_min_space** **(** **)** +- |void| **set_min_space**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_min_space**\ (\ ) The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point`. @@ -229,12 +229,12 @@ The blend space's X and Y axes' lower limit for the points' position. See :ref:` .. rst-class:: classref-property -:ref:`Vector2` **snap** = ``Vector2(0.1, 0.1)`` +:ref:`Vector2` **snap** = ``Vector2(0.1, 0.1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_snap** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_snap** **(** **)** +- |void| **set_snap**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_snap**\ (\ ) Position increment to snap to when moving a point. @@ -246,12 +246,12 @@ Position increment to snap to when moving a point. .. rst-class:: classref-property -:ref:`bool` **sync** = ``false`` +:ref:`bool` **sync** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_sync** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_sync** **(** **)** +- |void| **set_use_sync**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_sync**\ (\ ) If ``false``, the blended animations' frame are stopped when the blend value is ``0``. @@ -265,12 +265,12 @@ If ``true``, forcing the blended animations to advance frame. .. rst-class:: classref-property -:ref:`String` **x_label** = ``"x"`` +:ref:`String` **x_label** = ``"x"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_x_label** **(** :ref:`String` value **)** -- :ref:`String` **get_x_label** **(** **)** +- |void| **set_x_label**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_x_label**\ (\ ) Name of the blend space's X axis. @@ -282,12 +282,12 @@ Name of the blend space's X axis. .. rst-class:: classref-property -:ref:`String` **y_label** = ``"y"`` +:ref:`String` **y_label** = ``"y"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_y_label** **(** :ref:`String` value **)** -- :ref:`String` **get_y_label** **(** **)** +- |void| **set_y_label**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_y_label**\ (\ ) Name of the blend space's Y axis. @@ -304,7 +304,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_blend_point** **(** :ref:`AnimationRootNode` node, :ref:`Vector2` pos, :ref:`int` at_index=-1 **)** +|void| **add_blend_point**\ (\ node\: :ref:`AnimationRootNode`, pos\: :ref:`Vector2`, at_index\: :ref:`int` = -1\ ) :ref:`🔗` Adds a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array. @@ -316,7 +316,7 @@ Adds a new point that represents a ``node`` at the position set by ``pos``. You .. rst-class:: classref-method -void **add_triangle** **(** :ref:`int` x, :ref:`int` y, :ref:`int` z, :ref:`int` at_index=-1 **)** +|void| **add_triangle**\ (\ x\: :ref:`int`, y\: :ref:`int`, z\: :ref:`int`, at_index\: :ref:`int` = -1\ ) :ref:`🔗` Creates a new triangle using three points ``x``, ``y``, and ``z``. Triangles can overlap. You can insert the triangle at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array. @@ -328,7 +328,7 @@ Creates a new triangle using three points ``x``, ``y``, and ``z``. Triangles can .. rst-class:: classref-method -:ref:`int` **get_blend_point_count** **(** **)** |const| +:ref:`int` **get_blend_point_count**\ (\ ) |const| :ref:`🔗` Returns the number of points in the blend space. @@ -340,7 +340,7 @@ Returns the number of points in the blend space. .. rst-class:: classref-method -:ref:`AnimationRootNode` **get_blend_point_node** **(** :ref:`int` point **)** |const| +:ref:`AnimationRootNode` **get_blend_point_node**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the :ref:`AnimationRootNode` referenced by the point at index ``point``. @@ -352,7 +352,7 @@ Returns the :ref:`AnimationRootNode` referenced by the .. rst-class:: classref-method -:ref:`Vector2` **get_blend_point_position** **(** :ref:`int` point **)** |const| +:ref:`Vector2` **get_blend_point_position**\ (\ point\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the point at index ``point``. @@ -364,7 +364,7 @@ Returns the position of the point at index ``point``. .. rst-class:: classref-method -:ref:`int` **get_triangle_count** **(** **)** |const| +:ref:`int` **get_triangle_count**\ (\ ) |const| :ref:`🔗` Returns the number of triangles in the blend space. @@ -376,7 +376,7 @@ Returns the number of triangles in the blend space. .. rst-class:: classref-method -:ref:`int` **get_triangle_point** **(** :ref:`int` triangle, :ref:`int` point **)** +:ref:`int` **get_triangle_point**\ (\ triangle\: :ref:`int`, point\: :ref:`int`\ ) :ref:`🔗` Returns the position of the point at index ``point`` in the triangle of index ``triangle``. @@ -388,7 +388,7 @@ Returns the position of the point at index ``point`` in the triangle of index `` .. rst-class:: classref-method -void **remove_blend_point** **(** :ref:`int` point **)** +|void| **remove_blend_point**\ (\ point\: :ref:`int`\ ) :ref:`🔗` Removes the point at index ``point`` from the blend space. @@ -400,7 +400,7 @@ Removes the point at index ``point`` from the blend space. .. rst-class:: classref-method -void **remove_triangle** **(** :ref:`int` triangle **)** +|void| **remove_triangle**\ (\ triangle\: :ref:`int`\ ) :ref:`🔗` Removes the triangle at index ``triangle`` from the blend space. @@ -412,7 +412,7 @@ Removes the triangle at index ``triangle`` from the blend space. .. rst-class:: classref-method -void **set_blend_point_node** **(** :ref:`int` point, :ref:`AnimationRootNode` node **)** +|void| **set_blend_point_node**\ (\ point\: :ref:`int`, node\: :ref:`AnimationRootNode`\ ) :ref:`🔗` Changes the :ref:`AnimationNode` referenced by the point at index ``point``. @@ -424,7 +424,7 @@ Changes the :ref:`AnimationNode` referenced by the point at .. rst-class:: classref-method -void **set_blend_point_position** **(** :ref:`int` point, :ref:`Vector2` pos **)** +|void| **set_blend_point_position**\ (\ point\: :ref:`int`, pos\: :ref:`Vector2`\ ) :ref:`🔗` Updates the position of the point at index ``point`` on the blend axis. @@ -435,3 +435,4 @@ Updates the position of the point at index ``point`` on the blend axis. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index 3f2678462c8..c2efe95881f 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -50,25 +50,25 @@ Methods .. table:: :widths: auto - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`connect_node` **(** :ref:`StringName` input_node, :ref:`int` input_index, :ref:`StringName` output_node **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_node` **(** :ref:`StringName` input_node, :ref:`int` input_index **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`get_node` **(** :ref:`StringName` name **)** |const| | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`StringName` name **)** |const| | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_node` **(** :ref:`StringName` name **)** |const| | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_node` **(** :ref:`StringName` name **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_node` **(** :ref:`StringName` name, :ref:`StringName` new_name **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_node_position` **(** :ref:`StringName` name, :ref:`Vector2` position **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`connect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node`\ (\ name\: :ref:`StringName`\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_node`\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_node_position`\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Signals .. rst-class:: classref-signal -**node_changed** **(** :ref:`StringName` node_name **)** +**node_changed**\ (\ node_name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when the input port information is changed. @@ -100,7 +100,7 @@ Constants .. rst-class:: classref-constant -**CONNECTION_OK** = ``0`` +**CONNECTION_OK** = ``0`` :ref:`🔗` The connection was successful. @@ -108,7 +108,7 @@ The connection was successful. .. rst-class:: classref-constant -**CONNECTION_ERROR_NO_INPUT** = ``1`` +**CONNECTION_ERROR_NO_INPUT** = ``1`` :ref:`🔗` The input node is ``null``. @@ -116,7 +116,7 @@ The input node is ``null``. .. rst-class:: classref-constant -**CONNECTION_ERROR_NO_INPUT_INDEX** = ``2`` +**CONNECTION_ERROR_NO_INPUT_INDEX** = ``2`` :ref:`🔗` The specified input port is out of range. @@ -124,7 +124,7 @@ The specified input port is out of range. .. rst-class:: classref-constant -**CONNECTION_ERROR_NO_OUTPUT** = ``3`` +**CONNECTION_ERROR_NO_OUTPUT** = ``3`` :ref:`🔗` The output node is ``null``. @@ -132,7 +132,7 @@ The output node is ``null``. .. rst-class:: classref-constant -**CONNECTION_ERROR_SAME_NODE** = ``4`` +**CONNECTION_ERROR_SAME_NODE** = ``4`` :ref:`🔗` Input and output nodes are the same. @@ -140,7 +140,7 @@ Input and output nodes are the same. .. rst-class:: classref-constant -**CONNECTION_ERROR_CONNECTION_EXISTS** = ``5`` +**CONNECTION_ERROR_CONNECTION_EXISTS** = ``5`` :ref:`🔗` The specified connection already exists. @@ -157,12 +157,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2` **graph_offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **graph_offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_graph_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_graph_offset** **(** **)** +- |void| **set_graph_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_graph_offset**\ (\ ) The global offset of all sub animation nodes. @@ -179,7 +179,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** +|void| **add_node**\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) :ref:`🔗` Adds an :ref:`AnimationNode` at the given ``position``. The ``name`` is used to identify the created sub animation node later. @@ -191,7 +191,7 @@ Adds an :ref:`AnimationNode` at the given ``position``. The .. rst-class:: classref-method -void **connect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index, :ref:`StringName` output_node **)** +|void| **connect_node**\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) :ref:`🔗` Connects the output of an :ref:`AnimationNode` as input for another :ref:`AnimationNode`, at the input port specified by ``input_index``. @@ -203,7 +203,7 @@ Connects the output of an :ref:`AnimationNode` as input for .. rst-class:: classref-method -void **disconnect_node** **(** :ref:`StringName` input_node, :ref:`int` input_index **)** +|void| **disconnect_node**\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) :ref:`🔗` Disconnects the animation node connected to the specified input. @@ -215,7 +215,7 @@ Disconnects the animation node connected to the specified input. .. rst-class:: classref-method -:ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| +:ref:`AnimationNode` **get_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the sub animation node with the specified ``name``. @@ -227,7 +227,7 @@ Returns the sub animation node with the specified ``name``. .. rst-class:: classref-method -:ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| +:ref:`Vector2` **get_node_position**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the position of the sub animation node with the specified ``name``. @@ -239,7 +239,7 @@ Returns the position of the sub animation node with the specified ``name``. .. rst-class:: classref-method -:ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if a sub animation node with specified ``name`` exists. @@ -251,7 +251,7 @@ Returns ``true`` if a sub animation node with specified ``name`` exists. .. rst-class:: classref-method -void **remove_node** **(** :ref:`StringName` name **)** +|void| **remove_node**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a sub animation node. @@ -263,7 +263,7 @@ Removes a sub animation node. .. rst-class:: classref-method -void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** +|void| **rename_node**\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`🔗` Changes the name of a sub animation node. @@ -275,7 +275,7 @@ Changes the name of a sub animation node. .. rst-class:: classref-method -void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** +|void| **set_node_position**\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) :ref:`🔗` Modifies the position of a sub animation node. @@ -286,3 +286,4 @@ Modifies the position of a sub animation node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 8ce199e9188..176e75af2e0 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -79,7 +79,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -96,6 +96,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`break_loop_at_end` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`Curve` | :ref:`fadein_curve` | | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadein_time` | ``0.0`` | @@ -120,7 +122,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OneShotRequest**: +enum **OneShotRequest**: :ref:`🔗` .. _class_AnimationNodeOneShot_constant_ONE_SHOT_REQUEST_NONE: @@ -162,7 +164,7 @@ The request to fade out the animation connected to "shot" port. .. rst-class:: classref-enumeration -enum **MixMode**: +enum **MixMode**: :ref:`🔗` .. _class_AnimationNodeOneShot_constant_MIX_MODE_BLEND: @@ -193,12 +195,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **autorestart** = ``false`` +:ref:`bool` **autorestart** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autorestart** **(** :ref:`bool` value **)** -- :ref:`bool` **has_autorestart** **(** **)** +- |void| **set_autorestart**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_autorestart**\ (\ ) If ``true``, the sub-animation will restart automatically after finishing. @@ -212,12 +214,12 @@ In other words, to start auto restarting, the animation must be played once with .. rst-class:: classref-property -:ref:`float` **autorestart_delay** = ``1.0`` +:ref:`float` **autorestart_delay** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autorestart_delay** **(** :ref:`float` value **)** -- :ref:`float` **get_autorestart_delay** **(** **)** +- |void| **set_autorestart_delay**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_autorestart_delay**\ (\ ) The delay after which the automatic restart is triggered, in seconds. @@ -229,12 +231,12 @@ The delay after which the automatic restart is triggered, in seconds. .. rst-class:: classref-property -:ref:`float` **autorestart_random_delay** = ``0.0`` +:ref:`float` **autorestart_random_delay** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autorestart_random_delay** **(** :ref:`float` value **)** -- :ref:`float` **get_autorestart_random_delay** **(** **)** +- |void| **set_autorestart_random_delay**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_autorestart_random_delay**\ (\ ) If :ref:`autorestart` is ``true``, a random additional delay (in seconds) between 0 and this value will be added to :ref:`autorestart_delay`. @@ -242,16 +244,33 @@ If :ref:`autorestart` is ``true ---- +.. _class_AnimationNodeOneShot_property_break_loop_at_end: + +.. rst-class:: classref-property + +:ref:`bool` **break_loop_at_end** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_break_loop_at_end**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_loop_broken_at_end**\ (\ ) + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeOneShot_property_fadein_curve: .. rst-class:: classref-property -:ref:`Curve` **fadein_curve** +:ref:`Curve` **fadein_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fadein_curve** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_fadein_curve** **(** **)** +- |void| **set_fadein_curve**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_fadein_curve**\ (\ ) Determines how cross-fading between animations is eased. If empty, the transition will be linear. @@ -263,15 +282,17 @@ Determines how cross-fading between animations is eased. If empty, the transitio .. rst-class:: classref-property -:ref:`float` **fadein_time** = ``0.0`` +:ref:`float` **fadein_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fadein_time** **(** :ref:`float` value **)** -- :ref:`float` **get_fadein_time** **(** **)** +- |void| **set_fadein_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fadein_time**\ (\ ) The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadein_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and a :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. + .. rst-class:: classref-item-separator ---- @@ -280,12 +301,12 @@ The fade-in duration. For example, setting this to ``1.0`` for a 5 second length .. rst-class:: classref-property -:ref:`Curve` **fadeout_curve** +:ref:`Curve` **fadeout_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fadeout_curve** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_fadeout_curve** **(** **)** +- |void| **set_fadeout_curve**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_fadeout_curve**\ (\ ) Determines how cross-fading between animations is eased. If empty, the transition will be linear. @@ -297,15 +318,17 @@ Determines how cross-fading between animations is eased. If empty, the transitio .. rst-class:: classref-property -:ref:`float` **fadeout_time** = ``0.0`` +:ref:`float` **fadeout_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fadeout_time** **(** :ref:`float` value **)** -- :ref:`float` **get_fadeout_time** **(** **)** +- |void| **set_fadeout_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fadeout_time**\ (\ ) The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadeout_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and an :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. + .. rst-class:: classref-item-separator ---- @@ -314,12 +337,12 @@ The fade-out duration. For example, setting this to ``1.0`` for a 5 second lengt .. rst-class:: classref-property -:ref:`MixMode` **mix_mode** = ``0`` +:ref:`MixMode` **mix_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mix_mode** **(** :ref:`MixMode` value **)** -- :ref:`MixMode` **get_mix_mode** **(** **)** +- |void| **set_mix_mode**\ (\ value\: :ref:`MixMode`\ ) +- :ref:`MixMode` **get_mix_mode**\ (\ ) The blend type. @@ -330,3 +353,4 @@ The blend type. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index e2a42ed16b8..17f6be4d6ee 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -28,9 +28,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -39,3 +39,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index dc2acc3a16d..f567081cc0b 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -69,45 +69,45 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_transition` **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_graph_offset` **(** **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`get_node` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_node_name` **(** :ref:`AnimationNode` node **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_node_position` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNodeStateMachineTransition` | :ref:`get_transition` **(** :ref:`int` idx **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_transition_count` **(** **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_transition_from` **(** :ref:`int` idx **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_transition_to` **(** :ref:`int` idx **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_node` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_transition` **(** :ref:`StringName` from, :ref:`StringName` to **)** |const| | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_node` **(** :ref:`StringName` name **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_transition` **(** :ref:`StringName` from, :ref:`StringName` to **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_transition_by_index` **(** :ref:`int` idx **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_node` **(** :ref:`StringName` name, :ref:`StringName` new_name **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`replace_node` **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_graph_offset` **(** :ref:`Vector2` offset **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_node_position` **(** :ref:`StringName` name, :ref:`Vector2` position **)** | - +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_transition`\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`, transition\: :ref:`AnimationNodeStateMachineTransition`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_graph_offset`\ (\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_node_name`\ (\ node\: :ref:`AnimationNode`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNodeStateMachineTransition` | :ref:`get_transition`\ (\ idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_transition_count`\ (\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_transition_from`\ (\ idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_transition_to`\ (\ idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_transition`\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node`\ (\ name\: :ref:`StringName`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_transition`\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_transition_by_index`\ (\ idx\: :ref:`int`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_node`\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`replace_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_graph_offset`\ (\ offset\: :ref:`Vector2`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_node_position`\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -122,7 +122,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **StateMachineType**: +enum **StateMachineType**: :ref:`🔗` .. _class_AnimationNodeStateMachine_constant_STATE_MACHINE_TYPE_ROOT: @@ -146,7 +146,7 @@ Seeking to the beginning is treated as seeking to the beginning of the animation :ref:`StateMachineType` **STATE_MACHINE_TYPE_GROUPED** = ``2`` -This is a grouped state machine that can be controlled from a parent state machine. It does not work on standalone. There must be a state machine with :ref:`state_machine_type` of :ref:`STATE_MACHINE_TYPE_ROOT` or :ref:`STATE_MACHINE_TYPE_NESTED` in the parent or ancestor. +This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with :ref:`state_machine_type` of :ref:`STATE_MACHINE_TYPE_ROOT` or :ref:`STATE_MACHINE_TYPE_NESTED` in the parent or ancestor. .. rst-class:: classref-section-separator @@ -161,12 +161,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **allow_transition_to_self** = ``false`` +:ref:`bool` **allow_transition_to_self** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_allow_transition_to_self** **(** :ref:`bool` value **)** -- :ref:`bool` **is_allow_transition_to_self** **(** **)** +- |void| **set_allow_transition_to_self**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_allow_transition_to_self**\ (\ ) If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state. @@ -178,12 +178,12 @@ If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMach .. rst-class:: classref-property -:ref:`bool` **reset_ends** = ``false`` +:ref:`bool` **reset_ends** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reset_ends** **(** :ref:`bool` value **)** -- :ref:`bool` **are_ends_reset** **(** **)** +- |void| **set_reset_ends**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_ends_reset**\ (\ ) If ``true``, treat the cross-fade to the start and end nodes as a blend with the RESET animation. @@ -197,12 +197,12 @@ In most cases, when additional cross-fades are performed in the parent :ref:`Ani .. rst-class:: classref-property -:ref:`StateMachineType` **state_machine_type** = ``0`` +:ref:`StateMachineType` **state_machine_type** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_state_machine_type** **(** :ref:`StateMachineType` value **)** -- :ref:`StateMachineType` **get_state_machine_type** **(** **)** +- |void| **set_state_machine_type**\ (\ value\: :ref:`StateMachineType`\ ) +- :ref:`StateMachineType` **get_state_machine_type**\ (\ ) This property can define the process of transitions for different use cases. See also :ref:`StateMachineType`. @@ -219,7 +219,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node, :ref:`Vector2` position=Vector2(0, 0) **)** +|void| **add_node**\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) :ref:`🔗` Adds a new animation node to the graph. The ``position`` is used for display in the editor. @@ -231,7 +231,7 @@ Adds a new animation node to the graph. The ``position`` is used for display in .. rst-class:: classref-method -void **add_transition** **(** :ref:`StringName` from, :ref:`StringName` to, :ref:`AnimationNodeStateMachineTransition` transition **)** +|void| **add_transition**\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`, transition\: :ref:`AnimationNodeStateMachineTransition`\ ) :ref:`🔗` Adds a transition between the given animation nodes. @@ -243,7 +243,7 @@ Adds a transition between the given animation nodes. .. rst-class:: classref-method -:ref:`Vector2` **get_graph_offset** **(** **)** |const| +:ref:`Vector2` **get_graph_offset**\ (\ ) |const| :ref:`🔗` Returns the draw offset of the graph. Used for display in the editor. @@ -255,7 +255,7 @@ Returns the draw offset of the graph. Used for display in the editor. .. rst-class:: classref-method -:ref:`AnimationNode` **get_node** **(** :ref:`StringName` name **)** |const| +:ref:`AnimationNode` **get_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the animation node with the given name. @@ -267,7 +267,7 @@ Returns the animation node with the given name. .. rst-class:: classref-method -:ref:`StringName` **get_node_name** **(** :ref:`AnimationNode` node **)** |const| +:ref:`StringName` **get_node_name**\ (\ node\: :ref:`AnimationNode`\ ) |const| :ref:`🔗` Returns the given animation node's name. @@ -279,7 +279,7 @@ Returns the given animation node's name. .. rst-class:: classref-method -:ref:`Vector2` **get_node_position** **(** :ref:`StringName` name **)** |const| +:ref:`Vector2` **get_node_position**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the given animation node's coordinates. Used for display in the editor. @@ -291,7 +291,7 @@ Returns the given animation node's coordinates. Used for display in the editor. .. rst-class:: classref-method -:ref:`AnimationNodeStateMachineTransition` **get_transition** **(** :ref:`int` idx **)** |const| +:ref:`AnimationNodeStateMachineTransition` **get_transition**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the given transition. @@ -303,7 +303,7 @@ Returns the given transition. .. rst-class:: classref-method -:ref:`int` **get_transition_count** **(** **)** |const| +:ref:`int` **get_transition_count**\ (\ ) |const| :ref:`🔗` Returns the number of connections in the graph. @@ -315,7 +315,7 @@ Returns the number of connections in the graph. .. rst-class:: classref-method -:ref:`StringName` **get_transition_from** **(** :ref:`int` idx **)** |const| +:ref:`StringName` **get_transition_from**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the given transition's start node. @@ -327,7 +327,7 @@ Returns the given transition's start node. .. rst-class:: classref-method -:ref:`StringName` **get_transition_to** **(** :ref:`int` idx **)** |const| +:ref:`StringName` **get_transition_to**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the given transition's end node. @@ -339,7 +339,7 @@ Returns the given transition's end node. .. rst-class:: classref-method -:ref:`bool` **has_node** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_node**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if the graph contains the given animation node. @@ -351,7 +351,7 @@ Returns ``true`` if the graph contains the given animation node. .. rst-class:: classref-method -:ref:`bool` **has_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** |const| +:ref:`bool` **has_transition**\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a transition between the given animation nodes. @@ -363,7 +363,7 @@ Returns ``true`` if there is a transition between the given animation nodes. .. rst-class:: classref-method -void **remove_node** **(** :ref:`StringName` name **)** +|void| **remove_node**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Deletes the given animation node from the graph. @@ -375,7 +375,7 @@ Deletes the given animation node from the graph. .. rst-class:: classref-method -void **remove_transition** **(** :ref:`StringName` from, :ref:`StringName` to **)** +|void| **remove_transition**\ (\ from\: :ref:`StringName`, to\: :ref:`StringName`\ ) :ref:`🔗` Deletes the transition between the two specified animation nodes. @@ -387,7 +387,7 @@ Deletes the transition between the two specified animation nodes. .. rst-class:: classref-method -void **remove_transition_by_index** **(** :ref:`int` idx **)** +|void| **remove_transition_by_index**\ (\ idx\: :ref:`int`\ ) :ref:`🔗` Deletes the given transition by index. @@ -399,7 +399,7 @@ Deletes the given transition by index. .. rst-class:: classref-method -void **rename_node** **(** :ref:`StringName` name, :ref:`StringName` new_name **)** +|void| **rename_node**\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`🔗` Renames the given animation node. @@ -411,11 +411,9 @@ Renames the given animation node. .. rst-class:: classref-method -void **replace_node** **(** :ref:`StringName` name, :ref:`AnimationNode` node **)** +|void| **replace_node**\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`\ ) :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Replaces the given animation node with a new animation node. .. rst-class:: classref-item-separator @@ -425,7 +423,7 @@ void **replace_node** **(** :ref:`StringName` name, :ref:`Anim .. rst-class:: classref-method -void **set_graph_offset** **(** :ref:`Vector2` offset **)** +|void| **set_graph_offset**\ (\ offset\: :ref:`Vector2`\ ) :ref:`🔗` Sets the draw offset of the graph. Used for display in the editor. @@ -437,7 +435,7 @@ Sets the draw offset of the graph. Used for display in the editor. .. rst-class:: classref-method -void **set_node_position** **(** :ref:`StringName` name, :ref:`Vector2` position **)** +|void| **set_node_position**\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) :ref:`🔗` Sets the animation node's coordinates. Used for display in the editor. @@ -448,3 +446,4 @@ Sets the animation node's coordinates. Used for display in the editor. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index 95f1f16cb12..221d1f62aa3 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -65,27 +65,27 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_current_length` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_current_node` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_current_play_position` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_fading_from_node` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`get_travel_path` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`next` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start` **(** :ref:`StringName` node, :ref:`bool` reset=true **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`travel` **(** :ref:`StringName` to_node, :ref:`bool` reset_on_teleport=true **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_current_length`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_current_node`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_current_play_position`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_fading_from_node`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_travel_path`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`next`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start`\ (\ node\: :ref:`StringName`, reset\: :ref:`bool` = true\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`travel`\ (\ to_node\: :ref:`StringName`, reset_on_teleport\: :ref:`bool` = true\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -100,7 +100,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_current_length** **(** **)** |const| +:ref:`float` **get_current_length**\ (\ ) |const| :ref:`🔗` Returns the current state length. @@ -114,7 +114,7 @@ Returns the current state length. .. rst-class:: classref-method -:ref:`StringName` **get_current_node** **(** **)** |const| +:ref:`StringName` **get_current_node**\ (\ ) |const| :ref:`🔗` Returns the currently playing animation state. @@ -128,7 +128,7 @@ Returns the currently playing animation state. .. rst-class:: classref-method -:ref:`float` **get_current_play_position** **(** **)** |const| +:ref:`float` **get_current_play_position**\ (\ ) |const| :ref:`🔗` Returns the playback position within the current animation state. @@ -140,7 +140,7 @@ Returns the playback position within the current animation state. .. rst-class:: classref-method -:ref:`StringName` **get_fading_from_node** **(** **)** |const| +:ref:`StringName` **get_fading_from_node**\ (\ ) |const| :ref:`🔗` Returns the starting state of currently fading animation. @@ -152,7 +152,7 @@ Returns the starting state of currently fading animation. .. rst-class:: classref-method -:ref:`StringName[]` **get_travel_path** **(** **)** |const| +:ref:`Array`\[:ref:`StringName`\] **get_travel_path**\ (\ ) |const| :ref:`🔗` Returns the current travel path as computed internally by the A\* algorithm. @@ -164,7 +164,7 @@ Returns the current travel path as computed internally by the A\* algorithm. .. rst-class:: classref-method -:ref:`bool` **is_playing** **(** **)** |const| +:ref:`bool` **is_playing**\ (\ ) |const| :ref:`🔗` Returns ``true`` if an animation is playing. @@ -176,7 +176,7 @@ Returns ``true`` if an animation is playing. .. rst-class:: classref-method -void **next** **(** **)** +|void| **next**\ (\ ) :ref:`🔗` If there is a next path by travel or auto advance, immediately transitions from the current state to the next state. @@ -188,7 +188,7 @@ If there is a next path by travel or auto advance, immediately transitions from .. rst-class:: classref-method -void **start** **(** :ref:`StringName` node, :ref:`bool` reset=true **)** +|void| **start**\ (\ node\: :ref:`StringName`, reset\: :ref:`bool` = true\ ) :ref:`🔗` Starts playing the given animation. @@ -202,7 +202,7 @@ If ``reset`` is ``true``, the animation is played from the beginning. .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗` Stops the currently playing animation. @@ -214,7 +214,7 @@ Stops the currently playing animation. .. rst-class:: classref-method -void **travel** **(** :ref:`StringName` to_node, :ref:`bool` reset_on_teleport=true **)** +|void| **travel**\ (\ to_node\: :ref:`StringName`, reset_on_teleport\: :ref:`bool` = true\ ) :ref:`🔗` Transitions from the current state to another one, following the shortest path. @@ -229,3 +229,4 @@ If ``reset_on_teleport`` is ``true``, the animation is played from the beginning .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 97ab5127bee..1a4973608e7 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -38,23 +38,25 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`String` | :ref:`advance_expression` | ``""`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`AdvanceMode` | :ref:`advance_mode` | ``1`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`int` | :ref:`priority` | ``1`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`reset` | ``true`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`Curve` | :ref:`xfade_curve` | | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ - | :ref:`float` | :ref:`xfade_time` | ``0.0`` | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+----------+ + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`StringName` | :ref:`advance_condition` | ``&""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`advance_expression` | ``""`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`AdvanceMode` | :ref:`advance_mode` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`break_loop_at_end` | ``false`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`priority` | ``1`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`reset` | ``true`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`SwitchMode` | :ref:`switch_mode` | ``0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`xfade_curve` | | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`xfade_time` | ``0.0`` | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -69,7 +71,7 @@ Signals .. rst-class:: classref-signal -**advance_condition_changed** **(** **)** +**advance_condition_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`advance_condition` is changed. @@ -86,7 +88,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SwitchMode**: +enum **SwitchMode**: :ref:`🔗` .. _class_AnimationNodeStateMachineTransition_constant_SWITCH_MODE_IMMEDIATE: @@ -120,7 +122,7 @@ Wait for the current state playback to end, then switch to the beginning of the .. rst-class:: classref-enumeration -enum **AdvanceMode**: +enum **AdvanceMode**: :ref:`🔗` .. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_DISABLED: @@ -159,12 +161,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName` **advance_condition** = ``&""`` +:ref:`StringName` **advance_condition** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_advance_condition** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_advance_condition** **(** **)** +- |void| **set_advance_condition**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_advance_condition**\ (\ ) Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree` that can be controlled from code (see `Using AnimationTree <../tutorials/animation/animation_tree.html#controlling-from-code>`__). For example, if :ref:`AnimationTree.tree_root` is an :ref:`AnimationNodeStateMachine` and :ref:`advance_condition` is set to ``"idle"``: @@ -189,12 +191,12 @@ Turn on auto advance when this condition is set. The provided name will become a .. rst-class:: classref-property -:ref:`String` **advance_expression** = ``""`` +:ref:`String` **advance_expression** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_advance_expression** **(** :ref:`String` value **)** -- :ref:`String` **get_advance_expression** **(** **)** +- |void| **set_advance_expression**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_advance_expression**\ (\ ) Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. @@ -206,12 +208,12 @@ Use an expression as a condition for state machine transitions. It is possible t .. rst-class:: classref-property -:ref:`AdvanceMode` **advance_mode** = ``1`` +:ref:`AdvanceMode` **advance_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_advance_mode** **(** :ref:`AdvanceMode` value **)** -- :ref:`AdvanceMode` **get_advance_mode** **(** **)** +- |void| **set_advance_mode**\ (\ value\: :ref:`AdvanceMode`\ ) +- :ref:`AdvanceMode` **get_advance_mode**\ (\ ) Determines whether the transition should disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). @@ -219,16 +221,33 @@ Determines whether the transition should disabled, enabled when using :ref:`Anim ---- +.. _class_AnimationNodeStateMachineTransition_property_break_loop_at_end: + +.. rst-class:: classref-property + +:ref:`bool` **break_loop_at_end** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_break_loop_at_end**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_loop_broken_at_end**\ (\ ) + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeStateMachineTransition_property_priority: .. rst-class:: classref-property -:ref:`int` **priority** = ``1`` +:ref:`int` **priority** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`int` value **)** -- :ref:`int` **get_priority** **(** **)** +- |void| **set_priority**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_priority**\ (\ ) Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. @@ -240,12 +259,12 @@ Lower priority transitions are preferred when travelling through the tree via :r .. rst-class:: classref-property -:ref:`bool` **reset** = ``true`` +:ref:`bool` **reset** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reset** **(** :ref:`bool` value **)** -- :ref:`bool` **is_reset** **(** **)** +- |void| **set_reset**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_reset**\ (\ ) If ``true``, the destination animation is played back from the beginning when switched. @@ -257,12 +276,12 @@ If ``true``, the destination animation is played back from the beginning when sw .. rst-class:: classref-property -:ref:`SwitchMode` **switch_mode** = ``0`` +:ref:`SwitchMode` **switch_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_switch_mode** **(** :ref:`SwitchMode` value **)** -- :ref:`SwitchMode` **get_switch_mode** **(** **)** +- |void| **set_switch_mode**\ (\ value\: :ref:`SwitchMode`\ ) +- :ref:`SwitchMode` **get_switch_mode**\ (\ ) The transition type. @@ -274,12 +293,12 @@ The transition type. .. rst-class:: classref-property -:ref:`Curve` **xfade_curve** +:ref:`Curve` **xfade_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_xfade_curve** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_xfade_curve** **(** **)** +- |void| **set_xfade_curve**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_xfade_curve**\ (\ ) Ease curve for better control over cross-fade between this state and the next. @@ -291,15 +310,17 @@ Ease curve for better control over cross-fade between this state and the next. .. rst-class:: classref-property -:ref:`float` **xfade_time** = ``0.0`` +:ref:`float` **xfade_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_xfade_time** **(** :ref:`float` value **)** -- :ref:`float` **get_xfade_time** **(** **)** +- |void| **set_xfade_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_xfade_time**\ (\ ) The time to cross-fade between this state and the next. +\ **Note:** :ref:`AnimationNodeStateMachine` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -307,3 +328,4 @@ The time to cross-fade between this state and the next. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodesub2.rst b/classes/class_animationnodesub2.rst index d5c78a34894..8a62e6d4417 100644 --- a/classes/class_animationnodesub2.rst +++ b/classes/class_animationnodesub2.rst @@ -41,3 +41,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodesync.rst b/classes/class_animationnodesync.rst index 61f12ed8e1b..bbe20f0a346 100644 --- a/classes/class_animationnodesync.rst +++ b/classes/class_animationnodesync.rst @@ -14,7 +14,7 @@ AnimationNodeSync **Inherited By:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeSub2`, :ref:`AnimationNodeTransition` -Base class for :ref:`AnimationNode`\ s with more than two input ports that must be synchronized. +Base class for :ref:`AnimationNode`\ s with multiple input ports that must be synchronized. .. rst-class:: classref-introduction-group @@ -55,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **sync** = ``false`` +:ref:`bool` **sync** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_sync** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_sync** **(** **)** +- |void| **set_use_sync**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_sync**\ (\ ) If ``false``, the blended animations' frame are stopped when the blend value is ``0``. @@ -73,3 +73,4 @@ If ``true``, forcing the blended animations to advance frame. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index ae36d63988f..7d19d1419f9 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -19,7 +19,7 @@ A time-scaling animation node used in :ref:`AnimationTree`. Description ----------- -Allows to scale the speed of the animation (or reverse it) in any children :ref:`AnimationNode`\ s. Setting it to ``0.0`` will pause the animation. +Allows to scale the speed of the animation (or reverse it) in any child :ref:`AnimationNode`\ s. Setting it to ``0.0`` will pause the animation. .. rst-class:: classref-introduction-group @@ -28,7 +28,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -37,3 +37,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index dff81716df6..c9ec75ffdcd 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -62,3 +62,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index f4b40e2dd5b..f79beea9972 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -65,9 +65,9 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -95,15 +95,19 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_input_reset` **(** :ref:`int` input **)** |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_input_set_as_auto_advance` **(** :ref:`int` input **)** |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_as_auto_advance` **(** :ref:`int` input, :ref:`bool` enable **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_reset` **(** :ref:`int` input, :ref:`bool` enable **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_loop_broken_at_end`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_reset`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_input_set_as_auto_advance`\ (\ input\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_as_auto_advance`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_break_loop_at_end`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_reset`\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -118,12 +122,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **allow_transition_to_self** = ``false`` +:ref:`bool` **allow_transition_to_self** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_allow_transition_to_self** **(** :ref:`bool` value **)** -- :ref:`bool` **is_allow_transition_to_self** **(** **)** +- |void| **set_allow_transition_to_self**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_allow_transition_to_self**\ (\ ) If ``true``, allows transition to the self state. When the reset option is enabled in input, the animation is restarted. If ``false``, nothing happens on the transition to the self state. @@ -135,12 +139,12 @@ If ``true``, allows transition to the self state. When the reset option is enabl .. rst-class:: classref-property -:ref:`int` **input_count** = ``0`` +:ref:`int` **input_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_input_count** **(** :ref:`int` value **)** -- :ref:`int` **get_input_count** **(** **)** +- |void| **set_input_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_input_count**\ (\ ) The number of enabled input ports for this animation node. @@ -152,12 +156,12 @@ The number of enabled input ports for this animation node. .. rst-class:: classref-property -:ref:`Curve` **xfade_curve** +:ref:`Curve` **xfade_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_xfade_curve** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_xfade_curve** **(** **)** +- |void| **set_xfade_curve**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_xfade_curve**\ (\ ) Determines how cross-fading between animations is eased. If empty, the transition will be linear. @@ -169,15 +173,17 @@ Determines how cross-fading between animations is eased. If empty, the transitio .. rst-class:: classref-property -:ref:`float` **xfade_time** = ``0.0`` +:ref:`float` **xfade_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_xfade_time** **(** :ref:`float` value **)** -- :ref:`float` **get_xfade_time** **(** **)** +- |void| **set_xfade_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_xfade_time**\ (\ ) Cross-fading time (in seconds) between each animation connected to the inputs. +\ **Note:** **AnimationNodeTransition** transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. + .. rst-class:: classref-section-separator ---- @@ -187,11 +193,23 @@ Cross-fading time (in seconds) between each animation connected to the inputs. Method Descriptions ------------------- +.. _class_AnimationNodeTransition_method_is_input_loop_broken_at_end: + +.. rst-class:: classref-method + +:ref:`bool` **is_input_loop_broken_at_end**\ (\ input\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns whether the animation breaks the loop at the end of the loop cycle for transition. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeTransition_method_is_input_reset: .. rst-class:: classref-method -:ref:`bool` **is_input_reset** **(** :ref:`int` input **)** |const| +:ref:`bool` **is_input_reset**\ (\ input\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the animation restarts when the animation transitions from the other animation. @@ -203,7 +221,7 @@ Returns whether the animation restarts when the animation transitions from the o .. rst-class:: classref-method -:ref:`bool` **is_input_set_as_auto_advance** **(** :ref:`int` input **)** |const| +:ref:`bool` **is_input_set_as_auto_advance**\ (\ input\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if auto-advance is enabled for the given ``input`` index. @@ -215,7 +233,7 @@ Returns ``true`` if auto-advance is enabled for the given ``input`` index. .. rst-class:: classref-method -void **set_input_as_auto_advance** **(** :ref:`int` input, :ref:`bool` enable **)** +|void| **set_input_as_auto_advance**\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` Enables or disables auto-advance for the given ``input`` index. If enabled, state changes to the next input after playing the animation once. If enabled for the last input state, it loops to the first. @@ -223,11 +241,23 @@ Enables or disables auto-advance for the given ``input`` index. If enabled, stat ---- +.. _class_AnimationNodeTransition_method_set_input_break_loop_at_end: + +.. rst-class:: classref-method + +|void| **set_input_break_loop_at_end**\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` + +If ``true``, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeTransition_method_set_input_reset: .. rst-class:: classref-method -void **set_input_reset** **(** :ref:`int` input, :ref:`bool` enable **)** +|void| **set_input_reset**\ (\ input\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the destination animation is restarted when the animation transitions. @@ -238,3 +268,4 @@ If ``true``, the destination animation is restarted when the animation transitio .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index fedf56ff130..ffa39105dba 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -10,7 +10,7 @@ AnimationPlayer =============== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` A node used for animation playback. @@ -36,7 +36,7 @@ Tutorials - :doc:`Animation documentation index <../tutorials/animation/index>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -46,35 +46,31 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`assigned_animation` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`autoplay` | ``""`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`current_animation` | ``""`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`current_animation_length` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`current_animation_position` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`AnimationMethodCallMode` | :ref:`method_call_mode` | ``0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`movie_quit_on_finish` | ``false`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`playback_active` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`playback_default_blend_time` | ``0.0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`AnimationProcessCallback` | :ref:`playback_process_mode` | ``1`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`reset_on_save` | ``true`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`speed_scale` | ``1.0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`assigned_animation` | | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`autoplay` | ``""`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`current_animation` | ``""`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`current_animation_length` | | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`current_animation_position` | | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`movie_quit_on_finish` | ``false`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`playback_auto_capture` | ``true`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`playback_auto_capture_duration` | ``-1.0`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`EaseType` | :ref:`playback_auto_capture_ease_type` | ``0`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`TransitionType` | :ref:`playback_auto_capture_transition_type` | ``0`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`playback_default_blend_time` | ``0.0`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -84,63 +80,49 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`advance` **(** :ref:`float` delta **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`animation_get_next` **(** :ref:`StringName` anim_from **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`animation_set_next` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_caches` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_queue` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_time` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playing_speed` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_queue` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pause` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_backwards` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`float` seconds, :ref:`bool` update=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_time` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** :ref:`bool` keep_state=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`animation_get_next`\ (\ animation_from\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`animation_set_next`\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_queue`\ (\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_time`\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationMethodCallMode` | :ref:`get_method_call_mode`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playing_speed`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationProcessCallback` | :ref:`get_process_callback`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_queue`\ (\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_root`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pause`\ (\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ name\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_backwards`\ (\ name\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_with_capture`\ (\ name\: :ref:`StringName` = &"", duration\: :ref:`float` = -1.0, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ seconds\: :ref:`float`, update\: :ref:`bool` = false, update_only\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_time`\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`, sec\: :ref:`float`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_method_call_mode`\ (\ mode\: :ref:`AnimationMethodCallMode`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_callback`\ (\ mode\: :ref:`AnimationProcessCallback`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_root`\ (\ path\: :ref:`NodePath`\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ keep_state\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,9 +137,9 @@ Signals .. rst-class:: classref-signal -**animation_changed** **(** :ref:`StringName` old_name, :ref:`StringName` new_name **)** +**animation_changed**\ (\ old_name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`🔗` -Emitted when a queued animation plays after the previous animation finished. See :ref:`queue`. +Emitted when a queued animation plays after the previous animation finished. See also :ref:`queue`. \ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or by an :ref:`AnimationTree`. @@ -165,63 +147,13 @@ Emitted when a queued animation plays after the previous animation finished. See ---- -.. _class_AnimationPlayer_signal_animation_finished: +.. _class_AnimationPlayer_signal_current_animation_changed: .. rst-class:: classref-signal -**animation_finished** **(** :ref:`StringName` anim_name **)** +**current_animation_changed**\ (\ name\: :ref:`String`\ ) :ref:`🔗` -Notifies when an animation finished playing. - -\ **Note:** This signal is not emitted if an animation is looping. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_libraries_updated: - -.. rst-class:: classref-signal - -**animation_libraries_updated** **(** **)** - -Notifies when the animation libraries have changed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_list_changed: - -.. rst-class:: classref-signal - -**animation_list_changed** **(** **)** - -Notifies when an animation list is changed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_started: - -.. rst-class:: classref-signal - -**animation_started** **(** :ref:`StringName` anim_name **)** - -Notifies when an animation starts playing. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_caches_cleared: - -.. rst-class:: classref-signal - -**caches_cleared** **(** **)** - -Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches`. +Emitted when :ref:`current_animation` changes. .. rst-class:: classref-section-separator @@ -236,7 +168,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AnimationProcessCallback**: +enum **AnimationProcessCallback**: :ref:`🔗` .. _class_AnimationPlayer_constant_ANIMATION_PROCESS_PHYSICS: @@ -244,7 +176,9 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` -Process animation during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`). This is especially useful when animating physics bodies. +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`. + + .. _class_AnimationPlayer_constant_ANIMATION_PROCESS_IDLE: @@ -252,7 +186,9 @@ Process animation during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PH :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` -Process animation during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`). +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE`. + + .. _class_AnimationPlayer_constant_ANIMATION_PROCESS_MANUAL: @@ -260,7 +196,9 @@ Process animation during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PR :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` -Do not process animation. Use :ref:`advance` to process the animation manually. +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`. + + .. rst-class:: classref-item-separator @@ -270,7 +208,7 @@ Do not process animation. Use :ref:`advance` .. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_DEFERRED: @@ -278,7 +216,9 @@ enum **AnimationMethodCallMode**: :ref:`AnimationMethodCallMode` **ANIMATION_METHOD_CALL_DEFERRED** = ``0`` -Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing. +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED`. + + .. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_IMMEDIATE: @@ -286,7 +226,9 @@ Batch method calls during the animation process, then do the calls after events :ref:`AnimationMethodCallMode` **ANIMATION_METHOD_CALL_IMMEDIATE** = ``1`` -Make method calls immediately when reached in the animation. +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE`. + + .. rst-class:: classref-section-separator @@ -301,12 +243,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **assigned_animation** +:ref:`String` **assigned_animation** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_assigned_animation** **(** :ref:`String` value **)** -- :ref:`String` **get_assigned_animation** **(** **)** +- |void| **set_assigned_animation**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_assigned_animation**\ (\ ) If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also :ref:`current_animation`. @@ -314,35 +256,16 @@ If playing, the current animation's key, otherwise, the animation last played. W ---- -.. _class_AnimationPlayer_property_audio_max_polyphony: - -.. rst-class:: classref-property - -:ref:`int` **audio_max_polyphony** = ``32`` - -.. rst-class:: classref-property-setget - -- void **set_audio_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_audio_max_polyphony** **(** **)** - -The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. - -For example, if this value is ``32`` and the animation has two audio tracks, the two :ref:`AudioStreamPlayer`\ s assigned can play simultaneously up to ``32`` voices each. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_property_autoplay: .. rst-class:: classref-property -:ref:`String` **autoplay** = ``""`` +:ref:`String` **autoplay** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`String` value **)** -- :ref:`String` **get_autoplay** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_autoplay**\ (\ ) The key of the animation to play when the scene loads. @@ -354,12 +277,12 @@ The key of the animation to play when the scene loads. .. rst-class:: classref-property -:ref:`String` **current_animation** = ``""`` +:ref:`String` **current_animation** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_current_animation** **(** :ref:`String` value **)** -- :ref:`String` **get_current_animation** **(** **)** +- |void| **set_current_animation**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_current_animation**\ (\ ) The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play` for more information on playing animations. @@ -373,11 +296,11 @@ The key of the currently playing animation. If no animation is playing, the prop .. rst-class:: classref-property -:ref:`float` **current_animation_length** +:ref:`float` **current_animation_length** :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_current_animation_length** **(** **)** +- :ref:`float` **get_current_animation_length**\ (\ ) The length (in seconds) of the currently playing animation. @@ -389,11 +312,11 @@ The length (in seconds) of the currently playing animation. .. rst-class:: classref-property -:ref:`float` **current_animation_position** +:ref:`float` **current_animation_position** :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_current_animation_position** **(** **)** +- :ref:`float` **get_current_animation_position**\ (\ ) The position (in seconds) of the currently playing animation. @@ -401,124 +324,109 @@ The position (in seconds) of the currently playing animation. ---- -.. _class_AnimationPlayer_property_method_call_mode: - -.. rst-class:: classref-property - -:ref:`AnimationMethodCallMode` **method_call_mode** = ``0`` - -.. rst-class:: classref-property-setget - -- void **set_method_call_mode** **(** :ref:`AnimationMethodCallMode` value **)** -- :ref:`AnimationMethodCallMode` **get_method_call_mode** **(** **)** - -The call mode to use for Call Method tracks. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_property_movie_quit_on_finish: .. rst-class:: classref-property -:ref:`bool` **movie_quit_on_finish** = ``false`` +:ref:`bool` **movie_quit_on_finish** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_movie_quit_on_finish_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_movie_quit_on_finish_enabled** **(** **)** +- |void| **set_movie_quit_on_finish_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_movie_quit_on_finish_enabled**\ (\ ) If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit` as soon as an animation is done playing in this **AnimationPlayer**. A message is printed when the engine quits for this reason. -\ **Note:** This obeys the same logic as the :ref:`animation_finished` signal, so it will not quit the engine if the animation is set to be looping. +\ **Note:** This obeys the same logic as the :ref:`AnimationMixer.animation_finished` signal, so it will not quit the engine if the animation is set to be looping. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_property_playback_active: +.. _class_AnimationPlayer_property_playback_auto_capture: .. rst-class:: classref-property -:ref:`bool` **playback_active** +:ref:`bool` **playback_auto_capture** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_active** **(** **)** +- |void| **set_auto_capture**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_capture**\ (\ ) + +If ``true``, performs :ref:`AnimationMixer.capture` before playback automatically. This means just :ref:`play_with_capture` is executed with default arguments instead of :ref:`play`. -If ``true``, updates animations in response to process-related notifications. +\ **Note:** Capture interpolation is only performed if the animation contains a capture track. See also :ref:`Animation.UPDATE_CAPTURE`. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_property_playback_default_blend_time: +.. _class_AnimationPlayer_property_playback_auto_capture_duration: .. rst-class:: classref-property -:ref:`float` **playback_default_blend_time** = ``0.0`` +:ref:`float` **playback_auto_capture_duration** = ``-1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_default_blend_time** **(** :ref:`float` value **)** -- :ref:`float` **get_default_blend_time** **(** **)** +- |void| **set_auto_capture_duration**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_capture_duration**\ (\ ) -The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. +See also :ref:`play_with_capture` and :ref:`AnimationMixer.capture`. + +If :ref:`playback_auto_capture_duration` is negative value, the duration is set to the interval between the current position and the first key. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_property_playback_process_mode: +.. _class_AnimationPlayer_property_playback_auto_capture_ease_type: .. rst-class:: classref-property -:ref:`AnimationProcessCallback` **playback_process_mode** = ``1`` +:ref:`EaseType` **playback_auto_capture_ease_type** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_process_callback** **(** :ref:`AnimationProcessCallback` value **)** -- :ref:`AnimationProcessCallback` **get_process_callback** **(** **)** +- |void| **set_auto_capture_ease_type**\ (\ value\: :ref:`EaseType`\ ) +- :ref:`EaseType` **get_auto_capture_ease_type**\ (\ ) -The process notification in which to update animations. +The ease type of the capture interpolation. See also :ref:`EaseType`. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_property_reset_on_save: +.. _class_AnimationPlayer_property_playback_auto_capture_transition_type: .. rst-class:: classref-property -:ref:`bool` **reset_on_save** = ``true`` +:ref:`TransitionType` **playback_auto_capture_transition_type** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reset_on_save_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_reset_on_save_enabled** **(** **)** - -This is used by the editor. If set to ``true``, the scene will be saved with the effects of the reset animation (the animation with the key ``"RESET"``) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. +- |void| **set_auto_capture_transition_type**\ (\ value\: :ref:`TransitionType`\ ) +- :ref:`TransitionType` **get_auto_capture_transition_type**\ (\ ) -This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. +The transition type of the capture interpolation. See also :ref:`TransitionType`. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_property_root_node: +.. _class_AnimationPlayer_property_playback_default_blend_time: .. rst-class:: classref-property -:ref:`NodePath` **root_node** = ``NodePath("..")`` +:ref:`float` **playback_default_blend_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_root** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_root** **(** **)** +- |void| **set_default_blend_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_default_blend_time**\ (\ ) -The node from which node path references will travel. +The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. .. rst-class:: classref-item-separator @@ -528,12 +436,12 @@ The node from which node path references will travel. .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) The speed scaling ratio. For example, if this value is ``1``, then the animation plays at normal speed. If it's ``0.5``, then it plays at half speed. If it's ``2``, then it plays at double speed. @@ -548,49 +456,13 @@ If set to a negative value, the animation is played in reverse. If set to ``0``, Method Descriptions ------------------- -.. _class_AnimationPlayer_method__post_process_key_value: - -.. rst-class:: classref-method - -:ref:`Variant` **_post_process_key_value** **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| - -A virtual function for processing after key getting during playback. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_add_animation_library: - -.. rst-class:: classref-method - -:ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** - -Adds ``library`` to the animation player, under the key ``name``. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_advance: - -.. rst-class:: classref-method - -void **advance** **(** :ref:`float` delta **)** - -Shifts position in the animation timeline and immediately updates the animation. ``delta`` is the time in seconds to shift. Events between the current frame and ``delta`` are handled. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_method_animation_get_next: .. rst-class:: classref-method -:ref:`StringName` **animation_get_next** **(** :ref:`StringName` anim_from **)** |const| +:ref:`StringName` **animation_get_next**\ (\ animation_from\: :ref:`StringName`\ ) |const| :ref:`🔗` -Returns the key of the animation which is queued to play after the ``anim_from`` animation. +Returns the key of the animation which is queued to play after the ``animation_from`` animation. .. rst-class:: classref-item-separator @@ -600,21 +472,9 @@ Returns the key of the animation which is queued to play after the ``anim_from`` .. rst-class:: classref-method -void **animation_set_next** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** +|void| **animation_set_next**\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`\ ) :ref:`🔗` -Triggers the ``anim_to`` animation when the ``anim_from`` animation completes. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_clear_caches: - -.. rst-class:: classref-method - -void **clear_caches** **(** **)** - -**AnimationPlayer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. +Triggers the ``animation_to`` animation when the ``animation_from`` animation completes. .. rst-class:: classref-item-separator @@ -624,7 +484,7 @@ void **clear_caches** **(** **)** .. rst-class:: classref-method -void **clear_queue** **(** **)** +|void| **clear_queue**\ (\ ) :ref:`🔗` Clears all queued, unplayed animations. @@ -632,259 +492,248 @@ Clears all queued, unplayed animations. ---- -.. _class_AnimationPlayer_method_find_animation: +.. _class_AnimationPlayer_method_get_blend_time: .. rst-class:: classref-method -:ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| +:ref:`float` **get_blend_time**\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`\ ) |const| :ref:`🔗` -Returns the key of ``animation`` or an empty :ref:`StringName` if not found. +Returns the blend time (in seconds) between two animations, referenced by their keys. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_find_animation_library: +.. _class_AnimationPlayer_method_get_method_call_mode: .. rst-class:: classref-method -:ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| +:ref:`AnimationMethodCallMode` **get_method_call_mode**\ (\ ) |const| :ref:`🔗` -Returns the key for the :ref:`AnimationLibrary` that contains ``animation`` or an empty :ref:`StringName` if not found. +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_method` instead. + +Returns the call mode used for "Call Method" tracks. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_animation: +.. _class_AnimationPlayer_method_get_playing_speed: .. rst-class:: classref-method -:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| +:ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`🔗` + +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. -Returns the :ref:`Animation` with the key ``name``. If the animation does not exist, ``null`` is returned and an error is logged. +Returns a negative value if the current animation is playing backwards. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_animation_library: +.. _class_AnimationPlayer_method_get_process_callback: .. rst-class:: classref-method -:ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| +:ref:`AnimationProcessCallback` **get_process_callback**\ (\ ) |const| :ref:`🔗` -Returns the first :ref:`AnimationLibrary` with key ``name`` or ``null`` if not found. +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. -To get the **AnimationPlayer**'s global animation library, use ``get_animation_library("")``. +Returns the process notification in which to update animations. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_animation_library_list: +.. _class_AnimationPlayer_method_get_queue: .. rst-class:: classref-method -:ref:`StringName[]` **get_animation_library_list** **(** **)** |const| +:ref:`PackedStringArray` **get_queue**\ (\ ) :ref:`🔗` -Returns the list of stored library keys. +Returns a list of the animation keys that are currently queued to play. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_animation_list: +.. _class_AnimationPlayer_method_get_root: .. rst-class:: classref-method -:ref:`PackedStringArray` **get_animation_list** **(** **)** |const| +:ref:`NodePath` **get_root**\ (\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`AnimationMixer.root_node` instead. -Returns the list of stored animation keys. +Returns the node which node path references will travel from. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_blend_time: +.. _class_AnimationPlayer_method_is_playing: .. rst-class:: classref-method -:ref:`float` **get_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| +:ref:`bool` **is_playing**\ (\ ) |const| :ref:`🔗` -Returns the blend time (in seconds) between two animations, referenced by their keys. +Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale` and/or ``custom_speed`` are ``0``). .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_playing_speed: +.. _class_AnimationPlayer_method_pause: .. rst-class:: classref-method -:ref:`float` **get_playing_speed** **(** **)** |const| +|void| **pause**\ (\ ) :ref:`🔗` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. -Returns a negative value if the current animation is playing backwards. +See also :ref:`stop`. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_get_queue: +.. _class_AnimationPlayer_method_play: .. rst-class:: classref-method -:ref:`PackedStringArray` **get_queue** **(** **)** - -Returns a list of the animation keys that are currently queued to play. - -.. rst-class:: classref-item-separator - ----- +|void| **play**\ (\ name\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`🔗` -.. _class_AnimationPlayer_method_has_animation: +Plays the animation with key ``name``. Custom blend times and speed can be set. -.. rst-class:: classref-method +The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). -:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +The **AnimationPlayer** keeps track of its current or last played animation with :ref:`assigned_animation`. If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. -Returns ``true`` if the **AnimationPlayer** stores an :ref:`Animation` with key ``name``. +\ **Note:** The animation will be updated the next time the **AnimationPlayer** is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call ``advance(0)``. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_has_animation_library: +.. _class_AnimationPlayer_method_play_backwards: .. rst-class:: classref-method -:ref:`bool` **has_animation_library** **(** :ref:`StringName` name **)** |const| - -Returns ``true`` if the **AnimationPlayer** stores an :ref:`AnimationLibrary` with key ``name``. - -.. rst-class:: classref-item-separator - ----- +|void| **play_backwards**\ (\ name\: :ref:`StringName` = &"", custom_blend\: :ref:`float` = -1\ ) :ref:`🔗` -.. _class_AnimationPlayer_method_is_playing: - -.. rst-class:: classref-method - -:ref:`bool` **is_playing** **(** **)** |const| +Plays the animation with key ``name`` in reverse. -Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale` and/or ``custom_speed`` are ``0``). +This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_pause: +.. _class_AnimationPlayer_method_play_with_capture: .. rst-class:: classref-method -void **pause** **(** **)** - -Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. - -See also :ref:`stop`. +|void| **play_with_capture**\ (\ name\: :ref:`StringName` = &"", duration\: :ref:`float` = -1.0, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) :ref:`🔗` -.. rst-class:: classref-item-separator +See also :ref:`AnimationMixer.capture`. ----- +You can use this method to use more detailed options for capture than those performed by :ref:`playback_auto_capture`. When :ref:`playback_auto_capture` is ``false``, this method is almost the same as the following: -.. _class_AnimationPlayer_method_play: +:: -.. rst-class:: classref-method + capture(name, duration, trans_type, ease_type) + play(name, custom_blend, custom_speed, from_end) -void **play** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** +If ``name`` is blank, it specifies :ref:`assigned_animation`. -Plays the animation with key ``name``. Custom blend times and speed can be set. +If ``duration`` is a negative value, the duration is set to the interval between the current position and the first key, when ``from_end`` is ``true``, uses the interval between the current position and the last key instead. -The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). - -The **AnimationPlayer** keeps track of its current or last played animation with :ref:`assigned_animation`. If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. - -\ **Note:** The animation will be updated the next time the **AnimationPlayer** is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call ``advance(0)``. +\ **Note:** The ``duration`` takes :ref:`speed_scale` into account, but ``custom_speed`` does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_play_backwards: +.. _class_AnimationPlayer_method_queue: .. rst-class:: classref-method -void **play_backwards** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** +|void| **queue**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` -Plays the animation with key ``name`` in reverse. +Queues an animation for playback once the current one is done. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +\ **Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_queue: +.. _class_AnimationPlayer_method_seek: .. rst-class:: classref-method -void **queue** **(** :ref:`StringName` name **)** +|void| **seek**\ (\ seconds\: :ref:`float`, update\: :ref:`bool` = false, update_only\: :ref:`bool` = false\ ) :ref:`🔗` -Queues an animation for playback once the current one is done. +Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time. Events between the current frame and ``seconds`` are skipped. -\ **Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. +If ``update_only`` is ``true``, the method / audio / animation playback tracks will not be processed. + +\ **Note:** Seeking to the end of the animation doesn't emit :ref:`AnimationMixer.animation_finished`. If you want to skip animation and emit the signal, use :ref:`AnimationMixer.advance`. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_remove_animation_library: +.. _class_AnimationPlayer_method_set_blend_time: .. rst-class:: classref-method -void **remove_animation_library** **(** :ref:`StringName` name **)** +|void| **set_blend_time**\ (\ animation_from\: :ref:`StringName`, animation_to\: :ref:`StringName`, sec\: :ref:`float`\ ) :ref:`🔗` -Removes the :ref:`AnimationLibrary` associated with the key ``name``. +Specifies a blend time (in seconds) between two animations, referenced by their keys. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_rename_animation_library: +.. _class_AnimationPlayer_method_set_method_call_mode: .. rst-class:: classref-method -void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** +|void| **set_method_call_mode**\ (\ mode\: :ref:`AnimationMethodCallMode`\ ) :ref:`🔗` -Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_method` instead. + +Sets the call mode used for "Call Method" tracks. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_seek: +.. _class_AnimationPlayer_method_set_process_callback: .. rst-class:: classref-method -void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false **)** +|void| **set_process_callback**\ (\ mode\: :ref:`AnimationProcessCallback`\ ) :ref:`🔗` -Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` is ``true``, the animation updates too, otherwise it updates at process time. Events between the current frame and ``seconds`` are skipped. +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. -\ **Note:** Seeking to the end of the animation doesn't emit :ref:`animation_finished`. If you want to skip animation and emit the signal, use :ref:`advance`. +Sets the process notification in which to update animations. .. rst-class:: classref-item-separator ---- -.. _class_AnimationPlayer_method_set_blend_time: +.. _class_AnimationPlayer_method_set_root: .. rst-class:: classref-method -void **set_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** +|void| **set_root**\ (\ path\: :ref:`NodePath`\ ) :ref:`🔗` -Specifies a blend time (in seconds) between two animations, referenced by their keys. +**Deprecated:** Use :ref:`AnimationMixer.root_node` instead. + +Sets the node which node path references will travel from. .. rst-class:: classref-item-separator @@ -894,7 +743,7 @@ Specifies a blend time (in seconds) between two animations, referenced by their .. rst-class:: classref-method -void **stop** **(** :ref:`bool` keep_state=false **)** +|void| **stop**\ (\ keep_state\: :ref:`bool` = false\ ) :ref:`🔗` Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. @@ -909,3 +758,4 @@ If ``keep_state`` is ``true``, the animation state is not updated visually. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationrootnode.rst b/classes/class_animationrootnode.rst index 92d035caf13..8281adc15c3 100644 --- a/classes/class_animationrootnode.rst +++ b/classes/class_animationrootnode.rst @@ -39,3 +39,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index 27de3d5677c..ed8653c446f 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -10,7 +10,7 @@ AnimationTree ============= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**Inherits:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` A node used for advanced animation transitions in an :ref:`AnimationPlayer`. @@ -30,7 +30,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -40,21 +40,17 @@ Properties .. table:: :widths: auto - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`active` | ``false`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`AnimationProcessCallback` | :ref:`process_callback` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`AnimationNode` | :ref:`tree_root` | | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`AnimationCallbackModeDiscrete` | callback_mode_discrete | ``2`` (overrides :ref:`AnimationMixer`) | + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`bool` | deterministic | ``true`` (overrides :ref:`AnimationMixer`) | + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`AnimationRootNode` | :ref:`tree_root` | | + +-----------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -64,23 +60,11 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`advance` **(** :ref:`float` delta **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationProcessCallback` | :ref:`get_process_callback`\ (\ ) |const| | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_callback`\ (\ mode\: :ref:`AnimationProcessCallback`\ ) | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,42 +75,14 @@ Methods Signals ------- -.. _class_AnimationTree_signal_animation_finished: - -.. rst-class:: classref-signal - -**animation_finished** **(** :ref:`StringName` anim_name **)** - -Notifies when an animation finished playing. - -\ **Note:** This signal is not emitted if an animation is looping or aborted. Also be aware of the possibility of unseen playback by sync and xfade. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationTree_signal_animation_player_changed: .. rst-class:: classref-signal -**animation_player_changed** **(** **)** +**animation_player_changed**\ (\ ) :ref:`🔗` Emitted when the :ref:`anim_player` is changed. -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_signal_animation_started: - -.. rst-class:: classref-signal - -**animation_started** **(** :ref:`StringName` anim_name **)** - -Notifies when an animation starts playing. - -\ **Note:** This signal is not emitted if an animation is looping or playbacked from the middle. Also be aware of the possibility of unseen playback by sync and xfade. - .. rst-class:: classref-section-separator ---- @@ -140,7 +96,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AnimationProcessCallback**: +enum **AnimationProcessCallback**: :ref:`🔗` .. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS: @@ -148,7 +104,9 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` -The animations will progress during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`). +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`. + + .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: @@ -156,7 +114,9 @@ The animations will progress during physics frames (see :ref:`Node.NOTIFICATION_ :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` -The animations will progress during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`). +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE`. + + .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: @@ -164,7 +124,9 @@ The animations will progress during process frames (see :ref:`Node.NOTIFICATION_ :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` -The animations will only progress manually (see :ref:`advance`). +**Deprecated:** See :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`. + + .. rst-class:: classref-section-separator @@ -175,35 +137,18 @@ The animations will only progress manually (see :ref:`advance` **active** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_active** **(** **)** - -If ``true``, the **AnimationTree** will be processing. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationTree_property_advance_expression_base_node: .. rst-class:: classref-property -:ref:`NodePath` **advance_expression_base_node** = ``NodePath(".")`` +:ref:`NodePath` **advance_expression_base_node** = ``NodePath(".")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_advance_expression_base_node** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_advance_expression_base_node** **(** **)** +- |void| **set_advance_expression_base_node**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_advance_expression_base_node**\ (\ ) -The path to the :ref:`Node` used to evaluate the AnimationNode :ref:`Expression` if one is not explicitly specified internally. +The path to the :ref:`Node` used to evaluate the :ref:`AnimationNode` :ref:`Expression` if one is not explicitly specified internally. .. rst-class:: classref-item-separator @@ -213,12 +158,12 @@ The path to the :ref:`Node` used to evaluate the AnimationNode :ref: .. rst-class:: classref-property -:ref:`NodePath` **anim_player** = ``NodePath("")`` +:ref:`NodePath` **anim_player** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_animation_player** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_animation_player** **(** **)** +- |void| **set_animation_player**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_animation_player**\ (\ ) The path to the :ref:`AnimationPlayer` used for animating. @@ -226,73 +171,18 @@ The path to the :ref:`AnimationPlayer` used for animating ---- -.. _class_AnimationTree_property_audio_max_polyphony: - -.. rst-class:: classref-property - -:ref:`int` **audio_max_polyphony** = ``32`` - -.. rst-class:: classref-property-setget - -- void **set_audio_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_audio_max_polyphony** **(** **)** - -The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. - -For example, if this value is ``32`` and the animation has two audio tracks, the two :ref:`AudioStreamPlayer`\ s assigned can play simultaneously up to ``32`` voices each. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_property_process_callback: - -.. rst-class:: classref-property - -:ref:`AnimationProcessCallback` **process_callback** = ``1`` - -.. rst-class:: classref-property-setget - -- void **set_process_callback** **(** :ref:`AnimationProcessCallback` value **)** -- :ref:`AnimationProcessCallback` **get_process_callback** **(** **)** - -The process mode of this **AnimationTree**. See :ref:`AnimationProcessCallback` for available modes. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_property_root_motion_track: - -.. rst-class:: classref-property - -:ref:`NodePath` **root_motion_track** = ``NodePath("")`` - -.. rst-class:: classref-property-setget - -- void **set_root_motion_track** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_root_motion_track** **(** **)** - -The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by ``":"``. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``. - -If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D` or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position`, :ref:`get_root_motion_rotation`, :ref:`get_root_motion_scale` and :ref:`RootMotionView`. - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationTree_property_tree_root: .. rst-class:: classref-property -:ref:`AnimationNode` **tree_root** +:ref:`AnimationRootNode` **tree_root** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tree_root** **(** :ref:`AnimationNode` value **)** -- :ref:`AnimationNode` **get_tree_root** **(** **)** +- |void| **set_tree_root**\ (\ value\: :ref:`AnimationRootNode`\ ) +- :ref:`AnimationRootNode` **get_tree_root**\ (\ ) -The root animation node of this **AnimationTree**. See :ref:`AnimationNode`. +The root animation node of this **AnimationTree**. See :ref:`AnimationRootNode`. .. rst-class:: classref-section-separator @@ -303,248 +193,29 @@ The root animation node of this **AnimationTree**. See :ref:`AnimationNode` **_post_process_key_value** **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| - -A virtual function for processing after key getting during playback. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_advance: - -.. rst-class:: classref-method +:ref:`AnimationProcessCallback` **get_process_callback**\ (\ ) |const| :ref:`🔗` -void **advance** **(** :ref:`float` delta **)** +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. -Manually advance the animations by the specified time (in seconds). +Returns the process notification in which to update animations. .. rst-class:: classref-item-separator ---- -.. _class_AnimationTree_method_get_root_motion_position: +.. _class_AnimationTree_method_set_process_callback: .. rst-class:: classref-method -:ref:`Vector3` **get_root_motion_position** **(** **)** |const| - -Retrieve the motion delta of position with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. - -If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_POSITION_3D`, returns ``Vector3(0, 0, 0)``. - -See also :ref:`root_motion_track` and :ref:`RootMotionView`. - -The most basic example is applying position to :ref:`CharacterBody3D`: - - -.. tabs:: - - .. code-tab:: gdscript - - var current_rotation: Quaternion - - func _process(delta): - if Input.is_action_just_pressed("animate"): - current_rotation = get_quaternion() - state_machine.travel("Animate") - var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta - set_velocity(velocity) - move_and_slide() - - - -By using this in combination with :ref:`get_root_motion_position_accumulator`, you can apply the root motion position more correctly to account for the rotation of the node. - - -.. tabs:: - - .. code-tab:: gdscript - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) - var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta - set_velocity(velocity) - move_and_slide() - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_position_accumulator: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_position_accumulator** **(** **)** |const| - -Retrieve the blended value of the position tracks with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. - -This is useful in cases where you want to respect the initial key values of the animation. - -For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in the previous frame and then an animation with only one key ``Vector3(1, 0, 1)`` is played in the next frame, the difference can be calculated as follows: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_position_accumulator: Vector3 - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() - var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator - prev_root_motion_position_accumulator = current_root_motion_position_accumulator - transform.origin += difference - - - -However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_rotation: - -.. rst-class:: classref-method - -:ref:`Quaternion` **get_root_motion_rotation** **(** **)** |const| - -Retrieve the motion delta of rotation with the :ref:`root_motion_track` as a :ref:`Quaternion` that can be used elsewhere. - -If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_ROTATION_3D`, returns ``Quaternion(0, 0, 0, 1)``. - -See also :ref:`root_motion_track` and :ref:`RootMotionView`. - -The most basic example is applying rotation to :ref:`CharacterBody3D`: - - -.. tabs:: - - .. code-tab:: gdscript - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_rotation_accumulator: - -.. rst-class:: classref-method - -:ref:`Quaternion` **get_root_motion_rotation_accumulator** **(** **)** |const| - -Retrieve the blended value of the rotation tracks with the :ref:`root_motion_track` as a :ref:`Quaternion` that can be used elsewhere. - -This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position`. - -Also, this is useful in cases where you want to respect the initial key values of the animation. - -For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is played in the previous frame and then an animation with only one key ``Quaternion(0, 0.707, 0, 0.707)`` is played in the next frame, the difference can be calculated as follows: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_rotation_accumulator: Quaternion - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() - var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator - prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator - transform.basis *= difference - - - -However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_scale: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_scale** **(** **)** |const| - -Retrieve the motion delta of scale with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. - -If :ref:`root_motion_track` is not a path to a track of type :ref:`Animation.TYPE_SCALE_3D`, returns ``Vector3(0, 0, 0)``. - -See also :ref:`root_motion_track` and :ref:`RootMotionView`. - -The most basic example is applying scale to :ref:`CharacterBody3D`: - - -.. tabs:: - - .. code-tab:: gdscript - - var current_scale: Vector3 = Vector3(1, 1, 1) - var scale_accum: Vector3 = Vector3(1, 1, 1) - - func _process(delta): - if Input.is_action_just_pressed("animate"): - current_scale = get_scale() - scale_accum = Vector3(1, 1, 1) - state_machine.travel("Animate") - scale_accum += animation_tree.get_root_motion_scale() - set_scale(current_scale * scale_accum) - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_scale_accumulator: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_scale_accumulator** **(** **)** |const| - -Retrieve the blended value of the scale tracks with the :ref:`root_motion_track` as a :ref:`Vector3` that can be used elsewhere. - -For example, if an animation with only one key ``Vector3(1, 1, 1)`` is played in the previous frame and then an animation with only one key ``Vector3(2, 2, 2)`` is played in the next frame, the difference can be calculated as follows: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_scale_accumulator: Vector3 - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator() - var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator - prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator - transform.basis = transform.basis.scaled(difference) - +|void| **set_process_callback**\ (\ mode\: :ref:`AnimationProcessCallback`\ ) :ref:`🔗` +**Deprecated:** Use :ref:`AnimationMixer.callback_mode_process` instead. -However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. +Sets the process notification in which to update animations. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -553,3 +224,4 @@ However, if the animation loops, an unintended discrete change may occur, so thi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index 1a3594d0430..a47df40ffed 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: trigger + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -23,6 +26,8 @@ Description This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +\ **Note:** Areas and bodies created with :ref:`PhysicsServer2D` might not interact as expected with **Area2D**\ s, and might not emit signals or track objects correctly. + .. rst-class:: classref-introduction-group Tutorials @@ -30,11 +35,11 @@ Tutorials - :doc:`Using Area2D <../tutorials/physics/using_area_2d>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `2D Pong Demo `__ +- `2D Pong Demo `__ -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ .. rst-class:: classref-reftable-group @@ -84,19 +89,19 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`Area2D[]` | :ref:`get_overlapping_areas` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`Node2D[]` | :ref:`get_overlapping_bodies` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_overlapping_areas` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_overlapping_bodies` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Node` area **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Node` body **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Area2D`\] | :ref:`get_overlapping_areas`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Node2D`\] | :ref:`get_overlapping_bodies`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_overlapping_areas`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_overlapping_bodies`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`overlaps_area`\ (\ area\: :ref:`Node`\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`overlaps_body`\ (\ body\: :ref:`Node`\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,7 +116,7 @@ Signals .. rst-class:: classref-signal -**area_entered** **(** :ref:`Area2D` area **)** +**area_entered**\ (\ area\: :ref:`Area2D`\ ) :ref:`🔗` Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` to be set to ``true``. @@ -123,7 +128,7 @@ Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` area **)** +**area_exited**\ (\ area\: :ref:`Area2D`\ ) :ref:`🔗` Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` to be set to ``true``. @@ -135,7 +140,7 @@ Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +**area_shape_entered**\ (\ area_rid\: :ref:`RID`, area\: :ref:`Area2D`, area_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape2D` of the received ``area`` enters a shape of this area. Requires :ref:`monitoring` to be set to ``true``. @@ -164,7 +169,7 @@ Emitted when a :ref:`Shape2D` of the received ``area`` enters a s .. rst-class:: classref-signal -**area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area2D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +**area_shape_exited**\ (\ area_rid\: :ref:`RID`, area\: :ref:`Area2D`, area_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape2D` of the received ``area`` exits a shape of this area. Requires :ref:`monitoring` to be set to ``true``. @@ -178,7 +183,7 @@ See also :ref:`area_shape_entered`. .. rst-class:: classref-signal -**body_entered** **(** :ref:`Node2D` body **)** +**body_entered**\ (\ body\: :ref:`Node2D`\ ) :ref:`🔗` Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -190,7 +195,7 @@ Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`Phy .. rst-class:: classref-signal -**body_exited** **(** :ref:`Node2D` body **)** +**body_exited**\ (\ body\: :ref:`Node2D`\ ) :ref:`🔗` Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -202,7 +207,7 @@ Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`Phys .. rst-class:: classref-signal -**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +**body_shape_entered**\ (\ body_rid\: :ref:`RID`, body\: :ref:`Node2D`, body_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape2D` of the received ``body`` enters a shape of this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -231,7 +236,7 @@ Emitted when a :ref:`Shape2D` of the received ``body`` enters a s .. rst-class:: classref-signal -**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node2D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +**body_shape_exited**\ (\ body_rid\: :ref:`RID`, body\: :ref:`Node2D`, body_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape2D` of the received ``body`` exits a shape of this area. ``body`` can be a :ref:`PhysicsBody2D` or a :ref:`TileMap`. :ref:`TileMap`\ s are detected if their :ref:`TileSet` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -250,7 +255,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SpaceOverride**: +enum **SpaceOverride**: :ref:`🔗` .. _class_Area2D_constant_SPACE_OVERRIDE_DISABLED: @@ -305,12 +310,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **angular_damp** = ``1.0`` +:ref:`float` **angular_damp** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_angular_damp** **(** :ref:`float` value **)** -- :ref:`float` **get_angular_damp** **(** **)** +- |void| **set_angular_damp**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_angular_damp**\ (\ ) The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. @@ -324,12 +329,12 @@ See :ref:`ProjectSettings.physics/2d/default_angular_damp` **angular_damp_space_override** = ``0`` +:ref:`SpaceOverride` **angular_damp_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_angular_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_angular_damp_space_override_mode** **(** **)** +- |void| **set_angular_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -341,12 +346,12 @@ Override mode for angular damping calculations within this area. See :ref:`Space .. rst-class:: classref-property -:ref:`StringName` **audio_bus_name** = ``&"Master"`` +:ref:`StringName` **audio_bus_name** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_audio_bus_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_audio_bus_name** **(** **)** +- |void| **set_audio_bus_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_audio_bus_name**\ (\ ) The name of the area's audio bus. @@ -358,12 +363,12 @@ The name of the area's audio bus. .. rst-class:: classref-property -:ref:`bool` **audio_bus_override** = ``false`` +:ref:`bool` **audio_bus_override** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_audio_bus_override** **(** :ref:`bool` value **)** -- :ref:`bool` **is_overriding_audio_bus** **(** **)** +- |void| **set_audio_bus_override**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_overriding_audio_bus**\ (\ ) If ``true``, the area's audio bus overrides the default audio bus. @@ -375,12 +380,12 @@ If ``true``, the area's audio bus overrides the default audio bus. .. rst-class:: classref-property -:ref:`float` **gravity** = ``980.0`` +:ref:`float` **gravity** = ``980.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`float` value **)** -- :ref:`float` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gravity**\ (\ ) The area's gravity intensity (in pixels per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. @@ -392,12 +397,12 @@ The area's gravity intensity (in pixels per second squared). This value multipli .. rst-class:: classref-property -:ref:`Vector2` **gravity_direction** = ``Vector2(0, 1)`` +:ref:`Vector2` **gravity_direction** = ``Vector2(0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_direction** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_gravity_direction** **(** **)** +- |void| **set_gravity_direction**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_gravity_direction**\ (\ ) The area's gravity vector (not normalized). @@ -409,12 +414,12 @@ The area's gravity vector (not normalized). .. rst-class:: classref-property -:ref:`bool` **gravity_point** = ``false`` +:ref:`bool` **gravity_point** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_is_point** **(** :ref:`bool` value **)** -- :ref:`bool` **is_gravity_a_point** **(** **)** +- |void| **set_gravity_is_point**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_gravity_a_point**\ (\ ) If ``true``, gravity is calculated from a point (set via :ref:`gravity_point_center`). See also :ref:`gravity_space_override`. @@ -426,12 +431,12 @@ If ``true``, gravity is calculated from a point (set via :ref:`gravity_point_cen .. rst-class:: classref-property -:ref:`Vector2` **gravity_point_center** = ``Vector2(0, 1)`` +:ref:`Vector2` **gravity_point_center** = ``Vector2(0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_point_center** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_gravity_point_center** **(** **)** +- |void| **set_gravity_point_center**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_gravity_point_center**\ (\ ) If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. @@ -443,12 +448,12 @@ If gravity is a point (see :ref:`gravity_point` **gravity_point_unit_distance** = ``0.0`` +:ref:`float` **gravity_point_unit_distance** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_point_unit_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_gravity_point_unit_distance** **(** **)** +- |void| **set_gravity_point_unit_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gravity_point_unit_distance**\ (\ ) The distance at which the gravity strength is equal to :ref:`gravity`. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the :ref:`gravity` to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on. @@ -462,12 +467,12 @@ The above is true only when the unit distance is a positive number. When this is .. rst-class:: classref-property -:ref:`SpaceOverride` **gravity_space_override** = ``0`` +:ref:`SpaceOverride` **gravity_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_gravity_space_override_mode** **(** **)** +- |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -479,12 +484,12 @@ Override mode for gravity calculations within this area. See :ref:`SpaceOverride .. rst-class:: classref-property -:ref:`float` **linear_damp** = ``0.1`` +:ref:`float` **linear_damp** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_linear_damp** **(** :ref:`float` value **)** -- :ref:`float` **get_linear_damp** **(** **)** +- |void| **set_linear_damp**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_linear_damp**\ (\ ) The rate at which objects stop moving in this area. Represents the linear velocity lost per second. @@ -498,12 +503,12 @@ See :ref:`ProjectSettings.physics/2d/default_linear_damp` **linear_damp_space_override** = ``0`` +:ref:`SpaceOverride` **linear_damp_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_linear_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_linear_damp_space_override_mode** **(** **)** +- |void| **set_linear_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -515,12 +520,12 @@ Override mode for linear damping calculations within this area. See :ref:`SpaceO .. rst-class:: classref-property -:ref:`bool` **monitorable** = ``true`` +:ref:`bool` **monitorable** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_monitorable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_monitorable** **(** **)** +- |void| **set_monitorable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_monitorable**\ (\ ) If ``true``, other monitoring areas can detect this area. @@ -532,12 +537,12 @@ If ``true``, other monitoring areas can detect this area. .. rst-class:: classref-property -:ref:`bool` **monitoring** = ``true`` +:ref:`bool` **monitoring** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_monitoring** **(** :ref:`bool` value **)** -- :ref:`bool` **is_monitoring** **(** **)** +- |void| **set_monitoring**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_monitoring**\ (\ ) If ``true``, the area detects bodies or areas entering and exiting it. @@ -549,12 +554,12 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`int` **priority** = ``0`` +:ref:`int` **priority** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`int` value **)** -- :ref:`int` **get_priority** **(** **)** +- |void| **set_priority**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_priority**\ (\ ) The area's priority. Higher priority areas are processed first. The :ref:`World2D`'s physics is always processed last, after all areas. @@ -571,7 +576,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Area2D[]` **get_overlapping_areas** **(** **)** |const| +:ref:`Array`\[:ref:`Area2D`\] **get_overlapping_areas**\ (\ ) |const| :ref:`🔗` Returns a list of intersecting **Area2D**\ s. The overlapping area's :ref:`CollisionObject2D.collision_layer` must be part of this area's :ref:`CollisionObject2D.collision_mask` in order to be detected. @@ -585,7 +590,7 @@ For performance reasons (collisions are all processed at the same time) this lis .. rst-class:: classref-method -:ref:`Node2D[]` **get_overlapping_bodies** **(** **)** |const| +:ref:`Array`\[:ref:`Node2D`\] **get_overlapping_bodies**\ (\ ) |const| :ref:`🔗` Returns a list of intersecting :ref:`PhysicsBody2D`\ s and :ref:`TileMap`\ s. The overlapping body's :ref:`CollisionObject2D.collision_layer` must be part of this area's :ref:`CollisionObject2D.collision_mask` in order to be detected. @@ -599,7 +604,7 @@ For performance reasons (collisions are all processed at the same time) this lis .. rst-class:: classref-method -:ref:`bool` **has_overlapping_areas** **(** **)** |const| +:ref:`bool` **has_overlapping_areas**\ (\ ) |const| :ref:`🔗` Returns ``true`` if intersecting any **Area2D**\ s, otherwise returns ``false``. The overlapping area's :ref:`CollisionObject2D.collision_layer` must be part of this area's :ref:`CollisionObject2D.collision_mask` in order to be detected. @@ -613,7 +618,7 @@ For performance reasons (collisions are all processed at the same time) the list .. rst-class:: classref-method -:ref:`bool` **has_overlapping_bodies** **(** **)** |const| +:ref:`bool` **has_overlapping_bodies**\ (\ ) |const| :ref:`🔗` Returns ``true`` if intersecting any :ref:`PhysicsBody2D`\ s or :ref:`TileMap`\ s, otherwise returns ``false``. The overlapping body's :ref:`CollisionObject2D.collision_layer` must be part of this area's :ref:`CollisionObject2D.collision_mask` in order to be detected. @@ -627,7 +632,7 @@ For performance reasons (collisions are all processed at the same time) the list .. rst-class:: classref-method -:ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| +:ref:`bool` **overlaps_area**\ (\ area\: :ref:`Node`\ ) |const| :ref:`🔗` Returns ``true`` if the given **Area2D** intersects or overlaps this **Area2D**, ``false`` otherwise. @@ -641,7 +646,7 @@ Returns ``true`` if the given **Area2D** intersects or overlaps this **Area2D**, .. rst-class:: classref-method -:ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| +:ref:`bool` **overlaps_body**\ (\ body\: :ref:`Node`\ ) |const| :ref:`🔗` Returns ``true`` if the given physics body intersects or overlaps this **Area2D**, ``false`` otherwise. @@ -656,3 +661,4 @@ The ``body`` argument can either be a :ref:`PhysicsBody2D` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 973b15c10fa..67d979f8775 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: trigger + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -23,7 +26,9 @@ Description This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. -\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the *Create Trimesh Collision Sibling* option in the *Mesh* menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. +\ **Note:** Areas and bodies created with :ref:`PhysicsServer3D` might not interact as expected with **Area3D**\ s, and might not emit signals or track objects correctly. + +\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. .. rst-class:: classref-introduction-group @@ -32,9 +37,9 @@ Tutorials - :doc:`Using Area2D <../tutorials/physics/using_area_2d>` -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `GUI in 3D Demo `__ +- `GUI in 3D Viewport Demo `__ .. rst-class:: classref-reftable-group @@ -98,19 +103,19 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`Area3D[]` | :ref:`get_overlapping_areas` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D[]` | :ref:`get_overlapping_bodies` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_overlapping_areas` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_overlapping_bodies` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`overlaps_area` **(** :ref:`Node` area **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`overlaps_body` **(** :ref:`Node` body **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Area3D`\] | :ref:`get_overlapping_areas`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Node3D`\] | :ref:`get_overlapping_bodies`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_overlapping_areas`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_overlapping_bodies`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`overlaps_area`\ (\ area\: :ref:`Node`\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`overlaps_body`\ (\ body\: :ref:`Node`\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -125,7 +130,7 @@ Signals .. rst-class:: classref-signal -**area_entered** **(** :ref:`Area3D` area **)** +**area_entered**\ (\ area\: :ref:`Area3D`\ ) :ref:`🔗` Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` to be set to ``true``. @@ -137,7 +142,7 @@ Emitted when the received ``area`` enters this area. Requires :ref:`monitoring` area **)** +**area_exited**\ (\ area\: :ref:`Area3D`\ ) :ref:`🔗` Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` to be set to ``true``. @@ -149,7 +154,7 @@ Emitted when the received ``area`` exits this area. Requires :ref:`monitoring` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +**area_shape_entered**\ (\ area_rid\: :ref:`RID`, area\: :ref:`Area3D`, area_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape3D` of the received ``area`` enters a shape of this area. Requires :ref:`monitoring` to be set to ``true``. @@ -178,7 +183,7 @@ Emitted when a :ref:`Shape3D` of the received ``area`` enters a s .. rst-class:: classref-signal -**area_shape_exited** **(** :ref:`RID` area_rid, :ref:`Area3D` area, :ref:`int` area_shape_index, :ref:`int` local_shape_index **)** +**area_shape_exited**\ (\ area_rid\: :ref:`RID`, area\: :ref:`Area3D`, area_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape3D` of the received ``area`` exits a shape of this area. Requires :ref:`monitoring` to be set to ``true``. @@ -192,7 +197,7 @@ See also :ref:`area_shape_entered`. .. rst-class:: classref-signal -**body_entered** **(** :ref:`Node3D` body **)** +**body_entered**\ (\ body\: :ref:`Node3D`\ ) :ref:`🔗` Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -204,7 +209,7 @@ Emitted when the received ``body`` enters this area. ``body`` can be a :ref:`Phy .. rst-class:: classref-signal -**body_exited** **(** :ref:`Node3D` body **)** +**body_exited**\ (\ body\: :ref:`Node3D`\ ) :ref:`🔗` Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -216,7 +221,7 @@ Emitted when the received ``body`` exits this area. ``body`` can be a :ref:`Phys .. rst-class:: classref-signal -**body_shape_entered** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +**body_shape_entered**\ (\ body_rid\: :ref:`RID`, body\: :ref:`Node3D`, body_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape3D` of the received ``body`` enters a shape of this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -245,7 +250,7 @@ Emitted when a :ref:`Shape3D` of the received ``body`` enters a s .. rst-class:: classref-signal -**body_shape_exited** **(** :ref:`RID` body_rid, :ref:`Node3D` body, :ref:`int` body_shape_index, :ref:`int` local_shape_index **)** +**body_shape_exited**\ (\ body_rid\: :ref:`RID`, body\: :ref:`Node3D`, body_shape_index\: :ref:`int`, local_shape_index\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`Shape3D` of the received ``body`` exits a shape of this area. ``body`` can be a :ref:`PhysicsBody3D` or a :ref:`GridMap`. :ref:`GridMap`\ s are detected if their :ref:`MeshLibrary` has collision shapes configured. Requires :ref:`monitoring` to be set to ``true``. @@ -264,7 +269,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SpaceOverride**: +enum **SpaceOverride**: :ref:`🔗` .. _class_Area3D_constant_SPACE_OVERRIDE_DISABLED: @@ -319,12 +324,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **angular_damp** = ``0.1`` +:ref:`float` **angular_damp** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_angular_damp** **(** :ref:`float` value **)** -- :ref:`float` **get_angular_damp** **(** **)** +- |void| **set_angular_damp**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_angular_damp**\ (\ ) The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. @@ -338,12 +343,12 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp` **angular_damp_space_override** = ``0`` +:ref:`SpaceOverride` **angular_damp_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_angular_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_angular_damp_space_override_mode** **(** **)** +- |void| **set_angular_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -355,12 +360,12 @@ Override mode for angular damping calculations within this area. See :ref:`Space .. rst-class:: classref-property -:ref:`StringName` **audio_bus_name** = ``&"Master"`` +:ref:`StringName` **audio_bus_name** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_audio_bus_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_audio_bus_name** **(** **)** +- |void| **set_audio_bus_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_audio_bus_name**\ (\ ) The name of the area's audio bus. @@ -372,12 +377,12 @@ The name of the area's audio bus. .. rst-class:: classref-property -:ref:`bool` **audio_bus_override** = ``false`` +:ref:`bool` **audio_bus_override** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_audio_bus_override** **(** :ref:`bool` value **)** -- :ref:`bool` **is_overriding_audio_bus** **(** **)** +- |void| **set_audio_bus_override**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_overriding_audio_bus**\ (\ ) If ``true``, the area's audio bus overrides the default audio bus. @@ -389,12 +394,12 @@ If ``true``, the area's audio bus overrides the default audio bus. .. rst-class:: classref-property -:ref:`float` **gravity** = ``9.8`` +:ref:`float` **gravity** = ``9.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`float` value **)** -- :ref:`float` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gravity**\ (\ ) The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. @@ -406,12 +411,12 @@ The area's gravity intensity (in meters per second squared). This value multipli .. rst-class:: classref-property -:ref:`Vector3` **gravity_direction** = ``Vector3(0, -1, 0)`` +:ref:`Vector3` **gravity_direction** = ``Vector3(0, -1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_direction** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_gravity_direction** **(** **)** +- |void| **set_gravity_direction**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_gravity_direction**\ (\ ) The area's gravity vector (not normalized). @@ -423,12 +428,12 @@ The area's gravity vector (not normalized). .. rst-class:: classref-property -:ref:`bool` **gravity_point** = ``false`` +:ref:`bool` **gravity_point** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_is_point** **(** :ref:`bool` value **)** -- :ref:`bool` **is_gravity_a_point** **(** **)** +- |void| **set_gravity_is_point**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_gravity_a_point**\ (\ ) If ``true``, gravity is calculated from a point (set via :ref:`gravity_point_center`). See also :ref:`gravity_space_override`. @@ -440,12 +445,12 @@ If ``true``, gravity is calculated from a point (set via :ref:`gravity_point_cen .. rst-class:: classref-property -:ref:`Vector3` **gravity_point_center** = ``Vector3(0, -1, 0)`` +:ref:`Vector3` **gravity_point_center** = ``Vector3(0, -1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_point_center** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_gravity_point_center** **(** **)** +- |void| **set_gravity_point_center**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_gravity_point_center**\ (\ ) If gravity is a point (see :ref:`gravity_point`), this will be the point of attraction. @@ -457,12 +462,12 @@ If gravity is a point (see :ref:`gravity_point` **gravity_point_unit_distance** = ``0.0`` +:ref:`float` **gravity_point_unit_distance** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_point_unit_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_gravity_point_unit_distance** **(** **)** +- |void| **set_gravity_point_unit_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gravity_point_unit_distance**\ (\ ) The distance at which the gravity strength is equal to :ref:`gravity`. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the :ref:`gravity` to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on. @@ -476,12 +481,12 @@ The above is true only when the unit distance is a positive number. When this is .. rst-class:: classref-property -:ref:`SpaceOverride` **gravity_space_override** = ``0`` +:ref:`SpaceOverride` **gravity_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_gravity_space_override_mode** **(** **)** +- |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -493,12 +498,12 @@ Override mode for gravity calculations within this area. See :ref:`SpaceOverride .. rst-class:: classref-property -:ref:`float` **linear_damp** = ``0.1`` +:ref:`float` **linear_damp** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_linear_damp** **(** :ref:`float` value **)** -- :ref:`float` **get_linear_damp** **(** **)** +- |void| **set_linear_damp**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_linear_damp**\ (\ ) The rate at which objects stop moving in this area. Represents the linear velocity lost per second. @@ -512,12 +517,12 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp` **linear_damp_space_override** = ``0`` +:ref:`SpaceOverride` **linear_damp_space_override** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_linear_damp_space_override_mode** **(** :ref:`SpaceOverride` value **)** -- :ref:`SpaceOverride` **get_linear_damp_space_override_mode** **(** **)** +- |void| **set_linear_damp_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) +- :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. @@ -529,12 +534,12 @@ Override mode for linear damping calculations within this area. See :ref:`SpaceO .. rst-class:: classref-property -:ref:`bool` **monitorable** = ``true`` +:ref:`bool` **monitorable** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_monitorable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_monitorable** **(** **)** +- |void| **set_monitorable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_monitorable**\ (\ ) If ``true``, other monitoring areas can detect this area. @@ -546,12 +551,12 @@ If ``true``, other monitoring areas can detect this area. .. rst-class:: classref-property -:ref:`bool` **monitoring** = ``true`` +:ref:`bool` **monitoring** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_monitoring** **(** :ref:`bool` value **)** -- :ref:`bool` **is_monitoring** **(** **)** +- |void| **set_monitoring**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_monitoring**\ (\ ) If ``true``, the area detects bodies or areas entering and exiting it. @@ -563,12 +568,12 @@ If ``true``, the area detects bodies or areas entering and exiting it. .. rst-class:: classref-property -:ref:`int` **priority** = ``0`` +:ref:`int` **priority** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`int` value **)** -- :ref:`int` **get_priority** **(** **)** +- |void| **set_priority**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_priority**\ (\ ) The area's priority. Higher priority areas are processed first. The :ref:`World3D`'s physics is always processed last, after all areas. @@ -580,12 +585,12 @@ The area's priority. Higher priority areas are processed first. The :ref:`World3 .. rst-class:: classref-property -:ref:`float` **reverb_bus_amount** = ``0.0`` +:ref:`float` **reverb_bus_amount** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reverb_amount** **(** :ref:`float` value **)** -- :ref:`float` **get_reverb_amount** **(** **)** +- |void| **set_reverb_amount**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_reverb_amount**\ (\ ) The degree to which this area applies reverb to its associated audio. Ranges from ``0`` to ``1`` with ``0.1`` precision. @@ -597,12 +602,12 @@ The degree to which this area applies reverb to its associated audio. Ranges fro .. rst-class:: classref-property -:ref:`bool` **reverb_bus_enabled** = ``false`` +:ref:`bool` **reverb_bus_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_reverb_bus** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_reverb_bus** **(** **)** +- |void| **set_use_reverb_bus**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_reverb_bus**\ (\ ) If ``true``, the area applies reverb to its associated audio. @@ -614,12 +619,12 @@ If ``true``, the area applies reverb to its associated audio. .. rst-class:: classref-property -:ref:`StringName` **reverb_bus_name** = ``&"Master"`` +:ref:`StringName` **reverb_bus_name** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reverb_bus_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_reverb_bus_name** **(** **)** +- |void| **set_reverb_bus_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_reverb_bus_name**\ (\ ) The name of the reverb bus to use for this area's associated audio. @@ -631,12 +636,12 @@ The name of the reverb bus to use for this area's associated audio. .. rst-class:: classref-property -:ref:`float` **reverb_bus_uniformity** = ``0.0`` +:ref:`float` **reverb_bus_uniformity** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_reverb_uniformity** **(** :ref:`float` value **)** -- :ref:`float` **get_reverb_uniformity** **(** **)** +- |void| **set_reverb_uniformity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_reverb_uniformity**\ (\ ) The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to ``1`` with ``0.1`` precision. @@ -648,15 +653,17 @@ The degree to which this area's reverb is a uniform effect. Ranges from ``0`` to .. rst-class:: classref-property -:ref:`float` **wind_attenuation_factor** = ``0.0`` +:ref:`float` **wind_attenuation_factor** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wind_attenuation_factor** **(** :ref:`float` value **)** -- :ref:`float` **get_wind_attenuation_factor** **(** **)** +- |void| **set_wind_attenuation_factor**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wind_attenuation_factor**\ (\ ) The exponential rate at which wind force decreases with distance from its origin. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-item-separator ---- @@ -665,15 +672,17 @@ The exponential rate at which wind force decreases with distance from its origin .. rst-class:: classref-property -:ref:`float` **wind_force_magnitude** = ``0.0`` +:ref:`float` **wind_force_magnitude** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wind_force_magnitude** **(** :ref:`float` value **)** -- :ref:`float` **get_wind_force_magnitude** **(** **)** +- |void| **set_wind_force_magnitude**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wind_force_magnitude**\ (\ ) The magnitude of area-specific wind force. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-item-separator ---- @@ -682,15 +691,17 @@ The magnitude of area-specific wind force. .. rst-class:: classref-property -:ref:`NodePath` **wind_source_path** = ``NodePath("")`` +:ref:`NodePath` **wind_source_path** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wind_source_path** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_wind_source_path** **(** **)** +- |void| **set_wind_source_path**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_wind_source_path**\ (\ ) The :ref:`Node3D` which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the :ref:`Node3D`'s local transform, and its origin is the origin of the :ref:`Node3D`'s local transform. +\ **Note:** This wind force only applies to :ref:`SoftBody3D` nodes. Other physics bodies are currently not affected by wind. + .. rst-class:: classref-section-separator ---- @@ -704,7 +715,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Area3D[]` **get_overlapping_areas** **(** **)** |const| +:ref:`Array`\[:ref:`Area3D`\] **get_overlapping_areas**\ (\ ) |const| :ref:`🔗` Returns a list of intersecting **Area3D**\ s. The overlapping area's :ref:`CollisionObject3D.collision_layer` must be part of this area's :ref:`CollisionObject3D.collision_mask` in order to be detected. @@ -718,7 +729,7 @@ For performance reasons (collisions are all processed at the same time) this lis .. rst-class:: classref-method -:ref:`Node3D[]` **get_overlapping_bodies** **(** **)** |const| +:ref:`Array`\[:ref:`Node3D`\] **get_overlapping_bodies**\ (\ ) |const| :ref:`🔗` Returns a list of intersecting :ref:`PhysicsBody3D`\ s and :ref:`GridMap`\ s. The overlapping body's :ref:`CollisionObject3D.collision_layer` must be part of this area's :ref:`CollisionObject3D.collision_mask` in order to be detected. @@ -732,7 +743,7 @@ For performance reasons (collisions are all processed at the same time) this lis .. rst-class:: classref-method -:ref:`bool` **has_overlapping_areas** **(** **)** |const| +:ref:`bool` **has_overlapping_areas**\ (\ ) |const| :ref:`🔗` Returns ``true`` if intersecting any **Area3D**\ s, otherwise returns ``false``. The overlapping area's :ref:`CollisionObject3D.collision_layer` must be part of this area's :ref:`CollisionObject3D.collision_mask` in order to be detected. @@ -746,7 +757,7 @@ For performance reasons (collisions are all processed at the same time) the list .. rst-class:: classref-method -:ref:`bool` **has_overlapping_bodies** **(** **)** |const| +:ref:`bool` **has_overlapping_bodies**\ (\ ) |const| :ref:`🔗` Returns ``true`` if intersecting any :ref:`PhysicsBody3D`\ s or :ref:`GridMap`\ s, otherwise returns ``false``. The overlapping body's :ref:`CollisionObject3D.collision_layer` must be part of this area's :ref:`CollisionObject3D.collision_mask` in order to be detected. @@ -760,7 +771,7 @@ For performance reasons (collisions are all processed at the same time) the list .. rst-class:: classref-method -:ref:`bool` **overlaps_area** **(** :ref:`Node` area **)** |const| +:ref:`bool` **overlaps_area**\ (\ area\: :ref:`Node`\ ) |const| :ref:`🔗` Returns ``true`` if the given **Area3D** intersects or overlaps this **Area3D**, ``false`` otherwise. @@ -774,7 +785,7 @@ Returns ``true`` if the given **Area3D** intersects or overlaps this **Area3D**, .. rst-class:: classref-method -:ref:`bool` **overlaps_body** **(** :ref:`Node` body **)** |const| +:ref:`bool` **overlaps_body**\ (\ body\: :ref:`Node`\ ) |const| :ref:`🔗` Returns ``true`` if the given physics body intersects or overlaps this **Area3D**, ``false`` otherwise. @@ -789,3 +800,4 @@ The ``body`` argument can either be a :ref:`PhysicsBody3D` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_array.rst b/classes/class_array.rst index 368509ac033..450bbd9761c 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -68,6 +68,8 @@ Arrays can be concatenated using the ``+`` operator: \ **Note:** Erasing elements while iterating over arrays is **not** supported and will result in unpredictable behavior. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt64Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -80,31 +82,33 @@ Constructors .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`Array` base, :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedByteArray` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedColorArray` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedFloat32Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedFloat64Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedInt32Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedInt64Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedStringArray` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedVector2Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`Array` **(** :ref:`PackedVector3Array` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ base\: :ref:`Array`, type\: :ref:`int`, class_name\: :ref:`StringName`, script\: :ref:`Variant`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedByteArray`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedColorArray`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedFloat32Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedFloat64Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedInt32Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedInt64Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedStringArray`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedVector2Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedVector3Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`Array`\ (\ from\: :ref:`PackedVector4Array`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -114,99 +118,99 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`all` **(** :ref:`Callable` method **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`any` **(** :ref:`Callable` method **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append` **(** :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array` **(** :ref:`Array` array **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`assign` **(** :ref:`Array` array **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`back` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`bsearch` **(** :ref:`Variant` value, :ref:`bool` before=true **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`bsearch_custom` **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`count` **(** :ref:`Variant` value **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`duplicate` **(** :ref:`bool` deep=false **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase` **(** :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill` **(** :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`filter` **(** :ref:`Callable` method **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`find` **(** :ref:`Variant` what, :ref:`int` from=0 **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`front` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_typed_builtin` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_typed_class_name` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_typed_script` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has` **(** :ref:`Variant` value **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`hash` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`insert` **(** :ref:`int` position, :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_read_only` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_same_typed` **(** :ref:`Array` array **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_typed` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_read_only` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`map` **(** :ref:`Callable` method **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`max` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`min` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`pick_random` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`pop_at` **(** :ref:`int` position **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`pop_back` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`pop_front` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_back` **(** :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_front` **(** :ref:`Variant` value **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`reduce` **(** :ref:`Callable` method, :ref:`Variant` accum=null **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at` **(** :ref:`int` position **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`resize` **(** :ref:`int` size **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rfind` **(** :ref:`Variant` what, :ref:`int` from=-1 **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shuffle` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`size` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`slice` **(** :ref:`int` begin, :ref:`int` end=2147483647, :ref:`int` step=1, :ref:`bool` deep=false **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort_custom` **(** :ref:`Callable` func **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`all`\ (\ method\: :ref:`Callable`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`any`\ (\ method\: :ref:`Callable`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append`\ (\ value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array`\ (\ array\: :ref:`Array`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`assign`\ (\ array\: :ref:`Array`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`back`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch`\ (\ value\: :ref:`Variant`, before\: :ref:`bool` = true\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bsearch_custom`\ (\ value\: :ref:`Variant`, func\: :ref:`Callable`, before\: :ref:`bool` = true\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`count`\ (\ value\: :ref:`Variant`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`duplicate`\ (\ deep\: :ref:`bool` = false\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase`\ (\ value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill`\ (\ value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`filter`\ (\ method\: :ref:`Callable`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`find`\ (\ what\: :ref:`Variant`, from\: :ref:`int` = 0\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`front`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_typed_builtin`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_typed_class_name`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_typed_script`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has`\ (\ value\: :ref:`Variant`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`insert`\ (\ position\: :ref:`int`, value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_read_only`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_same_typed`\ (\ array\: :ref:`Array`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_typed`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_read_only`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`map`\ (\ method\: :ref:`Callable`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`max`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`min`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`pick_random`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`pop_at`\ (\ position\: :ref:`int`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`pop_back`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`pop_front`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_back`\ (\ value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_front`\ (\ value\: :ref:`Variant`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`reduce`\ (\ method\: :ref:`Callable`, accum\: :ref:`Variant` = null\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at`\ (\ position\: :ref:`int`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`resize`\ (\ size\: :ref:`int`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rfind`\ (\ what\: :ref:`Variant`, from\: :ref:`int` = -1\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shuffle`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`slice`\ (\ begin\: :ref:`int`, end\: :ref:`int` = 2147483647, step\: :ref:`int` = 1, deep\: :ref:`bool` = false\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort_custom`\ (\ func\: :ref:`Callable`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -216,23 +220,23 @@ Operators .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`operator +` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator \<` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator \<=` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator >` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator >=` **(** :ref:`Array` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`operator []` **(** :ref:`int` index **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`operator +`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<=`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >=`\ (\ right\: :ref:`Array`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`operator []`\ (\ index\: :ref:`int`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -247,7 +251,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** **)** +:ref:`Array` **Array**\ (\ ) :ref:`🔗` Constructs an empty **Array**. @@ -257,9 +261,39 @@ Constructs an empty **Array**. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`Array` base, :ref:`int` type, :ref:`StringName` class_name, :ref:`Variant` script **)** +:ref:`Array` **Array**\ (\ base\: :ref:`Array`, type\: :ref:`int`, class_name\: :ref:`StringName`, script\: :ref:`Variant`\ ) + +Creates a typed array from the ``base`` array. All arguments are required. + +- ``type`` is the built-in type as a :ref:`Variant.Type` constant, for example :ref:`@GlobalScope.TYPE_INT`. + +- ``class_name`` is the **native** class name, for example :ref:`Node`. If ``type`` is not :ref:`@GlobalScope.TYPE_OBJECT`, must be an empty string. + +- ``script`` is the associated script. Must be a :ref:`Script` instance or ``null``. + +Examples: + +:: + + class_name MyNode + extends Node + + class MyClass: + pass + + func _ready(): + var a = Array([], TYPE_INT, &"", null) # Array[int] + var b = Array([], TYPE_OBJECT, &"Node", null) # Array[Node] + var c = Array([], TYPE_OBJECT, &"Node", MyNode) # Array[MyNode] + var d = Array([], TYPE_OBJECT, &"RefCounted", MyClass) # Array[MyClass] + +\ **Note:** This constructor can be useful if you want to create a typed array on the fly, but you are not required to use it. In GDScript you can use a temporary variable with the static type you need and then pass it: + +:: -Creates a typed array from the ``base`` array. + func _ready(): + var a: Array[int] = [] + some_func(a) .. rst-class:: classref-item-separator @@ -267,7 +301,7 @@ Creates a typed array from the ``base`` array. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`Array`\ ) Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate`. @@ -277,7 +311,7 @@ Returns the same array as ``from``. If you need a copy of the array, use :ref:`d .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedByteArray` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedByteArray`\ ) Constructs an array from a :ref:`PackedByteArray`. @@ -287,7 +321,7 @@ Constructs an array from a :ref:`PackedByteArray`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedColorArray` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedColorArray`\ ) Constructs an array from a :ref:`PackedColorArray`. @@ -297,7 +331,7 @@ Constructs an array from a :ref:`PackedColorArray`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedFloat32Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedFloat32Array`\ ) Constructs an array from a :ref:`PackedFloat32Array`. @@ -307,7 +341,7 @@ Constructs an array from a :ref:`PackedFloat32Array`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedFloat64Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedFloat64Array`\ ) Constructs an array from a :ref:`PackedFloat64Array`. @@ -317,7 +351,7 @@ Constructs an array from a :ref:`PackedFloat64Array`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedInt32Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedInt32Array`\ ) Constructs an array from a :ref:`PackedInt32Array`. @@ -327,7 +361,7 @@ Constructs an array from a :ref:`PackedInt32Array`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedInt64Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedInt64Array`\ ) Constructs an array from a :ref:`PackedInt64Array`. @@ -337,7 +371,7 @@ Constructs an array from a :ref:`PackedInt64Array`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedStringArray` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedStringArray`\ ) Constructs an array from a :ref:`PackedStringArray`. @@ -347,7 +381,7 @@ Constructs an array from a :ref:`PackedStringArray`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedVector2Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedVector2Array`\ ) Constructs an array from a :ref:`PackedVector2Array`. @@ -357,10 +391,20 @@ Constructs an array from a :ref:`PackedVector2Array`. .. rst-class:: classref-constructor -:ref:`Array` **Array** **(** :ref:`PackedVector3Array` from **)** +:ref:`Array` **Array**\ (\ from\: :ref:`PackedVector3Array`\ ) Constructs an array from a :ref:`PackedVector3Array`. +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`Array` **Array**\ (\ from\: :ref:`PackedVector4Array`\ ) + +Constructs an array from a :ref:`PackedVector4Array`. + .. rst-class:: classref-section-separator ---- @@ -374,7 +418,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **all** **(** :ref:`Callable` method **)** |const| +:ref:`bool` **all**\ (\ method\: :ref:`Callable`\ ) |const| :ref:`🔗` Calls the provided :ref:`Callable` on each element in the array and returns ``true`` if the :ref:`Callable` returns ``true`` for *all* elements in the array. If the :ref:`Callable` returns ``false`` for one array element or more, this method returns ``false``. @@ -407,7 +451,7 @@ See also :ref:`any`, :ref:`filter` **any** **(** :ref:`Callable` method **)** |const| +:ref:`bool` **any**\ (\ method\: :ref:`Callable`\ ) |const| :ref:`🔗` Calls the provided :ref:`Callable` on each element in the array and returns ``true`` if the :ref:`Callable` returns ``true`` for *one or more* elements in the array. If the :ref:`Callable` returns ``false`` for all elements in the array, this method returns ``false``. @@ -440,7 +484,7 @@ See also :ref:`all`, :ref:`filter` value **)** +|void| **append**\ (\ value\: :ref:`Variant`\ ) :ref:`🔗` Appends an element at the end of the array (alias of :ref:`push_back`). @@ -452,7 +496,7 @@ Appends an element at the end of the array (alias of :ref:`push_back` array **)** +|void| **append_array**\ (\ array\: :ref:`Array`\ ) :ref:`🔗` Appends another array at the end of this array. @@ -471,7 +515,7 @@ Appends another array at the end of this array. .. rst-class:: classref-method -void **assign** **(** :ref:`Array` array **)** +|void| **assign**\ (\ array\: :ref:`Array`\ ) :ref:`🔗` Assigns elements of another ``array`` into the array. Resizes the array to match ``array``. Performs type conversions if the array is typed. @@ -483,7 +527,7 @@ Assigns elements of another ``array`` into the array. Resizes the array to match .. rst-class:: classref-method -:ref:`Variant` **back** **(** **)** |const| +:ref:`Variant` **back**\ (\ ) |const| :ref:`🔗` Returns the last element of the array. Prints an error and returns ``null`` if the array is empty. @@ -497,10 +541,16 @@ Returns the last element of the array. Prints an error and returns ``null`` if t .. rst-class:: classref-method -:ref:`int` **bsearch** **(** :ref:`Variant` value, :ref:`bool` before=true **)** |const| +:ref:`int` **bsearch**\ (\ value\: :ref:`Variant`, before\: :ref:`bool` = true\ ) |const| :ref:`🔗` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. +:: + + var array = ["a", "b", "c", "c", "d", "e"] + print(array.bsearch("c", true)) # Prints 2, at the first matching element. + print(array.bsearch("c", false)) # Prints 4, after the last matching element, pointing to "d". + \ **Note:** Calling :ref:`bsearch` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -511,10 +561,12 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -:ref:`int` **bsearch_custom** **(** :ref:`Variant` value, :ref:`Callable` func, :ref:`bool` before=true **)** |const| +:ref:`int` **bsearch_custom**\ (\ value\: :ref:`Variant`, func\: :ref:`Callable`, before\: :ref:`bool` = true\ ) |const| :ref:`🔗` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return ``true`` if the first argument is less than the second, and return ``false`` otherwise. +\ **Note:** The custom method must accept the two arguments in any order, you cannot rely on that the first argument will always be from the array. + \ **Note:** Calling :ref:`bsearch_custom` on an unsorted array results in unexpected behavior. .. rst-class:: classref-item-separator @@ -525,7 +577,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clears the array. This is equivalent to using :ref:`resize` with a size of ``0``. @@ -537,7 +589,7 @@ Clears the array. This is equivalent to using :ref:`resize` **count** **(** :ref:`Variant` value **)** |const| +:ref:`int` **count**\ (\ value\: :ref:`Variant`\ ) |const| :ref:`🔗` Returns the number of times an element is in the array. @@ -549,7 +601,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`Array` **duplicate** **(** :ref:`bool` deep=false **)** |const| +:ref:`Array` **duplicate**\ (\ deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns a copy of the array. @@ -563,11 +615,11 @@ If ``deep`` is ``true``, a deep copy is performed: all nested arrays and diction .. rst-class:: classref-method -void **erase** **(** :ref:`Variant` value **)** +|void| **erase**\ (\ value\: :ref:`Variant`\ ) :ref:`🔗` Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at` instead. -\ **Note:** This method acts in-place and doesn't return a value. +\ **Note:** This method acts in-place and doesn't return a modified array. \ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. @@ -581,7 +633,7 @@ Removes the first occurrence of a value from the array. If the value does not ex .. rst-class:: classref-method -void **fill** **(** :ref:`Variant` value **)** +|void| **fill**\ (\ value\: :ref:`Variant`\ ) :ref:`🔗` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize` to create an array with a given size and initialized elements: @@ -612,7 +664,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`Array` **filter** **(** :ref:`Callable` method **)** |const| +:ref:`Array` **filter**\ (\ method\: :ref:`Callable`\ ) |const| :ref:`🔗` Calls the provided :ref:`Callable` on each element in the array and returns a new array with the elements for which the method returned ``true``. @@ -637,7 +689,7 @@ See also :ref:`any`, :ref:`all`, .. rst-class:: classref-method -:ref:`int` **find** **(** :ref:`Variant` what, :ref:`int` from=0 **)** |const| +:ref:`int` **find**\ (\ what\: :ref:`Variant`, from\: :ref:`int` = 0\ ) |const| :ref:`🔗` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -649,7 +701,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`Variant` **front** **(** **)** |const| +:ref:`Variant` **front**\ (\ ) |const| :ref:`🔗` Returns the first element of the array. Prints an error and returns ``null`` if the array is empty. @@ -663,9 +715,9 @@ Returns the first element of the array. Prints an error and returns ``null`` if .. rst-class:: classref-method -:ref:`int` **get_typed_builtin** **(** **)** |const| +:ref:`int` **get_typed_builtin**\ (\ ) |const| :ref:`🔗` -Returns the :ref:`Variant.Type` constant for a typed array. If the **Array** is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. +Returns the built-in type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. .. rst-class:: classref-item-separator @@ -675,9 +727,9 @@ Returns the :ref:`Variant.Type` constant for a t .. rst-class:: classref-method -:ref:`StringName` **get_typed_class_name** **(** **)** |const| +:ref:`StringName` **get_typed_class_name**\ (\ ) |const| :ref:`🔗` -Returns a class name of a typed **Array** of type :ref:`@GlobalScope.TYPE_OBJECT`. +Returns the **native** class name of the typed array if the built-in type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, this method returns an empty string. .. rst-class:: classref-item-separator @@ -687,9 +739,9 @@ Returns a class name of a typed **Array** of type :ref:`@GlobalScope.TYPE_OBJECT .. rst-class:: classref-method -:ref:`Variant` **get_typed_script** **(** **)** |const| +:ref:`Variant` **get_typed_script**\ (\ ) |const| :ref:`🔗` -Returns the script associated with a typed array tied to a class name. +Returns the script associated with the typed array. This method returns a :ref:`Script` instance or ``null``. .. rst-class:: classref-item-separator @@ -699,7 +751,7 @@ Returns the script associated with a typed array tied to a class name. .. rst-class:: classref-method -:ref:`bool` **has** **(** :ref:`Variant` value **)** |const| +:ref:`bool` **has**\ (\ value\: :ref:`Variant`\ ) |const| :ref:`🔗` Returns ``true`` if the array contains the given value. @@ -754,7 +806,7 @@ Returns ``true`` if the array contains the given value. .. rst-class:: classref-method -:ref:`int` **hash** **(** **)** |const| +:ref:`int` **hash**\ (\ ) |const| :ref:`🔗` Returns a hashed 32-bit integer value representing the array and its contents. @@ -768,11 +820,11 @@ Returns a hashed 32-bit integer value representing the array and its contents. .. rst-class:: classref-method -:ref:`int` **insert** **(** :ref:`int` position, :ref:`Variant` value **)** +:ref:`int` **insert**\ (\ position\: :ref:`int`, value\: :ref:`Variant`\ ) :ref:`🔗` -Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``). +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``). Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. -\ **Note:** This method acts in-place and doesn't return a value. +\ **Note:** This method acts in-place and doesn't return a modified array. \ **Note:** On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed. @@ -784,7 +836,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool` **is_empty** **(** **)** |const| +:ref:`bool` **is_empty**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the array is empty. @@ -796,7 +848,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool` **is_read_only** **(** **)** |const| +:ref:`bool` **is_read_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the array is read-only. See :ref:`make_read_only`. Arrays are automatically read-only if declared with ``const`` keyword. @@ -808,7 +860,7 @@ Returns ``true`` if the array is read-only. See :ref:`make_read_only` **is_same_typed** **(** :ref:`Array` array **)** |const| +:ref:`bool` **is_same_typed**\ (\ array\: :ref:`Array`\ ) |const| :ref:`🔗` Returns ``true`` if the array is typed the same as ``array``. @@ -820,7 +872,7 @@ Returns ``true`` if the array is typed the same as ``array``. .. rst-class:: classref-method -:ref:`bool` **is_typed** **(** **)** |const| +:ref:`bool` **is_typed**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the array is typed. Typed arrays can only store elements of their associated type and provide type safety for the ``[]`` operator. Methods of typed array still return :ref:`Variant`. @@ -832,7 +884,7 @@ Returns ``true`` if the array is typed. Typed arrays can only store elements of .. rst-class:: classref-method -void **make_read_only** **(** **)** +|void| **make_read_only**\ (\ ) :ref:`🔗` Makes the array read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays. @@ -844,7 +896,7 @@ Makes the array read-only, i.e. disabled modifying of the array's elements. Does .. rst-class:: classref-method -:ref:`Array` **map** **(** :ref:`Callable` method **)** |const| +:ref:`Array` **map**\ (\ method\: :ref:`Callable`\ ) |const| :ref:`🔗` Calls the provided :ref:`Callable` for each element in the array and returns a new array filled with values returned by the method. @@ -869,7 +921,7 @@ See also :ref:`filter`, :ref:`reduce` **max** **(** **)** |const| +:ref:`Variant` **max**\ (\ ) |const| :ref:`🔗` Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned. @@ -893,7 +945,7 @@ To find the maximum value using a custom comparator, you can use :ref:`reduce` **min** **(** **)** |const| +:ref:`Variant` **min**\ (\ ) |const| :ref:`🔗` Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, ``null`` is returned. @@ -907,9 +959,9 @@ See also :ref:`max` for an example of using a custom com .. rst-class:: classref-method -:ref:`Variant` **pick_random** **(** **)** |const| +:ref:`Variant` **pick_random**\ (\ ) |const| :ref:`🔗` -Returns a random value from the target array. +Returns a random value from the target array. Prints an error and returns ``null`` if the array is empty. .. tabs:: @@ -934,9 +986,9 @@ Returns a random value from the target array. .. rst-class:: classref-method -:ref:`Variant` **pop_at** **(** :ref:`int` position **)** +:ref:`Variant` **pop_at**\ (\ position\: :ref:`int`\ ) :ref:`🔗` -Removes and returns the element of the array at index ``position``. If negative, ``position`` is considered relative to the end of the array. Leaves the array untouched and returns ``null`` if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. +Removes and returns the element of the array at index ``position``. If negative, ``position`` is considered relative to the end of the array. Leaves the array unchanged and returns ``null`` if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. \ **Note:** On large arrays, this method can be slower than :ref:`pop_back` as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower :ref:`pop_at` will be. @@ -948,7 +1000,7 @@ Removes and returns the element of the array at index ``position``. If negative, .. rst-class:: classref-method -:ref:`Variant` **pop_back** **(** **)** +:ref:`Variant` **pop_back**\ (\ ) :ref:`🔗` Removes and returns the last element of the array. Returns ``null`` if the array is empty, without printing an error message. See also :ref:`pop_front`. @@ -960,7 +1012,7 @@ Removes and returns the last element of the array. Returns ``null`` if the array .. rst-class:: classref-method -:ref:`Variant` **pop_front** **(** **)** +:ref:`Variant` **pop_front**\ (\ ) :ref:`🔗` Removes and returns the first element of the array. Returns ``null`` if the array is empty, without printing an error message. See also :ref:`pop_back`. @@ -974,7 +1026,7 @@ Removes and returns the first element of the array. Returns ``null`` if the arra .. rst-class:: classref-method -void **push_back** **(** :ref:`Variant` value **)** +|void| **push_back**\ (\ value\: :ref:`Variant`\ ) :ref:`🔗` Appends an element at the end of the array. See also :ref:`push_front`. @@ -986,7 +1038,7 @@ Appends an element at the end of the array. See also :ref:`push_front` value **)** +|void| **push_front**\ (\ value\: :ref:`Variant`\ ) :ref:`🔗` Adds an element at the beginning of the array. See also :ref:`push_back`. @@ -1000,7 +1052,7 @@ Adds an element at the beginning of the array. See also :ref:`push_back` **reduce** **(** :ref:`Callable` method, :ref:`Variant` accum=null **)** |const| +:ref:`Variant` **reduce**\ (\ method\: :ref:`Callable`, accum\: :ref:`Variant` = null\ ) |const| :ref:`🔗` Calls the provided :ref:`Callable` for each element in array and accumulates the result in ``accum``. @@ -1025,11 +1077,11 @@ See also :ref:`map`, :ref:`filter` position **)** +|void| **remove_at**\ (\ position\: :ref:`int`\ ) :ref:`🔗` Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use :ref:`erase` instead. -\ **Note:** This method acts in-place and doesn't return a value. +\ **Note:** This method acts in-place and doesn't return a modified array. \ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. @@ -1043,9 +1095,13 @@ Removes an element from the array by index. If the index does not exist in the a .. rst-class:: classref-method -:ref:`int` **resize** **(** :ref:`int` size **)** +:ref:`int` **resize**\ (\ size\: :ref:`int`\ ) :ref:`🔗` -Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``. +Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``. Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. + +Calling :ref:`resize` once and assigning the new values is faster than adding new elements one by one. + +\ **Note:** This method acts in-place and doesn't return a modified array. .. rst-class:: classref-item-separator @@ -1055,7 +1111,7 @@ Resizes the array to contain a different number of elements. If the array size i .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗` Reverses the order of the elements in the array. @@ -1067,7 +1123,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int` **rfind** **(** :ref:`Variant` what, :ref:`int` from=-1 **)** |const| +:ref:`int` **rfind**\ (\ what\: :ref:`Variant`, from\: :ref:`int` = -1\ ) |const| :ref:`🔗` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -1079,7 +1135,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **shuffle** **(** **)** +|void| **shuffle**\ (\ ) :ref:`🔗` Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as :ref:`@GlobalScope.randi`. Call :ref:`@GlobalScope.randomize` to ensure that a new seed will be used each time if you want non-reproducible shuffling. @@ -1091,7 +1147,7 @@ Shuffles the array such that the items will have a random order. This method use .. rst-class:: classref-method -:ref:`int` **size** **(** **)** |const| +:ref:`int` **size**\ (\ ) |const| :ref:`🔗` Returns the number of elements in the array. @@ -1103,7 +1159,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647, :ref:`int` step=1, :ref:`bool` deep=false **)** |const| +:ref:`Array` **slice**\ (\ begin\: :ref:`int`, end\: :ref:`int` = 2147483647, step\: :ref:`int` = 1, deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the slice of the **Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **Array**. @@ -1115,6 +1171,8 @@ If specified, ``step`` is the relative index between source elements. It can be If ``deep`` is true, each element will be copied by value rather than by reference. +\ **Note:** To include the first element when ``step`` is negative, use ``arr.slice(begin, -arr.size() - 1, step)`` (i.e. ``[0, 1, 2].slice(1, -4, -1)`` returns ``[1, 0]``). + .. rst-class:: classref-item-separator ---- @@ -1123,7 +1181,7 @@ If ``deep`` is true, each element will be copied by value rather than by referen .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗` Sorts the array. @@ -1164,7 +1222,7 @@ To perform natural order sorting, you can use :ref:`sort_custom` func **)** +|void| **sort_custom**\ (\ func\: :ref:`Callable`\ ) :ref:`🔗` Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either ``true`` or ``false``. For two elements ``a`` and ``b``, if the given method returns ``true``, element ``b`` will be after element ``a`` in the array. @@ -1210,7 +1268,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`Array` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Compares the left operand **Array** against the ``right`` **Array**. Returns ``true`` if the sizes or contents of the arrays are *not* equal, ``false`` otherwise. @@ -1222,7 +1280,7 @@ Compares the left operand **Array** against the ``right`` **Array**. Returns ``t .. rst-class:: classref-operator -:ref:`Array` **operator +** **(** :ref:`Array` right **)** +:ref:`Array` **operator +**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Concatenates two **Array**\ s together, with the ``right`` **Array** being added to the end of the **Array** specified in the left operand. For example, ``[1, 2] + [3, 4]`` results in ``[1, 2, 3, 4]``. @@ -1234,7 +1292,7 @@ Concatenates two **Array**\ s together, with the ``right`` **Array** being added .. rst-class:: classref-operator -:ref:`bool` **operator <** **(** :ref:`Array` right **)** +:ref:`bool` **operator <**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Performs a comparison for each index between the left operand **Array** and the ``right`` **Array**, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``false`` if the left operand **Array** has fewer elements, otherwise it returns ``true``. @@ -1246,7 +1304,7 @@ Performs a comparison for each index between the left operand **Array** and the .. rst-class:: classref-operator -:ref:`bool` **operator <=** **(** :ref:`Array` right **)** +:ref:`bool` **operator <=**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Performs a comparison for each index between the left operand **Array** and the ``right`` **Array**, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is less, or ``false`` if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the left operand **Array** has the same number of elements or fewer, otherwise it returns ``false``. @@ -1258,7 +1316,7 @@ Performs a comparison for each index between the left operand **Array** and the .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`Array` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Compares the left operand **Array** against the ``right`` **Array**. Returns ``true`` if the sizes and contents of the arrays are equal, ``false`` otherwise. @@ -1270,7 +1328,7 @@ Compares the left operand **Array** against the ``right`` **Array**. Returns ``t .. rst-class:: classref-operator -:ref:`bool` **operator >** **(** :ref:`Array` right **)** +:ref:`bool` **operator >**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Performs a comparison for each index between the left operand **Array** and the ``right`` **Array**, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is greater, or ``false`` if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the ``right`` **Array** has more elements, otherwise it returns ``false``. @@ -1282,7 +1340,7 @@ Performs a comparison for each index between the left operand **Array** and the .. rst-class:: classref-operator -:ref:`bool` **operator >=** **(** :ref:`Array` right **)** +:ref:`bool` **operator >=**\ (\ right\: :ref:`Array`\ ) :ref:`🔗` Performs a comparison for each index between the left operand **Array** and the ``right`` **Array**, considering the highest common index of both arrays for this comparison: Returns ``true`` on the first occurrence of an element that is greater, or ``false`` if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns ``true`` if the ``right`` **Array** has more or the same number of elements, otherwise it returns ``false``. @@ -1294,7 +1352,7 @@ Performs a comparison for each index between the left operand **Array** and the .. rst-class:: classref-operator -:ref:`Variant` **operator []** **(** :ref:`int` index **)** +:ref:`Variant` **operator []**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Returns a reference to the element of type :ref:`Variant` at the specified location. Arrays start at index 0. ``index`` can be a zero or positive value to start from the beginning, or a negative value to start from the end. Out-of-bounds array access causes a run-time error, which will result in an error being printed and the project execution pausing if run from the editor. @@ -1305,3 +1363,4 @@ Returns a reference to the element of type :ref:`Variant` at the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 00e6b5d6e8a..629392dde74 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -103,45 +103,45 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_blend_shape` **(** :ref:`StringName` name **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_surface_from_arrays` **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, |bitfield|\<:ref:`ArrayFormat`\> flags=0 **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_blend_shapes` **(** **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_surfaces` **(** **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend_shape_count` **(** **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_blend_shape_name` **(** :ref:`int` index **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`lightmap_unwrap` **(** :ref:`Transform3D` transform, :ref:`float` texel_size **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`regen_normal_maps` **(** **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`surface_find_by_name` **(** :ref:`String` name **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`surface_get_array_index_len` **(** :ref:`int` surf_idx **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`surface_get_array_len` **(** :ref:`int` surf_idx **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`ArrayFormat`\> | :ref:`surface_get_format` **(** :ref:`int` surf_idx **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`surface_get_name` **(** :ref:`int` surf_idx **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PrimitiveType` | :ref:`surface_get_primitive_type` **(** :ref:`int` surf_idx **)** |const| | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_name` **(** :ref:`int` surf_idx, :ref:`String` name **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_update_attribute_region` **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_update_skin_region` **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_update_vertex_region` **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** | - +---------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_blend_shape`\ (\ name\: :ref:`StringName`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_surface_from_arrays`\ (\ primitive\: :ref:`PrimitiveType`, arrays\: :ref:`Array`, blend_shapes\: :ref:`Array`\[:ref:`Array`\] = [], lods\: :ref:`Dictionary` = {}, flags\: |bitfield|\[:ref:`ArrayFormat`\] = 0\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_blend_shapes`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_surfaces`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_blend_shape_count`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_blend_shape_name`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`lightmap_unwrap`\ (\ transform\: :ref:`Transform3D`, texel_size\: :ref:`float`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`regen_normal_maps`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_shape_name`\ (\ index\: :ref:`int`, name\: :ref:`StringName`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`surface_find_by_name`\ (\ name\: :ref:`String`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`surface_get_array_index_len`\ (\ surf_idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`surface_get_array_len`\ (\ surf_idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`ArrayFormat`\] | :ref:`surface_get_format`\ (\ surf_idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`surface_get_name`\ (\ surf_idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType` | :ref:`surface_get_primitive_type`\ (\ surf_idx\: :ref:`int`\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_name`\ (\ surf_idx\: :ref:`int`, name\: :ref:`String`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_update_attribute_region`\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_update_skin_region`\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_update_vertex_region`\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -156,12 +156,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BlendShapeMode` **blend_shape_mode** = ``1`` +:ref:`BlendShapeMode` **blend_shape_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_shape_mode** **(** :ref:`BlendShapeMode` value **)** -- :ref:`BlendShapeMode` **get_blend_shape_mode** **(** **)** +- |void| **set_blend_shape_mode**\ (\ value\: :ref:`BlendShapeMode`\ ) +- :ref:`BlendShapeMode` **get_blend_shape_mode**\ (\ ) Sets the blend shape mode to one of :ref:`BlendShapeMode`. @@ -173,12 +173,12 @@ Sets the blend shape mode to one of :ref:`BlendShapeMode` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` +:ref:`AABB` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_custom_aabb** **(** :ref:`AABB` value **)** -- :ref:`AABB` **get_custom_aabb** **(** **)** +- |void| **set_custom_aabb**\ (\ value\: :ref:`AABB`\ ) +- :ref:`AABB` **get_custom_aabb**\ (\ ) Overrides the :ref:`AABB` with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. @@ -190,12 +190,12 @@ Overrides the :ref:`AABB` with one defined by user for use with frus .. rst-class:: classref-property -:ref:`ArrayMesh` **shadow_mesh** +:ref:`ArrayMesh` **shadow_mesh** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shadow_mesh** **(** :ref:`ArrayMesh` value **)** -- :ref:`ArrayMesh` **get_shadow_mesh** **(** **)** +- |void| **set_shadow_mesh**\ (\ value\: :ref:`ArrayMesh`\ ) +- :ref:`ArrayMesh` **get_shadow_mesh**\ (\ ) An optional mesh which is used for rendering shadows and can be used for the depth prepass. Can be used to increase performance of shadow rendering by using a mesh that only contains vertex position data (without normals, UVs, colors, etc.). @@ -212,7 +212,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_blend_shape** **(** :ref:`StringName` name **)** +|void| **add_blend_shape**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. @@ -224,7 +224,7 @@ Adds name for a blend shape that will be added with :ref:`add_surface_from_array .. rst-class:: classref-method -void **add_surface_from_arrays** **(** :ref:`PrimitiveType` primitive, :ref:`Array` arrays, :ref:`Array[]` blend_shapes=[], :ref:`Dictionary` lods={}, |bitfield|\<:ref:`ArrayFormat`\> flags=0 **)** +|void| **add_surface_from_arrays**\ (\ primitive\: :ref:`PrimitiveType`, arrays\: :ref:`Array`, blend_shapes\: :ref:`Array`\[:ref:`Array`\] = [], lods\: :ref:`Dictionary` = {}, flags\: |bitfield|\[:ref:`ArrayFormat`\] = 0\ ) :ref:`🔗` Creates a new surface. :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. @@ -234,7 +234,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX< The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL`, and :ref:`Mesh.ARRAY_TANGENT` are set if and only if they are set in ``arrays`` and all other entries are ``null``. -The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used. +The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`. @@ -248,7 +248,7 @@ The ``flags`` argument is the bitwise or of, as required: One value of :ref:`Arr .. rst-class:: classref-method -void **clear_blend_shapes** **(** **)** +|void| **clear_blend_shapes**\ (\ ) :ref:`🔗` Removes all blend shapes from this **ArrayMesh**. @@ -260,7 +260,7 @@ Removes all blend shapes from this **ArrayMesh**. .. rst-class:: classref-method -void **clear_surfaces** **(** **)** +|void| **clear_surfaces**\ (\ ) :ref:`🔗` Removes all surfaces from this **ArrayMesh**. @@ -272,7 +272,7 @@ Removes all surfaces from this **ArrayMesh**. .. rst-class:: classref-method -:ref:`int` **get_blend_shape_count** **(** **)** |const| +:ref:`int` **get_blend_shape_count**\ (\ ) |const| :ref:`🔗` Returns the number of blend shapes that the **ArrayMesh** holds. @@ -284,7 +284,7 @@ Returns the number of blend shapes that the **ArrayMesh** holds. .. rst-class:: classref-method -:ref:`StringName` **get_blend_shape_name** **(** :ref:`int` index **)** |const| +:ref:`StringName` **get_blend_shape_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the name of the blend shape at this index. @@ -296,7 +296,7 @@ Returns the name of the blend shape at this index. .. rst-class:: classref-method -:ref:`Error` **lightmap_unwrap** **(** :ref:`Transform3D` transform, :ref:`float` texel_size **)** +:ref:`Error` **lightmap_unwrap**\ (\ transform\: :ref:`Transform3D`, texel_size\: :ref:`float`\ ) :ref:`🔗` Performs a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmapping. @@ -308,7 +308,7 @@ Performs a UV unwrap on the **ArrayMesh** to prepare the mesh for lightmapping. .. rst-class:: classref-method -void **regen_normal_maps** **(** **)** +|void| **regen_normal_maps**\ (\ ) :ref:`🔗` Regenerates tangents for each of the **ArrayMesh**'s surfaces. @@ -320,7 +320,7 @@ Regenerates tangents for each of the **ArrayMesh**'s surfaces. .. rst-class:: classref-method -void **set_blend_shape_name** **(** :ref:`int` index, :ref:`StringName` name **)** +|void| **set_blend_shape_name**\ (\ index\: :ref:`int`, name\: :ref:`StringName`\ ) :ref:`🔗` Sets the name of the blend shape at this index. @@ -332,7 +332,7 @@ Sets the name of the blend shape at this index. .. rst-class:: classref-method -:ref:`int` **surface_find_by_name** **(** :ref:`String` name **)** |const| +:ref:`int` **surface_find_by_name**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` Returns the index of the first surface with this name held within this **ArrayMesh**. If none are found, -1 is returned. @@ -344,7 +344,7 @@ Returns the index of the first surface with this name held within this **ArrayMe .. rst-class:: classref-method -:ref:`int` **surface_get_array_index_len** **(** :ref:`int` surf_idx **)** |const| +:ref:`int` **surface_get_array_index_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays`). @@ -356,7 +356,7 @@ Returns the length in indices of the index array in the requested surface (see : .. rst-class:: classref-method -:ref:`int` **surface_get_array_len** **(** :ref:`int` surf_idx **)** |const| +:ref:`int` **surface_get_array_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays`). @@ -368,7 +368,7 @@ Returns the length in vertices of the vertex array in the requested surface (see .. rst-class:: classref-method -|bitfield|\<:ref:`ArrayFormat`\> **surface_get_format** **(** :ref:`int` surf_idx **)** |const| +|bitfield|\[:ref:`ArrayFormat`\] **surface_get_format**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays`). @@ -380,7 +380,7 @@ Returns the format mask of the requested surface (see :ref:`add_surface_from_arr .. rst-class:: classref-method -:ref:`String` **surface_get_name** **(** :ref:`int` surf_idx **)** |const| +:ref:`String` **surface_get_name**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`🔗` Gets the name assigned to this surface. @@ -392,7 +392,7 @@ Gets the name assigned to this surface. .. rst-class:: classref-method -:ref:`PrimitiveType` **surface_get_primitive_type** **(** :ref:`int` surf_idx **)** |const| +:ref:`PrimitiveType` **surface_get_primitive_type**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays`). @@ -404,7 +404,7 @@ Returns the primitive type of the requested surface (see :ref:`add_surface_from_ .. rst-class:: classref-method -void **surface_set_name** **(** :ref:`int` surf_idx, :ref:`String` name **)** +|void| **surface_set_name**\ (\ surf_idx\: :ref:`int`, name\: :ref:`String`\ ) :ref:`🔗` Sets a name for a given surface. @@ -416,7 +416,7 @@ Sets a name for a given surface. .. rst-class:: classref-method -void **surface_update_attribute_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +|void| **surface_update_attribute_region**\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) :ref:`🔗` .. container:: contribute @@ -430,7 +430,7 @@ void **surface_update_attribute_region** **(** :ref:`int` surf_idx, : .. rst-class:: classref-method -void **surface_update_skin_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +|void| **surface_update_skin_region**\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) :ref:`🔗` .. container:: contribute @@ -444,7 +444,7 @@ void **surface_update_skin_region** **(** :ref:`int` surf_idx, :ref:` .. rst-class:: classref-method -void **surface_update_vertex_region** **(** :ref:`int` surf_idx, :ref:`int` offset, :ref:`PackedByteArray` data **)** +|void| **surface_update_vertex_region**\ (\ surf_idx\: :ref:`int`, offset\: :ref:`int`, data\: :ref:`PackedByteArray`\ ) :ref:`🔗` .. container:: contribute @@ -457,3 +457,4 @@ void **surface_update_vertex_region** **(** :ref:`int` surf_idx, :ref .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index aba0e729b9e..5bdd43482c2 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -23,6 +23,13 @@ Description See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -45,9 +52,9 @@ Methods .. table:: :widths: auto - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_arrays` **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_arrays`\ (\ vertices\: :ref:`PackedVector3Array`, indices\: :ref:`PackedInt32Array`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,17 +69,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array` **indices** = ``PackedInt32Array()`` +:ref:`PackedInt32Array` **indices** = ``PackedInt32Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_indices** **(** :ref:`PackedInt32Array` value **)** -- :ref:`PackedInt32Array` **get_indices** **(** **)** +- |void| **set_indices**\ (\ value\: :ref:`PackedInt32Array`\ ) +- :ref:`PackedInt32Array` **get_indices**\ (\ ) The occluder's index position. Indices determine which points from the :ref:`vertices` array should be drawn, and in which order. \ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -81,17 +90,19 @@ The occluder's index position. Indices determine which points from the :ref:`ver .. rst-class:: classref-property -:ref:`PackedVector3Array` **vertices** = ``PackedVector3Array()`` +:ref:`PackedVector3Array` **vertices** = ``PackedVector3Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_vertices** **(** :ref:`PackedVector3Array` value **)** -- :ref:`PackedVector3Array` **get_vertices** **(** **)** +- |void| **set_vertices**\ (\ value\: :ref:`PackedVector3Array`\ ) +- :ref:`PackedVector3Array` **get_vertices**\ (\ ) The occluder's vertex positions in local 3D coordinates. \ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-section-separator ---- @@ -105,7 +116,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_arrays** **(** :ref:`PackedVector3Array` vertices, :ref:`PackedInt32Array` indices **)** +|void| **set_arrays**\ (\ vertices\: :ref:`PackedVector3Array`, indices\: :ref:`PackedInt32Array`\ ) :ref:`🔗` Sets :ref:`indices` and :ref:`vertices`, while updating the final occluder only once after both values are set. @@ -116,3 +127,4 @@ Sets :ref:`indices` and :ref:`vertices` .. _class_AspectRatioContainer_constant_STRETCH_WIDTH_CONTROLS_HEIGHT: @@ -103,7 +103,7 @@ When the bounding rectangle of child controls exceed the container's size and :r .. rst-class:: classref-enumeration -enum **AlignmentMode**: +enum **AlignmentMode**: :ref:`🔗` .. _class_AspectRatioContainer_constant_ALIGNMENT_BEGIN: @@ -142,12 +142,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AlignmentMode` **alignment_horizontal** = ``1`` +:ref:`AlignmentMode` **alignment_horizontal** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alignment_horizontal** **(** :ref:`AlignmentMode` value **)** -- :ref:`AlignmentMode` **get_alignment_horizontal** **(** **)** +- |void| **set_alignment_horizontal**\ (\ value\: :ref:`AlignmentMode`\ ) +- :ref:`AlignmentMode` **get_alignment_horizontal**\ (\ ) Specifies the horizontal relative position of child controls. @@ -159,12 +159,12 @@ Specifies the horizontal relative position of child controls. .. rst-class:: classref-property -:ref:`AlignmentMode` **alignment_vertical** = ``1`` +:ref:`AlignmentMode` **alignment_vertical** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alignment_vertical** **(** :ref:`AlignmentMode` value **)** -- :ref:`AlignmentMode` **get_alignment_vertical** **(** **)** +- |void| **set_alignment_vertical**\ (\ value\: :ref:`AlignmentMode`\ ) +- :ref:`AlignmentMode` **get_alignment_vertical**\ (\ ) Specifies the vertical relative position of child controls. @@ -176,12 +176,12 @@ Specifies the vertical relative position of child controls. .. rst-class:: classref-property -:ref:`float` **ratio** = ``1.0`` +:ref:`float` **ratio** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_ratio** **(** **)** +- |void| **set_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ratio**\ (\ ) The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the :ref:`stretch_mode`. @@ -193,12 +193,12 @@ The aspect ratio to enforce on child controls. This is the width divided by the .. rst-class:: classref-property -:ref:`StretchMode` **stretch_mode** = ``2`` +:ref:`StretchMode` **stretch_mode** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stretch_mode** **(** :ref:`StretchMode` value **)** -- :ref:`StretchMode` **get_stretch_mode** **(** **)** +- |void| **set_stretch_mode**\ (\ value\: :ref:`StretchMode`\ ) +- :ref:`StretchMode` **get_stretch_mode**\ (\ ) The stretch mode used to align child controls. @@ -209,3 +209,4 @@ The stretch mode used to align child controls. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index fec15fd8acd..91eef236561 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -31,57 +31,57 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_available_point_id` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector2` to_position **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_point_capacity` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_point_connections` **(** :ref:`int` id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_point_ids` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point` **(** :ref:`int` id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector2` position **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point`\ (\ id\: :ref:`int`, position\: :ref:`Vector2`, weight_scale\: :ref:`float` = 1.0\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`are_points_connected`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`connect_points`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_points`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_available_point_id`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_closest_point`\ (\ to_position\: :ref:`Vector2`, include_disabled\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_closest_position_in_segment`\ (\ to_position\: :ref:`Vector2`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_capacity`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_point_connections`\ (\ id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_count`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_point_ids`\ (\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_disabled`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point`\ (\ id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reserve_space`\ (\ num_nodes\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_disabled`\ (\ id\: :ref:`int`, disabled\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_position`\ (\ id\: :ref:`int`, position\: :ref:`Vector2`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -92,11 +92,11 @@ Methods Method Descriptions ------------------- -.. _class_AStar2D_method__compute_cost: +.. _class_AStar2D_private_method__compute_cost: .. rst-class:: classref-method -:ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +:ref:`float` **_compute_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when computing the cost between two connected points. @@ -106,11 +106,11 @@ Note that this function is hidden in the default **AStar2D** class. ---- -.. _class_AStar2D_method__estimate_cost: +.. _class_AStar2D_private_method__estimate_cost: .. rst-class:: classref-method -:ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. @@ -124,11 +124,11 @@ Note that this function is hidden in the default **AStar2D** class. .. rst-class:: classref-method -void **add_point** **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** +|void| **add_point**\ (\ id\: :ref:`int`, position\: :ref:`Vector2`, weight_scale\: :ref:`float` = 1.0\ ) :ref:`🔗` Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -155,7 +155,7 @@ If there already exists a point for the given ``id``, its position and weight sc .. rst-class:: classref-method -:ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| +:ref:`bool` **are_points_connected**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns whether there is a connection/segment between the given points. If ``bidirectional`` is ``false``, returns whether movement from ``id`` to ``to_id`` is possible through this segment. @@ -167,7 +167,7 @@ Returns whether there is a connection/segment between the given points. If ``bid .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clears all the points and segments. @@ -179,7 +179,7 @@ Clears all the points and segments. .. rst-class:: classref-method -void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +|void| **connect_points**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) :ref:`🔗` Creates a segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is allowed, not the reverse direction. @@ -210,7 +210,7 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o .. rst-class:: classref-method -void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +|void| **disconnect_points**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) :ref:`🔗` Deletes the segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is prevented, and a unidirectional segment possibly remains. @@ -222,7 +222,7 @@ Deletes the segment between the given points. If ``bidirectional`` is ``false``, .. rst-class:: classref-method -:ref:`int` **get_available_point_id** **(** **)** |const| +:ref:`int` **get_available_point_id**\ (\ ) |const| :ref:`🔗` Returns the next available point ID with no point associated to it. @@ -234,7 +234,7 @@ Returns the next available point ID with no point associated to it. .. rst-class:: classref-method -:ref:`int` **get_closest_point** **(** :ref:`Vector2` to_position, :ref:`bool` include_disabled=false **)** |const| +:ref:`int` **get_closest_point**\ (\ to_position\: :ref:`Vector2`, include_disabled\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the ID of the closest point to ``to_position``, optionally taking disabled points into account. Returns ``-1`` if there are no points in the points pool. @@ -248,7 +248,7 @@ Returns the ID of the closest point to ``to_position``, optionally taking disabl .. rst-class:: classref-method -:ref:`Vector2` **get_closest_position_in_segment** **(** :ref:`Vector2` to_position **)** |const| +:ref:`Vector2` **get_closest_position_in_segment**\ (\ to_position\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns the closest position to ``to_position`` that resides inside a segment between two connected points. @@ -283,10 +283,12 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. tabs:: @@ -331,7 +333,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` .. rst-class:: classref-method -:ref:`int` **get_point_capacity** **(** **)** |const| +:ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`🔗` Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. @@ -343,7 +345,7 @@ Returns the capacity of the structure backing the points, useful in conjunction .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** +:ref:`PackedInt64Array` **get_point_connections**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Returns an array with the IDs of the points that form the connection with the given point. @@ -386,7 +388,7 @@ Returns an array with the IDs of the points that form the connection with the gi .. rst-class:: classref-method -:ref:`int` **get_point_count** **(** **)** |const| +:ref:`int` **get_point_count**\ (\ ) |const| :ref:`🔗` Returns the number of points currently in the points pool. @@ -398,7 +400,7 @@ Returns the number of points currently in the points pool. .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_point_ids** **(** **)** +:ref:`PackedInt64Array` **get_point_ids**\ (\ ) :ref:`🔗` Returns an array of all point IDs. @@ -410,11 +412,13 @@ Returns an array of all point IDs. .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector2Array` and will print an error message. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator @@ -424,7 +428,7 @@ Returns an array with the points that are in the path found by AStar2D between t .. rst-class:: classref-method -:ref:`Vector2` **get_point_position** **(** :ref:`int` id **)** |const| +:ref:`Vector2` **get_point_position**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the point associated with the given ``id``. @@ -436,7 +440,7 @@ Returns the position of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| +:ref:`float` **get_point_weight_scale**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the weight scale of the point associated with the given ``id``. @@ -448,7 +452,7 @@ Returns the weight scale of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`bool` **has_point** **(** :ref:`int` id **)** |const| +:ref:`bool` **has_point**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether a point associated with the given ``id`` exists. @@ -460,7 +464,7 @@ Returns whether a point associated with the given ``id`` exists. .. rst-class:: classref-method -:ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| +:ref:`bool` **is_point_disabled**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. @@ -472,7 +476,7 @@ Returns whether a point is disabled or not for pathfinding. By default, all poin .. rst-class:: classref-method -void **remove_point** **(** :ref:`int` id **)** +|void| **remove_point**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Removes the point associated with the given ``id`` from the points pool. @@ -484,7 +488,7 @@ Removes the point associated with the given ``id`` from the points pool. .. rst-class:: classref-method -void **reserve_space** **(** :ref:`int` num_nodes **)** +|void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`🔗` Reserves space internally for ``num_nodes`` points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. @@ -496,7 +500,7 @@ Reserves space internally for ``num_nodes`` points, useful if you're adding a kn .. rst-class:: classref-method -void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** +|void| **set_point_disabled**\ (\ id\: :ref:`int`, disabled\: :ref:`bool` = true\ ) :ref:`🔗` Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. @@ -508,7 +512,7 @@ Disables or enables the specified point for pathfinding. Useful for making a tem .. rst-class:: classref-method -void **set_point_position** **(** :ref:`int` id, :ref:`Vector2` position **)** +|void| **set_point_position**\ (\ id\: :ref:`int`, position\: :ref:`Vector2`\ ) :ref:`🔗` Sets the ``position`` for the point with the given ``id``. @@ -520,9 +524,9 @@ Sets the ``position`` for the point with the given ``id``. .. rst-class:: classref-method -void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** +|void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`🔗` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -531,3 +535,4 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index ed02d2309af..68a00d86253 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -23,7 +23,7 @@ A\* (A star) is a computer algorithm used in pathfinding and graph traversal, th You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. -It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar3D`` and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. +It is also possible to use non-Euclidean distances. To do so, create a class that extends **AStar3D** and override methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both take two indices and return a length, as is shown in the following example. .. tabs:: @@ -56,9 +56,9 @@ It is also possible to use non-Euclidean distances. To do so, create a class tha -\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom ``_compute_cost`` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. +\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. -If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. +If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. .. rst-class:: classref-reftable-group @@ -68,57 +68,57 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`are_points_connected` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`connect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_points` **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_available_point_id` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_closest_point` **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_closest_position_in_segment` **(** :ref:`Vector3` to_position **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_id_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_point_capacity` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_point_connections` **(** :ref:`int` id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_point_count` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array` | :ref:`get_point_ids` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_point_path` **(** :ref:`int` from_id, :ref:`int` to_id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_point` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_disabled` **(** :ref:`int` id **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point` **(** :ref:`int` id **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reserve_space` **(** :ref:`int` num_nodes **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_disabled` **(** :ref:`int` id, :ref:`bool` disabled=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_position` **(** :ref:`int` id, :ref:`Vector3` position **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_weight_scale` **(** :ref:`int` id, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point`\ (\ id\: :ref:`int`, position\: :ref:`Vector3`, weight_scale\: :ref:`float` = 1.0\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`are_points_connected`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`connect_points`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_points`\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_available_point_id`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_closest_point`\ (\ to_position\: :ref:`Vector3`, include_disabled\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_closest_position_in_segment`\ (\ to_position\: :ref:`Vector3`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_id_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_capacity`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_point_connections`\ (\ id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_point_count`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array` | :ref:`get_point_ids`\ (\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_position`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_point`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_disabled`\ (\ id\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point`\ (\ id\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reserve_space`\ (\ num_nodes\: :ref:`int`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_disabled`\ (\ id\: :ref:`int`, disabled\: :ref:`bool` = true\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_position`\ (\ id\: :ref:`int`, position\: :ref:`Vector3`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -129,29 +129,29 @@ Methods Method Descriptions ------------------- -.. _class_AStar3D_method__compute_cost: +.. _class_AStar3D_private_method__compute_cost: .. rst-class:: classref-method -:ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +:ref:`float` **_compute_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when computing the cost between two connected points. -Note that this function is hidden in the default ``AStar3D`` class. +Note that this function is hidden in the default **AStar3D** class. .. rst-class:: classref-item-separator ---- -.. _class_AStar3D_method__estimate_cost: +.. _class_AStar3D_private_method__estimate_cost: .. rst-class:: classref-method -:ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. -Note that this function is hidden in the default ``AStar3D`` class. +Note that this function is hidden in the default **AStar3D** class. .. rst-class:: classref-item-separator @@ -161,11 +161,11 @@ Note that this function is hidden in the default ``AStar3D`` class. .. rst-class:: classref-method -void **add_point** **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** +|void| **add_point**\ (\ id\: :ref:`int`, position\: :ref:`Vector3`, weight_scale\: :ref:`float` = 1.0\ ) :ref:`🔗` Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -192,7 +192,7 @@ If there already exists a point for the given ``id``, its position and weight sc .. rst-class:: classref-method -:ref:`bool` **are_points_connected** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** |const| +:ref:`bool` **are_points_connected**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns whether the two given points are directly connected by a segment. If ``bidirectional`` is ``false``, returns whether movement from ``id`` to ``to_id`` is possible through this segment. @@ -204,7 +204,7 @@ Returns whether the two given points are directly connected by a segment. If ``b .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clears all the points and segments. @@ -216,7 +216,7 @@ Clears all the points and segments. .. rst-class:: classref-method -void **connect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +|void| **connect_points**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) :ref:`🔗` Creates a segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is allowed, not the reverse direction. @@ -247,7 +247,7 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o .. rst-class:: classref-method -void **disconnect_points** **(** :ref:`int` id, :ref:`int` to_id, :ref:`bool` bidirectional=true **)** +|void| **disconnect_points**\ (\ id\: :ref:`int`, to_id\: :ref:`int`, bidirectional\: :ref:`bool` = true\ ) :ref:`🔗` Deletes the segment between the given points. If ``bidirectional`` is ``false``, only movement from ``id`` to ``to_id`` is prevented, and a unidirectional segment possibly remains. @@ -259,7 +259,7 @@ Deletes the segment between the given points. If ``bidirectional`` is ``false``, .. rst-class:: classref-method -:ref:`int` **get_available_point_id** **(** **)** |const| +:ref:`int` **get_available_point_id**\ (\ ) |const| :ref:`🔗` Returns the next available point ID with no point associated to it. @@ -271,7 +271,7 @@ Returns the next available point ID with no point associated to it. .. rst-class:: classref-method -:ref:`int` **get_closest_point** **(** :ref:`Vector3` to_position, :ref:`bool` include_disabled=false **)** |const| +:ref:`int` **get_closest_point**\ (\ to_position\: :ref:`Vector3`, include_disabled\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns the ID of the closest point to ``to_position``, optionally taking disabled points into account. Returns ``-1`` if there are no points in the points pool. @@ -285,7 +285,7 @@ Returns the ID of the closest point to ``to_position``, optionally taking disabl .. rst-class:: classref-method -:ref:`Vector3` **get_closest_position_in_segment** **(** :ref:`Vector3` to_position **)** |const| +:ref:`Vector3` **get_closest_position_in_segment**\ (\ to_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the closest position to ``to_position`` that resides inside a segment between two connected points. @@ -320,10 +320,12 @@ The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the clo .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_id_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +:ref:`PackedInt64Array` **get_id_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. tabs:: @@ -367,9 +369,9 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` .. rst-class:: classref-method -:ref:`int` **get_point_capacity** **(** **)** |const| +:ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`🔗` -Returns the capacity of the structure backing the points, useful in conjunction with ``reserve_space``. +Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. .. rst-class:: classref-item-separator @@ -379,7 +381,7 @@ Returns the capacity of the structure backing the points, useful in conjunction .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_point_connections** **(** :ref:`int` id **)** +:ref:`PackedInt64Array` **get_point_connections**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Returns an array with the IDs of the points that form the connection with the given point. @@ -421,7 +423,7 @@ Returns an array with the IDs of the points that form the connection with the gi .. rst-class:: classref-method -:ref:`int` **get_point_count** **(** **)** |const| +:ref:`int` **get_point_count**\ (\ ) |const| :ref:`🔗` Returns the number of points currently in the points pool. @@ -433,7 +435,7 @@ Returns the number of points currently in the points pool. .. rst-class:: classref-method -:ref:`PackedInt64Array` **get_point_ids** **(** **)** +:ref:`PackedInt64Array` **get_point_ids**\ (\ ) :ref:`🔗` Returns an array of all point IDs. @@ -445,11 +447,13 @@ Returns an array of all point IDs. .. rst-class:: classref-method -:ref:`PackedVector3Array` **get_point_path** **(** :ref:`int` from_id, :ref:`int` to_id **)** +:ref:`PackedVector3Array` **get_point_path**\ (\ from_id\: :ref:`int`, to_id\: :ref:`int`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector3Array` and will print an error message. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator @@ -459,7 +463,7 @@ Returns an array with the points that are in the path found by AStar3D between t .. rst-class:: classref-method -:ref:`Vector3` **get_point_position** **(** :ref:`int` id **)** |const| +:ref:`Vector3` **get_point_position**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the point associated with the given ``id``. @@ -471,7 +475,7 @@ Returns the position of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`float` **get_point_weight_scale** **(** :ref:`int` id **)** |const| +:ref:`float` **get_point_weight_scale**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the weight scale of the point associated with the given ``id``. @@ -483,7 +487,7 @@ Returns the weight scale of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`bool` **has_point** **(** :ref:`int` id **)** |const| +:ref:`bool` **has_point**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether a point associated with the given ``id`` exists. @@ -495,7 +499,7 @@ Returns whether a point associated with the given ``id`` exists. .. rst-class:: classref-method -:ref:`bool` **is_point_disabled** **(** :ref:`int` id **)** |const| +:ref:`bool` **is_point_disabled**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. @@ -507,7 +511,7 @@ Returns whether a point is disabled or not for pathfinding. By default, all poin .. rst-class:: classref-method -void **remove_point** **(** :ref:`int` id **)** +|void| **remove_point**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Removes the point associated with the given ``id`` from the points pool. @@ -519,7 +523,7 @@ Removes the point associated with the given ``id`` from the points pool. .. rst-class:: classref-method -void **reserve_space** **(** :ref:`int` num_nodes **)** +|void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`🔗` Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. @@ -531,7 +535,7 @@ Reserves space internally for ``num_nodes`` points. Useful if you're adding a kn .. rst-class:: classref-method -void **set_point_disabled** **(** :ref:`int` id, :ref:`bool` disabled=true **)** +|void| **set_point_disabled**\ (\ id\: :ref:`int`, disabled\: :ref:`bool` = true\ ) :ref:`🔗` Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. @@ -543,7 +547,7 @@ Disables or enables the specified point for pathfinding. Useful for making a tem .. rst-class:: classref-method -void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` position **)** +|void| **set_point_position**\ (\ id\: :ref:`int`, position\: :ref:`Vector3`\ ) :ref:`🔗` Sets the ``position`` for the point with the given ``id``. @@ -555,9 +559,9 @@ Sets the ``position`` for the point with the given ``id``. .. rst-class:: classref-method -void **set_point_weight_scale** **(** :ref:`int` id, :ref:`float` weight_scale **)** +|void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`🔗` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -566,3 +570,4 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 914de4b88b3..770356dc125 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -38,7 +38,7 @@ To use **AStarGrid2D**, you only need to set the :ref:`region` | :ref:`cell_shape` | ``0`` | +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ | :ref:`Vector2` | :ref:`cell_size` | ``Vector2(1, 1)`` | +----------------------------------------------------+------------------------------------------------------------------------------------------+------------------------+ @@ -82,35 +84,39 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_solid_region`\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_weight_scale_region`\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`get_id_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path`\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dirty`\ (\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_bounds`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_boundsv`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_solid`\ (\ id\: :ref:`Vector2i`\ ) |const| | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_solid`\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_weight_scale`\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ ) | + +--------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -125,7 +131,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Heuristic**: +enum **Heuristic**: :ref:`🔗` .. _class_AStarGrid2D_constant_HEURISTIC_EUCLIDEAN: @@ -204,7 +210,7 @@ Represents the size of the :ref:`Heuristic` enum. .. rst-class:: classref-enumeration -enum **DiagonalMode**: +enum **DiagonalMode**: :ref:`🔗` .. _class_AStarGrid2D_constant_DIAGONAL_MODE_ALWAYS: @@ -246,6 +252,48 @@ The pathfinding algorithm will avoid using diagonals if any obstacle has been pl Represents the size of the :ref:`DiagonalMode` enum. +.. rst-class:: classref-item-separator + +---- + +.. _enum_AStarGrid2D_CellShape: + +.. rst-class:: classref-enumeration + +enum **CellShape**: :ref:`🔗` + +.. _class_AStarGrid2D_constant_CELL_SHAPE_SQUARE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellShape` **CELL_SHAPE_SQUARE** = ``0`` + +Rectangular cell shape. + +.. _class_AStarGrid2D_constant_CELL_SHAPE_ISOMETRIC_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellShape` **CELL_SHAPE_ISOMETRIC_RIGHT** = ``1`` + +Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. + +.. _class_AStarGrid2D_constant_CELL_SHAPE_ISOMETRIC_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellShape` **CELL_SHAPE_ISOMETRIC_DOWN** = ``2`` + +Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. + +.. _class_AStarGrid2D_constant_CELL_SHAPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CellShape` **CELL_SHAPE_MAX** = ``3`` + +Represents the size of the :ref:`CellShape` enum. + .. rst-class:: classref-section-separator ---- @@ -255,16 +303,33 @@ Represents the size of the :ref:`DiagonalMode` en Property Descriptions --------------------- +.. _class_AStarGrid2D_property_cell_shape: + +.. rst-class:: classref-property + +:ref:`CellShape` **cell_shape** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_cell_shape**\ (\ value\: :ref:`CellShape`\ ) +- :ref:`CellShape` **get_cell_shape**\ (\ ) + +The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update` needs to be called before finding the next path. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_property_cell_size: .. rst-class:: classref-property -:ref:`Vector2` **cell_size** = ``Vector2(1, 1)`` +:ref:`Vector2` **cell_size** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cell_size** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_cell_size** **(** **)** +- |void| **set_cell_size**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_cell_size**\ (\ ) The size of the point cell which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. @@ -276,14 +341,14 @@ The size of the point cell which will be applied to calculate the resulting poin .. rst-class:: classref-property -:ref:`Heuristic` **default_compute_heuristic** = ``0`` +:ref:`Heuristic` **default_compute_heuristic** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_default_compute_heuristic** **(** :ref:`Heuristic` value **)** -- :ref:`Heuristic` **get_default_compute_heuristic** **(** **)** +- |void| **set_default_compute_heuristic**\ (\ value\: :ref:`Heuristic`\ ) +- :ref:`Heuristic` **get_default_compute_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. .. rst-class:: classref-item-separator @@ -293,14 +358,14 @@ The default :ref:`Heuristic` which will be used to c .. rst-class:: classref-property -:ref:`Heuristic` **default_estimate_heuristic** = ``0`` +:ref:`Heuristic` **default_estimate_heuristic** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_default_estimate_heuristic** **(** :ref:`Heuristic` value **)** -- :ref:`Heuristic` **get_default_estimate_heuristic** **(** **)** +- |void| **set_default_estimate_heuristic**\ (\ value\: :ref:`Heuristic`\ ) +- :ref:`Heuristic` **get_default_estimate_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. .. rst-class:: classref-item-separator @@ -310,12 +375,12 @@ The default :ref:`Heuristic` which will be used to c .. rst-class:: classref-property -:ref:`DiagonalMode` **diagonal_mode** = ``0`` +:ref:`DiagonalMode` **diagonal_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_diagonal_mode** **(** :ref:`DiagonalMode` value **)** -- :ref:`DiagonalMode` **get_diagonal_mode** **(** **)** +- |void| **set_diagonal_mode**\ (\ value\: :ref:`DiagonalMode`\ ) +- :ref:`DiagonalMode` **get_diagonal_mode**\ (\ ) A specific :ref:`DiagonalMode` mode which will force the path to avoid or accept the specified diagonals. @@ -327,12 +392,12 @@ A specific :ref:`DiagonalMode` mode which will fo .. rst-class:: classref-property -:ref:`bool` **jumping_enabled** = ``false`` +:ref:`bool` **jumping_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_jumping_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_jumping_enabled** **(** **)** +- |void| **set_jumping_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_jumping_enabled**\ (\ ) Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. @@ -346,12 +411,12 @@ Enables or disables jumping to skip up the intermediate points and speeds up the .. rst-class:: classref-property -:ref:`Vector2` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_offset**\ (\ ) The offset of the grid which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. @@ -363,12 +428,12 @@ The offset of the grid which will be applied to calculate the resulting point po .. rst-class:: classref-property -:ref:`Rect2i` **region** = ``Rect2i(0, 0, 0, 0)`` +:ref:`Rect2i` **region** = ``Rect2i(0, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_region** **(** :ref:`Rect2i` value **)** -- :ref:`Rect2i` **get_region** **(** **)** +- |void| **set_region**\ (\ value\: :ref:`Rect2i`\ ) +- :ref:`Rect2i` **get_region**\ (\ ) The region of grid cells available for pathfinding. If changed, :ref:`update` needs to be called before finding the next path. @@ -380,16 +445,16 @@ The region of grid cells available for pathfinding. If changed, :ref:`update` **size** = ``Vector2i(0, 0)`` +:ref:`Vector2i` **size** = ``Vector2i(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2i` value **)** -- :ref:`Vector2i` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2i`\ ) +- :ref:`Vector2i` **get_size**\ (\ ) -The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update` needs to be called before finding the next path. +**Deprecated:** Use :ref:`region` instead. -\ *Deprecated.* Use :ref:`region` instead. +The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update` needs to be called before finding the next path. .. rst-class:: classref-section-separator @@ -400,29 +465,29 @@ The size of the grid (number of cells of size :ref:`cell_size` **_compute_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| +:ref:`float` **_compute_cost**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| :ref:`🔗` Called when computing the cost between two connected points. -Note that this function is hidden in the default ``AStarGrid2D`` class. +Note that this function is hidden in the default **AStarGrid2D** class. .. rst-class:: classref-item-separator ---- -.. _class_AStarGrid2D_method__estimate_cost: +.. _class_AStarGrid2D_private_method__estimate_cost: .. rst-class:: classref-method -:ref:`float` **_estimate_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| +:ref:`float` **_estimate_cost**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`\ ) |virtual| |const| :ref:`🔗` Called when estimating the cost between a point and the path's ending point. -Note that this function is hidden in the default ``AStarGrid2D`` class. +Note that this function is hidden in the default **AStarGrid2D** class. .. rst-class:: classref-item-separator @@ -432,7 +497,7 @@ Note that this function is hidden in the default ``AStarGrid2D`` class. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clears the grid and sets the :ref:`region` to ``Rect2i(0, 0, 0, 0)``. @@ -440,14 +505,44 @@ Clears the grid and sets the :ref:`region` to ---- +.. _class_AStarGrid2D_method_fill_solid_region: + +.. rst-class:: classref-method + +|void| **fill_solid_region**\ (\ region\: :ref:`Rect2i`, solid\: :ref:`bool` = true\ ) :ref:`🔗` + +Fills the given ``region`` on the grid with the specified value for the solid flag. + +\ **Note:** Calling :ref:`update` is not needed after the call of this function. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AStarGrid2D_method_fill_weight_scale_region: + +.. rst-class:: classref-method + +|void| **fill_weight_scale_region**\ (\ region\: :ref:`Rect2i`, weight_scale\: :ref:`float`\ ) :ref:`🔗` + +Fills the given ``region`` on the grid with the specified value for the weight scale. + +\ **Note:** Calling :ref:`update` is not needed after the call of this function. + +.. rst-class:: classref-item-separator + +---- + .. _class_AStarGrid2D_method_get_id_path: .. rst-class:: classref-method -:ref:`Vector2i[]` **get_id_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** +:ref:`Array`\[:ref:`Vector2i`\] **get_id_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. + .. rst-class:: classref-item-separator ---- @@ -456,11 +551,13 @@ Returns an array with the IDs of the points that form the path found by AStar2D .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_point_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** +:ref:`PackedVector2Array` **get_point_path**\ (\ from_id\: :ref:`Vector2i`, to_id\: :ref:`Vector2i`, allow_partial_path\: :ref:`bool` = false\ ) :ref:`🔗` + +Returns an array with the points that are in the path found by **AStarGrid2D** between the given points. The array is ordered from the starting point to the ending point of the path. -Returns an array with the points that are in the path found by AStarGrid2D between the given points. The array is ordered from the starting point to the ending point of the path. +If there is no valid path to the target, and ``allow_partial_path`` is ``true``, returns a path to the point closest to the target that can be reached. -\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty :ref:`PackedVector3Array` and will print an error message. +\ **Note:** This method is not thread-safe. If called from a :ref:`Thread`, it will return an empty array and will print an error message. .. rst-class:: classref-item-separator @@ -470,7 +567,7 @@ Returns an array with the points that are in the path found by AStarGrid2D betwe .. rst-class:: classref-method -:ref:`Vector2` **get_point_position** **(** :ref:`Vector2i` id **)** |const| +:ref:`Vector2` **get_point_position**\ (\ id\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns the position of the point associated with the given ``id``. @@ -482,7 +579,7 @@ Returns the position of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`float` **get_point_weight_scale** **(** :ref:`Vector2i` id **)** |const| +:ref:`float` **get_point_weight_scale**\ (\ id\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns the weight scale of the point associated with the given ``id``. @@ -494,7 +591,7 @@ Returns the weight scale of the point associated with the given ``id``. .. rst-class:: classref-method -:ref:`bool` **is_dirty** **(** **)** |const| +:ref:`bool` **is_dirty**\ (\ ) |const| :ref:`🔗` Indicates that the grid parameters were changed and :ref:`update` needs to be called. @@ -506,9 +603,9 @@ Indicates that the grid parameters were changed and :ref:`update` **is_in_bounds** **(** :ref:`int` x, :ref:`int` y **)** |const| +:ref:`bool` **is_in_bounds**\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| :ref:`🔗` -Returns ``true`` if the ``x`` and ``y`` is a valid grid coordinate (id). +Returns ``true`` if the ``x`` and ``y`` is a valid grid coordinate (id), i.e. if it is inside :ref:`region`. Equivalent to ``region.has_point(Vector2i(x, y))``. .. rst-class:: classref-item-separator @@ -518,9 +615,9 @@ Returns ``true`` if the ``x`` and ``y`` is a valid grid coordinate (id). .. rst-class:: classref-method -:ref:`bool` **is_in_boundsv** **(** :ref:`Vector2i` id **)** |const| +:ref:`bool` **is_in_boundsv**\ (\ id\: :ref:`Vector2i`\ ) |const| :ref:`🔗` -Returns ``true`` if the ``id`` vector is a valid grid coordinate. +Returns ``true`` if the ``id`` vector is a valid grid coordinate, i.e. if it is inside :ref:`region`. Equivalent to ``region.has_point(id)``. .. rst-class:: classref-item-separator @@ -530,7 +627,7 @@ Returns ``true`` if the ``id`` vector is a valid grid coordinate. .. rst-class:: classref-method -:ref:`bool` **is_point_solid** **(** :ref:`Vector2i` id **)** |const| +:ref:`bool` **is_point_solid**\ (\ id\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns ``true`` if a point is disabled for pathfinding. By default, all points are enabled. @@ -542,7 +639,7 @@ Returns ``true`` if a point is disabled for pathfinding. By default, all points .. rst-class:: classref-method -void **set_point_solid** **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** +|void| **set_point_solid**\ (\ id\: :ref:`Vector2i`, solid\: :ref:`bool` = true\ ) :ref:`🔗` Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. @@ -556,9 +653,9 @@ Disables or enables the specified point for pathfinding. Useful for making an ob .. rst-class:: classref-method -void **set_point_weight_scale** **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** +|void| **set_point_weight_scale**\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) :ref:`🔗` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. \ **Note:** Calling :ref:`update` is not needed after the call of this function. @@ -570,7 +667,7 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal .. rst-class:: classref-method -void **update** **(** **)** +|void| **update**\ (\ ) :ref:`🔗` Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like :ref:`region`, :ref:`cell_size` or :ref:`offset` are changed. :ref:`is_dirty` will return ``true`` if this is the case and this needs to be called. @@ -583,3 +680,4 @@ Updates the internal state of the grid according to the parameters to prepare it .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index e030f88a7d2..42228a2387e 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -58,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture2D` **atlas** +:ref:`Texture2D` **atlas** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_atlas** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_atlas** **(** **)** +- |void| **set_atlas**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_atlas**\ (\ ) The texture that contains the atlas. Can be any type inheriting from :ref:`Texture2D`, including another **AtlasTexture**. @@ -75,12 +75,12 @@ The texture that contains the atlas. Can be any type inheriting from :ref:`Textu .. rst-class:: classref-property -:ref:`bool` **filter_clip** = ``false`` +:ref:`bool` **filter_clip** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_filter_clip** **(** :ref:`bool` value **)** -- :ref:`bool` **has_filter_clip** **(** **)** +- |void| **set_filter_clip**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_filter_clip**\ (\ ) If ``true``, the area outside of the :ref:`region` is clipped to avoid bleeding of the surrounding texture pixels. @@ -92,12 +92,12 @@ If ``true``, the area outside of the :ref:`region` **margin** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2` **margin** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`Rect2` value **)** -- :ref:`Rect2` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`Rect2`\ ) +- :ref:`Rect2` **get_margin**\ (\ ) The margin around the :ref:`region`. Useful for small adjustments. If the :ref:`Rect2.size` of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin. @@ -109,12 +109,12 @@ The margin around the :ref:`region`. Useful .. rst-class:: classref-property -:ref:`Rect2` **region** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2` **region** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_region** **(** :ref:`Rect2` value **)** -- :ref:`Rect2` **get_region** **(** **)** +- |void| **set_region**\ (\ value\: :ref:`Rect2`\ ) +- :ref:`Rect2` **get_region**\ (\ ) The region used to draw the :ref:`atlas`. @@ -125,3 +125,4 @@ The region used to draw the :ref:`atlas`. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 3ef224170c8..80fe120f299 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -28,3 +28,4 @@ Stores position, muting, solo, bypass, effects, effect position, volume, and the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index d103cbcc5a5..21fc6d2680b 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -12,23 +12,27 @@ AudioEffect **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` +**Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectHardLimiter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` -Audio effect for audio. +Base class for audio effect resources. .. rst-class:: classref-introduction-group Description ----------- -Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. +The base :ref:`Resource` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect`, :ref:`AudioServer.remove_bus_effect`, and :ref:`AudioServer.get_bus_effect`. + +When applied on a bus, an audio effect creates a corresponding :ref:`AudioEffectInstance`. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties. .. rst-class:: classref-introduction-group Tutorials --------- -- `Audio Mic Record Demo `__ +- :doc:`Audio buses <../tutorials/audio/audio_buses>` + +- `Audio Microphone Record Demo `__ .. rst-class:: classref-reftable-group @@ -38,9 +42,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+----------------------------------------------------------------------------------+ - | :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | - +-------------------------------------------------------+----------------------------------------------------------------------------------+ + +-------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`_instantiate`\ (\ ) |virtual| | + +-------------------------------------------------------+------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -51,15 +55,27 @@ Methods Method Descriptions ------------------- -.. _class_AudioEffect_method__instantiate: +.. _class_AudioEffect_private_method__instantiate: .. rst-class:: classref-method -:ref:`AudioEffectInstance` **_instantiate** **(** **)** |virtual| +:ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| :ref:`🔗` + +Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect`. + +:: -.. container:: contribute + extends AudioEffect + + @export var strength = 4.0 + + func _instantiate(): + var effect = CustomAudioEffectInstance.new() + effect.base = self + + return effect - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** It is recommended to keep a reference to the original **AudioEffect** in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -68,3 +84,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index e115333cb7b..f6714bf15b6 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -53,12 +53,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **volume_db** = ``0.0`` +:ref:`float` **volume_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_volume_db** **(** :ref:`float` value **)** -- :ref:`float` **get_volume_db** **(** **)** +- |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_db**\ (\ ) Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. @@ -69,3 +69,4 @@ Amount of amplification in decibels. Positive values make the sound louder, nega .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index eecb2230fce..031ef97508c 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index b82d4b4eb32..186024ed7ae 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 5fbea618514..46470fef148 100644 --- a/classes/class_audioeffectcapture.rst +++ b/classes/class_audioeffectcapture.rst @@ -21,9 +21,9 @@ Description AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. -Application code should consume these audio frames from this ring buffer using :ref:`get_buffer` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM. +Application code should consume these audio frames from this ring buffer using :ref:`get_buffer` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. -\ **Note:** :ref:`ProjectSettings.audio/driver/enable_input` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. +Unlike :ref:`AudioEffectRecord`, this effect only returns the raw audio samples instead of encoding them into an :ref:`AudioStream`. .. rst-class:: classref-introduction-group @@ -32,8 +32,6 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Audio Mic Record Demo `__ - .. rst-class:: classref-reftable-group Properties @@ -54,21 +52,21 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_get_buffer` **(** :ref:`int` frames **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_buffer` **(** **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_buffer` **(** :ref:`int` frames **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_buffer_length_frames` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_discarded_frames` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_frames_available` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_pushed_frames` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_get_buffer`\ (\ frames\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_buffer`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_buffer`\ (\ frames\: :ref:`int`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_buffer_length_frames`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_discarded_frames`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frames_available`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_pushed_frames`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,12 +81,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **buffer_length** = ``0.1`` +:ref:`float` **buffer_length** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_buffer_length** **(** :ref:`float` value **)** -- :ref:`float` **get_buffer_length** **(** **)** +- |void| **set_buffer_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_buffer_length**\ (\ ) Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. @@ -105,7 +103,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **can_get_buffer** **(** :ref:`int` frames **)** |const| +:ref:`bool` **can_get_buffer**\ (\ frames\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if at least ``frames`` audio frames are available to read in the internal ring buffer. @@ -117,10 +115,12 @@ Returns ``true`` if at least ``frames`` audio frames are available to read in th .. rst-class:: classref-method -void **clear_buffer** **(** **)** +|void| **clear_buffer**\ (\ ) :ref:`🔗` Clears the internal ring buffer. +\ **Note:** Calling this during a capture can cause the loss of samples which causes popping in the playback. + .. rst-class:: classref-item-separator ---- @@ -129,12 +129,14 @@ Clears the internal ring buffer. .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_buffer** **(** :ref:`int` frames **)** +:ref:`PackedVector2Array` **get_buffer**\ (\ frames\: :ref:`int`\ ) :ref:`🔗` Gets the next ``frames`` audio samples from the internal ring buffer. Returns a :ref:`PackedVector2Array` containing exactly ``frames`` audio samples if available, or an empty :ref:`PackedVector2Array` if insufficient data was available. +The samples are signed floating-point PCM between ``-1`` and ``1``. You will have to scale them if you want to use them as 8 or 16-bit integer samples. (``v = 0x7fff * samples[0].x``) + .. rst-class:: classref-item-separator ---- @@ -143,7 +145,7 @@ Returns a :ref:`PackedVector2Array` containing exactly .. rst-class:: classref-method -:ref:`int` **get_buffer_length_frames** **(** **)** |const| +:ref:`int` **get_buffer_length_frames**\ (\ ) |const| :ref:`🔗` Returns the total size of the internal ring buffer in frames. @@ -155,7 +157,7 @@ Returns the total size of the internal ring buffer in frames. .. rst-class:: classref-method -:ref:`int` **get_discarded_frames** **(** **)** |const| +:ref:`int` **get_discarded_frames**\ (\ ) |const| :ref:`🔗` Returns the number of audio frames discarded from the audio bus due to full buffer. @@ -167,7 +169,7 @@ Returns the number of audio frames discarded from the audio bus due to full buff .. rst-class:: classref-method -:ref:`int` **get_frames_available** **(** **)** |const| +:ref:`int` **get_frames_available**\ (\ ) |const| :ref:`🔗` Returns the number of frames available to read using :ref:`get_buffer`. @@ -179,7 +181,7 @@ Returns the number of frames available to read using :ref:`get_buffer` **get_pushed_frames** **(** **)** |const| +:ref:`int` **get_pushed_frames**\ (\ ) |const| :ref:`🔗` Returns the number of audio frames inserted from the audio bus. @@ -190,3 +192,4 @@ Returns the number of audio frames inserted from the audio bus. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectchorus.rst b/classes/class_audioeffectchorus.rst index c54e8ad0013..12bf1a71050 100644 --- a/classes/class_audioeffectchorus.rst +++ b/classes/class_audioeffectchorus.rst @@ -100,31 +100,31 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_cutoff_hz` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_delay_ms` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_depth_ms` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_level_db` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_pan` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_voice_rate_hz` **(** :ref:`int` voice_idx **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_cutoff_hz` **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_delay_ms` **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_depth_ms` **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_level_db` **(** :ref:`int` voice_idx, :ref:`float` level_db **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_pan` **(** :ref:`int` voice_idx, :ref:`float` pan **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_voice_rate_hz` **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_cutoff_hz`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_delay_ms`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_depth_ms`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_level_db`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_pan`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_voice_rate_hz`\ (\ voice_idx\: :ref:`int`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_cutoff_hz`\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_delay_ms`\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_depth_ms`\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_level_db`\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_pan`\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_voice_rate_hz`\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,12 +139,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **dry** = ``1.0`` +:ref:`float` **dry** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dry** **(** :ref:`float` value **)** -- :ref:`float` **get_dry** **(** **)** +- |void| **set_dry**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dry**\ (\ ) The effect's raw signal. @@ -156,12 +156,12 @@ The effect's raw signal. .. rst-class:: classref-property -:ref:`float` **voice/1/cutoff_hz** = ``8000.0`` +:ref:`float` **voice/1/cutoff_hz** = ``8000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** -- :ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's cutoff frequency. @@ -173,12 +173,12 @@ The voice's cutoff frequency. .. rst-class:: classref-property -:ref:`float` **voice/1/delay_ms** = ``15.0`` +:ref:`float` **voice/1/delay_ms** = ``15.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** -- :ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_delay_ms**\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_delay_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's signal delay. @@ -190,12 +190,12 @@ The voice's signal delay. .. rst-class:: classref-property -:ref:`float` **voice/1/depth_ms** = ``2.0`` +:ref:`float` **voice/1/depth_ms** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** -- :ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_depth_ms**\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_depth_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice filter's depth. @@ -207,12 +207,12 @@ The voice filter's depth. .. rst-class:: classref-property -:ref:`float` **voice/1/level_db** = ``0.0`` +:ref:`float` **voice/1/level_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** -- :ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_level_db**\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) +- :ref:`float` **get_voice_level_db**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's volume. @@ -224,12 +224,12 @@ The voice's volume. .. rst-class:: classref-property -:ref:`float` **voice/1/pan** = ``-0.5`` +:ref:`float` **voice/1/pan** = ``-0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** -- :ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_pan**\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) +- :ref:`float` **get_voice_pan**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's pan level. @@ -241,12 +241,12 @@ The voice's pan level. .. rst-class:: classref-property -:ref:`float` **voice/1/rate_hz** = ``0.8`` +:ref:`float` **voice/1/rate_hz** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** -- :ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_rate_hz**\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_rate_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's filter rate. @@ -258,12 +258,12 @@ The voice's filter rate. .. rst-class:: classref-property -:ref:`float` **voice/2/cutoff_hz** = ``8000.0`` +:ref:`float` **voice/2/cutoff_hz** = ``8000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** -- :ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's cutoff frequency. @@ -275,12 +275,12 @@ The voice's cutoff frequency. .. rst-class:: classref-property -:ref:`float` **voice/2/delay_ms** = ``20.0`` +:ref:`float` **voice/2/delay_ms** = ``20.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** -- :ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_delay_ms**\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_delay_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's signal delay. @@ -292,12 +292,12 @@ The voice's signal delay. .. rst-class:: classref-property -:ref:`float` **voice/2/depth_ms** = ``3.0`` +:ref:`float` **voice/2/depth_ms** = ``3.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** -- :ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_depth_ms**\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_depth_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice filter's depth. @@ -309,12 +309,12 @@ The voice filter's depth. .. rst-class:: classref-property -:ref:`float` **voice/2/level_db** = ``0.0`` +:ref:`float` **voice/2/level_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** -- :ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_level_db**\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) +- :ref:`float` **get_voice_level_db**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's volume. @@ -326,12 +326,12 @@ The voice's volume. .. rst-class:: classref-property -:ref:`float` **voice/2/pan** = ``0.5`` +:ref:`float` **voice/2/pan** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** -- :ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_pan**\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) +- :ref:`float` **get_voice_pan**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's pan level. @@ -343,12 +343,12 @@ The voice's pan level. .. rst-class:: classref-property -:ref:`float` **voice/2/rate_hz** = ``1.2`` +:ref:`float` **voice/2/rate_hz** = ``1.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** -- :ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_rate_hz**\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_rate_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's filter rate. @@ -360,12 +360,12 @@ The voice's filter rate. .. rst-class:: classref-property -:ref:`float` **voice/3/cutoff_hz** +:ref:`float` **voice/3/cutoff_hz** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** -- :ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's cutoff frequency. @@ -377,12 +377,12 @@ The voice's cutoff frequency. .. rst-class:: classref-property -:ref:`float` **voice/3/delay_ms** +:ref:`float` **voice/3/delay_ms** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** -- :ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_delay_ms**\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_delay_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's signal delay. @@ -394,12 +394,12 @@ The voice's signal delay. .. rst-class:: classref-property -:ref:`float` **voice/3/depth_ms** +:ref:`float` **voice/3/depth_ms** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** -- :ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_depth_ms**\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_depth_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice filter's depth. @@ -411,12 +411,12 @@ The voice filter's depth. .. rst-class:: classref-property -:ref:`float` **voice/3/level_db** +:ref:`float` **voice/3/level_db** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** -- :ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_level_db**\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) +- :ref:`float` **get_voice_level_db**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's volume. @@ -428,12 +428,12 @@ The voice's volume. .. rst-class:: classref-property -:ref:`float` **voice/3/pan** +:ref:`float` **voice/3/pan** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** -- :ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_pan**\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) +- :ref:`float` **get_voice_pan**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's pan level. @@ -445,12 +445,12 @@ The voice's pan level. .. rst-class:: classref-property -:ref:`float` **voice/3/rate_hz** +:ref:`float` **voice/3/rate_hz** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** -- :ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_rate_hz**\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_rate_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's filter rate. @@ -462,12 +462,12 @@ The voice's filter rate. .. rst-class:: classref-property -:ref:`float` **voice/4/cutoff_hz** +:ref:`float` **voice/4/cutoff_hz** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** -- :ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's cutoff frequency. @@ -479,12 +479,12 @@ The voice's cutoff frequency. .. rst-class:: classref-property -:ref:`float` **voice/4/delay_ms** +:ref:`float` **voice/4/delay_ms** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** -- :ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_delay_ms**\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_delay_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's signal delay. @@ -496,12 +496,12 @@ The voice's signal delay. .. rst-class:: classref-property -:ref:`float` **voice/4/depth_ms** +:ref:`float` **voice/4/depth_ms** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` depth_ms **)** -- :ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_depth_ms**\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) +- :ref:`float` **get_voice_depth_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice filter's depth. @@ -513,12 +513,12 @@ The voice filter's depth. .. rst-class:: classref-property -:ref:`float` **voice/4/level_db** +:ref:`float` **voice/4/level_db** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` level_db **)** -- :ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_level_db**\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) +- :ref:`float` **get_voice_level_db**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's volume. @@ -530,12 +530,12 @@ The voice's volume. .. rst-class:: classref-property -:ref:`float` **voice/4/pan** +:ref:`float` **voice/4/pan** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` pan **)** -- :ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_pan**\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) +- :ref:`float` **get_voice_pan**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's pan level. @@ -547,12 +547,12 @@ The voice's pan level. .. rst-class:: classref-property -:ref:`float` **voice/4/rate_hz** +:ref:`float` **voice/4/rate_hz** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` rate_hz **)** -- :ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +- |void| **set_voice_rate_hz**\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) +- :ref:`float` **get_voice_rate_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| The voice's filter rate. @@ -564,12 +564,12 @@ The voice's filter rate. .. rst-class:: classref-property -:ref:`int` **voice_count** = ``2`` +:ref:`int` **voice_count** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_voice_count** **(** :ref:`int` value **)** -- :ref:`int` **get_voice_count** **(** **)** +- |void| **set_voice_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_voice_count**\ (\ ) The number of voices in the effect. @@ -581,12 +581,12 @@ The number of voices in the effect. .. rst-class:: classref-property -:ref:`float` **wet** = ``0.5`` +:ref:`float` **wet** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wet** **(** :ref:`float` value **)** -- :ref:`float` **get_wet** **(** **)** +- |void| **set_wet**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wet**\ (\ ) The effect's processed signal. @@ -603,7 +603,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_cutoff_hz** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -617,7 +617,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_delay_ms** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_delay_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -631,7 +631,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_depth_ms** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_depth_ms**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -645,7 +645,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_level_db** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_level_db**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -659,7 +659,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_pan** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_pan**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -673,7 +673,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_voice_rate_hz** **(** :ref:`int` voice_idx **)** |const| +:ref:`float` **get_voice_rate_hz**\ (\ voice_idx\: :ref:`int`\ ) |const| :ref:`🔗` .. container:: contribute @@ -687,7 +687,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float` cutoff_hz **)** +|void| **set_voice_cutoff_hz**\ (\ voice_idx\: :ref:`int`, cutoff_hz\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -701,7 +701,7 @@ void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float< .. rst-class:: classref-method -void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` delay_ms **)** +|void| **set_voice_delay_ms**\ (\ voice_idx\: :ref:`int`, delay_ms\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -715,7 +715,7 @@ void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float` voice_idx, :ref:`float` depth_ms **)** +|void| **set_voice_depth_ms**\ (\ voice_idx\: :ref:`int`, depth_ms\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -729,7 +729,7 @@ void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float` voice_idx, :ref:`float` level_db **)** +|void| **set_voice_level_db**\ (\ voice_idx\: :ref:`int`, level_db\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -743,7 +743,7 @@ void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float` voice_idx, :ref:`float` pan **)** +|void| **set_voice_pan**\ (\ voice_idx\: :ref:`int`, pan\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -757,7 +757,7 @@ void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float` voice_idx, :ref:`float` rate_hz **)** +|void| **set_voice_rate_hz**\ (\ voice_idx\: :ref:`int`, rate_hz\: :ref:`float`\ ) :ref:`🔗` .. container:: contribute @@ -770,3 +770,4 @@ void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float` **attack_us** = ``20.0`` +:ref:`float` **attack_us** = ``20.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attack_us** **(** :ref:`float` value **)** -- :ref:`float` **get_attack_us** **(** **)** +- |void| **set_attack_us**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_attack_us**\ (\ ) Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. @@ -94,12 +94,12 @@ Compressor's reaction time when the signal exceeds the threshold, in microsecond .. rst-class:: classref-property -:ref:`float` **gain** = ``0.0`` +:ref:`float` **gain** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gain** **(** :ref:`float` value **)** -- :ref:`float` **get_gain** **(** **)** +- |void| **set_gain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gain**\ (\ ) Gain applied to the output signal. @@ -111,12 +111,12 @@ Gain applied to the output signal. .. rst-class:: classref-property -:ref:`float` **mix** = ``1.0`` +:ref:`float` **mix** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mix** **(** :ref:`float` value **)** -- :ref:`float` **get_mix** **(** **)** +- |void| **set_mix**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mix**\ (\ ) Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). @@ -128,12 +128,12 @@ Balance between original signal and effect signal. Value can range from 0 (total .. rst-class:: classref-property -:ref:`float` **ratio** = ``4.0`` +:ref:`float` **ratio** = ``4.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_ratio** **(** **)** +- |void| **set_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ratio**\ (\ ) Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48. @@ -145,12 +145,12 @@ Amount of compression applied to the audio once it passes the threshold level. T .. rst-class:: classref-property -:ref:`float` **release_ms** = ``250.0`` +:ref:`float` **release_ms** = ``250.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_release_ms** **(** :ref:`float` value **)** -- :ref:`float` **get_release_ms** **(** **)** +- |void| **set_release_ms**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_release_ms**\ (\ ) Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. @@ -162,12 +162,12 @@ Compressor's delay time to stop reducing the signal after the signal level falls .. rst-class:: classref-property -:ref:`StringName` **sidechain** = ``&""`` +:ref:`StringName` **sidechain** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sidechain** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_sidechain** **(** **)** +- |void| **set_sidechain**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_sidechain**\ (\ ) Reduce the sound level using another audio bus for threshold detection. @@ -179,12 +179,12 @@ Reduce the sound level using another audio bus for threshold detection. .. rst-class:: classref-property -:ref:`float` **threshold** = ``0.0`` +:ref:`float` **threshold** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_threshold** **(** :ref:`float` value **)** -- :ref:`float` **get_threshold** **(** **)** +- |void| **set_threshold**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_threshold**\ (\ ) The level above which compression is applied to the audio. Value can range from -60 to 0. @@ -195,3 +195,4 @@ The level above which compression is applied to the audio. Value can range from .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index e964a46440b..3356f60327d 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -79,12 +79,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **dry** = ``1.0`` +:ref:`float` **dry** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dry** **(** :ref:`float` value **)** -- :ref:`float` **get_dry** **(** **)** +- |void| **set_dry**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dry**\ (\ ) Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. @@ -96,12 +96,12 @@ Output percent of original sound. At 0, only delayed sounds are output. Value ca .. rst-class:: classref-property -:ref:`bool` **feedback_active** = ``false`` +:ref:`bool` **feedback_active** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feedback_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_feedback_active** **(** **)** +- |void| **set_feedback_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_feedback_active**\ (\ ) If ``true``, feedback is enabled. @@ -113,12 +113,12 @@ If ``true``, feedback is enabled. .. rst-class:: classref-property -:ref:`float` **feedback_delay_ms** = ``340.0`` +:ref:`float` **feedback_delay_ms** = ``340.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feedback_delay_ms** **(** :ref:`float` value **)** -- :ref:`float` **get_feedback_delay_ms** **(** **)** +- |void| **set_feedback_delay_ms**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_feedback_delay_ms**\ (\ ) Feedback delay time in milliseconds. @@ -130,14 +130,14 @@ Feedback delay time in milliseconds. .. rst-class:: classref-property -:ref:`float` **feedback_level_db** = ``-6.0`` +:ref:`float` **feedback_level_db** = ``-6.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feedback_level_db** **(** :ref:`float` value **)** -- :ref:`float` **get_feedback_level_db** **(** **)** +- |void| **set_feedback_level_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_feedback_level_db**\ (\ ) -Sound level for ``tap1``. +Sound level for feedback. .. rst-class:: classref-item-separator @@ -147,12 +147,12 @@ Sound level for ``tap1``. .. rst-class:: classref-property -:ref:`float` **feedback_lowpass** = ``16000.0`` +:ref:`float` **feedback_lowpass** = ``16000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feedback_lowpass** **(** :ref:`float` value **)** -- :ref:`float` **get_feedback_lowpass** **(** **)** +- |void| **set_feedback_lowpass**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_feedback_lowpass**\ (\ ) Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. @@ -164,14 +164,14 @@ Low-pass filter for feedback, in Hz. Frequencies below this value are filtered o .. rst-class:: classref-property -:ref:`bool` **tap1_active** = ``true`` +:ref:`bool` **tap1_active** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap1_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_tap1_active** **(** **)** +- |void| **set_tap1_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_tap1_active**\ (\ ) -If ``true``, ``tap1`` will be enabled. +If ``true``, the first tap will be enabled. .. rst-class:: classref-item-separator @@ -181,14 +181,14 @@ If ``true``, ``tap1`` will be enabled. .. rst-class:: classref-property -:ref:`float` **tap1_delay_ms** = ``250.0`` +:ref:`float` **tap1_delay_ms** = ``250.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap1_delay_ms** **(** :ref:`float` value **)** -- :ref:`float` **get_tap1_delay_ms** **(** **)** +- |void| **set_tap1_delay_ms**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap1_delay_ms**\ (\ ) -``tap1`` delay time in milliseconds. +First tap delay time in milliseconds. .. rst-class:: classref-item-separator @@ -198,14 +198,14 @@ If ``true``, ``tap1`` will be enabled. .. rst-class:: classref-property -:ref:`float` **tap1_level_db** = ``-6.0`` +:ref:`float` **tap1_level_db** = ``-6.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap1_level_db** **(** :ref:`float` value **)** -- :ref:`float` **get_tap1_level_db** **(** **)** +- |void| **set_tap1_level_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap1_level_db**\ (\ ) -Sound level for ``tap1``. +Sound level for the first tap. .. rst-class:: classref-item-separator @@ -215,14 +215,14 @@ Sound level for ``tap1``. .. rst-class:: classref-property -:ref:`float` **tap1_pan** = ``0.2`` +:ref:`float` **tap1_pan** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap1_pan** **(** :ref:`float` value **)** -- :ref:`float` **get_tap1_pan** **(** **)** +- |void| **set_tap1_pan**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap1_pan**\ (\ ) -Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully right). +Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right). .. rst-class:: classref-item-separator @@ -232,14 +232,14 @@ Pan position for ``tap1``. Value can range from -1 (fully left) to 1 (fully righ .. rst-class:: classref-property -:ref:`bool` **tap2_active** = ``true`` +:ref:`bool` **tap2_active** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap2_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_tap2_active** **(** **)** +- |void| **set_tap2_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_tap2_active**\ (\ ) -If ``true``, ``tap2`` will be enabled. +If ``true``, the second tap will be enabled. .. rst-class:: classref-item-separator @@ -249,14 +249,14 @@ If ``true``, ``tap2`` will be enabled. .. rst-class:: classref-property -:ref:`float` **tap2_delay_ms** = ``500.0`` +:ref:`float` **tap2_delay_ms** = ``500.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap2_delay_ms** **(** :ref:`float` value **)** -- :ref:`float` **get_tap2_delay_ms** **(** **)** +- |void| **set_tap2_delay_ms**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap2_delay_ms**\ (\ ) -**Tap2** delay time in milliseconds. +Second tap delay time in milliseconds. .. rst-class:: classref-item-separator @@ -266,14 +266,14 @@ If ``true``, ``tap2`` will be enabled. .. rst-class:: classref-property -:ref:`float` **tap2_level_db** = ``-12.0`` +:ref:`float` **tap2_level_db** = ``-12.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap2_level_db** **(** :ref:`float` value **)** -- :ref:`float` **get_tap2_level_db** **(** **)** +- |void| **set_tap2_level_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap2_level_db**\ (\ ) -Sound level for ``tap2``. +Sound level for the second tap. .. rst-class:: classref-item-separator @@ -283,14 +283,14 @@ Sound level for ``tap2``. .. rst-class:: classref-property -:ref:`float` **tap2_pan** = ``-0.4`` +:ref:`float` **tap2_pan** = ``-0.4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap2_pan** **(** :ref:`float` value **)** -- :ref:`float` **get_tap2_pan** **(** **)** +- |void| **set_tap2_pan**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap2_pan**\ (\ ) -Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully right). +Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -299,3 +299,4 @@ Pan position for ``tap2``. Value can range from -1 (fully left) to 1 (fully righ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index e91d8fef5a3..ef3dd123514 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -65,7 +65,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗` .. _class_AudioEffectDistortion_constant_MODE_CLIP: @@ -81,6 +81,10 @@ Digital distortion effect which cuts off peaks at the top and bottom of the wave :ref:`Mode` **MODE_ATAN** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + .. _class_AudioEffectDistortion_constant_MODE_LOFI: @@ -120,12 +124,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **drive** = ``0.0`` +:ref:`float` **drive** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drive** **(** :ref:`float` value **)** -- :ref:`float` **get_drive** **(** **)** +- |void| **set_drive**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_drive**\ (\ ) Distortion power. Value can range from 0 to 1. @@ -137,12 +141,12 @@ Distortion power. Value can range from 0 to 1. .. rst-class:: classref-property -:ref:`float` **keep_hf_hz** = ``16000.0`` +:ref:`float` **keep_hf_hz** = ``16000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_keep_hf_hz** **(** :ref:`float` value **)** -- :ref:`float` **get_keep_hf_hz** **(** **)** +- |void| **set_keep_hf_hz**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_keep_hf_hz**\ (\ ) High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. @@ -154,12 +158,12 @@ High-pass filter, in Hz. Frequencies higher than this value will not be affected .. rst-class:: classref-property -:ref:`Mode` **mode** = ``0`` +:ref:`Mode` **mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mode** **(** :ref:`Mode` value **)** -- :ref:`Mode` **get_mode** **(** **)** +- |void| **set_mode**\ (\ value\: :ref:`Mode`\ ) +- :ref:`Mode` **get_mode**\ (\ ) Distortion type. @@ -171,12 +175,12 @@ Distortion type. .. rst-class:: classref-property -:ref:`float` **post_gain** = ``0.0`` +:ref:`float` **post_gain** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_post_gain** **(** :ref:`float` value **)** -- :ref:`float` **get_post_gain** **(** **)** +- |void| **set_post_gain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_post_gain**\ (\ ) Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24. @@ -188,12 +192,12 @@ Increases or decreases the volume after the effect, in decibels. Value can range .. rst-class:: classref-property -:ref:`float` **pre_gain** = ``0.0`` +:ref:`float` **pre_gain** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pre_gain** **(** :ref:`float` value **)** -- :ref:`float` **get_pre_gain** **(** **)** +- |void| **set_pre_gain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pre_gain**\ (\ ) Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. @@ -204,3 +208,4 @@ Increases or decreases the volume before the effect, in decibels. Value can rang .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index c132fb0eb03..1200927b7d8 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -40,13 +40,13 @@ Methods .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_band_count` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_band_gain_db` **(** :ref:`int` band_idx **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_band_gain_db` **(** :ref:`int` band_idx, :ref:`float` volume_db **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_band_count`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_band_gain_db`\ (\ band_idx\: :ref:`int`\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_band_gain_db`\ (\ band_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -61,7 +61,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **get_band_count** **(** **)** |const| +:ref:`int` **get_band_count**\ (\ ) |const| :ref:`🔗` Returns the number of bands of the equalizer. @@ -73,7 +73,7 @@ Returns the number of bands of the equalizer. .. rst-class:: classref-method -:ref:`float` **get_band_gain_db** **(** :ref:`int` band_idx **)** |const| +:ref:`float` **get_band_gain_db**\ (\ band_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the band's gain at the specified index, in dB. @@ -85,7 +85,7 @@ Returns the band's gain at the specified index, in dB. .. rst-class:: classref-method -void **set_band_gain_db** **(** :ref:`int` band_idx, :ref:`float` volume_db **)** +|void| **set_band_gain_db**\ (\ band_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`🔗` Sets band's gain at the specified index, in dB. @@ -96,3 +96,4 @@ Sets band's gain at the specified index, in dB. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index d1dc42c3276..fe6ec7273cd 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -59,3 +59,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index b753bc6dd78..d7dcd58ee04 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -81,3 +81,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 098fd3a3fa7..139c4c25cf2 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -51,3 +51,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 0e92c34a8f4..b3d55990523 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -61,7 +61,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FilterDB**: +enum **FilterDB**: :ref:`🔗` .. _class_AudioEffectFilter_constant_FILTER_6DB: @@ -69,6 +69,10 @@ enum **FilterDB**: :ref:`FilterDB` **FILTER_6DB** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + .. _class_AudioEffectFilter_constant_FILTER_12DB: @@ -77,6 +81,10 @@ enum **FilterDB**: :ref:`FilterDB` **FILTER_12DB** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + .. _class_AudioEffectFilter_constant_FILTER_18DB: @@ -85,6 +93,10 @@ enum **FilterDB**: :ref:`FilterDB` **FILTER_18DB** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + .. _class_AudioEffectFilter_constant_FILTER_24DB: @@ -93,6 +105,10 @@ enum **FilterDB**: :ref:`FilterDB` **FILTER_24DB** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one `! + .. rst-class:: classref-section-separator @@ -108,12 +124,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **cutoff_hz** = ``2000.0`` +:ref:`float` **cutoff_hz** = ``2000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cutoff** **(** :ref:`float` value **)** -- :ref:`float` **get_cutoff** **(** **)** +- |void| **set_cutoff**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_cutoff**\ (\ ) Threshold frequency for the filter, in Hz. @@ -125,12 +141,12 @@ Threshold frequency for the filter, in Hz. .. rst-class:: classref-property -:ref:`FilterDB` **db** = ``0`` +:ref:`FilterDB` **db** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_db** **(** :ref:`FilterDB` value **)** -- :ref:`FilterDB` **get_db** **(** **)** +- |void| **set_db**\ (\ value\: :ref:`FilterDB`\ ) +- :ref:`FilterDB` **get_db**\ (\ ) .. container:: contribute @@ -144,12 +160,12 @@ Threshold frequency for the filter, in Hz. .. rst-class:: classref-property -:ref:`float` **gain** = ``1.0`` +:ref:`float` **gain** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gain** **(** :ref:`float` value **)** -- :ref:`float` **get_gain** **(** **)** +- |void| **set_gain**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_gain**\ (\ ) Gain amount of the frequencies after the filter. @@ -161,12 +177,12 @@ Gain amount of the frequencies after the filter. .. rst-class:: classref-property -:ref:`float` **resonance** = ``0.5`` +:ref:`float` **resonance** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_resonance** **(** :ref:`float` value **)** -- :ref:`float` **get_resonance** **(** **)** +- |void| **set_resonance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_resonance**\ (\ ) Amount of boost in the frequency range near the cutoff frequency. @@ -177,3 +193,4 @@ Amount of boost in the frequency range near the cutoff frequency. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecthardlimiter.rst b/classes/class_audioeffecthardlimiter.rst new file mode 100644 index 00000000000..d576bce8225 --- /dev/null +++ b/classes/class_audioeffecthardlimiter.rst @@ -0,0 +1,112 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioEffectHardLimiter.xml. + +.. _class_AudioEffectHardLimiter: + +AudioEffectHardLimiter +====================== + +**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Adds a hard limiter audio effect to an Audio bus. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A limiter is an effect designed to disallow sound from going over a given dB threshold. Hard limiters predict volume peaks, and will smoothly apply gain reduction when a peak crosses the ceiling threshold to prevent clipping and distortion. It preserves the waveform and prevents it from crossing the ceiling threshold. Adding one in the Master bus is recommended as a safety measure to prevent sudden volume peaks from occurring, and to prevent distortion caused by clipping. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Audio buses <../tutorials/audio/audio_buses>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`ceiling_db` | ``-0.3`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`pre_gain_db` | ``0.0`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`release` | ``0.1`` | + +---------------------------+-----------------------------------------------------------------------+----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioEffectHardLimiter_property_ceiling_db: + +.. rst-class:: classref-property + +:ref:`float` **ceiling_db** = ``-0.3`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_ceiling_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ceiling_db**\ (\ ) + +The waveform's maximum allowed value, in decibels. This value can range from ``-24.0`` to ``0.0``. + +The default value of ``-0.3`` prevents potential inter-sample peaks (ISP) from crossing over 0 dB, which can cause slight distortion on some older hardware. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioEffectHardLimiter_property_pre_gain_db: + +.. rst-class:: classref-property + +:ref:`float` **pre_gain_db** = ``0.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_pre_gain_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pre_gain_db**\ (\ ) + +Gain to apply before limiting, in decibels. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioEffectHardLimiter_property_release: + +.. rst-class:: classref-property + +:ref:`float` **release** = ``0.1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_release**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_release**\ (\ ) + +Time it takes in seconds for the gain reduction to fully release. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index 94ec635c03b..3d5763b3d17 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffecthighshelffilter.rst b/classes/class_audioeffecthighshelffilter.rst index 5b3073dba2d..11dc4176862 100644 --- a/classes/class_audioeffecthighshelffilter.rst +++ b/classes/class_audioeffecthighshelffilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index d513421de35..64b4ca1debc 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -14,9 +14,21 @@ AudioEffectInstance **Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance` -.. container:: contribute +Manipulates the audio it receives for a given effect. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Audio buses <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group @@ -26,11 +38,11 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process_silence` **(** **)** |virtual| |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_silence`\ (\ ) |virtual| |const| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -41,29 +53,29 @@ Methods Method Descriptions ------------------- -.. _class_AudioEffectInstance_method__process: +.. _class_AudioEffectInstance_private_method__process: .. rst-class:: classref-method -void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| +|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` -.. container:: contribute +Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence` is not overridden or it returns ``false``, this method is called only when the bus is active. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. .. rst-class:: classref-item-separator ---- -.. _class_AudioEffectInstance_method__process_silence: +.. _class_AudioEffectInstance_private_method__process_silence: .. rst-class:: classref-method -:ref:`bool` **_process_silence** **(** **)** |virtual| |const| +:ref:`bool` **_process_silence**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Override this method to customize the processing behavior of this effect instance. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process`, even if the bus has been muted or cannot otherwise be heard. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -72,3 +84,4 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index 67a2866af20..5eeae4ec3aa 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -10,6 +10,8 @@ AudioEffectLimiter ================== +**Deprecated:** Use :ref:`AudioEffectHardLimiter` instead. + **Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Adds a soft-clip limiter audio effect to an Audio bus. @@ -61,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **ceiling_db** = ``-0.1`` +:ref:`float` **ceiling_db** = ``-0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ceiling_db** **(** :ref:`float` value **)** -- :ref:`float` **get_ceiling_db** **(** **)** +- |void| **set_ceiling_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ceiling_db**\ (\ ) The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. @@ -78,12 +80,12 @@ The waveform's maximum allowed value, in decibels. Value can range from -20 to - .. rst-class:: classref-property -:ref:`float` **soft_clip_db** = ``2.0`` +:ref:`float` **soft_clip_db** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_soft_clip_db** **(** :ref:`float` value **)** -- :ref:`float` **get_soft_clip_db** **(** **)** +- |void| **set_soft_clip_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_soft_clip_db**\ (\ ) Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. @@ -95,12 +97,12 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. .. rst-class:: classref-property -:ref:`float` **soft_clip_ratio** = ``10.0`` +:ref:`float` **soft_clip_ratio** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_soft_clip_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_soft_clip_ratio** **(** **)** +- |void| **set_soft_clip_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_soft_clip_ratio**\ (\ ) .. container:: contribute @@ -114,12 +116,12 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. .. rst-class:: classref-property -:ref:`float` **threshold_db** = ``0.0`` +:ref:`float` **threshold_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_threshold_db** **(** :ref:`float` value **)** -- :ref:`float` **get_threshold_db** **(** **)** +- |void| **set_threshold_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_threshold_db**\ (\ ) Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. @@ -130,3 +132,4 @@ Threshold from which the limiter begins to be active, in decibels. Value can ran .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index 17d4ec73d4f..bcf0160b80c 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectlowshelffilter.rst b/classes/class_audioeffectlowshelffilter.rst index 595fc3e938e..f42fcbdf468 100644 --- a/classes/class_audioeffectlowshelffilter.rst +++ b/classes/class_audioeffectlowshelffilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 1a117207306..d7d6847e519 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index cbfcd3d958d..7638e38ab35 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -53,12 +53,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **pan** = ``0.0`` +:ref:`float` **pan** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pan** **(** :ref:`float` value **)** -- :ref:`float` **get_pan** **(** **)** +- |void| **set_pan**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pan**\ (\ ) Pan position. Value can range from -1 (fully left) to 1 (fully right). @@ -69,3 +69,4 @@ Pan position. Value can range from -1 (fully left) to 1 (fully right). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 1d77b88c898..015a6faa3e4 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -63,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **depth** = ``1.0`` +:ref:`float` **depth** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`float` value **)** -- :ref:`float` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_depth**\ (\ ) Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. @@ -80,12 +80,12 @@ Governs how high the filter frequencies sweep. Low value will primarily affect b .. rst-class:: classref-property -:ref:`float` **feedback** = ``0.7`` +:ref:`float` **feedback** = ``0.7`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feedback** **(** :ref:`float` value **)** -- :ref:`float` **get_feedback** **(** **)** +- |void| **set_feedback**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_feedback**\ (\ ) Output percent of modified sound. Value can range from 0.1 to 0.9. @@ -97,12 +97,12 @@ Output percent of modified sound. Value can range from 0.1 to 0.9. .. rst-class:: classref-property -:ref:`float` **range_max_hz** = ``1600.0`` +:ref:`float` **range_max_hz** = ``1600.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_range_max_hz** **(** :ref:`float` value **)** -- :ref:`float` **get_range_max_hz** **(** **)** +- |void| **set_range_max_hz**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_range_max_hz**\ (\ ) Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. @@ -114,12 +114,12 @@ Determines the maximum frequency affected by the LFO modulations, in Hz. Value c .. rst-class:: classref-property -:ref:`float` **range_min_hz** = ``440.0`` +:ref:`float` **range_min_hz** = ``440.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_range_min_hz** **(** :ref:`float` value **)** -- :ref:`float` **get_range_min_hz** **(** **)** +- |void| **set_range_min_hz**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_range_min_hz**\ (\ ) Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. @@ -131,12 +131,12 @@ Determines the minimum frequency affected by the LFO modulations, in Hz. Value c .. rst-class:: classref-property -:ref:`float` **rate_hz** = ``0.5`` +:ref:`float` **rate_hz** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rate_hz** **(** :ref:`float` value **)** -- :ref:`float` **get_rate_hz** **(** **)** +- |void| **set_rate_hz**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rate_hz**\ (\ ) Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. @@ -147,3 +147,4 @@ Adjusts the rate in Hz at which the effect sweeps up and down across the frequen .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index cc851533213..9ba21b4ae12 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -59,7 +59,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FFTSize**: +enum **FFTSize**: :ref:`🔗` .. _class_AudioEffectPitchShift_constant_FFT_SIZE_256: @@ -122,12 +122,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`FFTSize` **fft_size** = ``3`` +:ref:`FFTSize` **fft_size** = ``3`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fft_size** **(** :ref:`FFTSize` value **)** -- :ref:`FFTSize` **get_fft_size** **(** **)** +- |void| **set_fft_size**\ (\ value\: :ref:`FFTSize`\ ) +- :ref:`FFTSize` **get_fft_size**\ (\ ) The size of the `Fast Fourier transform `__ buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes. @@ -139,12 +139,12 @@ The size of the `Fast Fourier transform ` **oversampling** = ``4`` +:ref:`int` **oversampling** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_oversampling** **(** :ref:`int` value **)** -- :ref:`int` **get_oversampling** **(** **)** +- |void| **set_oversampling**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_oversampling**\ (\ ) The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up. @@ -156,14 +156,14 @@ The oversampling factor to use. Higher values result in better quality, but are .. rst-class:: classref-property -:ref:`float` **pitch_scale** = ``1.0`` +:ref:`float` **pitch_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pitch_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_pitch_scale** **(** **)** +- |void| **set_pitch_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pitch_scale**\ (\ ) -The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaltered. :ref:`pitch_scale` can range from ``0.0`` (infinitely low pitch, inaudible) to ``16`` (16 times higher than the initial pitch). +The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaffected. :ref:`pitch_scale` can range from ``0.0`` (infinitely low pitch, inaudible) to ``16`` (16 times higher than the initial pitch). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -172,3 +172,4 @@ The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaltered. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index 5b9c5aa2547..c1e2646fd14 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -19,11 +19,13 @@ Audio effect used for recording the sound from an audio bus. Description ----------- -Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus. +Allows the user to record the sound from an audio bus into an :ref:`AudioStreamWAV`. When used on the "Master" audio bus, this includes all audio output by Godot. + +Unlike :ref:`AudioEffectCapture`, this effect encodes the recording with the given format (8-bit, 16-bit, or compressed) instead of giving access to the raw audio samples. Can be used (with an :ref:`AudioStreamMicrophone`) to record from a microphone. -It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample. +\ **Note:** :ref:`ProjectSettings.audio/driver/enable_input` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. .. rst-class:: classref-introduction-group @@ -32,7 +34,7 @@ Tutorials - :doc:`Recording with microphone <../tutorials/audio/recording_with_microphone>` -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ .. rst-class:: classref-reftable-group @@ -54,13 +56,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamWAV` | :ref:`get_recording` **(** **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_recording_active` **(** **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_recording_active` **(** :ref:`bool` record **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`get_recording`\ (\ ) |const| | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_recording_active`\ (\ ) |const| | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_recording_active`\ (\ record\: :ref:`bool`\ ) | + +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,12 +77,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Format` **format** = ``1`` +:ref:`Format` **format** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_format** **(** :ref:`Format` value **)** -- :ref:`Format` **get_format** **(** **)** +- |void| **set_format**\ (\ value\: :ref:`Format`\ ) +- :ref:`Format` **get_format**\ (\ ) Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. @@ -97,7 +99,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AudioStreamWAV` **get_recording** **(** **)** |const| +:ref:`AudioStreamWAV` **get_recording**\ (\ ) |const| :ref:`🔗` Returns the recorded sample. @@ -109,7 +111,7 @@ Returns the recorded sample. .. rst-class:: classref-method -:ref:`bool` **is_recording_active** **(** **)** |const| +:ref:`bool` **is_recording_active**\ (\ ) |const| :ref:`🔗` Returns whether the recording is active or not. @@ -121,7 +123,7 @@ Returns whether the recording is active or not. .. rst-class:: classref-method -void **set_recording_active** **(** :ref:`bool` record **)** +|void| **set_recording_active**\ (\ record\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. @@ -132,3 +134,4 @@ If ``true``, the sound will be recorded. Note that restarting the recording will .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 5b7ca1e55a3..86c999fd979 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -28,7 +28,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -69,12 +69,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **damping** = ``0.5`` +:ref:`float` **damping** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_damping** **(** :ref:`float` value **)** -- :ref:`float` **get_damping** **(** **)** +- |void| **set_damping**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_damping**\ (\ ) Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. @@ -86,12 +86,12 @@ Defines how reflective the imaginary room's walls are. Value can range from 0 to .. rst-class:: classref-property -:ref:`float` **dry** = ``1.0`` +:ref:`float` **dry** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dry** **(** :ref:`float` value **)** -- :ref:`float` **get_dry** **(** **)** +- |void| **set_dry**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dry**\ (\ ) Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. @@ -103,12 +103,12 @@ Output percent of original sound. At 0, only modified sound is outputted. Value .. rst-class:: classref-property -:ref:`float` **hipass** = ``0.0`` +:ref:`float` **hipass** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_hpf** **(** :ref:`float` value **)** -- :ref:`float` **get_hpf** **(** **)** +- |void| **set_hpf**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_hpf**\ (\ ) High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. @@ -120,12 +120,12 @@ High-pass filter passes signals with a frequency higher than a certain cutoff fr .. rst-class:: classref-property -:ref:`float` **predelay_feedback** = ``0.4`` +:ref:`float` **predelay_feedback** = ``0.4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_predelay_feedback** **(** :ref:`float` value **)** -- :ref:`float` **get_predelay_feedback** **(** **)** +- |void| **set_predelay_feedback**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_predelay_feedback**\ (\ ) Output percent of predelay. Value can range from 0 to 1. @@ -137,12 +137,12 @@ Output percent of predelay. Value can range from 0 to 1. .. rst-class:: classref-property -:ref:`float` **predelay_msec** = ``150.0`` +:ref:`float` **predelay_msec** = ``150.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_predelay_msec** **(** :ref:`float` value **)** -- :ref:`float` **get_predelay_msec** **(** **)** +- |void| **set_predelay_msec**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_predelay_msec**\ (\ ) Time between the original signal and the early reflections of the reverb signal, in milliseconds. @@ -154,12 +154,12 @@ Time between the original signal and the early reflections of the reverb signal, .. rst-class:: classref-property -:ref:`float` **room_size** = ``0.8`` +:ref:`float` **room_size** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_room_size** **(** :ref:`float` value **)** -- :ref:`float` **get_room_size** **(** **)** +- |void| **set_room_size**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_room_size**\ (\ ) Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. @@ -171,12 +171,12 @@ Dimensions of simulated room. Bigger means more echoes. Value can range from 0 t .. rst-class:: classref-property -:ref:`float` **spread** = ``1.0`` +:ref:`float` **spread** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_spread** **(** :ref:`float` value **)** -- :ref:`float` **get_spread** **(** **)** +- |void| **set_spread**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_spread**\ (\ ) Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. @@ -188,12 +188,12 @@ Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Val .. rst-class:: classref-property -:ref:`float` **wet** = ``0.5`` +:ref:`float` **wet** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wet** **(** :ref:`float` value **)** -- :ref:`float` **get_wet** **(** **)** +- |void| **set_wet**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wet**\ (\ ) Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. @@ -204,3 +204,4 @@ Output percent of modified sound. At 0, only original sound is outputted. Value .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 428cd25da1c..2a862c5c0f3 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,6 +21,8 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be acquired with :ref:`AudioServer.get_bus_effect_instance`. + See also :ref:`AudioStreamGenerator` for procedurally generating sounds. .. rst-class:: classref-introduction-group @@ -28,9 +30,7 @@ See also :ref:`AudioStreamGenerator` for procedurall Tutorials --------- -- `Audio Spectrum Demo `__ - -- `Godot 3.2 will get new audio features `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -61,7 +61,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FFTSize**: +enum **FFTSize**: :ref:`🔗` .. _class_AudioEffectSpectrumAnalyzer_constant_FFT_SIZE_256: @@ -124,12 +124,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **buffer_length** = ``2.0`` +:ref:`float` **buffer_length** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_buffer_length** **(** :ref:`float` value **)** -- :ref:`float` **get_buffer_length** **(** **)** +- |void| **set_buffer_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_buffer_length**\ (\ ) The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory. @@ -141,12 +141,12 @@ The length of the buffer to keep (in seconds). Higher values keep data around fo .. rst-class:: classref-property -:ref:`FFTSize` **fft_size** = ``2`` +:ref:`FFTSize` **fft_size** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fft_size** **(** :ref:`FFTSize` value **)** -- :ref:`FFTSize` **get_fft_size** **(** **)** +- |void| **set_fft_size**\ (\ value\: :ref:`FFTSize`\ ) +- :ref:`FFTSize` **get_fft_size**\ (\ ) The size of the `Fast Fourier transform `__ buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes. @@ -158,12 +158,12 @@ The size of the `Fast Fourier transform ` **tap_back_pos** = ``0.01`` +:ref:`float` **tap_back_pos** = ``0.01`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tap_back_pos** **(** :ref:`float` value **)** -- :ref:`float` **get_tap_back_pos** **(** **)** +- |void| **set_tap_back_pos**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_tap_back_pos**\ (\ ) .. container:: contribute @@ -176,3 +176,4 @@ The size of the `Fast Fourier transform ` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +Queryable instance of an :ref:`AudioEffectSpectrumAnalyzer`. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Description +----------- + +The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. + +An instance of this class can be acquired with :ref:`AudioServer.get_bus_effect_instance`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -24,9 +38,9 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_magnitude_for_frequency_range` **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_magnitude_for_frequency_range`\ (\ from_hz\: :ref:`float`, to_hz\: :ref:`float`, mode\: :ref:`MagnitudeMode` = 1\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -41,7 +55,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MagnitudeMode**: +enum **MagnitudeMode**: :ref:`🔗` .. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_AVERAGE: @@ -49,7 +63,7 @@ enum **MagnitudeMode**: :ref:`MagnitudeMode` **MAGNITUDE_AVERAGE** = ``0`` -Use the average value as magnitude. +Use the average value across the frequency range as magnitude. .. _class_AudioEffectSpectrumAnalyzerInstance_constant_MAGNITUDE_MAX: @@ -57,7 +71,7 @@ Use the average value as magnitude. :ref:`MagnitudeMode` **MAGNITUDE_MAX** = ``1`` -Use the maximum value as magnitude. +Use the maximum value of the frequency range as magnitude. .. rst-class:: classref-section-separator @@ -72,11 +86,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector2` **get_magnitude_for_frequency_range** **(** :ref:`float` from_hz, :ref:`float` to_hz, :ref:`MagnitudeMode` mode=1 **)** |const| +:ref:`Vector2` **get_magnitude_for_frequency_range**\ (\ from_hz\: :ref:`float`, to_hz\: :ref:`float`, mode\: :ref:`MagnitudeMode` = 1\ ) |const| :ref:`🔗` -.. container:: contribute +Returns the magnitude of the frequencies from ``from_hz`` to ``to_hz`` in linear energy as a Vector2. The ``x`` component of the return value represents the left stereo channel, and ``y`` represents the right channel. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ ``mode`` determines how the frequency range will be processed. See :ref:`MagnitudeMode`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -85,3 +99,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index fe4586d53c4..ed98852e81e 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **pan_pullout** = ``1.0`` +:ref:`float` **pan_pullout** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pan_pullout** **(** :ref:`float` value **)** -- :ref:`float` **get_pan_pullout** **(** **)** +- |void| **set_pan_pullout**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pan_pullout**\ (\ ) Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. @@ -74,12 +74,12 @@ Values greater than 1.0 increase intensity of any panning on audio passing throu .. rst-class:: classref-property -:ref:`float` **surround** = ``0.0`` +:ref:`float` **surround** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_surround** **(** :ref:`float` value **)** -- :ref:`float` **get_surround** **(** **)** +- |void| **set_surround**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_surround**\ (\ ) .. container:: contribute @@ -93,12 +93,12 @@ Values greater than 1.0 increase intensity of any panning on audio passing throu .. rst-class:: classref-property -:ref:`float` **time_pullout_ms** = ``0.0`` +:ref:`float` **time_pullout_ms** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_time_pullout** **(** :ref:`float` value **)** -- :ref:`float` **get_time_pullout** **(** **)** +- |void| **set_time_pullout**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_time_pullout**\ (\ ) .. container:: contribute @@ -111,3 +111,4 @@ Values greater than 1.0 increase intensity of any panning on audio passing throu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index c6f29cc15fa..7fed4577abb 100644 --- a/classes/class_audiolistener2d.rst +++ b/classes/class_audiolistener2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sound + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -31,13 +34,13 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------+ - | void | :ref:`clear_current` **(** **)** | - +-------------------------+--------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_current` **(** **)** |const| | - +-------------------------+--------------------------------------------------------------------------------+ - | void | :ref:`make_current` **(** **)** | - +-------------------------+--------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------+ + | |void| | :ref:`clear_current`\ (\ ) | + +-------------------------+--------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | + +-------------------------+--------------------------------------------------------------------------+ + | |void| | :ref:`make_current`\ (\ ) | + +-------------------------+--------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +55,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_current** **(** **)** +|void| **clear_current**\ (\ ) :ref:`🔗` Disables the **AudioListener2D**. If it's not set as current, this method will have no effect. @@ -64,7 +67,7 @@ Disables the **AudioListener2D**. If it's not set as current, this method will h .. rst-class:: classref-method -:ref:`bool` **is_current** **(** **)** |const| +:ref:`bool` **is_current**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this **AudioListener2D** is currently active. @@ -76,7 +79,7 @@ Returns ``true`` if this **AudioListener2D** is currently active. .. rst-class:: classref-method -void **make_current** **(** **)** +|void| **make_current**\ (\ ) :ref:`🔗` Makes the **AudioListener2D** active, setting it as the hearing point for the sounds. If there is already another active **AudioListener2D**, it will be disabled. @@ -89,3 +92,4 @@ This method will have no effect if the **AudioListener2D** is not added to :ref: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index 4e744d48974..d90896c68c9 100644 --- a/classes/class_audiolistener3d.rst +++ b/classes/class_audiolistener3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sound + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -29,15 +32,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_current` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_listener_transform` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_current` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_current` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------+ + +---------------------------------------+--------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_current`\ (\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_listener_transform`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_current`\ (\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +55,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_current** **(** **)** +|void| **clear_current**\ (\ ) :ref:`🔗` Disables the listener to use the current camera's listener instead. @@ -64,7 +67,7 @@ Disables the listener to use the current camera's listener instead. .. rst-class:: classref-method -:ref:`Transform3D` **get_listener_transform** **(** **)** |const| +:ref:`Transform3D` **get_listener_transform**\ (\ ) |const| :ref:`🔗` Returns the listener's global orthonormalized :ref:`Transform3D`. @@ -76,7 +79,7 @@ Returns the listener's global orthonormalized :ref:`Transform3D` **is_current** **(** **)** |const| +:ref:`bool` **is_current**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the listener was made current using :ref:`make_current`, ``false`` otherwise. @@ -90,7 +93,7 @@ Returns ``true`` if the listener was made current using :ref:`make_current` Enables the listener. This will override the current camera's listener. @@ -101,3 +104,4 @@ Enables the listener. This will override the current camera's listener. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiosample.rst b/classes/class_audiosample.rst new file mode 100644 index 00000000000..e01dc39c481 --- /dev/null +++ b/classes/class_audiosample.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioSample.xml. + +.. _class_AudioSample: + +AudioSample +=========== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Base class for audio samples. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for audio samples. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiosampleplayback.rst b/classes/class_audiosampleplayback.rst new file mode 100644 index 00000000000..864a87e06c4 --- /dev/null +++ b/classes/class_audiosampleplayback.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AudioSamplePlayback.xml. + +.. _class_AudioSamplePlayback: + +AudioSamplePlayback +=================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +Meta class for playing back audio samples. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Meta class for playing back audio samples. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 706314ae63b..5a10f28eec9 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -28,11 +28,11 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` -- `Audio Device Changer Demo `__ +- `Audio Device Changer Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -60,85 +60,89 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_bus` **(** :ref:`int` at_position=-1 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_bus_effect` **(** :ref:`int` bus_idx, :ref:`AudioEffect` effect, :ref:`int` at_position=-1 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioBusLayout` | :ref:`generate_bus_layout` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bus_channels` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioEffect` | :ref:`get_bus_effect` **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bus_effect_count` **(** :ref:`int` bus_idx **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioEffectInstance` | :ref:`get_bus_effect_instance` **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` channel=0 **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bus_index` **(** :ref:`StringName` bus_name **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_bus_name` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_bus_peak_volume_left_db` **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_bus_peak_volume_right_db` **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_bus_send` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_bus_volume_db` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_input_device_list` **(** **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_mix_rate` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_output_device_list` **(** **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_output_latency` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SpeakerMode` | :ref:`get_speaker_mode` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_time_since_last_mix` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_time_to_next_mix` **(** **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_bus_bypassing_effects` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_bus_effect_enabled` **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_bus_mute` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_bus_solo` **(** :ref:`int` bus_idx **)** |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lock` **(** **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_bus` **(** :ref:`int` index, :ref:`int` to_index **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_bus` **(** :ref:`int` index **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_bus_effect` **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_bypass_effects` **(** :ref:`int` bus_idx, :ref:`bool` enable **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_effect_enabled` **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`bool` enabled **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_layout` **(** :ref:`AudioBusLayout` bus_layout **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_mute` **(** :ref:`int` bus_idx, :ref:`bool` enable **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_name` **(** :ref:`int` bus_idx, :ref:`String` name **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_send` **(** :ref:`int` bus_idx, :ref:`StringName` send **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_solo` **(** :ref:`int` bus_idx, :ref:`bool` enable **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bus_volume_db` **(** :ref:`int` bus_idx, :ref:`float` volume_db **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_enable_tagging_used_audio_streams` **(** :ref:`bool` enable **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`swap_bus_effects` **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` by_effect_idx **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unlock` **(** **)** | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_bus`\ (\ at_position\: :ref:`int` = -1\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_bus_effect`\ (\ bus_idx\: :ref:`int`, effect\: :ref:`AudioEffect`, at_position\: :ref:`int` = -1\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioBusLayout` | :ref:`generate_bus_layout`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bus_channels`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioEffect` | :ref:`get_bus_effect`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bus_effect_count`\ (\ bus_idx\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`get_bus_effect_instance`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, channel\: :ref:`int` = 0\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bus_index`\ (\ bus_name\: :ref:`StringName`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_bus_name`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bus_peak_volume_left_db`\ (\ bus_idx\: :ref:`int`, channel\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bus_peak_volume_right_db`\ (\ bus_idx\: :ref:`int`, channel\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_bus_send`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bus_volume_db`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_input_device_list`\ (\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_mix_rate`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_output_device_list`\ (\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_output_latency`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SpeakerMode` | :ref:`get_speaker_mode`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_time_since_last_mix`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_time_to_next_mix`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bus_bypassing_effects`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bus_effect_enabled`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bus_mute`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_bus_solo`\ (\ bus_idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_stream_registered_as_sample`\ (\ stream\: :ref:`AudioStream`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lock`\ (\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_bus`\ (\ index\: :ref:`int`, to_index\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_stream_as_sample`\ (\ stream\: :ref:`AudioStream`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_bus`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_bus_effect`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_bypass_effects`\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_effect_enabled`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_layout`\ (\ bus_layout\: :ref:`AudioBusLayout`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_mute`\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_name`\ (\ bus_idx\: :ref:`int`, name\: :ref:`String`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_send`\ (\ bus_idx\: :ref:`int`, send\: :ref:`StringName`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_solo`\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bus_volume_db`\ (\ bus_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_enable_tagging_used_audio_streams`\ (\ enable\: :ref:`bool`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`swap_bus_effects`\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, by_effect_idx\: :ref:`int`\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unlock`\ (\ ) | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -153,9 +157,21 @@ Signals .. rst-class:: classref-signal -**bus_layout_changed** **(** **)** +**bus_layout_changed**\ (\ ) :ref:`🔗` -Emitted when the :ref:`AudioBusLayout` changes. +Emitted when an audio bus is added, deleted, or moved. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioServer_signal_bus_renamed: + +.. rst-class:: classref-signal + +**bus_renamed**\ (\ bus_index\: :ref:`int`, old_name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`🔗` + +Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``new_name``. .. rst-class:: classref-section-separator @@ -170,7 +186,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SpeakerMode**: +enum **SpeakerMode**: :ref:`🔗` .. _class_AudioServer_constant_SPEAKER_MODE_STEREO: @@ -204,6 +220,60 @@ A 5.1 channel surround setup was detected. A 7.1 channel surround setup was detected. +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioServer_PlaybackType: + +.. rst-class:: classref-enumeration + +enum **PlaybackType**: :ref:`🔗` + +.. _class_AudioServer_constant_PLAYBACK_TYPE_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackType` **PLAYBACK_TYPE_DEFAULT** = ``0`` + +**Experimental:** This constant may be changed or removed in future versions. + +The playback will be considered of the type declared at :ref:`ProjectSettings.audio/general/default_playback_type`. + +.. _class_AudioServer_constant_PLAYBACK_TYPE_STREAM: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackType` **PLAYBACK_TYPE_STREAM** = ``1`` + +**Experimental:** This constant may be changed or removed in future versions. + +Force the playback to be considered as a stream. + +.. _class_AudioServer_constant_PLAYBACK_TYPE_SAMPLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackType` **PLAYBACK_TYPE_SAMPLE** = ``2`` + +**Experimental:** This constant may be changed or removed in future versions. + +Force the playback to be considered as a sample. This can provide lower latency and more stable playback (with less risk of audio crackling), at the cost of having less flexibility. + +\ **Note:** Only currently supported on the web platform. + +\ **Note:** :ref:`AudioEffect`\ s are not supported when playback is considered as a sample. + +.. _class_AudioServer_constant_PLAYBACK_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`PlaybackType` **PLAYBACK_TYPE_MAX** = ``3`` + +**Experimental:** This constant may be changed or removed in future versions. + +Represents the size of the :ref:`PlaybackType` enum. + .. rst-class:: classref-section-separator ---- @@ -217,12 +287,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bus_count** = ``1`` +:ref:`int` **bus_count** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bus_count** **(** :ref:`int` value **)** -- :ref:`int` **get_bus_count** **(** **)** +- |void| **set_bus_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_bus_count**\ (\ ) Number of available audio buses. @@ -234,12 +304,12 @@ Number of available audio buses. .. rst-class:: classref-property -:ref:`String` **input_device** = ``"Default"`` +:ref:`String` **input_device** = ``"Default"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_input_device** **(** :ref:`String` value **)** -- :ref:`String` **get_input_device** **(** **)** +- |void| **set_input_device**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_input_device**\ (\ ) Name of the current device for audio input (see :ref:`get_input_device_list`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. @@ -253,12 +323,12 @@ Name of the current device for audio input (see :ref:`get_input_device_list` **output_device** = ``"Default"`` +:ref:`String` **output_device** = ``"Default"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_output_device** **(** :ref:`String` value **)** -- :ref:`String` **get_output_device** **(** **)** +- |void| **set_output_device**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_output_device**\ (\ ) Name of the current device for audio output (see :ref:`get_output_device_list`). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value ``"Default"`` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to ``"Default"``. @@ -270,14 +340,14 @@ Name of the current device for audio output (see :ref:`get_output_device_list` **playback_speed_scale** = ``1.0`` +:ref:`float` **playback_speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_playback_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_playback_speed_scale** **(** **)** +- |void| **set_playback_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_playback_speed_scale**\ (\ ) -Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). +Scales the rate at which audio is played (i.e. setting it to ``0.5`` will make the audio be played at half its speed). See also :ref:`Engine.time_scale` to affect the general simulation speed, which is independent from :ref:`playback_speed_scale`. .. rst-class:: classref-section-separator @@ -292,7 +362,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_bus** **(** :ref:`int` at_position=-1 **)** +|void| **add_bus**\ (\ at_position\: :ref:`int` = -1\ ) :ref:`🔗` Adds a bus at ``at_position``. @@ -304,7 +374,7 @@ Adds a bus at ``at_position``. .. rst-class:: classref-method -void **add_bus_effect** **(** :ref:`int` bus_idx, :ref:`AudioEffect` effect, :ref:`int` at_position=-1 **)** +|void| **add_bus_effect**\ (\ bus_idx\: :ref:`int`, effect\: :ref:`AudioEffect`, at_position\: :ref:`int` = -1\ ) :ref:`🔗` Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ``at_position``. @@ -316,7 +386,7 @@ Adds an :ref:`AudioEffect` effect to the bus ``bus_idx`` at ` .. rst-class:: classref-method -:ref:`AudioBusLayout` **generate_bus_layout** **(** **)** |const| +:ref:`AudioBusLayout` **generate_bus_layout**\ (\ ) |const| :ref:`🔗` Generates an :ref:`AudioBusLayout` using the available buses and effects. @@ -328,7 +398,7 @@ Generates an :ref:`AudioBusLayout` using the available bus .. rst-class:: classref-method -:ref:`int` **get_bus_channels** **(** :ref:`int` bus_idx **)** |const| +:ref:`int` **get_bus_channels**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the number of channels of the bus at index ``bus_idx``. @@ -340,7 +410,7 @@ Returns the number of channels of the bus at index ``bus_idx``. .. rst-class:: classref-method -:ref:`AudioEffect` **get_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** +:ref:`AudioEffect` **get_bus_effect**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`AudioEffect` at position ``effect_idx`` in bus ``bus_idx``. @@ -352,7 +422,7 @@ Returns the :ref:`AudioEffect` at position ``effect_idx`` in .. rst-class:: classref-method -:ref:`int` **get_bus_effect_count** **(** :ref:`int` bus_idx **)** +:ref:`int` **get_bus_effect_count**\ (\ bus_idx\: :ref:`int`\ ) :ref:`🔗` Returns the number of effects on the bus at ``bus_idx``. @@ -364,7 +434,7 @@ Returns the number of effects on the bus at ``bus_idx``. .. rst-class:: classref-method -:ref:`AudioEffectInstance` **get_bus_effect_instance** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` channel=0 **)** +:ref:`AudioEffectInstance` **get_bus_effect_instance**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, channel\: :ref:`int` = 0\ ) :ref:`🔗` Returns the :ref:`AudioEffectInstance` assigned to the given bus and effect indices (and optionally channel). @@ -376,7 +446,7 @@ Returns the :ref:`AudioEffectInstance` assigned to th .. rst-class:: classref-method -:ref:`int` **get_bus_index** **(** :ref:`StringName` bus_name **)** |const| +:ref:`int` **get_bus_index**\ (\ bus_name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the index of the bus with the name ``bus_name``. Returns ``-1`` if no bus with the specified name exist. @@ -388,7 +458,7 @@ Returns the index of the bus with the name ``bus_name``. Returns ``-1`` if no bu .. rst-class:: classref-method -:ref:`String` **get_bus_name** **(** :ref:`int` bus_idx **)** |const| +:ref:`String` **get_bus_name**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the name of the bus with the index ``bus_idx``. @@ -400,7 +470,7 @@ Returns the name of the bus with the index ``bus_idx``. .. rst-class:: classref-method -:ref:`float` **get_bus_peak_volume_left_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| +:ref:`float` **get_bus_peak_volume_left_db**\ (\ bus_idx\: :ref:`int`, channel\: :ref:`int`\ ) |const| :ref:`🔗` Returns the peak volume of the left speaker at bus index ``bus_idx`` and channel index ``channel``. @@ -412,7 +482,7 @@ Returns the peak volume of the left speaker at bus index ``bus_idx`` and channel .. rst-class:: classref-method -:ref:`float` **get_bus_peak_volume_right_db** **(** :ref:`int` bus_idx, :ref:`int` channel **)** |const| +:ref:`float` **get_bus_peak_volume_right_db**\ (\ bus_idx\: :ref:`int`, channel\: :ref:`int`\ ) |const| :ref:`🔗` Returns the peak volume of the right speaker at bus index ``bus_idx`` and channel index ``channel``. @@ -424,7 +494,7 @@ Returns the peak volume of the right speaker at bus index ``bus_idx`` and channe .. rst-class:: classref-method -:ref:`StringName` **get_bus_send** **(** :ref:`int` bus_idx **)** |const| +:ref:`StringName` **get_bus_send**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the name of the bus that the bus at index ``bus_idx`` sends to. @@ -436,7 +506,7 @@ Returns the name of the bus that the bus at index ``bus_idx`` sends to. .. rst-class:: classref-method -:ref:`float` **get_bus_volume_db** **(** :ref:`int` bus_idx **)** |const| +:ref:`float` **get_bus_volume_db**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the volume of the bus at index ``bus_idx`` in dB. @@ -448,7 +518,7 @@ Returns the volume of the bus at index ``bus_idx`` in dB. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_input_device_list** **(** **)** +:ref:`PackedStringArray` **get_input_device_list**\ (\ ) :ref:`🔗` Returns the names of all audio input devices detected on the system. @@ -462,7 +532,7 @@ Returns the names of all audio input devices detected on the system. .. rst-class:: classref-method -:ref:`float` **get_mix_rate** **(** **)** |const| +:ref:`float` **get_mix_rate**\ (\ ) |const| :ref:`🔗` Returns the sample rate at the output of the **AudioServer**. @@ -474,7 +544,7 @@ Returns the sample rate at the output of the **AudioServer**. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_output_device_list** **(** **)** +:ref:`PackedStringArray` **get_output_device_list**\ (\ ) :ref:`🔗` Returns the names of all audio output devices detected on the system. @@ -486,9 +556,11 @@ Returns the names of all audio output devices detected on the system. .. rst-class:: classref-method -:ref:`float` **get_output_latency** **(** **)** |const| +:ref:`float` **get_output_latency**\ (\ ) |const| :ref:`🔗` + +Returns the audio driver's effective output latency. This is based on :ref:`ProjectSettings.audio/driver/output_latency`, but the exact returned value will differ depending on the operating system and audio driver. -Returns the audio driver's output latency. +\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency` every frame. .. rst-class:: classref-item-separator @@ -498,7 +570,7 @@ Returns the audio driver's output latency. .. rst-class:: classref-method -:ref:`SpeakerMode` **get_speaker_mode** **(** **)** |const| +:ref:`SpeakerMode` **get_speaker_mode**\ (\ ) |const| :ref:`🔗` Returns the speaker configuration. @@ -510,7 +582,7 @@ Returns the speaker configuration. .. rst-class:: classref-method -:ref:`float` **get_time_since_last_mix** **(** **)** |const| +:ref:`float` **get_time_since_last_mix**\ (\ ) |const| :ref:`🔗` Returns the relative time since the last mix occurred. @@ -522,7 +594,7 @@ Returns the relative time since the last mix occurred. .. rst-class:: classref-method -:ref:`float` **get_time_to_next_mix** **(** **)** |const| +:ref:`float` **get_time_to_next_mix**\ (\ ) |const| :ref:`🔗` Returns the relative time until the next mix occurs. @@ -534,7 +606,7 @@ Returns the relative time until the next mix occurs. .. rst-class:: classref-method -:ref:`bool` **is_bus_bypassing_effects** **(** :ref:`int` bus_idx **)** |const| +:ref:`bool` **is_bus_bypassing_effects**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is bypassing effects. @@ -546,7 +618,7 @@ If ``true``, the bus at index ``bus_idx`` is bypassing effects. .. rst-class:: classref-method -:ref:`bool` **is_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** |const| +:ref:`bool` **is_bus_effect_enabled**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled. @@ -558,7 +630,7 @@ If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` .. rst-class:: classref-method -:ref:`bool` **is_bus_mute** **(** :ref:`int` bus_idx **)** |const| +:ref:`bool` **is_bus_mute**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is muted. @@ -570,7 +642,7 @@ If ``true``, the bus at index ``bus_idx`` is muted. .. rst-class:: classref-method -:ref:`bool` **is_bus_solo** **(** :ref:`int` bus_idx **)** |const| +:ref:`bool` **is_bus_solo**\ (\ bus_idx\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is in solo mode. @@ -578,11 +650,27 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode. ---- +.. _class_AudioServer_method_is_stream_registered_as_sample: + +.. rst-class:: classref-method + +:ref:`bool` **is_stream_registered_as_sample**\ (\ stream\: :ref:`AudioStream`\ ) :ref:`🔗` + +**Experimental:** This method may be changed or removed in future versions. + +If ``true``, the stream is registered as a sample. The engine will not have to register it before playing the sample. + +If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample`. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioServer_method_lock: .. rst-class:: classref-method -void **lock** **(** **)** +|void| **lock**\ (\ ) :ref:`🔗` Locks the audio driver's main loop. @@ -596,7 +684,7 @@ Locks the audio driver's main loop. .. rst-class:: classref-method -void **move_bus** **(** :ref:`int` index, :ref:`int` to_index **)** +|void| **move_bus**\ (\ index\: :ref:`int`, to_index\: :ref:`int`\ ) :ref:`🔗` Moves the bus from index ``index`` to index ``to_index``. @@ -604,11 +692,27 @@ Moves the bus from index ``index`` to index ``to_index``. ---- +.. _class_AudioServer_method_register_stream_as_sample: + +.. rst-class:: classref-method + +|void| **register_stream_as_sample**\ (\ stream\: :ref:`AudioStream`\ ) :ref:`🔗` + +**Experimental:** This method may be changed or removed in future versions. + +Forces the registration of a stream as a sample. + +\ **Note:** Lag spikes may occur when calling this method, especially on single-threaded builds. It is suggested to call this method while loading assets, where the lag spike could be masked, instead of registering the sample right before it needs to be played. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioServer_method_remove_bus: .. rst-class:: classref-method -void **remove_bus** **(** :ref:`int` index **)** +|void| **remove_bus**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Removes the bus at index ``index``. @@ -620,7 +724,7 @@ Removes the bus at index ``index``. .. rst-class:: classref-method -void **remove_bus_effect** **(** :ref:`int` bus_idx, :ref:`int` effect_idx **)** +|void| **remove_bus_effect**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`\ ) :ref:`🔗` Removes the effect at index ``effect_idx`` from the bus at index ``bus_idx``. @@ -632,7 +736,7 @@ Removes the effect at index ``effect_idx`` from the bus at index ``bus_idx``. .. rst-class:: classref-method -void **set_bus_bypass_effects** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +|void| **set_bus_bypass_effects**\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is bypassing effects. @@ -644,7 +748,7 @@ If ``true``, the bus at index ``bus_idx`` is bypassing effects. .. rst-class:: classref-method -void **set_bus_effect_enabled** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`bool` enabled **)** +|void| **set_bus_effect_enabled**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` is enabled. @@ -656,7 +760,7 @@ If ``true``, the effect at index ``effect_idx`` on the bus at index ``bus_idx`` .. rst-class:: classref-method -void **set_bus_layout** **(** :ref:`AudioBusLayout` bus_layout **)** +|void| **set_bus_layout**\ (\ bus_layout\: :ref:`AudioBusLayout`\ ) :ref:`🔗` Overwrites the currently used :ref:`AudioBusLayout`. @@ -668,7 +772,7 @@ Overwrites the currently used :ref:`AudioBusLayout`. .. rst-class:: classref-method -void **set_bus_mute** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +|void| **set_bus_mute**\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is muted. @@ -680,7 +784,7 @@ If ``true``, the bus at index ``bus_idx`` is muted. .. rst-class:: classref-method -void **set_bus_name** **(** :ref:`int` bus_idx, :ref:`String` name **)** +|void| **set_bus_name**\ (\ bus_idx\: :ref:`int`, name\: :ref:`String`\ ) :ref:`🔗` Sets the name of the bus at index ``bus_idx`` to ``name``. @@ -692,7 +796,7 @@ Sets the name of the bus at index ``bus_idx`` to ``name``. .. rst-class:: classref-method -void **set_bus_send** **(** :ref:`int` bus_idx, :ref:`StringName` send **)** +|void| **set_bus_send**\ (\ bus_idx\: :ref:`int`, send\: :ref:`StringName`\ ) :ref:`🔗` Connects the output of the bus at ``bus_idx`` to the bus named ``send``. @@ -704,7 +808,7 @@ Connects the output of the bus at ``bus_idx`` to the bus named ``send``. .. rst-class:: classref-method -void **set_bus_solo** **(** :ref:`int` bus_idx, :ref:`bool` enable **)** +|void| **set_bus_solo**\ (\ bus_idx\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, the bus at index ``bus_idx`` is in solo mode. @@ -716,7 +820,7 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode. .. rst-class:: classref-method -void **set_bus_volume_db** **(** :ref:`int` bus_idx, :ref:`float` volume_db **)** +|void| **set_bus_volume_db**\ (\ bus_idx\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`🔗` Sets the volume of the bus at index ``bus_idx`` to ``volume_db``. @@ -728,11 +832,11 @@ Sets the volume of the bus at index ``bus_idx`` to ``volume_db``. .. rst-class:: classref-method -void **set_enable_tagging_used_audio_streams** **(** :ref:`bool` enable **)** +|void| **set_enable_tagging_used_audio_streams**\ (\ enable\: :ref:`bool`\ ) :ref:`🔗` -.. container:: contribute +If set to ``true``, all instances of :ref:`AudioStreamPlayback` will call :ref:`AudioStreamPlayback._tag_used_streams` every mix step. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews. .. rst-class:: classref-item-separator @@ -742,7 +846,7 @@ void **set_enable_tagging_used_audio_streams** **(** :ref:`bool` ena .. rst-class:: classref-method -void **swap_bus_effects** **(** :ref:`int` bus_idx, :ref:`int` effect_idx, :ref:`int` by_effect_idx **)** +|void| **swap_bus_effects**\ (\ bus_idx\: :ref:`int`, effect_idx\: :ref:`int`, by_effect_idx\: :ref:`int`\ ) :ref:`🔗` Swaps the position of two effects in bus ``bus_idx``. @@ -754,7 +858,7 @@ Swaps the position of two effects in bus ``bus_idx``. .. rst-class:: classref-method -void **unlock** **(** **)** +|void| **unlock**\ (\ ) :ref:`🔗` Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) @@ -765,3 +869,4 @@ Unlocks the audio driver's main loop. (After locking it, you should always unloc .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 1abf82d5441..00ef203ba4d 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -12,7 +12,7 @@ AudioStream **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamWAV` +**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamInteractive`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPlaylist`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamSynchronized`, :ref:`AudioStreamWAV` Base class for audio streams. @@ -30,11 +30,11 @@ Tutorials - :doc:`Audio streams <../tutorials/audio/audio_streams>` -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -44,25 +44,50 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_beat_count` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_bpm` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_length` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_stream_name` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_monophonic` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_length` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_monophonic` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_beat_count`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_bpm`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_length`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_parameter_list`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_monophonic`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_be_sampled`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioSample` | :ref:`generate_sample`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_length`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_meta_stream`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_monophonic`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_AudioStream_signal_parameter_list_changed: + +.. rst-class:: classref-signal + +**parameter_list_changed**\ (\ ) :ref:`🔗` + +Signal to be emitted to notify when the parameter list changed. .. rst-class:: classref-section-separator @@ -73,85 +98,117 @@ Methods Method Descriptions ------------------- -.. _class_AudioStream_method__get_beat_count: +.. _class_AudioStream_private_method__get_beat_count: .. rst-class:: classref-method -:ref:`int` **_get_beat_count** **(** **)** |virtual| |const| +:ref:`int` **_get_beat_count**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Ideally, the returned value should be based off the stream's sample rate (:ref:`AudioStreamWAV.mix_rate`, for example). .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_bpm: +.. _class_AudioStream_private_method__get_bpm: .. rst-class:: classref-method -:ref:`float` **_get_bpm** **(** **)** |virtual| |const| +:ref:`float` **_get_bpm**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Ideally, the returned value should be based off the stream's sample rate (:ref:`AudioStreamWAV.mix_rate`, for example). .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_length: +.. _class_AudioStream_private_method__get_length: .. rst-class:: classref-method -:ref:`float` **_get_length** **(** **)** |virtual| |const| +:ref:`float` **_get_length**\ (\ ) |virtual| |const| :ref:`🔗` + +Override this method to customize the returned value of :ref:`get_length`. Should return the length of this audio stream, in seconds. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStream_private_method__get_parameter_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Dictionary`\] **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`🔗` + +Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see :ref:`Object.get_property_list`). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStream_private_method__get_stream_name: + +.. rst-class:: classref-method -.. container:: contribute +:ref:`String` **_get_stream_name**\ (\ ) |virtual| |const| :ref:`🔗` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Override this method to customize the name assigned to this audio stream. Unused by the engine. .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_stream_name: +.. _class_AudioStream_private_method__instantiate_playback: .. rst-class:: classref-method -:ref:`String` **_get_stream_name** **(** **)** |virtual| |const| +:ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Override this method to customize the returned value of :ref:`instantiate_playback`. Should returned a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`).. - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStream_private_method__is_monophonic: + +.. rst-class:: classref-method + +:ref:`bool` **_is_monophonic**\ (\ ) |virtual| |const| :ref:`🔗` + +Override this method to customize the returned value of :ref:`is_monophonic`. Should return ``true`` if this audio stream only supports one channel. .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__instantiate_playback: +.. _class_AudioStream_method_can_be_sampled: .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **_instantiate_playback** **(** **)** |virtual| |const| +:ref:`bool` **can_be_sampled**\ (\ ) |const| :ref:`🔗` -.. container:: contribute +**Experimental:** This method may be changed or removed in future versions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns if the current **AudioStream** can be used as a sample. Only static streams can be sampled. .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__is_monophonic: +.. _class_AudioStream_method_generate_sample: .. rst-class:: classref-method -:ref:`bool` **_is_monophonic** **(** **)** |virtual| |const| +:ref:`AudioSample` **generate_sample**\ (\ ) |const| :ref:`🔗` -.. container:: contribute +**Experimental:** This method may be changed or removed in future versions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Generates an :ref:`AudioSample` based on the current stream. .. rst-class:: classref-item-separator @@ -161,7 +218,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_length** **(** **)** |const| +:ref:`float` **get_length**\ (\ ) |const| :ref:`🔗` Returns the length of the audio stream in seconds. @@ -173,9 +230,21 @@ Returns the length of the audio stream in seconds. .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **instantiate_playback** **(** **)** +:ref:`AudioStreamPlayback` **instantiate_playback**\ (\ ) :ref:`🔗` + +Returns a newly created :ref:`AudioStreamPlayback` intended to play this audio stream. Useful for when you want to extend :ref:`_instantiate_playback` but call :ref:`instantiate_playback` from an internally held AudioStream subresource. An example of this can be found in the source code for ``AudioStreamRandomPitch::instantiate_playback``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStream_method_is_meta_stream: + +.. rst-class:: classref-method + +:ref:`bool` **is_meta_stream**\ (\ ) |const| :ref:`🔗` -Returns an AudioStreamPlayback. Useful for when you want to extend :ref:`_instantiate_playback` but call :ref:`instantiate_playback` from an internally held AudioStream subresource. An example of this can be found in the source files for ``AudioStreamRandomPitch::instantiate_playback``. +Returns ``true`` if the stream is a collection of other streams, ``false`` otherwise. .. rst-class:: classref-item-separator @@ -185,9 +254,9 @@ Returns an AudioStreamPlayback. Useful for when you want to extend :ref:`_instan .. rst-class:: classref-method -:ref:`bool` **is_monophonic** **(** **)** |const| +:ref:`bool` **is_monophonic**\ (\ ) |const| :ref:`🔗` -Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony. +Returns ``true`` if this audio stream only supports one channel (*monophony*), or ``false`` if the audio stream supports two or more channels (*polyphony*). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -196,3 +265,4 @@ Returns true if this audio stream only supports monophonic playback, or false if .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index d6928f2bd88..eaa588a52f6 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -23,7 +23,10 @@ Description Here's a sample on how to use it to generate a sine wave: -:: + +.. tabs:: + + .. code-tab:: gdscript var playback # Will hold the AudioStreamGeneratorPlayback. @onready var sample_hz = $AudioStreamPlayer.stream.mix_rate @@ -43,6 +46,40 @@ Here's a sample on how to use it to generate a sine wave: playback.push_frame(Vector2.ONE * sin(phase * TAU)) phase = fmod(phase + increment, 1.0) + .. code-tab:: csharp + + [Export] public AudioStreamPlayer Player { get; set; } + + private AudioStreamGeneratorPlayback _playback; // Will hold the AudioStreamGeneratorPlayback. + private float _sampleHz; + private float _pulseHz = 440.0f; // The frequency of the sound wave. + + public override void _Ready() + { + if (Player.Stream is AudioStreamGenerator generator) // Type as a generator to access MixRate. + { + _sampleHz = generator.MixRate; + Player.Play(); + _playback = (AudioStreamGeneratorPlayback)Player.GetStreamPlayback(); + FillBuffer(); + } + } + + public void FillBuffer() + { + double phase = 0.0; + float increment = _pulseHz / _sampleHz; + int framesAvailable = _playback.GetFramesAvailable(); + + for (int i = 0; i < framesAvailable; i++) + { + _playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau)); + phase = Mathf.PosMod(phase + increment, 1.0); + } + } + + + In the example above, the "AudioStreamPlayer" node must use an **AudioStreamGenerator** as its stream. The ``fill_buffer`` function provides audio data for approximating a sine wave. See also :ref:`AudioEffectSpectrumAnalyzer` for performing real-time audio spectrum analysis. @@ -54,7 +91,7 @@ See also :ref:`AudioEffectSpectrumAnalyzer` f Tutorials --------- -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ .. rst-class:: classref-reftable-group @@ -83,12 +120,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **buffer_length** = ``0.5`` +:ref:`float` **buffer_length** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_buffer_length** **(** :ref:`float` value **)** -- :ref:`float` **get_buffer_length** **(** **)** +- |void| **set_buffer_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_buffer_length**\ (\ ) The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up. @@ -100,12 +137,12 @@ The length of the buffer to generate (in seconds). Lower values result in less l .. rst-class:: classref-property -:ref:`float` **mix_rate** = ``44100.0`` +:ref:`float` **mix_rate** = ``44100.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mix_rate** **(** :ref:`float` value **)** -- :ref:`float` **get_mix_rate** **(** **)** +- |void| **set_mix_rate**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mix_rate**\ (\ ) The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality. @@ -120,3 +157,4 @@ According to the `Nyquist-Shannon sampling theorem `__ +- `Audio Generator Demo `__ - `Godot 3.2 will get new audio features `__ @@ -38,19 +38,19 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_push_buffer` **(** :ref:`int` amount **)** |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_buffer` **(** **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_frames_available` **(** **)** |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_skips` **(** **)** |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`push_buffer` **(** :ref:`PackedVector2Array` frames **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`push_frame` **(** :ref:`Vector2` frame **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_push_buffer`\ (\ amount\: :ref:`int`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_buffer`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_frames_available`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_skips`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_buffer`\ (\ frames\: :ref:`PackedVector2Array`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`push_frame`\ (\ frame\: :ref:`Vector2`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -65,7 +65,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **can_push_buffer** **(** :ref:`int` amount **)** |const| +:ref:`bool` **can_push_buffer**\ (\ amount\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if a buffer of the size ``amount`` can be pushed to the audio sample data buffer without overflowing it, ``false`` otherwise. @@ -77,7 +77,7 @@ Returns ``true`` if a buffer of the size ``amount`` can be pushed to the audio s .. rst-class:: classref-method -void **clear_buffer** **(** **)** +|void| **clear_buffer**\ (\ ) :ref:`🔗` Clears the audio sample data buffer. @@ -89,7 +89,7 @@ Clears the audio sample data buffer. .. rst-class:: classref-method -:ref:`int` **get_frames_available** **(** **)** |const| +:ref:`int` **get_frames_available**\ (\ ) |const| :ref:`🔗` Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is ``0``, the buffer is full. @@ -101,11 +101,9 @@ Returns the number of frames that can be pushed to the audio sample data buffer .. rst-class:: classref-method -:ref:`int` **get_skips** **(** **)** |const| +:ref:`int` **get_skips**\ (\ ) |const| :ref:`🔗` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the number of times the playback skipped due to a buffer underrun in the audio sample data. This value is reset at the start of the playback. .. rst-class:: classref-item-separator @@ -115,7 +113,7 @@ Returns the number of frames that can be pushed to the audio sample data buffer .. rst-class:: classref-method -:ref:`bool` **push_buffer** **(** :ref:`PackedVector2Array` frames **)** +:ref:`bool` **push_buffer**\ (\ frames\: :ref:`PackedVector2Array`\ ) :ref:`🔗` Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame` in C# and compiled languages via GDExtension, but :ref:`push_buffer` may be *less* efficient in GDScript. @@ -127,7 +125,7 @@ Pushes several audio data frames to the buffer. This is usually more efficient t .. rst-class:: classref-method -:ref:`bool` **push_frame** **(** :ref:`Vector2` frame **)** +:ref:`bool` **push_frame**\ (\ frame\: :ref:`Vector2`\ ) :ref:`🔗` Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer` in C# and compiled languages via GDExtension, but :ref:`push_frame` may be *more* efficient in GDScript. @@ -138,3 +136,4 @@ Pushes a single audio data frame to the buffer. This is usually less efficient t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst new file mode 100644 index 00000000000..02e2635cee1 --- /dev/null +++ b/classes/class_audiostreaminteractive.rst @@ -0,0 +1,555 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamInteractive.xml. + +.. _class_AudioStreamInteractive: + +AudioStreamInteractive +====================== + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Audio stream that can playback music interactively, combining clips and a transition table. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and the transition rules via the :ref:`add_transition`. Additionally, this stream export a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. + +The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`clip_count` | ``0`` | + +-----------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`initial_clip` | ``0`` | + +-----------------------+-------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`, from_time\: :ref:`TransitionFromTime`, to_time\: :ref:`TransitionToTime`, fade_mode\: :ref:`FadeMode`, fade_beats\: :ref:`float`, use_filler_clip\: :ref:`bool` = false, filler_clip\: :ref:`int` = -1, hold_previous\: :ref:`bool` = false\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutoAdvanceMode` | :ref:`get_clip_auto_advance`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_clip_auto_advance_next_clip`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_clip_name`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_clip_stream`\ (\ clip_index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_transition_fade_beats`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FadeMode` | :ref:`get_transition_fade_mode`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_transition_filler_clip`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransitionFromTime` | :ref:`get_transition_from_time`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_transition_list`\ (\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransitionToTime` | :ref:`get_transition_to_time`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_transition`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transition_holding_previous`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transition_using_filler_clip`\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_auto_advance`\ (\ clip_index\: :ref:`int`, mode\: :ref:`AutoAdvanceMode`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_auto_advance_next_clip`\ (\ clip_index\: :ref:`int`, auto_advance_next_clip\: :ref:`int`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_name`\ (\ clip_index\: :ref:`int`, name\: :ref:`StringName`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_clip_stream`\ (\ clip_index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) | + +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_AudioStreamInteractive_TransitionFromTime: + +.. rst-class:: classref-enumeration + +enum **TransitionFromTime**: :ref:`🔗` + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_IMMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_IMMEDIATE** = ``0`` + +Start transition as soon as possible, don't wait for any specific time position. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BEAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_NEXT_BEAT** = ``1`` + +Transition when the clip playback position reaches the next beat. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_NEXT_BAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_NEXT_BAR** = ``2`` + +Transition when the clip playback position reaches the next bar. + +.. _class_AudioStreamInteractive_constant_TRANSITION_FROM_TIME_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionFromTime` **TRANSITION_FROM_TIME_END** = ``3`` + +Transition when the current clip finished playing. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_TransitionToTime: + +.. rst-class:: classref-enumeration + +enum **TransitionToTime**: :ref:`🔗` + +.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_SAME_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionToTime` **TRANSITION_TO_TIME_SAME_POSITION** = ``0`` + +Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them. + +.. _class_AudioStreamInteractive_constant_TRANSITION_TO_TIME_START: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransitionToTime` **TRANSITION_TO_TIME_START** = ``1`` + +Transition to the start of the destination clip. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_FadeMode: + +.. rst-class:: classref-enumeration + +enum **FadeMode**: :ref:`🔗` + +.. _class_AudioStreamInteractive_constant_FADE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_DISABLED** = ``0`` + +Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end. + +.. _class_AudioStreamInteractive_constant_FADE_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_IN** = ``1`` + +Use a fade-in in the next clip, let the current clip finish. + +.. _class_AudioStreamInteractive_constant_FADE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_OUT** = ``2`` + +Use a fade-out in the current clip, the next clip will start by itself. + +.. _class_AudioStreamInteractive_constant_FADE_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_CROSS** = ``3`` + +Use a cross-fade between clips. + +.. _class_AudioStreamInteractive_constant_FADE_AUTOMATIC: + +.. rst-class:: classref-enumeration-constant + +:ref:`FadeMode` **FADE_AUTOMATIC** = ``4`` + +Use automatic fade logic depending on the transition from/to. It is recommended to use this by default. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AudioStreamInteractive_AutoAdvanceMode: + +.. rst-class:: classref-enumeration + +enum **AutoAdvanceMode**: :ref:`🔗` + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_DISABLED** = ``0`` + +Disable auto-advance (default). + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_ENABLED** = ``1`` + +Enable auto-advance, a clip must be specified. + +.. _class_AudioStreamInteractive_constant_AUTO_ADVANCE_RETURN_TO_HOLD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoAdvanceMode` **AUTO_ADVANCE_RETURN_TO_HOLD** = ``2`` + +Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamInteractive_constant_CLIP_ANY: + +.. rst-class:: classref-constant + +**CLIP_ANY** = ``-1`` :ref:`🔗` + +This constant describes that any clip is valid for a specific transition as either source or destination. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamInteractive_property_clip_count: + +.. rst-class:: classref-property + +:ref:`int` **clip_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_clip_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_clip_count**\ (\ ) + +Amount of clips contained in this interactive player. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_property_initial_clip: + +.. rst-class:: classref-property + +:ref:`int` **initial_clip** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_initial_clip**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_initial_clip**\ (\ ) + +Index of the initial clip, which will be played first when this stream is played. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamInteractive_method_add_transition: + +.. rst-class:: classref-method + +|void| **add_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`, from_time\: :ref:`TransitionFromTime`, to_time\: :ref:`TransitionToTime`, fade_mode\: :ref:`FadeMode`, fade_beats\: :ref:`float`, use_filler_clip\: :ref:`bool` = false, filler_clip\: :ref:`int` = -1, hold_previous\: :ref:`bool` = false\ ) :ref:`🔗` + +Add a transition between two clips. Provide the indices of the source and destination clips, or use the :ref:`CLIP_ANY` constant to indicate that transition happens to/from any clip to this one. + +\* ``from_time`` indicates the moment in the current clip the transition will begin after triggered. + +\* ``to_time`` indicates the time in the next clip that the playback will start from. + +\* ``fade_mode`` indicates how the fade will happen between clips. If unsure, just use :ref:`FADE_AUTOMATIC` which uses the most common type of fade for each situation. + +\* ``fade_beats`` indicates how many beats the fade will take. Using decimals is allowed. + +\* ``use_filler_clip`` indicates that there will be a filler clip used between the source and destination clips. + +\* ``filler_clip`` the index of the filler clip. + +\* If ``hold_previous`` is used, then this clip will be remembered. This can be used together with :ref:`AUTO_ADVANCE_RETURN_TO_HOLD` to return to this clip after another is done playing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_erase_transition: + +.. rst-class:: classref-method + +|void| **erase_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) :ref:`🔗` + +Erase a transition by providing ``from_clip`` and ``to_clip`` clip indices. :ref:`CLIP_ANY` can be used for either argument or both. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_auto_advance: + +.. rst-class:: classref-method + +:ref:`AutoAdvanceMode` **get_clip_auto_advance**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_auto_advance_next_clip: + +.. rst-class:: classref-method + +:ref:`int` **get_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the clip towards which the clip referenced by ``clip_index`` will auto-advance to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_name: + +.. rst-class:: classref-method + +:ref:`StringName` **get_clip_name**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the name of a clip. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_clip_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_clip_stream**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the :ref:`AudioStream` associated with a clip. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_fade_beats: + +.. rst-class:: classref-method + +:ref:`float` **get_transition_fade_beats**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the time (in beats) for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_fade_mode: + +.. rst-class:: classref-method + +:ref:`FadeMode` **get_transition_fade_mode**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the mode for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_filler_clip: + +.. rst-class:: classref-method + +:ref:`int` **get_transition_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the filler clip for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_from_time: + +.. rst-class:: classref-method + +:ref:`TransitionFromTime` **get_transition_from_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the source time position for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_list: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array` **get_transition_list**\ (\ ) |const| :ref:`🔗` + +Return the list of transitions (from, to interleaved). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_get_transition_to_time: + +.. rst-class:: classref-method + +:ref:`TransitionToTime` **get_transition_to_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return the destination time position for a transition (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_has_transition: + +.. rst-class:: classref-method + +:ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return true if a given transition exists (was added via :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_is_transition_holding_previous: + +.. rst-class:: classref-method + +:ref:`bool` **is_transition_holding_previous**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_is_transition_using_filler_clip: + +.. rst-class:: classref-method + +:ref:`bool` **is_transition_using_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` + +Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_auto_advance: + +.. rst-class:: classref-method + +|void| **set_clip_auto_advance**\ (\ clip_index\: :ref:`int`, mode\: :ref:`AutoAdvanceMode`\ ) :ref:`🔗` + +Set whether a clip will auto-advance by changing the auto-advance mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_auto_advance_next_clip: + +.. rst-class:: classref-method + +|void| **set_clip_auto_advance_next_clip**\ (\ clip_index\: :ref:`int`, auto_advance_next_clip\: :ref:`int`\ ) :ref:`🔗` + +Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_name: + +.. rst-class:: classref-method + +|void| **set_clip_name**\ (\ clip_index\: :ref:`int`, name\: :ref:`StringName`\ ) :ref:`🔗` + +Set the name of the current clip (for easier identification). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamInteractive_method_set_clip_stream: + +.. rst-class:: classref-method + +|void| **set_clip_stream**\ (\ clip_index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) :ref:`🔗` + +Set the :ref:`AudioStream` associated with the current clip. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreammicrophone.rst b/classes/class_audiostreammicrophone.rst index a12bee0020a..c90316ec693 100644 --- a/classes/class_audiostreammicrophone.rst +++ b/classes/class_audiostreammicrophone.rst @@ -28,6 +28,8 @@ When used directly in an :ref:`AudioStreamPlayer` node, Tutorials --------- +- :doc:`Recording with microphone <../tutorials/audio/recording_with_microphone>` + - `Audio Mic Record Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` @@ -37,3 +39,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index a44449ee97b..9fb45d8369f 100644 --- a/classes/class_audiostreammp3.rst +++ b/classes/class_audiostreammp3.rst @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bar_beats** = ``4`` +:ref:`int` **bar_beats** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bar_beats** **(** :ref:`int` value **)** -- :ref:`int` **get_bar_beats** **(** **)** +- |void| **set_bar_beats**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_bar_beats**\ (\ ) .. container:: contribute @@ -75,12 +75,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **beat_count** = ``0`` +:ref:`int` **beat_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_beat_count** **(** :ref:`int` value **)** -- :ref:`int` **get_beat_count** **(** **)** +- |void| **set_beat_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_beat_count**\ (\ ) .. container:: contribute @@ -94,12 +94,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bpm** = ``0.0`` +:ref:`float` **bpm** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bpm** **(** :ref:`float` value **)** -- :ref:`float` **get_bpm** **(** **)** +- |void| **set_bpm**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_bpm**\ (\ ) .. container:: contribute @@ -113,12 +113,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray` **data** = ``PackedByteArray()`` +:ref:`PackedByteArray` **data** = ``PackedByteArray()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_data** **(** :ref:`PackedByteArray` value **)** -- :ref:`PackedByteArray` **get_data** **(** **)** +- |void| **set_data**\ (\ value\: :ref:`PackedByteArray`\ ) +- :ref:`PackedByteArray` **get_data**\ (\ ) Contains the audio data in bytes. @@ -147,6 +147,8 @@ You can load a file without having to import it beforehand using the code snippe +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -155,12 +157,12 @@ You can load a file without having to import it beforehand using the code snippe .. rst-class:: classref-property -:ref:`bool` **loop** = ``false`` +:ref:`bool` **loop** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool` value **)** -- :ref:`bool` **has_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_loop**\ (\ ) If ``true``, the stream will automatically loop when it reaches the end. @@ -172,12 +174,12 @@ If ``true``, the stream will automatically loop when it reaches the end. .. rst-class:: classref-property -:ref:`float` **loop_offset** = ``0.0`` +:ref:`float` **loop_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_loop_offset** **(** **)** +- |void| **set_loop_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_loop_offset**\ (\ ) Time in seconds at which the stream starts after being looped. @@ -188,3 +190,4 @@ Time in seconds at which the stream starts after being looped. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index c52a92a93d6..7fabed67ccd 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -12,9 +12,21 @@ AudioStreamOggVorbis **Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -.. container:: contribute +A class representing an Ogg Vorbis audio stream. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The AudioStreamOggVorbis class is a specialized :ref:`AudioStream` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the :ref:`AudioStreamWAV` class. - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group @@ -38,6 +50,20 @@ Properties | :ref:`OggPacketSequence` | :ref:`packet_sequence` | | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis` | :ref:`load_from_buffer`\ (\ buffer\: :ref:`PackedByteArray`\ ) |static| | + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis` | :ref:`load_from_file`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -51,12 +77,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bar_beats** = ``4`` +:ref:`int` **bar_beats** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bar_beats** **(** :ref:`int` value **)** -- :ref:`int` **get_bar_beats** **(** **)** +- |void| **set_bar_beats**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_bar_beats**\ (\ ) .. container:: contribute @@ -70,12 +96,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **beat_count** = ``0`` +:ref:`int` **beat_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_beat_count** **(** :ref:`int` value **)** -- :ref:`int` **get_beat_count** **(** **)** +- |void| **set_beat_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_beat_count**\ (\ ) .. container:: contribute @@ -89,12 +115,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bpm** = ``0.0`` +:ref:`float` **bpm** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bpm** **(** :ref:`float` value **)** -- :ref:`float` **get_bpm** **(** **)** +- |void| **set_bpm**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_bpm**\ (\ ) .. container:: contribute @@ -108,12 +134,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **loop** = ``false`` +:ref:`bool` **loop** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool` value **)** -- :ref:`bool` **has_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_loop**\ (\ ) If ``true``, the audio will play again from the specified :ref:`loop_offset` once it is done playing. Useful for ambient sounds and background music. @@ -125,12 +151,12 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset` **loop_offset** = ``0.0`` +:ref:`float` **loop_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_loop_offset** **(** **)** +- |void| **set_loop_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_loop_offset**\ (\ ) Time in seconds at which the stream starts after being looped. @@ -142,15 +168,44 @@ Time in seconds at which the stream starts after being looped. .. rst-class:: classref-property -:ref:`OggPacketSequence` **packet_sequence** +:ref:`OggPacketSequence` **packet_sequence** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_packet_sequence** **(** :ref:`OggPacketSequence` value **)** -- :ref:`OggPacketSequence` **get_packet_sequence** **(** **)** +- |void| **set_packet_sequence**\ (\ value\: :ref:`OggPacketSequence`\ ) +- :ref:`OggPacketSequence` **get_packet_sequence**\ (\ ) Contains the raw Ogg data for this stream. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamOggVorbis_method_load_from_buffer: + +.. rst-class:: classref-method + +:ref:`AudioStreamOggVorbis` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray`\ ) |static| :ref:`🔗` + +Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamOggVorbis_method_load_from_file: + +.. rst-class:: classref-method + +:ref:`AudioStreamOggVorbis` **load_from_file**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` + +Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -158,3 +213,4 @@ Contains the raw Ogg data for this stream. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 1b1b8f52bd5..76f12f3987b 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -12,7 +12,7 @@ AudioStreamPlayback **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled` +**Inherited By:** :ref:`AudioStreamPlaybackInteractive`, :ref:`AudioStreamPlaybackPlaylist`, :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled`, :ref:`AudioStreamPlaybackSynchronized` Meta class for playing back audio. @@ -28,7 +28,7 @@ Can play, loop, pause a scroll through audio. See :ref:`AudioStream`__ +- `Audio Generator Demo `__ .. rst-class:: classref-reftable-group @@ -38,23 +38,31 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_loop_count` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix` **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_seek` **(** :ref:`float` position **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_start` **(** :ref:`float` from_pos **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stop` **(** **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tag_used_streams` **(** **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_loop_count`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_seek`\ (\ position\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_stop`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -65,113 +73,151 @@ Methods Method Descriptions ------------------- -.. _class_AudioStreamPlayback_method__get_loop_count: +.. _class_AudioStreamPlayback_private_method__get_loop_count: .. rst-class:: classref-method -:ref:`int` **_get_loop_count** **(** **)** |virtual| |const| +:ref:`int` **_get_loop_count**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return ``0``. - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_private_method__get_parameter: + +.. rst-class:: classref-method + +:ref:`Variant` **_get_parameter**\ (\ name\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` + +Return the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__get_playback_position: +.. _class_AudioStreamPlayback_private_method__get_playback_position: .. rst-class:: classref-method -:ref:`float` **_get_playback_position** **(** **)** |virtual| |const| +:ref:`float` **_get_playback_position**\ (\ ) |virtual| |const| :ref:`🔗` -.. container:: contribute +Overridable method. Should return the current progress along the audio stream, in seconds. - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_private_method__is_playing: + +.. rst-class:: classref-method + +:ref:`bool` **_is_playing**\ (\ ) |virtual| |const| :ref:`🔗` + +Overridable method. Should return ``true`` if this playback is active and playing its audio stream. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__is_playing: +.. _class_AudioStreamPlayback_private_method__mix: .. rst-class:: classref-method -:ref:`bool` **_is_playing** **(** **)** |virtual| |const| +:ref:`int` **_mix**\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| :ref:`🔗` -.. container:: contribute +Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. - There is currently no description for this method. Please help us by :ref:`contributing one `! +\ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__mix: +.. _class_AudioStreamPlayback_private_method__seek: .. rst-class:: classref-method -:ref:`int` **_mix** **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| - -.. container:: contribute +|void| **_seek**\ (\ position\: :ref:`float`\ ) |virtual| :ref:`🔗` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Override this method to customize what happens when seeking this audio stream at the given ``position``, such as by calling :ref:`AudioStreamPlayer.seek`. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__seek: +.. _class_AudioStreamPlayback_private_method__set_parameter: .. rst-class:: classref-method -void **_seek** **(** :ref:`float` position **)** |virtual| +|void| **_set_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| :ref:`🔗` -.. container:: contribute +Set the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_private_method__start: + +.. rst-class:: classref-method + +|void| **_start**\ (\ from_pos\: :ref:`float`\ ) |virtual| :ref:`🔗` + +Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play`. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__start: +.. _class_AudioStreamPlayback_private_method__stop: .. rst-class:: classref-method -void **_start** **(** :ref:`float` from_pos **)** |virtual| +|void| **_stop**\ (\ ) |virtual| :ref:`🔗` + +Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayback_private_method__tag_used_streams: + +.. rst-class:: classref-method -.. container:: contribute +|void| **_tag_used_streams**\ (\ ) |virtual| :ref:`🔗` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Overridable method. Called whenever the audio stream is mixed if the playback is active and :ref:`AudioServer.set_enable_tagging_used_audio_streams` has been set to ``true``. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__stop: +.. _class_AudioStreamPlayback_method_get_sample_playback: .. rst-class:: classref-method -void **_stop** **(** **)** |virtual| +:ref:`AudioSamplePlayback` **get_sample_playback**\ (\ ) |const| :ref:`🔗` -.. container:: contribute +**Experimental:** This method may be changed or removed in future versions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Returns the :ref:`AudioSamplePlayback` associated with this **AudioStreamPlayback** for playing back the audio sample of this stream. .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__tag_used_streams: +.. _class_AudioStreamPlayback_method_set_sample_playback: .. rst-class:: classref-method -void **_tag_used_streams** **(** **)** |virtual| +|void| **set_sample_playback**\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) :ref:`🔗` -.. container:: contribute +**Experimental:** This method may be changed or removed in future versions. - There is currently no description for this method. Please help us by :ref:`contributing one `! +Associates :ref:`AudioSamplePlayback` to this **AudioStreamPlayback** for playing back the audio sample of this stream. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -180,3 +226,4 @@ void **_tag_used_streams** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst new file mode 100644 index 00000000000..8b9d9a6f496 --- /dev/null +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -0,0 +1,74 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackInteractive.xml. + +.. _class_AudioStreamPlaybackInteractive: + +AudioStreamPlaybackInteractive +============================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +Playback component of :ref:`AudioStreamInteractive`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Playback component of :ref:`AudioStreamInteractive`. Contains functions to change the currently played clip. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip`\ (\ clip_index\: :ref:`int`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`switch_to_clip_by_name`\ (\ clip_name\: :ref:`StringName`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip: + +.. rst-class:: classref-method + +|void| **switch_to_clip**\ (\ clip_index\: :ref:`int`\ ) :ref:`🔗` + +Switch to a clip (by index). + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaybackInteractive_method_switch_to_clip_by_name: + +.. rst-class:: classref-method + +|void| **switch_to_clip_by_name**\ (\ clip_name\: :ref:`StringName`\ ) :ref:`🔗` + +Switch to a clip (by name). + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackoggvorbis.rst b/classes/class_audiostreamplaybackoggvorbis.rst index 173b7775fd7..dc0f2c757a3 100644 --- a/classes/class_audiostreamplaybackoggvorbis.rst +++ b/classes/class_audiostreamplaybackoggvorbis.rst @@ -23,3 +23,4 @@ AudioStreamPlaybackOggVorbis .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackplaylist.rst b/classes/class_audiostreamplaybackplaylist.rst new file mode 100644 index 00000000000..6c5a3c836fd --- /dev/null +++ b/classes/class_audiostreamplaybackplaylist.rst @@ -0,0 +1,24 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackPlaylist.xml. + +.. _class_AudioStreamPlaybackPlaylist: + +AudioStreamPlaybackPlaylist +=========================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +Playback class used for :ref:`AudioStreamPlaylist`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 9f464c00677..c6d5c216ea8 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -29,17 +29,17 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_stream_playing` **(** :ref:`int` stream **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`play_stream` **(** :ref:`AudioStream` stream, :ref:`float` from_offset=0, :ref:`float` volume_db=0, :ref:`float` pitch_scale=1.0 **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream_pitch_scale` **(** :ref:`int` stream, :ref:`float` pitch_scale **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream_volume` **(** :ref:`int` stream, :ref:`float` volume_db **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_stream` **(** :ref:`int` stream **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_stream_playing`\ (\ stream\: :ref:`int`\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`play_stream`\ (\ stream\: :ref:`AudioStream`, from_offset\: :ref:`float` = 0, volume_db\: :ref:`float` = 0, pitch_scale\: :ref:`float` = 1.0, playback_type\: :ref:`PlaybackType` = 0, bus\: :ref:`StringName` = &"Master"\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stream_pitch_scale`\ (\ stream\: :ref:`int`, pitch_scale\: :ref:`float`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stream_volume`\ (\ stream\: :ref:`int`, volume_db\: :ref:`float`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_stream`\ (\ stream\: :ref:`int`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,7 +54,7 @@ Constants .. rst-class:: classref-constant -**INVALID_ID** = ``-1`` +**INVALID_ID** = ``-1`` :ref:`🔗` Returned by :ref:`play_stream` in case it could not allocate a stream for playback. @@ -71,7 +71,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **is_stream_playing** **(** :ref:`int` stream **)** |const| +:ref:`bool` **is_stream_playing**\ (\ stream\: :ref:`int`\ ) |const| :ref:`🔗` Return true whether the stream associated with an integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. @@ -83,9 +83,9 @@ Return true whether the stream associated with an integer ID is still playing. C .. rst-class:: classref-method -:ref:`int` **play_stream** **(** :ref:`AudioStream` stream, :ref:`float` from_offset=0, :ref:`float` volume_db=0, :ref:`float` pitch_scale=1.0 **)** +:ref:`int` **play_stream**\ (\ stream\: :ref:`AudioStream`, from_offset\: :ref:`float` = 0, volume_db\: :ref:`float` = 0, pitch_scale\: :ref:`float` = 1.0, playback_type\: :ref:`PlaybackType` = 0, bus\: :ref:`StringName` = &"Master"\ ) :ref:`🔗` -Play an :ref:`AudioStream` at a given offset, volume and pitch scale. Playback starts immediately. +Play an :ref:`AudioStream` at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. @@ -101,7 +101,7 @@ This function returns :ref:`INVALID_ID` stream, :ref:`float` pitch_scale **)** +|void| **set_stream_pitch_scale**\ (\ stream\: :ref:`int`, pitch_scale\: :ref:`float`\ ) :ref:`🔗` Change the stream pitch scale. The ``stream`` argument is an integer ID returned by :ref:`play_stream`. @@ -113,7 +113,7 @@ Change the stream pitch scale. The ``stream`` argument is an integer ID returned .. rst-class:: classref-method -void **set_stream_volume** **(** :ref:`int` stream, :ref:`float` volume_db **)** +|void| **set_stream_volume**\ (\ stream\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`🔗` Change the stream volume (in db). The ``stream`` argument is an integer ID returned by :ref:`play_stream`. @@ -125,7 +125,7 @@ Change the stream volume (in db). The ``stream`` argument is an integer ID retur .. rst-class:: classref-method -void **stop_stream** **(** :ref:`int` stream **)** +|void| **stop_stream**\ (\ stream\: :ref:`int`\ ) :ref:`🔗` Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream`, which becomes invalid after calling this function. @@ -136,3 +136,4 @@ Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_s .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 9d8b879a71a..6577e73bebd 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -26,13 +26,13 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_stream_sampling_rate` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix_resampled` **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_resample` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_stream_sampling_rate`\ (\ ) |virtual| |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix_resampled`\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_resample`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,11 +43,11 @@ Methods Method Descriptions ------------------- -.. _class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate: +.. _class_AudioStreamPlaybackResampled_private_method__get_stream_sampling_rate: .. rst-class:: classref-method -:ref:`float` **_get_stream_sampling_rate** **(** **)** |virtual| |const| +:ref:`float` **_get_stream_sampling_rate**\ (\ ) |virtual| |const| :ref:`🔗` .. container:: contribute @@ -57,11 +57,11 @@ Method Descriptions ---- -.. _class_AudioStreamPlaybackResampled_method__mix_resampled: +.. _class_AudioStreamPlaybackResampled_private_method__mix_resampled: .. rst-class:: classref-method -:ref:`int` **_mix_resampled** **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| +:ref:`int` **_mix_resampled**\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` .. container:: contribute @@ -75,7 +75,7 @@ Method Descriptions .. rst-class:: classref-method -void **begin_resample** **(** **)** +|void| **begin_resample**\ (\ ) :ref:`🔗` .. container:: contribute @@ -88,3 +88,4 @@ void **begin_resample** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaybacksynchronized.rst b/classes/class_audiostreamplaybacksynchronized.rst new file mode 100644 index 00000000000..d0703335a77 --- /dev/null +++ b/classes/class_audiostreamplaybacksynchronized.rst @@ -0,0 +1,26 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaybackSynchronized.xml. + +.. _class_AudioStreamPlaybackSynchronized: + +AudioStreamPlaybackSynchronized +=============================== + +**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` + +.. container:: contribute + + There is currently no description for this class. Please help us by :ref:`contributing one `! + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index d6e8606d2de..9f709e104b4 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sound, music, song + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -12,16 +15,18 @@ AudioStreamPlayer **Inherits:** :ref:`Node` **<** :ref:`Object` -Plays back audio non-positionally. +A node for audio playback. .. rst-class:: classref-introduction-group Description ----------- -Plays an audio stream non-positionally. +The **AudioStreamPlayer** node plays an audio stream non-positionally. It is ideal for user interfaces, menus, or background music. + +To use this node, :ref:`stream` needs to be set to a valid :ref:`AudioStream` resource. Playing more than one sound at the time is also supported, see :ref:`max_polyphony`. -To play audio positionally, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead of **AudioStreamPlayer**. +If you need to play audio at a specific position, use :ref:`AudioStreamPlayer2D` or :ref:`AudioStreamPlayer3D` instead. .. rst-class:: classref-introduction-group @@ -30,15 +35,15 @@ Tutorials - :doc:`Audio streams <../tutorials/audio/audio_streams>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `Audio Device Changer Demo `__ +- `Audio Device Changer Demo `__ -- `Audio Generator Demo `__ +- `Audio Generator Demo `__ -- `Audio Mic Record Demo `__ +- `Audio Microphone Record Demo `__ -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -59,6 +64,8 @@ Properties +----------------------------------------------------+----------------------------------------------------------------------+---------------+ | :ref:`float` | :ref:`pitch_scale` | ``1.0`` | +----------------------------------------------------+----------------------------------------------------------------------+---------------+ + | :ref:`PlaybackType` | :ref:`playback_type` | ``0`` | + +----------------------------------------------------+----------------------------------------------------------------------+---------------+ | :ref:`bool` | :ref:`playing` | ``false`` | +----------------------------------------------------+----------------------------------------------------------------------+---------------+ | :ref:`AudioStream` | :ref:`stream` | | @@ -76,19 +83,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playback_position` **(** **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_stream_playback` **(** **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`float` to_position **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback`\ (\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_stream_playback`\ (\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ from_position\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ to_position\: :ref:`float`\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -103,9 +110,9 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗` -Emitted when the audio stops playing. +Emitted when a sound finishes playing without interruptions. This signal is *not* emitted when calling :ref:`stop`, or when exiting the tree while sounds are playing. .. rst-class:: classref-section-separator @@ -120,7 +127,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MixTarget**: +enum **MixTarget**: :ref:`🔗` .. _class_AudioStreamPlayer_constant_MIX_TARGET_STEREO: @@ -128,7 +135,7 @@ enum **MixTarget**: :ref:`MixTarget` **MIX_TARGET_STEREO** = ``0`` -The audio will be played only on the first channel. +The audio will be played only on the first channel. This is the default. .. _class_AudioStreamPlayer_constant_MIX_TARGET_SURROUND: @@ -159,14 +166,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **autoplay** = ``false`` +:ref:`bool` **autoplay** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`bool` value **)** -- :ref:`bool` **is_autoplay_enabled** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_autoplay_enabled**\ (\ ) -If ``true``, audio plays when added to scene tree. +If ``true``, this node calls :ref:`play` when entering the tree. .. rst-class:: classref-item-separator @@ -176,16 +183,16 @@ If ``true``, audio plays when added to scene tree. .. rst-class:: classref-property -:ref:`StringName` **bus** = ``&"Master"`` +:ref:`StringName` **bus** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bus** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_bus** **(** **)** +- |void| **set_bus**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_bus**\ (\ ) -Bus on which this audio is playing. +The target bus name. All sounds from this node will be playing on this bus. -\ **Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to ``"Master"``. +\ **Note:** At runtime, if no bus with the given name exists, all sounds will fall back on ``"Master"``. See also :ref:`AudioServer.get_bus_name`. .. rst-class:: classref-item-separator @@ -195,14 +202,14 @@ Bus on which this audio is playing. .. rst-class:: classref-property -:ref:`int` **max_polyphony** = ``1`` +:ref:`int` **max_polyphony** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_max_polyphony** **(** **)** +- |void| **set_max_polyphony**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_polyphony**\ (\ ) -The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. +The maximum number of sounds this node can play at the same time. Calling :ref:`play` after this value is reached will cut off the oldest sounds. .. rst-class:: classref-item-separator @@ -212,14 +219,14 @@ The maximum number of sounds this node can play at the same time. Playing additi .. rst-class:: classref-property -:ref:`MixTarget` **mix_target** = ``0`` +:ref:`MixTarget` **mix_target** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mix_target** **(** :ref:`MixTarget` value **)** -- :ref:`MixTarget` **get_mix_target** **(** **)** +- |void| **set_mix_target**\ (\ value\: :ref:`MixTarget`\ ) +- :ref:`MixTarget` **get_mix_target**\ (\ ) -If the audio configuration has more than two speakers, this sets the target channels. See :ref:`MixTarget` constants. +The mix target channels, as one of the :ref:`MixTarget` constants. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). .. rst-class:: classref-item-separator @@ -229,14 +236,33 @@ If the audio configuration has more than two speakers, this sets the target chan .. rst-class:: classref-property -:ref:`float` **pitch_scale** = ``1.0`` +:ref:`float` **pitch_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pitch_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_pitch_scale** **(** **)** +- |void| **set_pitch_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pitch_scale**\ (\ ) -The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. +The audio's pitch and tempo, as a multiplier of the :ref:`stream`'s sample rate. A value of ``2.0`` doubles the audio's pitch, while a value of ``0.5`` halves the pitch. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlayer_property_playback_type: + +.. rst-class:: classref-property + +:ref:`PlaybackType` **playback_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_playback_type**\ (\ value\: :ref:`PlaybackType`\ ) +- :ref:`PlaybackType` **get_playback_type**\ (\ ) + +**Experimental:** This property may be changed or removed in future versions. + +The playback type of the stream player. If set other than to the default value, it will force that playback type. .. rst-class:: classref-item-separator @@ -246,13 +272,13 @@ The pitch and the tempo of the audio, as a multiplier of the audio sample's samp .. rst-class:: classref-property -:ref:`bool` **playing** = ``false`` +:ref:`bool` **playing** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`bool` **is_playing** **(** **)** +- :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing. +If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play` and :ref:`stop`. .. rst-class:: classref-item-separator @@ -262,14 +288,14 @@ If ``true``, audio is playing. .. rst-class:: classref-property -:ref:`AudioStream` **stream** +:ref:`AudioStream` **stream** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream** **(** :ref:`AudioStream` value **)** -- :ref:`AudioStream` **get_stream** **(** **)** +- |void| **set_stream**\ (\ value\: :ref:`AudioStream`\ ) +- :ref:`AudioStream` **get_stream**\ (\ ) -The :ref:`AudioStream` object to be played. +The :ref:`AudioStream` resource to be played. Setting this property stops all currently playing sounds. If left empty, the **AudioStreamPlayer** does not work. .. rst-class:: classref-item-separator @@ -279,14 +305,16 @@ The :ref:`AudioStream` object to be played. .. rst-class:: classref-property -:ref:`bool` **stream_paused** = ``false`` +:ref:`bool` **stream_paused** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream_paused** **(** :ref:`bool` value **)** -- :ref:`bool` **get_stream_paused** **(** **)** +- |void| **set_stream_paused**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_stream_paused**\ (\ ) + +If ``true``, the sounds are paused. Setting :ref:`stream_paused` to ``false`` resumes all sounds. -If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. +\ **Note:** This property is automatically changed when exiting or entering the tree, or this node is paused (see :ref:`Node.process_mode`). .. rst-class:: classref-item-separator @@ -296,14 +324,16 @@ If ``true``, the playback is paused. You can resume it by setting ``stream_pause .. rst-class:: classref-property -:ref:`float` **volume_db** = ``0.0`` +:ref:`float` **volume_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_volume_db** **(** :ref:`float` value **)** -- :ref:`float` **get_volume_db** **(** **)** +- |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_db**\ (\ ) -Volume of sound, in dB. +Volume of sound, in decibel. This is an offset of the :ref:`stream`'s volume. + +\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. .. rst-class:: classref-section-separator @@ -318,9 +348,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_playback_position** **(** **)** +:ref:`float` **get_playback_position**\ (\ ) :ref:`🔗` + +Returns the position in the :ref:`AudioStream` of the latest sound, in seconds. Returns ``0.0`` if no sounds are playing. -Returns the position in the :ref:`AudioStream` in seconds. +\ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix` to the returned position. .. rst-class:: classref-item-separator @@ -330,9 +362,9 @@ Returns the position in the :ref:`AudioStream` in seconds. .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +:ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) :ref:`🔗` -Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer**. +Returns the latest :ref:`AudioStreamPlayback` of this node, usually the most recently created by :ref:`play`. If no sounds are playing, this method fails and returns an empty playback. .. rst-class:: classref-item-separator @@ -342,9 +374,9 @@ Returns the :ref:`AudioStreamPlayback` object associa .. rst-class:: classref-method -:ref:`bool` **has_stream_playback** **(** **)** +:ref:`bool` **has_stream_playback**\ (\ ) :ref:`🔗` -Returns whether the **AudioStreamPlayer** can return the :ref:`AudioStreamPlayback` object or not. +Returns ``true`` if any sound is active, even if :ref:`stream_paused` is set to ``true``. See also :ref:`playing` and :ref:`get_stream_playback`. .. rst-class:: classref-item-separator @@ -354,9 +386,9 @@ Returns whether the **AudioStreamPlayer** can return the :ref:`AudioStreamPlayba .. rst-class:: classref-method -void **play** **(** :ref:`float` from_position=0.0 **)** +|void| **play**\ (\ from_position\: :ref:`float` = 0.0\ ) :ref:`🔗` -Plays the audio from the given ``from_position``, in seconds. +Plays a sound from the beginning, or the given ``from_position`` in seconds. .. rst-class:: classref-item-separator @@ -366,9 +398,9 @@ Plays the audio from the given ``from_position``, in seconds. .. rst-class:: classref-method -void **seek** **(** :ref:`float` to_position **)** +|void| **seek**\ (\ to_position\: :ref:`float`\ ) :ref:`🔗` -Sets the position from which audio will be played, in seconds. +Restarts all sounds to be played from the given ``to_position``, in seconds. Does nothing if no sounds are playing. .. rst-class:: classref-item-separator @@ -378,9 +410,9 @@ Sets the position from which audio will be played, in seconds. .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗` -Stops the audio. +Stops all sounds from this node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -389,3 +421,4 @@ Stops the audio. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index fad72083de0..ac52ce133d0 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sound, sfx + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -42,31 +45,33 @@ Properties .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`int` | :ref:`area_mask` | ``1`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`attenuation` | ``1.0`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`bool` | :ref:`autoplay` | ``false`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`StringName` | :ref:`bus` | ``&"Master"`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`max_distance` | ``2000.0`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`int` | :ref:`max_polyphony` | ``1`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`panning_strength` | ``1.0`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`pitch_scale` | ``1.0`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`bool` | :ref:`playing` | ``false`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`AudioStream` | :ref:`stream` | | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`bool` | :ref:`stream_paused` | ``false`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`volume_db` | ``0.0`` | - +---------------------------------------+------------------------------------------------------------------------------+---------------+ + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`area_mask` | ``1`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`attenuation` | ``1.0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`autoplay` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`StringName` | :ref:`bus` | ``&"Master"`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`max_distance` | ``2000.0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`int` | :ref:`max_polyphony` | ``1`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`panning_strength` | ``1.0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`pitch_scale` | ``1.0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`PlaybackType` | :ref:`playback_type` | ``0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`playing` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`AudioStream` | :ref:`stream` | | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`bool` | :ref:`stream_paused` | ``false`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`volume_db` | ``0.0`` | + +----------------------------------------------------+------------------------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -76,19 +81,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playback_position` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_stream_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`float` to_position **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_stream_playback`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ from_position\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ to_position\: :ref:`float`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -103,7 +108,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗` Emitted when the audio stops playing. @@ -120,12 +125,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **area_mask** = ``1`` +:ref:`int` **area_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_area_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_area_mask** **(** **)** +- |void| **set_area_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_area_mask**\ (\ ) Determines which :ref:`Area2D` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect :ref:`AudioStream`\ s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. @@ -137,12 +142,12 @@ Determines which :ref:`Area2D` layers affect the sound for reverb .. rst-class:: classref-property -:ref:`float` **attenuation** = ``1.0`` +:ref:`float` **attenuation** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attenuation** **(** :ref:`float` value **)** -- :ref:`float` **get_attenuation** **(** **)** +- |void| **set_attenuation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_attenuation**\ (\ ) The volume is attenuated over distance with this as an exponent. @@ -154,12 +159,12 @@ The volume is attenuated over distance with this as an exponent. .. rst-class:: classref-property -:ref:`bool` **autoplay** = ``false`` +:ref:`bool` **autoplay** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`bool` value **)** -- :ref:`bool` **is_autoplay_enabled** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_autoplay_enabled**\ (\ ) If ``true``, audio plays when added to scene tree. @@ -171,12 +176,12 @@ If ``true``, audio plays when added to scene tree. .. rst-class:: classref-property -:ref:`StringName` **bus** = ``&"Master"`` +:ref:`StringName` **bus** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bus** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_bus** **(** **)** +- |void| **set_bus**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_bus**\ (\ ) Bus on which this audio is playing. @@ -190,12 +195,12 @@ Bus on which this audio is playing. .. rst-class:: classref-property -:ref:`float` **max_distance** = ``2000.0`` +:ref:`float` **max_distance** = ``2000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_max_distance** **(** **)** +- |void| **set_max_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_distance**\ (\ ) Maximum distance from which audio is still hearable. @@ -207,12 +212,12 @@ Maximum distance from which audio is still hearable. .. rst-class:: classref-property -:ref:`int` **max_polyphony** = ``1`` +:ref:`int` **max_polyphony** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_max_polyphony** **(** **)** +- |void| **set_max_polyphony**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_polyphony**\ (\ ) The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. @@ -224,12 +229,12 @@ The maximum number of sounds this node can play at the same time. Playing additi .. rst-class:: classref-property -:ref:`float` **panning_strength** = ``1.0`` +:ref:`float` **panning_strength** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_panning_strength** **(** :ref:`float` value **)** -- :ref:`float` **get_panning_strength** **(** **)** +- |void| **set_panning_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_panning_strength**\ (\ ) Scales the panning strength for this node by multiplying the base :ref:`ProjectSettings.audio/general/2d_panning_strength` with this factor. Higher values will pan audio from left to right more dramatically than lower values. @@ -241,12 +246,12 @@ Scales the panning strength for this node by multiplying the base :ref:`ProjectS .. rst-class:: classref-property -:ref:`float` **pitch_scale** = ``1.0`` +:ref:`float` **pitch_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pitch_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_pitch_scale** **(** **)** +- |void| **set_pitch_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pitch_scale**\ (\ ) The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. @@ -254,15 +259,34 @@ The pitch and the tempo of the audio, as a multiplier of the audio sample's samp ---- +.. _class_AudioStreamPlayer2D_property_playback_type: + +.. rst-class:: classref-property + +:ref:`PlaybackType` **playback_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_playback_type**\ (\ value\: :ref:`PlaybackType`\ ) +- :ref:`PlaybackType` **get_playback_type**\ (\ ) + +**Experimental:** This property may be changed or removed in future versions. + +The playback type of the stream player. If set other than to the default value, it will force that playback type. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamPlayer2D_property_playing: .. rst-class:: classref-property -:ref:`bool` **playing** = ``false`` +:ref:`bool` **playing** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`bool` **is_playing** **(** **)** +- :ref:`bool` **is_playing**\ (\ ) If ``true``, audio is playing or is queued to be played (see :ref:`play`). @@ -274,12 +298,12 @@ If ``true``, audio is playing or is queued to be played (see :ref:`play` **stream** +:ref:`AudioStream` **stream** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream** **(** :ref:`AudioStream` value **)** -- :ref:`AudioStream` **get_stream** **(** **)** +- |void| **set_stream**\ (\ value\: :ref:`AudioStream`\ ) +- :ref:`AudioStream` **get_stream**\ (\ ) The :ref:`AudioStream` object to be played. @@ -291,14 +315,14 @@ The :ref:`AudioStream` object to be played. .. rst-class:: classref-property -:ref:`bool` **stream_paused** = ``false`` +:ref:`bool` **stream_paused** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream_paused** **(** :ref:`bool` value **)** -- :ref:`bool` **get_stream_paused** **(** **)** +- |void| **set_stream_paused**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_stream_paused**\ (\ ) -If ``true``, the playback is paused. You can resume it by setting ``stream_paused`` to ``false``. +If ``true``, the playback is paused. You can resume it by setting :ref:`stream_paused` to ``false``. .. rst-class:: classref-item-separator @@ -308,12 +332,12 @@ If ``true``, the playback is paused. You can resume it by setting ``stream_pause .. rst-class:: classref-property -:ref:`float` **volume_db** = ``0.0`` +:ref:`float` **volume_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_volume_db** **(** :ref:`float` value **)** -- :ref:`float` **get_volume_db** **(** **)** +- |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_db**\ (\ ) Base volume before attenuation. @@ -330,7 +354,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_playback_position** **(** **)** +:ref:`float` **get_playback_position**\ (\ ) :ref:`🔗` Returns the position in the :ref:`AudioStream`. @@ -342,7 +366,7 @@ Returns the position in the :ref:`AudioStream`. .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +:ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) :ref:`🔗` Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer2D**. @@ -354,7 +378,7 @@ Returns the :ref:`AudioStreamPlayback` object associa .. rst-class:: classref-method -:ref:`bool` **has_stream_playback** **(** **)** +:ref:`bool` **has_stream_playback**\ (\ ) :ref:`🔗` Returns whether the :ref:`AudioStreamPlayer` can return the :ref:`AudioStreamPlayback` object or not. @@ -366,7 +390,7 @@ Returns whether the :ref:`AudioStreamPlayer` can return .. rst-class:: classref-method -void **play** **(** :ref:`float` from_position=0.0 **)** +|void| **play**\ (\ from_position\: :ref:`float` = 0.0\ ) :ref:`🔗` Queues the audio to play on the next physics frame, from the given position ``from_position``, in seconds. @@ -378,7 +402,7 @@ Queues the audio to play on the next physics frame, from the given position ``fr .. rst-class:: classref-method -void **seek** **(** :ref:`float` to_position **)** +|void| **seek**\ (\ to_position\: :ref:`float`\ ) :ref:`🔗` Sets the position from which audio will be played, in seconds. @@ -390,7 +414,7 @@ Sets the position from which audio will be played, in seconds. .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗` Stops the audio. @@ -401,3 +425,4 @@ Stops the audio. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 329176aa39f..1160b7cd272 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sound, sfx + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -73,6 +76,8 @@ Properties +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ | :ref:`float` | :ref:`pitch_scale` | ``1.0`` | +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ + | :ref:`PlaybackType` | :ref:`playback_type` | ``0`` | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ | :ref:`bool` | :ref:`playing` | ``false`` | +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+---------------+ | :ref:`AudioStream` | :ref:`stream` | | @@ -92,19 +97,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playback_position` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_stream_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`float` from_position=0.0 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`float` to_position **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`get_stream_playback`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_stream_playback`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play`\ (\ from_position\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ to_position\: :ref:`float`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -119,7 +124,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗` Emitted when the audio stops playing. @@ -136,7 +141,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AttenuationModel**: +enum **AttenuationModel**: :ref:`🔗` .. _class_AudioStreamPlayer3D_constant_ATTENUATION_INVERSE_DISTANCE: @@ -178,7 +183,7 @@ No attenuation of loudness according to distance. The sound will still be heard .. rst-class:: classref-enumeration -enum **DopplerTracking**: +enum **DopplerTracking**: :ref:`🔗` .. _class_AudioStreamPlayer3D_constant_DOPPLER_TRACKING_DISABLED: @@ -217,12 +222,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **area_mask** = ``1`` +:ref:`int` **area_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_area_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_area_mask** **(** **)** +- |void| **set_area_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_area_mask**\ (\ ) Determines which :ref:`Area3D` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect :ref:`AudioStream`\ s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. @@ -234,12 +239,12 @@ Determines which :ref:`Area3D` layers affect the sound for reverb .. rst-class:: classref-property -:ref:`float` **attenuation_filter_cutoff_hz** = ``5000.0`` +:ref:`float` **attenuation_filter_cutoff_hz** = ``5000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attenuation_filter_cutoff_hz** **(** :ref:`float` value **)** -- :ref:`float` **get_attenuation_filter_cutoff_hz** **(** **)** +- |void| **set_attenuation_filter_cutoff_hz**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_attenuation_filter_cutoff_hz**\ (\ ) The cutoff frequency of the attenuation low-pass filter, in Hz. A sound above this frequency is attenuated more than a sound below this frequency. To disable this effect, set this to ``20500`` as this frequency is above the human hearing limit. @@ -251,12 +256,12 @@ The cutoff frequency of the attenuation low-pass filter, in Hz. A sound above th .. rst-class:: classref-property -:ref:`float` **attenuation_filter_db** = ``-24.0`` +:ref:`float` **attenuation_filter_db** = ``-24.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attenuation_filter_db** **(** :ref:`float` value **)** -- :ref:`float` **get_attenuation_filter_db** **(** **)** +- |void| **set_attenuation_filter_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_attenuation_filter_db**\ (\ ) Amount how much the filter affects the loudness, in decibels. @@ -268,12 +273,12 @@ Amount how much the filter affects the loudness, in decibels. .. rst-class:: classref-property -:ref:`AttenuationModel` **attenuation_model** = ``0`` +:ref:`AttenuationModel` **attenuation_model** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attenuation_model** **(** :ref:`AttenuationModel` value **)** -- :ref:`AttenuationModel` **get_attenuation_model** **(** **)** +- |void| **set_attenuation_model**\ (\ value\: :ref:`AttenuationModel`\ ) +- :ref:`AttenuationModel` **get_attenuation_model**\ (\ ) Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation. @@ -285,12 +290,12 @@ Decides if audio should get quieter with distance linearly, quadratically, logar .. rst-class:: classref-property -:ref:`bool` **autoplay** = ``false`` +:ref:`bool` **autoplay** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`bool` value **)** -- :ref:`bool` **is_autoplay_enabled** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_autoplay_enabled**\ (\ ) If ``true``, audio plays when the AudioStreamPlayer3D node is added to scene tree. @@ -302,12 +307,12 @@ If ``true``, audio plays when the AudioStreamPlayer3D node is added to scene tre .. rst-class:: classref-property -:ref:`StringName` **bus** = ``&"Master"`` +:ref:`StringName` **bus** = ``&"Master"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bus** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_bus** **(** **)** +- |void| **set_bus**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_bus**\ (\ ) The bus on which this audio is playing. @@ -321,12 +326,12 @@ The bus on which this audio is playing. .. rst-class:: classref-property -:ref:`DopplerTracking` **doppler_tracking** = ``0`` +:ref:`DopplerTracking` **doppler_tracking** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_doppler_tracking** **(** :ref:`DopplerTracking` value **)** -- :ref:`DopplerTracking` **get_doppler_tracking** **(** **)** +- |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking`\ ) +- :ref:`DopplerTracking` **get_doppler_tracking**\ (\ ) Decides in which step the Doppler effect should be calculated. @@ -338,12 +343,12 @@ Decides in which step the Doppler effect should be calculated. .. rst-class:: classref-property -:ref:`float` **emission_angle_degrees** = ``45.0`` +:ref:`float` **emission_angle_degrees** = ``45.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_angle** **(** **)** +- |void| **set_emission_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_angle**\ (\ ) The angle in which the audio reaches a listener unattenuated. @@ -355,12 +360,12 @@ The angle in which the audio reaches a listener unattenuated. .. rst-class:: classref-property -:ref:`bool` **emission_angle_enabled** = ``false`` +:ref:`bool` **emission_angle_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_angle_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_emission_angle_enabled** **(** **)** +- |void| **set_emission_angle_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_emission_angle_enabled**\ (\ ) If ``true``, the audio should be attenuated according to the direction of the sound. @@ -372,12 +377,12 @@ If ``true``, the audio should be attenuated according to the direction of the so .. rst-class:: classref-property -:ref:`float` **emission_angle_filter_attenuation_db** = ``-12.0`` +:ref:`float` **emission_angle_filter_attenuation_db** = ``-12.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_angle_filter_attenuation_db** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_angle_filter_attenuation_db** **(** **)** +- |void| **set_emission_angle_filter_attenuation_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_angle_filter_attenuation_db**\ (\ ) Attenuation factor used if listener is outside of :ref:`emission_angle_degrees` and :ref:`emission_angle_enabled` is set, in decibels. @@ -389,14 +394,14 @@ Attenuation factor used if listener is outside of :ref:`emission_angle_degrees` **max_db** = ``3.0`` +:ref:`float` **max_db** = ``3.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_db** **(** :ref:`float` value **)** -- :ref:`float` **get_max_db** **(** **)** +- |void| **set_max_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_db**\ (\ ) -Sets the absolute maximum of the soundlevel, in decibels. +Sets the absolute maximum of the sound level, in decibels. .. rst-class:: classref-item-separator @@ -406,12 +411,12 @@ Sets the absolute maximum of the soundlevel, in decibels. .. rst-class:: classref-property -:ref:`float` **max_distance** = ``0.0`` +:ref:`float` **max_distance** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_max_distance** **(** **)** +- |void| **set_max_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_distance**\ (\ ) The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than ``0.0``. :ref:`max_distance` works in tandem with :ref:`unit_size`. However, unlike :ref:`unit_size` whose behavior depends on the :ref:`attenuation_model`, :ref:`max_distance` always works in a linear fashion. This can be used to prevent the **AudioStreamPlayer3D** from requiring audio mixing when the listener is far away, which saves CPU resources. @@ -423,12 +428,12 @@ The distance past which the sound can no longer be heard at all. Only has an eff .. rst-class:: classref-property -:ref:`int` **max_polyphony** = ``1`` +:ref:`int` **max_polyphony** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_max_polyphony** **(** **)** +- |void| **set_max_polyphony**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_polyphony**\ (\ ) The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. @@ -440,12 +445,12 @@ The maximum number of sounds this node can play at the same time. Playing additi .. rst-class:: classref-property -:ref:`float` **panning_strength** = ``1.0`` +:ref:`float` **panning_strength** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_panning_strength** **(** :ref:`float` value **)** -- :ref:`float` **get_panning_strength** **(** **)** +- |void| **set_panning_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_panning_strength**\ (\ ) Scales the panning strength for this node by multiplying the base :ref:`ProjectSettings.audio/general/3d_panning_strength` with this factor. Higher values will pan audio from left to right more dramatically than lower values. @@ -457,12 +462,12 @@ Scales the panning strength for this node by multiplying the base :ref:`ProjectS .. rst-class:: classref-property -:ref:`float` **pitch_scale** = ``1.0`` +:ref:`float` **pitch_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pitch_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_pitch_scale** **(** **)** +- |void| **set_pitch_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pitch_scale**\ (\ ) The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. @@ -470,15 +475,34 @@ The pitch and the tempo of the audio, as a multiplier of the audio sample's samp ---- +.. _class_AudioStreamPlayer3D_property_playback_type: + +.. rst-class:: classref-property + +:ref:`PlaybackType` **playback_type** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_playback_type**\ (\ value\: :ref:`PlaybackType`\ ) +- :ref:`PlaybackType` **get_playback_type**\ (\ ) + +**Experimental:** This property may be changed or removed in future versions. + +The playback type of the stream player. If set other than to the default value, it will force that playback type. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStreamPlayer3D_property_playing: .. rst-class:: classref-property -:ref:`bool` **playing** = ``false`` +:ref:`bool` **playing** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`bool` **is_playing** **(** **)** +- :ref:`bool` **is_playing**\ (\ ) If ``true``, audio is playing or is queued to be played (see :ref:`play`). @@ -490,12 +514,12 @@ If ``true``, audio is playing or is queued to be played (see :ref:`play` **stream** +:ref:`AudioStream` **stream** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream** **(** :ref:`AudioStream` value **)** -- :ref:`AudioStream` **get_stream** **(** **)** +- |void| **set_stream**\ (\ value\: :ref:`AudioStream`\ ) +- :ref:`AudioStream` **get_stream**\ (\ ) The :ref:`AudioStream` resource to be played. @@ -507,12 +531,12 @@ The :ref:`AudioStream` resource to be played. .. rst-class:: classref-property -:ref:`bool` **stream_paused** = ``false`` +:ref:`bool` **stream_paused** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stream_paused** **(** :ref:`bool` value **)** -- :ref:`bool` **get_stream_paused** **(** **)** +- |void| **set_stream_paused**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_stream_paused**\ (\ ) If ``true``, the playback is paused. You can resume it by setting :ref:`stream_paused` to ``false``. @@ -524,12 +548,12 @@ If ``true``, the playback is paused. You can resume it by setting :ref:`stream_p .. rst-class:: classref-property -:ref:`float` **unit_size** = ``10.0`` +:ref:`float` **unit_size** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_unit_size** **(** :ref:`float` value **)** -- :ref:`float` **get_unit_size** **(** **)** +- |void| **set_unit_size**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_unit_size**\ (\ ) The factor for the attenuation effect. Higher values make the sound audible over a larger distance. @@ -541,12 +565,12 @@ The factor for the attenuation effect. Higher values make the sound audible over .. rst-class:: classref-property -:ref:`float` **volume_db** = ``0.0`` +:ref:`float` **volume_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_volume_db** **(** :ref:`float` value **)** -- :ref:`float` **get_volume_db** **(** **)** +- |void| **set_volume_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_volume_db**\ (\ ) The base sound level before attenuation, in decibels. @@ -563,7 +587,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_playback_position** **(** **)** +:ref:`float` **get_playback_position**\ (\ ) :ref:`🔗` Returns the position in the :ref:`AudioStream`. @@ -575,7 +599,7 @@ Returns the position in the :ref:`AudioStream`. .. rst-class:: classref-method -:ref:`AudioStreamPlayback` **get_stream_playback** **(** **)** +:ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) :ref:`🔗` Returns the :ref:`AudioStreamPlayback` object associated with this **AudioStreamPlayer3D**. @@ -587,7 +611,7 @@ Returns the :ref:`AudioStreamPlayback` object associa .. rst-class:: classref-method -:ref:`bool` **has_stream_playback** **(** **)** +:ref:`bool` **has_stream_playback**\ (\ ) :ref:`🔗` Returns whether the :ref:`AudioStreamPlayer` can return the :ref:`AudioStreamPlayback` object or not. @@ -599,7 +623,7 @@ Returns whether the :ref:`AudioStreamPlayer` can return .. rst-class:: classref-method -void **play** **(** :ref:`float` from_position=0.0 **)** +|void| **play**\ (\ from_position\: :ref:`float` = 0.0\ ) :ref:`🔗` Queues the audio to play on the next physics frame, from the given position ``from_position``, in seconds. @@ -611,7 +635,7 @@ Queues the audio to play on the next physics frame, from the given position ``fr .. rst-class:: classref-method -void **seek** **(** :ref:`float` to_position **)** +|void| **seek**\ (\ to_position\: :ref:`float`\ ) :ref:`🔗` Sets the position from which audio will be played, in seconds. @@ -623,7 +647,7 @@ Sets the position from which audio will be played, in seconds. .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗` Stops the audio. @@ -634,3 +658,4 @@ Stops the audio. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamplaylist.rst b/classes/class_audiostreamplaylist.rst new file mode 100644 index 00000000000..9eb37b087ff --- /dev/null +++ b/classes/class_audiostreamplaylist.rst @@ -0,0 +1,189 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamPlaylist.xml. + +.. _class_AudioStreamPlaylist: + +AudioStreamPlaylist +=================== + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +:ref:`AudioStream` that includes sub-streams and plays them back like a playlist. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`fade_time` | ``0.3`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`loop` | ``true`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`shuffle` | ``false`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`stream_count` | ``0`` | + +---------------------------+----------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bpm`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_list_stream`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_list_stream`\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamPlaylist_constant_MAX_STREAMS: + +.. rst-class:: classref-constant + +**MAX_STREAMS** = ``64`` :ref:`🔗` + +Maximum amount of streams supported in the playlist. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamPlaylist_property_fade_time: + +.. rst-class:: classref-property + +:ref:`float` **fade_time** = ``0.3`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fade_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fade_time**\ (\ ) + +Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_loop: + +.. rst-class:: classref-property + +:ref:`bool` **loop** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **has_loop**\ (\ ) + +If ``true``, the playlist will loop, otherwise the playlist will end when the last stream is finished. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_shuffle: + +.. rst-class:: classref-property + +:ref:`bool` **shuffle** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_shuffle**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_shuffle**\ (\ ) + +If ``true``, the playlist will shuffle each time playback starts and each time it loops. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_property_stream_count: + +.. rst-class:: classref-property + +:ref:`int` **stream_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stream_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stream_count**\ (\ ) + +Amount of streams in the playlist. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamPlaylist_method_get_bpm: + +.. rst-class:: classref-method + +:ref:`float` **get_bpm**\ (\ ) |const| :ref:`🔗` + +Returns the BPM of the playlist, which can vary depending on the clip being played. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_method_get_list_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_list_stream**\ (\ stream_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the stream at playback position index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamPlaylist_method_set_list_stream: + +.. rst-class:: classref-method + +|void| **set_list_stream**\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) :ref:`🔗` + +Sets the stream at playback position index. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreampolyphonic.rst b/classes/class_audiostreampolyphonic.rst index e69cff15630..cb9d7ae9670 100644 --- a/classes/class_audiostreampolyphonic.rst +++ b/classes/class_audiostreampolyphonic.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **polyphony** = ``32`` +:ref:`int` **polyphony** = ``32`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_polyphony** **(** **)** +- |void| **set_polyphony**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_polyphony**\ (\ ) Maximum amount of simultaneous streams that can be played. @@ -64,3 +64,4 @@ Maximum amount of simultaneous streams that can be played. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamrandomizer.rst b/classes/class_audiostreamrandomizer.rst index 7b6df38cf6b..afa65b7513a 100644 --- a/classes/class_audiostreamrandomizer.rst +++ b/classes/class_audiostreamrandomizer.rst @@ -32,9 +32,9 @@ Properties +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ | :ref:`PlaybackMode` | :ref:`playback_mode` | ``0`` | +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`random_pitch` | ``1.1`` | + | :ref:`float` | :ref:`random_pitch` | ``1.0`` | +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`random_volume_offset_db` | ``5.0`` | + | :ref:`float` | :ref:`random_volume_offset_db` | ``0.0`` | +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ | :ref:`int` | :ref:`streams_count` | ``0`` | +--------------------------------------------------------------+----------------------------------------------------------------------------------------------+---------+ @@ -47,21 +47,21 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_stream` **(** :ref:`int` index, :ref:`AudioStream` stream, :ref:`float` weight=1.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStream` | :ref:`get_stream` **(** :ref:`int` index **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_stream_probability_weight` **(** :ref:`int` index **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_stream` **(** :ref:`int` index_from, :ref:`int` index_to **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_stream` **(** :ref:`int` index **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream` **(** :ref:`int` index, :ref:`AudioStream` stream **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stream_probability_weight` **(** :ref:`int` index, :ref:`float` weight **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_stream`\ (\ index\: :ref:`int`, stream\: :ref:`AudioStream`, weight\: :ref:`float` = 1.0\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_stream`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_stream_probability_weight`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_stream`\ (\ index_from\: :ref:`int`, index_to\: :ref:`int`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_stream`\ (\ index\: :ref:`int`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stream`\ (\ index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stream_probability_weight`\ (\ index\: :ref:`int`, weight\: :ref:`float`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -76,7 +76,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PlaybackMode**: +enum **PlaybackMode**: :ref:`🔗` .. _class_AudioStreamRandomizer_constant_PLAYBACK_RANDOM_NO_REPEATS: @@ -115,12 +115,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PlaybackMode` **playback_mode** = ``0`` +:ref:`PlaybackMode` **playback_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_playback_mode** **(** :ref:`PlaybackMode` value **)** -- :ref:`PlaybackMode` **get_playback_mode** **(** **)** +- |void| **set_playback_mode**\ (\ value\: :ref:`PlaybackMode`\ ) +- :ref:`PlaybackMode` **get_playback_mode**\ (\ ) Controls how this AudioStreamRandomizer picks which AudioStream to play next. @@ -132,12 +132,12 @@ Controls how this AudioStreamRandomizer picks which AudioStream to play next. .. rst-class:: classref-property -:ref:`float` **random_pitch** = ``1.1`` +:ref:`float` **random_pitch** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_random_pitch** **(** :ref:`float` value **)** -- :ref:`float` **get_random_pitch** **(** **)** +- |void| **set_random_pitch**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_random_pitch**\ (\ ) The intensity of random pitch variation. A value of 1 means no variation. @@ -149,12 +149,12 @@ The intensity of random pitch variation. A value of 1 means no variation. .. rst-class:: classref-property -:ref:`float` **random_volume_offset_db** = ``5.0`` +:ref:`float` **random_volume_offset_db** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_random_volume_offset_db** **(** :ref:`float` value **)** -- :ref:`float` **get_random_volume_offset_db** **(** **)** +- |void| **set_random_volume_offset_db**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_random_volume_offset_db**\ (\ ) The intensity of random volume variation. A value of 0 means no variation. @@ -166,12 +166,12 @@ The intensity of random volume variation. A value of 0 means no variation. .. rst-class:: classref-property -:ref:`int` **streams_count** = ``0`` +:ref:`int` **streams_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_streams_count** **(** :ref:`int` value **)** -- :ref:`int` **get_streams_count** **(** **)** +- |void| **set_streams_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_streams_count**\ (\ ) The number of streams in the stream pool. @@ -188,7 +188,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_stream** **(** :ref:`int` index, :ref:`AudioStream` stream, :ref:`float` weight=1.0 **)** +|void| **add_stream**\ (\ index\: :ref:`int`, stream\: :ref:`AudioStream`, weight\: :ref:`float` = 1.0\ ) :ref:`🔗` Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. @@ -200,7 +200,7 @@ Insert a stream at the specified index. If the index is less than zero, the inse .. rst-class:: classref-method -:ref:`AudioStream` **get_stream** **(** :ref:`int` index **)** |const| +:ref:`AudioStream` **get_stream**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the stream at the specified index. @@ -212,7 +212,7 @@ Returns the stream at the specified index. .. rst-class:: classref-method -:ref:`float` **get_stream_probability_weight** **(** :ref:`int` index **)** |const| +:ref:`float` **get_stream_probability_weight**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the probability weight associated with the stream at the given index. @@ -224,7 +224,7 @@ Returns the probability weight associated with the stream at the given index. .. rst-class:: classref-method -void **move_stream** **(** :ref:`int` index_from, :ref:`int` index_to **)** +|void| **move_stream**\ (\ index_from\: :ref:`int`, index_to\: :ref:`int`\ ) :ref:`🔗` Move a stream from one index to another. @@ -236,7 +236,7 @@ Move a stream from one index to another. .. rst-class:: classref-method -void **remove_stream** **(** :ref:`int` index **)** +|void| **remove_stream**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Remove the stream at the specified index. @@ -248,7 +248,7 @@ Remove the stream at the specified index. .. rst-class:: classref-method -void **set_stream** **(** :ref:`int` index, :ref:`AudioStream` stream **)** +|void| **set_stream**\ (\ index\: :ref:`int`, stream\: :ref:`AudioStream`\ ) :ref:`🔗` Set the AudioStream at the specified index. @@ -260,7 +260,7 @@ Set the AudioStream at the specified index. .. rst-class:: classref-method -void **set_stream_probability_weight** **(** :ref:`int` index, :ref:`float` weight **)** +|void| **set_stream_probability_weight**\ (\ index\: :ref:`int`, weight\: :ref:`float`\ ) :ref:`🔗` Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes. @@ -271,3 +271,4 @@ Set the probability weight of the stream at the specified index. The higher this .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst new file mode 100644 index 00000000000..a83a29f5c6f --- /dev/null +++ b/classes/class_audiostreamsynchronized.rst @@ -0,0 +1,153 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/interactive_music/doc_classes/AudioStreamSynchronized.xml. + +.. _class_AudioStreamSynchronized: + +AudioStreamSynchronized +======================= + +**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Stream that can be fitted with sub-streams, which will be played in-sync. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams being at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+--------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`stream_count` | ``0`` | + +-----------------------+--------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStream` | :ref:`get_sync_stream`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_sync_stream_volume`\ (\ stream_index\: :ref:`int`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sync_stream`\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sync_stream_volume`\ (\ stream_index\: :ref:`int`, volume_db\: :ref:`float`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_AudioStreamSynchronized_constant_MAX_STREAMS: + +.. rst-class:: classref-constant + +**MAX_STREAMS** = ``32`` :ref:`🔗` + +Maximum amount of streams that can be synchrohized. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AudioStreamSynchronized_property_stream_count: + +.. rst-class:: classref-property + +:ref:`int` **stream_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stream_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stream_count**\ (\ ) + +Set the total amount of streams that will be played back synchronized. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamSynchronized_method_get_sync_stream: + +.. rst-class:: classref-method + +:ref:`AudioStream` **get_sync_stream**\ (\ stream_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Get one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_get_sync_stream_volume: + +.. rst-class:: classref-method + +:ref:`float` **get_sync_stream_volume**\ (\ stream_index\: :ref:`int`\ ) |const| :ref:`🔗` + +Get the volume of one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_set_sync_stream: + +.. rst-class:: classref-method + +|void| **set_sync_stream**\ (\ stream_index\: :ref:`int`, audio_stream\: :ref:`AudioStream`\ ) :ref:`🔗` + +Set one of the synchronized streams, by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamSynchronized_method_set_sync_stream_volume: + +.. rst-class:: classref-method + +|void| **set_sync_stream_volume**\ (\ stream_index\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`🔗` + +Set the volume of one of the synchronized streams, by index. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index c5e0d123399..fb21bcccfb9 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -23,6 +23,13 @@ AudioStreamWAV stores sound samples loaded from WAV files. To play the stored so This class can also be used to store dynamically-generated PCM audio data. See also :ref:`AudioStreamGenerator` for procedural audio generation. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -55,9 +62,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_to_wav` **(** :ref:`String` path **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_to_wav`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +79,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Format**: +enum **Format**: :ref:`🔗` .. _class_AudioStreamWAV_constant_FORMAT_8_BITS: @@ -98,6 +105,14 @@ enum **Format**: Audio is compressed using IMA ADPCM. +.. _class_AudioStreamWAV_constant_FORMAT_QOA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Format` **FORMAT_QOA** = ``3`` + +Audio is compressed as QOA (`Quite OK Audio `__). + .. rst-class:: classref-item-separator ---- @@ -106,7 +121,7 @@ Audio is compressed using IMA ADPCM. .. rst-class:: classref-enumeration -enum **LoopMode**: +enum **LoopMode**: :ref:`🔗` .. _class_AudioStreamWAV_constant_LOOP_DISABLED: @@ -153,17 +168,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray` **data** = ``PackedByteArray()`` +:ref:`PackedByteArray` **data** = ``PackedByteArray()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_data** **(** :ref:`PackedByteArray` value **)** -- :ref:`PackedByteArray` **get_data** **(** **)** +- |void| **set_data**\ (\ value\: :ref:`PackedByteArray`\ ) +- :ref:`PackedByteArray` **get_data**\ (\ ) Contains the audio data in bytes. \ **Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -172,12 +189,12 @@ Contains the audio data in bytes. .. rst-class:: classref-property -:ref:`Format` **format** = ``0`` +:ref:`Format` **format** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_format** **(** :ref:`Format` value **)** -- :ref:`Format` **get_format** **(** **)** +- |void| **set_format**\ (\ value\: :ref:`Format`\ ) +- :ref:`Format` **get_format**\ (\ ) Audio format. See :ref:`Format` constants for values. @@ -189,14 +206,14 @@ Audio format. See :ref:`Format` constants for values .. rst-class:: classref-property -:ref:`int` **loop_begin** = ``0`` +:ref:`int` **loop_begin** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_begin** **(** :ref:`int` value **)** -- :ref:`int` **get_loop_begin** **(** **)** +- |void| **set_loop_begin**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_loop_begin**\ (\ ) -The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. +The loop start point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. .. rst-class:: classref-item-separator @@ -206,14 +223,14 @@ The loop start point (in number of samples, relative to the beginning of the sam .. rst-class:: classref-property -:ref:`int` **loop_end** = ``0`` +:ref:`int` **loop_end** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_end** **(** :ref:`int` value **)** -- :ref:`int` **get_loop_end** **(** **)** +- |void| **set_loop_end**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_loop_end**\ (\ ) -The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present. +The loop end point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. .. rst-class:: classref-item-separator @@ -223,12 +240,12 @@ The loop end point (in number of samples, relative to the beginning of the sampl .. rst-class:: classref-property -:ref:`LoopMode` **loop_mode** = ``0`` +:ref:`LoopMode` **loop_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_loop_mode** **(** :ref:`LoopMode` value **)** -- :ref:`LoopMode` **get_loop_mode** **(** **)** +- |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) +- :ref:`LoopMode` **get_loop_mode**\ (\ ) The loop mode. This information will be imported automatically from the WAV file if present. See :ref:`LoopMode` constants for values. @@ -240,12 +257,12 @@ The loop mode. This information will be imported automatically from the WAV file .. rst-class:: classref-property -:ref:`int` **mix_rate** = ``44100`` +:ref:`int` **mix_rate** = ``44100`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mix_rate** **(** :ref:`int` value **)** -- :ref:`int` **get_mix_rate** **(** **)** +- |void| **set_mix_rate**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_mix_rate**\ (\ ) The sample rate for mixing this audio. Higher values require more storage space, but result in better quality. @@ -261,12 +278,12 @@ According to the `Nyquist-Shannon sampling theorem ` **stereo** = ``false`` +:ref:`bool` **stereo** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stereo** **(** :ref:`bool` value **)** -- :ref:`bool` **is_stereo** **(** **)** +- |void| **set_stereo**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_stereo**\ (\ ) If ``true``, audio is stereo. @@ -283,9 +300,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **save_to_wav** **(** :ref:`String` path **)** +:ref:`Error` **save_to_wav**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM format can't be saved. +Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM or QOA formats can't be saved. \ **Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. @@ -296,3 +313,4 @@ Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM forma .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 0869c24e121..0b3ac0b753a 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -12,14 +12,14 @@ BackBufferCopy **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -Copies a region of the screen (or the whole screen) to a buffer so it can be accessed in your shader scripts using the screen texture (i.e. a uniform sampler with ``hint_screen_texture``). +A node that copies a region of the screen to a buffer for access in shader code. .. rst-class:: classref-introduction-group Description ----------- -Node for back-buffering the currently-displayed screen. The region defined in the **BackBufferCopy** node is buffered with the content of the screen it covers, or the entire screen according to the copy mode set. Use the screen texture in your shader scripts to access the buffer. +Node for back-buffering the currently-displayed screen. The region defined in the **BackBufferCopy** node is buffered with the content of the screen it covers, or the entire screen according to the :ref:`copy_mode`. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with ``hint_screen_texture``). \ **Note:** Since this node inherits from :ref:`Node2D` (and not :ref:`Control`), anchors and margins won't apply to child :ref:`Control`-derived nodes. This can be problematic when resizing the window. To avoid this, add :ref:`Control`-derived nodes as *siblings* to the **BackBufferCopy** node instead of adding them as children. @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CopyMode**: +enum **CopyMode**: :ref:`🔗` .. _class_BackBufferCopy_constant_COPY_MODE_DISABLED: @@ -89,12 +89,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CopyMode` **copy_mode** = ``1`` +:ref:`CopyMode` **copy_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_copy_mode** **(** :ref:`CopyMode` value **)** -- :ref:`CopyMode` **get_copy_mode** **(** **)** +- |void| **set_copy_mode**\ (\ value\: :ref:`CopyMode`\ ) +- :ref:`CopyMode` **get_copy_mode**\ (\ ) Buffer mode. See :ref:`CopyMode` constants. @@ -106,12 +106,12 @@ Buffer mode. See :ref:`CopyMode` constants. .. rst-class:: classref-property -:ref:`Rect2` **rect** = ``Rect2(-100, -100, 200, 200)`` +:ref:`Rect2` **rect** = ``Rect2(-100, -100, 200, 200)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rect** **(** :ref:`Rect2` value **)** -- :ref:`Rect2` **get_rect** **(** **)** +- |void| **set_rect**\ (\ value\: :ref:`Rect2`\ ) +- :ref:`Rect2` **get_rect**\ (\ ) The area covered by the **BackBufferCopy**. Only used if :ref:`copy_mode` is :ref:`COPY_MODE_RECT`. @@ -122,3 +122,4 @@ The area covered by the **BackBufferCopy**. Only used if :ref:`copy_mode` | :ref:`button_group` | | +-------------------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ - | |bitfield|\<:ref:`MouseButtonMask`\> | :ref:`button_mask` | ``1`` | + | |bitfield|\[:ref:`MouseButtonMask`\] | :ref:`button_mask` | ``1`` | +-------------------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ | :ref:`bool` | :ref:`button_pressed` | ``false`` | +-------------------------------------------------------------------------+-----------------------------------------------------------------------------+---------------------------------------------------------------------+ @@ -63,17 +63,17 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pressed` **(** **)** |virtual| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_toggled` **(** :ref:`bool` button_pressed **)** |virtual| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | :ref:`DrawMode` | :ref:`get_draw_mode` **(** **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_hovered` **(** **)** |const| | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pressed_no_signal` **(** :ref:`bool` pressed **)** | - +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pressed`\ (\ ) |virtual| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_toggled`\ (\ toggled_on\: :ref:`bool`\ ) |virtual| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`DrawMode` | :ref:`get_draw_mode`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_hovered`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pressed_no_signal`\ (\ pressed\: :ref:`bool`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,7 +88,7 @@ Signals .. rst-class:: classref-signal -**button_down** **(** **)** +**button_down**\ (\ ) :ref:`🔗` Emitted when the button starts being held down. @@ -100,7 +100,7 @@ Emitted when the button starts being held down. .. rst-class:: classref-signal -**button_up** **(** **)** +**button_up**\ (\ ) :ref:`🔗` Emitted when the button stops being held down. @@ -112,7 +112,7 @@ Emitted when the button stops being held down. .. rst-class:: classref-signal -**pressed** **(** **)** +**pressed**\ (\ ) :ref:`🔗` Emitted when the button is toggled or pressed. This is on :ref:`button_down` if :ref:`action_mode` is :ref:`ACTION_MODE_BUTTON_PRESS` and on :ref:`button_up` otherwise. @@ -126,9 +126,9 @@ If you need to know the button's pressed state (and :ref:`toggle_mode` button_pressed **)** +**toggled**\ (\ toggled_on\: :ref:`bool`\ ) :ref:`🔗` -Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``button_pressed`` argument. +Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``toggled_on`` argument. .. rst-class:: classref-section-separator @@ -143,7 +143,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawMode**: +enum **DrawMode**: :ref:`🔗` .. _class_BaseButton_constant_DRAW_NORMAL: @@ -193,7 +193,7 @@ The state of buttons are both hovered and pressed. .. rst-class:: classref-enumeration -enum **ActionMode**: +enum **ActionMode**: :ref:`🔗` .. _class_BaseButton_constant_ACTION_MODE_BUTTON_PRESS: @@ -224,12 +224,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ActionMode` **action_mode** = ``1`` +:ref:`ActionMode` **action_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_action_mode** **(** :ref:`ActionMode` value **)** -- :ref:`ActionMode` **get_action_mode** **(** **)** +- |void| **set_action_mode**\ (\ value\: :ref:`ActionMode`\ ) +- :ref:`ActionMode` **get_action_mode**\ (\ ) Determines when the button is considered clicked, one of the :ref:`ActionMode` constants. @@ -241,12 +241,12 @@ Determines when the button is considered clicked, one of the :ref:`ActionMode` **button_group** +:ref:`ButtonGroup` **button_group** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_button_group** **(** :ref:`ButtonGroup` value **)** -- :ref:`ButtonGroup` **get_button_group** **(** **)** +- |void| **set_button_group**\ (\ value\: :ref:`ButtonGroup`\ ) +- :ref:`ButtonGroup` **get_button_group**\ (\ ) The :ref:`ButtonGroup` associated with the button. Not to be confused with node groups. @@ -260,12 +260,12 @@ The :ref:`ButtonGroup` associated with the button. Not to be .. rst-class:: classref-property -|bitfield|\<:ref:`MouseButtonMask`\> **button_mask** = ``1`` +|bitfield|\[:ref:`MouseButtonMask`\] **button_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_button_mask** **(** |bitfield|\<:ref:`MouseButtonMask`\> value **)** -- |bitfield|\<:ref:`MouseButtonMask`\> **get_button_mask** **(** **)** +- |void| **set_button_mask**\ (\ value\: |bitfield|\[:ref:`MouseButtonMask`\]\ ) +- |bitfield|\[:ref:`MouseButtonMask`\] **get_button_mask**\ (\ ) Binary mask to choose which mouse buttons this button will respond to. @@ -279,12 +279,12 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B .. rst-class:: classref-property -:ref:`bool` **button_pressed** = ``false`` +:ref:`bool` **button_pressed** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool` value **)** -- :ref:`bool` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pressed**\ (\ ) If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode` is active). Only works if :ref:`toggle_mode` is ``true``. @@ -298,12 +298,12 @@ If ``true``, the button's state is pressed. Means the button is pressed down or .. rst-class:: classref-property -:ref:`bool` **disabled** = ``false`` +:ref:`bool` **disabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** +- |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_disabled**\ (\ ) If ``true``, the button is in disabled state and can't be clicked or toggled. @@ -315,12 +315,12 @@ If ``true``, the button is in disabled state and can't be clicked or toggled. .. rst-class:: classref-property -:ref:`bool` **keep_pressed_outside** = ``false`` +:ref:`bool` **keep_pressed_outside** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_keep_pressed_outside** **(** :ref:`bool` value **)** -- :ref:`bool` **is_keep_pressed_outside** **(** **)** +- |void| **set_keep_pressed_outside**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_keep_pressed_outside**\ (\ ) If ``true``, the button stays pressed when moving the cursor outside the button while pressing it. @@ -334,12 +334,12 @@ If ``true``, the button stays pressed when moving the cursor outside the button .. rst-class:: classref-property -:ref:`Shortcut` **shortcut** +:ref:`Shortcut` **shortcut** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shortcut** **(** :ref:`Shortcut` value **)** -- :ref:`Shortcut` **get_shortcut** **(** **)** +- |void| **set_shortcut**\ (\ value\: :ref:`Shortcut`\ ) +- :ref:`Shortcut` **get_shortcut**\ (\ ) :ref:`Shortcut` associated to the button. @@ -351,12 +351,12 @@ If ``true``, the button stays pressed when moving the cursor outside the button .. rst-class:: classref-property -:ref:`bool` **shortcut_feedback** = ``true`` +:ref:`bool` **shortcut_feedback** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shortcut_feedback** **(** :ref:`bool` value **)** -- :ref:`bool` **is_shortcut_feedback** **(** **)** +- |void| **set_shortcut_feedback**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_shortcut_feedback**\ (\ ) If ``true``, the button will highlight for a short amount of time when its shortcut is activated. If ``false`` and :ref:`toggle_mode` is ``false``, the shortcut will activate without any visual feedback. @@ -368,12 +368,12 @@ If ``true``, the button will highlight for a short amount of time when its short .. rst-class:: classref-property -:ref:`bool` **shortcut_in_tooltip** = ``true`` +:ref:`bool` **shortcut_in_tooltip** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shortcut_in_tooltip** **(** :ref:`bool` value **)** -- :ref:`bool` **is_shortcut_in_tooltip_enabled** **(** **)** +- |void| **set_shortcut_in_tooltip**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_shortcut_in_tooltip_enabled**\ (\ ) If ``true``, the button will add information about its shortcut in the tooltip. @@ -385,12 +385,12 @@ If ``true``, the button will add information about its shortcut in the tooltip. .. rst-class:: classref-property -:ref:`bool` **toggle_mode** = ``false`` +:ref:`bool` **toggle_mode** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_toggle_mode** **(** :ref:`bool` value **)** -- :ref:`bool` **is_toggle_mode** **(** **)** +- |void| **set_toggle_mode**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_toggle_mode**\ (\ ) If ``true``, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. @@ -403,23 +403,23 @@ If ``true``, the button is in toggle mode. Makes the button flip state between p Method Descriptions ------------------- -.. _class_BaseButton_method__pressed: +.. _class_BaseButton_private_method__pressed: .. rst-class:: classref-method -void **_pressed** **(** **)** |virtual| +|void| **_pressed**\ (\ ) |virtual| :ref:`🔗` -Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled` instead. +Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled` instead. .. rst-class:: classref-item-separator ---- -.. _class_BaseButton_method__toggled: +.. _class_BaseButton_private_method__toggled: .. rst-class:: classref-method -void **_toggled** **(** :ref:`bool` button_pressed **)** |virtual| +|void| **_toggled**\ (\ toggled_on\: :ref:`bool`\ ) |virtual| :ref:`🔗` Called when the button is toggled (only if :ref:`toggle_mode` is active). @@ -431,7 +431,7 @@ Called when the button is toggled (only if :ref:`toggle_mode` **get_draw_mode** **(** **)** |const| +:ref:`DrawMode` **get_draw_mode**\ (\ ) |const| :ref:`🔗` Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the :ref:`DrawMode` enum. @@ -443,7 +443,7 @@ Returns the visual state used to draw the button. This is useful mainly when imp .. rst-class:: classref-method -:ref:`bool` **is_hovered** **(** **)** |const| +:ref:`bool` **is_hovered**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the mouse has entered the button and has not left it yet. @@ -455,7 +455,7 @@ Returns ``true`` if the mouse has entered the button and has not left it yet. .. rst-class:: classref-method -void **set_pressed_no_signal** **(** :ref:`bool` pressed **)** +|void| **set_pressed_no_signal**\ (\ pressed\: :ref:`bool`\ ) :ref:`🔗` Changes the :ref:`button_pressed` state of the button, without emitting :ref:`toggled`. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if :ref:`toggle_mode` is ``true``. @@ -468,3 +468,4 @@ Changes the :ref:`button_pressed` stat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 6acb8e27126..02634ebaf45 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -14,21 +14,21 @@ BaseMaterial3D **Inherited By:** :ref:`ORMMaterial3D`, :ref:`StandardMaterial3D` -Default 3D rendering material. +Abstract base class for defining the 3D rendering properties of meshes. .. rst-class:: classref-introduction-group Description ----------- -This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. +This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`Standard Material 3D <../tutorials/3d/standard_material_3d>` +- :doc:`Standard Material 3D and ORM Material 3D <../tutorials/3d/standard_material_3d>` .. rst-class:: classref-reftable-group @@ -111,6 +111,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disable_ambient_light` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_fog` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disable_receive_shadows` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`distance_fade_max_distance` | ``10.0`` | @@ -280,19 +282,19 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_feature` **(** :ref:`Feature` feature **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`TextureParam` param **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_feature` **(** :ref:`Feature` feature, :ref:`bool` enable **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enable **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture` **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag`\ (\ flag\: :ref:`Flags`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_texture`\ (\ param\: :ref:`TextureParam`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_feature`\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag`\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture`\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -307,7 +309,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TextureParam**: +enum **TextureParam**: :ref:`🔗` .. _class_BaseMaterial3D_constant_TEXTURE_ALBEDO: @@ -469,7 +471,7 @@ Represents the size of the :ref:`TextureParam` .. rst-class:: classref-enumeration -enum **TextureFilter**: +enum **TextureFilter**: :ref:`🔗` .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST: @@ -477,7 +479,7 @@ enum **TextureFilter**: :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR: @@ -485,7 +487,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -493,7 +495,7 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -501,7 +503,7 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -509,7 +511,7 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``4`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -517,7 +519,7 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. .. _class_BaseMaterial3D_constant_TEXTURE_FILTER_MAX: @@ -535,7 +537,7 @@ Represents the size of the :ref:`TextureFilter` .. _class_BaseMaterial3D_constant_DETAIL_UV_1: @@ -561,7 +563,7 @@ Use ``UV2`` with the detail texture. .. rst-class:: classref-enumeration -enum **Transparency**: +enum **Transparency**: :ref:`🔗` .. _class_BaseMaterial3D_constant_TRANSPARENCY_DISABLED: @@ -619,7 +621,7 @@ Represents the size of the :ref:`Transparency` .. rst-class:: classref-enumeration -enum **ShadingMode**: +enum **ShadingMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_SHADING_MODE_UNSHADED: @@ -661,7 +663,7 @@ Represents the size of the :ref:`ShadingMode` e .. rst-class:: classref-enumeration -enum **Feature**: +enum **Feature**: :ref:`🔗` .. _class_BaseMaterial3D_constant_FEATURE_EMISSION: @@ -775,7 +777,7 @@ Represents the size of the :ref:`Feature` enum. .. rst-class:: classref-enumeration -enum **BlendMode**: +enum **BlendMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_BLEND_MODE_MIX: @@ -809,6 +811,14 @@ The color of the object is subtracted from the background. The color of the object is multiplied by the background. +.. _class_BaseMaterial3D_constant_BLEND_MODE_PREMULT_ALPHA: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendMode` **BLEND_MODE_PREMULT_ALPHA** = ``4`` + +The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the ``PREMUL_ALPHA_FACTOR`` built-in so that lighting can be modulated as well. + .. rst-class:: classref-item-separator ---- @@ -817,7 +827,7 @@ The color of the object is multiplied by the background. .. rst-class:: classref-enumeration -enum **AlphaAntiAliasing**: +enum **AlphaAntiAliasing**: :ref:`🔗` .. _class_BaseMaterial3D_constant_ALPHA_ANTIALIASING_OFF: @@ -851,7 +861,7 @@ Enables AlphaToCoverage and forces all non-zero alpha values to ``1``. Alpha val .. rst-class:: classref-enumeration -enum **DepthDrawMode**: +enum **DepthDrawMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_DEPTH_DRAW_OPAQUE_ONLY: @@ -887,7 +897,7 @@ Objects will not write their depth to the depth buffer, even during the depth pr .. rst-class:: classref-enumeration -enum **CullMode**: +enum **CullMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_CULL_BACK: @@ -921,7 +931,7 @@ No face culling is performed; both the front face and back face will be visible. .. rst-class:: classref-enumeration -enum **Flags**: +enum **Flags**: :ref:`🔗` .. _class_BaseMaterial3D_constant_FLAG_DISABLE_DEPTH_TEST: @@ -1093,11 +1103,19 @@ Enables parts of the shader required for :ref:`GPUParticles3D` **FLAG_DISABLE_FOG** = ``21`` + +Disables receiving depth-based or volumetric fog. + .. _class_BaseMaterial3D_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Flags` **FLAG_MAX** = ``21`` +:ref:`Flags` **FLAG_MAX** = ``22`` Represents the size of the :ref:`Flags` enum. @@ -1109,7 +1127,7 @@ Represents the size of the :ref:`Flags` enum. .. rst-class:: classref-enumeration -enum **DiffuseMode**: +enum **DiffuseMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_DIFFUSE_BURLEY: @@ -1151,7 +1169,7 @@ Uses a hard cut for lighting, with smoothing affected by roughness. .. rst-class:: classref-enumeration -enum **SpecularMode**: +enum **SpecularMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_SPECULAR_SCHLICK_GGX: @@ -1185,7 +1203,7 @@ No specular blob. This is slightly faster to render than other specular modes. .. rst-class:: classref-enumeration -enum **BillboardMode**: +enum **BillboardMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_BILLBOARD_DISABLED: @@ -1217,7 +1235,7 @@ The object's X axis will always face the camera. :ref:`BillboardMode` **BILLBOARD_PARTICLES** = ``3`` -Used for particle systems when assigned to :ref:`GPUParticles3D` and :ref:`CPUParticles3D` nodes. Enables ``particles_anim_*`` properties. +Used for particle systems when assigned to :ref:`GPUParticles3D` and :ref:`CPUParticles3D` nodes (flipbook animation). Enables ``particles_anim_*`` properties. The :ref:`ParticleProcessMaterial.anim_speed_min` or :ref:`CPUParticles3D.anim_speed_min` should also be set to a value bigger than zero for the animation to play. @@ -1229,7 +1247,7 @@ The :ref:`ParticleProcessMaterial.anim_speed_min` .. _class_BaseMaterial3D_constant_TEXTURE_CHANNEL_RED: @@ -1279,7 +1297,7 @@ Used to read from the linear (non-perceptual) average of the red, green and blue .. rst-class:: classref-enumeration -enum **EmissionOperator**: +enum **EmissionOperator**: :ref:`🔗` .. _class_BaseMaterial3D_constant_EMISSION_OP_ADD: @@ -1305,7 +1323,7 @@ Multiplies the emission color by the color from the emission texture. .. rst-class:: classref-enumeration -enum **DistanceFadeMode**: +enum **DistanceFadeMode**: :ref:`🔗` .. _class_BaseMaterial3D_constant_DISTANCE_FADE_DISABLED: @@ -1352,12 +1370,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **albedo_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **albedo_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_albedo** **(** :ref:`Color` value **)** -- :ref:`Color` **get_albedo** **(** **)** +- |void| **set_albedo**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_albedo**\ (\ ) The material's base color. @@ -1371,12 +1389,12 @@ The material's base color. .. rst-class:: classref-property -:ref:`Texture2D` **albedo_texture** +:ref:`Texture2D` **albedo_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture to multiply by :ref:`albedo_color`. Used for basic texturing of objects. @@ -1390,12 +1408,12 @@ If the texture appears unexpectedly too dark or too bright, check :ref:`albedo_t .. rst-class:: classref-property -:ref:`bool` **albedo_texture_force_srgb** = ``false`` +:ref:`bool` **albedo_texture_force_srgb** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, forces a conversion of the :ref:`albedo_texture` from sRGB color space to linear color space. See also :ref:`vertex_color_is_srgb`. @@ -1409,12 +1427,12 @@ This should only be enabled when needed (typically when using a :ref:`ViewportTe .. rst-class:: classref-property -:ref:`bool` **albedo_texture_msdf** = ``false`` +:ref:`bool` **albedo_texture_msdf** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| Enables multichannel signed distance field rendering shader. Use :ref:`msdf_pixel_range` and :ref:`msdf_outline_size` to configure MSDF parameters. @@ -1426,12 +1444,12 @@ Enables multichannel signed distance field rendering shader. Use :ref:`msdf_pixe .. rst-class:: classref-property -:ref:`float` **alpha_antialiasing_edge** +:ref:`float` **alpha_antialiasing_edge** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing_edge** **(** :ref:`float` value **)** -- :ref:`float` **get_alpha_antialiasing_edge** **(** **)** +- |void| **set_alpha_antialiasing_edge**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_alpha_antialiasing_edge**\ (\ ) Threshold at which antialiasing will be applied on the alpha channel. @@ -1443,12 +1461,12 @@ Threshold at which antialiasing will be applied on the alpha channel. .. rst-class:: classref-property -:ref:`AlphaAntiAliasing` **alpha_antialiasing_mode** +:ref:`AlphaAntiAliasing` **alpha_antialiasing_mode** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing** **(** :ref:`AlphaAntiAliasing` value **)** -- :ref:`AlphaAntiAliasing` **get_alpha_antialiasing** **(** **)** +- |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing`\ ) +- :ref:`AlphaAntiAliasing` **get_alpha_antialiasing**\ (\ ) The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing`. @@ -1460,12 +1478,12 @@ The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing` **alpha_hash_scale** +:ref:`float` **alpha_hash_scale** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alpha_hash_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_alpha_hash_scale** **(** **)** +- |void| **set_alpha_hash_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_alpha_hash_scale**\ (\ ) The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. @@ -1477,12 +1495,12 @@ The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. .. rst-class:: classref-property -:ref:`float` **alpha_scissor_threshold** +:ref:`float` **alpha_scissor_threshold** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alpha_scissor_threshold** **(** :ref:`float` value **)** -- :ref:`float` **get_alpha_scissor_threshold** **(** **)** +- |void| **set_alpha_scissor_threshold**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_alpha_scissor_threshold**\ (\ ) Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing :ref:`alpha_scissor_threshold`. If the material disappears at a distance, try decreasing :ref:`alpha_scissor_threshold`. @@ -1494,12 +1512,12 @@ Threshold at which the alpha scissor will discard values. Higher values will res .. rst-class:: classref-property -:ref:`float` **anisotropy** = ``0.0`` +:ref:`float` **anisotropy** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_anisotropy** **(** :ref:`float` value **)** -- :ref:`float` **get_anisotropy** **(** **)** +- |void| **set_anisotropy**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_anisotropy**\ (\ ) The strength of the anisotropy effect. This is multiplied by :ref:`anisotropy_flowmap`'s alpha channel if a texture is defined there and the texture contains an alpha channel. @@ -1511,12 +1529,12 @@ The strength of the anisotropy effect. This is multiplied by :ref:`anisotropy_fl .. rst-class:: classref-property -:ref:`bool` **anisotropy_enabled** = ``false`` +:ref:`bool` **anisotropy_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. @@ -1532,12 +1550,12 @@ If ``true``, anisotropy is enabled. Anisotropy changes the shape of the specular .. rst-class:: classref-property -:ref:`Texture2D` **anisotropy_flowmap** +:ref:`Texture2D` **anisotropy_flowmap** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion. @@ -1551,12 +1569,12 @@ If present, the texture's alpha channel will be used to multiply the strength of .. rst-class:: classref-property -:ref:`bool` **ao_enabled** = ``false`` +:ref:`bool` **ao_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, ambient occlusion is enabled. Ambient occlusion darkens areas based on the :ref:`ao_texture`. @@ -1568,12 +1586,12 @@ If ``true``, ambient occlusion is enabled. Ambient occlusion darkens areas based .. rst-class:: classref-property -:ref:`float` **ao_light_affect** = ``0.0`` +:ref:`float` **ao_light_affect** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ao_light_affect** **(** :ref:`float` value **)** -- :ref:`float` **get_ao_light_affect** **(** **)** +- |void| **set_ao_light_affect**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_ao_light_affect**\ (\ ) Amount that ambient occlusion affects lighting from lights. If ``0``, ambient occlusion only affects ambient light. If ``1``, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. @@ -1585,12 +1603,12 @@ Amount that ambient occlusion affects lighting from lights. If ``0``, ambient oc .. rst-class:: classref-property -:ref:`bool` **ao_on_uv2** = ``false`` +:ref:`bool` **ao_on_uv2** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, use ``UV2`` coordinates to look up from the :ref:`ao_texture`. @@ -1602,12 +1620,12 @@ If ``true``, use ``UV2`` coordinates to look up from the :ref:`ao_texture` **ao_texture** +:ref:`Texture2D` **ao_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that defines the amount of ambient occlusion for a given point on the object. @@ -1619,12 +1637,12 @@ Texture that defines the amount of ambient occlusion for a given point on the ob .. rst-class:: classref-property -:ref:`TextureChannel` **ao_texture_channel** = ``0`` +:ref:`TextureChannel` **ao_texture_channel** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ao_texture_channel** **(** :ref:`TextureChannel` value **)** -- :ref:`TextureChannel` **get_ao_texture_channel** **(** **)** +- |void| **set_ao_texture_channel**\ (\ value\: :ref:`TextureChannel`\ ) +- :ref:`TextureChannel` **get_ao_texture_channel**\ (\ ) Specifies the channel of the :ref:`ao_texture` in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. @@ -1636,12 +1654,12 @@ Specifies the channel of the :ref:`ao_texture` **backlight** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **backlight** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_backlight** **(** :ref:`Color` value **)** -- :ref:`Color` **get_backlight** **(** **)** +- |void| **set_backlight**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_backlight**\ (\ ) The color used by the backlight effect. Represents the light passing through an object. @@ -1653,12 +1671,12 @@ The color used by the backlight effect. Represents the light passing through an .. rst-class:: classref-property -:ref:`bool` **backlight_enabled** = ``false`` +:ref:`bool` **backlight_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, the backlight effect is enabled. See also :ref:`subsurf_scatter_transmittance_enabled`. @@ -1670,12 +1688,12 @@ If ``true``, the backlight effect is enabled. See also :ref:`subsurf_scatter_tra .. rst-class:: classref-property -:ref:`Texture2D` **backlight_texture** +:ref:`Texture2D` **backlight_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to control the backlight effect per-pixel. Added to :ref:`backlight`. @@ -1687,12 +1705,12 @@ Texture used to control the backlight effect per-pixel. Added to :ref:`backlight .. rst-class:: classref-property -:ref:`bool` **billboard_keep_scale** = ``false`` +:ref:`bool` **billboard_keep_scale** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when :ref:`billboard_mode` is not :ref:`BILLBOARD_DISABLED`. @@ -1704,15 +1722,17 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca .. rst-class:: classref-property -:ref:`BillboardMode` **billboard_mode** = ``0`` +:ref:`BillboardMode` **billboard_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_billboard_mode** **(** :ref:`BillboardMode` value **)** -- :ref:`BillboardMode` **get_billboard_mode** **(** **)** +- |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode`\ ) +- :ref:`BillboardMode` **get_billboard_mode**\ (\ ) Controls how the object faces the camera. See :ref:`BillboardMode`. +\ **Note:** When billboarding is enabled and the material also casts shadows, billboards will face **the** camera in the scene when rendering shadows. In scenes with multiple cameras, the intended shadow cannot be determined and this will result in undefined behavior. See `GitHub Pull Request #72638 `__ for details. + \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 `__ for details. .. rst-class:: classref-item-separator @@ -1723,12 +1743,12 @@ Controls how the object faces the camera. See :ref:`BillboardMode` **blend_mode** = ``0`` +:ref:`BlendMode` **blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_mode** **(** :ref:`BlendMode` value **)** -- :ref:`BlendMode` **get_blend_mode** **(** **)** +- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) +- :ref:`BlendMode` **get_blend_mode**\ (\ ) The material's blend mode. @@ -1742,12 +1762,12 @@ The material's blend mode. .. rst-class:: classref-property -:ref:`float` **clearcoat** = ``1.0`` +:ref:`float` **clearcoat** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clearcoat** **(** :ref:`float` value **)** -- :ref:`float` **get_clearcoat** **(** **)** +- |void| **set_clearcoat**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_clearcoat**\ (\ ) Sets the strength of the clearcoat effect. Setting to ``0`` looks the same as disabling the clearcoat effect. @@ -1759,12 +1779,12 @@ Sets the strength of the clearcoat effect. Setting to ``0`` looks the same as di .. rst-class:: classref-property -:ref:`bool` **clearcoat_enabled** = ``false`` +:ref:`bool` **clearcoat_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. @@ -1778,12 +1798,12 @@ If ``true``, clearcoat rendering is enabled. Adds a secondary transparent pass t .. rst-class:: classref-property -:ref:`float` **clearcoat_roughness** = ``0.5`` +:ref:`float` **clearcoat_roughness** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clearcoat_roughness** **(** :ref:`float` value **)** -- :ref:`float` **get_clearcoat_roughness** **(** **)** +- |void| **set_clearcoat_roughness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_clearcoat_roughness**\ (\ ) Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat. @@ -1795,12 +1815,12 @@ Sets the roughness of the clearcoat pass. A higher value results in a rougher cl .. rst-class:: classref-property -:ref:`Texture2D` **clearcoat_texture** +:ref:`Texture2D` **clearcoat_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. @@ -1812,12 +1832,12 @@ Texture that defines the strength of the clearcoat effect and the glossiness of .. rst-class:: classref-property -:ref:`CullMode` **cull_mode** = ``0`` +:ref:`CullMode` **cull_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cull_mode** **(** :ref:`CullMode` value **)** -- :ref:`CullMode` **get_cull_mode** **(** **)** +- |void| **set_cull_mode**\ (\ value\: :ref:`CullMode`\ ) +- :ref:`CullMode` **get_cull_mode**\ (\ ) Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See :ref:`CullMode`. @@ -1829,12 +1849,12 @@ Determines which side of the triangle to cull depending on whether the triangle .. rst-class:: classref-property -:ref:`DepthDrawMode` **depth_draw_mode** = ``0`` +:ref:`DepthDrawMode` **depth_draw_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_depth_draw_mode** **(** :ref:`DepthDrawMode` value **)** -- :ref:`DepthDrawMode` **get_depth_draw_mode** **(** **)** +- |void| **set_depth_draw_mode**\ (\ value\: :ref:`DepthDrawMode`\ ) +- :ref:`DepthDrawMode` **get_depth_draw_mode**\ (\ ) Determines when depth rendering takes place. See :ref:`DepthDrawMode`. See also :ref:`transparency`. @@ -1846,12 +1866,12 @@ Determines when depth rendering takes place. See :ref:`DepthDrawMode` **detail_albedo** +:ref:`Texture2D` **detail_albedo** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that specifies the color of the detail overlay. :ref:`detail_albedo`'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see :ref:`detail_mask`. @@ -1865,12 +1885,12 @@ Texture that specifies the color of the detail overlay. :ref:`detail_albedo` **detail_blend_mode** = ``0`` +:ref:`BlendMode` **detail_blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_detail_blend_mode** **(** :ref:`BlendMode` value **)** -- :ref:`BlendMode` **get_detail_blend_mode** **(** **)** +- |void| **set_detail_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) +- :ref:`BlendMode` **get_detail_blend_mode**\ (\ ) Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. See :ref:`BlendMode` for options. @@ -1882,12 +1902,12 @@ Specifies how the :ref:`detail_albedo` **detail_enabled** = ``false`` +:ref:`bool` **detail_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on :ref:`detail_mask` and :ref:`detail_albedo`'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. @@ -1899,12 +1919,12 @@ If ``true``, enables the detail overlay. Detail is a second texture that gets mi .. rst-class:: classref-property -:ref:`Texture2D` **detail_mask** +:ref:`Texture2D` **detail_mask** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to specify how the detail textures get blended with the base textures. :ref:`detail_mask` can be used together with :ref:`detail_albedo`'s alpha channel (if any). @@ -1916,12 +1936,12 @@ Texture used to specify how the detail textures get blended with the base textur .. rst-class:: classref-property -:ref:`Texture2D` **detail_normal** +:ref:`Texture2D` **detail_normal** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that specifies the per-pixel normal of the detail overlay. The :ref:`detail_normal` texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`detail_normal` is oriented around the surface normal provided by the :ref:`Mesh`. @@ -1935,12 +1955,12 @@ Texture that specifies the per-pixel normal of the detail overlay. The :ref:`det .. rst-class:: classref-property -:ref:`DetailUV` **detail_uv_layer** = ``0`` +:ref:`DetailUV` **detail_uv_layer** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_detail_uv** **(** :ref:`DetailUV` value **)** -- :ref:`DetailUV` **get_detail_uv** **(** **)** +- |void| **set_detail_uv**\ (\ value\: :ref:`DetailUV`\ ) +- :ref:`DetailUV` **get_detail_uv**\ (\ ) Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV` for options. @@ -1952,12 +1972,12 @@ Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`Detai .. rst-class:: classref-property -:ref:`DiffuseMode` **diffuse_mode** = ``0`` +:ref:`DiffuseMode` **diffuse_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_diffuse_mode** **(** :ref:`DiffuseMode` value **)** -- :ref:`DiffuseMode` **get_diffuse_mode** **(** **)** +- |void| **set_diffuse_mode**\ (\ value\: :ref:`DiffuseMode`\ ) +- :ref:`DiffuseMode` **get_diffuse_mode**\ (\ ) The algorithm used for diffuse light scattering. See :ref:`DiffuseMode`. @@ -1969,12 +1989,12 @@ The algorithm used for diffuse light scattering. See :ref:`DiffuseMode` **disable_ambient_light** = ``false`` +:ref:`bool` **disable_ambient_light** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, the object receives no ambient light. @@ -1982,16 +2002,33 @@ If ``true``, the object receives no ambient light. ---- +.. _class_BaseMaterial3D_property_disable_fog: + +.. rst-class:: classref-property + +:ref:`bool` **disable_fog** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +If ``true``, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_disable_receive_shadows: .. rst-class:: classref-property -:ref:`bool` **disable_receive_shadows** = ``false`` +:ref:`bool` **disable_receive_shadows** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, the object receives no shadow that would otherwise be cast onto it. @@ -2003,16 +2040,16 @@ If ``true``, the object receives no shadow that would otherwise be cast onto it. .. rst-class:: classref-property -:ref:`float` **distance_fade_max_distance** = ``10.0`` +:ref:`float` **distance_fade_max_distance** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_distance_fade_max_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_distance_fade_max_distance** **(** **)** +- |void| **set_distance_fade_max_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_distance_fade_max_distance**\ (\ ) Distance at which the object appears fully opaque. -\ **Note:** If ``distance_fade_max_distance`` is less than ``distance_fade_min_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``. +\ **Note:** If :ref:`distance_fade_max_distance` is less than :ref:`distance_fade_min_distance`, the behavior will be reversed. The object will start to fade away at :ref:`distance_fade_max_distance` and will fully disappear once it reaches :ref:`distance_fade_min_distance`. .. rst-class:: classref-item-separator @@ -2022,16 +2059,16 @@ Distance at which the object appears fully opaque. .. rst-class:: classref-property -:ref:`float` **distance_fade_min_distance** = ``0.0`` +:ref:`float` **distance_fade_min_distance** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_distance_fade_min_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_distance_fade_min_distance** **(** **)** +- |void| **set_distance_fade_min_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_distance_fade_min_distance**\ (\ ) Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. -\ **Note:** If ``distance_fade_min_distance`` is greater than ``distance_fade_max_distance``, the behavior will be reversed. The object will start to fade away at ``distance_fade_max_distance`` and will fully disappear once it reaches ``distance_fade_min_distance``. +\ **Note:** If :ref:`distance_fade_min_distance` is greater than :ref:`distance_fade_max_distance`, the behavior will be reversed. The object will start to fade away at :ref:`distance_fade_max_distance` and will fully disappear once it reaches :ref:`distance_fade_min_distance`. .. rst-class:: classref-item-separator @@ -2041,12 +2078,12 @@ Distance at which the object starts to become visible. If the object is less tha .. rst-class:: classref-property -:ref:`DistanceFadeMode` **distance_fade_mode** = ``0`` +:ref:`DistanceFadeMode` **distance_fade_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_distance_fade** **(** :ref:`DistanceFadeMode` value **)** -- :ref:`DistanceFadeMode` **get_distance_fade** **(** **)** +- |void| **set_distance_fade**\ (\ value\: :ref:`DistanceFadeMode`\ ) +- :ref:`DistanceFadeMode` **get_distance_fade**\ (\ ) Specifies which type of fade to use. Can be any of the :ref:`DistanceFadeMode`\ s. @@ -2058,12 +2095,12 @@ Specifies which type of fade to use. Can be any of the :ref:`DistanceFadeMode` **emission** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission** **(** :ref:`Color` value **)** -- :ref:`Color` **get_emission** **(** **)** +- |void| **set_emission**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_emission**\ (\ ) The emitted light's color. See :ref:`emission_enabled`. @@ -2075,12 +2112,12 @@ The emitted light's color. See :ref:`emission_enabled` **emission_enabled** = ``false`` +:ref:`bool` **emission_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a :ref:`VoxelGI`, SDFGI, or :ref:`LightmapGI` is used and this object is used in baked lighting. @@ -2092,12 +2129,12 @@ If ``true``, the body emits light. Emitting light makes the object appear bright .. rst-class:: classref-property -:ref:`float` **emission_energy_multiplier** = ``1.0`` +:ref:`float` **emission_energy_multiplier** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_energy_multiplier** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_energy_multiplier** **(** **)** +- |void| **set_emission_energy_multiplier**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_energy_multiplier**\ (\ ) Multiplier for emitted light. See :ref:`emission_enabled`. @@ -2109,12 +2146,12 @@ Multiplier for emitted light. See :ref:`emission_enabled` **emission_intensity** +:ref:`float` **emission_intensity** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_intensity** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_intensity** **(** **)** +- |void| **set_emission_intensity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_intensity**\ (\ ) Luminance of emitted light, measured in nits (candela per square meter). Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. The default is roughly equivalent to an indoor lightbulb. @@ -2126,12 +2163,12 @@ Luminance of emitted light, measured in nits (candela per square meter). Only av .. rst-class:: classref-property -:ref:`bool` **emission_on_uv2** = ``false`` +:ref:`bool` **emission_on_uv2** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| Use ``UV2`` to read from the :ref:`emission_texture`. @@ -2143,12 +2180,12 @@ Use ``UV2`` to read from the :ref:`emission_texture` **emission_operator** = ``0`` +:ref:`EmissionOperator` **emission_operator** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_operator** **(** :ref:`EmissionOperator` value **)** -- :ref:`EmissionOperator` **get_emission_operator** **(** **)** +- |void| **set_emission_operator**\ (\ value\: :ref:`EmissionOperator`\ ) +- :ref:`EmissionOperator` **get_emission_operator**\ (\ ) Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. See :ref:`EmissionOperator` for options. @@ -2160,12 +2197,12 @@ Sets how :ref:`emission` interacts with .. rst-class:: classref-property -:ref:`Texture2D` **emission_texture** +:ref:`Texture2D` **emission_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that specifies how much surface emits light at a given point. @@ -2177,12 +2214,12 @@ Texture that specifies how much surface emits light at a given point. .. rst-class:: classref-property -:ref:`bool` **fixed_size** = ``false`` +:ref:`bool` **fixed_size** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, the object is rendered at the same size regardless of distance. @@ -2194,12 +2231,12 @@ If ``true``, the object is rendered at the same size regardless of distance. .. rst-class:: classref-property -:ref:`bool` **grow** = ``false`` +:ref:`bool` **grow** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_grow_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_grow_enabled** **(** **)** +- |void| **set_grow_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_grow_enabled**\ (\ ) If ``true``, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its :ref:`cull_mode` set to :ref:`CULL_FRONT`. See also :ref:`grow_amount`. @@ -2213,12 +2250,12 @@ If ``true``, enables the vertex grow setting. This can be used to create mesh-ba .. rst-class:: classref-property -:ref:`float` **grow_amount** = ``0.0`` +:ref:`float` **grow_amount** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_grow** **(** :ref:`float` value **)** -- :ref:`float` **get_grow** **(** **)** +- |void| **set_grow**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_grow**\ (\ ) Grows object vertices in the direction of their normals. Only effective if :ref:`grow` is ``true``. @@ -2230,12 +2267,12 @@ Grows object vertices in the direction of their normals. Only effective if :ref: .. rst-class:: classref-property -:ref:`bool` **heightmap_deep_parallax** = ``false`` +:ref:`bool` **heightmap_deep_parallax** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_deep_parallax** **(** :ref:`bool` value **)** -- :ref:`bool` **is_heightmap_deep_parallax_enabled** **(** **)** +- |void| **set_heightmap_deep_parallax**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_heightmap_deep_parallax_enabled**\ (\ ) If ``true``, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see :ref:`heightmap_enabled`). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference. @@ -2247,12 +2284,12 @@ If ``true``, uses parallax occlusion mapping to represent depth in the material .. rst-class:: classref-property -:ref:`bool` **heightmap_enabled** = ``false`` +:ref:`bool` **heightmap_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also :ref:`normal_enabled`. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. @@ -2266,12 +2303,12 @@ If ``true``, height mapping is enabled (also called "parallax mapping" or "depth .. rst-class:: classref-property -:ref:`bool` **heightmap_flip_binormal** = ``false`` +:ref:`bool` **heightmap_flip_binormal** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_deep_parallax_flip_binormal** **(** :ref:`bool` value **)** -- :ref:`bool` **get_heightmap_deep_parallax_flip_binormal** **(** **)** +- |void| **set_heightmap_deep_parallax_flip_binormal**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_heightmap_deep_parallax_flip_binormal**\ (\ ) If ``true``, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale`), try setting this to ``true``. @@ -2283,12 +2320,12 @@ If ``true``, flips the mesh's binormal vectors when interpreting the height map. .. rst-class:: classref-property -:ref:`bool` **heightmap_flip_tangent** = ``false`` +:ref:`bool` **heightmap_flip_tangent** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_deep_parallax_flip_tangent** **(** :ref:`bool` value **)** -- :ref:`bool` **get_heightmap_deep_parallax_flip_tangent** **(** **)** +- |void| **set_heightmap_deep_parallax_flip_tangent**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_heightmap_deep_parallax_flip_tangent**\ (\ ) If ``true``, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable :ref:`heightmap_scale`), try setting this to ``true``. @@ -2300,12 +2337,12 @@ If ``true``, flips the mesh's tangent vectors when interpreting the height map. .. rst-class:: classref-property -:ref:`bool` **heightmap_flip_texture** = ``false`` +:ref:`bool` **heightmap_flip_texture** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. @@ -2319,12 +2356,12 @@ This can be enabled for compatibility with some materials authored for Godot 3.x .. rst-class:: classref-property -:ref:`int` **heightmap_max_layers** +:ref:`int` **heightmap_max_layers** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_deep_parallax_max_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_heightmap_deep_parallax_max_layers** **(** **)** +- |void| **set_heightmap_deep_parallax_max_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_heightmap_deep_parallax_max_layers**\ (\ ) The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. @@ -2338,12 +2375,12 @@ The number of layers to use for parallax occlusion mapping when the camera is up .. rst-class:: classref-property -:ref:`int` **heightmap_min_layers** +:ref:`int` **heightmap_min_layers** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_deep_parallax_min_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_heightmap_deep_parallax_min_layers** **(** **)** +- |void| **set_heightmap_deep_parallax_min_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_heightmap_deep_parallax_min_layers**\ (\ ) The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. @@ -2357,12 +2394,12 @@ The number of layers to use for parallax occlusion mapping when the camera is fa .. rst-class:: classref-property -:ref:`float` **heightmap_scale** = ``5.0`` +:ref:`float` **heightmap_scale** = ``5.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_heightmap_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_heightmap_scale** **(** **)** +- |void| **set_heightmap_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_heightmap_scale**\ (\ ) The heightmap scale to use for the parallax effect (see :ref:`heightmap_enabled`). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using :ref:`heightmap_flip_texture` as the material will also appear to be "closer" to the camera. In most cases, :ref:`heightmap_scale` should be kept to a positive value. @@ -2376,12 +2413,12 @@ The heightmap scale to use for the parallax effect (see :ref:`heightmap_enabled< .. rst-class:: classref-property -:ref:`Texture2D` **heightmap_texture** +:ref:`Texture2D` **heightmap_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| The texture to use as a height map. See also :ref:`heightmap_enabled`. @@ -2397,12 +2434,12 @@ For best results, the texture should be normalized (with :ref:`heightmap_scale` **metallic** = ``0.0`` +:ref:`float` **metallic** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_metallic** **(** :ref:`float` value **)** -- :ref:`float` **get_metallic** **(** **)** +- |void| **set_metallic**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_metallic**\ (\ ) A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between ``0`` and ``1`` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use :ref:`roughness`. @@ -2414,12 +2451,12 @@ A high value makes the material appear more like a metal. Non-metals use their a .. rst-class:: classref-property -:ref:`float` **metallic_specular** = ``0.5`` +:ref:`float` **metallic_specular** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_specular** **(** :ref:`float` value **)** -- :ref:`float` **get_specular** **(** **)** +- |void| **set_specular**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_specular**\ (\ ) Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to ``0.0``, no specular reflections will be visible. This differs from the :ref:`SPECULAR_DISABLED` :ref:`SpecularMode` as :ref:`SPECULAR_DISABLED` only applies to the specular lobe from the light source. @@ -2433,12 +2470,12 @@ Adjusts the strength of specular reflections. Specular reflections are composed .. rst-class:: classref-property -:ref:`Texture2D` **metallic_texture** +:ref:`Texture2D` **metallic_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to specify metallic for an object. This is multiplied by :ref:`metallic`. @@ -2450,12 +2487,12 @@ Texture used to specify metallic for an object. This is multiplied by :ref:`meta .. rst-class:: classref-property -:ref:`TextureChannel` **metallic_texture_channel** = ``0`` +:ref:`TextureChannel` **metallic_texture_channel** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_metallic_texture_channel** **(** :ref:`TextureChannel` value **)** -- :ref:`TextureChannel` **get_metallic_texture_channel** **(** **)** +- |void| **set_metallic_texture_channel**\ (\ value\: :ref:`TextureChannel`\ ) +- :ref:`TextureChannel` **get_metallic_texture_channel**\ (\ ) Specifies the channel of the :ref:`metallic_texture` in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. @@ -2467,14 +2504,14 @@ Specifies the channel of the :ref:`metallic_texture` **msdf_outline_size** = ``0.0`` +:ref:`float` **msdf_outline_size** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_msdf_outline_size** **(** :ref:`float` value **)** -- :ref:`float` **get_msdf_outline_size** **(** **)** +- |void| **set_msdf_outline_size**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_msdf_outline_size**\ (\ ) -The width of the shape outine. +The width of the shape outline. .. rst-class:: classref-item-separator @@ -2484,12 +2521,12 @@ The width of the shape outine. .. rst-class:: classref-property -:ref:`float` **msdf_pixel_range** = ``4.0`` +:ref:`float` **msdf_pixel_range** = ``4.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_msdf_pixel_range** **(** :ref:`float` value **)** -- :ref:`float` **get_msdf_pixel_range** **(** **)** +- |void| **set_msdf_pixel_range**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_msdf_pixel_range**\ (\ ) The width of the range around the shape between the minimum and maximum representable signed distance. @@ -2501,12 +2538,12 @@ The width of the range around the shape between the minimum and maximum represen .. rst-class:: classref-property -:ref:`bool` **no_depth_test** = ``false`` +:ref:`bool` **no_depth_test** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, depth testing is disabled and the object will be drawn in render order. @@ -2518,12 +2555,12 @@ If ``true``, depth testing is disabled and the object will be drawn in render or .. rst-class:: classref-property -:ref:`bool` **normal_enabled** = ``false`` +:ref:`bool` **normal_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs. @@ -2535,12 +2572,12 @@ If ``true``, normal mapping is enabled. This has a slight performance cost, espe .. rst-class:: classref-property -:ref:`float` **normal_scale** = ``1.0`` +:ref:`float` **normal_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_normal_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_normal_scale** **(** **)** +- |void| **set_normal_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_normal_scale**\ (\ ) The strength of the normal map's effect. @@ -2552,12 +2589,12 @@ The strength of the normal map's effect. .. rst-class:: classref-property -:ref:`Texture2D` **normal_texture** +:ref:`Texture2D` **normal_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to specify the normal at a given pixel. The :ref:`normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`normal_texture` is oriented around the surface normal provided by the :ref:`Mesh`. @@ -2575,12 +2612,12 @@ Texture used to specify the normal at a given pixel. The :ref:`normal_texture` **orm_texture** +:ref:`Texture2D` **orm_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of :ref:`ao_texture`, :ref:`roughness_texture` and :ref:`metallic_texture` in :ref:`ORMMaterial3D`. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored. @@ -2592,12 +2629,12 @@ The Occlusion/Roughness/Metallic texture to use. This is a more efficient replac .. rst-class:: classref-property -:ref:`int` **particles_anim_h_frames** +:ref:`int` **particles_anim_h_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_h_frames** **(** :ref:`int` value **)** -- :ref:`int` **get_particles_anim_h_frames** **(** **)** +- |void| **set_particles_anim_h_frames**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_particles_anim_h_frames**\ (\ ) The number of horizontal frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`billboard_mode`. @@ -2609,12 +2646,12 @@ The number of horizontal frames in the particle sprite sheet. Only enabled when .. rst-class:: classref-property -:ref:`bool` **particles_anim_loop** +:ref:`bool` **particles_anim_loop** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_loop** **(** :ref:`bool` value **)** -- :ref:`bool` **get_particles_anim_loop** **(** **)** +- |void| **set_particles_anim_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_particles_anim_loop**\ (\ ) If ``true``, particle animations are looped. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`billboard_mode`. @@ -2626,12 +2663,12 @@ If ``true``, particle animations are looped. Only enabled when using :ref:`BILLB .. rst-class:: classref-property -:ref:`int` **particles_anim_v_frames** +:ref:`int` **particles_anim_v_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_v_frames** **(** :ref:`int` value **)** -- :ref:`int` **get_particles_anim_v_frames** **(** **)** +- |void| **set_particles_anim_v_frames**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_particles_anim_v_frames**\ (\ ) The number of vertical frames in the particle sprite sheet. Only enabled when using :ref:`BILLBOARD_PARTICLES`. See :ref:`billboard_mode`. @@ -2643,12 +2680,12 @@ The number of vertical frames in the particle sprite sheet. Only enabled when us .. rst-class:: classref-property -:ref:`float` **point_size** = ``1.0`` +:ref:`float` **point_size** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_point_size** **(** :ref:`float` value **)** -- :ref:`float` **get_point_size** **(** **)** +- |void| **set_point_size**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_point_size**\ (\ ) The point size in pixels. See :ref:`use_point_size`. @@ -2660,12 +2697,12 @@ The point size in pixels. See :ref:`use_point_size` **proximity_fade_distance** = ``1.0`` +:ref:`float` **proximity_fade_distance** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_proximity_fade_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_proximity_fade_distance** **(** **)** +- |void| **set_proximity_fade_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_proximity_fade_distance**\ (\ ) Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. @@ -2677,12 +2714,12 @@ Distance over which the fade effect takes place. The larger the distance the lon .. rst-class:: classref-property -:ref:`bool` **proximity_fade_enabled** = ``false`` +:ref:`bool` **proximity_fade_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_proximity_fade_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_proximity_fade_enabled** **(** **)** +- |void| **set_proximity_fade_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_proximity_fade_enabled**\ (\ ) If ``true``, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. @@ -2694,12 +2731,12 @@ If ``true``, the proximity fade effect is enabled. The proximity fade effect fad .. rst-class:: classref-property -:ref:`bool` **refraction_enabled** = ``false`` +:ref:`bool` **refraction_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, the refraction effect is enabled. Distorts transparency based on light from behind the object. @@ -2711,12 +2748,12 @@ If ``true``, the refraction effect is enabled. Distorts transparency based on li .. rst-class:: classref-property -:ref:`float` **refraction_scale** = ``0.05`` +:ref:`float` **refraction_scale** = ``0.05`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_refraction** **(** :ref:`float` value **)** -- :ref:`float` **get_refraction** **(** **)** +- |void| **set_refraction**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_refraction**\ (\ ) The strength of the refraction effect. @@ -2728,12 +2765,12 @@ The strength of the refraction effect. .. rst-class:: classref-property -:ref:`Texture2D` **refraction_texture** +:ref:`Texture2D` **refraction_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture that controls the strength of the refraction per-pixel. Multiplied by :ref:`refraction_scale`. @@ -2745,12 +2782,12 @@ Texture that controls the strength of the refraction per-pixel. Multiplied by :r .. rst-class:: classref-property -:ref:`TextureChannel` **refraction_texture_channel** = ``0`` +:ref:`TextureChannel` **refraction_texture_channel** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_refraction_texture_channel** **(** :ref:`TextureChannel` value **)** -- :ref:`TextureChannel` **get_refraction_texture_channel** **(** **)** +- |void| **set_refraction_texture_channel**\ (\ value\: :ref:`TextureChannel`\ ) +- :ref:`TextureChannel` **get_refraction_texture_channel**\ (\ ) Specifies the channel of the :ref:`refraction_texture` in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. @@ -2762,12 +2799,12 @@ Specifies the channel of the :ref:`refraction_texture` **rim** = ``1.0`` +:ref:`float` **rim** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rim** **(** :ref:`float` value **)** -- :ref:`float` **get_rim** **(** **)** +- |void| **set_rim**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rim**\ (\ ) Sets the strength of the rim lighting effect. @@ -2779,12 +2816,12 @@ Sets the strength of the rim lighting effect. .. rst-class:: classref-property -:ref:`bool` **rim_enabled** = ``false`` +:ref:`bool` **rim_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. @@ -2798,12 +2835,12 @@ If ``true``, rim effect is enabled. Rim lighting increases the brightness at gla .. rst-class:: classref-property -:ref:`Texture2D` **rim_texture** +:ref:`Texture2D` **rim_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by :ref:`rim`. @@ -2815,12 +2852,12 @@ Texture used to set the strength of the rim lighting effect per-pixel. Multiplie .. rst-class:: classref-property -:ref:`float` **rim_tint** = ``0.5`` +:ref:`float` **rim_tint** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rim_tint** **(** :ref:`float` value **)** -- :ref:`float` **get_rim_tint** **(** **)** +- |void| **set_rim_tint**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rim_tint**\ (\ ) The amount of to blend light and albedo color when rendering rim effect. If ``0`` the light color is used, while ``1`` means albedo color is used. An intermediate value generally works best. @@ -2832,12 +2869,12 @@ The amount of to blend light and albedo color when rendering rim effect. If ``0` .. rst-class:: classref-property -:ref:`float` **roughness** = ``1.0`` +:ref:`float` **roughness** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_roughness** **(** :ref:`float` value **)** -- :ref:`float` **get_roughness** **(** **)** +- |void| **set_roughness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_roughness**\ (\ ) Surface reflection. A value of ``0`` represents a perfect mirror while a value of ``1`` completely blurs the reflection. See also :ref:`metallic`. @@ -2849,12 +2886,12 @@ Surface reflection. A value of ``0`` represents a perfect mirror while a value o .. rst-class:: classref-property -:ref:`Texture2D` **roughness_texture** +:ref:`Texture2D` **roughness_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to control the roughness per-pixel. Multiplied by :ref:`roughness`. @@ -2866,12 +2903,12 @@ Texture used to control the roughness per-pixel. Multiplied by :ref:`roughness` **roughness_texture_channel** = ``0`` +:ref:`TextureChannel` **roughness_texture_channel** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_roughness_texture_channel** **(** :ref:`TextureChannel` value **)** -- :ref:`TextureChannel` **get_roughness_texture_channel** **(** **)** +- |void| **set_roughness_texture_channel**\ (\ value\: :ref:`TextureChannel`\ ) +- :ref:`TextureChannel` **get_roughness_texture_channel**\ (\ ) Specifies the channel of the :ref:`roughness_texture` in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. @@ -2883,12 +2920,12 @@ Specifies the channel of the :ref:`roughness_texture` **shading_mode** = ``1`` +:ref:`ShadingMode` **shading_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shading_mode** **(** :ref:`ShadingMode` value **)** -- :ref:`ShadingMode` **get_shading_mode** **(** **)** +- |void| **set_shading_mode**\ (\ value\: :ref:`ShadingMode`\ ) +- :ref:`ShadingMode` **get_shading_mode**\ (\ ) Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. Unshaded rendering is the fastest, but disables all interactions with lights. @@ -2902,12 +2939,12 @@ Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-ver .. rst-class:: classref-property -:ref:`bool` **shadow_to_opacity** = ``false`` +:ref:`bool` **shadow_to_opacity** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. @@ -2919,12 +2956,12 @@ If ``true``, enables the "shadow to opacity" render mode where lighting modifies .. rst-class:: classref-property -:ref:`SpecularMode` **specular_mode** = ``0`` +:ref:`SpecularMode` **specular_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_specular_mode** **(** :ref:`SpecularMode` value **)** -- :ref:`SpecularMode` **get_specular_mode** **(** **)** +- |void| **set_specular_mode**\ (\ value\: :ref:`SpecularMode`\ ) +- :ref:`SpecularMode` **get_specular_mode**\ (\ ) The method for rendering the specular blob. See :ref:`SpecularMode`. @@ -2938,12 +2975,12 @@ The method for rendering the specular blob. See :ref:`SpecularMode` **subsurf_scatter_enabled** = ``false`` +:ref:`bool` **subsurf_scatter_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality`. @@ -2955,12 +2992,12 @@ If ``true``, subsurface scattering is enabled. Emulates light that penetrates an .. rst-class:: classref-property -:ref:`bool` **subsurf_scatter_skin_mode** = ``false`` +:ref:`bool` **subsurf_scatter_skin_mode** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering. @@ -2972,12 +3009,12 @@ If ``true``, subsurface scattering will use a special mode optimized for the col .. rst-class:: classref-property -:ref:`float` **subsurf_scatter_strength** = ``0.0`` +:ref:`float` **subsurf_scatter_strength** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_subsurface_scattering_strength** **(** :ref:`float` value **)** -- :ref:`float` **get_subsurface_scattering_strength** **(** **)** +- |void| **set_subsurface_scattering_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_subsurface_scattering_strength**\ (\ ) The strength of the subsurface scattering effect. The depth of the effect is also controlled by :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale`, which is set globally. @@ -2989,12 +3026,12 @@ The strength of the subsurface scattering effect. The depth of the effect is als .. rst-class:: classref-property -:ref:`Texture2D` **subsurf_scatter_texture** +:ref:`Texture2D` **subsurf_scatter_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by :ref:`subsurf_scatter_strength`. @@ -3006,12 +3043,12 @@ Texture used to control the subsurface scattering strength. Stored in the red te .. rst-class:: classref-property -:ref:`float` **subsurf_scatter_transmittance_boost** = ``0.0`` +:ref:`float` **subsurf_scatter_transmittance_boost** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transmittance_boost** **(** :ref:`float` value **)** -- :ref:`float` **get_transmittance_boost** **(** **)** +- |void| **set_transmittance_boost**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_transmittance_boost**\ (\ ) The intensity of the subsurface scattering transmittance effect. @@ -3023,12 +3060,12 @@ The intensity of the subsurface scattering transmittance effect. .. rst-class:: classref-property -:ref:`Color` **subsurf_scatter_transmittance_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **subsurf_scatter_transmittance_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transmittance_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_transmittance_color** **(** **)** +- |void| **set_transmittance_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_transmittance_color**\ (\ ) The color to multiply the subsurface scattering transmittance effect with. Ignored if :ref:`subsurf_scatter_skin_mode` is ``true``. @@ -3040,12 +3077,12 @@ The color to multiply the subsurface scattering transmittance effect with. Ignor .. rst-class:: classref-property -:ref:`float` **subsurf_scatter_transmittance_depth** = ``0.1`` +:ref:`float` **subsurf_scatter_transmittance_depth** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transmittance_depth** **(** :ref:`float` value **)** -- :ref:`float` **get_transmittance_depth** **(** **)** +- |void| **set_transmittance_depth**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_transmittance_depth**\ (\ ) The depth of the subsurface scattering transmittance effect. @@ -3057,12 +3094,12 @@ The depth of the subsurface scattering transmittance effect. .. rst-class:: classref-property -:ref:`bool` **subsurf_scatter_transmittance_enabled** = ``false`` +:ref:`bool` **subsurf_scatter_transmittance_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** -- :ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| If ``true``, enables subsurface scattering transmittance. Only effective if :ref:`subsurf_scatter_enabled` is ``true``. See also :ref:`backlight_enabled`. @@ -3074,14 +3111,14 @@ If ``true``, enables subsurface scattering transmittance. Only effective if :ref .. rst-class:: classref-property -:ref:`Texture2D` **subsurf_scatter_transmittance_texture** +:ref:`Texture2D` **subsurf_scatter_transmittance_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`TextureParam` param **)** |const| +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| -The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also :ref:`subsurf_scatter_texture`. Ignored if :ref:`subsurf_scatter_skin_mode` is ``true``. +The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also :ref:`subsurf_scatter_texture`. Ignored if :ref:`subsurf_scatter_skin_mode` is ``true``. .. rst-class:: classref-item-separator @@ -3091,12 +3128,12 @@ The texture to use for multiplying the intensity of the subsurface scattering tr .. rst-class:: classref-property -:ref:`TextureFilter` **texture_filter** = ``3`` +:ref:`TextureFilter` **texture_filter** = ``3`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** -- :ref:`TextureFilter` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) +- :ref:`TextureFilter` **get_texture_filter**\ (\ ) Filter flags for the texture. See :ref:`TextureFilter` for options. @@ -3110,12 +3147,12 @@ Filter flags for the texture. See :ref:`TextureFilter` **texture_repeat** = ``true`` +:ref:`bool` **texture_repeat** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| Repeat flags for the texture. See :ref:`TextureFilter` for options. @@ -3127,12 +3164,12 @@ Repeat flags for the texture. See :ref:`TextureFilter` **transparency** = ``0`` +:ref:`Transparency` **transparency** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transparency** **(** :ref:`Transparency` value **)** -- :ref:`Transparency` **get_transparency** **(** **)** +- |void| **set_transparency**\ (\ value\: :ref:`Transparency`\ ) +- :ref:`Transparency` **get_transparency**\ (\ ) The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than :ref:`TRANSPARENCY_DISABLED` has a greater performance impact compared to opaque rendering. See also :ref:`blend_mode`. @@ -3144,12 +3181,12 @@ The material's transparency mode. Some transparency modes will disable shadow ca .. rst-class:: classref-property -:ref:`bool` **use_particle_trails** = ``false`` +:ref:`bool` **use_particle_trails** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, enables parts of the shader required for :ref:`GPUParticles3D` trails to function. This also requires using a mesh with appropriate skinning, such as :ref:`RibbonTrailMesh` or :ref:`TubeTrailMesh`. Enabling this feature outside of materials used in :ref:`GPUParticles3D` meshes will break material rendering. @@ -3161,12 +3198,12 @@ If ``true``, enables parts of the shader required for :ref:`GPUParticles3D` **use_point_size** = ``false`` +:ref:`bool` **use_point_size** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, render point size can be changed. @@ -3180,12 +3217,12 @@ If ``true``, render point size can be changed. .. rst-class:: classref-property -:ref:`Vector3` **uv1_offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **uv1_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv1_offset** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_uv1_offset** **(** **)** +- |void| **set_uv1_offset**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_uv1_offset**\ (\ ) How much to offset the ``UV`` coordinates. This amount will be added to ``UV`` in the vertex function. This can be used to offset a texture. The Z component is used when :ref:`uv1_triplanar` is enabled, but it is not used anywhere else. @@ -3197,12 +3234,12 @@ How much to offset the ``UV`` coordinates. This amount will be added to ``UV`` i .. rst-class:: classref-property -:ref:`Vector3` **uv1_scale** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **uv1_scale** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv1_scale** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_uv1_scale** **(** **)** +- |void| **set_uv1_scale**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_uv1_scale**\ (\ ) How much to scale the ``UV`` coordinates. This is multiplied by ``UV`` in the vertex function. The Z component is used when :ref:`uv1_triplanar` is enabled, but it is not used anywhere else. @@ -3214,12 +3251,12 @@ How much to scale the ``UV`` coordinates. This is multiplied by ``UV`` in the ve .. rst-class:: classref-property -:ref:`bool` **uv1_triplanar** = ``false`` +:ref:`bool` **uv1_triplanar** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, instead of using ``UV`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. @@ -3231,12 +3268,12 @@ If ``true``, instead of using ``UV`` textures will use a triplanar texture looku .. rst-class:: classref-property -:ref:`float` **uv1_triplanar_sharpness** = ``1.0`` +:ref:`float` **uv1_triplanar_sharpness** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv1_triplanar_blend_sharpness** **(** :ref:`float` value **)** -- :ref:`float` **get_uv1_triplanar_blend_sharpness** **(** **)** +- |void| **set_uv1_triplanar_blend_sharpness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_uv1_triplanar_blend_sharpness**\ (\ ) A lower number blends the texture more softly while a higher number blends the texture more sharply. @@ -3250,12 +3287,12 @@ A lower number blends the texture more softly while a higher number blends the t .. rst-class:: classref-property -:ref:`bool` **uv1_world_triplanar** = ``false`` +:ref:`bool` **uv1_world_triplanar** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, triplanar mapping for ``UV`` is calculated in world space rather than object local space. See also :ref:`uv1_triplanar`. @@ -3267,12 +3304,12 @@ If ``true``, triplanar mapping for ``UV`` is calculated in world space rather th .. rst-class:: classref-property -:ref:`Vector3` **uv2_offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **uv2_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv2_offset** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_uv2_offset** **(** **)** +- |void| **set_uv2_offset**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_uv2_offset**\ (\ ) How much to offset the ``UV2`` coordinates. This amount will be added to ``UV2`` in the vertex function. This can be used to offset a texture. The Z component is used when :ref:`uv2_triplanar` is enabled, but it is not used anywhere else. @@ -3284,12 +3321,12 @@ How much to offset the ``UV2`` coordinates. This amount will be added to ``UV2`` .. rst-class:: classref-property -:ref:`Vector3` **uv2_scale** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **uv2_scale** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv2_scale** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_uv2_scale** **(** **)** +- |void| **set_uv2_scale**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_uv2_scale**\ (\ ) How much to scale the ``UV2`` coordinates. This is multiplied by ``UV2`` in the vertex function. The Z component is used when :ref:`uv2_triplanar` is enabled, but it is not used anywhere else. @@ -3301,12 +3338,12 @@ How much to scale the ``UV2`` coordinates. This is multiplied by ``UV2`` in the .. rst-class:: classref-property -:ref:`bool` **uv2_triplanar** = ``false`` +:ref:`bool` **uv2_triplanar** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, instead of using ``UV2`` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. @@ -3318,12 +3355,12 @@ If ``true``, instead of using ``UV2`` textures will use a triplanar texture look .. rst-class:: classref-property -:ref:`float` **uv2_triplanar_sharpness** = ``1.0`` +:ref:`float` **uv2_triplanar_sharpness** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_uv2_triplanar_blend_sharpness** **(** :ref:`float` value **)** -- :ref:`float` **get_uv2_triplanar_blend_sharpness** **(** **)** +- |void| **set_uv2_triplanar_blend_sharpness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_uv2_triplanar_blend_sharpness**\ (\ ) A lower number blends the texture more softly while a higher number blends the texture more sharply. @@ -3337,12 +3374,12 @@ A lower number blends the texture more softly while a higher number blends the t .. rst-class:: classref-property -:ref:`bool` **uv2_world_triplanar** = ``false`` +:ref:`bool` **uv2_world_triplanar** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, triplanar mapping for ``UV2`` is calculated in world space rather than object local space. See also :ref:`uv2_triplanar`. @@ -3354,12 +3391,12 @@ If ``true``, triplanar mapping for ``UV2`` is calculated in world space rather t .. rst-class:: classref-property -:ref:`bool` **vertex_color_is_srgb** = ``false`` +:ref:`bool` **vertex_color_is_srgb** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If ``false``, vertex colors are considered to be stored in linear color space and are rendered as-is. See also :ref:`albedo_texture_force_srgb`. @@ -3373,12 +3410,12 @@ If ``true``, vertex colors are considered to be stored in sRGB color space and a .. rst-class:: classref-property -:ref:`bool` **vertex_color_use_as_albedo** = ``false`` +:ref:`bool` **vertex_color_use_as_albedo** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** -- :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| If ``true``, the vertex color is used as albedo color. @@ -3395,7 +3432,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **get_feature** **(** :ref:`Feature` feature **)** |const| +:ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| :ref:`🔗` Returns ``true``, if the specified :ref:`Feature` is enabled. @@ -3407,7 +3444,7 @@ Returns ``true``, if the specified :ref:`Feature` i .. rst-class:: classref-method -:ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| +:ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| :ref:`🔗` Returns ``true``, if the specified flag is enabled. See :ref:`Flags` enumerator for options. @@ -3419,7 +3456,7 @@ Returns ``true``, if the specified flag is enabled. See :ref:`Flags` **get_texture** **(** :ref:`TextureParam` param **)** |const| +:ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| :ref:`🔗` Returns the :ref:`Texture2D` associated with the specified :ref:`TextureParam`. @@ -3431,7 +3468,7 @@ Returns the :ref:`Texture2D` associated with the specified :ref .. rst-class:: classref-method -void **set_feature** **(** :ref:`Feature` feature, :ref:`bool` enable **)** +|void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, enables the specified :ref:`Feature`. Many features that are available in **BaseMaterial3D**\ s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to ``true``. @@ -3443,7 +3480,7 @@ If ``true``, enables the specified :ref:`Feature`. .. rst-class:: classref-method -void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** +|void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. See :ref:`Flags` enumerator for options. @@ -3455,7 +3492,7 @@ If ``true``, enables the specified flag. Flags are optional behavior that can be .. rst-class:: classref-method -void **set_texture** **(** :ref:`TextureParam` param, :ref:`Texture2D` texture **)** +|void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` Sets the texture for the slot specified by ``param``. See :ref:`TextureParam` for available slots. @@ -3466,3 +3503,4 @@ Sets the texture for the slot specified by ``param``. See :ref:`TextureParam`. +The **Basis** built-in :ref:`Variant` type is a 3×3 `matrix `__ used to represent 3D rotation, scale, and shear. It is frequently used within a :ref:`Transform3D`. -Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). +A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x`, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. -Basis can also be accessed as an array of 3D vectors. These vectors are usually orthogonal to each other, but are not necessarily normalized (due to scaling). +A **Basis** is **orthogonal** if its axes are perpendicular to each other. A basis is **normalized** if the length of every axis is ``1``. A basis is **uniform** if all axes share the same length (see :ref:`get_scale`). A basis is **orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations. A basis is **conformal** if it is both orthogonal and uniform, which ensures it is not distorted. -For more information, read the "Matrices and transforms" documentation article. +For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. + +\ **Note:** Godot uses a `right-handed coordinate system `__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `Importing 3D Scenes <../tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions>`__ tutorial. + +\ **Note:** The basis matrices are exposed as `column-major `__ order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX. .. note:: @@ -40,13 +44,13 @@ Tutorials - :doc:`Using 3D transforms <../tutorials/3d/using_transforms>` -- `Matrix Transform Demo `__ +- `Matrix Transform Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `2.5D Demo `__ +- `2.5D Game Demo `__ .. rst-class:: classref-reftable-group @@ -72,17 +76,17 @@ Constructors .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`Basis` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`Basis` **(** :ref:`Basis` from **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`Basis` **(** :ref:`Vector3` axis, :ref:`float` angle **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`Basis` **(** :ref:`Quaternion` from **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`Basis` **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`Basis`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`Basis`\ (\ from\: :ref:`Basis`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`Basis`\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`Basis`\ (\ from\: :ref:`Quaternion`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`Basis`\ (\ x_axis\: :ref:`Vector3`, y_axis\: :ref:`Vector3`, z_axis\: :ref:`Vector3`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -92,43 +96,45 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`determinant` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`from_euler` **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`from_scale` **(** :ref:`Vector3` scale **)** |static| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_euler` **(** :ref:`int` order=2 **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_rotation_quaternion` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_scale` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`inverse` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Basis` b **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`looking_at` **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |static| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`orthonormalized` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`rotated` **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`scaled` **(** :ref:`Vector3` scale **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`slerp` **(** :ref:`Basis` to, :ref:`float` weight **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdotx` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdoty` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`tdotz` **(** :ref:`Vector3` with **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`transposed` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`determinant`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`from_euler`\ (\ euler\: :ref:`Vector3`, order\: :ref:`int` = 2\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`from_scale`\ (\ scale\: :ref:`Vector3`\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_euler`\ (\ order\: :ref:`int` = 2\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_rotation_quaternion`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_scale`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`inverse`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_conformal`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ b\: :ref:`Basis`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_finite`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`looking_at`\ (\ target\: :ref:`Vector3`, up\: :ref:`Vector3` = Vector3(0, 1, 0), use_model_front\: :ref:`bool` = false\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`orthonormalized`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`rotated`\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`scaled`\ (\ scale\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`slerp`\ (\ to\: :ref:`Basis`, weight\: :ref:`float`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdotx`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdoty`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tdotz`\ (\ with\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`transposed`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -138,21 +144,25 @@ Operators .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`Basis` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`operator *` **(** :ref:`Basis` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`operator *` **(** :ref:`Vector3` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`operator *` **(** :ref:`float` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`operator *` **(** :ref:`int` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`Basis` right **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`operator []` **(** :ref:`int` index **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Basis`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`operator *`\ (\ right\: :ref:`Basis`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator *`\ (\ right\: :ref:`Vector3`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`operator *`\ (\ right\: :ref:`float`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`operator *`\ (\ right\: :ref:`int`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`operator /`\ (\ right\: :ref:`float`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`operator /`\ (\ right\: :ref:`int`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Basis`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`operator []`\ (\ index\: :ref:`int`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -167,35 +177,60 @@ Constants .. rst-class:: classref-constant -**IDENTITY** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` +**IDENTITY** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` :ref:`🔗` + +The identity basis. This is a basis with no rotation, no shear, and its scale being ``1``. This means that: + +- The :ref:`x` points right (:ref:`Vector3.RIGHT`); + +- The :ref:`y` points up (:ref:`Vector3.UP`); -The identity basis, with no rotation or scaling applied. +- The :ref:`z` points back (:ref:`Vector3.BACK`). -This is identical to calling ``Basis()`` without any parameters. This constant can be used to make your code clearer, and for consistency with C#. +:: + + var basis := Basis.IDENTITY + print("| X | Y | Z") + print("| %s | %s | %s" % [basis.x.x, basis.y.x, basis.z.x]) + print("| %s | %s | %s" % [basis.x.y, basis.y.y, basis.z.y]) + print("| %s | %s | %s" % [basis.x.z, basis.y.z, basis.z.z]) + # Prints: + # | X | Y | Z + # | 1 | 0 | 0 + # | 0 | 1 | 0 + # | 0 | 0 | 1 + +This is identical to creating :ref:`Basis` without any parameters. This constant can be used to make your code clearer, and for consistency with C#. .. _class_Basis_constant_FLIP_X: .. rst-class:: classref-constant -**FLIP_X** = ``Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)`` +**FLIP_X** = ``Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)`` :ref:`🔗` -The basis that will flip something along the X axis when used in a transformation. +When any basis is multiplied by :ref:`FLIP_X`, it negates all components of the :ref:`x` axis (the X column). + +When :ref:`FLIP_X` is multiplied by any basis, it negates the :ref:`Vector3.x` component of all axes (the X row). .. _class_Basis_constant_FLIP_Y: .. rst-class:: classref-constant -**FLIP_Y** = ``Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)`` +**FLIP_Y** = ``Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)`` :ref:`🔗` + +When any basis is multiplied by :ref:`FLIP_Y`, it negates all components of the :ref:`y` axis (the Y column). -The basis that will flip something along the Y axis when used in a transformation. +When :ref:`FLIP_Y` is multiplied by any basis, it negates the :ref:`Vector3.y` component of all axes (the Y row). .. _class_Basis_constant_FLIP_Z: .. rst-class:: classref-constant -**FLIP_Z** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)`` +**FLIP_Z** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)`` :ref:`🔗` -The basis that will flip something along the Z axis when used in a transformation. +When any basis is multiplied by :ref:`FLIP_Z`, it negates all components of the :ref:`z` axis (the Z column). + +When :ref:`FLIP_Z` is multiplied by any basis, it negates the :ref:`Vector3.z` component of all axes (the Z row). .. rst-class:: classref-section-separator @@ -210,9 +245,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **x** = ``Vector3(1, 0, 0)`` +:ref:`Vector3` **x** = ``Vector3(1, 0, 0)`` :ref:`🔗` + +The basis's X axis, and the column ``0`` of the matrix. -The basis matrix's X vector (column 0). Equivalent to array index ``0``. +On the identity basis, this vector points right (:ref:`Vector3.RIGHT`). .. rst-class:: classref-item-separator @@ -222,9 +259,11 @@ The basis matrix's X vector (column 0). Equivalent to array index ``0``. .. rst-class:: classref-property -:ref:`Vector3` **y** = ``Vector3(0, 1, 0)`` +:ref:`Vector3` **y** = ``Vector3(0, 1, 0)`` :ref:`🔗` -The basis matrix's Y vector (column 1). Equivalent to array index ``1``. +The basis's Y axis, and the column ``1`` of the matrix. + +On the identity basis, this vector points up (:ref:`Vector3.UP`). .. rst-class:: classref-item-separator @@ -234,9 +273,11 @@ The basis matrix's Y vector (column 1). Equivalent to array index ``1``. .. rst-class:: classref-property -:ref:`Vector3` **z** = ``Vector3(0, 0, 1)`` +:ref:`Vector3` **z** = ``Vector3(0, 0, 1)`` :ref:`🔗` + +The basis's Z axis, and the column ``2`` of the matrix. -The basis matrix's Z vector (column 2). Equivalent to array index ``2``. +On the identity basis, this vector points back (:ref:`Vector3.BACK`). .. rst-class:: classref-section-separator @@ -251,9 +292,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Basis` **Basis** **(** **)** +:ref:`Basis` **Basis**\ (\ ) :ref:`🔗` -Constructs a default-initialized **Basis** set to :ref:`IDENTITY`. +Constructs a **Basis** identical to the :ref:`IDENTITY`. .. rst-class:: classref-item-separator @@ -261,7 +302,7 @@ Constructs a default-initialized **Basis** set to :ref:`IDENTITY` **Basis** **(** :ref:`Basis` from **)** +:ref:`Basis` **Basis**\ (\ from\: :ref:`Basis`\ ) Constructs a **Basis** as a copy of the given **Basis**. @@ -271,9 +312,11 @@ Constructs a **Basis** as a copy of the given **Basis**. .. rst-class:: classref-constructor -:ref:`Basis` **Basis** **(** :ref:`Vector3` axis, :ref:`float` angle **)** +:ref:`Basis` **Basis**\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) -Constructs a pure rotation basis matrix, rotated around the given ``axis`` by ``angle`` (in radians). The axis must be a normalized vector. +Constructs a **Basis** that only represents rotation, rotated around the ``axis`` by the given ``angle``, in radians. The axis must be a normalized vector. + +\ **Note:** This is the same as using :ref:`rotated` on the :ref:`IDENTITY` basis. With more than one angle consider using :ref:`from_euler`, instead. .. rst-class:: classref-item-separator @@ -281,9 +324,11 @@ Constructs a pure rotation basis matrix, rotated around the given ``axis`` by `` .. rst-class:: classref-constructor -:ref:`Basis` **Basis** **(** :ref:`Quaternion` from **)** +:ref:`Basis` **Basis**\ (\ from\: :ref:`Quaternion`\ ) + +Constructs a **Basis** that only represents rotation from the given :ref:`Quaternion`. -Constructs a pure rotation basis matrix from the given quaternion. +\ **Note:** Quaternions *only* store rotation, not scale. Because of this, conversions from **Basis** to :ref:`Quaternion` cannot always be reversed. .. rst-class:: classref-item-separator @@ -291,9 +336,9 @@ Constructs a pure rotation basis matrix from the given quaternion. .. rst-class:: classref-constructor -:ref:`Basis` **Basis** **(** :ref:`Vector3` x_axis, :ref:`Vector3` y_axis, :ref:`Vector3` z_axis **)** +:ref:`Basis` **Basis**\ (\ x_axis\: :ref:`Vector3`, y_axis\: :ref:`Vector3`, z_axis\: :ref:`Vector3`\ ) -Constructs a basis matrix from 3 axis vectors (matrix columns). +Constructs a **Basis** from 3 axis vectors. These are the columns of the basis matrix. .. rst-class:: classref-section-separator @@ -308,11 +353,15 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **determinant** **(** **)** |const| +:ref:`float` **determinant**\ (\ ) |const| :ref:`🔗` + +Returns the `determinant `__ of this basis's matrix. For advanced math, this number can be used to determine a few attributes: + +- If the determinant is exactly ``0``, the basis is not invertible (see :ref:`inverse`). -Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale. +- If the determinant is a negative number, the basis represents a negative scale. -A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid. +\ **Note:** If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2. .. rst-class:: classref-item-separator @@ -322,9 +371,36 @@ A negative determinant means the basis has a negative scale. A zero determinant .. rst-class:: classref-method -:ref:`Basis` **from_euler** **(** :ref:`Vector3` euler, :ref:`int` order=2 **)** |static| +:ref:`Basis` **from_euler**\ (\ euler\: :ref:`Vector3`, order\: :ref:`int` = 2\ ) |static| :ref:`🔗` -Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the :ref:`EulerOrder` enum for possible values. +Constructs a new **Basis** that only represents rotation from the given :ref:`Vector3` of `Euler angles `__, in radians. + +- The :ref:`Vector3.x` should contain the angle around the :ref:`x` axis (pitch). + +- The :ref:`Vector3.y` should contain the angle around the :ref:`y` axis (yaw). + +- The :ref:`Vector3.z` should contain the angle around the :ref:`z` axis (roll). + + +.. tabs:: + + .. code-tab:: gdscript + + # Creates a Basis whose z axis points down. + var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0)) + + print(my_basis.z) # Prints (0, -1, 0). + + .. code-tab:: csharp + + // Creates a Basis whose z axis points down. + var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f)); + + GD.Print(myBasis.Z); // Prints (0, -1, 0). + + + +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method :ref:`get_euler`, this order is reversed. .. rst-class:: classref-item-separator @@ -334,9 +410,32 @@ Constructs a pure rotation Basis matrix from Euler angles in the specified Euler .. rst-class:: classref-method -:ref:`Basis` **from_scale** **(** :ref:`Vector3` scale **)** |static| +:ref:`Basis` **from_scale**\ (\ scale\: :ref:`Vector3`\ ) |static| :ref:`🔗` + +Constructs a new **Basis** that only represents scale, with no rotation or shear, from the given ``scale`` vector. + + +.. tabs:: + + .. code-tab:: gdscript -Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero. + var my_basis = Basis.from_scale(Vector3(2, 4, 8)) + + print(my_basis.x) # Prints (2, 0, 0). + print(my_basis.y) # Prints (0, 4, 0). + print(my_basis.z) # Prints (0, 0, 8). + + .. code-tab:: csharp + + var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f)); + + GD.Print(myBasis.X); // Prints (2, 0, 0). + GD.Print(myBasis.Y); // Prints (0, 4, 0). + GD.Print(myBasis.Z); // Prints (0, 0, 8). + + + +\ **Note:** In linear algebra, the matrix of this basis is also known as a `diagonal matrix `__. .. rst-class:: classref-item-separator @@ -346,11 +445,21 @@ Constructs a pure scale basis matrix with no rotation or shearing. The scale val .. rst-class:: classref-method -:ref:`Vector3` **get_euler** **(** :ref:`int` order=2 **)** |const| +:ref:`Vector3` **get_euler**\ (\ order\: :ref:`int` = 2\ ) |const| :ref:`🔗` + +Returns this basis's rotation as a :ref:`Vector3` of `Euler angles `__, in radians. + +- The :ref:`Vector3.x` contains the angle around the :ref:`x` axis (pitch); + +- The :ref:`Vector3.y` contains the angle around the :ref:`y` axis (yaw); + +- The :ref:`Vector3.z` contains the angle around the :ref:`z` axis (roll). -Returns the basis's rotation in the form of Euler angles. The Euler order depends on the ``order`` parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler`, this order is reversed. -Consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion` quaternion instead of Euler angles. +\ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion`. + +\ **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the :ref:`Node3D.rotation` property. .. rst-class:: classref-item-separator @@ -360,9 +469,11 @@ Consider using the :ref:`get_rotation_quaternion` **get_rotation_quaternion** **(** **)** |const| +:ref:`Quaternion` **get_rotation_quaternion**\ (\ ) |const| :ref:`🔗` + +Returns this basis's rotation as a :ref:`Quaternion`. -Returns the basis's rotation in the form of a quaternion. See :ref:`get_euler` if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. +\ **Note:** Quatenions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler` method, which returns Euler angles. .. rst-class:: classref-item-separator @@ -372,9 +483,42 @@ Returns the basis's rotation in the form of a quaternion. See :ref:`get_euler` **get_scale** **(** **)** |const| +:ref:`Vector3` **get_scale**\ (\ ) |const| :ref:`🔗` + +Returns the length of each axis of this basis, as a :ref:`Vector3`. If the basis is not sheared, this is the scaling factor. It is not affected by rotation. + + +.. tabs:: + + .. code-tab:: gdscript + + var my_basis = Basis( + Vector3(2, 0, 0), + Vector3(0, 4, 0), + Vector3(0, 0, 8) + ) + # Rotating the Basis in any way preserves its scale. + my_basis = my_basis.rotated(Vector3.UP, TAU / 2) + my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4) + + print(my_basis.get_scale()) # Prints (2, 4, 8). + + .. code-tab:: csharp -Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. + var myBasis = new Basis( + Vector3(2.0f, 0.0f, 0.0f), + Vector3(0.0f, 4.0f, 0.0f), + Vector3(0.0f, 0.0f, 8.0f) + ); + // Rotating the Basis in any way preserves its scale. + myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f); + myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f); + + GD.Print(myBasis.Scale); // Prints (2, 4, 8). + + + +\ **Note:** If the value returned by :ref:`determinant` is negative, the scale is also negative. .. rst-class:: classref-item-separator @@ -384,9 +528,21 @@ Assuming that the matrix is the combination of a rotation and scaling, return th .. rst-class:: classref-method -:ref:`Basis` **inverse** **(** **)** |const| +:ref:`Basis` **inverse**\ (\ ) |const| :ref:`🔗` + +Returns the `inverse of this basis's matrix `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Basis_method_is_conformal: + +.. rst-class:: classref-method + +:ref:`bool` **is_conformal**\ (\ ) |const| :ref:`🔗` -Returns the inverse of the matrix. +Returns ``true`` if this basis is conformal. A conformal basis is both *orthogonal* (the axes are perpendicular to each other) and *uniform* (the axes share the same length). This method can be especially useful during physics calculations. .. rst-class:: classref-item-separator @@ -396,7 +552,7 @@ Returns the inverse of the matrix. .. rst-class:: classref-method -:ref:`bool` **is_equal_approx** **(** :ref:`Basis` b **)** |const| +:ref:`bool` **is_equal_approx**\ (\ b\: :ref:`Basis`\ ) |const| :ref:`🔗` Returns ``true`` if this basis and ``b`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on all vector components. @@ -408,7 +564,7 @@ Returns ``true`` if this basis and ``b`` are approximately equal, by calling :re .. rst-class:: classref-method -:ref:`bool` **is_finite** **(** **)** |const| +:ref:`bool` **is_finite**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on all vector components. @@ -420,13 +576,13 @@ Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finit .. rst-class:: classref-method -:ref:`Basis` **looking_at** **(** :ref:`Vector3` target, :ref:`Vector3` up=Vector3(0, 1, 0), :ref:`bool` use_model_front=false **)** |static| +:ref:`Basis` **looking_at**\ (\ target\: :ref:`Vector3`, up\: :ref:`Vector3` = Vector3(0, 1, 0), use_model_front\: :ref:`bool` = false\ ) |static| :ref:`🔗` -Creates a Basis with a rotation such that the forward axis (-Z) points towards the ``target`` position. +Creates a new **Basis** with a rotation such that the forward axis (-Z) points towards the ``target`` position. -The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The ``target`` and ``up`` vectors cannot be zero, and cannot be parallel to each other. +By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position. -If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). +The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized`). The ``target`` and ``up`` vectors cannot be :ref:`Vector3.ZERO`, and cannot be parallel to each other. .. rst-class:: classref-item-separator @@ -436,9 +592,35 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw .. rst-class:: classref-method -:ref:`Basis` **orthonormalized** **(** **)** |const| +:ref:`Basis` **orthonormalized**\ (\ ) |const| :ref:`🔗` + +Returns the orthonormalized version of this basis. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1``), which also means it can only represent rotation. + +It is often useful to call this method to avoid rounding errors on a rotating basis: + + +.. tabs:: + + .. code-tab:: gdscript + + # Rotate this Node3D every frame. + func _process(delta): + basis = basis.rotated(Vector3.UP, TAU * delta) + basis = basis.rotated(Vector3.RIGHT, TAU * delta) + + basis = basis.orthonormalized() + + .. code-tab:: csharp + + // Rotate this Node3D every frame. + public override void _Process(double delta) + { + Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta) + .Rotated(Vector3.Right, Mathf.Tau * (float)delta) + .Orthonormalized(); + } + -Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix. .. rst-class:: classref-item-separator @@ -448,9 +630,34 @@ Returns the orthonormalized version of the matrix (useful to call from time to t .. rst-class:: classref-method -:ref:`Basis` **rotated** **(** :ref:`Vector3` axis, :ref:`float` angle **)** |const| +:ref:`Basis` **rotated**\ (\ axis\: :ref:`Vector3`, angle\: :ref:`float`\ ) |const| :ref:`🔗` + +Returns this basis rotated around the given ``axis`` by ``angle`` (in radians). The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized`). + +Positive values rotate this basis clockwise around the axis, while negative values rotate it counterclockwise. + + +.. tabs:: + + .. code-tab:: gdscript + + var my_basis = Basis.IDENTITY + var angle = TAU / 2 + + my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw). + my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch). + my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll). + + .. code-tab:: csharp + + var myBasis = Basis.Identity; + var angle = Mathf.Tau / 2.0f; + + myBasis = myBasis.Rotated(Vector3.Up, angle); // Rotate around the up axis (yaw). + myBasis = myBasis.Rotated(Vector3.Right, angle); // Rotate around the right axis (pitch). + myBasis = myBasis.Rotated(Vector3.Back, angle); // Rotate around the back axis (roll). + -Introduce an additional rotation around the given axis by ``angle`` (in radians). The axis must be a normalized vector. .. rst-class:: classref-item-separator @@ -460,9 +667,42 @@ Introduce an additional rotation around the given axis by ``angle`` (in radians) .. rst-class:: classref-method -:ref:`Basis` **scaled** **(** :ref:`Vector3` scale **)** |const| +:ref:`Basis` **scaled**\ (\ scale\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns this basis with each axis's components scaled by the given ``scale``'s components. + +The basis matrix's rows are multiplied by ``scale``'s components. This operation is a global scale (relative to the parent). + + +.. tabs:: + + .. code-tab:: gdscript + + var my_basis = Basis( + Vector3(1, 1, 1), + Vector3(2, 2, 2), + Vector3(3, 3, 3) + ) + my_basis = my_basis.scaled(Vector3(0, 2, -2)) + + print(my_basis.x) # Prints (0, 2, -2). + print(my_basis.y) # Prints (0, 4, -4). + print(my_basis.z) # Prints (0, 6, -6). + + .. code-tab:: csharp + + var myBasis = new Basis( + new Vector3(1.0f, 1.0f, 1.0f), + new Vector3(2.0f, 2.0f, 2.0f), + new Vector3(3.0f, 3.0f, 3.0f) + ); + myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f)); + + GD.Print(myBasis.X); // Prints (0, 2, -2). + GD.Print(myBasis.Y); // Prints (0, 4, -4). + GD.Print(myBasis.Z); // Prints (0, 6, -6). + -Introduce an additional scaling specified by the given 3D scaling factor. .. rst-class:: classref-item-separator @@ -472,9 +712,22 @@ Introduce an additional scaling specified by the given 3D scaling factor. .. rst-class:: classref-method -:ref:`Basis` **slerp** **(** :ref:`Basis` to, :ref:`float` weight **)** |const| +:ref:`Basis` **slerp**\ (\ to\: :ref:`Basis`, weight\: :ref:`float`\ ) |const| :ref:`🔗` + +Performs a spherical-linear interpolation with the ``to`` basis, given a ``weight``. Both this basis and ``to`` should represent a rotation. + +\ **Example:** Smoothly rotate a :ref:`Node3D` to the target basis over time, with a :ref:`Tween`. -Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix. +:: + + var start_basis = Basis.IDENTITY + var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2) + + func _ready(): + create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO) + + func interpolate(weight): + basis = start_basis.slerp(target_basis, weight) .. rst-class:: classref-item-separator @@ -484,9 +737,11 @@ Assuming that the matrix is a proper rotation matrix, slerp performs a spherical .. rst-class:: classref-method -:ref:`float` **tdotx** **(** :ref:`Vector3` with **)** |const| +:ref:`float` **tdotx**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the transposed dot product between ``with`` and the :ref:`x` axis (see :ref:`transposed`). -Transposed dot product with the X axis of the matrix. +This is equivalent to ``basis.x.dot(vector)``. .. rst-class:: classref-item-separator @@ -496,9 +751,11 @@ Transposed dot product with the X axis of the matrix. .. rst-class:: classref-method -:ref:`float` **tdoty** **(** :ref:`Vector3` with **)** |const| +:ref:`float` **tdoty**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`🔗` -Transposed dot product with the Y axis of the matrix. +Returns the transposed dot product between ``with`` and the :ref:`y` axis (see :ref:`transposed`). + +This is equivalent to ``basis.y.dot(vector)``. .. rst-class:: classref-item-separator @@ -508,9 +765,11 @@ Transposed dot product with the Y axis of the matrix. .. rst-class:: classref-method -:ref:`float` **tdotz** **(** :ref:`Vector3` with **)** |const| +:ref:`float` **tdotz**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns the transposed dot product between ``with`` and the :ref:`z` axis (see :ref:`transposed`). -Transposed dot product with the Z axis of the matrix. +This is equivalent to ``basis.z.dot(vector)``. .. rst-class:: classref-item-separator @@ -520,9 +779,40 @@ Transposed dot product with the Z axis of the matrix. .. rst-class:: classref-method -:ref:`Basis` **transposed** **(** **)** |const| +:ref:`Basis` **transposed**\ (\ ) |const| :ref:`🔗` + +Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns. + + +.. tabs:: + + .. code-tab:: gdscript + + var my_basis = Basis( + Vector3(1, 2, 3), + Vector3(4, 5, 6), + Vector3(7, 8, 9) + ) + my_basis = my_basis.transposed() + + print(my_basis.x) # Prints (1, 4, 7). + print(my_basis.y) # Prints (2, 5, 8). + print(my_basis.z) # Prints (3, 6, 9). + + .. code-tab:: csharp + + var myBasis = new Basis( + new Vector3(1.0f, 2.0f, 3.0f), + new Vector3(4.0f, 5.0f, 6.0f), + new Vector3(7.0f, 8.0f, 9.0f) + ); + myBasis = myBasis.Transposed(); + + GD.Print(myBasis.X); // Prints (1, 4, 7). + GD.Print(myBasis.Y); // Prints (2, 5, 8). + GD.Print(myBasis.Z); // Prints (3, 6, 9). + -Returns the transposed version of the matrix. .. rst-class:: classref-section-separator @@ -537,9 +827,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`Basis` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`Basis`\ ) :ref:`🔗` -Returns ``true`` if the **Basis** matrices are not equal. +Returns ``true`` if the components of both **Basis** matrices are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. @@ -551,9 +841,11 @@ Returns ``true`` if the **Basis** matrices are not equal. .. rst-class:: classref-operator -:ref:`Basis` **operator *** **(** :ref:`Basis` right **)** +:ref:`Basis` **operator ***\ (\ right\: :ref:`Basis`\ ) :ref:`🔗` -Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent). +Transforms (multiplies) the ``right`` basis by this basis. + +This is the operation performed between parent and child :ref:`Node3D`\ s. .. rst-class:: classref-item-separator @@ -563,9 +855,26 @@ Composes these two basis matrices by multiplying them together. This has the eff .. rst-class:: classref-operator -:ref:`Vector3` **operator *** **(** :ref:`Vector3` right **)** +:ref:`Vector3` **operator ***\ (\ right\: :ref:`Vector3`\ ) :ref:`🔗` + +Transforms (multiplies) the ``right`` vector by this basis, returning a :ref:`Vector3`. + + +.. tabs:: + + .. code-tab:: gdscript + + # Basis that swaps the X/Z axes and doubles the scale. + var my_basis = Basis(Vector3(0, 2, 0), Vector3(2, 0, 0), Vector3(0, 0, 2)) + print(my_basis * Vector3(1, 2, 3)) # Prints (4, 2, 6) + + .. code-tab:: csharp + + // Basis that swaps the X/Z axes and doubles the scale. + var myBasis = new Basis(new Vector3(0, 2, 0), new Vector3(2, 0, 0), new Vector3(0, 0, 2)); + GD.Print(myBasis * new Vector3(1, 2, 3)); // Prints (4, 2, 6) + -Transforms (multiplies) the :ref:`Vector3` by the given **Basis** matrix. .. rst-class:: classref-item-separator @@ -575,9 +884,9 @@ Transforms (multiplies) the :ref:`Vector3` by the given **Basis** .. rst-class:: classref-operator -:ref:`Basis` **operator *** **(** :ref:`float` right **)** +:ref:`Basis` **operator ***\ (\ right\: :ref:`float`\ ) :ref:`🔗` -This operator multiplies all components of the **Basis**, which scales it uniformly. +Multiplies all components of the **Basis** by the given :ref:`float`. This affects the basis's scale uniformly, resizing all 3 axes by the ``right`` value. .. rst-class:: classref-item-separator @@ -587,9 +896,33 @@ This operator multiplies all components of the **Basis**, which scales it unifor .. rst-class:: classref-operator -:ref:`Basis` **operator *** **(** :ref:`int` right **)** +:ref:`Basis` **operator ***\ (\ right\: :ref:`int`\ ) :ref:`🔗` + +Multiplies all components of the **Basis** by the given :ref:`int`. This affects the basis's scale uniformly, resizing all 3 axes by the ``right`` value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Basis_operator_div_float: + +.. rst-class:: classref-operator + +:ref:`Basis` **operator /**\ (\ right\: :ref:`float`\ ) :ref:`🔗` + +Divides all components of the **Basis** by the given :ref:`float`. This affects the basis's scale uniformly, resizing all 3 axes by the ``right`` value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Basis_operator_div_int: + +.. rst-class:: classref-operator + +:ref:`Basis` **operator /**\ (\ right\: :ref:`int`\ ) :ref:`🔗` -This operator multiplies all components of the **Basis**, which scales it uniformly. +Divides all components of the **Basis** by the given :ref:`int`. This affects the basis's scale uniformly, resizing all 3 axes by the ``right`` value. .. rst-class:: classref-item-separator @@ -599,9 +932,9 @@ This operator multiplies all components of the **Basis**, which scales it unifor .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`Basis` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`Basis`\ ) :ref:`🔗` -Returns ``true`` if the **Basis** matrices are exactly equal. +Returns ``true`` if the components of both **Basis** matrices are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. @@ -613,9 +946,11 @@ Returns ``true`` if the **Basis** matrices are exactly equal. .. rst-class:: classref-operator -:ref:`Vector3` **operator []** **(** :ref:`int` index **)** +:ref:`Vector3` **operator []**\ (\ index\: :ref:`int`\ ) :ref:`🔗` + +Accesses each axis (column) of this basis by their index. Index ``0`` is the same as :ref:`x`, index ``1`` is the same as :ref:`y`, and index ``2`` is the same as :ref:`z`. -Access basis components using their index. ``b[0]`` is equivalent to ``b.x``, ``b[1]`` is equivalent to ``b.y``, and ``b[2]`` is equivalent to ``b.z``. +\ **Note:** In C++, this operator accesses the rows of the basis matrix, *not* the columns. For the same behavior as scripting languages, use the ``set_column`` and ``get_column`` methods. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -624,3 +959,4 @@ Access basis components using their index. ``b[0]`` is equivalent to ``b.x``, `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index 6ad3f5e32f9..69b3b3ae7a7 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -29,33 +29,33 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`convert_to_image` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create` **(** :ref:`Vector2i` size **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from_image_alpha` **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_bit` **(** :ref:`int` x, :ref:`int` y **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_bitv` **(** :ref:`Vector2i` position **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_size` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_true_bit_count` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grow_mask` **(** :ref:`int` pixels, :ref:`Rect2i` rect **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]` | :ref:`opaque_to_polygons` **(** :ref:`Rect2i` rect, :ref:`float` epsilon=2.0 **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resize` **(** :ref:`Vector2i` new_size **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bit` **(** :ref:`int` x, :ref:`int` y, :ref:`bool` bit **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bit_rect` **(** :ref:`Rect2i` rect, :ref:`bool` bit **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bitv` **(** :ref:`Vector2i` position, :ref:`bool` bit **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`convert_to_image`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create`\ (\ size\: :ref:`Vector2i`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from_image_alpha`\ (\ image\: :ref:`Image`, threshold\: :ref:`float` = 0.1\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_bit`\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_bitv`\ (\ position\: :ref:`Vector2i`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_true_bit_count`\ (\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`grow_mask`\ (\ pixels\: :ref:`int`, rect\: :ref:`Rect2i`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`opaque_to_polygons`\ (\ rect\: :ref:`Rect2i`, epsilon\: :ref:`float` = 2.0\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resize`\ (\ new_size\: :ref:`Vector2i`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bit`\ (\ x\: :ref:`int`, y\: :ref:`int`, bit\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bit_rect`\ (\ rect\: :ref:`Rect2i`, bit\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bitv`\ (\ position\: :ref:`Vector2i`, bit\: :ref:`bool`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +70,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Image` **convert_to_image** **(** **)** |const| +:ref:`Image` **convert_to_image**\ (\ ) |const| :ref:`🔗` Returns an image of the same size as the bitmap and with a :ref:`Format` of type :ref:`Image.FORMAT_L8`. ``true`` bits of the bitmap are being converted into white pixels, and ``false`` bits into black. @@ -82,7 +82,7 @@ Returns an image of the same size as the bitmap and with a :ref:`Format` size **)** +|void| **create**\ (\ size\: :ref:`Vector2i`\ ) :ref:`🔗` Creates a bitmap with the specified size, filled with ``false``. @@ -94,7 +94,7 @@ Creates a bitmap with the specified size, filled with ``false``. .. rst-class:: classref-method -void **create_from_image_alpha** **(** :ref:`Image` image, :ref:`float` threshold=0.1 **)** +|void| **create_from_image_alpha**\ (\ image\: :ref:`Image`, threshold\: :ref:`float` = 0.1\ ) :ref:`🔗` Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to ``false`` if the alpha value of the image at that position is equal to ``threshold`` or less, and ``true`` in other case. @@ -106,7 +106,7 @@ Creates a bitmap that matches the given image dimensions, every element of the b .. rst-class:: classref-method -:ref:`bool` **get_bit** **(** :ref:`int` x, :ref:`int` y **)** |const| +:ref:`bool` **get_bit**\ (\ x\: :ref:`int`, y\: :ref:`int`\ ) |const| :ref:`🔗` Returns bitmap's value at the specified position. @@ -118,7 +118,7 @@ Returns bitmap's value at the specified position. .. rst-class:: classref-method -:ref:`bool` **get_bitv** **(** :ref:`Vector2i` position **)** |const| +:ref:`bool` **get_bitv**\ (\ position\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns bitmap's value at the specified position. @@ -130,7 +130,7 @@ Returns bitmap's value at the specified position. .. rst-class:: classref-method -:ref:`Vector2i` **get_size** **(** **)** |const| +:ref:`Vector2i` **get_size**\ (\ ) |const| :ref:`🔗` Returns bitmap's dimensions. @@ -142,7 +142,7 @@ Returns bitmap's dimensions. .. rst-class:: classref-method -:ref:`int` **get_true_bit_count** **(** **)** |const| +:ref:`int` **get_true_bit_count**\ (\ ) |const| :ref:`🔗` Returns the number of bitmap elements that are set to ``true``. @@ -154,7 +154,7 @@ Returns the number of bitmap elements that are set to ``true``. .. rst-class:: classref-method -void **grow_mask** **(** :ref:`int` pixels, :ref:`Rect2i` rect **)** +|void| **grow_mask**\ (\ pixels\: :ref:`int`, rect\: :ref:`Rect2i`\ ) :ref:`🔗` Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positive, dilation is applied to the bitmap. If ``pixels`` is negative, erosion is applied to the bitmap. ``rect`` defines the area where the morphological operation is applied. Pixels located outside the ``rect`` are unaffected by :ref:`grow_mask`. @@ -166,7 +166,7 @@ Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positi .. rst-class:: classref-method -:ref:`PackedVector2Array[]` **opaque_to_polygons** **(** :ref:`Rect2i` rect, :ref:`float` epsilon=2.0 **)** |const| +:ref:`Array`\[:ref:`PackedVector2Array`\] **opaque_to_polygons**\ (\ rect\: :ref:`Rect2i`, epsilon\: :ref:`float` = 2.0\ ) |const| :ref:`🔗` Creates an :ref:`Array` of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a :ref:`PackedVector2Array` of its vertices. @@ -186,7 +186,7 @@ To get polygons covering the whole bitmap, pass: .. rst-class:: classref-method -void **resize** **(** :ref:`Vector2i` new_size **)** +|void| **resize**\ (\ new_size\: :ref:`Vector2i`\ ) :ref:`🔗` Resizes the image to ``new_size``. @@ -198,7 +198,7 @@ Resizes the image to ``new_size``. .. rst-class:: classref-method -void **set_bit** **(** :ref:`int` x, :ref:`int` y, :ref:`bool` bit **)** +|void| **set_bit**\ (\ x\: :ref:`int`, y\: :ref:`int`, bit\: :ref:`bool`\ ) :ref:`🔗` Sets the bitmap's element at the specified position, to the specified value. @@ -210,7 +210,7 @@ Sets the bitmap's element at the specified position, to the specified value. .. rst-class:: classref-method -void **set_bit_rect** **(** :ref:`Rect2i` rect, :ref:`bool` bit **)** +|void| **set_bit_rect**\ (\ rect\: :ref:`Rect2i`, bit\: :ref:`bool`\ ) :ref:`🔗` Sets a rectangular portion of the bitmap to the specified value. @@ -222,7 +222,7 @@ Sets a rectangular portion of the bitmap to the specified value. .. rst-class:: classref-method -void **set_bitv** **(** :ref:`Vector2i` position, :ref:`bool` bit **)** +|void| **set_bitv**\ (\ position\: :ref:`Vector2i`, bit\: :ref:`bool`\ ) :ref:`🔗` Sets the bitmap's element at the specified position, to the specified value. @@ -233,3 +233,4 @@ Sets the bitmap's element at the specified position, to the specified value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index 7d01bb288bd..1e6460eb4d6 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -47,25 +47,25 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_rest` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_autocalculate_length_and_angle` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_bone_angle` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_index_in_skeleton` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_length` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_skeleton_rest` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_autocalculate_length_and_angle` **(** :ref:`bool` auto_calculate **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_angle` **(** :ref:`float` angle **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_length` **(** :ref:`float` length **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_rest`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_autocalculate_length_and_angle`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_bone_angle`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_index_in_skeleton`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_length`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_skeleton_rest`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_autocalculate_length_and_angle`\ (\ auto_calculate\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_angle`\ (\ angle\: :ref:`float`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_length`\ (\ length\: :ref:`float`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,12 +80,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Transform2D` **rest** = ``Transform2D(0, 0, 0, 0, 0, 0)`` +:ref:`Transform2D` **rest** = ``Transform2D(0, 0, 0, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rest** **(** :ref:`Transform2D` value **)** -- :ref:`Transform2D` **get_rest** **(** **)** +- |void| **set_rest**\ (\ value\: :ref:`Transform2D`\ ) +- :ref:`Transform2D` **get_rest**\ (\ ) Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest`. @@ -102,9 +102,9 @@ Method Descriptions .. rst-class:: classref-method -void **apply_rest** **(** **)** +|void| **apply_rest**\ (\ ) :ref:`🔗` -Stores the node's current transforms in :ref:`rest`. +Resets the bone to the rest pose. This is equivalent to setting :ref:`Node2D.transform` to :ref:`rest`. .. rst-class:: classref-item-separator @@ -114,7 +114,7 @@ Stores the node's current transforms in :ref:`rest`. .. rst-class:: classref-method -:ref:`bool` **get_autocalculate_length_and_angle** **(** **)** |const| +:ref:`bool` **get_autocalculate_length_and_angle**\ (\ ) |const| :ref:`🔗` Returns whether this **Bone2D** is going to autocalculate its length and bone angle using its first **Bone2D** child node, if one exists. If there are no **Bone2D** children, then it cannot autocalculate these values and will print a warning. @@ -126,7 +126,7 @@ Returns whether this **Bone2D** is going to autocalculate its length and bone an .. rst-class:: classref-method -:ref:`float` **get_bone_angle** **(** **)** |const| +:ref:`float` **get_bone_angle**\ (\ ) |const| :ref:`🔗` Returns the angle of the bone in the **Bone2D**. @@ -140,7 +140,7 @@ Returns the angle of the bone in the **Bone2D**. .. rst-class:: classref-method -:ref:`int` **get_index_in_skeleton** **(** **)** |const| +:ref:`int` **get_index_in_skeleton**\ (\ ) |const| :ref:`🔗` Returns the node's index as part of the entire skeleton. See :ref:`Skeleton2D`. @@ -152,7 +152,7 @@ Returns the node's index as part of the entire skeleton. See :ref:`Skeleton2D` **get_length** **(** **)** |const| +:ref:`float` **get_length**\ (\ ) |const| :ref:`🔗` Returns the length of the bone in the **Bone2D** node. @@ -164,9 +164,9 @@ Returns the length of the bone in the **Bone2D** node. .. rst-class:: classref-method -:ref:`Transform2D` **get_skeleton_rest** **(** **)** |const| +:ref:`Transform2D` **get_skeleton_rest**\ (\ ) |const| :ref:`🔗` -Returns the node's :ref:`rest` ``Transform2D`` if it doesn't have a parent, or its rest pose relative to its parent. +Returns the node's :ref:`rest` :ref:`Transform2D` if it doesn't have a parent, or its rest pose relative to its parent. .. rst-class:: classref-item-separator @@ -176,7 +176,7 @@ Returns the node's :ref:`rest` ``Transform2D`` if it .. rst-class:: classref-method -void **set_autocalculate_length_and_angle** **(** :ref:`bool` auto_calculate **)** +|void| **set_autocalculate_length_and_angle**\ (\ auto_calculate\: :ref:`bool`\ ) :ref:`🔗` When set to ``true``, the **Bone2D** node will attempt to automatically calculate the bone angle and length using the first child **Bone2D** node, if one exists. If none exist, the **Bone2D** cannot automatically calculate these values and will print a warning. @@ -188,11 +188,11 @@ When set to ``true``, the **Bone2D** node will attempt to automatically calculat .. rst-class:: classref-method -void **set_bone_angle** **(** :ref:`float` angle **)** +|void| **set_bone_angle**\ (\ angle\: :ref:`float`\ ) :ref:`🔗` Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node. -\ **Note:** **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. +\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. .. rst-class:: classref-item-separator @@ -202,7 +202,7 @@ Sets the bone angle for the **Bone2D**. This is typically set to the rotation fr .. rst-class:: classref-method -void **set_length** **(** :ref:`float` length **)** +|void| **set_length**\ (\ length\: :ref:`float`\ ) :ref:`🔗` Sets the length of the bone in the **Bone2D**. @@ -213,3 +213,4 @@ Sets the length of the bone in the **Bone2D**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index 5e1b43e35bc..5b5475a34a4 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: tag + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -45,17 +48,17 @@ Methods .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_external_skeleton` **(** **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_external_skeleton` **(** **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`on_bone_pose_update` **(** :ref:`int` bone_index **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_external_skeleton` **(** :ref:`NodePath` external_skeleton **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_external_skeleton` **(** :ref:`bool` use_external_skeleton **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_external_skeleton`\ (\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_use_external_skeleton`\ (\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`on_skeleton_update`\ (\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_external_skeleton`\ (\ external_skeleton\: :ref:`NodePath`\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_external_skeleton`\ (\ use_external_skeleton\: :ref:`bool`\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,12 +73,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bone_idx** = ``-1`` +:ref:`int` **bone_idx** = ``-1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bone_idx** **(** :ref:`int` value **)** -- :ref:`int` **get_bone_idx** **(** **)** +- |void| **set_bone_idx**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_bone_idx**\ (\ ) The index of the attached bone. @@ -87,12 +90,12 @@ The index of the attached bone. .. rst-class:: classref-property -:ref:`String` **bone_name** = ``""`` +:ref:`String` **bone_name** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bone_name** **(** :ref:`String` value **)** -- :ref:`String` **get_bone_name** **(** **)** +- |void| **set_bone_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_bone_name**\ (\ ) The name of the attached bone. @@ -104,15 +107,17 @@ The name of the attached bone. .. rst-class:: classref-property -:ref:`bool` **override_pose** = ``false`` +:ref:`bool` **override_pose** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_override_pose** **(** :ref:`bool` value **)** -- :ref:`bool` **get_override_pose** **(** **)** +- |void| **set_override_pose**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_override_pose**\ (\ ) Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to ``true``, the BoneAttachment3D node can change the pose of the bone. When set to ``false``, the BoneAttachment3D will always be set to the bone's transform. +\ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. + .. rst-class:: classref-section-separator ---- @@ -126,7 +131,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`NodePath` **get_external_skeleton** **(** **)** |const| +:ref:`NodePath` **get_external_skeleton**\ (\ ) |const| :ref:`🔗` Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` node, if one has been set. @@ -138,7 +143,7 @@ Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` **get_use_external_skeleton** **(** **)** |const| +:ref:`bool` **get_use_external_skeleton**\ (\ ) |const| :ref:`🔗` Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D` rather than attempting to use its parent node as the :ref:`Skeleton3D`. @@ -146,13 +151,13 @@ Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D< ---- -.. _class_BoneAttachment3D_method_on_bone_pose_update: +.. _class_BoneAttachment3D_method_on_skeleton_update: .. rst-class:: classref-method -void **on_bone_pose_update** **(** :ref:`int` bone_index **)** +|void| **on_skeleton_update**\ (\ ) :ref:`🔗` -A function that is called automatically when the :ref:`Skeleton3D` the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is *not* set to override the bone pose. +A function that is called automatically when the :ref:`Skeleton3D` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose. .. rst-class:: classref-item-separator @@ -162,7 +167,7 @@ A function that is called automatically when the :ref:`Skeleton3D` external_skeleton **)** +|void| **set_external_skeleton**\ (\ external_skeleton\: :ref:`NodePath`\ ) :ref:`🔗` Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton` to enable the external :ref:`Skeleton3D` node. @@ -174,7 +179,7 @@ Sets the :ref:`NodePath` to the external skeleton that the BoneA .. rst-class:: classref-method -void **set_use_external_skeleton** **(** :ref:`bool` use_external_skeleton **)** +|void| **set_use_external_skeleton**\ (\ use_external_skeleton\: :ref:`bool`\ ) :ref:`🔗` Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton`. @@ -185,3 +190,4 @@ Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` | :ref:`find_profile_bone_name` **(** :ref:`StringName` skeleton_bone_name **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_skeleton_bone_name` **(** :ref:`StringName` profile_bone_name **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_skeleton_bone_name` **(** :ref:`StringName` profile_bone_name, :ref:`StringName` skeleton_bone_name **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_profile_bone_name`\ (\ skeleton_bone_name\: :ref:`StringName`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_skeleton_bone_name`\ (\ profile_bone_name\: :ref:`StringName`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skeleton_bone_name`\ (\ profile_bone_name\: :ref:`StringName`, skeleton_bone_name\: :ref:`StringName`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,7 +71,7 @@ Signals .. rst-class:: classref-signal -**bone_map_updated** **(** **)** +**bone_map_updated**\ (\ ) :ref:`🔗` This signal is emitted when change the key value in the **BoneMap**. This is used to validate mapping and to update **BoneMap** editor. @@ -83,7 +83,7 @@ This signal is emitted when change the key value in the **BoneMap**. This is use .. rst-class:: classref-signal -**profile_updated** **(** **)** +**profile_updated**\ (\ ) :ref:`🔗` This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the **BoneMap** and to redraw the **BoneMap** editor. @@ -100,12 +100,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`SkeletonProfile` **profile** +:ref:`SkeletonProfile` **profile** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_profile** **(** :ref:`SkeletonProfile` value **)** -- :ref:`SkeletonProfile` **get_profile** **(** **)** +- |void| **set_profile**\ (\ value\: :ref:`SkeletonProfile`\ ) +- :ref:`SkeletonProfile` **get_profile**\ (\ ) A :ref:`SkeletonProfile` of the mapping target. Key names in the **BoneMap** are synchronized with it. @@ -122,7 +122,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`StringName` **find_profile_bone_name** **(** :ref:`StringName` skeleton_bone_name **)** |const| +:ref:`StringName` **find_profile_bone_name**\ (\ skeleton_bone_name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns a profile bone name having ``skeleton_bone_name``. If not found, an empty :ref:`StringName` will be returned. @@ -136,7 +136,7 @@ In the retargeting process, the returned bone name is the bone name of the targe .. rst-class:: classref-method -:ref:`StringName` **get_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name **)** |const| +:ref:`StringName` **get_skeleton_bone_name**\ (\ profile_bone_name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns a skeleton bone name is mapped to ``profile_bone_name``. @@ -150,7 +150,7 @@ In the retargeting process, the returned bone name is the bone name of the sourc .. rst-class:: classref-method -void **set_skeleton_bone_name** **(** :ref:`StringName` profile_bone_name, :ref:`StringName` skeleton_bone_name **)** +|void| **set_skeleton_bone_name**\ (\ profile_bone_name\: :ref:`StringName`, skeleton_bone_name\: :ref:`StringName`\ ) :ref:`🔗` Maps a skeleton bone name to ``profile_bone_name``. @@ -163,3 +163,4 @@ In the retargeting process, the setting bone name is the bone name of the source .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 9c326ad3d1e..9b6508e3266 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -17,56 +17,62 @@ A built-in boolean type. Description ----------- -A **bool** is always one of two values: ``true`` or ``false``, similar to a switch that is either on or off. Booleans are used in programming for logic in condition statements. +The **bool** is a built-in :ref:`Variant` type that may only store one of two values: ``true`` or ``false``. You can imagine it as a switch that can be either turned on or off, or as a binary digit that can either be 1 or 0. -Booleans can be directly used in ``if`` and ``elif`` statements. You don't need to add ``== true`` or ``== false``: +Booleans can be directly used in ``if``, and other conditional statements: .. tabs:: .. code-tab:: gdscript + var can_shoot = true if can_shoot: launch_bullet() .. code-tab:: csharp + bool canShoot = true; if (canShoot) { - launchBullet(); + LaunchBullet(); } -Many common methods and operations return **bool**\ s, for example, ``shooting_cooldown <= 0.0`` may evaluate to ``true`` or ``false`` depending on the number's value. +All comparison operators return booleans (``==``, ``>``, ``<=``, etc.). As such, it is not necessary to compare booleans themselves. You do not need to add ``== true`` or ``== false``. -\ **bool**\ s are usually used with the logical operators ``and``, ``or``, and ``not`` to create complex conditions: +Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to create complex conditions: .. tabs:: .. code-tab:: gdscript - if bullets > 0 and not is_reloading: + if bullets > 0 and not is_reloading(): launch_bullet() - if bullets == 0 or is_reloading: + if bullets == 0 or is_reloading(): play_clack_sound() .. code-tab:: csharp - if (bullets > 0 && !isReloading) + if (bullets > 0 && !IsReloading()) { - launchBullet(); + LaunchBullet(); } - if (bullets == 0 || isReloading) + if (bullets == 0 || IsReloading()) { - playClackSound(); + PlayClackSound(); } +\ **Note:** In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as `short-circuit evaluation `__ and can be useful to avoid evaluating expensive conditions in some performance-critical cases. + +\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty`, :ref:`Node.can_process`, :ref:`Camera2D.enabled`, etc.). + .. rst-class:: classref-reftable-group Constructors @@ -75,15 +81,15 @@ Constructors .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`bool` **(** **)** | - +-------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`bool` **(** :ref:`bool` from **)** | - +-------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`bool` **(** :ref:`float` from **)** | - +-------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`bool` **(** :ref:`int` from **)** | - +-------------------------+-------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`bool`\ (\ ) | + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`bool`\ (\ from\: :ref:`bool`\ ) | + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`bool`\ (\ from\: :ref:`float`\ ) | + +-------------------------+----------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`bool`\ (\ from\: :ref:`int`\ ) | + +-------------------------+----------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -93,15 +99,15 @@ Operators .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`bool` right **)** | - +-------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator \<` **(** :ref:`bool` right **)** | - +-------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`bool` right **)** | - +-------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator >` **(** :ref:`bool` right **)** | - +-------------------------+--------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator \<`\ (\ right\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator >`\ (\ right\: :ref:`bool`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,9 +122,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`bool` **bool** **(** **)** +:ref:`bool` **bool**\ (\ ) :ref:`🔗` -Constructs a default-initialized **bool** set to ``false``. +Constructs a **bool** set to ``false``. .. rst-class:: classref-item-separator @@ -126,7 +132,7 @@ Constructs a default-initialized **bool** set to ``false``. .. rst-class:: classref-constructor -:ref:`bool` **bool** **(** :ref:`bool` from **)** +:ref:`bool` **bool**\ (\ from\: :ref:`bool`\ ) Constructs a **bool** as a copy of the given **bool**. @@ -136,9 +142,9 @@ Constructs a **bool** as a copy of the given **bool**. .. rst-class:: classref-constructor -:ref:`bool` **bool** **(** :ref:`float` from **)** +:ref:`bool` **bool**\ (\ from\: :ref:`float`\ ) -Cast a :ref:`float` value to a boolean value. This method will return ``false`` if ``0.0`` is passed in, and ``true`` for all other values. +Cast a :ref:`float` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0.0`` (including ``-0.0``), and ``true`` for all other values (including :ref:`@GDScript.INF` and :ref:`@GDScript.NAN`). .. rst-class:: classref-item-separator @@ -146,9 +152,9 @@ Cast a :ref:`float` value to a boolean value. This method will retu .. rst-class:: classref-constructor -:ref:`bool` **bool** **(** :ref:`int` from **)** +:ref:`bool` **bool**\ (\ from\: :ref:`int`\ ) -Cast an :ref:`int` value to a boolean value. This method will return ``false`` if ``0`` is passed in, and ``true`` for all other values. +Cast an :ref:`int` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0``, and ``true`` for all other values. .. rst-class:: classref-section-separator @@ -163,9 +169,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`bool` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`bool`\ ) :ref:`🔗` -Returns ``true`` if two bools are different, i.e. one is ``true`` and the other is ``false``. +Returns ``true`` if the two booleans are not equal. That is, one is ``true`` and the other is ``false``. This operation can be seen as a logical XOR. .. rst-class:: classref-item-separator @@ -175,7 +181,7 @@ Returns ``true`` if two bools are different, i.e. one is ``true`` and the other .. rst-class:: classref-operator -:ref:`bool` **operator <** **(** :ref:`bool` right **)** +:ref:`bool` **operator <**\ (\ right\: :ref:`bool`\ ) :ref:`🔗` Returns ``true`` if the left operand is ``false`` and the right operand is ``true``. @@ -187,9 +193,9 @@ Returns ``true`` if the left operand is ``false`` and the right operand is ``tru .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`bool` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`bool`\ ) :ref:`🔗` -Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``false``. +Returns ``true`` if the two booleans are equal. That is, both are ``true`` or both are ``false``. This operation can be seen as a logical EQ or XNOR. .. rst-class:: classref-item-separator @@ -199,7 +205,7 @@ Returns ``true`` if two bools are equal, i.e. both are ``true`` or both are ``fa .. rst-class:: classref-operator -:ref:`bool` **operator >** **(** :ref:`bool` right **)** +:ref:`bool` **operator >**\ (\ right\: :ref:`bool`\ ) :ref:`🔗` Returns ``true`` if the left operand is ``true`` and the right operand is ``false``. @@ -210,3 +216,4 @@ Returns ``true`` if the left operand is ``true`` and the right operand is ``fals .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index acd05fb7838..fe99b7b7429 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -52,9 +52,9 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`add_spacer` **(** :ref:`bool` begin **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`add_spacer`\ (\ begin\: :ref:`bool`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -81,7 +81,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AlignmentMode**: +enum **AlignmentMode**: :ref:`🔗` .. _class_BoxContainer_constant_ALIGNMENT_BEGIN: @@ -120,12 +120,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AlignmentMode` **alignment** = ``0`` +:ref:`AlignmentMode` **alignment** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_alignment** **(** :ref:`AlignmentMode` value **)** -- :ref:`AlignmentMode` **get_alignment** **(** **)** +- |void| **set_alignment**\ (\ value\: :ref:`AlignmentMode`\ ) +- :ref:`AlignmentMode` **get_alignment**\ (\ ) The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN`, :ref:`ALIGNMENT_CENTER`, or :ref:`ALIGNMENT_END`). @@ -137,12 +137,12 @@ The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN< .. rst-class:: classref-property -:ref:`bool` **vertical** = ``false`` +:ref:`bool` **vertical** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_vertical** **(** :ref:`bool` value **)** -- :ref:`bool` **is_vertical** **(** **)** +- |void| **set_vertical**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_vertical**\ (\ ) If ``true``, the **BoxContainer** will arrange its children vertically, rather than horizontally. @@ -161,7 +161,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Control` **add_spacer** **(** :ref:`bool` begin **)** +:ref:`Control` **add_spacer**\ (\ begin\: :ref:`bool`\ ) :ref:`🔗` Adds a :ref:`Control` node to the box as a spacer. If ``begin`` is ``true``, it will insert the :ref:`Control` node in front of all other children. @@ -178,7 +178,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int` **separation** = ``4`` +:ref:`int` **separation** = ``4`` :ref:`🔗` The space between the **BoxContainer**'s elements, in pixels. @@ -189,3 +189,4 @@ The space between the **BoxContainer**'s elements, in pixels. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_boxmesh.rst b/classes/class_boxmesh.rst index a4d69b3f0fb..2e0f04fb34c 100644 --- a/classes/class_boxmesh.rst +++ b/classes/class_boxmesh.rst @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_size**\ (\ ) The box's width, height and depth. @@ -73,12 +73,12 @@ The box's width, height and depth. .. rst-class:: classref-property -:ref:`int` **subdivide_depth** = ``0`` +:ref:`int` **subdivide_depth** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_subdivide_depth** **(** :ref:`int` value **)** -- :ref:`int` **get_subdivide_depth** **(** **)** +- |void| **set_subdivide_depth**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_subdivide_depth**\ (\ ) Number of extra edge loops inserted along the Z axis. @@ -90,12 +90,12 @@ Number of extra edge loops inserted along the Z axis. .. rst-class:: classref-property -:ref:`int` **subdivide_height** = ``0`` +:ref:`int` **subdivide_height** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_subdivide_height** **(** :ref:`int` value **)** -- :ref:`int` **get_subdivide_height** **(** **)** +- |void| **set_subdivide_height**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_subdivide_height**\ (\ ) Number of extra edge loops inserted along the Y axis. @@ -107,12 +107,12 @@ Number of extra edge loops inserted along the Y axis. .. rst-class:: classref-property -:ref:`int` **subdivide_width** = ``0`` +:ref:`int` **subdivide_width** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_subdivide_width** **(** :ref:`int` value **)** -- :ref:`int` **get_subdivide_width** **(** **)** +- |void| **set_subdivide_width**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_subdivide_width**\ (\ ) Number of extra edge loops inserted along the X axis. @@ -123,3 +123,4 @@ Number of extra edge loops inserted along the X axis. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_boxoccluder3d.rst b/classes/class_boxoccluder3d.rst index 5e4ef9457ff..bf941c41e18 100644 --- a/classes/class_boxoccluder3d.rst +++ b/classes/class_boxoccluder3d.rst @@ -23,6 +23,13 @@ Description See :ref:`OccluderInstance3D`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -48,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_size**\ (\ ) The box's size in 3D units. @@ -64,3 +71,4 @@ The box's size in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 65d0aa5aef1..07a369ddb24 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -28,11 +28,11 @@ A 3D box shape, intended for use in physics. Usually used to provide a shape for Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ .. rst-class:: classref-reftable-group @@ -59,12 +59,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_size**\ (\ ) The box's width, height and depth. @@ -75,3 +75,4 @@ The box's width, height and depth. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_button.rst b/classes/class_button.rst index 07c90e2101c..051c8071d05 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -65,9 +65,9 @@ See also :ref:`BaseButton` which contains common properties an Tutorials --------- -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group @@ -80,6 +80,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment` | :ref:`alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`clip_text` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`expand_icon` | ``false`` | @@ -109,53 +111,69 @@ Theme Properties .. table:: :widths: auto - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_disabled_color` | ``Color(1, 1, 1, 0.4)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_focus_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_hover_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_normal_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``2`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`icon_max_width` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_disabled_color` | ``Color(1, 1, 1, 0.4)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_focus_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_hover_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_normal_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`align_to_largest_stylebox` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`icon` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`disabled` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`disabled_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed_mirrored` | | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -170,12 +188,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`HorizontalAlignment` **alignment** = ``1`` +:ref:`HorizontalAlignment` **alignment** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_text_alignment** **(** :ref:`HorizontalAlignment` value **)** -- :ref:`HorizontalAlignment` **get_text_alignment** **(** **)** +- |void| **set_text_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) +- :ref:`HorizontalAlignment` **get_text_alignment**\ (\ ) Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment` constants. @@ -183,16 +201,33 @@ Text alignment policy for the button's text, use one of the :ref:`HorizontalAlig ---- +.. _class_Button_property_autowrap_mode: + +.. rst-class:: classref-property + +:ref:`AutowrapMode` **autowrap_mode** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode`\ ) +- :ref:`AutowrapMode` **get_autowrap_mode**\ (\ ) + +If set to something other than :ref:`TextServer.AUTOWRAP_OFF`, the text gets wrapped inside the node's bounding rectangle. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_property_clip_text: .. rst-class:: classref-property -:ref:`bool` **clip_text** = ``false`` +:ref:`bool` **clip_text** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clip_text** **(** :ref:`bool` value **)** -- :ref:`bool` **get_clip_text** **(** **)** +- |void| **set_clip_text**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_clip_text**\ (\ ) When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. @@ -204,12 +239,12 @@ When this property is enabled, text that is too large to fit the button is clipp .. rst-class:: classref-property -:ref:`bool` **expand_icon** = ``false`` +:ref:`bool` **expand_icon** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_expand_icon** **(** :ref:`bool` value **)** -- :ref:`bool` **is_expand_icon** **(** **)** +- |void| **set_expand_icon**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_expand_icon**\ (\ ) When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also :ref:`icon_max_width`. @@ -221,12 +256,12 @@ When enabled, the button's icon will expand/shrink to fit the button's size whil .. rst-class:: classref-property -:ref:`bool` **flat** = ``false`` +:ref:`bool` **flat** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flat** **(** :ref:`bool` value **)** -- :ref:`bool` **is_flat** **(** **)** +- |void| **set_flat**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_flat**\ (\ ) Flat buttons don't display decoration. @@ -238,12 +273,12 @@ Flat buttons don't display decoration. .. rst-class:: classref-property -:ref:`Texture2D` **icon** +:ref:`Texture2D` **icon** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_button_icon** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_button_icon** **(** **)** +- |void| **set_button_icon**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_button_icon**\ (\ ) Button's icon, if text is present the icon will be placed before the text. @@ -257,12 +292,12 @@ To edit margin and spacing of the icon, use :ref:`h_separation` **icon_alignment** = ``0`` +:ref:`HorizontalAlignment` **icon_alignment** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_icon_alignment** **(** :ref:`HorizontalAlignment` value **)** -- :ref:`HorizontalAlignment` **get_icon_alignment** **(** **)** +- |void| **set_icon_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) +- :ref:`HorizontalAlignment` **get_icon_alignment**\ (\ ) Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same :ref:`HorizontalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. @@ -274,12 +309,12 @@ Specifies if the icon should be aligned horizontally to the left, right, or cent .. rst-class:: classref-property -:ref:`String` **language** = ``""`` +:ref:`String` **language** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String` value **)** -- :ref:`String` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -291,12 +326,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`String` **text** = ``""`` +:ref:`String` **text** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String` value **)** -- :ref:`String` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_text**\ (\ ) The button's text that will be displayed inside the button's area. @@ -308,12 +343,12 @@ The button's text that will be displayed inside the button's area. .. rst-class:: classref-property -:ref:`TextDirection` **text_direction** = ``0`` +:ref:`TextDirection` **text_direction** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection` value **)** -- :ref:`TextDirection` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection`\ ) +- :ref:`TextDirection` **get_text_direction**\ (\ ) Base text writing direction. @@ -325,12 +360,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` +:ref:`OverrunBehavior` **text_overrun_behavior** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior` value **)** -- :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** **)** +- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior`\ ) +- :ref:`OverrunBehavior` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior` for a description of all modes. @@ -342,12 +377,12 @@ Sets the clipping behavior when the text exceeds the node's bounding rectangle. .. rst-class:: classref-property -:ref:`VerticalAlignment` **vertical_icon_alignment** = ``1`` +:ref:`VerticalAlignment` **vertical_icon_alignment** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_vertical_icon_alignment** **(** :ref:`VerticalAlignment` value **)** -- :ref:`VerticalAlignment` **get_vertical_icon_alignment** **(** **)** +- |void| **set_vertical_icon_alignment**\ (\ value\: :ref:`VerticalAlignment`\ ) +- :ref:`VerticalAlignment` **get_vertical_icon_alignment**\ (\ ) Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same :ref:`VerticalAlignment` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. @@ -364,7 +399,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗` Default text :ref:`Color` of the **Button**. @@ -376,7 +411,7 @@ Default text :ref:`Color` of the **Button**. .. rst-class:: classref-themeproperty -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is disabled. @@ -388,7 +423,7 @@ Text :ref:`Color` used when the **Button** is disabled. .. rst-class:: classref-themeproperty -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. @@ -400,7 +435,7 @@ Text :ref:`Color` used when the **Button** is focused. Only replace .. rst-class:: classref-themeproperty -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being hovered. @@ -412,7 +447,7 @@ Text :ref:`Color` used when the **Button** is being hovered. .. rst-class:: classref-themeproperty -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being hovered and pressed. @@ -424,7 +459,7 @@ Text :ref:`Color` used when the **Button** is being hovered and pre .. rst-class:: classref-themeproperty -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` The tint of text outline of the **Button**. @@ -436,7 +471,7 @@ The tint of text outline of the **Button**. .. rst-class:: classref-themeproperty -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Text :ref:`Color` used when the **Button** is being pressed. @@ -448,7 +483,7 @@ Text :ref:`Color` used when the **Button** is being pressed. .. rst-class:: classref-themeproperty -:ref:`Color` **icon_disabled_color** = ``Color(1, 1, 1, 0.4)`` +:ref:`Color` **icon_disabled_color** = ``Color(1, 1, 1, 0.4)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is disabled. @@ -460,7 +495,7 @@ Icon modulate :ref:`Color` used when the **Button** is disabled. .. rst-class:: classref-themeproperty -:ref:`Color` **icon_focus_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **icon_focus_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is focused. Only replaces the normal modulate color of the button. Disabled, hovered, and pressed states take precedence over this color. @@ -472,7 +507,7 @@ Icon modulate :ref:`Color` used when the **Button** is focused. Onl .. rst-class:: classref-themeproperty -:ref:`Color` **icon_hover_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **icon_hover_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being hovered. @@ -484,7 +519,7 @@ Icon modulate :ref:`Color` used when the **Button** is being hovere .. rst-class:: classref-themeproperty -:ref:`Color` **icon_hover_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **icon_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being hovered and pressed. @@ -496,7 +531,7 @@ Icon modulate :ref:`Color` used when the **Button** is being hovere .. rst-class:: classref-themeproperty -:ref:`Color` **icon_normal_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **icon_normal_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Default icon modulate :ref:`Color` of the **Button**. @@ -508,7 +543,7 @@ Default icon modulate :ref:`Color` of the **Button**. .. rst-class:: classref-themeproperty -:ref:`Color` **icon_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **icon_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` Icon modulate :ref:`Color` used when the **Button** is being pressed. @@ -516,11 +551,23 @@ Icon modulate :ref:`Color` used when the **Button** is being presse ---- +.. _class_Button_theme_constant_align_to_largest_stylebox: + +.. rst-class:: classref-themeproperty + +:ref:`int` **align_to_largest_stylebox** = ``0`` :ref:`🔗` + +This constant acts as a boolean. If ``true``, text and icon are always aligned to the largest stylebox margins, otherwise it's aligned to the current button state stylebox margins. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_constant_h_separation: .. rst-class:: classref-themeproperty -:ref:`int` **h_separation** = ``2`` +:ref:`int` **h_separation** = ``4`` :ref:`🔗` The horizontal space between **Button**'s icon and text. Negative values will be treated as ``0`` when used. @@ -532,9 +579,9 @@ The horizontal space between **Button**'s icon and text. Negative values will be .. rst-class:: classref-themeproperty -:ref:`int` **icon_max_width** = ``0`` +:ref:`int` **icon_max_width** = ``0`` :ref:`🔗` -The maximum allowed width of the **Button**'s icon. This limit is applied on top of the default size of the icon, or its expanded size if :ref:`expand_icon` is ``true``. The height is adjusted according to the icon's ratio. +The maximum allowed width of the **Button**'s icon. This limit is applied on top of the default size of the icon, or its expanded size if :ref:`expand_icon` is ``true``. The height is adjusted according to the icon's ratio. If the button has additional icons (e.g. :ref:`CheckBox`), they will also be limited. .. rst-class:: classref-item-separator @@ -544,7 +591,7 @@ The maximum allowed width of the **Button**'s icon. This limit is applied on top .. rst-class:: classref-themeproperty -:ref:`int` **outline_size** = ``0`` +:ref:`int` **outline_size** = ``0`` :ref:`🔗` The size of the text outline. @@ -558,7 +605,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`Font` **font** +:ref:`Font` **font** :ref:`🔗` :ref:`Font` of the **Button**'s text. @@ -570,7 +617,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`int` **font_size** +:ref:`int` **font_size** :ref:`🔗` Font size of the **Button**'s text. @@ -578,11 +625,23 @@ Font size of the **Button**'s text. ---- +.. _class_Button_theme_icon_icon: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **icon** :ref:`🔗` + +Default icon for the **Button**. Appears only if :ref:`icon` is not assigned. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_disabled: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **disabled** +:ref:`StyleBox` **disabled** :ref:`🔗` :ref:`StyleBox` used when the **Button** is disabled. @@ -590,13 +649,25 @@ Font size of the **Button**'s text. ---- +.. _class_Button_theme_style_disabled_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **disabled_mirrored** :ref:`🔗` + +:ref:`StyleBox` used when the **Button** is disabled (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_focus: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **focus** +:ref:`StyleBox` **focus** :ref:`🔗` -:ref:`StyleBox` used when the **Button** is focused. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +:ref:`StyleBox` used when the **Button** is focused. The :ref:`focus` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. rst-class:: classref-item-separator @@ -606,7 +677,7 @@ Font size of the **Button**'s text. .. rst-class:: classref-themeproperty -:ref:`StyleBox` **hover** +:ref:`StyleBox` **hover** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being hovered. @@ -614,11 +685,47 @@ Font size of the **Button**'s text. ---- +.. _class_Button_theme_style_hover_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_mirrored** :ref:`🔗` + +:ref:`StyleBox` used when the **Button** is being hovered (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_hover_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed** :ref:`🔗` + +:ref:`StyleBox` used when the **Button** is being pressed and hovered at the same time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_hover_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed_mirrored** :ref:`🔗` + +:ref:`StyleBox` used when the **Button** is being pressed and hovered at the same time (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_normal: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **normal** +:ref:`StyleBox` **normal** :ref:`🔗` Default :ref:`StyleBox` for the **Button**. @@ -626,14 +733,38 @@ Default :ref:`StyleBox` for the **Button**. ---- +.. _class_Button_theme_style_normal_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **normal_mirrored** :ref:`🔗` + +Default :ref:`StyleBox` for the **Button** (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_pressed: .. rst-class:: classref-themeproperty -:ref:`StyleBox` **pressed** +:ref:`StyleBox` **pressed** :ref:`🔗` :ref:`StyleBox` used when the **Button** is being pressed. +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **pressed_mirrored** :ref:`🔗` + +:ref:`StyleBox` used when the **Button** is being pressed (for right-to-left layouts). + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -641,3 +772,4 @@ Default :ref:`StyleBox` for the **Button**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index 2905b6bdf73..dee45a48992 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -45,11 +45,11 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------+ - | :ref:`BaseButton[]` | :ref:`get_buttons` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------+ - | :ref:`BaseButton` | :ref:`get_pressed_button` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`BaseButton`\] | :ref:`get_buttons`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`BaseButton` | :ref:`get_pressed_button`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,7 +64,7 @@ Signals .. rst-class:: classref-signal -**pressed** **(** :ref:`BaseButton` button **)** +**pressed**\ (\ button\: :ref:`BaseButton`\ ) :ref:`🔗` Emitted when one of the buttons of the group is pressed. @@ -81,12 +81,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **allow_unpress** = ``false`` +:ref:`bool` **allow_unpress** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_allow_unpress** **(** :ref:`bool` value **)** -- :ref:`bool` **is_allow_unpress** **(** **)** +- |void| **set_allow_unpress**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_allow_unpress**\ (\ ) If ``true``, it is possible to unpress all buttons in this **ButtonGroup**. @@ -103,7 +103,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`BaseButton[]` **get_buttons** **(** **)** +:ref:`Array`\[:ref:`BaseButton`\] **get_buttons**\ (\ ) :ref:`🔗` Returns an :ref:`Array` of :ref:`Button`\ s who have this as their **ButtonGroup** (see :ref:`BaseButton.button_group`). @@ -115,7 +115,7 @@ Returns an :ref:`Array` of :ref:`Button`\ s who have .. rst-class:: classref-method -:ref:`BaseButton` **get_pressed_button** **(** **)** +:ref:`BaseButton` **get_pressed_button**\ (\ ) :ref:`🔗` Returns the current pressed button. @@ -126,3 +126,4 @@ Returns the current pressed button. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 7be19b5c9c3..691f4482ef9 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -17,7 +17,7 @@ A built-in type representing a method or a standalone function. Description ----------- -**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a standalone function not related to any object, like a lambda function. Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. +**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. \ **Example:**\ @@ -68,18 +68,25 @@ In GDScript, it's possible to create lambda functions within a method. Lambda fu # Prints "Attack!", when the button_pressed signal is emitted. button_pressed.connect(func(): print("Attack!")) -\ **Note:** Methods of native types such as :ref:`Signal`, :ref:`Array`, or :ref:`Dictionary` are not of type **Callable** in order to avoid unnecessary overhead. If you need to pass those methods as **Callable**, use a lambda function as a wrapper. +In GDScript, you can access methods and global functions as **Callable**\ s: :: - func _init(): - var my_dictionary = { "hello": "world" } + tween.tween_callback(node.queue_free) # Object methods. + tween.tween_callback(array.clear) # Methods of built-in types. + tween.tween_callback(print.bind("Test")) # Global functions. + +\ **Note:** :ref:`Dictionary` does not support the above due to ambiguity with keys. + +:: + + var dictionary = {"hello": "world"} - # This will not work, `clear` is not a callable. - create_tween().tween_callback(my_dictionary.clear) + # This will not work, `clear` is treated as a key. + tween.tween_callback(dictionary.clear) - # This will work, as lambdas are custom callables. - create_tween().tween_callback(func(): my_dictionary.clear()) + # This will work. + tween.tween_callback(Callable.create(dictionary, "clear")) .. note:: @@ -93,13 +100,13 @@ Constructors .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`Callable` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`Callable` **(** :ref:`Callable` from **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`Callable` **(** :ref:`Object` object, :ref:`StringName` method **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable`\ (\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable`\ (\ from\: :ref:`Callable`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`Callable`\ (\ object\: :ref:`Object`, method\: :ref:`StringName`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -109,43 +116,47 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`bind` **(** ... **)** |vararg| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`bindv` **(** :ref:`Array` arguments **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`call` **(** ... **)** |vararg| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | void | :ref:`call_deferred` **(** ... **)** |vararg| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`callv` **(** :ref:`Array` arguments **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_bound_arguments` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bound_arguments_count` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_method` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`get_object` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_object_id` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`hash` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_custom` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_null` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_standard` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_valid` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rpc` **(** ... **)** |vararg| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rpc_id` **(** :ref:`int` peer_id, ... **)** |vararg| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`unbind` **(** :ref:`int` argcount **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`bind`\ (\ ...\ ) |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`bindv`\ (\ arguments\: :ref:`Array`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`call`\ (\ ...\ ) |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`call_deferred`\ (\ ...\ ) |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`callv`\ (\ arguments\: :ref:`Array`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`create`\ (\ variant\: :ref:`Variant`, method\: :ref:`StringName`\ ) |static| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_argument_count`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_bound_arguments`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bound_arguments_count`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_method`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_object`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_object_id`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_custom`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_null`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_standard`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_valid`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rpc`\ (\ ...\ ) |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rpc_id`\ (\ peer_id\: :ref:`int`, ...\ ) |vararg| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`unbind`\ (\ argcount\: :ref:`int`\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -155,11 +166,11 @@ Operators .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`Callable` right **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`Callable` right **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Callable`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Callable`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -174,7 +185,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Callable` **Callable** **(** **)** +:ref:`Callable` **Callable**\ (\ ) :ref:`🔗` Constructs an empty **Callable**, with no object nor method bound. @@ -184,7 +195,7 @@ Constructs an empty **Callable**, with no object nor method bound. .. rst-class:: classref-constructor -:ref:`Callable` **Callable** **(** :ref:`Callable` from **)** +:ref:`Callable` **Callable**\ (\ from\: :ref:`Callable`\ ) Constructs a **Callable** as a copy of the given **Callable**. @@ -194,10 +205,12 @@ Constructs a **Callable** as a copy of the given **Callable**. .. rst-class:: classref-constructor -:ref:`Callable` **Callable** **(** :ref:`Object` object, :ref:`StringName` method **)** +:ref:`Callable` **Callable**\ (\ object\: :ref:`Object`, method\: :ref:`StringName`\ ) Creates a new **Callable** for the method named ``method`` in the specified ``object``. +\ **Note:** For methods of built-in :ref:`Variant` types, use :ref:`create` instead. + .. rst-class:: classref-section-separator ---- @@ -211,7 +224,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Callable` **bind** **(** ... **)** |vararg| |const| +:ref:`Callable` **bind**\ (\ ...\ ) |vararg| |const| :ref:`🔗` Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. @@ -225,7 +238,7 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle .. rst-class:: classref-method -:ref:`Callable` **bindv** **(** :ref:`Array` arguments **)** +:ref:`Callable` **bindv**\ (\ arguments\: :ref:`Array`\ ) :ref:`🔗` Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. @@ -239,7 +252,7 @@ Returns a copy of this **Callable** with one or more arguments bound, reading th .. rst-class:: classref-method -:ref:`Variant` **call** **(** ... **)** |vararg| |const| +:ref:`Variant` **call**\ (\ ...\ ) |vararg| |const| :ref:`🔗` Calls the method represented by this **Callable**. Arguments can be passed and should match the method's signature. @@ -251,15 +264,29 @@ Calls the method represented by this **Callable**. Arguments can be passed and s .. rst-class:: classref-method -void **call_deferred** **(** ... **)** |vararg| |const| +|void| **call_deferred**\ (\ ...\ ) |vararg| |const| :ref:`🔗` Calls the method represented by this **Callable** in deferred mode, i.e. at the end of the current frame. Arguments can be passed and should match the method's signature. -:: + +.. tabs:: + + .. code-tab:: gdscript func _ready(): grab_focus.call_deferred() + .. code-tab:: csharp + + public override void _Ready() + { + Callable.From(GrabFocus).CallDeferred(); + } + + + +\ **Note:** Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. + See also :ref:`Object.call_deferred`. .. rst-class:: classref-item-separator @@ -270,7 +297,7 @@ See also :ref:`Object.call_deferred`. .. rst-class:: classref-method -:ref:`Variant` **callv** **(** :ref:`Array` arguments **)** |const| +:ref:`Variant` **callv**\ (\ arguments\: :ref:`Array`\ ) |const| :ref:`🔗` Calls the method represented by this **Callable**. Unlike :ref:`call`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. @@ -278,11 +305,37 @@ Calls the method represented by this **Callable**. Unlike :ref:`call` **create**\ (\ variant\: :ref:`Variant`, method\: :ref:`StringName`\ ) |static| :ref:`🔗` + +Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant` type, a custom callable is used (see :ref:`is_custom`). If ``variant`` is :ref:`Object`, then a standard callable will be created instead. + +\ **Note:** This method is always necessary for the :ref:`Dictionary` type, as property syntax is used to access its entries. You may also use this method when ``variant``'s type is not known in advance (for polymorphism). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Callable_method_get_argument_count: + +.. rst-class:: classref-method + +:ref:`int` **get_argument_count**\ (\ ) |const| :ref:`🔗` + +Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind` are *subtracted* from the result, and any arguments unbound with :ref:`unbind` are *added* to the result. + +.. rst-class:: classref-item-separator + +---- + .. _class_Callable_method_get_bound_arguments: .. rst-class:: classref-method -:ref:`Array` **get_bound_arguments** **(** **)** |const| +:ref:`Array` **get_bound_arguments**\ (\ ) |const| :ref:`🔗` Return the bound arguments (as long as :ref:`get_bound_arguments_count` is greater than zero), or empty (if :ref:`get_bound_arguments_count` is less than or equal to zero). @@ -294,7 +347,7 @@ Return the bound arguments (as long as :ref:`get_bound_arguments_count` **get_bound_arguments_count** **(** **)** |const| +:ref:`int` **get_bound_arguments_count**\ (\ ) |const| :ref:`🔗` Returns the total amount of arguments bound (or unbound) via successive :ref:`bind` or :ref:`unbind` calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. @@ -306,9 +359,9 @@ Returns the total amount of arguments bound (or unbound) via successive :ref:`bi .. rst-class:: classref-method -:ref:`StringName` **get_method** **(** **)** |const| +:ref:`StringName` **get_method**\ (\ ) |const| :ref:`🔗` -Returns the name of the method represented by this **Callable**. If the callable is a lambda function, returns the function's name. +Returns the name of the method represented by this **Callable**. If the callable is a GDScript lambda function, returns the function's name or ``""``. .. rst-class:: classref-item-separator @@ -318,7 +371,7 @@ Returns the name of the method represented by this **Callable**. If the callable .. rst-class:: classref-method -:ref:`Object` **get_object** **(** **)** |const| +:ref:`Object` **get_object**\ (\ ) |const| :ref:`🔗` Returns the object on which this **Callable** is called. @@ -330,7 +383,7 @@ Returns the object on which this **Callable** is called. .. rst-class:: classref-method -:ref:`int` **get_object_id** **(** **)** |const| +:ref:`int` **get_object_id**\ (\ ) |const| :ref:`🔗` Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id`). @@ -342,7 +395,7 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id` **hash** **(** **)** |const| +:ref:`int` **hash**\ (\ ) |const| :ref:`🔗` Returns the 32-bit hash value of this **Callable**'s object. @@ -356,9 +409,17 @@ Returns the 32-bit hash value of this **Callable**'s object. .. rst-class:: classref-method -:ref:`bool` **is_custom** **(** **)** |const| +:ref:`bool` **is_custom**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if this **Callable** is a custom callable. Custom callables are used: + +- for binding/unbinding arguments (see :ref:`bind` and :ref:`unbind`); + +- for representing methods of built-in :ref:`Variant` types (see :ref:`create`); + +- for representing global, lambda, and RPC functions in GDScript; -Returns ``true`` if this **Callable** is a custom callable. Custom callables are created from :ref:`bind` or :ref:`unbind`. In GDScript, lambda functions are also custom callables. +- for other purposes in the core, GDExtension, and C#. .. rst-class:: classref-item-separator @@ -368,7 +429,7 @@ Returns ``true`` if this **Callable** is a custom callable. Custom callables are .. rst-class:: classref-method -:ref:`bool` **is_null** **(** **)** |const| +:ref:`bool` **is_null**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this **Callable** has no target to call the method on. @@ -380,7 +441,7 @@ Returns ``true`` if this **Callable** has no target to call the method on. .. rst-class:: classref-method -:ref:`bool` **is_standard** **(** **)** |const| +:ref:`bool` **is_standard**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom`. Returns ``false`` if this callable is a lambda function. @@ -392,7 +453,7 @@ Returns ``true`` if this **Callable** is a standard callable. This method is the .. rst-class:: classref-method -:ref:`bool` **is_valid** **(** **)** |const| +:ref:`bool` **is_valid**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the callable's object exists and has a valid method name assigned, or is a custom callable. @@ -404,7 +465,7 @@ Returns ``true`` if the callable's object exists and has a valid method name ass .. rst-class:: classref-method -void **rpc** **(** ... **)** |vararg| |const| +|void| **rpc**\ (\ ...\ ) |vararg| |const| :ref:`🔗` Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc`. @@ -416,7 +477,7 @@ Perform an RPC (Remote Procedure Call) on all connected peers. This is used for .. rst-class:: classref-method -void **rpc_id** **(** :ref:`int` peer_id, ... **)** |vararg| |const| +|void| **rpc_id**\ (\ peer_id\: :ref:`int`, ...\ ) |vararg| |const| :ref:`🔗` Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id`. @@ -428,7 +489,7 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do .. rst-class:: classref-method -:ref:`Callable` **unbind** **(** :ref:`int` argcount **)** |const| +:ref:`Callable` **unbind**\ (\ argcount\: :ref:`int`\ ) |const| :ref:`🔗` Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind`. @@ -453,7 +514,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`Callable` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`Callable`\ ) :ref:`🔗` Returns ``true`` if both **Callable**\ s invoke different targets. @@ -465,7 +526,7 @@ Returns ``true`` if both **Callable**\ s invoke different targets. .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`Callable` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`Callable`\ ) :ref:`🔗` Returns ``true`` if both **Callable**\ s invoke the same custom target. @@ -476,3 +537,4 @@ Returns ``true`` if both **Callable**\ s invoke the same custom target. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 60cfc9cf793..b78d9c67348 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -21,6 +21,8 @@ Description **CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. +The tweener will finish automatically if the callback's target object is freed. + \ **Note:** :ref:`Tween.tween_callback` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -31,9 +33,9 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+------------------------------------------------------------------------------------------------------+ - | :ref:`CallbackTweener` | :ref:`set_delay` **(** :ref:`float` delay **)** | - +-----------------------------------------------+------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------------------------------+ + | :ref:`CallbackTweener` | :ref:`set_delay`\ (\ delay\: :ref:`float`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`CallbackTweener` **set_delay** **(** :ref:`float` delay **)** +:ref:`CallbackTweener` **set_delay**\ (\ delay\: :ref:`float`\ ) :ref:`🔗` Makes the callback call delayed by given time in seconds. @@ -66,3 +68,4 @@ Makes the callback call delayed by given time in seconds. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 440fc6a0e40..e9c3bece41b 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -32,11 +32,9 @@ Note that the **Camera2D** node's ``position`` doesn't represent the actual posi Tutorials --------- -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ -- `2D Isometric Demo `__ - -- `2D HDR Demo `__ +- `2D Isometric Demo `__ .. rst-class:: classref-reftable-group @@ -110,29 +108,29 @@ Methods .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`align` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_scroll` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_drag_margin` **(** :ref:`Side` margin **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_limit` **(** :ref:`Side` margin **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_screen_center_position` **(** **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_target_position` **(** **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_current` **(** **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_current` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_smoothing` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_drag_margin` **(** :ref:`Side` margin, :ref:`float` drag_margin **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_limit` **(** :ref:`Side` margin, :ref:`int` limit **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`align`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_scroll`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_drag_margin`\ (\ margin\: :ref:`Side`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_limit`\ (\ margin\: :ref:`Side`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_screen_center_position`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_target_position`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_current`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_smoothing`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_drag_margin`\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_limit`\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -147,7 +145,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AnchorMode**: +enum **AnchorMode**: :ref:`🔗` .. _class_Camera2D_constant_ANCHOR_MODE_FIXED_TOP_LEFT: @@ -173,7 +171,7 @@ The camera's position takes into account vertical/horizontal offsets and the scr .. rst-class:: classref-enumeration -enum **Camera2DProcessCallback**: +enum **Camera2DProcessCallback**: :ref:`🔗` .. _class_Camera2D_constant_CAMERA2D_PROCESS_PHYSICS: @@ -204,12 +202,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AnchorMode` **anchor_mode** = ``1`` +:ref:`AnchorMode` **anchor_mode** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_anchor_mode** **(** :ref:`AnchorMode` value **)** -- :ref:`AnchorMode` **get_anchor_mode** **(** **)** +- |void| **set_anchor_mode**\ (\ value\: :ref:`AnchorMode`\ ) +- :ref:`AnchorMode` **get_anchor_mode**\ (\ ) The Camera2D's anchor point. See :ref:`AnchorMode` constants. @@ -221,12 +219,12 @@ The Camera2D's anchor point. See :ref:`AnchorMode` con .. rst-class:: classref-property -:ref:`Node` **custom_viewport** +:ref:`Node` **custom_viewport** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_custom_viewport** **(** :ref:`Node` value **)** -- :ref:`Node` **get_custom_viewport** **(** **)** +- |void| **set_custom_viewport**\ (\ value\: :ref:`Node`\ ) +- :ref:`Node` **get_custom_viewport**\ (\ ) The custom :ref:`Viewport` node attached to the **Camera2D**. If ``null`` or not a :ref:`Viewport`, uses the default viewport instead. @@ -238,12 +236,12 @@ The custom :ref:`Viewport` node attached to the **Camera2D**. If .. rst-class:: classref-property -:ref:`float` **drag_bottom_margin** = ``0.2`` +:ref:`float` **drag_bottom_margin** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** -- :ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +- |void| **set_drag_margin**\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) +- :ref:`float` **get_drag_margin**\ (\ margin\: :ref:`Side`\ ) |const| Bottom margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the bottom edge of the screen. @@ -255,12 +253,12 @@ Bottom margin needed to drag the camera. A value of ``1`` makes the camera move .. rst-class:: classref-property -:ref:`bool` **drag_horizontal_enabled** = ``false`` +:ref:`bool` **drag_horizontal_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_horizontal_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drag_horizontal_enabled** **(** **)** +- |void| **set_drag_horizontal_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drag_horizontal_enabled**\ (\ ) If ``true``, the camera only moves when reaching the horizontal (left and right) drag margins. If ``false``, the camera moves horizontally regardless of margins. @@ -272,12 +270,12 @@ If ``true``, the camera only moves when reaching the horizontal (left and right) .. rst-class:: classref-property -:ref:`float` **drag_horizontal_offset** = ``0.0`` +:ref:`float` **drag_horizontal_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_horizontal_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_drag_horizontal_offset** **(** **)** +- |void| **set_drag_horizontal_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_drag_horizontal_offset**\ (\ ) The relative horizontal drag offset of the camera between the right (``-1``) and left (``1``) drag margins. @@ -291,12 +289,12 @@ The relative horizontal drag offset of the camera between the right (``-1``) and .. rst-class:: classref-property -:ref:`float` **drag_left_margin** = ``0.2`` +:ref:`float` **drag_left_margin** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** -- :ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +- |void| **set_drag_margin**\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) +- :ref:`float` **get_drag_margin**\ (\ margin\: :ref:`Side`\ ) |const| Left margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the left edge of the screen. @@ -308,12 +306,12 @@ Left margin needed to drag the camera. A value of ``1`` makes the camera move on .. rst-class:: classref-property -:ref:`float` **drag_right_margin** = ``0.2`` +:ref:`float` **drag_right_margin** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** -- :ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +- |void| **set_drag_margin**\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) +- :ref:`float` **get_drag_margin**\ (\ margin\: :ref:`Side`\ ) |const| Right margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the right edge of the screen. @@ -325,12 +323,12 @@ Right margin needed to drag the camera. A value of ``1`` makes the camera move o .. rst-class:: classref-property -:ref:`float` **drag_top_margin** = ``0.2`` +:ref:`float` **drag_top_margin** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_margin** **(** :ref:`Side` margin, :ref:`float` drag_margin **)** -- :ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +- |void| **set_drag_margin**\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) +- :ref:`float` **get_drag_margin**\ (\ margin\: :ref:`Side`\ ) |const| Top margin needed to drag the camera. A value of ``1`` makes the camera move only when reaching the top edge of the screen. @@ -342,12 +340,12 @@ Top margin needed to drag the camera. A value of ``1`` makes the camera move onl .. rst-class:: classref-property -:ref:`bool` **drag_vertical_enabled** = ``false`` +:ref:`bool` **drag_vertical_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_vertical_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drag_vertical_enabled** **(** **)** +- |void| **set_drag_vertical_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drag_vertical_enabled**\ (\ ) If ``true``, the camera only moves when reaching the vertical (top and bottom) drag margins. If ``false``, the camera moves vertically regardless of the drag margins. @@ -359,12 +357,12 @@ If ``true``, the camera only moves when reaching the vertical (top and bottom) d .. rst-class:: classref-property -:ref:`float` **drag_vertical_offset** = ``0.0`` +:ref:`float` **drag_vertical_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_drag_vertical_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_drag_vertical_offset** **(** **)** +- |void| **set_drag_vertical_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_drag_vertical_offset**\ (\ ) The relative vertical drag offset of the camera between the bottom (``-1``) and top (``1``) drag margins. @@ -378,12 +376,12 @@ The relative vertical drag offset of the camera between the bottom (``-1``) and .. rst-class:: classref-property -:ref:`bool` **editor_draw_drag_margin** = ``false`` +:ref:`bool` **editor_draw_drag_margin** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_margin_drawing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_margin_drawing_enabled** **(** **)** +- |void| **set_margin_drawing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_margin_drawing_enabled**\ (\ ) If ``true``, draws the camera's drag margin rectangle in the editor. @@ -395,12 +393,12 @@ If ``true``, draws the camera's drag margin rectangle in the editor. .. rst-class:: classref-property -:ref:`bool` **editor_draw_limits** = ``false`` +:ref:`bool` **editor_draw_limits** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit_drawing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_limit_drawing_enabled** **(** **)** +- |void| **set_limit_drawing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_limit_drawing_enabled**\ (\ ) If ``true``, draws the camera's limits rectangle in the editor. @@ -412,12 +410,12 @@ If ``true``, draws the camera's limits rectangle in the editor. .. rst-class:: classref-property -:ref:`bool` **editor_draw_screen** = ``true`` +:ref:`bool` **editor_draw_screen** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_screen_drawing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_screen_drawing_enabled** **(** **)** +- |void| **set_screen_drawing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_screen_drawing_enabled**\ (\ ) If ``true``, draws the camera's screen rectangle in the editor. @@ -429,12 +427,12 @@ If ``true``, draws the camera's screen rectangle in the editor. .. rst-class:: classref-property -:ref:`bool` **enabled** = ``true`` +:ref:`bool` **enabled** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_enabled**\ (\ ) Controls whether the camera can be active or not. If ``true``, the **Camera2D** will become the main camera when it enters the scene tree and there is no active camera currently (see :ref:`Viewport.get_camera_2d`). @@ -448,12 +446,12 @@ When the camera is currently active and :ref:`enabled` **ignore_rotation** = ``true`` +:ref:`bool` **ignore_rotation** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ignore_rotation** **(** :ref:`bool` value **)** -- :ref:`bool` **is_ignoring_rotation** **(** **)** +- |void| **set_ignore_rotation**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_ignoring_rotation**\ (\ ) If ``true``, the camera's rendered view is not affected by its :ref:`Node2D.rotation` and :ref:`Node2D.global_rotation`. @@ -465,12 +463,12 @@ If ``true``, the camera's rendered view is not affected by its :ref:`Node2D.rota .. rst-class:: classref-property -:ref:`int` **limit_bottom** = ``10000000`` +:ref:`int` **limit_bottom** = ``10000000`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** -- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +- |void| **set_limit**\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) +- :ref:`int` **get_limit**\ (\ margin\: :ref:`Side`\ ) |const| Bottom scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. @@ -482,12 +480,12 @@ Bottom scroll limit in pixels. The camera stops moving when reaching this value, .. rst-class:: classref-property -:ref:`int` **limit_left** = ``-10000000`` +:ref:`int` **limit_left** = ``-10000000`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** -- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +- |void| **set_limit**\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) +- :ref:`int` **get_limit**\ (\ margin\: :ref:`Side`\ ) |const| Left scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. @@ -499,12 +497,12 @@ Left scroll limit in pixels. The camera stops moving when reaching this value, b .. rst-class:: classref-property -:ref:`int` **limit_right** = ``10000000`` +:ref:`int` **limit_right** = ``10000000`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** -- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +- |void| **set_limit**\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) +- :ref:`int` **get_limit**\ (\ margin\: :ref:`Side`\ ) |const| Right scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. @@ -516,12 +514,12 @@ Right scroll limit in pixels. The camera stops moving when reaching this value, .. rst-class:: classref-property -:ref:`bool` **limit_smoothed** = ``false`` +:ref:`bool` **limit_smoothed** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit_smoothing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_limit_smoothing_enabled** **(** **)** +- |void| **set_limit_smoothing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_limit_smoothing_enabled**\ (\ ) If ``true``, the camera smoothly stops when reaches its limits. @@ -537,12 +535,12 @@ This property has no effect if :ref:`position_smoothing_enabled` **limit_top** = ``-10000000`` +:ref:`int` **limit_top** = ``-10000000`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** -- :ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +- |void| **set_limit**\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) +- :ref:`int` **get_limit**\ (\ margin\: :ref:`Side`\ ) |const| Top scroll limit in pixels. The camera stops moving when reaching this value, but :ref:`offset` can push the view past the limit. @@ -554,12 +552,12 @@ Top scroll limit in pixels. The camera stops moving when reaching this value, bu .. rst-class:: classref-property -:ref:`Vector2` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_offset**\ (\ ) The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in :ref:`limit_top`, :ref:`limit_bottom`, :ref:`limit_left` and :ref:`limit_right`. @@ -571,12 +569,12 @@ The camera's relative offset. Useful for looking around or camera shake animatio .. rst-class:: classref-property -:ref:`bool` **position_smoothing_enabled** = ``false`` +:ref:`bool` **position_smoothing_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_position_smoothing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_position_smoothing_enabled** **(** **)** +- |void| **set_position_smoothing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_position_smoothing_enabled**\ (\ ) If ``true``, the camera's view smoothly moves towards its target position at :ref:`position_smoothing_speed`. @@ -588,12 +586,12 @@ If ``true``, the camera's view smoothly moves towards its target position at :re .. rst-class:: classref-property -:ref:`float` **position_smoothing_speed** = ``5.0`` +:ref:`float` **position_smoothing_speed** = ``5.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_position_smoothing_speed** **(** :ref:`float` value **)** -- :ref:`float` **get_position_smoothing_speed** **(** **)** +- |void| **set_position_smoothing_speed**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_position_smoothing_speed**\ (\ ) Speed in pixels per second of the camera's smoothing effect when :ref:`position_smoothing_enabled` is ``true``. @@ -605,12 +603,12 @@ Speed in pixels per second of the camera's smoothing effect when :ref:`position_ .. rst-class:: classref-property -:ref:`Camera2DProcessCallback` **process_callback** = ``1`` +:ref:`Camera2DProcessCallback` **process_callback** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_process_callback** **(** :ref:`Camera2DProcessCallback` value **)** -- :ref:`Camera2DProcessCallback` **get_process_callback** **(** **)** +- |void| **set_process_callback**\ (\ value\: :ref:`Camera2DProcessCallback`\ ) +- :ref:`Camera2DProcessCallback` **get_process_callback**\ (\ ) The camera's process callback. See :ref:`Camera2DProcessCallback`. @@ -622,12 +620,12 @@ The camera's process callback. See :ref:`Camera2DProcessCallback` **rotation_smoothing_enabled** = ``false`` +:ref:`bool` **rotation_smoothing_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rotation_smoothing_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_rotation_smoothing_enabled** **(** **)** +- |void| **set_rotation_smoothing_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_rotation_smoothing_enabled**\ (\ ) If ``true``, the camera's view smoothly rotates, via asymptotic smoothing, to align with its target rotation at :ref:`rotation_smoothing_speed`. @@ -641,12 +639,12 @@ If ``true``, the camera's view smoothly rotates, via asymptotic smoothing, to al .. rst-class:: classref-property -:ref:`float` **rotation_smoothing_speed** = ``5.0`` +:ref:`float` **rotation_smoothing_speed** = ``5.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rotation_smoothing_speed** **(** :ref:`float` value **)** -- :ref:`float` **get_rotation_smoothing_speed** **(** **)** +- |void| **set_rotation_smoothing_speed**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rotation_smoothing_speed**\ (\ ) The angular, asymptotic speed of the camera's rotation smoothing effect when :ref:`rotation_smoothing_enabled` is ``true``. @@ -658,12 +656,12 @@ The angular, asymptotic speed of the camera's rotation smoothing effect when :re .. rst-class:: classref-property -:ref:`Vector2` **zoom** = ``Vector2(1, 1)`` +:ref:`Vector2` **zoom** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_zoom** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_zoom** **(** **)** +- |void| **set_zoom**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_zoom**\ (\ ) The camera's zoom. A zoom of ``Vector(2, 2)`` doubles the size seen in the viewport. A zoom of ``Vector(0.5, 0.5)`` halves the size seen in the viewport. @@ -682,7 +680,7 @@ Method Descriptions .. rst-class:: classref-method -void **align** **(** **)** +|void| **align**\ (\ ) :ref:`🔗` Aligns the camera to the tracked node. @@ -694,7 +692,7 @@ Aligns the camera to the tracked node. .. rst-class:: classref-method -void **force_update_scroll** **(** **)** +|void| **force_update_scroll**\ (\ ) :ref:`🔗` Forces the camera to update scroll immediately. @@ -706,7 +704,7 @@ Forces the camera to update scroll immediately. .. rst-class:: classref-method -:ref:`float` **get_drag_margin** **(** :ref:`Side` margin **)** |const| +:ref:`float` **get_drag_margin**\ (\ margin\: :ref:`Side`\ ) |const| :ref:`🔗` Returns the specified :ref:`Side`'s margin. See also :ref:`drag_bottom_margin`, :ref:`drag_top_margin`, :ref:`drag_left_margin`, and :ref:`drag_right_margin`. @@ -718,7 +716,7 @@ Returns the specified :ref:`Side`'s margin. See also :re .. rst-class:: classref-method -:ref:`int` **get_limit** **(** :ref:`Side` margin **)** |const| +:ref:`int` **get_limit**\ (\ margin\: :ref:`Side`\ ) |const| :ref:`🔗` Returns the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. @@ -730,7 +728,7 @@ Returns the camera limit for the specified :ref:`Side`. .. rst-class:: classref-method -:ref:`Vector2` **get_screen_center_position** **(** **)** |const| +:ref:`Vector2` **get_screen_center_position**\ (\ ) |const| :ref:`🔗` Returns the center of the screen from this camera's point of view, in global coordinates. @@ -744,7 +742,7 @@ Returns the center of the screen from this camera's point of view, in global coo .. rst-class:: classref-method -:ref:`Vector2` **get_target_position** **(** **)** |const| +:ref:`Vector2` **get_target_position**\ (\ ) |const| :ref:`🔗` Returns this camera's target position, in global coordinates. @@ -758,7 +756,7 @@ Returns this camera's target position, in global coordinates. .. rst-class:: classref-method -:ref:`bool` **is_current** **(** **)** |const| +:ref:`bool` **is_current**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.get_camera_2d`). @@ -770,7 +768,7 @@ Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.g .. rst-class:: classref-method -void **make_current** **(** **)** +|void| **make_current**\ (\ ) :ref:`🔗` Forces this **Camera2D** to become the current active one. :ref:`enabled` must be ``true``. @@ -782,7 +780,7 @@ Forces this **Camera2D** to become the current active one. :ref:`enabled` Sets the camera's position immediately to its current smoothing destination. @@ -796,7 +794,7 @@ This method has no effect if :ref:`position_smoothing_enabled` margin, :ref:`float` drag_margin **)** +|void| **set_drag_margin**\ (\ margin\: :ref:`Side`, drag_margin\: :ref:`float`\ ) :ref:`🔗` Sets the specified :ref:`Side`'s margin. See also :ref:`drag_bottom_margin`, :ref:`drag_top_margin`, :ref:`drag_left_margin`, and :ref:`drag_right_margin`. @@ -808,7 +806,7 @@ Sets the specified :ref:`Side`'s margin. See also :ref:` .. rst-class:: classref-method -void **set_limit** **(** :ref:`Side` margin, :ref:`int` limit **)** +|void| **set_limit**\ (\ margin\: :ref:`Side`, limit\: :ref:`int`\ ) :ref:`🔗` Sets the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. @@ -819,3 +817,4 @@ Sets the camera limit for the specified :ref:`Side`. See .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index dff858d2604..21b31fa7a43 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -28,7 +28,7 @@ Description Tutorials --------- -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -41,6 +41,8 @@ Properties +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ | :ref:`CameraAttributes` | :ref:`attributes` | | +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ + | :ref:`Compositor` | :ref:`compositor` | | + +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`cull_mask` | ``1048575`` | +-------------------------------------------------------+-------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`current` | ``false`` | @@ -76,45 +78,45 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_current` **(** :ref:`bool` enable_next=true **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection` | :ref:`get_camera_projection` **(** **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_camera_rid` **(** **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_camera_transform` **(** **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_cull_mask_value` **(** :ref:`int` layer_number **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane[]` | :ref:`get_frustum` **(** **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_pyramid_shape_rid` **(** **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_position_behind` **(** :ref:`Vector3` world_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_position_in_frustum` **(** :ref:`Vector3` world_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_current` **(** **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`project_local_ray_normal` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`project_position` **(** :ref:`Vector2` screen_point, :ref:`float` z_depth **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`project_ray_normal` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`project_ray_origin` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cull_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frustum` **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_orthogonal` **(** :ref:`float` size, :ref:`float` z_near, :ref:`float` z_far **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_perspective` **(** :ref:`float` fov, :ref:`float` z_near, :ref:`float` z_far **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`unproject_position` **(** :ref:`Vector3` world_point **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_current`\ (\ enable_next\: :ref:`bool` = true\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`get_camera_projection`\ (\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_camera_rid`\ (\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_camera_transform`\ (\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_cull_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Plane`\] | :ref:`get_frustum`\ (\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_pyramid_shape_rid`\ (\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_position_behind`\ (\ world_point\: :ref:`Vector3`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_position_in_frustum`\ (\ world_point\: :ref:`Vector3`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_current`\ (\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project_local_ray_normal`\ (\ screen_point\: :ref:`Vector2`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project_position`\ (\ screen_point\: :ref:`Vector2`, z_depth\: :ref:`float`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project_ray_normal`\ (\ screen_point\: :ref:`Vector2`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`project_ray_origin`\ (\ screen_point\: :ref:`Vector2`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cull_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frustum`\ (\ size\: :ref:`float`, offset\: :ref:`Vector2`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_orthogonal`\ (\ size\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_perspective`\ (\ fov\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`unproject_position`\ (\ world_point\: :ref:`Vector3`\ ) |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -129,7 +131,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ProjectionType**: +enum **ProjectionType**: :ref:`🔗` .. _class_Camera3D_constant_PROJECTION_PERSPECTIVE: @@ -163,7 +165,7 @@ Frustum projection. This mode allows adjusting :ref:`frustum_offset` .. _class_Camera3D_constant_KEEP_WIDTH: @@ -189,7 +191,7 @@ Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually .. rst-class:: classref-enumeration -enum **DopplerTracking**: +enum **DopplerTracking**: :ref:`🔗` .. _class_Camera3D_constant_DOPPLER_TRACKING_DISABLED: @@ -228,12 +230,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CameraAttributes` **attributes** +:ref:`CameraAttributes` **attributes** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_attributes** **(** :ref:`CameraAttributes` value **)** -- :ref:`CameraAttributes` **get_attributes** **(** **)** +- |void| **set_attributes**\ (\ value\: :ref:`CameraAttributes`\ ) +- :ref:`CameraAttributes` **get_attributes**\ (\ ) The :ref:`CameraAttributes` to use for this camera. @@ -241,16 +243,33 @@ The :ref:`CameraAttributes` to use for this camera. ---- +.. _class_Camera3D_property_compositor: + +.. rst-class:: classref-property + +:ref:`Compositor` **compositor** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_compositor**\ (\ value\: :ref:`Compositor`\ ) +- :ref:`Compositor` **get_compositor**\ (\ ) + +The :ref:`Compositor` to use for this camera. + +.. rst-class:: classref-item-separator + +---- + .. _class_Camera3D_property_cull_mask: .. rst-class:: classref-property -:ref:`int` **cull_mask** = ``1048575`` +:ref:`int` **cull_mask** = ``1048575`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_cull_mask**\ (\ ) The culling mask that describes which :ref:`VisualInstance3D.layers` are rendered by this camera. By default, all 20 user-visible layers are rendered. @@ -268,12 +287,12 @@ To adjust :ref:`cull_mask` more easily using .. rst-class:: classref-property -:ref:`bool` **current** = ``false`` +:ref:`bool` **current** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_current** **(** :ref:`bool` value **)** -- :ref:`bool` **is_current** **(** **)** +- |void| **set_current**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_current**\ (\ ) If ``true``, the ancestor :ref:`Viewport` is currently using this camera. @@ -287,12 +306,12 @@ If multiple cameras are in the scene, one will always be made current. For examp .. rst-class:: classref-property -:ref:`DopplerTracking` **doppler_tracking** = ``0`` +:ref:`DopplerTracking` **doppler_tracking** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_doppler_tracking** **(** :ref:`DopplerTracking` value **)** -- :ref:`DopplerTracking` **get_doppler_tracking** **(** **)** +- |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking`\ ) +- :ref:`DopplerTracking` **get_doppler_tracking**\ (\ ) If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. See :ref:`DopplerTracking` for possible values. @@ -304,12 +323,12 @@ If not :ref:`DOPPLER_TRACKING_DISABLED` **environment** +:ref:`Environment` **environment** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_environment** **(** :ref:`Environment` value **)** -- :ref:`Environment` **get_environment** **(** **)** +- |void| **set_environment**\ (\ value\: :ref:`Environment`\ ) +- :ref:`Environment` **get_environment**\ (\ ) The :ref:`Environment` to use for this camera. @@ -321,12 +340,12 @@ The :ref:`Environment` to use for this camera. .. rst-class:: classref-property -:ref:`float` **far** = ``4000.0`` +:ref:`float` **far** = ``4000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_far** **(** :ref:`float` value **)** -- :ref:`float` **get_far** **(** **)** +- |void| **set_far**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_far**\ (\ ) The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing :ref:`far` can improve performance if it results in objects being partially or fully culled. @@ -338,14 +357,14 @@ The distance to the far culling boundary for this camera relative to its local Z .. rst-class:: classref-property -:ref:`float` **fov** = ``75.0`` +:ref:`float` **fov** = ``75.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fov** **(** :ref:`float` value **)** -- :ref:`float` **get_fov** **(** **)** +- |void| **set_fov**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fov**\ (\ ) -The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect` locks one axis, ``fov`` sets the other axis' field of view angle. +The camera's field of view angle (in degrees). Only applicable in perspective mode. Since :ref:`keep_aspect` locks one axis, :ref:`fov` sets the other axis' field of view angle. For reference, the default vertical field of view value (``75.0``) is equivalent to a horizontal FOV of: @@ -365,12 +384,12 @@ For reference, the default vertical field of view value (``75.0``) is equivalent .. rst-class:: classref-property -:ref:`Vector2` **frustum_offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **frustum_offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_frustum_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_frustum_offset** **(** **)** +- |void| **set_frustum_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_frustum_offset**\ (\ ) The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as `Y-shearing `__. @@ -384,12 +403,12 @@ The camera's frustum offset. This can be changed from the default to create "til .. rst-class:: classref-property -:ref:`float` **h_offset** = ``0.0`` +:ref:`float` **h_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_h_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_h_offset** **(** **)** +- |void| **set_h_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_h_offset**\ (\ ) The horizontal (X) offset of the camera viewport. @@ -401,12 +420,12 @@ The horizontal (X) offset of the camera viewport. .. rst-class:: classref-property -:ref:`KeepAspect` **keep_aspect** = ``1`` +:ref:`KeepAspect` **keep_aspect** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_keep_aspect_mode** **(** :ref:`KeepAspect` value **)** -- :ref:`KeepAspect` **get_keep_aspect_mode** **(** **)** +- |void| **set_keep_aspect_mode**\ (\ value\: :ref:`KeepAspect`\ ) +- :ref:`KeepAspect` **get_keep_aspect_mode**\ (\ ) The axis to lock during :ref:`fov`/:ref:`size` adjustments. Can be either :ref:`KEEP_WIDTH` or :ref:`KEEP_HEIGHT`. @@ -418,12 +437,12 @@ The axis to lock during :ref:`fov`/:ref:`size` **near** = ``0.05`` +:ref:`float` **near** = ``0.05`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_near** **(** :ref:`float` value **)** -- :ref:`float` **get_near** **(** **)** +- |void| **set_near**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_near**\ (\ ) The distance to the near culling boundary for this camera relative to its local Z axis. Lower values allow the camera to see objects more up close to its origin, at the cost of lower precision across the *entire* range. Values lower than the default can lead to increased Z-fighting. @@ -435,12 +454,12 @@ The distance to the near culling boundary for this camera relative to its local .. rst-class:: classref-property -:ref:`ProjectionType` **projection** = ``0`` +:ref:`ProjectionType` **projection** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_projection** **(** :ref:`ProjectionType` value **)** -- :ref:`ProjectionType` **get_projection** **(** **)** +- |void| **set_projection**\ (\ value\: :ref:`ProjectionType`\ ) +- :ref:`ProjectionType` **get_projection**\ (\ ) The camera's projection mode. In :ref:`PROJECTION_PERSPECTIVE` mode, objects' Z distance from the camera's local space scales their perceived size. @@ -452,12 +471,12 @@ The camera's projection mode. In :ref:`PROJECTION_PERSPECTIVE` **size** = ``1.0`` +:ref:`float` **size** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`float` value **)** -- :ref:`float` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_size**\ (\ ) The camera's size in meters measured as the diameter of the width or height, depending on :ref:`keep_aspect`. Only applicable in orthogonal and frustum modes. @@ -469,12 +488,12 @@ The camera's size in meters measured as the diameter of the width or height, dep .. rst-class:: classref-property -:ref:`float` **v_offset** = ``0.0`` +:ref:`float` **v_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_v_offset** **(** :ref:`float` value **)** -- :ref:`float` **get_v_offset** **(** **)** +- |void| **set_v_offset**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_v_offset**\ (\ ) The vertical (Y) offset of the camera viewport. @@ -491,7 +510,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_current** **(** :ref:`bool` enable_next=true **)** +|void| **clear_current**\ (\ enable_next\: :ref:`bool` = true\ ) :ref:`🔗` If this is the current camera, remove it from being current. If ``enable_next`` is ``true``, request to make the next camera current, if any. @@ -503,7 +522,7 @@ If this is the current camera, remove it from being current. If ``enable_next`` .. rst-class:: classref-method -:ref:`Projection` **get_camera_projection** **(** **)** |const| +:ref:`Projection` **get_camera_projection**\ (\ ) |const| :ref:`🔗` Returns the projection matrix that this camera uses to render to its associated viewport. The camera must be part of the scene tree to function. @@ -515,7 +534,7 @@ Returns the projection matrix that this camera uses to render to its associated .. rst-class:: classref-method -:ref:`RID` **get_camera_rid** **(** **)** |const| +:ref:`RID` **get_camera_rid**\ (\ ) |const| :ref:`🔗` Returns the camera's RID from the :ref:`RenderingServer`. @@ -527,7 +546,7 @@ Returns the camera's RID from the :ref:`RenderingServer`. .. rst-class:: classref-method -:ref:`Transform3D` **get_camera_transform** **(** **)** |const| +:ref:`Transform3D` **get_camera_transform**\ (\ ) |const| :ref:`🔗` Returns the transform of the camera plus the vertical (:ref:`v_offset`) and horizontal (:ref:`h_offset`) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as :ref:`XRCamera3D`. @@ -539,7 +558,7 @@ Returns the transform of the camera plus the vertical (:ref:`v_offset` **get_cull_mask_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_cull_mask_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`cull_mask` is enabled, given a ``layer_number`` between 1 and 20. @@ -551,7 +570,7 @@ Returns whether or not the specified layer of the :ref:`cull_mask` **get_frustum** **(** **)** |const| +:ref:`Array`\[:ref:`Plane`\] **get_frustum**\ (\ ) |const| :ref:`🔗` Returns the camera's frustum planes in world space units as an array of :ref:`Plane`\ s in the following order: near, far, left, top, right, bottom. Not to be confused with :ref:`frustum_offset`. @@ -563,7 +582,7 @@ Returns the camera's frustum planes in world space units as an array of :ref:`Pl .. rst-class:: classref-method -:ref:`RID` **get_pyramid_shape_rid** **(** **)** +:ref:`RID` **get_pyramid_shape_rid**\ (\ ) :ref:`🔗` Returns the RID of a pyramid shape encompassing the camera's view frustum, ignoring the camera's near plane. The tip of the pyramid represents the position of the camera. @@ -575,7 +594,7 @@ Returns the RID of a pyramid shape encompassing the camera's view frustum, ignor .. rst-class:: classref-method -:ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** |const| +:ref:`bool` **is_position_behind**\ (\ world_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns ``true`` if the given position is behind the camera (the blue part of the linked diagram). `See this diagram `__ for an overview of position query methods. @@ -589,7 +608,7 @@ Returns ``true`` if the given position is behind the camera (the blue part of th .. rst-class:: classref-method -:ref:`bool` **is_position_in_frustum** **(** :ref:`Vector3` world_point **)** |const| +:ref:`bool` **is_position_in_frustum**\ (\ world_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns ``true`` if the given position is inside the camera's frustum (the green part of the linked diagram). `See this diagram `__ for an overview of position query methods. @@ -601,7 +620,7 @@ Returns ``true`` if the given position is inside the camera's frustum (the green .. rst-class:: classref-method -void **make_current** **(** **)** +|void| **make_current**\ (\ ) :ref:`🔗` Makes this camera the current camera for the :ref:`Viewport` (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. @@ -613,7 +632,7 @@ Makes this camera the current camera for the :ref:`Viewport` (se .. rst-class:: classref-method -:ref:`Vector3` **project_local_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| +:ref:`Vector3` **project_local_ray_normal**\ (\ screen_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. @@ -625,7 +644,7 @@ Returns a normal vector from the screen point location directed along the camera .. rst-class:: classref-method -:ref:`Vector3` **project_position** **(** :ref:`Vector2` screen_point, :ref:`float` z_depth **)** |const| +:ref:`Vector3` **project_position**\ (\ screen_point\: :ref:`Vector2`, z_depth\: :ref:`float`\ ) |const| :ref:`🔗` Returns the 3D point in world space that maps to the given 2D coordinate in the :ref:`Viewport` rectangle on a plane that is the given ``z_depth`` distance into the scene away from the camera. @@ -637,7 +656,7 @@ Returns the 3D point in world space that maps to the given 2D coordinate in the .. rst-class:: classref-method -:ref:`Vector3` **project_ray_normal** **(** :ref:`Vector2` screen_point **)** |const| +:ref:`Vector3` **project_ray_normal**\ (\ screen_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns a normal vector in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. @@ -649,7 +668,7 @@ Returns a normal vector in world space, that is the result of projecting a point .. rst-class:: classref-method -:ref:`Vector3` **project_ray_origin** **(** :ref:`Vector2` screen_point **)** |const| +:ref:`Vector3` **project_ray_origin**\ (\ screen_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns a 3D position in world space, that is the result of projecting a point on the :ref:`Viewport` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. @@ -661,7 +680,7 @@ Returns a 3D position in world space, that is the result of projecting a point o .. rst-class:: classref-method -void **set_cull_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_cull_mask_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`cull_mask`, given a ``layer_number`` between 1 and 20. @@ -673,7 +692,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`cull_ma .. rst-class:: classref-method -void **set_frustum** **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** +|void| **set_frustum**\ (\ size\: :ref:`float`, offset\: :ref:`Vector2`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) :ref:`🔗` Sets the camera projection to frustum mode (see :ref:`PROJECTION_FRUSTUM`), by specifying a ``size``, an ``offset``, and the ``z_near`` and ``z_far`` clip planes in world space units. See also :ref:`frustum_offset`. @@ -685,7 +704,7 @@ Sets the camera projection to frustum mode (see :ref:`PROJECTION_FRUSTUM` size, :ref:`float` z_near, :ref:`float` z_far **)** +|void| **set_orthogonal**\ (\ size\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) :ref:`🔗` Sets the camera projection to orthogonal mode (see :ref:`PROJECTION_ORTHOGONAL`), by specifying a ``size``, and the ``z_near`` and ``z_far`` clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) @@ -697,7 +716,7 @@ Sets the camera projection to orthogonal mode (see :ref:`PROJECTION_ORTHOGONAL` fov, :ref:`float` z_near, :ref:`float` z_far **)** +|void| **set_perspective**\ (\ fov\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) :ref:`🔗` Sets the camera projection to perspective mode (see :ref:`PROJECTION_PERSPECTIVE`), by specifying a ``fov`` (field of view) angle in degrees, and the ``z_near`` and ``z_far`` clip planes in world space units. @@ -709,7 +728,7 @@ Sets the camera projection to perspective mode (see :ref:`PROJECTION_PERSPECTIVE .. rst-class:: classref-method -:ref:`Vector2` **unproject_position** **(** :ref:`Vector3` world_point **)** |const| +:ref:`Vector2` **unproject_position**\ (\ world_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the 2D coordinate in the :ref:`Viewport` rectangle that maps to the given 3D point in world space. @@ -729,3 +748,4 @@ Returns the 2D coordinate in the :ref:`Viewport` rectangle that .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 169b42d3693..2bbe852e8b0 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -62,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **auto_exposure_enabled** = ``false`` +:ref:`bool` **auto_exposure_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_auto_exposure_enabled** **(** **)** +- |void| **set_auto_exposure_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_exposure_enabled**\ (\ ) If ``true``, enables the tonemapping auto exposure mode of the scene renderer. If ``true``, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. @@ -79,12 +79,12 @@ If ``true``, enables the tonemapping auto exposure mode of the scene renderer. I .. rst-class:: classref-property -:ref:`float` **auto_exposure_scale** = ``0.4`` +:ref:`float` **auto_exposure_scale** = ``0.4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_scale** **(** **)** +- |void| **set_auto_exposure_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_scale**\ (\ ) The scale of the auto exposure effect. Affects the intensity of auto exposure. @@ -96,12 +96,12 @@ The scale of the auto exposure effect. Affects the intensity of auto exposure. .. rst-class:: classref-property -:ref:`float` **auto_exposure_speed** = ``0.5`` +:ref:`float` **auto_exposure_speed** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_speed** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_speed** **(** **)** +- |void| **set_auto_exposure_speed**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_speed**\ (\ ) The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. @@ -113,12 +113,12 @@ The speed of the auto exposure effect. Affects the time needed for the camera to .. rst-class:: classref-property -:ref:`float` **exposure_multiplier** = ``1.0`` +:ref:`float` **exposure_multiplier** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_exposure_multiplier** **(** :ref:`float` value **)** -- :ref:`float` **get_exposure_multiplier** **(** **)** +- |void| **set_exposure_multiplier**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_exposure_multiplier**\ (\ ) Multiplier for the exposure amount. A higher value results in a brighter image. @@ -130,12 +130,12 @@ Multiplier for the exposure amount. A higher value results in a brighter image. .. rst-class:: classref-property -:ref:`float` **exposure_sensitivity** = ``100.0`` +:ref:`float` **exposure_sensitivity** = ``100.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_exposure_sensitivity** **(** :ref:`float` value **)** -- :ref:`float` **get_exposure_sensitivity** **(** **)** +- |void| **set_exposure_sensitivity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_exposure_sensitivity**\ (\ ) Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. When :ref:`auto_exposure_enabled` this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. @@ -146,3 +146,4 @@ Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 6acbb6fb125..1399d5f135c 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -27,6 +27,13 @@ The default settings are intended for use in an outdoor environment, tips for se \ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Physical light and camera units <../tutorials/3d/physical_light_and_camera_units>` + .. rst-class:: classref-reftable-group Properties @@ -61,9 +68,9 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_fov` **(** **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_fov`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **auto_exposure_max_exposure_value** = ``10.0`` +:ref:`float` **auto_exposure_max_exposure_value** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_max_exposure_value** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_max_exposure_value** **(** **)** +- |void| **set_auto_exposure_max_exposure_value**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_max_exposure_value**\ (\ ) The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. @@ -95,12 +102,12 @@ The maximum luminance (in EV100) used when calculating auto exposure. When calcu .. rst-class:: classref-property -:ref:`float` **auto_exposure_min_exposure_value** = ``-8.0`` +:ref:`float` **auto_exposure_min_exposure_value** = ``-8.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_min_exposure_value** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_min_exposure_value** **(** **)** +- |void| **set_auto_exposure_min_exposure_value**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_min_exposure_value**\ (\ ) The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. @@ -112,12 +119,12 @@ The minimum luminance luminance (in EV100) used when calculating auto exposure. .. rst-class:: classref-property -:ref:`float` **exposure_aperture** = ``16.0`` +:ref:`float` **exposure_aperture** = ``16.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_aperture** **(** :ref:`float` value **)** -- :ref:`float` **get_aperture** **(** **)** +- |void| **set_aperture**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_aperture**\ (\ ) Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default :ref:`DirectionalLight3D`), for indoor lighting, a value between 2 and 4 is more appropriate. @@ -131,14 +138,14 @@ Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physi .. rst-class:: classref-property -:ref:`float` **exposure_shutter_speed** = ``100.0`` +:ref:`float` **exposure_shutter_speed** = ``100.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shutter_speed** **(** :ref:`float` value **)** -- :ref:`float` **get_shutter_speed** **(** **)** +- |void| **set_shutter_speed**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_shutter_speed**\ (\ ) -Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image. +Time for shutter to open and close, evaluated as ``1 / shutter_speed`` seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image). Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. @@ -150,12 +157,12 @@ Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physi .. rst-class:: classref-property -:ref:`float` **frustum_far** = ``4000.0`` +:ref:`float` **frustum_far** = ``4000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_far** **(** :ref:`float` value **)** -- :ref:`float` **get_far** **(** **)** +- |void| **set_far**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_far**\ (\ ) Override value for :ref:`Camera3D.far`. Used internally when calculating depth of field. When attached to a :ref:`Camera3D` as its :ref:`Camera3D.attributes`, it will override the :ref:`Camera3D.far` property. @@ -167,12 +174,12 @@ Override value for :ref:`Camera3D.far`. Used intern .. rst-class:: classref-property -:ref:`float` **frustum_focal_length** = ``35.0`` +:ref:`float` **frustum_focal_length** = ``35.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focal_length** **(** :ref:`float` value **)** -- :ref:`float` **get_focal_length** **(** **)** +- |void| **set_focal_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_focal_length**\ (\ ) Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a :ref:`Camera3D` as its :ref:`Camera3D.attributes`, it will override the :ref:`Camera3D.fov` property and the :ref:`Camera3D.keep_aspect` property. @@ -184,12 +191,12 @@ Distance between camera lens and camera aperture, measured in millimeters. Contr .. rst-class:: classref-property -:ref:`float` **frustum_focus_distance** = ``10.0`` +:ref:`float` **frustum_focus_distance** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_focus_distance** **(** **)** +- |void| **set_focus_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_focus_distance**\ (\ ) Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than :ref:`frustum_focal_length`. @@ -201,12 +208,12 @@ Distance from camera of object that will be in focus, measured in meters. Intern .. rst-class:: classref-property -:ref:`float` **frustum_near** = ``0.05`` +:ref:`float` **frustum_near** = ``0.05`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_near** **(** :ref:`float` value **)** -- :ref:`float` **get_near** **(** **)** +- |void| **set_near**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_near**\ (\ ) Override value for :ref:`Camera3D.near`. Used internally when calculating depth of field. When attached to a :ref:`Camera3D` as its :ref:`Camera3D.attributes`, it will override the :ref:`Camera3D.near` property. @@ -223,7 +230,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_fov** **(** **)** |const| +:ref:`float` **get_fov**\ (\ ) |const| :ref:`🔗` Returns the vertical field of view that corresponds to the :ref:`frustum_focal_length`. This value is calculated internally whenever :ref:`frustum_focal_length` is changed. @@ -234,3 +241,4 @@ Returns the vertical field of view that corresponds to the :ref:`frustum_focal_l .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index 64eeae4e7ef..4165ce5fa3f 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -64,12 +64,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **auto_exposure_max_sensitivity** = ``800.0`` +:ref:`float` **auto_exposure_max_sensitivity** = ``800.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_max_sensitivity** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_max_sensitivity** **(** **)** +- |void| **set_auto_exposure_max_sensitivity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_max_sensitivity**\ (\ ) The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. @@ -81,12 +81,12 @@ The maximum sensitivity (in ISO) used when calculating auto exposure. When calcu .. rst-class:: classref-property -:ref:`float` **auto_exposure_min_sensitivity** = ``0.0`` +:ref:`float` **auto_exposure_min_sensitivity** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_exposure_min_sensitivity** **(** :ref:`float` value **)** -- :ref:`float` **get_auto_exposure_min_sensitivity** **(** **)** +- |void| **set_auto_exposure_min_sensitivity**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_auto_exposure_min_sensitivity**\ (\ ) The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. @@ -98,14 +98,14 @@ The minimum sensitivity (in ISO) used when calculating auto exposure. When calcu .. rst-class:: classref-property -:ref:`float` **dof_blur_amount** = ``0.1`` +:ref:`float` **dof_blur_amount** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_amount** **(** :ref:`float` value **)** -- :ref:`float` **get_dof_blur_amount** **(** **)** +- |void| **set_dof_blur_amount**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dof_blur_amount**\ (\ ) -Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of bluriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style. +Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of blurriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style. .. rst-class:: classref-item-separator @@ -115,12 +115,12 @@ Sets the maximum amount of blur. When using physically-based blur amounts, will .. rst-class:: classref-property -:ref:`float` **dof_blur_far_distance** = ``10.0`` +:ref:`float` **dof_blur_far_distance** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_far_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_dof_blur_far_distance** **(** **)** +- |void| **set_dof_blur_far_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dof_blur_far_distance**\ (\ ) Objects further from the :ref:`Camera3D` by this amount will be blurred by the depth of field effect. Measured in meters. @@ -132,12 +132,12 @@ Objects further from the :ref:`Camera3D` by this amount will be .. rst-class:: classref-property -:ref:`bool` **dof_blur_far_enabled** = ``false`` +:ref:`bool` **dof_blur_far_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_far_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_dof_blur_far_enabled** **(** **)** +- |void| **set_dof_blur_far_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_dof_blur_far_enabled**\ (\ ) Enables depth of field blur for objects further than :ref:`dof_blur_far_distance`. Strength of blur is controlled by :ref:`dof_blur_amount` and modulated by :ref:`dof_blur_far_transition`. @@ -151,12 +151,12 @@ Enables depth of field blur for objects further than :ref:`dof_blur_far_distance .. rst-class:: classref-property -:ref:`float` **dof_blur_far_transition** = ``5.0`` +:ref:`float` **dof_blur_far_transition** = ``5.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_far_transition** **(** :ref:`float` value **)** -- :ref:`float` **get_dof_blur_far_transition** **(** **)** +- |void| **set_dof_blur_far_transition**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dof_blur_far_transition**\ (\ ) When positive, distance over which (starting from :ref:`dof_blur_far_distance`) blur effect will scale from 0 to :ref:`dof_blur_amount`. When negative, uses physically-based scaling so depth of field effect will scale from 0 at :ref:`dof_blur_far_distance` and will increase in a physically accurate way as objects get further from the :ref:`Camera3D`. @@ -168,12 +168,12 @@ When positive, distance over which (starting from :ref:`dof_blur_far_distance` **dof_blur_near_distance** = ``2.0`` +:ref:`float` **dof_blur_near_distance** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_near_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_dof_blur_near_distance** **(** **)** +- |void| **set_dof_blur_near_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dof_blur_near_distance**\ (\ ) Objects closer from the :ref:`Camera3D` by this amount will be blurred by the depth of field effect. Measured in meters. @@ -185,12 +185,12 @@ Objects closer from the :ref:`Camera3D` by this amount will be b .. rst-class:: classref-property -:ref:`bool` **dof_blur_near_enabled** = ``false`` +:ref:`bool` **dof_blur_near_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_near_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_dof_blur_near_enabled** **(** **)** +- |void| **set_dof_blur_near_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_dof_blur_near_enabled**\ (\ ) Enables depth of field blur for objects closer than :ref:`dof_blur_near_distance`. Strength of blur is controlled by :ref:`dof_blur_amount` and modulated by :ref:`dof_blur_near_transition`. @@ -204,12 +204,12 @@ Enables depth of field blur for objects closer than :ref:`dof_blur_near_distance .. rst-class:: classref-property -:ref:`float` **dof_blur_near_transition** = ``1.0`` +:ref:`float` **dof_blur_near_transition** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_dof_blur_near_transition** **(** :ref:`float` value **)** -- :ref:`float` **get_dof_blur_near_transition** **(** **)** +- |void| **set_dof_blur_near_transition**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_dof_blur_near_transition**\ (\ ) When positive, distance over which blur effect will scale from 0 to :ref:`dof_blur_amount`, ending at :ref:`dof_blur_near_distance`. When negative, uses physically-based scaling so depth of field effect will scale from 0 at :ref:`dof_blur_near_distance` and will increase in a physically accurate way as objects get closer to the :ref:`Camera3D`. @@ -220,3 +220,4 @@ When positive, distance over which blur effect will scale from 0 to :ref:`dof_bl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index c4959eb44a6..5774048fbc9 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -45,15 +45,15 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`FeedDataType` | :ref:`get_datatype` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_id` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_name` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`FeedPosition` | :ref:`get_position` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`FeedDataType` | :ref:`get_datatype`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_id`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`FeedPosition` | :ref:`get_position`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FeedDataType**: +enum **FeedDataType**: :ref:`🔗` .. _class_CameraFeed_constant_FEED_NOIMAGE: @@ -110,7 +110,7 @@ Feed supplies separate Y and CbCr images that need to be combined and converted .. rst-class:: classref-enumeration -enum **FeedPosition**: +enum **FeedPosition**: :ref:`🔗` .. _class_CameraFeed_constant_FEED_UNSPECIFIED: @@ -149,12 +149,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **feed_is_active** = ``false`` +:ref:`bool` **feed_is_active** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_active** **(** **)** +- |void| **set_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_active**\ (\ ) If ``true``, the feed is active. @@ -166,12 +166,12 @@ If ``true``, the feed is active. .. rst-class:: classref-property -:ref:`Transform2D` **feed_transform** = ``Transform2D(1, 0, 0, -1, 0, 1)`` +:ref:`Transform2D` **feed_transform** = ``Transform2D(1, 0, 0, -1, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform2D` value **)** -- :ref:`Transform2D` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform2D`\ ) +- :ref:`Transform2D` **get_transform**\ (\ ) The transform applied to the camera's image. @@ -188,7 +188,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`FeedDataType` **get_datatype** **(** **)** |const| +:ref:`FeedDataType` **get_datatype**\ (\ ) |const| :ref:`🔗` Returns feed image data type. @@ -200,7 +200,7 @@ Returns feed image data type. .. rst-class:: classref-method -:ref:`int` **get_id** **(** **)** |const| +:ref:`int` **get_id**\ (\ ) |const| :ref:`🔗` Returns the unique ID for this feed. @@ -212,7 +212,7 @@ Returns the unique ID for this feed. .. rst-class:: classref-method -:ref:`String` **get_name** **(** **)** |const| +:ref:`String` **get_name**\ (\ ) |const| :ref:`🔗` Returns the camera's name. @@ -224,7 +224,7 @@ Returns the camera's name. .. rst-class:: classref-method -:ref:`FeedPosition` **get_position** **(** **)** |const| +:ref:`FeedPosition` **get_position**\ (\ ) |const| :ref:`🔗` Returns the position of camera on the device. @@ -235,3 +235,4 @@ Returns the position of camera on the device. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index eecbd3e0877..9d3800bbf74 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Godot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on macOS and iOS. On other platforms, no :ref:`CameraFeed`\ s will be available. +\ **Note:** This class is currently only implemented on macOS and iOS. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. On other platforms, no :ref:`CameraFeed`\ s will be available. .. rst-class:: classref-reftable-group @@ -33,17 +33,17 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_feed` **(** :ref:`CameraFeed` feed **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`CameraFeed[]` | :ref:`feeds` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`CameraFeed` | :ref:`get_feed` **(** :ref:`int` index **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_feed_count` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_feed` **(** :ref:`CameraFeed` feed **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_feed`\ (\ feed\: :ref:`CameraFeed`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`CameraFeed`\] | :ref:`feeds`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`CameraFeed` | :ref:`get_feed`\ (\ index\: :ref:`int`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_feed_count`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_feed`\ (\ feed\: :ref:`CameraFeed`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,7 @@ Signals .. rst-class:: classref-signal -**camera_feed_added** **(** :ref:`int` id **)** +**camera_feed_added**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`CameraFeed` is added (e.g. a webcam is plugged in). @@ -70,7 +70,7 @@ Emitted when a :ref:`CameraFeed` is added (e.g. a webcam is pl .. rst-class:: classref-signal -**camera_feed_removed** **(** :ref:`int` id **)** +**camera_feed_removed**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Emitted when a :ref:`CameraFeed` is removed (e.g. a webcam is unplugged). @@ -87,7 +87,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FeedImage**: +enum **FeedImage**: :ref:`🔗` .. _class_CameraServer_constant_FEED_RGBA_IMAGE: @@ -134,7 +134,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_feed** **(** :ref:`CameraFeed` feed **)** +|void| **add_feed**\ (\ feed\: :ref:`CameraFeed`\ ) :ref:`🔗` Adds the camera ``feed`` to the camera server. @@ -146,7 +146,7 @@ Adds the camera ``feed`` to the camera server. .. rst-class:: classref-method -:ref:`CameraFeed[]` **feeds** **(** **)** +:ref:`Array`\[:ref:`CameraFeed`\] **feeds**\ (\ ) :ref:`🔗` Returns an array of :ref:`CameraFeed`\ s. @@ -158,7 +158,7 @@ Returns an array of :ref:`CameraFeed`\ s. .. rst-class:: classref-method -:ref:`CameraFeed` **get_feed** **(** :ref:`int` index **)** +:ref:`CameraFeed` **get_feed**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`CameraFeed` corresponding to the camera with the given ``index``. @@ -170,7 +170,7 @@ Returns the :ref:`CameraFeed` corresponding to the camera with .. rst-class:: classref-method -:ref:`int` **get_feed_count** **(** **)** +:ref:`int` **get_feed_count**\ (\ ) :ref:`🔗` Returns the number of :ref:`CameraFeed`\ s registered. @@ -182,7 +182,7 @@ Returns the number of :ref:`CameraFeed`\ s registered. .. rst-class:: classref-method -void **remove_feed** **(** :ref:`CameraFeed` feed **)** +|void| **remove_feed**\ (\ feed\: :ref:`CameraFeed`\ ) :ref:`🔗` Removes the specified camera ``feed``. @@ -193,3 +193,4 @@ Removes the specified camera ``feed``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index 49ec8a2c371..64fd3ee572e 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **camera_feed_id** = ``0`` +:ref:`int` **camera_feed_id** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_camera_feed_id** **(** :ref:`int` value **)** -- :ref:`int` **get_camera_feed_id** **(** **)** +- |void| **set_camera_feed_id**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_camera_feed_id**\ (\ ) The ID of the :ref:`CameraFeed` for which we want to display the image. @@ -71,12 +71,12 @@ The ID of the :ref:`CameraFeed` for which we want to display t .. rst-class:: classref-property -:ref:`bool` **camera_is_active** = ``false`` +:ref:`bool` **camera_is_active** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_camera_active** **(** :ref:`bool` value **)** -- :ref:`bool` **get_camera_active** **(** **)** +- |void| **set_camera_active**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_camera_active**\ (\ ) Convenience property that gives access to the active property of the :ref:`CameraFeed`. @@ -88,12 +88,12 @@ Convenience property that gives access to the active property of the :ref:`Camer .. rst-class:: classref-property -:ref:`FeedImage` **which_feed** = ``0`` +:ref:`FeedImage` **which_feed** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_which_feed** **(** :ref:`FeedImage` value **)** -- :ref:`FeedImage` **get_which_feed** **(** **)** +- |void| **set_which_feed**\ (\ value\: :ref:`FeedImage`\ ) +- :ref:`FeedImage` **get_which_feed**\ (\ ) Which image within the :ref:`CameraFeed` we want access to, important if the camera image is split in a Y and CbCr component. @@ -104,3 +104,4 @@ Which image within the :ref:`CameraFeed` we want access to, im .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvasgroup.rst b/classes/class_canvasgroup.rst index 0a8e5bf56c3..54b8f53ba82 100644 --- a/classes/class_canvasgroup.rst +++ b/classes/class_canvasgroup.rst @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **clear_margin** = ``10.0`` +:ref:`float` **clear_margin** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clear_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_clear_margin** **(** **)** +- |void| **set_clear_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_clear_margin**\ (\ ) Sets the size of the margin used to expand the clearing rect of this **CanvasGroup**. This expands the area of the backbuffer that will be used by the **CanvasGroup**. A smaller margin will reduce the area of the backbuffer used which can increase performance, however if :ref:`use_mipmaps` is enabled, a small margin may result in mipmap errors at the edge of the **CanvasGroup**. Accordingly, this should be left as small as possible, but should be increased if artifacts appear along the edges of the canvas group. @@ -88,12 +88,12 @@ Sets the size of the margin used to expand the clearing rect of this **CanvasGro .. rst-class:: classref-property -:ref:`float` **fit_margin** = ``10.0`` +:ref:`float` **fit_margin** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fit_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_fit_margin** **(** **)** +- |void| **set_fit_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fit_margin**\ (\ ) Sets the size of a margin used to expand the drawable rect of this **CanvasGroup**. The size of the **CanvasGroup** is determined by fitting a rect around its children then expanding that rect by :ref:`fit_margin`. This increases both the backbuffer area used and the area covered by the **CanvasGroup** both of which can reduce performance. This should be kept as small as possible and should only be expanded when an increased size is needed (e.g. for custom shader effects). @@ -105,12 +105,12 @@ Sets the size of a margin used to expand the drawable rect of this **CanvasGroup .. rst-class:: classref-property -:ref:`bool` **use_mipmaps** = ``false`` +:ref:`bool` **use_mipmaps** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_mipmaps** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_mipmaps** **(** **)** +- |void| **set_use_mipmaps**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_mipmaps**\ (\ ) If ``true``, calculates mipmaps for the backbuffer before drawing the **CanvasGroup** so that mipmaps can be used in a custom :ref:`ShaderMaterial` attached to the **CanvasGroup**. Generating mipmaps has a performance cost so this should not be enabled unless required. @@ -121,3 +121,4 @@ If ``true``, calculates mipmaps for the backbuffer before drawing the **CanvasGr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 71c44eed8dd..eb18bdb7958 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -23,12 +23,14 @@ Description Abstract base class for everything in 2D space. Canvas items are laid out in a tree; children inherit and extend their parent's transform. **CanvasItem** is extended by :ref:`Control` for GUI-related nodes, and by :ref:`Node2D` for 2D game objects. -Any **CanvasItem** can draw. For this, :ref:`queue_redraw` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw`, its corresponding :ref:`Object._notification` or methods connected to the :ref:`draw` signal. +Any **CanvasItem** can draw. For this, :ref:`queue_redraw` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw`, its corresponding :ref:`Object._notification` or methods connected to the :ref:`draw` signal. -Canvas items are drawn in tree order. By default, children are on top of their parents, so a root **CanvasItem** will be drawn behind everything. This behavior can be changed on a per-item basis. +Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root **CanvasItem** will be drawn behind everything. This behavior can be changed on a per-item basis. A **CanvasItem** can be hidden, which will also hide its children. By adjusting various other properties of a **CanvasItem**, you can also modulate its color (via :ref:`modulate` or :ref:`self_modulate`), change its Z-index, blend mode, and more. +Note that properties like transform, modulation, and visibility are only propagated to *direct* **CanvasItem** child nodes. If there is a non-**CanvasItem** node in between, like :ref:`Node` or :ref:`AnimationPlayer`, the **CanvasItem** nodes below will have an independent position and :ref:`modulate` chain. See also :ref:`top_level`. + .. rst-class:: classref-introduction-group Tutorials @@ -38,7 +40,7 @@ Tutorials - :doc:`Custom drawing in 2D <../tutorials/2d/custom_drawing_in_2d>` -- `Audio Spectrum Demo `__ +- `Audio Spectrum Visualizer Demo `__ .. rst-class:: classref-reftable-group @@ -88,121 +90,123 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** **)** |virtual| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_arc` **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_circle` **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_end_animation` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_msdf_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multimesh` **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polygon` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_primitive` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform` **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform_matrix` **(** :ref:`Transform2D` xform **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture` **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_transform` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas_item` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_canvas_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_global_mouse_position` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_local_mouse_position` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_screen_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_viewport_rect` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_viewport_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_visibility_layer_bit` **(** :ref:`int` layer **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World2D` | :ref:`get_world_2d` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_transform_notification_enabled` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_visible_in_tree` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`make_canvas_position_local` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_front` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_redraw` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_visibility_layer_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw`\ (\ ) |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_animation_slice`\ (\ animation_length\: :ref:`float`, slice_begin\: :ref:`float`, slice_end\: :ref:`float`, offset\: :ref:`float` = 0.0\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_arc`\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_char`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_char_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_circle`\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_colored_polygon`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_dashed_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_end_animation`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_lcd_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_mesh`\ (\ mesh\: :ref:`Mesh`, texture\: :ref:`Texture2D`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_msdf_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline\: :ref:`float` = 0.0, pixel_range\: :ref:`float` = 4.0, scale\: :ref:`float` = 1.0\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multimesh`\ (\ multimesh\: :ref:`MultiMesh`, texture\: :ref:`Texture2D`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polygon`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polyline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polyline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_primitive`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_rect`\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_set_transform`\ (\ position\: :ref:`Vector2`, rotation\: :ref:`float` = 0.0, scale\: :ref:`Vector2` = Vector2(1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_set_transform_matrix`\ (\ xform\: :ref:`Transform2D`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_style_box`\ (\ style_box\: :ref:`StyleBox`, rect\: :ref:`Rect2`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture`\ (\ texture\: :ref:`Texture2D`, position\: :ref:`Vector2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture_rect`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_transform`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas_item`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CanvasLayer` | :ref:`get_canvas_layer_node`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_canvas_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_global_mouse_position`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_local_mouse_position`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_screen_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_viewport_rect`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_viewport_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_visibility_layer_bit`\ (\ layer\: :ref:`int`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World2D` | :ref:`get_world_2d`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hide`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_local_transform_notification_enabled`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transform_notification_enabled`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_visible_in_tree`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`make_canvas_position_local`\ (\ screen_point\: :ref:`Vector2`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent` | :ref:`make_input_local`\ (\ event\: :ref:`InputEvent`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_to_front`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_redraw`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_local_transform`\ (\ enable\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_transform`\ (\ enable\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_visibility_layer_bit`\ (\ layer\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -217,9 +221,9 @@ Signals .. rst-class:: classref-signal -**draw** **(** **)** +**draw**\ (\ ) :ref:`🔗` -Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. +Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. \ **Note:** Deferred connections do not allow drawing through the ``draw_*`` methods. @@ -231,7 +235,7 @@ Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICAT .. rst-class:: classref-signal -**hidden** **(** **)** +**hidden**\ (\ ) :ref:`🔗` Emitted when becoming hidden. @@ -243,7 +247,7 @@ Emitted when becoming hidden. .. rst-class:: classref-signal -**item_rect_changed** **(** **)** +**item_rect_changed**\ (\ ) :ref:`🔗` Emitted when the item's :ref:`Rect2` boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing :ref:`Sprite2D.texture`). @@ -255,7 +259,7 @@ Emitted when the item's :ref:`Rect2` boundaries (position or size) .. rst-class:: classref-signal -**visibility_changed** **(** **)** +**visibility_changed**\ (\ ) :ref:`🔗` Emitted when the visibility (hidden/visible) changes. @@ -272,7 +276,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TextureFilter**: +enum **TextureFilter**: :ref:`🔗` .. _class_CanvasItem_constant_TEXTURE_FILTER_PARENT_NODE: @@ -288,7 +292,7 @@ The **CanvasItem** will inherit the filter from its parent. :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR: @@ -296,7 +300,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -304,7 +308,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -312,7 +318,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_CanvasItem_constant_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -320,9 +328,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter` **TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_NEAREST_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -330,9 +338,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter` **TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`TEXTURE_FILTER_LINEAR_WITH_MIPMAPS` is usually more appropriate in this case. .. _class_CanvasItem_constant_TEXTURE_FILTER_MAX: @@ -350,7 +358,7 @@ Represents the size of the :ref:`TextureFilter` e .. rst-class:: classref-enumeration -enum **TextureRepeat**: +enum **TextureRepeat**: :ref:`🔗` .. _class_CanvasItem_constant_TEXTURE_REPEAT_PARENT_NODE: @@ -382,7 +390,7 @@ Texture will repeat normally. :ref:`TextureRepeat` **TEXTURE_REPEAT_MIRROR** = ``3`` -Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored. +Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored. .. _class_CanvasItem_constant_TEXTURE_REPEAT_MAX: @@ -400,7 +408,7 @@ Represents the size of the :ref:`TextureRepeat` e .. rst-class:: classref-enumeration -enum **ClipChildrenMode**: +enum **ClipChildrenMode**: :ref:`🔗` .. _class_CanvasItem_constant_CLIP_CHILDREN_DISABLED: @@ -447,7 +455,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` +**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` :ref:`🔗` The **CanvasItem**'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. @@ -455,7 +463,7 @@ The **CanvasItem**'s global transform has changed. This notification is only rec .. rst-class:: classref-constant -**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``35`` +**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``35`` :ref:`🔗` The **CanvasItem**'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. @@ -463,15 +471,15 @@ The **CanvasItem**'s local transform has changed. This notification is only rece .. rst-class:: classref-constant -**NOTIFICATION_DRAW** = ``30`` +**NOTIFICATION_DRAW** = ``30`` :ref:`🔗` -The **CanvasItem** is requested to draw (see :ref:`_draw`). +The **CanvasItem** is requested to draw (see :ref:`_draw`). .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_VISIBILITY_CHANGED** = ``31`` +**NOTIFICATION_VISIBILITY_CHANGED** = ``31`` :ref:`🔗` The **CanvasItem**'s visibility has changed. @@ -479,7 +487,7 @@ The **CanvasItem**'s visibility has changed. .. rst-class:: classref-constant -**NOTIFICATION_ENTER_CANVAS** = ``32`` +**NOTIFICATION_ENTER_CANVAS** = ``32`` :ref:`🔗` The **CanvasItem** has entered the canvas. @@ -487,7 +495,7 @@ The **CanvasItem** has entered the canvas. .. rst-class:: classref-constant -**NOTIFICATION_EXIT_CANVAS** = ``33`` +**NOTIFICATION_EXIT_CANVAS** = ``33`` :ref:`🔗` The **CanvasItem** has exited the canvas. @@ -495,7 +503,7 @@ The **CanvasItem** has exited the canvas. .. rst-class:: classref-constant -**NOTIFICATION_WORLD_2D_CHANGED** = ``36`` +**NOTIFICATION_WORLD_2D_CHANGED** = ``36`` :ref:`🔗` The **CanvasItem**'s active :ref:`World2D` changed. @@ -512,14 +520,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ClipChildrenMode` **clip_children** = ``0`` +:ref:`ClipChildrenMode` **clip_children** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clip_children_mode** **(** :ref:`ClipChildrenMode` value **)** -- :ref:`ClipChildrenMode` **get_clip_children_mode** **(** **)** +- |void| **set_clip_children_mode**\ (\ value\: :ref:`ClipChildrenMode`\ ) +- :ref:`ClipChildrenMode` **get_clip_children_mode**\ (\ ) -Allows the current node to clip children nodes, essentially acting as a mask. +Allows the current node to clip child nodes, essentially acting as a mask. .. rst-class:: classref-item-separator @@ -529,12 +537,12 @@ Allows the current node to clip children nodes, essentially acting as a mask. .. rst-class:: classref-property -:ref:`int` **light_mask** = ``1`` +:ref:`int` **light_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_light_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_light_mask** **(** **)** +- |void| **set_light_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_light_mask**\ (\ ) The rendering layers in which this **CanvasItem** responds to :ref:`Light2D` nodes. @@ -546,12 +554,12 @@ The rendering layers in which this **CanvasItem** responds to :ref:`Light2D` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The material applied to this **CanvasItem**. @@ -563,12 +571,12 @@ The material applied to this **CanvasItem**. .. rst-class:: classref-property -:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color` value **)** -- :ref:`Color` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_modulate**\ (\ ) The color applied to this **CanvasItem**. This property does affect child **CanvasItem**\ s, unlike :ref:`self_modulate` which only affects the node itself. @@ -580,12 +588,12 @@ The color applied to this **CanvasItem**. This property does affect child **Canv .. rst-class:: classref-property -:ref:`Color` **self_modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **self_modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_self_modulate** **(** :ref:`Color` value **)** -- :ref:`Color` **get_self_modulate** **(** **)** +- |void| **set_self_modulate**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_self_modulate**\ (\ ) The color applied to this **CanvasItem**. This property does **not** affect child **CanvasItem**\ s, unlike :ref:`modulate` which affects both the node itself and its children. @@ -599,12 +607,12 @@ The color applied to this **CanvasItem**. This property does **not** affect chil .. rst-class:: classref-property -:ref:`bool` **show_behind_parent** = ``false`` +:ref:`bool` **show_behind_parent** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_behind_parent** **(** :ref:`bool` value **)** -- :ref:`bool` **is_draw_behind_parent_enabled** **(** **)** +- |void| **set_draw_behind_parent**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_draw_behind_parent_enabled**\ (\ ) If ``true``, the object draws behind its parent. @@ -616,12 +624,12 @@ If ``true``, the object draws behind its parent. .. rst-class:: classref-property -:ref:`TextureFilter` **texture_filter** = ``0`` +:ref:`TextureFilter` **texture_filter** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** -- :ref:`TextureFilter` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) +- :ref:`TextureFilter` **get_texture_filter**\ (\ ) The texture filtering mode to use on this **CanvasItem**. @@ -633,12 +641,12 @@ The texture filtering mode to use on this **CanvasItem**. .. rst-class:: classref-property -:ref:`TextureRepeat` **texture_repeat** = ``0`` +:ref:`TextureRepeat` **texture_repeat** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_repeat** **(** :ref:`TextureRepeat` value **)** -- :ref:`TextureRepeat` **get_texture_repeat** **(** **)** +- |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat`\ ) +- :ref:`TextureRepeat` **get_texture_repeat**\ (\ ) The texture repeating mode to use on this **CanvasItem**. @@ -650,12 +658,12 @@ The texture repeating mode to use on this **CanvasItem**. .. rst-class:: classref-property -:ref:`bool` **top_level** = ``false`` +:ref:`bool` **top_level** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_as_top_level** **(** :ref:`bool` value **)** -- :ref:`bool` **is_set_as_top_level** **(** **)** +- |void| **set_as_top_level**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_set_as_top_level**\ (\ ) If ``true``, this **CanvasItem** will *not* inherit its transform from parent **CanvasItem**\ s. Its draw order will also be changed to make it draw on top of other **CanvasItem**\ s that do not have :ref:`top_level` set to ``true``. The **CanvasItem** will effectively act as if it was placed as a child of a bare :ref:`Node`. @@ -667,12 +675,12 @@ If ``true``, this **CanvasItem** will *not* inherit its transform from parent ** .. rst-class:: classref-property -:ref:`bool` **use_parent_material** = ``false`` +:ref:`bool` **use_parent_material** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_parent_material** **(** :ref:`bool` value **)** -- :ref:`bool` **get_use_parent_material** **(** **)** +- |void| **set_use_parent_material**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_parent_material**\ (\ ) If ``true``, the parent **CanvasItem**'s :ref:`material` property is used as this one's material. @@ -684,12 +692,12 @@ If ``true``, the parent **CanvasItem**'s :ref:`material` **visibility_layer** = ``1`` +:ref:`int` **visibility_layer** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_visibility_layer** **(** :ref:`int` value **)** -- :ref:`int` **get_visibility_layer** **(** **)** +- |void| **set_visibility_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_visibility_layer**\ (\ ) The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport` nodes. A :ref:`Viewport` will render a **CanvasItem** if it and all its parents share a layer with the :ref:`Viewport`'s canvas cull mask. @@ -701,12 +709,12 @@ The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport` **visible** = ``true`` +:ref:`bool` **visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **is_visible** **(** **)** +- |void| **set_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_visible**\ (\ ) If ``true``, this **CanvasItem** is drawn. The node is only visible if all of its ancestors are visible as well (in other words, :ref:`is_visible_in_tree` must return ``true``). @@ -720,16 +728,18 @@ If ``true``, this **CanvasItem** is drawn. The node is only visible if all of it .. rst-class:: classref-property -:ref:`bool` **y_sort_enabled** = ``false`` +:ref:`bool` **y_sort_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_y_sort_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_y_sort_enabled** **(** **)** +- |void| **set_y_sort_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_y_sort_enabled**\ (\ ) -If ``true``, child nodes with the lowest Y position are drawn before those with a higher Y position. If ``false``, Y-sorting is disabled. Y-sorting only affects children that inherit from **CanvasItem**. +If ``true``, this and child **CanvasItem** nodes with a lower Y position are rendered in front of nodes with a higher Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. -You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree. +With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node 'B'. This allows you to organize the render order of a scene without changing the scene tree. + +Nodes sort relative to each other only if they are on the same :ref:`z_index`. .. rst-class:: classref-item-separator @@ -739,12 +749,12 @@ You can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same s .. rst-class:: classref-property -:ref:`bool` **z_as_relative** = ``true`` +:ref:`bool` **z_as_relative** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_z_as_relative** **(** :ref:`bool` value **)** -- :ref:`bool` **is_z_relative** **(** **)** +- |void| **set_z_as_relative**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_z_relative**\ (\ ) If ``true``, 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. @@ -756,14 +766,14 @@ If ``true``, the node's Z index is relative to its parent's Z index. If this nod .. rst-class:: classref-property -:ref:`int` **z_index** = ``0`` +:ref:`int` **z_index** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_z_index** **(** :ref:`int` value **)** -- :ref:`int` **get_z_index** **(** **)** +- |void| **set_z_index**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **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. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). +Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). \ **Note:** Changing the Z index of a :ref:`Control` only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others. @@ -776,15 +786,15 @@ Z index. Controls the order in which the nodes render. A node with a higher Z in Method Descriptions ------------------- -.. _class_CanvasItem_method__draw: +.. _class_CanvasItem_private_method__draw: .. rst-class:: classref-method -void **_draw** **(** **)** |virtual| +|void| **_draw**\ (\ ) |virtual| :ref:`🔗` Called when **CanvasItem** has been requested to redraw (after :ref:`queue_redraw` is called, either manually or by the engine). -Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification`. .. rst-class:: classref-item-separator @@ -794,7 +804,7 @@ Corresponds to the :ref:`NOTIFICATION_DRAW` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** +|void| **draw_animation_slice**\ (\ animation_length\: :ref:`float`, slice_begin\: :ref:`float`, slice_end\: :ref:`float`, offset\: :ref:`float` = 0.0\ ) :ref:`🔗` Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. @@ -806,11 +816,11 @@ Subsequent drawing commands will be ignored unless they fall within the specifie .. rst-class:: classref-method -void **draw_arc** **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** +|void| **draw_arc**\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle`. -If ``width`` is negative, then the arc is drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +If ``width`` is negative, it will be ignored and the arc will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. The arc is drawn from ``start_angle`` towards the value of ``end_angle`` so in clockwise direction if ``start_angle < end_angle`` and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of ``start_angle`` and ``end_angle`` is greater than :ref:`@GDScript.TAU` radians, then a full circle arc is drawn (i.e. arc will not overlap itself). @@ -822,7 +832,7 @@ The arc is drawn from ``start_angle`` towards the value of ``end_angle`` so in c .. rst-class:: classref-method -void **draw_char** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| +|void| **draw_char**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draws a string first character using a custom font. @@ -834,7 +844,7 @@ Draws a string first character using a custom font. .. rst-class:: classref-method -void **draw_char_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| +|void| **draw_char_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Draws a string first character outline using a custom font. @@ -846,9 +856,17 @@ Draws a string first character outline using a custom font. .. rst-class:: classref-method -void **draw_circle** **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** +|void| **draw_circle**\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` + +Draws a circle. See also :ref:`draw_arc`, :ref:`draw_polyline`, and :ref:`draw_polygon`. + +If ``filled`` is ``true``, the circle will be filled with the ``color`` specified. If ``filled`` is ``false``, the circle will be drawn as a stroke with the ``color`` and ``width`` specified. -Draws a colored, filled circle. See also :ref:`draw_arc`, :ref:`draw_polyline` and :ref:`draw_polygon`. +If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. + +If ``antialiased`` is ``true``, half transparent "feathers" will be attached to the boundary, making outlines smooth. + +\ **Note:** ``width`` is only effective if ``filled`` is ``false``. .. rst-class:: classref-item-separator @@ -858,7 +876,7 @@ Draws a colored, filled circle. See also :ref:`draw_arc` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** +|void| **draw_colored_polygon**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. @@ -870,12 +888,16 @@ Draws a colored polygon of any number of points, convex or concave. Unlike :ref: .. rst-class:: classref-method -void **draw_dashed_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** +|void| **draw_dashed_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_multiline` and :ref:`draw_polyline`. If ``width`` is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +If ``antialiased`` is ``true``, half transparent "feathers" will be attached to the boundary, making outlines smooth. + +\ **Note:** ``antialiased`` is only effective if ``width`` is greater than ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -884,7 +906,7 @@ If ``width`` is negative, then a two-point primitives will be drawn instead of a .. rst-class:: classref-method -void **draw_end_animation** **(** **)** +|void| **draw_end_animation**\ (\ ) :ref:`🔗` After submitting all animations slices via :ref:`draw_animation_slice`, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. @@ -896,7 +918,7 @@ After submitting all animations slices via :ref:`draw_animation_slice` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +|void| **draw_lcd_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. @@ -917,7 +939,7 @@ Texture is drawn using the following blend operation, blend mode of the :ref:`Ca .. rst-class:: classref-method -void **draw_line** **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** +|void| **draw_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_multiline` and :ref:`draw_polyline`. @@ -931,7 +953,7 @@ If ``width`` is negative, then a two-point primitive will be drawn instead of a .. rst-class:: classref-method -void **draw_mesh** **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +|void| **draw_mesh**\ (\ mesh\: :ref:`Mesh`, texture\: :ref:`Texture2D`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`MeshInstance2D` for related documentation. @@ -943,7 +965,7 @@ Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`Mes .. rst-class:: classref-method -void **draw_msdf_texture_rect_region** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** +|void| **draw_msdf_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline\: :ref:`float` = 0.0, pixel_range\: :ref:`float` = 4.0, scale\: :ref:`float` = 1.0\ ) :ref:`🔗` Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See :ref:`FontFile.multichannel_signed_distance_field` for more information and caveats about MSDF font rendering. @@ -959,12 +981,14 @@ Value of the ``pixel_range`` should the same that was used during distance field .. rst-class:: classref-method -void **draw_multiline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** +|void| **draw_multiline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +\ **Note:** ``antialiased`` is only effective if ``width`` is greater than ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -973,12 +997,14 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -void **draw_multiline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** +|void| **draw_multiline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline_colors` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +\ **Note:** ``antialiased`` is only effective if ``width`` is greater than ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -987,7 +1013,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +|void| **draw_multiline_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`🔗` Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -999,7 +1025,7 @@ Breaks ``text`` into lines and draws it using the specified ``font`` at the ``po .. rst-class:: classref-method -void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +|void| **draw_multiline_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`🔗` Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1011,7 +1037,7 @@ Breaks ``text`` to the lines and draws text outline using the specified ``font`` .. rst-class:: classref-method -void **draw_multimesh** **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** +|void| **draw_multimesh**\ (\ multimesh\: :ref:`MultiMesh`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` Draws a :ref:`MultiMesh` in 2D with the provided texture. See :ref:`MultiMeshInstance2D` for related documentation. @@ -1023,7 +1049,7 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : .. rst-class:: classref-method -void **draw_polygon** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** +|void| **draw_polygon**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array` instead. @@ -1035,11 +1061,11 @@ Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`d .. rst-class:: classref-method -void **draw_polyline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** +|void| **draw_polyline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline` instead. See also :ref:`draw_polygon`. -If ``width`` is negative, the polyline is drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. .. rst-class:: classref-item-separator @@ -1049,11 +1075,11 @@ If ``width`` is negative, the polyline is drawn using :ref:`RenderingServer.PRIM .. rst-class:: classref-method -void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** +|void| **draw_polyline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline_colors` instead. See also :ref:`draw_polygon`. -If ``width`` is negative, then the polyline is drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. .. rst-class:: classref-item-separator @@ -1063,7 +1089,7 @@ If ``width`` is negative, then the polyline is drawn using :ref:`RenderingServer .. rst-class:: classref-method -void **draw_primitive** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** +|void| **draw_primitive**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) :ref:`🔗` Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line`, :ref:`draw_polyline`, :ref:`draw_polygon`, and :ref:`draw_rect`. @@ -1075,12 +1101,14 @@ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for .. rst-class:: classref-method -void **draw_rect** **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** +|void| **draw_rect**\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`🔗` Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect`. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +If ``antialiased`` is ``true``, half transparent "feathers" will be attached to the boundary, making outlines smooth. + \ **Note:** ``width`` is only effective if ``filled`` is ``false``. \ **Note:** Unfilled rectangles drawn with a negative ``width`` may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent ``color``). @@ -1093,7 +1121,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -void **draw_set_transform** **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** +|void| **draw_set_transform**\ (\ position\: :ref:`Vector2`, rotation\: :ref:`float` = 0.0, scale\: :ref:`Vector2` = Vector2(1, 1)\ ) :ref:`🔗` Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. @@ -1107,7 +1135,7 @@ Sets a custom transform for drawing via components. Anything drawn afterwards wi .. rst-class:: classref-method -void **draw_set_transform_matrix** **(** :ref:`Transform2D` xform **)** +|void| **draw_set_transform_matrix**\ (\ xform\: :ref:`Transform2D`\ ) :ref:`🔗` Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. @@ -1119,7 +1147,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b .. rst-class:: classref-method -void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +|void| **draw_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`🔗` Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1158,7 +1186,7 @@ See also :ref:`Font.draw_string`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag`\> justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +|void| **draw_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`🔗` Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. @@ -1170,7 +1198,7 @@ Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left .. rst-class:: classref-method -void **draw_style_box** **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** +|void| **draw_style_box**\ (\ style_box\: :ref:`StyleBox`, rect\: :ref:`Rect2`\ ) :ref:`🔗` Draws a styled rectangle. @@ -1182,7 +1210,7 @@ Draws a styled rectangle. .. rst-class:: classref-method -void **draw_texture** **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** +|void| **draw_texture**\ (\ texture\: :ref:`Texture2D`, position\: :ref:`Vector2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`🔗` Draws a texture at a given position. @@ -1194,7 +1222,7 @@ Draws a texture at a given position. .. rst-class:: classref-method -void **draw_texture_rect** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** +|void| **draw_texture_rect**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) :ref:`🔗` Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect` and :ref:`draw_texture_rect_region`. @@ -1206,7 +1234,7 @@ Draws a textured rectangle at a given position, optionally modulated by a color. .. rst-class:: classref-method -void **draw_texture_rect_region** **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** +|void| **draw_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) :ref:`🔗` Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect`. @@ -1218,7 +1246,7 @@ Draws a textured rectangle from a texture's region (specified by ``src_rect``) a .. rst-class:: classref-method -void **force_update_transform** **(** **)** +|void| **force_update_transform**\ (\ ) :ref:`🔗` Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. @@ -1230,7 +1258,7 @@ Forces the transform to update. Transform changes in physics are not instant for .. rst-class:: classref-method -:ref:`RID` **get_canvas** **(** **)** |const| +:ref:`RID` **get_canvas**\ (\ ) |const| :ref:`🔗` Returns the :ref:`RID` of the :ref:`World2D` canvas where this item is in. @@ -1242,7 +1270,7 @@ Returns the :ref:`RID` of the :ref:`World2D` canvas wh .. rst-class:: classref-method -:ref:`RID` **get_canvas_item** **(** **)** |const| +:ref:`RID` **get_canvas_item**\ (\ ) |const| :ref:`🔗` Returns the canvas item RID used by :ref:`RenderingServer` for this item. @@ -1250,11 +1278,23 @@ Returns the canvas item RID used by :ref:`RenderingServer ---- +.. _class_CanvasItem_method_get_canvas_layer_node: + +.. rst-class:: classref-method + +:ref:`CanvasLayer` **get_canvas_layer_node**\ (\ ) |const| :ref:`🔗` + +Returns the :ref:`CanvasLayer` that contains this node, or ``null`` if the node is not in any :ref:`CanvasLayer`. + +.. rst-class:: classref-item-separator + +---- + .. _class_CanvasItem_method_get_canvas_transform: .. rst-class:: classref-method -:ref:`Transform2D` **get_canvas_transform** **(** **)** |const| +:ref:`Transform2D` **get_canvas_transform**\ (\ ) |const| :ref:`🔗` Returns the transform from the coordinate system of the canvas, this item is in, to the :ref:`Viewport`\ s coordinate system. @@ -1266,7 +1306,7 @@ Returns the transform from the coordinate system of the canvas, this item is in, .. rst-class:: classref-method -:ref:`Vector2` **get_global_mouse_position** **(** **)** |const| +:ref:`Vector2` **get_global_mouse_position**\ (\ ) |const| :ref:`🔗` Returns the mouse's position in the :ref:`CanvasLayer` that this **CanvasItem** is in using the coordinate system of the :ref:`CanvasLayer`. @@ -1280,7 +1320,7 @@ Returns the mouse's position in the :ref:`CanvasLayer` that t .. rst-class:: classref-method -:ref:`Transform2D` **get_global_transform** **(** **)** |const| +:ref:`Transform2D` **get_global_transform**\ (\ ) |const| :ref:`🔗` Returns the global transform matrix of this item, i.e. the combined transform up to the topmost **CanvasItem** node. The topmost item is a **CanvasItem** that either has no parent, has non-**CanvasItem** parent or it has :ref:`top_level` enabled. @@ -1292,7 +1332,7 @@ Returns the global transform matrix of this item, i.e. the combined transform up .. rst-class:: classref-method -:ref:`Transform2D` **get_global_transform_with_canvas** **(** **)** |const| +:ref:`Transform2D` **get_global_transform_with_canvas**\ (\ ) |const| :ref:`🔗` Returns the transform from the local coordinate system of this **CanvasItem** to the :ref:`Viewport`\ s coordinate system. @@ -1304,7 +1344,7 @@ Returns the transform from the local coordinate system of this **CanvasItem** to .. rst-class:: classref-method -:ref:`Vector2` **get_local_mouse_position** **(** **)** |const| +:ref:`Vector2` **get_local_mouse_position**\ (\ ) |const| :ref:`🔗` Returns the mouse's position in this **CanvasItem** using the local coordinate system of this **CanvasItem**. @@ -1316,7 +1356,7 @@ Returns the mouse's position in this **CanvasItem** using the local coordinate s .. rst-class:: classref-method -:ref:`Transform2D` **get_screen_transform** **(** **)** |const| +:ref:`Transform2D` **get_screen_transform**\ (\ ) |const| :ref:`🔗` Returns the transform of this **CanvasItem** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. @@ -1330,7 +1370,7 @@ Equals to :ref:`get_global_transform` **get_transform** **(** **)** |const| +:ref:`Transform2D` **get_transform**\ (\ ) |const| :ref:`🔗` Returns the transform matrix of this item. @@ -1342,7 +1382,7 @@ Returns the transform matrix of this item. .. rst-class:: classref-method -:ref:`Rect2` **get_viewport_rect** **(** **)** |const| +:ref:`Rect2` **get_viewport_rect**\ (\ ) |const| :ref:`🔗` Returns the viewport's boundaries as a :ref:`Rect2`. @@ -1354,7 +1394,7 @@ Returns the viewport's boundaries as a :ref:`Rect2`. .. rst-class:: classref-method -:ref:`Transform2D` **get_viewport_transform** **(** **)** |const| +:ref:`Transform2D` **get_viewport_transform**\ (\ ) |const| :ref:`🔗` Returns the transform from the coordinate system of the canvas, this item is in, to the :ref:`Viewport`\ s embedders coordinate system. @@ -1366,7 +1406,7 @@ Returns the transform from the coordinate system of the canvas, this item is in, .. rst-class:: classref-method -:ref:`bool` **get_visibility_layer_bit** **(** :ref:`int` layer **)** |const| +:ref:`bool` **get_visibility_layer_bit**\ (\ layer\: :ref:`int`\ ) |const| :ref:`🔗` Returns an individual bit on the rendering visibility layer. @@ -1378,7 +1418,7 @@ Returns an individual bit on the rendering visibility layer. .. rst-class:: classref-method -:ref:`World2D` **get_world_2d** **(** **)** |const| +:ref:`World2D` **get_world_2d**\ (\ ) |const| :ref:`🔗` Returns the :ref:`World2D` where this item is in. @@ -1390,7 +1430,7 @@ Returns the :ref:`World2D` where this item is in. .. rst-class:: classref-method -void **hide** **(** **)** +|void| **hide**\ (\ ) :ref:`🔗` Hide the **CanvasItem** if it's currently visible. This is equivalent to setting :ref:`visible` to ``false``. @@ -1402,7 +1442,7 @@ Hide the **CanvasItem** if it's currently visible. This is equivalent to setting .. rst-class:: classref-method -:ref:`bool` **is_local_transform_notification_enabled** **(** **)** |const| +:ref:`bool` **is_local_transform_notification_enabled**\ (\ ) |const| :ref:`🔗` Returns ``true`` if local transform notifications are communicated to children. @@ -1414,7 +1454,7 @@ Returns ``true`` if local transform notifications are communicated to children. .. rst-class:: classref-method -:ref:`bool` **is_transform_notification_enabled** **(** **)** |const| +:ref:`bool` **is_transform_notification_enabled**\ (\ ) |const| :ref:`🔗` Returns ``true`` if global transform notifications are communicated to children. @@ -1426,9 +1466,9 @@ Returns ``true`` if global transform notifications are communicated to children. .. rst-class:: classref-method -:ref:`bool` **is_visible_in_tree** **(** **)** |const| +:ref:`bool` **is_visible_in_tree**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see :ref:`_draw`). +Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw`). .. rst-class:: classref-item-separator @@ -1438,7 +1478,7 @@ Returns ``true`` if the node is present in the :ref:`SceneTree` .. rst-class:: classref-method -:ref:`Vector2` **make_canvas_position_local** **(** :ref:`Vector2` screen_point **)** |const| +:ref:`Vector2` **make_canvas_position_local**\ (\ screen_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Assigns ``screen_point`` as this node's new local transform. @@ -1450,7 +1490,7 @@ Assigns ``screen_point`` as this node's new local transform. .. rst-class:: classref-method -:ref:`InputEvent` **make_input_local** **(** :ref:`InputEvent` event **)** |const| +:ref:`InputEvent` **make_input_local**\ (\ event\: :ref:`InputEvent`\ ) |const| :ref:`🔗` Transformations issued by ``event``'s inputs are applied in local space instead of global space. @@ -1462,11 +1502,11 @@ Transformations issued by ``event``'s inputs are applied in local space instead .. rst-class:: classref-method -void **move_to_front** **(** **)** +|void| **move_to_front**\ (\ ) :ref:`🔗` Moves this node to display on top of its siblings. -Internally, the node is moved to the bottom of parent's children list. The method has no effect on nodes without a parent. +Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent. .. rst-class:: classref-item-separator @@ -1476,9 +1516,9 @@ Internally, the node is moved to the bottom of parent's children list. The metho .. rst-class:: classref-method -void **queue_redraw** **(** **)** +|void| **queue_redraw**\ (\ ) :ref:`🔗` -Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw` is called. This only occurs **once** per frame, even if this method has been called multiple times. +Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw` is called. This only occurs **once** per frame, even if this method has been called multiple times. .. rst-class:: classref-item-separator @@ -1488,7 +1528,7 @@ Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visi .. rst-class:: classref-method -void **set_notify_local_transform** **(** :ref:`bool` enable **)** +|void| **set_notify_local_transform**\ (\ enable\: :ref:`bool`\ ) :ref:`🔗` If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` when its local transform changes. @@ -1500,7 +1540,7 @@ If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANS .. rst-class:: classref-method -void **set_notify_transform** **(** :ref:`bool` enable **)** +|void| **set_notify_transform**\ (\ enable\: :ref:`bool`\ ) :ref:`🔗` If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_CHANGED` when its global transform changes. @@ -1512,7 +1552,7 @@ If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_C .. rst-class:: classref-method -void **set_visibility_layer_bit** **(** :ref:`int` layer, :ref:`bool` enabled **)** +|void| **set_visibility_layer_bit**\ (\ layer\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` Set/clear individual bits on the rendering visibility layer. This simplifies editing this **CanvasItem**'s visibility layer. @@ -1524,7 +1564,7 @@ Set/clear individual bits on the rendering visibility layer. This simplifies edi .. rst-class:: classref-method -void **show** **(** **)** +|void| **show**\ (\ ) :ref:`🔗` Show the **CanvasItem** if it's currently hidden. This is equivalent to setting :ref:`visible` to ``true``. For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. @@ -1535,3 +1575,4 @@ Show the **CanvasItem** if it's currently hidden. This is equivalent to setting .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index 9a244683fc2..0fadbe027b9 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BlendMode**: +enum **BlendMode**: :ref:`🔗` .. _class_CanvasItemMaterial_constant_BLEND_MODE_MIX: @@ -106,7 +106,7 @@ Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) .. rst-class:: classref-enumeration -enum **LightMode**: +enum **LightMode**: :ref:`🔗` .. _class_CanvasItemMaterial_constant_LIGHT_MODE_NORMAL: @@ -145,12 +145,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BlendMode` **blend_mode** = ``0`` +:ref:`BlendMode` **blend_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_mode** **(** :ref:`BlendMode` value **)** -- :ref:`BlendMode` **get_blend_mode** **(** **)** +- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) +- :ref:`BlendMode` **get_blend_mode**\ (\ ) The manner in which a material's rendering is applied to underlying textures. @@ -162,12 +162,12 @@ The manner in which a material's rendering is applied to underlying textures. .. rst-class:: classref-property -:ref:`LightMode` **light_mode** = ``0`` +:ref:`LightMode` **light_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_light_mode** **(** :ref:`LightMode` value **)** -- :ref:`LightMode` **get_light_mode** **(** **)** +- |void| **set_light_mode**\ (\ value\: :ref:`LightMode`\ ) +- :ref:`LightMode` **get_light_mode**\ (\ ) The manner in which material reacts to lighting. @@ -179,12 +179,12 @@ The manner in which material reacts to lighting. .. rst-class:: classref-property -:ref:`int` **particles_anim_h_frames** +:ref:`int` **particles_anim_h_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_h_frames** **(** :ref:`int` value **)** -- :ref:`int` **get_particles_anim_h_frames** **(** **)** +- |void| **set_particles_anim_h_frames**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_particles_anim_h_frames**\ (\ ) The number of columns in the spritesheet assigned as :ref:`Texture2D` for a :ref:`GPUParticles2D` or :ref:`CPUParticles2D`. @@ -198,12 +198,12 @@ The number of columns in the spritesheet assigned as :ref:`Texture2D` **particles_anim_loop** +:ref:`bool` **particles_anim_loop** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_loop** **(** :ref:`bool` value **)** -- :ref:`bool` **get_particles_anim_loop** **(** **)** +- |void| **set_particles_anim_loop**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_particles_anim_loop**\ (\ ) If ``true``, the particles animation will loop. @@ -217,12 +217,12 @@ If ``true``, the particles animation will loop. .. rst-class:: classref-property -:ref:`int` **particles_anim_v_frames** +:ref:`int` **particles_anim_v_frames** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_anim_v_frames** **(** :ref:`int` value **)** -- :ref:`int` **get_particles_anim_v_frames** **(** **)** +- |void| **set_particles_anim_v_frames**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_particles_anim_v_frames**\ (\ ) The number of rows in the spritesheet assigned as :ref:`Texture2D` for a :ref:`GPUParticles2D` or :ref:`CPUParticles2D`. @@ -236,12 +236,12 @@ The number of rows in the spritesheet assigned as :ref:`Texture2D` **particles_animation** = ``false`` +:ref:`bool` **particles_animation** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particles_animation** **(** :ref:`bool` value **)** -- :ref:`bool` **get_particles_animation** **(** **)** +- |void| **set_particles_animation**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_particles_animation**\ (\ ) If ``true``, enable spritesheet-based animation features when assigned to :ref:`GPUParticles2D` and :ref:`CPUParticles2D` nodes. The :ref:`ParticleProcessMaterial.anim_speed_max` or :ref:`CPUParticles2D.anim_speed_max` should also be set to a positive value for the animation to play. @@ -254,3 +254,4 @@ This property (and other ``particles_anim_*`` properties that depend on it) has .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index da81db3f059..ac3e8ce8717 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -38,7 +38,7 @@ Tutorials - :doc:`Canvas layers <../tutorials/2d/canvas_layers>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group @@ -76,15 +76,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_final_transform` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_final_transform`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------+ + | |void| | :ref:`hide`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------+ + | |void| | :ref:`show`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -99,7 +99,7 @@ Signals .. rst-class:: classref-signal -**visibility_changed** **(** **)** +**visibility_changed**\ (\ ) :ref:`🔗` Emitted when visibility of the layer is changed. See :ref:`visible`. @@ -116,12 +116,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Node` **custom_viewport** +:ref:`Node` **custom_viewport** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_custom_viewport** **(** :ref:`Node` value **)** -- :ref:`Node` **get_custom_viewport** **(** **)** +- |void| **set_custom_viewport**\ (\ value\: :ref:`Node`\ ) +- :ref:`Node` **get_custom_viewport**\ (\ ) The custom :ref:`Viewport` node assigned to the **CanvasLayer**. If ``null``, uses the default viewport instead. @@ -133,12 +133,12 @@ The custom :ref:`Viewport` node assigned to the **CanvasLayer**. .. rst-class:: classref-property -:ref:`bool` **follow_viewport_enabled** = ``false`` +:ref:`bool` **follow_viewport_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_follow_viewport** **(** :ref:`bool` value **)** -- :ref:`bool` **is_following_viewport** **(** **)** +- |void| **set_follow_viewport**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_following_viewport**\ (\ ) If enabled, the **CanvasLayer** will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen. @@ -152,12 +152,12 @@ Together with :ref:`follow_viewport_scale` **follow_viewport_scale** = ``1.0`` +:ref:`float` **follow_viewport_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_follow_viewport_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_follow_viewport_scale** **(** **)** +- |void| **set_follow_viewport_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_follow_viewport_scale**\ (\ ) Scales the layer when using :ref:`follow_viewport_enabled`. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. @@ -169,15 +169,17 @@ Scales the layer when using :ref:`follow_viewport_enabled` **layer** = ``1`` +:ref:`int` **layer** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_layer** **(** :ref:`int` value **)** -- :ref:`int` **get_layer** **(** **)** +- |void| **set_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_layer**\ (\ ) Layer index for draw order. Lower values are drawn behind higher values. +\ **Note:** If multiple CanvasLayers have the same layer index, :ref:`CanvasItem` children of one CanvasLayer are drawn behind the :ref:`CanvasItem` children of the other CanvasLayer. Which CanvasLayer is drawn in front is non-deterministic. + .. rst-class:: classref-item-separator ---- @@ -186,12 +188,12 @@ Layer index for draw order. Lower values are drawn behind higher values. .. rst-class:: classref-property -:ref:`Vector2` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_offset**\ (\ ) The layer's base offset. @@ -203,12 +205,12 @@ The layer's base offset. .. rst-class:: classref-property -:ref:`float` **rotation** = ``0.0`` +:ref:`float` **rotation** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rotation** **(** :ref:`float` value **)** -- :ref:`float` **get_rotation** **(** **)** +- |void| **set_rotation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rotation**\ (\ ) The layer's rotation in radians. @@ -220,12 +222,12 @@ The layer's rotation in radians. .. rst-class:: classref-property -:ref:`Vector2` **scale** = ``Vector2(1, 1)`` +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_scale** **(** **)** +- |void| **set_scale**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_scale**\ (\ ) The layer's scale. @@ -237,12 +239,12 @@ The layer's scale. .. rst-class:: classref-property -:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform2D` value **)** -- :ref:`Transform2D` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform2D`\ ) +- :ref:`Transform2D` **get_transform**\ (\ ) The layer's transform. @@ -254,12 +256,12 @@ The layer's transform. .. rst-class:: classref-property -:ref:`bool` **visible** = ``true`` +:ref:`bool` **visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **is_visible** **(** **)** +- |void| **set_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_visible**\ (\ ) If ``false``, any :ref:`CanvasItem` under this **CanvasLayer** will be hidden. @@ -278,7 +280,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID` **get_canvas** **(** **)** |const| +:ref:`RID` **get_canvas**\ (\ ) |const| :ref:`🔗` Returns the RID of the canvas used by this layer. @@ -290,7 +292,7 @@ Returns the RID of the canvas used by this layer. .. rst-class:: classref-method -:ref:`Transform2D` **get_final_transform** **(** **)** |const| +:ref:`Transform2D` **get_final_transform**\ (\ ) |const| :ref:`🔗` Returns the transform from the **CanvasLayer**\ s coordinate system to the :ref:`Viewport`\ s coordinate system. @@ -302,7 +304,7 @@ Returns the transform from the **CanvasLayer**\ s coordinate system to the :ref: .. rst-class:: classref-method -void **hide** **(** **)** +|void| **hide**\ (\ ) :ref:`🔗` Hides any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` to ``false``. @@ -314,7 +316,7 @@ Hides any :ref:`CanvasItem` under this **CanvasLayer**. This i .. rst-class:: classref-method -void **show** **(** **)** +|void| **show**\ (\ ) :ref:`🔗` Shows any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` to ``true``. @@ -325,3 +327,4 @@ Shows any :ref:`CanvasItem` under this **CanvasLayer**. This i .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index 0c8e1787f48..a90a5687fcf 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: color + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -46,12 +49,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_color**\ (\ ) The tint color to apply. @@ -62,3 +65,4 @@ The tint color to apply. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_canvastexture.rst b/classes/class_canvastexture.rst index bbe7817f4fa..b9e28e5a240 100644 --- a/classes/class_canvastexture.rst +++ b/classes/class_canvastexture.rst @@ -21,7 +21,14 @@ Description **CanvasTexture** is an alternative to :ref:`ImageTexture` for 2D rendering. It allows using normal maps and specular maps in any node that inherits from :ref:`CanvasItem`. **CanvasTexture** also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings). -\ **Note:** **CanvasTexture** cannot be used in 3D rendering. For physically-based materials in 3D, use :ref:`BaseMaterial3D` instead. +\ **Note:** **CanvasTexture** cannot be used in 3D. It will not display correctly when applied to any :ref:`VisualInstance3D`, such as :ref:`Sprite3D` or :ref:`Decal`. For physically-based materials in 3D, use :ref:`BaseMaterial3D` instead. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`2D Lights and Shadows <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group @@ -62,12 +69,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture2D` **diffuse_texture** +:ref:`Texture2D` **diffuse_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_diffuse_texture** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_diffuse_texture** **(** **)** +- |void| **set_diffuse_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_diffuse_texture**\ (\ ) The diffuse (color) texture to use. This is the main texture you want to set in most cases. @@ -79,12 +86,12 @@ The diffuse (color) texture to use. This is the main texture you want to set in .. rst-class:: classref-property -:ref:`Texture2D` **normal_texture** +:ref:`Texture2D` **normal_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_normal_texture** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_normal_texture** **(** **)** +- |void| **set_normal_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_normal_texture**\ (\ ) The normal map texture to use. Only has a visible effect if :ref:`Light2D`\ s are affecting this **CanvasTexture**. @@ -98,12 +105,12 @@ The normal map texture to use. Only has a visible effect if :ref:`Light2D` **specular_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **specular_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_specular_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_specular_color** **(** **)** +- |void| **set_specular_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_specular_color**\ (\ ) The multiplier for specular reflection colors. The :ref:`Light2D`'s color is also taken into account when determining the reflection color. Only has a visible effect if :ref:`Light2D`\ s are affecting this **CanvasTexture**. @@ -115,12 +122,12 @@ The multiplier for specular reflection colors. The :ref:`Light2D` .. rst-class:: classref-property -:ref:`float` **specular_shininess** = ``1.0`` +:ref:`float` **specular_shininess** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_specular_shininess** **(** :ref:`float` value **)** -- :ref:`float` **get_specular_shininess** **(** **)** +- |void| **set_specular_shininess**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_specular_shininess**\ (\ ) The specular exponent for :ref:`Light2D` specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of ``1.0`` disables specular reflections entirely. Only has a visible effect if :ref:`Light2D`\ s are affecting this **CanvasTexture**. @@ -132,12 +139,12 @@ The specular exponent for :ref:`Light2D` specular reflections. Hi .. rst-class:: classref-property -:ref:`Texture2D` **specular_texture** +:ref:`Texture2D` **specular_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_specular_texture** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_specular_texture** **(** **)** +- |void| **set_specular_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_specular_texture**\ (\ ) The specular map to use for :ref:`Light2D` specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher :ref:`specular_shininess` value. Using a colored :ref:`specular_texture` allows controlling specular shininess on a per-channel basis. Only has a visible effect if :ref:`Light2D`\ s are affecting this **CanvasTexture**. @@ -149,12 +156,12 @@ The specular map to use for :ref:`Light2D` specular reflections. .. rst-class:: classref-property -:ref:`TextureFilter` **texture_filter** = ``0`` +:ref:`TextureFilter` **texture_filter** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter` value **)** -- :ref:`TextureFilter` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) +- :ref:`TextureFilter` **get_texture_filter**\ (\ ) The texture filtering mode to use when drawing this **CanvasTexture**. @@ -166,12 +173,12 @@ The texture filtering mode to use when drawing this **CanvasTexture**. .. rst-class:: classref-property -:ref:`TextureRepeat` **texture_repeat** = ``0`` +:ref:`TextureRepeat` **texture_repeat** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_repeat** **(** :ref:`TextureRepeat` value **)** -- :ref:`TextureRepeat` **get_texture_repeat** **(** **)** +- |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat`\ ) +- :ref:`TextureRepeat` **get_texture_repeat**\ (\ ) The texture repeat mode to use when drawing this **CanvasTexture**. @@ -182,3 +189,4 @@ The texture repeat mode to use when drawing this **CanvasTexture**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_capsulemesh.rst b/classes/class_capsulemesh.rst index 9a6686e0c50..344e76e7825 100644 --- a/classes/class_capsulemesh.rst +++ b/classes/class_capsulemesh.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **height** = ``2.0`` +:ref:`float` **height** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) Total height of the capsule mesh (including the hemispherical ends). @@ -69,12 +69,12 @@ Total height of the capsule mesh (including the hemispherical ends). .. rst-class:: classref-property -:ref:`int` **radial_segments** = ``64`` +:ref:`int` **radial_segments** = ``64`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radial_segments** **(** :ref:`int` value **)** -- :ref:`int` **get_radial_segments** **(** **)** +- |void| **set_radial_segments**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_radial_segments**\ (\ ) Number of radial segments on the capsule mesh. @@ -86,12 +86,12 @@ Number of radial segments on the capsule mesh. .. rst-class:: classref-property -:ref:`float` **radius** = ``0.5`` +:ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) Radius of the capsule mesh. @@ -103,12 +103,12 @@ Radius of the capsule mesh. .. rst-class:: classref-property -:ref:`int` **rings** = ``8`` +:ref:`int` **rings** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rings** **(** :ref:`int` value **)** -- :ref:`int` **get_rings** **(** **)** +- |void| **set_rings**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_rings**\ (\ ) Number of rings along the height of the capsule. @@ -119,3 +119,4 @@ Number of rings along the height of the capsule. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index f845eb04122..7e94ff5cc99 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **height** = ``30.0`` +:ref:`float` **height** = ``30.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) The capsule's height. @@ -67,12 +67,12 @@ The capsule's height. .. rst-class:: classref-property -:ref:`float` **radius** = ``10.0`` +:ref:`float` **radius** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) The capsule's radius. @@ -83,3 +83,4 @@ The capsule's radius. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index 4406449bdbe..e68a2354602 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -28,7 +28,7 @@ A 3D capsule shape, intended for use in physics. Usually used to provide a shape Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **height** = ``2.0`` +:ref:`float` **height** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) The capsule's height. @@ -74,12 +74,12 @@ The capsule's height. .. rst-class:: classref-property -:ref:`float` **radius** = ``0.5`` +:ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) The capsule's radius. @@ -90,3 +90,4 @@ The capsule's radius. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index a5063b808cb..01b05d18370 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -53,12 +53,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **use_top_left** = ``false`` +:ref:`bool` **use_top_left** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_top_left** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_top_left** **(** **)** +- |void| **set_use_top_left**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_top_left**\ (\ ) If ``true``, centers children relative to the **CenterContainer**'s top left corner. @@ -69,3 +69,4 @@ If ``true``, centers children relative to the **CenterContainer**'s top left cor .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index b8b7f94edab..ea56c53059b 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -32,9 +32,9 @@ Tutorials - :doc:`Using CharacterBody2D <../tutorials/physics/using_character_body_2d>` -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ -- `2D Platformer Demo `__ +- `2D Platformer Demo `__ .. rst-class:: classref-reftable-group @@ -84,43 +84,43 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_floor_snap` **(** **)** | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_floor_normal` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_last_motion` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision2D` | :ref:`get_last_slide_collision` **(** **)** | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_platform_velocity` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_position_delta` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_real_velocity` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision2D` | :ref:`get_slide_collision` **(** :ref:`int` slide_idx **)** | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_slide_collision_count` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_wall_normal` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_ceiling` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_ceiling_only` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_floor` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_floor_only` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_wall` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_wall_only` **(** **)** |const| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`move_and_slide` **(** **)** | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_floor_snap`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_floor_angle`\ (\ up_direction\: :ref:`Vector2` = Vector2(0, -1)\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_floor_normal`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_last_motion`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision2D` | :ref:`get_last_slide_collision`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_platform_velocity`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_position_delta`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_real_velocity`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision2D` | :ref:`get_slide_collision`\ (\ slide_idx\: :ref:`int`\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slide_collision_count`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_wall_normal`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_ceiling`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_ceiling_only`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_floor`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_floor_only`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_wall`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_wall_only`\ (\ ) |const| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`move_and_slide`\ (\ ) | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -135,7 +135,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MotionMode**: +enum **MotionMode**: :ref:`🔗` .. _class_CharacterBody2D_constant_MOTION_MODE_GROUNDED: @@ -161,7 +161,7 @@ Apply when there is no notion of floor or ceiling. All collisions will be report .. rst-class:: classref-enumeration -enum **PlatformOnLeave**: +enum **PlatformOnLeave**: :ref:`🔗` .. _class_CharacterBody2D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: @@ -200,12 +200,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **floor_block_on_wall** = ``true`` +:ref:`bool` **floor_block_on_wall** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_block_on_wall_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_block_on_wall_enabled** **(** **)** +- |void| **set_floor_block_on_wall_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_block_on_wall_enabled**\ (\ ) If ``true``, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. @@ -217,12 +217,12 @@ If ``true``, the body will be able to move on the floor only. This option avoids .. rst-class:: classref-property -:ref:`bool` **floor_constant_speed** = ``false`` +:ref:`bool` **floor_constant_speed** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_constant_speed_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_constant_speed_enabled** **(** **)** +- |void| **set_floor_constant_speed_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_constant_speed_enabled**\ (\ ) If ``false`` (by default), the body will move faster on downward slopes and slower on upward slopes. @@ -236,12 +236,12 @@ If ``true``, the body will always move at the same speed on the ground no matter .. rst-class:: classref-property -:ref:`float` **floor_max_angle** = ``0.785398`` +:ref:`float` **floor_max_angle** = ``0.785398`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_max_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_floor_max_angle** **(** **)** +- |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_floor_max_angle**\ (\ ) Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. @@ -253,12 +253,12 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili .. rst-class:: classref-property -:ref:`float` **floor_snap_length** = ``1.0`` +:ref:`float` **floor_snap_length** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_snap_length** **(** :ref:`float` value **)** -- :ref:`float` **get_floor_snap_length** **(** **)** +- |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_floor_snap_length**\ (\ ) Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. @@ -272,12 +272,12 @@ As long as the snapping vector is in contact with the ground and the body moves .. rst-class:: classref-property -:ref:`bool` **floor_stop_on_slope** = ``true`` +:ref:`bool` **floor_stop_on_slope** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_stop_on_slope_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_stop_on_slope_enabled** **(** **)** +- |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. @@ -291,12 +291,12 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity` **max_slides** = ``4`` +:ref:`int` **max_slides** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_slides** **(** :ref:`int` value **)** -- :ref:`int` **get_max_slides** **(** **)** +- |void| **set_max_slides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_slides**\ (\ ) Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. @@ -308,12 +308,12 @@ Maximum number of times the body can change direction before it stops when calli .. rst-class:: classref-property -:ref:`MotionMode` **motion_mode** = ``0`` +:ref:`MotionMode` **motion_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_motion_mode** **(** :ref:`MotionMode` value **)** -- :ref:`MotionMode` **get_motion_mode** **(** **)** +- |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) +- :ref:`MotionMode` **get_motion_mode**\ (\ ) Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. @@ -325,12 +325,12 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **platform_floor_layers** = ``4294967295`` +:ref:`int` **platform_floor_layers** = ``4294967295`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_floor_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_platform_floor_layers** **(** **)** +- |void| **set_platform_floor_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_platform_floor_layers**\ (\ ) Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the **CharacterBody2D**. By default, all floor bodies are detected and propagate their velocity. @@ -342,12 +342,12 @@ Collision layers that will be included for detecting floor bodies that will act .. rst-class:: classref-property -:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` +:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_on_leave** **(** :ref:`PlatformOnLeave` value **)** -- :ref:`PlatformOnLeave` **get_platform_on_leave** **(** **)** +- |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) +- :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. @@ -359,12 +359,12 @@ Sets the behavior to apply when you leave a moving platform. By default, to be p .. rst-class:: classref-property -:ref:`int` **platform_wall_layers** = ``0`` +:ref:`int` **platform_wall_layers** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_wall_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_platform_wall_layers** **(** **)** +- |void| **set_platform_wall_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_platform_wall_layers**\ (\ ) Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the **CharacterBody2D**. By default, all wall bodies are ignored. @@ -376,12 +376,12 @@ Collision layers that will be included for detecting wall bodies that will act a .. rst-class:: classref-property -:ref:`float` **safe_margin** = ``0.08`` +:ref:`float` **safe_margin** = ``0.08`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_safe_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_safe_margin** **(** **)** +- |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_safe_margin**\ (\ ) Extra margin used for collision recovery when calling :ref:`move_and_slide`. @@ -399,12 +399,12 @@ A lower value forces the collision algorithm to use more exact detection, so it .. rst-class:: classref-property -:ref:`bool` **slide_on_ceiling** = ``true`` +:ref:`bool` **slide_on_ceiling** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_slide_on_ceiling_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_slide_on_ceiling_enabled** **(** **)** +- |void| **set_slide_on_ceiling_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_slide_on_ceiling_enabled**\ (\ ) If ``true``, during a jump against the ceiling, the body will slide, if ``false`` it will be stopped and will fall vertically. @@ -416,14 +416,14 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` .. rst-class:: classref-property -:ref:`Vector2` **up_direction** = ``Vector2(0, -1)`` +:ref:`Vector2` **up_direction** = ``Vector2(0, -1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_up_direction** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_up_direction** **(** **)** +- |void| **set_up_direction**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to ``Vector2.UP``. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector2.UP`. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -433,12 +433,12 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o .. rst-class:: classref-property -:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` +:ref:`Vector2` **velocity** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_velocity**\ (\ ) Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. @@ -450,12 +450,12 @@ Current velocity vector in pixels per second, used and modified during calls to .. rst-class:: classref-property -:ref:`float` **wall_min_slide_angle** = ``0.261799`` +:ref:`float` **wall_min_slide_angle** = ``0.261799`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wall_min_slide_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_wall_min_slide_angle** **(** **)** +- |void| **set_wall_min_slide_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wall_min_slide_angle**\ (\ ) Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when :ref:`motion_mode` is :ref:`MOTION_MODE_FLOATING`. @@ -472,7 +472,7 @@ Method Descriptions .. rst-class:: classref-method -void **apply_floor_snap** **(** **)** +|void| **apply_floor_snap**\ (\ ) :ref:`🔗` Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. @@ -484,9 +484,9 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. .. rst-class:: classref-method -:ref:`float` **get_floor_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| +:ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector2` = Vector2(0, -1)\ ) |const| :ref:`🔗` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is ``Vector2.UP`` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. .. rst-class:: classref-item-separator @@ -496,9 +496,11 @@ Returns the floor's collision angle at the last collision point according to ``u .. rst-class:: classref-method -:ref:`Vector2` **get_floor_normal** **(** **)** |const| +:ref:`Vector2` **get_floor_normal**\ (\ ) |const| :ref:`🔗` -Returns the surface normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -508,7 +510,7 @@ Returns the surface normal of the floor at the last collision point. Only valid .. rst-class:: classref-method -:ref:`Vector2` **get_last_motion** **(** **)** |const| +:ref:`Vector2` **get_last_motion**\ (\ ) |const| :ref:`🔗` Returns the last motion applied to the **CharacterBody2D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. @@ -520,7 +522,7 @@ Returns the last motion applied to the **CharacterBody2D** during the last call .. rst-class:: classref-method -:ref:`KinematicCollision2D` **get_last_slide_collision** **(** **)** +:ref:`KinematicCollision2D` **get_last_slide_collision**\ (\ ) :ref:`🔗` Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. @@ -532,7 +534,7 @@ Returns a :ref:`KinematicCollision2D`, which contain .. rst-class:: classref-method -:ref:`Vector2` **get_platform_velocity** **(** **)** |const| +:ref:`Vector2` **get_platform_velocity**\ (\ ) |const| :ref:`🔗` Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. @@ -544,7 +546,7 @@ Returns the linear velocity of the platform at the last collision point. Only va .. rst-class:: classref-method -:ref:`Vector2` **get_position_delta** **(** **)** |const| +:ref:`Vector2` **get_position_delta**\ (\ ) |const| :ref:`🔗` Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. @@ -556,7 +558,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` .. rst-class:: classref-method -:ref:`Vector2` **get_real_velocity** **(** **)** |const| +:ref:`Vector2` **get_real_velocity**\ (\ ) |const| :ref:`🔗` Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. @@ -568,7 +570,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision** **(** :ref:`int` slide_idx **)** +:ref:`KinematicCollision2D` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`🔗` Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). @@ -601,7 +603,7 @@ Returns a :ref:`KinematicCollision2D`, which contain .. rst-class:: classref-method -:ref:`int` **get_slide_collision_count** **(** **)** |const| +:ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`🔗` Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. @@ -613,9 +615,11 @@ Returns the number of times the body collided and changed direction during the l .. rst-class:: classref-method -:ref:`Vector2` **get_wall_normal** **(** **)** |const| +:ref:`Vector2` **get_wall_normal**\ (\ ) |const| :ref:`🔗` + +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. -Returns the surface normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -625,7 +629,7 @@ Returns the surface normal of the wall at the last collision point. Only valid a .. rst-class:: classref-method -:ref:`bool` **is_on_ceiling** **(** **)** |const| +:ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. @@ -637,7 +641,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: .. rst-class:: classref-method -:ref:`bool` **is_on_ceiling_only** **(** **)** |const| +:ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. @@ -649,7 +653,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of .. rst-class:: classref-method -:ref:`bool` **is_on_floor** **(** **)** |const| +:ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. @@ -661,7 +665,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m .. rst-class:: classref-method -:ref:`bool` **is_on_floor_only** **(** **)** |const| +:ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. @@ -673,7 +677,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r .. rst-class:: classref-method -:ref:`bool` **is_on_wall** **(** **)** |const| +:ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. @@ -685,7 +689,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move .. rst-class:: classref-method -:ref:`bool` **is_on_wall_only** **(** **)** |const| +:ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. @@ -697,7 +701,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: .. rst-class:: classref-method -:ref:`bool` **move_and_slide** **(** **)** +:ref:`bool` **move_and_slide**\ (\ ) :ref:`🔗` Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a **CharacterBody2D** or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. @@ -716,3 +720,4 @@ Returns ``true`` if the body collided, otherwise, returns ``false``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index fc59e387dfb..7ea1e95f4f1 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -30,13 +30,13 @@ Tutorials - :doc:`Kinematic character (2D) <../tutorials/physics/kinematic_character_2d>` -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -86,45 +86,45 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_floor_snap` **(** **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_floor_angle` **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_floor_normal` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_last_motion` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision3D` | :ref:`get_last_slide_collision` **(** **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_platform_angular_velocity` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_platform_velocity` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_position_delta` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_real_velocity` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision3D` | :ref:`get_slide_collision` **(** :ref:`int` slide_idx **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_slide_collision_count` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_wall_normal` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_ceiling` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_ceiling_only` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_floor` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_floor_only` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_wall` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_on_wall_only` **(** **)** |const| | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`move_and_slide` **(** **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_floor_snap`\ (\ ) | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_floor_angle`\ (\ up_direction\: :ref:`Vector3` = Vector3(0, 1, 0)\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_floor_normal`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_last_motion`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision3D` | :ref:`get_last_slide_collision`\ (\ ) | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_platform_angular_velocity`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_platform_velocity`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_position_delta`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_real_velocity`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision3D` | :ref:`get_slide_collision`\ (\ slide_idx\: :ref:`int`\ ) | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_slide_collision_count`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_wall_normal`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_ceiling`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_ceiling_only`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_floor`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_floor_only`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_wall`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_on_wall_only`\ (\ ) |const| | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`move_and_slide`\ (\ ) | + +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,7 +139,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MotionMode**: +enum **MotionMode**: :ref:`🔗` .. _class_CharacterBody3D_constant_MOTION_MODE_GROUNDED: @@ -165,7 +165,7 @@ Apply when there is no notion of floor or ceiling. All collisions will be report .. rst-class:: classref-enumeration -enum **PlatformOnLeave**: +enum **PlatformOnLeave**: :ref:`🔗` .. _class_CharacterBody3D_constant_PLATFORM_ON_LEAVE_ADD_VELOCITY: @@ -204,12 +204,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **floor_block_on_wall** = ``true`` +:ref:`bool` **floor_block_on_wall** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_block_on_wall_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_block_on_wall_enabled** **(** **)** +- |void| **set_floor_block_on_wall_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_block_on_wall_enabled**\ (\ ) If ``true``, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. @@ -221,12 +221,12 @@ If ``true``, the body will be able to move on the floor only. This option avoids .. rst-class:: classref-property -:ref:`bool` **floor_constant_speed** = ``false`` +:ref:`bool` **floor_constant_speed** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_constant_speed_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_constant_speed_enabled** **(** **)** +- |void| **set_floor_constant_speed_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_constant_speed_enabled**\ (\ ) If ``false`` (by default), the body will move faster on downward slopes and slower on upward slopes. @@ -240,12 +240,12 @@ If ``true``, the body will always move at the same speed on the ground no matter .. rst-class:: classref-property -:ref:`float` **floor_max_angle** = ``0.785398`` +:ref:`float` **floor_max_angle** = ``0.785398`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_max_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_floor_max_angle** **(** **)** +- |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_floor_max_angle**\ (\ ) Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. @@ -257,12 +257,12 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili .. rst-class:: classref-property -:ref:`float` **floor_snap_length** = ``0.1`` +:ref:`float` **floor_snap_length** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_snap_length** **(** :ref:`float` value **)** -- :ref:`float` **get_floor_snap_length** **(** **)** +- |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_floor_snap_length**\ (\ ) Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. @@ -276,12 +276,12 @@ As long as the snapping vector is in contact with the ground and the body moves .. rst-class:: classref-property -:ref:`bool` **floor_stop_on_slope** = ``true`` +:ref:`bool` **floor_stop_on_slope** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_floor_stop_on_slope_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_floor_stop_on_slope_enabled** **(** **)** +- |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. @@ -295,12 +295,12 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity` **max_slides** = ``6`` +:ref:`int` **max_slides** = ``6`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_slides** **(** :ref:`int` value **)** -- :ref:`int` **get_max_slides** **(** **)** +- |void| **set_max_slides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_max_slides**\ (\ ) Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. @@ -312,12 +312,12 @@ Maximum number of times the body can change direction before it stops when calli .. rst-class:: classref-property -:ref:`MotionMode` **motion_mode** = ``0`` +:ref:`MotionMode` **motion_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_motion_mode** **(** :ref:`MotionMode` value **)** -- :ref:`MotionMode` **get_motion_mode** **(** **)** +- |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) +- :ref:`MotionMode` **get_motion_mode**\ (\ ) Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. @@ -329,12 +329,12 @@ Sets the motion mode which defines the behavior of :ref:`move_and_slide` **platform_floor_layers** = ``4294967295`` +:ref:`int` **platform_floor_layers** = ``4294967295`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_floor_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_platform_floor_layers** **(** **)** +- |void| **set_platform_floor_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_platform_floor_layers**\ (\ ) Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the **CharacterBody3D**. By default, all floor bodies are detected and propagate their velocity. @@ -346,12 +346,12 @@ Collision layers that will be included for detecting floor bodies that will act .. rst-class:: classref-property -:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` +:ref:`PlatformOnLeave` **platform_on_leave** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_on_leave** **(** :ref:`PlatformOnLeave` value **)** -- :ref:`PlatformOnLeave` **get_platform_on_leave** **(** **)** +- |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) +- :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. @@ -363,12 +363,12 @@ Sets the behavior to apply when you leave a moving platform. By default, to be p .. rst-class:: classref-property -:ref:`int` **platform_wall_layers** = ``0`` +:ref:`int` **platform_wall_layers** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_platform_wall_layers** **(** :ref:`int` value **)** -- :ref:`int` **get_platform_wall_layers** **(** **)** +- |void| **set_platform_wall_layers**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_platform_wall_layers**\ (\ ) Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the **CharacterBody3D**. By default, all wall bodies are ignored. @@ -380,12 +380,12 @@ Collision layers that will be included for detecting wall bodies that will act a .. rst-class:: classref-property -:ref:`float` **safe_margin** = ``0.001`` +:ref:`float` **safe_margin** = ``0.001`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_safe_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_safe_margin** **(** **)** +- |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_safe_margin**\ (\ ) Extra margin used for collision recovery when calling :ref:`move_and_slide`. @@ -403,12 +403,12 @@ A lower value forces the collision algorithm to use more exact detection, so it .. rst-class:: classref-property -:ref:`bool` **slide_on_ceiling** = ``true`` +:ref:`bool` **slide_on_ceiling** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_slide_on_ceiling_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_slide_on_ceiling_enabled** **(** **)** +- |void| **set_slide_on_ceiling_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_slide_on_ceiling_enabled**\ (\ ) If ``true``, during a jump against the ceiling, the body will slide, if ``false`` it will be stopped and will fall vertically. @@ -420,14 +420,14 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` .. rst-class:: classref-property -:ref:`Vector3` **up_direction** = ``Vector3(0, 1, 0)`` +:ref:`Vector3` **up_direction** = ``Vector3(0, 1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_up_direction** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_up_direction** **(** **)** +- |void| **set_up_direction**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to ``Vector3.UP``. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector3.UP`. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -437,12 +437,12 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o .. rst-class:: classref-property -:ref:`Vector3` **velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_velocity**\ (\ ) Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. @@ -454,12 +454,12 @@ Current velocity vector (typically meters per second), used and modified during .. rst-class:: classref-property -:ref:`float` **wall_min_slide_angle** = ``0.261799`` +:ref:`float` **wall_min_slide_angle** = ``0.261799`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_wall_min_slide_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_wall_min_slide_angle** **(** **)** +- |void| **set_wall_min_slide_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_wall_min_slide_angle**\ (\ ) Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When :ref:`motion_mode` is :ref:`MOTION_MODE_GROUNDED`, it only affects movement if :ref:`floor_block_on_wall` is ``true``. @@ -476,7 +476,7 @@ Method Descriptions .. rst-class:: classref-method -void **apply_floor_snap** **(** **)** +|void| **apply_floor_snap**\ (\ ) :ref:`🔗` Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. @@ -488,9 +488,9 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. .. rst-class:: classref-method -:ref:`float` **get_floor_angle** **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| +:ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector3` = Vector3(0, 1, 0)\ ) |const| :ref:`🔗` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is ``Vector3.UP`` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. .. rst-class:: classref-item-separator @@ -500,9 +500,11 @@ Returns the floor's collision angle at the last collision point according to ``u .. rst-class:: classref-method -:ref:`Vector3` **get_floor_normal** **(** **)** |const| +:ref:`Vector3` **get_floor_normal**\ (\ ) |const| :ref:`🔗` -Returns the surface normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. + +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -512,7 +514,7 @@ Returns the surface normal of the floor at the last collision point. Only valid .. rst-class:: classref-method -:ref:`Vector3` **get_last_motion** **(** **)** |const| +:ref:`Vector3` **get_last_motion**\ (\ ) |const| :ref:`🔗` Returns the last motion applied to the **CharacterBody3D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. @@ -524,7 +526,7 @@ Returns the last motion applied to the **CharacterBody3D** during the last call .. rst-class:: classref-method -:ref:`KinematicCollision3D` **get_last_slide_collision** **(** **)** +:ref:`KinematicCollision3D` **get_last_slide_collision**\ (\ ) :ref:`🔗` Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. @@ -536,7 +538,7 @@ Returns a :ref:`KinematicCollision3D`, which contain .. rst-class:: classref-method -:ref:`Vector3` **get_platform_angular_velocity** **(** **)** |const| +:ref:`Vector3` **get_platform_angular_velocity**\ (\ ) |const| :ref:`🔗` Returns the angular velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. @@ -548,7 +550,7 @@ Returns the angular velocity of the platform at the last collision point. Only v .. rst-class:: classref-method -:ref:`Vector3` **get_platform_velocity** **(** **)** |const| +:ref:`Vector3` **get_platform_velocity**\ (\ ) |const| :ref:`🔗` Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. @@ -560,7 +562,7 @@ Returns the linear velocity of the platform at the last collision point. Only va .. rst-class:: classref-method -:ref:`Vector3` **get_position_delta** **(** **)** |const| +:ref:`Vector3` **get_position_delta**\ (\ ) |const| :ref:`🔗` Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. @@ -572,7 +574,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` .. rst-class:: classref-method -:ref:`Vector3` **get_real_velocity** **(** **)** |const| +:ref:`Vector3` **get_real_velocity**\ (\ ) |const| :ref:`🔗` Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. @@ -584,7 +586,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision** **(** :ref:`int` slide_idx **)** +:ref:`KinematicCollision3D` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`🔗` Returns a :ref:`KinematicCollision3D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). @@ -596,7 +598,7 @@ Returns a :ref:`KinematicCollision3D`, which contain .. rst-class:: classref-method -:ref:`int` **get_slide_collision_count** **(** **)** |const| +:ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`🔗` Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. @@ -608,9 +610,11 @@ Returns the number of times the body collided and changed direction during the l .. rst-class:: classref-method -:ref:`Vector3` **get_wall_normal** **(** **)** |const| +:ref:`Vector3` **get_wall_normal**\ (\ ) |const| :ref:`🔗` + +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. -Returns the surface normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +\ **Warning:** The collision normal is not always the same as the surface normal. .. rst-class:: classref-item-separator @@ -620,7 +624,7 @@ Returns the surface normal of the wall at the last collision point. Only valid a .. rst-class:: classref-method -:ref:`bool` **is_on_ceiling** **(** **)** |const| +:ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. @@ -632,7 +636,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: .. rst-class:: classref-method -:ref:`bool` **is_on_ceiling_only** **(** **)** |const| +:ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. @@ -644,7 +648,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of .. rst-class:: classref-method -:ref:`bool` **is_on_floor** **(** **)** |const| +:ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. @@ -656,7 +660,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m .. rst-class:: classref-method -:ref:`bool` **is_on_floor_only** **(** **)** |const| +:ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. @@ -668,7 +672,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r .. rst-class:: classref-method -:ref:`bool` **is_on_wall** **(** **)** |const| +:ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. @@ -680,7 +684,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move .. rst-class:: classref-method -:ref:`bool` **is_on_wall_only** **(** **)** |const| +:ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. @@ -692,7 +696,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: .. rst-class:: classref-method -:ref:`bool` **move_and_slide** **(** **)** +:ref:`bool` **move_and_slide**\ (\ ) :ref:`🔗` Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a **CharacterBody3D** or :ref:`RigidBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. @@ -709,3 +713,4 @@ Returns ``true`` if the body collided, otherwise, returns ``false``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index c13d789d91a..25c6eebf6fd 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -38,31 +38,33 @@ Properties .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`elapsed_time` | ``0.0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Dictionary` | :ref:`env` | ``{}`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`RID` | :ref:`font` | ``RID()`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_count` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_flags` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_index` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`outline` | ``false`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2i` | :ref:`range` | ``Vector2i(0, 0)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`relative_index` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`visible` | ``true`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`elapsed_time` | ``0.0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`env` | ``{}`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID` | :ref:`font` | ``RID()`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_count` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_flags` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_index` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`outline` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2i` | :ref:`range` | ``Vector2i(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`relative_index` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -77,12 +79,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_color**\ (\ ) The color the character will be drawn with. @@ -94,12 +96,12 @@ The color the character will be drawn with. .. rst-class:: classref-property -:ref:`float` **elapsed_time** = ``0.0`` +:ref:`float` **elapsed_time** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_elapsed_time** **(** :ref:`float` value **)** -- :ref:`float` **get_elapsed_time** **(** **)** +- |void| **set_elapsed_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_elapsed_time**\ (\ ) The time elapsed since the :ref:`RichTextLabel` was added to the scene tree (in seconds). Time stops when the :ref:`RichTextLabel` is paused (see :ref:`Node.process_mode`). Resets when the text in the :ref:`RichTextLabel` is changed. @@ -113,12 +115,12 @@ The time elapsed since the :ref:`RichTextLabel` was added t .. rst-class:: classref-property -:ref:`Dictionary` **env** = ``{}`` +:ref:`Dictionary` **env** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_environment** **(** :ref:`Dictionary` value **)** -- :ref:`Dictionary` **get_environment** **(** **)** +- |void| **set_environment**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_environment**\ (\ ) Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as :ref:`bool`, :ref:`int` or :ref:`float`, they will be converted automatically. Color codes in the form ``#rrggbb`` or ``#rgb`` will be converted to an opaque :ref:`Color`. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. @@ -136,12 +138,12 @@ For example, the opening BBCode tag ``[example foo=hello bar=true baz=42 color=# .. rst-class:: classref-property -:ref:`RID` **font** = ``RID()`` +:ref:`RID` **font** = ``RID()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_font** **(** :ref:`RID` value **)** -- :ref:`RID` **get_font** **(** **)** +- |void| **set_font**\ (\ value\: :ref:`RID`\ ) +- :ref:`RID` **get_font**\ (\ ) Font resource used to render glyph. @@ -153,12 +155,12 @@ Font resource used to render glyph. .. rst-class:: classref-property -:ref:`int` **glyph_count** = ``0`` +:ref:`int` **glyph_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_glyph_count** **(** :ref:`int` value **)** -- :ref:`int` **get_glyph_count** **(** **)** +- |void| **set_glyph_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_glyph_count**\ (\ ) Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. @@ -170,12 +172,12 @@ Number of glyphs in the grapheme cluster. This value is set in the first glyph o .. rst-class:: classref-property -:ref:`int` **glyph_flags** = ``0`` +:ref:`int` **glyph_flags** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_glyph_flags** **(** :ref:`int` value **)** -- :ref:`int` **get_glyph_flags** **(** **)** +- |void| **set_glyph_flags**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_glyph_flags**\ (\ ) Glyph flags. See :ref:`GraphemeFlag` for more info. Setting this property won't affect drawing. @@ -187,12 +189,12 @@ Glyph flags. See :ref:`GraphemeFlag` for more info .. rst-class:: classref-property -:ref:`int` **glyph_index** = ``0`` +:ref:`int` **glyph_index** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_glyph_index** **(** :ref:`int` value **)** -- :ref:`int` **get_glyph_index** **(** **)** +- |void| **set_glyph_index**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_glyph_index**\ (\ ) Font specific glyph index. @@ -204,12 +206,12 @@ Font specific glyph index. .. rst-class:: classref-property -:ref:`Vector2` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_offset**\ (\ ) The position offset the character will be drawn with (in pixels). @@ -221,12 +223,12 @@ The position offset the character will be drawn with (in pixels). .. rst-class:: classref-property -:ref:`bool` **outline** = ``false`` +:ref:`bool` **outline** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_outline** **(** :ref:`bool` value **)** -- :ref:`bool` **is_outline** **(** **)** +- |void| **set_outline**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_outline**\ (\ ) If ``true``, FX transform is called for outline drawing. Setting this property won't affect drawing. @@ -238,12 +240,12 @@ If ``true``, FX transform is called for outline drawing. Setting this property w .. rst-class:: classref-property -:ref:`Vector2i` **range** = ``Vector2i(0, 0)`` +:ref:`Vector2i` **range** = ``Vector2i(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_range** **(** :ref:`Vector2i` value **)** -- :ref:`Vector2i` **get_range** **(** **)** +- |void| **set_range**\ (\ value\: :ref:`Vector2i`\ ) +- :ref:`Vector2i` **get_range**\ (\ ) Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. @@ -255,12 +257,12 @@ Absolute character range in the string, corresponding to the glyph. Setting this .. rst-class:: classref-property -:ref:`int` **relative_index** = ``0`` +:ref:`int` **relative_index** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_relative_index** **(** :ref:`int` value **)** -- :ref:`int` **get_relative_index** **(** **)** +- |void| **set_relative_index**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_relative_index**\ (\ ) The character offset of the glyph, relative to the current :ref:`RichTextEffect` custom block. Setting this property won't affect drawing. @@ -268,16 +270,33 @@ The character offset of the glyph, relative to the current :ref:`RichTextEffect< ---- +.. _class_CharFXTransform_property_transform: + +.. rst-class:: classref-property + +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_transform**\ (\ value\: :ref:`Transform2D`\ ) +- :ref:`Transform2D` **get_transform**\ (\ ) + +The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects. + +.. rst-class:: classref-item-separator + +---- + .. _class_CharFXTransform_property_visible: .. rst-class:: classref-property -:ref:`bool` **visible** = ``true`` +:ref:`bool` **visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_visibility** **(** :ref:`bool` value **)** -- :ref:`bool` **is_visible** **(** **)** +- |void| **set_visibility**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_visible**\ (\ ) If ``true``, the character will be drawn. If ``false``, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their :ref:`color` to ``Color(1, 1, 1, 0)`` instead. @@ -288,3 +307,4 @@ If ``true``, the character will be drawn. If ``false``, the character will be hi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index fe21e8a17bd..3bae89dfefa 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -47,59 +47,25 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_checked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_unchecked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover_pressed` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_checked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_unchecked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -110,95 +76,11 @@ Theme Properties Theme Property Descriptions --------------------------- -.. _class_CheckBox_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -The **CheckBox** text's font color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -The **CheckBox** text's font color when it's disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -The **CheckBox** text's font color when it's focused. Only replaces the normal text color of the checkbox. Disabled, hovered, and pressed states take precedence over this color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -The **CheckBox** text's font color when it's hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -The **CheckBox** text's font color when it's hovered and pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **CheckBox**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -The **CheckBox** text's font color when it's pressed. - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckBox_theme_constant_check_v_offset: .. rst-class:: classref-themeproperty -:ref:`int` **check_v_offset** = ``0`` +:ref:`int` **check_v_offset** = ``0`` :ref:`🔗` The vertical offset used when rendering the check icons (in pixels). @@ -206,61 +88,11 @@ The vertical offset used when rendering the check icons (in pixels). ---- -.. _class_CheckBox_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -The separation between the check icon and the text (in pixels). Negative values will be treated as ``0`` when used. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -The :ref:`Font` to use for the **CheckBox** text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -Font size of the **CheckBox**'s text. - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckBox_theme_icon_checked: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked** +:ref:`Texture2D` **checked** :ref:`🔗` The check icon to display when the **CheckBox** is checked. @@ -272,7 +104,7 @@ The check icon to display when the **CheckBox** is checked. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked_disabled** +:ref:`Texture2D` **checked_disabled** :ref:`🔗` The check icon to display when the **CheckBox** is checked and is disabled. @@ -284,7 +116,7 @@ The check icon to display when the **CheckBox** is checked and is disabled. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **radio_checked** +:ref:`Texture2D` **radio_checked** :ref:`🔗` The check icon to display when the **CheckBox** is configured as a radio button and is checked. @@ -296,7 +128,7 @@ The check icon to display when the **CheckBox** is configured as a radio button .. rst-class:: classref-themeproperty -:ref:`Texture2D` **radio_checked_disabled** +:ref:`Texture2D` **radio_checked_disabled** :ref:`🔗` The check icon to display when the **CheckBox** is configured as a radio button, is disabled, and is unchecked. @@ -308,7 +140,7 @@ The check icon to display when the **CheckBox** is configured as a radio button, .. rst-class:: classref-themeproperty -:ref:`Texture2D` **radio_unchecked** +:ref:`Texture2D` **radio_unchecked** :ref:`🔗` The check icon to display when the **CheckBox** is configured as a radio button and is unchecked. @@ -320,7 +152,7 @@ The check icon to display when the **CheckBox** is configured as a radio button .. rst-class:: classref-themeproperty -:ref:`Texture2D` **radio_unchecked_disabled** +:ref:`Texture2D` **radio_unchecked_disabled** :ref:`🔗` The check icon to display when the **CheckBox** is configured as a radio button, is disabled, and is unchecked. @@ -332,7 +164,7 @@ The check icon to display when the **CheckBox** is configured as a radio button, .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked** +:ref:`Texture2D` **unchecked** :ref:`🔗` The check icon to display when the **CheckBox** is unchecked. @@ -344,82 +176,10 @@ The check icon to display when the **CheckBox** is unchecked. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked_disabled** +:ref:`Texture2D` **unchecked_disabled** :ref:`🔗` The check icon to display when the **CheckBox** is unchecked and is disabled. -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -The :ref:`StyleBox` to display as a background when the **CheckBox** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -The :ref:`StyleBox` to display as a background when the **CheckBox** is focused. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -The :ref:`StyleBox` to display as a background when the **CheckBox** is hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_hover_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover_pressed** - -The :ref:`StyleBox` to display as a background when the **CheckBox** is hovered and pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -The :ref:`StyleBox` to display as a background. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -The :ref:`StyleBox` to display as a background when the **CheckBox** is pressed. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -427,3 +187,4 @@ The :ref:`StyleBox` to display as a background when the **CheckB .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index ff938ed61b9..2da645a505b 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -45,59 +45,25 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover_pressed` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -108,95 +74,11 @@ Theme Properties Theme Property Descriptions --------------------------- -.. _class_CheckButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -The **CheckButton** text's font color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -The **CheckButton** text's font color when it's disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -The **CheckButton** text's font color when it's focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -The **CheckButton** text's font color when it's hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -The **CheckButton** text's font color when it's hovered and pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **CheckButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -The **CheckButton** text's font color when it's pressed. - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckButton_theme_constant_check_v_offset: .. rst-class:: classref-themeproperty -:ref:`int` **check_v_offset** = ``0`` +:ref:`int` **check_v_offset** = ``0`` :ref:`🔗` The vertical offset used when rendering the toggle icons (in pixels). @@ -204,61 +86,11 @@ The vertical offset used when rendering the toggle icons (in pixels). ---- -.. _class_CheckButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -The separation between the toggle icon and the text (in pixels). Negative values will be treated as ``0`` when used. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -The :ref:`Font` to use for the **CheckButton** text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -Font size of the **CheckButton**'s text. - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckButton_theme_icon_checked: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked** +:ref:`Texture2D` **checked** :ref:`🔗` The icon to display when the **CheckButton** is checked (for left-to-right layouts). @@ -270,7 +102,7 @@ The icon to display when the **CheckButton** is checked (for left-to-right layou .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked_disabled** +:ref:`Texture2D` **checked_disabled** :ref:`🔗` The icon to display when the **CheckButton** is checked and disabled (for left-to-right layouts). @@ -282,7 +114,7 @@ The icon to display when the **CheckButton** is checked and disabled (for left-t .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked_disabled_mirrored** +:ref:`Texture2D` **checked_disabled_mirrored** :ref:`🔗` The icon to display when the **CheckButton** is checked and disabled (for right-to-left layouts). @@ -294,7 +126,7 @@ The icon to display when the **CheckButton** is checked and disabled (for right- .. rst-class:: classref-themeproperty -:ref:`Texture2D` **checked_mirrored** +:ref:`Texture2D` **checked_mirrored** :ref:`🔗` The icon to display when the **CheckButton** is checked (for right-to-left layouts). @@ -306,7 +138,7 @@ The icon to display when the **CheckButton** is checked (for right-to-left layou .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked** +:ref:`Texture2D` **unchecked** :ref:`🔗` The icon to display when the **CheckButton** is unchecked (for left-to-right layouts). @@ -318,7 +150,7 @@ The icon to display when the **CheckButton** is unchecked (for left-to-right lay .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked_disabled** +:ref:`Texture2D` **unchecked_disabled** :ref:`🔗` The icon to display when the **CheckButton** is unchecked and disabled (for left-to-right layouts). @@ -330,7 +162,7 @@ The icon to display when the **CheckButton** is unchecked and disabled (for left .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked_disabled_mirrored** +:ref:`Texture2D` **unchecked_disabled_mirrored** :ref:`🔗` The icon to display when the **CheckButton** is unchecked and disabled (for right-to-left layouts). @@ -342,82 +174,10 @@ The icon to display when the **CheckButton** is unchecked and disabled (for righ .. rst-class:: classref-themeproperty -:ref:`Texture2D` **unchecked_mirrored** +:ref:`Texture2D` **unchecked_mirrored** :ref:`🔗` The icon to display when the **CheckButton** is unchecked (for right-to-left layouts). -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -The :ref:`StyleBox` to display as a background when the **CheckButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -The :ref:`StyleBox` to display as a background when the **CheckButton** is focused. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -The :ref:`StyleBox` to display as a background when the **CheckButton** is hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_hover_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover_pressed** - -The :ref:`StyleBox` to display as a background when the **CheckButton** is hovered and pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -The :ref:`StyleBox` to display as a background. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -The :ref:`StyleBox` to display as a background when the **CheckButton** is pressed. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -425,3 +185,4 @@ The :ref:`StyleBox` to display as a background when the **CheckB .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index 7fb99a52b11..16f52a3f117 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **radius** = ``10.0`` +:ref:`float` **radius** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) The circle's radius. @@ -64,3 +64,4 @@ The circle's radius. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index cad69319776..9c5b481cd22 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -29,53 +29,59 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_instantiate` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_exists` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_enum_constants` **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_enum_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`class_get_integer_constant` **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`class_get_integer_constant_enum` **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`class_get_integer_constant_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`class_get_method_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`class_get_property` **(** :ref:`Object` object, :ref:`StringName` property **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`class_get_property_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`class_get_signal` **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`class_get_signal_list` **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_enum` **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_integer_constant` **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_method` **(** :ref:`StringName` class, :ref:`StringName` method, :ref:`bool` no_inheritance=false **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`class_has_signal` **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`class_set_property` **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_class_list` **(** **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_inheriters_from_class` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_parent_class` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`instantiate` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_class_enabled` **(** :ref:`StringName` class **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_parent_class` **(** :ref:`StringName` class, :ref:`StringName` inherits **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_exists`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_enum_constants`\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_enum_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`class_get_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`class_get_integer_constant_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`class_get_integer_constant_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`class_get_method_argument_count`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_method_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`class_get_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`class_get_property_default_value`\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_property_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`class_get_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`class_get_signal_list`\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_enum`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_integer_constant`\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_method`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`class_has_signal`\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`class_set_property`\ (\ object\: :ref:`Object`, property\: :ref:`StringName`, value\: :ref:`Variant`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_class_list`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_inheriters_from_class`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_parent_class`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_enabled`\ (\ class\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_class_enum_bitfield`\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_parent_class`\ (\ class\: :ref:`StringName`, inherits\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,7 +96,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **can_instantiate** **(** :ref:`StringName` class **)** |const| +:ref:`bool` **can_instantiate**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if objects can be instantiated from the specified ``class``, otherwise returns ``false``. @@ -102,7 +108,7 @@ Returns ``true`` if objects can be instantiated from the specified ``class``, ot .. rst-class:: classref-method -:ref:`bool` **class_exists** **(** :ref:`StringName` class **)** |const| +:ref:`bool` **class_exists**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns whether the specified ``class`` is available or not. @@ -114,7 +120,7 @@ Returns whether the specified ``class`` is available or not. .. rst-class:: classref-method -:ref:`PackedStringArray` **class_get_enum_constants** **(** :ref:`StringName` class, :ref:`StringName` enum, :ref:`bool` no_inheritance=false **)** |const| +:ref:`PackedStringArray` **class_get_enum_constants**\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with all the keys in ``enum`` of ``class`` or its ancestry. @@ -126,7 +132,7 @@ Returns an array with all the keys in ``enum`` of ``class`` or its ancestry. .. rst-class:: classref-method -:ref:`PackedStringArray` **class_get_enum_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +:ref:`PackedStringArray` **class_get_enum_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with all the enums of ``class`` or its ancestry. @@ -138,7 +144,7 @@ Returns an array with all the enums of ``class`` or its ancestry. .. rst-class:: classref-method -:ref:`int` **class_get_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| +:ref:`int` **class_get_integer_constant**\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the value of the integer constant ``name`` of ``class`` or its ancestry. Always returns 0 when the constant could not be found. @@ -150,7 +156,7 @@ Returns the value of the integer constant ``name`` of ``class`` or its ancestry. .. rst-class:: classref-method -:ref:`StringName` **class_get_integer_constant_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| +:ref:`StringName` **class_get_integer_constant_enum**\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns which enum the integer constant ``name`` of ``class`` or its ancestry belongs to. @@ -162,7 +168,7 @@ Returns which enum the integer constant ``name`` of ``class`` or its ancestry be .. rst-class:: classref-method -:ref:`PackedStringArray` **class_get_integer_constant_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +:ref:`PackedStringArray` **class_get_integer_constant_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with the names all the integer constants of ``class`` or its ancestry. @@ -170,11 +176,23 @@ Returns an array with the names all the integer constants of ``class`` or its an ---- +.. _class_ClassDB_method_class_get_method_argument_count: + +.. rst-class:: classref-method + +:ref:`int` **class_get_method_argument_count**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns the number of arguments of the method ``method`` of ``class`` or its ancestry if ``no_inheritance`` is ``false``. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_method_list: .. rst-class:: classref-method -:ref:`Dictionary[]` **class_get_method_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **class_get_method_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with all the methods of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` with the following keys: ``args``, ``default_args``, ``flags``, ``id``, ``name``, ``return: (class_name, hint, hint_string, name, type, usage)``. @@ -188,7 +206,7 @@ Returns an array with all the methods of ``class`` or its ancestry if ``no_inher .. rst-class:: classref-method -:ref:`Variant` **class_get_property** **(** :ref:`Object` object, :ref:`StringName` property **)** |const| +:ref:`Variant` **class_get_property**\ (\ object\: :ref:`Object`, property\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the value of ``property`` of ``object`` or its ancestry. @@ -196,11 +214,23 @@ Returns the value of ``property`` of ``object`` or its ancestry. ---- +.. _class_ClassDB_method_class_get_property_default_value: + +.. rst-class:: classref-method + +:ref:`Variant` **class_get_property_default_value**\ (\ class\: :ref:`StringName`, property\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns the default value of ``property`` of ``class`` or its ancestor classes. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_class_get_property_list: .. rst-class:: classref-method -:ref:`Dictionary[]` **class_get_property_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **class_get_property_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with all the properties of ``class`` or its ancestry if ``no_inheritance`` is ``false``. @@ -212,7 +242,7 @@ Returns an array with all the properties of ``class`` or its ancestry if ``no_in .. rst-class:: classref-method -:ref:`Dictionary` **class_get_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| +:ref:`Dictionary` **class_get_signal**\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the ``signal`` data of ``class`` or its ancestry. The returned value is a :ref:`Dictionary` with the following keys: ``args``, ``default_args``, ``flags``, ``id``, ``name``, ``return: (class_name, hint, hint_string, name, type, usage)``. @@ -224,7 +254,7 @@ Returns the ``signal`` data of ``class`` or its ancestry. The returned value is .. rst-class:: classref-method -:ref:`Dictionary[]` **class_get_signal_list** **(** :ref:`StringName` class, :ref:`bool` no_inheritance=false **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **class_get_signal_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. @@ -236,7 +266,7 @@ Returns an array with all the signals of ``class`` or its ancestry if ``no_inher .. rst-class:: classref-method -:ref:`bool` **class_has_enum** **(** :ref:`StringName` class, :ref:`StringName` name, :ref:`bool` no_inheritance=false **)** |const| +:ref:`bool` **class_has_enum**\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns whether ``class`` or its ancestry has an enum called ``name`` or not. @@ -248,7 +278,7 @@ Returns whether ``class`` or its ancestry has an enum called ``name`` or not. .. rst-class:: classref-method -:ref:`bool` **class_has_integer_constant** **(** :ref:`StringName` class, :ref:`StringName` name **)** |const| +:ref:`bool` **class_has_integer_constant**\ (\ class\: :ref:`StringName`, name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns whether ``class`` or its ancestry has an integer constant called ``name`` or not. @@ -260,7 +290,7 @@ Returns whether ``class`` or its ancestry has an integer constant called ``name` .. rst-class:: classref-method -:ref:`bool` **class_has_method** **(** :ref:`StringName` class, :ref:`StringName` method, :ref:`bool` no_inheritance=false **)** |const| +:ref:`bool` **class_has_method**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns whether ``class`` (or its ancestry if ``no_inheritance`` is ``false``) has a method called ``method`` or not. @@ -272,7 +302,7 @@ Returns whether ``class`` (or its ancestry if ``no_inheritance`` is ``false``) h .. rst-class:: classref-method -:ref:`bool` **class_has_signal** **(** :ref:`StringName` class, :ref:`StringName` signal **)** |const| +:ref:`bool` **class_has_signal**\ (\ class\: :ref:`StringName`, signal\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns whether ``class`` or its ancestry has a signal called ``signal`` or not. @@ -284,7 +314,7 @@ Returns whether ``class`` or its ancestry has a signal called ``signal`` or not. .. rst-class:: classref-method -:ref:`Error` **class_set_property** **(** :ref:`Object` object, :ref:`StringName` property, :ref:`Variant` value **)** |const| +:ref:`Error` **class_set_property**\ (\ object\: :ref:`Object`, property\: :ref:`StringName`, value\: :ref:`Variant`\ ) |const| :ref:`🔗` Sets ``property`` value of ``object`` to ``value``. @@ -296,7 +326,7 @@ Sets ``property`` value of ``object`` to ``value``. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_class_list** **(** **)** |const| +:ref:`PackedStringArray` **get_class_list**\ (\ ) |const| :ref:`🔗` Returns the names of all the classes available. @@ -308,7 +338,7 @@ Returns the names of all the classes available. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_inheriters_from_class** **(** :ref:`StringName` class **)** |const| +:ref:`PackedStringArray` **get_inheriters_from_class**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the names of all the classes that directly or indirectly inherit from ``class``. @@ -320,7 +350,7 @@ Returns the names of all the classes that directly or indirectly inherit from `` .. rst-class:: classref-method -:ref:`StringName` **get_parent_class** **(** :ref:`StringName` class **)** |const| +:ref:`StringName` **get_parent_class**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the parent class of ``class``. @@ -332,7 +362,7 @@ Returns the parent class of ``class``. .. rst-class:: classref-method -:ref:`Variant` **instantiate** **(** :ref:`StringName` class **)** |const| +:ref:`Variant` **instantiate**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Creates an instance of ``class``. @@ -344,7 +374,7 @@ Creates an instance of ``class``. .. rst-class:: classref-method -:ref:`bool` **is_class_enabled** **(** :ref:`StringName` class **)** |const| +:ref:`bool` **is_class_enabled**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns whether this ``class`` is enabled or not. @@ -352,11 +382,23 @@ Returns whether this ``class`` is enabled or not. ---- +.. _class_ClassDB_method_is_class_enum_bitfield: + +.. rst-class:: classref-method + +:ref:`bool` **is_class_enum_bitfield**\ (\ class\: :ref:`StringName`, enum\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns whether ``class`` (or its ancestor classes if ``no_inheritance`` is ``false``) has an enum called ``enum`` that is a bitfield. + +.. rst-class:: classref-item-separator + +---- + .. _class_ClassDB_method_is_parent_class: .. rst-class:: classref-method -:ref:`bool` **is_parent_class** **(** :ref:`StringName` class, :ref:`StringName` inherits **)** |const| +:ref:`bool` **is_parent_class**\ (\ class\: :ref:`StringName`, inherits\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns whether ``inherits`` is an ancestor of ``class`` or not. @@ -367,3 +409,4 @@ Returns whether ``inherits`` is an ancestor of ``class`` or not. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 6a4c1502aff..5cfb6a2dc7a 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -31,51 +31,51 @@ Properties .. table:: :widths: auto - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`auto_brace_completion_enabled` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`auto_brace_completion_highlight_matching` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`auto_brace_completion_pairs` | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`code_completion_enabled` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`code_completion_prefixes` | ``[]`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`delimiter_comments` | ``[]`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`delimiter_strings` | ``["' '", "\" \""]`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_draw_bookmarks` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_draw_breakpoints_gutter` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_draw_executing_lines` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_draw_fold_gutter` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_draw_line_numbers` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`gutters_zero_pad_line_numbers` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`indent_automatic` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`indent_automatic_prefixes` | ``[":", "{", "[", "("]`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int` | :ref:`indent_size` | ``4`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`indent_use_spaces` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`LayoutDirection` | layout_direction | ``2`` (overrides :ref:`Control`) | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`line_folding` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int[]` | :ref:`line_length_guidelines` | ``[]`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`symbol_lookup_on_click` | ``false`` | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`TextDirection` | text_direction | ``1`` (overrides :ref:`TextEdit`) | - +------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_brace_completion_enabled` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_brace_completion_highlight_matching` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`auto_brace_completion_pairs` | ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`code_completion_enabled` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`code_completion_prefixes` | ``[]`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`delimiter_comments` | ``[]`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`delimiter_strings` | ``["' '", "\" \""]`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_draw_bookmarks` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_draw_breakpoints_gutter` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_draw_executing_lines` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_draw_fold_gutter` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_draw_line_numbers` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gutters_zero_pad_line_numbers` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`indent_automatic` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`String`\] | :ref:`indent_automatic_prefixes` | ``[":", "{", "[", "("]`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`int` | :ref:`indent_size` | ``4`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`indent_use_spaces` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | layout_direction | ``2`` (overrides :ref:`Control`) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`line_folding` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`int`\] | :ref:`line_length_guidelines` | ``[]`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`symbol_lookup_on_click` | ``false`` | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`TextDirection` | text_direction | ``1`` (overrides :ref:`TextEdit`) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -85,125 +85,151 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_code_completion_option` **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0, :ref:`int` location=1024 **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_comment_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_string_delimiter` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_fold_line` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cancel_code_completion` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_bookmarked_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_breakpointed_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_comment_delimiters` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_executing_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_string_delimiters` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`confirm_code_completion` **(** :ref:`bool` replace=false **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`convert_indent` **(** :ref:`int` from_line=-1, :ref:`int` to_line=-1 **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`do_indent` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fold_all_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fold_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_auto_brace_completion_close_key` **(** :ref:`String` open_key **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_code_completion_option` **(** :ref:`int` index **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_code_completion_options` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_code_completion_selected_index` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_delimiter_end_key` **(** :ref:`int` delimiter_index **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_delimiter_end_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_delimiter_start_key` **(** :ref:`int` delimiter_index **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_delimiter_start_position` **(** :ref:`int` line, :ref:`int` column **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_executing_lines` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int[]` | :ref:`get_folded_lines` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_text_for_code_completion` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_text_for_symbol_lookup` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_auto_brace_completion_close_key` **(** :ref:`String` close_key **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_auto_brace_completion_open_key` **(** :ref:`String` open_key **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_comment_delimiter` **(** :ref:`String` start_key **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_string_delimiter` **(** :ref:`String` start_key **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`indent_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`is_in_comment` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`is_in_string` **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_bookmarked` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_breakpointed` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_executing` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_line_folded` **(** :ref:`int` line **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_comment_delimiter` **(** :ref:`String` start_key **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_string_delimiter` **(** :ref:`String` start_key **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_code_completion` **(** :ref:`bool` force=false **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_completion_selected_index` **(** :ref:`int` index **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_hint` **(** :ref:`String` code_hint **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_code_hint_draw_below` **(** :ref:`bool` draw_below **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_bookmarked` **(** :ref:`int` line, :ref:`bool` bookmarked **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_breakpoint` **(** :ref:`int` line, :ref:`bool` breakpointed **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_executing` **(** :ref:`int` line, :ref:`bool` executing **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_symbol_lookup_word_as_valid` **(** :ref:`bool` valid **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`toggle_foldable_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unfold_all_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unfold_line` **(** :ref:`int` line **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unindent_lines` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_code_completion_options` **(** :ref:`bool` force **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_confirm_code_completion`\ (\ replace\: :ref:`bool`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_filter_code_completion_candidates`\ (\ candidates\: :ref:`Array`\[:ref:`Dictionary`\]\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_request_code_completion`\ (\ force\: :ref:`bool`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_auto_brace_completion_pair`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_code_completion_option`\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_comment_delimiter`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_string_delimiter`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_fold_line`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_code_completion`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bookmarked_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_breakpointed_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_comment_delimiters`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_executing_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_string_delimiters`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`confirm_code_completion`\ (\ replace\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert_indent`\ (\ from_line\: :ref:`int` = -1, to_line\: :ref:`int` = -1\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_code_region`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`do_indent`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`duplicate_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`duplicate_selection`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fold_all_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fold_line`\ (\ line\: :ref:`int`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_auto_brace_completion_close_key`\ (\ open_key\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_bookmarked_lines`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_breakpointed_lines`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_code_completion_option`\ (\ index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_code_completion_options`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_code_completion_selected_index`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_code_region_end_tag`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_code_region_start_tag`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_delimiter_end_key`\ (\ delimiter_index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_delimiter_end_position`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_delimiter_start_key`\ (\ delimiter_index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_delimiter_start_position`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_executing_lines`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`int`\] | :ref:`get_folded_lines`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text_for_code_completion`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text_for_symbol_lookup`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_text_with_cursor_char`\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_auto_brace_completion_close_key`\ (\ close_key\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_auto_brace_completion_open_key`\ (\ open_key\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_comment_delimiter`\ (\ start_key\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_string_delimiter`\ (\ start_key\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`indent_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`is_in_comment`\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`is_in_string`\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_bookmarked`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_breakpointed`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_code_region_end`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_code_region_start`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_executing`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_line_folded`\ (\ line\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_lines_down`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_lines_up`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_comment_delimiter`\ (\ start_key\: :ref:`String`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_string_delimiter`\ (\ start_key\: :ref:`String`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_code_completion`\ (\ force\: :ref:`bool` = false\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_code_completion_selected_index`\ (\ index\: :ref:`int`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_code_hint`\ (\ code_hint\: :ref:`String`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_code_hint_draw_below`\ (\ draw_below\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_code_region_tags`\ (\ start\: :ref:`String` = "region", end\: :ref:`String` = "endregion"\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_bookmarked`\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_breakpoint`\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_executing`\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_symbol_lookup_word_as_valid`\ (\ valid\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`toggle_foldable_line`\ (\ line\: :ref:`int`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`toggle_foldable_lines_at_carets`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unfold_all_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unfold_line`\ (\ line\: :ref:`int`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unindent_lines`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_code_completion_options`\ (\ force\: :ref:`bool`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -213,97 +239,57 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 0)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`bookmark_color` | ``Color(0.5, 0.64, 1, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`brace_mismatch_color` | ``Color(1, 0.2, 0.2, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`breakpoint_color` | ``Color(0.9, 0.29, 0.3, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`caret_background_color` | ``Color(0, 0, 0, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`caret_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`code_folding_color` | ``Color(0.8, 0.8, 0.8, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_background_color` | ``Color(0.17, 0.16, 0.2, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_existing_color` | ``Color(0.87, 0.87, 0.87, 0.13)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_font_color` | ``Color(0.67, 0.67, 0.67, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_scroll_color` | ``Color(1, 1, 1, 0.29)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_scroll_hovered_color` | ``Color(1, 1, 1, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_selected_color` | ``Color(0.26, 0.26, 0.27, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`current_line_color` | ``Color(0.25, 0.25, 0.26, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`executing_line_color` | ``Color(0.98, 0.89, 0.27, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_placeholder_color` | ``Color(0.875, 0.875, 0.875, 0.6)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_readonly_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_selected_color` | ``Color(0, 0, 0, 0)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`line_length_guideline_color` | ``Color(0.3, 0.5, 0.8, 0.1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`line_number_color` | ``Color(0.67, 0.67, 0.67, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`search_result_border_color` | ``Color(0.3, 0.3, 0.3, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`search_result_color` | ``Color(0.3, 0.3, 0.3, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`selection_color` | ``Color(0.5, 0.5, 0.5, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`word_highlighted_color` | ``Color(0.8, 0.9, 0.9, 0.15)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_lines` | ``7`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_max_width` | ``50`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_scroll_width` | ``6`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`line_spacing` | ``4`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`bookmark` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`breakpoint` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`can_fold` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`executing_line` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`folded` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`folded_eol_icon` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`space` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`tab` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`completion` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`read_only` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`bookmark_color` | ``Color(0.5, 0.64, 1, 0.8)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`brace_mismatch_color` | ``Color(1, 0.2, 0.2, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`breakpoint_color` | ``Color(0.9, 0.29, 0.3, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`code_folding_color` | ``Color(0.8, 0.8, 0.8, 0.8)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_background_color` | ``Color(0.17, 0.16, 0.2, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_existing_color` | ``Color(0.87, 0.87, 0.87, 0.13)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_scroll_color` | ``Color(1, 1, 1, 0.29)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_scroll_hovered_color` | ``Color(1, 1, 1, 0.4)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_selected_color` | ``Color(0.26, 0.26, 0.27, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`executing_line_color` | ``Color(0.98, 0.89, 0.27, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`folded_code_region_color` | ``Color(0.68, 0.46, 0.77, 0.2)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`line_length_guideline_color` | ``Color(0.3, 0.5, 0.8, 0.1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`line_number_color` | ``Color(0.67, 0.67, 0.67, 0.4)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_lines` | ``7`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_max_width` | ``50`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_scroll_width` | ``6`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`bookmark` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`breakpoint` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`can_fold` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`can_fold_code_region` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`executing_line` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded_code_region` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded_eol_icon` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`completion` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -318,7 +304,7 @@ Signals .. rst-class:: classref-signal -**breakpoint_toggled** **(** :ref:`int` line **)** +**breakpoint_toggled**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. @@ -330,7 +316,7 @@ Emitted when a breakpoint is added or removed from a line. If the line is moved .. rst-class:: classref-signal -**code_completion_requested** **(** **)** +**code_completion_requested**\ (\ ) :ref:`🔗` Emitted when the user requests code completion. @@ -342,7 +328,7 @@ Emitted when the user requests code completion. .. rst-class:: classref-signal -**symbol_lookup** **(** :ref:`String` symbol, :ref:`int` line, :ref:`int` column **)** +**symbol_lookup**\ (\ symbol\: :ref:`String`, line\: :ref:`int`, column\: :ref:`int`\ ) :ref:`🔗` Emitted when the user has clicked on a valid symbol. @@ -354,7 +340,7 @@ Emitted when the user has clicked on a valid symbol. .. rst-class:: classref-signal -**symbol_validate** **(** :ref:`String` symbol **)** +**symbol_validate**\ (\ symbol\: :ref:`String`\ ) :ref:`🔗` Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid`. @@ -371,7 +357,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CodeCompletionKind**: +enum **CodeCompletionKind**: :ref:`🔗` .. _class_CodeEdit_constant_KIND_CLASS: @@ -461,7 +447,7 @@ Marks the option as unclassified or plain text. .. rst-class:: classref-enumeration -enum **CodeCompletionLocation**: +enum **CodeCompletionLocation**: :ref:`🔗` .. _class_CodeEdit_constant_LOCATION_LOCAL: @@ -477,7 +463,7 @@ The option is local to the location of the code completion query - e.g. a local :ref:`CodeCompletionLocation` **LOCATION_PARENT_MASK** = ``256`` -The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. +The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. ``0`` for the local class, ``1`` for the parent, ``2`` for the grandparent, etc.) to store the depth of an option in the class or a parent class. .. _class_CodeEdit_constant_LOCATION_OTHER_USER_CODE: @@ -508,12 +494,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **auto_brace_completion_enabled** = ``false`` +:ref:`bool` **auto_brace_completion_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_brace_completion_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_auto_brace_completion_enabled** **(** **)** +- |void| **set_auto_brace_completion_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_brace_completion_enabled**\ (\ ) Sets whether brace pairs should be autocompleted. @@ -525,12 +511,12 @@ Sets whether brace pairs should be autocompleted. .. rst-class:: classref-property -:ref:`bool` **auto_brace_completion_highlight_matching** = ``false`` +:ref:`bool` **auto_brace_completion_highlight_matching** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_highlight_matching_braces_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_highlight_matching_braces_enabled** **(** **)** +- |void| **set_highlight_matching_braces_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_highlight_matching_braces_enabled**\ (\ ) Highlight mismatching brace pairs. @@ -542,12 +528,12 @@ Highlight mismatching brace pairs. .. rst-class:: classref-property -:ref:`Dictionary` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` +:ref:`Dictionary` **auto_brace_completion_pairs** = ``{ "\"": "\"", "'": "'", "(": ")", "[": "]", "{": "}" }`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_brace_completion_pairs** **(** :ref:`Dictionary` value **)** -- :ref:`Dictionary` **get_auto_brace_completion_pairs** **(** **)** +- |void| **set_auto_brace_completion_pairs**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_auto_brace_completion_pairs**\ (\ ) Sets the brace pairs to be autocompleted. @@ -559,12 +545,12 @@ Sets the brace pairs to be autocompleted. .. rst-class:: classref-property -:ref:`bool` **code_completion_enabled** = ``false`` +:ref:`bool` **code_completion_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_code_completion_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_code_completion_enabled** **(** **)** +- |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_code_completion_enabled**\ (\ ) Sets whether code completion is allowed. @@ -576,12 +562,12 @@ Sets whether code completion is allowed. .. rst-class:: classref-property -:ref:`String[]` **code_completion_prefixes** = ``[]`` +:ref:`Array`\[:ref:`String`\] **code_completion_prefixes** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_code_completion_prefixes** **(** :ref:`String[]` value **)** -- :ref:`String[]` **get_code_completion_prefixes** **(** **)** +- |void| **set_code_completion_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) +- :ref:`Array`\[:ref:`String`\] **get_code_completion_prefixes**\ (\ ) Sets prefixes that will trigger code completion. @@ -593,12 +579,12 @@ Sets prefixes that will trigger code completion. .. rst-class:: classref-property -:ref:`String[]` **delimiter_comments** = ``[]`` +:ref:`Array`\[:ref:`String`\] **delimiter_comments** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_comment_delimiters** **(** :ref:`String[]` value **)** -- :ref:`String[]` **get_comment_delimiters** **(** **)** +- |void| **set_comment_delimiters**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) +- :ref:`Array`\[:ref:`String`\] **get_comment_delimiters**\ (\ ) Sets the comment delimiters. All existing comment delimiters will be removed. @@ -610,12 +596,12 @@ Sets the comment delimiters. All existing comment delimiters will be removed. .. rst-class:: classref-property -:ref:`String[]` **delimiter_strings** = ``["' '", "\" \""]`` +:ref:`Array`\[:ref:`String`\] **delimiter_strings** = ``["' '", "\" \""]`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_string_delimiters** **(** :ref:`String[]` value **)** -- :ref:`String[]` **get_string_delimiters** **(** **)** +- |void| **set_string_delimiters**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) +- :ref:`Array`\[:ref:`String`\] **get_string_delimiters**\ (\ ) Sets the string delimiters. All existing string delimiters will be removed. @@ -627,12 +613,12 @@ Sets the string delimiters. All existing string delimiters will be removed. .. rst-class:: classref-property -:ref:`bool` **gutters_draw_bookmarks** = ``false`` +:ref:`bool` **gutters_draw_bookmarks** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_bookmarks_gutter** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drawing_bookmarks_gutter** **(** **)** +- |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. @@ -644,12 +630,12 @@ Sets if bookmarked should be drawn in the gutter. This gutter is shared with bre .. rst-class:: classref-property -:ref:`bool` **gutters_draw_breakpoints_gutter** = ``false`` +:ref:`bool` **gutters_draw_breakpoints_gutter** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_breakpoints_gutter** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drawing_breakpoints_gutter** **(** **)** +- |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. @@ -661,12 +647,12 @@ Sets if breakpoints should be drawn in the gutter. This gutter is shared with bo .. rst-class:: classref-property -:ref:`bool` **gutters_draw_executing_lines** = ``false`` +:ref:`bool` **gutters_draw_executing_lines** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_executing_lines_gutter** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drawing_executing_lines_gutter** **(** **)** +- |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. @@ -678,12 +664,12 @@ Sets if executing lines should be marked in the gutter. This gutter is shared wi .. rst-class:: classref-property -:ref:`bool` **gutters_draw_fold_gutter** = ``false`` +:ref:`bool` **gutters_draw_fold_gutter** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_fold_gutter** **(** :ref:`bool` value **)** -- :ref:`bool` **is_drawing_fold_gutter** **(** **)** +- |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_drawing_fold_gutter**\ (\ ) Sets if foldable lines icons should be drawn in the gutter. @@ -695,12 +681,12 @@ Sets if foldable lines icons should be drawn in the gutter. .. rst-class:: classref-property -:ref:`bool` **gutters_draw_line_numbers** = ``false`` +:ref:`bool` **gutters_draw_line_numbers** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_line_numbers** **(** :ref:`bool` value **)** -- :ref:`bool` **is_draw_line_numbers_enabled** **(** **)** +- |void| **set_draw_line_numbers**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_draw_line_numbers_enabled**\ (\ ) Sets if line numbers should be drawn in the gutter. @@ -712,12 +698,12 @@ Sets if line numbers should be drawn in the gutter. .. rst-class:: classref-property -:ref:`bool` **gutters_zero_pad_line_numbers** = ``false`` +:ref:`bool` **gutters_zero_pad_line_numbers** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_line_numbers_zero_padded** **(** :ref:`bool` value **)** -- :ref:`bool` **is_line_numbers_zero_padded** **(** **)** +- |void| **set_line_numbers_zero_padded**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_line_numbers_zero_padded**\ (\ ) Sets if line numbers drawn in the gutter are zero padded. @@ -729,12 +715,12 @@ Sets if line numbers drawn in the gutter are zero padded. .. rst-class:: classref-property -:ref:`bool` **indent_automatic** = ``false`` +:ref:`bool` **indent_automatic** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_indent_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_auto_indent_enabled** **(** **)** +- |void| **set_auto_indent_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_indent_enabled**\ (\ ) Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. @@ -746,12 +732,12 @@ Sets whether automatic indent are enabled, this will add an extra indent if a pr .. rst-class:: classref-property -:ref:`String[]` **indent_automatic_prefixes** = ``[":", "{", "[", "("]`` +:ref:`Array`\[:ref:`String`\] **indent_automatic_prefixes** = ``[":", "{", "[", "("]`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_indent_prefixes** **(** :ref:`String[]` value **)** -- :ref:`String[]` **get_auto_indent_prefixes** **(** **)** +- |void| **set_auto_indent_prefixes**\ (\ value\: :ref:`Array`\[:ref:`String`\]\ ) +- :ref:`Array`\[:ref:`String`\] **get_auto_indent_prefixes**\ (\ ) Prefixes to trigger an automatic indent. @@ -763,14 +749,14 @@ Prefixes to trigger an automatic indent. .. rst-class:: classref-property -:ref:`int` **indent_size** = ``4`` +:ref:`int` **indent_size** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_indent_size** **(** :ref:`int` value **)** -- :ref:`int` **get_indent_size** **(** **)** +- |void| **set_indent_size**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_indent_size**\ (\ ) -Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use. +Size of the tabulation indent (one :kbd:`Tab` press) in characters. If :ref:`indent_use_spaces` is enabled the number of spaces to use. .. rst-class:: classref-item-separator @@ -780,12 +766,12 @@ Size of tabs, if ``indent_use_spaces`` is enabled the number of spaces to use. .. rst-class:: classref-property -:ref:`bool` **indent_use_spaces** = ``false`` +:ref:`bool` **indent_use_spaces** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_indent_using_spaces** **(** :ref:`bool` value **)** -- :ref:`bool` **is_indent_using_spaces** **(** **)** +- |void| **set_indent_using_spaces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_indent_using_spaces**\ (\ ) Use spaces instead of tabs for indentation. @@ -797,12 +783,12 @@ Use spaces instead of tabs for indentation. .. rst-class:: classref-property -:ref:`bool` **line_folding** = ``false`` +:ref:`bool` **line_folding** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_line_folding_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_line_folding_enabled** **(** **)** +- |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_line_folding_enabled**\ (\ ) Sets whether line folding is allowed. @@ -814,12 +800,12 @@ Sets whether line folding is allowed. .. rst-class:: classref-property -:ref:`int[]` **line_length_guidelines** = ``[]`` +:ref:`Array`\[:ref:`int`\] **line_length_guidelines** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_line_length_guidelines** **(** :ref:`int[]` value **)** -- :ref:`int[]` **get_line_length_guidelines** **(** **)** +- |void| **set_line_length_guidelines**\ (\ value\: :ref:`Array`\[:ref:`int`\]\ ) +- :ref:`Array`\[:ref:`int`\] **get_line_length_guidelines**\ (\ ) Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. @@ -831,12 +817,12 @@ Draws vertical lines at the provided columns. The first entry is considered a ma .. rst-class:: classref-property -:ref:`bool` **symbol_lookup_on_click** = ``false`` +:ref:`bool` **symbol_lookup_on_click** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_symbol_lookup_on_click_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_symbol_lookup_on_click_enabled** **(** **)** +- |void| **set_symbol_lookup_on_click_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_symbol_lookup_on_click_enabled**\ (\ ) Set when a validated word from :ref:`symbol_validate` is clicked, the :ref:`symbol_lookup` should be emitted. @@ -849,23 +835,23 @@ Set when a validated word from :ref:`symbol_validate` replace **)** |virtual| +|void| **_confirm_code_completion**\ (\ replace\: :ref:`bool`\ ) |virtual| :ref:`🔗` -Override this method to define how the selected entry should be inserted. If ``replace`` is true, any existing text should be replaced. +Override this method to define how the selected entry should be inserted. If ``replace`` is ``true``, any existing text should be replaced. .. rst-class:: classref-item-separator ---- -.. _class_CodeEdit_method__filter_code_completion_candidates: +.. _class_CodeEdit_private_method__filter_code_completion_candidates: .. rst-class:: classref-method -:ref:`Dictionary[]` **_filter_code_completion_candidates** **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| +:ref:`Array`\[:ref:`Dictionary`\] **_filter_code_completion_candidates**\ (\ candidates\: :ref:`Array`\[:ref:`Dictionary`\]\ ) |virtual| |const| :ref:`🔗` Override this method to define what items in ``candidates`` should be displayed. @@ -875,13 +861,13 @@ Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dicti ---- -.. _class_CodeEdit_method__request_code_completion: +.. _class_CodeEdit_private_method__request_code_completion: .. rst-class:: classref-method -void **_request_code_completion** **(** :ref:`bool` force **)** |virtual| +|void| **_request_code_completion**\ (\ force\: :ref:`bool`\ ) |virtual| :ref:`🔗` -Override this method to define what happens when the user requests code completion. If ``force`` is true, any checks should be bypassed. +Override this method to define what happens when the user requests code completion. If ``force`` is ``true``, any checks should be bypassed. .. rst-class:: classref-item-separator @@ -891,7 +877,7 @@ Override this method to define what happens when the user requests code completi .. rst-class:: classref-method -void **add_auto_brace_completion_pair** **(** :ref:`String` start_key, :ref:`String` end_key **)** +|void| **add_auto_brace_completion_pair**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`\ ) :ref:`🔗` Adds a brace pair. @@ -905,7 +891,7 @@ Both the start and end keys must be symbols. Only the start key has to be unique .. rst-class:: classref-method -void **add_code_completion_option** **(** :ref:`CodeCompletionKind` type, :ref:`String` display_text, :ref:`String` insert_text, :ref:`Color` text_color=Color(1, 1, 1, 1), :ref:`Resource` icon=null, :ref:`Variant` value=0, :ref:`int` location=1024 **)** +|void| **add_code_completion_option**\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) :ref:`🔗` Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options` to update the list. @@ -921,13 +907,11 @@ Submits an item to the queue of potential candidates for the autocomplete menu. .. rst-class:: classref-method -void **add_comment_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** +|void| **add_comment_delimiter**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) :ref:`🔗` -Adds a comment delimiter. +Adds a comment delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters. -Both the start and end keys must be symbols. Only the start key has to be unique. - -\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``. +If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String`, the region does not carry over to the next line. .. rst-class:: classref-item-separator @@ -937,13 +921,11 @@ Both the start and end keys must be symbols. Only the start key has to be unique .. rst-class:: classref-method -void **add_string_delimiter** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`bool` line_only=false **)** +|void| **add_string_delimiter**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, line_only\: :ref:`bool` = false\ ) :ref:`🔗` -Adds a string delimiter. +Defines a string delimiter from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters. -Both the start and end keys must be symbols. Only the start key has to be unique. - -\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``. +If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String`, the region does not carry over to the next line. .. rst-class:: classref-item-separator @@ -953,7 +935,7 @@ Both the start and end keys must be symbols. Only the start key has to be unique .. rst-class:: classref-method -:ref:`bool` **can_fold_line** **(** :ref:`int` line **)** |const| +:ref:`bool` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. @@ -965,7 +947,7 @@ Returns if the given line is foldable, that is, it has indented lines right belo .. rst-class:: classref-method -void **cancel_code_completion** **(** **)** +|void| **cancel_code_completion**\ (\ ) :ref:`🔗` Cancels the autocomplete menu. @@ -977,7 +959,7 @@ Cancels the autocomplete menu. .. rst-class:: classref-method -void **clear_bookmarked_lines** **(** **)** +|void| **clear_bookmarked_lines**\ (\ ) :ref:`🔗` Clears all bookmarked lines. @@ -989,7 +971,7 @@ Clears all bookmarked lines. .. rst-class:: classref-method -void **clear_breakpointed_lines** **(** **)** +|void| **clear_breakpointed_lines**\ (\ ) :ref:`🔗` Clears all breakpointed lines. @@ -1001,7 +983,7 @@ Clears all breakpointed lines. .. rst-class:: classref-method -void **clear_comment_delimiters** **(** **)** +|void| **clear_comment_delimiters**\ (\ ) :ref:`🔗` Removes all comment delimiters. @@ -1013,7 +995,7 @@ Removes all comment delimiters. .. rst-class:: classref-method -void **clear_executing_lines** **(** **)** +|void| **clear_executing_lines**\ (\ ) :ref:`🔗` Clears all executed lines. @@ -1025,7 +1007,7 @@ Clears all executed lines. .. rst-class:: classref-method -void **clear_string_delimiters** **(** **)** +|void| **clear_string_delimiters**\ (\ ) :ref:`🔗` Removes all string delimiters. @@ -1037,9 +1019,9 @@ Removes all string delimiters. .. rst-class:: classref-method -void **confirm_code_completion** **(** :ref:`bool` replace=false **)** +|void| **confirm_code_completion**\ (\ replace\: :ref:`bool` = false\ ) :ref:`🔗` -Inserts the selected entry into the text. If ``replace`` is true, any existing text is replaced rather then merged. +Inserts the selected entry into the text. If ``replace`` is ``true``, any existing text is replaced rather than merged. .. rst-class:: classref-item-separator @@ -1049,7 +1031,7 @@ Inserts the selected entry into the text. If ``replace`` is true, any existing t .. rst-class:: classref-method -void **convert_indent** **(** :ref:`int` from_line=-1, :ref:`int` to_line=-1 **)** +|void| **convert_indent**\ (\ from_line\: :ref:`int` = -1, to_line\: :ref:`int` = -1\ ) :ref:`🔗` Converts the indents of lines between ``from_line`` and ``to_line`` to tabs or spaces as set by :ref:`indent_use_spaces`. @@ -1059,11 +1041,41 @@ Values of ``-1`` convert the entire text. ---- +.. _class_CodeEdit_method_create_code_region: + +.. rst-class:: classref-method + +|void| **create_code_region**\ (\ ) :ref:`🔗` + +Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter`). + +A code region is a part of code that is highlighted when folded and can help organize your script. + +Code region start and end tags can be customized (see :ref:`set_code_region_tags`). + +Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``) + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_method_delete_lines: + +.. rst-class:: classref-method + +|void| **delete_lines**\ (\ ) :ref:`🔗` + +Deletes all lines that are selected or have a caret on them. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_do_indent: .. rst-class:: classref-method -void **do_indent** **(** **)** +|void| **do_indent**\ (\ ) :ref:`🔗` Perform an indent as if the user activated the "ui_text_indent" action. @@ -1071,11 +1083,35 @@ Perform an indent as if the user activated the "ui_text_indent" action. ---- +.. _class_CodeEdit_method_duplicate_lines: + +.. rst-class:: classref-method + +|void| **duplicate_lines**\ (\ ) :ref:`🔗` + +Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_method_duplicate_selection: + +.. rst-class:: classref-method + +|void| **duplicate_selection**\ (\ ) :ref:`🔗` + +Duplicates all selected text and duplicates all lines with a caret on them. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_fold_all_lines: .. rst-class:: classref-method -void **fold_all_lines** **(** **)** +|void| **fold_all_lines**\ (\ ) :ref:`🔗` Folds all lines that are possible to be folded (see :ref:`can_fold_line`). @@ -1087,7 +1123,7 @@ Folds all lines that are possible to be folded (see :ref:`can_fold_line` line **)** +|void| **fold_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Folds the given line, if possible (see :ref:`can_fold_line`). @@ -1099,7 +1135,7 @@ Folds the given line, if possible (see :ref:`can_fold_line` **get_auto_brace_completion_close_key** **(** :ref:`String` open_key **)** |const| +:ref:`String` **get_auto_brace_completion_close_key**\ (\ open_key\: :ref:`String`\ ) |const| :ref:`🔗` Gets the matching auto brace close key for ``open_key``. @@ -1111,7 +1147,7 @@ Gets the matching auto brace close key for ``open_key``. .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_bookmarked_lines** **(** **)** |const| +:ref:`PackedInt32Array` **get_bookmarked_lines**\ (\ ) |const| :ref:`🔗` Gets all bookmarked lines. @@ -1123,7 +1159,7 @@ Gets all bookmarked lines. .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_breakpointed_lines** **(** **)** |const| +:ref:`PackedInt32Array` **get_breakpointed_lines**\ (\ ) |const| :ref:`🔗` Gets all breakpointed lines. @@ -1135,7 +1171,7 @@ Gets all breakpointed lines. .. rst-class:: classref-method -:ref:`Dictionary` **get_code_completion_option** **(** :ref:`int` index **)** |const| +:ref:`Dictionary` **get_code_completion_option**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the completion option at ``index``. The return :ref:`Dictionary` has the following key-values: @@ -1159,7 +1195,7 @@ Gets the completion option at ``index``. The return :ref:`Dictionary` **get_code_completion_options** **(** **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **get_code_completion_options**\ (\ ) |const| :ref:`🔗` Gets all completion options, see :ref:`get_code_completion_option` for return content. @@ -1171,7 +1207,7 @@ Gets all completion options, see :ref:`get_code_completion_option` **get_code_completion_selected_index** **(** **)** |const| +:ref:`int` **get_code_completion_selected_index**\ (\ ) |const| :ref:`🔗` Gets the index of the current selected completion option. @@ -1179,11 +1215,35 @@ Gets the index of the current selected completion option. ---- +.. _class_CodeEdit_method_get_code_region_end_tag: + +.. rst-class:: classref-method + +:ref:`String` **get_code_region_end_tag**\ (\ ) |const| :ref:`🔗` + +Returns the code region end tag (without comment delimiter). + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_method_get_code_region_start_tag: + +.. rst-class:: classref-method + +:ref:`String` **get_code_region_start_tag**\ (\ ) |const| :ref:`🔗` + +Returns the code region start tag (without comment delimiter). + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_get_delimiter_end_key: .. rst-class:: classref-method -:ref:`String` **get_delimiter_end_key** **(** :ref:`int` delimiter_index **)** |const| +:ref:`String` **get_delimiter_end_key**\ (\ delimiter_index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the end key for a string or comment region index. @@ -1195,7 +1255,7 @@ Gets the end key for a string or comment region index. .. rst-class:: classref-method -:ref:`Vector2` **get_delimiter_end_position** **(** :ref:`int` line, :ref:`int` column **)** |const| +:ref:`Vector2` **get_delimiter_end_position**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` If ``line`` ``column`` is in a string or comment, returns the end position of the region. If not or no end could be found, both :ref:`Vector2` values will be ``-1``. @@ -1207,7 +1267,7 @@ If ``line`` ``column`` is in a string or comment, returns the end position of th .. rst-class:: classref-method -:ref:`String` **get_delimiter_start_key** **(** :ref:`int` delimiter_index **)** |const| +:ref:`String` **get_delimiter_start_key**\ (\ delimiter_index\: :ref:`int`\ ) |const| :ref:`🔗` Gets the start key for a string or comment region index. @@ -1219,7 +1279,7 @@ Gets the start key for a string or comment region index. .. rst-class:: classref-method -:ref:`Vector2` **get_delimiter_start_position** **(** :ref:`int` line, :ref:`int` column **)** |const| +:ref:`Vector2` **get_delimiter_start_position**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` If ``line`` ``column`` is in a string or comment, returns the start position of the region. If not or no start could be found, both :ref:`Vector2` values will be ``-1``. @@ -1231,7 +1291,7 @@ If ``line`` ``column`` is in a string or comment, returns the start position of .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_executing_lines** **(** **)** |const| +:ref:`PackedInt32Array` **get_executing_lines**\ (\ ) |const| :ref:`🔗` Gets all executing lines. @@ -1243,7 +1303,7 @@ Gets all executing lines. .. rst-class:: classref-method -:ref:`int[]` **get_folded_lines** **(** **)** |const| +:ref:`Array`\[:ref:`int`\] **get_folded_lines**\ (\ ) |const| :ref:`🔗` Returns all lines that are current folded. @@ -1255,7 +1315,7 @@ Returns all lines that are current folded. .. rst-class:: classref-method -:ref:`String` **get_text_for_code_completion** **(** **)** |const| +:ref:`String` **get_text_for_code_completion**\ (\ ) |const| :ref:`🔗` Returns the full text with char ``0xFFFF`` at the caret location. @@ -1267,7 +1327,7 @@ Returns the full text with char ``0xFFFF`` at the caret location. .. rst-class:: classref-method -:ref:`String` **get_text_for_symbol_lookup** **(** **)** +:ref:`String` **get_text_for_symbol_lookup**\ (\ ) |const| :ref:`🔗` Returns the full text with char ``0xFFFF`` at the cursor location. @@ -1275,11 +1335,23 @@ Returns the full text with char ``0xFFFF`` at the cursor location. ---- +.. _class_CodeEdit_method_get_text_with_cursor_char: + +.. rst-class:: classref-method + +:ref:`String` **get_text_with_cursor_char**\ (\ line\: :ref:`int`, column\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the full text with char ``0xFFFF`` at the specified location. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_has_auto_brace_completion_close_key: .. rst-class:: classref-method -:ref:`bool` **has_auto_brace_completion_close_key** **(** :ref:`String` close_key **)** |const| +:ref:`bool` **has_auto_brace_completion_close_key**\ (\ close_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if close key ``close_key`` exists. @@ -1291,7 +1363,7 @@ Returns ``true`` if close key ``close_key`` exists. .. rst-class:: classref-method -:ref:`bool` **has_auto_brace_completion_open_key** **(** :ref:`String` open_key **)** |const| +:ref:`bool` **has_auto_brace_completion_open_key**\ (\ open_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if open key ``open_key`` exists. @@ -1303,7 +1375,7 @@ Returns ``true`` if open key ``open_key`` exists. .. rst-class:: classref-method -:ref:`bool` **has_comment_delimiter** **(** :ref:`String` start_key **)** |const| +:ref:`bool` **has_comment_delimiter**\ (\ start_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if comment ``start_key`` exists. @@ -1315,7 +1387,7 @@ Returns ``true`` if comment ``start_key`` exists. .. rst-class:: classref-method -:ref:`bool` **has_string_delimiter** **(** :ref:`String` start_key **)** |const| +:ref:`bool` **has_string_delimiter**\ (\ start_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if string ``start_key`` exists. @@ -1327,7 +1399,7 @@ Returns ``true`` if string ``start_key`` exists. .. rst-class:: classref-method -void **indent_lines** **(** **)** +|void| **indent_lines**\ (\ ) :ref:`🔗` Indents selected lines, or in the case of no selection the caret line by one. @@ -1339,7 +1411,7 @@ Indents selected lines, or in the case of no selection the caret line by one. .. rst-class:: classref-method -:ref:`int` **is_in_comment** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| +:ref:`int` **is_in_comment**\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns delimiter index if ``line`` ``column`` is in a comment. If ``column`` is not provided, will return delimiter index if the entire ``line`` is a comment. Otherwise ``-1``. @@ -1351,7 +1423,7 @@ Returns delimiter index if ``line`` ``column`` is in a comment. If ``column`` is .. rst-class:: classref-method -:ref:`int` **is_in_string** **(** :ref:`int` line, :ref:`int` column=-1 **)** |const| +:ref:`int` **is_in_string**\ (\ line\: :ref:`int`, column\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` is not provided, will return the delimiter index if the entire ``line`` is a string. Otherwise ``-1``. @@ -1363,7 +1435,7 @@ Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` .. rst-class:: classref-method -:ref:`bool` **is_line_bookmarked** **(** :ref:`int` line **)** |const| +:ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is bookmarked or not. @@ -1375,7 +1447,7 @@ Returns whether the line at the specified index is bookmarked or not. .. rst-class:: classref-method -:ref:`bool` **is_line_breakpointed** **(** :ref:`int` line **)** |const| +:ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is breakpointed or not. @@ -1383,11 +1455,35 @@ Returns whether the line at the specified index is breakpointed or not. ---- +.. _class_CodeEdit_method_is_line_code_region_end: + +.. rst-class:: classref-method + +:ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns whether the line at the specified index is a code region end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_method_is_line_code_region_start: + +.. rst-class:: classref-method + +:ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns whether the line at the specified index is a code region start. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_is_line_executing: .. rst-class:: classref-method -:ref:`bool` **is_line_executing** **(** :ref:`int` line **)** |const| +:ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is marked as executing or not. @@ -1399,7 +1495,7 @@ Returns whether the line at the specified index is marked as executing or not. .. rst-class:: classref-method -:ref:`bool` **is_line_folded** **(** :ref:`int` line **)** |const| +:ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether the line at the specified index is folded or not. @@ -1407,11 +1503,35 @@ Returns whether the line at the specified index is folded or not. ---- +.. _class_CodeEdit_method_move_lines_down: + +.. rst-class:: classref-method + +|void| **move_lines_down**\ (\ ) :ref:`🔗` + +Moves all lines down that are selected or have a caret on them. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CodeEdit_method_move_lines_up: + +.. rst-class:: classref-method + +|void| **move_lines_up**\ (\ ) :ref:`🔗` + +Moves all lines up that are selected or have a caret on them. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_remove_comment_delimiter: .. rst-class:: classref-method -void **remove_comment_delimiter** **(** :ref:`String` start_key **)** +|void| **remove_comment_delimiter**\ (\ start_key\: :ref:`String`\ ) :ref:`🔗` Removes the comment delimiter with ``start_key``. @@ -1423,7 +1543,7 @@ Removes the comment delimiter with ``start_key``. .. rst-class:: classref-method -void **remove_string_delimiter** **(** :ref:`String` start_key **)** +|void| **remove_string_delimiter**\ (\ start_key\: :ref:`String`\ ) :ref:`🔗` Removes the string delimiter with ``start_key``. @@ -1435,9 +1555,9 @@ Removes the string delimiter with ``start_key``. .. rst-class:: classref-method -void **request_code_completion** **(** :ref:`bool` force=false **)** +|void| **request_code_completion**\ (\ force\: :ref:`bool` = false\ ) :ref:`🔗` -Emits :ref:`code_completion_requested`, if ``force`` is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. +Emits :ref:`code_completion_requested`, if ``force`` is ``true`` will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal. .. rst-class:: classref-item-separator @@ -1447,7 +1567,7 @@ Emits :ref:`code_completion_requested` index **)** +|void| **set_code_completion_selected_index**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Sets the current selected completion option. @@ -1459,7 +1579,7 @@ Sets the current selected completion option. .. rst-class:: classref-method -void **set_code_hint** **(** :ref:`String` code_hint **)** +|void| **set_code_hint**\ (\ code_hint\: :ref:`String`\ ) :ref:`🔗` Sets the code hint text. Pass an empty string to clear. @@ -1471,7 +1591,7 @@ Sets the code hint text. Pass an empty string to clear. .. rst-class:: classref-method -void **set_code_hint_draw_below** **(** :ref:`bool` draw_below **)** +|void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`🔗` Sets if the code hint should draw below the text. @@ -1479,11 +1599,23 @@ Sets if the code hint should draw below the text. ---- +.. _class_CodeEdit_method_set_code_region_tags: + +.. rst-class:: classref-method + +|void| **set_code_region_tags**\ (\ start\: :ref:`String` = "region", end\: :ref:`String` = "endregion"\ ) :ref:`🔗` + +Sets the code region start and end tags (without comment delimiter). + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_set_line_as_bookmarked: .. rst-class:: classref-method -void **set_line_as_bookmarked** **(** :ref:`int` line, :ref:`bool` bookmarked **)** +|void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`🔗` Sets the line as bookmarked. @@ -1495,7 +1627,7 @@ Sets the line as bookmarked. .. rst-class:: classref-method -void **set_line_as_breakpoint** **(** :ref:`int` line, :ref:`bool` breakpointed **)** +|void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`🔗` Sets the line as breakpointed. @@ -1507,7 +1639,7 @@ Sets the line as breakpointed. .. rst-class:: classref-method -void **set_line_as_executing** **(** :ref:`int` line, :ref:`bool` executing **)** +|void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`🔗` Sets the line as executing. @@ -1519,7 +1651,7 @@ Sets the line as executing. .. rst-class:: classref-method -void **set_symbol_lookup_word_as_valid** **(** :ref:`bool` valid **)** +|void| **set_symbol_lookup_word_as_valid**\ (\ valid\: :ref:`bool`\ ) :ref:`🔗` Sets the symbol emitted by :ref:`symbol_validate` as a valid lookup. @@ -1531,7 +1663,7 @@ Sets the symbol emitted by :ref:`symbol_validate` line **)** +|void| **toggle_foldable_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Toggle the folding of the code block at the given line. @@ -1539,11 +1671,23 @@ Toggle the folding of the code block at the given line. ---- +.. _class_CodeEdit_method_toggle_foldable_lines_at_carets: + +.. rst-class:: classref-method + +|void| **toggle_foldable_lines_at_carets**\ (\ ) :ref:`🔗` + +Toggle the folding of the code block on all lines with a caret on them. + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_unfold_all_lines: .. rst-class:: classref-method -void **unfold_all_lines** **(** **)** +|void| **unfold_all_lines**\ (\ ) :ref:`🔗` Unfolds all lines, folded or not. @@ -1555,7 +1699,7 @@ Unfolds all lines, folded or not. .. rst-class:: classref-method -void **unfold_line** **(** :ref:`int` line **)** +|void| **unfold_line**\ (\ line\: :ref:`int`\ ) :ref:`🔗` Unfolds all lines that were previously folded. @@ -1567,7 +1711,7 @@ Unfolds all lines that were previously folded. .. rst-class:: classref-method -void **unindent_lines** **(** **)** +|void| **unindent_lines**\ (\ ) :ref:`🔗` Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. @@ -1579,9 +1723,9 @@ Unindents selected lines, or in the case of no selection the caret line by one. .. rst-class:: classref-method -void **update_code_completion_options** **(** :ref:`bool` force **)** +|void| **update_code_completion_options**\ (\ force\: :ref:`bool`\ ) :ref:`🔗` -Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autoccomplete menu to popup, if ``force`` is ``true``. +Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. \ **Note:** This will replace all current candidates. @@ -1594,23 +1738,11 @@ Submits all completion options added with :ref:`add_code_completion_option` **background_color** = ``Color(0, 0, 0, 0)`` - -Sets the background :ref:`Color`. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_bookmark_color: .. rst-class:: classref-themeproperty -:ref:`Color` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)`` +:ref:`Color` **bookmark_color** = ``Color(0.5, 0.64, 1, 0.8)`` :ref:`🔗` :ref:`Color` of the bookmark icon for bookmarked lines. @@ -1622,7 +1754,7 @@ Sets the background :ref:`Color`. .. rst-class:: classref-themeproperty -:ref:`Color` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)`` +:ref:`Color` **brace_mismatch_color** = ``Color(1, 0.2, 0.2, 1)`` :ref:`🔗` :ref:`Color` of the text to highlight mismatched braces. @@ -1634,7 +1766,7 @@ Sets the background :ref:`Color`. .. rst-class:: classref-themeproperty -:ref:`Color` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)`` +:ref:`Color` **breakpoint_color** = ``Color(0.9, 0.29, 0.3, 1)`` :ref:`🔗` :ref:`Color` of the breakpoint icon for bookmarked lines. @@ -1642,35 +1774,11 @@ Sets the background :ref:`Color`. ---- -.. _class_CodeEdit_theme_color_caret_background_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **caret_background_color** = ``Color(0, 0, 0, 1)`` - -:ref:`Color` of the text behind the caret when block caret is enabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_caret_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -:ref:`Color` of the caret. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_code_folding_color: .. rst-class:: classref-themeproperty -:ref:`Color` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)`` +:ref:`Color` **code_folding_color** = ``Color(0.8, 0.8, 0.8, 0.8)`` :ref:`🔗` :ref:`Color` for all icons related to line folding. @@ -1682,7 +1790,7 @@ Sets the background :ref:`Color`. .. rst-class:: classref-themeproperty -:ref:`Color` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)`` +:ref:`Color` **completion_background_color** = ``Color(0.17, 0.16, 0.2, 1)`` :ref:`🔗` Sets the background :ref:`Color` for the code completion popup. @@ -1694,7 +1802,7 @@ Sets the background :ref:`Color` for the code completion popup. .. rst-class:: classref-themeproperty -:ref:`Color` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)`` +:ref:`Color` **completion_existing_color** = ``Color(0.87, 0.87, 0.87, 0.13)`` :ref:`🔗` Background highlight :ref:`Color` for matching text in code completion options. @@ -1702,23 +1810,11 @@ Background highlight :ref:`Color` for matching text in code complet ---- -.. _class_CodeEdit_theme_color_completion_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **completion_font_color** = ``Color(0.67, 0.67, 0.67, 1)`` - -Font :ref:`Color` for the code completion popup. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_completion_scroll_color: .. rst-class:: classref-themeproperty -:ref:`Color` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)`` +:ref:`Color` **completion_scroll_color** = ``Color(1, 1, 1, 0.29)`` :ref:`🔗` :ref:`Color` of the scrollbar in the code completion popup. @@ -1730,7 +1826,7 @@ Font :ref:`Color` for the code completion popup. .. rst-class:: classref-themeproperty -:ref:`Color` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)`` +:ref:`Color` **completion_scroll_hovered_color** = ``Color(1, 1, 1, 0.4)`` :ref:`🔗` :ref:`Color` of the scrollbar in the code completion popup when hovered. @@ -1742,7 +1838,7 @@ Font :ref:`Color` for the code completion popup. .. rst-class:: classref-themeproperty -:ref:`Color` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)`` +:ref:`Color` **completion_selected_color** = ``Color(0.26, 0.26, 0.27, 1)`` :ref:`🔗` Background highlight :ref:`Color` for the current selected option item in the code completion popup. @@ -1750,23 +1846,11 @@ Background highlight :ref:`Color` for the current selected option i ---- -.. _class_CodeEdit_theme_color_current_line_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)`` - -Background :ref:`Color` of the line containing the caret. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_executing_line_color: .. rst-class:: classref-themeproperty -:ref:`Color` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)`` +:ref:`Color` **executing_line_color** = ``Color(0.98, 0.89, 0.27, 1)`` :ref:`🔗` :ref:`Color` of the executing icon for executing lines. @@ -1774,61 +1858,13 @@ Background :ref:`Color` of the line containing the caret. ---- -.. _class_CodeEdit_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -Sets the font :ref:`Color`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **CodeEdit**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_placeholder_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` - -Font color for :ref:`TextEdit.placeholder_text`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_readonly_color: +.. _class_CodeEdit_theme_color_folded_code_region_color: .. rst-class:: classref-themeproperty -:ref:`Color` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color` **folded_code_region_color** = ``Color(0.68, 0.46, 0.77, 0.2)`` :ref:`🔗` -Sets the font :ref:`Color` when :ref:`TextEdit.editable` is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_selected_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_selected_color** = ``Color(0, 0, 0, 0)`` - -Sets the :ref:`Color` of the selected text. If equal to ``Color(0, 0, 0, 0)``, it will be ignored. +:ref:`Color` of background line highlight for folded code region. .. rst-class:: classref-item-separator @@ -1838,7 +1874,7 @@ Sets the :ref:`Color` of the selected text. If equal to ``Color(0, .. rst-class:: classref-themeproperty -:ref:`Color` **line_length_guideline_color** = ``Color(0.3, 0.5, 0.8, 0.1)`` +:ref:`Color` **line_length_guideline_color** = ``Color(0.3, 0.5, 0.8, 0.1)`` :ref:`🔗` :ref:`Color` of the main line length guideline, secondary guidelines will have 50% alpha applied. @@ -1850,7 +1886,7 @@ Sets the :ref:`Color` of the selected text. If equal to ``Color(0, .. rst-class:: classref-themeproperty -:ref:`Color` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)`` +:ref:`Color` **line_number_color** = ``Color(0.67, 0.67, 0.67, 0.4)`` :ref:`🔗` Sets the :ref:`Color` of line numbers. @@ -1858,59 +1894,11 @@ Sets the :ref:`Color` of line numbers. ---- -.. _class_CodeEdit_theme_color_search_result_border_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)`` - -:ref:`Color` of the border around text that matches the search query. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_search_result_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)`` - -:ref:`Color` behind the text that matches the search query. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_selection_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` - -Sets the highlight :ref:`Color` of text selections. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_word_highlighted_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **word_highlighted_color** = ``Color(0.8, 0.9, 0.9, 0.15)`` - -Sets the highlight :ref:`Color` of multiple occurrences. :ref:`TextEdit.highlight_all_occurrences` has to be enabled. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_constant_completion_lines: .. rst-class:: classref-themeproperty -:ref:`int` **completion_lines** = ``7`` +:ref:`int` **completion_lines** = ``7`` :ref:`🔗` Max number of options to display in the code completion popup at any one time. @@ -1922,9 +1910,9 @@ Max number of options to display in the code completion popup at any one time. .. rst-class:: classref-themeproperty -:ref:`int` **completion_max_width** = ``50`` +:ref:`int` **completion_max_width** = ``50`` :ref:`🔗` -Max width of options in the code completion popup. Options longer then this will be cut off. +Max width of options in the code completion popup. Options longer than this will be cut off. .. rst-class:: classref-item-separator @@ -1934,7 +1922,7 @@ Max width of options in the code completion popup. Options longer then this will .. rst-class:: classref-themeproperty -:ref:`int` **completion_scroll_width** = ``6`` +:ref:`int` **completion_scroll_width** = ``6`` :ref:`🔗` Width of the scrollbar in the code completion popup. @@ -1942,61 +1930,11 @@ Width of the scrollbar in the code completion popup. ---- -.. _class_CodeEdit_theme_constant_line_spacing: - -.. rst-class:: classref-themeproperty - -:ref:`int` **line_spacing** = ``4`` - -Sets the spacing between the lines. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -Sets the default :ref:`Font`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -Sets default font size. - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_icon_bookmark: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **bookmark** +:ref:`Texture2D` **bookmark** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the bookmark gutter for bookmarked lines. @@ -2008,7 +1946,7 @@ Sets a custom :ref:`Texture2D` to draw in the bookmark gutter f .. rst-class:: classref-themeproperty -:ref:`Texture2D` **breakpoint** +:ref:`Texture2D` **breakpoint** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the breakpoint gutter for breakpointed lines. @@ -2020,7 +1958,7 @@ Sets a custom :ref:`Texture2D` to draw in the breakpoint gutter .. rst-class:: classref-themeproperty -:ref:`Texture2D` **can_fold** +:ref:`Texture2D` **can_fold** :ref:`🔗` Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line can be folded. @@ -2028,61 +1966,61 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt ---- -.. _class_CodeEdit_theme_icon_executing_line: +.. _class_CodeEdit_theme_icon_can_fold_code_region: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **executing_line** +:ref:`Texture2D` **can_fold_code_region** :ref:`🔗` -Icon to draw in the executing gutter for executing lines. +Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region can be folded. .. rst-class:: classref-item-separator ---- -.. _class_CodeEdit_theme_icon_folded: +.. _class_CodeEdit_theme_icon_executing_line: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **folded** +:ref:`Texture2D` **executing_line** :ref:`🔗` -Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line is folded and can be unfolded. +Icon to draw in the executing gutter for executing lines. .. rst-class:: classref-item-separator ---- -.. _class_CodeEdit_theme_icon_folded_eol_icon: +.. _class_CodeEdit_theme_icon_folded: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **folded_eol_icon** +:ref:`Texture2D` **folded** :ref:`🔗` -Sets a custom :ref:`Texture2D` to draw at the end of a folded line. +Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a line is folded and can be unfolded. .. rst-class:: classref-item-separator ---- -.. _class_CodeEdit_theme_icon_space: +.. _class_CodeEdit_theme_icon_folded_code_region: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **space** +:ref:`Texture2D` **folded_code_region** :ref:`🔗` -Sets a custom :ref:`Texture2D` for space text characters. +Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region is folded and can be unfolded. .. rst-class:: classref-item-separator ---- -.. _class_CodeEdit_theme_icon_tab: +.. _class_CodeEdit_theme_icon_folded_eol_icon: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **tab** +:ref:`Texture2D` **folded_eol_icon** :ref:`🔗` -Sets a custom :ref:`Texture2D` for tab text characters. +Sets a custom :ref:`Texture2D` to draw at the end of a folded line. .. rst-class:: classref-item-separator @@ -2092,46 +2030,10 @@ Sets a custom :ref:`Texture2D` for tab text characters. .. rst-class:: classref-themeproperty -:ref:`StyleBox` **completion** +:ref:`StyleBox` **completion** :ref:`🔗` :ref:`StyleBox` for the code completion popup. -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -Sets the :ref:`StyleBox` when in focus. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -Sets the :ref:`StyleBox`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_read_only: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **read_only** - -Sets the :ref:`StyleBox` when :ref:`TextEdit.editable` is disabled. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -2139,3 +2041,4 @@ Sets the :ref:`StyleBox` when :ref:`TextEdit.editable` **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_keyword_color` **(** :ref:`String` keyword, :ref:`Color` color **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_member_keyword_color` **(** :ref:`String` member_keyword, :ref:`Color` color **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_color_regions` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_keyword_colors` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_member_keyword_colors` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_keyword_color` **(** :ref:`String` keyword **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_member_keyword_color` **(** :ref:`String` member_keyword **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_color_region` **(** :ref:`String` start_key **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_keyword_color` **(** :ref:`String` keyword **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_member_keyword_color` **(** :ref:`String` member_keyword **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_color_region` **(** :ref:`String` start_key **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_keyword_color` **(** :ref:`String` keyword **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_member_keyword_color` **(** :ref:`String` member_keyword **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_color_region`\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, color\: :ref:`Color`, line_only\: :ref:`bool` = false\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_keyword_color`\ (\ keyword\: :ref:`String`, color\: :ref:`Color`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_member_keyword_color`\ (\ member_keyword\: :ref:`String`, color\: :ref:`Color`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_color_regions`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_keyword_colors`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_member_keyword_colors`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_keyword_color`\ (\ keyword\: :ref:`String`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_member_keyword_color`\ (\ member_keyword\: :ref:`String`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_color_region`\ (\ start_key\: :ref:`String`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_keyword_color`\ (\ keyword\: :ref:`String`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_member_keyword_color`\ (\ member_keyword\: :ref:`String`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_color_region`\ (\ start_key\: :ref:`String`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_keyword_color`\ (\ keyword\: :ref:`String`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_member_keyword_color`\ (\ member_keyword\: :ref:`String`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -96,12 +96,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary` **color_regions** = ``{}`` +:ref:`Dictionary` **color_regions** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_regions** **(** :ref:`Dictionary` value **)** -- :ref:`Dictionary` **get_color_regions** **(** **)** +- |void| **set_color_regions**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_color_regions**\ (\ ) Sets the color regions. All existing regions will be removed. The :ref:`Dictionary` key is the region start and end key, separated by a space. The value is the region color. @@ -113,12 +113,12 @@ Sets the color regions. All existing regions will be removed. The :ref:`Dictiona .. rst-class:: classref-property -:ref:`Color` **function_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **function_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_function_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_function_color** **(** **)** +- |void| **set_function_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_function_color**\ (\ ) Sets color for functions. A function is a non-keyword string followed by a '('. @@ -130,12 +130,12 @@ Sets color for functions. A function is a non-keyword string followed by a '('. .. rst-class:: classref-property -:ref:`Dictionary` **keyword_colors** = ``{}`` +:ref:`Dictionary` **keyword_colors** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_keyword_colors** **(** :ref:`Dictionary` value **)** -- :ref:`Dictionary` **get_keyword_colors** **(** **)** +- |void| **set_keyword_colors**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_keyword_colors**\ (\ ) Sets the keyword colors. All existing keywords will be removed. The :ref:`Dictionary` key is the keyword. The value is the keyword color. @@ -147,12 +147,12 @@ Sets the keyword colors. All existing keywords will be removed. The :ref:`Dictio .. rst-class:: classref-property -:ref:`Dictionary` **member_keyword_colors** = ``{}`` +:ref:`Dictionary` **member_keyword_colors** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_member_keyword_colors** **(** :ref:`Dictionary` value **)** -- :ref:`Dictionary` **get_member_keyword_colors** **(** **)** +- |void| **set_member_keyword_colors**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_member_keyword_colors**\ (\ ) Sets the member keyword colors. All existing member keyword will be removed. The :ref:`Dictionary` key is the member keyword. The value is the member keyword color. @@ -164,12 +164,12 @@ Sets the member keyword colors. All existing member keyword will be removed. The .. rst-class:: classref-property -:ref:`Color` **member_variable_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **member_variable_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_member_variable_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_member_variable_color** **(** **)** +- |void| **set_member_variable_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_member_variable_color**\ (\ ) Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. @@ -181,12 +181,12 @@ Sets color for member variables. A member variable is non-keyword, non-function .. rst-class:: classref-property -:ref:`Color` **number_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **number_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_number_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_number_color** **(** **)** +- |void| **set_number_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_number_color**\ (\ ) Sets the color for numbers. @@ -198,12 +198,12 @@ Sets the color for numbers. .. rst-class:: classref-property -:ref:`Color` **symbol_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **symbol_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_symbol_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_symbol_color** **(** **)** +- |void| **set_symbol_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_symbol_color**\ (\ ) Sets the color for symbols. @@ -220,13 +220,11 @@ Method Descriptions .. rst-class:: classref-method -void **add_color_region** **(** :ref:`String` start_key, :ref:`String` end_key, :ref:`Color` color, :ref:`bool` line_only=false **)** +|void| **add_color_region**\ (\ start_key\: :ref:`String`, end_key\: :ref:`String`, color\: :ref:`Color`, line_only\: :ref:`bool` = false\ ) :ref:`🔗` -Adds a color region such as comments or strings. +Adds a color region (such as for comments or strings) from ``start_key`` to ``end_key``. Both keys should be symbols, and ``start_key`` must not be shared with other delimiters. -Both the start and end keys must be symbols. Only the start key has to be unique. - -\ ``line_only`` denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to ``true``. +If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String`, the region does not carry over to the next line. .. rst-class:: classref-item-separator @@ -236,7 +234,7 @@ Both the start and end keys must be symbols. Only the start key has to be unique .. rst-class:: classref-method -void **add_keyword_color** **(** :ref:`String` keyword, :ref:`Color` color **)** +|void| **add_keyword_color**\ (\ keyword\: :ref:`String`, color\: :ref:`Color`\ ) :ref:`🔗` Sets the color for a keyword. @@ -250,7 +248,7 @@ The keyword cannot contain any symbols except '\_'. .. rst-class:: classref-method -void **add_member_keyword_color** **(** :ref:`String` member_keyword, :ref:`Color` color **)** +|void| **add_member_keyword_color**\ (\ member_keyword\: :ref:`String`, color\: :ref:`Color`\ ) :ref:`🔗` Sets the color for a member keyword. @@ -266,7 +264,7 @@ It will not be highlighted if preceded by a '.'. .. rst-class:: classref-method -void **clear_color_regions** **(** **)** +|void| **clear_color_regions**\ (\ ) :ref:`🔗` Removes all color regions. @@ -278,7 +276,7 @@ Removes all color regions. .. rst-class:: classref-method -void **clear_keyword_colors** **(** **)** +|void| **clear_keyword_colors**\ (\ ) :ref:`🔗` Removes all keywords. @@ -290,7 +288,7 @@ Removes all keywords. .. rst-class:: classref-method -void **clear_member_keyword_colors** **(** **)** +|void| **clear_member_keyword_colors**\ (\ ) :ref:`🔗` Removes all member keywords. @@ -302,7 +300,7 @@ Removes all member keywords. .. rst-class:: classref-method -:ref:`Color` **get_keyword_color** **(** :ref:`String` keyword **)** |const| +:ref:`Color` **get_keyword_color**\ (\ keyword\: :ref:`String`\ ) |const| :ref:`🔗` Returns the color for a keyword. @@ -314,7 +312,7 @@ Returns the color for a keyword. .. rst-class:: classref-method -:ref:`Color` **get_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| +:ref:`Color` **get_member_keyword_color**\ (\ member_keyword\: :ref:`String`\ ) |const| :ref:`🔗` Returns the color for a member keyword. @@ -326,7 +324,7 @@ Returns the color for a member keyword. .. rst-class:: classref-method -:ref:`bool` **has_color_region** **(** :ref:`String` start_key **)** |const| +:ref:`bool` **has_color_region**\ (\ start_key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the start key exists, else ``false``. @@ -338,7 +336,7 @@ Returns ``true`` if the start key exists, else ``false``. .. rst-class:: classref-method -:ref:`bool` **has_keyword_color** **(** :ref:`String` keyword **)** |const| +:ref:`bool` **has_keyword_color**\ (\ keyword\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the keyword exists, else ``false``. @@ -350,7 +348,7 @@ Returns ``true`` if the keyword exists, else ``false``. .. rst-class:: classref-method -:ref:`bool` **has_member_keyword_color** **(** :ref:`String` member_keyword **)** |const| +:ref:`bool` **has_member_keyword_color**\ (\ member_keyword\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the member keyword exists, else ``false``. @@ -362,7 +360,7 @@ Returns ``true`` if the member keyword exists, else ``false``. .. rst-class:: classref-method -void **remove_color_region** **(** :ref:`String` start_key **)** +|void| **remove_color_region**\ (\ start_key\: :ref:`String`\ ) :ref:`🔗` Removes the color region that uses that start key. @@ -374,7 +372,7 @@ Removes the color region that uses that start key. .. rst-class:: classref-method -void **remove_keyword_color** **(** :ref:`String` keyword **)** +|void| **remove_keyword_color**\ (\ keyword\: :ref:`String`\ ) :ref:`🔗` Removes the keyword. @@ -386,7 +384,7 @@ Removes the keyword. .. rst-class:: classref-method -void **remove_member_keyword_color** **(** :ref:`String` member_keyword **)** +|void| **remove_member_keyword_color**\ (\ member_keyword\: :ref:`String`\ ) :ref:`🔗` Removes the member keyword. @@ -397,3 +395,4 @@ Removes the member keyword. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 0ab6a4badaf..8ea2227dc2a 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -53,65 +53,65 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input_event` **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_enter` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_exit` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_shape_enter` **(** :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_shape_exit` **(** :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shape2D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_one_way_collision` **(** :ref:`int` owner_id, :ref:`bool` enable **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_one_way_collision_margin` **(** :ref:`int` owner_id, :ref:`float` margin **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_input_event`\ (\ viewport\: :ref:`Viewport`, event\: :ref:`InputEvent`, shape_idx\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_enter`\ (\ ) |virtual| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_exit`\ (\ ) |virtual| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_shape_enter`\ (\ shape_idx\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_shape_exit`\ (\ shape_idx\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_shape_owner`\ (\ owner\: :ref:`Object`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_shape_owners`\ (\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_disabled`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_shape_owner`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_find_owner`\ (\ shape_index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_add_shape`\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape2D`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_clear_shapes`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`shape_owner_get_owner`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape2D` | :ref:`shape_owner_get_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_count`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_index`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`shape_owner_get_transform`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_remove_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_disabled`\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_one_way_collision`\ (\ owner_id\: :ref:`int`, enable\: :ref:`bool`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_one_way_collision_margin`\ (\ owner_id\: :ref:`int`, margin\: :ref:`float`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_transform`\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform2D`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -126,9 +126,9 @@ Signals .. rst-class:: classref-signal -**input_event** **(** :ref:`Node` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** +**input_event**\ (\ viewport\: :ref:`Node`, event\: :ref:`InputEvent`, shape_idx\: :ref:`int`\ ) :ref:`🔗` -Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event` for details. +Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event` for details. .. rst-class:: classref-item-separator @@ -138,7 +138,7 @@ Emitted when an input event occurs. Requires :ref:`input_pickable` Emitted when the mouse pointer enters any of this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject2D** won't cause this signal to be emitted. @@ -152,7 +152,7 @@ Emitted when the mouse pointer enters any of this object's shapes. Requires :ref .. rst-class:: classref-signal -**mouse_exited** **(** **)** +**mouse_exited**\ (\ ) :ref:`🔗` Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject2D** won't cause this signal to be emitted. @@ -166,7 +166,7 @@ Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`in .. rst-class:: classref-signal -**mouse_shape_entered** **(** :ref:`int` shape_idx **)** +**mouse_shape_entered**\ (\ shape_idx\: :ref:`int`\ ) :ref:`🔗` Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. ``shape_idx`` is the child index of the newly entered :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. @@ -178,7 +178,7 @@ Emitted when the mouse pointer enters any of this object's shapes or moves from .. rst-class:: classref-signal -**mouse_shape_exited** **(** :ref:`int` shape_idx **)** +**mouse_shape_exited**\ (\ shape_idx\: :ref:`int`\ ) :ref:`🔗` Emitted when the mouse pointer exits any of this object's shapes. ``shape_idx`` is the child index of the exited :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. @@ -195,7 +195,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DisableMode**: +enum **DisableMode**: :ref:`🔗` .. _class_CollisionObject2D_constant_DISABLE_MODE_REMOVE: @@ -238,12 +238,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **collision_layer** = ``1`` +:ref:`int` **collision_layer** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_layer** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_layer** **(** **)** +- |void| **set_collision_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_layer**\ (\ ) The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask`. @@ -257,12 +257,12 @@ The physics layers this CollisionObject2D is in. Collision objects can exist in .. rst-class:: classref-property -:ref:`int` **collision_mask** = ``1`` +:ref:`int` **collision_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_mask**\ (\ ) The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer`. @@ -276,12 +276,12 @@ The physics layers this CollisionObject2D scans. Collision objects can scan one .. rst-class:: classref-property -:ref:`float` **collision_priority** = ``1.0`` +:ref:`float` **collision_priority** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_collision_priority** **(** **)** +- |void| **set_collision_priority**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_collision_priority**\ (\ ) The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. @@ -293,12 +293,12 @@ The priority used to solve colliding when occurring penetration. The higher the .. rst-class:: classref-property -:ref:`DisableMode` **disable_mode** = ``0`` +:ref:`DisableMode` **disable_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disable_mode** **(** :ref:`DisableMode` value **)** -- :ref:`DisableMode` **get_disable_mode** **(** **)** +- |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) +- :ref:`DisableMode` **get_disable_mode**\ (\ ) Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. @@ -310,12 +310,12 @@ Defines the behavior in physics when :ref:`Node.process_mode` **input_pickable** = ``true`` +:ref:`bool` **input_pickable** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pickable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_pickable** **(** **)** +- |void| **set_pickable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_pickable**\ (\ ) If ``true``, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one :ref:`collision_layer` bit to be set. @@ -328,25 +328,25 @@ If ``true``, this object is pickable. A pickable object can detect the mouse poi Method Descriptions ------------------- -.. _class_CollisionObject2D_method__input_event: +.. _class_CollisionObject2D_private_method__input_event: .. rst-class:: classref-method -void **_input_event** **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| +|void| **_input_event**\ (\ viewport\: :ref:`Viewport`, event\: :ref:`InputEvent`, shape_idx\: :ref:`int`\ ) |virtual| :ref:`🔗` -Accepts unhandled :ref:`InputEvent`\ s. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to the ``input_event`` signal to easily pick up these events. +Accepts unhandled :ref:`InputEvent`\ s. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to :ref:`input_event` to easily pick up these events. -\ **Note:** :ref:`_input_event` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. +\ **Note:** :ref:`_input_event` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator ---- -.. _class_CollisionObject2D_method__mouse_enter: +.. _class_CollisionObject2D_private_method__mouse_enter: .. rst-class:: classref-method -void **_mouse_enter** **(** **)** |virtual| +|void| **_mouse_enter**\ (\ ) |virtual| :ref:`🔗` Called when the mouse pointer enters any of this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject2D** won't cause this function to be called. @@ -354,11 +354,11 @@ Called when the mouse pointer enters any of this object's shapes. Requires :ref: ---- -.. _class_CollisionObject2D_method__mouse_exit: +.. _class_CollisionObject2D_private_method__mouse_exit: .. rst-class:: classref-method -void **_mouse_exit** **(** **)** |virtual| +|void| **_mouse_exit**\ (\ ) |virtual| :ref:`🔗` Called when the mouse pointer exits all this object's shapes. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject2D** won't cause this function to be called. @@ -366,11 +366,11 @@ Called when the mouse pointer exits all this object's shapes. Requires :ref:`inp ---- -.. _class_CollisionObject2D_method__mouse_shape_enter: +.. _class_CollisionObject2D_private_method__mouse_shape_enter: .. rst-class:: classref-method -void **_mouse_shape_enter** **(** :ref:`int` shape_idx **)** |virtual| +|void| **_mouse_shape_enter**\ (\ shape_idx\: :ref:`int`\ ) |virtual| :ref:`🔗` Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. ``shape_idx`` is the child index of the newly entered :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be called. @@ -378,11 +378,11 @@ Called when the mouse pointer enters any of this object's shapes or moves from o ---- -.. _class_CollisionObject2D_method__mouse_shape_exit: +.. _class_CollisionObject2D_private_method__mouse_shape_exit: .. rst-class:: classref-method -void **_mouse_shape_exit** **(** :ref:`int` shape_idx **)** |virtual| +|void| **_mouse_shape_exit**\ (\ shape_idx\: :ref:`int`\ ) |virtual| :ref:`🔗` Called when the mouse pointer exits any of this object's shapes. ``shape_idx`` is the child index of the exited :ref:`Shape2D`. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be called. @@ -394,7 +394,7 @@ Called when the mouse pointer exits any of this object's shapes. ``shape_idx`` i .. rst-class:: classref-method -:ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** +:ref:`int` **create_shape_owner**\ (\ owner\: :ref:`Object`\ ) :ref:`🔗` Creates a new shape owner for the given object. Returns ``owner_id`` of the new owner for future reference. @@ -406,7 +406,7 @@ Creates a new shape owner for the given object. Returns ``owner_id`` of the new .. rst-class:: classref-method -:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_layer_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. @@ -418,7 +418,7 @@ Returns whether or not the specified layer of the :ref:`collision_layer` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_mask_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. @@ -430,7 +430,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask` **get_rid** **(** **)** |const| +:ref:`RID` **get_rid**\ (\ ) |const| :ref:`🔗` Returns the object's :ref:`RID`. @@ -442,7 +442,7 @@ Returns the object's :ref:`RID`. .. rst-class:: classref-method -:ref:`float` **get_shape_owner_one_way_collision_margin** **(** :ref:`int` owner_id **)** |const| +:ref:`float` **get_shape_owner_one_way_collision_margin**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id``. @@ -454,7 +454,7 @@ Returns the ``one_way_collision_margin`` of the shape owner identified by given .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_shape_owners** **(** **)** +:ref:`PackedInt32Array` **get_shape_owners**\ (\ ) :ref:`🔗` Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. @@ -466,7 +466,7 @@ Returns an :ref:`Array` of ``owner_id`` identifiers. You can use th .. rst-class:: classref-method -:ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| +:ref:`bool` **is_shape_owner_disabled**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the shape owner and its shapes are disabled. @@ -478,7 +478,7 @@ If ``true``, the shape owner and its shapes are disabled. .. rst-class:: classref-method -:ref:`bool` **is_shape_owner_one_way_collision_enabled** **(** :ref:`int` owner_id **)** |const| +:ref:`bool` **is_shape_owner_one_way_collision_enabled**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns ``true`` if collisions for the shape owner originating from this **CollisionObject2D** will not be reported to collided with **CollisionObject2D**\ s. @@ -490,7 +490,7 @@ Returns ``true`` if collisions for the shape owner originating from this **Colli .. rst-class:: classref-method -void **remove_shape_owner** **(** :ref:`int` owner_id **)** +|void| **remove_shape_owner**\ (\ owner_id\: :ref:`int`\ ) :ref:`🔗` Removes the given shape owner. @@ -502,7 +502,7 @@ Removes the given shape owner. .. rst-class:: classref-method -void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. @@ -514,7 +514,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. @@ -526,7 +526,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -:ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| +:ref:`int` **shape_find_owner**\ (\ shape_index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the ``owner_id`` of the given shape. @@ -538,7 +538,7 @@ Returns the ``owner_id`` of the given shape. .. rst-class:: classref-method -void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** +|void| **shape_owner_add_shape**\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape2D`\ ) :ref:`🔗` Adds a :ref:`Shape2D` to the shape owner. @@ -550,7 +550,7 @@ Adds a :ref:`Shape2D` to the shape owner. .. rst-class:: classref-method -void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** +|void| **shape_owner_clear_shapes**\ (\ owner_id\: :ref:`int`\ ) :ref:`🔗` Removes all shapes from the shape owner. @@ -562,7 +562,7 @@ Removes all shapes from the shape owner. .. rst-class:: classref-method -:ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| +:ref:`Object` **shape_owner_get_owner**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the parent object of the given shape owner. @@ -574,7 +574,7 @@ Returns the parent object of the given shape owner. .. rst-class:: classref-method -:ref:`Shape2D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +:ref:`Shape2D` **shape_owner_get_shape**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the :ref:`Shape2D` with the given ID from the given shape owner. @@ -586,7 +586,7 @@ Returns the :ref:`Shape2D` with the given ID from the given shape .. rst-class:: classref-method -:ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| +:ref:`int` **shape_owner_get_shape_count**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the number of shapes the given shape owner contains. @@ -598,7 +598,7 @@ Returns the number of shapes the given shape owner contains. .. rst-class:: classref-method -:ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +:ref:`int` **shape_owner_get_shape_index**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the child index of the :ref:`Shape2D` with the given ID from the given shape owner. @@ -610,7 +610,7 @@ Returns the child index of the :ref:`Shape2D` with the given ID f .. rst-class:: classref-method -:ref:`Transform2D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| +:ref:`Transform2D` **shape_owner_get_transform**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the shape owner's :ref:`Transform2D`. @@ -622,7 +622,7 @@ Returns the shape owner's :ref:`Transform2D`. .. rst-class:: classref-method -void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** +|void| **shape_owner_remove_shape**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) :ref:`🔗` Removes a shape from the given shape owner. @@ -634,7 +634,7 @@ Removes a shape from the given shape owner. .. rst-class:: classref-method -void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** +|void| **shape_owner_set_disabled**\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) :ref:`🔗` If ``true``, disables the given shape owner. @@ -646,7 +646,7 @@ If ``true``, disables the given shape owner. .. rst-class:: classref-method -void **shape_owner_set_one_way_collision** **(** :ref:`int` owner_id, :ref:`bool` enable **)** +|void| **shape_owner_set_one_way_collision**\ (\ owner_id\: :ref:`int`, enable\: :ref:`bool`\ ) :ref:`🔗` If ``enable`` is ``true``, collisions for the shape owner originating from this **CollisionObject2D** will not be reported to collided with **CollisionObject2D**\ s. @@ -658,7 +658,7 @@ If ``enable`` is ``true``, collisions for the shape owner originating from this .. rst-class:: classref-method -void **shape_owner_set_one_way_collision_margin** **(** :ref:`int` owner_id, :ref:`float` margin **)** +|void| **shape_owner_set_one_way_collision_margin**\ (\ owner_id\: :ref:`int`, margin\: :ref:`float`\ ) :ref:`🔗` Sets the ``one_way_collision_margin`` of the shape owner identified by given ``owner_id`` to ``margin`` pixels. @@ -670,7 +670,7 @@ Sets the ``one_way_collision_margin`` of the shape owner identified by given ``o .. rst-class:: classref-method -void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** +|void| **shape_owner_set_transform**\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform2D`\ ) :ref:`🔗` Sets the :ref:`Transform2D` of the given shape owner. @@ -681,3 +681,4 @@ Sets the :ref:`Transform2D` of the given shape owner. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 6769bba2ea5..13737061401 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -55,53 +55,53 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input_event` **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_enter` **(** **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_exit` **(** **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shape3D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_input_event`\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_enter`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_mouse_exit`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_shape_owner`\ (\ owner\: :ref:`Object`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_shape_owners`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_disabled`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_shape_owner`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_find_owner`\ (\ shape_index\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_add_shape`\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape3D`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_clear_shapes`\ (\ owner_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`shape_owner_get_owner`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape3D` | :ref:`shape_owner_get_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_count`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_index`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`shape_owner_get_transform`\ (\ owner_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_remove_shape`\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_disabled`\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_owner_set_transform`\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,9 +116,9 @@ Signals .. rst-class:: classref-signal -**input_event** **(** :ref:`Node` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** +**input_event**\ (\ camera\: :ref:`Node`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) :ref:`🔗` -Emitted when the object receives an unhandled :ref:`InputEvent`. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. +Emitted when the object receives an unhandled :ref:`InputEvent`. ``event_position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. .. rst-class:: classref-item-separator @@ -128,7 +128,7 @@ Emitted when the object receives an unhandled :ref:`InputEvent .. rst-class:: classref-signal -**mouse_entered** **(** **)** +**mouse_entered**\ (\ ) :ref:`🔗` Emitted when the mouse pointer enters any of this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. @@ -142,7 +142,7 @@ Emitted when the mouse pointer enters any of this object's shapes. Requires :ref .. rst-class:: classref-signal -**mouse_exited** **(** **)** +**mouse_exited**\ (\ ) :ref:`🔗` Emitted when the mouse pointer exits all this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. @@ -161,7 +161,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DisableMode**: +enum **DisableMode**: :ref:`🔗` .. _class_CollisionObject3D_constant_DISABLE_MODE_REMOVE: @@ -204,12 +204,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **collision_layer** = ``1`` +:ref:`int` **collision_layer** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_layer** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_layer** **(** **)** +- |void| **set_collision_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_layer**\ (\ ) The physics layers this CollisionObject3D **is in**. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask`. @@ -223,12 +223,12 @@ The physics layers this CollisionObject3D **is in**. Collision objects can exist .. rst-class:: classref-property -:ref:`int` **collision_mask** = ``1`` +:ref:`int` **collision_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_mask**\ (\ ) The physics layers this CollisionObject3D **scans**. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer`. @@ -242,12 +242,12 @@ The physics layers this CollisionObject3D **scans**. Collision objects can scan .. rst-class:: classref-property -:ref:`float` **collision_priority** = ``1.0`` +:ref:`float` **collision_priority** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_collision_priority** **(** **)** +- |void| **set_collision_priority**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_collision_priority**\ (\ ) The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. @@ -259,12 +259,12 @@ The priority used to solve colliding when occurring penetration. The higher the .. rst-class:: classref-property -:ref:`DisableMode` **disable_mode** = ``0`` +:ref:`DisableMode` **disable_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disable_mode** **(** :ref:`DisableMode` value **)** -- :ref:`DisableMode` **get_disable_mode** **(** **)** +- |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) +- :ref:`DisableMode` **get_disable_mode**\ (\ ) Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. @@ -276,12 +276,12 @@ Defines the behavior in physics when :ref:`Node.process_mode` **input_capture_on_drag** = ``false`` +:ref:`bool` **input_capture_on_drag** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_capture_input_on_drag** **(** :ref:`bool` value **)** -- :ref:`bool` **get_capture_input_on_drag** **(** **)** +- |void| **set_capture_input_on_drag**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_capture_input_on_drag**\ (\ ) If ``true``, the **CollisionObject3D** will continue to receive input events as the mouse is dragged across its shapes. @@ -293,12 +293,12 @@ If ``true``, the **CollisionObject3D** will continue to receive input events as .. rst-class:: classref-property -:ref:`bool` **input_ray_pickable** = ``true`` +:ref:`bool` **input_ray_pickable** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ray_pickable** **(** :ref:`bool` value **)** -- :ref:`bool` **is_ray_pickable** **(** **)** +- |void| **set_ray_pickable**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_ray_pickable**\ (\ ) If ``true``, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one :ref:`collision_layer` bit to be set. @@ -311,25 +311,25 @@ If ``true``, this object is pickable. A pickable object can detect the mouse poi Method Descriptions ------------------- -.. _class_CollisionObject3D_method__input_event: +.. _class_CollisionObject3D_private_method__input_event: .. rst-class:: classref-method -void **_input_event** **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| +|void| **_input_event**\ (\ camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`, event_position\: :ref:`Vector3`, normal\: :ref:`Vector3`, shape_idx\: :ref:`int`\ ) |virtual| :ref:`🔗` -Receives unhandled :ref:`InputEvent`\ s. ``position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. +Receives unhandled :ref:`InputEvent`\ s. ``event_position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. -\ **Note:** :ref:`_input_event` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. +\ **Note:** :ref:`_input_event` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator ---- -.. _class_CollisionObject3D_method__mouse_enter: +.. _class_CollisionObject3D_private_method__mouse_enter: .. rst-class:: classref-method -void **_mouse_enter** **(** **)** |virtual| +|void| **_mouse_enter**\ (\ ) |virtual| :ref:`🔗` Called when the mouse pointer enters any of this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject3D** won't cause this function to be called. @@ -337,11 +337,11 @@ Called when the mouse pointer enters any of this object's shapes. Requires :ref: ---- -.. _class_CollisionObject3D_method__mouse_exit: +.. _class_CollisionObject3D_private_method__mouse_exit: .. rst-class:: classref-method -void **_mouse_exit** **(** **)** |virtual| +|void| **_mouse_exit**\ (\ ) |virtual| :ref:`🔗` Called when the mouse pointer exits all this object's shapes. Requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. Note that moving between different shapes within a single **CollisionObject3D** won't cause this function to be called. @@ -353,7 +353,7 @@ Called when the mouse pointer exits all this object's shapes. Requires :ref:`inp .. rst-class:: classref-method -:ref:`int` **create_shape_owner** **(** :ref:`Object` owner **)** +:ref:`int` **create_shape_owner**\ (\ owner\: :ref:`Object`\ ) :ref:`🔗` Creates a new shape owner for the given object. Returns ``owner_id`` of the new owner for future reference. @@ -365,7 +365,7 @@ Creates a new shape owner for the given object. Returns ``owner_id`` of the new .. rst-class:: classref-method -:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_layer_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. @@ -377,7 +377,7 @@ Returns whether or not the specified layer of the :ref:`collision_layer` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_mask_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. @@ -389,7 +389,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask` **get_rid** **(** **)** |const| +:ref:`RID` **get_rid**\ (\ ) |const| :ref:`🔗` Returns the object's :ref:`RID`. @@ -401,7 +401,7 @@ Returns the object's :ref:`RID`. .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_shape_owners** **(** **)** +:ref:`PackedInt32Array` **get_shape_owners**\ (\ ) :ref:`🔗` Returns an :ref:`Array` of ``owner_id`` identifiers. You can use these ids in other methods that take ``owner_id`` as an argument. @@ -413,7 +413,7 @@ Returns an :ref:`Array` of ``owner_id`` identifiers. You can use th .. rst-class:: classref-method -:ref:`bool` **is_shape_owner_disabled** **(** :ref:`int` owner_id **)** |const| +:ref:`bool` **is_shape_owner_disabled**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` If ``true``, the shape owner and its shapes are disabled. @@ -425,7 +425,7 @@ If ``true``, the shape owner and its shapes are disabled. .. rst-class:: classref-method -void **remove_shape_owner** **(** :ref:`int` owner_id **)** +|void| **remove_shape_owner**\ (\ owner_id\: :ref:`int`\ ) :ref:`🔗` Removes the given shape owner. @@ -437,7 +437,7 @@ Removes the given shape owner. .. rst-class:: classref-method -void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. @@ -449,7 +449,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. @@ -461,7 +461,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -:ref:`int` **shape_find_owner** **(** :ref:`int` shape_index **)** |const| +:ref:`int` **shape_find_owner**\ (\ shape_index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the ``owner_id`` of the given shape. @@ -473,7 +473,7 @@ Returns the ``owner_id`` of the given shape. .. rst-class:: classref-method -void **shape_owner_add_shape** **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** +|void| **shape_owner_add_shape**\ (\ owner_id\: :ref:`int`, shape\: :ref:`Shape3D`\ ) :ref:`🔗` Adds a :ref:`Shape3D` to the shape owner. @@ -485,7 +485,7 @@ Adds a :ref:`Shape3D` to the shape owner. .. rst-class:: classref-method -void **shape_owner_clear_shapes** **(** :ref:`int` owner_id **)** +|void| **shape_owner_clear_shapes**\ (\ owner_id\: :ref:`int`\ ) :ref:`🔗` Removes all shapes from the shape owner. @@ -497,7 +497,7 @@ Removes all shapes from the shape owner. .. rst-class:: classref-method -:ref:`Object` **shape_owner_get_owner** **(** :ref:`int` owner_id **)** |const| +:ref:`Object` **shape_owner_get_owner**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the parent object of the given shape owner. @@ -509,7 +509,7 @@ Returns the parent object of the given shape owner. .. rst-class:: classref-method -:ref:`Shape3D` **shape_owner_get_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +:ref:`Shape3D` **shape_owner_get_shape**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the :ref:`Shape3D` with the given ID from the given shape owner. @@ -521,7 +521,7 @@ Returns the :ref:`Shape3D` with the given ID from the given shape .. rst-class:: classref-method -:ref:`int` **shape_owner_get_shape_count** **(** :ref:`int` owner_id **)** |const| +:ref:`int` **shape_owner_get_shape_count**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the number of shapes the given shape owner contains. @@ -533,7 +533,7 @@ Returns the number of shapes the given shape owner contains. .. rst-class:: classref-method -:ref:`int` **shape_owner_get_shape_index** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| +:ref:`int` **shape_owner_get_shape_index**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the child index of the :ref:`Shape3D` with the given ID from the given shape owner. @@ -545,7 +545,7 @@ Returns the child index of the :ref:`Shape3D` with the given ID f .. rst-class:: classref-method -:ref:`Transform3D` **shape_owner_get_transform** **(** :ref:`int` owner_id **)** |const| +:ref:`Transform3D` **shape_owner_get_transform**\ (\ owner_id\: :ref:`int`\ ) |const| :ref:`🔗` Returns the shape owner's :ref:`Transform3D`. @@ -557,7 +557,7 @@ Returns the shape owner's :ref:`Transform3D`. .. rst-class:: classref-method -void **shape_owner_remove_shape** **(** :ref:`int` owner_id, :ref:`int` shape_id **)** +|void| **shape_owner_remove_shape**\ (\ owner_id\: :ref:`int`, shape_id\: :ref:`int`\ ) :ref:`🔗` Removes a shape from the given shape owner. @@ -569,7 +569,7 @@ Removes a shape from the given shape owner. .. rst-class:: classref-method -void **shape_owner_set_disabled** **(** :ref:`int` owner_id, :ref:`bool` disabled **)** +|void| **shape_owner_set_disabled**\ (\ owner_id\: :ref:`int`, disabled\: :ref:`bool`\ ) :ref:`🔗` If ``true``, disables the given shape owner. @@ -581,7 +581,7 @@ If ``true``, disables the given shape owner. .. rst-class:: classref-method -void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** +|void| **shape_owner_set_transform**\ (\ owner_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) :ref:`🔗` Sets the :ref:`Transform3D` of the given shape owner. @@ -592,3 +592,4 @@ Sets the :ref:`Transform3D` of the given shape owner. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 0395735b1d1..c4e05cd1bf5 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -19,9 +19,9 @@ A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D` or turn :ref:`PhysicsBody2D` into a solid object. +A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D`, turn :ref:`PhysicsBody2D` into a solid object, or give a hollow shape to a :ref:`StaticBody2D`. -\ **Warning:** A non-uniformly scaled :ref:`CollisionShape3D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. +\ **Warning:** A non-uniformly scaled :ref:`CollisionShape2D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. .. rst-class:: classref-reftable-group @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BuildMode**: +enum **BuildMode**: :ref:`🔗` .. _class_CollisionPolygon2D_constant_BUILD_SOLIDS: @@ -87,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BuildMode` **build_mode** = ``0`` +:ref:`BuildMode` **build_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_build_mode** **(** :ref:`BuildMode` value **)** -- :ref:`BuildMode` **get_build_mode** **(** **)** +- |void| **set_build_mode**\ (\ value\: :ref:`BuildMode`\ ) +- :ref:`BuildMode` **get_build_mode**\ (\ ) Collision build mode. Use one of the :ref:`BuildMode` constants. @@ -104,12 +104,12 @@ Collision build mode. Use one of the :ref:`BuildMode` **disabled** = ``false`` +:ref:`bool` **disabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** +- |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_disabled**\ (\ ) If ``true``, no collisions will be detected. @@ -121,12 +121,12 @@ If ``true``, no collisions will be detected. .. rst-class:: classref-property -:ref:`bool` **one_way_collision** = ``false`` +:ref:`bool` **one_way_collision** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_way_collision** **(** :ref:`bool` value **)** -- :ref:`bool` **is_one_way_collision_enabled** **(** **)** +- |void| **set_one_way_collision**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_one_way_collision_enabled**\ (\ ) If ``true``, only edges that face up, relative to **CollisionPolygon2D**'s rotation, will collide with other objects. @@ -140,12 +140,12 @@ If ``true``, only edges that face up, relative to **CollisionPolygon2D**'s rotat .. rst-class:: classref-property -:ref:`float` **one_way_collision_margin** = ``1.0`` +:ref:`float` **one_way_collision_margin** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_way_collision_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_one_way_collision_margin** **(** **)** +- |void| **set_one_way_collision_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_one_way_collision_margin**\ (\ ) The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. @@ -157,16 +157,18 @@ The margin used for one-way collision (in pixels). Higher values will make the s .. rst-class:: classref-property -:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_polygon**\ (\ ) The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first. -\ **Warning:** The returned value is a clone of the :ref:`PackedVector2Array`, not a reference. +\ **Note:** The returned vertices are in the local coordinate space of the given **CollisionPolygon2D**. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -175,3 +177,4 @@ The polygon's list of vertices. Each point will be connected to the next, and th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 20af6216082..e7e22ec4ec6 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **depth** = ``1.0`` +:ref:`float` **depth** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`float` value **)** -- :ref:`float` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_depth**\ (\ ) Length that the resulting collision extends in either direction perpendicular to its 2D polygon. @@ -71,12 +71,12 @@ Length that the resulting collision extends in either direction perpendicular to .. rst-class:: classref-property -:ref:`bool` **disabled** = ``false`` +:ref:`bool` **disabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** +- |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_disabled**\ (\ ) If ``true``, no collision will be produced. @@ -88,12 +88,12 @@ If ``true``, no collision will be produced. .. rst-class:: classref-property -:ref:`float` **margin** = ``0.04`` +:ref:`float` **margin** = ``0.04`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_margin**\ (\ ) The collision margin for the generated :ref:`Shape3D`. See :ref:`Shape3D.margin` for more details. @@ -105,16 +105,16 @@ The collision margin for the generated :ref:`Shape3D`. See :ref:` .. rst-class:: classref-property -:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_polygon**\ (\ ) Array of vertices which define the 2D polygon in the local XY plane. -\ **Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the ``polygon`` member. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -123,3 +123,4 @@ Array of vertices which define the 2D polygon in the local XY plane. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 8f23ab24682..9816d5b6b94 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -28,11 +28,11 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `2D Dodge The Creeps Demo `__ +- `2D Dodge The Creeps Demo `__ -- `2D Pong Demo `__ +- `2D Pong Demo `__ -- `2D Kinematic Character Demo `__ +- `2D Kinematic Character Demo `__ .. rst-class:: classref-reftable-group @@ -67,12 +67,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **debug_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **debug_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_debug_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_debug_color** **(** **)** +- |void| **set_debug_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_debug_color**\ (\ ) The collision shape debug color. @@ -86,12 +86,12 @@ The collision shape debug color. .. rst-class:: classref-property -:ref:`bool` **disabled** = ``false`` +:ref:`bool` **disabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** +- |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_disabled**\ (\ ) A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred`. @@ -103,12 +103,12 @@ A disabled collision shape has no effect in the world. This property should be c .. rst-class:: classref-property -:ref:`bool` **one_way_collision** = ``false`` +:ref:`bool` **one_way_collision** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_way_collision** **(** :ref:`bool` value **)** -- :ref:`bool` **is_one_way_collision_enabled** **(** **)** +- |void| **set_one_way_collision**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_one_way_collision_enabled**\ (\ ) Sets whether this collision shape should only detect collision on one side (top or bottom). @@ -122,12 +122,12 @@ Sets whether this collision shape should only detect collision on one side (top .. rst-class:: classref-property -:ref:`float` **one_way_collision_margin** = ``1.0`` +:ref:`float` **one_way_collision_margin** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_way_collision_margin** **(** :ref:`float` value **)** -- :ref:`float` **get_one_way_collision_margin** **(** **)** +- |void| **set_one_way_collision_margin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_one_way_collision_margin**\ (\ ) The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. @@ -139,12 +139,12 @@ The margin used for one-way collision (in pixels). Higher values will make the s .. rst-class:: classref-property -:ref:`Shape2D` **shape** +:ref:`Shape2D` **shape** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape2D` value **)** -- :ref:`Shape2D` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape2D`\ ) +- :ref:`Shape2D` **get_shape**\ (\ ) The actual shape owned by this collision shape. @@ -155,3 +155,4 @@ The actual shape owned by this collision shape. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 79f376cc73c..38686496911 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -30,11 +30,11 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `3D Kinematic Character Demo `__ +- `3D Kinematic Character Demo `__ -- `3D Platformer Demo `__ +- `3D Platformer Demo `__ -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ .. rst-class:: classref-reftable-group @@ -58,11 +58,11 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_convex_from_siblings` **(** **)** | - +------+------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resource_changed` **(** :ref:`Resource` resource **)** | - +------+------------------------------------------------------------------------------------------------------------------------------+ + +--------+---------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_convex_from_siblings`\ (\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resource_changed`\ (\ resource\: :ref:`Resource`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,12 +77,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **disabled** = ``false`` +:ref:`bool` **disabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_disabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_disabled** **(** **)** +- |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_disabled**\ (\ ) A disabled collision shape has no effect in the world. @@ -94,12 +94,12 @@ A disabled collision shape has no effect in the world. .. rst-class:: classref-property -:ref:`Shape3D` **shape** +:ref:`Shape3D` **shape** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape3D` value **)** -- :ref:`Shape3D` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape3D`\ ) +- :ref:`Shape3D` **get_shape**\ (\ ) The actual shape owned by this collision shape. @@ -116,7 +116,7 @@ Method Descriptions .. rst-class:: classref-method -void **make_convex_from_siblings** **(** **)** +|void| **make_convex_from_siblings**\ (\ ) :ref:`🔗` Sets the collision shape's shape to the addition of all its convexed :ref:`MeshInstance3D` siblings geometry. @@ -128,9 +128,11 @@ Sets the collision shape's shape to the addition of all its convexed :ref:`MeshI .. rst-class:: classref-method -void **resource_changed** **(** :ref:`Resource` resource **)** +|void| **resource_changed**\ (\ resource\: :ref:`Resource`\ ) :ref:`🔗` -If this method exists within a script it will be called whenever the shape resource has been modified. +**Deprecated:** Use :ref:`Resource.changed` instead. + +This method does nothing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -139,3 +141,4 @@ If this method exists within a script it will be called whenever the shape resou .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_color.rst b/classes/class_color.rst index a8b30a0fa77..f91df07a16d 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -17,7 +17,7 @@ A color represented in RGBA format. Description ----------- -A color represented in RGBA format by a red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) component. Each component is a 16-bit floating-point value, usually ranging from ``0.0`` to ``1.0``. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than ``1.0``, for overbright or HDR (High Dynamic Range) colors. +A color represented in RGBA format by a red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) component. Each component is a 32-bit floating-point value, usually ranging from ``0.0`` to ``1.0``. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than ``1.0``, for overbright or HDR (High Dynamic Range) colors. Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. @@ -34,11 +34,11 @@ Colors can be created in various ways: By the various **Color** constructors, by Tutorials --------- -- `2D GD Paint Demo `__ +- `2D GD Paint Demo `__ -- `Tween Demo `__ +- `Tween Interpolation Demo `__ -- `GUI Drag And Drop Demo `__ +- `GUI Drag And Drop Demo `__ .. rst-class:: classref-reftable-group @@ -80,21 +80,21 @@ Constructors .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`Color` from, :ref:`float` alpha **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`Color` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`String` code **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`String` code, :ref:`float` alpha **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`Color` **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ from\: :ref:`Color`, alpha\: :ref:`float`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ from\: :ref:`Color`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ code\: :ref:`String`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ code\: :ref:`String`, alpha\: :ref:`float`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ r\: :ref:`float`, g\: :ref:`float`, b\: :ref:`float`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`Color`\ (\ r\: :ref:`float`, g\: :ref:`float`, b\: :ref:`float`, a\: :ref:`float`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -104,57 +104,57 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`blend` **(** :ref:`Color` over **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`clamp` **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`darkened` **(** :ref:`float` amount **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`from_hsv` **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`from_ok_hsl` **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`from_rgbe9995` **(** :ref:`int` rgbe **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`from_string` **(** :ref:`String` str, :ref:`Color` default **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_luminance` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`hex` **(** :ref:`int` hex **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`hex64` **(** :ref:`int` hex **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`html` **(** :ref:`String` rgba **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`html_is_valid` **(** :ref:`String` color **)** |static| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`inverted` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Color` to **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`lerp` **(** :ref:`Color` to, :ref:`float` weight **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`lightened` **(** :ref:`float` amount **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`linear_to_srgb` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`srgb_to_linear` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_abgr32` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_abgr64` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_argb32` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_argb64` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`to_html` **(** :ref:`bool` with_alpha=true **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_rgba32` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`to_rgba64` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`blend`\ (\ over\: :ref:`Color`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`clamp`\ (\ min\: :ref:`Color` = Color(0, 0, 0, 0), max\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`darkened`\ (\ amount\: :ref:`float`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`from_hsv`\ (\ h\: :ref:`float`, s\: :ref:`float`, v\: :ref:`float`, alpha\: :ref:`float` = 1.0\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`from_ok_hsl`\ (\ h\: :ref:`float`, s\: :ref:`float`, l\: :ref:`float`, alpha\: :ref:`float` = 1.0\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`from_rgbe9995`\ (\ rgbe\: :ref:`int`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`from_string`\ (\ str\: :ref:`String`, default\: :ref:`Color`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_luminance`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`hex`\ (\ hex\: :ref:`int`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`hex64`\ (\ hex\: :ref:`int`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`html`\ (\ rgba\: :ref:`String`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html_is_valid`\ (\ color\: :ref:`String`\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`inverted`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equal_approx`\ (\ to\: :ref:`Color`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`lerp`\ (\ to\: :ref:`Color`, weight\: :ref:`float`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`lightened`\ (\ amount\: :ref:`float`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`linear_to_srgb`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`srgb_to_linear`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_abgr32`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_abgr64`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_argb32`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_argb64`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`to_html`\ (\ with_alpha\: :ref:`bool` = true\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_rgba32`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`to_rgba64`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -164,33 +164,33 @@ Operators .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator *` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator *` **(** :ref:`float` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator *` **(** :ref:`int` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator +` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator -` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator /` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator /` **(** :ref:`float` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator /` **(** :ref:`int` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`Color` right **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`operator []` **(** :ref:`int` index **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator unary+` **(** **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`operator unary-` **(** **)** | - +---------------------------+------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator *`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator *`\ (\ right\: :ref:`float`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator *`\ (\ right\: :ref:`int`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator +`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator -`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator /`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator /`\ (\ right\: :ref:`float`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator /`\ (\ right\: :ref:`int`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Color`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`operator []`\ (\ index\: :ref:`int`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator unary+`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`operator unary-`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -205,7 +205,7 @@ Constants .. rst-class:: classref-constant -**ALICE_BLUE** = ``Color(0.941176, 0.972549, 1, 1)`` +**ALICE_BLUE** = ``Color(0.941176, 0.972549, 1, 1)`` :ref:`🔗` Alice blue color. @@ -213,7 +213,7 @@ Alice blue color. .. rst-class:: classref-constant -**ANTIQUE_WHITE** = ``Color(0.980392, 0.921569, 0.843137, 1)`` +**ANTIQUE_WHITE** = ``Color(0.980392, 0.921569, 0.843137, 1)`` :ref:`🔗` Antique white color. @@ -221,7 +221,7 @@ Antique white color. .. rst-class:: classref-constant -**AQUA** = ``Color(0, 1, 1, 1)`` +**AQUA** = ``Color(0, 1, 1, 1)`` :ref:`🔗` Aqua color. @@ -229,7 +229,7 @@ Aqua color. .. rst-class:: classref-constant -**AQUAMARINE** = ``Color(0.498039, 1, 0.831373, 1)`` +**AQUAMARINE** = ``Color(0.498039, 1, 0.831373, 1)`` :ref:`🔗` Aquamarine color. @@ -237,7 +237,7 @@ Aquamarine color. .. rst-class:: classref-constant -**AZURE** = ``Color(0.941176, 1, 1, 1)`` +**AZURE** = ``Color(0.941176, 1, 1, 1)`` :ref:`🔗` Azure color. @@ -245,7 +245,7 @@ Azure color. .. rst-class:: classref-constant -**BEIGE** = ``Color(0.960784, 0.960784, 0.862745, 1)`` +**BEIGE** = ``Color(0.960784, 0.960784, 0.862745, 1)`` :ref:`🔗` Beige color. @@ -253,7 +253,7 @@ Beige color. .. rst-class:: classref-constant -**BISQUE** = ``Color(1, 0.894118, 0.768627, 1)`` +**BISQUE** = ``Color(1, 0.894118, 0.768627, 1)`` :ref:`🔗` Bisque color. @@ -261,7 +261,7 @@ Bisque color. .. rst-class:: classref-constant -**BLACK** = ``Color(0, 0, 0, 1)`` +**BLACK** = ``Color(0, 0, 0, 1)`` :ref:`🔗` Black color. In GDScript, this is the default value of any color. @@ -269,7 +269,7 @@ Black color. In GDScript, this is the default value of any color. .. rst-class:: classref-constant -**BLANCHED_ALMOND** = ``Color(1, 0.921569, 0.803922, 1)`` +**BLANCHED_ALMOND** = ``Color(1, 0.921569, 0.803922, 1)`` :ref:`🔗` Blanched almond color. @@ -277,7 +277,7 @@ Blanched almond color. .. rst-class:: classref-constant -**BLUE** = ``Color(0, 0, 1, 1)`` +**BLUE** = ``Color(0, 0, 1, 1)`` :ref:`🔗` Blue color. @@ -285,7 +285,7 @@ Blue color. .. rst-class:: classref-constant -**BLUE_VIOLET** = ``Color(0.541176, 0.168627, 0.886275, 1)`` +**BLUE_VIOLET** = ``Color(0.541176, 0.168627, 0.886275, 1)`` :ref:`🔗` Blue violet color. @@ -293,7 +293,7 @@ Blue violet color. .. rst-class:: classref-constant -**BROWN** = ``Color(0.647059, 0.164706, 0.164706, 1)`` +**BROWN** = ``Color(0.647059, 0.164706, 0.164706, 1)`` :ref:`🔗` Brown color. @@ -301,7 +301,7 @@ Brown color. .. rst-class:: classref-constant -**BURLYWOOD** = ``Color(0.870588, 0.721569, 0.529412, 1)`` +**BURLYWOOD** = ``Color(0.870588, 0.721569, 0.529412, 1)`` :ref:`🔗` Burlywood color. @@ -309,7 +309,7 @@ Burlywood color. .. rst-class:: classref-constant -**CADET_BLUE** = ``Color(0.372549, 0.619608, 0.627451, 1)`` +**CADET_BLUE** = ``Color(0.372549, 0.619608, 0.627451, 1)`` :ref:`🔗` Cadet blue color. @@ -317,7 +317,7 @@ Cadet blue color. .. rst-class:: classref-constant -**CHARTREUSE** = ``Color(0.498039, 1, 0, 1)`` +**CHARTREUSE** = ``Color(0.498039, 1, 0, 1)`` :ref:`🔗` Chartreuse color. @@ -325,7 +325,7 @@ Chartreuse color. .. rst-class:: classref-constant -**CHOCOLATE** = ``Color(0.823529, 0.411765, 0.117647, 1)`` +**CHOCOLATE** = ``Color(0.823529, 0.411765, 0.117647, 1)`` :ref:`🔗` Chocolate color. @@ -333,7 +333,7 @@ Chocolate color. .. rst-class:: classref-constant -**CORAL** = ``Color(1, 0.498039, 0.313726, 1)`` +**CORAL** = ``Color(1, 0.498039, 0.313726, 1)`` :ref:`🔗` Coral color. @@ -341,7 +341,7 @@ Coral color. .. rst-class:: classref-constant -**CORNFLOWER_BLUE** = ``Color(0.392157, 0.584314, 0.929412, 1)`` +**CORNFLOWER_BLUE** = ``Color(0.392157, 0.584314, 0.929412, 1)`` :ref:`🔗` Cornflower blue color. @@ -349,7 +349,7 @@ Cornflower blue color. .. rst-class:: classref-constant -**CORNSILK** = ``Color(1, 0.972549, 0.862745, 1)`` +**CORNSILK** = ``Color(1, 0.972549, 0.862745, 1)`` :ref:`🔗` Cornsilk color. @@ -357,7 +357,7 @@ Cornsilk color. .. rst-class:: classref-constant -**CRIMSON** = ``Color(0.862745, 0.0784314, 0.235294, 1)`` +**CRIMSON** = ``Color(0.862745, 0.0784314, 0.235294, 1)`` :ref:`🔗` Crimson color. @@ -365,7 +365,7 @@ Crimson color. .. rst-class:: classref-constant -**CYAN** = ``Color(0, 1, 1, 1)`` +**CYAN** = ``Color(0, 1, 1, 1)`` :ref:`🔗` Cyan color. @@ -373,7 +373,7 @@ Cyan color. .. rst-class:: classref-constant -**DARK_BLUE** = ``Color(0, 0, 0.545098, 1)`` +**DARK_BLUE** = ``Color(0, 0, 0.545098, 1)`` :ref:`🔗` Dark blue color. @@ -381,7 +381,7 @@ Dark blue color. .. rst-class:: classref-constant -**DARK_CYAN** = ``Color(0, 0.545098, 0.545098, 1)`` +**DARK_CYAN** = ``Color(0, 0.545098, 0.545098, 1)`` :ref:`🔗` Dark cyan color. @@ -389,7 +389,7 @@ Dark cyan color. .. rst-class:: classref-constant -**DARK_GOLDENROD** = ``Color(0.721569, 0.52549, 0.0431373, 1)`` +**DARK_GOLDENROD** = ``Color(0.721569, 0.52549, 0.0431373, 1)`` :ref:`🔗` Dark goldenrod color. @@ -397,7 +397,7 @@ Dark goldenrod color. .. rst-class:: classref-constant -**DARK_GRAY** = ``Color(0.662745, 0.662745, 0.662745, 1)`` +**DARK_GRAY** = ``Color(0.662745, 0.662745, 0.662745, 1)`` :ref:`🔗` Dark gray color. @@ -405,7 +405,7 @@ Dark gray color. .. rst-class:: classref-constant -**DARK_GREEN** = ``Color(0, 0.392157, 0, 1)`` +**DARK_GREEN** = ``Color(0, 0.392157, 0, 1)`` :ref:`🔗` Dark green color. @@ -413,7 +413,7 @@ Dark green color. .. rst-class:: classref-constant -**DARK_KHAKI** = ``Color(0.741176, 0.717647, 0.419608, 1)`` +**DARK_KHAKI** = ``Color(0.741176, 0.717647, 0.419608, 1)`` :ref:`🔗` Dark khaki color. @@ -421,7 +421,7 @@ Dark khaki color. .. rst-class:: classref-constant -**DARK_MAGENTA** = ``Color(0.545098, 0, 0.545098, 1)`` +**DARK_MAGENTA** = ``Color(0.545098, 0, 0.545098, 1)`` :ref:`🔗` Dark magenta color. @@ -429,7 +429,7 @@ Dark magenta color. .. rst-class:: classref-constant -**DARK_OLIVE_GREEN** = ``Color(0.333333, 0.419608, 0.184314, 1)`` +**DARK_OLIVE_GREEN** = ``Color(0.333333, 0.419608, 0.184314, 1)`` :ref:`🔗` Dark olive green color. @@ -437,7 +437,7 @@ Dark olive green color. .. rst-class:: classref-constant -**DARK_ORANGE** = ``Color(1, 0.54902, 0, 1)`` +**DARK_ORANGE** = ``Color(1, 0.54902, 0, 1)`` :ref:`🔗` Dark orange color. @@ -445,7 +445,7 @@ Dark orange color. .. rst-class:: classref-constant -**DARK_ORCHID** = ``Color(0.6, 0.196078, 0.8, 1)`` +**DARK_ORCHID** = ``Color(0.6, 0.196078, 0.8, 1)`` :ref:`🔗` Dark orchid color. @@ -453,7 +453,7 @@ Dark orchid color. .. rst-class:: classref-constant -**DARK_RED** = ``Color(0.545098, 0, 0, 1)`` +**DARK_RED** = ``Color(0.545098, 0, 0, 1)`` :ref:`🔗` Dark red color. @@ -461,7 +461,7 @@ Dark red color. .. rst-class:: classref-constant -**DARK_SALMON** = ``Color(0.913725, 0.588235, 0.478431, 1)`` +**DARK_SALMON** = ``Color(0.913725, 0.588235, 0.478431, 1)`` :ref:`🔗` Dark salmon color. @@ -469,7 +469,7 @@ Dark salmon color. .. rst-class:: classref-constant -**DARK_SEA_GREEN** = ``Color(0.560784, 0.737255, 0.560784, 1)`` +**DARK_SEA_GREEN** = ``Color(0.560784, 0.737255, 0.560784, 1)`` :ref:`🔗` Dark sea green color. @@ -477,7 +477,7 @@ Dark sea green color. .. rst-class:: classref-constant -**DARK_SLATE_BLUE** = ``Color(0.282353, 0.239216, 0.545098, 1)`` +**DARK_SLATE_BLUE** = ``Color(0.282353, 0.239216, 0.545098, 1)`` :ref:`🔗` Dark slate blue color. @@ -485,7 +485,7 @@ Dark slate blue color. .. rst-class:: classref-constant -**DARK_SLATE_GRAY** = ``Color(0.184314, 0.309804, 0.309804, 1)`` +**DARK_SLATE_GRAY** = ``Color(0.184314, 0.309804, 0.309804, 1)`` :ref:`🔗` Dark slate gray color. @@ -493,7 +493,7 @@ Dark slate gray color. .. rst-class:: classref-constant -**DARK_TURQUOISE** = ``Color(0, 0.807843, 0.819608, 1)`` +**DARK_TURQUOISE** = ``Color(0, 0.807843, 0.819608, 1)`` :ref:`🔗` Dark turquoise color. @@ -501,7 +501,7 @@ Dark turquoise color. .. rst-class:: classref-constant -**DARK_VIOLET** = ``Color(0.580392, 0, 0.827451, 1)`` +**DARK_VIOLET** = ``Color(0.580392, 0, 0.827451, 1)`` :ref:`🔗` Dark violet color. @@ -509,7 +509,7 @@ Dark violet color. .. rst-class:: classref-constant -**DEEP_PINK** = ``Color(1, 0.0784314, 0.576471, 1)`` +**DEEP_PINK** = ``Color(1, 0.0784314, 0.576471, 1)`` :ref:`🔗` Deep pink color. @@ -517,7 +517,7 @@ Deep pink color. .. rst-class:: classref-constant -**DEEP_SKY_BLUE** = ``Color(0, 0.74902, 1, 1)`` +**DEEP_SKY_BLUE** = ``Color(0, 0.74902, 1, 1)`` :ref:`🔗` Deep sky blue color. @@ -525,7 +525,7 @@ Deep sky blue color. .. rst-class:: classref-constant -**DIM_GRAY** = ``Color(0.411765, 0.411765, 0.411765, 1)`` +**DIM_GRAY** = ``Color(0.411765, 0.411765, 0.411765, 1)`` :ref:`🔗` Dim gray color. @@ -533,7 +533,7 @@ Dim gray color. .. rst-class:: classref-constant -**DODGER_BLUE** = ``Color(0.117647, 0.564706, 1, 1)`` +**DODGER_BLUE** = ``Color(0.117647, 0.564706, 1, 1)`` :ref:`🔗` Dodger blue color. @@ -541,7 +541,7 @@ Dodger blue color. .. rst-class:: classref-constant -**FIREBRICK** = ``Color(0.698039, 0.133333, 0.133333, 1)`` +**FIREBRICK** = ``Color(0.698039, 0.133333, 0.133333, 1)`` :ref:`🔗` Firebrick color. @@ -549,7 +549,7 @@ Firebrick color. .. rst-class:: classref-constant -**FLORAL_WHITE** = ``Color(1, 0.980392, 0.941176, 1)`` +**FLORAL_WHITE** = ``Color(1, 0.980392, 0.941176, 1)`` :ref:`🔗` Floral white color. @@ -557,7 +557,7 @@ Floral white color. .. rst-class:: classref-constant -**FOREST_GREEN** = ``Color(0.133333, 0.545098, 0.133333, 1)`` +**FOREST_GREEN** = ``Color(0.133333, 0.545098, 0.133333, 1)`` :ref:`🔗` Forest green color. @@ -565,7 +565,7 @@ Forest green color. .. rst-class:: classref-constant -**FUCHSIA** = ``Color(1, 0, 1, 1)`` +**FUCHSIA** = ``Color(1, 0, 1, 1)`` :ref:`🔗` Fuchsia color. @@ -573,7 +573,7 @@ Fuchsia color. .. rst-class:: classref-constant -**GAINSBORO** = ``Color(0.862745, 0.862745, 0.862745, 1)`` +**GAINSBORO** = ``Color(0.862745, 0.862745, 0.862745, 1)`` :ref:`🔗` Gainsboro color. @@ -581,7 +581,7 @@ Gainsboro color. .. rst-class:: classref-constant -**GHOST_WHITE** = ``Color(0.972549, 0.972549, 1, 1)`` +**GHOST_WHITE** = ``Color(0.972549, 0.972549, 1, 1)`` :ref:`🔗` Ghost white color. @@ -589,7 +589,7 @@ Ghost white color. .. rst-class:: classref-constant -**GOLD** = ``Color(1, 0.843137, 0, 1)`` +**GOLD** = ``Color(1, 0.843137, 0, 1)`` :ref:`🔗` Gold color. @@ -597,7 +597,7 @@ Gold color. .. rst-class:: classref-constant -**GOLDENROD** = ``Color(0.854902, 0.647059, 0.12549, 1)`` +**GOLDENROD** = ``Color(0.854902, 0.647059, 0.12549, 1)`` :ref:`🔗` Goldenrod color. @@ -605,7 +605,7 @@ Goldenrod color. .. rst-class:: classref-constant -**GRAY** = ``Color(0.745098, 0.745098, 0.745098, 1)`` +**GRAY** = ``Color(0.745098, 0.745098, 0.745098, 1)`` :ref:`🔗` Gray color. @@ -613,7 +613,7 @@ Gray color. .. rst-class:: classref-constant -**GREEN** = ``Color(0, 1, 0, 1)`` +**GREEN** = ``Color(0, 1, 0, 1)`` :ref:`🔗` Green color. @@ -621,7 +621,7 @@ Green color. .. rst-class:: classref-constant -**GREEN_YELLOW** = ``Color(0.678431, 1, 0.184314, 1)`` +**GREEN_YELLOW** = ``Color(0.678431, 1, 0.184314, 1)`` :ref:`🔗` Green yellow color. @@ -629,7 +629,7 @@ Green yellow color. .. rst-class:: classref-constant -**HONEYDEW** = ``Color(0.941176, 1, 0.941176, 1)`` +**HONEYDEW** = ``Color(0.941176, 1, 0.941176, 1)`` :ref:`🔗` Honeydew color. @@ -637,7 +637,7 @@ Honeydew color. .. rst-class:: classref-constant -**HOT_PINK** = ``Color(1, 0.411765, 0.705882, 1)`` +**HOT_PINK** = ``Color(1, 0.411765, 0.705882, 1)`` :ref:`🔗` Hot pink color. @@ -645,7 +645,7 @@ Hot pink color. .. rst-class:: classref-constant -**INDIAN_RED** = ``Color(0.803922, 0.360784, 0.360784, 1)`` +**INDIAN_RED** = ``Color(0.803922, 0.360784, 0.360784, 1)`` :ref:`🔗` Indian red color. @@ -653,7 +653,7 @@ Indian red color. .. rst-class:: classref-constant -**INDIGO** = ``Color(0.294118, 0, 0.509804, 1)`` +**INDIGO** = ``Color(0.294118, 0, 0.509804, 1)`` :ref:`🔗` Indigo color. @@ -661,7 +661,7 @@ Indigo color. .. rst-class:: classref-constant -**IVORY** = ``Color(1, 1, 0.941176, 1)`` +**IVORY** = ``Color(1, 1, 0.941176, 1)`` :ref:`🔗` Ivory color. @@ -669,7 +669,7 @@ Ivory color. .. rst-class:: classref-constant -**KHAKI** = ``Color(0.941176, 0.901961, 0.54902, 1)`` +**KHAKI** = ``Color(0.941176, 0.901961, 0.54902, 1)`` :ref:`🔗` Khaki color. @@ -677,7 +677,7 @@ Khaki color. .. rst-class:: classref-constant -**LAVENDER** = ``Color(0.901961, 0.901961, 0.980392, 1)`` +**LAVENDER** = ``Color(0.901961, 0.901961, 0.980392, 1)`` :ref:`🔗` Lavender color. @@ -685,7 +685,7 @@ Lavender color. .. rst-class:: classref-constant -**LAVENDER_BLUSH** = ``Color(1, 0.941176, 0.960784, 1)`` +**LAVENDER_BLUSH** = ``Color(1, 0.941176, 0.960784, 1)`` :ref:`🔗` Lavender blush color. @@ -693,7 +693,7 @@ Lavender blush color. .. rst-class:: classref-constant -**LAWN_GREEN** = ``Color(0.486275, 0.988235, 0, 1)`` +**LAWN_GREEN** = ``Color(0.486275, 0.988235, 0, 1)`` :ref:`🔗` Lawn green color. @@ -701,7 +701,7 @@ Lawn green color. .. rst-class:: classref-constant -**LEMON_CHIFFON** = ``Color(1, 0.980392, 0.803922, 1)`` +**LEMON_CHIFFON** = ``Color(1, 0.980392, 0.803922, 1)`` :ref:`🔗` Lemon chiffon color. @@ -709,7 +709,7 @@ Lemon chiffon color. .. rst-class:: classref-constant -**LIGHT_BLUE** = ``Color(0.678431, 0.847059, 0.901961, 1)`` +**LIGHT_BLUE** = ``Color(0.678431, 0.847059, 0.901961, 1)`` :ref:`🔗` Light blue color. @@ -717,7 +717,7 @@ Light blue color. .. rst-class:: classref-constant -**LIGHT_CORAL** = ``Color(0.941176, 0.501961, 0.501961, 1)`` +**LIGHT_CORAL** = ``Color(0.941176, 0.501961, 0.501961, 1)`` :ref:`🔗` Light coral color. @@ -725,7 +725,7 @@ Light coral color. .. rst-class:: classref-constant -**LIGHT_CYAN** = ``Color(0.878431, 1, 1, 1)`` +**LIGHT_CYAN** = ``Color(0.878431, 1, 1, 1)`` :ref:`🔗` Light cyan color. @@ -733,7 +733,7 @@ Light cyan color. .. rst-class:: classref-constant -**LIGHT_GOLDENROD** = ``Color(0.980392, 0.980392, 0.823529, 1)`` +**LIGHT_GOLDENROD** = ``Color(0.980392, 0.980392, 0.823529, 1)`` :ref:`🔗` Light goldenrod color. @@ -741,7 +741,7 @@ Light goldenrod color. .. rst-class:: classref-constant -**LIGHT_GRAY** = ``Color(0.827451, 0.827451, 0.827451, 1)`` +**LIGHT_GRAY** = ``Color(0.827451, 0.827451, 0.827451, 1)`` :ref:`🔗` Light gray color. @@ -749,7 +749,7 @@ Light gray color. .. rst-class:: classref-constant -**LIGHT_GREEN** = ``Color(0.564706, 0.933333, 0.564706, 1)`` +**LIGHT_GREEN** = ``Color(0.564706, 0.933333, 0.564706, 1)`` :ref:`🔗` Light green color. @@ -757,7 +757,7 @@ Light green color. .. rst-class:: classref-constant -**LIGHT_PINK** = ``Color(1, 0.713726, 0.756863, 1)`` +**LIGHT_PINK** = ``Color(1, 0.713726, 0.756863, 1)`` :ref:`🔗` Light pink color. @@ -765,7 +765,7 @@ Light pink color. .. rst-class:: classref-constant -**LIGHT_SALMON** = ``Color(1, 0.627451, 0.478431, 1)`` +**LIGHT_SALMON** = ``Color(1, 0.627451, 0.478431, 1)`` :ref:`🔗` Light salmon color. @@ -773,7 +773,7 @@ Light salmon color. .. rst-class:: classref-constant -**LIGHT_SEA_GREEN** = ``Color(0.12549, 0.698039, 0.666667, 1)`` +**LIGHT_SEA_GREEN** = ``Color(0.12549, 0.698039, 0.666667, 1)`` :ref:`🔗` Light sea green color. @@ -781,7 +781,7 @@ Light sea green color. .. rst-class:: classref-constant -**LIGHT_SKY_BLUE** = ``Color(0.529412, 0.807843, 0.980392, 1)`` +**LIGHT_SKY_BLUE** = ``Color(0.529412, 0.807843, 0.980392, 1)`` :ref:`🔗` Light sky blue color. @@ -789,7 +789,7 @@ Light sky blue color. .. rst-class:: classref-constant -**LIGHT_SLATE_GRAY** = ``Color(0.466667, 0.533333, 0.6, 1)`` +**LIGHT_SLATE_GRAY** = ``Color(0.466667, 0.533333, 0.6, 1)`` :ref:`🔗` Light slate gray color. @@ -797,7 +797,7 @@ Light slate gray color. .. rst-class:: classref-constant -**LIGHT_STEEL_BLUE** = ``Color(0.690196, 0.768627, 0.870588, 1)`` +**LIGHT_STEEL_BLUE** = ``Color(0.690196, 0.768627, 0.870588, 1)`` :ref:`🔗` Light steel blue color. @@ -805,7 +805,7 @@ Light steel blue color. .. rst-class:: classref-constant -**LIGHT_YELLOW** = ``Color(1, 1, 0.878431, 1)`` +**LIGHT_YELLOW** = ``Color(1, 1, 0.878431, 1)`` :ref:`🔗` Light yellow color. @@ -813,7 +813,7 @@ Light yellow color. .. rst-class:: classref-constant -**LIME** = ``Color(0, 1, 0, 1)`` +**LIME** = ``Color(0, 1, 0, 1)`` :ref:`🔗` Lime color. @@ -821,7 +821,7 @@ Lime color. .. rst-class:: classref-constant -**LIME_GREEN** = ``Color(0.196078, 0.803922, 0.196078, 1)`` +**LIME_GREEN** = ``Color(0.196078, 0.803922, 0.196078, 1)`` :ref:`🔗` Lime green color. @@ -829,7 +829,7 @@ Lime green color. .. rst-class:: classref-constant -**LINEN** = ``Color(0.980392, 0.941176, 0.901961, 1)`` +**LINEN** = ``Color(0.980392, 0.941176, 0.901961, 1)`` :ref:`🔗` Linen color. @@ -837,7 +837,7 @@ Linen color. .. rst-class:: classref-constant -**MAGENTA** = ``Color(1, 0, 1, 1)`` +**MAGENTA** = ``Color(1, 0, 1, 1)`` :ref:`🔗` Magenta color. @@ -845,7 +845,7 @@ Magenta color. .. rst-class:: classref-constant -**MAROON** = ``Color(0.690196, 0.188235, 0.376471, 1)`` +**MAROON** = ``Color(0.690196, 0.188235, 0.376471, 1)`` :ref:`🔗` Maroon color. @@ -853,7 +853,7 @@ Maroon color. .. rst-class:: classref-constant -**MEDIUM_AQUAMARINE** = ``Color(0.4, 0.803922, 0.666667, 1)`` +**MEDIUM_AQUAMARINE** = ``Color(0.4, 0.803922, 0.666667, 1)`` :ref:`🔗` Medium aquamarine color. @@ -861,7 +861,7 @@ Medium aquamarine color. .. rst-class:: classref-constant -**MEDIUM_BLUE** = ``Color(0, 0, 0.803922, 1)`` +**MEDIUM_BLUE** = ``Color(0, 0, 0.803922, 1)`` :ref:`🔗` Medium blue color. @@ -869,7 +869,7 @@ Medium blue color. .. rst-class:: classref-constant -**MEDIUM_ORCHID** = ``Color(0.729412, 0.333333, 0.827451, 1)`` +**MEDIUM_ORCHID** = ``Color(0.729412, 0.333333, 0.827451, 1)`` :ref:`🔗` Medium orchid color. @@ -877,7 +877,7 @@ Medium orchid color. .. rst-class:: classref-constant -**MEDIUM_PURPLE** = ``Color(0.576471, 0.439216, 0.858824, 1)`` +**MEDIUM_PURPLE** = ``Color(0.576471, 0.439216, 0.858824, 1)`` :ref:`🔗` Medium purple color. @@ -885,7 +885,7 @@ Medium purple color. .. rst-class:: classref-constant -**MEDIUM_SEA_GREEN** = ``Color(0.235294, 0.701961, 0.443137, 1)`` +**MEDIUM_SEA_GREEN** = ``Color(0.235294, 0.701961, 0.443137, 1)`` :ref:`🔗` Medium sea green color. @@ -893,7 +893,7 @@ Medium sea green color. .. rst-class:: classref-constant -**MEDIUM_SLATE_BLUE** = ``Color(0.482353, 0.407843, 0.933333, 1)`` +**MEDIUM_SLATE_BLUE** = ``Color(0.482353, 0.407843, 0.933333, 1)`` :ref:`🔗` Medium slate blue color. @@ -901,7 +901,7 @@ Medium slate blue color. .. rst-class:: classref-constant -**MEDIUM_SPRING_GREEN** = ``Color(0, 0.980392, 0.603922, 1)`` +**MEDIUM_SPRING_GREEN** = ``Color(0, 0.980392, 0.603922, 1)`` :ref:`🔗` Medium spring green color. @@ -909,7 +909,7 @@ Medium spring green color. .. rst-class:: classref-constant -**MEDIUM_TURQUOISE** = ``Color(0.282353, 0.819608, 0.8, 1)`` +**MEDIUM_TURQUOISE** = ``Color(0.282353, 0.819608, 0.8, 1)`` :ref:`🔗` Medium turquoise color. @@ -917,7 +917,7 @@ Medium turquoise color. .. rst-class:: classref-constant -**MEDIUM_VIOLET_RED** = ``Color(0.780392, 0.0823529, 0.521569, 1)`` +**MEDIUM_VIOLET_RED** = ``Color(0.780392, 0.0823529, 0.521569, 1)`` :ref:`🔗` Medium violet red color. @@ -925,7 +925,7 @@ Medium violet red color. .. rst-class:: classref-constant -**MIDNIGHT_BLUE** = ``Color(0.0980392, 0.0980392, 0.439216, 1)`` +**MIDNIGHT_BLUE** = ``Color(0.0980392, 0.0980392, 0.439216, 1)`` :ref:`🔗` Midnight blue color. @@ -933,7 +933,7 @@ Midnight blue color. .. rst-class:: classref-constant -**MINT_CREAM** = ``Color(0.960784, 1, 0.980392, 1)`` +**MINT_CREAM** = ``Color(0.960784, 1, 0.980392, 1)`` :ref:`🔗` Mint cream color. @@ -941,7 +941,7 @@ Mint cream color. .. rst-class:: classref-constant -**MISTY_ROSE** = ``Color(1, 0.894118, 0.882353, 1)`` +**MISTY_ROSE** = ``Color(1, 0.894118, 0.882353, 1)`` :ref:`🔗` Misty rose color. @@ -949,7 +949,7 @@ Misty rose color. .. rst-class:: classref-constant -**MOCCASIN** = ``Color(1, 0.894118, 0.709804, 1)`` +**MOCCASIN** = ``Color(1, 0.894118, 0.709804, 1)`` :ref:`🔗` Moccasin color. @@ -957,7 +957,7 @@ Moccasin color. .. rst-class:: classref-constant -**NAVAJO_WHITE** = ``Color(1, 0.870588, 0.678431, 1)`` +**NAVAJO_WHITE** = ``Color(1, 0.870588, 0.678431, 1)`` :ref:`🔗` Navajo white color. @@ -965,7 +965,7 @@ Navajo white color. .. rst-class:: classref-constant -**NAVY_BLUE** = ``Color(0, 0, 0.501961, 1)`` +**NAVY_BLUE** = ``Color(0, 0, 0.501961, 1)`` :ref:`🔗` Navy blue color. @@ -973,7 +973,7 @@ Navy blue color. .. rst-class:: classref-constant -**OLD_LACE** = ``Color(0.992157, 0.960784, 0.901961, 1)`` +**OLD_LACE** = ``Color(0.992157, 0.960784, 0.901961, 1)`` :ref:`🔗` Old lace color. @@ -981,7 +981,7 @@ Old lace color. .. rst-class:: classref-constant -**OLIVE** = ``Color(0.501961, 0.501961, 0, 1)`` +**OLIVE** = ``Color(0.501961, 0.501961, 0, 1)`` :ref:`🔗` Olive color. @@ -989,7 +989,7 @@ Olive color. .. rst-class:: classref-constant -**OLIVE_DRAB** = ``Color(0.419608, 0.556863, 0.137255, 1)`` +**OLIVE_DRAB** = ``Color(0.419608, 0.556863, 0.137255, 1)`` :ref:`🔗` Olive drab color. @@ -997,7 +997,7 @@ Olive drab color. .. rst-class:: classref-constant -**ORANGE** = ``Color(1, 0.647059, 0, 1)`` +**ORANGE** = ``Color(1, 0.647059, 0, 1)`` :ref:`🔗` Orange color. @@ -1005,7 +1005,7 @@ Orange color. .. rst-class:: classref-constant -**ORANGE_RED** = ``Color(1, 0.270588, 0, 1)`` +**ORANGE_RED** = ``Color(1, 0.270588, 0, 1)`` :ref:`🔗` Orange red color. @@ -1013,7 +1013,7 @@ Orange red color. .. rst-class:: classref-constant -**ORCHID** = ``Color(0.854902, 0.439216, 0.839216, 1)`` +**ORCHID** = ``Color(0.854902, 0.439216, 0.839216, 1)`` :ref:`🔗` Orchid color. @@ -1021,7 +1021,7 @@ Orchid color. .. rst-class:: classref-constant -**PALE_GOLDENROD** = ``Color(0.933333, 0.909804, 0.666667, 1)`` +**PALE_GOLDENROD** = ``Color(0.933333, 0.909804, 0.666667, 1)`` :ref:`🔗` Pale goldenrod color. @@ -1029,7 +1029,7 @@ Pale goldenrod color. .. rst-class:: classref-constant -**PALE_GREEN** = ``Color(0.596078, 0.984314, 0.596078, 1)`` +**PALE_GREEN** = ``Color(0.596078, 0.984314, 0.596078, 1)`` :ref:`🔗` Pale green color. @@ -1037,7 +1037,7 @@ Pale green color. .. rst-class:: classref-constant -**PALE_TURQUOISE** = ``Color(0.686275, 0.933333, 0.933333, 1)`` +**PALE_TURQUOISE** = ``Color(0.686275, 0.933333, 0.933333, 1)`` :ref:`🔗` Pale turquoise color. @@ -1045,7 +1045,7 @@ Pale turquoise color. .. rst-class:: classref-constant -**PALE_VIOLET_RED** = ``Color(0.858824, 0.439216, 0.576471, 1)`` +**PALE_VIOLET_RED** = ``Color(0.858824, 0.439216, 0.576471, 1)`` :ref:`🔗` Pale violet red color. @@ -1053,7 +1053,7 @@ Pale violet red color. .. rst-class:: classref-constant -**PAPAYA_WHIP** = ``Color(1, 0.937255, 0.835294, 1)`` +**PAPAYA_WHIP** = ``Color(1, 0.937255, 0.835294, 1)`` :ref:`🔗` Papaya whip color. @@ -1061,7 +1061,7 @@ Papaya whip color. .. rst-class:: classref-constant -**PEACH_PUFF** = ``Color(1, 0.854902, 0.72549, 1)`` +**PEACH_PUFF** = ``Color(1, 0.854902, 0.72549, 1)`` :ref:`🔗` Peach puff color. @@ -1069,7 +1069,7 @@ Peach puff color. .. rst-class:: classref-constant -**PERU** = ``Color(0.803922, 0.521569, 0.247059, 1)`` +**PERU** = ``Color(0.803922, 0.521569, 0.247059, 1)`` :ref:`🔗` Peru color. @@ -1077,7 +1077,7 @@ Peru color. .. rst-class:: classref-constant -**PINK** = ``Color(1, 0.752941, 0.796078, 1)`` +**PINK** = ``Color(1, 0.752941, 0.796078, 1)`` :ref:`🔗` Pink color. @@ -1085,7 +1085,7 @@ Pink color. .. rst-class:: classref-constant -**PLUM** = ``Color(0.866667, 0.627451, 0.866667, 1)`` +**PLUM** = ``Color(0.866667, 0.627451, 0.866667, 1)`` :ref:`🔗` Plum color. @@ -1093,7 +1093,7 @@ Plum color. .. rst-class:: classref-constant -**POWDER_BLUE** = ``Color(0.690196, 0.878431, 0.901961, 1)`` +**POWDER_BLUE** = ``Color(0.690196, 0.878431, 0.901961, 1)`` :ref:`🔗` Powder blue color. @@ -1101,7 +1101,7 @@ Powder blue color. .. rst-class:: classref-constant -**PURPLE** = ``Color(0.627451, 0.12549, 0.941176, 1)`` +**PURPLE** = ``Color(0.627451, 0.12549, 0.941176, 1)`` :ref:`🔗` Purple color. @@ -1109,7 +1109,7 @@ Purple color. .. rst-class:: classref-constant -**REBECCA_PURPLE** = ``Color(0.4, 0.2, 0.6, 1)`` +**REBECCA_PURPLE** = ``Color(0.4, 0.2, 0.6, 1)`` :ref:`🔗` Rebecca purple color. @@ -1117,7 +1117,7 @@ Rebecca purple color. .. rst-class:: classref-constant -**RED** = ``Color(1, 0, 0, 1)`` +**RED** = ``Color(1, 0, 0, 1)`` :ref:`🔗` Red color. @@ -1125,7 +1125,7 @@ Red color. .. rst-class:: classref-constant -**ROSY_BROWN** = ``Color(0.737255, 0.560784, 0.560784, 1)`` +**ROSY_BROWN** = ``Color(0.737255, 0.560784, 0.560784, 1)`` :ref:`🔗` Rosy brown color. @@ -1133,7 +1133,7 @@ Rosy brown color. .. rst-class:: classref-constant -**ROYAL_BLUE** = ``Color(0.254902, 0.411765, 0.882353, 1)`` +**ROYAL_BLUE** = ``Color(0.254902, 0.411765, 0.882353, 1)`` :ref:`🔗` Royal blue color. @@ -1141,7 +1141,7 @@ Royal blue color. .. rst-class:: classref-constant -**SADDLE_BROWN** = ``Color(0.545098, 0.270588, 0.0745098, 1)`` +**SADDLE_BROWN** = ``Color(0.545098, 0.270588, 0.0745098, 1)`` :ref:`🔗` Saddle brown color. @@ -1149,7 +1149,7 @@ Saddle brown color. .. rst-class:: classref-constant -**SALMON** = ``Color(0.980392, 0.501961, 0.447059, 1)`` +**SALMON** = ``Color(0.980392, 0.501961, 0.447059, 1)`` :ref:`🔗` Salmon color. @@ -1157,7 +1157,7 @@ Salmon color. .. rst-class:: classref-constant -**SANDY_BROWN** = ``Color(0.956863, 0.643137, 0.376471, 1)`` +**SANDY_BROWN** = ``Color(0.956863, 0.643137, 0.376471, 1)`` :ref:`🔗` Sandy brown color. @@ -1165,7 +1165,7 @@ Sandy brown color. .. rst-class:: classref-constant -**SEA_GREEN** = ``Color(0.180392, 0.545098, 0.341176, 1)`` +**SEA_GREEN** = ``Color(0.180392, 0.545098, 0.341176, 1)`` :ref:`🔗` Sea green color. @@ -1173,7 +1173,7 @@ Sea green color. .. rst-class:: classref-constant -**SEASHELL** = ``Color(1, 0.960784, 0.933333, 1)`` +**SEASHELL** = ``Color(1, 0.960784, 0.933333, 1)`` :ref:`🔗` Seashell color. @@ -1181,7 +1181,7 @@ Seashell color. .. rst-class:: classref-constant -**SIENNA** = ``Color(0.627451, 0.321569, 0.176471, 1)`` +**SIENNA** = ``Color(0.627451, 0.321569, 0.176471, 1)`` :ref:`🔗` Sienna color. @@ -1189,7 +1189,7 @@ Sienna color. .. rst-class:: classref-constant -**SILVER** = ``Color(0.752941, 0.752941, 0.752941, 1)`` +**SILVER** = ``Color(0.752941, 0.752941, 0.752941, 1)`` :ref:`🔗` Silver color. @@ -1197,7 +1197,7 @@ Silver color. .. rst-class:: classref-constant -**SKY_BLUE** = ``Color(0.529412, 0.807843, 0.921569, 1)`` +**SKY_BLUE** = ``Color(0.529412, 0.807843, 0.921569, 1)`` :ref:`🔗` Sky blue color. @@ -1205,7 +1205,7 @@ Sky blue color. .. rst-class:: classref-constant -**SLATE_BLUE** = ``Color(0.415686, 0.352941, 0.803922, 1)`` +**SLATE_BLUE** = ``Color(0.415686, 0.352941, 0.803922, 1)`` :ref:`🔗` Slate blue color. @@ -1213,7 +1213,7 @@ Slate blue color. .. rst-class:: classref-constant -**SLATE_GRAY** = ``Color(0.439216, 0.501961, 0.564706, 1)`` +**SLATE_GRAY** = ``Color(0.439216, 0.501961, 0.564706, 1)`` :ref:`🔗` Slate gray color. @@ -1221,7 +1221,7 @@ Slate gray color. .. rst-class:: classref-constant -**SNOW** = ``Color(1, 0.980392, 0.980392, 1)`` +**SNOW** = ``Color(1, 0.980392, 0.980392, 1)`` :ref:`🔗` Snow color. @@ -1229,7 +1229,7 @@ Snow color. .. rst-class:: classref-constant -**SPRING_GREEN** = ``Color(0, 1, 0.498039, 1)`` +**SPRING_GREEN** = ``Color(0, 1, 0.498039, 1)`` :ref:`🔗` Spring green color. @@ -1237,7 +1237,7 @@ Spring green color. .. rst-class:: classref-constant -**STEEL_BLUE** = ``Color(0.27451, 0.509804, 0.705882, 1)`` +**STEEL_BLUE** = ``Color(0.27451, 0.509804, 0.705882, 1)`` :ref:`🔗` Steel blue color. @@ -1245,7 +1245,7 @@ Steel blue color. .. rst-class:: classref-constant -**TAN** = ``Color(0.823529, 0.705882, 0.54902, 1)`` +**TAN** = ``Color(0.823529, 0.705882, 0.54902, 1)`` :ref:`🔗` Tan color. @@ -1253,7 +1253,7 @@ Tan color. .. rst-class:: classref-constant -**TEAL** = ``Color(0, 0.501961, 0.501961, 1)`` +**TEAL** = ``Color(0, 0.501961, 0.501961, 1)`` :ref:`🔗` Teal color. @@ -1261,7 +1261,7 @@ Teal color. .. rst-class:: classref-constant -**THISTLE** = ``Color(0.847059, 0.74902, 0.847059, 1)`` +**THISTLE** = ``Color(0.847059, 0.74902, 0.847059, 1)`` :ref:`🔗` Thistle color. @@ -1269,7 +1269,7 @@ Thistle color. .. rst-class:: classref-constant -**TOMATO** = ``Color(1, 0.388235, 0.278431, 1)`` +**TOMATO** = ``Color(1, 0.388235, 0.278431, 1)`` :ref:`🔗` Tomato color. @@ -1277,7 +1277,7 @@ Tomato color. .. rst-class:: classref-constant -**TRANSPARENT** = ``Color(1, 1, 1, 0)`` +**TRANSPARENT** = ``Color(1, 1, 1, 0)`` :ref:`🔗` Transparent color (white with zero alpha). @@ -1285,7 +1285,7 @@ Transparent color (white with zero alpha). .. rst-class:: classref-constant -**TURQUOISE** = ``Color(0.25098, 0.878431, 0.815686, 1)`` +**TURQUOISE** = ``Color(0.25098, 0.878431, 0.815686, 1)`` :ref:`🔗` Turquoise color. @@ -1293,7 +1293,7 @@ Turquoise color. .. rst-class:: classref-constant -**VIOLET** = ``Color(0.933333, 0.509804, 0.933333, 1)`` +**VIOLET** = ``Color(0.933333, 0.509804, 0.933333, 1)`` :ref:`🔗` Violet color. @@ -1301,7 +1301,7 @@ Violet color. .. rst-class:: classref-constant -**WEB_GRAY** = ``Color(0.501961, 0.501961, 0.501961, 1)`` +**WEB_GRAY** = ``Color(0.501961, 0.501961, 0.501961, 1)`` :ref:`🔗` Web gray color. @@ -1309,7 +1309,7 @@ Web gray color. .. rst-class:: classref-constant -**WEB_GREEN** = ``Color(0, 0.501961, 0, 1)`` +**WEB_GREEN** = ``Color(0, 0.501961, 0, 1)`` :ref:`🔗` Web green color. @@ -1317,7 +1317,7 @@ Web green color. .. rst-class:: classref-constant -**WEB_MAROON** = ``Color(0.501961, 0, 0, 1)`` +**WEB_MAROON** = ``Color(0.501961, 0, 0, 1)`` :ref:`🔗` Web maroon color. @@ -1325,7 +1325,7 @@ Web maroon color. .. rst-class:: classref-constant -**WEB_PURPLE** = ``Color(0.501961, 0, 0.501961, 1)`` +**WEB_PURPLE** = ``Color(0.501961, 0, 0.501961, 1)`` :ref:`🔗` Web purple color. @@ -1333,7 +1333,7 @@ Web purple color. .. rst-class:: classref-constant -**WHEAT** = ``Color(0.960784, 0.870588, 0.701961, 1)`` +**WHEAT** = ``Color(0.960784, 0.870588, 0.701961, 1)`` :ref:`🔗` Wheat color. @@ -1341,7 +1341,7 @@ Wheat color. .. rst-class:: classref-constant -**WHITE** = ``Color(1, 1, 1, 1)`` +**WHITE** = ``Color(1, 1, 1, 1)`` :ref:`🔗` White color. @@ -1349,7 +1349,7 @@ White color. .. rst-class:: classref-constant -**WHITE_SMOKE** = ``Color(0.960784, 0.960784, 0.960784, 1)`` +**WHITE_SMOKE** = ``Color(0.960784, 0.960784, 0.960784, 1)`` :ref:`🔗` White smoke color. @@ -1357,7 +1357,7 @@ White smoke color. .. rst-class:: classref-constant -**YELLOW** = ``Color(1, 1, 0, 1)`` +**YELLOW** = ``Color(1, 1, 0, 1)`` :ref:`🔗` Yellow color. @@ -1365,7 +1365,7 @@ Yellow color. .. rst-class:: classref-constant -**YELLOW_GREEN** = ``Color(0.603922, 0.803922, 0.196078, 1)`` +**YELLOW_GREEN** = ``Color(0.603922, 0.803922, 0.196078, 1)`` :ref:`🔗` Yellow green color. @@ -1382,7 +1382,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **a** = ``1.0`` +:ref:`float` **a** = ``1.0`` :ref:`🔗` The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque. @@ -1394,7 +1394,7 @@ The color's alpha component, typically on the range of 0 to 1. A value of 0 mean .. rst-class:: classref-property -:ref:`int` **a8** = ``255`` +:ref:`int` **a8** = ``255`` :ref:`🔗` Wrapper for :ref:`a` that uses the range 0 to 255, instead of 0 to 1. @@ -1406,7 +1406,7 @@ Wrapper for :ref:`a` that uses the range 0 to 255, inste .. rst-class:: classref-property -:ref:`float` **b** = ``0.0`` +:ref:`float` **b** = ``0.0`` :ref:`🔗` The color's blue component, typically on the range of 0 to 1. @@ -1418,7 +1418,7 @@ The color's blue component, typically on the range of 0 to 1. .. rst-class:: classref-property -:ref:`int` **b8** = ``0`` +:ref:`int` **b8** = ``0`` :ref:`🔗` Wrapper for :ref:`b` that uses the range 0 to 255, instead of 0 to 1. @@ -1430,7 +1430,7 @@ Wrapper for :ref:`b` that uses the range 0 to 255, inste .. rst-class:: classref-property -:ref:`float` **g** = ``0.0`` +:ref:`float` **g** = ``0.0`` :ref:`🔗` The color's green component, typically on the range of 0 to 1. @@ -1442,7 +1442,7 @@ The color's green component, typically on the range of 0 to 1. .. rst-class:: classref-property -:ref:`int` **g8** = ``0`` +:ref:`int` **g8** = ``0`` :ref:`🔗` Wrapper for :ref:`g` that uses the range 0 to 255, instead of 0 to 1. @@ -1454,7 +1454,7 @@ Wrapper for :ref:`g` that uses the range 0 to 255, inste .. rst-class:: classref-property -:ref:`float` **h** = ``0.0`` +:ref:`float` **h** = ``0.0`` :ref:`🔗` The HSV hue of this color, on the range 0 to 1. @@ -1466,7 +1466,7 @@ The HSV hue of this color, on the range 0 to 1. .. rst-class:: classref-property -:ref:`float` **r** = ``0.0`` +:ref:`float` **r** = ``0.0`` :ref:`🔗` The color's red component, typically on the range of 0 to 1. @@ -1478,7 +1478,7 @@ The color's red component, typically on the range of 0 to 1. .. rst-class:: classref-property -:ref:`int` **r8** = ``0`` +:ref:`int` **r8** = ``0`` :ref:`🔗` Wrapper for :ref:`r` that uses the range 0 to 255, instead of 0 to 1. @@ -1490,7 +1490,7 @@ Wrapper for :ref:`r` that uses the range 0 to 255, inste .. rst-class:: classref-property -:ref:`float` **s** = ``0.0`` +:ref:`float` **s** = ``0.0`` :ref:`🔗` The HSV saturation of this color, on the range 0 to 1. @@ -1502,7 +1502,7 @@ The HSV saturation of this color, on the range 0 to 1. .. rst-class:: classref-property -:ref:`float` **v** = ``0.0`` +:ref:`float` **v** = ``0.0`` :ref:`🔗` The HSV value (brightness) of this color, on the range 0 to 1. @@ -1519,7 +1519,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Color` **Color** **(** **)** +:ref:`Color` **Color**\ (\ ) :ref:`🔗` Constructs a default **Color** from opaque black. This is the same as :ref:`BLACK`. @@ -1531,7 +1531,7 @@ Constructs a default **Color** from opaque black. This is the same as :ref:`BLAC .. rst-class:: classref-constructor -:ref:`Color` **Color** **(** :ref:`Color` from, :ref:`float` alpha **)** +:ref:`Color` **Color**\ (\ from\: :ref:`Color`, alpha\: :ref:`float`\ ) Constructs a **Color** from the existing color, with :ref:`a` set to the given ``alpha`` value. @@ -1554,7 +1554,7 @@ Constructs a **Color** from the existing color, with :ref:`a` **Color** **(** :ref:`Color` from **)** +:ref:`Color` **Color**\ (\ from\: :ref:`Color`\ ) Constructs a **Color** as a copy of the given **Color**. @@ -1564,7 +1564,7 @@ Constructs a **Color** as a copy of the given **Color**. .. rst-class:: classref-constructor -:ref:`Color` **Color** **(** :ref:`String` code **)** +:ref:`Color` **Color**\ (\ code\: :ref:`String`\ ) Constructs a **Color** either from an HTML color code or from a standardized color name. The supported color names are the same as the constants. @@ -1574,7 +1574,7 @@ Constructs a **Color** either from an HTML color code or from a standardized col .. rst-class:: classref-constructor -:ref:`Color` **Color** **(** :ref:`String` code, :ref:`float` alpha **)** +:ref:`Color` **Color**\ (\ code\: :ref:`String`, alpha\: :ref:`float`\ ) Constructs a **Color** either from an HTML color code or from a standardized color name, with ``alpha`` on the range of 0.0 to 1.0. The supported color names are the same as the constants. @@ -1584,7 +1584,7 @@ Constructs a **Color** either from an HTML color code or from a standardized col .. rst-class:: classref-constructor -:ref:`Color` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b **)** +:ref:`Color` **Color**\ (\ r\: :ref:`float`, g\: :ref:`float`, b\: :ref:`float`\ ) Constructs a **Color** from RGB values, typically between 0.0 and 1.0. :ref:`a` is set to 1.0. @@ -1607,7 +1607,7 @@ Constructs a **Color** from RGB values, typically between 0.0 and 1.0. :ref:`a` **Color** **(** :ref:`float` r, :ref:`float` g, :ref:`float` b, :ref:`float` a **)** +:ref:`Color` **Color**\ (\ r\: :ref:`float`, g\: :ref:`float`, b\: :ref:`float`, a\: :ref:`float`\ ) Constructs a **Color** from RGBA values, typically between 0.0 and 1.0. @@ -1637,7 +1637,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Color` **blend** **(** :ref:`Color` over **)** |const| +:ref:`Color` **blend**\ (\ over\: :ref:`Color`\ ) |const| :ref:`🔗` Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the ``over`` color painted over this color (including alpha). @@ -1666,7 +1666,7 @@ Returns a new color resulting from overlaying this color over the given color. I .. rst-class:: classref-method -:ref:`Color` **clamp** **(** :ref:`Color` min=Color(0, 0, 0, 0), :ref:`Color` max=Color(1, 1, 1, 1) **)** |const| +:ref:`Color` **clamp**\ (\ min\: :ref:`Color` = Color(0, 0, 0, 0), max\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗` Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. @@ -1678,7 +1678,7 @@ Returns a new color with all components clamped between the components of ``min` .. rst-class:: classref-method -:ref:`Color` **darkened** **(** :ref:`float` amount **)** |const| +:ref:`Color` **darkened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`🔗` Returns a new color resulting from making this color darker by the specified ``amount`` (ratio from 0.0 to 1.0). See also :ref:`lightened`. @@ -1705,7 +1705,7 @@ Returns a new color resulting from making this color darker by the specified ``a .. rst-class:: classref-method -:ref:`Color` **from_hsv** **(** :ref:`float` h, :ref:`float` s, :ref:`float` v, :ref:`float` alpha=1.0 **)** |static| +:ref:`Color` **from_hsv**\ (\ h\: :ref:`float`, s\: :ref:`float`, v\: :ref:`float`, alpha\: :ref:`float` = 1.0\ ) |static| :ref:`🔗` Constructs a color from an `HSV profile `__. The hue (``h``), saturation (``s``), and value (``v``) are typically between 0.0 and 1.0. @@ -1730,7 +1730,7 @@ Constructs a color from an `HSV profile ` **from_ok_hsl** **(** :ref:`float` h, :ref:`float` s, :ref:`float` l, :ref:`float` alpha=1.0 **)** |static| +:ref:`Color` **from_ok_hsl**\ (\ h\: :ref:`float`, s\: :ref:`float`, l\: :ref:`float`, alpha\: :ref:`float` = 1.0\ ) |static| :ref:`🔗` Constructs a color from an `OK HSL profile `__. The hue (``h``), saturation (``s``), and lightness (``l``) are typically between 0.0 and 1.0. @@ -1755,9 +1755,9 @@ Constructs a color from an `OK HSL profile ` **from_rgbe9995** **(** :ref:`int` rgbe **)** |static| +:ref:`Color` **from_rgbe9995**\ (\ rgbe\: :ref:`int`\ ) |static| :ref:`🔗` -Decodes a **Color** from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. +Decodes a **Color** from an RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9995`. .. rst-class:: classref-item-separator @@ -1767,7 +1767,7 @@ Decodes a **Color** from a RGBE9995 format integer. See :ref:`Image.FORMAT_RGBE9 .. rst-class:: classref-method -:ref:`Color` **from_string** **(** :ref:`String` str, :ref:`Color` default **)** |static| +:ref:`Color` **from_string**\ (\ str\: :ref:`String`, default\: :ref:`Color`\ ) |static| :ref:`🔗` Creates a **Color** from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns ``default`` if the color cannot be inferred from the string. @@ -1779,7 +1779,7 @@ Creates a **Color** from the given string, which can be either an HTML color cod .. rst-class:: classref-method -:ref:`float` **get_luminance** **(** **)** |const| +:ref:`float` **get_luminance**\ (\ ) |const| :ref:`🔗` Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. @@ -1793,9 +1793,9 @@ Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclus .. rst-class:: classref-method -:ref:`Color` **hex** **(** :ref:`int` hex **)** |static| +:ref:`Color` **hex**\ (\ hex\: :ref:`int`\ ) |static| :ref:`🔗` -Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). +Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of :ref:`to_rgba32`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRGGBBAA"``). @@ -1824,9 +1824,9 @@ In GDScript and C#, the :ref:`int` is best visualized with hexadecima .. rst-class:: classref-method -:ref:`Color` **hex64** **(** :ref:`int` hex **)** |static| +:ref:`Color` **hex64**\ (\ hex\: :ref:`int`\ ) |static| :ref:`🔗` -Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). +Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of :ref:`to_rgba64`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRRRGGGGBBBBAAAA"``). @@ -1838,7 +1838,7 @@ In GDScript and C#, the :ref:`int` is best visualized with hexadecima .. rst-class:: classref-method -:ref:`Color` **html** **(** :ref:`String` rgba **)** |static| +:ref:`Color` **html**\ (\ rgba\: :ref:`String`\ ) |static| :ref:`🔗` Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is not case-sensitive, and may be prefixed by a hash sign (``#``). @@ -1869,7 +1869,7 @@ Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is .. rst-class:: classref-method -:ref:`bool` **html_is_valid** **(** :ref:`String` color **)** |static| +:ref:`bool` **html_is_valid**\ (\ color\: :ref:`String`\ ) |static| :ref:`🔗` Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color`. @@ -1883,7 +1883,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri Color.html_is_valid("55AAFF") # Returns true Color.html_is_valid("#F2C") # Returns true - Color.html_is_valid("#AABBC) # Returns false + Color.html_is_valid("#AABBC") # Returns false Color.html_is_valid("#55aaFF5") # Returns false .. code-tab:: csharp @@ -1906,7 +1906,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri .. rst-class:: classref-method -:ref:`Color` **inverted** **(** **)** |const| +:ref:`Color` **inverted**\ (\ ) |const| :ref:`🔗` Returns the color with its :ref:`r`, :ref:`g`, and :ref:`b` components inverted (``(1 - r, 1 - g, 1 - b, a)``). @@ -1935,7 +1935,7 @@ Returns the color with its :ref:`r`, :ref:`g` **is_equal_approx** **(** :ref:`Color` to **)** |const| +:ref:`bool` **is_equal_approx**\ (\ to\: :ref:`Color`\ ) |const| :ref:`🔗` Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. @@ -1947,7 +1947,7 @@ Returns ``true`` if this color and ``to`` are approximately equal, by running :r .. rst-class:: classref-method -:ref:`Color` **lerp** **(** :ref:`Color` to, :ref:`float` weight **)** |const| +:ref:`Color` **lerp**\ (\ to\: :ref:`Color`, weight\: :ref:`float`\ ) |const| :ref:`🔗` Returns the linear interpolation between this color's components and ``to``'s components. The interpolation factor ``weight`` should be between 0.0 and 1.0 (inclusive). See also :ref:`@GlobalScope.lerp`. @@ -1982,7 +1982,7 @@ Returns the linear interpolation between this color's components and ``to``'s co .. rst-class:: classref-method -:ref:`Color` **lightened** **(** :ref:`float` amount **)** |const| +:ref:`Color` **lightened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`🔗` Returns a new color resulting from making this color lighter by the specified ``amount``, which should be a ratio from 0.0 to 1.0. See also :ref:`darkened`. @@ -2009,7 +2009,7 @@ Returns a new color resulting from making this color lighter by the specified `` .. rst-class:: classref-method -:ref:`Color` **linear_to_srgb** **(** **)** |const| +:ref:`Color` **linear_to_srgb**\ (\ ) |const| :ref:`🔗` Returns the color converted to the `sRGB `__ color space. This method assumes the original color is in the linear color space. See also :ref:`srgb_to_linear` which performs the opposite operation. @@ -2021,7 +2021,7 @@ Returns the color converted to the `sRGB `__ .. rst-class:: classref-method -:ref:`Color` **srgb_to_linear** **(** **)** |const| +:ref:`Color` **srgb_to_linear**\ (\ ) |const| :ref:`🔗` Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also :ref:`linear_to_srgb` which performs the opposite operation. @@ -2033,7 +2033,7 @@ Returns the color converted to the linear color space. This method assumes the o .. rst-class:: classref-method -:ref:`int` **to_abgr32** **(** **)** |const| +:ref:`int` **to_abgr32**\ (\ ) |const| :ref:`🔗` Returns the color converted to a 32-bit integer in ABGR format (each component is 8 bits). ABGR is the reversed version of the default RGBA format. @@ -2060,7 +2060,7 @@ Returns the color converted to a 32-bit integer in ABGR format (each component i .. rst-class:: classref-method -:ref:`int` **to_abgr64** **(** **)** |const| +:ref:`int` **to_abgr64**\ (\ ) |const| :ref:`🔗` Returns the color converted to a 64-bit integer in ABGR format (each component is 16 bits). ABGR is the reversed version of the default RGBA format. @@ -2087,7 +2087,7 @@ Returns the color converted to a 64-bit integer in ABGR format (each component i .. rst-class:: classref-method -:ref:`int` **to_argb32** **(** **)** |const| +:ref:`int` **to_argb32**\ (\ ) |const| :ref:`🔗` Returns the color converted to a 32-bit integer in ARGB format (each component is 8 bits). ARGB is more compatible with DirectX. @@ -2114,7 +2114,7 @@ Returns the color converted to a 32-bit integer in ARGB format (each component i .. rst-class:: classref-method -:ref:`int` **to_argb64** **(** **)** |const| +:ref:`int` **to_argb64**\ (\ ) |const| :ref:`🔗` Returns the color converted to a 64-bit integer in ARGB format (each component is 16 bits). ARGB is more compatible with DirectX. @@ -2141,7 +2141,7 @@ Returns the color converted to a 64-bit integer in ARGB format (each component i .. rst-class:: classref-method -:ref:`String` **to_html** **(** :ref:`bool` with_alpha=true **)** |const| +:ref:`String` **to_html**\ (\ with_alpha\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns the color converted to an HTML hexadecimal color :ref:`String` in RGBA format, without the hash (``#``) prefix. @@ -2172,9 +2172,9 @@ Setting ``with_alpha`` to ``false``, excludes alpha from the hexadecimal string, .. rst-class:: classref-method -:ref:`int` **to_rgba32** **(** **)** |const| +:ref:`int` **to_rgba32**\ (\ ) |const| :ref:`🔗` -Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. +Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex`. .. tabs:: @@ -2199,9 +2199,9 @@ Returns the color converted to a 32-bit integer in RGBA format (each component i .. rst-class:: classref-method -:ref:`int` **to_rgba64** **(** **)** |const| +:ref:`int` **to_rgba64**\ (\ ) |const| :ref:`🔗` -Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. +Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format. This method is the inverse of :ref:`hex64`. .. tabs:: @@ -2231,7 +2231,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`Color` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Returns ``true`` if the colors are not exactly equal. @@ -2245,7 +2245,7 @@ Returns ``true`` if the colors are not exactly equal. .. rst-class:: classref-operator -:ref:`Color` **operator *** **(** :ref:`Color` right **)** +:ref:`Color` **operator ***\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Multiplies each component of the **Color** by the components of the given **Color**. @@ -2257,7 +2257,7 @@ Multiplies each component of the **Color** by the components of the given **Colo .. rst-class:: classref-operator -:ref:`Color` **operator *** **(** :ref:`float` right **)** +:ref:`Color` **operator ***\ (\ right\: :ref:`float`\ ) :ref:`🔗` Multiplies each component of the **Color** by the given :ref:`float`. @@ -2269,7 +2269,7 @@ Multiplies each component of the **Color** by the given :ref:`float .. rst-class:: classref-operator -:ref:`Color` **operator *** **(** :ref:`int` right **)** +:ref:`Color` **operator ***\ (\ right\: :ref:`int`\ ) :ref:`🔗` Multiplies each component of the **Color** by the given :ref:`int`. @@ -2281,7 +2281,7 @@ Multiplies each component of the **Color** by the given :ref:`int`. .. rst-class:: classref-operator -:ref:`Color` **operator +** **(** :ref:`Color` right **)** +:ref:`Color` **operator +**\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Adds each component of the **Color** with the components of the given **Color**. @@ -2293,7 +2293,7 @@ Adds each component of the **Color** with the components of the given **Color**. .. rst-class:: classref-operator -:ref:`Color` **operator -** **(** :ref:`Color` right **)** +:ref:`Color` **operator -**\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Subtracts each component of the **Color** by the components of the given **Color**. @@ -2305,7 +2305,7 @@ Subtracts each component of the **Color** by the components of the given **Color .. rst-class:: classref-operator -:ref:`Color` **operator /** **(** :ref:`Color` right **)** +:ref:`Color` **operator /**\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Divides each component of the **Color** by the components of the given **Color**. @@ -2317,7 +2317,7 @@ Divides each component of the **Color** by the components of the given **Color** .. rst-class:: classref-operator -:ref:`Color` **operator /** **(** :ref:`float` right **)** +:ref:`Color` **operator /**\ (\ right\: :ref:`float`\ ) :ref:`🔗` Divides each component of the **Color** by the given :ref:`float`. @@ -2329,7 +2329,7 @@ Divides each component of the **Color** by the given :ref:`float`. .. rst-class:: classref-operator -:ref:`Color` **operator /** **(** :ref:`int` right **)** +:ref:`Color` **operator /**\ (\ right\: :ref:`int`\ ) :ref:`🔗` Divides each component of the **Color** by the given :ref:`int`. @@ -2341,7 +2341,7 @@ Divides each component of the **Color** by the given :ref:`int`. .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`Color` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`Color`\ ) :ref:`🔗` Returns ``true`` if the colors are exactly equal. @@ -2355,7 +2355,7 @@ Returns ``true`` if the colors are exactly equal. .. rst-class:: classref-operator -:ref:`float` **operator []** **(** :ref:`int` index **)** +:ref:`float` **operator []**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Access color components using their index. ``[0]`` is equivalent to :ref:`r`, ``[1]`` is equivalent to :ref:`g`, ``[2]`` is equivalent to :ref:`b`, and ``[3]`` is equivalent to :ref:`a`. @@ -2367,7 +2367,7 @@ Access color components using their index. ``[0]`` is equivalent to :ref:`r` **operator unary+** **(** **)** +:ref:`Color` **operator unary+**\ (\ ) :ref:`🔗` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -2379,7 +2379,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Color` **operator unary-** **(** **)** +:ref:`Color` **operator unary-**\ (\ ) :ref:`🔗` Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted`, the :ref:`a` component is inverted, too. @@ -2390,3 +2390,4 @@ Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 7bf1435921c..d54507532df 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -28,7 +28,7 @@ A widget that provides an interface for selecting or modifying a color. It can o Tutorials --------- -- `Tween Demo `__ +- `Tween Interpolation Demo `__ .. rst-class:: classref-reftable-group @@ -70,19 +70,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_preset` **(** :ref:`Color` color **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_recent_preset` **(** :ref:`Color` color **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_preset` **(** :ref:`Color` color **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_recent_preset` **(** :ref:`Color` color **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray` | :ref:`get_presets` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray` | :ref:`get_recent_presets` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_preset`\ (\ color\: :ref:`Color`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_recent_preset`\ (\ color\: :ref:`Color`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_preset`\ (\ color\: :ref:`Color`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_recent_preset`\ (\ color\: :ref:`Color`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`get_presets`\ (\ ) |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`get_recent_presets`\ (\ ) |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -123,6 +123,8 @@ Theme Properties +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`sample_bg` | | +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + | :ref:`Texture2D` | :ref:`sample_revert` | | + +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`screen_picker` | | +-----------------------------------+----------------------------------------------------------------------------------------+---------+ | :ref:`Texture2D` | :ref:`shape_circle` | | @@ -145,7 +147,7 @@ Signals .. rst-class:: classref-signal -**color_changed** **(** :ref:`Color` color **)** +**color_changed**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Emitted when the color is changed. @@ -157,7 +159,7 @@ Emitted when the color is changed. .. rst-class:: classref-signal -**preset_added** **(** :ref:`Color` color **)** +**preset_added**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Emitted when a preset is added. @@ -169,7 +171,7 @@ Emitted when a preset is added. .. rst-class:: classref-signal -**preset_removed** **(** :ref:`Color` color **)** +**preset_removed**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Emitted when a preset is removed. @@ -186,7 +188,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ColorModeType**: +enum **ColorModeType**: :ref:`🔗` .. _class_ColorPicker_constant_MODE_RGB: @@ -232,7 +234,7 @@ OKHSL is a new color space similar to HSL but that better match perception by le .. rst-class:: classref-enumeration -enum **PickerShapeType**: +enum **PickerShapeType**: :ref:`🔗` .. _class_ColorPicker_constant_SHAPE_HSV_RECTANGLE: @@ -287,12 +289,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **can_add_swatches** = ``true`` +:ref:`bool` **can_add_swatches** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_can_add_swatches** **(** :ref:`bool` value **)** -- :ref:`bool` **are_swatches_enabled** **(** **)** +- |void| **set_can_add_swatches**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_swatches_enabled**\ (\ ) If ``true``, it's possible to add presets under Swatches. If ``false``, the button to add presets is disabled. @@ -304,12 +306,12 @@ If ``true``, it's possible to add presets under Swatches. If ``false``, the butt .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pick_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_pick_color** **(** **)** +- |void| **set_pick_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_pick_color**\ (\ ) The currently selected color. @@ -321,12 +323,12 @@ The currently selected color. .. rst-class:: classref-property -:ref:`ColorModeType` **color_mode** = ``0`` +:ref:`ColorModeType` **color_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_mode** **(** :ref:`ColorModeType` value **)** -- :ref:`ColorModeType` **get_color_mode** **(** **)** +- |void| **set_color_mode**\ (\ value\: :ref:`ColorModeType`\ ) +- :ref:`ColorModeType` **get_color_mode**\ (\ ) The currently selected color mode. See :ref:`ColorModeType`. @@ -338,12 +340,12 @@ The currently selected color mode. See :ref:`ColorModeType` **color_modes_visible** = ``true`` +:ref:`bool` **color_modes_visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_modes_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **are_modes_visible** **(** **)** +- |void| **set_modes_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_modes_visible**\ (\ ) If ``true``, the color mode buttons are visible. @@ -355,12 +357,12 @@ If ``true``, the color mode buttons are visible. .. rst-class:: classref-property -:ref:`bool` **deferred_mode** = ``false`` +:ref:`bool` **deferred_mode** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_deferred_mode** **(** :ref:`bool` value **)** -- :ref:`bool` **is_deferred_mode** **(** **)** +- |void| **set_deferred_mode**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_deferred_mode**\ (\ ) If ``true``, 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). @@ -372,12 +374,12 @@ If ``true``, the color will apply only after the user releases the mouse button, .. rst-class:: classref-property -:ref:`bool` **edit_alpha** = ``true`` +:ref:`bool` **edit_alpha** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_edit_alpha** **(** :ref:`bool` value **)** -- :ref:`bool` **is_editing_alpha** **(** **)** +- |void| **set_edit_alpha**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_editing_alpha**\ (\ ) If ``true``, shows an alpha channel slider (opacity). @@ -389,12 +391,12 @@ If ``true``, shows an alpha channel slider (opacity). .. rst-class:: classref-property -:ref:`bool` **hex_visible** = ``true`` +:ref:`bool` **hex_visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_hex_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **is_hex_visible** **(** **)** +- |void| **set_hex_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_hex_visible**\ (\ ) If ``true``, the hex color code input field is visible. @@ -406,12 +408,12 @@ If ``true``, the hex color code input field is visible. .. rst-class:: classref-property -:ref:`PickerShapeType` **picker_shape** = ``0`` +:ref:`PickerShapeType` **picker_shape** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_picker_shape** **(** :ref:`PickerShapeType` value **)** -- :ref:`PickerShapeType` **get_picker_shape** **(** **)** +- |void| **set_picker_shape**\ (\ value\: :ref:`PickerShapeType`\ ) +- :ref:`PickerShapeType` **get_picker_shape**\ (\ ) The shape of the color space view. See :ref:`PickerShapeType`. @@ -423,12 +425,12 @@ The shape of the color space view. See :ref:`PickerShapeType` **presets_visible** = ``true`` +:ref:`bool` **presets_visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_presets_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **are_presets_visible** **(** **)** +- |void| **set_presets_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_presets_visible**\ (\ ) If ``true``, the Swatches and Recent Colors presets are visible. @@ -440,12 +442,12 @@ If ``true``, the Swatches and Recent Colors presets are visible. .. rst-class:: classref-property -:ref:`bool` **sampler_visible** = ``true`` +:ref:`bool` **sampler_visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sampler_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **is_sampler_visible** **(** **)** +- |void| **set_sampler_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_sampler_visible**\ (\ ) If ``true``, the color sampler and color preview are visible. @@ -457,12 +459,12 @@ If ``true``, the color sampler and color preview are visible. .. rst-class:: classref-property -:ref:`bool` **sliders_visible** = ``true`` +:ref:`bool` **sliders_visible** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sliders_visible** **(** :ref:`bool` value **)** -- :ref:`bool` **are_sliders_visible** **(** **)** +- |void| **set_sliders_visible**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **are_sliders_visible**\ (\ ) If ``true``, the color sliders are visible. @@ -479,7 +481,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_preset** **(** :ref:`Color` color **)** +|void| **add_preset**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` 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. @@ -493,7 +495,7 @@ Adds the given color to a list of color presets. The presets are displayed in th .. rst-class:: classref-method -void **add_recent_preset** **(** :ref:`Color` color **)** +|void| **add_recent_preset**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color. @@ -507,7 +509,7 @@ Adds the given color to a list of color recent presets so that it can be picked .. rst-class:: classref-method -void **erase_preset** **(** :ref:`Color` color **)** +|void| **erase_preset**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Removes the given color from the list of color presets of this color picker. @@ -519,7 +521,7 @@ Removes the given color from the list of color presets of this color picker. .. rst-class:: classref-method -void **erase_recent_preset** **(** :ref:`Color` color **)** +|void| **erase_recent_preset**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Removes the given color from the list of color recent presets of this color picker. @@ -531,7 +533,7 @@ Removes the given color from the list of color recent presets of this color pick .. rst-class:: classref-method -:ref:`PackedColorArray` **get_presets** **(** **)** |const| +:ref:`PackedColorArray` **get_presets**\ (\ ) |const| :ref:`🔗` Returns the list of colors in the presets of the color picker. @@ -543,7 +545,7 @@ Returns the list of colors in the presets of the color picker. .. rst-class:: classref-method -:ref:`PackedColorArray` **get_recent_presets** **(** **)** |const| +:ref:`PackedColorArray` **get_recent_presets**\ (\ ) |const| :ref:`🔗` Returns the list of colors in the recent presets of the color picker. @@ -560,9 +562,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int` **center_slider_grabbers** = ``1`` +:ref:`int` **center_slider_grabbers** = ``1`` :ref:`🔗` -Overrides the :ref:`HSlider.center_grabber` theme property of the sliders. +Overrides the :ref:`Slider.center_grabber` theme property of the sliders. .. rst-class:: classref-item-separator @@ -572,7 +574,7 @@ Overrides the :ref:`HSlider.center_grabber` **h_width** = ``30`` +:ref:`int` **h_width** = ``30`` :ref:`🔗` The width of the hue selection slider. @@ -584,7 +586,7 @@ The width of the hue selection slider. .. rst-class:: classref-themeproperty -:ref:`int` **label_width** = ``10`` +:ref:`int` **label_width** = ``10`` :ref:`🔗` The minimum width of the color labels next to sliders. @@ -596,7 +598,7 @@ The minimum width of the color labels next to sliders. .. rst-class:: classref-themeproperty -:ref:`int` **margin** = ``4`` +:ref:`int` **margin** = ``4`` :ref:`🔗` The margin around the **ColorPicker**. @@ -608,7 +610,7 @@ The margin around the **ColorPicker**. .. rst-class:: classref-themeproperty -:ref:`int` **sv_height** = ``256`` +:ref:`int` **sv_height** = ``256`` :ref:`🔗` The height of the saturation-value selection box. @@ -620,7 +622,7 @@ The height of the saturation-value selection box. .. rst-class:: classref-themeproperty -:ref:`int` **sv_width** = ``256`` +:ref:`int` **sv_width** = ``256`` :ref:`🔗` The width of the saturation-value selection box. @@ -632,7 +634,7 @@ The width of the saturation-value selection box. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **add_preset** +:ref:`Texture2D` **add_preset** :ref:`🔗` The icon for the "Add Preset" button. @@ -644,7 +646,7 @@ The icon for the "Add Preset" button. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **bar_arrow** +:ref:`Texture2D` **bar_arrow** :ref:`🔗` The texture for the arrow grabber. @@ -656,7 +658,7 @@ The texture for the arrow grabber. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **color_hue** +:ref:`Texture2D` **color_hue** :ref:`🔗` Custom texture for the hue selection slider on the right. @@ -668,7 +670,7 @@ Custom texture for the hue selection slider on the right. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **color_okhsl_hue** +:ref:`Texture2D` **color_okhsl_hue** :ref:`🔗` Custom texture for the H slider in the OKHSL color mode. @@ -680,7 +682,7 @@ Custom texture for the H slider in the OKHSL color mode. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **expanded_arrow** +:ref:`Texture2D` **expanded_arrow** :ref:`🔗` The icon for color preset drop down menu when expanded. @@ -692,7 +694,7 @@ The icon for color preset drop down menu when expanded. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **folded_arrow** +:ref:`Texture2D` **folded_arrow** :ref:`🔗` The icon for color preset drop down menu when folded. @@ -704,7 +706,7 @@ The icon for color preset drop down menu when folded. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **overbright_indicator** +:ref:`Texture2D` **overbright_indicator** :ref:`🔗` The indicator used to signalize that the color value is outside the 0-1 range. @@ -716,7 +718,7 @@ The indicator used to signalize that the color value is outside the 0-1 range. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **picker_cursor** +:ref:`Texture2D` **picker_cursor** :ref:`🔗` The image displayed over the color box/circle (depending on the :ref:`picker_shape`), marking the currently selected color. @@ -728,7 +730,7 @@ The image displayed over the color box/circle (depending on the :ref:`picker_sha .. rst-class:: classref-themeproperty -:ref:`Texture2D` **sample_bg** +:ref:`Texture2D` **sample_bg** :ref:`🔗` Background panel for the color preview box (visible when the color is translucent). @@ -736,11 +738,23 @@ Background panel for the color preview box (visible when the color is translucen ---- +.. _class_ColorPicker_theme_icon_sample_revert: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **sample_revert** :ref:`🔗` + +The icon for the revert button (visible on the middle of the "old" color when it differs from the currently selected color). This icon is modulated with a dark color if the "old" color is bright enough, so the icon should be bright to ensure visibility in both scenarios. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_theme_icon_screen_picker: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **screen_picker** +:ref:`Texture2D` **screen_picker** :ref:`🔗` The icon for the screen color picker button. @@ -752,7 +766,7 @@ The icon for the screen color picker button. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **shape_circle** +:ref:`Texture2D` **shape_circle** :ref:`🔗` The icon for circular picker shapes. @@ -764,7 +778,7 @@ The icon for circular picker shapes. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **shape_rect** +:ref:`Texture2D` **shape_rect** :ref:`🔗` The icon for rectangular picker shapes. @@ -776,7 +790,7 @@ The icon for rectangular picker shapes. .. rst-class:: classref-themeproperty -:ref:`Texture2D` **shape_rect_wheel** +:ref:`Texture2D` **shape_rect_wheel** :ref:`🔗` The icon for rectangular wheel picker shapes. @@ -787,3 +801,4 @@ The icon for rectangular wheel picker shapes. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index c2ef4f8a1a4..4491271d817 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -30,9 +30,9 @@ See also :ref:`BaseButton` which contains common properties an Tutorials --------- -- `GUI Drag And Drop Demo `__ +- `2D GD Paint Demo `__ -- `2D GD Paint Demo `__ +- `GUI Drag And Drop Demo `__ .. rst-class:: classref-reftable-group @@ -58,11 +58,11 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------+ - | :ref:`ColorPicker` | :ref:`get_picker` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------+ - | :ref:`PopupPanel` | :ref:`get_popup` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------+ + +---------------------------------------+--------------------------------------------------------------------+ + | :ref:`ColorPicker` | :ref:`get_picker`\ (\ ) | + +---------------------------------------+--------------------------------------------------------------------+ + | :ref:`PopupPanel` | :ref:`get_popup`\ (\ ) | + +---------------------------------------+--------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -72,39 +72,9 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.9, 0.9, 0.9, 0.3)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(0.8, 0.8, 0.8, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``2`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Texture2D` | :ref:`bg` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ + +-----------------------------------+--------------------------------------------------+ + | :ref:`Texture2D` | :ref:`bg` | + +-----------------------------------+--------------------------------------------------+ .. rst-class:: classref-section-separator @@ -119,7 +89,7 @@ Signals .. rst-class:: classref-signal -**color_changed** **(** :ref:`Color` color **)** +**color_changed**\ (\ color\: :ref:`Color`\ ) :ref:`🔗` Emitted when the color changes. @@ -131,7 +101,7 @@ Emitted when the color changes. .. rst-class:: classref-signal -**picker_created** **(** **)** +**picker_created**\ (\ ) :ref:`🔗` Emitted when the :ref:`ColorPicker` is created (the button is pressed for the first time). @@ -143,7 +113,7 @@ Emitted when the :ref:`ColorPicker` is created (the button is .. rst-class:: classref-signal -**popup_closed** **(** **)** +**popup_closed**\ (\ ) :ref:`🔗` Emitted when the :ref:`ColorPicker` is closed. @@ -160,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` +:ref:`Color` **color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pick_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_pick_color** **(** **)** +- |void| **set_pick_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_pick_color**\ (\ ) The currently selected color. @@ -177,12 +147,12 @@ The currently selected color. .. rst-class:: classref-property -:ref:`bool` **edit_alpha** = ``true`` +:ref:`bool` **edit_alpha** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_edit_alpha** **(** :ref:`bool` value **)** -- :ref:`bool` **is_editing_alpha** **(** **)** +- |void| **set_edit_alpha**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_editing_alpha**\ (\ ) If ``true``, the alpha channel in the displayed :ref:`ColorPicker` will be visible. @@ -199,7 +169,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`ColorPicker` **get_picker** **(** **)** +:ref:`ColorPicker` **get_picker**\ (\ ) :ref:`🔗` Returns the :ref:`ColorPicker` that this node toggles. @@ -213,7 +183,7 @@ Returns the :ref:`ColorPicker` that this node toggles. .. rst-class:: classref-method -:ref:`PopupPanel` **get_popup** **(** **)** +:ref:`PopupPanel` **get_popup**\ (\ ) :ref:`🔗` Returns the control's :ref:`PopupPanel` which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. @@ -228,196 +198,14 @@ Returns the control's :ref:`PopupPanel` which allows you to co Theme Property Descriptions --------------------------- -.. _class_ColorPickerButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(1, 1, 1, 1)`` - -Default text :ref:`Color` of the **ColorPickerButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.9, 0.9, 0.9, 0.3)`` - -Text :ref:`Color` used when the **ColorPickerButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(1, 1, 1, 1)`` - -Text :ref:`Color` used when the **ColorPickerButton** is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(1, 1, 1, 1)`` - -Text :ref:`Color` used when the **ColorPickerButton** is being hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **ColorPickerButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(0.8, 0.8, 0.8, 1)`` - -Text :ref:`Color` used when the **ColorPickerButton** is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``2`` - -The horizontal space between **ColorPickerButton**'s icon and text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field` enabled, its :ref:`FontFile.msdf_pixel_range` must be set to at least *twice* the value of :ref:`outline_size` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -:ref:`Font` of the **ColorPickerButton**'s text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -Font size of the **ColorPickerButton**'s text. - -.. rst-class:: classref-item-separator - ----- - .. _class_ColorPickerButton_theme_icon_bg: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **bg** +:ref:`Texture2D` **bg** :ref:`🔗` The background of the color preview rect on the button. -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -:ref:`StyleBox` used when the **ColorPickerButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -:ref:`StyleBox` used when the **ColorPickerButton** is focused. The ``focus`` :ref:`StyleBox` is displayed *over* the base :ref:`StyleBox`, so a partially transparent :ref:`StyleBox` should be used to ensure the base :ref:`StyleBox` remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -:ref:`StyleBox` used when the **ColorPickerButton** is being hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -Default :ref:`StyleBox` for the **ColorPickerButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -:ref:`StyleBox` used when the **ColorPickerButton** is being pressed. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -425,3 +213,4 @@ Default :ref:`StyleBox` for the **ColorPickerButton**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index 6a29a32142d..fcfcb2ef07e 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -26,7 +26,7 @@ Displays a rectangle filled with a solid :ref:`color`__ +- `2D Dodge The Creeps Demo `__ .. rst-class:: classref-reftable-group @@ -53,12 +53,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_color**\ (\ ) The fill color of the rectangle. @@ -69,3 +69,4 @@ The fill color of the rectangle. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compositor.rst b/classes/class_compositor.rst new file mode 100644 index 00000000000..ec0e40c519f --- /dev/null +++ b/classes/class_compositor.rst @@ -0,0 +1,67 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Compositor.xml. + +.. _class_Compositor: + +Compositor +========== + +**Experimental:** More customization of the rendering pipeline will be added in the future. + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +Stores attributes used to customize how a Viewport is rendered. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The compositor resource stores attributes used to customize how a :ref:`Viewport` is rendered. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------+ + | :ref:`Array`\[:ref:`CompositorEffect`\] | :ref:`compositor_effects` | ``[]`` | + +------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Compositor_property_compositor_effects: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`CompositorEffect`\] **compositor_effects** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_compositor_effects**\ (\ value\: :ref:`Array`\[:ref:`CompositorEffect`\]\ ) +- :ref:`Array`\[:ref:`CompositorEffect`\] **get_compositor_effects**\ (\ ) + +The custom :ref:`CompositorEffect`\ s that are applied during rendering of viewports using this compositor. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst new file mode 100644 index 00000000000..fc44b84775d --- /dev/null +++ b/classes/class_compositoreffect.rst @@ -0,0 +1,301 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CompositorEffect.xml. + +.. _class_CompositorEffect: + +CompositorEffect +================ + +**Experimental:** The implementation may change as more of the rendering internals are exposed over time. + +**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +This resource allows for creating a custom rendering effect. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This resource defines a custom rendering effect that can be applied to :ref:`Viewport`\ s through the viewports' :ref:`Environment`. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`access_resolved_color` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`access_resolved_depth` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`EffectCallbackType` | :ref:`effect_callback_type` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`enabled` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`needs_motion_vectors` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`needs_normal_roughness` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`needs_separate_specular` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_render_callback`\ (\ effect_callback_type\: :ref:`int`, render_data\: :ref:`RenderData`\ ) |virtual| | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_CompositorEffect_EffectCallbackType: + +.. rst-class:: classref-enumeration + +enum **EffectCallbackType**: :ref:`🔗` + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_PRE_OPAQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_PRE_OPAQUE** = ``0`` + +The callback is called before our opaque rendering pass, but after depth prepass (if applicable). + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_POST_OPAQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_POST_OPAQUE** = ``1`` + +The callback is called after our opaque rendering pass, but before our sky is rendered. + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_POST_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_POST_SKY** = ``2`` + +The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT** = ``3`` + +The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_POST_TRANSPARENT** = ``4`` + +The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. + +.. _class_CompositorEffect_constant_EFFECT_CALLBACK_TYPE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`EffectCallbackType` **EFFECT_CALLBACK_TYPE_MAX** = ``5`` + +Represents the size of the :ref:`EffectCallbackType` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_CompositorEffect_property_access_resolved_color: + +.. rst-class:: classref-property + +:ref:`bool` **access_resolved_color** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_access_resolved_color**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_access_resolved_color**\ (\ ) + +If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before the effect is run. + +\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: + +:: + + var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var color_buffer = render_scene_buffers.get_texture("render_buffers", "color") + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_access_resolved_depth: + +.. rst-class:: classref-property + +:ref:`bool` **access_resolved_depth** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_access_resolved_depth**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_access_resolved_depth**\ (\ ) + +If ``true`` and MSAA is enabled, this will trigger a depth buffer resolve before the effect is run. + +\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: + +:: + + var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var depth_buffer = render_scene_buffers.get_texture("render_buffers", "depth") + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_effect_callback_type: + +.. rst-class:: classref-property + +:ref:`EffectCallbackType` **effect_callback_type** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_effect_callback_type**\ (\ value\: :ref:`EffectCallbackType`\ ) +- :ref:`EffectCallbackType` **get_effect_callback_type**\ (\ ) + +The type of effect that is implemented, determines at what stage of rendering the callback is called. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **enabled** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_enabled**\ (\ ) + +If ``true`` this rendering effect is applied to any viewport it is added to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_needs_motion_vectors: + +.. rst-class:: classref-property + +:ref:`bool` **needs_motion_vectors** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_needs_motion_vectors**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_needs_motion_vectors**\ (\ ) + +If ``true`` this triggers motion vectors being calculated during the opaque render state. + +\ **Note:** In :ref:`_render_callback`, to access the motion vector buffer use: + +:: + + var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var motion_buffer = render_scene_buffers.get_velocity_texture() + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_needs_normal_roughness: + +.. rst-class:: classref-property + +:ref:`bool` **needs_normal_roughness** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_needs_normal_roughness**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_needs_normal_roughness**\ (\ ) + +If ``true`` this triggers normal and roughness data to be output during our depth pre-pass, only applicable for the Forward+ renderer. + +\ **Note:** In :ref:`_render_callback`, to access the roughness buffer use: + +:: + + var render_scene_buffers : RenderSceneBuffersRD = render_data.get_render_scene_buffers() + var roughness_buffer = render_scene_buffers.get_texture("forward_clustered", "normal_roughness") + +.. rst-class:: classref-item-separator + +---- + +.. _class_CompositorEffect_property_needs_separate_specular: + +.. rst-class:: classref-property + +:ref:`bool` **needs_separate_specular** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_needs_separate_specular**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_needs_separate_specular**\ (\ ) + +If ``true`` this triggers specular data being rendered to a separate buffer and combined after effects have been applied, only applicable for the Forward+ renderer. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_CompositorEffect_private_method__render_callback: + +.. rst-class:: classref-method + +|void| **_render_callback**\ (\ effect_callback_type\: :ref:`int`, render_data\: :ref:`RenderData`\ ) |virtual| :ref:`🔗` + +Implement this function with your custom rendering code. ``effect_callback_type`` should always match the effect callback type you've specified in :ref:`effect_callback_type`. ``render_data`` provides access to the rendering state, it is only valid during rendering and should not be stored. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedcubemap.rst b/classes/class_compressedcubemap.rst index 601cb66e8fc..8efe7d06a25 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -12,14 +12,14 @@ CompressedCubemap **Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -6-sided texture typically used in 3D rendering, optionally compressed. +An optionally compressed :ref:`Cubemap`. .. rst-class:: classref-introduction-group Description ----------- -A cubemap that is loaded from a ``.ccube`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemap** can use one of 4 compresson methods: +A cubemap that is loaded from a ``.ccube`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemap** can use one of 4 compression methods: - Lossless (WebP or PNG, uncompressed on the GPU) @@ -44,3 +44,4 @@ See :ref:`Cubemap` for a general description of cubemaps. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index bcc46bb9ed8..71b3fd5fce6 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -12,14 +12,14 @@ CompressedCubemapArray **Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Array of 6-sided textures typically used in 3D rendering, optionally compressed. +An optionally compressed :ref:`CubemapArray`. .. rst-class:: classref-introduction-group Description ----------- -A cubemap array that is loaded from a ``.ccubearray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemapArray** can use one of 4 compresson methods: +A cubemap array that is loaded from a ``.ccubearray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedCubemapArray** can use one of 4 compression methods: - Lossless (WebP or PNG, uncompressed on the GPU) @@ -44,3 +44,4 @@ See :ref:`CubemapArray` for a general description of cubemap .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index 313b2f53edf..85975f8eec4 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -57,9 +57,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,12 +74,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **load_path** = ``""`` +:ref:`String` **load_path** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Error` **load** **(** :ref:`String` path **)** -- :ref:`String` **get_load_path** **(** **)** +- :ref:`Error` **load**\ (\ path\: :ref:`String`\ ) +- :ref:`String` **get_load_path**\ (\ ) The **CompressedTexture2D**'s file path to a ``.ctex`` file. @@ -96,7 +96,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **load** **(** :ref:`String` path **)** +:ref:`Error` **load**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Loads the texture from the specified ``path``. @@ -107,3 +107,4 @@ Loads the texture from the specified ``path``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index a2d0381d2e2..7ea9a4de684 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -19,7 +19,7 @@ Array of 2-dimensional textures, optionally compressed. Description ----------- -A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2DArray** can use one of 4 compresson methods: +A texture array that is loaded from a ``.ctexarray`` file. This file format is internal to Godot; it is created by importing other image formats with the import system. **CompressedTexture2DArray** can use one of 4 compression methods: - Lossless (WebP or PNG, uncompressed on the GPU) @@ -44,3 +44,4 @@ See :ref:`Texture2DArray` for a general description of tex .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedtexture3d.rst b/classes/class_compressedtexture3d.rst index 4a24f97fc97..304660acfd2 100644 --- a/classes/class_compressedtexture3d.rst +++ b/classes/class_compressedtexture3d.rst @@ -45,9 +45,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **load_path** = ``""`` +:ref:`String` **load_path** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Error` **load** **(** :ref:`String` path **)** -- :ref:`String` **get_load_path** **(** **)** +- :ref:`Error` **load**\ (\ path\: :ref:`String`\ ) +- :ref:`String` **get_load_path**\ (\ ) The **CompressedTexture3D**'s file path to a ``.ctex3d`` file. @@ -84,7 +84,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **load** **(** :ref:`String` path **)** +:ref:`Error` **load**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Loads the texture from the specified ``path``. @@ -95,3 +95,4 @@ Loads the texture from the specified ``path``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index df135518397..992116fb018 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -43,9 +43,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **load_path** = ``""`` +:ref:`String` **load_path** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Error` **load** **(** :ref:`String` path **)** -- :ref:`String` **get_load_path** **(** **)** +- :ref:`Error` **load**\ (\ path\: :ref:`String`\ ) +- :ref:`String` **get_load_path**\ (\ ) The path the texture should be loaded from. @@ -82,7 +82,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **load** **(** :ref:`String` path **)** +:ref:`Error` **load**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Loads the texture at ``path``. @@ -93,3 +93,4 @@ Loads the texture at ``path``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index cde57c64f9d..e319eb4038c 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -19,15 +19,15 @@ A 2D polyline shape used for physics collision. Description ----------- -A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in ``BUILD_SEGMENTS`` mode. +A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SEGMENTS` mode. -Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, :ref:`ConvexPolygonShape2D` is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. +Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, **ConcavePolygonShape2D** is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. \ **Note:** When used for collision, **ConcavePolygonShape2D** is intended to work with static :ref:`CollisionShape2D` nodes like :ref:`StaticBody2D` and will likely not behave well for :ref:`CharacterBody2D`\ s or :ref:`RigidBody2D`\ s in a mode other than Static. \ **Warning:** Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. **ConcavePolygonShape2D** is hollow, so it won't detect a collision. -\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s ``BUILD_SOLIDS`` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. +\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. .. rst-class:: classref-reftable-group @@ -54,15 +54,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector2Array` **segments** = ``PackedVector2Array()`` +:ref:`PackedVector2Array` **segments** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_segments** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_segments** **(** **)** +- |void| **set_segments**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_segments**\ (\ ) The array of points that make up the **ConcavePolygonShape2D**'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -70,3 +72,4 @@ The array of points that make up the **ConcavePolygonShape2D**'s line segments. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index 042970feefb..c5ac1eecf2a 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -21,7 +21,7 @@ Description A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. -Being just a collection of interconnected triangles, **ConcavePolygonShape3D** is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, :ref:`ConvexPolygonShape3D` is *hollow* even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection. +Being just a collection of interconnected triangles, **ConcavePolygonShape3D** is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, **ConcavePolygonShape3D** is *hollow* even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection. \ **Note:** When used for collision, **ConcavePolygonShape3D** is intended to work with static :ref:`CollisionShape3D` nodes like :ref:`StaticBody3D` and will likely not behave well for :ref:`CharacterBody3D`\ s or :ref:`RigidBody3D`\ s in a mode other than Static. @@ -34,7 +34,7 @@ Being just a collection of interconnected triangles, **ConcavePolygonShape3D** i Tutorials --------- -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group @@ -56,11 +56,11 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_faces` **(** :ref:`PackedVector3Array` faces **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_faces`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_faces`\ (\ faces\: :ref:`PackedVector3Array`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,12 +75,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **backface_collision** = ``false`` +:ref:`bool` **backface_collision** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_backface_collision_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_backface_collision_enabled** **(** **)** +- |void| **set_backface_collision_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_backface_collision_enabled**\ (\ ) If set to ``true``, collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals. @@ -97,7 +97,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedVector3Array` **get_faces** **(** **)** |const| +:ref:`PackedVector3Array` **get_faces**\ (\ ) |const| :ref:`🔗` Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle. @@ -109,7 +109,7 @@ Returns the faces of the trimesh shape as an array of vertices. The array (of le .. rst-class:: classref-method -void **set_faces** **(** :ref:`PackedVector3Array` faces **)** +|void| **set_faces**\ (\ faces\: :ref:`PackedVector3Array`\ ) :ref:`🔗` Sets the faces of the trimesh shape from an array of vertices. The ``faces`` array should be composed of triples such that each triple of vertices defines a triangle. @@ -120,3 +120,4 @@ Sets the faces of the trimesh shape from an array of vertices. The ``faces`` arr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 11c9de63300..b3b13cb57b3 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -49,11 +49,11 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_param` **(** :ref:`Param` param **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param` **(** :ref:`Param` param, :ref:`float` value **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param`\ (\ param\: :ref:`Param`\ ) |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param`\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗` .. _class_ConeTwistJoint3D_constant_PARAM_SWING_SPAN: @@ -141,12 +141,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bias** = ``0.3`` +:ref:`float` **bias** = ``0.3`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| The speed with which the swing or twist will take place. @@ -160,12 +160,12 @@ The higher, the faster. .. rst-class:: classref-property -:ref:`float` **relaxation** = ``1.0`` +:ref:`float` **relaxation** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| Defines, how fast the swing- and twist-speed-difference on both sides gets synced. @@ -177,12 +177,12 @@ Defines, how fast the swing- and twist-speed-difference on both sides gets synce .. rst-class:: classref-property -:ref:`float` **softness** = ``0.8`` +:ref:`float` **softness** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. @@ -194,12 +194,12 @@ The ease with which the joint starts to twist. If it's too low, it takes more fo .. rst-class:: classref-property -:ref:`float` **swing_span** = ``0.785398`` +:ref:`float` **swing_span** = ``0.785398`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| Swing is rotation from side to side, around the axis perpendicular to the twist axis. @@ -217,12 +217,12 @@ If below 0.05, this behavior is locked. .. rst-class:: classref-property -:ref:`float` **twist_span** = ``3.14159`` +:ref:`float` **twist_span** = ``3.14159`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** -- :ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| Twist is the rotation around the twist axis, this value defined how far the joint can twist. @@ -241,7 +241,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_param** **(** :ref:`Param` param **)** |const| +:ref:`float` **get_param**\ (\ param\: :ref:`Param`\ ) |const| :ref:`🔗` Returns the value of the specified parameter. @@ -253,7 +253,7 @@ Returns the value of the specified parameter. .. rst-class:: classref-method -void **set_param** **(** :ref:`Param` param, :ref:`float` value **)** +|void| **set_param**\ (\ param\: :ref:`Param`, value\: :ref:`float`\ ) :ref:`🔗` Sets the value of the specified parameter. @@ -264,3 +264,4 @@ Sets the value of the specified parameter. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 9b589dc5cc5..156dff9c7a3 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -21,7 +21,7 @@ Description This helper class can be used to store :ref:`Variant` values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: -:: +.. code:: text [section] some_key=42 @@ -130,41 +130,41 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`encode_to_text` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_section` **(** :ref:`String` section **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_section_key` **(** :ref:`String` section, :ref:`String` key **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_section_keys` **(** :ref:`String` section **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_sections` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_section` **(** :ref:`String` section **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_section_key` **(** :ref:`String` section, :ref:`String` key **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_encrypted` **(** :ref:`String` path, :ref:`PackedByteArray` key **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_encrypted_pass` **(** :ref:`String` path, :ref:`String` password **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`parse` **(** :ref:`String` data **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save` **(** :ref:`String` path **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_encrypted` **(** :ref:`String` path, :ref:`PackedByteArray` key **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_encrypted_pass` **(** :ref:`String` path, :ref:`String` password **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_value` **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`encode_to_text`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_section`\ (\ section\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_section_key`\ (\ section\: :ref:`String`, key\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_section_keys`\ (\ section\: :ref:`String`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_sections`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_value`\ (\ section\: :ref:`String`, key\: :ref:`String`, default\: :ref:`Variant` = null\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_section`\ (\ section\: :ref:`String`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_section_key`\ (\ section\: :ref:`String`, key\: :ref:`String`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_encrypted`\ (\ path\: :ref:`String`, key\: :ref:`PackedByteArray`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_encrypted_pass`\ (\ path\: :ref:`String`, password\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`parse`\ (\ data\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_encrypted`\ (\ path\: :ref:`String`, key\: :ref:`PackedByteArray`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_encrypted_pass`\ (\ path\: :ref:`String`, password\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_value`\ (\ section\: :ref:`String`, key\: :ref:`String`, value\: :ref:`Variant`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -179,7 +179,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Removes the entire contents of the config. @@ -191,7 +191,7 @@ Removes the entire contents of the config. .. rst-class:: classref-method -:ref:`String` **encode_to_text** **(** **)** |const| +:ref:`String` **encode_to_text**\ (\ ) |const| :ref:`🔗` Obtain the text version of this config file (the same text that would be written to a file). @@ -203,7 +203,7 @@ Obtain the text version of this config file (the same text that would be written .. rst-class:: classref-method -void **erase_section** **(** :ref:`String` section **)** +|void| **erase_section**\ (\ section\: :ref:`String`\ ) :ref:`🔗` Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. @@ -215,7 +215,7 @@ Deletes the specified section along with all the key-value pairs inside. Raises .. rst-class:: classref-method -void **erase_section_key** **(** :ref:`String` section, :ref:`String` key **)** +|void| **erase_section_key**\ (\ section\: :ref:`String`, key\: :ref:`String`\ ) :ref:`🔗` Deletes the specified key in a section. Raises an error if either the section or the key do not exist. @@ -227,7 +227,7 @@ Deletes the specified key in a section. Raises an error if either the section or .. rst-class:: classref-method -:ref:`PackedStringArray` **get_section_keys** **(** :ref:`String` section **)** |const| +:ref:`PackedStringArray` **get_section_keys**\ (\ section\: :ref:`String`\ ) |const| :ref:`🔗` Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist. @@ -239,7 +239,7 @@ Returns an array of all defined key identifiers in the specified section. Raises .. rst-class:: classref-method -:ref:`PackedStringArray` **get_sections** **(** **)** |const| +:ref:`PackedStringArray` **get_sections**\ (\ ) |const| :ref:`🔗` Returns an array of all defined section identifiers. @@ -251,7 +251,7 @@ Returns an array of all defined section identifiers. .. rst-class:: classref-method -:ref:`Variant` **get_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` default=null **)** |const| +:ref:`Variant` **get_value**\ (\ section\: :ref:`String`, key\: :ref:`String`, default\: :ref:`Variant` = null\ ) |const| :ref:`🔗` Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback ``default`` value. If ``default`` is not specified or set to ``null``, an error is also raised. @@ -263,7 +263,7 @@ Returns the current value for the specified section and key. If either the secti .. rst-class:: classref-method -:ref:`bool` **has_section** **(** :ref:`String` section **)** |const| +:ref:`bool` **has_section**\ (\ section\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the specified section exists. @@ -275,7 +275,7 @@ Returns ``true`` if the specified section exists. .. rst-class:: classref-method -:ref:`bool` **has_section_key** **(** :ref:`String` section, :ref:`String` key **)** |const| +:ref:`bool` **has_section_key**\ (\ section\: :ref:`String`, key\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the specified section-key pair exists. @@ -287,11 +287,11 @@ Returns ``true`` if the specified section-key pair exists. .. rst-class:: classref-method -:ref:`Error` **load** **(** :ref:`String` path **)** +:ref:`Error` **load**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Loads the config file specified as a parameter. The file's contents are parsed and loaded in the **ConfigFile** object which the method was called on. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -301,11 +301,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **load_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** +:ref:`Error` **load_encrypted**\ (\ path\: :ref:`String`, key\: :ref:`PackedByteArray`\ ) :ref:`🔗` Loads the encrypted config file specified as a parameter, using the provided ``key`` to decrypt it. The file's contents are parsed and loaded in the **ConfigFile** object which the method was called on. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -315,11 +315,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **load_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** +:ref:`Error` **load_encrypted_pass**\ (\ path\: :ref:`String`, password\: :ref:`String`\ ) :ref:`🔗` Loads the encrypted config file specified as a parameter, using the provided ``password`` to decrypt it. The file's contents are parsed and loaded in the **ConfigFile** object which the method was called on. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -329,11 +329,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **parse** **(** :ref:`String` data **)** +:ref:`Error` **parse**\ (\ data\: :ref:`String`\ ) :ref:`🔗` Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -343,11 +343,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **save** **(** :ref:`String` path **)** +:ref:`Error` **save**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Saves the contents of the **ConfigFile** object to the file specified as a parameter. The output file uses an INI-style structure. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -357,11 +357,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **save_encrypted** **(** :ref:`String` path, :ref:`PackedByteArray` key **)** +:ref:`Error` **save_encrypted**\ (\ path\: :ref:`String`, key\: :ref:`PackedByteArray`\ ) :ref:`🔗` Saves the contents of the **ConfigFile** object to the AES-256 encrypted file specified as a parameter, using the provided ``key`` to encrypt it. The output file uses an INI-style structure. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -371,11 +371,11 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **save_encrypted_pass** **(** :ref:`String` path, :ref:`String` password **)** +:ref:`Error` **save_encrypted_pass**\ (\ path\: :ref:`String`, password\: :ref:`String`\ ) :ref:`🔗` Saves the contents of the **ConfigFile** object to the AES-256 encrypted file specified as a parameter, using the provided ``password`` to encrypt it. The output file uses an INI-style structure. -Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. .. rst-class:: classref-item-separator @@ -385,7 +385,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -void **set_value** **(** :ref:`String` section, :ref:`String` key, :ref:`Variant` value **)** +|void| **set_value**\ (\ section\: :ref:`String`, key\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`🔗` Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a ``null`` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. @@ -396,3 +396,4 @@ Assigns a value to the specified key of the specified section. If either the sec .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index bf95b48927e..6ab194cb2b6 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -30,11 +30,11 @@ To get cancel action, you can use: .. code-tab:: gdscript - get_cancel_button().pressed.connect(self.canceled) + get_cancel_button().pressed.connect(_on_canceled) .. code-tab:: csharp - GetCancelButton().Pressed += Canceled; + GetCancelButton().Pressed += OnCanceled; @@ -64,9 +64,9 @@ Methods .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`Button` | :ref:`get_cancel_button` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------+ + +-----------------------------+-----------------------------------------------------------------------------------+ + | :ref:`Button` | :ref:`get_cancel_button`\ (\ ) | + +-----------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,12 +81,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **cancel_button_text** = ``"Cancel"`` +:ref:`String` **cancel_button_text** = ``"Cancel"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cancel_button_text** **(** :ref:`String` value **)** -- :ref:`String` **get_cancel_button_text** **(** **)** +- |void| **set_cancel_button_text**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_cancel_button_text**\ (\ ) The text displayed by the cancel button (see :ref:`get_cancel_button`). @@ -103,7 +103,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Button` **get_cancel_button** **(** **)** +:ref:`Button` **get_cancel_button**\ (\ ) :ref:`🔗` Returns the cancel button. @@ -116,3 +116,4 @@ Returns the cancel button. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_container.rst b/classes/class_container.rst index 7ea0dadb794..fedccd93698 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -12,7 +12,7 @@ Container **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphNode`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` +**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` Base class for all GUI containers. @@ -50,15 +50,15 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_horizontal` **(** **)** |virtual| |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_vertical` **(** **)** |virtual| |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fit_child_in_rect` **(** :ref:`Control` child, :ref:`Rect2` rect **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_sort` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_horizontal`\ (\ ) |virtual| |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_vertical`\ (\ ) |virtual| |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fit_child_in_rect`\ (\ child\: :ref:`Control`, rect\: :ref:`Rect2`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_sort`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -73,7 +73,7 @@ Signals .. rst-class:: classref-signal -**pre_sort_children** **(** **)** +**pre_sort_children**\ (\ ) :ref:`🔗` Emitted when children are going to be sorted. @@ -85,7 +85,7 @@ Emitted when children are going to be sorted. .. rst-class:: classref-signal -**sort_children** **(** **)** +**sort_children**\ (\ ) :ref:`🔗` Emitted when sorting the children is needed. @@ -102,7 +102,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_PRE_SORT_CHILDREN** = ``50`` +**NOTIFICATION_PRE_SORT_CHILDREN** = ``50`` :ref:`🔗` Notification just before children are going to be sorted, in case there's something to process beforehand. @@ -110,7 +110,7 @@ Notification just before children are going to be sorted, in case there's someth .. rst-class:: classref-constant -**NOTIFICATION_SORT_CHILDREN** = ``51`` +**NOTIFICATION_SORT_CHILDREN** = ``51`` :ref:`🔗` Notification for when sorting the children, it must be obeyed immediately. @@ -123,11 +123,11 @@ Notification for when sorting the children, it must be obeyed immediately. Method Descriptions ------------------- -.. _class_Container_method__get_allowed_size_flags_horizontal: +.. _class_Container_private_method__get_allowed_size_flags_horizontal: .. rst-class:: classref-method -:ref:`PackedInt32Array` **_get_allowed_size_flags_horizontal** **(** **)** |virtual| |const| +:ref:`PackedInt32Array` **_get_allowed_size_flags_horizontal**\ (\ ) |virtual| |const| :ref:`🔗` Implement to return a list of allowed horizontal :ref:`SizeFlags` for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. @@ -137,11 +137,11 @@ Implement to return a list of allowed horizontal :ref:`SizeFlags` **_get_allowed_size_flags_vertical** **(** **)** |virtual| |const| +:ref:`PackedInt32Array` **_get_allowed_size_flags_vertical**\ (\ ) |virtual| |const| :ref:`🔗` Implement to return a list of allowed vertical :ref:`SizeFlags` for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. @@ -155,7 +155,7 @@ Implement to return a list of allowed vertical :ref:`SizeFlags` child, :ref:`Rect2` rect **)** +|void| **fit_child_in_rect**\ (\ child\: :ref:`Control`, rect\: :ref:`Rect2`\ ) :ref:`🔗` Fit a child control in a given rect. This is mainly a helper for creating custom container classes. @@ -167,7 +167,7 @@ Fit a child control in a given rect. This is mainly a helper for creating custom .. rst-class:: classref-method -void **queue_sort** **(** **)** +|void| **queue_sort**\ (\ ) :ref:`🔗` Queue resort of the contained children. This is called automatically anyway, but can be called upon request. @@ -178,3 +178,4 @@ Queue resort of the contained children. This is called automatically anyway, but .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_control.rst b/classes/class_control.rst index f41e8dcd0c9..c6177e1a018 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -29,9 +29,9 @@ For more information on Godot's UI system, anchors, offsets, and containers, see Godot propagates input events via viewports. Each :ref:`Viewport` is responsible for propagating :ref:`InputEvent`\ s to their child nodes. As the :ref:`SceneTree.root` is a :ref:`Window`, this already happens automatically for all UI elements in your game. -Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. +Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. -Call :ref:`accept_event` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. +Call :ref:`accept_event` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. Only one **Control** node can be in focus. Only the node in focus will receive events. To get the focus, call :ref:`grab_focus`. **Control** nodes lose focus when another node grabs it, or if you hide the node in focus. @@ -52,6 +52,8 @@ Tutorials - :doc:`Control node gallery <../tutorials/ui/control_node_gallery>` +- :doc:`Multiple resolutions <../tutorials/rendering/multiple_resolutions>` + - `All GUI Demos `__ .. rst-class:: classref-reftable-group @@ -62,85 +64,87 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_left` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_right` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`anchor_top` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`auto_translate` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`clip_contents` | ``false`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`global_position` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_left` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_right` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`offset_top` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`rotation` | ``0.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`rotation_degrees` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Node` | :ref:`shortcut_context` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\<:ref:`SizeFlags`\> | :ref:`size_flags_horizontal` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\<:ref:`SizeFlags`\> | :ref:`size_flags_vertical` | ``1`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Theme` | :ref:`theme` | | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`String` | :ref:`tooltip_text` | ``""`` | - +--------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_left` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_right` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_top` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_translate` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clip_contents` | ``false`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`global_position` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_left` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_right` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_top` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation_degrees` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`shortcut_context` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_horizontal` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_vertical` | ``1`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`theme` | | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tooltip_text` | ``""`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -150,177 +154,179 @@ Methods .. table:: :widths: auto - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_drag_data` **(** :ref:`Vector2` at_position **)** |virtual| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_tooltip` **(** :ref:`Vector2` at_position **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` point **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]` | :ref:`_structured_text_parser` **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`accept_event` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_constant_override` **(** :ref:`StringName` name, :ref:`int` constant **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_override` **(** :ref:`StringName` name, :ref:`Font` font **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_size_override` **(** :ref:`StringName` name, :ref:`int` font_size **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_icon_override` **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_stylebox_override` **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_bulk_theme_override` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_bulk_theme_override` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`find_next_valid_focus` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`find_prev_valid_focus` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_drag` **(** :ref:`Variant` data, :ref:`Control` preview **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_anchor` **(** :ref:`Side` side **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_begin` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_combined_minimum_size` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | :ref:`get_cursor_shape` **(** :ref:`Vector2` position=Vector2(0, 0) **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_end` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_focus_neighbor` **(** :ref:`Side` side **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_global_rect` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_offset` **(** :ref:`Side` offset **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_parent_area_size` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`get_parent_control` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_rect` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_screen_position` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_theme_default_base_scale` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_default_font` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_default_font_size` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`get_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_tooltip` **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grab_click_focus` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grab_focus` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_focus` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox_override` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_drag_successful` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`release_focus` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_color_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_constant_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_size_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_icon_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_stylebox_override` **(** :ref:`StringName` name **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_size` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_anchor` **(** :ref:`Side` side, :ref:`float` anchor, :ref:`bool` keep_offset=false, :ref:`bool` push_opposite_anchor=true **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_anchor_and_offset` **(** :ref:`Side` side, :ref:`float` anchor, :ref:`float` offset, :ref:`bool` push_opposite_anchor=false **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_anchors_and_offsets_preset` **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_anchors_preset` **(** :ref:`LayoutPreset` preset, :ref:`bool` keep_offsets=false **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_begin` **(** :ref:`Vector2` position **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_drag_forwarding` **(** :ref:`Callable` drag_func, :ref:`Callable` can_drop_func, :ref:`Callable` drop_func **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_drag_preview` **(** :ref:`Control` control **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_end` **(** :ref:`Vector2` position **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_focus_neighbor` **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_global_position` **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_offset` **(** :ref:`Side` side, :ref:`float` offset **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_offsets_preset` **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_position` **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_size` **(** :ref:`Vector2` size, :ref:`bool` keep_offsets=false **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_minimum_size` **(** **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`warp_mouse` **(** :ref:`Vector2` position **)** | - +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_drop_data`\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_drop_data`\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_drag_data`\ (\ at_position\: :ref:`Vector2`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_minimum_size`\ (\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_tooltip`\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_gui_input`\ (\ event\: :ref:`InputEvent`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_point`\ (\ point\: :ref:`Vector2`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_make_custom_tooltip`\ (\ for_text\: :ref:`String`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Vector3i`\] | :ref:`_structured_text_parser`\ (\ args\: :ref:`Array`, text\: :ref:`String`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accept_event`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_color_override`\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_constant_override`\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_font_override`\ (\ name\: :ref:`StringName`, font\: :ref:`Font`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_font_size_override`\ (\ name\: :ref:`StringName`, font_size\: :ref:`int`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_icon_override`\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_stylebox_override`\ (\ name\: :ref:`StringName`, stylebox\: :ref:`StyleBox`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_bulk_theme_override`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_bulk_theme_override`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`find_next_valid_focus`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`find_prev_valid_focus`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`find_valid_focus_neighbor`\ (\ side\: :ref:`Side`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_drag`\ (\ data\: :ref:`Variant`, preview\: :ref:`Control`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_anchor`\ (\ side\: :ref:`Side`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_begin`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_combined_minimum_size`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`get_cursor_shape`\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_end`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_focus_neighbor`\ (\ side\: :ref:`Side`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_global_rect`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_minimum_size`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_offset`\ (\ offset\: :ref:`Side`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_parent_area_size`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_parent_control`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_rect`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_screen_position`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_theme_color`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_constant`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_theme_default_base_scale`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_default_font`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_default_font_size`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_font`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_font_size`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_theme_icon`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`get_theme_stylebox`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tooltip`\ (\ at_position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`grab_click_focus`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`grab_focus`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_focus`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox`\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox_override`\ (\ name\: :ref:`StringName`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_drag_successful`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layout_rtl`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`release_focus`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_color_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_constant_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_font_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_font_size_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_icon_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_stylebox_override`\ (\ name\: :ref:`StringName`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_size`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_anchor`\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, keep_offset\: :ref:`bool` = false, push_opposite_anchor\: :ref:`bool` = true\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_anchor_and_offset`\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, offset\: :ref:`float`, push_opposite_anchor\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_anchors_and_offsets_preset`\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_anchors_preset`\ (\ preset\: :ref:`LayoutPreset`, keep_offsets\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_begin`\ (\ position\: :ref:`Vector2`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_drag_forwarding`\ (\ drag_func\: :ref:`Callable`, can_drop_func\: :ref:`Callable`, drop_func\: :ref:`Callable`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_drag_preview`\ (\ control\: :ref:`Control`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_end`\ (\ position\: :ref:`Vector2`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_focus_neighbor`\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_global_position`\ (\ position\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_offset`\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_offsets_preset`\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_position`\ (\ position\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_size`\ (\ size\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_minimum_size`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`warp_mouse`\ (\ position\: :ref:`Vector2`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -335,7 +341,7 @@ Signals .. rst-class:: classref-signal -**focus_entered** **(** **)** +**focus_entered**\ (\ ) :ref:`🔗` Emitted when the node gains focus. @@ -347,7 +353,7 @@ Emitted when the node gains focus. .. rst-class:: classref-signal -**focus_exited** **(** **)** +**focus_exited**\ (\ ) :ref:`🔗` Emitted when the node loses focus. @@ -359,7 +365,7 @@ Emitted when the node loses focus. .. rst-class:: classref-signal -**gui_input** **(** :ref:`InputEvent` event **)** +**gui_input**\ (\ event\: :ref:`InputEvent`\ ) :ref:`🔗` Emitted when the node receives an :ref:`InputEvent`. @@ -371,7 +377,7 @@ Emitted when the node receives an :ref:`InputEvent`. .. rst-class:: classref-signal -**minimum_size_changed** **(** **)** +**minimum_size_changed**\ (\ ) :ref:`🔗` Emitted when the node's minimum size changes. @@ -383,11 +389,11 @@ Emitted when the node's minimum size changes. .. rst-class:: classref-signal -**mouse_entered** **(** **)** +**mouse_entered**\ (\ ) :ref:`🔗` -Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. +Emitted when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -\ **Note:** :ref:`mouse_entered` will not be emitted if the mouse enters a child **Control** node before entering the parent's ``Rect`` area, at least until the mouse is moved to reach the parent's ``Rect`` area. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. .. rst-class:: classref-item-separator @@ -397,13 +403,13 @@ Emitted when the mouse enters the control's ``Rect`` area, provided its :ref:`mo .. rst-class:: classref-signal -**mouse_exited** **(** **)** +**mouse_exited**\ (\ ) :ref:`🔗` -Emitted when the mouse leaves the control's ``Rect`` area, provided its :ref:`mouse_filter` lets the event reach it. +Emitted when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -\ **Note:** :ref:`mouse_exited` will be emitted if the mouse enters a child **Control** node, even if the mouse cursor is still inside the parent's ``Rect`` area. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. -If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: +\ **Note:** If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: :: @@ -419,7 +425,7 @@ If you want to check whether the mouse truly left the area, ignoring any top nod .. rst-class:: classref-signal -**resized** **(** **)** +**resized**\ (\ ) :ref:`🔗` Emitted when the control changes size. @@ -431,7 +437,7 @@ Emitted when the control changes size. .. rst-class:: classref-signal -**size_flags_changed** **(** **)** +**size_flags_changed**\ (\ ) :ref:`🔗` Emitted when one of the size flags changes. See :ref:`size_flags_horizontal` and :ref:`size_flags_vertical`. @@ -443,7 +449,7 @@ Emitted when one of the size flags changes. See :ref:`size_flags_horizontal` Emitted when the :ref:`NOTIFICATION_THEME_CHANGED` notification is sent. @@ -460,7 +466,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FocusMode**: +enum **FocusMode**: :ref:`🔗` .. _class_Control_constant_FOCUS_NONE: @@ -494,7 +500,7 @@ The node can grab focus on mouse click, using the arrows and the Tab keys on the .. rst-class:: classref-enumeration -enum **CursorShape**: +enum **CursorShape**: :ref:`🔗` .. _class_Control_constant_CURSOR_ARROW: @@ -640,7 +646,7 @@ Show the system's help mouse cursor when the user hovers the node, a question ma .. rst-class:: classref-enumeration -enum **LayoutPreset**: +enum **LayoutPreset**: :ref:`🔗` .. _class_Control_constant_PRESET_TOP_LEFT: @@ -778,7 +784,7 @@ Snap all 4 anchors to the respective corners of the parent control. Set all 4 of .. rst-class:: classref-enumeration -enum **LayoutPresetMode**: +enum **LayoutPresetMode**: :ref:`🔗` .. _class_Control_constant_PRESET_MODE_MINSIZE: @@ -820,7 +826,7 @@ The control's size will not change. .. rst-class:: classref-enumeration -flags **SizeFlags**: +flags **SizeFlags**: :ref:`🔗` .. _class_Control_constant_SIZE_SHRINK_BEGIN: @@ -880,7 +886,7 @@ Tells the parent :ref:`Container` to align the node with its en .. rst-class:: classref-enumeration -enum **MouseFilter**: +enum **MouseFilter**: :ref:`🔗` .. _class_Control_constant_MOUSE_FILTER_STOP: @@ -888,7 +894,7 @@ enum **MouseFilter**: :ref:`MouseFilter` **MOUSE_FILTER_STOP** = ``0`` -The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. .. _class_Control_constant_MOUSE_FILTER_PASS: @@ -896,7 +902,7 @@ The control will receive mouse button input events through :ref:`_gui_input` **MOUSE_FILTER_PASS** = ``1`` -The control will receive mouse button input events through :ref:`_gui_input` if clicked on. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to :ref:`Node._unhandled_input` for further processing. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. .. _class_Control_constant_MOUSE_FILTER_IGNORE: @@ -904,7 +910,9 @@ The control will receive mouse button input events through :ref:`_gui_input` **MOUSE_FILTER_IGNORE** = ``2`` -The control will not receive mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. +The control will not receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. + +\ **Note:** If the control has received :ref:`mouse_entered` but not :ref:`mouse_exited`, changing the :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` will cause :ref:`mouse_exited` to be emitted. .. rst-class:: classref-item-separator @@ -914,7 +922,7 @@ The control will not receive mouse button input events through :ref:`_gui_input< .. rst-class:: classref-enumeration -enum **GrowDirection**: +enum **GrowDirection**: :ref:`🔗` .. _class_Control_constant_GROW_DIRECTION_BEGIN: @@ -948,7 +956,7 @@ The control will grow in both directions equally to make up if its minimum size .. rst-class:: classref-enumeration -enum **Anchor**: +enum **Anchor**: :ref:`🔗` .. _class_Control_constant_ANCHOR_BEGIN: @@ -974,7 +982,7 @@ Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bott .. rst-class:: classref-enumeration -enum **LayoutDirection**: +enum **LayoutDirection**: :ref:`🔗` .. _class_Control_constant_LAYOUT_DIRECTION_INHERITED: @@ -1016,7 +1024,7 @@ Right-to-left layout direction. .. rst-class:: classref-enumeration -enum **TextDirection**: +enum **TextDirection**: :ref:`🔗` .. _class_Control_constant_TEXT_DIRECTION_INHERITED: @@ -1063,7 +1071,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_RESIZED** = ``40`` +**NOTIFICATION_RESIZED** = ``40`` :ref:`🔗` Sent when the node changes size. Use :ref:`size` to get the new size. @@ -1071,23 +1079,59 @@ Sent when the node changes size. Use :ref:`size` to .. rst-class:: classref-constant -**NOTIFICATION_MOUSE_ENTER** = ``41`` +**NOTIFICATION_MOUSE_ENTER** = ``41`` :ref:`🔗` + +Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -Sent when the mouse pointer enters the node. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect which Control receives the notification. + +See also :ref:`NOTIFICATION_MOUSE_ENTER_SELF`. .. _class_Control_constant_NOTIFICATION_MOUSE_EXIT: .. rst-class:: classref-constant -**NOTIFICATION_MOUSE_EXIT** = ``42`` +**NOTIFICATION_MOUSE_EXIT** = ``42`` :ref:`🔗` + +Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. + +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect which Control receives the notification. + +See also :ref:`NOTIFICATION_MOUSE_EXIT_SELF`. + +.. _class_Control_constant_NOTIFICATION_MOUSE_ENTER_SELF: + +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_ENTER_SELF** = ``60`` :ref:`🔗` + +**Experimental:** The reason this notification is sent may change in the future. + +Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. + +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect which Control receives the notification. + +See also :ref:`NOTIFICATION_MOUSE_ENTER`. + +.. _class_Control_constant_NOTIFICATION_MOUSE_EXIT_SELF: + +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_EXIT_SELF** = ``61`` :ref:`🔗` + +**Experimental:** The reason this notification is sent may change in the future. + +Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. -Sent when the mouse pointer exits the node. +\ **Note:** :ref:`CanvasItem.z_index` doesn't affect which Control receives the notification. + +See also :ref:`NOTIFICATION_MOUSE_EXIT`. .. _class_Control_constant_NOTIFICATION_FOCUS_ENTER: .. rst-class:: classref-constant -**NOTIFICATION_FOCUS_ENTER** = ``43`` +**NOTIFICATION_FOCUS_ENTER** = ``43`` :ref:`🔗` Sent when the node grabs focus. @@ -1095,7 +1139,7 @@ Sent when the node grabs focus. .. rst-class:: classref-constant -**NOTIFICATION_FOCUS_EXIT** = ``44`` +**NOTIFICATION_FOCUS_EXIT** = ``44`` :ref:`🔗` Sent when the node loses focus. @@ -1103,7 +1147,7 @@ Sent when the node loses focus. .. rst-class:: classref-constant -**NOTIFICATION_THEME_CHANGED** = ``45`` +**NOTIFICATION_THEME_CHANGED** = ``45`` :ref:`🔗` Sent when the node needs to refresh its theme items. This happens in one of the following cases: @@ -1117,27 +1161,41 @@ Sent when the node needs to refresh its theme items. This happens in one of the \ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. +\ **Note:** This notification is received alongside :ref:`Node.NOTIFICATION_ENTER_TREE`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`Node.is_node_ready`. + +:: + + func _notification(what): + if what == NOTIFICATION_THEME_CHANGED: + if not is_node_ready(): + await ready # Wait until ready signal. + $Label.add_theme_color_override("font_color", Color.YELLOW) + .. _class_Control_constant_NOTIFICATION_SCROLL_BEGIN: .. rst-class:: classref-constant -**NOTIFICATION_SCROLL_BEGIN** = ``47`` +**NOTIFICATION_SCROLL_BEGIN** = ``47`` :ref:`🔗` -Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled. +Sent when this node is inside a :ref:`ScrollContainer` which has begun being scrolled when dragging the scrollable area *with a touch event*. This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + +\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is enabled. .. _class_Control_constant_NOTIFICATION_SCROLL_END: .. rst-class:: classref-constant -**NOTIFICATION_SCROLL_END** = ``48`` +**NOTIFICATION_SCROLL_END** = ``48`` :ref:`🔗` + +Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled when dragging the scrollable area *with a touch event*. This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. -Sent when this node is inside a :ref:`ScrollContainer` which has stopped being scrolled. +\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is enabled. .. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = ``49`` +**NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = ``49`` :ref:`🔗` Sent when control layout direction is changed. @@ -1154,11 +1212,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **anchor_bottom** = ``0.0`` +:ref:`float` **anchor_bottom** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +- :ref:`float` **get_anchor**\ (\ side\: :ref:`Side`\ ) |const| Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom offset updates when the node moves or changes size. You can use one of the :ref:`Anchor` constants for convenience. @@ -1170,11 +1228,11 @@ Anchors the bottom edge of the node to the origin, the center, or the end of its .. rst-class:: classref-property -:ref:`float` **anchor_left** = ``0.0`` +:ref:`float` **anchor_left** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +- :ref:`float` **get_anchor**\ (\ side\: :ref:`Side`\ ) |const| Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left offset updates when the node moves or changes size. You can use one of the :ref:`Anchor` constants for convenience. @@ -1186,11 +1244,11 @@ Anchors the left edge of the node to the origin, the center or the end of its pa .. rst-class:: classref-property -:ref:`float` **anchor_right** = ``0.0`` +:ref:`float` **anchor_right** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +- :ref:`float` **get_anchor**\ (\ side\: :ref:`Side`\ ) |const| Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the :ref:`Anchor` constants for convenience. @@ -1202,11 +1260,11 @@ Anchors the right edge of the node to the origin, the center or the end of its p .. rst-class:: classref-property -:ref:`float` **anchor_top** = ``0.0`` +:ref:`float` **anchor_top** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +- :ref:`float` **get_anchor**\ (\ side\: :ref:`Side`\ ) |const| Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the :ref:`Anchor` constants for convenience. @@ -1218,16 +1276,16 @@ Anchors the top edge of the node to the origin, the center or the end of its par .. rst-class:: classref-property -:ref:`bool` **auto_translate** = ``true`` +:ref:`bool` **auto_translate** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_auto_translate** **(** :ref:`bool` value **)** -- :ref:`bool` **is_auto_translating** **(** **)** +- |void| **set_auto_translate**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_auto_translating**\ (\ ) -Toggles if any text should automatically change to its translated version depending on the current locale. +**Deprecated:** Use :ref:`Node.auto_translate_mode` instead. -Also decides if the node's strings should be parsed for POT generation. +Toggles if any text should automatically change to its translated version depending on the current locale. .. rst-class:: classref-item-separator @@ -1237,12 +1295,12 @@ Also decides if the node's strings should be parsed for POT generation. .. rst-class:: classref-property -:ref:`bool` **clip_contents** = ``false`` +:ref:`bool` **clip_contents** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_clip_contents** **(** :ref:`bool` value **)** -- :ref:`bool` **is_clipping_contents** **(** **)** +- |void| **set_clip_contents**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_clipping_contents**\ (\ ) Enables whether rendering of :ref:`CanvasItem` based 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 and won't receive input. @@ -1254,14 +1312,14 @@ Enables whether rendering of :ref:`CanvasItem` based children .. rst-class:: classref-property -:ref:`Vector2` **custom_minimum_size** = ``Vector2(0, 0)`` +:ref:`Vector2` **custom_minimum_size** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_custom_minimum_size** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_custom_minimum_size** **(** **)** +- |void| **set_custom_minimum_size**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_custom_minimum_size**\ (\ ) -The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. +The minimum size of the node's bounding rectangle. If you set it to a value greater than ``(0, 0)``, the node's bounding rectangle will always have at least this size. Note that **Control** nodes have their internal minimum size returned by :ref:`get_minimum_size`. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see :ref:`get_combined_minimum_size`). .. rst-class:: classref-item-separator @@ -1271,12 +1329,12 @@ The minimum size of the node's bounding rectangle. If you set it to a value grea .. rst-class:: classref-property -:ref:`FocusMode` **focus_mode** = ``0`` +:ref:`FocusMode` **focus_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_mode** **(** :ref:`FocusMode` value **)** -- :ref:`FocusMode` **get_focus_mode** **(** **)** +- |void| **set_focus_mode**\ (\ value\: :ref:`FocusMode`\ ) +- :ref:`FocusMode` **get_focus_mode**\ (\ ) 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, gamepad, and mouse signals. @@ -1288,12 +1346,12 @@ The focus access mode for the control (None, Click or All). Only one Control can .. rst-class:: classref-property -:ref:`NodePath` **focus_neighbor_bottom** = ``NodePath("")`` +:ref:`NodePath` **focus_neighbor_bottom** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +- |void| **set_focus_neighbor**\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| Tells Godot which node it should give 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 :ref:`ProjectSettings.input/ui_down` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the bottom of this one. @@ -1305,12 +1363,12 @@ Tells Godot which node it should give focus to if the user presses the down arro .. rst-class:: classref-property -:ref:`NodePath` **focus_neighbor_left** = ``NodePath("")`` +:ref:`NodePath` **focus_neighbor_left** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +- |void| **set_focus_neighbor**\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| Tells Godot which node it should give 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 :ref:`ProjectSettings.input/ui_left` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the left of this one. @@ -1322,12 +1380,12 @@ Tells Godot which node it should give focus to if the user presses the left arro .. rst-class:: classref-property -:ref:`NodePath` **focus_neighbor_right** = ``NodePath("")`` +:ref:`NodePath` **focus_neighbor_right** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +- |void| **set_focus_neighbor**\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| Tells Godot which node it should give 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 :ref:`ProjectSettings.input/ui_right` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the right of this one. @@ -1339,12 +1397,12 @@ Tells Godot which node it should give focus to if the user presses the right arr .. rst-class:: classref-property -:ref:`NodePath` **focus_neighbor_top** = ``NodePath("")`` +:ref:`NodePath` **focus_neighbor_top** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** -- :ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +- |void| **set_focus_neighbor**\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| Tells Godot which node it should give 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 :ref:`ProjectSettings.input/ui_up` input action. The node must be a **Control**. If this property is not set, Godot will give focus to the closest **Control** to the top of this one. @@ -1356,12 +1414,12 @@ Tells Godot which node it should give focus to if the user presses the top arrow .. rst-class:: classref-property -:ref:`NodePath` **focus_next** = ``NodePath("")`` +:ref:`NodePath` **focus_next** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_next** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_focus_next** **(** **)** +- |void| **set_focus_next**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_next**\ (\ ) Tells Godot which node it should give focus to if the user presses :kbd:`Tab` on a keyboard by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_focus_next` input action. @@ -1375,12 +1433,12 @@ If this property is not set, Godot will select a "best guess" based on surroundi .. rst-class:: classref-property -:ref:`NodePath` **focus_previous** = ``NodePath("")`` +:ref:`NodePath` **focus_previous** = ``NodePath("")`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_focus_previous** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_focus_previous** **(** **)** +- |void| **set_focus_previous**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_focus_previous**\ (\ ) Tells Godot which node it should give focus to if the user presses :kbd:`Shift + Tab` on a keyboard by default. You can change the key by editing the :ref:`ProjectSettings.input/ui_focus_prev` input action. @@ -1394,11 +1452,11 @@ If this property is not set, Godot will select a "best guess" based on surroundi .. rst-class:: classref-property -:ref:`Vector2` **global_position** +:ref:`Vector2` **global_position** :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Vector2` **get_global_position** **(** **)** +- :ref:`Vector2` **get_global_position**\ (\ ) The node's global position, relative to the world (usually to the :ref:`CanvasLayer`). @@ -1410,12 +1468,12 @@ The node's global position, relative to the world (usually to the :ref:`CanvasLa .. rst-class:: classref-property -:ref:`GrowDirection` **grow_horizontal** = ``1`` +:ref:`GrowDirection` **grow_horizontal** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_h_grow_direction** **(** :ref:`GrowDirection` value **)** -- :ref:`GrowDirection` **get_h_grow_direction** **(** **)** +- |void| **set_h_grow_direction**\ (\ value\: :ref:`GrowDirection`\ ) +- :ref:`GrowDirection` **get_h_grow_direction**\ (\ ) 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. @@ -1427,12 +1485,12 @@ Controls the direction on the horizontal axis in which the control should grow i .. rst-class:: classref-property -:ref:`GrowDirection` **grow_vertical** = ``1`` +:ref:`GrowDirection` **grow_vertical** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_v_grow_direction** **(** :ref:`GrowDirection` value **)** -- :ref:`GrowDirection` **get_v_grow_direction** **(** **)** +- |void| **set_v_grow_direction**\ (\ value\: :ref:`GrowDirection`\ ) +- :ref:`GrowDirection` **get_v_grow_direction**\ (\ ) 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. @@ -1444,12 +1502,12 @@ Controls the direction on the vertical axis in which the control should grow if .. rst-class:: classref-property -:ref:`LayoutDirection` **layout_direction** = ``0`` +:ref:`LayoutDirection` **layout_direction** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_layout_direction** **(** :ref:`LayoutDirection` value **)** -- :ref:`LayoutDirection` **get_layout_direction** **(** **)** +- |void| **set_layout_direction**\ (\ value\: :ref:`LayoutDirection`\ ) +- :ref:`LayoutDirection` **get_layout_direction**\ (\ ) Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). @@ -1461,12 +1519,12 @@ Controls layout direction and text writing direction. Right-to-left layouts are .. rst-class:: classref-property -:ref:`bool` **localize_numeral_system** = ``true`` +:ref:`bool` **localize_numeral_system** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_localize_numeral_system** **(** :ref:`bool` value **)** -- :ref:`bool` **is_localizing_numeral_system** **(** **)** +- |void| **set_localize_numeral_system**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_localizing_numeral_system**\ (\ ) If ``true``, automatically converts code line numbers, list indices, :ref:`SpinBox` and :ref:`ProgressBar` values from the Western Arabic (0..9) to the numeral systems used in current locale. @@ -1480,12 +1538,12 @@ If ``true``, automatically converts code line numbers, list indices, :ref:`SpinB .. rst-class:: classref-property -:ref:`CursorShape` **mouse_default_cursor_shape** = ``0`` +:ref:`CursorShape` **mouse_default_cursor_shape** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_default_cursor_shape** **(** :ref:`CursorShape` value **)** -- :ref:`CursorShape` **get_default_cursor_shape** **(** **)** +- |void| **set_default_cursor_shape**\ (\ value\: :ref:`CursorShape`\ ) +- :ref:`CursorShape` **get_default_cursor_shape**\ (\ ) The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. @@ -1499,14 +1557,14 @@ The default cursor shape for this control. Useful for Godot plugins and applicat .. rst-class:: classref-property -:ref:`MouseFilter` **mouse_filter** = ``0`` +:ref:`MouseFilter` **mouse_filter** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mouse_filter** **(** :ref:`MouseFilter` value **)** -- :ref:`MouseFilter` **get_mouse_filter** **(** **)** +- |void| **set_mouse_filter**\ (\ value\: :ref:`MouseFilter`\ ) +- :ref:`MouseFilter` **get_mouse_filter**\ (\ ) -Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. See the constants to learn what each does. +Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. See the constants to learn what each does. .. rst-class:: classref-item-separator @@ -1516,16 +1574,16 @@ Controls whether the control will be able to receive mouse button input events t .. rst-class:: classref-property -:ref:`bool` **mouse_force_pass_scroll_events** = ``true`` +:ref:`bool` **mouse_force_pass_scroll_events** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_force_pass_scroll_events** **(** :ref:`bool` value **)** -- :ref:`bool` **is_force_pass_scroll_events** **(** **)** +- |void| **set_force_pass_scroll_events**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_force_pass_scroll_events**\ (\ ) -When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. As it defaults to true, this allows nested scrollable containers to work out of the box. +When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. As it defaults to true, this allows nested scrollable containers to work out of the box. -You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. +You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. .. rst-class:: classref-item-separator @@ -1535,12 +1593,12 @@ You should disable it on the root of your UI if you do not want scroll events to .. rst-class:: classref-property -:ref:`float` **offset_bottom** = ``0.0`` +:ref:`float` **offset_bottom** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** -- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| +- |void| **set_offset**\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) +- :ref:`float` **get_offset**\ (\ offset\: :ref:`Side`\ ) |const| Distance between the node's bottom edge and its parent control, based on :ref:`anchor_bottom`. @@ -1554,12 +1612,12 @@ Offsets are often controlled by one or multiple parent :ref:`Container` **offset_left** = ``0.0`` +:ref:`float` **offset_left** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** -- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| +- |void| **set_offset**\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) +- :ref:`float` **get_offset**\ (\ offset\: :ref:`Side`\ ) |const| Distance between the node's left edge and its parent control, based on :ref:`anchor_left`. @@ -1573,12 +1631,12 @@ Offsets are often controlled by one or multiple parent :ref:`Container` **offset_right** = ``0.0`` +:ref:`float` **offset_right** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** -- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| +- |void| **set_offset**\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) +- :ref:`float` **get_offset**\ (\ offset\: :ref:`Side`\ ) |const| Distance between the node's right edge and its parent control, based on :ref:`anchor_right`. @@ -1592,12 +1650,12 @@ Offsets are often controlled by one or multiple parent :ref:`Container` **offset_top** = ``0.0`` +:ref:`float` **offset_top** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** -- :ref:`float` **get_offset** **(** :ref:`Side` offset **)** |const| +- |void| **set_offset**\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) +- :ref:`float` **get_offset**\ (\ offset\: :ref:`Side`\ ) |const| Distance between the node's top edge and its parent control, based on :ref:`anchor_top`. @@ -1611,12 +1669,12 @@ Offsets are often controlled by one or multiple parent :ref:`Container` **pivot_offset** = ``Vector2(0, 0)`` +:ref:`Vector2` **pivot_offset** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pivot_offset** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_pivot_offset** **(** **)** +- |void| **set_pivot_offset**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_pivot_offset**\ (\ ) By default, the node's pivot is its top-left corner. When you change its :ref:`rotation` or :ref:`scale`, it will rotate or scale around this pivot. Set this property to :ref:`size` / 2 to pivot around the Control's center. @@ -1628,11 +1686,11 @@ By default, the node's pivot is its top-left corner. When you change its :ref:`r .. rst-class:: classref-property -:ref:`Vector2` **position** = ``Vector2(0, 0)`` +:ref:`Vector2` **position** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Vector2` **get_position** **(** **)** +- :ref:`Vector2` **get_position**\ (\ ) The node's position, relative to its containing node. It corresponds to the rectangle's top-left corner. The property is not affected by :ref:`pivot_offset`. @@ -1644,12 +1702,12 @@ The node's position, relative to its containing node. It corresponds to the rect .. rst-class:: classref-property -:ref:`float` **rotation** = ``0.0`` +:ref:`float` **rotation** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rotation** **(** :ref:`float` value **)** -- :ref:`float` **get_rotation** **(** **)** +- |void| **set_rotation**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rotation**\ (\ ) The node's rotation around its pivot, in radians. See :ref:`pivot_offset` to change the pivot's position. @@ -1663,12 +1721,12 @@ The node's rotation around its pivot, in radians. See :ref:`pivot_offset` **rotation_degrees** +:ref:`float` **rotation_degrees** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rotation_degrees** **(** :ref:`float` value **)** -- :ref:`float` **get_rotation_degrees** **(** **)** +- |void| **set_rotation_degrees**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rotation_degrees**\ (\ ) Helper property to access :ref:`rotation` in degrees instead of radians. @@ -1680,12 +1738,12 @@ Helper property to access :ref:`rotation` in de .. rst-class:: classref-property -:ref:`Vector2` **scale** = ``Vector2(1, 1)`` +:ref:`Vector2` **scale** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_scale** **(** **)** +- |void| **set_scale**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_scale**\ (\ ) The node's scale, relative to its :ref:`size`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's :ref:`tooltip_text` will also scale according to this value. @@ -1703,12 +1761,12 @@ The node's scale, relative to its :ref:`size`. Chan .. rst-class:: classref-property -:ref:`Node` **shortcut_context** +:ref:`Node` **shortcut_context** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shortcut_context** **(** :ref:`Node` value **)** -- :ref:`Node` **get_shortcut_context** **(** **)** +- |void| **set_shortcut_context**\ (\ value\: :ref:`Node`\ ) +- :ref:`Node` **get_shortcut_context**\ (\ ) The :ref:`Node` which must be a parent of the focused **Control** for the shortcut to be activated. If ``null``, the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. @@ -1720,11 +1778,11 @@ The :ref:`Node` which must be a parent of the focused **Control** fo .. rst-class:: classref-property -:ref:`Vector2` **size** = ``Vector2(0, 0)`` +:ref:`Vector2` **size** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Vector2` **get_size** **(** **)** +- :ref:`Vector2` **get_size**\ (\ ) The size of the node's bounding rectangle, in the node's coordinate system. :ref:`Container` nodes update this property automatically. @@ -1736,12 +1794,12 @@ The size of the node's bounding rectangle, in the node's coordinate system. :ref .. rst-class:: classref-property -|bitfield|\<:ref:`SizeFlags`\> **size_flags_horizontal** = ``1`` +|bitfield|\[:ref:`SizeFlags`\] **size_flags_horizontal** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_h_size_flags** **(** |bitfield|\<:ref:`SizeFlags`\> value **)** -- |bitfield|\<:ref:`SizeFlags`\> **get_h_size_flags** **(** **)** +- |void| **set_h_size_flags**\ (\ value\: |bitfield|\[:ref:`SizeFlags`\]\ ) +- |bitfield|\[:ref:`SizeFlags`\] **get_h_size_flags**\ (\ ) Tells the parent :ref:`Container` nodes how they should resize and place the node on the X axis. Use a combination of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. @@ -1753,12 +1811,12 @@ Tells the parent :ref:`Container` nodes how they should resize .. rst-class:: classref-property -:ref:`float` **size_flags_stretch_ratio** = ``1.0`` +:ref:`float` **size_flags_stretch_ratio** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stretch_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_stretch_ratio** **(** **)** +- |void| **set_stretch_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_stretch_ratio**\ (\ ) If the node and at least one of its neighbors uses the :ref:`SIZE_EXPAND` size flag, the parent :ref:`Container` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space. @@ -1770,12 +1828,12 @@ If the node and at least one of its neighbors uses the :ref:`SIZE_EXPAND`\> **size_flags_vertical** = ``1`` +|bitfield|\[:ref:`SizeFlags`\] **size_flags_vertical** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_v_size_flags** **(** |bitfield|\<:ref:`SizeFlags`\> value **)** -- |bitfield|\<:ref:`SizeFlags`\> **get_v_size_flags** **(** **)** +- |void| **set_v_size_flags**\ (\ value\: |bitfield|\[:ref:`SizeFlags`\]\ ) +- |bitfield|\[:ref:`SizeFlags`\] **get_v_size_flags**\ (\ ) Tells the parent :ref:`Container` nodes how they should resize and place the node on the Y axis. Use a combination of the :ref:`SizeFlags` constants to change the flags. See the constants to learn what each does. @@ -1787,12 +1845,12 @@ Tells the parent :ref:`Container` nodes how they should resize .. rst-class:: classref-property -:ref:`Theme` **theme** +:ref:`Theme` **theme** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_theme** **(** :ref:`Theme` value **)** -- :ref:`Theme` **get_theme** **(** **)** +- |void| **set_theme**\ (\ value\: :ref:`Theme`\ ) +- :ref:`Theme` **get_theme**\ (\ ) The :ref:`Theme` resource this node and all its **Control** and :ref:`Window` children use. If a child node has its own :ref:`Theme` resource set, theme items are merged with child's definitions having higher priority. @@ -1806,12 +1864,12 @@ The :ref:`Theme` resource this node and all its **Control** and :re .. rst-class:: classref-property -:ref:`StringName` **theme_type_variation** = ``&""`` +:ref:`StringName` **theme_type_variation** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_theme_type_variation** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_theme_type_variation** **(** **)** +- |void| **set_theme_type_variation**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_theme_type_variation**\ (\ ) The name of a theme type variation used by this **Control** to look up its own theme items. When empty, the class name of the node is used (e.g. ``Button`` for the :ref:`Button` control), as well as the class names of all parent classes (in order of inheritance). @@ -1829,16 +1887,16 @@ When set, this property gives the highest priority to the type of the specified .. rst-class:: classref-property -:ref:`String` **tooltip_text** = ``""`` +:ref:`String` **tooltip_text** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tooltip_text** **(** :ref:`String` value **)** -- :ref:`String` **get_tooltip_text** **(** **)** +- |void| **set_tooltip_text**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_tooltip_text**\ (\ ) The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` option. See also :ref:`get_tooltip`. -The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: +The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: .. tabs:: @@ -1872,15 +1930,15 @@ The tooltip popup will use either a default implementation, or a custom one that Method Descriptions ------------------- -.. _class_Control_method__can_drop_data: +.. _class_Control_private_method__can_drop_data: .. rst-class:: classref-method -:ref:`bool` **_can_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| +:ref:`bool` **_can_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| |const| :ref:`🔗` -Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``at_position``. ``at_position`` is local to this control. +Godot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``at_position``. ``at_position`` is local to this control. -This method should only be used to test the data. Process the data in :ref:`_drop_data`. +This method should only be used to test the data. Process the data in :ref:`_drop_data`. .. tabs:: @@ -1907,13 +1965,13 @@ This method should only be used to test the data. Process the data in :ref:`_dro ---- -.. _class_Control_method__drop_data: +.. _class_Control_private_method__drop_data: .. rst-class:: classref-method -void **_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| +|void| **_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| :ref:`🔗` -Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Godot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. +Godot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Godot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. .. tabs:: @@ -1944,13 +2002,13 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra ---- -.. _class_Control_method__get_drag_data: +.. _class_Control_private_method__get_drag_data: .. rst-class:: classref-method -:ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| +:ref:`Variant` **_get_drag_data**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| :ref:`🔗` -Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag`. +Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag`. A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview`. A good time to set the preview is in this method. @@ -1979,11 +2037,11 @@ A preview that will follow the mouse that should represent the data can be set w ---- -.. _class_Control_method__get_minimum_size: +.. _class_Control_private_method__get_minimum_size: .. rst-class:: classref-method -:ref:`Vector2` **_get_minimum_size** **(** **)** |virtual| |const| +:ref:`Vector2` **_get_minimum_size**\ (\ ) |virtual| |const| :ref:`🔗` Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to :ref:`custom_minimum_size` for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). @@ -1995,11 +2053,11 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. ---- -.. _class_Control_method__get_tooltip: +.. _class_Control_private_method__get_tooltip: .. rst-class:: classref-method -:ref:`String` **_get_tooltip** **(** :ref:`Vector2` at_position **)** |virtual| |const| +:ref:`String` **_get_tooltip**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| :ref:`🔗` Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip`. @@ -2009,11 +2067,11 @@ Virtual method to be implemented by the user. Returns the tooltip text for the p ---- -.. _class_Control_method__gui_input: +.. _class_Control_private_method__gui_input: .. rst-class:: classref-method -void **_gui_input** **(** :ref:`InputEvent` event **)** |virtual| +|void| **_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`🔗` Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See :ref:`accept_event`. @@ -2046,7 +2104,7 @@ Virtual method to be implemented by the user. Use this method to process and acc The event won't trigger if: -\* clicking outside the control (see :ref:`_has_point`); +\* clicking outside the control (see :ref:`_has_point`); \* control has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; @@ -2062,11 +2120,11 @@ The event won't trigger if: ---- -.. _class_Control_method__has_point: +.. _class_Control_private_method__has_point: .. rst-class:: classref-method -:ref:`bool` **_has_point** **(** :ref:`Vector2` point **)** |virtual| |const| +:ref:`bool` **_has_point**\ (\ point\: :ref:`Vector2`\ ) |virtual| |const| :ref:`🔗` Virtual method to be implemented by the user. Returns whether the given ``point`` is inside this control. @@ -2078,11 +2136,11 @@ If not overridden, default behavior is checking if the point is within control's ---- -.. _class_Control_method__make_custom_tooltip: +.. _class_Control_private_method__make_custom_tooltip: .. rst-class:: classref-method -:ref:`Object` **_make_custom_tooltip** **(** :ref:`String` for_text **)** |virtual| |const| +:ref:`Object` **_make_custom_tooltip**\ (\ for_text\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. The ``for_text`` includes the contents of the :ref:`tooltip_text` property. @@ -2144,11 +2202,11 @@ The returned node will be added as child to a :ref:`PopupPanel ---- -.. _class_Control_method__structured_text_parser: +.. _class_Control_private_method__structured_text_parser: .. rst-class:: classref-method -:ref:`Vector3i[]` **_structured_text_parser** **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| +:ref:`Array`\[:ref:`Vector3i`\] **_structured_text_parser**\ (\ args\: :ref:`Array`, text\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` User defined BiDi algorithm override function. @@ -2162,9 +2220,9 @@ Returns an :ref:`Array` of :ref:`Vector3i` text ran .. rst-class:: classref-method -void **accept_event** **(** **)** +|void| **accept_event**\ (\ ) :ref:`🔗` -Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input` or :ref:`Node._unhandled_key_input`. +Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input` or :ref:`Node._unhandled_key_input`. \ **Note:** This does not affect the methods in :ref:`Input`, only the way events are propagated. @@ -2176,7 +2234,7 @@ Marks an input event as handled. Once you accept an input event, it stops propag .. rst-class:: classref-method -void **add_theme_color_override** **(** :ref:`StringName` name, :ref:`Color` color **)** +|void| **add_theme_color_override**\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`🔗` Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override`. @@ -2215,7 +2273,7 @@ See also :ref:`get_theme_color`. .. rst-class:: classref-method -void **add_theme_constant_override** **(** :ref:`StringName` name, :ref:`int` constant **)** +|void| **add_theme_constant_override**\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) :ref:`🔗` Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override`. @@ -2229,7 +2287,7 @@ See also :ref:`get_theme_constant`. .. rst-class:: classref-method -void **add_theme_font_override** **(** :ref:`StringName` name, :ref:`Font` font **)** +|void| **add_theme_font_override**\ (\ name\: :ref:`StringName`, font\: :ref:`Font`\ ) :ref:`🔗` Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override`. @@ -2243,7 +2301,7 @@ See also :ref:`get_theme_font`. .. rst-class:: classref-method -void **add_theme_font_size_override** **(** :ref:`StringName` name, :ref:`int` font_size **)** +|void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName`, font_size\: :ref:`int`\ ) :ref:`🔗` Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override`. @@ -2257,7 +2315,7 @@ See also :ref:`get_theme_font_size`. .. rst-class:: classref-method -void **add_theme_icon_override** **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** +|void| **add_theme_icon_override**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override`. @@ -2271,7 +2329,7 @@ See also :ref:`get_theme_icon`. .. rst-class:: classref-method -void **add_theme_stylebox_override** **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** +|void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName`, stylebox\: :ref:`StyleBox`\ ) :ref:`🔗` Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override`. @@ -2316,7 +2374,7 @@ See also :ref:`get_theme_stylebox`. .. rst-class:: classref-method -void **begin_bulk_theme_override** **(** **)** +|void| **begin_bulk_theme_override**\ (\ ) :ref:`🔗` Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override` is called. @@ -2328,7 +2386,7 @@ Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_C .. rst-class:: classref-method -void **end_bulk_theme_override** **(** **)** +|void| **end_bulk_theme_override**\ (\ ) :ref:`🔗` Ends a bulk theme override update. See :ref:`begin_bulk_theme_override`. @@ -2340,7 +2398,7 @@ Ends a bulk theme override update. See :ref:`begin_bulk_theme_override` **find_next_valid_focus** **(** **)** |const| +:ref:`Control` **find_next_valid_focus**\ (\ ) |const| :ref:`🔗` Finds the next (below in the tree) **Control** that can receive the focus. @@ -2352,7 +2410,7 @@ Finds the next (below in the tree) **Control** that can receive the focus. .. rst-class:: classref-method -:ref:`Control` **find_prev_valid_focus** **(** **)** |const| +:ref:`Control` **find_prev_valid_focus**\ (\ ) |const| :ref:`🔗` Finds the previous (above in the tree) **Control** that can receive the focus. @@ -2360,15 +2418,29 @@ Finds the previous (above in the tree) **Control** that can receive the focus. ---- +.. _class_Control_method_find_valid_focus_neighbor: + +.. rst-class:: classref-method + +:ref:`Control` **find_valid_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| :ref:`🔗` + +Finds the next **Control** that can receive the focus on the specified :ref:`Side`. + +\ **Note:** This is different from :ref:`get_focus_neighbor`, which returns the path of a specified focus neighbor. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method_force_drag: .. rst-class:: classref-method -void **force_drag** **(** :ref:`Variant` data, :ref:`Control` preview **)** +|void| **force_drag**\ (\ data\: :ref:`Variant`, preview\: :ref:`Control`\ ) :ref:`🔗` -Forces drag and bypasses :ref:`_get_drag_data` and :ref:`set_drag_preview` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. +Forces drag and bypasses :ref:`_get_drag_data` and :ref:`set_drag_preview` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. -The methods :ref:`_can_drop_data` and :ref:`_drop_data` must be implemented on controls that want to receive drop data. +The methods :ref:`_can_drop_data` and :ref:`_drop_data` must be implemented on controls that want to receive drop data. .. rst-class:: classref-item-separator @@ -2378,7 +2450,7 @@ The methods :ref:`_can_drop_data` and :ref: .. rst-class:: classref-method -:ref:`float` **get_anchor** **(** :ref:`Side` side **)** |const| +:ref:`float` **get_anchor**\ (\ side\: :ref:`Side`\ ) |const| :ref:`🔗` Returns the anchor for the specified :ref:`Side`. A getter method for :ref:`anchor_bottom`, :ref:`anchor_left`, :ref:`anchor_right` and :ref:`anchor_top`. @@ -2390,7 +2462,7 @@ Returns the anchor for the specified :ref:`Side`. A gett .. rst-class:: classref-method -:ref:`Vector2` **get_begin** **(** **)** |const| +:ref:`Vector2` **get_begin**\ (\ ) |const| :ref:`🔗` Returns :ref:`offset_left` and :ref:`offset_top`. See also :ref:`position`. @@ -2402,7 +2474,7 @@ Returns :ref:`offset_left` and :ref:`offset_ .. rst-class:: classref-method -:ref:`Vector2` **get_combined_minimum_size** **(** **)** |const| +:ref:`Vector2` **get_combined_minimum_size**\ (\ ) |const| :ref:`🔗` Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size`. @@ -2414,7 +2486,7 @@ Returns combined minimum size from :ref:`custom_minimum_size` **get_cursor_shape** **(** :ref:`Vector2` position=Vector2(0, 0) **)** |const| +:ref:`CursorShape` **get_cursor_shape**\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` Returns the mouse cursor shape the control displays on mouse hover. See :ref:`CursorShape`. @@ -2426,7 +2498,7 @@ Returns the mouse cursor shape the control displays on mouse hover. See :ref:`Cu .. rst-class:: classref-method -:ref:`Vector2` **get_end** **(** **)** |const| +:ref:`Vector2` **get_end**\ (\ ) |const| :ref:`🔗` Returns :ref:`offset_right` and :ref:`offset_bottom`. @@ -2438,10 +2510,12 @@ Returns :ref:`offset_right` and :ref:`offse .. rst-class:: classref-method -:ref:`NodePath` **get_focus_neighbor** **(** :ref:`Side` side **)** |const| +:ref:`NodePath` **get_focus_neighbor**\ (\ side\: :ref:`Side`\ ) |const| :ref:`🔗` Returns the focus neighbor for the specified :ref:`Side`. A getter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. +\ **Note:** To find the next **Control** on the specific :ref:`Side`, even if a neighbor is not assigned, use :ref:`find_valid_focus_neighbor`. + .. rst-class:: classref-item-separator ---- @@ -2450,7 +2524,7 @@ Returns the focus neighbor for the specified :ref:`Side` .. rst-class:: classref-method -:ref:`Rect2` **get_global_rect** **(** **)** |const| +:ref:`Rect2` **get_global_rect**\ (\ ) |const| :ref:`🔗` Returns the position and size of the control relative to the containing canvas. See :ref:`global_position` and :ref:`size`. @@ -2466,7 +2540,7 @@ Returns the position and size of the control relative to the containing canvas. .. rst-class:: classref-method -:ref:`Vector2` **get_minimum_size** **(** **)** |const| +:ref:`Vector2` **get_minimum_size**\ (\ ) |const| :ref:`🔗` Returns the minimum size for this control. See :ref:`custom_minimum_size`. @@ -2478,7 +2552,7 @@ Returns the minimum size for this control. See :ref:`custom_minimum_size` **get_offset** **(** :ref:`Side` offset **)** |const| +:ref:`float` **get_offset**\ (\ offset\: :ref:`Side`\ ) |const| :ref:`🔗` Returns the offset for the specified :ref:`Side`. A getter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. @@ -2490,7 +2564,7 @@ Returns the offset for the specified :ref:`Side`. A gett .. rst-class:: classref-method -:ref:`Vector2` **get_parent_area_size** **(** **)** |const| +:ref:`Vector2` **get_parent_area_size**\ (\ ) |const| :ref:`🔗` Returns the width/height occupied in the parent control. @@ -2502,7 +2576,7 @@ Returns the width/height occupied in the parent control. .. rst-class:: classref-method -:ref:`Control` **get_parent_control** **(** **)** |const| +:ref:`Control` **get_parent_control**\ (\ ) |const| :ref:`🔗` Returns the parent control node. @@ -2514,7 +2588,7 @@ Returns the parent control node. .. rst-class:: classref-method -:ref:`Rect2` **get_rect** **(** **)** |const| +:ref:`Rect2` **get_rect**\ (\ ) |const| :ref:`🔗` Returns the position and size of the control in the coordinate system of the containing node. See :ref:`position`, :ref:`scale` and :ref:`size`. @@ -2530,7 +2604,7 @@ Returns the position and size of the control in the coordinate system of the con .. rst-class:: classref-method -:ref:`Vector2` **get_screen_position** **(** **)** |const| +:ref:`Vector2` **get_screen_position**\ (\ ) |const| :ref:`🔗` Returns the position of this **Control** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. @@ -2552,7 +2626,7 @@ Equals to :ref:`global_position` if the .. rst-class:: classref-method -:ref:`Color` **get_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`Color` **get_theme_color**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns a :ref:`Color` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a color item with the specified ``name`` and ``theme_type``. If ``theme_type`` is omitted the class name of the current control is used as the type, or :ref:`theme_type_variation` if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. @@ -2589,7 +2663,7 @@ For the current control its local overrides are considered first (see :ref:`add_ .. rst-class:: classref-method -:ref:`int` **get_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`int` **get_theme_constant**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns a constant from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a constant item with the specified ``name`` and ``theme_type``. @@ -2603,7 +2677,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`float` **get_theme_default_base_scale** **(** **)** |const| +:ref:`float` **get_theme_default_base_scale**\ (\ ) |const| :ref:`🔗` Returns the default base scale value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_base_scale` value. @@ -2617,7 +2691,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`Font` **get_theme_default_font** **(** **)** |const| +:ref:`Font` **get_theme_default_font**\ (\ ) |const| :ref:`🔗` Returns the default font from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font` value. @@ -2631,7 +2705,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`int` **get_theme_default_font_size** **(** **)** |const| +:ref:`int` **get_theme_default_font_size**\ (\ ) |const| :ref:`🔗` Returns the default font size value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font_size` value. @@ -2645,7 +2719,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`Font` **get_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`Font` **get_theme_font**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns a :ref:`Font` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font item with the specified ``name`` and ``theme_type``. @@ -2659,7 +2733,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`int` **get_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`int` **get_theme_font_size**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns a font size from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font size item with the specified ``name`` and ``theme_type``. @@ -2673,7 +2747,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`Texture2D` **get_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`Texture2D` **get_theme_icon**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns an icon from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has an icon item with the specified ``name`` and ``theme_type``. @@ -2687,7 +2761,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`StyleBox` **get_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`StyleBox` **get_theme_stylebox**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns a :ref:`StyleBox` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a stylebox item with the specified ``name`` and ``theme_type``. @@ -2701,11 +2775,11 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`String` **get_tooltip** **(** :ref:`Vector2` at_position=Vector2(0, 0) **)** |const| +:ref:`String` **get_tooltip**\ (\ at_position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. -This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. +This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. \ **Note:** If this method returns an empty :ref:`String`, no tooltip is displayed. @@ -2717,7 +2791,7 @@ This method can be overridden to customize its behavior. See :ref:`_get_tooltip< .. rst-class:: classref-method -void **grab_click_focus** **(** **)** +|void| **grab_click_focus**\ (\ ) :ref:`🔗` Creates an :ref:`InputEventMouseButton` that attempts to click the control. If the event is received, the control acquires focus. @@ -2746,11 +2820,11 @@ Creates an :ref:`InputEventMouseButton` that attemp .. rst-class:: classref-method -void **grab_focus** **(** **)** +|void| **grab_focus**\ (\ ) :ref:`🔗` Steal the focus from another control and become the focused control (see :ref:`focus_mode`). -\ **Note:** Using this method together with :ref:`Callable.call_deferred` makes it more reliable, especially when called inside :ref:`Node._ready`. +\ **Note:** Using this method together with :ref:`Callable.call_deferred` makes it more reliable, especially when called inside :ref:`Node._ready`. .. rst-class:: classref-item-separator @@ -2760,7 +2834,7 @@ Steal the focus from another control and become the focused control (see :ref:`f .. rst-class:: classref-method -:ref:`bool` **has_focus** **(** **)** |const| +:ref:`bool` **has_focus**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this is the current focused control. See :ref:`focus_mode`. @@ -2772,7 +2846,7 @@ Returns ``true`` if this is the current focused control. See :ref:`focus_mode` **has_theme_color** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_color**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a color item with the specified ``name`` and ``theme_type``. @@ -2786,7 +2860,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_color_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_color_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this **Control** node. @@ -2800,7 +2874,7 @@ See :ref:`add_theme_color_override` **has_theme_constant** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_constant**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a constant item with the specified ``name`` and ``theme_type``. @@ -2814,7 +2888,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_constant_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_constant_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this **Control** node. @@ -2828,7 +2902,7 @@ See :ref:`add_theme_constant_override` **has_theme_font** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_font**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font item with the specified ``name`` and ``theme_type``. @@ -2842,7 +2916,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_font_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_font_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this **Control** node. @@ -2856,7 +2930,7 @@ See :ref:`add_theme_font_override` .. rst-class:: classref-method -:ref:`bool` **has_theme_font_size** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_font_size**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font size item with the specified ``name`` and ``theme_type``. @@ -2870,7 +2944,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_font_size_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_font_size_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this **Control** node. @@ -2884,7 +2958,7 @@ See :ref:`add_theme_font_size_override` **has_theme_icon** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_icon**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has an icon item with the specified ``name`` and ``theme_type``. @@ -2898,7 +2972,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_icon_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_icon_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this **Control** node. @@ -2912,7 +2986,7 @@ See :ref:`add_theme_icon_override` .. rst-class:: classref-method -:ref:`bool` **has_theme_stylebox** **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| +:ref:`bool` **has_theme_stylebox**\ (\ name\: :ref:`StringName`, theme_type\: :ref:`StringName` = &""\ ) |const| :ref:`🔗` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. @@ -2926,7 +3000,7 @@ See :ref:`get_theme_color` for details. .. rst-class:: classref-method -:ref:`bool` **has_theme_stylebox_override** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_theme_stylebox_override**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this **Control** node. @@ -2940,7 +3014,7 @@ See :ref:`add_theme_stylebox_override` **is_drag_successful** **(** **)** |const| +:ref:`bool` **is_drag_successful**\ (\ ) |const| :ref:`🔗` Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful`. @@ -2954,7 +3028,7 @@ Best used with :ref:`Node.NOTIFICATION_DRAG_END` **is_layout_rtl** **(** **)** |const| +:ref:`bool` **is_layout_rtl**\ (\ ) |const| :ref:`🔗` Returns ``true`` if layout is right-to-left. @@ -2966,7 +3040,7 @@ Returns ``true`` if layout is right-to-left. .. rst-class:: classref-method -void **release_focus** **(** **)** +|void| **release_focus**\ (\ ) :ref:`🔗` Give up the focus. No other control will be able to receive input. @@ -2978,7 +3052,7 @@ Give up the focus. No other control will be able to receive input. .. rst-class:: classref-method -void **remove_theme_color_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_color_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override` or via the Inspector dock. @@ -2990,7 +3064,7 @@ Removes a local override for a theme :ref:`Color` with the specifie .. rst-class:: classref-method -void **remove_theme_constant_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override` or via the Inspector dock. @@ -3002,7 +3076,7 @@ Removes a local override for a theme constant with the specified ``name`` previo .. rst-class:: classref-method -void **remove_theme_font_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_font_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override` or via the Inspector dock. @@ -3014,7 +3088,7 @@ Removes a local override for a theme :ref:`Font` with the specified .. rst-class:: classref-method -void **remove_theme_font_size_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override` or via the Inspector dock. @@ -3026,7 +3100,7 @@ Removes a local override for a theme font size with the specified ``name`` previ .. rst-class:: classref-method -void **remove_theme_icon_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override` or via the Inspector dock. @@ -3038,7 +3112,7 @@ Removes a local override for a theme icon with the specified ``name`` previously .. rst-class:: classref-method -void **remove_theme_stylebox_override** **(** :ref:`StringName` name **)** +|void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override` or via the Inspector dock. @@ -3050,7 +3124,7 @@ Removes a local override for a theme :ref:`StyleBox` with the sp .. rst-class:: classref-method -void **reset_size** **(** **)** +|void| **reset_size**\ (\ ) :ref:`🔗` Resets the size to :ref:`get_combined_minimum_size`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). @@ -3062,7 +3136,7 @@ Resets the size to :ref:`get_combined_minimum_size` side, :ref:`float` anchor, :ref:`bool` keep_offset=false, :ref:`bool` push_opposite_anchor=true **)** +|void| **set_anchor**\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, keep_offset\: :ref:`bool` = false, push_opposite_anchor\: :ref:`bool` = true\ ) :ref:`🔗` Sets the anchor for the specified :ref:`Side` to ``anchor``. A setter method for :ref:`anchor_bottom`, :ref:`anchor_left`, :ref:`anchor_right` and :ref:`anchor_top`. @@ -3078,7 +3152,7 @@ If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this an .. rst-class:: classref-method -void **set_anchor_and_offset** **(** :ref:`Side` side, :ref:`float` anchor, :ref:`float` offset, :ref:`bool` push_opposite_anchor=false **)** +|void| **set_anchor_and_offset**\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, offset\: :ref:`float`, push_opposite_anchor\: :ref:`bool` = false\ ) :ref:`🔗` Works the same as :ref:`set_anchor`, but instead of ``keep_offset`` argument and automatic update of offset, it allows to set the offset yourself (see :ref:`set_offset`). @@ -3090,7 +3164,7 @@ Works the same as :ref:`set_anchor`, but instea .. rst-class:: classref-method -void **set_anchors_and_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** +|void| **set_anchors_and_offsets_preset**\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) :ref:`🔗` Sets both anchor preset and offset preset. See :ref:`set_anchors_preset` and :ref:`set_offsets_preset`. @@ -3102,7 +3176,7 @@ Sets both anchor preset and offset preset. See :ref:`set_anchors_preset` preset, :ref:`bool` keep_offsets=false **)** +|void| **set_anchors_preset**\ (\ preset\: :ref:`LayoutPreset`, keep_offsets\: :ref:`bool` = false\ ) :ref:`🔗` Sets the anchors to a ``preset`` from :ref:`LayoutPreset` enum. This is the code equivalent to using the Layout menu in the 2D editor. @@ -3116,7 +3190,7 @@ If ``keep_offsets`` is ``true``, control's position will also be updated. .. rst-class:: classref-method -void **set_begin** **(** :ref:`Vector2` position **)** +|void| **set_begin**\ (\ position\: :ref:`Vector2`\ ) :ref:`🔗` Sets :ref:`offset_left` and :ref:`offset_top` at the same time. Equivalent of changing :ref:`position`. @@ -3128,9 +3202,9 @@ Sets :ref:`offset_left` and :ref:`offset_top .. rst-class:: classref-method -void **set_drag_forwarding** **(** :ref:`Callable` drag_func, :ref:`Callable` can_drop_func, :ref:`Callable` drop_func **)** +|void| **set_drag_forwarding**\ (\ drag_func\: :ref:`Callable`, can_drop_func\: :ref:`Callable`, drop_func\: :ref:`Callable`\ ) :ref:`🔗` -Forwards the handling of this control's :ref:`_get_drag_data`, :ref:`_can_drop_data` and :ref:`_drop_data` virtual functions to delegate callables. +Forwards the handling of this control's :ref:`_get_drag_data`, :ref:`_can_drop_data` and :ref:`_drop_data` virtual functions to delegate callables. For each argument, if not empty, the delegate callable is used, otherwise the local (virtual) function is used. @@ -3144,9 +3218,9 @@ The function format for each callable should be exactly the same as the virtual .. rst-class:: classref-method -void **set_drag_preview** **(** :ref:`Control` control **)** +|void| **set_drag_preview**\ (\ control\: :ref:`Control`\ ) :ref:`🔗` -Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. +Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. .. tabs:: @@ -3188,7 +3262,7 @@ Shows the given control at the mouse pointer. A good time to call this method is .. rst-class:: classref-method -void **set_end** **(** :ref:`Vector2` position **)** +|void| **set_end**\ (\ position\: :ref:`Vector2`\ ) :ref:`🔗` Sets :ref:`offset_right` and :ref:`offset_bottom` at the same time. @@ -3200,7 +3274,7 @@ Sets :ref:`offset_right` and :ref:`offset_b .. rst-class:: classref-method -void **set_focus_neighbor** **(** :ref:`Side` side, :ref:`NodePath` neighbor **)** +|void| **set_focus_neighbor**\ (\ side\: :ref:`Side`, neighbor\: :ref:`NodePath`\ ) :ref:`🔗` Sets the focus neighbor for the specified :ref:`Side` to the **Control** at ``neighbor`` node path. A setter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. @@ -3212,7 +3286,7 @@ Sets the focus neighbor for the specified :ref:`Side` to .. rst-class:: classref-method -void **set_global_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** +|void| **set_global_position**\ (\ position\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) :ref:`🔗` Sets the :ref:`global_position` to given ``position``. @@ -3226,7 +3300,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of .. rst-class:: classref-method -void **set_offset** **(** :ref:`Side` side, :ref:`float` offset **)** +|void| **set_offset**\ (\ side\: :ref:`Side`, offset\: :ref:`float`\ ) :ref:`🔗` Sets the offset for the specified :ref:`Side` to ``offset``. A setter method for :ref:`offset_bottom`, :ref:`offset_left`, :ref:`offset_right` and :ref:`offset_top`. @@ -3238,7 +3312,7 @@ Sets the offset for the specified :ref:`Side` to ``offse .. rst-class:: classref-method -void **set_offsets_preset** **(** :ref:`LayoutPreset` preset, :ref:`LayoutPresetMode` resize_mode=0, :ref:`int` margin=0 **)** +|void| **set_offsets_preset**\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) :ref:`🔗` Sets the offsets to a ``preset`` from :ref:`LayoutPreset` enum. This is the code equivalent to using the Layout menu in the 2D editor. @@ -3254,7 +3328,7 @@ Use parameter ``margin`` to determine the gap between the **Control** and the ed .. rst-class:: classref-method -void **set_position** **(** :ref:`Vector2` position, :ref:`bool` keep_offsets=false **)** +|void| **set_position**\ (\ position\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) :ref:`🔗` Sets the :ref:`position` to given ``position``. @@ -3268,7 +3342,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of .. rst-class:: classref-method -void **set_size** **(** :ref:`Vector2` size, :ref:`bool` keep_offsets=false **)** +|void| **set_size**\ (\ size\: :ref:`Vector2`, keep_offsets\: :ref:`bool` = false\ ) :ref:`🔗` Sets the size (see :ref:`size`). @@ -3282,7 +3356,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of .. rst-class:: classref-method -void **update_minimum_size** **(** **)** +|void| **update_minimum_size**\ (\ ) :ref:`🔗` Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size` when the return value is changed. Setting :ref:`custom_minimum_size` directly calls this method automatically. @@ -3294,7 +3368,7 @@ Invalidates the size cache in this node and in parent nodes up to top level. Int .. rst-class:: classref-method -void **warp_mouse** **(** :ref:`Vector2` position **)** +|void| **warp_mouse**\ (\ position\: :ref:`Vector2`\ ) :ref:`🔗` Moves the mouse cursor to ``position``, relative to :ref:`position` of this **Control**. @@ -3307,3 +3381,4 @@ Moves the mouse cursor to ``position``, relative to :ref:`position` when it's in ``BUILD_SOLIDS`` mode. +A 2D convex polygon shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. \ **ConvexPolygonShape2D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape2D` which is hollow. This makes it more suitable for both detection and physics. -\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several :ref:`ConvexPolygonShape3D` nodes or by using the :ref:`CollisionPolygon2D` node in ``BUILD_SOLIDS`` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. +\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape2D** nodes or by using the :ref:`CollisionPolygon2D` node in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. \ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` and :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. @@ -47,9 +47,9 @@ Methods .. table:: :widths: auto - +------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_cloud` **(** :ref:`PackedVector2Array` point_cloud **)** | - +------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_cloud`\ (\ point_cloud\: :ref:`PackedVector2Array`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,17 +64,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector2Array` **points** = ``PackedVector2Array()`` +:ref:`PackedVector2Array` **points** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_points** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_points** **(** **)** +- |void| **set_points**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_points**\ (\ ) The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. \ **Warning:** Only set this property to a list of points that actually form a convex hull. Use :ref:`set_point_cloud` to generate the convex hull of an arbitrary set of points. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-section-separator ---- @@ -88,7 +90,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_point_cloud** **(** :ref:`PackedVector2Array` point_cloud **)** +|void| **set_point_cloud**\ (\ point_cloud\: :ref:`PackedVector2Array`\ ) :ref:`🔗` Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. @@ -99,3 +101,4 @@ Based on the set of points provided, this assigns the :ref:`points`__ +- `3D Physics Tests Demo `__ .. rst-class:: classref-reftable-group @@ -59,15 +59,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector3Array` **points** = ``PackedVector3Array()`` +:ref:`PackedVector3Array` **points** = ``PackedVector3Array()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_points** **(** :ref:`PackedVector3Array` value **)** -- :ref:`PackedVector3Array` **get_points** **(** **)** +- |void| **set_points**\ (\ value\: :ref:`PackedVector3Array`\ ) +- :ref:`PackedVector3Array` **get_points**\ (\ ) The list of 3D points forming the convex polygon shape. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -75,3 +77,4 @@ The list of 3D points forming the convex polygon shape. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 415f3779234..62f7351a226 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -12,7 +12,7 @@ CPUParticles2D **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -CPU-based 2D particle emitter. +A CPU-based 2D particle emitter. .. rst-class:: classref-introduction-group @@ -178,27 +178,27 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`convert_from_particles` **(** :ref:`Node` particles **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_param_curve` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart` **(** **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_curve` **(** :ref:`Parameter` param, :ref:`Curve` curve **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_max` **(** :ref:`Parameter` param, :ref:`float` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_min` **(** :ref:`Parameter` param, :ref:`float` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert_from_particles`\ (\ particles\: :ref:`Node`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_param_curve`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_max`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_min`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart`\ (\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_curve`\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_max`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_min`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -213,7 +213,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗` Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. @@ -230,7 +230,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawOrder**: +enum **DrawOrder**: :ref:`🔗` .. _class_CPUParticles2D_constant_DRAW_ORDER_INDEX: @@ -246,7 +246,7 @@ Particles are drawn in the order emitted. :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -Particles are drawn in order of remaining lifetime. +Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ Particles are drawn in order of remaining lifetime. .. rst-class:: classref-enumeration -enum **Parameter**: +enum **Parameter**: :ref:`🔗` .. _class_CPUParticles2D_constant_PARAM_INITIAL_LINEAR_VELOCITY: @@ -370,7 +370,7 @@ Represents the size of the :ref:`Parameter` enum. .. rst-class:: classref-enumeration -enum **ParticleFlags**: +enum **ParticleFlags**: :ref:`🔗` .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: @@ -412,7 +412,7 @@ Represents the size of the :ref:`ParticleFlags` .. _class_CPUParticles2D_constant_EMISSION_SHAPE_POINT: @@ -483,12 +483,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **amount** = ``8`` +:ref:`int` **amount** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_amount** **(** :ref:`int` value **)** -- :ref:`int` **get_amount** **(** **)** +- |void| **set_amount**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_amount**\ (\ ) Number of particles emitted in one emission cycle. @@ -500,12 +500,12 @@ Number of particles emitted in one emission cycle. .. rst-class:: classref-property -:ref:`Curve` **angle_curve** +:ref:`Curve` **angle_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's rotation will be animated along this :ref:`Curve`. @@ -517,12 +517,12 @@ Each particle's rotation will be animated along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **angle_max** = ``0.0`` +:ref:`float` **angle_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial rotation applied to each particle, in degrees. @@ -534,12 +534,12 @@ Maximum initial rotation applied to each particle, in degrees. .. rst-class:: classref-property -:ref:`float` **angle_min** = ``0.0`` +:ref:`float` **angle_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`angle_max`. @@ -551,12 +551,12 @@ Minimum equivalent of :ref:`angle_max`. .. rst-class:: classref-property -:ref:`Curve` **angular_velocity_curve** +:ref:`Curve` **angular_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's angular velocity will vary along this :ref:`Curve`. @@ -568,12 +568,12 @@ Each particle's angular velocity will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **angular_velocity_max** = ``0.0`` +:ref:`float` **angular_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. @@ -585,12 +585,12 @@ Maximum initial angular velocity (rotation speed) applied to each particle in *d .. rst-class:: classref-property -:ref:`float` **angular_velocity_min** = ``0.0`` +:ref:`float` **angular_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`angular_velocity_max`. @@ -602,12 +602,12 @@ Minimum equivalent of :ref:`angular_velocity_max` **anim_offset_curve** +:ref:`Curve` **anim_offset_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's animation offset will vary along this :ref:`Curve`. @@ -619,12 +619,12 @@ Each particle's animation offset will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **anim_offset_max** = ``0.0`` +:ref:`float` **anim_offset_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum animation offset that corresponds to frame index in the texture. ``0`` is the first frame, ``1`` is the last one. See :ref:`CanvasItemMaterial.particles_animation`. @@ -636,12 +636,12 @@ Maximum animation offset that corresponds to frame index in the texture. ``0`` i .. rst-class:: classref-property -:ref:`float` **anim_offset_min** = ``0.0`` +:ref:`float` **anim_offset_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`anim_offset_max`. @@ -653,12 +653,12 @@ Minimum equivalent of :ref:`anim_offset_max` **anim_speed_curve** +:ref:`Curve` **anim_speed_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's animation speed will vary along this :ref:`Curve`. @@ -670,12 +670,12 @@ Each particle's animation speed will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **anim_speed_max** = ``0.0`` +:ref:`float` **anim_speed_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum particle animation speed. Animation speed of ``1`` means that the particles will make full ``0`` to ``1`` offset cycle during lifetime, ``2`` means ``2`` cycles etc. @@ -689,12 +689,12 @@ With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMate .. rst-class:: classref-property -:ref:`float` **anim_speed_min** = ``0.0`` +:ref:`float` **anim_speed_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`anim_speed_max`. @@ -706,12 +706,12 @@ Minimum equivalent of :ref:`anim_speed_max` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_color**\ (\ ) Each particle's initial color. If :ref:`texture` is defined, it will be multiplied by this color. @@ -723,12 +723,12 @@ Each particle's initial color. If :ref:`texture` **color_initial_ramp** +:ref:`Gradient` **color_initial_ramp** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_initial_ramp** **(** :ref:`Gradient` value **)** -- :ref:`Gradient` **get_color_initial_ramp** **(** **)** +- |void| **set_color_initial_ramp**\ (\ value\: :ref:`Gradient`\ ) +- :ref:`Gradient` **get_color_initial_ramp**\ (\ ) Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). @@ -740,12 +740,12 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D` **color_ramp** +:ref:`Gradient` **color_ramp** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_ramp** **(** :ref:`Gradient` value **)** -- :ref:`Gradient` **get_color_ramp** **(** **)** +- |void| **set_color_ramp**\ (\ value\: :ref:`Gradient`\ ) +- :ref:`Gradient` **get_color_ramp**\ (\ ) Each particle's color will vary along this :ref:`Gradient` (multiplied with :ref:`color`). @@ -757,12 +757,12 @@ Each particle's color will vary along this :ref:`Gradient` (mult .. rst-class:: classref-property -:ref:`Curve` **damping_curve** +:ref:`Curve` **damping_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Damping will vary along this :ref:`Curve`. @@ -774,12 +774,12 @@ Damping will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **damping_max** = ``0.0`` +:ref:`float` **damping_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| The maximum rate at which particles lose velocity. For example value of ``100`` means that the particle will go from ``100`` velocity to ``0`` in ``1`` second. @@ -791,12 +791,12 @@ The maximum rate at which particles lose velocity. For example value of ``100`` .. rst-class:: classref-property -:ref:`float` **damping_min** = ``0.0`` +:ref:`float` **damping_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`damping_max`. @@ -808,12 +808,12 @@ Minimum equivalent of :ref:`damping_max` **direction** = ``Vector2(1, 0)`` +:ref:`Vector2` **direction** = ``Vector2(1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_direction** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_direction** **(** **)** +- |void| **set_direction**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_direction**\ (\ ) Unit vector specifying the particles' emission direction. @@ -825,12 +825,12 @@ Unit vector specifying the particles' emission direction. .. rst-class:: classref-property -:ref:`DrawOrder` **draw_order** = ``0`` +:ref:`DrawOrder` **draw_order** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_order** **(** :ref:`DrawOrder` value **)** -- :ref:`DrawOrder` **get_draw_order** **(** **)** +- |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) +- :ref:`DrawOrder` **get_draw_order**\ (\ ) Particle draw order. Uses :ref:`DrawOrder` values. @@ -842,15 +842,17 @@ Particle draw order. Uses :ref:`DrawOrder` values .. rst-class:: classref-property -:ref:`PackedColorArray` **emission_colors** +:ref:`PackedColorArray` **emission_colors** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_colors** **(** :ref:`PackedColorArray` value **)** -- :ref:`PackedColorArray` **get_emission_colors** **(** **)** +- |void| **set_emission_colors**\ (\ value\: :ref:`PackedColorArray`\ ) +- :ref:`PackedColorArray` **get_emission_colors**\ (\ ) Sets the :ref:`Color`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -859,15 +861,17 @@ Sets the :ref:`Color`\ s to modulate particles by when using :ref:` .. rst-class:: classref-property -:ref:`PackedVector2Array` **emission_normals** +:ref:`PackedVector2Array` **emission_normals** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_normals** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_emission_normals** **(** **)** +- |void| **set_emission_normals**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_emission_normals**\ (\ ) Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -876,15 +880,17 @@ Sets the direction the particles will be emitted in when using :ref:`EMISSION_SH .. rst-class:: classref-property -:ref:`PackedVector2Array` **emission_points** +:ref:`PackedVector2Array` **emission_points** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_points** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_emission_points** **(** **)** +- |void| **set_emission_points**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_emission_points**\ (\ ) Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -893,12 +899,12 @@ Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_PO .. rst-class:: classref-property -:ref:`Vector2` **emission_rect_extents** +:ref:`Vector2` **emission_rect_extents** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_rect_extents** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_emission_rect_extents** **(** **)** +- |void| **set_emission_rect_extents**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_emission_rect_extents**\ (\ ) The rectangle's extents if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_RECTANGLE`. @@ -910,12 +916,12 @@ The rectangle's extents if :ref:`emission_shape` **emission_shape** = ``0`` +:ref:`EmissionShape` **emission_shape** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_shape** **(** :ref:`EmissionShape` value **)** -- :ref:`EmissionShape` **get_emission_shape** **(** **)** +- |void| **set_emission_shape**\ (\ value\: :ref:`EmissionShape`\ ) +- :ref:`EmissionShape` **get_emission_shape**\ (\ ) Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. @@ -927,12 +933,12 @@ Particles will be emitted inside this region. See :ref:`EmissionShape` **emission_sphere_radius** +:ref:`float` **emission_sphere_radius** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_sphere_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_sphere_radius** **(** **)** +- |void| **set_emission_sphere_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_sphere_radius**\ (\ ) The sphere's radius if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_SPHERE`. @@ -944,14 +950,14 @@ The sphere's radius if :ref:`emission_shape` **emitting** = ``true`` +:ref:`bool` **emitting** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emitting** **(** :ref:`bool` value **)** -- :ref:`bool` **is_emitting** **(** **)** +- |void| **set_emitting**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_emitting**\ (\ ) -If ``true``, particles are being emitted. +If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. .. rst-class:: classref-item-separator @@ -961,12 +967,12 @@ If ``true``, particles are being emitted. .. rst-class:: classref-property -:ref:`float` **explosiveness** = ``0.0`` +:ref:`float` **explosiveness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_explosiveness_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_explosiveness_ratio** **(** **)** +- |void| **set_explosiveness_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_explosiveness_ratio**\ (\ ) How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins. @@ -978,12 +984,12 @@ How rapidly particles in an emission cycle are emitted. If greater than ``0``, t .. rst-class:: classref-property -:ref:`int` **fixed_fps** = ``0`` +:ref:`int` **fixed_fps** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fixed_fps** **(** :ref:`int` value **)** -- :ref:`int` **get_fixed_fps** **(** **)** +- |void| **set_fixed_fps**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_fixed_fps**\ (\ ) The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. @@ -995,12 +1001,12 @@ The particle system's frame rate is fixed to a value. For example, changing the .. rst-class:: classref-property -:ref:`bool` **fract_delta** = ``true`` +:ref:`bool` **fract_delta** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fractional_delta** **(** :ref:`bool` value **)** -- :ref:`bool` **get_fractional_delta** **(** **)** +- |void| **set_fractional_delta**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_fractional_delta**\ (\ ) If ``true``, results in fractional delta calculation which has a smoother particles display effect. @@ -1012,12 +1018,12 @@ If ``true``, results in fractional delta calculation which has a smoother partic .. rst-class:: classref-property -:ref:`Vector2` **gravity** = ``Vector2(0, 980)`` +:ref:`Vector2` **gravity** = ``Vector2(0, 980)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`Vector2` value **)** -- :ref:`Vector2` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`Vector2`\ ) +- :ref:`Vector2` **get_gravity**\ (\ ) Gravity applied to every particle. @@ -1029,12 +1035,12 @@ Gravity applied to every particle. .. rst-class:: classref-property -:ref:`Curve` **hue_variation_curve** +:ref:`Curve` **hue_variation_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's hue will vary along this :ref:`Curve`. @@ -1046,12 +1052,12 @@ Each particle's hue will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **hue_variation_max** = ``0.0`` +:ref:`float` **hue_variation_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial hue variation applied to each particle. It will shift the particle color's hue. @@ -1063,12 +1069,12 @@ Maximum initial hue variation applied to each particle. It will shift the partic .. rst-class:: classref-property -:ref:`float` **hue_variation_min** = ``0.0`` +:ref:`float` **hue_variation_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`hue_variation_max`. @@ -1080,12 +1086,12 @@ Minimum equivalent of :ref:`hue_variation_max` **initial_velocity_max** = ``0.0`` +:ref:`float` **initial_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction` and :ref:`spread`. @@ -1097,12 +1103,12 @@ Maximum initial velocity magnitude for each particle. Direction comes from :ref: .. rst-class:: classref-property -:ref:`float` **initial_velocity_min** = ``0.0`` +:ref:`float` **initial_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`initial_velocity_max`. @@ -1114,12 +1120,12 @@ Minimum equivalent of :ref:`initial_velocity_max` **lifetime** = ``1.0`` +:ref:`float` **lifetime** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_lifetime** **(** :ref:`float` value **)** -- :ref:`float` **get_lifetime** **(** **)** +- |void| **set_lifetime**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lifetime**\ (\ ) Amount of time each particle will exist. @@ -1131,12 +1137,12 @@ Amount of time each particle will exist. .. rst-class:: classref-property -:ref:`float` **lifetime_randomness** = ``0.0`` +:ref:`float` **lifetime_randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_lifetime_randomness** **(** :ref:`float` value **)** -- :ref:`float` **get_lifetime_randomness** **(** **)** +- |void| **set_lifetime_randomness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lifetime_randomness**\ (\ ) Particle lifetime randomness ratio. @@ -1148,12 +1154,12 @@ Particle lifetime randomness ratio. .. rst-class:: classref-property -:ref:`Curve` **linear_accel_curve** +:ref:`Curve` **linear_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's linear acceleration will vary along this :ref:`Curve`. @@ -1165,12 +1171,12 @@ Each particle's linear acceleration will vary along this :ref:`Curve` **linear_accel_max** = ``0.0`` +:ref:`float` **linear_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum linear acceleration applied to each particle in the direction of motion. @@ -1182,12 +1188,12 @@ Maximum linear acceleration applied to each particle in the direction of motion. .. rst-class:: classref-property -:ref:`float` **linear_accel_min** = ``0.0`` +:ref:`float` **linear_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`linear_accel_max`. @@ -1199,12 +1205,12 @@ Minimum equivalent of :ref:`linear_accel_max` **local_coords** = ``false`` +:ref:`bool` **local_coords** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_local_coordinates** **(** :ref:`bool` value **)** -- :ref:`bool` **get_use_local_coordinates** **(** **)** +- |void| **set_use_local_coordinates**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_local_coordinates**\ (\ ) If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the **CPUParticles2D** node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the **CPUParticles2D** node (and its parents) when it is moved or rotated. @@ -1216,12 +1222,12 @@ If ``true``, particles use the parent node's coordinate space (known as local co .. rst-class:: classref-property -:ref:`bool` **one_shot** = ``false`` +:ref:`bool` **one_shot** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool` value **)** -- :ref:`bool` **get_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_one_shot**\ (\ ) If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end. @@ -1233,12 +1239,12 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi .. rst-class:: classref-property -:ref:`Curve` **orbit_velocity_curve** +:ref:`Curve` **orbit_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's orbital velocity will vary along this :ref:`Curve`. @@ -1250,12 +1256,12 @@ Each particle's orbital velocity will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **orbit_velocity_max** = ``0.0`` +:ref:`float` **orbit_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. @@ -1267,12 +1273,12 @@ Maximum orbital velocity applied to each particle. Makes the particles circle ar .. rst-class:: classref-property -:ref:`float` **orbit_velocity_min** = ``0.0`` +:ref:`float` **orbit_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`orbit_velocity_max`. @@ -1284,12 +1290,12 @@ Minimum equivalent of :ref:`orbit_velocity_max` **particle_flag_align_y** = ``false`` +:ref:`bool` **particle_flag_align_y** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| Align Y axis of particle with the direction of its velocity. @@ -1301,12 +1307,12 @@ Align Y axis of particle with the direction of its velocity. .. rst-class:: classref-property -:ref:`float` **preprocess** = ``0.0`` +:ref:`float` **preprocess** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pre_process_time** **(** :ref:`float` value **)** -- :ref:`float` **get_pre_process_time** **(** **)** +- |void| **set_pre_process_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pre_process_time**\ (\ ) Particle system starts as if it had already run for this many seconds. @@ -1318,12 +1324,12 @@ Particle system starts as if it had already run for this many seconds. .. rst-class:: classref-property -:ref:`Curve` **radial_accel_curve** +:ref:`Curve` **radial_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's radial acceleration will vary along this :ref:`Curve`. @@ -1335,12 +1341,12 @@ Each particle's radial acceleration will vary along this :ref:`Curve` **radial_accel_max** = ``0.0`` +:ref:`float` **radial_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. @@ -1352,12 +1358,12 @@ Maximum radial acceleration applied to each particle. Makes particle accelerate .. rst-class:: classref-property -:ref:`float` **radial_accel_min** = ``0.0`` +:ref:`float` **radial_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`radial_accel_max`. @@ -1369,12 +1375,12 @@ Minimum equivalent of :ref:`radial_accel_max` **randomness** = ``0.0`` +:ref:`float` **randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_randomness_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_randomness_ratio** **(** **)** +- |void| **set_randomness_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_randomness_ratio**\ (\ ) Emission lifetime randomness ratio. @@ -1386,12 +1392,12 @@ Emission lifetime randomness ratio. .. rst-class:: classref-property -:ref:`Curve` **scale_amount_curve** +:ref:`Curve` **scale_amount_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's scale will vary along this :ref:`Curve`. @@ -1403,12 +1409,12 @@ Each particle's scale will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **scale_amount_max** = ``1.0`` +:ref:`float` **scale_amount_max** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial scale applied to each particle. @@ -1420,12 +1426,12 @@ Maximum initial scale applied to each particle. .. rst-class:: classref-property -:ref:`float` **scale_amount_min** = ``1.0`` +:ref:`float` **scale_amount_min** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`scale_amount_max`. @@ -1437,12 +1443,12 @@ Minimum equivalent of :ref:`scale_amount_max` **scale_curve_x** +:ref:`Curve` **scale_curve_x** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale_curve_x** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_scale_curve_x** **(** **)** +- |void| **set_scale_curve_x**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_scale_curve_x**\ (\ ) Each particle's horizontal scale will vary along this :ref:`Curve`. @@ -1456,12 +1462,12 @@ Each particle's horizontal scale will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`Curve` **scale_curve_y** +:ref:`Curve` **scale_curve_y** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale_curve_y** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_scale_curve_y** **(** **)** +- |void| **set_scale_curve_y**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_scale_curve_y**\ (\ ) Each particle's vertical scale will vary along this :ref:`Curve`. @@ -1475,12 +1481,12 @@ Each particle's vertical scale will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. @@ -1492,12 +1498,12 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p .. rst-class:: classref-property -:ref:`bool` **split_scale** = ``false`` +:ref:`bool` **split_scale** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_split_scale** **(** :ref:`bool` value **)** -- :ref:`bool` **get_split_scale** **(** **)** +- |void| **set_split_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_split_scale**\ (\ ) If ``true``, the scale curve will be split into x and y components. See :ref:`scale_curve_x` and :ref:`scale_curve_y`. @@ -1509,12 +1515,12 @@ If ``true``, the scale curve will be split into x and y components. See :ref:`sc .. rst-class:: classref-property -:ref:`float` **spread** = ``45.0`` +:ref:`float` **spread** = ``45.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_spread** **(** :ref:`float` value **)** -- :ref:`float` **get_spread** **(** **)** +- |void| **set_spread**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_spread**\ (\ ) Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. @@ -1526,12 +1532,12 @@ Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. .. rst-class:: classref-property -:ref:`Curve` **tangential_accel_curve** +:ref:`Curve` **tangential_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's tangential acceleration will vary along this :ref:`Curve`. @@ -1543,12 +1549,12 @@ Each particle's tangential acceleration will vary along this :ref:`Curve` **tangential_accel_max** = ``0.0`` +:ref:`float` **tangential_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. @@ -1560,12 +1566,12 @@ Maximum tangential acceleration applied to each particle. Tangential acceleratio .. rst-class:: classref-property -:ref:`float` **tangential_accel_min** = ``0.0`` +:ref:`float` **tangential_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum equivalent of :ref:`tangential_accel_max`. @@ -1577,12 +1583,12 @@ Minimum equivalent of :ref:`tangential_accel_max` **texture** +:ref:`Texture2D` **texture** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D` value **)** -- :ref:`Texture2D` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ ) Particle texture. If ``null``, particles will be squares. @@ -1599,7 +1605,7 @@ Method Descriptions .. rst-class:: classref-method -void **convert_from_particles** **(** :ref:`Node` particles **)** +|void| **convert_from_particles**\ (\ particles\: :ref:`Node`\ ) :ref:`🔗` Sets this node's properties to match a given :ref:`GPUParticles2D` node with an assigned :ref:`ParticleProcessMaterial`. @@ -1611,7 +1617,7 @@ Sets this node's properties to match a given :ref:`GPUParticles2D` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +:ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the :ref:`Curve` of the parameter specified by :ref:`Parameter`. @@ -1623,7 +1629,7 @@ Returns the :ref:`Curve` of the parameter specified by :ref:`Parame .. rst-class:: classref-method -:ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +:ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the maximum value range for the given parameter. @@ -1635,7 +1641,7 @@ Returns the maximum value range for the given parameter. .. rst-class:: classref-method -:ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +:ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the minimum value range for the given parameter. @@ -1647,7 +1653,7 @@ Returns the minimum value range for the given parameter. .. rst-class:: classref-method -:ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +:ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` Returns the enabled state of the given flag (see :ref:`ParticleFlags` for options). @@ -1659,7 +1665,7 @@ Returns the enabled state of the given flag (see :ref:`ParticleFlags` Restarts the particle emitter. @@ -1671,7 +1677,7 @@ Restarts the particle emitter. .. rst-class:: classref-method -void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +|void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) :ref:`🔗` Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. @@ -1683,7 +1689,7 @@ Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter .. rst-class:: classref-method -void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +|void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Sets the maximum value for the given parameter. @@ -1695,7 +1701,7 @@ Sets the maximum value for the given parameter. .. rst-class:: classref-method -void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +|void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Sets the minimum value for the given parameter. @@ -1707,7 +1713,7 @@ Sets the minimum value for the given parameter. .. rst-class:: classref-method -void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +|void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` Enables or disables the given flag (see :ref:`ParticleFlags` for options). @@ -1718,3 +1724,4 @@ Enables or disables the given flag (see :ref:`ParticleFlags` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -CPU-based 3D particle emitter. +A CPU-based 3D particle emitter. .. rst-class:: classref-introduction-group @@ -23,6 +23,13 @@ CPU-based 3D particle node used to create a variety of particle systems and effe See also :ref:`GPUParticles3D`, which provides the same functionality with hardware acceleration, but may not run on older devices. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` + .. rst-class:: classref-reftable-group Properties @@ -31,153 +38,155 @@ Properties .. table:: :widths: auto - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`int` | :ref:`amount` | ``8`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`angle_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`angle_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`angle_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`angular_velocity_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`anim_offset_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`anim_speed_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Gradient` | :ref:`color_initial_ramp` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Gradient` | :ref:`color_ramp` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`damping_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`damping_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`damping_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Vector3` | :ref:`emission_box_extents` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`PackedColorArray` | :ref:`emission_colors` | ``PackedColorArray()`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`PackedVector3Array` | :ref:`emission_normals` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`PackedVector3Array` | :ref:`emission_points` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Vector3` | :ref:`emission_ring_axis` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`emission_ring_height` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`emission_ring_inner_radius` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`emission_ring_radius` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`emission_sphere_radius` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`emitting` | ``true`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`explosiveness` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`int` | :ref:`fixed_fps` | ``0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`flatness` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`fract_delta` | ``true`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`hue_variation_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`lifetime` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`linear_accel_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`local_coords` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Mesh` | :ref:`mesh` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`one_shot` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`orbit_velocity_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`orbit_velocity_max` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`orbit_velocity_min` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`preprocess` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`radial_accel_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`randomness` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`scale_amount_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`scale_amount_max` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`scale_amount_min` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`scale_curve_x` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`scale_curve_y` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`scale_curve_z` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`speed_scale` | ``1.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`bool` | :ref:`split_scale` | ``false`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`spread` | ``45.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Curve` | :ref:`tangential_accel_curve` | | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | - +---------------------------------------------------------+---------------------------------------------------------------------------------------------+-------------------------+ + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`amount` | ``8`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`angle_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angle_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angle_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`angular_velocity_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`anim_offset_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`anim_speed_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Gradient` | :ref:`color_initial_ramp` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Gradient` | :ref:`color_ramp` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`damping_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`damping_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`damping_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`emission_box_extents` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedColorArray` | :ref:`emission_colors` | ``PackedColorArray()`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector3Array` | :ref:`emission_normals` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector3Array` | :ref:`emission_points` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`emission_ring_axis` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`emission_ring_height` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`emission_ring_inner_radius` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`emission_ring_radius` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`emission_sphere_radius` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`emitting` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`explosiveness` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`fixed_fps` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`flatness` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`fract_delta` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`hue_variation_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`lifetime` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`linear_accel_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`local_coords` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Mesh` | :ref:`mesh` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`orbit_velocity_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`orbit_velocity_max` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`orbit_velocity_min` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`preprocess` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`radial_accel_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`randomness` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`scale_amount_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`scale_amount_max` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`scale_amount_min` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`scale_curve_x` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`scale_curve_y` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`scale_curve_z` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`split_scale` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`spread` | ``45.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`Curve` | :ref:`tangential_accel_curve` | | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`AABB` | :ref:`visibility_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ .. rst-class:: classref-reftable-group @@ -187,27 +196,27 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`convert_from_particles` **(** :ref:`Node` particles **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Curve` | :ref:`get_param_curve` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_param_max` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_param_min` **(** :ref:`Parameter` param **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_particle_flag` **(** :ref:`ParticleFlags` particle_flag **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart` **(** **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_curve` **(** :ref:`Parameter` param, :ref:`Curve` curve **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_max` **(** :ref:`Parameter` param, :ref:`float` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_min` **(** :ref:`Parameter` param, :ref:`float` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_particle_flag` **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert_from_particles`\ (\ particles\: :ref:`Node`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`get_param_curve`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_max`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_param_min`\ (\ param\: :ref:`Parameter`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart`\ (\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_curve`\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_max`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_min`\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -222,7 +231,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗` Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. @@ -239,7 +248,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawOrder**: +enum **DrawOrder**: :ref:`🔗` .. _class_CPUParticles3D_constant_DRAW_ORDER_INDEX: @@ -255,7 +264,7 @@ Particles are drawn in the order emitted. :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -Particles are drawn in order of remaining lifetime. +Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. .. _class_CPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: @@ -273,7 +282,7 @@ Particles are drawn in order of depth. .. rst-class:: classref-enumeration -enum **Parameter**: +enum **Parameter**: :ref:`🔗` .. _class_CPUParticles3D_constant_PARAM_INITIAL_LINEAR_VELOCITY: @@ -387,7 +396,7 @@ Represents the size of the :ref:`Parameter` enum. .. rst-class:: classref-enumeration -enum **ParticleFlags**: +enum **ParticleFlags**: :ref:`🔗` .. _class_CPUParticles3D_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: @@ -429,7 +438,7 @@ Represents the size of the :ref:`ParticleFlags` .. _class_CPUParticles3D_constant_EMISSION_SHAPE_POINT: @@ -508,12 +517,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **amount** = ``8`` +:ref:`int` **amount** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_amount** **(** :ref:`int` value **)** -- :ref:`int` **get_amount** **(** **)** +- |void| **set_amount**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_amount**\ (\ ) Number of particles emitted in one emission cycle. @@ -525,12 +534,12 @@ Number of particles emitted in one emission cycle. .. rst-class:: classref-property -:ref:`Curve` **angle_curve** +:ref:`Curve` **angle_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's rotation will be animated along this :ref:`Curve`. @@ -542,12 +551,12 @@ Each particle's rotation will be animated along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **angle_max** = ``0.0`` +:ref:`float` **angle_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum angle. @@ -559,12 +568,12 @@ Maximum angle. .. rst-class:: classref-property -:ref:`float` **angle_min** = ``0.0`` +:ref:`float` **angle_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum angle. @@ -576,12 +585,12 @@ Minimum angle. .. rst-class:: classref-property -:ref:`Curve` **angular_velocity_curve** +:ref:`Curve` **angular_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's angular velocity (rotation speed) will vary along this :ref:`Curve` over its lifetime. @@ -593,12 +602,12 @@ Each particle's angular velocity (rotation speed) will vary along this :ref:`Cur .. rst-class:: classref-property -:ref:`float` **angular_velocity_max** = ``0.0`` +:ref:`float` **angular_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. @@ -610,12 +619,12 @@ Maximum initial angular velocity (rotation speed) applied to each particle in *d .. rst-class:: classref-property -:ref:`float` **angular_velocity_min** = ``0.0`` +:ref:`float` **angular_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. @@ -627,12 +636,12 @@ Minimum initial angular velocity (rotation speed) applied to each particle in *d .. rst-class:: classref-property -:ref:`Curve` **anim_offset_curve** +:ref:`Curve` **anim_offset_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's animation offset will vary along this :ref:`Curve`. @@ -644,12 +653,12 @@ Each particle's animation offset will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **anim_offset_max** = ``0.0`` +:ref:`float` **anim_offset_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum animation offset. @@ -661,12 +670,12 @@ Maximum animation offset. .. rst-class:: classref-property -:ref:`float` **anim_offset_min** = ``0.0`` +:ref:`float` **anim_offset_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum animation offset. @@ -678,12 +687,12 @@ Minimum animation offset. .. rst-class:: classref-property -:ref:`Curve` **anim_speed_curve** +:ref:`Curve` **anim_speed_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's animation speed will vary along this :ref:`Curve`. @@ -695,12 +704,12 @@ Each particle's animation speed will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **anim_speed_max** = ``0.0`` +:ref:`float` **anim_speed_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum particle animation speed. @@ -712,12 +721,12 @@ Maximum particle animation speed. .. rst-class:: classref-property -:ref:`float` **anim_speed_min** = ``0.0`` +:ref:`float` **anim_speed_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum particle animation speed. @@ -729,12 +738,12 @@ Minimum particle animation speed. .. rst-class:: classref-property -:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color` value **)** -- :ref:`Color` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_color**\ (\ ) Each particle's initial color. @@ -748,12 +757,12 @@ Each particle's initial color. .. rst-class:: classref-property -:ref:`Gradient` **color_initial_ramp** +:ref:`Gradient` **color_initial_ramp** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_initial_ramp** **(** :ref:`Gradient` value **)** -- :ref:`Gradient` **get_color_initial_ramp** **(** **)** +- |void| **set_color_initial_ramp**\ (\ value\: :ref:`Gradient`\ ) +- :ref:`Gradient` **get_color_initial_ramp**\ (\ ) Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). @@ -767,12 +776,12 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D` **color_ramp** +:ref:`Gradient` **color_ramp** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_color_ramp** **(** :ref:`Gradient` value **)** -- :ref:`Gradient` **get_color_ramp** **(** **)** +- |void| **set_color_ramp**\ (\ value\: :ref:`Gradient`\ ) +- :ref:`Gradient` **get_color_ramp**\ (\ ) Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). @@ -786,12 +795,12 @@ Each particle's color will vary along this :ref:`GradientTexture1D` **damping_curve** +:ref:`Curve` **damping_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Damping will vary along this :ref:`Curve`. @@ -803,12 +812,12 @@ Damping will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **damping_max** = ``0.0`` +:ref:`float` **damping_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum damping. @@ -820,12 +829,12 @@ Maximum damping. .. rst-class:: classref-property -:ref:`float` **damping_min** = ``0.0`` +:ref:`float` **damping_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum damping. @@ -837,12 +846,12 @@ Minimum damping. .. rst-class:: classref-property -:ref:`Vector3` **direction** = ``Vector3(1, 0, 0)`` +:ref:`Vector3` **direction** = ``Vector3(1, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_direction** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_direction** **(** **)** +- |void| **set_direction**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_direction**\ (\ ) Unit vector specifying the particles' emission direction. @@ -854,12 +863,12 @@ Unit vector specifying the particles' emission direction. .. rst-class:: classref-property -:ref:`DrawOrder` **draw_order** = ``0`` +:ref:`DrawOrder` **draw_order** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_draw_order** **(** :ref:`DrawOrder` value **)** -- :ref:`DrawOrder` **get_draw_order** **(** **)** +- |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) +- :ref:`DrawOrder` **get_draw_order**\ (\ ) Particle draw order. Uses :ref:`DrawOrder` values. @@ -871,12 +880,12 @@ Particle draw order. Uses :ref:`DrawOrder` values .. rst-class:: classref-property -:ref:`Vector3` **emission_box_extents** +:ref:`Vector3` **emission_box_extents** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_box_extents** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_emission_box_extents** **(** **)** +- |void| **set_emission_box_extents**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_emission_box_extents**\ (\ ) The rectangle's extents if :ref:`emission_shape` is set to :ref:`EMISSION_SHAPE_BOX`. @@ -888,17 +897,19 @@ The rectangle's extents if :ref:`emission_shape` **emission_colors** = ``PackedColorArray()`` +:ref:`PackedColorArray` **emission_colors** = ``PackedColorArray()`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_colors** **(** :ref:`PackedColorArray` value **)** -- :ref:`PackedColorArray` **get_emission_colors** **(** **)** +- |void| **set_emission_colors**\ (\ value\: :ref:`PackedColorArray`\ ) +- :ref:`PackedColorArray` **get_emission_colors**\ (\ ) Sets the :ref:`Color`\ s to modulate particles by when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. \ **Note:** :ref:`emission_colors` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`emission_colors` will have no visible effect. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -907,15 +918,17 @@ Sets the :ref:`Color`\ s to modulate particles by when using :ref:` .. rst-class:: classref-property -:ref:`PackedVector3Array` **emission_normals** +:ref:`PackedVector3Array` **emission_normals** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_normals** **(** :ref:`PackedVector3Array` value **)** -- :ref:`PackedVector3Array` **get_emission_normals** **(** **)** +- |void| **set_emission_normals**\ (\ value\: :ref:`PackedVector3Array`\ ) +- :ref:`PackedVector3Array` **get_emission_normals**\ (\ ) Sets the direction the particles will be emitted in when using :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -924,15 +937,17 @@ Sets the direction the particles will be emitted in when using :ref:`EMISSION_SH .. rst-class:: classref-property -:ref:`PackedVector3Array` **emission_points** +:ref:`PackedVector3Array` **emission_points** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_points** **(** :ref:`PackedVector3Array` value **)** -- :ref:`PackedVector3Array` **get_emission_points** **(** **)** +- |void| **set_emission_points**\ (\ value\: :ref:`PackedVector3Array`\ ) +- :ref:`PackedVector3Array` **get_emission_points**\ (\ ) Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_POINTS` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -941,12 +956,12 @@ Sets the initial positions to spawn particles when using :ref:`EMISSION_SHAPE_PO .. rst-class:: classref-property -:ref:`Vector3` **emission_ring_axis** +:ref:`Vector3` **emission_ring_axis** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_ring_axis** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_emission_ring_axis** **(** **)** +- |void| **set_emission_ring_axis**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_emission_ring_axis**\ (\ ) The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. @@ -958,12 +973,12 @@ The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_ring_height** +:ref:`float` **emission_ring_height** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_ring_height** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_ring_height** **(** **)** +- |void| **set_emission_ring_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_ring_height**\ (\ ) The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. @@ -975,12 +990,12 @@ The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_ring_inner_radius** +:ref:`float` **emission_ring_inner_radius** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_ring_inner_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_ring_inner_radius** **(** **)** +- |void| **set_emission_ring_inner_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_ring_inner_radius**\ (\ ) The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. @@ -992,12 +1007,12 @@ The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_ring_radius** +:ref:`float` **emission_ring_radius** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_ring_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_ring_radius** **(** **)** +- |void| **set_emission_ring_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_ring_radius**\ (\ ) The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`. @@ -1009,12 +1024,12 @@ The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING` **emission_shape** = ``0`` +:ref:`EmissionShape` **emission_shape** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_shape** **(** :ref:`EmissionShape` value **)** -- :ref:`EmissionShape` **get_emission_shape** **(** **)** +- |void| **set_emission_shape**\ (\ value\: :ref:`EmissionShape`\ ) +- :ref:`EmissionShape` **get_emission_shape**\ (\ ) Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. @@ -1026,12 +1041,12 @@ Particles will be emitted inside this region. See :ref:`EmissionShape` **emission_sphere_radius** +:ref:`float` **emission_sphere_radius** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_sphere_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_sphere_radius** **(** **)** +- |void| **set_emission_sphere_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_sphere_radius**\ (\ ) The sphere's radius if :ref:`EmissionShape` is set to :ref:`EMISSION_SHAPE_SPHERE`. @@ -1043,14 +1058,14 @@ The sphere's radius if :ref:`EmissionShape` i .. rst-class:: classref-property -:ref:`bool` **emitting** = ``true`` +:ref:`bool` **emitting** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emitting** **(** :ref:`bool` value **)** -- :ref:`bool` **is_emitting** **(** **)** +- |void| **set_emitting**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_emitting**\ (\ ) -If ``true``, particles are being emitted. +If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. .. rst-class:: classref-item-separator @@ -1060,12 +1075,12 @@ If ``true``, particles are being emitted. .. rst-class:: classref-property -:ref:`float` **explosiveness** = ``0.0`` +:ref:`float` **explosiveness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_explosiveness_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_explosiveness_ratio** **(** **)** +- |void| **set_explosiveness_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_explosiveness_ratio**\ (\ ) How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins. @@ -1077,12 +1092,12 @@ How rapidly particles in an emission cycle are emitted. If greater than ``0``, t .. rst-class:: classref-property -:ref:`int` **fixed_fps** = ``0`` +:ref:`int` **fixed_fps** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fixed_fps** **(** :ref:`int` value **)** -- :ref:`int` **get_fixed_fps** **(** **)** +- |void| **set_fixed_fps**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_fixed_fps**\ (\ ) The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. @@ -1094,12 +1109,12 @@ The particle system's frame rate is fixed to a value. For example, changing the .. rst-class:: classref-property -:ref:`float` **flatness** = ``0.0`` +:ref:`float` **flatness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flatness** **(** :ref:`float` value **)** -- :ref:`float` **get_flatness** **(** **)** +- |void| **set_flatness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_flatness**\ (\ ) Amount of :ref:`spread` in Y/Z plane. A value of ``1`` restricts particles to X/Z plane. @@ -1111,12 +1126,12 @@ Amount of :ref:`spread` in Y/Z plane. A va .. rst-class:: classref-property -:ref:`bool` **fract_delta** = ``true`` +:ref:`bool` **fract_delta** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_fractional_delta** **(** :ref:`bool` value **)** -- :ref:`bool` **get_fractional_delta** **(** **)** +- |void| **set_fractional_delta**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_fractional_delta**\ (\ ) If ``true``, results in fractional delta calculation which has a smoother particles display effect. @@ -1128,12 +1143,12 @@ If ``true``, results in fractional delta calculation which has a smoother partic .. rst-class:: classref-property -:ref:`Vector3` **gravity** = ``Vector3(0, -9.8, 0)`` +:ref:`Vector3` **gravity** = ``Vector3(0, -9.8, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_gravity**\ (\ ) Gravity applied to every particle. @@ -1145,12 +1160,12 @@ Gravity applied to every particle. .. rst-class:: classref-property -:ref:`Curve` **hue_variation_curve** +:ref:`Curve` **hue_variation_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's hue will vary along this :ref:`Curve`. @@ -1162,12 +1177,12 @@ Each particle's hue will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **hue_variation_max** = ``0.0`` +:ref:`float` **hue_variation_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum hue variation. @@ -1179,12 +1194,12 @@ Maximum hue variation. .. rst-class:: classref-property -:ref:`float` **hue_variation_min** = ``0.0`` +:ref:`float` **hue_variation_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum hue variation. @@ -1196,12 +1211,12 @@ Minimum hue variation. .. rst-class:: classref-property -:ref:`float` **initial_velocity_max** = ``0.0`` +:ref:`float` **initial_velocity_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum value of the initial velocity. @@ -1213,12 +1228,12 @@ Maximum value of the initial velocity. .. rst-class:: classref-property -:ref:`float` **initial_velocity_min** = ``0.0`` +:ref:`float` **initial_velocity_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum value of the initial velocity. @@ -1230,12 +1245,12 @@ Minimum value of the initial velocity. .. rst-class:: classref-property -:ref:`float` **lifetime** = ``1.0`` +:ref:`float` **lifetime** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_lifetime** **(** :ref:`float` value **)** -- :ref:`float` **get_lifetime** **(** **)** +- |void| **set_lifetime**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lifetime**\ (\ ) Amount of time each particle will exist. @@ -1247,12 +1262,12 @@ Amount of time each particle will exist. .. rst-class:: classref-property -:ref:`float` **lifetime_randomness** = ``0.0`` +:ref:`float` **lifetime_randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_lifetime_randomness** **(** :ref:`float` value **)** -- :ref:`float` **get_lifetime_randomness** **(** **)** +- |void| **set_lifetime_randomness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lifetime_randomness**\ (\ ) Particle lifetime randomness ratio. @@ -1264,12 +1279,12 @@ Particle lifetime randomness ratio. .. rst-class:: classref-property -:ref:`Curve` **linear_accel_curve** +:ref:`Curve` **linear_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's linear acceleration will vary along this :ref:`Curve`. @@ -1281,12 +1296,12 @@ Each particle's linear acceleration will vary along this :ref:`Curve` **linear_accel_max** = ``0.0`` +:ref:`float` **linear_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum linear acceleration. @@ -1298,12 +1313,12 @@ Maximum linear acceleration. .. rst-class:: classref-property -:ref:`float` **linear_accel_min** = ``0.0`` +:ref:`float` **linear_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum linear acceleration. @@ -1315,12 +1330,12 @@ Minimum linear acceleration. .. rst-class:: classref-property -:ref:`bool` **local_coords** = ``false`` +:ref:`bool` **local_coords** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_local_coordinates** **(** :ref:`bool` value **)** -- :ref:`bool` **get_use_local_coordinates** **(** **)** +- |void| **set_use_local_coordinates**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_local_coordinates**\ (\ ) If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the **CPUParticles3D** node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the **CPUParticles3D** node (and its parents) when it is moved or rotated. @@ -1332,12 +1347,12 @@ If ``true``, particles use the parent node's coordinate space (known as local co .. rst-class:: classref-property -:ref:`Mesh` **mesh** +:ref:`Mesh` **mesh** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh` value **)** -- :ref:`Mesh` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh`\ ) +- :ref:`Mesh` **get_mesh**\ (\ ) The :ref:`Mesh` used for each particle. If ``null``, particles will be spheres. @@ -1349,12 +1364,12 @@ The :ref:`Mesh` used for each particle. If ``null``, particles will .. rst-class:: classref-property -:ref:`bool` **one_shot** = ``false`` +:ref:`bool` **one_shot** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool` value **)** -- :ref:`bool` **get_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_one_shot**\ (\ ) If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end. @@ -1366,12 +1381,12 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi .. rst-class:: classref-property -:ref:`Curve` **orbit_velocity_curve** +:ref:`Curve` **orbit_velocity_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's orbital velocity will vary along this :ref:`Curve`. @@ -1383,12 +1398,12 @@ Each particle's orbital velocity will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **orbit_velocity_max** +:ref:`float` **orbit_velocity_max** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum orbit velocity. @@ -1400,12 +1415,12 @@ Maximum orbit velocity. .. rst-class:: classref-property -:ref:`float` **orbit_velocity_min** +:ref:`float` **orbit_velocity_min** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum orbit velocity. @@ -1417,12 +1432,12 @@ Minimum orbit velocity. .. rst-class:: classref-property -:ref:`bool` **particle_flag_align_y** = ``false`` +:ref:`bool` **particle_flag_align_y** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| Align Y axis of particle with the direction of its velocity. @@ -1434,12 +1449,12 @@ Align Y axis of particle with the direction of its velocity. .. rst-class:: classref-property -:ref:`bool` **particle_flag_disable_z** = ``false`` +:ref:`bool` **particle_flag_disable_z** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| If ``true``, particles will not move on the Z axis. @@ -1451,12 +1466,12 @@ If ``true``, particles will not move on the Z axis. .. rst-class:: classref-property -:ref:`bool` **particle_flag_rotate_y** = ``false`` +:ref:`bool` **particle_flag_rotate_y** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** -- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| If ``true``, particles rotate around Y axis by :ref:`angle_min`. @@ -1468,12 +1483,12 @@ If ``true``, particles rotate around Y axis by :ref:`angle_min` **preprocess** = ``0.0`` +:ref:`float` **preprocess** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pre_process_time** **(** :ref:`float` value **)** -- :ref:`float` **get_pre_process_time** **(** **)** +- |void| **set_pre_process_time**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_pre_process_time**\ (\ ) Particle system starts as if it had already run for this many seconds. @@ -1485,12 +1500,12 @@ Particle system starts as if it had already run for this many seconds. .. rst-class:: classref-property -:ref:`Curve` **radial_accel_curve** +:ref:`Curve` **radial_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's radial acceleration will vary along this :ref:`Curve`. @@ -1502,12 +1517,12 @@ Each particle's radial acceleration will vary along this :ref:`Curve` **radial_accel_max** = ``0.0`` +:ref:`float` **radial_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum radial acceleration. @@ -1519,12 +1534,12 @@ Maximum radial acceleration. .. rst-class:: classref-property -:ref:`float` **radial_accel_min** = ``0.0`` +:ref:`float` **radial_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum radial acceleration. @@ -1536,12 +1551,12 @@ Minimum radial acceleration. .. rst-class:: classref-property -:ref:`float` **randomness** = ``0.0`` +:ref:`float` **randomness** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_randomness_ratio** **(** :ref:`float` value **)** -- :ref:`float` **get_randomness_ratio** **(** **)** +- |void| **set_randomness_ratio**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_randomness_ratio**\ (\ ) Emission lifetime randomness ratio. @@ -1553,12 +1568,12 @@ Emission lifetime randomness ratio. .. rst-class:: classref-property -:ref:`Curve` **scale_amount_curve** +:ref:`Curve` **scale_amount_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's scale will vary along this :ref:`Curve`. @@ -1570,12 +1585,12 @@ Each particle's scale will vary along this :ref:`Curve`. .. rst-class:: classref-property -:ref:`float` **scale_amount_max** = ``1.0`` +:ref:`float` **scale_amount_max** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum scale. @@ -1587,12 +1602,12 @@ Maximum scale. .. rst-class:: classref-property -:ref:`float` **scale_amount_min** = ``1.0`` +:ref:`float` **scale_amount_min** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum scale. @@ -1604,12 +1619,12 @@ Minimum scale. .. rst-class:: classref-property -:ref:`Curve` **scale_curve_x** +:ref:`Curve` **scale_curve_x** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale_curve_x** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_scale_curve_x** **(** **)** +- |void| **set_scale_curve_x**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_scale_curve_x**\ (\ ) Curve for the scale over life, along the x axis. @@ -1621,12 +1636,12 @@ Curve for the scale over life, along the x axis. .. rst-class:: classref-property -:ref:`Curve` **scale_curve_y** +:ref:`Curve` **scale_curve_y** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale_curve_y** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_scale_curve_y** **(** **)** +- |void| **set_scale_curve_y**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_scale_curve_y**\ (\ ) Curve for the scale over life, along the y axis. @@ -1638,12 +1653,12 @@ Curve for the scale over life, along the y axis. .. rst-class:: classref-property -:ref:`Curve` **scale_curve_z** +:ref:`Curve` **scale_curve_z** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_scale_curve_z** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_scale_curve_z** **(** **)** +- |void| **set_scale_curve_z**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_scale_curve_z**\ (\ ) Curve for the scale over life, along the z axis. @@ -1655,12 +1670,12 @@ Curve for the scale over life, along the z axis. .. rst-class:: classref-property -:ref:`float` **speed_scale** = ``1.0`` +:ref:`float` **speed_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_speed_scale**\ (\ ) Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. @@ -1672,12 +1687,12 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p .. rst-class:: classref-property -:ref:`bool` **split_scale** = ``false`` +:ref:`bool` **split_scale** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_split_scale** **(** :ref:`bool` value **)** -- :ref:`bool` **get_split_scale** **(** **)** +- |void| **set_split_scale**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_split_scale**\ (\ ) If set to ``true``, three different scale curves can be specified, one per scale axis. @@ -1689,12 +1704,12 @@ If set to ``true``, three different scale curves can be specified, one per scale .. rst-class:: classref-property -:ref:`float` **spread** = ``45.0`` +:ref:`float` **spread** = ``45.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_spread** **(** :ref:`float` value **)** -- :ref:`float` **get_spread** **(** **)** +- |void| **set_spread**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_spread**\ (\ ) Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. Applied to X/Z plane and Y/Z planes. @@ -1706,12 +1721,12 @@ Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. .. rst-class:: classref-property -:ref:`Curve` **tangential_accel_curve** +:ref:`Curve` **tangential_accel_curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** -- :ref:`Curve` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) +- :ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| Each particle's tangential acceleration will vary along this :ref:`Curve`. @@ -1723,12 +1738,12 @@ Each particle's tangential acceleration will vary along this :ref:`Curve` **tangential_accel_max** = ``0.0`` +:ref:`float` **tangential_accel_max** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| Maximum tangent acceleration. @@ -1740,15 +1755,34 @@ Maximum tangent acceleration. .. rst-class:: classref-property -:ref:`float` **tangential_accel_min** = ``0.0`` +:ref:`float` **tangential_accel_min** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** -- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) +- :ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| Minimum tangent acceleration. +.. rst-class:: classref-item-separator + +---- + +.. _class_CPUParticles3D_property_visibility_aabb: + +.. rst-class:: classref-property + +:ref:`AABB` **visibility_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_aabb**\ (\ value\: :ref:`AABB`\ ) +- :ref:`AABB` **get_visibility_aabb**\ (\ ) + +The :ref:`AABB` that determines the node's region which needs to be visible on screen for the particle system to be active. + +Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The :ref:`AABB` can be grown via code or with the **Particles → Generate AABB** editor tool. + .. rst-class:: classref-section-separator ---- @@ -1762,7 +1796,7 @@ Method Descriptions .. rst-class:: classref-method -void **convert_from_particles** **(** :ref:`Node` particles **)** +|void| **convert_from_particles**\ (\ particles\: :ref:`Node`\ ) :ref:`🔗` Sets this node's properties to match a given :ref:`GPUParticles3D` node with an assigned :ref:`ParticleProcessMaterial`. @@ -1774,7 +1808,7 @@ Sets this node's properties to match a given :ref:`GPUParticles3D` **get_param_curve** **(** :ref:`Parameter` param **)** |const| +:ref:`Curve` **get_param_curve**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the :ref:`Curve` of the parameter specified by :ref:`Parameter`. @@ -1786,7 +1820,7 @@ Returns the :ref:`Curve` of the parameter specified by :ref:`Parame .. rst-class:: classref-method -:ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| +:ref:`float` **get_param_max**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the maximum value range for the given parameter. @@ -1798,7 +1832,7 @@ Returns the maximum value range for the given parameter. .. rst-class:: classref-method -:ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| +:ref:`float` **get_param_min**\ (\ param\: :ref:`Parameter`\ ) |const| :ref:`🔗` Returns the minimum value range for the given parameter. @@ -1810,7 +1844,7 @@ Returns the minimum value range for the given parameter. .. rst-class:: classref-method -:ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| +:ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). @@ -1822,7 +1856,7 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` Restarts the particle emitter. @@ -1834,7 +1868,7 @@ Restarts the particle emitter. .. rst-class:: classref-method -void **set_param_curve** **(** :ref:`Parameter` param, :ref:`Curve` curve **)** +|void| **set_param_curve**\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) :ref:`🔗` Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter`. @@ -1846,7 +1880,7 @@ Sets the :ref:`Curve` of the parameter specified by :ref:`Parameter .. rst-class:: classref-method -void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +|void| **set_param_max**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Sets the maximum value for the given parameter. @@ -1858,7 +1892,7 @@ Sets the maximum value for the given parameter. .. rst-class:: classref-method -void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +|void| **set_param_min**\ (\ param\: :ref:`Parameter`, value\: :ref:`float`\ ) :ref:`🔗` Sets the minimum value for the given parameter. @@ -1870,7 +1904,7 @@ Sets the minimum value for the given parameter. .. rst-class:: classref-method -void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +|void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` Enables or disables the given particle flag (see :ref:`ParticleFlags` for options). @@ -1881,3 +1915,4 @@ Enables or disables the given particle flag (see :ref:`ParticleFlags` | :ref:`constant_time_compare` **(** :ref:`PackedByteArray` trusted, :ref:`PackedByteArray` received **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`decrypt` **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` ciphertext **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`encrypt` **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` plaintext **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`generate_random_bytes` **(** :ref:`int` size **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CryptoKey` | :ref:`generate_rsa` **(** :ref:`int` size **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`X509Certificate` | :ref:`generate_self_signed_certificate` **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`hmac_digest` **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key, :ref:`PackedByteArray` msg **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`sign` **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`CryptoKey` key **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`verify` **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`PackedByteArray` signature, :ref:`CryptoKey` key **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`constant_time_compare`\ (\ trusted\: :ref:`PackedByteArray`, received\: :ref:`PackedByteArray`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`decrypt`\ (\ key\: :ref:`CryptoKey`, ciphertext\: :ref:`PackedByteArray`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`encrypt`\ (\ key\: :ref:`CryptoKey`, plaintext\: :ref:`PackedByteArray`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`generate_random_bytes`\ (\ size\: :ref:`int`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CryptoKey` | :ref:`generate_rsa`\ (\ size\: :ref:`int`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`X509Certificate` | :ref:`generate_self_signed_certificate`\ (\ key\: :ref:`CryptoKey`, issuer_name\: :ref:`String` = "CN=myserver,O=myorganisation,C=IT", not_before\: :ref:`String` = "20140101000000", not_after\: :ref:`String` = "20340101000000"\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`hmac_digest`\ (\ hash_type\: :ref:`HashType`, key\: :ref:`PackedByteArray`, msg\: :ref:`PackedByteArray`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`sign`\ (\ hash_type\: :ref:`HashType`, hash\: :ref:`PackedByteArray`, key\: :ref:`CryptoKey`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`verify`\ (\ hash_type\: :ref:`HashType`, hash\: :ref:`PackedByteArray`, signature\: :ref:`PackedByteArray`, key\: :ref:`CryptoKey`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -133,7 +134,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **constant_time_compare** **(** :ref:`PackedByteArray` trusted, :ref:`PackedByteArray` received **)** +:ref:`bool` **constant_time_compare**\ (\ trusted\: :ref:`PackedByteArray`, received\: :ref:`PackedByteArray`\ ) :ref:`🔗` Compares two :ref:`PackedByteArray`\ s for equality without leaking timing information in order to prevent timing attacks. @@ -147,7 +148,7 @@ See `this blog post ` **decrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` ciphertext **)** +:ref:`PackedByteArray` **decrypt**\ (\ key\: :ref:`CryptoKey`, ciphertext\: :ref:`PackedByteArray`\ ) :ref:`🔗` Decrypt the given ``ciphertext`` with the provided private ``key``. @@ -161,7 +162,7 @@ Decrypt the given ``ciphertext`` with the provided private ``key``. .. rst-class:: classref-method -:ref:`PackedByteArray` **encrypt** **(** :ref:`CryptoKey` key, :ref:`PackedByteArray` plaintext **)** +:ref:`PackedByteArray` **encrypt**\ (\ key\: :ref:`CryptoKey`, plaintext\: :ref:`PackedByteArray`\ ) :ref:`🔗` Encrypt the given ``plaintext`` with the provided public ``key``. @@ -175,7 +176,7 @@ Encrypt the given ``plaintext`` with the provided public ``key``. .. rst-class:: classref-method -:ref:`PackedByteArray` **generate_random_bytes** **(** :ref:`int` size **)** +:ref:`PackedByteArray` **generate_random_bytes**\ (\ size\: :ref:`int`\ ) :ref:`🔗` Generates a :ref:`PackedByteArray` of cryptographically secure random bytes with given ``size``. @@ -187,7 +188,7 @@ Generates a :ref:`PackedByteArray` of cryptographically s .. rst-class:: classref-method -:ref:`CryptoKey` **generate_rsa** **(** :ref:`int` size **)** +:ref:`CryptoKey` **generate_rsa**\ (\ size\: :ref:`int`\ ) :ref:`🔗` Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream`. @@ -199,11 +200,11 @@ Generates an RSA :ref:`CryptoKey` that can be used for creating .. rst-class:: classref-method -:ref:`X509Certificate` **generate_self_signed_certificate** **(** :ref:`CryptoKey` key, :ref:`String` issuer_name="CN=myserver,O=myorganisation,C=IT", :ref:`String` not_before="20140101000000", :ref:`String` not_after="20340101000000" **)** +:ref:`X509Certificate` **generate_self_signed_certificate**\ (\ key\: :ref:`CryptoKey`, issuer_name\: :ref:`String` = "CN=myserver,O=myorganisation,C=IT", not_before\: :ref:`String` = "20140101000000", not_after\: :ref:`String` = "20340101000000"\ ) :ref:`🔗` Generates a self-signed :ref:`X509Certificate` from the given :ref:`CryptoKey` and ``issuer_name``. The certificate validity will be defined by ``not_before`` and ``not_after`` (first valid date and last valid date). The ``issuer_name`` must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). -A small example to generate an RSA key and a X509 self-signed certificate. +A small example to generate an RSA key and an X509 self-signed certificate. .. tabs:: @@ -234,7 +235,7 @@ A small example to generate an RSA key and a X509 self-signed certificate. .. rst-class:: classref-method -:ref:`PackedByteArray` **hmac_digest** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` key, :ref:`PackedByteArray` msg **)** +:ref:`PackedByteArray` **hmac_digest**\ (\ hash_type\: :ref:`HashType`, key\: :ref:`PackedByteArray`, msg\: :ref:`PackedByteArray`\ ) :ref:`🔗` Generates an `HMAC `__ digest of ``msg`` using ``key``. The ``hash_type`` parameter is the hashing algorithm that is used for the inner and outer hashes. @@ -248,7 +249,7 @@ Currently, only :ref:`HashingContext.HASH_SHA256` **sign** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`CryptoKey` key **)** +:ref:`PackedByteArray` **sign**\ (\ hash_type\: :ref:`HashType`, hash\: :ref:`PackedByteArray`, key\: :ref:`CryptoKey`\ ) :ref:`🔗` Sign a given ``hash`` of type ``hash_type`` with the provided private ``key``. @@ -260,7 +261,7 @@ Sign a given ``hash`` of type ``hash_type`` with the provided private ``key``. .. rst-class:: classref-method -:ref:`bool` **verify** **(** :ref:`HashType` hash_type, :ref:`PackedByteArray` hash, :ref:`PackedByteArray` signature, :ref:`CryptoKey` key **)** +:ref:`bool` **verify**\ (\ hash_type\: :ref:`HashType`, hash\: :ref:`PackedByteArray`, signature\: :ref:`PackedByteArray`, key\: :ref:`CryptoKey`\ ) :ref:`🔗` Verify that a given ``signature`` for ``hash`` of type ``hash_type`` against the provided public ``key``. @@ -271,3 +272,4 @@ Verify that a given ``signature`` for ``hash`` of type ``hash_type`` against the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index c7bb2dc36e4..f774b09048e 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -12,7 +12,7 @@ CryptoKey **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A cryptographic key (RSA). +A cryptographic key (RSA or elliptic-curve). .. rst-class:: classref-introduction-group @@ -23,6 +23,13 @@ The CryptoKey class represents a cryptographic key. Keys can be loaded and saved They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate` and as private key in :ref:`StreamPeerTLS.accept_stream` along with the appropriate certificate. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`SSL certificates <../tutorials/networking/ssl_certificates>` + .. rst-class:: classref-reftable-group Methods @@ -31,17 +38,17 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_public_only` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load` **(** :ref:`String` path, :ref:`bool` public_only=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`load_from_string` **(** :ref:`String` string_key, :ref:`bool` public_only=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save` **(** :ref:`String` path, :ref:`bool` public_only=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`save_to_string` **(** :ref:`bool` public_only=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_public_only`\ (\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load`\ (\ path\: :ref:`String`, public_only\: :ref:`bool` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`load_from_string`\ (\ string_key\: :ref:`String`, public_only\: :ref:`bool` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String`, public_only\: :ref:`bool` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`save_to_string`\ (\ public_only\: :ref:`bool` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,7 +63,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **is_public_only** **(** **)** |const| +:ref:`bool` **is_public_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this CryptoKey only has the public part, and not the private one. @@ -68,7 +75,7 @@ Returns ``true`` if this CryptoKey only has the public part, and not the private .. rst-class:: classref-method -:ref:`Error` **load** **(** :ref:`String` path, :ref:`bool` public_only=false **)** +:ref:`Error` **load**\ (\ path\: :ref:`String`, public_only\: :ref:`bool` = false\ ) :ref:`🔗` Loads a key from ``path``. If ``public_only`` is ``true``, only the public key will be loaded. @@ -82,7 +89,7 @@ Loads a key from ``path``. If ``public_only`` is ``true``, only the public key w .. rst-class:: classref-method -:ref:`Error` **load_from_string** **(** :ref:`String` string_key, :ref:`bool` public_only=false **)** +:ref:`Error` **load_from_string**\ (\ string_key\: :ref:`String`, public_only\: :ref:`bool` = false\ ) :ref:`🔗` Loads a key from the given ``string_key``. If ``public_only`` is ``true``, only the public key will be loaded. @@ -94,7 +101,7 @@ Loads a key from the given ``string_key``. If ``public_only`` is ``true``, only .. rst-class:: classref-method -:ref:`Error` **save** **(** :ref:`String` path, :ref:`bool` public_only=false **)** +:ref:`Error` **save**\ (\ path\: :ref:`String`, public_only\: :ref:`bool` = false\ ) :ref:`🔗` Saves a key to the given ``path``. If ``public_only`` is ``true``, only the public key will be saved. @@ -108,7 +115,7 @@ Saves a key to the given ``path``. If ``public_only`` is ``true``, only the publ .. rst-class:: classref-method -:ref:`String` **save_to_string** **(** :ref:`bool` public_only=false **)** +:ref:`String` **save_to_string**\ (\ public_only\: :ref:`bool` = false\ ) :ref:`🔗` Returns a string containing the key in PEM format. If ``public_only`` is ``true``, only the public key will be included. @@ -119,3 +126,4 @@ Returns a string containing the key in PEM format. If ``public_only`` is ``true` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgbox3d.rst b/classes/class_csgbox3d.rst index ad217382cfb..a06d3d965eb 100644 --- a/classes/class_csgbox3d.rst +++ b/classes/class_csgbox3d.rst @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The material used to render the box. @@ -74,12 +74,12 @@ The material used to render the box. .. rst-class:: classref-property -:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_size**\ (\ ) The box's width, height and depth. @@ -90,3 +90,4 @@ The box's width, height and depth. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgcombiner3d.rst b/classes/class_csgcombiner3d.rst index e4a4528c7a6..f9243de08fe 100644 --- a/classes/class_csgcombiner3d.rst +++ b/classes/class_csgcombiner3d.rst @@ -37,3 +37,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgcylinder3d.rst b/classes/class_csgcylinder3d.rst index 005321b136a..79dd0d5f1c1 100644 --- a/classes/class_csgcylinder3d.rst +++ b/classes/class_csgcylinder3d.rst @@ -65,12 +65,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **cone** = ``false`` +:ref:`bool` **cone** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cone** **(** :ref:`bool` value **)** -- :ref:`bool` **is_cone** **(** **)** +- |void| **set_cone**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_cone**\ (\ ) If ``true`` a cone is created, the :ref:`radius` will only apply to one side. @@ -82,12 +82,12 @@ If ``true`` a cone is created, the :ref:`radius` **height** = ``2.0`` +:ref:`float` **height** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) The height of the cylinder. @@ -99,12 +99,12 @@ The height of the cylinder. .. rst-class:: classref-property -:ref:`Material` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The material used to render the cylinder. @@ -116,12 +116,12 @@ The material used to render the cylinder. .. rst-class:: classref-property -:ref:`float` **radius** = ``0.5`` +:ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) The radius of the cylinder. @@ -133,12 +133,12 @@ The radius of the cylinder. .. rst-class:: classref-property -:ref:`int` **sides** = ``8`` +:ref:`int` **sides** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sides** **(** :ref:`int` value **)** -- :ref:`int` **get_sides** **(** **)** +- |void| **set_sides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_sides**\ (\ ) The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. @@ -150,12 +150,12 @@ The number of sides of the cylinder, the higher this number the more detail ther .. rst-class:: classref-property -:ref:`bool` **smooth_faces** = ``true`` +:ref:`bool` **smooth_faces** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_smooth_faces** **(** :ref:`bool` value **)** -- :ref:`bool` **get_smooth_faces** **(** **)** +- |void| **set_smooth_faces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_smooth_faces**\ (\ ) If ``true`` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If ``false`` the cylinder will have a flat shaded look. @@ -166,3 +166,4 @@ If ``true`` the normals of the cylinder are set to give a smooth effect making t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgmesh3d.rst b/classes/class_csgmesh3d.rst index fe5eb86b0a6..e8b2f250ec7 100644 --- a/classes/class_csgmesh3d.rst +++ b/classes/class_csgmesh3d.rst @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The :ref:`Material` used in drawing the CSG shape. @@ -74,16 +74,18 @@ The :ref:`Material` used in drawing the CSG shape. .. rst-class:: classref-property -:ref:`Mesh` **mesh** +:ref:`Mesh` **mesh** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh` value **)** -- :ref:`Mesh` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh`\ ) +- :ref:`Mesh` **get_mesh**\ (\ ) The :ref:`Mesh` resource to use as a CSG shape. -\ **Note:** When using an :ref:`ArrayMesh`, avoid meshes with vertex normals unless a flat shader is required. By default, CSGMesh will ignore the mesh's vertex normals and use a smooth shader calculated using the faces' normals. If a flat shader is required, ensure that all faces' vertex normals are parallel. +\ **Note:** When using an :ref:`ArrayMesh`, all vertex attributes except :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL` and :ref:`Mesh.ARRAY_TEX_UV` are left unused. Only :ref:`Mesh.ARRAY_VERTEX` and :ref:`Mesh.ARRAY_TEX_UV` will be passed to the GPU. + +\ :ref:`Mesh.ARRAY_NORMAL` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -92,3 +94,4 @@ The :ref:`Mesh` resource to use as a CSG shape. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 37a2c9c44ae..178b904bc55 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -85,7 +85,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗` .. _class_CSGPolygon3D_constant_MODE_DEPTH: @@ -119,7 +119,7 @@ The :ref:`polygon` shape is extruded along .. rst-class:: classref-enumeration -enum **PathRotation**: +enum **PathRotation**: :ref:`🔗` .. _class_CSGPolygon3D_constant_PATH_ROTATION_POLYGON: @@ -157,7 +157,7 @@ The :ref:`polygon` shape follows the path a .. rst-class:: classref-enumeration -enum **PathIntervalType**: +enum **PathIntervalType**: :ref:`🔗` .. _class_CSGPolygon3D_constant_PATH_INTERVAL_DISTANCE: @@ -188,12 +188,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **depth** = ``1.0`` +:ref:`float` **depth** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`float` value **)** -- :ref:`float` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_depth**\ (\ ) When :ref:`mode` is :ref:`MODE_DEPTH`, the depth of the extrusion. @@ -205,12 +205,12 @@ When :ref:`mode` is :ref:`MODE_DEPTH` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the length of the extrusions and V around the outline of the :ref:`polygon`), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face. @@ -222,12 +222,12 @@ Material to use for the resulting mesh. The UV maps the top half of the material .. rst-class:: classref-property -:ref:`Mode` **mode** = ``0`` +:ref:`Mode` **mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_mode** **(** :ref:`Mode` value **)** -- :ref:`Mode` **get_mode** **(** **)** +- |void| **set_mode**\ (\ value\: :ref:`Mode`\ ) +- :ref:`Mode` **get_mode**\ (\ ) The :ref:`mode` used to extrude the :ref:`polygon`. @@ -239,12 +239,12 @@ The :ref:`mode` used to extrude the :ref:`poly .. rst-class:: classref-property -:ref:`bool` **path_continuous_u** +:ref:`bool` **path_continuous_u** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_continuous_u** **(** :ref:`bool` value **)** -- :ref:`bool` **is_path_continuous_u** **(** **)** +- |void| **set_path_continuous_u**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_path_continuous_u**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, by default, the top half of the :ref:`material` is stretched along the entire length of the extruded shape. If ``false`` the top half of the material is repeated every step of the extrusion. @@ -256,12 +256,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_interval** +:ref:`float` **path_interval** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_interval** **(** :ref:`float` value **)** -- :ref:`float` **get_path_interval** **(** **)** +- |void| **set_path_interval**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_path_interval**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, the path interval or ratio of path points to extrusions. @@ -273,12 +273,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_interval_type** +:ref:`PathIntervalType` **path_interval_type** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_interval_type** **(** :ref:`PathIntervalType` value **)** -- :ref:`PathIntervalType` **get_path_interval_type** **(** **)** +- |void| **set_path_interval_type**\ (\ value\: :ref:`PathIntervalType`\ ) +- :ref:`PathIntervalType` **get_path_interval_type**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, this will determine if the interval should be by distance (:ref:`PATH_INTERVAL_DISTANCE`) or subdivision fractions (:ref:`PATH_INTERVAL_SUBDIVIDE`). @@ -290,12 +290,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_joined** +:ref:`bool` **path_joined** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_joined** **(** :ref:`bool` value **)** -- :ref:`bool` **is_path_joined** **(** **)** +- |void| **set_path_joined**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_path_joined**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, if ``true`` the ends of the path are joined, by adding an extrusion between the last and first points of the path. @@ -307,12 +307,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_local** +:ref:`bool` **path_local** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_local** **(** :ref:`bool` value **)** -- :ref:`bool` **is_path_local** **(** **)** +- |void| **set_path_local**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_path_local**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, if ``true`` the :ref:`Transform3D` of the **CSGPolygon3D** is used as the starting point for the extrusions, not the :ref:`Transform3D` of the :ref:`path_node`. @@ -324,12 +324,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_node** +:ref:`NodePath` **path_node** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_node** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_path_node** **(** **)** +- |void| **set_path_node**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_path_node**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, the location of the :ref:`Path3D` object used to extrude the :ref:`polygon`. @@ -341,14 +341,14 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_rotation** +:ref:`PathRotation` **path_rotation** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_rotation** **(** :ref:`PathRotation` value **)** -- :ref:`PathRotation` **get_path_rotation** **(** **)** +- |void| **set_path_rotation**\ (\ value\: :ref:`PathRotation`\ ) +- :ref:`PathRotation` **get_path_rotation**\ (\ ) -When :ref:`mode` is :ref:`MODE_PATH`, the :ref:`PathRotation` method used to rotate the :ref:`polygon` as it is extruded. +When :ref:`mode` is :ref:`MODE_PATH`, the path rotation method used to rotate the :ref:`polygon` as it is extruded. .. rst-class:: classref-item-separator @@ -358,12 +358,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_simplify_angle** +:ref:`float` **path_simplify_angle** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_simplify_angle** **(** :ref:`float` value **)** -- :ref:`float` **get_path_simplify_angle** **(** **)** +- |void| **set_path_simplify_angle**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_path_simplify_angle**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, extrusions that are less than this angle, will be merged together to reduce polygon count. @@ -375,12 +375,12 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_u_distance** +:ref:`float` **path_u_distance** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_path_u_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_path_u_distance** **(** **)** +- |void| **set_path_u_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_path_u_distance**\ (\ ) When :ref:`mode` is :ref:`MODE_PATH`, this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling. @@ -392,17 +392,19 @@ When :ref:`mode` is :ref:`MODE_PATH` **polygon** = ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` +:ref:`PackedVector2Array` **polygon** = ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array` value **)** -- :ref:`PackedVector2Array` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array`\ ) +- :ref:`PackedVector2Array` **get_polygon**\ (\ ) The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must *not* have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated. \ **Note:** If only 1 or 2 points are defined in :ref:`polygon`, no mesh will be generated. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. + .. rst-class:: classref-item-separator ---- @@ -411,12 +413,12 @@ The point array that defines the 2D polygon that is extruded. This can be a conv .. rst-class:: classref-property -:ref:`bool` **smooth_faces** = ``false`` +:ref:`bool` **smooth_faces** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_smooth_faces** **(** :ref:`bool` value **)** -- :ref:`bool` **get_smooth_faces** **(** **)** +- |void| **set_smooth_faces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_smooth_faces**\ (\ ) If ``true``, applies smooth shading to the extrusions. @@ -428,12 +430,12 @@ If ``true``, applies smooth shading to the extrusions. .. rst-class:: classref-property -:ref:`float` **spin_degrees** +:ref:`float` **spin_degrees** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_spin_degrees** **(** :ref:`float` value **)** -- :ref:`float` **get_spin_degrees** **(** **)** +- |void| **set_spin_degrees**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_spin_degrees**\ (\ ) When :ref:`mode` is :ref:`MODE_SPIN`, the total number of degrees the :ref:`polygon` is rotated when extruding. @@ -445,12 +447,12 @@ When :ref:`mode` is :ref:`MODE_SPIN` **spin_sides** +:ref:`int` **spin_sides** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_spin_sides** **(** :ref:`int` value **)** -- :ref:`int` **get_spin_sides** **(** **)** +- |void| **set_spin_sides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_spin_sides**\ (\ ) When :ref:`mode` is :ref:`MODE_SPIN`, the number of extrusions made. @@ -461,3 +463,4 @@ When :ref:`mode` is :ref:`MODE_SPIN` **flip_faces** = ``false`` +:ref:`bool` **flip_faces** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_flip_faces** **(** :ref:`bool` value **)** -- :ref:`bool` **get_flip_faces** **(** **)** +- |void| **set_flip_faces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_flip_faces**\ (\ ) If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. @@ -73,3 +73,4 @@ If set, the order of the vertices in each triangle are reversed resulting in the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 9880e42cb97..315f161d6af 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -64,19 +64,19 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_meshes` **(** **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_root_shape` **(** **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value`\ (\ layer_number\: :ref:`int`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_meshes`\ (\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_root_shape`\ (\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value`\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,7 +91,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operation**: +enum **Operation**: :ref:`🔗` .. _class_CSGShape3D_constant_OPERATION_UNION: @@ -130,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **calculate_tangents** = ``true`` +:ref:`bool` **calculate_tangents** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_calculate_tangents** **(** :ref:`bool` value **)** -- :ref:`bool` **is_calculating_tangents** **(** **)** +- |void| **set_calculate_tangents**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_calculating_tangents**\ (\ ) Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. @@ -147,12 +147,12 @@ Calculate tangents for the CSG shape which allows the use of normal maps. This i .. rst-class:: classref-property -:ref:`int` **collision_layer** = ``1`` +:ref:`int` **collision_layer** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_layer** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_layer** **(** **)** +- |void| **set_collision_layer**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_layer**\ (\ ) The physics layers this area is in. @@ -168,12 +168,12 @@ A contact is detected if object A is in any of the layers that object B scans, o .. rst-class:: classref-property -:ref:`int` **collision_mask** = ``1`` +:ref:`int` **collision_mask** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_collision_mask**\ (\ ) The physics layers this CSG shape scans for collisions. Only effective if :ref:`use_collision` is ``true``. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -185,12 +185,12 @@ The physics layers this CSG shape scans for collisions. Only effective if :ref:` .. rst-class:: classref-property -:ref:`float` **collision_priority** = ``1.0`` +:ref:`float` **collision_priority** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_collision_priority** **(** :ref:`float` value **)** -- :ref:`float` **get_collision_priority** **(** **)** +- |void| **set_collision_priority**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_collision_priority**\ (\ ) The priority used to solve colliding when occurring penetration. Only effective if :ref:`use_collision` is ``true``. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. @@ -202,12 +202,12 @@ The priority used to solve colliding when occurring penetration. Only effective .. rst-class:: classref-property -:ref:`Operation` **operation** = ``0`` +:ref:`Operation` **operation** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_operation** **(** :ref:`Operation` value **)** -- :ref:`Operation` **get_operation** **(** **)** +- |void| **set_operation**\ (\ value\: :ref:`Operation`\ ) +- :ref:`Operation` **get_operation**\ (\ ) The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. @@ -219,14 +219,14 @@ The operation that is performed on this shape. This is ignored for the first CSG .. rst-class:: classref-property -:ref:`float` **snap** = ``0.001`` +:ref:`float` **snap** = ``0.001`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_snap** **(** :ref:`float` value **)** -- :ref:`float` **get_snap** **(** **)** +- |void| **set_snap**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_snap**\ (\ ) -Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. +Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. The top-level CSG shape's snap value is used for the entire CSG tree. .. rst-class:: classref-item-separator @@ -236,12 +236,12 @@ Snap makes the mesh vertices snap to a given distance so that the faces of two m .. rst-class:: classref-property -:ref:`bool` **use_collision** = ``false`` +:ref:`bool` **use_collision** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_use_collision** **(** :ref:`bool` value **)** -- :ref:`bool` **is_using_collision** **(** **)** +- |void| **set_use_collision**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_collision**\ (\ ) Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also :ref:`collision_mask` and :ref:`collision_priority`. @@ -258,7 +258,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **get_collision_layer_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_layer_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_layer` is enabled, given a ``layer_number`` between 1 and 32. @@ -270,7 +270,7 @@ Returns whether or not the specified layer of the :ref:`collision_layer` **get_collision_mask_value** **(** :ref:`int` layer_number **)** |const| +:ref:`bool` **get_collision_mask_value**\ (\ layer_number\: :ref:`int`\ ) |const| :ref:`🔗` Returns whether or not the specified layer of the :ref:`collision_mask` is enabled, given a ``layer_number`` between 1 and 32. @@ -282,7 +282,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask` **get_meshes** **(** **)** |const| +:ref:`Array` **get_meshes**\ (\ ) |const| :ref:`🔗` Returns an :ref:`Array` with two elements, the first is the :ref:`Transform3D` of this node and the second is the root :ref:`Mesh` of this node. Only works when this node is the root shape. @@ -294,7 +294,7 @@ Returns an :ref:`Array` with two elements, the first is the :ref:`T .. rst-class:: classref-method -:ref:`bool` **is_root_shape** **(** **)** |const| +:ref:`bool` **is_root_shape**\ (\ ) |const| :ref:`🔗` Returns ``true`` if this is a root shape and is thus the object that is rendered. @@ -306,7 +306,7 @@ Returns ``true`` if this is a root shape and is thus the object that is rendered .. rst-class:: classref-method -void **set_collision_layer_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer`, given a ``layer_number`` between 1 and 32. @@ -318,7 +318,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref:`bool` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int`, value\: :ref:`bool`\ ) :ref:`🔗` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. @@ -329,3 +329,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgsphere3d.rst b/classes/class_csgsphere3d.rst index cf43c9e35f9..cf5011badc8 100644 --- a/classes/class_csgsphere3d.rst +++ b/classes/class_csgsphere3d.rst @@ -63,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The material used to render the sphere. @@ -80,12 +80,12 @@ The material used to render the sphere. .. rst-class:: classref-property -:ref:`int` **radial_segments** = ``12`` +:ref:`int` **radial_segments** = ``12`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radial_segments** **(** :ref:`int` value **)** -- :ref:`int` **get_radial_segments** **(** **)** +- |void| **set_radial_segments**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_radial_segments**\ (\ ) Number of vertical slices for the sphere. @@ -97,12 +97,12 @@ Number of vertical slices for the sphere. .. rst-class:: classref-property -:ref:`float` **radius** = ``0.5`` +:ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) Radius of the sphere. @@ -114,12 +114,12 @@ Radius of the sphere. .. rst-class:: classref-property -:ref:`int` **rings** = ``6`` +:ref:`int` **rings** = ``6`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rings** **(** :ref:`int` value **)** -- :ref:`int` **get_rings** **(** **)** +- |void| **set_rings**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_rings**\ (\ ) Number of horizontal slices for the sphere. @@ -131,12 +131,12 @@ Number of horizontal slices for the sphere. .. rst-class:: classref-property -:ref:`bool` **smooth_faces** = ``true`` +:ref:`bool` **smooth_faces** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_smooth_faces** **(** :ref:`bool` value **)** -- :ref:`bool` **get_smooth_faces** **(** **)** +- |void| **set_smooth_faces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_smooth_faces**\ (\ ) If ``true`` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If ``false`` the sphere will have a flat shaded look. @@ -147,3 +147,4 @@ If ``true`` the normals of the sphere are set to give a smooth effect making the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csgtorus3d.rst b/classes/class_csgtorus3d.rst index 24b4e412026..010ed505b96 100644 --- a/classes/class_csgtorus3d.rst +++ b/classes/class_csgtorus3d.rst @@ -65,12 +65,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **inner_radius** = ``0.5`` +:ref:`float` **inner_radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_inner_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_inner_radius** **(** **)** +- |void| **set_inner_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_inner_radius**\ (\ ) The inner radius of the torus. @@ -82,12 +82,12 @@ The inner radius of the torus. .. rst-class:: classref-property -:ref:`Material` **material** +:ref:`Material` **material** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material` value **)** -- :ref:`Material` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material`\ ) +- :ref:`Material` **get_material**\ (\ ) The material used to render the torus. @@ -99,12 +99,12 @@ The material used to render the torus. .. rst-class:: classref-property -:ref:`float` **outer_radius** = ``1.0`` +:ref:`float` **outer_radius** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_outer_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_outer_radius** **(** **)** +- |void| **set_outer_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_outer_radius**\ (\ ) The outer radius of the torus. @@ -116,12 +116,12 @@ The outer radius of the torus. .. rst-class:: classref-property -:ref:`int` **ring_sides** = ``6`` +:ref:`int` **ring_sides** = ``6`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_ring_sides** **(** :ref:`int` value **)** -- :ref:`int` **get_ring_sides** **(** **)** +- |void| **set_ring_sides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_ring_sides**\ (\ ) The number of edges each ring of the torus is constructed of. @@ -133,12 +133,12 @@ The number of edges each ring of the torus is constructed of. .. rst-class:: classref-property -:ref:`int` **sides** = ``8`` +:ref:`int` **sides** = ``8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sides** **(** :ref:`int` value **)** -- :ref:`int` **get_sides** **(** **)** +- |void| **set_sides**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_sides**\ (\ ) The number of slices the torus is constructed of. @@ -150,12 +150,12 @@ The number of slices the torus is constructed of. .. rst-class:: classref-property -:ref:`bool` **smooth_faces** = ``true`` +:ref:`bool` **smooth_faces** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_smooth_faces** **(** :ref:`bool` value **)** -- :ref:`bool` **get_smooth_faces** **(** **)** +- |void| **set_smooth_faces**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_smooth_faces**\ (\ ) If ``true`` the normals of the torus are set to give a smooth effect making the torus seem rounded. If ``false`` the torus will have a flat shaded look. @@ -166,3 +166,4 @@ If ``true`` the normals of the torus are set to give a smooth effect making the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index 154e7807e63..ea053a09609 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -21,8 +21,6 @@ Description This class represents a C# script. It is the C# equivalent of the :ref:`GDScript` class and is only available in Mono-enabled Godot builds. -See also :ref:`GodotSharp`. - .. rst-class:: classref-introduction-group Tutorials @@ -38,9 +36,9 @@ Methods .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`new` **(** ... **)** |vararg| | - +-------------------------------+--------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------+ + | :ref:`Variant` | :ref:`new`\ (\ ...\ ) |vararg| | + +-------------------------------+---------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -55,7 +53,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant` **new** **(** ... **)** |vararg| +:ref:`Variant` **new**\ (\ ...\ ) |vararg| :ref:`🔗` Returns a new instance of the script. @@ -66,3 +64,4 @@ Returns a new instance of the script. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index bd2d494bff6..df1ea1f20ad 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -12,7 +12,7 @@ Cubemap **Inherits:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -6-sided texture typically used in 3D rendering. +Six square textures representing the faces of a cube. Commonly used as a skybox. .. rst-class:: classref-introduction-group @@ -35,9 +35,9 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`create_placeholder`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +52,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Resource` **create_placeholder** **(** **)** |const| +:ref:`Resource` **create_placeholder**\ (\ ) |const| :ref:`🔗` Creates a placeholder version of this resource (:ref:`PlaceholderCubemap`). @@ -63,3 +63,4 @@ Creates a placeholder version of this resource (:ref:`PlaceholderCubemap` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A single composite texture resource which consists of multiple :ref:`Cubemap`\ s. +An array of :ref:`Cubemap`\ s, stored together and with a single reference. .. rst-class:: classref-introduction-group Description ----------- -**CubemapArray**\ s are made of an array of :ref:`Cubemap`\ s. Accordingly, like :ref:`Cubemap`\ s they are made of multiple textures the amount of which must be divisible by 6 (one image for each face of the cube). The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap`\ s into a shader using a single **CubemapArray**. +**CubemapArray**\ s are made of an array of :ref:`Cubemap`\ s. Like :ref:`Cubemap`\ s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube). -Generally, **CubemapArray**\ s provide a more efficient way for storing multiple :ref:`Cubemap`\ s compared to storing multiple :ref:`Cubemap`\ s themselves in an array. +The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap`\ s into a shader using a single **CubemapArray**. :ref:`Cubemap`\ s are allocated in adjacent cache regions on the GPU, which makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap`\ s. -Internally, Godot uses **CubemapArray**\ s for many effects including the :ref:`Sky`, if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. - -To create such a texture file yourself, reimport your image files using the Godot Editor import presets. +\ **Note:** Godot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. To create such a texture file yourself, reimport your image files using the import presets of the File System dock. \ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend. @@ -37,9 +35,9 @@ Methods .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`create_placeholder`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,7 +52,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Resource` **create_placeholder** **(** **)** |const| +:ref:`Resource` **create_placeholder**\ (\ ) |const| :ref:`🔗` Creates a placeholder version of this resource (:ref:`PlaceholderCubemapArray`). @@ -65,3 +63,4 @@ Creates a placeholder version of this resource (:ref:`PlaceholderCubemapArray` **<** :ref:`RefCounted` **<** :ref:`Object` -A mathematic curve. +A mathematical curve. .. rst-class:: classref-introduction-group Description ----------- -A curve that can be saved and re-used for other objects. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. +This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. See also :ref:`Gradient` which is designed for color interpolation. See also :ref:`Curve2D` and :ref:`Curve3D`. @@ -49,43 +49,43 @@ Methods .. table:: :widths: auto - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`float` left_tangent=0, :ref:`float` right_tangent=0, :ref:`TangentMode` left_mode=0, :ref:`TangentMode` right_mode=0 **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake` **(** **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clean_dupes` **(** **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_points` **(** **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TangentMode` | :ref:`get_point_left_mode` **(** :ref:`int` index **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_left_tangent` **(** :ref:`int` index **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` index **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TangentMode` | :ref:`get_point_right_mode` **(** :ref:`int` index **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_right_tangent` **(** :ref:`int` index **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point` **(** :ref:`int` index **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sample` **(** :ref:`float` offset **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`sample_baked` **(** :ref:`float` offset **)** |const| | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_left_mode` **(** :ref:`int` index, :ref:`TangentMode` mode **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_left_tangent` **(** :ref:`int` index, :ref:`float` tangent **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`set_point_offset` **(** :ref:`int` index, :ref:`float` offset **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_right_mode` **(** :ref:`int` index, :ref:`TangentMode` mode **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_right_tangent` **(** :ref:`int` index, :ref:`float` tangent **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_value` **(** :ref:`int` index, :ref:`float` y **)** | - +--------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_point`\ (\ position\: :ref:`Vector2`, left_tangent\: :ref:`float` = 0, right_tangent\: :ref:`float` = 0, left_mode\: :ref:`TangentMode` = 0, right_mode\: :ref:`TangentMode` = 0\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake`\ (\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clean_dupes`\ (\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_points`\ (\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TangentMode` | :ref:`get_point_left_mode`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_left_tangent`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TangentMode` | :ref:`get_point_right_mode`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_right_tangent`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point`\ (\ index\: :ref:`int`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sample`\ (\ offset\: :ref:`float`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sample_baked`\ (\ offset\: :ref:`float`\ ) |const| | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_left_mode`\ (\ index\: :ref:`int`, mode\: :ref:`TangentMode`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_left_tangent`\ (\ index\: :ref:`int`, tangent\: :ref:`float`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`set_point_offset`\ (\ index\: :ref:`int`, offset\: :ref:`float`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_right_mode`\ (\ index\: :ref:`int`, mode\: :ref:`TangentMode`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_right_tangent`\ (\ index\: :ref:`int`, tangent\: :ref:`float`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_value`\ (\ index\: :ref:`int`, y\: :ref:`float`\ ) | + +--------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -100,7 +100,7 @@ Signals .. rst-class:: classref-signal -**range_changed** **(** **)** +**range_changed**\ (\ ) :ref:`🔗` Emitted when :ref:`max_value` or :ref:`min_value` is changed. @@ -117,7 +117,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TangentMode**: +enum **TangentMode**: :ref:`🔗` .. _class_Curve_constant_TANGENT_FREE: @@ -156,12 +156,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int` **bake_resolution** = ``100`` +:ref:`int` **bake_resolution** = ``100`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bake_resolution** **(** :ref:`int` value **)** -- :ref:`int` **get_bake_resolution** **(** **)** +- |void| **set_bake_resolution**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_bake_resolution**\ (\ ) The number of points to include in the baked (i.e. cached) curve data. @@ -173,12 +173,12 @@ The number of points to include in the baked (i.e. cached) curve data. .. rst-class:: classref-property -:ref:`float` **max_value** = ``1.0`` +:ref:`float` **max_value** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_value** **(** :ref:`float` value **)** -- :ref:`float` **get_max_value** **(** **)** +- |void| **set_max_value**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_value**\ (\ ) The maximum value the curve can reach. @@ -190,12 +190,12 @@ The maximum value the curve can reach. .. rst-class:: classref-property -:ref:`float` **min_value** = ``0.0`` +:ref:`float` **min_value** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_min_value** **(** :ref:`float` value **)** -- :ref:`float` **get_min_value** **(** **)** +- |void| **set_min_value**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_min_value**\ (\ ) The minimum value the curve can reach. @@ -207,12 +207,12 @@ The minimum value the curve can reach. .. rst-class:: classref-property -:ref:`int` **point_count** = ``0`` +:ref:`int` **point_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_point_count** **(** :ref:`int` value **)** -- :ref:`int` **get_point_count** **(** **)** +- |void| **set_point_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_point_count**\ (\ ) The number of points describing the curve. @@ -229,7 +229,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **add_point** **(** :ref:`Vector2` position, :ref:`float` left_tangent=0, :ref:`float` right_tangent=0, :ref:`TangentMode` left_mode=0, :ref:`TangentMode` right_mode=0 **)** +:ref:`int` **add_point**\ (\ position\: :ref:`Vector2`, left_tangent\: :ref:`float` = 0, right_tangent\: :ref:`float` = 0, left_mode\: :ref:`TangentMode` = 0, right_mode\: :ref:`TangentMode` = 0\ ) :ref:`🔗` Adds a point to the curve. For each side, if the ``*_mode`` is :ref:`TANGENT_LINEAR`, the ``*_tangent`` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the ``*_tangent`` angle if ``*_mode`` is set to :ref:`TANGENT_FREE`. @@ -241,7 +241,7 @@ Adds a point to the curve. For each side, if the ``*_mode`` is :ref:`TANGENT_LIN .. rst-class:: classref-method -void **bake** **(** **)** +|void| **bake**\ (\ ) :ref:`🔗` Recomputes the baked cache of points for the curve. @@ -253,7 +253,7 @@ Recomputes the baked cache of points for the curve. .. rst-class:: classref-method -void **clean_dupes** **(** **)** +|void| **clean_dupes**\ (\ ) :ref:`🔗` Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve. @@ -265,7 +265,7 @@ Removes duplicate points, i.e. points that are less than 0.00001 units (engine e .. rst-class:: classref-method -void **clear_points** **(** **)** +|void| **clear_points**\ (\ ) :ref:`🔗` Removes all points from the curve. @@ -277,7 +277,7 @@ Removes all points from the curve. .. rst-class:: classref-method -:ref:`TangentMode` **get_point_left_mode** **(** :ref:`int` index **)** |const| +:ref:`TangentMode` **get_point_left_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the left :ref:`TangentMode` for the point at ``index``. @@ -289,7 +289,7 @@ Returns the left :ref:`TangentMode` for the point at ``i .. rst-class:: classref-method -:ref:`float` **get_point_left_tangent** **(** :ref:`int` index **)** |const| +:ref:`float` **get_point_left_tangent**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the left tangent angle (in degrees) for the point at ``index``. @@ -301,7 +301,7 @@ Returns the left tangent angle (in degrees) for the point at ``index``. .. rst-class:: classref-method -:ref:`Vector2` **get_point_position** **(** :ref:`int` index **)** |const| +:ref:`Vector2` **get_point_position**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the curve coordinates for the point at ``index``. @@ -313,7 +313,7 @@ Returns the curve coordinates for the point at ``index``. .. rst-class:: classref-method -:ref:`TangentMode` **get_point_right_mode** **(** :ref:`int` index **)** |const| +:ref:`TangentMode` **get_point_right_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the right :ref:`TangentMode` for the point at ``index``. @@ -325,7 +325,7 @@ Returns the right :ref:`TangentMode` for the point at `` .. rst-class:: classref-method -:ref:`float` **get_point_right_tangent** **(** :ref:`int` index **)** |const| +:ref:`float` **get_point_right_tangent**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the right tangent angle (in degrees) for the point at ``index``. @@ -337,7 +337,7 @@ Returns the right tangent angle (in degrees) for the point at ``index``. .. rst-class:: classref-method -void **remove_point** **(** :ref:`int` index **)** +|void| **remove_point**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Removes the point at ``index`` from the curve. @@ -349,7 +349,7 @@ Removes the point at ``index`` from the curve. .. rst-class:: classref-method -:ref:`float` **sample** **(** :ref:`float` offset **)** |const| +:ref:`float` **sample**\ (\ offset\: :ref:`float`\ ) |const| :ref:`🔗` Returns the Y value for the point that would exist at the X position ``offset`` along the curve. @@ -361,7 +361,7 @@ Returns the Y value for the point that would exist at the X position ``offset`` .. rst-class:: classref-method -:ref:`float` **sample_baked** **(** :ref:`float` offset **)** |const| +:ref:`float` **sample_baked**\ (\ offset\: :ref:`float`\ ) |const| :ref:`🔗` Returns the Y value for the point that would exist at the X position ``offset`` along the curve using the baked cache. Bakes the curve's points if not already baked. @@ -373,7 +373,7 @@ Returns the Y value for the point that would exist at the X position ``offset`` .. rst-class:: classref-method -void **set_point_left_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** +|void| **set_point_left_mode**\ (\ index\: :ref:`int`, mode\: :ref:`TangentMode`\ ) :ref:`🔗` Sets the left :ref:`TangentMode` for the point at ``index`` to ``mode``. @@ -385,7 +385,7 @@ Sets the left :ref:`TangentMode` for the point at ``inde .. rst-class:: classref-method -void **set_point_left_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** +|void| **set_point_left_tangent**\ (\ index\: :ref:`int`, tangent\: :ref:`float`\ ) :ref:`🔗` Sets the left tangent angle for the point at ``index`` to ``tangent``. @@ -397,7 +397,7 @@ Sets the left tangent angle for the point at ``index`` to ``tangent``. .. rst-class:: classref-method -:ref:`int` **set_point_offset** **(** :ref:`int` index, :ref:`float` offset **)** +:ref:`int` **set_point_offset**\ (\ index\: :ref:`int`, offset\: :ref:`float`\ ) :ref:`🔗` Sets the offset from ``0.5``. @@ -409,7 +409,7 @@ Sets the offset from ``0.5``. .. rst-class:: classref-method -void **set_point_right_mode** **(** :ref:`int` index, :ref:`TangentMode` mode **)** +|void| **set_point_right_mode**\ (\ index\: :ref:`int`, mode\: :ref:`TangentMode`\ ) :ref:`🔗` Sets the right :ref:`TangentMode` for the point at ``index`` to ``mode``. @@ -421,7 +421,7 @@ Sets the right :ref:`TangentMode` for the point at ``ind .. rst-class:: classref-method -void **set_point_right_tangent** **(** :ref:`int` index, :ref:`float` tangent **)** +|void| **set_point_right_tangent**\ (\ index\: :ref:`int`, tangent\: :ref:`float`\ ) :ref:`🔗` Sets the right tangent angle for the point at ``index`` to ``tangent``. @@ -433,7 +433,7 @@ Sets the right tangent angle for the point at ``index`` to ``tangent``. .. rst-class:: classref-method -void **set_point_value** **(** :ref:`int` index, :ref:`float` y **)** +|void| **set_point_value**\ (\ index\: :ref:`int`, y\: :ref:`float`\ ) :ref:`🔗` Assigns the vertical position ``y`` to the point at ``index``. @@ -444,3 +444,4 @@ Assigns the vertical position ``y`` to the point at ``index``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 881032528dd..fda17462067 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -45,45 +45,45 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point` **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` index=-1 **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_points` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_baked_points` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector2` to_point **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_closest_point` **(** :ref:`Vector2` to_point **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point` **(** :ref:`int` idx **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`sample` **(** :ref:`int` idx, :ref:`float` t **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`sample_baked` **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`sample_baked_with_rotation` **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`samplef` **(** :ref:`float` fofs **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector2` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector2` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector2` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`tessellate_even_length` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=20.0 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point`\ (\ position\: :ref:`Vector2`, in\: :ref:`Vector2` = Vector2(0, 0), out\: :ref:`Vector2` = Vector2(0, 0), index\: :ref:`int` = -1\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_points`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_baked_length`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_baked_points`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_offset`\ (\ to_point\: :ref:`Vector2`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_closest_point`\ (\ to_point\: :ref:`Vector2`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_in`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_out`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point`\ (\ idx\: :ref:`int`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`sample`\ (\ idx\: :ref:`int`, t\: :ref:`float`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`sample_baked`\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`sample_baked_with_rotation`\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`samplef`\ (\ fofs\: :ref:`float`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_in`\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_out`\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_position`\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`tessellate`\ (\ max_stages\: :ref:`int` = 5, tolerance_degrees\: :ref:`float` = 4\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`tessellate_even_length`\ (\ max_stages\: :ref:`int` = 5, tolerance_length\: :ref:`float` = 20.0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,12 +98,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bake_interval** = ``5.0`` +:ref:`float` **bake_interval** = ``5.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bake_interval** **(** :ref:`float` value **)** -- :ref:`float` **get_bake_interval** **(** **)** +- |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_bake_interval**\ (\ ) The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`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. @@ -115,12 +115,12 @@ The distance in pixels between two adjacent cached points. Changing it forces th .. rst-class:: classref-property -:ref:`int` **point_count** = ``0`` +:ref:`int` **point_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_point_count** **(** :ref:`int` value **)** -- :ref:`int` **get_point_count** **(** **)** +- |void| **set_point_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_point_count**\ (\ ) The number of points describing the curve. @@ -137,7 +137,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_point** **(** :ref:`Vector2` position, :ref:`Vector2` in=Vector2(0, 0), :ref:`Vector2` out=Vector2(0, 0), :ref:`int` index=-1 **)** +|void| **add_point**\ (\ position\: :ref:`Vector2`, in\: :ref:`Vector2` = Vector2(0, 0), out\: :ref:`Vector2` = Vector2(0, 0), index\: :ref:`int` = -1\ ) :ref:`🔗` Adds a point with the specified ``position`` relative to the curve's own position, with control points ``in`` and ``out``. Appends the new point at the end of the point list. @@ -151,7 +151,7 @@ If ``index`` is given, the new point is inserted before the existing point ident .. rst-class:: classref-method -void **clear_points** **(** **)** +|void| **clear_points**\ (\ ) :ref:`🔗` Removes all points from the curve. @@ -163,7 +163,7 @@ Removes all points from the curve. .. rst-class:: classref-method -:ref:`float` **get_baked_length** **(** **)** |const| +:ref:`float` **get_baked_length**\ (\ ) |const| :ref:`🔗` Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. @@ -175,7 +175,7 @@ Returns the total length of the curve, based on the cached points. Given enough .. rst-class:: classref-method -:ref:`PackedVector2Array` **get_baked_points** **(** **)** |const| +:ref:`PackedVector2Array` **get_baked_points**\ (\ ) |const| :ref:`🔗` Returns the cache of points as a :ref:`PackedVector2Array`. @@ -187,7 +187,7 @@ Returns the cache of points as a :ref:`PackedVector2Array` **get_closest_offset** **(** :ref:`Vector2` to_point **)** |const| +:ref:`float` **get_closest_offset**\ (\ to_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked`. @@ -201,7 +201,7 @@ Returns the closest offset to ``to_point``. This offset is meant to be used in : .. rst-class:: classref-method -:ref:`Vector2` **get_closest_point** **(** :ref:`Vector2` to_point **)** |const| +:ref:`Vector2` **get_closest_point**\ (\ to_point\: :ref:`Vector2`\ ) |const| :ref:`🔗` Returns the closest point on baked segments (in curve's local space) to ``to_point``. @@ -215,7 +215,7 @@ Returns the closest point on baked segments (in curve's local space) to ``to_poi .. rst-class:: classref-method -:ref:`Vector2` **get_point_in** **(** :ref:`int` idx **)** |const| +:ref:`Vector2` **get_point_in**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the control point leading to the vertex ``idx``. The returned position is relative to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0)``. @@ -227,7 +227,7 @@ Returns the position of the control point leading to the vertex ``idx``. The ret .. rst-class:: classref-method -:ref:`Vector2` **get_point_out** **(** :ref:`int` idx **)** |const| +:ref:`Vector2` **get_point_out**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the control point leading out of the vertex ``idx``. The returned position is relative to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0)``. @@ -239,7 +239,7 @@ Returns the position of the control point leading out of the vertex ``idx``. The .. rst-class:: classref-method -:ref:`Vector2` **get_point_position** **(** :ref:`int` idx **)** |const| +:ref:`Vector2` **get_point_position**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` 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)``. @@ -251,7 +251,7 @@ Returns the position of the vertex ``idx``. If the index is out of bounds, the f .. rst-class:: classref-method -void **remove_point** **(** :ref:`int` idx **)** +|void| **remove_point**\ (\ idx\: :ref:`int`\ ) :ref:`🔗` Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. @@ -263,7 +263,7 @@ Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx .. rst-class:: classref-method -:ref:`Vector2` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| +:ref:`Vector2` **sample**\ (\ idx\: :ref:`int`, t\: :ref:`float`\ ) |const| :ref:`🔗` 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. @@ -277,7 +277,7 @@ If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t .. rst-class:: classref-method -:ref:`Vector2` **sample_baked** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| +:ref:`Vector2` **sample_baked**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| :ref:`🔗` Returns a point within the curve at position ``offset``, where ``offset`` is measured as a pixel distance along the curve. @@ -293,20 +293,18 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and .. rst-class:: classref-method -:ref:`Transform2D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| +:ref:`Transform2D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| :ref:`🔗` -Similar to :ref:`sample_baked`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position, :ref:`Transform2D.x` as the sideways vector, and :ref:`Transform2D.y` as the forward vector. Returns an empty transform if the length of the curve is ``0``. +Similar to :ref:`sample_baked`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position and the :ref:`Transform2D.x` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is ``0``. :: var baked = curve.sample_baked_with_rotation(offset) - # This will rotate and position the node with the up direction pointing along the curve. + # The returned Transform2D can be set directly. + transform = baked + # You can also read the origin and rotation separately from the returned Transform2D. position = baked.get_origin() rotation = baked.get_rotation() - # Alternatively, not preserving scale. - transform = baked * Transform2D.FLIP_Y - # To match the rotation of PathFollow2D, not preserving scale. - transform = Transform2D(baked.y, baked.x, baked.origin) .. rst-class:: classref-item-separator @@ -316,7 +314,7 @@ Similar to :ref:`sample_baked`, but returns : .. rst-class:: classref-method -:ref:`Vector2` **samplef** **(** :ref:`float` fofs **)** |const| +:ref:`Vector2` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`🔗` Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. @@ -328,7 +326,7 @@ Returns the position at the vertex ``fofs``. It calls :ref:`sample` idx, :ref:`Vector2` position **)** +|void| **set_point_in**\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) :ref:`🔗` 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. The position is relative to the vertex. @@ -340,7 +338,7 @@ Sets the position of the control point leading to the vertex ``idx``. If the ind .. rst-class:: classref-method -void **set_point_out** **(** :ref:`int` idx, :ref:`Vector2` position **)** +|void| **set_point_out**\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) :ref:`🔗` 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. The position is relative to the vertex. @@ -352,7 +350,7 @@ Sets the position of the control point leading out of the vertex ``idx``. If the .. rst-class:: classref-method -void **set_point_position** **(** :ref:`int` idx, :ref:`Vector2` position **)** +|void| **set_point_position**\ (\ idx\: :ref:`int`, position\: :ref:`Vector2`\ ) :ref:`🔗` Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. @@ -364,7 +362,7 @@ Sets the position for the vertex ``idx``. If the index is out of bounds, the fun .. rst-class:: classref-method -:ref:`PackedVector2Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| +:ref:`PackedVector2Array` **tessellate**\ (\ max_stages\: :ref:`int` = 5, tolerance_degrees\: :ref:`float` = 4\ ) |const| :ref:`🔗` 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. @@ -382,7 +380,7 @@ This approximation makes straight segments between each point, then subdivides t .. rst-class:: classref-method -:ref:`PackedVector2Array` **tessellate_even_length** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=20.0 **)** |const| +:ref:`PackedVector2Array` **tessellate_even_length**\ (\ max_stages\: :ref:`int` = 5, tolerance_length\: :ref:`float` = 20.0\ ) |const| :ref:`🔗` Returns a list of points along the curve, with almost uniform density. ``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! @@ -395,3 +393,4 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 0178ad0d67e..4b4c4b35538 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -47,55 +47,55 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point` **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` index=-1 **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_points` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_baked_length` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_baked_points` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`get_baked_tilts` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_baked_up_vectors` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_closest_offset` **(** :ref:`Vector3` to_point **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_closest_point` **(** :ref:`Vector3` to_point **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_point_in` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_point_out` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_point_position` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_tilt` **(** :ref:`int` idx **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point` **(** :ref:`int` idx **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`sample` **(** :ref:`int` idx, :ref:`float` t **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`sample_baked` **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`sample_baked_up_vector` **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`sample_baked_with_rotation` **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false, :ref:`bool` apply_tilt=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`samplef` **(** :ref:`float` fofs **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_in` **(** :ref:`int` idx, :ref:`Vector3` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_out` **(** :ref:`int` idx, :ref:`Vector3` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_position` **(** :ref:`int` idx, :ref:`Vector3` position **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_tilt` **(** :ref:`int` idx, :ref:`float` tilt **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`tessellate` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`tessellate_even_length` **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=0.2 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point`\ (\ position\: :ref:`Vector3`, in\: :ref:`Vector3` = Vector3(0, 0, 0), out\: :ref:`Vector3` = Vector3(0, 0, 0), index\: :ref:`int` = -1\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_points`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_baked_length`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_baked_points`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`get_baked_tilts`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_baked_up_vectors`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_closest_offset`\ (\ to_point\: :ref:`Vector3`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_closest_point`\ (\ to_point\: :ref:`Vector3`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_in`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_out`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_point_position`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_tilt`\ (\ idx\: :ref:`int`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point`\ (\ idx\: :ref:`int`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`sample`\ (\ idx\: :ref:`int`, t\: :ref:`float`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`sample_baked`\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`sample_baked_up_vector`\ (\ offset\: :ref:`float`, apply_tilt\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`sample_baked_with_rotation`\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false, apply_tilt\: :ref:`bool` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`samplef`\ (\ fofs\: :ref:`float`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_in`\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_out`\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_position`\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_tilt`\ (\ idx\: :ref:`int`, tilt\: :ref:`float`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`tessellate`\ (\ max_stages\: :ref:`int` = 5, tolerance_degrees\: :ref:`float` = 4\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`tessellate_even_length`\ (\ max_stages\: :ref:`int` = 5, tolerance_length\: :ref:`float` = 0.2\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -110,12 +110,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bake_interval** = ``0.2`` +:ref:`float` **bake_interval** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bake_interval** **(** :ref:`float` value **)** -- :ref:`float` **get_bake_interval** **(** **)** +- |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_bake_interval**\ (\ ) The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`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. @@ -127,12 +127,12 @@ The distance in meters between two adjacent cached points. Changing it forces th .. rst-class:: classref-property -:ref:`int` **point_count** = ``0`` +:ref:`int` **point_count** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_point_count** **(** :ref:`int` value **)** -- :ref:`int` **get_point_count** **(** **)** +- |void| **set_point_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_point_count**\ (\ ) The number of points describing the curve. @@ -144,12 +144,12 @@ The number of points describing the curve. .. rst-class:: classref-property -:ref:`bool` **up_vector_enabled** = ``true`` +:ref:`bool` **up_vector_enabled** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_up_vector_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_up_vector_enabled** **(** **)** +- |void| **set_up_vector_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_up_vector_enabled**\ (\ ) If ``true``, the curve will bake up vectors used for orientation. This is used when :ref:`PathFollow3D.rotation_mode` is set to :ref:`PathFollow3D.ROTATION_ORIENTED`. Changing it forces the cache to be recomputed. @@ -166,7 +166,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_point** **(** :ref:`Vector3` position, :ref:`Vector3` in=Vector3(0, 0, 0), :ref:`Vector3` out=Vector3(0, 0, 0), :ref:`int` index=-1 **)** +|void| **add_point**\ (\ position\: :ref:`Vector3`, in\: :ref:`Vector3` = Vector3(0, 0, 0), out\: :ref:`Vector3` = Vector3(0, 0, 0), index\: :ref:`int` = -1\ ) :ref:`🔗` Adds a point with the specified ``position`` relative to the curve's own position, with control points ``in`` and ``out``. Appends the new point at the end of the point list. @@ -180,7 +180,7 @@ If ``index`` is given, the new point is inserted before the existing point ident .. rst-class:: classref-method -void **clear_points** **(** **)** +|void| **clear_points**\ (\ ) :ref:`🔗` Removes all points from the curve. @@ -192,7 +192,7 @@ Removes all points from the curve. .. rst-class:: classref-method -:ref:`float` **get_baked_length** **(** **)** |const| +:ref:`float` **get_baked_length**\ (\ ) |const| :ref:`🔗` Returns the total length of the curve, based on the cached points. Given enough density (see :ref:`bake_interval`), it should be approximate enough. @@ -204,7 +204,7 @@ Returns the total length of the curve, based on the cached points. Given enough .. rst-class:: classref-method -:ref:`PackedVector3Array` **get_baked_points** **(** **)** |const| +:ref:`PackedVector3Array` **get_baked_points**\ (\ ) |const| :ref:`🔗` Returns the cache of points as a :ref:`PackedVector3Array`. @@ -216,7 +216,7 @@ Returns the cache of points as a :ref:`PackedVector3Array` **get_baked_tilts** **(** **)** |const| +:ref:`PackedFloat32Array` **get_baked_tilts**\ (\ ) |const| :ref:`🔗` Returns the cache of tilts as a :ref:`PackedFloat32Array`. @@ -228,7 +228,7 @@ Returns the cache of tilts as a :ref:`PackedFloat32Array` **get_baked_up_vectors** **(** **)** |const| +:ref:`PackedVector3Array` **get_baked_up_vectors**\ (\ ) |const| :ref:`🔗` Returns the cache of up vectors as a :ref:`PackedVector3Array`. @@ -242,7 +242,7 @@ If :ref:`up_vector_enabled` is ``false .. rst-class:: classref-method -:ref:`float` **get_closest_offset** **(** :ref:`Vector3` to_point **)** |const| +:ref:`float` **get_closest_offset**\ (\ to_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked` or :ref:`sample_baked_up_vector`. @@ -256,7 +256,7 @@ Returns the closest offset to ``to_point``. This offset is meant to be used in : .. rst-class:: classref-method -:ref:`Vector3` **get_closest_point** **(** :ref:`Vector3` to_point **)** |const| +:ref:`Vector3` **get_closest_point**\ (\ to_point\: :ref:`Vector3`\ ) |const| :ref:`🔗` Returns the closest point on baked segments (in curve's local space) to ``to_point``. @@ -270,7 +270,7 @@ Returns the closest point on baked segments (in curve's local space) to ``to_poi .. rst-class:: classref-method -:ref:`Vector3` **get_point_in** **(** :ref:`int` idx **)** |const| +:ref:`Vector3` **get_point_in**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the control point leading to the vertex ``idx``. The returned position is relative to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0, 0)``. @@ -282,7 +282,7 @@ Returns the position of the control point leading to the vertex ``idx``. The ret .. rst-class:: classref-method -:ref:`Vector3` **get_point_out** **(** :ref:`int` idx **)** |const| +:ref:`Vector3` **get_point_out**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the position of the control point leading out of the vertex ``idx``. The returned position is relative to the vertex ``idx``. If the index is out of bounds, the function sends an error to the console, and returns ``(0, 0, 0)``. @@ -294,7 +294,7 @@ Returns the position of the control point leading out of the vertex ``idx``. The .. rst-class:: classref-method -:ref:`Vector3` **get_point_position** **(** :ref:`int` idx **)** |const| +:ref:`Vector3` **get_point_position**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` 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)``. @@ -306,7 +306,7 @@ Returns the position of the vertex ``idx``. If the index is out of bounds, the f .. rst-class:: classref-method -:ref:`float` **get_point_tilt** **(** :ref:`int` idx **)** |const| +:ref:`float` **get_point_tilt**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` 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``. @@ -318,7 +318,7 @@ Returns the tilt angle in radians for the point ``idx``. If the index is out of .. rst-class:: classref-method -void **remove_point** **(** :ref:`int` idx **)** +|void| **remove_point**\ (\ idx\: :ref:`int`\ ) :ref:`🔗` Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx`` is out of bounds. @@ -330,7 +330,7 @@ Deletes the point ``idx`` from the curve. Sends an error to the console if ``idx .. rst-class:: classref-method -:ref:`Vector3` **sample** **(** :ref:`int` idx, :ref:`float` t **)** |const| +:ref:`Vector3` **sample**\ (\ idx\: :ref:`int`, t\: :ref:`float`\ ) |const| :ref:`🔗` 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. @@ -344,11 +344,9 @@ If ``idx`` is out of bounds it is truncated to the first or last vertex, and ``t .. rst-class:: classref-method -:ref:`Vector3` **sample_baked** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| +:ref:`Vector3` **sample_baked**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| :ref:`🔗` -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 ``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``. Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). @@ -360,11 +358,9 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and .. rst-class:: classref-method -:ref:`Vector3` **sample_baked_up_vector** **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| - -Returns an up vector within the curve at position ``offset``, where ``offset`` is measured as a distance in 3D units along the curve. +:ref:`Vector3` **sample_baked_up_vector**\ (\ offset\: :ref:`float`, apply_tilt\: :ref:`bool` = false\ ) |const| :ref:`🔗` -To do that, it finds the two cached up vectors where the ``offset`` lies between, then interpolates the values. If ``apply_tilt`` is ``true``, an interpolated tilt is applied to the interpolated up vector. +Returns an up vector 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 up vectors where the ``offset`` lies between, then interpolates the values. If ``apply_tilt`` is ``true``, 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)``. @@ -376,9 +372,9 @@ If the curve has no up vectors, the function sends an error to the console, and .. rst-class:: classref-method -:ref:`Transform3D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false, :ref:`bool` apply_tilt=false **)** |const| +:ref:`Transform3D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false, apply_tilt\: :ref:`bool` = false\ ) |const| :ref:`🔗` -Similar with ``interpolate_baked()``. The return value is ``Transform3D``, with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. +Returns a :ref:`Transform3D` with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also :ref:`sample_baked`. .. rst-class:: classref-item-separator @@ -388,7 +384,7 @@ Similar with ``interpolate_baked()``. The return value is ``Transform3D``, with .. rst-class:: classref-method -:ref:`Vector3` **samplef** **(** :ref:`float` fofs **)** |const| +:ref:`Vector3` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`🔗` Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. @@ -400,7 +396,7 @@ Returns the position at the vertex ``fofs``. It calls :ref:`sample` idx, :ref:`Vector3` position **)** +|void| **set_point_in**\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) :ref:`🔗` 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. The position is relative to the vertex. @@ -412,7 +408,7 @@ Sets the position of the control point leading to the vertex ``idx``. If the ind .. rst-class:: classref-method -void **set_point_out** **(** :ref:`int` idx, :ref:`Vector3` position **)** +|void| **set_point_out**\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) :ref:`🔗` 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. The position is relative to the vertex. @@ -424,7 +420,7 @@ Sets the position of the control point leading out of the vertex ``idx``. If the .. rst-class:: classref-method -void **set_point_position** **(** :ref:`int` idx, :ref:`Vector3` position **)** +|void| **set_point_position**\ (\ idx\: :ref:`int`, position\: :ref:`Vector3`\ ) :ref:`🔗` Sets the position for the vertex ``idx``. If the index is out of bounds, the function sends an error to the console. @@ -436,7 +432,7 @@ Sets the position for the vertex ``idx``. If the index is out of bounds, the fun .. rst-class:: classref-method -void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` tilt **)** +|void| **set_point_tilt**\ (\ idx\: :ref:`int`, tilt\: :ref:`float`\ ) :ref:`🔗` 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. @@ -450,7 +446,7 @@ The tilt controls the rotation along the look-at axis an object traveling the pa .. rst-class:: classref-method -:ref:`PackedVector3Array` **tessellate** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_degrees=4 **)** |const| +:ref:`PackedVector3Array` **tessellate**\ (\ max_stages\: :ref:`int` = 5, tolerance_degrees\: :ref:`float` = 4\ ) |const| :ref:`🔗` 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. @@ -468,7 +464,7 @@ This approximation makes straight segments between each point, then subdivides t .. rst-class:: classref-method -:ref:`PackedVector3Array` **tessellate_even_length** **(** :ref:`int` max_stages=5, :ref:`float` tolerance_length=0.2 **)** |const| +:ref:`PackedVector3Array` **tessellate_even_length**\ (\ max_stages\: :ref:`int` = 5, tolerance_length\: :ref:`float` = 0.2\ ) |const| :ref:`🔗` Returns a list of points along the curve, with almost uniform density. ``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! @@ -481,3 +477,4 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index 860c3beddd9..0e23a5ef3c5 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -12,14 +12,14 @@ CurveTexture **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A texture that shows a curve. +A 1D texture where pixel brightness corresponds to points on a curve. .. rst-class:: classref-introduction-group Description ----------- -Renders a given :ref:`Curve` provided to it. Simplifies the task of drawing curves and/or saving them as image files. +A 1D texture where pixel brightness corresponds to points on a :ref:`Curve` resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files. If you need to store up to 3 curves within a single texture, use :ref:`CurveXYZTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. @@ -54,7 +54,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TextureMode**: +enum **TextureMode**: :ref:`🔗` .. _class_CurveTexture_constant_TEXTURE_MODE_RGB: @@ -85,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Curve` **curve** +:ref:`Curve` **curve** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_curve**\ (\ ) The :ref:`Curve` that is rendered onto the texture. @@ -102,12 +102,12 @@ The :ref:`Curve` that is rendered onto the texture. .. rst-class:: classref-property -:ref:`TextureMode` **texture_mode** = ``0`` +:ref:`TextureMode` **texture_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture_mode** **(** :ref:`TextureMode` value **)** -- :ref:`TextureMode` **get_texture_mode** **(** **)** +- |void| **set_texture_mode**\ (\ value\: :ref:`TextureMode`\ ) +- :ref:`TextureMode` **get_texture_mode**\ (\ ) The format the texture should be generated with. When passing a CurveTexture as an input to a :ref:`Shader`, this may need to be adjusted. @@ -119,12 +119,12 @@ The format the texture should be generated with. When passing a CurveTexture as .. rst-class:: classref-property -:ref:`int` **width** = ``256`` +:ref:`int` **width** = ``256`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int` value **)** -- :ref:`int` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_width**\ (\ ) The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. @@ -135,3 +135,4 @@ The width of the texture (in pixels). Higher values make it possible to represen .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_curvexyztexture.rst b/classes/class_curvexyztexture.rst index 87dd7252009..c86f9c8ec71 100644 --- a/classes/class_curvexyztexture.rst +++ b/classes/class_curvexyztexture.rst @@ -12,14 +12,14 @@ CurveXYZTexture **Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A texture that shows 3 different curves (stored on the red, green and blue color channels). +A 1D texture where the red, green, and blue color channels correspond to points on 3 curves. .. rst-class:: classref-introduction-group Description ----------- -Renders 3 given :ref:`Curve`\ s provided to it, on the red, green and blue channels respectively. Compared to using separate :ref:`CurveTexture`\ s, this further simplifies the task of drawing curves and/or saving them as image files. +A 1D texture where the red, green, and blue color channels correspond to points on 3 :ref:`Curve` resources. Compared to using separate :ref:`CurveTexture`\ s, this further simplifies the task of saving curves as image files. If you only need to store one curve within a single texture, use :ref:`CurveTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Curve` **curve_x** +:ref:`Curve` **curve_x** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_curve_x** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_curve_x** **(** **)** +- |void| **set_curve_x**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_curve_x**\ (\ ) The :ref:`Curve` that is rendered onto the texture's red channel. @@ -73,12 +73,12 @@ The :ref:`Curve` that is rendered onto the texture's red channel. .. rst-class:: classref-property -:ref:`Curve` **curve_y** +:ref:`Curve` **curve_y** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_curve_y** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_curve_y** **(** **)** +- |void| **set_curve_y**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_curve_y**\ (\ ) The :ref:`Curve` that is rendered onto the texture's green channel. @@ -90,12 +90,12 @@ The :ref:`Curve` that is rendered onto the texture's green channel. .. rst-class:: classref-property -:ref:`Curve` **curve_z** +:ref:`Curve` **curve_z** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_curve_z** **(** :ref:`Curve` value **)** -- :ref:`Curve` **get_curve_z** **(** **)** +- |void| **set_curve_z**\ (\ value\: :ref:`Curve`\ ) +- :ref:`Curve` **get_curve_z**\ (\ ) The :ref:`Curve` that is rendered onto the texture's blue channel. @@ -107,12 +107,12 @@ The :ref:`Curve` that is rendered onto the texture's blue channel. .. rst-class:: classref-property -:ref:`int` **width** = ``256`` +:ref:`int` **width** = ``256`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int` value **)** -- :ref:`int` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_width**\ (\ ) The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. @@ -123,3 +123,4 @@ The width of the texture (in pixels). Higher values make it possible to represen .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 3ee943ee87d..89e42b5b7e1 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -58,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **bottom_radius** = ``0.5`` +:ref:`float` **bottom_radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_bottom_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_bottom_radius** **(** **)** +- |void| **set_bottom_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_bottom_radius**\ (\ ) Bottom radius of the cylinder. If set to ``0.0``, the bottom faces will not be generated, resulting in a conic shape. See also :ref:`cap_bottom`. @@ -75,12 +75,12 @@ Bottom radius of the cylinder. If set to ``0.0``, the bottom faces will not be g .. rst-class:: classref-property -:ref:`bool` **cap_bottom** = ``true`` +:ref:`bool` **cap_bottom** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cap_bottom** **(** :ref:`bool` value **)** -- :ref:`bool` **is_cap_bottom** **(** **)** +- |void| **set_cap_bottom**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_cap_bottom**\ (\ ) If ``true``, generates a cap at the bottom of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`bottom_radius`. @@ -94,12 +94,12 @@ If ``true``, generates a cap at the bottom of the cylinder. This can be set to ` .. rst-class:: classref-property -:ref:`bool` **cap_top** = ``true`` +:ref:`bool` **cap_top** = ``true`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cap_top** **(** :ref:`bool` value **)** -- :ref:`bool` **is_cap_top** **(** **)** +- |void| **set_cap_top**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_cap_top**\ (\ ) If ``true``, generates a cap at the top of the cylinder. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. See also :ref:`top_radius`. @@ -113,12 +113,12 @@ If ``true``, generates a cap at the top of the cylinder. This can be set to ``fa .. rst-class:: classref-property -:ref:`float` **height** = ``2.0`` +:ref:`float` **height** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) Full height of the cylinder. @@ -130,12 +130,12 @@ Full height of the cylinder. .. rst-class:: classref-property -:ref:`int` **radial_segments** = ``64`` +:ref:`int` **radial_segments** = ``64`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radial_segments** **(** :ref:`int` value **)** -- :ref:`int` **get_radial_segments** **(** **)** +- |void| **set_radial_segments**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_radial_segments**\ (\ ) Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance. @@ -147,12 +147,12 @@ Number of radial segments on the cylinder. Higher values result in a more detail .. rst-class:: classref-property -:ref:`int` **rings** = ``4`` +:ref:`int` **rings** = ``4`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rings** **(** :ref:`int` value **)** -- :ref:`int` **get_rings** **(** **)** +- |void| **set_rings**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_rings**\ (\ ) Number of edge rings along the height of the cylinder. Changing :ref:`rings` does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, :ref:`rings` should be kept to its default value. @@ -164,12 +164,12 @@ Number of edge rings along the height of the cylinder. Changing :ref:`rings` **top_radius** = ``0.5`` +:ref:`float` **top_radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_top_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_top_radius** **(** **)** +- |void| **set_top_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_top_radius**\ (\ ) Top radius of the cylinder. If set to ``0.0``, the top faces will not be generated, resulting in a conic shape. See also :ref:`cap_top`. @@ -180,3 +180,4 @@ Top radius of the cylinder. If set to ``0.0``, the top faces will not be generat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index 58b07d7cc9b..bd33d1a93ed 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -19,22 +19,22 @@ A 3D cylinder shape used for physics collision. Description ----------- -A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. +A 3D cylinder shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. \ **Note:** There are several known bugs with cylinder collision shapes. Using :ref:`CapsuleShape3D` or :ref:`BoxShape3D` instead is recommended. -\ **Performance:** **CylinderShape3D** is fast to check collisions against, but it is slower than :ref:`CapsuleShape3D`, :ref:`BoxShape3D`, and **CylinderShape3D**. +\ **Performance:** **CylinderShape3D** is fast to check collisions against, but it is slower than :ref:`CapsuleShape3D`, :ref:`BoxShape3D`, and :ref:`SphereShape3D`. .. rst-class:: classref-introduction-group Tutorials --------- -- `Third Person Shooter Demo `__ +- `Third Person Shooter (TPS) Demo `__ -- `3D Physics Tests Demo `__ +- `3D Physics Tests Demo `__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ .. rst-class:: classref-reftable-group @@ -63,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **height** = ``2.0`` +:ref:`float` **height** = ``2.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) The cylinder's height. @@ -80,12 +80,12 @@ The cylinder's height. .. rst-class:: classref-property -:ref:`float` **radius** = ``0.5`` +:ref:`float` **radius** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float` value **)** -- :ref:`float` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_radius**\ (\ ) The cylinder's radius. @@ -96,3 +96,4 @@ The cylinder's radius. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index 0069a782a70..768af8745a7 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -52,14 +52,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **damping** = ``1.0`` +:ref:`float` **damping** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_damping** **(** :ref:`float` value **)** -- :ref:`float` **get_damping** **(** **)** +- |void| **set_damping**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_damping**\ (\ ) -The spring joint's damping ratio. A value between ``0`` and ``1``. When the two bodies move into different directions the system tries to align them to the spring axis again. A high ``damping`` value forces the attached bodies to align faster. +The spring joint's damping ratio. A value between ``0`` and ``1``. When the two bodies move into different directions the system tries to align them to the spring axis again. A high :ref:`damping` value forces the attached bodies to align faster. .. rst-class:: classref-item-separator @@ -69,12 +69,12 @@ The spring joint's damping ratio. A value between ``0`` and ``1``. When the two .. rst-class:: classref-property -:ref:`float` **length** = ``50.0`` +:ref:`float` **length** = ``50.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float` value **)** -- :ref:`float` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_length**\ (\ ) The spring joint's maximum length. The two attached bodies cannot stretch it past this value. @@ -86,12 +86,12 @@ The spring joint's maximum length. The two attached bodies cannot stretch it pas .. rst-class:: classref-property -:ref:`float` **rest_length** = ``0.0`` +:ref:`float` **rest_length** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_rest_length** **(** :ref:`float` value **)** -- :ref:`float` **get_rest_length** **(** **)** +- |void| **set_rest_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_rest_length**\ (\ ) When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. @@ -103,12 +103,12 @@ When the bodies attached to the spring joint move they stretch or squash it. The .. rst-class:: classref-property -:ref:`float` **stiffness** = ``20.0`` +:ref:`float` **stiffness** = ``20.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_stiffness** **(** :ref:`float` value **)** -- :ref:`float` **get_stiffness** **(** **)** +- |void| **set_stiffness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_stiffness**\ (\ ) The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. @@ -119,3 +119,4 @@ The higher the value, the less the bodies attached to the joint will deform it. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 7076acf53b6..67564ad0d47 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: stain + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -79,11 +82,11 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_texture` **(** :ref:`DecalTexture` type **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture` **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_texture`\ (\ type\: :ref:`DecalTexture`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture`\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,7 +101,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DecalTexture**: +enum **DecalTexture**: :ref:`🔗` .. _class_Decal_constant_TEXTURE_ALBEDO: @@ -153,12 +156,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **albedo_mix** = ``1.0`` +:ref:`float` **albedo_mix** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_albedo_mix** **(** :ref:`float` value **)** -- :ref:`float` **get_albedo_mix** **(** **)** +- |void| **set_albedo_mix**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_albedo_mix**\ (\ ) Blends the albedo :ref:`Color` of the decal with albedo :ref:`Color` of the underlying mesh. This can be set to ``0.0`` to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also :ref:`modulate`. @@ -170,12 +173,12 @@ Blends the albedo :ref:`Color` of the decal with albedo :ref:`Color .. rst-class:: classref-property -:ref:`int` **cull_mask** = ``1048575`` +:ref:`int` **cull_mask** = ``1048575`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int` value **)** -- :ref:`int` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_cull_mask**\ (\ ) Specifies which :ref:`VisualInstance3D.layers` this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. @@ -187,12 +190,12 @@ Specifies which :ref:`VisualInstance3D.layers` **distance_fade_begin** = ``40.0`` +:ref:`float` **distance_fade_begin** = ``40.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_distance_fade_begin** **(** :ref:`float` value **)** -- :ref:`float` **get_distance_fade_begin** **(** **)** +- |void| **set_distance_fade_begin**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_distance_fade_begin**\ (\ ) The distance from the camera at which the Decal begins to fade away (in 3D units). @@ -204,12 +207,12 @@ The distance from the camera at which the Decal begins to fade away (in 3D units .. rst-class:: classref-property -:ref:`bool` **distance_fade_enabled** = ``false`` +:ref:`bool` **distance_fade_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_enable_distance_fade** **(** :ref:`bool` value **)** -- :ref:`bool` **is_distance_fade_enabled** **(** **)** +- |void| **set_enable_distance_fade**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_distance_fade_enabled**\ (\ ) If ``true``, decals will smoothly fade away when far from the active :ref:`Camera3D` starting at :ref:`distance_fade_begin`. The Decal will fade out over :ref:`distance_fade_begin` + :ref:`distance_fade_length`, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance. @@ -221,12 +224,12 @@ If ``true``, decals will smoothly fade away when far from the active :ref:`Camer .. rst-class:: classref-property -:ref:`float` **distance_fade_length** = ``10.0`` +:ref:`float` **distance_fade_length** = ``10.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_distance_fade_length** **(** :ref:`float` value **)** -- :ref:`float` **get_distance_fade_length** **(** **)** +- |void| **set_distance_fade_length**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_distance_fade_length**\ (\ ) The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast. @@ -238,12 +241,12 @@ The distance over which the Decal fades (in 3D units). The Decal becomes slowly .. rst-class:: classref-property -:ref:`float` **emission_energy** = ``1.0`` +:ref:`float` **emission_energy** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_emission_energy** **(** :ref:`float` value **)** -- :ref:`float` **get_emission_energy** **(** **)** +- |void| **set_emission_energy**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_emission_energy**\ (\ ) Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also :ref:`modulate`. @@ -255,12 +258,12 @@ Energy multiplier for the emission texture. This will make the decal emit light .. rst-class:: classref-property -:ref:`float` **lower_fade** = ``0.3`` +:ref:`float` **lower_fade** = ``0.3`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_lower_fade** **(** :ref:`float` value **)** -- :ref:`float` **get_lower_fade** **(** **)** +- |void| **set_lower_fade**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_lower_fade**\ (\ ) Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). See also :ref:`upper_fade`. @@ -272,12 +275,12 @@ Sets the curve over which the decal will fade as the surface gets further from t .. rst-class:: classref-property -:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color` value **)** -- :ref:`Color` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_modulate**\ (\ ) Changes the :ref:`Color` of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also :ref:`emission_energy` and :ref:`albedo_mix` to change the emission and albedo intensity independently of each other. @@ -289,12 +292,12 @@ Changes the :ref:`Color` of the Decal by multiplying the albedo and .. rst-class:: classref-property -:ref:`float` **normal_fade** = ``0.0`` +:ref:`float` **normal_fade** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_normal_fade** **(** :ref:`float` value **)** -- :ref:`float` **get_normal_fade** **(** **)** +- |void| **set_normal_fade**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_normal_fade**\ (\ ) Fades the Decal if the angle between the Decal's :ref:`AABB` and the target surface becomes too large. A value of ``0`` projects the Decal regardless of angle, a value of ``1`` limits the Decal to surfaces that are nearly perpendicular. @@ -308,12 +311,12 @@ Fades the Decal if the angle between the Decal's :ref:`AABB` and the .. rst-class:: classref-property -:ref:`Vector3` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_size**\ (\ ) Sets the size of the :ref:`AABB` used by the decal. All dimensions must be set to a value greater than zero (they will be clamped to ``0.001`` if this is not the case). The AABB goes from ``-size/2`` to ``size/2``. @@ -327,12 +330,12 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m .. rst-class:: classref-property -:ref:`Texture2D` **texture_albedo** +:ref:`Texture2D` **texture_albedo** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +- |void| **set_texture**\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ type\: :ref:`DecalTexture`\ ) |const| :ref:`Texture2D` with the base :ref:`Color` of the Decal. Either this or the :ref:`texture_emission` must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. @@ -346,12 +349,12 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m .. rst-class:: classref-property -:ref:`Texture2D` **texture_emission** +:ref:`Texture2D` **texture_emission** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +- |void| **set_texture**\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ type\: :ref:`DecalTexture`\ ) |const| :ref:`Texture2D` with the emission :ref:`Color` of the Decal. Either this or the :ref:`texture_albedo` must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. @@ -365,12 +368,12 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m .. rst-class:: classref-property -:ref:`Texture2D` **texture_normal** +:ref:`Texture2D` **texture_normal** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +- |void| **set_texture**\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ type\: :ref:`DecalTexture`\ ) |const| :ref:`Texture2D` with the per-pixel normal map for the decal. Use this to add extra detail to decals. @@ -386,12 +389,12 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m .. rst-class:: classref-property -:ref:`Texture2D` **texture_orm** +:ref:`Texture2D` **texture_orm** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** -- :ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +- |void| **set_texture**\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ type\: :ref:`DecalTexture`\ ) |const| :ref:`Texture2D` storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals. @@ -407,12 +410,12 @@ Sets the size of the :ref:`AABB` used by the decal. All dimensions m .. rst-class:: classref-property -:ref:`float` **upper_fade** = ``0.3`` +:ref:`float` **upper_fade** = ``0.3`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_upper_fade** **(** :ref:`float` value **)** -- :ref:`float` **get_upper_fade** **(** **)** +- |void| **set_upper_fade**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_upper_fade**\ (\ ) Sets the curve over which the decal will fade as the surface gets further from the center of the :ref:`AABB`. Only positive values are valid (negative values will be clamped to ``0.0``). See also :ref:`lower_fade`. @@ -429,7 +432,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Texture2D` **get_texture** **(** :ref:`DecalTexture` type **)** |const| +:ref:`Texture2D` **get_texture**\ (\ type\: :ref:`DecalTexture`\ ) |const| :ref:`🔗` Returns the :ref:`Texture2D` associated with the specified :ref:`DecalTexture`. This is a convenience method, in most cases you should access the texture directly. @@ -462,7 +465,7 @@ One case where this is better than accessing the texture directly is when you wa .. rst-class:: classref-method -void **set_texture** **(** :ref:`DecalTexture` type, :ref:`Texture2D` texture **)** +|void| **set_texture**\ (\ type\: :ref:`DecalTexture`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` Sets the :ref:`Texture2D` associated with the specified :ref:`DecalTexture`. This is a convenience method, in most cases you should access the texture directly. @@ -494,3 +497,4 @@ One case where this is better than accessing the texture directly is when you wa .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 75bf7da415a..12dbf7269bf 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -200,9 +200,9 @@ Tutorials - `GDScript basics: Dictionary <../tutorials/scripting/gdscript/gdscript_basics.html#dictionary>`__ -- `3D Voxel Demo `__ +- `3D Voxel Demo `__ -- `OS Test Demo `__ +- `Operating System Testing Demo `__ .. rst-class:: classref-reftable-group @@ -212,11 +212,11 @@ Constructors .. table:: :widths: auto - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`Dictionary` **(** **)** | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`Dictionary` **(** :ref:`Dictionary` from **)** | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`Dictionary`\ (\ from\: :ref:`Dictionary`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -226,37 +226,43 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`duplicate` **(** :ref:`bool` deep=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`erase` **(** :ref:`Variant` key **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`find_key` **(** :ref:`Variant` value **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get` **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has` **(** :ref:`Variant` key **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_all` **(** :ref:`Array` keys **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`hash` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_empty` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_read_only` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`keys` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_read_only` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`merge` **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`size` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`values` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`duplicate`\ (\ deep\: :ref:`bool` = false\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`erase`\ (\ key\: :ref:`Variant`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`find_key`\ (\ value\: :ref:`Variant`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get`\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_or_add`\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has`\ (\ key\: :ref:`Variant`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_all`\ (\ keys\: :ref:`Array`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`hash`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_empty`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_read_only`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`keys`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_read_only`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge`\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`merged`\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`recursive_equal`\ (\ dictionary\: :ref:`Dictionary`, recursion_count\: :ref:`int`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`size`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`values`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -266,13 +272,13 @@ Operators .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator !=` **(** :ref:`Dictionary` right **)** | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`operator ==` **(** :ref:`Dictionary` right **)** | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`operator []` **(** :ref:`Variant` key **)** | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator !=`\ (\ right\: :ref:`Dictionary`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`operator ==`\ (\ right\: :ref:`Dictionary`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`operator []`\ (\ key\: :ref:`Variant`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -287,7 +293,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Dictionary` **Dictionary** **(** **)** +:ref:`Dictionary` **Dictionary**\ (\ ) :ref:`🔗` Constructs an empty **Dictionary**. @@ -297,7 +303,7 @@ Constructs an empty **Dictionary**. .. rst-class:: classref-constructor -:ref:`Dictionary` **Dictionary** **(** :ref:`Dictionary` from **)** +:ref:`Dictionary` **Dictionary**\ (\ from\: :ref:`Dictionary`\ ) Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate`. @@ -314,7 +320,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗` Clears the dictionary, removing all entries from it. @@ -326,7 +332,7 @@ Clears the dictionary, removing all entries from it. .. rst-class:: classref-method -:ref:`Dictionary` **duplicate** **(** :ref:`bool` deep=false **)** |const| +:ref:`Dictionary` **duplicate**\ (\ deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` Creates and returns a new copy of the dictionary. If ``deep`` is ``true``, inner **Dictionary** and :ref:`Array` keys and values are also copied, recursively. @@ -338,7 +344,7 @@ Creates and returns a new copy of the dictionary. If ``deep`` is ``true``, inner .. rst-class:: classref-method -:ref:`bool` **erase** **(** :ref:`Variant` key **)** +:ref:`bool` **erase**\ (\ key\: :ref:`Variant`\ ) :ref:`🔗` Removes the dictionary entry by key, if it exists. Returns ``true`` if the given ``key`` existed in the dictionary, otherwise ``false``. @@ -352,7 +358,7 @@ Removes the dictionary entry by key, if it exists. Returns ``true`` if the given .. rst-class:: classref-method -:ref:`Variant` **find_key** **(** :ref:`Variant` value **)** |const| +:ref:`Variant` **find_key**\ (\ value\: :ref:`Variant`\ ) |const| :ref:`🔗` Finds and returns the first key whose associated value is equal to ``value``, or ``null`` if it is not found. @@ -366,7 +372,7 @@ Finds and returns the first key whose associated value is equal to ``value``, or .. rst-class:: classref-method -:ref:`Variant` **get** **(** :ref:`Variant` key, :ref:`Variant` default=null **)** |const| +:ref:`Variant` **get**\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) |const| :ref:`🔗` Returns the corresponding value for the given ``key`` in the dictionary. If the ``key`` does not exist, returns ``default``, or ``null`` if the parameter is omitted. @@ -374,11 +380,23 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the ---- +.. _class_Dictionary_method_get_or_add: + +.. rst-class:: classref-method + +:ref:`Variant` **get_or_add**\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) :ref:`🔗` + +Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get`. Otherwise, the ``default`` value is inserted into the dictionary and returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_Dictionary_method_has: .. rst-class:: classref-method -:ref:`bool` **has** **(** :ref:`Variant` key **)** |const| +:ref:`bool` **has**\ (\ key\: :ref:`Variant`\ ) |const| :ref:`🔗` Returns ``true`` if the dictionary contains an entry with the given ``key``. @@ -427,7 +445,7 @@ In GDScript, this is equivalent to the ``in`` operator: .. rst-class:: classref-method -:ref:`bool` **has_all** **(** :ref:`Array` keys **)** |const| +:ref:`bool` **has_all**\ (\ keys\: :ref:`Array`\ ) |const| :ref:`🔗` Returns ``true`` if the dictionary contains all keys in the given ``keys`` array. @@ -444,7 +462,7 @@ Returns ``true`` if the dictionary contains all keys in the given ``keys`` array .. rst-class:: classref-method -:ref:`int` **hash** **(** **)** |const| +:ref:`int` **hash**\ (\ ) |const| :ref:`🔗` Returns a hashed 32-bit integer value representing the dictionary contents. @@ -470,7 +488,7 @@ Returns a hashed 32-bit integer value representing the dictionary contents. \ **Note:** Dictionaries with the same entries but in a different order will not have the same hash. -\ **Note:** Dictionaries with equal hash values are *not* guaranteed to be the same, because of hash collisions. On the countrary, dictionaries with different hash values are guaranteed to be different. +\ **Note:** Dictionaries with equal hash values are *not* guaranteed to be the same, because of hash collisions. On the contrary, dictionaries with different hash values are guaranteed to be different. .. rst-class:: classref-item-separator @@ -480,7 +498,7 @@ Returns a hashed 32-bit integer value representing the dictionary contents. .. rst-class:: classref-method -:ref:`bool` **is_empty** **(** **)** |const| +:ref:`bool` **is_empty**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size`. @@ -492,7 +510,7 @@ Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:` .. rst-class:: classref-method -:ref:`bool` **is_read_only** **(** **)** |const| +:ref:`bool` **is_read_only**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only`. Dictionaries are automatically read-only if declared with ``const`` keyword. @@ -504,7 +522,7 @@ Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only` **keys** **(** **)** |const| +:ref:`Array` **keys**\ (\ ) |const| :ref:`🔗` Returns the list of keys in the dictionary. @@ -516,7 +534,7 @@ Returns the list of keys in the dictionary. .. rst-class:: classref-method -void **make_read_only** **(** **)** +|void| **make_read_only**\ (\ ) :ref:`🔗` Makes the dictionary read-only, i.e. disables modification of the dictionary's contents. Does not apply to nested content, e.g. content of nested dictionaries. @@ -528,10 +546,89 @@ Makes the dictionary read-only, i.e. disables modification of the dictionary's c .. rst-class:: classref-method -void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** +|void| **merge**\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) :ref:`🔗` Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. + +.. tabs:: + + .. code-tab:: gdscript + + var dict = { "item": "sword", "quantity": 2 } + var other_dict = { "quantity": 15, "color": "silver" } + + # Overwriting of existing keys is disabled by default. + dict.merge(other_dict) + print(dict) # { "item": "sword", "quantity": 2, "color": "silver" } + + # With overwriting of existing keys enabled. + dict.merge(other_dict, true) + print(dict) # { "item": "sword", "quantity": 15, "color": "silver" } + + .. code-tab:: csharp + + var dict = new Godot.Collections.Dictionary + { + ["item"] = "sword", + ["quantity"] = 2, + }; + + var otherDict = new Godot.Collections.Dictionary + { + ["quantity"] = 15, + ["color"] = "silver", + }; + + // Overwriting of existing keys is disabled by default. + dict.Merge(otherDict); + GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" } + + // With overwriting of existing keys enabled. + dict.Merge(otherDict, true); + GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" } + + + +\ **Note:** :ref:`merge` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_merged: + +.. rst-class:: classref-method + +:ref:`Dictionary` **merged**\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) |const| :ref:`🔗` + +Returns a copy of this dictionary merged with the other ``dictionary``. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. See also :ref:`merge`. + +This method is useful for quickly making dictionaries with default values: + +:: + + var base = { "fruit": "apple", "vegetable": "potato" } + var extra = { "fruit": "orange", "dressing": "vinegar" } + # Prints { "fruit": "orange", "vegetable": "potato", "dressing": "vinegar" } + print(extra.merged(base)) + # Prints { "fruit": "apple", "vegetable": "potato", "dressing": "vinegar" } + print(extra.merged(base, true)) + +See also :ref:`merge`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_recursive_equal: + +.. rst-class:: classref-method + +:ref:`bool` **recursive_equal**\ (\ dictionary\: :ref:`Dictionary`, recursion_count\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the two dictionaries contain the same keys and values, inner **Dictionary** and :ref:`Array` keys and values are compared recursively. + .. rst-class:: classref-item-separator ---- @@ -540,7 +637,7 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys .. rst-class:: classref-method -:ref:`int` **size** **(** **)** |const| +:ref:`int` **size**\ (\ ) |const| :ref:`🔗` Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty`. @@ -552,7 +649,7 @@ Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) al .. rst-class:: classref-method -:ref:`Array` **values** **(** **)** |const| +:ref:`Array` **values**\ (\ ) |const| :ref:`🔗` Returns the list of values in this dictionary. @@ -569,7 +666,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool` **operator !=** **(** :ref:`Dictionary` right **)** +:ref:`bool` **operator !=**\ (\ right\: :ref:`Dictionary`\ ) :ref:`🔗` Returns ``true`` if the two dictionaries do not contain the same keys and values. @@ -581,7 +678,7 @@ Returns ``true`` if the two dictionaries do not contain the same keys and values .. rst-class:: classref-operator -:ref:`bool` **operator ==** **(** :ref:`Dictionary` right **)** +:ref:`bool` **operator ==**\ (\ right\: :ref:`Dictionary`\ ) :ref:`🔗` Returns ``true`` if the two dictionaries contain the same keys and values. The order of the entries does not matter. @@ -595,7 +692,7 @@ Returns ``true`` if the two dictionaries contain the same keys and values. The o .. rst-class:: classref-operator -:ref:`Variant` **operator []** **(** :ref:`Variant` key **)** +:ref:`Variant` **operator []**\ (\ key\: :ref:`Variant`\ ) :ref:`🔗` Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get` or :ref:`has`. @@ -606,3 +703,4 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index 5fff951cf2e..dbbf6e29252 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: directory, path, folder + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -115,65 +118,73 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`change_dir` **(** :ref:`String` to_dir **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`copy` **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`copy_absolute` **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`current_is_dir` **(** **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dir_exists` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dir_exists_absolute` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`file_exists` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_dir` **(** :ref:`bool` include_drive=true **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_current_drive` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_directories` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_directories_at` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_drive_count` **(** **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_drive_name` **(** :ref:`int` idx **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_files` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_files_at` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_next` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`get_open_error` **(** **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_space_left` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`list_dir_begin` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`list_dir_end` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`make_dir` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`make_dir_absolute` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`make_dir_recursive` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`make_dir_recursive_absolute` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`DirAccess` | :ref:`open` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`remove` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`remove_absolute` **(** :ref:`String` path **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`rename` **(** :ref:`String` from, :ref:`String` to **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`rename_absolute` **(** :ref:`String` from, :ref:`String` to **)** |static| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`change_dir`\ (\ to_dir\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`copy`\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`copy_absolute`\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`create_link`\ (\ source\: :ref:`String`, target\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`current_is_dir`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dir_exists`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dir_exists_absolute`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`file_exists`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_dir`\ (\ include_drive\: :ref:`bool` = true\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_current_drive`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_directories`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_directories_at`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_drive_count`\ (\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_drive_name`\ (\ idx\: :ref:`int`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_files`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_files_at`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_next`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`get_open_error`\ (\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_space_left`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_case_sensitive`\ (\ path\: :ref:`String`\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_link`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`list_dir_begin`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`list_dir_end`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`make_dir`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`make_dir_absolute`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`make_dir_recursive`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`make_dir_recursive_absolute`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`DirAccess` | :ref:`open`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`read_link`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`remove`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`remove_absolute`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`rename`\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`rename_absolute`\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -188,12 +199,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **include_hidden** +:ref:`bool` **include_hidden** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_include_hidden** **(** :ref:`bool` value **)** -- :ref:`bool` **get_include_hidden** **(** **)** +- |void| **set_include_hidden**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_include_hidden**\ (\ ) If ``true``, hidden files are included when navigating the directory. @@ -207,12 +218,12 @@ Affects :ref:`list_dir_begin`, :ref:`get_ .. rst-class:: classref-property -:ref:`bool` **include_navigational** +:ref:`bool` **include_navigational** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_include_navigational** **(** :ref:`bool` value **)** -- :ref:`bool` **get_include_navigational** **(** **)** +- |void| **set_include_navigational**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_include_navigational**\ (\ ) If ``true``, ``.`` and ``..`` are included when navigating the directory. @@ -231,12 +242,14 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **change_dir** **(** :ref:`String` to_dir **)** +:ref:`Error` **change_dir**\ (\ to_dir\: :ref:`String`\ ) :ref:`🔗` Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. ``newdir`` or ``../newdir``), or an absolute path (e.g. ``/tmp/newdir`` or ``res://somedir/newdir``). Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). +\ **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside ``res://``, you can't change it to ``user://`` directory. If you need to open a directory in another access scope, use :ref:`open` to create a new instance instead. + .. rst-class:: classref-item-separator ---- @@ -245,7 +258,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **copy** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** +:ref:`Error` **copy**\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) :ref:`🔗` Copies the ``from`` file to the ``to`` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. @@ -261,7 +274,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **copy_absolute** **(** :ref:`String` from, :ref:`String` to, :ref:`int` chmod_flags=-1 **)** |static| +:ref:`Error` **copy_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) |static| :ref:`🔗` Static version of :ref:`copy`. Supports only absolute paths. @@ -269,11 +282,27 @@ Static version of :ref:`copy`. Supports only absolu ---- +.. _class_DirAccess_method_create_link: + +.. rst-class:: classref-method + +:ref:`Error` **create_link**\ (\ source\: :ref:`String`, target\: :ref:`String`\ ) :ref:`🔗` + +Creates symbolic link between files or folders. + +\ **Note:** On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled. + +\ **Note:** This method is implemented on macOS, Linux, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_current_is_dir: .. rst-class:: classref-method -:ref:`bool` **current_is_dir** **(** **)** |const| +:ref:`bool` **current_is_dir**\ (\ ) |const| :ref:`🔗` Returns whether the current item processed with the last :ref:`get_next` call is a directory (``.`` and ``..`` are considered directories). @@ -285,7 +314,7 @@ Returns whether the current item processed with the last :ref:`get_next` **dir_exists** **(** :ref:`String` path **)** +:ref:`bool` **dir_exists**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. @@ -297,7 +326,7 @@ Returns whether the target directory exists. The argument can be relative to the .. rst-class:: classref-method -:ref:`bool` **dir_exists_absolute** **(** :ref:`String` path **)** |static| +:ref:`bool` **dir_exists_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Static version of :ref:`dir_exists`. Supports only absolute paths. @@ -309,7 +338,7 @@ Static version of :ref:`dir_exists`. Supports .. rst-class:: classref-method -:ref:`bool` **file_exists** **(** :ref:`String` path **)** +:ref:`bool` **file_exists**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. @@ -323,7 +352,7 @@ For a static equivalent, use :ref:`FileAccess.file_exists` **get_current_dir** **(** :ref:`bool` include_drive=true **)** |const| +:ref:`String` **get_current_dir**\ (\ include_drive\: :ref:`bool` = true\ ) |const| :ref:`🔗` Returns the absolute path to the currently opened directory (e.g. ``res://folder`` or ``C:\tmp\folder``). @@ -335,7 +364,7 @@ Returns the absolute path to the currently opened directory (e.g. ``res://folder .. rst-class:: classref-method -:ref:`int` **get_current_drive** **(** **)** +:ref:`int` **get_current_drive**\ (\ ) :ref:`🔗` Returns the currently opened directory's drive index. See :ref:`get_drive_name` to convert returned index to the name of the drive. @@ -347,7 +376,7 @@ Returns the currently opened directory's drive index. See :ref:`get_drive_name` **get_directories** **(** **)** +:ref:`PackedStringArray` **get_directories**\ (\ ) :ref:`🔗` Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files. The array is sorted alphabetically. @@ -361,7 +390,7 @@ Affected by :ref:`include_hidden` and : .. rst-class:: classref-method -:ref:`PackedStringArray` **get_directories_at** **(** :ref:`String` path **)** |static| +:ref:`PackedStringArray` **get_directories_at**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files, at the given ``path``. The array is sorted alphabetically. @@ -375,7 +404,7 @@ Use :ref:`get_directories` if you want m .. rst-class:: classref-method -:ref:`int` **get_drive_count** **(** **)** |static| +:ref:`int` **get_drive_count**\ (\ ) |static| :ref:`🔗` On Windows, returns the number of drives (partitions) mounted on the current filesystem. @@ -393,7 +422,7 @@ On other platforms, the method returns 0. .. rst-class:: classref-method -:ref:`String` **get_drive_name** **(** :ref:`int` idx **)** |static| +:ref:`String` **get_drive_name**\ (\ idx\: :ref:`int`\ ) |static| :ref:`🔗` On Windows, returns the name of the drive (partition) passed as an argument (e.g. ``C:``). @@ -411,7 +440,7 @@ On other platforms, or if the requested drive does not exist, the method returns .. rst-class:: classref-method -:ref:`PackedStringArray` **get_files** **(** **)** +:ref:`PackedStringArray` **get_files**\ (\ ) :ref:`🔗` Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories. The array is sorted alphabetically. @@ -427,7 +456,7 @@ Affected by :ref:`include_hidden`. .. rst-class:: classref-method -:ref:`PackedStringArray` **get_files_at** **(** :ref:`String` path **)** |static| +:ref:`PackedStringArray` **get_files_at**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories, at the given ``path``. The array is sorted alphabetically. @@ -441,7 +470,7 @@ Use :ref:`get_files` if you want more control .. rst-class:: classref-method -:ref:`String` **get_next** **(** **)** +:ref:`String` **get_next**\ (\ ) :ref:`🔗` Returns the next element (file or directory) in the current directory. @@ -455,7 +484,7 @@ The name of the file or directory is returned (and not its full path). Once the .. rst-class:: classref-method -:ref:`Error` **get_open_error** **(** **)** |static| +:ref:`Error` **get_open_error**\ (\ ) |static| :ref:`🔗` Returns the result of the last :ref:`open` call in the current thread. @@ -467,7 +496,7 @@ Returns the result of the last :ref:`open` call in .. rst-class:: classref-method -:ref:`int` **get_space_left** **(** **)** +:ref:`int` **get_space_left**\ (\ ) :ref:`🔗` Returns the available space on the current directory's disk, in bytes. Returns ``0`` if the platform-specific method to query the available space fails. @@ -475,11 +504,39 @@ Returns the available space on the current directory's disk, in bytes. Returns ` ---- +.. _class_DirAccess_method_is_case_sensitive: + +.. rst-class:: classref-method + +:ref:`bool` **is_case_sensitive**\ (\ path\: :ref:`String`\ ) |const| :ref:`🔗` + +Returns ``true`` if the file system or directory use case sensitive file names. + +\ **Note:** This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DirAccess_method_is_link: + +.. rst-class:: classref-method + +:ref:`bool` **is_link**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Returns ``true`` if the file or directory is a symbolic link, directory junction, or other reparse point. + +\ **Note:** This method is implemented on macOS, Linux, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_list_dir_begin: .. rst-class:: classref-method -:ref:`Error` **list_dir_begin** **(** **)** +:ref:`Error` **list_dir_begin**\ (\ ) :ref:`🔗` Initializes the stream used to list all files and directories using the :ref:`get_next` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. @@ -495,7 +552,7 @@ Affected by :ref:`include_hidden` and : .. rst-class:: classref-method -void **list_dir_end** **(** **)** +|void| **list_dir_end**\ (\ ) :ref:`🔗` Closes the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` does not matter). @@ -507,7 +564,7 @@ Closes the current stream opened with :ref:`list_dir_begin` **make_dir** **(** :ref:`String` path **)** +:ref:`Error` **make_dir**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). @@ -521,7 +578,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **make_dir_absolute** **(** :ref:`String` path **)** |static| +:ref:`Error` **make_dir_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Static version of :ref:`make_dir`. Supports only absolute paths. @@ -533,7 +590,7 @@ Static version of :ref:`make_dir`. Supports onl .. rst-class:: classref-method -:ref:`Error` **make_dir_recursive** **(** :ref:`String` path **)** +:ref:`Error` **make_dir_recursive**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. @@ -547,7 +604,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **make_dir_recursive_absolute** **(** :ref:`String` path **)** |static| +:ref:`Error` **make_dir_recursive_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Static version of :ref:`make_dir_recursive`. Supports only absolute paths. @@ -559,7 +616,7 @@ Static version of :ref:`make_dir_recursive` **open** **(** :ref:`String` path **)** |static| +:ref:`DirAccess` **open**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Creates a new **DirAccess** object and opens an existing directory of the filesystem. The ``path`` argument can be within the project tree (``res://folder``), the user directory (``user://folder``) or an absolute path of the user filesystem (e.g. ``/tmp/folder`` or ``C:\tmp\folder``). @@ -569,11 +626,25 @@ Returns ``null`` if opening the directory failed. You can use :ref:`get_open_err ---- +.. _class_DirAccess_method_read_link: + +.. rst-class:: classref-method + +:ref:`String` **read_link**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Returns target of the symbolic link. + +\ **Note:** This method is implemented on macOS, Linux, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_remove: .. rst-class:: classref-method -:ref:`Error` **remove** **(** :ref:`String` path **)** +:ref:`Error` **remove**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. @@ -589,7 +660,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **remove_absolute** **(** :ref:`String` path **)** |static| +:ref:`Error` **remove_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`🔗` Static version of :ref:`remove`. Supports only absolute paths. @@ -601,7 +672,7 @@ Static version of :ref:`remove`. Supports only ab .. rst-class:: classref-method -:ref:`Error` **rename** **(** :ref:`String` from, :ref:`String` to **)** +:ref:`Error` **rename**\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) :ref:`🔗` Renames (move) the ``from`` file or directory to the ``to`` destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. @@ -615,7 +686,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ .. rst-class:: classref-method -:ref:`Error` **rename_absolute** **(** :ref:`String` from, :ref:`String` to **)** |static| +:ref:`Error` **rename_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) |static| :ref:`🔗` Static version of :ref:`rename`. Supports only absolute paths. @@ -626,3 +697,4 @@ Static version of :ref:`rename`. Supports only ab .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_directionallight2d.rst b/classes/class_directionallight2d.rst index 5d99424c311..cf3a13a4e31 100644 --- a/classes/class_directionallight2d.rst +++ b/classes/class_directionallight2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sun + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -57,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **height** = ``0.0`` +:ref:`float` **height** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float` value **)** -- :ref:`float` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_height**\ (\ ) The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane). @@ -74,12 +77,12 @@ The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to .. rst-class:: classref-property -:ref:`float` **max_distance** = ``10000.0`` +:ref:`float` **max_distance** = ``10000.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_max_distance** **(** :ref:`float` value **)** -- :ref:`float` **get_max_distance** **(** **)** +- |void| **set_max_distance**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_max_distance**\ (\ ) The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). :ref:`Camera2D.zoom` is not taken into account by :ref:`max_distance`, which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point. @@ -90,3 +93,4 @@ The maximum distance from the camera center objects can be before their shadows .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_directionallight3d.rst b/classes/class_directionallight3d.rst index 016497c4430..4417533af2d 100644 --- a/classes/class_directionallight3d.rst +++ b/classes/class_directionallight3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: sun + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -26,7 +29,9 @@ A directional light is a type of :ref:`Light3D` node that models Tutorials --------- -- :doc:`Lights and shadows <../tutorials/3d/lights_and_shadows>` +- :doc:`3D lights and shadows <../tutorials/3d/lights_and_shadows>` + +- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` .. rst-class:: classref-reftable-group @@ -69,7 +74,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ShadowMode**: +enum **ShadowMode**: :ref:`🔗` .. _class_DirectionalLight3D_constant_SHADOW_ORTHOGONAL: @@ -103,7 +108,7 @@ Splits the view frustum in 4 areas, each with its own shadow map. This is the sl .. rst-class:: classref-enumeration -enum **SkyMode**: +enum **SkyMode**: :ref:`🔗` .. _class_DirectionalLight3D_constant_SKY_MODE_LIGHT_AND_SKY: @@ -142,12 +147,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **directional_shadow_blend_splits** = ``false`` +:ref:`bool` **directional_shadow_blend_splits** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_blend_splits** **(** :ref:`bool` value **)** -- :ref:`bool` **is_blend_splits_enabled** **(** **)** +- |void| **set_blend_splits**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_blend_splits_enabled**\ (\ ) If ``true``, shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when :ref:`directional_shadow_mode` is :ref:`SHADOW_ORTHOGONAL`. @@ -159,12 +164,12 @@ If ``true``, shadow detail is sacrificed in exchange for smoother transitions be .. rst-class:: classref-property -:ref:`float` **directional_shadow_fade_start** = ``0.8`` +:ref:`float` **directional_shadow_fade_start** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) Proportion of :ref:`directional_shadow_max_distance` at which point the shadow starts to fade. At :ref:`directional_shadow_max_distance`, the shadow will disappear. The default value is a balance between smooth fading and distant shadow visibility. If the camera moves fast and the :ref:`directional_shadow_max_distance` is low, consider lowering :ref:`directional_shadow_fade_start` below ``0.8`` to make shadow transitions less noticeable. On the other hand, if you tuned :ref:`directional_shadow_max_distance` to cover the entire scene, you can set :ref:`directional_shadow_fade_start` to ``1.0`` to prevent the shadow from fading in the distance (it will suddenly cut off instead). @@ -176,12 +181,12 @@ Proportion of :ref:`directional_shadow_max_distance` **directional_shadow_max_distance** = ``100.0`` +:ref:`float` **directional_shadow_max_distance** = ``100.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). @@ -193,12 +198,12 @@ The maximum distance for shadow splits. Increasing this value will make directio .. rst-class:: classref-property -:ref:`ShadowMode` **directional_shadow_mode** = ``2`` +:ref:`ShadowMode` **directional_shadow_mode** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_shadow_mode** **(** :ref:`ShadowMode` value **)** -- :ref:`ShadowMode` **get_shadow_mode** **(** **)** +- |void| **set_shadow_mode**\ (\ value\: :ref:`ShadowMode`\ ) +- :ref:`ShadowMode` **get_shadow_mode**\ (\ ) The light's shadow rendering algorithm. See :ref:`ShadowMode`. @@ -210,12 +215,12 @@ The light's shadow rendering algorithm. See :ref:`ShadowMode` **directional_shadow_pancake_size** = ``20.0`` +:ref:`float` **directional_shadow_pancake_size** = ``20.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to ``0`` turns off the pancaking effect. @@ -227,12 +232,12 @@ Sets the size of the directional shadow pancake. The pancake offsets the start o .. rst-class:: classref-property -:ref:`float` **directional_shadow_split_1** = ``0.1`` +:ref:`float` **directional_shadow_split_1** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) The distance from camera to shadow split 1. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is :ref:`SHADOW_PARALLEL_2_SPLITS` or :ref:`SHADOW_PARALLEL_4_SPLITS`. @@ -244,12 +249,12 @@ The distance from camera to shadow split 1. Relative to :ref:`directional_shadow .. rst-class:: classref-property -:ref:`float` **directional_shadow_split_2** = ``0.2`` +:ref:`float` **directional_shadow_split_2** = ``0.2`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) The distance from shadow split 1 to split 2. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is :ref:`SHADOW_PARALLEL_4_SPLITS`. @@ -261,12 +266,12 @@ The distance from shadow split 1 to split 2. Relative to :ref:`directional_shado .. rst-class:: classref-property -:ref:`float` **directional_shadow_split_3** = ``0.5`` +:ref:`float` **directional_shadow_split_3** = ``0.5`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float` value **)** -- :ref:`float` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_param**\ (\ ) The distance from shadow split 2 to split 3. Relative to :ref:`directional_shadow_max_distance`. Only used when :ref:`directional_shadow_mode` is :ref:`SHADOW_PARALLEL_4_SPLITS`. @@ -278,12 +283,12 @@ The distance from shadow split 2 to split 3. Relative to :ref:`directional_shado .. rst-class:: classref-property -:ref:`SkyMode` **sky_mode** = ``0`` +:ref:`SkyMode` **sky_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_sky_mode** **(** :ref:`SkyMode` value **)** -- :ref:`SkyMode` **get_sky_mode** **(** **)** +- |void| **set_sky_mode**\ (\ value\: :ref:`SkyMode`\ ) +- :ref:`SkyMode` **get_sky_mode**\ (\ ) Set whether this **DirectionalLight3D** is visible in the sky, in the scene, or both in the sky and in the scene. See :ref:`SkyMode` for options. @@ -294,3 +299,4 @@ Set whether this **DirectionalLight3D** is visible in the sky, in the scene, or .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index e3241fbd925..069dc41ba27 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -31,329 +31,369 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`clipboard_get` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`clipboard_get_primary` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`clipboard_has` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clipboard_set` **(** :ref:`String` clipboard **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clipboard_set_primary` **(** :ref:`String` clipboard_primary **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | :ref:`cursor_get_shape` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cursor_set_custom_image` **(** :ref:`Resource` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cursor_set_shape` **(** :ref:`CursorShape` shape **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`dialog_input_text` **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`dialog_show` **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`enable_for_stealing_focus` **(** :ref:`int` process_id **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`file_dialog_show` **(** :ref:`String` title, :ref:`String` current_directory, :ref:`String` filename, :ref:`bool` show_hidden, :ref:`FileDialogMode` mode, :ref:`PackedStringArray` filters, :ref:`Callable` callback **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_process_and_drop_events` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_accent_color` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2[]` | :ref:`get_display_cutouts` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`get_display_safe_area` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_keyboard_focus_screen` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_name` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_primary_screen` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_screen_count` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_screen_from_rect` **(** :ref:`Rect2` rect **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_swap_cancel_ok` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_window_at_screen_position` **(** :ref:`Vector2i` position **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_window_list` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_radio_check_item` **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_multistate_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_radio_check_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_separator` **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_submenu_item` **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_clear` **(** :ref:`String` menu_root **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`global_menu_get_item_accelerator` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`global_menu_get_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_count` **(** :ref:`String` menu_root **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`global_menu_get_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_indentation_level` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_index_from_tag` **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_index_from_text` **(** :ref:`String` menu_root, :ref:`String` text **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`global_menu_get_item_key_callback` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_max_states` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_state` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`global_menu_get_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_text` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_remove_item` **(** :ref:`String` menu_root, :ref:`int` idx **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_accelerator` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_callback` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_checked` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_indentation_level` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_key_callback` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` key_callback **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_max_states` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_state` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_submenu` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` submenu **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_tag` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_text` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_menu_set_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`ime_get_selection` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ime_get_text` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dark_mode` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dark_mode_supported` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_touchscreen_available` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`keyboard_get_current_layout` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`keyboard_get_keycode_from_physical` **(** :ref:`Key` keycode **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`keyboard_get_label_from_physical` **(** :ref:`Key` keycode **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`keyboard_get_layout_count` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`keyboard_get_layout_language` **(** :ref:`int` index **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`keyboard_get_layout_name` **(** :ref:`int` index **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`keyboard_set_current_layout` **(** :ref:`int` index **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`MouseButtonMask`\> | :ref:`mouse_get_button_state` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MouseMode` | :ref:`mouse_get_mode` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`mouse_get_position` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mouse_set_mode` **(** :ref:`MouseMode` mouse_mode **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`process_events` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`screen_get_dpi` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`screen_get_image` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`screen_get_pixel` **(** :ref:`Vector2i` position **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`screen_get_position` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_refresh_rate` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_scale` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`screen_get_size` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`screen_get_usable_rect` **(** :ref:`int` screen=-1 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`screen_is_kept_on` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`screen_set_keep_on` **(** :ref:`bool` enable **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`screen_set_orientation` **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon` **(** :ref:`Image` image **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_native_icon` **(** :ref:`String` filename **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tablet_get_current_driver` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`tablet_get_driver_count` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tablet_get_driver_name` **(** :ref:`int` idx **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tablet_set_current_driver` **(** :ref:`String` name **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`tts_get_voices` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language` **(** :ref:`String` language **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`tts_is_paused` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`tts_is_speaking` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tts_pause` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tts_resume` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tts_set_utterance_callback` **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tts_speak` **(** :ref:`String` text, :ref:`String` voice, :ref:`int` volume=50, :ref:`float` pitch=1.0, :ref:`float` rate=1.0, :ref:`int` utterance_id=0, :ref:`bool` interrupt=false **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tts_stop` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`virtual_keyboard_get_height` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`virtual_keyboard_hide` **(** **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`virtual_keyboard_show` **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`VirtualKeyboardType` type=0, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`warp_mouse` **(** :ref:`Vector2i` position **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_can_draw` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_active_popup` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_attached_instance_id` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_current_screen` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_get_flag` **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_max_size` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_min_size` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WindowMode` | :ref:`window_get_mode` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_native_handle` **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`window_get_popup_safe_rect` **(** :ref:`int` window **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_position` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_position_with_decorations` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i` | :ref:`window_get_safe_title_margins` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_size` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_size_with_decorations` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_is_focused` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_is_maximize_allowed` **(** :ref:`int` window_id=0 **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_maximize_on_title_dbl_click` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_minimize_on_title_dbl_click` **(** **)** |const| | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_move_to_foreground` **(** :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_request_attention` **(** :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_current_screen` **(** :ref:`int` screen, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_drop_files_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_exclusive` **(** :ref:`int` window_id, :ref:`bool` exclusive **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_flag` **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_ime_active` **(** :ref:`bool` active, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_ime_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_input_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_input_text_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_max_size` **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_min_size` **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_mode` **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_mouse_passthrough` **(** :ref:`PackedVector2Array` region, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_popup_safe_rect` **(** :ref:`int` window, :ref:`Rect2i` rect **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_position` **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_rect_changed_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_size` **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_title` **(** :ref:`String` title, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_transient` **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_vsync_mode` **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_window_buttons_offset` **(** :ref:`Vector2i` offset, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`window_set_window_event_callback` **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** | - +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`clipboard_get`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`clipboard_get_image`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`clipboard_get_primary`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clipboard_has`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clipboard_has_image`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clipboard_set`\ (\ clipboard\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clipboard_set_primary`\ (\ clipboard_primary\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_status_indicator`\ (\ icon\: :ref:`Texture2D`, tooltip\: :ref:`String`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`cursor_get_shape`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cursor_set_custom_image`\ (\ cursor\: :ref:`Resource`, shape\: :ref:`CursorShape` = 0, hotspot\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cursor_set_shape`\ (\ shape\: :ref:`CursorShape`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_status_indicator`\ (\ id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dialog_input_text`\ (\ title\: :ref:`String`, description\: :ref:`String`, existing_text\: :ref:`String`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dialog_show`\ (\ title\: :ref:`String`, description\: :ref:`String`, buttons\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`enable_for_stealing_focus`\ (\ process_id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`file_dialog_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`file_dialog_with_options_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_process_and_drop_events`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_accent_color`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_base_color`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Rect2`\] | :ref:`get_display_cutouts`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_display_safe_area`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_keyboard_focus_screen`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_primary_screen`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_screen_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_screen_from_rect`\ (\ rect\: :ref:`Rect2`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_swap_cancel_ok`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_window_at_screen_position`\ (\ position\: :ref:`Vector2i`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_window_list`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_radio_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_multistate_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, max_states\: :ref:`int`, default_state\: :ref:`int`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_radio_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_separator`\ (\ menu_root\: :ref:`String`, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_submenu_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, submenu\: :ref:`String`, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_clear`\ (\ menu_root\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`global_menu_get_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`global_menu_get_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_count`\ (\ menu_root\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`global_menu_get_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_index_from_tag`\ (\ menu_root\: :ref:`String`, tag\: :ref:`Variant`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_index_from_text`\ (\ menu_root\: :ref:`String`, text\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`global_menu_get_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`global_menu_get_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`global_menu_get_system_menu_roots`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_remove_item`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, keycode\: :ref:`Key`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checked\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, hidden\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_hover_callbacks`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, level\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, key_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, max_states\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, state\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, submenu\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tag\: :ref:`Variant`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, text\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_popup_callbacks`\ (\ menu_root\: :ref:`String`, open_callback\: :ref:`Callable`, close_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`help_set_search_callbacks`\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`ime_get_selection`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ime_get_text`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dark_mode`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dark_mode_supported`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_touchscreen_available`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_window_transparency_available`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`keyboard_get_current_layout`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`keyboard_get_keycode_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`keyboard_get_label_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`keyboard_get_layout_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keyboard_get_layout_language`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keyboard_get_layout_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`keyboard_set_current_layout`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`MouseButtonMask`\] | :ref:`mouse_get_button_state`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MouseMode` | :ref:`mouse_get_mode`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`mouse_get_position`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mouse_set_mode`\ (\ mouse_mode\: :ref:`MouseMode`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`process_events`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`screen_get_dpi`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_max_scale`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScreenOrientation` | :ref:`screen_get_orientation`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`screen_get_pixel`\ (\ position\: :ref:`Vector2i`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`screen_get_position`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_refresh_rate`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_scale`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`screen_get_size`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`screen_get_usable_rect`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen_is_kept_on`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`screen_set_keep_on`\ (\ enable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`screen_set_orientation`\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon`\ (\ image\: :ref:`Image`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_native_icon`\ (\ filename\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_system_theme_change_callback`\ (\ callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`status_indicator_get_rect`\ (\ id\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_callback`\ (\ id\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_icon`\ (\ id\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_menu`\ (\ id\: :ref:`int`, menu_rid\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_tooltip`\ (\ id\: :ref:`int`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tablet_get_current_driver`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`tablet_get_driver_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tablet_get_driver_name`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tablet_set_current_driver`\ (\ name\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`tts_get_voices`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language`\ (\ language\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tts_is_paused`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tts_is_speaking`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_pause`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_resume`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_set_utterance_callback`\ (\ event\: :ref:`TTSUtteranceEvent`, callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_speak`\ (\ text\: :ref:`String`, voice\: :ref:`String`, volume\: :ref:`int` = 50, pitch\: :ref:`float` = 1.0, rate\: :ref:`float` = 1.0, utterance_id\: :ref:`int` = 0, interrupt\: :ref:`bool` = false\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_stop`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`virtual_keyboard_get_height`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`virtual_keyboard_hide`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`virtual_keyboard_show`\ (\ existing_text\: :ref:`String`, position\: :ref:`Rect2` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType` = 0, max_length\: :ref:`int` = -1, cursor_start\: :ref:`int` = -1, cursor_end\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`warp_mouse`\ (\ position\: :ref:`Vector2i`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_can_draw`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_active_popup`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_attached_instance_id`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_current_screen`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_get_flag`\ (\ flag\: :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_max_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_min_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WindowMode` | :ref:`window_get_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_native_handle`\ (\ handle_type\: :ref:`HandleType`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`window_get_popup_safe_rect`\ (\ window\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_position`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_position_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`window_get_safe_title_margins`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_size_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_title_size`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VSyncMode` | :ref:`window_get_vsync_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_is_focused`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_is_maximize_allowed`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_maximize_on_title_dbl_click`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_minimize_on_title_dbl_click`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_move_to_foreground`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_request_attention`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_current_screen`\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_drop_files_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_exclusive`\ (\ window_id\: :ref:`int`, exclusive\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_flag`\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_ime_active`\ (\ active\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_ime_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_input_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_input_text_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_max_size`\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_min_size`\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_mode`\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_mouse_passthrough`\ (\ region\: :ref:`PackedVector2Array`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_popup_safe_rect`\ (\ window\: :ref:`int`, rect\: :ref:`Rect2i`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_rect_changed_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_size`\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_title`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_transient`\ (\ window_id\: :ref:`int`, parent_window_id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_vsync_mode`\ (\ vsync_mode\: :ref:`VSyncMode`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_window_buttons_offset`\ (\ offset\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_window_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -368,7 +408,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Feature**: +enum **Feature**: :ref:`🔗` .. _class_DisplayServer_constant_FEATURE_GLOBAL_MENU: @@ -376,6 +416,8 @@ enum **Feature**: :ref:`Feature` **FEATURE_GLOBAL_MENU** = ``0`` +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS** .. _class_DisplayServer_constant_FEATURE_SUBWINDOWS: @@ -400,7 +442,7 @@ Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, :ref:`Feature` **FEATURE_MOUSE** = ``3`` -Display server supports mouse input. **Windows, macOS, Linux (X11), Android, Web** +Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web** .. _class_DisplayServer_constant_FEATURE_MOUSE_WARP: @@ -408,7 +450,7 @@ Display server supports mouse input. **Windows, macOS, Linux (X11), Android, Web :ref:`Feature` **FEATURE_MOUSE_WARP** = ``4`` -Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. **Windows, macOS, Linux (X11)** +Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. **Windows, macOS, Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_CLIPBOARD: @@ -416,7 +458,7 @@ Display server supports warping mouse coordinates to keep the mouse cursor const :ref:`Feature` **FEATURE_CLIPBOARD** = ``5`` -Display server supports setting and getting clipboard data. See also :ref:`FEATURE_CLIPBOARD_PRIMARY`. **Windows, macOS, Linux (X11), Android, iOS, Web** +Display server supports setting and getting clipboard data. See also :ref:`FEATURE_CLIPBOARD_PRIMARY`. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** .. _class_DisplayServer_constant_FEATURE_VIRTUAL_KEYBOARD: @@ -432,7 +474,7 @@ Display server supports popping up a virtual keyboard when requested to input te :ref:`Feature` **FEATURE_CURSOR_SHAPE** = ``7`` -Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11), Android, Web** +Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web** .. _class_DisplayServer_constant_FEATURE_CUSTOM_CURSOR_SHAPE: @@ -440,7 +482,7 @@ Display server supports setting the mouse cursor shape to be different from the :ref:`Feature` **FEATURE_CUSTOM_CURSOR_SHAPE** = ``8`` -Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11), Web** +Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web** .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG: @@ -448,7 +490,7 @@ Display server supports setting the mouse cursor shape to a custom image. **Wind :ref:`Feature` **FEATURE_NATIVE_DIALOG** = ``9`` -Display server supports spawning dialogs using the operating system's native look-and-feel. **macOS** +Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show`. **Windows, macOS** .. _class_DisplayServer_constant_FEATURE_IME: @@ -464,7 +506,7 @@ Display server supports `Input Method Editor ` **FEATURE_WINDOW_TRANSPARENCY** = ``11`` -Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11)** +Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_HIDPI: @@ -472,7 +514,7 @@ Display server supports windows can use per-pixel transparency to make windows b :ref:`Feature` **FEATURE_HIDPI** = ``12`` -Display server supports querying the operating system's display scale factor. This allows for *reliable* automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, macOS** +Display server supports querying the operating system's display scale factor. This allows for *reliable* automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, Linux (Wayland), macOS** .. _class_DisplayServer_constant_FEATURE_ICON: @@ -504,7 +546,7 @@ Display server supports changing the screen orientation. **Android, iOS** :ref:`Feature` **FEATURE_SWAP_BUFFERS** = ``16`` -Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). **Windows, macOS, Linux (X11)** +Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). **Windows, macOS, Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_CLIPBOARD_PRIMARY: @@ -512,7 +554,7 @@ Display server supports V-Sync status can be changed from the default (which is :ref:`Feature` **FEATURE_CLIPBOARD_PRIMARY** = ``18`` -Display server supports Primary clipboard can be used. This is a different clipboard from :ref:`FEATURE_CLIPBOARD`. **Linux (X11)** +Display server supports Primary clipboard can be used. This is a different clipboard from :ref:`FEATURE_CLIPBOARD`. **Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_TEXT_TO_SPEECH: @@ -520,7 +562,7 @@ Display server supports Primary clipboard can be used. This is a different clipb :ref:`Feature` **FEATURE_TEXT_TO_SPEECH** = ``19`` -Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11), Android, iOS, Web** +Display server supports text-to-speech. See ``tts_*`` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** .. _class_DisplayServer_constant_FEATURE_EXTEND_TO_TITLE: @@ -538,6 +580,38 @@ Display server supports expanding window content to the title. See :ref:`WINDOW_ Display server supports reading screen pixels. See :ref:`screen_get_pixel`. +.. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_STATUS_INDICATOR** = ``22`` + +Display server supports application status indicators. + +.. _class_DisplayServer_constant_FEATURE_NATIVE_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_HELP** = ``23`` + +Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks`. + +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG_INPUT** = ``24`` + +Display server supports spawning text input dialogs using the operating system's native look-and-feel. See :ref:`dialog_input_text`. **Windows, macOS** + +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE** = ``25`` + +Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** + .. rst-class:: classref-item-separator ---- @@ -546,7 +620,7 @@ Display server supports reading screen pixels. See :ref:`screen_get_pixel` .. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE: @@ -598,7 +672,7 @@ Confines the mouse cursor to the game window, and make it hidden. .. rst-class:: classref-enumeration -enum **ScreenOrientation**: +enum **ScreenOrientation**: :ref:`🔗` .. _class_DisplayServer_constant_SCREEN_LANDSCAPE: @@ -664,7 +738,7 @@ Automatic landscape or portrait orientation (default or reverse depending on sen .. rst-class:: classref-enumeration -enum **VirtualKeyboardType**: +enum **VirtualKeyboardType**: :ref:`🔗` .. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: @@ -740,7 +814,7 @@ Virtual keyboard with additional keys to assist with typing URLs. .. rst-class:: classref-enumeration -enum **CursorShape**: +enum **CursorShape**: :ref:`🔗` .. _class_DisplayServer_constant_CURSOR_ARROW: @@ -894,7 +968,7 @@ Represents the size of the :ref:`CursorShape` en .. rst-class:: classref-enumeration -enum **FileDialogMode**: +enum **FileDialogMode**: :ref:`🔗` .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE: @@ -944,7 +1018,7 @@ The native file dialog will warn when a file exists. .. rst-class:: classref-enumeration -enum **WindowMode**: +enum **WindowMode**: :ref:`🔗` .. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED: @@ -978,7 +1052,11 @@ Maximized window mode, i.e. :ref:`Window` will occupy whole screen Full screen mode with full multi-window support. -Full screen window cover the entire display area of a screen, have no border or decorations. Display video mode is not changed. +Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + +\ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` color. + +\ **On macOS:** A new desktop is used to display the running project. \ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. @@ -990,11 +1068,11 @@ Full screen window cover the entire display area of a screen, have no border or A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). -Full screen window cover the entire display area of a screen, have no border or decorations. Display video mode is not changed. +Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. \ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. -\ **On macOS:** Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. +\ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. \ **On Linux (X11):** Exclusive full screen mode bypasses compositor. @@ -1008,7 +1086,7 @@ Full screen window cover the entire display area of a screen, have no border or .. rst-class:: classref-enumeration -enum **WindowFlags**: +enum **WindowFlags**: :ref:`🔗` .. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: @@ -1042,9 +1120,9 @@ The window is floating on top of all other windows. This flag is ignored for ful The window background can be transparent. -\ **Note:** This flag has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed` is set to ``false``. +\ **Note:** This flag has no effect if :ref:`is_window_transparency_available` returns ``false``. -\ **Note:** Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. +\ **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. .. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: @@ -1100,7 +1178,7 @@ Max value of the :ref:`WindowFlags`. .. rst-class:: classref-enumeration -enum **WindowEvent**: +enum **WindowEvent**: :ref:`🔗` .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: @@ -1108,7 +1186,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` -Sent when the mouse pointer enters the window, see :ref:`window_set_window_event_callback`. +Sent when the mouse pointer enters the window. .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: @@ -1116,7 +1194,7 @@ Sent when the mouse pointer enters the window, see :ref:`window_set_window_event :ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` -Sent when the mouse pointer exits the window, see :ref:`window_set_window_event_callback`. +Sent when the mouse pointer exits the window. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: @@ -1124,7 +1202,7 @@ Sent when the mouse pointer exits the window, see :ref:`window_set_window_event_ :ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` -Sent when the window grabs focus, see :ref:`window_set_window_event_callback`. +Sent when the window grabs focus. .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: @@ -1132,7 +1210,7 @@ Sent when the window grabs focus, see :ref:`window_set_window_event_callback` **WINDOW_EVENT_FOCUS_OUT** = ``3`` -Sent when the window loses focus, see :ref:`window_set_window_event_callback`. +Sent when the window loses focus. .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: @@ -1140,7 +1218,7 @@ Sent when the window loses focus, see :ref:`window_set_window_event_callback` **WINDOW_EVENT_CLOSE_REQUEST** = ``4`` -Sent when the user has attempted to close the window (e.g. close button is pressed), see :ref:`window_set_window_event_callback`. +Sent when the user has attempted to close the window (e.g. close button is pressed). .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: @@ -1148,7 +1226,7 @@ Sent when the user has attempted to close the window (e.g. close button is press :ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` -Sent when the device "Back" button is pressed, see :ref:`window_set_window_event_callback`. +Sent when the device "Back" button is pressed. \ **Note:** This event is implemented only on Android. @@ -1158,7 +1236,7 @@ Sent when the device "Back" button is pressed, see :ref:`window_set_window_event :ref:`WindowEvent` **WINDOW_EVENT_DPI_CHANGE** = ``6`` -Sent when the window is moved to the display with different DPI, or display DPI is changed, see :ref:`window_set_window_event_callback`. +Sent when the window is moved to the display with different DPI, or display DPI is changed. \ **Note:** This flag is implemented only on macOS. @@ -1168,7 +1246,7 @@ Sent when the window is moved to the display with different DPI, or display DPI :ref:`WindowEvent` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7`` -Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` is set or window entered/exited full screen mode), see :ref:`window_set_window_event_callback`. +Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` is set or window entered/exited full screen mode). \ **Note:** This flag is implemented only on macOS. @@ -1180,7 +1258,7 @@ Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXT .. rst-class:: classref-enumeration -enum **VSyncMode**: +enum **VSyncMode**: :ref:`🔗` .. _class_DisplayServer_constant_VSYNC_DISABLED: @@ -1188,7 +1266,7 @@ enum **VSyncMode**: :ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` -No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (nonwithstanding :ref:`Engine.max_fps`). +No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). .. _class_DisplayServer_constant_VSYNC_ENABLED: @@ -1196,7 +1274,7 @@ No vertical synchronization, which means the engine will display frames as fast :ref:`VSyncMode` **VSYNC_ENABLED** = ``1`` -Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (nonwithstanding :ref:`Engine.max_fps`). +Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). .. _class_DisplayServer_constant_VSYNC_ADAPTIVE: @@ -1204,7 +1282,7 @@ Default vertical synchronization mode, the image is displayed only on vertical b :ref:`VSyncMode` **VSYNC_ADAPTIVE** = ``2`` -Behaves like :ref:`VSYNC_DISABLED` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (nonwithstanding :ref:`Engine.max_fps`). Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. +Behaves like :ref:`VSYNC_DISABLED` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. .. _class_DisplayServer_constant_VSYNC_MAILBOX: @@ -1212,7 +1290,7 @@ Behaves like :ref:`VSYNC_DISABLED` :ref:`VSyncMode` **VSYNC_MAILBOX** = ``3`` -Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (nonwithstanding :ref:`Engine.max_fps`). +Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). :ref:`VSYNC_MAILBOX` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. @@ -1224,7 +1302,7 @@ Although not guaranteed, the images can be rendered as fast as possible, which m .. rst-class:: classref-enumeration -enum **HandleType**: +enum **HandleType**: :ref:`🔗` .. _class_DisplayServer_constant_DISPLAY_HANDLE: @@ -1278,11 +1356,11 @@ Window view: OpenGL context (only with the GL Compatibility renderer): -- Windows: ``HGLRC`` for the window. +- Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). -- Linux: ``GLXContext*`` for the window. +- Linux (X11): ``GLXContext*`` for the window. -- macOS: ``NSOpenGLContext*`` for the window. +- macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). - Android: ``EGLContext`` for the window. @@ -1294,7 +1372,7 @@ OpenGL context (only with the GL Compatibility renderer): .. rst-class:: classref-enumeration -enum **TTSUtteranceEvent**: +enum **TTSUtteranceEvent**: :ref:`🔗` .. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: @@ -1341,39 +1419,47 @@ Constants .. rst-class:: classref-constant -**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` +**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`🔗` Represents the screen containing the mouse pointer. +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: .. rst-class:: classref-constant -**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` +**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`🔗` Represents the screen containing the window with the keyboard focus. +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + .. _class_DisplayServer_constant_SCREEN_PRIMARY: .. rst-class:: classref-constant -**SCREEN_PRIMARY** = ``-2`` +**SCREEN_PRIMARY** = ``-2`` :ref:`🔗` Represents the primary screen. +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW: .. rst-class:: classref-constant -**SCREEN_OF_MAIN_WINDOW** = ``-1`` +**SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`🔗` Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + .. _class_DisplayServer_constant_MAIN_WINDOW_ID: .. rst-class:: classref-constant -**MAIN_WINDOW_ID** = ``0`` +**MAIN_WINDOW_ID** = ``0`` :ref:`🔗` The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``. @@ -1381,9 +1467,17 @@ The ID of the main window spawned by the engine, which can be passed to methods .. rst-class:: classref-constant -**INVALID_WINDOW_ID** = ``-1`` +**INVALID_WINDOW_ID** = ``-1`` :ref:`🔗` + +The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result. -The ID that refers to a nonexisting window. This is be returned by some **DisplayServer** methods if no window matches the requested result. +.. _class_DisplayServer_constant_INVALID_INDICATOR_ID: + +.. rst-class:: classref-constant + +**INVALID_INDICATOR_ID** = ``-1`` :ref:`🔗` + +The ID that refers to a nonexistent application status indicator. .. rst-class:: classref-section-separator @@ -1398,7 +1492,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String` **clipboard_get** **(** **)** |const| +:ref:`String` **clipboard_get**\ (\ ) |const| :ref:`🔗` Returns the user's clipboard as a string if possible. @@ -1406,15 +1500,27 @@ Returns the user's clipboard as a string if possible. ---- +.. _class_DisplayServer_method_clipboard_get_image: + +.. rst-class:: classref-method + +:ref:`Image` **clipboard_get_image**\ (\ ) |const| :ref:`🔗` + +Returns the user's clipboard as an image if possible. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_clipboard_get_primary: .. rst-class:: classref-method -:ref:`String` **clipboard_get_primary** **(** **)** |const| +:ref:`String` **clipboard_get_primary**\ (\ ) |const| :ref:`🔗` Returns the user's `primary `__ clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing :kbd:`Ctrl + C`. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. -\ **Note:** This method is only implemented on Linux (X11). +\ **Note:** This method is only implemented on Linux (X11/Wayland). .. rst-class:: classref-item-separator @@ -1424,9 +1530,21 @@ Returns the user's `primary ` **clipboard_has** **(** **)** |const| +:ref:`bool` **clipboard_has**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if there is content on the user's clipboard. +Returns ``true`` if there is a text content on the user's clipboard. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_clipboard_has_image: + +.. rst-class:: classref-method + +:ref:`bool` **clipboard_has_image**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if there is an image content on the user's clipboard. .. rst-class:: classref-item-separator @@ -1436,7 +1554,7 @@ Returns ``true`` if there is content on the user's clipboard. .. rst-class:: classref-method -void **clipboard_set** **(** :ref:`String` clipboard **)** +|void| **clipboard_set**\ (\ clipboard\: :ref:`String`\ ) :ref:`🔗` Sets the user's clipboard content to the given string. @@ -1448,11 +1566,25 @@ Sets the user's clipboard content to the given string. .. rst-class:: classref-method -void **clipboard_set_primary** **(** :ref:`String` clipboard_primary **)** +|void| **clipboard_set_primary**\ (\ clipboard_primary\: :ref:`String`\ ) :ref:`🔗` Sets the user's `primary `__ clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing :kbd:`Ctrl + C`. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. -\ **Note:** This method is only implemented on Linux (X11). +\ **Note:** This method is only implemented on Linux (X11/Wayland). + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_create_status_indicator: + +.. rst-class:: classref-method + +:ref:`int` **create_status_indicator**\ (\ icon\: :ref:`Texture2D`, tooltip\: :ref:`String`, callback\: :ref:`Callable`\ ) :ref:`🔗` + +Creates a new application status indicator with the specified icon, tooltip, and activation callback. + +\ ``callback`` should take two arguments: the pressed mouse button (one of the :ref:`MouseButton` constants) and the click position in screen coordinates (a :ref:`Vector2i`). .. rst-class:: classref-item-separator @@ -1462,7 +1594,7 @@ Sets the user's `primary ` **cursor_get_shape** **(** **)** |const| +:ref:`CursorShape` **cursor_get_shape**\ (\ ) |const| :ref:`🔗` Returns the default mouse cursor shape set by :ref:`cursor_set_shape`. @@ -1474,9 +1606,11 @@ Returns the default mouse cursor shape set by :ref:`cursor_set_shape` cursor, :ref:`CursorShape` shape=0, :ref:`Vector2` hotspot=Vector2(0, 0) **)** +|void| **cursor_set_custom_image**\ (\ cursor\: :ref:`Resource`, shape\: :ref:`CursorShape` = 0, hotspot\: :ref:`Vector2` = Vector2(0, 0)\ ) :ref:`🔗` + +Sets a custom mouse cursor image for the given ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. -Sets a custom mouse cursor image for the defined ``shape``. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be ``256x256`` or smaller for correct appearance. ``hotspot`` can optionally be set to define the area where the cursor will click. By default, ``hotspot`` is set to ``Vector2(0, 0)``, which is the top-left corner of the image. See also :ref:`cursor_set_shape`. +\ ``cursor`` can be either a :ref:`Texture2D` or an :ref:`Image`, and it should not be larger than 256×256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape`. .. rst-class:: classref-item-separator @@ -1486,7 +1620,7 @@ Sets a custom mouse cursor image for the defined ``shape``. This means the user' .. rst-class:: classref-method -void **cursor_set_shape** **(** :ref:`CursorShape` shape **)** +|void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape`\ ) :ref:`🔗` Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape` and :ref:`cursor_set_custom_image`. @@ -1494,15 +1628,27 @@ Sets the default mouse cursor shape. The cursor's appearance will vary depending ---- +.. _class_DisplayServer_method_delete_status_indicator: + +.. rst-class:: classref-method + +|void| **delete_status_indicator**\ (\ id\: :ref:`int`\ ) :ref:`🔗` + +Removes the application status indicator. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_dialog_input_text: .. rst-class:: classref-method -:ref:`Error` **dialog_input_text** **(** :ref:`String` title, :ref:`String` description, :ref:`String` existing_text, :ref:`Callable` callback **)** +:ref:`Error` **dialog_input_text**\ (\ title\: :ref:`String`, description\: :ref:`String`, existing_text\: :ref:`String`, callback\: :ref:`Callable`\ ) :ref:`🔗` -Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` will be called with a :ref:`String` argument equal to the text field's contents when the dialog is closed for any reason. +Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`String` parameter which contains the text field's contents. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT` feature. Supported platforms include macOS and Windows. .. rst-class:: classref-item-separator @@ -1512,11 +1658,11 @@ Shows a text input dialog which uses the operating system's native look-and-feel .. rst-class:: classref-method -:ref:`Error` **dialog_show** **(** :ref:`String` title, :ref:`String` description, :ref:`PackedStringArray` buttons, :ref:`Callable` callback **)** +:ref:`Error` **dialog_show**\ (\ title\: :ref:`String`, description\: :ref:`String`, buttons\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) :ref:`🔗` -Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` will be called when the dialog is closed for any reason. +Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`int` parameter which corresponds to the index of the pressed button. -\ **Note:** This method is implemented only on macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include macOS and Windows. .. rst-class:: classref-item-separator @@ -1526,7 +1672,7 @@ Shows a text dialog which uses the operating system's native look-and-feel. ``ca .. rst-class:: classref-method -void **enable_for_stealing_focus** **(** :ref:`int` process_id **)** +|void| **enable_for_stealing_focus**\ (\ process_id\: :ref:`int`\ ) :ref:`🔗` Allows the ``process_id`` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. @@ -1540,15 +1686,53 @@ Allows the ``process_id`` PID to steal focus from this window. In other words, t .. rst-class:: classref-method -:ref:`Error` **file_dialog_show** **(** :ref:`String` title, :ref:`String` current_directory, :ref:`String` filename, :ref:`bool` show_hidden, :ref:`FileDialogMode` mode, :ref:`PackedStringArray` filters, :ref:`Callable` callback **)** +:ref:`Error` **file_dialog_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) :ref:`🔗` Displays OS native dialog for selecting files or directories in the file system. -Callbacks have the following arguments: ``bool status, PackedStringArray selected_paths``. +Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters`. + +Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. + +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + +\ **Note:** ``current_directory`` might be ignored. + +\ **Note:** On Linux, ``show_hidden`` is ignored. + +\ **Note:** On macOS, native file dialogs have no title. + +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_file_dialog_with_options_show: + +.. rst-class:: classref-method + +:ref:`Error` **file_dialog_with_options_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`\ ) :ref:`🔗` + +Displays OS native dialog for selecting files or directories in the file system with additional user selectable options. + +Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters`. + +\ ``options`` is array of :ref:`Dictionary`\ s with the following keys: + +- ``"name"`` - option's name :ref:`String`. + +- ``"values"`` - :ref:`PackedStringArray` of values. If empty, boolean option (check box) is used. -\ **Note:** This method is implemented if the display server has the ``FEATURE_NATIVE_DIALOG`` feature. +- ``"default"`` - default selected option index (:ref:`int`) or default boolean value (:ref:`bool`). -\ **Note:** This method is implemented on macOS. +Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``. + +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + +\ **Note:** ``current_directory`` might be ignored. + +\ **Note:** On Linux (X11), ``show_hidden`` is ignored. \ **Note:** On macOS, native file dialogs have no title. @@ -1562,7 +1746,7 @@ Callbacks have the following arguments: ``bool status, PackedStringArray selecte .. rst-class:: classref-method -void **force_process_and_drop_events** **(** **)** +|void| **force_process_and_drop_events**\ (\ ) :ref:`🔗` Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events`. @@ -1576,7 +1760,7 @@ Forces window manager processing while ignoring all :ref:`InputEvent` **get_accent_color** **(** **)** |const| +:ref:`Color` **get_accent_color**\ (\ ) |const| :ref:`🔗` Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is unknown. @@ -1586,11 +1770,25 @@ Returns OS theme accent color. Returns ``Color(0, 0, 0, 0)``, if accent color is ---- +.. _class_DisplayServer_method_get_base_color: + +.. rst-class:: classref-method + +:ref:`Color` **get_base_color**\ (\ ) |const| :ref:`🔗` + +Returns the OS theme base color (default control background). Returns ``Color(0, 0, 0, 0)`` if the base color is unknown. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_get_display_cutouts: .. rst-class:: classref-method -:ref:`Rect2[]` **get_display_cutouts** **(** **)** |const| +:ref:`Array`\[:ref:`Rect2`\] **get_display_cutouts**\ (\ ) |const| :ref:`🔗` Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area`. @@ -1604,7 +1802,7 @@ Returns an :ref:`Array` of :ref:`Rect2`, each of which .. rst-class:: classref-method -:ref:`Rect2i` **get_display_safe_area** **(** **)** |const| +:ref:`Rect2i` **get_display_safe_area**\ (\ ) |const| :ref:`🔗` Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts`. @@ -1616,7 +1814,7 @@ Returns the unobscured area of the display where interactive controls should be .. rst-class:: classref-method -:ref:`int` **get_keyboard_focus_screen** **(** **)** |const| +:ref:`int` **get_keyboard_focus_screen**\ (\ ) |const| :ref:`🔗` Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. @@ -1628,11 +1826,11 @@ Returns the index of the screen containing the window with the keyboard focus, o .. rst-class:: classref-method -:ref:`String` **get_name** **(** **)** |const| +:ref:`String` **get_name**\ (\ ) |const| :ref:`🔗` -Returns the name of the **DisplayServer** currently in use. Most operating systems only have a single **DisplayServer**, but Linux has access to more than one **DisplayServer** (although only X11 is currently implemented in Godot). +Returns the name of the **DisplayServer** currently in use. Most operating systems only have a single **DisplayServer**, but Linux has access to more than one **DisplayServer** (currently X11 and Wayland). -The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux), ``Android``, ``iOS``, ``web`` (HTML5) and ``headless`` (when started with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`). +The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux), ``Wayland`` (Linux), ``Android``, ``iOS``, ``web`` (HTML5), and ``headless`` (when started with the ``--headless`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`). .. rst-class:: classref-item-separator @@ -1642,7 +1840,7 @@ The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux .. rst-class:: classref-method -:ref:`int` **get_primary_screen** **(** **)** |const| +:ref:`int` **get_primary_screen**\ (\ ) |const| :ref:`🔗` Returns index of the primary screen. @@ -1654,7 +1852,7 @@ Returns index of the primary screen. .. rst-class:: classref-method -:ref:`int` **get_screen_count** **(** **)** |const| +:ref:`int` **get_screen_count**\ (\ ) |const| :ref:`🔗` Returns the number of displays available. @@ -1666,7 +1864,7 @@ Returns the number of displays available. .. rst-class:: classref-method -:ref:`int` **get_screen_from_rect** **(** :ref:`Rect2` rect **)** |const| +:ref:`int` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2`\ ) |const| :ref:`🔗` Returns index of the screen which contains specified rectangle. @@ -1678,9 +1876,9 @@ Returns index of the screen which contains specified rectangle. .. rst-class:: classref-method -:ref:`bool` **get_swap_cancel_ok** **(** **)** +:ref:`bool` **get_swap_cancel_ok**\ (\ ) :ref:`🔗` -Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. +Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. @@ -1692,11 +1890,11 @@ Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in di .. rst-class:: classref-method -:ref:`int` **get_window_at_screen_position** **(** :ref:`Vector2i` position **)** |const| +:ref:`int` **get_window_at_screen_position**\ (\ position\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns the ID of the window at the specified screen ``position`` (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | @@ -1713,7 +1911,7 @@ Returns the ID of the window at the specified screen ``position`` (in pixels). O .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_window_list** **(** **)** |const| +:ref:`PackedInt32Array` **get_window_list**\ (\ ) |const| :ref:`🔗` Returns the list of Godot window IDs belonging to this process. @@ -1727,7 +1925,9 @@ Returns the list of Godot window IDs belonging to this process. .. rst-class:: classref-method -:ref:`int` **global_menu_add_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_check_item**\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new checkable item with text ``label`` to the global menu with ID ``menu_root``. @@ -1741,10 +1941,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1754,7 +1957,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_icon_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_icon_check_item**\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1768,10 +1973,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1781,7 +1989,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_icon_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_icon_item**\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1795,10 +2005,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1808,7 +2021,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_icon_radio_check_item** **(** :ref:`String` menu_root, :ref:`Texture2D` icon, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_icon_radio_check_item**\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu with ID ``menu_root``. @@ -1824,10 +2039,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1837,7 +2055,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_item**\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new item with text ``label`` to the global menu with ID ``menu_root``. @@ -1851,10 +2071,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1864,7 +2087,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_multistate_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`int` max_states, :ref:`int` default_state, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_multistate_item**\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, max_states\: :ref:`int`, default_state\: :ref:`int`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new item with text ``label`` to the global menu with ID ``menu_root``. @@ -1882,10 +2107,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1895,7 +2123,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_radio_check_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`Callable` callback=Callable(), :ref:`Callable` key_callback=Callable(), :ref:`Variant` tag=null, :ref:`Key` accelerator=0, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_radio_check_item**\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a new radio-checkable item with text ``label`` to the global menu with ID ``menu_root``. @@ -1911,10 +2141,13 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1924,7 +2157,9 @@ An ``accelerator`` can optionally be defined, which is a keyboard shortcut that .. rst-class:: classref-method -:ref:`int` **global_menu_add_separator** **(** :ref:`String` menu_root, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_separator**\ (\ menu_root\: :ref:`String`, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds a separator between items to the global menu with ID ``menu_root``. Separators also occupy an index. @@ -1934,10 +2169,13 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1947,7 +2185,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde .. rst-class:: classref-method -:ref:`int` **global_menu_add_submenu_item** **(** :ref:`String` menu_root, :ref:`String` label, :ref:`String` submenu, :ref:`int` index=-1 **)** +:ref:`int` **global_menu_add_submenu_item**\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, submenu\: :ref:`String`, index\: :ref:`int` = -1\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Adds an item that will act as a submenu of the global menu ``menu_root``. The ``submenu`` argument is the ID of the global menu root that will be shown when the item is clicked. @@ -1957,10 +2197,13 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1970,7 +2213,9 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde .. rst-class:: classref-method -void **global_menu_clear** **(** :ref:`String` menu_root **)** +|void| **global_menu_clear**\ (\ menu_root\: :ref:`String`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Removes all items from the global menu with ID ``menu_root``. @@ -1978,10 +2223,13 @@ Removes all items from the global menu with ID ``menu_root``. \ **Supported system menu IDs:**\ -:: +.. code:: text "_main" - Main menu (macOS). "_dock" - Dock popup menu (macOS). + "_apple" - Apple menu (macOS, custom items added before "Services"). + "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + "_help" - Help menu (macOS). .. rst-class:: classref-item-separator @@ -1991,7 +2239,9 @@ Removes all items from the global menu with ID ``menu_root``. .. rst-class:: classref-method -:ref:`Key` **global_menu_get_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`Key` **global_menu_get_item_accelerator**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. @@ -2005,7 +2255,9 @@ Returns the accelerator of the item at index ``idx``. Accelerators are special c .. rst-class:: classref-method -:ref:`Callable` **global_menu_get_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`Callable` **global_menu_get_item_callback**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the callback of the item at index ``idx``. @@ -2019,7 +2271,9 @@ Returns the callback of the item at index ``idx``. .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_count** **(** :ref:`String` menu_root **)** |const| +:ref:`int` **global_menu_get_item_count**\ (\ menu_root\: :ref:`String`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns number of items in the global menu with ID ``menu_root``. @@ -2033,7 +2287,9 @@ Returns number of items in the global menu with ID ``menu_root``. .. rst-class:: classref-method -:ref:`Texture2D` **global_menu_get_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`Texture2D` **global_menu_get_item_icon**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the icon of the item at index ``idx``. @@ -2047,7 +2303,9 @@ Returns the icon of the item at index ``idx``. .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`int` **global_menu_get_item_indentation_level**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the horizontal offset of the item at the given ``idx``. @@ -2061,9 +2319,11 @@ Returns the horizontal offset of the item at the given ``idx``. .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_index_from_tag** **(** :ref:`String` menu_root, :ref:`Variant` tag **)** |const| +:ref:`int` **global_menu_get_item_index_from_tag**\ (\ menu_root\: :ref:`String`, tag\: :ref:`Variant`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the index of the item with the specified ``tag``. Index is automatically assigned to each item by the engine. Index can not be set manually. +Returns the index of the item with the specified ``tag``. Indices are automatically assigned to each item by the engine, and cannot be set manually. \ **Note:** This method is implemented only on macOS. @@ -2075,9 +2335,11 @@ Returns the index of the item with the specified ``tag``. Index is automatically .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_index_from_text** **(** :ref:`String` menu_root, :ref:`String` text **)** |const| +:ref:`int` **global_menu_get_item_index_from_text**\ (\ menu_root\: :ref:`String`, text\: :ref:`String`\ ) |const| :ref:`🔗` -Returns the index of the item with the specified ``text``. Index is automatically assigned to each item by the engine. Index can not be set manually. +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Returns the index of the item with the specified ``text``. Indices are automatically assigned to each item by the engine, and cannot be set manually. \ **Note:** This method is implemented only on macOS. @@ -2089,7 +2351,9 @@ Returns the index of the item with the specified ``text``. Index is automaticall .. rst-class:: classref-method -:ref:`Callable` **global_menu_get_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`Callable` **global_menu_get_item_key_callback**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the callback of the item accelerator at index ``idx``. @@ -2103,7 +2367,9 @@ Returns the callback of the item accelerator at index ``idx``. .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`int` **global_menu_get_item_max_states**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item` for details. @@ -2117,7 +2383,9 @@ Returns number of states of a multistate item. See :ref:`global_menu_add_multist .. rst-class:: classref-method -:ref:`int` **global_menu_get_item_state** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`int` **global_menu_get_item_state**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. @@ -2131,7 +2399,9 @@ Returns the state of a multistate item. See :ref:`global_menu_add_multistate_ite .. rst-class:: classref-method -:ref:`String` **global_menu_get_item_submenu** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`String` **global_menu_get_item_submenu**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item` for more info on how to add a submenu. @@ -2145,7 +2415,9 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_s .. rst-class:: classref-method -:ref:`Variant` **global_menu_get_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`Variant` **global_menu_get_item_tag**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag`, which provides a simple way of assigning context data to items. @@ -2159,7 +2431,9 @@ Returns the metadata of the specified item, which might be of any type. You can .. rst-class:: classref-method -:ref:`String` **global_menu_get_item_text** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`String` **global_menu_get_item_text**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the text of the item at index ``idx``. @@ -2173,7 +2447,9 @@ Returns the text of the item at index ``idx``. .. rst-class:: classref-method -:ref:`String` **global_menu_get_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`String` **global_menu_get_item_tooltip**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns the tooltip associated with the specified index ``idx``. @@ -2183,11 +2459,29 @@ Returns the tooltip associated with the specified index ``idx``. ---- +.. _class_DisplayServer_method_global_menu_get_system_menu_roots: + +.. rst-class:: classref-method + +:ref:`Dictionary` **global_menu_get_system_menu_roots**\ (\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Returns Dictionary of supported system menu IDs and names. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_is_item_checkable: .. rst-class:: classref-method -:ref:`bool` **global_menu_is_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`bool` **global_menu_is_item_checkable**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. @@ -2201,7 +2495,9 @@ Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if .. rst-class:: classref-method -:ref:`bool` **global_menu_is_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`bool` **global_menu_is_item_checked**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns ``true`` if the item at index ``idx`` is checked. @@ -2215,7 +2511,9 @@ Returns ``true`` if the item at index ``idx`` is checked. .. rst-class:: classref-method -:ref:`bool` **global_menu_is_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`bool` **global_menu_is_item_disabled**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. @@ -2227,11 +2525,31 @@ See :ref:`global_menu_set_item_disabled` **global_menu_is_item_hidden**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Returns ``true`` if the item at index ``idx`` is hidden. + +See :ref:`global_menu_set_item_hidden` for more info on how to hide an item. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_is_item_radio_checkable: .. rst-class:: classref-method -:ref:`bool` **global_menu_is_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| +:ref:`bool` **global_menu_is_item_radio_checkable**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Returns ``true`` if the item at index ``idx`` has radio button-style checkability. @@ -2247,7 +2565,9 @@ Returns ``true`` if the item at index ``idx`` has radio button-style checkabilit .. rst-class:: classref-method -void **global_menu_remove_item** **(** :ref:`String` menu_root, :ref:`int` idx **)** +|void| **global_menu_remove_item**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Removes the item at index ``idx`` from the global menu ``menu_root``. @@ -2263,7 +2583,9 @@ Removes the item at index ``idx`` from the global menu ``menu_root``. .. rst-class:: classref-method -void **global_menu_set_item_accelerator** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Key` keycode **)** +|void| **global_menu_set_item_accelerator**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, keycode\: :ref:`Key`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key`, or a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). @@ -2277,7 +2599,9 @@ Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single : .. rst-class:: classref-method -void **global_menu_set_item_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** +|void| **global_menu_set_item_callback**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed. @@ -2293,7 +2617,9 @@ Sets the callback of the item at index ``idx``. Callback is emitted when an item .. rst-class:: classref-method -void **global_menu_set_item_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** +|void| **global_menu_set_item_checkable**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. @@ -2307,7 +2633,9 @@ Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the ty .. rst-class:: classref-method -void **global_menu_set_item_checked** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checked **)** +|void| **global_menu_set_item_checked**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checked\: :ref:`bool`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the checkstate status of the item at index ``idx``. @@ -2321,7 +2649,9 @@ Sets the checkstate status of the item at index ``idx``. .. rst-class:: classref-method -void **global_menu_set_item_disabled** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** +|void| **global_menu_set_item_disabled**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, disabled\: :ref:`bool`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. @@ -2331,11 +2661,47 @@ Enables/disables the item at index ``idx``. When it is disabled, it can't be sel ---- +.. _class_DisplayServer_method_global_menu_set_item_hidden: + +.. rst-class:: classref-method + +|void| **global_menu_set_item_hidden**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, hidden\: :ref:`bool`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Hides/shows the item at index ``idx``. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_global_menu_set_item_hover_callbacks: + +.. rst-class:: classref-method + +|void| **global_menu_set_item_hover_callbacks**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered. + +\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_set_item_icon: .. rst-class:: classref-method -void **global_menu_set_item_icon** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** +|void| **global_menu_set_item_icon**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Replaces the :ref:`Texture2D` icon of the specified ``idx``. @@ -2351,7 +2717,9 @@ Replaces the :ref:`Texture2D` icon of the specified ``idx``. .. rst-class:: classref-method -void **global_menu_set_item_indentation_level** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** +|void| **global_menu_set_item_indentation_level**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, level\: :ref:`int`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the horizontal offset of the item at the given ``idx``. @@ -2365,7 +2733,9 @@ Sets the horizontal offset of the item at the given ``idx``. .. rst-class:: classref-method -void **global_menu_set_item_key_callback** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` key_callback **)** +|void| **global_menu_set_item_key_callback**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, key_callback\: :ref:`Callable`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated. @@ -2381,7 +2751,9 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc .. rst-class:: classref-method -void **global_menu_set_item_max_states** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` max_states **)** +|void| **global_menu_set_item_max_states**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, max_states\: :ref:`int`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. @@ -2395,7 +2767,9 @@ Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_ .. rst-class:: classref-method -void **global_menu_set_item_radio_checkable** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` checkable **)** +|void| **global_menu_set_item_radio_checkable**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the type of the item at the specified index ``idx`` to radio button. If ``false``, sets the type of the item to plain text. @@ -2411,7 +2785,9 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f .. rst-class:: classref-method -void **global_menu_set_item_state** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` state **)** +|void| **global_menu_set_item_state**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, state\: :ref:`int`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. @@ -2425,7 +2801,9 @@ Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item` menu_root, :ref:`int` idx, :ref:`String` submenu **)** +|void| **global_menu_set_item_submenu**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, submenu\: :ref:`String`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the submenu of the item at index ``idx``. The submenu is the ID of a global menu root that would be shown when the item is clicked. @@ -2439,7 +2817,9 @@ Sets the submenu of the item at index ``idx``. The submenu is the ID of a global .. rst-class:: classref-method -void **global_menu_set_item_tag** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Variant` tag **)** +|void| **global_menu_set_item_tag**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tag\: :ref:`Variant`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag`, which provides a simple way of assigning context data to items. @@ -2453,7 +2833,9 @@ Sets the metadata of an item, which may be of any type. You can later get it wit .. rst-class:: classref-method -void **global_menu_set_item_text** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` text **)** +|void| **global_menu_set_item_text**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, text\: :ref:`String`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the text of the item at index ``idx``. @@ -2467,7 +2849,9 @@ Sets the text of the item at index ``idx``. .. rst-class:: classref-method -void **global_menu_set_item_tooltip** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** +|void| **global_menu_set_item_tooltip**\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tooltip\: :ref:`String`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. Sets the :ref:`String` tooltip of the item at the specified index ``idx``. @@ -2477,11 +2861,25 @@ Sets the :ref:`String` tooltip of the item at the specified index ---- +.. _class_DisplayServer_method_global_menu_set_popup_callbacks: + +.. rst-class:: classref-method + +|void| **global_menu_set_popup_callbacks**\ (\ menu_root\: :ref:`String`, open_callback\: :ref:`Callable`, close_callback\: :ref:`Callable`\ ) :ref:`🔗` + +**Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. + +Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_has_feature: .. rst-class:: classref-method -:ref:`bool` **has_feature** **(** :ref:`Feature` feature **)** |const| +:ref:`bool` **has_feature**\ (\ feature\: :ref:`Feature`\ ) |const| :ref:`🔗` Returns ``true`` if the specified ``feature`` is supported by the current **DisplayServer**, ``false`` otherwise. @@ -2489,11 +2887,29 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Disp ---- +.. _class_DisplayServer_method_help_set_search_callbacks: + +.. rst-class:: classref-method + +|void| **help_set_search_callbacks**\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) :ref:`🔗` + +Sets native help system search callbacks. + +\ ``search_callback`` has the following arguments: ``String search_string, int result_limit`` and return a :ref:`Dictionary` with "key, display name" pairs for the search results. Called when the user enters search terms in the ``Help`` menu. + +\ ``action_callback`` has the following arguments: ``String key``. Called when the user selects a search result in the ``Help`` menu. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_ime_get_selection: .. rst-class:: classref-method -:ref:`Vector2i` **ime_get_selection** **(** **)** |const| +:ref:`Vector2i` **ime_get_selection**\ (\ ) |const| :ref:`🔗` Returns the text selection in the `Input Method Editor `__ composition string, with the :ref:`Vector2i`'s ``x`` component being the caret position and ``y`` being the length of the selection. @@ -2507,7 +2923,7 @@ Returns the text selection in the `Input Method Editor ` **ime_get_text** **(** **)** |const| +:ref:`String` **ime_get_text**\ (\ ) |const| :ref:`🔗` Returns the composition string contained within the `Input Method Editor `__ window. @@ -2521,11 +2937,11 @@ Returns the composition string contained within the `Input Method Editor ` **is_dark_mode** **(** **)** |const| +:ref:`bool` **is_dark_mode**\ (\ ) |const| :ref:`🔗` Returns ``true`` if OS is using dark mode. -\ **Note:** This method is implemented on macOS, Windows and Linux (X11). +\ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). .. rst-class:: classref-item-separator @@ -2535,11 +2951,11 @@ Returns ``true`` if OS is using dark mode. .. rst-class:: classref-method -:ref:`bool` **is_dark_mode_supported** **(** **)** |const| +:ref:`bool` **is_dark_mode_supported**\ (\ ) |const| :ref:`🔗` Returns ``true`` if OS supports dark mode. -\ **Note:** This method is implemented on macOS, Windows and Linux (X11). +\ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). .. rst-class:: classref-item-separator @@ -2549,9 +2965,21 @@ Returns ``true`` if OS supports dark mode. .. rst-class:: classref-method -:ref:`bool` **is_touchscreen_available** **(** **)** |const| +:ref:`bool` **is_touchscreen_available**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if touch events are available (Android or iOS), the capability is detected on the Webplatform or if :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is ``true``. +Returns ``true`` if touch events are available (Android or iOS), the capability is detected on the Web platform or if :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_is_window_transparency_available: + +.. rst-class:: classref-method + +:ref:`bool` **is_window_transparency_available**\ (\ ) |const| :ref:`🔗` + +Returns ``true`` if the window background can be made transparent. This method returns ``false`` if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed` is set to ``false``, or if transparency is not supported by the renderer or OS compositor. .. rst-class:: classref-item-separator @@ -2561,11 +2989,11 @@ Returns ``true`` if touch events are available (Android or iOS), the capability .. rst-class:: classref-method -:ref:`int` **keyboard_get_current_layout** **(** **)** |const| +:ref:`int` **keyboard_get_current_layout**\ (\ ) |const| :ref:`🔗` Returns active keyboard layout index. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows. .. rst-class:: classref-item-separator @@ -2575,11 +3003,11 @@ Returns active keyboard layout index. .. rst-class:: classref-method -:ref:`Key` **keyboard_get_keycode_from_physical** **(** :ref:`Key` keycode **)** |const| +:ref:`Key` **keyboard_get_keycode_from_physical**\ (\ keycode\: :ref:`Key`\ ) |const| :ref:`🔗` Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2589,11 +3017,11 @@ Converts a physical (US QWERTY) ``keycode`` to one in the active keyboard layout .. rst-class:: classref-method -:ref:`Key` **keyboard_get_label_from_physical** **(** :ref:`Key` keycode **)** |const| +:ref:`Key` **keyboard_get_label_from_physical**\ (\ keycode\: :ref:`Key`\ ) |const| :ref:`🔗` Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2603,11 +3031,11 @@ Converts a physical (US QWERTY) ``keycode`` to localized label printed on the ke .. rst-class:: classref-method -:ref:`int` **keyboard_get_layout_count** **(** **)** |const| +:ref:`int` **keyboard_get_layout_count**\ (\ ) |const| :ref:`🔗` Returns the number of keyboard layouts. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2617,11 +3045,11 @@ Returns the number of keyboard layouts. .. rst-class:: classref-method -:ref:`String` **keyboard_get_layout_language** **(** :ref:`int` index **)** |const| +:ref:`String` **keyboard_get_layout_language**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``index``. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2631,11 +3059,11 @@ Returns the ISO-639/BCP-47 language code of the keyboard layout at position ``in .. rst-class:: classref-method -:ref:`String` **keyboard_get_layout_name** **(** :ref:`int` index **)** |const| +:ref:`String` **keyboard_get_layout_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` Returns the localized name of the keyboard layout at position ``index``. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2645,11 +3073,11 @@ Returns the localized name of the keyboard layout at position ``index``. .. rst-class:: classref-method -void **keyboard_set_current_layout** **(** :ref:`int` index **)** +|void| **keyboard_set_current_layout**\ (\ index\: :ref:`int`\ ) :ref:`🔗` Sets the active keyboard layout. -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. .. rst-class:: classref-item-separator @@ -2659,7 +3087,7 @@ Sets the active keyboard layout. .. rst-class:: classref-method -|bitfield|\<:ref:`MouseButtonMask`\> **mouse_get_button_state** **(** **)** |const| +|bitfield|\[:ref:`MouseButtonMask`\] **mouse_get_button_state**\ (\ ) |const| :ref:`🔗` Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask`. @@ -2671,7 +3099,7 @@ Returns the current state of mouse buttons (whether each button is pressed) as a .. rst-class:: classref-method -:ref:`MouseMode` **mouse_get_mode** **(** **)** |const| +:ref:`MouseMode` **mouse_get_mode**\ (\ ) |const| :ref:`🔗` Returns the current mouse mode. See also :ref:`mouse_set_mode`. @@ -2683,7 +3111,7 @@ Returns the current mouse mode. See also :ref:`mouse_set_mode` **mouse_get_position** **(** **)** |const| +:ref:`Vector2i` **mouse_get_position**\ (\ ) |const| :ref:`🔗` Returns the mouse cursor's current position in screen coordinates. @@ -2695,7 +3123,7 @@ Returns the mouse cursor's current position in screen coordinates. .. rst-class:: classref-method -void **mouse_set_mode** **(** :ref:`MouseMode` mouse_mode **)** +|void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode`\ ) :ref:`🔗` Sets the current mouse mode. See also :ref:`mouse_get_mode`. @@ -2707,7 +3135,7 @@ Sets the current mouse mode. See also :ref:`mouse_get_mode` Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events`, :ref:`Input.flush_buffered_events` and :ref:`Input.use_accumulated_input`. @@ -2719,7 +3147,7 @@ Perform window manager processing, including input flushing. See also :ref:`forc .. rst-class:: classref-method -:ref:`int` **screen_get_dpi** **(** :ref:`int` screen=-1 **)** |const| +:ref:`int` **screen_get_dpi**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the dots per inch density of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. @@ -2727,7 +3155,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref \ **Note:** On Android devices, the actual screen densities are grouped into six generalized densities: -:: +.. code:: text ldpi - 120 dpi mdpi - 160 dpi @@ -2736,7 +3164,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref xxhdpi - 480 dpi xxxhdpi - 640 dpi -\ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows. Returns ``72`` on unsupported platforms. +\ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms. .. rst-class:: classref-item-separator @@ -2746,7 +3174,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref .. rst-class:: classref-method -:ref:`Image` **screen_get_image** **(** :ref:`int` screen=-1 **)** |const| +:ref:`Image` **screen_get_image**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns screenshot of the ``screen``. @@ -2762,7 +3190,7 @@ Returns screenshot of the ``screen``. .. rst-class:: classref-method -:ref:`float` **screen_get_max_scale** **(** **)** |const| +:ref:`float` **screen_get_max_scale**\ (\ ) |const| :ref:`🔗` Returns the greatest scale factor of all screens. @@ -2778,7 +3206,7 @@ Returns the greatest scale factor of all screens. .. rst-class:: classref-method -:ref:`ScreenOrientation` **screen_get_orientation** **(** :ref:`int` screen=-1 **)** |const| +:ref:`ScreenOrientation` **screen_get_orientation**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation`. @@ -2792,7 +3220,7 @@ Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientat .. rst-class:: classref-method -:ref:`Color` **screen_get_pixel** **(** :ref:`Vector2i` position **)** |const| +:ref:`Color` **screen_get_pixel**\ (\ position\: :ref:`Vector2i`\ ) |const| :ref:`🔗` Returns color of the display pixel at the ``position``. @@ -2808,11 +3236,11 @@ Returns color of the display pixel at the ``position``. .. rst-class:: classref-method -:ref:`Vector2i` **screen_get_position** **(** :ref:`int` screen=-1 **)** |const| +:ref:`Vector2i` **screen_get_position**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | @@ -2823,6 +3251,8 @@ Returns the screen's top-left corner position in pixels. On multi-monitor setups See also :ref:`screen_get_size`. +\ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``. + .. rst-class:: classref-item-separator ---- @@ -2831,7 +3261,7 @@ See also :ref:`screen_get_size`. .. rst-class:: classref-method -:ref:`float` **screen_get_refresh_rate** **(** :ref:`int` screen=-1 **)** |const| +:ref:`float` **screen_get_refresh_rate**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. @@ -2853,13 +3283,15 @@ To fallback to a default refresh rate if the method fails, try: .. rst-class:: classref-method -:ref:`float` **screen_get_scale** **(** :ref:`int` screen=-1 **)** |const| +:ref:`float` **screen_get_scale**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the scale factor of the specified screen by index. -\ **Note:** On macOS returned value is ``2.0`` for hiDPI (Retina) screen, and ``1.0`` for all other cases. +\ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases. -\ **Note:** This method is implemented only on macOS. +\ **Note:** On Linux (Wayland), the returned value is accurate only when ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW`. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. ``1.25`` would get rounded up to ``2.0``). + +\ **Note:** This method is implemented only on macOS and Linux (Wayland). .. rst-class:: classref-item-separator @@ -2869,7 +3301,7 @@ Returns the scale factor of the specified screen by index. .. rst-class:: classref-method -:ref:`Vector2i` **screen_get_size** **(** :ref:`int` screen=-1 **)** |const| +:ref:`Vector2i` **screen_get_size**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the screen's size in pixels. See also :ref:`screen_get_position` and :ref:`screen_get_usable_rect`. @@ -2881,7 +3313,7 @@ Returns the screen's size in pixels. See also :ref:`screen_get_position` **screen_get_usable_rect** **(** :ref:`int` screen=-1 **)** |const| +:ref:`Rect2i` **screen_get_usable_rect**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size`. @@ -2893,7 +3325,7 @@ Returns the portion of the screen that is not obstructed by a status bar in pixe .. rst-class:: classref-method -:ref:`bool` **screen_is_kept_on** **(** **)** |const| +:ref:`bool` **screen_is_kept_on**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on`. @@ -2905,7 +3337,7 @@ Returns ``true`` if the screen should never be turned off by the operating syste .. rst-class:: classref-method -void **screen_set_keep_on** **(** :ref:`bool` enable **)** +|void| **screen_set_keep_on**\ (\ enable\: :ref:`bool`\ ) :ref:`🔗` Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on`. @@ -2917,7 +3349,7 @@ Sets whether the screen should never be turned off by the operating system's pow .. rst-class:: classref-method -void **screen_set_orientation** **(** :ref:`ScreenOrientation` orientation, :ref:`int` screen=-1 **)** +|void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) :ref:`🔗` Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`. @@ -2931,10 +3363,12 @@ Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation` image **)** +|void| **set_icon**\ (\ image\: :ref:`Image`\ ) :ref:`🔗` Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. +\ **Note:** Requires support for :ref:`FEATURE_ICON`. + .. rst-class:: classref-item-separator ---- @@ -2943,10 +3377,100 @@ Sets the window icon (usually displayed in the top-left corner) with an :ref:`Im .. rst-class:: classref-method -void **set_native_icon** **(** :ref:`String` filename **)** +|void| **set_native_icon**\ (\ filename\: :ref:`String`\ ) :ref:`🔗` Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon` instead. +\ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_set_system_theme_change_callback: + +.. rst-class:: classref-method + +|void| **set_system_theme_change_callback**\ (\ callable\: :ref:`Callable`\ ) :ref:`🔗` + +Sets the ``callable`` that should be called when system theme settings are changed. Callback method should have zero arguments. + +\ **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_status_indicator_get_rect: + +.. rst-class:: classref-method + +:ref:`Rect2` **status_indicator_get_rect**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the rectangle for the given status indicator ``id`` in screen coordinates. If the status indicator is not visible, returns an empty :ref:`Rect2`. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_status_indicator_set_callback: + +.. rst-class:: classref-method + +|void| **status_indicator_set_callback**\ (\ id\: :ref:`int`, callback\: :ref:`Callable`\ ) :ref:`🔗` + +Sets the application status indicator activation callback. ``callback`` should take two arguments: :ref:`int` mouse button index (one of :ref:`MouseButton` values) and :ref:`Vector2i` click position in screen coordinates. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_status_indicator_set_icon: + +.. rst-class:: classref-method + +|void| **status_indicator_set_icon**\ (\ id\: :ref:`int`, icon\: :ref:`Texture2D`\ ) :ref:`🔗` + +Sets the application status indicator icon. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_status_indicator_set_menu: + +.. rst-class:: classref-method + +|void| **status_indicator_set_menu**\ (\ id\: :ref:`int`, menu_rid\: :ref:`RID`\ ) :ref:`🔗` + +Sets the application status indicator native popup menu. + +\ **Note:** On macOS, the menu is activated by any mouse button. Its activation callback is *not* triggered. + +\ **Note:** On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing :kbd:`Shift + F10`, or the applications key. The menu's activation callback for the other mouse buttons is still triggered. + +\ **Note:** Native popup is only supported if :ref:`NativeMenu` supports the :ref:`NativeMenu.FEATURE_POPUP_MENU` feature. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_status_indicator_set_tooltip: + +.. rst-class:: classref-method + +|void| **status_indicator_set_tooltip**\ (\ id\: :ref:`int`, tooltip\: :ref:`String`\ ) :ref:`🔗` + +Sets the application status indicator tooltip. + +\ **Note:** This method is implemented on macOS and Windows. + .. rst-class:: classref-item-separator ---- @@ -2955,7 +3479,7 @@ Sets the window icon (usually displayed in the top-left corner) in the operating .. rst-class:: classref-method -:ref:`String` **tablet_get_current_driver** **(** **)** |const| +:ref:`String` **tablet_get_current_driver**\ (\ ) |const| :ref:`🔗` Returns current active tablet driver name. @@ -2969,7 +3493,7 @@ Returns current active tablet driver name. .. rst-class:: classref-method -:ref:`int` **tablet_get_driver_count** **(** **)** |const| +:ref:`int` **tablet_get_driver_count**\ (\ ) |const| :ref:`🔗` Returns the total number of available tablet drivers. @@ -2983,7 +3507,7 @@ Returns the total number of available tablet drivers. .. rst-class:: classref-method -:ref:`String` **tablet_get_driver_name** **(** :ref:`int` idx **)** |const| +:ref:`String` **tablet_get_driver_name**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the tablet driver name for the given index. @@ -2997,10 +3521,18 @@ Returns the tablet driver name for the given index. .. rst-class:: classref-method -void **tablet_set_current_driver** **(** :ref:`String` name **)** +|void| **tablet_set_current_driver**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Set active tablet driver name. +Supported drivers: + +- ``winink``: Windows Ink API, default (Windows 8.1+ required). + +- ``wintab``: Wacom Wintab API (compatible device driver required). + +- ``dummy``: Dummy driver, tablet input is disabled. + \ **Note:** This method is implemented only on Windows. .. rst-class:: classref-item-separator @@ -3011,7 +3543,7 @@ Set active tablet driver name. .. rst-class:: classref-method -:ref:`Dictionary[]` **tts_get_voices** **(** **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **tts_get_voices**\ (\ ) |const| :ref:`🔗` Returns an :ref:`Array` of voice information dictionaries. @@ -3021,11 +3553,11 @@ Each :ref:`Dictionary` contains two :ref:`String - ``id`` is voice identifier. -- ``language`` is language code in ``lang_Variant`` format. ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And ``Variant`` part is an engine dependent string describing country, region or/and dialect. +- ``language`` is language code in ``lang_Variant`` format. The ``lang`` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The ``Variant`` part is an engine-dependent string describing country, region or/and dialect. Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3037,11 +3569,11 @@ Note that Godot depends on system libraries for text-to-speech functionality. Th .. rst-class:: classref-method -:ref:`PackedStringArray` **tts_get_voices_for_language** **(** :ref:`String` language **)** |const| +:ref:`PackedStringArray` **tts_get_voices_for_language**\ (\ language\: :ref:`String`\ ) |const| :ref:`🔗` Returns an :ref:`PackedStringArray` of voice identifiers for the ``language``. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3053,11 +3585,11 @@ Returns an :ref:`PackedStringArray` of voice identifier .. rst-class:: classref-method -:ref:`bool` **tts_is_paused** **(** **)** |const| +:ref:`bool` **tts_is_paused**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the synthesizer is in a paused state. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3069,11 +3601,11 @@ Returns ``true`` if the synthesizer is in a paused state. .. rst-class:: classref-method -:ref:`bool` **tts_is_speaking** **(** **)** |const| +:ref:`bool` **tts_is_speaking**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the synthesizer is generating speech, or have utterance waiting in the queue. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3085,11 +3617,11 @@ Returns ``true`` if the synthesizer is generating speech, or have utterance wait .. rst-class:: classref-method -void **tts_pause** **(** **)** +|void| **tts_pause**\ (\ ) :ref:`🔗` Puts the synthesizer into a paused state. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3101,11 +3633,11 @@ Puts the synthesizer into a paused state. .. rst-class:: classref-method -void **tts_resume** **(** **)** +|void| **tts_resume**\ (\ ) :ref:`🔗` Resumes the synthesizer if it was paused. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3117,7 +3649,7 @@ Resumes the synthesizer if it was paused. .. rst-class:: classref-method -void **tts_set_utterance_callback** **(** :ref:`TTSUtteranceEvent` event, :ref:`Callable` callable **)** +|void| **tts_set_utterance_callback**\ (\ event\: :ref:`TTSUtteranceEvent`, callable\: :ref:`Callable`\ ) :ref:`🔗` Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. @@ -3127,7 +3659,7 @@ Adds a callback, which is called when the utterance has started, finished, cance \ **Note:** The granularity of the boundary callbacks is engine dependent. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3139,7 +3671,7 @@ Adds a callback, which is called when the utterance has started, finished, cance .. rst-class:: classref-method -void **tts_speak** **(** :ref:`String` text, :ref:`String` voice, :ref:`int` volume=50, :ref:`float` pitch=1.0, :ref:`float` rate=1.0, :ref:`int` utterance_id=0, :ref:`bool` interrupt=false **)** +|void| **tts_speak**\ (\ text\: :ref:`String`, voice\: :ref:`String`, volume\: :ref:`int` = 50, pitch\: :ref:`float` = 1.0, rate\: :ref:`float` = 1.0, utterance_id\: :ref:`int` = 0, interrupt\: :ref:`bool` = false\ ) :ref:`🔗` Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first. @@ -3153,11 +3685,11 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear - ``utterance_id`` is passed as a parameter to the callback functions. -\ **Note:** On Windows and Linux (X11), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak`. +\ **Note:** On Windows and Linux (X11/Wayland), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak`. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3169,11 +3701,11 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear .. rst-class:: classref-method -void **tts_stop** **(** **)** +|void| **tts_stop**\ (\ ) :ref:`🔗` Stops synthesis in progress and removes all utterances from the queue. -\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows. \ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. @@ -3185,7 +3717,7 @@ Stops synthesis in progress and removes all utterances from the queue. .. rst-class:: classref-method -:ref:`int` **virtual_keyboard_get_height** **(** **)** |const| +:ref:`int` **virtual_keyboard_get_height**\ (\ ) |const| :ref:`🔗` Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. @@ -3197,7 +3729,7 @@ Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyb .. rst-class:: classref-method -void **virtual_keyboard_hide** **(** **)** +|void| **virtual_keyboard_hide**\ (\ ) :ref:`🔗` Hides the virtual keyboard if it is shown, does nothing otherwise. @@ -3209,7 +3741,7 @@ Hides the virtual keyboard if it is shown, does nothing otherwise. .. rst-class:: classref-method -void **virtual_keyboard_show** **(** :ref:`String` existing_text, :ref:`Rect2` position=Rect2(0, 0, 0, 0), :ref:`VirtualKeyboardType` type=0, :ref:`int` max_length=-1, :ref:`int` cursor_start=-1, :ref:`int` cursor_end=-1 **)** +|void| **virtual_keyboard_show**\ (\ existing_text\: :ref:`String`, position\: :ref:`Rect2` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType` = 0, max_length\: :ref:`int` = -1, cursor_start\: :ref:`int` = -1, cursor_end\: :ref:`int` = -1\ ) :ref:`🔗` Shows the virtual keyboard if the platform has one. @@ -3235,11 +3767,11 @@ Shows the virtual keyboard if the platform has one. .. rst-class:: classref-method -void **warp_mouse** **(** :ref:`Vector2i` position **)** +|void| **warp_mouse**\ (\ position\: :ref:`Vector2i`\ ) :ref:`🔗` Sets the mouse cursor position to the given ``position`` relative to an origin at the upper left corner of the currently focused game Window Manager window. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. +\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. .. rst-class:: classref-item-separator @@ -3249,7 +3781,7 @@ Sets the mouse cursor position to the given ``position`` relative to an origin a .. rst-class:: classref-method -:ref:`bool` **window_can_draw** **(** :ref:`int` window_id=0 **)** |const| +:ref:`bool` **window_can_draw**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns ``true`` if anything can be drawn in the window specified by ``window_id``, ``false`` otherwise. Using the ``--disable-render-loop`` command line argument or a headless build will return ``false``. @@ -3261,7 +3793,7 @@ Returns ``true`` if anything can be drawn in the window specified by ``window_id .. rst-class:: classref-method -:ref:`int` **window_get_active_popup** **(** **)** |const| +:ref:`int` **window_get_active_popup**\ (\ ) |const| :ref:`🔗` Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` if there is none. @@ -3273,7 +3805,7 @@ Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` **window_get_attached_instance_id** **(** :ref:`int` window_id=0 **)** |const| +:ref:`int` **window_get_attached_instance_id**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. @@ -3285,7 +3817,7 @@ Returns the :ref:`Object.get_instance_id` o .. rst-class:: classref-method -:ref:`int` **window_get_current_screen** **(** :ref:`int` window_id=0 **)** |const| +:ref:`int` **window_get_current_screen**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen`. @@ -3297,7 +3829,7 @@ Returns the screen the window specified by ``window_id`` is currently positioned .. rst-class:: classref-method -:ref:`bool` **window_get_flag** **(** :ref:`WindowFlags` flag, :ref:`int` window_id=0 **)** |const| +:ref:`bool` **window_get_flag**\ (\ flag\: :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the current value of the given window's ``flag``. @@ -3309,7 +3841,7 @@ Returns the current value of the given window's ``flag``. .. rst-class:: classref-method -:ref:`Vector2i` **window_get_max_size** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_max_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size`. @@ -3321,7 +3853,7 @@ Returns the window's maximum size (in pixels). See also :ref:`window_set_max_siz .. rst-class:: classref-method -:ref:`Vector2i` **window_get_min_size** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_min_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size`. @@ -3333,7 +3865,7 @@ Returns the window's minimum size (in pixels). See also :ref:`window_set_min_siz .. rst-class:: classref-method -:ref:`WindowMode` **window_get_mode** **(** :ref:`int` window_id=0 **)** |const| +:ref:`WindowMode` **window_get_mode**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the mode of the given window. @@ -3345,11 +3877,11 @@ Returns the mode of the given window. .. rst-class:: classref-method -:ref:`int` **window_get_native_handle** **(** :ref:`HandleType` handle_type, :ref:`int` window_id=0 **)** |const| +:ref:`int` **window_get_native_handle**\ (\ handle_type\: :ref:`HandleType`, window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns internal structure pointers for use in plugins. -\ **Note:** This method is implemented on Android, Linux (X11), macOS and Windows. +\ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows. .. rst-class:: classref-item-separator @@ -3359,7 +3891,7 @@ Returns internal structure pointers for use in plugins. .. rst-class:: classref-method -:ref:`Rect2i` **window_get_popup_safe_rect** **(** :ref:`int` window **)** |const| +:ref:`Rect2i` **window_get_popup_safe_rect**\ (\ window\: :ref:`int`\ ) |const| :ref:`🔗` Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. @@ -3371,7 +3903,7 @@ Returns the bounding box of control, or menu item that was used to open the popu .. rst-class:: classref-method -:ref:`Vector2i` **window_get_position** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_position**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the position of the client area of the given window on the screen. @@ -3383,7 +3915,7 @@ Returns the position of the client area of the given window on the screen. .. rst-class:: classref-method -:ref:`Vector2i` **window_get_position_with_decorations** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_position_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position`. @@ -3395,7 +3927,7 @@ Returns the position of the given window on the screen including the borders dra .. rst-class:: classref-method -:ref:`Vector3i` **window_get_safe_title_margins** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector3i` **window_get_safe_title_margins**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns left margins (``x``), right margins (``y``) and height (``z``) of the title that are safe to use (contains no buttons or other elements) when :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` flag is set. @@ -3407,7 +3939,7 @@ Returns left margins (``x``), right margins (``y``) and height (``z``) of the ti .. rst-class:: classref-method -:ref:`Vector2i` **window_get_size** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations`, :ref:`window_set_size` and :ref:`window_get_position`. @@ -3419,7 +3951,7 @@ Returns the size of the window specified by ``window_id`` (in pixels), excluding .. rst-class:: classref-method -:ref:`Vector2i` **window_get_size_with_decorations** **(** :ref:`int` window_id=0 **)** |const| +:ref:`Vector2i` **window_get_size_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size`. @@ -3427,11 +3959,25 @@ Returns the size of the window specified by ``window_id`` (in pixels), including ---- +.. _class_DisplayServer_method_window_get_title_size: + +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_title_size**\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` + +Returns the estimated window title bar size (including text and window buttons) for the window specified by ``window_id`` (in pixels). This method does not change the window title. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_window_get_vsync_mode: .. rst-class:: classref-method -:ref:`VSyncMode` **window_get_vsync_mode** **(** :ref:`int` window_id=0 **)** |const| +:ref:`VSyncMode` **window_get_vsync_mode**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the V-Sync mode of the given window. @@ -3443,7 +3989,7 @@ Returns the V-Sync mode of the given window. .. rst-class:: classref-method -:ref:`bool` **window_is_focused** **(** :ref:`int` window_id=0 **)** |const| +:ref:`bool` **window_is_focused**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns ``true`` if the window specified by ``window_id`` is focused. @@ -3455,7 +4001,7 @@ Returns ``true`` if the window specified by ``window_id`` is focused. .. rst-class:: classref-method -:ref:`bool` **window_is_maximize_allowed** **(** :ref:`int` window_id=0 **)** |const| +:ref:`bool` **window_is_maximize_allowed**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns ``true`` if the given window can be maximized (the maximize button is enabled). @@ -3467,7 +4013,7 @@ Returns ``true`` if the given window can be maximized (the maximize button is en .. rst-class:: classref-method -:ref:`bool` **window_maximize_on_title_dbl_click** **(** **)** |const| +:ref:`bool` **window_maximize_on_title_dbl_click**\ (\ ) |const| :ref:`🔗` Returns ``true``, if double-click on a window title should maximize it. @@ -3481,7 +4027,7 @@ Returns ``true``, if double-click on a window title should maximize it. .. rst-class:: classref-method -:ref:`bool` **window_minimize_on_title_dbl_click** **(** **)** |const| +:ref:`bool` **window_minimize_on_title_dbl_click**\ (\ ) |const| :ref:`🔗` Returns ``true``, if double-click on a window title should minimize it. @@ -3495,7 +4041,7 @@ Returns ``true``, if double-click on a window title should minimize it. .. rst-class:: classref-method -void **window_move_to_foreground** **(** :ref:`int` window_id=0 **)** +|void| **window_move_to_foreground**\ (\ window_id\: :ref:`int` = 0\ ) :ref:`🔗` Moves the window specified by ``window_id`` to the foreground, so that it is visible over other windows. @@ -3507,7 +4053,7 @@ Moves the window specified by ``window_id`` to the foreground, so that it is vis .. rst-class:: classref-method -void **window_request_attention** **(** :ref:`int` window_id=0 **)** +|void| **window_request_attention**\ (\ window_id\: :ref:`int` = 0\ ) :ref:`🔗` Makes the window specified by ``window_id`` request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system. @@ -3519,7 +4065,7 @@ Makes the window specified by ``window_id`` request attention, which is material .. rst-class:: classref-method -void **window_set_current_screen** **(** :ref:`int` screen, :ref:`int` window_id=0 **)** +|void| **window_set_current_screen**\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen`. @@ -3531,11 +4077,13 @@ Moves the window specified by ``window_id`` to the specified ``screen``. See als .. rst-class:: classref-method -void **window_set_drop_files_callback** **(** :ref:`Callable` callback, :ref:`int` window_id=0 **)** +|void| **window_set_drop_files_callback**\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Sets the ``callback`` that should be called when files are dropped from the operating system's file manager to the window specified by ``window_id``. +Sets the ``callback`` that should be called when files are dropped from the operating system's file manager to the window specified by ``window_id``. ``callback`` should take one :ref:`PackedStringArray` argument, which is the list of dropped files. -\ **Note:** This method is implemented on Windows, macOS, Linux (X11) and Web. +\ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. + +\ **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web. .. rst-class:: classref-item-separator @@ -3545,7 +4093,7 @@ Sets the ``callback`` that should be called when files are dropped from the oper .. rst-class:: classref-method -void **window_set_exclusive** **(** :ref:`int` window_id, :ref:`bool` exclusive **)** +|void| **window_set_exclusive**\ (\ window_id\: :ref:`int`, exclusive\: :ref:`bool`\ ) :ref:`🔗` If set to ``true``, this window will always stay on top of its parent window, parent window will ignore input while this window is opened. @@ -3561,7 +4109,7 @@ If set to ``true``, this window will always stay on top of its parent window, pa .. rst-class:: classref-method -void **window_set_flag** **(** :ref:`WindowFlags` flag, :ref:`bool` enabled, :ref:`int` window_id=0 **)** +|void| **window_set_flag**\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Enables or disables the given window's given ``flag``. See :ref:`WindowFlags` for possible values and their behavior. @@ -3573,7 +4121,7 @@ Enables or disables the given window's given ``flag``. See :ref:`WindowFlags` active, :ref:`int` window_id=0 **)** +|void| **window_set_ime_active**\ (\ active\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position`. @@ -3585,7 +4133,7 @@ Sets whether `Input Method Editor `_ .. rst-class:: classref-method -void **window_set_ime_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** +|void| **window_set_ime_position**\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the position of the `Input Method Editor `__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active` was set to ``true`` for the specified ``window_id``. @@ -3597,10 +4145,12 @@ Sets the position of the `Input Method Editor ` callback, :ref:`int` window_id=0 **)** +|void| **window_set_input_event_callback**\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the ``callback`` that should be called when any :ref:`InputEvent` is sent to the window specified by ``window_id``. +\ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. + .. rst-class:: classref-item-separator ---- @@ -3609,10 +4159,12 @@ Sets the ``callback`` that should be called when any :ref:`InputEvent` callback, :ref:`int` window_id=0 **)** +|void| **window_set_input_text_callback**\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the ``callback`` that should be called when text is entered using the virtual keyboard to the window specified by ``window_id``. +\ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. + .. rst-class:: classref-item-separator ---- @@ -3621,9 +4173,9 @@ Sets the ``callback`` that should be called when text is entered using the virtu .. rst-class:: classref-method -void **window_set_max_size** **(** :ref:`Vector2i` max_size, :ref:`int` window_id=0 **)** +|void| **window_set_max_size**\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_max_size`. +Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_max_size`. \ **Note:** It's recommended to change this value using :ref:`Window.max_size` instead. @@ -3637,9 +4189,9 @@ Sets the maximum size of the window specified by ``window_id`` in pixels. Normal .. rst-class:: classref-method -void **window_set_min_size** **(** :ref:`Vector2i` min_size, :ref:`int` window_id=0 **)** +|void| **window_set_min_size**\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Sets the minimum size for the given window to ``min_size`` (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_min_size`. +Sets the minimum size for the given window to ``min_size`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_min_size`. \ **Note:** It's recommended to change this value using :ref:`Window.min_size` instead. @@ -3655,7 +4207,7 @@ Sets the minimum size for the given window to ``min_size`` (in pixels). Normally .. rst-class:: classref-method -void **window_set_mode** **(** :ref:`WindowMode` mode, :ref:`int` window_id=0 **)** +|void| **window_set_mode**\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets window mode for the given window to ``mode``. See :ref:`WindowMode` for possible values and how each mode behaves. @@ -3669,7 +4221,7 @@ Sets window mode for the given window to ``mode``. See :ref:`WindowMode` region, :ref:`int` window_id=0 **)** +|void| **window_set_mouse_passthrough**\ (\ region\: :ref:`PackedVector2Array`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. @@ -3714,7 +4266,7 @@ Passing an empty array will disable passthrough support (all mouse events will b .. rst-class:: classref-method -void **window_set_popup_safe_rect** **(** :ref:`int` window, :ref:`Rect2i` rect **)** +|void| **window_set_popup_safe_rect**\ (\ window\: :ref:`int`, rect\: :ref:`Rect2i`\ ) :ref:`🔗` Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup. @@ -3726,11 +4278,11 @@ Sets the bounding box of control, or menu item that was used to open the popup w .. rst-class:: classref-method -void **window_set_position** **(** :ref:`Vector2i` position, :ref:`int` window_id=0 **)** +|void| **window_set_position**\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the position of the given window to ``position``. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: -:: +.. code:: text * (0, 0) +-------+ | | @@ -3743,6 +4295,8 @@ See also :ref:`window_get_position` instead. +\ **Note:** On Linux (Wayland): this method is a no-op. + .. rst-class:: classref-item-separator ---- @@ -3751,10 +4305,12 @@ See also :ref:`window_get_position` callback, :ref:`int` window_id=0 **)** +|void| **window_set_rect_changed_callback**\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the ``callback`` that will be called when the window specified by ``window_id`` is moved or resized. +\ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. + .. rst-class:: classref-item-separator ---- @@ -3763,7 +4319,7 @@ Sets the ``callback`` that will be called when the window specified by ``window_ .. rst-class:: classref-method -void **window_set_size** **(** :ref:`Vector2i` size, :ref:`int` window_id=0 **)** +|void| **window_set_size**\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size` and :ref:`window_get_position`. @@ -3777,7 +4333,7 @@ Sets the size of the given window to ``size`` (in pixels). See also :ref:`window .. rst-class:: classref-method -void **window_set_title** **(** :ref:`String` title, :ref:`int` window_id=0 **)** +|void| **window_set_title**\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the title of the given window to ``title``. @@ -3793,7 +4349,7 @@ Sets the title of the given window to ``title``. .. rst-class:: classref-method -void **window_set_transient** **(** :ref:`int` window_id, :ref:`int` parent_window_id **)** +|void| **window_set_transient**\ (\ window_id\: :ref:`int`, parent_window_id\: :ref:`int`\ ) :ref:`🔗` Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. @@ -3809,7 +4365,7 @@ Sets window transient parent. Transient window is will be destroyed with its tra .. rst-class:: classref-method -void **window_set_vsync_mode** **(** :ref:`VSyncMode` vsync_mode, :ref:`int` window_id=0 **)** +|void| **window_set_vsync_mode**\ (\ vsync_mode\: :ref:`VSyncMode`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the V-Sync mode of the given window. See also :ref:`ProjectSettings.display/window/vsync/vsync_mode`. @@ -3827,7 +4383,7 @@ Depending on the platform and used renderer, the engine will fall back to :ref:` .. rst-class:: classref-method -void **window_set_window_buttons_offset** **(** :ref:`Vector2i` offset, :ref:`int` window_id=0 **)** +|void| **window_set_window_buttons_offset**\ (\ offset\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` flag is set, set offset to the center of the first titlebar button. @@ -3841,10 +4397,12 @@ When :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` callback, :ref:`int` window_id=0 **)** +|void| **window_set_window_event_callback**\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` Sets the ``callback`` that will be called when an event occurs in the window specified by ``window_id``. +\ **Warning:** Advanced users only! Adding such a callback to a :ref:`Window` node will override its default implementation, which can introduce bugs. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -3852,3 +4410,4 @@ Sets the ``callback`` that will be called when an event occurs in the window spe .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index 08c1c0ef519..bbbe7efd6fe 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -66,7 +66,7 @@ Below a small example of how to use it: { private DtlsServer _dtls = new DtlsServer(); private UdpServer _server = new UdpServer(); - private Godot.Collections.Array _peers = new Godot.Collections.Array(); + private Godot.Collections.Array _peers = new Godot.Collections.Array(); public override void _Ready() { @@ -80,8 +80,8 @@ Below a small example of how to use it: { while (Server.IsConnectionAvailable()) { - PacketPeerUDP peer = _server.TakeConnection(); - PacketPeerDTLS dtlsPeer = _dtls.TakeConnection(peer); + PacketPeerUdp peer = _server.TakeConnection(); + PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer); if (dtlsPeer.GetStatus() != PacketPeerDtls.Status.Handshaking) { continue; // It is normal that 50% of the connections fails due to cookie exchange. @@ -180,11 +180,11 @@ Methods .. table:: :widths: auto - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`setup` **(** :ref:`TLSOptions` server_options **)** | - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PacketPeerDTLS` | :ref:`take_connection` **(** :ref:`PacketPeerUDP` udp_peer **)** | - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`setup`\ (\ server_options\: :ref:`TLSOptions`\ ) | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PacketPeerDTLS` | :ref:`take_connection`\ (\ udp_peer\: :ref:`PacketPeerUDP`\ ) | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -199,7 +199,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **setup** **(** :ref:`TLSOptions` server_options **)** +:ref:`Error` **setup**\ (\ server_options\: :ref:`TLSOptions`\ ) :ref:`🔗` Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions.server`. @@ -211,7 +211,7 @@ Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions. .. rst-class:: classref-method -:ref:`PacketPeerDTLS` **take_connection** **(** :ref:`PacketPeerUDP` udp_peer **)** +:ref:`PacketPeerDTLS` **take_connection**\ (\ udp_peer\: :ref:`PacketPeerUDP`\ ) :ref:`🔗` Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host`). @@ -224,3 +224,4 @@ Try to initiate the DTLS handshake with the given ``udp_peer`` which must be alr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 5ff05a08400..51fb64593ee 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -28,14 +28,14 @@ Command key names use slash delimiters to distinguish sections, for example: ``" .. code-tab:: gdscript - var command_palette = get_editor_interface().get_command_palette() + var command_palette = EditorInterface.get_command_palette() # external_command is a function that will be called with the command is executed. var command_callable = Callable(self, "external_command").bind(arguments) command_palette.add_command("command", "test/command",command_callable) .. code-tab:: csharp - EditorCommandPalette commandPalette = GetEditorInterface().GetCommandPalette(); + EditorCommandPalette commandPalette = EditorInterface.Singleton.GetCommandPalette(); // ExternalCommand is a function that will be called with the command is executed. Callable commandCallable = new Callable(this, MethodName.ExternalCommand); commandPalette.AddCommand("command", "test/command", commandCallable) @@ -64,11 +64,11 @@ Methods .. table:: :widths: auto - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_command` **(** :ref:`String` command_name, :ref:`String` key_name, :ref:`Callable` binded_callable, :ref:`String` shortcut_text="None" **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_command` **(** :ref:`String` key_name **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_command`\ (\ command_name\: :ref:`String`, key_name\: :ref:`String`, binded_callable\: :ref:`Callable`, shortcut_text\: :ref:`String` = "None"\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_command`\ (\ key_name\: :ref:`String`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_command** **(** :ref:`String` command_name, :ref:`String` key_name, :ref:`Callable` binded_callable, :ref:`String` shortcut_text="None" **)** +|void| **add_command**\ (\ command_name\: :ref:`String`, key_name\: :ref:`String`, binded_callable\: :ref:`Callable`, shortcut_text\: :ref:`String` = "None"\ ) :ref:`🔗` Adds a custom command to EditorCommandPalette. @@ -103,7 +103,7 @@ Adds a custom command to EditorCommandPalette. .. rst-class:: classref-method -void **remove_command** **(** :ref:`String` key_name **)** +|void| **remove_command**\ (\ key_name\: :ref:`String`\ ) :ref:`🔗` Removes the custom command from EditorCommandPalette. @@ -116,3 +116,4 @@ Removes the custom command from EditorCommandPalette. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index 2f6f869ace7..bc1ad69f0f2 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -23,7 +23,7 @@ Description To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin`. -Once added, the :ref:`_setup_session` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). +Once added, the :ref:`_setup_session` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). You can retrieve the available :ref:`EditorDebuggerSession`\ s via :ref:`get_sessions` or get a specific one via :ref:`get_session`. @@ -74,17 +74,23 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_capture` **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_capture` **(** :ref:`String` capture **)** |virtual| |const| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup_session` **(** :ref:`int` session_id **)** |virtual| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorDebuggerSession` | :ref:`get_session` **(** :ref:`int` id **)** | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_sessions` **(** **)** | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_breakpoint_set_in_tree`\ (\ script\: :ref:`Script`, line\: :ref:`int`, enabled\: :ref:`bool`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_breakpoints_cleared_in_tree`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_capture`\ (\ message\: :ref:`String`, data\: :ref:`Array`, session_id\: :ref:`int`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_goto_script_line`\ (\ script\: :ref:`Script`, line\: :ref:`int`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_capture`\ (\ capture\: :ref:`String`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_setup_session`\ (\ session_id\: :ref:`int`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorDebuggerSession` | :ref:`get_session`\ (\ id\: :ref:`int`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_sessions`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -95,11 +101,35 @@ Methods Method Descriptions ------------------- -.. _class_EditorDebuggerPlugin_method__capture: +.. _class_EditorDebuggerPlugin_private_method__breakpoint_set_in_tree: .. rst-class:: classref-method -:ref:`bool` **_capture** **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| +|void| **_breakpoint_set_in_tree**\ (\ script\: :ref:`Script`, line\: :ref:`int`, enabled\: :ref:`bool`\ ) |virtual| :ref:`🔗` + +Override this method to be notified when a breakpoint is set in the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorDebuggerPlugin_private_method__breakpoints_cleared_in_tree: + +.. rst-class:: classref-method + +|void| **_breakpoints_cleared_in_tree**\ (\ ) |virtual| :ref:`🔗` + +Override this method to be notified when all breakpoints are cleared in the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorDebuggerPlugin_private_method__capture: + +.. rst-class:: classref-method + +:ref:`bool` **_capture**\ (\ message\: :ref:`String`, data\: :ref:`Array`, session_id\: :ref:`int`\ ) |virtual| :ref:`🔗` Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the message (which you can retrieve via :ref:`get_session`). @@ -107,23 +137,35 @@ Override this method to process incoming messages. The ``session_id`` is the ID ---- -.. _class_EditorDebuggerPlugin_method__has_capture: +.. _class_EditorDebuggerPlugin_private_method__goto_script_line: + +.. rst-class:: classref-method + +|void| **_goto_script_line**\ (\ script\: :ref:`Script`, line\: :ref:`int`\ ) |virtual| :ref:`🔗` + +Override this method to be notified when a breakpoint line has been clicked in the debugger breakpoint panel. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorDebuggerPlugin_private_method__has_capture: .. rst-class:: classref-method -:ref:`bool` **_has_capture** **(** :ref:`String` capture **)** |virtual| |const| +:ref:`bool` **_has_capture**\ (\ capture\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passes to the :ref:`_capture` method. +Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passes to the :ref:`_capture` method. .. rst-class:: classref-item-separator ---- -.. _class_EditorDebuggerPlugin_method__setup_session: +.. _class_EditorDebuggerPlugin_private_method__setup_session: .. rst-class:: classref-method -void **_setup_session** **(** :ref:`int` session_id **)** |virtual| +|void| **_setup_session**\ (\ session_id\: :ref:`int`\ ) |virtual| :ref:`🔗` Override this method to be notified whenever a new :ref:`EditorDebuggerSession` is created (the session may be inactive during this stage). @@ -135,7 +177,7 @@ Override this method to be notified whenever a new :ref:`EditorDebuggerSession` **get_session** **(** :ref:`int` id **)** +:ref:`EditorDebuggerSession` **get_session**\ (\ id\: :ref:`int`\ ) :ref:`🔗` Returns the :ref:`EditorDebuggerSession` with the given ``id``. @@ -147,11 +189,11 @@ Returns the :ref:`EditorDebuggerSession` with the g .. rst-class:: classref-method -:ref:`Array` **get_sessions** **(** **)** +:ref:`Array` **get_sessions**\ (\ ) :ref:`🔗` Returns an array of :ref:`EditorDebuggerSession` currently available to this debugger plugin. -Note: Not sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active` +\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -160,3 +202,4 @@ Note: Not sessions in the array may be inactive, check their state via :ref:`Edi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 8e485aff00f..96922731b1a 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -31,21 +31,23 @@ Methods .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_session_tab` **(** :ref:`Control` control **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_active` **(** **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_breaked` **(** **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_debuggable` **(** **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_session_tab` **(** :ref:`Control` control **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`send_message` **(** :ref:`String` message, :ref:`Array` data=[] **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`toggle_profiler` **(** :ref:`String` profiler, :ref:`bool` enable, :ref:`Array` data=[] **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_session_tab`\ (\ control\: :ref:`Control`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_active`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_breaked`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_debuggable`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_session_tab`\ (\ control\: :ref:`Control`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`send_message`\ (\ message\: :ref:`String`, data\: :ref:`Array` = []\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_breakpoint`\ (\ path\: :ref:`String`, line\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`toggle_profiler`\ (\ profiler\: :ref:`String`, enable\: :ref:`bool`, data\: :ref:`Array` = []\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,7 +62,7 @@ Signals .. rst-class:: classref-signal -**breaked** **(** :ref:`bool` can_debug **)** +**breaked**\ (\ can_debug\: :ref:`bool`\ ) :ref:`🔗` Emitted when the attached remote instance enters a break state. If ``can_debug`` is ``true``, the remote instance will enter the debug loop. @@ -72,7 +74,7 @@ Emitted when the attached remote instance enters a break state. If ``can_debug`` .. rst-class:: classref-signal -**continued** **(** **)** +**continued**\ (\ ) :ref:`🔗` Emitted when the attached remote instance exits a break state. @@ -84,7 +86,7 @@ Emitted when the attached remote instance exits a break state. .. rst-class:: classref-signal -**started** **(** **)** +**started**\ (\ ) :ref:`🔗` Emitted when a remote instance is attached to this session (i.e. the session becomes active). @@ -96,7 +98,7 @@ Emitted when a remote instance is attached to this session (i.e. the session bec .. rst-class:: classref-signal -**stopped** **(** **)** +**stopped**\ (\ ) :ref:`🔗` Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). @@ -113,7 +115,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_session_tab** **(** :ref:`Control` control **)** +|void| **add_session_tab**\ (\ control\: :ref:`Control`\ ) :ref:`🔗` Adds the given ``control`` to the debug session UI in the debugger bottom panel. @@ -125,7 +127,7 @@ Adds the given ``control`` to the debug session UI in the debugger bottom panel. .. rst-class:: classref-method -:ref:`bool` **is_active** **(** **)** +:ref:`bool` **is_active**\ (\ ) :ref:`🔗` Returns ``true`` if the debug session is currently attached to a remote instance. @@ -137,7 +139,7 @@ Returns ``true`` if the debug session is currently attached to a remote instance .. rst-class:: classref-method -:ref:`bool` **is_breaked** **(** **)** +:ref:`bool` **is_breaked**\ (\ ) :ref:`🔗` Returns ``true`` if the attached remote instance is currently in the debug loop. @@ -149,7 +151,7 @@ Returns ``true`` if the attached remote instance is currently in the debug loop. .. rst-class:: classref-method -:ref:`bool` **is_debuggable** **(** **)** +:ref:`bool` **is_debuggable**\ (\ ) :ref:`🔗` Returns ``true`` if the attached remote instance can be debugged. @@ -161,7 +163,7 @@ Returns ``true`` if the attached remote instance can be debugged. .. rst-class:: classref-method -void **remove_session_tab** **(** :ref:`Control` control **)** +|void| **remove_session_tab**\ (\ control\: :ref:`Control`\ ) :ref:`🔗` Removes the given ``control`` from the debug session UI in the debugger bottom panel. @@ -173,7 +175,7 @@ Removes the given ``control`` from the debug session UI in the debugger bottom p .. rst-class:: classref-method -void **send_message** **(** :ref:`String` message, :ref:`Array` data=[] **)** +|void| **send_message**\ (\ message\: :ref:`String`, data\: :ref:`Array` = []\ ) :ref:`🔗` Sends the given ``message`` to the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineDebugger` for how to retrieve those messages. @@ -181,11 +183,23 @@ Sends the given ``message`` to the attached remote instance, optionally passing ---- +.. _class_EditorDebuggerSession_method_set_breakpoint: + +.. rst-class:: classref-method + +|void| **set_breakpoint**\ (\ path\: :ref:`String`, line\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Enables or disables a specific breakpoint based on ``enabled``, updating the Editor Breakpoint Panel accordingly. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorDebuggerSession_method_toggle_profiler: .. rst-class:: classref-method -void **toggle_profiler** **(** :ref:`String` profiler, :ref:`bool` enable, :ref:`Array` data=[] **)** +|void| **toggle_profiler**\ (\ profiler\: :ref:`String`, enable\: :ref:`bool`, data\: :ref:`Array` = []\ ) :ref:`🔗` Toggle the given ``profiler`` on the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineProfiler` for more details. @@ -196,3 +210,4 @@ Toggle the given ``profiler`` on the attached remote instance, optionally passin .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 7c3527cfa8d..a72b7d160f8 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -23,7 +23,43 @@ Description Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting. -Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes` and :ref:`EditorExportPlugin._begin_customize_resources` for more details. +Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes` and :ref:`EditorExportPlugin._begin_customize_resources` for more details. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Console support in Godot <../tutorials/platform/consoles>` + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_os_name`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_EditorExportPlatform_method_get_os_name: + +.. rst-class:: classref-method + +:ref:`String` **get_os_name**\ (\ ) |const| :ref:`🔗` + +Returns the name of the export operating system handled by this **EditorExportPlatform** class, as a friendly string. Possible return values are ``Windows``, ``Linux``, ``macOS``, ``Android``, ``iOS``, and ``Web``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -32,3 +68,4 @@ Used in scripting by :ref:`EditorExportPlugin` to conf .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index bd712c8b0a3..488ba86bfac 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -21,7 +21,9 @@ Tutorials - :doc:`Exporting for Android <../tutorials/export/exporting_for_android>` -- :doc:`Custom builds for Android <../tutorials/export/android_custom_build>` +- :doc:`Gradle builds for Android <../tutorials/export/android_gradle_build>` + +- :doc:`Android plugins documentation index <../tutorials/platform/index>` .. rst-class:: classref-reftable-group @@ -52,8 +54,14 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`custom_template/release` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gradle_build/android_source_template` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gradle_build/compress_native_libraries` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gradle_build/export_format` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`gradle_build/gradle_build_directory` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gradle_build/min_sdk` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gradle_build/target_sdk` | @@ -92,6 +100,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`package/show_in_android_tv` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`package/show_in_app_library` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`package/signed` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`package/unique_name` | @@ -260,6 +270,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/persistent_activity` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`permissions/post_notifications` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/process_outgoing_calls` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/read_calendar` | @@ -406,12 +418,6 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`version/name` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`xr_features/hand_tracking` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`xr_features/hand_tracking_frequency` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`xr_features/passthrough` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr_features/xr_mode` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -428,7 +434,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **apk_expansion/SALT** +:ref:`String` **apk_expansion/SALT** :ref:`🔗` Array of random bytes that the licensing Policy uses to create an `Obfuscator `__. @@ -440,11 +446,11 @@ Array of random bytes that the licensing Policy uses to create an `Obfuscator ` **apk_expansion/enable** +:ref:`bool` **apk_expansion/enable** :ref:`🔗` -If ``true``, project resources are stored in the separate APK expansion file, instead APK. +If ``true``, project resources are stored in the separate APK expansion file, instead of the APK. -\ **Note:** APK expansion should be enabled to use PCK encryption. +\ **Note:** APK expansion should be enabled to use PCK encryption. See `APK Expansion Files `__ .. rst-class:: classref-item-separator @@ -454,9 +460,9 @@ If ``true``, project resources are stored in the separate APK expansion file, in .. rst-class:: classref-property -:ref:`String` **apk_expansion/public_key** +:ref:`String` **apk_expansion/public_key** :ref:`🔗` -Base64 encoded RSA public key for your publisher account, available from the profile page on the "Play Console". +Base64 encoded RSA public key for your publisher account, available from the profile page on the "Google Play Console". .. rst-class:: classref-item-separator @@ -466,7 +472,7 @@ Base64 encoded RSA public key for your publisher account, available from the pro .. rst-class:: classref-property -:ref:`bool` **architectures/arm64-v8a** +:ref:`bool` **architectures/arm64-v8a** :ref:`🔗` If ``true``, ``arm64`` binaries are included into exported project. @@ -478,7 +484,7 @@ If ``true``, ``arm64`` binaries are included into exported project. .. rst-class:: classref-property -:ref:`bool` **architectures/armeabi-v7a** +:ref:`bool` **architectures/armeabi-v7a** :ref:`🔗` If ``true``, ``arm32`` binaries are included into exported project. @@ -490,7 +496,7 @@ If ``true``, ``arm32`` binaries are included into exported project. .. rst-class:: classref-property -:ref:`bool` **architectures/x86** +:ref:`bool` **architectures/x86** :ref:`🔗` If ``true``, ``x86_32`` binaries are included into exported project. @@ -502,7 +508,7 @@ If ``true``, ``x86_32`` binaries are included into exported project. .. rst-class:: classref-property -:ref:`bool` **architectures/x86_64** +:ref:`bool` **architectures/x86_64** :ref:`🔗` If ``true``, ``x86_64`` binaries are included into exported project. @@ -514,9 +520,9 @@ If ``true``, ``x86_64`` binaries are included into exported project. .. rst-class:: classref-property -:ref:`String` **command_line/extra_args** +:ref:`String` **command_line/extra_args** :ref:`🔗` -A list of additional command line arguments, exported project will receive when started. +A list of additional command line arguments, separated by space, which the exported project will receive when started. .. rst-class:: classref-item-separator @@ -526,9 +532,11 @@ A list of additional command line arguments, exported project will receive when .. rst-class:: classref-property -:ref:`String` **custom_template/debug** +:ref:`String` **custom_template/debug** :ref:`🔗` + +Path to an APK file to use as a custom export template for debug exports. If left empty, default template is used. -Path to the custom export template. If left empty, default template is used. +\ **Note:** This is only used if :ref:`gradle_build/use_gradle_build` is disabled. .. rst-class:: classref-item-separator @@ -538,9 +546,37 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **custom_template/release** +:ref:`String` **custom_template/release** :ref:`🔗` -Path to the custom export template. If left empty, default template is used. +Path to an APK file to use as a custom export template for release exports. If left empty, default template is used. + +\ **Note:** This is only used if :ref:`gradle_build/use_gradle_build` is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/android_source_template: + +.. rst-class:: classref-property + +:ref:`String` **gradle_build/android_source_template** :ref:`🔗` + +Path to a ZIP file holding the source for the export template used in a Gradle build. If left empty, the default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/compress_native_libraries: + +.. rst-class:: classref-property + +:ref:`bool` **gradle_build/compress_native_libraries** :ref:`🔗` + +If ``true``, native libraries are compressed when performing a Gradle build. + +\ **Note:** Although your binary may be smaller, your application may load slower because the native libraries are not loaded directly from the binary at runtime. .. rst-class:: classref-item-separator @@ -550,9 +586,21 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`int` **gradle_build/export_format** +:ref:`int` **gradle_build/export_format** :ref:`🔗` + +Application export format (\*.apk or \*.aab). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_gradle_build/gradle_build_directory: + +.. rst-class:: classref-property + +:ref:`String` **gradle_build/gradle_build_directory** :ref:`🔗` -Export format for Gradle build. +Path to the Gradle build directory. If left empty, then ``res://android`` will be used. .. rst-class:: classref-item-separator @@ -562,9 +610,9 @@ Export format for Gradle build. .. rst-class:: classref-property -:ref:`String` **gradle_build/min_sdk** +:ref:`String` **gradle_build/min_sdk** :ref:`🔗` -Minimal Android SDK version for Gradle build. +Minimum Android API level required for the application to run (used during Gradle build). See `android:minSdkVersion `__. .. rst-class:: classref-item-separator @@ -574,9 +622,9 @@ Minimal Android SDK version for Gradle build. .. rst-class:: classref-property -:ref:`String` **gradle_build/target_sdk** +:ref:`String` **gradle_build/target_sdk** :ref:`🔗` -Target Android SDK version for Gradle build. +The Android API level on which the application is designed to run (used during Gradle build). See `android:targetSdkVersion `__. .. rst-class:: classref-item-separator @@ -586,7 +634,7 @@ Target Android SDK version for Gradle build. .. rst-class:: classref-property -:ref:`bool` **gradle_build/use_gradle_build** +:ref:`bool` **gradle_build/use_gradle_build** :ref:`🔗` If ``true``, Gradle build is used instead of pre-built APK. @@ -598,7 +646,7 @@ If ``true``, Gradle build is used instead of pre-built APK. .. rst-class:: classref-property -:ref:`bool` **graphics/opengl_debug** +:ref:`bool` **graphics/opengl_debug** :ref:`🔗` If ``true``, OpenGL ES debug context will be created (additional runtime checking, validation, and logging). @@ -610,7 +658,7 @@ If ``true``, OpenGL ES debug context will be created (additional runtime checkin .. rst-class:: classref-property -:ref:`String` **keystore/debug** +:ref:`String` **keystore/debug** :ref:`🔗` Path of the debug keystore file. @@ -626,7 +674,7 @@ Fallbacks to ``EditorSettings.export/android/debug_keystore`` if empty. .. rst-class:: classref-property -:ref:`String` **keystore/debug_password** +:ref:`String` **keystore/debug_password** :ref:`🔗` Password for the debug keystore file. @@ -642,7 +690,7 @@ Fallbacks to ``EditorSettings.export/android/debug_keystore_pass`` if both it an .. rst-class:: classref-property -:ref:`String` **keystore/debug_user** +:ref:`String` **keystore/debug_user** :ref:`🔗` User name for the debug keystore file. @@ -658,7 +706,7 @@ Fallbacks to ``EditorSettings.export/android/debug_keystore_user`` if both it an .. rst-class:: classref-property -:ref:`String` **keystore/release** +:ref:`String` **keystore/release** :ref:`🔗` Path of the release keystore file. @@ -672,7 +720,7 @@ Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE .. rst-class:: classref-property -:ref:`String` **keystore/release_password** +:ref:`String` **keystore/release_password** :ref:`🔗` Password for the release keystore file. @@ -686,7 +734,7 @@ Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE .. rst-class:: classref-property -:ref:`String` **keystore/release_user** +:ref:`String` **keystore/release_user** :ref:`🔗` User name for the release keystore file. @@ -700,9 +748,9 @@ Can be overridden with the environment variable ``GODOT_ANDROID_KEYSTORE_RELEASE .. rst-class:: classref-property -:ref:`String` **launcher_icons/adaptive_background_432x432** +:ref:`String` **launcher_icons/adaptive_background_432x432** :ref:`🔗` -Background layer of the application adaptive icon file. +Background layer of the application adaptive icon file. See `Design adaptive icons `__. .. rst-class:: classref-item-separator @@ -712,9 +760,9 @@ Background layer of the application adaptive icon file. .. rst-class:: classref-property -:ref:`String` **launcher_icons/adaptive_foreground_432x432** +:ref:`String` **launcher_icons/adaptive_foreground_432x432** :ref:`🔗` -Foreground layer of the application adaptive icon file. +Foreground layer of the application adaptive icon file. See `Design adaptive icons `__. .. rst-class:: classref-item-separator @@ -724,7 +772,7 @@ Foreground layer of the application adaptive icon file. .. rst-class:: classref-property -:ref:`String` **launcher_icons/main_192x192** +:ref:`String` **launcher_icons/main_192x192** :ref:`🔗` Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. @@ -736,9 +784,9 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. .. rst-class:: classref-property -:ref:`int` **package/app_category** +:ref:`int` **package/app_category** :ref:`🔗` -Application category for the Play Store. +Application category for the Google Play Store. Only define this if your application fits one of the categories well. See `android:appCategory `__. .. rst-class:: classref-item-separator @@ -748,9 +796,9 @@ Application category for the Play Store. .. rst-class:: classref-property -:ref:`bool` **package/exclude_from_recents** +:ref:`bool` **package/exclude_from_recents** :ref:`🔗` -If ``true``, task initiated by main activity will be excluded from the list of recently used applications. +If ``true``, task initiated by main activity will be excluded from the list of recently used applications. See `android:excludeFromRecents `__. .. rst-class:: classref-item-separator @@ -760,7 +808,7 @@ If ``true``, task initiated by main activity will be excluded from the list of r .. rst-class:: classref-property -:ref:`String` **package/name** +:ref:`String` **package/name** :ref:`🔗` Name of the application. @@ -772,9 +820,9 @@ Name of the application. .. rst-class:: classref-property -:ref:`bool` **package/retain_data_on_uninstall** +:ref:`bool` **package/retain_data_on_uninstall** :ref:`🔗` -If ``true``, when the user uninstalls an app, a prompt to keep the app's data will be shown. +If ``true``, when the user uninstalls an app, a prompt to keep the app's data will be shown. See `android:hasFragileUserData `__. .. rst-class:: classref-item-separator @@ -784,7 +832,7 @@ If ``true``, when the user uninstalls an app, a prompt to keep the app's data wi .. rst-class:: classref-property -:ref:`bool` **package/show_as_launcher_app** +:ref:`bool` **package/show_as_launcher_app** :ref:`🔗` If ``true``, the user will be able to set this app as the system launcher in Android preferences. @@ -796,7 +844,7 @@ If ``true``, the user will be able to set this app as the system launcher in And .. rst-class:: classref-property -:ref:`bool` **package/show_in_android_tv** +:ref:`bool` **package/show_in_android_tv** :ref:`🔗` If ``true``, this app will show in Android TV launcher UI. @@ -804,11 +852,25 @@ If ``true``, this app will show in Android TV launcher UI. ---- +.. _class_EditorExportPlatformAndroid_property_package/show_in_app_library: + +.. rst-class:: classref-property + +:ref:`bool` **package/show_in_app_library** :ref:`🔗` + +If ``true``, this app will show in the device's app library. + +\ **Note:** This is ``true`` by default. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformAndroid_property_package/signed: .. rst-class:: classref-property -:ref:`bool` **package/signed** +:ref:`bool` **package/signed** :ref:`🔗` If ``true``, package signing is enabled. @@ -820,9 +882,15 @@ If ``true``, package signing is enabled. .. rst-class:: classref-property -:ref:`String` **package/unique_name** +:ref:`String` **package/unique_name** :ref:`🔗` -Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). +Unique application identifier in a reverse-DNS format. The reverse DNS format should preferably match a domain name you control, but this is not strictly required. For instance, if you own ``example.com``, your package unique name should preferably be of the form ``com.example.mygame``. This identifier can only contain lowercase alphanumeric characters (``a-z``, and ``0-9``), underscores (``_``), and periods (``.``). Each component of the reverse DNS format must start with a letter: for instance, ``com.example.8game`` is not valid. + +If ``$genname`` is present in the value, it will be replaced by the project name converted to lowercase. If there are invalid characters in the project name, they will be stripped. If all characters in the project name are stripped, ``$genname`` is replaced by ``noname``. + +\ **Note:** Changing the package name will cause the package to be considered as a new package, with its own installation and data paths. The new package won't be usable to update existing installations. + +\ **Note:** When publishing to Google Play, the package name must be *globally* unique. This means no other apps published on Google Play must be using the same package name as yours. Otherwise, you'll be prevented from publishing your app on Google Play. .. rst-class:: classref-item-separator @@ -832,7 +900,7 @@ Unique application identifier in a reverse-DNS format, can only contain alphanum .. rst-class:: classref-property -:ref:`bool` **permissions/access_checkin_properties** +:ref:`bool` **permissions/access_checkin_properties** :ref:`🔗` Allows read/write access to the "properties" table in the checkin database. See `ACCESS_CHECKIN_PROPERTIES `__. @@ -844,7 +912,7 @@ Allows read/write access to the "properties" table in the checkin database. See .. rst-class:: classref-property -:ref:`bool` **permissions/access_coarse_location** +:ref:`bool` **permissions/access_coarse_location** :ref:`🔗` Allows access to the approximate location information. See `ACCESS_COARSE_LOCATION `__. @@ -856,7 +924,7 @@ Allows access to the approximate location information. See `ACCESS_COARSE_LOCATI .. rst-class:: classref-property -:ref:`bool` **permissions/access_fine_location** +:ref:`bool` **permissions/access_fine_location** :ref:`🔗` Allows access to the precise location information. See `ACCESS_FINE_LOCATION `__. @@ -868,7 +936,7 @@ Allows access to the precise location information. See `ACCESS_FINE_LOCATION ` **permissions/access_location_extra_commands** +:ref:`bool` **permissions/access_location_extra_commands** :ref:`🔗` Allows access to the extra location provider commands. See `ACCESS_LOCATION_EXTRA_COMMANDS `__. @@ -880,7 +948,7 @@ Allows access to the extra location provider commands. See `ACCESS_LOCATION_EXTR .. rst-class:: classref-property -:ref:`bool` **permissions/access_mock_location** +:ref:`bool` **permissions/access_mock_location** :ref:`🔗` Allows an application to create mock location providers for testing. @@ -892,7 +960,7 @@ Allows an application to create mock location providers for testing. .. rst-class:: classref-property -:ref:`bool` **permissions/access_network_state** +:ref:`bool` **permissions/access_network_state** :ref:`🔗` Allows access to the information about networks. See `ACCESS_NETWORK_STATE `__. @@ -904,7 +972,7 @@ Allows access to the information about networks. See `ACCESS_NETWORK_STATE ` **permissions/access_surface_flinger** +:ref:`bool` **permissions/access_surface_flinger** :ref:`🔗` Allows an application to use SurfaceFlinger's low level features. @@ -916,7 +984,7 @@ Allows an application to use SurfaceFlinger's low level features. .. rst-class:: classref-property -:ref:`bool` **permissions/access_wifi_state** +:ref:`bool` **permissions/access_wifi_state** :ref:`🔗` Allows access to the information about Wi-Fi networks. See `ACCESS_WIFI_STATE `__. @@ -928,7 +996,7 @@ Allows access to the information about Wi-Fi networks. See `ACCESS_WIFI_STATE ` **permissions/account_manager** +:ref:`bool` **permissions/account_manager** :ref:`🔗` Allows applications to call into AccountAuthenticators. See `ACCOUNT_MANAGER `__. @@ -940,7 +1008,7 @@ Allows applications to call into AccountAuthenticators. See `ACCOUNT_MANAGER ` **permissions/add_voicemail** +:ref:`bool` **permissions/add_voicemail** :ref:`🔗` Allows an application to add voicemails into the system. See `ADD_VOICEMAIL `__. @@ -952,7 +1020,7 @@ Allows an application to add voicemails into the system. See `ADD_VOICEMAIL ` **permissions/authenticate_accounts** +:ref:`bool` **permissions/authenticate_accounts** :ref:`🔗` Allows an application to act as an AccountAuthenticator for the AccountManager. @@ -964,9 +1032,9 @@ Allows an application to act as an AccountAuthenticator for the AccountManager. .. rst-class:: classref-property -:ref:`bool` **permissions/battery_stats** +:ref:`bool` **permissions/battery_stats** :ref:`🔗` -Allows an application to collect battery statistics. Sett `BATTERY_STATS `__. +Allows an application to collect battery statistics. See `BATTERY_STATS `__. .. rst-class:: classref-item-separator @@ -976,7 +1044,7 @@ Allows an application to collect battery statistics. Sett `BATTERY_STATS ` **permissions/bind_accessibility_service** +:ref:`bool` **permissions/bind_accessibility_service** :ref:`🔗` Must be required by an AccessibilityService, to ensure that only the system can bind to it. See `BIND_ACCESSIBILITY_SERVICE `__. @@ -988,7 +1056,7 @@ Must be required by an AccessibilityService, to ensure that only the system can .. rst-class:: classref-property -:ref:`bool` **permissions/bind_appwidget** +:ref:`bool` **permissions/bind_appwidget** :ref:`🔗` Allows an application to tell the AppWidget service which application can access AppWidget's data. See `BIND_APPWIDGET `__. @@ -1000,7 +1068,7 @@ Allows an application to tell the AppWidget service which application can access .. rst-class:: classref-property -:ref:`bool` **permissions/bind_device_admin** +:ref:`bool` **permissions/bind_device_admin** :ref:`🔗` Must be required by device administration receiver, to ensure that only the system can interact with it. See `BIND_DEVICE_ADMIN `__. @@ -1012,7 +1080,7 @@ Must be required by device administration receiver, to ensure that only the syst .. rst-class:: classref-property -:ref:`bool` **permissions/bind_input_method** +:ref:`bool` **permissions/bind_input_method** :ref:`🔗` Must be required by an InputMethodService, to ensure that only the system can bind to it. See `BIND_INPUT_METHOD `__. @@ -1024,7 +1092,7 @@ Must be required by an InputMethodService, to ensure that only the system can bi .. rst-class:: classref-property -:ref:`bool` **permissions/bind_nfc_service** +:ref:`bool` **permissions/bind_nfc_service** :ref:`🔗` Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it. See `BIND_NFC_SERVICE `__. @@ -1036,7 +1104,7 @@ Must be required by a HostApduService or OffHostApduService to ensure that only .. rst-class:: classref-property -:ref:`bool` **permissions/bind_notification_listener_service** +:ref:`bool` **permissions/bind_notification_listener_service** :ref:`🔗` Must be required by a NotificationListenerService, to ensure that only the system can bind to it. See `BIND_NOTIFICATION_LISTENER_SERVICE `__. @@ -1048,7 +1116,7 @@ Must be required by a NotificationListenerService, to ensure that only the syste .. rst-class:: classref-property -:ref:`bool` **permissions/bind_print_service** +:ref:`bool` **permissions/bind_print_service** :ref:`🔗` Must be required by a PrintService, to ensure that only the system can bind to it. See `BIND_PRINT_SERVICE `__. @@ -1060,7 +1128,7 @@ Must be required by a PrintService, to ensure that only the system can bind to i .. rst-class:: classref-property -:ref:`bool` **permissions/bind_remoteviews** +:ref:`bool` **permissions/bind_remoteviews** :ref:`🔗` Must be required by a RemoteViewsService, to ensure that only the system can bind to it. See `BIND_REMOTEVIEWS `__. @@ -1072,7 +1140,7 @@ Must be required by a RemoteViewsService, to ensure that only the system can bin .. rst-class:: classref-property -:ref:`bool` **permissions/bind_text_service** +:ref:`bool` **permissions/bind_text_service** :ref:`🔗` Must be required by a TextService (e.g. SpellCheckerService) to ensure that only the system can bind to it. See `BIND_TEXT_SERVICE `__. @@ -1084,7 +1152,7 @@ Must be required by a TextService (e.g. SpellCheckerService) to ensure that only .. rst-class:: classref-property -:ref:`bool` **permissions/bind_vpn_service** +:ref:`bool` **permissions/bind_vpn_service** :ref:`🔗` Must be required by a VpnService, to ensure that only the system can bind to it. See `BIND_VPN_SERVICE `__. @@ -1096,7 +1164,7 @@ Must be required by a VpnService, to ensure that only the system can bind to it. .. rst-class:: classref-property -:ref:`bool` **permissions/bind_wallpaper** +:ref:`bool` **permissions/bind_wallpaper** :ref:`🔗` Must be required by a WallpaperService, to ensure that only the system can bind to it. See `BIND_WALLPAPER `__. @@ -1108,7 +1176,7 @@ Must be required by a WallpaperService, to ensure that only the system can bind .. rst-class:: classref-property -:ref:`bool` **permissions/bluetooth** +:ref:`bool` **permissions/bluetooth** :ref:`🔗` Allows applications to connect to paired bluetooth devices. See `BLUETOOTH `__. @@ -1120,7 +1188,7 @@ Allows applications to connect to paired bluetooth devices. See `BLUETOOTH ` **permissions/bluetooth_admin** +:ref:`bool` **permissions/bluetooth_admin** :ref:`🔗` Allows applications to discover and pair bluetooth devices. See `BLUETOOTH_ADMIN `__. @@ -1132,7 +1200,7 @@ Allows applications to discover and pair bluetooth devices. See `BLUETOOTH_ADMIN .. rst-class:: classref-property -:ref:`bool` **permissions/bluetooth_privileged** +:ref:`bool` **permissions/bluetooth_privileged** :ref:`🔗` Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access. See `BLUETOOTH_PRIVILEGED `__. @@ -1144,7 +1212,7 @@ Allows applications to pair bluetooth devices without user interaction, and to a .. rst-class:: classref-property -:ref:`bool` **permissions/brick** +:ref:`bool` **permissions/brick** :ref:`🔗` Required to be able to disable the device (very dangerous!). @@ -1156,7 +1224,7 @@ Required to be able to disable the device (very dangerous!). .. rst-class:: classref-property -:ref:`bool` **permissions/broadcast_package_removed** +:ref:`bool` **permissions/broadcast_package_removed** :ref:`🔗` Allows an application to broadcast a notification that an application package has been removed. See `BROADCAST_PACKAGE_REMOVED `__. @@ -1168,7 +1236,7 @@ Allows an application to broadcast a notification that an application package ha .. rst-class:: classref-property -:ref:`bool` **permissions/broadcast_sms** +:ref:`bool` **permissions/broadcast_sms** :ref:`🔗` Allows an application to broadcast an SMS receipt notification. See `BROADCAST_SMS `__. @@ -1180,7 +1248,7 @@ Allows an application to broadcast an SMS receipt notification. See `BROADCAST_S .. rst-class:: classref-property -:ref:`bool` **permissions/broadcast_sticky** +:ref:`bool` **permissions/broadcast_sticky** :ref:`🔗` Allows an application to broadcast sticky intents. See `BROADCAST_STICKY `__. @@ -1192,7 +1260,7 @@ Allows an application to broadcast sticky intents. See `BROADCAST_STICKY ` **permissions/broadcast_wap_push** +:ref:`bool` **permissions/broadcast_wap_push** :ref:`🔗` Allows an application to broadcast a WAP PUSH receipt notification. See `BROADCAST_WAP_PUSH `__. @@ -1204,7 +1272,7 @@ Allows an application to broadcast a WAP PUSH receipt notification. See `BROADCA .. rst-class:: classref-property -:ref:`bool` **permissions/call_phone** +:ref:`bool` **permissions/call_phone** :ref:`🔗` Allows an application to initiate a phone call without going through the Dialer user interface. See `CALL_PHONE `__. @@ -1216,7 +1284,7 @@ Allows an application to initiate a phone call without going through the Dialer .. rst-class:: classref-property -:ref:`bool` **permissions/call_privileged** +:ref:`bool` **permissions/call_privileged** :ref:`🔗` Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface. See `CALL_PRIVILEGED `__. @@ -1228,7 +1296,7 @@ Allows an application to call any phone number, including emergency numbers, wit .. rst-class:: classref-property -:ref:`bool` **permissions/camera** +:ref:`bool` **permissions/camera** :ref:`🔗` Required to be able to access the camera device. See `CAMERA `__. @@ -1240,7 +1308,7 @@ Required to be able to access the camera device. See `CAMERA ` **permissions/capture_audio_output** +:ref:`bool` **permissions/capture_audio_output** :ref:`🔗` Allows an application to capture audio output. See `CAPTURE_AUDIO_OUTPUT `__. @@ -1252,7 +1320,7 @@ Allows an application to capture audio output. See `CAPTURE_AUDIO_OUTPUT ` **permissions/capture_secure_video_output** +:ref:`bool` **permissions/capture_secure_video_output** :ref:`🔗` Allows an application to capture secure video output. @@ -1264,7 +1332,7 @@ Allows an application to capture secure video output. .. rst-class:: classref-property -:ref:`bool` **permissions/capture_video_output** +:ref:`bool` **permissions/capture_video_output** :ref:`🔗` Allows an application to capture video output. @@ -1276,7 +1344,7 @@ Allows an application to capture video output. .. rst-class:: classref-property -:ref:`bool` **permissions/change_component_enabled_state** +:ref:`bool` **permissions/change_component_enabled_state** :ref:`🔗` Allows an application to change whether an application component (other than its own) is enabled or not. See `CHANGE_COMPONENT_ENABLED_STATE `__. @@ -1288,7 +1356,7 @@ Allows an application to change whether an application component (other than its .. rst-class:: classref-property -:ref:`bool` **permissions/change_configuration** +:ref:`bool` **permissions/change_configuration** :ref:`🔗` Allows an application to modify the current configuration, such as locale. See `CHANGE_CONFIGURATION `__. @@ -1300,7 +1368,7 @@ Allows an application to modify the current configuration, such as locale. See ` .. rst-class:: classref-property -:ref:`bool` **permissions/change_network_state** +:ref:`bool` **permissions/change_network_state** :ref:`🔗` Allows applications to change network connectivity state. See `CHANGE_NETWORK_STATE `__. @@ -1312,7 +1380,7 @@ Allows applications to change network connectivity state. See `CHANGE_NETWORK_ST .. rst-class:: classref-property -:ref:`bool` **permissions/change_wifi_multicast_state** +:ref:`bool` **permissions/change_wifi_multicast_state** :ref:`🔗` Allows applications to enter Wi-Fi Multicast mode. See `CHANGE_WIFI_MULTICAST_STATE `__. @@ -1324,7 +1392,7 @@ Allows applications to enter Wi-Fi Multicast mode. See `CHANGE_WIFI_MULTICAST_ST .. rst-class:: classref-property -:ref:`bool` **permissions/change_wifi_state** +:ref:`bool` **permissions/change_wifi_state** :ref:`🔗` Allows applications to change Wi-Fi connectivity state. See `CHANGE_WIFI_STATE `__. @@ -1336,7 +1404,7 @@ Allows applications to change Wi-Fi connectivity state. See `CHANGE_WIFI_STATE < .. rst-class:: classref-property -:ref:`bool` **permissions/clear_app_cache** +:ref:`bool` **permissions/clear_app_cache** :ref:`🔗` Allows an application to clear the caches of all installed applications on the device. See `CLEAR_APP_CACHE `__. @@ -1348,7 +1416,7 @@ Allows an application to clear the caches of all installed applications on the d .. rst-class:: classref-property -:ref:`bool` **permissions/clear_app_user_data** +:ref:`bool` **permissions/clear_app_user_data** :ref:`🔗` Allows an application to clear user data. @@ -1360,7 +1428,7 @@ Allows an application to clear user data. .. rst-class:: classref-property -:ref:`bool` **permissions/control_location_updates** +:ref:`bool` **permissions/control_location_updates** :ref:`🔗` Allows enabling/disabling location update notifications from the radio. See `CONTROL_LOCATION_UPDATES `__. @@ -1372,10 +1440,12 @@ Allows enabling/disabling location update notifications from the radio. See `CON .. rst-class:: classref-property -:ref:`PackedStringArray` **permissions/custom_permissions** +:ref:`PackedStringArray` **permissions/custom_permissions** :ref:`🔗` Array of custom permission strings. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -1384,9 +1454,9 @@ Array of custom permission strings. .. rst-class:: classref-property -:ref:`bool` **permissions/delete_cache_files** +:ref:`bool` **permissions/delete_cache_files** :ref:`🔗` -Deprecated. +**Deprecated:** This property may be changed or removed in future versions. .. rst-class:: classref-item-separator @@ -1396,7 +1466,7 @@ Deprecated. .. rst-class:: classref-property -:ref:`bool` **permissions/delete_packages** +:ref:`bool` **permissions/delete_packages** :ref:`🔗` Allows an application to delete packages. See `DELETE_PACKAGES `__. @@ -1408,7 +1478,7 @@ Allows an application to delete packages. See `DELETE_PACKAGES ` **permissions/device_power** +:ref:`bool` **permissions/device_power** :ref:`🔗` Allows low-level access to power management. @@ -1420,7 +1490,7 @@ Allows low-level access to power management. .. rst-class:: classref-property -:ref:`bool` **permissions/diagnostic** +:ref:`bool` **permissions/diagnostic** :ref:`🔗` Allows applications to RW to diagnostic resources. See `DIAGNOSTIC `__. @@ -1432,7 +1502,7 @@ Allows applications to RW to diagnostic resources. See `DIAGNOSTIC ` **permissions/disable_keyguard** +:ref:`bool` **permissions/disable_keyguard** :ref:`🔗` Allows applications to disable the keyguard if it is not secure. See `DISABLE_KEYGUARD `__. @@ -1444,7 +1514,7 @@ Allows applications to disable the keyguard if it is not secure. See `DISABLE_KE .. rst-class:: classref-property -:ref:`bool` **permissions/dump** +:ref:`bool` **permissions/dump** :ref:`🔗` Allows an application to retrieve state dump information from system services. See `DUMP `__. @@ -1456,7 +1526,7 @@ Allows an application to retrieve state dump information from system services. S .. rst-class:: classref-property -:ref:`bool` **permissions/expand_status_bar** +:ref:`bool` **permissions/expand_status_bar** :ref:`🔗` Allows an application to expand or collapse the status bar. See `EXPAND_STATUS_BAR `__. @@ -1468,7 +1538,7 @@ Allows an application to expand or collapse the status bar. See `EXPAND_STATUS_B .. rst-class:: classref-property -:ref:`bool` **permissions/factory_test** +:ref:`bool` **permissions/factory_test** :ref:`🔗` Run as a manufacturer test application, running as the root user. See `FACTORY_TEST `__. @@ -1480,7 +1550,7 @@ Run as a manufacturer test application, running as the root user. See `FACTORY_T .. rst-class:: classref-property -:ref:`bool` **permissions/flashlight** +:ref:`bool` **permissions/flashlight** :ref:`🔗` Allows access to the flashlight. @@ -1492,7 +1562,7 @@ Allows access to the flashlight. .. rst-class:: classref-property -:ref:`bool` **permissions/force_back** +:ref:`bool` **permissions/force_back** :ref:`🔗` Allows an application to force a BACK operation on whatever is the top activity. @@ -1504,7 +1574,7 @@ Allows an application to force a BACK operation on whatever is the top activity. .. rst-class:: classref-property -:ref:`bool` **permissions/get_accounts** +:ref:`bool` **permissions/get_accounts** :ref:`🔗` Allows access to the list of accounts in the Accounts Service. See `GET_ACCOUNTS `__. @@ -1516,7 +1586,7 @@ Allows access to the list of accounts in the Accounts Service. See `GET_ACCOUNTS .. rst-class:: classref-property -:ref:`bool` **permissions/get_package_size** +:ref:`bool` **permissions/get_package_size** :ref:`🔗` Allows an application to find out the space used by any package. See `GET_PACKAGE_SIZE `__. @@ -1528,9 +1598,9 @@ Allows an application to find out the space used by any package. See `GET_PACKAG .. rst-class:: classref-property -:ref:`bool` **permissions/get_tasks** +:ref:`bool` **permissions/get_tasks** :ref:`🔗` -Deprecated in API level 21. +**Deprecated:** Deprecated in API level 21. .. rst-class:: classref-item-separator @@ -1540,7 +1610,7 @@ Deprecated in API level 21. .. rst-class:: classref-property -:ref:`bool` **permissions/get_top_activity_info** +:ref:`bool` **permissions/get_top_activity_info** :ref:`🔗` Allows an application to retrieve private information about the current top activity. @@ -1552,7 +1622,7 @@ Allows an application to retrieve private information about the current top acti .. rst-class:: classref-property -:ref:`bool` **permissions/global_search** +:ref:`bool` **permissions/global_search** :ref:`🔗` Used on content providers to allow the global search system to access their data. See `GLOBAL_SEARCH `__. @@ -1564,7 +1634,7 @@ Used on content providers to allow the global search system to access their data .. rst-class:: classref-property -:ref:`bool` **permissions/hardware_test** +:ref:`bool` **permissions/hardware_test** :ref:`🔗` Allows access to hardware peripherals. @@ -1576,7 +1646,7 @@ Allows access to hardware peripherals. .. rst-class:: classref-property -:ref:`bool` **permissions/inject_events** +:ref:`bool` **permissions/inject_events** :ref:`🔗` Allows an application to inject user events (keys, touch, trackball) into the event stream and deliver them to ANY window. @@ -1588,7 +1658,7 @@ Allows an application to inject user events (keys, touch, trackball) into the ev .. rst-class:: classref-property -:ref:`bool` **permissions/install_location_provider** +:ref:`bool` **permissions/install_location_provider** :ref:`🔗` Allows an application to install a location provider into the Location Manager. See `INSTALL_LOCATION_PROVIDER `__. @@ -1600,7 +1670,7 @@ Allows an application to install a location provider into the Location Manager. .. rst-class:: classref-property -:ref:`bool` **permissions/install_packages** +:ref:`bool` **permissions/install_packages** :ref:`🔗` Allows an application to install packages. See `INSTALL_PACKAGES `__. @@ -1612,7 +1682,7 @@ Allows an application to install packages. See `INSTALL_PACKAGES ` **permissions/install_shortcut** +:ref:`bool` **permissions/install_shortcut** :ref:`🔗` Allows an application to install a shortcut in Launcher. See `INSTALL_SHORTCUT `__. @@ -1624,7 +1694,7 @@ Allows an application to install a shortcut in Launcher. See `INSTALL_SHORTCUT < .. rst-class:: classref-property -:ref:`bool` **permissions/internal_system_window** +:ref:`bool` **permissions/internal_system_window** :ref:`🔗` Allows an application to open windows that are for use by parts of the system user interface. @@ -1636,7 +1706,7 @@ Allows an application to open windows that are for use by parts of the system us .. rst-class:: classref-property -:ref:`bool` **permissions/internet** +:ref:`bool` **permissions/internet** :ref:`🔗` Allows applications to open network sockets. See `INTERNET `__. @@ -1648,7 +1718,7 @@ Allows applications to open network sockets. See `INTERNET ` **permissions/kill_background_processes** +:ref:`bool` **permissions/kill_background_processes** :ref:`🔗` Allows an application to call ActivityManager.killBackgroundProcesses(String). See `KILL_BACKGROUND_PROCESSES `__. @@ -1660,7 +1730,7 @@ Allows an application to call ActivityManager.killBackgroundProcesses(String). S .. rst-class:: classref-property -:ref:`bool` **permissions/location_hardware** +:ref:`bool` **permissions/location_hardware** :ref:`🔗` Allows an application to use location features in hardware, such as the geofencing api. See `LOCATION_HARDWARE `__. @@ -1672,7 +1742,7 @@ Allows an application to use location features in hardware, such as the geofenci .. rst-class:: classref-property -:ref:`bool` **permissions/manage_accounts** +:ref:`bool` **permissions/manage_accounts** :ref:`🔗` Allows an application to manage the list of accounts in the AccountManager. @@ -1684,7 +1754,7 @@ Allows an application to manage the list of accounts in the AccountManager. .. rst-class:: classref-property -:ref:`bool` **permissions/manage_app_tokens** +:ref:`bool` **permissions/manage_app_tokens** :ref:`🔗` Allows an application to manage (create, destroy, Z-order) application tokens in the window manager. @@ -1696,7 +1766,7 @@ Allows an application to manage (create, destroy, Z-order) application tokens in .. rst-class:: classref-property -:ref:`bool` **permissions/manage_documents** +:ref:`bool` **permissions/manage_documents** :ref:`🔗` Allows an application to manage access to documents, usually as part of a document picker. See `MANAGE_DOCUMENTS `__. @@ -1708,7 +1778,7 @@ Allows an application to manage access to documents, usually as part of a docume .. rst-class:: classref-property -:ref:`bool` **permissions/manage_external_storage** +:ref:`bool` **permissions/manage_external_storage** :ref:`🔗` Allows an application a broad access to external storage in scoped storage. See `MANAGE_EXTERNAL_STORAGE `__. @@ -1720,7 +1790,7 @@ Allows an application a broad access to external storage in scoped storage. See .. rst-class:: classref-property -:ref:`bool` **permissions/master_clear** +:ref:`bool` **permissions/master_clear** :ref:`🔗` See `MASTER_CLEAR `__. @@ -1732,7 +1802,7 @@ See `MASTER_CLEAR ` **permissions/media_content_control** +:ref:`bool` **permissions/media_content_control** :ref:`🔗` Allows an application to know what content is playing and control its playback. See `MEDIA_CONTENT_CONTROL `__. @@ -1744,7 +1814,7 @@ Allows an application to know what content is playing and control its playback. .. rst-class:: classref-property -:ref:`bool` **permissions/modify_audio_settings** +:ref:`bool` **permissions/modify_audio_settings** :ref:`🔗` Allows an application to modify global audio settings. See `MODIFY_AUDIO_SETTINGS `__. @@ -1756,7 +1826,7 @@ Allows an application to modify global audio settings. See `MODIFY_AUDIO_SETTING .. rst-class:: classref-property -:ref:`bool` **permissions/modify_phone_state** +:ref:`bool` **permissions/modify_phone_state** :ref:`🔗` Allows modification of the telephony state - power on, mmi, etc. Does not include placing calls. See `MODIFY_PHONE_STATE `__. @@ -1768,7 +1838,7 @@ Allows modification of the telephony state - power on, mmi, etc. Does not includ .. rst-class:: classref-property -:ref:`bool` **permissions/mount_format_filesystems** +:ref:`bool` **permissions/mount_format_filesystems** :ref:`🔗` Allows formatting file systems for removable storage. See `MOUNT_FORMAT_FILESYSTEMS `__. @@ -1780,7 +1850,7 @@ Allows formatting file systems for removable storage. See `MOUNT_FORMAT_FILESYST .. rst-class:: classref-property -:ref:`bool` **permissions/mount_unmount_filesystems** +:ref:`bool` **permissions/mount_unmount_filesystems** :ref:`🔗` Allows mounting and unmounting file systems for removable storage. See `MOUNT_UNMOUNT_FILESYSTEMS `__. @@ -1792,7 +1862,7 @@ Allows mounting and unmounting file systems for removable storage. See `MOUNT_UN .. rst-class:: classref-property -:ref:`bool` **permissions/nfc** +:ref:`bool` **permissions/nfc** :ref:`🔗` Allows applications to perform I/O operations over NFC. See `NFC `__. @@ -1804,11 +1874,23 @@ Allows applications to perform I/O operations over NFC. See `NFC ` **permissions/persistent_activity** +:ref:`bool` **permissions/persistent_activity** :ref:`🔗` + +**Deprecated:** Deprecated in API level 15. + +Allows an application to make its activities persistent. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformAndroid_property_permissions/post_notifications: + +.. rst-class:: classref-property -Allow an application to make its activities persistent. +:ref:`bool` **permissions/post_notifications** :ref:`🔗` -Deprecated in API level 15. +Allows an application to post notifications. Added in API level 33. See `Notification runtime permission `__. .. rst-class:: classref-item-separator @@ -1818,11 +1900,11 @@ Deprecated in API level 15. .. rst-class:: classref-property -:ref:`bool` **permissions/process_outgoing_calls** +:ref:`bool` **permissions/process_outgoing_calls** :ref:`🔗` -Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether. See `PROCESS_OUTGOING_CALLS `__. +**Deprecated:** Deprecated in API level 29. -Deprecated in API level 29. +Allows an application to see the number being dialed during an outgoing call with the option to redirect the call to a different number or abort the call altogether. See `PROCESS_OUTGOING_CALLS `__. .. rst-class:: classref-item-separator @@ -1832,7 +1914,7 @@ Deprecated in API level 29. .. rst-class:: classref-property -:ref:`bool` **permissions/read_calendar** +:ref:`bool` **permissions/read_calendar** :ref:`🔗` Allows an application to read the user's calendar data. See `READ_CALENDAR `__. @@ -1844,7 +1926,7 @@ Allows an application to read the user's calendar data. See `READ_CALENDAR ` **permissions/read_call_log** +:ref:`bool` **permissions/read_call_log** :ref:`🔗` Allows an application to read the user's call log. See `READ_CALL_LOG `__. @@ -1856,7 +1938,7 @@ Allows an application to read the user's call log. See `READ_CALL_LOG ` **permissions/read_contacts** +:ref:`bool` **permissions/read_contacts** :ref:`🔗` Allows an application to read the user's contacts data. See `READ_CONTACTS `__. @@ -1868,11 +1950,11 @@ Allows an application to read the user's contacts data. See `READ_CONTACTS ` **permissions/read_external_storage** +:ref:`bool` **permissions/read_external_storage** :ref:`🔗` -Allows an application to read from external storage. See `READ_EXTERNAL_STORAGE `__. +**Deprecated:** Deprecated in API level 33. -Deprecated in API level 33. +Allows an application to read from external storage. See `READ_EXTERNAL_STORAGE `__. .. rst-class:: classref-item-separator @@ -1882,7 +1964,7 @@ Deprecated in API level 33. .. rst-class:: classref-property -:ref:`bool` **permissions/read_frame_buffer** +:ref:`bool` **permissions/read_frame_buffer** :ref:`🔗` Allows an application to take screen shots and more generally get access to the frame buffer data. @@ -1894,7 +1976,7 @@ Allows an application to take screen shots and more generally get access to the .. rst-class:: classref-property -:ref:`bool` **permissions/read_history_bookmarks** +:ref:`bool` **permissions/read_history_bookmarks** :ref:`🔗` Allows an application to read (but not write) the user's browsing history and bookmarks. @@ -1906,9 +1988,9 @@ Allows an application to read (but not write) the user's browsing history and bo .. rst-class:: classref-property -:ref:`bool` **permissions/read_input_state** +:ref:`bool` **permissions/read_input_state** :ref:`🔗` -Deprecated in API level 16. +**Deprecated:** Deprecated in API level 16. .. rst-class:: classref-item-separator @@ -1918,7 +2000,7 @@ Deprecated in API level 16. .. rst-class:: classref-property -:ref:`bool` **permissions/read_logs** +:ref:`bool` **permissions/read_logs** :ref:`🔗` Allows an application to read the low-level system log files. See `READ_LOGS `__. @@ -1930,7 +2012,7 @@ Allows an application to read the low-level system log files. See `READ_LOGS ` **permissions/read_phone_state** +:ref:`bool` **permissions/read_phone_state** :ref:`🔗` Allows read only access to phone state. See `READ_PHONE_STATE `__. @@ -1942,7 +2024,7 @@ Allows read only access to phone state. See `READ_PHONE_STATE ` **permissions/read_profile** +:ref:`bool` **permissions/read_profile** :ref:`🔗` Allows an application to read the user's personal profile data. @@ -1954,7 +2036,7 @@ Allows an application to read the user's personal profile data. .. rst-class:: classref-property -:ref:`bool` **permissions/read_sms** +:ref:`bool` **permissions/read_sms** :ref:`🔗` Allows an application to read SMS messages. See `READ_SMS `__. @@ -1966,7 +2048,7 @@ Allows an application to read SMS messages. See `READ_SMS ` **permissions/read_social_stream** +:ref:`bool` **permissions/read_social_stream** :ref:`🔗` Allows an application to read from the user's social stream. @@ -1978,7 +2060,7 @@ Allows an application to read from the user's social stream. .. rst-class:: classref-property -:ref:`bool` **permissions/read_sync_settings** +:ref:`bool` **permissions/read_sync_settings** :ref:`🔗` Allows applications to read the sync settings. See `READ_SYNC_SETTINGS `__. @@ -1990,7 +2072,7 @@ Allows applications to read the sync settings. See `READ_SYNC_SETTINGS ` **permissions/read_sync_stats** +:ref:`bool` **permissions/read_sync_stats** :ref:`🔗` Allows applications to read the sync stats. See `READ_SYNC_STATS `__. @@ -2002,7 +2084,7 @@ Allows applications to read the sync stats. See `READ_SYNC_STATS ` **permissions/read_user_dictionary** +:ref:`bool` **permissions/read_user_dictionary** :ref:`🔗` Allows an application to read the user dictionary. @@ -2014,7 +2096,7 @@ Allows an application to read the user dictionary. .. rst-class:: classref-property -:ref:`bool` **permissions/reboot** +:ref:`bool` **permissions/reboot** :ref:`🔗` Required to be able to reboot the device. See `REBOOT `__. @@ -2026,7 +2108,7 @@ Required to be able to reboot the device. See `REBOOT ` **permissions/receive_boot_completed** +:ref:`bool` **permissions/receive_boot_completed** :ref:`🔗` Allows an application to receive the Intent.ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. See `RECEIVE_BOOT_COMPLETED `__. @@ -2038,7 +2120,7 @@ Allows an application to receive the Intent.ACTION_BOOT_COMPLETED that is broadc .. rst-class:: classref-property -:ref:`bool` **permissions/receive_mms** +:ref:`bool` **permissions/receive_mms** :ref:`🔗` Allows an application to monitor incoming MMS messages. See `RECEIVE_MMS `__. @@ -2050,7 +2132,7 @@ Allows an application to monitor incoming MMS messages. See `RECEIVE_MMS ` **permissions/receive_sms** +:ref:`bool` **permissions/receive_sms** :ref:`🔗` Allows an application to receive SMS messages. See `RECEIVE_SMS `__. @@ -2062,7 +2144,7 @@ Allows an application to receive SMS messages. See `RECEIVE_SMS ` **permissions/receive_wap_push** +:ref:`bool` **permissions/receive_wap_push** :ref:`🔗` Allows an application to receive WAP push messages. See `RECEIVE_WAP_PUSH `__. @@ -2074,7 +2156,7 @@ Allows an application to receive WAP push messages. See `RECEIVE_WAP_PUSH ` **permissions/record_audio** +:ref:`bool` **permissions/record_audio** :ref:`🔗` Allows an application to record audio. See `RECORD_AUDIO `__. @@ -2086,7 +2168,7 @@ Allows an application to record audio. See `RECORD_AUDIO ` **permissions/reorder_tasks** +:ref:`bool` **permissions/reorder_tasks** :ref:`🔗` Allows an application to change the Z-order of tasks. See `REORDER_TASKS `__. @@ -2098,9 +2180,9 @@ Allows an application to change the Z-order of tasks. See `REORDER_TASKS ` **permissions/restart_packages** +:ref:`bool` **permissions/restart_packages** :ref:`🔗` -Deprecated in API level 15. +**Deprecated:** Deprecated in API level 15. .. rst-class:: classref-item-separator @@ -2110,7 +2192,7 @@ Deprecated in API level 15. .. rst-class:: classref-property -:ref:`bool` **permissions/send_respond_via_message** +:ref:`bool` **permissions/send_respond_via_message** :ref:`🔗` Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls. See `SEND_RESPOND_VIA_MESSAGE `__. @@ -2122,7 +2204,7 @@ Allows an application (Phone) to send a request to other applications to handle .. rst-class:: classref-property -:ref:`bool` **permissions/send_sms** +:ref:`bool` **permissions/send_sms** :ref:`🔗` Allows an application to send SMS messages. See `SEND_SMS `__. @@ -2134,7 +2216,7 @@ Allows an application to send SMS messages. See `SEND_SMS ` **permissions/set_activity_watcher** +:ref:`bool` **permissions/set_activity_watcher** :ref:`🔗` Allows an application to watch and control how activities are started globally in the system. @@ -2146,7 +2228,7 @@ Allows an application to watch and control how activities are started globally i .. rst-class:: classref-property -:ref:`bool` **permissions/set_alarm** +:ref:`bool` **permissions/set_alarm** :ref:`🔗` Allows an application to broadcast an Intent to set an alarm for the user. See `SET_ALARM `__. @@ -2158,7 +2240,7 @@ Allows an application to broadcast an Intent to set an alarm for the user. See ` .. rst-class:: classref-property -:ref:`bool` **permissions/set_always_finish** +:ref:`bool` **permissions/set_always_finish** :ref:`🔗` Allows an application to control whether activities are immediately finished when put in the background. See `SET_ALWAYS_FINISH `__. @@ -2170,7 +2252,7 @@ Allows an application to control whether activities are immediately finished whe .. rst-class:: classref-property -:ref:`bool` **permissions/set_animation_scale** +:ref:`bool` **permissions/set_animation_scale** :ref:`🔗` Allows to modify the global animation scaling factor. See `SET_ANIMATION_SCALE `__. @@ -2182,7 +2264,7 @@ Allows to modify the global animation scaling factor. See `SET_ANIMATION_SCALE < .. rst-class:: classref-property -:ref:`bool` **permissions/set_debug_app** +:ref:`bool` **permissions/set_debug_app** :ref:`🔗` Configure an application for debugging. See `SET_DEBUG_APP `__. @@ -2194,7 +2276,7 @@ Configure an application for debugging. See `SET_DEBUG_APP ` **permissions/set_orientation** +:ref:`bool` **permissions/set_orientation** :ref:`🔗` Allows low-level access to setting the orientation (actually rotation) of the screen. @@ -2206,7 +2288,7 @@ Allows low-level access to setting the orientation (actually rotation) of the sc .. rst-class:: classref-property -:ref:`bool` **permissions/set_pointer_speed** +:ref:`bool` **permissions/set_pointer_speed** :ref:`🔗` Allows low-level access to setting the pointer speed. @@ -2218,9 +2300,9 @@ Allows low-level access to setting the pointer speed. .. rst-class:: classref-property -:ref:`bool` **permissions/set_preferred_applications** +:ref:`bool` **permissions/set_preferred_applications** :ref:`🔗` -Deprecated in API level 15. +**Deprecated:** Deprecated in API level 15. .. rst-class:: classref-item-separator @@ -2230,7 +2312,7 @@ Deprecated in API level 15. .. rst-class:: classref-property -:ref:`bool` **permissions/set_process_limit** +:ref:`bool` **permissions/set_process_limit** :ref:`🔗` Allows an application to set the maximum number of (not needed) application processes that can be running. See `SET_PROCESS_LIMIT `__. @@ -2242,7 +2324,7 @@ Allows an application to set the maximum number of (not needed) application proc .. rst-class:: classref-property -:ref:`bool` **permissions/set_time** +:ref:`bool` **permissions/set_time** :ref:`🔗` Allows applications to set the system time directly. See `SET_TIME `__. @@ -2254,7 +2336,7 @@ Allows applications to set the system time directly. See `SET_TIME ` **permissions/set_time_zone** +:ref:`bool` **permissions/set_time_zone** :ref:`🔗` Allows applications to set the system time zone directly. See `SET_TIME_ZONE `__. @@ -2266,7 +2348,7 @@ Allows applications to set the system time zone directly. See `SET_TIME_ZONE ` **permissions/set_wallpaper** +:ref:`bool` **permissions/set_wallpaper** :ref:`🔗` Allows applications to set the wallpaper. See `SET_WALLPAPER `__. @@ -2278,7 +2360,7 @@ Allows applications to set the wallpaper. See `SET_WALLPAPER ` **permissions/set_wallpaper_hints** +:ref:`bool` **permissions/set_wallpaper_hints** :ref:`🔗` Allows applications to set the wallpaper hints. See `SET_WALLPAPER_HINTS `__. @@ -2290,7 +2372,7 @@ Allows applications to set the wallpaper hints. See `SET_WALLPAPER_HINTS ` **permissions/signal_persistent_processes** +:ref:`bool` **permissions/signal_persistent_processes** :ref:`🔗` Allow an application to request that a signal be sent to all persistent processes. See `SIGNAL_PERSISTENT_PROCESSES `__. @@ -2302,7 +2384,7 @@ Allow an application to request that a signal be sent to all persistent processe .. rst-class:: classref-property -:ref:`bool` **permissions/status_bar** +:ref:`bool` **permissions/status_bar** :ref:`🔗` Allows an application to open, close, or disable the status bar and its icons. See `STATUS_BAR `__. @@ -2314,7 +2396,7 @@ Allows an application to open, close, or disable the status bar and its icons. S .. rst-class:: classref-property -:ref:`bool` **permissions/subscribed_feeds_read** +:ref:`bool` **permissions/subscribed_feeds_read** :ref:`🔗` Allows an application to allow access the subscribed feeds ContentProvider. @@ -2326,9 +2408,9 @@ Allows an application to allow access the subscribed feeds ContentProvider. .. rst-class:: classref-property -:ref:`bool` **permissions/subscribed_feeds_write** +:ref:`bool` **permissions/subscribed_feeds_write** :ref:`🔗` -Deprecated. +**Deprecated:** This property may be changed or removed in future versions. .. rst-class:: classref-item-separator @@ -2338,7 +2420,7 @@ Deprecated. .. rst-class:: classref-property -:ref:`bool` **permissions/system_alert_window** +:ref:`bool` **permissions/system_alert_window** :ref:`🔗` Allows an app to create windows using the type WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, shown on top of all other apps. See `SYSTEM_ALERT_WINDOW `__. @@ -2350,7 +2432,7 @@ Allows an app to create windows using the type WindowManager.LayoutParams.TYPE_A .. rst-class:: classref-property -:ref:`bool` **permissions/transmit_ir** +:ref:`bool` **permissions/transmit_ir** :ref:`🔗` Allows using the device's IR transmitter, if available. See `TRANSMIT_IR `__. @@ -2362,9 +2444,9 @@ Allows using the device's IR transmitter, if available. See `TRANSMIT_IR ` **permissions/uninstall_shortcut** +:ref:`bool` **permissions/uninstall_shortcut** :ref:`🔗` -Deprecated. +**Deprecated:** This property may be changed or removed in future versions. .. rst-class:: classref-item-separator @@ -2374,7 +2456,7 @@ Deprecated. .. rst-class:: classref-property -:ref:`bool` **permissions/update_device_stats** +:ref:`bool` **permissions/update_device_stats** :ref:`🔗` Allows an application to update device statistics. See `UPDATE_DEVICE_STATS `__. @@ -2386,7 +2468,7 @@ Allows an application to update device statistics. See `UPDATE_DEVICE_STATS ` **permissions/use_credentials** +:ref:`bool` **permissions/use_credentials** :ref:`🔗` Allows an application to request authtokens from the AccountManager. @@ -2398,7 +2480,7 @@ Allows an application to request authtokens from the AccountManager. .. rst-class:: classref-property -:ref:`bool` **permissions/use_sip** +:ref:`bool` **permissions/use_sip** :ref:`🔗` Allows an application to use SIP service. See `USE_SIP `__. @@ -2410,7 +2492,7 @@ Allows an application to use SIP service. See `USE_SIP ` **permissions/vibrate** +:ref:`bool` **permissions/vibrate** :ref:`🔗` Allows access to the vibrator. See `VIBRATE `__. @@ -2422,7 +2504,7 @@ Allows access to the vibrator. See `VIBRATE ` **permissions/wake_lock** +:ref:`bool` **permissions/wake_lock** :ref:`🔗` Allows using PowerManager WakeLocks to keep processor from sleeping or screen from dimming. See `WAKE_LOCK `__. @@ -2434,7 +2516,7 @@ Allows using PowerManager WakeLocks to keep processor from sleeping or screen fr .. rst-class:: classref-property -:ref:`bool` **permissions/write_apn_settings** +:ref:`bool` **permissions/write_apn_settings** :ref:`🔗` Allows applications to write the apn settings and read sensitive fields of an existing apn settings like user and password. See `WRITE_APN_SETTINGS `__. @@ -2446,7 +2528,7 @@ Allows applications to write the apn settings and read sensitive fields of an ex .. rst-class:: classref-property -:ref:`bool` **permissions/write_calendar** +:ref:`bool` **permissions/write_calendar** :ref:`🔗` Allows an application to write the user's calendar data. See `WRITE_CALENDAR `__. @@ -2458,7 +2540,7 @@ Allows an application to write the user's calendar data. See `WRITE_CALENDAR ` **permissions/write_call_log** +:ref:`bool` **permissions/write_call_log** :ref:`🔗` Allows an application to write (but not read) the user's call log data. See `WRITE_CALL_LOG `__. @@ -2470,7 +2552,7 @@ Allows an application to write (but not read) the user's call log data. See `WRI .. rst-class:: classref-property -:ref:`bool` **permissions/write_contacts** +:ref:`bool` **permissions/write_contacts** :ref:`🔗` Allows an application to write the user's contacts data. See `WRITE_CONTACTS `__. @@ -2482,7 +2564,7 @@ Allows an application to write the user's contacts data. See `WRITE_CONTACTS ` **permissions/write_external_storage** +:ref:`bool` **permissions/write_external_storage** :ref:`🔗` Allows an application to write to external storage. See `WRITE_EXTERNAL_STORAGE `__. @@ -2494,7 +2576,7 @@ Allows an application to write to external storage. See `WRITE_EXTERNAL_STORAGE .. rst-class:: classref-property -:ref:`bool` **permissions/write_gservices** +:ref:`bool` **permissions/write_gservices** :ref:`🔗` Allows an application to modify the Google service map. See `WRITE_GSERVICES `__. @@ -2506,7 +2588,7 @@ Allows an application to modify the Google service map. See `WRITE_GSERVICES ` **permissions/write_history_bookmarks** +:ref:`bool` **permissions/write_history_bookmarks** :ref:`🔗` Allows an application to write (but not read) the user's browsing history and bookmarks. @@ -2518,7 +2600,7 @@ Allows an application to write (but not read) the user's browsing history and bo .. rst-class:: classref-property -:ref:`bool` **permissions/write_profile** +:ref:`bool` **permissions/write_profile** :ref:`🔗` Allows an application to write (but not read) the user's personal profile data. @@ -2530,7 +2612,7 @@ Allows an application to write (but not read) the user's personal profile data. .. rst-class:: classref-property -:ref:`bool` **permissions/write_secure_settings** +:ref:`bool` **permissions/write_secure_settings** :ref:`🔗` Allows an application to read or write the secure system settings. See `WRITE_SECURE_SETTINGS `__. @@ -2542,7 +2624,7 @@ Allows an application to read or write the secure system settings. See `WRITE_SE .. rst-class:: classref-property -:ref:`bool` **permissions/write_settings** +:ref:`bool` **permissions/write_settings** :ref:`🔗` Allows an application to read or write the system settings. See `WRITE_SETTINGS `__. @@ -2554,7 +2636,7 @@ Allows an application to read or write the system settings. See `WRITE_SETTINGS .. rst-class:: classref-property -:ref:`bool` **permissions/write_sms** +:ref:`bool` **permissions/write_sms** :ref:`🔗` Allows an application to write SMS messages. @@ -2566,7 +2648,7 @@ Allows an application to write SMS messages. .. rst-class:: classref-property -:ref:`bool` **permissions/write_social_stream** +:ref:`bool` **permissions/write_social_stream** :ref:`🔗` Allows an application to write (but not read) the user's social stream data. @@ -2578,7 +2660,7 @@ Allows an application to write (but not read) the user's social stream data. .. rst-class:: classref-property -:ref:`bool` **permissions/write_sync_settings** +:ref:`bool` **permissions/write_sync_settings** :ref:`🔗` Allows applications to write the sync settings. See `WRITE_SYNC_SETTINGS `__. @@ -2590,7 +2672,7 @@ Allows applications to write the sync settings. See `WRITE_SYNC_SETTINGS ` **permissions/write_user_dictionary** +:ref:`bool` **permissions/write_user_dictionary** :ref:`🔗` Allows an application to write to the user dictionary. @@ -2602,7 +2684,7 @@ Allows an application to write to the user dictionary. .. rst-class:: classref-property -:ref:`bool` **screen/immersive_mode** +:ref:`bool` **screen/immersive_mode** :ref:`🔗` If ``true``, hides navigation and status bar. @@ -2614,7 +2696,7 @@ If ``true``, hides navigation and status bar. .. rst-class:: classref-property -:ref:`bool` **screen/support_large** +:ref:`bool` **screen/support_large** :ref:`🔗` Indicates whether the application supports larger screen form-factors. @@ -2626,7 +2708,7 @@ Indicates whether the application supports larger screen form-factors. .. rst-class:: classref-property -:ref:`bool` **screen/support_normal** +:ref:`bool` **screen/support_normal** :ref:`🔗` Indicates whether an application supports the "normal" screen form-factors. @@ -2638,7 +2720,7 @@ Indicates whether an application supports the "normal" screen form-factors. .. rst-class:: classref-property -:ref:`bool` **screen/support_small** +:ref:`bool` **screen/support_small** :ref:`🔗` Indicates whether the application supports smaller screen form-factors. @@ -2650,7 +2732,7 @@ Indicates whether the application supports smaller screen form-factors. .. rst-class:: classref-property -:ref:`bool` **screen/support_xlarge** +:ref:`bool` **screen/support_xlarge** :ref:`🔗` Indicates whether the application supports extra large screen form-factors. @@ -2662,7 +2744,7 @@ Indicates whether the application supports extra large screen form-factors. .. rst-class:: classref-property -:ref:`bool` **user_data_backup/allow** +:ref:`bool` **user_data_backup/allow** :ref:`🔗` If ``true``, allows the application to participate in the backup and restore infrastructure. @@ -2674,9 +2756,9 @@ If ``true``, allows the application to participate in the backup and restore inf .. rst-class:: classref-property -:ref:`int` **version/code** +:ref:`int` **version/code** :ref:`🔗` -Machine-readable application version. +Machine-readable application version. This must be incremented for every new release pushed to the Play Store. .. rst-class:: classref-item-separator @@ -2686,51 +2768,9 @@ Machine-readable application version. .. rst-class:: classref-property -:ref:`String` **version/name** - -Application version visible to the user. - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformAndroid_property_xr_features/hand_tracking: - -.. rst-class:: classref-property - -:ref:`int` **xr_features/hand_tracking** - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformAndroid_property_xr_features/hand_tracking_frequency: - -.. rst-class:: classref-property - -:ref:`int` **xr_features/hand_tracking_frequency** +:ref:`String` **version/name** :ref:`🔗` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformAndroid_property_xr_features/passthrough: - -.. rst-class:: classref-property - -:ref:`int` **xr_features/passthrough** - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -2740,11 +2780,9 @@ Application version visible to the user. .. rst-class:: classref-property -:ref:`int` **xr_features/xr_mode** - -.. container:: contribute +:ref:`int` **xr_features/xr_mode** :ref:`🔗` - There is currently no description for this property. Please help us by :ref:`contributing one `! +The extended reality (XR) mode for this application. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -2753,3 +2791,4 @@ Application version visible to the user. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index f13e21f3ce5..52e39a1acc6 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -21,6 +21,8 @@ Tutorials - :doc:`Exporting for iOS <../tutorials/export/exporting_for_ios>` +- :doc:`iOS plugins documentation index <../tutorials/platform/ios/index>` + .. rst-class:: classref-reftable-group Properties @@ -29,119 +31,401 @@ Properties .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/app_store_team_id` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/bundle_identifier` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/code_sign_identity_debug` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/code_sign_identity_release` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/export_method_debug` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/export_method_release` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/icon_interpolation` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/launch_screens_interpolation` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/provisioning_profile_uuid_debug` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/provisioning_profile_uuid_release` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/short_version` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/signature` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/targeted_device_family` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/version` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`architectures/arm64` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`capabilities/access_wifi` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`capabilities/push_notifications` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/debug` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/release` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/app_store_1024x1024` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/ipad_76x76` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/ipad_152x152` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/ipad_167x167` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/iphone_120x120` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/iphone_180x180` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/notification_40x40` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/notification_60x60` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/settings_58x58` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/settings_87x87` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/spotlight_40x40` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`icons/spotlight_80x80` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`landscape_launch_screens/ipad_1024x768` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`landscape_launch_screens/ipad_2048x1536` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`landscape_launch_screens/iphone_2208x1242` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`landscape_launch_screens/iphone_2436x1125` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/ipad_768x1024` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/ipad_1536x2048` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/iphone_640x960` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/iphone_640x1136` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/iphone_750x1334` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/iphone_1125x2436` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`portrait_launch_screens/iphone_1242x2208` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/camera_usage_description` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/microphone_usage_description` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/photolibrary_usage_description` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/photolibrary_usage_description_localized` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`storyboard/custom_bg_color` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`storyboard/custom_image@2x` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`storyboard/custom_image@3x` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`storyboard/image_scale_mode` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`storyboard/use_custom_bg_color` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`storyboard/use_launch_screen_storyboard` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`user_data/accessible_from_files_app` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`user_data/accessible_from_itunes_sharing` | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/additional_plist_content` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/app_store_team_id` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/bundle_identifier` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/delete_old_export_files_unconditionally` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/export_project_only` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/generate_simulator_library_if_missing` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/min_ios_version` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/short_version` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/signature` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/targeted_device_family` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/version` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/arm64` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/access_wifi` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/performance_a12` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/performance_gaming_tier` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/push_notifications` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/app_store_1024x1024` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_76x76` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_152x152` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/ipad_167x167` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_120x120` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/iphone_180x180` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_40x40` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/notification_60x60` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_58x58` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/settings_87x87` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_40x40` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/spotlight_80x80` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/active_keyboard_access_reasons` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/camera_usage_description` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/advertising_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/audio_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/browsing_history/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/coarse_location/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/contacts/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/crash_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/credit_info/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/customer_support/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/device_id/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/email_address/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/emails_or_text_messages/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/environment_scanning/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/fitness/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/gameplay_content/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/hands/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/head/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/health/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/name/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_contact_info/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_data_types/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_diagnostic_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_financial_info/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_usage_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_user_content/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/payment_info/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/performance_data/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/phone_number/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/photos_or_videos/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/physical_address/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/precise_location/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/product_interaction/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/purchase_history/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/search_hhistory/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/sensitive_info/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/collected` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/user_id/collection_purposes` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/linked_to_user` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/used_for_tracking` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/disk_space_access_reasons` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/file_timestamp_access_reasons` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/microphone_usage_description` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/photolibrary_usage_description` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/photolibrary_usage_description_localized` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/system_boot_time_access_reasons` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`privacy/tracking_domains` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/tracking_enabled` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/user_defaults_access_reasons` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`storyboard/custom_bg_color` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`storyboard/custom_image@2x` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`storyboard/custom_image@3x` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`storyboard/image_scale_mode` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`storyboard/use_custom_bg_color` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_files_app` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_itunes_sharing` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -152,11 +436,28 @@ Properties Property Descriptions --------------------- +.. _class_EditorExportPlatformIOS_property_application/additional_plist_content: + +.. rst-class:: classref-property + +:ref:`String` **application/additional_plist_content** :ref:`🔗` + +Additional data added to the root ```` section of the `Info.plist `__ file. The value should be an XML section with pairs of key-value elements, e.g.: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_application/app_store_team_id: .. rst-class:: classref-property -:ref:`String` **application/app_store_team_id** +:ref:`String` **application/app_store_team_id** :ref:`🔗` Apple Team ID, unique 10-character string. To locate your Team ID check "Membership details" section in your Apple developer account dashboard, or "Organizational Unit" of your code signing certificate. See `Locate your Team ID `__. @@ -168,7 +469,7 @@ Apple Team ID, unique 10-character string. To locate your Team ID check "Members .. rst-class:: classref-property -:ref:`String` **application/bundle_identifier** +:ref:`String` **application/bundle_identifier** :ref:`🔗` Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). @@ -180,7 +481,7 @@ Unique application identifier in a reverse-DNS format, can only contain alphanum .. rst-class:: classref-property -:ref:`String` **application/code_sign_identity_debug** +:ref:`String` **application/code_sign_identity_debug** :ref:`🔗` The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for debug export. @@ -192,7 +493,7 @@ The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for de .. rst-class:: classref-property -:ref:`String` **application/code_sign_identity_release** +:ref:`String` **application/code_sign_identity_release** :ref:`🔗` The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for release export. @@ -200,11 +501,23 @@ The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for re ---- +.. _class_EditorExportPlatformIOS_property_application/delete_old_export_files_unconditionally: + +.. rst-class:: classref-property + +:ref:`bool` **application/delete_old_export_files_unconditionally** :ref:`🔗` + +If ``true``, existing "project name" and "project name.xcodeproj" in the export destination directory will be unconditionally deleted during export. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_application/export_method_debug: .. rst-class:: classref-property -:ref:`int` **application/export_method_debug** +:ref:`int` **application/export_method_debug** :ref:`🔗` Application distribution target (debug export). @@ -216,7 +529,7 @@ Application distribution target (debug export). .. rst-class:: classref-property -:ref:`int` **application/export_method_release** +:ref:`int` **application/export_method_release** :ref:`🔗` Application distribution target (release export). @@ -224,11 +537,35 @@ Application distribution target (release export). ---- +.. _class_EditorExportPlatformIOS_property_application/export_project_only: + +.. rst-class:: classref-property + +:ref:`bool` **application/export_project_only** :ref:`🔗` + +If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` file. If ``false``, exports iOS project files and builds an XCArchive and ``.ipa`` file at the same time. When combining Godot with Fastlane or other build pipelines, you may want to set this to ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_application/generate_simulator_library_if_missing: + +.. rst-class:: classref-property + +:ref:`bool` **application/generate_simulator_library_if_missing** :ref:`🔗` + +If ``true``, and ARM64 simulator library is missing from the export template, it is automatically generated from ARM64 device library. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_application/icon_interpolation: .. rst-class:: classref-property -:ref:`int` **application/icon_interpolation** +:ref:`int` **application/icon_interpolation** :ref:`🔗` Interpolation method used to resize application icon. @@ -236,13 +573,13 @@ Interpolation method used to resize application icon. ---- -.. _class_EditorExportPlatformIOS_property_application/launch_screens_interpolation: +.. _class_EditorExportPlatformIOS_property_application/min_ios_version: .. rst-class:: classref-property -:ref:`int` **application/launch_screens_interpolation** +:ref:`String` **application/min_ios_version** :ref:`🔗` -Interpolation method used to resize launch screen images. +Minimum version of iOS required for this application to run in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). .. rst-class:: classref-item-separator @@ -252,7 +589,7 @@ Interpolation method used to resize launch screen images. .. rst-class:: classref-property -:ref:`String` **application/provisioning_profile_uuid_debug** +:ref:`String` **application/provisioning_profile_uuid_debug** :ref:`🔗` UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. @@ -266,7 +603,7 @@ Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE .. rst-class:: classref-property -:ref:`String` **application/provisioning_profile_uuid_release** +:ref:`String` **application/provisioning_profile_uuid_release** :ref:`🔗` UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. @@ -280,9 +617,9 @@ Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE .. rst-class:: classref-property -:ref:`String` **application/short_version** +:ref:`String` **application/short_version** :ref:`🔗` -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -292,7 +629,7 @@ Application version visible to the user, can only contain numeric characters (`` .. rst-class:: classref-property -:ref:`String` **application/signature** +:ref:`String` **application/signature** :ref:`🔗` A four-character creator code that is specific to the bundle. Optional. @@ -304,7 +641,7 @@ A four-character creator code that is specific to the bundle. Optional. .. rst-class:: classref-property -:ref:`int` **application/targeted_device_family** +:ref:`int` **application/targeted_device_family** :ref:`🔗` Supported device family. @@ -316,9 +653,9 @@ Supported device family. .. rst-class:: classref-property -:ref:`String` **application/version** +:ref:`String` **application/version** :ref:`🔗` -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. .. rst-class:: classref-item-separator @@ -328,7 +665,7 @@ Machine-readable application version, in the ``major.minor.patch`` format, can o .. rst-class:: classref-property -:ref:`bool` **architectures/arm64** +:ref:`bool` **architectures/arm64** :ref:`🔗` If ``true``, ``arm64`` binaries are included into exported project. @@ -340,7 +677,7 @@ If ``true``, ``arm64`` binaries are included into exported project. .. rst-class:: classref-property -:ref:`bool` **capabilities/access_wifi** +:ref:`bool` **capabilities/access_wifi** :ref:`🔗` If ``true``, networking features related to Wi-Fi access are enabled. See `Required Device Capabilities `__. @@ -348,11 +685,39 @@ If ``true``, networking features related to Wi-Fi access are enabled. See `Requi ---- +.. _class_EditorExportPlatformIOS_property_capabilities/performance_a12: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/performance_a12** :ref:`🔗` + +Requires the graphics performance and features of the A12 Bionic and later chips (devices supporting all Vulkan renderer features). + +Enabling this option limits supported devices to: iPhone XS, iPhone XR, iPad Mini (5th gen.), iPad Air (3rd gen.), iPad (8th gen) and newer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_capabilities/performance_gaming_tier: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/performance_gaming_tier** :ref:`🔗` + +Requires the graphics performance and features of the A17 Pro and later chips. + +Enabling this option limits supported devices to: iPhone 15 Pro and newer. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_capabilities/push_notifications: .. rst-class:: classref-property -:ref:`bool` **capabilities/push_notifications** +:ref:`bool` **capabilities/push_notifications** :ref:`🔗` If ``true``, push notifications are enabled. See `Required Device Capabilities `__. @@ -364,7 +729,7 @@ If ``true``, push notifications are enabled. See `Required Device Capabilities < .. rst-class:: classref-property -:ref:`String` **custom_template/debug** +:ref:`String` **custom_template/debug** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -376,7 +741,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **custom_template/release** +:ref:`String` **custom_template/release** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -388,7 +753,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **icons/app_store_1024x1024** +:ref:`String` **icons/app_store_1024x1024** :ref:`🔗` App Store application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -400,7 +765,7 @@ App Store application icon file. If left empty, it will fallback to :ref:`Projec .. rst-class:: classref-property -:ref:`String` **icons/ipad_76x76** +:ref:`String` **icons/ipad_76x76** :ref:`🔗` Home screen application icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -412,7 +777,7 @@ Home screen application icon file on iPad (1x DPI). If left empty, it will fallb .. rst-class:: classref-property -:ref:`String` **icons/ipad_152x152** +:ref:`String` **icons/ipad_152x152** :ref:`🔗` Home screen application icon file on iPad (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -424,7 +789,7 @@ Home screen application icon file on iPad (2x DPI). If left empty, it will fallb .. rst-class:: classref-property -:ref:`String` **icons/ipad_167x167** +:ref:`String` **icons/ipad_167x167** :ref:`🔗` Home screen application icon file on iPad (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -436,7 +801,7 @@ Home screen application icon file on iPad (3x DPI). If left empty, it will fallb .. rst-class:: classref-property -:ref:`String` **icons/iphone_120x120** +:ref:`String` **icons/iphone_120x120** :ref:`🔗` Home screen application icon file on iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -448,7 +813,7 @@ Home screen application icon file on iPhone (2x DPI). If left empty, it will fal .. rst-class:: classref-property -:ref:`String` **icons/iphone_180x180** +:ref:`String` **icons/iphone_180x180** :ref:`🔗` Home screen application icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -460,7 +825,7 @@ Home screen application icon file on iPhone (3x DPI). If left empty, it will fal .. rst-class:: classref-property -:ref:`String` **icons/notification_40x40** +:ref:`String` **icons/notification_40x40** :ref:`🔗` Notification icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -472,7 +837,7 @@ Notification icon file on iPad and iPhone (2x DPI). If left empty, it will fallb .. rst-class:: classref-property -:ref:`String` **icons/notification_60x60** +:ref:`String` **icons/notification_60x60** :ref:`🔗` Notification icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -484,7 +849,7 @@ Notification icon file on iPhone (3x DPI). If left empty, it will fallback to :r .. rst-class:: classref-property -:ref:`String` **icons/settings_58x58** +:ref:`String` **icons/settings_58x58** :ref:`🔗` Application settings icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -496,7 +861,7 @@ Application settings icon file on iPad and iPhone (2x DPI). If left empty, it wi .. rst-class:: classref-property -:ref:`String` **icons/settings_87x87** +:ref:`String` **icons/settings_87x87** :ref:`🔗` Application settings icon file on iPhone (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -508,7 +873,7 @@ Application settings icon file on iPhone (3x DPI). If left empty, it will fallba .. rst-class:: classref-property -:ref:`String` **icons/spotlight_40x40** +:ref:`String` **icons/spotlight_40x40** :ref:`🔗` Spotlight icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -520,7 +885,7 @@ Spotlight icon file on iPad (1x DPI). If left empty, it will fallback to :ref:`P .. rst-class:: classref-property -:ref:`String` **icons/spotlight_80x80** +:ref:`String` **icons/spotlight_80x80** :ref:`🔗` Spotlight icon file on iPad and iPhone (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. @@ -528,277 +893,1899 @@ Spotlight icon file on iPad and iPhone (2x DPI). If left empty, it will fallback ---- -.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/ipad_1024x768: +.. _class_EditorExportPlatformIOS_property_privacy/active_keyboard_access_reasons: .. rst-class:: classref-property -:ref:`String` **landscape_launch_screens/ipad_1024x768** +:ref:`int` **privacy/active_keyboard_access_reasons** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +The reasons your app use active keyboard API. See `Describing use of required reason API `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/ipad_2048x1536: +.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description: .. rst-class:: classref-property -:ref:`String` **landscape_launch_screens/ipad_2048x1536** +:ref:`String` **privacy/camera_usage_description** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +A message displayed when requesting access to the device's camera (in English). .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/iphone_2208x1242: +.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description_localized: .. rst-class:: classref-property -:ref:`String` **landscape_launch_screens/iphone_2208x1242** +:ref:`Dictionary` **privacy/camera_usage_description_localized** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +A message displayed when requesting access to the device's camera (localized). .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_landscape_launch_screens/iphone_2436x1125: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/advertising_data/collected: .. rst-class:: classref-property -:ref:`String` **landscape_launch_screens/iphone_2436x1125** +:ref:`bool` **privacy/collected_data/advertising_data/collected** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app collects advertising data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/ipad_768x1024: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/advertising_data/collection_purposes: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/ipad_768x1024** +:ref:`int` **privacy/collected_data/advertising_data/collection_purposes** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +The reasons your app collects advertising data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/ipad_1536x2048: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/advertising_data/linked_to_user: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/ipad_1536x2048** +:ref:`bool` **privacy/collected_data/advertising_data/linked_to_user** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app links advertising data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_640x960: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/advertising_data/used_for_tracking: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/iphone_640x960** +:ref:`bool` **privacy/collected_data/advertising_data/used_for_tracking** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app uses advertising data for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_640x1136: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/audio_data/collected: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/iphone_640x1136** +:ref:`bool` **privacy/collected_data/audio_data/collected** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app collects audio data data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_750x1334: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/audio_data/collection_purposes: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/iphone_750x1334** +:ref:`int` **privacy/collected_data/audio_data/collection_purposes** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +The reasons your app collects audio data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_1125x2436: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/audio_data/linked_to_user: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/iphone_1125x2436** +:ref:`bool` **privacy/collected_data/audio_data/linked_to_user** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app links audio data data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_portrait_launch_screens/iphone_1242x2208: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/audio_data/used_for_tracking: .. rst-class:: classref-property -:ref:`String` **portrait_launch_screens/iphone_1242x2208** +:ref:`bool` **privacy/collected_data/audio_data/used_for_tracking** :ref:`🔗` -Application launch screen image file. If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app uses audio data data for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/browsing_history/collected: .. rst-class:: classref-property -:ref:`String` **privacy/camera_usage_description** +:ref:`bool` **privacy/collected_data/browsing_history/collected** :ref:`🔗` -A message displayed when requesting access to the device's camera (in English). +Indicates whether your app collects browsing history. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/camera_usage_description_localized: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/browsing_history/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/camera_usage_description_localized** +:ref:`int` **privacy/collected_data/browsing_history/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the device's camera (localized). +The reasons your app collects browsing history. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/browsing_history/linked_to_user: .. rst-class:: classref-property -:ref:`String` **privacy/microphone_usage_description** +:ref:`bool` **privacy/collected_data/browsing_history/linked_to_user** :ref:`🔗` -A message displayed when requesting access to the device's microphone (in English). +Indicates whether your app links browsing history to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description_localized: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/browsing_history/used_for_tracking: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/microphone_usage_description_localized** +:ref:`bool` **privacy/collected_data/browsing_history/used_for_tracking** :ref:`🔗` -A message displayed when requesting access to the device's microphone (localized). +Indicates whether your app uses browsing history for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/coarse_location/collected: .. rst-class:: classref-property -:ref:`String` **privacy/photolibrary_usage_description** +:ref:`bool` **privacy/collected_data/coarse_location/collected** :ref:`🔗` -A message displayed when requesting access to the user's photo library (in English). +Indicates whether your app collects coarse location data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description_localized: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/coarse_location/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/photolibrary_usage_description_localized** +:ref:`int` **privacy/collected_data/coarse_location/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the user's photo library (localized). +The reasons your app collects coarse location data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/custom_bg_color: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/coarse_location/linked_to_user: .. rst-class:: classref-property -:ref:`Color` **storyboard/custom_bg_color** +:ref:`bool` **privacy/collected_data/coarse_location/linked_to_user** :ref:`🔗` -A custom background color of the storyboard launch screen. +Indicates whether your app links coarse location data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@2x: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/coarse_location/used_for_tracking: .. rst-class:: classref-property -:ref:`String` **storyboard/custom_image@2x** +:ref:`bool` **privacy/collected_data/coarse_location/used_for_tracking** :ref:`🔗` -Application launch screen image file (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app uses coarse location data for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@3x: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/contacts/collected: .. rst-class:: classref-property -:ref:`String` **storyboard/custom_image@3x** +:ref:`bool` **privacy/collected_data/contacts/collected** :ref:`🔗` -Application launch screen image file (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. +Indicates whether your app collects contacts. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/image_scale_mode: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/contacts/collection_purposes: .. rst-class:: classref-property -:ref:`int` **storyboard/image_scale_mode** +:ref:`int` **privacy/collected_data/contacts/collection_purposes** :ref:`🔗` -Launch screen image scaling mode. +The reasons your app collects contacts. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/use_custom_bg_color: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/contacts/linked_to_user: .. rst-class:: classref-property -:ref:`bool` **storyboard/use_custom_bg_color** +:ref:`bool` **privacy/collected_data/contacts/linked_to_user** :ref:`🔗` -If ``true``, :ref:`storyboard/custom_bg_color` is used as a launch screen background color, otherwise ``application/boot_splash/bg_color`` project setting is used. +Indicates whether your app links contacts to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/contacts/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses contacts for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/crash_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/collected** :ref:`🔗` + +Indicates whether your app collects crash data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/crash_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/crash_data/collection_purposes** :ref:`🔗` + +The reasons your app collects crash data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/crash_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links crash data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/crash_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses crash data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/credit_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/collected** :ref:`🔗` + +Indicates whether your app collects credit information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/credit_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/credit_info/collection_purposes** :ref:`🔗` + +The reasons your app collects credit information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/credit_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links credit information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/credit_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses credit information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/customer_support/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/collected** :ref:`🔗` + +Indicates whether your app collects customer support data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/customer_support/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/customer_support/collection_purposes** :ref:`🔗` + +The reasons your app collects customer support data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/customer_support/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/linked_to_user** :ref:`🔗` + +Indicates whether your app links customer support data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/customer_support/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses customer support data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/device_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/collected** :ref:`🔗` + +Indicates whether your app collects device IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/device_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/device_id/collection_purposes** :ref:`🔗` + +The reasons your app collects device IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/device_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links device IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/device_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses device IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/email_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/collected** :ref:`🔗` + +Indicates whether your app collects email address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/email_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/email_address/collection_purposes** :ref:`🔗` + +The reasons your app collects email address. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformIOS_property_storyboard/use_launch_screen_storyboard: +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/email_address/linked_to_user: .. rst-class:: classref-property -:ref:`bool` **storyboard/use_launch_screen_storyboard** +:ref:`bool` **privacy/collected_data/email_address/linked_to_user** :ref:`🔗` -If ``true``, storyboard launch screen is used instead of launch screen images. +Indicates whether your app links email address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/email_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses email address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/emails_or_text_messages/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/collected** :ref:`🔗` + +Indicates whether your app collects emails or text messages. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/emails_or_text_messages/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/emails_or_text_messages/collection_purposes** :ref:`🔗` + +The reasons your app collects emails or text messages. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/emails_or_text_messages/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/linked_to_user** :ref:`🔗` + +Indicates whether your app links emails or text messages to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/emails_or_text_messages/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses emails or text messages for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/environment_scanning/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/collected** :ref:`🔗` + +Indicates whether your app collects environment scanning data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/environment_scanning/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/environment_scanning/collection_purposes** :ref:`🔗` + +The reasons your app collects environment scanning data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/environment_scanning/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/linked_to_user** :ref:`🔗` + +Indicates whether your app links environment scanning data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/environment_scanning/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses environment scanning data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/fitness/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/collected** :ref:`🔗` + +Indicates whether your app collects fitness and exercise data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/fitness/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/fitness/collection_purposes** :ref:`🔗` + +The reasons your app collects fitness and exercise data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/fitness/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/linked_to_user** :ref:`🔗` + +Indicates whether your app links fitness and exercise data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/fitness/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses fitness and exercise data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/gameplay_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/collected** :ref:`🔗` + +Indicates whether your app collects gameplay content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/gameplay_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/gameplay_content/collection_purposes** :ref:`🔗` + +The reasons your app collects gameplay content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/gameplay_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links gameplay content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/gameplay_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses gameplay content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/hands/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/collected** :ref:`🔗` + +Indicates whether your app collects user's hand structure and hand movements. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/hands/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/hands/collection_purposes** :ref:`🔗` + +The reasons your app collects user's hand structure and hand movements. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/hands/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's hand structure and hand movements to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/hands/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's hand structure and hand movements for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/head/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/collected** :ref:`🔗` + +Indicates whether your app collects user's head movement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/head/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/head/collection_purposes** :ref:`🔗` + +The reasons your app collects user's head movement. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/head/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's head movement to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/head/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's head movement for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/health/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/collected** :ref:`🔗` + +Indicates whether your app collects health and medical data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/health/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/health/collection_purposes** :ref:`🔗` + +The reasons your app collects health and medical data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/health/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/linked_to_user** :ref:`🔗` + +Indicates whether your app links health and medical data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/health/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses health and medical data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/name/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/collected** :ref:`🔗` + +Indicates whether your app collects user's name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/name/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/name/collection_purposes** :ref:`🔗` + +The reasons your app collects user's name. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/name/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's name to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/name/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's name for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_contact_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/collected** :ref:`🔗` + +Indicates whether your app collects any other contact information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_contact_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_contact_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other contact information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_contact_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other contact information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_contact_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other contact information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_data_types/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/collected** :ref:`🔗` + +Indicates whether your app collects any other data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_data_types/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_data_types/collection_purposes** :ref:`🔗` + +The reasons your app collects any other data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_data_types/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_data_types/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_diagnostic_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/collected** :ref:`🔗` + +Indicates whether your app collects any other diagnostic data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_diagnostic_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_diagnostic_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other diagnostic data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_diagnostic_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other diagnostic data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_diagnostic_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other diagnostic data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_financial_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/collected** :ref:`🔗` + +Indicates whether your app collects any other financial information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_financial_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_financial_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other financial information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_financial_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other financial information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_financial_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other financial information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_usage_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/collected** :ref:`🔗` + +Indicates whether your app collects any other usage data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_usage_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_usage_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other usage data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_usage_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other usage data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_usage_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other usage data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_user_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/collected** :ref:`🔗` + +Indicates whether your app collects any other user generated content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_user_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_user_content/collection_purposes** :ref:`🔗` + +The reasons your app collects any other user generated content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_user_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other user generated content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/other_user_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other user generated content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/payment_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/collected** :ref:`🔗` + +Indicates whether your app collects payment information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/payment_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/payment_info/collection_purposes** :ref:`🔗` + +The reasons your app collects payment information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/payment_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links payment information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/payment_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses payment information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/performance_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/collected** :ref:`🔗` + +Indicates whether your app collects performance data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/performance_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/performance_data/collection_purposes** :ref:`🔗` + +The reasons your app collects performance data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/performance_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links performance data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/performance_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses performance data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/phone_number/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/collected** :ref:`🔗` + +Indicates whether your app collects phone number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/phone_number/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/phone_number/collection_purposes** :ref:`🔗` + +The reasons your app collects phone number. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/phone_number/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/linked_to_user** :ref:`🔗` + +Indicates whether your app links phone number to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/phone_number/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses phone number for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/photos_or_videos/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/collected** :ref:`🔗` + +Indicates whether your app collects photos or videos. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/photos_or_videos/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/photos_or_videos/collection_purposes** :ref:`🔗` + +The reasons your app collects photos or videos. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/photos_or_videos/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/linked_to_user** :ref:`🔗` + +Indicates whether your app links photos or videos to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/photos_or_videos/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses photos or videos for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/physical_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/collected** :ref:`🔗` + +Indicates whether your app collects physical address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/physical_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/physical_address/collection_purposes** :ref:`🔗` + +The reasons your app collects physical address. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/physical_address/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/linked_to_user** :ref:`🔗` + +Indicates whether your app links physical address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/physical_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses physical address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/precise_location/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/collected** :ref:`🔗` + +Indicates whether your app collects precise location data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/precise_location/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/precise_location/collection_purposes** :ref:`🔗` + +The reasons your app collects precise location data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/precise_location/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/linked_to_user** :ref:`🔗` + +Indicates whether your app links precise location data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/precise_location/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses precise location data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/product_interaction/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/collected** :ref:`🔗` + +Indicates whether your app collects product interaction data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/product_interaction/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/product_interaction/collection_purposes** :ref:`🔗` + +The reasons your app collects product interaction data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/product_interaction/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/linked_to_user** :ref:`🔗` + +Indicates whether your app links product interaction data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/product_interaction/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses product interaction data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/purchase_history/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/collected** :ref:`🔗` + +Indicates whether your app collects purchase history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/purchase_history/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/purchase_history/collection_purposes** :ref:`🔗` + +The reasons your app collects purchase history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/purchase_history/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/linked_to_user** :ref:`🔗` + +Indicates whether your app links purchase history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/purchase_history/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses purchase history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/search_hhistory/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/collected** :ref:`🔗` + +Indicates whether your app collects search history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/search_hhistory/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/search_hhistory/collection_purposes** :ref:`🔗` + +The reasons your app collects search history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/search_hhistory/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/linked_to_user** :ref:`🔗` + +Indicates whether your app links search history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/search_hhistory/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses search history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/sensitive_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/collected** :ref:`🔗` + +Indicates whether your app collects sensitive user information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/sensitive_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/sensitive_info/collection_purposes** :ref:`🔗` + +The reasons your app collects sensitive user information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/sensitive_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links sensitive user information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/sensitive_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses sensitive user information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/user_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/collected** :ref:`🔗` + +Indicates whether your app collects user IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/user_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/user_id/collection_purposes** :ref:`🔗` + +The reasons your app collects user IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/user_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links user IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/collected_data/user_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/disk_space_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/disk_space_access_reasons** :ref:`🔗` + +The reasons your app use free disk space API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/file_timestamp_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/file_timestamp_access_reasons** :ref:`🔗` + +The reasons your app use file timestamp/metadata API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/microphone_usage_description** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/microphone_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/microphone_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/photolibrary_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/photolibrary_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/photolibrary_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/system_boot_time_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/system_boot_time_access_reasons** :ref:`🔗` + +The reasons your app use system boot time / absolute time API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/tracking_domains: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **privacy/tracking_domains** :ref:`🔗` + +The list of internet domains your app connects to that engage in tracking. See `Privacy manifest files `__. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/tracking_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/tracking_enabled** :ref:`🔗` + +Indicates whether your app uses data for tracking. See `Privacy manifest files `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_privacy/user_defaults_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/user_defaults_access_reasons** :ref:`🔗` + +The reasons your app use user defaults API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_bg_color: + +.. rst-class:: classref-property + +:ref:`Color` **storyboard/custom_bg_color** :ref:`🔗` + +A custom background color of the storyboard launch screen. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@2x: + +.. rst-class:: classref-property + +:ref:`String` **storyboard/custom_image@2x** :ref:`🔗` + +Application launch screen image file (2x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/custom_image@3x: + +.. rst-class:: classref-property + +:ref:`String` **storyboard/custom_image@3x** :ref:`🔗` + +Application launch screen image file (3x DPI). If left empty, it will fallback to :ref:`ProjectSettings.application/boot_splash/image`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/image_scale_mode: + +.. rst-class:: classref-property + +:ref:`int` **storyboard/image_scale_mode** :ref:`🔗` + +Launch screen image scaling mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformIOS_property_storyboard/use_custom_bg_color: + +.. rst-class:: classref-property + +:ref:`bool` **storyboard/use_custom_bg_color** :ref:`🔗` + +If ``true``, :ref:`storyboard/custom_bg_color` is used as a launch screen background color, otherwise ``application/boot_splash/bg_color`` project setting is used. .. rst-class:: classref-item-separator @@ -808,7 +2795,7 @@ If ``true``, storyboard launch screen is used instead of launch screen images. .. rst-class:: classref-property -:ref:`bool` **user_data/accessible_from_files_app** +:ref:`bool` **user_data/accessible_from_files_app** :ref:`🔗` If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LSSupportsOpeningDocumentsInPlace `__. @@ -820,7 +2807,7 @@ If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LS .. rst-class:: classref-property -:ref:`bool` **user_data/accessible_from_itunes_sharing** +:ref:`bool` **user_data/accessible_from_itunes_sharing** :ref:`🔗` If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. @@ -831,3 +2818,4 @@ If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst index 7d1d33de8dc..d0ecbaff8a5 100644 --- a/classes/class_editorexportplatformlinuxbsd.rst +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -54,13 +54,9 @@ Properties +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`texture_format/bptc` | + | :ref:`bool` | :ref:`texture_format/etc2_astc` | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`texture_format/etc` | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`texture_format/etc2` | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`texture_format/s3tc` | + | :ref:`bool` | :ref:`texture_format/s3tc_bptc` | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -76,7 +72,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **binary_format/architecture** +:ref:`String` **binary_format/architecture** :ref:`🔗` Application executable architecture. @@ -92,7 +88,7 @@ Official export templates include ``x86_32`` and ``x86_64`` binaries only. .. rst-class:: classref-property -:ref:`bool` **binary_format/embed_pck** +:ref:`bool` **binary_format/embed_pck** :ref:`🔗` If ``true``, project resources are embedded into the executable. @@ -104,7 +100,7 @@ If ``true``, project resources are embedded into the executable. .. rst-class:: classref-property -:ref:`String` **custom_template/debug** +:ref:`String` **custom_template/debug** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -116,7 +112,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **custom_template/release** +:ref:`String` **custom_template/release** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -128,7 +124,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`int` **debug/export_console_wrapper** +:ref:`int` **debug/export_console_wrapper** :ref:`🔗` If ``true``, a console wrapper is exported alongside the main executable, which allows running the project with enabled console output. @@ -140,7 +136,7 @@ If ``true``, a console wrapper is exported alongside the main executable, which .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/cleanup_script** +:ref:`String` **ssh_remote_deploy/cleanup_script** :ref:`🔗` Script code to execute on the remote host when app is finished. @@ -162,7 +158,7 @@ The following variables can be used in the script: .. rst-class:: classref-property -:ref:`bool` **ssh_remote_deploy/enabled** +:ref:`bool` **ssh_remote_deploy/enabled** :ref:`🔗` Enables remote deploy using SSH/SCP. @@ -174,7 +170,7 @@ Enables remote deploy using SSH/SCP. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/extra_args_scp** +:ref:`String` **ssh_remote_deploy/extra_args_scp** :ref:`🔗` Array of the additional command line arguments passed to the SCP. @@ -186,7 +182,7 @@ Array of the additional command line arguments passed to the SCP. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/extra_args_ssh** +:ref:`String` **ssh_remote_deploy/extra_args_ssh** :ref:`🔗` Array of the additional command line arguments passed to the SSH. @@ -198,7 +194,7 @@ Array of the additional command line arguments passed to the SSH. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/host** +:ref:`String` **ssh_remote_deploy/host** :ref:`🔗` Remote host SSH user name and address, in ``user@address`` format. @@ -210,7 +206,7 @@ Remote host SSH user name and address, in ``user@address`` format. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/port** +:ref:`String` **ssh_remote_deploy/port** :ref:`🔗` Remote host SSH port number. @@ -222,7 +218,7 @@ Remote host SSH port number. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/run_script** +:ref:`String` **ssh_remote_deploy/run_script** :ref:`🔗` Script code to execute on the remote host when running the app. @@ -240,49 +236,25 @@ The following variables can be used in the script: ---- -.. _class_EditorExportPlatformLinuxBSD_property_texture_format/bptc: - -.. rst-class:: classref-property - -:ref:`bool` **texture_format/bptc** - -If ``true``, project textures are exported in the BPTC format. - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformLinuxBSD_property_texture_format/etc: - -.. rst-class:: classref-property - -:ref:`bool` **texture_format/etc** - -If ``true``, project textures are exported in the ETC format. - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformLinuxBSD_property_texture_format/etc2: +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/etc2_astc: .. rst-class:: classref-property -:ref:`bool` **texture_format/etc2** +:ref:`bool` **texture_format/etc2_astc** :ref:`🔗` -If ``true``, project textures are exported in the ETC2 format. +If ``true``, project textures are exported in the ETC2/ASTC format. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformLinuxBSD_property_texture_format/s3tc: +.. _class_EditorExportPlatformLinuxBSD_property_texture_format/s3tc_bptc: .. rst-class:: classref-property -:ref:`bool` **texture_format/s3tc** +:ref:`bool` **texture_format/s3tc_bptc** :ref:`🔗` -If ``true``, project textures are exported in the S3TC format. +If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -291,3 +263,4 @@ If ``true``, project textures are exported in the S3TC format. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index bde5b0fc636..33dbdf9f98f 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -31,185 +31,473 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/app_category` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/bundle_identifier` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/copyright` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`application/copyright_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/icon` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`application/icon_interpolation` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/min_macos_version` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/short_version` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/signature` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`application/version` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`binary_format/architecture` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/apple_team_id` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/certificate_file` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/certificate_password` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/codesign` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`codesign/custom_options` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/address_book` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/allow_dyld_environment_variables` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/allow_jit_code_execution` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/allow_unsigned_executable_memory` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_bluetooth` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_usb` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/enabled` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_downloads` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_movies` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_music` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_pictures` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_user_selected` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`codesign/entitlements/app_sandbox/helper_executables` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_client` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_server` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/apple_events` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/audio_input` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/calendars` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/camera` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/entitlements/custom_file` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/debugging` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/disable_library_validation` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/location` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`codesign/entitlements/photos_library` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/identity` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/installer_identity` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`codesign/provisioning_profile` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/debug` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/release` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`debug/export_console_wrapper` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`display/high_res` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`export/distribution_type` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`notarization/api_key` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`notarization/api_key_id` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`notarization/api_uuid` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`notarization/apple_id_name` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`notarization/apple_id_password` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`notarization/notarization` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/address_book_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/address_book_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/calendar_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/calendar_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/camera_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/desktop_folder_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/desktop_folder_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/documents_folder_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/documents_folder_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/downloads_folder_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/downloads_folder_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/location_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/location_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/microphone_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/network_volumes_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/network_volumes_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/photos_library_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/photos_library_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`privacy/removable_volumes_usage_description` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`privacy/removable_volumes_usage_description_localized` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_scp` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_ssh` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/host` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/port` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/platform_build` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/sdk_build` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/sdk_name` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/sdk_version` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/xcode_build` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`xcode/xcode_version` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/additional_plist_content` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/app_category` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/bundle_identifier` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/copyright` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`application/copyright_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_angle` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/icon` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/min_macos_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/short_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/signature` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`binary_format/architecture` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/apple_team_id` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/certificate_file` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/certificate_password` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/codesign` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`codesign/custom_options` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/address_book` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_dyld_environment_variables` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_jit_code_execution` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/allow_unsigned_executable_memory` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_bluetooth` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/device_usb` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_downloads` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_movies` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_music` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_pictures` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`codesign/entitlements/app_sandbox/files_user_selected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`codesign/entitlements/app_sandbox/helper_executables` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_client` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/app_sandbox/network_server` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/apple_events` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/audio_input` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/calendars` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/camera` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/entitlements/custom_file` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/debugging` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/disable_library_validation` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/location` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`codesign/entitlements/photos_library` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/identity` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/installer_identity` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`codesign/provisioning_profile` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/export_console_wrapper` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/high_res` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`export/distribution_type` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_key` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_key_id` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/api_uuid` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/apple_id_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`notarization/apple_id_password` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`notarization/notarization` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/address_book_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/address_book_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/calendar_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/calendar_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/camera_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/advertising_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/audio_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/browsing_history/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/coarse_location/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/contacts/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/crash_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/credit_info/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/customer_support/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/device_id/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/email_address/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/emails_or_text_messages/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/environment_scanning/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/fitness/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/gameplay_content/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/hands/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/head/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/health/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/name/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_contact_info/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_data_types/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_diagnostic_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_financial_info/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_usage_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_user_content/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/payment_info/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/performance_data/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/phone_number/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/photos_or_videos/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/physical_address/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/precise_location/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/product_interaction/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/purchase_history/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/search_hhistory/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/sensitive_info/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/collected` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/user_id/collection_purposes` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/linked_to_user` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/used_for_tracking` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/desktop_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/desktop_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/documents_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/documents_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/downloads_folder_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/downloads_folder_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/location_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/location_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/microphone_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/network_volumes_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/network_volumes_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/photos_library_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/photos_library_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/removable_volumes_usage_description` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/removable_volumes_usage_description_localized` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`privacy/tracking_domains` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/tracking_enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_scp` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/extra_args_ssh` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/host` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/port` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ssh_remote_deploy/run_script` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/platform_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_name` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/sdk_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/xcode_build` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`xcode/xcode_version` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -220,11 +508,28 @@ Properties Property Descriptions --------------------- +.. _class_EditorExportPlatformMacOS_property_application/additional_plist_content: + +.. rst-class:: classref-property + +:ref:`String` **application/additional_plist_content** :ref:`🔗` + +Additional data added to the root ```` section of the `Info.plist `__ file. The value should be an XML section with pairs of key-value elements, e.g.: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformMacOS_property_application/app_category: .. rst-class:: classref-property -:ref:`String` **application/app_category** +:ref:`String` **application/app_category** :ref:`🔗` Application category for the App Store. @@ -236,7 +541,7 @@ Application category for the App Store. .. rst-class:: classref-property -:ref:`String` **application/bundle_identifier** +:ref:`String` **application/bundle_identifier** :ref:`🔗` Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). @@ -248,7 +553,7 @@ Unique application identifier in a reverse-DNS format, can only contain alphanum .. rst-class:: classref-property -:ref:`String` **application/copyright** +:ref:`String` **application/copyright** :ref:`🔗` Copyright notice for the bundle visible to the user (in English). @@ -260,7 +565,7 @@ Copyright notice for the bundle visible to the user (in English). .. rst-class:: classref-property -:ref:`Dictionary` **application/copyright_localized** +:ref:`Dictionary` **application/copyright_localized** :ref:`🔗` Copyright notice for the bundle visible to the user (localized). @@ -268,13 +573,25 @@ Copyright notice for the bundle visible to the user (localized). ---- +.. _class_EditorExportPlatformMacOS_property_application/export_angle: + +.. rst-class:: classref-property + +:ref:`int` **application/export_angle** :ref:`🔗` + +If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver` is set to ``"opengl3_angle"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformMacOS_property_application/icon: .. rst-class:: classref-property -:ref:`String` **application/icon** +:ref:`String` **application/icon** :ref:`🔗` -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. .. rst-class:: classref-item-separator @@ -284,7 +601,7 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. .. rst-class:: classref-property -:ref:`int` **application/icon_interpolation** +:ref:`int` **application/icon_interpolation** :ref:`🔗` Interpolation method used to resize application icon. @@ -296,7 +613,7 @@ Interpolation method used to resize application icon. .. rst-class:: classref-property -:ref:`String` **application/min_macos_version** +:ref:`String` **application/min_macos_version** :ref:`🔗` Minimum version of macOS required for this application to run in the ``major.minor.patch`` or ``major.minor`` format, can only contain numeric characters (``0-9``) and periods (``.``). @@ -308,9 +625,9 @@ Minimum version of macOS required for this application to run in the ``major.min .. rst-class:: classref-property -:ref:`String` **application/short_version** +:ref:`String` **application/short_version** :ref:`🔗` -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -320,7 +637,7 @@ Application version visible to the user, can only contain numeric characters (`` .. rst-class:: classref-property -:ref:`String` **application/signature** +:ref:`String` **application/signature** :ref:`🔗` A four-character creator code that is specific to the bundle. Optional. @@ -332,9 +649,9 @@ A four-character creator code that is specific to the bundle. Optional. .. rst-class:: classref-property -:ref:`String` **application/version** +:ref:`String` **application/version** :ref:`🔗` -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. .. rst-class:: classref-item-separator @@ -344,7 +661,7 @@ Machine-readable application version, in the ``major.minor.patch`` format, can o .. rst-class:: classref-property -:ref:`String` **binary_format/architecture** +:ref:`String` **binary_format/architecture** :ref:`🔗` Application executable architecture. @@ -360,7 +677,7 @@ Official export templates include ``universal`` binaries only. .. rst-class:: classref-property -:ref:`String` **codesign/apple_team_id** +:ref:`String` **codesign/apple_team_id** :ref:`🔗` Apple Team ID, unique 10-character string. To locate your Team ID check "Membership details" section in your Apple developer account dashboard, or "Organizational Unit" of your code signing certificate. See `Locate your Team ID `__. @@ -372,7 +689,7 @@ Apple Team ID, unique 10-character string. To locate your Team ID check "Members .. rst-class:: classref-property -:ref:`String` **codesign/certificate_file** +:ref:`String` **codesign/certificate_file** :ref:`🔗` PKCS #12 certificate file used to sign ``.app`` bundle. @@ -386,7 +703,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_CERTIFICA .. rst-class:: classref-property -:ref:`String` **codesign/certificate_password** +:ref:`String` **codesign/certificate_password** :ref:`🔗` Password for the certificate file used to sign ``.app`` bundle. @@ -400,7 +717,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_CERTIFICA .. rst-class:: classref-property -:ref:`int` **codesign/codesign** +:ref:`int` **codesign/codesign** :ref:`🔗` Tool to use for code signing. @@ -412,10 +729,12 @@ Tool to use for code signing. .. rst-class:: classref-property -:ref:`PackedStringArray` **codesign/custom_options** +:ref:`PackedStringArray` **codesign/custom_options** :ref:`🔗` Array of the additional command line arguments passed to the code signing tool. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + .. rst-class:: classref-item-separator ---- @@ -424,9 +743,9 @@ Array of the additional command line arguments passed to the code signing tool. .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/address_book** +:ref:`bool` **codesign/entitlements/address_book** :ref:`🔗` -Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the ``privacy/address_book_usage_description`` option. See `com.apple.security.personal-information.addressbook `__. +Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the :ref:`privacy/address_book_usage_description` option. See `com.apple.security.personal-information.addressbook `__. .. rst-class:: classref-item-separator @@ -436,7 +755,7 @@ Enable to allow access to contacts in the user's address book, if it's enabled y .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/allow_dyld_environment_variables** +:ref:`bool` **codesign/entitlements/allow_dyld_environment_variables** :ref:`🔗` Allows app to use dynamic linker environment variables to inject code. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-dyld-environment-variables `__. @@ -448,7 +767,7 @@ Allows app to use dynamic linker environment variables to inject code. If you ar .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/allow_jit_code_execution** +:ref:`bool` **codesign/entitlements/allow_jit_code_execution** :ref:`🔗` Allows creating writable and executable memory for JIT code. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-jit `__. @@ -460,7 +779,7 @@ Allows creating writable and executable memory for JIT code. If you are using ad .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/allow_unsigned_executable_memory** +:ref:`bool` **codesign/entitlements/allow_unsigned_executable_memory** :ref:`🔗` Allows creating writable and executable memory without JIT restrictions. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See `com.apple.security.cs.allow-unsigned-executable-memory `__. @@ -472,7 +791,7 @@ Allows creating writable and executable memory without JIT restrictions. If you .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/app_sandbox/device_bluetooth** +:ref:`bool` **codesign/entitlements/app_sandbox/device_bluetooth** :ref:`🔗` Enable to allow app to interact with Bluetooth devices. This entitlement is required to use wireless controllers. See `com.apple.security.device.bluetooth `__. @@ -484,7 +803,7 @@ Enable to allow app to interact with Bluetooth devices. This entitlement is requ .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/app_sandbox/device_usb** +:ref:`bool` **codesign/entitlements/app_sandbox/device_usb** :ref:`🔗` Enable to allow app to interact with USB devices. This entitlement is required to use wired controllers. See `com.apple.security.device.usb `__. @@ -496,7 +815,7 @@ Enable to allow app to interact with USB devices. This entitlement is required t .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/app_sandbox/enabled** +:ref:`bool` **codesign/entitlements/app_sandbox/enabled** :ref:`🔗` Enables App Sandbox. The App Sandbox restricts access to user data, networking, and devices. Sandboxed apps can't access most of the file system, can't use custom file dialogs and execute binaries outside the .app bundle. See `App Sandbox `__. @@ -510,7 +829,7 @@ Enables App Sandbox. The App Sandbox restricts access to user data, networking, .. rst-class:: classref-property -:ref:`int` **codesign/entitlements/app_sandbox/files_downloads** +:ref:`int` **codesign/entitlements/app_sandbox/files_downloads** :ref:`🔗` Allows read or write access to the user's "Downloads" folder. See `com.apple.security.files.downloads.read-write `__. @@ -522,7 +841,7 @@ Allows read or write access to the user's "Downloads" folder. See `com.apple.sec .. rst-class:: classref-property -:ref:`int` **codesign/entitlements/app_sandbox/files_movies** +:ref:`int` **codesign/entitlements/app_sandbox/files_movies** :ref:`🔗` Allows read or write access to the user's "Movies" folder. See `com.apple.security.files.movies.read-write `__. @@ -534,7 +853,7 @@ Allows read or write access to the user's "Movies" folder. See `com.apple.securi .. rst-class:: classref-property -:ref:`int` **codesign/entitlements/app_sandbox/files_music** +:ref:`int` **codesign/entitlements/app_sandbox/files_music** :ref:`🔗` Allows read or write access to the user's "Music" folder. See `com.apple.security.files.music.read-write `__. @@ -546,7 +865,7 @@ Allows read or write access to the user's "Music" folder. See `com.apple.securit .. rst-class:: classref-property -:ref:`int` **codesign/entitlements/app_sandbox/files_pictures** +:ref:`int` **codesign/entitlements/app_sandbox/files_pictures** :ref:`🔗` Allows read or write access to the user's "Pictures" folder. See `com.apple.security.files.pictures.read-write `__. @@ -558,7 +877,7 @@ Allows read or write access to the user's "Pictures" folder. See `com.apple.secu .. rst-class:: classref-property -:ref:`int` **codesign/entitlements/app_sandbox/files_user_selected** +:ref:`int` **codesign/entitlements/app_sandbox/files_user_selected** :ref:`🔗` Allows read or write access to the locations the user has selected using a native file dialog. See `com.apple.security.files.user-selected.read-write `__. @@ -570,7 +889,7 @@ Allows read or write access to the locations the user has selected using a nativ .. rst-class:: classref-property -:ref:`Array` **codesign/entitlements/app_sandbox/helper_executables** +:ref:`Array` **codesign/entitlements/app_sandbox/helper_executables** :ref:`🔗` List of helper executables to embedded to the app bundle. Sandboxed app are limited to execute only these executable. See `Embedding a command-line tool in a sandboxed app `__. @@ -582,7 +901,7 @@ List of helper executables to embedded to the app bundle. Sandboxed app are limi .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/app_sandbox/network_client** +:ref:`bool` **codesign/entitlements/app_sandbox/network_client** :ref:`🔗` Enable to allow app to establish outgoing network connections. See `com.apple.security.network.client `__. @@ -594,7 +913,7 @@ Enable to allow app to establish outgoing network connections. See `com.apple.se .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/app_sandbox/network_server** +:ref:`bool` **codesign/entitlements/app_sandbox/network_server** :ref:`🔗` Enable to allow app to listen for incoming network connections. See `com.apple.security.network.server `__. @@ -606,7 +925,7 @@ Enable to allow app to listen for incoming network connections. See `com.apple.s .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/apple_events** +:ref:`bool` **codesign/entitlements/apple_events** :ref:`🔗` Enable to allow app to send Apple events to other apps. See `com.apple.security.automation.apple-events `__. @@ -618,9 +937,9 @@ Enable to allow app to send Apple events to other apps. See `com.apple.security. .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/audio_input** +:ref:`bool` **codesign/entitlements/audio_input** :ref:`🔗` -Enable if you need to use the microphone or other audio input sources, if it's enabled you should also provide usage message in the ``privacy/microphone_usage_description`` option. See `com.apple.security.device.audio-input `__. +Enable if you need to use the microphone or other audio input sources, if it's enabled you should also provide usage message in the :ref:`privacy/microphone_usage_description` option. See `com.apple.security.device.audio-input `__. .. rst-class:: classref-item-separator @@ -630,9 +949,9 @@ Enable if you need to use the microphone or other audio input sources, if it's e .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/calendars** +:ref:`bool` **codesign/entitlements/calendars** :ref:`🔗` -Enable to allow access to the user's calendar, if it's enabled you should also provide usage message in the ``privacy/calendar_usage_description`` option. See `com.apple.security.personal-information.calendars `__. +Enable to allow access to the user's calendar, if it's enabled you should also provide usage message in the :ref:`privacy/calendar_usage_description` option. See `com.apple.security.personal-information.calendars `__. .. rst-class:: classref-item-separator @@ -642,9 +961,9 @@ Enable to allow access to the user's calendar, if it's enabled you should also p .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/camera** +:ref:`bool` **codesign/entitlements/camera** :ref:`🔗` -Enable if you need to use the camera, if it's enabled you should also provide usage message in the ``privacy/camera_usage_description`` option. See `com.apple.security.device.camera `__. +Enable if you need to use the camera, if it's enabled you should also provide usage message in the :ref:`privacy/camera_usage_description` option. See `com.apple.security.device.camera `__. .. rst-class:: classref-item-separator @@ -654,7 +973,7 @@ Enable if you need to use the camera, if it's enabled you should also provide us .. rst-class:: classref-property -:ref:`String` **codesign/entitlements/custom_file** +:ref:`String` **codesign/entitlements/custom_file** :ref:`🔗` Custom entitlements ``.plist`` file, if specified the rest of entitlements in the export config are ignored. @@ -666,7 +985,7 @@ Custom entitlements ``.plist`` file, if specified the rest of entitlements in th .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/debugging** +:ref:`bool` **codesign/entitlements/debugging** :ref:`🔗` You can temporarily enable this entitlement to use native debugger (GDB, LLDB) with the exported app. This entitlement should be disabled for production export. See `Embedding a command-line tool in a sandboxed app `__. @@ -678,7 +997,7 @@ You can temporarily enable this entitlement to use native debugger (GDB, LLDB) w .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/disable_library_validation** +:ref:`bool` **codesign/entitlements/disable_library_validation** :ref:`🔗` Allows app to load arbitrary libraries and frameworks (not signed with the same Team ID as the main executable or by Apple). Enable it if you are using GDExtension add-ons or ad-hoc signing, or want to support user-provided external add-ons. See `com.apple.security.cs.disable-library-validation `__. @@ -690,9 +1009,9 @@ Allows app to load arbitrary libraries and frameworks (not signed with the same .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/location** +:ref:`bool` **codesign/entitlements/location** :ref:`🔗` -Enable if you need to use location information from Location Services, if it's enabled you should also provide usage message in the ``privacy/location_usage_description`` option. See `com.apple.security.personal-information.location `__. +Enable if you need to use location information from Location Services, if it's enabled you should also provide usage message in the :ref:`privacy/location_usage_description` option. See `com.apple.security.personal-information.location `__. .. rst-class:: classref-item-separator @@ -702,9 +1021,9 @@ Enable if you need to use location information from Location Services, if it's e .. rst-class:: classref-property -:ref:`bool` **codesign/entitlements/photos_library** +:ref:`bool` **codesign/entitlements/photos_library** :ref:`🔗` -Enable to allow access to the user's Photos library, if it's enabled you should also provide usage message in the ``privacy/photos_library_usage_description`` option. See `com.apple.security.personal-information.photos-library `__. +Enable to allow access to the user's Photos library, if it's enabled you should also provide usage message in the :ref:`privacy/photos_library_usage_description` option. See `com.apple.security.personal-information.photos-library `__. .. rst-class:: classref-item-separator @@ -714,7 +1033,7 @@ Enable to allow access to the user's Photos library, if it's enabled you should .. rst-class:: classref-property -:ref:`String` **codesign/identity** +:ref:`String` **codesign/identity** :ref:`🔗` The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign ``.app`` bundle. @@ -726,7 +1045,7 @@ The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sig .. rst-class:: classref-property -:ref:`String` **codesign/installer_identity** +:ref:`String` **codesign/installer_identity** :ref:`🔗` The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign ``.pkg`` installer package for App Store distribution, use ``3rd Party Mac Developer Installer: Name.`` identity. @@ -738,7 +1057,7 @@ The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sig .. rst-class:: classref-property -:ref:`String` **codesign/provisioning_profile** +:ref:`String` **codesign/provisioning_profile** :ref:`🔗` Provisioning profile file downloaded from Apple developer account dashboard. See `Edit, download, or delete provisioning profiles `__. @@ -752,7 +1071,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_CODESIGN_PROVISION .. rst-class:: classref-property -:ref:`String` **custom_template/debug** +:ref:`String` **custom_template/debug** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -764,7 +1083,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **custom_template/release** +:ref:`String` **custom_template/release** :ref:`🔗` Path to the custom export template. If left empty, default template is used. @@ -776,7 +1095,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`int` **debug/export_console_wrapper** +:ref:`int` **debug/export_console_wrapper** :ref:`🔗` If enabled, a wrapper that can be used to run the application with console output is created alongside the exported application. @@ -788,9 +1107,9 @@ If enabled, a wrapper that can be used to run the application with console outpu .. rst-class:: classref-property -:ref:`bool` **display/high_res** +:ref:`bool` **display/high_res** :ref:`🔗` -If ``true``, the application is rendered at native display resolution, otherwise it is always rendered at loHPI resolution and upscaled by OS when required. +If ``true``, the application is rendered at native display resolution, otherwise it is always rendered at loDPI resolution and upscaled by OS when required. .. rst-class:: classref-item-separator @@ -800,7 +1119,7 @@ If ``true``, the application is rendered at native display resolution, otherwise .. rst-class:: classref-property -:ref:`int` **export/distribution_type** +:ref:`int` **export/distribution_type** :ref:`🔗` Application distribution target. @@ -812,7 +1131,7 @@ Application distribution target. .. rst-class:: classref-property -:ref:`String` **notarization/api_key** +:ref:`String` **notarization/api_key** :ref:`🔗` Apple App Store Connect API issuer key file. @@ -826,7 +1145,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_K .. rst-class:: classref-property -:ref:`String` **notarization/api_key_id** +:ref:`String` **notarization/api_key_id** :ref:`🔗` Apple App Store Connect API issuer key ID. @@ -840,7 +1159,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_K .. rst-class:: classref-property -:ref:`String` **notarization/api_uuid** +:ref:`String` **notarization/api_uuid** :ref:`🔗` Apple App Store Connect API issuer UUID. @@ -854,7 +1173,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_API_U .. rst-class:: classref-property -:ref:`String` **notarization/apple_id_name** +:ref:`String` **notarization/apple_id_name** :ref:`🔗` Apple ID account name (email address). @@ -868,7 +1187,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_APPLE .. rst-class:: classref-property -:ref:`String` **notarization/apple_id_password** +:ref:`String` **notarization/apple_id_password** :ref:`🔗` Apple ID app-specific password. @@ -882,7 +1201,7 @@ Can be overridden with the environment variable ``GODOT_MACOS_NOTARIZATION_APPLE .. rst-class:: classref-property -:ref:`int` **notarization/notarization** +:ref:`int` **notarization/notarization** :ref:`🔗` Tool to use for notarization. @@ -894,7 +1213,7 @@ Tool to use for notarization. .. rst-class:: classref-property -:ref:`String` **privacy/address_book_usage_description** +:ref:`String` **privacy/address_book_usage_description** :ref:`🔗` A message displayed when requesting access to the user's contacts (in English). @@ -906,7 +1225,7 @@ A message displayed when requesting access to the user's contacts (in English). .. rst-class:: classref-property -:ref:`Dictionary` **privacy/address_book_usage_description_localized** +:ref:`Dictionary` **privacy/address_book_usage_description_localized** :ref:`🔗` A message displayed when requesting access to the user's contacts (localized). @@ -918,7 +1237,7 @@ A message displayed when requesting access to the user's contacts (localized). .. rst-class:: classref-property -:ref:`String` **privacy/calendar_usage_description** +:ref:`String` **privacy/calendar_usage_description** :ref:`🔗` A message displayed when requesting access to the user's calendar data (in English). @@ -930,7 +1249,7 @@ A message displayed when requesting access to the user's calendar data (in Engli .. rst-class:: classref-property -:ref:`Dictionary` **privacy/calendar_usage_description_localized** +:ref:`Dictionary` **privacy/calendar_usage_description_localized** :ref:`🔗` A message displayed when requesting access to the user's calendar data (localized). @@ -942,7 +1261,7 @@ A message displayed when requesting access to the user's calendar data (localize .. rst-class:: classref-property -:ref:`String` **privacy/camera_usage_description** +:ref:`String` **privacy/camera_usage_description** :ref:`🔗` A message displayed when requesting access to the device's camera (in English). @@ -954,7 +1273,7 @@ A message displayed when requesting access to the device's camera (in English). .. rst-class:: classref-property -:ref:`Dictionary` **privacy/camera_usage_description_localized** +:ref:`Dictionary` **privacy/camera_usage_description_localized** :ref:`🔗` A message displayed when requesting access to the device's camera (localized). @@ -962,193 +1281,1899 @@ A message displayed when requesting access to the device's camera (localized). ---- -.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/advertising_data/collected: .. rst-class:: classref-property -:ref:`String` **privacy/desktop_folder_usage_description** +:ref:`bool` **privacy/collected_data/advertising_data/collected** :ref:`🔗` -A message displayed when requesting access to the user's "Desktop" folder (in English). +Indicates whether your app collects advertising data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/advertising_data/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/desktop_folder_usage_description_localized** +:ref:`int` **privacy/collected_data/advertising_data/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the user's "Desktop" folder (localized). +The reasons your app collects advertising data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/advertising_data/linked_to_user: .. rst-class:: classref-property -:ref:`String` **privacy/documents_folder_usage_description** +:ref:`bool` **privacy/collected_data/advertising_data/linked_to_user** :ref:`🔗` -A message displayed when requesting access to the user's "Documents" folder (in English). +Indicates whether your app links advertising data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/advertising_data/used_for_tracking: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/documents_folder_usage_description_localized** +:ref:`bool` **privacy/collected_data/advertising_data/used_for_tracking** :ref:`🔗` -A message displayed when requesting access to the user's "Documents" folder (localized). +Indicates whether your app uses advertising data for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/audio_data/collected: .. rst-class:: classref-property -:ref:`String` **privacy/downloads_folder_usage_description** +:ref:`bool` **privacy/collected_data/audio_data/collected** :ref:`🔗` -A message displayed when requesting access to the user's "Downloads" folder (in English). +Indicates whether your app collects audio data data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/audio_data/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/downloads_folder_usage_description_localized** +:ref:`int` **privacy/collected_data/audio_data/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the user's "Downloads" folder (localized). +The reasons your app collects audio data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/audio_data/linked_to_user: .. rst-class:: classref-property -:ref:`String` **privacy/location_usage_description** +:ref:`bool` **privacy/collected_data/audio_data/linked_to_user** :ref:`🔗` -A message displayed when requesting access to the user's location information (in English). +Indicates whether your app links audio data data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/audio_data/used_for_tracking: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/location_usage_description_localized** +:ref:`bool` **privacy/collected_data/audio_data/used_for_tracking** :ref:`🔗` -A message displayed when requesting access to the user's location information (localized). +Indicates whether your app uses audio data data for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/browsing_history/collected: .. rst-class:: classref-property -:ref:`String` **privacy/microphone_usage_description** +:ref:`bool` **privacy/collected_data/browsing_history/collected** :ref:`🔗` -A message displayed when requesting access to the device's microphone (in English). +Indicates whether your app collects browsing history. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/browsing_history/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/microphone_usage_description_localized** +:ref:`int` **privacy/collected_data/browsing_history/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the device's microphone (localized). +The reasons your app collects browsing history. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/browsing_history/linked_to_user: .. rst-class:: classref-property -:ref:`String` **privacy/network_volumes_usage_description** +:ref:`bool` **privacy/collected_data/browsing_history/linked_to_user** :ref:`🔗` -A message displayed when requesting access to the user's network drives (in English). +Indicates whether your app links browsing history to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/browsing_history/used_for_tracking: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/network_volumes_usage_description_localized** +:ref:`bool` **privacy/collected_data/browsing_history/used_for_tracking** :ref:`🔗` -A message displayed when requesting access to the user's network drives (localized). +Indicates whether your app uses browsing history for tracking. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/coarse_location/collected: .. rst-class:: classref-property -:ref:`String` **privacy/photos_library_usage_description** +:ref:`bool` **privacy/collected_data/coarse_location/collected** :ref:`🔗` -A message displayed when requesting access to the user's photo library (in English). +Indicates whether your app collects coarse location data. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/coarse_location/collection_purposes: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/photos_library_usage_description_localized** +:ref:`int` **privacy/collected_data/coarse_location/collection_purposes** :ref:`🔗` -A message displayed when requesting access to the user's photo library (localized). +The reasons your app collects coarse location data. See `Describing data use in privacy manifests `__. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/coarse_location/linked_to_user: .. rst-class:: classref-property -:ref:`String` **privacy/removable_volumes_usage_description** +:ref:`bool` **privacy/collected_data/coarse_location/linked_to_user** :ref:`🔗` -A message displayed when requesting access to the user's removable drives (in English). +Indicates whether your app links coarse location data to the user's identity. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description_localized: +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/coarse_location/used_for_tracking: .. rst-class:: classref-property -:ref:`Dictionary` **privacy/removable_volumes_usage_description_localized** +:ref:`bool` **privacy/collected_data/coarse_location/used_for_tracking** :ref:`🔗` -A message displayed when requesting access to the user's removable drives (localized). +Indicates whether your app uses coarse location data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/contacts/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/collected** :ref:`🔗` + +Indicates whether your app collects contacts. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/contacts/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/contacts/collection_purposes** :ref:`🔗` + +The reasons your app collects contacts. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/contacts/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/linked_to_user** :ref:`🔗` + +Indicates whether your app links contacts to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/contacts/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses contacts for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/crash_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/collected** :ref:`🔗` + +Indicates whether your app collects crash data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/crash_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/crash_data/collection_purposes** :ref:`🔗` + +The reasons your app collects crash data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/crash_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links crash data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/crash_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses crash data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/credit_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/collected** :ref:`🔗` + +Indicates whether your app collects credit information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/credit_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/credit_info/collection_purposes** :ref:`🔗` + +The reasons your app collects credit information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/credit_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links credit information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/credit_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses credit information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/customer_support/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/collected** :ref:`🔗` + +Indicates whether your app collects customer support data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/customer_support/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/customer_support/collection_purposes** :ref:`🔗` + +The reasons your app collects customer support data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/customer_support/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/linked_to_user** :ref:`🔗` + +Indicates whether your app links customer support data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/customer_support/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses customer support data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/device_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/collected** :ref:`🔗` + +Indicates whether your app collects device IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/device_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/device_id/collection_purposes** :ref:`🔗` + +The reasons your app collects device IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/device_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links device IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/device_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses device IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/email_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/collected** :ref:`🔗` + +Indicates whether your app collects email address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/email_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/email_address/collection_purposes** :ref:`🔗` + +The reasons your app collects email address. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/email_address/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/linked_to_user** :ref:`🔗` + +Indicates whether your app links email address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/email_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses email address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/emails_or_text_messages/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/collected** :ref:`🔗` + +Indicates whether your app collects emails or text messages. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/emails_or_text_messages/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/emails_or_text_messages/collection_purposes** :ref:`🔗` + +The reasons your app collects emails or text messages. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/emails_or_text_messages/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/linked_to_user** :ref:`🔗` + +Indicates whether your app links emails or text messages to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/emails_or_text_messages/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses emails or text messages for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/environment_scanning/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/collected** :ref:`🔗` + +Indicates whether your app collects environment scanning data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/environment_scanning/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/environment_scanning/collection_purposes** :ref:`🔗` + +The reasons your app collects environment scanning data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/environment_scanning/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/linked_to_user** :ref:`🔗` + +Indicates whether your app links environment scanning data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/environment_scanning/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses environment scanning data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/fitness/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/collected** :ref:`🔗` + +Indicates whether your app collects fitness and exercise data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/fitness/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/fitness/collection_purposes** :ref:`🔗` + +The reasons your app collects fitness and exercise data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/fitness/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/linked_to_user** :ref:`🔗` + +Indicates whether your app links fitness and exercise data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/fitness/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses fitness and exercise data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/gameplay_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/collected** :ref:`🔗` + +Indicates whether your app collects gameplay content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/gameplay_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/gameplay_content/collection_purposes** :ref:`🔗` + +The reasons your app collects gameplay content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/gameplay_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links gameplay content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/gameplay_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses gameplay content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/hands/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/collected** :ref:`🔗` + +Indicates whether your app collects user's hand structure and hand movements. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/hands/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/hands/collection_purposes** :ref:`🔗` + +The reasons your app collects user's hand structure and hand movements. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/hands/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's hand structure and hand movements to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/hands/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's hand structure and hand movements for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/head/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/collected** :ref:`🔗` + +Indicates whether your app collects user's head movement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/head/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/head/collection_purposes** :ref:`🔗` + +The reasons your app collects user's head movement. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/head/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's head movement to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/head/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's head movement for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/health/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/collected** :ref:`🔗` + +Indicates whether your app collects health and medical data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/health/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/health/collection_purposes** :ref:`🔗` + +The reasons your app collects health and medical data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/health/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/linked_to_user** :ref:`🔗` + +Indicates whether your app links health and medical data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/health/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses health and medical data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/name/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/collected** :ref:`🔗` + +Indicates whether your app collects user's name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/name/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/name/collection_purposes** :ref:`🔗` + +The reasons your app collects user's name. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/name/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's name to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/name/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's name for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_contact_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/collected** :ref:`🔗` + +Indicates whether your app collects any other contact information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_contact_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_contact_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other contact information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_contact_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other contact information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_contact_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other contact information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_data_types/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/collected** :ref:`🔗` + +Indicates whether your app collects any other data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_data_types/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_data_types/collection_purposes** :ref:`🔗` + +The reasons your app collects any other data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_data_types/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_data_types/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_diagnostic_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/collected** :ref:`🔗` + +Indicates whether your app collects any other diagnostic data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_diagnostic_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_diagnostic_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other diagnostic data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_diagnostic_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other diagnostic data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_diagnostic_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other diagnostic data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_financial_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/collected** :ref:`🔗` + +Indicates whether your app collects any other financial information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_financial_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_financial_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other financial information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_financial_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other financial information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_financial_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other financial information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_usage_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/collected** :ref:`🔗` + +Indicates whether your app collects any other usage data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_usage_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_usage_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other usage data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_usage_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other usage data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_usage_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other usage data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_user_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/collected** :ref:`🔗` + +Indicates whether your app collects any other user generated content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_user_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_user_content/collection_purposes** :ref:`🔗` + +The reasons your app collects any other user generated content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_user_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other user generated content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/other_user_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other user generated content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/payment_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/collected** :ref:`🔗` + +Indicates whether your app collects payment information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/payment_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/payment_info/collection_purposes** :ref:`🔗` + +The reasons your app collects payment information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/payment_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links payment information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/payment_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses payment information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/performance_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/collected** :ref:`🔗` + +Indicates whether your app collects performance data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/performance_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/performance_data/collection_purposes** :ref:`🔗` + +The reasons your app collects performance data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/performance_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links performance data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/performance_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses performance data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/phone_number/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/collected** :ref:`🔗` + +Indicates whether your app collects phone number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/phone_number/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/phone_number/collection_purposes** :ref:`🔗` + +The reasons your app collects phone number. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/phone_number/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/linked_to_user** :ref:`🔗` + +Indicates whether your app links phone number to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/phone_number/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses phone number for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/photos_or_videos/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/collected** :ref:`🔗` + +Indicates whether your app collects photos or videos. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/photos_or_videos/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/photos_or_videos/collection_purposes** :ref:`🔗` + +The reasons your app collects photos or videos. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/photos_or_videos/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/linked_to_user** :ref:`🔗` + +Indicates whether your app links photos or videos to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/photos_or_videos/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses photos or videos for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/physical_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/collected** :ref:`🔗` + +Indicates whether your app collects physical address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/physical_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/physical_address/collection_purposes** :ref:`🔗` + +The reasons your app collects physical address. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/physical_address/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/linked_to_user** :ref:`🔗` + +Indicates whether your app links physical address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/physical_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses physical address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/precise_location/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/collected** :ref:`🔗` + +Indicates whether your app collects precise location data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/precise_location/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/precise_location/collection_purposes** :ref:`🔗` + +The reasons your app collects precise location data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/precise_location/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/linked_to_user** :ref:`🔗` + +Indicates whether your app links precise location data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/precise_location/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses precise location data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/product_interaction/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/collected** :ref:`🔗` + +Indicates whether your app collects product interaction data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/product_interaction/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/product_interaction/collection_purposes** :ref:`🔗` + +The reasons your app collects product interaction data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/product_interaction/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/linked_to_user** :ref:`🔗` + +Indicates whether your app links product interaction data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/product_interaction/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses product interaction data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/purchase_history/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/collected** :ref:`🔗` + +Indicates whether your app collects purchase history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/purchase_history/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/purchase_history/collection_purposes** :ref:`🔗` + +The reasons your app collects purchase history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/purchase_history/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/linked_to_user** :ref:`🔗` + +Indicates whether your app links purchase history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/purchase_history/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses purchase history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/search_hhistory/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/collected** :ref:`🔗` + +Indicates whether your app collects search history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/search_hhistory/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/search_hhistory/collection_purposes** :ref:`🔗` + +The reasons your app collects search history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/search_hhistory/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/linked_to_user** :ref:`🔗` + +Indicates whether your app links search history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/search_hhistory/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses search history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/sensitive_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/collected** :ref:`🔗` + +Indicates whether your app collects sensitive user information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/sensitive_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/sensitive_info/collection_purposes** :ref:`🔗` + +The reasons your app collects sensitive user information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/sensitive_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links sensitive user information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/sensitive_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses sensitive user information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/user_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/collected** :ref:`🔗` + +Indicates whether your app collects user IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/user_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/user_id/collection_purposes** :ref:`🔗` + +The reasons your app collects user IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/user_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links user IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/collected_data/user_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/desktop_folder_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's "Desktop" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/desktop_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/desktop_folder_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's "Desktop" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/documents_folder_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's "Documents" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/documents_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/documents_folder_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's "Documents" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/downloads_folder_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's "Downloads" folder (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/downloads_folder_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/downloads_folder_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's "Downloads" folder (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/location_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's location information (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/location_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/location_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's location information (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/microphone_usage_description** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/microphone_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/microphone_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/network_volumes_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's network drives (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/network_volumes_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/network_volumes_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's network drives (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/photos_library_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/photos_library_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/photos_library_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/removable_volumes_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's removable drives (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/removable_volumes_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/removable_volumes_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's removable drives (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/tracking_domains: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **privacy/tracking_domains** :ref:`🔗` + +The list of internet domains your app connects to that engage in tracking. See `Privacy manifest files `__. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformMacOS_property_privacy/tracking_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/tracking_enabled** :ref:`🔗` + +Indicates whether your app uses data for tracking. See `Privacy manifest files `__. .. rst-class:: classref-item-separator @@ -1158,7 +3183,7 @@ A message displayed when requesting access to the user's removable drives (local .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/cleanup_script** +:ref:`String` **ssh_remote_deploy/cleanup_script** :ref:`🔗` Script code to execute on the remote host when app is finished. @@ -1180,7 +3205,7 @@ The following variables can be used in the script: .. rst-class:: classref-property -:ref:`bool` **ssh_remote_deploy/enabled** +:ref:`bool` **ssh_remote_deploy/enabled** :ref:`🔗` Enables remote deploy using SSH/SCP. @@ -1192,7 +3217,7 @@ Enables remote deploy using SSH/SCP. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/extra_args_scp** +:ref:`String` **ssh_remote_deploy/extra_args_scp** :ref:`🔗` Array of the additional command line arguments passed to the SCP. @@ -1204,7 +3229,7 @@ Array of the additional command line arguments passed to the SCP. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/extra_args_ssh** +:ref:`String` **ssh_remote_deploy/extra_args_ssh** :ref:`🔗` Array of the additional command line arguments passed to the SSH. @@ -1216,7 +3241,7 @@ Array of the additional command line arguments passed to the SSH. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/host** +:ref:`String` **ssh_remote_deploy/host** :ref:`🔗` Remote host SSH user name and address, in ``user@address`` format. @@ -1228,7 +3253,7 @@ Remote host SSH user name and address, in ``user@address`` format. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/port** +:ref:`String` **ssh_remote_deploy/port** :ref:`🔗` Remote host SSH port number. @@ -1240,7 +3265,7 @@ Remote host SSH port number. .. rst-class:: classref-property -:ref:`String` **ssh_remote_deploy/run_script** +:ref:`String` **ssh_remote_deploy/run_script** :ref:`🔗` Script code to execute on the remote host when running the app. @@ -1262,7 +3287,7 @@ The following variables can be used in the script: .. rst-class:: classref-property -:ref:`String` **xcode/platform_build** +:ref:`String` **xcode/platform_build** :ref:`🔗` macOS build number used to build application executable. @@ -1274,7 +3299,7 @@ macOS build number used to build application executable. .. rst-class:: classref-property -:ref:`String` **xcode/sdk_build** +:ref:`String` **xcode/sdk_build** :ref:`🔗` macOS SDK build number used to build application executable. @@ -1286,7 +3311,7 @@ macOS SDK build number used to build application executable. .. rst-class:: classref-property -:ref:`String` **xcode/sdk_name** +:ref:`String` **xcode/sdk_name** :ref:`🔗` macOS SDK name used to build application executable. @@ -1298,7 +3323,7 @@ macOS SDK name used to build application executable. .. rst-class:: classref-property -:ref:`String` **xcode/sdk_version** +:ref:`String` **xcode/sdk_version** :ref:`🔗` macOS SDK version used to build application executable in the ``major.minor`` format. @@ -1310,7 +3335,7 @@ macOS SDK version used to build application executable in the ``major.minor`` fo .. rst-class:: classref-property -:ref:`String` **xcode/xcode_build** +:ref:`String` **xcode/xcode_build** :ref:`🔗` Xcode build number used to build application executable. @@ -1322,7 +3347,7 @@ Xcode build number used to build application executable. .. rst-class:: classref-property -:ref:`String` **xcode/xcode_version** +:ref:`String` **xcode/xcode_version** :ref:`🔗` Xcode version used to build application executable. @@ -1333,3 +3358,4 @@ Xcode version used to build application executable. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformpc.rst b/classes/class_editorexportplatformpc.rst index e30e1e4d554..195276a8d19 100644 --- a/classes/class_editorexportplatformpc.rst +++ b/classes/class_editorexportplatformpc.rst @@ -16,6 +16,22 @@ EditorExportPlatformPC Base class for the desktop platform exporter (Windows and Linux/BSD). +.. rst-class:: classref-introduction-group + +Description +----------- + +The base class for the desktop platform exporters. These include Windows and Linux/BSD, but not macOS. See the classes inheriting this one for more details. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for Windows <../tutorials/export/exporting_for_windows>` + +- :doc:`Exporting for Linux <../tutorials/export/exporting_for_linux>` + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -23,3 +39,4 @@ Base class for the desktop platform exporter (Windows and Linux/BSD). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index 2f2f41ee0e3..e1dbc07c3e0 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -16,11 +16,22 @@ Exporter for the Web. .. rst-class:: classref-introduction-group +Description +----------- + +The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset. + +\ **Note:** Godot on Web is rendered inside a ```` tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main :ref:`Window` of the application. + +.. rst-class:: classref-introduction-group + Tutorials --------- - :doc:`Exporting for the Web <../tutorials/export/exporting_for_web>` +- :doc:`Web documentation index <../tutorials/platform/web/index>` + .. rst-class:: classref-reftable-group Properties @@ -29,45 +40,49 @@ Properties .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/debug` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`custom_template/release` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`html/canvas_resize_policy` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`html/custom_html_shell` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`html/experimental_virtual_keyboard` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`html/export_icon` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`html/focus_canvas_on_start` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`html/head_include` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`progressive_web_app/background_color` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`progressive_web_app/display` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`progressive_web_app/enabled` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`progressive_web_app/icon_144x144` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`progressive_web_app/icon_180x180` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`progressive_web_app/icon_512x512` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`progressive_web_app/offline_page` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`progressive_web_app/orientation` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`variant/extensions_support` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`vram_texture_compression/for_desktop` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`vram_texture_compression/for_mobile` | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`html/canvas_resize_policy` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`html/custom_html_shell` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/experimental_virtual_keyboard` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/export_icon` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`html/focus_canvas_on_start` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`html/head_include` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`progressive_web_app/background_color` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`progressive_web_app/display` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`progressive_web_app/enabled` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`progressive_web_app/ensure_cross_origin_isolation_headers` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_144x144` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_180x180` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/icon_512x512` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`progressive_web_app/offline_page` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`progressive_web_app/orientation` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`variant/extensions_support` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`variant/thread_support` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`vram_texture_compression/for_desktop` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`vram_texture_compression/for_mobile` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,9 +97,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String` **custom_template/debug** +:ref:`String` **custom_template/debug** :ref:`🔗` -Path to the custom export template. If left empty, default template is used. +File path to the custom export template used for debug builds. If left empty, the default template is used. .. rst-class:: classref-item-separator @@ -94,9 +109,9 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String` **custom_template/release** +:ref:`String` **custom_template/release** :ref:`🔗` -Path to the custom export template. If left empty, default template is used. +File path to the custom export template used for release builds. If left empty, the default template is used. .. rst-class:: classref-item-separator @@ -106,9 +121,15 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`int` **html/canvas_resize_policy** +:ref:`int` **html/canvas_resize_policy** :ref:`🔗` + +Determines how the canvas should be resized by Godot. + +- **None:** The canvas is not automatically resized. -The canvas resize policy determines how the canvas should be resized by Godot. +- **Project:** The size of the canvas is dependent on the :ref:`ProjectSettings`. + +- **Adaptive:** The canvas is automatically resized to fit as much of the web page as possible. .. rst-class:: classref-item-separator @@ -118,11 +139,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String` **html/custom_html_shell** +:ref:`String` **html/custom_html_shell** :ref:`🔗` -.. container:: contribute +The custom HTML page that wraps the exported web build. If left empty, the default HTML shell is used. - There is currently no description for this property. Please help us by :ref:`contributing one `! +For more information, see the :doc:`Customizing HTML5 Shell <../tutorials/platform/web/customizing_html5_shell>` tutorial. .. rst-class:: classref-item-separator @@ -132,11 +153,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool` **html/experimental_virtual_keyboard** +:ref:`bool` **html/experimental_virtual_keyboard** :ref:`🔗` -.. container:: contribute +**Experimental:** This property may be changed or removed in future versions. - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, embeds support for a virtual keyboard into the web page, which is shown when necessary on touchscreen devices. .. rst-class:: classref-item-separator @@ -146,11 +167,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool` **html/export_icon** - -.. container:: contribute +:ref:`bool` **html/export_icon** :ref:`🔗` - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, the project icon will be used as the favicon for this application's web page. .. rst-class:: classref-item-separator @@ -160,11 +179,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool` **html/focus_canvas_on_start** +:ref:`bool` **html/focus_canvas_on_start** :ref:`🔗` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +If ``true``, the canvas will be focused as soon as the application is loaded, if the browser window is already in focus. .. rst-class:: classref-item-separator @@ -174,11 +191,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String` **html/head_include** +:ref:`String` **html/head_include** :ref:`🔗` -.. container:: contribute +Additional HTML tags to include inside the ````, such as ```` tags. - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **Note:** You do not need to add a ```` tag, as it is automatically included based on the project's name. .. rst-class:: classref-item-separator @@ -188,11 +205,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`Color<class_Color>` **progressive_web_app/background_color** - -.. container:: contribute +:ref:`Color<class_Color>` **progressive_web_app/background_color** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/background_color>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The background color used behind the web application. .. rst-class:: classref-item-separator @@ -202,11 +217,17 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`int<class_int>` **progressive_web_app/display** +:ref:`int<class_int>` **progressive_web_app/display** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/display>` + +The `display mode <https://developer.mozilla.org/en-US/docs/Web/Manifest/display/>`__ to use for this progressive web application. Different browsers and platforms may not behave the same. + +- **Fullscreen:** Displays the app in fullscreen and hides all of the browser's UI elements. + +- **Standalone:** Displays the app in a separate window and hides all of the browser's UI elements. -.. container:: contribute +- **Minimal UI:** Displays the app in a separate window and only shows the browser's UI elements for navigation. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +- **Browser:** Displays the app as a normal web page. .. rst-class:: classref-item-separator @@ -216,11 +237,23 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool<class_bool>` **progressive_web_app/enabled** +:ref:`bool<class_bool>` **progressive_web_app/enabled** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/enabled>` + +If ``true``, turns this web build into a `progressive web application <https://en.wikipedia.org/wiki/Progressive_web_app>`__ (PWA). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **progressive_web_app/ensure_cross_origin_isolation_headers** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/ensure_cross_origin_isolation_headers>` -.. container:: contribute +When enabled, the progressive web app will make sure that each request has cross-origin isolation headers (COEP/COOP). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +This can simplify the setup to serve the exported game. .. rst-class:: classref-item-separator @@ -230,11 +263,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String<class_String>` **progressive_web_app/icon_144x144** +:ref:`String<class_String>` **progressive_web_app/icon_144x144** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_144x144>` -.. container:: contribute +File path to the smallest icon for this web application. If not defined, defaults to the project icon. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** If the icon is not 144x144, it will be automatically resized for the final build. .. rst-class:: classref-item-separator @@ -244,11 +277,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String<class_String>` **progressive_web_app/icon_180x180** +:ref:`String<class_String>` **progressive_web_app/icon_180x180** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_180x180>` -.. container:: contribute +File path to the small icon for this web application. If not defined, defaults to the project icon. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** If the icon is not 180x180, it will be automatically resized for the final build. .. rst-class:: classref-item-separator @@ -258,11 +291,11 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String<class_String>` **progressive_web_app/icon_512x512** +:ref:`String<class_String>` **progressive_web_app/icon_512x512** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/icon_512x512>` -.. container:: contribute +File path to the smallest icon for this web application. If not defined, defaults to the project icon. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** If the icon is not 512x512, it will be automatically resized for the final build. .. rst-class:: classref-item-separator @@ -272,11 +305,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`String<class_String>` **progressive_web_app/offline_page** +:ref:`String<class_String>` **progressive_web_app/offline_page** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/offline_page>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The page to display, should the server hosting the page not be available. This page is saved in the client's machine. .. rst-class:: classref-item-separator @@ -286,11 +317,15 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`int<class_int>` **progressive_web_app/orientation** +:ref:`int<class_int>` **progressive_web_app/orientation** :ref:`🔗<class_EditorExportPlatformWeb_property_progressive_web_app/orientation>` + +The orientation to use when the web application is run through a mobile device. + +- **Any:** No orientation is forced. -.. container:: contribute +- **Landscape:** Forces a horizontal layout (wider than it is taller). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +- **Portrait:** Forces a vertical layout (taller than it is wider). .. rst-class:: classref-item-separator @@ -300,11 +335,23 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool<class_bool>` **variant/extensions_support** +:ref:`bool<class_bool>` **variant/extensions_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/extensions_support>` -.. container:: contribute +If ``true`` enables :ref:`GDExtension<class_GDExtension>` support for this web build. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWeb_property_variant/thread_support: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **variant/thread_support** :ref:`🔗<class_EditorExportPlatformWeb_property_variant/thread_support>` + +If ``true``, the exported game will support threads. It requires `a "cross-origin isolated" website <https://web.dev/articles/coop-coep>`__, which may be difficult to set up and is limited for security reasons (such as not being able to communicate with third-party websites). + +If ``false``, the exported game will not support threads. As a result, it is more prone to performance and audio issues, but will only require to be run on an HTTPS website. .. rst-class:: classref-item-separator @@ -314,11 +361,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool<class_bool>` **vram_texture_compression/for_desktop** +:ref:`bool<class_bool>` **vram_texture_compression/for_desktop** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_desktop>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, allows textures to be optimized for desktop through the S3TC algorithm. .. rst-class:: classref-item-separator @@ -328,11 +373,9 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. rst-class:: classref-property -:ref:`bool<class_bool>` **vram_texture_compression/for_mobile** - -.. container:: contribute +:ref:`bool<class_bool>` **vram_texture_compression/for_mobile** :ref:`🔗<class_EditorExportPlatformWeb_property_vram_texture_compression/for_mobile>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true`` allows textures to be optimized for mobile through the ETC2 algorithm. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -341,3 +384,4 @@ The canvas resize policy determines how the canvas should be resized by Godot. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index 1ffcb1d4826..d87b04a1227 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -16,6 +16,13 @@ Exporter for Windows. .. rst-class:: classref-introduction-group +Description +----------- + +The Windows exporter customizes how a Windows build is handled. In the editor's "Export" window, it is created when adding a new "Windows" preset. + +.. rst-class:: classref-introduction-group + Tutorials --------- @@ -29,79 +36,81 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/company_name<class_EditorExportPlatformWindows_property_application/company_name>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/console_wrapper_icon<class_EditorExportPlatformWindows_property_application/console_wrapper_icon>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/copyright<class_EditorExportPlatformWindows_property_application/copyright>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/file_description<class_EditorExportPlatformWindows_property_application/file_description>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/file_version<class_EditorExportPlatformWindows_property_application/file_version>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/icon<class_EditorExportPlatformWindows_property_application/icon>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`application/icon_interpolation<class_EditorExportPlatformWindows_property_application/icon_interpolation>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`application/modify_resources<class_EditorExportPlatformWindows_property_application/modify_resources>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/product_name<class_EditorExportPlatformWindows_property_application/product_name>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/product_version<class_EditorExportPlatformWindows_property_application/product_version>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`application/trademarks<class_EditorExportPlatformWindows_property_application/trademarks>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`binary_format/architecture<class_EditorExportPlatformWindows_property_binary_format/architecture>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`binary_format/embed_pck<class_EditorExportPlatformWindows_property_binary_format/embed_pck>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`codesign/custom_options<class_EditorExportPlatformWindows_property_codesign/custom_options>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`codesign/description<class_EditorExportPlatformWindows_property_codesign/description>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`codesign/digest_algorithm<class_EditorExportPlatformWindows_property_codesign/digest_algorithm>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`codesign/enable<class_EditorExportPlatformWindows_property_codesign/enable>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`codesign/identity<class_EditorExportPlatformWindows_property_codesign/identity>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`codesign/identity_type<class_EditorExportPlatformWindows_property_codesign/identity_type>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`codesign/password<class_EditorExportPlatformWindows_property_codesign/password>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`codesign/timestamp<class_EditorExportPlatformWindows_property_codesign/timestamp>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`codesign/timestamp_server_url<class_EditorExportPlatformWindows_property_codesign/timestamp_server_url>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`custom_template/debug<class_EditorExportPlatformWindows_property_custom_template/debug>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`custom_template/release<class_EditorExportPlatformWindows_property_custom_template/release>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`debug/export_console_wrapper<class_EditorExportPlatformWindows_property_debug/export_console_wrapper>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/cleanup_script<class_EditorExportPlatformWindows_property_ssh_remote_deploy/cleanup_script>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`ssh_remote_deploy/enabled<class_EditorExportPlatformWindows_property_ssh_remote_deploy/enabled>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/extra_args_scp<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_scp>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/extra_args_ssh<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_ssh>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/host<class_EditorExportPlatformWindows_property_ssh_remote_deploy/host>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/port<class_EditorExportPlatformWindows_property_ssh_remote_deploy/port>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/run_script<class_EditorExportPlatformWindows_property_ssh_remote_deploy/run_script>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_format/bptc<class_EditorExportPlatformWindows_property_texture_format/bptc>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_format/etc<class_EditorExportPlatformWindows_property_texture_format/etc>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_format/etc2<class_EditorExportPlatformWindows_property_texture_format/etc2>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_format/s3tc<class_EditorExportPlatformWindows_property_texture_format/s3tc>` | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/company_name<class_EditorExportPlatformWindows_property_application/company_name>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/console_wrapper_icon<class_EditorExportPlatformWindows_property_application/console_wrapper_icon>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/copyright<class_EditorExportPlatformWindows_property_application/copyright>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`application/d3d12_agility_sdk_multiarch<class_EditorExportPlatformWindows_property_application/d3d12_agility_sdk_multiarch>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`application/export_angle<class_EditorExportPlatformWindows_property_application/export_angle>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`application/export_d3d12<class_EditorExportPlatformWindows_property_application/export_d3d12>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/file_description<class_EditorExportPlatformWindows_property_application/file_description>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/file_version<class_EditorExportPlatformWindows_property_application/file_version>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/icon<class_EditorExportPlatformWindows_property_application/icon>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`application/icon_interpolation<class_EditorExportPlatformWindows_property_application/icon_interpolation>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`application/modify_resources<class_EditorExportPlatformWindows_property_application/modify_resources>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/product_name<class_EditorExportPlatformWindows_property_application/product_name>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/product_version<class_EditorExportPlatformWindows_property_application/product_version>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/trademarks<class_EditorExportPlatformWindows_property_application/trademarks>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`binary_format/architecture<class_EditorExportPlatformWindows_property_binary_format/architecture>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`binary_format/embed_pck<class_EditorExportPlatformWindows_property_binary_format/embed_pck>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`codesign/custom_options<class_EditorExportPlatformWindows_property_codesign/custom_options>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`codesign/description<class_EditorExportPlatformWindows_property_codesign/description>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`codesign/digest_algorithm<class_EditorExportPlatformWindows_property_codesign/digest_algorithm>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`codesign/enable<class_EditorExportPlatformWindows_property_codesign/enable>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`codesign/identity<class_EditorExportPlatformWindows_property_codesign/identity>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`codesign/identity_type<class_EditorExportPlatformWindows_property_codesign/identity_type>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`codesign/password<class_EditorExportPlatformWindows_property_codesign/password>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`codesign/timestamp<class_EditorExportPlatformWindows_property_codesign/timestamp>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`codesign/timestamp_server_url<class_EditorExportPlatformWindows_property_codesign/timestamp_server_url>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`custom_template/debug<class_EditorExportPlatformWindows_property_custom_template/debug>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`custom_template/release<class_EditorExportPlatformWindows_property_custom_template/release>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/export_console_wrapper<class_EditorExportPlatformWindows_property_debug/export_console_wrapper>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/cleanup_script<class_EditorExportPlatformWindows_property_ssh_remote_deploy/cleanup_script>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`ssh_remote_deploy/enabled<class_EditorExportPlatformWindows_property_ssh_remote_deploy/enabled>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/extra_args_scp<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_scp>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/extra_args_ssh<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_ssh>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/host<class_EditorExportPlatformWindows_property_ssh_remote_deploy/host>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/port<class_EditorExportPlatformWindows_property_ssh_remote_deploy/port>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ssh_remote_deploy/run_script<class_EditorExportPlatformWindows_property_ssh_remote_deploy/run_script>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`texture_format/etc2_astc<class_EditorExportPlatformWindows_property_texture_format/etc2_astc>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`texture_format/s3tc_bptc<class_EditorExportPlatformWindows_property_texture_format/s3tc_bptc>` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,7 +125,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **application/company_name** +:ref:`String<class_String>` **application/company_name** :ref:`🔗<class_EditorExportPlatformWindows_property_application/company_name>` Company that produced the application. Required. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. @@ -128,7 +137,7 @@ Company that produced the application. Required. See `StringFileInfo <https://le .. rst-class:: classref-property -:ref:`String<class_String>` **application/console_wrapper_icon** +:ref:`String<class_String>` **application/console_wrapper_icon** :ref:`🔗<class_EditorExportPlatformWindows_property_application/console_wrapper_icon>` Console wrapper icon file. If left empty, it will fallback to :ref:`application/icon<class_EditorExportPlatformWindows_property_application/icon>`, then to :ref:`ProjectSettings.application/config/windows_native_icon<class_ProjectSettings_property_application/config/windows_native_icon>`, and lastly, :ref:`ProjectSettings.application/config/icon<class_ProjectSettings_property_application/config/icon>`. @@ -140,7 +149,7 @@ Console wrapper icon file. If left empty, it will fallback to :ref:`application/ .. rst-class:: classref-property -:ref:`String<class_String>` **application/copyright** +:ref:`String<class_String>` **application/copyright** :ref:`🔗<class_EditorExportPlatformWindows_property_application/copyright>` Copyright notice for the bundle visible to the user. Optional. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. @@ -148,11 +157,47 @@ Copyright notice for the bundle visible to the user. Optional. See `StringFileIn ---- +.. _class_EditorExportPlatformWindows_property_application/d3d12_agility_sdk_multiarch: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **application/d3d12_agility_sdk_multiarch** :ref:`🔗<class_EditorExportPlatformWindows_property_application/d3d12_agility_sdk_multiarch>` + +If ``true``, and :ref:`application/export_d3d12<class_EditorExportPlatformWindows_property_application/export_d3d12>` is set, the Agility SDK DLLs will be stored in arch-specific subdirectories. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/export_angle: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **application/export_angle** :ref:`🔗<class_EditorExportPlatformWindows_property_application/export_angle>` + +If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>` is set to ``"opengl3_angle"``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformWindows_property_application/export_d3d12: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **application/export_d3d12** :ref:`🔗<class_EditorExportPlatformWindows_property_application/export_d3d12>` + +If set to ``1``, Direct3D 12 runtime (DXIL, Agility SDK, PIX) libraries are exported with the exported application. If set to ``0``, Direct3D 12 libraries are exported only if :ref:`ProjectSettings.rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>` is set to ``"d3d12"``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWindows_property_application/file_description: .. rst-class:: classref-property -:ref:`String<class_String>` **application/file_description** +:ref:`String<class_String>` **application/file_description** :ref:`🔗<class_EditorExportPlatformWindows_property_application/file_description>` File description to be presented to users. Required. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. @@ -164,9 +209,9 @@ File description to be presented to users. Required. See `StringFileInfo <https: .. rst-class:: classref-property -:ref:`String<class_String>` **application/file_version** +:ref:`String<class_String>` **application/file_version** :ref:`🔗<class_EditorExportPlatformWindows_property_application/file_version>` -Version number of the file. Required. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. +Version number of the file. Falls back to :ref:`ProjectSettings.application/config/version<class_ProjectSettings_property_application/config/version>` if left empty. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. .. rst-class:: classref-item-separator @@ -176,9 +221,9 @@ Version number of the file. Required. See `StringFileInfo <https://learn.microso .. rst-class:: classref-property -:ref:`String<class_String>` **application/icon** +:ref:`String<class_String>` **application/icon** :ref:`🔗<class_EditorExportPlatformWindows_property_application/icon>` -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon<class_ProjectSettings_property_application/config/windows_native_icon>`, and then to :ref:`ProjectSettings.application/config/icon<class_ProjectSettings_property_application/config/icon>`. +Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon<class_ProjectSettings_property_application/config/windows_native_icon>`, and then to :ref:`ProjectSettings.application/config/icon<class_ProjectSettings_property_application/config/icon>`. .. rst-class:: classref-item-separator @@ -188,7 +233,7 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. .. rst-class:: classref-property -:ref:`int<class_int>` **application/icon_interpolation** +:ref:`int<class_int>` **application/icon_interpolation** :ref:`🔗<class_EditorExportPlatformWindows_property_application/icon_interpolation>` Interpolation method used to resize application icon. @@ -200,7 +245,7 @@ Interpolation method used to resize application icon. .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/modify_resources** +:ref:`bool<class_bool>` **application/modify_resources** :ref:`🔗<class_EditorExportPlatformWindows_property_application/modify_resources>` If enabled, icon and metadata of the exported executable is set according to the other ``application/*`` values. @@ -212,7 +257,7 @@ If enabled, icon and metadata of the exported executable is set according to the .. rst-class:: classref-property -:ref:`String<class_String>` **application/product_name** +:ref:`String<class_String>` **application/product_name** :ref:`🔗<class_EditorExportPlatformWindows_property_application/product_name>` Name of the application. Required. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. @@ -224,9 +269,9 @@ Name of the application. Required. See `StringFileInfo <https://learn.microsoft. .. rst-class:: classref-property -:ref:`String<class_String>` **application/product_version** +:ref:`String<class_String>` **application/product_version** :ref:`🔗<class_EditorExportPlatformWindows_property_application/product_version>` -Application version visible to the user. Required. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. +Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version<class_ProjectSettings_property_application/config/version>` if left empty. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. .. rst-class:: classref-item-separator @@ -236,7 +281,7 @@ Application version visible to the user. Required. See `StringFileInfo <https:// .. rst-class:: classref-property -:ref:`String<class_String>` **application/trademarks** +:ref:`String<class_String>` **application/trademarks** :ref:`🔗<class_EditorExportPlatformWindows_property_application/trademarks>` Trademarks and registered trademarks that apply to the file. Optional. See `StringFileInfo <https://learn.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block>`__. @@ -248,7 +293,7 @@ Trademarks and registered trademarks that apply to the file. Optional. See `Stri .. rst-class:: classref-property -:ref:`String<class_String>` **binary_format/architecture** +:ref:`String<class_String>` **binary_format/architecture** :ref:`🔗<class_EditorExportPlatformWindows_property_binary_format/architecture>` Application executable architecture. @@ -264,7 +309,7 @@ Official export templates include ``x86_32`` and ``x86_64`` binaries only. .. rst-class:: classref-property -:ref:`bool<class_bool>` **binary_format/embed_pck** +:ref:`bool<class_bool>` **binary_format/embed_pck** :ref:`🔗<class_EditorExportPlatformWindows_property_binary_format/embed_pck>` If ``true``, project resources are embedded into the executable. @@ -276,10 +321,12 @@ If ``true``, project resources are embedded into the executable. .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **codesign/custom_options** +:ref:`PackedStringArray<class_PackedStringArray>` **codesign/custom_options** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/custom_options>` Array of the additional command line arguments passed to the code signing tool. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -288,7 +335,7 @@ Array of the additional command line arguments passed to the code signing tool. .. rst-class:: classref-property -:ref:`String<class_String>` **codesign/description** +:ref:`String<class_String>` **codesign/description** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/description>` Description of the signed content. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -300,7 +347,7 @@ Description of the signed content. See `Sign Tool <https://learn.microsoft.com/e .. rst-class:: classref-property -:ref:`int<class_int>` **codesign/digest_algorithm** +:ref:`int<class_int>` **codesign/digest_algorithm** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/digest_algorithm>` Digest algorithm to use for creating signature. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -312,7 +359,7 @@ Digest algorithm to use for creating signature. See `Sign Tool <https://learn.mi .. rst-class:: classref-property -:ref:`bool<class_bool>` **codesign/enable** +:ref:`bool<class_bool>` **codesign/enable** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/enable>` If ``true``, executable signing is enabled. @@ -324,7 +371,7 @@ If ``true``, executable signing is enabled. .. rst-class:: classref-property -:ref:`String<class_String>` **codesign/identity** +:ref:`String<class_String>` **codesign/identity** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/identity>` PKCS #12 certificate file used to sign executable or certificate SHA-1 hash (if :ref:`codesign/identity_type<class_EditorExportPlatformWindows_property_codesign/identity_type>` is set to "Use certificate store"). See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -338,7 +385,7 @@ Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_IDENTIT .. rst-class:: classref-property -:ref:`int<class_int>` **codesign/identity_type** +:ref:`int<class_int>` **codesign/identity_type** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/identity_type>` Type of identity to use. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -352,7 +399,7 @@ Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_IDENTIT .. rst-class:: classref-property -:ref:`String<class_String>` **codesign/password** +:ref:`String<class_String>` **codesign/password** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/password>` Password for the certificate file used to sign executable. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -366,7 +413,7 @@ Can be overridden with the environment variable ``GODOT_WINDOWS_CODESIGN_PASSWOR .. rst-class:: classref-property -:ref:`bool<class_bool>` **codesign/timestamp** +:ref:`bool<class_bool>` **codesign/timestamp** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/timestamp>` If ``true``, time-stamp is added to the signature. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -378,7 +425,7 @@ If ``true``, time-stamp is added to the signature. See `Sign Tool <https://learn .. rst-class:: classref-property -:ref:`String<class_String>` **codesign/timestamp_server_url** +:ref:`String<class_String>` **codesign/timestamp_server_url** :ref:`🔗<class_EditorExportPlatformWindows_property_codesign/timestamp_server_url>` URL of the time stamp server. If left empty, the default server is used. See `Sign Tool <https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe>`__. @@ -390,7 +437,7 @@ URL of the time stamp server. If left empty, the default server is used. See `Si .. rst-class:: classref-property -:ref:`String<class_String>` **custom_template/debug** +:ref:`String<class_String>` **custom_template/debug** :ref:`🔗<class_EditorExportPlatformWindows_property_custom_template/debug>` Path to the custom export template. If left empty, default template is used. @@ -402,7 +449,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`String<class_String>` **custom_template/release** +:ref:`String<class_String>` **custom_template/release** :ref:`🔗<class_EditorExportPlatformWindows_property_custom_template/release>` Path to the custom export template. If left empty, default template is used. @@ -414,7 +461,7 @@ Path to the custom export template. If left empty, default template is used. .. rst-class:: classref-property -:ref:`int<class_int>` **debug/export_console_wrapper** +:ref:`int<class_int>` **debug/export_console_wrapper** :ref:`🔗<class_EditorExportPlatformWindows_property_debug/export_console_wrapper>` If ``true``, a console wrapper executable is exported alongside the main executable, which allows running the project with enabled console output. @@ -426,7 +473,7 @@ If ``true``, a console wrapper executable is exported alongside the main executa .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/cleanup_script** +:ref:`String<class_String>` **ssh_remote_deploy/cleanup_script** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/cleanup_script>` Script code to execute on the remote host when app is finished. @@ -448,7 +495,7 @@ The following variables can be used in the script: .. rst-class:: classref-property -:ref:`bool<class_bool>` **ssh_remote_deploy/enabled** +:ref:`bool<class_bool>` **ssh_remote_deploy/enabled** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/enabled>` Enables remote deploy using SSH/SCP. @@ -460,7 +507,7 @@ Enables remote deploy using SSH/SCP. .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/extra_args_scp** +:ref:`String<class_String>` **ssh_remote_deploy/extra_args_scp** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_scp>` Array of the additional command line arguments passed to the SCP. @@ -472,7 +519,7 @@ Array of the additional command line arguments passed to the SCP. .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/extra_args_ssh** +:ref:`String<class_String>` **ssh_remote_deploy/extra_args_ssh** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/extra_args_ssh>` Array of the additional command line arguments passed to the SSH. @@ -484,7 +531,7 @@ Array of the additional command line arguments passed to the SSH. .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/host** +:ref:`String<class_String>` **ssh_remote_deploy/host** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/host>` Remote host SSH user name and address, in ``user@address`` format. @@ -496,7 +543,7 @@ Remote host SSH user name and address, in ``user@address`` format. .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/port** +:ref:`String<class_String>` **ssh_remote_deploy/port** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/port>` Remote host SSH port number. @@ -508,7 +555,7 @@ Remote host SSH port number. .. rst-class:: classref-property -:ref:`String<class_String>` **ssh_remote_deploy/run_script** +:ref:`String<class_String>` **ssh_remote_deploy/run_script** :ref:`🔗<class_EditorExportPlatformWindows_property_ssh_remote_deploy/run_script>` Script code to execute on the remote host when running the app. @@ -526,49 +573,25 @@ The following variables can be used in the script: ---- -.. _class_EditorExportPlatformWindows_property_texture_format/bptc: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **texture_format/bptc** - -If ``true``, project textures are exported in the BPTC format. - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformWindows_property_texture_format/etc: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **texture_format/etc** - -If ``true``, project textures are exported in the ETC format. - -.. rst-class:: classref-item-separator - ----- - -.. _class_EditorExportPlatformWindows_property_texture_format/etc2: +.. _class_EditorExportPlatformWindows_property_texture_format/etc2_astc: .. rst-class:: classref-property -:ref:`bool<class_bool>` **texture_format/etc2** +:ref:`bool<class_bool>` **texture_format/etc2_astc** :ref:`🔗<class_EditorExportPlatformWindows_property_texture_format/etc2_astc>` -If ``true``, project textures are exported in the ETC2 format. +If ``true``, project textures are exported in the ETC2/ASTC format. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformWindows_property_texture_format/s3tc: +.. _class_EditorExportPlatformWindows_property_texture_format/s3tc_bptc: .. rst-class:: classref-property -:ref:`bool<class_bool>` **texture_format/s3tc** +:ref:`bool<class_bool>` **texture_format/s3tc_bptc** :ref:`🔗<class_EditorExportPlatformWindows_property_texture_format/s3tc_bptc>` -If ``true``, project textures are exported in the S3TC format. +If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -577,3 +600,4 @@ If ``true``, project textures are exported in the S3TC format. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 0e9b4429fb9..9bf24e20d1c 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -19,10 +19,17 @@ A script that is executed when exporting the project. Description ----------- -**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin<class_EditorExportPlugin_method__export_begin>` is called at the beginning of the export process and then :ref:`_export_file<class_EditorExportPlugin_method__export_file>` is called for each exported file. +**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin<class_EditorExportPlugin_private_method__export_begin>` is called at the beginning of the export process and then :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>` is called for each exported file. To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin<class_EditorPlugin_method_add_export_plugin>` method first. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Export Android plugins <../tutorials/platform/android/android_plugin>` + .. rst-class:: classref-reftable-group Methods @@ -31,59 +38,77 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_begin_customize_resources<class_EditorExportPlugin_method__begin_customize_resources>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_begin_customize_scenes<class_EditorExportPlugin_method__begin_customize_scenes>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`_customize_resource<class_EditorExportPlugin_method__customize_resource>` **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`_customize_scene<class_EditorExportPlugin_method__customize_scene>` **(** :ref:`Node<class_Node>` scene, :ref:`String<class_String>` path **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_customize_resources<class_EditorExportPlugin_method__end_customize_resources>` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_customize_scenes<class_EditorExportPlugin_method__end_customize_scenes>` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_begin<class_EditorExportPlugin_method__export_begin>` **(** :ref:`PackedStringArray<class_PackedStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_end<class_EditorExportPlugin_method__export_end>` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_file<class_EditorExportPlugin_method__export_file>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_method__get_customization_configuration_hash>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_export_features<class_EditorExportPlugin_method__get_export_features>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_export_options<class_EditorExportPlugin_method__get_export_options>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_name<class_EditorExportPlugin_method__get_name>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_should_update_export_options<class_EditorExportPlugin_method__should_update_export_options>` **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_file<class_EditorExportPlugin_method_add_file>` **(** :ref:`String<class_String>` path, :ref:`PackedByteArray<class_PackedByteArray>` file, :ref:`bool<class_bool>` remap **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_bundle_file<class_EditorExportPlugin_method_add_ios_bundle_file>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_cpp_code<class_EditorExportPlugin_method_add_ios_cpp_code>` **(** :ref:`String<class_String>` code **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_embedded_framework<class_EditorExportPlugin_method_add_ios_embedded_framework>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_linker_flags<class_EditorExportPlugin_method_add_ios_linker_flags>` **(** :ref:`String<class_String>` flags **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_plist_content<class_EditorExportPlugin_method_add_ios_plist_content>` **(** :ref:`String<class_String>` plist_content **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_project_static_lib<class_EditorExportPlugin_method_add_ios_project_static_lib>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_macos_plugin_file<class_EditorExportPlugin_method_add_macos_plugin_file>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_shared_object<class_EditorExportPlugin_method_add_shared_object>` **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` tags, :ref:`String<class_String>` target **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_option<class_EditorExportPlugin_method_get_option>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skip<class_EditorExportPlugin_method_skip>` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_begin_customize_scenes<class_EditorExportPlugin_private_method__begin_customize_scenes>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`_customize_resource<class_EditorExportPlugin_private_method__customize_resource>`\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`_customize_scene<class_EditorExportPlugin_private_method__customize_scene>`\ (\ scene\: :ref:`Node<class_Node>`, path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_end_customize_resources<class_EditorExportPlugin_private_method__end_customize_resources>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_end_customize_scenes<class_EditorExportPlugin_private_method__end_customize_scenes>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_export_begin<class_EditorExportPlugin_private_method__export_begin>`\ (\ features\: :ref:`PackedStringArray<class_PackedStringArray>`, is_debug\: :ref:`bool<class_bool>`, path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_export_end<class_EditorExportPlugin_private_method__export_end>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>`\ (\ path\: :ref:`String<class_String>`, type\: :ref:`String<class_String>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_dependencies<class_EditorExportPlugin_private_method__get_android_dependencies>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_dependencies_maven_repos<class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_android_libraries<class_EditorExportPlugin_private_method__get_android_libraries>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_android_manifest_activity_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_android_manifest_application_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_android_manifest_element_contents<class_EditorExportPlugin_private_method__get_android_manifest_element_contents>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_private_method__get_customization_configuration_hash>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_export_features<class_EditorExportPlugin_private_method__get_export_features>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_export_option_warning<class_EditorExportPlugin_private_method__get_export_option_warning>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_export_options_overrides<class_EditorExportPlugin_private_method__get_export_options_overrides>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_name<class_EditorExportPlugin_private_method__get_name>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_should_update_export_options<class_EditorExportPlugin_private_method__should_update_export_options>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_supports_platform<class_EditorExportPlugin_private_method__supports_platform>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_file<class_EditorExportPlugin_method_add_file>`\ (\ path\: :ref:`String<class_String>`, file\: :ref:`PackedByteArray<class_PackedByteArray>`, remap\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_bundle_file<class_EditorExportPlugin_method_add_ios_bundle_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_cpp_code<class_EditorExportPlugin_method_add_ios_cpp_code>`\ (\ code\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_embedded_framework<class_EditorExportPlugin_method_add_ios_embedded_framework>`\ (\ path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>`\ (\ path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_linker_flags<class_EditorExportPlugin_method_add_ios_linker_flags>`\ (\ flags\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_plist_content<class_EditorExportPlugin_method_add_ios_plist_content>`\ (\ plist_content\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_ios_project_static_lib<class_EditorExportPlugin_method_add_ios_project_static_lib>`\ (\ path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_macos_plugin_file<class_EditorExportPlugin_method_add_macos_plugin_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_shared_object<class_EditorExportPlugin_method_add_shared_object>`\ (\ path\: :ref:`String<class_String>`, tags\: :ref:`PackedStringArray<class_PackedStringArray>`, target\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_option<class_EditorExportPlugin_method_get_option>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skip<class_EditorExportPlugin_method_skip>`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,25 +119,25 @@ Methods Method Descriptions ------------------- -.. _class_EditorExportPlugin_method__begin_customize_resources: +.. _class_EditorExportPlugin_private_method__begin_customize_resources: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_begin_customize_resources** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| +:ref:`bool<class_bool>` **_begin_customize_resources**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__begin_customize_resources>` Return ``true`` if this plugin will customize resources based on the platform and features used. -When enabled, :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_method__get_customization_configuration_hash>`, :ref:`_customize_resource<class_EditorExportPlugin_method__customize_resource>` and :ref:`_customize_scene<class_EditorExportPlugin_method__customize_scene>` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash<class_EditorExportPlugin_private_method__get_customization_configuration_hash>`, :ref:`_customize_resource<class_EditorExportPlugin_private_method__customize_resource>` and :ref:`_customize_scene<class_EditorExportPlugin_private_method__customize_scene>` will be called and must be implemented. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__begin_customize_scenes: +.. _class_EditorExportPlugin_private_method__begin_customize_scenes: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_begin_customize_scenes** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| |const| +:ref:`bool<class_bool>` **_begin_customize_scenes**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__begin_customize_scenes>` Return true if this plugin will customize scenes based on the platform and features used. @@ -120,41 +145,41 @@ Return true if this plugin will customize scenes based on the platform and featu ---- -.. _class_EditorExportPlugin_method__customize_resource: +.. _class_EditorExportPlugin_private_method__customize_resource: .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **_customize_resource** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual| +:ref:`Resource<class_Resource>` **_customize_resource**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__customize_resource>` Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return ``null``. The *path* argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. -Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_method__begin_customize_resources>` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>` returns ``true``. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__customize_scene: +.. _class_EditorExportPlugin_private_method__customize_scene: .. rst-class:: classref-method -:ref:`Node<class_Node>` **_customize_scene** **(** :ref:`Node<class_Node>` scene, :ref:`String<class_String>` path **)** |virtual| +:ref:`Node<class_Node>` **_customize_scene**\ (\ scene\: :ref:`Node<class_Node>`, path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__customize_scene>` Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return ``null``. If a new scene is returned, it is up to you to dispose of the old one. -Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_method__begin_customize_resources>` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_scenes<class_EditorExportPlugin_private_method__begin_customize_scenes>` returns ``true``. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__end_customize_resources: +.. _class_EditorExportPlugin_private_method__end_customize_resources: .. rst-class:: classref-method -void **_end_customize_resources** **(** **)** |virtual| +|void| **_end_customize_resources**\ (\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__end_customize_resources>` This is called when the customization process for resources ends. @@ -162,11 +187,11 @@ This is called when the customization process for resources ends. ---- -.. _class_EditorExportPlugin_method__end_customize_scenes: +.. _class_EditorExportPlugin_private_method__end_customize_scenes: .. rst-class:: classref-method -void **_end_customize_scenes** **(** **)** |virtual| +|void| **_end_customize_scenes**\ (\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__end_customize_scenes>` This is called when the customization process for scenes ends. @@ -174,11 +199,11 @@ This is called when the customization process for scenes ends. ---- -.. _class_EditorExportPlugin_method__export_begin: +.. _class_EditorExportPlugin_private_method__export_begin: .. rst-class:: classref-method -void **_export_begin** **(** :ref:`PackedStringArray<class_PackedStringArray>` features, :ref:`bool<class_bool>` is_debug, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| +|void| **_export_begin**\ (\ features\: :ref:`PackedStringArray<class_PackedStringArray>`, is_debug\: :ref:`bool<class_bool>`, path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__export_begin>` Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. ``features`` is the list of features for the export, ``is_debug`` is ``true`` for debug builds, ``path`` is the target path for the exported project. ``flags`` is only used when running a runnable profile, e.g. when using native run on Android. @@ -186,11 +211,11 @@ Virtual method to be overridden by the user. It is called when the export starts ---- -.. _class_EditorExportPlugin_method__export_end: +.. _class_EditorExportPlugin_private_method__export_end: .. rst-class:: classref-method -void **_export_end** **(** **)** |virtual| +|void| **_export_end**\ (\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__export_end>` Virtual method to be overridden by the user. Called when the export is finished. @@ -198,11 +223,11 @@ Virtual method to be overridden by the user. Called when the export is finished. ---- -.. _class_EditorExportPlugin_method__export_file: +.. _class_EditorExportPlugin_private_method__export_file: .. rst-class:: classref-method -void **_export_file** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type, :ref:`PackedStringArray<class_PackedStringArray>` features **)** |virtual| +|void| **_export_file**\ (\ path\: :ref:`String<class_String>`, type\: :ref:`String<class_String>`, features\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| :ref:`🔗<class_EditorExportPlugin_private_method__export_file>` Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource<class_Resource>` represented by the file (e.g. :ref:`PackedScene<class_PackedScene>`) and ``features`` is the list of features for the export. @@ -212,25 +237,117 @@ Calling :ref:`skip<class_EditorExportPlugin_method_skip>` inside this callback w ---- -.. _class_EditorExportPlugin_method__get_customization_configuration_hash: +.. _class_EditorExportPlugin_private_method__get_android_dependencies: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_android_dependencies**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_dependencies>` + +Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: ``org.godot.example:my-plugin:0.0.0``\ + +For more information see `Android documentation on dependencies <https://developer.android.com/build/dependencies?agpversion=4.1#dependency-types>`__. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_android_dependencies_maven_repos**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos>` + +Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin. + +For more information see `Gradle documentation on dependency management <https://docs.gradle.org/current/userguide/dependency_management.html#sec:maven_repo>`__. + +\ **Note:** Google's Maven repo and the Maven Central repo are already included by default. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_android_libraries: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_android_libraries**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_libraries>` + +Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin. + +\ **Note:** Relative paths **must** be relative to Godot's ``res://addons/`` directory. For example, an AAR file located under ``res://addons/hello_world_plugin/HelloWorld.release.aar`` can be returned as an absolute path using ``res://addons/hello_world_plugin/HelloWorld.release.aar`` or a relative path using ``hello_world_plugin/HelloWorld.release.aar``. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_get_android_manifest_activity_element_contents**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents>` + +Virtual method to be overridden by the user. This is used at export time to update the contents of the ``activity`` element in the generated Android manifest. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_get_android_manifest_application_element_contents**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents>` + +Virtual method to be overridden by the user. This is used at export time to update the contents of the ``application`` element in the generated Android manifest. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_android_manifest_element_contents: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_customization_configuration_hash** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_android_manifest_element_contents**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_android_manifest_element_contents>` + +Virtual method to be overridden by the user. This is used at export time to update the contents of the ``manifest`` element in the generated Android manifest. + +\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build<class_EditorExportPlatformAndroid_property_gradle_build/use_gradle_build>` to be enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_customization_configuration_hash: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_customization_configuration_hash**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_customization_configuration_hash>` Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. -Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_method__begin_customize_resources>` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources<class_EditorExportPlugin_private_method__begin_customize_resources>` returns ``true``. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_export_features: +.. _class_EditorExportPlugin_private_method__get_export_features: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_export_features** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform, :ref:`bool<class_bool>` debug **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_export_features**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, debug\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_export_features>` Return a :ref:`PackedStringArray<class_PackedStringArray>` of additional features this preset, for the given ``platform``, should have. @@ -238,11 +355,25 @@ Return a :ref:`PackedStringArray<class_PackedStringArray>` of additional feature ---- -.. _class_EditorExportPlugin_method__get_export_options: +.. _class_EditorExportPlugin_private_method__get_export_option_warning: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_export_options** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| +:ref:`String<class_String>` **_get_export_option_warning**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_export_option_warning>` + +Check the requirements for the given ``option`` and return a non-empty warning string if they are not met. + +\ **Note:** Use :ref:`get_option<class_EditorExportPlugin_method_get_option>` to check the value of the export options. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_export_options: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_export_options**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_export_options>` Return a list of export options that can be configured for this export plugin. @@ -258,11 +389,41 @@ Each element in the return value is a :ref:`Dictionary<class_Dictionary>` with t ---- -.. _class_EditorExportPlugin_method__get_name: +.. _class_EditorExportPlugin_private_method__get_export_options_overrides: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **_get_export_options_overrides**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_export_options_overrides>` + +Return a :ref:`Dictionary<class_Dictionary>` of override values for export options, that will be used instead of user-provided values. Overridden options will be hidden from the user interface. + +:: + + class MyExportPlugin extends EditorExportPlugin: + func _get_name() -> String: + return "MyExportPlugin" + + func _supports_platform(platform) -> bool: + if platform is EditorExportPlatformPC: + # Run on all desktop platforms including Windows, MacOS and Linux. + return true + return false + + func _get_export_options_overrides(platform) -> Dictionary: + # Override "Embed PCK" to always be enabled. + return { + "binary_format/embed_pck": true, + } + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__get_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__get_name>` Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. @@ -272,13 +433,25 @@ Implementing this method is required. ---- -.. _class_EditorExportPlugin_method__should_update_export_options: +.. _class_EditorExportPlugin_private_method__should_update_export_options: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_should_update_export_options**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__should_update_export_options>` + +Return ``true``, if the result of :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>` has changed and the export options of preset corresponding to ``platform`` should be updated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_private_method__supports_platform: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_should_update_export_options** **(** :ref:`EditorExportPlatform<class_EditorExportPlatform>` platform **)** |virtual| |const| +:ref:`bool<class_bool>` **_supports_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |virtual| |const| :ref:`🔗<class_EditorExportPlugin_private_method__supports_platform>` -Return ``true``, if the result of :ref:`_get_export_options<class_EditorExportPlugin_method__get_export_options>` has changed and the export options of preset corresponding to ``platform`` should be updated. +Return ``true`` if the plugin supports the given ``platform``. .. rst-class:: classref-item-separator @@ -288,11 +461,11 @@ Return ``true``, if the result of :ref:`_get_export_options<class_EditorExportPl .. rst-class:: classref-method -void **add_file** **(** :ref:`String<class_String>` path, :ref:`PackedByteArray<class_PackedByteArray>` file, :ref:`bool<class_bool>` remap **)** +|void| **add_file**\ (\ path\: :ref:`String<class_String>`, file\: :ref:`PackedByteArray<class_PackedByteArray>`, remap\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_file>` Adds a custom file to be exported. ``path`` is the virtual path that can be used to load the file, ``file`` is the binary data of the file. -When called inside :ref:`_export_file<class_EditorExportPlugin_method__export_file>` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. +When called inside :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. .. rst-class:: classref-item-separator @@ -302,7 +475,7 @@ When called inside :ref:`_export_file<class_EditorExportPlugin_method__export_fi .. rst-class:: classref-method -void **add_ios_bundle_file** **(** :ref:`String<class_String>` path **)** +|void| **add_ios_bundle_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_bundle_file>` Adds an iOS bundle file from the given ``path`` to the exported project. @@ -314,7 +487,7 @@ Adds an iOS bundle file from the given ``path`` to the exported project. .. rst-class:: classref-method -void **add_ios_cpp_code** **(** :ref:`String<class_String>` code **)** +|void| **add_ios_cpp_code**\ (\ code\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_cpp_code>` Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. @@ -326,13 +499,13 @@ Adds a C++ code to the iOS export. The final code is created from the code appen .. rst-class:: classref-method -void **add_ios_embedded_framework** **(** :ref:`String<class_String>` path **)** +|void| **add_ios_embedded_framework**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_embedded_framework>` Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. -\ **Note:** For static libraries (\*.a) works in same way as ``add_ios_framework``. +\ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework<class_EditorExportPlugin_method_add_ios_framework>`. -This method should not be used for System libraries as they are already present on the device. +\ **Note:** This method should not be used for System libraries as they are already present on the device. .. rst-class:: classref-item-separator @@ -342,7 +515,7 @@ This method should not be used for System libraries as they are already present .. rst-class:: classref-method -void **add_ios_framework** **(** :ref:`String<class_String>` path **)** +|void| **add_ios_framework**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_framework>` Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project. @@ -354,7 +527,7 @@ Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Link .. rst-class:: classref-method -void **add_ios_linker_flags** **(** :ref:`String<class_String>` flags **)** +|void| **add_ios_linker_flags**\ (\ flags\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_linker_flags>` Adds linker flags for the iOS export. @@ -366,7 +539,7 @@ Adds linker flags for the iOS export. .. rst-class:: classref-method -void **add_ios_plist_content** **(** :ref:`String<class_String>` plist_content **)** +|void| **add_ios_plist_content**\ (\ plist_content\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_plist_content>` Adds content for iOS Property List files. @@ -378,7 +551,7 @@ Adds content for iOS Property List files. .. rst-class:: classref-method -void **add_ios_project_static_lib** **(** :ref:`String<class_String>` path **)** +|void| **add_ios_project_static_lib**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_ios_project_static_lib>` Adds a static lib from the given ``path`` to the iOS project. @@ -390,7 +563,7 @@ Adds a static lib from the given ``path`` to the iOS project. .. rst-class:: classref-method -void **add_macos_plugin_file** **(** :ref:`String<class_String>` path **)** +|void| **add_macos_plugin_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_macos_plugin_file>` Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app bundle. @@ -404,7 +577,7 @@ Adds file or directory matching ``path`` to ``PlugIns`` directory of macOS app b .. rst-class:: classref-method -void **add_shared_object** **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` tags, :ref:`String<class_String>` target **)** +|void| **add_shared_object**\ (\ path\: :ref:`String<class_String>`, tags\: :ref:`PackedStringArray<class_PackedStringArray>`, target\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorExportPlugin_method_add_shared_object>` Adds a shared object or a directory containing only shared objects with the given ``tags`` and destination ``path``. @@ -420,9 +593,9 @@ In case of a directory code-sign will error if you place non code object in dire .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_option** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **get_option**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EditorExportPlugin_method_get_option>` -Returns the current value of an export option supplied by :ref:`_get_export_options<class_EditorExportPlugin_method__get_export_options>`. +Returns the current value of an export option supplied by :ref:`_get_export_options<class_EditorExportPlugin_private_method__get_export_options>`. .. rst-class:: classref-item-separator @@ -432,9 +605,9 @@ Returns the current value of an export option supplied by :ref:`_get_export_opti .. rst-class:: classref-method -void **skip** **(** **)** +|void| **skip**\ (\ ) :ref:`🔗<class_EditorExportPlugin_method_skip>` -To be called inside :ref:`_export_file<class_EditorExportPlugin_method__export_file>`. Skips the current file, so it's not included in the export. +To be called inside :ref:`_export_file<class_EditorExportPlugin_private_method__export_file>`, :ref:`_customize_resource<class_EditorExportPlugin_private_method__customize_resource>`, or :ref:`_customize_scene<class_EditorExportPlugin_private_method__customize_scene>`. Skips the current file, so it's not included in the export. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -443,3 +616,4 @@ To be called inside :ref:`_export_file<class_EditorExportPlugin_method__export_f .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index bba6329a3af..3460c9359b8 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -31,29 +31,29 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_feature_name<class_EditorFeatureProfile_method_get_feature_name>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_class_disabled<class_EditorFeatureProfile_method_is_class_disabled>` **(** :ref:`StringName<class_StringName>` class_name **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_class_editor_disabled<class_EditorFeatureProfile_method_is_class_editor_disabled>` **(** :ref:`StringName<class_StringName>` class_name **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_class_property_disabled<class_EditorFeatureProfile_method_is_class_property_disabled>` **(** :ref:`StringName<class_StringName>` class_name, :ref:`StringName<class_StringName>` property **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_feature_disabled<class_EditorFeatureProfile_method_is_feature_disabled>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_from_file<class_EditorFeatureProfile_method_load_from_file>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_file<class_EditorFeatureProfile_method_save_to_file>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_class<class_EditorFeatureProfile_method_set_disable_class>` **(** :ref:`StringName<class_StringName>` class_name, :ref:`bool<class_bool>` disable **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_class_editor<class_EditorFeatureProfile_method_set_disable_class_editor>` **(** :ref:`StringName<class_StringName>` class_name, :ref:`bool<class_bool>` disable **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_class_property<class_EditorFeatureProfile_method_set_disable_class_property>` **(** :ref:`StringName<class_StringName>` class_name, :ref:`StringName<class_StringName>` property, :ref:`bool<class_bool>` disable **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_feature<class_EditorFeatureProfile_method_set_disable_feature>` **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature, :ref:`bool<class_bool>` disable **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_feature_name<class_EditorFeatureProfile_method_get_feature_name>`\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_class_disabled<class_EditorFeatureProfile_method_is_class_disabled>`\ (\ class_name\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_class_editor_disabled<class_EditorFeatureProfile_method_is_class_editor_disabled>`\ (\ class_name\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_class_property_disabled<class_EditorFeatureProfile_method_is_class_property_disabled>`\ (\ class_name\: :ref:`StringName<class_StringName>`, property\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_feature_disabled<class_EditorFeatureProfile_method_is_feature_disabled>`\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_from_file<class_EditorFeatureProfile_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_to_file<class_EditorFeatureProfile_method_save_to_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_class<class_EditorFeatureProfile_method_set_disable_class>`\ (\ class_name\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_class_editor<class_EditorFeatureProfile_method_set_disable_class_editor>`\ (\ class_name\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_class_property<class_EditorFeatureProfile_method_set_disable_class_property>`\ (\ class_name\: :ref:`StringName<class_StringName>`, property\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_feature<class_EditorFeatureProfile_method_set_disable_feature>`\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`, disable\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Feature**: +enum **Feature**: :ref:`🔗<enum_EditorFeatureProfile_Feature>` .. _class_EditorFeatureProfile_constant_FEATURE_3D: @@ -155,7 +155,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_feature_name** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** +:ref:`String<class_String>` **get_feature_name**\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_get_feature_name>` Returns the specified ``feature``'s human-readable name. @@ -167,7 +167,7 @@ Returns the specified ``feature``'s human-readable name. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_class_disabled** **(** :ref:`StringName<class_StringName>` class_name **)** |const| +:ref:`bool<class_bool>` **is_class_disabled**\ (\ class_name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EditorFeatureProfile_method_is_class_disabled>` Returns ``true`` if the class specified by ``class_name`` is disabled. When disabled, the class won't appear in the Create New Node dialog. @@ -179,7 +179,7 @@ Returns ``true`` if the class specified by ``class_name`` is disabled. When disa .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_class_editor_disabled** **(** :ref:`StringName<class_StringName>` class_name **)** |const| +:ref:`bool<class_bool>` **is_class_editor_disabled**\ (\ class_name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EditorFeatureProfile_method_is_class_editor_disabled>` Returns ``true`` if editing for the class specified by ``class_name`` is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. @@ -191,7 +191,7 @@ Returns ``true`` if editing for the class specified by ``class_name`` is disable .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_class_property_disabled** **(** :ref:`StringName<class_StringName>` class_name, :ref:`StringName<class_StringName>` property **)** |const| +:ref:`bool<class_bool>` **is_class_property_disabled**\ (\ class_name\: :ref:`StringName<class_StringName>`, property\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EditorFeatureProfile_method_is_class_property_disabled>` Returns ``true`` if ``property`` is disabled in the class specified by ``class_name``. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by ``class_name``. @@ -203,7 +203,7 @@ Returns ``true`` if ``property`` is disabled in the class specified by ``class_n .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_feature_disabled** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature **)** |const| +:ref:`bool<class_bool>` **is_feature_disabled**\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`\ ) |const| :ref:`🔗<class_EditorFeatureProfile_method_is_feature_disabled>` Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it will disappear from the editor entirely. @@ -215,10 +215,12 @@ Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_from_file** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_from_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_load_from_file>` Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file<class_EditorFeatureProfile_method_save_to_file>` method. +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir<class_EditorPaths_method_get_config_dir>`. + .. rst-class:: classref-item-separator ---- @@ -227,10 +229,12 @@ Loads an editor feature profile from a file. The file must follow the JSON forma .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_to_file** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **save_to_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_save_to_file>` Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file<class_EditorFeatureProfile_method_load_from_file>` method. +\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir<class_EditorPaths_method_get_config_dir>`. + .. rst-class:: classref-item-separator ---- @@ -239,7 +243,7 @@ Saves the editor feature profile to a file in JSON format. It can then be import .. rst-class:: classref-method -void **set_disable_class** **(** :ref:`StringName<class_StringName>` class_name, :ref:`bool<class_bool>` disable **)** +|void| **set_disable_class**\ (\ class_name\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_set_disable_class>` If ``disable`` is ``true``, disables the class specified by ``class_name``. When disabled, the class won't appear in the Create New Node dialog. @@ -251,7 +255,7 @@ If ``disable`` is ``true``, disables the class specified by ``class_name``. When .. rst-class:: classref-method -void **set_disable_class_editor** **(** :ref:`StringName<class_StringName>` class_name, :ref:`bool<class_bool>` disable **)** +|void| **set_disable_class_editor**\ (\ class_name\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_set_disable_class_editor>` If ``disable`` is ``true``, disables editing for the class specified by ``class_name``. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. @@ -263,7 +267,7 @@ If ``disable`` is ``true``, disables editing for the class specified by ``class_ .. rst-class:: classref-method -void **set_disable_class_property** **(** :ref:`StringName<class_StringName>` class_name, :ref:`StringName<class_StringName>` property, :ref:`bool<class_bool>` disable **)** +|void| **set_disable_class_property**\ (\ class_name\: :ref:`StringName<class_StringName>`, property\: :ref:`StringName<class_StringName>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_set_disable_class_property>` If ``disable`` is ``true``, disables editing for ``property`` in the class specified by ``class_name``. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by ``class_name``. @@ -275,7 +279,7 @@ If ``disable`` is ``true``, disables editing for ``property`` in the class speci .. rst-class:: classref-method -void **set_disable_feature** **(** :ref:`Feature<enum_EditorFeatureProfile_Feature>` feature, :ref:`bool<class_bool>` disable **)** +|void| **set_disable_feature**\ (\ feature\: :ref:`Feature<enum_EditorFeatureProfile_Feature>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFeatureProfile_method_set_disable_feature>` If ``disable`` is ``true``, disables the editor feature specified in ``feature``. When a feature is disabled, it will disappear from the editor entirely. @@ -286,3 +290,4 @@ If ``disable`` is ``true``, disables the editor feature specified in ``feature`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 26f86148b2b..da7fd84486a 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -48,6 +48,8 @@ Properties +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`filters<class_EditorFileDialog_property_filters>` | ``PackedStringArray()`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`option_count<class_EditorFileDialog_property_option_count>` | ``0`` | + +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`show_hidden_files<class_EditorFileDialog_property_show_hidden_files>` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | title | ``"Save a File"`` (overrides :ref:`Window<class_Window_property_title>`) | @@ -61,17 +63,37 @@ Methods .. table:: :widths: auto - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_filter<class_EditorFileDialog_method_add_filter>` **(** :ref:`String<class_String>` filter, :ref:`String<class_String>` description="" **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_filters<class_EditorFileDialog_method_clear_filters>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_EditorFileDialog_method_get_line_edit>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_vbox<class_EditorFileDialog_method_get_vbox>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`invalidate<class_EditorFileDialog_method_invalidate>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_filter<class_EditorFileDialog_method_add_filter>`\ (\ filter\: :ref:`String<class_String>`, description\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_option<class_EditorFileDialog_method_add_option>`\ (\ name\: :ref:`String<class_String>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`, default_value_index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_side_menu<class_EditorFileDialog_method_add_side_menu>`\ (\ menu\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filters<class_EditorFileDialog_method_clear_filters>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_EditorFileDialog_method_get_line_edit>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_option_default<class_EditorFileDialog_method_get_option_default>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_option_name<class_EditorFileDialog_method_get_option_name>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_option_values<class_EditorFileDialog_method_get_option_values>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_selected_options<class_EditorFileDialog_method_get_selected_options>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_vbox<class_EditorFileDialog_method_get_vbox>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`invalidate<class_EditorFileDialog_method_invalidate>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_file_dialog<class_EditorFileDialog_method_popup_file_dialog>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_default<class_EditorFileDialog_method_set_option_default>`\ (\ option\: :ref:`int<class_int>`, default_value_index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_name<class_EditorFileDialog_method_set_option_name>`\ (\ option\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_values<class_EditorFileDialog_method_set_option_values>`\ (\ option\: :ref:`int<class_int>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -86,7 +108,7 @@ Signals .. rst-class:: classref-signal -**dir_selected** **(** :ref:`String<class_String>` dir **)** +**dir_selected**\ (\ dir\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileDialog_signal_dir_selected>` Emitted when a directory is selected. @@ -98,7 +120,7 @@ Emitted when a directory is selected. .. rst-class:: classref-signal -**file_selected** **(** :ref:`String<class_String>` path **)** +**file_selected**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileDialog_signal_file_selected>` Emitted when a file is selected. @@ -110,7 +132,7 @@ Emitted when a file is selected. .. rst-class:: classref-signal -**files_selected** **(** :ref:`PackedStringArray<class_PackedStringArray>` paths **)** +**files_selected**\ (\ paths\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileDialog_signal_files_selected>` Emitted when multiple files are selected. @@ -127,7 +149,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FileMode**: +enum **FileMode**: :ref:`🔗<enum_EditorFileDialog_FileMode>` .. _class_EditorFileDialog_constant_FILE_MODE_OPEN_FILE: @@ -177,7 +199,7 @@ The **EditorFileDialog** can select only one file. Accepting the window will sav .. rst-class:: classref-enumeration -enum **Access**: +enum **Access**: :ref:`🔗<enum_EditorFileDialog_Access>` .. _class_EditorFileDialog_constant_ACCESS_RESOURCES: @@ -211,7 +233,7 @@ The **EditorFileDialog** can view the entire local file system. .. rst-class:: classref-enumeration -enum **DisplayMode**: +enum **DisplayMode**: :ref:`🔗<enum_EditorFileDialog_DisplayMode>` .. _class_EditorFileDialog_constant_DISPLAY_THUMBNAILS: @@ -242,12 +264,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Access<enum_EditorFileDialog_Access>` **access** = ``0`` +:ref:`Access<enum_EditorFileDialog_Access>` **access** = ``0`` :ref:`🔗<class_EditorFileDialog_property_access>` .. rst-class:: classref-property-setget -- void **set_access** **(** :ref:`Access<enum_EditorFileDialog_Access>` value **)** -- :ref:`Access<enum_EditorFileDialog_Access>` **get_access** **(** **)** +- |void| **set_access**\ (\ value\: :ref:`Access<enum_EditorFileDialog_Access>`\ ) +- :ref:`Access<enum_EditorFileDialog_Access>` **get_access**\ (\ ) The location from which the user may select a file, including ``res://``, ``user://``, and the local file system. @@ -259,12 +281,12 @@ The location from which the user may select a file, including ``res://``, ``user .. rst-class:: classref-property -:ref:`String<class_String>` **current_dir** +:ref:`String<class_String>` **current_dir** :ref:`🔗<class_EditorFileDialog_property_current_dir>` .. rst-class:: classref-property-setget -- void **set_current_dir** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_dir** **(** **)** +- |void| **set_current_dir**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_dir**\ (\ ) The currently occupied directory. @@ -276,12 +298,12 @@ The currently occupied directory. .. rst-class:: classref-property -:ref:`String<class_String>` **current_file** +:ref:`String<class_String>` **current_file** :ref:`🔗<class_EditorFileDialog_property_current_file>` .. rst-class:: classref-property-setget -- void **set_current_file** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_file** **(** **)** +- |void| **set_current_file**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_file**\ (\ ) The currently selected file. @@ -293,12 +315,12 @@ The currently selected file. .. rst-class:: classref-property -:ref:`String<class_String>` **current_path** +:ref:`String<class_String>` **current_path** :ref:`🔗<class_EditorFileDialog_property_current_path>` .. rst-class:: classref-property-setget -- void **set_current_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_path** **(** **)** +- |void| **set_current_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_path**\ (\ ) The file system path in the address bar. @@ -310,12 +332,12 @@ The file system path in the address bar. .. rst-class:: classref-property -:ref:`bool<class_bool>` **disable_overwrite_warning** = ``false`` +:ref:`bool<class_bool>` **disable_overwrite_warning** = ``false`` :ref:`🔗<class_EditorFileDialog_property_disable_overwrite_warning>` .. rst-class:: classref-property-setget -- void **set_disable_overwrite_warning** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_overwrite_warning_disabled** **(** **)** +- |void| **set_disable_overwrite_warning**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_overwrite_warning_disabled**\ (\ ) If ``true``, the **EditorFileDialog** will not warn the user before overwriting files. @@ -327,12 +349,12 @@ If ``true``, the **EditorFileDialog** will not warn the user before overwriting .. rst-class:: classref-property -:ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>` **display_mode** = ``0`` +:ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>` **display_mode** = ``0`` :ref:`🔗<class_EditorFileDialog_property_display_mode>` .. rst-class:: classref-property-setget -- void **set_display_mode** **(** :ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>` value **)** -- :ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>` **get_display_mode** **(** **)** +- |void| **set_display_mode**\ (\ value\: :ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>`\ ) +- :ref:`DisplayMode<enum_EditorFileDialog_DisplayMode>` **get_display_mode**\ (\ ) The view format in which the **EditorFileDialog** displays resources to the user. @@ -344,12 +366,12 @@ The view format in which the **EditorFileDialog** displays resources to the user .. rst-class:: classref-property -:ref:`FileMode<enum_EditorFileDialog_FileMode>` **file_mode** = ``4`` +:ref:`FileMode<enum_EditorFileDialog_FileMode>` **file_mode** = ``4`` :ref:`🔗<class_EditorFileDialog_property_file_mode>` .. rst-class:: classref-property-setget -- void **set_file_mode** **(** :ref:`FileMode<enum_EditorFileDialog_FileMode>` value **)** -- :ref:`FileMode<enum_EditorFileDialog_FileMode>` **get_file_mode** **(** **)** +- |void| **set_file_mode**\ (\ value\: :ref:`FileMode<enum_EditorFileDialog_FileMode>`\ ) +- :ref:`FileMode<enum_EditorFileDialog_FileMode>` **get_file_mode**\ (\ ) The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode<enum_EditorFileDialog_FileMode>`. @@ -361,15 +383,34 @@ The dialog's open or save mode, which affects the selection behavior. See :ref:` .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **filters** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **filters** = ``PackedStringArray()`` :ref:`🔗<class_EditorFileDialog_property_filters>` .. rst-class:: classref-property-setget -- void **set_filters** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_filters** **(** **)** +- |void| **set_filters**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_filters**\ (\ ) The available file type filters. For example, this shows only ``.png`` and ``.gd`` files: ``set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))``. Multiple file types can also be specified in a single filter. ``"*.png, *.jpg, *.jpeg ; Supported Images"`` will show both PNG and JPEG files when selected. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_property_option_count: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **option_count** = ``0`` :ref:`🔗<class_EditorFileDialog_property_option_count>` + +.. rst-class:: classref-property-setget + +- |void| **set_option_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_option_count**\ (\ ) + +The number of additional :ref:`OptionButton<class_OptionButton>`\ s and :ref:`CheckBox<class_CheckBox>`\ es in the dialog. + .. rst-class:: classref-item-separator ---- @@ -378,12 +419,12 @@ The available file type filters. For example, this shows only ``.png`` and ``.gd .. rst-class:: classref-property -:ref:`bool<class_bool>` **show_hidden_files** = ``false`` +:ref:`bool<class_bool>` **show_hidden_files** = ``false`` :ref:`🔗<class_EditorFileDialog_property_show_hidden_files>` .. rst-class:: classref-property-setget -- void **set_show_hidden_files** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_showing_hidden_files** **(** **)** +- |void| **set_show_hidden_files**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_hidden_files**\ (\ ) If ``true``, hidden files and directories will be visible in the **EditorFileDialog**. This property is synchronized with :ref:`EditorSettings.filesystem/file_dialog/show_hidden_files<class_EditorSettings_property_filesystem/file_dialog/show_hidden_files>`. @@ -400,7 +441,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_filter** **(** :ref:`String<class_String>` filter, :ref:`String<class_String>` description="" **)** +|void| **add_filter**\ (\ filter\: :ref:`String<class_String>`, description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_EditorFileDialog_method_add_filter>` Adds a comma-delimited file name ``filter`` option to the **EditorFileDialog** with an optional ``description``, which restricts what files can be picked. @@ -412,11 +453,37 @@ For example, a ``filter`` of ``"*.tscn, *.scn"`` and a ``description`` of ``"Sce ---- +.. _class_EditorFileDialog_method_add_option: + +.. rst-class:: classref-method + +|void| **add_option**\ (\ name\: :ref:`String<class_String>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`, default_value_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorFileDialog_method_add_option>` + +Adds an additional :ref:`OptionButton<class_OptionButton>` to the file dialog. If ``values`` is empty, a :ref:`CheckBox<class_CheckBox>` is added instead. + +\ ``default_value_index`` should be an index of the value in the ``values``. If ``values`` is empty it should be either ``1`` (checked), or ``0`` (unchecked). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_add_side_menu: + +.. rst-class:: classref-method + +|void| **add_side_menu**\ (\ menu\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_EditorFileDialog_method_add_side_menu>` + +Adds the given ``menu`` to the side of the file dialog with the given ``title`` text on top. Only one side menu is allowed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_clear_filters: .. rst-class:: classref-method -void **clear_filters** **(** **)** +|void| **clear_filters**\ (\ ) :ref:`🔗<class_EditorFileDialog_method_clear_filters>` Removes all filters except for "All Files (\*)". @@ -428,7 +495,7 @@ Removes all filters except for "All Files (\*)". .. rst-class:: classref-method -:ref:`LineEdit<class_LineEdit>` **get_line_edit** **(** **)** +:ref:`LineEdit<class_LineEdit>` **get_line_edit**\ (\ ) :ref:`🔗<class_EditorFileDialog_method_get_line_edit>` Returns the LineEdit for the selected file. @@ -438,13 +505,61 @@ Returns the LineEdit for the selected file. ---- +.. _class_EditorFileDialog_method_get_option_default: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_option_default**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileDialog_method_get_option_default>` + +Returns the default value index of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_option_name: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_option_name**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileDialog_method_get_option_name>` + +Returns the name of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_option_values: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **get_option_values**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileDialog_method_get_option_values>` + +Returns an array of values of the :ref:`OptionButton<class_OptionButton>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_get_selected_options: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **get_selected_options**\ (\ ) |const| :ref:`🔗<class_EditorFileDialog_method_get_selected_options>` + +Returns a :ref:`Dictionary<class_Dictionary>` with the selected values of the additional :ref:`OptionButton<class_OptionButton>`\ s and/or :ref:`CheckBox<class_CheckBox>`\ es. :ref:`Dictionary<class_Dictionary>` keys are names and values are selected value indices. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_get_vbox: .. rst-class:: classref-method -:ref:`VBoxContainer<class_VBoxContainer>` **get_vbox** **(** **)** +:ref:`VBoxContainer<class_VBoxContainer>` **get_vbox**\ (\ ) :ref:`🔗<class_EditorFileDialog_method_get_vbox>` -Returns the ``VBoxContainer`` used to display the file system. +Returns the :ref:`VBoxContainer<class_VBoxContainer>` used to display the file system. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property. @@ -456,10 +571,58 @@ Returns the ``VBoxContainer`` used to display the file system. .. rst-class:: classref-method -void **invalidate** **(** **)** +|void| **invalidate**\ (\ ) :ref:`🔗<class_EditorFileDialog_method_invalidate>` Notify the **EditorFileDialog** that its view of the data is no longer accurate. Updates the view contents on next view update. +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_popup_file_dialog: + +.. rst-class:: classref-method + +|void| **popup_file_dialog**\ (\ ) :ref:`🔗<class_EditorFileDialog_method_popup_file_dialog>` + +Shows the **EditorFileDialog** at the default size and position for file dialogs in the editor, and selects the file name if there is a current file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_default: + +.. rst-class:: classref-method + +|void| **set_option_default**\ (\ option\: :ref:`int<class_int>`, default_value_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorFileDialog_method_set_option_default>` + +Sets the default value index of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_name: + +.. rst-class:: classref-method + +|void| **set_option_name**\ (\ option\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileDialog_method_set_option_name>` + +Sets the name of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorFileDialog_method_set_option_values: + +.. rst-class:: classref-method + +|void| **set_option_values**\ (\ option\: :ref:`int<class_int>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileDialog_method_set_option_values>` + +Sets the option values of the :ref:`OptionButton<class_OptionButton>` with index ``option``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -467,3 +630,4 @@ Notify the **EditorFileDialog** that its view of the data is no longer accurate. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 288f0d67259..b144a8ac710 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -31,25 +31,25 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file_type<class_EditorFileSystem_method_get_file_type>` **(** :ref:`String<class_String>` path **)** |const| | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem<class_EditorFileSystem_method_get_filesystem>` **(** **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem_path<class_EditorFileSystem_method_get_filesystem_path>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_scanning_progress<class_EditorFileSystem_method_get_scanning_progress>` **(** **)** |const| | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_scanning<class_EditorFileSystem_method_is_scanning>` **(** **)** |const| | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reimport_files<class_EditorFileSystem_method_reimport_files>` **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scan<class_EditorFileSystem_method_scan>` **(** **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scan_sources<class_EditorFileSystem_method_scan_sources>` **(** **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_file<class_EditorFileSystem_method_update_file>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file_type<class_EditorFileSystem_method_get_file_type>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem<class_EditorFileSystem_method_get_filesystem>`\ (\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_filesystem_path<class_EditorFileSystem_method_get_filesystem_path>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_scanning_progress<class_EditorFileSystem_method_get_scanning_progress>`\ (\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_scanning<class_EditorFileSystem_method_is_scanning>`\ (\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reimport_files<class_EditorFileSystem_method_reimport_files>`\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scan<class_EditorFileSystem_method_scan>`\ (\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scan_sources<class_EditorFileSystem_method_scan_sources>`\ (\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_file<class_EditorFileSystem_method_update_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,7 +64,7 @@ Signals .. rst-class:: classref-signal -**filesystem_changed** **(** **)** +**filesystem_changed**\ (\ ) :ref:`🔗<class_EditorFileSystem_signal_filesystem_changed>` Emitted if the filesystem changed. @@ -76,7 +76,7 @@ Emitted if the filesystem changed. .. rst-class:: classref-signal -**resources_reimported** **(** :ref:`PackedStringArray<class_PackedStringArray>` resources **)** +**resources_reimported**\ (\ resources\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_signal_resources_reimported>` Emitted if a resource is reimported. @@ -88,7 +88,7 @@ Emitted if a resource is reimported. .. rst-class:: classref-signal -**resources_reload** **(** :ref:`PackedStringArray<class_PackedStringArray>` resources **)** +**resources_reload**\ (\ resources\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_signal_resources_reload>` Emitted if at least one resource is reloaded when the filesystem is scanned. @@ -100,7 +100,7 @@ Emitted if at least one resource is reloaded when the filesystem is scanned. .. rst-class:: classref-signal -**script_classes_updated** **(** **)** +**script_classes_updated**\ (\ ) :ref:`🔗<class_EditorFileSystem_signal_script_classes_updated>` Emitted when the list of global script classes gets updated. @@ -112,7 +112,7 @@ Emitted when the list of global script classes gets updated. .. rst-class:: classref-signal -**sources_changed** **(** :ref:`bool<class_bool>` exist **)** +**sources_changed**\ (\ exist\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorFileSystem_signal_sources_changed>` Emitted if the source of any imported file changed. @@ -129,7 +129,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_file_type** **(** :ref:`String<class_String>` path **)** |const| +:ref:`String<class_String>` **get_file_type**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorFileSystem_method_get_file_type>` Returns the resource type of the file, given the full path. This returns a string such as ``"Resource"`` or ``"GDScript"``, *not* a file extension such as ``".gd"``. @@ -141,7 +141,7 @@ Returns the resource type of the file, given the full path. This returns a strin .. rst-class:: classref-method -:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem** **(** **)** +:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_get_filesystem>` Gets the root directory object. @@ -153,7 +153,7 @@ Gets the root directory object. .. rst-class:: classref-method -:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem_path** **(** :ref:`String<class_String>` path **)** +:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_filesystem_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileSystem_method_get_filesystem_path>` Returns a view into the filesystem at ``path``. @@ -165,7 +165,7 @@ Returns a view into the filesystem at ``path``. .. rst-class:: classref-method -:ref:`float<class_float>` **get_scanning_progress** **(** **)** |const| +:ref:`float<class_float>` **get_scanning_progress**\ (\ ) |const| :ref:`🔗<class_EditorFileSystem_method_get_scanning_progress>` Returns the scan progress for 0 to 1 if the FS is being scanned. @@ -177,7 +177,7 @@ Returns the scan progress for 0 to 1 if the FS is being scanned. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_scanning** **(** **)** |const| +:ref:`bool<class_bool>` **is_scanning**\ (\ ) |const| :ref:`🔗<class_EditorFileSystem_method_is_scanning>` Returns ``true`` if the filesystem is being scanned. @@ -189,13 +189,13 @@ Returns ``true`` if the filesystem is being scanned. .. rst-class:: classref-method -void **reimport_files** **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)** +|void| **reimport_files**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorFileSystem_method_reimport_files>` Reimports a set of files. Call this if these files or their ``.import`` files were directly edited by script or an external program. If the file type changed or the file was newly created, use :ref:`update_file<class_EditorFileSystem_method_update_file>` or :ref:`scan<class_EditorFileSystem_method_scan>`. -\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process<class_Node_method__process>`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files<class_EditorFileSystem_method_reimport_files>` or :ref:`scan<class_EditorFileSystem_method_scan>` while an import is in progress. +\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process<class_Node_private_method__process>`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files<class_EditorFileSystem_method_reimport_files>` or :ref:`scan<class_EditorFileSystem_method_scan>` while an import is in progress. .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ If the file type changed or the file was newly created, use :ref:`update_file<cl .. rst-class:: classref-method -void **scan** **(** **)** +|void| **scan**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan>` Scan the filesystem for changes. @@ -217,7 +217,7 @@ Scan the filesystem for changes. .. rst-class:: classref-method -void **scan_sources** **(** **)** +|void| **scan_sources**\ (\ ) :ref:`🔗<class_EditorFileSystem_method_scan_sources>` Check if the source of any imported resource changed. @@ -229,7 +229,7 @@ Check if the source of any imported resource changed. .. rst-class:: classref-method -void **update_file** **(** :ref:`String<class_String>` path **)** +|void| **update_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorFileSystem_method_update_file>` Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. @@ -242,3 +242,4 @@ This will not import the file. To reimport, call :ref:`reimport_files<class_Edit .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index 273250b614e..421b8d2eeab 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -29,35 +29,35 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_dir_index<class_EditorFileSystemDirectory_method_find_dir_index>` **(** :ref:`String<class_String>` name **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_file_index<class_EditorFileSystemDirectory_method_find_file_index>` **(** :ref:`String<class_String>` name **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file<class_EditorFileSystemDirectory_method_get_file>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_file_count<class_EditorFileSystemDirectory_method_get_file_count>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_file_import_is_valid<class_EditorFileSystemDirectory_method_get_file_import_is_valid>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file_path<class_EditorFileSystemDirectory_method_get_file_path>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file_script_class_extends<class_EditorFileSystemDirectory_method_get_file_script_class_extends>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file_script_class_name<class_EditorFileSystemDirectory_method_get_file_script_class_name>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_file_type<class_EditorFileSystemDirectory_method_get_file_type>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_name<class_EditorFileSystemDirectory_method_get_name>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_parent<class_EditorFileSystemDirectory_method_get_parent>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_path<class_EditorFileSystemDirectory_method_get_path>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_subdir<class_EditorFileSystemDirectory_method_get_subdir>` **(** :ref:`int<class_int>` idx **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_subdir_count<class_EditorFileSystemDirectory_method_get_subdir_count>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_dir_index<class_EditorFileSystemDirectory_method_find_dir_index>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_file_index<class_EditorFileSystemDirectory_method_find_file_index>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file<class_EditorFileSystemDirectory_method_get_file>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_file_count<class_EditorFileSystemDirectory_method_get_file_count>`\ (\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_file_import_is_valid<class_EditorFileSystemDirectory_method_get_file_import_is_valid>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file_path<class_EditorFileSystemDirectory_method_get_file_path>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file_script_class_extends<class_EditorFileSystemDirectory_method_get_file_script_class_extends>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file_script_class_name<class_EditorFileSystemDirectory_method_get_file_script_class_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_file_type<class_EditorFileSystemDirectory_method_get_file_type>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_name<class_EditorFileSystemDirectory_method_get_name>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_parent<class_EditorFileSystemDirectory_method_get_parent>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_path<class_EditorFileSystemDirectory_method_get_path>`\ (\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` | :ref:`get_subdir<class_EditorFileSystemDirectory_method_get_subdir>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_subdir_count<class_EditorFileSystemDirectory_method_get_subdir_count>`\ (\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +72,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **find_dir_index** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **find_dir_index**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_find_dir_index>` Returns the index of the directory with name ``name`` or ``-1`` if not found. @@ -84,7 +84,7 @@ Returns the index of the directory with name ``name`` or ``-1`` if not found. .. rst-class:: classref-method -:ref:`int<class_int>` **find_file_index** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **find_file_index**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_find_file_index>` Returns the index of the file with name ``name`` or ``-1`` if not found. @@ -96,7 +96,7 @@ Returns the index of the file with name ``name`` or ``-1`` if not found. .. rst-class:: classref-method -:ref:`String<class_String>` **get_file** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_file**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file>` Returns the name of the file at index ``idx``. @@ -108,7 +108,7 @@ Returns the name of the file at index ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_file_count** **(** **)** |const| +:ref:`int<class_int>` **get_file_count**\ (\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_count>` Returns the number of files in this directory. @@ -120,7 +120,7 @@ Returns the number of files in this directory. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_file_import_is_valid** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **get_file_import_is_valid**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_import_is_valid>` Returns ``true`` if the file at index ``idx`` imported properly. @@ -132,7 +132,7 @@ Returns ``true`` if the file at index ``idx`` imported properly. .. rst-class:: classref-method -:ref:`String<class_String>` **get_file_path** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_file_path**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_path>` Returns the path to the file at index ``idx``. @@ -144,7 +144,7 @@ Returns the path to the file at index ``idx``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_file_script_class_extends** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_file_script_class_extends**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_script_class_extends>` Returns the base class of the script class defined in the file at index ``idx``. If the file doesn't define a script class using the ``class_name`` syntax, this will return an empty string. @@ -156,7 +156,7 @@ Returns the base class of the script class defined in the file at index ``idx``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_file_script_class_name** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_file_script_class_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_script_class_name>` Returns the name of the script class defined in the file at index ``idx``. If the file doesn't define a script class using the ``class_name`` syntax, this will return an empty string. @@ -168,7 +168,7 @@ Returns the name of the script class defined in the file at index ``idx``. If th .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_file_type** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_file_type**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_file_type>` Returns the resource type of the file at index ``idx``. This returns a string such as ``"Resource"`` or ``"GDScript"``, *not* a file extension such as ``".gd"``. @@ -180,7 +180,7 @@ Returns the resource type of the file at index ``idx``. This returns a string su .. rst-class:: classref-method -:ref:`String<class_String>` **get_name** **(** **)** +:ref:`String<class_String>` **get_name**\ (\ ) :ref:`🔗<class_EditorFileSystemDirectory_method_get_name>` Returns the name of this directory. @@ -192,7 +192,7 @@ Returns the name of this directory. .. rst-class:: classref-method -:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_parent** **(** **)** +:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_parent**\ (\ ) :ref:`🔗<class_EditorFileSystemDirectory_method_get_parent>` Returns the parent directory for this directory or ``null`` if called on a directory at ``res://`` or ``user://``. @@ -204,7 +204,7 @@ Returns the parent directory for this directory or ``null`` if called on a direc .. rst-class:: classref-method -:ref:`String<class_String>` **get_path** **(** **)** |const| +:ref:`String<class_String>` **get_path**\ (\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_path>` Returns the path to this directory. @@ -216,7 +216,7 @@ Returns the path to this directory. .. rst-class:: classref-method -:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_subdir** **(** :ref:`int<class_int>` idx **)** +:ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>` **get_subdir**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorFileSystemDirectory_method_get_subdir>` Returns the subdirectory at index ``idx``. @@ -228,7 +228,7 @@ Returns the subdirectory at index ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_subdir_count** **(** **)** |const| +:ref:`int<class_int>` **get_subdir_count**\ (\ ) |const| :ref:`🔗<class_EditorFileSystemDirectory_method_get_subdir_count>` Returns the number of subdirectories in this directory. @@ -239,3 +239,4 @@ Returns the number of subdirectories in this directory. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorfilesystemimportformatsupportquery.rst b/classes/class_editorfilesystemimportformatsupportquery.rst index 9e9c335f624..d92a013f3f7 100644 --- a/classes/class_editorfilesystemimportformatsupportquery.rst +++ b/classes/class_editorfilesystemimportformatsupportquery.rst @@ -29,13 +29,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_file_extensions<class_EditorFileSystemImportFormatSupportQuery_method__get_file_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_active<class_EditorFileSystemImportFormatSupportQuery_method__is_active>` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_query<class_EditorFileSystemImportFormatSupportQuery_method__query>` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_file_extensions<class_EditorFileSystemImportFormatSupportQuery_private_method__get_file_extensions>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_active<class_EditorFileSystemImportFormatSupportQuery_private_method__is_active>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_query<class_EditorFileSystemImportFormatSupportQuery_private_method__query>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,11 +46,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorFileSystemImportFormatSupportQuery_method__get_file_extensions: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__get_file_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_file_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_file_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorFileSystemImportFormatSupportQuery_private_method__get_file_extensions>` Return the file extensions supported. @@ -58,11 +58,11 @@ Return the file extensions supported. ---- -.. _class_EditorFileSystemImportFormatSupportQuery_method__is_active: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__is_active: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_active** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_active**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorFileSystemImportFormatSupportQuery_private_method__is_active>` Return whether this importer is active. @@ -70,11 +70,11 @@ Return whether this importer is active. ---- -.. _class_EditorFileSystemImportFormatSupportQuery_method__query: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__query: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_query** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_query**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorFileSystemImportFormatSupportQuery_private_method__query>` Query support. Return false if import must not continue. @@ -85,3 +85,4 @@ Query support. Return false if import must not continue. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index c3b34d8ab72..cdebc608398 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -21,7 +21,7 @@ Description **EditorImportPlugin**\ s 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. -EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions<class_EditorImportPlugin_method__get_recognized_extensions>` and :ref:`_get_resource_type<class_EditorImportPlugin_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 ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory<class_ProjectSettings_property_application/config/use_hidden_project_data_directory>`). +EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions<class_EditorImportPlugin_private_method__get_recognized_extensions>` and :ref:`_get_resource_type<class_EditorImportPlugin_private_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 ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory<class_ProjectSettings_property_application/config/use_hidden_project_data_directory>`). Below is an example EditorImportPlugin that imports a :ref:`Mesh<class_Mesh>` from a file with the extension ".special" or ".spec": @@ -154,33 +154,35 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_import_options<class_EditorImportPlugin_method__get_import_options>` **(** :ref:`String<class_String>` path, :ref:`int<class_int>` preset_index **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_import_order<class_EditorImportPlugin_method__get_import_order>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_importer_name<class_EditorImportPlugin_method__get_importer_name>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_get_option_visibility<class_EditorImportPlugin_method__get_option_visibility>` **(** :ref:`String<class_String>` path, :ref:`StringName<class_StringName>` option_name, :ref:`Dictionary<class_Dictionary>` options **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_preset_count<class_EditorImportPlugin_method__get_preset_count>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_preset_name<class_EditorImportPlugin_method__get_preset_name>` **(** :ref:`int<class_int>` preset_index **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_priority<class_EditorImportPlugin_method__get_priority>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_EditorImportPlugin_method__get_recognized_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_resource_type<class_EditorImportPlugin_method__get_resource_type>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_save_extension<class_EditorImportPlugin_method__get_save_extension>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_visible_name<class_EditorImportPlugin_method__get_visible_name>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import<class_EditorImportPlugin_method__import>` **(** :ref:`String<class_String>` source_file, :ref:`String<class_String>` save_path, :ref:`Dictionary<class_Dictionary>` options, :ref:`String[]<class_String>` platform_variants, :ref:`String[]<class_String>` gen_files **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_import_external_resource<class_EditorImportPlugin_method_append_import_external_resource>` **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` custom_options={}, :ref:`String<class_String>` custom_importer="", :ref:`Variant<class_Variant>` generator_parameters=null **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_import_threaded<class_EditorImportPlugin_private_method__can_import_threaded>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_import_options<class_EditorImportPlugin_private_method__get_import_options>`\ (\ path\: :ref:`String<class_String>`, preset_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_import_order<class_EditorImportPlugin_private_method__get_import_order>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_importer_name<class_EditorImportPlugin_private_method__get_importer_name>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_get_option_visibility<class_EditorImportPlugin_private_method__get_option_visibility>`\ (\ path\: :ref:`String<class_String>`, option_name\: :ref:`StringName<class_StringName>`, options\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_preset_count<class_EditorImportPlugin_private_method__get_preset_count>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_preset_name<class_EditorImportPlugin_private_method__get_preset_name>`\ (\ preset_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_priority<class_EditorImportPlugin_private_method__get_priority>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_EditorImportPlugin_private_method__get_recognized_extensions>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_resource_type<class_EditorImportPlugin_private_method__get_resource_type>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_save_extension<class_EditorImportPlugin_private_method__get_save_extension>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_visible_name<class_EditorImportPlugin_private_method__get_visible_name>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import<class_EditorImportPlugin_private_method__import>`\ (\ source_file\: :ref:`String<class_String>`, save_path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>`, platform_variants\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], gen_files\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_import_external_resource<class_EditorImportPlugin_method_append_import_external_resource>`\ (\ path\: :ref:`String<class_String>`, custom_options\: :ref:`Dictionary<class_Dictionary>` = {}, custom_importer\: :ref:`String<class_String>` = "", generator_parameters\: :ref:`Variant<class_Variant>` = null\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -191,11 +193,25 @@ Methods Method Descriptions ------------------- -.. _class_EditorImportPlugin_method__get_import_options: +.. _class_EditorImportPlugin_private_method__can_import_threaded: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_import_options** **(** :ref:`String<class_String>` path, :ref:`int<class_int>` preset_index **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_import_threaded**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__can_import_threaded>` + +Tells whether this importer can be run in parallel on threads, or, on the contrary, it's only safe for the editor to call it from the main thread, for one file at a time. + +If this method is not overridden, it will return ``true`` by default (i.e., safe for parallel importing). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorImportPlugin_private_method__get_import_options: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_import_options**\ (\ path\: :ref:`String<class_String>`, preset_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_import_options>` Gets 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). @@ -203,11 +219,11 @@ Gets the options and default values for the preset at this index. Returns an Arr ---- -.. _class_EditorImportPlugin_method__get_import_order: +.. _class_EditorImportPlugin_private_method__get_import_order: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_import_order** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_import_order**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_import_order>` Gets the order of this importer to be run when importing resources. Importers with *lower* import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is ``0`` unless overridden by a specific importer. See :ref:`ImportOrder<enum_ResourceImporter_ImportOrder>` for some predefined values. @@ -215,11 +231,11 @@ Gets the order of this importer to be run when importing resources. Importers wi ---- -.. _class_EditorImportPlugin_method__get_importer_name: +.. _class_EditorImportPlugin_private_method__get_importer_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_importer_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_importer_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_importer_name>` Gets the unique name of the importer. @@ -227,11 +243,11 @@ Gets the unique name of the importer. ---- -.. _class_EditorImportPlugin_method__get_option_visibility: +.. _class_EditorImportPlugin_private_method__get_option_visibility: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_get_option_visibility** **(** :ref:`String<class_String>` path, :ref:`StringName<class_StringName>` option_name, :ref:`Dictionary<class_Dictionary>` options **)** |virtual| |const| +:ref:`bool<class_bool>` **_get_option_visibility**\ (\ path\: :ref:`String<class_String>`, option_name\: :ref:`StringName<class_StringName>`, options\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_option_visibility>` This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: @@ -268,23 +284,23 @@ Returns ``true`` to make all options always visible. ---- -.. _class_EditorImportPlugin_method__get_preset_count: +.. _class_EditorImportPlugin_private_method__get_preset_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_preset_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_preset_count**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_preset_count>` -Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options<class_EditorImportPlugin_method__get_import_options>` to get the default options for the preset and :ref:`_get_preset_name<class_EditorImportPlugin_method__get_preset_name>` to get the name of the preset. +Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options<class_EditorImportPlugin_private_method__get_import_options>` to get the default options for the preset and :ref:`_get_preset_name<class_EditorImportPlugin_private_method__get_preset_name>` to get the name of the preset. .. rst-class:: classref-item-separator ---- -.. _class_EditorImportPlugin_method__get_preset_name: +.. _class_EditorImportPlugin_private_method__get_preset_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_preset_name** **(** :ref:`int<class_int>` preset_index **)** |virtual| |const| +:ref:`String<class_String>` **_get_preset_name**\ (\ preset_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_preset_name>` Gets the name of the options preset at this index. @@ -292,11 +308,11 @@ Gets the name of the options preset at this index. ---- -.. _class_EditorImportPlugin_method__get_priority: +.. _class_EditorImportPlugin_private_method__get_priority: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_priority** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_priority**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_priority>` Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is ``1.0``. @@ -304,11 +320,11 @@ Gets the priority of this plugin for the recognized extension. Higher priority p ---- -.. _class_EditorImportPlugin_method__get_recognized_extensions: +.. _class_EditorImportPlugin_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_recognized_extensions>` Gets the list of file extensions to associate with this loader (case-insensitive). e.g. ``["obj"]``. @@ -316,11 +332,11 @@ Gets the list of file extensions to associate with this loader (case-insensitive ---- -.. _class_EditorImportPlugin_method__get_resource_type: +.. _class_EditorImportPlugin_private_method__get_resource_type: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_resource_type** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_resource_type**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_resource_type>` Gets the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``"Animation"``. @@ -328,11 +344,11 @@ Gets the Godot resource type associated with this loader. e.g. ``"Mesh"`` or ``" ---- -.. _class_EditorImportPlugin_method__get_save_extension: +.. _class_EditorImportPlugin_private_method__get_save_extension: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_save_extension** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_save_extension**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_save_extension>` Gets the extension used to save this resource in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory<class_ProjectSettings_property_application/config/use_hidden_project_data_directory>`). @@ -340,11 +356,11 @@ Gets the extension used to save this resource in the ``.godot/imported`` directo ---- -.. _class_EditorImportPlugin_method__get_visible_name: +.. _class_EditorImportPlugin_private_method__get_visible_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_visible_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_visible_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__get_visible_name>` Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". @@ -352,11 +368,11 @@ Gets the name to display in the import window. You should choose this name as a ---- -.. _class_EditorImportPlugin_method__import: +.. _class_EditorImportPlugin_private_method__import: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_import** **(** :ref:`String<class_String>` source_file, :ref:`String<class_String>` save_path, :ref:`Dictionary<class_Dictionary>` options, :ref:`String[]<class_String>` platform_variants, :ref:`String[]<class_String>` gen_files **)** |virtual| |const| +:ref:`Error<enum_@GlobalScope_Error>` **_import**\ (\ source_file\: :ref:`String<class_String>`, save_path\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>`, platform_variants\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], gen_files\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) |virtual| |const| :ref:`🔗<class_EditorImportPlugin_private_method__import>` Imports ``source_file`` into ``save_path`` with the import ``options`` specified. The ``platform_variants`` and ``gen_files`` arrays will be modified by this function. @@ -370,9 +386,9 @@ This method must be overridden to do the actual importing work. See this class' .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **append_import_external_resource** **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` custom_options={}, :ref:`String<class_String>` custom_importer="", :ref:`Variant<class_Variant>` generator_parameters=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **append_import_external_resource**\ (\ path\: :ref:`String<class_String>`, custom_options\: :ref:`Dictionary<class_Dictionary>` = {}, custom_importer\: :ref:`String<class_String>` = "", generator_parameters\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_EditorImportPlugin_method_append_import_external_resource>` -This function can only be called during the :ref:`_import<class_EditorImportPlugin_method__import>` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. +This function can only be called during the :ref:`_import<class_EditorImportPlugin_private_method__import>` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -381,3 +397,4 @@ This function can only be called during the :ref:`_import<class_EditorImportPlug .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index 6e2b29417d0..66c9121f130 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -51,9 +51,11 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_selected_path<class_EditorInspector_method_get_selected_path>` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------+ + +-----------------------------+----------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_edited_object<class_EditorInspector_method_get_edited_object>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_selected_path<class_EditorInspector_method_get_selected_path>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +70,7 @@ Signals .. rst-class:: classref-signal -**edited_object_changed** **(** **)** +**edited_object_changed**\ (\ ) :ref:`🔗<class_EditorInspector_signal_edited_object_changed>` Emitted when the object being edited by the inspector has changed. @@ -80,7 +82,7 @@ Emitted when the object being edited by the inspector has changed. .. rst-class:: classref-signal -**object_id_selected** **(** :ref:`int<class_int>` id **)** +**object_id_selected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorInspector_signal_object_id_selected>` Emitted when the Edit button of an :ref:`Object<class_Object>` has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. @@ -92,7 +94,7 @@ Emitted when the Edit button of an :ref:`Object<class_Object>` has been pressed .. rst-class:: classref-signal -**property_deleted** **(** :ref:`String<class_String>` property **)** +**property_deleted**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_deleted>` Emitted when a property is removed from the inspector. @@ -104,7 +106,7 @@ Emitted when a property is removed from the inspector. .. rst-class:: classref-signal -**property_edited** **(** :ref:`String<class_String>` property **)** +**property_edited**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_edited>` Emitted when a property is edited in the inspector. @@ -116,7 +118,7 @@ Emitted when a property is edited in the inspector. .. rst-class:: classref-signal -**property_keyed** **(** :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` advance **)** +**property_keyed**\ (\ property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`, advance\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInspector_signal_property_keyed>` Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. @@ -128,7 +130,7 @@ Emitted when a property is keyed in the inspector. Properties can be keyed by cl .. rst-class:: classref-signal -**property_selected** **(** :ref:`String<class_String>` property **)** +**property_selected**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_property_selected>` Emitted when a property is selected in the inspector. @@ -140,7 +142,7 @@ Emitted when a property is selected in the inspector. .. rst-class:: classref-signal -**property_toggled** **(** :ref:`String<class_String>` property, :ref:`bool<class_bool>` checked **)** +**property_toggled**\ (\ property\: :ref:`String<class_String>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInspector_signal_property_toggled>` Emitted when a boolean property is toggled in the inspector. @@ -154,7 +156,7 @@ Emitted when a boolean property is toggled in the inspector. .. rst-class:: classref-signal -**resource_selected** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** +**resource_selected**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInspector_signal_resource_selected>` Emitted when a resource is selected in the inspector. @@ -166,7 +168,7 @@ Emitted when a resource is selected in the inspector. .. rst-class:: classref-signal -**restart_requested** **(** **)** +**restart_requested**\ (\ ) :ref:`🔗<class_EditorInspector_signal_restart_requested>` Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. @@ -179,11 +181,23 @@ Emitted when a property that requires a restart to be applied is edited in the i Method Descriptions ------------------- +.. _class_EditorInspector_method_get_edited_object: + +.. rst-class:: classref-method + +:ref:`Object<class_Object>` **get_edited_object**\ (\ ) :ref:`🔗<class_EditorInspector_method_get_edited_object>` + +Returns the object currently selected in this inspector. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInspector_method_get_selected_path: .. rst-class:: classref-method -:ref:`String<class_String>` **get_selected_path** **(** **)** |const| +:ref:`String<class_String>` **get_selected_path**\ (\ ) |const| :ref:`🔗<class_EditorInspector_method_get_selected_path>` Gets the path of the currently selected property. @@ -194,3 +208,4 @@ Gets the path of the currently selected property. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 76c6baba090..60aac61d85e 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -21,13 +21,13 @@ Description **EditorInspectorPlugin** allows adding custom property editors to :ref:`EditorInspector<class_EditorInspector>`. -When an object is edited, the :ref:`_can_handle<class_EditorInspectorPlugin_method__can_handle>` function is called and must return ``true`` if the object type is supported. +When an object is edited, the :ref:`_can_handle<class_EditorInspectorPlugin_private_method__can_handle>` function is called and must return ``true`` if the object type is supported. -If supported, the function :ref:`_parse_begin<class_EditorInspectorPlugin_method__parse_begin>` will be called, allowing to place custom controls at the beginning of the class. +If supported, the function :ref:`_parse_begin<class_EditorInspectorPlugin_private_method__parse_begin>` will be called, allowing to place custom controls at the beginning of the class. -Subsequently, the :ref:`_parse_category<class_EditorInspectorPlugin_method__parse_category>` and :ref:`_parse_property<class_EditorInspectorPlugin_method__parse_property>` are called for every category and property. They offer the ability to add custom controls to the inspector too. +Subsequently, the :ref:`_parse_category<class_EditorInspectorPlugin_private_method__parse_category>` and :ref:`_parse_property<class_EditorInspectorPlugin_private_method__parse_property>` are called for every category and property. They offer the ability to add custom controls to the inspector too. -Finally, :ref:`_parse_end<class_EditorInspectorPlugin_method__parse_end>` will be called. +Finally, :ref:`_parse_end<class_EditorInspectorPlugin_private_method__parse_end>` will be called. On each of these calls, the "add" functions can be called. @@ -48,25 +48,25 @@ Methods .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_handle<class_EditorInspectorPlugin_method__can_handle>` **(** :ref:`Object<class_Object>` object **)** |virtual| |const| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_begin<class_EditorInspectorPlugin_method__parse_begin>` **(** :ref:`Object<class_Object>` object **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_category<class_EditorInspectorPlugin_method__parse_category>` **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` category **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_end<class_EditorInspectorPlugin_method__parse_end>` **(** :ref:`Object<class_Object>` object **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_group<class_EditorInspectorPlugin_method__parse_group>` **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` group **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_parse_property<class_EditorInspectorPlugin_method__parse_property>` **(** :ref:`Object<class_Object>` object, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` name, :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` hint_type, :ref:`String<class_String>` hint_string, |bitfield|\<:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>`\> usage_flags, :ref:`bool<class_bool>` wide **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_custom_control<class_EditorInspectorPlugin_method_add_custom_control>` **(** :ref:`Control<class_Control>` control **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_editor<class_EditorInspectorPlugin_method_add_property_editor>` **(** :ref:`String<class_String>` property, :ref:`Control<class_Control>` editor, :ref:`bool<class_bool>` add_to_end=false **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_editor_for_multiple_properties<class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties>` **(** :ref:`String<class_String>` label, :ref:`PackedStringArray<class_PackedStringArray>` properties, :ref:`Control<class_Control>` editor **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_handle<class_EditorInspectorPlugin_private_method__can_handle>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_parse_begin<class_EditorInspectorPlugin_private_method__parse_begin>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_parse_category<class_EditorInspectorPlugin_private_method__parse_category>`\ (\ object\: :ref:`Object<class_Object>`, category\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_parse_end<class_EditorInspectorPlugin_private_method__parse_end>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_parse_group<class_EditorInspectorPlugin_private_method__parse_group>`\ (\ object\: :ref:`Object<class_Object>`, group\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_parse_property<class_EditorInspectorPlugin_private_method__parse_property>`\ (\ object\: :ref:`Object<class_Object>`, type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, name\: :ref:`String<class_String>`, hint_type\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>`, hint_string\: :ref:`String<class_String>`, usage_flags\: |bitfield|\[:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>`\], wide\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_custom_control<class_EditorInspectorPlugin_method_add_custom_control>`\ (\ control\: :ref:`Control<class_Control>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property_editor<class_EditorInspectorPlugin_method_add_property_editor>`\ (\ property\: :ref:`String<class_String>`, editor\: :ref:`Control<class_Control>`, add_to_end\: :ref:`bool<class_bool>` = false, label\: :ref:`String<class_String>` = ""\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property_editor_for_multiple_properties<class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties>`\ (\ label\: :ref:`String<class_String>`, properties\: :ref:`PackedStringArray<class_PackedStringArray>`, editor\: :ref:`Control<class_Control>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,11 +77,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorInspectorPlugin_method__can_handle: +.. _class_EditorInspectorPlugin_private_method__can_handle: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_handle** **(** :ref:`Object<class_Object>` object **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_handle**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_EditorInspectorPlugin_private_method__can_handle>` Returns ``true`` if this object can be handled by this plugin. @@ -89,11 +89,11 @@ Returns ``true`` if this object can be handled by this plugin. ---- -.. _class_EditorInspectorPlugin_method__parse_begin: +.. _class_EditorInspectorPlugin_private_method__parse_begin: .. rst-class:: classref-method -void **_parse_begin** **(** :ref:`Object<class_Object>` object **)** |virtual| +|void| **_parse_begin**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorInspectorPlugin_private_method__parse_begin>` Called to allow adding controls at the beginning of the property list for ``object``. @@ -101,11 +101,11 @@ Called to allow adding controls at the beginning of the property list for ``obje ---- -.. _class_EditorInspectorPlugin_method__parse_category: +.. _class_EditorInspectorPlugin_private_method__parse_category: .. rst-class:: classref-method -void **_parse_category** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` category **)** |virtual| +|void| **_parse_category**\ (\ object\: :ref:`Object<class_Object>`, category\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorInspectorPlugin_private_method__parse_category>` Called to allow adding controls at the beginning of a category in the property list for ``object``. @@ -113,11 +113,11 @@ Called to allow adding controls at the beginning of a category in the property l ---- -.. _class_EditorInspectorPlugin_method__parse_end: +.. _class_EditorInspectorPlugin_private_method__parse_end: .. rst-class:: classref-method -void **_parse_end** **(** :ref:`Object<class_Object>` object **)** |virtual| +|void| **_parse_end**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorInspectorPlugin_private_method__parse_end>` Called to allow adding controls at the end of the property list for ``object``. @@ -125,11 +125,11 @@ Called to allow adding controls at the end of the property list for ``object``. ---- -.. _class_EditorInspectorPlugin_method__parse_group: +.. _class_EditorInspectorPlugin_private_method__parse_group: .. rst-class:: classref-method -void **_parse_group** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` group **)** |virtual| +|void| **_parse_group**\ (\ object\: :ref:`Object<class_Object>`, group\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorInspectorPlugin_private_method__parse_group>` Called to allow adding controls at the beginning of a group or a sub-group in the property list for ``object``. @@ -137,11 +137,11 @@ Called to allow adding controls at the beginning of a group or a sub-group in th ---- -.. _class_EditorInspectorPlugin_method__parse_property: +.. _class_EditorInspectorPlugin_private_method__parse_property: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_parse_property** **(** :ref:`Object<class_Object>` object, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` name, :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` hint_type, :ref:`String<class_String>` hint_string, |bitfield|\<:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>`\> usage_flags, :ref:`bool<class_bool>` wide **)** |virtual| +:ref:`bool<class_bool>` **_parse_property**\ (\ object\: :ref:`Object<class_Object>`, type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, name\: :ref:`String<class_String>`, hint_type\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>`, hint_string\: :ref:`String<class_String>`, usage_flags\: |bitfield|\[:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>`\], wide\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorInspectorPlugin_private_method__parse_property>` Called to allow adding property-specific editors to the property list for ``object``. The added editor control must extend :ref:`EditorProperty<class_EditorProperty>`. Returning ``true`` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. @@ -153,7 +153,7 @@ Called to allow adding property-specific editors to the property list for ``obje .. rst-class:: classref-method -void **add_custom_control** **(** :ref:`Control<class_Control>` control **)** +|void| **add_custom_control**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorInspectorPlugin_method_add_custom_control>` Adds a custom control, which is not necessarily a property editor. @@ -165,10 +165,14 @@ Adds a custom control, which is not necessarily a property editor. .. rst-class:: classref-method -void **add_property_editor** **(** :ref:`String<class_String>` property, :ref:`Control<class_Control>` editor, :ref:`bool<class_bool>` add_to_end=false **)** +|void| **add_property_editor**\ (\ property\: :ref:`String<class_String>`, editor\: :ref:`Control<class_Control>`, add_to_end\: :ref:`bool<class_bool>` = false, label\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_EditorInspectorPlugin_method_add_property_editor>` Adds a property editor for an individual property. The ``editor`` control must extend :ref:`EditorProperty<class_EditorProperty>`. +There can be multiple property editors for a property. If ``add_to_end`` is ``true``, this newly added editor will be displayed after all the other editors of the property whose ``add_to_end`` is ``false``. For example, the editor uses this parameter to add an "Edit Region" button for :ref:`Sprite2D.region_rect<class_Sprite2D_property_region_rect>` below the regular :ref:`Rect2<class_Rect2>` editor. + +\ ``label`` can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead. + .. rst-class:: classref-item-separator ---- @@ -177,7 +181,7 @@ Adds a property editor for an individual property. The ``editor`` control must e .. rst-class:: classref-method -void **add_property_editor_for_multiple_properties** **(** :ref:`String<class_String>` label, :ref:`PackedStringArray<class_PackedStringArray>` properties, :ref:`Control<class_Control>` editor **)** +|void| **add_property_editor_for_multiple_properties**\ (\ label\: :ref:`String<class_String>`, properties\: :ref:`PackedStringArray<class_PackedStringArray>`, editor\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorInspectorPlugin_method_add_property_editor_for_multiple_properties>` Adds an editor that allows modifying multiple properties. The ``editor`` control must extend :ref:`EditorProperty<class_EditorProperty>`. @@ -188,3 +192,4 @@ Adds an editor that allows modifying multiple properties. The ``editor`` control .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 05f420b85b5..9b9d5d2618c 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -21,7 +21,21 @@ Description **EditorInterface** gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings<class_EditorSettings>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`ScriptEditor<class_ScriptEditor>`, the editor viewport, and information about scenes. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface<class_EditorPlugin_method_get_editor_interface>`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton directly by its name. + + +.. tabs:: + + .. code-tab:: gdscript + + var editor_settings = EditorInterface.get_editor_settings() + + .. code-tab:: csharp + + // In C# you can access it via the static Singleton property. + EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); + + .. rst-class:: classref-reftable-group @@ -45,91 +59,109 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_node<class_EditorInterface_method_edit_node>` **(** :ref:`Node<class_Node>` node **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_resource<class_EditorInterface_method_edit_resource>` **(** :ref:`Resource<class_Resource>` resource **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_script<class_EditorInterface_method_edit_script>` **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=0, :ref:`bool<class_bool>` grab_focus=true **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`inspect_object<class_EditorInterface_method_inspect_object>` **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` for_property="", :ref:`bool<class_bool>` inspector_only=false **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>` **(** **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>` **(** :ref:`String<class_String>` plugin **)** |const| | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D[]<class_Texture2D>` | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>` **(** :ref:`Mesh[]<class_Mesh>` meshes, :ref:`int<class_int>` preview_size **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mark_scene_as_unsaved<class_EditorInterface_method_mark_scene_as_unsaved>` **(** **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>` **(** :ref:`String<class_String>` scene_filepath **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>` **(** **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>` **(** :ref:`String<class_String>` scene_filepath **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>` **(** **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_dialog<class_EditorInterface_method_popup_dialog>` **(** :ref:`Window<class_Window>` dialog, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_dialog_centered<class_EditorInterface_method_popup_dialog_centered>` **(** :ref:`Window<class_Window>` dialog, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_dialog_centered_clamped<class_EditorInterface_method_popup_dialog_centered_clamped>` **(** :ref:`Window<class_Window>` dialog, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_dialog_centered_ratio<class_EditorInterface_method_popup_dialog_centered_ratio>` **(** :ref:`Window<class_Window>` dialog, :ref:`float<class_float>` ratio=0.8 **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>` **(** :ref:`String<class_String>` scene_filepath **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart_editor<class_EditorInterface_method_restart_editor>` **(** :ref:`bool<class_bool>` save=true **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>` **(** **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` with_preview=true **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_file<class_EditorInterface_method_select_file>` **(** :ref:`String<class_String>` file **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>` **(** :ref:`String<class_String>` name **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>` **(** :ref:`String<class_String>` plugin, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>` **(** **)** | - +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_node<class_EditorInterface_method_edit_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_resource<class_EditorInterface_method_edit_resource>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_script<class_EditorInterface_method_edit_script>`\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_current_feature_profile<class_EditorInterface_method_get_current_feature_profile>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Theme<class_Theme>` | :ref:`get_editor_theme<class_EditorInterface_method_get_editor_theme>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_2d<class_EditorInterface_method_get_editor_viewport_2d>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_3d<class_EditorInterface_method_get_editor_viewport_3d>`\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`inspect_object<class_EditorInterface_method_inspect_object>`\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>`\ (\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`\ ) |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>`\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mark_scene_as_unsaved<class_EditorInterface_method_mark_scene_as_unsaved>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog<class_EditorInterface_method_popup_dialog>`\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered<class_EditorInterface_method_popup_dialog_centered>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_clamped<class_EditorInterface_method_popup_dialog_centered_clamped>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_ratio<class_EditorInterface_method_popup_dialog_centered_ratio>`\ (\ dialog\: :ref:`Window<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_node_selector<class_EditorInterface_method_popup_node_selector>`\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_property_selector<class_EditorInterface_method_popup_property_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array()\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart_editor<class_EditorInterface_method_restart_editor>`\ (\ save\: :ref:`bool<class_bool>` = true\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_all_scenes<class_EditorInterface_method_save_all_scenes>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>`\ (\ path\: :ref:`String<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_file<class_EditorInterface_method_select_file>`\ (\ file\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_current_feature_profile<class_EditorInterface_method_set_current_feature_profile>`\ (\ profile_name\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>`\ (\ name\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>`\ (\ ) | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -144,12 +176,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **distraction_free_mode** +:ref:`bool<class_bool>` **distraction_free_mode** :ref:`🔗<class_EditorInterface_property_distraction_free_mode>` .. rst-class:: classref-property-setget -- void **set_distraction_free_mode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_distraction_free_mode_enabled** **(** **)** +- |void| **set_distraction_free_mode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_distraction_free_mode_enabled**\ (\ ) If ``true``, enables distraction-free mode which hides side docks to increase the space available for the main view. @@ -161,12 +193,12 @@ If ``true``, enables distraction-free mode which hides side docks to increase th .. rst-class:: classref-property -:ref:`bool<class_bool>` **movie_maker_enabled** +:ref:`bool<class_bool>` **movie_maker_enabled** :ref:`🔗<class_EditorInterface_property_movie_maker_enabled>` .. rst-class:: classref-property-setget -- void **set_movie_maker_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_movie_maker_enabled** **(** **)** +- |void| **set_movie_maker_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_movie_maker_enabled**\ (\ ) If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWriter<class_MovieWriter>` for more information. @@ -183,7 +215,7 @@ Method Descriptions .. rst-class:: classref-method -void **edit_node** **(** :ref:`Node<class_Node>` node **)** +|void| **edit_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorInterface_method_edit_node>` Edits the given :ref:`Node<class_Node>`. The node will be also selected if it's inside the scene tree. @@ -195,7 +227,7 @@ Edits the given :ref:`Node<class_Node>`. The node will be also selected if it's .. rst-class:: classref-method -void **edit_resource** **(** :ref:`Resource<class_Resource>` resource **)** +|void| **edit_resource**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorInterface_method_edit_resource>` Edits the given :ref:`Resource<class_Resource>`. If the resource is a :ref:`Script<class_Script>` you can also edit it with :ref:`edit_script<class_EditorInterface_method_edit_script>` to specify the line and column position. @@ -207,7 +239,7 @@ Edits the given :ref:`Resource<class_Resource>`. If the resource is a :ref:`Scri .. rst-class:: classref-method -void **edit_script** **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=0, :ref:`bool<class_bool>` grab_focus=true **)** +|void| **edit_script**\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_edit_script>` Edits the given :ref:`Script<class_Script>`. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor. @@ -219,7 +251,7 @@ Edits the given :ref:`Script<class_Script>`. The line and column on which to ope .. rst-class:: classref-method -:ref:`Control<class_Control>` **get_base_control** **(** **)** |const| +:ref:`Control<class_Control>` **get_base_control**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_base_control>` Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. @@ -233,7 +265,7 @@ Returns the main container of Godot editor's window. For example, you can use it .. rst-class:: classref-method -:ref:`EditorCommandPalette<class_EditorCommandPalette>` **get_command_palette** **(** **)** |const| +:ref:`EditorCommandPalette<class_EditorCommandPalette>` **get_command_palette**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_command_palette>` Returns the editor's :ref:`EditorCommandPalette<class_EditorCommandPalette>` instance. @@ -247,7 +279,7 @@ Returns the editor's :ref:`EditorCommandPalette<class_EditorCommandPalette>` ins .. rst-class:: classref-method -:ref:`String<class_String>` **get_current_directory** **(** **)** |const| +:ref:`String<class_String>` **get_current_directory**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_directory>` Returns the current directory being viewed in the :ref:`FileSystemDock<class_FileSystemDock>`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir<class_String_method_get_base_dir>` instead. @@ -255,11 +287,27 @@ Returns the current directory being viewed in the :ref:`FileSystemDock<class_Fil ---- +.. _class_EditorInterface_method_get_current_feature_profile: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_current_feature_profile**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_feature_profile>` + +Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. + +In order to get a reference to the :ref:`EditorFeatureProfile<class_EditorFeatureProfile>`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file<class_EditorFeatureProfile_method_load_from_file>`. + +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir<class_EditorPaths_method_get_config_dir>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_get_current_path: .. rst-class:: classref-method -:ref:`String<class_String>` **get_current_path** **(** **)** |const| +:ref:`String<class_String>` **get_current_path**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_path>` Returns the current path being viewed in the :ref:`FileSystemDock<class_FileSystemDock>`. @@ -271,7 +319,7 @@ Returns the current path being viewed in the :ref:`FileSystemDock<class_FileSyst .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_edited_scene_root** **(** **)** |const| +:ref:`Node<class_Node>` **get_edited_scene_root**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_edited_scene_root>` Returns the edited (current) scene's root :ref:`Node<class_Node>`. @@ -283,9 +331,11 @@ Returns the edited (current) scene's root :ref:`Node<class_Node>`. .. rst-class:: classref-method -:ref:`VBoxContainer<class_VBoxContainer>` **get_editor_main_screen** **(** **)** |const| +:ref:`VBoxContainer<class_VBoxContainer>` **get_editor_main_screen**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_main_screen>` + +Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen<class_EditorPlugin_private_method__has_main_screen>`. -Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen<class_EditorPlugin_method__has_main_screen>`. +\ **Note:** This node is a :ref:`VBoxContainer<class_VBoxContainer>`, which means that if you add a :ref:`Control<class_Control>` child to it, you need to set the child's :ref:`Control.size_flags_vertical<class_Control_property_size_flags_vertical>` to :ref:`Control.SIZE_EXPAND_FILL<class_Control_constant_SIZE_EXPAND_FILL>` to make it use the full available space. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. @@ -297,7 +347,7 @@ Returns the editor control responsible for main screen plugins and tools. Use it .. rst-class:: classref-method -:ref:`EditorPaths<class_EditorPaths>` **get_editor_paths** **(** **)** |const| +:ref:`EditorPaths<class_EditorPaths>` **get_editor_paths**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_paths>` Returns the :ref:`EditorPaths<class_EditorPaths>` singleton. @@ -309,7 +359,7 @@ Returns the :ref:`EditorPaths<class_EditorPaths>` singleton. .. rst-class:: classref-method -:ref:`float<class_float>` **get_editor_scale** **(** **)** |const| +:ref:`float<class_float>` **get_editor_scale**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_scale>` Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. @@ -323,7 +373,7 @@ Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can b .. rst-class:: classref-method -:ref:`EditorSettings<class_EditorSettings>` **get_editor_settings** **(** **)** |const| +:ref:`EditorSettings<class_EditorSettings>` **get_editor_settings**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_settings>` Returns the editor's :ref:`EditorSettings<class_EditorSettings>` instance. @@ -331,11 +381,49 @@ Returns the editor's :ref:`EditorSettings<class_EditorSettings>` instance. ---- +.. _class_EditorInterface_method_get_editor_theme: + +.. rst-class:: classref-method + +:ref:`Theme<class_Theme>` **get_editor_theme**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_theme>` + +Returns the editor's :ref:`Theme<class_Theme>`. + +\ **Note:** When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the ``get_theme_*`` methods. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_editor_viewport_2d: + +.. rst-class:: classref-method + +:ref:`SubViewport<class_SubViewport>` **get_editor_viewport_2d**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_viewport_2d>` + +Returns the 2D editor :ref:`SubViewport<class_SubViewport>`. It does not have a camera. Instead, the view transforms are done directly and can be accessed with :ref:`Viewport.global_canvas_transform<class_Viewport_property_global_canvas_transform>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_editor_viewport_3d: + +.. rst-class:: classref-method + +:ref:`SubViewport<class_SubViewport>` **get_editor_viewport_3d**\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_viewport_3d>` + +Returns the specified 3D editor :ref:`SubViewport<class_SubViewport>`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d<class_Viewport_method_get_camera_3d>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_get_file_system_dock: .. rst-class:: classref-method -:ref:`FileSystemDock<class_FileSystemDock>` **get_file_system_dock** **(** **)** |const| +:ref:`FileSystemDock<class_FileSystemDock>` **get_file_system_dock**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_file_system_dock>` Returns the editor's :ref:`FileSystemDock<class_FileSystemDock>` instance. @@ -349,7 +437,7 @@ Returns the editor's :ref:`FileSystemDock<class_FileSystemDock>` instance. .. rst-class:: classref-method -:ref:`EditorInspector<class_EditorInspector>` **get_inspector** **(** **)** |const| +:ref:`EditorInspector<class_EditorInspector>` **get_inspector**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_inspector>` Returns the editor's :ref:`EditorInspector<class_EditorInspector>` instance. @@ -363,7 +451,7 @@ Returns the editor's :ref:`EditorInspector<class_EditorInspector>` instance. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_open_scenes** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_open_scenes**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_open_scenes>` Returns an :ref:`Array<class_Array>` with the file paths of the currently opened scenes. @@ -375,7 +463,7 @@ Returns an :ref:`Array<class_Array>` with the file paths of the currently opened .. rst-class:: classref-method -:ref:`String<class_String>` **get_playing_scene** **(** **)** |const| +:ref:`String<class_String>` **get_playing_scene**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_playing_scene>` Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. @@ -387,7 +475,7 @@ Returns the name of the scene that is being played. If no scene is currently bei .. rst-class:: classref-method -:ref:`EditorFileSystem<class_EditorFileSystem>` **get_resource_filesystem** **(** **)** |const| +:ref:`EditorFileSystem<class_EditorFileSystem>` **get_resource_filesystem**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_resource_filesystem>` Returns the editor's :ref:`EditorFileSystem<class_EditorFileSystem>` instance. @@ -399,7 +487,7 @@ Returns the editor's :ref:`EditorFileSystem<class_EditorFileSystem>` instance. .. rst-class:: classref-method -:ref:`EditorResourcePreview<class_EditorResourcePreview>` **get_resource_previewer** **(** **)** |const| +:ref:`EditorResourcePreview<class_EditorResourcePreview>` **get_resource_previewer**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_resource_previewer>` Returns the editor's :ref:`EditorResourcePreview<class_EditorResourcePreview>` instance. @@ -411,7 +499,7 @@ Returns the editor's :ref:`EditorResourcePreview<class_EditorResourcePreview>` i .. rst-class:: classref-method -:ref:`ScriptEditor<class_ScriptEditor>` **get_script_editor** **(** **)** |const| +:ref:`ScriptEditor<class_ScriptEditor>` **get_script_editor**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_script_editor>` Returns the editor's :ref:`ScriptEditor<class_ScriptEditor>` instance. @@ -425,7 +513,7 @@ Returns the editor's :ref:`ScriptEditor<class_ScriptEditor>` instance. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_selected_paths** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_selected_paths**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_selected_paths>` Returns an array containing the paths of the currently selected files (and directories) in the :ref:`FileSystemDock<class_FileSystemDock>`. @@ -437,7 +525,7 @@ Returns an array containing the paths of the currently selected files (and direc .. rst-class:: classref-method -:ref:`EditorSelection<class_EditorSelection>` **get_selection** **(** **)** |const| +:ref:`EditorSelection<class_EditorSelection>` **get_selection**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_selection>` Returns the editor's :ref:`EditorSelection<class_EditorSelection>` instance. @@ -449,7 +537,7 @@ Returns the editor's :ref:`EditorSelection<class_EditorSelection>` instance. .. rst-class:: classref-method -void **inspect_object** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` for_property="", :ref:`bool<class_bool>` inspector_only=false **)** +|void| **inspect_object**\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorInterface_method_inspect_object>` Shows the given property on the given ``object`` in the editor's Inspector dock. If ``inspector_only`` is ``true``, plugins will not attempt to edit ``object``. @@ -457,11 +545,29 @@ Shows the given property on the given ``object`` in the editor's Inspector dock. ---- +.. _class_EditorInterface_method_is_multi_window_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_multi_window_enabled**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_is_multi_window_enabled>` + +Returns ``true`` if multiple window support is enabled in the editor. Multiple window support is enabled if *all* of these statements are true: + +- :ref:`EditorSettings.interface/multi_window/enable<class_EditorSettings_property_interface/multi_window/enable>` is ``true``. + +- :ref:`EditorSettings.interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` is ``false``. + +- :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` is ``false``. This is forced to ``true`` on platforms that don't support multiple windows such as Web, or when the ``--single-window`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` is used. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_is_playing_scene: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_playing_scene** **(** **)** |const| +:ref:`bool<class_bool>` **is_playing_scene**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_is_playing_scene>` Returns ``true`` if a scene is currently being played, ``false`` otherwise. Paused scenes are considered as being played. @@ -473,7 +579,7 @@ Returns ``true`` if a scene is currently being played, ``false`` otherwise. Paus .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_plugin_enabled** **(** :ref:`String<class_String>` plugin **)** |const| +:ref:`bool<class_bool>` **is_plugin_enabled**\ (\ plugin\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorInterface_method_is_plugin_enabled>` Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the same as its directory name. @@ -485,7 +591,7 @@ Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the .. rst-class:: classref-method -:ref:`Texture2D[]<class_Texture2D>` **make_mesh_previews** **(** :ref:`Mesh[]<class_Mesh>` meshes, :ref:`int<class_int>` preview_size **)** +:ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] **make_mesh_previews**\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorInterface_method_make_mesh_previews>` Returns mesh previews rendered at the given size as an :ref:`Array<class_Array>` of :ref:`Texture2D<class_Texture2D>`\ s. @@ -497,7 +603,7 @@ Returns mesh previews rendered at the given size as an :ref:`Array<class_Array>` .. rst-class:: classref-method -void **mark_scene_as_unsaved** **(** **)** +|void| **mark_scene_as_unsaved**\ (\ ) :ref:`🔗<class_EditorInterface_method_mark_scene_as_unsaved>` Marks the current scene tab as unsaved. @@ -509,7 +615,7 @@ Marks the current scene tab as unsaved. .. rst-class:: classref-method -void **open_scene_from_path** **(** :ref:`String<class_String>` scene_filepath **)** +|void| **open_scene_from_path**\ (\ scene_filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_open_scene_from_path>` Opens the scene at the given path. @@ -521,7 +627,7 @@ Opens the scene at the given path. .. rst-class:: classref-method -void **play_current_scene** **(** **)** +|void| **play_current_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_play_current_scene>` Plays the currently active scene. @@ -533,7 +639,7 @@ Plays the currently active scene. .. rst-class:: classref-method -void **play_custom_scene** **(** :ref:`String<class_String>` scene_filepath **)** +|void| **play_custom_scene**\ (\ scene_filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_play_custom_scene>` Plays the scene specified by its filepath. @@ -545,7 +651,7 @@ Plays the scene specified by its filepath. .. rst-class:: classref-method -void **play_main_scene** **(** **)** +|void| **play_main_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_play_main_scene>` Plays the main scene. @@ -557,7 +663,7 @@ Plays the main scene. .. rst-class:: classref-method -void **popup_dialog** **(** :ref:`Window<class_Window>` dialog, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** +|void| **popup_dialog**\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog>` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive<class_Window_method_popup_exclusive>`. The dialog must have no current parent, otherwise the method fails. @@ -571,7 +677,7 @@ See also :ref:`Window.set_unparent_when_invisible<class_Window_method_set_unpare .. rst-class:: classref-method -void **popup_dialog_centered** **(** :ref:`Window<class_Window>` dialog, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** +|void| **popup_dialog_centered**\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered>` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered<class_Window_method_popup_exclusive_centered>`. The dialog must have no current parent, otherwise the method fails. @@ -585,7 +691,7 @@ See also :ref:`Window.set_unparent_when_invisible<class_Window_method_set_unpare .. rst-class:: classref-method -void **popup_dialog_centered_clamped** **(** :ref:`Window<class_Window>` dialog, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** +|void| **popup_dialog_centered_clamped**\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered_clamped>` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>`. The dialog must have no current parent, otherwise the method fails. @@ -599,7 +705,7 @@ See also :ref:`Window.set_unparent_when_invisible<class_Window_method_set_unpare .. rst-class:: classref-method -void **popup_dialog_centered_ratio** **(** :ref:`Window<class_Window>` dialog, :ref:`float<class_float>` ratio=0.8 **)** +|void| **popup_dialog_centered_ratio**\ (\ dialog\: :ref:`Window<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered_ratio>` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>`. The dialog must have no current parent, otherwise the method fails. @@ -609,11 +715,63 @@ See also :ref:`Window.set_unparent_when_invisible<class_Window_method_set_unpare ---- +.. _class_EditorInterface_method_popup_node_selector: + +.. rst-class:: classref-method + +|void| **popup_node_selector**\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_EditorInterface_method_popup_node_selector>` + +Pops up an editor dialog for selecting a :ref:`Node<class_Node>` from the edited scene. The ``callback`` must take a single argument of type :ref:`NodePath<class_NodePath>`. It is called on the selected :ref:`NodePath<class_NodePath>` or the empty path ``^""`` if the dialog is canceled. If ``valid_types`` is provided, the dialog will only show Nodes that match one of the listed Node types. + +\ **Example:**\ + +:: + + func _ready(): + if Engine.is_editor_hint(): + EditorInterface.popup_node_selector(_on_node_selected, ["Button"]) + + func _on_node_selected(node_path): + if node_path.is_empty(): + print("node selection canceled") + else: + print("selected ", node_path) + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_property_selector: + +.. rst-class:: classref-method + +|void| **popup_property_selector**\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array()\ ) :ref:`🔗<class_EditorInterface_method_popup_property_selector>` + +Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath<class_NodePath>`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path<class_NodePath_method_get_as_property_path>`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` values. + +\ **Example:**\ + +:: + + func _ready(): + if Engine.is_editor_hint(): + EditorInterface.popup_property_selector(this, _on_property_selected, [TYPE_INT]) + + func _on_property_selected(property_path): + if property_path.is_empty(): + print("property selection canceled") + else: + print("selected ", property_path) + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_reload_scene_from_path: .. rst-class:: classref-method -void **reload_scene_from_path** **(** :ref:`String<class_String>` scene_filepath **)** +|void| **reload_scene_from_path**\ (\ scene_filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_reload_scene_from_path>` Reloads the scene at the given path. @@ -625,7 +783,7 @@ Reloads the scene at the given path. .. rst-class:: classref-method -void **restart_editor** **(** :ref:`bool<class_bool>` save=true **)** +|void| **restart_editor**\ (\ save\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_restart_editor>` Restarts the editor. This closes the editor and then opens the same project. If ``save`` is ``true``, the project will be saved before restarting. @@ -633,13 +791,25 @@ Restarts the editor. This closes the editor and then opens the same project. If ---- +.. _class_EditorInterface_method_save_all_scenes: + +.. rst-class:: classref-method + +|void| **save_all_scenes**\ (\ ) :ref:`🔗<class_EditorInterface_method_save_all_scenes>` + +Saves all opened scenes in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_save_scene: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_scene** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **save_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_save_scene>` -Saves the scene. Returns either :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>`. +Saves the currently active scene. Returns either :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>`. .. rst-class:: classref-item-separator @@ -649,9 +819,9 @@ Saves the scene. Returns either :ref:`@GlobalScope.OK<class_@GlobalScope_constan .. rst-class:: classref-method -void **save_scene_as** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` with_preview=true **)** +|void| **save_scene_as**\ (\ path\: :ref:`String<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_save_scene_as>` -Saves the scene as a file at ``path``. +Saves the currently active scene as a file at ``path``. .. rst-class:: classref-item-separator @@ -661,7 +831,7 @@ Saves the scene as a file at ``path``. .. rst-class:: classref-method -void **select_file** **(** :ref:`String<class_String>` file **)** +|void| **select_file**\ (\ file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_select_file>` Selects the file, with the path provided by ``file``, in the FileSystem dock. @@ -669,13 +839,29 @@ Selects the file, with the path provided by ``file``, in the FileSystem dock. ---- +.. _class_EditorInterface_method_set_current_feature_profile: + +.. rst-class:: classref-method + +|void| **set_current_feature_profile**\ (\ profile_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_set_current_feature_profile>` + +Selects and activates the specified feature profile with the given ``profile_name``. Set ``profile_name`` to an empty string to reset to the default feature profile. + +A feature profile can be created programmatically using the :ref:`EditorFeatureProfile<class_EditorFeatureProfile>` class. + +\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir<class_EditorPaths_method_get_config_dir>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_set_main_screen_editor: .. rst-class:: classref-method -void **set_main_screen_editor** **(** :ref:`String<class_String>` name **)** +|void| **set_main_screen_editor**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_set_main_screen_editor>` -Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the text of the tab in question exactly (``2D``, ``3D``, ``Script``, ``AssetLib``). +Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the title of the tab in question exactly (e.g. ``2D``, ``3D``, ``Script``, or ``AssetLib`` for default tabs). .. rst-class:: classref-item-separator @@ -685,7 +871,7 @@ Sets the editor's current main screen to the one specified in ``name``. ``name`` .. rst-class:: classref-method -void **set_plugin_enabled** **(** :ref:`String<class_String>` plugin, :ref:`bool<class_bool>` enabled **)** +|void| **set_plugin_enabled**\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInterface_method_set_plugin_enabled>` Sets the enabled status of a plugin. The plugin name is the same as its directory name. @@ -697,7 +883,7 @@ Sets the enabled status of a plugin. The plugin name is the same as its director .. rst-class:: classref-method -void **stop_playing_scene** **(** **)** +|void| **stop_playing_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_stop_playing_scene>` Stops the scene that is currently playing. @@ -708,3 +894,4 @@ Stops the scene that is currently playing. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index f8af51d8e78..ef8a09dc424 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -12,14 +12,14 @@ EditorNode3DGizmo **Inherits:** :ref:`Node3DGizmo<class_Node3DGizmo>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Gizmo for editing Node3D objects. +Gizmo for editing :ref:`Node3D<class_Node3D>` objects. .. rst-class:: classref-introduction-group Description ----------- -Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for Node3D objects. Can be overridden to create custom gizmos, but for simple gizmos creating a :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` is usually recommended. +Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for :ref:`Node3D<class_Node3D>` objects. Can be overridden to create custom gizmos, but for simple gizmos creating a :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` is usually recommended. .. rst-class:: classref-reftable-group @@ -29,55 +29,57 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_handle<class_EditorNode3DGizmo_method__commit_handle>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_subgizmos<class_EditorNode3DGizmo_method__commit_subgizmos>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmo_method__get_handle_name>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmo_method__get_handle_value>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_method__get_subgizmo_transform>` **(** :ref:`int<class_int>` id **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmo_method__is_handle_highlighted>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>` **(** **)** |virtual| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_handle<class_EditorNode3DGizmo_method__set_handle>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmo_method__set_subgizmo_transform>` **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_method__subgizmos_intersect_frustum>` **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_method__subgizmos_intersect_ray>` **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_segments<class_EditorNode3DGizmo_method_add_collision_segments>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` segments **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_triangles<class_EditorNode3DGizmo_method_add_collision_triangles>` **(** :ref:`TriangleMesh<class_TriangleMesh>` triangles **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` handles, :ref:`Material<class_Material>` material, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` secondary=false **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_lines<class_EditorNode3DGizmo_method_add_lines>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` lines, :ref:`Material<class_Material>` material, :ref:`bool<class_bool>` billboard=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_mesh<class_EditorNode3DGizmo_method_add_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Material<class_Material>` material=null, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference<class_SkinReference>` skeleton=null **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_unscaled_billboard<class_EditorNode3DGizmo_method_add_unscaled_billboard>` **(** :ref:`Material<class_Material>` material, :ref:`float<class_float>` default_scale=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_EditorNode3DGizmo_method_clear>` **(** **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D<class_Node3D>` | :ref:`get_node_3d<class_EditorNode3DGizmo_method_get_node_3d>` **(** **)** |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` | :ref:`get_plugin<class_EditorNode3DGizmo_method_get_plugin>` **(** **)** |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_subgizmo_selection<class_EditorNode3DGizmo_method_get_subgizmo_selection>` **(** **)** |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_subgizmo_selected<class_EditorNode3DGizmo_method_is_subgizmo_selected>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_hidden<class_EditorNode3DGizmo_method_set_hidden>` **(** :ref:`bool<class_bool>` hidden **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_node_3d<class_EditorNode3DGizmo_method_set_node_3d>` **(** :ref:`Node<class_Node>` node **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_begin_handle_action<class_EditorNode3DGizmo_private_method__begin_handle_action>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_commit_handle<class_EditorNode3DGizmo_private_method__commit_handle>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, restore\: :ref:`Variant<class_Variant>`, cancel\: :ref:`bool<class_bool>`\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`\ (\ ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, restores\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\], cancel\: :ref:`bool<class_bool>`\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmo_private_method__get_handle_name>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmo_private_method__get_handle_value>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>`\ (\ id\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmo_private_method__is_handle_highlighted>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`\ (\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_handle<class_EditorNode3DGizmo_private_method__set_handle>`\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, camera\: :ref:`Camera3D<class_Camera3D>`, point\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmo_private_method__set_subgizmo_transform>`\ (\ id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>`\ (\ camera\: :ref:`Camera3D<class_Camera3D>`, frustum\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>`\ (\ camera\: :ref:`Camera3D<class_Camera3D>`, point\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_segments<class_EditorNode3DGizmo_method_add_collision_segments>`\ (\ segments\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_triangles<class_EditorNode3DGizmo_method_add_collision_triangles>`\ (\ triangles\: :ref:`TriangleMesh<class_TriangleMesh>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`\ (\ handles\: :ref:`PackedVector3Array<class_PackedVector3Array>`, material\: :ref:`Material<class_Material>`, ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, billboard\: :ref:`bool<class_bool>` = false, secondary\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_lines<class_EditorNode3DGizmo_method_add_lines>`\ (\ lines\: :ref:`PackedVector3Array<class_PackedVector3Array>`, material\: :ref:`Material<class_Material>`, billboard\: :ref:`bool<class_bool>` = false, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_mesh<class_EditorNode3DGizmo_method_add_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`, material\: :ref:`Material<class_Material>` = null, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), skeleton\: :ref:`SkinReference<class_SkinReference>` = null\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_unscaled_billboard<class_EditorNode3DGizmo_method_add_unscaled_billboard>`\ (\ material\: :ref:`Material<class_Material>`, default_scale\: :ref:`float<class_float>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_EditorNode3DGizmo_method_clear>`\ (\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D<class_Node3D>` | :ref:`get_node_3d<class_EditorNode3DGizmo_method_get_node_3d>`\ (\ ) |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` | :ref:`get_plugin<class_EditorNode3DGizmo_method_get_plugin>`\ (\ ) |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_subgizmo_selection<class_EditorNode3DGizmo_method_get_subgizmo_selection>`\ (\ ) |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_subgizmo_selected<class_EditorNode3DGizmo_method_is_subgizmo_selected>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hidden<class_EditorNode3DGizmo_method_set_hidden>`\ (\ hidden\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_node_3d<class_EditorNode3DGizmo_method_set_node_3d>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,11 +90,25 @@ Methods Method Descriptions ------------------- -.. _class_EditorNode3DGizmo_method__commit_handle: +.. _class_EditorNode3DGizmo_private_method__begin_handle_action: .. rst-class:: classref-method -void **_commit_handle** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| +|void| **_begin_handle_action**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__begin_handle_action>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorNode3DGizmo_private_method__commit_handle: + +.. rst-class:: classref-method + +|void| **_commit_handle**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, restore\: :ref:`Variant<class_Variant>`, cancel\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__commit_handle>` Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". @@ -104,13 +120,13 @@ The ``secondary`` argument is ``true`` when the committed handle is secondary (s ---- -.. _class_EditorNode3DGizmo_method__commit_subgizmos: +.. _class_EditorNode3DGizmo_private_method__commit_subgizmos: .. rst-class:: classref-method -void **_commit_subgizmos** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| +|void| **_commit_subgizmos**\ (\ ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, restores\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\], cancel\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__commit_subgizmos>` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_method__subgizmos_intersect_frustum>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action. @@ -118,11 +134,11 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di ---- -.. _class_EditorNode3DGizmo_method__get_handle_name: +.. _class_EditorNode3DGizmo_private_method__get_handle_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_handle_name** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`String<class_String>` **_get_handle_name**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__get_handle_name>` Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). Handles can be named for reference to the user when editing. @@ -132,13 +148,13 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s ---- -.. _class_EditorNode3DGizmo_method__get_handle_value: +.. _class_EditorNode3DGizmo_private_method__get_handle_value: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_handle_value** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_handle_value**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__get_handle_value>` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle<class_EditorNode3DGizmo_method__commit_handle>`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle<class_EditorNode3DGizmo_private_method__commit_handle>`. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). @@ -146,23 +162,23 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s ---- -.. _class_EditorNode3DGizmo_method__get_subgizmo_transform: +.. _class_EditorNode3DGizmo_private_method__get_subgizmo_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform** **(** :ref:`int<class_int>` id **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform**\ (\ id\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` -Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmo_method__commit_subgizmos>`. +Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__is_handle_highlighted: +.. _class_EditorNode3DGizmo_private_method__is_handle_highlighted: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_handle_highlighted** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_handle_highlighted**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__is_handle_highlighted>` Override this method to return ``true`` whenever the given handle should be highlighted in the editor. @@ -172,11 +188,11 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s ---- -.. _class_EditorNode3DGizmo_method__redraw: +.. _class_EditorNode3DGizmo_private_method__redraw: .. rst-class:: classref-method -void **_redraw** **(** **)** |virtual| +|void| **_redraw**\ (\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__redraw>` Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear<class_EditorNode3DGizmo_method_clear>` at the beginning of this method and then add visual elements depending on the node's properties. @@ -184,11 +200,11 @@ Override this method to add all the gizmo elements whenever a gizmo update is re ---- -.. _class_EditorNode3DGizmo_method__set_handle: +.. _class_EditorNode3DGizmo_private_method__set_handle: .. rst-class:: classref-method -void **_set_handle** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| +|void| **_set_handle**\ (\ id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, camera\: :ref:`Camera3D<class_Camera3D>`, point\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__set_handle>` Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles<class_EditorNode3DGizmo_method_add_handles>`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. @@ -198,37 +214,37 @@ The ``secondary`` argument is ``true`` when the edited handle is secondary (see ---- -.. _class_EditorNode3DGizmo_method__set_subgizmo_transform: +.. _class_EditorNode3DGizmo_private_method__set_subgizmo_transform: .. rst-class:: classref-method -void **_set_subgizmo_transform** **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_set_subgizmo_transform**\ (\ id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmo_private_method__set_subgizmo_transform>` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the Node3D's local coordinate system. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the :ref:`Node3D<class_Node3D>`'s local coordinate system. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__subgizmos_intersect_frustum: +.. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum** **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum**\ (\ camera\: :ref:`Camera3D<class_Camera3D>`, frustum\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum>` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an ``Array`` with all the ``Plane``\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_method__commit_subgizmos>`. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane<class_Plane>`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__subgizmos_intersect_ray: +.. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray: .. rst-class:: classref-method -:ref:`int<class_int>` **_subgizmos_intersect_ray** **(** :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` point **)** |virtual| |const| +:ref:`int<class_int>` **_subgizmos_intersect_ray**\ (\ camera\: :ref:`Camera3D<class_Camera3D>`, point\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray>` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_method__commit_subgizmos>`. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmo_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmo_private_method__commit_subgizmos>`. .. rst-class:: classref-item-separator @@ -238,9 +254,9 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` .. rst-class:: classref-method -void **add_collision_segments** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` segments **)** +|void| **add_collision_segments**\ (\ segments\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_collision_segments>` -Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -250,9 +266,9 @@ Adds the specified ``segments`` to the gizmo's collision shape for picking. Call .. rst-class:: classref-method -void **add_collision_triangles** **(** :ref:`TriangleMesh<class_TriangleMesh>` triangles **)** +|void| **add_collision_triangles**\ (\ triangles\: :ref:`TriangleMesh<class_TriangleMesh>`\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_collision_triangles>` -Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh<class_TriangleMesh>` can be generated from a regular :ref:`Mesh<class_Mesh>` too. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh<class_TriangleMesh>` can be generated from a regular :ref:`Mesh<class_Mesh>` too. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -262,13 +278,13 @@ Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh<class_Tr .. rst-class:: classref-method -void **add_handles** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` handles, :ref:`Material<class_Material>` material, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` secondary=false **)** +|void| **add_handles**\ (\ handles\: :ref:`PackedVector3Array<class_PackedVector3Array>`, material\: :ref:`Material<class_Material>`, ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, billboard\: :ref:`bool<class_bool>` = false, secondary\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_handles>` -Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The ``ids`` argument can be used to specify a custom identifier for each handle, if an empty ``Array`` is passed, the ids will be assigned automatically from the ``handles`` argument order. +Adds a list of handles (points) which can be used to edit the properties of the gizmo's :ref:`Node3D<class_Node3D>`. The ``ids`` argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the ``handles`` argument order. The ``secondary`` argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. -There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -278,9 +294,9 @@ There are virtual methods which will be called upon editing of these handles. Ca .. rst-class:: classref-method -void **add_lines** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` lines, :ref:`Material<class_Material>` material, :ref:`bool<class_bool>` billboard=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** +|void| **add_lines**\ (\ lines\: :ref:`PackedVector3Array<class_PackedVector3Array>`, material\: :ref:`Material<class_Material>`, billboard\: :ref:`bool<class_bool>` = false, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_lines>` -Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -290,9 +306,9 @@ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines .. rst-class:: classref-method -void **add_mesh** **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Material<class_Material>` material=null, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference<class_SkinReference>` skeleton=null **)** +|void| **add_mesh**\ (\ mesh\: :ref:`Mesh<class_Mesh>`, material\: :ref:`Material<class_Material>` = null, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), skeleton\: :ref:`SkinReference<class_SkinReference>` = null\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_mesh>` -Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -302,9 +318,9 @@ Adds a mesh to the gizmo with the specified ``material``, local ``transform`` an .. rst-class:: classref-method -void **add_unscaled_billboard** **(** :ref:`Material<class_Material>` material, :ref:`float<class_float>` default_scale=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** +|void| **add_unscaled_billboard**\ (\ material\: :ref:`Material<class_Material>`, default_scale\: :ref:`float<class_float>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) :ref:`🔗<class_EditorNode3DGizmo_method_add_unscaled_billboard>` -Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -314,7 +330,7 @@ Adds an unscaled billboard for visualization and selection. Call this method dur .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_EditorNode3DGizmo_method_clear>` Removes everything in the gizmo including meshes, collisions and handles. @@ -326,7 +342,7 @@ Removes everything in the gizmo including meshes, collisions and handles. .. rst-class:: classref-method -:ref:`Node3D<class_Node3D>` **get_node_3d** **(** **)** |const| +:ref:`Node3D<class_Node3D>` **get_node_3d**\ (\ ) |const| :ref:`🔗<class_EditorNode3DGizmo_method_get_node_3d>` Returns the :ref:`Node3D<class_Node3D>` node associated with this gizmo. @@ -338,7 +354,7 @@ Returns the :ref:`Node3D<class_Node3D>` node associated with this gizmo. .. rst-class:: classref-method -:ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` **get_plugin** **(** **)** |const| +:ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` **get_plugin**\ (\ ) |const| :ref:`🔗<class_EditorNode3DGizmo_method_get_plugin>` Returns the :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material<class_EditorNode3DGizmoPlugin_method_get_material>`. @@ -350,9 +366,9 @@ Returns the :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` that o .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_subgizmo_selection** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_subgizmo_selection**\ (\ ) |const| :ref:`🔗<class_EditorNode3DGizmo_method_get_subgizmo_selection>` -Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -362,9 +378,9 @@ Returns a list of the currently selected subgizmos. Can be used to highlight sel .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_subgizmo_selected** **(** :ref:`int<class_int>` id **)** |const| +:ref:`bool<class_bool>` **is_subgizmo_selected**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorNode3DGizmo_method_is_subgizmo_selected>` -Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_method__redraw>`. +Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw<class_EditorNode3DGizmo_private_method__redraw>`. .. rst-class:: classref-item-separator @@ -374,7 +390,7 @@ Returns ``true`` if the given subgizmo is currently selected. Can be used to hig .. rst-class:: classref-method -void **set_hidden** **(** :ref:`bool<class_bool>` hidden **)** +|void| **set_hidden**\ (\ hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorNode3DGizmo_method_set_hidden>` Sets the gizmo's hidden state. If ``true``, the gizmo will be hidden. If ``false``, it will be shown. @@ -386,7 +402,7 @@ Sets the gizmo's hidden state. If ``true``, the gizmo will be hidden. If ``false .. rst-class:: classref-method -void **set_node_3d** **(** :ref:`Node<class_Node>` node **)** +|void| **set_node_3d**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorNode3DGizmo_method_set_node_3d>` Sets the reference :ref:`Node3D<class_Node3D>` node for the gizmo. ``node`` must inherit from :ref:`Node3D<class_Node3D>`. @@ -397,3 +413,4 @@ Sets the reference :ref:`Node3D<class_Node3D>` node for the gizmo. ``node`` must .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index e1e7c6f0193..f8404550182 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -38,51 +38,53 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_be_hidden<class_EditorNode3DGizmoPlugin_method__can_be_hidden>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_handle<class_EditorNode3DGizmoPlugin_method__commit_handle>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_method__commit_subgizmos>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` | :ref:`_create_gizmo<class_EditorNode3DGizmoPlugin_method__create_gizmo>` **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_gizmo_name<class_EditorNode3DGizmoPlugin_method__get_gizmo_name>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmoPlugin_method__get_handle_name>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmoPlugin_method__get_handle_value>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_priority<class_EditorNode3DGizmoPlugin_method__get_priority>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_method__get_subgizmo_transform>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_method__has_gizmo>` **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmoPlugin_method__is_handle_highlighted>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_selectable_when_hidden<class_EditorNode3DGizmoPlugin_method__is_selectable_when_hidden>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_redraw<class_EditorNode3DGizmoPlugin_method__redraw>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_handle<class_EditorNode3DGizmoPlugin_method__set_handle>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmoPlugin_method__set_subgizmo_transform>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_frustum>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum_planes **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray>` **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_material<class_EditorNode3DGizmoPlugin_method_add_material>` **(** :ref:`String<class_String>` name, :ref:`StandardMaterial3D<class_StandardMaterial3D>` material **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_handle_material<class_EditorNode3DGizmoPlugin_method_create_handle_material>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` billboard=false, :ref:`Texture2D<class_Texture2D>` texture=null **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_icon_material<class_EditorNode3DGizmoPlugin_method_create_icon_material>` **(** :ref:`String<class_String>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`bool<class_bool>` on_top=false, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_material<class_EditorNode3DGizmoPlugin_method_create_material>` **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` on_top=false, :ref:`bool<class_bool>` use_vertex_color=false **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StandardMaterial3D<class_StandardMaterial3D>` | :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` **(** :ref:`String<class_String>` name, :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo=null **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_begin_handle_action<class_EditorNode3DGizmoPlugin_private_method__begin_handle_action>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_be_hidden<class_EditorNode3DGizmoPlugin_private_method__can_be_hidden>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_commit_handle<class_EditorNode3DGizmoPlugin_private_method__commit_handle>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, restore\: :ref:`Variant<class_Variant>`, cancel\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, restores\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\], cancel\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` | :ref:`_create_gizmo<class_EditorNode3DGizmoPlugin_private_method__create_gizmo>`\ (\ for_node_3d\: :ref:`Node3D<class_Node3D>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_gizmo_name<class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_handle_name<class_EditorNode3DGizmoPlugin_private_method__get_handle_name>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_handle_value<class_EditorNode3DGizmoPlugin_private_method__get_handle_value>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_priority<class_EditorNode3DGizmoPlugin_private_method__get_priority>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, subgizmo_id\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>`\ (\ for_node_3d\: :ref:`Node3D<class_Node3D>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_handle_highlighted<class_EditorNode3DGizmoPlugin_private_method__is_handle_highlighted>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_selectable_when_hidden<class_EditorNode3DGizmoPlugin_private_method__is_selectable_when_hidden>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_redraw<class_EditorNode3DGizmoPlugin_private_method__redraw>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_handle<class_EditorNode3DGizmoPlugin_private_method__set_handle>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, camera\: :ref:`Camera3D<class_Camera3D>`, screen_pos\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, subgizmo_id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, camera\: :ref:`Camera3D<class_Camera3D>`, frustum_planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>`\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, camera\: :ref:`Camera3D<class_Camera3D>`, screen_pos\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_material<class_EditorNode3DGizmoPlugin_method_add_material>`\ (\ name\: :ref:`String<class_String>`, material\: :ref:`StandardMaterial3D<class_StandardMaterial3D>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_handle_material<class_EditorNode3DGizmoPlugin_method_create_handle_material>`\ (\ name\: :ref:`String<class_String>`, billboard\: :ref:`bool<class_bool>` = false, texture\: :ref:`Texture2D<class_Texture2D>` = null\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_icon_material<class_EditorNode3DGizmoPlugin_method_create_icon_material>`\ (\ name\: :ref:`String<class_String>`, texture\: :ref:`Texture2D<class_Texture2D>`, on_top\: :ref:`bool<class_bool>` = false, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_material<class_EditorNode3DGizmoPlugin_method_create_material>`\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`, billboard\: :ref:`bool<class_bool>` = false, on_top\: :ref:`bool<class_bool>` = false, use_vertex_color\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StandardMaterial3D<class_StandardMaterial3D>` | :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>`\ (\ name\: :ref:`String<class_String>`, gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` = null\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -93,11 +95,25 @@ Methods Method Descriptions ------------------- -.. _class_EditorNode3DGizmoPlugin_method__can_be_hidden: +.. _class_EditorNode3DGizmoPlugin_private_method__begin_handle_action: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_be_hidden** **(** **)** |virtual| |const| +|void| **_begin_handle_action**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__begin_handle_action>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorNode3DGizmoPlugin_private_method__can_be_hidden: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_can_be_hidden**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__can_be_hidden>` Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns ``true`` if not overridden. @@ -105,13 +121,13 @@ Override this method to define whether the gizmos handled by this plugin can be ---- -.. _class_EditorNode3DGizmoPlugin_method__commit_handle: +.. _class_EditorNode3DGizmoPlugin_private_method__commit_handle: .. rst-class:: classref-method -void **_commit_handle** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Variant<class_Variant>` restore, :ref:`bool<class_bool>` cancel **)** |virtual| +|void| **_commit_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, restore\: :ref:`Variant<class_Variant>`, cancel\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__commit_handle>` -Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` during :ref:`_redraw<class_EditorNode3DGizmoPlugin_method__redraw>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". +Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` during :ref:`_redraw<class_EditorNode3DGizmoPlugin_private_method__redraw>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action. @@ -123,13 +139,13 @@ Called for this plugin's active gizmos. ---- -.. _class_EditorNode3DGizmoPlugin_method__commit_subgizmos: +.. _class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos: .. rst-class:: classref-method -void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`PackedInt32Array<class_PackedInt32Array>` ids, :ref:`Transform3D[]<class_Transform3D>` restores, :ref:`bool<class_bool>` cancel **)** |virtual| +|void| **_commit_subgizmos**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, ids\: :ref:`PackedInt32Array<class_PackedInt32Array>`, restores\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\], cancel\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_frustum>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>`). This usually means creating an :ref:`UndoRedo<class_UndoRedo>` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo<class_UndoRedo>` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. @@ -137,23 +153,23 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di ---- -.. _class_EditorNode3DGizmoPlugin_method__create_gizmo: +.. _class_EditorNode3DGizmoPlugin_private_method__create_gizmo: .. rst-class:: classref-method -:ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` **_create_gizmo** **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| +:ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` **_create_gizmo**\ (\ for_node_3d\: :ref:`Node3D<class_Node3D>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__create_gizmo>` -Override this method to return a custom :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` for the spatial nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_method__has_gizmo>`. +Override this method to return a custom :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` for the spatial nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__get_gizmo_name: +.. _class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_gizmo_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_gizmo_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name>` Override this method to provide the name that will appear in the gizmo visibility menu. @@ -161,11 +177,11 @@ Override this method to provide the name that will appear in the gizmo visibilit ---- -.. _class_EditorNode3DGizmoPlugin_method__get_handle_name: +.. _class_EditorNode3DGizmoPlugin_private_method__get_handle_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_handle_name** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`String<class_String>` **_get_handle_name**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__get_handle_name>` Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). Called for this plugin's active gizmos. @@ -173,13 +189,13 @@ Override this method to provide gizmo's handle names. The ``secondary`` argument ---- -.. _class_EditorNode3DGizmoPlugin_method__get_handle_value: +.. _class_EditorNode3DGizmoPlugin_private_method__get_handle_value: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_handle_value** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_handle_value**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__get_handle_value>` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle<class_EditorNode3DGizmoPlugin_method__commit_handle>`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle<class_EditorNode3DGizmoPlugin_private_method__commit_handle>`. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). @@ -189,11 +205,11 @@ Called for this plugin's active gizmos. ---- -.. _class_EditorNode3DGizmoPlugin_method__get_priority: +.. _class_EditorNode3DGizmoPlugin_private_method__get_priority: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_priority** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_priority**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__get_priority>` Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. @@ -203,23 +219,23 @@ All built-in editor gizmos return a priority of ``-1``. If not overridden, this ---- -.. _class_EditorNode3DGizmoPlugin_method__get_subgizmo_transform: +.. _class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_get_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, subgizmo_id\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` -Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_method__commit_subgizmos>`. Called for this plugin's active gizmos. +Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__has_gizmo: +.. _class_EditorNode3DGizmoPlugin_private_method__has_gizmo: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_gizmo** **(** :ref:`Node3D<class_Node3D>` for_node_3d **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_gizmo**\ (\ for_node_3d\: :ref:`Node3D<class_Node3D>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__has_gizmo>` Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a :ref:`Node3D<class_Node3D>` node is added to a scene this method is called, if it returns ``true`` the node gets a generic :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` assigned and is added to this plugin's list of active gizmos. @@ -227,11 +243,11 @@ Override this method to define which Node3D nodes have a gizmo from this plugin. ---- -.. _class_EditorNode3DGizmoPlugin_method__is_handle_highlighted: +.. _class_EditorNode3DGizmoPlugin_private_method__is_handle_highlighted: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_handle_highlighted** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_handle_highlighted**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__is_handle_highlighted>` Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>` for more information). Called for this plugin's active gizmos. @@ -239,11 +255,11 @@ Override this method to return ``true`` whenever to given handle should be highl ---- -.. _class_EditorNode3DGizmoPlugin_method__is_selectable_when_hidden: +.. _class_EditorNode3DGizmoPlugin_private_method__is_selectable_when_hidden: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_selectable_when_hidden** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_selectable_when_hidden**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__is_selectable_when_hidden>` Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. @@ -251,11 +267,11 @@ Override this method to define whether Node3D with this gizmo should be selectab ---- -.. _class_EditorNode3DGizmoPlugin_method__redraw: +.. _class_EditorNode3DGizmoPlugin_private_method__redraw: .. rst-class:: classref-method -void **_redraw** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo **)** |virtual| +|void| **_redraw**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__redraw>` Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear<class_EditorNode3DGizmo_method_clear>` at the beginning of this method and then add visual elements depending on the node's properties. @@ -263,11 +279,11 @@ Override this method to add all the gizmo elements whenever a gizmo update is re ---- -.. _class_EditorNode3DGizmoPlugin_method__set_handle: +.. _class_EditorNode3DGizmoPlugin_private_method__set_handle: .. rst-class:: classref-method -void **_set_handle** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` handle_id, :ref:`bool<class_bool>` secondary, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| +|void| **_set_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, handle_id\: :ref:`int<class_int>`, secondary\: :ref:`bool<class_bool>`, camera\: :ref:`Camera3D<class_Camera3D>`, screen_pos\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__set_handle>` Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. @@ -279,37 +295,37 @@ Called for this plugin's active gizmos. ---- -.. _class_EditorNode3DGizmoPlugin_method__set_subgizmo_transform: +.. _class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform: .. rst-class:: classref-method -void **_set_subgizmo_transform** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`int<class_int>` subgizmo_id, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_set_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, subgizmo_id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform>` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` and :ref:`_subgizmos_intersect_frustum<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_frustum: +.. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Plane[]<class_Plane>` frustum_planes **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_subgizmos_intersect_frustum**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, camera\: :ref:`Camera3D<class_Camera3D>`, frustum_planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum>` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an ``Array`` with all the ``Plane``\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_method__commit_subgizmos>`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an array with all the :ref:`Plane<class_Plane>`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray: +.. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray: .. rst-class:: classref-method -:ref:`int<class_int>` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo, :ref:`Camera3D<class_Camera3D>` camera, :ref:`Vector2<class_Vector2>` screen_pos **)** |virtual| |const| +:ref:`int<class_int>` **_subgizmos_intersect_ray**\ (\ gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, camera\: :ref:`Camera3D<class_Camera3D>`, screen_pos\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| :ref:`🔗<class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray>` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_method__commit_subgizmos>`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform<class_EditorNode3DGizmoPlugin_private_method__get_subgizmo_transform>` or :ref:`_commit_subgizmos<class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos>`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -319,7 +335,7 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` .. rst-class:: classref-method -void **add_material** **(** :ref:`String<class_String>` name, :ref:`StandardMaterial3D<class_StandardMaterial3D>` material **)** +|void| **add_material**\ (\ name\: :ref:`String<class_String>`, material\: :ref:`StandardMaterial3D<class_StandardMaterial3D>`\ ) :ref:`🔗<class_EditorNode3DGizmoPlugin_method_add_material>` Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>`. Should not be overridden. @@ -331,7 +347,7 @@ Adds a new material to the internal material list for the plugin. It can then be .. rst-class:: classref-method -void **create_handle_material** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` billboard=false, :ref:`Texture2D<class_Texture2D>` texture=null **)** +|void| **create_handle_material**\ (\ name\: :ref:`String<class_String>`, billboard\: :ref:`bool<class_bool>` = false, texture\: :ref:`Texture2D<class_Texture2D>` = null\ ) :ref:`🔗<class_EditorNode3DGizmoPlugin_method_create_handle_material>` Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_handles<class_EditorNode3DGizmo_method_add_handles>`. Should not be overridden. @@ -345,7 +361,7 @@ You can optionally provide a texture to use instead of the default icon. .. rst-class:: classref-method -void **create_icon_material** **(** :ref:`String<class_String>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`bool<class_bool>` on_top=false, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** +|void| **create_icon_material**\ (\ name\: :ref:`String<class_String>`, texture\: :ref:`Texture2D<class_Texture2D>`, on_top\: :ref:`bool<class_bool>` = false, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) :ref:`🔗<class_EditorNode3DGizmoPlugin_method_create_icon_material>` Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard<class_EditorNode3DGizmo_method_add_unscaled_billboard>`. Should not be overridden. @@ -357,7 +373,7 @@ Creates an icon material with its variants (selected and/or editable) and adds t .. rst-class:: classref-method -void **create_material** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` billboard=false, :ref:`bool<class_bool>` on_top=false, :ref:`bool<class_bool>` use_vertex_color=false **)** +|void| **create_material**\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`, billboard\: :ref:`bool<class_bool>` = false, on_top\: :ref:`bool<class_bool>` = false, use_vertex_color\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorNode3DGizmoPlugin_method_create_material>` Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material<class_EditorNode3DGizmoPlugin_method_get_material>` and used in :ref:`EditorNode3DGizmo.add_mesh<class_EditorNode3DGizmo_method_add_mesh>` and :ref:`EditorNode3DGizmo.add_lines<class_EditorNode3DGizmo_method_add_lines>`. Should not be overridden. @@ -369,7 +385,7 @@ Creates an unshaded material with its variants (selected and/or editable) and ad .. rst-class:: classref-method -:ref:`StandardMaterial3D<class_StandardMaterial3D>` **get_material** **(** :ref:`String<class_String>` name, :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` gizmo=null **)** +:ref:`StandardMaterial3D<class_StandardMaterial3D>` **get_material**\ (\ name\: :ref:`String<class_String>`, gizmo\: :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` = null\ ) :ref:`🔗<class_EditorNode3DGizmoPlugin_method_get_material>` Gets material from the internal list of materials. If an :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` is provided, it will try to get the corresponding variant (selected and/or editable). @@ -380,3 +396,4 @@ Gets material from the internal list of materials. If an :ref:`EditorNode3DGizmo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index a8deebe48c4..571d9a16aac 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_cache_dir<class_EditorPaths_method_get_cache_dir>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_config_dir<class_EditorPaths_method_get_config_dir>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_data_dir<class_EditorPaths_method_get_data_dir>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_project_settings_dir<class_EditorPaths_method_get_project_settings_dir>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_self_contained_file<class_EditorPaths_method_get_self_contained_file>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_self_contained<class_EditorPaths_method_is_self_contained>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_cache_dir<class_EditorPaths_method_get_cache_dir>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_config_dir<class_EditorPaths_method_get_config_dir>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_data_dir<class_EditorPaths_method_get_data_dir>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_project_settings_dir<class_EditorPaths_method_get_project_settings_dir>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_self_contained_file<class_EditorPaths_method_get_self_contained_file>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_self_contained<class_EditorPaths_method_is_self_contained>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,13 +67,13 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_cache_dir** **(** **)** |const| +:ref:`String<class_String>` **get_cache_dir**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_get_cache_dir>` Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails). \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %LOCALAPPDATA%\Godot\ - macOS: ~/Library/Caches/Godot/ @@ -87,13 +87,13 @@ Returns the absolute path to the user's cache folder. This folder should be used .. rst-class:: classref-method -:ref:`String<class_String>` **get_config_dir** **(** **)** |const| +:ref:`String<class_String>` **get_config_dir**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_get_config_dir>` Returns the absolute path to the user's configuration folder. This folder should be used for *persistent* user configuration files. \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`) - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`) @@ -107,13 +107,13 @@ Returns the absolute path to the user's configuration folder. This folder should .. rst-class:: classref-method -:ref:`String<class_String>` **get_data_dir** **(** **)** |const| +:ref:`String<class_String>` **get_data_dir**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_get_data_dir>` Returns the absolute path to the user's data folder. This folder should be used for *persistent* user data files such as installed export templates. \ **Default paths per platform:**\ -:: +.. code:: text - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`) - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`) @@ -127,7 +127,7 @@ Returns the absolute path to the user's data folder. This folder should be used .. rst-class:: classref-method -:ref:`String<class_String>` **get_project_settings_dir** **(** **)** |const| +:ref:`String<class_String>` **get_project_settings_dir**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_get_project_settings_dir>` Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. @@ -139,7 +139,7 @@ Returns the project-specific editor settings path. Projects all have a unique su .. rst-class:: classref-method -:ref:`String<class_String>` **get_self_contained_file** **(** **)** |const| +:ref:`String<class_String>` **get_self_contained_file**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_get_self_contained_file>` Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also :ref:`is_self_contained<class_EditorPaths_method_is_self_contained>`. @@ -151,7 +151,7 @@ Returns the absolute path to the self-contained file that makes the current Godo .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_self_contained** **(** **)** |const| +:ref:`bool<class_bool>` **is_self_contained**\ (\ ) |const| :ref:`🔗<class_EditorPaths_method_is_self_contained>` Returns ``true`` if the editor is marked as self-contained, ``false`` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an ``editor_data/`` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. @@ -170,3 +170,4 @@ Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index b514b400bf6..cd00a3e7b51 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -21,6 +21,8 @@ Description 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. See also :ref:`EditorScript<class_EditorScript>` to add functions to the editor. +\ **Note:** Some names in this class contain "left" or "right" (e.g. :ref:`DOCK_SLOT_LEFT_UL<class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL>`). These APIs assume left-to-right layout, and would be backwards when using right-to-left layout. These names are kept for compatibility reasons. + .. rst-class:: classref-introduction-group Tutorials @@ -36,139 +38,145 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_changes<class_EditorPlugin_method__apply_changes>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_build<class_EditorPlugin_method__build>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_clear<class_EditorPlugin_method__clear>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_disable_plugin<class_EditorPlugin_method__disable_plugin>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_edit<class_EditorPlugin_method__edit>` **(** :ref:`Object<class_Object>` object **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enable_plugin<class_EditorPlugin_method__enable_plugin>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>` **(** :ref:`Camera3D<class_Camera3D>` viewport_camera, :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_forward_canvas_gui_input<class_EditorPlugin_method__forward_canvas_gui_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_breakpoints<class_EditorPlugin_method__get_breakpoints>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_plugin_icon<class_EditorPlugin_method__get_plugin_icon>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_state<class_EditorPlugin_method__get_state>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>` **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorPlugin_method__handles>` **(** :ref:`Object<class_Object>` object **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_main_screen<class_EditorPlugin_method__has_main_screen>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_make_visible<class_EditorPlugin_method__make_visible>` **(** :ref:`bool<class_bool>` visible **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_save_external_data<class_EditorPlugin_method__save_external_data>` **(** **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_state<class_EditorPlugin_method__set_state>` **(** :ref:`Dictionary<class_Dictionary>` state **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_window_layout<class_EditorPlugin_method__set_window_layout>` **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_autoload_singleton<class_EditorPlugin_method_add_autoload_singleton>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` path **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Button<class_Button>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_method_add_control_to_bottom_panel>` **(** :ref:`Control<class_Control>` control, :ref:`String<class_String>` title **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_control_to_container<class_EditorPlugin_method_add_control_to_container>` **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_control_to_dock<class_EditorPlugin_method_add_control_to_dock>` **(** :ref:`DockSlot<enum_EditorPlugin_DockSlot>` slot, :ref:`Control<class_Control>` control **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>` **(** :ref:`String<class_String>` type, :ref:`String<class_String>` base, :ref:`Script<class_Script>` script, :ref:`Texture2D<class_Texture2D>` icon **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_debugger_plugin<class_EditorPlugin_method_add_debugger_plugin>` **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>` **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>` **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer, :ref:`bool<class_bool>` first_priority=false **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>` **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>` **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>` **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer, :ref:`bool<class_bool>` first_priority=false **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>` **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin, :ref:`bool<class_bool>` first_priority=false **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_tool_menu_item<class_EditorPlugin_method_add_tool_menu_item>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` callable **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_tool_submenu_item<class_EditorPlugin_method_add_tool_submenu_item>` **(** :ref:`String<class_String>` name, :ref:`PopupMenu<class_PopupMenu>` submenu **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>` **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorPlugin_method_get_editor_interface>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_export_as_menu<class_EditorPlugin_method_get_export_as_menu>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` | :ref:`get_script_create_dialog<class_EditorPlugin_method_get_script_create_dialog>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_undo_redo<class_EditorPlugin_method_get_undo_redo>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide_bottom_panel<class_EditorPlugin_method_hide_bottom_panel>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_method_make_bottom_panel_item_visible>` **(** :ref:`Control<class_Control>` item **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_autoload_singleton<class_EditorPlugin_method_remove_autoload_singleton>` **(** :ref:`String<class_String>` name **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` **(** :ref:`Control<class_Control>` control **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>` **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` **(** :ref:`Control<class_Control>` control **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_custom_type<class_EditorPlugin_method_remove_custom_type>` **(** :ref:`String<class_String>` type **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_debugger_plugin<class_EditorPlugin_method_remove_debugger_plugin>` **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_export_plugin<class_EditorPlugin_method_remove_export_plugin>` **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_import_plugin<class_EditorPlugin_method_remove_import_plugin>` **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>` **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_node_3d_gizmo_plugin<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>` **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_resource_conversion_plugin<class_EditorPlugin_method_remove_resource_conversion_plugin>` **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_scene_format_importer_plugin<class_EditorPlugin_method_remove_scene_format_importer_plugin>` **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_scene_post_import_plugin<class_EditorPlugin_method_remove_scene_post_import_plugin>` **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>` **(** :ref:`String<class_String>` name **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_translation_parser_plugin<class_EditorPlugin_method_remove_translation_parser_plugin>` **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_undo_redo_inspector_hook_callback<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>` **(** **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`update_overlays<class_EditorPlugin_method_update_overlays>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_changes<class_EditorPlugin_private_method__apply_changes>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_build<class_EditorPlugin_private_method__build>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_clear<class_EditorPlugin_private_method__clear>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_disable_plugin<class_EditorPlugin_private_method__disable_plugin>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_edit<class_EditorPlugin_private_method__edit>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_enable_plugin<class_EditorPlugin_private_method__enable_plugin>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_forward_3d_gui_input<class_EditorPlugin_private_method__forward_3d_gui_input>`\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_forward_canvas_gui_input<class_EditorPlugin_private_method__forward_canvas_gui_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_breakpoints<class_EditorPlugin_private_method__get_breakpoints>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_plugin_icon<class_EditorPlugin_private_method__get_plugin_icon>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_state<class_EditorPlugin_private_method__get_state>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_unsaved_status<class_EditorPlugin_private_method__get_unsaved_status>`\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_get_window_layout<class_EditorPlugin_private_method__get_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorPlugin_private_method__handles>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_main_screen<class_EditorPlugin_private_method__has_main_screen>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_make_visible<class_EditorPlugin_private_method__make_visible>`\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_save_external_data<class_EditorPlugin_private_method__save_external_data>`\ (\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_state<class_EditorPlugin_private_method__set_state>`\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_window_layout<class_EditorPlugin_private_method__set_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_autoload_singleton<class_EditorPlugin_method_add_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Button<class_Button>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_method_add_control_to_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_control_to_container<class_EditorPlugin_method_add_control_to_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_control_to_dock<class_EditorPlugin_method_add_control_to_dock>`\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>`\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_debugger_plugin<class_EditorPlugin_method_add_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_tool_menu_item<class_EditorPlugin_method_add_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_tool_submenu_item<class_EditorPlugin_method_add_tool_submenu_item>`\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorPlugin_method_get_editor_interface>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_export_as_menu<class_EditorPlugin_method_get_export_as_menu>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_plugin_version<class_EditorPlugin_method_get_plugin_version>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` | :ref:`get_script_create_dialog<class_EditorPlugin_method_get_script_create_dialog>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_undo_redo<class_EditorPlugin_method_get_undo_redo>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hide_bottom_panel<class_EditorPlugin_method_hide_bottom_panel>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_method_make_bottom_panel_item_visible>`\ (\ item\: :ref:`Control<class_Control>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_autoload_singleton<class_EditorPlugin_method_remove_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>`\ (\ control\: :ref:`Control<class_Control>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_custom_type<class_EditorPlugin_method_remove_custom_type>`\ (\ type\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_debugger_plugin<class_EditorPlugin_method_remove_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_export_plugin<class_EditorPlugin_method_remove_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_import_plugin<class_EditorPlugin_method_remove_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node_3d_gizmo_plugin<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_resource_conversion_plugin<class_EditorPlugin_method_remove_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_scene_format_importer_plugin<class_EditorPlugin_method_remove_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_scene_post_import_plugin<class_EditorPlugin_method_remove_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_translation_parser_plugin<class_EditorPlugin_method_remove_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_undo_redo_inspector_hook_callback<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_dock_tab_icon<class_EditorPlugin_method_set_dock_tab_icon>`\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`\ (\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -183,7 +191,7 @@ Signals .. rst-class:: classref-signal -**main_screen_changed** **(** :ref:`String<class_String>` screen_name **)** +**main_screen_changed**\ (\ screen_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_main_screen_changed>` Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. @@ -195,7 +203,9 @@ Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib* .. rst-class:: classref-signal -**project_settings_changed** **(** **)** +**project_settings_changed**\ (\ ) :ref:`🔗<class_EditorPlugin_signal_project_settings_changed>` + +**Deprecated:** Use :ref:`ProjectSettings.settings_changed<class_ProjectSettings_signal_settings_changed>` instead. Emitted when any project setting has changed. @@ -207,9 +217,9 @@ Emitted when any project setting has changed. .. rst-class:: classref-signal -**resource_saved** **(** :ref:`Resource<class_Resource>` resource **)** +**resource_saved**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorPlugin_signal_resource_saved>` -Emitted when the given ``resource`` was saved on disc. +Emitted when the given ``resource`` was saved on disc. See also :ref:`scene_saved<class_EditorPlugin_signal_scene_saved>`. .. rst-class:: classref-item-separator @@ -219,7 +229,7 @@ Emitted when the given ``resource`` was saved on disc. .. rst-class:: classref-signal -**scene_changed** **(** :ref:`Node<class_Node>` scene_root **)** +**scene_changed**\ (\ scene_root\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_changed>` Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be ``null``. @@ -231,9 +241,21 @@ Emitted when the scene is changed in the editor. The argument will return the ro .. rst-class:: classref-signal -**scene_closed** **(** :ref:`String<class_String>` filepath **)** +**scene_closed**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_closed>` + +Emitted when user closes a scene. The argument is a file path to the closed scene. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorPlugin_signal_scene_saved: + +.. rst-class:: classref-signal + +**scene_saved**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_saved>` -Emitted when user closes a scene. The argument is file path to a closed scene. +Emitted when a scene was saved on disc. The argument is a file path to the saved scene. See also :ref:`resource_saved<class_EditorPlugin_signal_resource_saved>`. .. rst-class:: classref-section-separator @@ -248,7 +270,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CustomControlContainer**: +enum **CustomControlContainer**: :ref:`🔗<enum_EditorPlugin_CustomControlContainer>` .. _class_EditorPlugin_constant_CONTAINER_TOOLBAR: @@ -354,7 +376,7 @@ Tab of Project Settings dialog, to the right of other tabs. .. rst-class:: classref-enumeration -enum **DockSlot**: +enum **DockSlot**: :ref:`🔗<enum_EditorPlugin_DockSlot>` .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL: @@ -394,7 +416,7 @@ Dock slot, left side, bottom-right (in default layout includes FileSystem dock). :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UL** = ``4`` -Dock slot, right side, upper-left (empty in default layout). +Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL: @@ -410,7 +432,7 @@ Dock slot, right side, bottom-left (empty in default layout). :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UR** = ``6`` -Dock slot, right side, upper-right (in default layout includes Inspector, Node and History docks). +Dock slot, right side, upper-right (empty in default layout). .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR: @@ -436,7 +458,7 @@ Represents the size of the :ref:`DockSlot<enum_EditorPlugin_DockSlot>` enum. .. rst-class:: classref-enumeration -enum **AfterGUIInput**: +enum **AfterGUIInput**: :ref:`🔗<enum_EditorPlugin_AfterGUIInput>` .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS: @@ -471,11 +493,11 @@ Pass the :ref:`InputEvent<class_InputEvent>` to other editor plugins except the Method Descriptions ------------------- -.. _class_EditorPlugin_method__apply_changes: +.. _class_EditorPlugin_private_method__apply_changes: .. rst-class:: classref-method -void **_apply_changes** **(** **)** |virtual| +|void| **_apply_changes**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__apply_changes>` This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. @@ -485,25 +507,25 @@ This is used, for example, in shader editors to let the plugin know that it must ---- -.. _class_EditorPlugin_method__build: +.. _class_EditorPlugin_private_method__build: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_build** **(** **)** |virtual| +:ref:`bool<class_bool>` **_build**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__build>` This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. -This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build<class_EditorPlugin_method__build>` methods from running. +This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build<class_EditorPlugin_private_method__build>` methods from running. .. rst-class:: classref-item-separator ---- -.. _class_EditorPlugin_method__clear: +.. _class_EditorPlugin_private_method__clear: .. rst-class:: classref-method -void **_clear** **(** **)** |virtual| +|void| **_clear**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__clear>` 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. @@ -511,11 +533,11 @@ Clear all the state and reset the object being edited to zero. This ensures your ---- -.. _class_EditorPlugin_method__disable_plugin: +.. _class_EditorPlugin_private_method__disable_plugin: .. rst-class:: classref-method -void **_disable_plugin** **(** **)** |virtual| +|void| **_disable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__disable_plugin>` Called by the engine when the user disables the **EditorPlugin** in the Plugin tab of the project settings window. @@ -523,11 +545,11 @@ Called by the engine when the user disables the **EditorPlugin** in the Plugin t ---- -.. _class_EditorPlugin_method__edit: +.. _class_EditorPlugin_private_method__edit: .. rst-class:: classref-method -void **_edit** **(** :ref:`Object<class_Object>` object **)** |virtual| +|void| **_edit**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__edit>` This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. @@ -537,11 +559,11 @@ This function is used for plugins that edit specific object types (nodes or reso ---- -.. _class_EditorPlugin_method__enable_plugin: +.. _class_EditorPlugin_private_method__enable_plugin: .. rst-class:: classref-method -void **_enable_plugin** **(** **)** |virtual| +|void| **_enable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__enable_plugin>` Called by the engine when the user enables the **EditorPlugin** in the Plugin tab of the project settings window. @@ -549,11 +571,11 @@ Called by the engine when the user enables the **EditorPlugin** in the Plugin ta ---- -.. _class_EditorPlugin_method__forward_3d_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_3d_draw_over_viewport: .. rst-class:: classref-method -void **_forward_3d_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| +|void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>` Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control<class_Control>` for drawing. You can update the viewport manually by calling :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`. @@ -598,13 +620,13 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay ---- -.. _class_EditorPlugin_method__forward_3d_force_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport: .. rst-class:: classref-method -void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| +|void| **_forward_3d_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>` -This method is the same as :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`. @@ -612,13 +634,13 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for ---- -.. _class_EditorPlugin_method__forward_3d_gui_input: +.. _class_EditorPlugin_private_method__forward_3d_gui_input: .. rst-class:: classref-method -:ref:`int<class_int>` **_forward_3d_gui_input** **(** :ref:`Camera3D<class_Camera3D>` viewport_camera, :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +:ref:`int<class_int>` **_forward_3d_gui_input**\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_gui_input>` -Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_method__handles>` is implemented, and an :ref:`InputEvent<class_InputEvent>` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent<class_InputEvent>` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` for options. +Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_private_method__handles>` is implemented, and an :ref:`InputEvent<class_InputEvent>` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent<class_InputEvent>` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` for options. \ **Example:**\ @@ -668,11 +690,11 @@ Must ``return EditorPlugin.AFTER_GUI_INPUT_PASS`` in order to forward the :ref:` ---- -.. _class_EditorPlugin_method__forward_canvas_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_canvas_draw_over_viewport: .. rst-class:: classref-method -void **_forward_canvas_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| +|void| **_forward_canvas_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>` Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control<class_Control>` for drawing. You can update the viewport manually by calling :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`. @@ -717,13 +739,13 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay ---- -.. _class_EditorPlugin_method__forward_canvas_force_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport: .. rst-class:: classref-method -void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| +|void| **_forward_canvas_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>` -This method is the same as :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`. @@ -731,13 +753,13 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for ---- -.. _class_EditorPlugin_method__forward_canvas_gui_input: +.. _class_EditorPlugin_private_method__forward_canvas_gui_input: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_forward_canvas_gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +:ref:`bool<class_bool>` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_gui_input>` -Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_method__handles>` is implemented and an :ref:`InputEvent<class_InputEvent>` happens in the 2D viewport. Intercepts the :ref:`InputEvent<class_InputEvent>`, if ``return true`` **EditorPlugin** consumes the ``event``, otherwise forwards ``event`` to other Editor classes. +Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_private_method__handles>` is implemented and an :ref:`InputEvent<class_InputEvent>` happens in the 2D viewport. Intercepts the :ref:`InputEvent<class_InputEvent>`, if ``return true`` **EditorPlugin** consumes the ``event``, otherwise forwards ``event`` to other Editor classes. \ **Example:**\ @@ -793,11 +815,11 @@ Must ``return false`` in order to forward the :ref:`InputEvent<class_InputEvent> ---- -.. _class_EditorPlugin_method__get_breakpoints: +.. _class_EditorPlugin_private_method__get_breakpoints: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_breakpoints>` This is for editors that edit script-based objects. You can return a list of breakpoints in the format (``script:line``), for example: ``res://path_to_script.gd:25``. @@ -805,17 +827,17 @@ This is for editors that edit script-based objects. You can return a list of bre ---- -.. _class_EditorPlugin_method__get_plugin_icon: +.. _class_EditorPlugin_private_method__get_plugin_icon: .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **_get_plugin_icon** **(** **)** |virtual| |const| +:ref:`Texture2D<class_Texture2D>` **_get_plugin_icon**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_icon>` Override this method in your plugin to return a :ref:`Texture2D<class_Texture2D>` in order to give it an icon. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. -Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size. +Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size. .. tabs:: @@ -826,7 +848,7 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 # You can use a custom icon: return preload("res://addons/my_plugin/my_plugin_icon.svg") # Or use a built-in icon: - return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") + return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons") .. code-tab:: csharp @@ -835,7 +857,7 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 // You can use a custom icon: return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg"); // Or use a built-in icon: - return GetEditorInterface().GetBaseControl().GetThemeIcon("Node", "EditorIcons"); + return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons"); } @@ -844,11 +866,11 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 ---- -.. _class_EditorPlugin_method__get_plugin_name: +.. _class_EditorPlugin_private_method__get_plugin_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_plugin_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_plugin_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_name>` Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. @@ -858,19 +880,19 @@ For main screen plugins, this appears at the top of the screen, to the right of ---- -.. _class_EditorPlugin_method__get_state: +.. _class_EditorPlugin_private_method__get_state: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_state** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_state**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_state>` -Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>` instead. +Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout<class_EditorPlugin_private_method__get_window_layout>` instead. -Use :ref:`_set_state<class_EditorPlugin_method__set_state>` to restore your saved state. +Use :ref:`_set_state<class_EditorPlugin_private_method__set_state>` to restore your saved state. \ **Note:** This method should not be used to save important settings that should persist with the project. -\ **Note:** You must implement :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` for the state to be stored and restored correctly. +\ **Note:** You must implement :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>` for the state to be stored and restored correctly. :: @@ -882,15 +904,53 @@ Use :ref:`_set_state<class_EditorPlugin_method__set_state>` to restore your save ---- -.. _class_EditorPlugin_method__get_window_layout: +.. _class_EditorPlugin_private_method__get_unsaved_status: .. rst-class:: classref-method -void **_get_window_layout** **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| +:ref:`String<class_String>` **_get_unsaved_status**\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_unsaved_status>` + +Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes. + +When closing a scene, ``for_scene`` is the path to the scene being closed. You can use it to handle built-in resources in that scene. + +If the user confirms saving, :ref:`_save_external_data<class_EditorPlugin_private_method__save_external_data>` will be called, before closing the editor. + +:: + + func _get_unsaved_status(for_scene): + if not unsaved: + return "" + + if for_scene.is_empty(): + return "Save changes in MyCustomPlugin before closing?" + else: + return "Scene %s has changes from MyCustomPlugin. Save before closing?" % for_scene.get_file() + + func _save_external_data(): + unsaved = false + +If the plugin has no scene-specific changes, you can ignore the calls when closing scenes: + +:: + + func _get_unsaved_status(for_scene): + if not for_scene.is_empty(): + return "" + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorPlugin_private_method__get_window_layout: + +.. rst-class:: classref-method + +|void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__get_window_layout>` Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory. -Use :ref:`_set_window_layout<class_EditorPlugin_method__set_window_layout>` to restore your saved layout. +Use :ref:`_set_window_layout<class_EditorPlugin_private_method__set_window_layout>` to restore your saved layout. :: @@ -902,29 +962,31 @@ Use :ref:`_set_window_layout<class_EditorPlugin_method__set_window_layout>` to r ---- -.. _class_EditorPlugin_method__handles: +.. _class_EditorPlugin_private_method__handles: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles** **(** :ref:`Object<class_Object>` object **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__handles>` -Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit<class_EditorPlugin_method__edit>` and :ref:`_make_visible<class_EditorPlugin_method__make_visible>` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input<class_EditorPlugin_method__forward_canvas_gui_input>` and :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>` these will be called too. +Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit<class_EditorPlugin_private_method__edit>` and :ref:`_make_visible<class_EditorPlugin_private_method__make_visible>` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input<class_EditorPlugin_private_method__forward_canvas_gui_input>` and :ref:`_forward_3d_gui_input<class_EditorPlugin_private_method__forward_3d_gui_input>` these will be called too. + +\ **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors. .. rst-class:: classref-item-separator ---- -.. _class_EditorPlugin_method__has_main_screen: +.. _class_EditorPlugin_private_method__has_main_screen: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_main_screen** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_main_screen**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__has_main_screen>` Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). -When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_base_control<class_EditorInterface_method_get_base_control>` and made visible inside :ref:`_make_visible<class_EditorPlugin_method__make_visible>`. +When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>` and made visible inside :ref:`_make_visible<class_EditorPlugin_private_method__make_visible>`. -Use :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` and :ref:`_get_plugin_icon<class_EditorPlugin_method__get_plugin_icon>` to customize the plugin button's appearance. +Use :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>` and :ref:`_get_plugin_icon<class_EditorPlugin_private_method__get_plugin_icon>` to customize the plugin button's appearance. :: @@ -932,7 +994,7 @@ Use :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` and :ref func _enter_tree(): plugin_control = preload("my_plugin_control.tscn").instantiate() - get_editor_interface().get_editor_main_screen().add_child(plugin_control) + EditorInterface.get_editor_main_screen().add_child(plugin_control) plugin_control.hide() func _has_main_screen(): @@ -945,17 +1007,17 @@ Use :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` and :ref return "My Super Cool Plugin 3000" func _get_plugin_icon(): - return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons") + return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons") .. rst-class:: classref-item-separator ---- -.. _class_EditorPlugin_method__make_visible: +.. _class_EditorPlugin_private_method__make_visible: .. rst-class:: classref-method -void **_make_visible** **(** :ref:`bool<class_bool>` visible **)** |virtual| +|void| **_make_visible**\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__make_visible>` This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. @@ -965,11 +1027,11 @@ Remember that you have to manage the visibility of all your editor controls manu ---- -.. _class_EditorPlugin_method__save_external_data: +.. _class_EditorPlugin_private_method__save_external_data: .. rst-class:: classref-method -void **_save_external_data** **(** **)** |virtual| +|void| **_save_external_data**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__save_external_data>` This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. @@ -977,15 +1039,15 @@ This method is called after the editor saves the project or when it's closed. It ---- -.. _class_EditorPlugin_method__set_state: +.. _class_EditorPlugin_private_method__set_state: .. rst-class:: classref-method -void **_set_state** **(** :ref:`Dictionary<class_Dictionary>` state **)** |virtual| +|void| **_set_state**\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_state>` -Restore the state saved by :ref:`_get_state<class_EditorPlugin_method__get_state>`. This method is called when the current scene tab is changed in the editor. +Restore the state saved by :ref:`_get_state<class_EditorPlugin_private_method__get_state>`. This method is called when the current scene tab is changed in the editor. -\ **Note:** Your plugin must implement :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>`, otherwise it will not be recognized and this method will not be called. +\ **Note:** Your plugin must implement :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>`, otherwise it will not be recognized and this method will not be called. :: @@ -997,13 +1059,13 @@ Restore the state saved by :ref:`_get_state<class_EditorPlugin_method__get_state ---- -.. _class_EditorPlugin_method__set_window_layout: +.. _class_EditorPlugin_private_method__set_window_layout: .. rst-class:: classref-method -void **_set_window_layout** **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| +|void| **_set_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_window_layout>` -Restore the plugin GUI layout and data saved by :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. +Restore the plugin GUI layout and data saved by :ref:`_get_window_layout<class_EditorPlugin_private_method__get_window_layout>`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. :: @@ -1019,7 +1081,7 @@ Restore the plugin GUI layout and data saved by :ref:`_get_window_layout<class_E .. rst-class:: classref-method -void **add_autoload_singleton** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` path **)** +|void| **add_autoload_singleton**\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_add_autoload_singleton>` Adds a script at ``path`` to the Autoload list as ``name``. @@ -1031,10 +1093,12 @@ Adds a script at ``path`` to the Autoload list as ``name``. .. rst-class:: classref-method -:ref:`Button<class_Button>` **add_control_to_bottom_panel** **(** :ref:`Control<class_Control>` control, :ref:`String<class_String>` title **)** +:ref:`Button<class_Button>` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_bottom_panel>` Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`. +Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. + .. rst-class:: classref-item-separator ---- @@ -1043,7 +1107,7 @@ Adds a control to the bottom panel (together with Output, Debug, Animation, etc) .. rst-class:: classref-method -void **add_control_to_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** +|void| **add_control_to_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_container>` Adds a custom control to a container (see :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`). There are many locations where custom controls can be added in the editor UI. @@ -1059,7 +1123,7 @@ When your plugin is deactivated, make sure to remove your custom control with :r .. rst-class:: classref-method -void **add_control_to_dock** **(** :ref:`DockSlot<enum_EditorPlugin_DockSlot>` slot, :ref:`Control<class_Control>` control **)** +|void| **add_control_to_dock**\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_dock>` Adds the control to a specific dock slot (see :ref:`DockSlot<enum_EditorPlugin_DockSlot>` for options). @@ -1067,6 +1131,8 @@ If the dock is repositioned and as long as the plugin is active, the editor will When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`. +Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. + .. rst-class:: classref-item-separator ---- @@ -1075,7 +1141,7 @@ When your plugin is deactivated, make sure to remove your custom control with :r .. rst-class:: classref-method -void **add_custom_type** **(** :ref:`String<class_String>` type, :ref:`String<class_String>` base, :ref:`Script<class_Script>` script, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **add_custom_type**\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_add_custom_type>` Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. @@ -1083,7 +1149,7 @@ When a given node or resource is selected, the base type will be instantiated (e \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. -You can use the virtual method :ref:`_handles<class_EditorPlugin_method__handles>` to check if your custom object is being edited by checking the script or using the ``is`` keyword. +You can use the virtual method :ref:`_handles<class_EditorPlugin_private_method__handles>` to check if your custom object is being edited by checking the script or using the ``is`` keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -1097,7 +1163,7 @@ During run-time, this will be a simple object with a script so this function doe .. rst-class:: classref-method -void **add_debugger_plugin** **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** +|void| **add_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_debugger_plugin>` Adds a :ref:`Script<class_Script>` as debugger plugin to the Debugger. The script must extend :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`. @@ -1109,7 +1175,7 @@ Adds a :ref:`Script<class_Script>` as debugger plugin to the Debugger. The scrip .. rst-class:: classref-method -void **add_export_plugin** **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** +|void| **add_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_plugin>` Registers a new :ref:`EditorExportPlugin<class_EditorExportPlugin>`. Export plugins are used to perform tasks when the project is being exported. @@ -1123,7 +1189,7 @@ See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` .. rst-class:: classref-method -void **add_import_plugin** **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer, :ref:`bool<class_bool>` first_priority=false **)** +|void| **add_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_import_plugin>` Registers a new :ref:`EditorImportPlugin<class_EditorImportPlugin>`. Import plugins are used to import custom and unsupported assets as a custom :ref:`Resource<class_Resource>` type. @@ -1141,7 +1207,7 @@ See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` .. rst-class:: classref-method -void **add_inspector_plugin** **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** +|void| **add_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_inspector_plugin>` Registers a new :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`. Inspector plugins are used to extend :ref:`EditorInspector<class_EditorInspector>` and provide custom configuration tools for your object's properties. @@ -1171,7 +1237,7 @@ Registers a new :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`. Inspe .. rst-class:: classref-method -void **add_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** +|void| **add_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_node_3d_gizmo_plugin>` Registers a new :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a :ref:`Node3D<class_Node3D>`. @@ -1185,7 +1251,7 @@ See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` .. rst-class:: classref-method -void **add_resource_conversion_plugin** **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** +|void| **add_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_resource_conversion_plugin>` Registers a new :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`. Resource conversion plugins are used to add custom resource converters to the editor inspector. @@ -1199,7 +1265,7 @@ See :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` .. rst-class:: classref-method -void **add_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer, :ref:`bool<class_bool>` first_priority=false **)** +|void| **add_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_format_importer_plugin>` Registers a new :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`. Scene importers are used to import custom 3D asset formats as scenes. @@ -1213,7 +1279,7 @@ If ``first_priority`` is ``true``, the new import plugin is inserted first in th .. rst-class:: classref-method -void **add_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin, :ref:`bool<class_bool>` first_priority=false **)** +|void| **add_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_post_import_plugin>` Add a :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. @@ -1227,7 +1293,7 @@ If ``first_priority`` is ``true``, the new import plugin is inserted first in th .. rst-class:: classref-method -void **add_tool_menu_item** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` callable **)** +|void| **add_tool_menu_item**\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_menu_item>` Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the provided ``callable`` will be called. @@ -1239,9 +1305,9 @@ Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the .. rst-class:: classref-method -void **add_tool_submenu_item** **(** :ref:`String<class_String>` name, :ref:`PopupMenu<class_PopupMenu>` submenu **)** +|void| **add_tool_submenu_item**\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_submenu_item>` -Adds a custom :ref:`PopupMenu<class_PopupMenu>` submenu under **Project > Tools >** ``name``. Use ``remove_tool_menu_item(name)`` on plugin clean up to remove the menu. +Adds a custom :ref:`PopupMenu<class_PopupMenu>` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>` on plugin clean up to remove the menu. .. rst-class:: classref-item-separator @@ -1251,7 +1317,7 @@ Adds a custom :ref:`PopupMenu<class_PopupMenu>` submenu under **Project > Tools .. rst-class:: classref-method -void **add_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** +|void| **add_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_translation_parser_plugin>` Registers a custom translation parser plugin for extracting translatable strings from custom files. @@ -1263,7 +1329,7 @@ Registers a custom translation parser plugin for extracting translatable strings .. rst-class:: classref-method -void **add_undo_redo_inspector_hook_callback** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **add_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>` Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. @@ -1277,9 +1343,11 @@ The callback should have 4 arguments: :ref:`Object<class_Object>` ``undo_redo``, .. rst-class:: classref-method -:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface** **(** **)** +:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_editor_interface>` -Returns the :ref:`EditorInterface<class_EditorInterface>` singleton. It provides access to some parts of the editor GUI as well as various inner states and tools. +**Deprecated:** :ref:`EditorInterface<class_EditorInterface>` is a global singleton and can be accessed directly by its name. + +Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance. .. rst-class:: classref-item-separator @@ -1289,7 +1357,7 @@ Returns the :ref:`EditorInterface<class_EditorInterface>` singleton. It provides .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu** **(** **)** +:ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_export_as_menu>` Returns the :ref:`PopupMenu<class_PopupMenu>` under **Scene > Export As...**. @@ -1297,11 +1365,23 @@ Returns the :ref:`PopupMenu<class_PopupMenu>` under **Scene > Export As...**. ---- +.. _class_EditorPlugin_method_get_plugin_version: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_plugin_version**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_get_plugin_version>` + +Provide the version of the plugin declared in the ``plugin.cfg`` config file. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_get_script_create_dialog: .. rst-class:: classref-method -:ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog** **(** **)** +:ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_script_create_dialog>` Gets the Editor's dialog used for making scripts. @@ -1317,7 +1397,7 @@ Gets the Editor's dialog used for making scripts. .. rst-class:: classref-method -:ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo** **(** **)** +:ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_undo_redo>` Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. @@ -1329,7 +1409,7 @@ Gets the undo/redo object. Most actions in the editor can be undoable, so use th .. rst-class:: classref-method -void **hide_bottom_panel** **(** **)** +|void| **hide_bottom_panel**\ (\ ) :ref:`🔗<class_EditorPlugin_method_hide_bottom_panel>` Minimizes the bottom panel. @@ -1341,7 +1421,7 @@ Minimizes the bottom panel. .. rst-class:: classref-method -void **make_bottom_panel_item_visible** **(** :ref:`Control<class_Control>` item **)** +|void| **make_bottom_panel_item_visible**\ (\ item\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_make_bottom_panel_item_visible>` Makes a specific item in the bottom panel visible. @@ -1353,7 +1433,7 @@ Makes a specific item in the bottom panel visible. .. rst-class:: classref-method -void **queue_save_layout** **(** **)** +|void| **queue_save_layout**\ (\ ) :ref:`🔗<class_EditorPlugin_method_queue_save_layout>` Queue save the project's editor layout. @@ -1365,7 +1445,7 @@ Queue save the project's editor layout. .. rst-class:: classref-method -void **remove_autoload_singleton** **(** :ref:`String<class_String>` name **)** +|void| **remove_autoload_singleton**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_autoload_singleton>` Removes an Autoload ``name`` from the list. @@ -1377,7 +1457,7 @@ Removes an Autoload ``name`` from the list. .. rst-class:: classref-method -void **remove_control_from_bottom_panel** **(** :ref:`Control<class_Control>` control **)** +|void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_bottom_panel>` Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control. @@ -1389,7 +1469,7 @@ Removes the control from the bottom panel. You have to manually :ref:`Node.queue .. rst-class:: classref-method -void **remove_control_from_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** +|void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_container>` Removes the control from the specified container. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control. @@ -1401,7 +1481,7 @@ Removes the control from the specified container. You have to manually :ref:`Nod .. rst-class:: classref-method -void **remove_control_from_docks** **(** :ref:`Control<class_Control>` control **)** +|void| **remove_control_from_docks**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_docks>` Removes the control from the dock. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control. @@ -1413,7 +1493,7 @@ Removes the control from the dock. You have to manually :ref:`Node.queue_free<cl .. rst-class:: classref-method -void **remove_custom_type** **(** :ref:`String<class_String>` type **)** +|void| **remove_custom_type**\ (\ type\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_custom_type>` Removes a custom type added by :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>`. @@ -1425,7 +1505,7 @@ Removes a custom type added by :ref:`add_custom_type<class_EditorPlugin_method_a .. rst-class:: classref-method -void **remove_debugger_plugin** **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** +|void| **remove_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_debugger_plugin>` Removes the debugger plugin with given script from the Debugger. @@ -1437,7 +1517,7 @@ Removes the debugger plugin with given script from the Debugger. .. rst-class:: classref-method -void **remove_export_plugin** **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** +|void| **remove_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_plugin>` Removes an export plugin registered by :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>`. @@ -1449,7 +1529,7 @@ Removes an export plugin registered by :ref:`add_export_plugin<class_EditorPlugi .. rst-class:: classref-method -void **remove_import_plugin** **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer **)** +|void| **remove_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_import_plugin>` Removes an import plugin registered by :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`. @@ -1461,7 +1541,7 @@ Removes an import plugin registered by :ref:`add_import_plugin<class_EditorPlugi .. rst-class:: classref-method -void **remove_inspector_plugin** **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** +|void| **remove_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_inspector_plugin>` Removes an inspector plugin registered by :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>` @@ -1473,7 +1553,7 @@ Removes an inspector plugin registered by :ref:`add_import_plugin<class_EditorPl .. rst-class:: classref-method -void **remove_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** +|void| **remove_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>` Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`. @@ -1485,7 +1565,7 @@ Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin<class_Editor .. rst-class:: classref-method -void **remove_resource_conversion_plugin** **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** +|void| **remove_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_resource_conversion_plugin>` Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>`. @@ -1497,7 +1577,7 @@ Removes a resource conversion plugin registered by :ref:`add_resource_conversion .. rst-class:: classref-method -void **remove_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer **)** +|void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_format_importer_plugin>` Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>`. @@ -1509,7 +1589,7 @@ Removes a scene format importer registered by :ref:`add_scene_format_importer_pl .. rst-class:: classref-method -void **remove_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin **)** +|void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_post_import_plugin>` Remove the :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, added with :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>`. @@ -1521,7 +1601,7 @@ Remove the :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` .. rst-class:: classref-method -void **remove_tool_menu_item** **(** :ref:`String<class_String>` name **)** +|void| **remove_tool_menu_item**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_tool_menu_item>` Removes a menu ``name`` from **Project > Tools**. @@ -1533,7 +1613,7 @@ Removes a menu ``name`` from **Project > Tools**. .. rst-class:: classref-method -void **remove_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** +|void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_translation_parser_plugin>` Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>`. @@ -1545,7 +1625,7 @@ Removes a custom translation parser plugin registered by :ref:`add_translation_p .. rst-class:: classref-method -void **remove_undo_redo_inspector_hook_callback** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>` Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`. @@ -1553,13 +1633,25 @@ Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callba ---- +.. _class_EditorPlugin_method_set_dock_tab_icon: + +.. rst-class:: classref-method + +|void| **set_dock_tab_icon**\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_set_dock_tab_icon>` + +Sets the tab icon for the given control in a dock slot. Setting to ``null`` removes the icon. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled: .. rst-class:: classref-method -void **set_force_draw_over_forwarding_enabled** **(** **)** +|void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>` -Enables calling of :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. +Enables calling of :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. .. rst-class:: classref-item-separator @@ -1569,9 +1661,9 @@ Enables calling of :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPl .. rst-class:: classref-method -void **set_input_event_forwarding_always_enabled** **(** **)** +|void| **set_input_event_forwarding_always_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>` -Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>`. It might be especially usable if your plugin will want to use raycast in the scene. +Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input<class_EditorPlugin_private_method__forward_3d_gui_input>`. It might be especially usable if your plugin will want to use raycast in the scene. .. rst-class:: classref-item-separator @@ -1581,9 +1673,9 @@ Use this method if you always want to receive inputs from 3D view screen inside .. rst-class:: classref-method -:ref:`int<class_int>` **update_overlays** **(** **)** |const| +:ref:`int<class_int>` **update_overlays**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_update_overlays>` -Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>`, :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>`, :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>` and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` to be called. +Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`, :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`, :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>` and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>` to be called. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1592,3 +1684,4 @@ Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_for .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index 14f354e12f4..5db52360bf6 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -53,23 +53,23 @@ Methods .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_read_only<class_EditorProperty_method__set_read_only>` **(** :ref:`bool<class_bool>` read_only **)** |virtual| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_property<class_EditorProperty_method__update_property>` **(** **)** |virtual| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_focusable<class_EditorProperty_method_add_focusable>` **(** :ref:`Control<class_Control>` control **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`emit_changed<class_EditorProperty_method_emit_changed>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value, :ref:`StringName<class_StringName>` field=&"", :ref:`bool<class_bool>` changing=false **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_edited_object<class_EditorProperty_method_get_edited_object>` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_edited_property<class_EditorProperty_method_get_edited_property>` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bottom_editor<class_EditorProperty_method_set_bottom_editor>` **(** :ref:`Control<class_Control>` editor **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_property<class_EditorProperty_method_update_property>` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_read_only<class_EditorProperty_private_method__set_read_only>`\ (\ read_only\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_update_property<class_EditorProperty_private_method__update_property>`\ (\ ) |virtual| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_focusable<class_EditorProperty_method_add_focusable>`\ (\ control\: :ref:`Control<class_Control>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit_changed<class_EditorProperty_method_emit_changed>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>` = &"", changing\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_edited_object<class_EditorProperty_method_get_edited_object>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_edited_property<class_EditorProperty_method_get_edited_property>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bottom_editor<class_EditorProperty_method_set_bottom_editor>`\ (\ editor\: :ref:`Control<class_Control>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_property<class_EditorProperty_method_update_property>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,9 +84,9 @@ Signals .. rst-class:: classref-signal -**multiple_properties_changed** **(** :ref:`PackedStringArray<class_PackedStringArray>` properties, :ref:`Array<class_Array>` value **)** +**multiple_properties_changed**\ (\ properties\: :ref:`PackedStringArray<class_PackedStringArray>`, value\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_EditorProperty_signal_multiple_properties_changed>` -Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property<class_EditorInspectorPlugin_method__parse_property>`. +Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property<class_EditorInspectorPlugin_private_method__parse_property>`. .. rst-class:: classref-item-separator @@ -96,7 +96,7 @@ Emit it if you want multiple properties modified at the same time. Do not use if .. rst-class:: classref-signal -**object_id_selected** **(** :ref:`StringName<class_StringName>` property, :ref:`int<class_int>` id **)** +**object_id_selected**\ (\ property\: :ref:`StringName<class_StringName>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorProperty_signal_object_id_selected>` Used by sub-inspectors. Emit it if what was selected was an Object ID. @@ -108,7 +108,7 @@ Used by sub-inspectors. Emit it if what was selected was an Object ID. .. rst-class:: classref-signal -**property_can_revert_changed** **(** :ref:`StringName<class_StringName>` property, :ref:`bool<class_bool>` can_revert **)** +**property_can_revert_changed**\ (\ property\: :ref:`StringName<class_StringName>`, can_revert\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorProperty_signal_property_can_revert_changed>` Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. @@ -120,7 +120,7 @@ Emitted when the revertability (i.e., whether it has a non-default value and thu .. rst-class:: classref-signal -**property_changed** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value, :ref:`StringName<class_StringName>` field, :ref:`bool<class_bool>` changing **)** +**property_changed**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>`, changing\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorProperty_signal_property_changed>` Do not emit this manually, use the :ref:`emit_changed<class_EditorProperty_method_emit_changed>` method instead. @@ -132,7 +132,7 @@ Do not emit this manually, use the :ref:`emit_changed<class_EditorProperty_metho .. rst-class:: classref-signal -**property_checked** **(** :ref:`StringName<class_StringName>` property, :ref:`bool<class_bool>` checked **)** +**property_checked**\ (\ property\: :ref:`StringName<class_StringName>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorProperty_signal_property_checked>` Emitted when a property was checked. Used internally. @@ -144,7 +144,7 @@ Emitted when a property was checked. Used internally. .. rst-class:: classref-signal -**property_deleted** **(** :ref:`StringName<class_StringName>` property **)** +**property_deleted**\ (\ property\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EditorProperty_signal_property_deleted>` Emitted when a property was deleted. Used internally. @@ -156,7 +156,7 @@ Emitted when a property was deleted. Used internally. .. rst-class:: classref-signal -**property_keyed** **(** :ref:`StringName<class_StringName>` property **)** +**property_keyed**\ (\ property\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EditorProperty_signal_property_keyed>` Emit it if you want to add this value as an animation key (check for keying being enabled first). @@ -168,7 +168,7 @@ Emit it if you want to add this value as an animation key (check for keying bein .. rst-class:: classref-signal -**property_keyed_with_value** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +**property_keyed_with_value**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorProperty_signal_property_keyed_with_value>` Emit it if you want to key a property with a single value. @@ -180,7 +180,7 @@ Emit it if you want to key a property with a single value. .. rst-class:: classref-signal -**property_pinned** **(** :ref:`StringName<class_StringName>` property, :ref:`bool<class_bool>` pinned **)** +**property_pinned**\ (\ property\: :ref:`StringName<class_StringName>`, pinned\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorProperty_signal_property_pinned>` Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. @@ -194,7 +194,7 @@ The default value is the one the property will get when the node is just instant .. rst-class:: classref-signal -**resource_selected** **(** :ref:`String<class_String>` path, :ref:`Resource<class_Resource>` resource **)** +**resource_selected**\ (\ path\: :ref:`String<class_String>`, resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorProperty_signal_resource_selected>` If you want a sub-resource to be edited, emit this signal with the resource. @@ -206,7 +206,7 @@ If you want a sub-resource to be edited, emit this signal with the resource. .. rst-class:: classref-signal -**selected** **(** :ref:`String<class_String>` path, :ref:`int<class_int>` focusable_idx **)** +**selected**\ (\ path\: :ref:`String<class_String>`, focusable_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorProperty_signal_selected>` Emitted when selected. Used internally. @@ -223,12 +223,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **checkable** = ``false`` +:ref:`bool<class_bool>` **checkable** = ``false`` :ref:`🔗<class_EditorProperty_property_checkable>` .. rst-class:: classref-property-setget -- void **set_checkable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_checkable** **(** **)** +- |void| **set_checkable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_checkable**\ (\ ) Used by the inspector, set to ``true`` when the property is checkable. @@ -240,12 +240,12 @@ Used by the inspector, set to ``true`` when the property is checkable. .. rst-class:: classref-property -:ref:`bool<class_bool>` **checked** = ``false`` +:ref:`bool<class_bool>` **checked** = ``false`` :ref:`🔗<class_EditorProperty_property_checked>` .. rst-class:: classref-property-setget -- void **set_checked** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_checked** **(** **)** +- |void| **set_checked**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_checked**\ (\ ) Used by the inspector, set to ``true`` when the property is checked. @@ -257,12 +257,12 @@ Used by the inspector, set to ``true`` when the property is checked. .. rst-class:: classref-property -:ref:`bool<class_bool>` **deletable** = ``false`` +:ref:`bool<class_bool>` **deletable** = ``false`` :ref:`🔗<class_EditorProperty_property_deletable>` .. rst-class:: classref-property-setget -- void **set_deletable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_deletable** **(** **)** +- |void| **set_deletable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_deletable**\ (\ ) Used by the inspector, set to ``true`` when the property can be deleted by the user. @@ -274,12 +274,12 @@ Used by the inspector, set to ``true`` when the property can be deleted by the u .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_warning** = ``false`` +:ref:`bool<class_bool>` **draw_warning** = ``false`` :ref:`🔗<class_EditorProperty_property_draw_warning>` .. rst-class:: classref-property-setget -- void **set_draw_warning** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_draw_warning** **(** **)** +- |void| **set_draw_warning**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_draw_warning**\ (\ ) Used by the inspector, set to ``true`` when the property is drawn with the editor theme's warning color. This is used for editable children's properties. @@ -291,12 +291,12 @@ Used by the inspector, set to ``true`` when the property is drawn with the edito .. rst-class:: classref-property -:ref:`bool<class_bool>` **keying** = ``false`` +:ref:`bool<class_bool>` **keying** = ``false`` :ref:`🔗<class_EditorProperty_property_keying>` .. rst-class:: classref-property-setget -- void **set_keying** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_keying** **(** **)** +- |void| **set_keying**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_keying**\ (\ ) Used by the inspector, set to ``true`` when the property can add keys for animation. @@ -308,12 +308,12 @@ Used by the inspector, set to ``true`` when the property can add keys for animat .. rst-class:: classref-property -:ref:`String<class_String>` **label** = ``""`` +:ref:`String<class_String>` **label** = ``""`` :ref:`🔗<class_EditorProperty_property_label>` .. rst-class:: classref-property-setget -- void **set_label** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_label** **(** **)** +- |void| **set_label**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_label**\ (\ ) Set this property to change the label (if you want to show one). @@ -325,12 +325,12 @@ Set this property to change the label (if you want to show one). .. rst-class:: classref-property -:ref:`bool<class_bool>` **read_only** = ``false`` +:ref:`bool<class_bool>` **read_only** = ``false`` :ref:`🔗<class_EditorProperty_property_read_only>` .. rst-class:: classref-property-setget -- void **set_read_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_read_only** **(** **)** +- |void| **set_read_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_read_only**\ (\ ) Used by the inspector, set to ``true`` when the property is read-only. @@ -343,11 +343,11 @@ Used by the inspector, set to ``true`` when the property is read-only. Method Descriptions ------------------- -.. _class_EditorProperty_method__set_read_only: +.. _class_EditorProperty_private_method__set_read_only: .. rst-class:: classref-method -void **_set_read_only** **(** :ref:`bool<class_bool>` read_only **)** |virtual| +|void| **_set_read_only**\ (\ read_only\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorProperty_private_method__set_read_only>` Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state. @@ -355,11 +355,11 @@ Called when the read-only status of the property is changed. It may be used to c ---- -.. _class_EditorProperty_method__update_property: +.. _class_EditorProperty_private_method__update_property: .. rst-class:: classref-method -void **_update_property** **(** **)** |virtual| +|void| **_update_property**\ (\ ) |virtual| :ref:`🔗<class_EditorProperty_private_method__update_property>` When this virtual function is called, you must update your editor. @@ -371,7 +371,7 @@ When this virtual function is called, you must update your editor. .. rst-class:: classref-method -void **add_focusable** **(** :ref:`Control<class_Control>` control **)** +|void| **add_focusable**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorProperty_method_add_focusable>` If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed. @@ -383,7 +383,7 @@ If any of the controls added can gain keyboard focus, add it here. This ensures .. rst-class:: classref-method -void **emit_changed** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value, :ref:`StringName<class_StringName>` field=&"", :ref:`bool<class_bool>` changing=false **)** +|void| **emit_changed**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, field\: :ref:`StringName<class_StringName>` = &"", changing\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorProperty_method_emit_changed>` If one or several properties have changed, this must be called. ``field`` is used in case your editor can modify fields separately (as an example, Vector3.x). The ``changing`` argument avoids the editor requesting this property to be refreshed (leave as ``false`` if unsure). @@ -395,7 +395,7 @@ If one or several properties have changed, this must be called. ``field`` is use .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_edited_object** **(** **)** +:ref:`Object<class_Object>` **get_edited_object**\ (\ ) :ref:`🔗<class_EditorProperty_method_get_edited_object>` Gets the edited object. @@ -407,9 +407,9 @@ Gets the edited object. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_edited_property** **(** **)** |const| +:ref:`StringName<class_StringName>` **get_edited_property**\ (\ ) |const| :ref:`🔗<class_EditorProperty_method_get_edited_property>` -Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property<class_EditorInspectorPlugin_method__parse_property>`), then this will return the property. +Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property<class_EditorInspectorPlugin_private_method__parse_property>`), then this will return the property. .. rst-class:: classref-item-separator @@ -419,7 +419,7 @@ Gets the edited property. If your editor is for a single property (added via :re .. rst-class:: classref-method -void **set_bottom_editor** **(** :ref:`Control<class_Control>` editor **)** +|void| **set_bottom_editor**\ (\ editor\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorProperty_method_set_bottom_editor>` Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child<class_Node_method_add_child>`. @@ -431,7 +431,7 @@ Puts the ``editor`` control below the property label. The control must be previo .. rst-class:: classref-method -void **update_property** **(** **)** +|void| **update_property**\ (\ ) :ref:`🔗<class_EditorProperty_method_update_property>` Forces refresh of the property display. @@ -442,3 +442,4 @@ Forces refresh of the property display. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index 244d3a8cedb..eb8c0d43c64 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -53,13 +53,13 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`_convert<class_EditorResourceConversionPlugin_method__convert>` **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_converts_to<class_EditorResourceConversionPlugin_method__converts_to>` **(** **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourceConversionPlugin_method__handles>` **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`_convert<class_EditorResourceConversionPlugin_private_method__convert>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_converts_to<class_EditorResourceConversionPlugin_private_method__converts_to>`\ (\ ) |virtual| |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourceConversionPlugin_private_method__handles>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,23 +70,23 @@ Methods Method Descriptions ------------------- -.. _class_EditorResourceConversionPlugin_method__convert: +.. _class_EditorResourceConversionPlugin_private_method__convert: .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **_convert** **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| +:ref:`Resource<class_Resource>` **_convert**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourceConversionPlugin_private_method__convert>` -Takes an input :ref:`Resource<class_Resource>` and converts it to the type given in :ref:`_converts_to<class_EditorResourceConversionPlugin_method__converts_to>`. The returned :ref:`Resource<class_Resource>` is the result of the conversion, and the input :ref:`Resource<class_Resource>` remains unchanged. +Takes an input :ref:`Resource<class_Resource>` and converts it to the type given in :ref:`_converts_to<class_EditorResourceConversionPlugin_private_method__converts_to>`. The returned :ref:`Resource<class_Resource>` is the result of the conversion, and the input :ref:`Resource<class_Resource>` remains unchanged. .. rst-class:: classref-item-separator ---- -.. _class_EditorResourceConversionPlugin_method__converts_to: +.. _class_EditorResourceConversionPlugin_private_method__converts_to: .. rst-class:: classref-method -:ref:`String<class_String>` **_converts_to** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_converts_to**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorResourceConversionPlugin_private_method__converts_to>` Returns the class name of the target type of :ref:`Resource<class_Resource>` that this plugin converts source resources to. @@ -94,11 +94,11 @@ Returns the class name of the target type of :ref:`Resource<class_Resource>` tha ---- -.. _class_EditorResourceConversionPlugin_method__handles: +.. _class_EditorResourceConversionPlugin_private_method__handles: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles** **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourceConversionPlugin_private_method__handles>` Called to determine whether a particular :ref:`Resource<class_Resource>` can be converted to the target resource type by this plugin. @@ -109,3 +109,4 @@ Called to determine whether a particular :ref:`Resource<class_Resource>` can be .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index 411c23f1cbf..01e8ff525ff 100644 --- a/classes/class_editorresourcepicker.rst +++ b/classes/class_editorresourcepicker.rst @@ -51,15 +51,15 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handle_menu_selected<class_EditorResourcePicker_method__handle_menu_selected>` **(** :ref:`int<class_int>` id **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_create_options<class_EditorResourcePicker_method__set_create_options>` **(** :ref:`Object<class_Object>` menu_node **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_allowed_types<class_EditorResourcePicker_method_get_allowed_types>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_toggle_pressed<class_EditorResourcePicker_method_set_toggle_pressed>` **(** :ref:`bool<class_bool>` pressed **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handle_menu_selected<class_EditorResourcePicker_private_method__handle_menu_selected>`\ (\ id\: :ref:`int<class_int>`\ ) |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_create_options<class_EditorResourcePicker_private_method__set_create_options>`\ (\ menu_node\: :ref:`Object<class_Object>`\ ) |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_allowed_types<class_EditorResourcePicker_method_get_allowed_types>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_toggle_pressed<class_EditorResourcePicker_method_set_toggle_pressed>`\ (\ pressed\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,7 +74,7 @@ Signals .. rst-class:: classref-signal -**resource_changed** **(** :ref:`Resource<class_Resource>` resource **)** +**resource_changed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorResourcePicker_signal_resource_changed>` Emitted when the value of the edited resource was changed. @@ -86,7 +86,7 @@ Emitted when the value of the edited resource was changed. .. rst-class:: classref-signal -**resource_selected** **(** :ref:`Resource<class_Resource>` resource, :ref:`bool<class_bool>` inspect **)** +**resource_selected**\ (\ resource\: :ref:`Resource<class_Resource>`, inspect\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorResourcePicker_signal_resource_selected>` Emitted when the resource value was set and user clicked to edit it. When ``inspect`` is ``true``, the signal was caused by the context menu "Edit" or "Inspect" option. @@ -103,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **base_type** = ``""`` +:ref:`String<class_String>` **base_type** = ``""`` :ref:`🔗<class_EditorResourcePicker_property_base_type>` .. rst-class:: classref-property-setget -- void **set_base_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_base_type** **(** **)** +- |void| **set_base_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_base_type**\ (\ ) The base type of allowed resource types. Can be a comma-separated list of several options. @@ -120,12 +120,12 @@ The base type of allowed resource types. Can be a comma-separated list of severa .. rst-class:: classref-property -:ref:`bool<class_bool>` **editable** = ``true`` +:ref:`bool<class_bool>` **editable** = ``true`` :ref:`🔗<class_EditorResourcePicker_property_editable>` .. rst-class:: classref-property-setget -- void **set_editable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editable** **(** **)** +- |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editable**\ (\ ) If ``true``, the value can be selected and edited. @@ -137,12 +137,12 @@ If ``true``, the value can be selected and edited. .. rst-class:: classref-property -:ref:`Resource<class_Resource>` **edited_resource** +:ref:`Resource<class_Resource>` **edited_resource** :ref:`🔗<class_EditorResourcePicker_property_edited_resource>` .. rst-class:: classref-property-setget -- void **set_edited_resource** **(** :ref:`Resource<class_Resource>` value **)** -- :ref:`Resource<class_Resource>` **get_edited_resource** **(** **)** +- |void| **set_edited_resource**\ (\ value\: :ref:`Resource<class_Resource>`\ ) +- :ref:`Resource<class_Resource>` **get_edited_resource**\ (\ ) The edited resource value. @@ -154,12 +154,12 @@ The edited resource value. .. rst-class:: classref-property -:ref:`bool<class_bool>` **toggle_mode** = ``false`` +:ref:`bool<class_bool>` **toggle_mode** = ``false`` :ref:`🔗<class_EditorResourcePicker_property_toggle_mode>` .. rst-class:: classref-property-setget -- void **set_toggle_mode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_toggle_mode** **(** **)** +- |void| **set_toggle_mode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_toggle_mode**\ (\ ) If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed<class_EditorResourcePicker_method_set_toggle_pressed>` to manually set the state. @@ -172,27 +172,27 @@ If ``true``, the main button with the resource preview works in the toggle mode. Method Descriptions ------------------- -.. _class_EditorResourcePicker_method__handle_menu_selected: +.. _class_EditorResourcePicker_private_method__handle_menu_selected: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handle_menu_selected** **(** :ref:`int<class_int>` id **)** |virtual| +:ref:`bool<class_bool>` **_handle_menu_selected**\ (\ id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_EditorResourcePicker_private_method__handle_menu_selected>` -This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options<class_EditorResourcePicker_method__set_create_options>`. +This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options<class_EditorResourcePicker_private_method__set_create_options>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePicker_method__set_create_options: +.. _class_EditorResourcePicker_private_method__set_create_options: .. rst-class:: classref-method -void **_set_create_options** **(** :ref:`Object<class_Object>` menu_node **)** |virtual| +|void| **_set_create_options**\ (\ menu_node\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorResourcePicker_private_method__set_create_options>` This virtual method is called when updating the context menu of **EditorResourcePicker**. Implement this method to override the "New ..." items with your own options. ``menu_node`` is a reference to the :ref:`PopupMenu<class_PopupMenu>` node. -\ **Note:** Implement :ref:`_handle_menu_selected<class_EditorResourcePicker_method__handle_menu_selected>` to handle these custom items. +\ **Note:** Implement :ref:`_handle_menu_selected<class_EditorResourcePicker_private_method__handle_menu_selected>` to handle these custom items. .. rst-class:: classref-item-separator @@ -202,7 +202,7 @@ This virtual method is called when updating the context menu of **EditorResource .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_allowed_types** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_allowed_types**\ (\ ) |const| :ref:`🔗<class_EditorResourcePicker_method_get_allowed_types>` Returns a list of all allowed types and subtypes corresponding to the :ref:`base_type<class_EditorResourcePicker_property_base_type>`. If the :ref:`base_type<class_EditorResourcePicker_property_base_type>` is empty, an empty list is returned. @@ -214,7 +214,7 @@ Returns a list of all allowed types and subtypes corresponding to the :ref:`base .. rst-class:: classref-method -void **set_toggle_pressed** **(** :ref:`bool<class_bool>` pressed **)** +|void| **set_toggle_pressed**\ (\ pressed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorResourcePicker_method_set_toggle_pressed>` Sets the toggle mode state for the main button. Works only if :ref:`toggle_mode<class_EditorResourcePicker_property_toggle_mode>` is set to ``true``. @@ -225,3 +225,4 @@ Sets the toggle mode state for the main button. Works only if :ref:`toggle_mode< .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index 9baa8502ece..0cf95c7fddf 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -19,7 +19,7 @@ A node used to generate previews of resources or files. Description ----------- -This node is used to generate previews for resources of files. +This node is used to generate previews for resources or files. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`. @@ -31,17 +31,17 @@ Methods .. table:: :widths: auto - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_preview_generator<class_EditorResourcePreview_method_add_preview_generator>` **(** :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`check_for_invalidation<class_EditorResourcePreview_method_check_for_invalidation>` **(** :ref:`String<class_String>` path **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_edited_resource_preview<class_EditorResourcePreview_method_queue_edited_resource_preview>` **(** :ref:`Resource<class_Resource>` resource, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_resource_preview<class_EditorResourcePreview_method_queue_resource_preview>` **(** :ref:`String<class_String>` path, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_preview_generator<class_EditorResourcePreview_method_remove_preview_generator>` **(** :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_preview_generator<class_EditorResourcePreview_method_add_preview_generator>`\ (\ generator\: :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`check_for_invalidation<class_EditorResourcePreview_method_check_for_invalidation>`\ (\ path\: :ref:`String<class_String>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_edited_resource_preview<class_EditorResourcePreview_method_queue_edited_resource_preview>`\ (\ resource\: :ref:`Resource<class_Resource>`, receiver\: :ref:`Object<class_Object>`, receiver_func\: :ref:`StringName<class_StringName>`, userdata\: :ref:`Variant<class_Variant>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_resource_preview<class_EditorResourcePreview_method_queue_resource_preview>`\ (\ path\: :ref:`String<class_String>`, receiver\: :ref:`Object<class_Object>`, receiver_func\: :ref:`StringName<class_StringName>`, userdata\: :ref:`Variant<class_Variant>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_preview_generator<class_EditorResourcePreview_method_remove_preview_generator>`\ (\ generator\: :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,7 +56,7 @@ Signals .. rst-class:: classref-signal -**preview_invalidated** **(** :ref:`String<class_String>` path **)** +**preview_invalidated**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorResourcePreview_signal_preview_invalidated>` Emitted if a preview was invalidated (changed). ``path`` corresponds to the path of the preview. @@ -73,7 +73,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_preview_generator** **(** :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator **)** +|void| **add_preview_generator**\ (\ generator\: :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`\ ) :ref:`🔗<class_EditorResourcePreview_method_add_preview_generator>` Create an own, custom preview generator. @@ -85,7 +85,7 @@ Create an own, custom preview generator. .. rst-class:: classref-method -void **check_for_invalidation** **(** :ref:`String<class_String>` path **)** +|void| **check_for_invalidation**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorResourcePreview_method_check_for_invalidation>` Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. @@ -97,7 +97,7 @@ Check if the resource changed, if so, it will be invalidated and the correspondi .. rst-class:: classref-method -void **queue_edited_resource_preview** **(** :ref:`Resource<class_Resource>` resource, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata **)** +|void| **queue_edited_resource_preview**\ (\ resource\: :ref:`Resource<class_Resource>`, receiver\: :ref:`Object<class_Object>`, receiver_func\: :ref:`StringName<class_StringName>`, userdata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorResourcePreview_method_queue_edited_resource_preview>` Queue the ``resource`` being edited for preview. Once the preview is ready, the ``receiver``'s ``receiver_func`` will be called. The ``receiver_func`` must take the following four arguments: :ref:`String<class_String>` path, :ref:`Texture2D<class_Texture2D>` preview, :ref:`Texture2D<class_Texture2D>` thumbnail_preview, :ref:`Variant<class_Variant>` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called. @@ -111,7 +111,7 @@ Queue the ``resource`` being edited for preview. Once the preview is ready, the .. rst-class:: classref-method -void **queue_resource_preview** **(** :ref:`String<class_String>` path, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` receiver_func, :ref:`Variant<class_Variant>` userdata **)** +|void| **queue_resource_preview**\ (\ path\: :ref:`String<class_String>`, receiver\: :ref:`Object<class_Object>`, receiver_func\: :ref:`StringName<class_StringName>`, userdata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorResourcePreview_method_queue_resource_preview>` Queue a resource file located at ``path`` for preview. Once the preview is ready, the ``receiver``'s ``receiver_func`` will be called. The ``receiver_func`` must take the following four arguments: :ref:`String<class_String>` path, :ref:`Texture2D<class_Texture2D>` preview, :ref:`Texture2D<class_Texture2D>` thumbnail_preview, :ref:`Variant<class_Variant>` userdata. ``userdata`` can be anything, and will be returned when ``receiver_func`` is called. @@ -125,7 +125,7 @@ Queue a resource file located at ``path`` for preview. Once the preview is ready .. rst-class:: classref-method -void **remove_preview_generator** **(** :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>` generator **)** +|void| **remove_preview_generator**\ (\ generator\: :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`\ ) :ref:`🔗<class_EditorResourcePreview_method_remove_preview_generator>` Removes a custom preview generator. @@ -136,3 +136,4 @@ Removes a custom preview generator. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 546c4788ef7..6229916f434 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -29,17 +29,17 @@ Methods .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_generate_small_preview<class_EditorResourcePreviewGenerator_method__can_generate_small_preview>` **(** **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`_generate<class_EditorResourcePreviewGenerator_method__generate>` **(** :ref:`Resource<class_Resource>` resource, :ref:`Vector2i<class_Vector2i>` size, :ref:`Dictionary<class_Dictionary>` metadata **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_method__generate_from_path>` **(** :ref:`String<class_String>` path, :ref:`Vector2i<class_Vector2i>` size, :ref:`Dictionary<class_Dictionary>` metadata **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_generate_small_preview_automatically<class_EditorResourcePreviewGenerator_method__generate_small_preview_automatically>` **(** **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourcePreviewGenerator_method__handles>` **(** :ref:`String<class_String>` type **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_generate_small_preview<class_EditorResourcePreviewGenerator_private_method__can_generate_small_preview>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`_generate<class_EditorResourcePreviewGenerator_private_method__generate>`\ (\ resource\: :ref:`Resource<class_Resource>`, size\: :ref:`Vector2i<class_Vector2i>`, metadata\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_private_method__generate_from_path>`\ (\ path\: :ref:`String<class_String>`, size\: :ref:`Vector2i<class_Vector2i>`, metadata\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_generate_small_preview_automatically<class_EditorResourcePreviewGenerator_private_method__generate_small_preview_automatically>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourcePreviewGenerator_private_method__handles>`\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,13 +50,13 @@ Methods Method Descriptions ------------------- -.. _class_EditorResourcePreviewGenerator_method__can_generate_small_preview: +.. _class_EditorResourcePreviewGenerator_private_method__can_generate_small_preview: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_generate_small_preview** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_generate_small_preview**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorResourcePreviewGenerator_private_method__can_generate_small_preview>` -If this function returns ``true``, the generator will call :ref:`_generate<class_EditorResourcePreviewGenerator_method__generate>` or :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_method__generate_from_path>` for small previews as well. +If this function returns ``true``, the generator will call :ref:`_generate<class_EditorResourcePreviewGenerator_private_method__generate>` or :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_private_method__generate_from_path>` for small previews as well. By default, it returns ``false``. @@ -64,11 +64,11 @@ By default, it returns ``false``. ---- -.. _class_EditorResourcePreviewGenerator_method__generate: +.. _class_EditorResourcePreviewGenerator_private_method__generate: .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **_generate** **(** :ref:`Resource<class_Resource>` resource, :ref:`Vector2i<class_Vector2i>` size, :ref:`Dictionary<class_Dictionary>` metadata **)** |virtual| |const| +:ref:`Texture2D<class_Texture2D>` **_generate**\ (\ resource\: :ref:`Resource<class_Resource>`, size\: :ref:`Vector2i<class_Vector2i>`, metadata\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourcePreviewGenerator_private_method__generate>` Generate a preview from a given resource with the specified size. This must always be implemented. @@ -76,37 +76,37 @@ Returning an empty texture is an OK way to fail and let another generator take c Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path<class_EditorResourceTooltipPlugin_method__make_tooltip_for_path>` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path<class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path>` (like image size, sample length etc.). .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePreviewGenerator_method__generate_from_path: +.. _class_EditorResourcePreviewGenerator_private_method__generate_from_path: .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **_generate_from_path** **(** :ref:`String<class_String>` path, :ref:`Vector2i<class_Vector2i>` size, :ref:`Dictionary<class_Dictionary>` metadata **)** |virtual| |const| +:ref:`Texture2D<class_Texture2D>` **_generate_from_path**\ (\ path\: :ref:`String<class_String>`, size\: :ref:`Vector2i<class_Vector2i>`, metadata\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourcePreviewGenerator_private_method__generate_from_path>` -Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate<class_EditorResourcePreviewGenerator_method__generate>`. +Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate<class_EditorResourcePreviewGenerator_private_method__generate>`. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path<class_EditorResourceTooltipPlugin_method__make_tooltip_for_path>` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path<class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path>` (like image size, sample length etc.). .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePreviewGenerator_method__generate_small_preview_automatically: +.. _class_EditorResourcePreviewGenerator_private_method__generate_small_preview_automatically: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_generate_small_preview_automatically** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_generate_small_preview_automatically**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorResourcePreviewGenerator_private_method__generate_small_preview_automatically>` -If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate<class_EditorResourcePreviewGenerator_method__generate>` or :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_method__generate_from_path>`. +If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate<class_EditorResourcePreviewGenerator_private_method__generate>` or :ref:`_generate_from_path<class_EditorResourcePreviewGenerator_private_method__generate_from_path>`. By default, it returns ``false``. @@ -114,11 +114,11 @@ By default, it returns ``false``. ---- -.. _class_EditorResourcePreviewGenerator_method__handles: +.. _class_EditorResourcePreviewGenerator_private_method__handles: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles** **(** :ref:`String<class_String>` type **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles**\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourcePreviewGenerator_private_method__handles>` Returns ``true`` if your generator supports the resource of type ``type``. @@ -129,3 +129,4 @@ Returns ``true`` if your generator supports the resource of type ``type``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst index afe1b0fa77c..47bf830134f 100644 --- a/classes/class_editorresourcetooltipplugin.rst +++ b/classes/class_editorresourcetooltipplugin.rst @@ -21,7 +21,7 @@ Description Resource tooltip plugins are used by :ref:`FileSystemDock<class_FileSystemDock>` to generate customized tooltips for specific resources. E.g. tooltip for a :ref:`Texture2D<class_Texture2D>` displays a bigger preview and the texture's dimensions. -A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin<class_FileSystemDock_method_add_resource_tooltip_plugin>`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path<class_EditorResourceTooltipPlugin_method__make_tooltip_for_path>` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip<class_Control_method__make_custom_tooltip>`. +A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin<class_FileSystemDock_method_add_resource_tooltip_plugin>`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path<class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path>` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip<class_Control_private_method__make_custom_tooltip>`. .. rst-class:: classref-reftable-group @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourceTooltipPlugin_method__handles>` **(** :ref:`String<class_String>` type **)** |virtual| |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`_make_tooltip_for_path<class_EditorResourceTooltipPlugin_method__make_tooltip_for_path>` **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` metadata, :ref:`Control<class_Control>` base **)** |virtual| |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_thumbnail<class_EditorResourceTooltipPlugin_method_request_thumbnail>` **(** :ref:`String<class_String>` path, :ref:`TextureRect<class_TextureRect>` control **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorResourceTooltipPlugin_private_method__handles>`\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`_make_tooltip_for_path<class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path>`\ (\ path\: :ref:`String<class_String>`, metadata\: :ref:`Dictionary<class_Dictionary>`, base\: :ref:`Control<class_Control>`\ ) |virtual| |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_thumbnail<class_EditorResourceTooltipPlugin_method_request_thumbnail>`\ (\ path\: :ref:`String<class_String>`, control\: :ref:`TextureRect<class_TextureRect>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,11 +48,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorResourceTooltipPlugin_method__handles: +.. _class_EditorResourceTooltipPlugin_private_method__handles: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles** **(** :ref:`String<class_String>` type **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles**\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourceTooltipPlugin_private_method__handles>` Return ``true`` if the plugin is going to handle the given :ref:`Resource<class_Resource>` ``type``. @@ -60,15 +60,15 @@ Return ``true`` if the plugin is going to handle the given :ref:`Resource<class_ ---- -.. _class_EditorResourceTooltipPlugin_method__make_tooltip_for_path: +.. _class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path: .. rst-class:: classref-method -:ref:`Control<class_Control>` **_make_tooltip_for_path** **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` metadata, :ref:`Control<class_Control>` base **)** |virtual| |const| +:ref:`Control<class_Control>` **_make_tooltip_for_path**\ (\ path\: :ref:`String<class_String>`, metadata\: :ref:`Dictionary<class_Dictionary>`, base\: :ref:`Control<class_Control>`\ ) |virtual| |const| :ref:`🔗<class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path>` Create and return a tooltip that will be displayed when the user hovers a resource under the given ``path`` in filesystem dock. -The ``metadata`` dictionary is provided by preview generator (see method EditorResourcePreviewGenerator._generate]). +The ``metadata`` dictionary is provided by preview generator (see :ref:`EditorResourcePreviewGenerator._generate<class_EditorResourcePreviewGenerator_private_method__generate>`). \ ``base`` is the base default tooltip, which is a :ref:`VBoxContainer<class_VBoxContainer>` with a file name, type and size labels. If another plugin handled the same file type, ``base`` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned :ref:`Control<class_Control>`. @@ -92,7 +92,7 @@ The ``metadata`` dictionary is provided by preview generator (see method EditorR .. rst-class:: classref-method -void **request_thumbnail** **(** :ref:`String<class_String>` path, :ref:`TextureRect<class_TextureRect>` control **)** |const| +|void| **request_thumbnail**\ (\ path\: :ref:`String<class_String>`, control\: :ref:`TextureRect<class_TextureRect>`\ ) |const| :ref:`🔗<class_EditorResourceTooltipPlugin_method_request_thumbnail>` Requests a thumbnail for the given :ref:`TextureRect<class_TextureRect>`. The thumbnail is created asynchronously by :ref:`EditorResourcePreview<class_EditorResourcePreview>` and automatically set when available. @@ -103,3 +103,4 @@ Requests a thumbnail for the given :ref:`TextureRect<class_TextureRect>`. The th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index 9845090ddd8..552e8ea7db7 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -12,7 +12,7 @@ EditorSceneFormatImporter **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`EditorSceneFormatImporterBlend<class_EditorSceneFormatImporterBlend>`, :ref:`EditorSceneFormatImporterFBX<class_EditorSceneFormatImporterFBX>`, :ref:`EditorSceneFormatImporterGLTF<class_EditorSceneFormatImporterGLTF>` +**Inherited By:** :ref:`EditorSceneFormatImporterBlend<class_EditorSceneFormatImporterBlend>`, :ref:`EditorSceneFormatImporterFBX2GLTF<class_EditorSceneFormatImporterFBX2GLTF>`, :ref:`EditorSceneFormatImporterGLTF<class_EditorSceneFormatImporterGLTF>`, :ref:`EditorSceneFormatImporterUFBX<class_EditorSceneFormatImporterUFBX>` Imports scenes from third-parties' 3D files. @@ -33,17 +33,17 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_extensions<class_EditorSceneFormatImporter_method__get_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_import_flags<class_EditorSceneFormatImporter_method__get_import_flags>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_import_options<class_EditorSceneFormatImporter_method__get_import_options>` **(** :ref:`String<class_String>` path **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_option_visibility<class_EditorSceneFormatImporter_method__get_option_visibility>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`_import_scene<class_EditorSceneFormatImporter_method__import_scene>` **(** :ref:`String<class_String>` path, :ref:`int<class_int>` flags, :ref:`Dictionary<class_Dictionary>` options **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_extensions<class_EditorSceneFormatImporter_private_method__get_extensions>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_import_flags<class_EditorSceneFormatImporter_private_method__get_import_flags>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_get_import_options<class_EditorSceneFormatImporter_private_method__get_import_options>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_option_visibility<class_EditorSceneFormatImporter_private_method__get_option_visibility>`\ (\ path\: :ref:`String<class_String>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`_import_scene<class_EditorSceneFormatImporter_private_method__import_scene>`\ (\ path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`, options\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,11 @@ Constants .. rst-class:: classref-constant -**IMPORT_SCENE** = ``1`` +**IMPORT_SCENE** = ``1`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_SCENE>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -66,7 +70,11 @@ Constants .. rst-class:: classref-constant -**IMPORT_ANIMATION** = ``2`` +**IMPORT_ANIMATION** = ``2`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_ANIMATION>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -74,7 +82,11 @@ Constants .. rst-class:: classref-constant -**IMPORT_FAIL_ON_MISSING_DEPENDENCIES** = ``4`` +**IMPORT_FAIL_ON_MISSING_DEPENDENCIES** = ``4`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_FAIL_ON_MISSING_DEPENDENCIES>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -82,7 +94,11 @@ Constants .. rst-class:: classref-constant -**IMPORT_GENERATE_TANGENT_ARRAYS** = ``8`` +**IMPORT_GENERATE_TANGENT_ARRAYS** = ``8`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_GENERATE_TANGENT_ARRAYS>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -90,7 +106,11 @@ Constants .. rst-class:: classref-constant -**IMPORT_USE_NAMED_SKIN_BINDS** = ``16`` +**IMPORT_USE_NAMED_SKIN_BINDS** = ``16`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_USE_NAMED_SKIN_BINDS>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -98,7 +118,23 @@ Constants .. rst-class:: classref-constant -**IMPORT_DISCARD_MESHES_AND_MATERIALS** = ``32`` +**IMPORT_DISCARD_MESHES_AND_MATERIALS** = ``32`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_DISCARD_MESHES_AND_MATERIALS>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_EditorSceneFormatImporter_constant_IMPORT_FORCE_DISABLE_MESH_COMPRESSION: + +.. rst-class:: classref-constant + +**IMPORT_FORCE_DISABLE_MESH_COMPRESSION** = ``64`` :ref:`🔗<class_EditorSceneFormatImporter_constant_IMPORT_FORCE_DISABLE_MESH_COMPRESSION>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -111,11 +147,11 @@ Constants Method Descriptions ------------------- -.. _class_EditorSceneFormatImporter_method__get_extensions: +.. _class_EditorSceneFormatImporter_private_method__get_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorSceneFormatImporter_private_method__get_extensions>` .. container:: contribute @@ -125,11 +161,11 @@ Method Descriptions ---- -.. _class_EditorSceneFormatImporter_method__get_import_flags: +.. _class_EditorSceneFormatImporter_private_method__get_import_flags: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_import_flags** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_import_flags**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorSceneFormatImporter_private_method__get_import_flags>` .. container:: contribute @@ -139,11 +175,11 @@ Method Descriptions ---- -.. _class_EditorSceneFormatImporter_method__get_import_options: +.. _class_EditorSceneFormatImporter_private_method__get_import_options: .. rst-class:: classref-method -void **_get_import_options** **(** :ref:`String<class_String>` path **)** |virtual| +|void| **_get_import_options**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorSceneFormatImporter_private_method__get_import_options>` .. container:: contribute @@ -153,11 +189,11 @@ void **_get_import_options** **(** :ref:`String<class_String>` path **)** |virtu ---- -.. _class_EditorSceneFormatImporter_method__get_option_visibility: +.. _class_EditorSceneFormatImporter_private_method__get_option_visibility: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_option_visibility** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_option_visibility**\ (\ path\: :ref:`String<class_String>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorSceneFormatImporter_private_method__get_option_visibility>` .. container:: contribute @@ -167,11 +203,11 @@ void **_get_import_options** **(** :ref:`String<class_String>` path **)** |virtu ---- -.. _class_EditorSceneFormatImporter_method__import_scene: +.. _class_EditorSceneFormatImporter_private_method__import_scene: .. rst-class:: classref-method -:ref:`Object<class_Object>` **_import_scene** **(** :ref:`String<class_String>` path, :ref:`int<class_int>` flags, :ref:`Dictionary<class_Dictionary>` options **)** |virtual| +:ref:`Object<class_Object>` **_import_scene**\ (\ path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`, options\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_EditorSceneFormatImporter_private_method__import_scene>` .. container:: contribute @@ -184,3 +220,4 @@ void **_get_import_options** **(** :ref:`String<class_String>` path **)** |virtu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsceneformatimporterblend.rst b/classes/class_editorsceneformatimporterblend.rst index cf4875a8a8d..8ca766ca3a8 100644 --- a/classes/class_editorsceneformatimporterblend.rst +++ b/classes/class_editorsceneformatimporterblend.rst @@ -21,7 +21,7 @@ Description Imports Blender scenes in the ``.blend`` file format through the glTF 2.0 3D import pipeline. This importer requires Blender to be installed by the user, so that it can be used to export the scene as glTF 2.0. -The location of the Blender binary is set via the ``filesystem/import/blender/blender3_path`` editor setting. +The location of the Blender binary is set via the ``filesystem/import/blender/blender_path`` editor setting. This importer is only used if :ref:`ProjectSettings.filesystem/import/blender/enabled<class_ProjectSettings_property_filesystem/import/blender/enabled>` is enabled, otherwise ``.blend`` files present in the project folder are not imported. @@ -36,3 +36,4 @@ Internally, the EditorSceneFormatImporterBlend uses the Blender glTF "Use Origin .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsceneformatimporterfbx.rst b/classes/class_editorsceneformatimporterfbx2gltf.rst similarity index 74% rename from classes/class_editorsceneformatimporterfbx.rst rename to classes/class_editorsceneformatimporterfbx2gltf.rst index d1ad78a1df3..d01f97b1296 100644 --- a/classes/class_editorsceneformatimporterfbx.rst +++ b/classes/class_editorsceneformatimporterfbx2gltf.rst @@ -3,12 +3,12 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/godotengine/godot/tree/master/modules/gltf/doc_classes/EditorSceneFormatImporterFBX.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/fbx/doc_classes/EditorSceneFormatImporterFBX2GLTF.xml. -.. _class_EditorSceneFormatImporterFBX: +.. _class_EditorSceneFormatImporterFBX2GLTF: -EditorSceneFormatImporterFBX -============================ +EditorSceneFormatImporterFBX2GLTF +================================= **Inherits:** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` @@ -21,9 +21,9 @@ Description Imports Autodesk FBX 3D scenes by way of converting them to glTF 2.0 using the FBX2glTF command line tool. -The location of the FBX2glTF binary is set via the ``filesystem/import/fbx/fbx2gltf_path`` editor setting. +The location of the FBX2glTF binary is set via the :ref:`EditorSettings.filesystem/import/fbx/fbx2gltf_path<class_EditorSettings_property_filesystem/import/fbx/fbx2gltf_path>` editor setting. -This importer is only used if :ref:`ProjectSettings.filesystem/import/fbx/enabled<class_ProjectSettings_property_filesystem/import/fbx/enabled>` is enabled, otherwise ``.fbx`` files present in the project folder are not imported. +This importer is only used if :ref:`ProjectSettings.filesystem/import/fbx2gltf/enabled<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>` is set to ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -32,3 +32,4 @@ This importer is only used if :ref:`ProjectSettings.filesystem/import/fbx/enable .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsceneformatimportergltf.rst b/classes/class_editorsceneformatimportergltf.rst index ff958808b8d..abe92291421 100644 --- a/classes/class_editorsceneformatimportergltf.rst +++ b/classes/class_editorsceneformatimportergltf.rst @@ -23,3 +23,4 @@ EditorSceneFormatImporterGLTF .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsceneformatimporterufbx.rst b/classes/class_editorsceneformatimporterufbx.rst new file mode 100644 index 00000000000..618ecfb9c26 --- /dev/null +++ b/classes/class_editorsceneformatimporterufbx.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/fbx/doc_classes/EditorSceneFormatImporterUFBX.xml. + +.. _class_EditorSceneFormatImporterUFBX: + +EditorSceneFormatImporterUFBX +============================= + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Import FBX files using the ufbx library. + +.. rst-class:: classref-introduction-group + +Description +----------- + +EditorSceneFormatImporterUFBX is designed to load FBX files and supports both binary and ASCII FBX files from version 3000 onward. This class supports various 3D object types like meshes, skins, blend shapes, materials, and rigging information. The class aims for feature parity with the official FBX SDK and supports FBX 7.4 specifications. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 83fbf5537a4..04e622afb32 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -21,7 +21,7 @@ Description Imported scenes can be automatically modified right after import by setting their **Custom Script** Import property to a ``tool`` script that inherits from this class. -The :ref:`_post_import<class_EditorScenePostImport_method__post_import>` callback receives the imported scene's root node and returns the modified version of the scene. Usage example: +The :ref:`_post_import<class_EditorScenePostImport_private_method__post_import>` callback receives the imported scene's root node and returns the modified version of the scene. Usage example: .. tabs:: @@ -80,7 +80,7 @@ The :ref:`_post_import<class_EditorScenePostImport_method__post_import>` callbac Tutorials --------- -- `Importing 3D scenes: Custom script <../tutorials/assets_pipeline/importing_scenes.html#custom-script>`__ +- `Importing 3D scenes: Configuration: Using import scripts for automation <../tutorials/assets_pipeline/importing_3d_scenes/import_configuration.html#using-import-scripts-for-automation>`__ .. rst-class:: classref-reftable-group @@ -90,11 +90,11 @@ Methods .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`_post_import<class_EditorScenePostImport_method__post_import>` **(** :ref:`Node<class_Node>` scene **)** |virtual| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_source_file<class_EditorScenePostImport_method_get_source_file>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`_post_import<class_EditorScenePostImport_private_method__post_import>`\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_source_file<class_EditorScenePostImport_method_get_source_file>`\ (\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -105,11 +105,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorScenePostImport_method__post_import: +.. _class_EditorScenePostImport_private_method__post_import: .. rst-class:: classref-method -:ref:`Object<class_Object>` **_post_import** **(** :ref:`Node<class_Node>` scene **)** |virtual| +:ref:`Object<class_Object>` **_post_import**\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImport_private_method__post_import>` Called after the scene was imported. This method must return the modified version of the scene. @@ -121,7 +121,7 @@ Called after the scene was imported. This method must return the modified versio .. rst-class:: classref-method -:ref:`String<class_String>` **get_source_file** **(** **)** |const| +:ref:`String<class_String>` **get_source_file**\ (\ ) |const| :ref:`🔗<class_EditorScenePostImport_method_get_source_file>` Returns the source file path which got imported (e.g. ``res://scene.dae``). @@ -132,3 +132,4 @@ Returns the source file path which got imported (e.g. ``res://scene.dae``). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index 8bf5b23b824..c5ce96d5f03 100644 --- a/classes/class_editorscenepostimportplugin.rst +++ b/classes/class_editorscenepostimportplugin.rst @@ -29,29 +29,29 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_import_options<class_EditorScenePostImportPlugin_method__get_import_options>` **(** :ref:`String<class_String>` path **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_method__get_internal_import_options>` **(** :ref:`int<class_int>` category **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_internal_option_update_view_required<class_EditorScenePostImportPlugin_method__get_internal_option_update_view_required>` **(** :ref:`int<class_int>` category, :ref:`String<class_String>` option **)** |virtual| |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_internal_option_visibility<class_EditorScenePostImportPlugin_method__get_internal_option_visibility>` **(** :ref:`int<class_int>` category, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_option_visibility<class_EditorScenePostImportPlugin_method__get_option_visibility>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_internal_process<class_EditorScenePostImportPlugin_method__internal_process>` **(** :ref:`int<class_int>` category, :ref:`Node<class_Node>` base_node, :ref:`Node<class_Node>` node, :ref:`Resource<class_Resource>` resource **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_post_process<class_EditorScenePostImportPlugin_method__post_process>` **(** :ref:`Node<class_Node>` scene **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pre_process<class_EditorScenePostImportPlugin_method__pre_process>` **(** :ref:`Node<class_Node>` scene **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_import_option<class_EditorScenePostImportPlugin_method_add_import_option>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_import_option_advanced<class_EditorScenePostImportPlugin_method_add_import_option_advanced>` **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value, :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` hint=0, :ref:`String<class_String>` hint_string="", :ref:`int<class_int>` usage_flags=6 **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_option_value<class_EditorScenePostImportPlugin_method_get_option_value>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_get_import_options<class_EditorScenePostImportPlugin_private_method__get_import_options>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_private_method__get_internal_import_options>`\ (\ category\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_internal_option_update_view_required<class_EditorScenePostImportPlugin_private_method__get_internal_option_update_view_required>`\ (\ category\: :ref:`int<class_int>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_internal_option_visibility<class_EditorScenePostImportPlugin_private_method__get_internal_option_visibility>`\ (\ category\: :ref:`int<class_int>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_option_visibility<class_EditorScenePostImportPlugin_private_method__get_option_visibility>`\ (\ path\: :ref:`String<class_String>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_internal_process<class_EditorScenePostImportPlugin_private_method__internal_process>`\ (\ category\: :ref:`int<class_int>`, base_node\: :ref:`Node<class_Node>`, node\: :ref:`Node<class_Node>`, resource\: :ref:`Resource<class_Resource>`\ ) |virtual| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_post_process<class_EditorScenePostImportPlugin_private_method__post_process>`\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pre_process<class_EditorScenePostImportPlugin_private_method__pre_process>`\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_import_option<class_EditorScenePostImportPlugin_method_add_import_option>`\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_import_option_advanced<class_EditorScenePostImportPlugin_method_add_import_option_advanced>`\ (\ type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, name\: :ref:`String<class_String>`, default_value\: :ref:`Variant<class_Variant>`, hint\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` = 0, hint_string\: :ref:`String<class_String>` = "", usage_flags\: :ref:`int<class_int>` = 6\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_option_value<class_EditorScenePostImportPlugin_method_get_option_value>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,7 +66,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **InternalImportCategory**: +enum **InternalImportCategory**: :ref:`🔗<enum_EditorScenePostImportPlugin_InternalImportCategory>` .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_NODE: @@ -74,6 +74,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_NODE** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE: @@ -82,6 +86,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MESH: @@ -90,6 +98,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_MESH** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MATERIAL: @@ -98,6 +110,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_MATERIAL** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION: @@ -106,6 +122,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_ANIMATION** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE: @@ -114,6 +134,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE: @@ -122,6 +146,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE** = ``6`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_EditorScenePostImportPlugin_constant_INTERNAL_IMPORT_CATEGORY_MAX: @@ -130,6 +158,10 @@ enum **InternalImportCategory**: :ref:`InternalImportCategory<enum_EditorScenePostImportPlugin_InternalImportCategory>` **INTERNAL_IMPORT_CATEGORY_MAX** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -141,11 +173,11 @@ enum **InternalImportCategory**: Method Descriptions ------------------- -.. _class_EditorScenePostImportPlugin_method__get_import_options: +.. _class_EditorScenePostImportPlugin_private_method__get_import_options: .. rst-class:: classref-method -void **_get_import_options** **(** :ref:`String<class_String>` path **)** |virtual| +|void| **_get_import_options**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__get_import_options>` Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option<class_EditorScenePostImportPlugin_method_add_import_option>` and :ref:`add_import_option_advanced<class_EditorScenePostImportPlugin_method_add_import_option_advanced>`. @@ -153,11 +185,11 @@ Override to add general import options. These will appear in the main import doc ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_import_options: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_import_options: .. rst-class:: classref-method -void **_get_internal_import_options** **(** :ref:`int<class_int>` category **)** |virtual| +|void| **_get_internal_import_options**\ (\ category\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__get_internal_import_options>` Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option<class_EditorScenePostImportPlugin_method_add_import_option>` and :ref:`add_import_option_advanced<class_EditorScenePostImportPlugin_method_add_import_option_advanced>`. @@ -165,11 +197,11 @@ Override to add internal import options. These will appear in the 3D scene impor ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_option_update_view_required: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_option_update_view_required: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_internal_option_update_view_required** **(** :ref:`int<class_int>` category, :ref:`String<class_String>` option **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_internal_option_update_view_required**\ (\ category\: :ref:`int<class_int>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__get_internal_option_update_view_required>` Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed. @@ -177,11 +209,11 @@ Return true whether updating the 3D view of the import dialog needs to be update ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_option_visibility: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_option_visibility: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_internal_option_visibility** **(** :ref:`int<class_int>` category, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_internal_option_visibility**\ (\ category\: :ref:`int<class_int>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__get_internal_option_visibility>` Return true or false whether a given option should be visible. Return null to ignore. @@ -189,11 +221,11 @@ Return true or false whether a given option should be visible. Return null to ig ---- -.. _class_EditorScenePostImportPlugin_method__get_option_visibility: +.. _class_EditorScenePostImportPlugin_private_method__get_option_visibility: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_option_visibility** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` for_animation, :ref:`String<class_String>` option **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_option_visibility**\ (\ path\: :ref:`String<class_String>`, for_animation\: :ref:`bool<class_bool>`, option\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__get_option_visibility>` Return true or false whether a given option should be visible. Return null to ignore. @@ -201,11 +233,11 @@ Return true or false whether a given option should be visible. Return null to ig ---- -.. _class_EditorScenePostImportPlugin_method__internal_process: +.. _class_EditorScenePostImportPlugin_private_method__internal_process: .. rst-class:: classref-method -void **_internal_process** **(** :ref:`int<class_int>` category, :ref:`Node<class_Node>` base_node, :ref:`Node<class_Node>` node, :ref:`Resource<class_Resource>` resource **)** |virtual| +|void| **_internal_process**\ (\ category\: :ref:`int<class_int>`, base_node\: :ref:`Node<class_Node>`, node\: :ref:`Node<class_Node>`, resource\: :ref:`Resource<class_Resource>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__internal_process>` Process a specific node or resource for a given category. @@ -213,11 +245,11 @@ Process a specific node or resource for a given category. ---- -.. _class_EditorScenePostImportPlugin_method__post_process: +.. _class_EditorScenePostImportPlugin_private_method__post_process: .. rst-class:: classref-method -void **_post_process** **(** :ref:`Node<class_Node>` scene **)** |virtual| +|void| **_post_process**\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__post_process>` Post process the scene. This function is called after the final scene has been configured. @@ -225,11 +257,11 @@ Post process the scene. This function is called after the final scene has been c ---- -.. _class_EditorScenePostImportPlugin_method__pre_process: +.. _class_EditorScenePostImportPlugin_private_method__pre_process: .. rst-class:: classref-method -void **_pre_process** **(** :ref:`Node<class_Node>` scene **)** |virtual| +|void| **_pre_process**\ (\ scene\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_EditorScenePostImportPlugin_private_method__pre_process>` Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. @@ -241,9 +273,9 @@ Pre Process the scene. This function is called right after the scene format load .. rst-class:: classref-method -void **add_import_option** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** +|void| **add_import_option**\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorScenePostImportPlugin_method_add_import_option>` -Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options<class_EditorScenePostImportPlugin_method__get_import_options>` and :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_method__get_internal_import_options>`. +Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options<class_EditorScenePostImportPlugin_private_method__get_import_options>` and :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_private_method__get_internal_import_options>`. .. rst-class:: classref-item-separator @@ -253,9 +285,9 @@ Add a specific import option (name and default value only). This function can on .. rst-class:: classref-method -void **add_import_option_advanced** **(** :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` type, :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value, :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` hint=0, :ref:`String<class_String>` hint_string="", :ref:`int<class_int>` usage_flags=6 **)** +|void| **add_import_option_advanced**\ (\ type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`, name\: :ref:`String<class_String>`, default_value\: :ref:`Variant<class_Variant>`, hint\: :ref:`PropertyHint<enum_@GlobalScope_PropertyHint>` = 0, hint_string\: :ref:`String<class_String>` = "", usage_flags\: :ref:`int<class_int>` = 6\ ) :ref:`🔗<class_EditorScenePostImportPlugin_method_add_import_option_advanced>` -Add a specific import option. This function can only be called from :ref:`_get_import_options<class_EditorScenePostImportPlugin_method__get_import_options>` and :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_method__get_internal_import_options>`. +Add a specific import option. This function can only be called from :ref:`_get_import_options<class_EditorScenePostImportPlugin_private_method__get_import_options>` and :ref:`_get_internal_import_options<class_EditorScenePostImportPlugin_private_method__get_internal_import_options>`. .. rst-class:: classref-item-separator @@ -265,7 +297,7 @@ Add a specific import option. This function can only be called from :ref:`_get_i .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_option_value** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **get_option_value**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EditorScenePostImportPlugin_method_get_option_value>` Query the value of an option. This function can only be called from those querying visibility, or processing. @@ -276,3 +308,4 @@ Query the value of an option. This function can only be called from those queryi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 8023455c71e..81769525bd9 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -19,7 +19,7 @@ Base script that can be used to add extension functions to the editor. Description ----------- -Scripts extending this class and implementing its :ref:`_run<class_EditorScript_method__run>` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin<class_EditorPlugin>`\ s instead. +Scripts extending this class and implementing its :ref:`_run<class_EditorScript_private_method__run>` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using :ref:`EditorPlugin<class_EditorPlugin>`\ s instead. \ **Note:** Extending scripts need to have ``tool`` mode enabled. @@ -63,15 +63,15 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | void | :ref:`_run<class_EditorScript_method__run>` **(** **)** |virtual| | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_root_node<class_EditorScript_method_add_root_node>` **(** :ref:`Node<class_Node>` node **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorScript_method_get_editor_interface>` **(** **)** |const| | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_scene<class_EditorScript_method_get_scene>` **(** **)** |const| | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_run<class_EditorScript_private_method__run>`\ (\ ) |virtual| | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_root_node<class_EditorScript_method_add_root_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorScript_method_get_editor_interface>`\ (\ ) |const| | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_scene<class_EditorScript_method_get_scene>`\ (\ ) |const| | + +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,11 +82,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorScript_method__run: +.. _class_EditorScript_private_method__run: .. rst-class:: classref-method -void **_run** **(** **)** |virtual| +|void| **_run**\ (\ ) |virtual| :ref:`🔗<class_EditorScript_private_method__run>` This method is executed by the Editor when **File > Run** is used. @@ -98,11 +98,9 @@ This method is executed by the Editor when **File > Run** is used. .. rst-class:: classref-method -void **add_root_node** **(** :ref:`Node<class_Node>` node **)** +|void| **add_root_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorScript_method_add_root_node>` -Adds ``node`` as a child of the root node in the editor context. - -\ **Warning:** The implementation of this method is currently disabled. +Makes ``node`` root of the currently opened scene. Only works if the scene is empty. If the ``node`` is a scene instance, an inheriting scene will be created. .. rst-class:: classref-item-separator @@ -112,7 +110,9 @@ Adds ``node`` as a child of the root node in the editor context. .. rst-class:: classref-method -:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface** **(** **)** |const| +:ref:`EditorInterface<class_EditorInterface>` **get_editor_interface**\ (\ ) |const| :ref:`🔗<class_EditorScript_method_get_editor_interface>` + +**Deprecated:** :ref:`EditorInterface<class_EditorInterface>` is a global singleton and can be accessed directly by its name. Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance. @@ -124,9 +124,9 @@ Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance. .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_scene** **(** **)** |const| +:ref:`Node<class_Node>` **get_scene**\ (\ ) |const| :ref:`🔗<class_EditorScript_method_get_scene>` -Returns the Editor's currently active scene. +Returns the edited (current) scene's root :ref:`Node<class_Node>`. Equivalent of :ref:`EditorInterface.get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -135,3 +135,4 @@ Returns the Editor's currently active scene. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorscriptpicker.rst b/classes/class_editorscriptpicker.rst index 860aff9d366..6b1fa149158 100644 --- a/classes/class_editorscriptpicker.rst +++ b/classes/class_editorscriptpicker.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Node<class_Node>` **script_owner** +:ref:`Node<class_Node>` **script_owner** :ref:`🔗<class_EditorScriptPicker_property_script_owner>` .. rst-class:: classref-property-setget -- void **set_script_owner** **(** :ref:`Node<class_Node>` value **)** -- :ref:`Node<class_Node>` **get_script_owner** **(** **)** +- |void| **set_script_owner**\ (\ value\: :ref:`Node<class_Node>`\ ) +- :ref:`Node<class_Node>` **get_script_owner**\ (\ ) The owner :ref:`Node<class_Node>` of the script property that holds the edited resource. @@ -64,3 +64,4 @@ The owner :ref:`Node<class_Node>` of the script property that holds the edited r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index 4d328222480..2eb349ba819 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -31,17 +31,17 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_node<class_EditorSelection_method_add_node>` **(** :ref:`Node<class_Node>` node **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_EditorSelection_method_clear>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node[]<class_Node>` | :ref:`get_selected_nodes<class_EditorSelection_method_get_selected_nodes>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node[]<class_Node>` | :ref:`get_transformable_selected_nodes<class_EditorSelection_method_get_transformable_selected_nodes>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_node<class_EditorSelection_method_remove_node>` **(** :ref:`Node<class_Node>` node **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node<class_EditorSelection_method_add_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_EditorSelection_method_clear>`\ (\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_selected_nodes<class_EditorSelection_method_get_selected_nodes>`\ (\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_transformable_selected_nodes<class_EditorSelection_method_get_transformable_selected_nodes>`\ (\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node<class_EditorSelection_method_remove_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,7 +56,7 @@ Signals .. rst-class:: classref-signal -**selection_changed** **(** **)** +**selection_changed**\ (\ ) :ref:`🔗<class_EditorSelection_signal_selection_changed>` Emitted when the selection changes. @@ -73,7 +73,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_node** **(** :ref:`Node<class_Node>` node **)** +|void| **add_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorSelection_method_add_node>` Adds a node to the selection. @@ -87,7 +87,7 @@ Adds a node to the selection. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_EditorSelection_method_clear>` Clear the selection. @@ -99,9 +99,9 @@ Clear the selection. .. rst-class:: classref-method -:ref:`Node[]<class_Node>` **get_selected_nodes** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_selected_nodes**\ (\ ) :ref:`🔗<class_EditorSelection_method_get_selected_nodes>` -Gets the list of selected nodes. +Returns the list of selected nodes. .. rst-class:: classref-item-separator @@ -111,9 +111,9 @@ Gets the list of selected nodes. .. rst-class:: classref-method -:ref:`Node[]<class_Node>` **get_transformable_selected_nodes** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_transformable_selected_nodes**\ (\ ) :ref:`🔗<class_EditorSelection_method_get_transformable_selected_nodes>` -Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. +Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild. .. rst-class:: classref-item-separator @@ -123,7 +123,7 @@ Gets the list of selected nodes, optimized for transform operations (i.e. moving .. rst-class:: classref-method -void **remove_node** **(** :ref:`Node<class_Node>` node **)** +|void| **remove_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorSelection_method_remove_node>` Removes a node from the selection. @@ -134,3 +134,4 @@ Removes a node from the selection. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index 813bb703d03..87720457f7b 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -30,7 +30,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: gdscript - var settings = get_editor_interface().get_editor_settings() + var settings = EditorInterface.get_editor_settings() # `settings.set("some/property", 10)` also works as this class overrides `_set()` internally. settings.set_setting("some/property", 10) # `settings.get("some/property")` also works as this class overrides `_get()` internally. @@ -39,7 +39,7 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: csharp - EditorSettings settings = GetEditorInterface().GetEditorSettings(); + EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); // `settings.set("some/property", value)` also works as this class overrides `_set()` internally. settings.SetSetting("some/property", Value); // `settings.get("some/property", value)` also works as this class overrides `_get()` internally. @@ -58,505 +58,649 @@ Properties .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`debugger/auto_switch_to_remote_scene_tree<class_EditorSettings_property_debugger/auto_switch_to_remote_scene_tree>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`debugger/profiler_frame_history_size<class_EditorSettings_property_debugger/profiler_frame_history_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`debugger/profiler_frame_max_functions<class_EditorSettings_property_debugger/profiler_frame_max_functions>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`debugger/remote_inspect_refresh_interval<class_EditorSettings_property_debugger/remote_inspect_refresh_interval>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`debugger/remote_scene_tree_refresh_interval<class_EditorSettings_property_debugger/remote_scene_tree_refresh_interval>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`docks/filesystem/always_show_folders<class_EditorSettings_property_docks/filesystem/always_show_folders>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`docks/filesystem/textfile_extensions<class_EditorSettings_property_docks/filesystem/textfile_extensions>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`docks/filesystem/thumbnail_size<class_EditorSettings_property_docks/filesystem/thumbnail_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`docks/property_editor/auto_refresh_interval<class_EditorSettings_property_docks/property_editor/auto_refresh_interval>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`docks/property_editor/subresource_hue_tint<class_EditorSettings_property_docks/property_editor/subresource_hue_tint>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`docks/scene_tree/auto_expand_to_selected<class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded<class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_color1<class_EditorSettings_property_editors/2d/bone_color1>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_color2<class_EditorSettings_property_editors/2d/bone_color2>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_ik_color<class_EditorSettings_property_editors/2d/bone_ik_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_outline_color<class_EditorSettings_property_editors/2d/bone_outline_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/2d/bone_outline_size<class_EditorSettings_property_editors/2d/bone_outline_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_selected_color<class_EditorSettings_property_editors/2d/bone_selected_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/2d/bone_width<class_EditorSettings_property_editors/2d/bone_width>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/grid_color<class_EditorSettings_property_editors/2d/grid_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/guides_color<class_EditorSettings_property_editors/2d/guides_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/smart_snapping_line_color<class_EditorSettings_property_editors/2d/smart_snapping_line_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/2d/use_integer_zoom_by_default<class_EditorSettings_property_editors/2d/use_integer_zoom_by_default>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/2d/viewport_border_color<class_EditorSettings_property_editors/2d/viewport_border_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/default_fov<class_EditorSettings_property_editors/3d/default_fov>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/default_z_far<class_EditorSettings_property_editors/3d/default_z_far>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/default_z_near<class_EditorSettings_property_editors/3d/default_z_near>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/freelook/freelook_activation_modifier<class_EditorSettings_property_editors/3d/freelook/freelook_activation_modifier>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_base_speed<class_EditorSettings_property_editors/3d/freelook/freelook_base_speed>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_inertia<class_EditorSettings_property_editors/3d/freelook/freelook_inertia>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/freelook/freelook_navigation_scheme<class_EditorSettings_property_editors/3d/freelook/freelook_navigation_scheme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_sensitivity<class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/freelook/freelook_speed_zoom_link<class_EditorSettings_property_editors/3d/freelook/freelook_speed_zoom_link>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/grid_division_level_bias<class_EditorSettings_property_editors/3d/grid_division_level_bias>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/grid_division_level_max<class_EditorSettings_property_editors/3d/grid_division_level_max>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/grid_division_level_min<class_EditorSettings_property_editors/3d/grid_division_level_min>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/grid_size<class_EditorSettings_property_editors/3d/grid_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_xy_plane<class_EditorSettings_property_editors/3d/grid_xy_plane>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_xz_plane<class_EditorSettings_property_editors/3d/grid_xz_plane>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_yz_plane<class_EditorSettings_property_editors/3d/grid_yz_plane>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/emulate_3_button_mouse<class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/emulate_numpad<class_EditorSettings_property_editors/3d/navigation/emulate_numpad>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/invert_x_axis<class_EditorSettings_property_editors/3d/navigation/invert_x_axis>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/invert_y_axis<class_EditorSettings_property_editors/3d/navigation/invert_y_axis>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/navigation/navigation_scheme<class_EditorSettings_property_editors/3d/navigation/navigation_scheme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/navigation/orbit_modifier<class_EditorSettings_property_editors/3d/navigation/orbit_modifier>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/navigation/pan_modifier<class_EditorSettings_property_editors/3d/navigation/pan_modifier>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/warped_mouse_panning<class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/navigation/zoom_modifier<class_EditorSettings_property_editors/3d/navigation/zoom_modifier>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/navigation/zoom_style<class_EditorSettings_property_editors/3d/navigation/zoom_style>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_inertia<class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_sensitivity<class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/translation_inertia<class_EditorSettings_property_editors/3d/navigation_feel/translation_inertia>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/zoom_inertia<class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d/primary_grid_color<class_EditorSettings_property_editors/3d/primary_grid_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d/secondary_grid_color<class_EditorSettings_property_editors/3d/secondary_grid_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d/selection_box_color<class_EditorSettings_property_editors/3d/selection_box_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/joint<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/shape<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/shape>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/animation/autorename_animation_tracks<class_EditorSettings_property_editors/animation/autorename_animation_tracks>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/animation/confirm_insert_track<class_EditorSettings_property_editors/animation/confirm_insert_track>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/animation/default_create_bezier_tracks<class_EditorSettings_property_editors/animation/default_create_bezier_tracks>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/animation/default_create_reset_tracks<class_EditorSettings_property_editors/animation/default_create_reset_tracks>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/animation/onion_layers_future_color<class_EditorSettings_property_editors/animation/onion_layers_future_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/animation/onion_layers_past_color<class_EditorSettings_property_editors/animation/onion_layers_past_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/grid_map/pick_distance<class_EditorSettings_property_editors/grid_map/pick_distance>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/panning/2d_editor_pan_speed<class_EditorSettings_property_editors/panning/2d_editor_pan_speed>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/panning/2d_editor_panning_scheme<class_EditorSettings_property_editors/panning/2d_editor_panning_scheme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/panning/animation_editors_panning_scheme<class_EditorSettings_property_editors/panning/animation_editors_panning_scheme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/panning/simple_panning<class_EditorSettings_property_editors/panning/simple_panning>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/panning/sub_editors_panning_scheme<class_EditorSettings_property_editors/panning/sub_editors_panning_scheme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/panning/warped_mouse_panning<class_EditorSettings_property_editors/panning/warped_mouse_panning>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/polygon_editor/point_grab_radius<class_EditorSettings_property_editors/polygon_editor/point_grab_radius>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/polygon_editor/show_previous_outline<class_EditorSettings_property_editors/polygon_editor/show_previous_outline>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/shader_editor/behavior/files/restore_shaders_on_load<class_EditorSettings_property_editors/shader_editor/behavior/files/restore_shaders_on_load>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`editors/tiles_editor/display_grid<class_EditorSettings_property_editors/tiles_editor/display_grid>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`editors/tiles_editor/grid_color<class_EditorSettings_property_editors/tiles_editor/grid_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/visual_editors/lines_curvature<class_EditorSettings_property_editors/visual_editors/lines_curvature>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`editors/visual_editors/minimap_opacity<class_EditorSettings_property_editors/visual_editors/minimap_opacity>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`editors/visual_editors/visual_shader/port_preview_size<class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/directories/autoscan_project_path<class_EditorSettings_property_filesystem/directories/autoscan_project_path>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/directories/default_project_path<class_EditorSettings_property_filesystem/directories/default_project_path>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/external_programs/3d_model_editor<class_EditorSettings_property_filesystem/external_programs/3d_model_editor>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/external_programs/audio_editor<class_EditorSettings_property_filesystem/external_programs/audio_editor>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/external_programs/raster_image_editor<class_EditorSettings_property_filesystem/external_programs/raster_image_editor>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`filesystem/external_programs/vector_image_editor<class_EditorSettings_property_filesystem/external_programs/vector_image_editor>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`filesystem/file_dialog/display_mode<class_EditorSettings_property_filesystem/file_dialog/display_mode>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/file_dialog/show_hidden_files<class_EditorSettings_property_filesystem/file_dialog/show_hidden_files>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`filesystem/file_dialog/thumbnail_size<class_EditorSettings_property_filesystem/file_dialog/thumbnail_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/on_save/compress_binary_resources<class_EditorSettings_property_filesystem/on_save/compress_binary_resources>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename<class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons<class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/automatically_open_screenshots<class_EditorSettings_property_interface/editor/automatically_open_screenshots>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/code_font<class_EditorSettings_property_interface/editor/code_font>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/code_font_contextual_ligatures<class_EditorSettings_property_interface/editor/code_font_contextual_ligatures>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/code_font_custom_opentype_features<class_EditorSettings_property_interface/editor/code_font_custom_opentype_features>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/code_font_custom_variations<class_EditorSettings_property_interface/editor/code_font_custom_variations>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/code_font_size<class_EditorSettings_property_interface/editor/code_font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/debug/enable_pseudolocalization<class_EditorSettings_property_interface/editor/debug/enable_pseudolocalization>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/display_scale<class_EditorSettings_property_interface/editor/display_scale>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/editor_language<class_EditorSettings_property_interface/editor/editor_language>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/editor_screen<class_EditorSettings_property_interface/editor/editor_screen>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/expand_to_title<class_EditorSettings_property_interface/editor/expand_to_title>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/font_antialiasing<class_EditorSettings_property_interface/editor/font_antialiasing>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/font_hinting<class_EditorSettings_property_interface/editor/font_hinting>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/font_subpixel_positioning<class_EditorSettings_property_interface/editor/font_subpixel_positioning>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/editor/low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/main_font<class_EditorSettings_property_interface/editor/main_font>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/editor/main_font_bold<class_EditorSettings_property_interface/editor/main_font_bold>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/main_font_size<class_EditorSettings_property_interface/editor/main_font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/mouse_extra_buttons_navigate_history<class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/project_manager_screen<class_EditorSettings_property_interface/editor/project_manager_screen>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/save_each_scene_on_quit<class_EditorSettings_property_interface/editor/save_each_scene_on_quit>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/separate_distraction_mode<class_EditorSettings_property_interface/editor/separate_distraction_mode>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/editor/show_internal_errors_in_toast_notifications<class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/editor/use_embedded_menu<class_EditorSettings_property_interface/editor/use_embedded_menu>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/inspector/float_drag_speed<class_EditorSettings_property_interface/inspector/float_drag_speed>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/inspector/max_array_dictionary_items_per_page<class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/inspector/show_low_level_opentype_features<class_EditorSettings_property_interface/inspector/show_low_level_opentype_features>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/multi_window/enable<class_EditorSettings_property_interface/multi_window/enable>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/multi_window/maximize_window<class_EditorSettings_property_interface/multi_window/maximize_window>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/multi_window/restore_windows_on_load<class_EditorSettings_property_interface/multi_window/restore_windows_on_load>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/scene_tabs/display_close_button<class_EditorSettings_property_interface/scene_tabs/display_close_button>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/scene_tabs/maximum_width<class_EditorSettings_property_interface/scene_tabs/maximum_width>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/scene_tabs/show_script_button<class_EditorSettings_property_interface/scene_tabs/show_script_button>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/scene_tabs/show_thumbnail_on_hover<class_EditorSettings_property_interface/scene_tabs/show_thumbnail_on_hover>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`interface/theme/accent_color<class_EditorSettings_property_interface/theme/accent_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/theme/additional_spacing<class_EditorSettings_property_interface/theme/additional_spacing>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`interface/theme/base_color<class_EditorSettings_property_interface/theme/base_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/theme/border_size<class_EditorSettings_property_interface/theme/border_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/theme/contrast<class_EditorSettings_property_interface/theme/contrast>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/theme/corner_radius<class_EditorSettings_property_interface/theme/corner_radius>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/theme/custom_theme<class_EditorSettings_property_interface/theme/custom_theme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/theme/draw_extra_borders<class_EditorSettings_property_interface/theme/draw_extra_borders>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`interface/theme/icon_and_font_color<class_EditorSettings_property_interface/theme/icon_and_font_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/theme/icon_saturation<class_EditorSettings_property_interface/theme/icon_saturation>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`interface/theme/preset<class_EditorSettings_property_interface/theme/preset>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/theme/relationship_line_opacity<class_EditorSettings_property_interface/theme/relationship_line_opacity>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/enable_long_press_as_right_click<class_EditorSettings_property_interface/touchscreen/enable_long_press_as_right_click>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures<class_EditorSettings_property_interface/touchscreen/enable_pan_and_scale_gestures>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/increase_scrollbar_touch_area<class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interface/touchscreen/scale_gizmo_handles<class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`network/debug/remote_host<class_EditorSettings_property_network/debug/remote_host>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`network/debug/remote_port<class_EditorSettings_property_network/debug/remote_port>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`network/http_proxy/host<class_EditorSettings_property_network/http_proxy/host>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`network/http_proxy/port<class_EditorSettings_property_network/http_proxy/port>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`network/tls/editor_tls_certificates<class_EditorSettings_property_network/tls/editor_tls_certificates>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`project_manager/default_renderer<class_EditorSettings_property_project_manager/default_renderer>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`project_manager/sorting_order<class_EditorSettings_property_project_manager/sorting_order>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`run/auto_save/save_before_running<class_EditorSettings_property_run/auto_save/save_before_running>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`run/output/always_clear_output_on_play<class_EditorSettings_property_run/output/always_clear_output_on_play>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`run/output/always_close_output_on_stop<class_EditorSettings_property_run/output/always_close_output_on_stop>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`run/output/always_open_output_on_play<class_EditorSettings_property_run/output/always_open_output_on_play>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`run/output/font_size<class_EditorSettings_property_run/output/font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`run/window_placement/android_window<class_EditorSettings_property_run/window_placement/android_window>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`run/window_placement/rect<class_EditorSettings_property_run/window_placement/rect>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`run/window_placement/rect_custom_position<class_EditorSettings_property_run/window_placement/rect_custom_position>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`run/window_placement/screen<class_EditorSettings_property_run/window_placement/screen>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/caret_blink<class_EditorSettings_property_text_editor/appearance/caret/caret_blink>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`text_editor/appearance/caret/caret_blink_interval<class_EditorSettings_property_text_editor/appearance/caret/caret_blink_interval>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/highlight_all_occurrences<class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/highlight_current_line<class_EditorSettings_property_text_editor/appearance/caret/highlight_current_line>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/caret/type<class_EditorSettings_property_text_editor/appearance/caret/type>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines<class_EditorSettings_property_text_editor/appearance/guidelines/show_line_length_guidelines>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines<class_EditorSettings_property_text_editor/appearance/gutters/highlight_type_safe_lines>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded<class_EditorSettings_property_text_editor/appearance/gutters/line_numbers_zero_padded>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/show_info_gutter<class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/show_line_numbers<class_EditorSettings_property_text_editor/appearance/gutters/show_line_numbers>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/lines/autowrap_mode<class_EditorSettings_property_text_editor/appearance/lines/autowrap_mode>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/lines/code_folding<class_EditorSettings_property_text_editor/appearance/lines/code_folding>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/lines/word_wrap<class_EditorSettings_property_text_editor/appearance/lines/word_wrap>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/minimap/minimap_width<class_EditorSettings_property_text_editor/appearance/minimap/minimap_width>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/minimap/show_minimap<class_EditorSettings_property_text_editor/appearance/minimap/show_minimap>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/whitespace/draw_spaces<class_EditorSettings_property_text_editor/appearance/whitespace/draw_spaces>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/whitespace/draw_tabs<class_EditorSettings_property_text_editor/appearance/whitespace/draw_tabs>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/appearance/whitespace/line_spacing<class_EditorSettings_property_text_editor/appearance/whitespace/line_spacing>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change<class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/behavior/files/autosave_interval_secs<class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/convert_indent_on_save<class_EditorSettings_property_text_editor/behavior/files/convert_indent_on_save>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/restore_scripts_on_load<class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save<class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/indent/auto_indent<class_EditorSettings_property_text_editor/behavior/indent/auto_indent>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/behavior/indent/size<class_EditorSettings_property_text_editor/behavior/indent/size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/behavior/indent/type<class_EditorSettings_property_text_editor/behavior/indent/type>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection<class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click<class_EditorSettings_property_text_editor/behavior/navigation/move_caret_on_right_click>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file<class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/smooth_scrolling<class_EditorSettings_property_text_editor/behavior/navigation/smooth_scrolling>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected<class_EditorSettings_property_text_editor/behavior/navigation/stay_in_script_editor_on_node_selected>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/behavior/navigation/v_scroll_speed<class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/add_type_hints<class_EditorSettings_property_text_editor/completion/add_type_hints>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/auto_brace_complete<class_EditorSettings_property_text_editor/completion/auto_brace_complete>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`text_editor/completion/code_complete_delay<class_EditorSettings_property_text_editor/completion/code_complete_delay>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/code_complete_enabled<class_EditorSettings_property_text_editor/completion/code_complete_enabled>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/complete_file_paths<class_EditorSettings_property_text_editor/completion/complete_file_paths>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`text_editor/completion/idle_parse_delay<class_EditorSettings_property_text_editor/completion/idle_parse_delay>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line<class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/completion/use_single_quotes<class_EditorSettings_property_text_editor/completion/use_single_quotes>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/help/class_reference_examples<class_EditorSettings_property_text_editor/help/class_reference_examples>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/help/help_font_size<class_EditorSettings_property_text_editor/help/help_font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/help/help_source_font_size<class_EditorSettings_property_text_editor/help/help_source_font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_editor/help/help_title_font_size<class_EditorSettings_property_text_editor/help/help_title_font_size>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/help/show_help_index<class_EditorSettings_property_text_editor/help/show_help_index>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/script_list/show_members_overview<class_EditorSettings_property_text_editor/script_list/show_members_overview>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`text_editor/script_list/sort_members_outline_alphabetically<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`text_editor/theme/color_theme<class_EditorSettings_property_text_editor/theme/color_theme>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/background_color<class_EditorSettings_property_text_editor/theme/highlighting/background_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/base_type_color<class_EditorSettings_property_text_editor/theme/highlighting/base_type_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/bookmark_color<class_EditorSettings_property_text_editor/theme/highlighting/bookmark_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/brace_mismatch_color<class_EditorSettings_property_text_editor/theme/highlighting/brace_mismatch_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/breakpoint_color<class_EditorSettings_property_text_editor/theme/highlighting/breakpoint_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/caret_background_color<class_EditorSettings_property_text_editor/theme/highlighting/caret_background_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/caret_color<class_EditorSettings_property_text_editor/theme/highlighting/caret_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/code_folding_color<class_EditorSettings_property_text_editor/theme/highlighting/code_folding_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/comment_color<class_EditorSettings_property_text_editor/theme/highlighting/comment_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_background_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_background_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_existing_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_existing_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_font_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_font_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_scroll_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_hovered_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_selected_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color<class_EditorSettings_property_text_editor/theme/highlighting/control_flow_keyword_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/current_line_color<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/engine_type_color<class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/executing_line_color<class_EditorSettings_property_text_editor/theme/highlighting/executing_line_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/function_color<class_EditorSettings_property_text_editor/theme/highlighting/function_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/keyword_color<class_EditorSettings_property_text_editor/theme/highlighting/keyword_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/line_length_guideline_color<class_EditorSettings_property_text_editor/theme/highlighting/line_length_guideline_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/line_number_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/mark_color<class_EditorSettings_property_text_editor/theme/highlighting/mark_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/member_variable_color<class_EditorSettings_property_text_editor/theme/highlighting/member_variable_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/number_color<class_EditorSettings_property_text_editor/theme/highlighting/number_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/safe_line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/search_result_border_color<class_EditorSettings_property_text_editor/theme/highlighting/search_result_border_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/search_result_color<class_EditorSettings_property_text_editor/theme/highlighting/search_result_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/selection_color<class_EditorSettings_property_text_editor/theme/highlighting/selection_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/string_color<class_EditorSettings_property_text_editor/theme/highlighting/string_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/symbol_color<class_EditorSettings_property_text_editor/theme/highlighting/symbol_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/text_color<class_EditorSettings_property_text_editor/theme/highlighting/text_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/text_selected_color<class_EditorSettings_property_text_editor/theme/highlighting/text_selected_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/user_type_color<class_EditorSettings_property_text_editor/theme/highlighting/user_type_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/word_highlighted_color<class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color>` | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`debugger/auto_switch_to_remote_scene_tree<class_EditorSettings_property_debugger/auto_switch_to_remote_scene_tree>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`debugger/profile_native_calls<class_EditorSettings_property_debugger/profile_native_calls>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debugger/profiler_frame_history_size<class_EditorSettings_property_debugger/profiler_frame_history_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debugger/profiler_frame_max_functions<class_EditorSettings_property_debugger/profiler_frame_max_functions>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`debugger/remote_inspect_refresh_interval<class_EditorSettings_property_debugger/remote_inspect_refresh_interval>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`debugger/remote_scene_tree_refresh_interval<class_EditorSettings_property_debugger/remote_scene_tree_refresh_interval>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`docks/filesystem/always_show_folders<class_EditorSettings_property_docks/filesystem/always_show_folders>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`docks/filesystem/textfile_extensions<class_EditorSettings_property_docks/filesystem/textfile_extensions>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`docks/filesystem/thumbnail_size<class_EditorSettings_property_docks/filesystem/thumbnail_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`docks/property_editor/auto_refresh_interval<class_EditorSettings_property_docks/property_editor/auto_refresh_interval>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`docks/property_editor/subresource_hue_tint<class_EditorSettings_property_docks/property_editor/subresource_hue_tint>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`docks/scene_tree/auto_expand_to_selected<class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`docks/scene_tree/center_node_on_reparent<class_EditorSettings_property_docks/scene_tree/center_node_on_reparent>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded<class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_color1<class_EditorSettings_property_editors/2d/bone_color1>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_color2<class_EditorSettings_property_editors/2d/bone_color2>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_ik_color<class_EditorSettings_property_editors/2d/bone_ik_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_outline_color<class_EditorSettings_property_editors/2d/bone_outline_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/2d/bone_outline_size<class_EditorSettings_property_editors/2d/bone_outline_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/bone_selected_color<class_EditorSettings_property_editors/2d/bone_selected_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/2d/bone_width<class_EditorSettings_property_editors/2d/bone_width>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/grid_color<class_EditorSettings_property_editors/2d/grid_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/guides_color<class_EditorSettings_property_editors/2d/guides_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/smart_snapping_line_color<class_EditorSettings_property_editors/2d/smart_snapping_line_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/2d/use_integer_zoom_by_default<class_EditorSettings_property_editors/2d/use_integer_zoom_by_default>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/2d/viewport_border_color<class_EditorSettings_property_editors/2d/viewport_border_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/default_fov<class_EditorSettings_property_editors/3d/default_fov>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/default_z_far<class_EditorSettings_property_editors/3d/default_z_far>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/default_z_near<class_EditorSettings_property_editors/3d/default_z_near>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/freelook/freelook_activation_modifier<class_EditorSettings_property_editors/3d/freelook/freelook_activation_modifier>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_base_speed<class_EditorSettings_property_editors/3d/freelook/freelook_base_speed>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_inertia<class_EditorSettings_property_editors/3d/freelook/freelook_inertia>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/freelook/freelook_navigation_scheme<class_EditorSettings_property_editors/3d/freelook/freelook_navigation_scheme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/freelook/freelook_sensitivity<class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/freelook/freelook_speed_zoom_link<class_EditorSettings_property_editors/3d/freelook/freelook_speed_zoom_link>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/grid_division_level_bias<class_EditorSettings_property_editors/3d/grid_division_level_bias>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/grid_division_level_max<class_EditorSettings_property_editors/3d/grid_division_level_max>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/grid_division_level_min<class_EditorSettings_property_editors/3d/grid_division_level_min>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/grid_size<class_EditorSettings_property_editors/3d/grid_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_xy_plane<class_EditorSettings_property_editors/3d/grid_xy_plane>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_xz_plane<class_EditorSettings_property_editors/3d/grid_xz_plane>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/grid_yz_plane<class_EditorSettings_property_editors/3d/grid_yz_plane>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/emulate_3_button_mouse<class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/emulate_numpad<class_EditorSettings_property_editors/3d/navigation/emulate_numpad>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/invert_x_axis<class_EditorSettings_property_editors/3d/navigation/invert_x_axis>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/invert_y_axis<class_EditorSettings_property_editors/3d/navigation/invert_y_axis>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/navigation/navigation_scheme<class_EditorSettings_property_editors/3d/navigation/navigation_scheme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/navigation/orbit_modifier<class_EditorSettings_property_editors/3d/navigation/orbit_modifier>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/navigation/pan_modifier<class_EditorSettings_property_editors/3d/navigation/pan_modifier>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/3d/navigation/warped_mouse_panning<class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/navigation/zoom_modifier<class_EditorSettings_property_editors/3d/navigation/zoom_modifier>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/navigation/zoom_style<class_EditorSettings_property_editors/3d/navigation/zoom_style>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_inertia<class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/orbit_sensitivity<class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/translation_inertia<class_EditorSettings_property_editors/3d/navigation_feel/translation_inertia>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/3d/navigation_feel/zoom_inertia<class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d/primary_grid_color<class_EditorSettings_property_editors/3d/primary_grid_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d/secondary_grid_color<class_EditorSettings_property_editors/3d/secondary_grid_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d/selection_box_color<class_EditorSettings_property_editors/3d/selection_box_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/aabb<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/3d_gizmos/gizmo_colors/joint<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/animation/autorename_animation_tracks<class_EditorSettings_property_editors/animation/autorename_animation_tracks>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/animation/default_create_bezier_tracks<class_EditorSettings_property_editors/animation/default_create_bezier_tracks>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/animation/default_create_reset_tracks<class_EditorSettings_property_editors/animation/default_create_reset_tracks>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/animation/onion_layers_future_color<class_EditorSettings_property_editors/animation/onion_layers_future_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/animation/onion_layers_past_color<class_EditorSettings_property_editors/animation/onion_layers_past_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/grid_map/pick_distance<class_EditorSettings_property_editors/grid_map/pick_distance>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/panning/2d_editor_pan_speed<class_EditorSettings_property_editors/panning/2d_editor_pan_speed>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/panning/2d_editor_panning_scheme<class_EditorSettings_property_editors/panning/2d_editor_panning_scheme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/panning/animation_editors_panning_scheme<class_EditorSettings_property_editors/panning/animation_editors_panning_scheme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/panning/simple_panning<class_EditorSettings_property_editors/panning/simple_panning>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/panning/sub_editors_panning_scheme<class_EditorSettings_property_editors/panning/sub_editors_panning_scheme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/panning/warped_mouse_panning<class_EditorSettings_property_editors/panning/warped_mouse_panning>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/polygon_editor/auto_bake_delay<class_EditorSettings_property_editors/polygon_editor/auto_bake_delay>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/polygon_editor/point_grab_radius<class_EditorSettings_property_editors/polygon_editor/point_grab_radius>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/polygon_editor/show_previous_outline<class_EditorSettings_property_editors/polygon_editor/show_previous_outline>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/shader_editor/behavior/files/restore_shaders_on_load<class_EditorSettings_property_editors/shader_editor/behavior/files/restore_shaders_on_load>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/tiles_editor/display_grid<class_EditorSettings_property_editors/tiles_editor/display_grid>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/tiles_editor/grid_color<class_EditorSettings_property_editors/tiles_editor/grid_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`editors/tiles_editor/highlight_selected_layer<class_EditorSettings_property_editors/tiles_editor/highlight_selected_layer>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/color_color<class_EditorSettings_property_editors/visual_editors/category_colors/color_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/conditional_color<class_EditorSettings_property_editors/visual_editors/category_colors/conditional_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/input_color<class_EditorSettings_property_editors/visual_editors/category_colors/input_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/output_color<class_EditorSettings_property_editors/visual_editors/category_colors/output_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/particle_color<class_EditorSettings_property_editors/visual_editors/category_colors/particle_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/scalar_color<class_EditorSettings_property_editors/visual_editors/category_colors/scalar_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/special_color<class_EditorSettings_property_editors/visual_editors/category_colors/special_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/textures_color<class_EditorSettings_property_editors/visual_editors/category_colors/textures_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/transform_color<class_EditorSettings_property_editors/visual_editors/category_colors/transform_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/utility_color<class_EditorSettings_property_editors/visual_editors/category_colors/utility_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/category_colors/vector_color<class_EditorSettings_property_editors/visual_editors/category_colors/vector_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`editors/visual_editors/color_theme<class_EditorSettings_property_editors/visual_editors/color_theme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/boolean_color<class_EditorSettings_property_editors/visual_editors/connection_colors/boolean_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/sampler_color<class_EditorSettings_property_editors/visual_editors/connection_colors/sampler_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/scalar_color<class_EditorSettings_property_editors/visual_editors/connection_colors/scalar_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/transform_color<class_EditorSettings_property_editors/visual_editors/connection_colors/transform_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/vector2_color<class_EditorSettings_property_editors/visual_editors/connection_colors/vector2_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/vector3_color<class_EditorSettings_property_editors/visual_editors/connection_colors/vector3_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`editors/visual_editors/connection_colors/vector4_color<class_EditorSettings_property_editors/visual_editors/connection_colors/vector4_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/visual_editors/grid_pattern<class_EditorSettings_property_editors/visual_editors/grid_pattern>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/visual_editors/lines_curvature<class_EditorSettings_property_editors/visual_editors/lines_curvature>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`editors/visual_editors/minimap_opacity<class_EditorSettings_property_editors/visual_editors/minimap_opacity>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editors/visual_editors/visual_shader/port_preview_size<class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/directories/autoscan_project_path<class_EditorSettings_property_filesystem/directories/autoscan_project_path>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/directories/default_project_path<class_EditorSettings_property_filesystem/directories/default_project_path>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/3d_model_editor<class_EditorSettings_property_filesystem/external_programs/3d_model_editor>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/audio_editor<class_EditorSettings_property_filesystem/external_programs/audio_editor>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/raster_image_editor<class_EditorSettings_property_filesystem/external_programs/raster_image_editor>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/terminal_emulator<class_EditorSettings_property_filesystem/external_programs/terminal_emulator>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/terminal_emulator_flags<class_EditorSettings_property_filesystem/external_programs/terminal_emulator_flags>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/external_programs/vector_image_editor<class_EditorSettings_property_filesystem/external_programs/vector_image_editor>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filesystem/file_dialog/display_mode<class_EditorSettings_property_filesystem/file_dialog/display_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`filesystem/file_dialog/show_hidden_files<class_EditorSettings_property_filesystem/file_dialog/show_hidden_files>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filesystem/file_dialog/thumbnail_size<class_EditorSettings_property_filesystem/file_dialog/thumbnail_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/import/blender/blender_path<class_EditorSettings_property_filesystem/import/blender/blender_path>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filesystem/import/blender/rpc_port<class_EditorSettings_property_filesystem/import/blender/rpc_port>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`filesystem/import/blender/rpc_server_uptime<class_EditorSettings_property_filesystem/import/blender/rpc_server_uptime>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/import/fbx/fbx2gltf_path<class_EditorSettings_property_filesystem/import/fbx/fbx2gltf_path>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`filesystem/on_save/compress_binary_resources<class_EditorSettings_property_filesystem/on_save/compress_binary_resources>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename<class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`filesystem/tools/oidn/oidn_denoise_path<class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons<class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/automatically_open_screenshots<class_EditorSettings_property_interface/editor/automatically_open_screenshots>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/code_font<class_EditorSettings_property_interface/editor/code_font>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/code_font_contextual_ligatures<class_EditorSettings_property_interface/editor/code_font_contextual_ligatures>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/code_font_custom_opentype_features<class_EditorSettings_property_interface/editor/code_font_custom_opentype_features>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/code_font_custom_variations<class_EditorSettings_property_interface/editor/code_font_custom_variations>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/code_font_size<class_EditorSettings_property_interface/editor/code_font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/display_scale<class_EditorSettings_property_interface/editor/display_scale>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/dock_tab_style<class_EditorSettings_property_interface/editor/dock_tab_style>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/editor_language<class_EditorSettings_property_interface/editor/editor_language>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/editor_screen<class_EditorSettings_property_interface/editor/editor_screen>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/expand_to_title<class_EditorSettings_property_interface/editor/expand_to_title>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/font_antialiasing<class_EditorSettings_property_interface/editor/font_antialiasing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/font_disable_embedded_bitmaps<class_EditorSettings_property_interface/editor/font_disable_embedded_bitmaps>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/font_hinting<class_EditorSettings_property_interface/editor/font_hinting>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/font_subpixel_positioning<class_EditorSettings_property_interface/editor/font_subpixel_positioning>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/import_resources_when_unfocused<class_EditorSettings_property_interface/editor/import_resources_when_unfocused>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/localize_settings<class_EditorSettings_property_interface/editor/localize_settings>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/main_font<class_EditorSettings_property_interface/editor/main_font>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/editor/main_font_bold<class_EditorSettings_property_interface/editor/main_font_bold>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/main_font_size<class_EditorSettings_property_interface/editor/main_font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/mouse_extra_buttons_navigate_history<class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/project_manager_screen<class_EditorSettings_property_interface/editor/project_manager_screen>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/save_each_scene_on_quit<class_EditorSettings_property_interface/editor/save_each_scene_on_quit>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/save_on_focus_loss<class_EditorSettings_property_interface/editor/save_on_focus_loss>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/separate_distraction_mode<class_EditorSettings_property_interface/editor/separate_distraction_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/show_internal_errors_in_toast_notifications<class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/show_update_spinner<class_EditorSettings_property_interface/editor/show_update_spinner>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/ui_layout_direction<class_EditorSettings_property_interface/editor/ui_layout_direction>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/update_continuously<class_EditorSettings_property_interface/editor/update_continuously>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/use_embedded_menu<class_EditorSettings_property_interface/editor/use_embedded_menu>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/editor/use_native_file_dialogs<class_EditorSettings_property_interface/editor/use_native_file_dialogs>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/editor/vsync_mode<class_EditorSettings_property_interface/editor/vsync_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/auto_unfold_foreign_scenes<class_EditorSettings_property_interface/inspector/auto_unfold_foreign_scenes>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/inspector/default_color_picker_mode<class_EditorSettings_property_interface/inspector/default_color_picker_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/inspector/default_color_picker_shape<class_EditorSettings_property_interface/inspector/default_color_picker_shape>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/inspector/default_float_step<class_EditorSettings_property_interface/inspector/default_float_step>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/inspector/default_property_name_style<class_EditorSettings_property_interface/inspector/default_property_name_style>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/delimitate_all_container_and_resources<class_EditorSettings_property_interface/inspector/delimitate_all_container_and_resources>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/disable_folding<class_EditorSettings_property_interface/inspector/disable_folding>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/inspector/float_drag_speed<class_EditorSettings_property_interface/inspector/float_drag_speed>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/horizontal_vector2_editing<class_EditorSettings_property_interface/inspector/horizontal_vector2_editing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/horizontal_vector_types_editing<class_EditorSettings_property_interface/inspector/horizontal_vector_types_editing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/inspector/max_array_dictionary_items_per_page<class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/inspector/nested_color_mode<class_EditorSettings_property_interface/inspector/nested_color_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/open_resources_in_current_inspector<class_EditorSettings_property_interface/inspector/open_resources_in_current_inspector>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`interface/inspector/resources_to_open_in_new_inspector<class_EditorSettings_property_interface/inspector/resources_to_open_in_new_inspector>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/inspector/show_low_level_opentype_features<class_EditorSettings_property_interface/inspector/show_low_level_opentype_features>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/multi_window/enable<class_EditorSettings_property_interface/multi_window/enable>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/multi_window/maximize_window<class_EditorSettings_property_interface/multi_window/maximize_window>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/multi_window/restore_windows_on_load<class_EditorSettings_property_interface/multi_window/restore_windows_on_load>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/scene_tabs/display_close_button<class_EditorSettings_property_interface/scene_tabs/display_close_button>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/scene_tabs/maximum_width<class_EditorSettings_property_interface/scene_tabs/maximum_width>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/scene_tabs/restore_scenes_on_load<class_EditorSettings_property_interface/scene_tabs/restore_scenes_on_load>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/scene_tabs/show_script_button<class_EditorSettings_property_interface/scene_tabs/show_script_button>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/scene_tabs/show_thumbnail_on_hover<class_EditorSettings_property_interface/scene_tabs/show_thumbnail_on_hover>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`interface/theme/accent_color<class_EditorSettings_property_interface/theme/accent_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/theme/additional_spacing<class_EditorSettings_property_interface/theme/additional_spacing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`interface/theme/base_color<class_EditorSettings_property_interface/theme/base_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/theme/base_spacing<class_EditorSettings_property_interface/theme/base_spacing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/theme/border_size<class_EditorSettings_property_interface/theme/border_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/theme/contrast<class_EditorSettings_property_interface/theme/contrast>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/theme/corner_radius<class_EditorSettings_property_interface/theme/corner_radius>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/theme/custom_theme<class_EditorSettings_property_interface/theme/custom_theme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/theme/draw_extra_borders<class_EditorSettings_property_interface/theme/draw_extra_borders>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/theme/follow_system_theme<class_EditorSettings_property_interface/theme/follow_system_theme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`interface/theme/icon_and_font_color<class_EditorSettings_property_interface/theme/icon_and_font_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/theme/icon_saturation<class_EditorSettings_property_interface/theme/icon_saturation>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/theme/preset<class_EditorSettings_property_interface/theme/preset>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/theme/relationship_line_opacity<class_EditorSettings_property_interface/theme/relationship_line_opacity>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`interface/theme/spacing_preset<class_EditorSettings_property_interface/theme/spacing_preset>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/theme/use_system_accent_color<class_EditorSettings_property_interface/theme/use_system_accent_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/enable_long_press_as_right_click<class_EditorSettings_property_interface/touchscreen/enable_long_press_as_right_click>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures<class_EditorSettings_property_interface/touchscreen/enable_pan_and_scale_gestures>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`interface/touchscreen/increase_scrollbar_touch_area<class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`interface/touchscreen/scale_gizmo_handles<class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`network/connection/engine_version_update_mode<class_EditorSettings_property_network/connection/engine_version_update_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`network/connection/network_mode<class_EditorSettings_property_network/connection/network_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`network/debug/remote_host<class_EditorSettings_property_network/debug/remote_host>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`network/debug/remote_port<class_EditorSettings_property_network/debug/remote_port>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`network/http_proxy/host<class_EditorSettings_property_network/http_proxy/host>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`network/http_proxy/port<class_EditorSettings_property_network/http_proxy/port>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`network/tls/editor_tls_certificates<class_EditorSettings_property_network/tls/editor_tls_certificates>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`project_manager/default_renderer<class_EditorSettings_property_project_manager/default_renderer>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`project_manager/directory_naming_convention<class_EditorSettings_property_project_manager/directory_naming_convention>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`project_manager/sorting_order<class_EditorSettings_property_project_manager/sorting_order>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`run/auto_save/save_before_running<class_EditorSettings_property_run/auto_save/save_before_running>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/bottom_panel/action_on_play<class_EditorSettings_property_run/bottom_panel/action_on_play>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/bottom_panel/action_on_stop<class_EditorSettings_property_run/bottom_panel/action_on_stop>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`run/output/always_clear_output_on_play<class_EditorSettings_property_run/output/always_clear_output_on_play>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/output/font_size<class_EditorSettings_property_run/output/font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/output/max_lines<class_EditorSettings_property_run/output/max_lines>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`run/platforms/linuxbsd/prefer_wayland<class_EditorSettings_property_run/platforms/linuxbsd/prefer_wayland>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/window_placement/android_window<class_EditorSettings_property_run/window_placement/android_window>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/window_placement/rect<class_EditorSettings_property_run/window_placement/rect>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`run/window_placement/rect_custom_position<class_EditorSettings_property_run/window_placement/rect_custom_position>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`run/window_placement/screen<class_EditorSettings_property_run/window_placement/screen>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/caret_blink<class_EditorSettings_property_text_editor/appearance/caret/caret_blink>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`text_editor/appearance/caret/caret_blink_interval<class_EditorSettings_property_text_editor/appearance/caret/caret_blink_interval>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/highlight_all_occurrences<class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/caret/highlight_current_line<class_EditorSettings_property_text_editor/appearance/caret/highlight_current_line>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/caret/type<class_EditorSettings_property_text_editor/appearance/caret/type>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/guidelines/show_line_length_guidelines<class_EditorSettings_property_text_editor/appearance/guidelines/show_line_length_guidelines>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/highlight_type_safe_lines<class_EditorSettings_property_text_editor/appearance/gutters/highlight_type_safe_lines>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/line_numbers_zero_padded<class_EditorSettings_property_text_editor/appearance/gutters/line_numbers_zero_padded>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/show_info_gutter<class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/gutters/show_line_numbers<class_EditorSettings_property_text_editor/appearance/gutters/show_line_numbers>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/lines/autowrap_mode<class_EditorSettings_property_text_editor/appearance/lines/autowrap_mode>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/lines/code_folding<class_EditorSettings_property_text_editor/appearance/lines/code_folding>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/lines/word_wrap<class_EditorSettings_property_text_editor/appearance/lines/word_wrap>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/minimap/minimap_width<class_EditorSettings_property_text_editor/appearance/minimap/minimap_width>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/minimap/show_minimap<class_EditorSettings_property_text_editor/appearance/minimap/show_minimap>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/whitespace/draw_spaces<class_EditorSettings_property_text_editor/appearance/whitespace/draw_spaces>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/appearance/whitespace/draw_tabs<class_EditorSettings_property_text_editor/appearance/whitespace/draw_tabs>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/appearance/whitespace/line_spacing<class_EditorSettings_property_text_editor/appearance/whitespace/line_spacing>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change<class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/behavior/files/autosave_interval_secs<class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/convert_indent_on_save<class_EditorSettings_property_text_editor/behavior/files/convert_indent_on_save>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/restore_scripts_on_load<class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/trim_final_newlines_on_save<class_EditorSettings_property_text_editor/behavior/files/trim_final_newlines_on_save>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/files/trim_trailing_whitespace_on_save<class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/indent/auto_indent<class_EditorSettings_property_text_editor/behavior/indent/auto_indent>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/indent/indent_wrapped_lines<class_EditorSettings_property_text_editor/behavior/indent/indent_wrapped_lines>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/behavior/indent/size<class_EditorSettings_property_text_editor/behavior/indent/size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/behavior/indent/type<class_EditorSettings_property_text_editor/behavior/indent/type>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`text_editor/behavior/navigation/custom_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/custom_word_separators>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/drag_and_drop_selection<class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/move_caret_on_right_click<class_EditorSettings_property_text_editor/behavior/navigation/move_caret_on_right_click>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method<class_EditorSettings_property_text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/scroll_past_end_of_file<class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/smooth_scrolling<class_EditorSettings_property_text_editor/behavior/navigation/smooth_scrolling>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/stay_in_script_editor_on_node_selected<class_EditorSettings_property_text_editor/behavior/navigation/stay_in_script_editor_on_node_selected>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/use_custom_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/use_custom_word_separators>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/behavior/navigation/use_default_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/use_default_word_separators>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/behavior/navigation/v_scroll_speed<class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/add_node_path_literals<class_EditorSettings_property_text_editor/completion/add_node_path_literals>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/add_string_name_literals<class_EditorSettings_property_text_editor/completion/add_string_name_literals>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/add_type_hints<class_EditorSettings_property_text_editor/completion/add_type_hints>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/auto_brace_complete<class_EditorSettings_property_text_editor/completion/auto_brace_complete>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`text_editor/completion/code_complete_delay<class_EditorSettings_property_text_editor/completion/code_complete_delay>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/code_complete_enabled<class_EditorSettings_property_text_editor/completion/code_complete_enabled>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/colorize_suggestions<class_EditorSettings_property_text_editor/completion/colorize_suggestions>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/complete_file_paths<class_EditorSettings_property_text_editor/completion/complete_file_paths>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`text_editor/completion/idle_parse_delay<class_EditorSettings_property_text_editor/completion/idle_parse_delay>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/put_callhint_tooltip_below_current_line<class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/completion/use_single_quotes<class_EditorSettings_property_text_editor/completion/use_single_quotes>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/help/class_reference_examples<class_EditorSettings_property_text_editor/help/class_reference_examples>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/help/help_font_size<class_EditorSettings_property_text_editor/help/help_font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/help/help_source_font_size<class_EditorSettings_property_text_editor/help/help_source_font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_editor/help/help_title_font_size<class_EditorSettings_property_text_editor/help/help_title_font_size>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/help/show_help_index<class_EditorSettings_property_text_editor/help/show_help_index>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/script_list/show_members_overview<class_EditorSettings_property_text_editor/script_list/show_members_overview>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`text_editor/script_list/sort_members_outline_alphabetically<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`text_editor/theme/color_theme<class_EditorSettings_property_text_editor/theme/color_theme>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/background_color<class_EditorSettings_property_text_editor/theme/highlighting/background_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/base_type_color<class_EditorSettings_property_text_editor/theme/highlighting/base_type_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/bookmark_color<class_EditorSettings_property_text_editor/theme/highlighting/bookmark_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/brace_mismatch_color<class_EditorSettings_property_text_editor/theme/highlighting/brace_mismatch_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/breakpoint_color<class_EditorSettings_property_text_editor/theme/highlighting/breakpoint_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/caret_background_color<class_EditorSettings_property_text_editor/theme/highlighting/caret_background_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/caret_color<class_EditorSettings_property_text_editor/theme/highlighting/caret_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/code_folding_color<class_EditorSettings_property_text_editor/theme/highlighting/code_folding_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/comment_color<class_EditorSettings_property_text_editor/theme/highlighting/comment_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_background_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_background_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_existing_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_existing_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_font_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_font_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_scroll_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_scroll_hovered_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_hovered_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/completion_selected_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/control_flow_keyword_color<class_EditorSettings_property_text_editor/theme/highlighting/control_flow_keyword_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/current_line_color<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/doc_comment_color<class_EditorSettings_property_text_editor/theme/highlighting/doc_comment_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/engine_type_color<class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/executing_line_color<class_EditorSettings_property_text_editor/theme/highlighting/executing_line_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/folded_code_region_color<class_EditorSettings_property_text_editor/theme/highlighting/folded_code_region_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/function_color<class_EditorSettings_property_text_editor/theme/highlighting/function_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/keyword_color<class_EditorSettings_property_text_editor/theme/highlighting/keyword_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/line_length_guideline_color<class_EditorSettings_property_text_editor/theme/highlighting/line_length_guideline_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/line_number_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/mark_color<class_EditorSettings_property_text_editor/theme/highlighting/mark_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/member_variable_color<class_EditorSettings_property_text_editor/theme/highlighting/member_variable_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/number_color<class_EditorSettings_property_text_editor/theme/highlighting/number_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/safe_line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/search_result_border_color<class_EditorSettings_property_text_editor/theme/highlighting/search_result_border_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/search_result_color<class_EditorSettings_property_text_editor/theme/highlighting/search_result_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/selection_color<class_EditorSettings_property_text_editor/theme/highlighting/selection_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/string_color<class_EditorSettings_property_text_editor/theme/highlighting/string_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/symbol_color<class_EditorSettings_property_text_editor/theme/highlighting/symbol_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/text_color<class_EditorSettings_property_text_editor/theme/highlighting/text_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/text_selected_color<class_EditorSettings_property_text_editor/theme/highlighting/text_selected_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/user_type_color<class_EditorSettings_property_text_editor/theme/highlighting/user_type_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`text_editor/theme/highlighting/word_highlighted_color<class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color>` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -566,39 +710,39 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_info<class_EditorSettings_method_add_property_info>` **(** :ref:`Dictionary<class_Dictionary>` info **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`check_changed_settings_in_group<class_EditorSettings_method_check_changed_settings_in_group>` **(** :ref:`String<class_String>` setting_prefix **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase<class_EditorSettings_method_erase>` **(** :ref:`String<class_String>` property **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_changed_settings<class_EditorSettings_method_get_changed_settings>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_favorites<class_EditorSettings_method_get_favorites>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_project_metadata<class_EditorSettings_method_get_project_metadata>` **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` default=null **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recent_dirs<class_EditorSettings_method_get_recent_dirs>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_setting<class_EditorSettings_method_get_setting>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_setting<class_EditorSettings_method_has_setting>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mark_setting_changed<class_EditorSettings_method_mark_setting_changed>` **(** :ref:`String<class_String>` setting **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_builtin_action_override<class_EditorSettings_method_set_builtin_action_override>` **(** :ref:`String<class_String>` name, :ref:`InputEvent[]<class_InputEvent>` actions_list **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_favorites<class_EditorSettings_method_set_favorites>` **(** :ref:`PackedStringArray<class_PackedStringArray>` dirs **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_initial_value<class_EditorSettings_method_set_initial_value>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` update_current **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_project_metadata<class_EditorSettings_method_set_project_metadata>` **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` data **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_recent_dirs<class_EditorSettings_method_set_recent_dirs>` **(** :ref:`PackedStringArray<class_PackedStringArray>` dirs **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_setting<class_EditorSettings_method_set_setting>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property_info<class_EditorSettings_method_add_property_info>`\ (\ info\: :ref:`Dictionary<class_Dictionary>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`check_changed_settings_in_group<class_EditorSettings_method_check_changed_settings_in_group>`\ (\ setting_prefix\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase<class_EditorSettings_method_erase>`\ (\ property\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_changed_settings<class_EditorSettings_method_get_changed_settings>`\ (\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_favorites<class_EditorSettings_method_get_favorites>`\ (\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_project_metadata<class_EditorSettings_method_get_project_metadata>`\ (\ section\: :ref:`String<class_String>`, key\: :ref:`String<class_String>`, default\: :ref:`Variant<class_Variant>` = null\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recent_dirs<class_EditorSettings_method_get_recent_dirs>`\ (\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_setting<class_EditorSettings_method_get_setting>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_setting<class_EditorSettings_method_has_setting>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mark_setting_changed<class_EditorSettings_method_mark_setting_changed>`\ (\ setting\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_builtin_action_override<class_EditorSettings_method_set_builtin_action_override>`\ (\ name\: :ref:`String<class_String>`, actions_list\: :ref:`Array<class_Array>`\[:ref:`InputEvent<class_InputEvent>`\]\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_favorites<class_EditorSettings_method_set_favorites>`\ (\ dirs\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_initial_value<class_EditorSettings_method_set_initial_value>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, update_current\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_project_metadata<class_EditorSettings_method_set_project_metadata>`\ (\ section\: :ref:`String<class_String>`, key\: :ref:`String<class_String>`, data\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_recent_dirs<class_EditorSettings_method_set_recent_dirs>`\ (\ dirs\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting<class_EditorSettings_method_set_setting>`\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -613,7 +757,7 @@ Signals .. rst-class:: classref-signal -**settings_changed** **(** **)** +**settings_changed**\ (\ ) :ref:`🔗<class_EditorSettings_signal_settings_changed>` Emitted after any editor setting has changed. @@ -630,7 +774,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_EDITOR_SETTINGS_CHANGED** = ``10000`` +**NOTIFICATION_EDITOR_SETTINGS_CHANGED** = ``10000`` :ref:`🔗<class_EditorSettings_constant_NOTIFICATION_EDITOR_SETTINGS_CHANGED>` Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. @@ -647,7 +791,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **debugger/auto_switch_to_remote_scene_tree** +:ref:`bool<class_bool>` **debugger/auto_switch_to_remote_scene_tree** :ref:`🔗<class_EditorSettings_property_debugger/auto_switch_to_remote_scene_tree>` If ``true``, automatically switches to the **Remote** scene tree when running the project from the editor. If ``false``, stays on the **Local** scene tree when running the project from the editor. @@ -655,11 +799,23 @@ If ``true``, automatically switches to the **Remote** scene tree when running th ---- +.. _class_EditorSettings_property_debugger/profile_native_calls: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **debugger/profile_native_calls** :ref:`🔗<class_EditorSettings_property_debugger/profile_native_calls>` + +If ``true``, enables collection of profiling data from non-GDScript Godot functions, such as engine class methods. Enabling this slows execution while profiling further. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/profiler_frame_history_size: .. rst-class:: classref-property -:ref:`int<class_int>` **debugger/profiler_frame_history_size** +:ref:`int<class_int>` **debugger/profiler_frame_history_size** :ref:`🔗<class_EditorSettings_property_debugger/profiler_frame_history_size>` The size of the profiler's frame history. The default value (3600) allows seeing up to 60 seconds of profiling if the project renders at a constant 60 FPS. Higher values allow viewing longer periods of profiling in the graphs, especially when the project is running at high framerates. @@ -671,7 +827,7 @@ The size of the profiler's frame history. The default value (3600) allows seeing .. rst-class:: classref-property -:ref:`int<class_int>` **debugger/profiler_frame_max_functions** +:ref:`int<class_int>` **debugger/profiler_frame_max_functions** :ref:`🔗<class_EditorSettings_property_debugger/profiler_frame_max_functions>` The maximum number of script functions that can be displayed per frame in the profiler. If there are more script functions called in a given profiler frame, these functions will be discarded from the profiling results entirely. @@ -685,7 +841,7 @@ The maximum number of script functions that can be displayed per frame in the pr .. rst-class:: classref-property -:ref:`float<class_float>` **debugger/remote_inspect_refresh_interval** +:ref:`float<class_float>` **debugger/remote_inspect_refresh_interval** :ref:`🔗<class_EditorSettings_property_debugger/remote_inspect_refresh_interval>` The refresh interval for the remote inspector's properties (in seconds). Lower values are more reactive, but may cause stuttering while the project is running from the editor and the **Remote** scene tree is selected in the Scene tree dock. @@ -697,7 +853,7 @@ The refresh interval for the remote inspector's properties (in seconds). Lower v .. rst-class:: classref-property -:ref:`float<class_float>` **debugger/remote_scene_tree_refresh_interval** +:ref:`float<class_float>` **debugger/remote_scene_tree_refresh_interval** :ref:`🔗<class_EditorSettings_property_debugger/remote_scene_tree_refresh_interval>` The refresh interval for the remote scene tree (in seconds). Lower values are more reactive, but may cause stuttering while the project is running from the editor and the **Remote** scene tree is selected in the Scene tree dock. @@ -709,7 +865,7 @@ The refresh interval for the remote scene tree (in seconds). Lower values are mo .. rst-class:: classref-property -:ref:`bool<class_bool>` **docks/filesystem/always_show_folders** +:ref:`bool<class_bool>` **docks/filesystem/always_show_folders** :ref:`🔗<class_EditorSettings_property_docks/filesystem/always_show_folders>` If ``true``, displays folders in the FileSystem dock's bottom pane when split mode is enabled. If ``false``, only files will be displayed in the bottom pane. Split mode can be toggled by pressing the icon next to the ``res://`` folder path. @@ -723,7 +879,7 @@ If ``true``, displays folders in the FileSystem dock's bottom pane when split mo .. rst-class:: classref-property -:ref:`String<class_String>` **docks/filesystem/textfile_extensions** +:ref:`String<class_String>` **docks/filesystem/textfile_extensions** :ref:`🔗<class_EditorSettings_property_docks/filesystem/textfile_extensions>` List of file extensions to consider as editable text files in the FileSystem dock (by double-clicking on the files). @@ -735,7 +891,7 @@ List of file extensions to consider as editable text files in the FileSystem doc .. rst-class:: classref-property -:ref:`int<class_int>` **docks/filesystem/thumbnail_size** +:ref:`int<class_int>` **docks/filesystem/thumbnail_size** :ref:`🔗<class_EditorSettings_property_docks/filesystem/thumbnail_size>` The thumbnail size to use in the FileSystem dock (in pixels). See also :ref:`filesystem/file_dialog/thumbnail_size<class_EditorSettings_property_filesystem/file_dialog/thumbnail_size>`. @@ -747,7 +903,7 @@ The thumbnail size to use in the FileSystem dock (in pixels). See also :ref:`fil .. rst-class:: classref-property -:ref:`float<class_float>` **docks/property_editor/auto_refresh_interval** +:ref:`float<class_float>` **docks/property_editor/auto_refresh_interval** :ref:`🔗<class_EditorSettings_property_docks/property_editor/auto_refresh_interval>` The refresh interval to use for the Inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector refresh more often, but take up more CPU time. @@ -759,7 +915,7 @@ The refresh interval to use for the Inspector dock's properties. The effect of t .. rst-class:: classref-property -:ref:`float<class_float>` **docks/property_editor/subresource_hue_tint** +:ref:`float<class_float>` **docks/property_editor/subresource_hue_tint** :ref:`🔗<class_EditorSettings_property_docks/property_editor/subresource_hue_tint>` The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. @@ -771,7 +927,7 @@ The tint intensity to use for the subresources background in the Inspector dock. .. rst-class:: classref-property -:ref:`bool<class_bool>` **docks/scene_tree/auto_expand_to_selected** +:ref:`bool<class_bool>` **docks/scene_tree/auto_expand_to_selected** :ref:`🔗<class_EditorSettings_property_docks/scene_tree/auto_expand_to_selected>` If ``true``, the scene tree dock will automatically unfold nodes when a node that has folded parents is selected. @@ -779,11 +935,23 @@ If ``true``, the scene tree dock will automatically unfold nodes when a node tha ---- +.. _class_EditorSettings_property_docks/scene_tree/center_node_on_reparent: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **docks/scene_tree/center_node_on_reparent** :ref:`🔗<class_EditorSettings_property_docks/scene_tree/center_node_on_reparent>` + +If ``true``, new node created when reparenting node(s) will be positioned at the average position of the selected node(s). + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded: .. rst-class:: classref-property -:ref:`bool<class_bool>` **docks/scene_tree/start_create_dialog_fully_expanded** +:ref:`bool<class_bool>` **docks/scene_tree/start_create_dialog_fully_expanded** :ref:`🔗<class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded>` If ``true``, the Create dialog (Create New Node/Create New Resource) will start with all its sections expanded. Otherwise, sections will be collapsed until the user starts searching (which will automatically expand sections as needed). @@ -795,7 +963,7 @@ If ``true``, the Create dialog (Create New Node/Create New Resource) will start .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/bone_color1** +:ref:`Color<class_Color>` **editors/2d/bone_color1** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_color1>` The "start" stop of the color gradient to use for bones in the 2D skeleton editor. @@ -807,7 +975,7 @@ The "start" stop of the color gradient to use for bones in the 2D skeleton edito .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/bone_color2** +:ref:`Color<class_Color>` **editors/2d/bone_color2** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_color2>` The "end" stop of the color gradient to use for bones in the 2D skeleton editor. @@ -819,7 +987,7 @@ The "end" stop of the color gradient to use for bones in the 2D skeleton editor. .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/bone_ik_color** +:ref:`Color<class_Color>` **editors/2d/bone_ik_color** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_ik_color>` The color to use for inverse kinematics-enabled bones in the 2D skeleton editor. @@ -831,7 +999,7 @@ The color to use for inverse kinematics-enabled bones in the 2D skeleton editor. .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/bone_outline_color** +:ref:`Color<class_Color>` **editors/2d/bone_outline_color** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_outline_color>` The outline color to use for non-selected bones in the 2D skeleton editor. See also :ref:`editors/2d/bone_selected_color<class_EditorSettings_property_editors/2d/bone_selected_color>`. @@ -843,10 +1011,12 @@ The outline color to use for non-selected bones in the 2D skeleton editor. See a .. rst-class:: classref-property -:ref:`int<class_int>` **editors/2d/bone_outline_size** +:ref:`float<class_float>` **editors/2d/bone_outline_size** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_outline_size>` The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_width<class_EditorSettings_property_editors/2d/bone_width>`. +\ **Note:** Changes to this value only apply after modifying a :ref:`Bone2D<class_Bone2D>` node in any way, or closing and reopening the scene. + .. rst-class:: classref-item-separator ---- @@ -855,7 +1025,7 @@ The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2 .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/bone_selected_color** +:ref:`Color<class_Color>` **editors/2d/bone_selected_color** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_selected_color>` The color to use for selected bones in the 2D skeleton editor. See also :ref:`editors/2d/bone_outline_color<class_EditorSettings_property_editors/2d/bone_outline_color>`. @@ -867,10 +1037,12 @@ The color to use for selected bones in the 2D skeleton editor. See also :ref:`ed .. rst-class:: classref-property -:ref:`int<class_int>` **editors/2d/bone_width** +:ref:`float<class_float>` **editors/2d/bone_width** :ref:`🔗<class_EditorSettings_property_editors/2d/bone_width>` The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_outline_size<class_EditorSettings_property_editors/2d/bone_outline_size>`. +\ **Note:** Changes to this value only apply after modifying a :ref:`Bone2D<class_Bone2D>` node in any way, or closing and reopening the scene. + .. rst-class:: classref-item-separator ---- @@ -879,7 +1051,7 @@ The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/ .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/grid_color** +:ref:`Color<class_Color>` **editors/2d/grid_color** :ref:`🔗<class_EditorSettings_property_editors/2d/grid_color>` The grid color to use in the 2D editor. @@ -891,7 +1063,7 @@ The grid color to use in the 2D editor. .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/guides_color** +:ref:`Color<class_Color>` **editors/2d/guides_color** :ref:`🔗<class_EditorSettings_property_editors/2d/guides_color>` The guides color to use in the 2D editor. Guides can be created by dragging the mouse cursor from the rulers. @@ -903,7 +1075,7 @@ The guides color to use in the 2D editor. Guides can be created by dragging the .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/smart_snapping_line_color** +:ref:`Color<class_Color>` **editors/2d/smart_snapping_line_color** :ref:`🔗<class_EditorSettings_property_editors/2d/smart_snapping_line_color>` The color to use when drawing smart snapping lines in the 2D editor. The smart snapping lines will automatically display when moving 2D nodes if smart snapping is enabled in the Snapping Options menu at the top of the 2D editor viewport. @@ -915,7 +1087,7 @@ The color to use when drawing smart snapping lines in the 2D editor. The smart s .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/2d/use_integer_zoom_by_default** +:ref:`bool<class_bool>` **editors/2d/use_integer_zoom_by_default** :ref:`🔗<class_EditorSettings_property_editors/2d/use_integer_zoom_by_default>` If ``true``, the 2D editor will snap to integer zoom values while not holding the :kbd:`Alt` key and powers of two while holding it. If ``false``, this behavior is swapped. @@ -927,7 +1099,7 @@ If ``true``, the 2D editor will snap to integer zoom values while not holding th .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/2d/viewport_border_color** +:ref:`Color<class_Color>` **editors/2d/viewport_border_color** :ref:`🔗<class_EditorSettings_property_editors/2d/viewport_border_color>` The color of the viewport border in the 2D editor. This border represents the viewport's size at the base resolution defined in the Project Settings. Objects placed outside this border will not be visible unless a :ref:`Camera2D<class_Camera2D>` node is used, or unless the window is resized and the stretch mode is set to ``disabled``. @@ -939,9 +1111,11 @@ The color of the viewport border in the 2D editor. This border represents the vi .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/default_fov** +:ref:`float<class_float>` **editors/3d/default_fov** :ref:`🔗<class_EditorSettings_property_editors/3d/default_fov>` + +The default camera vertical field of view to use in the 3D editor (in degrees). The camera field of view can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera field of view adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a :ref:`Camera3D<class_Camera3D>` node is being previewed in the editor. -The default camera field of view to use in the 3D editor (in degrees). The camera field of view can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera field of view adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. +\ **Note:** The editor camera always uses the **Keep Height** aspect mode. .. rst-class:: classref-item-separator @@ -951,9 +1125,9 @@ The default camera field of view to use in the 3D editor (in degrees). The camer .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/default_z_far** +:ref:`float<class_float>` **editors/3d/default_z_far** :ref:`🔗<class_EditorSettings_property_editors/3d/default_z_far>` -The default camera far clip distance to use in the 3D editor (in degrees). Higher values make it possible to view objects placed further away from the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera far clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera far clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. +The default camera far clip distance to use in the 3D editor (in degrees). Higher values make it possible to view objects placed further away from the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera far clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera far clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a :ref:`Camera3D<class_Camera3D>` node is being previewed in the editor. .. rst-class:: classref-item-separator @@ -963,9 +1137,9 @@ The default camera far clip distance to use in the 3D editor (in degrees). Highe .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/default_z_near** +:ref:`float<class_float>` **editors/3d/default_z_near** :ref:`🔗<class_EditorSettings_property_editors/3d/default_z_near>` -The default camera near clip distance to use in the 3D editor (in degrees). Lower values make it possible to view objects placed closer to the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera near clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera near clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a Camera3D node is being previewed in the editor. +The default camera near clip distance to use in the 3D editor (in degrees). Lower values make it possible to view objects placed closer to the camera, at the cost of lower precision in the depth buffer (which can result in visible Z-fighting in the distance). The camera near clip distance can be adjusted on a per-scene basis using the **View** menu at the top of the 3D editor. If a scene had its camera near clip distance adjusted using the **View** menu, this setting is ignored in the scene in question. This setting is also ignored while a :ref:`Camera3D<class_Camera3D>` node is being previewed in the editor. .. rst-class:: classref-item-separator @@ -975,7 +1149,7 @@ The default camera near clip distance to use in the 3D editor (in degrees). Lowe .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/freelook/freelook_activation_modifier** +:ref:`int<class_int>` **editors/3d/freelook/freelook_activation_modifier** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_activation_modifier>` The modifier key to use to enable freelook in the 3D editor (on top of pressing the right mouse button). @@ -991,7 +1165,7 @@ The modifier key to use to enable freelook in the 3D editor (on top of pressing .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/freelook/freelook_base_speed** +:ref:`float<class_float>` **editors/3d/freelook/freelook_base_speed** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_base_speed>` The base 3D freelook speed in units per second. This can be adjusted by using the mouse wheel while in freelook mode, or by holding down the "fast" or "slow" modifier keys (:kbd:`Shift` and :kbd:`Alt` by default, respectively). @@ -1003,7 +1177,7 @@ The base 3D freelook speed in units per second. This can be adjusted by using th .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/freelook/freelook_inertia** +:ref:`float<class_float>` **editors/3d/freelook/freelook_inertia** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_inertia>` The inertia of the 3D freelook camera. Higher values make the camera start and stop slower, which looks smoother but adds latency. @@ -1015,7 +1189,7 @@ The inertia of the 3D freelook camera. Higher values make the camera start and s .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/freelook/freelook_navigation_scheme** +:ref:`int<class_int>` **editors/3d/freelook/freelook_navigation_scheme** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_navigation_scheme>` The navigation scheme to use when freelook is enabled in the 3D editor. Some of the navigation schemes below may be more convenient when designing specific levels in the 3D editor. @@ -1035,7 +1209,7 @@ See also :ref:`editors/3d/navigation/navigation_scheme<class_EditorSettings_prop .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/freelook/freelook_sensitivity** +:ref:`float<class_float>` **editors/3d/freelook/freelook_sensitivity** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity>` The mouse sensitivity to use while freelook mode is active in the 3D editor. See also :ref:`editors/3d/navigation_feel/orbit_sensitivity<class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity>`. @@ -1047,7 +1221,7 @@ The mouse sensitivity to use while freelook mode is active in the 3D editor. See .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/freelook/freelook_speed_zoom_link** +:ref:`bool<class_bool>` **editors/3d/freelook/freelook_speed_zoom_link** :ref:`🔗<class_EditorSettings_property_editors/3d/freelook/freelook_speed_zoom_link>` If ``true``, freelook speed is linked to the zoom value used in the camera orbit mode in the 3D editor. @@ -1059,7 +1233,7 @@ If ``true``, freelook speed is linked to the zoom value used in the camera orbit .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/grid_division_level_bias** +:ref:`float<class_float>` **editors/3d/grid_division_level_bias** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_division_level_bias>` The grid division bias to use in the 3D editor. Negative values will cause small grid divisions to appear earlier, whereas positive values will cause small grid divisions to appear later. @@ -1071,9 +1245,9 @@ The grid division bias to use in the 3D editor. Negative values will cause small .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/grid_division_level_max** +:ref:`int<class_int>` **editors/3d/grid_division_level_max** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_division_level_max>` -The largest grid division to use in the 3D editor. Together with :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>`, this determines how large the grid divisions can be. The grid divisions will not be able to get larger than ``primary_grid_steps ^ grid_division_level_max`` units. By default, when :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>` is ``8``, this means grid divisions cannot get larger than ``64`` uints each (so primary grid lines are ``512`` uints apart), no matter how far away the camera is from the grid. +The largest grid division to use in the 3D editor. Together with :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>`, this determines how large the grid divisions can be. The grid divisions will not be able to get larger than ``primary_grid_steps ^ grid_division_level_max`` units. By default, when :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>` is ``8``, this means grid divisions cannot get larger than ``64`` units each (so primary grid lines are ``512`` units apart), no matter how far away the camera is from the grid. .. rst-class:: classref-item-separator @@ -1083,7 +1257,7 @@ The largest grid division to use in the 3D editor. Together with :ref:`editors/3 .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/grid_division_level_min** +:ref:`int<class_int>` **editors/3d/grid_division_level_min** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_division_level_min>` The smallest grid division to use in the 3D editor. Together with :ref:`editors/3d/primary_grid_steps<class_EditorSettings_property_editors/3d/primary_grid_steps>`, this determines how small the grid divisions can be. The grid divisions will not be able to get smaller than ``primary_grid_steps ^ grid_division_level_min`` units. By default, this means grid divisions cannot get smaller than 1 unit each, no matter how close the camera is from the grid. @@ -1095,7 +1269,7 @@ The smallest grid division to use in the 3D editor. Together with :ref:`editors/ .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/grid_size** +:ref:`int<class_int>` **editors/3d/grid_size** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_size>` The grid size in units. Higher values prevent the grid from appearing "cut off" at certain angles, but make the grid more demanding to render. Depending on the camera's position, the grid may not be fully visible since a shader is used to fade it progressively. @@ -1107,7 +1281,7 @@ The grid size in units. Higher values prevent the grid from appearing "cut off" .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/grid_xy_plane** +:ref:`bool<class_bool>` **editors/3d/grid_xy_plane** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_xy_plane>` If ``true``, render the grid on an XY plane. This can be useful for 3D side-scrolling games. @@ -1119,7 +1293,7 @@ If ``true``, render the grid on an XY plane. This can be useful for 3D side-scro .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/grid_xz_plane** +:ref:`bool<class_bool>` **editors/3d/grid_xz_plane** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_xz_plane>` If ``true``, render the grid on an XZ plane. @@ -1131,7 +1305,7 @@ If ``true``, render the grid on an XZ plane. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/grid_yz_plane** +:ref:`bool<class_bool>` **editors/3d/grid_yz_plane** :ref:`🔗<class_EditorSettings_property_editors/3d/grid_yz_plane>` If ``true``, render the grid on a YZ plane. This can be useful for 3D side-scrolling games. @@ -1143,7 +1317,7 @@ If ``true``, render the grid on a YZ plane. This can be useful for 3D side-scrol .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/navigation/emulate_3_button_mouse** +:ref:`bool<class_bool>` **editors/3d/navigation/emulate_3_button_mouse** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/emulate_3_button_mouse>` If ``true``, enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad. @@ -1159,7 +1333,7 @@ When 3-button mouse emulation mode is enabled, the pan, zoom and orbit modifiers .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/navigation/emulate_numpad** +:ref:`bool<class_bool>` **editors/3d/navigation/emulate_numpad** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/emulate_numpad>` If ``true``, allows using the top row :kbd:`0`-:kbd:`9` keys to function as their equivalent numpad keys for 3D editor navigation. This should be enabled on keyboards that have no numeric keypad available. @@ -1171,7 +1345,7 @@ If ``true``, allows using the top row :kbd:`0`-:kbd:`9` keys to function as thei .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/navigation/invert_x_axis** +:ref:`bool<class_bool>` **editors/3d/navigation/invert_x_axis** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/invert_x_axis>` If ``true``, invert the horizontal mouse axis when panning or orbiting in the 3D editor. This setting does *not* apply to freelook mode. @@ -1183,7 +1357,7 @@ If ``true``, invert the horizontal mouse axis when panning or orbiting in the 3D .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/navigation/invert_y_axis** +:ref:`bool<class_bool>` **editors/3d/navigation/invert_y_axis** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/invert_y_axis>` If ``true``, invert the vertical mouse axis when panning, orbiting, or using freelook mode in the 3D editor. @@ -1195,7 +1369,7 @@ If ``true``, invert the vertical mouse axis when panning, orbiting, or using fre .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/navigation/navigation_scheme** +:ref:`int<class_int>` **editors/3d/navigation/navigation_scheme** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/navigation_scheme>` The navigation scheme to use in the 3D editor. Changing this setting will affect the mouse buttons that must be held down to perform certain operations in the 3D editor viewport. @@ -1217,7 +1391,7 @@ See also :ref:`editors/3d/freelook/freelook_navigation_scheme<class_EditorSettin .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/navigation/orbit_modifier** +:ref:`int<class_int>` **editors/3d/navigation/orbit_modifier** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/orbit_modifier>` The modifier key that must be held to orbit in the 3D editor. @@ -1233,7 +1407,7 @@ The modifier key that must be held to orbit in the 3D editor. .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/navigation/pan_modifier** +:ref:`int<class_int>` **editors/3d/navigation/pan_modifier** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/pan_modifier>` The modifier key that must be held to pan in the 3D editor. @@ -1247,7 +1421,7 @@ The modifier key that must be held to pan in the 3D editor. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/3d/navigation/warped_mouse_panning** +:ref:`bool<class_bool>` **editors/3d/navigation/warped_mouse_panning** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/warped_mouse_panning>` If ``true``, warps the mouse around the 3D viewport while panning in the 3D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. @@ -1259,7 +1433,7 @@ If ``true``, warps the mouse around the 3D viewport while panning in the 3D edit .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/navigation/zoom_modifier** +:ref:`int<class_int>` **editors/3d/navigation/zoom_modifier** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/zoom_modifier>` The modifier key that must be held to zoom in the 3D editor. @@ -1273,7 +1447,7 @@ The modifier key that must be held to zoom in the 3D editor. .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/navigation/zoom_style** +:ref:`int<class_int>` **editors/3d/navigation/zoom_style** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation/zoom_style>` The mouse cursor movement direction to use when zooming by moving the mouse. This does not affect zooming with the mouse wheel. @@ -1285,7 +1459,7 @@ The mouse cursor movement direction to use when zooming by moving the mouse. Thi .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/navigation_feel/orbit_inertia** +:ref:`float<class_float>` **editors/3d/navigation_feel/orbit_inertia** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation_feel/orbit_inertia>` The inertia to use when orbiting in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. @@ -1297,7 +1471,7 @@ The inertia to use when orbiting in the 3D editor. Higher values make the camera .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/navigation_feel/orbit_sensitivity** +:ref:`float<class_float>` **editors/3d/navigation_feel/orbit_sensitivity** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation_feel/orbit_sensitivity>` The mouse sensitivity to use when orbiting in the 3D editor. See also :ref:`editors/3d/freelook/freelook_sensitivity<class_EditorSettings_property_editors/3d/freelook/freelook_sensitivity>`. @@ -1309,7 +1483,7 @@ The mouse sensitivity to use when orbiting in the 3D editor. See also :ref:`edit .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/navigation_feel/translation_inertia** +:ref:`float<class_float>` **editors/3d/navigation_feel/translation_inertia** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation_feel/translation_inertia>` The inertia to use when panning in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. @@ -1321,7 +1495,7 @@ The inertia to use when panning in the 3D editor. Higher values make the camera .. rst-class:: classref-property -:ref:`float<class_float>` **editors/3d/navigation_feel/zoom_inertia** +:ref:`float<class_float>` **editors/3d/navigation_feel/zoom_inertia** :ref:`🔗<class_EditorSettings_property_editors/3d/navigation_feel/zoom_inertia>` The inertia to use when zooming in the 3D editor. Higher values make the camera start and stop slower, which looks smoother but adds latency. @@ -1333,7 +1507,7 @@ The inertia to use when zooming in the 3D editor. Higher values make the camera .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d/primary_grid_color** +:ref:`Color<class_Color>` **editors/3d/primary_grid_color** :ref:`🔗<class_EditorSettings_property_editors/3d/primary_grid_color>` The color to use for the primary 3D grid. The color's alpha channel affects the grid's opacity. @@ -1345,7 +1519,7 @@ The color to use for the primary 3D grid. The color's alpha channel affects the .. rst-class:: classref-property -:ref:`int<class_int>` **editors/3d/primary_grid_steps** +:ref:`int<class_int>` **editors/3d/primary_grid_steps** :ref:`🔗<class_EditorSettings_property_editors/3d/primary_grid_steps>` If set above 0, where a primary grid line should be drawn. By default, primary lines are configured to be more visible than secondary lines. This helps with measurements in the 3D editor. See also :ref:`editors/3d/primary_grid_color<class_EditorSettings_property_editors/3d/primary_grid_color>` and :ref:`editors/3d/secondary_grid_color<class_EditorSettings_property_editors/3d/secondary_grid_color>`. @@ -1357,7 +1531,7 @@ If set above 0, where a primary grid line should be drawn. By default, primary l .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d/secondary_grid_color** +:ref:`Color<class_Color>` **editors/3d/secondary_grid_color** :ref:`🔗<class_EditorSettings_property_editors/3d/secondary_grid_color>` The color to use for the secondary 3D grid. This is generally a less visible color than :ref:`editors/3d/primary_grid_color<class_EditorSettings_property_editors/3d/primary_grid_color>`. The color's alpha channel affects the grid's opacity. @@ -1369,7 +1543,7 @@ The color to use for the secondary 3D grid. This is generally a less visible col .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d/selection_box_color** +:ref:`Color<class_Color>` **editors/3d/selection_box_color** :ref:`🔗<class_EditorSettings_property_editors/3d/selection_box_color>` The color to use for the selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity. @@ -1377,37 +1551,37 @@ The color to use for the selection box that surrounds selected nodes in the 3D e ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb: .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/instantiated** +:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/aabb** :ref:`🔗<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/aabb>` -The color override to use for 3D editor gizmos if the :ref:`Node3D<class_Node3D>` in question is part of an instantiated scene file (from the perspective of the current scene). +The color to use for the AABB gizmo that displays the :ref:`GeometryInstance3D<class_GeometryInstance3D>`'s custom :ref:`AABB<class_AABB>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint: +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/joint** +:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/instantiated** :ref:`🔗<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated>` -The 3D editor gizmo color for :ref:`Joint3D<class_Joint3D>`\ s and :ref:`PhysicalBone3D<class_PhysicalBone3D>`\ s. +The color override to use for 3D editor gizmos if the :ref:`Node3D<class_Node3D>` in question is part of an instantiated scene file (from the perspective of the current scene). .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/shape: +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint: .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/shape** +:ref:`Color<class_Color>` **editors/3d_gizmos/gizmo_colors/joint** :ref:`🔗<class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/joint>` -The 3D editor gizmo color for :ref:`CollisionShape3D<class_CollisionShape3D>`\ s, :ref:`VehicleWheel3D<class_VehicleWheel3D>`\ s, :ref:`RayCast3D<class_RayCast3D>`\ s and :ref:`SpringArm3D<class_SpringArm3D>`\ s. +The 3D editor gizmo color for :ref:`Joint3D<class_Joint3D>`\ s and :ref:`PhysicalBone3D<class_PhysicalBone3D>`\ s. .. rst-class:: classref-item-separator @@ -1417,7 +1591,7 @@ The 3D editor gizmo color for :ref:`CollisionShape3D<class_CollisionShape3D>`\ s .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/animation/autorename_animation_tracks** +:ref:`bool<class_bool>` **editors/animation/autorename_animation_tracks** :ref:`🔗<class_EditorSettings_property_editors/animation/autorename_animation_tracks>` If ``true``, automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. @@ -1425,23 +1599,11 @@ If ``true``, automatically updates animation tracks' target paths when renaming ---- -.. _class_EditorSettings_property_editors/animation/confirm_insert_track: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **editors/animation/confirm_insert_track** - -If ``true``, display a confirmation dialog when adding a new track to an animation by pressing the "key" icon next to a property. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/animation/default_create_bezier_tracks** +:ref:`bool<class_bool>` **editors/animation/default_create_bezier_tracks** :ref:`🔗<class_EditorSettings_property_editors/animation/default_create_bezier_tracks>` If ``true``, create a Bezier track instead of a standard track when pressing the "key" icon next to a property. Bezier tracks provide more control over animation curves, but are more difficult to adjust quickly. @@ -1453,7 +1615,7 @@ If ``true``, create a Bezier track instead of a standard track when pressing the .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/animation/default_create_reset_tracks** +:ref:`bool<class_bool>` **editors/animation/default_create_reset_tracks** :ref:`🔗<class_EditorSettings_property_editors/animation/default_create_reset_tracks>` If ``true``, create a ``RESET`` track when creating a new animation track. This track can be used to restore the animation to a "default" state. @@ -1465,7 +1627,7 @@ If ``true``, create a ``RESET`` track when creating a new animation track. This .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/animation/onion_layers_future_color** +:ref:`Color<class_Color>` **editors/animation/onion_layers_future_color** :ref:`🔗<class_EditorSettings_property_editors/animation/onion_layers_future_color>` The modulate color to use for "future" frames displayed in the animation editor's onion skinning feature. @@ -1477,7 +1639,7 @@ The modulate color to use for "future" frames displayed in the animation editor' .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/animation/onion_layers_past_color** +:ref:`Color<class_Color>` **editors/animation/onion_layers_past_color** :ref:`🔗<class_EditorSettings_property_editors/animation/onion_layers_past_color>` The modulate color to use for "past" frames displayed in the animation editor's onion skinning feature. @@ -1489,7 +1651,7 @@ The modulate color to use for "past" frames displayed in the animation editor's .. rst-class:: classref-property -:ref:`float<class_float>` **editors/grid_map/pick_distance** +:ref:`float<class_float>` **editors/grid_map/pick_distance** :ref:`🔗<class_EditorSettings_property_editors/grid_map/pick_distance>` The maximum distance at which tiles can be placed on a GridMap, relative to the camera position (in 3D units). @@ -1501,7 +1663,7 @@ The maximum distance at which tiles can be placed on a GridMap, relative to the .. rst-class:: classref-property -:ref:`int<class_int>` **editors/panning/2d_editor_pan_speed** +:ref:`int<class_int>` **editors/panning/2d_editor_pan_speed** :ref:`🔗<class_EditorSettings_property_editors/panning/2d_editor_pan_speed>` The panning speed when using the mouse wheel or touchscreen events in the 2D editor. This setting does not apply to panning by holding down the middle or right mouse buttons. @@ -1513,7 +1675,7 @@ The panning speed when using the mouse wheel or touchscreen events in the 2D edi .. rst-class:: classref-property -:ref:`int<class_int>` **editors/panning/2d_editor_panning_scheme** +:ref:`int<class_int>` **editors/panning/2d_editor_panning_scheme** :ref:`🔗<class_EditorSettings_property_editors/panning/2d_editor_panning_scheme>` Controls whether the mouse wheel scroll zooms or pans in the 2D editor. See also :ref:`editors/panning/sub_editors_panning_scheme<class_EditorSettings_property_editors/panning/sub_editors_panning_scheme>` and :ref:`editors/panning/animation_editors_panning_scheme<class_EditorSettings_property_editors/panning/animation_editors_panning_scheme>`. @@ -1525,7 +1687,7 @@ Controls whether the mouse wheel scroll zooms or pans in the 2D editor. See also .. rst-class:: classref-property -:ref:`int<class_int>` **editors/panning/animation_editors_panning_scheme** +:ref:`int<class_int>` **editors/panning/animation_editors_panning_scheme** :ref:`🔗<class_EditorSettings_property_editors/panning/animation_editors_panning_scheme>` Controls whether the mouse wheel scroll zooms or pans in the animation track and Bezier editors. See also :ref:`editors/panning/2d_editor_panning_scheme<class_EditorSettings_property_editors/panning/2d_editor_panning_scheme>` and :ref:`editors/panning/sub_editors_panning_scheme<class_EditorSettings_property_editors/panning/sub_editors_panning_scheme>` (which controls the animation blend tree editor's pan behavior). @@ -1537,7 +1699,7 @@ Controls whether the mouse wheel scroll zooms or pans in the animation track and .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/panning/simple_panning** +:ref:`bool<class_bool>` **editors/panning/simple_panning** :ref:`🔗<class_EditorSettings_property_editors/panning/simple_panning>` If ``true``, allows panning by holding down :kbd:`Space` in the 2D editor viewport (in addition to panning with the middle or right mouse buttons). If ``false``, the left mouse button must be held down while holding down :kbd:`Space` to pan in the 2D editor viewport. @@ -1549,7 +1711,7 @@ If ``true``, allows panning by holding down :kbd:`Space` in the 2D editor viewpo .. rst-class:: classref-property -:ref:`int<class_int>` **editors/panning/sub_editors_panning_scheme** +:ref:`int<class_int>` **editors/panning/sub_editors_panning_scheme** :ref:`🔗<class_EditorSettings_property_editors/panning/sub_editors_panning_scheme>` Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of affected subeditors is: animation blend tree editor, :ref:`Polygon2D<class_Polygon2D>` editor, tileset editor, texture region editor and visual shader editor. See also :ref:`editors/panning/2d_editor_panning_scheme<class_EditorSettings_property_editors/panning/2d_editor_panning_scheme>` and :ref:`editors/panning/animation_editors_panning_scheme<class_EditorSettings_property_editors/panning/animation_editors_panning_scheme>`. @@ -1561,7 +1723,7 @@ Controls whether the mouse wheel scroll zooms or pans in subeditors. The list of .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/panning/warped_mouse_panning** +:ref:`bool<class_bool>` **editors/panning/warped_mouse_panning** :ref:`🔗<class_EditorSettings_property_editors/panning/warped_mouse_panning>` If ``true``, warps the mouse around the 2D viewport while panning in the 2D editor. This makes it possible to pan over a large area without having to exit panning and adjust the mouse cursor. @@ -1569,11 +1731,23 @@ If ``true``, warps the mouse around the 2D viewport while panning in the 2D edit ---- +.. _class_EditorSettings_property_editors/polygon_editor/auto_bake_delay: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **editors/polygon_editor/auto_bake_delay** :ref:`🔗<class_EditorSettings_property_editors/polygon_editor/auto_bake_delay>` + +The delay in seconds until more complex and performance costly polygon editors commit their outlines, e.g. the 2D navigation polygon editor rebakes the navigation mesh polygons. A negative value stops the auto bake. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/polygon_editor/point_grab_radius: .. rst-class:: classref-property -:ref:`int<class_int>` **editors/polygon_editor/point_grab_radius** +:ref:`int<class_int>` **editors/polygon_editor/point_grab_radius** :ref:`🔗<class_EditorSettings_property_editors/polygon_editor/point_grab_radius>` The radius in which points can be selected in the :ref:`Polygon2D<class_Polygon2D>` and :ref:`CollisionPolygon2D<class_CollisionPolygon2D>` editors (in pixels). Higher values make it easier to select points quickly, but can make it more difficult to select the expected point when several points are located close to each other. @@ -1585,7 +1759,7 @@ The radius in which points can be selected in the :ref:`Polygon2D<class_Polygon2 .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/polygon_editor/show_previous_outline** +:ref:`bool<class_bool>` **editors/polygon_editor/show_previous_outline** :ref:`🔗<class_EditorSettings_property_editors/polygon_editor/show_previous_outline>` If ``true``, displays the polygon's previous shape in the 2D polygon editors with an opaque gray outline. This outline is displayed while dragging a point until the left mouse button is released. @@ -1597,7 +1771,7 @@ If ``true``, displays the polygon's previous shape in the 2D polygon editors wit .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/shader_editor/behavior/files/restore_shaders_on_load** +:ref:`bool<class_bool>` **editors/shader_editor/behavior/files/restore_shaders_on_load** :ref:`🔗<class_EditorSettings_property_editors/shader_editor/behavior/files/restore_shaders_on_load>` If ``true``, reopens shader files that were open in the shader editor when the project was last closed. @@ -1609,7 +1783,7 @@ If ``true``, reopens shader files that were open in the shader editor when the p .. rst-class:: classref-property -:ref:`bool<class_bool>` **editors/tiles_editor/display_grid** +:ref:`bool<class_bool>` **editors/tiles_editor/display_grid** :ref:`🔗<class_EditorSettings_property_editors/tiles_editor/display_grid>` If ``true``, displays a grid while the TileMap editor is active. See also :ref:`editors/tiles_editor/grid_color<class_EditorSettings_property_editors/tiles_editor/grid_color>`. @@ -1621,7 +1795,7 @@ If ``true``, displays a grid while the TileMap editor is active. See also :ref:` .. rst-class:: classref-property -:ref:`Color<class_Color>` **editors/tiles_editor/grid_color** +:ref:`Color<class_Color>` **editors/tiles_editor/grid_color** :ref:`🔗<class_EditorSettings_property_editors/tiles_editor/grid_color>` The color to use for the TileMap editor's grid. @@ -1631,637 +1805,1291 @@ The color to use for the TileMap editor's grid. ---- -.. _class_EditorSettings_property_editors/visual_editors/lines_curvature: +.. _class_EditorSettings_property_editors/tiles_editor/highlight_selected_layer: .. rst-class:: classref-property -:ref:`float<class_float>` **editors/visual_editors/lines_curvature** +:ref:`bool<class_bool>` **editors/tiles_editor/highlight_selected_layer** :ref:`🔗<class_EditorSettings_property_editors/tiles_editor/highlight_selected_layer>` -The curvature to use for connection lines in the visual shader editor. Higher values will make connection lines appear more curved, with values above ``0.5`` resulting in more "angular" turns in the middle of connection lines. +Highlight the currently selected TileMapLayer by dimming the other ones in the scene. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/visual_editors/minimap_opacity: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/color_color: .. rst-class:: classref-property -:ref:`float<class_float>` **editors/visual_editors/minimap_opacity** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/color_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/color_color>` -The opacity of the minimap displayed in the bottom-right corner of the visual shader editor. +The color of a graph node's header when it belongs to the "Color" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/conditional_color: .. rst-class:: classref-property -:ref:`int<class_int>` **editors/visual_editors/visual_shader/port_preview_size** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/conditional_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/conditional_color>` -The size to use for port previews in the visual shader uniforms (toggled by clicking the "eye" icon next to an output). The value is defined in pixels at 100% zoom, and will scale with zoom automatically. +The color of a graph node's header when it belongs to the "Conditional" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/directories/autoscan_project_path: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/input_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/directories/autoscan_project_path** - -The folder where projects should be scanned for (recursively), in a way similar to the project manager's **Scan** button. This can be set to the same value as :ref:`filesystem/directories/default_project_path<class_EditorSettings_property_filesystem/directories/default_project_path>` for convenience. +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/input_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/input_color>` -\ **Note:** Setting this path to a folder with very large amounts of files/folders can slow down the project manager startup significantly. To keep the project manager quick to start up, it is recommended to set this value to a folder as "specific" as possible. +The color of a graph node's header when it belongs to the "Input" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/directories/default_project_path: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/output_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/directories/default_project_path** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/output_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/output_color>` -The folder where new projects should be created by default when clicking the project manager's **New Project** button. This can be set to the same value as :ref:`filesystem/directories/autoscan_project_path<class_EditorSettings_property_filesystem/directories/autoscan_project_path>` for convenience. +The color of a graph node's header when it belongs to the "Output" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/external_programs/3d_model_editor: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/particle_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/external_programs/3d_model_editor** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/particle_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/particle_color>` -The program that opens 3D model scene files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. +The color of a graph node's header when it belongs to the "Particle" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/external_programs/audio_editor: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/scalar_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/external_programs/audio_editor** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/scalar_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/scalar_color>` -The program that opens audio files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. +The color of a graph node's header when it belongs to the "Scalar" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/external_programs/raster_image_editor: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/special_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/external_programs/raster_image_editor** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/special_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/special_color>` -The program that opens raster image files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. +The color of a graph node's header when it belongs to the "Special" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/external_programs/vector_image_editor: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/textures_color: .. rst-class:: classref-property -:ref:`String<class_String>` **filesystem/external_programs/vector_image_editor** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/textures_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/textures_color>` -The program that opens vector image files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. +The color of a graph node's header when it belongs to the "Textures" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/file_dialog/display_mode: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/transform_color: .. rst-class:: classref-property -:ref:`int<class_int>` **filesystem/file_dialog/display_mode** - -The display mode to use in the editor's file dialogs. - -- **Thumbnails** takes more space, but displays dynamic resource thumbnails, making resources easier to preview without having to open them. +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/transform_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/transform_color>` -- **List** is more compact but doesn't display dynamic resource thumbnails. Instead, it displays static icons based on the file extension. +The color of a graph node's header when it belongs to the "Transform" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/file_dialog/show_hidden_files: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/utility_color: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/file_dialog/show_hidden_files** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/utility_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/utility_color>` -If ``true``, display hidden files in the editor's file dialogs. Files that have names starting with ``.`` are considered hidden (e.g. ``.hidden_file``). +The color of a graph node's header when it belongs to the "Utility" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/file_dialog/thumbnail_size: +.. _class_EditorSettings_property_editors/visual_editors/category_colors/vector_color: .. rst-class:: classref-property -:ref:`int<class_int>` **filesystem/file_dialog/thumbnail_size** +:ref:`Color<class_Color>` **editors/visual_editors/category_colors/vector_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/category_colors/vector_color>` -The thumbnail size to use in the editor's file dialogs (in pixels). See also :ref:`docks/filesystem/thumbnail_size<class_EditorSettings_property_docks/filesystem/thumbnail_size>`. +The color of a graph node's header when it belongs to the "Vector" category. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/on_save/compress_binary_resources: +.. _class_EditorSettings_property_editors/visual_editors/color_theme: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/on_save/compress_binary_resources** +:ref:`String<class_String>` **editors/visual_editors/color_theme** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/color_theme>` -If ``true``, uses lossless compression for binary resources. +The color theme to use in the visual shader editor. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/boolean_color: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/on_save/safe_save_on_backup_then_rename** - -If ``true``, when saving a file, the editor will rename the old file to a different name, save a new file, then only remove the old file once the new file has been saved. This makes loss of data less likely to happen if the editor or operating system exits unexpectedly while saving (e.g. due to a crash or power outage). +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/boolean_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/boolean_color>` -\ **Note:** On Windows, this feature can interact negatively with certain antivirus programs. In this case, you may have to set this to ``false`` to prevent file locking issues. +The color of a port/connection of boolean type. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/sampler_color: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/accept_dialog_cancel_ok_buttons** +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/sampler_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/sampler_color>` -How to position the Cancel and OK buttons in the editor's :ref:`AcceptDialog<class_AcceptDialog>`\ s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one. +The color of a port/connection of sampler type. -- **Auto** follows the platform convention: Cancel first on macOS and Linux, OK first on Windows. +.. rst-class:: classref-item-separator -- **Cancel First** forces the ordering Cancel/OK. +---- -- **OK First** forces the ordering OK/Cancel. +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/scalar_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/scalar_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/scalar_color>` + +The color of a port/connection of scalar type (float, int, unsigned int). .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/automatically_open_screenshots: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/transform_color: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/automatically_open_screenshots** +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/transform_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/transform_color>` -If ``true``, automatically opens screenshots with the default program associated to ``.png`` files after a screenshot is taken using the **Editor > Take Screenshot** action. +The color of a port/connection of transform type. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/code_font: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/vector2_color: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/code_font** +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/vector2_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/vector2_color>` -The font to use for the script editor. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. +The color of a port/connection of Vector2 type. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/code_font_contextual_ligatures: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/vector3_color: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/code_font_contextual_ligatures** +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/vector3_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/vector3_color>` -The font ligatures to enable for the currently configured code font. Not all fonts include support for ligatures. - -\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has contextual ligatures in its font file. +The color of a port/connection of Vector3 type. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/code_font_custom_opentype_features: +.. _class_EditorSettings_property_editors/visual_editors/connection_colors/vector4_color: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/code_font_custom_opentype_features** +:ref:`Color<class_Color>` **editors/visual_editors/connection_colors/vector4_color** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/connection_colors/vector4_color>` -List of custom OpenType features to use, if supported by the currently configured code font. Not all fonts include support for custom OpenType features. The string should follow the OpenType specification. - -\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has custom OpenType features in its font file, but there is no documented list yet. +The color of a port/connection of Vector4 type. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/code_font_custom_variations: +.. _class_EditorSettings_property_editors/visual_editors/grid_pattern: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/code_font_custom_variations** +:ref:`int<class_int>` **editors/visual_editors/grid_pattern** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/grid_pattern>` -List of alternative characters to use, if supported by the currently configured code font. Not all fonts include support for custom variations. The string should follow the OpenType specification. - -\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has alternate characters in its font file, but there is no documented list yet. +The pattern used for the background grid. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/code_font_size: +.. _class_EditorSettings_property_editors/visual_editors/lines_curvature: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/code_font_size** +:ref:`float<class_float>` **editors/visual_editors/lines_curvature** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/lines_curvature>` -The size of the font in the script editor. This setting does not impact the font size of the Output panel (see :ref:`run/output/font_size<class_EditorSettings_property_run/output/font_size>`). +The curvature to use for connection lines in the visual shader editor. Higher values will make connection lines appear more curved, with values above ``0.5`` resulting in more "angular" turns in the middle of connection lines. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/custom_display_scale: +.. _class_EditorSettings_property_editors/visual_editors/minimap_opacity: .. rst-class:: classref-property -:ref:`float<class_float>` **interface/editor/custom_display_scale** - -The custom editor scale factor to use. This can be used for displays with very high DPI where a scale factor of 200% is not sufficient. +:ref:`float<class_float>` **editors/visual_editors/minimap_opacity** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/minimap_opacity>` -\ **Note:** Only effective if :ref:`interface/editor/display_scale<class_EditorSettings_property_interface/editor/display_scale>` is set to **Custom**. +The opacity of the minimap displayed in the bottom-right corner of the visual shader editor. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/debug/enable_pseudolocalization: +.. _class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/debug/enable_pseudolocalization** +:ref:`int<class_int>` **editors/visual_editors/visual_shader/port_preview_size** :ref:`🔗<class_EditorSettings_property_editors/visual_editors/visual_shader/port_preview_size>` -If ``true``, lengthens the editor's localizable strings and replaces their characters with accented variants. This allows spotting non-localizable strings easily, while also ensuring the UI layout doesn't break when strings are made longer (as many languages require strings to be longer). - -This is a debugging feature and should only be enabled when working on the editor itself. +The size to use for port previews in the visual shader uniforms (toggled by clicking the "eye" icon next to an output). The value is defined in pixels at 100% zoom, and will scale with zoom automatically. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/display_scale: +.. _class_EditorSettings_property_filesystem/directories/autoscan_project_path: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/display_scale** - -The display scale factor to use for the editor interface. Higher values are more suited to hiDPI/Retina displays. +:ref:`String<class_String>` **filesystem/directories/autoscan_project_path** :ref:`🔗<class_EditorSettings_property_filesystem/directories/autoscan_project_path>` -If set to **Auto**, the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually. +The folder where projects should be scanned for (recursively), in a way similar to the project manager's **Scan** button. This can be set to the same value as :ref:`filesystem/directories/default_project_path<class_EditorSettings_property_filesystem/directories/default_project_path>` for convenience. -If set to **Custom**, the scaling value in :ref:`interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>` will be used. +\ **Note:** Setting this path to a folder with very large amounts of files/folders can slow down the project manager startup significantly. To keep the project manager quick to start up, it is recommended to set this value to a folder as "specific" as possible. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/editor_language: +.. _class_EditorSettings_property_filesystem/directories/default_project_path: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/editor_language** - -The language to use for the editor interface. +:ref:`String<class_String>` **filesystem/directories/default_project_path** :ref:`🔗<class_EditorSettings_property_filesystem/directories/default_project_path>` -Translations are provided by the community. If you spot a mistake, :doc:`contribute to editor translations on Weblate! <../contributing/documentation/editor_and_docs_localization>` +The folder where new projects should be created by default when clicking the project manager's **New Project** button. This can be set to the same value as :ref:`filesystem/directories/autoscan_project_path<class_EditorSettings_property_filesystem/directories/autoscan_project_path>` for convenience. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/editor_screen: +.. _class_EditorSettings_property_filesystem/external_programs/3d_model_editor: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/editor_screen** +:ref:`String<class_String>` **filesystem/external_programs/3d_model_editor** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/3d_model_editor>` -The preferred monitor to display the editor. +The program that opens 3D model scene files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/expand_to_title: +.. _class_EditorSettings_property_filesystem/external_programs/audio_editor: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/expand_to_title** +:ref:`String<class_String>` **filesystem/external_programs/audio_editor** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/audio_editor>` -Expanding main editor window content to the title, if supported by :ref:`DisplayServer<class_DisplayServer>`. See :ref:`DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>`. - -Specific to the macOS platform. +The program that opens audio files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/font_antialiasing: +.. _class_EditorSettings_property_filesystem/external_programs/raster_image_editor: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/font_antialiasing** +:ref:`String<class_String>` **filesystem/external_programs/raster_image_editor** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/raster_image_editor>` -FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font. +The program that opens raster image files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/font_hinting: +.. _class_EditorSettings_property_filesystem/external_programs/terminal_emulator: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/font_hinting** +:ref:`String<class_String>` **filesystem/external_programs/terminal_emulator** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/terminal_emulator>` -The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes: +The terminal emulator program to use when using **Open in Terminal** context menu action in the FileSystem dock. You can enter an absolute path to a program binary, or a path to a program that is present in the ``PATH`` environment variable. -- **None:** Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry. +If left empty, Godot will use the default terminal emulator for the system: -- **Light:** Use hinting on the X axis only. This is a compromise between font sharpness and smoothness. +- **Windows:** PowerShell -- **Normal:** Use hinting on both X and Y axes. This results in a sharp font, but it doesn't look very smooth. +- **macOS:** Terminal.app -If set to **Auto**, the font hinting mode will be set to match the current operating system in use. This means the **Light** hinting mode will be used on Windows and Linux, and the **None** hinting mode will be used on macOS. +- **Linux:** The first terminal found on the system in this order: gnome-terminal, konsole, xfce4-terminal, lxterminal, kitty, alacritty, urxvt, xterm. + +To use Command Prompt (cmd) instead of PowerShell on Windows, enter ``cmd`` in this field and the correct flags will automatically be used. + +On macOS, make sure to point to the actual program binary located within the ``Programs/MacOS`` folder of the .app bundle, rather than the .app bundle directory. + +If specifying a custom terminal emulator, you may need to override :ref:`filesystem/external_programs/terminal_emulator_flags<class_EditorSettings_property_filesystem/external_programs/terminal_emulator_flags>` so it opens in the correct folder. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/font_subpixel_positioning: +.. _class_EditorSettings_property_filesystem/external_programs/terminal_emulator_flags: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/font_subpixel_positioning** +:ref:`String<class_String>` **filesystem/external_programs/terminal_emulator_flags** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/terminal_emulator_flags>` -The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. **Disabled** is the fastest to render and uses the least memory. **Auto** only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). **One Half of a Pixel** and **One Quarter of a Pixel** force the same subpixel positioning mode for all editor fonts, regardless of their size (with **One Quarter of a Pixel** being the highest-quality option). +The command-line arguments to pass to the terminal emulator that is run when using **Open in Terminal** context menu action in the FileSystem dock. See also :ref:`filesystem/external_programs/terminal_emulator<class_EditorSettings_property_filesystem/external_programs/terminal_emulator>`. + +If left empty, the default flags are ``{directory}``, which is replaced by the absolute path to the directory that is being opened in the terminal. + +\ **Note:** If the terminal emulator is set to PowerShell, cmd, or Konsole, Godot will automatically prepend arguments to this list, as these terminals require nonstandard arguments to open in the correct folder. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec: +.. _class_EditorSettings_property_filesystem/external_programs/vector_image_editor: .. rst-class:: classref-property -:ref:`float<class_float>` **interface/editor/low_processor_mode_sleep_usec** +:ref:`String<class_String>` **filesystem/external_programs/vector_image_editor** :ref:`🔗<class_EditorSettings_property_filesystem/external_programs/vector_image_editor>` -The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec>`. +The program that opens vector image files when clicking "Open in External Program" option in Filesystem Dock. If not specified, the file will be opened in the system's default program. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/main_font: +.. _class_EditorSettings_property_filesystem/file_dialog/display_mode: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/main_font** +:ref:`int<class_int>` **filesystem/file_dialog/display_mode** :ref:`🔗<class_EditorSettings_property_filesystem/file_dialog/display_mode>` -The font to use for the editor interface. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. +The display mode to use in the editor's file dialogs. + +- **Thumbnails** takes more space, but displays dynamic resource thumbnails, making resources easier to preview without having to open them. + +- **List** is more compact but doesn't display dynamic resource thumbnails. Instead, it displays static icons based on the file extension. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/main_font_bold: +.. _class_EditorSettings_property_filesystem/file_dialog/show_hidden_files: .. rst-class:: classref-property -:ref:`String<class_String>` **interface/editor/main_font_bold** +:ref:`bool<class_bool>` **filesystem/file_dialog/show_hidden_files** :ref:`🔗<class_EditorSettings_property_filesystem/file_dialog/show_hidden_files>` -The font to use for bold text in the editor interface. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. +If ``true``, display hidden files in the editor's file dialogs. Files that have names starting with ``.`` are considered hidden (e.g. ``.hidden_file``). .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/main_font_size: +.. _class_EditorSettings_property_filesystem/file_dialog/thumbnail_size: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/main_font_size** +:ref:`int<class_int>` **filesystem/file_dialog/thumbnail_size** :ref:`🔗<class_EditorSettings_property_filesystem/file_dialog/thumbnail_size>` -The size of the font in the editor interface. +The thumbnail size to use in the editor's file dialogs (in pixels). See also :ref:`docks/filesystem/thumbnail_size<class_EditorSettings_property_docks/filesystem/thumbnail_size>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history: +.. _class_EditorSettings_property_filesystem/import/blender/blender_path: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/mouse_extra_buttons_navigate_history** +:ref:`String<class_String>` **filesystem/import/blender/blender_path** :ref:`🔗<class_EditorSettings_property_filesystem/import/blender/blender_path>` -If ``true``, the mouse's additional side buttons will be usable to navigate in the script editor's file history. Set this to ``false`` if you're using the side buttons for other purposes (such as a push-to-talk button in a VoIP program). +The path to the directory containing the Blender executable used for converting the Blender 3D scene files ``.blend`` to glTF 2.0 format during import. Blender 3.0 or later is required. + +To enable this feature for your specific project, use :ref:`ProjectSettings.filesystem/import/blender/enabled<class_ProjectSettings_property_filesystem/import/blender/enabled>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/project_manager_screen: +.. _class_EditorSettings_property_filesystem/import/blender/rpc_port: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/project_manager_screen** +:ref:`int<class_int>` **filesystem/import/blender/rpc_port** :ref:`🔗<class_EditorSettings_property_filesystem/import/blender/rpc_port>` -The preferred monitor to display the project manager. +The port number used for Remote Procedure Call (RPC) communication with Godot's created process of the blender executable. + +Setting this to 0 effectively disables communication with Godot and the blender process, making performance slower. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/save_each_scene_on_quit: +.. _class_EditorSettings_property_filesystem/import/blender/rpc_server_uptime: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/save_each_scene_on_quit** +:ref:`float<class_float>` **filesystem/import/blender/rpc_server_uptime** :ref:`🔗<class_EditorSettings_property_filesystem/import/blender/rpc_server_uptime>` -If ``false``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``true``, the editor will ask to save each scene individually. +The maximum idle uptime (in seconds) of the Blender process. + +This prevents Godot from having to create a new process for each import within the given seconds. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/separate_distraction_mode: +.. _class_EditorSettings_property_filesystem/import/fbx/fbx2gltf_path: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/separate_distraction_mode** +:ref:`String<class_String>` **filesystem/import/fbx/fbx2gltf_path** :ref:`🔗<class_EditorSettings_property_filesystem/import/fbx/fbx2gltf_path>` -If ``true``, the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If ``false``, the distraction-free mode toggle is shared between all tabs. +The path to the FBX2glTF executable used for converting Autodesk FBX 3D scene files ``.fbx`` to glTF 2.0 format during import. + +To enable this feature for your specific project, use :ref:`ProjectSettings.filesystem/import/fbx2gltf/enabled<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications: +.. _class_EditorSettings_property_filesystem/on_save/compress_binary_resources: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/editor/show_internal_errors_in_toast_notifications** - -If enabled, displays internal engine errors in toast notifications (toggleable by clicking the "bell" icon at the bottom of the editor). No matter the value of this setting, non-internal engine errors will always be visible in toast notifications. +:ref:`bool<class_bool>` **filesystem/on_save/compress_binary_resources** :ref:`🔗<class_EditorSettings_property_filesystem/on_save/compress_binary_resources>` -The default **Auto** value will only enable this if the editor was compiled with the ``dev=yes`` option (the default is ``dev=no``). +If ``true``, uses lossless compression for binary resources. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/single_window_mode: +.. _class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/single_window_mode** +:ref:`bool<class_bool>` **filesystem/on_save/safe_save_on_backup_then_rename** :ref:`🔗<class_EditorSettings_property_filesystem/on_save/safe_save_on_backup_then_rename>` -If ``true``, embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. +If ``true``, when saving a file, the editor will rename the old file to a different name, save a new file, then only remove the old file once the new file has been saved. This makes loss of data less likely to happen if the editor or operating system exits unexpectedly while saving (e.g. due to a crash or power outage). + +\ **Note:** On Windows, this feature can interact negatively with certain antivirus programs. In this case, you may have to set this to ``false`` to prevent file locking issues. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec: +.. _class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path: .. rst-class:: classref-property -:ref:`float<class_float>` **interface/editor/unfocused_low_processor_mode_sleep_usec** +:ref:`String<class_String>` **filesystem/tools/oidn/oidn_denoise_path** :ref:`🔗<class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path>` -When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also :ref:`interface/editor/low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec>`. +The path to the directory containing the Open Image Denoise (OIDN) executable, used optionally for denoising lightmaps. It can be downloaded from `openimagedenoise.org <https://www.openimagedenoise.org/downloads.html>`__. + +To enable this feature for your specific project, use :ref:`ProjectSettings.rendering/lightmapping/denoising/denoiser<class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser>`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/editor/use_embedded_menu: +.. _class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/editor/use_embedded_menu** +:ref:`int<class_int>` **interface/editor/accept_dialog_cancel_ok_buttons** :ref:`🔗<class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons>` -If ``true``, editor main menu is using embedded :ref:`MenuBar<class_MenuBar>` instead of system global menu. +How to position the Cancel and OK buttons in the editor's :ref:`AcceptDialog<class_AcceptDialog>`\ s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Godot both on Windows and macOS/Linux and your Godot muscle memory is stronger than your OS specific one. -Specific to the macOS platform. +- **Auto** follows the platform convention: Cancel first on macOS and Linux, OK first on Windows. + +- **Cancel First** forces the ordering Cancel/OK. + +- **OK First** forces the ordering OK/Cancel. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/inspector/float_drag_speed: +.. _class_EditorSettings_property_interface/editor/automatically_open_screenshots: .. rst-class:: classref-property -:ref:`float<class_float>` **interface/inspector/float_drag_speed** +:ref:`bool<class_bool>` **interface/editor/automatically_open_screenshots** :ref:`🔗<class_EditorSettings_property_interface/editor/automatically_open_screenshots>` -Base speed for increasing/decreasing float values by dragging them in the inspector. +If ``true``, automatically opens screenshots with the default program associated to ``.png`` files after a screenshot is taken using the **Editor > Take Screenshot** action. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page: +.. _class_EditorSettings_property_interface/editor/code_font: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/inspector/max_array_dictionary_items_per_page** +:ref:`String<class_String>` **interface/editor/code_font** :ref:`🔗<class_EditorSettings_property_interface/editor/code_font>` -The number of :ref:`Array<class_Array>` or :ref:`Dictionary<class_Dictionary>` items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor. +The font to use for the script editor. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/inspector/show_low_level_opentype_features: +.. _class_EditorSettings_property_interface/editor/code_font_contextual_ligatures: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/inspector/show_low_level_opentype_features** +:ref:`int<class_int>` **interface/editor/code_font_contextual_ligatures** :ref:`🔗<class_EditorSettings_property_interface/editor/code_font_contextual_ligatures>` -If ``true``, display OpenType features marked as ``hidden`` by the font file in the :ref:`Font<class_Font>` editor. +The font ligatures to enable for the currently configured code font. Not all fonts include support for ligatures. + +\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has contextual ligatures in its font file. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/multi_window/enable: +.. _class_EditorSettings_property_interface/editor/code_font_custom_opentype_features: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/multi_window/enable** +:ref:`String<class_String>` **interface/editor/code_font_custom_opentype_features** :ref:`🔗<class_EditorSettings_property_interface/editor/code_font_custom_opentype_features>` -If ``true``, the multi window support in editor is enabled. The following panels can become dedicated windows (made floating): Docks, Script editor, and Shader editor. +List of custom OpenType features to use, if supported by the currently configured code font. Not all fonts include support for custom OpenType features. The string should follow the OpenType specification. -\ **Note:** When :ref:`interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` is ``true``, the multi window support is always disabled. +\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has custom OpenType features in its font file, but there is no documented list yet. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/multi_window/maximize_window: +.. _class_EditorSettings_property_interface/editor/code_font_custom_variations: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/multi_window/maximize_window** +:ref:`String<class_String>` **interface/editor/code_font_custom_variations** :ref:`🔗<class_EditorSettings_property_interface/editor/code_font_custom_variations>` -If ``true``, when panels are made floating they will be maximized. +List of alternative characters to use, if supported by the currently configured code font. Not all fonts include support for custom variations. The string should follow the OpenType specification. -If ``false``, when panels are made floating their position and size will match the ones when they are attached (excluding window border) to the editor window. +\ **Note:** The default editor code font (`JetBrains Mono <https://www.jetbrains.com/lp/mono/>`__) has alternate characters in its font file, but there is no documented list yet. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/multi_window/restore_windows_on_load: +.. _class_EditorSettings_property_interface/editor/code_font_size: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/multi_window/restore_windows_on_load** +:ref:`int<class_int>` **interface/editor/code_font_size** :ref:`🔗<class_EditorSettings_property_interface/editor/code_font_size>` -If ``true``, the floating panel position, size, and screen will be saved on editor exit. On next launch the panels that were floating will be made floating in the saved positions, sizes and screens, if possible. +The size of the font in the script editor. This setting does not impact the font size of the Output panel (see :ref:`run/output/font_size<class_EditorSettings_property_run/output/font_size>`). .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_interface/scene_tabs/display_close_button: +.. _class_EditorSettings_property_interface/editor/custom_display_scale: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/scene_tabs/display_close_button** +:ref:`float<class_float>` **interface/editor/custom_display_scale** :ref:`🔗<class_EditorSettings_property_interface/editor/custom_display_scale>` -Controls when the Close (X) button is displayed on scene tabs at the top of the editor. +The custom editor scale factor to use. This can be used for displays with very high DPI where a scale factor of 200% is not sufficient. + +\ **Note:** Only effective if :ref:`interface/editor/display_scale<class_EditorSettings_property_interface/editor/display_scale>` is set to **Custom**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/display_scale: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/display_scale** :ref:`🔗<class_EditorSettings_property_interface/editor/display_scale>` + +The display scale factor to use for the editor interface. Higher values are more suited to hiDPI/Retina displays. + +If set to **Auto**, the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually. + +If set to **Custom**, the scaling value in :ref:`interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>` will be used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/dock_tab_style: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/dock_tab_style** :ref:`🔗<class_EditorSettings_property_interface/editor/dock_tab_style>` + +Tab style of editor docks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/editor_language: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **interface/editor/editor_language** :ref:`🔗<class_EditorSettings_property_interface/editor/editor_language>` + +The language to use for the editor interface. + +Translations are provided by the community. If you spot a mistake, :doc:`contribute to editor translations on Weblate! <../contributing/documentation/editor_and_docs_localization>` + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/editor_screen: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/editor_screen** :ref:`🔗<class_EditorSettings_property_interface/editor/editor_screen>` + +The preferred monitor to display the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/expand_to_title: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/expand_to_title** :ref:`🔗<class_EditorSettings_property_interface/editor/expand_to_title>` + +Expanding main editor window content to the title, if supported by :ref:`DisplayServer<class_DisplayServer>`. See :ref:`DisplayServer.WINDOW_FLAG_EXTEND_TO_TITLE<class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE>`. + +Specific to the macOS platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/font_antialiasing: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/font_antialiasing** :ref:`🔗<class_EditorSettings_property_interface/editor/font_antialiasing>` + +FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/font_disable_embedded_bitmaps: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/font_disable_embedded_bitmaps** :ref:`🔗<class_EditorSettings_property_interface/editor/font_disable_embedded_bitmaps>` + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/font_hinting: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/font_hinting** :ref:`🔗<class_EditorSettings_property_interface/editor/font_hinting>` + +The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes: + +- **None:** Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry. + +- **Light:** Use hinting on the X axis only. This is a compromise between font sharpness and smoothness. + +- **Normal:** Use hinting on both X and Y axes. This results in a sharp font, but it doesn't look very smooth. + +If set to **Auto**, the font hinting mode will be set to match the current operating system in use. This means the **Light** hinting mode will be used on Windows and Linux, and the **None** hinting mode will be used on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/font_subpixel_positioning: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/font_subpixel_positioning** :ref:`🔗<class_EditorSettings_property_interface/editor/font_subpixel_positioning>` + +The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. **Disabled** is the fastest to render and uses the least memory. **Auto** only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). **One Half of a Pixel** and **One Quarter of a Pixel** force the same subpixel positioning mode for all editor fonts, regardless of their size (with **One Quarter of a Pixel** being the highest-quality option). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/import_resources_when_unfocused: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/import_resources_when_unfocused** :ref:`🔗<class_EditorSettings_property_interface/editor/import_resources_when_unfocused>` + +If ``true``, (re)imports resources even if the editor window is unfocused or minimized. If ``false``, resources are only (re)imported when the editor window is focused. This can be set to ``true`` to speed up iteration by starting the import process earlier when saving files in the project folder. This also allows getting visual feedback on changes without having to click the editor window, which is useful with multi-monitor setups. The downside of setting this to ``true`` is that it increases idle CPU usage and may steal CPU time from other applications when importing resources. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/localize_settings: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/localize_settings** :ref:`🔗<class_EditorSettings_property_interface/editor/localize_settings>` + +If ``true``, setting names in the editor are localized when possible. + +\ **Note:** This setting affects most :ref:`EditorInspector<class_EditorInspector>`\ s in the editor UI, primarily Project Settings and Editor Settings. To control names displayed in the Inspector dock, use :ref:`interface/inspector/default_property_name_style<class_EditorSettings_property_interface/inspector/default_property_name_style>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/low_processor_mode_sleep_usec** :ref:`🔗<class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec>` + +The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec>`. + +\ **Note:** This setting is ignored if :ref:`interface/editor/update_continuously<class_EditorSettings_property_interface/editor/update_continuously>` is ``true``, as enabling that setting disables low-processor mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/main_font: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **interface/editor/main_font** :ref:`🔗<class_EditorSettings_property_interface/editor/main_font>` + +The font to use for the editor interface. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/main_font_bold: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **interface/editor/main_font_bold** :ref:`🔗<class_EditorSettings_property_interface/editor/main_font_bold>` + +The font to use for bold text in the editor interface. Must be a resource of a :ref:`Font<class_Font>` type such as a ``.ttf`` or ``.otf`` font file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/main_font_size: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/main_font_size** :ref:`🔗<class_EditorSettings_property_interface/editor/main_font_size>` + +The size of the font in the editor interface. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/mouse_extra_buttons_navigate_history** :ref:`🔗<class_EditorSettings_property_interface/editor/mouse_extra_buttons_navigate_history>` + +If ``true``, the mouse's additional side buttons will be usable to navigate in the script editor's file history. Set this to ``false`` if you're using the side buttons for other purposes (such as a push-to-talk button in a VoIP program). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/project_manager_screen: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/project_manager_screen** :ref:`🔗<class_EditorSettings_property_interface/editor/project_manager_screen>` + +The preferred monitor to display the project manager. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/save_each_scene_on_quit: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/save_each_scene_on_quit** :ref:`🔗<class_EditorSettings_property_interface/editor/save_each_scene_on_quit>` + +If ``false``, the editor will save all scenes when confirming the **Save** action when quitting the editor or quitting to the project list. If ``true``, the editor will ask to save each scene individually. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/save_on_focus_loss: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/save_on_focus_loss** :ref:`🔗<class_EditorSettings_property_interface/editor/save_on_focus_loss>` + +If ``true``, scenes and scripts are saved when the editor loses focus. Depending on the work flow, this behavior can be less intrusive than :ref:`text_editor/behavior/files/autosave_interval_secs<class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs>` or remembering to save manually. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/separate_distraction_mode: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/separate_distraction_mode** :ref:`🔗<class_EditorSettings_property_interface/editor/separate_distraction_mode>` + +If ``true``, the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If ``false``, the distraction-free mode toggle is shared between all tabs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/show_internal_errors_in_toast_notifications** :ref:`🔗<class_EditorSettings_property_interface/editor/show_internal_errors_in_toast_notifications>` + +If enabled, displays internal engine errors in toast notifications (toggleable by clicking the "bell" icon at the bottom of the editor). No matter the value of this setting, non-internal engine errors will always be visible in toast notifications. + +The default **Auto** value will only enable this if the editor was compiled with the ``dev_build=yes`` SCons option (the default is ``dev_build=no``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/show_update_spinner: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/show_update_spinner** :ref:`🔗<class_EditorSettings_property_interface/editor/show_update_spinner>` + +If enabled, displays an icon in the top-right corner of the editor that spins when the editor redraws a frame. This can be used to diagnose situations where the engine is constantly redrawing, which should be avoided as this increases CPU and GPU utilization for no good reason. To further troubleshoot these situations, start the editor with the ``--debug-canvas-item-redraw`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +Consider enabling this if you are developing editor plugins to ensure they only make the editor redraw when required. + +The default **Auto** value will only enable this if the editor was compiled with the ``dev_build=yes`` SCons option (the default is ``dev_build=no``). + +\ **Note:** If :ref:`interface/editor/update_continuously<class_EditorSettings_property_interface/editor/update_continuously>` is ``true``, the spinner icon displays in red. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/single_window_mode: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/single_window_mode** :ref:`🔗<class_EditorSettings_property_interface/editor/single_window_mode>` + +If ``true``, embed modal windows such as docks inside the main editor window. When single-window mode is enabled, tooltips will also be embedded inside the main editor window, which means they can't be displayed outside of the editor window. + +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>` instead of querying the value of this editor setting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/ui_layout_direction: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/ui_layout_direction** :ref:`🔗<class_EditorSettings_property_interface/editor/ui_layout_direction>` + +Editor UI default layout direction. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/unfocused_low_processor_mode_sleep_usec** :ref:`🔗<class_EditorSettings_property_interface/editor/unfocused_low_processor_mode_sleep_usec>` + +When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also :ref:`interface/editor/low_processor_mode_sleep_usec<class_EditorSettings_property_interface/editor/low_processor_mode_sleep_usec>`. + +\ **Note:** This setting is ignored if :ref:`interface/editor/update_continuously<class_EditorSettings_property_interface/editor/update_continuously>` is ``true``, as enabling that setting disables low-processor mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/update_continuously: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/update_continuously** :ref:`🔗<class_EditorSettings_property_interface/editor/update_continuously>` + +If ``true``, redraws the editor every frame even if nothing has changed on screen. When this setting is enabled, the update spinner displays in red (see :ref:`interface/editor/show_update_spinner<class_EditorSettings_property_interface/editor/show_update_spinner>`). + +\ **Warning:** This greatly increases CPU and GPU utilization, leading to increased power usage. This should only be enabled for troubleshooting purposes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/use_embedded_menu: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/use_embedded_menu** :ref:`🔗<class_EditorSettings_property_interface/editor/use_embedded_menu>` + +If ``true``, editor main menu is using embedded :ref:`MenuBar<class_MenuBar>` instead of system global menu. + +Specific to the macOS platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/use_native_file_dialogs: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/editor/use_native_file_dialogs** :ref:`🔗<class_EditorSettings_property_interface/editor/use_native_file_dialogs>` + +If ``true``, editor UI uses OS native file/directory selection dialogs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/vsync_mode: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/editor/vsync_mode** :ref:`🔗<class_EditorSettings_property_interface/editor/vsync_mode>` + +Sets the V-Sync mode for the editor. Does not affect the project when run from the editor (this is controlled by :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>`). + +Depending on the platform and used renderer, the engine will fall back to **Enabled** if the desired mode is not supported. + +\ **Note:** V-Sync modes other than **Enabled** are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/auto_unfold_foreign_scenes: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/auto_unfold_foreign_scenes** :ref:`🔗<class_EditorSettings_property_interface/inspector/auto_unfold_foreign_scenes>` + +If ``true``, automatically expands property groups in the Inspector dock when opening a scene that hasn't been opened previously. If ``false``, all groups remain collapsed by default. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/default_color_picker_mode: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/inspector/default_color_picker_mode** :ref:`🔗<class_EditorSettings_property_interface/inspector/default_color_picker_mode>` + +The default color picker mode to use when opening :ref:`ColorPicker<class_ColorPicker>`\ s in the editor. This mode can be temporarily adjusted on the color picker itself. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/default_color_picker_shape: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/inspector/default_color_picker_shape** :ref:`🔗<class_EditorSettings_property_interface/inspector/default_color_picker_shape>` + +The default color picker shape to use when opening :ref:`ColorPicker<class_ColorPicker>`\ s in the editor. This shape can be temporarily adjusted on the color picker itself. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/default_float_step: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **interface/inspector/default_float_step** :ref:`🔗<class_EditorSettings_property_interface/inspector/default_float_step>` + +The floating-point precision to use for properties that don't define an explicit precision step. Lower values allow entering more precise values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/default_property_name_style: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/inspector/default_property_name_style** :ref:`🔗<class_EditorSettings_property_interface/inspector/default_property_name_style>` + +The default property name style to display in the Inspector dock. This style can be temporarily adjusted in the Inspector dock's menu. + +- **Raw:** Displays properties in ``snake_case``. + +- **Capitalized:** Displays properties capitalized. + +- **Localized:** Displays the localized string for the current editor language if a translation is available for the given property. If no translation is available, falls back to **Capitalized**. + +\ **Note:** To display translated setting names in Project Settings and Editor Settings, use :ref:`interface/editor/localize_settings<class_EditorSettings_property_interface/editor/localize_settings>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/delimitate_all_container_and_resources: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/delimitate_all_container_and_resources** :ref:`🔗<class_EditorSettings_property_interface/inspector/delimitate_all_container_and_resources>` + +If ``true``, add a margin around Array, Dictionary, and Resource Editors that are not already colored. + +\ **Note:** If :ref:`interface/inspector/nested_color_mode<class_EditorSettings_property_interface/inspector/nested_color_mode>` is set to **Containers & Resources** this parameter will have no effect since those editors will already be colored + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/disable_folding: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/disable_folding** :ref:`🔗<class_EditorSettings_property_interface/inspector/disable_folding>` + +If ``true``, forces all property groups to be expanded in the Inspector dock and prevents collapsing them. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/float_drag_speed: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **interface/inspector/float_drag_speed** :ref:`🔗<class_EditorSettings_property_interface/inspector/float_drag_speed>` + +Base speed for increasing/decreasing float values by dragging them in the inspector. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/horizontal_vector2_editing: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/horizontal_vector2_editing** :ref:`🔗<class_EditorSettings_property_interface/inspector/horizontal_vector2_editing>` + +If ``true``, :ref:`Vector2<class_Vector2>` and :ref:`Vector2i<class_Vector2i>` properties are shown on a single line in the inspector instead of two lines. This is overall more compact, but it can be harder to view and edit large values without expanding the inspector horizontally. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/horizontal_vector_types_editing: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/horizontal_vector_types_editing** :ref:`🔗<class_EditorSettings_property_interface/inspector/horizontal_vector_types_editing>` + +If ``true``, :ref:`Vector3<class_Vector3>`, :ref:`Vector3i<class_Vector3i>`, :ref:`Vector4<class_Vector4>`, :ref:`Vector4i<class_Vector4i>`, :ref:`Rect2<class_Rect2>`, :ref:`Rect2i<class_Rect2i>`, :ref:`Plane<class_Plane>`, and :ref:`Quaternion<class_Quaternion>` properties are shown on a single line in the inspector instead of multiple lines. This is overall more compact, but it can be harder to view and edit large values without expanding the inspector horizontally. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/inspector/max_array_dictionary_items_per_page** :ref:`🔗<class_EditorSettings_property_interface/inspector/max_array_dictionary_items_per_page>` + +The number of :ref:`Array<class_Array>` or :ref:`Dictionary<class_Dictionary>` items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/nested_color_mode: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/inspector/nested_color_mode** :ref:`🔗<class_EditorSettings_property_interface/inspector/nested_color_mode>` + +Control which property editors are colored when they are opened. + +- **Containers & Resources:** Color all Array, Dictionary, and Resource Editors. + +- **Resources:** Color all Resource Editors. + +- **External Resources:** Color Resource Editors that edits an external resource. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/open_resources_in_current_inspector: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/open_resources_in_current_inspector** :ref:`🔗<class_EditorSettings_property_interface/inspector/open_resources_in_current_inspector>` + +If ``true``, subresources can be edited in the current inspector view. If the resource type is defined in :ref:`interface/inspector/resources_to_open_in_new_inspector<class_EditorSettings_property_interface/inspector/resources_to_open_in_new_inspector>` or if this setting is ``false``, attempting to edit a subresource always opens a new inspector view. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/resources_to_open_in_new_inspector: + +.. rst-class:: classref-property + +:ref:`PackedStringArray<class_PackedStringArray>` **interface/inspector/resources_to_open_in_new_inspector** :ref:`🔗<class_EditorSettings_property_interface/inspector/resources_to_open_in_new_inspector>` + +List of resources that should always be opened in a new inspector view, even if :ref:`interface/inspector/open_resources_in_current_inspector<class_EditorSettings_property_interface/inspector/open_resources_in_current_inspector>` is ``true``. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/inspector/show_low_level_opentype_features: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/inspector/show_low_level_opentype_features** :ref:`🔗<class_EditorSettings_property_interface/inspector/show_low_level_opentype_features>` + +If ``true``, display OpenType features marked as ``hidden`` by the font file in the :ref:`Font<class_Font>` editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/multi_window/enable: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/multi_window/enable** :ref:`🔗<class_EditorSettings_property_interface/multi_window/enable>` + +If ``true``, multiple window support in editor is enabled. The following panels can become dedicated windows (i.e. made floating): Docks, Script editor, and Shader editor. + +\ **Note:** When :ref:`interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` is ``true``, the multi window support is always disabled. + +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>` instead of querying the value of this editor setting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/multi_window/maximize_window: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/multi_window/maximize_window** :ref:`🔗<class_EditorSettings_property_interface/multi_window/maximize_window>` + +If ``true``, when panels are made floating they will be maximized. + +If ``false``, when panels are made floating their position and size will match the ones when they are attached (excluding window border) to the editor window. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/multi_window/restore_windows_on_load: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/multi_window/restore_windows_on_load** :ref:`🔗<class_EditorSettings_property_interface/multi_window/restore_windows_on_load>` + +If ``true``, the floating panel position, size, and screen will be saved on editor exit. On next launch the panels that were floating will be made floating in the saved positions, sizes and screens, if possible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/scene_tabs/display_close_button: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/scene_tabs/display_close_button** :ref:`🔗<class_EditorSettings_property_interface/scene_tabs/display_close_button>` + +Controls when the Close (X) button is displayed on scene tabs at the top of the editor. .. rst-class:: classref-item-separator @@ -2271,7 +3099,7 @@ Controls when the Close (X) button is displayed on scene tabs at the top of the .. rst-class:: classref-property -:ref:`int<class_int>` **interface/scene_tabs/maximum_width** +:ref:`int<class_int>` **interface/scene_tabs/maximum_width** :ref:`🔗<class_EditorSettings_property_interface/scene_tabs/maximum_width>` The maximum width of each scene tab at the top editor (in pixels). @@ -2279,11 +3107,25 @@ The maximum width of each scene tab at the top editor (in pixels). ---- +.. _class_EditorSettings_property_interface/scene_tabs/restore_scenes_on_load: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/scene_tabs/restore_scenes_on_load** :ref:`🔗<class_EditorSettings_property_interface/scene_tabs/restore_scenes_on_load>` + +If ``true``, when a project is loaded, restores scenes that were opened on the last editor session. + +\ **Note:** With many opened scenes, the editor may take longer to become usable. If starting the editor quickly is necessary, consider setting this to ``false``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/scene_tabs/show_script_button: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/scene_tabs/show_script_button** +:ref:`bool<class_bool>` **interface/scene_tabs/show_script_button** :ref:`🔗<class_EditorSettings_property_interface/scene_tabs/show_script_button>` If ``true``, show a button next to each scene tab that opens the scene's "dominant" script when clicked. The "dominant" script is the one that is at the highest level in the scene's hierarchy. @@ -2295,7 +3137,7 @@ If ``true``, show a button next to each scene tab that opens the scene's "domina .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/scene_tabs/show_thumbnail_on_hover** +:ref:`bool<class_bool>` **interface/scene_tabs/show_thumbnail_on_hover** :ref:`🔗<class_EditorSettings_property_interface/scene_tabs/show_thumbnail_on_hover>` If ``true``, display an automatically-generated thumbnail when hovering scene tabs with the mouse. Scene thumbnails are generated when saving the scene. @@ -2307,7 +3149,7 @@ If ``true``, display an automatically-generated thumbnail when hovering scene ta .. rst-class:: classref-property -:ref:`Color<class_Color>` **interface/theme/accent_color** +:ref:`Color<class_Color>` **interface/theme/accent_color** :ref:`🔗<class_EditorSettings_property_interface/theme/accent_color>` The color to use for "highlighted" user interface elements in the editor (pressed and hovered items). @@ -2319,9 +3161,11 @@ The color to use for "highlighted" user interface elements in the editor (presse .. rst-class:: classref-property -:ref:`float<class_float>` **interface/theme/additional_spacing** +:ref:`int<class_int>` **interface/theme/additional_spacing** :ref:`🔗<class_EditorSettings_property_interface/theme/additional_spacing>` + +The extra spacing to add to various GUI elements in the editor (in pixels). Increasing this value is useful to improve usability on touch screens, at the cost of reducing the amount of usable screen real estate. -The spacing to add for buttons and list items in the editor (in pixels). Increasing this value is useful to improve usability on touch screens, at the cost of reducing the amount of usable screen real estate. +See also :ref:`interface/theme/spacing_preset<class_EditorSettings_property_interface/theme/spacing_preset>`. .. rst-class:: classref-item-separator @@ -2331,7 +3175,7 @@ The spacing to add for buttons and list items in the editor (in pixels). Increas .. rst-class:: classref-property -:ref:`Color<class_Color>` **interface/theme/base_color** +:ref:`Color<class_Color>` **interface/theme/base_color** :ref:`🔗<class_EditorSettings_property_interface/theme/base_color>` The base color to use for user interface elements in the editor. Secondary colors (such as darker/lighter variants) are derived from this color. @@ -2339,11 +3183,23 @@ The base color to use for user interface elements in the editor. Secondary color ---- +.. _class_EditorSettings_property_interface/theme/base_spacing: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **interface/theme/base_spacing** :ref:`🔗<class_EditorSettings_property_interface/theme/base_spacing>` + +The base spacing used by various GUI elements in the editor (in pixels). See also :ref:`interface/theme/spacing_preset<class_EditorSettings_property_interface/theme/spacing_preset>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/theme/border_size: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/theme/border_size** +:ref:`int<class_int>` **interface/theme/border_size** :ref:`🔗<class_EditorSettings_property_interface/theme/border_size>` The border size to use for interface elements (in pixels). @@ -2355,7 +3211,7 @@ The border size to use for interface elements (in pixels). .. rst-class:: classref-property -:ref:`float<class_float>` **interface/theme/contrast** +:ref:`float<class_float>` **interface/theme/contrast** :ref:`🔗<class_EditorSettings_property_interface/theme/contrast>` The contrast factor to use when deriving the editor theme's base color (see :ref:`interface/theme/base_color<class_EditorSettings_property_interface/theme/base_color>`). When using a positive values, the derived colors will be *darker* than the base color. This contrast factor can be set to a negative value, which will make the derived colors *brighter* than the base color. Negative contrast rates often look better for light themes. @@ -2367,7 +3223,7 @@ The contrast factor to use when deriving the editor theme's base color (see :ref .. rst-class:: classref-property -:ref:`int<class_int>` **interface/theme/corner_radius** +:ref:`int<class_int>` **interface/theme/corner_radius** :ref:`🔗<class_EditorSettings_property_interface/theme/corner_radius>` The corner radius to use for interface elements (in pixels). ``0`` is square. @@ -2379,7 +3235,7 @@ The corner radius to use for interface elements (in pixels). ``0`` is square. .. rst-class:: classref-property -:ref:`String<class_String>` **interface/theme/custom_theme** +:ref:`String<class_String>` **interface/theme/custom_theme** :ref:`🔗<class_EditorSettings_property_interface/theme/custom_theme>` The custom theme resource to use for the editor. Must be a Godot theme resource in ``.tres`` or ``.res`` format. @@ -2391,7 +3247,7 @@ The custom theme resource to use for the editor. Must be a Godot theme resource .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/theme/draw_extra_borders** +:ref:`bool<class_bool>` **interface/theme/draw_extra_borders** :ref:`🔗<class_EditorSettings_property_interface/theme/draw_extra_borders>` If ``true``, draws additional borders around interactive UI elements in the editor. This is automatically enabled when using the **Black (OLED)** theme preset, as this theme preset uses a fully black background. @@ -2399,19 +3255,31 @@ If ``true``, draws additional borders around interactive UI elements in the edit ---- +.. _class_EditorSettings_property_interface/theme/follow_system_theme: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/theme/follow_system_theme** :ref:`🔗<class_EditorSettings_property_interface/theme/follow_system_theme>` + +If ``true``, the editor theme preset will attempt to automatically match the system theme. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/theme/icon_and_font_color: .. rst-class:: classref-property -:ref:`int<class_int>` **interface/theme/icon_and_font_color** +:ref:`int<class_int>` **interface/theme/icon_and_font_color** :ref:`🔗<class_EditorSettings_property_interface/theme/icon_and_font_color>` The icon and font color scheme to use in the editor. - **Auto** determines the color scheme to use automatically based on :ref:`interface/theme/base_color<class_EditorSettings_property_interface/theme/base_color>`. -- **Dark** makes fonts and icons light (suitable for dark themes). +- **Dark** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following the set of rules defined in `this file <https://github.com/godotengine/godot/blob/master/editor/themes/editor_theme_manager.cpp>`__. -- **Light** makes fonts and icons dark (suitable for light themes). Icon colors are automatically converted by the editor following `this set of rules <https://github.com/godotengine/godot/blob/master/editor/editor_themes.cpp#L135>`__. +- **Light** makes fonts and icons light (suitable for dark themes). .. rst-class:: classref-item-separator @@ -2421,7 +3289,7 @@ The icon and font color scheme to use in the editor. .. rst-class:: classref-property -:ref:`float<class_float>` **interface/theme/icon_saturation** +:ref:`float<class_float>` **interface/theme/icon_saturation** :ref:`🔗<class_EditorSettings_property_interface/theme/icon_saturation>` The saturation to use for editor icons. Higher values result in more vibrant colors. @@ -2435,7 +3303,7 @@ The saturation to use for editor icons. Higher values result in more vibrant col .. rst-class:: classref-property -:ref:`String<class_String>` **interface/theme/preset** +:ref:`String<class_String>` **interface/theme/preset** :ref:`🔗<class_EditorSettings_property_interface/theme/preset>` The editor theme preset to use. @@ -2447,7 +3315,7 @@ The editor theme preset to use. .. rst-class:: classref-property -:ref:`float<class_float>` **interface/theme/relationship_line_opacity** +:ref:`float<class_float>` **interface/theme/relationship_line_opacity** :ref:`🔗<class_EditorSettings_property_interface/theme/relationship_line_opacity>` The opacity to use when drawing relationship lines in the editor's :ref:`Tree<class_Tree>`-based GUIs (such as the Scene tree dock). @@ -2455,11 +3323,37 @@ The opacity to use when drawing relationship lines in the editor's :ref:`Tree<cl ---- +.. _class_EditorSettings_property_interface/theme/spacing_preset: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **interface/theme/spacing_preset** :ref:`🔗<class_EditorSettings_property_interface/theme/spacing_preset>` + +The editor theme spacing preset to use. See also :ref:`interface/theme/base_spacing<class_EditorSettings_property_interface/theme/base_spacing>` and :ref:`interface/theme/additional_spacing<class_EditorSettings_property_interface/theme/additional_spacing>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/theme/use_system_accent_color: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **interface/theme/use_system_accent_color** :ref:`🔗<class_EditorSettings_property_interface/theme/use_system_accent_color>` + +If ``true``, set accent color based on system settings. + +\ **Note:** This setting is only effective on Windows and MacOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/touchscreen/enable_long_press_as_right_click: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/touchscreen/enable_long_press_as_right_click** +:ref:`bool<class_bool>` **interface/touchscreen/enable_long_press_as_right_click** :ref:`🔗<class_EditorSettings_property_interface/touchscreen/enable_long_press_as_right_click>` If ``true``, long press on touchscreen is treated as right click. @@ -2473,7 +3367,7 @@ If ``true``, long press on touchscreen is treated as right click. .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/touchscreen/enable_pan_and_scale_gestures** +:ref:`bool<class_bool>` **interface/touchscreen/enable_pan_and_scale_gestures** :ref:`🔗<class_EditorSettings_property_interface/touchscreen/enable_pan_and_scale_gestures>` If ``true``, enable two finger pan and scale gestures on touchscreen devices. @@ -2487,7 +3381,7 @@ If ``true``, enable two finger pan and scale gestures on touchscreen devices. .. rst-class:: classref-property -:ref:`bool<class_bool>` **interface/touchscreen/increase_scrollbar_touch_area** +:ref:`bool<class_bool>` **interface/touchscreen/increase_scrollbar_touch_area** :ref:`🔗<class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area>` If ``true``, increases the scrollbar touch area to improve usability on touchscreen devices. @@ -2501,7 +3395,7 @@ If ``true``, increases the scrollbar touch area to improve usability on touchscr .. rst-class:: classref-property -:ref:`float<class_float>` **interface/touchscreen/scale_gizmo_handles** +:ref:`float<class_float>` **interface/touchscreen/scale_gizmo_handles** :ref:`🔗<class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles>` Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices. @@ -2511,11 +3405,45 @@ Specify the multiplier to apply to the scale for the editor gizmo handles to imp ---- +.. _class_EditorSettings_property_network/connection/engine_version_update_mode: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **network/connection/engine_version_update_mode** :ref:`🔗<class_EditorSettings_property_network/connection/engine_version_update_mode>` + +Specifies how the engine should check for updates. + +- **Disable Update Checks** will block the engine from checking updates (see also :ref:`network/connection/network_mode<class_EditorSettings_property_network/connection/network_mode>`). + +- **Check Newest Preview** (default for preview versions) will check for the newest available development snapshot. + +- **Check Newest Stable** (default for stable versions) will check for the newest available stable version. + +- **Check Newest Patch** will check for the latest available stable version, but only within the same minor version. E.g. if your version is ``4.3.stable``, you will be notified about ``4.3.1.stable``, but not ``4.4.stable``. + +All update modes will ignore builds with different major versions (e.g. Godot 4 -> Godot 5). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_network/connection/network_mode: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **network/connection/network_mode** :ref:`🔗<class_EditorSettings_property_network/connection/network_mode>` + +Determines whether online features are enabled in the editor, such as the Asset Library or update checks. Disabling these online features helps alleviate privacy concerns by preventing the editor from making HTTP requests to the Godot website or third-party platforms hosting assets from the Asset Library. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_network/debug/remote_host: .. rst-class:: classref-property -:ref:`String<class_String>` **network/debug/remote_host** +:ref:`String<class_String>` **network/debug/remote_host** :ref:`🔗<class_EditorSettings_property_network/debug/remote_host>` The address to listen to when starting the remote debugger. This can be set to ``0.0.0.0`` to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from ``localhost``). @@ -2527,7 +3455,7 @@ The address to listen to when starting the remote debugger. This can be set to ` .. rst-class:: classref-property -:ref:`int<class_int>` **network/debug/remote_port** +:ref:`int<class_int>` **network/debug/remote_port** :ref:`🔗<class_EditorSettings_property_network/debug/remote_port>` The port to listen to when starting the remote debugger. Godot will try to use port numbers above the configured number if the configured number is already taken by another application. @@ -2539,7 +3467,7 @@ The port to listen to when starting the remote debugger. Godot will try to use p .. rst-class:: classref-property -:ref:`String<class_String>` **network/http_proxy/host** +:ref:`String<class_String>` **network/http_proxy/host** :ref:`🔗<class_EditorSettings_property_network/http_proxy/host>` The host to use to contact the HTTP and HTTPS proxy in the editor (for the asset library and export template downloads). See also :ref:`network/http_proxy/port<class_EditorSettings_property_network/http_proxy/port>`. @@ -2553,7 +3481,7 @@ The host to use to contact the HTTP and HTTPS proxy in the editor (for the asset .. rst-class:: classref-property -:ref:`int<class_int>` **network/http_proxy/port** +:ref:`int<class_int>` **network/http_proxy/port** :ref:`🔗<class_EditorSettings_property_network/http_proxy/port>` The port number to use to contact the HTTP and HTTPS proxy in the editor (for the asset library and export template downloads). See also :ref:`network/http_proxy/host<class_EditorSettings_property_network/http_proxy/host>`. @@ -2567,7 +3495,7 @@ The port number to use to contact the HTTP and HTTPS proxy in the editor (for th .. rst-class:: classref-property -:ref:`String<class_String>` **network/tls/editor_tls_certificates** +:ref:`String<class_String>` **network/tls/editor_tls_certificates** :ref:`🔗<class_EditorSettings_property_network/tls/editor_tls_certificates>` The TLS certificate bundle to use for HTTP requests made within the editor (e.g. from the AssetLib tab). If left empty, the `included Mozilla certificate bundle <https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt>`__ will be used. @@ -2579,7 +3507,7 @@ The TLS certificate bundle to use for HTTP requests made within the editor (e.g. .. rst-class:: classref-property -:ref:`String<class_String>` **project_manager/default_renderer** +:ref:`String<class_String>` **project_manager/default_renderer** :ref:`🔗<class_EditorSettings_property_project_manager/default_renderer>` The renderer type that will be checked off by default when creating a new project. Accepted strings are "forward_plus", "mobile" or "gl_compatibility". @@ -2587,11 +3515,23 @@ The renderer type that will be checked off by default when creating a new projec ---- +.. _class_EditorSettings_property_project_manager/directory_naming_convention: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **project_manager/directory_naming_convention** :ref:`🔗<class_EditorSettings_property_project_manager/directory_naming_convention>` + +Directory naming convention for the project manager. Options are "No convention" (project name is directory name), "kebab-case" (default), "snake_case", "camelCase", "PascalCase", or "Title Case". + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_project_manager/sorting_order: .. rst-class:: classref-property -:ref:`int<class_int>` **project_manager/sorting_order** +:ref:`int<class_int>` **project_manager/sorting_order** :ref:`🔗<class_EditorSettings_property_project_manager/sorting_order>` The sorting order to use in the project manager. When changing the sorting order in the project manager, this setting is set permanently in the editor settings. @@ -2603,7 +3543,7 @@ The sorting order to use in the project manager. When changing the sorting order .. rst-class:: classref-property -:ref:`bool<class_bool>` **run/auto_save/save_before_running** +:ref:`bool<class_bool>` **run/auto_save/save_before_running** :ref:`🔗<class_EditorSettings_property_run/auto_save/save_before_running>` If ``true``, saves all scenes and scripts automatically before running the project. Setting this to ``false`` prevents the editor from saving if there are no changes which can speed up the project startup slightly, but it makes it possible to run a project that has unsaved changes. (Unsaved changes will not be visible in the running project.) @@ -2611,37 +3551,37 @@ If ``true``, saves all scenes and scripts automatically before running the proje ---- -.. _class_EditorSettings_property_run/output/always_clear_output_on_play: +.. _class_EditorSettings_property_run/bottom_panel/action_on_play: .. rst-class:: classref-property -:ref:`bool<class_bool>` **run/output/always_clear_output_on_play** +:ref:`int<class_int>` **run/bottom_panel/action_on_play** :ref:`🔗<class_EditorSettings_property_run/bottom_panel/action_on_play>` -If ``true``, the editor will clear the Output panel when running the project. +The action to execute on the bottom panel when running the project. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_run/output/always_close_output_on_stop: +.. _class_EditorSettings_property_run/bottom_panel/action_on_stop: .. rst-class:: classref-property -:ref:`bool<class_bool>` **run/output/always_close_output_on_stop** +:ref:`int<class_int>` **run/bottom_panel/action_on_stop** :ref:`🔗<class_EditorSettings_property_run/bottom_panel/action_on_stop>` -If ``true``, the editor will collapse the Output panel when stopping the project. +The action to execute on the bottom panel when stopping the project. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_run/output/always_open_output_on_play: +.. _class_EditorSettings_property_run/output/always_clear_output_on_play: .. rst-class:: classref-property -:ref:`bool<class_bool>` **run/output/always_open_output_on_play** +:ref:`bool<class_bool>` **run/output/always_clear_output_on_play** :ref:`🔗<class_EditorSettings_property_run/output/always_clear_output_on_play>` -If ``true``, the editor will expand the Output panel when running the project. +If ``true``, the editor will clear the Output panel when running the project. .. rst-class:: classref-item-separator @@ -2651,7 +3591,7 @@ If ``true``, the editor will expand the Output panel when running the project. .. rst-class:: classref-property -:ref:`int<class_int>` **run/output/font_size** +:ref:`int<class_int>` **run/output/font_size** :ref:`🔗<class_EditorSettings_property_run/output/font_size>` The size of the font in the **Output** panel at the bottom of the editor. This setting does not impact the font size of the script editor (see :ref:`interface/editor/code_font_size<class_EditorSettings_property_interface/editor/code_font_size>`). @@ -2659,11 +3599,35 @@ The size of the font in the **Output** panel at the bottom of the editor. This s ---- +.. _class_EditorSettings_property_run/output/max_lines: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **run/output/max_lines** :ref:`🔗<class_EditorSettings_property_run/output/max_lines>` + +Maximum number of lines to show at any one time in the Output panel. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_run/platforms/linuxbsd/prefer_wayland: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **run/platforms/linuxbsd/prefer_wayland** :ref:`🔗<class_EditorSettings_property_run/platforms/linuxbsd/prefer_wayland>` + +If ``true``, on Linux/BSD, the editor will check for Wayland first instead of X11 (if available). + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_run/window_placement/android_window: .. rst-class:: classref-property -:ref:`int<class_int>` **run/window_placement/android_window** +:ref:`int<class_int>` **run/window_placement/android_window** :ref:`🔗<class_EditorSettings_property_run/window_placement/android_window>` The Android window to display the project on when starting the project from the editor. @@ -2677,7 +3641,7 @@ The Android window to display the project on when starting the project from the .. rst-class:: classref-property -:ref:`int<class_int>` **run/window_placement/rect** +:ref:`int<class_int>` **run/window_placement/rect** :ref:`🔗<class_EditorSettings_property_run/window_placement/rect>` The window mode to use to display the project when starting the project from the editor. @@ -2689,7 +3653,7 @@ The window mode to use to display the project when starting the project from the .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **run/window_placement/rect_custom_position** +:ref:`Vector2<class_Vector2>` **run/window_placement/rect_custom_position** :ref:`🔗<class_EditorSettings_property_run/window_placement/rect_custom_position>` The custom position to use when starting the project from the editor (in pixels from the top-left corner). Only effective if :ref:`run/window_placement/rect<class_EditorSettings_property_run/window_placement/rect>` is set to **Custom Position**. @@ -2701,7 +3665,7 @@ The custom position to use when starting the project from the editor (in pixels .. rst-class:: classref-property -:ref:`int<class_int>` **run/window_placement/screen** +:ref:`int<class_int>` **run/window_placement/screen** :ref:`🔗<class_EditorSettings_property_run/window_placement/screen>` The monitor to display the project on when starting the project from the editor. @@ -2713,7 +3677,7 @@ The monitor to display the project on when starting the project from the editor. .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/caret/caret_blink** +:ref:`bool<class_bool>` **text_editor/appearance/caret/caret_blink** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/caret/caret_blink>` If ``true``, makes the caret blink according to :ref:`text_editor/appearance/caret/caret_blink_interval<class_EditorSettings_property_text_editor/appearance/caret/caret_blink_interval>`. Disabling this setting can improve battery life on laptops if you spend long amounts of time in the script editor, since it will reduce the frequency at which the editor needs to be redrawn. @@ -2725,7 +3689,7 @@ If ``true``, makes the caret blink according to :ref:`text_editor/appearance/car .. rst-class:: classref-property -:ref:`float<class_float>` **text_editor/appearance/caret/caret_blink_interval** +:ref:`float<class_float>` **text_editor/appearance/caret/caret_blink_interval** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/caret/caret_blink_interval>` The interval at which the caret will blink (in seconds). See also :ref:`text_editor/appearance/caret/caret_blink<class_EditorSettings_property_text_editor/appearance/caret/caret_blink>`. @@ -2737,7 +3701,7 @@ The interval at which the caret will blink (in seconds). See also :ref:`text_edi .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/caret/highlight_all_occurrences** +:ref:`bool<class_bool>` **text_editor/appearance/caret/highlight_all_occurrences** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences>` If ``true``, highlights all occurrences of the currently selected text in the script editor. See also :ref:`text_editor/theme/highlighting/word_highlighted_color<class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color>`. @@ -2749,7 +3713,7 @@ If ``true``, highlights all occurrences of the currently selected text in the sc .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/caret/highlight_current_line** +:ref:`bool<class_bool>` **text_editor/appearance/caret/highlight_current_line** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/caret/highlight_current_line>` If ``true``, colors the background of the line the caret is currently on with :ref:`text_editor/theme/highlighting/current_line_color<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>`. @@ -2761,7 +3725,7 @@ If ``true``, colors the background of the line the caret is currently on with :r .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/caret/type** +:ref:`int<class_int>` **text_editor/appearance/caret/type** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/caret/type>` The shape of the caret to use in the script editor. **Line** displays a vertical line to the left of the current character, whereas **Block** displays an outline over the current character. @@ -2773,7 +3737,7 @@ The shape of the caret to use in the script editor. **Line** displays a vertical .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/guidelines/line_length_guideline_hard_column** +:ref:`int<class_int>` **text_editor/appearance/guidelines/line_length_guideline_hard_column** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>` The column at which to display a subtle line as a line length guideline for scripts. This should generally be greater than :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>`. @@ -2785,7 +3749,7 @@ The column at which to display a subtle line as a line length guideline for scri .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/guidelines/line_length_guideline_soft_column** +:ref:`int<class_int>` **text_editor/appearance/guidelines/line_length_guideline_soft_column** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>` The column at which to display a *very* subtle line as a line length guideline for scripts. This should generally be lower than :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>`. @@ -2797,7 +3761,7 @@ The column at which to display a *very* subtle line as a line length guideline f .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/guidelines/show_line_length_guidelines** +:ref:`bool<class_bool>` **text_editor/appearance/guidelines/show_line_length_guidelines** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/guidelines/show_line_length_guidelines>` If ``true``, displays line length guidelines to help you keep line lengths in check. See also :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_soft_column>` and :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column<class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column>`. @@ -2809,7 +3773,7 @@ If ``true``, displays line length guidelines to help you keep line lengths in ch .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/gutters/highlight_type_safe_lines** +:ref:`bool<class_bool>` **text_editor/appearance/gutters/highlight_type_safe_lines** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/gutters/highlight_type_safe_lines>` If ``true``, highlights type-safe lines by displaying their line number color with :ref:`text_editor/theme/highlighting/safe_line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color>` instead of :ref:`text_editor/theme/highlighting/line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/line_number_color>`. Type-safe lines are lines of code where the type of all variables is known at compile-time. These type-safe lines may run faster thanks to typed instructions. @@ -2821,7 +3785,7 @@ If ``true``, highlights type-safe lines by displaying their line number color wi .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/gutters/line_numbers_zero_padded** +:ref:`bool<class_bool>` **text_editor/appearance/gutters/line_numbers_zero_padded** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/gutters/line_numbers_zero_padded>` If ``true``, displays line numbers with zero padding (e.g. ``007`` instead of ``7``). @@ -2833,7 +3797,7 @@ If ``true``, displays line numbers with zero padding (e.g. ``007`` instead of `` .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/gutters/show_info_gutter** +:ref:`bool<class_bool>` **text_editor/appearance/gutters/show_info_gutter** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/gutters/show_info_gutter>` If ``true``, displays a gutter at the left containing icons for methods with signal connections and for overridden methods. @@ -2845,7 +3809,7 @@ If ``true``, displays a gutter at the left containing icons for methods with sig .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/gutters/show_line_numbers** +:ref:`bool<class_bool>` **text_editor/appearance/gutters/show_line_numbers** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/gutters/show_line_numbers>` If ``true``, displays line numbers in a gutter at the left. @@ -2857,7 +3821,7 @@ If ``true``, displays line numbers in a gutter at the left. .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/lines/autowrap_mode** +:ref:`int<class_int>` **text_editor/appearance/lines/autowrap_mode** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/lines/autowrap_mode>` If :ref:`text_editor/appearance/lines/word_wrap<class_EditorSettings_property_text_editor/appearance/lines/word_wrap>` is set to ``1``, sets text wrapping mode. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -2869,7 +3833,7 @@ If :ref:`text_editor/appearance/lines/word_wrap<class_EditorSettings_property_te .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/lines/code_folding** +:ref:`bool<class_bool>` **text_editor/appearance/lines/code_folding** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/lines/code_folding>` If ``true``, displays the folding arrows next to indented code sections and allows code folding. If ``false``, hides the folding arrows next to indented code sections and disallows code folding. @@ -2881,7 +3845,7 @@ If ``true``, displays the folding arrows next to indented code sections and allo .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/lines/word_wrap** +:ref:`int<class_int>` **text_editor/appearance/lines/word_wrap** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/lines/word_wrap>` If ``true``, wraps long lines over multiple lines to avoid horizontal scrolling. This is a display-only feature; it does not actually insert line breaks in your scripts. @@ -2893,7 +3857,7 @@ If ``true``, wraps long lines over multiple lines to avoid horizontal scrolling. .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/minimap/minimap_width** +:ref:`int<class_int>` **text_editor/appearance/minimap/minimap_width** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/minimap/minimap_width>` The width of the minimap in the script editor (in pixels). @@ -2905,7 +3869,7 @@ The width of the minimap in the script editor (in pixels). .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/minimap/show_minimap** +:ref:`bool<class_bool>` **text_editor/appearance/minimap/show_minimap** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/minimap/show_minimap>` If ``true``, draws an overview of the script near the scroll bar. The minimap can be left-clicked to scroll directly to a location in an "absolute" manner. @@ -2917,7 +3881,7 @@ If ``true``, draws an overview of the script near the scroll bar. The minimap ca .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/whitespace/draw_spaces** +:ref:`bool<class_bool>` **text_editor/appearance/whitespace/draw_spaces** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/whitespace/draw_spaces>` If ``true``, draws space characters as centered points. @@ -2929,7 +3893,7 @@ If ``true``, draws space characters as centered points. .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/appearance/whitespace/draw_tabs** +:ref:`bool<class_bool>` **text_editor/appearance/whitespace/draw_tabs** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/whitespace/draw_tabs>` If ``true``, draws tab characters as chevrons. @@ -2941,7 +3905,7 @@ If ``true``, draws tab characters as chevrons. .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/appearance/whitespace/line_spacing** +:ref:`int<class_int>` **text_editor/appearance/whitespace/line_spacing** :ref:`🔗<class_EditorSettings_property_text_editor/appearance/whitespace/line_spacing>` The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. @@ -2953,7 +3917,7 @@ The space to add between lines (in pixels). Greater line spacing can help improv .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/files/auto_reload_scripts_on_external_change** +:ref:`bool<class_bool>` **text_editor/behavior/files/auto_reload_scripts_on_external_change** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/auto_reload_scripts_on_external_change>` If ``true``, automatically reloads scripts in the editor when they have been modified and saved by external editors. @@ -2965,7 +3929,7 @@ If ``true``, automatically reloads scripts in the editor when they have been mod .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/behavior/files/autosave_interval_secs** +:ref:`int<class_int>` **text_editor/behavior/files/autosave_interval_secs** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/autosave_interval_secs>` If set to a value greater than ``0``, automatically saves the current script following the specified interval (in seconds). This can be used to prevent data loss if the editor crashes. @@ -2977,7 +3941,7 @@ If set to a value greater than ``0``, automatically saves the current script fol .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/files/convert_indent_on_save** +:ref:`bool<class_bool>` **text_editor/behavior/files/convert_indent_on_save** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/convert_indent_on_save>` If ``true``, converts indentation to match the script editor's indentation settings when saving a script. See also :ref:`text_editor/behavior/indent/type<class_EditorSettings_property_text_editor/behavior/indent/type>`. @@ -2989,7 +3953,7 @@ If ``true``, converts indentation to match the script editor's indentation setti .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/files/restore_scripts_on_load** +:ref:`bool<class_bool>` **text_editor/behavior/files/restore_scripts_on_load** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/restore_scripts_on_load>` If ``true``, reopens scripts that were opened in the last session when the editor is reopened on a given project. @@ -2997,11 +3961,23 @@ If ``true``, reopens scripts that were opened in the last session when the edito ---- +.. _class_EditorSettings_property_text_editor/behavior/files/trim_final_newlines_on_save: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/behavior/files/trim_final_newlines_on_save** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/trim_final_newlines_on_save>` + +If ``true``, trims all empty newlines after the final newline when saving a script. Final newlines refer to the empty newlines found at the end of files. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save: .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/files/trim_trailing_whitespace_on_save** +:ref:`bool<class_bool>` **text_editor/behavior/files/trim_trailing_whitespace_on_save** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/files/trim_trailing_whitespace_on_save>` If ``true``, trims trailing whitespace when saving a script. Trailing whitespace refers to tab and space characters placed at the end of lines. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy. @@ -3013,7 +3989,7 @@ If ``true``, trims trailing whitespace when saving a script. Trailing whitespace .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/indent/auto_indent** +:ref:`bool<class_bool>` **text_editor/behavior/indent/auto_indent** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/indent/auto_indent>` If ``true``, automatically indents code when pressing the :kbd:`Enter` key based on blocks above the new line. @@ -3021,11 +3997,23 @@ If ``true``, automatically indents code when pressing the :kbd:`Enter` key based ---- +.. _class_EditorSettings_property_text_editor/behavior/indent/indent_wrapped_lines: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/behavior/indent/indent_wrapped_lines** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/indent/indent_wrapped_lines>` + +If ``true``, all wrapped lines are indented to the same amount as the unwrapped line. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/indent/size: .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/behavior/indent/size** +:ref:`int<class_int>` **text_editor/behavior/indent/size** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/indent/size>` When using tab indentation, determines the length of each tab. When using space indentation, determines how many spaces are inserted when pressing :kbd:`Tab` and when automatic indentation is performed. @@ -3037,7 +4025,7 @@ When using tab indentation, determines the length of each tab. When using space .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/behavior/indent/type** +:ref:`int<class_int>` **text_editor/behavior/indent/type** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/indent/type>` The indentation style to use (tabs or spaces). @@ -3047,11 +4035,23 @@ The indentation style to use (tabs or spaces). ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/custom_word_separators: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **text_editor/behavior/navigation/custom_word_separators** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/custom_word_separators>` + +The characters to consider as word delimiters if :ref:`text_editor/behavior/navigation/use_custom_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/use_custom_word_separators>` is ``true``. The characters should be defined without separation, for example ``#_!``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection: .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/navigation/drag_and_drop_selection** +:ref:`bool<class_bool>` **text_editor/behavior/navigation/drag_and_drop_selection** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/drag_and_drop_selection>` If ``true``, allows drag-and-dropping text in the script editor to move text. Disable this if you find yourself accidentally drag-and-dropping text in the script editor. @@ -3063,7 +4063,7 @@ If ``true``, allows drag-and-dropping text in the script editor to move text. Di .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/navigation/move_caret_on_right_click** +:ref:`bool<class_bool>` **text_editor/behavior/navigation/move_caret_on_right_click** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/move_caret_on_right_click>` If ``true``, the caret will be moved when right-clicking somewhere in the script editor (like when left-clicking or middle-clicking). If ``false``, the caret will only be moved when left-clicking or middle-clicking somewhere. @@ -3071,11 +4071,23 @@ If ``true``, the caret will be moved when right-clicking somewhere in the script ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/open_script_when_connecting_signal_to_existing_method>` + +If ``true``, opens the script editor when connecting a signal to an existing script method from the Node dock. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file: .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/navigation/scroll_past_end_of_file** +:ref:`bool<class_bool>` **text_editor/behavior/navigation/scroll_past_end_of_file** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/scroll_past_end_of_file>` If ``true``, allows scrolling past the end of the file. @@ -3087,7 +4099,7 @@ If ``true``, allows scrolling past the end of the file. .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/navigation/smooth_scrolling** +:ref:`bool<class_bool>` **text_editor/behavior/navigation/smooth_scrolling** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/smooth_scrolling>` If ``true``, allows scrolling in sub-line intervals and enables a smooth scrolling animation when using the mouse wheel to scroll. @@ -3101,7 +4113,7 @@ If ``true``, allows scrolling in sub-line intervals and enables a smooth scrolli .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/behavior/navigation/stay_in_script_editor_on_node_selected** +:ref:`bool<class_bool>` **text_editor/behavior/navigation/stay_in_script_editor_on_node_selected** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/stay_in_script_editor_on_node_selected>` If ``true``, prevents automatically switching between the Script and 2D/3D screens when selecting a node in the Scene tree dock. @@ -3109,11 +4121,35 @@ If ``true``, prevents automatically switching between the Script and 2D/3D scree ---- +.. _class_EditorSettings_property_text_editor/behavior/navigation/use_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/behavior/navigation/use_custom_word_separators** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/use_custom_word_separators>` + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will use the behavior of :ref:`text_editor/behavior/navigation/use_default_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/use_default_word_separators>`. If ``true``, it will also stop the caret if a character within :ref:`text_editor/behavior/navigation/custom_word_separators<class_EditorSettings_property_text_editor/behavior/navigation/custom_word_separators>` is detected. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/behavior/navigation/use_default_word_separators: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/behavior/navigation/use_default_word_separators** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/use_default_word_separators>` + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will stop moving caret only if a space or punctuation is detected. If ``true``, it will also stop the caret if a character is part of ```!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``, the Unicode General Punctuation table, or the Unicode CJK Punctuation table. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed: .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/behavior/navigation/v_scroll_speed** +:ref:`int<class_int>` **text_editor/behavior/navigation/v_scroll_speed** :ref:`🔗<class_EditorSettings_property_text_editor/behavior/navigation/v_scroll_speed>` The number of pixels to scroll with every mouse wheel increment. Higher values make the script scroll by faster when using the mouse wheel. @@ -3123,13 +4159,37 @@ The number of pixels to scroll with every mouse wheel increment. Higher values m ---- +.. _class_EditorSettings_property_text_editor/completion/add_node_path_literals: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/completion/add_node_path_literals** :ref:`🔗<class_EditorSettings_property_text_editor/completion/add_node_path_literals>` + +If ``true``, uses :ref:`NodePath<class_NodePath>` instead of :ref:`String<class_String>` when appropriate for code autocompletion or for drag and dropping object properties into the script editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_text_editor/completion/add_string_name_literals: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/completion/add_string_name_literals** :ref:`🔗<class_EditorSettings_property_text_editor/completion/add_string_name_literals>` + +If ``true``, uses :ref:`StringName<class_StringName>` instead of :ref:`String<class_String>` when appropriate for code autocompletion. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/completion/add_type_hints: .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/add_type_hints** +:ref:`bool<class_bool>` **text_editor/completion/add_type_hints** :ref:`🔗<class_EditorSettings_property_text_editor/completion/add_type_hints>` -If ``true``, adds static typing hints such as ``-> void`` and ``: int`` when using code autocompletion or when creating onready variables by drag and dropping nodes into the script editor while pressing the :kbd:`Ctrl` key. +If ``true``, adds :doc:`GDScript static typing <../tutorials/scripting/gdscript/static_typing>` hints such as ``-> void`` and ``: int`` when using code autocompletion or when creating onready variables by drag and dropping nodes into the script editor while pressing the :kbd:`Ctrl` key. If ``true``, newly created scripts will also automatically have type hints added to their method parameters and return types. .. rst-class:: classref-item-separator @@ -3139,7 +4199,7 @@ If ``true``, adds static typing hints such as ``-> void`` and ``: int`` when usi .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/auto_brace_complete** +:ref:`bool<class_bool>` **text_editor/completion/auto_brace_complete** :ref:`🔗<class_EditorSettings_property_text_editor/completion/auto_brace_complete>` If ``true``, automatically completes braces when making use of code completion. @@ -3151,7 +4211,7 @@ If ``true``, automatically completes braces when making use of code completion. .. rst-class:: classref-property -:ref:`float<class_float>` **text_editor/completion/code_complete_delay** +:ref:`float<class_float>` **text_editor/completion/code_complete_delay** :ref:`🔗<class_EditorSettings_property_text_editor/completion/code_complete_delay>` The delay in seconds after which autocompletion suggestions should be displayed when the user stops typing. @@ -3163,7 +4223,7 @@ The delay in seconds after which autocompletion suggestions should be displayed .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/code_complete_enabled** +:ref:`bool<class_bool>` **text_editor/completion/code_complete_enabled** :ref:`🔗<class_EditorSettings_property_text_editor/completion/code_complete_enabled>` If ``true``, code completion will be triggered automatically after :ref:`text_editor/completion/code_complete_delay<class_EditorSettings_property_text_editor/completion/code_complete_delay>`. If ``false``, you can still trigger completion manually by pressing :kbd:`Ctrl + Space` (:kbd:`Cmd + Space` on macOS). @@ -3171,11 +4231,23 @@ If ``true``, code completion will be triggered automatically after :ref:`text_ed ---- +.. _class_EditorSettings_property_text_editor/completion/colorize_suggestions: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **text_editor/completion/colorize_suggestions** :ref:`🔗<class_EditorSettings_property_text_editor/completion/colorize_suggestions>` + +If ``true`` enables the coloring for some items in the autocompletion suggestions, like vector components. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/completion/complete_file_paths: .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/complete_file_paths** +:ref:`bool<class_bool>` **text_editor/completion/complete_file_paths** :ref:`🔗<class_EditorSettings_property_text_editor/completion/complete_file_paths>` If ``true``, provides autocompletion suggestions for file paths in methods such as ``load()`` and ``preload()``. @@ -3187,7 +4259,7 @@ If ``true``, provides autocompletion suggestions for file paths in methods such .. rst-class:: classref-property -:ref:`float<class_float>` **text_editor/completion/idle_parse_delay** +:ref:`float<class_float>` **text_editor/completion/idle_parse_delay** :ref:`🔗<class_EditorSettings_property_text_editor/completion/idle_parse_delay>` The delay in seconds after which the script editor should check for errors when the user stops typing. @@ -3199,7 +4271,7 @@ The delay in seconds after which the script editor should check for errors when .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/put_callhint_tooltip_below_current_line** +:ref:`bool<class_bool>` **text_editor/completion/put_callhint_tooltip_below_current_line** :ref:`🔗<class_EditorSettings_property_text_editor/completion/put_callhint_tooltip_below_current_line>` If ``true``, the code completion tooltip will appear below the current line unless there is no space on screen below the current line. If ``false``, the code completion tooltip will appear above the current line. @@ -3211,7 +4283,7 @@ If ``true``, the code completion tooltip will appear below the current line unle .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/completion/use_single_quotes** +:ref:`bool<class_bool>` **text_editor/completion/use_single_quotes** :ref:`🔗<class_EditorSettings_property_text_editor/completion/use_single_quotes>` If ``true``, performs string autocompletion with single quotes. If ``false``, performs string autocompletion with double quotes (which matches the :doc:`GDScript style guide <../tutorials/scripting/gdscript/gdscript_styleguide>`). @@ -3223,7 +4295,7 @@ If ``true``, performs string autocompletion with single quotes. If ``false``, pe .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/help/class_reference_examples** +:ref:`int<class_int>` **text_editor/help/class_reference_examples** :ref:`🔗<class_EditorSettings_property_text_editor/help/class_reference_examples>` Controls which multi-line code blocks should be displayed in the editor help. This setting does not affect single-line code literals in the editor help. @@ -3235,7 +4307,7 @@ Controls which multi-line code blocks should be displayed in the editor help. Th .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/help/help_font_size** +:ref:`int<class_int>` **text_editor/help/help_font_size** :ref:`🔗<class_EditorSettings_property_text_editor/help/help_font_size>` The font size to use for the editor help (built-in class reference). @@ -3247,7 +4319,7 @@ The font size to use for the editor help (built-in class reference). .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/help/help_source_font_size** +:ref:`int<class_int>` **text_editor/help/help_source_font_size** :ref:`🔗<class_EditorSettings_property_text_editor/help/help_source_font_size>` The font size to use for code samples in the editor help (built-in class reference). @@ -3259,7 +4331,7 @@ The font size to use for code samples in the editor help (built-in class referen .. rst-class:: classref-property -:ref:`int<class_int>` **text_editor/help/help_title_font_size** +:ref:`int<class_int>` **text_editor/help/help_title_font_size** :ref:`🔗<class_EditorSettings_property_text_editor/help/help_title_font_size>` The font size to use for headings in the editor help (built-in class reference). @@ -3271,7 +4343,7 @@ The font size to use for headings in the editor help (built-in class reference). .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/help/show_help_index** +:ref:`bool<class_bool>` **text_editor/help/show_help_index** :ref:`🔗<class_EditorSettings_property_text_editor/help/show_help_index>` If ``true``, displays a table of contents at the left of the editor help (at the location where the members overview would appear when editing a script). @@ -3283,7 +4355,7 @@ If ``true``, displays a table of contents at the left of the editor help (at the .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/script_list/show_members_overview** +:ref:`bool<class_bool>` **text_editor/script_list/show_members_overview** :ref:`🔗<class_EditorSettings_property_text_editor/script_list/show_members_overview>` If ``true``, displays an overview of the current script's member variables and functions at the left of the script editor. See also :ref:`text_editor/script_list/sort_members_outline_alphabetically<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>`. @@ -3295,7 +4367,7 @@ If ``true``, displays an overview of the current script's member variables and f .. rst-class:: classref-property -:ref:`bool<class_bool>` **text_editor/script_list/sort_members_outline_alphabetically** +:ref:`bool<class_bool>` **text_editor/script_list/sort_members_outline_alphabetically** :ref:`🔗<class_EditorSettings_property_text_editor/script_list/sort_members_outline_alphabetically>` If ``true``, sorts the members outline (located at the left of the script editor) using alphabetical order. If ``false``, sorts the members outline depending on the order in which members are found in the script. @@ -3309,7 +4381,7 @@ If ``true``, sorts the members outline (located at the left of the script editor .. rst-class:: classref-property -:ref:`String<class_String>` **text_editor/theme/color_theme** +:ref:`String<class_String>` **text_editor/theme/color_theme** :ref:`🔗<class_EditorSettings_property_text_editor/theme/color_theme>` The syntax theme to use in the script editor. @@ -3325,7 +4397,7 @@ You can find additional syntax themes to install in the `godot-syntax-themes <ht .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/background_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/background_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/background_color>` The script editor's background color. If set to a translucent color, the editor theme's base color will be visible behind. @@ -3337,7 +4409,7 @@ The script editor's background color. If set to a translucent color, the editor .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/base_type_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/base_type_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/base_type_color>` The script editor's base type color (used for types like :ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Color<class_Color>`, ...). @@ -3349,7 +4421,7 @@ The script editor's base type color (used for types like :ref:`Vector2<class_Vec .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/bookmark_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/bookmark_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/bookmark_color>` The script editor's bookmark icon color (displayed in the gutter). @@ -3361,7 +4433,7 @@ The script editor's bookmark icon color (displayed in the gutter). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/brace_mismatch_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/brace_mismatch_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/brace_mismatch_color>` The script editor's brace mismatch color. Used when the caret is currently on a mismatched brace, parenthesis or bracket character. @@ -3373,7 +4445,7 @@ The script editor's brace mismatch color. Used when the caret is currently on a .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/breakpoint_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/breakpoint_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/breakpoint_color>` The script editor's breakpoint icon color (displayed in the gutter). @@ -3385,7 +4457,7 @@ The script editor's breakpoint icon color (displayed in the gutter). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/caret_background_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/caret_background_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/caret_background_color>` The script editor's caret background color. @@ -3399,7 +4471,7 @@ The script editor's caret background color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/caret_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/caret_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/caret_color>` The script editor's caret color. @@ -3411,7 +4483,7 @@ The script editor's caret color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/code_folding_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/code_folding_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/code_folding_color>` The script editor's color for the code folding icon (displayed in the gutter). @@ -3423,7 +4495,7 @@ The script editor's color for the code folding icon (displayed in the gutter). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/comment_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/comment_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/comment_color>` The script editor's comment color. @@ -3437,7 +4509,7 @@ The script editor's comment color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_background_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_background_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_background_color>` The script editor's autocompletion box background color. @@ -3449,7 +4521,7 @@ The script editor's autocompletion box background color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_existing_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_existing_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_existing_color>` The script editor's autocompletion box background color to highlight existing characters in the completion results. This should be a translucent color so that :ref:`text_editor/theme/highlighting/completion_selected_color<class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color>` can be seen behind. @@ -3461,7 +4533,7 @@ The script editor's autocompletion box background color to highlight existing ch .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_font_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_font_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_font_color>` The script editor's autocompletion box text color. @@ -3473,7 +4545,7 @@ The script editor's autocompletion box text color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_scroll_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_scroll_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_color>` The script editor's autocompletion box scroll bar color. @@ -3485,7 +4557,7 @@ The script editor's autocompletion box scroll bar color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_scroll_hovered_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_scroll_hovered_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_scroll_hovered_color>` The script editor's autocompletion box scroll bar color when hovered or pressed with the mouse. @@ -3497,7 +4569,7 @@ The script editor's autocompletion box scroll bar color when hovered or pressed .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_selected_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/completion_selected_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/completion_selected_color>` The script editor's autocompletion box background color for the currently selected line. @@ -3509,7 +4581,7 @@ The script editor's autocompletion box background color for the currently select .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/control_flow_keyword_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/control_flow_keyword_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/control_flow_keyword_color>` The script editor's control flow keyword color (used for keywords like ``if``, ``for``, ``return``, ...). @@ -3521,7 +4593,7 @@ The script editor's control flow keyword color (used for keywords like ``if``, ` .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/current_line_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/current_line_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>` The script editor's background color for the line the caret is currently on. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/mark_color<class_EditorSettings_property_text_editor/theme/highlighting/mark_color>`. @@ -3529,11 +4601,23 @@ The script editor's background color for the line the caret is currently on. Thi ---- +.. _class_EditorSettings_property_text_editor/theme/highlighting/doc_comment_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **text_editor/theme/highlighting/doc_comment_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/doc_comment_color>` + +The script editor's documentation comment color. In GDScript, this is used for comments starting with ``##``. In C#, this is used for comments starting with ``///`` or ``/**``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color: .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/engine_type_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/engine_type_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color>` The script editor's engine type color (:ref:`Vector2<class_Vector2>`, :ref:`Vector3<class_Vector3>`, :ref:`Color<class_Color>`, ...). @@ -3545,7 +4629,7 @@ The script editor's engine type color (:ref:`Vector2<class_Vector2>`, :ref:`Vect .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/executing_line_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/executing_line_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/executing_line_color>` The script editor's color for the debugger's executing line icon (displayed in the gutter). @@ -3553,11 +4637,23 @@ The script editor's color for the debugger's executing line icon (displayed in t ---- +.. _class_EditorSettings_property_text_editor/theme/highlighting/folded_code_region_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **text_editor/theme/highlighting/folded_code_region_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/folded_code_region_color>` + +The script editor's background line highlighting color for folded code region. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/theme/highlighting/function_color: .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/function_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/function_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/function_color>` The script editor's function call color. @@ -3571,7 +4667,7 @@ The script editor's function call color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/keyword_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/keyword_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/keyword_color>` The script editor's non-control flow keyword color (used for keywords like ``var``, ``func``, ``extends``, ...). @@ -3583,7 +4679,7 @@ The script editor's non-control flow keyword color (used for keywords like ``var .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/line_length_guideline_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/line_length_guideline_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/line_length_guideline_color>` The script editor's color for the line length guideline. The "hard" line length guideline will be drawn with this color, whereas the "soft" line length guideline will be drawn with half of its opacity. @@ -3595,7 +4691,7 @@ The script editor's color for the line length guideline. The "hard" line length .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/line_number_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/line_number_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/line_number_color>` The script editor's color for line numbers. See also :ref:`text_editor/theme/highlighting/safe_line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color>`. @@ -3607,7 +4703,7 @@ The script editor's color for line numbers. See also :ref:`text_editor/theme/hig .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/mark_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/mark_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/mark_color>` The script editor's background color for lines with errors. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/current_line_color<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>`. @@ -3619,7 +4715,7 @@ The script editor's background color for lines with errors. This should be set t .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/member_variable_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/member_variable_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/member_variable_color>` The script editor's color for member variables on objects (e.g. ``self.some_property``). @@ -3633,7 +4729,7 @@ The script editor's color for member variables on objects (e.g. ``self.some_prop .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/number_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/number_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/number_color>` The script editor's color for numbers (integer and floating-point). @@ -3645,7 +4741,7 @@ The script editor's color for numbers (integer and floating-point). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/safe_line_number_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/safe_line_number_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/safe_line_number_color>` The script editor's color for type-safe line numbers. See also :ref:`text_editor/theme/highlighting/line_number_color<class_EditorSettings_property_text_editor/theme/highlighting/line_number_color>`. @@ -3659,7 +4755,7 @@ The script editor's color for type-safe line numbers. See also :ref:`text_editor .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/search_result_border_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/search_result_border_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/search_result_border_color>` The script editor's color for the border of search results. This border helps bring further attention to the search result. Set this color's opacity to 0 to disable the border. @@ -3671,7 +4767,7 @@ The script editor's color for the border of search results. This border helps br .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/search_result_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/search_result_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/search_result_color>` The script editor's background color for search results. @@ -3683,7 +4779,7 @@ The script editor's background color for search results. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/selection_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/selection_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/selection_color>` The script editor's background color for the currently selected text. @@ -3695,7 +4791,7 @@ The script editor's background color for the currently selected text. .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/string_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/string_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/string_color>` The script editor's color for strings (single-line and multi-line). @@ -3707,7 +4803,7 @@ The script editor's color for strings (single-line and multi-line). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/symbol_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/symbol_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/symbol_color>` The script editor's color for operators (``( ) [ ] { } + - * /``, ...). @@ -3719,7 +4815,7 @@ The script editor's color for operators (``( ) [ ] { } + - * /``, ...). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/text_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/text_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/text_color>` The script editor's color for text not highlighted by any syntax highlighting rule. @@ -3731,7 +4827,7 @@ The script editor's color for text not highlighted by any syntax highlighting ru .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/text_selected_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/text_selected_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/text_selected_color>` The script editor's background color for text. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/current_line_color<class_EditorSettings_property_text_editor/theme/highlighting/current_line_color>`. @@ -3743,7 +4839,7 @@ The script editor's background color for text. This should be set to a transluce .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/user_type_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/user_type_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/user_type_color>` The script editor's color for user-defined types (using ``class_name``). @@ -3755,7 +4851,7 @@ The script editor's color for user-defined types (using ``class_name``). .. rst-class:: classref-property -:ref:`Color<class_Color>` **text_editor/theme/highlighting/word_highlighted_color** +:ref:`Color<class_Color>` **text_editor/theme/highlighting/word_highlighted_color** :ref:`🔗<class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color>` The script editor's color for words highlighted by selecting them. Only visible if :ref:`text_editor/appearance/caret/highlight_all_occurrences<class_EditorSettings_property_text_editor/appearance/caret/highlight_all_occurrences>` is ``true``. @@ -3772,7 +4868,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_property_info** **(** :ref:`Dictionary<class_Dictionary>` info **)** +|void| **add_property_info**\ (\ info\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_EditorSettings_method_add_property_info>` Adds a custom property info to a property. The dictionary must contain: @@ -3826,7 +4922,7 @@ Adds a custom property info to a property. The dictionary must contain: .. rst-class:: classref-method -:ref:`bool<class_bool>` **check_changed_settings_in_group** **(** :ref:`String<class_String>` setting_prefix **)** |const| +:ref:`bool<class_bool>` **check_changed_settings_in_group**\ (\ setting_prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorSettings_method_check_changed_settings_in_group>` Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings<class_EditorSettings_method_get_changed_settings>`. @@ -3838,7 +4934,7 @@ Checks if any settings with the prefix ``setting_prefix`` exist in the set of ch .. rst-class:: classref-method -void **erase** **(** :ref:`String<class_String>` property **)** +|void| **erase**\ (\ property\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorSettings_method_erase>` Erases the setting whose name is specified by ``property``. @@ -3850,7 +4946,7 @@ Erases the setting whose name is specified by ``property``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_changed_settings** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_changed_settings**\ (\ ) |const| :ref:`🔗<class_EditorSettings_method_get_changed_settings>` Gets an array of the settings which have been changed since the last save. Note that internally ``changed_settings`` is cleared after a successful save, so generally the most appropriate place to use this method is when processing :ref:`NOTIFICATION_EDITOR_SETTINGS_CHANGED<class_EditorSettings_constant_NOTIFICATION_EDITOR_SETTINGS_CHANGED>`. @@ -3862,7 +4958,7 @@ Gets an array of the settings which have been changed since the last save. Note .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_favorites** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_favorites**\ (\ ) |const| :ref:`🔗<class_EditorSettings_method_get_favorites>` Returns the list of favorite files and directories for this project. @@ -3874,7 +4970,7 @@ Returns the list of favorite files and directories for this project. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_project_metadata** **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` default=null **)** |const| +:ref:`Variant<class_Variant>` **get_project_metadata**\ (\ section\: :ref:`String<class_String>`, key\: :ref:`String<class_String>`, default\: :ref:`Variant<class_Variant>` = null\ ) |const| :ref:`🔗<class_EditorSettings_method_get_project_metadata>` Returns project-specific metadata for the ``section`` and ``key`` specified. If the metadata doesn't exist, ``default`` will be returned instead. See also :ref:`set_project_metadata<class_EditorSettings_method_set_project_metadata>`. @@ -3886,7 +4982,7 @@ Returns project-specific metadata for the ``section`` and ``key`` specified. If .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_recent_dirs** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_recent_dirs**\ (\ ) |const| :ref:`🔗<class_EditorSettings_method_get_recent_dirs>` Returns the list of recently visited folders in the file dialog for this project. @@ -3898,7 +4994,7 @@ Returns the list of recently visited folders in the file dialog for this project .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_setting** **(** :ref:`String<class_String>` name **)** |const| +:ref:`Variant<class_Variant>` **get_setting**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorSettings_method_get_setting>` Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get<class_Object_method_get>` on the EditorSettings instance. @@ -3910,7 +5006,7 @@ Returns the value of the setting specified by ``name``. This is equivalent to us .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_setting** **(** :ref:`String<class_String>` name **)** |const| +:ref:`bool<class_bool>` **has_setting**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorSettings_method_has_setting>` Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwise. @@ -3922,7 +5018,7 @@ Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwis .. rst-class:: classref-method -void **mark_setting_changed** **(** :ref:`String<class_String>` setting **)** +|void| **mark_setting_changed**\ (\ setting\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorSettings_method_mark_setting_changed>` Marks the passed editor setting as being changed, see :ref:`get_changed_settings<class_EditorSettings_method_get_changed_settings>`. Only settings which exist (see :ref:`has_setting<class_EditorSettings_method_has_setting>`) will be accepted. @@ -3934,7 +5030,7 @@ Marks the passed editor setting as being changed, see :ref:`get_changed_settings .. rst-class:: classref-method -void **set_builtin_action_override** **(** :ref:`String<class_String>` name, :ref:`InputEvent[]<class_InputEvent>` actions_list **)** +|void| **set_builtin_action_override**\ (\ name\: :ref:`String<class_String>`, actions_list\: :ref:`Array<class_Array>`\[:ref:`InputEvent<class_InputEvent>`\]\ ) :ref:`🔗<class_EditorSettings_method_set_builtin_action_override>` Overrides the built-in editor action ``name`` with the input actions defined in ``actions_list``. @@ -3946,7 +5042,7 @@ Overrides the built-in editor action ``name`` with the input actions defined in .. rst-class:: classref-method -void **set_favorites** **(** :ref:`PackedStringArray<class_PackedStringArray>` dirs **)** +|void| **set_favorites**\ (\ dirs\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorSettings_method_set_favorites>` Sets the list of favorite files and directories for this project. @@ -3958,7 +5054,7 @@ Sets the list of favorite files and directories for this project. .. rst-class:: classref-method -void **set_initial_value** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` update_current **)** +|void| **set_initial_value**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`, update_current\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorSettings_method_set_initial_value>` Sets the initial value of the setting specified by ``name`` to ``value``. This is used to provide a value for the Revert button in the Editor Settings. If ``update_current`` is true, the current value of the setting will be set to ``value`` as well. @@ -3970,7 +5066,7 @@ Sets the initial value of the setting specified by ``name`` to ``value``. This i .. rst-class:: classref-method -void **set_project_metadata** **(** :ref:`String<class_String>` section, :ref:`String<class_String>` key, :ref:`Variant<class_Variant>` data **)** +|void| **set_project_metadata**\ (\ section\: :ref:`String<class_String>`, key\: :ref:`String<class_String>`, data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorSettings_method_set_project_metadata>` Sets project-specific metadata with the ``section``, ``key`` and ``data`` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also :ref:`get_project_metadata<class_EditorSettings_method_get_project_metadata>`. @@ -3982,7 +5078,7 @@ Sets project-specific metadata with the ``section``, ``key`` and ``data`` specif .. rst-class:: classref-method -void **set_recent_dirs** **(** :ref:`PackedStringArray<class_PackedStringArray>` dirs **)** +|void| **set_recent_dirs**\ (\ dirs\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_EditorSettings_method_set_recent_dirs>` Sets the list of recently visited folders in the file dialog for this project. @@ -3994,7 +5090,7 @@ Sets the list of recently visited folders in the file dialog for this project. .. rst-class:: classref-method -void **set_setting** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** +|void| **set_setting**\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorSettings_method_set_setting>` Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set<class_Object_method_set>` on the EditorSettings instance. @@ -4005,3 +5101,4 @@ Sets the ``value`` of the setting specified by ``name``. This is equivalent to u .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 267c1ade6dc..1906c45136a 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -21,6 +21,8 @@ Description This :ref:`Control<class_Control>` node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` to recreate the same behavior. +If the :ref:`Range.step<class_Range_property_step>` value is ``1``, the **EditorSpinSlider** will display up/down arrows, similar to :ref:`SpinBox<class_SpinBox>`. If the :ref:`Range.step<class_Range_property_step>` value is not ``1``, a slider will be displayed instead. + .. rst-class:: classref-reftable-group Properties @@ -40,7 +42,7 @@ Properties +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`read_only<class_EditorSpinSlider_property_read_only>` | ``false`` | +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`float<class_float>` | step | ``1.0`` (overrides :ref:`Range<class_Range_property_step>`) | +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -60,7 +62,7 @@ Signals .. rst-class:: classref-signal -**grabbed** **(** **)** +**grabbed**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_grabbed>` Emitted when the spinner/slider is grabbed. @@ -72,7 +74,7 @@ Emitted when the spinner/slider is grabbed. .. rst-class:: classref-signal -**ungrabbed** **(** **)** +**ungrabbed**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_ungrabbed>` Emitted when the spinner/slider is ungrabbed. @@ -84,7 +86,7 @@ Emitted when the spinner/slider is ungrabbed. .. rst-class:: classref-signal -**value_focus_entered** **(** **)** +**value_focus_entered**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_value_focus_entered>` Emitted when the value form gains focus. @@ -96,7 +98,7 @@ Emitted when the value form gains focus. .. rst-class:: classref-signal -**value_focus_exited** **(** **)** +**value_focus_exited**\ (\ ) :ref:`🔗<class_EditorSpinSlider_signal_value_focus_exited>` Emitted when the value form loses focus. @@ -113,12 +115,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **flat** = ``false`` +:ref:`bool<class_bool>` **flat** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_flat>` .. rst-class:: classref-property-setget -- void **set_flat** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flat** **(** **)** +- |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flat**\ (\ ) If ``true``, the slider will not draw background. @@ -130,14 +132,14 @@ If ``true``, the slider will not draw background. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_slider** = ``false`` +:ref:`bool<class_bool>` **hide_slider** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_hide_slider>` .. rst-class:: classref-property-setget -- void **set_hide_slider** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hiding_slider** **(** **)** +- |void| **set_hide_slider**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hiding_slider**\ (\ ) -If ``true``, the slider is hidden. +If ``true``, the slider and up/down arrows are hidden. .. rst-class:: classref-item-separator @@ -147,12 +149,12 @@ If ``true``, the slider is hidden. .. rst-class:: classref-property -:ref:`String<class_String>` **label** = ``""`` +:ref:`String<class_String>` **label** = ``""`` :ref:`🔗<class_EditorSpinSlider_property_label>` .. rst-class:: classref-property-setget -- void **set_label** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_label** **(** **)** +- |void| **set_label**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_label**\ (\ ) The text that displays to the left of the value. @@ -164,12 +166,12 @@ The text that displays to the left of the value. .. rst-class:: classref-property -:ref:`bool<class_bool>` **read_only** = ``false`` +:ref:`bool<class_bool>` **read_only** = ``false`` :ref:`🔗<class_EditorSpinSlider_property_read_only>` .. rst-class:: classref-property-setget -- void **set_read_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_read_only** **(** **)** +- |void| **set_read_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_read_only**\ (\ ) If ``true``, the slider can't be interacted with. @@ -181,12 +183,12 @@ If ``true``, the slider can't be interacted with. .. rst-class:: classref-property -:ref:`String<class_String>` **suffix** = ``""`` +:ref:`String<class_String>` **suffix** = ``""`` :ref:`🔗<class_EditorSpinSlider_property_suffix>` .. rst-class:: classref-property-setget -- void **set_suffix** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_suffix** **(** **)** +- |void| **set_suffix**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_suffix**\ (\ ) The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. @@ -197,3 +199,4 @@ The suffix to display after the value (in a faded color). This should generally .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index aad1fbef841..27f6bc9de21 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -21,7 +21,7 @@ Description Base class that all :ref:`SyntaxHighlighter<class_SyntaxHighlighter>`\ s used by the :ref:`ScriptEditor<class_ScriptEditor>` extend from. -Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter<class_ScriptEditorBase_method_add_syntax_highlighter>`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter<class_ScriptEditor_method_register_syntax_highlighter>` +Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter<class_ScriptEditorBase_method_add_syntax_highlighter>`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter<class_ScriptEditor_method_register_syntax_highlighter>`. .. rst-class:: classref-reftable-group @@ -31,11 +31,11 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_name<class_EditorSyntaxHighlighter_method__get_name>` **(** **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_supported_languages<class_EditorSyntaxHighlighter_method__get_supported_languages>` **(** **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_name<class_EditorSyntaxHighlighter_private_method__get_name>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_supported_languages<class_EditorSyntaxHighlighter_private_method__get_supported_languages>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,11 +46,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorSyntaxHighlighter_method__get_name: +.. _class_EditorSyntaxHighlighter_private_method__get_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorSyntaxHighlighter_private_method__get_name>` Virtual method which can be overridden to return the syntax highlighter name. @@ -58,11 +58,11 @@ Virtual method which can be overridden to return the syntax highlighter name. ---- -.. _class_EditorSyntaxHighlighter_method__get_supported_languages: +.. _class_EditorSyntaxHighlighter_private_method__get_supported_languages: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_supported_languages** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_supported_languages**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorSyntaxHighlighter_private_method__get_supported_languages>` Virtual method which can be overridden to return the supported language names. @@ -73,3 +73,4 @@ Virtual method which can be overridden to return the supported language names. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index 0d6ee3ec769..fedd304399e 100644 --- a/classes/class_editortranslationparserplugin.rst +++ b/classes/class_editortranslationparserplugin.rst @@ -19,7 +19,7 @@ Plugin for adding custom parsers to extract strings that are to be translated fr Description ----------- -**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file<class_EditorTranslationParserPlugin_method__parse_file>` method in script. +**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file<class_EditorTranslationParserPlugin_private_method__parse_file>` method in script. Add the extracted strings to argument ``msgids`` or ``msgids_context_plural`` if context or plural is used. @@ -143,11 +143,11 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_EditorTranslationParserPlugin_method__get_recognized_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_file<class_EditorTranslationParserPlugin_method__parse_file>` **(** :ref:`String<class_String>` path, :ref:`String[]<class_String>` msgids, :ref:`Array[]<class_Array>` msgids_context_plural **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_EditorTranslationParserPlugin_private_method__get_recognized_extensions>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_parse_file<class_EditorTranslationParserPlugin_private_method__parse_file>`\ (\ path\: :ref:`String<class_String>`, msgids\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], msgids_context_plural\: :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\]\ ) |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -158,11 +158,11 @@ Methods Method Descriptions ------------------- -.. _class_EditorTranslationParserPlugin_method__get_recognized_extensions: +.. _class_EditorTranslationParserPlugin_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorTranslationParserPlugin_private_method__get_recognized_extensions>` Gets the list of file extensions to associate with this parser, e.g. ``["csv"]``. @@ -170,11 +170,11 @@ Gets the list of file extensions to associate with this parser, e.g. ``["csv"]`` ---- -.. _class_EditorTranslationParserPlugin_method__parse_file: +.. _class_EditorTranslationParserPlugin_private_method__parse_file: .. rst-class:: classref-method -void **_parse_file** **(** :ref:`String<class_String>` path, :ref:`String[]<class_String>` msgids, :ref:`Array[]<class_Array>` msgids_context_plural **)** |virtual| +|void| **_parse_file**\ (\ path\: :ref:`String<class_String>`, msgids\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], msgids_context_plural\: :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\]\ ) |virtual| :ref:`🔗<class_EditorTranslationParserPlugin_private_method__parse_file>` Override this method to define a custom parsing logic to extract the translatable strings. @@ -185,3 +185,4 @@ Override this method to define a custom parsing logic to extract the translatabl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorundoredomanager.rst b/classes/class_editorundoredomanager.rst index 9b57fe36c6a..19b1042bf1e 100644 --- a/classes/class_editorundoredomanager.rst +++ b/classes/class_editorundoredomanager.rst @@ -43,29 +43,31 @@ Methods .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_method<class_EditorUndoRedoManager_method_add_do_method>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_property<class_EditorUndoRedoManager_method_add_do_property>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_reference<class_EditorUndoRedoManager_method_add_do_reference>` **(** :ref:`Object<class_Object>` object **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_method<class_EditorUndoRedoManager_method_add_undo_method>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_property<class_EditorUndoRedoManager_method_add_undo_property>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_reference<class_EditorUndoRedoManager_method_add_undo_reference>` **(** :ref:`Object<class_Object>` object **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`commit_action<class_EditorUndoRedoManager_method_commit_action>` **(** :ref:`bool<class_bool>` execute=true **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_action<class_EditorUndoRedoManager_method_create_action>` **(** :ref:`String<class_String>` name, :ref:`MergeMode<enum_UndoRedo_MergeMode>` merge_mode=0, :ref:`Object<class_Object>` custom_context=null, :ref:`bool<class_bool>` backward_undo_ops=false **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UndoRedo<class_UndoRedo>` | :ref:`get_history_undo_redo<class_EditorUndoRedoManager_method_get_history_undo_redo>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_object_history_id<class_EditorUndoRedoManager_method_get_object_history_id>` **(** :ref:`Object<class_Object>` object **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_committing_action<class_EditorUndoRedoManager_method_is_committing_action>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_method<class_EditorUndoRedoManager_method_add_do_method>`\ (\ object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_property<class_EditorUndoRedoManager_method_add_do_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_reference<class_EditorUndoRedoManager_method_add_do_reference>`\ (\ object\: :ref:`Object<class_Object>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_method<class_EditorUndoRedoManager_method_add_undo_method>`\ (\ object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_property<class_EditorUndoRedoManager_method_add_undo_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_reference<class_EditorUndoRedoManager_method_add_undo_reference>`\ (\ object\: :ref:`Object<class_Object>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`commit_action<class_EditorUndoRedoManager_method_commit_action>`\ (\ execute\: :ref:`bool<class_bool>` = true\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_action<class_EditorUndoRedoManager_method_create_action>`\ (\ name\: :ref:`String<class_String>`, merge_mode\: :ref:`MergeMode<enum_UndoRedo_MergeMode>` = 0, custom_context\: :ref:`Object<class_Object>` = null, backward_undo_ops\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_fixed_history<class_EditorUndoRedoManager_method_force_fixed_history>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UndoRedo<class_UndoRedo>` | :ref:`get_history_undo_redo<class_EditorUndoRedoManager_method_get_history_undo_redo>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_object_history_id<class_EditorUndoRedoManager_method_get_object_history_id>`\ (\ object\: :ref:`Object<class_Object>`\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_committing_action<class_EditorUndoRedoManager_method_is_committing_action>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,7 +82,7 @@ Signals .. rst-class:: classref-signal -**history_changed** **(** **)** +**history_changed**\ (\ ) :ref:`🔗<class_EditorUndoRedoManager_signal_history_changed>` Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared. @@ -92,7 +94,7 @@ Emitted when the list of actions in any history has changed, either when an acti .. rst-class:: classref-signal -**version_changed** **(** **)** +**version_changed**\ (\ ) :ref:`🔗<class_EditorUndoRedoManager_signal_version_changed>` Emitted when the version of any history has changed as a result of undo or redo call. @@ -109,7 +111,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SpecialHistory**: +enum **SpecialHistory**: :ref:`🔗<enum_EditorUndoRedoManager_SpecialHistory>` .. _class_EditorUndoRedoManager_constant_GLOBAL_HISTORY: @@ -148,7 +150,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_do_method** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, ... **)** |vararg| +|void| **add_do_method**\ (\ object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_EditorUndoRedoManager_method_add_do_method>` Register a method that will be called when the action is committed (i.e. the "do" action). @@ -162,7 +164,7 @@ If this is the first operation, the ``object`` will be used to deduce target und .. rst-class:: classref-method -void **add_do_property** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **add_do_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorUndoRedoManager_method_add_do_property>` Register a property value change for "do". @@ -176,7 +178,7 @@ If this is the first operation, the ``object`` will be used to deduce target und .. rst-class:: classref-method -void **add_do_reference** **(** :ref:`Object<class_Object>` object **)** +|void| **add_do_reference**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_EditorUndoRedoManager_method_add_do_reference>` Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. @@ -188,7 +190,7 @@ Register a reference for "do" that will be erased if the "do" history is lost. T .. rst-class:: classref-method -void **add_undo_method** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, ... **)** |vararg| +|void| **add_undo_method**\ (\ object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_EditorUndoRedoManager_method_add_undo_method>` Register a method that will be called when the action is undone (i.e. the "undo" action). @@ -202,7 +204,7 @@ If this is the first operation, the ``object`` will be used to deduce target und .. rst-class:: classref-method -void **add_undo_property** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **add_undo_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_EditorUndoRedoManager_method_add_undo_property>` Register a property value change for "undo". @@ -216,7 +218,7 @@ If this is the first operation, the ``object`` will be used to deduce target und .. rst-class:: classref-method -void **add_undo_reference** **(** :ref:`Object<class_Object>` object **)** +|void| **add_undo_reference**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_EditorUndoRedoManager_method_add_undo_reference>` Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). @@ -228,7 +230,7 @@ Register a reference for "undo" that will be erased if the "undo" history is los .. rst-class:: classref-method -void **commit_action** **(** :ref:`bool<class_bool>` execute=true **)** +|void| **commit_action**\ (\ execute\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorUndoRedoManager_method_commit_action>` Commit the action. If ``execute`` is true (default), all "do" methods/properties are called/set when this function is called. @@ -240,7 +242,7 @@ Commit the action. If ``execute`` is true (default), all "do" methods/properties .. rst-class:: classref-method -void **create_action** **(** :ref:`String<class_String>` name, :ref:`MergeMode<enum_UndoRedo_MergeMode>` merge_mode=0, :ref:`Object<class_Object>` custom_context=null, :ref:`bool<class_bool>` backward_undo_ops=false **)** +|void| **create_action**\ (\ name\: :ref:`String<class_String>`, merge_mode\: :ref:`MergeMode<enum_UndoRedo_MergeMode>` = 0, custom_context\: :ref:`Object<class_Object>` = null, backward_undo_ops\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorUndoRedoManager_method_create_action>` Create a new action. After this is called, do all your calls to :ref:`add_do_method<class_EditorUndoRedoManager_method_add_do_method>`, :ref:`add_undo_method<class_EditorUndoRedoManager_method_add_undo_method>`, :ref:`add_do_property<class_EditorUndoRedoManager_method_add_do_property>`, and :ref:`add_undo_property<class_EditorUndoRedoManager_method_add_undo_property>`, then commit the action with :ref:`commit_action<class_EditorUndoRedoManager_method_commit_action>`. @@ -254,11 +256,25 @@ The way undo operation are ordered in actions is dictated by ``backward_undo_ops ---- +.. _class_EditorUndoRedoManager_method_force_fixed_history: + +.. rst-class:: classref-method + +|void| **force_fixed_history**\ (\ ) :ref:`🔗<class_EditorUndoRedoManager_method_force_fixed_history>` + +Forces the next operation (e.g. :ref:`add_do_method<class_EditorUndoRedoManager_method_add_do_method>`) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. + +This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the ``custom_context`` parameter of :ref:`create_action<class_EditorUndoRedoManager_method_create_action>` is sufficient. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorUndoRedoManager_method_get_history_undo_redo: .. rst-class:: classref-method -:ref:`UndoRedo<class_UndoRedo>` **get_history_undo_redo** **(** :ref:`int<class_int>` id **)** |const| +:ref:`UndoRedo<class_UndoRedo>` **get_history_undo_redo**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_EditorUndoRedoManager_method_get_history_undo_redo>` Returns the :ref:`UndoRedo<class_UndoRedo>` object associated with the given history ``id``. @@ -274,7 +290,7 @@ Best used with :ref:`get_object_history_id<class_EditorUndoRedoManager_method_ge .. rst-class:: classref-method -:ref:`int<class_int>` **get_object_history_id** **(** :ref:`Object<class_Object>` object **)** |const| +:ref:`int<class_int>` **get_object_history_id**\ (\ object\: :ref:`Object<class_Object>`\ ) |const| :ref:`🔗<class_EditorUndoRedoManager_method_get_object_history_id>` Returns the history ID deduced from the given ``object``. It can be used with :ref:`get_history_undo_redo<class_EditorUndoRedoManager_method_get_history_undo_redo>`. @@ -286,7 +302,7 @@ Returns the history ID deduced from the given ``object``. It can be used with :r .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_committing_action** **(** **)** |const| +:ref:`bool<class_bool>` **is_committing_action**\ (\ ) |const| :ref:`🔗<class_EditorUndoRedoManager_method_is_committing_action>` Returns ``true`` if the **EditorUndoRedoManager** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action<class_EditorUndoRedoManager_method_commit_action>`). @@ -297,3 +313,4 @@ Returns ``true`` if the **EditorUndoRedoManager** is currently committing the ac .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorvcsinterface.rst b/classes/class_editorvcsinterface.rst index 39a5dd884a4..d8899886f1d 100644 --- a/classes/class_editorvcsinterface.rst +++ b/classes/class_editorvcsinterface.rst @@ -21,6 +21,13 @@ Description Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit **EditorVCSInterface** and are attached (on demand) to the singleton instance of **EditorVCSInterface**. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from **EditorVCSInterface** and override each of these virtual functions. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Version control systems <../tutorials/best_practices/version_control_systems>` + .. rst-class:: classref-reftable-group Methods @@ -29,69 +36,69 @@ Methods .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_checkout_branch<class_EditorVCSInterface_method__checkout_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit<class_EditorVCSInterface_method__commit>` **(** :ref:`String<class_String>` msg **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_create_branch<class_EditorVCSInterface_method__create_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_create_remote<class_EditorVCSInterface_method__create_remote>` **(** :ref:`String<class_String>` remote_name, :ref:`String<class_String>` remote_url **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_discard_file<class_EditorVCSInterface_method__discard_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_fetch<class_EditorVCSInterface_method__fetch>` **(** :ref:`String<class_String>` remote **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]<class_String>` | :ref:`_get_branch_list<class_EditorVCSInterface_method__get_branch_list>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_current_branch_name<class_EditorVCSInterface_method__get_current_branch_name>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_diff<class_EditorVCSInterface_method__get_diff>` **(** :ref:`String<class_String>` identifier, :ref:`int<class_int>` area **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_line_diff<class_EditorVCSInterface_method__get_line_diff>` **(** :ref:`String<class_String>` file_path, :ref:`String<class_String>` text **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_modified_files_data<class_EditorVCSInterface_method__get_modified_files_data>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_previous_commits<class_EditorVCSInterface_method__get_previous_commits>` **(** :ref:`int<class_int>` max_commits **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]<class_String>` | :ref:`_get_remotes<class_EditorVCSInterface_method__get_remotes>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_vcs_name<class_EditorVCSInterface_method__get_vcs_name>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_initialize<class_EditorVCSInterface_method__initialize>` **(** :ref:`String<class_String>` project_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pull<class_EditorVCSInterface_method__pull>` **(** :ref:`String<class_String>` remote **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_push<class_EditorVCSInterface_method__push>` **(** :ref:`String<class_String>` remote, :ref:`bool<class_bool>` force **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_branch<class_EditorVCSInterface_method__remove_branch>` **(** :ref:`String<class_String>` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_remote<class_EditorVCSInterface_method__remove_remote>` **(** :ref:`String<class_String>` remote_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_credentials<class_EditorVCSInterface_method__set_credentials>` **(** :ref:`String<class_String>` username, :ref:`String<class_String>` password, :ref:`String<class_String>` ssh_public_key_path, :ref:`String<class_String>` ssh_private_key_path, :ref:`String<class_String>` ssh_passphrase **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shut_down<class_EditorVCSInterface_method__shut_down>` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stage_file<class_EditorVCSInterface_method__stage_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unstage_file<class_EditorVCSInterface_method__unstage_file>` **(** :ref:`String<class_String>` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>` **(** :ref:`Dictionary<class_Dictionary>` diff_file, :ref:`Dictionary[]<class_Dictionary>` diff_hunks **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` **(** :ref:`Dictionary<class_Dictionary>` diff_hunk, :ref:`Dictionary[]<class_Dictionary>` line_diffs **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`create_commit<class_EditorVCSInterface_method_create_commit>` **(** :ref:`String<class_String>` msg, :ref:`String<class_String>` author, :ref:`String<class_String>` id, :ref:`int<class_int>` unix_timestamp, :ref:`int<class_int>` offset_minutes **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>` **(** :ref:`String<class_String>` new_file, :ref:`String<class_String>` old_file **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>` **(** :ref:`int<class_int>` old_start, :ref:`int<class_int>` new_start, :ref:`int<class_int>` old_lines, :ref:`int<class_int>` new_lines **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>` **(** :ref:`int<class_int>` new_line_no, :ref:`int<class_int>` old_line_no, :ref:`String<class_String>` content, :ref:`String<class_String>` status **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>` **(** :ref:`String<class_String>` file_path, :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` change_type, :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` area **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_error<class_EditorVCSInterface_method_popup_error>` **(** :ref:`String<class_String>` msg **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_checkout_branch<class_EditorVCSInterface_private_method__checkout_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_commit<class_EditorVCSInterface_private_method__commit>`\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_create_branch<class_EditorVCSInterface_private_method__create_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_create_remote<class_EditorVCSInterface_private_method__create_remote>`\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_discard_file<class_EditorVCSInterface_private_method__discard_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_fetch<class_EditorVCSInterface_private_method__fetch>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_branch_list<class_EditorVCSInterface_private_method__get_branch_list>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_current_branch_name<class_EditorVCSInterface_private_method__get_current_branch_name>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_diff<class_EditorVCSInterface_private_method__get_diff>`\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_line_diff<class_EditorVCSInterface_private_method__get_line_diff>`\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_modified_files_data<class_EditorVCSInterface_private_method__get_modified_files_data>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_previous_commits<class_EditorVCSInterface_private_method__get_previous_commits>`\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`_get_remotes<class_EditorVCSInterface_private_method__get_remotes>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_vcs_name<class_EditorVCSInterface_private_method__get_vcs_name>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_initialize<class_EditorVCSInterface_private_method__initialize>`\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pull<class_EditorVCSInterface_private_method__pull>`\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_push<class_EditorVCSInterface_private_method__push>`\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_remove_branch<class_EditorVCSInterface_private_method__remove_branch>`\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_remove_remote<class_EditorVCSInterface_private_method__remove_remote>`\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_credentials<class_EditorVCSInterface_private_method__set_credentials>`\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shut_down<class_EditorVCSInterface_private_method__shut_down>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_stage_file<class_EditorVCSInterface_private_method__stage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_unstage_file<class_EditorVCSInterface_private_method__unstage_file>`\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>`\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`create_commit<class_EditorVCSInterface_method_create_commit>`\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>`\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>`\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>`\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_error<class_EditorVCSInterface_method_popup_error>`\ (\ msg\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -106,7 +113,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ChangeType**: +enum **ChangeType**: :ref:`🔗<enum_EditorVCSInterface_ChangeType>` .. _class_EditorVCSInterface_constant_CHANGE_TYPE_NEW: @@ -164,7 +171,7 @@ A file is left unmerged. .. rst-class:: classref-enumeration -enum **TreeArea**: +enum **TreeArea**: :ref:`🔗<enum_EditorVCSInterface_TreeArea>` .. _class_EditorVCSInterface_constant_TREE_AREA_COMMIT: @@ -199,11 +206,11 @@ A file is encountered from the unstaged area. Method Descriptions ------------------- -.. _class_EditorVCSInterface_method__checkout_branch: +.. _class_EditorVCSInterface_private_method__checkout_branch: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_checkout_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual| +:ref:`bool<class_bool>` **_checkout_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__checkout_branch>` Checks out a ``branch_name`` in the VCS. @@ -211,11 +218,11 @@ Checks out a ``branch_name`` in the VCS. ---- -.. _class_EditorVCSInterface_method__commit: +.. _class_EditorVCSInterface_private_method__commit: .. rst-class:: classref-method -void **_commit** **(** :ref:`String<class_String>` msg **)** |virtual| +|void| **_commit**\ (\ msg\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__commit>` Commits the currently staged changes and applies the commit ``msg`` to the resulting commit. @@ -223,11 +230,11 @@ Commits the currently staged changes and applies the commit ``msg`` to the resul ---- -.. _class_EditorVCSInterface_method__create_branch: +.. _class_EditorVCSInterface_private_method__create_branch: .. rst-class:: classref-method -void **_create_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual| +|void| **_create_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__create_branch>` Creates a new branch named ``branch_name`` in the VCS. @@ -235,11 +242,11 @@ Creates a new branch named ``branch_name`` in the VCS. ---- -.. _class_EditorVCSInterface_method__create_remote: +.. _class_EditorVCSInterface_private_method__create_remote: .. rst-class:: classref-method -void **_create_remote** **(** :ref:`String<class_String>` remote_name, :ref:`String<class_String>` remote_url **)** |virtual| +|void| **_create_remote**\ (\ remote_name\: :ref:`String<class_String>`, remote_url\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__create_remote>` Creates a new remote destination with name ``remote_name`` and points it to ``remote_url``. This can be an HTTPS remote or an SSH remote. @@ -247,11 +254,11 @@ Creates a new remote destination with name ``remote_name`` and points it to ``re ---- -.. _class_EditorVCSInterface_method__discard_file: +.. _class_EditorVCSInterface_private_method__discard_file: .. rst-class:: classref-method -void **_discard_file** **(** :ref:`String<class_String>` file_path **)** |virtual| +|void| **_discard_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__discard_file>` Discards the changes made in a file present at ``file_path``. @@ -259,11 +266,11 @@ Discards the changes made in a file present at ``file_path``. ---- -.. _class_EditorVCSInterface_method__fetch: +.. _class_EditorVCSInterface_private_method__fetch: .. rst-class:: classref-method -void **_fetch** **(** :ref:`String<class_String>` remote **)** |virtual| +|void| **_fetch**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__fetch>` Fetches new changes from the ``remote``, but doesn't write changes to the current working directory. Equivalent to ``git fetch``. @@ -271,11 +278,11 @@ Fetches new changes from the ``remote``, but doesn't write changes to the curren ---- -.. _class_EditorVCSInterface_method__get_branch_list: +.. _class_EditorVCSInterface_private_method__get_branch_list: .. rst-class:: classref-method -:ref:`String[]<class_String>` **_get_branch_list** **(** **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_branch_list**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_branch_list>` Gets an instance of an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s containing available branch names in the VCS. @@ -283,11 +290,11 @@ Gets an instance of an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ ---- -.. _class_EditorVCSInterface_method__get_current_branch_name: +.. _class_EditorVCSInterface_private_method__get_current_branch_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_current_branch_name** **(** **)** |virtual| +:ref:`String<class_String>` **_get_current_branch_name**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_current_branch_name>` Gets the current branch name defined in the VCS. @@ -295,11 +302,11 @@ Gets the current branch name defined in the VCS. ---- -.. _class_EditorVCSInterface_method__get_diff: +.. _class_EditorVCSInterface_private_method__get_diff: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_diff** **(** :ref:`String<class_String>` identifier, :ref:`int<class_int>` area **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_diff**\ (\ identifier\: :ref:`String<class_String>`, area\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_diff>` Returns an array of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_diff_file<class_EditorVCSInterface_method_create_diff_file>`, :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`, :ref:`create_diff_line<class_EditorVCSInterface_method_create_diff_line>`, :ref:`add_line_diffs_into_diff_hunk<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` and :ref:`add_diff_hunks_into_diff_file<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>`), each containing information about a diff. If ``identifier`` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. @@ -307,11 +314,11 @@ Returns an array of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_ ---- -.. _class_EditorVCSInterface_method__get_line_diff: +.. _class_EditorVCSInterface_private_method__get_line_diff: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_line_diff** **(** :ref:`String<class_String>` file_path, :ref:`String<class_String>` text **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_line_diff**\ (\ file_path\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_line_diff>` Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_diff_hunk<class_EditorVCSInterface_method_create_diff_hunk>`), each containing a line diff between a file at ``file_path`` and the ``text`` which is passed in. @@ -319,11 +326,11 @@ Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` item ---- -.. _class_EditorVCSInterface_method__get_modified_files_data: +.. _class_EditorVCSInterface_private_method__get_modified_files_data: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_modified_files_data** **(** **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_modified_files_data**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_modified_files_data>` Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_status_file<class_EditorVCSInterface_method_create_status_file>`), each containing the status data of every modified file in the project folder. @@ -331,11 +338,11 @@ Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` item ---- -.. _class_EditorVCSInterface_method__get_previous_commits: +.. _class_EditorVCSInterface_private_method__get_previous_commits: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_previous_commits** **(** :ref:`int<class_int>` max_commits **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_previous_commits**\ (\ max_commits\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_previous_commits>` Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` items (see :ref:`create_commit<class_EditorVCSInterface_method_create_commit>`), each containing the data for a past commit. @@ -343,11 +350,11 @@ Returns an :ref:`Array<class_Array>` of :ref:`Dictionary<class_Dictionary>` item ---- -.. _class_EditorVCSInterface_method__get_remotes: +.. _class_EditorVCSInterface_private_method__get_remotes: .. rst-class:: classref-method -:ref:`String[]<class_String>` **_get_remotes** **(** **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **_get_remotes**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_remotes>` Returns an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s, each containing the name of a remote configured in the VCS. @@ -355,11 +362,11 @@ Returns an :ref:`Array<class_Array>` of :ref:`String<class_String>`\ s, each con ---- -.. _class_EditorVCSInterface_method__get_vcs_name: +.. _class_EditorVCSInterface_private_method__get_vcs_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_vcs_name** **(** **)** |virtual| +:ref:`String<class_String>` **_get_vcs_name**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__get_vcs_name>` Returns the name of the underlying VCS provider. @@ -367,11 +374,11 @@ Returns the name of the underlying VCS provider. ---- -.. _class_EditorVCSInterface_method__initialize: +.. _class_EditorVCSInterface_private_method__initialize: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_initialize** **(** :ref:`String<class_String>` project_path **)** |virtual| +:ref:`bool<class_bool>` **_initialize**\ (\ project_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__initialize>` Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at ``project_path``. @@ -379,11 +386,11 @@ Initializes the VCS plugin when called from the editor. Returns whether or not t ---- -.. _class_EditorVCSInterface_method__pull: +.. _class_EditorVCSInterface_private_method__pull: .. rst-class:: classref-method -void **_pull** **(** :ref:`String<class_String>` remote **)** |virtual| +|void| **_pull**\ (\ remote\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__pull>` Pulls changes from the remote. This can give rise to merge conflicts. @@ -391,11 +398,11 @@ Pulls changes from the remote. This can give rise to merge conflicts. ---- -.. _class_EditorVCSInterface_method__push: +.. _class_EditorVCSInterface_private_method__push: .. rst-class:: classref-method -void **_push** **(** :ref:`String<class_String>` remote, :ref:`bool<class_bool>` force **)** |virtual| +|void| **_push**\ (\ remote\: :ref:`String<class_String>`, force\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__push>` Pushes changes to the ``remote``. If ``force`` is ``true``, a force push will override the change history already present on the remote. @@ -403,11 +410,11 @@ Pushes changes to the ``remote``. If ``force`` is ``true``, a force push will ov ---- -.. _class_EditorVCSInterface_method__remove_branch: +.. _class_EditorVCSInterface_private_method__remove_branch: .. rst-class:: classref-method -void **_remove_branch** **(** :ref:`String<class_String>` branch_name **)** |virtual| +|void| **_remove_branch**\ (\ branch_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__remove_branch>` Remove a branch from the local VCS. @@ -415,11 +422,11 @@ Remove a branch from the local VCS. ---- -.. _class_EditorVCSInterface_method__remove_remote: +.. _class_EditorVCSInterface_private_method__remove_remote: .. rst-class:: classref-method -void **_remove_remote** **(** :ref:`String<class_String>` remote_name **)** |virtual| +|void| **_remove_remote**\ (\ remote_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__remove_remote>` Remove a remote from the local VCS. @@ -427,11 +434,11 @@ Remove a remote from the local VCS. ---- -.. _class_EditorVCSInterface_method__set_credentials: +.. _class_EditorVCSInterface_private_method__set_credentials: .. rst-class:: classref-method -void **_set_credentials** **(** :ref:`String<class_String>` username, :ref:`String<class_String>` password, :ref:`String<class_String>` ssh_public_key_path, :ref:`String<class_String>` ssh_private_key_path, :ref:`String<class_String>` ssh_passphrase **)** |virtual| +|void| **_set_credentials**\ (\ username\: :ref:`String<class_String>`, password\: :ref:`String<class_String>`, ssh_public_key_path\: :ref:`String<class_String>`, ssh_private_key_path\: :ref:`String<class_String>`, ssh_passphrase\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__set_credentials>` Set user credentials in the underlying VCS. ``username`` and ``password`` are used only during HTTPS authentication unless not already mentioned in the remote URL. ``ssh_public_key_path``, ``ssh_private_key_path``, and ``ssh_passphrase`` are only used during SSH authentication. @@ -439,11 +446,11 @@ Set user credentials in the underlying VCS. ``username`` and ``password`` are us ---- -.. _class_EditorVCSInterface_method__shut_down: +.. _class_EditorVCSInterface_private_method__shut_down: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shut_down** **(** **)** |virtual| +:ref:`bool<class_bool>` **_shut_down**\ (\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__shut_down>` Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. @@ -451,11 +458,11 @@ Shuts down VCS plugin instance. Called when the user either closes the editor or ---- -.. _class_EditorVCSInterface_method__stage_file: +.. _class_EditorVCSInterface_private_method__stage_file: .. rst-class:: classref-method -void **_stage_file** **(** :ref:`String<class_String>` file_path **)** |virtual| +|void| **_stage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__stage_file>` Stages the file present at ``file_path`` to the staged area. @@ -463,11 +470,11 @@ Stages the file present at ``file_path`` to the staged area. ---- -.. _class_EditorVCSInterface_method__unstage_file: +.. _class_EditorVCSInterface_private_method__unstage_file: .. rst-class:: classref-method -void **_unstage_file** **(** :ref:`String<class_String>` file_path **)** |virtual| +|void| **_unstage_file**\ (\ file_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_EditorVCSInterface_private_method__unstage_file>` Unstages the file present at ``file_path`` from the staged area to the unstaged area. @@ -479,7 +486,7 @@ Unstages the file present at ``file_path`` from the staged area to the unstaged .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **add_diff_hunks_into_diff_file** **(** :ref:`Dictionary<class_Dictionary>` diff_file, :ref:`Dictionary[]<class_Dictionary>` diff_hunks **)** +:ref:`Dictionary<class_Dictionary>` **add_diff_hunks_into_diff_file**\ (\ diff_file\: :ref:`Dictionary<class_Dictionary>`, diff_hunks\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`🔗<class_EditorVCSInterface_method_add_diff_hunks_into_diff_file>` Helper function to add an array of ``diff_hunks`` into a ``diff_file``. @@ -491,7 +498,7 @@ Helper function to add an array of ``diff_hunks`` into a ``diff_file``. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **add_line_diffs_into_diff_hunk** **(** :ref:`Dictionary<class_Dictionary>` diff_hunk, :ref:`Dictionary[]<class_Dictionary>` line_diffs **)** +:ref:`Dictionary<class_Dictionary>` **add_line_diffs_into_diff_hunk**\ (\ diff_hunk\: :ref:`Dictionary<class_Dictionary>`, line_diffs\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\]\ ) :ref:`🔗<class_EditorVCSInterface_method_add_line_diffs_into_diff_hunk>` Helper function to add an array of ``line_diffs`` into a ``diff_hunk``. @@ -503,7 +510,7 @@ Helper function to add an array of ``line_diffs`` into a ``diff_hunk``. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **create_commit** **(** :ref:`String<class_String>` msg, :ref:`String<class_String>` author, :ref:`String<class_String>` id, :ref:`int<class_int>` unix_timestamp, :ref:`int<class_int>` offset_minutes **)** +:ref:`Dictionary<class_Dictionary>` **create_commit**\ (\ msg\: :ref:`String<class_String>`, author\: :ref:`String<class_String>`, id\: :ref:`String<class_String>`, unix_timestamp\: :ref:`int<class_int>`, offset_minutes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_commit>` Helper function to create a commit :ref:`Dictionary<class_Dictionary>` item. ``msg`` is the commit message of the commit. ``author`` is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. ``id`` is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. ``unix_timestamp`` is the UTC Unix timestamp of when the commit was created. ``offset_minutes`` is the timezone offset in minutes, recorded from the system timezone where the commit was created. @@ -515,7 +522,7 @@ Helper function to create a commit :ref:`Dictionary<class_Dictionary>` item. ``m .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **create_diff_file** **(** :ref:`String<class_String>` new_file, :ref:`String<class_String>` old_file **)** +:ref:`Dictionary<class_Dictionary>` **create_diff_file**\ (\ new_file\: :ref:`String<class_String>`, old_file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_file>` Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing old and new diff file paths. @@ -527,7 +534,7 @@ Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing old .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **create_diff_hunk** **(** :ref:`int<class_int>` old_start, :ref:`int<class_int>` new_start, :ref:`int<class_int>` old_lines, :ref:`int<class_int>` new_lines **)** +:ref:`Dictionary<class_Dictionary>` **create_diff_hunk**\ (\ old_start\: :ref:`int<class_int>`, new_start\: :ref:`int<class_int>`, old_lines\: :ref:`int<class_int>`, new_lines\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_hunk>` Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing diff hunk data. ``old_start`` is the starting line number in old file. ``new_start`` is the starting line number in new file. ``old_lines`` is the number of lines in the old file. ``new_lines`` is the number of lines in the new file. @@ -539,7 +546,7 @@ Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing diff .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **create_diff_line** **(** :ref:`int<class_int>` new_line_no, :ref:`int<class_int>` old_line_no, :ref:`String<class_String>` content, :ref:`String<class_String>` status **)** +:ref:`Dictionary<class_Dictionary>` **create_diff_line**\ (\ new_line_no\: :ref:`int<class_int>`, old_line_no\: :ref:`int<class_int>`, content\: :ref:`String<class_String>`, status\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_diff_line>` Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing a line diff. ``new_line_no`` is the line number in the new file (can be ``-1`` if the line is deleted). ``old_line_no`` is the line number in the old file (can be ``-1`` if the line is added). ``content`` is the diff text. ``status`` is a single character string which stores the line origin. @@ -551,7 +558,7 @@ Helper function to create a :ref:`Dictionary<class_Dictionary>` for storing a li .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **create_status_file** **(** :ref:`String<class_String>` file_path, :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>` change_type, :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>` area **)** +:ref:`Dictionary<class_Dictionary>` **create_status_file**\ (\ file_path\: :ref:`String<class_String>`, change_type\: :ref:`ChangeType<enum_EditorVCSInterface_ChangeType>`, area\: :ref:`TreeArea<enum_EditorVCSInterface_TreeArea>`\ ) :ref:`🔗<class_EditorVCSInterface_method_create_status_file>` Helper function to create a :ref:`Dictionary<class_Dictionary>` used by editor to read the status of a file. @@ -563,9 +570,9 @@ Helper function to create a :ref:`Dictionary<class_Dictionary>` used by editor t .. rst-class:: classref-method -void **popup_error** **(** :ref:`String<class_String>` msg **)** +|void| **popup_error**\ (\ msg\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorVCSInterface_method_popup_error>` -Pops up an error message in the edior which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. +Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -574,3 +581,4 @@ Pops up an error message in the edior which is shown as coming from the underlyi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_encodedobjectasid.rst b/classes/class_encodedobjectasid.rst index 662dd39d5eb..86656540eeb 100644 --- a/classes/class_encodedobjectasid.rst +++ b/classes/class_encodedobjectasid.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **object_id** = ``0`` +:ref:`int<class_int>` **object_id** = ``0`` :ref:`🔗<class_EncodedObjectAsID_property_object_id>` .. rst-class:: classref-property-setget -- void **set_object_id** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_object_id** **(** **)** +- |void| **set_object_id**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_object_id**\ (\ ) The :ref:`Object<class_Object>` identifier stored in this **EncodedObjectAsID** instance. The object instance can be retrieved with :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>`. @@ -64,3 +64,4 @@ The :ref:`Object<class_Object>` identifier stored in this **EncodedObjectAsID** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_enetconnection.rst b/classes/class_enetconnection.rst index 8e7c9b69eb0..2186fa03f24 100644 --- a/classes/class_enetconnection.rst +++ b/classes/class_enetconnection.rst @@ -36,43 +36,43 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bandwidth_limit<class_ENetConnection_method_bandwidth_limit>` **(** :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`broadcast<class_ENetConnection_method_broadcast>` **(** :ref:`int<class_int>` channel, :ref:`PackedByteArray<class_PackedByteArray>` packet, :ref:`int<class_int>` flags **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`channel_limit<class_ENetConnection_method_channel_limit>` **(** :ref:`int<class_int>` limit **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compress<class_ENetConnection_method_compress>` **(** :ref:`CompressionMode<enum_ENetConnection_CompressionMode>` mode **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ENetPacketPeer<class_ENetPacketPeer>` | :ref:`connect_to_host<class_ENetConnection_method_connect_to_host>` **(** :ref:`String<class_String>` address, :ref:`int<class_int>` port, :ref:`int<class_int>` channels=0, :ref:`int<class_int>` data=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_host<class_ENetConnection_method_create_host>` **(** :ref:`int<class_int>` max_peers=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_host_bound<class_ENetConnection_method_create_host_bound>` **(** :ref:`String<class_String>` bind_address, :ref:`int<class_int>` bind_port, :ref:`int<class_int>` max_peers=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`destroy<class_ENetConnection_method_destroy>` **(** **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dtls_client_setup<class_ENetConnection_method_dtls_client_setup>` **(** :ref:`String<class_String>` hostname, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dtls_server_setup<class_ENetConnection_method_dtls_server_setup>` **(** :ref:`TLSOptions<class_TLSOptions>` server_options **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flush<class_ENetConnection_method_flush>` **(** **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_local_port<class_ENetConnection_method_get_local_port>` **(** **)** |const| | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_max_channels<class_ENetConnection_method_get_max_channels>` **(** **)** |const| | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ENetPacketPeer[]<class_ENetPacketPeer>` | :ref:`get_peers<class_ENetConnection_method_get_peers>` **(** **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`pop_statistic<class_ENetConnection_method_pop_statistic>` **(** :ref:`HostStatistic<enum_ENetConnection_HostStatistic>` statistic **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`refuse_new_connections<class_ENetConnection_method_refuse_new_connections>` **(** :ref:`bool<class_bool>` refuse **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`service<class_ENetConnection_method_service>` **(** :ref:`int<class_int>` timeout=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`socket_send<class_ENetConnection_method_socket_send>` **(** :ref:`String<class_String>` destination_address, :ref:`int<class_int>` destination_port, :ref:`PackedByteArray<class_PackedByteArray>` packet **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bandwidth_limit<class_ENetConnection_method_bandwidth_limit>`\ (\ in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`broadcast<class_ENetConnection_method_broadcast>`\ (\ channel\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`, flags\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`channel_limit<class_ENetConnection_method_channel_limit>`\ (\ limit\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compress<class_ENetConnection_method_compress>`\ (\ mode\: :ref:`CompressionMode<enum_ENetConnection_CompressionMode>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ENetPacketPeer<class_ENetPacketPeer>` | :ref:`connect_to_host<class_ENetConnection_method_connect_to_host>`\ (\ address\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`, channels\: :ref:`int<class_int>` = 0, data\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_host<class_ENetConnection_method_create_host>`\ (\ max_peers\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_host_bound<class_ENetConnection_method_create_host_bound>`\ (\ bind_address\: :ref:`String<class_String>`, bind_port\: :ref:`int<class_int>`, max_peers\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`destroy<class_ENetConnection_method_destroy>`\ (\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dtls_client_setup<class_ENetConnection_method_dtls_client_setup>`\ (\ hostname\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`dtls_server_setup<class_ENetConnection_method_dtls_server_setup>`\ (\ server_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`flush<class_ENetConnection_method_flush>`\ (\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_local_port<class_ENetConnection_method_get_local_port>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_max_channels<class_ENetConnection_method_get_max_channels>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`ENetPacketPeer<class_ENetPacketPeer>`\] | :ref:`get_peers<class_ENetConnection_method_get_peers>`\ (\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`pop_statistic<class_ENetConnection_method_pop_statistic>`\ (\ statistic\: :ref:`HostStatistic<enum_ENetConnection_HostStatistic>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`refuse_new_connections<class_ENetConnection_method_refuse_new_connections>`\ (\ refuse\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`service<class_ENetConnection_method_service>`\ (\ timeout\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`socket_send<class_ENetConnection_method_socket_send>`\ (\ destination_address\: :ref:`String<class_String>`, destination_port\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,7 +87,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CompressionMode**: +enum **CompressionMode**: :ref:`🔗<enum_ENetConnection_CompressionMode>` .. _class_ENetConnection_constant_COMPRESS_NONE: @@ -137,7 +137,7 @@ ENet's built-in range encoding. Works well on small packets, but is not the most .. rst-class:: classref-enumeration -enum **EventType**: +enum **EventType**: :ref:`🔗<enum_ENetConnection_EventType>` .. _class_ENetConnection_constant_EVENT_ERROR: @@ -177,7 +177,7 @@ A peer has disconnected. This event is generated on a successful completion of a :ref:`EventType<enum_ENetConnection_EventType>` **EVENT_RECEIVE** = ``3`` -A packet has been received from a peer. The array will contain the peer which sent the packet, the channel number upon which the packet was received, and the received packet. +A packet has been received from a peer. The array will contain the peer which sent the packet and the channel number upon which the packet was received. The received packet will be queued to the associated :ref:`ENetPacketPeer<class_ENetPacketPeer>`. .. rst-class:: classref-item-separator @@ -187,7 +187,7 @@ A packet has been received from a peer. The array will contain the peer which se .. rst-class:: classref-enumeration -enum **HostStatistic**: +enum **HostStatistic**: :ref:`🔗<enum_ENetConnection_HostStatistic>` .. _class_ENetConnection_constant_HOST_TOTAL_SENT_DATA: @@ -234,7 +234,7 @@ Method Descriptions .. rst-class:: classref-method -void **bandwidth_limit** **(** :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** +|void| **bandwidth_limit**\ (\ in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetConnection_method_bandwidth_limit>` Adjusts the bandwidth limits of a host. @@ -246,7 +246,7 @@ Adjusts the bandwidth limits of a host. .. rst-class:: classref-method -void **broadcast** **(** :ref:`int<class_int>` channel, :ref:`PackedByteArray<class_PackedByteArray>` packet, :ref:`int<class_int>` flags **)** +|void| **broadcast**\ (\ channel\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`, flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetConnection_method_broadcast>` Queues a ``packet`` to be sent to all peers associated with the host over the specified ``channel``. See :ref:`ENetPacketPeer<class_ENetPacketPeer>` ``FLAG_*`` constants for available packet flags. @@ -258,7 +258,7 @@ Queues a ``packet`` to be sent to all peers associated with the host over the sp .. rst-class:: classref-method -void **channel_limit** **(** :ref:`int<class_int>` limit **)** +|void| **channel_limit**\ (\ limit\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetConnection_method_channel_limit>` Limits the maximum allowed channels of future incoming connections. @@ -270,7 +270,7 @@ Limits the maximum allowed channels of future incoming connections. .. rst-class:: classref-method -void **compress** **(** :ref:`CompressionMode<enum_ENetConnection_CompressionMode>` mode **)** +|void| **compress**\ (\ mode\: :ref:`CompressionMode<enum_ENetConnection_CompressionMode>`\ ) :ref:`🔗<class_ENetConnection_method_compress>` Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. @@ -286,7 +286,7 @@ Sets the compression method used for network packets. These have different trade .. rst-class:: classref-method -:ref:`ENetPacketPeer<class_ENetPacketPeer>` **connect_to_host** **(** :ref:`String<class_String>` address, :ref:`int<class_int>` port, :ref:`int<class_int>` channels=0, :ref:`int<class_int>` data=0 **)** +:ref:`ENetPacketPeer<class_ENetPacketPeer>` **connect_to_host**\ (\ address\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`, channels\: :ref:`int<class_int>` = 0, data\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetConnection_method_connect_to_host>` Initiates a connection to a foreign ``address`` using the specified ``port`` and allocating the requested ``channels``. Optional ``data`` can be passed during connection in the form of a 32 bit integer. @@ -300,7 +300,7 @@ Initiates a connection to a foreign ``address`` using the specified ``port`` and .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_host** **(** :ref:`int<class_int>` max_peers=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_host**\ (\ max_peers\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetConnection_method_create_host>` Create an ENetHost that will allow up to ``max_peers`` connected peers, each allocating up to ``max_channels`` channels, optionally limiting bandwidth to ``in_bandwidth`` and ``out_bandwidth``. @@ -312,7 +312,7 @@ Create an ENetHost that will allow up to ``max_peers`` connected peers, each all .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_host_bound** **(** :ref:`String<class_String>` bind_address, :ref:`int<class_int>` bind_port, :ref:`int<class_int>` max_peers=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_host_bound**\ (\ bind_address\: :ref:`String<class_String>`, bind_port\: :ref:`int<class_int>`, max_peers\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetConnection_method_create_host_bound>` Create an ENetHost like :ref:`create_host<class_ENetConnection_method_create_host>` which is also bound to the given ``bind_address`` and ``bind_port``. @@ -324,7 +324,7 @@ Create an ENetHost like :ref:`create_host<class_ENetConnection_method_create_hos .. rst-class:: classref-method -void **destroy** **(** **)** +|void| **destroy**\ (\ ) :ref:`🔗<class_ENetConnection_method_destroy>` Destroys the host and all resources associated with it. @@ -336,7 +336,7 @@ Destroys the host and all resources associated with it. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **dtls_client_setup** **(** :ref:`String<class_String>` hostname, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **dtls_client_setup**\ (\ hostname\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_ENetConnection_method_dtls_client_setup>` Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before :ref:`connect_to_host<class_ENetConnection_method_connect_to_host>` to have ENet connect using DTLS validating the server certificate against ``hostname``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client<class_TLSOptions_method_client>` and :ref:`TLSOptions.client_unsafe<class_TLSOptions_method_client_unsafe>`. @@ -348,7 +348,7 @@ Configure this ENetHost to use the custom Godot extension allowing DTLS encrypti .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **dtls_server_setup** **(** :ref:`TLSOptions<class_TLSOptions>` server_options **)** +:ref:`Error<enum_@GlobalScope_Error>` **dtls_server_setup**\ (\ server_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) :ref:`🔗<class_ENetConnection_method_dtls_server_setup>` Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after :ref:`create_host_bound<class_ENetConnection_method_create_host_bound>` to have ENet expect peers to connect using DTLS. See :ref:`TLSOptions.server<class_TLSOptions_method_server>`. @@ -360,7 +360,7 @@ Configure this ENetHost to use the custom Godot extension allowing DTLS encrypti .. rst-class:: classref-method -void **flush** **(** **)** +|void| **flush**\ (\ ) :ref:`🔗<class_ENetConnection_method_flush>` Sends any queued packets on the host specified to its designated peers. @@ -372,7 +372,7 @@ Sends any queued packets on the host specified to its designated peers. .. rst-class:: classref-method -:ref:`int<class_int>` **get_local_port** **(** **)** |const| +:ref:`int<class_int>` **get_local_port**\ (\ ) |const| :ref:`🔗<class_ENetConnection_method_get_local_port>` Returns the local port to which this peer is bound. @@ -384,7 +384,7 @@ Returns the local port to which this peer is bound. .. rst-class:: classref-method -:ref:`int<class_int>` **get_max_channels** **(** **)** |const| +:ref:`int<class_int>` **get_max_channels**\ (\ ) |const| :ref:`🔗<class_ENetConnection_method_get_max_channels>` Returns the maximum number of channels allowed for connected peers. @@ -396,7 +396,7 @@ Returns the maximum number of channels allowed for connected peers. .. rst-class:: classref-method -:ref:`ENetPacketPeer[]<class_ENetPacketPeer>` **get_peers** **(** **)** +:ref:`Array<class_Array>`\[:ref:`ENetPacketPeer<class_ENetPacketPeer>`\] **get_peers**\ (\ ) :ref:`🔗<class_ENetConnection_method_get_peers>` Returns the list of peers associated with this host. @@ -410,7 +410,7 @@ Returns the list of peers associated with this host. .. rst-class:: classref-method -:ref:`float<class_float>` **pop_statistic** **(** :ref:`HostStatistic<enum_ENetConnection_HostStatistic>` statistic **)** +:ref:`float<class_float>` **pop_statistic**\ (\ statistic\: :ref:`HostStatistic<enum_ENetConnection_HostStatistic>`\ ) :ref:`🔗<class_ENetConnection_method_pop_statistic>` Returns and resets host statistics. See :ref:`HostStatistic<enum_ENetConnection_HostStatistic>` for more info. @@ -422,7 +422,7 @@ Returns and resets host statistics. See :ref:`HostStatistic<enum_ENetConnection_ .. rst-class:: classref-method -void **refuse_new_connections** **(** :ref:`bool<class_bool>` refuse **)** +|void| **refuse_new_connections**\ (\ refuse\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ENetConnection_method_refuse_new_connections>` Configures the DTLS server to automatically drop new connections. @@ -436,7 +436,7 @@ Configures the DTLS server to automatically drop new connections. .. rst-class:: classref-method -:ref:`Array<class_Array>` **service** **(** :ref:`int<class_int>` timeout=0 **)** +:ref:`Array<class_Array>` **service**\ (\ timeout\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetConnection_method_service>` Waits for events on the host specified and shuttles packets between the host and its peers. The returned :ref:`Array<class_Array>` will have 4 elements. An :ref:`EventType<enum_ENetConnection_EventType>`, the :ref:`ENetPacketPeer<class_ENetPacketPeer>` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is :ref:`EVENT_RECEIVE<class_ENetConnection_constant_EVENT_RECEIVE>`, the received packet will be queued to the associated :ref:`ENetPacketPeer<class_ENetPacketPeer>`. @@ -450,9 +450,9 @@ Call this function regularly to handle connections, disconnections, and to recei .. rst-class:: classref-method -void **socket_send** **(** :ref:`String<class_String>` destination_address, :ref:`int<class_int>` destination_port, :ref:`PackedByteArray<class_PackedByteArray>` packet **)** +|void| **socket_send**\ (\ destination_address\: :ref:`String<class_String>`, destination_port\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_ENetConnection_method_socket_send>` -Sends a ``packet`` toward a destination from the address and port currently bound by this ENetConnection instance. +Sends a ``packet`` toward a destination from the address and port currently bound by this ENetConnection instance. This is useful as it serves to establish entries in NAT routing tables on all devices between this bound instance and the public facing internet, allowing a prospective client's connection packets to be routed backward through the NAT device(s) between the public internet and this host. @@ -465,3 +465,4 @@ This requires forward knowledge of a prospective client's address and communicat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_enetmultiplayerpeer.rst b/classes/class_enetmultiplayerpeer.rst index 15d016ede4b..7123249a6c6 100644 --- a/classes/class_enetmultiplayerpeer.rst +++ b/classes/class_enetmultiplayerpeer.rst @@ -52,19 +52,19 @@ Methods .. table:: :widths: auto - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_mesh_peer<class_ENetMultiplayerPeer_method_add_mesh_peer>` **(** :ref:`int<class_int>` peer_id, :ref:`ENetConnection<class_ENetConnection>` host **)** | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_ENetMultiplayerPeer_method_create_client>` **(** :ref:`String<class_String>` address, :ref:`int<class_int>` port, :ref:`int<class_int>` channel_count=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0, :ref:`int<class_int>` local_port=0 **)** | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_mesh<class_ENetMultiplayerPeer_method_create_mesh>` **(** :ref:`int<class_int>` unique_id **)** | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_ENetMultiplayerPeer_method_create_server>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` max_clients=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ENetPacketPeer<class_ENetPacketPeer>` | :ref:`get_peer<class_ENetMultiplayerPeer_method_get_peer>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bind_ip<class_ENetMultiplayerPeer_method_set_bind_ip>` **(** :ref:`String<class_String>` ip **)** | - +---------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_mesh_peer<class_ENetMultiplayerPeer_method_add_mesh_peer>`\ (\ peer_id\: :ref:`int<class_int>`, host\: :ref:`ENetConnection<class_ENetConnection>`\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_ENetMultiplayerPeer_method_create_client>`\ (\ address\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`, channel_count\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0, local_port\: :ref:`int<class_int>` = 0\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_mesh<class_ENetMultiplayerPeer_method_create_mesh>`\ (\ unique_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_ENetMultiplayerPeer_method_create_server>`\ (\ port\: :ref:`int<class_int>`, max_clients\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ENetPacketPeer<class_ENetPacketPeer>` | :ref:`get_peer<class_ENetMultiplayerPeer_method_get_peer>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bind_ip<class_ENetMultiplayerPeer_method_set_bind_ip>`\ (\ ip\: :ref:`String<class_String>`\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,11 +79,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ENetConnection<class_ENetConnection>` **host** +:ref:`ENetConnection<class_ENetConnection>` **host** :ref:`🔗<class_ENetMultiplayerPeer_property_host>` .. rst-class:: classref-property-setget -- :ref:`ENetConnection<class_ENetConnection>` **get_host** **(** **)** +- :ref:`ENetConnection<class_ENetConnection>` **get_host**\ (\ ) The underlying :ref:`ENetConnection<class_ENetConnection>` created after :ref:`create_client<class_ENetMultiplayerPeer_method_create_client>` and :ref:`create_server<class_ENetMultiplayerPeer_method_create_server>`. @@ -100,7 +100,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **add_mesh_peer** **(** :ref:`int<class_int>` peer_id, :ref:`ENetConnection<class_ENetConnection>` host **)** +:ref:`Error<enum_@GlobalScope_Error>` **add_mesh_peer**\ (\ peer_id\: :ref:`int<class_int>`, host\: :ref:`ENetConnection<class_ENetConnection>`\ ) :ref:`🔗<class_ENetMultiplayerPeer_method_add_mesh_peer>` Add a new remote peer with the given ``peer_id`` connected to the given ``host``. @@ -114,7 +114,7 @@ Add a new remote peer with the given ``peer_id`` connected to the given ``host`` .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_client** **(** :ref:`String<class_String>` address, :ref:`int<class_int>` port, :ref:`int<class_int>` channel_count=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0, :ref:`int<class_int>` local_port=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_client**\ (\ address\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`, channel_count\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0, local_port\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetMultiplayerPeer_method_create_client>` Create client that connects to a server at ``address`` using specified ``port``. The given address needs to be either a fully qualified domain name (e.g. ``"www.example.com"``) or an IP address in IPv4 or IPv6 format (e.g. ``"192.168.1.1"``). The ``port`` is the port the server is listening on. The ``channel_count`` parameter can be used to specify the number of ENet channels allocated for the connection. The ``in_bandwidth`` and ``out_bandwidth`` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if a client was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE<class_@GlobalScope_constant_ERR_ALREADY_IN_USE>` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close<class_MultiplayerPeer_method_close>` first) or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if the client could not be created. If ``local_port`` is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. @@ -126,7 +126,7 @@ Create client that connects to a server at ``address`` using specified ``port``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_mesh** **(** :ref:`int<class_int>` unique_id **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_mesh**\ (\ unique_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetMultiplayerPeer_method_create_mesh>` Initialize this :ref:`MultiplayerPeer<class_MultiplayerPeer>` in mesh mode. The provided ``unique_id`` will be used as the local peer network unique ID once assigned as the :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>`. In the mesh configuration you will need to set up each new peer manually using :ref:`ENetConnection<class_ENetConnection>` before calling :ref:`add_mesh_peer<class_ENetMultiplayerPeer_method_add_mesh_peer>`. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). @@ -138,7 +138,7 @@ Initialize this :ref:`MultiplayerPeer<class_MultiplayerPeer>` in mesh mode. The .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_server** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` max_clients=32, :ref:`int<class_int>` max_channels=0, :ref:`int<class_int>` in_bandwidth=0, :ref:`int<class_int>` out_bandwidth=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_server**\ (\ port\: :ref:`int<class_int>`, max_clients\: :ref:`int<class_int>` = 32, max_channels\: :ref:`int<class_int>` = 0, in_bandwidth\: :ref:`int<class_int>` = 0, out_bandwidth\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetMultiplayerPeer_method_create_server>` Create server that listens to connections via ``port``. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use :ref:`set_bind_ip<class_ENetMultiplayerPeer_method_set_bind_ip>`. The default IP is the wildcard ``"*"``, which listens on all available interfaces. ``max_clients`` is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see :ref:`create_client<class_ENetMultiplayerPeer_method_create_client>`. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if a server was created, :ref:`@GlobalScope.ERR_ALREADY_IN_USE<class_@GlobalScope_constant_ERR_ALREADY_IN_USE>` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call :ref:`MultiplayerPeer.close<class_MultiplayerPeer_method_close>` first) or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if the server could not be created. @@ -150,7 +150,7 @@ Create server that listens to connections via ``port``. The port needs to be an .. rst-class:: classref-method -:ref:`ENetPacketPeer<class_ENetPacketPeer>` **get_peer** **(** :ref:`int<class_int>` id **)** |const| +:ref:`ENetPacketPeer<class_ENetPacketPeer>` **get_peer**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ENetMultiplayerPeer_method_get_peer>` Returns the :ref:`ENetPacketPeer<class_ENetPacketPeer>` associated to the given ``id``. @@ -162,7 +162,7 @@ Returns the :ref:`ENetPacketPeer<class_ENetPacketPeer>` associated to the given .. rst-class:: classref-method -void **set_bind_ip** **(** :ref:`String<class_String>` ip **)** +|void| **set_bind_ip**\ (\ ip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ENetMultiplayerPeer_method_set_bind_ip>` The IP used when creating a server. This is set to the wildcard ``"*"`` by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: ``"192.168.1.1"``. @@ -173,3 +173,4 @@ The IP used when creating a server. This is set to the wildcard ``"*"`` by defau .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_enetpacketpeer.rst b/classes/class_enetpacketpeer.rst index 78755e1f9ca..c0d0a0d3a63 100644 --- a/classes/class_enetpacketpeer.rst +++ b/classes/class_enetpacketpeer.rst @@ -40,37 +40,37 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_channels<class_ENetPacketPeer_method_get_channels>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_remote_address<class_ENetPacketPeer_method_get_remote_address>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_remote_port<class_ENetPacketPeer_method_get_remote_port>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PeerState<enum_ENetPacketPeer_PeerState>` | :ref:`get_state<class_ENetPacketPeer_method_get_state>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_statistic<class_ENetPacketPeer_method_get_statistic>` **(** :ref:`PeerStatistic<enum_ENetPacketPeer_PeerStatistic>` statistic **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_active<class_ENetPacketPeer_method_is_active>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`peer_disconnect<class_ENetPacketPeer_method_peer_disconnect>` **(** :ref:`int<class_int>` data=0 **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`peer_disconnect_later<class_ENetPacketPeer_method_peer_disconnect_later>` **(** :ref:`int<class_int>` data=0 **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`peer_disconnect_now<class_ENetPacketPeer_method_peer_disconnect_now>` **(** :ref:`int<class_int>` data=0 **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ping<class_ENetPacketPeer_method_ping>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ping_interval<class_ENetPacketPeer_method_ping_interval>` **(** :ref:`int<class_int>` ping_interval **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset<class_ENetPacketPeer_method_reset>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send<class_ENetPacketPeer_method_send>` **(** :ref:`int<class_int>` channel, :ref:`PackedByteArray<class_PackedByteArray>` packet, :ref:`int<class_int>` flags **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_timeout<class_ENetPacketPeer_method_set_timeout>` **(** :ref:`int<class_int>` timeout, :ref:`int<class_int>` timeout_min, :ref:`int<class_int>` timeout_max **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`throttle_configure<class_ENetPacketPeer_method_throttle_configure>` **(** :ref:`int<class_int>` interval, :ref:`int<class_int>` acceleration, :ref:`int<class_int>` deceleration **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_channels<class_ENetPacketPeer_method_get_channels>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_remote_address<class_ENetPacketPeer_method_get_remote_address>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_remote_port<class_ENetPacketPeer_method_get_remote_port>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PeerState<enum_ENetPacketPeer_PeerState>` | :ref:`get_state<class_ENetPacketPeer_method_get_state>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_statistic<class_ENetPacketPeer_method_get_statistic>`\ (\ statistic\: :ref:`PeerStatistic<enum_ENetPacketPeer_PeerStatistic>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_active<class_ENetPacketPeer_method_is_active>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`peer_disconnect<class_ENetPacketPeer_method_peer_disconnect>`\ (\ data\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`peer_disconnect_later<class_ENetPacketPeer_method_peer_disconnect_later>`\ (\ data\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`peer_disconnect_now<class_ENetPacketPeer_method_peer_disconnect_now>`\ (\ data\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ping<class_ENetPacketPeer_method_ping>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ping_interval<class_ENetPacketPeer_method_ping_interval>`\ (\ ping_interval\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset<class_ENetPacketPeer_method_reset>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send<class_ENetPacketPeer_method_send>`\ (\ channel\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`, flags\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_timeout<class_ENetPacketPeer_method_set_timeout>`\ (\ timeout\: :ref:`int<class_int>`, timeout_min\: :ref:`int<class_int>`, timeout_max\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`throttle_configure<class_ENetPacketPeer_method_throttle_configure>`\ (\ interval\: :ref:`int<class_int>`, acceleration\: :ref:`int<class_int>`, deceleration\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -85,7 +85,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PeerState**: +enum **PeerState**: :ref:`🔗<enum_ENetPacketPeer_PeerState>` .. _class_ENetPacketPeer_constant_STATE_DISCONNECTED: @@ -175,7 +175,7 @@ The peer has lost connection, but is not considered truly disconnected (as the p .. rst-class:: classref-enumeration -enum **PeerStatistic**: +enum **PeerStatistic**: :ref:`🔗<enum_ENetPacketPeer_PeerStatistic>` .. _class_ENetPacketPeer_constant_PEER_PACKET_LOSS: @@ -302,7 +302,7 @@ Constants .. rst-class:: classref-constant -**PACKET_LOSS_SCALE** = ``65536`` +**PACKET_LOSS_SCALE** = ``65536`` :ref:`🔗<class_ENetPacketPeer_constant_PACKET_LOSS_SCALE>` The reference scale for packet loss. See :ref:`get_statistic<class_ENetPacketPeer_method_get_statistic>` and :ref:`PEER_PACKET_LOSS<class_ENetPacketPeer_constant_PEER_PACKET_LOSS>`. @@ -310,7 +310,7 @@ The reference scale for packet loss. See :ref:`get_statistic<class_ENetPacketPee .. rst-class:: classref-constant -**PACKET_THROTTLE_SCALE** = ``32`` +**PACKET_THROTTLE_SCALE** = ``32`` :ref:`🔗<class_ENetPacketPeer_constant_PACKET_THROTTLE_SCALE>` The reference value for throttle configuration. The default value is ``32``. See :ref:`throttle_configure<class_ENetPacketPeer_method_throttle_configure>`. @@ -318,7 +318,7 @@ The reference value for throttle configuration. The default value is ``32``. See .. rst-class:: classref-constant -**FLAG_RELIABLE** = ``1`` +**FLAG_RELIABLE** = ``1`` :ref:`🔗<class_ENetPacketPeer_constant_FLAG_RELIABLE>` Mark the packet to be sent as reliable. @@ -326,7 +326,7 @@ Mark the packet to be sent as reliable. .. rst-class:: classref-constant -**FLAG_UNSEQUENCED** = ``2`` +**FLAG_UNSEQUENCED** = ``2`` :ref:`🔗<class_ENetPacketPeer_constant_FLAG_UNSEQUENCED>` Mark the packet to be sent unsequenced (unreliable). @@ -334,7 +334,7 @@ Mark the packet to be sent unsequenced (unreliable). .. rst-class:: classref-constant -**FLAG_UNRELIABLE_FRAGMENT** = ``8`` +**FLAG_UNRELIABLE_FRAGMENT** = ``8`` :ref:`🔗<class_ENetPacketPeer_constant_FLAG_UNRELIABLE_FRAGMENT>` Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped). @@ -351,7 +351,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_channels** **(** **)** |const| +:ref:`int<class_int>` **get_channels**\ (\ ) |const| :ref:`🔗<class_ENetPacketPeer_method_get_channels>` Returns the number of channels allocated for communication with peer. @@ -363,7 +363,7 @@ Returns the number of channels allocated for communication with peer. .. rst-class:: classref-method -:ref:`String<class_String>` **get_remote_address** **(** **)** |const| +:ref:`String<class_String>` **get_remote_address**\ (\ ) |const| :ref:`🔗<class_ENetPacketPeer_method_get_remote_address>` Returns the IP address of this peer. @@ -375,7 +375,7 @@ Returns the IP address of this peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_remote_port** **(** **)** |const| +:ref:`int<class_int>` **get_remote_port**\ (\ ) |const| :ref:`🔗<class_ENetPacketPeer_method_get_remote_port>` Returns the remote port of this peer. @@ -387,7 +387,7 @@ Returns the remote port of this peer. .. rst-class:: classref-method -:ref:`PeerState<enum_ENetPacketPeer_PeerState>` **get_state** **(** **)** |const| +:ref:`PeerState<enum_ENetPacketPeer_PeerState>` **get_state**\ (\ ) |const| :ref:`🔗<class_ENetPacketPeer_method_get_state>` Returns the current peer state. See :ref:`PeerState<enum_ENetPacketPeer_PeerState>`. @@ -399,7 +399,7 @@ Returns the current peer state. See :ref:`PeerState<enum_ENetPacketPeer_PeerStat .. rst-class:: classref-method -:ref:`float<class_float>` **get_statistic** **(** :ref:`PeerStatistic<enum_ENetPacketPeer_PeerStatistic>` statistic **)** +:ref:`float<class_float>` **get_statistic**\ (\ statistic\: :ref:`PeerStatistic<enum_ENetPacketPeer_PeerStatistic>`\ ) :ref:`🔗<class_ENetPacketPeer_method_get_statistic>` Returns the requested ``statistic`` for this peer. See :ref:`PeerStatistic<enum_ENetPacketPeer_PeerStatistic>`. @@ -411,7 +411,7 @@ Returns the requested ``statistic`` for this peer. See :ref:`PeerStatistic<enum_ .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_active** **(** **)** |const| +:ref:`bool<class_bool>` **is_active**\ (\ ) |const| :ref:`🔗<class_ENetPacketPeer_method_is_active>` Returns ``true`` if the peer is currently active (i.e. the associated :ref:`ENetConnection<class_ENetConnection>` is still valid). @@ -423,7 +423,7 @@ Returns ``true`` if the peer is currently active (i.e. the associated :ref:`ENet .. rst-class:: classref-method -void **peer_disconnect** **(** :ref:`int<class_int>` data=0 **)** +|void| **peer_disconnect**\ (\ data\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetPacketPeer_method_peer_disconnect>` Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT<class_ENetConnection_constant_EVENT_DISCONNECT>` will be generated during :ref:`ENetConnection.service<class_ENetConnection_method_service>` once the disconnection is complete. @@ -435,7 +435,7 @@ Request a disconnection from a peer. An :ref:`ENetConnection.EVENT_DISCONNECT<cl .. rst-class:: classref-method -void **peer_disconnect_later** **(** :ref:`int<class_int>` data=0 **)** +|void| **peer_disconnect_later**\ (\ data\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetPacketPeer_method_peer_disconnect_later>` Request a disconnection from a peer, but only after all queued outgoing packets are sent. An :ref:`ENetConnection.EVENT_DISCONNECT<class_ENetConnection_constant_EVENT_DISCONNECT>` will be generated during :ref:`ENetConnection.service<class_ENetConnection_method_service>` once the disconnection is complete. @@ -447,7 +447,7 @@ Request a disconnection from a peer, but only after all queued outgoing packets .. rst-class:: classref-method -void **peer_disconnect_now** **(** :ref:`int<class_int>` data=0 **)** +|void| **peer_disconnect_now**\ (\ data\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ENetPacketPeer_method_peer_disconnect_now>` Force an immediate disconnection from a peer. No :ref:`ENetConnection.EVENT_DISCONNECT<class_ENetConnection_constant_EVENT_DISCONNECT>` will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function. @@ -459,7 +459,7 @@ Force an immediate disconnection from a peer. No :ref:`ENetConnection.EVENT_DISC .. rst-class:: classref-method -void **ping** **(** **)** +|void| **ping**\ (\ ) :ref:`🔗<class_ENetPacketPeer_method_ping>` Sends a ping request to a peer. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests. @@ -471,7 +471,7 @@ Sends a ping request to a peer. ENet automatically pings all connected peers at .. rst-class:: classref-method -void **ping_interval** **(** :ref:`int<class_int>` ping_interval **)** +|void| **ping_interval**\ (\ ping_interval\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetPacketPeer_method_ping_interval>` Sets the ``ping_interval`` in milliseconds at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. The default ping interval is ``500`` milliseconds. @@ -483,7 +483,7 @@ Sets the ``ping_interval`` in milliseconds at which pings will be sent to a peer .. rst-class:: classref-method -void **reset** **(** **)** +|void| **reset**\ (\ ) :ref:`🔗<class_ENetPacketPeer_method_reset>` Forcefully disconnects a peer. The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host. @@ -495,7 +495,7 @@ Forcefully disconnects a peer. The foreign host represented by the peer is not n .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **send** **(** :ref:`int<class_int>` channel, :ref:`PackedByteArray<class_PackedByteArray>` packet, :ref:`int<class_int>` flags **)** +:ref:`Error<enum_@GlobalScope_Error>` **send**\ (\ channel\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`, flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetPacketPeer_method_send>` Queues a ``packet`` to be sent over the specified ``channel``. See ``FLAG_*`` constants for available packet flags. @@ -507,7 +507,7 @@ Queues a ``packet`` to be sent over the specified ``channel``. See ``FLAG_*`` co .. rst-class:: classref-method -void **set_timeout** **(** :ref:`int<class_int>` timeout, :ref:`int<class_int>` timeout_min, :ref:`int<class_int>` timeout_max **)** +|void| **set_timeout**\ (\ timeout\: :ref:`int<class_int>`, timeout_min\: :ref:`int<class_int>`, timeout_max\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetPacketPeer_method_set_timeout>` Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. @@ -521,7 +521,7 @@ The ``timeout`` is a factor that, multiplied by a value based on the average rou .. rst-class:: classref-method -void **throttle_configure** **(** :ref:`int<class_int>` interval, :ref:`int<class_int>` acceleration, :ref:`int<class_int>` deceleration **)** +|void| **throttle_configure**\ (\ interval\: :ref:`int<class_int>`, acceleration\: :ref:`int<class_int>`, deceleration\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ENetPacketPeer_method_throttle_configure>` Configures throttle parameter for a peer. @@ -540,3 +540,4 @@ Intermediate values for the throttle represent intermediate probabilities betwee .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_engine.rst b/classes/class_engine.rst index b57e709fb8a..30d29582c76 100644 --- a/classes/class_engine.rst +++ b/classes/class_engine.rst @@ -19,7 +19,7 @@ Provides access to engine properties. Description ----------- -The **Engine** singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. +The **Engine** singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. It also stores information about the current build of Godot, such as the current version. .. rst-class:: classref-reftable-group @@ -51,57 +51,57 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_architecture_name<class_Engine_method_get_architecture_name>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_author_info<class_Engine_method_get_author_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_copyright_info<class_Engine_method_get_copyright_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_donor_info<class_Engine_method_get_donor_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_frames_per_second<class_Engine_method_get_frames_per_second>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_license_info<class_Engine_method_get_license_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_license_text<class_Engine_method_get_license_text>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MainLoop<class_MainLoop>` | :ref:`get_main_loop<class_Engine_method_get_main_loop>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_physics_frames<class_Engine_method_get_physics_frames>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_physics_interpolation_fraction<class_Engine_method_get_physics_interpolation_fraction>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_process_frames<class_Engine_method_get_process_frames>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`get_script_language<class_Engine_method_get_script_language>` **(** :ref:`int<class_int>` index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_script_language_count<class_Engine_method_get_script_language_count>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_singleton<class_Engine_method_get_singleton>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_singleton_list<class_Engine_method_get_singleton_list>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_version_info<class_Engine_method_get_version_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_write_movie_path<class_Engine_method_get_write_movie_path>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_singleton<class_Engine_method_has_singleton>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_editor_hint<class_Engine_method_is_editor_hint>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_in_physics_frame<class_Engine_method_is_in_physics_frame>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`register_script_language<class_Engine_method_register_script_language>` **(** :ref:`ScriptLanguage<class_ScriptLanguage>` language **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_singleton<class_Engine_method_register_singleton>` **(** :ref:`StringName<class_StringName>` name, :ref:`Object<class_Object>` instance **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`unregister_script_language<class_Engine_method_unregister_script_language>` **(** :ref:`ScriptLanguage<class_ScriptLanguage>` language **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unregister_singleton<class_Engine_method_unregister_singleton>` **(** :ref:`StringName<class_StringName>` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_architecture_name<class_Engine_method_get_architecture_name>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_author_info<class_Engine_method_get_author_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_copyright_info<class_Engine_method_get_copyright_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_donor_info<class_Engine_method_get_donor_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_frames_per_second<class_Engine_method_get_frames_per_second>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_license_info<class_Engine_method_get_license_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_license_text<class_Engine_method_get_license_text>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MainLoop<class_MainLoop>` | :ref:`get_main_loop<class_Engine_method_get_main_loop>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_physics_frames<class_Engine_method_get_physics_frames>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_physics_interpolation_fraction<class_Engine_method_get_physics_interpolation_fraction>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_frames<class_Engine_method_get_process_frames>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`get_script_language<class_Engine_method_get_script_language>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_script_language_count<class_Engine_method_get_script_language_count>`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_singleton<class_Engine_method_get_singleton>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_singleton_list<class_Engine_method_get_singleton_list>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_version_info<class_Engine_method_get_version_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_write_movie_path<class_Engine_method_get_write_movie_path>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_singleton<class_Engine_method_has_singleton>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_editor_hint<class_Engine_method_is_editor_hint>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_in_physics_frame<class_Engine_method_is_in_physics_frame>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`register_script_language<class_Engine_method_register_script_language>`\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_singleton<class_Engine_method_register_singleton>`\ (\ name\: :ref:`StringName<class_StringName>`, instance\: :ref:`Object<class_Object>`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`unregister_script_language<class_Engine_method_unregister_script_language>`\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_singleton<class_Engine_method_unregister_singleton>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,25 +116,27 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **max_fps** = ``0`` +:ref:`int<class_int>` **max_fps** = ``0`` :ref:`🔗<class_Engine_property_max_fps>` .. rst-class:: classref-property-setget -- void **set_max_fps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_fps** **(** **)** +- |void| **set_max_fps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_fps**\ (\ ) -The maximum number of frames per second that can be rendered. A value of ``0`` means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. +The maximum number of frames that can be rendered every second (FPS). A value of ``0`` means the framerate is uncapped. -Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices). +Limiting the FPS can be useful to reduce the host machine's power consumption, which reduces heat, noise emissions, and improves battery life. -If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled`` or ``Adaptive``, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. +If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Enabled** or **Adaptive**, the setting takes precedence and the max FPS number cannot exceed the monitor's refresh rate. -If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__. - -If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Disabled``, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. +If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__. See also :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` and :ref:`ProjectSettings.application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>`. +\ **Note:** The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project's logic and rendering. + +\ **Note:** If :ref:`ProjectSettings.display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is **Disabled**, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. + .. rst-class:: classref-item-separator ---- @@ -143,14 +145,16 @@ See also :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_ .. rst-class:: classref-property -:ref:`int<class_int>` **max_physics_steps_per_frame** = ``8`` +:ref:`int<class_int>` **max_physics_steps_per_frame** = ``8`` :ref:`🔗<class_Engine_property_max_physics_steps_per_frame>` .. rst-class:: classref-property-setget -- void **set_max_physics_steps_per_frame** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_physics_steps_per_frame** **(** **)** +- |void| **set_max_physics_steps_per_frame**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_physics_steps_per_frame**\ (\ ) -Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than ``1 / max_physics_steps_per_frame`` of :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`. This occurs even if ``delta`` is consistently used in physics calculations. To avoid this, increase :ref:`max_physics_steps_per_frame<class_Engine_property_max_physics_steps_per_frame>` if you have increased :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` significantly above its default value. +The maximum number of physics steps that can be simulated each rendered frame. + +\ **Note:** The default value is tuned to prevent expensive physics simulations from triggering even more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than ``1 / max_physics_steps_per_frame`` of :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`. This occurs even if ``delta`` is consistently used in physics calculations. To avoid this, increase :ref:`max_physics_steps_per_frame<class_Engine_property_max_physics_steps_per_frame>` if you have increased :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` significantly above its default value. .. rst-class:: classref-item-separator @@ -160,16 +164,18 @@ Controls the maximum number of physics steps that can be simulated each rendered .. rst-class:: classref-property -:ref:`float<class_float>` **physics_jitter_fix** = ``0.5`` +:ref:`float<class_float>` **physics_jitter_fix** = ``0.5`` :ref:`🔗<class_Engine_property_physics_jitter_fix>` .. rst-class:: classref-property-setget -- void **set_physics_jitter_fix** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_physics_jitter_fix** **(** **)** +- |void| **set_physics_jitter_fix**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_physics_jitter_fix**\ (\ ) + +How much physics ticks are synchronized with real time. If ``0`` or less, the ticks are fully synchronized. Higher values cause the in-game clock to deviate more from the real clock, but they smooth out framerate jitters. -Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. +\ **Note:** The default value of ``0.5`` should be good enough for most cases; values above ``2`` could cause the game to react to dropped frames with a noticeable delay and are not recommended. -\ **Note:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting :ref:`physics_jitter_fix<class_Engine_property_physics_jitter_fix>` to ``0``. +\ **Note:** When using a custom physics interpolation solution, or within a network game, it's recommended to disable the physics jitter fix by setting this property to ``0``. .. rst-class:: classref-item-separator @@ -179,14 +185,14 @@ Controls how much physics ticks are synchronized with real time. For 0 or less, .. rst-class:: classref-property -:ref:`int<class_int>` **physics_ticks_per_second** = ``60`` +:ref:`int<class_int>` **physics_ticks_per_second** = ``60`` :ref:`🔗<class_Engine_property_physics_ticks_per_second>` .. rst-class:: classref-property-setget -- void **set_physics_ticks_per_second** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_physics_ticks_per_second** **(** **)** +- |void| **set_physics_ticks_per_second**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_physics_ticks_per_second**\ (\ ) -The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process<class_Node_method__physics_process>` methods are run. This value should generally always be set to ``60`` or above, as Godot doesn't interpolate the physics step. As a result, values lower than ``60`` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also :ref:`max_fps<class_Engine_property_max_fps>` and :ref:`ProjectSettings.physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`. +The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process<class_Node_private_method__physics_process>` methods are run. This value should generally always be set to ``60`` or above, as Godot doesn't interpolate the physics step. As a result, values lower than ``60`` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also :ref:`max_fps<class_Engine_property_max_fps>` and :ref:`ProjectSettings.physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`. \ **Note:** Only :ref:`max_physics_steps_per_frame<class_Engine_property_max_physics_steps_per_frame>` physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if ``delta`` is used consistently in physics calculations). Therefore, it is recommended to also increase :ref:`max_physics_steps_per_frame<class_Engine_property_max_physics_steps_per_frame>` if increasing :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` significantly above its default value. @@ -198,19 +204,19 @@ The number of fixed iterations per second. This controls how often physics simul .. rst-class:: classref-property -:ref:`bool<class_bool>` **print_error_messages** = ``true`` +:ref:`bool<class_bool>` **print_error_messages** = ``true`` :ref:`🔗<class_Engine_property_print_error_messages>` .. rst-class:: classref-property-setget -- void **set_print_error_messages** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_printing_error_messages** **(** **)** +- |void| **set_print_error_messages**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_printing_error_messages**\ (\ ) If ``false``, stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the :ref:`ProjectSettings.application/run/disable_stderr<class_ProjectSettings_property_application/run/disable_stderr>` project setting. -\ **Warning:** If you set this to ``false`` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to ``false`` in a ``@tool`` script, this will also impact the editor itself. Do *not* report bugs before ensuring error messages are enabled (as they are by default). - \ **Note:** This property does not impact the editor's Errors tab when running a project from the editor. +\ **Warning:** If set to ``false`` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. In a ``@tool`` script, this will also impact the editor itself. Do *not* report bugs before ensuring error messages are enabled (as they are by default). + .. rst-class:: classref-item-separator ---- @@ -219,14 +225,22 @@ If ``false``, stops printing error and warning messages to the console and edito .. rst-class:: classref-property -:ref:`float<class_float>` **time_scale** = ``1.0`` +:ref:`float<class_float>` **time_scale** = ``1.0`` :ref:`🔗<class_Engine_property_time_scale>` .. rst-class:: classref-property-setget -- void **set_time_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_scale** **(** **)** +- |void| **set_time_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_scale**\ (\ ) + +The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to ``2.0`` the game runs twice as fast, and if set to ``0.5`` the game runs half as fast. + +This value affects :ref:`Timer<class_Timer>`, :ref:`SceneTreeTimer<class_SceneTreeTimer>`, and all other simulations that make use of ``delta`` time (such as :ref:`Node._process<class_Node_private_method__process>` and :ref:`Node._physics_process<class_Node_private_method__physics_process>`). + +\ **Note:** It's recommended to keep this property above ``0.0``, as the game may behave unexpectedly otherwise. -Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects :ref:`Timer<class_Timer>` and :ref:`SceneTreeTimer<class_SceneTreeTimer>` (see :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` for how to control this). +\ **Note:** This does not affect audio playback speed. Use :ref:`AudioServer.playback_speed_scale<class_AudioServer_property_playback_speed_scale>` to adjust audio playback speed independently of :ref:`time_scale<class_Engine_property_time_scale>`. + +\ **Note:** This does not automatically adjust :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`. With values above ``1.0`` physics simulation may become less precise, as each physics tick will stretch over a larger period of engine time. If you're modifying :ref:`time_scale<class_Engine_property_time_scale>` to speed up simulation by a large factor, consider also increasing :ref:`physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` to make the simulation more reliable. .. rst-class:: classref-section-separator @@ -241,11 +255,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_architecture_name** **(** **)** |const| +:ref:`String<class_String>` **get_architecture_name**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_architecture_name>` -Returns the name of the CPU architecture the Godot binary was built for. Possible return values are ``x86_64``, ``x86_32``, ``arm64``, ``arm32``, ``rv64``, ``riscv``, ``ppc64``, ``ppc``, ``wasm64`` and ``wasm32``. +Returns the name of the CPU architecture the Godot binary was built for. Possible return values include ``"x86_64"``, ``"x86_32"``, ``"arm64"``, ``"arm32"``, ``"rv64"``, ``"riscv"``, ``"ppc64"``, ``"ppc"``, ``"wasm64"``, and ``"wasm32"``. -To detect whether the current CPU architecture is 64-bit, you can use the fact that all 64-bit architecture names have ``64`` in their name: +To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain ``64`` in their name: .. tabs:: @@ -266,7 +280,7 @@ To detect whether the current CPU architecture is 64-bit, you can use the fact t -\ **Note:** :ref:`get_architecture_name<class_Engine_method_get_architecture_name>` does *not* return the name of the host CPU architecture. For example, if running an x86_32 Godot binary on a x86_64 system, the returned value will be ``x86_32``. +\ **Note:** This method does *not* return the name of the system's CPU architecture (like :ref:`OS.get_processor_name<class_OS_method_get_processor_name>`). For example, when running an ``x86_32`` Godot binary on an ``x86_64`` system, the returned value will still be ``"x86_32"``. .. rst-class:: classref-item-separator @@ -276,17 +290,9 @@ To detect whether the current CPU architecture is 64-bit, you can use the fact t .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_author_info** **(** **)** |const| - -Returns engine author information in a Dictionary. - -\ ``lead_developers`` - Array of Strings, lead developer names - -\ ``founders`` - Array of Strings, founder names - -\ ``project_managers`` - Array of Strings, project manager names +:ref:`Dictionary<class_Dictionary>` **get_author_info**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_author_info>` -\ ``developers`` - Array of Strings, developer names +Returns the engine author information as a :ref:`Dictionary<class_Dictionary>`, where each entry is an :ref:`Array<class_Array>` of strings with the names of notable contributors to the Godot Engine: ``lead_developers``, ``founders``, ``project_managers``, and ``developers``. .. rst-class:: classref-item-separator @@ -296,13 +302,17 @@ Returns engine author information in a Dictionary. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_copyright_info** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_copyright_info**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_copyright_info>` -Returns an Array of copyright information Dictionaries. +Returns an :ref:`Array<class_Array>` of dictionaries with copyright information for every component of Godot's source code. -\ ``name`` - String, component name +Every :ref:`Dictionary<class_Dictionary>` contains a ``name`` identifier, and a ``parts`` array of dictionaries. It describes the component in detail with the following entries: -\ ``parts`` - Array of Dictionaries {``files``, ``copyright``, ``license``} describing subsections of the component +- ``files`` - :ref:`Array<class_Array>` of file paths from the source code affected by this component; + +- ``copyright`` - :ref:`Array<class_Array>` of owners of this component; + +- ``license`` - The license applied to this component (such as "`Expat <https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants>`__" or "`CC-BY-4.0 <https://creativecommons.org/licenses/by/4.0/>`__"). .. rst-class:: classref-item-separator @@ -312,9 +322,9 @@ Returns an Array of copyright information Dictionaries. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_donor_info** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_donor_info**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_donor_info>` -Returns a Dictionary of Arrays of donor names. +Returns a :ref:`Dictionary<class_Dictionary>` of categorized donor names. Each entry is an :ref:`Array<class_Array>` of strings: {``platinum_sponsors``, ``gold_sponsors``, ``silver_sponsors``, ``bronze_sponsors``, ``mini_sponsors``, ``gold_donors``, ``silver_donors``, ``bronze_donors``} @@ -326,9 +336,11 @@ Returns a Dictionary of Arrays of donor names. .. rst-class:: classref-method -:ref:`int<class_int>` **get_frames_drawn** **(** **)** +:ref:`int<class_int>` **get_frames_drawn**\ (\ ) :ref:`🔗<class_Engine_method_get_frames_drawn>` -Returns the total number of frames drawn. On headless platforms, or if the render loop is disabled with ``--disable-render-loop`` via command line, :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` always returns ``0``. See :ref:`get_process_frames<class_Engine_method_get_process_frames>`. +Returns the total number of frames drawn since the engine started. + +\ **Note:** On headless platforms, or if rendering is disabled with ``--disable-render-loop`` via command line, this method always returns ``0``. See also :ref:`get_process_frames<class_Engine_method_get_process_frames>`. .. rst-class:: classref-item-separator @@ -338,9 +350,9 @@ Returns the total number of frames drawn. On headless platforms, or if the rende .. rst-class:: classref-method -:ref:`float<class_float>` **get_frames_per_second** **(** **)** |const| +:ref:`float<class_float>` **get_frames_per_second**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_frames_per_second>` -Returns the frames per second of the running game. +Returns the average frames rendered every second (FPS), also known as the framerate. .. rst-class:: classref-item-separator @@ -350,9 +362,9 @@ Returns the frames per second of the running game. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_license_info** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_license_info**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_license_info>` -Returns Dictionary of licenses used by Godot and included third party components. +Returns a :ref:`Dictionary<class_Dictionary>` of licenses used by Godot and included third party components. Each entry is a license name (such as "`Expat <https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants>`__") and its associated text. .. rst-class:: classref-item-separator @@ -362,9 +374,9 @@ Returns Dictionary of licenses used by Godot and included third party components .. rst-class:: classref-method -:ref:`String<class_String>` **get_license_text** **(** **)** |const| +:ref:`String<class_String>` **get_license_text**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_license_text>` -Returns Godot license text. +Returns the full Godot license text. .. rst-class:: classref-item-separator @@ -374,9 +386,11 @@ Returns Godot license text. .. rst-class:: classref-method -:ref:`MainLoop<class_MainLoop>` **get_main_loop** **(** **)** |const| +:ref:`MainLoop<class_MainLoop>` **get_main_loop**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_main_loop>` + +Returns the instance of the :ref:`MainLoop<class_MainLoop>`. This is usually the main :ref:`SceneTree<class_SceneTree>` and is the same as :ref:`Node.get_tree<class_Node_method_get_tree>`. -Returns the main loop object (see :ref:`MainLoop<class_MainLoop>` and :ref:`SceneTree<class_SceneTree>`). +\ **Note:** The type instantiated as the main loop can changed with :ref:`ProjectSettings.application/run/main_loop_type<class_ProjectSettings_property_application/run/main_loop_type>`. .. rst-class:: classref-item-separator @@ -386,11 +400,11 @@ Returns the main loop object (see :ref:`MainLoop<class_MainLoop>` and :ref:`Scen .. rst-class:: classref-method -:ref:`int<class_int>` **get_physics_frames** **(** **)** |const| +:ref:`int<class_int>` **get_physics_frames**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_physics_frames>` -Returns the total number of frames passed since engine initialization which is advanced on each **physics frame**. See also :ref:`get_process_frames<class_Engine_method_get_process_frames>`. +Returns the total number of frames passed since the engine started. This number is increased every **physics frame**. See also :ref:`get_process_frames<class_Engine_method_get_process_frames>`. -\ :ref:`get_physics_frames<class_Engine_method_get_physics_frames>` can be used to run expensive logic less often without relying on a :ref:`Timer<class_Timer>`: +This method can be used to run expensive logic less often without relying on a :ref:`Timer<class_Timer>`: .. tabs:: @@ -399,7 +413,7 @@ Returns the total number of frames passed since engine initialization which is a func _physics_process(_delta): if Engine.get_physics_frames() % 2 == 0: - pass # Run expensive logic only once every 2 physics frames here. + pass # Run expensive logic only once every 2 physics frames here. .. code-tab:: csharp @@ -423,7 +437,7 @@ Returns the total number of frames passed since engine initialization which is a .. rst-class:: classref-method -:ref:`float<class_float>` **get_physics_interpolation_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_physics_interpolation_fraction**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_physics_interpolation_fraction>` Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation. @@ -435,11 +449,11 @@ Returns the fraction through the current physics tick we are at the time of rend .. rst-class:: classref-method -:ref:`int<class_int>` **get_process_frames** **(** **)** |const| +:ref:`int<class_int>` **get_process_frames**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_process_frames>` -Returns the total number of frames passed since engine initialization which is advanced on each **process frame**, regardless of whether the render loop is enabled. See also :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` and :ref:`get_physics_frames<class_Engine_method_get_physics_frames>`. +Returns the total number of frames passed since the engine started. This number is increased every **process frame**, regardless of whether the render loop is enabled. See also :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` and :ref:`get_physics_frames<class_Engine_method_get_physics_frames>`. -\ :ref:`get_process_frames<class_Engine_method_get_process_frames>` can be used to run expensive logic less often without relying on a :ref:`Timer<class_Timer>`: +This method can be used to run expensive logic less often without relying on a :ref:`Timer<class_Timer>`: .. tabs:: @@ -447,8 +461,8 @@ Returns the total number of frames passed since engine initialization which is a .. code-tab:: gdscript func _process(_delta): - if Engine.get_process_frames() % 2 == 0: - pass # Run expensive logic only once every 2 process (render) frames here. + if Engine.get_process_frames() % 5 == 0: + pass # Run expensive logic only once every 5 process (render) frames here. .. code-tab:: csharp @@ -456,9 +470,9 @@ Returns the total number of frames passed since engine initialization which is a { base._Process(delta); - if (Engine.GetProcessFrames() % 2 == 0) + if (Engine.GetProcessFrames() % 5 == 0) { - // Run expensive logic only once every 2 physics frames here. + // Run expensive logic only once every 5 process (render) frames here. } } @@ -472,9 +486,9 @@ Returns the total number of frames passed since engine initialization which is a .. rst-class:: classref-method -:ref:`ScriptLanguage<class_ScriptLanguage>` **get_script_language** **(** :ref:`int<class_int>` index **)** |const| +:ref:`ScriptLanguage<class_ScriptLanguage>` **get_script_language**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Engine_method_get_script_language>` -Returns an instance of a :ref:`ScriptLanguage<class_ScriptLanguage>` with the given index. +Returns an instance of a :ref:`ScriptLanguage<class_ScriptLanguage>` with the given ``index``. .. rst-class:: classref-item-separator @@ -484,7 +498,7 @@ Returns an instance of a :ref:`ScriptLanguage<class_ScriptLanguage>` with the gi .. rst-class:: classref-method -:ref:`int<class_int>` **get_script_language_count** **(** **)** +:ref:`int<class_int>` **get_script_language_count**\ (\ ) :ref:`🔗<class_Engine_method_get_script_language_count>` Returns the number of available script languages. Use with :ref:`get_script_language<class_Engine_method_get_script_language>`. @@ -496,9 +510,11 @@ Returns the number of available script languages. Use with :ref:`get_script_lang .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_singleton** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Object<class_Object>` **get_singleton**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Engine_method_get_singleton>` + +Returns the global singleton with the given ``name``, or ``null`` if it does not exist. Often used for plugins. See also :ref:`has_singleton<class_Engine_method_has_singleton>` and :ref:`get_singleton_list<class_Engine_method_get_singleton_list>`. -Returns a global singleton with given ``name``. Often used for plugins, e.g. GodotPayments. +\ **Note:** Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. .. rst-class:: classref-item-separator @@ -508,9 +524,9 @@ Returns a global singleton with given ``name``. Often used for plugins, e.g. God .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_singleton_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_singleton_list**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_singleton_list>` -Returns a list of available global singletons. +Returns a list of names of all available global singletons. See also :ref:`get_singleton<class_Engine_method_get_singleton>`. .. rst-class:: classref-item-separator @@ -520,49 +536,51 @@ Returns a list of available global singletons. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_version_info** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_version_info**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_version_info>` + +Returns the current engine version information as a :ref:`Dictionary<class_Dictionary>` containing the following entries: -Returns the current engine version information in a Dictionary. +- ``major`` - Major version number as an int; -\ ``major`` - Holds the major version number as an int +- ``minor`` - Minor version number as an int; -\ ``minor`` - Holds the minor version number as an int +- ``patch`` - Patch version number as an int; -\ ``patch`` - Holds the patch version number as an int +- ``hex`` - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below); -\ ``hex`` - Holds the full version number encoded as a hexadecimal int with one byte (2 places) per number (see example below) +- ``status`` - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String; -\ ``status`` - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String +- ``build`` - Build name (e.g. "custom_build") as a String; -\ ``build`` - Holds the build name (e.g. "custom_build") as a String +- ``hash`` - Full Git commit hash as a String; -\ ``hash`` - Holds the full Git commit hash as a String +- ``timestamp`` - Holds the Git commit date UNIX timestamp in seconds as an int, or ``0`` if unavailable; -\ ``year`` - Holds the year the version was released in as an int +- ``string`` - ``major``, ``minor``, ``patch``, ``status``, and ``build`` in a single String. -\ ``string`` - ``major`` + ``minor`` + ``patch`` + ``status`` + ``build`` in a single String +The ``hex`` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be ``0x03010C``. -The ``hex`` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be ``0x03010C``. **Note:** It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: +\ **Note:** The ``hex`` value is still an :ref:`int<class_int>` internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code: .. tabs:: .. code-tab:: gdscript - if Engine.get_version_info().hex >= 0x030200: - # Do things specific to version 3.2 or later + if Engine.get_version_info().hex >= 0x040100: + pass # Do things specific to version 4.1 or later. else: - # Do things specific to versions before 3.2 + pass # Do things specific to versions before 4.1. .. code-tab:: csharp - if ((int)Engine.GetVersionInfo()["hex"] >= 0x030200) + if ((int)Engine.GetVersionInfo()["hex"] >= 0x040100) { - // Do things specific to version 3.2 or later + // Do things specific to version 4.1 or later. } else { - // Do things specific to versions before 3.2 + // Do things specific to versions before 4.1. } @@ -575,9 +593,9 @@ The ``hex`` value is encoded as follows, from left to right: one byte for the ma .. rst-class:: classref-method -:ref:`String<class_String>` **get_write_movie_path** **(** **)** |const| +:ref:`String<class_String>` **get_write_movie_path**\ (\ ) |const| :ref:`🔗<class_Engine_method_get_write_movie_path>` -Returns the path to the :ref:`MovieWriter<class_MovieWriter>`'s output file, or an empty string if the engine wasn't started in Movie Maker mode. This path can be absolute or relative depending on how the user specified it. +Returns the path to the :ref:`MovieWriter<class_MovieWriter>`'s output file, or an empty string if the engine wasn't started in Movie Maker mode. The default path can be changed in :ref:`ProjectSettings.editor/movie_writer/movie_file<class_ProjectSettings_property_editor/movie_writer/movie_file>`. .. rst-class:: classref-item-separator @@ -587,9 +605,30 @@ Returns the path to the :ref:`MovieWriter<class_MovieWriter>`'s output file, or .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_singleton** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_singleton**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Engine_method_has_singleton>` + +Returns ``true`` if a singleton with the given ``name`` exists in the global scope. See also :ref:`get_singleton<class_Engine_method_get_singleton>`. + -Returns ``true`` if a singleton with given ``name`` exists in global scope. +.. tabs:: + + .. code-tab:: gdscript + + print(Engine.has_singleton("OS")) # Prints true + print(Engine.has_singleton("Engine")) # Prints true + print(Engine.has_singleton("AudioServer")) # Prints true + print(Engine.has_singleton("Unknown")) # Prints false + + .. code-tab:: csharp + + GD.Print(Engine.HasSingleton("OS")); // Prints true + GD.Print(Engine.HasSingleton("Engine")); // Prints true + GD.Print(Engine.HasSingleton("AudioServer")); // Prints true + GD.Print(Engine.HasSingleton("Unknown")); // Prints false + + + +\ **Note:** Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. .. rst-class:: classref-item-separator @@ -599,9 +638,9 @@ Returns ``true`` if a singleton with given ``name`` exists in global scope. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_editor_hint** **(** **)** |const| +:ref:`bool<class_bool>` **is_editor_hint**\ (\ ) |const| :ref:`🔗<class_Engine_method_is_editor_hint>` -Returns ``true`` if the script is currently running inside the editor, ``false`` otherwise. This is useful for ``@tool`` scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: +Returns ``true`` if the script is currently running inside the editor, otherwise returns ``false``. This is useful for ``@tool`` scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: .. tabs:: @@ -624,7 +663,7 @@ Returns ``true`` if the script is currently running inside the editor, ``false`` See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_editor>` in the documentation for more information. -\ **Note:** To detect whether the script is run from an editor *build* (e.g. when pressing :kbd:`F5`), use :ref:`OS.has_feature<class_OS_method_has_feature>` with the ``"editor"`` argument instead. ``OS.has_feature("editor")`` will evaluate to ``true`` both when the code is running in the editor and when running the project from the editor, but it will evaluate to ``false`` when the code is run from an exported project. +\ **Note:** To detect whether the script is running on an editor *build* (such as when pressing :kbd:`F5`), use :ref:`OS.has_feature<class_OS_method_has_feature>` with the ``"editor"`` argument instead. ``OS.has_feature("editor")`` evaluate to ``true`` both when the script is running in the editor and when running the project from the editor, but returns ``false`` when run from an exported project. .. rst-class:: classref-item-separator @@ -634,9 +673,22 @@ See :doc:`Running code in the editor <../tutorials/plugins/running_code_in_the_e .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_in_physics_frame** **(** **)** |const| +:ref:`bool<class_bool>` **is_in_physics_frame**\ (\ ) |const| :ref:`🔗<class_Engine_method_is_in_physics_frame>` -Returns ``true`` if the game is inside the fixed process and physics phase of the game loop. +Returns ``true`` if the engine is inside the fixed physics process step of the main loop. + +:: + + func _enter_tree(): + # Depending on when the node is added to the tree, + # prints either "true" or "false". + print(Engine.is_in_physics_frame()) + + func _process(delta): + print(Engine.is_in_physics_frame()) # Prints false + + func _physics_process(delta): + print(Engine.is_in_physics_frame()) # Prints true .. rst-class:: classref-item-separator @@ -646,17 +698,17 @@ Returns ``true`` if the game is inside the fixed process and physics phase of th .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **register_script_language** **(** :ref:`ScriptLanguage<class_ScriptLanguage>` language **)** +:ref:`Error<enum_@GlobalScope_Error>` **register_script_language**\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`\ ) :ref:`🔗<class_Engine_method_register_script_language>` Registers a :ref:`ScriptLanguage<class_ScriptLanguage>` instance to be available with ``ScriptServer``. Returns: -- :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success +- :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success; -- :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVAILABLE>` if ``ScriptServer`` has reached it limit and cannot register any new language +- :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVAILABLE>` if ``ScriptServer`` has reached the limit and cannot register any new language; -- :ref:`@GlobalScope.ERR_ALREADY_EXISTS<class_@GlobalScope_constant_ERR_ALREADY_EXISTS>` if ``ScriptServer`` already contains a language with similar extension/name/type +- :ref:`@GlobalScope.ERR_ALREADY_EXISTS<class_@GlobalScope_constant_ERR_ALREADY_EXISTS>` if ``ScriptServer`` already contains a language with similar extension/name/type. .. rst-class:: classref-item-separator @@ -666,9 +718,9 @@ Returns: .. rst-class:: classref-method -void **register_singleton** **(** :ref:`StringName<class_StringName>` name, :ref:`Object<class_Object>` instance **)** +|void| **register_singleton**\ (\ name\: :ref:`StringName<class_StringName>`, instance\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_Engine_method_register_singleton>` -Registers the given object as a singleton, globally available under ``name``. +Registers the given :ref:`Object<class_Object>` ``instance`` as a singleton, available globally under ``name``. Useful for plugins. .. rst-class:: classref-item-separator @@ -678,15 +730,15 @@ Registers the given object as a singleton, globally available under ``name``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **unregister_script_language** **(** :ref:`ScriptLanguage<class_ScriptLanguage>` language **)** +:ref:`Error<enum_@GlobalScope_Error>` **unregister_script_language**\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`\ ) :ref:`🔗<class_Engine_method_unregister_script_language>` Unregisters the :ref:`ScriptLanguage<class_ScriptLanguage>` instance from ``ScriptServer``. Returns: -- :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success +- :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success; -- :ref:`@GlobalScope.ERR_DOES_NOT_EXIST<class_@GlobalScope_constant_ERR_DOES_NOT_EXIST>` if the language is already not registered in ``ScriptServer`` +- :ref:`@GlobalScope.ERR_DOES_NOT_EXIST<class_@GlobalScope_constant_ERR_DOES_NOT_EXIST>` if the language is not registered in ``ScriptServer``. .. rst-class:: classref-item-separator @@ -696,9 +748,9 @@ Returns: .. rst-class:: classref-method -void **unregister_singleton** **(** :ref:`StringName<class_StringName>` name **)** +|void| **unregister_singleton**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Engine_method_unregister_singleton>` -Unregisters the singleton registered under ``name``. The singleton object is not freed. Only works with user-defined singletons created with :ref:`register_singleton<class_Engine_method_register_singleton>`. +Removes the singleton registered under ``name``. The singleton object is *not* freed. Only works with user-defined singletons registered with :ref:`register_singleton<class_Engine_method_register_singleton>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -707,3 +759,4 @@ Unregisters the singleton registered under ``name``. The singleton object is not .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_enginedebugger.rst b/classes/class_enginedebugger.rst index f0c828bbde0..28db4834587 100644 --- a/classes/class_enginedebugger.rst +++ b/classes/class_enginedebugger.rst @@ -29,29 +29,53 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_capture<class_EngineDebugger_method_has_capture>` **(** :ref:`StringName<class_StringName>` name **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_profiler<class_EngineDebugger_method_has_profiler>` **(** :ref:`StringName<class_StringName>` name **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_active<class_EngineDebugger_method_is_active>` **(** **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_profiling<class_EngineDebugger_method_is_profiling>` **(** :ref:`StringName<class_StringName>` name **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`profiler_add_frame_data<class_EngineDebugger_method_profiler_add_frame_data>` **(** :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`profiler_enable<class_EngineDebugger_method_profiler_enable>` **(** :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_message_capture<class_EngineDebugger_method_register_message_capture>` **(** :ref:`StringName<class_StringName>` name, :ref:`Callable<class_Callable>` callable **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_profiler<class_EngineDebugger_method_register_profiler>` **(** :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`send_message<class_EngineDebugger_method_send_message>` **(** :ref:`String<class_String>` message, :ref:`Array<class_Array>` data **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unregister_message_capture<class_EngineDebugger_method_unregister_message_capture>` **(** :ref:`StringName<class_StringName>` name **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unregister_profiler<class_EngineDebugger_method_unregister_profiler>` **(** :ref:`StringName<class_StringName>` name **)** | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_breakpoints<class_EngineDebugger_method_clear_breakpoints>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`debug<class_EngineDebugger_method_debug>`\ (\ can_continue\: :ref:`bool<class_bool>` = true, is_error_breakpoint\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_depth<class_EngineDebugger_method_get_depth>`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_lines_left<class_EngineDebugger_method_get_lines_left>`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_capture<class_EngineDebugger_method_has_capture>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_profiler<class_EngineDebugger_method_has_profiler>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_breakpoint<class_EngineDebugger_method_insert_breakpoint>`\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_active<class_EngineDebugger_method_is_active>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_breakpoint<class_EngineDebugger_method_is_breakpoint>`\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_profiling<class_EngineDebugger_method_is_profiling>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_skipping_breakpoints<class_EngineDebugger_method_is_skipping_breakpoints>`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`line_poll<class_EngineDebugger_method_line_poll>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`profiler_add_frame_data<class_EngineDebugger_method_profiler_add_frame_data>`\ (\ name\: :ref:`StringName<class_StringName>`, data\: :ref:`Array<class_Array>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`profiler_enable<class_EngineDebugger_method_profiler_enable>`\ (\ name\: :ref:`StringName<class_StringName>`, enable\: :ref:`bool<class_bool>`, arguments\: :ref:`Array<class_Array>` = []\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_message_capture<class_EngineDebugger_method_register_message_capture>`\ (\ name\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_profiler<class_EngineDebugger_method_register_profiler>`\ (\ name\: :ref:`StringName<class_StringName>`, profiler\: :ref:`EngineProfiler<class_EngineProfiler>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_breakpoint<class_EngineDebugger_method_remove_breakpoint>`\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`script_debug<class_EngineDebugger_method_script_debug>`\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`, can_continue\: :ref:`bool<class_bool>` = true, is_error_breakpoint\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`send_message<class_EngineDebugger_method_send_message>`\ (\ message\: :ref:`String<class_String>`, data\: :ref:`Array<class_Array>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_depth<class_EngineDebugger_method_set_depth>`\ (\ depth\: :ref:`int<class_int>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_lines_left<class_EngineDebugger_method_set_lines_left>`\ (\ lines\: :ref:`int<class_int>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_message_capture<class_EngineDebugger_method_unregister_message_capture>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_profiler<class_EngineDebugger_method_unregister_profiler>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,11 +86,63 @@ Methods Method Descriptions ------------------- +.. _class_EngineDebugger_method_clear_breakpoints: + +.. rst-class:: classref-method + +|void| **clear_breakpoints**\ (\ ) :ref:`🔗<class_EngineDebugger_method_clear_breakpoints>` + +Clears all breakpoints. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_debug: + +.. rst-class:: classref-method + +|void| **debug**\ (\ can_continue\: :ref:`bool<class_bool>` = true, is_error_breakpoint\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EngineDebugger_method_debug>` + +Starts a debug break in script execution, optionally specifying whether the program can continue based on ``can_continue`` and whether the break was due to a breakpoint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_get_depth: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_depth**\ (\ ) |const| :ref:`🔗<class_EngineDebugger_method_get_depth>` + +**Experimental:** This method may be changed or removed in future versions. + +Returns the current debug depth. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_get_lines_left: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_lines_left**\ (\ ) |const| :ref:`🔗<class_EngineDebugger_method_get_lines_left>` + +**Experimental:** This method may be changed or removed in future versions. + +Returns the number of lines that remain. + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_has_capture: .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_capture** **(** :ref:`StringName<class_StringName>` name **)** +:ref:`bool<class_bool>` **has_capture**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_has_capture>` Returns ``true`` if a capture with the given name is present otherwise ``false``. @@ -78,7 +154,7 @@ Returns ``true`` if a capture with the given name is present otherwise ``false`` .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_profiler** **(** :ref:`StringName<class_StringName>` name **)** +:ref:`bool<class_bool>` **has_profiler**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_has_profiler>` Returns ``true`` if a profiler with the given name is present otherwise ``false``. @@ -86,11 +162,23 @@ Returns ``true`` if a profiler with the given name is present otherwise ``false` ---- +.. _class_EngineDebugger_method_insert_breakpoint: + +.. rst-class:: classref-method + +|void| **insert_breakpoint**\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_insert_breakpoint>` + +Inserts a new breakpoint with the given ``source`` and ``line``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_is_active: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_active** **(** **)** +:ref:`bool<class_bool>` **is_active**\ (\ ) :ref:`🔗<class_EngineDebugger_method_is_active>` Returns ``true`` if the debugger is active otherwise ``false``. @@ -98,11 +186,23 @@ Returns ``true`` if the debugger is active otherwise ``false``. ---- +.. _class_EngineDebugger_method_is_breakpoint: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_breakpoint**\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_EngineDebugger_method_is_breakpoint>` + +Returns ``true`` if the given ``source`` and ``line`` represent an existing breakpoint. + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_is_profiling: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_profiling** **(** :ref:`StringName<class_StringName>` name **)** +:ref:`bool<class_bool>` **is_profiling**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_is_profiling>` Returns ``true`` if a profiler with the given name is present and active otherwise ``false``. @@ -110,11 +210,35 @@ Returns ``true`` if a profiler with the given name is present and active otherwi ---- +.. _class_EngineDebugger_method_is_skipping_breakpoints: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_skipping_breakpoints**\ (\ ) |const| :ref:`🔗<class_EngineDebugger_method_is_skipping_breakpoints>` + +Returns ``true`` if the debugger is skipping breakpoints otherwise ``false``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_line_poll: + +.. rst-class:: classref-method + +|void| **line_poll**\ (\ ) :ref:`🔗<class_EngineDebugger_method_line_poll>` + +Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_profiler_add_frame_data: .. rst-class:: classref-method -void **profiler_add_frame_data** **(** :ref:`StringName<class_StringName>` name, :ref:`Array<class_Array>` data **)** +|void| **profiler_add_frame_data**\ (\ name\: :ref:`StringName<class_StringName>`, data\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_EngineDebugger_method_profiler_add_frame_data>` Calls the ``add`` callable of the profiler with given ``name`` and ``data``. @@ -126,7 +250,7 @@ Calls the ``add`` callable of the profiler with given ``name`` and ``data``. .. rst-class:: classref-method -void **profiler_enable** **(** :ref:`StringName<class_StringName>` name, :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` arguments=[] **)** +|void| **profiler_enable**\ (\ name\: :ref:`StringName<class_StringName>`, enable\: :ref:`bool<class_bool>`, arguments\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_EngineDebugger_method_profiler_enable>` Calls the ``toggle`` callable of the profiler with given ``name`` and ``arguments``. Enables/Disables the same profiler depending on ``enable`` argument. @@ -138,7 +262,7 @@ Calls the ``toggle`` callable of the profiler with given ``name`` and ``argument .. rst-class:: classref-method -void **register_message_capture** **(** :ref:`StringName<class_StringName>` name, :ref:`Callable<class_Callable>` callable **)** +|void| **register_message_capture**\ (\ name\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EngineDebugger_method_register_message_capture>` Registers a message capture with given ``name``. If ``name`` is "my_message" then messages starting with "my_message:" will be called with the given callable. @@ -152,7 +276,7 @@ Callable must accept a message string and a data array as argument. If the messa .. rst-class:: classref-method -void **register_profiler** **(** :ref:`StringName<class_StringName>` name, :ref:`EngineProfiler<class_EngineProfiler>` profiler **)** +|void| **register_profiler**\ (\ name\: :ref:`StringName<class_StringName>`, profiler\: :ref:`EngineProfiler<class_EngineProfiler>`\ ) :ref:`🔗<class_EngineDebugger_method_register_profiler>` Registers a profiler with the given ``name``. See :ref:`EngineProfiler<class_EngineProfiler>` for more information. @@ -160,11 +284,35 @@ Registers a profiler with the given ``name``. See :ref:`EngineProfiler<class_Eng ---- +.. _class_EngineDebugger_method_remove_breakpoint: + +.. rst-class:: classref-method + +|void| **remove_breakpoint**\ (\ line\: :ref:`int<class_int>`, source\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_remove_breakpoint>` + +Removes a breakpoint with the given ``source`` and ``line``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_script_debug: + +.. rst-class:: classref-method + +|void| **script_debug**\ (\ language\: :ref:`ScriptLanguage<class_ScriptLanguage>`, can_continue\: :ref:`bool<class_bool>` = true, is_error_breakpoint\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EngineDebugger_method_script_debug>` + +Starts a debug break in script execution, optionally specifying whether the program can continue based on ``can_continue`` and whether the break was due to a breakpoint. + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_send_message: .. rst-class:: classref-method -void **send_message** **(** :ref:`String<class_String>` message, :ref:`Array<class_Array>` data **)** +|void| **send_message**\ (\ message\: :ref:`String<class_String>`, data\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_EngineDebugger_method_send_message>` Sends a message with given ``message`` and ``data`` array. @@ -172,11 +320,39 @@ Sends a message with given ``message`` and ``data`` array. ---- +.. _class_EngineDebugger_method_set_depth: + +.. rst-class:: classref-method + +|void| **set_depth**\ (\ depth\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EngineDebugger_method_set_depth>` + +**Experimental:** This method may be changed or removed in future versions. + +Sets the current debugging depth. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EngineDebugger_method_set_lines_left: + +.. rst-class:: classref-method + +|void| **set_lines_left**\ (\ lines\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EngineDebugger_method_set_lines_left>` + +**Experimental:** This method may be changed or removed in future versions. + +Sets the current debugging lines that remain. + +.. rst-class:: classref-item-separator + +---- + .. _class_EngineDebugger_method_unregister_message_capture: .. rst-class:: classref-method -void **unregister_message_capture** **(** :ref:`StringName<class_StringName>` name **)** +|void| **unregister_message_capture**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_unregister_message_capture>` Unregisters the message capture with given ``name``. @@ -188,7 +364,7 @@ Unregisters the message capture with given ``name``. .. rst-class:: classref-method -void **unregister_profiler** **(** :ref:`StringName<class_StringName>` name **)** +|void| **unregister_profiler**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_EngineDebugger_method_unregister_profiler>` Unregisters a profiler with given ``name``. @@ -199,3 +375,4 @@ Unregisters a profiler with given ``name``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_engineprofiler.rst b/classes/class_engineprofiler.rst index 41832afc135..faab1d5fd76 100644 --- a/classes/class_engineprofiler.rst +++ b/classes/class_engineprofiler.rst @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_frame<class_EngineProfiler_method__add_frame>` **(** :ref:`Array<class_Array>` data **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tick<class_EngineProfiler_method__tick>` **(** :ref:`float<class_float>` frame_time, :ref:`float<class_float>` process_time, :ref:`float<class_float>` physics_time, :ref:`float<class_float>` physics_frame_time **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_toggle<class_EngineProfiler_method__toggle>` **(** :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` options **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_frame<class_EngineProfiler_private_method__add_frame>`\ (\ data\: :ref:`Array<class_Array>`\ ) |virtual| | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tick<class_EngineProfiler_private_method__tick>`\ (\ frame_time\: :ref:`float<class_float>`, process_time\: :ref:`float<class_float>`, physics_time\: :ref:`float<class_float>`, physics_frame_time\: :ref:`float<class_float>`\ ) |virtual| | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_toggle<class_EngineProfiler_private_method__toggle>`\ (\ enable\: :ref:`bool<class_bool>`, options\: :ref:`Array<class_Array>`\ ) |virtual| | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,11 +48,11 @@ Methods Method Descriptions ------------------- -.. _class_EngineProfiler_method__add_frame: +.. _class_EngineProfiler_private_method__add_frame: .. rst-class:: classref-method -void **_add_frame** **(** :ref:`Array<class_Array>` data **)** |virtual| +|void| **_add_frame**\ (\ data\: :ref:`Array<class_Array>`\ ) |virtual| :ref:`🔗<class_EngineProfiler_private_method__add_frame>` Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_frame_data<class_EngineDebugger_method_profiler_add_frame_data>`. @@ -60,11 +60,11 @@ Called when data is added to profiler using :ref:`EngineDebugger.profiler_add_fr ---- -.. _class_EngineProfiler_method__tick: +.. _class_EngineProfiler_private_method__tick: .. rst-class:: classref-method -void **_tick** **(** :ref:`float<class_float>` frame_time, :ref:`float<class_float>` process_time, :ref:`float<class_float>` physics_time, :ref:`float<class_float>` physics_frame_time **)** |virtual| +|void| **_tick**\ (\ frame_time\: :ref:`float<class_float>`, process_time\: :ref:`float<class_float>`, physics_time\: :ref:`float<class_float>`, physics_frame_time\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_EngineProfiler_private_method__tick>` Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. @@ -72,11 +72,11 @@ Called once every engine iteration when the profiler is active with information ---- -.. _class_EngineProfiler_method__toggle: +.. _class_EngineProfiler_private_method__toggle: .. rst-class:: classref-method -void **_toggle** **(** :ref:`bool<class_bool>` enable, :ref:`Array<class_Array>` options **)** |virtual| +|void| **_toggle**\ (\ enable\: :ref:`bool<class_bool>`, options\: :ref:`Array<class_Array>`\ ) |virtual| :ref:`🔗<class_EngineProfiler_private_method__toggle>` Called when the profiler is enabled/disabled, along with a set of ``options``. @@ -87,3 +87,4 @@ Called when the profiler is enabled/disabled, along with a set of ``options``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_environment.rst b/classes/class_environment.rst index 2eceb95b333..29a36fa9bb1 100644 --- a/classes/class_environment.rst +++ b/classes/class_environment.rst @@ -36,13 +36,11 @@ Tutorials - :doc:`Environment and post-processing <../tutorials/3d/environment_and_post_processing>` -- :doc:`Light transport in game engines <../tutorials/3d/high_dynamic_range>` +- :doc:`High dynamic range lighting <../tutorials/3d/high_dynamic_range>` -- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__ +- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__ -- `2D HDR Demo <https://godotengine.org/asset-library/asset/110>`__ - -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -87,6 +85,12 @@ Properties +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`float<class_float>` | :ref:`fog_density<class_Environment_property_fog_density>` | ``0.01`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float<class_float>` | :ref:`fog_depth_begin<class_Environment_property_fog_depth_begin>` | ``10.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float<class_float>` | :ref:`fog_depth_curve<class_Environment_property_fog_depth_curve>` | ``1.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float<class_float>` | :ref:`fog_depth_end<class_Environment_property_fog_depth_end>` | ``100.0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`bool<class_bool>` | :ref:`fog_enabled<class_Environment_property_fog_enabled>` | ``false`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`float<class_float>` | :ref:`fog_height<class_Environment_property_fog_height>` | ``0.0`` | @@ -97,6 +101,8 @@ Properties +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`float<class_float>` | :ref:`fog_light_energy<class_Environment_property_fog_light_energy>` | ``1.0`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`FogMode<enum_Environment_FogMode>` | :ref:`fog_mode<class_Environment_property_fog_mode>` | ``0`` | + +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`float<class_float>` | :ref:`fog_sky_affect<class_Environment_property_fog_sky_affect>` | ``1.0`` | +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`float<class_float>` | :ref:`fog_sun_scatter<class_Environment_property_fog_sun_scatter>` | ``0.0`` | @@ -250,11 +256,11 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glow_level<class_Environment_method_set_glow_level>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_glow_level<class_Environment_method_get_glow_level>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glow_level<class_Environment_method_set_glow_level>`\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -269,7 +275,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BGMode**: +enum **BGMode**: :ref:`🔗<enum_Environment_BGMode>` .. _class_Environment_constant_BG_CLEAR_COLOR: @@ -335,7 +341,7 @@ Represents the size of the :ref:`BGMode<enum_Environment_BGMode>` enum. .. rst-class:: classref-enumeration -enum **AmbientSource**: +enum **AmbientSource**: :ref:`🔗<enum_Environment_AmbientSource>` .. _class_Environment_constant_AMBIENT_SOURCE_BG: @@ -377,7 +383,7 @@ Gather ambient light from the :ref:`Sky<class_Sky>` regardless of what the backg .. rst-class:: classref-enumeration -enum **ReflectionSource**: +enum **ReflectionSource**: :ref:`🔗<enum_Environment_ReflectionSource>` .. _class_Environment_constant_REFLECTION_SOURCE_BG: @@ -411,7 +417,7 @@ Use the :ref:`Sky<class_Sky>` for reflections regardless of what the background .. rst-class:: classref-enumeration -enum **ToneMapper**: +enum **ToneMapper**: :ref:`🔗<enum_Environment_ToneMapper>` .. _class_Environment_constant_TONE_MAPPER_LINEAR: @@ -455,7 +461,7 @@ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensiv .. rst-class:: classref-enumeration -enum **GlowBlendMode**: +enum **GlowBlendMode**: :ref:`🔗<enum_Environment_GlowBlendMode>` .. _class_Environment_constant_GLOW_BLEND_MODE_ADDITIVE: @@ -501,11 +507,37 @@ Mixes the glow with the underlying color to avoid increasing brightness as much ---- +.. _enum_Environment_FogMode: + +.. rst-class:: classref-enumeration + +enum **FogMode**: :ref:`🔗<enum_Environment_FogMode>` + +.. _class_Environment_constant_FOG_MODE_EXPONENTIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_EXPONENTIAL** = ``0`` + +Use a physically-based fog model defined primarily by fog density. + +.. _class_Environment_constant_FOG_MODE_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`FogMode<enum_Environment_FogMode>` **FOG_MODE_DEPTH** = ``1`` + +Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. + +.. rst-class:: classref-item-separator + +---- + .. _enum_Environment_SDFGIYScale: .. rst-class:: classref-enumeration -enum **SDFGIYScale**: +enum **SDFGIYScale**: :ref:`🔗<enum_Environment_SDFGIYScale>` .. _class_Environment_constant_SDFGI_Y_SCALE_50_PERCENT: @@ -544,14 +576,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **adjustment_brightness** = ``1.0`` +:ref:`float<class_float>` **adjustment_brightness** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_brightness>` .. rst-class:: classref-property-setget -- void **set_adjustment_brightness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_adjustment_brightness** **(** **)** +- |void| **set_adjustment_brightness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_adjustment_brightness**\ (\ ) -The global brightness value of the rendered scene. Effective only if ``adjustment_enabled`` is ``true``. +The global brightness value of the rendered scene. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``. .. rst-class:: classref-item-separator @@ -561,14 +593,14 @@ The global brightness value of the rendered scene. Effective only if ``adjustmen .. rst-class:: classref-property -:ref:`Texture<class_Texture>` **adjustment_color_correction** +:ref:`Texture<class_Texture>` **adjustment_color_correction** :ref:`🔗<class_Environment_property_adjustment_color_correction>` .. rst-class:: classref-property-setget -- void **set_adjustment_color_correction** **(** :ref:`Texture<class_Texture>` value **)** -- :ref:`Texture<class_Texture>` **get_adjustment_color_correction** **(** **)** +- |void| **set_adjustment_color_correction**\ (\ value\: :ref:`Texture<class_Texture>`\ ) +- :ref:`Texture<class_Texture>` **get_adjustment_color_correction**\ (\ ) -The :ref:`Texture2D<class_Texture2D>` or :ref:`Texture3D<class_Texture3D>` lookup table (LUT) to use for the built-in post-process color grading. Can use a :ref:`GradientTexture1D<class_GradientTexture1D>` for a 1-dimensional LUT, or a :ref:`Texture3D<class_Texture3D>` for a more complex LUT. Effective only if ``adjustment_enabled`` is ``true``. +The :ref:`Texture2D<class_Texture2D>` or :ref:`Texture3D<class_Texture3D>` lookup table (LUT) to use for the built-in post-process color grading. Can use a :ref:`GradientTexture1D<class_GradientTexture1D>` for a 1-dimensional LUT, or a :ref:`Texture3D<class_Texture3D>` for a more complex LUT. Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``. .. rst-class:: classref-item-separator @@ -578,14 +610,14 @@ The :ref:`Texture2D<class_Texture2D>` or :ref:`Texture3D<class_Texture3D>` looku .. rst-class:: classref-property -:ref:`float<class_float>` **adjustment_contrast** = ``1.0`` +:ref:`float<class_float>` **adjustment_contrast** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_contrast>` .. rst-class:: classref-property-setget -- void **set_adjustment_contrast** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_adjustment_contrast** **(** **)** +- |void| **set_adjustment_contrast**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_adjustment_contrast**\ (\ ) -The global contrast value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. +The global contrast value of the rendered scene (default value is 1). Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``. .. rst-class:: classref-item-separator @@ -595,17 +627,15 @@ The global contrast value of the rendered scene (default value is 1). Effective .. rst-class:: classref-property -:ref:`bool<class_bool>` **adjustment_enabled** = ``false`` +:ref:`bool<class_bool>` **adjustment_enabled** = ``false`` :ref:`🔗<class_Environment_property_adjustment_enabled>` .. rst-class:: classref-property-setget -- void **set_adjustment_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_adjustment_enabled** **(** **)** +- |void| **set_adjustment_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_adjustment_enabled**\ (\ ) If ``true``, enables the ``adjustment_*`` properties provided by this resource. If ``false``, modifications to the ``adjustment_*`` properties will have no effect on the rendered scene. -\ **Note:** Adjustments are only supported in the Forward+ and Mobile rendering methods, not Compatibility. - .. rst-class:: classref-item-separator ---- @@ -614,14 +644,14 @@ If ``true``, enables the ``adjustment_*`` properties provided by this resource. .. rst-class:: classref-property -:ref:`float<class_float>` **adjustment_saturation** = ``1.0`` +:ref:`float<class_float>` **adjustment_saturation** = ``1.0`` :ref:`🔗<class_Environment_property_adjustment_saturation>` .. rst-class:: classref-property-setget -- void **set_adjustment_saturation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_adjustment_saturation** **(** **)** +- |void| **set_adjustment_saturation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_adjustment_saturation**\ (\ ) -The global color saturation value of the rendered scene (default value is 1). Effective only if ``adjustment_enabled`` is ``true``. +The global color saturation value of the rendered scene (default value is 1). Effective only if :ref:`adjustment_enabled<class_Environment_property_adjustment_enabled>` is ``true``. .. rst-class:: classref-item-separator @@ -631,12 +661,12 @@ The global color saturation value of the rendered scene (default value is 1). Ef .. rst-class:: classref-property -:ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **ambient_light_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_ambient_light_color>` .. rst-class:: classref-property-setget -- void **set_ambient_light_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_ambient_light_color** **(** **)** +- |void| **set_ambient_light_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_ambient_light_color**\ (\ ) The ambient light's :ref:`Color<class_Color>`. Only effective if :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is lower than ``1.0`` (exclusive). @@ -648,12 +678,12 @@ The ambient light's :ref:`Color<class_Color>`. Only effective if :ref:`ambient_l .. rst-class:: classref-property -:ref:`float<class_float>` **ambient_light_energy** = ``1.0`` +:ref:`float<class_float>` **ambient_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_energy>` .. rst-class:: classref-property-setget -- void **set_ambient_light_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ambient_light_energy** **(** **)** +- |void| **set_ambient_light_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ambient_light_energy**\ (\ ) The ambient light's energy. The higher the value, the stronger the light. Only effective if :ref:`ambient_light_sky_contribution<class_Environment_property_ambient_light_sky_contribution>` is lower than ``1.0`` (exclusive). @@ -665,12 +695,12 @@ The ambient light's energy. The higher the value, the stronger the light. Only e .. rst-class:: classref-property -:ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0`` +:ref:`float<class_float>` **ambient_light_sky_contribution** = ``1.0`` :ref:`🔗<class_Environment_property_ambient_light_sky_contribution>` .. rst-class:: classref-property-setget -- void **set_ambient_light_sky_contribution** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ambient_light_sky_contribution** **(** **)** +- |void| **set_ambient_light_sky_contribution**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ambient_light_sky_contribution**\ (\ ) Defines the amount of light that the sky brings on the scene. A value of ``0.0`` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of ``1.0`` means that *all* the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. @@ -684,12 +714,12 @@ Defines the amount of light that the sky brings on the scene. A value of ``0.0`` .. rst-class:: classref-property -:ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0`` +:ref:`AmbientSource<enum_Environment_AmbientSource>` **ambient_light_source** = ``0`` :ref:`🔗<class_Environment_property_ambient_light_source>` .. rst-class:: classref-property-setget -- void **set_ambient_source** **(** :ref:`AmbientSource<enum_Environment_AmbientSource>` value **)** -- :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source** **(** **)** +- |void| **set_ambient_source**\ (\ value\: :ref:`AmbientSource<enum_Environment_AmbientSource>`\ ) +- :ref:`AmbientSource<enum_Environment_AmbientSource>` **get_ambient_source**\ (\ ) The ambient light source to use for rendering materials and global illumination. @@ -701,12 +731,12 @@ The ambient light source to use for rendering materials and global illumination. .. rst-class:: classref-property -:ref:`int<class_int>` **background_camera_feed_id** = ``1`` +:ref:`int<class_int>` **background_camera_feed_id** = ``1`` :ref:`🔗<class_Environment_property_background_camera_feed_id>` .. rst-class:: classref-property-setget -- void **set_camera_feed_id** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_camera_feed_id** **(** **)** +- |void| **set_camera_feed_id**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_camera_feed_id**\ (\ ) The ID of the camera feed to show in the background. @@ -718,12 +748,12 @@ The ID of the camera feed to show in the background. .. rst-class:: classref-property -:ref:`int<class_int>` **background_canvas_max_layer** = ``0`` +:ref:`int<class_int>` **background_canvas_max_layer** = ``0`` :ref:`🔗<class_Environment_property_background_canvas_max_layer>` .. rst-class:: classref-property-setget -- void **set_canvas_max_layer** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_canvas_max_layer** **(** **)** +- |void| **set_canvas_max_layer**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_canvas_max_layer**\ (\ ) The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS<class_Environment_constant_BG_CANVAS>` background mode. @@ -735,12 +765,12 @@ The maximum layer ID to display. Only effective when using the :ref:`BG_CANVAS<c .. rst-class:: classref-property -:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_background_color>` .. rst-class:: classref-property-setget -- void **set_bg_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_bg_color** **(** **)** +- |void| **set_bg_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_bg_color**\ (\ ) The :ref:`Color<class_Color>` displayed for clear areas of the scene. Only effective when using the :ref:`BG_COLOR<class_Environment_constant_BG_COLOR>` background mode. @@ -752,12 +782,12 @@ The :ref:`Color<class_Color>` displayed for clear areas of the scene. Only effec .. rst-class:: classref-property -:ref:`float<class_float>` **background_energy_multiplier** = ``1.0`` +:ref:`float<class_float>` **background_energy_multiplier** = ``1.0`` :ref:`🔗<class_Environment_property_background_energy_multiplier>` .. rst-class:: classref-property-setget -- void **set_bg_energy_multiplier** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bg_energy_multiplier** **(** **)** +- |void| **set_bg_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bg_energy_multiplier**\ (\ ) Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. @@ -769,12 +799,12 @@ Multiplier for background energy. Increase to make background brighter, decrease .. rst-class:: classref-property -:ref:`float<class_float>` **background_intensity** = ``30000.0`` +:ref:`float<class_float>` **background_intensity** = ``30000.0`` :ref:`🔗<class_Environment_property_background_intensity>` .. rst-class:: classref-property-setget -- void **set_bg_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bg_intensity** **(** **)** +- |void| **set_bg_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bg_intensity**\ (\ ) Luminance of background measured in nits (candela per square meter). Only used when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is enabled. The default value is roughly equivalent to the sky at midday. @@ -786,12 +816,12 @@ Luminance of background measured in nits (candela per square meter). Only used w .. rst-class:: classref-property -:ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0`` +:ref:`BGMode<enum_Environment_BGMode>` **background_mode** = ``0`` :ref:`🔗<class_Environment_property_background_mode>` .. rst-class:: classref-property-setget -- void **set_background** **(** :ref:`BGMode<enum_Environment_BGMode>` value **)** -- :ref:`BGMode<enum_Environment_BGMode>` **get_background** **(** **)** +- |void| **set_background**\ (\ value\: :ref:`BGMode<enum_Environment_BGMode>`\ ) +- :ref:`BGMode<enum_Environment_BGMode>` **get_background**\ (\ ) The background mode. See :ref:`BGMode<enum_Environment_BGMode>` for possible values. @@ -803,12 +833,12 @@ The background mode. See :ref:`BGMode<enum_Environment_BGMode>` for possible val .. rst-class:: classref-property -:ref:`float<class_float>` **fog_aerial_perspective** = ``0.0`` +:ref:`float<class_float>` **fog_aerial_perspective** = ``0.0`` :ref:`🔗<class_Environment_property_fog_aerial_perspective>` .. rst-class:: classref-property-setget -- void **set_fog_aerial_perspective** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_aerial_perspective** **(** **)** +- |void| **set_fog_aerial_perspective**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_aerial_perspective**\ (\ ) If set above ``0.0`` (exclusive), blends between the fog's color and the color of the background :ref:`Sky<class_Sky>`. This has a small performance cost when set above ``0.0``. Must have :ref:`background_mode<class_Environment_property_background_mode>` set to :ref:`BG_SKY<class_Environment_constant_BG_SKY>`. @@ -822,14 +852,69 @@ This is useful to simulate `aerial perspective <https://en.wikipedia.org/wiki/Ae .. rst-class:: classref-property -:ref:`float<class_float>` **fog_density** = ``0.01`` +:ref:`float<class_float>` **fog_density** = ``0.01`` :ref:`🔗<class_Environment_property_fog_density>` + +.. rst-class:: classref-property-setget + +- |void| **set_fog_density**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_density**\ (\ ) + +The fog density to be used. This is demonstrated in different ways depending on the :ref:`fog_mode<class_Environment_property_fog_mode>` mode chosen: + +\ **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life. + +\ **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At ``1.0`` the fog will fully obscure the scene, at ``0.0`` the fog will not be visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Environment_property_fog_depth_begin: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **fog_depth_begin** = ``10.0`` :ref:`🔗<class_Environment_property_fog_depth_begin>` + +.. rst-class:: classref-property-setget + +- |void| **set_fog_depth_begin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_depth_begin**\ (\ ) + +The fog's depth starting distance from the camera. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Environment_property_fog_depth_curve: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **fog_depth_curve** = ``1.0`` :ref:`🔗<class_Environment_property_fog_depth_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_fog_depth_curve**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_depth_curve**\ (\ ) + +The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Environment_property_fog_depth_end: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **fog_depth_end** = ``100.0`` :ref:`🔗<class_Environment_property_fog_depth_end>` .. rst-class:: classref-property-setget -- void **set_fog_density** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_density** **(** **)** +- |void| **set_fog_depth_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_depth_end**\ (\ ) -The *exponential* fog density to use. Higher values result in a more dense fog. Fog rendering is exponential as in real life. +The fog's depth end distance from the camera. If this value is set to ``0``, it will be equal to the current camera's :ref:`Camera3D.far<class_Camera3D_property_far>` value. Only available when :ref:`fog_mode<class_Environment_property_fog_mode>` is set to :ref:`FOG_MODE_DEPTH<class_Environment_constant_FOG_MODE_DEPTH>`. .. rst-class:: classref-item-separator @@ -839,12 +924,12 @@ The *exponential* fog density to use. Higher values result in a more dense fog. .. rst-class:: classref-property -:ref:`bool<class_bool>` **fog_enabled** = ``false`` +:ref:`bool<class_bool>` **fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_fog_enabled>` .. rst-class:: classref-property-setget -- void **set_fog_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_fog_enabled** **(** **)** +- |void| **set_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_fog_enabled**\ (\ ) If ``true``, fog effects are enabled. @@ -856,12 +941,12 @@ If ``true``, fog effects are enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **fog_height** = ``0.0`` +:ref:`float<class_float>` **fog_height** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height>` .. rst-class:: classref-property-setget -- void **set_fog_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_height** **(** **)** +- |void| **set_fog_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_height**\ (\ ) The height at which the height fog effect begins. @@ -873,12 +958,12 @@ The height at which the height fog effect begins. .. rst-class:: classref-property -:ref:`float<class_float>` **fog_height_density** = ``0.0`` +:ref:`float<class_float>` **fog_height_density** = ``0.0`` :ref:`🔗<class_Environment_property_fog_height_density>` .. rst-class:: classref-property-setget -- void **set_fog_height_density** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_height_density** **(** **)** +- |void| **set_fog_height_density**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_height_density**\ (\ ) The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. @@ -890,12 +975,12 @@ The density used to increase fog as height decreases. To make fog increase as he .. rst-class:: classref-property -:ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` +:ref:`Color<class_Color>` **fog_light_color** = ``Color(0.518, 0.553, 0.608, 1)`` :ref:`🔗<class_Environment_property_fog_light_color>` .. rst-class:: classref-property-setget -- void **set_fog_light_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_fog_light_color** **(** **)** +- |void| **set_fog_light_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_fog_light_color**\ (\ ) The fog's color. @@ -907,12 +992,12 @@ The fog's color. .. rst-class:: classref-property -:ref:`float<class_float>` **fog_light_energy** = ``1.0`` +:ref:`float<class_float>` **fog_light_energy** = ``1.0`` :ref:`🔗<class_Environment_property_fog_light_energy>` .. rst-class:: classref-property-setget -- void **set_fog_light_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_light_energy** **(** **)** +- |void| **set_fog_light_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_light_energy**\ (\ ) The fog's brightness. Higher values result in brighter fog. @@ -920,16 +1005,33 @@ The fog's brightness. Higher values result in brighter fog. ---- +.. _class_Environment_property_fog_mode: + +.. rst-class:: classref-property + +:ref:`FogMode<enum_Environment_FogMode>` **fog_mode** = ``0`` :ref:`🔗<class_Environment_property_fog_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_fog_mode**\ (\ value\: :ref:`FogMode<enum_Environment_FogMode>`\ ) +- :ref:`FogMode<enum_Environment_FogMode>` **get_fog_mode**\ (\ ) + +The fog mode. See :ref:`FogMode<enum_Environment_FogMode>` for possible values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Environment_property_fog_sky_affect: .. rst-class:: classref-property -:ref:`float<class_float>` **fog_sky_affect** = ``1.0`` +:ref:`float<class_float>` **fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_fog_sky_affect>` .. rst-class:: classref-property-setget -- void **set_fog_sky_affect** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_sky_affect** **(** **)** +- |void| **set_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_sky_affect**\ (\ ) The factor to use when affecting the sky with non-volumetric fog. ``1.0`` means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with ``0.0`` not affecting sky rendering at all. @@ -943,12 +1045,12 @@ The factor to use when affecting the sky with non-volumetric fog. ``1.0`` means .. rst-class:: classref-property -:ref:`float<class_float>` **fog_sun_scatter** = ``0.0`` +:ref:`float<class_float>` **fog_sun_scatter** = ``0.0`` :ref:`🔗<class_Environment_property_fog_sun_scatter>` .. rst-class:: classref-property-setget -- void **set_fog_sun_scatter** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fog_sun_scatter** **(** **)** +- |void| **set_fog_sun_scatter**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fog_sun_scatter**\ (\ ) If set above ``0.0``, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. @@ -960,15 +1062,17 @@ If set above ``0.0``, renders the scene's directional light(s) in the fog color .. rst-class:: classref-property -:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``2`` +:ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **glow_blend_mode** = ``2`` :ref:`🔗<class_Environment_property_glow_blend_mode>` .. rst-class:: classref-property-setget -- void **set_glow_blend_mode** **(** :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` value **)** -- :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode** **(** **)** +- |void| **set_glow_blend_mode**\ (\ value\: :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>`\ ) +- :ref:`GlowBlendMode<enum_Environment_GlowBlendMode>` **get_glow_blend_mode**\ (\ ) The glow blending mode. +\ **Note:** :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -977,12 +1081,12 @@ The glow blending mode. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_bloom** = ``0.0`` +:ref:`float<class_float>` **glow_bloom** = ``0.0`` :ref:`🔗<class_Environment_property_glow_bloom>` .. rst-class:: classref-property-setget -- void **set_glow_bloom** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_bloom** **(** **)** +- |void| **set_glow_bloom**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_bloom**\ (\ ) The bloom's intensity. If set to a value higher than ``0``, this will make glow visible in areas darker than the :ref:`glow_hdr_threshold<class_Environment_property_glow_hdr_threshold>`. @@ -994,16 +1098,18 @@ The bloom's intensity. If set to a value higher than ``0``, this will make glow .. rst-class:: classref-property -:ref:`bool<class_bool>` **glow_enabled** = ``false`` +:ref:`bool<class_bool>` **glow_enabled** = ``false`` :ref:`🔗<class_Environment_property_glow_enabled>` .. rst-class:: classref-property-setget -- void **set_glow_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_glow_enabled** **(** **)** +- |void| **set_glow_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_glow_enabled**\ (\ ) -If ``true``, the glow effect is enabled. +If ``true``, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels. -\ **Note:** Glow is only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, glow will look different due to the lower dynamic range available in the Mobile rendering method. +\ **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method. + +\ **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: ``glow_levels/*``, :ref:`glow_normalized<class_Environment_property_glow_normalized>`, :ref:`glow_strength<class_Environment_property_glow_strength>`, :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, :ref:`glow_mix<class_Environment_property_glow_mix>`, :ref:`glow_map<class_Environment_property_glow_map>`, and :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This implementation is optimized to run on low-end devices and is less flexible as a result. .. rst-class:: classref-item-separator @@ -1013,12 +1119,12 @@ If ``true``, the glow effect is enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0`` +:ref:`float<class_float>` **glow_hdr_luminance_cap** = ``12.0`` :ref:`🔗<class_Environment_property_glow_hdr_luminance_cap>` .. rst-class:: classref-property-setget -- void **set_glow_hdr_luminance_cap** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_hdr_luminance_cap** **(** **)** +- |void| **set_glow_hdr_luminance_cap**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_hdr_luminance_cap**\ (\ ) The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. @@ -1030,12 +1136,12 @@ The higher threshold of the HDR glow. Areas brighter than this threshold will be .. rst-class:: classref-property -:ref:`float<class_float>` **glow_hdr_scale** = ``2.0`` +:ref:`float<class_float>` **glow_hdr_scale** = ``2.0`` :ref:`🔗<class_Environment_property_glow_hdr_scale>` .. rst-class:: classref-property-setget -- void **set_glow_hdr_bleed_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_hdr_bleed_scale** **(** **)** +- |void| **set_glow_hdr_bleed_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_hdr_bleed_scale**\ (\ ) The bleed scale of the HDR glow. @@ -1047,12 +1153,12 @@ The bleed scale of the HDR glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_hdr_threshold** = ``1.0`` +:ref:`float<class_float>` **glow_hdr_threshold** = ``1.0`` :ref:`🔗<class_Environment_property_glow_hdr_threshold>` .. rst-class:: classref-property-setget -- void **set_glow_hdr_bleed_threshold** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_hdr_bleed_threshold** **(** **)** +- |void| **set_glow_hdr_bleed_threshold**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_hdr_bleed_threshold**\ (\ ) The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to ``2.0``), this may need to be below ``1.0`` for glow to be visible. A value of ``0.9`` works well in this case. This value also needs to be decreased below ``1.0`` when using glow in 2D, as 2D rendering is performed in SDR. @@ -1064,12 +1170,12 @@ The lower threshold of the HDR glow. When using the Mobile rendering method (whi .. rst-class:: classref-property -:ref:`float<class_float>` **glow_intensity** = ``0.8`` +:ref:`float<class_float>` **glow_intensity** = ``0.8`` :ref:`🔗<class_Environment_property_glow_intensity>` .. rst-class:: classref-property-setget -- void **set_glow_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_intensity** **(** **)** +- |void| **set_glow_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_intensity**\ (\ ) The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to ``2.0``), this should be increased to ``1.5`` to compensate. @@ -1081,15 +1187,17 @@ The overall brightness multiplier of the glow effect. When using the Mobile rend .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/1** = ``0.0`` +:ref:`float<class_float>` **glow_levels/1** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/1>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 1st level of glow. This is the most "local" level (least blurry). +\ **Note:** :ref:`glow_levels/1<class_Environment_property_glow_levels/1>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1098,15 +1206,17 @@ The intensity of the 1st level of glow. This is the most "local" level (least bl .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/2** = ``0.0`` +:ref:`float<class_float>` **glow_levels/2** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/2>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 2nd level of glow. +\ **Note:** :ref:`glow_levels/2<class_Environment_property_glow_levels/2>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1115,15 +1225,17 @@ The intensity of the 2nd level of glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/3** = ``1.0`` +:ref:`float<class_float>` **glow_levels/3** = ``1.0`` :ref:`🔗<class_Environment_property_glow_levels/3>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 3rd level of glow. +\ **Note:** :ref:`glow_levels/3<class_Environment_property_glow_levels/3>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1132,15 +1244,17 @@ The intensity of the 3rd level of glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/4** = ``0.0`` +:ref:`float<class_float>` **glow_levels/4** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/4>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 4th level of glow. +\ **Note:** :ref:`glow_levels/4<class_Environment_property_glow_levels/4>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1149,15 +1263,17 @@ The intensity of the 4th level of glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/5** = ``1.0`` +:ref:`float<class_float>` **glow_levels/5** = ``1.0`` :ref:`🔗<class_Environment_property_glow_levels/5>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 5th level of glow. +\ **Note:** :ref:`glow_levels/5<class_Environment_property_glow_levels/5>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1166,15 +1282,17 @@ The intensity of the 5th level of glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/6** = ``0.0`` +:ref:`float<class_float>` **glow_levels/6** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/6>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 6th level of glow. +\ **Note:** :ref:`glow_levels/6<class_Environment_property_glow_levels/6>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1183,15 +1301,17 @@ The intensity of the 6th level of glow. .. rst-class:: classref-property -:ref:`float<class_float>` **glow_levels/7** = ``0.0`` +:ref:`float<class_float>` **glow_levels/7** = ``0.0`` :ref:`🔗<class_Environment_property_glow_levels/7>` .. rst-class:: classref-property-setget -- void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** -- :ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +- |void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| The intensity of the 7th level of glow. This is the most "global" level (blurriest). +\ **Note:** :ref:`glow_levels/7<class_Environment_property_glow_levels/7>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1200,17 +1320,19 @@ The intensity of the 7th level of glow. This is the most "global" level (blurrie .. rst-class:: classref-property -:ref:`Texture<class_Texture>` **glow_map** +:ref:`Texture<class_Texture>` **glow_map** :ref:`🔗<class_Environment_property_glow_map>` .. rst-class:: classref-property-setget -- void **set_glow_map** **(** :ref:`Texture<class_Texture>` value **)** -- :ref:`Texture<class_Texture>` **get_glow_map** **(** **)** +- |void| **set_glow_map**\ (\ value\: :ref:`Texture<class_Texture>`\ ) +- :ref:`Texture<class_Texture>` **get_glow_map**\ (\ ) The texture that should be used as a glow map to *multiply* the resulting glow color according to :ref:`glow_map_strength<class_Environment_property_glow_map_strength>`. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored. \ **Note:** The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9). +\ **Note:** :ref:`glow_map<class_Environment_property_glow_map>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1219,15 +1341,17 @@ The texture that should be used as a glow map to *multiply* the resulting glow c .. rst-class:: classref-property -:ref:`float<class_float>` **glow_map_strength** = ``0.8`` +:ref:`float<class_float>` **glow_map_strength** = ``0.8`` :ref:`🔗<class_Environment_property_glow_map_strength>` .. rst-class:: classref-property-setget -- void **set_glow_map_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_map_strength** **(** **)** +- |void| **set_glow_map_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_map_strength**\ (\ ) How strong of an impact the :ref:`glow_map<class_Environment_property_glow_map>` should have on the overall glow effect. A strength of ``0.0`` means the glow map has no effect on the overall glow effect. A strength of ``1.0`` means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). +\ **Note:** :ref:`glow_map_strength<class_Environment_property_glow_map_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1236,15 +1360,17 @@ How strong of an impact the :ref:`glow_map<class_Environment_property_glow_map>` .. rst-class:: classref-property -:ref:`float<class_float>` **glow_mix** = ``0.05`` +:ref:`float<class_float>` **glow_mix** = ``0.05`` :ref:`🔗<class_Environment_property_glow_mix>` .. rst-class:: classref-property-setget -- void **set_glow_mix** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_mix** **(** **)** +- |void| **set_glow_mix**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_mix**\ (\ ) When using the :ref:`GLOW_BLEND_MODE_MIX<class_Environment_constant_GLOW_BLEND_MODE_MIX>` :ref:`glow_blend_mode<class_Environment_property_glow_blend_mode>`, this controls how much the source image is blended with the glow layer. A value of ``0.0`` makes the glow rendering invisible, while a value of ``1.0`` is equivalent to :ref:`GLOW_BLEND_MODE_REPLACE<class_Environment_constant_GLOW_BLEND_MODE_REPLACE>`. +\ **Note:** :ref:`glow_mix<class_Environment_property_glow_mix>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1253,15 +1379,17 @@ When using the :ref:`GLOW_BLEND_MODE_MIX<class_Environment_constant_GLOW_BLEND_M .. rst-class:: classref-property -:ref:`bool<class_bool>` **glow_normalized** = ``false`` +:ref:`bool<class_bool>` **glow_normalized** = ``false`` :ref:`🔗<class_Environment_property_glow_normalized>` .. rst-class:: classref-property-setget -- void **set_glow_normalized** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_glow_normalized** **(** **)** +- |void| **set_glow_normalized**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_glow_normalized**\ (\ ) If ``true``, glow levels will be normalized so that summed together their intensities equal ``1.0``. +\ **Note:** :ref:`glow_normalized<class_Environment_property_glow_normalized>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1270,15 +1398,17 @@ If ``true``, glow levels will be normalized so that summed together their intens .. rst-class:: classref-property -:ref:`float<class_float>` **glow_strength** = ``1.0`` +:ref:`float<class_float>` **glow_strength** = ``1.0`` :ref:`🔗<class_Environment_property_glow_strength>` .. rst-class:: classref-property-setget -- void **set_glow_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_glow_strength** **(** **)** +- |void| **set_glow_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_glow_strength**\ (\ ) The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range. +\ **Note:** :ref:`glow_strength<class_Environment_property_glow_strength>` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + .. rst-class:: classref-item-separator ---- @@ -1287,12 +1417,12 @@ The strength of the glow effect. This applies as the glow is blurred across the .. rst-class:: classref-property -:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0`` +:ref:`ReflectionSource<enum_Environment_ReflectionSource>` **reflected_light_source** = ``0`` :ref:`🔗<class_Environment_property_reflected_light_source>` .. rst-class:: classref-property-setget -- void **set_reflection_source** **(** :ref:`ReflectionSource<enum_Environment_ReflectionSource>` value **)** -- :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source** **(** **)** +- |void| **set_reflection_source**\ (\ value\: :ref:`ReflectionSource<enum_Environment_ReflectionSource>`\ ) +- :ref:`ReflectionSource<enum_Environment_ReflectionSource>` **get_reflection_source**\ (\ ) The reflected (specular) light source. @@ -1304,12 +1434,12 @@ The reflected (specular) light source. .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5`` +:ref:`float<class_float>` **sdfgi_bounce_feedback** = ``0.5`` :ref:`🔗<class_Environment_property_sdfgi_bounce_feedback>` .. rst-class:: classref-property-setget -- void **set_sdfgi_bounce_feedback** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_bounce_feedback** **(** **)** +- |void| **set_sdfgi_bounce_feedback**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_bounce_feedback**\ (\ ) The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than ``0.0`` will simulate multiple bounces, resulting in a more realistic appearance. Increasing :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>` generally has no performance impact. See also :ref:`sdfgi_energy<class_Environment_property_sdfgi_energy>`. @@ -1325,12 +1455,12 @@ The energy multiplier applied to light every time it bounces from a surface when .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8`` +:ref:`float<class_float>` **sdfgi_cascade0_distance** = ``12.8`` :ref:`🔗<class_Environment_property_sdfgi_cascade0_distance>` .. rst-class:: classref-property-setget -- void **set_sdfgi_cascade0_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_cascade0_distance** **(** **)** +- |void| **set_sdfgi_cascade0_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_cascade0_distance**\ (\ ) **Note:** This property is linked to :ref:`sdfgi_min_cell_size<class_Environment_property_sdfgi_min_cell_size>` and :ref:`sdfgi_max_distance<class_Environment_property_sdfgi_max_distance>`. Changing its value will automatically change those properties as well. @@ -1342,12 +1472,12 @@ The energy multiplier applied to light every time it bounces from a surface when .. rst-class:: classref-property -:ref:`int<class_int>` **sdfgi_cascades** = ``4`` +:ref:`int<class_int>` **sdfgi_cascades** = ``4`` :ref:`🔗<class_Environment_property_sdfgi_cascades>` .. rst-class:: classref-property-setget -- void **set_sdfgi_cascades** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sdfgi_cascades** **(** **)** +- |void| **set_sdfgi_cascades**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sdfgi_cascades**\ (\ ) The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, :ref:`sdfgi_cascades<class_Environment_property_sdfgi_cascades>` can often be decreased between ``1`` and ``4`` to improve performance. @@ -1359,12 +1489,12 @@ The number of cascades to use for SDFGI (between 1 and 8). A higher number of ca .. rst-class:: classref-property -:ref:`bool<class_bool>` **sdfgi_enabled** = ``false`` +:ref:`bool<class_bool>` **sdfgi_enabled** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_enabled>` .. rst-class:: classref-property-setget -- void **set_sdfgi_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sdfgi_enabled** **(** **)** +- |void| **set_sdfgi_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sdfgi_enabled**\ (\ ) If ``true``, enables signed distance field global illumination for meshes that have their :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` set to :ref:`GeometryInstance3D.GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>`. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not. @@ -1382,12 +1512,12 @@ If ``true``, enables signed distance field global illumination for meshes that h .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_energy** = ``1.0`` +:ref:`float<class_float>` **sdfgi_energy** = ``1.0`` :ref:`🔗<class_Environment_property_sdfgi_energy>` .. rst-class:: classref-property-setget -- void **set_sdfgi_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_energy** **(** **)** +- |void| **set_sdfgi_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_energy**\ (\ ) The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also :ref:`sdfgi_bounce_feedback<class_Environment_property_sdfgi_bounce_feedback>`. @@ -1399,12 +1529,12 @@ The energy multiplier to use for SDFGI. Higher values will result in brighter in .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_max_distance** = ``204.8`` +:ref:`float<class_float>` **sdfgi_max_distance** = ``204.8`` :ref:`🔗<class_Environment_property_sdfgi_max_distance>` .. rst-class:: classref-property-setget -- void **set_sdfgi_max_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_max_distance** **(** **)** +- |void| **set_sdfgi_max_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_max_distance**\ (\ ) The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as :ref:`ReflectionProbe<class_ReflectionProbe>` will be used as a fallback. @@ -1418,12 +1548,12 @@ The maximum distance at which SDFGI is visible. Beyond this distance, environmen .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2`` +:ref:`float<class_float>` **sdfgi_min_cell_size** = ``0.2`` :ref:`🔗<class_Environment_property_sdfgi_min_cell_size>` .. rst-class:: classref-property-setget -- void **set_sdfgi_min_cell_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_min_cell_size** **(** **)** +- |void| **set_sdfgi_min_cell_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_min_cell_size**\ (\ ) The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. @@ -1437,12 +1567,12 @@ The cell size to use for the closest SDFGI cascade (in 3D units). Lower values a .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1`` +:ref:`float<class_float>` **sdfgi_normal_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_normal_bias>` .. rst-class:: classref-property-setget -- void **set_sdfgi_normal_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_normal_bias** **(** **)** +- |void| **set_sdfgi_normal_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_normal_bias**\ (\ ) The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. @@ -1454,12 +1584,12 @@ The normal bias to use for SDFGI probes. Increasing this value can reduce visibl .. rst-class:: classref-property -:ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1`` +:ref:`float<class_float>` **sdfgi_probe_bias** = ``1.1`` :ref:`🔗<class_Environment_property_sdfgi_probe_bias>` .. rst-class:: classref-property-setget -- void **set_sdfgi_probe_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sdfgi_probe_bias** **(** **)** +- |void| **set_sdfgi_probe_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sdfgi_probe_bias**\ (\ ) The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. @@ -1471,12 +1601,12 @@ The constant bias to use for SDFGI probes. Increasing this value can reduce visi .. rst-class:: classref-property -:ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true`` +:ref:`bool<class_bool>` **sdfgi_read_sky_light** = ``true`` :ref:`🔗<class_Environment_property_sdfgi_read_sky_light>` .. rst-class:: classref-property-setget -- void **set_sdfgi_read_sky_light** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light** **(** **)** +- |void| **set_sdfgi_read_sky_light**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sdfgi_reading_sky_light**\ (\ ) If ``true``, SDFGI takes the environment lighting into account. This should be set to ``false`` for interior scenes. @@ -1488,12 +1618,12 @@ If ``true``, SDFGI takes the environment lighting into account. This should be s .. rst-class:: classref-property -:ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false`` +:ref:`bool<class_bool>` **sdfgi_use_occlusion** = ``false`` :ref:`🔗<class_Environment_property_sdfgi_use_occlusion>` .. rst-class:: classref-property-setget -- void **set_sdfgi_use_occlusion** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sdfgi_using_occlusion** **(** **)** +- |void| **set_sdfgi_use_occlusion**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sdfgi_using_occlusion**\ (\ ) If ``true``, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. :ref:`sdfgi_use_occlusion<class_Environment_property_sdfgi_use_occlusion>` has a performance impact and should only be enabled when needed. @@ -1505,12 +1635,12 @@ If ``true``, SDFGI uses an occlusion detection approach to reduce light leaking. .. rst-class:: classref-property -:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1`` +:ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **sdfgi_y_scale** = ``1`` :ref:`🔗<class_Environment_property_sdfgi_y_scale>` .. rst-class:: classref-property-setget -- void **set_sdfgi_y_scale** **(** :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` value **)** -- :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale** **(** **)** +- |void| **set_sdfgi_y_scale**\ (\ value\: :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>`\ ) +- :ref:`SDFGIYScale<enum_Environment_SDFGIYScale>` **get_sdfgi_y_scale**\ (\ ) The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. :ref:`sdfgi_y_scale<class_Environment_property_sdfgi_y_scale>` should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). @@ -1522,12 +1652,12 @@ The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells bein .. rst-class:: classref-property -:ref:`Sky<class_Sky>` **sky** +:ref:`Sky<class_Sky>` **sky** :ref:`🔗<class_Environment_property_sky>` .. rst-class:: classref-property-setget -- void **set_sky** **(** :ref:`Sky<class_Sky>` value **)** -- :ref:`Sky<class_Sky>` **get_sky** **(** **)** +- |void| **set_sky**\ (\ value\: :ref:`Sky<class_Sky>`\ ) +- :ref:`Sky<class_Sky>` **get_sky**\ (\ ) The :ref:`Sky<class_Sky>` resource used for this **Environment**. @@ -1539,12 +1669,12 @@ The :ref:`Sky<class_Sky>` resource used for this **Environment**. .. rst-class:: classref-property -:ref:`float<class_float>` **sky_custom_fov** = ``0.0`` +:ref:`float<class_float>` **sky_custom_fov** = ``0.0`` :ref:`🔗<class_Environment_property_sky_custom_fov>` .. rst-class:: classref-property-setget -- void **set_sky_custom_fov** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sky_custom_fov** **(** **)** +- |void| **set_sky_custom_fov**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sky_custom_fov**\ (\ ) If set to a value greater than ``0.0``, overrides the field of view to use for sky rendering. If set to ``0.0``, the same FOV as the current :ref:`Camera3D<class_Camera3D>` is used for sky rendering. @@ -1556,12 +1686,12 @@ If set to a value greater than ``0.0``, overrides the field of view to use for s .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **sky_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Environment_property_sky_rotation>` .. rst-class:: classref-property-setget -- void **set_sky_rotation** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_sky_rotation** **(** **)** +- |void| **set_sky_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_sky_rotation**\ (\ ) The rotation to use for sky rendering. @@ -1573,12 +1703,12 @@ The rotation to use for sky rendering. .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0`` +:ref:`float<class_float>` **ssao_ao_channel_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_ao_channel_affect>` .. rst-class:: classref-property-setget -- void **set_ssao_ao_channel_affect** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_ao_channel_affect** **(** **)** +- |void| **set_ssao_ao_channel_affect**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_ao_channel_affect**\ (\ ) The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than ``0`` will make the SSAO effect visible in areas darkened by AO textures. @@ -1590,12 +1720,12 @@ The screen-space ambient occlusion intensity on materials that have an AO textur .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_detail** = ``0.5`` +:ref:`float<class_float>` **ssao_detail** = ``0.5`` :ref:`🔗<class_Environment_property_ssao_detail>` .. rst-class:: classref-property-setget -- void **set_ssao_detail** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_detail** **(** **)** +- |void| **set_ssao_detail**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_detail**\ (\ ) Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image. @@ -1607,12 +1737,12 @@ Sets the strength of the additional level of detail for the screen-space ambient .. rst-class:: classref-property -:ref:`bool<class_bool>` **ssao_enabled** = ``false`` +:ref:`bool<class_bool>` **ssao_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssao_enabled>` .. rst-class:: classref-property-setget -- void **set_ssao_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ssao_enabled** **(** **)** +- |void| **set_ssao_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ssao_enabled**\ (\ ) If ``true``, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion. @@ -1626,12 +1756,12 @@ If ``true``, the screen-space ambient occlusion effect is enabled. This darkens .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_horizon** = ``0.06`` +:ref:`float<class_float>` **ssao_horizon** = ``0.06`` :ref:`🔗<class_Environment_property_ssao_horizon>` .. rst-class:: classref-property-setget -- void **set_ssao_horizon** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_horizon** **(** **)** +- |void| **set_ssao_horizon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_horizon**\ (\ ) The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the ``0.0-1.0`` range. A value of ``1.0`` results in no occlusion. @@ -1643,12 +1773,12 @@ The threshold for considering whether a given point on a surface is occluded or .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_intensity** = ``2.0`` +:ref:`float<class_float>` **ssao_intensity** = ``2.0`` :ref:`🔗<class_Environment_property_ssao_intensity>` .. rst-class:: classref-property-setget -- void **set_ssao_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_intensity** **(** **)** +- |void| **set_ssao_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_intensity**\ (\ ) The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion. @@ -1660,12 +1790,12 @@ The primary screen-space ambient occlusion intensity. Acts as a multiplier for t .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_light_affect** = ``0.0`` +:ref:`float<class_float>` **ssao_light_affect** = ``0.0`` :ref:`🔗<class_Environment_property_ssao_light_affect>` .. rst-class:: classref-property-setget -- void **set_ssao_direct_light_affect** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_direct_light_affect** **(** **)** +- |void| **set_ssao_direct_light_affect**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_direct_light_affect**\ (\ ) The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than ``0`` will make the SSAO effect visible in direct light. @@ -1677,12 +1807,12 @@ The screen-space ambient occlusion intensity in direct light. In real life, ambi .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_power** = ``1.5`` +:ref:`float<class_float>` **ssao_power** = ``1.5`` :ref:`🔗<class_Environment_property_ssao_power>` .. rst-class:: classref-property-setget -- void **set_ssao_power** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_power** **(** **)** +- |void| **set_ssao_power**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_power**\ (\ ) The distribution of occlusion. A higher value results in darker occlusion, similar to :ref:`ssao_intensity<class_Environment_property_ssao_intensity>`, but with a sharper falloff. @@ -1694,12 +1824,12 @@ The distribution of occlusion. A higher value results in darker occlusion, simil .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_radius** = ``1.0`` +:ref:`float<class_float>` **ssao_radius** = ``1.0`` :ref:`🔗<class_Environment_property_ssao_radius>` .. rst-class:: classref-property-setget -- void **set_ssao_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_radius** **(** **)** +- |void| **set_ssao_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_radius**\ (\ ) The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality. @@ -1711,12 +1841,12 @@ The distance at which objects can occlude each other when calculating screen-spa .. rst-class:: classref-property -:ref:`float<class_float>` **ssao_sharpness** = ``0.98`` +:ref:`float<class_float>` **ssao_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssao_sharpness>` .. rst-class:: classref-property-setget -- void **set_ssao_sharpness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssao_sharpness** **(** **)** +- |void| **set_ssao_sharpness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssao_sharpness**\ (\ ) The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. @@ -1728,12 +1858,12 @@ The amount that the screen-space ambient occlusion effect is allowed to blur ove .. rst-class:: classref-property -:ref:`bool<class_bool>` **ssil_enabled** = ``false`` +:ref:`bool<class_bool>` **ssil_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssil_enabled>` .. rst-class:: classref-property-setget -- void **set_ssil_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ssil_enabled** **(** **)** +- |void| **set_ssil_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ssil_enabled**\ (\ ) If ``true``, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or :ref:`VoxelGI<class_VoxelGI>`. Screen-space indirect lighting is not affected by individual light's :ref:`Light3D.light_indirect_energy<class_Light3D_property_light_indirect_energy>`. @@ -1747,12 +1877,12 @@ If ``true``, the screen-space indirect lighting effect is enabled. Screen space .. rst-class:: classref-property -:ref:`float<class_float>` **ssil_intensity** = ``1.0`` +:ref:`float<class_float>` **ssil_intensity** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_intensity>` .. rst-class:: classref-property-setget -- void **set_ssil_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssil_intensity** **(** **)** +- |void| **set_ssil_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssil_intensity**\ (\ ) The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light. @@ -1764,12 +1894,12 @@ The brightness multiplier for the screen-space indirect lighting effect. A highe .. rst-class:: classref-property -:ref:`float<class_float>` **ssil_normal_rejection** = ``1.0`` +:ref:`float<class_float>` **ssil_normal_rejection** = ``1.0`` :ref:`🔗<class_Environment_property_ssil_normal_rejection>` .. rst-class:: classref-property-setget -- void **set_ssil_normal_rejection** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssil_normal_rejection** **(** **)** +- |void| **set_ssil_normal_rejection**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssil_normal_rejection**\ (\ ) Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera. @@ -1781,12 +1911,12 @@ Amount of normal rejection used when calculating screen-space indirect lighting. .. rst-class:: classref-property -:ref:`float<class_float>` **ssil_radius** = ``5.0`` +:ref:`float<class_float>` **ssil_radius** = ``5.0`` :ref:`🔗<class_Environment_property_ssil_radius>` .. rst-class:: classref-property-setget -- void **set_ssil_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssil_radius** **(** **)** +- |void| **set_ssil_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssil_radius**\ (\ ) The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources. @@ -1798,12 +1928,12 @@ The distance that bounced lighting can travel when using the screen space indire .. rst-class:: classref-property -:ref:`float<class_float>` **ssil_sharpness** = ``0.98`` +:ref:`float<class_float>` **ssil_sharpness** = ``0.98`` :ref:`🔗<class_Environment_property_ssil_sharpness>` .. rst-class:: classref-property-setget -- void **set_ssil_sharpness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssil_sharpness** **(** **)** +- |void| **set_ssil_sharpness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssil_sharpness**\ (\ ) The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. @@ -1815,12 +1945,12 @@ The amount that the screen-space indirect lighting effect is allowed to blur ove .. rst-class:: classref-property -:ref:`float<class_float>` **ssr_depth_tolerance** = ``0.2`` +:ref:`float<class_float>` **ssr_depth_tolerance** = ``0.2`` :ref:`🔗<class_Environment_property_ssr_depth_tolerance>` .. rst-class:: classref-property-setget -- void **set_ssr_depth_tolerance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssr_depth_tolerance** **(** **)** +- |void| **set_ssr_depth_tolerance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssr_depth_tolerance**\ (\ ) The depth tolerance for screen-space reflections. @@ -1832,12 +1962,12 @@ The depth tolerance for screen-space reflections. .. rst-class:: classref-property -:ref:`bool<class_bool>` **ssr_enabled** = ``false`` +:ref:`bool<class_bool>` **ssr_enabled** = ``false`` :ref:`🔗<class_Environment_property_ssr_enabled>` .. rst-class:: classref-property-setget -- void **set_ssr_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ssr_enabled** **(** **)** +- |void| **set_ssr_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ssr_enabled**\ (\ ) If ``true``, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from :ref:`VoxelGI<class_VoxelGI>`\ s or :ref:`ReflectionProbe<class_ReflectionProbe>`\ s, but are slower and can't reflect surfaces occluded by others. @@ -1851,12 +1981,12 @@ If ``true``, screen-space reflections are enabled. Screen-space reflections are .. rst-class:: classref-property -:ref:`float<class_float>` **ssr_fade_in** = ``0.15`` +:ref:`float<class_float>` **ssr_fade_in** = ``0.15`` :ref:`🔗<class_Environment_property_ssr_fade_in>` .. rst-class:: classref-property-setget -- void **set_ssr_fade_in** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssr_fade_in** **(** **)** +- |void| **set_ssr_fade_in**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssr_fade_in**\ (\ ) The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to ``0.0``). @@ -1868,12 +1998,12 @@ The fade-in distance for screen-space reflections. Affects the area from the ref .. rst-class:: classref-property -:ref:`float<class_float>` **ssr_fade_out** = ``2.0`` +:ref:`float<class_float>` **ssr_fade_out** = ``2.0`` :ref:`🔗<class_Environment_property_ssr_fade_out>` .. rst-class:: classref-property-setget -- void **set_ssr_fade_out** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ssr_fade_out** **(** **)** +- |void| **set_ssr_fade_out**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ssr_fade_out**\ (\ ) The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to ``0.0``). @@ -1885,12 +2015,12 @@ The fade-out distance for screen-space reflections. Affects the area from the sc .. rst-class:: classref-property -:ref:`int<class_int>` **ssr_max_steps** = ``64`` +:ref:`int<class_int>` **ssr_max_steps** = ``64`` :ref:`🔗<class_Environment_property_ssr_max_steps>` .. rst-class:: classref-property-setget -- void **set_ssr_max_steps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_ssr_max_steps** **(** **)** +- |void| **set_ssr_max_steps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_ssr_max_steps**\ (\ ) The maximum number of steps for screen-space reflections. Higher values are slower. @@ -1902,12 +2032,12 @@ The maximum number of steps for screen-space reflections. Higher values are slow .. rst-class:: classref-property -:ref:`float<class_float>` **tonemap_exposure** = ``1.0`` +:ref:`float<class_float>` **tonemap_exposure** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_exposure>` .. rst-class:: classref-property-setget -- void **set_tonemap_exposure** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_tonemap_exposure** **(** **)** +- |void| **set_tonemap_exposure**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_tonemap_exposure**\ (\ ) The default exposure used for tonemapping. Higher values result in a brighter image. See also :ref:`tonemap_white<class_Environment_property_tonemap_white>`. @@ -1919,14 +2049,14 @@ The default exposure used for tonemapping. Higher values result in a brighter im .. rst-class:: classref-property -:ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0`` +:ref:`ToneMapper<enum_Environment_ToneMapper>` **tonemap_mode** = ``0`` :ref:`🔗<class_Environment_property_tonemap_mode>` .. rst-class:: classref-property-setget -- void **set_tonemapper** **(** :ref:`ToneMapper<enum_Environment_ToneMapper>` value **)** -- :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper** **(** **)** +- |void| **set_tonemapper**\ (\ value\: :ref:`ToneMapper<enum_Environment_ToneMapper>`\ ) +- :ref:`ToneMapper<enum_Environment_ToneMapper>` **get_tonemapper**\ (\ ) -The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) +The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.) .. rst-class:: classref-item-separator @@ -1936,12 +2066,12 @@ The tonemapping mode to use. Tonemapping is the process that "converts" HDR valu .. rst-class:: classref-property -:ref:`float<class_float>` **tonemap_white** = ``1.0`` +:ref:`float<class_float>` **tonemap_white** = ``1.0`` :ref:`🔗<class_Environment_property_tonemap_white>` .. rst-class:: classref-property-setget -- void **set_tonemap_white** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_tonemap_white** **(** **)** +- |void| **set_tonemap_white**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_tonemap_white**\ (\ ) The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the :ref:`tonemap_mode<class_Environment_property_tonemap_mode>` isn't set to :ref:`TONE_MAPPER_LINEAR<class_Environment_constant_TONE_MAPPER_LINEAR>`. See also :ref:`tonemap_exposure<class_Environment_property_tonemap_exposure>`. @@ -1953,12 +2083,12 @@ The white reference value for tonemapping (also called "whitepoint"). Higher val .. rst-class:: classref-property -:ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **volumetric_fog_albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_albedo>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_albedo** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_volumetric_fog_albedo** **(** **)** +- |void| **set_volumetric_fog_albedo**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_volumetric_fog_albedo**\ (\ ) The :ref:`Color<class_Color>` of the volumetric fog when interacting with lights. Mist and fog have an albedo close to ``Color(1, 1, 1, 1)`` while smoke has a darker albedo. @@ -1970,12 +2100,12 @@ The :ref:`Color<class_Color>` of the volumetric fog when interacting with lights .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0`` +:ref:`float<class_float>` **volumetric_fog_ambient_inject** = ``0.0`` :ref:`🔗<class_Environment_property_volumetric_fog_ambient_inject>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_ambient_inject** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_ambient_inject** **(** **)** +- |void| **set_volumetric_fog_ambient_inject**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_ambient_inject**\ (\ ) Scales the strength of ambient light used in the volumetric fog. A value of ``0.0`` means that ambient light will not impact the volumetric fog. :ref:`volumetric_fog_ambient_inject<class_Environment_property_volumetric_fog_ambient_inject>` has a small performance cost when set above ``0.0``. @@ -1989,12 +2119,12 @@ Scales the strength of ambient light used in the volumetric fog. A value of ``0. .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2`` +:ref:`float<class_float>` **volumetric_fog_anisotropy** = ``0.2`` :ref:`🔗<class_Environment_property_volumetric_fog_anisotropy>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_anisotropy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_anisotropy** **(** **)** +- |void| **set_volumetric_fog_anisotropy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_anisotropy**\ (\ ) The direction of scattered light as it goes through the volumetric fog. A value close to ``1.0`` means almost all light is scattered forward. A value close to ``0.0`` means light is scattered equally in all directions. A value close to ``-1.0`` means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions. @@ -2006,12 +2136,12 @@ The direction of scattered light as it goes through the volumetric fog. A value .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_density** = ``0.05`` +:ref:`float<class_float>` **volumetric_fog_density** = ``0.05`` :ref:`🔗<class_Environment_property_volumetric_fog_density>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_density** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_density** **(** **)** +- |void| **set_volumetric_fog_density**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_density**\ (\ ) The base *exponential* density of the volumetric fog. Set this to the lowest density you want to have globally. :ref:`FogVolume<class_FogVolume>`\ s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life. @@ -2027,12 +2157,12 @@ To make volumetric fog work as a volumetric *lighting* solution, set :ref:`volum .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0`` +:ref:`float<class_float>` **volumetric_fog_detail_spread** = ``2.0`` :ref:`🔗<class_Environment_property_volumetric_fog_detail_spread>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_detail_spread** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_detail_spread** **(** **)** +- |void| **set_volumetric_fog_detail_spread**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_detail_spread**\ (\ ) The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera. @@ -2044,12 +2174,12 @@ The distribution of size down the length of the froxel buffer. A higher value co .. rst-class:: classref-property -:ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **volumetric_fog_emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Environment_property_volumetric_fog_emission>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_emission** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_volumetric_fog_emission** **(** **)** +- |void| **set_volumetric_fog_emission**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_volumetric_fog_emission**\ (\ ) The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows. @@ -2061,12 +2191,12 @@ The emitted light from the volumetric fog. Even with emission, volumetric fog wi .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0`` +:ref:`float<class_float>` **volumetric_fog_emission_energy** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_emission_energy>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_emission_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_emission_energy** **(** **)** +- |void| **set_volumetric_fog_emission_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_emission_energy**\ (\ ) The brightness of the emitted light from the volumetric fog. @@ -2078,12 +2208,12 @@ The brightness of the emitted light from the volumetric fog. .. rst-class:: classref-property -:ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false`` +:ref:`bool<class_bool>` **volumetric_fog_enabled** = ``false`` :ref:`🔗<class_Environment_property_volumetric_fog_enabled>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_volumetric_fog_enabled** **(** **)** +- |void| **set_volumetric_fog_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_volumetric_fog_enabled**\ (\ ) Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with :ref:`FogVolume<class_FogVolume>`\ s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission. @@ -2097,12 +2227,12 @@ Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel b .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0`` +:ref:`float<class_float>` **volumetric_fog_gi_inject** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_gi_inject>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_gi_inject** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_gi_inject** **(** **)** +- |void| **set_volumetric_fog_gi_inject**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_gi_inject**\ (\ ) Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of ``0.0`` means that Global Illumination will not impact the volumetric fog. :ref:`volumetric_fog_gi_inject<class_Environment_property_volumetric_fog_gi_inject>` has a small performance cost when set above ``0.0``. @@ -2118,12 +2248,12 @@ Scales the strength of Global Illumination used in the volumetric fog's albedo c .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_length** = ``64.0`` +:ref:`float<class_float>` **volumetric_fog_length** = ``64.0`` :ref:`🔗<class_Environment_property_volumetric_fog_length>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_length** **(** **)** +- |void| **set_volumetric_fog_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_length**\ (\ ) The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>`. @@ -2135,12 +2265,12 @@ The distance over which the volumetric fog is computed. Increase to compute fog .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0`` +:ref:`float<class_float>` **volumetric_fog_sky_affect** = ``1.0`` :ref:`🔗<class_Environment_property_volumetric_fog_sky_affect>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_sky_affect** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_sky_affect** **(** **)** +- |void| **set_volumetric_fog_sky_affect**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_sky_affect**\ (\ ) The factor to use when affecting the sky with volumetric fog. ``1.0`` means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with ``0.0`` not affecting sky rendering at all. @@ -2154,12 +2284,12 @@ The factor to use when affecting the sky with volumetric fog. ``1.0`` means that .. rst-class:: classref-property -:ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` +:ref:`float<class_float>` **volumetric_fog_temporal_reprojection_amount** = ``0.9`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_amount>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_temporal_reprojection_amount** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount** **(** **)** +- |void| **set_volumetric_fog_temporal_reprojection_amount**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volumetric_fog_temporal_reprojection_amount**\ (\ ) The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible. @@ -2171,12 +2301,12 @@ The amount by which to blend the last frame with the current frame. A higher num .. rst-class:: classref-property -:ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true`` +:ref:`bool<class_bool>` **volumetric_fog_temporal_reprojection_enabled** = ``true`` :ref:`🔗<class_Environment_property_volumetric_fog_temporal_reprojection_enabled>` .. rst-class:: classref-property-setget -- void **set_volumetric_fog_temporal_reprojection_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled** **(** **)** +- |void| **set_volumetric_fog_temporal_reprojection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_volumetric_fog_temporal_reprojection_enabled**\ (\ ) Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving :ref:`FogVolume<class_FogVolume>`\ s and :ref:`Light3D<class_Light3D>`\ s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving :ref:`FogVolume<class_FogVolume>`\ s or :ref:`Light3D<class_Light3D>`\ s too fast. Short-lived dynamic lighting effects should have :ref:`Light3D.light_volumetric_fog_energy<class_Light3D_property_light_volumetric_fog_energy>` set to ``0.0`` to avoid ghosting. @@ -2193,7 +2323,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_glow_level** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`float<class_float>` **get_glow_level**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Environment_method_get_glow_level>` Returns the intensity of the glow level ``idx``. @@ -2205,7 +2335,7 @@ Returns the intensity of the glow level ``idx``. .. rst-class:: classref-method -void **set_glow_level** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` intensity **)** +|void| **set_glow_level**\ (\ idx\: :ref:`int<class_int>`, intensity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Environment_method_set_glow_level>` Sets the intensity of the glow level ``idx``. A value above ``0.0`` enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. @@ -2216,3 +2346,4 @@ Sets the intensity of the glow level ``idx``. A value above ``0.0`` enables the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_expression.rst b/classes/class_expression.rst index 1345418df1a..09f408cd58d 100644 --- a/classes/class_expression.rst +++ b/classes/class_expression.rst @@ -85,15 +85,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`execute<class_Expression_method_execute>` **(** :ref:`Array<class_Array>` inputs=[], :ref:`Object<class_Object>` base_instance=null, :ref:`bool<class_bool>` show_error=true, :ref:`bool<class_bool>` const_calls_only=false **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_error_text<class_Expression_method_get_error_text>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_execute_failed<class_Expression_method_has_execute_failed>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`parse<class_Expression_method_parse>` **(** :ref:`String<class_String>` expression, :ref:`PackedStringArray<class_PackedStringArray>` input_names=PackedStringArray() **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`execute<class_Expression_method_execute>`\ (\ inputs\: :ref:`Array<class_Array>` = [], base_instance\: :ref:`Object<class_Object>` = null, show_error\: :ref:`bool<class_bool>` = true, const_calls_only\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_error_text<class_Expression_method_get_error_text>`\ (\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_execute_failed<class_Expression_method_has_execute_failed>`\ (\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`parse<class_Expression_method_parse>`\ (\ expression\: :ref:`String<class_String>`, input_names\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray()\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -108,7 +108,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **execute** **(** :ref:`Array<class_Array>` inputs=[], :ref:`Object<class_Object>` base_instance=null, :ref:`bool<class_bool>` show_error=true, :ref:`bool<class_bool>` const_calls_only=false **)** +:ref:`Variant<class_Variant>` **execute**\ (\ inputs\: :ref:`Array<class_Array>` = [], base_instance\: :ref:`Object<class_Object>` = null, show_error\: :ref:`bool<class_bool>` = true, const_calls_only\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Expression_method_execute>` Executes the expression that was previously parsed by :ref:`parse<class_Expression_method_parse>` and returns the result. Before you use the returned object, you should check if the method failed by calling :ref:`has_execute_failed<class_Expression_method_has_execute_failed>`. @@ -122,7 +122,7 @@ If you defined input variables in :ref:`parse<class_Expression_method_parse>`, y .. rst-class:: classref-method -:ref:`String<class_String>` **get_error_text** **(** **)** |const| +:ref:`String<class_String>` **get_error_text**\ (\ ) |const| :ref:`🔗<class_Expression_method_get_error_text>` Returns the error text if :ref:`parse<class_Expression_method_parse>` or :ref:`execute<class_Expression_method_execute>` has failed. @@ -134,7 +134,7 @@ Returns the error text if :ref:`parse<class_Expression_method_parse>` or :ref:`e .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_execute_failed** **(** **)** |const| +:ref:`bool<class_bool>` **has_execute_failed**\ (\ ) |const| :ref:`🔗<class_Expression_method_has_execute_failed>` Returns ``true`` if :ref:`execute<class_Expression_method_execute>` has failed. @@ -146,7 +146,7 @@ Returns ``true`` if :ref:`execute<class_Expression_method_execute>` has failed. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **parse** **(** :ref:`String<class_String>` expression, :ref:`PackedStringArray<class_PackedStringArray>` input_names=PackedStringArray() **)** +:ref:`Error<enum_@GlobalScope_Error>` **parse**\ (\ expression\: :ref:`String<class_String>`, input_names\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray()\ ) :ref:`🔗<class_Expression_method_parse>` Parses the expression and returns an :ref:`Error<enum_@GlobalScope_Error>` code. @@ -159,3 +159,4 @@ You can optionally specify names of variables that may appear in the expression .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fastnoiselite.rst b/classes/class_fastnoiselite.rst index 90416f42aa7..130ca392e4e 100644 --- a/classes/class_fastnoiselite.rst +++ b/classes/class_fastnoiselite.rst @@ -21,7 +21,7 @@ Description This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more. -Most generated noise values are in the range of ``[-1,1]``, however not always. Some of the cellular noise algorithms return results above ``1``. +Most generated noise values are in the range of ``[-1, 1]``, but not always. Some of the cellular noise algorithms return results above ``1``. .. rst-class:: classref-reftable-group @@ -34,7 +34,7 @@ Properties +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` | :ref:`cellular_distance_function<class_FastNoiseLite_property_cellular_distance_function>` | ``0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ - | :ref:`float<class_float>` | :ref:`cellular_jitter<class_FastNoiseLite_property_cellular_jitter>` | ``0.45`` | + | :ref:`float<class_float>` | :ref:`cellular_jitter<class_FastNoiseLite_property_cellular_jitter>` | ``1.0`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` | :ref:`cellular_return_type<class_FastNoiseLite_property_cellular_return_type>` | ``1`` | +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ @@ -88,7 +88,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **NoiseType**: +enum **NoiseType**: :ref:`🔗<enum_FastNoiseLite_NoiseType>` .. _class_FastNoiseLite_constant_TYPE_VALUE: @@ -148,7 +148,7 @@ Modified, higher quality version of :ref:`TYPE_SIMPLEX<class_FastNoiseLite_const .. rst-class:: classref-enumeration -enum **FractalType**: +enum **FractalType**: :ref:`🔗<enum_FastNoiseLite_FractalType>` .. _class_FastNoiseLite_constant_FRACTAL_NONE: @@ -190,7 +190,7 @@ Method of combining octaves into a fractal with a ping pong effect. .. rst-class:: classref-enumeration -enum **CellularDistanceFunction**: +enum **CellularDistanceFunction**: :ref:`🔗<enum_FastNoiseLite_CellularDistanceFunction>` .. _class_FastNoiseLite_constant_DISTANCE_EUCLIDEAN: @@ -232,7 +232,7 @@ Blend of :ref:`DISTANCE_EUCLIDEAN<class_FastNoiseLite_constant_DISTANCE_EUCLIDEA .. rst-class:: classref-enumeration -enum **CellularReturnType**: +enum **CellularReturnType**: :ref:`🔗<enum_FastNoiseLite_CellularReturnType>` .. _class_FastNoiseLite_constant_RETURN_CELL_VALUE: @@ -298,7 +298,7 @@ The distance to the nearest point is divided by the distance to the second-neare .. rst-class:: classref-enumeration -enum **DomainWarpType**: +enum **DomainWarpType**: :ref:`🔗<enum_FastNoiseLite_DomainWarpType>` .. _class_FastNoiseLite_constant_DOMAIN_WARP_SIMPLEX: @@ -332,7 +332,7 @@ The domain is warped using a simple noise grid (not as smooth as the other metho .. rst-class:: classref-enumeration -enum **DomainWarpFractalType**: +enum **DomainWarpFractalType**: :ref:`🔗<enum_FastNoiseLite_DomainWarpFractalType>` .. _class_FastNoiseLite_constant_DOMAIN_WARP_FRACTAL_NONE: @@ -371,12 +371,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **cellular_distance_function** = ``0`` +:ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **cellular_distance_function** = ``0`` :ref:`🔗<class_FastNoiseLite_property_cellular_distance_function>` .. rst-class:: classref-property-setget -- void **set_cellular_distance_function** **(** :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` value **)** -- :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **get_cellular_distance_function** **(** **)** +- |void| **set_cellular_distance_function**\ (\ value\: :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>`\ ) +- :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` **get_cellular_distance_function**\ (\ ) Determines how the distance to the nearest/second-nearest point is computed. See :ref:`CellularDistanceFunction<enum_FastNoiseLite_CellularDistanceFunction>` for options. @@ -388,12 +388,12 @@ Determines how the distance to the nearest/second-nearest point is computed. See .. rst-class:: classref-property -:ref:`float<class_float>` **cellular_jitter** = ``0.45`` +:ref:`float<class_float>` **cellular_jitter** = ``1.0`` :ref:`🔗<class_FastNoiseLite_property_cellular_jitter>` .. rst-class:: classref-property-setget -- void **set_cellular_jitter** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cellular_jitter** **(** **)** +- |void| **set_cellular_jitter**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cellular_jitter**\ (\ ) Maximum distance a point can move off of its grid position. Set to ``0`` for an even grid. @@ -405,12 +405,12 @@ Maximum distance a point can move off of its grid position. Set to ``0`` for an .. rst-class:: classref-property -:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **cellular_return_type** = ``1`` +:ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **cellular_return_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_cellular_return_type>` .. rst-class:: classref-property-setget -- void **set_cellular_return_type** **(** :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` value **)** -- :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **get_cellular_return_type** **(** **)** +- |void| **set_cellular_return_type**\ (\ value\: :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>`\ ) +- :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>` **get_cellular_return_type**\ (\ ) Return type from cellular noise calculations. See :ref:`CellularReturnType<enum_FastNoiseLite_CellularReturnType>`. @@ -422,12 +422,12 @@ Return type from cellular noise calculations. See :ref:`CellularReturnType<enum_ .. rst-class:: classref-property -:ref:`float<class_float>` **domain_warp_amplitude** = ``30.0`` +:ref:`float<class_float>` **domain_warp_amplitude** = ``30.0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_amplitude>` .. rst-class:: classref-property-setget -- void **set_domain_warp_amplitude** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_domain_warp_amplitude** **(** **)** +- |void| **set_domain_warp_amplitude**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_domain_warp_amplitude**\ (\ ) Sets the maximum warp distance from the origin. @@ -439,12 +439,12 @@ Sets the maximum warp distance from the origin. .. rst-class:: classref-property -:ref:`bool<class_bool>` **domain_warp_enabled** = ``false`` +:ref:`bool<class_bool>` **domain_warp_enabled** = ``false`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_enabled>` .. rst-class:: classref-property-setget -- void **set_domain_warp_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_domain_warp_enabled** **(** **)** +- |void| **set_domain_warp_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_domain_warp_enabled**\ (\ ) If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. @@ -456,12 +456,12 @@ If enabled, another FastNoiseLite instance is used to warp the space, resulting .. rst-class:: classref-property -:ref:`float<class_float>` **domain_warp_fractal_gain** = ``0.5`` +:ref:`float<class_float>` **domain_warp_fractal_gain** = ``0.5`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_gain>` .. rst-class:: classref-property-setget -- void **set_domain_warp_fractal_gain** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_domain_warp_fractal_gain** **(** **)** +- |void| **set_domain_warp_fractal_gain**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_domain_warp_fractal_gain**\ (\ ) Determines the strength of each subsequent layer of the noise which is used to warp the space. @@ -475,12 +475,12 @@ A low value places more emphasis on the lower frequency base layers, while a hig .. rst-class:: classref-property -:ref:`float<class_float>` **domain_warp_fractal_lacunarity** = ``6.0`` +:ref:`float<class_float>` **domain_warp_fractal_lacunarity** = ``6.0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_lacunarity>` .. rst-class:: classref-property-setget -- void **set_domain_warp_fractal_lacunarity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_domain_warp_fractal_lacunarity** **(** **)** +- |void| **set_domain_warp_fractal_lacunarity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_domain_warp_fractal_lacunarity**\ (\ ) Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. @@ -492,12 +492,12 @@ Octave lacunarity of the fractal noise which warps the space. Increasing this va .. rst-class:: classref-property -:ref:`int<class_int>` **domain_warp_fractal_octaves** = ``5`` +:ref:`int<class_int>` **domain_warp_fractal_octaves** = ``5`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_octaves>` .. rst-class:: classref-property-setget -- void **set_domain_warp_fractal_octaves** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_domain_warp_fractal_octaves** **(** **)** +- |void| **set_domain_warp_fractal_octaves**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_domain_warp_fractal_octaves**\ (\ ) The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. @@ -509,12 +509,12 @@ The number of noise layers that are sampled to get the final value for the fract .. rst-class:: classref-property -:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **domain_warp_fractal_type** = ``1`` +:ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **domain_warp_fractal_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_fractal_type>` .. rst-class:: classref-property-setget -- void **set_domain_warp_fractal_type** **(** :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` value **)** -- :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **get_domain_warp_fractal_type** **(** **)** +- |void| **set_domain_warp_fractal_type**\ (\ value\: :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>`\ ) +- :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>` **get_domain_warp_fractal_type**\ (\ ) The method for combining octaves into a fractal which is used to warp the space. See :ref:`DomainWarpFractalType<enum_FastNoiseLite_DomainWarpFractalType>`. @@ -526,12 +526,12 @@ The method for combining octaves into a fractal which is used to warp the space. .. rst-class:: classref-property -:ref:`float<class_float>` **domain_warp_frequency** = ``0.05`` +:ref:`float<class_float>` **domain_warp_frequency** = ``0.05`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_frequency>` .. rst-class:: classref-property-setget -- void **set_domain_warp_frequency** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_domain_warp_frequency** **(** **)** +- |void| **set_domain_warp_frequency**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_domain_warp_frequency**\ (\ ) Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. @@ -543,12 +543,12 @@ Frequency of the noise which warps the space. Low frequency results in smooth no .. rst-class:: classref-property -:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **domain_warp_type** = ``0`` +:ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **domain_warp_type** = ``0`` :ref:`🔗<class_FastNoiseLite_property_domain_warp_type>` .. rst-class:: classref-property-setget -- void **set_domain_warp_type** **(** :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` value **)** -- :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **get_domain_warp_type** **(** **)** +- |void| **set_domain_warp_type**\ (\ value\: :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>`\ ) +- :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>` **get_domain_warp_type**\ (\ ) Sets the warp algorithm. See :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpType>`. @@ -560,12 +560,12 @@ Sets the warp algorithm. See :ref:`DomainWarpType<enum_FastNoiseLite_DomainWarpT .. rst-class:: classref-property -:ref:`float<class_float>` **fractal_gain** = ``0.5`` +:ref:`float<class_float>` **fractal_gain** = ``0.5`` :ref:`🔗<class_FastNoiseLite_property_fractal_gain>` .. rst-class:: classref-property-setget -- void **set_fractal_gain** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fractal_gain** **(** **)** +- |void| **set_fractal_gain**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fractal_gain**\ (\ ) Determines the strength of each subsequent layer of noise in fractal noise. @@ -579,12 +579,12 @@ A low value places more emphasis on the lower frequency base layers, while a hig .. rst-class:: classref-property -:ref:`float<class_float>` **fractal_lacunarity** = ``2.0`` +:ref:`float<class_float>` **fractal_lacunarity** = ``2.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_lacunarity>` .. rst-class:: classref-property-setget -- void **set_fractal_lacunarity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fractal_lacunarity** **(** **)** +- |void| **set_fractal_lacunarity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fractal_lacunarity**\ (\ ) Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. @@ -596,12 +596,12 @@ Frequency multiplier between subsequent octaves. Increasing this value results i .. rst-class:: classref-property -:ref:`int<class_int>` **fractal_octaves** = ``5`` +:ref:`int<class_int>` **fractal_octaves** = ``5`` :ref:`🔗<class_FastNoiseLite_property_fractal_octaves>` .. rst-class:: classref-property-setget -- void **set_fractal_octaves** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fractal_octaves** **(** **)** +- |void| **set_fractal_octaves**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fractal_octaves**\ (\ ) The number of noise layers that are sampled to get the final value for fractal noise types. @@ -613,12 +613,12 @@ The number of noise layers that are sampled to get the final value for fractal n .. rst-class:: classref-property -:ref:`float<class_float>` **fractal_ping_pong_strength** = ``2.0`` +:ref:`float<class_float>` **fractal_ping_pong_strength** = ``2.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_ping_pong_strength>` .. rst-class:: classref-property-setget -- void **set_fractal_ping_pong_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fractal_ping_pong_strength** **(** **)** +- |void| **set_fractal_ping_pong_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fractal_ping_pong_strength**\ (\ ) Sets the strength of the fractal ping pong type. @@ -630,12 +630,12 @@ Sets the strength of the fractal ping pong type. .. rst-class:: classref-property -:ref:`FractalType<enum_FastNoiseLite_FractalType>` **fractal_type** = ``1`` +:ref:`FractalType<enum_FastNoiseLite_FractalType>` **fractal_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_fractal_type>` .. rst-class:: classref-property-setget -- void **set_fractal_type** **(** :ref:`FractalType<enum_FastNoiseLite_FractalType>` value **)** -- :ref:`FractalType<enum_FastNoiseLite_FractalType>` **get_fractal_type** **(** **)** +- |void| **set_fractal_type**\ (\ value\: :ref:`FractalType<enum_FastNoiseLite_FractalType>`\ ) +- :ref:`FractalType<enum_FastNoiseLite_FractalType>` **get_fractal_type**\ (\ ) The method for combining octaves into a fractal. See :ref:`FractalType<enum_FastNoiseLite_FractalType>`. @@ -647,12 +647,12 @@ The method for combining octaves into a fractal. See :ref:`FractalType<enum_Fast .. rst-class:: classref-property -:ref:`float<class_float>` **fractal_weighted_strength** = ``0.0`` +:ref:`float<class_float>` **fractal_weighted_strength** = ``0.0`` :ref:`🔗<class_FastNoiseLite_property_fractal_weighted_strength>` .. rst-class:: classref-property-setget -- void **set_fractal_weighted_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fractal_weighted_strength** **(** **)** +- |void| **set_fractal_weighted_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fractal_weighted_strength**\ (\ ) Higher weighting means higher octaves have less impact if lower octaves have a large impact. @@ -664,12 +664,12 @@ Higher weighting means higher octaves have less impact if lower octaves have a l .. rst-class:: classref-property -:ref:`float<class_float>` **frequency** = ``0.01`` +:ref:`float<class_float>` **frequency** = ``0.01`` :ref:`🔗<class_FastNoiseLite_property_frequency>` .. rst-class:: classref-property-setget -- void **set_frequency** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_frequency** **(** **)** +- |void| **set_frequency**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_frequency**\ (\ ) The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. @@ -681,12 +681,12 @@ The frequency for all noise types. Low frequency results in smooth noise while h .. rst-class:: classref-property -:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **noise_type** = ``1`` +:ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **noise_type** = ``1`` :ref:`🔗<class_FastNoiseLite_property_noise_type>` .. rst-class:: classref-property-setget -- void **set_noise_type** **(** :ref:`NoiseType<enum_FastNoiseLite_NoiseType>` value **)** -- :ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **get_noise_type** **(** **)** +- |void| **set_noise_type**\ (\ value\: :ref:`NoiseType<enum_FastNoiseLite_NoiseType>`\ ) +- :ref:`NoiseType<enum_FastNoiseLite_NoiseType>` **get_noise_type**\ (\ ) The noise algorithm used. See :ref:`NoiseType<enum_FastNoiseLite_NoiseType>`. @@ -698,12 +698,12 @@ The noise algorithm used. See :ref:`NoiseType<enum_FastNoiseLite_NoiseType>`. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_FastNoiseLite_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_offset**\ (\ ) Translate the noise input coordinates by the given :ref:`Vector3<class_Vector3>`. @@ -715,12 +715,12 @@ Translate the noise input coordinates by the given :ref:`Vector3<class_Vector3>` .. rst-class:: classref-property -:ref:`int<class_int>` **seed** = ``0`` +:ref:`int<class_int>` **seed** = ``0`` :ref:`🔗<class_FastNoiseLite_property_seed>` .. rst-class:: classref-property-setget -- void **set_seed** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_seed** **(** **)** +- |void| **set_seed**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_seed**\ (\ ) The random number seed for all noise types. @@ -731,3 +731,4 @@ The random number seed for all noise types. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fbxdocument.rst b/classes/class_fbxdocument.rst new file mode 100644 index 00000000000..0861a63ba51 --- /dev/null +++ b/classes/class_fbxdocument.rst @@ -0,0 +1,35 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/fbx/doc_classes/FBXDocument.xml. + +.. _class_FBXDocument: + +FBXDocument +=========== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`GLTFDocument<class_GLTFDocument>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Handles FBX documents. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The FBXDocument handles FBX documents. It provides methods to append data from buffers or files, generate scenes, and register/unregister document extensions. + +When exporting FBX from Blender, use the "FBX Units Scale" option. The "FBX Units Scale" option sets the correct scale factor and avoids manual adjustments when re-importing into Blender, such as through glTF export. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fbxstate.rst b/classes/class_fbxstate.rst new file mode 100644 index 00000000000..819a60fcfa4 --- /dev/null +++ b/classes/class_fbxstate.rst @@ -0,0 +1,65 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/fbx/doc_classes/FBXState.xml. + +.. _class_FBXState: + +FBXState +======== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`GLTFState<class_GLTFState>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +.. rst-class:: classref-introduction-group + +Description +----------- + +The FBXState handles the state data imported from FBX files. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`allow_geometry_helper_nodes<class_FBXState_property_allow_geometry_helper_nodes>` | ``false`` | + +-------------------------+-----------------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_FBXState_property_allow_geometry_helper_nodes: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **allow_geometry_helper_nodes** = ``false`` :ref:`🔗<class_FBXState_property_allow_geometry_helper_nodes>` + +.. rst-class:: classref-property-setget + +- |void| **set_allow_geometry_helper_nodes**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_geometry_helper_nodes**\ (\ ) + +If ``true``, the import process used auxiliary nodes called geometry helper nodes. These nodes help preserve the pivots and transformations of the original 3D model during import. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fileaccess.rst b/classes/class_fileaccess.rst index ad721e3418f..73a099ac549 100644 --- a/classes/class_fileaccess.rst +++ b/classes/class_fileaccess.rst @@ -28,24 +28,24 @@ Here's a sample on how to write and read from a file: .. code-tab:: gdscript - func save(content): + func save_to_file(content): var file = FileAccess.open("user://save_game.dat", FileAccess.WRITE) file.store_string(content) - func load(): + func load_from_file(): var file = FileAccess.open("user://save_game.dat", FileAccess.READ) var content = file.get_as_text() return content .. code-tab:: csharp - public void Save(string content) + public void SaveToFile(string content) { using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write); file.StoreString(content); } - public string Load() + public string LoadFromFile() { using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read); string content = file.GetAsText(); @@ -69,7 +69,9 @@ Tutorials - :doc:`File system <../tutorials/scripting/filesystem>` -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -91,103 +93,117 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_FileAccess_method_close>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`eof_reached<class_FileAccess_method_eof_reached>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`file_exists<class_FileAccess_method_file_exists>` **(** :ref:`String<class_String>` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flush<class_FileAccess_method_flush>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_8<class_FileAccess_method_get_8>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_16<class_FileAccess_method_get_16>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_32<class_FileAccess_method_get_32>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_64<class_FileAccess_method_get_64>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_as_text<class_FileAccess_method_get_as_text>` **(** :ref:`bool<class_bool>` skip_cr=false **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_buffer<class_FileAccess_method_get_buffer>` **(** :ref:`int<class_int>` length **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_csv_line<class_FileAccess_method_get_csv_line>` **(** :ref:`String<class_String>` delim="," **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_double<class_FileAccess_method_get_double>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_error<class_FileAccess_method_get_error>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_file_as_bytes<class_FileAccess_method_get_file_as_bytes>` **(** :ref:`String<class_String>` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file_as_string<class_FileAccess_method_get_file_as_string>` **(** :ref:`String<class_String>` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_float<class_FileAccess_method_get_float>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_length<class_FileAccess_method_get_length>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_line<class_FileAccess_method_get_line>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_md5<class_FileAccess_method_get_md5>` **(** :ref:`String<class_String>` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_modified_time<class_FileAccess_method_get_modified_time>` **(** :ref:`String<class_String>` file **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_open_error<class_FileAccess_method_get_open_error>` **(** **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_pascal_string<class_FileAccess_method_get_pascal_string>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_path<class_FileAccess_method_get_path>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_path_absolute<class_FileAccess_method_get_path_absolute>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_position<class_FileAccess_method_get_position>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_real<class_FileAccess_method_get_real>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_sha256<class_FileAccess_method_get_sha256>` **(** :ref:`String<class_String>` path **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_var<class_FileAccess_method_get_var>` **(** :ref:`bool<class_bool>` allow_objects=false **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_open<class_FileAccess_method_is_open>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess<class_FileAccess>` | :ref:`open<class_FileAccess_method_open>` **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` flags **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess<class_FileAccess>` | :ref:`open_compressed<class_FileAccess_method_open_compressed>` **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`CompressionMode<enum_FileAccess_CompressionMode>` compression_mode=0 **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess<class_FileAccess>` | :ref:`open_encrypted<class_FileAccess_method_open_encrypted>` **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`PackedByteArray<class_PackedByteArray>` key **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileAccess<class_FileAccess>` | :ref:`open_encrypted_with_pass<class_FileAccess_method_open_encrypted_with_pass>` **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`String<class_String>` pass **)** |static| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek<class_FileAccess_method_seek>` **(** :ref:`int<class_int>` position **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek_end<class_FileAccess_method_seek_end>` **(** :ref:`int<class_int>` position=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_8<class_FileAccess_method_store_8>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_16<class_FileAccess_method_store_16>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_32<class_FileAccess_method_store_32>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_64<class_FileAccess_method_store_64>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_buffer<class_FileAccess_method_store_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_csv_line<class_FileAccess_method_store_csv_line>` **(** :ref:`PackedStringArray<class_PackedStringArray>` values, :ref:`String<class_String>` delim="," **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_double<class_FileAccess_method_store_double>` **(** :ref:`float<class_float>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_float<class_FileAccess_method_store_float>` **(** :ref:`float<class_float>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_line<class_FileAccess_method_store_line>` **(** :ref:`String<class_String>` line **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_pascal_string<class_FileAccess_method_store_pascal_string>` **(** :ref:`String<class_String>` string **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_real<class_FileAccess_method_store_real>` **(** :ref:`float<class_float>` value **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_string<class_FileAccess_method_store_string>` **(** :ref:`String<class_String>` string **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`store_var<class_FileAccess_method_store_var>` **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` full_objects=false **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_FileAccess_method_close>`\ (\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`eof_reached<class_FileAccess_method_eof_reached>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`file_exists<class_FileAccess_method_file_exists>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`flush<class_FileAccess_method_flush>`\ (\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_8<class_FileAccess_method_get_8>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_16<class_FileAccess_method_get_16>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_32<class_FileAccess_method_get_32>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_64<class_FileAccess_method_get_64>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_as_text<class_FileAccess_method_get_as_text>`\ (\ skip_cr\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_buffer<class_FileAccess_method_get_buffer>`\ (\ length\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_csv_line<class_FileAccess_method_get_csv_line>`\ (\ delim\: :ref:`String<class_String>` = ","\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_double<class_FileAccess_method_get_double>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_error<class_FileAccess_method_get_error>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_file_as_bytes<class_FileAccess_method_get_file_as_bytes>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file_as_string<class_FileAccess_method_get_file_as_string>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_float<class_FileAccess_method_get_float>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_hidden_attribute<class_FileAccess_method_get_hidden_attribute>`\ (\ file\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_length<class_FileAccess_method_get_length>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_line<class_FileAccess_method_get_line>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_md5<class_FileAccess_method_get_md5>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_modified_time<class_FileAccess_method_get_modified_time>`\ (\ file\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_open_error<class_FileAccess_method_get_open_error>`\ (\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_pascal_string<class_FileAccess_method_get_pascal_string>`\ (\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_path<class_FileAccess_method_get_path>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_path_absolute<class_FileAccess_method_get_path_absolute>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_position<class_FileAccess_method_get_position>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_read_only_attribute<class_FileAccess_method_get_read_only_attribute>`\ (\ file\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_real<class_FileAccess_method_get_real>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_sha256<class_FileAccess_method_get_sha256>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>`\] | :ref:`get_unix_permissions<class_FileAccess_method_get_unix_permissions>`\ (\ file\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_var<class_FileAccess_method_get_var>`\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_open<class_FileAccess_method_is_open>`\ (\ ) |const| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess<class_FileAccess>` | :ref:`open<class_FileAccess_method_open>`\ (\ path\: :ref:`String<class_String>`, flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess<class_FileAccess>` | :ref:`open_compressed<class_FileAccess_method_open_compressed>`\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, compression_mode\: :ref:`CompressionMode<enum_FileAccess_CompressionMode>` = 0\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess<class_FileAccess>` | :ref:`open_encrypted<class_FileAccess_method_open_encrypted>`\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileAccess<class_FileAccess>` | :ref:`open_encrypted_with_pass<class_FileAccess_method_open_encrypted_with_pass>`\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, pass\: :ref:`String<class_String>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`resize<class_FileAccess_method_resize>`\ (\ length\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek<class_FileAccess_method_seek>`\ (\ position\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek_end<class_FileAccess_method_seek_end>`\ (\ position\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_hidden_attribute<class_FileAccess_method_set_hidden_attribute>`\ (\ file\: :ref:`String<class_String>`, hidden\: :ref:`bool<class_bool>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_read_only_attribute<class_FileAccess_method_set_read_only_attribute>`\ (\ file\: :ref:`String<class_String>`, ro\: :ref:`bool<class_bool>`\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_unix_permissions<class_FileAccess_method_set_unix_permissions>`\ (\ file\: :ref:`String<class_String>`, permissions\: |bitfield|\[:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>`\]\ ) |static| | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_8<class_FileAccess_method_store_8>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_16<class_FileAccess_method_store_16>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_32<class_FileAccess_method_store_32>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_64<class_FileAccess_method_store_64>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_buffer<class_FileAccess_method_store_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_csv_line<class_FileAccess_method_store_csv_line>`\ (\ values\: :ref:`PackedStringArray<class_PackedStringArray>`, delim\: :ref:`String<class_String>` = ","\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_double<class_FileAccess_method_store_double>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_float<class_FileAccess_method_store_float>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_line<class_FileAccess_method_store_line>`\ (\ line\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_pascal_string<class_FileAccess_method_store_pascal_string>`\ (\ string\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_real<class_FileAccess_method_store_real>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_string<class_FileAccess_method_store_string>`\ (\ string\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`store_var<class_FileAccess_method_store_var>`\ (\ value\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -202,7 +218,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ModeFlags**: +enum **ModeFlags**: :ref:`🔗<enum_FileAccess_ModeFlags>` .. _class_FileAccess_constant_READ: @@ -220,6 +236,8 @@ Opens the file for read operations. The cursor is positioned at the beginning of Opens the file for write operations. The file is created if it does not exist, and truncated if it does. +\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive<class_DirAccess_method_make_dir_recursive>`. + .. _class_FileAccess_constant_READ_WRITE: .. rst-class:: classref-enumeration-constant @@ -236,6 +254,8 @@ Opens the file for read and write operations. Does not truncate the file. The cu Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. +\ **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see :ref:`DirAccess.make_dir_recursive<class_DirAccess_method_make_dir_recursive>`. + .. rst-class:: classref-item-separator ---- @@ -244,7 +264,7 @@ Opens the file for read and write operations. The file is created if it does not .. rst-class:: classref-enumeration -enum **CompressionMode**: +enum **CompressionMode**: :ref:`🔗<enum_FileAccess_CompressionMode>` .. _class_FileAccess_constant_COMPRESSION_FASTLZ: @@ -286,6 +306,112 @@ Uses the `gzip <https://www.gzip.org/>`__ compression method. Uses the `brotli <https://github.com/google/brotli>`__ compression method (only decompression is supported). +.. rst-class:: classref-item-separator + +---- + +.. _enum_FileAccess_UnixPermissionFlags: + +.. rst-class:: classref-enumeration + +flags **UnixPermissionFlags**: :ref:`🔗<enum_FileAccess_UnixPermissionFlags>` + +.. _class_FileAccess_constant_UNIX_READ_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_READ_OWNER** = ``256`` + +Read for owner bit. + +.. _class_FileAccess_constant_UNIX_WRITE_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_WRITE_OWNER** = ``128`` + +Write for owner bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_OWNER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_EXECUTE_OWNER** = ``64`` + +Execute for owner bit. + +.. _class_FileAccess_constant_UNIX_READ_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_READ_GROUP** = ``32`` + +Read for group bit. + +.. _class_FileAccess_constant_UNIX_WRITE_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_WRITE_GROUP** = ``16`` + +Write for group bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_GROUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_EXECUTE_GROUP** = ``8`` + +Execute for group bit. + +.. _class_FileAccess_constant_UNIX_READ_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_READ_OTHER** = ``4`` + +Read for other bit. + +.. _class_FileAccess_constant_UNIX_WRITE_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_WRITE_OTHER** = ``2`` + +Write for other bit. + +.. _class_FileAccess_constant_UNIX_EXECUTE_OTHER: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_EXECUTE_OTHER** = ``1`` + +Execute for other bit. + +.. _class_FileAccess_constant_UNIX_SET_USER_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_SET_USER_ID** = ``2048`` + +Set user id on execution bit. + +.. _class_FileAccess_constant_UNIX_SET_GROUP_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_SET_GROUP_ID** = ``1024`` + +Set group id on execution bit. + +.. _class_FileAccess_constant_UNIX_RESTRICTED_DELETE: + +.. rst-class:: classref-enumeration-constant + +:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>` **UNIX_RESTRICTED_DELETE** = ``512`` + +Restricted deletion (sticky) bit. + .. rst-class:: classref-section-separator ---- @@ -299,12 +425,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **big_endian** +:ref:`bool<class_bool>` **big_endian** :ref:`🔗<class_FileAccess_property_big_endian>` .. rst-class:: classref-property-setget -- void **set_big_endian** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_big_endian** **(** **)** +- |void| **set_big_endian**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_big_endian**\ (\ ) If ``true``, the file is read with big-endian `endianness <https://en.wikipedia.org/wiki/Endianness>`__. If ``false``, the file is read with little-endian endianness. If in doubt, leave this to ``false`` as most files are written with little-endian endianness. @@ -325,7 +451,7 @@ Method Descriptions .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_FileAccess_method_close>` Closes the currently opened file and prevents subsequent read/write operations. Use :ref:`flush<class_FileAccess_method_flush>` to persist the data to disk without closing the file. @@ -339,7 +465,7 @@ Closes the currently opened file and prevents subsequent read/write operations. .. rst-class:: classref-method -:ref:`bool<class_bool>` **eof_reached** **(** **)** |const| +:ref:`bool<class_bool>` **eof_reached**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_eof_reached>` Returns ``true`` if the file cursor has already read past the end of the file. @@ -370,7 +496,7 @@ Returns ``true`` if the file cursor has already read past the end of the file. .. rst-class:: classref-method -:ref:`bool<class_bool>` **file_exists** **(** :ref:`String<class_String>` path **)** |static| +:ref:`bool<class_bool>` **file_exists**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_file_exists>` Returns ``true`` if the file exists in the given path. @@ -386,7 +512,7 @@ For a non-static, relative equivalent, use :ref:`DirAccess.file_exists<class_Dir .. rst-class:: classref-method -void **flush** **(** **)** +|void| **flush**\ (\ ) :ref:`🔗<class_FileAccess_method_flush>` Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call :ref:`flush<class_FileAccess_method_flush>` manually before closing a file. Still, calling :ref:`flush<class_FileAccess_method_flush>` can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. @@ -400,7 +526,7 @@ Writes the file's buffer to disk. Flushing is automatically performed when the f .. rst-class:: classref-method -:ref:`int<class_int>` **get_8** **(** **)** |const| +:ref:`int<class_int>` **get_8**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_8>` Returns the next 8 bits from the file as an integer. See :ref:`store_8<class_FileAccess_method_store_8>` for details on what values can be stored and retrieved this way. @@ -412,7 +538,7 @@ Returns the next 8 bits from the file as an integer. See :ref:`store_8<class_Fil .. rst-class:: classref-method -:ref:`int<class_int>` **get_16** **(** **)** |const| +:ref:`int<class_int>` **get_16**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_16>` Returns the next 16 bits from the file as an integer. See :ref:`store_16<class_FileAccess_method_store_16>` for details on what values can be stored and retrieved this way. @@ -424,7 +550,7 @@ Returns the next 16 bits from the file as an integer. See :ref:`store_16<class_F .. rst-class:: classref-method -:ref:`int<class_int>` **get_32** **(** **)** |const| +:ref:`int<class_int>` **get_32**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_32>` Returns the next 32 bits from the file as an integer. See :ref:`store_32<class_FileAccess_method_store_32>` for details on what values can be stored and retrieved this way. @@ -436,7 +562,7 @@ Returns the next 32 bits from the file as an integer. See :ref:`store_32<class_F .. rst-class:: classref-method -:ref:`int<class_int>` **get_64** **(** **)** |const| +:ref:`int<class_int>` **get_64**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_64>` Returns the next 64 bits from the file as an integer. See :ref:`store_64<class_FileAccess_method_store_64>` for details on what values can be stored and retrieved this way. @@ -448,7 +574,7 @@ Returns the next 64 bits from the file as an integer. See :ref:`store_64<class_F .. rst-class:: classref-method -:ref:`String<class_String>` **get_as_text** **(** :ref:`bool<class_bool>` skip_cr=false **)** |const| +:ref:`String<class_String>` **get_as_text**\ (\ skip_cr\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_FileAccess_method_get_as_text>` Returns the whole file as a :ref:`String<class_String>`. Text is interpreted as being UTF-8 encoded. @@ -462,7 +588,7 @@ If ``skip_cr`` is ``true``, carriage return characters (``\r``, CR) will be igno .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_buffer** **(** :ref:`int<class_int>` length **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **get_buffer**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FileAccess_method_get_buffer>` Returns next ``length`` bytes of the file as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -474,7 +600,7 @@ Returns next ``length`` bytes of the file as a :ref:`PackedByteArray<class_Packe .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_csv_line** **(** :ref:`String<class_String>` delim="," **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_csv_line**\ (\ delim\: :ref:`String<class_String>` = ","\ ) |const| :ref:`🔗<class_FileAccess_method_get_csv_line>` Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long, and cannot be a double quotation mark. @@ -482,7 +608,7 @@ Text is interpreted as being UTF-8 encoded. Text values must be enclosed in doub For example, the following CSV lines are valid and will be properly parsed as two strings each: -:: +.. code:: text Alice,"Hello, Bob!" Bob,Alice! What a surprise! @@ -498,7 +624,7 @@ Note how the second line can omit the enclosing quotes as it does not include th .. rst-class:: classref-method -:ref:`float<class_float>` **get_double** **(** **)** |const| +:ref:`float<class_float>` **get_double**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_double>` Returns the next 64 bits from the file as a floating-point number. @@ -510,7 +636,7 @@ Returns the next 64 bits from the file as a floating-point number. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **get_error** **(** **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **get_error**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_error>` Returns the last error that happened when trying to perform operations. Compare with the ``ERR_FILE_*`` constants from :ref:`Error<enum_@GlobalScope_Error>`. @@ -522,10 +648,12 @@ Returns the last error that happened when trying to perform operations. Compare .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_file_as_bytes** **(** :ref:`String<class_String>` path **)** |static| +:ref:`PackedByteArray<class_PackedByteArray>` **get_file_as_bytes**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_file_as_bytes>` Returns the whole ``path`` file contents as a :ref:`PackedByteArray<class_PackedByteArray>` without any decoding. +Returns an empty :ref:`PackedByteArray<class_PackedByteArray>` if an error occurred while opening the file. You can use :ref:`get_open_error<class_FileAccess_method_get_open_error>` to check the error that occurred. + .. rst-class:: classref-item-separator ---- @@ -534,10 +662,12 @@ Returns the whole ``path`` file contents as a :ref:`PackedByteArray<class_Packed .. rst-class:: classref-method -:ref:`String<class_String>` **get_file_as_string** **(** :ref:`String<class_String>` path **)** |static| +:ref:`String<class_String>` **get_file_as_string**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_file_as_string>` Returns the whole ``path`` file contents as a :ref:`String<class_String>`. Text is interpreted as being UTF-8 encoded. +Returns an empty :ref:`String<class_String>` if an error occurred while opening the file. You can use :ref:`get_open_error<class_FileAccess_method_get_open_error>` to check the error that occurred. + .. rst-class:: classref-item-separator ---- @@ -546,7 +676,7 @@ Returns the whole ``path`` file contents as a :ref:`String<class_String>`. Text .. rst-class:: classref-method -:ref:`float<class_float>` **get_float** **(** **)** |const| +:ref:`float<class_float>` **get_float**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_float>` Returns the next 32 bits from the file as a floating-point number. @@ -554,11 +684,25 @@ Returns the next 32 bits from the file as a floating-point number. ---- +.. _class_FileAccess_method_get_hidden_attribute: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **get_hidden_attribute**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_hidden_attribute>` + +Returns ``true``, if file ``hidden`` attribute is set. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_length: .. rst-class:: classref-method -:ref:`int<class_int>` **get_length** **(** **)** |const| +:ref:`int<class_int>` **get_length**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_length>` Returns the size of the file in bytes. @@ -570,9 +714,9 @@ Returns the size of the file in bytes. .. rst-class:: classref-method -:ref:`String<class_String>` **get_line** **(** **)** |const| +:ref:`String<class_String>` **get_line**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_line>` -Returns the next line of the file as a :ref:`String<class_String>`. +Returns the next line of the file as a :ref:`String<class_String>`. The returned string doesn't include newline (``\n``) or carriage return (``\r``) characters, but does include any other leading or trailing whitespace. Text is interpreted as being UTF-8 encoded. @@ -584,7 +728,7 @@ Text is interpreted as being UTF-8 encoded. .. rst-class:: classref-method -:ref:`String<class_String>` **get_md5** **(** :ref:`String<class_String>` path **)** |static| +:ref:`String<class_String>` **get_md5**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_md5>` Returns an MD5 String representing the file at the given path or an empty :ref:`String<class_String>` on failure. @@ -596,9 +740,9 @@ Returns an MD5 String representing the file at the given path or an empty :ref:` .. rst-class:: classref-method -:ref:`int<class_int>` **get_modified_time** **(** :ref:`String<class_String>` file **)** |static| +:ref:`int<class_int>` **get_modified_time**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_modified_time>` -Returns the last time the ``file`` was modified in Unix timestamp format or returns a :ref:`String<class_String>` "ERROR IN ``file``". This Unix timestamp can be converted to another format using the :ref:`Time<class_Time>` singleton. +Returns the last time the ``file`` was modified in Unix timestamp format, or ``0`` on error. This Unix timestamp can be converted to another format using the :ref:`Time<class_Time>` singleton. .. rst-class:: classref-item-separator @@ -608,7 +752,7 @@ Returns the last time the ``file`` was modified in Unix timestamp format or retu .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **get_open_error** **(** **)** |static| +:ref:`Error<enum_@GlobalScope_Error>` **get_open_error**\ (\ ) |static| :ref:`🔗<class_FileAccess_method_get_open_error>` Returns the result of the last :ref:`open<class_FileAccess_method_open>` call in the current thread. @@ -620,7 +764,7 @@ Returns the result of the last :ref:`open<class_FileAccess_method_open>` call in .. rst-class:: classref-method -:ref:`String<class_String>` **get_pascal_string** **(** **)** +:ref:`String<class_String>` **get_pascal_string**\ (\ ) :ref:`🔗<class_FileAccess_method_get_pascal_string>` Returns a :ref:`String<class_String>` saved in Pascal format from the file. @@ -634,7 +778,7 @@ Text is interpreted as being UTF-8 encoded. .. rst-class:: classref-method -:ref:`String<class_String>` **get_path** **(** **)** |const| +:ref:`String<class_String>` **get_path**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_path>` Returns the path as a :ref:`String<class_String>` for the current open file. @@ -646,7 +790,7 @@ Returns the path as a :ref:`String<class_String>` for the current open file. .. rst-class:: classref-method -:ref:`String<class_String>` **get_path_absolute** **(** **)** |const| +:ref:`String<class_String>` **get_path_absolute**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_path_absolute>` Returns the absolute path as a :ref:`String<class_String>` for the current open file. @@ -658,7 +802,7 @@ Returns the absolute path as a :ref:`String<class_String>` for the current open .. rst-class:: classref-method -:ref:`int<class_int>` **get_position** **(** **)** |const| +:ref:`int<class_int>` **get_position**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_position>` Returns the file cursor's position. @@ -666,11 +810,25 @@ Returns the file cursor's position. ---- +.. _class_FileAccess_method_get_read_only_attribute: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **get_read_only_attribute**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_read_only_attribute>` + +Returns ``true``, if file ``read only`` attribute is set. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_get_real: .. rst-class:: classref-method -:ref:`float<class_float>` **get_real** **(** **)** |const| +:ref:`float<class_float>` **get_real**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_get_real>` Returns the next bits from the file as a floating-point number. @@ -682,9 +840,23 @@ Returns the next bits from the file as a floating-point number. .. rst-class:: classref-method -:ref:`String<class_String>` **get_sha256** **(** :ref:`String<class_String>` path **)** |static| +:ref:`String<class_String>` **get_sha256**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_sha256>` + +Returns an SHA-256 :ref:`String<class_String>` representing the file at the given path or an empty :ref:`String<class_String>` on failure. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_get_unix_permissions: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>`\] **get_unix_permissions**\ (\ file\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_get_unix_permissions>` + +Returns file UNIX permissions. -Returns a SHA-256 :ref:`String<class_String>` representing the file at the given path or an empty :ref:`String<class_String>` on failure. +\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. .. rst-class:: classref-item-separator @@ -694,7 +866,7 @@ Returns a SHA-256 :ref:`String<class_String>` representing the file at the given .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_var** **(** :ref:`bool<class_bool>` allow_objects=false **)** |const| +:ref:`Variant<class_Variant>` **get_var**\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_FileAccess_method_get_var>` Returns the next :ref:`Variant<class_Variant>` value from the file. If ``allow_objects`` is ``true``, decoding objects is allowed. @@ -710,7 +882,7 @@ Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.byte .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_open** **(** **)** |const| +:ref:`bool<class_bool>` **is_open**\ (\ ) |const| :ref:`🔗<class_FileAccess_method_is_open>` Returns ``true`` if the file is currently opened. @@ -722,7 +894,7 @@ Returns ``true`` if the file is currently opened. .. rst-class:: classref-method -:ref:`FileAccess<class_FileAccess>` **open** **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` flags **)** |static| +:ref:`FileAccess<class_FileAccess>` **open**\ (\ path\: :ref:`String<class_String>`, flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`\ ) |static| :ref:`🔗<class_FileAccess_method_open>` Creates a new **FileAccess** object and opens the file for writing or reading, depending on the flags. @@ -736,7 +908,7 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error<cl .. rst-class:: classref-method -:ref:`FileAccess<class_FileAccess>` **open_compressed** **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`CompressionMode<enum_FileAccess_CompressionMode>` compression_mode=0 **)** |static| +:ref:`FileAccess<class_FileAccess>` **open_compressed**\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, compression_mode\: :ref:`CompressionMode<enum_FileAccess_CompressionMode>` = 0\ ) |static| :ref:`🔗<class_FileAccess_method_open_compressed>` Creates a new **FileAccess** object and opens a compressed file for reading or writing. @@ -752,7 +924,7 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error<cl .. rst-class:: classref-method -:ref:`FileAccess<class_FileAccess>` **open_encrypted** **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`PackedByteArray<class_PackedByteArray>` key **)** |static| +:ref:`FileAccess<class_FileAccess>` **open_encrypted**\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_FileAccess_method_open_encrypted>` Creates a new **FileAccess** object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. @@ -768,7 +940,7 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error<cl .. rst-class:: classref-method -:ref:`FileAccess<class_FileAccess>` **open_encrypted_with_pass** **(** :ref:`String<class_String>` path, :ref:`ModeFlags<enum_FileAccess_ModeFlags>` mode_flags, :ref:`String<class_String>` pass **)** |static| +:ref:`FileAccess<class_FileAccess>` **open_encrypted_with_pass**\ (\ path\: :ref:`String<class_String>`, mode_flags\: :ref:`ModeFlags<enum_FileAccess_ModeFlags>`, pass\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_FileAccess_method_open_encrypted_with_pass>` Creates a new **FileAccess** object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. @@ -778,11 +950,23 @@ Returns ``null`` if opening the file failed. You can use :ref:`get_open_error<cl ---- +.. _class_FileAccess_method_resize: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **resize**\ (\ length\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_resize>` + +Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_seek: .. rst-class:: classref-method -void **seek** **(** :ref:`int<class_int>` position **)** +|void| **seek**\ (\ position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_seek>` Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). @@ -794,7 +978,7 @@ Changes the file reading/writing cursor to the specified position (in bytes from .. rst-class:: classref-method -void **seek_end** **(** :ref:`int<class_int>` position=0 **)** +|void| **seek_end**\ (\ position\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_FileAccess_method_seek_end>` Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). @@ -804,11 +988,53 @@ Changes the file reading/writing cursor to the specified position (in bytes from ---- +.. _class_FileAccess_method_set_hidden_attribute: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **set_hidden_attribute**\ (\ file\: :ref:`String<class_String>`, hidden\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_FileAccess_method_set_hidden_attribute>` + +Sets file **hidden** attribute. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_set_read_only_attribute: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **set_read_only_attribute**\ (\ file\: :ref:`String<class_String>`, ro\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_FileAccess_method_set_read_only_attribute>` + +Sets file **read only** attribute. + +\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileAccess_method_set_unix_permissions: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **set_unix_permissions**\ (\ file\: :ref:`String<class_String>`, permissions\: |bitfield|\[:ref:`UnixPermissionFlags<enum_FileAccess_UnixPermissionFlags>`\]\ ) |static| :ref:`🔗<class_FileAccess_method_set_unix_permissions>` + +Sets file UNIX permissions. + +\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileAccess_method_store_8: .. rst-class:: classref-method -void **store_8** **(** :ref:`int<class_int>` value **)** +|void| **store_8**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_8>` Stores an integer as 8 bits in the file. @@ -824,7 +1050,7 @@ To store a signed integer, use :ref:`store_64<class_FileAccess_method_store_64>` .. rst-class:: classref-method -void **store_16** **(** :ref:`int<class_int>` value **)** +|void| **store_16**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_16>` Stores an integer as 16 bits in the file. @@ -877,7 +1103,7 @@ To store a signed integer, use :ref:`store_64<class_FileAccess_method_store_64>` .. rst-class:: classref-method -void **store_32** **(** :ref:`int<class_int>` value **)** +|void| **store_32**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_32>` Stores an integer as 32 bits in the file. @@ -893,7 +1119,7 @@ To store a signed integer, use :ref:`store_64<class_FileAccess_method_store_64>` .. rst-class:: classref-method -void **store_64** **(** :ref:`int<class_int>` value **)** +|void| **store_64**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileAccess_method_store_64>` Stores an integer as 64 bits in the file. @@ -907,7 +1133,7 @@ Stores an integer as 64 bits in the file. .. rst-class:: classref-method -void **store_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +|void| **store_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_FileAccess_method_store_buffer>` Stores the given array of bytes in the file. @@ -919,7 +1145,7 @@ Stores the given array of bytes in the file. .. rst-class:: classref-method -void **store_csv_line** **(** :ref:`PackedStringArray<class_PackedStringArray>` values, :ref:`String<class_String>` delim="," **)** +|void| **store_csv_line**\ (\ values\: :ref:`PackedStringArray<class_PackedStringArray>`, delim\: :ref:`String<class_String>` = ","\ ) :ref:`🔗<class_FileAccess_method_store_csv_line>` Store the given :ref:`PackedStringArray<class_PackedStringArray>` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter ``delim`` to use other than the default ``","`` (comma). This delimiter must be one-character long. @@ -933,7 +1159,7 @@ Text will be encoded as UTF-8. .. rst-class:: classref-method -void **store_double** **(** :ref:`float<class_float>` value **)** +|void| **store_double**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_double>` Stores a floating-point number as 64 bits in the file. @@ -945,7 +1171,7 @@ Stores a floating-point number as 64 bits in the file. .. rst-class:: classref-method -void **store_float** **(** :ref:`float<class_float>` value **)** +|void| **store_float**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_float>` Stores a floating-point number as 32 bits in the file. @@ -957,7 +1183,7 @@ Stores a floating-point number as 32 bits in the file. .. rst-class:: classref-method -void **store_line** **(** :ref:`String<class_String>` line **)** +|void| **store_line**\ (\ line\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_line>` Appends ``line`` to the file followed by a line return character (``\n``), encoding the text as UTF-8. @@ -969,7 +1195,7 @@ Appends ``line`` to the file followed by a line return character (``\n``), encod .. rst-class:: classref-method -void **store_pascal_string** **(** :ref:`String<class_String>` string **)** +|void| **store_pascal_string**\ (\ string\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_pascal_string>` Stores the given :ref:`String<class_String>` as a line in the file in Pascal format (i.e. also store the length of the string). @@ -983,7 +1209,7 @@ Text will be encoded as UTF-8. .. rst-class:: classref-method -void **store_real** **(** :ref:`float<class_float>` value **)** +|void| **store_real**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FileAccess_method_store_real>` Stores a floating-point number in the file. @@ -995,7 +1221,7 @@ Stores a floating-point number in the file. .. rst-class:: classref-method -void **store_string** **(** :ref:`String<class_String>` string **)** +|void| **store_string**\ (\ string\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileAccess_method_store_string>` Appends ``string`` to the file without a line return, encoding the text as UTF-8. @@ -1009,13 +1235,13 @@ Appends ``string`` to the file without a line return, encoding the text as UTF-8 .. rst-class:: classref-method -void **store_var** **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` full_objects=false **)** +|void| **store_var**\ (\ value\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_FileAccess_method_store_var>` Stores any Variant value in the file. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_to_bytes<class_@GlobalScope_method_var_to_bytes>` method. -\ **Note:** Not all properties are included. Only properties that are configured with the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE<class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>` flag set will be serialized. You can add a new usage flag to a property by overriding the :ref:`Object._get_property_list<class_Object_method__get_property_list>` method in your class. You can also check how property usage is configured by calling :ref:`Object._get_property_list<class_Object_method__get_property_list>`. See :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` for the possible usage flags. +\ **Note:** Not all properties are included. Only properties that are configured with the :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE<class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>` flag set will be serialized. You can add a new usage flag to a property by overriding the :ref:`Object._get_property_list<class_Object_private_method__get_property_list>` method in your class. You can also check how property usage is configured by calling :ref:`Object._get_property_list<class_Object_private_method__get_property_list>`. See :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` for the possible usage flags. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1024,3 +1250,4 @@ Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index 22831cdb831..29bc9d9638e 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -46,6 +46,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`mode_overrides_title<class_FileDialog_property_mode_overrides_title>` | ``true`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`option_count<class_FileDialog_property_option_count>` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`root_subfolder<class_FileDialog_property_root_subfolder>` | ``""`` | +---------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`show_hidden_files<class_FileDialog_property_show_hidden_files>` | ``false`` | @@ -63,19 +65,35 @@ Methods .. table:: :widths: auto - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_filter<class_FileDialog_method_add_filter>` **(** :ref:`String<class_String>` filter, :ref:`String<class_String>` description="" **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_filters<class_FileDialog_method_clear_filters>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect_all<class_FileDialog_method_deselect_all>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_FileDialog_method_get_line_edit>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_vbox<class_FileDialog_method_get_vbox>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`invalidate<class_FileDialog_method_invalidate>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_filter<class_FileDialog_method_add_filter>`\ (\ filter\: :ref:`String<class_String>`, description\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_option<class_FileDialog_method_add_option>`\ (\ name\: :ref:`String<class_String>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`, default_value_index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_filters<class_FileDialog_method_clear_filters>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect_all<class_FileDialog_method_deselect_all>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_FileDialog_method_get_line_edit>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_option_default<class_FileDialog_method_get_option_default>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_option_name<class_FileDialog_method_get_option_name>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_option_values<class_FileDialog_method_get_option_values>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_selected_options<class_FileDialog_method_get_selected_options>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_vbox<class_FileDialog_method_get_vbox>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`invalidate<class_FileDialog_method_invalidate>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_default<class_FileDialog_method_set_option_default>`\ (\ option\: :ref:`int<class_int>`, default_value_index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_name<class_FileDialog_method_set_option_name>`\ (\ option\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_option_values<class_FileDialog_method_set_option_values>`\ (\ option\: :ref:`int<class_int>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -94,6 +112,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`back_folder<class_FileDialog_theme_icon_back_folder>` | | +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`create_folder<class_FileDialog_theme_icon_create_folder>` | | + +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`file<class_FileDialog_theme_icon_file>` | | +-----------------------------------+------------------------------------------------------------------------------+--------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`folder<class_FileDialog_theme_icon_folder>` | | @@ -120,7 +140,7 @@ Signals .. rst-class:: classref-signal -**dir_selected** **(** :ref:`String<class_String>` dir **)** +**dir_selected**\ (\ dir\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileDialog_signal_dir_selected>` Emitted when the user selects a directory. @@ -132,7 +152,7 @@ Emitted when the user selects a directory. .. rst-class:: classref-signal -**file_selected** **(** :ref:`String<class_String>` path **)** +**file_selected**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileDialog_signal_file_selected>` Emitted when the user selects a file by double-clicking it or pressing the **OK** button. @@ -144,7 +164,7 @@ Emitted when the user selects a file by double-clicking it or pressing the **OK* .. rst-class:: classref-signal -**files_selected** **(** :ref:`PackedStringArray<class_PackedStringArray>` paths **)** +**files_selected**\ (\ paths\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_FileDialog_signal_files_selected>` Emitted when the user selects multiple files. @@ -161,7 +181,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FileMode**: +enum **FileMode**: :ref:`🔗<enum_FileDialog_FileMode>` .. _class_FileDialog_constant_FILE_MODE_OPEN_FILE: @@ -211,7 +231,7 @@ The dialog will warn when a file exists. .. rst-class:: classref-enumeration -enum **Access**: +enum **Access**: :ref:`🔗<enum_FileDialog_Access>` .. _class_FileDialog_constant_ACCESS_RESOURCES: @@ -250,12 +270,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Access<enum_FileDialog_Access>` **access** = ``0`` +:ref:`Access<enum_FileDialog_Access>` **access** = ``0`` :ref:`🔗<class_FileDialog_property_access>` .. rst-class:: classref-property-setget -- void **set_access** **(** :ref:`Access<enum_FileDialog_Access>` value **)** -- :ref:`Access<enum_FileDialog_Access>` **get_access** **(** **)** +- |void| **set_access**\ (\ value\: :ref:`Access<enum_FileDialog_Access>`\ ) +- :ref:`Access<enum_FileDialog_Access>` **get_access**\ (\ ) The file system access scope. See :ref:`Access<enum_FileDialog_Access>` constants. @@ -269,12 +289,12 @@ The file system access scope. See :ref:`Access<enum_FileDialog_Access>` constant .. rst-class:: classref-property -:ref:`String<class_String>` **current_dir** +:ref:`String<class_String>` **current_dir** :ref:`🔗<class_FileDialog_property_current_dir>` .. rst-class:: classref-property-setget -- void **set_current_dir** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_dir** **(** **)** +- |void| **set_current_dir**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_dir**\ (\ ) The current working directory of the file dialog. @@ -286,12 +306,12 @@ The current working directory of the file dialog. .. rst-class:: classref-property -:ref:`String<class_String>` **current_file** +:ref:`String<class_String>` **current_file** :ref:`🔗<class_FileDialog_property_current_file>` .. rst-class:: classref-property-setget -- void **set_current_file** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_file** **(** **)** +- |void| **set_current_file**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_file**\ (\ ) The currently selected file of the file dialog. @@ -303,12 +323,12 @@ The currently selected file of the file dialog. .. rst-class:: classref-property -:ref:`String<class_String>` **current_path** +:ref:`String<class_String>` **current_path** :ref:`🔗<class_FileDialog_property_current_path>` .. rst-class:: classref-property-setget -- void **set_current_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_current_path** **(** **)** +- |void| **set_current_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_current_path**\ (\ ) The currently selected file path of the file dialog. @@ -320,12 +340,12 @@ The currently selected file path of the file dialog. .. rst-class:: classref-property -:ref:`FileMode<enum_FileDialog_FileMode>` **file_mode** = ``4`` +:ref:`FileMode<enum_FileDialog_FileMode>` **file_mode** = ``4`` :ref:`🔗<class_FileDialog_property_file_mode>` .. rst-class:: classref-property-setget -- void **set_file_mode** **(** :ref:`FileMode<enum_FileDialog_FileMode>` value **)** -- :ref:`FileMode<enum_FileDialog_FileMode>` **get_file_mode** **(** **)** +- |void| **set_file_mode**\ (\ value\: :ref:`FileMode<enum_FileDialog_FileMode>`\ ) +- :ref:`FileMode<enum_FileDialog_FileMode>` **get_file_mode**\ (\ ) The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode<enum_FileDialog_FileMode>`. @@ -337,14 +357,16 @@ The dialog's open or save mode, which affects the selection behavior. See :ref:` .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **filters** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **filters** = ``PackedStringArray()`` :ref:`🔗<class_FileDialog_property_filters>` .. rst-class:: classref-property-setget -- void **set_filters** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_filters** **(** **)** +- |void| **set_filters**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_filters**\ (\ ) -The available file type filters. For example, this shows only ``.png`` and ``.gd`` files: ``set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))``. Multiple file types can also be specified in a single filter. ``"*.png, *.jpg, *.jpeg ; Supported Images"`` will show both PNG and JPEG files when selected. +The available file type filters. Each filter string in the array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. .. rst-class:: classref-item-separator @@ -354,12 +376,12 @@ The available file type filters. For example, this shows only ``.png`` and ``.gd .. rst-class:: classref-property -:ref:`bool<class_bool>` **mode_overrides_title** = ``true`` +:ref:`bool<class_bool>` **mode_overrides_title** = ``true`` :ref:`🔗<class_FileDialog_property_mode_overrides_title>` .. rst-class:: classref-property-setget -- void **set_mode_overrides_title** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_mode_overriding_title** **(** **)** +- |void| **set_mode_overrides_title**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_mode_overriding_title**\ (\ ) If ``true``, changing the :ref:`file_mode<class_FileDialog_property_file_mode>` property will set the window title accordingly (e.g. setting :ref:`file_mode<class_FileDialog_property_file_mode>` to :ref:`FILE_MODE_OPEN_FILE<class_FileDialog_constant_FILE_MODE_OPEN_FILE>` will change the window title to "Open a File"). @@ -367,16 +389,33 @@ If ``true``, changing the :ref:`file_mode<class_FileDialog_property_file_mode>` ---- +.. _class_FileDialog_property_option_count: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **option_count** = ``0`` :ref:`🔗<class_FileDialog_property_option_count>` + +.. rst-class:: classref-property-setget + +- |void| **set_option_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_option_count**\ (\ ) + +The number of additional :ref:`OptionButton<class_OptionButton>`\ s and :ref:`CheckBox<class_CheckBox>`\ es in the dialog. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_property_root_subfolder: .. rst-class:: classref-property -:ref:`String<class_String>` **root_subfolder** = ``""`` +:ref:`String<class_String>` **root_subfolder** = ``""`` :ref:`🔗<class_FileDialog_property_root_subfolder>` .. rst-class:: classref-property-setget -- void **set_root_subfolder** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_root_subfolder** **(** **)** +- |void| **set_root_subfolder**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_root_subfolder**\ (\ ) If non-empty, the given sub-folder will be "root" of this **FileDialog**, i.e. user won't be able to go to its parent directory. @@ -388,12 +427,12 @@ If non-empty, the given sub-folder will be "root" of this **FileDialog**, i.e. u .. rst-class:: classref-property -:ref:`bool<class_bool>` **show_hidden_files** = ``false`` +:ref:`bool<class_bool>` **show_hidden_files** = ``false`` :ref:`🔗<class_FileDialog_property_show_hidden_files>` .. rst-class:: classref-property-setget -- void **set_show_hidden_files** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_showing_hidden_files** **(** **)** +- |void| **set_show_hidden_files**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_hidden_files**\ (\ ) If ``true``, the dialog will show hidden files. @@ -405,12 +444,12 @@ If ``true``, the dialog will show hidden files. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_native_dialog** = ``false`` +:ref:`bool<class_bool>` **use_native_dialog** = ``false`` :ref:`🔗<class_FileDialog_property_use_native_dialog>` .. rst-class:: classref-property-setget -- void **set_use_native_dialog** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_native_dialog** **(** **)** +- |void| **set_use_native_dialog**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_native_dialog**\ (\ ) If ``true``, :ref:`access<class_FileDialog_property_access>` is set to :ref:`ACCESS_FILESYSTEM<class_FileDialog_constant_ACCESS_FILESYSTEM>`, and it is supported by the current :ref:`DisplayServer<class_DisplayServer>`, OS native dialog will be used instead of custom one. @@ -429,7 +468,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_filter** **(** :ref:`String<class_String>` filter, :ref:`String<class_String>` description="" **)** +|void| **add_filter**\ (\ filter\: :ref:`String<class_String>`, description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_FileDialog_method_add_filter>` Adds a comma-delimited file name ``filter`` option to the **FileDialog** with an optional ``description``, which restricts what files can be picked. @@ -441,11 +480,25 @@ For example, a ``filter`` of ``"*.png, *.jpg"`` and a ``description`` of ``"Imag ---- +.. _class_FileDialog_method_add_option: + +.. rst-class:: classref-method + +|void| **add_option**\ (\ name\: :ref:`String<class_String>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`, default_value_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileDialog_method_add_option>` + +Adds an additional :ref:`OptionButton<class_OptionButton>` to the file dialog. If ``values`` is empty, a :ref:`CheckBox<class_CheckBox>` is added instead. + +\ ``default_value_index`` should be an index of the value in the ``values``. If ``values`` is empty it should be either ``1`` (checked), or ``0`` (unchecked). + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_method_clear_filters: .. rst-class:: classref-method -void **clear_filters** **(** **)** +|void| **clear_filters**\ (\ ) :ref:`🔗<class_FileDialog_method_clear_filters>` Clear all the added filters in the dialog. @@ -457,7 +510,7 @@ Clear all the added filters in the dialog. .. rst-class:: classref-method -void **deselect_all** **(** **)** +|void| **deselect_all**\ (\ ) :ref:`🔗<class_FileDialog_method_deselect_all>` Clear all currently selected items in the dialog. @@ -469,7 +522,7 @@ Clear all currently selected items in the dialog. .. rst-class:: classref-method -:ref:`LineEdit<class_LineEdit>` **get_line_edit** **(** **)** +:ref:`LineEdit<class_LineEdit>` **get_line_edit**\ (\ ) :ref:`🔗<class_FileDialog_method_get_line_edit>` Returns the LineEdit for the selected file. @@ -479,11 +532,59 @@ Returns the LineEdit for the selected file. ---- +.. _class_FileDialog_method_get_option_default: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_option_default**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FileDialog_method_get_option_default>` + +Returns the default value index of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_get_option_name: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_option_name**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FileDialog_method_get_option_name>` + +Returns the name of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_get_option_values: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **get_option_values**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FileDialog_method_get_option_values>` + +Returns an array of values of the :ref:`OptionButton<class_OptionButton>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_get_selected_options: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **get_selected_options**\ (\ ) |const| :ref:`🔗<class_FileDialog_method_get_selected_options>` + +Returns a :ref:`Dictionary<class_Dictionary>` with the selected values of the additional :ref:`OptionButton<class_OptionButton>`\ s and/or :ref:`CheckBox<class_CheckBox>`\ es. :ref:`Dictionary<class_Dictionary>` keys are names and values are selected value indices. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_method_get_vbox: .. rst-class:: classref-method -:ref:`VBoxContainer<class_VBoxContainer>` **get_vbox** **(** **)** +:ref:`VBoxContainer<class_VBoxContainer>` **get_vbox**\ (\ ) :ref:`🔗<class_FileDialog_method_get_vbox>` Returns the vertical box container of the dialog, custom controls can be added to it. @@ -497,10 +598,46 @@ Returns the vertical box container of the dialog, custom controls can be added t .. rst-class:: classref-method -void **invalidate** **(** **)** +|void| **invalidate**\ (\ ) :ref:`🔗<class_FileDialog_method_invalidate>` Invalidate and update the current dialog content list. +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_set_option_default: + +.. rst-class:: classref-method + +|void| **set_option_default**\ (\ option\: :ref:`int<class_int>`, default_value_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FileDialog_method_set_option_default>` + +Sets the default value index of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_set_option_name: + +.. rst-class:: classref-method + +|void| **set_option_name**\ (\ option\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileDialog_method_set_option_name>` + +Sets the name of the :ref:`OptionButton<class_OptionButton>` or :ref:`CheckBox<class_CheckBox>` with index ``option``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FileDialog_method_set_option_values: + +.. rst-class:: classref-method + +|void| **set_option_values**\ (\ option\: :ref:`int<class_int>`, values\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_FileDialog_method_set_option_values>` + +Sets the option values of the :ref:`OptionButton<class_OptionButton>` with index ``option``. + .. rst-class:: classref-section-separator ---- @@ -514,7 +651,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **file_disabled_color** = ``Color(1, 1, 1, 0.25)`` +:ref:`Color<class_Color>` **file_disabled_color** = ``Color(1, 1, 1, 0.25)`` :ref:`🔗<class_FileDialog_theme_color_file_disabled_color>` The color tint for disabled files (when the **FileDialog** is used in open folder mode). @@ -526,7 +663,7 @@ The color tint for disabled files (when the **FileDialog** is used in open folde .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **file_icon_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **file_icon_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_FileDialog_theme_color_file_icon_color>` The color modulation applied to the file icon. @@ -538,7 +675,7 @@ The color modulation applied to the file icon. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **folder_icon_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **folder_icon_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_FileDialog_theme_color_folder_icon_color>` The color modulation applied to the folder icon. @@ -550,7 +687,7 @@ The color modulation applied to the folder icon. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **back_folder** +:ref:`Texture2D<class_Texture2D>` **back_folder** :ref:`🔗<class_FileDialog_theme_icon_back_folder>` Custom icon for the back arrow. @@ -558,11 +695,23 @@ Custom icon for the back arrow. ---- +.. _class_FileDialog_theme_icon_create_folder: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **create_folder** :ref:`🔗<class_FileDialog_theme_icon_create_folder>` + +Custom icon for the create folder button. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileDialog_theme_icon_file: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **file** +:ref:`Texture2D<class_Texture2D>` **file** :ref:`🔗<class_FileDialog_theme_icon_file>` Custom icon for files. @@ -574,7 +723,7 @@ Custom icon for files. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **folder** +:ref:`Texture2D<class_Texture2D>` **folder** :ref:`🔗<class_FileDialog_theme_icon_folder>` Custom icon for folders. @@ -586,7 +735,7 @@ Custom icon for folders. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **forward_folder** +:ref:`Texture2D<class_Texture2D>` **forward_folder** :ref:`🔗<class_FileDialog_theme_icon_forward_folder>` Custom icon for the forward arrow. @@ -598,7 +747,7 @@ Custom icon for the forward arrow. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **parent_folder** +:ref:`Texture2D<class_Texture2D>` **parent_folder** :ref:`🔗<class_FileDialog_theme_icon_parent_folder>` Custom icon for the parent folder arrow. @@ -610,7 +759,7 @@ Custom icon for the parent folder arrow. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **reload** +:ref:`Texture2D<class_Texture2D>` **reload** :ref:`🔗<class_FileDialog_theme_icon_reload>` Custom icon for the reload button. @@ -622,7 +771,7 @@ Custom icon for the reload button. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **toggle_hidden** +:ref:`Texture2D<class_Texture2D>` **toggle_hidden** :ref:`🔗<class_FileDialog_theme_icon_toggle_hidden>` Custom icon for the toggle hidden button. @@ -633,3 +782,4 @@ Custom icon for the toggle hidden button. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_filesystemdock.rst b/classes/class_filesystemdock.rst index 2f9f4f8d32a..7b5d6eb8fe3 100644 --- a/classes/class_filesystemdock.rst +++ b/classes/class_filesystemdock.rst @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_resource_tooltip_plugin<class_FileSystemDock_method_add_resource_tooltip_plugin>` **(** :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>` plugin **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`navigate_to_path<class_FileSystemDock_method_navigate_to_path>` **(** :ref:`String<class_String>` path **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_resource_tooltip_plugin<class_FileSystemDock_method_remove_resource_tooltip_plugin>` **(** :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>` plugin **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_resource_tooltip_plugin<class_FileSystemDock_method_add_resource_tooltip_plugin>`\ (\ plugin\: :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`navigate_to_path<class_FileSystemDock_method_navigate_to_path>`\ (\ path\: :ref:`String<class_String>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_resource_tooltip_plugin<class_FileSystemDock_method_remove_resource_tooltip_plugin>`\ (\ plugin\: :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +52,7 @@ Signals .. rst-class:: classref-signal -**display_mode_changed** **(** **)** +**display_mode_changed**\ (\ ) :ref:`🔗<class_FileSystemDock_signal_display_mode_changed>` Emitted when the user switches file display mode or split mode. @@ -64,7 +64,7 @@ Emitted when the user switches file display mode or split mode. .. rst-class:: classref-signal -**file_removed** **(** :ref:`String<class_String>` file **)** +**file_removed**\ (\ file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_signal_file_removed>` Emitted when the given ``file`` was removed. @@ -76,7 +76,7 @@ Emitted when the given ``file`` was removed. .. rst-class:: classref-signal -**files_moved** **(** :ref:`String<class_String>` old_file, :ref:`String<class_String>` new_file **)** +**files_moved**\ (\ old_file\: :ref:`String<class_String>`, new_file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_signal_files_moved>` Emitted when a file is moved from ``old_file`` path to ``new_file`` path. @@ -84,11 +84,23 @@ Emitted when a file is moved from ``old_file`` path to ``new_file`` path. ---- +.. _class_FileSystemDock_signal_folder_color_changed: + +.. rst-class:: classref-signal + +**folder_color_changed**\ (\ ) :ref:`🔗<class_FileSystemDock_signal_folder_color_changed>` + +Emitted when folders change color. + +.. rst-class:: classref-item-separator + +---- + .. _class_FileSystemDock_signal_folder_moved: .. rst-class:: classref-signal -**folder_moved** **(** :ref:`String<class_String>` old_folder, :ref:`String<class_String>` new_folder **)** +**folder_moved**\ (\ old_folder\: :ref:`String<class_String>`, new_folder\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_signal_folder_moved>` Emitted when a folder is moved from ``old_folder`` path to ``new_folder`` path. @@ -100,7 +112,7 @@ Emitted when a folder is moved from ``old_folder`` path to ``new_folder`` path. .. rst-class:: classref-signal -**folder_removed** **(** :ref:`String<class_String>` folder **)** +**folder_removed**\ (\ folder\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_signal_folder_removed>` Emitted when the given ``folder`` was removed. @@ -112,7 +124,7 @@ Emitted when the given ``folder`` was removed. .. rst-class:: classref-signal -**inherit** **(** :ref:`String<class_String>` file **)** +**inherit**\ (\ file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_signal_inherit>` Emitted when a new scene is created that inherits the scene at ``file`` path. @@ -124,7 +136,7 @@ Emitted when a new scene is created that inherits the scene at ``file`` path. .. rst-class:: classref-signal -**instantiate** **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)** +**instantiate**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_FileSystemDock_signal_instantiate>` Emitted when the given scenes are being instantiated in the editor. @@ -136,7 +148,7 @@ Emitted when the given scenes are being instantiated in the editor. .. rst-class:: classref-signal -**resource_removed** **(** :ref:`Resource<class_Resource>` resource **)** +**resource_removed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_FileSystemDock_signal_resource_removed>` Emitted when an external ``resource`` had its file removed. @@ -153,7 +165,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_resource_tooltip_plugin** **(** :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>` plugin **)** +|void| **add_resource_tooltip_plugin**\ (\ plugin\: :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`\ ) :ref:`🔗<class_FileSystemDock_method_add_resource_tooltip_plugin>` Registers a new :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`. @@ -165,7 +177,7 @@ Registers a new :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlu .. rst-class:: classref-method -void **navigate_to_path** **(** :ref:`String<class_String>` path **)** +|void| **navigate_to_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FileSystemDock_method_navigate_to_path>` Sets the given ``path`` as currently selected, ensuring that the selected file/directory is visible. @@ -177,7 +189,7 @@ Sets the given ``path`` as currently selected, ensuring that the selected file/d .. rst-class:: classref-method -void **remove_resource_tooltip_plugin** **(** :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>` plugin **)** +|void| **remove_resource_tooltip_plugin**\ (\ plugin\: :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`\ ) :ref:`🔗<class_FileSystemDock_method_remove_resource_tooltip_plugin>` Removes an :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`. Fails if the plugin wasn't previously added. @@ -188,3 +200,4 @@ Removes an :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_float.rst b/classes/class_float.rst index df14c36d046..9e1f3088345 100644 --- a/classes/class_float.rst +++ b/classes/class_float.rst @@ -10,7 +10,7 @@ float ===== -A built-in type for floating point numbers. +A built-in type for floating-point numbers. .. rst-class:: classref-introduction-group @@ -40,17 +40,17 @@ Constructors .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>` **(** **)** | - +---------------------------+------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>` **(** :ref:`float<class_float>` from **)** | - +---------------------------+------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>` **(** :ref:`String<class_String>` from **)** | - +---------------------------+------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>` **(** :ref:`bool<class_bool>` from **)** | - +---------------------------+------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>` **(** :ref:`int<class_int>` from **)** | - +---------------------------+------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>`\ (\ from\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>`\ (\ from\: :ref:`String<class_String>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>`\ (\ from\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`float<class_float_constructor_float>`\ (\ from\: :ref:`int<class_int>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -60,71 +60,71 @@ Operators .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_float_operator_neq_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_float_operator_neq_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`operator *<class_float_operator_mul_Color>` **(** :ref:`Color<class_Color>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_float_operator_mul_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_float_operator_mul_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_float_operator_mul_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_float_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_float_operator_mul_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_float_operator_mul_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_float_operator_mul_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator *<class_float_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator *<class_float_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator **<class_float_operator_pow_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator **<class_float_operator_pow_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator +<class_float_operator_sum_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator +<class_float_operator_sum_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator -<class_float_operator_dif_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator -<class_float_operator_dif_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator /<class_float_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator /<class_float_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_float_operator_lt_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_float_operator_lt_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_float_operator_lte_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_float_operator_lte_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_float_operator_eq_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_float_operator_eq_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_float_operator_gt_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_float_operator_gt_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_float_operator_gte_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_float_operator_gte_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator unary+<class_float_operator_unplus>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator unary-<class_float_operator_unminus>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_float_operator_neq_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_float_operator_neq_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`operator *<class_float_operator_mul_Color>`\ (\ right\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_float_operator_mul_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_float_operator_mul_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_float_operator_mul_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_float_operator_mul_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_float_operator_mul_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_float_operator_mul_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_float_operator_mul_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator *<class_float_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator *<class_float_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator **<class_float_operator_pow_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator **<class_float_operator_pow_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator +<class_float_operator_sum_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator +<class_float_operator_sum_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator -<class_float_operator_dif_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator -<class_float_operator_dif_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator /<class_float_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator /<class_float_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_float_operator_lt_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_float_operator_lt_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_float_operator_lte_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_float_operator_lte_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_float_operator_eq_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_float_operator_eq_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_float_operator_gt_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_float_operator_gt_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_float_operator_gte_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_float_operator_gte_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator unary+<class_float_operator_unplus>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator unary-<class_float_operator_unminus>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,7 +139,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`float<class_float>` **float** **(** **)** +:ref:`float<class_float>` **float**\ (\ ) :ref:`🔗<class_float_constructor_float>` Constructs a default-initialized **float** set to ``0.0``. @@ -149,7 +149,7 @@ Constructs a default-initialized **float** set to ``0.0``. .. rst-class:: classref-constructor -:ref:`float<class_float>` **float** **(** :ref:`float<class_float>` from **)** +:ref:`float<class_float>` **float**\ (\ from\: :ref:`float<class_float>`\ ) Constructs a **float** as a copy of the given **float**. @@ -159,7 +159,7 @@ Constructs a **float** as a copy of the given **float**. .. rst-class:: classref-constructor -:ref:`float<class_float>` **float** **(** :ref:`String<class_String>` from **)** +:ref:`float<class_float>` **float**\ (\ from\: :ref:`String<class_String>`\ ) Converts a :ref:`String<class_String>` to a **float**, following the same rules as :ref:`String.to_float<class_String_method_to_float>`. @@ -169,7 +169,7 @@ Converts a :ref:`String<class_String>` to a **float**, following the same rules .. rst-class:: classref-constructor -:ref:`float<class_float>` **float** **(** :ref:`bool<class_bool>` from **)** +:ref:`float<class_float>` **float**\ (\ from\: :ref:`bool<class_bool>`\ ) Cast a :ref:`bool<class_bool>` value to a floating-point value, ``float(true)`` will be equal to 1.0 and ``float(false)`` will be equal to 0.0. @@ -179,7 +179,7 @@ Cast a :ref:`bool<class_bool>` value to a floating-point value, ``float(true)`` .. rst-class:: classref-constructor -:ref:`float<class_float>` **float** **(** :ref:`int<class_int>` from **)** +:ref:`float<class_float>` **float**\ (\ from\: :ref:`int<class_int>`\ ) Cast an :ref:`int<class_int>` value to a floating-point value, ``float(1)`` will be equal to ``1.0``. @@ -196,7 +196,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_neq_float>` Returns ``true`` if two floats are different from each other. @@ -210,7 +210,7 @@ Returns ``true`` if two floats are different from each other. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_neq_int>` Returns ``true`` if the integer has different value than the float. @@ -222,13 +222,13 @@ Returns ``true`` if the integer has different value than the float. .. rst-class:: classref-operator -:ref:`Color<class_Color>` **operator *** **(** :ref:`Color<class_Color>` right **)** +:ref:`Color<class_Color>` **operator ***\ (\ right\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_float_operator_mul_Color>` Multiplies each component of the :ref:`Color<class_Color>`, including the alpha, by the given **float**. :: - print(1.5 * Color(0.5, 0.5, 0.5)) # Color(0.75, 0.75, 0.75) + print(1.5 * Color(0.5, 0.5, 0.5)) # Prints "(0.75, 0.75, 0.75, 1.5)" .. rst-class:: classref-item-separator @@ -238,7 +238,7 @@ Multiplies each component of the :ref:`Color<class_Color>`, including the alpha, .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator *** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator ***\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_float_operator_mul_Quaternion>` Multiplies each component of the :ref:`Quaternion<class_Quaternion>` by the given **float**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. @@ -250,7 +250,7 @@ Multiplies each component of the :ref:`Quaternion<class_Quaternion>` by the give .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_float_operator_mul_Vector2>` Multiplies each component of the :ref:`Vector2<class_Vector2>` by the given **float**. @@ -266,7 +266,7 @@ Multiplies each component of the :ref:`Vector2<class_Vector2>` by the given **fl .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_float_operator_mul_Vector2i>` Multiplies each component of the :ref:`Vector2i<class_Vector2i>` by the given **float**. Returns a :ref:`Vector2<class_Vector2>`. @@ -282,7 +282,7 @@ Multiplies each component of the :ref:`Vector2i<class_Vector2i>` by the given ** .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_float_operator_mul_Vector3>` Multiplies each component of the :ref:`Vector3<class_Vector3>` by the given **float**. @@ -294,7 +294,7 @@ Multiplies each component of the :ref:`Vector3<class_Vector3>` by the given **fl .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_float_operator_mul_Vector3i>` Multiplies each component of the :ref:`Vector3i<class_Vector3i>` by the given **float**. Returns a :ref:`Vector3<class_Vector3>`. @@ -310,7 +310,7 @@ Multiplies each component of the :ref:`Vector3i<class_Vector3i>` by the given ** .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_float_operator_mul_Vector4>` Multiplies each component of the :ref:`Vector4<class_Vector4>` by the given **float**. @@ -322,7 +322,7 @@ Multiplies each component of the :ref:`Vector4<class_Vector4>` by the given **fl .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_float_operator_mul_Vector4i>` Multiplies each component of the :ref:`Vector4i<class_Vector4i>` by the given **float**. Returns a :ref:`Vector4<class_Vector4>`. @@ -338,7 +338,7 @@ Multiplies each component of the :ref:`Vector4i<class_Vector4i>` by the given ** .. rst-class:: classref-operator -:ref:`float<class_float>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_mul_float>` Multiplies two **float**\ s. @@ -350,7 +350,7 @@ Multiplies two **float**\ s. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`float<class_float>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_mul_int>` Multiplies a **float** and an :ref:`int<class_int>`. The result is a **float**. @@ -362,7 +362,7 @@ Multiplies a **float** and an :ref:`int<class_int>`. The result is a **float**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator **** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator ****\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_pow_float>` Raises a **float** to a power of a **float**. @@ -378,7 +378,7 @@ Raises a **float** to a power of a **float**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator **** **(** :ref:`int<class_int>` right **)** +:ref:`float<class_float>` **operator ****\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_pow_int>` Raises a **float** to a power of an :ref:`int<class_int>`. The result is a **float**. @@ -394,7 +394,7 @@ Raises a **float** to a power of an :ref:`int<class_int>`. The result is a **flo .. rst-class:: classref-operator -:ref:`float<class_float>` **operator +** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator +**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_sum_float>` Adds two floats. @@ -406,7 +406,7 @@ Adds two floats. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator +** **(** :ref:`int<class_int>` right **)** +:ref:`float<class_float>` **operator +**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_sum_int>` Adds a **float** and an :ref:`int<class_int>`. The result is a **float**. @@ -418,7 +418,7 @@ Adds a **float** and an :ref:`int<class_int>`. The result is a **float**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator -** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator -**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_dif_float>` Subtracts a float from a float. @@ -430,7 +430,7 @@ Subtracts a float from a float. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator -** **(** :ref:`int<class_int>` right **)** +:ref:`float<class_float>` **operator -**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_dif_int>` Subtracts an :ref:`int<class_int>` from a **float**. The result is a **float**. @@ -442,7 +442,7 @@ Subtracts an :ref:`int<class_int>` from a **float**. The result is a **float**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_div_float>` Divides two floats. @@ -454,7 +454,7 @@ Divides two floats. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`float<class_float>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_div_int>` Divides a **float** by an :ref:`int<class_int>`. The result is a **float**. @@ -466,7 +466,7 @@ Divides a **float** by an :ref:`int<class_int>`. The result is a **float**. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_lt_float>` Returns ``true`` if the left float is less than the right one. @@ -480,7 +480,7 @@ Returns ``true`` if the left float is less than the right one. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_lt_int>` Returns ``true`` if this **float** is less than the given :ref:`int<class_int>`. @@ -492,7 +492,7 @@ Returns ``true`` if this **float** is less than the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_lte_float>` Returns ``true`` if the left float is less than or equal to the right one. @@ -506,7 +506,7 @@ Returns ``true`` if the left float is less than or equal to the right one. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_lte_int>` Returns ``true`` if this **float** is less than or equal to the given :ref:`int<class_int>`. @@ -518,7 +518,7 @@ Returns ``true`` if this **float** is less than or equal to the given :ref:`int< .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_eq_float>` Returns ``true`` if both floats are exactly equal. @@ -534,7 +534,7 @@ Returns ``true`` if both floats are exactly equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_eq_int>` Returns ``true`` if the **float** and the given :ref:`int<class_int>` are equal. @@ -546,7 +546,7 @@ Returns ``true`` if the **float** and the given :ref:`int<class_int>` are equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_gt_float>` Returns ``true`` if the left float is greater than the right one. @@ -560,7 +560,7 @@ Returns ``true`` if the left float is greater than the right one. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_gt_int>` Returns ``true`` if this **float** is greater than the given :ref:`int<class_int>`. @@ -572,7 +572,7 @@ Returns ``true`` if this **float** is greater than the given :ref:`int<class_int .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_float_operator_gte_float>` Returns ``true`` if the left float is greater than or equal to the right one. @@ -586,7 +586,7 @@ Returns ``true`` if the left float is greater than or equal to the right one. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_float_operator_gte_int>` Returns ``true`` if this **float** is greater than or equal to the given :ref:`int<class_int>`. @@ -598,7 +598,7 @@ Returns ``true`` if this **float** is greater than or equal to the given :ref:`i .. rst-class:: classref-operator -:ref:`float<class_float>` **operator unary+** **(** **)** +:ref:`float<class_float>` **operator unary+**\ (\ ) :ref:`🔗<class_float_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -610,7 +610,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`float<class_float>` **operator unary-** **(** **)** +:ref:`float<class_float>` **operator unary-**\ (\ ) :ref:`🔗<class_float_operator_unminus>` Returns the negative value of the **float**. If positive, turns the number negative. If negative, turns the number positive. With floats, the number zero can be either positive or negative. @@ -621,3 +621,4 @@ Returns the negative value of the **float**. If positive, turns the number negat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_flowcontainer.rst b/classes/class_flowcontainer.rst index f1102e108ed..53c65e8c136 100644 --- a/classes/class_flowcontainer.rst +++ b/classes/class_flowcontainer.rst @@ -38,11 +38,15 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+----------------------------------------------------------+-----------+ - | :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` | :ref:`alignment<class_FlowContainer_property_alignment>` | ``0`` | - +--------------------------------------------------------+----------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`vertical<class_FlowContainer_property_vertical>` | ``false`` | - +--------------------------------------------------------+----------------------------------------------------------+-----------+ + +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` | :ref:`alignment<class_FlowContainer_property_alignment>` | ``0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` | :ref:`last_wrap_alignment<class_FlowContainer_property_last_wrap_alignment>` | ``0`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`reverse_fill<class_FlowContainer_property_reverse_fill>` | ``false`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`vertical<class_FlowContainer_property_vertical>` | ``false`` | + +------------------------------------------------------------------------+------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -52,9 +56,9 @@ Methods .. table:: :widths: auto - +-----------------------+--------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_count<class_FlowContainer_method_get_line_count>` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------+ + +-----------------------+--------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_count<class_FlowContainer_method_get_line_count>`\ (\ ) |const| | + +-----------------------+--------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -83,7 +87,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AlignmentMode**: +enum **AlignmentMode**: :ref:`🔗<enum_FlowContainer_AlignmentMode>` .. _class_FlowContainer_constant_ALIGNMENT_BEGIN: @@ -109,6 +113,48 @@ The child controls will be centered in the container. The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). +.. rst-class:: classref-item-separator + +---- + +.. _enum_FlowContainer_LastWrapAlignmentMode: + +.. rst-class:: classref-enumeration + +enum **LastWrapAlignmentMode**: :ref:`🔗<enum_FlowContainer_LastWrapAlignmentMode>` + +.. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_INHERIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_INHERIT** = ``0`` + +The last partially filled row or column will wrap aligned to the previous row or column in accordance with :ref:`alignment<class_FlowContainer_property_alignment>`. + +.. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_BEGIN: + +.. rst-class:: classref-enumeration-constant + +:ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_BEGIN** = ``1`` + +The last partially filled row or column will wrap aligned to the beginning of the previous row or column. + +.. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_CENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_CENTER** = ``2`` + +The last partially filled row or column will wrap aligned to the center of the previous row or column. + +.. _class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_END: + +.. rst-class:: classref-enumeration-constant + +:ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **LAST_WRAP_ALIGNMENT_END** = ``3`` + +The last partially filled row or column will wrap aligned to the end of the previous row or column. + .. rst-class:: classref-section-separator ---- @@ -122,12 +168,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **alignment** = ``0`` +:ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **alignment** = ``0`` :ref:`🔗<class_FlowContainer_property_alignment>` .. rst-class:: classref-property-setget -- void **set_alignment** **(** :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` value **)** -- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **get_alignment** **(** **)** +- |void| **set_alignment**\ (\ value\: :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>`\ ) +- :ref:`AlignmentMode<enum_FlowContainer_AlignmentMode>` **get_alignment**\ (\ ) The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN<class_FlowContainer_constant_ALIGNMENT_BEGIN>`, :ref:`ALIGNMENT_CENTER<class_FlowContainer_constant_ALIGNMENT_CENTER>`, or :ref:`ALIGNMENT_END<class_FlowContainer_constant_ALIGNMENT_END>`). @@ -135,16 +181,52 @@ The alignment of the container's children (must be one of :ref:`ALIGNMENT_BEGIN< ---- +.. _class_FlowContainer_property_last_wrap_alignment: + +.. rst-class:: classref-property + +:ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **last_wrap_alignment** = ``0`` :ref:`🔗<class_FlowContainer_property_last_wrap_alignment>` + +.. rst-class:: classref-property-setget + +- |void| **set_last_wrap_alignment**\ (\ value\: :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>`\ ) +- :ref:`LastWrapAlignmentMode<enum_FlowContainer_LastWrapAlignmentMode>` **get_last_wrap_alignment**\ (\ ) + +The wrap behavior of the last, partially filled row or column (must be one of :ref:`LAST_WRAP_ALIGNMENT_INHERIT<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_INHERIT>`, :ref:`LAST_WRAP_ALIGNMENT_BEGIN<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_BEGIN>`, :ref:`LAST_WRAP_ALIGNMENT_CENTER<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_CENTER>`, or :ref:`LAST_WRAP_ALIGNMENT_END<class_FlowContainer_constant_LAST_WRAP_ALIGNMENT_END>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_FlowContainer_property_reverse_fill: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **reverse_fill** = ``false`` :ref:`🔗<class_FlowContainer_property_reverse_fill>` + +.. rst-class:: classref-property-setget + +- |void| **set_reverse_fill**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_reverse_fill**\ (\ ) + +If ``true``, reverses fill direction. Horizontal **FlowContainer**\ s will fill rows bottom to top, vertical **FlowContainer**\ s will fill columns right to left. + +When using a vertical **FlowContainer** with a right to left :ref:`Control.layout_direction<class_Control_property_layout_direction>`, columns will fill left to right instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_FlowContainer_property_vertical: .. rst-class:: classref-property -:ref:`bool<class_bool>` **vertical** = ``false`` +:ref:`bool<class_bool>` **vertical** = ``false`` :ref:`🔗<class_FlowContainer_property_vertical>` .. rst-class:: classref-property-setget -- void **set_vertical** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_vertical** **(** **)** +- |void| **set_vertical**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_vertical**\ (\ ) If ``true``, the **FlowContainer** will arrange its children vertically, rather than horizontally. @@ -163,7 +245,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_FlowContainer_method_get_line_count>` Returns the current line count. @@ -180,9 +262,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_FlowContainer_theme_constant_h_separation>` -The horizontal separation of children nodes. +The horizontal separation of child nodes. .. rst-class:: classref-item-separator @@ -192,9 +274,9 @@ The horizontal separation of children nodes. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **v_separation** = ``4`` +:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_FlowContainer_theme_constant_v_separation>` -The vertical separation of children nodes. +The vertical separation of child nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -203,3 +285,4 @@ The vertical separation of children nodes. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fogmaterial.rst b/classes/class_fogmaterial.rst index cc31a781e83..4a2b18e6624 100644 --- a/classes/class_fogmaterial.rst +++ b/classes/class_fogmaterial.rst @@ -12,7 +12,7 @@ FogMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -:ref:`Material<class_Material>` used with a :ref:`FogVolume<class_FogVolume>` to draw things with the volumetric fog effect. +A material that controls how volumetric fog is rendered, to be assigned to a :ref:`FogVolume<class_FogVolume>`. .. rst-class:: classref-introduction-group @@ -58,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **albedo** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **albedo** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_FogMaterial_property_albedo>` .. rst-class:: classref-property-setget -- void **set_albedo** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_albedo** **(** **)** +- |void| **set_albedo**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_albedo**\ (\ ) The single-scattering :ref:`Color<class_Color>` of the :ref:`FogVolume<class_FogVolume>`. Internally, :ref:`albedo<class_FogMaterial_property_albedo>` is converted into single-scattering, which is additively blended with other :ref:`FogVolume<class_FogVolume>`\ s and the :ref:`Environment.volumetric_fog_albedo<class_Environment_property_volumetric_fog_albedo>`. @@ -75,12 +75,12 @@ The single-scattering :ref:`Color<class_Color>` of the :ref:`FogVolume<class_Fog .. rst-class:: classref-property -:ref:`float<class_float>` **density** = ``1.0`` +:ref:`float<class_float>` **density** = ``1.0`` :ref:`🔗<class_FogMaterial_property_density>` .. rst-class:: classref-property-setget -- void **set_density** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_density** **(** **)** +- |void| **set_density**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_density**\ (\ ) The density of the :ref:`FogVolume<class_FogVolume>`. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other :ref:`FogVolume<class_FogVolume>`\ s or global volumetric fog. @@ -94,12 +94,12 @@ The density of the :ref:`FogVolume<class_FogVolume>`. Denser objects are more op .. rst-class:: classref-property -:ref:`Texture3D<class_Texture3D>` **density_texture** +:ref:`Texture3D<class_Texture3D>` **density_texture** :ref:`🔗<class_FogMaterial_property_density_texture>` .. rst-class:: classref-property-setget -- void **set_density_texture** **(** :ref:`Texture3D<class_Texture3D>` value **)** -- :ref:`Texture3D<class_Texture3D>` **get_density_texture** **(** **)** +- |void| **set_density_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ ) +- :ref:`Texture3D<class_Texture3D>` **get_density_texture**\ (\ ) The 3D texture that is used to scale the :ref:`density<class_FogMaterial_property_density>` of the :ref:`FogVolume<class_FogVolume>`. This can be used to vary fog density within the :ref:`FogVolume<class_FogVolume>` with any kind of static pattern. For animated effects, consider using a custom :doc:`fog shader <../tutorials/shaders/shader_reference/fog_shader>`. @@ -111,12 +111,12 @@ The 3D texture that is used to scale the :ref:`density<class_FogMaterial_propert .. rst-class:: classref-property -:ref:`float<class_float>` **edge_fade** = ``0.1`` +:ref:`float<class_float>` **edge_fade** = ``0.1`` :ref:`🔗<class_FogMaterial_property_edge_fade>` .. rst-class:: classref-property-setget -- void **set_edge_fade** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_edge_fade** **(** **)** +- |void| **set_edge_fade**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_edge_fade**\ (\ ) The hardness of the edges of the :ref:`FogVolume<class_FogVolume>`. A higher value will result in softer edges, while a lower value will result in harder edges. @@ -128,12 +128,12 @@ The hardness of the edges of the :ref:`FogVolume<class_FogVolume>`. A higher val .. rst-class:: classref-property -:ref:`Color<class_Color>` **emission** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **emission** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_FogMaterial_property_emission>` .. rst-class:: classref-property-setget -- void **set_emission** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_emission** **(** **)** +- |void| **set_emission**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_emission**\ (\ ) The :ref:`Color<class_Color>` of the light emitted by the :ref:`FogVolume<class_FogVolume>`. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the :ref:`Color<class_Color>` of the :ref:`FogVolume<class_FogVolume>` independently from light sources. @@ -145,12 +145,12 @@ The :ref:`Color<class_Color>` of the light emitted by the :ref:`FogVolume<class_ .. rst-class:: classref-property -:ref:`float<class_float>` **height_falloff** = ``0.0`` +:ref:`float<class_float>` **height_falloff** = ``0.0`` :ref:`🔗<class_FogMaterial_property_height_falloff>` .. rst-class:: classref-property-setget -- void **set_height_falloff** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height_falloff** **(** **)** +- |void| **set_height_falloff**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height_falloff**\ (\ ) The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of ``0.0`` results in uniform-density fog. The height threshold is determined by the height of the associated :ref:`FogVolume<class_FogVolume>`. @@ -161,3 +161,4 @@ The rate by which the height-based fog decreases in density as height increases .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fogvolume.rst b/classes/class_fogvolume.rst index 768fd3e637e..8d9b06e010d 100644 --- a/classes/class_fogvolume.rst +++ b/classes/class_fogvolume.rst @@ -12,7 +12,7 @@ FogVolume **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -A node used to add local fog with the volumetric fog effect. +A region that contributes to the default volumetric fog from the world environment. .. rst-class:: classref-introduction-group @@ -25,6 +25,13 @@ Performance of **FogVolume**\ s is directly related to their relative size on th \ **Note:** **FogVolume**\ s only have a visible effect if :ref:`Environment.volumetric_fog_enabled<class_Environment_property_volumetric_fog_enabled>` is ``true``. If you don't want fog to be globally visible (but only within **FogVolume** nodes), set :ref:`Environment.volumetric_fog_density<class_Environment_property_volumetric_fog_density>` to ``0.0``. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Volumetric fog and fog volumes <../tutorials/3d/volumetric_fog>` + .. rst-class:: classref-reftable-group Properties @@ -54,12 +61,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material<class_Material>` **material** +:ref:`Material<class_Material>` **material** :ref:`🔗<class_FogVolume_property_material>` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material**\ (\ ) The :ref:`Material<class_Material>` used by the **FogVolume**. Can be either a built-in :ref:`FogMaterial<class_FogMaterial>` or a custom :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -71,12 +78,12 @@ The :ref:`Material<class_Material>` used by the **FogVolume**. Can be either a b .. rst-class:: classref-property -:ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` **shape** = ``3`` +:ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` **shape** = ``3`` :ref:`🔗<class_FogVolume_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` value **)** -- :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>`\ ) +- :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` **get_shape**\ (\ ) The shape of the **FogVolume**. This can be set to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD<class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD>`. @@ -88,12 +95,12 @@ The shape of the **FogVolume**. This can be set to either :ref:`RenderingServer. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_FogVolume_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The size of the **FogVolume** when :ref:`shape<class_FogVolume_property_shape>` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>`. @@ -108,3 +115,4 @@ The size of the **FogVolume** when :ref:`shape<class_FogVolume_property_shape>` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_font.rst b/classes/class_font.rst index 797ba1fa1d8..542dcb1a58d 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -25,81 +25,113 @@ Abstract base class for different font types. It has methods for drawing text an .. rst-class:: classref-reftable-group +Properties +---------- + +.. table:: + :widths: auto + + +------------------------------------------------------+-------------------------------------------------+--------+ + | :ref:`Array<class_Array>`\[:ref:`Font<class_Font>`\] | :ref:`fallbacks<class_Font_property_fallbacks>` | ``[]`` | + +------------------------------------------------------+-------------------------------------------------+--------+ + +.. rst-class:: classref-reftable-group + Methods ------- .. table:: :widths: auto - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`draw_char<class_Font_method_draw_char>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` font_size, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`draw_char_outline<class_Font_method_draw_char_outline>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` font_size, :ref:`int<class_int>` size=-1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string<class_Font_method_draw_multiline_string>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline<class_Font_method_draw_multiline_string_outline>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, :ref:`int<class_int>` size=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string<class_Font_method_draw_string>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline<class_Font_method_draw_string_outline>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` size=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`find_variation<class_Font_method_find_variation>` **(** :ref:`Dictionary<class_Dictionary>` variation_coordinates, :ref:`int<class_int>` face_index=0, :ref:`float<class_float>` strength=0.0, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_ascent<class_Font_method_get_ascent>` **(** :ref:`int<class_int>` font_size=16 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_char_size<class_Font_method_get_char_size>` **(** :ref:`int<class_int>` char, :ref:`int<class_int>` font_size **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_descent<class_Font_method_get_descent>` **(** :ref:`int<class_int>` font_size=16 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_face_count<class_Font_method_get_face_count>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font[]<class_Font>` | :ref:`get_fallbacks<class_Font_method_get_fallbacks>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_font_name<class_Font_method_get_font_name>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_font_stretch<class_Font_method_get_font_stretch>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`get_font_style<class_Font_method_get_font_style>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_font_style_name<class_Font_method_get_font_style_name>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_font_weight<class_Font_method_get_font_weight>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_height<class_Font_method_get_height>` **(** :ref:`int<class_int>` font_size=16 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_multiline_string_size<class_Font_method_get_multiline_string_size>` **(** :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_opentype_features<class_Font_method_get_opentype_features>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_ot_name_strings<class_Font_method_get_ot_name_strings>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`get_rids<class_Font_method_get_rids>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_spacing<class_Font_method_get_spacing>` **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_string_size<class_Font_method_get_string_size>` **(** :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_supported_chars<class_Font_method_get_supported_chars>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_supported_feature_list<class_Font_method_get_supported_feature_list>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_supported_variation_list<class_Font_method_get_supported_variation_list>` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_underline_position<class_Font_method_get_underline_position>` **(** :ref:`int<class_int>` font_size=16 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_underline_thickness<class_Font_method_get_underline_thickness>` **(** :ref:`int<class_int>` font_size=16 **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_char<class_Font_method_has_char>` **(** :ref:`int<class_int>` char **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_language_supported<class_Font_method_is_language_supported>` **(** :ref:`String<class_String>` language **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_script_supported<class_Font_method_is_script_supported>` **(** :ref:`String<class_String>` script **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_capacity<class_Font_method_set_cache_capacity>` **(** :ref:`int<class_int>` single_line, :ref:`int<class_int>` multi_line **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fallbacks<class_Font_method_set_fallbacks>` **(** :ref:`Font[]<class_Font>` fallbacks **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`draw_char<class_Font_method_draw_char>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`draw_char_outline<class_Font_method_draw_char_outline>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`, size\: :ref:`int<class_int>` = -1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string<class_Font_method_draw_multiline_string>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string_outline<class_Font_method_draw_multiline_string_outline>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, size\: :ref:`int<class_int>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string<class_Font_method_draw_string>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string_outline<class_Font_method_draw_string_outline>`\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, size\: :ref:`int<class_int>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`find_variation<class_Font_method_find_variation>`\ (\ variation_coordinates\: :ref:`Dictionary<class_Dictionary>`, face_index\: :ref:`int<class_int>` = 0, strength\: :ref:`float<class_float>` = 0.0, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int<class_int>` = 0, spacing_bottom\: :ref:`int<class_int>` = 0, spacing_space\: :ref:`int<class_int>` = 0, spacing_glyph\: :ref:`int<class_int>` = 0, baseline_offset\: :ref:`float<class_float>` = 0.0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_ascent<class_Font_method_get_ascent>`\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_char_size<class_Font_method_get_char_size>`\ (\ char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_descent<class_Font_method_get_descent>`\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_face_count<class_Font_method_get_face_count>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_font_name<class_Font_method_get_font_name>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_font_stretch<class_Font_method_get_font_stretch>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`get_font_style<class_Font_method_get_font_style>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_font_style_name<class_Font_method_get_font_style_name>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_font_weight<class_Font_method_get_font_weight>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_height<class_Font_method_get_height>`\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_multiline_string_size<class_Font_method_get_multiline_string_size>`\ (\ text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_opentype_features<class_Font_method_get_opentype_features>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_ot_name_strings<class_Font_method_get_ot_name_strings>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`get_rids<class_Font_method_get_rids>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_spacing<class_Font_method_get_spacing>`\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_string_size<class_Font_method_get_string_size>`\ (\ text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_supported_chars<class_Font_method_get_supported_chars>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_supported_feature_list<class_Font_method_get_supported_feature_list>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_supported_variation_list<class_Font_method_get_supported_variation_list>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_underline_position<class_Font_method_get_underline_position>`\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_underline_thickness<class_Font_method_get_underline_thickness>`\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_char<class_Font_method_has_char>`\ (\ char\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_language_supported<class_Font_method_is_language_supported>`\ (\ language\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_script_supported<class_Font_method_is_script_supported>`\ (\ script\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_capacity<class_Font_method_set_cache_capacity>`\ (\ single_line\: :ref:`int<class_int>`, multi_line\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Font_property_fallbacks: + +.. rst-class:: classref-property + +:ref:`Array<class_Array>`\[:ref:`Font<class_Font>`\] **fallbacks** = ``[]`` :ref:`🔗<class_Font_property_fallbacks>` + +.. rst-class:: classref-property-setget + +- |void| **set_fallbacks**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`Font<class_Font>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`Font<class_Font>`\] **get_fallbacks**\ (\ ) + +Array of fallback **Font**\ s to use as a substitute if a glyph is not found in this current **Font**. + +If this array is empty in a :ref:`FontVariation<class_FontVariation>`, the :ref:`FontVariation.base_font<class_FontVariation_property_base_font>`'s fallbacks are used instead. .. rst-class:: classref-section-separator @@ -114,7 +146,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **draw_char** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` font_size, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |const| +:ref:`float<class_float>` **draw_char**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_Font_method_draw_char>` Draw a single Unicode character ``char`` into a canvas item using the font, at a given position, with ``modulate`` color. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -128,7 +160,7 @@ Draw a single Unicode character ``char`` into a canvas item using the font, at a .. rst-class:: classref-method -:ref:`float<class_float>` **draw_char_outline** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` char, :ref:`int<class_int>` font_size, :ref:`int<class_int>` size=-1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** |const| +:ref:`float<class_float>` **draw_char_outline**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`, size\: :ref:`int<class_int>` = -1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_Font_method_draw_char_outline>` Draw a single Unicode character ``char`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -142,7 +174,7 @@ Draw a single Unicode character ``char`` outline into a canvas item using the fo .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +|void| **draw_multiline_string**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_draw_multiline_string>` Breaks ``text`` into lines using rules specified by ``brk_flags`` and draws it into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -156,7 +188,7 @@ See also :ref:`CanvasItem.draw_multiline_string<class_CanvasItem_method_draw_mul .. rst-class:: classref-method -void **draw_multiline_string_outline** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, :ref:`int<class_int>` size=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +|void| **draw_multiline_string_outline**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, size\: :ref:`int<class_int>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_draw_multiline_string_outline>` Breaks ``text`` to the lines using rules specified by ``brk_flags`` and draws text outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -170,7 +202,7 @@ See also :ref:`CanvasItem.draw_multiline_string_outline<class_CanvasItem_method_ .. rst-class:: classref-method -void **draw_string** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +|void| **draw_string**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_draw_string>` Draw ``text`` into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -184,7 +216,7 @@ See also :ref:`CanvasItem.draw_string<class_CanvasItem_method_draw_string>`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` size=1, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +|void| **draw_string_outline**\ (\ canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, size\: :ref:`int<class_int>` = 1, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_draw_string_outline>` Draw ``text`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -198,7 +230,7 @@ See also :ref:`CanvasItem.draw_string_outline<class_CanvasItem_method_draw_strin .. rst-class:: classref-method -:ref:`RID<class_RID>` **find_variation** **(** :ref:`Dictionary<class_Dictionary>` variation_coordinates, :ref:`int<class_int>` face_index=0, :ref:`float<class_float>` strength=0.0, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| +:ref:`RID<class_RID>` **find_variation**\ (\ variation_coordinates\: :ref:`Dictionary<class_Dictionary>`, face_index\: :ref:`int<class_int>` = 0, strength\: :ref:`float<class_float>` = 0.0, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int<class_int>` = 0, spacing_bottom\: :ref:`int<class_int>` = 0, spacing_space\: :ref:`int<class_int>` = 0, spacing_glyph\: :ref:`int<class_int>` = 0, baseline_offset\: :ref:`float<class_float>` = 0.0\ ) |const| :ref:`🔗<class_Font_method_find_variation>` Returns :ref:`TextServer<class_TextServer>` RID of the font cache for specific variation. @@ -210,7 +242,7 @@ Returns :ref:`TextServer<class_TextServer>` RID of the font cache for specific v .. rst-class:: classref-method -:ref:`float<class_float>` **get_ascent** **(** :ref:`int<class_int>` font_size=16 **)** |const| +:ref:`float<class_float>` **get_ascent**\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| :ref:`🔗<class_Font_method_get_ascent>` Returns the average font ascent (number of pixels above the baseline). @@ -224,9 +256,9 @@ Returns the average font ascent (number of pixels above the baseline). .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_char_size** **(** :ref:`int<class_int>` char, :ref:`int<class_int>` font_size **)** |const| +:ref:`Vector2<class_Vector2>` **get_char_size**\ (\ char\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Font_method_get_char_size>` -Returns the size of a character, optionally taking kerning into account if the next character is provided. +Returns the size of a character. Does not take kerning into account. \ **Note:** Do not use this function to calculate width of the string character by character, use :ref:`get_string_size<class_Font_method_get_string_size>` or :ref:`TextLine<class_TextLine>` instead. The height returned is the font height (see also :ref:`get_height<class_Font_method_get_height>`) and has no relation to the glyph height. @@ -238,7 +270,7 @@ Returns the size of a character, optionally taking kerning into account if the n .. rst-class:: classref-method -:ref:`float<class_float>` **get_descent** **(** :ref:`int<class_int>` font_size=16 **)** |const| +:ref:`float<class_float>` **get_descent**\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| :ref:`🔗<class_Font_method_get_descent>` Returns the average font descent (number of pixels below the baseline). @@ -252,7 +284,7 @@ Returns the average font descent (number of pixels below the baseline). .. rst-class:: classref-method -:ref:`int<class_int>` **get_face_count** **(** **)** |const| +:ref:`int<class_int>` **get_face_count**\ (\ ) |const| :ref:`🔗<class_Font_method_get_face_count>` Returns number of faces in the TrueType / OpenType collection. @@ -260,23 +292,11 @@ Returns number of faces in the TrueType / OpenType collection. ---- -.. _class_Font_method_get_fallbacks: - -.. rst-class:: classref-method - -:ref:`Font[]<class_Font>` **get_fallbacks** **(** **)** |const| - -Returns array of fallback **Font**\ s. - -.. rst-class:: classref-item-separator - ----- - .. _class_Font_method_get_font_name: .. rst-class:: classref-method -:ref:`String<class_String>` **get_font_name** **(** **)** |const| +:ref:`String<class_String>` **get_font_name**\ (\ ) |const| :ref:`🔗<class_Font_method_get_font_name>` Returns font family name. @@ -288,7 +308,7 @@ Returns font family name. .. rst-class:: classref-method -:ref:`int<class_int>` **get_font_stretch** **(** **)** |const| +:ref:`int<class_int>` **get_font_stretch**\ (\ ) |const| :ref:`🔗<class_Font_method_get_font_stretch>` Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. @@ -300,7 +320,7 @@ Returns font stretch amount, compared to a normal width. A percentage value betw .. rst-class:: classref-method -|bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **get_font_style** **(** **)** |const| +|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **get_font_style**\ (\ ) |const| :ref:`🔗<class_Font_method_get_font_style>` Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. @@ -312,7 +332,7 @@ Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-method -:ref:`String<class_String>` **get_font_style_name** **(** **)** |const| +:ref:`String<class_String>` **get_font_style_name**\ (\ ) |const| :ref:`🔗<class_Font_method_get_font_style_name>` Returns font style name. @@ -324,7 +344,7 @@ Returns font style name. .. rst-class:: classref-method -:ref:`int<class_int>` **get_font_weight** **(** **)** |const| +:ref:`int<class_int>` **get_font_weight**\ (\ ) |const| :ref:`🔗<class_Font_method_get_font_weight>` Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. @@ -336,7 +356,7 @@ Returns weight (boldness) of the font. A value in the ``100...999`` range, norma .. rst-class:: classref-method -:ref:`float<class_float>` **get_height** **(** :ref:`int<class_int>` font_size=16 **)** |const| +:ref:`float<class_float>` **get_height**\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| :ref:`🔗<class_Font_method_get_height>` Returns the total average font height (ascent plus descent) in pixels. @@ -350,7 +370,7 @@ Returns the total average font height (ascent plus descent) in pixels. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_multiline_string_size** **(** :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, :ref:`int<class_int>` max_lines=-1, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> brk_flags=3, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +:ref:`Vector2<class_Vector2>` **get_multiline_string_size**\ (\ text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, max_lines\: :ref:`int<class_int>` = -1, brk_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_get_multiline_string_size>` Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. @@ -364,7 +384,7 @@ See also :ref:`draw_multiline_string<class_Font_method_draw_multiline_string>`. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_opentype_features** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_opentype_features**\ (\ ) |const| :ref:`🔗<class_Font_method_get_opentype_features>` Returns a set of OpenType feature tags. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__. @@ -376,7 +396,7 @@ Returns a set of OpenType feature tags. More info: `OpenType feature tags <https .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_ot_name_strings** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_ot_name_strings**\ (\ ) |const| :ref:`🔗<class_Font_method_get_ot_name_strings>` Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). @@ -388,7 +408,7 @@ Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (loc .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **get_rids** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_rids**\ (\ ) |const| :ref:`🔗<class_Font_method_get_rids>` Returns :ref:`Array<class_Array>` of valid **Font** :ref:`RID<class_RID>`\ s, which can be passed to the :ref:`TextServer<class_TextServer>` methods. @@ -400,7 +420,7 @@ Returns :ref:`Array<class_Array>` of valid **Font** :ref:`RID<class_RID>`\ s, wh .. rst-class:: classref-method -:ref:`int<class_int>` **get_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| +:ref:`int<class_int>` **get_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_Font_method_get_spacing>` Returns the spacing for the given ``type`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`). @@ -412,7 +432,7 @@ Returns the spacing for the given ``type`` (see :ref:`SpacingType<enum_TextServe .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_string_size** **(** :ref:`String<class_String>` text, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment=0, :ref:`float<class_float>` width=-1, :ref:`int<class_int>` font_size=16, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3, :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** |const| +:ref:`Vector2<class_Vector2>` **get_string_size**\ (\ text\: :ref:`String<class_String>`, alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` = 0, width\: :ref:`float<class_float>` = -1, font_size\: :ref:`int<class_int>` = 16, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) |const| :ref:`🔗<class_Font_method_get_string_size>` Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also :ref:`get_multiline_string_size<class_Font_method_get_multiline_string_size>` and :ref:`draw_string<class_Font_method_draw_string>`. @@ -444,7 +464,7 @@ For example, to get the string size as displayed by a single-line Label, use: .. rst-class:: classref-method -:ref:`String<class_String>` **get_supported_chars** **(** **)** |const| +:ref:`String<class_String>` **get_supported_chars**\ (\ ) |const| :ref:`🔗<class_Font_method_get_supported_chars>` Returns a string containing all the characters available in the font. @@ -458,7 +478,7 @@ If a given character is included in more than one font data source, it appears o .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_supported_feature_list** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_supported_feature_list**\ (\ ) |const| :ref:`🔗<class_Font_method_get_supported_feature_list>` Returns list of OpenType features supported by font. @@ -470,7 +490,7 @@ Returns list of OpenType features supported by font. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_supported_variation_list** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_supported_variation_list**\ (\ ) |const| :ref:`🔗<class_Font_method_get_supported_variation_list>` Returns list of supported `variation coordinates <https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg>`__, each coordinate is returned as ``tag: Vector3i(min_value,max_value,default_value)``. @@ -498,7 +518,7 @@ To print available variation axes of a variable font: .. rst-class:: classref-method -:ref:`float<class_float>` **get_underline_position** **(** :ref:`int<class_int>` font_size=16 **)** |const| +:ref:`float<class_float>` **get_underline_position**\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| :ref:`🔗<class_Font_method_get_underline_position>` Returns average pixel offset of the underline below the baseline. @@ -512,7 +532,7 @@ Returns average pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_underline_thickness** **(** :ref:`int<class_int>` font_size=16 **)** |const| +:ref:`float<class_float>` **get_underline_thickness**\ (\ font_size\: :ref:`int<class_int>` = 16\ ) |const| :ref:`🔗<class_Font_method_get_underline_thickness>` Returns average thickness of the underline. @@ -526,7 +546,7 @@ Returns average thickness of the underline. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_char** **(** :ref:`int<class_int>` char **)** |const| +:ref:`bool<class_bool>` **has_char**\ (\ char\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Font_method_has_char>` Returns ``true`` if a Unicode ``char`` is available in the font. @@ -538,7 +558,7 @@ Returns ``true`` if a Unicode ``char`` is available in the font. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_language_supported** **(** :ref:`String<class_String>` language **)** |const| +:ref:`bool<class_bool>` **is_language_supported**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Font_method_is_language_supported>` Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code). @@ -550,7 +570,7 @@ Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedi .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_script_supported** **(** :ref:`String<class_String>` script **)** |const| +:ref:`bool<class_bool>` **is_script_supported**\ (\ script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Font_method_is_script_supported>` Returns ``true``, if font supports given script (`ISO 15924 <https://en.wikipedia.org/wiki/ISO_15924>`__ code). @@ -562,22 +582,10 @@ Returns ``true``, if font supports given script (`ISO 15924 <https://en.wikipedi .. rst-class:: classref-method -void **set_cache_capacity** **(** :ref:`int<class_int>` single_line, :ref:`int<class_int>` multi_line **)** +|void| **set_cache_capacity**\ (\ single_line\: :ref:`int<class_int>`, multi_line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Font_method_set_cache_capacity>` Sets LRU cache capacity for ``draw_*`` methods. -.. rst-class:: classref-item-separator - ----- - -.. _class_Font_method_set_fallbacks: - -.. rst-class:: classref-method - -void **set_fallbacks** **(** :ref:`Font[]<class_Font>` fallbacks **)** - -Sets array of fallback **Font**\ s. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -585,3 +593,4 @@ Sets array of fallback **Font**\ s. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fontfile.rst b/classes/class_fontfile.rst index a3b5fdd94f5..740083a768b 100644 --- a/classes/class_fontfile.rst +++ b/classes/class_fontfile.rst @@ -56,6 +56,13 @@ Supported font formats: +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -71,15 +78,17 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`data<class_FontFile_property_data>` | ``PackedByteArray()`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Font[]<class_Font>` | :ref:`fallbacks<class_FontFile_property_fallbacks>` | ``[]`` | + | :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_FontFile_property_disable_embedded_bitmaps>` | ``true`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int<class_int>` | :ref:`fixed_size<class_FontFile_property_fixed_size>` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`fixed_size_scale_mode<class_FontFile_property_fixed_size_scale_mode>` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`String<class_String>` | :ref:`font_name<class_FontFile_property_font_name>` | ``""`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int<class_int>` | :ref:`font_stretch<class_FontFile_property_font_stretch>` | ``100`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ - | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`font_style<class_FontFile_property_font_style>` | ``0`` | + | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_style<class_FontFile_property_font_style>` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int<class_int>` | :ref:`font_weight<class_FontFile_property_font_weight>` | ``400`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ @@ -112,133 +121,141 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_cache<class_FontFile_method_clear_cache>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_glyphs<class_FontFile_method_clear_glyphs>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_kerning_map<class_FontFile_method_clear_kerning_map>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_size_cache<class_FontFile_method_clear_size_cache>` **(** :ref:`int<class_int>` cache_index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_textures<class_FontFile_method_clear_textures>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_cache_ascent<class_FontFile_method_get_cache_ascent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cache_count<class_FontFile_method_get_cache_count>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_cache_descent<class_FontFile_method_get_cache_descent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_cache_scale<class_FontFile_method_get_cache_scale>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_cache_underline_position<class_FontFile_method_get_cache_underline_position>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_cache_underline_thickness<class_FontFile_method_get_cache_underline_thickness>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_char_from_glyph_index<class_FontFile_method_get_char_from_glyph_index>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_embolden<class_FontFile_method_get_embolden>` **(** :ref:`int<class_int>` cache_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_face_index<class_FontFile_method_get_face_index>` **(** :ref:`int<class_int>` cache_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_advance<class_FontFile_method_get_glyph_advance>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_glyph_list<class_FontFile_method_get_glyph_list>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_offset<class_FontFile_method_get_glyph_offset>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_size<class_FontFile_method_get_glyph_size>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_glyph_texture_idx<class_FontFile_method_get_glyph_texture_idx>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_glyph_uv_rect<class_FontFile_method_get_glyph_uv_rect>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_kerning<class_FontFile_method_get_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_kerning_list<class_FontFile_method_get_kerning_list>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_language_support_override<class_FontFile_method_get_language_support_override>` **(** :ref:`String<class_String>` language **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_language_support_overrides<class_FontFile_method_get_language_support_overrides>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_script_support_override<class_FontFile_method_get_script_support_override>` **(** :ref:`String<class_String>` script **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_script_support_overrides<class_FontFile_method_get_script_support_overrides>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_size_cache_list<class_FontFile_method_get_size_cache_list>` **(** :ref:`int<class_int>` cache_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_texture_count<class_FontFile_method_get_texture_count>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_texture_image<class_FontFile_method_get_texture_image>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_texture_offsets<class_FontFile_method_get_texture_offsets>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_transform<class_FontFile_method_get_transform>` **(** :ref:`int<class_int>` cache_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_variation_coordinates<class_FontFile_method_get_variation_coordinates>` **(** :ref:`int<class_int>` cache_index **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bitmap_font<class_FontFile_method_load_bitmap_font>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_dynamic_font<class_FontFile_method_load_dynamic_font>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_cache<class_FontFile_method_remove_cache>` **(** :ref:`int<class_int>` cache_index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_glyph<class_FontFile_method_remove_glyph>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_kerning<class_FontFile_method_remove_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_language_support_override<class_FontFile_method_remove_language_support_override>` **(** :ref:`String<class_String>` language **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_script_support_override<class_FontFile_method_remove_script_support_override>` **(** :ref:`String<class_String>` script **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_size_cache<class_FontFile_method_remove_size_cache>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_texture<class_FontFile_method_remove_texture>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`render_glyph<class_FontFile_method_render_glyph>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`render_range<class_FontFile_method_render_range>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_ascent<class_FontFile_method_set_cache_ascent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_descent<class_FontFile_method_set_cache_descent>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_scale<class_FontFile_method_set_cache_scale>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_underline_position<class_FontFile_method_set_cache_underline_position>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_underline_thickness<class_FontFile_method_set_cache_underline_thickness>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_embolden<class_FontFile_method_set_embolden>` **(** :ref:`int<class_int>` cache_index, :ref:`float<class_float>` strength **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_face_index<class_FontFile_method_set_face_index>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` face_index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glyph_advance<class_FontFile_method_set_glyph_advance>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glyph_offset<class_FontFile_method_set_glyph_offset>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glyph_size<class_FontFile_method_set_glyph_size>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glyph_texture_idx<class_FontFile_method_set_glyph_texture_idx>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_glyph_uv_rect<class_FontFile_method_set_glyph_uv_rect>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_kerning<class_FontFile_method_set_kerning>` **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_language_support_override<class_FontFile_method_set_language_support_override>` **(** :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_script_support_override<class_FontFile_method_set_script_support_override>` **(** :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture_image<class_FontFile_method_set_texture_image>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture_offsets<class_FontFile_method_set_texture_offsets>` **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_transform<class_FontFile_method_set_transform>` **(** :ref:`int<class_int>` cache_index, :ref:`Transform2D<class_Transform2D>` transform **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_variation_coordinates<class_FontFile_method_set_variation_coordinates>` **(** :ref:`int<class_int>` cache_index, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_cache<class_FontFile_method_clear_cache>`\ (\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_glyphs<class_FontFile_method_clear_glyphs>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_kerning_map<class_FontFile_method_clear_kerning_map>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_size_cache<class_FontFile_method_clear_size_cache>`\ (\ cache_index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_textures<class_FontFile_method_clear_textures>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_cache_ascent<class_FontFile_method_get_cache_ascent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cache_count<class_FontFile_method_get_cache_count>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_cache_descent<class_FontFile_method_get_cache_descent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_cache_scale<class_FontFile_method_get_cache_scale>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_cache_underline_position<class_FontFile_method_get_cache_underline_position>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_cache_underline_thickness<class_FontFile_method_get_cache_underline_thickness>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_char_from_glyph_index<class_FontFile_method_get_char_from_glyph_index>`\ (\ size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_embolden<class_FontFile_method_get_embolden>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_extra_baseline_offset<class_FontFile_method_get_extra_baseline_offset>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_extra_spacing<class_FontFile_method_get_extra_spacing>`\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_face_index<class_FontFile_method_get_face_index>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_advance<class_FontFile_method_get_glyph_advance>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>`\ (\ size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_glyph_list<class_FontFile_method_get_glyph_list>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_offset<class_FontFile_method_get_glyph_offset>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_glyph_size<class_FontFile_method_get_glyph_size>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_glyph_texture_idx<class_FontFile_method_get_glyph_texture_idx>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_glyph_uv_rect<class_FontFile_method_get_glyph_uv_rect>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_kerning<class_FontFile_method_get_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_kerning_list<class_FontFile_method_get_kerning_list>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_language_support_override<class_FontFile_method_get_language_support_override>`\ (\ language\: :ref:`String<class_String>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_language_support_overrides<class_FontFile_method_get_language_support_overrides>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_script_support_override<class_FontFile_method_get_script_support_override>`\ (\ script\: :ref:`String<class_String>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_script_support_overrides<class_FontFile_method_get_script_support_overrides>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_size_cache_list<class_FontFile_method_get_size_cache_list>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_texture_count<class_FontFile_method_get_texture_count>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_texture_image<class_FontFile_method_get_texture_image>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_texture_offsets<class_FontFile_method_get_texture_offsets>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_transform<class_FontFile_method_get_transform>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_variation_coordinates<class_FontFile_method_get_variation_coordinates>`\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bitmap_font<class_FontFile_method_load_bitmap_font>`\ (\ path\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_dynamic_font<class_FontFile_method_load_dynamic_font>`\ (\ path\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_cache<class_FontFile_method_remove_cache>`\ (\ cache_index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_glyph<class_FontFile_method_remove_glyph>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_kerning<class_FontFile_method_remove_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_language_support_override<class_FontFile_method_remove_language_support_override>`\ (\ language\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_script_support_override<class_FontFile_method_remove_script_support_override>`\ (\ script\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_size_cache<class_FontFile_method_remove_size_cache>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_texture<class_FontFile_method_remove_texture>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`render_glyph<class_FontFile_method_render_glyph>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`render_range<class_FontFile_method_render_range>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_ascent<class_FontFile_method_set_cache_ascent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_descent<class_FontFile_method_set_cache_descent>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_scale<class_FontFile_method_set_cache_scale>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_underline_position<class_FontFile_method_set_cache_underline_position>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cache_underline_thickness<class_FontFile_method_set_cache_underline_thickness>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_embolden<class_FontFile_method_set_embolden>`\ (\ cache_index\: :ref:`int<class_int>`, strength\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extra_baseline_offset<class_FontFile_method_set_extra_baseline_offset>`\ (\ cache_index\: :ref:`int<class_int>`, baseline_offset\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_extra_spacing<class_FontFile_method_set_extra_spacing>`\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_face_index<class_FontFile_method_set_face_index>`\ (\ cache_index\: :ref:`int<class_int>`, face_index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glyph_advance<class_FontFile_method_set_glyph_advance>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glyph_offset<class_FontFile_method_set_glyph_offset>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glyph_size<class_FontFile_method_set_glyph_size>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glyph_texture_idx<class_FontFile_method_set_glyph_texture_idx>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_glyph_uv_rect<class_FontFile_method_set_glyph_uv_rect>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_kerning<class_FontFile_method_set_kerning>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_language_support_override<class_FontFile_method_set_language_support_override>`\ (\ language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_script_support_override<class_FontFile_method_set_script_support_override>`\ (\ script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_image<class_FontFile_method_set_texture_image>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_offsets<class_FontFile_method_set_texture_offsets>`\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_transform<class_FontFile_method_set_transform>`\ (\ cache_index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_variation_coordinates<class_FontFile_method_set_variation_coordinates>`\ (\ cache_index\: :ref:`int<class_int>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -253,12 +270,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` +:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` :ref:`🔗<class_FontFile_property_allow_system_fallback>` .. rst-class:: classref-property-setget -- void **set_allow_system_fallback** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_allow_system_fallback** **(** **)** +- |void| **set_allow_system_fallback**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_allow_system_fallback**\ (\ ) If set to ``true``, system fonts can be automatically used as fallbacks. @@ -270,12 +287,12 @@ If set to ``true``, system fonts can be automatically used as fallbacks. .. rst-class:: classref-property -:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1`` +:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1`` :ref:`🔗<class_FontFile_property_antialiasing>` .. rst-class:: classref-property-setget -- void **set_antialiasing** **(** :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` value **)** -- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing** **(** **)** +- |void| **set_antialiasing**\ (\ value\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) +- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing**\ (\ ) Font anti-aliasing mode. @@ -287,31 +304,33 @@ Font anti-aliasing mode. .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **data** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **data** = ``PackedByteArray()`` :ref:`🔗<class_FontFile_property_data>` .. rst-class:: classref-property-setget -- void **set_data** **(** :ref:`PackedByteArray<class_PackedByteArray>` value **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_data** **(** **)** +- |void| **set_data**\ (\ value\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_data**\ (\ ) Contents of the dynamic font source file. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- -.. _class_FontFile_property_fallbacks: +.. _class_FontFile_property_disable_embedded_bitmaps: .. rst-class:: classref-property -:ref:`Font[]<class_Font>` **fallbacks** = ``[]`` +:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true`` :ref:`🔗<class_FontFile_property_disable_embedded_bitmaps>` .. rst-class:: classref-property-setget -- void **set_fallbacks** **(** :ref:`Font[]<class_Font>` value **)** -- :ref:`Font[]<class_Font>` **get_fallbacks** **(** **)** +- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_disable_embedded_bitmaps**\ (\ ) -Array of fallback :ref:`Font<class_Font>`\ s. +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). .. rst-class:: classref-item-separator @@ -321,12 +340,12 @@ Array of fallback :ref:`Font<class_Font>`\ s. .. rst-class:: classref-property -:ref:`int<class_int>` **fixed_size** = ``0`` +:ref:`int<class_int>` **fixed_size** = ``0`` :ref:`🔗<class_FontFile_property_fixed_size>` .. rst-class:: classref-property-setget -- void **set_fixed_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fixed_size** **(** **)** +- |void| **set_fixed_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fixed_size**\ (\ ) Font size, used only for the bitmap fonts. @@ -334,16 +353,33 @@ Font size, used only for the bitmap fonts. ---- +.. _class_FontFile_property_fixed_size_scale_mode: + +.. rst-class:: classref-property + +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **fixed_size_scale_mode** = ``0`` :ref:`🔗<class_FontFile_property_fixed_size_scale_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_fixed_size_scale_mode**\ (\ value\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) +- :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **get_fixed_size_scale_mode**\ (\ ) + +Scaling mode, used only for the bitmap fonts with :ref:`fixed_size<class_FontFile_property_fixed_size>` greater than zero. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_property_font_name: .. rst-class:: classref-property -:ref:`String<class_String>` **font_name** = ``""`` +:ref:`String<class_String>` **font_name** = ``""`` :ref:`🔗<class_FontFile_property_font_name>` .. rst-class:: classref-property-setget -- void **set_font_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_font_name** **(** **)** +- |void| **set_font_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_font_name**\ (\ ) Font family name. @@ -355,12 +391,12 @@ Font family name. .. rst-class:: classref-property -:ref:`int<class_int>` **font_stretch** = ``100`` +:ref:`int<class_int>` **font_stretch** = ``100`` :ref:`🔗<class_FontFile_property_font_stretch>` .. rst-class:: classref-property-setget -- void **set_font_stretch** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_stretch** **(** **)** +- |void| **set_font_stretch**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_stretch**\ (\ ) Font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. @@ -372,12 +408,12 @@ Font stretch amount, compared to a normal width. A percentage value between ``50 .. rst-class:: classref-property -|bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **font_style** = ``0`` +|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_style** = ``0`` :ref:`🔗<class_FontFile_property_font_style>` .. rst-class:: classref-property-setget -- void **set_font_style** **(** |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> value **)** -- |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **get_font_style** **(** **)** +- |void| **set_font_style**\ (\ value\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) +- |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **get_font_style**\ (\ ) Font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. @@ -389,12 +425,12 @@ Font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-property -:ref:`int<class_int>` **font_weight** = ``400`` +:ref:`int<class_int>` **font_weight** = ``400`` :ref:`🔗<class_FontFile_property_font_weight>` .. rst-class:: classref-property-setget -- void **set_font_weight** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_weight** **(** **)** +- |void| **set_font_weight**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_weight**\ (\ ) Weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. @@ -406,12 +442,12 @@ Weight (boldness) of the font. A value in the ``100...999`` range, normal font w .. rst-class:: classref-property -:ref:`bool<class_bool>` **force_autohinter** = ``false`` +:ref:`bool<class_bool>` **force_autohinter** = ``false`` :ref:`🔗<class_FontFile_property_force_autohinter>` .. rst-class:: classref-property-setget -- void **set_force_autohinter** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_force_autohinter** **(** **)** +- |void| **set_force_autohinter**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_force_autohinter**\ (\ ) If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting). @@ -423,12 +459,12 @@ If set to ``true``, auto-hinting is supported and preferred over font built-in h .. rst-class:: classref-property -:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` +:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` :ref:`🔗<class_FontFile_property_generate_mipmaps>` .. rst-class:: classref-property-setget -- void **set_generate_mipmaps** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_generate_mipmaps** **(** **)** +- |void| **set_generate_mipmaps**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_generate_mipmaps**\ (\ ) If set to ``true``, generate mipmaps for the font textures. @@ -440,12 +476,12 @@ If set to ``true``, generate mipmaps for the font textures. .. rst-class:: classref-property -:ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1`` +:ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1`` :ref:`🔗<class_FontFile_property_hinting>` .. rst-class:: classref-property-setget -- void **set_hinting** **(** :ref:`Hinting<enum_TextServer_Hinting>` value **)** -- :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting** **(** **)** +- |void| **set_hinting**\ (\ value\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) +- :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting**\ (\ ) Font hinting mode. Used by dynamic fonts only. @@ -457,12 +493,12 @@ Font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_pixel_range** = ``16`` +:ref:`int<class_int>` **msdf_pixel_range** = ``16`` :ref:`🔗<class_FontFile_property_msdf_pixel_range>` .. rst-class:: classref-property-setget -- void **set_msdf_pixel_range** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_msdf_pixel_range** **(** **)** +- |void| **set_msdf_pixel_range**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_msdf_pixel_range**\ (\ ) The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` value of ``16`` allows outline sizes up to ``8`` to look correct. @@ -474,12 +510,12 @@ The width of the range around the shape between the minimum and maximum represen .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_size** = ``48`` +:ref:`int<class_int>` **msdf_size** = ``48`` :ref:`🔗<class_FontFile_property_msdf_size>` .. rst-class:: classref-property-setget -- void **set_msdf_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_msdf_size** **(** **)** +- |void| **set_msdf_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_msdf_size**\ (\ ) Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. @@ -491,12 +527,12 @@ Source font size used to generate MSDF textures. Higher values allow for more pr .. rst-class:: classref-property -:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` +:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` :ref:`🔗<class_FontFile_property_multichannel_signed_distance_field>` .. rst-class:: classref-property-setget -- void **set_multichannel_signed_distance_field** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_multichannel_signed_distance_field** **(** **)** +- |void| **set_multichannel_signed_distance_field**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_multichannel_signed_distance_field**\ (\ ) If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control<class_Control>`\ s that are scaled down (or for :ref:`Label3D<class_Label3D>`\ s viewed from a long distance). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. @@ -512,12 +548,12 @@ If set to ``true``, glyphs of all sizes are rendered using single multichannel s .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **opentype_feature_overrides** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **opentype_feature_overrides** = ``{}`` :ref:`🔗<class_FontFile_property_opentype_feature_overrides>` .. rst-class:: classref-property-setget -- void **set_opentype_feature_overrides** **(** :ref:`Dictionary<class_Dictionary>` value **)** -- :ref:`Dictionary<class_Dictionary>` **get_opentype_feature_overrides** **(** **)** +- |void| **set_opentype_feature_overrides**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ ) +- :ref:`Dictionary<class_Dictionary>` **get_opentype_feature_overrides**\ (\ ) Font OpenType feature set override. @@ -529,12 +565,12 @@ Font OpenType feature set override. .. rst-class:: classref-property -:ref:`float<class_float>` **oversampling** = ``0.0`` +:ref:`float<class_float>` **oversampling** = ``0.0`` :ref:`🔗<class_FontFile_property_oversampling>` .. rst-class:: classref-property-setget -- void **set_oversampling** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_oversampling** **(** **)** +- |void| **set_oversampling**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_oversampling**\ (\ ) Font oversampling factor. If set to ``0.0``, the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling). @@ -546,12 +582,12 @@ Font oversampling factor. If set to ``0.0``, the global oversampling factor is u .. rst-class:: classref-property -:ref:`String<class_String>` **style_name** = ``""`` +:ref:`String<class_String>` **style_name** = ``""`` :ref:`🔗<class_FontFile_property_style_name>` .. rst-class:: classref-property-setget -- void **set_font_style_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_font_style_name** **(** **)** +- |void| **set_font_style_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_font_style_name**\ (\ ) Font style name. @@ -563,12 +599,12 @@ Font style name. .. rst-class:: classref-property -:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1`` +:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1`` :ref:`🔗<class_FontFile_property_subpixel_positioning>` .. rst-class:: classref-property-setget -- void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` value **)** -- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning** **(** **)** +- |void| **set_subpixel_positioning**\ (\ value\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) +- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning**\ (\ ) Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` to automatically enable it based on the font size. @@ -585,7 +621,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_cache** **(** **)** +|void| **clear_cache**\ (\ ) :ref:`🔗<class_FontFile_method_clear_cache>` Removes all font cache entries. @@ -597,9 +633,9 @@ Removes all font cache entries. .. rst-class:: classref-method -void **clear_glyphs** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **clear_glyphs**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_clear_glyphs>` -Removes all rendered glyphs information from the cache entry. +Removes all rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`remove_texture<class_FontFile_method_remove_texture>` to remove them manually. @@ -611,7 +647,7 @@ Removes all rendered glyphs information from the cache entry. .. rst-class:: classref-method -void **clear_kerning_map** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** +|void| **clear_kerning_map**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_clear_kerning_map>` Removes all kerning overrides. @@ -623,7 +659,7 @@ Removes all kerning overrides. .. rst-class:: classref-method -void **clear_size_cache** **(** :ref:`int<class_int>` cache_index **)** +|void| **clear_size_cache**\ (\ cache_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_clear_size_cache>` Removes all font sizes from the cache entry @@ -635,7 +671,7 @@ Removes all font sizes from the cache entry .. rst-class:: classref-method -void **clear_textures** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **clear_textures**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_clear_textures>` Removes all textures from font cache entry. @@ -649,7 +685,7 @@ Removes all textures from font cache entry. .. rst-class:: classref-method -:ref:`float<class_float>` **get_cache_ascent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **get_cache_ascent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_ascent>` Returns the font ascent (number of pixels above the baseline). @@ -661,7 +697,7 @@ Returns the font ascent (number of pixels above the baseline). .. rst-class:: classref-method -:ref:`int<class_int>` **get_cache_count** **(** **)** |const| +:ref:`int<class_int>` **get_cache_count**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_count>` Returns number of the font cache entries. @@ -673,7 +709,7 @@ Returns number of the font cache entries. .. rst-class:: classref-method -:ref:`float<class_float>` **get_cache_descent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **get_cache_descent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_descent>` Returns the font descent (number of pixels below the baseline). @@ -685,7 +721,7 @@ Returns the font descent (number of pixels below the baseline). .. rst-class:: classref-method -:ref:`float<class_float>` **get_cache_scale** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **get_cache_scale**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_scale>` Returns scaling factor of the color bitmap font. @@ -697,7 +733,7 @@ Returns scaling factor of the color bitmap font. .. rst-class:: classref-method -:ref:`float<class_float>` **get_cache_underline_position** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **get_cache_underline_position**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_underline_position>` Returns pixel offset of the underline below the baseline. @@ -709,7 +745,7 @@ Returns pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_cache_underline_thickness** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **get_cache_underline_thickness**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_cache_underline_thickness>` Returns thickness of the underline in pixels. @@ -721,7 +757,7 @@ Returns thickness of the underline in pixels. .. rst-class:: classref-method -:ref:`int<class_int>` **get_char_from_glyph_index** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| +:ref:`int<class_int>` **get_char_from_glyph_index**\ (\ size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_char_from_glyph_index>` Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`get_glyph_index<class_FontFile_method_get_glyph_index>`. @@ -733,7 +769,7 @@ Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_inde .. rst-class:: classref-method -:ref:`float<class_float>` **get_embolden** **(** :ref:`int<class_int>` cache_index **)** |const| +:ref:`float<class_float>` **get_embolden**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_embolden>` Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. @@ -741,13 +777,37 @@ Returns embolden strength, if is not equal to zero, emboldens the font outlines. ---- +.. _class_FontFile_method_get_extra_baseline_offset: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **get_extra_baseline_offset**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_extra_baseline_offset>` + +Returns extra baseline offset (as a fraction of font height). + +.. rst-class:: classref-item-separator + +---- + +.. _class_FontFile_method_get_extra_spacing: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_extra_spacing**\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_FontFile_method_get_extra_spacing>` + +Returns spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size). + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_method_get_face_index: .. rst-class:: classref-method -:ref:`int<class_int>` **get_face_index** **(** :ref:`int<class_int>` cache_index **)** |const| +:ref:`int<class_int>` **get_face_index**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_face_index>` -Recturns an active face index in the TrueType / OpenType collection. +Returns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator @@ -757,7 +817,7 @@ Recturns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_glyph_advance** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **get_glyph_advance**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_advance>` Returns glyph advance (offset of the next glyph). @@ -771,7 +831,7 @@ Returns glyph advance (offset of the next glyph). .. rst-class:: classref-method -:ref:`int<class_int>` **get_glyph_index** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| +:ref:`int<class_int>` **get_glyph_index**\ (\ size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_index>` Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. @@ -783,7 +843,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_glyph_list** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_glyph_list**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_list>` Returns list of rendered glyphs in the cache entry. @@ -795,7 +855,7 @@ Returns list of rendered glyphs in the cache entry. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_glyph_offset** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **get_glyph_offset**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_offset>` Returns glyph offset from the baseline. @@ -807,7 +867,7 @@ Returns glyph offset from the baseline. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_glyph_size** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **get_glyph_size**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_size>` Returns glyph size. @@ -819,7 +879,7 @@ Returns glyph size. .. rst-class:: classref-method -:ref:`int<class_int>` **get_glyph_texture_idx** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`int<class_int>` **get_glyph_texture_idx**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_texture_idx>` Returns index of the cache texture containing the glyph. @@ -831,7 +891,7 @@ Returns index of the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_glyph_uv_rect** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Rect2<class_Rect2>` **get_glyph_uv_rect**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_glyph_uv_rect>` Returns rectangle in the cache texture containing the glyph. @@ -843,7 +903,7 @@ Returns rectangle in the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| +:ref:`Vector2<class_Vector2>` **get_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_kerning>` Returns kerning for the pair of glyphs. @@ -855,7 +915,7 @@ Returns kerning for the pair of glyphs. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_kerning_list** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_kerning_list**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_kerning_list>` Returns list of the kerning overrides. @@ -867,7 +927,7 @@ Returns list of the kerning overrides. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_language_support_override** **(** :ref:`String<class_String>` language **)** |const| +:ref:`bool<class_bool>` **get_language_support_override**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_FontFile_method_get_language_support_override>` Returns ``true`` if support override is enabled for the ``language``. @@ -879,7 +939,7 @@ Returns ``true`` if support override is enabled for the ``language``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_language_support_overrides** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_language_support_overrides**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_language_support_overrides>` Returns list of language support overrides. @@ -891,7 +951,7 @@ Returns list of language support overrides. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_script_support_override** **(** :ref:`String<class_String>` script **)** |const| +:ref:`bool<class_bool>` **get_script_support_override**\ (\ script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_FontFile_method_get_script_support_override>` Returns ``true`` if support override is enabled for the ``script``. @@ -903,7 +963,7 @@ Returns ``true`` if support override is enabled for the ``script``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_script_support_overrides** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_script_support_overrides**\ (\ ) |const| :ref:`🔗<class_FontFile_method_get_script_support_overrides>` Returns list of script support overrides. @@ -915,9 +975,9 @@ Returns list of script support overrides. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_size_cache_list** **(** :ref:`int<class_int>` cache_index **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_size_cache_list**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_size_cache_list>` -Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. +Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size. .. rst-class:: classref-item-separator @@ -927,7 +987,7 @@ Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font .. rst-class:: classref-method -:ref:`int<class_int>` **get_texture_count** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** |const| +:ref:`int<class_int>` **get_texture_count**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_count>` Returns number of textures used by font cache entry. @@ -939,7 +999,7 @@ Returns number of textures used by font cache entry. .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_texture_image** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| +:ref:`Image<class_Image>` **get_texture_image**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_image>` Returns a copy of the font cache texture image. @@ -951,7 +1011,7 @@ Returns a copy of the font cache texture image. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_texture_offsets** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_texture_offsets**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_texture_offsets>` Returns a copy of the array containing glyph packing data. @@ -963,7 +1023,7 @@ Returns a copy of the array containing glyph packing data. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_transform** **(** :ref:`int<class_int>` cache_index **)** |const| +:ref:`Transform2D<class_Transform2D>` **get_transform**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_transform>` Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. @@ -975,7 +1035,7 @@ Returns 2D transform, applied to the font outlines, can be used for slanting, fl .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_variation_coordinates** **(** :ref:`int<class_int>` cache_index **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_variation_coordinates**\ (\ cache_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_FontFile_method_get_variation_coordinates>` Returns variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list<class_Font_method_get_supported_variation_list>` for more info. @@ -987,7 +1047,7 @@ Returns variation coordinates for the specified font cache entry. See :ref:`Font .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_bitmap_font** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_bitmap_font**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_load_bitmap_font>` Loads an AngelCode BMFont (.fnt, .font) bitmap font from file ``path``. @@ -1001,7 +1061,7 @@ Loads an AngelCode BMFont (.fnt, .font) bitmap font from file ``path``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_dynamic_font** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_dynamic_font**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_load_dynamic_font>` Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file ``path``. @@ -1015,7 +1075,7 @@ Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 .. rst-class:: classref-method -void **remove_cache** **(** :ref:`int<class_int>` cache_index **)** +|void| **remove_cache**\ (\ cache_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_cache>` Removes specified font cache entry. @@ -1027,7 +1087,7 @@ Removes specified font cache entry. .. rst-class:: classref-method -void **remove_glyph** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** +|void| **remove_glyph**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_glyph>` Removes specified rendered glyph information from the cache entry. @@ -1041,7 +1101,7 @@ Removes specified rendered glyph information from the cache entry. .. rst-class:: classref-method -void **remove_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** +|void| **remove_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_remove_kerning>` Removes kerning override for the pair of glyphs. @@ -1053,7 +1113,7 @@ Removes kerning override for the pair of glyphs. .. rst-class:: classref-method -void **remove_language_support_override** **(** :ref:`String<class_String>` language **)** +|void| **remove_language_support_override**\ (\ language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_remove_language_support_override>` Remove language support override. @@ -1065,7 +1125,7 @@ Remove language support override. .. rst-class:: classref-method -void **remove_script_support_override** **(** :ref:`String<class_String>` script **)** +|void| **remove_script_support_override**\ (\ script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_FontFile_method_remove_script_support_override>` Removes script support override. @@ -1077,7 +1137,7 @@ Removes script support override. .. rst-class:: classref-method -void **remove_size_cache** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **remove_size_cache**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_FontFile_method_remove_size_cache>` Removes specified font size from the cache entry. @@ -1089,7 +1149,7 @@ Removes specified font size from the cache entry. .. rst-class:: classref-method -void **remove_texture** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** +|void| **remove_texture**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_remove_texture>` Removes specified texture from the cache entry. @@ -1103,7 +1163,7 @@ Removes specified texture from the cache entry. .. rst-class:: classref-method -void **render_glyph** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** +|void| **render_glyph**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_render_glyph>` Renders specified glyph to the font cache texture. @@ -1115,7 +1175,7 @@ Renders specified glyph to the font cache texture. .. rst-class:: classref-method -void **render_range** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** +|void| **render_range**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_render_range>` Renders the range of characters to the font cache texture. @@ -1127,7 +1187,7 @@ Renders the range of characters to the font cache texture. .. rst-class:: classref-method -void **set_cache_ascent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** +|void| **set_cache_ascent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_ascent>` Sets the font ascent (number of pixels above the baseline). @@ -1139,7 +1199,7 @@ Sets the font ascent (number of pixels above the baseline). .. rst-class:: classref-method -void **set_cache_descent** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** +|void| **set_cache_descent**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_descent>` Sets the font descent (number of pixels below the baseline). @@ -1151,7 +1211,7 @@ Sets the font descent (number of pixels below the baseline). .. rst-class:: classref-method -void **set_cache_scale** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** +|void| **set_cache_scale**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_scale>` Sets scaling factor of the color bitmap font. @@ -1163,7 +1223,7 @@ Sets scaling factor of the color bitmap font. .. rst-class:: classref-method -void **set_cache_underline_position** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** +|void| **set_cache_underline_position**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_underline_position>` Sets pixel offset of the underline below the baseline. @@ -1175,7 +1235,7 @@ Sets pixel offset of the underline below the baseline. .. rst-class:: classref-method -void **set_cache_underline_thickness** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** +|void| **set_cache_underline_thickness**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_cache_underline_thickness>` Sets thickness of the underline in pixels. @@ -1187,7 +1247,7 @@ Sets thickness of the underline in pixels. .. rst-class:: classref-method -void **set_embolden** **(** :ref:`int<class_int>` cache_index, :ref:`float<class_float>` strength **)** +|void| **set_embolden**\ (\ cache_index\: :ref:`int<class_int>`, strength\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_embolden>` Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. @@ -1195,11 +1255,35 @@ Sets embolden strength, if is not equal to zero, emboldens the font outlines. Ne ---- +.. _class_FontFile_method_set_extra_baseline_offset: + +.. rst-class:: classref-method + +|void| **set_extra_baseline_offset**\ (\ cache_index\: :ref:`int<class_int>`, baseline_offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_FontFile_method_set_extra_baseline_offset>` + +Sets extra baseline offset (as a fraction of font height). + +.. rst-class:: classref-item-separator + +---- + +.. _class_FontFile_method_set_extra_spacing: + +.. rst-class:: classref-method + +|void| **set_extra_spacing**\ (\ cache_index\: :ref:`int<class_int>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_extra_spacing>` + +Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size). + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_method_set_face_index: .. rst-class:: classref-method -void **set_face_index** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` face_index **)** +|void| **set_face_index**\ (\ cache_index\: :ref:`int<class_int>`, face_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_face_index>` Sets an active face index in the TrueType / OpenType collection. @@ -1211,7 +1295,7 @@ Sets an active face index in the TrueType / OpenType collection. .. rst-class:: classref-method -void **set_glyph_advance** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** +|void| **set_glyph_advance**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_advance>` Sets glyph advance (offset of the next glyph). @@ -1225,7 +1309,7 @@ Sets glyph advance (offset of the next glyph). .. rst-class:: classref-method -void **set_glyph_offset** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** +|void| **set_glyph_offset**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_offset>` Sets glyph offset from the baseline. @@ -1237,7 +1321,7 @@ Sets glyph offset from the baseline. .. rst-class:: classref-method -void **set_glyph_size** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** +|void| **set_glyph_size**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_size>` Sets glyph size. @@ -1249,7 +1333,7 @@ Sets glyph size. .. rst-class:: classref-method -void **set_glyph_texture_idx** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** +|void| **set_glyph_texture_idx**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_texture_idx>` Sets index of the cache texture containing the glyph. @@ -1261,7 +1345,7 @@ Sets index of the cache texture containing the glyph. .. rst-class:: classref-method -void **set_glyph_uv_rect** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** +|void| **set_glyph_uv_rect**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_FontFile_method_set_glyph_uv_rect>` Sets rectangle in the cache texture containing the glyph. @@ -1273,7 +1357,7 @@ Sets rectangle in the cache texture containing the glyph. .. rst-class:: classref-method -void **set_kerning** **(** :ref:`int<class_int>` cache_index, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** +|void| **set_kerning**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_FontFile_method_set_kerning>` Sets kerning for the pair of glyphs. @@ -1285,7 +1369,7 @@ Sets kerning for the pair of glyphs. .. rst-class:: classref-method -void **set_language_support_override** **(** :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** +|void| **set_language_support_override**\ (\ language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_FontFile_method_set_language_support_override>` Adds override for :ref:`Font.is_language_supported<class_Font_method_is_language_supported>`. @@ -1297,7 +1381,7 @@ Adds override for :ref:`Font.is_language_supported<class_Font_method_is_language .. rst-class:: classref-method -void **set_script_support_override** **(** :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** +|void| **set_script_support_override**\ (\ script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_FontFile_method_set_script_support_override>` Adds override for :ref:`Font.is_script_supported<class_Font_method_is_script_supported>`. @@ -1309,7 +1393,7 @@ Adds override for :ref:`Font.is_script_supported<class_Font_method_is_script_sup .. rst-class:: classref-method -void **set_texture_image** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** +|void| **set_texture_image**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_FontFile_method_set_texture_image>` Sets font cache texture image. @@ -1321,7 +1405,7 @@ Sets font cache texture image. .. rst-class:: classref-method -void **set_texture_offsets** **(** :ref:`int<class_int>` cache_index, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** +|void| **set_texture_offsets**\ (\ cache_index\: :ref:`int<class_int>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_FontFile_method_set_texture_offsets>` Sets array containing glyph packing data. @@ -1333,9 +1417,9 @@ Sets array containing glyph packing data. .. rst-class:: classref-method -void **set_transform** **(** :ref:`int<class_int>` cache_index, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **set_transform**\ (\ cache_index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_FontFile_method_set_transform>` -Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. .. rst-class:: classref-item-separator @@ -1345,7 +1429,7 @@ Sets 2D transform, applied to the font outlines, can be used for slanting, flipp .. rst-class:: classref-method -void **set_variation_coordinates** **(** :ref:`int<class_int>` cache_index, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** +|void| **set_variation_coordinates**\ (\ cache_index\: :ref:`int<class_int>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_FontFile_method_set_variation_coordinates>` Sets variation coordinates for the specified font cache entry. See :ref:`Font.get_supported_variation_list<class_Font_method_get_supported_variation_list>` for more info. @@ -1356,3 +1440,4 @@ Sets variation coordinates for the specified font cache entry. See :ref:`Font.ge .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index a6c8cbab1b1..ea7a927b185 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -64,7 +64,7 @@ Properties +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Font<class_Font>` | :ref:`base_font<class_FontVariation_property_base_font>` | | +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font[]<class_Font>` | :ref:`fallbacks<class_FontVariation_property_fallbacks>` | ``[]`` | + | :ref:`float<class_float>` | :ref:`baseline_offset<class_FontVariation_property_baseline_offset>` | ``0.0`` | +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`opentype_features<class_FontVariation_property_opentype_features>` | ``{}`` | +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ @@ -93,9 +93,9 @@ Methods .. table:: :widths: auto - +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_spacing<class_FontVariation_method_set_spacing>` **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** | - +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_spacing<class_FontVariation_method_set_spacing>`\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -110,12 +110,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Font<class_Font>` **base_font** +:ref:`Font<class_Font>` **base_font** :ref:`🔗<class_FontVariation_property_base_font>` .. rst-class:: classref-property-setget -- void **set_base_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_base_font** **(** **)** +- |void| **set_base_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_base_font**\ (\ ) Base font used to create a variation. If not set, default :ref:`Theme<class_Theme>` font is used. @@ -123,18 +123,18 @@ Base font used to create a variation. If not set, default :ref:`Theme<class_Them ---- -.. _class_FontVariation_property_fallbacks: +.. _class_FontVariation_property_baseline_offset: .. rst-class:: classref-property -:ref:`Font[]<class_Font>` **fallbacks** = ``[]`` +:ref:`float<class_float>` **baseline_offset** = ``0.0`` :ref:`🔗<class_FontVariation_property_baseline_offset>` .. rst-class:: classref-property-setget -- void **set_fallbacks** **(** :ref:`Font[]<class_Font>` value **)** -- :ref:`Font[]<class_Font>` **get_fallbacks** **(** **)** +- |void| **set_baseline_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_baseline_offset**\ (\ ) -Array of fallback :ref:`Font<class_Font>`\ s to use as a substitute if a glyph is not found in this **FontVariation**. If not set, :ref:`base_font<class_FontVariation_property_base_font>`'s fallbacks are used instead. +Extra baseline offset (as a fraction of font height). .. rst-class:: classref-item-separator @@ -144,12 +144,12 @@ Array of fallback :ref:`Font<class_Font>`\ s to use as a substitute if a glyph i .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **opentype_features** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **opentype_features** = ``{}`` :ref:`🔗<class_FontVariation_property_opentype_features>` .. rst-class:: classref-property-setget -- void **set_opentype_features** **(** :ref:`Dictionary<class_Dictionary>` value **)** -- :ref:`Dictionary<class_Dictionary>` **get_opentype_features** **(** **)** +- |void| **set_opentype_features**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ ) +- :ref:`Dictionary<class_Dictionary>` **get_opentype_features**\ (\ ) A set of OpenType feature tags. More info: `OpenType feature tags <https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags>`__. @@ -161,12 +161,12 @@ A set of OpenType feature tags. More info: `OpenType feature tags <https://docs. .. rst-class:: classref-property -:ref:`int<class_int>` **spacing_bottom** = ``0`` +:ref:`int<class_int>` **spacing_bottom** = ``0`` :ref:`🔗<class_FontVariation_property_spacing_bottom>` .. rst-class:: classref-property-setget -- void **set_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_spacing** **(** **)** +- |void| **set_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_spacing**\ (\ ) Extra spacing at the bottom of the line in pixels. @@ -178,12 +178,12 @@ Extra spacing at the bottom of the line in pixels. .. rst-class:: classref-property -:ref:`int<class_int>` **spacing_glyph** = ``0`` +:ref:`int<class_int>` **spacing_glyph** = ``0`` :ref:`🔗<class_FontVariation_property_spacing_glyph>` .. rst-class:: classref-property-setget -- void **set_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_spacing** **(** **)** +- |void| **set_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_spacing**\ (\ ) Extra spacing between graphical glyphs. @@ -195,12 +195,12 @@ Extra spacing between graphical glyphs. .. rst-class:: classref-property -:ref:`int<class_int>` **spacing_space** = ``0`` +:ref:`int<class_int>` **spacing_space** = ``0`` :ref:`🔗<class_FontVariation_property_spacing_space>` .. rst-class:: classref-property-setget -- void **set_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_spacing** **(** **)** +- |void| **set_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_spacing**\ (\ ) Extra width of the space glyphs. @@ -212,12 +212,12 @@ Extra width of the space glyphs. .. rst-class:: classref-property -:ref:`int<class_int>` **spacing_top** = ``0`` +:ref:`int<class_int>` **spacing_top** = ``0`` :ref:`🔗<class_FontVariation_property_spacing_top>` .. rst-class:: classref-property-setget -- void **set_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_spacing** **(** **)** +- |void| **set_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_spacing**\ (\ ) Extra spacing at the top of the line in pixels. @@ -229,12 +229,12 @@ Extra spacing at the top of the line in pixels. .. rst-class:: classref-property -:ref:`float<class_float>` **variation_embolden** = ``0.0`` +:ref:`float<class_float>` **variation_embolden** = ``0.0`` :ref:`🔗<class_FontVariation_property_variation_embolden>` .. rst-class:: classref-property-setget -- void **set_variation_embolden** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_variation_embolden** **(** **)** +- |void| **set_variation_embolden**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_variation_embolden**\ (\ ) If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. @@ -248,12 +248,12 @@ If is not equal to zero, emboldens the font outlines. Negative values reduce the .. rst-class:: classref-property -:ref:`int<class_int>` **variation_face_index** = ``0`` +:ref:`int<class_int>` **variation_face_index** = ``0`` :ref:`🔗<class_FontVariation_property_variation_face_index>` .. rst-class:: classref-property-setget -- void **set_variation_face_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_variation_face_index** **(** **)** +- |void| **set_variation_face_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_variation_face_index**\ (\ ) Active face index in the TrueType / OpenType collection file. @@ -265,16 +265,16 @@ Active face index in the TrueType / OpenType collection file. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **variation_opentype** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **variation_opentype** = ``{}`` :ref:`🔗<class_FontVariation_property_variation_opentype>` .. rst-class:: classref-property-setget -- void **set_variation_opentype** **(** :ref:`Dictionary<class_Dictionary>` value **)** -- :ref:`Dictionary<class_Dictionary>` **get_variation_opentype** **(** **)** +- |void| **set_variation_opentype**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ ) +- :ref:`Dictionary<class_Dictionary>` **get_variation_opentype**\ (\ ) Font OpenType variation coordinates. More info: `OpenType variation tags <https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg>`__. -\ **Note:** This :ref:`Dictionary<class_Dictionary>` uses OpenType tags as keys. Variation axes can be identified both by tags(``int``) and names (``string``). Some axes might be accessible by multiple names. For example, ``wght`` refers to the same axis as ``weight``. Tags on the other hand are unique. To convert between names and tags, use :ref:`TextServer.name_to_tag<class_TextServer_method_name_to_tag>` and :ref:`TextServer.tag_to_name<class_TextServer_method_tag_to_name>`. +\ **Note:** This :ref:`Dictionary<class_Dictionary>` uses OpenType tags as keys. Variation axes can be identified both by tags (:ref:`int<class_int>`, e.g. ``0x77678674``) and names (:ref:`String<class_String>`, e.g. ``wght``). Some axes might be accessible by multiple names. For example, ``wght`` refers to the same axis as ``weight``. Tags on the other hand are unique. To convert between names and tags, use :ref:`TextServer.name_to_tag<class_TextServer_method_name_to_tag>` and :ref:`TextServer.tag_to_name<class_TextServer_method_tag_to_name>`. \ **Note:** To get available variation axes of a font, use :ref:`Font.get_supported_variation_list<class_Font_method_get_supported_variation_list>`. @@ -286,12 +286,12 @@ Font OpenType variation coordinates. More info: `OpenType variation tags <https: .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **variation_transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` +:ref:`Transform2D<class_Transform2D>` **variation_transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗<class_FontVariation_property_variation_transform>` .. rst-class:: classref-property-setget -- void **set_variation_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_variation_transform** **(** **)** +- |void| **set_variation_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_variation_transform**\ (\ ) 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. @@ -310,9 +310,9 @@ Method Descriptions .. rst-class:: classref-method -void **set_spacing** **(** :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** +|void| **set_spacing**\ (\ spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_FontVariation_method_set_spacing>` -Sets the spacing for ``type`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size). +Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -321,3 +321,4 @@ Sets the spacing for ``type`` (see :ref:`SpacingType<enum_TextServer_SpacingType .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_framebuffercacherd.rst b/classes/class_framebuffercacherd.rst new file mode 100644 index 00000000000..41ee705a756 --- /dev/null +++ b/classes/class_framebuffercacherd.rst @@ -0,0 +1,60 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/FramebufferCacheRD.xml. + +.. _class_FramebufferCacheRD: + +FramebufferCacheRD +================== + +**Inherits:** :ref:`Object<class_Object>` + +Framebuffer cache manager for Rendering Device based renderers. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Framebuffer cache manager for Rendering Device based renderers. Provides a way to create a framebuffer and reuse it in subsequent calls for as long as the used textures exists. Framebuffers will automatically be cleaned up when dependent objects are freed. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_cache_multipass<class_FramebufferCacheRD_method_get_cache_multipass>`\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], views\: :ref:`int<class_int>`\ ) |static| | + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_FramebufferCacheRD_method_get_cache_multipass: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_cache_multipass**\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], views\: :ref:`int<class_int>`\ ) |static| :ref:`🔗<class_FramebufferCacheRD_method_get_cache_multipass>` + +Creates, or obtains a cached, framebuffer. ``textures`` lists textures accessed. ``passes`` defines the subpasses and texture allocation, if left empty a single pass is created and textures are allocated depending on their usage flags. ``views`` defines the number of views used when rendering. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gdextension.rst b/classes/class_gdextension.rst index 2b6cf2dfeec..3015d96c576 100644 --- a/classes/class_gdextension.rst +++ b/classes/class_gdextension.rst @@ -12,9 +12,25 @@ GDExtension **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +A native library for GDExtension. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +The **GDExtension** resource type represents a `shared library <https://en.wikipedia.org/wiki/Shared_library>`__ which can expand the functionality of the engine. The :ref:`GDExtensionManager<class_GDExtensionManager>` singleton is responsible for loading, reloading, and unloading **GDExtension** resources. + +\ **Note:** GDExtension itself is not a scripting language and has no relation to :ref:`GDScript<class_GDScript>` resources. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`GDExtension overview <../tutorials/scripting/gdextension/what_is_gdextension>` + +- :doc:`GDExtension example in C++ <../tutorials/scripting/gdextension/gdextension_cpp_example>` .. rst-class:: classref-reftable-group @@ -24,17 +40,11 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close_library<class_GDExtension_method_close_library>` **(** **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` | :ref:`get_minimum_library_initialization_level<class_GDExtension_method_get_minimum_library_initialization_level>` **(** **)** |const| | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`initialize_library<class_GDExtension_method_initialize_library>` **(** :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` level **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_library_open<class_GDExtension_method_is_library_open>` **(** **)** |const| | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`open_library<class_GDExtension_method_open_library>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` entry_symbol **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` | :ref:`get_minimum_library_initialization_level<class_GDExtension_method_get_minimum_library_initialization_level>`\ (\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_library_open<class_GDExtension_method_is_library_open>`\ (\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -49,7 +59,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **InitializationLevel**: +enum **InitializationLevel**: :ref:`🔗<enum_GDExtension_InitializationLevel>` .. _class_GDExtension_constant_INITIALIZATION_LEVEL_CORE: @@ -57,7 +67,7 @@ enum **InitializationLevel**: :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_CORE** = ``0`` - +The library is initialized at the same time as the core features of the engine. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_SERVERS: @@ -65,7 +75,7 @@ enum **InitializationLevel**: :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_SERVERS** = ``1`` - +The library is initialized at the same time as the engine's servers (such as :ref:`RenderingServer<class_RenderingServer>` or :ref:`PhysicsServer3D<class_PhysicsServer3D>`). .. _class_GDExtension_constant_INITIALIZATION_LEVEL_SCENE: @@ -73,7 +83,7 @@ enum **InitializationLevel**: :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_SCENE** = ``2`` - +The library is initialized at the same time as the engine's scene-related classes. .. _class_GDExtension_constant_INITIALIZATION_LEVEL_EDITOR: @@ -81,7 +91,7 @@ enum **InitializationLevel**: :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **INITIALIZATION_LEVEL_EDITOR** = ``3`` - +The library is initialized at the same time as the engine's editor classes. Only happens when loading the GDExtension in the editor. .. rst-class:: classref-section-separator @@ -92,43 +102,13 @@ enum **InitializationLevel**: Method Descriptions ------------------- -.. _class_GDExtension_method_close_library: - -.. rst-class:: classref-method - -void **close_library** **(** **)** - -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! - -.. rst-class:: classref-item-separator - ----- - .. _class_GDExtension_method_get_minimum_library_initialization_level: .. rst-class:: classref-method -:ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **get_minimum_library_initialization_level** **(** **)** |const| - -.. container:: contribute +:ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` **get_minimum_library_initialization_level**\ (\ ) |const| :ref:`🔗<class_GDExtension_method_get_minimum_library_initialization_level>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! - -.. rst-class:: classref-item-separator - ----- - -.. _class_GDExtension_method_initialize_library: - -.. rst-class:: classref-method - -void **initialize_library** **(** :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` level **)** - -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the lowest level required for this extension to be properly initialized (see the :ref:`InitializationLevel<enum_GDExtension_InitializationLevel>` enum). .. rst-class:: classref-item-separator @@ -138,25 +118,9 @@ void **initialize_library** **(** :ref:`InitializationLevel<enum_GDExtension_Ini .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_library_open** **(** **)** |const| - -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! - -.. rst-class:: classref-item-separator - ----- - -.. _class_GDExtension_method_open_library: - -.. rst-class:: classref-method - -:ref:`Error<enum_@GlobalScope_Error>` **open_library** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` entry_symbol **)** - -.. container:: contribute +:ref:`bool<class_bool>` **is_library_open**\ (\ ) |const| :ref:`🔗<class_GDExtension_method_is_library_open>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if this extension's library has been opened. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -165,3 +129,4 @@ void **initialize_library** **(** :ref:`InitializationLevel<enum_GDExtension_Ini .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gdextensionmanager.rst b/classes/class_gdextensionmanager.rst index 7d0d47758a6..406d574613b 100644 --- a/classes/class_gdextensionmanager.rst +++ b/classes/class_gdextensionmanager.rst @@ -12,9 +12,25 @@ GDExtensionManager **Inherits:** :ref:`Object<class_Object>` -.. container:: contribute +Provides access to GDExtension functionality. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +The GDExtensionManager loads, initializes, and keeps track of all available :ref:`GDExtension<class_GDExtension>` libraries in the project. + +\ **Note:** Do not worry about GDExtension unless you know what you are doing. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`GDExtension overview <../tutorials/scripting/gdextension/what_is_gdextension>` + +- :doc:`GDExtension example in C++ <../tutorials/scripting/gdextension/gdextension_cpp_example>` .. rst-class:: classref-reftable-group @@ -24,19 +40,36 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GDExtension<class_GDExtension>` | :ref:`get_extension<class_GDExtensionManager_method_get_extension>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_loaded_extensions<class_GDExtensionManager_method_get_loaded_extensions>` **(** **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_extension_loaded<class_GDExtensionManager_method_is_extension_loaded>` **(** :ref:`String<class_String>` path **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`load_extension<class_GDExtensionManager_method_load_extension>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`reload_extension<class_GDExtensionManager_method_reload_extension>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`unload_extension<class_GDExtensionManager_method_unload_extension>` **(** :ref:`String<class_String>` path **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GDExtension<class_GDExtension>` | :ref:`get_extension<class_GDExtensionManager_method_get_extension>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_loaded_extensions<class_GDExtensionManager_method_get_loaded_extensions>`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_extension_loaded<class_GDExtensionManager_method_is_extension_loaded>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`load_extension<class_GDExtensionManager_method_load_extension>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`reload_extension<class_GDExtensionManager_method_reload_extension>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` | :ref:`unload_extension<class_GDExtensionManager_method_unload_extension>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_GDExtensionManager_signal_extensions_reloaded: + +.. rst-class:: classref-signal + +**extensions_reloaded**\ (\ ) :ref:`🔗<class_GDExtensionManager_signal_extensions_reloaded>` + +Emitted after the editor has finished reloading one or more extensions. .. rst-class:: classref-section-separator @@ -51,7 +84,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **LoadStatus**: +enum **LoadStatus**: :ref:`🔗<enum_GDExtensionManager_LoadStatus>` .. _class_GDExtensionManager_constant_LOAD_STATUS_OK: @@ -59,7 +92,7 @@ enum **LoadStatus**: :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_OK** = ``0`` - +The extension has loaded successfully. .. _class_GDExtensionManager_constant_LOAD_STATUS_FAILED: @@ -67,7 +100,7 @@ enum **LoadStatus**: :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_FAILED** = ``1`` - +The extension has failed to load, possibly because it does not exist or has missing dependencies. .. _class_GDExtensionManager_constant_LOAD_STATUS_ALREADY_LOADED: @@ -75,7 +108,7 @@ enum **LoadStatus**: :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_ALREADY_LOADED** = ``2`` - +The extension has already been loaded. .. _class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED: @@ -83,7 +116,7 @@ enum **LoadStatus**: :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_NOT_LOADED** = ``3`` - +The extension has not been loaded. .. _class_GDExtensionManager_constant_LOAD_STATUS_NEEDS_RESTART: @@ -91,7 +124,7 @@ enum **LoadStatus**: :ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **LOAD_STATUS_NEEDS_RESTART** = ``4`` - +The extension requires the application to restart to fully load. .. rst-class:: classref-section-separator @@ -106,11 +139,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`GDExtension<class_GDExtension>` **get_extension** **(** :ref:`String<class_String>` path **)** +:ref:`GDExtension<class_GDExtension>` **get_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_get_extension>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the :ref:`GDExtension<class_GDExtension>` at the given file ``path``, or ``null`` if it has not been loaded or does not exist. .. rst-class:: classref-item-separator @@ -120,11 +151,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_loaded_extensions** **(** **)** |const| - -.. container:: contribute +:ref:`PackedStringArray<class_PackedStringArray>` **get_loaded_extensions**\ (\ ) |const| :ref:`🔗<class_GDExtensionManager_method_get_loaded_extensions>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the file paths of all currently loaded extensions. .. rst-class:: classref-item-separator @@ -134,11 +163,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_extension_loaded** **(** :ref:`String<class_String>` path **)** |const| +:ref:`bool<class_bool>` **is_extension_loaded**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_GDExtensionManager_method_is_extension_loaded>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if the extension at the given file ``path`` has already been loaded successfully. See also :ref:`get_loaded_extensions<class_GDExtensionManager_method_get_loaded_extensions>`. .. rst-class:: classref-item-separator @@ -148,11 +175,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **load_extension** **(** :ref:`String<class_String>` path **)** - -.. container:: contribute +:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **load_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_load_extension>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Loads an extension by absolute file path. The ``path`` needs to point to a valid :ref:`GDExtension<class_GDExtension>`. Returns :ref:`LOAD_STATUS_OK<class_GDExtensionManager_constant_LOAD_STATUS_OK>` if successful. .. rst-class:: classref-item-separator @@ -162,11 +187,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **reload_extension** **(** :ref:`String<class_String>` path **)** +:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **reload_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_reload_extension>` -.. container:: contribute +Reloads the extension at the given file path. The ``path`` needs to point to a valid :ref:`GDExtension<class_GDExtension>`, otherwise this method may return either :ref:`LOAD_STATUS_NOT_LOADED<class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED>` or :ref:`LOAD_STATUS_FAILED<class_GDExtensionManager_constant_LOAD_STATUS_FAILED>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** You can only reload extensions in the editor. In release builds, this method always fails and returns :ref:`LOAD_STATUS_FAILED<class_GDExtensionManager_constant_LOAD_STATUS_FAILED>`. .. rst-class:: classref-item-separator @@ -176,11 +201,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **unload_extension** **(** :ref:`String<class_String>` path **)** - -.. container:: contribute +:ref:`LoadStatus<enum_GDExtensionManager_LoadStatus>` **unload_extension**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GDExtensionManager_method_unload_extension>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Unloads an extension by file path. The ``path`` needs to point to an already loaded :ref:`GDExtension<class_GDExtension>`, otherwise this method returns :ref:`LOAD_STATUS_NOT_LOADED<class_GDExtensionManager_constant_LOAD_STATUS_NOT_LOADED>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -189,3 +212,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index e40c0ea8360..60934044fcb 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -40,9 +40,9 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`new<class_GDScript_method_new>` **(** ... **)** |vararg| | - +-------------------------------+----------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`new<class_GDScript_method_new>`\ (\ ...\ ) |vararg| | + +-------------------------------+-----------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -57,7 +57,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **new** **(** ... **)** |vararg| +:ref:`Variant<class_Variant>` **new**\ (\ ...\ ) |vararg| :ref:`🔗<class_GDScript_method_new>` Returns a new instance of the script. @@ -76,3 +76,4 @@ For example: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_generic6dofjoint3d.rst b/classes/class_generic6dofjoint3d.rst index 8d623aa460b..d87439736f3 100644 --- a/classes/class_generic6dofjoint3d.rst +++ b/classes/class_generic6dofjoint3d.rst @@ -209,31 +209,31 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_flag_x<class_Generic6DOFJoint3D_method_get_flag_x>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_flag_y<class_Generic6DOFJoint3D_method_get_flag_y>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_flag_z<class_Generic6DOFJoint3D_method_get_flag_z>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param_x<class_Generic6DOFJoint3D_method_get_param_x>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param_y<class_Generic6DOFJoint3D_method_get_param_y>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param_z<class_Generic6DOFJoint3D_method_get_param_z>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag_x<class_Generic6DOFJoint3D_method_set_flag_x>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag_y<class_Generic6DOFJoint3D_method_set_flag_y>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag_z<class_Generic6DOFJoint3D_method_set_flag_z>` **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_x<class_Generic6DOFJoint3D_method_set_param_x>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_y<class_Generic6DOFJoint3D_method_set_param_y>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_z<class_Generic6DOFJoint3D_method_set_param_z>` **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_flag_x<class_Generic6DOFJoint3D_method_get_flag_x>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_flag_y<class_Generic6DOFJoint3D_method_get_flag_y>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_flag_z<class_Generic6DOFJoint3D_method_get_flag_z>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param_x<class_Generic6DOFJoint3D_method_get_param_x>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param_y<class_Generic6DOFJoint3D_method_get_param_y>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param_z<class_Generic6DOFJoint3D_method_get_param_z>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag_x<class_Generic6DOFJoint3D_method_set_flag_x>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag_y<class_Generic6DOFJoint3D_method_set_flag_y>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag_z<class_Generic6DOFJoint3D_method_set_flag_z>`\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_x<class_Generic6DOFJoint3D_method_set_param_x>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_y<class_Generic6DOFJoint3D_method_set_param_y>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_z<class_Generic6DOFJoint3D_method_set_param_z>`\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -248,7 +248,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗<enum_Generic6DOFJoint3D_Param>` .. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_LOWER_LIMIT: @@ -312,6 +312,10 @@ The maximum force the linear motor will apply while trying to reach the velocity :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_LINEAR_SPRING_STIFFNESS** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_DAMPING: @@ -320,6 +324,10 @@ The maximum force the linear motor will apply while trying to reach the velocity :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_LINEAR_SPRING_DAMPING** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT: @@ -328,6 +336,10 @@ The maximum force the linear motor will apply while trying to reach the velocity :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT** = ``9`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_LOWER_LIMIT: @@ -408,6 +420,10 @@ Maximum acceleration for the motor at the axes. :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_ANGULAR_SPRING_STIFFNESS** = ``19`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_DAMPING: @@ -416,6 +432,10 @@ Maximum acceleration for the motor at the axes. :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_ANGULAR_SPRING_DAMPING** = ``20`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT: @@ -424,6 +444,10 @@ Maximum acceleration for the motor at the axes. :ref:`Param<enum_Generic6DOFJoint3D_Param>` **PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT** = ``21`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_PARAM_MAX: @@ -442,7 +466,7 @@ Represents the size of the :ref:`Param<enum_Generic6DOFJoint3D_Param>` enum. .. rst-class:: classref-enumeration -enum **Flag**: +enum **Flag**: :ref:`🔗<enum_Generic6DOFJoint3D_Flag>` .. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_LINEAR_LIMIT: @@ -466,6 +490,10 @@ If enabled, rotational motion is possible within the given limits. :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` **FLAG_ENABLE_LINEAR_SPRING** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_ANGULAR_SPRING: @@ -474,6 +502,10 @@ If enabled, rotational motion is possible within the given limits. :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` **FLAG_ENABLE_ANGULAR_SPRING** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_Generic6DOFJoint3D_constant_FLAG_ENABLE_MOTOR: @@ -513,12 +545,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/damping** = ``1.0`` +:ref:`float<class_float>` **angular_limit_x/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/damping>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational damping across the X axis. @@ -532,12 +564,12 @@ The lower, the longer an impulse from one side takes to travel to the other side .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_limit_x/enabled** = ``true`` +:ref:`bool<class_bool>` **angular_limit_x/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, rotation across the X axis is limited. @@ -549,12 +581,12 @@ If ``true``, rotation across the X axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/erp** = ``0.5`` +:ref:`float<class_float>` **angular_limit_x/erp** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/erp>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -566,12 +598,12 @@ When rotating across the X axis, this error tolerance factor defines how much th .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/force_limit** = ``0.0`` +:ref:`float<class_float>` **angular_limit_x/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum amount of force that can occur, when rotating around the X axis. @@ -583,12 +615,12 @@ The maximum amount of force that can occur, when rotating around the X axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/lower_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_x/lower_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/lower_angle>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in negative direction to break loose and rotate around the X axis. @@ -600,12 +632,12 @@ The minimum rotation in negative direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/restitution** = ``0.0`` +:ref:`float<class_float>` **angular_limit_x/restitution** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/restitution>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational restitution across the X axis. The lower, the more restitution occurs. @@ -617,12 +649,12 @@ The amount of rotational restitution across the X axis. The lower, the more rest .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/softness** = ``0.5`` +:ref:`float<class_float>` **angular_limit_x/softness** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/softness>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed of all rotations across the X axis. @@ -634,12 +666,12 @@ The speed of all rotations across the X axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_x/upper_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_x/upper_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_x/upper_angle>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in positive direction to break loose and rotate around the X axis. @@ -651,12 +683,12 @@ The minimum rotation in positive direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/damping** = ``1.0`` +:ref:`float<class_float>` **angular_limit_y/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/damping>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational damping across the Y axis. The lower, the more damping occurs. @@ -668,12 +700,12 @@ The amount of rotational damping across the Y axis. The lower, the more damping .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_limit_y/enabled** = ``true`` +:ref:`bool<class_bool>` **angular_limit_y/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, rotation across the Y axis is limited. @@ -685,12 +717,12 @@ If ``true``, rotation across the Y axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/erp** = ``0.5`` +:ref:`float<class_float>` **angular_limit_y/erp** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/erp>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -702,12 +734,12 @@ When rotating across the Y axis, this error tolerance factor defines how much th .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/force_limit** = ``0.0`` +:ref:`float<class_float>` **angular_limit_y/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum amount of force that can occur, when rotating around the Y axis. @@ -719,12 +751,12 @@ The maximum amount of force that can occur, when rotating around the Y axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/lower_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_y/lower_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/lower_angle>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in negative direction to break loose and rotate around the Y axis. @@ -736,12 +768,12 @@ The minimum rotation in negative direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/restitution** = ``0.0`` +:ref:`float<class_float>` **angular_limit_y/restitution** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/restitution>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. @@ -753,12 +785,12 @@ The amount of rotational restitution across the Y axis. The lower, the more rest .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/softness** = ``0.5`` +:ref:`float<class_float>` **angular_limit_y/softness** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/softness>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed of all rotations across the Y axis. @@ -770,12 +802,12 @@ The speed of all rotations across the Y axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_y/upper_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_y/upper_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_y/upper_angle>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in positive direction to break loose and rotate around the Y axis. @@ -787,12 +819,12 @@ The minimum rotation in positive direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/damping** = ``1.0`` +:ref:`float<class_float>` **angular_limit_z/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/damping>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational damping across the Z axis. The lower, the more damping occurs. @@ -804,12 +836,12 @@ The amount of rotational damping across the Z axis. The lower, the more damping .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_limit_z/enabled** = ``true`` +:ref:`bool<class_bool>` **angular_limit_z/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, rotation across the Z axis is limited. @@ -821,12 +853,12 @@ If ``true``, rotation across the Z axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/erp** = ``0.5`` +:ref:`float<class_float>` **angular_limit_z/erp** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/erp>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. @@ -838,12 +870,12 @@ When rotating across the Z axis, this error tolerance factor defines how much th .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/force_limit** = ``0.0`` +:ref:`float<class_float>` **angular_limit_z/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum amount of force that can occur, when rotating around the Z axis. @@ -855,12 +887,12 @@ The maximum amount of force that can occur, when rotating around the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/lower_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_z/lower_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/lower_angle>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in negative direction to break loose and rotate around the Z axis. @@ -872,12 +904,12 @@ The minimum rotation in negative direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/restitution** = ``0.0`` +:ref:`float<class_float>` **angular_limit_z/restitution** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/restitution>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. @@ -889,12 +921,12 @@ The amount of rotational restitution across the Z axis. The lower, the more rest .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/softness** = ``0.5`` +:ref:`float<class_float>` **angular_limit_z/softness** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/softness>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed of all rotations across the Z axis. @@ -906,12 +938,12 @@ The speed of all rotations across the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit_z/upper_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit_z/upper_angle** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_limit_z/upper_angle>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum rotation in positive direction to break loose and rotate around the Z axis. @@ -923,12 +955,12 @@ The minimum rotation in positive direction to break loose and rotate around the .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_motor_x/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_motor_x/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, a rotating motor at the X axis is enabled. @@ -940,12 +972,12 @@ If ``true``, a rotating motor at the X axis is enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_x/force_limit** = ``300.0`` +:ref:`float<class_float>` **angular_motor_x/force_limit** = ``300.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_x/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Maximum acceleration for the motor at the X axis. @@ -957,12 +989,12 @@ Maximum acceleration for the motor at the X axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_x/target_velocity** = ``0.0`` +:ref:`float<class_float>` **angular_motor_x/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_x/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Target speed for the motor at the X axis. @@ -974,12 +1006,12 @@ Target speed for the motor at the X axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_motor_y/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_motor_y/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, a rotating motor at the Y axis is enabled. @@ -991,12 +1023,12 @@ If ``true``, a rotating motor at the Y axis is enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_y/force_limit** = ``300.0`` +:ref:`float<class_float>` **angular_motor_y/force_limit** = ``300.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_y/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Maximum acceleration for the motor at the Y axis. @@ -1008,12 +1040,12 @@ Maximum acceleration for the motor at the Y axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_y/target_velocity** = ``0.0`` +:ref:`float<class_float>` **angular_motor_y/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_y/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Target speed for the motor at the Y axis. @@ -1025,12 +1057,12 @@ Target speed for the motor at the Y axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_motor_z/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_motor_z/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, a rotating motor at the Z axis is enabled. @@ -1042,12 +1074,12 @@ If ``true``, a rotating motor at the Z axis is enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_z/force_limit** = ``300.0`` +:ref:`float<class_float>` **angular_motor_z/force_limit** = ``300.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_z/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Maximum acceleration for the motor at the Z axis. @@ -1059,12 +1091,12 @@ Maximum acceleration for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motor_z/target_velocity** = ``0.0`` +:ref:`float<class_float>` **angular_motor_z/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_motor_z/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| Target speed for the motor at the Z axis. @@ -1076,12 +1108,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_x/damping** = ``0.0`` +:ref:`float<class_float>` **angular_spring_x/damping** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_x/damping>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1095,12 +1127,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_spring_x/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_spring_x/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1114,12 +1146,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_x/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **angular_spring_x/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_x/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1133,12 +1165,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_x/stiffness** = ``0.0`` +:ref:`float<class_float>` **angular_spring_x/stiffness** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_x/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1152,12 +1184,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_y/damping** = ``0.0`` +:ref:`float<class_float>` **angular_spring_y/damping** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_y/damping>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1171,12 +1203,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_spring_y/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_spring_y/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1190,12 +1222,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_y/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **angular_spring_y/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_y/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1209,12 +1241,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_y/stiffness** = ``0.0`` +:ref:`float<class_float>` **angular_spring_y/stiffness** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_y/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1228,12 +1260,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_z/damping** = ``0.0`` +:ref:`float<class_float>` **angular_spring_z/damping** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_z/damping>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1247,12 +1279,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_spring_z/enabled** = ``false`` +:ref:`bool<class_bool>` **angular_spring_z/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1266,12 +1298,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_z/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **angular_spring_z/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_z/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1285,12 +1317,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_spring_z/stiffness** = ``0.0`` +:ref:`float<class_float>` **angular_spring_z/stiffness** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_angular_spring_z/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1304,12 +1336,12 @@ Target speed for the motor at the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_x/damping** = ``1.0`` +:ref:`float<class_float>` **linear_limit_x/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/damping>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of damping that happens at the X motion. @@ -1321,12 +1353,12 @@ The amount of damping that happens at the X motion. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_limit_x/enabled** = ``true`` +:ref:`bool<class_bool>` **linear_limit_x/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, the linear motion across the X axis is limited. @@ -1338,12 +1370,12 @@ If ``true``, the linear motion across the X axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_x/lower_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_x/lower_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/lower_distance>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum difference between the pivot points' X axis. @@ -1355,12 +1387,12 @@ The minimum difference between the pivot points' X axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_x/restitution** = ``0.5`` +:ref:`float<class_float>` **linear_limit_x/restitution** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/restitution>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of restitution on the X axis movement. The lower, the more momentum gets lost. @@ -1372,12 +1404,12 @@ The amount of restitution on the X axis movement. The lower, the more momentum g .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_x/softness** = ``0.7`` +:ref:`float<class_float>` **linear_limit_x/softness** = ``0.7`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/softness>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| A factor applied to the movement across the X axis. The lower, the slower the movement. @@ -1389,12 +1421,12 @@ A factor applied to the movement across the X axis. The lower, the slower the mo .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_x/upper_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_x/upper_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_x/upper_distance>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum difference between the pivot points' X axis. @@ -1406,12 +1438,12 @@ The maximum difference between the pivot points' X axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_y/damping** = ``1.0`` +:ref:`float<class_float>` **linear_limit_y/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/damping>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of damping that happens at the Y motion. @@ -1423,12 +1455,12 @@ The amount of damping that happens at the Y motion. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_limit_y/enabled** = ``true`` +:ref:`bool<class_bool>` **linear_limit_y/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, the linear motion across the Y axis is limited. @@ -1440,12 +1472,12 @@ If ``true``, the linear motion across the Y axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_y/lower_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_y/lower_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/lower_distance>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum difference between the pivot points' Y axis. @@ -1457,12 +1489,12 @@ The minimum difference between the pivot points' Y axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_y/restitution** = ``0.5`` +:ref:`float<class_float>` **linear_limit_y/restitution** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/restitution>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. @@ -1474,12 +1506,12 @@ The amount of restitution on the Y axis movement. The lower, the more momentum g .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_y/softness** = ``0.7`` +:ref:`float<class_float>` **linear_limit_y/softness** = ``0.7`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/softness>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| A factor applied to the movement across the Y axis. The lower, the slower the movement. @@ -1491,12 +1523,12 @@ A factor applied to the movement across the Y axis. The lower, the slower the mo .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_y/upper_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_y/upper_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_y/upper_distance>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum difference between the pivot points' Y axis. @@ -1508,12 +1540,12 @@ The maximum difference between the pivot points' Y axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_z/damping** = ``1.0`` +:ref:`float<class_float>` **linear_limit_z/damping** = ``1.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/damping>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of damping that happens at the Z motion. @@ -1525,12 +1557,12 @@ The amount of damping that happens at the Z motion. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_limit_z/enabled** = ``true`` +:ref:`bool<class_bool>` **linear_limit_z/enabled** = ``true`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, the linear motion across the Z axis is limited. @@ -1542,12 +1574,12 @@ If ``true``, the linear motion across the Z axis is limited. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_z/lower_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_z/lower_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/lower_distance>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The minimum difference between the pivot points' Z axis. @@ -1559,12 +1591,12 @@ The minimum difference between the pivot points' Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_z/restitution** = ``0.5`` +:ref:`float<class_float>` **linear_limit_z/restitution** = ``0.5`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/restitution>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. @@ -1576,12 +1608,12 @@ The amount of restitution on the Z axis movement. The lower, the more momentum g .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_z/softness** = ``0.7`` +:ref:`float<class_float>` **linear_limit_z/softness** = ``0.7`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/softness>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| A factor applied to the movement across the Z axis. The lower, the slower the movement. @@ -1593,12 +1625,12 @@ A factor applied to the movement across the Z axis. The lower, the slower the mo .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit_z/upper_distance** = ``0.0`` +:ref:`float<class_float>` **linear_limit_z/upper_distance** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_limit_z/upper_distance>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum difference between the pivot points' Z axis. @@ -1610,12 +1642,12 @@ The maximum difference between the pivot points' Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_motor_x/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_motor_x/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. @@ -1627,12 +1659,12 @@ If ``true``, then there is a linear motor on the X axis. It will attempt to reac .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_x/force_limit** = ``0.0`` +:ref:`float<class_float>` **linear_motor_x/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_x/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. @@ -1644,12 +1676,12 @@ The maximum force the linear motor can apply on the X axis while trying to reach .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_x/target_velocity** = ``0.0`` +:ref:`float<class_float>` **linear_motor_x/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_x/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed that the linear motor will attempt to reach on the X axis. @@ -1661,12 +1693,12 @@ The speed that the linear motor will attempt to reach on the X axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_motor_y/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_motor_y/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. @@ -1678,12 +1710,12 @@ If ``true``, then there is a linear motor on the Y axis. It will attempt to reac .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_y/force_limit** = ``0.0`` +:ref:`float<class_float>` **linear_motor_y/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_y/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. @@ -1695,12 +1727,12 @@ The maximum force the linear motor can apply on the Y axis while trying to reach .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_y/target_velocity** = ``0.0`` +:ref:`float<class_float>` **linear_motor_y/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_y/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed that the linear motor will attempt to reach on the Y axis. @@ -1712,12 +1744,12 @@ The speed that the linear motor will attempt to reach on the Y axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_motor_z/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_motor_z/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| If ``true``, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. @@ -1729,12 +1761,12 @@ If ``true``, then there is a linear motor on the Z axis. It will attempt to reac .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_z/force_limit** = ``0.0`` +:ref:`float<class_float>` **linear_motor_z/force_limit** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_z/force_limit>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. @@ -1746,12 +1778,12 @@ The maximum force the linear motor can apply on the Z axis while trying to reach .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motor_z/target_velocity** = ``0.0`` +:ref:`float<class_float>` **linear_motor_z/target_velocity** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_motor_z/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| The speed that the linear motor will attempt to reach on the Z axis. @@ -1763,12 +1795,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_x/damping** = ``0.01`` +:ref:`float<class_float>` **linear_spring_x/damping** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_x/damping>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1782,12 +1814,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_spring_x/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_spring_x/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_x/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1801,12 +1833,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_x/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **linear_spring_x/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_x/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1820,12 +1852,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_x/stiffness** = ``0.01`` +:ref:`float<class_float>` **linear_spring_x/stiffness** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_x/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1839,12 +1871,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_y/damping** = ``0.01`` +:ref:`float<class_float>` **linear_spring_y/damping** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_y/damping>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1858,12 +1890,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_spring_y/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_spring_y/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_y/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1877,12 +1909,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_y/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **linear_spring_y/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_y/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1896,12 +1928,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_y/stiffness** = ``0.01`` +:ref:`float<class_float>` **linear_spring_y/stiffness** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_y/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1915,12 +1947,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_z/damping** = ``0.01`` +:ref:`float<class_float>` **linear_spring_z/damping** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_z/damping>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1934,12 +1966,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **linear_spring_z/enabled** = ``false`` +:ref:`bool<class_bool>` **linear_spring_z/enabled** = ``false`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_z/enabled>` .. rst-class:: classref-property-setget -- void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +- |void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| .. container:: contribute @@ -1953,12 +1985,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_z/equilibrium_point** = ``0.0`` +:ref:`float<class_float>` **linear_spring_z/equilibrium_point** = ``0.0`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_z/equilibrium_point>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1972,12 +2004,12 @@ The speed that the linear motor will attempt to reach on the Z axis. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_spring_z/stiffness** = ``0.01`` +:ref:`float<class_float>` **linear_spring_z/stiffness** = ``0.01`` :ref:`🔗<class_Generic6DOFJoint3D_property_linear_spring_z/stiffness>` .. rst-class:: classref-property-setget -- void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +- |void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| .. container:: contribute @@ -1996,7 +2028,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +:ref:`bool<class_bool>` **get_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_flag_x>` .. container:: contribute @@ -2010,7 +2042,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +:ref:`bool<class_bool>` **get_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_flag_y>` .. container:: contribute @@ -2024,7 +2056,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag **)** |const| +:ref:`bool<class_bool>` **get_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_flag_z>` .. container:: contribute @@ -2038,7 +2070,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_param_x>` .. container:: contribute @@ -2052,7 +2084,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_param_y>` .. container:: contribute @@ -2066,7 +2098,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`\ ) |const| :ref:`🔗<class_Generic6DOFJoint3D_method_get_param_z>` .. container:: contribute @@ -2080,7 +2112,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** +|void| **set_flag_x**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_flag_x>` .. container:: contribute @@ -2094,7 +2126,7 @@ void **set_flag_x** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:` .. rst-class:: classref-method -void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** +|void| **set_flag_y**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_flag_y>` .. container:: contribute @@ -2108,7 +2140,7 @@ void **set_flag_y** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:` .. rst-class:: classref-method -void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:`bool<class_bool>` value **)** +|void| **set_flag_z**\ (\ flag\: :ref:`Flag<enum_Generic6DOFJoint3D_Flag>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_flag_z>` .. container:: contribute @@ -2122,7 +2154,7 @@ void **set_flag_z** **(** :ref:`Flag<enum_Generic6DOFJoint3D_Flag>` flag, :ref:` .. rst-class:: classref-method -void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param_x**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_param_x>` .. container:: contribute @@ -2136,7 +2168,7 @@ void **set_param_x** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :r .. rst-class:: classref-method -void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param_y**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_param_y>` .. container:: contribute @@ -2150,7 +2182,7 @@ void **set_param_y** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :r .. rst-class:: classref-method -void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param_z**\ (\ param\: :ref:`Param<enum_Generic6DOFJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Generic6DOFJoint3D_method_set_param_z>` .. container:: contribute @@ -2163,3 +2195,4 @@ void **set_param_z** **(** :ref:`Param<enum_Generic6DOFJoint3D_Param>` param, :r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_geometry2d.rst b/classes/class_geometry2d.rst index c7c2604d68c..dc692e09d7a 100644 --- a/classes/class_geometry2d.rst +++ b/classes/class_geometry2d.rst @@ -29,53 +29,53 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`clip_polygons<class_Geometry2D_method_clip_polygons>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`clip_polyline_with_polygon<class_Geometry2D_method_clip_polyline_with_polygon>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`convex_hull<class_Geometry2D_method_convex_hull>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`decompose_polygon_in_convex<class_Geometry2D_method_decompose_polygon_in_convex>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`exclude_polygons<class_Geometry2D_method_exclude_polygons>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point_to_segment<class_Geometry2D_method_get_closest_point_to_segment>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` s1, :ref:`Vector2<class_Vector2>` s2 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point_to_segment_uncapped<class_Geometry2D_method_get_closest_point_to_segment_uncapped>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` s1, :ref:`Vector2<class_Vector2>` s2 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_closest_points_between_segments<class_Geometry2D_method_get_closest_points_between_segments>` **(** :ref:`Vector2<class_Vector2>` p1, :ref:`Vector2<class_Vector2>` q1, :ref:`Vector2<class_Vector2>` p2, :ref:`Vector2<class_Vector2>` q2 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`intersect_polygons<class_Geometry2D_method_intersect_polygons>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`intersect_polyline_with_polygon<class_Geometry2D_method_intersect_polyline_with_polygon>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_point_in_circle<class_Geometry2D_method_is_point_in_circle>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` circle_position, :ref:`float<class_float>` circle_radius **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_point_in_polygon<class_Geometry2D_method_is_point_in_polygon>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_polygon_clockwise<class_Geometry2D_method_is_polygon_clockwise>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`line_intersects_line<class_Geometry2D_method_line_intersects_line>` **(** :ref:`Vector2<class_Vector2>` from_a, :ref:`Vector2<class_Vector2>` dir_a, :ref:`Vector2<class_Vector2>` from_b, :ref:`Vector2<class_Vector2>` dir_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`make_atlas<class_Geometry2D_method_make_atlas>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` sizes **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`merge_polygons<class_Geometry2D_method_merge_polygons>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`offset_polygon<class_Geometry2D_method_offset_polygon>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon, :ref:`float<class_float>` delta, :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` join_type=0 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array[]<class_PackedVector2Array>` | :ref:`offset_polyline<class_Geometry2D_method_offset_polyline>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`float<class_float>` delta, :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` join_type=0, :ref:`PolyEndType<enum_Geometry2D_PolyEndType>` end_type=3 **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`point_is_inside_triangle<class_Geometry2D_method_point_is_inside_triangle>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` a, :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` c **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`segment_intersects_circle<class_Geometry2D_method_segment_intersects_circle>` **(** :ref:`Vector2<class_Vector2>` segment_from, :ref:`Vector2<class_Vector2>` segment_to, :ref:`Vector2<class_Vector2>` circle_position, :ref:`float<class_float>` circle_radius **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`segment_intersects_segment<class_Geometry2D_method_segment_intersects_segment>` **(** :ref:`Vector2<class_Vector2>` from_a, :ref:`Vector2<class_Vector2>` to_a, :ref:`Vector2<class_Vector2>` from_b, :ref:`Vector2<class_Vector2>` to_b **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`triangulate_delaunay<class_Geometry2D_method_triangulate_delaunay>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`triangulate_polygon<class_Geometry2D_method_triangulate_polygon>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`clip_polygons<class_Geometry2D_method_clip_polygons>`\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`clip_polyline_with_polygon<class_Geometry2D_method_clip_polyline_with_polygon>`\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`convex_hull<class_Geometry2D_method_convex_hull>`\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`decompose_polygon_in_convex<class_Geometry2D_method_decompose_polygon_in_convex>`\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`exclude_polygons<class_Geometry2D_method_exclude_polygons>`\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point_to_segment<class_Geometry2D_method_get_closest_point_to_segment>`\ (\ point\: :ref:`Vector2<class_Vector2>`, s1\: :ref:`Vector2<class_Vector2>`, s2\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point_to_segment_uncapped<class_Geometry2D_method_get_closest_point_to_segment_uncapped>`\ (\ point\: :ref:`Vector2<class_Vector2>`, s1\: :ref:`Vector2<class_Vector2>`, s2\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_closest_points_between_segments<class_Geometry2D_method_get_closest_points_between_segments>`\ (\ p1\: :ref:`Vector2<class_Vector2>`, q1\: :ref:`Vector2<class_Vector2>`, p2\: :ref:`Vector2<class_Vector2>`, q2\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`intersect_polygons<class_Geometry2D_method_intersect_polygons>`\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`intersect_polyline_with_polygon<class_Geometry2D_method_intersect_polyline_with_polygon>`\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_point_in_circle<class_Geometry2D_method_is_point_in_circle>`\ (\ point\: :ref:`Vector2<class_Vector2>`, circle_position\: :ref:`Vector2<class_Vector2>`, circle_radius\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_point_in_polygon<class_Geometry2D_method_is_point_in_polygon>`\ (\ point\: :ref:`Vector2<class_Vector2>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_polygon_clockwise<class_Geometry2D_method_is_polygon_clockwise>`\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`line_intersects_line<class_Geometry2D_method_line_intersects_line>`\ (\ from_a\: :ref:`Vector2<class_Vector2>`, dir_a\: :ref:`Vector2<class_Vector2>`, from_b\: :ref:`Vector2<class_Vector2>`, dir_b\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`make_atlas<class_Geometry2D_method_make_atlas>`\ (\ sizes\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`merge_polygons<class_Geometry2D_method_merge_polygons>`\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`offset_polygon<class_Geometry2D_method_offset_polygon>`\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`, delta\: :ref:`float<class_float>`, join_type\: :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` = 0\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`offset_polyline<class_Geometry2D_method_offset_polyline>`\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, delta\: :ref:`float<class_float>`, join_type\: :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` = 0, end_type\: :ref:`PolyEndType<enum_Geometry2D_PolyEndType>` = 3\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`point_is_inside_triangle<class_Geometry2D_method_point_is_inside_triangle>`\ (\ point\: :ref:`Vector2<class_Vector2>`, a\: :ref:`Vector2<class_Vector2>`, b\: :ref:`Vector2<class_Vector2>`, c\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`segment_intersects_circle<class_Geometry2D_method_segment_intersects_circle>`\ (\ segment_from\: :ref:`Vector2<class_Vector2>`, segment_to\: :ref:`Vector2<class_Vector2>`, circle_position\: :ref:`Vector2<class_Vector2>`, circle_radius\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`segment_intersects_segment<class_Geometry2D_method_segment_intersects_segment>`\ (\ from_a\: :ref:`Vector2<class_Vector2>`, to_a\: :ref:`Vector2<class_Vector2>`, from_b\: :ref:`Vector2<class_Vector2>`, to_b\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`triangulate_delaunay<class_Geometry2D_method_triangulate_delaunay>`\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`triangulate_polygon<class_Geometry2D_method_triangulate_polygon>`\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,7 +90,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PolyBooleanOperation**: +enum **PolyBooleanOperation**: :ref:`🔗<enum_Geometry2D_PolyBooleanOperation>` .. _class_Geometry2D_constant_OPERATION_UNION: @@ -132,7 +132,7 @@ Create regions where either subject or clip polygons are filled but not where bo .. rst-class:: classref-enumeration -enum **PolyJoinType**: +enum **PolyJoinType**: :ref:`🔗<enum_Geometry2D_PolyJoinType>` .. _class_Geometry2D_constant_JOIN_SQUARE: @@ -166,7 +166,7 @@ There's a necessary limit to mitered joins since offsetting edges that join at v .. rst-class:: classref-enumeration -enum **PolyEndType**: +enum **PolyEndType**: :ref:`🔗<enum_Geometry2D_PolyEndType>` .. _class_Geometry2D_constant_END_POLYGON: @@ -221,7 +221,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **clip_polygons** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **clip_polygons**\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_clip_polygons>` Clips ``polygon_a`` against ``polygon_b`` and returns an array of clipped polygons. This performs :ref:`OPERATION_DIFFERENCE<class_Geometry2D_constant_OPERATION_DIFFERENCE>` between polygons. Returns an empty array if ``polygon_b`` completely overlaps ``polygon_a``. @@ -235,7 +235,7 @@ If ``polygon_b`` is enclosed by ``polygon_a``, returns an outer polygon (boundar .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **clip_polyline_with_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **clip_polyline_with_polygon**\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_clip_polyline_with_polygon>` Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines. This performs :ref:`OPERATION_DIFFERENCE<class_Geometry2D_constant_OPERATION_DIFFERENCE>` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. @@ -247,7 +247,7 @@ Clips ``polyline`` against ``polygon`` and returns an array of clipped polylines .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **convex_hull** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **convex_hull**\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_convex_hull>` Given an array of :ref:`Vector2<class_Vector2>`\ s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. @@ -259,7 +259,7 @@ Given an array of :ref:`Vector2<class_Vector2>`\ s, returns the convex hull as a .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **decompose_polygon_in_convex** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **decompose_polygon_in_convex**\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_decompose_polygon_in_convex>` Decomposes the ``polygon`` into multiple convex hulls and returns an array of :ref:`PackedVector2Array<class_PackedVector2Array>`. @@ -271,7 +271,7 @@ Decomposes the ``polygon`` into multiple convex hulls and returns an array of :r .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **exclude_polygons** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **exclude_polygons**\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_exclude_polygons>` Mutually excludes common area defined by intersection of ``polygon_a`` and ``polygon_b`` (see :ref:`intersect_polygons<class_Geometry2D_method_intersect_polygons>`) and returns an array of excluded polygons. This performs :ref:`OPERATION_XOR<class_Geometry2D_constant_OPERATION_XOR>` between polygons. In other words, returns all but common area between polygons. @@ -285,7 +285,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_closest_point_to_segment** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` s1, :ref:`Vector2<class_Vector2>` s2 **)** +:ref:`Vector2<class_Vector2>` **get_closest_point_to_segment**\ (\ point\: :ref:`Vector2<class_Vector2>`, s1\: :ref:`Vector2<class_Vector2>`, s2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Geometry2D_method_get_closest_point_to_segment>` Returns the 2D point on the 2D segment (``s1``, ``s2``) that is closest to ``point``. The returned point will always be inside the specified segment. @@ -297,7 +297,7 @@ Returns the 2D point on the 2D segment (``s1``, ``s2``) that is closest to ``poi .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` s1, :ref:`Vector2<class_Vector2>` s2 **)** +:ref:`Vector2<class_Vector2>` **get_closest_point_to_segment_uncapped**\ (\ point\: :ref:`Vector2<class_Vector2>`, s1\: :ref:`Vector2<class_Vector2>`, s2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Geometry2D_method_get_closest_point_to_segment_uncapped>` Returns the 2D point on the 2D line defined by (``s1``, ``s2``) that is closest to ``point``. The returned point can be inside the segment (``s1``, ``s2``) or outside of it, i.e. somewhere on the line extending from the segment. @@ -309,7 +309,7 @@ Returns the 2D point on the 2D line defined by (``s1``, ``s2``) that is closest .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_closest_points_between_segments** **(** :ref:`Vector2<class_Vector2>` p1, :ref:`Vector2<class_Vector2>` q1, :ref:`Vector2<class_Vector2>` p2, :ref:`Vector2<class_Vector2>` q2 **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_closest_points_between_segments**\ (\ p1\: :ref:`Vector2<class_Vector2>`, q1\: :ref:`Vector2<class_Vector2>`, p2\: :ref:`Vector2<class_Vector2>`, q2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Geometry2D_method_get_closest_points_between_segments>` Given the two 2D segments (``p1``, ``q1``) and (``p2``, ``q2``), finds those two points on the two segments that are closest to each other. Returns a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains this point on (``p1``, ``q1``) as well the accompanying point on (``p2``, ``q2``). @@ -321,7 +321,7 @@ Given the two 2D segments (``p1``, ``q1``) and (``p2``, ``q2``), finds those two .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **intersect_polygons** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **intersect_polygons**\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_intersect_polygons>` Intersects ``polygon_a`` with ``polygon_b`` and returns an array of intersected polygons. This performs :ref:`OPERATION_INTERSECTION<class_Geometry2D_constant_OPERATION_INTERSECTION>` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. @@ -335,7 +335,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **intersect_polyline_with_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **intersect_polyline_with_polygon**\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_intersect_polyline_with_polygon>` Intersects ``polyline`` with ``polygon`` and returns an array of intersected polylines. This performs :ref:`OPERATION_INTERSECTION<class_Geometry2D_constant_OPERATION_INTERSECTION>` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. @@ -347,7 +347,7 @@ Intersects ``polyline`` with ``polygon`` and returns an array of intersected pol .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_point_in_circle** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` circle_position, :ref:`float<class_float>` circle_radius **)** +:ref:`bool<class_bool>` **is_point_in_circle**\ (\ point\: :ref:`Vector2<class_Vector2>`, circle_position\: :ref:`Vector2<class_Vector2>`, circle_radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Geometry2D_method_is_point_in_circle>` Returns ``true`` if ``point`` is inside the circle or if it's located exactly *on* the circle's boundary, otherwise returns ``false``. @@ -359,7 +359,7 @@ Returns ``true`` if ``point`` is inside the circle or if it's located exactly *o .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_point_in_polygon** **(** :ref:`Vector2<class_Vector2>` point, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`bool<class_bool>` **is_point_in_polygon**\ (\ point\: :ref:`Vector2<class_Vector2>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_is_point_in_polygon>` Returns ``true`` if ``point`` is inside ``polygon`` or if it's located exactly *on* polygon's boundary, otherwise returns ``false``. @@ -371,10 +371,12 @@ Returns ``true`` if ``point`` is inside ``polygon`` or if it's located exactly * .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_polygon_clockwise** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`bool<class_bool>` **is_polygon_clockwise**\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_is_polygon_clockwise>` Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, otherwise returns ``false``. +\ **Note:** Assumes a Cartesian coordinate system where ``+x`` is right and ``+y`` is up. If using screen coordinates (``+y`` is down), the result will need to be flipped (i.e. a ``true`` result will indicate counter-clockwise). + .. rst-class:: classref-item-separator ---- @@ -383,7 +385,7 @@ Returns ``true`` if ``polygon``'s vertices are ordered in clockwise order, other .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **line_intersects_line** **(** :ref:`Vector2<class_Vector2>` from_a, :ref:`Vector2<class_Vector2>` dir_a, :ref:`Vector2<class_Vector2>` from_b, :ref:`Vector2<class_Vector2>` dir_b **)** +:ref:`Variant<class_Variant>` **line_intersects_line**\ (\ from_a\: :ref:`Vector2<class_Vector2>`, dir_a\: :ref:`Vector2<class_Vector2>`, from_b\: :ref:`Vector2<class_Vector2>`, dir_b\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Geometry2D_method_line_intersects_line>` Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) intersect. If yes, return the point of intersection as :ref:`Vector2<class_Vector2>`. If no intersection takes place, returns ``null``. @@ -397,7 +399,7 @@ Checks if the two lines (``from_a``, ``dir_a``) and (``from_b``, ``dir_b``) inte .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **make_atlas** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` sizes **)** +:ref:`Dictionary<class_Dictionary>` **make_atlas**\ (\ sizes\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_make_atlas>` Given an array of :ref:`Vector2<class_Vector2>`\ s representing tiles, builds an atlas. The returned dictionary has two keys: ``points`` is a :ref:`PackedVector2Array<class_PackedVector2Array>` that specifies the positions of each tile, ``size`` contains the overall size of the whole atlas as :ref:`Vector2i<class_Vector2i>`. @@ -409,7 +411,7 @@ Given an array of :ref:`Vector2<class_Vector2>`\ s representing tiles, builds an .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **merge_polygons** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_a, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon_b **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **merge_polygons**\ (\ polygon_a\: :ref:`PackedVector2Array<class_PackedVector2Array>`, polygon_b\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_merge_polygons>` Merges (combines) ``polygon_a`` and ``polygon_b`` and returns an array of merged polygons. This performs :ref:`OPERATION_UNION<class_Geometry2D_constant_OPERATION_UNION>` between polygons. @@ -423,7 +425,7 @@ The operation may result in an outer polygon (boundary) and multiple inner polyg .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **offset_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon, :ref:`float<class_float>` delta, :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` join_type=0 **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **offset_polygon**\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`, delta\: :ref:`float<class_float>`, join_type\: :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` = 0\ ) :ref:`🔗<class_Geometry2D_method_offset_polygon>` Inflates or deflates ``polygon`` by ``delta`` units (pixels). If ``delta`` is positive, makes the polygon grow outward. If ``delta`` is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if ``delta`` is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. @@ -460,7 +462,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. rst-class:: classref-method -:ref:`PackedVector2Array[]<class_PackedVector2Array>` **offset_polyline** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polyline, :ref:`float<class_float>` delta, :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` join_type=0, :ref:`PolyEndType<enum_Geometry2D_PolyEndType>` end_type=3 **)** +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **offset_polyline**\ (\ polyline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, delta\: :ref:`float<class_float>`, join_type\: :ref:`PolyJoinType<enum_Geometry2D_PolyJoinType>` = 0, end_type\: :ref:`PolyEndType<enum_Geometry2D_PolyEndType>` = 3\ ) :ref:`🔗<class_Geometry2D_method_offset_polyline>` Inflates or deflates ``polyline`` by ``delta`` units (pixels), producing polygons. If ``delta`` is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If ``delta`` is negative, returns an empty array. @@ -478,7 +480,7 @@ The operation may result in an outer polygon (boundary) and inner polygon (hole) .. rst-class:: classref-method -:ref:`bool<class_bool>` **point_is_inside_triangle** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Vector2<class_Vector2>` a, :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` c **)** |const| +:ref:`bool<class_bool>` **point_is_inside_triangle**\ (\ point\: :ref:`Vector2<class_Vector2>`, a\: :ref:`Vector2<class_Vector2>`, b\: :ref:`Vector2<class_Vector2>`, c\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Geometry2D_method_point_is_inside_triangle>` Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. @@ -490,7 +492,7 @@ Returns if ``point`` is inside the triangle specified by ``a``, ``b`` and ``c``. .. rst-class:: classref-method -:ref:`float<class_float>` **segment_intersects_circle** **(** :ref:`Vector2<class_Vector2>` segment_from, :ref:`Vector2<class_Vector2>` segment_to, :ref:`Vector2<class_Vector2>` circle_position, :ref:`float<class_float>` circle_radius **)** +:ref:`float<class_float>` **segment_intersects_circle**\ (\ segment_from\: :ref:`Vector2<class_Vector2>`, segment_to\: :ref:`Vector2<class_Vector2>`, circle_position\: :ref:`Vector2<class_Vector2>`, circle_radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Geometry2D_method_segment_intersects_circle>` Given the 2D segment (``segment_from``, ``segment_to``), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position ``circle_position`` and has radius ``circle_radius``. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). @@ -502,7 +504,7 @@ Given the 2D segment (``segment_from``, ``segment_to``), returns the position on .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **segment_intersects_segment** **(** :ref:`Vector2<class_Vector2>` from_a, :ref:`Vector2<class_Vector2>` to_a, :ref:`Vector2<class_Vector2>` from_b, :ref:`Vector2<class_Vector2>` to_b **)** +:ref:`Variant<class_Variant>` **segment_intersects_segment**\ (\ from_a\: :ref:`Vector2<class_Vector2>`, to_a\: :ref:`Vector2<class_Vector2>`, from_b\: :ref:`Vector2<class_Vector2>`, to_b\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Geometry2D_method_segment_intersects_segment>` Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) intersect. If yes, return the point of intersection as :ref:`Vector2<class_Vector2>`. If no intersection takes place, returns ``null``. @@ -514,7 +516,7 @@ Checks if the two segments (``from_a``, ``to_a``) and (``from_b``, ``to_b``) int .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **triangulate_delaunay** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **triangulate_delaunay**\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_triangulate_delaunay>` Triangulates the area specified by discrete set of ``points`` such that no point is inside the circumcircle of any resulting triangle. Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` where each triangle consists of three consecutive point indices into ``points`` (i.e. the returned array will have ``n * 3`` elements, with ``n`` being the number of found triangles). If the triangulation did not succeed, an empty :ref:`PackedInt32Array<class_PackedInt32Array>` is returned. @@ -526,7 +528,7 @@ Triangulates the area specified by discrete set of ``points`` such that no point .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **triangulate_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **triangulate_polygon**\ (\ polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Geometry2D_method_triangulate_polygon>` Triangulates the polygon specified by the points in ``polygon``. Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` where each triangle consists of three consecutive point indices into ``polygon`` (i.e. the returned array will have ``n * 3`` elements, with ``n`` being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty :ref:`PackedInt32Array<class_PackedInt32Array>` is returned. @@ -537,3 +539,4 @@ Triangulates the polygon specified by the points in ``polygon``. Returns a :ref: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_geometry3d.rst b/classes/class_geometry3d.rst index 749414a9819..193910e88d7 100644 --- a/classes/class_geometry3d.rst +++ b/classes/class_geometry3d.rst @@ -29,31 +29,37 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane[]<class_Plane>` | :ref:`build_box_planes<class_Geometry3D_method_build_box_planes>` **(** :ref:`Vector3<class_Vector3>` extents **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane[]<class_Plane>` | :ref:`build_capsule_planes<class_Geometry3D_method_build_capsule_planes>` **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` lats, Vector3.Axis axis=2 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane[]<class_Plane>` | :ref:`build_cylinder_planes<class_Geometry3D_method_build_cylinder_planes>` **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, Vector3.Axis axis=2 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`clip_polygon<class_Geometry3D_method_clip_polygon>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` points, :ref:`Plane<class_Plane>` plane **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_closest_point_to_segment<class_Geometry3D_method_get_closest_point_to_segment>` **(** :ref:`Vector3<class_Vector3>` point, :ref:`Vector3<class_Vector3>` s1, :ref:`Vector3<class_Vector3>` s2 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_closest_point_to_segment_uncapped<class_Geometry3D_method_get_closest_point_to_segment_uncapped>` **(** :ref:`Vector3<class_Vector3>` point, :ref:`Vector3<class_Vector3>` s1, :ref:`Vector3<class_Vector3>` s2 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_closest_points_between_segments<class_Geometry3D_method_get_closest_points_between_segments>` **(** :ref:`Vector3<class_Vector3>` p1, :ref:`Vector3<class_Vector3>` p2, :ref:`Vector3<class_Vector3>` q1, :ref:`Vector3<class_Vector3>` q2 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`ray_intersects_triangle<class_Geometry3D_method_ray_intersects_triangle>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir, :ref:`Vector3<class_Vector3>` a, :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` c **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_convex<class_Geometry3D_method_segment_intersects_convex>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Plane[]<class_Plane>` planes **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_cylinder<class_Geometry3D_method_segment_intersects_cylinder>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` height, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_sphere<class_Geometry3D_method_segment_intersects_sphere>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` sphere_position, :ref:`float<class_float>` sphere_radius **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`segment_intersects_triangle<class_Geometry3D_method_segment_intersects_triangle>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` a, :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` c **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] | :ref:`build_box_planes<class_Geometry3D_method_build_box_planes>`\ (\ extents\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] | :ref:`build_capsule_planes<class_Geometry3D_method_build_capsule_planes>`\ (\ radius\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, sides\: :ref:`int<class_int>`, lats\: :ref:`int<class_int>`, axis\: Vector3.Axis = 2\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] | :ref:`build_cylinder_planes<class_Geometry3D_method_build_cylinder_planes>`\ (\ radius\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, sides\: :ref:`int<class_int>`, axis\: Vector3.Axis = 2\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`clip_polygon<class_Geometry3D_method_clip_polygon>`\ (\ points\: :ref:`PackedVector3Array<class_PackedVector3Array>`, plane\: :ref:`Plane<class_Plane>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`compute_convex_mesh_points<class_Geometry3D_method_compute_convex_mesh_points>`\ (\ planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_closest_point_to_segment<class_Geometry3D_method_get_closest_point_to_segment>`\ (\ point\: :ref:`Vector3<class_Vector3>`, s1\: :ref:`Vector3<class_Vector3>`, s2\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_closest_point_to_segment_uncapped<class_Geometry3D_method_get_closest_point_to_segment_uncapped>`\ (\ point\: :ref:`Vector3<class_Vector3>`, s1\: :ref:`Vector3<class_Vector3>`, s2\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_closest_points_between_segments<class_Geometry3D_method_get_closest_points_between_segments>`\ (\ p1\: :ref:`Vector3<class_Vector3>`, p2\: :ref:`Vector3<class_Vector3>`, q1\: :ref:`Vector3<class_Vector3>`, q2\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_triangle_barycentric_coords<class_Geometry3D_method_get_triangle_barycentric_coords>`\ (\ point\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`ray_intersects_triangle<class_Geometry3D_method_ray_intersects_triangle>`\ (\ from\: :ref:`Vector3<class_Vector3>`, dir\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_convex<class_Geometry3D_method_segment_intersects_convex>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_cylinder<class_Geometry3D_method_segment_intersects_cylinder>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, height\: :ref:`float<class_float>`, radius\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`segment_intersects_sphere<class_Geometry3D_method_segment_intersects_sphere>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, sphere_position\: :ref:`Vector3<class_Vector3>`, sphere_radius\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`segment_intersects_triangle<class_Geometry3D_method_segment_intersects_triangle>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`tetrahedralize_delaunay<class_Geometry3D_method_tetrahedralize_delaunay>`\ (\ points\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +--------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +74,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Plane[]<class_Plane>` **build_box_planes** **(** :ref:`Vector3<class_Vector3>` extents **)** +:ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] **build_box_planes**\ (\ extents\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_build_box_planes>` Returns an array with 6 :ref:`Plane<class_Plane>`\ s that describe the sides of a box centered at the origin. The box size is defined by ``extents``, which represents one (positive) corner of the box (i.e. half its actual size). @@ -80,7 +86,7 @@ Returns an array with 6 :ref:`Plane<class_Plane>`\ s that describe the sides of .. rst-class:: classref-method -:ref:`Plane[]<class_Plane>` **build_capsule_planes** **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, :ref:`int<class_int>` lats, Vector3.Axis axis=2 **)** +:ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] **build_capsule_planes**\ (\ radius\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, sides\: :ref:`int<class_int>`, lats\: :ref:`int<class_int>`, axis\: Vector3.Axis = 2\ ) :ref:`🔗<class_Geometry3D_method_build_capsule_planes>` Returns an array of :ref:`Plane<class_Plane>`\ s closely bounding a faceted capsule centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the side part of the capsule, whereas ``lats`` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter ``axis`` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). @@ -92,7 +98,7 @@ Returns an array of :ref:`Plane<class_Plane>`\ s closely bounding a faceted caps .. rst-class:: classref-method -:ref:`Plane[]<class_Plane>` **build_cylinder_planes** **(** :ref:`float<class_float>` radius, :ref:`float<class_float>` height, :ref:`int<class_int>` sides, Vector3.Axis axis=2 **)** +:ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] **build_cylinder_planes**\ (\ radius\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, sides\: :ref:`int<class_int>`, axis\: Vector3.Axis = 2\ ) :ref:`🔗<class_Geometry3D_method_build_cylinder_planes>` Returns an array of :ref:`Plane<class_Plane>`\ s closely bounding a faceted cylinder centered at the origin with radius ``radius`` and height ``height``. The parameter ``sides`` defines how many planes will be generated for the round part of the cylinder. The parameter ``axis`` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). @@ -104,7 +110,7 @@ Returns an array of :ref:`Plane<class_Plane>`\ s closely bounding a faceted cyli .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **clip_polygon** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` points, :ref:`Plane<class_Plane>` plane **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **clip_polygon**\ (\ points\: :ref:`PackedVector3Array<class_PackedVector3Array>`, plane\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_Geometry3D_method_clip_polygon>` Clips the polygon defined by the points in ``points`` against the ``plane`` and returns the points of the clipped polygon. @@ -112,11 +118,23 @@ Clips the polygon defined by the points in ``points`` against the ``plane`` and ---- +.. _class_Geometry3D_method_compute_convex_mesh_points: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array<class_PackedVector3Array>` **compute_convex_mesh_points**\ (\ planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) :ref:`🔗<class_Geometry3D_method_compute_convex_mesh_points>` + +Calculates and returns all the vertex points of a convex shape defined by an array of ``planes``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Geometry3D_method_get_closest_point_to_segment: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_closest_point_to_segment** **(** :ref:`Vector3<class_Vector3>` point, :ref:`Vector3<class_Vector3>` s1, :ref:`Vector3<class_Vector3>` s2 **)** +:ref:`Vector3<class_Vector3>` **get_closest_point_to_segment**\ (\ point\: :ref:`Vector3<class_Vector3>`, s1\: :ref:`Vector3<class_Vector3>`, s2\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_get_closest_point_to_segment>` Returns the 3D point on the 3D segment (``s1``, ``s2``) that is closest to ``point``. The returned point will always be inside the specified segment. @@ -128,7 +146,7 @@ Returns the 3D point on the 3D segment (``s1``, ``s2``) that is closest to ``poi .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_closest_point_to_segment_uncapped** **(** :ref:`Vector3<class_Vector3>` point, :ref:`Vector3<class_Vector3>` s1, :ref:`Vector3<class_Vector3>` s2 **)** +:ref:`Vector3<class_Vector3>` **get_closest_point_to_segment_uncapped**\ (\ point\: :ref:`Vector3<class_Vector3>`, s1\: :ref:`Vector3<class_Vector3>`, s2\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_get_closest_point_to_segment_uncapped>` Returns the 3D point on the 3D line defined by (``s1``, ``s2``) that is closest to ``point``. The returned point can be inside the segment (``s1``, ``s2``) or outside of it, i.e. somewhere on the line extending from the segment. @@ -140,7 +158,7 @@ Returns the 3D point on the 3D line defined by (``s1``, ``s2``) that is closest .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **get_closest_points_between_segments** **(** :ref:`Vector3<class_Vector3>` p1, :ref:`Vector3<class_Vector3>` p2, :ref:`Vector3<class_Vector3>` q1, :ref:`Vector3<class_Vector3>` q2 **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **get_closest_points_between_segments**\ (\ p1\: :ref:`Vector3<class_Vector3>`, p2\: :ref:`Vector3<class_Vector3>`, q1\: :ref:`Vector3<class_Vector3>`, q2\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_get_closest_points_between_segments>` Given the two 3D segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two points on the two segments that are closest to each other. Returns a :ref:`PackedVector3Array<class_PackedVector3Array>` that contains this point on (``p1``, ``p2``) as well the accompanying point on (``q1``, ``q2``). @@ -148,11 +166,25 @@ Given the two 3D segments (``p1``, ``p2``) and (``q1``, ``q2``), finds those two ---- +.. _class_Geometry3D_method_get_triangle_barycentric_coords: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_triangle_barycentric_coords**\ (\ point\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_get_triangle_barycentric_coords>` + +Returns a :ref:`Vector3<class_Vector3>` containing weights based on how close a 3D position (``point``) is to a triangle's different vertices (``a``, ``b`` and ``c``). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. + +\ `Here is a more detailed explanation of barycentric coordinates. <https://en.wikipedia.org/wiki/Barycentric_coordinate_system>`__ + +.. rst-class:: classref-item-separator + +---- + .. _class_Geometry3D_method_ray_intersects_triangle: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **ray_intersects_triangle** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir, :ref:`Vector3<class_Vector3>` a, :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` c **)** +:ref:`Variant<class_Variant>` **ray_intersects_triangle**\ (\ from\: :ref:`Vector3<class_Vector3>`, dir\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_ray_intersects_triangle>` Tests if the 3D ray starting at ``from`` with the direction of ``dir`` intersects the triangle specified by ``a``, ``b`` and ``c``. If yes, returns the point of intersection as :ref:`Vector3<class_Vector3>`. If no intersection takes place, returns ``null``. @@ -164,7 +196,7 @@ Tests if the 3D ray starting at ``from`` with the direction of ``dir`` intersect .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_convex** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Plane[]<class_Plane>` planes **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_convex**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, planes\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\]\ ) :ref:`🔗<class_Geometry3D_method_segment_intersects_convex>` Given a convex hull defined though the :ref:`Plane<class_Plane>`\ s in the array ``planes``, tests if the segment (``from``, ``to``) intersects with that hull. If an intersection is found, returns a :ref:`PackedVector3Array<class_PackedVector3Array>` containing the point the intersection and the hull's normal. Otherwise, returns an empty array. @@ -176,7 +208,7 @@ Given a convex hull defined though the :ref:`Plane<class_Plane>`\ s in the array .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_cylinder** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` height, :ref:`float<class_float>` radius **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_cylinder**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, height\: :ref:`float<class_float>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Geometry3D_method_segment_intersects_cylinder>` Checks if the segment (``from``, ``to``) intersects the cylinder with height ``height`` that is centered at the origin and has radius ``radius``. If no, returns an empty :ref:`PackedVector3Array<class_PackedVector3Array>`. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. @@ -188,7 +220,7 @@ Checks if the segment (``from``, ``to``) intersects the cylinder with height ``h .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_sphere** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` sphere_position, :ref:`float<class_float>` sphere_radius **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **segment_intersects_sphere**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, sphere_position\: :ref:`Vector3<class_Vector3>`, sphere_radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Geometry3D_method_segment_intersects_sphere>` Checks if the segment (``from``, ``to``) intersects the sphere that is located at ``sphere_position`` and has radius ``sphere_radius``. If no, returns an empty :ref:`PackedVector3Array<class_PackedVector3Array>`. If yes, returns a :ref:`PackedVector3Array<class_PackedVector3Array>` containing the point of intersection and the sphere's normal at the point of intersection. @@ -200,10 +232,22 @@ Checks if the segment (``from``, ``to``) intersects the sphere that is located a .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **segment_intersects_triangle** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` a, :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` c **)** +:ref:`Variant<class_Variant>` **segment_intersects_triangle**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, a\: :ref:`Vector3<class_Vector3>`, b\: :ref:`Vector3<class_Vector3>`, c\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Geometry3D_method_segment_intersects_triangle>` Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, ``c``. If yes, returns the point of intersection as :ref:`Vector3<class_Vector3>`. If no intersection takes place, returns ``null``. +.. rst-class:: classref-item-separator + +---- + +.. _class_Geometry3D_method_tetrahedralize_delaunay: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array<class_PackedInt32Array>` **tetrahedralize_delaunay**\ (\ points\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_Geometry3D_method_tetrahedralize_delaunay>` + +Tetrahedralizes the volume specified by a discrete set of ``points`` in 3D space, ensuring that no point lies within the circumsphere of any resulting tetrahedron. The method returns a :ref:`PackedInt32Array<class_PackedInt32Array>` where each tetrahedron consists of four consecutive point indices into the ``points`` array (resulting in an array with ``n * 4`` elements, where ``n`` is the number of tetrahedra found). If the tetrahedralization is unsuccessful, an empty :ref:`PackedInt32Array<class_PackedInt32Array>` is returned. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -211,3 +255,4 @@ Tests if the segment (``from``, ``to``) intersects the triangle ``a``, ``b``, `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_geometryinstance3d.rst b/classes/class_geometryinstance3d.rst index 089fdfeeb46..6d532662a6d 100644 --- a/classes/class_geometryinstance3d.rst +++ b/classes/class_geometryinstance3d.rst @@ -23,6 +23,13 @@ Description Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Visibility ranges (HLOD) <../tutorials/3d/visibility_ranges>` + .. rst-class:: classref-reftable-group Properties @@ -71,11 +78,11 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_instance_shader_parameter<class_GeometryInstance3D_method_set_instance_shader_parameter>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_shader_parameter<class_GeometryInstance3D_method_set_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,7 +97,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ShadowCastingSetting**: +enum **ShadowCastingSetting**: :ref:`🔗<enum_GeometryInstance3D_ShadowCastingSetting>` .. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_OFF: @@ -138,7 +145,7 @@ In other words, the actual mesh will not be visible, only the shadows casted fro .. rst-class:: classref-enumeration -enum **GIMode**: +enum **GIMode**: :ref:`🔗<enum_GeometryInstance3D_GIMode>` .. _class_GeometryInstance3D_constant_GI_MODE_DISABLED: @@ -146,7 +153,7 @@ enum **GIMode**: :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DISABLED** = ``0`` -Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using :ref:`VoxelGI<class_VoxelGI>` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. When using :ref:`LightmapGI<class_LightmapGI>`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. +Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using :ref:`VoxelGI<class_VoxelGI>` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. .. _class_GeometryInstance3D_constant_GI_MODE_STATIC: @@ -162,7 +169,7 @@ Baked global illumination mode. Use for static objects that contribute to global :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DYNAMIC** = ``2`` -Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using :ref:`VoxelGI<class_VoxelGI>`, but it has a higher performance impact than :ref:`GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED<class_GeometryInstance3D_constant_GI_MODE_DISABLED>`. +Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using :ref:`VoxelGI<class_VoxelGI>`, but it has a higher performance impact than :ref:`GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED<class_GeometryInstance3D_constant_GI_MODE_DISABLED>`. When using :ref:`LightmapGI<class_LightmapGI>`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. .. rst-class:: classref-item-separator @@ -172,7 +179,7 @@ Dynamic global illumination mode. Use for dynamic objects that contribute to glo .. rst-class:: classref-enumeration -enum **LightmapScale**: +enum **LightmapScale**: :ref:`🔗<enum_GeometryInstance3D_LightmapScale>` .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_1X: @@ -222,7 +229,7 @@ Represents the size of the :ref:`LightmapScale<enum_GeometryInstance3D_LightmapS .. rst-class:: classref-enumeration -enum **VisibilityRangeFadeMode**: +enum **VisibilityRangeFadeMode**: :ref:`🔗<enum_GeometryInstance3D_VisibilityRangeFadeMode>` .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED: @@ -240,6 +247,8 @@ Will not fade itself nor its visibility dependencies, hysteresis will be used in Will fade-out itself when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` and :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`. +\ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` but with hysteresis disabled. + .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES: .. rst-class:: classref-enumeration-constant @@ -248,6 +257,8 @@ Will fade-out itself when reaching the limits of its own visibility range. This Will fade-in its visibility dependencies (see :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>`) when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` and :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`. +\ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` but with hysteresis disabled. + .. rst-class:: classref-section-separator ---- @@ -261,12 +272,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **cast_shadow** = ``1`` +:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **cast_shadow** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_cast_shadow>` .. rst-class:: classref-property-setget -- void **set_cast_shadows_setting** **(** :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` value **)** -- :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **get_cast_shadows_setting** **(** **)** +- |void| **set_cast_shadows_setting**\ (\ value\: :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>`\ ) +- :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **get_cast_shadows_setting**\ (\ ) The selected shadow casting flag. See :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` for possible values. @@ -278,14 +289,14 @@ The selected shadow casting flag. See :ref:`ShadowCastingSetting<enum_GeometryIn .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` +:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_GeometryInstance3D_property_custom_aabb>` .. rst-class:: classref-property-setget -- void **set_custom_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_custom_aabb** **(** **)** +- |void| **set_custom_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_custom_aabb**\ (\ ) -Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive :ref:`AABB<class_AABB>` recalculation that happens when a skeleton is used with a :ref:`MeshInstance3D<class_MeshInstance3D>` or to have fine control over the :ref:`MeshInstance3D<class_MeshInstance3D>`'s bounding box. To use the default AABB, set value to an :ref:`AABB<class_AABB>` with all fields set to ``0.0``. To avoid frustum culling, set :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``. To disable all forms of culling (including occlusion culling), call :ref:`RenderingServer.instance_set_ignore_culling<class_RenderingServer_method_instance_set_ignore_culling>` on the **GeometryInstance3D**'s :ref:`RID<class_RID>`. +Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive :ref:`AABB<class_AABB>` recalculation that happens when a skeleton is used with a :ref:`MeshInstance3D<class_MeshInstance3D>` or to have precise control over the :ref:`MeshInstance3D<class_MeshInstance3D>`'s bounding box. To use the default AABB, set value to an :ref:`AABB<class_AABB>` with all fields set to ``0.0``. To avoid frustum culling, set :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``. To disable all forms of culling (including occlusion culling), call :ref:`RenderingServer.instance_set_ignore_culling<class_RenderingServer_method_instance_set_ignore_culling>` on the **GeometryInstance3D**'s :ref:`RID<class_RID>`. .. rst-class:: classref-item-separator @@ -295,12 +306,12 @@ Overrides the bounding box of this node with a custom one. This can be used to a .. rst-class:: classref-property -:ref:`float<class_float>` **extra_cull_margin** = ``0.0`` +:ref:`float<class_float>` **extra_cull_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_extra_cull_margin>` .. rst-class:: classref-property-setget -- void **set_extra_cull_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_extra_cull_margin** **(** **)** +- |void| **set_extra_cull_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_extra_cull_margin**\ (\ ) The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB<class_AABB>`) to increase its cull box. @@ -312,12 +323,12 @@ The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB<cl .. rst-class:: classref-property -:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **gi_lightmap_scale** = ``0`` +:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **gi_lightmap_scale** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_gi_lightmap_scale>` .. rst-class:: classref-property-setget -- void **set_lightmap_scale** **(** :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` value **)** -- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **get_lightmap_scale** **(** **)** +- |void| **set_lightmap_scale**\ (\ value\: :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>`\ ) +- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **get_lightmap_scale**\ (\ ) The texel density to use for lightmapping in :ref:`LightmapGI<class_LightmapGI>`. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes. @@ -329,12 +340,12 @@ The texel density to use for lightmapping in :ref:`LightmapGI<class_LightmapGI>` .. rst-class:: classref-property -:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **gi_mode** = ``1`` +:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **gi_mode** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_gi_mode>` .. rst-class:: classref-property-setget -- void **set_gi_mode** **(** :ref:`GIMode<enum_GeometryInstance3D_GIMode>` value **)** -- :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **get_gi_mode** **(** **)** +- |void| **set_gi_mode**\ (\ value\: :ref:`GIMode<enum_GeometryInstance3D_GIMode>`\ ) +- :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **get_gi_mode**\ (\ ) The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic). @@ -348,12 +359,12 @@ The global illumination mode to use for the whole geometry. To avoid inconsisten .. rst-class:: classref-property -:ref:`bool<class_bool>` **ignore_occlusion_culling** = ``false`` +:ref:`bool<class_bool>` **ignore_occlusion_culling** = ``false`` :ref:`🔗<class_GeometryInstance3D_property_ignore_occlusion_culling>` .. rst-class:: classref-property-setget -- void **set_ignore_occlusion_culling** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ignoring_occlusion_culling** **(** **)** +- |void| **set_ignore_occlusion_culling**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ignoring_occlusion_culling**\ (\ ) If ``true``, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use. @@ -367,12 +378,12 @@ If ``true``, disables occlusion culling for this instance. Useful for gizmos tha .. rst-class:: classref-property -:ref:`float<class_float>` **lod_bias** = ``1.0`` +:ref:`float<class_float>` **lod_bias** = ``1.0`` :ref:`🔗<class_GeometryInstance3D_property_lod_bias>` .. rst-class:: classref-property-setget -- void **set_lod_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_lod_bias** **(** **)** +- |void| **set_lod_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lod_bias**\ (\ ) Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances. @@ -386,12 +397,12 @@ Useful for testing level of detail transitions in the editor. .. rst-class:: classref-property -:ref:`Material<class_Material>` **material_overlay** +:ref:`Material<class_Material>` **material_overlay** :ref:`🔗<class_GeometryInstance3D_property_material_overlay>` .. rst-class:: classref-property-setget -- void **set_material_overlay** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material_overlay** **(** **)** +- |void| **set_material_overlay**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material_overlay**\ (\ ) The material overlay for the whole geometry. @@ -405,12 +416,12 @@ If a material is assigned to this property, it will be rendered on top of any ot .. rst-class:: classref-property -:ref:`Material<class_Material>` **material_override** +:ref:`Material<class_Material>` **material_override** :ref:`🔗<class_GeometryInstance3D_property_material_override>` .. rst-class:: classref-property-setget -- void **set_material_override** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material_override** **(** **)** +- |void| **set_material_override**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material_override**\ (\ ) The material override for the whole geometry. @@ -424,12 +435,12 @@ If a material is assigned to this property, it will be used instead of any mater .. rst-class:: classref-property -:ref:`float<class_float>` **transparency** = ``0.0`` +:ref:`float<class_float>` **transparency** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_transparency>` .. rst-class:: classref-property-setget -- void **set_transparency** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_transparency** **(** **)** +- |void| **set_transparency**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_transparency**\ (\ ) The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). ``0.0`` is fully opaque, while ``1.0`` is fully transparent. Values greater than ``0.0`` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting :ref:`transparency<class_GeometryInstance3D_property_transparency>` to a value greater than ``0.0`` (exclusive) will *not* disable shadow rendering. @@ -437,6 +448,8 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` \ **Note:** :ref:`transparency<class_GeometryInstance3D_property_transparency>` is clamped between ``0.0`` and ``1.0``, so this property cannot be used to make transparent materials more opaque than they originally are. +\ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, :ref:`transparency<class_GeometryInstance3D_property_transparency>` is ignored and is considered as always being ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -445,12 +458,12 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` .. rst-class:: classref-property -:ref:`float<class_float>` **visibility_range_begin** = ``0.0`` +:ref:`float<class_float>` **visibility_range_begin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin>` .. rst-class:: classref-property-setget -- void **set_visibility_range_begin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visibility_range_begin** **(** **)** +- |void| **set_visibility_range_begin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_begin**\ (\ ) Starting distance from which the GeometryInstance3D will be visible, taking :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` into account as well. The default value of 0 is used to disable the range check. @@ -462,12 +475,12 @@ Starting distance from which the GeometryInstance3D will be visible, taking :ref .. rst-class:: classref-property -:ref:`float<class_float>` **visibility_range_begin_margin** = ``0.0`` +:ref:`float<class_float>` **visibility_range_begin_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin_margin>` .. rst-class:: classref-property-setget -- void **set_visibility_range_begin_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visibility_range_begin_margin** **(** **)** +- |void| **set_visibility_range_begin_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_begin_margin**\ (\ ) Margin for the :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` threshold by this amount. @@ -481,12 +494,12 @@ If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility .. rst-class:: classref-property -:ref:`float<class_float>` **visibility_range_end** = ``0.0`` +:ref:`float<class_float>` **visibility_range_end** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end>` .. rst-class:: classref-property-setget -- void **set_visibility_range_end** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visibility_range_end** **(** **)** +- |void| **set_visibility_range_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_end**\ (\ ) Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>` into account as well. The default value of 0 is used to disable the range check. @@ -498,12 +511,12 @@ Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibili .. rst-class:: classref-property -:ref:`float<class_float>` **visibility_range_end_margin** = ``0.0`` +:ref:`float<class_float>` **visibility_range_end_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end_margin>` .. rst-class:: classref-property-setget -- void **set_visibility_range_end_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visibility_range_end_margin** **(** **)** +- |void| **set_visibility_range_end_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_end_margin**\ (\ ) Margin for the :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` threshold by this amount. @@ -517,12 +530,12 @@ If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility .. rst-class:: classref-property -:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **visibility_range_fade_mode** = ``0`` +:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **visibility_range_fade_mode** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_fade_mode>` .. rst-class:: classref-property-setget -- void **set_visibility_range_fade_mode** **(** :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` value **)** -- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **get_visibility_range_fade_mode** **(** **)** +- |void| **set_visibility_range_fade_mode**\ (\ value\: :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>`\ ) +- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **get_visibility_range_fade_mode**\ (\ ) Controls which instances will be faded when approaching the limits of the visibility range. See :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` for possible values. @@ -539,7 +552,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_instance_shader_parameter** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **get_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_GeometryInstance3D_method_get_instance_shader_parameter>` Get the value of a shader parameter as set on this instance. @@ -551,7 +564,7 @@ Get the value of a shader parameter as set on this instance. .. rst-class:: classref-method -void **set_instance_shader_parameter** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** +|void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GeometryInstance3D_method_set_instance_shader_parameter>` Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter<class_ShaderMaterial_method_set_shader_parameter>` to assign a uniform on all instances using the same :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -568,3 +581,4 @@ Set the value of a shader uniform for this instance only (`per-instance uniform .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfaccessor.rst b/classes/class_gltfaccessor.rst index 4bf79eebd9c..c938fd962ea 100644 --- a/classes/class_gltfaccessor.rst +++ b/classes/class_gltfaccessor.rst @@ -12,9 +12,25 @@ GLTFAccessor **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Represents a GLTF accessor. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +GLTFAccessor is a data structure representing GLTF a ``accessor`` that would be found in the ``"accessors"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer. An accessor is a typed interpretation of the data in a buffer view. + +Most custom data stored in GLTF does not need accessors, only buffer views (see :ref:`GLTFBufferView<class_GLTFBufferView>`). Accessors are for more advanced use cases such as interleaved mesh data encoded for the GPU. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Buffers, BufferViews, and Accessors in Khronos glTF specification <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group @@ -24,6 +40,8 @@ Properties .. table:: :widths: auto + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int<class_int>` | :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` | ``0`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ | :ref:`int<class_int>` | :ref:`buffer_view<class_GLTFAccessor_property_buffer_view>` | ``-1`` | +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+--------------------------+ @@ -63,20 +81,35 @@ Properties Property Descriptions --------------------- -.. _class_GLTFAccessor_property_buffer_view: +.. _class_GLTFAccessor_property_accessor_type: .. rst-class:: classref-property -:ref:`int<class_int>` **buffer_view** = ``-1`` +:ref:`int<class_int>` **accessor_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_accessor_type>` .. rst-class:: classref-property-setget -- void **set_buffer_view** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_buffer_view** **(** **)** +- |void| **set_accessor_type**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_accessor_type**\ (\ ) -.. container:: contribute +The GLTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4". + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFAccessor_property_buffer_view: + +.. rst-class:: classref-property - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +:ref:`int<class_int>` **buffer_view** = ``-1`` :ref:`🔗<class_GLTFAccessor_property_buffer_view>` + +.. rst-class:: classref-property-setget + +- |void| **set_buffer_view**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_buffer_view**\ (\ ) + +The index of the buffer view this accessor is referencing. If ``-1``, this accessor is not referencing any buffer view. .. rst-class:: classref-item-separator @@ -86,16 +119,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **byte_offset** = ``0`` +:ref:`int<class_int>` **byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_byte_offset>` .. rst-class:: classref-property-setget -- void **set_byte_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_byte_offset** **(** **)** +- |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_byte_offset**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The offset relative to the start of the buffer view in bytes. .. rst-class:: classref-item-separator @@ -105,16 +136,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **component_type** = ``0`` +:ref:`int<class_int>` **component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_component_type>` .. rst-class:: classref-property-setget -- void **set_component_type** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_component_type** **(** **)** - -.. container:: contribute +- |void| **set_component_type**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_component_type**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The GLTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. .. rst-class:: classref-item-separator @@ -124,16 +153,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **count** = ``0`` +:ref:`int<class_int>` **count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_count>` .. rst-class:: classref-property-setget -- void **set_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_count** **(** **)** +- |void| **set_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_count**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The number of elements referenced by this accessor. .. rst-class:: classref-item-separator @@ -143,16 +170,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **max** = ``PackedFloat64Array()`` +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **max** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_max>` .. rst-class:: classref-property-setget -- void **set_max** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` value **)** -- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_max** **(** **)** - -.. container:: contribute +- |void| **set_max**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) +- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_max**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Maximum value of each component in this accessor. .. rst-class:: classref-item-separator @@ -162,16 +187,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **min** = ``PackedFloat64Array()`` +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **min** = ``PackedFloat64Array()`` :ref:`🔗<class_GLTFAccessor_property_min>` .. rst-class:: classref-property-setget -- void **set_min** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` value **)** -- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_min** **(** **)** +- |void| **set_min**\ (\ value\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) +- :ref:`PackedFloat64Array<class_PackedFloat64Array>` **get_min**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Minimum value of each component in this accessor. .. rst-class:: classref-item-separator @@ -181,16 +204,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **normalized** = ``false`` +:ref:`bool<class_bool>` **normalized** = ``false`` :ref:`🔗<class_GLTFAccessor_property_normalized>` .. rst-class:: classref-property-setget -- void **set_normalized** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_normalized** **(** **)** - -.. container:: contribute +- |void| **set_normalized**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_normalized**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Specifies whether integer data values are normalized before usage. .. rst-class:: classref-item-separator @@ -200,16 +221,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_count** = ``0`` +:ref:`int<class_int>` **sparse_count** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_count>` .. rst-class:: classref-property-setget -- void **set_sparse_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_count** **(** **)** +- |void| **set_sparse_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_count**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Number of deviating accessor values stored in the sparse array. .. rst-class:: classref-item-separator @@ -219,16 +238,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_indices_buffer_view** = ``0`` +:ref:`int<class_int>` **sparse_indices_buffer_view** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_buffer_view>` .. rst-class:: classref-property-setget -- void **set_sparse_indices_buffer_view** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_indices_buffer_view** **(** **)** - -.. container:: contribute +- |void| **set_sparse_indices_buffer_view**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_indices_buffer_view**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The index of the buffer view with sparse indices. The referenced buffer view MUST NOT have its target or byteStride properties defined. The buffer view and the optional byteOffset MUST be aligned to the componentType byte length. .. rst-class:: classref-item-separator @@ -238,16 +255,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_indices_byte_offset** = ``0`` +:ref:`int<class_int>` **sparse_indices_byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_byte_offset>` .. rst-class:: classref-property-setget -- void **set_sparse_indices_byte_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_indices_byte_offset** **(** **)** +- |void| **set_sparse_indices_byte_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_indices_byte_offset**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The offset relative to the start of the buffer view in bytes. .. rst-class:: classref-item-separator @@ -257,16 +272,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_indices_component_type** = ``0`` +:ref:`int<class_int>` **sparse_indices_component_type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_indices_component_type>` .. rst-class:: classref-property-setget -- void **set_sparse_indices_component_type** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_indices_component_type** **(** **)** - -.. container:: contribute +- |void| **set_sparse_indices_component_type**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_indices_component_type**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT". .. rst-class:: classref-item-separator @@ -276,16 +289,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_values_buffer_view** = ``0`` +:ref:`int<class_int>` **sparse_values_buffer_view** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_buffer_view>` .. rst-class:: classref-property-setget -- void **set_sparse_values_buffer_view** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_values_buffer_view** **(** **)** +- |void| **set_sparse_values_buffer_view**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_values_buffer_view**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined. .. rst-class:: classref-item-separator @@ -295,16 +306,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sparse_values_byte_offset** = ``0`` +:ref:`int<class_int>` **sparse_values_byte_offset** = ``0`` :ref:`🔗<class_GLTFAccessor_property_sparse_values_byte_offset>` .. rst-class:: classref-property-setget -- void **set_sparse_values_byte_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sparse_values_byte_offset** **(** **)** - -.. container:: contribute +- |void| **set_sparse_values_byte_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sparse_values_byte_offset**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The offset relative to the start of the bufferView in bytes. .. rst-class:: classref-item-separator @@ -314,16 +323,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **type** = ``0`` +:ref:`int<class_int>` **type** = ``0`` :ref:`🔗<class_GLTFAccessor_property_type>` .. rst-class:: classref-property-setget -- void **set_type** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_type** **(** **)** +- |void| **set_type**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_type**\ (\ ) -.. container:: contribute +**Deprecated:** Use :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` instead. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The GLTF accessor type as an enum. Use :ref:`accessor_type<class_GLTFAccessor_property_accessor_type>` instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -332,3 +341,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfanimation.rst b/classes/class_gltfanimation.rst index cf88430f2a4..fd6195bdee6 100644 --- a/classes/class_gltfanimation.rst +++ b/classes/class_gltfanimation.rst @@ -16,6 +16,13 @@ GLTFAnimation There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -24,9 +31,25 @@ Properties .. table:: :widths: auto - +-------------------------+------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`loop<class_GLTFAnimation_property_loop>` | ``false`` | - +-------------------------+------------------------------------------------+-----------+ + +-----------------------------+------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`loop<class_GLTFAnimation_property_loop>` | ``false`` | + +-----------------------------+------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`original_name<class_GLTFAnimation_property_original_name>` | ``""`` | + +-----------------------------+------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFAnimation_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data<class_GLTFAnimation_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -41,17 +64,67 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``false`` +:ref:`bool<class_bool>` **loop** = ``false`` :ref:`🔗<class_GLTFAnimation_property_loop>` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_loop**\ (\ ) .. container:: contribute There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFAnimation_property_original_name: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **original_name** = ``""`` :ref:`🔗<class_GLTFAnimation_property_original_name>` + +.. rst-class:: classref-property-setget + +- |void| **set_original_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_name**\ (\ ) + +The original name of the animation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFAnimation_method_get_additional_data: + +.. rst-class:: classref-method + +:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFAnimation_method_get_additional_data>` + +Gets additional arbitrary data in this **GLTFAnimation** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. + +The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFAnimation_method_set_additional_data: + +.. rst-class:: classref-method + +|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFAnimation_method_set_additional_data>` + +Sets additional arbitrary data in this **GLTFAnimation** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. + +The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -59,3 +132,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfbufferview.rst b/classes/class_gltfbufferview.rst index 054fd1f9da0..dc1f3c1cb81 100644 --- a/classes/class_gltfbufferview.rst +++ b/classes/class_gltfbufferview.rst @@ -12,9 +12,25 @@ GLTFBufferView **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Represents a GLTF buffer view. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +GLTFBufferView is a data structure representing GLTF a ``bufferView`` that would be found in the ``"bufferViews"`` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer. + +Most custom uses of buffers only need to use the :ref:`buffer<class_GLTFBufferView_property_buffer>`, :ref:`byte_length<class_GLTFBufferView_property_byte_length>`, and :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>`. The :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` and :ref:`indices<class_GLTFBufferView_property_indices>` properties are for more advanced use cases such as interleaved mesh data encoded for the GPU. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Buffers, BufferViews, and Accessors in Khronos glTF specification <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group @@ -24,17 +40,31 @@ Properties .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`buffer<class_GLTFBufferView_property_buffer>` | ``-1`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`byte_length<class_GLTFBufferView_property_byte_length>` | ``0`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>` | ``0`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` | ``-1`` | - +-------------------------+---------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`indices<class_GLTFBufferView_property_indices>` | ``false`` | - +-------------------------+---------------------------------------------------------------+-----------+ + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`buffer<class_GLTFBufferView_property_buffer>` | ``-1`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`byte_length<class_GLTFBufferView_property_byte_length>` | ``0`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`byte_offset<class_GLTFBufferView_property_byte_offset>` | ``0`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`byte_stride<class_GLTFBufferView_property_byte_stride>` | ``-1`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`indices<class_GLTFBufferView_property_indices>` | ``false`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`vertex_attributes<class_GLTFBufferView_property_vertex_attributes>` | ``false`` | + +-------------------------+---------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`load_buffer_view_data<class_GLTFBufferView_method_load_buffer_view_data>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -49,16 +79,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **buffer** = ``-1`` +:ref:`int<class_int>` **buffer** = ``-1`` :ref:`🔗<class_GLTFBufferView_property_buffer>` .. rst-class:: classref-property-setget -- void **set_buffer** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_buffer** **(** **)** - -.. container:: contribute +- |void| **set_buffer**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_buffer**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The index of the buffer this buffer view is referencing. If ``-1``, this buffer view is not referencing any buffer. .. rst-class:: classref-item-separator @@ -68,16 +96,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **byte_length** = ``0`` +:ref:`int<class_int>` **byte_length** = ``0`` :ref:`🔗<class_GLTFBufferView_property_byte_length>` .. rst-class:: classref-property-setget -- void **set_byte_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_byte_length** **(** **)** +- |void| **set_byte_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_byte_length**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The length, in bytes, of this buffer view. If ``0``, this buffer view is empty. .. rst-class:: classref-item-separator @@ -87,16 +113,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **byte_offset** = ``0`` +:ref:`int<class_int>` **byte_offset** = ``0`` :ref:`🔗<class_GLTFBufferView_property_byte_offset>` .. rst-class:: classref-property-setget -- void **set_byte_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_byte_offset** **(** **)** - -.. container:: contribute +- |void| **set_byte_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_byte_offset**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The offset, in bytes, from the start of the buffer to the start of this buffer view. .. rst-class:: classref-item-separator @@ -106,16 +130,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **byte_stride** = ``-1`` +:ref:`int<class_int>` **byte_stride** = ``-1`` :ref:`🔗<class_GLTFBufferView_property_byte_stride>` .. rst-class:: classref-property-setget -- void **set_byte_stride** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_byte_stride** **(** **)** - -.. container:: contribute +- |void| **set_byte_stride**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_byte_stride**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The stride, in bytes, between interleaved data. If ``-1``, this buffer view is not interleaved. .. rst-class:: classref-item-separator @@ -125,16 +147,48 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **indices** = ``false`` +:ref:`bool<class_bool>` **indices** = ``false`` :ref:`🔗<class_GLTFBufferView_property_indices>` + +.. rst-class:: classref-property-setget + +- |void| **set_indices**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_indices**\ (\ ) + +True if the GLTFBufferView's OpenGL GPU buffer type is an ``ELEMENT_ARRAY_BUFFER`` used for vertex indices (integer constant ``34963``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ for possible values. This property is set on import and used on export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFBufferView_property_vertex_attributes: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **vertex_attributes** = ``false`` :ref:`🔗<class_GLTFBufferView_property_vertex_attributes>` .. rst-class:: classref-property-setget -- void **set_indices** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_indices** **(** **)** +- |void| **set_vertex_attributes**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_vertex_attributes**\ (\ ) + +True if the GLTFBufferView's OpenGL GPU buffer type is an ``ARRAY_BUFFER`` used for vertex attributes (integer constant ``34962``). False if the buffer type is any other value. See `Buffers, BufferViews, and Accessors <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md>`__ for possible values. This property is set on import and used on export. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFBufferView_method_load_buffer_view_data: + +.. rst-class:: classref-method -.. container:: contribute +:ref:`PackedByteArray<class_PackedByteArray>` **load_buffer_view_data**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |const| :ref:`🔗<class_GLTFBufferView_method_load_buffer_view_data>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Loads the buffer view data from the buffer referenced by this buffer view in the given :ref:`GLTFState<class_GLTFState>`. Interleaved data with a byte stride is not yet supported by this method. The data is returned as a :ref:`PackedByteArray<class_PackedByteArray>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -143,3 +197,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfcamera.rst b/classes/class_gltfcamera.rst index dfd15f1ca9a..418bbfa1c25 100644 --- a/classes/class_gltfcamera.rst +++ b/classes/class_gltfcamera.rst @@ -26,6 +26,8 @@ Represents a camera as defined by the base GLTF spec. Tutorials --------- +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + - `GLTF camera detailed specification <https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-camera>`__ - `GLTF camera spec and example file <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_015_SimpleCameras.md>`__ @@ -58,15 +60,15 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_dictionary<class_GLTFCamera_method_from_dictionary>` **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_node<class_GLTFCamera_method_from_node>` **(** :ref:`Camera3D<class_Camera3D>` camera_node **)** |static| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFCamera_method_to_dictionary>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Camera3D<class_Camera3D>` | :ref:`to_node<class_GLTFCamera_method_to_node>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_dictionary<class_GLTFCamera_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFCamera<class_GLTFCamera>` | :ref:`from_node<class_GLTFCamera_method_from_node>`\ (\ camera_node\: :ref:`Camera3D<class_Camera3D>`\ ) |static| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFCamera_method_to_dictionary>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera3D<class_Camera3D>` | :ref:`to_node<class_GLTFCamera_method_to_node>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,12 +83,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **depth_far** = ``4000.0`` +:ref:`float<class_float>` **depth_far** = ``4000.0`` :ref:`🔗<class_GLTFCamera_property_depth_far>` .. rst-class:: classref-property-setget -- void **set_depth_far** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_far** **(** **)** +- |void| **set_depth_far**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_far**\ (\ ) The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``zfar`` property. @@ -98,12 +100,12 @@ The distance to the far culling boundary for this camera relative to its local Z .. rst-class:: classref-property -:ref:`float<class_float>` **depth_near** = ``0.05`` +:ref:`float<class_float>` **depth_near** = ``0.05`` :ref:`🔗<class_GLTFCamera_property_depth_near>` .. rst-class:: classref-property-setget -- void **set_depth_near** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_near** **(** **)** +- |void| **set_depth_near**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_near**\ (\ ) The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's ``znear`` property. @@ -115,12 +117,12 @@ The distance to the near culling boundary for this camera relative to its local .. rst-class:: classref-property -:ref:`float<class_float>` **fov** = ``1.309`` +:ref:`float<class_float>` **fov** = ``1.309`` :ref:`🔗<class_GLTFCamera_property_fov>` .. rst-class:: classref-property-setget -- void **set_fov** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fov** **(** **)** +- |void| **set_fov**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fov**\ (\ ) The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's ``yfov`` property. This value is only used for perspective cameras, when :ref:`perspective<class_GLTFCamera_property_perspective>` is true. @@ -132,12 +134,12 @@ The FOV of the camera. This class and GLTF define the camera FOV in radians, whi .. rst-class:: classref-property -:ref:`bool<class_bool>` **perspective** = ``true`` +:ref:`bool<class_bool>` **perspective** = ``true`` :ref:`🔗<class_GLTFCamera_property_perspective>` .. rst-class:: classref-property-setget -- void **set_perspective** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_perspective** **(** **)** +- |void| **set_perspective**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_perspective**\ (\ ) Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera ``type`` property. See :ref:`Camera3D.projection<class_Camera3D_property_projection>` and the GLTF spec for more information. @@ -149,12 +151,12 @@ Whether or not the camera is in perspective mode. If false, the camera is in ort .. rst-class:: classref-property -:ref:`float<class_float>` **size_mag** = ``0.5`` +:ref:`float<class_float>` **size_mag** = ``0.5`` :ref:`🔗<class_GLTFCamera_property_size_mag>` .. rst-class:: classref-property-setget -- void **set_size_mag** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_size_mag** **(** **)** +- |void| **set_size_mag**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_size_mag**\ (\ ) The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's ``ymag`` property. This value is only used for orthographic/orthogonal cameras, when :ref:`perspective<class_GLTFCamera_property_perspective>` is false. @@ -171,7 +173,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`GLTFCamera<class_GLTFCamera>` **from_dictionary** **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| +:ref:`GLTFCamera<class_GLTFCamera>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFCamera_method_from_dictionary>` Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary<class_Dictionary>`. @@ -183,7 +185,7 @@ Creates a new GLTFCamera instance by parsing the given :ref:`Dictionary<class_Di .. rst-class:: classref-method -:ref:`GLTFCamera<class_GLTFCamera>` **from_node** **(** :ref:`Camera3D<class_Camera3D>` camera_node **)** |static| +:ref:`GLTFCamera<class_GLTFCamera>` **from_node**\ (\ camera_node\: :ref:`Camera3D<class_Camera3D>`\ ) |static| :ref:`🔗<class_GLTFCamera_method_from_node>` Create a new GLTFCamera instance from the given Godot :ref:`Camera3D<class_Camera3D>` node. @@ -195,7 +197,7 @@ Create a new GLTFCamera instance from the given Godot :ref:`Camera3D<class_Camer .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **to_dictionary** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFCamera_method_to_dictionary>` Serializes this GLTFCamera instance into a :ref:`Dictionary<class_Dictionary>`. @@ -207,7 +209,7 @@ Serializes this GLTFCamera instance into a :ref:`Dictionary<class_Dictionary>`. .. rst-class:: classref-method -:ref:`Camera3D<class_Camera3D>` **to_node** **(** **)** |const| +:ref:`Camera3D<class_Camera3D>` **to_node**\ (\ ) |const| :ref:`🔗<class_GLTFCamera_method_to_node>` Converts this GLTFCamera instance into a Godot :ref:`Camera3D<class_Camera3D>` node. @@ -218,3 +220,4 @@ Converts this GLTFCamera instance into a Godot :ref:`Camera3D<class_Camera3D>` n .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfdocument.rst b/classes/class_gltfdocument.rst index 68aff7c049a..f5d8a657bc0 100644 --- a/classes/class_gltfdocument.rst +++ b/classes/class_gltfdocument.rst @@ -12,12 +12,47 @@ GLTFDocument **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` +**Inherited By:** :ref:`FBXDocument<class_FBXDocument>` + +Class for importing and exporting glTF files in and out of Godot. + .. rst-class:: classref-introduction-group Description ----------- -Append a glTF2 3d format from a file, buffer or scene and then write to the filesystem, buffer or scene. +GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. + +All of the data in a GLTF scene is stored in the :ref:`GLTFState<class_GLTFState>` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState<class_GLTFState>` objects. + +GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension<class_GLTFDocument_method_register_gltf_document_extension>`. This allows for custom data to be imported and exported. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + +- `glTF 'What the duck?' guide <https://www.khronos.org/files/gltf20-reference-guide.pdf>`__ + +- `Khronos glTF specification <https://registry.khronos.org/glTF/>`__ + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`image_format<class_GLTFDocument_property_image_format>` | ``"PNG"`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`lossy_quality<class_GLTFDocument_property_lossy_quality>` | ``0.75`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` | :ref:`root_node_mode<class_GLTFDocument_property_root_node_mode>` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -27,23 +62,122 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_buffer<class_GLTFDocument_method_append_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes, :ref:`String<class_String>` base_path, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_file<class_GLTFDocument_method_append_from_file>` **(** :ref:`String<class_String>` path, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0, :ref:`String<class_String>` base_path="" **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_scene<class_GLTFDocument_method_append_from_scene>` **(** :ref:`Node<class_Node>` node, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0 **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`generate_buffer<class_GLTFDocument_method_generate_buffer>` **(** :ref:`GLTFState<class_GLTFState>` state **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`generate_scene<class_GLTFDocument_method_generate_scene>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`float<class_float>` bake_fps=30, :ref:`bool<class_bool>` trimming=false, :ref:`bool<class_bool>` remove_immutable_tracks=true **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_gltf_document_extension<class_GLTFDocument_method_register_gltf_document_extension>` **(** :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` extension, :ref:`bool<class_bool>` first_priority=false **)** |static| | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unregister_gltf_document_extension<class_GLTFDocument_method_unregister_gltf_document_extension>` **(** :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` extension **)** |static| | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`write_to_filesystem<class_GLTFDocument_method_write_to_filesystem>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`String<class_String>` path **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_buffer<class_GLTFDocument_method_append_from_buffer>`\ (\ bytes\: :ref:`PackedByteArray<class_PackedByteArray>`, base_path\: :ref:`String<class_String>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_file<class_GLTFDocument_method_append_from_file>`\ (\ path\: :ref:`String<class_String>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0, base_path\: :ref:`String<class_String>` = ""\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`append_from_scene<class_GLTFDocument_method_append_from_scene>`\ (\ node\: :ref:`Node<class_Node>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`generate_buffer<class_GLTFDocument_method_generate_buffer>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`generate_scene<class_GLTFDocument_method_generate_scene>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, bake_fps\: :ref:`float<class_float>` = 30, trimming\: :ref:`bool<class_bool>` = false, remove_immutable_tracks\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_gltf_document_extension<class_GLTFDocument_method_register_gltf_document_extension>`\ (\ extension\: :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_gltf_document_extension<class_GLTFDocument_method_unregister_gltf_document_extension>`\ (\ extension\: :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`\ ) |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`write_to_filesystem<class_GLTFDocument_method_write_to_filesystem>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, path\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_GLTFDocument_RootNodeMode: + +.. rst-class:: classref-enumeration + +enum **RootNodeMode**: :ref:`🔗<enum_GLTFDocument_RootNodeMode>` + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_SINGLE_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` **ROOT_NODE_MODE_SINGLE_ROOT** = ``0`` + +Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the ``GODOT_single_root`` glTF extension. This will be parsed the same as :ref:`ROOT_NODE_MODE_KEEP_ROOT<class_GLTFDocument_constant_ROOT_NODE_MODE_KEEP_ROOT>` if the implementation does not support ``GODOT_single_root``. + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_KEEP_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` **ROOT_NODE_MODE_KEEP_ROOT** = ``1`` + +Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier. + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_MULTI_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` **ROOT_NODE_MODE_MULTI_ROOT** = ``2`` + +Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GLTFDocument_property_image_format: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **image_format** = ``"PNG"`` :ref:`🔗<class_GLTFDocument_property_image_format>` + +.. rst-class:: classref-property-setget + +- |void| **set_image_format**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_image_format**\ (\ ) + +The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. + +By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_property_lossy_quality: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **lossy_quality** = ``0.75`` :ref:`🔗<class_GLTFDocument_property_lossy_quality>` + +.. rst-class:: classref-property-setget + +- |void| **set_lossy_quality**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lossy_quality**\ (\ ) + +If :ref:`image_format<class_GLTFDocument_property_image_format>` is a lossy image format, this determines the lossy quality of the image. On a range of ``0.0`` to ``1.0``, where ``0.0`` is the lowest quality and ``1.0`` is the highest quality. A lossy quality of ``1.0`` is not the same as lossless. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_property_root_node_mode: + +.. rst-class:: classref-property + +:ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` **root_node_mode** = ``0`` :ref:`🔗<class_GLTFDocument_property_root_node_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_root_node_mode**\ (\ value\: :ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>`\ ) +- :ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` **get_root_node_mode**\ (\ ) + +How to process the root node during export. See :ref:`RootNodeMode<enum_GLTFDocument_RootNodeMode>` for details. The default and recommended value is :ref:`ROOT_NODE_MODE_SINGLE_ROOT<class_GLTFDocument_constant_ROOT_NODE_MODE_SINGLE_ROOT>`. + +\ **Note:** Regardless of how the glTF file is exported, when importing, the root node type and name can be overridden in the scene import settings tab. .. rst-class:: classref-section-separator @@ -58,7 +192,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **append_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes, :ref:`String<class_String>` base_path, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **append_from_buffer**\ (\ bytes\: :ref:`PackedByteArray<class_PackedByteArray>`, base_path\: :ref:`String<class_String>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_GLTFDocument_method_append_from_buffer>` Takes a :ref:`PackedByteArray<class_PackedByteArray>` defining a GLTF and imports the data to the given :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter. @@ -72,7 +206,7 @@ Takes a :ref:`PackedByteArray<class_PackedByteArray>` defining a GLTF and import .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **append_from_file** **(** :ref:`String<class_String>` path, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0, :ref:`String<class_String>` base_path="" **)** +:ref:`Error<enum_@GlobalScope_Error>` **append_from_file**\ (\ path\: :ref:`String<class_String>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0, base_path\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_GLTFDocument_method_append_from_file>` Takes a path to a GLTF file and imports the data at that file path to the given :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter. @@ -86,7 +220,7 @@ Takes a path to a GLTF file and imports the data at that file path to the given .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **append_from_scene** **(** :ref:`Node<class_Node>` node, :ref:`GLTFState<class_GLTFState>` state, :ref:`int<class_int>` flags=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **append_from_scene**\ (\ node\: :ref:`Node<class_Node>`, state\: :ref:`GLTFState<class_GLTFState>`, flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_GLTFDocument_method_append_from_scene>` Takes a Godot Engine scene node and exports it and its descendants to the given :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter. @@ -98,7 +232,7 @@ Takes a Godot Engine scene node and exports it and its descendants to the given .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **generate_buffer** **(** :ref:`GLTFState<class_GLTFState>` state **)** +:ref:`PackedByteArray<class_PackedByteArray>` **generate_buffer**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) :ref:`🔗<class_GLTFDocument_method_generate_buffer>` Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter and returns a GLTF :ref:`PackedByteArray<class_PackedByteArray>`. @@ -110,10 +244,12 @@ Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter .. rst-class:: classref-method -:ref:`Node<class_Node>` **generate_scene** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`float<class_float>` bake_fps=30, :ref:`bool<class_bool>` trimming=false, :ref:`bool<class_bool>` remove_immutable_tracks=true **)** +:ref:`Node<class_Node>` **generate_scene**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, bake_fps\: :ref:`float<class_float>` = 30, trimming\: :ref:`bool<class_bool>` = false, remove_immutable_tracks\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_GLTFDocument_method_generate_scene>` Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter and returns a Godot Engine scene node. +The ``bake_fps`` parameter overrides the bake_fps in ``state``. + .. rst-class:: classref-item-separator ---- @@ -122,7 +258,7 @@ Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter .. rst-class:: classref-method -void **register_gltf_document_extension** **(** :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` extension, :ref:`bool<class_bool>` first_priority=false **)** |static| +|void| **register_gltf_document_extension**\ (\ extension\: :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_GLTFDocument_method_register_gltf_document_extension>` Registers the given :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` instance with GLTFDocument. If ``first_priority`` is true, this extension will be run first. Otherwise, it will be run last. @@ -136,7 +272,7 @@ Registers the given :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` in .. rst-class:: classref-method -void **unregister_gltf_document_extension** **(** :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` extension **)** |static| +|void| **unregister_gltf_document_extension**\ (\ extension\: :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`\ ) |static| :ref:`🔗<class_GLTFDocument_method_unregister_gltf_document_extension>` Unregisters the given :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` instance. @@ -148,11 +284,11 @@ Unregisters the given :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **write_to_filesystem** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **write_to_filesystem**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_GLTFDocument_method_write_to_filesystem>` Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter and writes a glTF file to the filesystem. -\ **Note:** The extension of the glTF file determines if it is a .glb binary file or a .gltf file. +\ **Note:** The extension of the glTF file determines if it is a .glb binary file or a .gltf text file. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -161,3 +297,4 @@ Takes a :ref:`GLTFState<class_GLTFState>` object through the ``state`` parameter .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfdocumentextension.rst b/classes/class_gltfdocumentextension.rst index 3f3e4792878..9daad61f3f2 100644 --- a/classes/class_gltfdocumentextension.rst +++ b/classes/class_gltfdocumentextension.rst @@ -27,6 +27,13 @@ To use, make a new class extending GLTFDocumentExtension, override any methods y \ **Note:** Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the ``set_additional_data`` and ``get_additional_data`` methods in :ref:`GLTFState<class_GLTFState>` or :ref:`GLTFNode<class_GLTFNode>`. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Methods @@ -35,33 +42,45 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_convert_scene_node<class_GLTFDocumentExtension_method__convert_scene_node>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Node<class_Node>` scene_node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_node<class_GLTFDocumentExtension_method__export_node>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` json, :ref:`Node<class_Node>` node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_post<class_GLTFDocumentExtension_method__export_post>` **(** :ref:`GLTFState<class_GLTFState>` state **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_preflight<class_GLTFDocumentExtension_method__export_preflight>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Node<class_Node>` root **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D<class_Node3D>` | :ref:`_generate_scene_node<class_GLTFDocumentExtension_method__generate_scene_node>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Node<class_Node>` scene_parent **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_supported_extensions<class_GLTFDocumentExtension_method__get_supported_extensions>` **(** **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_node<class_GLTFDocumentExtension_method__import_node>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` json, :ref:`Node<class_Node>` node **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_post<class_GLTFDocumentExtension_method__import_post>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Node<class_Node>` root **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_post_parse<class_GLTFDocumentExtension_method__import_post_parse>` **(** :ref:`GLTFState<class_GLTFState>` state **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_preflight<class_GLTFDocumentExtension_method__import_preflight>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`PackedStringArray<class_PackedStringArray>` extensions **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_image_data<class_GLTFDocumentExtension_method__parse_image_data>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`PackedByteArray<class_PackedByteArray>` image_data, :ref:`String<class_String>` mime_type, :ref:`Image<class_Image>` ret_image **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_node_extensions<class_GLTFDocumentExtension_method__parse_node_extensions>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` extensions **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_texture_json<class_GLTFDocumentExtension_method__parse_texture_json>` **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Dictionary<class_Dictionary>` texture_json, :ref:`GLTFTexture<class_GLTFTexture>` ret_gltf_texture **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_convert_scene_node<class_GLTFDocumentExtension_private_method__convert_scene_node>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, scene_node\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_node<class_GLTFDocumentExtension_private_method__export_node>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, json\: :ref:`Dictionary<class_Dictionary>`, node\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_post<class_GLTFDocumentExtension_private_method__export_post>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_preflight<class_GLTFDocumentExtension_private_method__export_preflight>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, root\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_export_preserialize<class_GLTFDocumentExtension_private_method__export_preserialize>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D<class_Node3D>` | :ref:`_generate_scene_node<class_GLTFDocumentExtension_private_method__generate_scene_node>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, scene_parent\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_image_file_extension<class_GLTFDocumentExtension_private_method__get_image_file_extension>`\ (\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_saveable_image_formats<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>`\ (\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_supported_extensions<class_GLTFDocumentExtension_private_method__get_supported_extensions>`\ (\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_node<class_GLTFDocumentExtension_private_method__import_node>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, json\: :ref:`Dictionary<class_Dictionary>`, node\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_post<class_GLTFDocumentExtension_private_method__import_post>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, root\: :ref:`Node<class_Node>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_post_parse<class_GLTFDocumentExtension_private_method__import_post_parse>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_import_preflight<class_GLTFDocumentExtension_private_method__import_preflight>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, extensions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_image_data<class_GLTFDocumentExtension_private_method__parse_image_data>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image_data\: :ref:`PackedByteArray<class_PackedByteArray>`, mime_type\: :ref:`String<class_String>`, ret_image\: :ref:`Image<class_Image>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_node_extensions<class_GLTFDocumentExtension_private_method__parse_node_extensions>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, extensions\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_parse_texture_json<class_GLTFDocumentExtension_private_method__parse_texture_json>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, texture_json\: :ref:`Dictionary<class_Dictionary>`, ret_gltf_texture\: :ref:`GLTFTexture<class_GLTFTexture>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_save_image_at_path<class_GLTFDocumentExtension_private_method__save_image_at_path>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image\: :ref:`Image<class_Image>`, file_path\: :ref:`String<class_String>`, image_format\: :ref:`String<class_String>`, lossy_quality\: :ref:`float<class_float>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`_serialize_image_to_bytes<class_GLTFDocumentExtension_private_method__serialize_image_to_bytes>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image\: :ref:`Image<class_Image>`, image_dict\: :ref:`Dictionary<class_Dictionary>`, image_format\: :ref:`String<class_String>`, lossy_quality\: :ref:`float<class_float>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_serialize_texture_json<class_GLTFDocumentExtension_private_method__serialize_texture_json>`\ (\ state\: :ref:`GLTFState<class_GLTFState>`, texture_json\: :ref:`Dictionary<class_Dictionary>`, gltf_texture\: :ref:`GLTFTexture<class_GLTFTexture>`, image_format\: :ref:`String<class_String>`\ ) |virtual| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,39 +91,39 @@ Methods Method Descriptions ------------------- -.. _class_GLTFDocumentExtension_method__convert_scene_node: +.. _class_GLTFDocumentExtension_private_method__convert_scene_node: .. rst-class:: classref-method -void **_convert_scene_node** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Node<class_Node>` scene_node **)** |virtual| +|void| **_convert_scene_node**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, scene_node\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__convert_scene_node>` -Part of the export process. This method is run after :ref:`_export_preflight<class_GLTFDocumentExtension_method__export_preflight>` and before :ref:`_export_node<class_GLTFDocumentExtension_method__export_node>`. +Part of the export process. This method is run after :ref:`_export_preflight<class_GLTFDocumentExtension_private_method__export_preflight>` and before :ref:`_export_preserialize<class_GLTFDocumentExtension_private_method__export_preserialize>`. -Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node<class_GLTFDocumentExtension_method__export_node>`. +Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node<class_GLTFDocumentExtension_private_method__export_node>`. .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__export_node: +.. _class_GLTFDocumentExtension_private_method__export_node: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_export_node** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` json, :ref:`Node<class_Node>` node **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_export_node**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, json\: :ref:`Dictionary<class_Dictionary>`, node\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__export_node>` -Part of the export process. This method is run after :ref:`_convert_scene_node<class_GLTFDocumentExtension_method__convert_scene_node>` and before :ref:`_export_post<class_GLTFDocumentExtension_method__export_post>`. +Part of the export process. This method is run after :ref:`_get_saveable_image_formats<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>` and before :ref:`_export_post<class_GLTFDocumentExtension_private_method__export_post>`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json<class_GLTFDocumentExtension_private_method__serialize_texture_json>`. -This method can be used to modify the final JSON of each node. +This method can be used to modify the final JSON of each node. Data should be primarily stored in ``gltf_node`` prior to serializing the JSON, but the original Godot ``node`` is also provided if available. The node may be null if not available, such as when exporting GLTF data not generated from a Godot scene. .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__export_post: +.. _class_GLTFDocumentExtension_private_method__export_post: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_export_post** **(** :ref:`GLTFState<class_GLTFState>` state **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_export_post**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__export_post>` Part of the export process. This method is run last, after all other parts of the export process. @@ -114,11 +133,11 @@ This method can be used to modify the final JSON of the generated GLTF file. ---- -.. _class_GLTFDocumentExtension_method__export_preflight: +.. _class_GLTFDocumentExtension_private_method__export_preflight: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_export_preflight** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Node<class_Node>` root **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_export_preflight**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, root\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__export_preflight>` Part of the export process. This method is run first, before all other parts of the export process. @@ -128,27 +147,69 @@ The return value is used to determine if this **GLTFDocumentExtension** instance ---- -.. _class_GLTFDocumentExtension_method__generate_scene_node: +.. _class_GLTFDocumentExtension_private_method__export_preserialize: .. rst-class:: classref-method -:ref:`Node3D<class_Node3D>` **_generate_scene_node** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Node<class_Node>` scene_parent **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_export_preserialize**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__export_preserialize>` + +Part of the export process. This method is run after :ref:`_convert_scene_node<class_GLTFDocumentExtension_private_method__convert_scene_node>` and before :ref:`_get_saveable_image_formats<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>`. -Part of the import process. This method is run after :ref:`_parse_node_extensions<class_GLTFDocumentExtension_method__parse_node_extensions>` and before :ref:`_import_post_parse<class_GLTFDocumentExtension_method__import_post_parse>`. +This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer<class_GLTFDocument_method_generate_buffer>` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem<class_GLTFDocument_method_write_to_filesystem>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__generate_scene_node: + +.. rst-class:: classref-method + +:ref:`Node3D<class_Node3D>` **_generate_scene_node**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, scene_parent\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__generate_scene_node>` + +Part of the import process. This method is run after :ref:`_import_post_parse<class_GLTFDocumentExtension_private_method__import_post_parse>` and before :ref:`_import_node<class_GLTFDocumentExtension_private_method__import_node>`. Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. +\ **Note:** The ``scene_parent`` parameter may be null if this is the single root node. + .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__get_supported_extensions: +.. _class_GLTFDocumentExtension_private_method__get_image_file_extension: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_supported_extensions** **(** **)** |virtual| +:ref:`String<class_String>` **_get_image_file_extension**\ (\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__get_image_file_extension>` + +Returns the file extension to use for saving image data into, for example, ``".png"``. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a :ref:`ResourceImporter<class_ResourceImporter>` class able to import the file. If not defined or empty, Godot will save the image into a PNG file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__get_saveable_image_formats: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_saveable_image_formats**\ (\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>` + +Part of the export process. This method is run after :ref:`_convert_scene_node<class_GLTFDocumentExtension_private_method__convert_scene_node>` and before :ref:`_export_node<class_GLTFDocumentExtension_private_method__export_node>`. + +Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the :ref:`GLTFDocument<class_GLTFDocument>`'s :ref:`GLTFDocument.image_format<class_GLTFDocument_property_image_format>` is in this array. If this **GLTFDocumentExtension** is selected as the image exporter, one of the :ref:`_save_image_at_path<class_GLTFDocumentExtension_private_method__save_image_at_path>` or :ref:`_serialize_image_to_bytes<class_GLTFDocumentExtension_private_method__serialize_image_to_bytes>` methods will run next, otherwise :ref:`_export_node<class_GLTFDocumentExtension_private_method__export_node>` will run next. If the format name contains ``"Lossy"``, the lossy quality slider will be displayed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__get_supported_extensions: + +.. rst-class:: classref-method -Part of the import process. This method is run after :ref:`_import_preflight<class_GLTFDocumentExtension_method__import_preflight>` and before :ref:`_parse_node_extensions<class_GLTFDocumentExtension_method__parse_node_extensions>`. +:ref:`PackedStringArray<class_PackedStringArray>` **_get_supported_extensions**\ (\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__get_supported_extensions>` + +Part of the import process. This method is run after :ref:`_import_preflight<class_GLTFDocumentExtension_private_method__import_preflight>` and before :ref:`_parse_node_extensions<class_GLTFDocumentExtension_private_method__parse_node_extensions>`. Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded. @@ -156,13 +217,13 @@ Returns an array of the GLTF extensions supported by this GLTFDocumentExtension ---- -.. _class_GLTFDocumentExtension_method__import_node: +.. _class_GLTFDocumentExtension_private_method__import_node: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_import_node** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` json, :ref:`Node<class_Node>` node **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_import_node**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, json\: :ref:`Dictionary<class_Dictionary>`, node\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__import_node>` -Part of the import process. This method is run after :ref:`_import_post_parse<class_GLTFDocumentExtension_method__import_post_parse>` and before :ref:`_import_post<class_GLTFDocumentExtension_method__import_post>`. +Part of the import process. This method is run after :ref:`_generate_scene_node<class_GLTFDocumentExtension_private_method__generate_scene_node>` and before :ref:`_import_post<class_GLTFDocumentExtension_private_method__import_post>`. This method can be used to make modifications to each of the generated Godot scene nodes. @@ -170,11 +231,11 @@ This method can be used to make modifications to each of the generated Godot sce ---- -.. _class_GLTFDocumentExtension_method__import_post: +.. _class_GLTFDocumentExtension_private_method__import_post: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_import_post** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Node<class_Node>` root **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_import_post**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, root\: :ref:`Node<class_Node>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__import_post>` Part of the import process. This method is run last, after all other parts of the import process. @@ -184,25 +245,25 @@ This method can be used to modify the final Godot scene generated by the import ---- -.. _class_GLTFDocumentExtension_method__import_post_parse: +.. _class_GLTFDocumentExtension_private_method__import_post_parse: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_import_post_parse** **(** :ref:`GLTFState<class_GLTFState>` state **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_import_post_parse**\ (\ state\: :ref:`GLTFState<class_GLTFState>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__import_post_parse>` -Part of the import process. This method is run after :ref:`_generate_scene_node<class_GLTFDocumentExtension_method__generate_scene_node>` and before :ref:`_import_node<class_GLTFDocumentExtension_method__import_node>`. +Part of the import process. This method is run after :ref:`_parse_node_extensions<class_GLTFDocumentExtension_private_method__parse_node_extensions>` and before :ref:`_generate_scene_node<class_GLTFDocumentExtension_private_method__generate_scene_node>`. -This method can be used to modify any of the data imported so far, including any scene nodes, before running the final per-node import step. +This method can be used to modify any of the data imported so far after parsing, before generating the nodes and then running the final per-node import step. .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__import_preflight: +.. _class_GLTFDocumentExtension_private_method__import_preflight: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_import_preflight** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`PackedStringArray<class_PackedStringArray>` extensions **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_import_preflight**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, extensions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__import_preflight>` Part of the import process. This method is run first, before all other parts of the import process. @@ -212,13 +273,13 @@ The return value is used to determine if this **GLTFDocumentExtension** instance ---- -.. _class_GLTFDocumentExtension_method__parse_image_data: +.. _class_GLTFDocumentExtension_private_method__parse_image_data: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_parse_image_data** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`PackedByteArray<class_PackedByteArray>` image_data, :ref:`String<class_String>` mime_type, :ref:`Image<class_Image>` ret_image **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_parse_image_data**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image_data\: :ref:`PackedByteArray<class_PackedByteArray>`, mime_type\: :ref:`String<class_String>`, ret_image\: :ref:`Image<class_Image>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__parse_image_data>` -Part of the import process. This method is run after :ref:`_parse_node_extensions<class_GLTFDocumentExtension_method__parse_node_extensions>` and before :ref:`_parse_texture_json<class_GLTFDocumentExtension_method__parse_texture_json>`. +Part of the import process. This method is run after :ref:`_parse_node_extensions<class_GLTFDocumentExtension_private_method__parse_node_extensions>` and before :ref:`_parse_texture_json<class_GLTFDocumentExtension_private_method__parse_texture_json>`. Runs when parsing image data from a GLTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. @@ -226,30 +287,74 @@ Runs when parsing image data from a GLTF file. The data could be sourced from a ---- -.. _class_GLTFDocumentExtension_method__parse_node_extensions: +.. _class_GLTFDocumentExtension_private_method__parse_node_extensions: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_parse_node_extensions** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`GLTFNode<class_GLTFNode>` gltf_node, :ref:`Dictionary<class_Dictionary>` extensions **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_parse_node_extensions**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, gltf_node\: :ref:`GLTFNode<class_GLTFNode>`, extensions\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__parse_node_extensions>` -Part of the import process. This method is run after :ref:`_get_supported_extensions<class_GLTFDocumentExtension_method__get_supported_extensions>` and before :ref:`_generate_scene_node<class_GLTFDocumentExtension_method__generate_scene_node>`. +Part of the import process. This method is run after :ref:`_get_supported_extensions<class_GLTFDocumentExtension_private_method__get_supported_extensions>` and before :ref:`_import_post_parse<class_GLTFDocumentExtension_private_method__import_post_parse>`. -Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node<class_GLTFDocumentExtension_method__generate_scene_node>`. The return value should be a member of the :ref:`Error<enum_@GlobalScope_Error>` enum. +Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node<class_GLTFDocumentExtension_private_method__generate_scene_node>`. The return value should be a member of the :ref:`Error<enum_@GlobalScope_Error>` enum. .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__parse_texture_json: +.. _class_GLTFDocumentExtension_private_method__parse_texture_json: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_parse_texture_json** **(** :ref:`GLTFState<class_GLTFState>` state, :ref:`Dictionary<class_Dictionary>` texture_json, :ref:`GLTFTexture<class_GLTFTexture>` ret_gltf_texture **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_parse_texture_json**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, texture_json\: :ref:`Dictionary<class_Dictionary>`, ret_gltf_texture\: :ref:`GLTFTexture<class_GLTFTexture>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__parse_texture_json>` -Part of the import process. This method is run after :ref:`_parse_image_data<class_GLTFDocumentExtension_method__parse_image_data>` and before :ref:`_generate_scene_node<class_GLTFDocumentExtension_method__generate_scene_node>`. +Part of the import process. This method is run after :ref:`_parse_image_data<class_GLTFDocumentExtension_private_method__parse_image_data>` and before :ref:`_generate_scene_node<class_GLTFDocumentExtension_private_method__generate_scene_node>`. Runs when parsing the texture JSON from the GLTF textures array. This can be used to set the source image index to use as the texture. +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__save_image_at_path: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **_save_image_at_path**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image\: :ref:`Image<class_Image>`, file_path\: :ref:`String<class_String>`, image_format\: :ref:`String<class_String>`, lossy_quality\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__save_image_at_path>` + +Part of the export process. This method is run after :ref:`_get_saveable_image_formats<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>` and before :ref:`_serialize_texture_json<class_GLTFDocumentExtension_private_method__serialize_texture_json>`. + +This method is run when saving images separately from the GLTF file. When images are embedded, :ref:`_serialize_image_to_bytes<class_GLTFDocumentExtension_private_method__serialize_image_to_bytes>` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__serialize_image_to_bytes: + +.. rst-class:: classref-method + +:ref:`PackedByteArray<class_PackedByteArray>` **_serialize_image_to_bytes**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, image\: :ref:`Image<class_Image>`, image_dict\: :ref:`Dictionary<class_Dictionary>`, image_format\: :ref:`String<class_String>`, lossy_quality\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__serialize_image_to_bytes>` + +Part of the export process. This method is run after :ref:`_get_saveable_image_formats<class_GLTFDocumentExtension_private_method__get_saveable_image_formats>` and before :ref:`_serialize_texture_json<class_GLTFDocumentExtension_private_method__serialize_texture_json>`. + +This method is run when embedding images in the GLTF file. When images are saved separately, :ref:`_save_image_at_path<class_GLTFDocumentExtension_private_method__save_image_at_path>` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. + +This method must set the image MIME type in the ``image_dict`` with the ``"mimeType"`` key. For example, for a PNG image, it would be set to ``"image/png"``. The return value must be a :ref:`PackedByteArray<class_PackedByteArray>` containing the image data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocumentExtension_private_method__serialize_texture_json: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **_serialize_texture_json**\ (\ state\: :ref:`GLTFState<class_GLTFState>`, texture_json\: :ref:`Dictionary<class_Dictionary>`, gltf_texture\: :ref:`GLTFTexture<class_GLTFTexture>`, image_format\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_GLTFDocumentExtension_private_method__serialize_texture_json>` + +Part of the export process. This method is run after :ref:`_save_image_at_path<class_GLTFDocumentExtension_private_method__save_image_at_path>` or :ref:`_serialize_image_to_bytes<class_GLTFDocumentExtension_private_method__serialize_image_to_bytes>`, and before :ref:`_export_node<class_GLTFDocumentExtension_private_method__export_node>`. Note that this method only runs when this **GLTFDocumentExtension** is selected as the image exporter. + +This method can be used to set up the extensions for the texture JSON by editing ``texture_json``. The extension must also be added as used extension with :ref:`GLTFState.add_used_extension<class_GLTFState_method_add_used_extension>`, be sure to set ``required`` to ``true`` if you are not providing a fallback. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -257,3 +362,4 @@ Runs when parsing the texture JSON from the GLTF textures array. This can be use .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfdocumentextensionconvertimportermesh.rst b/classes/class_gltfdocumentextensionconvertimportermesh.rst index 2af7845a342..4df51759a0a 100644 --- a/classes/class_gltfdocumentextensionconvertimportermesh.rst +++ b/classes/class_gltfdocumentextensionconvertimportermesh.rst @@ -16,6 +16,13 @@ GLTFDocumentExtensionConvertImporterMesh There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -23,3 +30,4 @@ GLTFDocumentExtensionConvertImporterMesh .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltflight.rst b/classes/class_gltflight.rst index 20805938cb0..d92a7c3a890 100644 --- a/classes/class_gltflight.rst +++ b/classes/class_gltflight.rst @@ -26,6 +26,8 @@ Represents a light as defined by the ``KHR_lights_punctual`` GLTF extension. Tutorials --------- +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + - `KHR_lights_punctual GLTF extension spec <https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual>`__ .. rst-class:: classref-reftable-group @@ -58,15 +60,19 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_dictionary<class_GLTFLight_method_from_dictionary>` **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_node<class_GLTFLight_method_from_node>` **(** :ref:`Light3D<class_Light3D>` light_node **)** |static| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFLight_method_to_dictionary>` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Light3D<class_Light3D>` | :ref:`to_node<class_GLTFLight_method_to_node>` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_dictionary<class_GLTFLight_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFLight<class_GLTFLight>` | :ref:`from_node<class_GLTFLight_method_from_node>`\ (\ light_node\: :ref:`Light3D<class_Light3D>`\ ) |static| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFLight_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data<class_GLTFLight_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFLight_method_to_dictionary>`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Light3D<class_Light3D>` | :ref:`to_node<class_GLTFLight_method_to_node>`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_GLTFLight_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) The :ref:`Color<class_Color>` of the light. Defaults to white. A black color causes the light to have no effect. @@ -98,12 +104,12 @@ The :ref:`Color<class_Color>` of the light. Defaults to white. A black color cau .. rst-class:: classref-property -:ref:`float<class_float>` **inner_cone_angle** = ``0.0`` +:ref:`float<class_float>` **inner_cone_angle** = ``0.0`` :ref:`🔗<class_GLTFLight_property_inner_cone_angle>` .. rst-class:: classref-property-setget -- void **set_inner_cone_angle** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_inner_cone_angle** **(** **)** +- |void| **set_inner_cone_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_inner_cone_angle**\ (\ ) The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle. @@ -117,12 +123,12 @@ Within this angle, the light is at full brightness. Between the inner and outer .. rst-class:: classref-property -:ref:`float<class_float>` **intensity** = ``1.0`` +:ref:`float<class_float>` **intensity** = ``1.0`` :ref:`🔗<class_GLTFLight_property_intensity>` .. rst-class:: classref-property-setget -- void **set_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_intensity** **(** **)** +- |void| **set_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_intensity**\ (\ ) The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier. @@ -134,12 +140,12 @@ The intensity of the light. This is expressed in candelas (lumens per steradian) .. rst-class:: classref-property -:ref:`String<class_String>` **light_type** = ``""`` +:ref:`String<class_String>` **light_type** = ``""`` :ref:`🔗<class_GLTFLight_property_light_type>` .. rst-class:: classref-property-setget -- void **set_light_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_light_type** **(** **)** +- |void| **set_light_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_light_type**\ (\ ) The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's :ref:`OmniLight3D<class_OmniLight3D>`, :ref:`SpotLight3D<class_SpotLight3D>`, and :ref:`DirectionalLight3D<class_DirectionalLight3D>` respectively. @@ -151,12 +157,12 @@ The type of the light. The values accepted by Godot are "point", "spot", and "di .. rst-class:: classref-property -:ref:`float<class_float>` **outer_cone_angle** = ``0.785398`` +:ref:`float<class_float>` **outer_cone_angle** = ``0.785398`` :ref:`🔗<class_GLTFLight_property_outer_cone_angle>` .. rst-class:: classref-property-setget -- void **set_outer_cone_angle** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_outer_cone_angle** **(** **)** +- |void| **set_outer_cone_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_outer_cone_angle**\ (\ ) The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle. @@ -170,12 +176,12 @@ At this angle, the light drops off to zero brightness. Between the inner and out .. rst-class:: classref-property -:ref:`float<class_float>` **range** = ``inf`` +:ref:`float<class_float>` **range** = ``inf`` :ref:`🔗<class_GLTFLight_property_range>` .. rst-class:: classref-property-setget -- void **set_range** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_range** **(** **)** +- |void| **set_range**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_range**\ (\ ) The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. @@ -192,7 +198,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`GLTFLight<class_GLTFLight>` **from_dictionary** **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| +:ref:`GLTFLight<class_GLTFLight>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFLight_method_from_dictionary>` Creates a new GLTFLight instance by parsing the given :ref:`Dictionary<class_Dictionary>`. @@ -204,7 +210,7 @@ Creates a new GLTFLight instance by parsing the given :ref:`Dictionary<class_Dic .. rst-class:: classref-method -:ref:`GLTFLight<class_GLTFLight>` **from_node** **(** :ref:`Light3D<class_Light3D>` light_node **)** |static| +:ref:`GLTFLight<class_GLTFLight>` **from_node**\ (\ light_node\: :ref:`Light3D<class_Light3D>`\ ) |static| :ref:`🔗<class_GLTFLight_method_from_node>` Create a new GLTFLight instance from the given Godot :ref:`Light3D<class_Light3D>` node. @@ -212,11 +218,39 @@ Create a new GLTFLight instance from the given Godot :ref:`Light3D<class_Light3D ---- +.. _class_GLTFLight_method_get_additional_data: + +.. rst-class:: classref-method + +:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFLight_method_get_additional_data>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFLight_method_set_additional_data: + +.. rst-class:: classref-method + +|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFLight_method_set_additional_data>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFLight_method_to_dictionary: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **to_dictionary** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFLight_method_to_dictionary>` Serializes this GLTFLight instance into a :ref:`Dictionary<class_Dictionary>`. @@ -228,7 +262,7 @@ Serializes this GLTFLight instance into a :ref:`Dictionary<class_Dictionary>`. .. rst-class:: classref-method -:ref:`Light3D<class_Light3D>` **to_node** **(** **)** |const| +:ref:`Light3D<class_Light3D>` **to_node**\ (\ ) |const| :ref:`🔗<class_GLTFLight_method_to_node>` Converts this GLTFLight instance into a Godot :ref:`Light3D<class_Light3D>` node. @@ -239,3 +273,4 @@ Converts this GLTFLight instance into a Godot :ref:`Light3D<class_Light3D>` node .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfmesh.rst b/classes/class_gltfmesh.rst index 1aa58a6267a..1003478aa10 100644 --- a/classes/class_gltfmesh.rst +++ b/classes/class_gltfmesh.rst @@ -12,9 +12,21 @@ GLTFMesh **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +GLTFMesh represents a GLTF mesh. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +GLTFMesh handles 3D mesh data imported from GLTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group @@ -24,13 +36,29 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`blend_weights<class_GLTFMesh_property_blend_weights>` | ``PackedFloat32Array()`` | - +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ - | :ref:`Material[]<class_Material>` | :ref:`instance_materials<class_GLTFMesh_property_instance_materials>` | ``[]`` | - +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ - | :ref:`ImporterMesh<class_ImporterMesh>` | :ref:`mesh<class_GLTFMesh_property_mesh>` | | - +-----------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + +--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`blend_weights<class_GLTFMesh_property_blend_weights>` | ``PackedFloat32Array()`` | + +--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] | :ref:`instance_materials<class_GLTFMesh_property_instance_materials>` | ``[]`` | + +--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`ImporterMesh<class_ImporterMesh>` | :ref:`mesh<class_GLTFMesh_property_mesh>` | | + +--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + | :ref:`String<class_String>` | :ref:`original_name<class_GLTFMesh_property_original_name>` | ``""`` | + +--------------------------------------------------------------+-----------------------------------------------------------------------+--------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFMesh_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data<class_GLTFMesh_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,16 +73,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **blend_weights** = ``PackedFloat32Array()`` +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **blend_weights** = ``PackedFloat32Array()`` :ref:`🔗<class_GLTFMesh_property_blend_weights>` .. rst-class:: classref-property-setget -- void **set_blend_weights** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)** -- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_blend_weights** **(** **)** +- |void| **set_blend_weights**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) +- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_blend_weights**\ (\ ) -.. container:: contribute +An array of floats representing the blend weights of the mesh. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details. .. rst-class:: classref-item-separator @@ -64,16 +92,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material[]<class_Material>` **instance_materials** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] **instance_materials** = ``[]`` :ref:`🔗<class_GLTFMesh_property_instance_materials>` .. rst-class:: classref-property-setget -- void **set_instance_materials** **(** :ref:`Material[]<class_Material>` value **)** -- :ref:`Material[]<class_Material>` **get_instance_materials** **(** **)** +- |void| **set_instance_materials**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] **get_instance_materials**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +An array of Material objects representing the materials used in the mesh. .. rst-class:: classref-item-separator @@ -83,16 +109,64 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ImporterMesh<class_ImporterMesh>` **mesh** +:ref:`ImporterMesh<class_ImporterMesh>` **mesh** :ref:`🔗<class_GLTFMesh_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`ImporterMesh<class_ImporterMesh>` value **)** -- :ref:`ImporterMesh<class_ImporterMesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`ImporterMesh<class_ImporterMesh>`\ ) +- :ref:`ImporterMesh<class_ImporterMesh>` **get_mesh**\ (\ ) + +The :ref:`ImporterMesh<class_ImporterMesh>` object representing the mesh itself. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFMesh_property_original_name: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **original_name** = ``""`` :ref:`🔗<class_GLTFMesh_property_original_name>` + +.. rst-class:: classref-property-setget + +- |void| **set_original_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_name**\ (\ ) + +The original name of the mesh. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GLTFMesh_method_get_additional_data: + +.. rst-class:: classref-method + +:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFMesh_method_get_additional_data>` + +Gets additional arbitrary data in this **GLTFMesh** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. + +The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFMesh_method_set_additional_data: + +.. rst-class:: classref-method + +|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFMesh_method_set_additional_data>` -.. container:: contribute +Sets additional arbitrary data in this **GLTFMesh** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -101,3 +175,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfnode.rst b/classes/class_gltfnode.rst index 2a6dde37f50..dde695d27d3 100644 --- a/classes/class_gltfnode.rst +++ b/classes/class_gltfnode.rst @@ -28,6 +28,8 @@ GLTF nodes generally exist inside of :ref:`GLTFState<class_GLTFState>` which rep Tutorials --------- +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + - `GLTF scene and node spec <https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_004_ScenesNodes.md">`__ .. rst-class:: classref-reftable-group @@ -38,31 +40,33 @@ Properties .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`camera<class_GLTFNode_property_camera>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`children<class_GLTFNode_property_children>` | ``PackedInt32Array()`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`height<class_GLTFNode_property_height>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`light<class_GLTFNode_property_light>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh<class_GLTFNode_property_mesh>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`parent<class_GLTFNode_property_parent>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`position<class_GLTFNode_property_position>` | ``Vector3(0, 0, 0)`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation<class_GLTFNode_property_rotation>` | ``Quaternion(0, 0, 0, 1)`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`scale<class_GLTFNode_property_scale>` | ``Vector3(1, 1, 1)`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`skeleton<class_GLTFNode_property_skeleton>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`skin<class_GLTFNode_property_skin>` | ``-1`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`xform<class_GLTFNode_property_xform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | - +-------------------------------------------------+---------------------------------------------------+-----------------------------------------------------+ + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`camera<class_GLTFNode_property_camera>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`children<class_GLTFNode_property_children>` | ``PackedInt32Array()`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`height<class_GLTFNode_property_height>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`light<class_GLTFNode_property_light>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh<class_GLTFNode_property_mesh>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`original_name<class_GLTFNode_property_original_name>` | ``""`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`parent<class_GLTFNode_property_parent>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`position<class_GLTFNode_property_position>` | ``Vector3(0, 0, 0)`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation<class_GLTFNode_property_rotation>` | ``Quaternion(0, 0, 0, 1)`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`scale<class_GLTFNode_property_scale>` | ``Vector3(1, 1, 1)`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`skeleton<class_GLTFNode_property_skeleton>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`skin<class_GLTFNode_property_skin>` | ``-1`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`xform<class_GLTFNode_property_xform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +-------------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -72,11 +76,11 @@ Methods .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFNode_method_get_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_additional_data<class_GLTFNode_method_set_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFNode_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data<class_GLTFNode_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,12 +95,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **camera** = ``-1`` +:ref:`int<class_int>` **camera** = ``-1`` :ref:`🔗<class_GLTFNode_property_camera>` .. rst-class:: classref-property-setget -- void **set_camera** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_camera** **(** **)** +- |void| **set_camera**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_camera**\ (\ ) If this GLTF node is a camera, the index of the :ref:`GLTFCamera<class_GLTFCamera>` in the :ref:`GLTFState<class_GLTFState>` that describes the camera's properties. If -1, this node is not a camera. @@ -108,14 +112,16 @@ If this GLTF node is a camera, the index of the :ref:`GLTFCamera<class_GLTFCamer .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **children** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **children** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFNode_property_children>` .. rst-class:: classref-property-setget -- void **set_children** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_children** **(** **)** +- |void| **set_children**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_children**\ (\ ) + +The indices of the child nodes in the :ref:`GLTFState<class_GLTFState>`. If this GLTF node has no children, this will be an empty array. -The indices of the children nodes in the :ref:`GLTFState<class_GLTFState>`. If this GLTF node has no children, this will be an empty array. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. .. rst-class:: classref-item-separator @@ -125,12 +131,12 @@ The indices of the children nodes in the :ref:`GLTFState<class_GLTFState>`. If t .. rst-class:: classref-property -:ref:`int<class_int>` **height** = ``-1`` +:ref:`int<class_int>` **height** = ``-1`` :ref:`🔗<class_GLTFNode_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_height**\ (\ ) How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated. @@ -142,12 +148,12 @@ How deep into the node hierarchy this node is. A root node will have a height of .. rst-class:: classref-property -:ref:`int<class_int>` **light** = ``-1`` +:ref:`int<class_int>` **light** = ``-1`` :ref:`🔗<class_GLTFNode_property_light>` .. rst-class:: classref-property-setget -- void **set_light** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_light** **(** **)** +- |void| **set_light**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_light**\ (\ ) If this GLTF node is a light, the index of the :ref:`GLTFLight<class_GLTFLight>` in the :ref:`GLTFState<class_GLTFState>` that describes the light's properties. If -1, this node is not a light. @@ -159,12 +165,12 @@ If this GLTF node is a light, the index of the :ref:`GLTFLight<class_GLTFLight>` .. rst-class:: classref-property -:ref:`int<class_int>` **mesh** = ``-1`` +:ref:`int<class_int>` **mesh** = ``-1`` :ref:`🔗<class_GLTFNode_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_mesh**\ (\ ) If this GLTF node is a mesh, the index of the :ref:`GLTFMesh<class_GLTFMesh>` in the :ref:`GLTFState<class_GLTFState>` that describes the mesh's properties. If -1, this node is not a mesh. @@ -172,16 +178,33 @@ If this GLTF node is a mesh, the index of the :ref:`GLTFMesh<class_GLTFMesh>` in ---- +.. _class_GLTFNode_property_original_name: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **original_name** = ``""`` :ref:`🔗<class_GLTFNode_property_original_name>` + +.. rst-class:: classref-property-setget + +- |void| **set_original_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_name**\ (\ ) + +The original name of the node. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFNode_property_parent: .. rst-class:: classref-property -:ref:`int<class_int>` **parent** = ``-1`` +:ref:`int<class_int>` **parent** = ``-1`` :ref:`🔗<class_GLTFNode_property_parent>` .. rst-class:: classref-property-setget -- void **set_parent** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_parent** **(** **)** +- |void| **set_parent**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_parent**\ (\ ) The index of the parent node in the :ref:`GLTFState<class_GLTFState>`. If -1, this node is a root node. @@ -193,12 +216,12 @@ The index of the parent node in the :ref:`GLTFState<class_GLTFState>`. If -1, th .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_GLTFNode_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_position**\ (\ ) The position of the GLTF node relative to its parent. @@ -210,12 +233,12 @@ The position of the GLTF node relative to its parent. .. rst-class:: classref-property -:ref:`Quaternion<class_Quaternion>` **rotation** = ``Quaternion(0, 0, 0, 1)`` +:ref:`Quaternion<class_Quaternion>` **rotation** = ``Quaternion(0, 0, 0, 1)`` :ref:`🔗<class_GLTFNode_property_rotation>` .. rst-class:: classref-property-setget -- void **set_rotation** **(** :ref:`Quaternion<class_Quaternion>` value **)** -- :ref:`Quaternion<class_Quaternion>` **get_rotation** **(** **)** +- |void| **set_rotation**\ (\ value\: :ref:`Quaternion<class_Quaternion>`\ ) +- :ref:`Quaternion<class_Quaternion>` **get_rotation**\ (\ ) The rotation of the GLTF node relative to its parent. @@ -227,12 +250,12 @@ The rotation of the GLTF node relative to its parent. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)`` +:ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_GLTFNode_property_scale>` .. rst-class:: classref-property-setget -- void **set_scale** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_scale** **(** **)** +- |void| **set_scale**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_scale**\ (\ ) The scale of the GLTF node relative to its parent. @@ -244,12 +267,12 @@ The scale of the GLTF node relative to its parent. .. rst-class:: classref-property -:ref:`int<class_int>` **skeleton** = ``-1`` +:ref:`int<class_int>` **skeleton** = ``-1`` :ref:`🔗<class_GLTFNode_property_skeleton>` .. rst-class:: classref-property-setget -- void **set_skeleton** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_skeleton** **(** **)** +- |void| **set_skeleton**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_skeleton**\ (\ ) If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton<class_GLTFSkeleton>` in the :ref:`GLTFState<class_GLTFState>` that describes the skeleton's properties. If -1, this node does not have a skeleton. @@ -261,12 +284,12 @@ If this GLTF node has a skeleton, the index of the :ref:`GLTFSkeleton<class_GLTF .. rst-class:: classref-property -:ref:`int<class_int>` **skin** = ``-1`` +:ref:`int<class_int>` **skin** = ``-1`` :ref:`🔗<class_GLTFNode_property_skin>` .. rst-class:: classref-property-setget -- void **set_skin** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_skin** **(** **)** +- |void| **set_skin**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_skin**\ (\ ) If this GLTF node has a skin, the index of the :ref:`GLTFSkin<class_GLTFSkin>` in the :ref:`GLTFState<class_GLTFState>` that describes the skin's properties. If -1, this node does not have a skin. @@ -278,12 +301,12 @@ If this GLTF node has a skin, the index of the :ref:`GLTFSkin<class_GLTFSkin>` i .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **xform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **xform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_GLTFNode_property_xform>` .. rst-class:: classref-property-setget -- void **set_xform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_xform** **(** **)** +- |void| **set_xform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_xform**\ (\ ) The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. @@ -300,7 +323,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_additional_data** **(** :ref:`StringName<class_StringName>` extension_name **)** +:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFNode_method_get_additional_data>` Gets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. @@ -314,7 +337,7 @@ The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtensi .. rst-class:: classref-method -void **set_additional_data** **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** +|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFNode_method_set_additional_data>` Sets additional arbitrary data in this **GLTFNode** instance. This can be used to keep per-node state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. @@ -327,3 +350,4 @@ The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentE .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfphysicsbody.rst b/classes/class_gltfphysicsbody.rst index 750467d00a3..4eb9962f904 100644 --- a/classes/class_gltfphysicsbody.rst +++ b/classes/class_gltfphysicsbody.rst @@ -19,13 +19,15 @@ Represents a GLTF physics body. Description ----------- -Represents a physics body as defined by the ``OMI_physics_body`` GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +Represents a physics body as an intermediary between the ``OMI_physics_body`` GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. .. rst-class:: classref-introduction-group Tutorials --------- +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + - `OMI_physics_body GLTF extension <https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_body>`__ .. rst-class:: classref-reftable-group @@ -36,17 +38,23 @@ Properties .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_GLTFPhysicsBody_property_angular_velocity>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ - | :ref:`String<class_String>` | :ref:`body_type<class_GLTFPhysicsBody_property_body_type>` | ``"static"`` | - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`inertia_tensor<class_GLTFPhysicsBody_property_inertia_tensor>` | ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_GLTFPhysicsBody_property_linear_velocity>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ - | :ref:`float<class_float>` | :ref:`mass<class_GLTFPhysicsBody_property_mass>` | ``1.0`` | - +-------------------------------+--------------------------------------------------------------------------+--------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`angular_velocity<class_GLTFPhysicsBody_property_angular_velocity>` | ``Vector3(0, 0, 0)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`String<class_String>` | :ref:`body_type<class_GLTFPhysicsBody_property_body_type>` | ``"rigid"`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`center_of_mass<class_GLTFPhysicsBody_property_center_of_mass>` | ``Vector3(0, 0, 0)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`inertia_diagonal<class_GLTFPhysicsBody_property_inertia_diagonal>` | ``Vector3(0, 0, 0)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`inertia_orientation<class_GLTFPhysicsBody_property_inertia_orientation>` | ``Quaternion(0, 0, 0, 1)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`inertia_tensor<class_GLTFPhysicsBody_property_inertia_tensor>` | ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`linear_velocity<class_GLTFPhysicsBody_property_linear_velocity>` | ``Vector3(0, 0, 0)`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float<class_float>` | :ref:`mass<class_GLTFPhysicsBody_property_mass>` | ``1.0`` | + +-------------------------------------+--------------------------------------------------------------------------------+--------------------------------------+ .. rst-class:: classref-reftable-group @@ -56,15 +64,15 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` | :ref:`from_dictionary<class_GLTFPhysicsBody_method_from_dictionary>` **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` | :ref:`from_node<class_GLTFPhysicsBody_method_from_node>` **(** :ref:`CollisionObject3D<class_CollisionObject3D>` body_node **)** |static| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFPhysicsBody_method_to_dictionary>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CollisionObject3D<class_CollisionObject3D>` | :ref:`to_node<class_GLTFPhysicsBody_method_to_node>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` | :ref:`from_dictionary<class_GLTFPhysicsBody_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` | :ref:`from_node<class_GLTFPhysicsBody_method_from_node>`\ (\ body_node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) |static| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFPhysicsBody_method_to_dictionary>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CollisionObject3D<class_CollisionObject3D>` | :ref:`to_node<class_GLTFPhysicsBody_method_to_node>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_GLTFPhysicsBody_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ ) The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle". @@ -96,14 +104,67 @@ The angular velocity of the physics body, in radians per second. This is only us .. rst-class:: classref-property -:ref:`String<class_String>` **body_type** = ``"static"`` +:ref:`String<class_String>` **body_type** = ``"rigid"`` :ref:`🔗<class_GLTFPhysicsBody_property_body_type>` + +.. rst-class:: classref-property-setget + +- |void| **set_body_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_body_type**\ (\ ) + +The type of the body. When importing, this controls what type of :ref:`CollisionObject3D<class_CollisionObject3D>` node Godot should generate. Valid values are "static", "animatable", "character", "rigid", "vehicle", and "trigger". When exporting, this will be squashed down to one of "static", "kinematic", or "dynamic" motion types, or the "trigger" property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_center_of_mass: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **center_of_mass** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_GLTFPhysicsBody_property_center_of_mass>` + +.. rst-class:: classref-property-setget + +- |void| **set_center_of_mass**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_center_of_mass**\ (\ ) + +The center of mass of the body, in meters. This is in local space relative to the body. By default, the center of the mass is the body's origin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_inertia_diagonal: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **inertia_diagonal** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_GLTFPhysicsBody_property_inertia_diagonal>` + +.. rst-class:: classref-property-setget + +- |void| **set_inertia_diagonal**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_inertia_diagonal**\ (\ ) + +The inertia strength of the physics body, in kilogram meter squared (kg⋅m²). This represents the inertia around the principle axes, the diagonal of the inertia tensor matrix. This is only used when the body type is "rigid" or "vehicle". + +When converted to a Godot :ref:`RigidBody3D<class_RigidBody3D>` node, if this value is zero, then the inertia will be calculated automatically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsBody_property_inertia_orientation: + +.. rst-class:: classref-property + +:ref:`Quaternion<class_Quaternion>` **inertia_orientation** = ``Quaternion(0, 0, 0, 1)`` :ref:`🔗<class_GLTFPhysicsBody_property_inertia_orientation>` .. rst-class:: classref-property-setget -- void **set_body_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_body_type** **(** **)** +- |void| **set_inertia_orientation**\ (\ value\: :ref:`Quaternion<class_Quaternion>`\ ) +- :ref:`Quaternion<class_Quaternion>` **get_inertia_orientation**\ (\ ) -The type of the body. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger". +The inertia orientation of the physics body. This defines the rotation of the inertia's principle axes relative to the object's local axes. This is only used when the body type is "rigid" or "vehicle" and :ref:`inertia_diagonal<class_GLTFPhysicsBody_property_inertia_diagonal>` is set to a non-zero value. .. rst-class:: classref-item-separator @@ -113,12 +174,14 @@ The type of the body. Valid values are "static", "kinematic", "character", "rigi .. rst-class:: classref-property -:ref:`Basis<class_Basis>` **inertia_tensor** = ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` +:ref:`Basis<class_Basis>` **inertia_tensor** = ``Basis(0, 0, 0, 0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_GLTFPhysicsBody_property_inertia_tensor>` .. rst-class:: classref-property-setget -- void **set_inertia_tensor** **(** :ref:`Basis<class_Basis>` value **)** -- :ref:`Basis<class_Basis>` **get_inertia_tensor** **(** **)** +- |void| **set_inertia_tensor**\ (\ value\: :ref:`Basis<class_Basis>`\ ) +- :ref:`Basis<class_Basis>` **get_inertia_tensor**\ (\ ) + +**Deprecated:** This property may be changed or removed in future versions. The inertia tensor of the physics body, in kilogram meter squared (kg⋅m²). This is only used when the body type is "rigid" or "vehicle". @@ -132,12 +195,12 @@ When converted to a Godot :ref:`RigidBody3D<class_RigidBody3D>` node, if this va .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_GLTFPhysicsBody_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ ) The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle". @@ -149,12 +212,12 @@ The linear velocity of the physics body, in meters per second. This is only used .. rst-class:: classref-property -:ref:`float<class_float>` **mass** = ``1.0`` +:ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_GLTFPhysicsBody_property_mass>` .. rst-class:: classref-property-setget -- void **set_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mass** **(** **)** +- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mass**\ (\ ) The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle". @@ -171,9 +234,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` **from_dictionary** **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| +:ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFPhysicsBody_method_from_dictionary>` -Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary<class_Dictionary>`. +Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary<class_Dictionary>` in the ``OMI_physics_body`` GLTF extension format. .. rst-class:: classref-item-separator @@ -183,9 +246,9 @@ Creates a new GLTFPhysicsBody instance by parsing the given :ref:`Dictionary<cla .. rst-class:: classref-method -:ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` **from_node** **(** :ref:`CollisionObject3D<class_CollisionObject3D>` body_node **)** |static| +:ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>` **from_node**\ (\ body_node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) |static| :ref:`🔗<class_GLTFPhysicsBody_method_from_node>` -Create a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D<class_CollisionObject3D>` node. +Creates a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject3D<class_CollisionObject3D>` node. .. rst-class:: classref-item-separator @@ -195,9 +258,9 @@ Create a new GLTFPhysicsBody instance from the given Godot :ref:`CollisionObject .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **to_dictionary** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFPhysicsBody_method_to_dictionary>` -Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary<class_Dictionary>`. +Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary<class_Dictionary>`. It will be in the format expected by the ``OMI_physics_body`` GLTF extension. .. rst-class:: classref-item-separator @@ -207,7 +270,7 @@ Serializes this GLTFPhysicsBody instance into a :ref:`Dictionary<class_Dictionar .. rst-class:: classref-method -:ref:`CollisionObject3D<class_CollisionObject3D>` **to_node** **(** **)** |const| +:ref:`CollisionObject3D<class_CollisionObject3D>` **to_node**\ (\ ) |const| :ref:`🔗<class_GLTFPhysicsBody_method_to_node>` Converts this GLTFPhysicsBody instance into a Godot :ref:`CollisionObject3D<class_CollisionObject3D>` node. @@ -218,3 +281,4 @@ Converts this GLTFPhysicsBody instance into a Godot :ref:`CollisionObject3D<clas .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfphysicsshape.rst b/classes/class_gltfphysicsshape.rst index 5c9a8a08a5a..b0b5cb10d41 100644 --- a/classes/class_gltfphysicsshape.rst +++ b/classes/class_gltfphysicsshape.rst @@ -19,14 +19,18 @@ Represents a GLTF physics shape. Description ----------- -Represents a physics shape as defined by the ``OMI_collider`` GLTF extension. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +Represents a physics shape as defined by the ``OMI_physics_shape`` or ``OMI_collider`` GLTF extensions. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. .. rst-class:: classref-introduction-group Tutorials --------- -- `OMI_collider GLTF extension <https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_collider>`__ +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + +- `OMI_physics_shape GLTF extension <https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/OMI_physics_shape>`__ + +- `OMI_collider GLTF extension <https://github.com/omigroup/gltf-extensions/tree/main/extensions/2.0/Archived/OMI_collider>`__ .. rst-class:: classref-reftable-group @@ -60,15 +64,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` | :ref:`from_dictionary<class_GLTFPhysicsShape_method_from_dictionary>` **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` | :ref:`from_node<class_GLTFPhysicsShape_method_from_node>` **(** :ref:`CollisionShape3D<class_CollisionShape3D>` shape_node **)** |static| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFPhysicsShape_method_to_dictionary>` **(** **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CollisionShape3D<class_CollisionShape3D>` | :ref:`to_node<class_GLTFPhysicsShape_method_to_node>` **(** :ref:`bool<class_bool>` cache_shapes=false **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` | :ref:`from_dictionary<class_GLTFPhysicsShape_method_from_dictionary>`\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` | :ref:`from_node<class_GLTFPhysicsShape_method_from_node>`\ (\ shape_node\: :ref:`CollisionShape3D<class_CollisionShape3D>`\ ) |static| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` | :ref:`from_resource<class_GLTFPhysicsShape_method_from_resource>`\ (\ shape_resource\: :ref:`Shape3D<class_Shape3D>`\ ) |static| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`to_dictionary<class_GLTFPhysicsShape_method_to_dictionary>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CollisionShape3D<class_CollisionShape3D>` | :ref:`to_node<class_GLTFPhysicsShape_method_to_node>`\ (\ cache_shapes\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape3D<class_Shape3D>` | :ref:`to_resource<class_GLTFPhysicsShape_method_to_resource>`\ (\ cache_shapes\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **height** = ``2.0`` +:ref:`float<class_float>` **height** = ``2.0`` :ref:`🔗<class_GLTFPhysicsShape_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height**\ (\ ) The height of the shape, in meters. This is only used when the shape type is "capsule" or "cylinder". This value should not be negative, and for "capsule" it should be at least twice the radius. @@ -100,12 +108,12 @@ The height of the shape, in meters. This is only used when the shape type is "ca .. rst-class:: classref-property -:ref:`ImporterMesh<class_ImporterMesh>` **importer_mesh** +:ref:`ImporterMesh<class_ImporterMesh>` **importer_mesh** :ref:`🔗<class_GLTFPhysicsShape_property_importer_mesh>` .. rst-class:: classref-property-setget -- void **set_importer_mesh** **(** :ref:`ImporterMesh<class_ImporterMesh>` value **)** -- :ref:`ImporterMesh<class_ImporterMesh>` **get_importer_mesh** **(** **)** +- |void| **set_importer_mesh**\ (\ value\: :ref:`ImporterMesh<class_ImporterMesh>`\ ) +- :ref:`ImporterMesh<class_ImporterMesh>` **get_importer_mesh**\ (\ ) The :ref:`ImporterMesh<class_ImporterMesh>` resource of the shape. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). @@ -117,12 +125,12 @@ The :ref:`ImporterMesh<class_ImporterMesh>` resource of the shape. This is only .. rst-class:: classref-property -:ref:`bool<class_bool>` **is_trigger** = ``false`` +:ref:`bool<class_bool>` **is_trigger** = ``false`` :ref:`🔗<class_GLTFPhysicsShape_property_is_trigger>` .. rst-class:: classref-property-setget -- void **set_is_trigger** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_is_trigger** **(** **)** +- |void| **set_is_trigger**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_is_trigger**\ (\ ) If ``true``, indicates that this shape is a trigger. For Godot, this means that the shape should be a child of an Area3D node. @@ -136,12 +144,12 @@ This is the only variable not used in the :ref:`to_node<class_GLTFPhysicsShape_m .. rst-class:: classref-property -:ref:`int<class_int>` **mesh_index** = ``-1`` +:ref:`int<class_int>` **mesh_index** = ``-1`` :ref:`🔗<class_GLTFPhysicsShape_property_mesh_index>` .. rst-class:: classref-property-setget -- void **set_mesh_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_mesh_index** **(** **)** +- |void| **set_mesh_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_mesh_index**\ (\ ) The index of the shape's mesh in the GLTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). @@ -153,12 +161,12 @@ The index of the shape's mesh in the GLTF file. This is only used when the shape .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.5`` +:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_GLTFPhysicsShape_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The radius of the shape, in meters. This is only used when the shape type is "capsule", "cylinder", or "sphere". This value should not be negative. @@ -170,12 +178,12 @@ The radius of the shape, in meters. This is only used when the shape type is "ca .. rst-class:: classref-property -:ref:`String<class_String>` **shape_type** = ``""`` +:ref:`String<class_String>` **shape_type** = ``""`` :ref:`🔗<class_GLTFPhysicsShape_property_shape_type>` .. rst-class:: classref-property-setget -- void **set_shape_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_shape_type** **(** **)** +- |void| **set_shape_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_shape_type**\ (\ ) The type of shape this shape represents. Valid values are "box", "capsule", "cylinder", "sphere", "hull", and "trimesh". @@ -187,12 +195,12 @@ The type of shape this shape represents. Valid values are "box", "capsule", "cyl .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_GLTFPhysicsShape_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The size of the shape, in meters. This is only used when the shape type is "box", and it represents the "diameter" of the box. This value should not be negative. @@ -209,7 +217,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` **from_dictionary** **(** :ref:`Dictionary<class_Dictionary>` dictionary **)** |static| +:ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` **from_dictionary**\ (\ dictionary\: :ref:`Dictionary<class_Dictionary>`\ ) |static| :ref:`🔗<class_GLTFPhysicsShape_method_from_dictionary>` Creates a new GLTFPhysicsShape instance by parsing the given :ref:`Dictionary<class_Dictionary>`. @@ -221,9 +229,21 @@ Creates a new GLTFPhysicsShape instance by parsing the given :ref:`Dictionary<cl .. rst-class:: classref-method -:ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` **from_node** **(** :ref:`CollisionShape3D<class_CollisionShape3D>` shape_node **)** |static| +:ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` **from_node**\ (\ shape_node\: :ref:`CollisionShape3D<class_CollisionShape3D>`\ ) |static| :ref:`🔗<class_GLTFPhysicsShape_method_from_node>` + +Creates a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape3D<class_CollisionShape3D>` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsShape_method_from_resource: + +.. rst-class:: classref-method + +:ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>` **from_resource**\ (\ shape_resource\: :ref:`Shape3D<class_Shape3D>`\ ) |static| :ref:`🔗<class_GLTFPhysicsShape_method_from_resource>` -Create a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape3D<class_CollisionShape3D>` node. +Creates a new GLTFPhysicsShape instance from the given Godot :ref:`Shape3D<class_Shape3D>` resource. .. rst-class:: classref-item-separator @@ -233,9 +253,9 @@ Create a new GLTFPhysicsShape instance from the given Godot :ref:`CollisionShape .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **to_dictionary** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **to_dictionary**\ (\ ) |const| :ref:`🔗<class_GLTFPhysicsShape_method_to_dictionary>` -Serializes this GLTFPhysicsShape instance into a :ref:`Dictionary<class_Dictionary>`. +Serializes this GLTFPhysicsShape instance into a :ref:`Dictionary<class_Dictionary>` in the format defined by ``OMI_physics_shape``. .. rst-class:: classref-item-separator @@ -245,10 +265,22 @@ Serializes this GLTFPhysicsShape instance into a :ref:`Dictionary<class_Dictiona .. rst-class:: classref-method -:ref:`CollisionShape3D<class_CollisionShape3D>` **to_node** **(** :ref:`bool<class_bool>` cache_shapes=false **)** +:ref:`CollisionShape3D<class_CollisionShape3D>` **to_node**\ (\ cache_shapes\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_GLTFPhysicsShape_method_to_node>` Converts this GLTFPhysicsShape instance into a Godot :ref:`CollisionShape3D<class_CollisionShape3D>` node. +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFPhysicsShape_method_to_resource: + +.. rst-class:: classref-method + +:ref:`Shape3D<class_Shape3D>` **to_resource**\ (\ cache_shapes\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_GLTFPhysicsShape_method_to_resource>` + +Converts this GLTFPhysicsShape instance into a Godot :ref:`Shape3D<class_Shape3D>` resource. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -256,3 +288,4 @@ Converts this GLTFPhysicsShape instance into a Godot :ref:`CollisionShape3D<clas .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfskeleton.rst b/classes/class_gltfskeleton.rst index 1aa46311175..9951dfc18aa 100644 --- a/classes/class_gltfskeleton.rst +++ b/classes/class_gltfskeleton.rst @@ -16,6 +16,13 @@ GLTFSkeleton There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -38,21 +45,21 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BoneAttachment3D<class_BoneAttachment3D>` | :ref:`get_bone_attachment<class_GLTFSkeleton_method_get_bone_attachment>` **(** :ref:`int<class_int>` idx **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_attachment_count<class_GLTFSkeleton_method_get_bone_attachment_count>` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_godot_bone_node<class_GLTFSkeleton_method_get_godot_bone_node>` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_godot_skeleton<class_GLTFSkeleton_method_get_godot_skeleton>` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]<class_String>` | :ref:`get_unique_names<class_GLTFSkeleton_method_get_unique_names>` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_godot_bone_node<class_GLTFSkeleton_method_set_godot_bone_node>` **(** :ref:`Dictionary<class_Dictionary>` godot_bone_node **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_unique_names<class_GLTFSkeleton_method_set_unique_names>` **(** :ref:`String[]<class_String>` unique_names **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneAttachment3D<class_BoneAttachment3D>` | :ref:`get_bone_attachment<class_GLTFSkeleton_method_get_bone_attachment>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_attachment_count<class_GLTFSkeleton_method_get_bone_attachment_count>`\ (\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_godot_bone_node<class_GLTFSkeleton_method_get_godot_bone_node>`\ (\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_godot_skeleton<class_GLTFSkeleton_method_get_godot_skeleton>`\ (\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`get_unique_names<class_GLTFSkeleton_method_get_unique_names>`\ (\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_godot_bone_node<class_GLTFSkeleton_method_set_godot_bone_node>`\ (\ godot_bone_node\: :ref:`Dictionary<class_Dictionary>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unique_names<class_GLTFSkeleton_method_set_unique_names>`\ (\ unique_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,12 +74,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **joints** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **joints** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkeleton_property_joints>` .. rst-class:: classref-property-setget -- void **set_joints** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints** **(** **)** +- |void| **set_joints**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints**\ (\ ) .. container:: contribute @@ -86,12 +93,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **roots** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **roots** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkeleton_property_roots>` .. rst-class:: classref-property-setget -- void **set_roots** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_roots** **(** **)** +- |void| **set_roots**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_roots**\ (\ ) .. container:: contribute @@ -110,7 +117,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`BoneAttachment3D<class_BoneAttachment3D>` **get_bone_attachment** **(** :ref:`int<class_int>` idx **)** +:ref:`BoneAttachment3D<class_BoneAttachment3D>` **get_bone_attachment**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GLTFSkeleton_method_get_bone_attachment>` .. container:: contribute @@ -124,7 +131,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_attachment_count** **(** **)** +:ref:`int<class_int>` **get_bone_attachment_count**\ (\ ) :ref:`🔗<class_GLTFSkeleton_method_get_bone_attachment_count>` .. container:: contribute @@ -138,7 +145,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_godot_bone_node** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_godot_bone_node**\ (\ ) :ref:`🔗<class_GLTFSkeleton_method_get_godot_bone_node>` Returns a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. @@ -150,7 +157,7 @@ Returns a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to .. rst-class:: classref-method -:ref:`Skeleton3D<class_Skeleton3D>` **get_godot_skeleton** **(** **)** +:ref:`Skeleton3D<class_Skeleton3D>` **get_godot_skeleton**\ (\ ) :ref:`🔗<class_GLTFSkeleton_method_get_godot_skeleton>` .. container:: contribute @@ -164,7 +171,7 @@ Returns a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to .. rst-class:: classref-method -:ref:`String[]<class_String>` **get_unique_names** **(** **)** +:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **get_unique_names**\ (\ ) :ref:`🔗<class_GLTFSkeleton_method_get_unique_names>` .. container:: contribute @@ -178,7 +185,7 @@ Returns a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to .. rst-class:: classref-method -void **set_godot_bone_node** **(** :ref:`Dictionary<class_Dictionary>` godot_bone_node **)** +|void| **set_godot_bone_node**\ (\ godot_bone_node\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_GLTFSkeleton_method_set_godot_bone_node>` Sets a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. @@ -190,7 +197,7 @@ Sets a :ref:`Dictionary<class_Dictionary>` that maps skeleton bone indices to th .. rst-class:: classref-method -void **set_unique_names** **(** :ref:`String[]<class_String>` unique_names **)** +|void| **set_unique_names**\ (\ unique_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) :ref:`🔗<class_GLTFSkeleton_method_set_unique_names>` .. container:: contribute @@ -203,3 +210,4 @@ void **set_unique_names** **(** :ref:`String[]<class_String>` unique_names **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfskin.rst b/classes/class_gltfskin.rst index 868b66c4b0f..fabbff6adeb 100644 --- a/classes/class_gltfskin.rst +++ b/classes/class_gltfskin.rst @@ -16,6 +16,13 @@ GLTFSkin There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -48,19 +55,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D[]<class_Transform3D>` | :ref:`get_inverse_binds<class_GLTFSkin_method_get_inverse_binds>` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_joint_i_to_bone_i<class_GLTFSkin_method_get_joint_i_to_bone_i>` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_joint_i_to_name<class_GLTFSkin_method_get_joint_i_to_name>` **(** **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_inverse_binds<class_GLTFSkin_method_set_inverse_binds>` **(** :ref:`Transform3D[]<class_Transform3D>` inverse_binds **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_i_to_bone_i<class_GLTFSkin_method_set_joint_i_to_bone_i>` **(** :ref:`Dictionary<class_Dictionary>` joint_i_to_bone_i **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_i_to_name<class_GLTFSkin_method_set_joint_i_to_name>` **(** :ref:`Dictionary<class_Dictionary>` joint_i_to_name **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\] | :ref:`get_inverse_binds<class_GLTFSkin_method_get_inverse_binds>`\ (\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_joint_i_to_bone_i<class_GLTFSkin_method_get_joint_i_to_bone_i>`\ (\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_joint_i_to_name<class_GLTFSkin_method_get_joint_i_to_name>`\ (\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_inverse_binds<class_GLTFSkin_method_set_inverse_binds>`\ (\ inverse_binds\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\]\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_i_to_bone_i<class_GLTFSkin_method_set_joint_i_to_bone_i>`\ (\ joint_i_to_bone_i\: :ref:`Dictionary<class_Dictionary>`\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_i_to_name<class_GLTFSkin_method_set_joint_i_to_name>`\ (\ joint_i_to_name\: :ref:`Dictionary<class_Dictionary>`\ ) | + +--------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,12 +82,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Skin<class_Skin>` **godot_skin** +:ref:`Skin<class_Skin>` **godot_skin** :ref:`🔗<class_GLTFSkin_property_godot_skin>` .. rst-class:: classref-property-setget -- void **set_godot_skin** **(** :ref:`Skin<class_Skin>` value **)** -- :ref:`Skin<class_Skin>` **get_godot_skin** **(** **)** +- |void| **set_godot_skin**\ (\ value\: :ref:`Skin<class_Skin>`\ ) +- :ref:`Skin<class_Skin>` **get_godot_skin**\ (\ ) .. container:: contribute @@ -94,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **joints** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **joints** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkin_property_joints>` .. rst-class:: classref-property-setget -- void **set_joints** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints** **(** **)** +- |void| **set_joints**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints**\ (\ ) .. container:: contribute @@ -113,12 +120,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **joints_original** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **joints_original** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkin_property_joints_original>` .. rst-class:: classref-property-setget -- void **set_joints_original** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints_original** **(** **)** +- |void| **set_joints_original**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_joints_original**\ (\ ) .. container:: contribute @@ -132,12 +139,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **non_joints** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **non_joints** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkin_property_non_joints>` .. rst-class:: classref-property-setget -- void **set_non_joints** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_non_joints** **(** **)** +- |void| **set_non_joints**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_non_joints**\ (\ ) .. container:: contribute @@ -151,12 +158,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **roots** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **roots** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFSkin_property_roots>` .. rst-class:: classref-property-setget -- void **set_roots** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_roots** **(** **)** +- |void| **set_roots**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_roots**\ (\ ) .. container:: contribute @@ -170,12 +177,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **skeleton** = ``-1`` +:ref:`int<class_int>` **skeleton** = ``-1`` :ref:`🔗<class_GLTFSkin_property_skeleton>` .. rst-class:: classref-property-setget -- void **set_skeleton** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_skeleton** **(** **)** +- |void| **set_skeleton**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_skeleton**\ (\ ) .. container:: contribute @@ -189,12 +196,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **skin_root** = ``-1`` +:ref:`int<class_int>` **skin_root** = ``-1`` :ref:`🔗<class_GLTFSkin_property_skin_root>` .. rst-class:: classref-property-setget -- void **set_skin_root** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_skin_root** **(** **)** +- |void| **set_skin_root**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_skin_root**\ (\ ) .. container:: contribute @@ -213,7 +220,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Transform3D[]<class_Transform3D>` **get_inverse_binds** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\] **get_inverse_binds**\ (\ ) :ref:`🔗<class_GLTFSkin_method_get_inverse_binds>` .. container:: contribute @@ -227,7 +234,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_joint_i_to_bone_i** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_joint_i_to_bone_i**\ (\ ) :ref:`🔗<class_GLTFSkin_method_get_joint_i_to_bone_i>` .. container:: contribute @@ -241,7 +248,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_joint_i_to_name** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_joint_i_to_name**\ (\ ) :ref:`🔗<class_GLTFSkin_method_get_joint_i_to_name>` .. container:: contribute @@ -255,7 +262,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_inverse_binds** **(** :ref:`Transform3D[]<class_Transform3D>` inverse_binds **)** +|void| **set_inverse_binds**\ (\ inverse_binds\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\]\ ) :ref:`🔗<class_GLTFSkin_method_set_inverse_binds>` .. container:: contribute @@ -269,7 +276,7 @@ void **set_inverse_binds** **(** :ref:`Transform3D[]<class_Transform3D>` inverse .. rst-class:: classref-method -void **set_joint_i_to_bone_i** **(** :ref:`Dictionary<class_Dictionary>` joint_i_to_bone_i **)** +|void| **set_joint_i_to_bone_i**\ (\ joint_i_to_bone_i\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_GLTFSkin_method_set_joint_i_to_bone_i>` .. container:: contribute @@ -283,7 +290,7 @@ void **set_joint_i_to_bone_i** **(** :ref:`Dictionary<class_Dictionary>` joint_i .. rst-class:: classref-method -void **set_joint_i_to_name** **(** :ref:`Dictionary<class_Dictionary>` joint_i_to_name **)** +|void| **set_joint_i_to_name**\ (\ joint_i_to_name\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_GLTFSkin_method_set_joint_i_to_name>` .. container:: contribute @@ -296,3 +303,4 @@ void **set_joint_i_to_name** **(** :ref:`Dictionary<class_Dictionary>` joint_i_t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfspecgloss.rst b/classes/class_gltfspecgloss.rst index 9afdb215cb8..a5cb4f2d997 100644 --- a/classes/class_gltfspecgloss.rst +++ b/classes/class_gltfspecgloss.rst @@ -26,6 +26,8 @@ KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means th Tutorials --------- +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + - `KHR_materials_pbrSpecularGlossiness GLTF extension spec <https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness>`__ .. rst-class:: classref-reftable-group @@ -61,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **diffuse_factor** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **diffuse_factor** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_GLTFSpecGloss_property_diffuse_factor>` .. rst-class:: classref-property-setget -- void **set_diffuse_factor** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_diffuse_factor** **(** **)** +- |void| **set_diffuse_factor**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_diffuse_factor**\ (\ ) The reflected diffuse factor of the material. @@ -78,12 +80,12 @@ The reflected diffuse factor of the material. .. rst-class:: classref-property -:ref:`Image<class_Image>` **diffuse_img** +:ref:`Image<class_Image>` **diffuse_img** :ref:`🔗<class_GLTFSpecGloss_property_diffuse_img>` .. rst-class:: classref-property-setget -- void **set_diffuse_img** **(** :ref:`Image<class_Image>` value **)** -- :ref:`Image<class_Image>` **get_diffuse_img** **(** **)** +- |void| **set_diffuse_img**\ (\ value\: :ref:`Image<class_Image>`\ ) +- :ref:`Image<class_Image>` **get_diffuse_img**\ (\ ) The diffuse texture. @@ -95,12 +97,12 @@ The diffuse texture. .. rst-class:: classref-property -:ref:`float<class_float>` **gloss_factor** = ``1.0`` +:ref:`float<class_float>` **gloss_factor** = ``1.0`` :ref:`🔗<class_GLTFSpecGloss_property_gloss_factor>` .. rst-class:: classref-property-setget -- void **set_gloss_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gloss_factor** **(** **)** +- |void| **set_gloss_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gloss_factor**\ (\ ) The glossiness or smoothness of the material. @@ -112,12 +114,12 @@ The glossiness or smoothness of the material. .. rst-class:: classref-property -:ref:`Image<class_Image>` **spec_gloss_img** +:ref:`Image<class_Image>` **spec_gloss_img** :ref:`🔗<class_GLTFSpecGloss_property_spec_gloss_img>` .. rst-class:: classref-property-setget -- void **set_spec_gloss_img** **(** :ref:`Image<class_Image>` value **)** -- :ref:`Image<class_Image>` **get_spec_gloss_img** **(** **)** +- |void| **set_spec_gloss_img**\ (\ value\: :ref:`Image<class_Image>`\ ) +- :ref:`Image<class_Image>` **get_spec_gloss_img**\ (\ ) The specular-glossiness texture. @@ -129,12 +131,12 @@ The specular-glossiness texture. .. rst-class:: classref-property -:ref:`Color<class_Color>` **specular_factor** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **specular_factor** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_GLTFSpecGloss_property_specular_factor>` .. rst-class:: classref-property-setget -- void **set_specular_factor** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_specular_factor** **(** **)** +- |void| **set_specular_factor**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_specular_factor**\ (\ ) The specular RGB color of the material. The alpha channel is unused. @@ -145,3 +147,4 @@ The specular RGB color of the material. The alpha channel is unused. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltfstate.rst b/classes/class_gltfstate.rst index 649bd9493b6..9faaf6c653d 100644 --- a/classes/class_gltfstate.rst +++ b/classes/class_gltfstate.rst @@ -12,6 +12,8 @@ GLTFState **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` +**Inherited By:** :ref:`FBXState<class_FBXState>` + Represents all data of a GLTF file. .. rst-class:: classref-introduction-group @@ -23,6 +25,15 @@ Contains all nodes and resources of a GLTF file. This is used by :ref:`GLTFDocum GLTFState can be populated by :ref:`GLTFDocument<class_GLTFDocument>` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + +- `GLTF asset header schema <https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/asset.schema.json">`__ + .. rst-class:: classref-reftable-group Properties @@ -31,27 +42,35 @@ Properties .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`String<class_String>` | :ref:`base_path<class_GLTFState_property_base_path>` | ``""`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`PackedByteArray[]<class_PackedByteArray>` | :ref:`buffers<class_GLTFState_property_buffers>` | ``[]`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`bool<class_bool>` | :ref:`create_animations<class_GLTFState_property_create_animations>` | ``true`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`glb_data<class_GLTFState_property_glb_data>` | ``PackedByteArray()`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`json<class_GLTFState_property_json>` | ``{}`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`int<class_int>` | :ref:`major_version<class_GLTFState_property_major_version>` | ``0`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`int<class_int>` | :ref:`minor_version<class_GLTFState_property_minor_version>` | ``0`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`root_nodes<class_GLTFState_property_root_nodes>` | ``PackedInt32Array()`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`String<class_String>` | :ref:`scene_name<class_GLTFState_property_scene_name>` | ``""`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_named_skin_binds<class_GLTFState_property_use_named_skin_binds>` | ``false`` | - +-------------------------------------------------+----------------------------------------------------------------------------+------------------------+ + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`float<class_float>` | :ref:`bake_fps<class_GLTFState_property_bake_fps>` | ``30.0`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`String<class_String>` | :ref:`base_path<class_GLTFState_property_base_path>` | ``""`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\] | :ref:`buffers<class_GLTFState_property_buffers>` | ``[]`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`String<class_String>` | :ref:`copyright<class_GLTFState_property_copyright>` | ``""`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`bool<class_bool>` | :ref:`create_animations<class_GLTFState_property_create_animations>` | ``true`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`String<class_String>` | :ref:`filename<class_GLTFState_property_filename>` | ``""`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`glb_data<class_GLTFState_property_glb_data>` | ``PackedByteArray()`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`bool<class_bool>` | :ref:`import_as_skeleton_bones<class_GLTFState_property_import_as_skeleton_bones>` | ``false`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`json<class_GLTFState_property_json>` | ``{}`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`int<class_int>` | :ref:`major_version<class_GLTFState_property_major_version>` | ``0`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`int<class_int>` | :ref:`minor_version<class_GLTFState_property_minor_version>` | ``0`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`root_nodes<class_GLTFState_property_root_nodes>` | ``PackedInt32Array()`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`String<class_String>` | :ref:`scene_name<class_GLTFState_property_scene_name>` | ``""`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_named_skin_binds<class_GLTFState_property_use_named_skin_binds>` | ``false`` | + +----------------------------------------------------------------------------+------------------------------------------------------------------------------------+------------------------+ .. rst-class:: classref-reftable-group @@ -61,85 +80,87 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_used_extension<class_GLTFState_method_add_used_extension>` **(** :ref:`String<class_String>` extension_name, :ref:`bool<class_bool>` required **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFAccessor[]<class_GLTFAccessor>` | :ref:`get_accessors<class_GLTFState_method_get_accessors>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFState_method_get_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationPlayer<class_AnimationPlayer>` | :ref:`get_animation_player<class_GLTFState_method_get_animation_player>` **(** :ref:`int<class_int>` idx **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_animation_players_count<class_GLTFState_method_get_animation_players_count>` **(** :ref:`int<class_int>` idx **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFAnimation[]<class_GLTFAnimation>` | :ref:`get_animations<class_GLTFState_method_get_animations>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFBufferView[]<class_GLTFBufferView>` | :ref:`get_buffer_views<class_GLTFState_method_get_buffer_views>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFCamera[]<class_GLTFCamera>` | :ref:`get_cameras<class_GLTFState_method_get_cameras>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_handle_binary_image<class_GLTFState_method_get_handle_binary_image>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D[]<class_Texture2D>` | :ref:`get_images<class_GLTFState_method_get_images>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFLight[]<class_GLTFLight>` | :ref:`get_lights<class_GLTFState_method_get_lights>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material[]<class_Material>` | :ref:`get_materials<class_GLTFState_method_get_materials>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFMesh[]<class_GLTFMesh>` | :ref:`get_meshes<class_GLTFState_method_get_meshes>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_index<class_GLTFState_method_get_node_index>` **(** :ref:`Node<class_Node>` scene_node **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFNode[]<class_GLTFNode>` | :ref:`get_nodes<class_GLTFState_method_get_nodes>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_scene_node<class_GLTFState_method_get_scene_node>` **(** :ref:`int<class_int>` idx **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFSkeleton[]<class_GLTFSkeleton>` | :ref:`get_skeletons<class_GLTFState_method_get_skeletons>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFSkin[]<class_GLTFSkin>` | :ref:`get_skins<class_GLTFState_method_get_skins>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFTextureSampler[]<class_GLTFTextureSampler>` | :ref:`get_texture_samplers<class_GLTFState_method_get_texture_samplers>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GLTFTexture[]<class_GLTFTexture>` | :ref:`get_textures<class_GLTFState_method_get_textures>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]<class_String>` | :ref:`get_unique_animation_names<class_GLTFState_method_get_unique_animation_names>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]<class_String>` | :ref:`get_unique_names<class_GLTFState_method_get_unique_names>` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_accessors<class_GLTFState_method_set_accessors>` **(** :ref:`GLTFAccessor[]<class_GLTFAccessor>` accessors **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_additional_data<class_GLTFState_method_set_additional_data>` **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_animations<class_GLTFState_method_set_animations>` **(** :ref:`GLTFAnimation[]<class_GLTFAnimation>` animations **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_buffer_views<class_GLTFState_method_set_buffer_views>` **(** :ref:`GLTFBufferView[]<class_GLTFBufferView>` buffer_views **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cameras<class_GLTFState_method_set_cameras>` **(** :ref:`GLTFCamera[]<class_GLTFCamera>` cameras **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_handle_binary_image<class_GLTFState_method_set_handle_binary_image>` **(** :ref:`int<class_int>` method **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_images<class_GLTFState_method_set_images>` **(** :ref:`Texture2D[]<class_Texture2D>` images **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_lights<class_GLTFState_method_set_lights>` **(** :ref:`GLTFLight[]<class_GLTFLight>` lights **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_materials<class_GLTFState_method_set_materials>` **(** :ref:`Material[]<class_Material>` materials **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_meshes<class_GLTFState_method_set_meshes>` **(** :ref:`GLTFMesh[]<class_GLTFMesh>` meshes **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_nodes<class_GLTFState_method_set_nodes>` **(** :ref:`GLTFNode[]<class_GLTFNode>` nodes **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_skeletons<class_GLTFState_method_set_skeletons>` **(** :ref:`GLTFSkeleton[]<class_GLTFSkeleton>` skeletons **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_skins<class_GLTFState_method_set_skins>` **(** :ref:`GLTFSkin[]<class_GLTFSkin>` skins **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture_samplers<class_GLTFState_method_set_texture_samplers>` **(** :ref:`GLTFTextureSampler[]<class_GLTFTextureSampler>` texture_samplers **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_textures<class_GLTFState_method_set_textures>` **(** :ref:`GLTFTexture[]<class_GLTFTexture>` textures **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_unique_animation_names<class_GLTFState_method_set_unique_animation_names>` **(** :ref:`String[]<class_String>` unique_animation_names **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_unique_names<class_GLTFState_method_set_unique_names>` **(** :ref:`String[]<class_String>` unique_names **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_used_extension<class_GLTFState_method_add_used_extension>`\ (\ extension_name\: :ref:`String<class_String>`, required\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`append_data_to_buffers<class_GLTFState_method_append_data_to_buffers>`\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`, deduplication\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFAccessor<class_GLTFAccessor>`\] | :ref:`get_accessors<class_GLTFState_method_get_accessors>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFState_method_get_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationPlayer<class_AnimationPlayer>` | :ref:`get_animation_player<class_GLTFState_method_get_animation_player>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_animation_players_count<class_GLTFState_method_get_animation_players_count>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFAnimation<class_GLTFAnimation>`\] | :ref:`get_animations<class_GLTFState_method_get_animations>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFBufferView<class_GLTFBufferView>`\] | :ref:`get_buffer_views<class_GLTFState_method_get_buffer_views>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFCamera<class_GLTFCamera>`\] | :ref:`get_cameras<class_GLTFState_method_get_cameras>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_handle_binary_image<class_GLTFState_method_get_handle_binary_image>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] | :ref:`get_images<class_GLTFState_method_get_images>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFLight<class_GLTFLight>`\] | :ref:`get_lights<class_GLTFState_method_get_lights>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] | :ref:`get_materials<class_GLTFState_method_get_materials>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFMesh<class_GLTFMesh>`\] | :ref:`get_meshes<class_GLTFState_method_get_meshes>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_index<class_GLTFState_method_get_node_index>`\ (\ scene_node\: :ref:`Node<class_Node>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFNode<class_GLTFNode>`\] | :ref:`get_nodes<class_GLTFState_method_get_nodes>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_scene_node<class_GLTFState_method_get_scene_node>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFSkeleton<class_GLTFSkeleton>`\] | :ref:`get_skeletons<class_GLTFState_method_get_skeletons>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFSkin<class_GLTFSkin>`\] | :ref:`get_skins<class_GLTFState_method_get_skins>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFTextureSampler<class_GLTFTextureSampler>`\] | :ref:`get_texture_samplers<class_GLTFState_method_get_texture_samplers>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`GLTFTexture<class_GLTFTexture>`\] | :ref:`get_textures<class_GLTFState_method_get_textures>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`get_unique_animation_names<class_GLTFState_method_get_unique_animation_names>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`String<class_String>`\] | :ref:`get_unique_names<class_GLTFState_method_get_unique_names>`\ (\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_accessors<class_GLTFState_method_set_accessors>`\ (\ accessors\: :ref:`Array<class_Array>`\[:ref:`GLTFAccessor<class_GLTFAccessor>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_data<class_GLTFState_method_set_additional_data>`\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animations<class_GLTFState_method_set_animations>`\ (\ animations\: :ref:`Array<class_Array>`\[:ref:`GLTFAnimation<class_GLTFAnimation>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_buffer_views<class_GLTFState_method_set_buffer_views>`\ (\ buffer_views\: :ref:`Array<class_Array>`\[:ref:`GLTFBufferView<class_GLTFBufferView>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cameras<class_GLTFState_method_set_cameras>`\ (\ cameras\: :ref:`Array<class_Array>`\[:ref:`GLTFCamera<class_GLTFCamera>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_handle_binary_image<class_GLTFState_method_set_handle_binary_image>`\ (\ method\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_images<class_GLTFState_method_set_images>`\ (\ images\: :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_lights<class_GLTFState_method_set_lights>`\ (\ lights\: :ref:`Array<class_Array>`\[:ref:`GLTFLight<class_GLTFLight>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_materials<class_GLTFState_method_set_materials>`\ (\ materials\: :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_meshes<class_GLTFState_method_set_meshes>`\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`GLTFMesh<class_GLTFMesh>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_nodes<class_GLTFState_method_set_nodes>`\ (\ nodes\: :ref:`Array<class_Array>`\[:ref:`GLTFNode<class_GLTFNode>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skeletons<class_GLTFState_method_set_skeletons>`\ (\ skeletons\: :ref:`Array<class_Array>`\[:ref:`GLTFSkeleton<class_GLTFSkeleton>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skins<class_GLTFState_method_set_skins>`\ (\ skins\: :ref:`Array<class_Array>`\[:ref:`GLTFSkin<class_GLTFSkin>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_samplers<class_GLTFState_method_set_texture_samplers>`\ (\ texture_samplers\: :ref:`Array<class_Array>`\[:ref:`GLTFTextureSampler<class_GLTFTextureSampler>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_textures<class_GLTFState_method_set_textures>`\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`GLTFTexture<class_GLTFTexture>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unique_animation_names<class_GLTFState_method_set_unique_animation_names>`\ (\ unique_animation_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unique_names<class_GLTFState_method_set_unique_names>`\ (\ unique_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) | + +----------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -154,7 +175,7 @@ Constants .. rst-class:: classref-constant -**HANDLE_BINARY_DISCARD_TEXTURES** = ``0`` +**HANDLE_BINARY_DISCARD_TEXTURES** = ``0`` :ref:`🔗<class_GLTFState_constant_HANDLE_BINARY_DISCARD_TEXTURES>` Discards all embedded textures and uses untextured materials. @@ -162,7 +183,7 @@ Discards all embedded textures and uses untextured materials. .. rst-class:: classref-constant -**HANDLE_BINARY_EXTRACT_TEXTURES** = ``1`` +**HANDLE_BINARY_EXTRACT_TEXTURES** = ``1`` :ref:`🔗<class_GLTFState_constant_HANDLE_BINARY_EXTRACT_TEXTURES>` Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime. @@ -170,7 +191,7 @@ Extracts embedded textures to be reimported and compressed. Editor only. Acts as .. rst-class:: classref-constant -**HANDLE_BINARY_EMBED_AS_BASISU** = ``2`` +**HANDLE_BINARY_EMBED_AS_BASISU** = ``2`` :ref:`🔗<class_GLTFState_constant_HANDLE_BINARY_EMBED_AS_BASISU>` Embeds textures VRAM compressed with Basis Universal into the generated scene. @@ -178,7 +199,7 @@ Embeds textures VRAM compressed with Basis Universal into the generated scene. .. rst-class:: classref-constant -**HANDLE_BINARY_EMBED_AS_UNCOMPRESSED** = ``3`` +**HANDLE_BINARY_EMBED_AS_UNCOMPRESSED** = ``3`` :ref:`🔗<class_GLTFState_constant_HANDLE_BINARY_EMBED_AS_UNCOMPRESSED>` Embeds textures compressed losslessly into the generated scene, matching old behavior. @@ -191,20 +212,35 @@ Embeds textures compressed losslessly into the generated scene, matching old beh Property Descriptions --------------------- -.. _class_GLTFState_property_base_path: +.. _class_GLTFState_property_bake_fps: .. rst-class:: classref-property -:ref:`String<class_String>` **base_path** = ``""`` +:ref:`float<class_float>` **bake_fps** = ``30.0`` :ref:`🔗<class_GLTFState_property_bake_fps>` .. rst-class:: classref-property-setget -- void **set_base_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_base_path** **(** **)** +- |void| **set_bake_fps**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bake_fps**\ (\ ) -.. container:: contribute +The baking fps of the animation for either import or export. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFState_property_base_path: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **base_path** = ``""`` :ref:`🔗<class_GLTFState_property_base_path>` + +.. rst-class:: classref-property-setget + +- |void| **set_base_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_base_path**\ (\ ) + +The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. .. rst-class:: classref-item-separator @@ -214,12 +250,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray[]<class_PackedByteArray>` **buffers** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\] **buffers** = ``[]`` :ref:`🔗<class_GLTFState_property_buffers>` .. rst-class:: classref-property-setget -- void **set_buffers** **(** :ref:`PackedByteArray[]<class_PackedByteArray>` value **)** -- :ref:`PackedByteArray[]<class_PackedByteArray>` **get_buffers** **(** **)** +- |void| **set_buffers**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\] **get_buffers**\ (\ ) .. container:: contribute @@ -229,16 +265,33 @@ Property Descriptions ---- +.. _class_GLTFState_property_copyright: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **copyright** = ``""`` :ref:`🔗<class_GLTFState_property_copyright>` + +.. rst-class:: classref-property-setget + +- |void| **set_copyright**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_copyright**\ (\ ) + +The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFState_property_create_animations: .. rst-class:: classref-property -:ref:`bool<class_bool>` **create_animations** = ``true`` +:ref:`bool<class_bool>` **create_animations** = ``true`` :ref:`🔗<class_GLTFState_property_create_animations>` .. rst-class:: classref-property-setget -- void **set_create_animations** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_create_animations** **(** **)** +- |void| **set_create_animations**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_create_animations**\ (\ ) .. container:: contribute @@ -248,39 +301,71 @@ Property Descriptions ---- +.. _class_GLTFState_property_filename: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **filename** = ``""`` :ref:`🔗<class_GLTFState_property_filename>` + +.. rst-class:: classref-property-setget + +- |void| **set_filename**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_filename**\ (\ ) + +The file name associated with this GLTF data. If it ends with ``.gltf``, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. + +.. rst-class:: classref-item-separator + +---- + .. _class_GLTFState_property_glb_data: .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **glb_data** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **glb_data** = ``PackedByteArray()`` :ref:`🔗<class_GLTFState_property_glb_data>` .. rst-class:: classref-property-setget -- void **set_glb_data** **(** :ref:`PackedByteArray<class_PackedByteArray>` value **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_glb_data** **(** **)** +- |void| **set_glb_data**\ (\ value\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_glb_data**\ (\ ) -.. container:: contribute +The binary buffer attached to a .glb file. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. .. rst-class:: classref-item-separator ---- -.. _class_GLTFState_property_json: +.. _class_GLTFState_property_import_as_skeleton_bones: .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **json** = ``{}`` +:ref:`bool<class_bool>` **import_as_skeleton_bones** = ``false`` :ref:`🔗<class_GLTFState_property_import_as_skeleton_bones>` .. rst-class:: classref-property-setget -- void **set_json** **(** :ref:`Dictionary<class_Dictionary>` value **)** -- :ref:`Dictionary<class_Dictionary>` **get_json** **(** **)** +- |void| **set_import_as_skeleton_bones**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_import_as_skeleton_bones**\ (\ ) -.. container:: contribute +True to force all GLTFNodes in the document to be bones of a single Skeleton3D godot node. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFState_property_json: + +.. rst-class:: classref-property + +:ref:`Dictionary<class_Dictionary>` **json** = ``{}`` :ref:`🔗<class_GLTFState_property_json>` + +.. rst-class:: classref-property-setget + +- |void| **set_json**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ ) +- :ref:`Dictionary<class_Dictionary>` **get_json**\ (\ ) + +The original raw JSON document corresponding to this GLTFState. .. rst-class:: classref-item-separator @@ -290,12 +375,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **major_version** = ``0`` +:ref:`int<class_int>` **major_version** = ``0`` :ref:`🔗<class_GLTFState_property_major_version>` .. rst-class:: classref-property-setget -- void **set_major_version** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_major_version** **(** **)** +- |void| **set_major_version**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_major_version**\ (\ ) .. container:: contribute @@ -309,12 +394,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **minor_version** = ``0`` +:ref:`int<class_int>` **minor_version** = ``0`` :ref:`🔗<class_GLTFState_property_minor_version>` .. rst-class:: classref-property-setget -- void **set_minor_version** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_minor_version** **(** **)** +- |void| **set_minor_version**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_minor_version**\ (\ ) .. container:: contribute @@ -328,15 +413,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **root_nodes** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **root_nodes** = ``PackedInt32Array()`` :ref:`🔗<class_GLTFState_property_root_nodes>` .. rst-class:: classref-property-setget -- void **set_root_nodes** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_root_nodes** **(** **)** +- |void| **set_root_nodes**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_root_nodes**\ (\ ) The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -345,12 +432,12 @@ The root nodes of the GLTF file. Typically, a GLTF file will only have one scene .. rst-class:: classref-property -:ref:`String<class_String>` **scene_name** = ``""`` +:ref:`String<class_String>` **scene_name** = ``""`` :ref:`🔗<class_GLTFState_property_scene_name>` .. rst-class:: classref-property-setget -- void **set_scene_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_scene_name** **(** **)** +- |void| **set_scene_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_scene_name**\ (\ ) The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. @@ -362,12 +449,12 @@ The name of the scene. When importing, if not specified, this will be the file n .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_named_skin_binds** = ``false`` +:ref:`bool<class_bool>` **use_named_skin_binds** = ``false`` :ref:`🔗<class_GLTFState_property_use_named_skin_binds>` .. rst-class:: classref-property-setget -- void **set_use_named_skin_binds** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_named_skin_binds** **(** **)** +- |void| **set_use_named_skin_binds**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_named_skin_binds**\ (\ ) .. container:: contribute @@ -386,9 +473,21 @@ Method Descriptions .. rst-class:: classref-method -void **add_used_extension** **(** :ref:`String<class_String>` extension_name, :ref:`bool<class_bool>` required **)** +|void| **add_used_extension**\ (\ extension_name\: :ref:`String<class_String>`, required\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GLTFState_method_add_used_extension>` + +Appends an extension to the list of extensions used by this GLTF file during serialization. If ``required`` is true, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post<class_GLTFDocumentExtension_private_method__export_post>`, as that stage is too late to add extensions. The final list is sorted alphabetically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFState_method_append_data_to_buffers: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **append_data_to_buffers**\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`, deduplication\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GLTFState_method_append_data_to_buffers>` -Appends an extension to the list of extensions used by this GLTF file during serialization. If ``required`` is true, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post<class_GLTFDocumentExtension_method__export_post>`, as that stage is too late to add extensions. The final list is sorted alphabetically. +Appends the given byte array data to the buffers and creates a :ref:`GLTFBufferView<class_GLTFBufferView>` for it. The index of the destination :ref:`GLTFBufferView<class_GLTFBufferView>` is returned. If ``deduplication`` is true, the buffers will first be searched for duplicate data, otherwise new bytes will always be appended. .. rst-class:: classref-item-separator @@ -398,7 +497,7 @@ Appends an extension to the list of extensions used by this GLTF file during ser .. rst-class:: classref-method -:ref:`GLTFAccessor[]<class_GLTFAccessor>` **get_accessors** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFAccessor<class_GLTFAccessor>`\] **get_accessors**\ (\ ) :ref:`🔗<class_GLTFState_method_get_accessors>` .. container:: contribute @@ -412,7 +511,7 @@ Appends an extension to the list of extensions used by this GLTF file during ser .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_additional_data** **(** :ref:`StringName<class_StringName>` extension_name **)** +:ref:`Variant<class_Variant>` **get_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GLTFState_method_get_additional_data>` Gets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. @@ -426,7 +525,7 @@ The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtensi .. rst-class:: classref-method -:ref:`AnimationPlayer<class_AnimationPlayer>` **get_animation_player** **(** :ref:`int<class_int>` idx **)** +:ref:`AnimationPlayer<class_AnimationPlayer>` **get_animation_player**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GLTFState_method_get_animation_player>` Returns the :ref:`AnimationPlayer<class_AnimationPlayer>` node with the given index. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer<class_AnimationPlayer>` nodes to GLTF animations. @@ -438,7 +537,7 @@ Returns the :ref:`AnimationPlayer<class_AnimationPlayer>` node with the given in .. rst-class:: classref-method -:ref:`int<class_int>` **get_animation_players_count** **(** :ref:`int<class_int>` idx **)** +:ref:`int<class_int>` **get_animation_players_count**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GLTFState_method_get_animation_players_count>` Returns the number of :ref:`AnimationPlayer<class_AnimationPlayer>` nodes in this **GLTFState**. These nodes are only used during the export process when converting Godot :ref:`AnimationPlayer<class_AnimationPlayer>` nodes to GLTF animations. @@ -450,7 +549,7 @@ Returns the number of :ref:`AnimationPlayer<class_AnimationPlayer>` nodes in thi .. rst-class:: classref-method -:ref:`GLTFAnimation[]<class_GLTFAnimation>` **get_animations** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFAnimation<class_GLTFAnimation>`\] **get_animations**\ (\ ) :ref:`🔗<class_GLTFState_method_get_animations>` Returns an array of all :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the GLTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer<class_AnimationPlayer>` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer<class_AnimationPlayer>` nodes. @@ -462,7 +561,7 @@ Returns an array of all :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the GLTF .. rst-class:: classref-method -:ref:`GLTFBufferView[]<class_GLTFBufferView>` **get_buffer_views** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFBufferView<class_GLTFBufferView>`\] **get_buffer_views**\ (\ ) :ref:`🔗<class_GLTFState_method_get_buffer_views>` .. container:: contribute @@ -476,7 +575,7 @@ Returns an array of all :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the GLTF .. rst-class:: classref-method -:ref:`GLTFCamera[]<class_GLTFCamera>` **get_cameras** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFCamera<class_GLTFCamera>`\] **get_cameras**\ (\ ) :ref:`🔗<class_GLTFState_method_get_cameras>` Returns an array of all :ref:`GLTFCamera<class_GLTFCamera>`\ s in the GLTF file. These are the cameras that the :ref:`GLTFNode.camera<class_GLTFNode_property_camera>` index refers to. @@ -488,7 +587,7 @@ Returns an array of all :ref:`GLTFCamera<class_GLTFCamera>`\ s in the GLTF file. .. rst-class:: classref-method -:ref:`int<class_int>` **get_handle_binary_image** **(** **)** +:ref:`int<class_int>` **get_handle_binary_image**\ (\ ) :ref:`🔗<class_GLTFState_method_get_handle_binary_image>` .. container:: contribute @@ -502,7 +601,7 @@ Returns an array of all :ref:`GLTFCamera<class_GLTFCamera>`\ s in the GLTF file. .. rst-class:: classref-method -:ref:`Texture2D[]<class_Texture2D>` **get_images** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] **get_images**\ (\ ) :ref:`🔗<class_GLTFState_method_get_images>` Gets the images of the GLTF file as an array of :ref:`Texture2D<class_Texture2D>`\ s. These are the images that the :ref:`GLTFTexture.src_image<class_GLTFTexture_property_src_image>` index refers to. @@ -514,7 +613,7 @@ Gets the images of the GLTF file as an array of :ref:`Texture2D<class_Texture2D> .. rst-class:: classref-method -:ref:`GLTFLight[]<class_GLTFLight>` **get_lights** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFLight<class_GLTFLight>`\] **get_lights**\ (\ ) :ref:`🔗<class_GLTFState_method_get_lights>` Returns an array of all :ref:`GLTFLight<class_GLTFLight>`\ s in the GLTF file. These are the lights that the :ref:`GLTFNode.light<class_GLTFNode_property_light>` index refers to. @@ -526,7 +625,7 @@ Returns an array of all :ref:`GLTFLight<class_GLTFLight>`\ s in the GLTF file. T .. rst-class:: classref-method -:ref:`Material[]<class_Material>` **get_materials** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\] **get_materials**\ (\ ) :ref:`🔗<class_GLTFState_method_get_materials>` .. container:: contribute @@ -540,7 +639,7 @@ Returns an array of all :ref:`GLTFLight<class_GLTFLight>`\ s in the GLTF file. T .. rst-class:: classref-method -:ref:`GLTFMesh[]<class_GLTFMesh>` **get_meshes** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFMesh<class_GLTFMesh>`\] **get_meshes**\ (\ ) :ref:`🔗<class_GLTFState_method_get_meshes>` Returns an array of all :ref:`GLTFMesh<class_GLTFMesh>`\ es in the GLTF file. These are the meshes that the :ref:`GLTFNode.mesh<class_GLTFNode_property_mesh>` index refers to. @@ -552,7 +651,7 @@ Returns an array of all :ref:`GLTFMesh<class_GLTFMesh>`\ es in the GLTF file. Th .. rst-class:: classref-method -:ref:`int<class_int>` **get_node_index** **(** :ref:`Node<class_Node>` scene_node **)** +:ref:`int<class_int>` **get_node_index**\ (\ scene_node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GLTFState_method_get_node_index>` Returns the index of the :ref:`GLTFNode<class_GLTFNode>` corresponding to this Godot scene node. This is the inverse of :ref:`get_scene_node<class_GLTFState_method_get_scene_node>`. Useful during the export process. @@ -566,7 +665,7 @@ Returns the index of the :ref:`GLTFNode<class_GLTFNode>` corresponding to this G .. rst-class:: classref-method -:ref:`GLTFNode[]<class_GLTFNode>` **get_nodes** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFNode<class_GLTFNode>`\] **get_nodes**\ (\ ) :ref:`🔗<class_GLTFState_method_get_nodes>` Returns an array of all :ref:`GLTFNode<class_GLTFNode>`\ s in the GLTF file. These are the nodes that :ref:`GLTFNode.children<class_GLTFNode_property_children>` and :ref:`root_nodes<class_GLTFState_property_root_nodes>` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. @@ -578,7 +677,7 @@ Returns an array of all :ref:`GLTFNode<class_GLTFNode>`\ s in the GLTF file. The .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_scene_node** **(** :ref:`int<class_int>` idx **)** +:ref:`Node<class_Node>` **get_scene_node**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GLTFState_method_get_scene_node>` Returns the Godot scene node that corresponds to the same index as the :ref:`GLTFNode<class_GLTFNode>` it was generated from. This is the inverse of :ref:`get_node_index<class_GLTFState_method_get_node_index>`. Useful during the import process. @@ -592,7 +691,7 @@ Returns the Godot scene node that corresponds to the same index as the :ref:`GLT .. rst-class:: classref-method -:ref:`GLTFSkeleton[]<class_GLTFSkeleton>` **get_skeletons** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFSkeleton<class_GLTFSkeleton>`\] **get_skeletons**\ (\ ) :ref:`🔗<class_GLTFState_method_get_skeletons>` Returns an array of all :ref:`GLTFSkeleton<class_GLTFSkeleton>`\ s in the GLTF file. These are the skeletons that the :ref:`GLTFNode.skeleton<class_GLTFNode_property_skeleton>` index refers to. @@ -604,7 +703,7 @@ Returns an array of all :ref:`GLTFSkeleton<class_GLTFSkeleton>`\ s in the GLTF f .. rst-class:: classref-method -:ref:`GLTFSkin[]<class_GLTFSkin>` **get_skins** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFSkin<class_GLTFSkin>`\] **get_skins**\ (\ ) :ref:`🔗<class_GLTFState_method_get_skins>` Returns an array of all :ref:`GLTFSkin<class_GLTFSkin>`\ s in the GLTF file. These are the skins that the :ref:`GLTFNode.skin<class_GLTFNode_property_skin>` index refers to. @@ -616,7 +715,7 @@ Returns an array of all :ref:`GLTFSkin<class_GLTFSkin>`\ s in the GLTF file. The .. rst-class:: classref-method -:ref:`GLTFTextureSampler[]<class_GLTFTextureSampler>` **get_texture_samplers** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFTextureSampler<class_GLTFTextureSampler>`\] **get_texture_samplers**\ (\ ) :ref:`🔗<class_GLTFState_method_get_texture_samplers>` Retrieves the array of texture samplers that are used by the textures contained in the GLTF. @@ -628,7 +727,7 @@ Retrieves the array of texture samplers that are used by the textures contained .. rst-class:: classref-method -:ref:`GLTFTexture[]<class_GLTFTexture>` **get_textures** **(** **)** +:ref:`Array<class_Array>`\[:ref:`GLTFTexture<class_GLTFTexture>`\] **get_textures**\ (\ ) :ref:`🔗<class_GLTFState_method_get_textures>` .. container:: contribute @@ -642,7 +741,7 @@ Retrieves the array of texture samplers that are used by the textures contained .. rst-class:: classref-method -:ref:`String[]<class_String>` **get_unique_animation_names** **(** **)** +:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **get_unique_animation_names**\ (\ ) :ref:`🔗<class_GLTFState_method_get_unique_animation_names>` Returns an array of unique animation names. This is only used during the import process. @@ -654,7 +753,7 @@ Returns an array of unique animation names. This is only used during the import .. rst-class:: classref-method -:ref:`String[]<class_String>` **get_unique_names** **(** **)** +:ref:`Array<class_Array>`\[:ref:`String<class_String>`\] **get_unique_names**\ (\ ) :ref:`🔗<class_GLTFState_method_get_unique_names>` Returns an array of unique node names. This is used in both the import process and export process. @@ -666,7 +765,7 @@ Returns an array of unique node names. This is used in both the import process a .. rst-class:: classref-method -void **set_accessors** **(** :ref:`GLTFAccessor[]<class_GLTFAccessor>` accessors **)** +|void| **set_accessors**\ (\ accessors\: :ref:`Array<class_Array>`\[:ref:`GLTFAccessor<class_GLTFAccessor>`\]\ ) :ref:`🔗<class_GLTFState_method_set_accessors>` .. container:: contribute @@ -680,7 +779,7 @@ void **set_accessors** **(** :ref:`GLTFAccessor[]<class_GLTFAccessor>` accessors .. rst-class:: classref-method -void **set_additional_data** **(** :ref:`StringName<class_StringName>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** +|void| **set_additional_data**\ (\ extension_name\: :ref:`StringName<class_StringName>`, additional_data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GLTFState_method_set_additional_data>` Sets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless. @@ -694,7 +793,7 @@ The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentE .. rst-class:: classref-method -void **set_animations** **(** :ref:`GLTFAnimation[]<class_GLTFAnimation>` animations **)** +|void| **set_animations**\ (\ animations\: :ref:`Array<class_Array>`\[:ref:`GLTFAnimation<class_GLTFAnimation>`\]\ ) :ref:`🔗<class_GLTFState_method_set_animations>` Sets the :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the state. When importing, these will be generated as animations in an :ref:`AnimationPlayer<class_AnimationPlayer>` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer<class_AnimationPlayer>` nodes. @@ -706,7 +805,7 @@ Sets the :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the state. When importi .. rst-class:: classref-method -void **set_buffer_views** **(** :ref:`GLTFBufferView[]<class_GLTFBufferView>` buffer_views **)** +|void| **set_buffer_views**\ (\ buffer_views\: :ref:`Array<class_Array>`\[:ref:`GLTFBufferView<class_GLTFBufferView>`\]\ ) :ref:`🔗<class_GLTFState_method_set_buffer_views>` .. container:: contribute @@ -720,7 +819,7 @@ void **set_buffer_views** **(** :ref:`GLTFBufferView[]<class_GLTFBufferView>` bu .. rst-class:: classref-method -void **set_cameras** **(** :ref:`GLTFCamera[]<class_GLTFCamera>` cameras **)** +|void| **set_cameras**\ (\ cameras\: :ref:`Array<class_Array>`\[:ref:`GLTFCamera<class_GLTFCamera>`\]\ ) :ref:`🔗<class_GLTFState_method_set_cameras>` Sets the :ref:`GLTFCamera<class_GLTFCamera>`\ s in the state. These are the cameras that the :ref:`GLTFNode.camera<class_GLTFNode_property_camera>` index refers to. @@ -732,7 +831,7 @@ Sets the :ref:`GLTFCamera<class_GLTFCamera>`\ s in the state. These are the came .. rst-class:: classref-method -void **set_handle_binary_image** **(** :ref:`int<class_int>` method **)** +|void| **set_handle_binary_image**\ (\ method\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GLTFState_method_set_handle_binary_image>` .. container:: contribute @@ -746,7 +845,7 @@ void **set_handle_binary_image** **(** :ref:`int<class_int>` method **)** .. rst-class:: classref-method -void **set_images** **(** :ref:`Texture2D[]<class_Texture2D>` images **)** +|void| **set_images**\ (\ images\: :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\]\ ) :ref:`🔗<class_GLTFState_method_set_images>` Sets the images in the state stored as an array of :ref:`Texture2D<class_Texture2D>`\ s. This can be used during export. These are the images that the :ref:`GLTFTexture.src_image<class_GLTFTexture_property_src_image>` index refers to. @@ -758,7 +857,7 @@ Sets the images in the state stored as an array of :ref:`Texture2D<class_Texture .. rst-class:: classref-method -void **set_lights** **(** :ref:`GLTFLight[]<class_GLTFLight>` lights **)** +|void| **set_lights**\ (\ lights\: :ref:`Array<class_Array>`\[:ref:`GLTFLight<class_GLTFLight>`\]\ ) :ref:`🔗<class_GLTFState_method_set_lights>` Sets the :ref:`GLTFLight<class_GLTFLight>`\ s in the state. These are the lights that the :ref:`GLTFNode.light<class_GLTFNode_property_light>` index refers to. @@ -770,7 +869,7 @@ Sets the :ref:`GLTFLight<class_GLTFLight>`\ s in the state. These are the lights .. rst-class:: classref-method -void **set_materials** **(** :ref:`Material[]<class_Material>` materials **)** +|void| **set_materials**\ (\ materials\: :ref:`Array<class_Array>`\[:ref:`Material<class_Material>`\]\ ) :ref:`🔗<class_GLTFState_method_set_materials>` .. container:: contribute @@ -784,7 +883,7 @@ void **set_materials** **(** :ref:`Material[]<class_Material>` materials **)** .. rst-class:: classref-method -void **set_meshes** **(** :ref:`GLTFMesh[]<class_GLTFMesh>` meshes **)** +|void| **set_meshes**\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`GLTFMesh<class_GLTFMesh>`\]\ ) :ref:`🔗<class_GLTFState_method_set_meshes>` Sets the :ref:`GLTFMesh<class_GLTFMesh>`\ es in the state. These are the meshes that the :ref:`GLTFNode.mesh<class_GLTFNode_property_mesh>` index refers to. @@ -796,7 +895,7 @@ Sets the :ref:`GLTFMesh<class_GLTFMesh>`\ es in the state. These are the meshes .. rst-class:: classref-method -void **set_nodes** **(** :ref:`GLTFNode[]<class_GLTFNode>` nodes **)** +|void| **set_nodes**\ (\ nodes\: :ref:`Array<class_Array>`\[:ref:`GLTFNode<class_GLTFNode>`\]\ ) :ref:`🔗<class_GLTFState_method_set_nodes>` Sets the :ref:`GLTFNode<class_GLTFNode>`\ s in the state. These are the nodes that :ref:`GLTFNode.children<class_GLTFNode_property_children>` and :ref:`root_nodes<class_GLTFState_property_root_nodes>` refer to. Some of the nodes set here may not be generated in the Godot scene, or may generate multiple Godot scene nodes. @@ -808,7 +907,7 @@ Sets the :ref:`GLTFNode<class_GLTFNode>`\ s in the state. These are the nodes th .. rst-class:: classref-method -void **set_skeletons** **(** :ref:`GLTFSkeleton[]<class_GLTFSkeleton>` skeletons **)** +|void| **set_skeletons**\ (\ skeletons\: :ref:`Array<class_Array>`\[:ref:`GLTFSkeleton<class_GLTFSkeleton>`\]\ ) :ref:`🔗<class_GLTFState_method_set_skeletons>` Sets the :ref:`GLTFSkeleton<class_GLTFSkeleton>`\ s in the state. These are the skeletons that the :ref:`GLTFNode.skeleton<class_GLTFNode_property_skeleton>` index refers to. @@ -820,7 +919,7 @@ Sets the :ref:`GLTFSkeleton<class_GLTFSkeleton>`\ s in the state. These are the .. rst-class:: classref-method -void **set_skins** **(** :ref:`GLTFSkin[]<class_GLTFSkin>` skins **)** +|void| **set_skins**\ (\ skins\: :ref:`Array<class_Array>`\[:ref:`GLTFSkin<class_GLTFSkin>`\]\ ) :ref:`🔗<class_GLTFState_method_set_skins>` Sets the :ref:`GLTFSkin<class_GLTFSkin>`\ s in the state. These are the skins that the :ref:`GLTFNode.skin<class_GLTFNode_property_skin>` index refers to. @@ -832,7 +931,7 @@ Sets the :ref:`GLTFSkin<class_GLTFSkin>`\ s in the state. These are the skins th .. rst-class:: classref-method -void **set_texture_samplers** **(** :ref:`GLTFTextureSampler[]<class_GLTFTextureSampler>` texture_samplers **)** +|void| **set_texture_samplers**\ (\ texture_samplers\: :ref:`Array<class_Array>`\[:ref:`GLTFTextureSampler<class_GLTFTextureSampler>`\]\ ) :ref:`🔗<class_GLTFState_method_set_texture_samplers>` Sets the array of texture samplers that are used by the textures contained in the GLTF. @@ -844,7 +943,7 @@ Sets the array of texture samplers that are used by the textures contained in th .. rst-class:: classref-method -void **set_textures** **(** :ref:`GLTFTexture[]<class_GLTFTexture>` textures **)** +|void| **set_textures**\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`GLTFTexture<class_GLTFTexture>`\]\ ) :ref:`🔗<class_GLTFState_method_set_textures>` .. container:: contribute @@ -858,7 +957,7 @@ void **set_textures** **(** :ref:`GLTFTexture[]<class_GLTFTexture>` textures **) .. rst-class:: classref-method -void **set_unique_animation_names** **(** :ref:`String[]<class_String>` unique_animation_names **)** +|void| **set_unique_animation_names**\ (\ unique_animation_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) :ref:`🔗<class_GLTFState_method_set_unique_animation_names>` Sets the unique animation names in the state. This is only used during the import process. @@ -870,7 +969,7 @@ Sets the unique animation names in the state. This is only used during the impor .. rst-class:: classref-method -void **set_unique_names** **(** :ref:`String[]<class_String>` unique_names **)** +|void| **set_unique_names**\ (\ unique_names\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\]\ ) :ref:`🔗<class_GLTFState_method_set_unique_names>` Sets the unique node names in the state. This is used in both the import process and export process. @@ -881,3 +980,4 @@ Sets the unique node names in the state. This is used in both the import process .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltftexture.rst b/classes/class_gltftexture.rst index d33b2264fa5..187d5364509 100644 --- a/classes/class_gltftexture.rst +++ b/classes/class_gltftexture.rst @@ -12,9 +12,14 @@ GLTFTexture **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +GLTFTexture represents a texture in a GLTF file. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group @@ -43,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **sampler** = ``-1`` +:ref:`int<class_int>` **sampler** = ``-1`` :ref:`🔗<class_GLTFTexture_property_sampler>` .. rst-class:: classref-property-setget -- void **set_sampler** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sampler** **(** **)** +- |void| **set_sampler**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sampler**\ (\ ) ID of the texture sampler to use when sampling the image. If -1, then the default texture sampler is used (linear filtering, and repeat wrapping in both axes). @@ -60,12 +65,12 @@ ID of the texture sampler to use when sampling the image. If -1, then the defaul .. rst-class:: classref-property -:ref:`int<class_int>` **src_image** = ``-1`` +:ref:`int<class_int>` **src_image** = ``-1`` :ref:`🔗<class_GLTFTexture_property_src_image>` .. rst-class:: classref-property-setget -- void **set_src_image** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_src_image** **(** **)** +- |void| **set_src_image**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_src_image**\ (\ ) The index of the image associated with this texture, see :ref:`GLTFState.get_images<class_GLTFState_method_get_images>`. If -1, then this texture does not have an image assigned. @@ -76,3 +81,4 @@ The index of the image associated with this texture, see :ref:`GLTFState.get_ima .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gltftexturesampler.rst b/classes/class_gltftexturesampler.rst index 9eebd5254e9..dad254a2c83 100644 --- a/classes/class_gltftexturesampler.rst +++ b/classes/class_gltftexturesampler.rst @@ -21,6 +21,13 @@ Description Represents a texture sampler as defined by the base GLTF spec. Texture samplers in GLTF specify how to sample data from the texture's base image, when rendering the texture on an object. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -52,12 +59,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **mag_filter** = ``9729`` +:ref:`int<class_int>` **mag_filter** = ``9729`` :ref:`🔗<class_GLTFTextureSampler_property_mag_filter>` .. rst-class:: classref-property-setget -- void **set_mag_filter** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_mag_filter** **(** **)** +- |void| **set_mag_filter**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_mag_filter**\ (\ ) Texture's magnification filter, used when texture appears larger on screen than the source image. @@ -69,12 +76,12 @@ Texture's magnification filter, used when texture appears larger on screen than .. rst-class:: classref-property -:ref:`int<class_int>` **min_filter** = ``9987`` +:ref:`int<class_int>` **min_filter** = ``9987`` :ref:`🔗<class_GLTFTextureSampler_property_min_filter>` .. rst-class:: classref-property-setget -- void **set_min_filter** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_min_filter** **(** **)** +- |void| **set_min_filter**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_min_filter**\ (\ ) Texture's minification filter, used when the texture appears smaller on screen than the source image. @@ -86,12 +93,12 @@ Texture's minification filter, used when the texture appears smaller on screen t .. rst-class:: classref-property -:ref:`int<class_int>` **wrap_s** = ``10497`` +:ref:`int<class_int>` **wrap_s** = ``10497`` :ref:`🔗<class_GLTFTextureSampler_property_wrap_s>` .. rst-class:: classref-property-setget -- void **set_wrap_s** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_wrap_s** **(** **)** +- |void| **set_wrap_s**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_wrap_s**\ (\ ) Wrapping mode to use for S-axis (horizontal) texture coordinates. @@ -103,12 +110,12 @@ Wrapping mode to use for S-axis (horizontal) texture coordinates. .. rst-class:: classref-property -:ref:`int<class_int>` **wrap_t** = ``10497`` +:ref:`int<class_int>` **wrap_t** = ``10497`` :ref:`🔗<class_GLTFTextureSampler_property_wrap_t>` .. rst-class:: classref-property-setget -- void **set_wrap_t** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_wrap_t** **(** **)** +- |void| **set_wrap_t**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_wrap_t**\ (\ ) Wrapping mode to use for T-axis (vertical) texture coordinates. @@ -119,3 +126,4 @@ Wrapping mode to use for T-axis (vertical) texture coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticles2d.rst b/classes/class_gpuparticles2d.rst index 354e4b03238..46f6cfa8562 100644 --- a/classes/class_gpuparticles2d.rst +++ b/classes/class_gpuparticles2d.rst @@ -12,7 +12,7 @@ GPUParticles2D **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -2D particle emitter. +A 2D particle emitter. .. rst-class:: classref-introduction-group @@ -23,7 +23,7 @@ Description Use the :ref:`process_material<class_GPUParticles2D_property_process_material>` property to add a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial<class_ShaderMaterial>` which will be applied to all particles. -2D particles can optionally collide with :ref:`LightOccluder2D<class_LightOccluder2D>` nodes (note: they don't collide with :ref:`PhysicsBody2D<class_PhysicsBody2D>` nodes). +2D particles can optionally collide with :ref:`LightOccluder2D<class_LightOccluder2D>`, but they don't collide with :ref:`PhysicsBody2D<class_PhysicsBody2D>` nodes. .. rst-class:: classref-introduction-group @@ -32,9 +32,9 @@ Tutorials - :doc:`Particle systems (2D) <../tutorials/2d/particle_systems_2d>` -- `2D Particles Demo <https://godotengine.org/asset-library/asset/118>`__ +- `2D Particles Demo <https://godotengine.org/asset-library/asset/2724>`__ -- `2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player) <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player) <https://godotengine.org/asset-library/asset/2712>`__ .. rst-class:: classref-reftable-group @@ -47,6 +47,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`int<class_int>` | :ref:`amount<class_GPUParticles2D_property_amount>` | ``8`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float<class_float>` | :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float<class_float>` | :ref:`collision_base_size<class_GPUParticles2D_property_collision_base_size>` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` | :ref:`draw_order<class_GPUParticles2D_property_draw_order>` | ``1`` | @@ -59,6 +61,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool<class_bool>` | :ref:`fract_delta<class_GPUParticles2D_property_fract_delta>` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float<class_float>` | :ref:`interp_to_end<class_GPUParticles2D_property_interp_to_end>` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool<class_bool>` | :ref:`interpolate<class_GPUParticles2D_property_interpolate>` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float<class_float>` | :ref:`lifetime<class_GPUParticles2D_property_lifetime>` | ``1.0`` | @@ -98,13 +102,15 @@ Methods .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`capture_rect<class_GPUParticles2D_method_capture_rect>` **(** **)** |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`emit_particle<class_GPUParticles2D_method_emit_particle>` **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`Vector2<class_Vector2>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart<class_GPUParticles2D_method_restart>` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`capture_rect<class_GPUParticles2D_method_capture_rect>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert_from_particles<class_GPUParticles2D_method_convert_from_particles>`\ (\ particles\: :ref:`Node<class_Node>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit_particle<class_GPUParticles2D_method_emit_particle>`\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, velocity\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, flags\: :ref:`int<class_int>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart<class_GPUParticles2D_method_restart>`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -119,11 +125,13 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_GPUParticles2D_signal_finished>` + +Emitted when all active particles have finished processing. To immediately restart the emission cycle, call :ref:`restart<class_GPUParticles2D_method_restart>`. -Emitted when all active particles have finished processing. When :ref:`one_shot<class_GPUParticles2D_property_one_shot>` is disabled, particles will process continuously, so this is never emitted. +Never emitted when :ref:`one_shot<class_GPUParticles2D_property_one_shot>` is disabled, as particles will be emitted and processed continuously. -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +\ **Note:** For :ref:`one_shot<class_GPUParticles2D_property_one_shot>` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting :ref:`emitting<class_GPUParticles2D_property_emitting>` to ``true`` will not restart the emission cycle. This delay is avoided by instead calling :ref:`restart<class_GPUParticles2D_method_restart>`. .. rst-class:: classref-section-separator @@ -138,7 +146,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawOrder**: +enum **DrawOrder**: :ref:`🔗<enum_GPUParticles2D_DrawOrder>` .. _class_GPUParticles2D_constant_DRAW_ORDER_INDEX: @@ -154,7 +162,7 @@ Particles are drawn in the order emitted. :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **DRAW_ORDER_LIFETIME** = ``1`` -Particles are drawn in order of remaining lifetime. +Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. .. _class_GPUParticles2D_constant_DRAW_ORDER_REVERSE_LIFETIME: @@ -162,7 +170,7 @@ Particles are drawn in order of remaining lifetime. :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. .. rst-class:: classref-item-separator @@ -172,7 +180,7 @@ Particles are drawn in order of remaining lifetime. .. rst-class:: classref-enumeration -enum **EmitFlags**: +enum **EmitFlags**: :ref:`🔗<enum_GPUParticles2D_EmitFlags>` .. _class_GPUParticles2D_constant_EMIT_FLAG_POSITION: @@ -227,14 +235,35 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **amount** = ``8`` +:ref:`int<class_int>` **amount** = ``8`` :ref:`🔗<class_GPUParticles2D_property_amount>` + +.. rst-class:: classref-property-setget + +- |void| **set_amount**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_amount**\ (\ ) + +The number of particles to emit in one emission cycle. The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` is decreased. + +\ **Note:** Changing this value will cause the particle system to restart. To avoid this, change :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GPUParticles2D_property_amount_ratio: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **amount_ratio** = ``1.0`` :ref:`🔗<class_GPUParticles2D_property_amount_ratio>` .. rst-class:: classref-property-setget -- void **set_amount** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_amount** **(** **)** +- |void| **set_amount_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_amount_ratio**\ (\ ) + +The ratio of particles that should actually be emitted. If set to a value lower than ``1.0``, this will set the amount of emitted particles throughout the lifetime to ``amount * amount_ratio``. Unlike changing :ref:`amount<class_GPUParticles2D_property_amount>`, changing :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` can be used to create effects that make the number of emitted particles vary over time. -Number of particles emitted in one emission cycle. +\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles2D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>`. If you don't intend to change the number of particles emitted while the particles are emitting, make sure :ref:`amount_ratio<class_GPUParticles2D_property_amount_ratio>` is set to ``1`` and change :ref:`amount<class_GPUParticles2D_property_amount>` to your liking instead. .. rst-class:: classref-item-separator @@ -244,14 +273,16 @@ Number of particles emitted in one emission cycle. .. rst-class:: classref-property -:ref:`float<class_float>` **collision_base_size** = ``1.0`` +:ref:`float<class_float>` **collision_base_size** = ``1.0`` :ref:`🔗<class_GPUParticles2D_property_collision_base_size>` .. rst-class:: classref-property-setget -- void **set_collision_base_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_collision_base_size** **(** **)** +- |void| **set_collision_base_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_collision_base_size**\ (\ ) -Multiplier for particle's collision radius. ``1.0`` corresponds to the size of the sprite. +Multiplier for particle's collision radius. ``1.0`` corresponds to the size of the sprite. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>`. + +\ **Note:** Particles always have a spherical collision shape. .. rst-class:: classref-item-separator @@ -261,12 +292,12 @@ Multiplier for particle's collision radius. ``1.0`` corresponds to the size of t .. rst-class:: classref-property -:ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **draw_order** = ``1`` +:ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **draw_order** = ``1`` :ref:`🔗<class_GPUParticles2D_property_draw_order>` .. rst-class:: classref-property-setget -- void **set_draw_order** **(** :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` value **)** -- :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **get_draw_order** **(** **)** +- |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>`\ ) +- :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` **get_draw_order**\ (\ ) Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` values. @@ -278,14 +309,18 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles2D_DrawOrder>` values .. rst-class:: classref-property -:ref:`bool<class_bool>` **emitting** = ``true`` +:ref:`bool<class_bool>` **emitting** = ``true`` :ref:`🔗<class_GPUParticles2D_property_emitting>` .. rst-class:: classref-property-setget -- void **set_emitting** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_emitting** **(** **)** +- |void| **set_emitting**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_emitting**\ (\ ) + +If ``true``, particles are being emitted. :ref:`emitting<class_GPUParticles2D_property_emitting>` can be used to start and stop particles from emitting. However, if :ref:`one_shot<class_GPUParticles2D_property_one_shot>` is ``true`` setting :ref:`emitting<class_GPUParticles2D_property_emitting>` to ``true`` will not restart the emission cycle unless all active particles have finished processing. Use the :ref:`finished<class_GPUParticles2D_signal_finished>` signal to be notified once all active particles finish processing. + +\ **Note:** For :ref:`one_shot<class_GPUParticles2D_property_one_shot>` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the :ref:`finished<class_GPUParticles2D_signal_finished>` signal during which setting this to ``true`` will not restart the emission cycle. -If ``true``, particles are being emitted. +\ **Tip:** If your :ref:`one_shot<class_GPUParticles2D_property_one_shot>` emitter needs to immediately restart emitting particles once :ref:`finished<class_GPUParticles2D_signal_finished>` signal is received, consider calling :ref:`restart<class_GPUParticles2D_method_restart>` instead of setting :ref:`emitting<class_GPUParticles2D_property_emitting>`. .. rst-class:: classref-item-separator @@ -295,12 +330,12 @@ If ``true``, particles are being emitted. .. rst-class:: classref-property -:ref:`float<class_float>` **explosiveness** = ``0.0`` +:ref:`float<class_float>` **explosiveness** = ``0.0`` :ref:`🔗<class_GPUParticles2D_property_explosiveness>` .. rst-class:: classref-property-setget -- void **set_explosiveness_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_explosiveness_ratio** **(** **)** +- |void| **set_explosiveness_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_explosiveness_ratio**\ (\ ) How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins. @@ -312,12 +347,12 @@ How rapidly particles in an emission cycle are emitted. If greater than ``0``, t .. rst-class:: classref-property -:ref:`int<class_int>` **fixed_fps** = ``30`` +:ref:`int<class_int>` **fixed_fps** = ``30`` :ref:`🔗<class_GPUParticles2D_property_fixed_fps>` .. rst-class:: classref-property-setget -- void **set_fixed_fps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fixed_fps** **(** **)** +- |void| **set_fixed_fps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fixed_fps**\ (\ ) The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. @@ -329,12 +364,12 @@ The particle system's frame rate is fixed to a value. For example, changing the .. rst-class:: classref-property -:ref:`bool<class_bool>` **fract_delta** = ``true`` +:ref:`bool<class_bool>` **fract_delta** = ``true`` :ref:`🔗<class_GPUParticles2D_property_fract_delta>` .. rst-class:: classref-property-setget -- void **set_fractional_delta** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_fractional_delta** **(** **)** +- |void| **set_fractional_delta**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_fractional_delta**\ (\ ) If ``true``, results in fractional delta calculation which has a smoother particles display effect. @@ -342,16 +377,35 @@ If ``true``, results in fractional delta calculation which has a smoother partic ---- +.. _class_GPUParticles2D_property_interp_to_end: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **interp_to_end** = ``0.0`` :ref:`🔗<class_GPUParticles2D_property_interp_to_end>` + +.. rst-class:: classref-property-setget + +- |void| **set_interp_to_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_interp_to_end**\ (\ ) + +Causes all the particles in this node to interpolate towards the end of their lifetime. + +\ **Note:** This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders. + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles2D_property_interpolate: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interpolate** = ``true`` +:ref:`bool<class_bool>` **interpolate** = ``true`` :ref:`🔗<class_GPUParticles2D_property_interpolate>` .. rst-class:: classref-property-setget -- void **set_interpolate** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_interpolate** **(** **)** +- |void| **set_interpolate**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_interpolate**\ (\ ) Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps<class_GPUParticles2D_property_fixed_fps>` is lower than the screen refresh rate. @@ -363,14 +417,14 @@ Enables particle interpolation, which makes the particle movement smoother when .. rst-class:: classref-property -:ref:`float<class_float>` **lifetime** = ``1.0`` +:ref:`float<class_float>` **lifetime** = ``1.0`` :ref:`🔗<class_GPUParticles2D_property_lifetime>` .. rst-class:: classref-property-setget -- void **set_lifetime** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_lifetime** **(** **)** +- |void| **set_lifetime**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lifetime**\ (\ ) -Amount of time each particle will exist. +The amount of time each particle will exist (in seconds). The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. .. rst-class:: classref-item-separator @@ -380,12 +434,12 @@ Amount of time each particle will exist. .. rst-class:: classref-property -:ref:`bool<class_bool>` **local_coords** = ``false`` +:ref:`bool<class_bool>` **local_coords** = ``false`` :ref:`🔗<class_GPUParticles2D_property_local_coords>` .. rst-class:: classref-property-setget -- void **set_use_local_coordinates** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_local_coordinates** **(** **)** +- |void| **set_use_local_coordinates**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_local_coordinates**\ (\ ) If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the **GPUParticles2D** node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the **GPUParticles2D** node (and its parents) when it is moved or rotated. @@ -397,12 +451,12 @@ If ``true``, particles use the parent node's coordinate space (known as local co .. rst-class:: classref-property -:ref:`bool<class_bool>` **one_shot** = ``false`` +:ref:`bool<class_bool>` **one_shot** = ``false`` :ref:`🔗<class_GPUParticles2D_property_one_shot>` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_one_shot**\ (\ ) If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end. @@ -414,12 +468,12 @@ If ``true``, only one emission cycle occurs. If set ``true`` during a cycle, emi .. rst-class:: classref-property -:ref:`float<class_float>` **preprocess** = ``0.0`` +:ref:`float<class_float>` **preprocess** = ``0.0`` :ref:`🔗<class_GPUParticles2D_property_preprocess>` .. rst-class:: classref-property-setget -- void **set_pre_process_time** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pre_process_time** **(** **)** +- |void| **set_pre_process_time**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pre_process_time**\ (\ ) Particle system starts as if it had already run for this many seconds. @@ -431,12 +485,12 @@ Particle system starts as if it had already run for this many seconds. .. rst-class:: classref-property -:ref:`Material<class_Material>` **process_material** +:ref:`Material<class_Material>` **process_material** :ref:`🔗<class_GPUParticles2D_property_process_material>` .. rst-class:: classref-property-setget -- void **set_process_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_process_material** **(** **)** +- |void| **set_process_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_process_material**\ (\ ) :ref:`Material<class_Material>` for processing particles. Can be a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` or a :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -448,12 +502,12 @@ Particle system starts as if it had already run for this many seconds. .. rst-class:: classref-property -:ref:`float<class_float>` **randomness** = ``0.0`` +:ref:`float<class_float>` **randomness** = ``0.0`` :ref:`🔗<class_GPUParticles2D_property_randomness>` .. rst-class:: classref-property-setget -- void **set_randomness_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_randomness_ratio** **(** **)** +- |void| **set_randomness_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_randomness_ratio**\ (\ ) Emission lifetime randomness ratio. @@ -465,12 +519,12 @@ Emission lifetime randomness ratio. .. rst-class:: classref-property -:ref:`float<class_float>` **speed_scale** = ``1.0`` +:ref:`float<class_float>` **speed_scale** = ``1.0`` :ref:`🔗<class_GPUParticles2D_property_speed_scale>` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_speed_scale**\ (\ ) Particle system's running speed scaling ratio. A value of ``0`` can be used to pause the particles. @@ -482,14 +536,16 @@ Particle system's running speed scaling ratio. A value of ``0`` can be used to p .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **sub_emitter** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **sub_emitter** = ``NodePath("")`` :ref:`🔗<class_GPUParticles2D_property_sub_emitter>` .. rst-class:: classref-property-setget -- void **set_sub_emitter** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_sub_emitter** **(** **)** +- |void| **set_sub_emitter**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_sub_emitter**\ (\ ) + +Path to another **GPUParticles2D** node that will be used as a subemitter (see :ref:`ParticleProcessMaterial.sub_emitter_mode<class_ParticleProcessMaterial_property_sub_emitter_mode>`). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. -The :ref:`NodePath<class_NodePath>` to the **GPUParticles2D** used for sub-emissions. +\ **Note:** When :ref:`sub_emitter<class_GPUParticles2D_property_sub_emitter>` is set, the target **GPUParticles2D** node will no longer emit particles on its own. .. rst-class:: classref-item-separator @@ -499,14 +555,16 @@ The :ref:`NodePath<class_NodePath>` to the **GPUParticles2D** used for sub-emiss .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_GPUParticles2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) + +Particle texture. If ``null``, particles will be squares with a size of 1×1 pixels. -Particle texture. If ``null``, particles will be squares. +\ **Note:** To use a flipbook texture, assign a new :ref:`CanvasItemMaterial<class_CanvasItemMaterial>` to the **GPUParticles2D**'s :ref:`CanvasItem.material<class_CanvasItem_property_material>` property, then enable :ref:`CanvasItemMaterial.particles_animation<class_CanvasItemMaterial_property_particles_animation>` and set :ref:`CanvasItemMaterial.particles_anim_h_frames<class_CanvasItemMaterial_property_particles_anim_h_frames>`, :ref:`CanvasItemMaterial.particles_anim_v_frames<class_CanvasItemMaterial_property_particles_anim_v_frames>`, and :ref:`CanvasItemMaterial.particles_anim_loop<class_CanvasItemMaterial_property_particles_anim_loop>` to match the flipbook texture. .. rst-class:: classref-item-separator @@ -516,12 +574,12 @@ Particle texture. If ``null``, particles will be squares. .. rst-class:: classref-property -:ref:`bool<class_bool>` **trail_enabled** = ``false`` +:ref:`bool<class_bool>` **trail_enabled** = ``false`` :ref:`🔗<class_GPUParticles2D_property_trail_enabled>` .. rst-class:: classref-property-setget -- void **set_trail_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_trail_enabled** **(** **)** +- |void| **set_trail_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_trail_enabled**\ (\ ) If ``true``, enables particle trails using a mesh skinning system. @@ -535,12 +593,12 @@ If ``true``, enables particle trails using a mesh skinning system. .. rst-class:: classref-property -:ref:`float<class_float>` **trail_lifetime** = ``0.3`` +:ref:`float<class_float>` **trail_lifetime** = ``0.3`` :ref:`🔗<class_GPUParticles2D_property_trail_lifetime>` .. rst-class:: classref-property-setget -- void **set_trail_lifetime** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_trail_lifetime** **(** **)** +- |void| **set_trail_lifetime**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_trail_lifetime**\ (\ ) The amount of time the particle's trail should represent (in seconds). Only effective if :ref:`trail_enabled<class_GPUParticles2D_property_trail_enabled>` is ``true``. @@ -552,12 +610,12 @@ The amount of time the particle's trail should represent (in seconds). Only effe .. rst-class:: classref-property -:ref:`int<class_int>` **trail_section_subdivisions** = ``4`` +:ref:`int<class_int>` **trail_section_subdivisions** = ``4`` :ref:`🔗<class_GPUParticles2D_property_trail_section_subdivisions>` .. rst-class:: classref-property-setget -- void **set_trail_section_subdivisions** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_trail_section_subdivisions** **(** **)** +- |void| **set_trail_section_subdivisions**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_trail_section_subdivisions**\ (\ ) The number of subdivisions to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also :ref:`trail_sections<class_GPUParticles2D_property_trail_sections>`. Only effective if :ref:`trail_enabled<class_GPUParticles2D_property_trail_enabled>` is ``true``. @@ -569,12 +627,12 @@ The number of subdivisions to use for the particle trail rendering. Higher value .. rst-class:: classref-property -:ref:`int<class_int>` **trail_sections** = ``8`` +:ref:`int<class_int>` **trail_sections** = ``8`` :ref:`🔗<class_GPUParticles2D_property_trail_sections>` .. rst-class:: classref-property-setget -- void **set_trail_sections** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_trail_sections** **(** **)** +- |void| **set_trail_sections**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_trail_sections**\ (\ ) The number of sections to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also :ref:`trail_section_subdivisions<class_GPUParticles2D_property_trail_section_subdivisions>`. Only effective if :ref:`trail_enabled<class_GPUParticles2D_property_trail_enabled>` is ``true``. @@ -586,12 +644,12 @@ The number of sections to use for the particle trail rendering. Higher values ca .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **visibility_rect** = ``Rect2(-100, -100, 200, 200)`` +:ref:`Rect2<class_Rect2>` **visibility_rect** = ``Rect2(-100, -100, 200, 200)`` :ref:`🔗<class_GPUParticles2D_property_visibility_rect>` .. rst-class:: classref-property-setget -- void **set_visibility_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_visibility_rect** **(** **)** +- |void| **set_visibility_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_visibility_rect**\ (\ ) The :ref:`Rect2<class_Rect2>` that determines the node's region which needs to be visible on screen for the particle system to be active. @@ -610,7 +668,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **capture_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **capture_rect**\ (\ ) |const| :ref:`🔗<class_GPUParticles2D_method_capture_rect>` Returns a rectangle containing the positions of all existing particles. @@ -620,14 +678,28 @@ Returns a rectangle containing the positions of all existing particles. ---- +.. _class_GPUParticles2D_method_convert_from_particles: + +.. rst-class:: classref-method + +|void| **convert_from_particles**\ (\ particles\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GPUParticles2D_method_convert_from_particles>` + +Sets this node's properties to match a given :ref:`CPUParticles2D<class_CPUParticles2D>` node. + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles2D_method_emit_particle: .. rst-class:: classref-method -void **emit_particle** **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`Vector2<class_Vector2>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)** +|void| **emit_particle**\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, velocity\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GPUParticles2D_method_emit_particle>` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags<enum_GPUParticles2D_EmitFlags>`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- @@ -636,9 +708,11 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom .. rst-class:: classref-method -void **restart** **(** **)** +|void| **restart**\ (\ ) :ref:`🔗<class_GPUParticles2D_method_restart>` + +Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the :ref:`finished<class_GPUParticles2D_signal_finished>` signal before calling. -Restarts all the existing particles. +\ **Note:** The :ref:`finished<class_GPUParticles2D_signal_finished>` signal is only emitted by :ref:`one_shot<class_GPUParticles2D_property_one_shot>` emitters. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -647,3 +721,4 @@ Restarts all the existing particles. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticles3d.rst b/classes/class_gpuparticles3d.rst index 35f87b533cd..524f13b68c8 100644 --- a/classes/class_gpuparticles3d.rst +++ b/classes/class_gpuparticles3d.rst @@ -12,7 +12,7 @@ GPUParticles3D **Inherits:** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -3D particle emitter. +A 3D particle emitter. .. rst-class:: classref-introduction-group @@ -21,16 +21,18 @@ Description 3D particle node used to create a variety of particle systems and effects. **GPUParticles3D** features an emitter that generates some number of particles at a given rate. -Use the ``process_material`` property to add a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial<class_ShaderMaterial>` which will be applied to all particles. +Use :ref:`process_material<class_GPUParticles3D_property_process_material>` to add a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial<class_ShaderMaterial>` which will be applied to all particles. .. rst-class:: classref-introduction-group Tutorials --------- +- :doc:`Particle systems (3D) <../tutorials/3d/particles/index>` + - :doc:`Controlling thousands of fish with Particles <../tutorials/performance/vertex_animation/controlling_thousands_of_fish>` -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -43,6 +45,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`int<class_int>` | :ref:`amount<class_GPUParticles3D_property_amount>` | ``8`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float<class_float>` | :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` | ``1.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`float<class_float>` | :ref:`collision_base_size<class_GPUParticles3D_property_collision_base_size>` | ``0.01`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` | :ref:`draw_order<class_GPUParticles3D_property_draw_order>` | ``0`` | @@ -67,6 +71,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`bool<class_bool>` | :ref:`fract_delta<class_GPUParticles3D_property_fract_delta>` | ``true`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float<class_float>` | :ref:`interp_to_end<class_GPUParticles3D_property_interp_to_end>` | ``0.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`bool<class_bool>` | :ref:`interpolate<class_GPUParticles3D_property_interpolate>` | ``true`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`float<class_float>` | :ref:`lifetime<class_GPUParticles3D_property_lifetime>` | ``1.0`` | @@ -102,17 +108,19 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`capture_aabb<class_GPUParticles3D_method_capture_aabb>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`emit_particle<class_GPUParticles3D_method_emit_particle>` **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mesh<class_Mesh>` | :ref:`get_draw_pass_mesh<class_GPUParticles3D_method_get_draw_pass_mesh>` **(** :ref:`int<class_int>` pass **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart<class_GPUParticles3D_method_restart>` **(** **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_draw_pass_mesh<class_GPUParticles3D_method_set_draw_pass_mesh>` **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`capture_aabb<class_GPUParticles3D_method_capture_aabb>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert_from_particles<class_GPUParticles3D_method_convert_from_particles>`\ (\ particles\: :ref:`Node<class_Node>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit_particle<class_GPUParticles3D_method_emit_particle>`\ (\ xform\: :ref:`Transform3D<class_Transform3D>`, velocity\: :ref:`Vector3<class_Vector3>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, flags\: :ref:`int<class_int>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh<class_Mesh>` | :ref:`get_draw_pass_mesh<class_GPUParticles3D_method_get_draw_pass_mesh>`\ (\ pass\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart<class_GPUParticles3D_method_restart>`\ (\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_draw_pass_mesh<class_GPUParticles3D_method_set_draw_pass_mesh>`\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -127,11 +135,13 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_GPUParticles3D_signal_finished>` + +Emitted when all active particles have finished processing. To immediately emit new particles, call :ref:`restart<class_GPUParticles3D_method_restart>`. -Emitted when all active particles have finished processing. When :ref:`one_shot<class_GPUParticles3D_property_one_shot>` is disabled, particles will process continuously, so this is never emitted. +Never emitted when :ref:`one_shot<class_GPUParticles3D_property_one_shot>` is disabled, as particles will be emitted and processed continuously. -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +\ **Note:** For :ref:`one_shot<class_GPUParticles3D_property_one_shot>` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting :ref:`emitting<class_GPUParticles3D_property_emitting>` to ``true`` will not restart the emission cycle. This delay is avoided by instead calling :ref:`restart<class_GPUParticles3D_method_restart>`. .. rst-class:: classref-section-separator @@ -146,7 +156,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawOrder**: +enum **DrawOrder**: :ref:`🔗<enum_GPUParticles3D_DrawOrder>` .. _class_GPUParticles3D_constant_DRAW_ORDER_INDEX: @@ -162,7 +172,7 @@ Particles are drawn in the order emitted. :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **DRAW_ORDER_LIFETIME** = ``1`` -Particles are drawn in order of remaining lifetime. +Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. .. _class_GPUParticles3D_constant_DRAW_ORDER_REVERSE_LIFETIME: @@ -170,7 +180,7 @@ Particles are drawn in order of remaining lifetime. :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. .. _class_GPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: @@ -188,7 +198,7 @@ Particles are drawn in order of depth. .. rst-class:: classref-enumeration -enum **EmitFlags**: +enum **EmitFlags**: :ref:`🔗<enum_GPUParticles3D_EmitFlags>` .. _class_GPUParticles3D_constant_EMIT_FLAG_POSITION: @@ -238,7 +248,7 @@ Particle starts with specified ``CUSTOM`` data. .. rst-class:: classref-enumeration -enum **TransformAlign**: +enum **TransformAlign**: :ref:`🔗<enum_GPUParticles3D_TransformAlign>` .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_DISABLED: @@ -246,6 +256,10 @@ enum **TransformAlign**: :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **TRANSFORM_ALIGN_DISABLED** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD: @@ -254,6 +268,10 @@ enum **TransformAlign**: :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **TRANSFORM_ALIGN_Z_BILLBOARD** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Y_TO_VELOCITY: @@ -262,6 +280,10 @@ enum **TransformAlign**: :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **TRANSFORM_ALIGN_Y_TO_VELOCITY** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_GPUParticles3D_constant_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: @@ -270,6 +292,10 @@ enum **TransformAlign**: :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -285,7 +311,7 @@ Constants .. rst-class:: classref-constant -**MAX_DRAW_PASSES** = ``4`` +**MAX_DRAW_PASSES** = ``4`` :ref:`🔗<class_GPUParticles3D_constant_MAX_DRAW_PASSES>` Maximum number of draw passes supported. @@ -302,14 +328,35 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **amount** = ``8`` +:ref:`int<class_int>` **amount** = ``8`` :ref:`🔗<class_GPUParticles3D_property_amount>` + +.. rst-class:: classref-property-setget + +- |void| **set_amount**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_amount**\ (\ ) + +The number of particles to emit in one emission cycle. The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` is decreased. + +\ **Note:** Changing this value will cause the particle system to restart. To avoid this, change :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GPUParticles3D_property_amount_ratio: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **amount_ratio** = ``1.0`` :ref:`🔗<class_GPUParticles3D_property_amount_ratio>` .. rst-class:: classref-property-setget -- void **set_amount** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_amount** **(** **)** +- |void| **set_amount_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_amount_ratio**\ (\ ) -Number of particles to emit. +The ratio of particles that should actually be emitted. If set to a value lower than ``1.0``, this will set the amount of emitted particles throughout the lifetime to ``amount * amount_ratio``. Unlike changing :ref:`amount<class_GPUParticles3D_property_amount>`, changing :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` can be used to create effects that make the number of emitted particles vary over time. + +\ **Note:** Reducing the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` has no performance benefit, since resources need to be allocated and processed for the total :ref:`amount<class_GPUParticles3D_property_amount>` of particles regardless of the :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>`. If you don't intend to change the number of particles emitted while the particles are emitting, make sure :ref:`amount_ratio<class_GPUParticles3D_property_amount_ratio>` is set to ``1`` and change :ref:`amount<class_GPUParticles3D_property_amount>` to your liking instead. .. rst-class:: classref-item-separator @@ -319,16 +366,16 @@ Number of particles to emit. .. rst-class:: classref-property -:ref:`float<class_float>` **collision_base_size** = ``0.01`` +:ref:`float<class_float>` **collision_base_size** = ``0.01`` :ref:`🔗<class_GPUParticles3D_property_collision_base_size>` .. rst-class:: classref-property-setget -- void **set_collision_base_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_collision_base_size** **(** **)** +- |void| **set_collision_base_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_collision_base_size**\ (\ ) -.. container:: contribute +The base diameter for particle collision in meters. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Particles always have a spherical collision shape. .. rst-class:: classref-item-separator @@ -338,15 +385,17 @@ Number of particles to emit. .. rst-class:: classref-property -:ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **draw_order** = ``0`` +:ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **draw_order** = ``0`` :ref:`🔗<class_GPUParticles3D_property_draw_order>` .. rst-class:: classref-property-setget -- void **set_draw_order** **(** :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` value **)** -- :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **get_draw_order** **(** **)** +- |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>`\ ) +- :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` **get_draw_order**\ (\ ) Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values. +\ **Note:** :ref:`DRAW_ORDER_INDEX<class_GPUParticles3D_constant_DRAW_ORDER_INDEX>` is the only option that supports motion vectors for effects like TAA. It is suggested to use this draw order if the particles are opaque to fix ghosting artifacts. + .. rst-class:: classref-item-separator ---- @@ -355,12 +404,12 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **draw_pass_1** +:ref:`Mesh<class_Mesh>` **draw_pass_1** :ref:`🔗<class_GPUParticles3D_property_draw_pass_1>` .. rst-class:: classref-property-setget -- void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** -- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const| +- |void| **set_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`\ ) |const| :ref:`Mesh<class_Mesh>` that is drawn for the first draw pass. @@ -372,12 +421,12 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **draw_pass_2** +:ref:`Mesh<class_Mesh>` **draw_pass_2** :ref:`🔗<class_GPUParticles3D_property_draw_pass_2>` .. rst-class:: classref-property-setget -- void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** -- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const| +- |void| **set_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`\ ) |const| :ref:`Mesh<class_Mesh>` that is drawn for the second draw pass. @@ -389,12 +438,12 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **draw_pass_3** +:ref:`Mesh<class_Mesh>` **draw_pass_3** :ref:`🔗<class_GPUParticles3D_property_draw_pass_3>` .. rst-class:: classref-property-setget -- void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** -- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const| +- |void| **set_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`\ ) |const| :ref:`Mesh<class_Mesh>` that is drawn for the third draw pass. @@ -406,12 +455,12 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **draw_pass_4** +:ref:`Mesh<class_Mesh>` **draw_pass_4** :ref:`🔗<class_GPUParticles3D_property_draw_pass_4>` .. rst-class:: classref-property-setget -- void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** -- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const| +- |void| **set_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`\ ) |const| :ref:`Mesh<class_Mesh>` that is drawn for the fourth draw pass. @@ -423,12 +472,12 @@ Particle draw order. Uses :ref:`DrawOrder<enum_GPUParticles3D_DrawOrder>` values .. rst-class:: classref-property -:ref:`int<class_int>` **draw_passes** = ``1`` +:ref:`int<class_int>` **draw_passes** = ``1`` :ref:`🔗<class_GPUParticles3D_property_draw_passes>` .. rst-class:: classref-property-setget -- void **set_draw_passes** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_draw_passes** **(** **)** +- |void| **set_draw_passes**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_draw_passes**\ (\ ) The number of draw passes when rendering particles. @@ -440,12 +489,12 @@ The number of draw passes when rendering particles. .. rst-class:: classref-property -:ref:`Skin<class_Skin>` **draw_skin** +:ref:`Skin<class_Skin>` **draw_skin** :ref:`🔗<class_GPUParticles3D_property_draw_skin>` .. rst-class:: classref-property-setget -- void **set_skin** **(** :ref:`Skin<class_Skin>` value **)** -- :ref:`Skin<class_Skin>` **get_skin** **(** **)** +- |void| **set_skin**\ (\ value\: :ref:`Skin<class_Skin>`\ ) +- :ref:`Skin<class_Skin>` **get_skin**\ (\ ) .. container:: contribute @@ -459,14 +508,18 @@ The number of draw passes when rendering particles. .. rst-class:: classref-property -:ref:`bool<class_bool>` **emitting** = ``true`` +:ref:`bool<class_bool>` **emitting** = ``true`` :ref:`🔗<class_GPUParticles3D_property_emitting>` .. rst-class:: classref-property-setget -- void **set_emitting** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_emitting** **(** **)** +- |void| **set_emitting**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_emitting**\ (\ ) + +If ``true``, particles are being emitted. :ref:`emitting<class_GPUParticles3D_property_emitting>` can be used to start and stop particles from emitting. However, if :ref:`one_shot<class_GPUParticles3D_property_one_shot>` is ``true`` setting :ref:`emitting<class_GPUParticles3D_property_emitting>` to ``true`` will not restart the emission cycle unless all active particles have finished processing. Use the :ref:`finished<class_GPUParticles3D_signal_finished>` signal to be notified once all active particles finish processing. + +\ **Note:** For :ref:`one_shot<class_GPUParticles3D_property_one_shot>` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the :ref:`finished<class_GPUParticles3D_signal_finished>` signal during which setting this to ``true`` will not restart the emission cycle. -If ``true``, particles are being emitted. +\ **Tip:** If your :ref:`one_shot<class_GPUParticles3D_property_one_shot>` emitter needs to immediately restart emitting particles once :ref:`finished<class_GPUParticles3D_signal_finished>` signal is received, consider calling :ref:`restart<class_GPUParticles3D_method_restart>` instead of setting :ref:`emitting<class_GPUParticles3D_property_emitting>`. .. rst-class:: classref-item-separator @@ -476,12 +529,12 @@ If ``true``, particles are being emitted. .. rst-class:: classref-property -:ref:`float<class_float>` **explosiveness** = ``0.0`` +:ref:`float<class_float>` **explosiveness** = ``0.0`` :ref:`🔗<class_GPUParticles3D_property_explosiveness>` .. rst-class:: classref-property-setget -- void **set_explosiveness_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_explosiveness_ratio** **(** **)** +- |void| **set_explosiveness_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_explosiveness_ratio**\ (\ ) Time ratio between each emission. If ``0``, particles are emitted continuously. If ``1``, all particles are emitted simultaneously. @@ -493,12 +546,12 @@ Time ratio between each emission. If ``0``, particles are emitted continuously. .. rst-class:: classref-property -:ref:`int<class_int>` **fixed_fps** = ``30`` +:ref:`int<class_int>` **fixed_fps** = ``30`` :ref:`🔗<class_GPUParticles3D_property_fixed_fps>` .. rst-class:: classref-property-setget -- void **set_fixed_fps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fixed_fps** **(** **)** +- |void| **set_fixed_fps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fixed_fps**\ (\ ) The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. @@ -510,12 +563,12 @@ The particle system's frame rate is fixed to a value. For example, changing the .. rst-class:: classref-property -:ref:`bool<class_bool>` **fract_delta** = ``true`` +:ref:`bool<class_bool>` **fract_delta** = ``true`` :ref:`🔗<class_GPUParticles3D_property_fract_delta>` .. rst-class:: classref-property-setget -- void **set_fractional_delta** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_fractional_delta** **(** **)** +- |void| **set_fractional_delta**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_fractional_delta**\ (\ ) If ``true``, results in fractional delta calculation which has a smoother particles display effect. @@ -523,16 +576,35 @@ If ``true``, results in fractional delta calculation which has a smoother partic ---- +.. _class_GPUParticles3D_property_interp_to_end: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **interp_to_end** = ``0.0`` :ref:`🔗<class_GPUParticles3D_property_interp_to_end>` + +.. rst-class:: classref-property-setget + +- |void| **set_interp_to_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_interp_to_end**\ (\ ) + +Causes all the particles in this node to interpolate towards the end of their lifetime. + +\ **Note:** This only works when used with a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`. It needs to be manually implemented for custom process shaders. + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles3D_property_interpolate: .. rst-class:: classref-property -:ref:`bool<class_bool>` **interpolate** = ``true`` +:ref:`bool<class_bool>` **interpolate** = ``true`` :ref:`🔗<class_GPUParticles3D_property_interpolate>` .. rst-class:: classref-property-setget -- void **set_interpolate** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_interpolate** **(** **)** +- |void| **set_interpolate**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_interpolate**\ (\ ) Enables particle interpolation, which makes the particle movement smoother when their :ref:`fixed_fps<class_GPUParticles3D_property_fixed_fps>` is lower than the screen refresh rate. @@ -544,14 +616,14 @@ Enables particle interpolation, which makes the particle movement smoother when .. rst-class:: classref-property -:ref:`float<class_float>` **lifetime** = ``1.0`` +:ref:`float<class_float>` **lifetime** = ``1.0`` :ref:`🔗<class_GPUParticles3D_property_lifetime>` .. rst-class:: classref-property-setget -- void **set_lifetime** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_lifetime** **(** **)** +- |void| **set_lifetime**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lifetime**\ (\ ) -Amount of time each particle will exist. +The amount of time each particle will exist (in seconds). The effective emission rate is ``(amount * amount_ratio) / lifetime`` particles per second. .. rst-class:: classref-item-separator @@ -561,12 +633,12 @@ Amount of time each particle will exist. .. rst-class:: classref-property -:ref:`bool<class_bool>` **local_coords** = ``false`` +:ref:`bool<class_bool>` **local_coords** = ``false`` :ref:`🔗<class_GPUParticles3D_property_local_coords>` .. rst-class:: classref-property-setget -- void **set_use_local_coordinates** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_local_coordinates** **(** **)** +- |void| **set_use_local_coordinates**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_local_coordinates**\ (\ ) If ``true``, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the **GPUParticles3D** node (and its parents) when it is moved or rotated. If ``false``, particles use global coordinates; they will not move or rotate along the **GPUParticles3D** node (and its parents) when it is moved or rotated. @@ -578,14 +650,14 @@ If ``true``, particles use the parent node's coordinate space (known as local co .. rst-class:: classref-property -:ref:`bool<class_bool>` **one_shot** = ``false`` +:ref:`bool<class_bool>` **one_shot** = ``false`` :ref:`🔗<class_GPUParticles3D_property_one_shot>` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_one_shot**\ (\ ) -If ``true``, only ``amount`` particles will be emitted. +If ``true``, only the number of particles equal to :ref:`amount<class_GPUParticles3D_property_amount>` will be emitted. .. rst-class:: classref-item-separator @@ -595,12 +667,12 @@ If ``true``, only ``amount`` particles will be emitted. .. rst-class:: classref-property -:ref:`float<class_float>` **preprocess** = ``0.0`` +:ref:`float<class_float>` **preprocess** = ``0.0`` :ref:`🔗<class_GPUParticles3D_property_preprocess>` .. rst-class:: classref-property-setget -- void **set_pre_process_time** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pre_process_time** **(** **)** +- |void| **set_pre_process_time**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **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. @@ -612,12 +684,12 @@ Amount of time to preprocess the particles before animation starts. Lets you sta .. rst-class:: classref-property -:ref:`Material<class_Material>` **process_material** +:ref:`Material<class_Material>` **process_material** :ref:`🔗<class_GPUParticles3D_property_process_material>` .. rst-class:: classref-property-setget -- void **set_process_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_process_material** **(** **)** +- |void| **set_process_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_process_material**\ (\ ) :ref:`Material<class_Material>` for processing particles. Can be a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` or a :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -629,12 +701,12 @@ Amount of time to preprocess the particles before animation starts. Lets you sta .. rst-class:: classref-property -:ref:`float<class_float>` **randomness** = ``0.0`` +:ref:`float<class_float>` **randomness** = ``0.0`` :ref:`🔗<class_GPUParticles3D_property_randomness>` .. rst-class:: classref-property-setget -- void **set_randomness_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_randomness_ratio** **(** **)** +- |void| **set_randomness_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_randomness_ratio**\ (\ ) Emission randomness ratio. @@ -646,12 +718,12 @@ Emission randomness ratio. .. rst-class:: classref-property -:ref:`float<class_float>` **speed_scale** = ``1.0`` +:ref:`float<class_float>` **speed_scale** = ``1.0`` :ref:`🔗<class_GPUParticles3D_property_speed_scale>` .. rst-class:: classref-property-setget -- void **set_speed_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_speed_scale** **(** **)** +- |void| **set_speed_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_speed_scale**\ (\ ) Speed scaling ratio. A value of ``0`` can be used to pause the particles. @@ -663,16 +735,16 @@ Speed scaling ratio. A value of ``0`` can be used to pause the particles. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **sub_emitter** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **sub_emitter** = ``NodePath("")`` :ref:`🔗<class_GPUParticles3D_property_sub_emitter>` .. rst-class:: classref-property-setget -- void **set_sub_emitter** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_sub_emitter** **(** **)** +- |void| **set_sub_emitter**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_sub_emitter**\ (\ ) -.. container:: contribute +Path to another **GPUParticles3D** node that will be used as a subemitter (see :ref:`ParticleProcessMaterial.sub_emitter_mode<class_ParticleProcessMaterial_property_sub_emitter_mode>`). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** When :ref:`sub_emitter<class_GPUParticles3D_property_sub_emitter>` is set, the target **GPUParticles3D** node will no longer emit particles on its own. .. rst-class:: classref-item-separator @@ -682,12 +754,12 @@ Speed scaling ratio. A value of ``0`` can be used to pause the particles. .. rst-class:: classref-property -:ref:`bool<class_bool>` **trail_enabled** = ``false`` +:ref:`bool<class_bool>` **trail_enabled** = ``false`` :ref:`🔗<class_GPUParticles3D_property_trail_enabled>` .. rst-class:: classref-property-setget -- void **set_trail_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_trail_enabled** **(** **)** +- |void| **set_trail_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_trail_enabled**\ (\ ) If ``true``, enables particle trails using a mesh skinning system. Designed to work with :ref:`RibbonTrailMesh<class_RibbonTrailMesh>` and :ref:`TubeTrailMesh<class_TubeTrailMesh>`. @@ -703,12 +775,12 @@ If ``true``, enables particle trails using a mesh skinning system. Designed to w .. rst-class:: classref-property -:ref:`float<class_float>` **trail_lifetime** = ``0.3`` +:ref:`float<class_float>` **trail_lifetime** = ``0.3`` :ref:`🔗<class_GPUParticles3D_property_trail_lifetime>` .. rst-class:: classref-property-setget -- void **set_trail_lifetime** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_trail_lifetime** **(** **)** +- |void| **set_trail_lifetime**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_trail_lifetime**\ (\ ) The amount of time the particle's trail should represent (in seconds). Only effective if :ref:`trail_enabled<class_GPUParticles3D_property_trail_enabled>` is ``true``. @@ -720,12 +792,12 @@ The amount of time the particle's trail should represent (in seconds). Only effe .. rst-class:: classref-property -:ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **transform_align** = ``0`` +:ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **transform_align** = ``0`` :ref:`🔗<class_GPUParticles3D_property_transform_align>` .. rst-class:: classref-property-setget -- void **set_transform_align** **(** :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` value **)** -- :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **get_transform_align** **(** **)** +- |void| **set_transform_align**\ (\ value\: :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>`\ ) +- :ref:`TransformAlign<enum_GPUParticles3D_TransformAlign>` **get_transform_align**\ (\ ) .. container:: contribute @@ -739,17 +811,19 @@ The amount of time the particle's trail should represent (in seconds). Only effe .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **visibility_aabb** = ``AABB(-4, -4, -4, 8, 8, 8)`` +:ref:`AABB<class_AABB>` **visibility_aabb** = ``AABB(-4, -4, -4, 8, 8, 8)`` :ref:`🔗<class_GPUParticles3D_property_visibility_aabb>` .. rst-class:: classref-property-setget -- void **set_visibility_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_visibility_aabb** **(** **)** +- |void| **set_visibility_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_visibility_aabb**\ (\ ) -The :ref:`AABB<class_AABB>` that determines the node's region which needs to be visible on screen for the particle system to be active. +The :ref:`AABB<class_AABB>` that determines the node's region which needs to be visible on screen for the particle system to be active. :ref:`GeometryInstance3D.extra_cull_margin<class_GeometryInstance3D_property_extra_cull_margin>` is added on each of the AABB's axes. Particle collisions and attraction will only occur within this area. Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The :ref:`AABB<class_AABB>` can be grown via code or with the **Particles → Generate AABB** editor tool. +\ **Note:** :ref:`visibility_aabb<class_GPUParticles3D_property_visibility_aabb>` is overridden by :ref:`GeometryInstance3D.custom_aabb<class_GeometryInstance3D_property_custom_aabb>` if that property is set to a non-default value. + .. rst-class:: classref-section-separator ---- @@ -763,7 +837,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **capture_aabb** **(** **)** |const| +:ref:`AABB<class_AABB>` **capture_aabb**\ (\ ) |const| :ref:`🔗<class_GPUParticles3D_method_capture_aabb>` Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. @@ -771,14 +845,28 @@ Returns the axis-aligned bounding box that contains all the particles that are a ---- +.. _class_GPUParticles3D_method_convert_from_particles: + +.. rst-class:: classref-method + +|void| **convert_from_particles**\ (\ particles\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GPUParticles3D_method_convert_from_particles>` + +Sets this node's properties to match a given :ref:`CPUParticles3D<class_CPUParticles3D>` node. + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles3D_method_emit_particle: .. rst-class:: classref-method -void **emit_particle** **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` flags **)** +|void| **emit_particle**\ (\ xform\: :ref:`Transform3D<class_Transform3D>`, velocity\: :ref:`Vector3<class_Vector3>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GPUParticles3D_method_emit_particle>` Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom`` are applied depends on the value of ``flags``. See :ref:`EmitFlags<enum_GPUParticles3D_EmitFlags>`. +The default ParticleProcessMaterial will overwrite ``color`` and use the contents of ``custom`` as ``(rotation, age, animation, lifetime)``. + .. rst-class:: classref-item-separator ---- @@ -787,7 +875,7 @@ Emits a single particle. Whether ``xform``, ``velocity``, ``color`` and ``custom .. rst-class:: classref-method -:ref:`Mesh<class_Mesh>` **get_draw_pass_mesh** **(** :ref:`int<class_int>` pass **)** |const| +:ref:`Mesh<class_Mesh>` **get_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GPUParticles3D_method_get_draw_pass_mesh>` Returns the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``. @@ -799,9 +887,11 @@ Returns the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``. .. rst-class:: classref-method -void **restart** **(** **)** +|void| **restart**\ (\ ) :ref:`🔗<class_GPUParticles3D_method_restart>` + +Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the :ref:`finished<class_GPUParticles3D_signal_finished>` signal before calling. -Restarts the particle emission, clearing existing particles. +\ **Note:** The :ref:`finished<class_GPUParticles3D_signal_finished>` signal is only emitted by :ref:`one_shot<class_GPUParticles3D_property_one_shot>` emitters. .. rst-class:: classref-item-separator @@ -811,7 +901,7 @@ Restarts the particle emission, clearing existing particles. .. rst-class:: classref-method -void **set_draw_pass_mesh** **(** :ref:`int<class_int>` pass, :ref:`Mesh<class_Mesh>` mesh **)** +|void| **set_draw_pass_mesh**\ (\ pass\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) :ref:`🔗<class_GPUParticles3D_method_set_draw_pass_mesh>` Sets the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``. @@ -822,3 +912,4 @@ Sets the :ref:`Mesh<class_Mesh>` that is drawn at index ``pass``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlesattractor3d.rst b/classes/class_gpuparticlesattractor3d.rst index ac82e9798d2..1cb55fe99a0 100644 --- a/classes/class_gpuparticlesattractor3d.rst +++ b/classes/class_gpuparticlesattractor3d.rst @@ -14,7 +14,7 @@ GPUParticlesAttractor3D **Inherited By:** :ref:`GPUParticlesAttractorBox3D<class_GPUParticlesAttractorBox3D>`, :ref:`GPUParticlesAttractorSphere3D<class_GPUParticlesAttractorSphere3D>`, :ref:`GPUParticlesAttractorVectorField3D<class_GPUParticlesAttractorVectorField3D>` -Abstract class for 3D particle attractors affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +Abstract base class for 3D particle attractors. .. rst-class:: classref-introduction-group @@ -60,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **attenuation** = ``1.0`` +:ref:`float<class_float>` **attenuation** = ``1.0`` :ref:`🔗<class_GPUParticlesAttractor3D_property_attenuation>` .. rst-class:: classref-property-setget -- void **set_attenuation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_attenuation** **(** **)** +- |void| **set_attenuation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_attenuation**\ (\ ) The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. @@ -77,12 +77,12 @@ The particle attractor's attenuation. Higher values result in more gradual pushi .. rst-class:: classref-property -:ref:`int<class_int>` **cull_mask** = ``4294967295`` +:ref:`int<class_int>` **cull_mask** = ``4294967295`` :ref:`🔗<class_GPUParticlesAttractor3D_property_cull_mask>` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_cull_mask**\ (\ ) The particle rendering layers (:ref:`VisualInstance3D.layers<class_VisualInstance3D_property_layers>`) that will be affected by the attractor. By default, all particles are affected by an attractor. @@ -98,12 +98,12 @@ Particle attraction can also be disabled on a per-process material basis by sett .. rst-class:: classref-property -:ref:`float<class_float>` **directionality** = ``0.0`` +:ref:`float<class_float>` **directionality** = ``0.0`` :ref:`🔗<class_GPUParticlesAttractor3D_property_directionality>` .. rst-class:: classref-property-setget -- void **set_directionality** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_directionality** **(** **)** +- |void| **set_directionality**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_directionality**\ (\ ) Adjusts how directional the attractor is. At ``0.0``, the attractor is not directional at all: it will attract particles towards its center. At ``1.0``, the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if :ref:`strength<class_GPUParticlesAttractor3D_property_strength>` is negative). @@ -117,14 +117,14 @@ Adjusts how directional the attractor is. At ``0.0``, the attractor is not direc .. rst-class:: classref-property -:ref:`float<class_float>` **strength** = ``1.0`` +:ref:`float<class_float>` **strength** = ``1.0`` :ref:`🔗<class_GPUParticlesAttractor3D_property_strength>` .. rst-class:: classref-property-setget -- void **set_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_strength** **(** **)** +- |void| **set_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_strength**\ (\ ) -If :ref:`strength<class_GPUParticlesAttractor3D_property_strength>` is negative, particles will be pushed in the reverse direction. Particles will be pushed *away* from the attractor's origin if :ref:`directionality<class_GPUParticlesAttractor3D_property_directionality>` is ``0.0``, or towards local +Z if :ref:`directionality<class_GPUParticlesAttractor3D_property_directionality>` is greater than ``0.0``. +Adjusts the strength of the attractor. If :ref:`strength<class_GPUParticlesAttractor3D_property_strength>` is negative, particles will be pushed in the opposite direction. Particles will be pushed *away* from the attractor's origin if :ref:`directionality<class_GPUParticlesAttractor3D_property_directionality>` is ``0.0``, or towards local +Z if :ref:`directionality<class_GPUParticlesAttractor3D_property_directionality>` is greater than ``0.0``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -133,3 +133,4 @@ If :ref:`strength<class_GPUParticlesAttractor3D_property_strength>` is negative, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlesattractorbox3d.rst b/classes/class_gpuparticlesattractorbox3d.rst index 4529f82f8ae..64b42371c45 100644 --- a/classes/class_gpuparticlesattractorbox3d.rst +++ b/classes/class_gpuparticlesattractorbox3d.rst @@ -12,14 +12,16 @@ GPUParticlesAttractorBox3D **Inherits:** :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped attractor that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Box-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped attractor that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. + +Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. \ **Note:** Particle attractors only affect :ref:`GPUParticles3D<class_GPUParticles3D>`, not :ref:`CPUParticles3D<class_CPUParticles3D>`. @@ -48,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesAttractorBox3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The attractor box's size in 3D units. @@ -64,3 +66,4 @@ The attractor box's size in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlesattractorsphere3d.rst b/classes/class_gpuparticlesattractorsphere3d.rst index e9a8371e17d..a0199f2be49 100644 --- a/classes/class_gpuparticlesattractorsphere3d.rst +++ b/classes/class_gpuparticlesattractorsphere3d.rst @@ -12,14 +12,16 @@ GPUParticlesAttractorSphere3D **Inherits:** :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A spheroid-shaped attractor that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Ellipse-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A spheroid-shaped attractor that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. + +Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. \ **Note:** Particle attractors only affect :ref:`GPUParticles3D<class_GPUParticles3D>`, not :ref:`CPUParticles3D<class_CPUParticles3D>`. @@ -48,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``1.0`` +:ref:`float<class_float>` **radius** = ``1.0`` :ref:`🔗<class_GPUParticlesAttractorSphere3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The attractor sphere's radius in 3D units. @@ -66,3 +68,4 @@ The attractor sphere's radius in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlesattractorvectorfield3d.rst b/classes/class_gpuparticlesattractorvectorfield3d.rst index 139881f005f..25a122ef05a 100644 --- a/classes/class_gpuparticlesattractorvectorfield3d.rst +++ b/classes/class_gpuparticlesattractorvectorfield3d.rst @@ -12,17 +12,19 @@ GPUParticlesAttractorVectorField3D **Inherits:** :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Box-shaped 3D particle attractor with strength varying within the box, affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Unlike :ref:`GPUParticlesAttractorBox3D<class_GPUParticlesAttractorBox3D>`, **GPUParticlesAttractorVectorField3D** uses a :ref:`texture<class_GPUParticlesAttractorVectorField3D_property_texture>` to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. +Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. + \ **Note:** Particle attractors only affect :ref:`GPUParticles3D<class_GPUParticles3D>`, not :ref:`CPUParticles3D<class_CPUParticles3D>`. .. rst-class:: classref-reftable-group @@ -52,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesAttractorVectorField3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The size of the vector field box in 3D units. @@ -69,12 +71,12 @@ The size of the vector field box in 3D units. .. rst-class:: classref-property -:ref:`Texture3D<class_Texture3D>` **texture** +:ref:`Texture3D<class_Texture3D>` **texture** :ref:`🔗<class_GPUParticlesAttractorVectorField3D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture3D<class_Texture3D>` value **)** -- :ref:`Texture3D<class_Texture3D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ ) +- :ref:`Texture3D<class_Texture3D>` **get_texture**\ (\ ) The 3D texture to be used. Values are linearly interpolated between the texture's pixels. @@ -87,3 +89,4 @@ The 3D texture to be used. Values are linearly interpolated between the texture' .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlescollision3d.rst b/classes/class_gpuparticlescollision3d.rst index 557c015955c..30095ef457a 100644 --- a/classes/class_gpuparticlescollision3d.rst +++ b/classes/class_gpuparticlescollision3d.rst @@ -14,7 +14,7 @@ GPUParticlesCollision3D **Inherited By:** :ref:`GPUParticlesCollisionBox3D<class_GPUParticlesCollisionBox3D>`, :ref:`GPUParticlesCollisionHeightField3D<class_GPUParticlesCollisionHeightField3D>`, :ref:`GPUParticlesCollisionSDF3D<class_GPUParticlesCollisionSDF3D>`, :ref:`GPUParticlesCollisionSphere3D<class_GPUParticlesCollisionSphere3D>` -Abstract class for 3D particle collision shapes affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +Abstract base class for 3D particle collision shapes affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group @@ -23,7 +23,7 @@ Description Particle collision shapes can be used to make particles stop or bounce against them. -Particle collision shapes in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. +Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. Particle collision shapes can be temporarily disabled by hiding them. @@ -58,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **cull_mask** = ``4294967295`` +:ref:`int<class_int>` **cull_mask** = ``4294967295`` :ref:`🔗<class_GPUParticlesCollision3D_property_cull_mask>` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_cull_mask**\ (\ ) The particle rendering layers (:ref:`VisualInstance3D.layers<class_VisualInstance3D_property_layers>`) that will be affected by the collision shape. By default, all particles that have :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` set to :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>` will be affected by a collision shape. @@ -78,3 +78,4 @@ Particle attraction can also be disabled on a per-process material basis by sett .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlescollisionbox3d.rst b/classes/class_gpuparticlescollisionbox3d.rst index c0624ea0887..a335fba4955 100644 --- a/classes/class_gpuparticlescollisionbox3d.rst +++ b/classes/class_gpuparticlescollisionbox3d.rst @@ -12,14 +12,16 @@ GPUParticlesCollisionBox3D **Inherits:** :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. + +Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. \ **Note:** :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>` on the :ref:`GPUParticles3D<class_GPUParticles3D>`'s process material for collision to work. @@ -50,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesCollisionBox3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The collision box's size in 3D units. @@ -66,3 +68,4 @@ The collision box's size in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlescollisionheightfield3d.rst b/classes/class_gpuparticlescollisionheightfield3d.rst index 8722f06c541..da61e5ce4d6 100644 --- a/classes/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/class_gpuparticlescollisionheightfield3d.rst @@ -12,18 +12,18 @@ GPUParticlesCollisionHeightField3D **Inherits:** :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A real-time heightmap-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Real-time heightmap-shaped 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A real-time heightmap-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than :ref:`GPUParticlesCollisionSDF3D<class_GPUParticlesCollisionSDF3D>`, but it doesn't require a baking step. -\ **GPUParticlesCollisionHeightField3D** can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes **GPUParticlesCollisionHeightField3D** a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, since heightmaps cannot represent overhangs, **GPUParticlesCollisionHeightField3D** is not suited for indoor particle collision. +\ **GPUParticlesCollisionHeightField3D** can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes **GPUParticlesCollisionHeightField3D** a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, this class is limited since heightmaps cannot represent overhangs (e.g. indoors or caves). \ **Note:** :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` must be ``true`` on the :ref:`GPUParticles3D<class_GPUParticles3D>`'s process material for collision to work. @@ -60,7 +60,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Resolution**: +enum **Resolution**: :ref:`🔗<enum_GPUParticlesCollisionHeightField3D_Resolution>` .. _class_GPUParticlesCollisionHeightField3D_constant_RESOLUTION_256: @@ -126,7 +126,7 @@ Represents the size of the :ref:`Resolution<enum_GPUParticlesCollisionHeightFiel .. rst-class:: classref-enumeration -enum **UpdateMode**: +enum **UpdateMode**: :ref:`🔗<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` .. _class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_WHEN_MOVED: @@ -157,12 +157,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **follow_camera_enabled** = ``false`` +:ref:`bool<class_bool>` **follow_camera_enabled** = ``false`` :ref:`🔗<class_GPUParticlesCollisionHeightField3D_property_follow_camera_enabled>` .. rst-class:: classref-property-setget -- void **set_follow_camera_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_follow_camera_enabled** **(** **)** +- |void| **set_follow_camera_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_follow_camera_enabled**\ (\ ) If ``true``, the **GPUParticlesCollisionHeightField3D** will follow the current camera in global space. The **GPUParticlesCollisionHeightField3D** does not need to be a child of the :ref:`Camera3D<class_Camera3D>` node for this to work. @@ -176,12 +176,12 @@ Following the camera has a performance cost, as it will force the heightmap to u .. rst-class:: classref-property -:ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>` **resolution** = ``2`` +:ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>` **resolution** = ``2`` :ref:`🔗<class_GPUParticlesCollisionHeightField3D_property_resolution>` .. rst-class:: classref-property-setget -- void **set_resolution** **(** :ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>` value **)** -- :ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>` **get_resolution** **(** **)** +- |void| **set_resolution**\ (\ value\: :ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>`\ ) +- :ref:`Resolution<enum_GPUParticlesCollisionHeightField3D_Resolution>` **get_resolution**\ (\ ) Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If :ref:`update_mode<class_GPUParticlesCollisionHeightField3D_property_update_mode>` is :ref:`UPDATE_MODE_ALWAYS<class_GPUParticlesCollisionHeightField3D_constant_UPDATE_MODE_ALWAYS>`, consider using the lowest resolution possible. @@ -193,12 +193,12 @@ Higher resolutions can represent small details more accurately in large scenes, .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesCollisionHeightField3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The collision heightmap's size in 3D units. To improve heightmap quality, :ref:`size<class_GPUParticlesCollisionHeightField3D_property_size>` should be set as small as possible while covering the parts of the scene you need. @@ -210,12 +210,12 @@ The collision heightmap's size in 3D units. To improve heightmap quality, :ref:` .. rst-class:: classref-property -:ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` **update_mode** = ``0`` +:ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` **update_mode** = ``0`` :ref:`🔗<class_GPUParticlesCollisionHeightField3D_property_update_mode>` .. rst-class:: classref-property-setget -- void **set_update_mode** **(** :ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` value **)** -- :ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` **get_update_mode** **(** **)** +- |void| **set_update_mode**\ (\ value\: :ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>`\ ) +- :ref:`UpdateMode<enum_GPUParticlesCollisionHeightField3D_UpdateMode>` **get_update_mode**\ (\ ) The update policy to use for the generated heightmap. @@ -226,3 +226,4 @@ The update policy to use for the generated heightmap. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlescollisionsdf3d.rst b/classes/class_gpuparticlescollisionsdf3d.rst index 8f3ca73d272..4f31607bee1 100644 --- a/classes/class_gpuparticlescollisionsdf3d.rst +++ b/classes/class_gpuparticlescollisionsdf3d.rst @@ -12,14 +12,14 @@ GPUParticlesCollisionSDF3D **Inherits:** :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A baked signed distance field 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Baked signed distance field 3D particle attractor affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A baked signed distance field 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than :ref:`GPUParticlesCollisionHeightField3D<class_GPUParticlesCollisionHeightField3D>`, but it requires a baking step. @@ -59,11 +59,11 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_bake_mask_value<class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bake_mask_value<class_GPUParticlesCollisionSDF3D_method_set_bake_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_bake_mask_value<class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bake_mask_value<class_GPUParticlesCollisionSDF3D_method_set_bake_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,7 +78,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Resolution**: +enum **Resolution**: :ref:`🔗<enum_GPUParticlesCollisionSDF3D_Resolution>` .. _class_GPUParticlesCollisionSDF3D_constant_RESOLUTION_16: @@ -149,12 +149,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **bake_mask** = ``4294967295`` +:ref:`int<class_int>` **bake_mask** = ``4294967295`` :ref:`🔗<class_GPUParticlesCollisionSDF3D_property_bake_mask>` .. rst-class:: classref-property-setget -- void **set_bake_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bake_mask** **(** **)** +- |void| **set_bake_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bake_mask**\ (\ ) The visual layers to account for when baking the particle collision SDF. Only :ref:`MeshInstance3D<class_MeshInstance3D>`\ s whose :ref:`VisualInstance3D.layers<class_VisualInstance3D_property_layers>` match with this :ref:`bake_mask<class_GPUParticlesCollisionSDF3D_property_bake_mask>` will be included in the generated particle collision SDF. By default, all objects are taken into account for the particle collision SDF baking. @@ -166,12 +166,12 @@ The visual layers to account for when baking the particle collision SDF. Only :r .. rst-class:: classref-property -:ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` **resolution** = ``2`` +:ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` **resolution** = ``2`` :ref:`🔗<class_GPUParticlesCollisionSDF3D_property_resolution>` .. rst-class:: classref-property-setget -- void **set_resolution** **(** :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` value **)** -- :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` **get_resolution** **(** **)** +- |void| **set_resolution**\ (\ value\: :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>`\ ) +- :ref:`Resolution<enum_GPUParticlesCollisionSDF3D_Resolution>` **get_resolution**\ (\ ) The bake resolution to use for the signed distance field :ref:`texture<class_GPUParticlesCollisionSDF3D_property_texture>`. The texture must be baked again for changes to the :ref:`resolution<class_GPUParticlesCollisionSDF3D_property_resolution>` property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. @@ -183,12 +183,12 @@ The bake resolution to use for the signed distance field :ref:`texture<class_GPU .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GPUParticlesCollisionSDF3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The collision SDF's size in 3D units. To improve SDF quality, the :ref:`size<class_GPUParticlesCollisionSDF3D_property_size>` should be set as small as possible while covering the parts of the scene you need. @@ -200,12 +200,12 @@ The collision SDF's size in 3D units. To improve SDF quality, the :ref:`size<cla .. rst-class:: classref-property -:ref:`Texture3D<class_Texture3D>` **texture** +:ref:`Texture3D<class_Texture3D>` **texture** :ref:`🔗<class_GPUParticlesCollisionSDF3D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture3D<class_Texture3D>` value **)** -- :ref:`Texture3D<class_Texture3D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ ) +- :ref:`Texture3D<class_Texture3D>` **get_texture**\ (\ ) The 3D texture representing the signed distance field. @@ -217,12 +217,12 @@ The 3D texture representing the signed distance field. .. rst-class:: classref-property -:ref:`float<class_float>` **thickness** = ``1.0`` +:ref:`float<class_float>` **thickness** = ``1.0`` :ref:`🔗<class_GPUParticlesCollisionSDF3D_property_thickness>` .. rst-class:: classref-property-setget -- void **set_thickness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_thickness** **(** **)** +- |void| **set_thickness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_thickness**\ (\ ) The collision shape's thickness. Unlike other particle colliders, **GPUParticlesCollisionSDF3D** is actually hollow on the inside. :ref:`thickness<class_GPUParticlesCollisionSDF3D_property_thickness>` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the **GPUParticlesCollisionSDF3D** is moved. @@ -239,7 +239,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_bake_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_bake_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value>` Returns whether or not the specified layer of the :ref:`bake_mask<class_GPUParticlesCollisionSDF3D_property_bake_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -251,7 +251,7 @@ Returns whether or not the specified layer of the :ref:`bake_mask<class_GPUParti .. rst-class:: classref-method -void **set_bake_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_bake_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GPUParticlesCollisionSDF3D_method_set_bake_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`bake_mask<class_GPUParticlesCollisionSDF3D_property_bake_mask>`, given a ``layer_number`` between 1 and 32. @@ -262,3 +262,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`bake_ma .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gpuparticlescollisionsphere3d.rst b/classes/class_gpuparticlescollisionsphere3d.rst index b0a1a446152..f4a2a3fbf98 100644 --- a/classes/class_gpuparticlescollisionsphere3d.rst +++ b/classes/class_gpuparticlescollisionsphere3d.rst @@ -12,14 +12,16 @@ GPUParticlesCollisionSphere3D **Inherits:** :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -Sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. +A sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. + +Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. \ **Note:** :ref:`ParticleProcessMaterial.collision_mode<class_ParticleProcessMaterial_property_collision_mode>` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>` on the :ref:`GPUParticles3D<class_GPUParticles3D>`'s process material for collision to work. @@ -50,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``1.0`` +:ref:`float<class_float>` **radius** = ``1.0`` :ref:`🔗<class_GPUParticlesCollisionSphere3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The collision sphere's radius in 3D units. @@ -66,3 +68,4 @@ The collision sphere's radius in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gradient.rst b/classes/class_gradient.rst index 13ce4017a48..b1e63e6dd29 100644 --- a/classes/class_gradient.rst +++ b/classes/class_gradient.rst @@ -12,14 +12,14 @@ Gradient **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A color interpolator resource which can be used to generate colors between user-defined color points. +A color transition. .. rst-class:: classref-introduction-group Description ----------- -Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the gradient will interpolate from color 1 to color 2 and from color 2 to color 3. The gradient will initially have 2 colors (black and white), one (black) at gradient lower offset 0 and the other (white) at the gradient higher offset 1. +This resource describes a color transition by defining a set of colored points and how to interpolate between them. See also :ref:`Curve<class_Curve>` which supports more complex easing methods, but does not support colors. @@ -49,25 +49,25 @@ Methods .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point<class_Gradient_method_add_point>` **(** :ref:`float<class_float>` offset, :ref:`Color<class_Color>` color **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_color<class_Gradient_method_get_color>` **(** :ref:`int<class_int>` point **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_offset<class_Gradient_method_get_offset>` **(** :ref:`int<class_int>` point **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_point_count<class_Gradient_method_get_point_count>` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point<class_Gradient_method_remove_point>` **(** :ref:`int<class_int>` point **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_Gradient_method_reverse>` **(** **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`sample<class_Gradient_method_sample>` **(** :ref:`float<class_float>` offset **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_color<class_Gradient_method_set_color>` **(** :ref:`int<class_int>` point, :ref:`Color<class_Color>` color **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_offset<class_Gradient_method_set_offset>` **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point<class_Gradient_method_add_point>`\ (\ offset\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_color<class_Gradient_method_get_color>`\ (\ point\: :ref:`int<class_int>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_offset<class_Gradient_method_get_offset>`\ (\ point\: :ref:`int<class_int>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_point_count<class_Gradient_method_get_point_count>`\ (\ ) |const| | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point<class_Gradient_method_remove_point>`\ (\ point\: :ref:`int<class_int>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_Gradient_method_reverse>`\ (\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`sample<class_Gradient_method_sample>`\ (\ offset\: :ref:`float<class_float>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_color<class_Gradient_method_set_color>`\ (\ point\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_offset<class_Gradient_method_set_offset>`\ (\ point\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,7 +82,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **InterpolationMode**: +enum **InterpolationMode**: :ref:`🔗<enum_Gradient_InterpolationMode>` .. _class_Gradient_constant_GRADIENT_INTERPOLATE_LINEAR: @@ -116,7 +116,7 @@ Cubic interpolation. .. rst-class:: classref-enumeration -enum **ColorSpace**: +enum **ColorSpace**: :ref:`🔗<enum_Gradient_ColorSpace>` .. _class_Gradient_constant_GRADIENT_COLOR_SPACE_SRGB: @@ -155,16 +155,18 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedColorArray<class_PackedColorArray>` **colors** = ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` +:ref:`PackedColorArray<class_PackedColorArray>` **colors** = ``PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1)`` :ref:`🔗<class_Gradient_property_colors>` .. rst-class:: classref-property-setget -- void **set_colors** **(** :ref:`PackedColorArray<class_PackedColorArray>` value **)** -- :ref:`PackedColorArray<class_PackedColorArray>` **get_colors** **(** **)** +- |void| **set_colors**\ (\ value\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) +- :ref:`PackedColorArray<class_PackedColorArray>` **get_colors**\ (\ ) -Gradient's colors returned as a :ref:`PackedColorArray<class_PackedColorArray>`. +Gradient's colors as a :ref:`PackedColorArray<class_PackedColorArray>`. -\ **Note:** This property returns a copy, modifying the return value does not update the gradient. To update the gradient use :ref:`set_color<class_Gradient_method_set_color>` method (for updating colors individually) or assign to this property directly (for bulk-updating all colors at once). +\ **Note:** Setting this property updates all colors at once. To update any color individually use :ref:`set_color<class_Gradient_method_set_color>`. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray<class_PackedColorArray>` for more details. .. rst-class:: classref-item-separator @@ -174,12 +176,12 @@ Gradient's colors returned as a :ref:`PackedColorArray<class_PackedColorArray>`. .. rst-class:: classref-property -:ref:`ColorSpace<enum_Gradient_ColorSpace>` **interpolation_color_space** = ``0`` +:ref:`ColorSpace<enum_Gradient_ColorSpace>` **interpolation_color_space** = ``0`` :ref:`🔗<class_Gradient_property_interpolation_color_space>` .. rst-class:: classref-property-setget -- void **set_interpolation_color_space** **(** :ref:`ColorSpace<enum_Gradient_ColorSpace>` value **)** -- :ref:`ColorSpace<enum_Gradient_ColorSpace>` **get_interpolation_color_space** **(** **)** +- |void| **set_interpolation_color_space**\ (\ value\: :ref:`ColorSpace<enum_Gradient_ColorSpace>`\ ) +- :ref:`ColorSpace<enum_Gradient_ColorSpace>` **get_interpolation_color_space**\ (\ ) The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See :ref:`ColorSpace<enum_Gradient_ColorSpace>` for available modes. @@ -193,12 +195,12 @@ The color space used to interpolate between points of the gradient. It does not .. rst-class:: classref-property -:ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **interpolation_mode** = ``0`` +:ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **interpolation_mode** = ``0`` :ref:`🔗<class_Gradient_property_interpolation_mode>` .. rst-class:: classref-property-setget -- void **set_interpolation_mode** **(** :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` value **)** -- :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **get_interpolation_mode** **(** **)** +- |void| **set_interpolation_mode**\ (\ value\: :ref:`InterpolationMode<enum_Gradient_InterpolationMode>`\ ) +- :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` **get_interpolation_mode**\ (\ ) The algorithm used to interpolate between points of the gradient. See :ref:`InterpolationMode<enum_Gradient_InterpolationMode>` for available modes. @@ -210,16 +212,18 @@ The algorithm used to interpolate between points of the gradient. See :ref:`Inte .. rst-class:: classref-property -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **offsets** = ``PackedFloat32Array(0, 1)`` +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **offsets** = ``PackedFloat32Array(0, 1)`` :ref:`🔗<class_Gradient_property_offsets>` .. rst-class:: classref-property-setget -- void **set_offsets** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)** -- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_offsets** **(** **)** +- |void| **set_offsets**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) +- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_offsets**\ (\ ) + +Gradient's offsets as a :ref:`PackedFloat32Array<class_PackedFloat32Array>`. -Gradient's offsets returned as a :ref:`PackedFloat32Array<class_PackedFloat32Array>`. +\ **Note:** Setting this property updates all offsets at once. To update any offset individually use :ref:`set_offset<class_Gradient_method_set_offset>`. -\ **Note:** This property returns a copy, modifying the return value does not update the gradient. To update the gradient use :ref:`set_offset<class_Gradient_method_set_offset>` method (for updating offsets individually) or assign to this property directly (for bulk-updating all offsets at once). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details. .. rst-class:: classref-section-separator @@ -234,9 +238,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_point** **(** :ref:`float<class_float>` offset, :ref:`Color<class_Color>` color **)** +|void| **add_point**\ (\ offset\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Gradient_method_add_point>` -Adds the specified color to the end of the gradient, with the specified offset. +Adds the specified color to the gradient, with the specified offset. .. rst-class:: classref-item-separator @@ -246,7 +250,7 @@ Adds the specified color to the end of the gradient, with the specified offset. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_color** **(** :ref:`int<class_int>` point **)** +:ref:`Color<class_Color>` **get_color**\ (\ point\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Gradient_method_get_color>` Returns the color of the gradient color at index ``point``. @@ -258,7 +262,7 @@ Returns the color of the gradient color at index ``point``. .. rst-class:: classref-method -:ref:`float<class_float>` **get_offset** **(** :ref:`int<class_int>` point **)** +:ref:`float<class_float>` **get_offset**\ (\ point\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Gradient_method_get_offset>` Returns the offset of the gradient color at index ``point``. @@ -270,7 +274,7 @@ Returns the offset of the gradient color at index ``point``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_point_count** **(** **)** |const| +:ref:`int<class_int>` **get_point_count**\ (\ ) |const| :ref:`🔗<class_Gradient_method_get_point_count>` Returns the number of colors in the gradient. @@ -282,9 +286,9 @@ Returns the number of colors in the gradient. .. rst-class:: classref-method -void **remove_point** **(** :ref:`int<class_int>` point **)** +|void| **remove_point**\ (\ point\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Gradient_method_remove_point>` -Removes the color at the index ``point``. +Removes the color at index ``point``. .. rst-class:: classref-item-separator @@ -294,7 +298,7 @@ Removes the color at the index ``point``. .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_Gradient_method_reverse>` Reverses/mirrors the gradient. @@ -308,7 +312,7 @@ Reverses/mirrors the gradient. .. rst-class:: classref-method -:ref:`Color<class_Color>` **sample** **(** :ref:`float<class_float>` offset **)** +:ref:`Color<class_Color>` **sample**\ (\ offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Gradient_method_sample>` Returns the interpolated color specified by ``offset``. @@ -320,7 +324,7 @@ Returns the interpolated color specified by ``offset``. .. rst-class:: classref-method -void **set_color** **(** :ref:`int<class_int>` point, :ref:`Color<class_Color>` color **)** +|void| **set_color**\ (\ point\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Gradient_method_set_color>` Sets the color of the gradient color at index ``point``. @@ -332,7 +336,7 @@ Sets the color of the gradient color at index ``point``. .. rst-class:: classref-method -void **set_offset** **(** :ref:`int<class_int>` point, :ref:`float<class_float>` offset **)** +|void| **set_offset**\ (\ point\: :ref:`int<class_int>`, offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Gradient_method_set_offset>` Sets the offset for the gradient color at index ``point``. @@ -343,3 +347,4 @@ Sets the offset for the gradient color at index ``point``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gradienttexture1d.rst b/classes/class_gradienttexture1d.rst index f8656b09aca..2e939f756ad 100644 --- a/classes/class_gradienttexture1d.rst +++ b/classes/class_gradienttexture1d.rst @@ -12,14 +12,14 @@ GradientTexture1D **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Gradient-filled texture. +A 1D texture that uses colors obtained from a :ref:`Gradient<class_Gradient>`. .. rst-class:: classref-introduction-group Description ----------- -GradientTexture1D uses a :ref:`Gradient<class_Gradient>` to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means 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 :ref:`width<class_GradientTexture1D_property_width>`). See also :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`CurveTexture<class_CurveTexture>` and :ref:`CurveXYZTexture<class_CurveXYZTexture>`. +A 1D texture that obtains colors from a :ref:`Gradient<class_Gradient>` to fill the texture data. The texture is filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels. See also :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`CurveTexture<class_CurveTexture>` and :ref:`CurveXYZTexture<class_CurveXYZTexture>`. .. rst-class:: classref-reftable-group @@ -52,14 +52,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Gradient<class_Gradient>` **gradient** +:ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_GradientTexture1D_property_gradient>` .. rst-class:: classref-property-setget -- void **set_gradient** **(** :ref:`Gradient<class_Gradient>` value **)** -- :ref:`Gradient<class_Gradient>` **get_gradient** **(** **)** +- |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ ) +- :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ ) -The :ref:`Gradient<class_Gradient>` that will be used to fill the texture. +The :ref:`Gradient<class_Gradient>` used to fill the texture. .. rst-class:: classref-item-separator @@ -69,12 +69,12 @@ The :ref:`Gradient<class_Gradient>` that will be used to fill the texture. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_hdr** = ``false`` +:ref:`bool<class_bool>` **use_hdr** = ``false`` :ref:`🔗<class_GradientTexture1D_property_use_hdr>` .. rst-class:: classref-property-setget -- void **set_use_hdr** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_hdr** **(** **)** +- |void| **set_use_hdr**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_hdr**\ (\ ) If ``true``, the generated texture will support high dynamic range (:ref:`Image.FORMAT_RGBAF<class_Image_constant_FORMAT_RGBAF>` format). This allows for glow effects to work if :ref:`Environment.glow_enabled<class_Environment_property_glow_enabled>` is ``true``. If ``false``, the generated texture will use low dynamic range; overbright colors will be clamped (:ref:`Image.FORMAT_RGBA8<class_Image_constant_FORMAT_RGBA8>` format). @@ -86,12 +86,12 @@ If ``true``, the generated texture will support high dynamic range (:ref:`Image. .. rst-class:: classref-property -:ref:`int<class_int>` **width** = ``256`` +:ref:`int<class_int>` **width** = ``256`` :ref:`🔗<class_GradientTexture1D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_width**\ (\ ) The number of color samples that will be obtained from the :ref:`Gradient<class_Gradient>`. @@ -102,3 +102,4 @@ The number of color samples that will be obtained from the :ref:`Gradient<class_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gradienttexture2d.rst b/classes/class_gradienttexture2d.rst index cab7f6fec6d..ad66f711879 100644 --- a/classes/class_gradienttexture2d.rst +++ b/classes/class_gradienttexture2d.rst @@ -12,14 +12,14 @@ GradientTexture2D **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Gradient-filled 2D texture. +A 2D texture that creates a pattern with colors obtained from a :ref:`Gradient<class_Gradient>`. .. rst-class:: classref-introduction-group Description ----------- -The texture uses a :ref:`Gradient<class_Gradient>` to fill the texture data in 2D space. The gradient is filled according to the specified :ref:`fill<class_GradientTexture2D_property_fill>` and :ref:`repeat<class_GradientTexture2D_property_repeat>` types using colors obtained from the gradient. 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 :ref:`width<class_GradientTexture2D_property_width>` and :ref:`height<class_GradientTexture2D_property_height>`). See also :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`CurveTexture<class_CurveTexture>` and :ref:`CurveXYZTexture<class_CurveXYZTexture>`. +A 2D texture that obtains colors from a :ref:`Gradient<class_Gradient>` to fill the texture data. This texture is able to transform a color transition into different patterns such as a linear or a radial gradient. The gradient is sampled individually for each pixel so it does not necessarily represent an exact copy of the gradient(see :ref:`width<class_GradientTexture2D_property_width>` and :ref:`height<class_GradientTexture2D_property_height>`). See also :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`CurveTexture<class_CurveTexture>` and :ref:`CurveXYZTexture<class_CurveXYZTexture>`. .. rst-class:: classref-reftable-group @@ -62,7 +62,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Fill**: +enum **Fill**: :ref:`🔗<enum_GradientTexture2D_Fill>` .. _class_GradientTexture2D_constant_FILL_LINEAR: @@ -96,7 +96,7 @@ The colors are linearly interpolated in a square pattern. .. rst-class:: classref-enumeration -enum **Repeat**: +enum **Repeat**: :ref:`🔗<enum_GradientTexture2D_Repeat>` .. _class_GradientTexture2D_constant_REPEAT_NONE: @@ -135,12 +135,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Fill<enum_GradientTexture2D_Fill>` **fill** = ``0`` +:ref:`Fill<enum_GradientTexture2D_Fill>` **fill** = ``0`` :ref:`🔗<class_GradientTexture2D_property_fill>` .. rst-class:: classref-property-setget -- void **set_fill** **(** :ref:`Fill<enum_GradientTexture2D_Fill>` value **)** -- :ref:`Fill<enum_GradientTexture2D_Fill>` **get_fill** **(** **)** +- |void| **set_fill**\ (\ value\: :ref:`Fill<enum_GradientTexture2D_Fill>`\ ) +- :ref:`Fill<enum_GradientTexture2D_Fill>` **get_fill**\ (\ ) The gradient fill type, one of the :ref:`Fill<enum_GradientTexture2D_Fill>` values. The texture is filled by interpolating colors starting from :ref:`fill_from<class_GradientTexture2D_property_fill_from>` to :ref:`fill_to<class_GradientTexture2D_property_fill_to>` offsets. @@ -152,12 +152,12 @@ The gradient fill type, one of the :ref:`Fill<enum_GradientTexture2D_Fill>` valu .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **fill_from** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **fill_from** = ``Vector2(0, 0)`` :ref:`🔗<class_GradientTexture2D_property_fill_from>` .. rst-class:: classref-property-setget -- void **set_fill_from** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_fill_from** **(** **)** +- |void| **set_fill_from**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_fill_from**\ (\ ) The initial offset used to fill the texture specified in UV coordinates. @@ -169,12 +169,12 @@ The initial offset used to fill the texture specified in UV coordinates. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **fill_to** = ``Vector2(1, 0)`` +:ref:`Vector2<class_Vector2>` **fill_to** = ``Vector2(1, 0)`` :ref:`🔗<class_GradientTexture2D_property_fill_to>` .. rst-class:: classref-property-setget -- void **set_fill_to** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_fill_to** **(** **)** +- |void| **set_fill_to**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_fill_to**\ (\ ) The final offset used to fill the texture specified in UV coordinates. @@ -186,12 +186,12 @@ The final offset used to fill the texture specified in UV coordinates. .. rst-class:: classref-property -:ref:`Gradient<class_Gradient>` **gradient** +:ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_GradientTexture2D_property_gradient>` .. rst-class:: classref-property-setget -- void **set_gradient** **(** :ref:`Gradient<class_Gradient>` value **)** -- :ref:`Gradient<class_Gradient>` **get_gradient** **(** **)** +- |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ ) +- :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ ) The :ref:`Gradient<class_Gradient>` used to fill the texture. @@ -203,12 +203,12 @@ The :ref:`Gradient<class_Gradient>` used to fill the texture. .. rst-class:: classref-property -:ref:`int<class_int>` **height** = ``64`` +:ref:`int<class_int>` **height** = ``64`` :ref:`🔗<class_GradientTexture2D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_height**\ (\ ) The number of vertical color samples that will be obtained from the :ref:`Gradient<class_Gradient>`, which also represents the texture's height. @@ -220,12 +220,12 @@ The number of vertical color samples that will be obtained from the :ref:`Gradie .. rst-class:: classref-property -:ref:`Repeat<enum_GradientTexture2D_Repeat>` **repeat** = ``0`` +:ref:`Repeat<enum_GradientTexture2D_Repeat>` **repeat** = ``0`` :ref:`🔗<class_GradientTexture2D_property_repeat>` .. rst-class:: classref-property-setget -- void **set_repeat** **(** :ref:`Repeat<enum_GradientTexture2D_Repeat>` value **)** -- :ref:`Repeat<enum_GradientTexture2D_Repeat>` **get_repeat** **(** **)** +- |void| **set_repeat**\ (\ value\: :ref:`Repeat<enum_GradientTexture2D_Repeat>`\ ) +- :ref:`Repeat<enum_GradientTexture2D_Repeat>` **get_repeat**\ (\ ) The gradient repeat type, one of the :ref:`Repeat<enum_GradientTexture2D_Repeat>` values. The texture is filled starting from :ref:`fill_from<class_GradientTexture2D_property_fill_from>` to :ref:`fill_to<class_GradientTexture2D_property_fill_to>` offsets by default, but the gradient fill can be repeated to cover the entire texture. @@ -237,12 +237,12 @@ The gradient repeat type, one of the :ref:`Repeat<enum_GradientTexture2D_Repeat> .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_hdr** = ``false`` +:ref:`bool<class_bool>` **use_hdr** = ``false`` :ref:`🔗<class_GradientTexture2D_property_use_hdr>` .. rst-class:: classref-property-setget -- void **set_use_hdr** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_hdr** **(** **)** +- |void| **set_use_hdr**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_hdr**\ (\ ) If ``true``, the generated texture will support high dynamic range (:ref:`Image.FORMAT_RGBAF<class_Image_constant_FORMAT_RGBAF>` format). This allows for glow effects to work if :ref:`Environment.glow_enabled<class_Environment_property_glow_enabled>` is ``true``. If ``false``, the generated texture will use low dynamic range; overbright colors will be clamped (:ref:`Image.FORMAT_RGBA8<class_Image_constant_FORMAT_RGBA8>` format). @@ -254,12 +254,12 @@ If ``true``, the generated texture will support high dynamic range (:ref:`Image. .. rst-class:: classref-property -:ref:`int<class_int>` **width** = ``64`` +:ref:`int<class_int>` **width** = ``64`` :ref:`🔗<class_GradientTexture2D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_width**\ (\ ) The number of horizontal color samples that will be obtained from the :ref:`Gradient<class_Gradient>`, which also represents the texture's width. @@ -270,3 +270,4 @@ The number of horizontal color samples that will be obtained from the :ref:`Grad .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_graphedit.rst b/classes/class_graphedit.rst index fcfccc9624f..21dbf9a8fc1 100644 --- a/classes/class_graphedit.rst +++ b/classes/class_graphedit.rst @@ -10,6 +10,8 @@ GraphEdit ========= +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` An editor for graph-like structures, using :ref:`GraphNode<class_GraphNode>`\ s. @@ -21,7 +23,7 @@ Description **GraphEdit** provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects. -\ **GraphEdit** by itself is only an empty container, representing an infinite grid where :ref:`GraphNode<class_GraphNode>`\ s can be placed. Each :ref:`GraphNode<class_GraphNode>` represents a node in the graph, a single unit of data in the connected scheme. **GraphEdit**, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or close a :ref:`GraphNode<class_GraphNode>`, a signal is emitted in the **GraphEdit**, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled. +\ **GraphEdit** by itself is only an empty container, representing an infinite grid where :ref:`GraphNode<class_GraphNode>`\ s can be placed. Each :ref:`GraphNode<class_GraphNode>` represents a node in the graph, a single unit of data in the connected scheme. **GraphEdit**, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or delete a :ref:`GraphNode<class_GraphNode>`, a signal is emitted in the **GraphEdit**, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled. \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode<class_OS_property_low_processor_usage_mode>`) when using GraphEdits. @@ -33,8 +35,6 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`arrange_nodes_button_hidden<class_GraphEdit_property_arrange_nodes_button_hidden>` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -42,10 +42,12 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`connection_lines_curvature<class_GraphEdit_property_connection_lines_curvature>` | ``0.5`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`connection_lines_thickness<class_GraphEdit_property_connection_lines_thickness>` | ``2.0`` | + | :ref:`float<class_float>` | :ref:`connection_lines_thickness<class_GraphEdit_property_connection_lines_thickness>` | ``4.0`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`GridPattern<enum_GraphEdit_GridPattern>` | :ref:`grid_pattern<class_GraphEdit_property_grid_pattern>` | ``0`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`minimap_enabled<class_GraphEdit_property_minimap_enabled>` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`minimap_opacity<class_GraphEdit_property_minimap_opacity>` | ``0.65`` | @@ -58,11 +60,23 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`scroll_offset<class_GraphEdit_property_scroll_offset>` | ``Vector2(0, 0)`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_arrange_button<class_GraphEdit_property_show_arrange_button>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_grid<class_GraphEdit_property_show_grid>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_grid_buttons<class_GraphEdit_property_show_grid_buttons>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_menu<class_GraphEdit_property_show_menu>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_minimap_button<class_GraphEdit_property_show_minimap_button>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`show_zoom_buttons<class_GraphEdit_property_show_zoom_buttons>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`show_zoom_label<class_GraphEdit_property_show_zoom_label>` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`snap_distance<class_GraphEdit_property_snap_distance>` | ``20`` | + | :ref:`int<class_int>` | :ref:`snapping_distance<class_GraphEdit_property_snapping_distance>` | ``20`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_snap<class_GraphEdit_property_use_snap>` | ``true`` | + | :ref:`bool<class_bool>` | :ref:`snapping_enabled<class_GraphEdit_property_snapping_enabled>` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`zoom<class_GraphEdit_property_zoom>` | ``1.0`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -81,51 +95,63 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_get_connection_line<class_GraphEdit_method__get_connection_line>` **(** :ref:`Vector2<class_Vector2>` from_position, :ref:`Vector2<class_Vector2>` to_position **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_in_input_hotzone<class_GraphEdit_method__is_in_input_hotzone>` **(** :ref:`Object<class_Object>` in_node, :ref:`int<class_int>` in_port, :ref:`Vector2<class_Vector2>` mouse_position **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_in_output_hotzone<class_GraphEdit_method__is_in_output_hotzone>` **(** :ref:`Object<class_Object>` in_node, :ref:`int<class_int>` in_port, :ref:`Vector2<class_Vector2>` mouse_position **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_node_hover_valid<class_GraphEdit_method__is_node_hover_valid>` **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>` **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_valid_left_disconnect_type<class_GraphEdit_method_add_valid_left_disconnect_type>` **(** :ref:`int<class_int>` type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_valid_right_disconnect_type<class_GraphEdit_method_add_valid_right_disconnect_type>` **(** :ref:`int<class_int>` type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`arrange_nodes<class_GraphEdit_method_arrange_nodes>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_connections<class_GraphEdit_method_clear_connections>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_node<class_GraphEdit_method_connect_node>` **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_node<class_GraphEdit_method_disconnect_node>` **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_connection_drag_end<class_GraphEdit_method_force_connection_drag_end>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_connection_line<class_GraphEdit_method_get_connection_line>` **(** :ref:`Vector2<class_Vector2>` from_node, :ref:`Vector2<class_Vector2>` to_node **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_connection_list<class_GraphEdit_method_get_connection_list>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_zoom_hbox<class_GraphEdit_method_get_zoom_hbox>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_node_connected<class_GraphEdit_method_is_node_connected>` **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connection_type>` **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_valid_connection_type<class_GraphEdit_method_remove_valid_connection_type>` **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_valid_left_disconnect_type<class_GraphEdit_method_remove_valid_left_disconnect_type>` **(** :ref:`int<class_int>` type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_valid_right_disconnect_type<class_GraphEdit_method_remove_valid_right_disconnect_type>` **(** :ref:`int<class_int>` type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_connection_activity<class_GraphEdit_method_set_connection_activity>` **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port, :ref:`float<class_float>` amount **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selected<class_GraphEdit_method_set_selected>` **(** :ref:`Node<class_Node>` node **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_get_connection_line<class_GraphEdit_private_method__get_connection_line>`\ (\ from_position\: :ref:`Vector2<class_Vector2>`, to_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_in_input_hotzone<class_GraphEdit_private_method__is_in_input_hotzone>`\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_in_output_hotzone<class_GraphEdit_private_method__is_in_output_hotzone>`\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_node_hover_valid<class_GraphEdit_private_method__is_node_hover_valid>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_valid_left_disconnect_type<class_GraphEdit_method_add_valid_left_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_valid_right_disconnect_type<class_GraphEdit_method_add_valid_right_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`arrange_nodes<class_GraphEdit_method_arrange_nodes>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`attach_graph_element_to_frame<class_GraphEdit_method_attach_graph_element_to_frame>`\ (\ element\: :ref:`StringName<class_StringName>`, frame\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_connections<class_GraphEdit_method_clear_connections>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_node<class_GraphEdit_method_connect_node>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`detach_graph_element_from_frame<class_GraphEdit_method_detach_graph_element_from_frame>`\ (\ element\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_node<class_GraphEdit_method_disconnect_node>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_connection_drag_end<class_GraphEdit_method_force_connection_drag_end>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_attached_nodes_of_frame<class_GraphEdit_method_get_attached_nodes_of_frame>`\ (\ frame\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_closest_connection_at_point<class_GraphEdit_method_get_closest_connection_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`, max_distance\: :ref:`float<class_float>` = 4.0\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_connection_line<class_GraphEdit_method_get_connection_line>`\ (\ from_node\: :ref:`Vector2<class_Vector2>`, to_node\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_connection_list<class_GraphEdit_method_get_connection_list>`\ (\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_connections_intersecting_with_rect<class_GraphEdit_method_get_connections_intersecting_with_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GraphFrame<class_GraphFrame>` | :ref:`get_element_frame<class_GraphEdit_method_get_element_frame>`\ (\ element\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_menu_hbox<class_GraphEdit_method_get_menu_hbox>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_node_connected<class_GraphEdit_method_is_node_connected>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_valid_connection_type<class_GraphEdit_method_remove_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_valid_left_disconnect_type<class_GraphEdit_method_remove_valid_left_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_valid_right_disconnect_type<class_GraphEdit_method_remove_valid_right_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_connection_activity<class_GraphEdit_method_set_connection_activity>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selected<class_GraphEdit_method_set_selected>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -135,35 +161,45 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color<class_Color>` | :ref:`activity<class_GraphEdit_theme_color_activity>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color<class_Color>` | :ref:`grid_major<class_GraphEdit_theme_color_grid_major>` | ``Color(1, 1, 1, 0.2)`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color<class_Color>` | :ref:`grid_minor<class_GraphEdit_theme_color_grid_minor>` | ``Color(1, 1, 1, 0.05)`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color<class_Color>` | :ref:`selection_fill<class_GraphEdit_theme_color_selection_fill>` | ``Color(1, 1, 1, 0.3)`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Color<class_Color>` | :ref:`selection_stroke<class_GraphEdit_theme_color_selection_stroke>` | ``Color(1, 1, 1, 0.8)`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`port_hotzone_inner_extent<class_GraphEdit_theme_constant_port_hotzone_inner_extent>` | ``22`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`port_hotzone_outer_extent<class_GraphEdit_theme_constant_port_hotzone_outer_extent>` | ``26`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`layout<class_GraphEdit_theme_icon_layout>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`minimap<class_GraphEdit_theme_icon_minimap>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`minus<class_GraphEdit_theme_icon_minus>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`more<class_GraphEdit_theme_icon_more>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`reset<class_GraphEdit_theme_icon_reset>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`snap<class_GraphEdit_theme_icon_snap>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`bg<class_GraphEdit_theme_style_bg>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`activity<class_GraphEdit_theme_color_activity>` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`connection_hover_tint_color<class_GraphEdit_theme_color_connection_hover_tint_color>` | ``Color(0, 0, 0, 0.3)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`connection_rim_color<class_GraphEdit_theme_color_connection_rim_color>` | ``Color(0.1, 0.1, 0.1, 0.6)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`connection_valid_target_tint_color<class_GraphEdit_theme_color_connection_valid_target_tint_color>` | ``Color(1, 1, 1, 0.4)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`grid_major<class_GraphEdit_theme_color_grid_major>` | ``Color(1, 1, 1, 0.2)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`grid_minor<class_GraphEdit_theme_color_grid_minor>` | ``Color(1, 1, 1, 0.05)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`selection_fill<class_GraphEdit_theme_color_selection_fill>` | ``Color(1, 1, 1, 0.3)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Color<class_Color>` | :ref:`selection_stroke<class_GraphEdit_theme_color_selection_stroke>` | ``Color(1, 1, 1, 0.8)`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int<class_int>` | :ref:`port_hotzone_inner_extent<class_GraphEdit_theme_constant_port_hotzone_inner_extent>` | ``22`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`int<class_int>` | :ref:`port_hotzone_outer_extent<class_GraphEdit_theme_constant_port_hotzone_outer_extent>` | ``26`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`grid_toggle<class_GraphEdit_theme_icon_grid_toggle>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`layout<class_GraphEdit_theme_icon_layout>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`minimap_toggle<class_GraphEdit_theme_icon_minimap_toggle>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`snapping_toggle<class_GraphEdit_theme_icon_snapping_toggle>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_in<class_GraphEdit_theme_icon_zoom_in>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_out<class_GraphEdit_theme_icon_zoom_out>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_reset<class_GraphEdit_theme_icon_zoom_reset>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`menu_panel<class_GraphEdit_theme_style_menu_panel>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_GraphEdit_theme_style_panel>` | | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+ .. rst-class:: classref-section-separator @@ -178,9 +214,9 @@ Signals .. rst-class:: classref-signal -**begin_node_move** **(** **)** +**begin_node_move**\ (\ ) :ref:`🔗<class_GraphEdit_signal_begin_node_move>` -Emitted at the beginning of a GraphNode movement. +Emitted at the beginning of a :ref:`GraphElement<class_GraphElement>`'s movement. .. rst-class:: classref-item-separator @@ -190,7 +226,7 @@ Emitted at the beginning of a GraphNode movement. .. rst-class:: classref-signal -**connection_drag_ended** **(** **)** +**connection_drag_ended**\ (\ ) :ref:`🔗<class_GraphEdit_signal_connection_drag_ended>` Emitted at the end of a connection drag. @@ -202,7 +238,7 @@ Emitted at the end of a connection drag. .. rst-class:: classref-signal -**connection_drag_started** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`bool<class_bool>` is_output **)** +**connection_drag_started**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, is_output\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphEdit_signal_connection_drag_started>` Emitted at the beginning of a connection drag. @@ -214,7 +250,7 @@ Emitted at the beginning of a connection drag. .. rst-class:: classref-signal -**connection_from_empty** **(** :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port, :ref:`Vector2<class_Vector2>` release_position **)** +**connection_from_empty**\ (\ to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, release_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphEdit_signal_connection_from_empty>` Emitted when user drags a connection from an input port into the empty space of the graph. @@ -226,7 +262,7 @@ Emitted when user drags a connection from an input port into the empty space of .. rst-class:: classref-signal -**connection_request** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** +**connection_request**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_signal_connection_request>` Emitted to the GraphEdit when the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>` is attempted to be created. @@ -238,7 +274,7 @@ Emitted to the GraphEdit when the connection between the ``from_port`` of the `` .. rst-class:: classref-signal -**connection_to_empty** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`Vector2<class_Vector2>` release_position **)** +**connection_to_empty**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, release_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphEdit_signal_connection_to_empty>` Emitted when user drags a connection from an output port into the empty space of the graph. @@ -250,9 +286,9 @@ Emitted when user drags a connection from an output port into the empty space of .. rst-class:: classref-signal -**copy_nodes_request** **(** **)** +**copy_nodes_request**\ (\ ) :ref:`🔗<class_GraphEdit_signal_copy_nodes_request>` -Emitted when the user presses :kbd:`Ctrl + C`. +Emitted when this **GraphEdit** captures a ``ui_copy`` action (:kbd:`Ctrl + C` by default). In general, this signal indicates that the selected :ref:`GraphElement<class_GraphElement>`\ s should be copied. .. rst-class:: classref-item-separator @@ -262,9 +298,11 @@ Emitted when the user presses :kbd:`Ctrl + C`. .. rst-class:: classref-signal -**delete_nodes_request** **(** :ref:`StringName[]<class_StringName>` nodes **)** +**delete_nodes_request**\ (\ nodes\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\]\ ) :ref:`🔗<class_GraphEdit_signal_delete_nodes_request>` + +Emitted when this **GraphEdit** captures a ``ui_graph_delete`` action (:kbd:`Delete` by default). -Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). +\ ``nodes`` is an array of node names that should be removed. These usually include all selected nodes. .. rst-class:: classref-item-separator @@ -274,7 +312,7 @@ Emitted when a GraphNode is attempted to be removed from the GraphEdit. Provides .. rst-class:: classref-signal -**disconnection_request** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** +**disconnection_request**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_signal_disconnection_request>` Emitted to the GraphEdit when the connection between ``from_port`` of ``from_node`` :ref:`GraphNode<class_GraphNode>` and ``to_port`` of ``to_node`` :ref:`GraphNode<class_GraphNode>` is attempted to be removed. @@ -286,9 +324,9 @@ Emitted to the GraphEdit when the connection between ``from_port`` of ``from_nod .. rst-class:: classref-signal -**duplicate_nodes_request** **(** **)** +**duplicate_nodes_request**\ (\ ) :ref:`🔗<class_GraphEdit_signal_duplicate_nodes_request>` -Emitted when a GraphNode is attempted to be duplicated in the GraphEdit. +Emitted when this **GraphEdit** captures a ``ui_graph_duplicate`` action (:kbd:`Ctrl + D` by default). In general, this signal indicates that the selected :ref:`GraphElement<class_GraphElement>`\ s should be duplicated. .. rst-class:: classref-item-separator @@ -298,23 +336,47 @@ Emitted when a GraphNode is attempted to be duplicated in the GraphEdit. .. rst-class:: classref-signal -**end_node_move** **(** **)** +**end_node_move**\ (\ ) :ref:`🔗<class_GraphEdit_signal_end_node_move>` -Emitted at the end of a GraphNode movement. +Emitted at the end of a :ref:`GraphElement<class_GraphElement>`'s movement. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_signal_node_deselected: +.. _class_GraphEdit_signal_frame_rect_changed: .. rst-class:: classref-signal -**node_deselected** **(** :ref:`Node<class_Node>` node **)** +**frame_rect_changed**\ (\ frame\: :ref:`GraphFrame<class_GraphFrame>`, new_rect\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphEdit_signal_frame_rect_changed>` -.. container:: contribute +Emitted when the :ref:`GraphFrame<class_GraphFrame>` ``frame`` is resized to ``new_rect``. + +.. rst-class:: classref-item-separator + +---- - There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. _class_GraphEdit_signal_graph_elements_linked_to_frame_request: + +.. rst-class:: classref-signal + +**graph_elements_linked_to_frame_request**\ (\ elements\: :ref:`Array<class_Array>`, frame\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GraphEdit_signal_graph_elements_linked_to_frame_request>` + +Emitted when one or more :ref:`GraphElement<class_GraphElement>`\ s are dropped onto the :ref:`GraphFrame<class_GraphFrame>` named ``frame``, when they were not previously attached to any other one. + +\ ``elements`` is an array of :ref:`GraphElement<class_GraphElement>`\ s to be attached. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_signal_node_deselected: + +.. rst-class:: classref-signal + +**node_deselected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GraphEdit_signal_node_deselected>` + +Emitted when the given :ref:`GraphElement<class_GraphElement>` node is deselected. .. rst-class:: classref-item-separator @@ -324,9 +386,9 @@ Emitted at the end of a GraphNode movement. .. rst-class:: classref-signal -**node_selected** **(** :ref:`Node<class_Node>` node **)** +**node_selected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GraphEdit_signal_node_selected>` -Emitted when a GraphNode is selected. +Emitted when the given :ref:`GraphElement<class_GraphElement>` node is selected. .. rst-class:: classref-item-separator @@ -336,9 +398,9 @@ Emitted when a GraphNode is selected. .. rst-class:: classref-signal -**paste_nodes_request** **(** **)** +**paste_nodes_request**\ (\ ) :ref:`🔗<class_GraphEdit_signal_paste_nodes_request>` -Emitted when the user presses :kbd:`Ctrl + V`. +Emitted when this **GraphEdit** captures a ``ui_paste`` action (:kbd:`Ctrl + V` by default). In general, this signal indicates that previously copied :ref:`GraphElement<class_GraphElement>`\ s should be pasted. .. rst-class:: classref-item-separator @@ -348,9 +410,9 @@ Emitted when the user presses :kbd:`Ctrl + V`. .. rst-class:: classref-signal -**popup_request** **(** :ref:`Vector2<class_Vector2>` position **)** +**popup_request**\ (\ at_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphEdit_signal_popup_request>` -Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``position`` is the position of the mouse pointer when the signal is sent. +Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``at_position`` is the position of the mouse pointer when the signal is sent. .. rst-class:: classref-item-separator @@ -360,7 +422,7 @@ Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ` .. rst-class:: classref-signal -**scroll_offset_changed** **(** :ref:`Vector2<class_Vector2>` offset **)** +**scroll_offset_changed**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphEdit_signal_scroll_offset_changed>` Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. @@ -377,7 +439,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PanningScheme**: +enum **PanningScheme**: :ref:`🔗<enum_GraphEdit_PanningScheme>` .. _class_GraphEdit_constant_SCROLL_ZOOMS: @@ -395,6 +457,32 @@ enum **PanningScheme**: :kbd:`Mouse Wheel` will move the view, :kbd:`Ctrl + Mouse Wheel` will zoom. +.. rst-class:: classref-item-separator + +---- + +.. _enum_GraphEdit_GridPattern: + +.. rst-class:: classref-enumeration + +enum **GridPattern**: :ref:`🔗<enum_GraphEdit_GridPattern>` + +.. _class_GraphEdit_constant_GRID_PATTERN_LINES: + +.. rst-class:: classref-enumeration-constant + +:ref:`GridPattern<enum_GraphEdit_GridPattern>` **GRID_PATTERN_LINES** = ``0`` + +Draw the grid using solid lines. + +.. _class_GraphEdit_constant_GRID_PATTERN_DOTS: + +.. rst-class:: classref-enumeration-constant + +:ref:`GridPattern<enum_GraphEdit_GridPattern>` **GRID_PATTERN_DOTS** = ``1`` + +Draw the grid using dots. + .. rst-class:: classref-section-separator ---- @@ -404,69 +492,69 @@ enum **PanningScheme**: Property Descriptions --------------------- -.. _class_GraphEdit_property_arrange_nodes_button_hidden: +.. _class_GraphEdit_property_connection_lines_antialiased: .. rst-class:: classref-property -:ref:`bool<class_bool>` **arrange_nodes_button_hidden** = ``false`` +:ref:`bool<class_bool>` **connection_lines_antialiased** = ``true`` :ref:`🔗<class_GraphEdit_property_connection_lines_antialiased>` .. rst-class:: classref-property-setget -- void **set_arrange_nodes_button_hidden** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_arrange_nodes_button_hidden** **(** **)** +- |void| **set_connection_lines_antialiased**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_connection_lines_antialiased**\ (\ ) -If ``true``, the Arrange Nodes button is hidden. +If ``true``, the lines between nodes will use antialiasing. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_property_connection_lines_antialiased: +.. _class_GraphEdit_property_connection_lines_curvature: .. rst-class:: classref-property -:ref:`bool<class_bool>` **connection_lines_antialiased** = ``true`` +:ref:`float<class_float>` **connection_lines_curvature** = ``0.5`` :ref:`🔗<class_GraphEdit_property_connection_lines_curvature>` .. rst-class:: classref-property-setget -- void **set_connection_lines_antialiased** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_connection_lines_antialiased** **(** **)** +- |void| **set_connection_lines_curvature**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_connection_lines_curvature**\ (\ ) -If ``true``, the lines between nodes will use antialiasing. +The curvature of the lines between the nodes. 0 results in straight lines. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_property_connection_lines_curvature: +.. _class_GraphEdit_property_connection_lines_thickness: .. rst-class:: classref-property -:ref:`float<class_float>` **connection_lines_curvature** = ``0.5`` +:ref:`float<class_float>` **connection_lines_thickness** = ``4.0`` :ref:`🔗<class_GraphEdit_property_connection_lines_thickness>` .. rst-class:: classref-property-setget -- void **set_connection_lines_curvature** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_connection_lines_curvature** **(** **)** +- |void| **set_connection_lines_thickness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_connection_lines_thickness**\ (\ ) -The curvature of the lines between the nodes. 0 results in straight lines. +The thickness of the lines between the nodes. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_property_connection_lines_thickness: +.. _class_GraphEdit_property_grid_pattern: .. rst-class:: classref-property -:ref:`float<class_float>` **connection_lines_thickness** = ``2.0`` +:ref:`GridPattern<enum_GraphEdit_GridPattern>` **grid_pattern** = ``0`` :ref:`🔗<class_GraphEdit_property_grid_pattern>` .. rst-class:: classref-property-setget -- void **set_connection_lines_thickness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_connection_lines_thickness** **(** **)** +- |void| **set_grid_pattern**\ (\ value\: :ref:`GridPattern<enum_GraphEdit_GridPattern>`\ ) +- :ref:`GridPattern<enum_GraphEdit_GridPattern>` **get_grid_pattern**\ (\ ) -The thickness of the lines between the nodes. +The pattern used for drawing the grid. .. rst-class:: classref-item-separator @@ -476,12 +564,12 @@ The thickness of the lines between the nodes. .. rst-class:: classref-property -:ref:`bool<class_bool>` **minimap_enabled** = ``true`` +:ref:`bool<class_bool>` **minimap_enabled** = ``true`` :ref:`🔗<class_GraphEdit_property_minimap_enabled>` .. rst-class:: classref-property-setget -- void **set_minimap_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_minimap_enabled** **(** **)** +- |void| **set_minimap_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_minimap_enabled**\ (\ ) If ``true``, the minimap is visible. @@ -493,12 +581,12 @@ If ``true``, the minimap is visible. .. rst-class:: classref-property -:ref:`float<class_float>` **minimap_opacity** = ``0.65`` +:ref:`float<class_float>` **minimap_opacity** = ``0.65`` :ref:`🔗<class_GraphEdit_property_minimap_opacity>` .. rst-class:: classref-property-setget -- void **set_minimap_opacity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_minimap_opacity** **(** **)** +- |void| **set_minimap_opacity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_minimap_opacity**\ (\ ) The opacity of the minimap rectangle. @@ -510,12 +598,12 @@ The opacity of the minimap rectangle. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **minimap_size** = ``Vector2(240, 160)`` +:ref:`Vector2<class_Vector2>` **minimap_size** = ``Vector2(240, 160)`` :ref:`🔗<class_GraphEdit_property_minimap_size>` .. rst-class:: classref-property-setget -- void **set_minimap_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_minimap_size** **(** **)** +- |void| **set_minimap_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_minimap_size**\ (\ ) The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle. @@ -527,12 +615,12 @@ The size of the minimap rectangle. The map itself is based on the size of the gr .. rst-class:: classref-property -:ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **panning_scheme** = ``0`` +:ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **panning_scheme** = ``0`` :ref:`🔗<class_GraphEdit_property_panning_scheme>` .. rst-class:: classref-property-setget -- void **set_panning_scheme** **(** :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` value **)** -- :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **get_panning_scheme** **(** **)** +- |void| **set_panning_scheme**\ (\ value\: :ref:`PanningScheme<enum_GraphEdit_PanningScheme>`\ ) +- :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **get_panning_scheme**\ (\ ) Defines the control scheme for panning with mouse wheel. @@ -544,12 +632,12 @@ Defines the control scheme for panning with mouse wheel. .. rst-class:: classref-property -:ref:`bool<class_bool>` **right_disconnects** = ``false`` +:ref:`bool<class_bool>` **right_disconnects** = ``false`` :ref:`🔗<class_GraphEdit_property_right_disconnects>` .. rst-class:: classref-property-setget -- void **set_right_disconnects** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_right_disconnects_enabled** **(** **)** +- |void| **set_right_disconnects**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_right_disconnects_enabled**\ (\ ) If ``true``, enables disconnection of existing connections in the GraphEdit by dragging the right end. @@ -561,12 +649,12 @@ If ``true``, enables disconnection of existing connections in the GraphEdit by d .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_GraphEdit_property_scroll_offset>` .. rst-class:: classref-property-setget -- void **set_scroll_ofs** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_scroll_ofs** **(** **)** +- |void| **set_scroll_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_offset**\ (\ ) The scroll offset. @@ -574,50 +662,152 @@ The scroll offset. ---- +.. _class_GraphEdit_property_show_arrange_button: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_arrange_button** = ``true`` :ref:`🔗<class_GraphEdit_property_show_arrange_button>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_arrange_button**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_arrange_button**\ (\ ) + +If ``true``, the button to automatically arrange graph nodes is visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_grid: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_grid** = ``true`` :ref:`🔗<class_GraphEdit_property_show_grid>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_grid**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_grid**\ (\ ) + +If ``true``, the grid is visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_grid_buttons: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_grid_buttons** = ``true`` :ref:`🔗<class_GraphEdit_property_show_grid_buttons>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_grid_buttons**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_grid_buttons**\ (\ ) + +If ``true``, buttons that allow to configure grid and snapping options are visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_menu: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_menu** = ``true`` :ref:`🔗<class_GraphEdit_property_show_menu>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_menu**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_menu**\ (\ ) + +If ``true``, the menu toolbar is visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_minimap_button: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_minimap_button** = ``true`` :ref:`🔗<class_GraphEdit_property_show_minimap_button>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_minimap_button**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_minimap_button**\ (\ ) + +If ``true``, the button to toggle the minimap is visible. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_zoom_buttons: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **show_zoom_buttons** = ``true`` :ref:`🔗<class_GraphEdit_property_show_zoom_buttons>` + +.. rst-class:: classref-property-setget + +- |void| **set_show_zoom_buttons**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_zoom_buttons**\ (\ ) + +If ``true``, buttons that allow to change and reset the zoom level are visible. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_property_show_zoom_label: .. rst-class:: classref-property -:ref:`bool<class_bool>` **show_zoom_label** = ``false`` +:ref:`bool<class_bool>` **show_zoom_label** = ``false`` :ref:`🔗<class_GraphEdit_property_show_zoom_label>` .. rst-class:: classref-property-setget -- void **set_show_zoom_label** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_showing_zoom_label** **(** **)** +- |void| **set_show_zoom_label**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_showing_zoom_label**\ (\ ) -If ``true``, makes a label with the current zoom level visible. The zoom value is displayed in percents. +If ``true``, the label with the current zoom level is visible. The zoom level is displayed in percents. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_property_snap_distance: +.. _class_GraphEdit_property_snapping_distance: .. rst-class:: classref-property -:ref:`int<class_int>` **snap_distance** = ``20`` +:ref:`int<class_int>` **snapping_distance** = ``20`` :ref:`🔗<class_GraphEdit_property_snapping_distance>` .. rst-class:: classref-property-setget -- void **set_snap** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_snap** **(** **)** +- |void| **set_snapping_distance**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_snapping_distance**\ (\ ) -The snapping distance in pixels. +The snapping distance in pixels, also determines the grid line distance. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_property_use_snap: +.. _class_GraphEdit_property_snapping_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_snap** = ``true`` +:ref:`bool<class_bool>` **snapping_enabled** = ``true`` :ref:`🔗<class_GraphEdit_property_snapping_enabled>` .. rst-class:: classref-property-setget -- void **set_use_snap** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_snap** **(** **)** +- |void| **set_snapping_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_snapping_enabled**\ (\ ) If ``true``, enables snapping. @@ -629,12 +819,12 @@ If ``true``, enables snapping. .. rst-class:: classref-property -:ref:`float<class_float>` **zoom** = ``1.0`` +:ref:`float<class_float>` **zoom** = ``1.0`` :ref:`🔗<class_GraphEdit_property_zoom>` .. rst-class:: classref-property-setget -- void **set_zoom** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_zoom** **(** **)** +- |void| **set_zoom**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_zoom**\ (\ ) The current zoom value. @@ -646,12 +836,12 @@ The current zoom value. .. rst-class:: classref-property -:ref:`float<class_float>` **zoom_max** = ``2.0736`` +:ref:`float<class_float>` **zoom_max** = ``2.0736`` :ref:`🔗<class_GraphEdit_property_zoom_max>` .. rst-class:: classref-property-setget -- void **set_zoom_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_zoom_max** **(** **)** +- |void| **set_zoom_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_zoom_max**\ (\ ) The upper zoom limit. @@ -663,12 +853,12 @@ The upper zoom limit. .. rst-class:: classref-property -:ref:`float<class_float>` **zoom_min** = ``0.232568`` +:ref:`float<class_float>` **zoom_min** = ``0.232568`` :ref:`🔗<class_GraphEdit_property_zoom_min>` .. rst-class:: classref-property-setget -- void **set_zoom_min** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_zoom_min** **(** **)** +- |void| **set_zoom_min**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_zoom_min**\ (\ ) The lower zoom limit. @@ -680,12 +870,12 @@ The lower zoom limit. .. rst-class:: classref-property -:ref:`float<class_float>` **zoom_step** = ``1.2`` +:ref:`float<class_float>` **zoom_step** = ``1.2`` :ref:`🔗<class_GraphEdit_property_zoom_step>` .. rst-class:: classref-property-setget -- void **set_zoom_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_zoom_step** **(** **)** +- |void| **set_zoom_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_zoom_step**\ (\ ) The step of each zoom level. @@ -698,11 +888,11 @@ The step of each zoom level. Method Descriptions ------------------- -.. _class_GraphEdit_method__get_connection_line: +.. _class_GraphEdit_private_method__get_connection_line: .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **_get_connection_line** **(** :ref:`Vector2<class_Vector2>` from_position, :ref:`Vector2<class_Vector2>` to_position **)** |virtual| |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **_get_connection_line**\ (\ from_position\: :ref:`Vector2<class_Vector2>`, to_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| :ref:`🔗<class_GraphEdit_private_method__get_connection_line>` Virtual method which can be overridden to customize how connections are drawn. @@ -710,15 +900,15 @@ Virtual method which can be overridden to customize how connections are drawn. ---- -.. _class_GraphEdit_method__is_in_input_hotzone: +.. _class_GraphEdit_private_method__is_in_input_hotzone: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_in_input_hotzone** **(** :ref:`Object<class_Object>` in_node, :ref:`int<class_int>` in_port, :ref:`Vector2<class_Vector2>` mouse_position **)** |virtual| +:ref:`bool<class_bool>` **_is_in_input_hotzone**\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_GraphEdit_private_method__is_in_input_hotzone>` Returns whether the ``mouse_position`` is in the input hot zone. -By default, a hot zone is a :ref:`Rect2<class_Rect2>` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_connection_input_position<class_GraphNode_method_get_connection_input_position>`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_connection_output_position<class_GraphNode_method_get_connection_output_position>` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. +By default, a hot zone is a :ref:`Rect2<class_Rect2>` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position<class_GraphNode_method_get_input_port_position>`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position<class_GraphNode_method_get_output_port_position>` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. Below is a sample code to help get started: @@ -726,7 +916,7 @@ Below is a sample code to help get started: func _is_in_input_hotzone(in_node, in_port, mouse_position): var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_input_position(in_port) - port_size / 2 + var port_pos: Vector2 = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -735,13 +925,13 @@ Below is a sample code to help get started: ---- -.. _class_GraphEdit_method__is_in_output_hotzone: +.. _class_GraphEdit_private_method__is_in_output_hotzone: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_in_output_hotzone** **(** :ref:`Object<class_Object>` in_node, :ref:`int<class_int>` in_port, :ref:`Vector2<class_Vector2>` mouse_position **)** |virtual| +:ref:`bool<class_bool>` **_is_in_output_hotzone**\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_GraphEdit_private_method__is_in_output_hotzone>` -Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone<class_GraphEdit_method__is_in_input_hotzone>`. +Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone<class_GraphEdit_private_method__is_in_input_hotzone>`. Below is a sample code to help get started: @@ -749,7 +939,7 @@ Below is a sample code to help get started: func _is_in_output_hotzone(in_node, in_port, mouse_position): var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical")) - var port_pos: Vector2 = in_node.get_position() + in_node.get_connection_output_position(in_port) - port_size / 2 + var port_pos: Vector2 = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2 var rect = Rect2(port_pos, port_size) return rect.has_point(mouse_position) @@ -758,11 +948,11 @@ Below is a sample code to help get started: ---- -.. _class_GraphEdit_method__is_node_hover_valid: +.. _class_GraphEdit_private_method__is_node_hover_valid: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_node_hover_valid** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** |virtual| +:ref:`bool<class_bool>` **_is_node_hover_valid**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_GraphEdit_private_method__is_node_hover_valid>` This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. @@ -795,7 +985,7 @@ In this example a connection to same node is suppressed: .. rst-class:: classref-method -void **add_valid_connection_type** **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** +|void| **add_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_add_valid_connection_type>` Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method. @@ -809,7 +999,7 @@ See also :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connecti .. rst-class:: classref-method -void **add_valid_left_disconnect_type** **(** :ref:`int<class_int>` type **)** +|void| **add_valid_left_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_add_valid_left_disconnect_type>` Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. See also :ref:`remove_valid_left_disconnect_type<class_GraphEdit_method_remove_valid_left_disconnect_type>`. @@ -821,7 +1011,7 @@ Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNo .. rst-class:: classref-method -void **add_valid_right_disconnect_type** **(** :ref:`int<class_int>` type **)** +|void| **add_valid_right_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_add_valid_right_disconnect_type>` Allows to disconnect nodes when dragging from the right port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. See also :ref:`remove_valid_right_disconnect_type<class_GraphEdit_method_remove_valid_right_disconnect_type>`. @@ -833,7 +1023,7 @@ Allows to disconnect nodes when dragging from the right port of the :ref:`GraphN .. rst-class:: classref-method -void **arrange_nodes** **(** **)** +|void| **arrange_nodes**\ (\ ) :ref:`🔗<class_GraphEdit_method_arrange_nodes>` Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. @@ -841,11 +1031,23 @@ Rearranges selected nodes in a layout with minimum crossings between connections ---- +.. _class_GraphEdit_method_attach_graph_element_to_frame: + +.. rst-class:: classref-method + +|void| **attach_graph_element_to_frame**\ (\ element\: :ref:`StringName<class_StringName>`, frame\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GraphEdit_method_attach_graph_element_to_frame>` + +Attaches the ``element`` :ref:`GraphElement<class_GraphElement>` to the ``frame`` :ref:`GraphFrame<class_GraphFrame>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_clear_connections: .. rst-class:: classref-method -void **clear_connections** **(** **)** +|void| **clear_connections**\ (\ ) :ref:`🔗<class_GraphEdit_method_clear_connections>` Removes all connections between nodes. @@ -857,7 +1059,7 @@ Removes all connections between nodes. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_node** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_node**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_connect_node>` Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`. If the connection already exists, no connection is created. @@ -865,11 +1067,23 @@ Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNo ---- +.. _class_GraphEdit_method_detach_graph_element_from_frame: + +.. rst-class:: classref-method + +|void| **detach_graph_element_from_frame**\ (\ element\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GraphEdit_method_detach_graph_element_from_frame>` + +Detaches the ``element`` :ref:`GraphElement<class_GraphElement>` from the :ref:`GraphFrame<class_GraphFrame>` it is currently attached to. + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_method_disconnect_node: .. rst-class:: classref-method -void **disconnect_node** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** +|void| **disconnect_node**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_disconnect_node>` Removes the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`. If the connection does not exist, no connection is removed. @@ -881,7 +1095,7 @@ Removes the connection between the ``from_port`` of the ``from_node`` :ref:`Grap .. rst-class:: classref-method -void **force_connection_drag_end** **(** **)** +|void| **force_connection_drag_end**\ (\ ) :ref:`🔗<class_GraphEdit_method_force_connection_drag_end>` Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor. @@ -889,6 +1103,43 @@ This is best used together with :ref:`connection_drag_started<class_GraphEdit_si \ **Note:** This method suppresses any other connection request signals apart from :ref:`connection_drag_ended<class_GraphEdit_signal_connection_drag_ended>`. +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_method_get_attached_nodes_of_frame: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_attached_nodes_of_frame**\ (\ frame\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GraphEdit_method_get_attached_nodes_of_frame>` + +Returns an array of node names that are attached to the :ref:`GraphFrame<class_GraphFrame>` with the given name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_method_get_closest_connection_at_point: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **get_closest_connection_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`, max_distance\: :ref:`float<class_float>` = 4.0\ ) |const| :ref:`🔗<class_GraphEdit_method_get_closest_connection_at_point>` + +Returns the closest connection to the given point in screen space. If no connection is found within ``max_distance`` pixels, an empty :ref:`Dictionary<class_Dictionary>` is returned. + +A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. + +For example, getting a connection at a given mouse position can be achieved like this: + + +.. tabs:: + + .. code-tab:: gdscript + + var connection = get_closest_connection_at_point(mouse_event.get_position()) + + + .. rst-class:: classref-item-separator ---- @@ -897,7 +1148,7 @@ This is best used together with :ref:`connection_drag_started<class_GraphEdit_si .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_connection_line** **(** :ref:`Vector2<class_Vector2>` from_node, :ref:`Vector2<class_Vector2>` to_node **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_connection_line**\ (\ from_node\: :ref:`Vector2<class_Vector2>`, to_node\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_GraphEdit_method_get_connection_line>` Returns the points which would make up a connection between ``from_node`` and ``to_node``. @@ -909,19 +1160,43 @@ Returns the points which would make up a connection between ``from_node`` and `` .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_connection_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_connection_list**\ (\ ) |const| :ref:`🔗<class_GraphEdit_method_get_connection_list>` + +Returns an :ref:`Array<class_Array>` containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_method_get_connections_intersecting_with_rect: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_connections_intersecting_with_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_GraphEdit_method_get_connections_intersecting_with_rect>` -Returns 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" }``. +Returns an :ref:`Array<class_Array>` containing the list of connections that intersect with the given :ref:`Rect2<class_Rect2>`. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_method_get_zoom_hbox: +.. _class_GraphEdit_method_get_element_frame: .. rst-class:: classref-method -:ref:`HBoxContainer<class_HBoxContainer>` **get_zoom_hbox** **(** **)** +:ref:`GraphFrame<class_GraphFrame>` **get_element_frame**\ (\ element\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_GraphEdit_method_get_element_frame>` + +Returns the :ref:`GraphFrame<class_GraphFrame>` that contains the :ref:`GraphElement<class_GraphElement>` with the given name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_method_get_menu_hbox: + +.. rst-class:: classref-method + +:ref:`HBoxContainer<class_HBoxContainer>` **get_menu_hbox**\ (\ ) :ref:`🔗<class_GraphEdit_method_get_menu_hbox>` Gets the :ref:`HBoxContainer<class_HBoxContainer>` that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it. @@ -935,7 +1210,7 @@ Gets the :ref:`HBoxContainer<class_HBoxContainer>` that contains the zooming and .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_node_connected** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port **)** +:ref:`bool<class_bool>` **is_node_connected**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_is_node_connected>` Returns ``true`` if the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` is connected to the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`. @@ -947,7 +1222,7 @@ Returns ``true`` if the ``from_port`` of the ``from_node`` :ref:`GraphNode<class .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_connection_type** **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** |const| +:ref:`bool<class_bool>` **is_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphEdit_method_is_valid_connection_type>` Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method. @@ -961,7 +1236,7 @@ See also :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connec .. rst-class:: classref-method -void **remove_valid_connection_type** **(** :ref:`int<class_int>` from_type, :ref:`int<class_int>` to_type **)** +|void| **remove_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_remove_valid_connection_type>` Disallows the connection between two different port types previously allowed by :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>`. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method. @@ -975,7 +1250,7 @@ See also :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connecti .. rst-class:: classref-method -void **remove_valid_left_disconnect_type** **(** :ref:`int<class_int>` type **)** +|void| **remove_valid_left_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_remove_valid_left_disconnect_type>` Disallows to disconnect nodes when dragging from the left port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_left_disconnect_type<class_GraphEdit_method_add_valid_left_disconnect_type>`. @@ -987,7 +1262,7 @@ Disallows to disconnect nodes when dragging from the left port of the :ref:`Grap .. rst-class:: classref-method -void **remove_valid_right_disconnect_type** **(** :ref:`int<class_int>` type **)** +|void| **remove_valid_right_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphEdit_method_remove_valid_right_disconnect_type>` Disallows to disconnect nodes when dragging from the right port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_right_disconnect_type<class_GraphEdit_method_add_valid_right_disconnect_type>`. @@ -999,9 +1274,9 @@ Disallows to disconnect nodes when dragging from the right port of the :ref:`Gra .. rst-class:: classref-method -void **set_connection_activity** **(** :ref:`StringName<class_StringName>` from_node, :ref:`int<class_int>` from_port, :ref:`StringName<class_StringName>` to_node, :ref:`int<class_int>` to_port, :ref:`float<class_float>` amount **)** +|void| **set_connection_activity**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) :ref:`🔗<class_GraphEdit_method_set_connection_activity>` -Sets the coloration of the connection between ``from_node``'s ``from_port`` and ``to_node``'s ``to_port`` with the color provided in the :ref:`activity<class_GraphEdit_theme_color_activity>` theme property. +Sets the coloration of the connection between ``from_node``'s ``from_port`` and ``to_node``'s ``to_port`` with the color provided in the :ref:`activity<class_GraphEdit_theme_color_activity>` theme property. The color is linearly interpolated between the connection color and the activity color using ``amount`` as weight. .. rst-class:: classref-item-separator @@ -1011,7 +1286,7 @@ Sets the coloration of the connection between ``from_node``'s ``from_port`` and .. rst-class:: classref-method -void **set_selected** **(** :ref:`Node<class_Node>` node **)** +|void| **set_selected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_GraphEdit_method_set_selected>` Sets the specified ``node`` as the one selected. @@ -1028,11 +1303,45 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **activity** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **activity** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_GraphEdit_theme_color_activity>` -.. container:: contribute +Color the connection line is interpolated to based on the activity value of a connection (see :ref:`set_connection_activity<class_GraphEdit_method_set_connection_activity>`). - There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_theme_color_connection_hover_tint_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **connection_hover_tint_color** = ``Color(0, 0, 0, 0.3)`` :ref:`🔗<class_GraphEdit_theme_color_connection_hover_tint_color>` + +Color which is blended with the connection line when the mouse is hovering over it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_theme_color_connection_rim_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **connection_rim_color** = ``Color(0.1, 0.1, 0.1, 0.6)`` :ref:`🔗<class_GraphEdit_theme_color_connection_rim_color>` + +Color of the rim around each connection line used for making intersecting lines more distinguishable. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_theme_color_connection_valid_target_tint_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **connection_valid_target_tint_color** = ``Color(1, 1, 1, 0.4)`` :ref:`🔗<class_GraphEdit_theme_color_connection_valid_target_tint_color>` + +Color which is blended with the connection line when the currently dragged connection is hovering over a valid target port. .. rst-class:: classref-item-separator @@ -1042,9 +1351,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **grid_major** = ``Color(1, 1, 1, 0.2)`` +:ref:`Color<class_Color>` **grid_major** = ``Color(1, 1, 1, 0.2)`` :ref:`🔗<class_GraphEdit_theme_color_grid_major>` -Color of major grid lines. +Color of major grid lines/dots. .. rst-class:: classref-item-separator @@ -1054,9 +1363,9 @@ Color of major grid lines. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **grid_minor** = ``Color(1, 1, 1, 0.05)`` +:ref:`Color<class_Color>` **grid_minor** = ``Color(1, 1, 1, 0.05)`` :ref:`🔗<class_GraphEdit_theme_color_grid_minor>` -Color of minor grid lines. +Color of minor grid lines/dots. .. rst-class:: classref-item-separator @@ -1066,7 +1375,7 @@ Color of minor grid lines. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **selection_fill** = ``Color(1, 1, 1, 0.3)`` +:ref:`Color<class_Color>` **selection_fill** = ``Color(1, 1, 1, 0.3)`` :ref:`🔗<class_GraphEdit_theme_color_selection_fill>` The fill color of the selection rectangle. @@ -1078,7 +1387,7 @@ The fill color of the selection rectangle. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **selection_stroke** = ``Color(1, 1, 1, 0.8)`` +:ref:`Color<class_Color>` **selection_stroke** = ``Color(1, 1, 1, 0.8)`` :ref:`🔗<class_GraphEdit_theme_color_selection_stroke>` The outline color of the selection rectangle. @@ -1090,7 +1399,7 @@ The outline color of the selection rectangle. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **port_hotzone_inner_extent** = ``22`` +:ref:`int<class_int>` **port_hotzone_inner_extent** = ``22`` :ref:`🔗<class_GraphEdit_theme_constant_port_hotzone_inner_extent>` The horizontal range within which a port can be grabbed (inner side). @@ -1102,7 +1411,7 @@ The horizontal range within which a port can be grabbed (inner side). .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **port_hotzone_outer_extent** = ``26`` +:ref:`int<class_int>` **port_hotzone_outer_extent** = ``26`` :ref:`🔗<class_GraphEdit_theme_constant_port_hotzone_outer_extent>` The horizontal range within which a port can be grabbed (outer side). @@ -1110,51 +1419,59 @@ The horizontal range within which a port can be grabbed (outer side). ---- -.. _class_GraphEdit_theme_icon_layout: +.. _class_GraphEdit_theme_icon_grid_toggle: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **layout** - -.. container:: contribute +:ref:`Texture2D<class_Texture2D>` **grid_toggle** :ref:`🔗<class_GraphEdit_theme_icon_grid_toggle>` - There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The icon for the grid toggle button. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_theme_icon_minimap: +.. _class_GraphEdit_theme_icon_layout: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **minimap** +:ref:`Texture2D<class_Texture2D>` **layout** :ref:`🔗<class_GraphEdit_theme_icon_layout>` -.. container:: contribute +The icon for the layout button for auto-arranging the graph. - There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_theme_icon_minimap_toggle: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **minimap_toggle** :ref:`🔗<class_GraphEdit_theme_icon_minimap_toggle>` + +The icon for the minimap toggle button. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_theme_icon_minus: +.. _class_GraphEdit_theme_icon_snapping_toggle: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **minus** +:ref:`Texture2D<class_Texture2D>` **snapping_toggle** :ref:`🔗<class_GraphEdit_theme_icon_snapping_toggle>` -The icon for the zoom out button. +The icon for the snapping toggle button. .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_theme_icon_more: +.. _class_GraphEdit_theme_icon_zoom_in: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **more** +:ref:`Texture2D<class_Texture2D>` **zoom_in** :ref:`🔗<class_GraphEdit_theme_icon_zoom_in>` The icon for the zoom in button. @@ -1162,11 +1479,23 @@ The icon for the zoom in button. ---- -.. _class_GraphEdit_theme_icon_reset: +.. _class_GraphEdit_theme_icon_zoom_out: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **reset** +:ref:`Texture2D<class_Texture2D>` **zoom_out** :ref:`🔗<class_GraphEdit_theme_icon_zoom_out>` + +The icon for the zoom out button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_theme_icon_zoom_reset: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **zoom_reset** :ref:`🔗<class_GraphEdit_theme_icon_zoom_reset>` The icon for the zoom reset button. @@ -1174,23 +1503,25 @@ The icon for the zoom reset button. ---- -.. _class_GraphEdit_theme_icon_snap: +.. _class_GraphEdit_theme_style_menu_panel: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **snap** +:ref:`StyleBox<class_StyleBox>` **menu_panel** :ref:`🔗<class_GraphEdit_theme_style_menu_panel>` -The icon for the snap toggle button. +.. container:: contribute + + There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! .. rst-class:: classref-item-separator ---- -.. _class_GraphEdit_theme_style_bg: +.. _class_GraphEdit_theme_style_panel: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **bg** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_GraphEdit_theme_style_panel>` The background drawn under the grid. @@ -1201,3 +1532,4 @@ The background drawn under the grid. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_graphelement.rst b/classes/class_graphelement.rst new file mode 100644 index 00000000000..c8e1fc3821d --- /dev/null +++ b/classes/class_graphelement.rst @@ -0,0 +1,277 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphElement.xml. + +.. _class_GraphElement: + +GraphElement +============ + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`GraphFrame<class_GraphFrame>`, :ref:`GraphNode<class_GraphNode>` + +A container that represents a basic element that can be placed inside a :ref:`GraphEdit<class_GraphEdit>` control. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**GraphElement** allows to create custom elements for a :ref:`GraphEdit<class_GraphEdit>` graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see :ref:`GraphNode<class_GraphNode>`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`draggable<class_GraphElement_property_draggable>` | ``true`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`position_offset<class_GraphElement_property_position_offset>` | ``Vector2(0, 0)`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`resizable<class_GraphElement_property_resizable>` | ``false`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`selectable<class_GraphElement_property_selectable>` | ``true`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`selected<class_GraphElement_property_selected>` | ``false`` | + +-------------------------------+---------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`resizer<class_GraphElement_theme_icon_resizer>` | + +-----------------------------------+-------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_GraphElement_signal_delete_request: + +.. rst-class:: classref-signal + +**delete_request**\ (\ ) :ref:`🔗<class_GraphElement_signal_delete_request>` + +Emitted when removing the GraphElement is requested. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_dragged: + +.. rst-class:: classref-signal + +**dragged**\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphElement_signal_dragged>` + +Emitted when the GraphElement is dragged. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_node_deselected: + +.. rst-class:: classref-signal + +**node_deselected**\ (\ ) :ref:`🔗<class_GraphElement_signal_node_deselected>` + +Emitted when the GraphElement is deselected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_node_selected: + +.. rst-class:: classref-signal + +**node_selected**\ (\ ) :ref:`🔗<class_GraphElement_signal_node_selected>` + +Emitted when the GraphElement is selected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_position_offset_changed: + +.. rst-class:: classref-signal + +**position_offset_changed**\ (\ ) :ref:`🔗<class_GraphElement_signal_position_offset_changed>` + +Emitted when the GraphElement is moved. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_raise_request: + +.. rst-class:: classref-signal + +**raise_request**\ (\ ) :ref:`🔗<class_GraphElement_signal_raise_request>` + +Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_resize_end: + +.. rst-class:: classref-signal + +**resize_end**\ (\ new_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphElement_signal_resize_end>` + +Emitted when releasing the mouse button after dragging the resizer handle (see :ref:`resizable<class_GraphElement_property_resizable>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_signal_resize_request: + +.. rst-class:: classref-signal + +**resize_request**\ (\ new_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_GraphElement_signal_resize_request>` + +Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see :ref:`resizable<class_GraphElement_property_resizable>`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GraphElement_property_draggable: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **draggable** = ``true`` :ref:`🔗<class_GraphElement_property_draggable>` + +.. rst-class:: classref-property-setget + +- |void| **set_draggable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_draggable**\ (\ ) + +If ``true``, the user can drag the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_position_offset: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **position_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_GraphElement_property_position_offset>` + +.. rst-class:: classref-property-setget + +- |void| **set_position_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position_offset**\ (\ ) + +The offset of the GraphElement, relative to the scroll offset of the :ref:`GraphEdit<class_GraphEdit>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_resizable: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **resizable** = ``false`` :ref:`🔗<class_GraphElement_property_resizable>` + +.. rst-class:: classref-property-setget + +- |void| **set_resizable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_resizable**\ (\ ) + +If ``true``, the user can resize the GraphElement. + +\ **Note:** Dragging the handle will only emit the :ref:`resize_request<class_GraphElement_signal_resize_request>` and :ref:`resize_end<class_GraphElement_signal_resize_end>` signals, the GraphElement needs to be resized manually. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_selectable: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **selectable** = ``true`` :ref:`🔗<class_GraphElement_property_selectable>` + +.. rst-class:: classref-property-setget + +- |void| **set_selectable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_selectable**\ (\ ) + +If ``true``, the user can select the GraphElement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphElement_property_selected: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **selected** = ``false`` :ref:`🔗<class_GraphElement_property_selected>` + +.. rst-class:: classref-property-setget + +- |void| **set_selected**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_selected**\ (\ ) + +If ``true``, the GraphElement is selected. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_GraphElement_theme_icon_resizer: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **resizer** :ref:`🔗<class_GraphElement_theme_icon_resizer>` + +The icon used for the resizer, visible when :ref:`resizable<class_GraphElement_property_resizable>` is enabled. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_graphframe.rst b/classes/class_graphframe.rst new file mode 100644 index 00000000000..0c4a4a8c25e --- /dev/null +++ b/classes/class_graphframe.rst @@ -0,0 +1,299 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphFrame.xml. + +.. _class_GraphFrame: + +GraphFrame +========== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`GraphElement<class_GraphElement>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +GraphFrame is a special :ref:`GraphElement<class_GraphElement>` that can be used to organize other :ref:`GraphElement<class_GraphElement>`\ s inside a :ref:`GraphEdit<class_GraphEdit>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +GraphFrame is a special :ref:`GraphElement<class_GraphElement>` to which other :ref:`GraphElement<class_GraphElement>`\ s can be attached. It can be configured to automatically resize to enclose all attached :ref:`GraphElement<class_GraphElement>`\ s. If the frame is moved, all the attached :ref:`GraphElement<class_GraphElement>`\ s inside it will be moved as well. + +A GraphFrame is always kept behind the connection layer and other :ref:`GraphElement<class_GraphElement>`\ s inside a :ref:`GraphEdit<class_GraphEdit>`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`autoshrink_enabled<class_GraphFrame_property_autoshrink_enabled>` | ``true`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`autoshrink_margin<class_GraphFrame_property_autoshrink_margin>` | ``40`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`drag_margin<class_GraphFrame_property_drag_margin>` | ``16`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``0`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`tint_color<class_GraphFrame_property_tint_color>` | ``Color(0.3, 0.3, 0.3, 0.75)`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`tint_color_enabled<class_GraphFrame_property_tint_color_enabled>` | ``false`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`title<class_GraphFrame_property_title>` | ``""`` | + +----------------------------------------------+-------------------------------------------------------------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_titlebar_hbox<class_GraphFrame_method_get_titlebar_hbox>`\ (\ ) | + +-------------------------------------------+---------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`resizer_color<class_GraphFrame_theme_color_resizer_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_GraphFrame_theme_style_panel>` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel_selected<class_GraphFrame_theme_style_panel_selected>` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar<class_GraphFrame_theme_style_titlebar>` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar_selected<class_GraphFrame_theme_style_titlebar_selected>` | | + +---------------------------------+--------------------------------------------------------------------------+-----------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_GraphFrame_signal_autoshrink_changed: + +.. rst-class:: classref-signal + +**autoshrink_changed**\ (\ ) :ref:`🔗<class_GraphFrame_signal_autoshrink_changed>` + +Emitted when :ref:`autoshrink_enabled<class_GraphFrame_property_autoshrink_enabled>` or :ref:`autoshrink_margin<class_GraphFrame_property_autoshrink_margin>` changes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_GraphFrame_property_autoshrink_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **autoshrink_enabled** = ``true`` :ref:`🔗<class_GraphFrame_property_autoshrink_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_autoshrink_enabled**\ (\ ) + +If ``true``, the frame's rect will be adjusted automatically to enclose all attached :ref:`GraphElement<class_GraphElement>`\ s. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_autoshrink_margin: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **autoshrink_margin** = ``40`` :ref:`🔗<class_GraphFrame_property_autoshrink_margin>` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_margin**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_autoshrink_margin**\ (\ ) + +The margin around the attached nodes that is used to calculate the size of the frame when :ref:`autoshrink_enabled<class_GraphFrame_property_autoshrink_enabled>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_drag_margin: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **drag_margin** = ``16`` :ref:`🔗<class_GraphFrame_property_drag_margin>` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_margin**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_drag_margin**\ (\ ) + +The margin inside the frame that can be used to drag the frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_tint_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **tint_color** = ``Color(0.3, 0.3, 0.3, 0.75)`` :ref:`🔗<class_GraphFrame_property_tint_color>` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_tint_color**\ (\ ) + +The color of the frame when :ref:`tint_color_enabled<class_GraphFrame_property_tint_color_enabled>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_tint_color_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **tint_color_enabled** = ``false`` :ref:`🔗<class_GraphFrame_property_tint_color_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_tint_color_enabled**\ (\ ) + +If ``true``, the tint color will be used to tint the frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_property_title: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_GraphFrame_property_title>` + +.. rst-class:: classref-property-setget + +- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_title**\ (\ ) + +Title of the frame. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_GraphFrame_method_get_titlebar_hbox: + +.. rst-class:: classref-method + +:ref:`HBoxContainer<class_HBoxContainer>` **get_titlebar_hbox**\ (\ ) :ref:`🔗<class_GraphFrame_method_get_titlebar_hbox>` + +Returns the :ref:`HBoxContainer<class_HBoxContainer>` used for the title bar, only containing a :ref:`Label<class_Label>` for displaying the title by default. + +This can be used to add custom controls to the title bar such as option or close buttons. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_GraphFrame_theme_color_resizer_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_GraphFrame_theme_color_resizer_color>` + +The color modulation applied to the resizer icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_panel: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_GraphFrame_theme_style_panel>` + +The default :ref:`StyleBox<class_StyleBox>` used for the background of the **GraphFrame**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_panel_selected: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **panel_selected** :ref:`🔗<class_GraphFrame_theme_style_panel_selected>` + +The :ref:`StyleBox<class_StyleBox>` used for the background of the **GraphFrame** when it is selected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_titlebar: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **titlebar** :ref:`🔗<class_GraphFrame_theme_style_titlebar>` + +The :ref:`StyleBox<class_StyleBox>` used for the title bar of the **GraphFrame**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphFrame_theme_style_titlebar_selected: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **titlebar_selected** :ref:`🔗<class_GraphFrame_theme_style_titlebar_selected>` + +The :ref:`StyleBox<class_StyleBox>` used for the title bar of the **GraphFrame** when it is selected. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_graphnode.rst b/classes/class_graphnode.rst index 1fecad97904..7f131cb9151 100644 --- a/classes/class_graphnode.rst +++ b/classes/class_graphnode.rst @@ -10,7 +10,9 @@ GraphNode ========= -**Inherits:** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`GraphElement<class_GraphElement>` **<** :ref:`Container<class_Container>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A container with connection ports, representing a node in a :ref:`GraphEdit<class_GraphEdit>`. @@ -25,7 +27,7 @@ Each **GraphNode** slot is defined by its index and can provide the node with up Slots can be configured in the Inspector dock once you add at least one child :ref:`Control<class_Control>`. The properties are grouped by each slot's index in the "Slot" section. -\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that, :ref:`GraphEdit<class_GraphEdit>` uses the port's index and not the slot's index. You can use :ref:`get_connection_input_slot<class_GraphNode_method_get_connection_input_slot>` and :ref:`get_connection_output_slot<class_GraphNode_method_get_connection_output_slot>` to get the slot index from the port index. +\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that :ref:`GraphEdit<class_GraphEdit>` uses the port's index and not the slot's index. You can use :ref:`get_input_port_slot<class_GraphNode_method_get_input_port_slot>` and :ref:`get_output_port_slot<class_GraphNode_method_get_output_port_slot>` to get the slot index from the port index. .. rst-class:: classref-reftable-group @@ -35,31 +37,13 @@ Properties .. table:: :widths: auto - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`comment<class_GraphNode_property_comment>` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`draggable<class_GraphNode_property_draggable>` | ``true`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`language<class_GraphNode_property_language>` | ``""`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``0`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`Overlay<enum_GraphNode_Overlay>` | :ref:`overlay<class_GraphNode_property_overlay>` | ``0`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`position_offset<class_GraphNode_property_position_offset>` | ``Vector2(0, 0)`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`resizable<class_GraphNode_property_resizable>` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`selectable<class_GraphNode_property_selectable>` | ``true`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`selected<class_GraphNode_property_selected>` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`show_close<class_GraphNode_property_show_close>` | ``false`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_GraphNode_property_text_direction>` | ``0`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`title<class_GraphNode_property_title>` | ``""`` | - +--------------------------------------------------+------------------------------------------------------------------+-----------------------------------------------------------------------+ + +----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`ignore_invalid_connection_type<class_GraphNode_property_ignore_invalid_connection_type>` | ``false`` | + +----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``0`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) | + +----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`title<class_GraphNode_property_title>` | ``""`` | + +----------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -69,65 +53,73 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_all_slots<class_GraphNode_method_clear_all_slots>` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_slot<class_GraphNode_method_clear_slot>` **(** :ref:`int<class_int>` slot_index **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_connection_input_color<class_GraphNode_method_get_connection_input_color>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_input_count<class_GraphNode_method_get_connection_input_count>` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_input_height<class_GraphNode_method_get_connection_input_height>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_connection_input_position<class_GraphNode_method_get_connection_input_position>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_input_slot<class_GraphNode_method_get_connection_input_slot>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_input_type<class_GraphNode_method_get_connection_input_type>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_connection_output_color<class_GraphNode_method_get_connection_output_color>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_output_count<class_GraphNode_method_get_connection_output_count>` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_output_height<class_GraphNode_method_get_connection_output_height>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_connection_output_position<class_GraphNode_method_get_connection_output_position>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_output_slot<class_GraphNode_method_get_connection_output_slot>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_output_type<class_GraphNode_method_get_connection_output_type>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_slot_color_left<class_GraphNode_method_get_slot_color_left>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_slot_color_right<class_GraphNode_method_get_slot_color_right>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_slot_type_left<class_GraphNode_method_get_slot_type_left>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_slot_type_right<class_GraphNode_method_get_slot_type_right>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_slot_draw_stylebox<class_GraphNode_method_is_slot_draw_stylebox>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_left<class_GraphNode_method_is_slot_enabled_left>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_right<class_GraphNode_method_is_slot_enabled_right>` **(** :ref:`int<class_int>` slot_index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot<class_GraphNode_method_set_slot>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable_left_port, :ref:`int<class_int>` type_left, :ref:`Color<class_Color>` color_left, :ref:`bool<class_bool>` enable_right_port, :ref:`int<class_int>` type_right, :ref:`Color<class_Color>` color_right, :ref:`Texture2D<class_Texture2D>` custom_icon_left=null, :ref:`Texture2D<class_Texture2D>` custom_icon_right=null, :ref:`bool<class_bool>` draw_stylebox=true **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_color_left<class_GraphNode_method_set_slot_color_left>` **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_color_right<class_GraphNode_method_set_slot_color_right>` **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_draw_stylebox<class_GraphNode_method_set_slot_draw_stylebox>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_enabled_left<class_GraphNode_method_set_slot_enabled_left>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_enabled_right<class_GraphNode_method_set_slot_enabled_right>` **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_type_left<class_GraphNode_method_set_slot_type_left>` **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_slot_type_right<class_GraphNode_method_set_slot_type_right>` **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw_port<class_GraphNode_private_method__draw_port>`\ (\ slot_index\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, left\: :ref:`bool<class_bool>`, color\: :ref:`Color<class_Color>`\ ) |virtual| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_all_slots<class_GraphNode_method_clear_all_slots>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_slot<class_GraphNode_method_clear_slot>`\ (\ slot_index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_input_port_color<class_GraphNode_method_get_input_port_color>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_input_port_count<class_GraphNode_method_get_input_port_count>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_input_port_position<class_GraphNode_method_get_input_port_position>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_input_port_slot<class_GraphNode_method_get_input_port_slot>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_input_port_type<class_GraphNode_method_get_input_port_type>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_output_port_color<class_GraphNode_method_get_output_port_color>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_output_port_count<class_GraphNode_method_get_output_port_count>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_output_port_position<class_GraphNode_method_get_output_port_position>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_output_port_slot<class_GraphNode_method_get_output_port_slot>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_output_port_type<class_GraphNode_method_get_output_port_type>`\ (\ port_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_slot_color_left<class_GraphNode_method_get_slot_color_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_slot_color_right<class_GraphNode_method_get_slot_color_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_slot_custom_icon_left<class_GraphNode_method_get_slot_custom_icon_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_slot_custom_icon_right<class_GraphNode_method_get_slot_custom_icon_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_slot_type_left<class_GraphNode_method_get_slot_type_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_slot_type_right<class_GraphNode_method_get_slot_type_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_titlebar_hbox<class_GraphNode_method_get_titlebar_hbox>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_slot_draw_stylebox<class_GraphNode_method_is_slot_draw_stylebox>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_left<class_GraphNode_method_is_slot_enabled_left>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_slot_enabled_right<class_GraphNode_method_is_slot_enabled_right>`\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot<class_GraphNode_method_set_slot>`\ (\ slot_index\: :ref:`int<class_int>`, enable_left_port\: :ref:`bool<class_bool>`, type_left\: :ref:`int<class_int>`, color_left\: :ref:`Color<class_Color>`, enable_right_port\: :ref:`bool<class_bool>`, type_right\: :ref:`int<class_int>`, color_right\: :ref:`Color<class_Color>`, custom_icon_left\: :ref:`Texture2D<class_Texture2D>` = null, custom_icon_right\: :ref:`Texture2D<class_Texture2D>` = null, draw_stylebox\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_color_left<class_GraphNode_method_set_slot_color_left>`\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_color_right<class_GraphNode_method_set_slot_color_right>`\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_custom_icon_left<class_GraphNode_method_set_slot_custom_icon_left>`\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_custom_icon_right<class_GraphNode_method_set_slot_custom_icon_right>`\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_draw_stylebox<class_GraphNode_method_set_slot_draw_stylebox>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_enabled_left<class_GraphNode_method_set_slot_enabled_left>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_enabled_right<class_GraphNode_method_set_slot_enabled_right>`\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_type_left<class_GraphNode_method_set_slot_type_left>`\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_slot_type_right<class_GraphNode_method_set_slot_type_right>`\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -137,47 +129,25 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`close_color<class_GraphNode_theme_color_close_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`resizer_color<class_GraphNode_theme_color_resizer_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`title_color<class_GraphNode_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`close_h_offset<class_GraphNode_theme_constant_close_h_offset>` | ``12`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`close_offset<class_GraphNode_theme_constant_close_offset>` | ``22`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`port_offset<class_GraphNode_theme_constant_port_offset>` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`separation<class_GraphNode_theme_constant_separation>` | ``2`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`title_h_offset<class_GraphNode_theme_constant_title_h_offset>` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`title_offset<class_GraphNode_theme_constant_title_offset>` | ``26`` | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font<class_Font>` | :ref:`title_font<class_GraphNode_theme_font_title_font>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`close<class_GraphNode_theme_icon_close>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`port<class_GraphNode_theme_icon_port>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`resizer<class_GraphNode_theme_icon_resizer>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`breakpoint<class_GraphNode_theme_style_breakpoint>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`comment<class_GraphNode_theme_style_comment>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`comment_focus<class_GraphNode_theme_style_comment_focus>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`frame<class_GraphNode_theme_style_frame>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`position<class_GraphNode_theme_style_position>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_frame<class_GraphNode_theme_style_selected_frame>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`slot<class_GraphNode_theme_style_slot>` | | - +-----------------------------------+----------------------------------------------------------------------+-----------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`resizer_color<class_GraphNode_theme_color_resizer_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`port_h_offset<class_GraphNode_theme_constant_port_h_offset>` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`separation<class_GraphNode_theme_constant_separation>` | ``2`` | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`port<class_GraphNode_theme_icon_port>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_GraphNode_theme_style_panel>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel_selected<class_GraphNode_theme_style_panel_selected>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`slot<class_GraphNode_theme_style_slot>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar<class_GraphNode_theme_style_titlebar>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`titlebar_selected<class_GraphNode_theme_style_titlebar_selected>` | | + +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -188,95 +158,11 @@ Theme Properties Signals ------- -.. _class_GraphNode_signal_close_request: - -.. rst-class:: classref-signal - -**close_request** **(** **)** - -Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see :ref:`show_close<class_GraphNode_property_show_close>`). - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_dragged: - -.. rst-class:: classref-signal - -**dragged** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)** - -Emitted when the GraphNode is dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_node_deselected: - -.. rst-class:: classref-signal - -**node_deselected** **(** **)** - -Emitted when the GraphNode is deselected. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_node_selected: - -.. rst-class:: classref-signal - -**node_selected** **(** **)** - -Emitted when the GraphNode is selected. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_position_offset_changed: - -.. rst-class:: classref-signal - -**position_offset_changed** **(** **)** - -Emitted when the GraphNode is moved. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_raise_request: - -.. rst-class:: classref-signal - -**raise_request** **(** **)** - -Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_signal_resize_request: - -.. rst-class:: classref-signal - -**resize_request** **(** :ref:`Vector2<class_Vector2>` new_minsize **)** - -Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see :ref:`resizable<class_GraphNode_property_resizable>`). - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_signal_slot_updated: .. rst-class:: classref-signal -**slot_updated** **(** :ref:`int<class_int>` idx **)** +**slot_updated**\ (\ slot_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_signal_slot_updated>` Emitted when any GraphNode's slot is updated. @@ -286,457 +172,285 @@ Emitted when any GraphNode's slot is updated. .. rst-class:: classref-descriptions-group -Enumerations ------------- - -.. _enum_GraphNode_Overlay: - -.. rst-class:: classref-enumeration - -enum **Overlay**: - -.. _class_GraphNode_constant_OVERLAY_DISABLED: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_DISABLED** = ``0`` - -No overlay is shown. - -.. _class_GraphNode_constant_OVERLAY_BREAKPOINT: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_BREAKPOINT** = ``1`` - -Show overlay set in the :ref:`breakpoint<class_GraphNode_theme_style_breakpoint>` theme property. - -.. _class_GraphNode_constant_OVERLAY_POSITION: - -.. rst-class:: classref-enumeration-constant - -:ref:`Overlay<enum_GraphNode_Overlay>` **OVERLAY_POSITION** = ``2`` - -Show overlay set in the :ref:`position<class_GraphNode_theme_style_position>` theme property. - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - Property Descriptions --------------------- -.. _class_GraphNode_property_comment: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **comment** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_comment** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_comment** **(** **)** - -If ``true``, the GraphNode is a comment node. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_draggable: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **draggable** = ``true`` - -.. rst-class:: classref-property-setget - -- void **set_draggable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_draggable** **(** **)** - -If ``true``, the user can drag the GraphNode. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_language: - -.. rst-class:: classref-property - -:ref:`String<class_String>` **language** = ``""`` - -.. rst-class:: classref-property-setget - -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** - -Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_overlay: - -.. rst-class:: classref-property - -:ref:`Overlay<enum_GraphNode_Overlay>` **overlay** = ``0`` - -.. rst-class:: classref-property-setget - -- void **set_overlay** **(** :ref:`Overlay<enum_GraphNode_Overlay>` value **)** -- :ref:`Overlay<enum_GraphNode_Overlay>` **get_overlay** **(** **)** - -Sets the overlay shown above the GraphNode. See :ref:`Overlay<enum_GraphNode_Overlay>`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_position_offset: - -.. rst-class:: classref-property - -:ref:`Vector2<class_Vector2>` **position_offset** = ``Vector2(0, 0)`` - -.. rst-class:: classref-property-setget - -- void **set_position_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position_offset** **(** **)** - -The offset of the GraphNode, relative to the scroll offset of the :ref:`GraphEdit<class_GraphEdit>`. - -\ **Note:** You cannot use position offset directly, as :ref:`GraphEdit<class_GraphEdit>` is a :ref:`Container<class_Container>`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_resizable: - -.. rst-class:: classref-property - -:ref:`bool<class_bool>` **resizable** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_resizable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_resizable** **(** **)** - -If ``true``, the user can resize the GraphNode. - -\ **Note:** Dragging the handle will only emit the :ref:`resize_request<class_GraphNode_signal_resize_request>` signal, the GraphNode needs to be resized manually. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_property_selectable: +.. _class_GraphNode_property_ignore_invalid_connection_type: .. rst-class:: classref-property -:ref:`bool<class_bool>` **selectable** = ``true`` +:ref:`bool<class_bool>` **ignore_invalid_connection_type** = ``false`` :ref:`🔗<class_GraphNode_property_ignore_invalid_connection_type>` .. rst-class:: classref-property-setget -- void **set_selectable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_selectable** **(** **)** +- |void| **set_ignore_invalid_connection_type**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ignoring_valid_connection_type**\ (\ ) -If ``true``, the user can select the GraphNode. +If ``true``, you can connect ports with different types, even if the connection was not explicitly allowed in the parent :ref:`GraphEdit<class_GraphEdit>`. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_property_selected: +.. _class_GraphNode_property_title: .. rst-class:: classref-property -:ref:`bool<class_bool>` **selected** = ``false`` +:ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_GraphNode_property_title>` .. rst-class:: classref-property-setget -- void **set_selected** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_selected** **(** **)** +- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_title**\ (\ ) -If ``true``, the GraphNode is selected. +The text displayed in the GraphNode's title bar. -.. rst-class:: classref-item-separator +.. rst-class:: classref-section-separator ---- -.. _class_GraphNode_property_show_close: +.. rst-class:: classref-descriptions-group -.. rst-class:: classref-property +Method Descriptions +------------------- -:ref:`bool<class_bool>` **show_close** = ``false`` +.. _class_GraphNode_private_method__draw_port: -.. rst-class:: classref-property-setget +.. rst-class:: classref-method -- void **set_show_close_button** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_close_button_visible** **(** **)** +|void| **_draw_port**\ (\ slot_index\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, left\: :ref:`bool<class_bool>`, color\: :ref:`Color<class_Color>`\ ) |virtual| :ref:`🔗<class_GraphNode_private_method__draw_port>` -If ``true``, the close button will be visible. +.. container:: contribute -\ **Note:** Pressing it will only emit the :ref:`close_request<class_GraphNode_signal_close_request>` signal, the GraphNode needs to be removed manually. + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_property_text_direction: - -.. rst-class:: classref-property - -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +.. _class_GraphNode_method_clear_all_slots: -.. rst-class:: classref-property-setget +.. rst-class:: classref-method -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +|void| **clear_all_slots**\ (\ ) :ref:`🔗<class_GraphNode_method_clear_all_slots>` -Base text writing direction. +Disables all slots of the GraphNode. This will remove all input/output ports from the GraphNode. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_property_title: - -.. rst-class:: classref-property - -:ref:`String<class_String>` **title** = ``""`` - -.. rst-class:: classref-property-setget - -- void **set_title** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_title** **(** **)** - -The text displayed in the GraphNode's title bar. - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Method Descriptions -------------------- - -.. _class_GraphNode_method_clear_all_slots: +.. _class_GraphNode_method_clear_slot: .. rst-class:: classref-method -void **clear_all_slots** **(** **)** +|void| **clear_slot**\ (\ slot_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_clear_slot>` -Disables all input and output slots of the GraphNode. +Disables the slot with the given ``slot_index``. This will remove the corresponding input and output port from the GraphNode. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_clear_slot: +.. _class_GraphNode_method_get_input_port_color: .. rst-class:: classref-method -void **clear_slot** **(** :ref:`int<class_int>` slot_index **)** +:ref:`Color<class_Color>` **get_input_port_color**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_color>` -Disables input and output slot whose index is ``slot_index``. +Returns the :ref:`Color<class_Color>` of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_color: +.. _class_GraphNode_method_get_input_port_count: .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_connection_input_color** **(** :ref:`int<class_int>` port **)** +:ref:`int<class_int>` **get_input_port_count**\ (\ ) :ref:`🔗<class_GraphNode_method_get_input_port_count>` -Returns the :ref:`Color<class_Color>` of the input connection ``port``. +Returns the number of slots with an enabled input port. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_count: +.. _class_GraphNode_method_get_input_port_position: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_input_count** **(** **)** +:ref:`Vector2<class_Vector2>` **get_input_port_position**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_position>` -Returns the number of enabled input slots (connections) to the GraphNode. +Returns the position of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_height: +.. _class_GraphNode_method_get_input_port_slot: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_input_height** **(** :ref:`int<class_int>` port **)** +:ref:`int<class_int>` **get_input_port_slot**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_slot>` -Returns the height of the input connection ``port``. +Returns the corresponding slot index of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_position: +.. _class_GraphNode_method_get_input_port_type: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_connection_input_position** **(** :ref:`int<class_int>` port **)** +:ref:`int<class_int>` **get_input_port_type**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_input_port_type>` -Returns the position of the input connection ``port``. +Returns the type of the input port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_slot: +.. _class_GraphNode_method_get_output_port_color: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_input_slot** **(** :ref:`int<class_int>` port **)** +:ref:`Color<class_Color>` **get_output_port_color**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_color>` -Returns the corresponding slot index of the input connection ``port``. +Returns the :ref:`Color<class_Color>` of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_input_type: +.. _class_GraphNode_method_get_output_port_count: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_input_type** **(** :ref:`int<class_int>` port **)** +:ref:`int<class_int>` **get_output_port_count**\ (\ ) :ref:`🔗<class_GraphNode_method_get_output_port_count>` -Returns the type of the input connection ``port``. +Returns the number of slots with an enabled output port. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_color: +.. _class_GraphNode_method_get_output_port_position: .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_connection_output_color** **(** :ref:`int<class_int>` port **)** +:ref:`Vector2<class_Vector2>` **get_output_port_position**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_position>` -Returns the :ref:`Color<class_Color>` of the output connection ``port``. +Returns the position of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_count: +.. _class_GraphNode_method_get_output_port_slot: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_output_count** **(** **)** +:ref:`int<class_int>` **get_output_port_slot**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_slot>` -Returns the number of enabled output slots (connections) of the GraphNode. +Returns the corresponding slot index of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_height: +.. _class_GraphNode_method_get_output_port_type: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_output_height** **(** :ref:`int<class_int>` port **)** +:ref:`int<class_int>` **get_output_port_type**\ (\ port_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_get_output_port_type>` -Returns the height of the output connection ``port``. +Returns the type of the output port with the given ``port_idx``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_position: +.. _class_GraphNode_method_get_slot_color_left: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_connection_output_position** **(** :ref:`int<class_int>` port **)** +:ref:`Color<class_Color>` **get_slot_color_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_color_left>` -Returns the position of the output connection ``port``. +Returns the left (input) :ref:`Color<class_Color>` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_slot: +.. _class_GraphNode_method_get_slot_color_right: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_output_slot** **(** :ref:`int<class_int>` port **)** +:ref:`Color<class_Color>` **get_slot_color_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_color_right>` -Returns the corresponding slot index of the output connection ``port``. +Returns the right (output) :ref:`Color<class_Color>` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_connection_output_type: +.. _class_GraphNode_method_get_slot_custom_icon_left: .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_output_type** **(** :ref:`int<class_int>` port **)** +:ref:`Texture2D<class_Texture2D>` **get_slot_custom_icon_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_custom_icon_left>` -Returns the type of the output connection ``port``. +Returns the left (input) custom :ref:`Texture2D<class_Texture2D>` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_slot_color_left: +.. _class_GraphNode_method_get_slot_custom_icon_right: .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_slot_color_left** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_slot_custom_icon_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_custom_icon_right>` -Returns the left (input) :ref:`Color<class_Color>` of the slot ``slot_index``. +Returns the right (output) custom :ref:`Texture2D<class_Texture2D>` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_slot_color_right: +.. _class_GraphNode_method_get_slot_type_left: .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_slot_color_right** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`int<class_int>` **get_slot_type_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_type_left>` -Returns the right (output) :ref:`Color<class_Color>` of the slot ``slot_index``. +Returns the left (input) type of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_slot_type_left: +.. _class_GraphNode_method_get_slot_type_right: .. rst-class:: classref-method -:ref:`int<class_int>` **get_slot_type_left** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`int<class_int>` **get_slot_type_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_get_slot_type_right>` -Returns the left (input) type of the slot ``slot_index``. +Returns the right (output) type of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_get_slot_type_right: +.. _class_GraphNode_method_get_titlebar_hbox: .. rst-class:: classref-method -:ref:`int<class_int>` **get_slot_type_right** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`HBoxContainer<class_HBoxContainer>` **get_titlebar_hbox**\ (\ ) :ref:`🔗<class_GraphNode_method_get_titlebar_hbox>` -Returns the right (output) type of the slot ``slot_index``. +Returns the :ref:`HBoxContainer<class_HBoxContainer>` used for the title bar, only containing a :ref:`Label<class_Label>` for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons. .. rst-class:: classref-item-separator @@ -746,9 +460,9 @@ Returns the right (output) type of the slot ``slot_index``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_slot_draw_stylebox** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`bool<class_bool>` **is_slot_draw_stylebox**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_draw_stylebox>` -Returns true if the background :ref:`StyleBox<class_StyleBox>` of the slot ``slot_index`` is drawn. +Returns true if the background :ref:`StyleBox<class_StyleBox>` of the slot with the given ``slot_index`` is drawn. .. rst-class:: classref-item-separator @@ -758,9 +472,9 @@ Returns true if the background :ref:`StyleBox<class_StyleBox>` of the slot ``slo .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_slot_enabled_left** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`bool<class_bool>` **is_slot_enabled_left**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_enabled_left>` -Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled. +Returns ``true`` if left (input) side of the slot with the given ``slot_index`` is enabled. .. rst-class:: classref-item-separator @@ -770,9 +484,9 @@ Returns ``true`` if left (input) side of the slot ``slot_index`` is enabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_slot_enabled_right** **(** :ref:`int<class_int>` slot_index **)** |const| +:ref:`bool<class_bool>` **is_slot_enabled_right**\ (\ slot_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GraphNode_method_is_slot_enabled_right>` -Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled. +Returns ``true`` if right (output) side of the slot with the given ``slot_index`` is enabled. .. rst-class:: classref-item-separator @@ -782,9 +496,9 @@ Returns ``true`` if right (output) side of the slot ``slot_index`` is enabled. .. rst-class:: classref-method -void **set_slot** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable_left_port, :ref:`int<class_int>` type_left, :ref:`Color<class_Color>` color_left, :ref:`bool<class_bool>` enable_right_port, :ref:`int<class_int>` type_right, :ref:`Color<class_Color>` color_right, :ref:`Texture2D<class_Texture2D>` custom_icon_left=null, :ref:`Texture2D<class_Texture2D>` custom_icon_right=null, :ref:`bool<class_bool>` draw_stylebox=true **)** +|void| **set_slot**\ (\ slot_index\: :ref:`int<class_int>`, enable_left_port\: :ref:`bool<class_bool>`, type_left\: :ref:`int<class_int>`, color_left\: :ref:`Color<class_Color>`, enable_right_port\: :ref:`bool<class_bool>`, type_right\: :ref:`int<class_int>`, color_right\: :ref:`Color<class_Color>`, custom_icon_left\: :ref:`Texture2D<class_Texture2D>` = null, custom_icon_right\: :ref:`Texture2D<class_Texture2D>` = null, draw_stylebox\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_GraphNode_method_set_slot>` -Sets properties of the slot with the ``slot_index`` index. +Sets properties of the slot with the given ``slot_index``. If ``enable_left_port``/``enable_right_port`` is ``true``, a port will appear and the slot will be able to be connected from this side. @@ -806,9 +520,9 @@ Individual properties can also be set using one of the ``set_slot_*`` methods. .. rst-class:: classref-method -void **set_slot_color_left** **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** +|void| **set_slot_color_left**\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_color_left>` -Sets the :ref:`Color<class_Color>` of the left (input) side of the slot ``slot_index`` to ``color``. +Sets the :ref:`Color<class_Color>` of the left (input) side of the slot with the given ``slot_index`` to ``color``. .. rst-class:: classref-item-separator @@ -818,146 +532,120 @@ Sets the :ref:`Color<class_Color>` of the left (input) side of the slot ``slot_i .. rst-class:: classref-method -void **set_slot_color_right** **(** :ref:`int<class_int>` slot_index, :ref:`Color<class_Color>` color **)** +|void| **set_slot_color_right**\ (\ slot_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_color_right>` -Sets the :ref:`Color<class_Color>` of the right (output) side of the slot ``slot_index`` to ``color``. +Sets the :ref:`Color<class_Color>` of the right (output) side of the slot with the given ``slot_index`` to ``color``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_set_slot_draw_stylebox: +.. _class_GraphNode_method_set_slot_custom_icon_left: .. rst-class:: classref-method -void **set_slot_draw_stylebox** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** +|void| **set_slot_custom_icon_left**\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_custom_icon_left>` -Toggles the background :ref:`StyleBox<class_StyleBox>` of the slot ``slot_index``. +Sets the custom :ref:`Texture2D<class_Texture2D>` of the left (input) side of the slot with the given ``slot_index`` to ``custom_icon``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_set_slot_enabled_left: +.. _class_GraphNode_method_set_slot_custom_icon_right: .. rst-class:: classref-method -void **set_slot_enabled_left** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** +|void| **set_slot_custom_icon_right**\ (\ slot_index\: :ref:`int<class_int>`, custom_icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_custom_icon_right>` -Toggles the left (input) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side. +Sets the custom :ref:`Texture2D<class_Texture2D>` of the right (output) side of the slot with the given ``slot_index`` to ``custom_icon``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_set_slot_enabled_right: +.. _class_GraphNode_method_set_slot_draw_stylebox: .. rst-class:: classref-method -void **set_slot_enabled_right** **(** :ref:`int<class_int>` slot_index, :ref:`bool<class_bool>` enable **)** +|void| **set_slot_draw_stylebox**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_draw_stylebox>` -Toggles the right (output) side of the slot ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side. +Toggles the background :ref:`StyleBox<class_StyleBox>` of the slot with the given ``slot_index``. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_set_slot_type_left: +.. _class_GraphNode_method_set_slot_enabled_left: .. rst-class:: classref-method -void **set_slot_type_left** **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** +|void| **set_slot_enabled_left**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_enabled_left>` -Sets the left (input) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. +Toggles the left (input) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_method_set_slot_type_right: +.. _class_GraphNode_method_set_slot_enabled_right: .. rst-class:: classref-method -void **set_slot_type_right** **(** :ref:`int<class_int>` slot_index, :ref:`int<class_int>` type **)** - -Sets the right (output) type of the slot ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_GraphNode_theme_color_close_color: - -.. rst-class:: classref-themeproperty +|void| **set_slot_enabled_right**\ (\ slot_index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_enabled_right>` -:ref:`Color<class_Color>` **close_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -The color modulation applied to the close button icon. +Toggles the right (output) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_color_resizer_color: +.. _class_GraphNode_method_set_slot_type_left: -.. rst-class:: classref-themeproperty +.. rst-class:: classref-method -:ref:`Color<class_Color>` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` +|void| **set_slot_type_left**\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_type_left>` -The color modulation applied to the resizer icon. +Sets the left (input) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_color_title_color: +.. _class_GraphNode_method_set_slot_type_right: -.. rst-class:: classref-themeproperty +.. rst-class:: classref-method -:ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` +|void| **set_slot_type_right**\ (\ slot_index\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GraphNode_method_set_slot_type_right>` -Color of the title text. +Sets the right (output) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. -.. rst-class:: classref-item-separator +.. rst-class:: classref-section-separator ---- -.. _class_GraphNode_theme_constant_close_h_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **close_h_offset** = ``12`` - -.. container:: contribute - - There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! - -.. rst-class:: classref-item-separator +.. rst-class:: classref-descriptions-group ----- +Theme Property Descriptions +--------------------------- -.. _class_GraphNode_theme_constant_close_offset: +.. _class_GraphNode_theme_color_resizer_color: .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **close_offset** = ``22`` +:ref:`Color<class_Color>` **resizer_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_GraphNode_theme_color_resizer_color>` -The vertical offset of the close button. +The color modulation applied to the resizer icon. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_constant_port_offset: +.. _class_GraphNode_theme_constant_port_h_offset: .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **port_offset** = ``0`` +:ref:`int<class_int>` **port_h_offset** = ``0`` :ref:`🔗<class_GraphNode_theme_constant_port_h_offset>` Horizontal offset for the ports. @@ -969,7 +657,7 @@ Horizontal offset for the ports. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **separation** = ``2`` +:ref:`int<class_int>` **separation** = ``2`` :ref:`🔗<class_GraphNode_theme_constant_separation>` The vertical distance between ports. @@ -977,59 +665,11 @@ The vertical distance between ports. ---- -.. _class_GraphNode_theme_constant_title_h_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **title_h_offset** = ``0`` - -Horizontal offset of the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_constant_title_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **title_offset** = ``26`` - -Vertical offset of the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_font_title_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font<class_Font>` **title_font** - -Font used for the title text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_icon_close: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **close** - -The icon for the close button, visible when :ref:`show_close<class_GraphNode_property_show_close>` is enabled. - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_theme_icon_port: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **port** +:ref:`Texture2D<class_Texture2D>` **port** :ref:`🔗<class_GraphNode_theme_icon_port>` The icon used for representing ports. @@ -1037,97 +677,61 @@ The icon used for representing ports. ---- -.. _class_GraphNode_theme_icon_resizer: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **resizer** - -The icon used for resizer, visible when :ref:`resizable<class_GraphNode_property_resizable>` is enabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_style_breakpoint: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **breakpoint** - -The background used when :ref:`overlay<class_GraphNode_property_overlay>` is set to :ref:`OVERLAY_BREAKPOINT<class_GraphNode_constant_OVERLAY_BREAKPOINT>`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_style_comment: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **comment** - -The :ref:`StyleBox<class_StyleBox>` used when :ref:`comment<class_GraphNode_property_comment>` is enabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_GraphNode_theme_style_comment_focus: +.. _class_GraphNode_theme_style_panel: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **comment_focus** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_GraphNode_theme_style_panel>` -The :ref:`StyleBox<class_StyleBox>` used when :ref:`comment<class_GraphNode_property_comment>` is enabled and the **GraphNode** is focused. +The default background for the slot area of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_frame: +.. _class_GraphNode_theme_style_panel_selected: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **frame** +:ref:`StyleBox<class_StyleBox>` **panel_selected** :ref:`🔗<class_GraphNode_theme_style_panel_selected>` -The default background for **GraphNode**. +The :ref:`StyleBox<class_StyleBox>` used for the slot area when selected. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_position: +.. _class_GraphNode_theme_style_slot: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **position** +:ref:`StyleBox<class_StyleBox>` **slot** :ref:`🔗<class_GraphNode_theme_style_slot>` -The background used when :ref:`overlay<class_GraphNode_property_overlay>` is set to :ref:`OVERLAY_POSITION<class_GraphNode_constant_OVERLAY_POSITION>`. +The :ref:`StyleBox<class_StyleBox>` used for each slot of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_selected_frame: +.. _class_GraphNode_theme_style_titlebar: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **selected_frame** +:ref:`StyleBox<class_StyleBox>` **titlebar** :ref:`🔗<class_GraphNode_theme_style_titlebar>` -The background used when the **GraphNode** is selected. +The :ref:`StyleBox<class_StyleBox>` used for the title bar of the **GraphNode**. .. rst-class:: classref-item-separator ---- -.. _class_GraphNode_theme_style_slot: +.. _class_GraphNode_theme_style_titlebar_selected: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **slot** +:ref:`StyleBox<class_StyleBox>` **titlebar_selected** :ref:`🔗<class_GraphNode_theme_style_titlebar_selected>` -The :ref:`StyleBox<class_StyleBox>` used for each slot of the **GraphNode**. +The :ref:`StyleBox<class_StyleBox>` used for the title bar of the **GraphNode** when it is selected. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1136,3 +740,4 @@ The :ref:`StyleBox<class_StyleBox>` used for each slot of the **GraphNode**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gridcontainer.rst b/classes/class_gridcontainer.rst index 5d914852a58..4c88542043f 100644 --- a/classes/class_gridcontainer.rst +++ b/classes/class_gridcontainer.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **columns** = ``1`` +:ref:`int<class_int>` **columns** = ``1`` :ref:`🔗<class_GridContainer_property_columns>` .. rst-class:: classref-property-setget -- void **set_columns** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_columns** **(** **)** +- |void| **set_columns**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_columns**\ (\ ) The number of columns in the **GridContainer**. If modified, **GridContainer** reorders its Control-derived children to accommodate the new layout. @@ -93,9 +93,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_GridContainer_theme_constant_h_separation>` -The horizontal separation of children nodes. +The horizontal separation of child nodes. .. rst-class:: classref-item-separator @@ -105,9 +105,9 @@ The horizontal separation of children nodes. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **v_separation** = ``4`` +:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_GridContainer_theme_constant_v_separation>` -The vertical separation of children nodes. +The vertical separation of child nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -116,3 +116,4 @@ The vertical separation of children nodes. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_gridmap.rst b/classes/class_gridmap.rst index 36f63bc0cf4..a5da9915477 100644 --- a/classes/class_gridmap.rst +++ b/classes/class_gridmap.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: tilemap + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -36,9 +39,9 @@ Tutorials - :doc:`Using gridmaps <../tutorials/3d/using_gridmaps>` -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ -- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__ +- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2739>`__ .. rst-class:: classref-reftable-group @@ -82,53 +85,53 @@ Methods .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_GridMap_method_clear>` **(** **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_baked_meshes<class_GridMap_method_clear_baked_meshes>` **(** **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_bake_mesh_instance<class_GridMap_method_get_bake_mesh_instance>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_bake_meshes<class_GridMap_method_get_bake_meshes>` **(** **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`get_basis_with_orthogonal_index<class_GridMap_method_get_basis_with_orthogonal_index>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_item<class_GridMap_method_get_cell_item>` **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`get_cell_item_basis<class_GridMap_method_get_cell_item_basis>` **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_item_orientation<class_GridMap_method_get_cell_item_orientation>` **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_GridMap_method_get_collision_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_GridMap_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_meshes<class_GridMap_method_get_meshes>` **(** **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_GridMap_method_get_navigation_map>` **(** **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_orthogonal_index_from_basis<class_GridMap_method_get_orthogonal_index_from_basis>` **(** :ref:`Basis<class_Basis>` basis **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]<class_Vector3i>` | :ref:`get_used_cells<class_GridMap_method_get_used_cells>` **(** **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]<class_Vector3i>` | :ref:`get_used_cells_by_item<class_GridMap_method_get_used_cells_by_item>` **(** :ref:`int<class_int>` item **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`local_to_map<class_GridMap_method_local_to_map>` **(** :ref:`Vector3<class_Vector3>` local_position **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_baked_meshes<class_GridMap_method_make_baked_meshes>` **(** :ref:`bool<class_bool>` gen_lightmap_uv=false, :ref:`float<class_float>` lightmap_uv_texel_size=0.1 **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`map_to_local<class_GridMap_method_map_to_local>` **(** :ref:`Vector3i<class_Vector3i>` map_position **)** |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resource_changed<class_GridMap_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_item<class_GridMap_method_set_cell_item>` **(** :ref:`Vector3i<class_Vector3i>` position, :ref:`int<class_int>` item, :ref:`int<class_int>` orientation=0 **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value<class_GridMap_method_set_collision_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_GridMap_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_GridMap_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_GridMap_method_clear>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_baked_meshes<class_GridMap_method_clear_baked_meshes>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_bake_mesh_instance<class_GridMap_method_get_bake_mesh_instance>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_bake_meshes<class_GridMap_method_get_bake_meshes>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`get_basis_with_orthogonal_index<class_GridMap_method_get_basis_with_orthogonal_index>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_item<class_GridMap_method_get_cell_item>`\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`get_cell_item_basis<class_GridMap_method_get_cell_item_basis>`\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_item_orientation<class_GridMap_method_get_cell_item_orientation>`\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_GridMap_method_get_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_GridMap_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_meshes<class_GridMap_method_get_meshes>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_GridMap_method_get_navigation_map>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_orthogonal_index_from_basis<class_GridMap_method_get_orthogonal_index_from_basis>`\ (\ basis\: :ref:`Basis<class_Basis>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`get_used_cells<class_GridMap_method_get_used_cells>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`get_used_cells_by_item<class_GridMap_method_get_used_cells_by_item>`\ (\ item\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`local_to_map<class_GridMap_method_local_to_map>`\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_baked_meshes<class_GridMap_method_make_baked_meshes>`\ (\ gen_lightmap_uv\: :ref:`bool<class_bool>` = false, lightmap_uv_texel_size\: :ref:`float<class_float>` = 0.1\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_to_local<class_GridMap_method_map_to_local>`\ (\ map_position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resource_changed<class_GridMap_method_resource_changed>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_item<class_GridMap_method_set_cell_item>`\ (\ position\: :ref:`Vector3i<class_Vector3i>`, item\: :ref:`int<class_int>`, orientation\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value<class_GridMap_method_set_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_GridMap_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_GridMap_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -143,10 +146,22 @@ Signals .. rst-class:: classref-signal -**cell_size_changed** **(** :ref:`Vector3<class_Vector3>` cell_size **)** +**cell_size_changed**\ (\ cell_size\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_GridMap_signal_cell_size_changed>` Emitted when :ref:`cell_size<class_GridMap_property_cell_size>` changes. +.. rst-class:: classref-item-separator + +---- + +.. _class_GridMap_signal_changed: + +.. rst-class:: classref-signal + +**changed**\ (\ ) :ref:`🔗<class_GridMap_signal_changed>` + +Emitted when the :ref:`MeshLibrary<class_MeshLibrary>` of this GridMap changes. + .. rst-class:: classref-section-separator ---- @@ -160,7 +175,7 @@ Constants .. rst-class:: classref-constant -**INVALID_CELL_ITEM** = ``-1`` +**INVALID_CELL_ITEM** = ``-1`` :ref:`🔗<class_GridMap_constant_INVALID_CELL_ITEM>` Invalid cell item that can be used in :ref:`set_cell_item<class_GridMap_method_set_cell_item>` to clear cells (or represent an empty cell in :ref:`get_cell_item<class_GridMap_method_get_cell_item>`). @@ -177,12 +192,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **bake_navigation** = ``false`` +:ref:`bool<class_bool>` **bake_navigation** = ``false`` :ref:`🔗<class_GridMap_property_bake_navigation>` .. rst-class:: classref-property-setget -- void **set_bake_navigation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_baking_navigation** **(** **)** +- |void| **set_bake_navigation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_baking_navigation**\ (\ ) If ``true``, this GridMap creates a navigation region for each cell that uses a :ref:`mesh_library<class_GridMap_property_mesh_library>` item with a navigation mesh. The created navigation region will use the navigation layers bitmask assigned to the :ref:`MeshLibrary<class_MeshLibrary>`'s item. @@ -194,12 +209,12 @@ If ``true``, this GridMap creates a navigation region for each cell that uses a .. rst-class:: classref-property -:ref:`bool<class_bool>` **cell_center_x** = ``true`` +:ref:`bool<class_bool>` **cell_center_x** = ``true`` :ref:`🔗<class_GridMap_property_cell_center_x>` .. rst-class:: classref-property-setget -- void **set_center_x** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_center_x** **(** **)** +- |void| **set_center_x**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_center_x**\ (\ ) If ``true``, grid items are centered on the X axis. @@ -211,12 +226,12 @@ If ``true``, grid items are centered on the X axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **cell_center_y** = ``true`` +:ref:`bool<class_bool>` **cell_center_y** = ``true`` :ref:`🔗<class_GridMap_property_cell_center_y>` .. rst-class:: classref-property-setget -- void **set_center_y** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_center_y** **(** **)** +- |void| **set_center_y**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_center_y**\ (\ ) If ``true``, grid items are centered on the Y axis. @@ -228,12 +243,12 @@ If ``true``, grid items are centered on the Y axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **cell_center_z** = ``true`` +:ref:`bool<class_bool>` **cell_center_z** = ``true`` :ref:`🔗<class_GridMap_property_cell_center_z>` .. rst-class:: classref-property-setget -- void **set_center_z** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_center_z** **(** **)** +- |void| **set_center_z**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_center_z**\ (\ ) If ``true``, grid items are centered on the Z axis. @@ -245,12 +260,12 @@ If ``true``, grid items are centered on the Z axis. .. rst-class:: classref-property -:ref:`int<class_int>` **cell_octant_size** = ``8`` +:ref:`int<class_int>` **cell_octant_size** = ``8`` :ref:`🔗<class_GridMap_property_cell_octant_size>` .. rst-class:: classref-property-setget -- void **set_octant_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_octant_size** **(** **)** +- |void| **set_octant_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_octant_size**\ (\ ) The size of each octant measured in number of cells. This applies to all three axis. @@ -262,12 +277,12 @@ The size of each octant measured in number of cells. This applies to all three a .. rst-class:: classref-property -:ref:`float<class_float>` **cell_scale** = ``1.0`` +:ref:`float<class_float>` **cell_scale** = ``1.0`` :ref:`🔗<class_GridMap_property_cell_scale>` .. rst-class:: classref-property-setget -- void **set_cell_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cell_scale** **(** **)** +- |void| **set_cell_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cell_scale**\ (\ ) The scale of the cell items. @@ -281,12 +296,12 @@ This does not affect the size of the grid cells themselves, only the items in th .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **cell_size** = ``Vector3(2, 2, 2)`` +:ref:`Vector3<class_Vector3>` **cell_size** = ``Vector3(2, 2, 2)`` :ref:`🔗<class_GridMap_property_cell_size>` .. rst-class:: classref-property-setget -- void **set_cell_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_cell_size** **(** **)** +- |void| **set_cell_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_cell_size**\ (\ ) The dimensions of the grid's cells. @@ -300,12 +315,12 @@ This does not affect the size of the meshes. See :ref:`cell_scale<class_GridMap_ .. rst-class:: classref-property -:ref:`int<class_int>` **collision_layer** = ``1`` +:ref:`int<class_int>` **collision_layer** = ``1`` :ref:`🔗<class_GridMap_property_collision_layer>` .. rst-class:: classref-property-setget -- void **set_collision_layer** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_layer** **(** **)** +- |void| **set_collision_layer**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_layer**\ (\ ) The physics layers this GridMap is in. @@ -319,12 +334,12 @@ GridMaps act as static bodies, meaning they aren't affected by gravity or other .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_GridMap_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers this GridMap detects collisions in. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -336,12 +351,12 @@ The physics layers this GridMap detects collisions in. See `Collision layers and .. rst-class:: classref-property -:ref:`float<class_float>` **collision_priority** = ``1.0`` +:ref:`float<class_float>` **collision_priority** = ``1.0`` :ref:`🔗<class_GridMap_property_collision_priority>` .. rst-class:: classref-property-setget -- void **set_collision_priority** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_collision_priority** **(** **)** +- |void| **set_collision_priority**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_collision_priority**\ (\ ) The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. @@ -353,12 +368,12 @@ The priority used to solve colliding when occurring penetration. The higher the .. rst-class:: classref-property -:ref:`MeshLibrary<class_MeshLibrary>` **mesh_library** +:ref:`MeshLibrary<class_MeshLibrary>` **mesh_library** :ref:`🔗<class_GridMap_property_mesh_library>` .. rst-class:: classref-property-setget -- void **set_mesh_library** **(** :ref:`MeshLibrary<class_MeshLibrary>` value **)** -- :ref:`MeshLibrary<class_MeshLibrary>` **get_mesh_library** **(** **)** +- |void| **set_mesh_library**\ (\ value\: :ref:`MeshLibrary<class_MeshLibrary>`\ ) +- :ref:`MeshLibrary<class_MeshLibrary>` **get_mesh_library**\ (\ ) The assigned :ref:`MeshLibrary<class_MeshLibrary>`. @@ -370,12 +385,12 @@ The assigned :ref:`MeshLibrary<class_MeshLibrary>`. .. rst-class:: classref-property -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material** +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material** :ref:`🔗<class_GridMap_property_physics_material>` .. rst-class:: classref-property-setget -- void **set_physics_material** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)** -- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material** **(** **)** +- |void| **set_physics_material**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) +- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material**\ (\ ) Overrides the default friction and bounce physics properties for the whole **GridMap**. @@ -392,7 +407,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_GridMap_method_clear>` Clear all cells. @@ -404,7 +419,7 @@ Clear all cells. .. rst-class:: classref-method -void **clear_baked_meshes** **(** **)** +|void| **clear_baked_meshes**\ (\ ) :ref:`🔗<class_GridMap_method_clear_baked_meshes>` Clears all baked meshes. See :ref:`make_baked_meshes<class_GridMap_method_make_baked_meshes>`. @@ -416,7 +431,7 @@ Clears all baked meshes. See :ref:`make_baked_meshes<class_GridMap_method_make_b .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_bake_mesh_instance** **(** :ref:`int<class_int>` idx **)** +:ref:`RID<class_RID>` **get_bake_mesh_instance**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_GridMap_method_get_bake_mesh_instance>` Returns :ref:`RID<class_RID>` of a baked mesh with the given ``idx``. @@ -428,7 +443,7 @@ Returns :ref:`RID<class_RID>` of a baked mesh with the given ``idx``. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_bake_meshes** **(** **)** +:ref:`Array<class_Array>` **get_bake_meshes**\ (\ ) :ref:`🔗<class_GridMap_method_get_bake_meshes>` Returns an array of :ref:`ArrayMesh<class_ArrayMesh>`\ es and :ref:`Transform3D<class_Transform3D>` references of all bake meshes that exist within the current GridMap. @@ -440,7 +455,7 @@ Returns an array of :ref:`ArrayMesh<class_ArrayMesh>`\ es and :ref:`Transform3D< .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **get_basis_with_orthogonal_index** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Basis<class_Basis>` **get_basis_with_orthogonal_index**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMap_method_get_basis_with_orthogonal_index>` Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code. @@ -452,7 +467,7 @@ Returns one of 24 possible rotations that lie along the vectors (x,y,z) with eac .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_item** **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| +:ref:`int<class_int>` **get_cell_item**\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_GridMap_method_get_cell_item>` The :ref:`MeshLibrary<class_MeshLibrary>` item index located at the given grid coordinates. If the cell is empty, :ref:`INVALID_CELL_ITEM<class_GridMap_constant_INVALID_CELL_ITEM>` will be returned. @@ -464,7 +479,7 @@ The :ref:`MeshLibrary<class_MeshLibrary>` item index located at the given grid c .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **get_cell_item_basis** **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| +:ref:`Basis<class_Basis>` **get_cell_item_basis**\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_GridMap_method_get_cell_item_basis>` Returns the basis that gives the specified cell its orientation. @@ -476,7 +491,7 @@ Returns the basis that gives the specified cell its orientation. .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_item_orientation** **(** :ref:`Vector3i<class_Vector3i>` position **)** |const| +:ref:`int<class_int>` **get_cell_item_orientation**\ (\ position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_GridMap_method_get_cell_item_orientation>` The orientation of the cell at the given grid coordinates. ``-1`` is returned if the cell is empty. @@ -488,7 +503,7 @@ The orientation of the cell at the given grid coordinates. ``-1`` is returned if .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMap_method_get_collision_layer_value>` Returns whether or not the specified layer of the :ref:`collision_layer<class_GridMap_property_collision_layer>` is enabled, given a ``layer_number`` between 1 and 32. @@ -500,7 +515,7 @@ Returns whether or not the specified layer of the :ref:`collision_layer<class_Gr .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMap_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_GridMap_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -512,7 +527,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Gri .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_meshes** **(** **)** |const| +:ref:`Array<class_Array>` **get_meshes**\ (\ ) |const| :ref:`🔗<class_GridMap_method_get_meshes>` Returns an array of :ref:`Transform3D<class_Transform3D>` and :ref:`Mesh<class_Mesh>` references corresponding to the non-empty cells in the grid. The transforms are specified in local space. @@ -524,7 +539,7 @@ Returns an array of :ref:`Transform3D<class_Transform3D>` and :ref:`Mesh<class_M .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_GridMap_method_get_navigation_map>` Returns the :ref:`RID<class_RID>` of the navigation map this GridMap node uses for its cell baked navigation meshes. @@ -538,7 +553,7 @@ This function returns always the map set on the GridMap node and not the map on .. rst-class:: classref-method -:ref:`int<class_int>` **get_orthogonal_index_from_basis** **(** :ref:`Basis<class_Basis>` basis **)** |const| +:ref:`int<class_int>` **get_orthogonal_index_from_basis**\ (\ basis\: :ref:`Basis<class_Basis>`\ ) |const| :ref:`🔗<class_GridMap_method_get_orthogonal_index_from_basis>` This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code. @@ -550,7 +565,7 @@ This function considers a discretization of rotations into 24 points on unit sph .. rst-class:: classref-method -:ref:`Vector3i[]<class_Vector3i>` **get_used_cells** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **get_used_cells**\ (\ ) |const| :ref:`🔗<class_GridMap_method_get_used_cells>` Returns an array of :ref:`Vector3<class_Vector3>` with the non-empty cell coordinates in the grid map. @@ -562,7 +577,7 @@ Returns an array of :ref:`Vector3<class_Vector3>` with the non-empty cell coordi .. rst-class:: classref-method -:ref:`Vector3i[]<class_Vector3i>` **get_used_cells_by_item** **(** :ref:`int<class_int>` item **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **get_used_cells_by_item**\ (\ item\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMap_method_get_used_cells_by_item>` Returns an array of all cells with the given item index specified in ``item``. @@ -574,7 +589,7 @@ Returns an array of all cells with the given item index specified in ``item``. .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **local_to_map** **(** :ref:`Vector3<class_Vector3>` local_position **)** |const| +:ref:`Vector3i<class_Vector3i>` **local_to_map**\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_GridMap_method_local_to_map>` Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node3D.to_local<class_Node3D_method_to_local>` before passing it to this method. See also :ref:`map_to_local<class_GridMap_method_map_to_local>`. @@ -586,7 +601,7 @@ Returns the map coordinates of the cell containing the given ``local_position``. .. rst-class:: classref-method -void **make_baked_meshes** **(** :ref:`bool<class_bool>` gen_lightmap_uv=false, :ref:`float<class_float>` lightmap_uv_texel_size=0.1 **)** +|void| **make_baked_meshes**\ (\ gen_lightmap_uv\: :ref:`bool<class_bool>` = false, lightmap_uv_texel_size\: :ref:`float<class_float>` = 0.1\ ) :ref:`🔗<class_GridMap_method_make_baked_meshes>` Bakes lightmap data for all meshes in the assigned :ref:`MeshLibrary<class_MeshLibrary>`. @@ -598,9 +613,9 @@ Bakes lightmap data for all meshes in the assigned :ref:`MeshLibrary<class_MeshL .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **map_to_local** **(** :ref:`Vector3i<class_Vector3i>` map_position **)** |const| +:ref:`Vector3<class_Vector3>` **map_to_local**\ (\ map_position\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_GridMap_method_map_to_local>` -Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node3D.to_global<class_Node3D_method_to_global>`. See also :ref:`map_to_local<class_GridMap_method_map_to_local>`. +Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node3D.to_global<class_Node3D_method_to_global>`. See also :ref:`local_to_map<class_GridMap_method_local_to_map>`. .. rst-class:: classref-item-separator @@ -610,9 +625,11 @@ Returns the position of a grid cell in the GridMap's local coordinate space. To .. rst-class:: classref-method -void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)** +|void| **resource_changed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_GridMap_method_resource_changed>` + +**Deprecated:** Use :ref:`Resource.changed<class_Resource_signal_changed>` instead. -Notifies the **GridMap** about changed resource and recreates octant data. +This method does nothing. .. rst-class:: classref-item-separator @@ -622,7 +639,7 @@ Notifies the **GridMap** about changed resource and recreates octant data. .. rst-class:: classref-method -void **set_cell_item** **(** :ref:`Vector3i<class_Vector3i>` position, :ref:`int<class_int>` item, :ref:`int<class_int>` orientation=0 **)** +|void| **set_cell_item**\ (\ position\: :ref:`Vector3i<class_Vector3i>`, item\: :ref:`int<class_int>`, orientation\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_GridMap_method_set_cell_item>` Sets the mesh index for the cell referenced by its grid coordinates. @@ -638,7 +655,7 @@ Optionally, the item's orientation can be passed. For valid orientation values, .. rst-class:: classref-method -void **set_collision_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GridMap_method_set_collision_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer<class_GridMap_property_collision_layer>`, given a ``layer_number`` between 1 and 32. @@ -650,7 +667,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_GridMap_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_GridMap_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -662,7 +679,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_GridMap_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this GridMap node should use for its cell baked navigation meshes. @@ -673,3 +690,4 @@ Sets the :ref:`RID<class_RID>` of the navigation map this GridMap node should us .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_groovejoint2d.rst b/classes/class_groovejoint2d.rst index 141e85de6ee..fced7fb7979 100644 --- a/classes/class_groovejoint2d.rst +++ b/classes/class_groovejoint2d.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **initial_offset** = ``25.0`` +:ref:`float<class_float>` **initial_offset** = ``25.0`` :ref:`🔗<class_GrooveJoint2D_property_initial_offset>` .. rst-class:: classref-property-setget -- void **set_initial_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_initial_offset** **(** **)** +- |void| **set_initial_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_initial_offset**\ (\ ) The body B's initial anchor position defined by the joint's origin and a local offset :ref:`initial_offset<class_GrooveJoint2D_property_initial_offset>` along the joint's Y axis (along the groove). @@ -65,12 +65,12 @@ The body B's initial anchor position defined by the joint's origin and a local o .. rst-class:: classref-property -:ref:`float<class_float>` **length** = ``50.0`` +:ref:`float<class_float>` **length** = ``50.0`` :ref:`🔗<class_GrooveJoint2D_property_length>` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_length**\ (\ ) The groove's length. The groove is from the joint's origin towards :ref:`length<class_GrooveJoint2D_property_length>` along the joint's local Y axis. @@ -81,3 +81,4 @@ The groove's length. The groove is from the joint's origin towards :ref:`length< .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hashingcontext.rst b/classes/class_hashingcontext.rst index d20520a104a..40232dc8460 100644 --- a/classes/class_hashingcontext.rst +++ b/classes/class_hashingcontext.rst @@ -34,14 +34,15 @@ The :ref:`HashType<enum_HashingContext_HashType>` enum shows the supported hashi # Check that file exists. if not FileAccess.file_exists(path): return - # Start a SHA-256 context. + # Start an SHA-256 context. var ctx = HashingContext.new() ctx.start(HashingContext.HASH_SHA256) # Open the file to hash. var file = FileAccess.open(path, FileAccess.READ) # Update the context after reading each chunk. - while not file.eof_reached(): - ctx.update(file.get_buffer(CHUNK_SIZE)) + while file.get_position() < file.get_length(): + var remaining = file.get_length() - file.get_position() + ctx.update(file.get_buffer(min(remaining, CHUNK_SIZE))) # Get the computed hash. var res = ctx.finish() # Print the result as hex string and array. @@ -58,15 +59,16 @@ The :ref:`HashType<enum_HashingContext_HashType>` enum shows the supported hashi { return; } - // Start a SHA-256 context. + // Start an SHA-256 context. var ctx = new HashingContext(); ctx.Start(HashingContext.HashType.Sha256); // Open the file to hash. using var file = FileAccess.Open(path, FileAccess.ModeFlags.Read); // Update the context after reading each chunk. - while (!file.EofReached()) + while (file.GetPosition() < file.GetLength()) { - ctx.Update(file.GetBuffer(ChunkSize)); + int remaining = (int)(file.GetLength() - file.GetPosition()); + ctx.Update(file.GetBuffer(Mathf.Min(remaining, ChunkSize))); } // Get the computed hash. byte[] res = ctx.Finish(); @@ -84,13 +86,13 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`finish<class_HashingContext_method_finish>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_HashingContext_method_start>` **(** :ref:`HashType<enum_HashingContext_HashType>` type **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`update<class_HashingContext_method_update>` **(** :ref:`PackedByteArray<class_PackedByteArray>` chunk **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`finish<class_HashingContext_method_finish>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_HashingContext_method_start>`\ (\ type\: :ref:`HashType<enum_HashingContext_HashType>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`update<class_HashingContext_method_update>`\ (\ chunk\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -105,7 +107,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **HashType**: +enum **HashType**: :ref:`🔗<enum_HashingContext_HashType>` .. _class_HashingContext_constant_HASH_MD5: @@ -144,7 +146,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **finish** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **finish**\ (\ ) :ref:`🔗<class_HashingContext_method_finish>` Closes the current context, and return the computed hash. @@ -156,9 +158,9 @@ Closes the current context, and return the computed hash. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **start** **(** :ref:`HashType<enum_HashingContext_HashType>` type **)** +:ref:`Error<enum_@GlobalScope_Error>` **start**\ (\ type\: :ref:`HashType<enum_HashingContext_HashType>`\ ) :ref:`🔗<class_HashingContext_method_start>` -Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256<class_HashingContext_constant_HASH_SHA256>` to start computation of a SHA-256). +Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256<class_HashingContext_constant_HASH_SHA256>` to start computation of an SHA-256). .. rst-class:: classref-item-separator @@ -168,7 +170,7 @@ Starts a new hash computation of the given ``type`` (e.g. :ref:`HASH_SHA256<clas .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **update** **(** :ref:`PackedByteArray<class_PackedByteArray>` chunk **)** +:ref:`Error<enum_@GlobalScope_Error>` **update**\ (\ chunk\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_HashingContext_method_update>` Updates the computation with the given ``chunk`` of data. @@ -179,3 +181,4 @@ Updates the computation with the given ``chunk`` of data. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hboxcontainer.rst b/classes/class_hboxcontainer.rst index d6c59622bcd..586e6fcfd6d 100644 --- a/classes/class_hboxcontainer.rst +++ b/classes/class_hboxcontainer.rst @@ -30,35 +30,6 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`separation<class_HBoxContainer_theme_constant_separation>` | ``4`` | - +-----------------------+------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HBoxContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``4`` - -The horizontal space between the **HBoxContainer**'s elements. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -66,3 +37,4 @@ The horizontal space between the **HBoxContainer**'s elements. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_heightmapshape3d.rst b/classes/class_heightmapshape3d.rst index 1f9c6296221..9dcf81af058 100644 --- a/classes/class_heightmapshape3d.rst +++ b/classes/class_heightmapshape3d.rst @@ -23,6 +23,24 @@ A 3D heightmap shape, intended for use in physics. Usually used to provide a sha \ **Performance:** **HeightMapShape3D** is faster to check collisions against than :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>`, but it is significantly slower than primitive shapes like :ref:`BoxShape3D<class_BoxShape3D>`. +A heightmap collision shape can also be build by using an :ref:`Image<class_Image>` reference: + + +.. tabs:: + + .. code-tab:: gdscript + + var heightmap_texture: Texture = ResourceLoader.load("res://heightmap_image.exr") + var heightmap_image: Image = heightmap_texture.get_image() + heightmap_image.convert(Image.FORMAT_RF) + + var height_min: float = 0.0 + var height_max: float = 10.0 + + update_map_data_from_image(heightmap_image, height_min, height_max) + + + .. rst-class:: classref-reftable-group Properties @@ -39,6 +57,22 @@ Properties | :ref:`int<class_int>` | :ref:`map_width<class_HeightMapShape3D_property_map_width>` | ``2`` | +-----------------------------------------------------+-------------------------------------------------------------+------------------------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_max_height<class_HeightMapShape3D_method_get_max_height>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_min_height<class_HeightMapShape3D_method_get_min_height>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_map_data_from_image<class_HeightMapShape3D_method_update_map_data_from_image>`\ (\ image\: :ref:`Image<class_Image>`, height_min\: :ref:`float<class_float>`, height_max\: :ref:`float<class_float>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -52,14 +86,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **map_data** = ``PackedFloat32Array(0, 0, 0, 0)`` +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **map_data** = ``PackedFloat32Array(0, 0, 0, 0)`` :ref:`🔗<class_HeightMapShape3D_property_map_data>` .. rst-class:: classref-property-setget -- void **set_map_data** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)** -- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_map_data** **(** **)** +- |void| **set_map_data**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) +- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_map_data**\ (\ ) -Height map data, pool array must be of :ref:`map_width<class_HeightMapShape3D_property_map_width>` \* :ref:`map_depth<class_HeightMapShape3D_property_map_depth>` size. +Height map data. The array's size must be equal to :ref:`map_width<class_HeightMapShape3D_property_map_width>` multiplied by :ref:`map_depth<class_HeightMapShape3D_property_map_depth>`. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details. .. rst-class:: classref-item-separator @@ -69,12 +105,12 @@ Height map data, pool array must be of :ref:`map_width<class_HeightMapShape3D_pr .. rst-class:: classref-property -:ref:`int<class_int>` **map_depth** = ``2`` +:ref:`int<class_int>` **map_depth** = ``2`` :ref:`🔗<class_HeightMapShape3D_property_map_depth>` .. rst-class:: classref-property-setget -- void **set_map_depth** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_map_depth** **(** **)** +- |void| **set_map_depth**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_map_depth**\ (\ ) Number of vertices in the depth of the height map. Changing this will resize the :ref:`map_data<class_HeightMapShape3D_property_map_data>`. @@ -86,15 +122,60 @@ Number of vertices in the depth of the height map. Changing this will resize the .. rst-class:: classref-property -:ref:`int<class_int>` **map_width** = ``2`` +:ref:`int<class_int>` **map_width** = ``2`` :ref:`🔗<class_HeightMapShape3D_property_map_width>` .. rst-class:: classref-property-setget -- void **set_map_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_map_width** **(** **)** +- |void| **set_map_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_map_width**\ (\ ) Number of vertices in the width of the height map. Changing this will resize the :ref:`map_data<class_HeightMapShape3D_property_map_data>`. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_HeightMapShape3D_method_get_max_height: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **get_max_height**\ (\ ) |const| :ref:`🔗<class_HeightMapShape3D_method_get_max_height>` + +Returns the largest height value found in :ref:`map_data<class_HeightMapShape3D_property_map_data>`. Recalculates only when :ref:`map_data<class_HeightMapShape3D_property_map_data>` changes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_HeightMapShape3D_method_get_min_height: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **get_min_height**\ (\ ) |const| :ref:`🔗<class_HeightMapShape3D_method_get_min_height>` + +Returns the smallest height value found in :ref:`map_data<class_HeightMapShape3D_property_map_data>`. Recalculates only when :ref:`map_data<class_HeightMapShape3D_property_map_data>` changes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_HeightMapShape3D_method_update_map_data_from_image: + +.. rst-class:: classref-method + +|void| **update_map_data_from_image**\ (\ image\: :ref:`Image<class_Image>`, height_min\: :ref:`float<class_float>`, height_max\: :ref:`float<class_float>`\ ) :ref:`🔗<class_HeightMapShape3D_method_update_map_data_from_image>` + +Updates :ref:`map_data<class_HeightMapShape3D_property_map_data>` with data read from an :ref:`Image<class_Image>` reference. Automatically resizes heightmap :ref:`map_width<class_HeightMapShape3D_property_map_width>` and :ref:`map_depth<class_HeightMapShape3D_property_map_depth>` to fit the full image width and height. + +The image needs to be in either :ref:`Image.FORMAT_RF<class_Image_constant_FORMAT_RF>` (32 bit), :ref:`Image.FORMAT_RH<class_Image_constant_FORMAT_RH>` (16 bit), or :ref:`Image.FORMAT_R8<class_Image_constant_FORMAT_R8>` (8 bit). + +Each image pixel is read in as a float on the range from ``0.0`` (black pixel) to ``1.0`` (white pixel). This range value gets remapped to ``height_min`` and ``height_max`` to form the final height value. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -102,3 +183,4 @@ Number of vertices in the width of the height map. Changing this will resize the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hflowcontainer.rst b/classes/class_hflowcontainer.rst index fbcadf8cd43..def678eaf3d 100644 --- a/classes/class_hflowcontainer.rst +++ b/classes/class_hflowcontainer.rst @@ -28,49 +28,6 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`h_separation<class_HFlowContainer_theme_constant_h_separation>` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`v_separation<class_HFlowContainer_theme_constant_v_separation>` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HFlowContainer_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **h_separation** = ``4`` - -The horizontal separation of children nodes. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HFlowContainer_theme_constant_v_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **v_separation** = ``4`` - -The vertical separation of children nodes. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -78,3 +35,4 @@ The vertical separation of children nodes. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hingejoint3d.rst b/classes/class_hingejoint3d.rst index a98df7aa472..54d81a194fa 100644 --- a/classes/class_hingejoint3d.rst +++ b/classes/class_hingejoint3d.rst @@ -59,15 +59,15 @@ Methods .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_flag<class_HingeJoint3D_method_get_flag>` **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param<class_HingeJoint3D_method_get_param>` **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag<class_HingeJoint3D_method_set_flag>` **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param<class_HingeJoint3D_method_set_param>` **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_flag<class_HingeJoint3D_method_get_flag>`\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param<class_HingeJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag<class_HingeJoint3D_method_set_flag>`\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param<class_HingeJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,7 +82,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗<enum_HingeJoint3D_Param>` .. _class_HingeJoint3D_constant_PARAM_BIAS: @@ -122,6 +122,8 @@ The speed with which the rotation across the axis perpendicular to the hinge get :ref:`Param<enum_HingeJoint3D_Param>` **PARAM_LIMIT_SOFTNESS** = ``4`` +**Deprecated:** This property is never used by the engine and is kept for compatibility purpose. + .. _class_HingeJoint3D_constant_PARAM_LIMIT_RELAXATION: @@ -164,7 +166,7 @@ Represents the size of the :ref:`Param<enum_HingeJoint3D_Param>` enum. .. rst-class:: classref-enumeration -enum **Flag**: +enum **Flag**: :ref:`🔗<enum_HingeJoint3D_Flag>` .. _class_HingeJoint3D_constant_FLAG_USE_LIMIT: @@ -203,12 +205,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/bias** = ``0.3`` +:ref:`float<class_float>` **angular_limit/bias** = ``0.3`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| The speed with which the rotation across the axis perpendicular to the hinge gets corrected. @@ -220,12 +222,12 @@ The speed with which the rotation across the axis perpendicular to the hinge get .. rst-class:: classref-property -:ref:`bool<class_bool>` **angular_limit/enable** = ``false`` +:ref:`bool<class_bool>` **angular_limit/enable** = ``false`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/enable>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_limit/lower<class_HingeJoint3D_property_angular_limit/lower>` and :ref:`angular_limit/upper<class_HingeJoint3D_property_angular_limit/upper>` has effects. @@ -237,12 +239,12 @@ If ``true``, the hinges maximum and minimum rotation, defined by :ref:`angular_l .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/lower** = ``-1.5708`` +:ref:`float<class_float>` **angular_limit/lower** = ``-1.5708`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/lower>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| The minimum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``. @@ -254,12 +256,12 @@ The minimum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/relaxation** = ``1.0`` +:ref:`float<class_float>` **angular_limit/relaxation** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/relaxation>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| The lower this value, the more the rotation gets slowed down. @@ -271,16 +273,14 @@ The lower this value, the more the rotation gets slowed down. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/softness** = ``0.9`` +:ref:`float<class_float>` **angular_limit/softness** = ``0.9`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| - -.. container:: contribute +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +**Deprecated:** This property is never set by the engine and is kept for compatibility purposes. .. rst-class:: classref-item-separator @@ -290,12 +290,12 @@ The lower this value, the more the rotation gets slowed down. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/upper** = ``1.5708`` +:ref:`float<class_float>` **angular_limit/upper** = ``1.5708`` :ref:`🔗<class_HingeJoint3D_property_angular_limit/upper>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| The maximum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint3D_property_angular_limit/enable>` is ``true``. @@ -307,12 +307,12 @@ The maximum rotation. Only active if :ref:`angular_limit/enable<class_HingeJoint .. rst-class:: classref-property -:ref:`bool<class_bool>` **motor/enable** = ``false`` +:ref:`bool<class_bool>` **motor/enable** = ``false`` :ref:`🔗<class_HingeJoint3D_property_motor/enable>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| When activated, a motor turns the hinge. @@ -324,12 +324,12 @@ When activated, a motor turns the hinge. .. rst-class:: classref-property -:ref:`float<class_float>` **motor/max_impulse** = ``1.0`` +:ref:`float<class_float>` **motor/max_impulse** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_motor/max_impulse>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| Maximum acceleration for the motor. @@ -341,12 +341,12 @@ Maximum acceleration for the motor. .. rst-class:: classref-property -:ref:`float<class_float>` **motor/target_velocity** = ``1.0`` +:ref:`float<class_float>` **motor/target_velocity** = ``1.0`` :ref:`🔗<class_HingeJoint3D_property_motor/target_velocity>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| Target speed for the motor. @@ -358,12 +358,12 @@ Target speed for the motor. .. rst-class:: classref-property -:ref:`float<class_float>` **params/bias** = ``0.3`` +:ref:`float<class_float>` **params/bias** = ``0.3`` :ref:`🔗<class_HingeJoint3D_property_params/bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| The speed with which the two bodies get pulled together when they move in different directions. @@ -380,7 +380,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag **)** |const| +:ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`\ ) |const| :ref:`🔗<class_HingeJoint3D_method_get_flag>` Returns the value of the specified flag. @@ -392,7 +392,7 @@ Returns the value of the specified flag. .. rst-class:: classref-method -:ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`\ ) |const| :ref:`🔗<class_HingeJoint3D_method_get_param>` Returns the value of the specified parameter. @@ -404,7 +404,7 @@ Returns the value of the specified parameter. .. rst-class:: classref-method -void **set_flag** **(** :ref:`Flag<enum_HingeJoint3D_Flag>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **set_flag**\ (\ flag\: :ref:`Flag<enum_HingeJoint3D_Flag>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_HingeJoint3D_method_set_flag>` If ``true``, enables the specified flag. @@ -416,7 +416,7 @@ If ``true``, enables the specified flag. .. rst-class:: classref-method -void **set_param** **(** :ref:`Param<enum_HingeJoint3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param**\ (\ param\: :ref:`Param<enum_HingeJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_HingeJoint3D_method_set_param>` Sets the value of the specified parameter. @@ -427,3 +427,4 @@ Sets the value of the specified parameter. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hmaccontext.rst b/classes/class_hmaccontext.rst index 484a5e57540..310823d5618 100644 --- a/classes/class_hmaccontext.rst +++ b/classes/class_hmaccontext.rst @@ -78,13 +78,13 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`finish<class_HMACContext_method_finish>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_HMACContext_method_start>` **(** :ref:`HashType<enum_HashingContext_HashType>` hash_type, :ref:`PackedByteArray<class_PackedByteArray>` key **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`update<class_HMACContext_method_update>` **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`finish<class_HMACContext_method_finish>`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_HMACContext_method_start>`\ (\ hash_type\: :ref:`HashType<enum_HashingContext_HashType>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`update<class_HMACContext_method_update>`\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -99,7 +99,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **finish** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **finish**\ (\ ) :ref:`🔗<class_HMACContext_method_finish>` Returns the resulting HMAC. If the HMAC failed, an empty :ref:`PackedByteArray<class_PackedByteArray>` is returned. @@ -111,7 +111,7 @@ Returns the resulting HMAC. If the HMAC failed, an empty :ref:`PackedByteArray<c .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **start** **(** :ref:`HashType<enum_HashingContext_HashType>` hash_type, :ref:`PackedByteArray<class_PackedByteArray>` key **)** +:ref:`Error<enum_@GlobalScope_Error>` **start**\ (\ hash_type\: :ref:`HashType<enum_HashingContext_HashType>`, key\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_HMACContext_method_start>` Initializes the HMACContext. This method cannot be called again on the same HMACContext until :ref:`finish<class_HMACContext_method_finish>` has been called. @@ -123,7 +123,7 @@ Initializes the HMACContext. This method cannot be called again on the same HMAC .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **update** **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** +:ref:`Error<enum_@GlobalScope_Error>` **update**\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_HMACContext_method_update>` Updates the message to be HMACed. This can be called multiple times before :ref:`finish<class_HMACContext_method_finish>` is called to append ``data`` to the message, but cannot be called until :ref:`start<class_HMACContext_method_start>` has been called. @@ -134,3 +134,4 @@ Updates the message to be HMACed. This can be called multiple times before :ref: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hscrollbar.rst b/classes/class_hscrollbar.rst index 3c07f424060..d1f90047bca 100644 --- a/classes/class_hscrollbar.rst +++ b/classes/class_hscrollbar.rst @@ -21,175 +21,6 @@ Description A horizontal scrollbar, typically used to navigate through content that extends beyond the visible width of a control. It is a :ref:`Range<class_Range>`-based control and goes from left (min) to right (max). -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_HScrollBar_theme_icon_decrement>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_HScrollBar_theme_icon_decrement_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_pressed<class_HScrollBar_theme_icon_decrement_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_HScrollBar_theme_icon_increment>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_HScrollBar_theme_icon_increment_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_pressed<class_HScrollBar_theme_icon_increment_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber<class_HScrollBar_theme_style_grabber>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_highlight<class_HScrollBar_theme_style_grabber_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_pressed<class_HScrollBar_theme_style_grabber_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll<class_HScrollBar_theme_style_scroll>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll_focus<class_HScrollBar_theme_style_scroll_focus>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HScrollBar_theme_icon_decrement: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement** - -Icon used as a button to scroll the :ref:`ScrollBar<class_ScrollBar>` left. Supports custom step using the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` property. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_decrement_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement_highlight** - -Displayed when the mouse cursor hovers over the decrement button. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_decrement_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement_pressed** - -Displayed when the decrement button is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment** - -Icon used as a button to scroll the :ref:`ScrollBar<class_ScrollBar>` right. Supports custom step using the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` property. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment_highlight** - -Displayed when the mouse cursor hovers over the increment button. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment_pressed** - -Displayed when the increment button is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber** - -Used as texture for the grabber, the draggable element representing current scroll. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_highlight** - -Used when the mouse hovers over the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_pressed** - -Used when the grabber is being dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_scroll: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **scroll** - -Used as background of this :ref:`ScrollBar<class_ScrollBar>`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_scroll_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **scroll_focus** - -Used as background when the :ref:`ScrollBar<class_ScrollBar>` has the GUI focus. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -197,3 +28,4 @@ Used as background when the :ref:`ScrollBar<class_ScrollBar>` has the GUI focus. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hseparator.rst b/classes/class_hseparator.rst index e578d6f9248..c560d12609c 100644 --- a/classes/class_hseparator.rst +++ b/classes/class_hseparator.rst @@ -21,49 +21,6 @@ Description A horizontal separator used for separating other controls that are arranged **vertically**. **HSeparator** is purely visual and normally drawn as a :ref:`StyleBoxLine<class_StyleBoxLine>`. -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`separation<class_HSeparator_theme_constant_separation>` | ``4`` | - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`separator<class_HSeparator_theme_style_separator>` | | - +---------------------------------+---------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSeparator_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``4`` - -The height of the area covered by the separator. Effectively works like a minimum height. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSeparator_theme_style_separator: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **separator** - -The style for the separator line. Works best with :ref:`StyleBoxLine<class_StyleBoxLine>`. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -71,3 +28,4 @@ The style for the separator line. Works best with :ref:`StyleBoxLine<class_Style .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hslider.rst b/classes/class_hslider.rst index 041e05d064d..88388944b4b 100644 --- a/classes/class_hslider.rst +++ b/classes/class_hslider.rst @@ -21,147 +21,6 @@ Description A horizontal slider, used to adjust a value by moving a grabber along a horizontal axis. It is a :ref:`Range<class_Range>`-based control and goes from left (min) to right (max). -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`center_grabber<class_HSlider_theme_constant_center_grabber>` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`grabber_offset<class_HSlider_theme_constant_grabber_offset>` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_HSlider_theme_icon_grabber>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_disabled<class_HSlider_theme_icon_grabber_disabled>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_highlight<class_HSlider_theme_icon_grabber_highlight>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`tick<class_HSlider_theme_icon_tick>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area<class_HSlider_theme_style_grabber_area>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area_highlight<class_HSlider_theme_style_grabber_area_highlight>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`slider<class_HSlider_theme_style_slider>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSlider_theme_constant_center_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **center_grabber** = ``0`` - -Boolean constant. If ``1``, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_constant_grabber_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **grabber_offset** = ``0`` - -Vertical offset of the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber** - -The texture for the grabber (the draggable element). - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber_disabled** - -The texture for the grabber when it's disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber_highlight** - -The texture for the grabber when it's focused. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_tick: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **tick** - -The texture for the ticks, visible when :ref:`Slider.tick_count<class_Slider_property_tick_count>` is greater than 0. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_grabber_area: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_area** - -The background of the area to the left of the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_grabber_area_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_area_highlight** - -The background of the area to the left of the grabber that displays when it's being hovered or focused. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_slider: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **slider** - -The background for the whole slider. Determines the height of the ``grabber_area``. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -169,3 +28,4 @@ The background for the whole slider. Determines the height of the ``grabber_area .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_hsplitcontainer.rst b/classes/class_hsplitcontainer.rst index ee83a862493..a1880d8c248 100644 --- a/classes/class_hsplitcontainer.rst +++ b/classes/class_hsplitcontainer.rst @@ -28,77 +28,6 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`autohide<class_HSplitContainer_theme_constant_autohide>` | ``1`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`minimum_grab_thickness<class_HSplitContainer_theme_constant_minimum_grab_thickness>` | ``6`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`separation<class_HSplitContainer_theme_constant_separation>` | ``12`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_HSplitContainer_theme_icon_grabber>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSplitContainer_theme_constant_autohide: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **autohide** = ``1`` - -Boolean value. If 1 (``true``), the grabber will hide automatically when it isn't under the cursor. If 0 (``false``), it's always visible. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_constant_minimum_grab_thickness: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **minimum_grab_thickness** = ``6`` - -The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation<class_HSplitContainer_theme_constant_separation>` or :ref:`grabber<class_HSplitContainer_theme_icon_grabber>`'s thickness are too small, this ensure that the splitting line can still be dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``12`` - -The space between sides of the container. - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber** - -The icon used for the grabber drawn in the middle area. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -106,3 +35,4 @@ The icon used for the grabber drawn in the middle area. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_httpclient.rst b/classes/class_httpclient.rst index baa575bd4e6..e91837ea0dd 100644 --- a/classes/class_httpclient.rst +++ b/classes/class_httpclient.rst @@ -72,39 +72,39 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_HTTPClient_method_close>` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_HTTPClient_method_connect_to_host>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port=-1, :ref:`TLSOptions<class_TLSOptions>` tls_options=null **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_response_body_length<class_HTTPClient_method_get_response_body_length>` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_response_code<class_HTTPClient_method_get_response_code>` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_response_headers<class_HTTPClient_method_get_response_headers>` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_response_headers_as_dictionary<class_HTTPClient_method_get_response_headers_as_dictionary>` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status<enum_HTTPClient_Status>` | :ref:`get_status<class_HTTPClient_method_get_status>` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_response<class_HTTPClient_method_has_response>` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_response_chunked<class_HTTPClient_method_is_response_chunked>` **(** **)** |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_HTTPClient_method_poll>` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`query_string_from_dict<class_HTTPClient_method_query_string_from_dict>` **(** :ref:`Dictionary<class_Dictionary>` fields **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`read_response_body_chunk<class_HTTPClient_method_read_response_body_chunk>` **(** **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request<class_HTTPClient_method_request>` **(** :ref:`Method<enum_HTTPClient_Method>` method, :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` headers, :ref:`String<class_String>` body="" **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request_raw<class_HTTPClient_method_request_raw>` **(** :ref:`Method<enum_HTTPClient_Method>` method, :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` headers, :ref:`PackedByteArray<class_PackedByteArray>` body **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_http_proxy<class_HTTPClient_method_set_http_proxy>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_https_proxy<class_HTTPClient_method_set_https_proxy>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_HTTPClient_method_close>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_HTTPClient_method_connect_to_host>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>` = -1, tls_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_response_body_length<class_HTTPClient_method_get_response_body_length>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_response_code<class_HTTPClient_method_get_response_code>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_response_headers<class_HTTPClient_method_get_response_headers>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_response_headers_as_dictionary<class_HTTPClient_method_get_response_headers_as_dictionary>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status<enum_HTTPClient_Status>` | :ref:`get_status<class_HTTPClient_method_get_status>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_response<class_HTTPClient_method_has_response>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_response_chunked<class_HTTPClient_method_is_response_chunked>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_HTTPClient_method_poll>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`query_string_from_dict<class_HTTPClient_method_query_string_from_dict>`\ (\ fields\: :ref:`Dictionary<class_Dictionary>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`read_response_body_chunk<class_HTTPClient_method_read_response_body_chunk>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request<class_HTTPClient_method_request>`\ (\ method\: :ref:`Method<enum_HTTPClient_Method>`, url\: :ref:`String<class_String>`, headers\: :ref:`PackedStringArray<class_PackedStringArray>`, body\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request_raw<class_HTTPClient_method_request_raw>`\ (\ method\: :ref:`Method<enum_HTTPClient_Method>`, url\: :ref:`String<class_String>`, headers\: :ref:`PackedStringArray<class_PackedStringArray>`, body\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_http_proxy<class_HTTPClient_method_set_http_proxy>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_https_proxy<class_HTTPClient_method_set_https_proxy>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -119,7 +119,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Method**: +enum **Method**: :ref:`🔗<enum_HTTPClient_Method>` .. _class_HTTPClient_constant_METHOD_GET: @@ -209,7 +209,7 @@ Represents the size of the :ref:`Method<enum_HTTPClient_Method>` enum. .. rst-class:: classref-enumeration -enum **Status**: +enum **Status**: :ref:`🔗<enum_HTTPClient_Status>` .. _class_HTTPClient_constant_STATUS_DISCONNECTED: @@ -299,7 +299,7 @@ Status: Error in TLS handshake. .. rst-class:: classref-enumeration -enum **ResponseCode**: +enum **ResponseCode**: :ref:`🔗<enum_HTTPClient_ResponseCode>` .. _class_HTTPClient_constant_RESPONSE_CONTINUE: @@ -451,7 +451,9 @@ HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has bee :ref:`ResponseCode<enum_HTTPClient_ResponseCode>` **RESPONSE_USE_PROXY** = ``305`` -*Deprecated.* HTTP status code ``305 Use Proxy``. +**Deprecated:** Many clients ignore this response code for security reasons. It is also deprecated by the HTTP standard. + +HTTP status code ``305 Use Proxy``. .. _class_HTTPClient_constant_RESPONSE_SWITCH_PROXY: @@ -459,7 +461,9 @@ HTTP status code ``304 Not Modified``. A conditional GET or HEAD request has bee :ref:`ResponseCode<enum_HTTPClient_ResponseCode>` **RESPONSE_SWITCH_PROXY** = ``306`` -*Deprecated.* HTTP status code ``306 Switch Proxy``. +**Deprecated:** Many clients ignore this response code for security reasons. It is also deprecated by the HTTP standard. + +HTTP status code ``306 Switch Proxy``. .. _class_HTTPClient_constant_RESPONSE_TEMPORARY_REDIRECT: @@ -802,12 +806,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **blocking_mode_enabled** = ``false`` +:ref:`bool<class_bool>` **blocking_mode_enabled** = ``false`` :ref:`🔗<class_HTTPClient_property_blocking_mode_enabled>` .. rst-class:: classref-property-setget -- void **set_blocking_mode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_blocking_mode_enabled** **(** **)** +- |void| **set_blocking_mode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_blocking_mode_enabled**\ (\ ) If ``true``, execution will block until all data is read from the response. @@ -819,12 +823,12 @@ If ``true``, execution will block until all data is read from the response. .. rst-class:: classref-property -:ref:`StreamPeer<class_StreamPeer>` **connection** +:ref:`StreamPeer<class_StreamPeer>` **connection** :ref:`🔗<class_HTTPClient_property_connection>` .. rst-class:: classref-property-setget -- void **set_connection** **(** :ref:`StreamPeer<class_StreamPeer>` value **)** -- :ref:`StreamPeer<class_StreamPeer>` **get_connection** **(** **)** +- |void| **set_connection**\ (\ value\: :ref:`StreamPeer<class_StreamPeer>`\ ) +- :ref:`StreamPeer<class_StreamPeer>` **get_connection**\ (\ ) The connection to use for this client. @@ -836,12 +840,12 @@ The connection to use for this client. .. rst-class:: classref-property -:ref:`int<class_int>` **read_chunk_size** = ``65536`` +:ref:`int<class_int>` **read_chunk_size** = ``65536`` :ref:`🔗<class_HTTPClient_property_read_chunk_size>` .. rst-class:: classref-property-setget -- void **set_read_chunk_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_read_chunk_size** **(** **)** +- |void| **set_read_chunk_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_read_chunk_size**\ (\ ) The size of the buffer used and maximum bytes to read per iteration. See :ref:`read_response_body_chunk<class_HTTPClient_method_read_response_body_chunk>`. @@ -858,7 +862,7 @@ Method Descriptions .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_HTTPClient_method_close>` Closes the current connection, allowing reuse of this **HTTPClient**. @@ -870,7 +874,7 @@ Closes the current connection, allowing reuse of this **HTTPClient**. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port=-1, :ref:`TLSOptions<class_TLSOptions>` tls_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>` = -1, tls_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_HTTPClient_method_connect_to_host>` Connects to a host. This needs to be done before any requests are sent. @@ -884,12 +888,14 @@ If no ``port`` is specified (or ``-1`` is used), it is automatically set to 80 f .. rst-class:: classref-method -:ref:`int<class_int>` **get_response_body_length** **(** **)** |const| +:ref:`int<class_int>` **get_response_body_length**\ (\ ) |const| :ref:`🔗<class_HTTPClient_method_get_response_body_length>` Returns the response's body length. \ **Note:** Some Web servers may not send a body length. In this case, the value returned will be ``-1``. If using chunked transfer encoding, the body length will also be ``-1``. +\ **Note:** This function always returns ``-1`` on the Web platform due to browsers limitations. + .. rst-class:: classref-item-separator ---- @@ -898,7 +904,7 @@ Returns the response's body length. .. rst-class:: classref-method -:ref:`int<class_int>` **get_response_code** **(** **)** |const| +:ref:`int<class_int>` **get_response_code**\ (\ ) |const| :ref:`🔗<class_HTTPClient_method_get_response_code>` Returns the response's HTTP status code. @@ -910,7 +916,7 @@ Returns the response's HTTP status code. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_response_headers** **(** **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_response_headers**\ (\ ) :ref:`🔗<class_HTTPClient_method_get_response_headers>` Returns the response headers. @@ -922,7 +928,7 @@ Returns the response headers. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_response_headers_as_dictionary** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_response_headers_as_dictionary**\ (\ ) :ref:`🔗<class_HTTPClient_method_get_response_headers_as_dictionary>` Returns all response headers as a Dictionary of structure ``{ "key": "value1; value2" }`` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. @@ -943,7 +949,7 @@ Returns all response headers as a Dictionary of structure ``{ "key": "value1; va .. rst-class:: classref-method -:ref:`Status<enum_HTTPClient_Status>` **get_status** **(** **)** |const| +:ref:`Status<enum_HTTPClient_Status>` **get_status**\ (\ ) |const| :ref:`🔗<class_HTTPClient_method_get_status>` Returns a :ref:`Status<enum_HTTPClient_Status>` constant. Need to call :ref:`poll<class_HTTPClient_method_poll>` in order to get status updates. @@ -955,7 +961,7 @@ Returns a :ref:`Status<enum_HTTPClient_Status>` constant. Need to call :ref:`pol .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_response** **(** **)** |const| +:ref:`bool<class_bool>` **has_response**\ (\ ) |const| :ref:`🔗<class_HTTPClient_method_has_response>` If ``true``, this **HTTPClient** has a response available. @@ -967,7 +973,7 @@ If ``true``, this **HTTPClient** has a response available. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_response_chunked** **(** **)** |const| +:ref:`bool<class_bool>` **is_response_chunked**\ (\ ) |const| :ref:`🔗<class_HTTPClient_method_is_response_chunked>` If ``true``, this **HTTPClient** has a response that is chunked. @@ -979,7 +985,7 @@ If ``true``, this **HTTPClient** has a response that is chunked. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_HTTPClient_method_poll>` This needs to be called in order to have any request processed. Check results with :ref:`get_status<class_HTTPClient_method_get_status>`. @@ -991,7 +997,7 @@ This needs to be called in order to have any request processed. Check results wi .. rst-class:: classref-method -:ref:`String<class_String>` **query_string_from_dict** **(** :ref:`Dictionary<class_Dictionary>` fields **)** +:ref:`String<class_String>` **query_string_from_dict**\ (\ fields\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_HTTPClient_method_query_string_from_dict>` Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: @@ -1044,7 +1050,7 @@ Furthermore, if a key has a ``null`` value, only the key itself is added, withou .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **read_response_body_chunk** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **read_response_body_chunk**\ (\ ) :ref:`🔗<class_HTTPClient_method_read_response_body_chunk>` Reads one chunk from the response. @@ -1056,7 +1062,7 @@ Reads one chunk from the response. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **request** **(** :ref:`Method<enum_HTTPClient_Method>` method, :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` headers, :ref:`String<class_String>` body="" **)** +:ref:`Error<enum_@GlobalScope_Error>` **request**\ (\ method\: :ref:`Method<enum_HTTPClient_Method>`, url\: :ref:`String<class_String>`, headers\: :ref:`PackedStringArray<class_PackedStringArray>`, body\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_HTTPClient_method_request>` Sends a request to the connected host. @@ -1079,9 +1085,9 @@ To create a POST request with query strings to push to the server, do: .. code-tab:: csharp var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; - string queryString = new HTTPClient().QueryStringFromDict(fields); + string queryString = new HttpClient().QueryStringFromDict(fields); string[] headers = { "Content-Type: application/x-www-form-urlencoded", $"Content-Length: {queryString.Length}" }; - var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString); + var result = new HttpClient().Request(HttpClient.Method.Post, "index.php", headers, queryString); @@ -1095,7 +1101,7 @@ To create a POST request with query strings to push to the server, do: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **request_raw** **(** :ref:`Method<enum_HTTPClient_Method>` method, :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` headers, :ref:`PackedByteArray<class_PackedByteArray>` body **)** +:ref:`Error<enum_@GlobalScope_Error>` **request_raw**\ (\ method\: :ref:`Method<enum_HTTPClient_Method>`, url\: :ref:`String<class_String>`, headers\: :ref:`PackedStringArray<class_PackedStringArray>`, body\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_HTTPClient_method_request_raw>` Sends a raw request to the connected host. @@ -1113,7 +1119,7 @@ Sends the body data raw, as a byte array and does not encode it in any way. .. rst-class:: classref-method -void **set_http_proxy** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +|void| **set_http_proxy**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_HTTPClient_method_set_http_proxy>` Sets the proxy server for HTTP requests. @@ -1127,7 +1133,7 @@ The proxy server is unset if ``host`` is empty or ``port`` is -1. .. rst-class:: classref-method -void **set_https_proxy** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +|void| **set_https_proxy**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_HTTPClient_method_set_https_proxy>` Sets the proxy server for HTTPS requests. @@ -1140,3 +1146,4 @@ The proxy server is unset if ``host`` is empty or ``port`` is -1. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_httprequest.rst b/classes/class_httprequest.rst index a7c4c0d66ce..26947c36b42 100644 --- a/classes/class_httprequest.rst +++ b/classes/class_httprequest.rst @@ -67,7 +67,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content public override void _Ready() { // Create an HTTP request node and connect its completion signal. - var httpRequest = new HTTPRequest(); + var httpRequest = new HttpRequest(); AddChild(httpRequest); httpRequest.RequestCompleted += HttpRequestCompleted; @@ -85,7 +85,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content { { "name", "Godette" } }); - error = httpRequest.Request("https://httpbin.org/post", null, HTTPClient.Method.Post, body); + error = httpRequest.Request("https://httpbin.org/post", null, HttpClient.Method.Post, body); if (error != Error.Ok) { GD.PushError("An error occurred in the HTTP request."); @@ -145,7 +145,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content public override void _Ready() { // Create an HTTP request node and connect its completion signal. - var httpRequest = new HTTPRequest(); + var httpRequest = new HttpRequest(); AddChild(httpRequest); httpRequest.RequestCompleted += HttpRequestCompleted; @@ -160,7 +160,7 @@ Can be used to make HTTP requests, i.e. download or upload files or web content // Called when the HTTP request is completed. private void HttpRequestCompleted(long result, long responseCode, string[] headers, byte[] body) { - if (result != (long)HTTPRequest.Result.Success) + if (result != (long)HttpRequest.Result.Success) { GD.PushError("Image couldn't be downloaded. Try a different image."); } @@ -224,25 +224,25 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cancel_request<class_HTTPRequest_method_cancel_request>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_body_size<class_HTTPRequest_method_get_body_size>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_downloaded_bytes<class_HTTPRequest_method_get_downloaded_bytes>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status<enum_HTTPClient_Status>` | :ref:`get_http_client_status<class_HTTPRequest_method_get_http_client_status>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request<class_HTTPRequest_method_request>` **(** :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` custom_headers=PackedStringArray(), :ref:`Method<enum_HTTPClient_Method>` method=0, :ref:`String<class_String>` request_data="" **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request_raw<class_HTTPRequest_method_request_raw>` **(** :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` custom_headers=PackedStringArray(), :ref:`Method<enum_HTTPClient_Method>` method=0, :ref:`PackedByteArray<class_PackedByteArray>` request_data_raw=PackedByteArray() **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_http_proxy<class_HTTPRequest_method_set_http_proxy>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_https_proxy<class_HTTPRequest_method_set_https_proxy>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tls_options<class_HTTPRequest_method_set_tls_options>` **(** :ref:`TLSOptions<class_TLSOptions>` client_options **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_request<class_HTTPRequest_method_cancel_request>`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_body_size<class_HTTPRequest_method_get_body_size>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_downloaded_bytes<class_HTTPRequest_method_get_downloaded_bytes>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status<enum_HTTPClient_Status>` | :ref:`get_http_client_status<class_HTTPRequest_method_get_http_client_status>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request<class_HTTPRequest_method_request>`\ (\ url\: :ref:`String<class_String>`, custom_headers\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray(), method\: :ref:`Method<enum_HTTPClient_Method>` = 0, request_data\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`request_raw<class_HTTPRequest_method_request_raw>`\ (\ url\: :ref:`String<class_String>`, custom_headers\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray(), method\: :ref:`Method<enum_HTTPClient_Method>` = 0, request_data_raw\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_http_proxy<class_HTTPRequest_method_set_http_proxy>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_https_proxy<class_HTTPRequest_method_set_https_proxy>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tls_options<class_HTTPRequest_method_set_tls_options>`\ (\ client_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -257,7 +257,7 @@ Signals .. rst-class:: classref-signal -**request_completed** **(** :ref:`int<class_int>` result, :ref:`int<class_int>` response_code, :ref:`PackedStringArray<class_PackedStringArray>` headers, :ref:`PackedByteArray<class_PackedByteArray>` body **)** +**request_completed**\ (\ result\: :ref:`int<class_int>`, response_code\: :ref:`int<class_int>`, headers\: :ref:`PackedStringArray<class_PackedStringArray>`, body\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_HTTPRequest_signal_request_completed>` Emitted when a request is completed. @@ -274,7 +274,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Result**: +enum **Result**: :ref:`🔗<enum_HTTPRequest_Result>` .. _class_HTTPRequest_constant_RESULT_SUCCESS: @@ -290,6 +290,10 @@ Request successful. :ref:`Result<enum_HTTPRequest_Result>` **RESULT_CHUNKED_BODY_SIZE_MISMATCH** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_HTTPRequest_constant_RESULT_CANT_CONNECT: @@ -346,6 +350,10 @@ Request exceeded its maximum size limit, see :ref:`body_size_limit<class_HTTPReq :ref:`Result<enum_HTTPRequest_Result>` **RESULT_BODY_DECOMPRESS_FAILED** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_HTTPRequest_constant_RESULT_REQUEST_FAILED: @@ -401,20 +409,20 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **accept_gzip** = ``true`` +:ref:`bool<class_bool>` **accept_gzip** = ``true`` :ref:`🔗<class_HTTPRequest_property_accept_gzip>` .. rst-class:: classref-property-setget -- void **set_accept_gzip** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_accepting_gzip** **(** **)** +- |void| **set_accept_gzip**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_accepting_gzip**\ (\ ) If ``true``, this header will be added to each request: ``Accept-Encoding: gzip, deflate`` telling servers that it's okay to compress response bodies. -Any Response body declaring a ``Content-Encoding`` of either ``gzip`` or ``deflate`` will then be automatically decompressed, and the uncompressed bytes will be delivered via ``request_completed``. +Any Response body declaring a ``Content-Encoding`` of either ``gzip`` or ``deflate`` will then be automatically decompressed, and the uncompressed bytes will be delivered via :ref:`request_completed<class_HTTPRequest_signal_request_completed>`. -If the user has specified their own ``Accept-Encoding`` header, then no header will be added regardless of ``accept_gzip``. +If the user has specified their own ``Accept-Encoding`` header, then no header will be added regardless of :ref:`accept_gzip<class_HTTPRequest_property_accept_gzip>`. -If ``false`` no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via ``request_completed``. +If ``false`` no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via :ref:`request_completed<class_HTTPRequest_signal_request_completed>`. .. rst-class:: classref-item-separator @@ -424,12 +432,12 @@ If ``false`` no header will be added, and no decompression will be performed on .. rst-class:: classref-property -:ref:`int<class_int>` **body_size_limit** = ``-1`` +:ref:`int<class_int>` **body_size_limit** = ``-1`` :ref:`🔗<class_HTTPRequest_property_body_size_limit>` .. rst-class:: classref-property-setget -- void **set_body_size_limit** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_body_size_limit** **(** **)** +- |void| **set_body_size_limit**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_body_size_limit**\ (\ ) Maximum allowed size for response bodies. If the response body is compressed, this will be used as the maximum allowed size for the decompressed body. @@ -441,12 +449,12 @@ Maximum allowed size for response bodies. If the response body is compressed, th .. rst-class:: classref-property -:ref:`int<class_int>` **download_chunk_size** = ``65536`` +:ref:`int<class_int>` **download_chunk_size** = ``65536`` :ref:`🔗<class_HTTPRequest_property_download_chunk_size>` .. rst-class:: classref-property-setget -- void **set_download_chunk_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_download_chunk_size** **(** **)** +- |void| **set_download_chunk_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_download_chunk_size**\ (\ ) The size of the buffer used and maximum bytes to read per iteration. See :ref:`HTTPClient.read_chunk_size<class_HTTPClient_property_read_chunk_size>`. @@ -460,12 +468,12 @@ Set this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to .. rst-class:: classref-property -:ref:`String<class_String>` **download_file** = ``""`` +:ref:`String<class_String>` **download_file** = ``""`` :ref:`🔗<class_HTTPRequest_property_download_file>` .. rst-class:: classref-property-setget -- void **set_download_file** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_download_file** **(** **)** +- |void| **set_download_file**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_download_file**\ (\ ) The file to download into. Will output any received file into it. @@ -477,12 +485,12 @@ The file to download into. Will output any received file into it. .. rst-class:: classref-property -:ref:`int<class_int>` **max_redirects** = ``8`` +:ref:`int<class_int>` **max_redirects** = ``8`` :ref:`🔗<class_HTTPRequest_property_max_redirects>` .. rst-class:: classref-property-setget -- void **set_max_redirects** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_redirects** **(** **)** +- |void| **set_max_redirects**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_redirects**\ (\ ) Maximum number of allowed redirects. @@ -494,12 +502,12 @@ Maximum number of allowed redirects. .. rst-class:: classref-property -:ref:`float<class_float>` **timeout** = ``0.0`` +:ref:`float<class_float>` **timeout** = ``0.0`` :ref:`🔗<class_HTTPRequest_property_timeout>` .. rst-class:: classref-property-setget -- void **set_timeout** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_timeout** **(** **)** +- |void| **set_timeout**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_timeout**\ (\ ) The duration to wait in seconds before a request times out. If :ref:`timeout<class_HTTPRequest_property_timeout>` is set to ``0.0`` then the request will never time out. For simple requests, such as communication with a REST API, it is recommended that :ref:`timeout<class_HTTPRequest_property_timeout>` is set to a value suitable for the server response time (e.g. between ``1.0`` and ``10.0``). This will help prevent unwanted timeouts caused by variation in server response times while still allowing the application to detect when a request has timed out. For larger requests such as file downloads it is suggested the :ref:`timeout<class_HTTPRequest_property_timeout>` be set to ``0.0``, disabling the timeout functionality. This will help to prevent large transfers from failing due to exceeding the timeout value. @@ -511,12 +519,12 @@ The duration to wait in seconds before a request times out. If :ref:`timeout<cla .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_threads** = ``false`` +:ref:`bool<class_bool>` **use_threads** = ``false`` :ref:`🔗<class_HTTPRequest_property_use_threads>` .. rst-class:: classref-property-setget -- void **set_use_threads** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_threads** **(** **)** +- |void| **set_use_threads**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_threads**\ (\ ) If ``true``, multithreading is used to improve performance. @@ -533,7 +541,7 @@ Method Descriptions .. rst-class:: classref-method -void **cancel_request** **(** **)** +|void| **cancel_request**\ (\ ) :ref:`🔗<class_HTTPRequest_method_cancel_request>` Cancels the current request. @@ -545,7 +553,7 @@ Cancels the current request. .. rst-class:: classref-method -:ref:`int<class_int>` **get_body_size** **(** **)** |const| +:ref:`int<class_int>` **get_body_size**\ (\ ) |const| :ref:`🔗<class_HTTPRequest_method_get_body_size>` Returns the response body length. @@ -559,7 +567,7 @@ Returns the response body length. .. rst-class:: classref-method -:ref:`int<class_int>` **get_downloaded_bytes** **(** **)** |const| +:ref:`int<class_int>` **get_downloaded_bytes**\ (\ ) |const| :ref:`🔗<class_HTTPRequest_method_get_downloaded_bytes>` Returns the number of bytes this HTTPRequest downloaded. @@ -571,7 +579,7 @@ Returns the number of bytes this HTTPRequest downloaded. .. rst-class:: classref-method -:ref:`Status<enum_HTTPClient_Status>` **get_http_client_status** **(** **)** |const| +:ref:`Status<enum_HTTPClient_Status>` **get_http_client_status**\ (\ ) |const| :ref:`🔗<class_HTTPRequest_method_get_http_client_status>` Returns the current status of the underlying :ref:`HTTPClient<class_HTTPClient>`. See :ref:`Status<enum_HTTPClient_Status>`. @@ -583,7 +591,7 @@ Returns the current status of the underlying :ref:`HTTPClient<class_HTTPClient>` .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **request** **(** :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` custom_headers=PackedStringArray(), :ref:`Method<enum_HTTPClient_Method>` method=0, :ref:`String<class_String>` request_data="" **)** +:ref:`Error<enum_@GlobalScope_Error>` **request**\ (\ url\: :ref:`String<class_String>`, custom_headers\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray(), method\: :ref:`Method<enum_HTTPClient_Method>` = 0, request_data\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_HTTPRequest_method_request>` Creates request on the underlying :ref:`HTTPClient<class_HTTPClient>`. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host<class_HTTPClient_method_connect_to_host>` and passes parameters onto :ref:`HTTPClient.request<class_HTTPClient_method_request>`. @@ -601,7 +609,7 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if request is suc .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **request_raw** **(** :ref:`String<class_String>` url, :ref:`PackedStringArray<class_PackedStringArray>` custom_headers=PackedStringArray(), :ref:`Method<enum_HTTPClient_Method>` method=0, :ref:`PackedByteArray<class_PackedByteArray>` request_data_raw=PackedByteArray() **)** +:ref:`Error<enum_@GlobalScope_Error>` **request_raw**\ (\ url\: :ref:`String<class_String>`, custom_headers\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray(), method\: :ref:`Method<enum_HTTPClient_Method>` = 0, request_data_raw\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) :ref:`🔗<class_HTTPRequest_method_request_raw>` Creates request on the underlying :ref:`HTTPClient<class_HTTPClient>` using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using :ref:`HTTPClient.connect_to_host<class_HTTPClient_method_connect_to_host>` and passes parameters onto :ref:`HTTPClient.request<class_HTTPClient_method_request>`. @@ -615,7 +623,7 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if request is suc .. rst-class:: classref-method -void **set_http_proxy** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +|void| **set_http_proxy**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_HTTPRequest_method_set_http_proxy>` Sets the proxy server for HTTP requests. @@ -629,7 +637,7 @@ The proxy server is unset if ``host`` is empty or ``port`` is -1. .. rst-class:: classref-method -void **set_https_proxy** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +|void| **set_https_proxy**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_HTTPRequest_method_set_https_proxy>` Sets the proxy server for HTTPS requests. @@ -643,7 +651,7 @@ The proxy server is unset if ``host`` is empty or ``port`` is -1. .. rst-class:: classref-method -void **set_tls_options** **(** :ref:`TLSOptions<class_TLSOptions>` client_options **)** +|void| **set_tls_options**\ (\ client_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) :ref:`🔗<class_HTTPRequest_method_set_tls_options>` Sets the :ref:`TLSOptions<class_TLSOptions>` to be used when connecting to an HTTPS server. See :ref:`TLSOptions.client<class_TLSOptions_method_client>`. @@ -654,3 +662,4 @@ Sets the :ref:`TLSOptions<class_TLSOptions>` to be used when connecting to an HT .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_image.rst b/classes/class_image.rst index 711a07392b7..4e594fca6d5 100644 --- a/classes/class_image.rst +++ b/classes/class_image.rst @@ -21,7 +21,7 @@ Description Native image datatype. Contains image data which can be converted to an :ref:`ImageTexture<class_ImageTexture>` and provides commonly used *image processing* methods. The maximum width and height for an **Image** are :ref:`MAX_WIDTH<class_Image_constant_MAX_WIDTH>` and :ref:`MAX_HEIGHT<class_Image_constant_MAX_HEIGHT>`. -An **Image** cannot be assigned to a ``texture`` property of an object directly (such as :ref:`Sprite2D<class_Sprite2D>`), and has to be converted manually to an :ref:`ImageTexture<class_ImageTexture>` first. +An **Image** cannot be assigned to a texture property of an object directly (such as :ref:`Sprite2D.texture<class_Sprite2D_property_texture>`), and has to be converted manually to an :ref:`ImageTexture<class_ImageTexture>` first. \ **Note:** The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. @@ -32,6 +32,8 @@ Tutorials - :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -52,141 +54,149 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`adjust_bcs<class_Image_method_adjust_bcs>` **(** :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_rect<class_Image_method_blend_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blend_rect_mask<class_Image_method_blend_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blit_rect<class_Image_method_blit_rect>` **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`blit_rect_mask<class_Image_method_blit_rect_mask>` **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bump_map_to_normal_map<class_Image_method_bump_map_to_normal_map>` **(** :ref:`float<class_float>` bump_scale=1.0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_mipmaps<class_Image_method_clear_mipmaps>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress<class_Image_method_compress>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`CompressSource<enum_Image_CompressSource>` source=0, :ref:`ASTCFormat<enum_Image_ASTCFormat>` astc_format=0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress_from_channels<class_Image_method_compress_from_channels>` **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`UsedChannels<enum_Image_UsedChannels>` channels, :ref:`ASTCFormat<enum_Image_ASTCFormat>` astc_format=0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`compute_image_metrics<class_Image_method_compute_image_metrics>` **(** :ref:`Image<class_Image>` compared_image, :ref:`bool<class_bool>` use_luma **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`convert<class_Image_method_convert>` **(** :ref:`Format<enum_Image_Format>` format **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`copy_from<class_Image_method_copy_from>` **(** :ref:`Image<class_Image>` src **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`create<class_Image_method_create>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)** |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`create_from_data<class_Image_method_create_from_data>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`crop<class_Image_method_crop>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`decompress<class_Image_method_decompress>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AlphaMode<enum_Image_AlphaMode>` | :ref:`detect_alpha<class_Image_method_detect_alpha>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UsedChannels<enum_Image_UsedChannels>` | :ref:`detect_used_channels<class_Image_method_detect_used_channels>` **(** :ref:`CompressSource<enum_Image_CompressSource>` source=0 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_Image_method_fill>` **(** :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_rect<class_Image_method_fill_rect>` **(** :ref:`Rect2i<class_Rect2i>` rect, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fix_alpha_edges<class_Image_method_fix_alpha_edges>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flip_x<class_Image_method_flip_x>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flip_y<class_Image_method_flip_y>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>` **(** :ref:`bool<class_bool>` renormalize=false **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data<class_Image_method_get_data>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Image_method_get_format>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_height<class_Image_method_get_height>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_mipmap_offset<class_Image_method_get_mipmap_offset>` **(** :ref:`int<class_int>` mipmap **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_pixel<class_Image_method_get_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_pixelv<class_Image_method_get_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_region<class_Image_method_get_region>` **(** :ref:`Rect2i<class_Rect2i>` region **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_Image_method_get_size>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_Image_method_get_used_rect>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_width<class_Image_method_get_width>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Image_method_has_mipmaps>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_compressed<class_Image_method_is_compressed>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_Image_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_invisible<class_Image_method_is_invisible>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_Image_method_load>` **(** :ref:`String<class_String>` path **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bmp_from_buffer<class_Image_method_load_bmp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`load_from_file<class_Image_method_load_from_file>` **(** :ref:`String<class_String>` path **)** |static| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_jpg_from_buffer<class_Image_method_load_jpg_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_png_from_buffer<class_Image_method_load_png_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_svg_from_buffer<class_Image_method_load_svg_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`float<class_float>` scale=1.0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_svg_from_string<class_Image_method_load_svg_from_string>` **(** :ref:`String<class_String>` svg_str, :ref:`float<class_float>` scale=1.0 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_tga_from_buffer<class_Image_method_load_tga_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_webp_from_buffer<class_Image_method_load_webp_from_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`normal_map_to_xy<class_Image_method_normal_map_to_xy>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`premultiply_alpha<class_Image_method_premultiply_alpha>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resize<class_Image_method_resize>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resize_to_po2<class_Image_method_resize_to_po2>` **(** :ref:`bool<class_bool>` square=false, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`rgbe_to_srgb<class_Image_method_rgbe_to_srgb>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_90<class_Image_method_rotate_90>` **(** :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` direction **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_180<class_Image_method_rotate_180>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_exr<class_Image_method_save_exr>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` grayscale=false **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_exr_to_buffer<class_Image_method_save_exr_to_buffer>` **(** :ref:`bool<class_bool>` grayscale=false **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_jpg<class_Image_method_save_jpg>` **(** :ref:`String<class_String>` path, :ref:`float<class_float>` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_jpg_to_buffer<class_Image_method_save_jpg_to_buffer>` **(** :ref:`float<class_float>` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_png<class_Image_method_save_png>` **(** :ref:`String<class_String>` path **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_png_to_buffer<class_Image_method_save_png_to_buffer>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_webp<class_Image_method_save_webp>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_webp_to_buffer<class_Image_method_save_webp_to_buffer>` **(** :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_data<class_Image_method_set_data>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pixel<class_Image_method_set_pixel>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pixelv<class_Image_method_set_pixelv>` **(** :ref:`Vector2i<class_Vector2i>` point, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shrink_x2<class_Image_method_shrink_x2>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`srgb_to_linear<class_Image_method_srgb_to_linear>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`adjust_bcs<class_Image_method_adjust_bcs>`\ (\ brightness\: :ref:`float<class_float>`, contrast\: :ref:`float<class_float>`, saturation\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`blend_rect<class_Image_method_blend_rect>`\ (\ src\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`blend_rect_mask<class_Image_method_blend_rect_mask>`\ (\ src\: :ref:`Image<class_Image>`, mask\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`blit_rect<class_Image_method_blit_rect>`\ (\ src\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`blit_rect_mask<class_Image_method_blit_rect_mask>`\ (\ src\: :ref:`Image<class_Image>`, mask\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bump_map_to_normal_map<class_Image_method_bump_map_to_normal_map>`\ (\ bump_scale\: :ref:`float<class_float>` = 1.0\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_mipmaps<class_Image_method_clear_mipmaps>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress<class_Image_method_compress>`\ (\ mode\: :ref:`CompressMode<enum_Image_CompressMode>`, source\: :ref:`CompressSource<enum_Image_CompressSource>` = 0, astc_format\: :ref:`ASTCFormat<enum_Image_ASTCFormat>` = 0\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compress_from_channels<class_Image_method_compress_from_channels>`\ (\ mode\: :ref:`CompressMode<enum_Image_CompressMode>`, channels\: :ref:`UsedChannels<enum_Image_UsedChannels>`, astc_format\: :ref:`ASTCFormat<enum_Image_ASTCFormat>` = 0\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`compute_image_metrics<class_Image_method_compute_image_metrics>`\ (\ compared_image\: :ref:`Image<class_Image>`, use_luma\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`convert<class_Image_method_convert>`\ (\ format\: :ref:`Format<enum_Image_Format>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`copy_from<class_Image_method_copy_from>`\ (\ src\: :ref:`Image<class_Image>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`create<class_Image_method_create>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`\ ) |static| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`create_empty<class_Image_method_create_empty>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`\ ) |static| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`create_from_data<class_Image_method_create_from_data>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`crop<class_Image_method_crop>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`decompress<class_Image_method_decompress>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AlphaMode<enum_Image_AlphaMode>` | :ref:`detect_alpha<class_Image_method_detect_alpha>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UsedChannels<enum_Image_UsedChannels>` | :ref:`detect_used_channels<class_Image_method_detect_used_channels>`\ (\ source\: :ref:`CompressSource<enum_Image_CompressSource>` = 0\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_Image_method_fill>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill_rect<class_Image_method_fill_rect>`\ (\ rect\: :ref:`Rect2i<class_Rect2i>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fix_alpha_edges<class_Image_method_fix_alpha_edges>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`flip_x<class_Image_method_flip_x>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`flip_y<class_Image_method_flip_y>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`\ (\ renormalize\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data<class_Image_method_get_data>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_data_size<class_Image_method_get_data_size>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Image_method_get_format>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_height<class_Image_method_get_height>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_mipmap_count<class_Image_method_get_mipmap_count>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_mipmap_offset<class_Image_method_get_mipmap_offset>`\ (\ mipmap\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_pixel<class_Image_method_get_pixel>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_pixelv<class_Image_method_get_pixelv>`\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_region<class_Image_method_get_region>`\ (\ region\: :ref:`Rect2i<class_Rect2i>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_Image_method_get_size>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_Image_method_get_used_rect>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_width<class_Image_method_get_width>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Image_method_has_mipmaps>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_compressed<class_Image_method_is_compressed>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_Image_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_invisible<class_Image_method_is_invisible>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_Image_method_load>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_bmp_from_buffer<class_Image_method_load_bmp_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`load_from_file<class_Image_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_jpg_from_buffer<class_Image_method_load_jpg_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_ktx_from_buffer<class_Image_method_load_ktx_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_png_from_buffer<class_Image_method_load_png_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_svg_from_buffer<class_Image_method_load_svg_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, scale\: :ref:`float<class_float>` = 1.0\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_svg_from_string<class_Image_method_load_svg_from_string>`\ (\ svg_str\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_tga_from_buffer<class_Image_method_load_tga_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_webp_from_buffer<class_Image_method_load_webp_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`normal_map_to_xy<class_Image_method_normal_map_to_xy>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`premultiply_alpha<class_Image_method_premultiply_alpha>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resize<class_Image_method_resize>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, interpolation\: :ref:`Interpolation<enum_Image_Interpolation>` = 1\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resize_to_po2<class_Image_method_resize_to_po2>`\ (\ square\: :ref:`bool<class_bool>` = false, interpolation\: :ref:`Interpolation<enum_Image_Interpolation>` = 1\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`rgbe_to_srgb<class_Image_method_rgbe_to_srgb>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_90<class_Image_method_rotate_90>`\ (\ direction\: :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_180<class_Image_method_rotate_180>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_exr<class_Image_method_save_exr>`\ (\ path\: :ref:`String<class_String>`, grayscale\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_exr_to_buffer<class_Image_method_save_exr_to_buffer>`\ (\ grayscale\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_jpg<class_Image_method_save_jpg>`\ (\ path\: :ref:`String<class_String>`, quality\: :ref:`float<class_float>` = 0.75\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_jpg_to_buffer<class_Image_method_save_jpg_to_buffer>`\ (\ quality\: :ref:`float<class_float>` = 0.75\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_png<class_Image_method_save_png>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_png_to_buffer<class_Image_method_save_png_to_buffer>`\ (\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_webp<class_Image_method_save_webp>`\ (\ path\: :ref:`String<class_String>`, lossy\: :ref:`bool<class_bool>` = false, quality\: :ref:`float<class_float>` = 0.75\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`save_webp_to_buffer<class_Image_method_save_webp_to_buffer>`\ (\ lossy\: :ref:`bool<class_bool>` = false, quality\: :ref:`float<class_float>` = 0.75\ ) |const| | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_data<class_Image_method_set_data>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pixel<class_Image_method_set_pixel>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pixelv<class_Image_method_set_pixelv>`\ (\ point\: :ref:`Vector2i<class_Vector2i>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shrink_x2<class_Image_method_shrink_x2>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`srgb_to_linear<class_Image_method_srgb_to_linear>`\ (\ ) | + +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -201,7 +211,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Format**: +enum **Format**: :ref:`🔗<enum_Image_Format>` .. _class_Image_constant_FORMAT_L8: @@ -269,7 +279,7 @@ OpenGL texture format ``RGBA`` with four components, each with a bitdepth of 4. :ref:`Format<enum_Image_Format>` **FORMAT_RGB565** = ``7`` - +OpenGL texture format ``RGB`` with three components. Red and blue have a bitdepth of 5, and green has a bitdepth of 6. .. _class_Image_constant_FORMAT_RF: @@ -309,7 +319,7 @@ OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 32- :ref:`Format<enum_Image_Format>` **FORMAT_RH** = ``12`` -OpenGL texture format ``GL_R32F`` where there's one component, a 16-bit "half-precision" floating-point value. +OpenGL texture format ``GL_R16F`` where there's one component, a 16-bit "half-precision" floating-point value. .. _class_Image_constant_FORMAT_RGH: @@ -317,7 +327,7 @@ OpenGL texture format ``GL_R32F`` where there's one component, a 16-bit "half-pr :ref:`Format<enum_Image_Format>` **FORMAT_RGH** = ``13`` -OpenGL texture format ``GL_RG32F`` where there are two components, each a 16-bit "half-precision" floating-point value. +OpenGL texture format ``GL_RG16F`` where there are two components, each a 16-bit "half-precision" floating-point value. .. _class_Image_constant_FORMAT_RGBH: @@ -325,7 +335,7 @@ OpenGL texture format ``GL_RG32F`` where there are two components, each a 16-bit :ref:`Format<enum_Image_Format>` **FORMAT_RGBH** = ``14`` -OpenGL texture format ``GL_RGB32F`` where there are three components, each a 16-bit "half-precision" floating-point value. +OpenGL texture format ``GL_RGB16F`` where there are three components, each a 16-bit "half-precision" floating-point value. .. _class_Image_constant_FORMAT_RGBAH: @@ -333,7 +343,7 @@ OpenGL texture format ``GL_RGB32F`` where there are three components, each a 16- :ref:`Format<enum_Image_Format>` **FORMAT_RGBAH** = ``15`` -OpenGL texture format ``GL_RGBA32F`` where there are four components, each a 16-bit "half-precision" floating-point value. +OpenGL texture format ``GL_RGBA16F`` where there are four components, each a 16-bit "half-precision" floating-point value. .. _class_Image_constant_FORMAT_RGBE9995: @@ -491,7 +501,7 @@ Texture format that uses `BPTC <https://www.khronos.org/opengl/wiki/BPTC_Texture :ref:`Format<enum_Image_Format>` **FORMAT_ETC2_RA_AS_RG** = ``33`` - +`Ericsson Texture Compression format 2 <https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC>`__ (``RGBA8`` variant), which compresses RA data and interprets it as two channels (red and green). See also :ref:`FORMAT_ETC2_RGBA8<class_Image_constant_FORMAT_ETC2_RGBA8>`. .. _class_Image_constant_FORMAT_DXT5_RA_AS_RG: @@ -499,7 +509,7 @@ Texture format that uses `BPTC <https://www.khronos.org/opengl/wiki/BPTC_Texture :ref:`Format<enum_Image_Format>` **FORMAT_DXT5_RA_AS_RG** = ``34`` - +The `S3TC <https://en.wikipedia.org/wiki/S3_Texture_Compression>`__ texture format also known as Block Compression 3 or BC3, which compresses RA data and interprets it as two channels (red and green). See also :ref:`FORMAT_DXT5<class_Image_constant_FORMAT_DXT5>`. .. _class_Image_constant_FORMAT_ASTC_4x4: @@ -507,7 +517,7 @@ Texture format that uses `BPTC <https://www.khronos.org/opengl/wiki/BPTC_Texture :ref:`Format<enum_Image_Format>` **FORMAT_ASTC_4x4** = ``35`` -`Adaptive Scalable Texutre Compression <https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression>`__. This implements the 4x4 (high quality) mode. +`Adaptive Scalable Texture Compression <https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression>`__. This implements the 4×4 (high quality) mode. .. _class_Image_constant_FORMAT_ASTC_4x4_HDR: @@ -523,7 +533,7 @@ Same format as :ref:`FORMAT_ASTC_4x4<class_Image_constant_FORMAT_ASTC_4x4>`, but :ref:`Format<enum_Image_Format>` **FORMAT_ASTC_8x8** = ``37`` -`Adaptive Scalable Texutre Compression <https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression>`__. This implements the 8x8 (low quality) mode. +`Adaptive Scalable Texture Compression <https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression>`__. This implements the 8×8 (low quality) mode. .. _class_Image_constant_FORMAT_ASTC_8x8_HDR: @@ -549,7 +559,7 @@ Represents the size of the :ref:`Format<enum_Image_Format>` enum. .. rst-class:: classref-enumeration -enum **Interpolation**: +enum **Interpolation**: :ref:`🔗<enum_Image_Interpolation>` .. _class_Image_constant_INTERPOLATE_NEAREST: @@ -597,7 +607,7 @@ On the other hand, if the image already has mipmaps, they will be used, and a ne :ref:`Interpolation<enum_Image_Interpolation>` **INTERPOLATE_LANCZOS** = ``4`` -Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. +Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscaling images. .. rst-class:: classref-item-separator @@ -607,7 +617,7 @@ Performs Lanczos interpolation. This is the slowest image resizing mode, but it .. rst-class:: classref-enumeration -enum **AlphaMode**: +enum **AlphaMode**: :ref:`🔗<enum_Image_AlphaMode>` .. _class_Image_constant_ALPHA_NONE: @@ -641,7 +651,7 @@ Image uses alpha. .. rst-class:: classref-enumeration -enum **CompressMode**: +enum **CompressMode**: :ref:`🔗<enum_Image_CompressMode>` .. _class_Image_constant_COMPRESS_S3TC: @@ -699,7 +709,7 @@ Represents the size of the :ref:`CompressMode<enum_Image_CompressMode>` enum. .. rst-class:: classref-enumeration -enum **UsedChannels**: +enum **UsedChannels**: :ref:`🔗<enum_Image_UsedChannels>` .. _class_Image_constant_USED_CHANNELS_L: @@ -707,7 +717,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_L** = ``0`` - +The image only uses one channel for luminance (grayscale). .. _class_Image_constant_USED_CHANNELS_LA: @@ -715,7 +725,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_LA** = ``1`` - +The image uses two channels for luminance and alpha, respectively. .. _class_Image_constant_USED_CHANNELS_R: @@ -723,7 +733,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_R** = ``2`` - +The image only uses the red channel. .. _class_Image_constant_USED_CHANNELS_RG: @@ -731,7 +741,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_RG** = ``3`` - +The image uses two channels for red and green. .. _class_Image_constant_USED_CHANNELS_RGB: @@ -739,7 +749,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_RGB** = ``4`` - +The image uses three channels for red, green, and blue. .. _class_Image_constant_USED_CHANNELS_RGBA: @@ -747,7 +757,7 @@ enum **UsedChannels**: :ref:`UsedChannels<enum_Image_UsedChannels>` **USED_CHANNELS_RGBA** = ``5`` - +The image uses four channels for red, green, blue, and alpha. .. rst-class:: classref-item-separator @@ -757,7 +767,7 @@ enum **UsedChannels**: .. rst-class:: classref-enumeration -enum **CompressSource**: +enum **CompressSource**: :ref:`🔗<enum_Image_CompressSource>` .. _class_Image_constant_COMPRESS_SOURCE_GENERIC: @@ -791,7 +801,7 @@ Source texture (before compression) is a normal texture (e.g. it can be compress .. rst-class:: classref-enumeration -enum **ASTCFormat**: +enum **ASTCFormat**: :ref:`🔗<enum_Image_ASTCFormat>` .. _class_Image_constant_ASTC_FORMAT_4x4: @@ -799,7 +809,7 @@ enum **ASTCFormat**: :ref:`ASTCFormat<enum_Image_ASTCFormat>` **ASTC_FORMAT_4x4** = ``0`` -Hint to indicate that the high quality 4x4 ASTC compression format should be used. +Hint to indicate that the high quality 4×4 ASTC compression format should be used. .. _class_Image_constant_ASTC_FORMAT_8x8: @@ -807,7 +817,7 @@ Hint to indicate that the high quality 4x4 ASTC compression format should be use :ref:`ASTCFormat<enum_Image_ASTCFormat>` **ASTC_FORMAT_8x8** = ``1`` -Hint to indicate that the low quality 8x8 ASTC compression format should be used. +Hint to indicate that the low quality 8×8 ASTC compression format should be used. .. rst-class:: classref-section-separator @@ -822,7 +832,7 @@ Constants .. rst-class:: classref-constant -**MAX_WIDTH** = ``16777216`` +**MAX_WIDTH** = ``16777216`` :ref:`🔗<class_Image_constant_MAX_WIDTH>` The maximal width allowed for **Image** resources. @@ -830,7 +840,7 @@ The maximal width allowed for **Image** resources. .. rst-class:: classref-constant -**MAX_HEIGHT** = ``16777216`` +**MAX_HEIGHT** = ``16777216`` :ref:`🔗<class_Image_constant_MAX_HEIGHT>` The maximal height allowed for **Image** resources. @@ -847,7 +857,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **data** = ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` +:ref:`Dictionary<class_Dictionary>` **data** = ``{ "data": PackedByteArray(), "format": "Lum8", "height": 0, "mipmaps": false, "width": 0 }`` :ref:`🔗<class_Image_property_data>` Holds all the image's color data in a given format. See :ref:`Format<enum_Image_Format>` constants. @@ -864,11 +874,9 @@ Method Descriptions .. rst-class:: classref-method -void **adjust_bcs** **(** :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation **)** +|void| **adjust_bcs**\ (\ brightness\: :ref:`float<class_float>`, contrast\: :ref:`float<class_float>`, saturation\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Image_method_adjust_bcs>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adjusts this image's ``brightness``, ``contrast``, and ``saturation`` by the given values. Does not work if the image is compressed (see :ref:`is_compressed<class_Image_method_is_compressed>`). .. rst-class:: classref-item-separator @@ -878,7 +886,7 @@ void **adjust_bcs** **(** :ref:`float<class_float>` brightness, :ref:`float<clas .. rst-class:: classref-method -void **blend_rect** **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** +|void| **blend_rect**\ (\ src\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Image_method_blend_rect>` Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with non-positive size is treated as empty. @@ -890,7 +898,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image at coordinates ``dst` .. rst-class:: classref-method -void **blend_rect_mask** **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** +|void| **blend_rect_mask**\ (\ src\: :ref:`Image<class_Image>`, mask\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Image_method_blend_rect_mask>` Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image at coordinates ``dst``, clipped accordingly to both image bounds. Alpha channels are required for both ``src`` and ``mask``. ``dst`` pixels and ``src`` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with non-positive size is treated as empty. @@ -902,7 +910,7 @@ Alpha-blends ``src_rect`` from ``src`` image to this image using ``mask`` image .. rst-class:: classref-method -void **blit_rect** **(** :ref:`Image<class_Image>` src, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** +|void| **blit_rect**\ (\ src\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Image_method_blit_rect>` Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, clipped accordingly to both image bounds. This image and ``src`` image **must** have the same format. ``src_rect`` with non-positive size is treated as empty. @@ -914,7 +922,7 @@ Copies ``src_rect`` from ``src`` image to this image at coordinates ``dst``, cli .. rst-class:: classref-method -void **blit_rect_mask** **(** :ref:`Image<class_Image>` src, :ref:`Image<class_Image>` mask, :ref:`Rect2i<class_Rect2i>` src_rect, :ref:`Vector2i<class_Vector2i>` dst **)** +|void| **blit_rect_mask**\ (\ src\: :ref:`Image<class_Image>`, mask\: :ref:`Image<class_Image>`, src_rect\: :ref:`Rect2i<class_Rect2i>`, dst\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Image_method_blit_rect_mask>` Blits ``src_rect`` area from ``src`` image to this image at the coordinates given by ``dst``, clipped accordingly to both image bounds. ``src`` pixel is copied onto ``dst`` if the corresponding ``mask`` pixel's alpha value is not 0. This image and ``src`` image **must** have the same format. ``src`` image and ``mask`` image **must** have the same size (width and height) but they can have different formats. ``src_rect`` with non-positive size is treated as empty. @@ -926,7 +934,7 @@ Blits ``src_rect`` area from ``src`` image to this image at the coordinates give .. rst-class:: classref-method -void **bump_map_to_normal_map** **(** :ref:`float<class_float>` bump_scale=1.0 **)** +|void| **bump_map_to_normal_map**\ (\ bump_scale\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Image_method_bump_map_to_normal_map>` Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel. @@ -938,7 +946,7 @@ Converts a bump map to a normal map. A bump map provides a height offset per-pix .. rst-class:: classref-method -void **clear_mipmaps** **(** **)** +|void| **clear_mipmaps**\ (\ ) :ref:`🔗<class_Image_method_clear_mipmaps>` Removes the image's mipmaps. @@ -950,7 +958,7 @@ Removes the image's mipmaps. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **compress** **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`CompressSource<enum_Image_CompressSource>` source=0, :ref:`ASTCFormat<enum_Image_ASTCFormat>` astc_format=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **compress**\ (\ mode\: :ref:`CompressMode<enum_Image_CompressMode>`, source\: :ref:`CompressSource<enum_Image_CompressSource>` = 0, astc_format\: :ref:`ASTCFormat<enum_Image_ASTCFormat>` = 0\ ) :ref:`🔗<class_Image_method_compress>` Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. @@ -966,7 +974,7 @@ For ASTC compression, the ``astc_format`` parameter must be supplied. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **compress_from_channels** **(** :ref:`CompressMode<enum_Image_CompressMode>` mode, :ref:`UsedChannels<enum_Image_UsedChannels>` channels, :ref:`ASTCFormat<enum_Image_ASTCFormat>` astc_format=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **compress_from_channels**\ (\ mode\: :ref:`CompressMode<enum_Image_CompressMode>`, channels\: :ref:`UsedChannels<enum_Image_UsedChannels>`, astc_format\: :ref:`ASTCFormat<enum_Image_ASTCFormat>` = 0\ ) :ref:`🔗<class_Image_method_compress_from_channels>` Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. @@ -982,7 +990,7 @@ For ASTC compression, the ``astc_format`` parameter must be supplied. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **compute_image_metrics** **(** :ref:`Image<class_Image>` compared_image, :ref:`bool<class_bool>` use_luma **)** +:ref:`Dictionary<class_Dictionary>` **compute_image_metrics**\ (\ compared_image\: :ref:`Image<class_Image>`, use_luma\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Image_method_compute_image_metrics>` Compute image metrics on the current image and the compared image. @@ -996,7 +1004,7 @@ The dictionary contains ``max``, ``mean``, ``mean_squared``, ``root_mean_squared .. rst-class:: classref-method -void **convert** **(** :ref:`Format<enum_Image_Format>` format **)** +|void| **convert**\ (\ format\: :ref:`Format<enum_Image_Format>`\ ) :ref:`🔗<class_Image_method_convert>` Converts the image's format. See :ref:`Format<enum_Image_Format>` constants. @@ -1008,7 +1016,7 @@ Converts the image's format. See :ref:`Format<enum_Image_Format>` constants. .. rst-class:: classref-method -void **copy_from** **(** :ref:`Image<class_Image>` src **)** +|void| **copy_from**\ (\ src\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_Image_method_copy_from>` Copies ``src`` image to this image. @@ -1020,7 +1028,21 @@ Copies ``src`` image to this image. .. rst-class:: classref-method -:ref:`Image<class_Image>` **create** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format **)** |static| +:ref:`Image<class_Image>` **create**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`\ ) |static| :ref:`🔗<class_Image_method_create>` + +**Deprecated:** Use :ref:`create_empty<class_Image_method_create_empty>`. + +Creates an empty image of given size and format. See :ref:`Format<enum_Image_Format>` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Image_method_create_empty: + +.. rst-class:: classref-method + +:ref:`Image<class_Image>` **create_empty**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`\ ) |static| :ref:`🔗<class_Image_method_create_empty>` Creates an empty image of given size and format. See :ref:`Format<enum_Image_Format>` constants. If ``use_mipmaps`` is ``true``, then generate mipmaps for this image. See the :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`. @@ -1032,7 +1054,7 @@ Creates an empty image of given size and format. See :ref:`Format<enum_Image_For .. rst-class:: classref-method -:ref:`Image<class_Image>` **create_from_data** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |static| +:ref:`Image<class_Image>` **create_from_data**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_Image_method_create_from_data>` Creates a new image of given size and format. See :ref:`Format<enum_Image_Format>` constants. Fills the image with the given raw data. If ``use_mipmaps`` is ``true`` then loads mipmaps for this image from ``data``. See :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>`. @@ -1044,7 +1066,7 @@ Creates a new image of given size and format. See :ref:`Format<enum_Image_Format .. rst-class:: classref-method -void **crop** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** +|void| **crop**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Image_method_crop>` Crops the image to the given ``width`` and ``height``. If the specified size is larger than the current size, the extra area is filled with black pixels. @@ -1056,7 +1078,7 @@ Crops the image to the given ``width`` and ``height``. If the specified size is .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **decompress** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **decompress**\ (\ ) :ref:`🔗<class_Image_method_decompress>` Decompresses the image if it is VRAM compressed in a supported format. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the format is supported, otherwise :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVAILABLE>`. @@ -1070,7 +1092,7 @@ Decompresses the image if it is VRAM compressed in a supported format. Returns : .. rst-class:: classref-method -:ref:`AlphaMode<enum_Image_AlphaMode>` **detect_alpha** **(** **)** |const| +:ref:`AlphaMode<enum_Image_AlphaMode>` **detect_alpha**\ (\ ) |const| :ref:`🔗<class_Image_method_detect_alpha>` Returns :ref:`ALPHA_BLEND<class_Image_constant_ALPHA_BLEND>` if the image has data for alpha values. Returns :ref:`ALPHA_BIT<class_Image_constant_ALPHA_BIT>` if all the alpha values are stored in a single bit. Returns :ref:`ALPHA_NONE<class_Image_constant_ALPHA_NONE>` if no data for alpha values is found. @@ -1082,11 +1104,9 @@ Returns :ref:`ALPHA_BLEND<class_Image_constant_ALPHA_BLEND>` if the image has da .. rst-class:: classref-method -:ref:`UsedChannels<enum_Image_UsedChannels>` **detect_used_channels** **(** :ref:`CompressSource<enum_Image_CompressSource>` source=0 **)** |const| +:ref:`UsedChannels<enum_Image_UsedChannels>` **detect_used_channels**\ (\ source\: :ref:`CompressSource<enum_Image_CompressSource>` = 0\ ) |const| :ref:`🔗<class_Image_method_detect_used_channels>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the color channels used by this image, as one of the :ref:`UsedChannels<enum_Image_UsedChannels>` constants. If the image is compressed, the original ``source`` must be specified. .. rst-class:: classref-item-separator @@ -1096,7 +1116,7 @@ Returns :ref:`ALPHA_BLEND<class_Image_constant_ALPHA_BLEND>` if the image has da .. rst-class:: classref-method -void **fill** **(** :ref:`Color<class_Color>` color **)** +|void| **fill**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Image_method_fill>` Fills the image with ``color``. @@ -1108,7 +1128,7 @@ Fills the image with ``color``. .. rst-class:: classref-method -void **fill_rect** **(** :ref:`Rect2i<class_Rect2i>` rect, :ref:`Color<class_Color>` color **)** +|void| **fill_rect**\ (\ rect\: :ref:`Rect2i<class_Rect2i>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Image_method_fill_rect>` Fills ``rect`` with ``color``. @@ -1120,7 +1140,7 @@ Fills ``rect`` with ``color``. .. rst-class:: classref-method -void **fix_alpha_edges** **(** **)** +|void| **fix_alpha_edges**\ (\ ) :ref:`🔗<class_Image_method_fix_alpha_edges>` Blends low-alpha pixels with nearby pixels. @@ -1132,7 +1152,7 @@ Blends low-alpha pixels with nearby pixels. .. rst-class:: classref-method -void **flip_x** **(** **)** +|void| **flip_x**\ (\ ) :ref:`🔗<class_Image_method_flip_x>` Flips the image horizontally. @@ -1144,7 +1164,7 @@ Flips the image horizontally. .. rst-class:: classref-method -void **flip_y** **(** **)** +|void| **flip_y**\ (\ ) :ref:`🔗<class_Image_method_flip_y>` Flips the image vertically. @@ -1156,9 +1176,11 @@ Flips the image vertically. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **generate_mipmaps** **(** :ref:`bool<class_bool>` renormalize=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **generate_mipmaps**\ (\ renormalize\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Image_method_generate_mipmaps>` + +Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. Enabling ``renormalize`` when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. -Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. +It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps<class_Image_method_has_mipmaps>` or :ref:`get_mipmap_count<class_Image_method_get_mipmap_count>`. Calling :ref:`generate_mipmaps<class_Image_method_generate_mipmaps>` on an image that already has mipmaps will replace existing mipmaps in the image. .. rst-class:: classref-item-separator @@ -1168,7 +1190,7 @@ Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copi .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_data** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **get_data**\ (\ ) |const| :ref:`🔗<class_Image_method_get_data>` Returns a copy of the image's raw data. @@ -1176,11 +1198,23 @@ Returns a copy of the image's raw data. ---- +.. _class_Image_method_get_data_size: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_data_size**\ (\ ) |const| :ref:`🔗<class_Image_method_get_data_size>` + +Returns size (in bytes) of the image's raw data. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_get_format: .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const| +:ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_Image_method_get_format>` Returns the image's format. See :ref:`Format<enum_Image_Format>` constants. @@ -1192,7 +1226,7 @@ Returns the image's format. See :ref:`Format<enum_Image_Format>` constants. .. rst-class:: classref-method -:ref:`int<class_int>` **get_height** **(** **)** |const| +:ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_Image_method_get_height>` Returns the image's height. @@ -1200,13 +1234,25 @@ Returns the image's height. ---- +.. _class_Image_method_get_mipmap_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_mipmap_count**\ (\ ) |const| :ref:`🔗<class_Image_method_get_mipmap_count>` + +Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_get_mipmap_offset: .. rst-class:: classref-method -:ref:`int<class_int>` **get_mipmap_offset** **(** :ref:`int<class_int>` mipmap **)** |const| +:ref:`int<class_int>` **get_mipmap_offset**\ (\ mipmap\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Image_method_get_mipmap_offset>` -Returns the offset where the image's mipmap with index ``mipmap`` is stored in the ``data`` dictionary. +Returns the offset where the image's mipmap with index ``mipmap`` is stored in the :ref:`data<class_Image_property_data>` dictionary. .. rst-class:: classref-item-separator @@ -1216,7 +1262,7 @@ Returns the offset where the image's mipmap with index ``mipmap`` is stored in t .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_pixel** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |const| +:ref:`Color<class_Color>` **get_pixel**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Image_method_get_pixel>` Returns the color of the pixel at ``(x, y)``. @@ -1230,7 +1276,7 @@ This is the same as :ref:`get_pixelv<class_Image_method_get_pixelv>`, but with t .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_pixelv** **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| +:ref:`Color<class_Color>` **get_pixelv**\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Image_method_get_pixelv>` Returns the color of the pixel at ``point``. @@ -1244,7 +1290,7 @@ This is the same as :ref:`get_pixel<class_Image_method_get_pixel>`, but with a : .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_region** **(** :ref:`Rect2i<class_Rect2i>` region **)** |const| +:ref:`Image<class_Image>` **get_region**\ (\ region\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Image_method_get_region>` Returns a new **Image** that is a copy of this **Image**'s area specified with ``region``. @@ -1256,7 +1302,7 @@ Returns a new **Image** that is a copy of this **Image**'s area specified with ` .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_size** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_size**\ (\ ) |const| :ref:`🔗<class_Image_method_get_size>` Returns the image's size (width and height). @@ -1268,7 +1314,7 @@ Returns the image's size (width and height). .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **get_used_rect** **(** **)** |const| +:ref:`Rect2i<class_Rect2i>` **get_used_rect**\ (\ ) |const| :ref:`🔗<class_Image_method_get_used_rect>` Returns a :ref:`Rect2i<class_Rect2i>` enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. @@ -1280,7 +1326,7 @@ Returns a :ref:`Rect2i<class_Rect2i>` enclosing the visible portion of the image .. rst-class:: classref-method -:ref:`int<class_int>` **get_width** **(** **)** |const| +:ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_Image_method_get_width>` Returns the image's width. @@ -1292,7 +1338,7 @@ Returns the image's width. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_mipmaps** **(** **)** |const| +:ref:`bool<class_bool>` **has_mipmaps**\ (\ ) |const| :ref:`🔗<class_Image_method_has_mipmaps>` Returns ``true`` if the image has generated mipmaps. @@ -1304,7 +1350,7 @@ Returns ``true`` if the image has generated mipmaps. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_compressed** **(** **)** |const| +:ref:`bool<class_bool>` **is_compressed**\ (\ ) |const| :ref:`🔗<class_Image_method_is_compressed>` Returns ``true`` if the image is compressed. @@ -1316,7 +1362,7 @@ Returns ``true`` if the image is compressed. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_Image_method_is_empty>` Returns ``true`` if the image has no data. @@ -1328,7 +1374,7 @@ Returns ``true`` if the image has no data. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_invisible** **(** **)** |const| +:ref:`bool<class_bool>` **is_invisible**\ (\ ) |const| :ref:`🔗<class_Image_method_is_invisible>` Returns ``true`` if all the image's pixels have an alpha value of 0. Returns ``false`` if any pixel has an alpha value higher than 0. @@ -1340,7 +1386,7 @@ Returns ``true`` if all the image's pixels have an alpha value of 0. Returns ``f .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **load**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Image_method_load>` Loads an image from file ``path``. See `Supported image formats <../tutorials/assets_pipeline/importing_images.html#supported-image-formats>`__ for a list of supported image formats and limitations. @@ -1356,12 +1402,14 @@ See also :ref:`ImageTexture<class_ImageTexture>` description for usage examples. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_bmp_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_bmp_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_bmp_from_buffer>` Loads an image from the binary contents of a BMP file. \ **Note:** Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. +\ **Note:** This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the ``module_bmp_enabled=no`` SCons option. + .. rst-class:: classref-item-separator ---- @@ -1370,7 +1418,7 @@ Loads an image from the binary contents of a BMP file. .. rst-class:: classref-method -:ref:`Image<class_Image>` **load_from_file** **(** :ref:`String<class_String>` path **)** |static| +:ref:`Image<class_Image>` **load_from_file**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_Image_method_load_from_file>` Creates a new **Image** and loads data from the specified file. @@ -1382,7 +1430,7 @@ Creates a new **Image** and loads data from the specified file. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_jpg_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_jpg_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_jpg_from_buffer>` Loads an image from the binary contents of a JPEG file. @@ -1390,11 +1438,27 @@ Loads an image from the binary contents of a JPEG file. ---- +.. _class_Image_method_load_ktx_from_buffer: + +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **load_ktx_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_ktx_from_buffer>` + +Loads an image from the binary contents of a `KTX <https://github.com/KhronosGroup/KTX-Software>`__ file. Unlike most image formats, KTX can store VRAM-compressed data and embed mipmaps. + +\ **Note:** Godot's libktx implementation only supports 2D images. Cubemaps, texture arrays, and de-padding are not supported. + +\ **Note:** This method is only available in engine builds with the KTX module enabled. By default, the KTX module is enabled, but it can be disabled at build-time using the ``module_ktx_enabled=no`` SCons option. + +.. rst-class:: classref-item-separator + +---- + .. _class_Image_method_load_png_from_buffer: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_png_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_png_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_png_from_buffer>` Loads an image from the binary contents of a PNG file. @@ -1406,7 +1470,7 @@ Loads an image from the binary contents of a PNG file. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_svg_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`float<class_float>` scale=1.0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_svg_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, scale\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Image_method_load_svg_from_buffer>` Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (**.svg**). @@ -1422,9 +1486,9 @@ Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (* .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_svg_from_string** **(** :ref:`String<class_String>` svg_str, :ref:`float<class_float>` scale=1.0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_svg_from_string**\ (\ svg_str\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Image_method_load_svg_from_string>` -Loads an image from the string contents of a SVG file (**.svg**). +Loads an image from the string contents of an SVG file (**.svg**). \ **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the ``module_svg_enabled=no`` SCons option. @@ -1436,10 +1500,12 @@ Loads an image from the string contents of a SVG file (**.svg**). .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_tga_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_tga_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_tga_from_buffer>` Loads an image from the binary contents of a TGA file. +\ **Note:** This method is only available in engine builds with the TGA module enabled. By default, the TGA module is enabled, but it can be disabled at build-time using the ``module_tga_enabled=no`` SCons option. + .. rst-class:: classref-item-separator ---- @@ -1448,7 +1514,7 @@ Loads an image from the binary contents of a TGA file. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_webp_from_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_webp_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_load_webp_from_buffer>` Loads an image from the binary contents of a WebP file. @@ -1460,7 +1526,7 @@ Loads an image from the binary contents of a WebP file. .. rst-class:: classref-method -void **normal_map_to_xy** **(** **)** +|void| **normal_map_to_xy**\ (\ ) :ref:`🔗<class_Image_method_normal_map_to_xy>` Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count. @@ -1472,9 +1538,9 @@ Converts the image's data to represent coordinates on a 3D plane. This is used w .. rst-class:: classref-method -void **premultiply_alpha** **(** **)** +|void| **premultiply_alpha**\ (\ ) :ref:`🔗<class_Image_method_premultiply_alpha>` -Multiplies color values with alpha values. Resulting color values for a pixel are ``(color * alpha)/256``. +Multiplies color values with alpha values. Resulting color values for a pixel are ``(color * alpha)/256``. See also :ref:`CanvasItemMaterial.blend_mode<class_CanvasItemMaterial_property_blend_mode>`. .. rst-class:: classref-item-separator @@ -1484,7 +1550,7 @@ Multiplies color values with alpha values. Resulting color values for a pixel ar .. rst-class:: classref-method -void **resize** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** +|void| **resize**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, interpolation\: :ref:`Interpolation<enum_Image_Interpolation>` = 1\ ) :ref:`🔗<class_Image_method_resize>` Resizes the image to the given ``width`` and ``height``. New pixels are calculated using the ``interpolation`` mode defined via :ref:`Interpolation<enum_Image_Interpolation>` constants. @@ -1496,7 +1562,7 @@ Resizes the image to the given ``width`` and ``height``. New pixels are calculat .. rst-class:: classref-method -void **resize_to_po2** **(** :ref:`bool<class_bool>` square=false, :ref:`Interpolation<enum_Image_Interpolation>` interpolation=1 **)** +|void| **resize_to_po2**\ (\ square\: :ref:`bool<class_bool>` = false, interpolation\: :ref:`Interpolation<enum_Image_Interpolation>` = 1\ ) :ref:`🔗<class_Image_method_resize_to_po2>` Resizes the image to the nearest power of 2 for the width and height. If ``square`` is ``true`` then set width and height to be the same. New pixels are calculated using the ``interpolation`` mode defined via :ref:`Interpolation<enum_Image_Interpolation>` constants. @@ -1508,7 +1574,7 @@ Resizes the image to the nearest power of 2 for the width and height. If ``squar .. rst-class:: classref-method -:ref:`Image<class_Image>` **rgbe_to_srgb** **(** **)** +:ref:`Image<class_Image>` **rgbe_to_srgb**\ (\ ) :ref:`🔗<class_Image_method_rgbe_to_srgb>` Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. @@ -1520,7 +1586,7 @@ Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. .. rst-class:: classref-method -void **rotate_90** **(** :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>` direction **)** +|void| **rotate_90**\ (\ direction\: :ref:`ClockDirection<enum_@GlobalScope_ClockDirection>`\ ) :ref:`🔗<class_Image_method_rotate_90>` Rotates the image in the specified ``direction`` by ``90`` degrees. The width and height of the image must be greater than ``1``. If the width and height are not equal, the image will be resized. @@ -1532,7 +1598,7 @@ Rotates the image in the specified ``direction`` by ``90`` degrees. The width an .. rst-class:: classref-method -void **rotate_180** **(** **)** +|void| **rotate_180**\ (\ ) :ref:`🔗<class_Image_method_rotate_180>` Rotates the image by ``180`` degrees. The width and height of the image must be greater than ``1``. @@ -1544,7 +1610,7 @@ Rotates the image by ``180`` degrees. The width and height of the image must be .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_exr** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` grayscale=false **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **save_exr**\ (\ path\: :ref:`String<class_String>`, grayscale\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Image_method_save_exr>` Saves the image as an EXR file to ``path``. If ``grayscale`` is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVAILABLE>` if Godot was compiled without the TinyEXR module. @@ -1558,7 +1624,7 @@ Saves the image as an EXR file to ``path``. If ``grayscale`` is ``true`` and the .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **save_exr_to_buffer** **(** :ref:`bool<class_bool>` grayscale=false **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **save_exr_to_buffer**\ (\ grayscale\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Image_method_save_exr_to_buffer>` Saves the image as an EXR file to a byte array. If ``grayscale`` is ``true`` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. @@ -1572,7 +1638,7 @@ Saves the image as an EXR file to a byte array. If ``grayscale`` is ``true`` and .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_jpg** **(** :ref:`String<class_String>` path, :ref:`float<class_float>` quality=0.75 **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **save_jpg**\ (\ path\: :ref:`String<class_String>`, quality\: :ref:`float<class_float>` = 0.75\ ) |const| :ref:`🔗<class_Image_method_save_jpg>` Saves the image as a JPEG file to ``path`` with the specified ``quality`` between ``0.01`` and ``1.0`` (inclusive). Higher ``quality`` values result in better-looking output at the cost of larger file sizes. Recommended ``quality`` values are between ``0.75`` and ``0.90``. Even at quality ``1.00``, JPEG compression remains lossy. @@ -1586,7 +1652,7 @@ Saves the image as a JPEG file to ``path`` with the specified ``quality`` betwee .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **save_jpg_to_buffer** **(** :ref:`float<class_float>` quality=0.75 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **save_jpg_to_buffer**\ (\ quality\: :ref:`float<class_float>` = 0.75\ ) |const| :ref:`🔗<class_Image_method_save_jpg_to_buffer>` Saves the image as a JPEG file to a byte array with the specified ``quality`` between ``0.01`` and ``1.0`` (inclusive). Higher ``quality`` values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended ``quality`` values are between ``0.75`` and ``0.90``. Even at quality ``1.00``, JPEG compression remains lossy. @@ -1600,7 +1666,7 @@ Saves the image as a JPEG file to a byte array with the specified ``quality`` be .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_png** **(** :ref:`String<class_String>` path **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **save_png**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Image_method_save_png>` Saves the image as a PNG file to the file at ``path``. @@ -1612,7 +1678,7 @@ Saves the image as a PNG file to the file at ``path``. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **save_png_to_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **save_png_to_buffer**\ (\ ) |const| :ref:`🔗<class_Image_method_save_png_to_buffer>` Saves the image as a PNG file to a byte array. @@ -1624,9 +1690,11 @@ Saves the image as a PNG file to a byte array. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_webp** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **save_webp**\ (\ path\: :ref:`String<class_String>`, lossy\: :ref:`bool<class_bool>` = false, quality\: :ref:`float<class_float>` = 0.75\ ) |const| :ref:`🔗<class_Image_method_save_webp>` + +Saves the image as a WebP (Web Picture) file to the file at ``path``. By default it will save lossless. If ``lossy`` is true, the image will be saved lossy, using the ``quality`` setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. -Saves the image as a WebP (Web Picture) file to the file at ``path``. By default it will save lossless. If ``lossy`` is true, the image will be saved lossy, using the ``quality`` setting between 0.0 and 1.0 (inclusive). +\ **Note:** The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. .. rst-class:: classref-item-separator @@ -1636,9 +1704,11 @@ Saves the image as a WebP (Web Picture) file to the file at ``path``. By default .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **save_webp_to_buffer** **(** :ref:`bool<class_bool>` lossy=false, :ref:`float<class_float>` quality=0.75 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **save_webp_to_buffer**\ (\ lossy\: :ref:`bool<class_bool>` = false, quality\: :ref:`float<class_float>` = 0.75\ ) |const| :ref:`🔗<class_Image_method_save_webp_to_buffer>` + +Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If ``lossy`` is true, the image will be saved lossy, using the ``quality`` setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. -Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If ``lossy`` is true, the image will be saved lossy, using the ``quality`` setting between 0.0 and 1.0 (inclusive). +\ **Note:** The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. .. rst-class:: classref-item-separator @@ -1648,7 +1718,7 @@ Saves the image as a WebP (Web Picture) file to a byte array. By default it will .. rst-class:: classref-method -void **set_data** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` use_mipmaps, :ref:`Format<enum_Image_Format>` format, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +|void| **set_data**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, format\: :ref:`Format<enum_Image_Format>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Image_method_set_data>` Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_from_data<class_Image_method_create_from_data>`. @@ -1660,7 +1730,7 @@ Overwrites data of an existing **Image**. Non-static equivalent of :ref:`create_ .. rst-class:: classref-method -void **set_pixel** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`Color<class_Color>` color **)** +|void| **set_pixel**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Image_method_set_pixel>` Sets the :ref:`Color<class_Color>` of the pixel at ``(x, y)`` to ``color``. @@ -1697,7 +1767,7 @@ This is the same as :ref:`set_pixelv<class_Image_method_set_pixelv>`, but with a .. rst-class:: classref-method -void **set_pixelv** **(** :ref:`Vector2i<class_Vector2i>` point, :ref:`Color<class_Color>` color **)** +|void| **set_pixelv**\ (\ point\: :ref:`Vector2i<class_Vector2i>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Image_method_set_pixelv>` Sets the :ref:`Color<class_Color>` of the pixel at ``point`` to ``color``. @@ -1734,9 +1804,9 @@ This is the same as :ref:`set_pixel<class_Image_method_set_pixel>`, but with a : .. rst-class:: classref-method -void **shrink_x2** **(** **)** +|void| **shrink_x2**\ (\ ) :ref:`🔗<class_Image_method_shrink_x2>` -Shrinks the image by a factor of 2. +Shrinks the image by a factor of 2 on each axis (this divides the pixel count by 4). .. rst-class:: classref-item-separator @@ -1746,7 +1816,7 @@ Shrinks the image by a factor of 2. .. rst-class:: classref-method -void **srgb_to_linear** **(** **)** +|void| **srgb_to_linear**\ (\ ) :ref:`🔗<class_Image_method_srgb_to_linear>` Converts the raw data from the sRGB colorspace to a linear scale. @@ -1757,3 +1827,4 @@ Converts the raw data from the sRGB colorspace to a linear scale. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_imageformatloader.rst b/classes/class_imageformatloader.rst index 19a9142f9c6..52b11cf891b 100644 --- a/classes/class_imageformatloader.rst +++ b/classes/class_imageformatloader.rst @@ -36,7 +36,7 @@ Enumerations .. rst-class:: classref-enumeration -flags **LoaderFlags**: +flags **LoaderFlags**: :ref:`🔗<enum_ImageFormatLoader_LoaderFlags>` .. _class_ImageFormatLoader_constant_FLAG_NONE: @@ -44,6 +44,10 @@ flags **LoaderFlags**: :ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>` **FLAG_NONE** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ImageFormatLoader_constant_FLAG_FORCE_LINEAR: @@ -52,6 +56,10 @@ flags **LoaderFlags**: :ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>` **FLAG_FORCE_LINEAR** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ImageFormatLoader_constant_FLAG_CONVERT_COLORS: @@ -60,6 +68,10 @@ flags **LoaderFlags**: :ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>` **FLAG_CONVERT_COLORS** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` @@ -69,3 +81,4 @@ flags **LoaderFlags**: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_imageformatloaderextension.rst b/classes/class_imageformatloaderextension.rst index f56d522fb89..79e32a34b75 100644 --- a/classes/class_imageformatloaderextension.rst +++ b/classes/class_imageformatloaderextension.rst @@ -31,15 +31,15 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ImageFormatLoaderExtension_method__get_recognized_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_load_image<class_ImageFormatLoaderExtension_method__load_image>` **(** :ref:`Image<class_Image>` image, :ref:`FileAccess<class_FileAccess>` fileaccess, |bitfield|\<:ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>`\> flags, :ref:`float<class_float>` scale **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_format_loader<class_ImageFormatLoaderExtension_method_add_format_loader>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_format_loader<class_ImageFormatLoaderExtension_method_remove_format_loader>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ImageFormatLoaderExtension_private_method__get_recognized_extensions>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_load_image<class_ImageFormatLoaderExtension_private_method__load_image>`\ (\ image\: :ref:`Image<class_Image>`, fileaccess\: :ref:`FileAccess<class_FileAccess>`, flags\: |bitfield|\[:ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>`\], scale\: :ref:`float<class_float>`\ ) |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_format_loader<class_ImageFormatLoaderExtension_method_add_format_loader>`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_format_loader<class_ImageFormatLoaderExtension_method_remove_format_loader>`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,11 +50,11 @@ Methods Method Descriptions ------------------- -.. _class_ImageFormatLoaderExtension_method__get_recognized_extensions: +.. _class_ImageFormatLoaderExtension_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_ImageFormatLoaderExtension_private_method__get_recognized_extensions>` Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class. @@ -62,11 +62,11 @@ Returns the list of file extensions for this image format. Files with the given ---- -.. _class_ImageFormatLoaderExtension_method__load_image: +.. _class_ImageFormatLoaderExtension_private_method__load_image: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_load_image** **(** :ref:`Image<class_Image>` image, :ref:`FileAccess<class_FileAccess>` fileaccess, |bitfield|\<:ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>`\> flags, :ref:`float<class_float>` scale **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_load_image**\ (\ image\: :ref:`Image<class_Image>`, fileaccess\: :ref:`FileAccess<class_FileAccess>`, flags\: |bitfield|\[:ref:`LoaderFlags<enum_ImageFormatLoader_LoaderFlags>`\], scale\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_ImageFormatLoaderExtension_private_method__load_image>` Loads the content of ``fileaccess`` into the provided ``image``. @@ -78,9 +78,9 @@ Loads the content of ``fileaccess`` into the provided ``image``. .. rst-class:: classref-method -void **add_format_loader** **(** **)** +|void| **add_format_loader**\ (\ ) :ref:`🔗<class_ImageFormatLoaderExtension_method_add_format_loader>` -Add this format loader to the engine, allowing it to recognize the file extensions returned by :ref:`_get_recognized_extensions<class_ImageFormatLoaderExtension_method__get_recognized_extensions>`. +Add this format loader to the engine, allowing it to recognize the file extensions returned by :ref:`_get_recognized_extensions<class_ImageFormatLoaderExtension_private_method__get_recognized_extensions>`. .. rst-class:: classref-item-separator @@ -90,7 +90,7 @@ Add this format loader to the engine, allowing it to recognize the file extensio .. rst-class:: classref-method -void **remove_format_loader** **(** **)** +|void| **remove_format_loader**\ (\ ) :ref:`🔗<class_ImageFormatLoaderExtension_method_remove_format_loader>` Remove this format loader from the engine. @@ -101,3 +101,4 @@ Remove this format loader from the engine. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_imagetexture.rst b/classes/class_imagetexture.rst index ba21eb26aaa..753245ec503 100644 --- a/classes/class_imagetexture.rst +++ b/classes/class_imagetexture.rst @@ -76,17 +76,17 @@ Methods .. table:: :widths: auto - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ImageTexture<class_ImageTexture>` | :ref:`create_from_image<class_ImageTexture_method_create_from_image>` **(** :ref:`Image<class_Image>` image **)** |static| | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_ImageTexture_method_get_format>` **(** **)** |const| | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_image<class_ImageTexture_method_set_image>` **(** :ref:`Image<class_Image>` image **)** | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_size_override<class_ImageTexture_method_set_size_override>` **(** :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update<class_ImageTexture_method_update>` **(** :ref:`Image<class_Image>` image **)** | - +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ImageTexture<class_ImageTexture>` | :ref:`create_from_image<class_ImageTexture_method_create_from_image>`\ (\ image\: :ref:`Image<class_Image>`\ ) |static| | + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_ImageTexture_method_get_format>`\ (\ ) |const| | + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_image<class_ImageTexture_method_set_image>`\ (\ image\: :ref:`Image<class_Image>`\ ) | + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_size_override<class_ImageTexture_method_set_size_override>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update<class_ImageTexture_method_update>`\ (\ image\: :ref:`Image<class_Image>`\ ) | + +-----------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -101,7 +101,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`ImageTexture<class_ImageTexture>` **create_from_image** **(** :ref:`Image<class_Image>` image **)** |static| +:ref:`ImageTexture<class_ImageTexture>` **create_from_image**\ (\ image\: :ref:`Image<class_Image>`\ ) |static| :ref:`🔗<class_ImageTexture_method_create_from_image>` Creates a new **ImageTexture** and initializes it by allocating and setting the data from an :ref:`Image<class_Image>`. @@ -113,7 +113,7 @@ Creates a new **ImageTexture** and initializes it by allocating and setting the .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const| +:ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_ImageTexture_method_get_format>` Returns the format of the texture, one of :ref:`Format<enum_Image_Format>`. @@ -125,7 +125,7 @@ Returns the format of the texture, one of :ref:`Format<enum_Image_Format>`. .. rst-class:: classref-method -void **set_image** **(** :ref:`Image<class_Image>` image **)** +|void| **set_image**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_ImageTexture_method_set_image>` Replaces the texture's data with a new :ref:`Image<class_Image>`. This will re-allocate new memory for the texture. @@ -139,7 +139,7 @@ If you want to update the image, but don't need to change its parameters (format .. rst-class:: classref-method -void **set_size_override** **(** :ref:`Vector2i<class_Vector2i>` size **)** +|void| **set_size_override**\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_ImageTexture_method_set_size_override>` Resizes the texture to the specified dimensions. @@ -151,7 +151,7 @@ Resizes the texture to the specified dimensions. .. rst-class:: classref-method -void **update** **(** :ref:`Image<class_Image>` image **)** +|void| **update**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_ImageTexture_method_update>` Replaces the texture's data with a new :ref:`Image<class_Image>`. @@ -166,3 +166,4 @@ Use this method over :ref:`set_image<class_ImageTexture_method_set_image>` if yo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_imagetexture3d.rst b/classes/class_imagetexture3d.rst index 9a7f9873c05..8079cb052e5 100644 --- a/classes/class_imagetexture3d.rst +++ b/classes/class_imagetexture3d.rst @@ -31,11 +31,11 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create<class_ImageTexture3D_method_create>` **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` use_mipmaps, :ref:`Image[]<class_Image>` data **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update<class_ImageTexture3D_method_update>` **(** :ref:`Image[]<class_Image>` data **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create<class_ImageTexture3D_method_create>`\ (\ format\: :ref:`Format<enum_Image_Format>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update<class_ImageTexture3D_method_update>`\ (\ data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create** **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` use_mipmaps, :ref:`Image[]<class_Image>` data **)** +:ref:`Error<enum_@GlobalScope_Error>` **create**\ (\ format\: :ref:`Format<enum_Image_Format>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, use_mipmaps\: :ref:`bool<class_bool>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) :ref:`🔗<class_ImageTexture3D_method_create>` Creates the **ImageTexture3D** with specified ``width``, ``height``, and ``depth``. See :ref:`Format<enum_Image_Format>` for ``format`` options. If ``use_mipmaps`` is ``true``, then generate mipmaps for the **ImageTexture3D**. @@ -62,7 +62,7 @@ Creates the **ImageTexture3D** with specified ``width``, ``height``, and ``depth .. rst-class:: classref-method -void **update** **(** :ref:`Image[]<class_Image>` data **)** +|void| **update**\ (\ data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) :ref:`🔗<class_ImageTexture3D_method_update>` Replaces the texture's existing data with the layers specified in ``data``. The size of ``data`` must match the parameters that were used for :ref:`create<class_ImageTexture3D_method_create>`. In other words, the texture cannot be resized or have its format changed by calling :ref:`update<class_ImageTexture3D_method_update>`. @@ -73,3 +73,4 @@ Replaces the texture's existing data with the layers specified in ``data``. The .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_imagetexturelayered.rst b/classes/class_imagetexturelayered.rst index 7de2a95def2..18674b2b103 100644 --- a/classes/class_imagetexturelayered.rst +++ b/classes/class_imagetexturelayered.rst @@ -31,11 +31,11 @@ Methods .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_images<class_ImageTextureLayered_method_create_from_images>` **(** :ref:`Image[]<class_Image>` images **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_layer<class_ImageTextureLayered_method_update_layer>` **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_images<class_ImageTextureLayered_method_create_from_images>`\ (\ images\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_layer<class_ImageTextureLayered_method_update_layer>`\ (\ image\: :ref:`Image<class_Image>`, layer\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_from_images** **(** :ref:`Image[]<class_Image>` images **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_from_images**\ (\ images\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) :ref:`🔗<class_ImageTextureLayered_method_create_from_images>` Creates an **ImageTextureLayered** from an array of :ref:`Image<class_Image>`\ s. See :ref:`Image.create<class_Image_method_create>` for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images *must* have the same width, height, image format and mipmapping setting. @@ -64,11 +64,11 @@ Each :ref:`Image<class_Image>` represents one ``layer``. .. rst-class:: classref-method -void **update_layer** **(** :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** +|void| **update_layer**\ (\ image\: :ref:`Image<class_Image>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ImageTextureLayered_method_update_layer>` Replaces the existing :ref:`Image<class_Image>` data at the given ``layer`` with this new image. -The given :ref:`Image<class_Image>` must have the same width, height, image format and mipmapping setting (a ``bool`` value) as the rest of the referenced images. +The given :ref:`Image<class_Image>` must have the same width, height, image format, and mipmapping flag as the rest of the referenced images. If the image format is unsupported, it will be decompressed and converted to a similar and supported :ref:`Format<enum_Image_Format>`. @@ -81,3 +81,4 @@ The update is immediate: it's synchronized with drawing. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_immediatemesh.rst b/classes/class_immediatemesh.rst index 2ab241c87dc..0f9221a7030 100644 --- a/classes/class_immediatemesh.rst +++ b/classes/class_immediatemesh.rst @@ -35,6 +35,15 @@ Here's a sample on how to generate a triangular face: mesh.surface_add_vertex(Vector3.ZERO) mesh.surface_end() + .. code-tab:: csharp + + var mesh = new ImmediateMesh(); + mesh.SurfaceBegin(Mesh.PrimitiveType.Triangles); + mesh.SurfaceAddVertex(Vector3.Left); + mesh.SurfaceAddVertex(Vector3.Forward); + mesh.SurfaceAddVertex(Vector3.Zero); + mesh.SurfaceEnd(); + \ **Note:** Generating complex geometries with **ImmediateMesh** is highly inefficient. Instead, it is designed to generate simple geometry that changes often. @@ -54,27 +63,27 @@ Methods .. table:: :widths: auto - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_surfaces<class_ImmediateMesh_method_clear_surfaces>` **(** **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_add_vertex<class_ImmediateMesh_method_surface_add_vertex>` **(** :ref:`Vector3<class_Vector3>` vertex **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_add_vertex_2d<class_ImmediateMesh_method_surface_add_vertex_2d>` **(** :ref:`Vector2<class_Vector2>` vertex **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_begin<class_ImmediateMesh_method_surface_begin>` **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Material<class_Material>` material=null **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_end<class_ImmediateMesh_method_surface_end>` **(** **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_color<class_ImmediateMesh_method_surface_set_color>` **(** :ref:`Color<class_Color>` color **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_normal<class_ImmediateMesh_method_surface_set_normal>` **(** :ref:`Vector3<class_Vector3>` normal **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_tangent<class_ImmediateMesh_method_surface_set_tangent>` **(** :ref:`Plane<class_Plane>` tangent **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_uv<class_ImmediateMesh_method_surface_set_uv>` **(** :ref:`Vector2<class_Vector2>` uv **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_uv2<class_ImmediateMesh_method_surface_set_uv2>` **(** :ref:`Vector2<class_Vector2>` uv2 **)** | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_surfaces<class_ImmediateMesh_method_clear_surfaces>`\ (\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_add_vertex<class_ImmediateMesh_method_surface_add_vertex>`\ (\ vertex\: :ref:`Vector3<class_Vector3>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_add_vertex_2d<class_ImmediateMesh_method_surface_add_vertex_2d>`\ (\ vertex\: :ref:`Vector2<class_Vector2>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_begin<class_ImmediateMesh_method_surface_begin>`\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`, material\: :ref:`Material<class_Material>` = null\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_end<class_ImmediateMesh_method_surface_end>`\ (\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_color<class_ImmediateMesh_method_surface_set_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_normal<class_ImmediateMesh_method_surface_set_normal>`\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_tangent<class_ImmediateMesh_method_surface_set_tangent>`\ (\ tangent\: :ref:`Plane<class_Plane>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_uv<class_ImmediateMesh_method_surface_set_uv>`\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_uv2<class_ImmediateMesh_method_surface_set_uv2>`\ (\ uv2\: :ref:`Vector2<class_Vector2>`\ ) | + +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -89,7 +98,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_surfaces** **(** **)** +|void| **clear_surfaces**\ (\ ) :ref:`🔗<class_ImmediateMesh_method_clear_surfaces>` Clear all surfaces. @@ -101,7 +110,7 @@ Clear all surfaces. .. rst-class:: classref-method -void **surface_add_vertex** **(** :ref:`Vector3<class_Vector3>` vertex **)** +|void| **surface_add_vertex**\ (\ vertex\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_add_vertex>` Add a 3D vertex using the current attributes previously set. @@ -113,7 +122,7 @@ Add a 3D vertex using the current attributes previously set. .. rst-class:: classref-method -void **surface_add_vertex_2d** **(** :ref:`Vector2<class_Vector2>` vertex **)** +|void| **surface_add_vertex_2d**\ (\ vertex\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_add_vertex_2d>` Add a 2D vertex using the current attributes previously set. @@ -125,7 +134,7 @@ Add a 2D vertex using the current attributes previously set. .. rst-class:: classref-method -void **surface_begin** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Material<class_Material>` material=null **)** +|void| **surface_begin**\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`, material\: :ref:`Material<class_Material>` = null\ ) :ref:`🔗<class_ImmediateMesh_method_surface_begin>` Begin a new surface. @@ -137,7 +146,7 @@ Begin a new surface. .. rst-class:: classref-method -void **surface_end** **(** **)** +|void| **surface_end**\ (\ ) :ref:`🔗<class_ImmediateMesh_method_surface_end>` End and commit current surface. Note that surface being created will not be visible until this function is called. @@ -149,7 +158,7 @@ End and commit current surface. Note that surface being created will not be visi .. rst-class:: classref-method -void **surface_set_color** **(** :ref:`Color<class_Color>` color **)** +|void| **surface_set_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_set_color>` Set the color attribute that will be pushed with the next vertex. @@ -161,7 +170,7 @@ Set the color attribute that will be pushed with the next vertex. .. rst-class:: classref-method -void **surface_set_normal** **(** :ref:`Vector3<class_Vector3>` normal **)** +|void| **surface_set_normal**\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_set_normal>` Set the normal attribute that will be pushed with the next vertex. @@ -173,7 +182,7 @@ Set the normal attribute that will be pushed with the next vertex. .. rst-class:: classref-method -void **surface_set_tangent** **(** :ref:`Plane<class_Plane>` tangent **)** +|void| **surface_set_tangent**\ (\ tangent\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_set_tangent>` Set the tangent attribute that will be pushed with the next vertex. @@ -185,7 +194,7 @@ Set the tangent attribute that will be pushed with the next vertex. .. rst-class:: classref-method -void **surface_set_uv** **(** :ref:`Vector2<class_Vector2>` uv **)** +|void| **surface_set_uv**\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_set_uv>` Set the UV attribute that will be pushed with the next vertex. @@ -197,7 +206,7 @@ Set the UV attribute that will be pushed with the next vertex. .. rst-class:: classref-method -void **surface_set_uv2** **(** :ref:`Vector2<class_Vector2>` uv2 **)** +|void| **surface_set_uv2**\ (\ uv2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_ImmediateMesh_method_surface_set_uv2>` Set the UV2 attribute that will be pushed with the next vertex. @@ -208,3 +217,4 @@ Set the UV2 attribute that will be pushed with the next vertex. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index 637190c926a..45246548813 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -43,53 +43,53 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_blend_shape<class_ImporterMesh_method_add_blend_shape>` **(** :ref:`String<class_String>` name **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_surface<class_ImporterMesh_method_add_surface>` **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Array<class_Array>` arrays, :ref:`Array[]<class_Array>` blend_shapes=[], :ref:`Dictionary<class_Dictionary>` lods={}, :ref:`Material<class_Material>` material=null, :ref:`String<class_String>` name="", :ref:`int<class_int>` flags=0 **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_ImporterMesh_method_clear>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate_lods<class_ImporterMesh_method_generate_lods>` **(** :ref:`float<class_float>` normal_merge_angle, :ref:`float<class_float>` normal_split_angle, :ref:`Array<class_Array>` bone_transform_array **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_blend_shape_count<class_ImporterMesh_method_get_blend_shape_count>` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` | :ref:`get_blend_shape_mode<class_ImporterMesh_method_get_blend_shape_mode>` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_blend_shape_name<class_ImporterMesh_method_get_blend_shape_name>` **(** :ref:`int<class_int>` blend_shape_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_lightmap_size_hint<class_ImporterMesh_method_get_lightmap_size_hint>` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_mesh<class_ImporterMesh_method_get_mesh>` **(** :ref:`ArrayMesh<class_ArrayMesh>` base_mesh=null **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_surface_arrays<class_ImporterMesh_method_get_surface_arrays>` **(** :ref:`int<class_int>` surface_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_surface_blend_shape_arrays<class_ImporterMesh_method_get_surface_blend_shape_arrays>` **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` blend_shape_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_surface_count<class_ImporterMesh_method_get_surface_count>` **(** **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_surface_format<class_ImporterMesh_method_get_surface_format>` **(** :ref:`int<class_int>` surface_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_surface_lod_count<class_ImporterMesh_method_get_surface_lod_count>` **(** :ref:`int<class_int>` surface_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_surface_lod_indices<class_ImporterMesh_method_get_surface_lod_indices>` **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` lod_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_surface_lod_size<class_ImporterMesh_method_get_surface_lod_size>` **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` lod_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`get_surface_material<class_ImporterMesh_method_get_surface_material>` **(** :ref:`int<class_int>` surface_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_surface_name<class_ImporterMesh_method_get_surface_name>` **(** :ref:`int<class_int>` surface_idx **)** |const| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` | :ref:`get_surface_primitive_type<class_ImporterMesh_method_get_surface_primitive_type>` **(** :ref:`int<class_int>` surface_idx **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_shape_mode<class_ImporterMesh_method_set_blend_shape_mode>` **(** :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` mode **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_lightmap_size_hint<class_ImporterMesh_method_set_lightmap_size_hint>` **(** :ref:`Vector2i<class_Vector2i>` size **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_surface_material<class_ImporterMesh_method_set_surface_material>` **(** :ref:`int<class_int>` surface_idx, :ref:`Material<class_Material>` material **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_surface_name<class_ImporterMesh_method_set_surface_name>` **(** :ref:`int<class_int>` surface_idx, :ref:`String<class_String>` name **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_blend_shape<class_ImporterMesh_method_add_blend_shape>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_surface<class_ImporterMesh_method_add_surface>`\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`, arrays\: :ref:`Array<class_Array>`, blend_shapes\: :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] = [], lods\: :ref:`Dictionary<class_Dictionary>` = {}, material\: :ref:`Material<class_Material>` = null, name\: :ref:`String<class_String>` = "", flags\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_ImporterMesh_method_clear>`\ (\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generate_lods<class_ImporterMesh_method_generate_lods>`\ (\ normal_merge_angle\: :ref:`float<class_float>`, normal_split_angle\: :ref:`float<class_float>`, bone_transform_array\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_blend_shape_count<class_ImporterMesh_method_get_blend_shape_count>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` | :ref:`get_blend_shape_mode<class_ImporterMesh_method_get_blend_shape_mode>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_blend_shape_name<class_ImporterMesh_method_get_blend_shape_name>`\ (\ blend_shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_lightmap_size_hint<class_ImporterMesh_method_get_lightmap_size_hint>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_mesh<class_ImporterMesh_method_get_mesh>`\ (\ base_mesh\: :ref:`ArrayMesh<class_ArrayMesh>` = null\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_surface_arrays<class_ImporterMesh_method_get_surface_arrays>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_surface_blend_shape_arrays<class_ImporterMesh_method_get_surface_blend_shape_arrays>`\ (\ surface_idx\: :ref:`int<class_int>`, blend_shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_surface_count<class_ImporterMesh_method_get_surface_count>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_surface_format<class_ImporterMesh_method_get_surface_format>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_surface_lod_count<class_ImporterMesh_method_get_surface_lod_count>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_surface_lod_indices<class_ImporterMesh_method_get_surface_lod_indices>`\ (\ surface_idx\: :ref:`int<class_int>`, lod_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_surface_lod_size<class_ImporterMesh_method_get_surface_lod_size>`\ (\ surface_idx\: :ref:`int<class_int>`, lod_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`get_surface_material<class_ImporterMesh_method_get_surface_material>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_surface_name<class_ImporterMesh_method_get_surface_name>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` | :ref:`get_surface_primitive_type<class_ImporterMesh_method_get_surface_primitive_type>`\ (\ surface_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_shape_mode<class_ImporterMesh_method_set_blend_shape_mode>`\ (\ mode\: :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_lightmap_size_hint<class_ImporterMesh_method_set_lightmap_size_hint>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_surface_material<class_ImporterMesh_method_set_surface_material>`\ (\ surface_idx\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_surface_name<class_ImporterMesh_method_set_surface_name>`\ (\ surface_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -104,7 +104,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **_data** = ``{ "surfaces": [] }`` +:ref:`Dictionary<class_Dictionary>` **_data** = ``{ "surfaces": [] }`` :ref:`🔗<class_ImporterMesh_property__data>` .. container:: contribute @@ -123,7 +123,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_blend_shape** **(** :ref:`String<class_String>` name **)** +|void| **add_blend_shape**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ImporterMesh_method_add_blend_shape>` Adds name for a blend shape that will be added with :ref:`add_surface<class_ImporterMesh_method_add_surface>`. Must be called before surface is added. @@ -135,7 +135,7 @@ Adds name for a blend shape that will be added with :ref:`add_surface<class_Impo .. rst-class:: classref-method -void **add_surface** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive, :ref:`Array<class_Array>` arrays, :ref:`Array[]<class_Array>` blend_shapes=[], :ref:`Dictionary<class_Dictionary>` lods={}, :ref:`Material<class_Material>` material=null, :ref:`String<class_String>` name="", :ref:`int<class_int>` flags=0 **)** +|void| **add_surface**\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`, arrays\: :ref:`Array<class_Array>`, blend_shapes\: :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] = [], lods\: :ref:`Dictionary<class_Dictionary>` = {}, material\: :ref:`Material<class_Material>` = null, name\: :ref:`String<class_String>` = "", flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ImporterMesh_method_add_surface>` Creates a new surface. :ref:`Mesh.get_surface_count<class_Mesh_method_get_surface_count>` will become the ``surf_idx`` for this new surface. @@ -145,7 +145,7 @@ The ``arrays`` argument is an array of arrays. Each of the :ref:`Mesh.ARRAY_MAX< The ``blend_shapes`` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as ``arrays``, but :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>`, :ref:`Mesh.ARRAY_NORMAL<class_Mesh_constant_ARRAY_NORMAL>`, and :ref:`Mesh.ARRAY_TANGENT<class_Mesh_constant_ARRAY_TANGENT>` are set if and only if they are set in ``arrays`` and all other entries are ``null``. -The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents a LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of a LOD also increases the distance that the objects has to be from the camera before the LOD is used. +The ``lods`` argument is a dictionary with :ref:`float<class_float>` keys and :ref:`PackedInt32Array<class_PackedInt32Array>` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE<class_Mesh_constant_ARRAY_FLAG_USE_DYNAMIC_UPDATE>`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS<class_Mesh_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS>`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY<class_Mesh_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY>`. @@ -159,7 +159,7 @@ The ``flags`` argument is the bitwise or of, as required: One value of :ref:`Arr .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_ImporterMesh_method_clear>` Removes all surfaces and blend shapes from this **ImporterMesh**. @@ -171,7 +171,7 @@ Removes all surfaces and blend shapes from this **ImporterMesh**. .. rst-class:: classref-method -void **generate_lods** **(** :ref:`float<class_float>` normal_merge_angle, :ref:`float<class_float>` normal_split_angle, :ref:`Array<class_Array>` bone_transform_array **)** +|void| **generate_lods**\ (\ normal_merge_angle\: :ref:`float<class_float>`, normal_split_angle\: :ref:`float<class_float>`, bone_transform_array\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_ImporterMesh_method_generate_lods>` Generates all lods for this ImporterMesh. @@ -189,7 +189,7 @@ The number of generated lods can be accessed using :ref:`get_surface_lod_count<c .. rst-class:: classref-method -:ref:`int<class_int>` **get_blend_shape_count** **(** **)** |const| +:ref:`int<class_int>` **get_blend_shape_count**\ (\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_blend_shape_count>` Returns the number of blend shapes that the mesh holds. @@ -201,7 +201,7 @@ Returns the number of blend shapes that the mesh holds. .. rst-class:: classref-method -:ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` **get_blend_shape_mode** **(** **)** |const| +:ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` **get_blend_shape_mode**\ (\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_blend_shape_mode>` Returns the blend shape mode for this Mesh. @@ -213,7 +213,7 @@ Returns the blend shape mode for this Mesh. .. rst-class:: classref-method -:ref:`String<class_String>` **get_blend_shape_name** **(** :ref:`int<class_int>` blend_shape_idx **)** |const| +:ref:`String<class_String>` **get_blend_shape_name**\ (\ blend_shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_blend_shape_name>` Returns the name of the blend shape at this index. @@ -225,7 +225,7 @@ Returns the name of the blend shape at this index. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_lightmap_size_hint** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_lightmap_size_hint**\ (\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_lightmap_size_hint>` Returns the size hint of this mesh for lightmap-unwrapping in UV-space. @@ -237,7 +237,7 @@ Returns the size hint of this mesh for lightmap-unwrapping in UV-space. .. rst-class:: classref-method -:ref:`ArrayMesh<class_ArrayMesh>` **get_mesh** **(** :ref:`ArrayMesh<class_ArrayMesh>` base_mesh=null **)** +:ref:`ArrayMesh<class_ArrayMesh>` **get_mesh**\ (\ base_mesh\: :ref:`ArrayMesh<class_ArrayMesh>` = null\ ) :ref:`🔗<class_ImporterMesh_method_get_mesh>` Returns the mesh data represented by this **ImporterMesh** as a usable :ref:`ArrayMesh<class_ArrayMesh>`. @@ -253,9 +253,9 @@ If not yet cached and ``base_mesh`` is provided, ``base_mesh`` will be used and .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_surface_arrays** **(** :ref:`int<class_int>` surface_idx **)** |const| +:ref:`Array<class_Array>` **get_surface_arrays**\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_arrays>` -Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See :ref:`add_surface<class_ImporterMesh_method_add_surface>`. +Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See :ref:`add_surface<class_ImporterMesh_method_add_surface>`. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Returns the arrays for the vertices, normals, uvs, etc. that make up the request .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_surface_blend_shape_arrays** **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` blend_shape_idx **)** |const| +:ref:`Array<class_Array>` **get_surface_blend_shape_arrays**\ (\ surface_idx\: :ref:`int<class_int>`, blend_shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_blend_shape_arrays>` Returns a single set of blend shape arrays for the requested blend shape index for a surface. @@ -277,7 +277,7 @@ Returns a single set of blend shape arrays for the requested blend shape index f .. rst-class:: classref-method -:ref:`int<class_int>` **get_surface_count** **(** **)** |const| +:ref:`int<class_int>` **get_surface_count**\ (\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_count>` Returns the number of surfaces that the mesh holds. @@ -289,7 +289,7 @@ Returns the number of surfaces that the mesh holds. .. rst-class:: classref-method -:ref:`int<class_int>` **get_surface_format** **(** :ref:`int<class_int>` surface_idx **)** |const| +:ref:`int<class_int>` **get_surface_format**\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_format>` Returns the format of the surface that the mesh holds. @@ -301,7 +301,7 @@ Returns the format of the surface that the mesh holds. .. rst-class:: classref-method -:ref:`int<class_int>` **get_surface_lod_count** **(** :ref:`int<class_int>` surface_idx **)** |const| +:ref:`int<class_int>` **get_surface_lod_count**\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_lod_count>` Returns the number of lods that the mesh holds on a given surface. @@ -313,7 +313,7 @@ Returns the number of lods that the mesh holds on a given surface. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_surface_lod_indices** **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` lod_idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_surface_lod_indices**\ (\ surface_idx\: :ref:`int<class_int>`, lod_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_lod_indices>` Returns the index buffer of a lod for a surface. @@ -325,7 +325,7 @@ Returns the index buffer of a lod for a surface. .. rst-class:: classref-method -:ref:`float<class_float>` **get_surface_lod_size** **(** :ref:`int<class_int>` surface_idx, :ref:`int<class_int>` lod_idx **)** |const| +:ref:`float<class_float>` **get_surface_lod_size**\ (\ surface_idx\: :ref:`int<class_int>`, lod_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_lod_size>` Returns the screen ratio which activates a lod for a surface. @@ -337,7 +337,7 @@ Returns the screen ratio which activates a lod for a surface. .. rst-class:: classref-method -:ref:`Material<class_Material>` **get_surface_material** **(** :ref:`int<class_int>` surface_idx **)** |const| +:ref:`Material<class_Material>` **get_surface_material**\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_material>` Returns a :ref:`Material<class_Material>` in a given surface. Surface is rendered using this material. @@ -349,7 +349,7 @@ Returns a :ref:`Material<class_Material>` in a given surface. Surface is rendere .. rst-class:: classref-method -:ref:`String<class_String>` **get_surface_name** **(** :ref:`int<class_int>` surface_idx **)** |const| +:ref:`String<class_String>` **get_surface_name**\ (\ surface_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ImporterMesh_method_get_surface_name>` Gets the name assigned to this surface. @@ -361,7 +361,7 @@ Gets the name assigned to this surface. .. rst-class:: classref-method -:ref:`PrimitiveType<enum_Mesh_PrimitiveType>` **get_surface_primitive_type** **(** :ref:`int<class_int>` surface_idx **)** +:ref:`PrimitiveType<enum_Mesh_PrimitiveType>` **get_surface_primitive_type**\ (\ surface_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ImporterMesh_method_get_surface_primitive_type>` Returns the primitive type of the requested surface (see :ref:`add_surface<class_ImporterMesh_method_add_surface>`). @@ -373,7 +373,7 @@ Returns the primitive type of the requested surface (see :ref:`add_surface<class .. rst-class:: classref-method -void **set_blend_shape_mode** **(** :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>` mode **)** +|void| **set_blend_shape_mode**\ (\ mode\: :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>`\ ) :ref:`🔗<class_ImporterMesh_method_set_blend_shape_mode>` Sets the blend shape mode to one of :ref:`BlendShapeMode<enum_Mesh_BlendShapeMode>`. @@ -385,7 +385,7 @@ Sets the blend shape mode to one of :ref:`BlendShapeMode<enum_Mesh_BlendShapeMod .. rst-class:: classref-method -void **set_lightmap_size_hint** **(** :ref:`Vector2i<class_Vector2i>` size **)** +|void| **set_lightmap_size_hint**\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_ImporterMesh_method_set_lightmap_size_hint>` Sets the size hint of this mesh for lightmap-unwrapping in UV-space. @@ -397,7 +397,7 @@ Sets the size hint of this mesh for lightmap-unwrapping in UV-space. .. rst-class:: classref-method -void **set_surface_material** **(** :ref:`int<class_int>` surface_idx, :ref:`Material<class_Material>` material **)** +|void| **set_surface_material**\ (\ surface_idx\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) :ref:`🔗<class_ImporterMesh_method_set_surface_material>` Sets a :ref:`Material<class_Material>` for a given surface. Surface will be rendered using this material. @@ -409,7 +409,7 @@ Sets a :ref:`Material<class_Material>` for a given surface. Surface will be rend .. rst-class:: classref-method -void **set_surface_name** **(** :ref:`int<class_int>` surface_idx, :ref:`String<class_String>` name **)** +|void| **set_surface_name**\ (\ surface_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ImporterMesh_method_set_surface_name>` Sets a name for a given surface. @@ -420,3 +420,4 @@ Sets a name for a given surface. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_importermeshinstance3d.rst b/classes/class_importermeshinstance3d.rst index 805b639bf69..82ba3c9b15f 100644 --- a/classes/class_importermeshinstance3d.rst +++ b/classes/class_importermeshinstance3d.rst @@ -24,13 +24,27 @@ Properties .. table:: :widths: auto - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`ImporterMesh<class_ImporterMesh>` | :ref:`mesh<class_ImporterMeshInstance3D_property_mesh>` | | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`skeleton_path<class_ImporterMeshInstance3D_property_skeleton_path>` | ``NodePath("")`` | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`Skin<class_Skin>` | :ref:`skin<class_ImporterMeshInstance3D_property_skin>` | | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` | :ref:`cast_shadow<class_ImporterMeshInstance3D_property_cast_shadow>` | ``1`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int<class_int>` | :ref:`layer_mask<class_ImporterMeshInstance3D_property_layer_mask>` | ``1`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`ImporterMesh<class_ImporterMesh>` | :ref:`mesh<class_ImporterMeshInstance3D_property_mesh>` | | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`skeleton_path<class_ImporterMeshInstance3D_property_skeleton_path>` | ``NodePath("")`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`Skin<class_Skin>` | :ref:`skin<class_ImporterMeshInstance3D_property_skin>` | | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float<class_float>` | :ref:`visibility_range_begin<class_ImporterMeshInstance3D_property_visibility_range_begin>` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float<class_float>` | :ref:`visibility_range_begin_margin<class_ImporterMeshInstance3D_property_visibility_range_begin_margin>` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float<class_float>` | :ref:`visibility_range_end<class_ImporterMeshInstance3D_property_visibility_range_end>` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float<class_float>` | :ref:`visibility_range_end_margin<class_ImporterMeshInstance3D_property_visibility_range_end_margin>` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` | :ref:`visibility_range_fade_mode<class_ImporterMeshInstance3D_property_visibility_range_fade_mode>` | ``0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ .. rst-class:: classref-section-separator @@ -41,16 +55,54 @@ Properties Property Descriptions --------------------- +.. _class_ImporterMeshInstance3D_property_cast_shadow: + +.. rst-class:: classref-property + +:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **cast_shadow** = ``1`` :ref:`🔗<class_ImporterMeshInstance3D_property_cast_shadow>` + +.. rst-class:: classref-property-setget + +- |void| **set_cast_shadows_setting**\ (\ value\: :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>`\ ) +- :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **get_cast_shadows_setting**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_layer_mask: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **layer_mask** = ``1`` :ref:`🔗<class_ImporterMeshInstance3D_property_layer_mask>` + +.. rst-class:: classref-property-setget + +- |void| **set_layer_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_layer_mask**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + .. _class_ImporterMeshInstance3D_property_mesh: .. rst-class:: classref-property -:ref:`ImporterMesh<class_ImporterMesh>` **mesh** +:ref:`ImporterMesh<class_ImporterMesh>` **mesh** :ref:`🔗<class_ImporterMeshInstance3D_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`ImporterMesh<class_ImporterMesh>` value **)** -- :ref:`ImporterMesh<class_ImporterMesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`ImporterMesh<class_ImporterMesh>`\ ) +- :ref:`ImporterMesh<class_ImporterMesh>` **get_mesh**\ (\ ) .. container:: contribute @@ -64,12 +116,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **skeleton_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **skeleton_path** = ``NodePath("")`` :ref:`🔗<class_ImporterMeshInstance3D_property_skeleton_path>` .. rst-class:: classref-property-setget -- void **set_skeleton_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_skeleton_path** **(** **)** +- |void| **set_skeleton_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_skeleton_path**\ (\ ) .. container:: contribute @@ -83,12 +135,107 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Skin<class_Skin>` **skin** +:ref:`Skin<class_Skin>` **skin** :ref:`🔗<class_ImporterMeshInstance3D_property_skin>` + +.. rst-class:: classref-property-setget + +- |void| **set_skin**\ (\ value\: :ref:`Skin<class_Skin>`\ ) +- :ref:`Skin<class_Skin>` **get_skin**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_begin: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **visibility_range_begin** = ``0.0`` :ref:`🔗<class_ImporterMeshInstance3D_property_visibility_range_begin>` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_range_begin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_begin**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_begin_margin: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **visibility_range_begin_margin** = ``0.0`` :ref:`🔗<class_ImporterMeshInstance3D_property_visibility_range_begin_margin>` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_range_begin_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_begin_margin**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_end: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **visibility_range_end** = ``0.0`` :ref:`🔗<class_ImporterMeshInstance3D_property_visibility_range_end>` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_range_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_end**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_end_margin: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **visibility_range_end_margin** = ``0.0`` :ref:`🔗<class_ImporterMeshInstance3D_property_visibility_range_end_margin>` + +.. rst-class:: classref-property-setget + +- |void| **set_visibility_range_end_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visibility_range_end_margin**\ (\ ) + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_fade_mode: + +.. rst-class:: classref-property + +:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **visibility_range_fade_mode** = ``0`` :ref:`🔗<class_ImporterMeshInstance3D_property_visibility_range_fade_mode>` .. rst-class:: classref-property-setget -- void **set_skin** **(** :ref:`Skin<class_Skin>` value **)** -- :ref:`Skin<class_Skin>` **get_skin** **(** **)** +- |void| **set_visibility_range_fade_mode**\ (\ value\: :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>`\ ) +- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **get_visibility_range_fade_mode**\ (\ ) .. container:: contribute @@ -101,3 +248,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_input.rst b/classes/class_input.rst index 53d522058f6..bae03e0b96f 100644 --- a/classes/class_input.rst +++ b/classes/class_input.rst @@ -30,9 +30,9 @@ Tutorials - :doc:`Inputs documentation index <../tutorials/inputs/index>` -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -42,11 +42,15 @@ Properties .. table:: :widths: auto - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`MouseMode<enum_Input_MouseMode>` | :ref:`mouse_mode<class_Input_property_mouse_mode>` | - +----------------------------------------+--------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_accumulated_input<class_Input_property_use_accumulated_input>` | - +----------------------------------------+--------------------------------------------------------------------------+ + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`emulate_mouse_from_touch<class_Input_property_emulate_mouse_from_touch>` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`emulate_touch_from_mouse<class_Input_property_emulate_touch_from_mouse>` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`MouseMode<enum_Input_MouseMode>` | :ref:`mouse_mode<class_Input_property_mouse_mode>` | + +----------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_accumulated_input<class_Input_property_use_accumulated_input>` | + +----------------------------------------+--------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -56,95 +60,99 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_press<class_Input_method_action_press>` **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` strength=1.0 **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_release<class_Input_method_action_release>` **(** :ref:`StringName<class_StringName>` action **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_joy_mapping<class_Input_method_add_joy_mapping>` **(** :ref:`String<class_String>` mapping, :ref:`bool<class_bool>` update_existing=false **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`flush_buffered_events<class_Input_method_flush_buffered_events>` **(** **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_accelerometer<class_Input_method_get_accelerometer>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_action_raw_strength<class_Input_method_get_action_raw_strength>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_action_strength<class_Input_method_get_action_strength>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_axis<class_Input_method_get_axis>` **(** :ref:`StringName<class_StringName>` negative_action, :ref:`StringName<class_StringName>` positive_action **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int[]<class_int>` | :ref:`get_connected_joypads<class_Input_method_get_connected_joypads>` **(** **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CursorShape<enum_Input_CursorShape>` | :ref:`get_current_cursor_shape<class_Input_method_get_current_cursor_shape>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_gravity<class_Input_method_get_gravity>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_gyroscope<class_Input_method_get_gyroscope>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_joy_axis<class_Input_method_get_joy_axis>` **(** :ref:`int<class_int>` device, :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_joy_guid<class_Input_method_get_joy_guid>` **(** :ref:`int<class_int>` device **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_joy_name<class_Input_method_get_joy_name>` **(** :ref:`int<class_int>` device **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_joy_vibration_duration<class_Input_method_get_joy_vibration_duration>` **(** :ref:`int<class_int>` device **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_joy_vibration_strength<class_Input_method_get_joy_vibration_strength>` **(** :ref:`int<class_int>` device **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_last_mouse_velocity<class_Input_method_get_last_mouse_velocity>` **(** **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_magnetometer<class_Input_method_get_magnetometer>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> | :ref:`get_mouse_button_mask<class_Input_method_get_mouse_button_mask>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_vector<class_Input_method_get_vector>` **(** :ref:`StringName<class_StringName>` negative_x, :ref:`StringName<class_StringName>` positive_x, :ref:`StringName<class_StringName>` negative_y, :ref:`StringName<class_StringName>` positive_y, :ref:`float<class_float>` deadzone=-1.0 **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_just_pressed<class_Input_method_is_action_just_pressed>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_just_released<class_Input_method_is_action_just_released>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_Input_method_is_action_pressed>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_anything_pressed<class_Input_method_is_anything_pressed>` **(** **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_joy_button_pressed<class_Input_method_is_joy_button_pressed>` **(** :ref:`int<class_int>` device, :ref:`JoyButton<enum_@GlobalScope_JoyButton>` button **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_joy_known<class_Input_method_is_joy_known>` **(** :ref:`int<class_int>` device **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_key_label_pressed<class_Input_method_is_key_label_pressed>` **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_key_pressed<class_Input_method_is_key_pressed>` **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_mouse_button_pressed<class_Input_method_is_mouse_button_pressed>` **(** :ref:`MouseButton<enum_@GlobalScope_MouseButton>` button **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_physical_key_pressed<class_Input_method_is_physical_key_pressed>` **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_input_event<class_Input_method_parse_input_event>` **(** :ref:`InputEvent<class_InputEvent>` event **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_joy_mapping<class_Input_method_remove_joy_mapping>` **(** :ref:`String<class_String>` guid **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_accelerometer<class_Input_method_set_accelerometer>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_mouse_cursor<class_Input_method_set_custom_mouse_cursor>` **(** :ref:`Resource<class_Resource>` image, :ref:`CursorShape<enum_Input_CursorShape>` shape=0, :ref:`Vector2<class_Vector2>` hotspot=Vector2(0, 0) **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_cursor_shape<class_Input_method_set_default_cursor_shape>` **(** :ref:`CursorShape<enum_Input_CursorShape>` shape=0 **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gravity<class_Input_method_set_gravity>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gyroscope<class_Input_method_set_gyroscope>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_magnetometer<class_Input_method_set_magnetometer>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`should_ignore_device<class_Input_method_should_ignore_device>` **(** :ref:`int<class_int>` vendor_id, :ref:`int<class_int>` product_id **)** |const| | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start_joy_vibration<class_Input_method_start_joy_vibration>` **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=0 **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_joy_vibration<class_Input_method_stop_joy_vibration>` **(** :ref:`int<class_int>` device **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`vibrate_handheld<class_Input_method_vibrate_handheld>` **(** :ref:`int<class_int>` duration_ms=500 **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`warp_mouse<class_Input_method_warp_mouse>` **(** :ref:`Vector2<class_Vector2>` position **)** | - +-------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_press<class_Input_method_action_press>`\ (\ action\: :ref:`StringName<class_StringName>`, strength\: :ref:`float<class_float>` = 1.0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_release<class_Input_method_action_release>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_joy_mapping<class_Input_method_add_joy_mapping>`\ (\ mapping\: :ref:`String<class_String>`, update_existing\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`flush_buffered_events<class_Input_method_flush_buffered_events>`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_accelerometer<class_Input_method_get_accelerometer>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_action_raw_strength<class_Input_method_get_action_raw_strength>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_action_strength<class_Input_method_get_action_strength>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_axis<class_Input_method_get_axis>`\ (\ negative_action\: :ref:`StringName<class_StringName>`, positive_action\: :ref:`StringName<class_StringName>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] | :ref:`get_connected_joypads<class_Input_method_get_connected_joypads>`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CursorShape<enum_Input_CursorShape>` | :ref:`get_current_cursor_shape<class_Input_method_get_current_cursor_shape>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_gravity<class_Input_method_get_gravity>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_gyroscope<class_Input_method_get_gyroscope>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_joy_axis<class_Input_method_get_joy_axis>`\ (\ device\: :ref:`int<class_int>`, axis\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_joy_guid<class_Input_method_get_joy_guid>`\ (\ device\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_joy_info<class_Input_method_get_joy_info>`\ (\ device\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_joy_name<class_Input_method_get_joy_name>`\ (\ device\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_joy_vibration_duration<class_Input_method_get_joy_vibration_duration>`\ (\ device\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_joy_vibration_strength<class_Input_method_get_joy_vibration_strength>`\ (\ device\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_last_mouse_screen_velocity<class_Input_method_get_last_mouse_screen_velocity>`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_last_mouse_velocity<class_Input_method_get_last_mouse_velocity>`\ (\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_magnetometer<class_Input_method_get_magnetometer>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] | :ref:`get_mouse_button_mask<class_Input_method_get_mouse_button_mask>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_vector<class_Input_method_get_vector>`\ (\ negative_x\: :ref:`StringName<class_StringName>`, positive_x\: :ref:`StringName<class_StringName>`, negative_y\: :ref:`StringName<class_StringName>`, positive_y\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = -1.0\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_just_pressed<class_Input_method_is_action_just_pressed>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_just_released<class_Input_method_is_action_just_released>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_Input_method_is_action_pressed>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_anything_pressed<class_Input_method_is_anything_pressed>`\ (\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_joy_button_pressed<class_Input_method_is_joy_button_pressed>`\ (\ device\: :ref:`int<class_int>`, button\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_joy_known<class_Input_method_is_joy_known>`\ (\ device\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_key_label_pressed<class_Input_method_is_key_label_pressed>`\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_key_pressed<class_Input_method_is_key_pressed>`\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_mouse_button_pressed<class_Input_method_is_mouse_button_pressed>`\ (\ button\: :ref:`MouseButton<enum_@GlobalScope_MouseButton>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_physical_key_pressed<class_Input_method_is_physical_key_pressed>`\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`parse_input_event<class_Input_method_parse_input_event>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_joy_mapping<class_Input_method_remove_joy_mapping>`\ (\ guid\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_accelerometer<class_Input_method_set_accelerometer>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_mouse_cursor<class_Input_method_set_custom_mouse_cursor>`\ (\ image\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_cursor_shape<class_Input_method_set_default_cursor_shape>`\ (\ shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gravity<class_Input_method_set_gravity>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gyroscope<class_Input_method_set_gyroscope>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_magnetometer<class_Input_method_set_magnetometer>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`should_ignore_device<class_Input_method_should_ignore_device>`\ (\ vendor_id\: :ref:`int<class_int>`, product_id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_joy_vibration<class_Input_method_start_joy_vibration>`\ (\ device\: :ref:`int<class_int>`, weak_magnitude\: :ref:`float<class_float>`, strong_magnitude\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>` = 0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_joy_vibration<class_Input_method_stop_joy_vibration>`\ (\ device\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`vibrate_handheld<class_Input_method_vibrate_handheld>`\ (\ duration_ms\: :ref:`int<class_int>` = 500, amplitude\: :ref:`float<class_float>` = -1.0\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`warp_mouse<class_Input_method_warp_mouse>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -159,7 +167,7 @@ Signals .. rst-class:: classref-signal -**joy_connection_changed** **(** :ref:`int<class_int>` device, :ref:`bool<class_bool>` connected **)** +**joy_connection_changed**\ (\ device\: :ref:`int<class_int>`, connected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Input_signal_joy_connection_changed>` Emitted when a joypad device has been connected or disconnected. @@ -176,7 +184,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MouseMode**: +enum **MouseMode**: :ref:`🔗<enum_Input_MouseMode>` .. _class_Input_constant_MOUSE_MODE_VISIBLE: @@ -228,7 +236,7 @@ Confines the mouse cursor to the game window, and make it hidden. .. rst-class:: classref-enumeration -enum **CursorShape**: +enum **CursorShape**: :ref:`🔗<enum_Input_CursorShape>` .. _class_Input_constant_CURSOR_ARROW: @@ -268,7 +276,7 @@ Cross cursor. Typically appears over regions in which a drawing operation can be :ref:`CursorShape<enum_Input_CursorShape>` **CURSOR_WAIT** = ``4`` -Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). +Wait cursor. Indicates that the application is busy performing an operation, and that it cannot be used during the operation (e.g. something is blocking its main thread). .. _class_Input_constant_CURSOR_BUSY: @@ -276,7 +284,7 @@ Wait cursor. Indicates that the application is busy performing an operation. Thi :ref:`CursorShape<enum_Input_CursorShape>` **CURSOR_BUSY** = ``5`` -Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. +Busy cursor. Indicates that the application is busy performing an operation, and that it is still usable during the operation. .. _class_Input_constant_CURSOR_DRAG: @@ -377,16 +385,50 @@ Help cursor. Usually a question mark. Property Descriptions --------------------- +.. _class_Input_property_emulate_mouse_from_touch: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **emulate_mouse_from_touch** :ref:`🔗<class_Input_property_emulate_mouse_from_touch>` + +.. rst-class:: classref-property-setget + +- |void| **set_emulate_mouse_from_touch**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_emulating_mouse_from_touch**\ (\ ) + +If ``true``, sends mouse input events when tapping or swiping on the touchscreen. See also :ref:`ProjectSettings.input_devices/pointing/emulate_mouse_from_touch<class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Input_property_emulate_touch_from_mouse: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **emulate_touch_from_mouse** :ref:`🔗<class_Input_property_emulate_touch_from_mouse>` + +.. rst-class:: classref-property-setget + +- |void| **set_emulate_touch_from_mouse**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_emulating_touch_from_mouse**\ (\ ) + +If ``true``, sends touch input events when clicking or dragging the mouse. See also :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Input_property_mouse_mode: .. rst-class:: classref-property -:ref:`MouseMode<enum_Input_MouseMode>` **mouse_mode** +:ref:`MouseMode<enum_Input_MouseMode>` **mouse_mode** :ref:`🔗<class_Input_property_mouse_mode>` .. rst-class:: classref-property-setget -- void **set_mouse_mode** **(** :ref:`MouseMode<enum_Input_MouseMode>` value **)** -- :ref:`MouseMode<enum_Input_MouseMode>` **get_mouse_mode** **(** **)** +- |void| **set_mouse_mode**\ (\ value\: :ref:`MouseMode<enum_Input_MouseMode>`\ ) +- :ref:`MouseMode<enum_Input_MouseMode>` **get_mouse_mode**\ (\ ) Controls the mouse mode. See :ref:`MouseMode<enum_Input_MouseMode>` for more information. @@ -398,12 +440,12 @@ Controls the mouse mode. See :ref:`MouseMode<enum_Input_MouseMode>` for more inf .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_accumulated_input** +:ref:`bool<class_bool>` **use_accumulated_input** :ref:`🔗<class_Input_property_use_accumulated_input>` .. rst-class:: classref-property-setget -- void **set_use_accumulated_input** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_accumulated_input** **(** **)** +- |void| **set_use_accumulated_input**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_accumulated_input**\ (\ ) If ``true``, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. @@ -424,13 +466,13 @@ Method Descriptions .. rst-class:: classref-method -void **action_press** **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` strength=1.0 **)** +|void| **action_press**\ (\ action\: :ref:`StringName<class_StringName>`, strength\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_Input_method_action_press>` This will simulate pressing the specified action. The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. -\ **Note:** This method will not cause any :ref:`Node._input<class_Node_method__input>` calls. It is intended to be used with :ref:`is_action_pressed<class_Input_method_is_action_pressed>` and :ref:`is_action_just_pressed<class_Input_method_is_action_just_pressed>`. If you want to simulate ``_input``, use :ref:`parse_input_event<class_Input_method_parse_input_event>` instead. +\ **Note:** This method will not cause any :ref:`Node._input<class_Node_private_method__input>` calls. It is intended to be used with :ref:`is_action_pressed<class_Input_method_is_action_pressed>` and :ref:`is_action_just_pressed<class_Input_method_is_action_just_pressed>`. If you want to simulate ``_input``, use :ref:`parse_input_event<class_Input_method_parse_input_event>` instead. .. rst-class:: classref-item-separator @@ -440,7 +482,7 @@ The strength can be used for non-boolean actions, it's ranged between 0 and 1 re .. rst-class:: classref-method -void **action_release** **(** :ref:`StringName<class_StringName>` action **)** +|void| **action_release**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Input_method_action_release>` If the specified action is already pressed, this will release it. @@ -452,7 +494,7 @@ If the specified action is already pressed, this will release it. .. rst-class:: classref-method -void **add_joy_mapping** **(** :ref:`String<class_String>` mapping, :ref:`bool<class_bool>` update_existing=false **)** +|void| **add_joy_mapping**\ (\ mapping\: :ref:`String<class_String>`, update_existing\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Input_method_add_joy_mapping>` Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. @@ -464,7 +506,7 @@ Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally up .. rst-class:: classref-method -void **flush_buffered_events** **(** **)** +|void| **flush_buffered_events**\ (\ ) :ref:`🔗<class_Input_method_flush_buffered_events>` Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input (:ref:`use_accumulated_input<class_Input_property_use_accumulated_input>`) or agile input flushing (:ref:`ProjectSettings.input_devices/buffering/agile_event_flushing<class_ProjectSettings_property_input_devices/buffering/agile_event_flushing>`). @@ -478,13 +520,13 @@ The engine will already do this itself at key execution points (at least once pe .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_accelerometer** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_accelerometer**\ (\ ) |const| :ref:`🔗<class_Input_method_get_accelerometer>` Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. Note this method returns an empty :ref:`Vector3<class_Vector3>` when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. -\ **Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. +\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. .. rst-class:: classref-item-separator @@ -494,7 +536,7 @@ Note this method returns an empty :ref:`Vector3<class_Vector3>` when running fro .. rst-class:: classref-method -:ref:`float<class_float>` **get_action_raw_strength** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`float<class_float>` **get_action_raw_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_get_action_raw_strength>` Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use :ref:`get_action_strength<class_Input_method_get_action_strength>` instead. @@ -508,9 +550,9 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`float<class_float>` **get_action_strength** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`float<class_float>` **get_action_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_get_action_strength>` -Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. +Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey<class_InputEventKey>` and :ref:`InputEventMouseButton<class_InputEventMouseButton>` events, and the direction for :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>` events. @@ -522,7 +564,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`float<class_float>` **get_axis** **(** :ref:`StringName<class_StringName>` negative_action, :ref:`StringName<class_StringName>` positive_action **)** |const| +:ref:`float<class_float>` **get_axis**\ (\ negative_action\: :ref:`StringName<class_StringName>`, positive_action\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Input_method_get_axis>` Get axis input by specifying two actions, one negative and one positive. @@ -536,7 +578,7 @@ This is a shorthand for writing ``Input.get_action_strength("positive_action") - .. rst-class:: classref-method -:ref:`int[]<class_int>` **get_connected_joypads** **(** **)** +:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_connected_joypads**\ (\ ) :ref:`🔗<class_Input_method_get_connected_joypads>` Returns an :ref:`Array<class_Array>` containing the device IDs of all currently connected joypads. @@ -548,7 +590,7 @@ Returns an :ref:`Array<class_Array>` containing the device IDs of all currently .. rst-class:: classref-method -:ref:`CursorShape<enum_Input_CursorShape>` **get_current_cursor_shape** **(** **)** |const| +:ref:`CursorShape<enum_Input_CursorShape>` **get_current_cursor_shape**\ (\ ) |const| :ref:`🔗<class_Input_method_get_current_cursor_shape>` Returns the currently assigned cursor shape (see :ref:`CursorShape<enum_Input_CursorShape>`). @@ -560,7 +602,7 @@ Returns the currently assigned cursor shape (see :ref:`CursorShape<enum_Input_Cu .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_gravity** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_gravity**\ (\ ) |const| :ref:`🔗<class_Input_method_get_gravity>` Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. @@ -574,7 +616,7 @@ Returns the gravity in m/s² of the device's accelerometer sensor, if the device .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_gyroscope** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_gyroscope**\ (\ ) |const| :ref:`🔗<class_Input_method_get_gyroscope>` Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. @@ -588,7 +630,7 @@ Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyr .. rst-class:: classref-method -:ref:`float<class_float>` **get_joy_axis** **(** :ref:`int<class_int>` device, :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis **)** |const| +:ref:`float<class_float>` **get_joy_axis**\ (\ device\: :ref:`int<class_int>`, axis\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_axis>` Returns the current value of the joypad axis at given index (see :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`). @@ -600,9 +642,35 @@ Returns the current value of the joypad axis at given index (see :ref:`JoyAxis<e .. rst-class:: classref-method -:ref:`String<class_String>` **get_joy_guid** **(** :ref:`int<class_int>` device **)** |const| +:ref:`String<class_String>` **get_joy_guid**\ (\ device\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_guid>` -Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names and mappings based on this GUID. +Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. ``030000004c050000c405000000010000``. Returns ``"Default Gamepad"`` otherwise. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names and mappings based on this GUID. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Input_method_get_joy_info: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **get_joy_info**\ (\ device\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_get_joy_info>` + +Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. + +On Windows the dictionary contains the following fields: + +\ ``xinput_index``: The index of the controller in the XInput system. + +On Linux: + +\ ``raw_name``: The name of the controller as it came from the OS, before getting renamed by the godot controller database. + +\ ``vendor_id``: The USB vendor ID of the device. + +\ ``product_id``: The USB product ID of the device. + +\ ``steam_input_index``: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. .. rst-class:: classref-item-separator @@ -612,7 +680,7 @@ Returns a SDL2-compatible device GUID on platforms that use gamepad remapping, e .. rst-class:: classref-method -:ref:`String<class_String>` **get_joy_name** **(** :ref:`int<class_int>` device **)** +:ref:`String<class_String>` **get_joy_name**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_name>` Returns the name of the joypad at the specified device index, e.g. ``PS4 Controller``. Godot uses the `SDL2 game controller database <https://github.com/gabomdq/SDL_GameControllerDB>`__ to determine gamepad names. @@ -624,7 +692,7 @@ Returns the name of the joypad at the specified device index, e.g. ``PS4 Control .. rst-class:: classref-method -:ref:`float<class_float>` **get_joy_vibration_duration** **(** :ref:`int<class_int>` device **)** +:ref:`float<class_float>` **get_joy_vibration_duration**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_vibration_duration>` Returns the duration of the current vibration effect in seconds. @@ -636,7 +704,7 @@ Returns the duration of the current vibration effect in seconds. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_joy_vibration_strength** **(** :ref:`int<class_int>` device **)** +:ref:`Vector2<class_Vector2>` **get_joy_vibration_strength**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_get_joy_vibration_strength>` Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. @@ -644,11 +712,23 @@ Returns the strength of the joypad vibration: x is the strength of the weak moto ---- +.. _class_Input_method_get_last_mouse_screen_velocity: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **get_last_mouse_screen_velocity**\ (\ ) :ref:`🔗<class_Input_method_get_last_mouse_screen_velocity>` + +Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. + +.. rst-class:: classref-item-separator + +---- + .. _class_Input_method_get_last_mouse_velocity: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_last_mouse_velocity** **(** **)** +:ref:`Vector2<class_Vector2>` **get_last_mouse_velocity**\ (\ ) :ref:`🔗<class_Input_method_get_last_mouse_velocity>` Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. @@ -660,11 +740,11 @@ Returns the last mouse velocity. To provide a precise and jitter-free velocity, .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_magnetometer** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_magnetometer**\ (\ ) |const| :ref:`🔗<class_Input_method_get_magnetometer>` Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. -\ **Note:** This method only works on Android, iOS and UWP. On other platforms, it always returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. +\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`. .. rst-class:: classref-item-separator @@ -674,7 +754,7 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's .. rst-class:: classref-method -|bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> **get_mouse_button_mask** **(** **)** |const| +|bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **get_mouse_button_mask**\ (\ ) |const| :ref:`🔗<class_Input_method_get_mouse_button_mask>` Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`DisplayServer.mouse_get_button_state<class_DisplayServer_method_mouse_get_button_state>`. @@ -686,7 +766,7 @@ Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_vector** **(** :ref:`StringName<class_StringName>` negative_x, :ref:`StringName<class_StringName>` positive_x, :ref:`StringName<class_StringName>` negative_y, :ref:`StringName<class_StringName>` positive_y, :ref:`float<class_float>` deadzone=-1.0 **)** |const| +:ref:`Vector2<class_Vector2>` **get_vector**\ (\ negative_x\: :ref:`StringName<class_StringName>`, positive_x\: :ref:`StringName<class_StringName>`, negative_y\: :ref:`StringName<class_StringName>`, positive_y\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = -1.0\ ) |const| :ref:`🔗<class_Input_method_get_vector>` Gets an input vector by specifying four actions for the positive and negative X and Y axes. @@ -702,7 +782,7 @@ By default, the deadzone is automatically calculated from the average of the act .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_just_pressed** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action_just_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_just_pressed>` Returns ``true`` when the user has *started* pressing the action event in the current frame or physics tick. It will only return ``true`` on the frame or tick that the user pressed down the button. @@ -714,6 +794,8 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: \ **Note:** Due to keyboard ghosting, :ref:`is_action_just_pressed<class_Input_method_is_action_just_pressed>` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **Note:** During input handling (e.g. :ref:`Node._input<class_Node_private_method__input>`), use :ref:`InputEvent.is_action_pressed<class_InputEvent_method_is_action_pressed>` instead to query the action state of the current event. + .. rst-class:: classref-item-separator ---- @@ -722,7 +804,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_just_released** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action_just_released**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_just_released>` Returns ``true`` when the user *stops* pressing the action event in the current frame or physics tick. It will only return ``true`` on the frame or tick that the user releases the button. @@ -730,6 +812,8 @@ Returns ``true`` when the user *stops* pressing the action event in the current If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey<class_InputEventKey>` and :ref:`InputEventMouseButton<class_InputEventMouseButton>` events, and the direction for :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>` events. +\ **Note:** During input handling (e.g. :ref:`Node._input<class_Node_private_method__input>`), use :ref:`InputEvent.is_action_released<class_InputEvent_method_is_action_released>` instead to query the action state of the current event. + .. rst-class:: classref-item-separator ---- @@ -738,9 +822,9 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_pressed** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Input_method_is_action_pressed>` -Returns ``true`` if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. +Returns ``true`` if you are pressing the action event. If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey<class_InputEventKey>` and :ref:`InputEventMouseButton<class_InputEventMouseButton>` events, and the direction for :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>` events. @@ -754,7 +838,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_anything_pressed** **(** **)** |const| +:ref:`bool<class_bool>` **is_anything_pressed**\ (\ ) |const| :ref:`🔗<class_Input_method_is_anything_pressed>` Returns ``true`` if any action, key, joypad button, or mouse button is being pressed. This will also return ``true`` if any action is simulated via code by calling :ref:`action_press<class_Input_method_action_press>`. @@ -766,7 +850,7 @@ Returns ``true`` if any action, key, joypad button, or mouse button is being pre .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_joy_button_pressed** **(** :ref:`int<class_int>` device, :ref:`JoyButton<enum_@GlobalScope_JoyButton>` button **)** |const| +:ref:`bool<class_bool>` **is_joy_button_pressed**\ (\ device\: :ref:`int<class_int>`, button\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ ) |const| :ref:`🔗<class_Input_method_is_joy_button_pressed>` Returns ``true`` if you are pressing the joypad button (see :ref:`JoyButton<enum_@GlobalScope_JoyButton>`). @@ -778,7 +862,7 @@ Returns ``true`` if you are pressing the joypad button (see :ref:`JoyButton<enum .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_joy_known** **(** :ref:`int<class_int>` device **)** +:ref:`bool<class_bool>` **is_joy_known**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_is_joy_known>` Returns ``true`` if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. @@ -790,7 +874,7 @@ Returns ``true`` if the system knows the specified device. This means that it se .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_key_label_pressed** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| +:ref:`bool<class_bool>` **is_key_label_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_key_label_pressed>` Returns ``true`` if you are pressing the key with the ``keycode`` printed on it. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant or any Unicode character code. @@ -802,7 +886,7 @@ Returns ``true`` if you are pressing the key with the ``keycode`` printed on it. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_key_pressed** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| +:ref:`bool<class_bool>` **is_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_key_pressed>` Returns ``true`` if you are pressing the Latin key in the current keyboard layout. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant. @@ -818,7 +902,7 @@ Returns ``true`` if you are pressing the Latin key in the current keyboard layou .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_mouse_button_pressed** **(** :ref:`MouseButton<enum_@GlobalScope_MouseButton>` button **)** |const| +:ref:`bool<class_bool>` **is_mouse_button_pressed**\ (\ button\: :ref:`MouseButton<enum_@GlobalScope_MouseButton>`\ ) |const| :ref:`🔗<class_Input_method_is_mouse_button_pressed>` Returns ``true`` if you are pressing the mouse button specified with :ref:`MouseButton<enum_@GlobalScope_MouseButton>`. @@ -830,7 +914,7 @@ Returns ``true`` if you are pressing the mouse button specified with :ref:`Mouse .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_physical_key_pressed** **(** :ref:`Key<enum_@GlobalScope_Key>` keycode **)** |const| +:ref:`bool<class_bool>` **is_physical_key_pressed**\ (\ keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_Input_method_is_physical_key_pressed>` Returns ``true`` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a :ref:`Key<enum_@GlobalScope_Key>` constant. @@ -846,9 +930,9 @@ Returns ``true`` if you are pressing the key in the physical location on the 101 .. rst-class:: classref-method -void **parse_input_event** **(** :ref:`InputEvent<class_InputEvent>` event **)** +|void| **parse_input_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Input_method_parse_input_event>` -Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input<class_Node_method__input>` calls. +Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artificially trigger input events from code. Also generates :ref:`Node._input<class_Node_private_method__input>` calls. \ **Example:**\ @@ -871,6 +955,8 @@ Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artific +\ **Note:** Calling this function has no influence on the operating system. So for example sending an :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` will not move the OS mouse cursor to the specified position (use :ref:`warp_mouse<class_Input_method_warp_mouse>` instead) and sending :kbd:`Alt/Cmd + Tab` as :ref:`InputEventKey<class_InputEventKey>` won't toggle between active windows. + .. rst-class:: classref-item-separator ---- @@ -879,7 +965,7 @@ Feeds an :ref:`InputEvent<class_InputEvent>` to the game. Can be used to artific .. rst-class:: classref-method -void **remove_joy_mapping** **(** :ref:`String<class_String>` guid **)** +|void| **remove_joy_mapping**\ (\ guid\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Input_method_remove_joy_mapping>` Removes all mappings from the internal database that match the given GUID. @@ -891,7 +977,7 @@ Removes all mappings from the internal database that match the given GUID. .. rst-class:: classref-method -void **set_accelerometer** **(** :ref:`Vector3<class_Vector3>` value **)** +|void| **set_accelerometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_accelerometer>` Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. @@ -905,11 +991,11 @@ Sets the acceleration value of the accelerometer sensor. Can be used for debuggi .. rst-class:: classref-method -void **set_custom_mouse_cursor** **(** :ref:`Resource<class_Resource>` image, :ref:`CursorShape<enum_Input_CursorShape>` shape=0, :ref:`Vector2<class_Vector2>` hotspot=Vector2(0, 0) **)** +|void| **set_custom_mouse_cursor**\ (\ image\: :ref:`Resource<class_Resource>`, shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0, hotspot\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_Input_method_set_custom_mouse_cursor>` Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing ``null`` to the image parameter resets to the system cursor. See :ref:`CursorShape<enum_Input_CursorShape>` for the list of shapes. -\ ``image``'s size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. +\ ``image`` can be either :ref:`Texture2D<class_Texture2D>` or :ref:`Image<class_Image>` and its size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. \ ``hotspot`` must be within ``image``'s size. @@ -927,7 +1013,7 @@ Sets a custom mouse cursor image, which is only visible inside the game window. .. rst-class:: classref-method -void **set_default_cursor_shape** **(** :ref:`CursorShape<enum_Input_CursorShape>` shape=0 **)** +|void| **set_default_cursor_shape**\ (\ shape\: :ref:`CursorShape<enum_Input_CursorShape>` = 0\ ) :ref:`🔗<class_Input_method_set_default_cursor_shape>` Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR_ARROW<class_Input_constant_CURSOR_ARROW>`. @@ -943,7 +1029,7 @@ Sets the default cursor shape to be used in the viewport instead of :ref:`CURSOR .. rst-class:: classref-method -void **set_gravity** **(** :ref:`Vector3<class_Vector3>` value **)** +|void| **set_gravity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_gravity>` Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. @@ -957,7 +1043,7 @@ Sets the gravity value of the accelerometer sensor. Can be used for debugging on .. rst-class:: classref-method -void **set_gyroscope** **(** :ref:`Vector3<class_Vector3>` value **)** +|void| **set_gyroscope**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_gyroscope>` Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. @@ -971,7 +1057,7 @@ Sets the value of the rotation rate of the gyroscope sensor. Can be used for deb .. rst-class:: classref-method -void **set_magnetometer** **(** :ref:`Vector3<class_Vector3>` value **)** +|void| **set_magnetometer**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Input_method_set_magnetometer>` Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. @@ -985,7 +1071,7 @@ Sets the value of the magnetic field of the magnetometer sensor. Can be used for .. rst-class:: classref-method -:ref:`bool<class_bool>` **should_ignore_device** **(** :ref:`int<class_int>` vendor_id, :ref:`int<class_int>` product_id **)** |const| +:ref:`bool<class_bool>` **should_ignore_device**\ (\ vendor_id\: :ref:`int<class_int>`, product_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Input_method_should_ignore_device>` Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable ``SDL_GAMECONTROLLER_IGNORE_DEVICES``. Read the `SDL documentation <https://wiki.libsdl.org/SDL2>`__ for more information. @@ -999,12 +1085,14 @@ Queries whether an input device should be ignored or not. Devices can be ignored .. rst-class:: classref-method -void **start_joy_vibration** **(** :ref:`int<class_int>` device, :ref:`float<class_float>` weak_magnitude, :ref:`float<class_float>` strong_magnitude, :ref:`float<class_float>` duration=0 **)** +|void| **start_joy_vibration**\ (\ device\: :ref:`int<class_int>`, weak_magnitude\: :ref:`float<class_float>`, strong_magnitude\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>` = 0\ ) :ref:`🔗<class_Input_method_start_joy_vibration>` Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. ``weak_magnitude`` is the strength of the weak motor (between 0 and 1) and ``strong_magnitude`` is the strength of the strong motor (between 0 and 1). ``duration`` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling :ref:`stop_joy_vibration<class_Input_method_stop_joy_vibration>`. \ **Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. +\ **Note:** For macOS, vibration is only supported in macOS 11 and later. + .. rst-class:: classref-item-separator ---- @@ -1013,7 +1101,7 @@ Starts to vibrate the joypad. Joypads usually come with two rumble motors, a str .. rst-class:: classref-method -void **stop_joy_vibration** **(** :ref:`int<class_int>` device **)** +|void| **stop_joy_vibration**\ (\ device\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Input_method_stop_joy_vibration>` Stops the vibration of the joypad started with :ref:`start_joy_vibration<class_Input_method_start_joy_vibration>`. @@ -1025,16 +1113,20 @@ Stops the vibration of the joypad started with :ref:`start_joy_vibration<class_I .. rst-class:: classref-method -void **vibrate_handheld** **(** :ref:`int<class_int>` duration_ms=500 **)** +|void| **vibrate_handheld**\ (\ duration_ms\: :ref:`int<class_int>` = 500, amplitude\: :ref:`float<class_float>` = -1.0\ ) :ref:`🔗<class_Input_method_vibrate_handheld>` Vibrate the handheld device for the specified duration in milliseconds. +\ ``amplitude`` is the strength of the vibration, as a value between ``0.0`` and ``1.0``. If set to ``-1.0``, the default vibration strength of the device is used. + \ **Note:** This method is implemented on Android, iOS, and Web. It has no effect on other platforms. \ **Note:** For Android, :ref:`vibrate_handheld<class_Input_method_vibrate_handheld>` requires enabling the ``VIBRATE`` permission in the export preset. Otherwise, :ref:`vibrate_handheld<class_Input_method_vibrate_handheld>` will have no effect. \ **Note:** For iOS, specifying the duration is only supported in iOS 13 and later. +\ **Note:** For Web, the amplitude cannot be changed. + \ **Note:** Some web browsers such as Safari and Firefox for Android do not support :ref:`vibrate_handheld<class_Input_method_vibrate_handheld>`. .. rst-class:: classref-item-separator @@ -1045,7 +1137,7 @@ Vibrate the handheld device for the specified duration in milliseconds. .. rst-class:: classref-method -void **warp_mouse** **(** :ref:`Vector2<class_Vector2>` position **)** +|void| **warp_mouse**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Input_method_warp_mouse>` Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. @@ -1060,3 +1152,4 @@ Mouse position is clipped to the limits of the screen resolution, or to the limi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index a93c14f6a54..a10d7c967d5 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -21,7 +21,7 @@ Abstract base class for input events. Description ----------- -Abstract base class of all types of input events. See :ref:`Node._input<class_Node_method__input>`. +Abstract base class of all types of input events. See :ref:`Node._input<class_Node_private_method__input>`. .. rst-class:: classref-introduction-group @@ -32,9 +32,9 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -56,33 +56,50 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`accumulate<class_InputEvent_method_accumulate>` **(** :ref:`InputEvent<class_InputEvent>` with_event **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`as_text<class_InputEvent_method_as_text>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_action_strength<class_InputEvent_method_get_action_strength>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action<class_InputEvent_method_is_action>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_InputEvent_method_is_action_pressed>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` allow_echo=false, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_released<class_InputEvent_method_is_action_released>` **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_type<class_InputEvent_method_is_action_type>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_canceled<class_InputEvent_method_is_canceled>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_echo<class_InputEvent_method_is_echo>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_match<class_InputEvent_method_is_match>` **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` exact_match=true **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_pressed<class_InputEvent_method_is_pressed>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_released<class_InputEvent_method_is_released>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent<class_InputEvent>` | :ref:`xformed_by<class_InputEvent_method_xformed_by>` **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`Vector2<class_Vector2>` local_ofs=Vector2(0, 0) **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`accumulate<class_InputEvent_method_accumulate>`\ (\ with_event\: :ref:`InputEvent<class_InputEvent>`\ ) | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`as_text<class_InputEvent_method_as_text>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_action_strength<class_InputEvent_method_get_action_strength>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action<class_InputEvent_method_is_action>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_pressed<class_InputEvent_method_is_action_pressed>`\ (\ action\: :ref:`StringName<class_StringName>`, allow_echo\: :ref:`bool<class_bool>` = false, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_released<class_InputEvent_method_is_action_released>`\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_type<class_InputEvent_method_is_action_type>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_canceled<class_InputEvent_method_is_canceled>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_echo<class_InputEvent_method_is_echo>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_match<class_InputEvent_method_is_match>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`, exact_match\: :ref:`bool<class_bool>` = true\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_pressed<class_InputEvent_method_is_pressed>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_released<class_InputEvent_method_is_released>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent<class_InputEvent>` | :ref:`xformed_by<class_InputEvent_method_xformed_by>`\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, local_ofs\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_InputEvent_constant_DEVICE_ID_EMULATION: + +.. rst-class:: classref-constant + +**DEVICE_ID_EMULATION** = ``-1`` :ref:`🔗<class_InputEvent_constant_DEVICE_ID_EMULATION>` + +Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input. .. rst-class:: classref-section-separator @@ -97,16 +114,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **device** = ``0`` +:ref:`int<class_int>` **device** = ``0`` :ref:`🔗<class_InputEvent_property_device>` .. rst-class:: classref-property-setget -- void **set_device** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_device** **(** **)** +- |void| **set_device**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_device**\ (\ ) The event's device ID. -\ **Note:** This device ID will always be ``-1`` for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. +\ **Note:** :ref:`device<class_InputEvent_property_device>` can be negative for special use cases that don't refer to devices physically present on the system. See :ref:`DEVICE_ID_EMULATION<class_InputEvent_constant_DEVICE_ID_EMULATION>`. .. rst-class:: classref-section-separator @@ -121,7 +138,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **accumulate** **(** :ref:`InputEvent<class_InputEvent>` with_event **)** +:ref:`bool<class_bool>` **accumulate**\ (\ with_event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_InputEvent_method_accumulate>` Returns ``true`` if the given input event and this input event can be added together (only for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`). @@ -135,7 +152,7 @@ The given input event's position, global position and speed will be copied. The .. rst-class:: classref-method -:ref:`String<class_String>` **as_text** **(** **)** |const| +:ref:`String<class_String>` **as_text**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_as_text>` Returns a :ref:`String<class_String>` representation of the event. @@ -147,7 +164,7 @@ Returns a :ref:`String<class_String>` representation of the event. .. rst-class:: classref-method -:ref:`float<class_float>` **get_action_strength** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`float<class_float>` **get_action_strength**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_InputEvent_method_get_action_strength>` Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>`. @@ -161,7 +178,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_InputEvent_method_is_action>` Returns ``true`` if this input event matches a pre-defined action of any type. @@ -175,7 +192,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_pressed** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` allow_echo=false, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action_pressed**\ (\ action\: :ref:`StringName<class_StringName>`, allow_echo\: :ref:`bool<class_bool>` = false, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_InputEvent_method_is_action_pressed>` Returns ``true`` if the given action is being pressed (and is not an echo event for :ref:`InputEventKey<class_InputEventKey>` events, unless ``allow_echo`` is ``true``). Not relevant for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` or :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`. @@ -191,7 +208,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_released** **(** :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **is_action_released**\ (\ action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_InputEvent_method_is_action_released>` Returns ``true`` if the given action is released (i.e. not pressed). Not relevant for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` or :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`. @@ -205,7 +222,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_type** **(** **)** |const| +:ref:`bool<class_bool>` **is_action_type**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_is_action_type>` Returns ``true`` if this input event's type is one that can be assigned to an input action. @@ -217,7 +234,7 @@ Returns ``true`` if this input event's type is one that can be assigned to an in .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_canceled** **(** **)** |const| +:ref:`bool<class_bool>` **is_canceled**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_is_canceled>` Returns ``true`` if this input event has been canceled. @@ -229,9 +246,11 @@ Returns ``true`` if this input event has been canceled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_echo** **(** **)** |const| +:ref:`bool<class_bool>` **is_echo**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_is_echo>` + +Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey<class_InputEventKey>`). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns ``false``. -Returns ``true`` if this input event is an echo event (only for events of type :ref:`InputEventKey<class_InputEventKey>`). Any other event type returns ``false``. +\ **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. .. rst-class:: classref-item-separator @@ -241,7 +260,7 @@ Returns ``true`` if this input event is an echo event (only for events of type : .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_match** **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` exact_match=true **)** |const| +:ref:`bool<class_bool>` **is_match**\ (\ event\: :ref:`InputEvent<class_InputEvent>`, exact_match\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_InputEvent_method_is_match>` Returns ``true`` if the specified ``event`` matches this event. Only valid for action events i.e key (:ref:`InputEventKey<class_InputEventKey>`), button (:ref:`InputEventMouseButton<class_InputEventMouseButton>` or :ref:`InputEventJoypadButton<class_InputEventJoypadButton>`), axis :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>` or action (:ref:`InputEventAction<class_InputEventAction>`) events. @@ -255,7 +274,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_pressed** **(** **)** |const| +:ref:`bool<class_bool>` **is_pressed**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_is_pressed>` Returns ``true`` if this input event is pressed. Not relevant for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` or :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`. @@ -269,7 +288,7 @@ Returns ``true`` if this input event is pressed. Not relevant for events of type .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_released** **(** **)** |const| +:ref:`bool<class_bool>` **is_released**\ (\ ) |const| :ref:`🔗<class_InputEvent_method_is_released>` Returns ``true`` if this input event is released. Not relevant for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` or :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`. @@ -281,7 +300,7 @@ Returns ``true`` if this input event is released. Not relevant for events of typ .. rst-class:: classref-method -:ref:`InputEvent<class_InputEvent>` **xformed_by** **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`Vector2<class_Vector2>` local_ofs=Vector2(0, 0) **)** |const| +:ref:`InputEvent<class_InputEvent>` **xformed_by**\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, local_ofs\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |const| :ref:`🔗<class_InputEvent_method_xformed_by>` Returns a copy of the given input event which has been offset by ``local_ofs`` and transformed by ``xform``. Relevant for events of type :ref:`InputEventMouseButton<class_InputEventMouseButton>`, :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`, :ref:`InputEventScreenTouch<class_InputEventScreenTouch>`, :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`, :ref:`InputEventMagnifyGesture<class_InputEventMagnifyGesture>` and :ref:`InputEventPanGesture<class_InputEventPanGesture>`. @@ -292,3 +311,4 @@ Returns a copy of the given input event which has been offset by ``local_ofs`` a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventaction.rst b/classes/class_inputeventaction.rst index 647ab128a1e..670b5fe0a82 100644 --- a/classes/class_inputeventaction.rst +++ b/classes/class_inputeventaction.rst @@ -21,7 +21,7 @@ Description Contains a generic action which can be targeted from several types of inputs. Actions and their events can be set in the **Input Map** tab in **Project > Project Settings**, or with the :ref:`InputMap<class_InputMap>` class. -\ **Note:** Unlike the other :ref:`InputEvent<class_InputEvent>` subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with :ref:`Input.parse_input_event<class_Input_method_parse_input_event>`, which are then received in :ref:`Node._input<class_Node_method__input>`. To check if a physical event matches an action from the Input Map, use :ref:`InputEvent.is_action<class_InputEvent_method_is_action>` and :ref:`InputEvent.is_action_pressed<class_InputEvent_method_is_action_pressed>`. +\ **Note:** Unlike the other :ref:`InputEvent<class_InputEvent>` subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with :ref:`Input.parse_input_event<class_Input_method_parse_input_event>`, which are then received in :ref:`Node._input<class_Node_private_method__input>`. To check if a physical event matches an action from the Input Map, use :ref:`InputEvent.is_action<class_InputEvent_method_is_action>` and :ref:`InputEvent.is_action_pressed<class_InputEvent_method_is_action_pressed>`. .. rst-class:: classref-introduction-group @@ -30,9 +30,9 @@ Tutorials - `Using InputEvent: Actions <../tutorials/inputs/inputevent.html#actions>`__ -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -42,13 +42,15 @@ Properties .. table:: :widths: auto - +-------------------------------------+-----------------------------------------------------------+-----------+ - | :ref:`StringName<class_StringName>` | :ref:`action<class_InputEventAction_property_action>` | ``&""`` | - +-------------------------------------+-----------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventAction_property_pressed>` | ``false`` | - +-------------------------------------+-----------------------------------------------------------+-----------+ - | :ref:`float<class_float>` | :ref:`strength<class_InputEventAction_property_strength>` | ``1.0`` | - +-------------------------------------+-----------------------------------------------------------+-----------+ + +-------------------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`StringName<class_StringName>` | :ref:`action<class_InputEventAction_property_action>` | ``&""`` | + +-------------------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`event_index<class_InputEventAction_property_event_index>` | ``-1`` | + +-------------------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventAction_property_pressed>` | ``false`` | + +-------------------------------------+-----------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`strength<class_InputEventAction_property_strength>` | ``1.0`` | + +-------------------------------------+-----------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -63,12 +65,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **action** = ``&""`` +:ref:`StringName<class_StringName>` **action** = ``&""`` :ref:`🔗<class_InputEventAction_property_action>` .. rst-class:: classref-property-setget -- void **set_action** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_action** **(** **)** +- |void| **set_action**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_action**\ (\ ) The action's name. Actions are accessed via this :ref:`String<class_String>`. @@ -76,16 +78,33 @@ The action's name. Actions are accessed via this :ref:`String<class_String>`. ---- +.. _class_InputEventAction_property_event_index: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **event_index** = ``-1`` :ref:`🔗<class_InputEventAction_property_event_index>` + +.. rst-class:: classref-property-setget + +- |void| **set_event_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_event_index**\ (\ ) + +The real event index in action this event corresponds to (from events defined for this action in the :ref:`InputMap<class_InputMap>`). If ``-1``, a unique ID will be used and actions pressed with this ID will need to be released with another **InputEventAction**. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventAction_property_pressed: .. rst-class:: classref-property -:ref:`bool<class_bool>` **pressed** = ``false`` +:ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventAction_property_pressed>` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pressed**\ (\ ) If ``true``, the action's state is pressed. If ``false``, the action's state is released. @@ -97,12 +116,12 @@ If ``true``, the action's state is pressed. If ``false``, the action's state is .. rst-class:: classref-property -:ref:`float<class_float>` **strength** = ``1.0`` +:ref:`float<class_float>` **strength** = ``1.0`` :ref:`🔗<class_InputEventAction_property_strength>` .. rst-class:: classref-property-setget -- void **set_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_strength** **(** **)** +- |void| **set_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_strength**\ (\ ) The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is ``false``. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed. @@ -113,3 +132,4 @@ The action's strength between 0 and 1. This value is considered as equal to 0 if .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventfromwindow.rst b/classes/class_inputeventfromwindow.rst index 063ee5c0260..f05d6f793fd 100644 --- a/classes/class_inputeventfromwindow.rst +++ b/classes/class_inputeventfromwindow.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **window_id** = ``0`` +:ref:`int<class_int>` **window_id** = ``0`` :ref:`🔗<class_InputEventFromWindow_property_window_id>` .. rst-class:: classref-property-setget -- void **set_window_id** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_window_id** **(** **)** +- |void| **set_window_id**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_window_id**\ (\ ) The ID of a :ref:`Window<class_Window>` that received this event. @@ -64,3 +64,4 @@ The ID of a :ref:`Window<class_Window>` that received this event. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventgesture.rst b/classes/class_inputeventgesture.rst index dfc65d61c18..c283f82aae9 100644 --- a/classes/class_inputeventgesture.rst +++ b/classes/class_inputeventgesture.rst @@ -55,14 +55,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventGesture_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) -The local gesture position relative to the :ref:`Viewport<class_Viewport>`. If used in :ref:`Control._gui_input<class_Control_method__gui_input>`, the position is relative to the current :ref:`Control<class_Control>` that received this gesture. +The local gesture position relative to the :ref:`Viewport<class_Viewport>`. If used in :ref:`Control._gui_input<class_Control_private_method__gui_input>`, the position is relative to the current :ref:`Control<class_Control>` that received this gesture. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -71,3 +71,4 @@ The local gesture position relative to the :ref:`Viewport<class_Viewport>`. If u .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventjoypadbutton.rst b/classes/class_inputeventjoypadbutton.rst index ba3001a3d16..43e7c4ed3f9 100644 --- a/classes/class_inputeventjoypadbutton.rst +++ b/classes/class_inputeventjoypadbutton.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: gamepad, controller + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -57,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`JoyButton<enum_@GlobalScope_JoyButton>` **button_index** = ``0`` +:ref:`JoyButton<enum_@GlobalScope_JoyButton>` **button_index** = ``0`` :ref:`🔗<class_InputEventJoypadButton_property_button_index>` .. rst-class:: classref-property-setget -- void **set_button_index** **(** :ref:`JoyButton<enum_@GlobalScope_JoyButton>` value **)** -- :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **get_button_index** **(** **)** +- |void| **set_button_index**\ (\ value\: :ref:`JoyButton<enum_@GlobalScope_JoyButton>`\ ) +- :ref:`JoyButton<enum_@GlobalScope_JoyButton>` **get_button_index**\ (\ ) Button identifier. One of the :ref:`JoyButton<enum_@GlobalScope_JoyButton>` button constants. @@ -74,12 +77,12 @@ Button identifier. One of the :ref:`JoyButton<enum_@GlobalScope_JoyButton>` butt .. rst-class:: classref-property -:ref:`bool<class_bool>` **pressed** = ``false`` +:ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventJoypadButton_property_pressed>` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pressed**\ (\ ) If ``true``, the button's state is pressed. If ``false``, the button's state is released. @@ -91,14 +94,14 @@ If ``true``, the button's state is pressed. If ``false``, the button's state is .. rst-class:: classref-property -:ref:`float<class_float>` **pressure** = ``0.0`` +:ref:`float<class_float>` **pressure** = ``0.0`` :ref:`🔗<class_InputEventJoypadButton_property_pressure>` .. rst-class:: classref-property-setget -- void **set_pressure** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pressure** **(** **)** +- |void| **set_pressure**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pressure**\ (\ ) -Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from ``0`` to ``1``. +**Deprecated:** This property is never set by the engine and is always ``0``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -107,3 +110,4 @@ Represents the pressure the user puts on the button with their finger, if the co .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventjoypadmotion.rst b/classes/class_inputeventjoypadmotion.rst index c207962cfee..c1c828373fb 100644 --- a/classes/class_inputeventjoypadmotion.rst +++ b/classes/class_inputeventjoypadmotion.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: gamepad, controller + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -55,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **axis** = ``0`` +:ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **axis** = ``0`` :ref:`🔗<class_InputEventJoypadMotion_property_axis>` .. rst-class:: classref-property-setget -- void **set_axis** **(** :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` value **)** -- :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **get_axis** **(** **)** +- |void| **set_axis**\ (\ value\: :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>`\ ) +- :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` **get_axis**\ (\ ) Axis identifier. Use one of the :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis constants. @@ -72,12 +75,12 @@ Axis identifier. Use one of the :ref:`JoyAxis<enum_@GlobalScope_JoyAxis>` axis c .. rst-class:: classref-property -:ref:`float<class_float>` **axis_value** = ``0.0`` +:ref:`float<class_float>` **axis_value** = ``0.0`` :ref:`🔗<class_InputEventJoypadMotion_property_axis_value>` .. rst-class:: classref-property-setget -- void **set_axis_value** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_axis_value** **(** **)** +- |void| **set_axis_value**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_axis_value**\ (\ ) Current position of the joystick on the given axis. The value ranges from ``-1.0`` to ``1.0``. A value of ``0`` means the axis is in its resting position. @@ -88,3 +91,4 @@ Current position of the joystick on the given axis. The value ranges from ``-1.0 .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventkey.rst b/classes/class_inputeventkey.rst index 4823f4615f8..78f83f59bb4 100644 --- a/classes/class_inputeventkey.rst +++ b/classes/class_inputeventkey.rst @@ -19,7 +19,7 @@ Represents a key on a keyboard being pressed or released. Description ----------- -An input event for keys on a keyboard. Supports key presses, key releases and :ref:`echo<class_InputEventKey_property_echo>` events. It can also be received in :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`. +An input event for keys on a keyboard. Supports key presses, key releases and :ref:`echo<class_InputEventKey_property_echo>` events. It can also be received in :ref:`Node._unhandled_key_input<class_Node_private_method__unhandled_key_input>`. \ **Note:** Events received from the keyboard usually have all properties set. Event mappings should have only one of the :ref:`keycode<class_InputEventKey_property_keycode>`, :ref:`physical_keycode<class_InputEventKey_property_physical_keycode>` or :ref:`unicode<class_InputEventKey_property_unicode>` set. @@ -40,19 +40,21 @@ Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`echo<class_InputEventKey_property_echo>` | ``false`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`key_label<class_InputEventKey_property_key_label>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keycode<class_InputEventKey_property_keycode>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`physical_keycode<class_InputEventKey_property_physical_keycode>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventKey_property_pressed>` | ``false`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`unicode<class_InputEventKey_property_unicode>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------+-----------+ + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`echo<class_InputEventKey_property_echo>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`key_label<class_InputEventKey_property_key_label>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`keycode<class_InputEventKey_property_keycode>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` | :ref:`location<class_InputEventKey_property_location>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`physical_keycode<class_InputEventKey_property_physical_keycode>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`pressed<class_InputEventKey_property_pressed>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`unicode<class_InputEventKey_property_unicode>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -62,19 +64,21 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`as_text_key_label<class_InputEventKey_method_as_text_key_label>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`as_text_keycode<class_InputEventKey_method_as_text_keycode>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`as_text_physical_keycode<class_InputEventKey_method_as_text_physical_keycode>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_key_label_with_modifiers<class_InputEventKey_method_get_key_label_with_modifiers>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_keycode_with_modifiers<class_InputEventKey_method_get_keycode_with_modifiers>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_physical_keycode_with_modifiers<class_InputEventKey_method_get_physical_keycode_with_modifiers>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`as_text_key_label<class_InputEventKey_method_as_text_key_label>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`as_text_keycode<class_InputEventKey_method_as_text_keycode>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`as_text_location<class_InputEventKey_method_as_text_location>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`as_text_physical_keycode<class_InputEventKey_method_as_text_physical_keycode>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_key_label_with_modifiers<class_InputEventKey_method_get_key_label_with_modifiers>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_keycode_with_modifiers<class_InputEventKey_method_get_keycode_with_modifiers>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_physical_keycode_with_modifiers<class_InputEventKey_method_get_physical_keycode_with_modifiers>`\ (\ ) |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -89,14 +93,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **echo** = ``false`` +:ref:`bool<class_bool>` **echo** = ``false`` :ref:`🔗<class_InputEventKey_property_echo>` .. rst-class:: classref-property-setget -- void **set_echo** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_echo** **(** **)** +- |void| **set_echo**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_echo**\ (\ ) -If ``true``, the key was already pressed before this event. It means the user is holding the key down. +If ``true``, the key was already pressed before this event. An echo event is a repeated key event sent when the user is holding down the key. + +\ **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. .. rst-class:: classref-item-separator @@ -106,12 +112,12 @@ If ``true``, the key was already pressed before this event. It means the user is .. rst-class:: classref-property -:ref:`Key<enum_@GlobalScope_Key>` **key_label** = ``0`` +:ref:`Key<enum_@GlobalScope_Key>` **key_label** = ``0`` :ref:`🔗<class_InputEventKey_property_key_label>` .. rst-class:: classref-property-setget -- void **set_key_label** **(** :ref:`Key<enum_@GlobalScope_Key>` value **)** -- :ref:`Key<enum_@GlobalScope_Key>` **get_key_label** **(** **)** +- |void| **set_key_label**\ (\ value\: :ref:`Key<enum_@GlobalScope_Key>`\ ) +- :ref:`Key<enum_@GlobalScope_Key>` **get_key_label**\ (\ ) Represents the localized label printed on the key in the current keyboard layout, which corresponds to one of the :ref:`Key<enum_@GlobalScope_Key>` constants or any valid Unicode character. @@ -119,7 +125,7 @@ For keyboard layouts with a single label on the key, it is equivalent to :ref:`k To get a human-readable representation of the **InputEventKey**, use ``OS.get_keycode_string(event.key_label)`` where ``event`` is the **InputEventKey**. -:: +.. code:: text +-----+ +-----+ | Q | | Q | - "Q" - keycode @@ -134,18 +140,18 @@ To get a human-readable representation of the **InputEventKey**, use ``OS.get_ke .. rst-class:: classref-property -:ref:`Key<enum_@GlobalScope_Key>` **keycode** = ``0`` +:ref:`Key<enum_@GlobalScope_Key>` **keycode** = ``0`` :ref:`🔗<class_InputEventKey_property_keycode>` .. rst-class:: classref-property-setget -- void **set_keycode** **(** :ref:`Key<enum_@GlobalScope_Key>` value **)** -- :ref:`Key<enum_@GlobalScope_Key>` **get_keycode** **(** **)** +- |void| **set_keycode**\ (\ value\: :ref:`Key<enum_@GlobalScope_Key>`\ ) +- :ref:`Key<enum_@GlobalScope_Key>` **get_keycode**\ (\ ) Latin label printed on the key in the current keyboard layout, which corresponds to one of the :ref:`Key<enum_@GlobalScope_Key>` constants. To get a human-readable representation of the **InputEventKey**, use ``OS.get_keycode_string(event.keycode)`` where ``event`` is the **InputEventKey**. -:: +.. code:: text +-----+ +-----+ | Q | | Q | - "Q" - keycode @@ -156,20 +162,60 @@ To get a human-readable representation of the **InputEventKey**, use ``OS.get_ke ---- +.. _class_InputEventKey_property_location: + +.. rst-class:: classref-property + +:ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` **location** = ``0`` :ref:`🔗<class_InputEventKey_property_location>` + +.. rst-class:: classref-property-setget + +- |void| **set_location**\ (\ value\: :ref:`KeyLocation<enum_@GlobalScope_KeyLocation>`\ ) +- :ref:`KeyLocation<enum_@GlobalScope_KeyLocation>` **get_location**\ (\ ) + +Represents the location of a key which has both left and right versions, such as :kbd:`Shift` or :kbd:`Alt`. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventKey_property_physical_keycode: .. rst-class:: classref-property -:ref:`Key<enum_@GlobalScope_Key>` **physical_keycode** = ``0`` +:ref:`Key<enum_@GlobalScope_Key>` **physical_keycode** = ``0`` :ref:`🔗<class_InputEventKey_property_physical_keycode>` .. rst-class:: classref-property-setget -- void **set_physical_keycode** **(** :ref:`Key<enum_@GlobalScope_Key>` value **)** -- :ref:`Key<enum_@GlobalScope_Key>` **get_physical_keycode** **(** **)** +- |void| **set_physical_keycode**\ (\ value\: :ref:`Key<enum_@GlobalScope_Key>`\ ) +- :ref:`Key<enum_@GlobalScope_Key>` **get_physical_keycode**\ (\ ) Represents the physical location of a key on the 101/102-key US QWERTY keyboard, which corresponds to one of the :ref:`Key<enum_@GlobalScope_Key>` constants. -To get a human-readable representation of the **InputEventKey**, use ``OS.get_keycode_string(event.keycode)`` where ``event`` is the **InputEventKey**. +To get a human-readable representation of the **InputEventKey**, use :ref:`OS.get_keycode_string<class_OS_method_get_keycode_string>` in combination with :ref:`DisplayServer.keyboard_get_keycode_from_physical<class_DisplayServer_method_keyboard_get_keycode_from_physical>`: + + +.. tabs:: + + .. code-tab:: gdscript + + func _input(event): + if event is InputEventKey: + var keycode = DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode) + print(OS.get_keycode_string(keycode)) + + .. code-tab:: csharp + + public override void _Input(InputEvent @event) + { + if (@event is InputEventKey inputEventKey) + { + var keycode = DisplayServer.KeyboardGetKeycodeFromPhysical(inputEventKey.PhysicalKeycode); + GD.Print(OS.GetKeycodeString(keycode)); + } + } + + .. rst-class:: classref-item-separator @@ -179,12 +225,12 @@ To get a human-readable representation of the **InputEventKey**, use ``OS.get_ke .. rst-class:: classref-property -:ref:`bool<class_bool>` **pressed** = ``false`` +:ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventKey_property_pressed>` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pressed**\ (\ ) If ``true``, the key's state is pressed. If ``false``, the key's state is released. @@ -196,12 +242,12 @@ If ``true``, the key's state is pressed. If ``false``, the key's state is releas .. rst-class:: classref-property -:ref:`int<class_int>` **unicode** = ``0`` +:ref:`int<class_int>` **unicode** = ``0`` :ref:`🔗<class_InputEventKey_property_unicode>` .. rst-class:: classref-property-setget -- void **set_unicode** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_unicode** **(** **)** +- |void| **set_unicode**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_unicode**\ (\ ) The key Unicode character code (when relevant), shifted by modifier keys. Unicode character codes for composite characters and complex scripts may not be available unless IME input mode is active. See :ref:`Window.set_ime_active<class_Window_method_set_ime_active>` for more information. @@ -218,7 +264,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **as_text_key_label** **(** **)** |const| +:ref:`String<class_String>` **as_text_key_label**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_as_text_key_label>` Returns a :ref:`String<class_String>` representation of the event's :ref:`key_label<class_InputEventKey_property_key_label>` and modifiers. @@ -230,7 +276,7 @@ Returns a :ref:`String<class_String>` representation of the event's :ref:`key_la .. rst-class:: classref-method -:ref:`String<class_String>` **as_text_keycode** **(** **)** |const| +:ref:`String<class_String>` **as_text_keycode**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_as_text_keycode>` Returns a :ref:`String<class_String>` representation of the event's :ref:`keycode<class_InputEventKey_property_keycode>` and modifiers. @@ -238,11 +284,23 @@ Returns a :ref:`String<class_String>` representation of the event's :ref:`keycod ---- +.. _class_InputEventKey_method_as_text_location: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **as_text_location**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_as_text_location>` + +Returns a :ref:`String<class_String>` representation of the event's :ref:`location<class_InputEventKey_property_location>`. This will be a blank string if the event is not specific to a location. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventKey_method_as_text_physical_keycode: .. rst-class:: classref-method -:ref:`String<class_String>` **as_text_physical_keycode** **(** **)** |const| +:ref:`String<class_String>` **as_text_physical_keycode**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_as_text_physical_keycode>` Returns a :ref:`String<class_String>` representation of the event's :ref:`physical_keycode<class_InputEventKey_property_physical_keycode>` and modifiers. @@ -254,7 +312,7 @@ Returns a :ref:`String<class_String>` representation of the event's :ref:`physic .. rst-class:: classref-method -:ref:`Key<enum_@GlobalScope_Key>` **get_key_label_with_modifiers** **(** **)** |const| +:ref:`Key<enum_@GlobalScope_Key>` **get_key_label_with_modifiers**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_get_key_label_with_modifiers>` Returns the localized key label combined with modifier keys such as :kbd:`Shift` or :kbd:`Alt`. See also :ref:`InputEventWithModifiers<class_InputEventWithModifiers>`. @@ -268,7 +326,7 @@ To get a human-readable representation of the **InputEventKey** with modifiers, .. rst-class:: classref-method -:ref:`Key<enum_@GlobalScope_Key>` **get_keycode_with_modifiers** **(** **)** |const| +:ref:`Key<enum_@GlobalScope_Key>` **get_keycode_with_modifiers**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_get_keycode_with_modifiers>` Returns the Latin keycode combined with modifier keys such as :kbd:`Shift` or :kbd:`Alt`. See also :ref:`InputEventWithModifiers<class_InputEventWithModifiers>`. @@ -282,7 +340,7 @@ To get a human-readable representation of the **InputEventKey** with modifiers, .. rst-class:: classref-method -:ref:`Key<enum_@GlobalScope_Key>` **get_physical_keycode_with_modifiers** **(** **)** |const| +:ref:`Key<enum_@GlobalScope_Key>` **get_physical_keycode_with_modifiers**\ (\ ) |const| :ref:`🔗<class_InputEventKey_method_get_physical_keycode_with_modifiers>` Returns the physical keycode combined with modifier keys such as :kbd:`Shift` or :kbd:`Alt`. See also :ref:`InputEventWithModifiers<class_InputEventWithModifiers>`. @@ -295,3 +353,4 @@ To get a human-readable representation of the **InputEventKey** with modifiers, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventmagnifygesture.rst b/classes/class_inputeventmagnifygesture.rst index fd1b82ec101..795bf17615c 100644 --- a/classes/class_inputeventmagnifygesture.rst +++ b/classes/class_inputeventmagnifygesture.rst @@ -21,6 +21,8 @@ Description Stores the factor of a magnifying touch gesture. This is usually performed when the user pinches the touch screen and used for zooming in/out. +\ **Note:** On Android, this requires the :ref:`ProjectSettings.input_devices/pointing/android/enable_pan_and_scale_gestures<class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures>` project setting to be enabled. + .. rst-class:: classref-introduction-group Tutorials @@ -53,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **factor** = ``1.0`` +:ref:`float<class_float>` **factor** = ``1.0`` :ref:`🔗<class_InputEventMagnifyGesture_property_factor>` .. rst-class:: classref-property-setget -- void **set_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_factor** **(** **)** +- |void| **set_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_factor**\ (\ ) The amount (or delta) of the event. This value is closer to ``1.0`` the slower the gesture is performed. @@ -69,3 +71,4 @@ The amount (or delta) of the event. This value is closer to ``1.0`` the slower t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 901b5215869..a42130f3296 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -12,18 +12,18 @@ InputEventMIDI **Inherits:** :ref:`InputEvent<class_InputEvent>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Represents an input event from a MIDI device, such as a piano. +Represents a MIDI message from a MIDI device, such as a musical keyboard. .. rst-class:: classref-introduction-group Description ----------- -InputEventMIDI allows receiving input events from MIDI (Musical Instrument Digital Interface) devices such as a piano. +InputEventMIDI stores information about messages from `MIDI <https://en.wikipedia.org/wiki/MIDI>`__ (Musical Instrument Digital Interface) devices. These may include musical keyboards, synthesizers, and drum machines. -MIDI signals can be sent over a 5-pin MIDI connector or over USB, if your device supports both be sure to check the settings in the device to see which output it's using. +MIDI messages can be received over a 5-pin MIDI connector or over USB. If your device supports both be sure to check the settings in the device to see which output it is using. -To receive input events from MIDI devices, you need to call :ref:`OS.open_midi_inputs<class_OS_method_open_midi_inputs>`. You can check which devices are detected using :ref:`OS.get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>`. +By default, Godot does not detect MIDI devices. You need to call :ref:`OS.open_midi_inputs<class_OS_method_open_midi_inputs>`, first. You can check which devices are detected with :ref:`OS.get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>`, and close the connection with :ref:`OS.close_midi_inputs<class_OS_method_close_midi_inputs>`. .. tabs:: @@ -38,16 +38,16 @@ To receive input events from MIDI devices, you need to call :ref:`OS.open_midi_i if input_event is InputEventMIDI: _print_midi_info(input_event) - func _print_midi_info(midi_event: InputEventMIDI): + func _print_midi_info(midi_event): print(midi_event) - print("Channel " + str(midi_event.channel)) - print("Message " + str(midi_event.message)) - print("Pitch " + str(midi_event.pitch)) - print("Velocity " + str(midi_event.velocity)) - print("Instrument " + str(midi_event.instrument)) - print("Pressure " + str(midi_event.pressure)) - print("Controller number: " + str(midi_event.controller_number)) - print("Controller value: " + str(midi_event.controller_value)) + print("Channel ", midi_event.channel) + print("Message ", midi_event.message) + print("Pitch ", midi_event.pitch) + print("Velocity ", midi_event.velocity) + print("Instrument ", midi_event.instrument) + print("Pressure ", midi_event.pressure) + print("Controller number: ", midi_event.controller_number) + print("Controller value: ", midi_event.controller_value) .. code-tab:: csharp @@ -57,15 +57,15 @@ To receive input events from MIDI devices, you need to call :ref:`OS.open_midi_i GD.Print(OS.GetConnectedMidiInputs()); } - public override void _Input(InputEvent @event) + public override void _Input(InputEvent inputEvent) { - if (@event is InputEventMIDI midiEvent) + if (inputEvent is InputEventMidi midiEvent) { PrintMIDIInfo(midiEvent); } } - private void PrintMIDIInfo(InputEventMIDI midiEvent) + private void PrintMIDIInfo(InputEventMidi midiEvent) { GD.Print(midiEvent); GD.Print($"Channel {midiEvent.Channel}"); @@ -80,7 +80,7 @@ To receive input events from MIDI devices, you need to call :ref:`OS.open_midi_i -Note that Godot does not currently support MIDI output, so there is no way to emit MIDI signals from Godot. Only MIDI input works. +\ **Note:** Godot does not support MIDI output, so there is no way to emit MIDI messages from Godot. Only MIDI input is supported. .. rst-class:: classref-introduction-group @@ -132,14 +132,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **channel** = ``0`` +:ref:`int<class_int>` **channel** = ``0`` :ref:`🔗<class_InputEventMIDI_property_channel>` .. rst-class:: classref-property-setget -- void **set_channel** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_channel** **(** **)** +- |void| **set_channel**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_channel**\ (\ ) -The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments. +The MIDI channel of this message, ranging from ``0`` to ``15``. MIDI channel ``9`` is reserved for percussion instruments. .. rst-class:: classref-item-separator @@ -149,14 +149,14 @@ The MIDI channel of this input event. There are 16 channels, so this value range .. rst-class:: classref-property -:ref:`int<class_int>` **controller_number** = ``0`` +:ref:`int<class_int>` **controller_number** = ``0`` :ref:`🔗<class_InputEventMIDI_property_controller_number>` .. rst-class:: classref-property-setget -- void **set_controller_number** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_controller_number** **(** **)** +- |void| **set_controller_number**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_controller_number**\ (\ ) -If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE>`, this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers. +The unique number of the controller, if :ref:`message<class_InputEventMIDI_property_message>` is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE>`, otherwise this is ``0``. This value can be used to identify sliders for volume, balance, and panning, as well as switches and pedals on the MIDI device. See the `General MIDI specification <https://en.wikipedia.org/wiki/General_MIDI#Controller_events>`__ for a small list. .. rst-class:: classref-item-separator @@ -166,14 +166,14 @@ If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalSc .. rst-class:: classref-property -:ref:`int<class_int>` **controller_value** = ``0`` +:ref:`int<class_int>` **controller_value** = ``0`` :ref:`🔗<class_InputEventMIDI_property_controller_value>` .. rst-class:: classref-property-setget -- void **set_controller_value** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_controller_value** **(** **)** +- |void| **set_controller_value**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_controller_value**\ (\ ) -If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE>`, this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers. +The value applied to the controller. If :ref:`message<class_InputEventMIDI_property_message>` is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalScope_constant_MIDI_MESSAGE_CONTROL_CHANGE>`, this value ranges from ``0`` to ``127``, otherwise it is ``0``. See also :ref:`controller_value<class_InputEventMIDI_property_controller_value>`. .. rst-class:: classref-item-separator @@ -183,14 +183,16 @@ If the message is :ref:`@GlobalScope.MIDI_MESSAGE_CONTROL_CHANGE<class_@GlobalSc .. rst-class:: classref-property -:ref:`int<class_int>` **instrument** = ``0`` +:ref:`int<class_int>` **instrument** = ``0`` :ref:`🔗<class_InputEventMIDI_property_instrument>` .. rst-class:: classref-property-setget -- void **set_instrument** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_instrument** **(** **)** +- |void| **set_instrument**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_instrument**\ (\ ) -The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0. +The instrument (also called *program* or *preset*) used on this MIDI message. This value ranges from ``0`` to ``127``. + +To see what each value means, refer to the `General MIDI's instrument list <https://en.wikipedia.org/wiki/General_MIDI#Program_change_events>`__. Keep in mind that the list is off by 1 because it does not begin from 0. A value of ``0`` corresponds to the acoustic grand piano. .. rst-class:: classref-item-separator @@ -200,22 +202,16 @@ The instrument of this input event. This value ranges from 0 to 127. Refer to th .. rst-class:: classref-property -:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **message** = ``0`` +:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **message** = ``0`` :ref:`🔗<class_InputEventMIDI_property_message>` .. rst-class:: classref-property-setget -- void **set_message** **(** :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` value **)** -- :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **get_message** **(** **)** - -Returns a value indicating the type of message for this MIDI signal. This is a member of the :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` enum. - -For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is. - -Notes will return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` when activated, but they might not always return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>` when deactivated, therefore your code should treat the input as stopped if some period of time has passed. +- |void| **set_message**\ (\ value\: :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>`\ ) +- :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **get_message**\ (\ ) -Some MIDI devices may send :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with zero velocity instead of :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>`. +Represents the type of MIDI message (see the :ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` enum). -For more information, see the note in :ref:`velocity<class_InputEventMIDI_property_velocity>` and the MIDI message status byte list chart linked above. +For more information, see the `MIDI message status byte list chart <https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes>`__. .. rst-class:: classref-item-separator @@ -225,14 +221,16 @@ For more information, see the note in :ref:`velocity<class_InputEventMIDI_proper .. rst-class:: classref-property -:ref:`int<class_int>` **pitch** = ``0`` +:ref:`int<class_int>` **pitch** = ``0`` :ref:`🔗<class_InputEventMIDI_property_pitch>` .. rst-class:: classref-property-setget -- void **set_pitch** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_pitch** **(** **)** +- |void| **set_pitch**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_pitch**\ (\ ) -The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the "MIDI note" column of the piano key frequency chart on Wikipedia for more information. +The pitch index number of this MIDI message. This value ranges from ``0`` to ``127``. + +On a piano, the **middle C** is ``60``, followed by a **C-sharp** (``61``), then a **D** (``62``), and so on. Each octave is split in offsets of 12. See the "MIDI note number" column of the `piano key frequency chart <https://en.wikipedia.org/wiki/Piano_key_frequencies>`__ a full list. .. rst-class:: classref-item-separator @@ -242,14 +240,16 @@ The pitch index number of this MIDI signal. This value ranges from 0 to 127. On .. rst-class:: classref-property -:ref:`int<class_int>` **pressure** = ``0`` +:ref:`int<class_int>` **pressure** = ``0`` :ref:`🔗<class_InputEventMIDI_property_pressure>` .. rst-class:: classref-property-setget -- void **set_pressure** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_pressure** **(** **)** +- |void| **set_pressure**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_pressure**\ (\ ) + +The strength of the key being pressed. This value ranges from ``0`` to ``127``. -The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero. +\ **Note:** For many devices, this value is always ``0``. Other devices such as musical keyboards may simulate pressure by changing the :ref:`velocity<class_InputEventMIDI_property_velocity>`, instead. .. rst-class:: classref-item-separator @@ -259,16 +259,23 @@ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devic .. rst-class:: classref-property -:ref:`int<class_int>` **velocity** = ``0`` +:ref:`int<class_int>` **velocity** = ``0`` :ref:`🔗<class_InputEventMIDI_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_velocity**\ (\ ) + +The velocity of the MIDI message. This value ranges from ``0`` to ``127``. For a musical keyboard, this corresponds to how quickly the key was pressed, and is rarely above ``110`` in practice. + +\ **Note:** Some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` message with ``0`` velocity and expect it to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>` message. If necessary, this can be handled with a few lines of code: -The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. +:: -\ **Note:** Some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>` message, but device implementations vary so Godot reports event data exactly as received. Depending on the hardware and the needs of the game/app, this MIDI quirk can be handled robustly with a couple lines of script (check for :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with velocity zero). + func _input(event): + if event is InputEventMIDI: + if event.message == MIDI_MESSAGE_NOTE_ON and event.velocity > 0: + print("Note pressed!") .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -277,3 +284,4 @@ The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventmouse.rst b/classes/class_inputeventmouse.rst index cb9152f196c..2f821ea7482 100644 --- a/classes/class_inputeventmouse.rst +++ b/classes/class_inputeventmouse.rst @@ -39,7 +39,7 @@ Properties :widths: auto +-------------------------------------------------------------------------+------------------------------------------------------------------------+-------------------+ - | |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> | :ref:`button_mask<class_InputEventMouse_property_button_mask>` | ``0`` | + | |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] | :ref:`button_mask<class_InputEventMouse_property_button_mask>` | ``0`` | +-------------------------------------------------------------------------+------------------------------------------------------------------------+-------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`global_position<class_InputEventMouse_property_global_position>` | ``Vector2(0, 0)`` | +-------------------------------------------------------------------------+------------------------------------------------------------------------+-------------------+ @@ -59,12 +59,12 @@ Property Descriptions .. rst-class:: classref-property -|bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> **button_mask** = ``0`` +|bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **button_mask** = ``0`` :ref:`🔗<class_InputEventMouse_property_button_mask>` .. rst-class:: classref-property-setget -- void **set_button_mask** **(** |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> value **)** -- |bitfield|\<:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\> **get_button_mask** **(** **)** +- |void| **set_button_mask**\ (\ value\: |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\]\ ) +- |bitfield|\[:ref:`MouseButtonMask<enum_@GlobalScope_MouseButtonMask>`\] **get_button_mask**\ (\ ) The mouse button mask identifier, one of or a bitwise combination of the :ref:`MouseButton<enum_@GlobalScope_MouseButton>` button masks. @@ -76,16 +76,16 @@ The mouse button mask identifier, one of or a bitwise combination of the :ref:`M .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **global_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **global_position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouse_property_global_position>` .. rst-class:: classref-property-setget -- void **set_global_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_global_position** **(** **)** +- |void| **set_global_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_global_position**\ (\ ) -When received in :ref:`Node._input<class_Node_method__input>` or :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`, returns the mouse's position in the root :ref:`Viewport<class_Viewport>` using the coordinate system of the root :ref:`Viewport<class_Viewport>`. +When received in :ref:`Node._input<class_Node_private_method__input>` or :ref:`Node._unhandled_input<class_Node_private_method__unhandled_input>`, returns the mouse's position in the root :ref:`Viewport<class_Viewport>` using the coordinate system of the root :ref:`Viewport<class_Viewport>`. -When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, returns the mouse's position in the :ref:`CanvasLayer<class_CanvasLayer>` that the :ref:`Control<class_Control>` is in using the coordinate system of the :ref:`CanvasLayer<class_CanvasLayer>`. +When received in :ref:`Control._gui_input<class_Control_private_method__gui_input>`, returns the mouse's position in the :ref:`CanvasLayer<class_CanvasLayer>` that the :ref:`Control<class_Control>` is in using the coordinate system of the :ref:`CanvasLayer<class_CanvasLayer>`. .. rst-class:: classref-item-separator @@ -95,16 +95,16 @@ When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, ret .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouse_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) -When received in :ref:`Node._input<class_Node_method__input>` or :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`, returns the mouse's position in the :ref:`Viewport<class_Viewport>` this :ref:`Node<class_Node>` is in using the coordinate system of this :ref:`Viewport<class_Viewport>`. +When received in :ref:`Node._input<class_Node_private_method__input>` or :ref:`Node._unhandled_input<class_Node_private_method__unhandled_input>`, returns the mouse's position in the :ref:`Viewport<class_Viewport>` this :ref:`Node<class_Node>` is in using the coordinate system of this :ref:`Viewport<class_Viewport>`. -When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, returns the mouse's position in the :ref:`Control<class_Control>` using the local coordinate system of the :ref:`Control<class_Control>`. +When received in :ref:`Control._gui_input<class_Control_private_method__gui_input>`, returns the mouse's position in the :ref:`Control<class_Control>` using the local coordinate system of the :ref:`Control<class_Control>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -113,3 +113,4 @@ When received in :ref:`Control._gui_input<class_Control_method__gui_input>`, ret .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index fa3f8c3b6a9..10ab963470f 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: click, press + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -19,7 +22,9 @@ Represents a mouse button being pressed or released. Description ----------- -Stores information about mouse click events. See :ref:`Node._input<class_Node_method__input>`. +Stores information about mouse click events. See :ref:`Node._input<class_Node_private_method__input>`. + +\ **Note:** On Wear OS devices, rotary input is mapped to :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_UP<class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_UP>` and :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_DOWN<class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_DOWN>`. This can be changed to :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_LEFT<class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_LEFT>` and :ref:`@GlobalScope.MOUSE_BUTTON_WHEEL_RIGHT<class_@GlobalScope_constant_MOUSE_BUTTON_WHEEL_RIGHT>` with the :ref:`ProjectSettings.input_devices/pointing/android/rotary_input_scroll_axis<class_ProjectSettings_property_input_devices/pointing/android/rotary_input_scroll_axis>` setting. .. rst-class:: classref-introduction-group @@ -63,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`MouseButton<enum_@GlobalScope_MouseButton>` **button_index** = ``0`` +:ref:`MouseButton<enum_@GlobalScope_MouseButton>` **button_index** = ``0`` :ref:`🔗<class_InputEventMouseButton_property_button_index>` .. rst-class:: classref-property-setget -- void **set_button_index** **(** :ref:`MouseButton<enum_@GlobalScope_MouseButton>` value **)** -- :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **get_button_index** **(** **)** +- |void| **set_button_index**\ (\ value\: :ref:`MouseButton<enum_@GlobalScope_MouseButton>`\ ) +- :ref:`MouseButton<enum_@GlobalScope_MouseButton>` **get_button_index**\ (\ ) The mouse button identifier, one of the :ref:`MouseButton<enum_@GlobalScope_MouseButton>` button or button wheel constants. @@ -80,12 +85,12 @@ The mouse button identifier, one of the :ref:`MouseButton<enum_@GlobalScope_Mous .. rst-class:: classref-property -:ref:`bool<class_bool>` **canceled** = ``false`` +:ref:`bool<class_bool>` **canceled** = ``false`` :ref:`🔗<class_InputEventMouseButton_property_canceled>` .. rst-class:: classref-property-setget -- void **set_canceled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_canceled** **(** **)** +- |void| **set_canceled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_canceled**\ (\ ) If ``true``, the mouse button event has been canceled. @@ -97,12 +102,12 @@ If ``true``, the mouse button event has been canceled. .. rst-class:: classref-property -:ref:`bool<class_bool>` **double_click** = ``false`` +:ref:`bool<class_bool>` **double_click** = ``false`` :ref:`🔗<class_InputEventMouseButton_property_double_click>` .. rst-class:: classref-property-setget -- void **set_double_click** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_double_click** **(** **)** +- |void| **set_double_click**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_double_click**\ (\ ) If ``true``, the mouse button's state is a double-click. @@ -114,12 +119,12 @@ If ``true``, the mouse button's state is a double-click. .. rst-class:: classref-property -:ref:`float<class_float>` **factor** = ``1.0`` +:ref:`float<class_float>` **factor** = ``1.0`` :ref:`🔗<class_InputEventMouseButton_property_factor>` .. rst-class:: classref-property-setget -- void **set_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_factor** **(** **)** +- |void| **set_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_factor**\ (\ ) The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be ``0`` if not supported. @@ -131,12 +136,12 @@ The amount (or delta) of the event. When used for high-precision scroll events, .. rst-class:: classref-property -:ref:`bool<class_bool>` **pressed** = ``false`` +:ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventMouseButton_property_pressed>` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pressed**\ (\ ) If ``true``, the mouse button's state is pressed. If ``false``, the mouse button's state is released. @@ -147,3 +152,4 @@ If ``true``, the mouse button's state is pressed. If ``false``, the mouse button .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventmousemotion.rst b/classes/class_inputeventmousemotion.rst index aba8239dbeb..c2a16ef66fb 100644 --- a/classes/class_inputeventmousemotion.rst +++ b/classes/class_inputeventmousemotion.rst @@ -19,7 +19,7 @@ Represents a mouse or a pen movement. Description ----------- -Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See :ref:`Node._input<class_Node_method__input>`. +Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See :ref:`Node._input<class_Node_private_method__input>`. \ **Note:** By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set :ref:`Input.use_accumulated_input<class_Input_property_use_accumulated_input>` to ``false`` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing `Bresenham's line algorithm <https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm>`__ as well to avoid visible gaps in lines if the user is moving the mouse quickly. @@ -32,7 +32,7 @@ Tutorials - :doc:`Mouse and input coordinates <../tutorials/inputs/mouse_and_input_coordinates>` -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -42,17 +42,21 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventMouseMotion_property_pen_inverted>` | ``false`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`float<class_float>` | :ref:`pressure<class_InputEventMouseMotion_property_pressure>` | ``0.0`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventMouseMotion_property_relative>` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventMouseMotion_property_tilt>` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventMouseMotion_property_velocity>` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventMouseMotion_property_pen_inverted>` | ``false`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`float<class_float>` | :ref:`pressure<class_InputEventMouseMotion_property_pressure>` | ``0.0`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventMouseMotion_property_relative>` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`screen_relative<class_InputEventMouseMotion_property_screen_relative>` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`screen_velocity<class_InputEventMouseMotion_property_screen_velocity>` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventMouseMotion_property_tilt>` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventMouseMotion_property_velocity>` | ``Vector2(0, 0)`` | + +-------------------------------+------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -67,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **pen_inverted** = ``false`` +:ref:`bool<class_bool>` **pen_inverted** = ``false`` :ref:`🔗<class_InputEventMouseMotion_property_pen_inverted>` .. rst-class:: classref-property-setget -- void **set_pen_inverted** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_pen_inverted** **(** **)** +- |void| **set_pen_inverted**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_pen_inverted**\ (\ ) Returns ``true`` when using the eraser end of a stylus pen. @@ -86,12 +90,12 @@ Returns ``true`` when using the eraser end of a stylus pen. .. rst-class:: classref-property -:ref:`float<class_float>` **pressure** = ``0.0`` +:ref:`float<class_float>` **pressure** = ``0.0`` :ref:`🔗<class_InputEventMouseMotion_property_pressure>` .. rst-class:: classref-property-setget -- void **set_pressure** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pressure** **(** **)** +- |void| **set_pressure**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pressure**\ (\ ) Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0``. @@ -103,17 +107,55 @@ Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0`` .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouseMotion_property_relative>` .. rst-class:: classref-property-setget -- void **set_relative** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_relative** **(** **)** +- |void| **set_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_relative**\ (\ ) The mouse position relative to the previous position (position at the last frame). \ **Note:** Since **InputEventMouseMotion** is only emitted when the mouse moves, the last event won't have a relative position of ``Vector2(0, 0)`` when the user stops moving the mouse. +\ **Note:** :ref:`relative<class_InputEventMouseMotion_property_relative>` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using :ref:`relative<class_InputEventMouseMotion_property_relative>` in a script that handles mouse aiming with the :ref:`Input.MOUSE_MODE_CAPTURED<class_Input_constant_MOUSE_MODE_CAPTURED>` mouse mode. To avoid this, use :ref:`screen_relative<class_InputEventMouseMotion_property_screen_relative>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_InputEventMouseMotion_property_screen_relative: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **screen_relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouseMotion_property_screen_relative>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_screen_relative**\ (\ ) + +The unscaled mouse position relative to the previous position in the coordinate system of the screen (position at the last frame). + +\ **Note:** Since **InputEventMouseMotion** is only emitted when the mouse moves, the last event won't have a relative position of ``Vector2(0, 0)`` when the user stops moving the mouse. This coordinate is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by<class_InputEvent_method_xformed_by>`. This should be preferred over :ref:`relative<class_InputEventMouseMotion_property_relative>` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED<class_Input_constant_MOUSE_MODE_CAPTURED>` mouse mode, regardless of the project's stretch mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_InputEventMouseMotion_property_screen_velocity: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **screen_velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouseMotion_property_screen_velocity>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_screen_velocity**\ (\ ) + +The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by<class_InputEvent_method_xformed_by>`. This should be preferred over :ref:`velocity<class_InputEventMouseMotion_property_velocity>` for mouse aiming when using the :ref:`Input.MOUSE_MODE_CAPTURED<class_Input_constant_MOUSE_MODE_CAPTURED>` mouse mode, regardless of the project's stretch mode. + .. rst-class:: classref-item-separator ---- @@ -122,12 +164,12 @@ The mouse position relative to the previous position (position at the last frame .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouseMotion_property_tilt>` .. rst-class:: classref-property-setget -- void **set_tilt** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_tilt** **(** **)** +- |void| **set_tilt**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_tilt**\ (\ ) Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from ``-1.0`` to ``1.0`` for both axes. @@ -139,15 +181,17 @@ Represents the angles of tilt of the pen. Positive X-coordinate value indicates .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventMouseMotion_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ ) The mouse velocity in pixels per second. +\ **Note:** :ref:`velocity<class_InputEventMouseMotion_property_velocity>` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using :ref:`velocity<class_InputEventMouseMotion_property_velocity>` in a script that handles mouse aiming with the :ref:`Input.MOUSE_MODE_CAPTURED<class_Input_constant_MOUSE_MODE_CAPTURED>` mouse mode. To avoid this, use :ref:`screen_velocity<class_InputEventMouseMotion_property_screen_velocity>` instead. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -155,3 +199,4 @@ The mouse velocity in pixels per second. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventpangesture.rst b/classes/class_inputeventpangesture.rst index 450f9c155f6..c229fe51da4 100644 --- a/classes/class_inputeventpangesture.rst +++ b/classes/class_inputeventpangesture.rst @@ -21,6 +21,8 @@ Description Stores information about pan gestures. A pan gesture is performed when the user swipes the touch screen with two fingers. It's typically used for panning/scrolling. +\ **Note:** On Android, this requires the :ref:`ProjectSettings.input_devices/pointing/android/enable_pan_and_scale_gestures<class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures>` project setting to be enabled. + .. rst-class:: classref-introduction-group Tutorials @@ -53,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **delta** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **delta** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventPanGesture_property_delta>` .. rst-class:: classref-property-setget -- void **set_delta** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_delta** **(** **)** +- |void| **set_delta**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_delta**\ (\ ) Panning amount since last pan event. @@ -69,3 +71,4 @@ Panning amount since last pan event. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventscreendrag.rst b/classes/class_inputeventscreendrag.rst index eed293817ba..8f73f9c2b28 100644 --- a/classes/class_inputeventscreendrag.rst +++ b/classes/class_inputeventscreendrag.rst @@ -19,7 +19,7 @@ Represents a screen drag event. Description ----------- -Stores information about screen drag events. See :ref:`Node._input<class_Node_method__input>`. +Stores information about screen drag events. See :ref:`Node._input<class_Node_private_method__input>`. .. rst-class:: classref-introduction-group @@ -36,21 +36,25 @@ Properties .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`int<class_int>` | :ref:`index<class_InputEventScreenDrag_property_index>` | ``0`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventScreenDrag_property_pen_inverted>` | ``false`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenDrag_property_position>` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`float<class_float>` | :ref:`pressure<class_InputEventScreenDrag_property_pressure>` | ``0.0`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventScreenDrag_property_relative>` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventScreenDrag_property_tilt>` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventScreenDrag_property_velocity>` | ``Vector2(0, 0)`` | - +-------------------------------+-----------------------------------------------------------------------+-------------------+ + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`int<class_int>` | :ref:`index<class_InputEventScreenDrag_property_index>` | ``0`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`pen_inverted<class_InputEventScreenDrag_property_pen_inverted>` | ``false`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`position<class_InputEventScreenDrag_property_position>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`float<class_float>` | :ref:`pressure<class_InputEventScreenDrag_property_pressure>` | ``0.0`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`relative<class_InputEventScreenDrag_property_relative>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`screen_relative<class_InputEventScreenDrag_property_screen_relative>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`screen_velocity<class_InputEventScreenDrag_property_screen_velocity>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`tilt<class_InputEventScreenDrag_property_tilt>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_InputEventScreenDrag_property_velocity>` | ``Vector2(0, 0)`` | + +-------------------------------+-----------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -65,12 +69,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **index** = ``0`` +:ref:`int<class_int>` **index** = ``0`` :ref:`🔗<class_InputEventScreenDrag_property_index>` .. rst-class:: classref-property-setget -- void **set_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_index** **(** **)** +- |void| **set_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_index**\ (\ ) The drag event index in the case of a multi-drag event. @@ -82,12 +86,12 @@ The drag event index in the case of a multi-drag event. .. rst-class:: classref-property -:ref:`bool<class_bool>` **pen_inverted** = ``false`` +:ref:`bool<class_bool>` **pen_inverted** = ``false`` :ref:`🔗<class_InputEventScreenDrag_property_pen_inverted>` .. rst-class:: classref-property-setget -- void **set_pen_inverted** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_pen_inverted** **(** **)** +- |void| **set_pen_inverted**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_pen_inverted**\ (\ ) Returns ``true`` when using the eraser end of a stylus pen. @@ -99,14 +103,14 @@ Returns ``true`` when using the eraser end of a stylus pen. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) -The drag position. +The drag position in the viewport the node is in, using the coordinate system of this viewport. .. rst-class:: classref-item-separator @@ -116,12 +120,12 @@ The drag position. .. rst-class:: classref-property -:ref:`float<class_float>` **pressure** = ``0.0`` +:ref:`float<class_float>` **pressure** = ``0.0`` :ref:`🔗<class_InputEventScreenDrag_property_pressure>` .. rst-class:: classref-property-setget -- void **set_pressure** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pressure** **(** **)** +- |void| **set_pressure**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pressure**\ (\ ) Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0``. @@ -133,15 +137,51 @@ Represents the pressure the user puts on the pen. Ranges from ``0.0`` to ``1.0`` .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_relative>` .. rst-class:: classref-property-setget -- void **set_relative** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_relative** **(** **)** +- |void| **set_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_relative**\ (\ ) The drag position relative to the previous position (position at the last frame). +\ **Note:** :ref:`relative<class_InputEventScreenDrag_property_relative>` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using :ref:`relative<class_InputEventScreenDrag_property_relative>` in a script that handles touch aiming. To avoid this, use :ref:`screen_relative<class_InputEventScreenDrag_property_screen_relative>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_InputEventScreenDrag_property_screen_relative: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **screen_relative** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_screen_relative>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_relative**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_screen_relative**\ (\ ) + +The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by<class_InputEvent_method_xformed_by>`. This should be preferred over :ref:`relative<class_InputEventScreenDrag_property_relative>` for touch aiming regardless of the project's stretch mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_InputEventScreenDrag_property_screen_velocity: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **screen_velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_screen_velocity>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_screen_velocity**\ (\ ) + +The unscaled drag velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to :ref:`InputEvent.xformed_by<class_InputEvent_method_xformed_by>`. This should be preferred over :ref:`velocity<class_InputEventScreenDrag_property_velocity>` for touch aiming regardless of the project's stretch mode. + .. rst-class:: classref-item-separator ---- @@ -150,12 +190,12 @@ The drag position relative to the previous position (position at the last frame) .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **tilt** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_tilt>` .. rst-class:: classref-property-setget -- void **set_tilt** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_tilt** **(** **)** +- |void| **set_tilt**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_tilt**\ (\ ) Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from ``-1.0`` to ``1.0`` for both axes. @@ -167,15 +207,17 @@ Represents the angles of tilt of the pen. Positive X-coordinate value indicates .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenDrag_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ ) The drag velocity. +\ **Note:** :ref:`velocity<class_InputEventScreenDrag_property_velocity>` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using :ref:`velocity<class_InputEventScreenDrag_property_velocity>` in a script that handles touch aiming. To avoid this, use :ref:`screen_velocity<class_InputEventScreenDrag_property_screen_velocity>` instead. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -183,3 +225,4 @@ The drag velocity. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index c7e4ee170c5..7433de280fa 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -61,12 +61,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **canceled** = ``false`` +:ref:`bool<class_bool>` **canceled** = ``false`` :ref:`🔗<class_InputEventScreenTouch_property_canceled>` .. rst-class:: classref-property-setget -- void **set_canceled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_canceled** **(** **)** +- |void| **set_canceled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_canceled**\ (\ ) If ``true``, the touch event has been canceled. @@ -78,12 +78,12 @@ If ``true``, the touch event has been canceled. .. rst-class:: classref-property -:ref:`bool<class_bool>` **double_tap** = ``false`` +:ref:`bool<class_bool>` **double_tap** = ``false`` :ref:`🔗<class_InputEventScreenTouch_property_double_tap>` .. rst-class:: classref-property-setget -- void **set_double_tap** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_double_tap** **(** **)** +- |void| **set_double_tap**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_double_tap**\ (\ ) If ``true``, the touch's state is a double tap. @@ -95,12 +95,12 @@ If ``true``, the touch's state is a double tap. .. rst-class:: classref-property -:ref:`int<class_int>` **index** = ``0`` +:ref:`int<class_int>` **index** = ``0`` :ref:`🔗<class_InputEventScreenTouch_property_index>` .. rst-class:: classref-property-setget -- void **set_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_index** **(** **)** +- |void| **set_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_index**\ (\ ) The touch index in the case of a multi-touch event. One index = one finger. @@ -112,14 +112,14 @@ The touch index in the case of a multi-touch event. One index = one finger. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_InputEventScreenTouch_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) -The touch position, in screen (global) coordinates. +The touch position in the viewport the node is in, using the coordinate system of this viewport. .. rst-class:: classref-item-separator @@ -129,12 +129,12 @@ The touch position, in screen (global) coordinates. .. rst-class:: classref-property -:ref:`bool<class_bool>` **pressed** = ``false`` +:ref:`bool<class_bool>` **pressed** = ``false`` :ref:`🔗<class_InputEventScreenTouch_property_pressed>` .. rst-class:: classref-property-setget -- void **set_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pressed** **(** **)** +- |void| **set_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pressed**\ (\ ) If ``true``, the touch's state is pressed. If ``false``, the touch's state is released. @@ -145,3 +145,4 @@ If ``true``, the touch's state is pressed. If ``false``, the touch's state is re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventshortcut.rst b/classes/class_inputeventshortcut.rst index 845fdeddffc..8a1170f1f5d 100644 --- a/classes/class_inputeventshortcut.rst +++ b/classes/class_inputeventshortcut.rst @@ -19,7 +19,7 @@ Represents a triggered keyboard :ref:`Shortcut<class_Shortcut>`. Description ----------- -InputEventShortcut is a special event that can be received in :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input<class_Viewport_method_push_input>`. +InputEventShortcut is a special event that can be received in :ref:`Node._unhandled_key_input<class_Node_private_method__unhandled_key_input>`. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using :ref:`Viewport.push_input<class_Viewport_method_push_input>`. .. rst-class:: classref-reftable-group @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Shortcut<class_Shortcut>` **shortcut** +:ref:`Shortcut<class_Shortcut>` **shortcut** :ref:`🔗<class_InputEventShortcut_property_shortcut>` .. rst-class:: classref-property-setget -- void **set_shortcut** **(** :ref:`Shortcut<class_Shortcut>` value **)** -- :ref:`Shortcut<class_Shortcut>` **get_shortcut** **(** **)** +- |void| **set_shortcut**\ (\ value\: :ref:`Shortcut<class_Shortcut>`\ ) +- :ref:`Shortcut<class_Shortcut>` **get_shortcut**\ (\ ) The :ref:`Shortcut<class_Shortcut>` represented by this event. Its :ref:`Shortcut.matches_event<class_Shortcut_method_matches_event>` method will always return ``true`` for this event. @@ -62,3 +62,4 @@ The :ref:`Shortcut<class_Shortcut>` represented by this event. Its :ref:`Shortcu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputeventwithmodifiers.rst b/classes/class_inputeventwithmodifiers.rst index d01dcda82e6..51bad3bd495 100644 --- a/classes/class_inputeventwithmodifiers.rst +++ b/classes/class_inputeventwithmodifiers.rst @@ -21,7 +21,7 @@ Abstract base class for input events affected by modifier keys like :kbd:`Shift` Description ----------- -Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input<class_Node_method__input>`. +Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as :kbd:`Shift` or :kbd:`Alt`. See :ref:`Node._input<class_Node_private_method__input>`. .. rst-class:: classref-introduction-group @@ -58,11 +58,11 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\> | :ref:`get_modifiers_mask<class_InputEventWithModifiers_method_get_modifiers_mask>` **(** **)** |const| | - +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_command_or_control_pressed<class_InputEventWithModifiers_method_is_command_or_control_pressed>` **(** **)** |const| | - +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\] | :ref:`get_modifiers_mask<class_InputEventWithModifiers_method_get_modifiers_mask>`\ (\ ) |const| | + +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_command_or_control_pressed<class_InputEventWithModifiers_method_is_command_or_control_pressed>`\ (\ ) |const| | + +-------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,12 +77,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **alt_pressed** = ``false`` +:ref:`bool<class_bool>` **alt_pressed** = ``false`` :ref:`🔗<class_InputEventWithModifiers_property_alt_pressed>` .. rst-class:: classref-property-setget -- void **set_alt_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_alt_pressed** **(** **)** +- |void| **set_alt_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_alt_pressed**\ (\ ) State of the :kbd:`Alt` modifier. @@ -94,14 +94,14 @@ State of the :kbd:`Alt` modifier. .. rst-class:: classref-property -:ref:`bool<class_bool>` **command_or_control_autoremap** = ``false`` +:ref:`bool<class_bool>` **command_or_control_autoremap** = ``false`` :ref:`🔗<class_InputEventWithModifiers_property_command_or_control_autoremap>` .. rst-class:: classref-property-setget -- void **set_command_or_control_autoremap** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_command_or_control_autoremap** **(** **)** +- |void| **set_command_or_control_autoremap**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_command_or_control_autoremap**\ (\ ) -Automatically use :kbd:`Meta` (:kbd:`Command`) on macOS and :kbd:`Ctrl` on other platforms. If ``true``, :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` and :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` cannot be set. +Automatically use :kbd:`Meta` (:kbd:`Cmd`) on macOS and :kbd:`Ctrl` on other platforms. If ``true``, :ref:`ctrl_pressed<class_InputEventWithModifiers_property_ctrl_pressed>` and :ref:`meta_pressed<class_InputEventWithModifiers_property_meta_pressed>` cannot be set. .. rst-class:: classref-item-separator @@ -111,12 +111,12 @@ Automatically use :kbd:`Meta` (:kbd:`Command`) on macOS and :kbd:`Ctrl` on other .. rst-class:: classref-property -:ref:`bool<class_bool>` **ctrl_pressed** = ``false`` +:ref:`bool<class_bool>` **ctrl_pressed** = ``false`` :ref:`🔗<class_InputEventWithModifiers_property_ctrl_pressed>` .. rst-class:: classref-property-setget -- void **set_ctrl_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ctrl_pressed** **(** **)** +- |void| **set_ctrl_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ctrl_pressed**\ (\ ) State of the :kbd:`Ctrl` modifier. @@ -128,12 +128,12 @@ State of the :kbd:`Ctrl` modifier. .. rst-class:: classref-property -:ref:`bool<class_bool>` **meta_pressed** = ``false`` +:ref:`bool<class_bool>` **meta_pressed** = ``false`` :ref:`🔗<class_InputEventWithModifiers_property_meta_pressed>` .. rst-class:: classref-property-setget -- void **set_meta_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_meta_pressed** **(** **)** +- |void| **set_meta_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_meta_pressed**\ (\ ) State of the :kbd:`Meta` modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key. @@ -145,12 +145,12 @@ State of the :kbd:`Meta` modifier. On Windows and Linux, this represents the Win .. rst-class:: classref-property -:ref:`bool<class_bool>` **shift_pressed** = ``false`` +:ref:`bool<class_bool>` **shift_pressed** = ``false`` :ref:`🔗<class_InputEventWithModifiers_property_shift_pressed>` .. rst-class:: classref-property-setget -- void **set_shift_pressed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shift_pressed** **(** **)** +- |void| **set_shift_pressed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shift_pressed**\ (\ ) State of the :kbd:`Shift` modifier. @@ -167,7 +167,7 @@ Method Descriptions .. rst-class:: classref-method -|bitfield|\<:ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\> **get_modifiers_mask** **(** **)** |const| +|bitfield|\[:ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\] **get_modifiers_mask**\ (\ ) |const| :ref:`🔗<class_InputEventWithModifiers_method_get_modifiers_mask>` Returns the keycode combination of modifier keys. @@ -179,9 +179,9 @@ Returns the keycode combination of modifier keys. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_command_or_control_pressed** **(** **)** |const| +:ref:`bool<class_bool>` **is_command_or_control_pressed**\ (\ ) |const| :ref:`🔗<class_InputEventWithModifiers_method_is_command_or_control_pressed>` -On macOS, returns ``true`` if :kbd:`Meta` (:kbd:`Command`) is pressed. +On macOS, returns ``true`` if :kbd:`Meta` (:kbd:`Cmd`) is pressed. On other platforms, returns ``true`` if :kbd:`Ctrl` is pressed. @@ -192,3 +192,4 @@ On other platforms, returns ``true`` if :kbd:`Ctrl` is pressed. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_inputmap.rst b/classes/class_inputmap.rst index a0726412459..e28b63284fb 100644 --- a/classes/class_inputmap.rst +++ b/classes/class_inputmap.rst @@ -19,7 +19,7 @@ A singleton that manages all :ref:`InputEventAction<class_InputEventAction>`\ s. Description ----------- -Manages all :ref:`InputEventAction<class_InputEventAction>` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action<class_InputMap_method_add_action>` and :ref:`action_add_event<class_InputMap_method_action_add_event>`. See :ref:`Node._input<class_Node_method__input>`. +Manages all :ref:`InputEventAction<class_InputEventAction>` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with :ref:`add_action<class_InputMap_method_add_action>` and :ref:`action_add_event<class_InputMap_method_action_add_event>`. See :ref:`Node._input<class_Node_private_method__input>`. .. rst-class:: classref-introduction-group @@ -36,33 +36,33 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_add_event<class_InputMap_method_action_add_event>` **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_erase_event<class_InputMap_method_action_erase_event>` **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_erase_events<class_InputMap_method_action_erase_events>` **(** :ref:`StringName<class_StringName>` action **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`action_get_deadzone<class_InputMap_method_action_get_deadzone>` **(** :ref:`StringName<class_StringName>` action **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent[]<class_InputEvent>` | :ref:`action_get_events<class_InputMap_method_action_get_events>` **(** :ref:`StringName<class_StringName>` action **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`action_has_event<class_InputMap_method_action_has_event>` **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`action_set_deadzone<class_InputMap_method_action_set_deadzone>` **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` deadzone **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_action<class_InputMap_method_add_action>` **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` deadzone=0.5 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_action<class_InputMap_method_erase_action>` **(** :ref:`StringName<class_StringName>` action **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`event_is_action<class_InputMap_method_event_is_action>` **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`get_actions<class_InputMap_method_get_actions>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_action<class_InputMap_method_has_action>` **(** :ref:`StringName<class_StringName>` action **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`load_from_project_settings<class_InputMap_method_load_from_project_settings>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_add_event<class_InputMap_method_action_add_event>`\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_erase_event<class_InputMap_method_action_erase_event>`\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_erase_events<class_InputMap_method_action_erase_events>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`action_get_deadzone<class_InputMap_method_action_get_deadzone>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`InputEvent<class_InputEvent>`\] | :ref:`action_get_events<class_InputMap_method_action_get_events>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`action_has_event<class_InputMap_method_action_has_event>`\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`action_set_deadzone<class_InputMap_method_action_set_deadzone>`\ (\ action\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_action<class_InputMap_method_add_action>`\ (\ action\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = 0.5\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_action<class_InputMap_method_erase_action>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`event_is_action<class_InputMap_method_event_is_action>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`, action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_actions<class_InputMap_method_get_actions>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_action<class_InputMap_method_has_action>`\ (\ action\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`load_from_project_settings<class_InputMap_method_load_from_project_settings>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,7 +77,7 @@ Method Descriptions .. rst-class:: classref-method -void **action_add_event** **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** +|void| **action_add_event**\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_InputMap_method_action_add_event>` Adds an :ref:`InputEvent<class_InputEvent>` to an action. This :ref:`InputEvent<class_InputEvent>` will trigger the action. @@ -89,7 +89,7 @@ Adds an :ref:`InputEvent<class_InputEvent>` to an action. This :ref:`InputEvent< .. rst-class:: classref-method -void **action_erase_event** **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** +|void| **action_erase_event**\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_InputMap_method_action_erase_event>` Removes an :ref:`InputEvent<class_InputEvent>` from an action. @@ -101,7 +101,7 @@ Removes an :ref:`InputEvent<class_InputEvent>` from an action. .. rst-class:: classref-method -void **action_erase_events** **(** :ref:`StringName<class_StringName>` action **)** +|void| **action_erase_events**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_InputMap_method_action_erase_events>` Removes all events from an action. @@ -113,7 +113,7 @@ Removes all events from an action. .. rst-class:: classref-method -:ref:`float<class_float>` **action_get_deadzone** **(** :ref:`StringName<class_StringName>` action **)** +:ref:`float<class_float>` **action_get_deadzone**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_InputMap_method_action_get_deadzone>` Returns a deadzone value for the action. @@ -125,7 +125,7 @@ Returns a deadzone value for the action. .. rst-class:: classref-method -:ref:`InputEvent[]<class_InputEvent>` **action_get_events** **(** :ref:`StringName<class_StringName>` action **)** +:ref:`Array<class_Array>`\[:ref:`InputEvent<class_InputEvent>`\] **action_get_events**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_InputMap_method_action_get_events>` Returns an array of :ref:`InputEvent<class_InputEvent>`\ s associated with a given action. @@ -139,7 +139,7 @@ Returns an array of :ref:`InputEvent<class_InputEvent>`\ s associated with a giv .. rst-class:: classref-method -:ref:`bool<class_bool>` **action_has_event** **(** :ref:`StringName<class_StringName>` action, :ref:`InputEvent<class_InputEvent>` event **)** +:ref:`bool<class_bool>` **action_has_event**\ (\ action\: :ref:`StringName<class_StringName>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_InputMap_method_action_has_event>` Returns ``true`` if the action has the given :ref:`InputEvent<class_InputEvent>` associated with it. @@ -151,7 +151,7 @@ Returns ``true`` if the action has the given :ref:`InputEvent<class_InputEvent>` .. rst-class:: classref-method -void **action_set_deadzone** **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` deadzone **)** +|void| **action_set_deadzone**\ (\ action\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>`\ ) :ref:`🔗<class_InputMap_method_action_set_deadzone>` Sets a deadzone value for the action. @@ -163,7 +163,7 @@ Sets a deadzone value for the action. .. rst-class:: classref-method -void **add_action** **(** :ref:`StringName<class_StringName>` action, :ref:`float<class_float>` deadzone=0.5 **)** +|void| **add_action**\ (\ action\: :ref:`StringName<class_StringName>`, deadzone\: :ref:`float<class_float>` = 0.5\ ) :ref:`🔗<class_InputMap_method_add_action>` Adds an empty action to the **InputMap** with a configurable ``deadzone``. @@ -177,7 +177,7 @@ An :ref:`InputEvent<class_InputEvent>` can then be added to this action with :re .. rst-class:: classref-method -void **erase_action** **(** :ref:`StringName<class_StringName>` action **)** +|void| **erase_action**\ (\ action\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_InputMap_method_erase_action>` Removes an action from the **InputMap**. @@ -189,7 +189,7 @@ Removes an action from the **InputMap**. .. rst-class:: classref-method -:ref:`bool<class_bool>` **event_is_action** **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`StringName<class_StringName>` action, :ref:`bool<class_bool>` exact_match=false **)** |const| +:ref:`bool<class_bool>` **event_is_action**\ (\ event\: :ref:`InputEvent<class_InputEvent>`, action\: :ref:`StringName<class_StringName>`, exact_match\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_InputMap_method_event_is_action>` Returns ``true`` if the given event is part of an existing action. This method ignores keyboard modifiers if the given :ref:`InputEvent<class_InputEvent>` is not pressed (for proper release detection). See :ref:`action_has_event<class_InputMap_method_action_has_event>` if you don't want this behavior. @@ -203,7 +203,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **get_actions** **(** **)** +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_actions**\ (\ ) :ref:`🔗<class_InputMap_method_get_actions>` Returns an array of all actions in the **InputMap**. @@ -215,7 +215,7 @@ Returns an array of all actions in the **InputMap**. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_action** **(** :ref:`StringName<class_StringName>` action **)** |const| +:ref:`bool<class_bool>` **has_action**\ (\ action\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_InputMap_method_has_action>` Returns ``true`` if the **InputMap** has a registered action with the given name. @@ -227,7 +227,7 @@ Returns ``true`` if the **InputMap** has a registered action with the given name .. rst-class:: classref-method -void **load_from_project_settings** **(** **)** +|void| **load_from_project_settings**\ (\ ) :ref:`🔗<class_InputMap_method_load_from_project_settings>` Clears all :ref:`InputEventAction<class_InputEventAction>` in the **InputMap** and load it anew from :ref:`ProjectSettings<class_ProjectSettings>`. @@ -238,3 +238,4 @@ Clears all :ref:`InputEventAction<class_InputEventAction>` in the **InputMap** a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_instanceplaceholder.rst b/classes/class_instanceplaceholder.rst index d57409b6303..ae0381674a1 100644 --- a/classes/class_instanceplaceholder.rst +++ b/classes/class_instanceplaceholder.rst @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`create_instance<class_InstancePlaceholder_method_create_instance>` **(** :ref:`bool<class_bool>` replace=false, :ref:`PackedScene<class_PackedScene>` custom_scene=null **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_instance_path<class_InstancePlaceholder_method_get_instance_path>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_stored_values<class_InstancePlaceholder_method_get_stored_values>` **(** :ref:`bool<class_bool>` with_order=false **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`create_instance<class_InstancePlaceholder_method_create_instance>`\ (\ replace\: :ref:`bool<class_bool>` = false, custom_scene\: :ref:`PackedScene<class_PackedScene>` = null\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_instance_path<class_InstancePlaceholder_method_get_instance_path>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_stored_values<class_InstancePlaceholder_method_get_stored_values>`\ (\ with_order\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +52,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Node<class_Node>` **create_instance** **(** :ref:`bool<class_bool>` replace=false, :ref:`PackedScene<class_PackedScene>` custom_scene=null **)** +:ref:`Node<class_Node>` **create_instance**\ (\ replace\: :ref:`bool<class_bool>` = false, custom_scene\: :ref:`PackedScene<class_PackedScene>` = null\ ) :ref:`🔗<class_InstancePlaceholder_method_create_instance>` Call this method to actually load in the node. The created node will be placed as a sibling *above* the **InstancePlaceholder** in the scene tree. The :ref:`Node<class_Node>`'s reference is also returned for convenience. @@ -66,7 +66,7 @@ Call this method to actually load in the node. The created node will be placed a .. rst-class:: classref-method -:ref:`String<class_String>` **get_instance_path** **(** **)** |const| +:ref:`String<class_String>` **get_instance_path**\ (\ ) |const| :ref:`🔗<class_InstancePlaceholder_method_get_instance_path>` Gets the path to the :ref:`PackedScene<class_PackedScene>` resource file that is loaded by default when calling :ref:`create_instance<class_InstancePlaceholder_method_create_instance>`. Not thread-safe. Use :ref:`Object.call_deferred<class_Object_method_call_deferred>` if calling from a thread. @@ -78,7 +78,7 @@ Gets the path to the :ref:`PackedScene<class_PackedScene>` resource file that is .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_stored_values** **(** :ref:`bool<class_bool>` with_order=false **)** +:ref:`Dictionary<class_Dictionary>` **get_stored_values**\ (\ with_order\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_InstancePlaceholder_method_get_stored_values>` Returns the list of properties that will be applied to the node when :ref:`create_instance<class_InstancePlaceholder_method_create_instance>` is called. @@ -91,3 +91,4 @@ If ``with_order`` is ``true``, a key named ``.order`` (note the leading period) .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_int.rst b/classes/class_int.rst index 481eae5575e..0a32c039fac 100644 --- a/classes/class_int.rst +++ b/classes/class_int.rst @@ -21,7 +21,7 @@ Signed 64-bit integer type. This means that it can take values from ``-2^63`` to \ **int**\ s can be automatically converted to :ref:`float<class_float>`\ s when necessary, for example when passing them as arguments in functions. The :ref:`float<class_float>` will be as close to the original integer as possible. -Likewise, :ref:`float<class_float>`\ s can be automatically converted into **int**\ s. This will truncate the :ref:`float<class_float>`, discarding anything after the floating point. +Likewise, :ref:`float<class_float>`\ s can be automatically converted into **int**\ s. This will truncate the :ref:`float<class_float>`, discarding anything after the floating-point. \ **Note:** In a boolean context, an **int** will evaluate to ``false`` if it equals ``0``, and to ``true`` otherwise. @@ -38,7 +38,7 @@ Likewise, :ref:`float<class_float>`\ s can be automatically converted into **int .. code-tab:: csharp int x = 1; // x is 1 - x = 4.2; // x is 4, because 4.2 gets truncated + x = (int)4.2; // x is 4, because 4.2 gets truncated // We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit. long maxLong = 9223372036854775807; // Biggest value a long can store maxLong++; // maxLong is now -9223372036854775808, because it wrapped around. @@ -49,14 +49,25 @@ Likewise, :ref:`float<class_float>`\ s can be automatically converted into **int -In GDScript, you can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. +You can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. -:: + +.. tabs:: + + .. code-tab:: gdscript var x = 0b1001 # x is 9 var y = 0xF5 # y is 245 var z = 10_000_000 # z is 10000000 + .. code-tab:: csharp + + int x = 0b1001; // x is 9 + int y = 0xF5; // y is 245 + int z = 10_000_000; // z is 10000000 + + + .. rst-class:: classref-reftable-group Constructors @@ -65,17 +76,17 @@ Constructors .. table:: :widths: auto - +-----------------------+------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>` **(** **)** | - +-----------------------+------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>` **(** :ref:`int<class_int>` from **)** | - +-----------------------+------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>` **(** :ref:`String<class_String>` from **)** | - +-----------------------+------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>` **(** :ref:`bool<class_bool>` from **)** | - +-----------------------+------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>` **(** :ref:`float<class_float>` from **)** | - +-----------------------+------------------------------------------------------------------------------------+ + +-----------------------+---------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>`\ (\ ) | + +-----------------------+---------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>`\ (\ from\: :ref:`int<class_int>`\ ) | + +-----------------------+---------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>`\ (\ from\: :ref:`String<class_String>`\ ) | + +-----------------------+---------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>`\ (\ from\: :ref:`bool<class_bool>`\ ) | + +-----------------------+---------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`int<class_int_constructor_int>`\ (\ from\: :ref:`float<class_float>`\ ) | + +-----------------------+---------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -85,85 +96,85 @@ Operators .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_int_operator_neq_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_int_operator_neq_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator %<class_int_operator_mod_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator &<class_int_operator_bwand_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`operator *<class_int_operator_mul_Color>` **(** :ref:`Color<class_Color>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_int_operator_mul_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_int_operator_mul_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_int_operator_mul_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_int_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_int_operator_mul_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_int_operator_mul_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_int_operator_mul_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator *<class_int_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator *<class_int_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator **<class_int_operator_pow_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator **<class_int_operator_pow_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator +<class_int_operator_sum_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator +<class_int_operator_sum_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator -<class_int_operator_dif_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator -<class_int_operator_dif_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator /<class_int_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator /<class_int_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_int_operator_lt_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_int_operator_lt_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator \<\<<class_int_operator_bwsl_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_int_operator_lte_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_int_operator_lte_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_int_operator_eq_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_int_operator_eq_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_int_operator_gt_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_int_operator_gt_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_int_operator_gte_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_int_operator_gte_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator >><class_int_operator_bwsr_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator ^<class_int_operator_bwxor_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator unary+<class_int_operator_unplus>` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator unary-<class_int_operator_unminus>` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator |<class_int_operator_bwor_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator ~<class_int_operator_bwnot>` **(** **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_int_operator_neq_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_int_operator_neq_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator %<class_int_operator_mod_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator &<class_int_operator_bwand_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`operator *<class_int_operator_mul_Color>`\ (\ right\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_int_operator_mul_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_int_operator_mul_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_int_operator_mul_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_int_operator_mul_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_int_operator_mul_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_int_operator_mul_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_int_operator_mul_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator *<class_int_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator *<class_int_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator **<class_int_operator_pow_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator **<class_int_operator_pow_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator +<class_int_operator_sum_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator +<class_int_operator_sum_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator -<class_int_operator_dif_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator -<class_int_operator_dif_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator /<class_int_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator /<class_int_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_int_operator_lt_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_int_operator_lt_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator \<\<<class_int_operator_bwsl_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_int_operator_lte_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_int_operator_lte_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_int_operator_eq_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_int_operator_eq_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_int_operator_gt_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_int_operator_gt_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_int_operator_gte_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_int_operator_gte_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator >><class_int_operator_bwsr_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator ^<class_int_operator_bwxor_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator unary+<class_int_operator_unplus>`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator unary-<class_int_operator_unminus>`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator |<class_int_operator_bwor_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator ~<class_int_operator_bwnot>`\ (\ ) | + +-------------------------------------+---------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -178,7 +189,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`int<class_int>` **int** **(** **)** +:ref:`int<class_int>` **int**\ (\ ) :ref:`🔗<class_int_constructor_int>` Constructs an **int** set to ``0``. @@ -188,7 +199,7 @@ Constructs an **int** set to ``0``. .. rst-class:: classref-constructor -:ref:`int<class_int>` **int** **(** :ref:`int<class_int>` from **)** +:ref:`int<class_int>` **int**\ (\ from\: :ref:`int<class_int>`\ ) Constructs an **int** as a copy of the given **int**. @@ -198,7 +209,7 @@ Constructs an **int** as a copy of the given **int**. .. rst-class:: classref-constructor -:ref:`int<class_int>` **int** **(** :ref:`String<class_String>` from **)** +:ref:`int<class_int>` **int**\ (\ from\: :ref:`String<class_String>`\ ) Constructs a new **int** from a :ref:`String<class_String>`, following the same rules as :ref:`String.to_int<class_String_method_to_int>`. @@ -208,7 +219,7 @@ Constructs a new **int** from a :ref:`String<class_String>`, following the same .. rst-class:: classref-constructor -:ref:`int<class_int>` **int** **(** :ref:`bool<class_bool>` from **)** +:ref:`int<class_int>` **int**\ (\ from\: :ref:`bool<class_bool>`\ ) Constructs a new **int** from a :ref:`bool<class_bool>`. ``true`` is converted to ``1`` and ``false`` is converted to ``0``. @@ -218,7 +229,7 @@ Constructs a new **int** from a :ref:`bool<class_bool>`. ``true`` is converted t .. rst-class:: classref-constructor -:ref:`int<class_int>` **int** **(** :ref:`float<class_float>` from **)** +:ref:`int<class_int>` **int**\ (\ from\: :ref:`float<class_float>`\ ) Constructs a new **int** from a :ref:`float<class_float>`. This will truncate the :ref:`float<class_float>`, discarding anything after the floating point. @@ -235,7 +246,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_neq_float>` Returns ``true`` if the **int** is not equivalent to the :ref:`float<class_float>`. @@ -247,7 +258,7 @@ Returns ``true`` if the **int** is not equivalent to the :ref:`float<class_float .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_neq_int>` Returns ``true`` if the **int**\ s are not equal. @@ -259,7 +270,7 @@ Returns ``true`` if the **int**\ s are not equal. .. rst-class:: classref-operator -:ref:`int<class_int>` **operator %** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator %**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_mod_int>` Returns the remainder after dividing two **int**\ s. Uses truncated division, which returns a negative number if the dividend is negative. If this is not desired, consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>`. @@ -277,7 +288,7 @@ Returns the remainder after dividing two **int**\ s. Uses truncated division, wh .. rst-class:: classref-operator -:ref:`int<class_int>` **operator &** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator &**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_bwand_int>` Performs the bitwise ``AND`` operation. @@ -302,7 +313,7 @@ This is useful for retrieving binary flags from a variable. .. rst-class:: classref-operator -:ref:`Color<class_Color>` **operator *** **(** :ref:`Color<class_Color>` right **)** +:ref:`Color<class_Color>` **operator ***\ (\ right\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_int_operator_mul_Color>` Multiplies each component of the :ref:`Color<class_Color>` by the **int**. @@ -314,7 +325,7 @@ Multiplies each component of the :ref:`Color<class_Color>` by the **int**. .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator *** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator ***\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_int_operator_mul_Quaternion>` Multiplies each component of the :ref:`Quaternion<class_Quaternion>` by the **int**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. @@ -326,7 +337,7 @@ Multiplies each component of the :ref:`Quaternion<class_Quaternion>` by the **in .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_int_operator_mul_Vector2>` Multiplies each component of the :ref:`Vector2<class_Vector2>` by the **int**. @@ -342,7 +353,7 @@ Multiplies each component of the :ref:`Vector2<class_Vector2>` by the **int**. .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator *** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_int_operator_mul_Vector2i>` Multiplies each component of the :ref:`Vector2i<class_Vector2i>` by the **int**. @@ -354,7 +365,7 @@ Multiplies each component of the :ref:`Vector2i<class_Vector2i>` by the **int**. .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_int_operator_mul_Vector3>` Multiplies each component of the :ref:`Vector3<class_Vector3>` by the **int**. @@ -366,7 +377,7 @@ Multiplies each component of the :ref:`Vector3<class_Vector3>` by the **int**. .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator *** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator ***\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_int_operator_mul_Vector3i>` Multiplies each component of the :ref:`Vector3i<class_Vector3i>` by the **int**. @@ -378,7 +389,7 @@ Multiplies each component of the :ref:`Vector3i<class_Vector3i>` by the **int**. .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_int_operator_mul_Vector4>` Multiplies each component of the :ref:`Vector4<class_Vector4>` by the **int**. @@ -390,7 +401,7 @@ Multiplies each component of the :ref:`Vector4<class_Vector4>` by the **int**. .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator *** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator ***\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_int_operator_mul_Vector4i>` Multiplies each component of the :ref:`Vector4i<class_Vector4i>` by the **int**. @@ -402,7 +413,7 @@ Multiplies each component of the :ref:`Vector4i<class_Vector4i>` by the **int**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_mul_float>` Multiplies the :ref:`float<class_float>` by the **int**. The result is a :ref:`float<class_float>`. @@ -414,7 +425,7 @@ Multiplies the :ref:`float<class_float>` by the **int**. The result is a :ref:`f .. rst-class:: classref-operator -:ref:`int<class_int>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_mul_int>` Multiplies the two **int**\ s. @@ -426,7 +437,7 @@ Multiplies the two **int**\ s. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator **** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator ****\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_pow_float>` Raises an **int** to a power of a :ref:`float<class_float>`. The result is a :ref:`float<class_float>`. @@ -442,7 +453,7 @@ Raises an **int** to a power of a :ref:`float<class_float>`. The result is a :re .. rst-class:: classref-operator -:ref:`int<class_int>` **operator **** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator ****\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_pow_int>` Raises the left **int** to a power of the right **int**. @@ -458,7 +469,7 @@ Raises the left **int** to a power of the right **int**. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator +** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator +**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_sum_float>` Adds the **int** and the :ref:`float<class_float>`. The result is a :ref:`float<class_float>`. @@ -470,7 +481,7 @@ Adds the **int** and the :ref:`float<class_float>`. The result is a :ref:`float< .. rst-class:: classref-operator -:ref:`int<class_int>` **operator +** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator +**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_sum_int>` Adds the two **int**\ s. @@ -482,7 +493,7 @@ Adds the two **int**\ s. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator -** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator -**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_dif_float>` Subtracts the :ref:`float<class_float>` from the **int**. The result is a :ref:`float<class_float>`. @@ -494,7 +505,7 @@ Subtracts the :ref:`float<class_float>` from the **int**. The result is a :ref:` .. rst-class:: classref-operator -:ref:`int<class_int>` **operator -** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator -**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_dif_int>` Subtracts the two **int**\ s. @@ -506,7 +517,7 @@ Subtracts the two **int**\ s. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`float<class_float>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_div_float>` Divides the **int** by the :ref:`float<class_float>`. The result is a :ref:`float<class_float>`. @@ -522,7 +533,7 @@ Divides the **int** by the :ref:`float<class_float>`. The result is a :ref:`floa .. rst-class:: classref-operator -:ref:`int<class_int>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_div_int>` Divides the two **int**\ s. The result is an **int**. This will truncate the :ref:`float<class_float>`, discarding anything after the floating point. @@ -539,7 +550,7 @@ Divides the two **int**\ s. The result is an **int**. This will truncate the :re .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_lt_float>` Returns ``true`` if the **int** is less than the :ref:`float<class_float>`. @@ -551,7 +562,7 @@ Returns ``true`` if the **int** is less than the :ref:`float<class_float>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_lt_int>` Returns ``true`` if the left **int** is less than the right **int**. @@ -563,7 +574,7 @@ Returns ``true`` if the left **int** is less than the right **int**. .. rst-class:: classref-operator -:ref:`int<class_int>` **operator <<** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator <<**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_bwsl_int>` Performs the bitwise shift left operation. Effectively the same as multiplying by a power of 2. @@ -580,7 +591,7 @@ Performs the bitwise shift left operation. Effectively the same as multiplying b .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_lte_float>` Returns ``true`` if the **int** is less than or equal to the :ref:`float<class_float>`. @@ -592,7 +603,7 @@ Returns ``true`` if the **int** is less than or equal to the :ref:`float<class_f .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_lte_int>` Returns ``true`` if the left **int** is less than or equal to the right **int**. @@ -604,7 +615,7 @@ Returns ``true`` if the left **int** is less than or equal to the right **int**. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_eq_float>` Returns ``true`` if the **int** is equal to the :ref:`float<class_float>`. @@ -616,7 +627,7 @@ Returns ``true`` if the **int** is equal to the :ref:`float<class_float>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_eq_int>` Returns ``true`` if the two **int**\ s are equal. @@ -628,7 +639,7 @@ Returns ``true`` if the two **int**\ s are equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_gt_float>` Returns ``true`` if the **int** is greater than the :ref:`float<class_float>`. @@ -640,7 +651,7 @@ Returns ``true`` if the **int** is greater than the :ref:`float<class_float>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_gt_int>` Returns ``true`` if the left **int** is greater than the right **int**. @@ -652,7 +663,7 @@ Returns ``true`` if the left **int** is greater than the right **int**. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`float<class_float>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_int_operator_gte_float>` Returns ``true`` if the **int** is greater than or equal to the :ref:`float<class_float>`. @@ -664,7 +675,7 @@ Returns ``true`` if the **int** is greater than or equal to the :ref:`float<clas .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`int<class_int>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_gte_int>` Returns ``true`` if the left **int** is greater than or equal to the right **int**. @@ -676,7 +687,7 @@ Returns ``true`` if the left **int** is greater than or equal to the right **int .. rst-class:: classref-operator -:ref:`int<class_int>` **operator >>** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator >>**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_bwsr_int>` Performs the bitwise shift right operation. Effectively the same as dividing by a power of 2. @@ -693,7 +704,7 @@ Performs the bitwise shift right operation. Effectively the same as dividing by .. rst-class:: classref-operator -:ref:`int<class_int>` **operator ^** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator ^**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_bwxor_int>` Performs the bitwise ``XOR`` operation. @@ -709,7 +720,7 @@ Performs the bitwise ``XOR`` operation. .. rst-class:: classref-operator -:ref:`int<class_int>` **operator unary+** **(** **)** +:ref:`int<class_int>` **operator unary+**\ (\ ) :ref:`🔗<class_int_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -721,7 +732,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`int<class_int>` **operator unary-** **(** **)** +:ref:`int<class_int>` **operator unary-**\ (\ ) :ref:`🔗<class_int_operator_unminus>` Returns the negated value of the **int**. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing. @@ -733,7 +744,7 @@ Returns the negated value of the **int**. If positive, turns the number negative .. rst-class:: classref-operator -:ref:`int<class_int>` **operator |** **(** :ref:`int<class_int>` right **)** +:ref:`int<class_int>` **operator |**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_int_operator_bwor_int>` Performs the bitwise ``OR`` operation. @@ -756,9 +767,9 @@ This is useful for storing binary flags in a variable. .. rst-class:: classref-operator -:ref:`int<class_int>` **operator ~** **(** **)** +:ref:`int<class_int>` **operator ~**\ (\ ) :ref:`🔗<class_int_operator_bwnot>` -Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement <https://en.wikipedia.org/wiki/Two%27s_complement/>`__, it's effectively equal to ``-(int + 1)``. +Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement <https://en.wikipedia.org/wiki/Two%27s_complement>`__, it's effectively equal to ``-(int + 1)``. :: @@ -772,3 +783,4 @@ Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement <h .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_intervaltweener.rst b/classes/class_intervaltweener.rst index 7ecf776f068..db35d863b69 100644 --- a/classes/class_intervaltweener.rst +++ b/classes/class_intervaltweener.rst @@ -30,3 +30,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_ip.rst b/classes/class_ip.rst index 8fa1e92cfa7..fec8e40572a 100644 --- a/classes/class_ip.rst +++ b/classes/class_ip.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: dns + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -29,27 +32,27 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_cache<class_IP_method_clear_cache>` **(** :ref:`String<class_String>` hostname="" **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_resolve_item<class_IP_method_erase_resolve_item>` **(** :ref:`int<class_int>` id **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_local_addresses<class_IP_method_get_local_addresses>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_local_interfaces<class_IP_method_get_local_interfaces>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_resolve_item_address<class_IP_method_get_resolve_item_address>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_resolve_item_addresses<class_IP_method_get_resolve_item_addresses>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ResolverStatus<enum_IP_ResolverStatus>` | :ref:`get_resolve_item_status<class_IP_method_get_resolve_item_status>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`resolve_hostname<class_IP_method_resolve_hostname>` **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`resolve_hostname_addresses<class_IP_method_resolve_hostname_addresses>` **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resolve_hostname_queue_item<class_IP_method_resolve_hostname_queue_item>` **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_cache<class_IP_method_clear_cache>`\ (\ hostname\: :ref:`String<class_String>` = ""\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_resolve_item<class_IP_method_erase_resolve_item>`\ (\ id\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_local_addresses<class_IP_method_get_local_addresses>`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_local_interfaces<class_IP_method_get_local_interfaces>`\ (\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_resolve_item_address<class_IP_method_get_resolve_item_address>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_resolve_item_addresses<class_IP_method_get_resolve_item_addresses>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ResolverStatus<enum_IP_ResolverStatus>` | :ref:`get_resolve_item_status<class_IP_method_get_resolve_item_status>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`resolve_hostname<class_IP_method_resolve_hostname>`\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`resolve_hostname_addresses<class_IP_method_resolve_hostname_addresses>`\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resolve_hostname_queue_item<class_IP_method_resolve_hostname_queue_item>`\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,7 +67,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ResolverStatus**: +enum **ResolverStatus**: :ref:`🔗<enum_IP_ResolverStatus>` .. _class_IP_constant_RESOLVER_STATUS_NONE: @@ -106,7 +109,7 @@ DNS hostname resolver status: Error. .. rst-class:: classref-enumeration -enum **Type**: +enum **Type**: :ref:`🔗<enum_IP_Type>` .. _class_IP_constant_TYPE_NONE: @@ -153,7 +156,7 @@ Constants .. rst-class:: classref-constant -**RESOLVER_MAX_QUERIES** = ``256`` +**RESOLVER_MAX_QUERIES** = ``256`` :ref:`🔗<class_IP_constant_RESOLVER_MAX_QUERIES>` Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALID_ID<class_IP_constant_RESOLVER_INVALID_ID>` is returned if exceeded. @@ -161,7 +164,7 @@ Maximum number of concurrent DNS resolver queries allowed, :ref:`RESOLVER_INVALI .. rst-class:: classref-constant -**RESOLVER_INVALID_ID** = ``-1`` +**RESOLVER_INVALID_ID** = ``-1`` :ref:`🔗<class_IP_constant_RESOLVER_INVALID_ID>` Invalid ID constant. Returned if :ref:`RESOLVER_MAX_QUERIES<class_IP_constant_RESOLVER_MAX_QUERIES>` is exceeded. @@ -178,7 +181,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_cache** **(** :ref:`String<class_String>` hostname="" **)** +|void| **clear_cache**\ (\ hostname\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_IP_method_clear_cache>` Removes all of a ``hostname``'s cached references. If no ``hostname`` is given, all cached IP addresses are removed. @@ -190,7 +193,7 @@ Removes all of a ``hostname``'s cached references. If no ``hostname`` is given, .. rst-class:: classref-method -void **erase_resolve_item** **(** :ref:`int<class_int>` id **)** +|void| **erase_resolve_item**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_IP_method_erase_resolve_item>` Removes a given item ``id`` from the queue. This should be used to free a queue after it has completed to enable more queries to happen. @@ -202,7 +205,7 @@ Removes a given item ``id`` from the queue. This should be used to free a queue .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_local_addresses** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_local_addresses**\ (\ ) |const| :ref:`🔗<class_IP_method_get_local_addresses>` Returns all the user's current IPv4 and IPv6 addresses as an array. @@ -214,7 +217,7 @@ Returns all the user's current IPv4 and IPv6 addresses as an array. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_local_interfaces** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_local_interfaces**\ (\ ) |const| :ref:`🔗<class_IP_method_get_local_interfaces>` Returns all network adapters as an array. @@ -237,7 +240,7 @@ Each adapter is a dictionary of the form: .. rst-class:: classref-method -:ref:`String<class_String>` **get_resolve_item_address** **(** :ref:`int<class_int>` id **)** |const| +:ref:`String<class_String>` **get_resolve_item_address**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_IP_method_get_resolve_item_address>` Returns a queued hostname's IP address, given its queue ``id``. Returns an empty string on error or if resolution hasn't happened yet (see :ref:`get_resolve_item_status<class_IP_method_get_resolve_item_status>`). @@ -249,7 +252,7 @@ Returns a queued hostname's IP address, given its queue ``id``. Returns an empty .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_resolve_item_addresses** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Array<class_Array>` **get_resolve_item_addresses**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_IP_method_get_resolve_item_addresses>` Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see :ref:`get_resolve_item_status<class_IP_method_get_resolve_item_status>`). @@ -261,7 +264,7 @@ Returns resolved addresses, or an empty array if an error happened or resolution .. rst-class:: classref-method -:ref:`ResolverStatus<enum_IP_ResolverStatus>` **get_resolve_item_status** **(** :ref:`int<class_int>` id **)** |const| +:ref:`ResolverStatus<enum_IP_ResolverStatus>` **get_resolve_item_status**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_IP_method_get_resolve_item_status>` Returns a queued hostname's status as a :ref:`ResolverStatus<enum_IP_ResolverStatus>` constant, given its queue ``id``. @@ -273,7 +276,7 @@ Returns a queued hostname's status as a :ref:`ResolverStatus<enum_IP_ResolverSta .. rst-class:: classref-method -:ref:`String<class_String>` **resolve_hostname** **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** +:ref:`String<class_String>` **resolve_hostname**\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) :ref:`🔗<class_IP_method_resolve_hostname>` Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the :ref:`Type<enum_IP_Type>` constant given as ``ip_type``. @@ -285,7 +288,7 @@ Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type met .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **resolve_hostname_addresses** **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** +:ref:`PackedStringArray<class_PackedStringArray>` **resolve_hostname_addresses**\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) :ref:`🔗<class_IP_method_resolve_hostname_addresses>` Resolves a given hostname in a blocking way. Addresses are returned as an :ref:`Array<class_Array>` of IPv4 or IPv6 addresses depending on ``ip_type``. @@ -297,7 +300,7 @@ Resolves a given hostname in a blocking way. Addresses are returned as an :ref:` .. rst-class:: classref-method -:ref:`int<class_int>` **resolve_hostname_queue_item** **(** :ref:`String<class_String>` host, :ref:`Type<enum_IP_Type>` ip_type=3 **)** +:ref:`int<class_int>` **resolve_hostname_queue_item**\ (\ host\: :ref:`String<class_String>`, ip_type\: :ref:`Type<enum_IP_Type>` = 3\ ) :ref:`🔗<class_IP_method_resolve_hostname_queue_item>` Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the :ref:`Type<enum_IP_Type>` constant given as ``ip_type``. Returns the queue ID if successful, or :ref:`RESOLVER_INVALID_ID<class_IP_constant_RESOLVER_INVALID_ID>` on error. @@ -308,3 +311,4 @@ Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_itemlist.rst b/classes/class_itemlist.rst index 3be8ea7e63a..85458737052 100644 --- a/classes/class_itemlist.rst +++ b/classes/class_itemlist.rst @@ -79,95 +79,97 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_icon_item<class_ItemList_method_add_icon_item>` **(** :ref:`Texture2D<class_Texture2D>` icon, :ref:`bool<class_bool>` selectable=true **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_item<class_ItemList_method_add_item>` **(** :ref:`String<class_String>` text, :ref:`Texture2D<class_Texture2D>` icon=null, :ref:`bool<class_bool>` selectable=true **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_ItemList_method_clear>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect<class_ItemList_method_deselect>` **(** :ref:`int<class_int>` idx **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect_all<class_ItemList_method_deselect_all>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_current_is_visible<class_ItemList_method_ensure_current_is_visible>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_method_get_item_at_position>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` exact=false **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_item_custom_bg_color<class_ItemList_method_get_item_custom_bg_color>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_item_custom_fg_color<class_ItemList_method_get_item_custom_fg_color>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_ItemList_method_get_item_icon>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_ItemList_method_get_item_icon_modulate>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_item_icon_region<class_ItemList_method_get_item_icon_region>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_language<class_ItemList_method_get_item_language>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_ItemList_method_get_item_metadata>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_ItemList_method_get_item_rect>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` expand=true **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_text<class_ItemList_method_get_item_text>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_ItemList_method_get_item_text_direction>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_ItemList_method_get_item_tooltip>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_selected_items<class_ItemList_method_get_selected_items>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ItemList_method_get_v_scroll_bar>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_anything_selected<class_ItemList_method_is_anything_selected>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_method_is_item_disabled>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_icon_transposed<class_ItemList_method_is_item_icon_transposed>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_method_is_item_selectable>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_method_is_item_tooltip_enabled>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_method_is_selected>` **(** :ref:`int<class_int>` idx **)** |const| | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_item<class_ItemList_method_move_item>` **(** :ref:`int<class_int>` from_idx, :ref:`int<class_int>` to_idx **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_item<class_ItemList_method_remove_item>` **(** :ref:`int<class_int>` idx **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select<class_ItemList_method_select>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` single=true **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_custom_bg_color<class_ItemList_method_set_item_custom_bg_color>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` custom_bg_color **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_custom_fg_color<class_ItemList_method_set_item_custom_fg_color>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` custom_fg_color **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_disabled<class_ItemList_method_set_item_disabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon<class_ItemList_method_set_item_icon>` **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` icon **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon_modulate<class_ItemList_method_set_item_icon_modulate>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` modulate **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon_region<class_ItemList_method_set_item_icon_region>` **(** :ref:`int<class_int>` idx, :ref:`Rect2<class_Rect2>` rect **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon_transposed<class_ItemList_method_set_item_icon_transposed>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` transposed **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_language<class_ItemList_method_set_item_language>` **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` language **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_metadata<class_ItemList_method_set_item_metadata>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` metadata **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_selectable<class_ItemList_method_set_item_selectable>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` selectable **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_text<class_ItemList_method_set_item_text>` **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_text_direction<class_ItemList_method_set_item_text_direction>` **(** :ref:`int<class_int>` idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_tooltip<class_ItemList_method_set_item_tooltip>` **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_tooltip_enabled<class_ItemList_method_set_item_tooltip_enabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort_items_by_text<class_ItemList_method_sort_items_by_text>` **(** **)** | - +--------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_icon_item<class_ItemList_method_add_icon_item>`\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_item<class_ItemList_method_add_item>`\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_ItemList_method_clear>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect<class_ItemList_method_deselect>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect_all<class_ItemList_method_deselect_all>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ensure_current_is_visible<class_ItemList_method_ensure_current_is_visible>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_list_size<class_ItemList_method_force_update_list_size>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_at_position<class_ItemList_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_item_custom_bg_color<class_ItemList_method_get_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_item_custom_fg_color<class_ItemList_method_get_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_ItemList_method_get_item_icon>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_ItemList_method_get_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_item_icon_region<class_ItemList_method_get_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_language<class_ItemList_method_get_item_language>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_ItemList_method_get_item_metadata>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_ItemList_method_get_item_rect>`\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_text<class_ItemList_method_get_item_text>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_ItemList_method_get_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_ItemList_method_get_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_selected_items<class_ItemList_method_get_selected_items>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ItemList_method_get_v_scroll_bar>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_anything_selected<class_ItemList_method_is_anything_selected>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_ItemList_method_is_item_disabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_icon_transposed<class_ItemList_method_is_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_selectable<class_ItemList_method_is_item_selectable>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_tooltip_enabled<class_ItemList_method_is_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_selected<class_ItemList_method_is_selected>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_item<class_ItemList_method_move_item>`\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item<class_ItemList_method_remove_item>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select<class_ItemList_method_select>`\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_custom_bg_color<class_ItemList_method_set_item_custom_bg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_custom_fg_color<class_ItemList_method_set_item_custom_fg_color>`\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_disabled<class_ItemList_method_set_item_disabled>`\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon<class_ItemList_method_set_item_icon>`\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_modulate<class_ItemList_method_set_item_icon_modulate>`\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_region<class_ItemList_method_set_item_icon_region>`\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_transposed<class_ItemList_method_set_item_icon_transposed>`\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_language<class_ItemList_method_set_item_language>`\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_metadata<class_ItemList_method_set_item_metadata>`\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_selectable<class_ItemList_method_set_item_selectable>`\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text<class_ItemList_method_set_item_text>`\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text_direction<class_ItemList_method_set_item_text_direction>`\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip<class_ItemList_method_set_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip_enabled<class_ItemList_method_set_item_tooltip_enabled>`\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort_items_by_text<class_ItemList_method_sort_items_by_text>`\ (\ ) | + +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -182,7 +184,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_ItemList_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ItemList_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_ItemList_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ @@ -196,7 +198,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`int<class_int>` | :ref:`outline_size<class_ItemList_theme_constant_outline_size>` | ``0`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ - | :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``2`` | + | :ref:`int<class_int>` | :ref:`v_separation<class_ItemList_theme_constant_v_separation>` | ``4`` | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ | :ref:`Font<class_Font>` | :ref:`font<class_ItemList_theme_font_font>` | | +---------------------------------+----------------------------------------------------------------------------+--------------------------------+ @@ -230,7 +232,7 @@ Signals .. rst-class:: classref-signal -**empty_clicked** **(** :ref:`Vector2<class_Vector2>` at_position, :ref:`int<class_int>` mouse_button_index **)** +**empty_clicked**\ (\ at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_empty_clicked>` Triggered when any mouse click is issued within the rect of the list but on empty space. @@ -242,7 +244,7 @@ Triggered when any mouse click is issued within the rect of the list but on empt .. rst-class:: classref-signal -**item_activated** **(** :ref:`int<class_int>` index **)** +**item_activated**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_activated>` Triggered when specified list item is activated via double-clicking or by pressing :kbd:`Enter`. @@ -254,7 +256,7 @@ Triggered when specified list item is activated via double-clicking or by pressi .. rst-class:: classref-signal -**item_clicked** **(** :ref:`int<class_int>` index, :ref:`Vector2<class_Vector2>` at_position, :ref:`int<class_int>` mouse_button_index **)** +**item_clicked**\ (\ index\: :ref:`int<class_int>`, at_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_clicked>` Triggered when specified list item has been clicked with any mouse button. @@ -268,7 +270,7 @@ The click position is also provided to allow appropriate popup of context menus .. rst-class:: classref-signal -**item_selected** **(** :ref:`int<class_int>` index **)** +**item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_signal_item_selected>` Triggered when specified item has been selected. @@ -282,7 +284,7 @@ Triggered when specified item has been selected. .. rst-class:: classref-signal -**multi_selected** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` selected **)** +**multi_selected**\ (\ index\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_signal_multi_selected>` Triggered when a multiple selection is altered on a list allowing multiple selection. @@ -299,7 +301,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **IconMode**: +enum **IconMode**: :ref:`🔗<enum_ItemList_IconMode>` .. _class_ItemList_constant_ICON_MODE_TOP: @@ -325,7 +327,7 @@ Icon is drawn to the left of the text. .. rst-class:: classref-enumeration -enum **SelectMode**: +enum **SelectMode**: :ref:`🔗<enum_ItemList_SelectMode>` .. _class_ItemList_constant_SELECT_SINGLE: @@ -356,12 +358,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_reselect** = ``false`` +:ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_ItemList_property_allow_reselect>` .. rst-class:: classref-property-setget -- void **set_allow_reselect** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_reselect** **(** **)** +- |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_reselect**\ (\ ) If ``true``, the currently selected item can be selected again. @@ -373,12 +375,12 @@ If ``true``, the currently selected item can be selected again. .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` +:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_ItemList_property_allow_rmb_select>` .. rst-class:: classref-property-setget -- void **set_allow_rmb_select** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_rmb_select** **(** **)** +- |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ ) If ``true``, right mouse button click can select items. @@ -390,12 +392,12 @@ If ``true``, right mouse button click can select items. .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_search** = ``true`` +:ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_ItemList_property_allow_search>` .. rst-class:: classref-property-setget -- void **set_allow_search** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_search** **(** **)** +- |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_search**\ (\ ) If ``true``, allows navigating the **ItemList** with letter keys through incremental search. @@ -407,12 +409,12 @@ If ``true``, allows navigating the **ItemList** with letter keys through increme .. rst-class:: classref-property -:ref:`bool<class_bool>` **auto_height** = ``false`` +:ref:`bool<class_bool>` **auto_height** = ``false`` :ref:`🔗<class_ItemList_property_auto_height>` .. rst-class:: classref-property-setget -- void **set_auto_height** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_auto_height** **(** **)** +- |void| **set_auto_height**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_auto_height**\ (\ ) If ``true``, the control will automatically resize the height to fit its content. @@ -424,12 +426,12 @@ If ``true``, the control will automatically resize the height to fit its content .. rst-class:: classref-property -:ref:`int<class_int>` **fixed_column_width** = ``0`` +:ref:`int<class_int>` **fixed_column_width** = ``0`` :ref:`🔗<class_ItemList_property_fixed_column_width>` .. rst-class:: classref-property-setget -- void **set_fixed_column_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fixed_column_width** **(** **)** +- |void| **set_fixed_column_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fixed_column_width**\ (\ ) The width all columns will be adjusted to. @@ -443,12 +445,12 @@ A value of zero disables the adjustment, each item will have a width equal to th .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **fixed_icon_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_ItemList_property_fixed_icon_size>` .. rst-class:: classref-property-setget -- void **set_fixed_icon_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size** **(** **)** +- |void| **set_fixed_icon_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_fixed_icon_size**\ (\ ) The size all icons will be adjusted to. @@ -462,12 +464,12 @@ If either X or Y component is not greater than zero, icon size won't be affected .. rst-class:: classref-property -:ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` +:ref:`IconMode<enum_ItemList_IconMode>` **icon_mode** = ``1`` :ref:`🔗<class_ItemList_property_icon_mode>` .. rst-class:: classref-property-setget -- void **set_icon_mode** **(** :ref:`IconMode<enum_ItemList_IconMode>` value **)** -- :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode** **(** **)** +- |void| **set_icon_mode**\ (\ value\: :ref:`IconMode<enum_ItemList_IconMode>`\ ) +- :ref:`IconMode<enum_ItemList_IconMode>` **get_icon_mode**\ (\ ) The icon position, whether above or to the left of the text. See the :ref:`IconMode<enum_ItemList_IconMode>` constants. @@ -479,12 +481,12 @@ The icon position, whether above or to the left of the text. See the :ref:`IconM .. rst-class:: classref-property -:ref:`float<class_float>` **icon_scale** = ``1.0`` +:ref:`float<class_float>` **icon_scale** = ``1.0`` :ref:`🔗<class_ItemList_property_icon_scale>` .. rst-class:: classref-property-setget -- void **set_icon_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_icon_scale** **(** **)** +- |void| **set_icon_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_icon_scale**\ (\ ) The scale of icon applied after :ref:`fixed_icon_size<class_ItemList_property_fixed_icon_size>` and transposing takes effect. @@ -496,12 +498,12 @@ The scale of icon applied after :ref:`fixed_icon_size<class_ItemList_property_fi .. rst-class:: classref-property -:ref:`int<class_int>` **item_count** = ``0`` +:ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_ItemList_property_item_count>` .. rst-class:: classref-property-setget -- void **set_item_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_count** **(** **)** +- |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_count**\ (\ ) The number of items currently in the list. @@ -513,12 +515,12 @@ The number of items currently in the list. .. rst-class:: classref-property -:ref:`int<class_int>` **max_columns** = ``1`` +:ref:`int<class_int>` **max_columns** = ``1`` :ref:`🔗<class_ItemList_property_max_columns>` .. rst-class:: classref-property-setget -- void **set_max_columns** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_columns** **(** **)** +- |void| **set_max_columns**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_columns**\ (\ ) Maximum columns the list will have. @@ -534,12 +536,12 @@ A value of zero means unlimited columns, i.e. all items will be put in the same .. rst-class:: classref-property -:ref:`int<class_int>` **max_text_lines** = ``1`` +:ref:`int<class_int>` **max_text_lines** = ``1`` :ref:`🔗<class_ItemList_property_max_text_lines>` .. rst-class:: classref-property-setget -- void **set_max_text_lines** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_text_lines** **(** **)** +- |void| **set_max_text_lines**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_text_lines**\ (\ ) Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. @@ -553,12 +555,12 @@ Maximum lines of text allowed in each item. Space will be reserved even when the .. rst-class:: classref-property -:ref:`bool<class_bool>` **same_column_width** = ``false`` +:ref:`bool<class_bool>` **same_column_width** = ``false`` :ref:`🔗<class_ItemList_property_same_column_width>` .. rst-class:: classref-property-setget -- void **set_same_column_width** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_same_column_width** **(** **)** +- |void| **set_same_column_width**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_same_column_width**\ (\ ) Whether all columns will have the same width. @@ -572,12 +574,12 @@ If ``true``, the width is equal to the largest column width of all columns. .. rst-class:: classref-property -:ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` +:ref:`SelectMode<enum_ItemList_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_ItemList_property_select_mode>` .. rst-class:: classref-property-setget -- void **set_select_mode** **(** :ref:`SelectMode<enum_ItemList_SelectMode>` value **)** -- :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode** **(** **)** +- |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_ItemList_SelectMode>`\ ) +- :ref:`SelectMode<enum_ItemList_SelectMode>` **get_select_mode**\ (\ ) Allows single or multiple item selection. See the :ref:`SelectMode<enum_ItemList_SelectMode>` constants. @@ -589,12 +591,12 @@ Allows single or multiple item selection. See the :ref:`SelectMode<enum_ItemList .. rst-class:: classref-property -:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` +:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`🔗<class_ItemList_property_text_overrun_behavior>` .. rst-class:: classref-property-setget -- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` value **)** -- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior** **(** **)** +- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) +- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds an item's bounding rectangle. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes. @@ -611,7 +613,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **add_icon_item** **(** :ref:`Texture2D<class_Texture2D>` icon, :ref:`bool<class_bool>` selectable=true **)** +:ref:`int<class_int>` **add_icon_item**\ (\ icon\: :ref:`Texture2D<class_Texture2D>`, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_icon_item>` Adds an item to the item list with no text, only an icon. Returns the index of an added item. @@ -623,7 +625,7 @@ Adds an item to the item list with no text, only an icon. Returns the index of a .. rst-class:: classref-method -:ref:`int<class_int>` **add_item** **(** :ref:`String<class_String>` text, :ref:`Texture2D<class_Texture2D>` icon=null, :ref:`bool<class_bool>` selectable=true **)** +:ref:`int<class_int>` **add_item**\ (\ text\: :ref:`String<class_String>`, icon\: :ref:`Texture2D<class_Texture2D>` = null, selectable\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_add_item>` Adds an item to the item list with specified text. Returns the index of an added item. @@ -639,7 +641,7 @@ If selectable is ``true``, the list item will be selectable. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_ItemList_method_clear>` Removes all items from the list. @@ -651,7 +653,7 @@ Removes all items from the list. .. rst-class:: classref-method -void **deselect** **(** :ref:`int<class_int>` idx **)** +|void| **deselect**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_deselect>` Ensures the item associated with the specified index is not selected. @@ -663,7 +665,7 @@ Ensures the item associated with the specified index is not selected. .. rst-class:: classref-method -void **deselect_all** **(** **)** +|void| **deselect_all**\ (\ ) :ref:`🔗<class_ItemList_method_deselect_all>` Ensures there are no items selected. @@ -675,7 +677,7 @@ Ensures there are no items selected. .. rst-class:: classref-method -void **ensure_current_is_visible** **(** **)** +|void| **ensure_current_is_visible**\ (\ ) :ref:`🔗<class_ItemList_method_ensure_current_is_visible>` Ensure current selection is visible, adjusting the scroll position as necessary. @@ -683,11 +685,23 @@ Ensure current selection is visible, adjusting the scroll position as necessary. ---- +.. _class_ItemList_method_force_update_list_size: + +.. rst-class:: classref-method + +|void| **force_update_list_size**\ (\ ) :ref:`🔗<class_ItemList_method_force_update_list_size>` + +Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like :ref:`auto_height<class_ItemList_property_auto_height>`, change. The method can be used to trigger the update ahead of next drawing pass. + +.. rst-class:: classref-item-separator + +---- + .. _class_ItemList_method_get_item_at_position: .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_at_position** **(** :ref:`Vector2<class_Vector2>` position, :ref:`bool<class_bool>` exact=false **)** |const| +:ref:`int<class_int>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`, exact\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_ItemList_method_get_item_at_position>` Returns the item index at the given ``position``. @@ -703,7 +717,7 @@ When there is no item at that point, -1 will be returned if ``exact`` is ``true` .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_item_custom_bg_color** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Color<class_Color>` **get_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_bg_color>` Returns the custom background color of the item specified by ``idx`` index. @@ -715,7 +729,7 @@ Returns the custom background color of the item specified by ``idx`` index. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_item_custom_fg_color** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Color<class_Color>` **get_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_custom_fg_color>` Returns the custom foreground color of the item specified by ``idx`` index. @@ -727,7 +741,7 @@ Returns the custom foreground color of the item specified by ``idx`` index. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_item_icon** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon>` Returns the icon associated with the specified index. @@ -739,7 +753,7 @@ Returns the icon associated with the specified index. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_item_icon_modulate** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_modulate>` Returns a :ref:`Color<class_Color>` modulating item's icon at the specified index. @@ -751,7 +765,7 @@ Returns a :ref:`Color<class_Color>` modulating item's icon at the specified inde .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_item_icon_region** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Rect2<class_Rect2>` **get_item_icon_region**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_icon_region>` Returns the region of item's icon used. The whole icon will be used if the region has no area. @@ -763,7 +777,7 @@ Returns the region of item's icon used. The whole icon will be used if the regio .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_language** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_item_language**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_language>` Returns item's text language code. @@ -775,7 +789,7 @@ Returns item's text language code. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_item_metadata** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_metadata>` Returns the metadata value of the specified index. @@ -787,7 +801,7 @@ Returns the metadata value of the specified index. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_item_rect** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` expand=true **)** |const| +:ref:`Rect2<class_Rect2>` **get_item_rect**\ (\ idx\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_ItemList_method_get_item_rect>` Returns the position and size of the item with the specified index, in the coordinate system of the **ItemList** node. If ``expand`` is ``true`` the last column expands to fill the rest of the row. @@ -801,7 +815,7 @@ Returns the position and size of the item with the specified index, in the coord .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_text** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text>` Returns the text associated with the specified index. @@ -813,7 +827,7 @@ Returns the text associated with the specified index. .. rst-class:: classref-method -:ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_text_direction>` Returns item's text base writing direction. @@ -825,7 +839,7 @@ Returns item's text base writing direction. .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_tooltip** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_get_item_tooltip>` Returns the tooltip hint associated with the specified index. @@ -837,7 +851,7 @@ Returns the tooltip hint associated with the specified index. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_selected_items**\ (\ ) :ref:`🔗<class_ItemList_method_get_selected_items>` Returns an array with the indexes of the selected items. @@ -849,7 +863,7 @@ Returns an array with the indexes of the selected items. .. rst-class:: classref-method -:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)** +:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_ItemList_method_get_v_scroll_bar>` Returns the vertical scrollbar. @@ -863,7 +877,7 @@ Returns the vertical scrollbar. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_anything_selected** **(** **)** +:ref:`bool<class_bool>` **is_anything_selected**\ (\ ) :ref:`🔗<class_ItemList_method_is_anything_selected>` Returns ``true`` if one or more items are selected. @@ -875,7 +889,7 @@ Returns ``true`` if one or more items are selected. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_disabled** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_disabled>` Returns ``true`` if the item at the specified index is disabled. @@ -887,7 +901,7 @@ Returns ``true`` if the item at the specified index is disabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_icon_transposed** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_icon_transposed>` Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. @@ -899,7 +913,7 @@ Returns ``true`` if the item icon will be drawn transposed, i.e. the X and Y axe .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_selectable** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_selectable**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_selectable>` Returns ``true`` if the item at the specified index is selectable. @@ -911,7 +925,7 @@ Returns ``true`` if the item at the specified index is selectable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_tooltip_enabled** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_item_tooltip_enabled>` Returns ``true`` if the tooltip is enabled for specified item index. @@ -923,7 +937,7 @@ Returns ``true`` if the tooltip is enabled for specified item index. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_selected** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_selected**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ItemList_method_is_selected>` Returns ``true`` if the item at the specified index is currently selected. @@ -935,7 +949,7 @@ Returns ``true`` if the item at the specified index is currently selected. .. rst-class:: classref-method -void **move_item** **(** :ref:`int<class_int>` from_idx, :ref:`int<class_int>` to_idx **)** +|void| **move_item**\ (\ from_idx\: :ref:`int<class_int>`, to_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_move_item>` Moves item from index ``from_idx`` to ``to_idx``. @@ -947,7 +961,7 @@ Moves item from index ``from_idx`` to ``to_idx``. .. rst-class:: classref-method -void **remove_item** **(** :ref:`int<class_int>` idx **)** +|void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ItemList_method_remove_item>` Removes the item specified by ``idx`` index from the list. @@ -959,7 +973,7 @@ Removes the item specified by ``idx`` index from the list. .. rst-class:: classref-method -void **select** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` single=true **)** +|void| **select**\ (\ idx\: :ref:`int<class_int>`, single\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ItemList_method_select>` Select the item at the specified index. @@ -973,7 +987,7 @@ Select the item at the specified index. .. rst-class:: classref-method -void **set_item_custom_bg_color** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` custom_bg_color **)** +|void| **set_item_custom_bg_color**\ (\ idx\: :ref:`int<class_int>`, custom_bg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_bg_color>` Sets the background color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`. @@ -985,7 +999,7 @@ Sets the background color of the item specified by ``idx`` index to the specifie .. rst-class:: classref-method -void **set_item_custom_fg_color** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` custom_fg_color **)** +|void| **set_item_custom_fg_color**\ (\ idx\: :ref:`int<class_int>`, custom_fg_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_custom_fg_color>` Sets the foreground color of the item specified by ``idx`` index to the specified :ref:`Color<class_Color>`. @@ -997,7 +1011,7 @@ Sets the foreground color of the item specified by ``idx`` index to the specifie .. rst-class:: classref-method -void **set_item_disabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** +|void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_disabled>` Disables (or enables) the item at the specified index. @@ -1011,7 +1025,7 @@ Disabled items cannot be selected and do not trigger activation signals (when do .. rst-class:: classref-method -void **set_item_icon** **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon>` Sets (or replaces) the icon's :ref:`Texture2D<class_Texture2D>` associated with the specified index. @@ -1023,7 +1037,7 @@ Sets (or replaces) the icon's :ref:`Texture2D<class_Texture2D>` associated with .. rst-class:: classref-method -void **set_item_icon_modulate** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` modulate **)** +|void| **set_item_icon_modulate**\ (\ idx\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_modulate>` Sets a modulating :ref:`Color<class_Color>` of the item associated with the specified index. @@ -1035,7 +1049,7 @@ Sets a modulating :ref:`Color<class_Color>` of the item associated with the spec .. rst-class:: classref-method -void **set_item_icon_region** **(** :ref:`int<class_int>` idx, :ref:`Rect2<class_Rect2>` rect **)** +|void| **set_item_icon_region**\ (\ idx\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_region>` Sets the region of item's icon used. The whole icon will be used if the region has no area. @@ -1047,7 +1061,7 @@ Sets the region of item's icon used. The whole icon will be used if the region h .. rst-class:: classref-method -void **set_item_icon_transposed** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` transposed **)** +|void| **set_item_icon_transposed**\ (\ idx\: :ref:`int<class_int>`, transposed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_icon_transposed>` Sets whether the item icon will be drawn transposed. @@ -1059,7 +1073,7 @@ Sets whether the item icon will be drawn transposed. .. rst-class:: classref-method -void **set_item_language** **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` language **)** +|void| **set_item_language**\ (\ idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_language>` Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -1071,7 +1085,7 @@ Sets language code of item's text used for line-breaking and text shaping algori .. rst-class:: classref-method -void **set_item_metadata** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ItemList_method_set_item_metadata>` Sets a value (of any type) to be stored with the item associated with the specified index. @@ -1083,7 +1097,7 @@ Sets a value (of any type) to be stored with the item associated with the specif .. rst-class:: classref-method -void **set_item_selectable** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` selectable **)** +|void| **set_item_selectable**\ (\ idx\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_selectable>` Allows or disallows selection of the item associated with the specified index. @@ -1095,7 +1109,7 @@ Allows or disallows selection of the item associated with the specified index. .. rst-class:: classref-method -void **set_item_text** **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)** +|void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_text>` Sets text of the item associated with the specified index. @@ -1107,7 +1121,7 @@ Sets text of the item associated with the specified index. .. rst-class:: classref-method -void **set_item_text_direction** **(** :ref:`int<class_int>` idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** +|void| **set_item_text_direction**\ (\ idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_ItemList_method_set_item_text_direction>` Sets item's text base writing direction. @@ -1119,7 +1133,7 @@ Sets item's text base writing direction. .. rst-class:: classref-method -void **set_item_tooltip** **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)** +|void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip>` Sets the tooltip hint for the item associated with the specified index. @@ -1131,7 +1145,7 @@ Sets the tooltip hint for the item associated with the specified index. .. rst-class:: classref-method -void **set_item_tooltip_enabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` enable **)** +|void| **set_item_tooltip_enabled**\ (\ idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ItemList_method_set_item_tooltip_enabled>` Sets whether the tooltip hint is enabled for specified item index. @@ -1143,7 +1157,7 @@ Sets whether the tooltip hint is enabled for specified item index. .. rst-class:: classref-method -void **sort_items_by_text** **(** **)** +|void| **sort_items_by_text**\ (\ ) :ref:`🔗<class_ItemList_method_sort_items_by_text>` Sorts items in the list by their text. @@ -1160,7 +1174,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.65, 0.65, 0.65, 1)`` :ref:`🔗<class_ItemList_theme_color_font_color>` Default text :ref:`Color<class_Color>` of the item. @@ -1172,7 +1186,7 @@ Default text :ref:`Color<class_Color>` of the item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ItemList_theme_color_font_hovered_color>` Text :ref:`Color<class_Color>` used when the item is hovered and not selected yet. @@ -1184,7 +1198,7 @@ Text :ref:`Color<class_Color>` used when the item is hovered and not selected ye .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ItemList_theme_color_font_outline_color>` The tint of text outline of the item. @@ -1196,7 +1210,7 @@ The tint of text outline of the item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ItemList_theme_color_font_selected_color>` Text :ref:`Color<class_Color>` used when the item is selected. @@ -1208,7 +1222,7 @@ Text :ref:`Color<class_Color>` used when the item is selected. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` +:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_ItemList_theme_color_guide_color>` :ref:`Color<class_Color>` of the guideline. The guideline is a line drawn between each row of items. @@ -1220,7 +1234,7 @@ Text :ref:`Color<class_Color>` used when the item is selected. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_h_separation>` The horizontal spacing between items. @@ -1232,7 +1246,7 @@ The horizontal spacing between items. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_margin** = ``4`` +:ref:`int<class_int>` **icon_margin** = ``4`` :ref:`🔗<class_ItemList_theme_constant_icon_margin>` The spacing between item's icon and text. @@ -1244,7 +1258,7 @@ The spacing between item's icon and text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **line_separation** = ``2`` +:ref:`int<class_int>` **line_separation** = ``2`` :ref:`🔗<class_ItemList_theme_constant_line_separation>` The vertical spacing between each line of text. @@ -1256,7 +1270,7 @@ The vertical spacing between each line of text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ItemList_theme_constant_outline_size>` The size of the item text outline. @@ -1270,7 +1284,7 @@ The size of the item text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **v_separation** = ``2`` +:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_ItemList_theme_constant_v_separation>` The vertical spacing between items. @@ -1282,7 +1296,7 @@ The vertical spacing between items. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_ItemList_theme_font_font>` :ref:`Font<class_Font>` of the item's text. @@ -1294,7 +1308,7 @@ The vertical spacing between items. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_ItemList_theme_font_size_font_size>` Font size of the item's text. @@ -1306,7 +1320,7 @@ Font size of the item's text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **cursor** +:ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_ItemList_theme_style_cursor>` :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is being focused. @@ -1318,7 +1332,7 @@ Font size of the item's text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** +:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_ItemList_theme_style_cursor_unfocused>` :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **ItemList** is not being focused. @@ -1330,7 +1344,7 @@ Font size of the item's text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_ItemList_theme_style_focus>` The focused style for the **ItemList**, drawn on top of the background, but below everything else. @@ -1342,7 +1356,7 @@ The focused style for the **ItemList**, drawn on top of the background, but belo .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **hovered** +:ref:`StyleBox<class_StyleBox>` **hovered** :ref:`🔗<class_ItemList_theme_style_hovered>` :ref:`StyleBox<class_StyleBox>` for the hovered, but not selected items. @@ -1354,7 +1368,7 @@ The focused style for the **ItemList**, drawn on top of the background, but belo .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_ItemList_theme_style_panel>` The background style for the **ItemList**. @@ -1366,7 +1380,7 @@ The background style for the **ItemList**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **selected** +:ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_ItemList_theme_style_selected>` :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is not being focused. @@ -1378,7 +1392,7 @@ The background style for the **ItemList**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **selected_focus** +:ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_ItemList_theme_style_selected_focus>` :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **ItemList** is being focused. @@ -1389,3 +1403,4 @@ The background style for the **ItemList**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_javaclass.rst b/classes/class_javaclass.rst index 7ab5101cc52..ec46c89bd14 100644 --- a/classes/class_javaclass.rst +++ b/classes/class_javaclass.rst @@ -12,9 +12,18 @@ JavaClass **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Represents an object from the Java Native Interface. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +Represents an object from the Java Native Interface. It is returned from :ref:`JavaClassWrapper.wrap<class_JavaClassWrapper_method_wrap>`. + +\ **Note:** This class only works on Android. For any other build, this class does nothing. + +\ **Note:** This class is not to be confused with :ref:`JavaScriptObject<class_JavaScriptObject>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -23,3 +32,4 @@ JavaClass .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_javaclasswrapper.rst b/classes/class_javaclasswrapper.rst index d36918c9686..de7c0c2146c 100644 --- a/classes/class_javaclasswrapper.rst +++ b/classes/class_javaclasswrapper.rst @@ -12,9 +12,16 @@ JavaClassWrapper **Inherits:** :ref:`Object<class_Object>` -.. container:: contribute +Provides access to the Java Native Interface. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +The JavaClassWrapper singleton provides a way for the Godot application to send and receive data through the `Java Native Interface <https://developer.android.com/training/articles/perf-jni>`__ (JNI). + +\ **Note:** This singleton is only available in Android builds. .. rst-class:: classref-reftable-group @@ -24,9 +31,9 @@ Methods .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`JavaClass<class_JavaClass>` | :ref:`wrap<class_JavaClassWrapper_method_wrap>` **(** :ref:`String<class_String>` name **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------------+ + | :ref:`JavaClass<class_JavaClass>` | :ref:`wrap<class_JavaClassWrapper_method_wrap>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -41,11 +48,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`JavaClass<class_JavaClass>` **wrap** **(** :ref:`String<class_String>` name **)** +:ref:`JavaClass<class_JavaClass>` **wrap**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_JavaClassWrapper_method_wrap>` -.. container:: contribute +Wraps a class defined in Java, and returns it as a :ref:`JavaClass<class_JavaClass>` :ref:`Object<class_Object>` type that Godot can interact with. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This method only works on Android. On every other platform, this method does nothing and returns an empty :ref:`JavaClass<class_JavaClass>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -54,3 +61,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_javascriptbridge.rst b/classes/class_javascriptbridge.rst index d8be160c79c..fe3546d0981 100644 --- a/classes/class_javascriptbridge.rst +++ b/classes/class_javascriptbridge.rst @@ -38,23 +38,23 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JavaScriptObject<class_JavaScriptObject>` | :ref:`create_callback<class_JavaScriptBridge_method_create_callback>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`create_object<class_JavaScriptBridge_method_create_object>` **(** :ref:`String<class_String>` object, ... **)** |vararg| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`download_buffer<class_JavaScriptBridge_method_download_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`String<class_String>` name, :ref:`String<class_String>` mime="application/octet-stream" **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`eval<class_JavaScriptBridge_method_eval>` **(** :ref:`String<class_String>` code, :ref:`bool<class_bool>` use_global_execution_context=false **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_fs_sync<class_JavaScriptBridge_method_force_fs_sync>` **(** **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JavaScriptObject<class_JavaScriptObject>` | :ref:`get_interface<class_JavaScriptBridge_method_get_interface>` **(** :ref:`String<class_String>` interface **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`pwa_needs_update<class_JavaScriptBridge_method_pwa_needs_update>` **(** **)** |const| | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pwa_update<class_JavaScriptBridge_method_pwa_update>` **(** **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JavaScriptObject<class_JavaScriptObject>` | :ref:`create_callback<class_JavaScriptBridge_method_create_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`create_object<class_JavaScriptBridge_method_create_object>`\ (\ object\: :ref:`String<class_String>`, ...\ ) |vararg| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`download_buffer<class_JavaScriptBridge_method_download_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, name\: :ref:`String<class_String>`, mime\: :ref:`String<class_String>` = "application/octet-stream"\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`eval<class_JavaScriptBridge_method_eval>`\ (\ code\: :ref:`String<class_String>`, use_global_execution_context\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_fs_sync<class_JavaScriptBridge_method_force_fs_sync>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JavaScriptObject<class_JavaScriptObject>` | :ref:`get_interface<class_JavaScriptBridge_method_get_interface>`\ (\ interface\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`pwa_needs_update<class_JavaScriptBridge_method_pwa_needs_update>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pwa_update<class_JavaScriptBridge_method_pwa_update>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,7 +69,7 @@ Signals .. rst-class:: classref-signal -**pwa_update_available** **(** **)** +**pwa_update_available**\ (\ ) :ref:`🔗<class_JavaScriptBridge_signal_pwa_update_available>` Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See :ref:`pwa_update<class_JavaScriptBridge_method_pwa_update>` to force the update to take place immediately. @@ -86,7 +86,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`JavaScriptObject<class_JavaScriptObject>` **create_callback** **(** :ref:`Callable<class_Callable>` callable **)** +:ref:`JavaScriptObject<class_JavaScriptObject>` **create_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_JavaScriptBridge_method_create_callback>` Creates a reference to a :ref:`Callable<class_Callable>` that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See :ref:`JavaScriptObject<class_JavaScriptObject>` for usage. @@ -98,7 +98,7 @@ Creates a reference to a :ref:`Callable<class_Callable>` that can be used as a c .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **create_object** **(** :ref:`String<class_String>` object, ... **)** |vararg| +:ref:`Variant<class_Variant>` **create_object**\ (\ object\: :ref:`String<class_String>`, ...\ ) |vararg| :ref:`🔗<class_JavaScriptBridge_method_create_object>` Creates a new JavaScript object using the ``new`` constructor. The ``object`` must a valid property of the JavaScript ``window``. See :ref:`JavaScriptObject<class_JavaScriptObject>` for usage. @@ -110,7 +110,7 @@ Creates a new JavaScript object using the ``new`` constructor. The ``object`` mu .. rst-class:: classref-method -void **download_buffer** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`String<class_String>` name, :ref:`String<class_String>` mime="application/octet-stream" **)** +|void| **download_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, name\: :ref:`String<class_String>`, mime\: :ref:`String<class_String>` = "application/octet-stream"\ ) :ref:`🔗<class_JavaScriptBridge_method_download_buffer>` Prompts the user to download a file containing the specified ``buffer``. The file will have the given ``name`` and ``mime`` type. @@ -128,7 +128,7 @@ Prompts the user to download a file containing the specified ``buffer``. The fil .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **eval** **(** :ref:`String<class_String>` code, :ref:`bool<class_bool>` use_global_execution_context=false **)** +:ref:`Variant<class_Variant>` **eval**\ (\ code\: :ref:`String<class_String>`, use_global_execution_context\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_JavaScriptBridge_method_eval>` Execute the string ``code`` as JavaScript code within the browser window. This is a call to the actual global JavaScript function ``eval()``. @@ -142,7 +142,7 @@ If ``use_global_execution_context`` is ``true``, the code will be evaluated in t .. rst-class:: classref-method -void **force_fs_sync** **(** **)** +|void| **force_fs_sync**\ (\ ) :ref:`🔗<class_JavaScriptBridge_method_force_fs_sync>` Force synchronization of the persistent file system (when enabled). @@ -156,7 +156,7 @@ Force synchronization of the persistent file system (when enabled). .. rst-class:: classref-method -:ref:`JavaScriptObject<class_JavaScriptObject>` **get_interface** **(** :ref:`String<class_String>` interface **)** +:ref:`JavaScriptObject<class_JavaScriptObject>` **get_interface**\ (\ interface\: :ref:`String<class_String>`\ ) :ref:`🔗<class_JavaScriptBridge_method_get_interface>` Returns an interface to a JavaScript object that can be used by scripts. The ``interface`` must be a valid property of the JavaScript ``window``. The callback must accept a single :ref:`Array<class_Array>` argument, which will contain the JavaScript ``arguments``. See :ref:`JavaScriptObject<class_JavaScriptObject>` for usage. @@ -168,7 +168,7 @@ Returns an interface to a JavaScript object that can be used by scripts. The ``i .. rst-class:: classref-method -:ref:`bool<class_bool>` **pwa_needs_update** **(** **)** |const| +:ref:`bool<class_bool>` **pwa_needs_update**\ (\ ) |const| :ref:`🔗<class_JavaScriptBridge_method_pwa_needs_update>` Returns ``true`` if a new version of the progressive web app is waiting to be activated. @@ -182,7 +182,7 @@ Returns ``true`` if a new version of the progressive web app is waiting to be ac .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **pwa_update** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **pwa_update**\ (\ ) :ref:`🔗<class_JavaScriptBridge_method_pwa_update>` Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. @@ -197,3 +197,4 @@ Performs the live update of the progressive web app. Forcing the new version to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_javascriptobject.rst b/classes/class_javascriptobject.rst index 5bf84788e44..f42c6517c1d 100644 --- a/classes/class_javascriptobject.rst +++ b/classes/class_javascriptobject.rst @@ -58,3 +58,4 @@ JavaScriptObject is used to interact with JavaScript objects retrieved or create .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_jnisingleton.rst b/classes/class_jnisingleton.rst index 11a01e35873..7e09e92cdfe 100644 --- a/classes/class_jnisingleton.rst +++ b/classes/class_jnisingleton.rst @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_joint2d.rst b/classes/class_joint2d.rst index 51980de0208..0c58b8b8586 100644 --- a/classes/class_joint2d.rst +++ b/classes/class_joint2d.rst @@ -21,7 +21,7 @@ Abstract base class for all 2D physics joints. Description ----------- -Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies and apply a constraint. +Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies (:ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>`) and apply a constraint. .. rst-class:: classref-reftable-group @@ -41,6 +41,18 @@ Properties | :ref:`NodePath<class_NodePath>` | :ref:`node_b<class_Joint2D_property_node_b>` | ``NodePath("")`` | +---------------------------------+--------------------------------------------------------------------+------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_Joint2D_method_get_rid>`\ (\ ) |const| | + +-----------------------+------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -54,14 +66,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **bias** = ``0.0`` +:ref:`float<class_float>` **bias** = ``0.0`` :ref:`🔗<class_Joint2D_property_bias>` .. rst-class:: classref-property-setget -- void **set_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bias** **(** **)** +- |void| **set_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bias**\ (\ ) -When :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. +When :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` move in different directions the :ref:`bias<class_Joint2D_property_bias>` controls how fast the joint pulls them back to their original position. The lower the :ref:`bias<class_Joint2D_property_bias>` the more the two bodies can pull on the joint. When set to ``0``, the default value from :ref:`ProjectSettings.physics/2d/solver/default_constraint_bias<class_ProjectSettings_property_physics/2d/solver/default_constraint_bias>` is used. @@ -73,14 +85,14 @@ When set to ``0``, the default value from :ref:`ProjectSettings.physics/2d/solve .. rst-class:: classref-property -:ref:`bool<class_bool>` **disable_collision** = ``true`` +:ref:`bool<class_bool>` **disable_collision** = ``true`` :ref:`🔗<class_Joint2D_property_disable_collision>` .. rst-class:: classref-property-setget -- void **set_exclude_nodes_from_collision** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision** **(** **)** +- |void| **set_exclude_nodes_from_collision**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision**\ (\ ) -If ``true``, :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class_Joint2D_property_node_b>` can not collide. +If ``true``, the two bodies bound together do not collide with each other. .. rst-class:: classref-item-separator @@ -90,14 +102,14 @@ If ``true``, :ref:`node_a<class_Joint2D_property_node_a>` and :ref:`node_b<class .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **node_a** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **node_a** = ``NodePath("")`` :ref:`🔗<class_Joint2D_property_node_a>` .. rst-class:: classref-property-setget -- void **set_node_a** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_node_a** **(** **)** +- |void| **set_node_a**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_node_a**\ (\ ) -The first body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_PhysicsBody2D>`. +Path to the first body (A) attached to the joint. The node must inherit :ref:`PhysicsBody2D<class_PhysicsBody2D>`. .. rst-class:: classref-item-separator @@ -107,14 +119,31 @@ The first body attached to the joint. Must derive from :ref:`PhysicsBody2D<class .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **node_b** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **node_b** = ``NodePath("")`` :ref:`🔗<class_Joint2D_property_node_b>` .. rst-class:: classref-property-setget -- void **set_node_b** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_node_b** **(** **)** +- |void| **set_node_b**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_node_b**\ (\ ) + +Path to the second body (B) attached to the joint. The node must inherit :ref:`PhysicsBody2D<class_PhysicsBody2D>`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Joint2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_Joint2D_method_get_rid>` -The second body attached to the joint. Must derive from :ref:`PhysicsBody2D<class_PhysicsBody2D>`. +Returns the joint's internal :ref:`RID<class_RID>` from the :ref:`PhysicsServer2D<class_PhysicsServer2D>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -123,3 +152,4 @@ The second body attached to the joint. Must derive from :ref:`PhysicsBody2D<clas .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_joint3d.rst b/classes/class_joint3d.rst index a9c7691fd56..411ce34a298 100644 --- a/classes/class_joint3d.rst +++ b/classes/class_joint3d.rst @@ -21,14 +21,14 @@ Abstract base class for all 3D physics joints. Description ----------- -Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies and apply a constraint. +Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies (:ref:`node_a<class_Joint3D_property_node_a>` and :ref:`node_b<class_Joint3D_property_node_b>`) and apply a constraint. If only one body is defined, it is attached to a fixed :ref:`StaticBody3D<class_StaticBody3D>` without collision shapes. .. rst-class:: classref-introduction-group Tutorials --------- -- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/524>`__ +- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/2752>`__ .. rst-class:: classref-reftable-group @@ -48,6 +48,18 @@ Properties | :ref:`int<class_int>` | :ref:`solver_priority<class_Joint3D_property_solver_priority>` | ``1`` | +---------------------------------+------------------------------------------------------------------------------------------+------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_Joint3D_method_get_rid>`\ (\ ) |const| | + +-----------------------+------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -61,14 +73,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclude_nodes_from_collision** = ``true`` +:ref:`bool<class_bool>` **exclude_nodes_from_collision** = ``true`` :ref:`🔗<class_Joint3D_property_exclude_nodes_from_collision>` .. rst-class:: classref-property-setget -- void **set_exclude_nodes_from_collision** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision** **(** **)** +- |void| **set_exclude_nodes_from_collision**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_nodes_from_collision**\ (\ ) -If ``true``, the two bodies of the nodes are not able to collide with each other. +If ``true``, the two bodies bound together do not collide with each other. .. rst-class:: classref-item-separator @@ -78,14 +90,16 @@ If ``true``, the two bodies of the nodes are not able to collide with each other .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **node_a** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **node_a** = ``NodePath("")`` :ref:`🔗<class_Joint3D_property_node_a>` .. rst-class:: classref-property-setget -- void **set_node_a** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_node_a** **(** **)** +- |void| **set_node_a**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_node_a**\ (\ ) + +Path to the first node (A) attached to the joint. The node must inherit :ref:`PhysicsBody3D<class_PhysicsBody3D>`. -The node attached to the first side (A) of the joint. +If left empty and :ref:`node_b<class_Joint3D_property_node_b>` is set, the body is attached to a fixed :ref:`StaticBody3D<class_StaticBody3D>` without collision shapes. .. rst-class:: classref-item-separator @@ -95,14 +109,16 @@ The node attached to the first side (A) of the joint. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **node_b** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **node_b** = ``NodePath("")`` :ref:`🔗<class_Joint3D_property_node_b>` .. rst-class:: classref-property-setget -- void **set_node_b** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_node_b** **(** **)** +- |void| **set_node_b**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_node_b**\ (\ ) -The node attached to the second side (B) of the joint. +Path to the second node (B) attached to the joint. The node must inherit :ref:`PhysicsBody3D<class_PhysicsBody3D>`. + +If left empty and :ref:`node_a<class_Joint3D_property_node_a>` is set, the body is attached to a fixed :ref:`StaticBody3D<class_StaticBody3D>` without collision shapes. .. rst-class:: classref-item-separator @@ -112,15 +128,32 @@ The node attached to the second side (B) of the joint. .. rst-class:: classref-property -:ref:`int<class_int>` **solver_priority** = ``1`` +:ref:`int<class_int>` **solver_priority** = ``1`` :ref:`🔗<class_Joint3D_property_solver_priority>` .. rst-class:: classref-property-setget -- void **set_solver_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_solver_priority** **(** **)** +- |void| **set_solver_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_solver_priority**\ (\ ) The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_Joint3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_Joint3D_method_get_rid>` + +Returns the joint's internal :ref:`RID<class_RID>` from the :ref:`PhysicsServer3D<class_PhysicsServer3D>`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -128,3 +161,4 @@ The priority used to define which solver is executed first for multiple joints. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_json.rst b/classes/class_json.rst index a9d4a0a294f..8276d936dcf 100644 --- a/classes/class_json.rst +++ b/classes/class_json.rst @@ -81,19 +81,19 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_error_line<class_JSON_method_get_error_line>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_error_message<class_JSON_method_get_error_message>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_parsed_text<class_JSON_method_get_parsed_text>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`parse<class_JSON_method_parse>` **(** :ref:`String<class_String>` json_text, :ref:`bool<class_bool>` keep_text=false **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`parse_string<class_JSON_method_parse_string>` **(** :ref:`String<class_String>` json_string **)** |static| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`stringify<class_JSON_method_stringify>` **(** :ref:`Variant<class_Variant>` data, :ref:`String<class_String>` indent="", :ref:`bool<class_bool>` sort_keys=true, :ref:`bool<class_bool>` full_precision=false **)** |static| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_error_line<class_JSON_method_get_error_line>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_error_message<class_JSON_method_get_error_message>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_parsed_text<class_JSON_method_get_parsed_text>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`parse<class_JSON_method_parse>`\ (\ json_text\: :ref:`String<class_String>`, keep_text\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`parse_string<class_JSON_method_parse_string>`\ (\ json_string\: :ref:`String<class_String>`\ ) |static| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`stringify<class_JSON_method_stringify>`\ (\ data\: :ref:`Variant<class_Variant>`, indent\: :ref:`String<class_String>` = "", sort_keys\: :ref:`bool<class_bool>` = true, full_precision\: :ref:`bool<class_bool>` = false\ ) |static| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -108,12 +108,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Variant<class_Variant>` **data** = ``null`` +:ref:`Variant<class_Variant>` **data** = ``null`` :ref:`🔗<class_JSON_property_data>` .. rst-class:: classref-property-setget -- void **set_data** **(** :ref:`Variant<class_Variant>` value **)** -- :ref:`Variant<class_Variant>` **get_data** **(** **)** +- |void| **set_data**\ (\ value\: :ref:`Variant<class_Variant>`\ ) +- :ref:`Variant<class_Variant>` **get_data**\ (\ ) Contains the parsed JSON data in :ref:`Variant<class_Variant>` form. @@ -130,7 +130,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_error_line** **(** **)** |const| +:ref:`int<class_int>` **get_error_line**\ (\ ) |const| :ref:`🔗<class_JSON_method_get_error_line>` Returns ``0`` if the last call to :ref:`parse<class_JSON_method_parse>` was successful, or the line number where the parse failed. @@ -142,7 +142,7 @@ Returns ``0`` if the last call to :ref:`parse<class_JSON_method_parse>` was succ .. rst-class:: classref-method -:ref:`String<class_String>` **get_error_message** **(** **)** |const| +:ref:`String<class_String>` **get_error_message**\ (\ ) |const| :ref:`🔗<class_JSON_method_get_error_message>` Returns an empty string if the last call to :ref:`parse<class_JSON_method_parse>` was successful, or the error message if it failed. @@ -154,7 +154,7 @@ Returns an empty string if the last call to :ref:`parse<class_JSON_method_parse> .. rst-class:: classref-method -:ref:`String<class_String>` **get_parsed_text** **(** **)** |const| +:ref:`String<class_String>` **get_parsed_text**\ (\ ) |const| :ref:`🔗<class_JSON_method_get_parsed_text>` Return the text parsed by :ref:`parse<class_JSON_method_parse>` as long as the function is instructed to keep it. @@ -166,7 +166,7 @@ Return the text parsed by :ref:`parse<class_JSON_method_parse>` as long as the f .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **parse** **(** :ref:`String<class_String>` json_text, :ref:`bool<class_bool>` keep_text=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **parse**\ (\ json_text\: :ref:`String<class_String>`, keep_text\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_JSON_method_parse>` Attempts to parse the ``json_text`` provided. @@ -184,7 +184,7 @@ The optional ``keep_text`` argument instructs the parser to keep a copy of the o .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **parse_string** **(** :ref:`String<class_String>` json_string **)** |static| +:ref:`Variant<class_Variant>` **parse_string**\ (\ json_string\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_JSON_method_parse_string>` Attempts to parse the ``json_string`` provided and returns the parsed data. Returns ``null`` if parse failed. @@ -196,7 +196,7 @@ Attempts to parse the ``json_string`` provided and returns the parsed data. Retu .. rst-class:: classref-method -:ref:`String<class_String>` **stringify** **(** :ref:`Variant<class_Variant>` data, :ref:`String<class_String>` indent="", :ref:`bool<class_bool>` sort_keys=true, :ref:`bool<class_bool>` full_precision=false **)** |static| +:ref:`String<class_String>` **stringify**\ (\ data\: :ref:`Variant<class_Variant>`, indent\: :ref:`String<class_String>` = "", sort_keys\: :ref:`bool<class_bool>` = true, full_precision\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_JSON_method_stringify>` Converts a :ref:`Variant<class_Variant>` var to JSON text and returns the result. Useful for serializing data to store or send over the network. @@ -252,3 +252,4 @@ The ``indent`` parameter controls if and how something is indented, the string u .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_jsonrpc.rst b/classes/class_jsonrpc.rst index fc22403e764..00523578a71 100644 --- a/classes/class_jsonrpc.rst +++ b/classes/class_jsonrpc.rst @@ -29,21 +29,21 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`make_notification<class_JSONRPC_method_make_notification>` **(** :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` params **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`make_request<class_JSONRPC_method_make_request>` **(** :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` params, :ref:`Variant<class_Variant>` id **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`make_response<class_JSONRPC_method_make_response>` **(** :ref:`Variant<class_Variant>` result, :ref:`Variant<class_Variant>` id **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`make_response_error<class_JSONRPC_method_make_response_error>` **(** :ref:`int<class_int>` code, :ref:`String<class_String>` message, :ref:`Variant<class_Variant>` id=null **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`process_action<class_JSONRPC_method_process_action>` **(** :ref:`Variant<class_Variant>` action, :ref:`bool<class_bool>` recurse=false **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`process_string<class_JSONRPC_method_process_string>` **(** :ref:`String<class_String>` action **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_scope<class_JSONRPC_method_set_scope>` **(** :ref:`String<class_String>` scope, :ref:`Object<class_Object>` target **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`make_notification<class_JSONRPC_method_make_notification>`\ (\ method\: :ref:`String<class_String>`, params\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`make_request<class_JSONRPC_method_make_request>`\ (\ method\: :ref:`String<class_String>`, params\: :ref:`Variant<class_Variant>`, id\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`make_response<class_JSONRPC_method_make_response>`\ (\ result\: :ref:`Variant<class_Variant>`, id\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`make_response_error<class_JSONRPC_method_make_response_error>`\ (\ code\: :ref:`int<class_int>`, message\: :ref:`String<class_String>`, id\: :ref:`Variant<class_Variant>` = null\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`process_action<class_JSONRPC_method_process_action>`\ (\ action\: :ref:`Variant<class_Variant>`, recurse\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`process_string<class_JSONRPC_method_process_string>`\ (\ action\: :ref:`String<class_String>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_scope<class_JSONRPC_method_set_scope>`\ (\ scope\: :ref:`String<class_String>`, target\: :ref:`Object<class_Object>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ErrorCode**: +enum **ErrorCode**: :ref:`🔗<enum_JSONRPC_ErrorCode>` .. _class_JSONRPC_constant_PARSE_ERROR: @@ -66,7 +66,7 @@ enum **ErrorCode**: :ref:`ErrorCode<enum_JSONRPC_ErrorCode>` **PARSE_ERROR** = ``-32700`` - +The request could not be parsed as it was not valid by JSON standard (:ref:`JSON.parse<class_JSON_method_parse>` failed). .. _class_JSONRPC_constant_INVALID_REQUEST: @@ -74,7 +74,7 @@ enum **ErrorCode**: :ref:`ErrorCode<enum_JSONRPC_ErrorCode>` **INVALID_REQUEST** = ``-32600`` - +A method call was requested but the request's format is not valid. .. _class_JSONRPC_constant_METHOD_NOT_FOUND: @@ -90,7 +90,7 @@ A method call was requested but no function of that name existed in the JSONRPC :ref:`ErrorCode<enum_JSONRPC_ErrorCode>` **INVALID_PARAMS** = ``-32602`` - +A method call was requested but the given method parameters are not valid. Not used by the built-in JSONRPC. .. _class_JSONRPC_constant_INTERNAL_ERROR: @@ -98,7 +98,7 @@ A method call was requested but no function of that name existed in the JSONRPC :ref:`ErrorCode<enum_JSONRPC_ErrorCode>` **INTERNAL_ERROR** = ``-32603`` - +An internal error occurred while processing the request. Not used by the built-in JSONRPC. .. rst-class:: classref-section-separator @@ -113,7 +113,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **make_notification** **(** :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` params **)** +:ref:`Dictionary<class_Dictionary>` **make_notification**\ (\ method\: :ref:`String<class_String>`, params\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_JSONRPC_method_make_notification>` Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. @@ -129,7 +129,7 @@ Returns a dictionary in the form of a JSON-RPC notification. Notifications are o .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **make_request** **(** :ref:`String<class_String>` method, :ref:`Variant<class_Variant>` params, :ref:`Variant<class_Variant>` id **)** +:ref:`Dictionary<class_Dictionary>` **make_request**\ (\ method\: :ref:`String<class_String>`, params\: :ref:`Variant<class_Variant>`, id\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_JSONRPC_method_make_request>` Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. @@ -147,7 +147,7 @@ Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a s .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **make_response** **(** :ref:`Variant<class_Variant>` result, :ref:`Variant<class_Variant>` id **)** +:ref:`Dictionary<class_Dictionary>` **make_response**\ (\ result\: :ref:`Variant<class_Variant>`, id\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_JSONRPC_method_make_response>` When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. @@ -163,7 +163,7 @@ When a server has received and processed a request, it is expected to send a res .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **make_response_error** **(** :ref:`int<class_int>` code, :ref:`String<class_String>` message, :ref:`Variant<class_Variant>` id=null **)** |const| +:ref:`Dictionary<class_Dictionary>` **make_response_error**\ (\ code\: :ref:`int<class_int>`, message\: :ref:`String<class_String>`, id\: :ref:`Variant<class_Variant>` = null\ ) |const| :ref:`🔗<class_JSONRPC_method_make_response_error>` Creates a response which indicates a previous reply has failed in some way. @@ -181,7 +181,7 @@ Creates a response which indicates a previous reply has failed in some way. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **process_action** **(** :ref:`Variant<class_Variant>` action, :ref:`bool<class_bool>` recurse=false **)** +:ref:`Variant<class_Variant>` **process_action**\ (\ action\: :ref:`Variant<class_Variant>`, recurse\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_JSONRPC_method_process_action>` Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. @@ -197,7 +197,7 @@ To add new supported methods extend the JSONRPC class and call :ref:`process_act .. rst-class:: classref-method -:ref:`String<class_String>` **process_string** **(** :ref:`String<class_String>` action **)** +:ref:`String<class_String>` **process_string**\ (\ action\: :ref:`String<class_String>`\ ) :ref:`🔗<class_JSONRPC_method_process_string>` .. container:: contribute @@ -211,7 +211,7 @@ To add new supported methods extend the JSONRPC class and call :ref:`process_act .. rst-class:: classref-method -void **set_scope** **(** :ref:`String<class_String>` scope, :ref:`Object<class_Object>` target **)** +|void| **set_scope**\ (\ scope\: :ref:`String<class_String>`, target\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_JSONRPC_method_set_scope>` .. container:: contribute @@ -224,3 +224,4 @@ void **set_scope** **(** :ref:`String<class_String>` scope, :ref:`Object<class_O .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_kinematiccollision2d.rst b/classes/class_kinematiccollision2d.rst index 02ea7279570..4964234c545 100644 --- a/classes/class_kinematiccollision2d.rst +++ b/classes/class_kinematiccollision2d.rst @@ -31,33 +31,33 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_angle<class_KinematicCollision2D_method_get_angle>` **(** :ref:`Vector2<class_Vector2>` up_direction=Vector2(0, -1) **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_KinematicCollision2D_method_get_collider>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_id<class_KinematicCollision2D_method_get_collider_id>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_KinematicCollision2D_method_get_collider_rid>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider_shape<class_KinematicCollision2D_method_get_collider_shape>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape_index<class_KinematicCollision2D_method_get_collider_shape_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collider_velocity<class_KinematicCollision2D_method_get_collider_velocity>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_depth<class_KinematicCollision2D_method_get_depth>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_local_shape<class_KinematicCollision2D_method_get_local_shape>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_normal<class_KinematicCollision2D_method_get_normal>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_position<class_KinematicCollision2D_method_get_position>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_remainder<class_KinematicCollision2D_method_get_remainder>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_travel<class_KinematicCollision2D_method_get_travel>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_angle<class_KinematicCollision2D_method_get_angle>`\ (\ up_direction\: :ref:`Vector2<class_Vector2>` = Vector2(0, -1)\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_KinematicCollision2D_method_get_collider>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_id<class_KinematicCollision2D_method_get_collider_id>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_KinematicCollision2D_method_get_collider_rid>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider_shape<class_KinematicCollision2D_method_get_collider_shape>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape_index<class_KinematicCollision2D_method_get_collider_shape_index>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collider_velocity<class_KinematicCollision2D_method_get_collider_velocity>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_depth<class_KinematicCollision2D_method_get_depth>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_local_shape<class_KinematicCollision2D_method_get_local_shape>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_normal<class_KinematicCollision2D_method_get_normal>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_position<class_KinematicCollision2D_method_get_position>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_remainder<class_KinematicCollision2D_method_get_remainder>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_travel<class_KinematicCollision2D_method_get_travel>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +72,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_angle** **(** :ref:`Vector2<class_Vector2>` up_direction=Vector2(0, -1) **)** |const| +:ref:`float<class_float>` **get_angle**\ (\ up_direction\: :ref:`Vector2<class_Vector2>` = Vector2(0, -1)\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_angle>` Returns the collision angle according to ``up_direction``, which is :ref:`Vector2.UP<class_Vector2_constant_UP>` by default. This value is always positive. @@ -84,7 +84,7 @@ Returns the collision angle according to ``up_direction``, which is :ref:`Vector .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider>` Returns the colliding body's attached :ref:`Object<class_Object>`. @@ -96,7 +96,7 @@ Returns the colliding body's attached :ref:`Object<class_Object>`. .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_id** **(** **)** |const| +:ref:`int<class_int>` **get_collider_id**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider_id>` Returns the unique instance ID of the colliding body's attached :ref:`Object<class_Object>`. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -108,7 +108,7 @@ Returns the unique instance ID of the colliding body's attached :ref:`Object<cla .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider_rid>` Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`. @@ -120,7 +120,7 @@ Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServ .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider_shape** **(** **)** |const| +:ref:`Object<class_Object>` **get_collider_shape**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider_shape>` Returns the colliding body's shape. @@ -132,7 +132,7 @@ Returns the colliding body's shape. .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape_index** **(** **)** |const| +:ref:`int<class_int>` **get_collider_shape_index**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider_shape_index>` Returns the colliding body's shape index. See :ref:`CollisionObject2D<class_CollisionObject2D>`. @@ -144,7 +144,7 @@ Returns the colliding body's shape index. See :ref:`CollisionObject2D<class_Coll .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collider_velocity** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collider_velocity**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_collider_velocity>` Returns the colliding body's velocity. @@ -156,7 +156,7 @@ Returns the colliding body's velocity. .. rst-class:: classref-method -:ref:`float<class_float>` **get_depth** **(** **)** |const| +:ref:`float<class_float>` **get_depth**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_depth>` Returns the colliding body's length of overlap along the collision normal. @@ -168,7 +168,7 @@ Returns the colliding body's length of overlap along the collision normal. .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_local_shape** **(** **)** |const| +:ref:`Object<class_Object>` **get_local_shape**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_local_shape>` Returns the moving object's colliding shape. @@ -180,7 +180,7 @@ Returns the moving object's colliding shape. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_normal** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_normal**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_normal>` Returns the colliding body's shape's normal at the point of collision. @@ -192,7 +192,7 @@ Returns the colliding body's shape's normal at the point of collision. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_position** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_position**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_position>` Returns the point of collision in global coordinates. @@ -204,7 +204,7 @@ Returns the point of collision in global coordinates. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_remainder** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_remainder**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_remainder>` Returns the moving object's remaining movement vector. @@ -216,7 +216,7 @@ Returns the moving object's remaining movement vector. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_travel** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_travel**\ (\ ) |const| :ref:`🔗<class_KinematicCollision2D_method_get_travel>` Returns the moving object's travel before collision. @@ -227,3 +227,4 @@ Returns the moving object's travel before collision. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_kinematiccollision3d.rst b/classes/class_kinematiccollision3d.rst index c754716763f..167bb1af9f7 100644 --- a/classes/class_kinematiccollision3d.rst +++ b/classes/class_kinematiccollision3d.rst @@ -31,35 +31,35 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_angle<class_KinematicCollision3D_method_get_angle>` **(** :ref:`int<class_int>` collision_index=0, :ref:`Vector3<class_Vector3>` up_direction=Vector3(0, 1, 0) **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_KinematicCollision3D_method_get_collider>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_id<class_KinematicCollision3D_method_get_collider_id>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_KinematicCollision3D_method_get_collider_rid>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider_shape<class_KinematicCollision3D_method_get_collider_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape_index<class_KinematicCollision3D_method_get_collider_shape_index>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_KinematicCollision3D_method_get_collider_velocity>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_count<class_KinematicCollision3D_method_get_collision_count>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_depth<class_KinematicCollision3D_method_get_depth>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_local_shape<class_KinematicCollision3D_method_get_local_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_normal<class_KinematicCollision3D_method_get_normal>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_position<class_KinematicCollision3D_method_get_position>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_KinematicCollision3D_method_get_remainder>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_KinematicCollision3D_method_get_travel>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_angle<class_KinematicCollision3D_method_get_angle>`\ (\ collision_index\: :ref:`int<class_int>` = 0, up_direction\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0)\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_KinematicCollision3D_method_get_collider>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_id<class_KinematicCollision3D_method_get_collider_id>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_KinematicCollision3D_method_get_collider_rid>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider_shape<class_KinematicCollision3D_method_get_collider_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape_index<class_KinematicCollision3D_method_get_collider_shape_index>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_KinematicCollision3D_method_get_collider_velocity>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_count<class_KinematicCollision3D_method_get_collision_count>`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_depth<class_KinematicCollision3D_method_get_depth>`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_local_shape<class_KinematicCollision3D_method_get_local_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_normal<class_KinematicCollision3D_method_get_normal>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_position<class_KinematicCollision3D_method_get_position>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_KinematicCollision3D_method_get_remainder>`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_KinematicCollision3D_method_get_travel>`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,7 +74,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_angle** **(** :ref:`int<class_int>` collision_index=0, :ref:`Vector3<class_Vector3>` up_direction=Vector3(0, 1, 0) **)** |const| +:ref:`float<class_float>` **get_angle**\ (\ collision_index\: :ref:`int<class_int>` = 0, up_direction\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0)\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_angle>` Returns the collision angle according to ``up_direction``, which is :ref:`Vector3.UP<class_Vector3_constant_UP>` by default. This value is always positive. @@ -86,7 +86,7 @@ Returns the collision angle according to ``up_direction``, which is :ref:`Vector .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider>` Returns the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default). @@ -98,7 +98,7 @@ Returns the colliding body's attached :ref:`Object<class_Object>` given a collis .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_id** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`int<class_int>` **get_collider_id**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider_id>` Returns the unique instance ID of the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default). See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -110,7 +110,7 @@ Returns the unique instance ID of the colliding body's attached :ref:`Object<cla .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider_rid>` Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` given a collision index (the deepest collision by default). @@ -122,7 +122,7 @@ Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServ .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Object<class_Object>` **get_collider_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider_shape>` Returns the colliding body's shape given a collision index (the deepest collision by default). @@ -134,7 +134,7 @@ Returns the colliding body's shape given a collision index (the deepest collisio .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape_index** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`int<class_int>` **get_collider_shape_index**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider_shape_index>` Returns the colliding body's shape index given a collision index (the deepest collision by default). See :ref:`CollisionObject3D<class_CollisionObject3D>`. @@ -146,7 +146,7 @@ Returns the colliding body's shape index given a collision index (the deepest co .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collider_velocity** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_collider_velocity**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collider_velocity>` Returns the colliding body's velocity given a collision index (the deepest collision by default). @@ -158,7 +158,7 @@ Returns the colliding body's velocity given a collision index (the deepest colli .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_count** **(** **)** |const| +:ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_collision_count>` Returns the number of detected collisions. @@ -170,7 +170,7 @@ Returns the number of detected collisions. .. rst-class:: classref-method -:ref:`float<class_float>` **get_depth** **(** **)** |const| +:ref:`float<class_float>` **get_depth**\ (\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_depth>` Returns the colliding body's length of overlap along the collision normal. @@ -182,7 +182,7 @@ Returns the colliding body's length of overlap along the collision normal. .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_local_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Object<class_Object>` **get_local_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_local_shape>` Returns the moving object's colliding shape given a collision index (the deepest collision by default). @@ -194,7 +194,7 @@ Returns the moving object's colliding shape given a collision index (the deepest .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_normal** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_normal**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_normal>` Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default). @@ -206,7 +206,7 @@ Returns the colliding body's shape's normal at the point of collision given a co .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_position** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_position**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_position>` Returns the point of collision in global coordinates given a collision index (the deepest collision by default). @@ -218,7 +218,7 @@ Returns the point of collision in global coordinates given a collision index (th .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_remainder** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_remainder**\ (\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_remainder>` Returns the moving object's remaining movement vector. @@ -230,7 +230,7 @@ Returns the moving object's remaining movement vector. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_travel** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_travel**\ (\ ) |const| :ref:`🔗<class_KinematicCollision3D_method_get_travel>` Returns the moving object's travel before collision. @@ -241,3 +241,4 @@ Returns the moving object's travel before collision. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_label.rst b/classes/class_label.rst index f3d2252ea71..909c66b28b5 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: text + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -26,7 +29,7 @@ A control for displaying plain text. It gives you control over the horizontal an Tutorials --------- -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ .. rst-class:: classref-reftable-group @@ -41,9 +44,11 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`clip_text<class_Label_property_clip_text>` | ``false`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`ellipsis_char<class_Label_property_ellipsis_char>` | ``"…"`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_Label_property_horizontal_alignment>` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`justification_flags<class_Label_property_justification_flags>` | ``163`` | + | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_Label_property_justification_flags>` | ``163`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`LabelSettings<class_LabelSettings>` | :ref:`label_settings<class_Label_property_label_settings>` | | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -55,7 +60,7 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`MouseFilter<enum_Control_MouseFilter>` | mouse_filter | ``2`` (overrides :ref:`Control<class_Control_property_mouse_filter>`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``4`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``4`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`structured_text_bidi_override<class_Label_property_structured_text_bidi_override>` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -88,15 +93,17 @@ Methods .. table:: :widths: auto - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_count<class_Label_method_get_line_count>` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_height<class_Label_method_get_line_height>` **(** :ref:`int<class_int>` line=-1 **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_total_character_count<class_Label_method_get_total_character_count>` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_Label_method_get_visible_line_count>` **(** **)** |const| | - +-----------------------+--------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_character_bounds<class_Label_method_get_character_bounds>`\ (\ pos\: :ref:`int<class_int>`\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_count<class_Label_method_get_line_count>`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_height<class_Label_method_get_line_height>`\ (\ line\: :ref:`int<class_int>` = -1\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_total_character_count<class_Label_method_get_total_character_count>`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_Label_method_get_visible_line_count>`\ (\ ) |const| | + +---------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -109,7 +116,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`Color<class_Color>` | :ref:`font_color<class_Label_theme_color_font_color>` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Label_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Label_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +---------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_Label_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 0)`` | +---------------------------------+----------------------------------------------------------------------------+-----------------------+ @@ -143,12 +150,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` :ref:`🔗<class_Label_property_autowrap_mode>` .. rst-class:: classref-property-setget -- void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)** -- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)** +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) +- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ ) If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -160,12 +167,12 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_co .. rst-class:: classref-property -:ref:`bool<class_bool>` **clip_text** = ``false`` +:ref:`bool<class_bool>` **clip_text** = ``false`` :ref:`🔗<class_Label_property_clip_text>` .. rst-class:: classref-property-setget -- void **set_clip_text** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_clipping_text** **(** **)** +- |void| **set_clip_text**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_clipping_text**\ (\ ) If ``true``, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. @@ -173,16 +180,33 @@ If ``true``, the Label only shows the text that fits inside its bounding rectang ---- +.. _class_Label_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **ellipsis_char** = ``"…"`` :ref:`🔗<class_Label_property_ellipsis_char>` + +.. rst-class:: classref-property-setget + +- |void| **set_ellipsis_char**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_ellipsis_char**\ (\ ) + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_horizontal_alignment: .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``0`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``0`` :ref:`🔗<class_Label_property_horizontal_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants. @@ -194,12 +218,12 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill .. rst-class:: classref-property -|bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **justification_flags** = ``163`` +|bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_Label_property_justification_flags>` .. rst-class:: classref-property-setget -- void **set_justification_flags** **(** |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> value **)** -- |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **get_justification_flags** **(** **)** +- |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) +- |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ ) Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`. @@ -211,12 +235,12 @@ Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextSe .. rst-class:: classref-property -:ref:`LabelSettings<class_LabelSettings>` **label_settings** +:ref:`LabelSettings<class_LabelSettings>` **label_settings** :ref:`🔗<class_Label_property_label_settings>` .. rst-class:: classref-property-setget -- void **set_label_settings** **(** :ref:`LabelSettings<class_LabelSettings>` value **)** -- :ref:`LabelSettings<class_LabelSettings>` **get_label_settings** **(** **)** +- |void| **set_label_settings**\ (\ value\: :ref:`LabelSettings<class_LabelSettings>`\ ) +- :ref:`LabelSettings<class_LabelSettings>` **get_label_settings**\ (\ ) A :ref:`LabelSettings<class_LabelSettings>` resource that can be shared between multiple **Label** nodes. Takes priority over theme properties. @@ -228,12 +252,12 @@ A :ref:`LabelSettings<class_LabelSettings>` resource that can be shared between .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_Label_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -245,14 +269,14 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`int<class_int>` **lines_skipped** = ``0`` +:ref:`int<class_int>` **lines_skipped** = ``0`` :ref:`🔗<class_Label_property_lines_skipped>` .. rst-class:: classref-property-setget -- void **set_lines_skipped** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_lines_skipped** **(** **)** +- |void| **set_lines_skipped**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_lines_skipped**\ (\ ) -The node ignores the first ``lines_skipped`` lines before it starts to display text. +The number of the lines ignored and not displayed from the start of the :ref:`text<class_Label_property_text>` value. .. rst-class:: classref-item-separator @@ -262,12 +286,12 @@ The node ignores the first ``lines_skipped`` lines before it starts to display t .. rst-class:: classref-property -:ref:`int<class_int>` **max_lines_visible** = ``-1`` +:ref:`int<class_int>` **max_lines_visible** = ``-1`` :ref:`🔗<class_Label_property_max_lines_visible>` .. rst-class:: classref-property-setget -- void **set_max_lines_visible** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_lines_visible** **(** **)** +- |void| **set_max_lines_visible**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_lines_visible**\ (\ ) Limits the lines of text the node shows on screen. @@ -279,12 +303,12 @@ Limits the lines of text the node shows on screen. .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_Label_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -296,12 +320,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_Label_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -313,15 +337,17 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **tab_stops** = ``PackedFloat32Array()`` +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **tab_stops** = ``PackedFloat32Array()`` :ref:`🔗<class_Label_property_tab_stops>` .. rst-class:: classref-property-setget -- void **set_tab_stops** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)** -- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_tab_stops** **(** **)** +- |void| **set_tab_stops**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) +- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_tab_stops**\ (\ ) Aligns text to the given tab-stops. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array<class_PackedFloat32Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -330,12 +356,12 @@ Aligns text to the given tab-stops. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_Label_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) The text to display on screen. @@ -347,12 +373,12 @@ The text to display on screen. .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_Label_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -364,12 +390,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``0`` +:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``0`` :ref:`🔗<class_Label_property_text_overrun_behavior>` .. rst-class:: classref-property-setget -- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` value **)** -- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior** **(** **)** +- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) +- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes. @@ -381,12 +407,12 @@ Sets the clipping behavior when the text exceeds the node's bounding rectangle. .. rst-class:: classref-property -:ref:`bool<class_bool>` **uppercase** = ``false`` +:ref:`bool<class_bool>` **uppercase** = ``false`` :ref:`🔗<class_Label_property_uppercase>` .. rst-class:: classref-property-setget -- void **set_uppercase** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_uppercase** **(** **)** +- |void| **set_uppercase**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_uppercase**\ (\ ) If ``true``, all the text displays as UPPERCASE. @@ -398,12 +424,12 @@ If ``true``, all the text displays as UPPERCASE. .. rst-class:: classref-property -:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``0`` +:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``0`` :ref:`🔗<class_Label_property_vertical_alignment>` .. rst-class:: classref-property-setget -- void **set_vertical_alignment** **(** :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` value **)** -- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment** **(** **)** +- |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ ) +- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ ) Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` constants. @@ -415,12 +441,12 @@ Controls the text's vertical alignment. Supports top, center, bottom, and fill. .. rst-class:: classref-property -:ref:`int<class_int>` **visible_characters** = ``-1`` +:ref:`int<class_int>` **visible_characters** = ``-1`` :ref:`🔗<class_Label_property_visible_characters>` .. rst-class:: classref-property-setget -- void **set_visible_characters** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_visible_characters** **(** **)** +- |void| **set_visible_characters**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_visible_characters**\ (\ ) The number of characters to display. If set to ``-1``, all characters are displayed. This can be useful when animating the text appearing in a dialog box. @@ -434,12 +460,12 @@ The number of characters to display. If set to ``-1``, all characters are displa .. rst-class:: classref-property -:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0`` +:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0`` :ref:`🔗<class_Label_property_visible_characters_behavior>` .. rst-class:: classref-property-setget -- void **set_visible_characters_behavior** **(** :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` value **)** -- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior** **(** **)** +- |void| **set_visible_characters_behavior**\ (\ value\: :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>`\ ) +- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior**\ (\ ) Sets the clipping behavior when :ref:`visible_characters<class_Label_property_visible_characters>` or :ref:`visible_ratio<class_Label_property_visible_ratio>` is set. See :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` for more info. @@ -451,12 +477,12 @@ Sets the clipping behavior when :ref:`visible_characters<class_Label_property_vi .. rst-class:: classref-property -:ref:`float<class_float>` **visible_ratio** = ``1.0`` +:ref:`float<class_float>` **visible_ratio** = ``1.0`` :ref:`🔗<class_Label_property_visible_ratio>` .. rst-class:: classref-property-setget -- void **set_visible_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visible_ratio** **(** **)** +- |void| **set_visible_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visible_ratio**\ (\ ) The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count<class_Label_method_get_total_character_count>`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. @@ -471,11 +497,23 @@ The fraction of characters to display, relative to the total number of character Method Descriptions ------------------- +.. _class_Label_method_get_character_bounds: + +.. rst-class:: classref-method + +:ref:`Rect2<class_Rect2>` **get_character_bounds**\ (\ pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Label_method_get_character_bounds>` + +Returns the bounding rectangle of the character at position ``pos``. If the character is a non-visual character or ``pos`` is outside the valid range, an empty :ref:`Rect2<class_Rect2>` is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_method_get_line_count: .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_Label_method_get_line_count>` Returns the number of lines of text the Label has. @@ -487,7 +525,7 @@ Returns the number of lines of text the Label has. .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_height** **(** :ref:`int<class_int>` line=-1 **)** |const| +:ref:`int<class_int>` **get_line_height**\ (\ line\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_Label_method_get_line_height>` Returns the height of the line ``line``. @@ -503,7 +541,7 @@ If there are no lines, returns font size in pixels. .. rst-class:: classref-method -:ref:`int<class_int>` **get_total_character_count** **(** **)** |const| +:ref:`int<class_int>` **get_total_character_count**\ (\ ) |const| :ref:`🔗<class_Label_method_get_total_character_count>` Returns the total number of printable characters in the text (excluding spaces and newlines). @@ -515,7 +553,7 @@ Returns the total number of printable characters in the text (excluding spaces a .. rst-class:: classref-method -:ref:`int<class_int>` **get_visible_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_visible_line_count**\ (\ ) |const| :ref:`🔗<class_Label_method_get_visible_line_count>` Returns the number of lines shown. Useful if the **Label**'s height cannot currently display all lines. @@ -532,7 +570,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Label_theme_color_font_color>` Default text :ref:`Color<class_Color>` of the **Label**. @@ -544,7 +582,7 @@ Default text :ref:`Color<class_Color>` of the **Label**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Label_theme_color_font_outline_color>` The color of text outline. @@ -556,7 +594,7 @@ The color of text outline. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_Label_theme_color_font_shadow_color>` :ref:`Color<class_Color>` of the text's shadow effect. @@ -568,7 +606,7 @@ The color of text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **line_spacing** = ``3`` +:ref:`int<class_int>` **line_spacing** = ``3`` :ref:`🔗<class_Label_theme_constant_line_spacing>` Vertical space between lines in multiline **Label**. @@ -580,12 +618,14 @@ Vertical space between lines in multiline **Label**. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_Label_theme_constant_outline_size>` Text outline size. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_Label_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. +\ **Note:** Using a value that is larger than half the font size is not recommended, as the font outline may fail to be fully closed in this case. + .. rst-class:: classref-item-separator ---- @@ -594,7 +634,7 @@ Text outline size. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_offset_x** = ``1`` +:ref:`int<class_int>` **shadow_offset_x** = ``1`` :ref:`🔗<class_Label_theme_constant_shadow_offset_x>` The horizontal offset of the text's shadow. @@ -606,7 +646,7 @@ The horizontal offset of the text's shadow. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_offset_y** = ``1`` +:ref:`int<class_int>` **shadow_offset_y** = ``1`` :ref:`🔗<class_Label_theme_constant_shadow_offset_y>` The vertical offset of the text's shadow. @@ -618,7 +658,7 @@ The vertical offset of the text's shadow. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_outline_size** = ``1`` +:ref:`int<class_int>` **shadow_outline_size** = ``1`` :ref:`🔗<class_Label_theme_constant_shadow_outline_size>` The size of the shadow outline. @@ -630,7 +670,7 @@ The size of the shadow outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_Label_theme_font_font>` :ref:`Font<class_Font>` used for the **Label**'s text. @@ -642,7 +682,7 @@ The size of the shadow outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_Label_theme_font_size_font_size>` Font size of the **Label**'s text. @@ -654,7 +694,7 @@ Font size of the **Label**'s text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **normal** +:ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_Label_theme_style_normal>` Background :ref:`StyleBox<class_StyleBox>` for the **Label**. @@ -665,3 +705,4 @@ Background :ref:`StyleBox<class_StyleBox>` for the **Label**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst index cd299ff2dbc..594fc95ac52 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: text + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -21,6 +24,13 @@ Description A node for displaying plain text in 3D space. By adjusting various properties of this node, you can configure things such as the text's appearance and whether it always faces the camera. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`3D text <../tutorials/3d/3d_text>` + .. rst-class:: classref-reftable-group Properties @@ -58,7 +68,7 @@ Properties +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_Label3D_property_horizontal_alignment>` | ``1`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`justification_flags<class_Label3D_property_justification_flags>` | ``163`` | + | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_Label3D_property_justification_flags>` | ``163`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`language<class_Label3D_property_language>` | ``""`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ @@ -107,13 +117,13 @@ Methods .. table:: :widths: auto - +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Label3D_method_generate_triangle_mesh>` **(** **)** |const| | - +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_Label3D_method_get_draw_flag>` **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| | - +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_draw_flag<class_Label3D_method_set_draw_flag>` **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Label3D_method_generate_triangle_mesh>`\ (\ ) |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_Label3D_method_get_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_draw_flag<class_Label3D_method_set_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -128,7 +138,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawFlags**: +enum **DrawFlags**: :ref:`🔗<enum_Label3D_DrawFlags>` .. _class_Label3D_constant_FLAG_SHADED: @@ -178,7 +188,7 @@ Represents the size of the :ref:`DrawFlags<enum_Label3D_DrawFlags>` enum. .. rst-class:: classref-enumeration -enum **AlphaCutMode**: +enum **AlphaCutMode**: :ref:`🔗<enum_Label3D_AlphaCutMode>` .. _class_Label3D_constant_ALPHA_CUT_DISABLED: @@ -231,12 +241,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` +:ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_edge>` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing_edge** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_antialiasing_edge** **(** **)** +- |void| **set_alpha_antialiasing_edge**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_antialiasing_edge**\ (\ ) Threshold at which antialiasing will be applied on the alpha channel. @@ -248,12 +258,12 @@ Threshold at which antialiasing will be applied on the alpha channel. .. rst-class:: classref-property -:ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` +:ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` :ref:`🔗<class_Label3D_property_alpha_antialiasing_mode>` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing** **(** :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` value **)** -- :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing** **(** **)** +- |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`\ ) +- :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing**\ (\ ) The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`. @@ -265,12 +275,12 @@ The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMa .. rst-class:: classref-property -:ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **alpha_cut** = ``0`` +:ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **alpha_cut** = ``0`` :ref:`🔗<class_Label3D_property_alpha_cut>` .. rst-class:: classref-property-setget -- void **set_alpha_cut_mode** **(** :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` value **)** -- :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **get_alpha_cut_mode** **(** **)** +- |void| **set_alpha_cut_mode**\ (\ value\: :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>`\ ) +- :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` **get_alpha_cut_mode**\ (\ ) The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_Label3D_AlphaCutMode>` for possible values. @@ -282,12 +292,12 @@ The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_Label3 .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` +:ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` :ref:`🔗<class_Label3D_property_alpha_hash_scale>` .. rst-class:: classref-property-setget -- void **set_alpha_hash_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_hash_scale** **(** **)** +- |void| **set_alpha_hash_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_hash_scale**\ (\ ) The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. @@ -299,12 +309,12 @@ The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` +:ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` :ref:`🔗<class_Label3D_property_alpha_scissor_threshold>` .. rst-class:: classref-property-setget -- void **set_alpha_scissor_threshold** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_scissor_threshold** **(** **)** +- |void| **set_alpha_scissor_threshold**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_scissor_threshold**\ (\ ) Threshold at which the alpha scissor will discard values. @@ -316,12 +326,12 @@ Threshold at which the alpha scissor will discard values. .. rst-class:: classref-property -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` :ref:`🔗<class_Label3D_property_autowrap_mode>` .. rst-class:: classref-property-setget -- void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)** -- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)** +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) +- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ ) If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -333,12 +343,12 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_co .. rst-class:: classref-property -:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` +:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` :ref:`🔗<class_Label3D_property_billboard>` .. rst-class:: classref-property-setget -- void **set_billboard_mode** **(** :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` value **)** -- :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode** **(** **)** +- |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>`\ ) +- :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode**\ (\ ) The billboard mode to use for the label. See :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` for possible values. @@ -350,12 +360,12 @@ The billboard mode to use for the label. See :ref:`BillboardMode<enum_BaseMateri .. rst-class:: classref-property -:ref:`bool<class_bool>` **double_sided** = ``true`` +:ref:`bool<class_bool>` **double_sided** = ``true`` :ref:`🔗<class_Label3D_property_double_sided>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| If ``true``, text can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. @@ -367,12 +377,12 @@ If ``true``, text can be seen from the back as well, if ``false``, it is invisib .. rst-class:: classref-property -:ref:`bool<class_bool>` **fixed_size** = ``false`` +:ref:`bool<class_bool>` **fixed_size** = ``false`` :ref:`🔗<class_Label3D_property_fixed_size>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| If ``true``, the label is rendered at the same size regardless of distance. @@ -384,12 +394,12 @@ If ``true``, the label is rendered at the same size regardless of distance. .. rst-class:: classref-property -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_Label3D_property_font>` .. rst-class:: classref-property-setget -- void **set_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_font** **(** **)** +- |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_font**\ (\ ) Font configuration used to display text. @@ -401,12 +411,12 @@ Font configuration used to display text. .. rst-class:: classref-property -:ref:`int<class_int>` **font_size** = ``32`` +:ref:`int<class_int>` **font_size** = ``32`` :ref:`🔗<class_Label3D_property_font_size>` .. rst-class:: classref-property-setget -- void **set_font_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_size** **(** **)** +- |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_size**\ (\ ) Font size of the **Label3D**'s text. To make the font look more detailed when up close, increase :ref:`font_size<class_Label3D_property_font_size>` while decreasing :ref:`pixel_size<class_Label3D_property_pixel_size>` at the same time. @@ -420,12 +430,12 @@ Higher font sizes require more time to render new characters, which can cause st .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` :ref:`🔗<class_Label3D_property_horizontal_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants. @@ -437,12 +447,12 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill .. rst-class:: classref-property -|bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **justification_flags** = ``163`` +|bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_Label3D_property_justification_flags>` .. rst-class:: classref-property-setget -- void **set_justification_flags** **(** |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> value **)** -- |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **get_justification_flags** **(** **)** +- |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) +- |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ ) Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`. @@ -454,12 +464,12 @@ Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextSe .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_Label3D_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -471,12 +481,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`float<class_float>` **line_spacing** = ``0.0`` +:ref:`float<class_float>` **line_spacing** = ``0.0`` :ref:`🔗<class_Label3D_property_line_spacing>` .. rst-class:: classref-property-setget -- void **set_line_spacing** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_line_spacing** **(** **)** +- |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_line_spacing**\ (\ ) Vertical space between lines in multiline **Label3D**. @@ -488,12 +498,12 @@ Vertical space between lines in multiline **Label3D**. .. rst-class:: classref-property -:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Label3D_property_modulate>` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_modulate**\ (\ ) Text :ref:`Color<class_Color>` of the **Label3D**. @@ -505,12 +515,12 @@ Text :ref:`Color<class_Color>` of the **Label3D**. .. rst-class:: classref-property -:ref:`bool<class_bool>` **no_depth_test** = ``false`` +:ref:`bool<class_bool>` **no_depth_test** = ``false`` :ref:`🔗<class_Label3D_property_no_depth_test>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| If ``true``, depth testing is disabled and the object will be drawn in render order. @@ -522,12 +532,12 @@ If ``true``, depth testing is disabled and the object will be drawn in render or .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Label3D_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) The text drawing offset (in pixels). @@ -539,12 +549,12 @@ The text drawing offset (in pixels). .. rst-class:: classref-property -:ref:`Color<class_Color>` **outline_modulate** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Label3D_property_outline_modulate>` .. rst-class:: classref-property-setget -- void **set_outline_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_outline_modulate** **(** **)** +- |void| **set_outline_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_outline_modulate**\ (\ ) The tint of text outline. @@ -556,12 +566,12 @@ The tint of text outline. .. rst-class:: classref-property -:ref:`int<class_int>` **outline_render_priority** = ``-1`` +:ref:`int<class_int>` **outline_render_priority** = ``-1`` :ref:`🔗<class_Label3D_property_outline_render_priority>` .. rst-class:: classref-property-setget -- void **set_outline_render_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_outline_render_priority** **(** **)** +- |void| **set_outline_render_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_outline_render_priority**\ (\ ) Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. @@ -577,12 +587,12 @@ Sets the render priority for the text outline. Higher priority objects will be s .. rst-class:: classref-property -:ref:`int<class_int>` **outline_size** = ``12`` +:ref:`int<class_int>` **outline_size** = ``12`` :ref:`🔗<class_Label3D_property_outline_size>` .. rst-class:: classref-property-setget -- void **set_outline_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_outline_size** **(** **)** +- |void| **set_outline_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_outline_size**\ (\ ) Text outline size. @@ -594,12 +604,12 @@ Text outline size. .. rst-class:: classref-property -:ref:`float<class_float>` **pixel_size** = ``0.005`` +:ref:`float<class_float>` **pixel_size** = ``0.005`` :ref:`🔗<class_Label3D_property_pixel_size>` .. rst-class:: classref-property-setget -- void **set_pixel_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pixel_size** **(** **)** +- |void| **set_pixel_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pixel_size**\ (\ ) The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase :ref:`font_size<class_Label3D_property_font_size>` while decreasing :ref:`pixel_size<class_Label3D_property_pixel_size>` at the same time. @@ -611,12 +621,12 @@ The size of one pixel's width on the label to scale it in 3D. To make the font l .. rst-class:: classref-property -:ref:`int<class_int>` **render_priority** = ``0`` +:ref:`int<class_int>` **render_priority** = ``0`` :ref:`🔗<class_Label3D_property_render_priority>` .. rst-class:: classref-property-setget -- void **set_render_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_render_priority** **(** **)** +- |void| **set_render_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_render_priority**\ (\ ) Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. @@ -632,12 +642,12 @@ Sets the render priority for the text. Higher priority objects will be sorted in .. rst-class:: classref-property -:ref:`bool<class_bool>` **shaded** = ``false`` +:ref:`bool<class_bool>` **shaded** = ``false`` :ref:`🔗<class_Label3D_property_shaded>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_Environment>` has effects on the label. @@ -649,12 +659,12 @@ If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_En .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -666,12 +676,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_Label3D_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -683,12 +693,12 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_Label3D_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) The text to display on screen. @@ -700,12 +710,12 @@ The text to display on screen. .. rst-class:: classref-property -:ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` +:ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` :ref:`🔗<class_Label3D_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`Direction<enum_TextServer_Direction>` value **)** -- :ref:`Direction<enum_TextServer_Direction>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ ) +- :ref:`Direction<enum_TextServer_Direction>` **get_text_direction**\ (\ ) Base text writing direction. @@ -717,12 +727,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` +:ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` :ref:`🔗<class_Label3D_property_texture_filter>` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` value **)** -- :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>`\ ) +- :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter**\ (\ ) Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` for options. @@ -734,12 +744,12 @@ Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_Textur .. rst-class:: classref-property -:ref:`bool<class_bool>` **uppercase** = ``false`` +:ref:`bool<class_bool>` **uppercase** = ``false`` :ref:`🔗<class_Label3D_property_uppercase>` .. rst-class:: classref-property-setget -- void **set_uppercase** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_uppercase** **(** **)** +- |void| **set_uppercase**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_uppercase**\ (\ ) If ``true``, all the text displays as UPPERCASE. @@ -751,12 +761,12 @@ If ``true``, all the text displays as UPPERCASE. .. rst-class:: classref-property -:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` +:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` :ref:`🔗<class_Label3D_property_vertical_alignment>` .. rst-class:: classref-property-setget -- void **set_vertical_alignment** **(** :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` value **)** -- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment** **(** **)** +- |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ ) +- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ ) Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` constants. @@ -768,12 +778,12 @@ Controls the text's vertical alignment. Supports top, center, bottom. Set it to .. rst-class:: classref-property -:ref:`float<class_float>` **width** = ``500.0`` +:ref:`float<class_float>` **width** = ``500.0`` :ref:`🔗<class_Label3D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_width**\ (\ ) Text width (in pixels), used for autowrap and fill alignment. @@ -790,7 +800,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh** **(** **)** |const| +:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh**\ (\ ) |const| :ref:`🔗<class_Label3D_method_generate_triangle_mesh>` Returns a :ref:`TriangleMesh<class_TriangleMesh>` with the label's vertices following its current configuration (such as its :ref:`pixel_size<class_Label3D_property_pixel_size>`). @@ -802,7 +812,7 @@ Returns a :ref:`TriangleMesh<class_TriangleMesh>` with the label's vertices foll .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag **)** |const| +:ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`\ ) |const| :ref:`🔗<class_Label3D_method_get_draw_flag>` Returns the value of the specified flag. @@ -814,7 +824,7 @@ Returns the value of the specified flag. .. rst-class:: classref-method -void **set_draw_flag** **(** :ref:`DrawFlags<enum_Label3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_Label3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Label3D_method_set_draw_flag>` If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_Label3D_DrawFlags>` for a list of flags. @@ -825,3 +835,4 @@ If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_Label3 .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_labelsettings.rst b/classes/class_labelsettings.rst index 57c7a3ad623..f05cae06895 100644 --- a/classes/class_labelsettings.rst +++ b/classes/class_labelsettings.rst @@ -62,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_LabelSettings_property_font>` .. rst-class:: classref-property-setget -- void **set_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_font** **(** **)** +- |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_font**\ (\ ) :ref:`Font<class_Font>` used for the text. @@ -79,12 +79,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **font_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LabelSettings_property_font_color>` .. rst-class:: classref-property-setget -- void **set_font_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_font_color** **(** **)** +- |void| **set_font_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_font_color**\ (\ ) Color of the text. @@ -96,12 +96,12 @@ Color of the text. .. rst-class:: classref-property -:ref:`int<class_int>` **font_size** = ``16`` +:ref:`int<class_int>` **font_size** = ``16`` :ref:`🔗<class_LabelSettings_property_font_size>` .. rst-class:: classref-property-setget -- void **set_font_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_size** **(** **)** +- |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_size**\ (\ ) Size of the text. @@ -113,12 +113,12 @@ Size of the text. .. rst-class:: classref-property -:ref:`float<class_float>` **line_spacing** = ``3.0`` +:ref:`float<class_float>` **line_spacing** = ``3.0`` :ref:`🔗<class_LabelSettings_property_line_spacing>` .. rst-class:: classref-property-setget -- void **set_line_spacing** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_line_spacing** **(** **)** +- |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_line_spacing**\ (\ ) Vertical space between lines when the text is multiline. @@ -130,12 +130,12 @@ Vertical space between lines when the text is multiline. .. rst-class:: classref-property -:ref:`Color<class_Color>` **outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **outline_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LabelSettings_property_outline_color>` .. rst-class:: classref-property-setget -- void **set_outline_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_outline_color** **(** **)** +- |void| **set_outline_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_outline_color**\ (\ ) The color of the outline. @@ -147,12 +147,12 @@ The color of the outline. .. rst-class:: classref-property -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_LabelSettings_property_outline_size>` .. rst-class:: classref-property-setget -- void **set_outline_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_outline_size** **(** **)** +- |void| **set_outline_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_outline_size**\ (\ ) Text outline size. @@ -164,12 +164,12 @@ Text outline size. .. rst-class:: classref-property -:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_LabelSettings_property_shadow_color>` .. rst-class:: classref-property-setget -- void **set_shadow_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_shadow_color** **(** **)** +- |void| **set_shadow_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_shadow_color**\ (\ ) Color of the shadow effect. If alpha is ``0``, no shadow will be drawn. @@ -181,12 +181,12 @@ Color of the shadow effect. If alpha is ``0``, no shadow will be drawn. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **shadow_offset** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **shadow_offset** = ``Vector2(1, 1)`` :ref:`🔗<class_LabelSettings_property_shadow_offset>` .. rst-class:: classref-property-setget -- void **set_shadow_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_shadow_offset** **(** **)** +- |void| **set_shadow_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_shadow_offset**\ (\ ) Offset of the shadow effect, in pixels. @@ -198,12 +198,12 @@ Offset of the shadow effect, in pixels. .. rst-class:: classref-property -:ref:`int<class_int>` **shadow_size** = ``1`` +:ref:`int<class_int>` **shadow_size** = ``1`` :ref:`🔗<class_LabelSettings_property_shadow_size>` .. rst-class:: classref-property-setget -- void **set_shadow_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_shadow_size** **(** **)** +- |void| **set_shadow_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_shadow_size**\ (\ ) Size of the shadow effect. @@ -214,3 +214,4 @@ Size of the shadow effect. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_light2d.rst b/classes/class_light2d.rst index 1e6df3b14db..1d3e10ea0c4 100644 --- a/classes/class_light2d.rst +++ b/classes/class_light2d.rst @@ -78,11 +78,11 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_height<class_Light2D_method_get_height>` **(** **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------+ - | void | :ref:`set_height<class_Light2D_method_set_height>` **(** :ref:`float<class_float>` height **)** | - +---------------------------+-------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_height<class_Light2D_method_get_height>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_height<class_Light2D_method_set_height>`\ (\ height\: :ref:`float<class_float>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -97,7 +97,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ShadowFilter**: +enum **ShadowFilter**: :ref:`🔗<enum_Light2D_ShadowFilter>` .. _class_Light2D_constant_SHADOW_FILTER_NONE: @@ -131,7 +131,7 @@ Percentage closer filtering (13 samples) applies to the shadow map. This is the .. rst-class:: classref-enumeration -enum **BlendMode**: +enum **BlendMode**: :ref:`🔗<enum_Light2D_BlendMode>` .. _class_Light2D_constant_BLEND_MODE_ADD: @@ -170,12 +170,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BlendMode<enum_Light2D_BlendMode>` **blend_mode** = ``0`` +:ref:`BlendMode<enum_Light2D_BlendMode>` **blend_mode** = ``0`` :ref:`🔗<class_Light2D_property_blend_mode>` .. rst-class:: classref-property-setget -- void **set_blend_mode** **(** :ref:`BlendMode<enum_Light2D_BlendMode>` value **)** -- :ref:`BlendMode<enum_Light2D_BlendMode>` **get_blend_mode** **(** **)** +- |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode<enum_Light2D_BlendMode>`\ ) +- :ref:`BlendMode<enum_Light2D_BlendMode>` **get_blend_mode**\ (\ ) The Light2D's blend mode. See :ref:`BlendMode<enum_Light2D_BlendMode>` constants for values. @@ -187,12 +187,12 @@ The Light2D's blend mode. See :ref:`BlendMode<enum_Light2D_BlendMode>` constants .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Light2D_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) The Light2D's :ref:`Color<class_Color>`. @@ -204,12 +204,12 @@ The Light2D's :ref:`Color<class_Color>`. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor_only** = ``false`` +:ref:`bool<class_bool>` **editor_only** = ``false`` :ref:`🔗<class_Light2D_property_editor_only>` .. rst-class:: classref-property-setget -- void **set_editor_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editor_only** **(** **)** +- |void| **set_editor_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editor_only**\ (\ ) If ``true``, Light2D will only appear when editing the scene. @@ -221,12 +221,12 @@ If ``true``, Light2D will only appear when editing the scene. .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_Light2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) If ``true``, Light2D will emit light. @@ -238,12 +238,12 @@ If ``true``, Light2D will emit light. .. rst-class:: classref-property -:ref:`float<class_float>` **energy** = ``1.0`` +:ref:`float<class_float>` **energy** = ``1.0`` :ref:`🔗<class_Light2D_property_energy>` .. rst-class:: classref-property-setget -- void **set_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_energy** **(** **)** +- |void| **set_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_energy**\ (\ ) The Light2D's energy value. The larger the value, the stronger the light. @@ -255,12 +255,12 @@ The Light2D's energy value. The larger the value, the stronger the light. .. rst-class:: classref-property -:ref:`int<class_int>` **range_item_cull_mask** = ``1`` +:ref:`int<class_int>` **range_item_cull_mask** = ``1`` :ref:`🔗<class_Light2D_property_range_item_cull_mask>` .. rst-class:: classref-property-setget -- void **set_item_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_cull_mask** **(** **)** +- |void| **set_item_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_cull_mask**\ (\ ) The layer mask. Only objects with a matching :ref:`CanvasItem.light_mask<class_CanvasItem_property_light_mask>` will be affected by the Light2D. See also :ref:`shadow_item_cull_mask<class_Light2D_property_shadow_item_cull_mask>`, which affects which objects can cast shadows. @@ -274,12 +274,12 @@ The layer mask. Only objects with a matching :ref:`CanvasItem.light_mask<class_C .. rst-class:: classref-property -:ref:`int<class_int>` **range_layer_max** = ``0`` +:ref:`int<class_int>` **range_layer_max** = ``0`` :ref:`🔗<class_Light2D_property_range_layer_max>` .. rst-class:: classref-property-setget -- void **set_layer_range_max** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_layer_range_max** **(** **)** +- |void| **set_layer_range_max**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_layer_range_max**\ (\ ) Maximum layer value of objects that are affected by the Light2D. @@ -291,12 +291,12 @@ Maximum layer value of objects that are affected by the Light2D. .. rst-class:: classref-property -:ref:`int<class_int>` **range_layer_min** = ``0`` +:ref:`int<class_int>` **range_layer_min** = ``0`` :ref:`🔗<class_Light2D_property_range_layer_min>` .. rst-class:: classref-property-setget -- void **set_layer_range_min** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_layer_range_min** **(** **)** +- |void| **set_layer_range_min**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_layer_range_min**\ (\ ) Minimum layer value of objects that are affected by the Light2D. @@ -308,12 +308,12 @@ Minimum layer value of objects that are affected by the Light2D. .. rst-class:: classref-property -:ref:`int<class_int>` **range_z_max** = ``1024`` +:ref:`int<class_int>` **range_z_max** = ``1024`` :ref:`🔗<class_Light2D_property_range_z_max>` .. rst-class:: classref-property-setget -- void **set_z_range_max** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_z_range_max** **(** **)** +- |void| **set_z_range_max**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_z_range_max**\ (\ ) Maximum ``z`` value of objects that are affected by the Light2D. @@ -325,12 +325,12 @@ Maximum ``z`` value of objects that are affected by the Light2D. .. rst-class:: classref-property -:ref:`int<class_int>` **range_z_min** = ``-1024`` +:ref:`int<class_int>` **range_z_min** = ``-1024`` :ref:`🔗<class_Light2D_property_range_z_min>` .. rst-class:: classref-property-setget -- void **set_z_range_min** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_z_range_min** **(** **)** +- |void| **set_z_range_min**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_z_range_min**\ (\ ) Minimum ``z`` value of objects that are affected by the Light2D. @@ -342,12 +342,12 @@ Minimum ``z`` value of objects that are affected by the Light2D. .. rst-class:: classref-property -:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_Light2D_property_shadow_color>` .. rst-class:: classref-property-setget -- void **set_shadow_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_shadow_color** **(** **)** +- |void| **set_shadow_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_shadow_color**\ (\ ) :ref:`Color<class_Color>` of shadows cast by the Light2D. @@ -359,12 +359,12 @@ Minimum ``z`` value of objects that are affected by the Light2D. .. rst-class:: classref-property -:ref:`bool<class_bool>` **shadow_enabled** = ``false`` +:ref:`bool<class_bool>` **shadow_enabled** = ``false`` :ref:`🔗<class_Light2D_property_shadow_enabled>` .. rst-class:: classref-property-setget -- void **set_shadow_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shadow_enabled** **(** **)** +- |void| **set_shadow_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shadow_enabled**\ (\ ) If ``true``, the Light2D will cast shadows. @@ -376,12 +376,12 @@ If ``true``, the Light2D will cast shadows. .. rst-class:: classref-property -:ref:`ShadowFilter<enum_Light2D_ShadowFilter>` **shadow_filter** = ``0`` +:ref:`ShadowFilter<enum_Light2D_ShadowFilter>` **shadow_filter** = ``0`` :ref:`🔗<class_Light2D_property_shadow_filter>` .. rst-class:: classref-property-setget -- void **set_shadow_filter** **(** :ref:`ShadowFilter<enum_Light2D_ShadowFilter>` value **)** -- :ref:`ShadowFilter<enum_Light2D_ShadowFilter>` **get_shadow_filter** **(** **)** +- |void| **set_shadow_filter**\ (\ value\: :ref:`ShadowFilter<enum_Light2D_ShadowFilter>`\ ) +- :ref:`ShadowFilter<enum_Light2D_ShadowFilter>` **get_shadow_filter**\ (\ ) Shadow filter type. See :ref:`ShadowFilter<enum_Light2D_ShadowFilter>` for possible values. @@ -393,12 +393,12 @@ Shadow filter type. See :ref:`ShadowFilter<enum_Light2D_ShadowFilter>` for possi .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_filter_smooth** = ``0.0`` +:ref:`float<class_float>` **shadow_filter_smooth** = ``0.0`` :ref:`🔗<class_Light2D_property_shadow_filter_smooth>` .. rst-class:: classref-property-setget -- void **set_shadow_smooth** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_shadow_smooth** **(** **)** +- |void| **set_shadow_smooth**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_shadow_smooth**\ (\ ) Smoothing value for shadows. Higher values will result in softer shadows, at the cost of visible streaks that can appear in shadow rendering. :ref:`shadow_filter_smooth<class_Light2D_property_shadow_filter_smooth>` only has an effect if :ref:`shadow_filter<class_Light2D_property_shadow_filter>` is :ref:`SHADOW_FILTER_PCF5<class_Light2D_constant_SHADOW_FILTER_PCF5>` or :ref:`SHADOW_FILTER_PCF13<class_Light2D_constant_SHADOW_FILTER_PCF13>`. @@ -410,12 +410,12 @@ Smoothing value for shadows. Higher values will result in softer shadows, at the .. rst-class:: classref-property -:ref:`int<class_int>` **shadow_item_cull_mask** = ``1`` +:ref:`int<class_int>` **shadow_item_cull_mask** = ``1`` :ref:`🔗<class_Light2D_property_shadow_item_cull_mask>` .. rst-class:: classref-property-setget -- void **set_item_shadow_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_shadow_cull_mask** **(** **)** +- |void| **set_item_shadow_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_shadow_cull_mask**\ (\ ) The shadow mask. Used with :ref:`LightOccluder2D<class_LightOccluder2D>` to cast shadows. Only occluders with a matching :ref:`CanvasItem.light_mask<class_CanvasItem_property_light_mask>` will cast shadows. See also :ref:`range_item_cull_mask<class_Light2D_property_range_item_cull_mask>`, which affects which objects can *receive* the light. @@ -432,7 +432,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_height** **(** **)** |const| +:ref:`float<class_float>` **get_height**\ (\ ) |const| :ref:`🔗<class_Light2D_method_get_height>` Returns the light's height, which is used in 2D normal mapping. See :ref:`PointLight2D.height<class_PointLight2D_property_height>` and :ref:`DirectionalLight2D.height<class_DirectionalLight2D_property_height>`. @@ -444,7 +444,7 @@ Returns the light's height, which is used in 2D normal mapping. See :ref:`PointL .. rst-class:: classref-method -void **set_height** **(** :ref:`float<class_float>` height **)** +|void| **set_height**\ (\ height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Light2D_method_set_height>` Sets the light's height, which is used in 2D normal mapping. See :ref:`PointLight2D.height<class_PointLight2D_property_height>` and :ref:`DirectionalLight2D.height<class_DirectionalLight2D_property_height>`. @@ -455,3 +455,4 @@ Sets the light's height, which is used in 2D normal mapping. See :ref:`PointLigh .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_light3d.rst b/classes/class_light3d.rst index 13a5cc3bb7e..01e15d35d7b 100644 --- a/classes/class_light3d.rst +++ b/classes/class_light3d.rst @@ -30,7 +30,9 @@ Tutorials - :doc:`3D lights and shadows <../tutorials/3d/lights_and_shadows>` -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` + +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -102,13 +104,13 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_correlated_color<class_Light3D_method_get_correlated_color>` **(** **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param<class_Light3D_method_get_param>` **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param<class_Light3D_method_set_param>` **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_correlated_color<class_Light3D_method_get_correlated_color>`\ (\ ) |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param<class_Light3D_method_get_param>`\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param<class_Light3D_method_set_param>`\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -123,7 +125,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗<enum_Light3D_Param>` .. _class_Light3D_constant_PARAM_ENERGY: @@ -309,7 +311,7 @@ Represents the size of the :ref:`Param<enum_Light3D_Param>` enum. .. rst-class:: classref-enumeration -enum **BakeMode**: +enum **BakeMode**: :ref:`🔗<enum_Light3D_BakeMode>` .. _class_Light3D_constant_BAKE_DISABLED: @@ -319,7 +321,7 @@ enum **BakeMode**: Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. -\ **Note:** Hiding a light does *not* affect baking :ref:`LightmapGI<class_LightmapGI>`. Hiding a light will still affect baking :ref:`VoxelGI<class_VoxelGI>` and SDFGI (see [member Environment.sdfgi_enabled). +\ **Note:** Hiding a light does *not* affect baking :ref:`LightmapGI<class_LightmapGI>`. Hiding a light will still affect baking :ref:`VoxelGI<class_VoxelGI>` and SDFGI (see :ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`). .. _class_Light3D_constant_BAKE_STATIC: @@ -329,6 +331,8 @@ Light is ignored when baking. This is the fastest mode, but the light will be ta Light is taken into account in static baking (:ref:`VoxelGI<class_VoxelGI>`, :ref:`LightmapGI<class_LightmapGI>`, SDFGI (:ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. +\ **Note:** The light is not baked in :ref:`LightmapGI<class_LightmapGI>` if :ref:`editor_only<class_Light3D_property_editor_only>` is ``true``. + .. _class_Light3D_constant_BAKE_DYNAMIC: .. rst-class:: classref-enumeration-constant @@ -350,12 +354,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **distance_fade_begin** = ``40.0`` +:ref:`float<class_float>` **distance_fade_begin** = ``40.0`` :ref:`🔗<class_Light3D_property_distance_fade_begin>` .. rst-class:: classref-property-setget -- void **set_distance_fade_begin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_distance_fade_begin** **(** **)** +- |void| **set_distance_fade_begin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_distance_fade_begin**\ (\ ) The distance from the camera at which the light begins to fade away (in 3D units). @@ -369,12 +373,12 @@ The distance from the camera at which the light begins to fade away (in 3D units .. rst-class:: classref-property -:ref:`bool<class_bool>` **distance_fade_enabled** = ``false`` +:ref:`bool<class_bool>` **distance_fade_enabled** = ``false`` :ref:`🔗<class_Light3D_property_distance_fade_enabled>` .. rst-class:: classref-property-setget -- void **set_enable_distance_fade** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_distance_fade_enabled** **(** **)** +- |void| **set_enable_distance_fade**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_distance_fade_enabled**\ (\ ) If ``true``, the light will smoothly fade away when far from the active :ref:`Camera3D<class_Camera3D>` starting at :ref:`distance_fade_begin<class_Light3D_property_distance_fade_begin>`. This acts as a form of level of detail (LOD). The light will fade out over :ref:`distance_fade_begin<class_Light3D_property_distance_fade_begin>` + :ref:`distance_fade_length<class_Light3D_property_distance_fade_length>`, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active lights in a scene and thus improve performance. @@ -388,12 +392,12 @@ If ``true``, the light will smoothly fade away when far from the active :ref:`Ca .. rst-class:: classref-property -:ref:`float<class_float>` **distance_fade_length** = ``10.0`` +:ref:`float<class_float>` **distance_fade_length** = ``10.0`` :ref:`🔗<class_Light3D_property_distance_fade_length>` .. rst-class:: classref-property-setget -- void **set_distance_fade_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_distance_fade_length** **(** **)** +- |void| **set_distance_fade_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_distance_fade_length**\ (\ ) Distance over which the light and its shadow fades. The light's energy and shadow's opacity is progressively reduced over this distance and is completely invisible at the end. @@ -407,12 +411,12 @@ Distance over which the light and its shadow fades. The light's energy and shado .. rst-class:: classref-property -:ref:`float<class_float>` **distance_fade_shadow** = ``50.0`` +:ref:`float<class_float>` **distance_fade_shadow** = ``50.0`` :ref:`🔗<class_Light3D_property_distance_fade_shadow>` .. rst-class:: classref-property-setget -- void **set_distance_fade_shadow** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_distance_fade_shadow** **(** **)** +- |void| **set_distance_fade_shadow**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_distance_fade_shadow**\ (\ ) The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than :ref:`distance_fade_begin<class_Light3D_property_distance_fade_begin>` + :ref:`distance_fade_length<class_Light3D_property_distance_fade_length>` to further improve performance, as shadow rendering is often more expensive than light rendering itself. @@ -426,14 +430,14 @@ The distance from the camera at which the light's shadow cuts off (in 3D units). .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor_only** = ``false`` +:ref:`bool<class_bool>` **editor_only** = ``false`` :ref:`🔗<class_Light3D_property_editor_only>` .. rst-class:: classref-property-setget -- void **set_editor_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editor_only** **(** **)** +- |void| **set_editor_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editor_only**\ (\ ) -If ``true``, the light only appears in the editor and will not be visible at runtime. +If ``true``, the light only appears in the editor and will not be visible at runtime. If ``true``, the light will never be baked in :ref:`LightmapGI<class_LightmapGI>` regardless of its :ref:`light_bake_mode<class_Light3D_property_light_bake_mode>`. .. rst-class:: classref-item-separator @@ -443,12 +447,12 @@ If ``true``, the light only appears in the editor and will not be visible at run .. rst-class:: classref-property -:ref:`float<class_float>` **light_angular_distance** = ``0.0`` +:ref:`float<class_float>` **light_angular_distance** = ``0.0`` :ref:`🔗<class_Light3D_property_light_angular_distance>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| The light's angular size in degrees. Increasing this will make shadows softer at greater distances (also called percentage-closer soft shadows, or PCSS). Only available for :ref:`DirectionalLight3D<class_DirectionalLight3D>`\ s. For reference, the Sun from the Earth is approximately ``0.5``. Increasing this value above ``0.0`` for lights with shadows enabled will have a noticeable performance cost due to PCSS. @@ -464,12 +468,12 @@ The light's angular size in degrees. Increasing this will make shadows softer at .. rst-class:: classref-property -:ref:`BakeMode<enum_Light3D_BakeMode>` **light_bake_mode** = ``2`` +:ref:`BakeMode<enum_Light3D_BakeMode>` **light_bake_mode** = ``2`` :ref:`🔗<class_Light3D_property_light_bake_mode>` .. rst-class:: classref-property-setget -- void **set_bake_mode** **(** :ref:`BakeMode<enum_Light3D_BakeMode>` value **)** -- :ref:`BakeMode<enum_Light3D_BakeMode>` **get_bake_mode** **(** **)** +- |void| **set_bake_mode**\ (\ value\: :ref:`BakeMode<enum_Light3D_BakeMode>`\ ) +- :ref:`BakeMode<enum_Light3D_BakeMode>` **get_bake_mode**\ (\ ) The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See :ref:`BakeMode<enum_Light3D_BakeMode>`. @@ -483,12 +487,12 @@ The light's bake mode. This will affect the global illumination techniques that .. rst-class:: classref-property -:ref:`Color<class_Color>` **light_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **light_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Light3D_property_light_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) The light's color. An *overbright* color can be used to achieve a result equivalent to increasing the light's :ref:`light_energy<class_Light3D_property_light_energy>`. @@ -500,12 +504,12 @@ The light's color. An *overbright* color can be used to achieve a result equival .. rst-class:: classref-property -:ref:`int<class_int>` **light_cull_mask** = ``4294967295`` +:ref:`int<class_int>` **light_cull_mask** = ``4294967295`` :ref:`🔗<class_Light3D_property_light_cull_mask>` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_cull_mask**\ (\ ) The light will affect objects in the selected layers. @@ -517,12 +521,12 @@ The light will affect objects in the selected layers. .. rst-class:: classref-property -:ref:`float<class_float>` **light_energy** = ``1.0`` +:ref:`float<class_float>` **light_energy** = ``1.0`` :ref:`🔗<class_Light3D_property_light_energy>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| The light's strength multiplier (this is not a physical unit). For :ref:`OmniLight3D<class_OmniLight3D>` and :ref:`SpotLight3D<class_SpotLight3D>`, changing this value will only change the light color's intensity, not the light's radius. @@ -534,12 +538,12 @@ The light's strength multiplier (this is not a physical unit). For :ref:`OmniLig .. rst-class:: classref-property -:ref:`float<class_float>` **light_indirect_energy** = ``1.0`` +:ref:`float<class_float>` **light_indirect_energy** = ``1.0`` :ref:`🔗<class_Light3D_property_light_indirect_energy>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Secondary multiplier used with indirect light (light bounces). Used with :ref:`VoxelGI<class_VoxelGI>` and SDFGI (see :ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`). @@ -553,12 +557,12 @@ Secondary multiplier used with indirect light (light bounces). Used with :ref:`V .. rst-class:: classref-property -:ref:`float<class_float>` **light_intensity_lumens** +:ref:`float<class_float>` **light_intensity_lumens** :ref:`🔗<class_Light3D_property_light_intensity_lumens>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Used by positional lights (:ref:`OmniLight3D<class_OmniLight3D>` and :ref:`SpotLight3D<class_SpotLight3D>`) when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is ``true``. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time. @@ -574,12 +578,12 @@ A typical household lightbulb can range from around 600 lumens to 1,200 lumens, .. rst-class:: classref-property -:ref:`float<class_float>` **light_intensity_lux** +:ref:`float<class_float>` **light_intensity_lux** :ref:`🔗<class_Light3D_property_light_intensity_lux>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Used by :ref:`DirectionalLight3D<class_DirectionalLight3D>`\ s when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is ``true``. Sets the intensity of the light source measured in Lux. Lux is a measure of luminous flux per unit area, it is equal to one lumen per square meter. Lux is the measure of how much light hits a surface at a given time. @@ -593,12 +597,12 @@ On a clear sunny day a surface in direct sunlight may be approximately 100,000 l .. rst-class:: classref-property -:ref:`bool<class_bool>` **light_negative** = ``false`` +:ref:`bool<class_bool>` **light_negative** = ``false`` :ref:`🔗<class_Light3D_property_light_negative>` .. rst-class:: classref-property-setget -- void **set_negative** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_negative** **(** **)** +- |void| **set_negative**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_negative**\ (\ ) If ``true``, the light's effect is reversed, darkening areas and casting bright shadows. @@ -610,12 +614,12 @@ If ``true``, the light's effect is reversed, darkening areas and casting bright .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **light_projector** +:ref:`Texture2D<class_Texture2D>` **light_projector** :ref:`🔗<class_Light3D_property_light_projector>` .. rst-class:: classref-property-setget -- void **set_projector** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_projector** **(** **)** +- |void| **set_projector**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_projector**\ (\ ) :ref:`Texture2D<class_Texture2D>` projected by light. :ref:`shadow_enabled<class_Light3D_property_shadow_enabled>` must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass. @@ -631,12 +635,12 @@ If ``true``, the light's effect is reversed, darkening areas and casting bright .. rst-class:: classref-property -:ref:`float<class_float>` **light_size** = ``0.0`` +:ref:`float<class_float>` **light_size** = ``0.0`` :ref:`🔗<class_Light3D_property_light_size>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| The size of the light in Godot units. Only available for :ref:`OmniLight3D<class_OmniLight3D>`\ s and :ref:`SpotLight3D<class_SpotLight3D>`\ s. Increasing this value will make the light fade out slower and shadows appear blurrier (also called percentage-closer soft shadows, or PCSS). This can be used to simulate area lights to an extent. Increasing this value above ``0.0`` for lights with shadows enabled will have a noticeable performance cost due to PCSS. @@ -652,12 +656,12 @@ The size of the light in Godot units. Only available for :ref:`OmniLight3D<class .. rst-class:: classref-property -:ref:`float<class_float>` **light_specular** = ``0.5`` +:ref:`float<class_float>` **light_specular** = ``0.5`` :ref:`🔗<class_Light3D_property_light_specular>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| The intensity of the specular blob in objects affected by the light. At ``0``, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. @@ -669,12 +673,12 @@ The intensity of the specular blob in objects affected by the light. At ``0``, t .. rst-class:: classref-property -:ref:`float<class_float>` **light_temperature** +:ref:`float<class_float>` **light_temperature** :ref:`🔗<class_Light3D_property_light_temperature>` .. rst-class:: classref-property-setget -- void **set_temperature** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_temperature** **(** **)** +- |void| **set_temperature**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_temperature**\ (\ ) Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the :ref:`light_color<class_Light3D_property_light_color>`. @@ -688,12 +692,12 @@ The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is betwe .. rst-class:: classref-property -:ref:`float<class_float>` **light_volumetric_fog_energy** = ``1.0`` +:ref:`float<class_float>` **light_volumetric_fog_energy** = ``1.0`` :ref:`🔗<class_Light3D_property_light_volumetric_fog_energy>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Secondary multiplier multiplied with :ref:`light_energy<class_Light3D_property_light_energy>` then used with the :ref:`Environment<class_Environment>`'s volumetric fog (if enabled). If set to ``0.0``, computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. @@ -707,12 +711,12 @@ Secondary multiplier multiplied with :ref:`light_energy<class_Light3D_property_l .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_bias** = ``0.1`` +:ref:`float<class_float>` **shadow_bias** = ``0.1`` :ref:`🔗<class_Light3D_property_shadow_bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. @@ -724,12 +728,12 @@ Used to adjust shadow appearance. Too small a value results in self-shadowing (" .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_blur** = ``1.0`` +:ref:`float<class_float>` **shadow_blur** = ``1.0`` :ref:`🔗<class_Light3D_property_shadow_blur>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. @@ -741,12 +745,12 @@ Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolu .. rst-class:: classref-property -:ref:`bool<class_bool>` **shadow_enabled** = ``false`` +:ref:`bool<class_bool>` **shadow_enabled** = ``false`` :ref:`🔗<class_Light3D_property_shadow_enabled>` .. rst-class:: classref-property-setget -- void **set_shadow** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_shadow** **(** **)** +- |void| **set_shadow**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_shadow**\ (\ ) If ``true``, the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using :ref:`distance_fade_enabled<class_Light3D_property_distance_fade_enabled>` to hide the light when far away from the :ref:`Camera3D<class_Camera3D>`. @@ -758,12 +762,12 @@ If ``true``, the light will cast real-time shadows. This has a significant perfo .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_normal_bias** = ``2.0`` +:ref:`float<class_float>` **shadow_normal_bias** = ``2.0`` :ref:`🔗<class_Light3D_property_shadow_normal_bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using :ref:`shadow_bias<class_Light3D_property_shadow_bias>`. In practice, this value should be tweaked along with :ref:`shadow_bias<class_Light3D_property_shadow_bias>` to reduce artifacts as much as possible. @@ -775,12 +779,12 @@ Offsets the lookup into the shadow map by the object's normal. This can be used .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_opacity** = ``1.0`` +:ref:`float<class_float>` **shadow_opacity** = ``1.0`` :ref:`🔗<class_Light3D_property_shadow_opacity>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| The opacity to use when rendering the light's shadow map. Values lower than ``1.0`` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. @@ -792,12 +796,12 @@ The opacity to use when rendering the light's shadow map. Values lower than ``1. .. rst-class:: classref-property -:ref:`bool<class_bool>` **shadow_reverse_cull_face** = ``false`` +:ref:`bool<class_bool>` **shadow_reverse_cull_face** = ``false`` :ref:`🔗<class_Light3D_property_shadow_reverse_cull_face>` .. rst-class:: classref-property-setget -- void **set_shadow_reverse_cull_face** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_shadow_reverse_cull_face** **(** **)** +- |void| **set_shadow_reverse_cull_face**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_shadow_reverse_cull_face**\ (\ ) If ``true``, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with :ref:`GeometryInstance3D.SHADOW_CASTING_SETTING_DOUBLE_SIDED<class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED>`. @@ -809,12 +813,12 @@ If ``true``, reverses the backface culling of the mesh. This can be useful when .. rst-class:: classref-property -:ref:`float<class_float>` **shadow_transmittance_bias** = ``0.05`` +:ref:`float<class_float>` **shadow_transmittance_bias** = ``0.05`` :ref:`🔗<class_Light3D_property_shadow_transmittance_bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| .. container:: contribute @@ -833,7 +837,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_correlated_color** **(** **)** |const| +:ref:`Color<class_Color>` **get_correlated_color**\ (\ ) |const| :ref:`🔗<class_Light3D_method_get_correlated_color>` Returns the :ref:`Color<class_Color>` of an idealized blackbody at the given :ref:`light_temperature<class_Light3D_property_light_temperature>`. This value is calculated internally based on the :ref:`light_temperature<class_Light3D_property_light_temperature>`. This :ref:`Color<class_Color>` is multiplied by :ref:`light_color<class_Light3D_property_light_color>` before being sent to the :ref:`RenderingServer<class_RenderingServer>`. @@ -845,7 +849,7 @@ Returns the :ref:`Color<class_Color>` of an idealized blackbody at the given :re .. rst-class:: classref-method -:ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_Light3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`\ ) |const| :ref:`🔗<class_Light3D_method_get_param>` Returns the value of the specified :ref:`Param<enum_Light3D_Param>` parameter. @@ -857,7 +861,7 @@ Returns the value of the specified :ref:`Param<enum_Light3D_Param>` parameter. .. rst-class:: classref-method -void **set_param** **(** :ref:`Param<enum_Light3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param**\ (\ param\: :ref:`Param<enum_Light3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Light3D_method_set_param>` Sets the value of the specified :ref:`Param<enum_Light3D_Param>` parameter. @@ -868,3 +872,4 @@ Sets the value of the specified :ref:`Param<enum_Light3D_Param>` parameter. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightmapgi.rst b/classes/class_lightmapgi.rst index 8d5058f8b9a..94ffc9b8123 100644 --- a/classes/class_lightmapgi.rst +++ b/classes/class_lightmapgi.rst @@ -29,7 +29,14 @@ The **LightmapGI** node is used to compute and store baked lightmaps. Lightmaps \ **Note:** Lightmap baking on :ref:`CSGShape3D<class_CSGShape3D>`\ s and :ref:`PrimitiveMesh<class_PrimitiveMesh>`\ es is not supported, as these cannot store UV2 data required for baking. -\ **Note:** If no custom lightmappers are installed, **LightmapGI** can only be baked when using the Vulkan backend (Forward+ or Mobile), not OpenGL. +\ **Note:** If no custom lightmappers are installed, **LightmapGI** can only be baked from devices that support the Forward+ or Mobile rendering backends. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using Lightmap global illumination <../tutorials/3d/global_illumination/using_lightmap_gi>` .. rst-class:: classref-reftable-group @@ -42,10 +49,16 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`float<class_float>` | :ref:`bias<class_LightmapGI_property_bias>` | ``0.0005`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`bounce_indirect_energy<class_LightmapGI_property_bounce_indirect_energy>` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`int<class_int>` | :ref:`bounces<class_LightmapGI_property_bounces>` | ``3`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`CameraAttributes<class_CameraAttributes>` | :ref:`camera_attributes<class_LightmapGI_property_camera_attributes>` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`int<class_int>` | :ref:`denoiser_range<class_LightmapGI_property_denoiser_range>` | ``10`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`denoiser_strength<class_LightmapGI_property_denoiser_strength>` | ``0.1`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`bool<class_bool>` | :ref:`directional<class_LightmapGI_property_directional>` | ``false`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`Color<class_Color>` | :ref:`environment_custom_color<class_LightmapGI_property_environment_custom_color>` | | @@ -66,8 +79,12 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`BakeQuality<enum_LightmapGI_BakeQuality>` | :ref:`quality<class_LightmapGI_property_quality>` | ``1`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`texel_scale<class_LightmapGI_property_texel_scale>` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`bool<class_bool>` | :ref:`use_denoiser<class_LightmapGI_property_use_denoiser>` | ``true`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool<class_bool>` | :ref:`use_texture_for_bounces<class_LightmapGI_property_use_texture_for_bounces>` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ .. rst-class:: classref-section-separator @@ -82,7 +99,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BakeQuality**: +enum **BakeQuality**: :ref:`🔗<enum_LightmapGI_BakeQuality>` .. _class_LightmapGI_constant_BAKE_QUALITY_LOW: @@ -124,7 +141,7 @@ Highest bake quality (slowest bake times). The quality of this preset can be adj .. rst-class:: classref-enumeration -enum **GenerateProbes**: +enum **GenerateProbes**: :ref:`🔗<enum_LightmapGI_GenerateProbes>` .. _class_LightmapGI_constant_GENERATE_PROBES_DISABLED: @@ -174,7 +191,7 @@ Highest level of subdivision (slowest bake times, largest file sizes). .. rst-class:: classref-enumeration -enum **BakeError**: +enum **BakeError**: :ref:`🔗<enum_LightmapGI_BakeError>` .. _class_LightmapGI_constant_BAKE_ERROR_OK: @@ -248,6 +265,14 @@ Lightmap baking failed as the resulting image couldn't be saved or imported by G The user aborted the lightmap baking operation (typically by clicking the **Cancel** button in the progress dialog). +.. _class_LightmapGI_constant_BAKE_ERROR_TEXTURE_SIZE_TOO_SMALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BakeError<enum_LightmapGI_BakeError>` **BAKE_ERROR_TEXTURE_SIZE_TOO_SMALL** = ``9`` + +Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking. + .. rst-class:: classref-item-separator ---- @@ -256,7 +281,7 @@ The user aborted the lightmap baking operation (typically by clicking the **Canc .. rst-class:: classref-enumeration -enum **EnvironmentMode**: +enum **EnvironmentMode**: :ref:`🔗<enum_LightmapGI_EnvironmentMode>` .. _class_LightmapGI_constant_ENVIRONMENT_MODE_DISABLED: @@ -305,12 +330,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **bias** = ``0.0005`` +:ref:`float<class_float>` **bias** = ``0.0005`` :ref:`🔗<class_LightmapGI_property_bias>` .. rst-class:: classref-property-setget -- void **set_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bias** **(** **)** +- |void| **set_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bias**\ (\ ) The bias to use when computing shadows. Increasing :ref:`bias<class_LightmapGI_property_bias>` can fix shadow acne on the resulting baked lightmap, but can introduce peter-panning (shadows not connecting to their casters). Real-time :ref:`Light3D<class_Light3D>` shadows are not affected by this :ref:`bias<class_LightmapGI_property_bias>` property. @@ -318,16 +343,35 @@ The bias to use when computing shadows. Increasing :ref:`bias<class_LightmapGI_p ---- +.. _class_LightmapGI_property_bounce_indirect_energy: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **bounce_indirect_energy** = ``1.0`` :ref:`🔗<class_LightmapGI_property_bounce_indirect_energy>` + +.. rst-class:: classref-property-setget + +- |void| **set_bounce_indirect_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bounce_indirect_energy**\ (\ ) + +The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of ``1.0`` represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of :ref:`bounces<class_LightmapGI_property_bounces>` then increasing :ref:`bounce_indirect_energy<class_LightmapGI_property_bounce_indirect_energy>`. + +\ **Note:** :ref:`bounce_indirect_energy<class_LightmapGI_property_bounce_indirect_energy>` only has an effect if :ref:`bounces<class_LightmapGI_property_bounces>` is set to a value greater than or equal to ``1``. + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_bounces: .. rst-class:: classref-property -:ref:`int<class_int>` **bounces** = ``3`` +:ref:`int<class_int>` **bounces** = ``3`` :ref:`🔗<class_LightmapGI_property_bounces>` .. rst-class:: classref-property-setget -- void **set_bounces** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bounces** **(** **)** +- |void| **set_bounces**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bounces**\ (\ ) Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to ``0``, only environment lighting, direct light and emissive lighting is baked. @@ -339,12 +383,12 @@ Number of light bounces that are taken into account during baking. Higher values .. rst-class:: classref-property -:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** +:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** :ref:`🔗<class_LightmapGI_property_camera_attributes>` .. rst-class:: classref-property-setget -- void **set_camera_attributes** **(** :ref:`CameraAttributes<class_CameraAttributes>` value **)** -- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes** **(** **)** +- |void| **set_camera_attributes**\ (\ value\: :ref:`CameraAttributes<class_CameraAttributes>`\ ) +- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes**\ (\ ) The :ref:`CameraAttributes<class_CameraAttributes>` resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the **LightmapGI** will have banding artifacts or may have over-exposure artifacts. @@ -352,18 +396,52 @@ The :ref:`CameraAttributes<class_CameraAttributes>` resource that specifies expo ---- +.. _class_LightmapGI_property_denoiser_range: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **denoiser_range** = ``10`` :ref:`🔗<class_LightmapGI_property_denoiser_range>` + +.. rst-class:: classref-property-setget + +- |void| **set_denoiser_range**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_denoiser_range**\ (\ ) + +The distance in pixels from which the denoiser samples. Lower values preserve more details, but may give blotchy results if the lightmap quality is not high enough. Only effective if :ref:`use_denoiser<class_LightmapGI_property_use_denoiser>` is ``true`` and :ref:`ProjectSettings.rendering/lightmapping/denoising/denoiser<class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser>` is set to JNLM. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LightmapGI_property_denoiser_strength: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **denoiser_strength** = ``0.1`` :ref:`🔗<class_LightmapGI_property_denoiser_strength>` + +.. rst-class:: classref-property-setget + +- |void| **set_denoiser_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_denoiser_strength**\ (\ ) + +The strength of denoising step applied to the generated lightmaps. Only effective if :ref:`use_denoiser<class_LightmapGI_property_use_denoiser>` is ``true`` and :ref:`ProjectSettings.rendering/lightmapping/denoising/denoiser<class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser>` is set to JNLM. + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_directional: .. rst-class:: classref-property -:ref:`bool<class_bool>` **directional** = ``false`` +:ref:`bool<class_bool>` **directional** = ``false`` :ref:`🔗<class_LightmapGI_property_directional>` .. rst-class:: classref-property-setget -- void **set_directional** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_directional** **(** **)** +- |void| **set_directional**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_directional**\ (\ ) -If ``true``, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked (:ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>` set to :ref:`Light3D.BAKE_STATIC<class_Light3D_constant_BAKE_STATIC>`). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes. +If ``true``, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked (:ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>` set to :ref:`Light3D.BAKE_STATIC<class_Light3D_constant_BAKE_STATIC>` and with :ref:`Light3D.editor_only<class_Light3D_property_editor_only>` set to ``false``). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes. \ **Note:** The property's name has no relationship with :ref:`DirectionalLight3D<class_DirectionalLight3D>`. :ref:`directional<class_LightmapGI_property_directional>` works with all light types. @@ -375,12 +453,12 @@ If ``true``, bakes lightmaps to contain directional information as spherical har .. rst-class:: classref-property -:ref:`Color<class_Color>` **environment_custom_color** +:ref:`Color<class_Color>` **environment_custom_color** :ref:`🔗<class_LightmapGI_property_environment_custom_color>` .. rst-class:: classref-property-setget -- void **set_environment_custom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_environment_custom_color** **(** **)** +- |void| **set_environment_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_environment_custom_color**\ (\ ) The color to use for environment lighting. Only effective if :ref:`environment_mode<class_LightmapGI_property_environment_mode>` is :ref:`ENVIRONMENT_MODE_CUSTOM_COLOR<class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_COLOR>`. @@ -392,12 +470,12 @@ The color to use for environment lighting. Only effective if :ref:`environment_m .. rst-class:: classref-property -:ref:`float<class_float>` **environment_custom_energy** +:ref:`float<class_float>` **environment_custom_energy** :ref:`🔗<class_LightmapGI_property_environment_custom_energy>` .. rst-class:: classref-property-setget -- void **set_environment_custom_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_environment_custom_energy** **(** **)** +- |void| **set_environment_custom_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_environment_custom_energy**\ (\ ) The color multiplier to use for environment lighting. Only effective if :ref:`environment_mode<class_LightmapGI_property_environment_mode>` is :ref:`ENVIRONMENT_MODE_CUSTOM_COLOR<class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_COLOR>`. @@ -409,12 +487,12 @@ The color multiplier to use for environment lighting. Only effective if :ref:`en .. rst-class:: classref-property -:ref:`Sky<class_Sky>` **environment_custom_sky** +:ref:`Sky<class_Sky>` **environment_custom_sky** :ref:`🔗<class_LightmapGI_property_environment_custom_sky>` .. rst-class:: classref-property-setget -- void **set_environment_custom_sky** **(** :ref:`Sky<class_Sky>` value **)** -- :ref:`Sky<class_Sky>` **get_environment_custom_sky** **(** **)** +- |void| **set_environment_custom_sky**\ (\ value\: :ref:`Sky<class_Sky>`\ ) +- :ref:`Sky<class_Sky>` **get_environment_custom_sky**\ (\ ) The sky to use as a source of environment lighting. Only effective if :ref:`environment_mode<class_LightmapGI_property_environment_mode>` is :ref:`ENVIRONMENT_MODE_CUSTOM_SKY<class_LightmapGI_constant_ENVIRONMENT_MODE_CUSTOM_SKY>`. @@ -426,12 +504,12 @@ The sky to use as a source of environment lighting. Only effective if :ref:`envi .. rst-class:: classref-property -:ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>` **environment_mode** = ``1`` +:ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>` **environment_mode** = ``1`` :ref:`🔗<class_LightmapGI_property_environment_mode>` .. rst-class:: classref-property-setget -- void **set_environment_mode** **(** :ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>` value **)** -- :ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>` **get_environment_mode** **(** **)** +- |void| **set_environment_mode**\ (\ value\: :ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>`\ ) +- :ref:`EnvironmentMode<enum_LightmapGI_EnvironmentMode>` **get_environment_mode**\ (\ ) The environment mode to use when baking lightmaps. @@ -443,12 +521,12 @@ The environment mode to use when baking lightmaps. .. rst-class:: classref-property -:ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>` **generate_probes_subdiv** = ``2`` +:ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>` **generate_probes_subdiv** = ``2`` :ref:`🔗<class_LightmapGI_property_generate_probes_subdiv>` .. rst-class:: classref-property-setget -- void **set_generate_probes** **(** :ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>` value **)** -- :ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>` **get_generate_probes** **(** **)** +- |void| **set_generate_probes**\ (\ value\: :ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>`\ ) +- :ref:`GenerateProbes<enum_LightmapGI_GenerateProbes>` **get_generate_probes**\ (\ ) The level of subdivision to use when automatically generating :ref:`LightmapProbe<class_LightmapProbe>`\ s for dynamic object lighting. Higher values result in more accurate indirect lighting on dynamic objects, at the cost of longer bake times and larger file sizes. @@ -464,12 +542,12 @@ The level of subdivision to use when automatically generating :ref:`LightmapProb .. rst-class:: classref-property -:ref:`bool<class_bool>` **interior** = ``false`` +:ref:`bool<class_bool>` **interior** = ``false`` :ref:`🔗<class_LightmapGI_property_interior>` .. rst-class:: classref-property-setget -- void **set_interior** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_interior** **(** **)** +- |void| **set_interior**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_interior**\ (\ ) If ``true``, ignore environment lighting when baking lightmaps. @@ -481,12 +559,12 @@ If ``true``, ignore environment lighting when baking lightmaps. .. rst-class:: classref-property -:ref:`LightmapGIData<class_LightmapGIData>` **light_data** +:ref:`LightmapGIData<class_LightmapGIData>` **light_data** :ref:`🔗<class_LightmapGI_property_light_data>` .. rst-class:: classref-property-setget -- void **set_light_data** **(** :ref:`LightmapGIData<class_LightmapGIData>` value **)** -- :ref:`LightmapGIData<class_LightmapGIData>` **get_light_data** **(** **)** +- |void| **set_light_data**\ (\ value\: :ref:`LightmapGIData<class_LightmapGIData>`\ ) +- :ref:`LightmapGIData<class_LightmapGIData>` **get_light_data**\ (\ ) The :ref:`LightmapGIData<class_LightmapGIData>` associated to this **LightmapGI** node. This resource is automatically created after baking, and is not meant to be created manually. @@ -498,12 +576,12 @@ The :ref:`LightmapGIData<class_LightmapGIData>` associated to this **LightmapGI* .. rst-class:: classref-property -:ref:`int<class_int>` **max_texture_size** = ``16384`` +:ref:`int<class_int>` **max_texture_size** = ``16384`` :ref:`🔗<class_LightmapGI_property_max_texture_size>` .. rst-class:: classref-property-setget -- void **set_max_texture_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_texture_size** **(** **)** +- |void| **set_max_texture_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_texture_size**\ (\ ) The maximum texture size for the generated texture atlas. Higher values will result in fewer slices being generated, but may not work on all hardware as a result of hardware limitations on texture sizes. Leave :ref:`max_texture_size<class_LightmapGI_property_max_texture_size>` at its default value of ``16384`` if unsure. @@ -515,12 +593,12 @@ The maximum texture size for the generated texture atlas. Higher values will res .. rst-class:: classref-property -:ref:`BakeQuality<enum_LightmapGI_BakeQuality>` **quality** = ``1`` +:ref:`BakeQuality<enum_LightmapGI_BakeQuality>` **quality** = ``1`` :ref:`🔗<class_LightmapGI_property_quality>` .. rst-class:: classref-property-setget -- void **set_bake_quality** **(** :ref:`BakeQuality<enum_LightmapGI_BakeQuality>` value **)** -- :ref:`BakeQuality<enum_LightmapGI_BakeQuality>` **get_bake_quality** **(** **)** +- |void| **set_bake_quality**\ (\ value\: :ref:`BakeQuality<enum_LightmapGI_BakeQuality>`\ ) +- :ref:`BakeQuality<enum_LightmapGI_BakeQuality>` **get_bake_quality**\ (\ ) The quality preset to use when baking lightmaps. This affects bake times, but output file sizes remain mostly identical across quality levels. @@ -530,20 +608,54 @@ To further speed up bake times, decrease :ref:`bounces<class_LightmapGI_property ---- +.. _class_LightmapGI_property_texel_scale: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **texel_scale** = ``1.0`` :ref:`🔗<class_LightmapGI_property_texel_scale>` + +.. rst-class:: classref-property-setget + +- |void| **set_texel_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texel_scale**\ (\ ) + +Scales the lightmap texel density of all meshes for the current bake. This is a multiplier that builds upon the existing lightmap texel size defined in each imported 3D scene, along with the per-mesh density multiplier (which is designed to be used when the same mesh is used at different scales). Lower values will result in faster bake times. + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_use_denoiser: .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_denoiser** = ``true`` +:ref:`bool<class_bool>` **use_denoiser** = ``true`` :ref:`🔗<class_LightmapGI_property_use_denoiser>` + +.. rst-class:: classref-property-setget + +- |void| **set_use_denoiser**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_denoiser**\ (\ ) + +If ``true``, uses a GPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image. + +.. rst-class:: classref-item-separator + +---- + +.. _class_LightmapGI_property_use_texture_for_bounces: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **use_texture_for_bounces** = ``true`` :ref:`🔗<class_LightmapGI_property_use_texture_for_bounces>` .. rst-class:: classref-property-setget -- void **set_use_denoiser** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_denoiser** **(** **)** +- |void| **set_use_texture_for_bounces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_texture_for_bounces**\ (\ ) -If ``true``, uses a CPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image. +If ``true``, a texture with the lighting information will be generated to speed up the generation of indirect lighting at the cost of some accuracy. The geometry might exhibit extra light leak artifacts when using low resolution lightmaps or UVs that stretch the lightmap significantly across surfaces. Leave :ref:`use_texture_for_bounces<class_LightmapGI_property_use_texture_for_bounces>` at its default value of ``true`` if unsure. -\ **Note:** The built-in denoiser (OpenImageDenoise) may crash when denoising lightmaps in large scenes. If you encounter a crash at the end of lightmap baking, try disabling :ref:`use_denoiser<class_LightmapGI_property_use_denoiser>`. +\ **Note:** :ref:`use_texture_for_bounces<class_LightmapGI_property_use_texture_for_bounces>` only has an effect if :ref:`bounces<class_LightmapGI_property_bounces>` is set to a value greater than or equal to ``1``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -552,3 +664,4 @@ If ``true``, uses a CPU-based denoising algorithm on the generated lightmap. Thi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightmapgidata.rst b/classes/class_lightmapgidata.rst index dd0cfcfead5..5464710a4b6 100644 --- a/classes/class_lightmapgidata.rst +++ b/classes/class_lightmapgidata.rst @@ -29,9 +29,11 @@ Properties .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------+ - | :ref:`TextureLayered<class_TextureLayered>` | :ref:`light_texture<class_LightmapGIData_property_light_texture>` | - +---------------------------------------------+-------------------------------------------------------------------+ + +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`TextureLayered<class_TextureLayered>` | :ref:`light_texture<class_LightmapGIData_property_light_texture>` | | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] | :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>` | ``[]`` | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -41,19 +43,19 @@ Methods .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_user<class_LightmapGIData_method_add_user>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`Rect2<class_Rect2>` uv_scale, :ref:`int<class_int>` slice_index, :ref:`int<class_int>` sub_instance **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_users<class_LightmapGIData_method_clear_users>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_user_count<class_LightmapGIData_method_get_user_count>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_user_path<class_LightmapGIData_method_get_user_path>` **(** :ref:`int<class_int>` user_idx **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_using_spherical_harmonics<class_LightmapGIData_method_is_using_spherical_harmonics>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_uses_spherical_harmonics<class_LightmapGIData_method_set_uses_spherical_harmonics>` **(** :ref:`bool<class_bool>` uses_spherical_harmonics **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_user<class_LightmapGIData_method_add_user>`\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_users<class_LightmapGIData_method_clear_users>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_user_count<class_LightmapGIData_method_get_user_count>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_user_path<class_LightmapGIData_method_get_user_path>`\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_using_spherical_harmonics<class_LightmapGIData_method_is_using_spherical_harmonics>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_uses_spherical_harmonics<class_LightmapGIData_method_set_uses_spherical_harmonics>`\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,15 +70,34 @@ Property Descriptions .. rst-class:: classref-property -:ref:`TextureLayered<class_TextureLayered>` **light_texture** +:ref:`TextureLayered<class_TextureLayered>` **light_texture** :ref:`🔗<class_LightmapGIData_property_light_texture>` .. rst-class:: classref-property-setget -- void **set_light_texture** **(** :ref:`TextureLayered<class_TextureLayered>` value **)** -- :ref:`TextureLayered<class_TextureLayered>` **get_light_texture** **(** **)** +- |void| **set_light_texture**\ (\ value\: :ref:`TextureLayered<class_TextureLayered>`\ ) +- :ref:`TextureLayered<class_TextureLayered>` **get_light_texture**\ (\ ) + +**Deprecated:** The lightmap atlas can now contain multiple textures. See :ref:`lightmap_textures<class_LightmapGIData_property_lightmap_textures>`. The lightmap atlas texture generated by the lightmapper. +.. rst-class:: classref-item-separator + +---- + +.. _class_LightmapGIData_property_lightmap_textures: + +.. rst-class:: classref-property + +:ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **lightmap_textures** = ``[]`` :ref:`🔗<class_LightmapGIData_property_lightmap_textures>` + +.. rst-class:: classref-property-setget + +- |void| **set_lightmap_textures**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`TextureLayered<class_TextureLayered>`\] **get_lightmap_textures**\ (\ ) + +The lightmap atlas textures generated by the lightmapper. + .. rst-class:: classref-section-separator ---- @@ -90,7 +111,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_user** **(** :ref:`NodePath<class_NodePath>` path, :ref:`Rect2<class_Rect2>` uv_scale, :ref:`int<class_int>` slice_index, :ref:`int<class_int>` sub_instance **)** +|void| **add_user**\ (\ path\: :ref:`NodePath<class_NodePath>`, uv_scale\: :ref:`Rect2<class_Rect2>`, slice_index\: :ref:`int<class_int>`, sub_instance\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LightmapGIData_method_add_user>` Adds an object that is considered baked within this **LightmapGIData**. @@ -102,7 +123,7 @@ Adds an object that is considered baked within this **LightmapGIData**. .. rst-class:: classref-method -void **clear_users** **(** **)** +|void| **clear_users**\ (\ ) :ref:`🔗<class_LightmapGIData_method_clear_users>` Clear all objects that are considered baked within this **LightmapGIData**. @@ -114,7 +135,7 @@ Clear all objects that are considered baked within this **LightmapGIData**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_user_count** **(** **)** |const| +:ref:`int<class_int>` **get_user_count**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_count>` Returns the number of objects that are considered baked within this **LightmapGIData**. @@ -126,7 +147,7 @@ Returns the number of objects that are considered baked within this **LightmapGI .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_user_path** **(** :ref:`int<class_int>` user_idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_user_path**\ (\ user_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_LightmapGIData_method_get_user_path>` Returns the :ref:`NodePath<class_NodePath>` of the baked object at index ``user_idx``. @@ -138,7 +159,7 @@ Returns the :ref:`NodePath<class_NodePath>` of the baked object at index ``user_ .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_using_spherical_harmonics** **(** **)** |const| +:ref:`bool<class_bool>` **is_using_spherical_harmonics**\ (\ ) |const| :ref:`🔗<class_LightmapGIData_method_is_using_spherical_harmonics>` If ``true``, lightmaps were baked with directional information. See also :ref:`LightmapGI.directional<class_LightmapGI_property_directional>`. @@ -150,7 +171,7 @@ If ``true``, lightmaps were baked with directional information. See also :ref:`L .. rst-class:: classref-method -void **set_uses_spherical_harmonics** **(** :ref:`bool<class_bool>` uses_spherical_harmonics **)** +|void| **set_uses_spherical_harmonics**\ (\ uses_spherical_harmonics\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_LightmapGIData_method_set_uses_spherical_harmonics>` If ``uses_spherical_harmonics`` is ``true``, tells the engine to treat the lightmap data as if it was baked with directional information. @@ -163,3 +184,4 @@ If ``uses_spherical_harmonics`` is ``true``, tells the engine to treat the light .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightmapper.rst b/classes/class_lightmapper.rst index f1546f2aa88..cf10058461f 100644 --- a/classes/class_lightmapper.rst +++ b/classes/class_lightmapper.rst @@ -32,3 +32,4 @@ Godot contains a built-in GPU-based lightmapper :ref:`LightmapperRD<class_Lightm .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightmapperrd.rst b/classes/class_lightmapperrd.rst index 5ab0c9f7143..85ff9382bfd 100644 --- a/classes/class_lightmapperrd.rst +++ b/classes/class_lightmapperrd.rst @@ -30,3 +30,4 @@ LightmapperRD ("RD" stands for :ref:`RenderingDevice<class_RenderingDevice>`) is .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightmapprobe.rst b/classes/class_lightmapprobe.rst index f98dbad1187..0c85da5bea0 100644 --- a/classes/class_lightmapprobe.rst +++ b/classes/class_lightmapprobe.rst @@ -19,10 +19,12 @@ Represents a single manually placed probe for dynamic object lighting with :ref: Description ----------- -**LightmapProbe** represents the position of a single manually placed probe for dynamic object lighting with :ref:`LightmapGI<class_LightmapGI>`. +**LightmapProbe** represents the position of a single manually placed probe for dynamic object lighting with :ref:`LightmapGI<class_LightmapGI>`. Lightmap probes affect the lighting of :ref:`GeometryInstance3D<class_GeometryInstance3D>`-derived nodes that have their :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` set to :ref:`GeometryInstance3D.GI_MODE_DYNAMIC<class_GeometryInstance3D_constant_GI_MODE_DYNAMIC>`. Typically, :ref:`LightmapGI<class_LightmapGI>` probes are placed automatically by setting :ref:`LightmapGI.generate_probes_subdiv<class_LightmapGI_property_generate_probes_subdiv>` to a value other than :ref:`LightmapGI.GENERATE_PROBES_DISABLED<class_LightmapGI_constant_GENERATE_PROBES_DISABLED>`. By creating **LightmapProbe** nodes before baking lightmaps, you can add more probes in specific areas for greater detail, or disable automatic generation and rely only on manually placed probes instead. +\ **Note:** **LightmapProbe** nodes that are placed after baking lightmaps are ignored by dynamic objects. You must bake lightmaps again after creating or modifying **LightmapProbe**\ s for the probes to be effective. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -30,3 +32,4 @@ Typically, :ref:`LightmapGI<class_LightmapGI>` probes are placed automatically b .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lightoccluder2d.rst b/classes/class_lightoccluder2d.rst index 7f080f63bab..694773969cc 100644 --- a/classes/class_lightoccluder2d.rst +++ b/classes/class_lightoccluder2d.rst @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder** +:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder** :ref:`🔗<class_LightOccluder2D_property_occluder>` .. rst-class:: classref-property-setget -- void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` value **)** -- :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder_polygon** **(** **)** +- |void| **set_occluder_polygon**\ (\ value\: :ref:`OccluderPolygon2D<class_OccluderPolygon2D>`\ ) +- :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder_polygon**\ (\ ) The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow. @@ -74,12 +74,12 @@ The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow .. rst-class:: classref-property -:ref:`int<class_int>` **occluder_light_mask** = ``1`` +:ref:`int<class_int>` **occluder_light_mask** = ``1`` :ref:`🔗<class_LightOccluder2D_property_occluder_light_mask>` .. rst-class:: classref-property-setget -- void **set_occluder_light_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_occluder_light_mask** **(** **)** +- |void| **set_occluder_light_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_occluder_light_mask**\ (\ ) The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). @@ -91,16 +91,14 @@ The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows .. rst-class:: classref-property -:ref:`bool<class_bool>` **sdf_collision** = ``true`` +:ref:`bool<class_bool>` **sdf_collision** = ``true`` :ref:`🔗<class_LightOccluder2D_property_sdf_collision>` .. rst-class:: classref-property-setget -- void **set_as_sdf_collision** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_set_as_sdf_collision** **(** **)** +- |void| **set_as_sdf_collision**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_set_as_sdf_collision**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -109,3 +107,4 @@ The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_line2d.rst b/classes/class_line2d.rst index 14917c680a0..94a6f0a3ac6 100644 --- a/classes/class_line2d.rst +++ b/classes/class_line2d.rst @@ -12,23 +12,27 @@ Line2D **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -A 2D line. +A 2D polyline that can optionally be textured. .. rst-class:: classref-introduction-group Description ----------- -A line through several points in 2D space. +This node draws a 2D polyline, i.e. a shape consisting of several points connected by segments. **Line2D** is not a mathematical polyline, i.e. the segments are not infinitely thin. It is intended for rendering and it can be colored and optionally textured. + +\ **Warning:** Certain configurations may be impossible to draw nicely, such as very sharp angles. In these situations, the node uses fallback drawing logic to look decent. + +\ **Note:** **Line2D** is drawn using a 2D mesh. .. rst-class:: classref-introduction-group Tutorials --------- -- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__ +- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__ -- `2.5D Demo <https://godotengine.org/asset-library/asset/583>`__ +- `2.5D Game Demo <https://godotengine.org/asset-library/asset/2783>`__ .. rst-class:: classref-reftable-group @@ -43,6 +47,8 @@ Properties +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`LineCapMode<enum_Line2D_LineCapMode>` | :ref:`begin_cap_mode<class_Line2D_property_begin_cap_mode>` | ``0`` | +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`closed<class_Line2D_property_closed>` | ``false`` | + +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`Color<class_Color>` | :ref:`default_color<class_Line2D_property_default_color>` | ``Color(1, 1, 1, 1)`` | +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+ | :ref:`LineCapMode<enum_Line2D_LineCapMode>` | :ref:`end_cap_mode<class_Line2D_property_end_cap_mode>` | ``0`` | @@ -74,19 +80,19 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_point<class_Line2D_method_add_point>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` index=-1 **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_points<class_Line2D_method_clear_points>` **(** **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_point_count<class_Line2D_method_get_point_count>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_Line2D_method_get_point_position>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_point<class_Line2D_method_remove_point>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_position<class_Line2D_method_set_point_position>` **(** :ref:`int<class_int>` index, :ref:`Vector2<class_Vector2>` position **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_point<class_Line2D_method_add_point>`\ (\ position\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>` = -1\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_points<class_Line2D_method_clear_points>`\ (\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_point_count<class_Line2D_method_get_point_count>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_Line2D_method_get_point_position>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_point<class_Line2D_method_remove_point>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_position<class_Line2D_method_set_point_position>`\ (\ index\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -101,7 +107,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **LineJointMode**: +enum **LineJointMode**: :ref:`🔗<enum_Line2D_LineJointMode>` .. _class_Line2D_constant_LINE_JOINT_SHARP: @@ -109,7 +115,7 @@ enum **LineJointMode**: :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_SHARP** = ``0`` -The line's joints will be pointy. If ``sharp_limit`` is greater than the rotation of a joint, it becomes a bevel joint instead. +Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on :ref:`sharp_limit<class_Line2D_property_sharp_limit>`), the joint falls back to :ref:`LINE_JOINT_BEVEL<class_Line2D_constant_LINE_JOINT_BEVEL>` to prevent very long miters. .. _class_Line2D_constant_LINE_JOINT_BEVEL: @@ -117,7 +123,7 @@ The line's joints will be pointy. If ``sharp_limit`` is greater than the rotatio :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_BEVEL** = ``1`` -The line's joints will be bevelled/chamfered. +Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line. .. _class_Line2D_constant_LINE_JOINT_ROUND: @@ -125,7 +131,7 @@ The line's joints will be bevelled/chamfered. :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_ROUND** = ``2`` -The line's joints will be rounded. +Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on :ref:`round_precision<class_Line2D_property_round_precision>`. .. rst-class:: classref-item-separator @@ -135,7 +141,7 @@ The line's joints will be rounded. .. rst-class:: classref-enumeration -enum **LineCapMode**: +enum **LineCapMode**: :ref:`🔗<enum_Line2D_LineCapMode>` .. _class_Line2D_constant_LINE_CAP_NONE: @@ -143,7 +149,7 @@ enum **LineCapMode**: :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_NONE** = ``0`` -Don't draw a line cap. +Draws no line cap. .. _class_Line2D_constant_LINE_CAP_BOX: @@ -151,7 +157,7 @@ Don't draw a line cap. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_BOX** = ``1`` -Draws the line cap as a box. +Draws the line cap as a box, slightly extending the first/last segment. .. _class_Line2D_constant_LINE_CAP_ROUND: @@ -159,7 +165,7 @@ Draws the line cap as a box. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_ROUND** = ``2`` -Draws the line cap as a circle. +Draws the line cap as a semicircle attached to the first/last segment. .. rst-class:: classref-item-separator @@ -169,7 +175,7 @@ Draws the line cap as a circle. .. rst-class:: classref-enumeration -enum **LineTextureMode**: +enum **LineTextureMode**: :ref:`🔗<enum_Line2D_LineTextureMode>` .. _class_Line2D_constant_LINE_TEXTURE_NONE: @@ -177,7 +183,7 @@ enum **LineTextureMode**: :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_NONE** = ``0`` -Takes the left pixels of the texture and renders it over the whole line. +Takes the left pixels of the texture and renders them over the whole polyline. .. _class_Line2D_constant_LINE_TEXTURE_TILE: @@ -185,7 +191,7 @@ Takes the left pixels of the texture and renders it over the whole line. :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_TILE** = ``1`` -Tiles the texture over the line. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED<class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED>` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR<class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR>` for it to work properly. +Tiles the texture over the polyline. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED<class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED>` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR<class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR>` for it to work properly. .. _class_Line2D_constant_LINE_TEXTURE_STRETCH: @@ -193,7 +199,7 @@ Tiles the texture over the line. :ref:`CanvasItem.texture_repeat<class_CanvasIte :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_STRETCH** = ``2`` -Stretches the texture across the line. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED<class_CanvasItem_constant_TEXTURE_REPEAT_DISABLED>` for best results. +Stretches the texture across the polyline. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED<class_CanvasItem_constant_TEXTURE_REPEAT_DISABLED>` for best results. .. rst-class:: classref-section-separator @@ -208,16 +214,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **antialiased** = ``false`` +:ref:`bool<class_bool>` **antialiased** = ``false`` :ref:`🔗<class_Line2D_property_antialiased>` .. rst-class:: classref-property-setget -- void **set_antialiased** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_antialiased** **(** **)** +- |void| **set_antialiased**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_antialiased**\ (\ ) -If ``true``, the line's border will be anti-aliased. +If ``true``, the polyline's border will be anti-aliased. -\ **Note:** Line2D is not accelerated by batching when being anti-aliased. +\ **Note:** **Line2D** is not accelerated by batching when being anti-aliased. .. rst-class:: classref-item-separator @@ -227,14 +233,35 @@ If ``true``, the line's border will be anti-aliased. .. rst-class:: classref-property -:ref:`LineCapMode<enum_Line2D_LineCapMode>` **begin_cap_mode** = ``0`` +:ref:`LineCapMode<enum_Line2D_LineCapMode>` **begin_cap_mode** = ``0`` :ref:`🔗<class_Line2D_property_begin_cap_mode>` .. rst-class:: classref-property-setget -- void **set_begin_cap_mode** **(** :ref:`LineCapMode<enum_Line2D_LineCapMode>` value **)** -- :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_begin_cap_mode** **(** **)** +- |void| **set_begin_cap_mode**\ (\ value\: :ref:`LineCapMode<enum_Line2D_LineCapMode>`\ ) +- :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_begin_cap_mode**\ (\ ) -Controls the style of the line's first point. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants. +The style of the beginning of the polyline, if :ref:`closed<class_Line2D_property_closed>` is ``false``. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Line2D_property_closed: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **closed** = ``false`` :ref:`🔗<class_Line2D_property_closed>` + +.. rst-class:: classref-property-setget + +- |void| **set_closed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_closed**\ (\ ) + +If ``true`` and the polyline has more than 2 points, the last point and the first one will be connected by a segment. + +\ **Note:** The shape of the closing segment is not guaranteed to be seamless if a :ref:`width_curve<class_Line2D_property_width_curve>` is provided. + +\ **Note:** The joint between the closing segment and the first segment is drawn first and it samples the :ref:`gradient<class_Line2D_property_gradient>` and the :ref:`width_curve<class_Line2D_property_width_curve>` at the beginning. This is an implementation detail that might change in a future version. .. rst-class:: classref-item-separator @@ -244,14 +271,14 @@ Controls the style of the line's first point. Use :ref:`LineCapMode<enum_Line2D_ .. rst-class:: classref-property -:ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Line2D_property_default_color>` .. rst-class:: classref-property-setget -- void **set_default_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_default_color** **(** **)** +- |void| **set_default_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_default_color**\ (\ ) -The line's color. Will not be used if a gradient is set. +The color of the polyline. Will not be used if a gradient is set. .. rst-class:: classref-item-separator @@ -261,14 +288,14 @@ The line's color. Will not be used if a gradient is set. .. rst-class:: classref-property -:ref:`LineCapMode<enum_Line2D_LineCapMode>` **end_cap_mode** = ``0`` +:ref:`LineCapMode<enum_Line2D_LineCapMode>` **end_cap_mode** = ``0`` :ref:`🔗<class_Line2D_property_end_cap_mode>` .. rst-class:: classref-property-setget -- void **set_end_cap_mode** **(** :ref:`LineCapMode<enum_Line2D_LineCapMode>` value **)** -- :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_end_cap_mode** **(** **)** +- |void| **set_end_cap_mode**\ (\ value\: :ref:`LineCapMode<enum_Line2D_LineCapMode>`\ ) +- :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_end_cap_mode**\ (\ ) -Controls the style of the line's last point. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants. +The style of the end of the polyline, if :ref:`closed<class_Line2D_property_closed>` is ``false``. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants. .. rst-class:: classref-item-separator @@ -278,14 +305,14 @@ Controls the style of the line's last point. Use :ref:`LineCapMode<enum_Line2D_L .. rst-class:: classref-property -:ref:`Gradient<class_Gradient>` **gradient** +:ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_Line2D_property_gradient>` .. rst-class:: classref-property-setget -- void **set_gradient** **(** :ref:`Gradient<class_Gradient>` value **)** -- :ref:`Gradient<class_Gradient>` **get_gradient** **(** **)** +- |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ ) +- :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ ) -The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. +The gradient is drawn through the whole line from start to finish. The :ref:`default_color<class_Line2D_property_default_color>` will not be used if this property is set. .. rst-class:: classref-item-separator @@ -295,14 +322,14 @@ The gradient is drawn through the whole line from start to finish. The default c .. rst-class:: classref-property -:ref:`LineJointMode<enum_Line2D_LineJointMode>` **joint_mode** = ``0`` +:ref:`LineJointMode<enum_Line2D_LineJointMode>` **joint_mode** = ``0`` :ref:`🔗<class_Line2D_property_joint_mode>` .. rst-class:: classref-property-setget -- void **set_joint_mode** **(** :ref:`LineJointMode<enum_Line2D_LineJointMode>` value **)** -- :ref:`LineJointMode<enum_Line2D_LineJointMode>` **get_joint_mode** **(** **)** +- |void| **set_joint_mode**\ (\ value\: :ref:`LineJointMode<enum_Line2D_LineJointMode>`\ ) +- :ref:`LineJointMode<enum_Line2D_LineJointMode>` **get_joint_mode**\ (\ ) -The style for the points between the start and the end. +The style of the connections between segments of the polyline. Use :ref:`LineJointMode<enum_Line2D_LineJointMode>` constants. .. rst-class:: classref-item-separator @@ -312,14 +339,16 @@ The style for the points between the start and the end. .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **points** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **points** = ``PackedVector2Array()`` :ref:`🔗<class_Line2D_property_points>` .. rst-class:: classref-property-setget -- void **set_points** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_points** **(** **)** +- |void| **set_points**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_points**\ (\ ) -The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors. +The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. .. rst-class:: classref-item-separator @@ -329,16 +358,14 @@ The points that form the lines. The line is drawn between every point set in thi .. rst-class:: classref-property -:ref:`int<class_int>` **round_precision** = ``8`` +:ref:`int<class_int>` **round_precision** = ``8`` :ref:`🔗<class_Line2D_property_round_precision>` .. rst-class:: classref-property-setget -- void **set_round_precision** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_round_precision** **(** **)** - -The smoothness of the rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. This is only used if a cap or joint is set as round. +- |void| **set_round_precision**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_round_precision**\ (\ ) -\ **Note:** The default value is tuned for lines with the default :ref:`width<class_Line2D_property_width>`. For thin lines, this value should be reduced to a number between ``2`` and ``4`` to improve performance. +The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. .. rst-class:: classref-item-separator @@ -348,14 +375,14 @@ The smoothness of the rounded joints and caps. Higher values result in smoother .. rst-class:: classref-property -:ref:`float<class_float>` **sharp_limit** = ``2.0`` +:ref:`float<class_float>` **sharp_limit** = ``2.0`` :ref:`🔗<class_Line2D_property_sharp_limit>` .. rst-class:: classref-property-setget -- void **set_sharp_limit** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sharp_limit** **(** **)** +- |void| **set_sharp_limit**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sharp_limit**\ (\ ) -The direction difference in radians between vector points. This value is only used if :ref:`joint_mode<class_Line2D_property_joint_mode>` is set to :ref:`LINE_JOINT_SHARP<class_Line2D_constant_LINE_JOINT_SHARP>`. +Determines the miter limit of the polyline. Normally, when :ref:`joint_mode<class_Line2D_property_joint_mode>` is set to :ref:`LINE_JOINT_SHARP<class_Line2D_constant_LINE_JOINT_SHARP>`, sharp angles fall back to using the logic of :ref:`LINE_JOINT_BEVEL<class_Line2D_constant_LINE_JOINT_BEVEL>` joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles. .. rst-class:: classref-item-separator @@ -365,14 +392,14 @@ The direction difference in radians between vector points. This value is only us .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_Line2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) -The texture used for the line's texture. Uses ``texture_mode`` for drawing style. +The texture used for the polyline. Uses :ref:`texture_mode<class_Line2D_property_texture_mode>` for drawing style. .. rst-class:: classref-item-separator @@ -382,14 +409,14 @@ The texture used for the line's texture. Uses ``texture_mode`` for drawing style .. rst-class:: classref-property -:ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **texture_mode** = ``0`` +:ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **texture_mode** = ``0`` :ref:`🔗<class_Line2D_property_texture_mode>` .. rst-class:: classref-property-setget -- void **set_texture_mode** **(** :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` value **)** -- :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **get_texture_mode** **(** **)** +- |void| **set_texture_mode**\ (\ value\: :ref:`LineTextureMode<enum_Line2D_LineTextureMode>`\ ) +- :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **get_texture_mode**\ (\ ) -The style to render the ``texture`` on the line. Use :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` constants. +The style to render the :ref:`texture<class_Line2D_property_texture>` of the polyline. Use :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` constants. .. rst-class:: classref-item-separator @@ -399,14 +426,14 @@ The style to render the ``texture`` on the line. Use :ref:`LineTextureMode<enum_ .. rst-class:: classref-property -:ref:`float<class_float>` **width** = ``10.0`` +:ref:`float<class_float>` **width** = ``10.0`` :ref:`🔗<class_Line2D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_width**\ (\ ) -The line's width. +The polyline's width. .. rst-class:: classref-item-separator @@ -416,14 +443,14 @@ The line's width. .. rst-class:: classref-property -:ref:`Curve<class_Curve>` **width_curve** +:ref:`Curve<class_Curve>` **width_curve** :ref:`🔗<class_Line2D_property_width_curve>` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve<class_Curve>` value **)** -- :ref:`Curve<class_Curve>` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ ) +- :ref:`Curve<class_Curve>` **get_curve**\ (\ ) -The line's width varies with the curve. The original width is simply multiply by the value of the Curve. +The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. .. rst-class:: classref-section-separator @@ -438,11 +465,11 @@ Method Descriptions .. rst-class:: classref-method -void **add_point** **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` index=-1 **)** +|void| **add_point**\ (\ position\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Line2D_method_add_point>` -Adds a point with the specified ``position`` relative to the line's own position. Appends the new point at the end of the point list. +Adds a point with the specified ``position`` relative to the polyline's own position. If no ``index`` is provided, the new point will be added to the end of the points array. -If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. Every existing point starting from ``index`` is shifted further down the list of points. The index must be greater than or equal to ``0`` and must not exceed the number of existing points in the line. See :ref:`get_point_count<class_Line2D_method_get_point_count>`. +If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. The indices of the points after the new point get increased by 1. The provided ``index`` must not exceed the number of existing points in the polyline. See :ref:`get_point_count<class_Line2D_method_get_point_count>`. .. rst-class:: classref-item-separator @@ -452,9 +479,9 @@ If ``index`` is given, the new point is inserted before the existing point ident .. rst-class:: classref-method -void **clear_points** **(** **)** +|void| **clear_points**\ (\ ) :ref:`🔗<class_Line2D_method_clear_points>` -Removes all points from the line. +Removes all points from the polyline, making it empty. .. rst-class:: classref-item-separator @@ -464,9 +491,9 @@ Removes all points from the line. .. rst-class:: classref-method -:ref:`int<class_int>` **get_point_count** **(** **)** |const| +:ref:`int<class_int>` **get_point_count**\ (\ ) |const| :ref:`🔗<class_Line2D_method_get_point_count>` -Returns the number of points in the line. +Returns the number of points in the polyline. .. rst-class:: classref-item-separator @@ -476,7 +503,7 @@ Returns the number of points in the line. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_point_position** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector2<class_Vector2>` **get_point_position**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Line2D_method_get_point_position>` Returns the position of the point at index ``index``. @@ -488,9 +515,9 @@ Returns the position of the point at index ``index``. .. rst-class:: classref-method -void **remove_point** **(** :ref:`int<class_int>` index **)** +|void| **remove_point**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Line2D_method_remove_point>` -Removes the point at index ``index`` from the line. +Removes the point at index ``index`` from the polyline. .. rst-class:: classref-item-separator @@ -500,9 +527,9 @@ Removes the point at index ``index`` from the line. .. rst-class:: classref-method -void **set_point_position** **(** :ref:`int<class_int>` index, :ref:`Vector2<class_Vector2>` position **)** +|void| **set_point_position**\ (\ index\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Line2D_method_set_point_position>` -Overwrites the position of the point at index ``index`` with the supplied ``position``. +Overwrites the position of the point at the given ``index`` with the supplied ``position``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -511,3 +538,4 @@ Overwrites the position of the point at index ``index`` with the supplied ``posi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_lineedit.rst b/classes/class_lineedit.rst index 16ceebbb95a..a084669c4cc 100644 --- a/classes/class_lineedit.rst +++ b/classes/class_lineedit.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: text, input + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -82,7 +85,7 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`caret_force_displayed<class_LineEdit_property_caret_force_displayed>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_LineEdit_property_caret_mid_grapheme>` | ``true`` | + | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_LineEdit_property_caret_mid_grapheme>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ @@ -90,6 +93,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_LineEdit_property_deselect_on_focus_loss_enabled>` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_LineEdit_property_drag_and_drop_selection_enabled>` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`draw_control_chars<class_LineEdit_property_draw_control_chars>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`editable<class_LineEdit_property_editable>` | ``true`` | @@ -143,37 +148,37 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_LineEdit_method_clear>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delete_char_at_caret<class_LineEdit_method_delete_char_at_caret>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delete_text<class_LineEdit_method_delete_text>` **(** :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_column **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect<class_LineEdit_method_deselect>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_LineEdit_method_get_menu>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_scroll_offset<class_LineEdit_method_get_scroll_offset>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_selected_text<class_LineEdit_method_get_selected_text>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_LineEdit_method_get_selection_from_column>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_LineEdit_method_get_selection_to_column>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_selection<class_LineEdit_method_has_selection>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`insert_text_at_caret<class_LineEdit_method_insert_text_at_caret>` **(** :ref:`String<class_String>` text **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_LineEdit_method_is_menu_visible>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option<class_LineEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select<class_LineEdit_method_select>` **(** :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=-1 **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all<class_LineEdit_method_select_all>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_LineEdit_method_clear>`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_char_at_caret<class_LineEdit_method_delete_char_at_caret>`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_text<class_LineEdit_method_delete_text>`\ (\ from_column\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect<class_LineEdit_method_deselect>`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_LineEdit_method_get_menu>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_scroll_offset<class_LineEdit_method_get_scroll_offset>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_selected_text<class_LineEdit_method_get_selected_text>`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_LineEdit_method_get_selection_from_column>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_LineEdit_method_get_selection_to_column>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_selection<class_LineEdit_method_has_selection>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_text_at_caret<class_LineEdit_method_insert_text_at_caret>`\ (\ text\: :ref:`String<class_String>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_LineEdit_method_is_menu_visible>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`menu_option<class_LineEdit_method_menu_option>`\ (\ option\: :ref:`int<class_int>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select<class_LineEdit_method_select>`\ (\ from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_all<class_LineEdit_method_select_all>`\ (\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -192,7 +197,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_color<class_LineEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_LineEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_LineEdit_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_LineEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ @@ -234,7 +239,7 @@ Signals .. rst-class:: classref-signal -**text_change_rejected** **(** :ref:`String<class_String>` rejected_substring **)** +**text_change_rejected**\ (\ rejected_substring\: :ref:`String<class_String>`\ ) :ref:`🔗<class_LineEdit_signal_text_change_rejected>` Emitted when appending text that overflows the :ref:`max_length<class_LineEdit_property_max_length>`. The appended text is truncated to fit :ref:`max_length<class_LineEdit_property_max_length>`, and the part that couldn't fit is passed as the ``rejected_substring`` argument. @@ -246,7 +251,7 @@ Emitted when appending text that overflows the :ref:`max_length<class_LineEdit_p .. rst-class:: classref-signal -**text_changed** **(** :ref:`String<class_String>` new_text **)** +**text_changed**\ (\ new_text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_LineEdit_signal_text_changed>` Emitted when the text changes. @@ -258,7 +263,7 @@ Emitted when the text changes. .. rst-class:: classref-signal -**text_submitted** **(** :ref:`String<class_String>` new_text **)** +**text_submitted**\ (\ new_text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_LineEdit_signal_text_submitted>` Emitted when the user presses :ref:`@GlobalScope.KEY_ENTER<class_@GlobalScope_constant_KEY_ENTER>` on the **LineEdit**. @@ -275,7 +280,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MenuItems**: +enum **MenuItems**: :ref:`🔗<enum_LineEdit_MenuItems>` .. _class_LineEdit_constant_MENU_CUT: @@ -535,7 +540,7 @@ Represents the size of the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum. .. rst-class:: classref-enumeration -enum **VirtualKeyboardType**: +enum **VirtualKeyboardType**: :ref:`🔗<enum_LineEdit_VirtualKeyboardType>` .. _class_LineEdit_constant_KEYBOARD_TYPE_DEFAULT: @@ -616,12 +621,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` :ref:`🔗<class_LineEdit_property_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Text alignment as defined in the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` enum. @@ -633,12 +638,12 @@ Text alignment as defined in the :ref:`HorizontalAlignment<enum_@GlobalScope_Hor .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_blink** = ``false`` +:ref:`bool<class_bool>` **caret_blink** = ``false`` :ref:`🔗<class_LineEdit_property_caret_blink>` .. rst-class:: classref-property-setget -- void **set_caret_blink_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_caret_blink_enabled** **(** **)** +- |void| **set_caret_blink_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_caret_blink_enabled**\ (\ ) If ``true``, makes the caret blink. @@ -650,12 +655,12 @@ If ``true``, makes the caret blink. .. rst-class:: classref-property -:ref:`float<class_float>` **caret_blink_interval** = ``0.65`` +:ref:`float<class_float>` **caret_blink_interval** = ``0.65`` :ref:`🔗<class_LineEdit_property_caret_blink_interval>` .. rst-class:: classref-property-setget -- void **set_caret_blink_interval** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_caret_blink_interval** **(** **)** +- |void| **set_caret_blink_interval**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_caret_blink_interval**\ (\ ) The interval at which the caret blinks (in seconds). @@ -667,12 +672,12 @@ The interval at which the caret blinks (in seconds). .. rst-class:: classref-property -:ref:`int<class_int>` **caret_column** = ``0`` +:ref:`int<class_int>` **caret_column** = ``0`` :ref:`🔗<class_LineEdit_property_caret_column>` .. rst-class:: classref-property-setget -- void **set_caret_column** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_caret_column** **(** **)** +- |void| **set_caret_column**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_caret_column**\ (\ ) The caret's column position inside the **LineEdit**. When set, the text may scroll to accommodate it. @@ -684,12 +689,12 @@ The caret's column position inside the **LineEdit**. When set, the text may scro .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_force_displayed** = ``false`` +:ref:`bool<class_bool>` **caret_force_displayed** = ``false`` :ref:`🔗<class_LineEdit_property_caret_force_displayed>` .. rst-class:: classref-property-setget -- void **set_caret_force_displayed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_caret_force_displayed** **(** **)** +- |void| **set_caret_force_displayed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_caret_force_displayed**\ (\ ) If ``true``, the **LineEdit** will always show the caret, even if focus is lost. @@ -701,12 +706,12 @@ If ``true``, the **LineEdit** will always show the caret, even if focus is lost. .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_mid_grapheme** = ``true`` +:ref:`bool<class_bool>` **caret_mid_grapheme** = ``false`` :ref:`🔗<class_LineEdit_property_caret_mid_grapheme>` .. rst-class:: classref-property-setget -- void **set_caret_mid_grapheme_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_caret_mid_grapheme_enabled** **(** **)** +- |void| **set_caret_mid_grapheme_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_caret_mid_grapheme_enabled**\ (\ ) Allow moving caret, selecting and removing the individual composite character components. @@ -720,12 +725,12 @@ Allow moving caret, selecting and removing the individual composite character co .. rst-class:: classref-property -:ref:`bool<class_bool>` **clear_button_enabled** = ``false`` +:ref:`bool<class_bool>` **clear_button_enabled** = ``false`` :ref:`🔗<class_LineEdit_property_clear_button_enabled>` .. rst-class:: classref-property-setget -- void **set_clear_button_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_clear_button_enabled** **(** **)** +- |void| **set_clear_button_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_clear_button_enabled**\ (\ ) If ``true``, the **LineEdit** will show a clear button if :ref:`text<class_LineEdit_property_text>` is not empty, which can be used to clear the text quickly. @@ -737,12 +742,12 @@ If ``true``, the **LineEdit** will show a clear button if :ref:`text<class_LineE .. rst-class:: classref-property -:ref:`bool<class_bool>` **context_menu_enabled** = ``true`` +:ref:`bool<class_bool>` **context_menu_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_context_menu_enabled>` .. rst-class:: classref-property-setget -- void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)** +- |void| **set_context_menu_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_context_menu_enabled**\ (\ ) If ``true``, the context menu will appear when right-clicked. @@ -754,12 +759,12 @@ If ``true``, the context menu will appear when right-clicked. .. rst-class:: classref-property -:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` +:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_deselect_on_focus_loss_enabled>` .. rst-class:: classref-property-setget -- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)** +- |void| **set_deselect_on_focus_loss_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled**\ (\ ) If ``true``, the selected text will be deselected when focus is lost. @@ -767,16 +772,33 @@ If ``true``, the selected text will be deselected when focus is lost. ---- +.. _class_LineEdit_property_drag_and_drop_selection_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_drag_and_drop_selection_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_and_drop_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled**\ (\ ) + +If ``true``, allow drag and drop of selected text. + +.. rst-class:: classref-item-separator + +---- + .. _class_LineEdit_property_draw_control_chars: .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_control_chars** = ``false`` +:ref:`bool<class_bool>` **draw_control_chars** = ``false`` :ref:`🔗<class_LineEdit_property_draw_control_chars>` .. rst-class:: classref-property-setget -- void **set_draw_control_chars** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_draw_control_chars** **(** **)** +- |void| **set_draw_control_chars**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_control_chars**\ (\ ) If ``true``, control characters are displayed. @@ -788,12 +810,12 @@ If ``true``, control characters are displayed. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editable** = ``true`` +:ref:`bool<class_bool>` **editable** = ``true`` :ref:`🔗<class_LineEdit_property_editable>` .. rst-class:: classref-property-setget -- void **set_editable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editable** **(** **)** +- |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editable**\ (\ ) If ``false``, existing text cannot be modified and new text cannot be added. @@ -805,12 +827,12 @@ If ``false``, existing text cannot be modified and new text cannot be added. .. rst-class:: classref-property -:ref:`bool<class_bool>` **expand_to_text_length** = ``false`` +:ref:`bool<class_bool>` **expand_to_text_length** = ``false`` :ref:`🔗<class_LineEdit_property_expand_to_text_length>` .. rst-class:: classref-property-setget -- void **set_expand_to_text_length_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_expand_to_text_length_enabled** **(** **)** +- |void| **set_expand_to_text_length_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_expand_to_text_length_enabled**\ (\ ) If ``true``, the **LineEdit** width will increase to stay longer than the :ref:`text<class_LineEdit_property_text>`. It will **not** compress if the :ref:`text<class_LineEdit_property_text>` is shortened. @@ -822,14 +844,14 @@ If ``true``, the **LineEdit** width will increase to stay longer than the :ref:` .. rst-class:: classref-property -:ref:`bool<class_bool>` **flat** = ``false`` +:ref:`bool<class_bool>` **flat** = ``false`` :ref:`🔗<class_LineEdit_property_flat>` .. rst-class:: classref-property-setget -- void **set_flat** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flat** **(** **)** +- |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flat**\ (\ ) -If ``true``, the **LineEdit** don't display decoration. +If ``true``, the **LineEdit** doesn't display decoration. .. rst-class:: classref-item-separator @@ -839,14 +861,14 @@ If ``true``, the **LineEdit** don't display decoration. .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_LineEdit_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) -Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. +Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead. .. rst-class:: classref-item-separator @@ -856,12 +878,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`int<class_int>` **max_length** = ``0`` +:ref:`int<class_int>` **max_length** = ``0`` :ref:`🔗<class_LineEdit_property_max_length>` .. rst-class:: classref-property-setget -- void **set_max_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_length** **(** **)** +- |void| **set_max_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_length**\ (\ ) Maximum number of characters that can be entered inside the **LineEdit**. If ``0``, there is no limit. @@ -902,12 +924,12 @@ When a limit is defined, characters that would exceed :ref:`max_length<class_Lin .. rst-class:: classref-property -:ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true`` +:ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_middle_mouse_paste_enabled>` .. rst-class:: classref-property-setget -- void **set_middle_mouse_paste_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled** **(** **)** +- |void| **set_middle_mouse_paste_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled**\ (\ ) If ``false``, using middle mouse button to paste clipboard will be disabled. @@ -921,12 +943,12 @@ If ``false``, using middle mouse button to paste clipboard will be disabled. .. rst-class:: classref-property -:ref:`String<class_String>` **placeholder_text** = ``""`` +:ref:`String<class_String>` **placeholder_text** = ``""`` :ref:`🔗<class_LineEdit_property_placeholder_text>` .. rst-class:: classref-property-setget -- void **set_placeholder** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_placeholder** **(** **)** +- |void| **set_placeholder**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_placeholder**\ (\ ) Text shown when the **LineEdit** is empty. It is **not** the **LineEdit**'s default value (see :ref:`text<class_LineEdit_property_text>`). @@ -938,12 +960,12 @@ Text shown when the **LineEdit** is empty. It is **not** the **LineEdit**'s defa .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **right_icon** +:ref:`Texture2D<class_Texture2D>` **right_icon** :ref:`🔗<class_LineEdit_property_right_icon>` .. rst-class:: classref-property-setget -- void **set_right_icon** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_right_icon** **(** **)** +- |void| **set_right_icon**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_right_icon**\ (\ ) Sets the icon that will appear in the right end of the **LineEdit** if there's no :ref:`text<class_LineEdit_property_text>`, or always, if :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>` is set to ``false``. @@ -955,12 +977,12 @@ Sets the icon that will appear in the right end of the **LineEdit** if there's n .. rst-class:: classref-property -:ref:`bool<class_bool>` **secret** = ``false`` +:ref:`bool<class_bool>` **secret** = ``false`` :ref:`🔗<class_LineEdit_property_secret>` .. rst-class:: classref-property-setget -- void **set_secret** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_secret** **(** **)** +- |void| **set_secret**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_secret**\ (\ ) If ``true``, every character is replaced with the secret character (see :ref:`secret_character<class_LineEdit_property_secret_character>`). @@ -972,14 +994,14 @@ If ``true``, every character is replaced with the secret character (see :ref:`se .. rst-class:: classref-property -:ref:`String<class_String>` **secret_character** = ``"•"`` +:ref:`String<class_String>` **secret_character** = ``"•"`` :ref:`🔗<class_LineEdit_property_secret_character>` .. rst-class:: classref-property-setget -- void **set_secret_character** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_secret_character** **(** **)** +- |void| **set_secret_character**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_secret_character**\ (\ ) -The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character. +The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead. .. rst-class:: classref-item-separator @@ -989,12 +1011,12 @@ The character to use to mask secret input (defaults to "•"). Only a single cha .. rst-class:: classref-property -:ref:`bool<class_bool>` **select_all_on_focus** = ``false`` +:ref:`bool<class_bool>` **select_all_on_focus** = ``false`` :ref:`🔗<class_LineEdit_property_select_all_on_focus>` .. rst-class:: classref-property-setget -- void **set_select_all_on_focus** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_select_all_on_focus** **(** **)** +- |void| **set_select_all_on_focus**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_select_all_on_focus**\ (\ ) If ``true``, the **LineEdit** will select the whole text when it gains focus. @@ -1006,12 +1028,12 @@ If ``true``, the **LineEdit** will select the whole text when it gains focus. .. rst-class:: classref-property -:ref:`bool<class_bool>` **selecting_enabled** = ``true`` +:ref:`bool<class_bool>` **selecting_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_selecting_enabled>` .. rst-class:: classref-property-setget -- void **set_selecting_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_selecting_enabled** **(** **)** +- |void| **set_selecting_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_selecting_enabled**\ (\ ) If ``false``, it's impossible to select the text using mouse nor keyboard. @@ -1023,12 +1045,12 @@ If ``false``, it's impossible to select the text using mouse nor keyboard. .. rst-class:: classref-property -:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` +:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_shortcut_keys_enabled>` .. rst-class:: classref-property-setget -- void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)** +- |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shortcut_keys_enabled**\ (\ ) If ``false``, using shortcuts will be disabled. @@ -1040,12 +1062,12 @@ If ``false``, using shortcuts will be disabled. .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_LineEdit_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -1057,12 +1079,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_LineEdit_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -1074,12 +1096,12 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_LineEdit_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) String value of the **LineEdit**. @@ -1093,12 +1115,12 @@ String value of the **LineEdit**. .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_LineEdit_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -1110,12 +1132,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true`` +:ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true`` :ref:`🔗<class_LineEdit_property_virtual_keyboard_enabled>` .. rst-class:: classref-property-setget -- void **set_virtual_keyboard_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_virtual_keyboard_enabled** **(** **)** +- |void| **set_virtual_keyboard_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_virtual_keyboard_enabled**\ (\ ) If ``true``, the native virtual keyboard is shown when focused on platforms that support it. @@ -1127,12 +1149,12 @@ If ``true``, the native virtual keyboard is shown when focused on platforms that .. rst-class:: classref-property -:ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **virtual_keyboard_type** = ``0`` +:ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **virtual_keyboard_type** = ``0`` :ref:`🔗<class_LineEdit_property_virtual_keyboard_type>` .. rst-class:: classref-property-setget -- void **set_virtual_keyboard_type** **(** :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` value **)** -- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **get_virtual_keyboard_type** **(** **)** +- |void| **set_virtual_keyboard_type**\ (\ value\: :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>`\ ) +- :ref:`VirtualKeyboardType<enum_LineEdit_VirtualKeyboardType>` **get_virtual_keyboard_type**\ (\ ) Specifies the type of virtual keyboard to show. @@ -1149,7 +1171,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_LineEdit_method_clear>` Erases the **LineEdit**'s :ref:`text<class_LineEdit_property_text>`. @@ -1161,7 +1183,7 @@ Erases the **LineEdit**'s :ref:`text<class_LineEdit_property_text>`. .. rst-class:: classref-method -void **delete_char_at_caret** **(** **)** +|void| **delete_char_at_caret**\ (\ ) :ref:`🔗<class_LineEdit_method_delete_char_at_caret>` Deletes one character at the caret's current position (equivalent to pressing :kbd:`Delete`). @@ -1173,7 +1195,7 @@ Deletes one character at the caret's current position (equivalent to pressing :k .. rst-class:: classref-method -void **delete_text** **(** :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_column **)** +|void| **delete_text**\ (\ from_column\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LineEdit_method_delete_text>` Deletes a section of the :ref:`text<class_LineEdit_property_text>` going from position ``from_column`` to ``to_column``. Both parameters should be within the text's length. @@ -1185,7 +1207,7 @@ Deletes a section of the :ref:`text<class_LineEdit_property_text>` going from po .. rst-class:: classref-method -void **deselect** **(** **)** +|void| **deselect**\ (\ ) :ref:`🔗<class_LineEdit_method_deselect>` Clears the current selection. @@ -1197,7 +1219,7 @@ Clears the current selection. .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_menu**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_get_menu>` Returns the :ref:`PopupMenu<class_PopupMenu>` of this **LineEdit**. By default, this menu is displayed when right-clicking on the **LineEdit**. @@ -1256,7 +1278,7 @@ You can add custom menu items or remove standard ones. Make sure your IDs don't .. rst-class:: classref-method -:ref:`float<class_float>` **get_scroll_offset** **(** **)** |const| +:ref:`float<class_float>` **get_scroll_offset**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_get_scroll_offset>` Returns the scroll offset due to :ref:`caret_column<class_LineEdit_property_caret_column>`, as a number of characters. @@ -1268,7 +1290,7 @@ Returns the scroll offset due to :ref:`caret_column<class_LineEdit_property_care .. rst-class:: classref-method -:ref:`String<class_String>` **get_selected_text** **(** **)** +:ref:`String<class_String>` **get_selected_text**\ (\ ) :ref:`🔗<class_LineEdit_method_get_selected_text>` Returns the text inside the selection. @@ -1280,7 +1302,7 @@ Returns the text inside the selection. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_from_column** **(** **)** |const| +:ref:`int<class_int>` **get_selection_from_column**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_get_selection_from_column>` Returns the selection begin column. @@ -1292,7 +1314,7 @@ Returns the selection begin column. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_to_column** **(** **)** |const| +:ref:`int<class_int>` **get_selection_to_column**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_get_selection_to_column>` Returns the selection end column. @@ -1304,7 +1326,7 @@ Returns the selection end column. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_selection** **(** **)** |const| +:ref:`bool<class_bool>` **has_selection**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_has_selection>` Returns ``true`` if the user has selected text. @@ -1316,7 +1338,7 @@ Returns ``true`` if the user has selected text. .. rst-class:: classref-method -void **insert_text_at_caret** **(** :ref:`String<class_String>` text **)** +|void| **insert_text_at_caret**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_LineEdit_method_insert_text_at_caret>` Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_length<class_LineEdit_property_max_length>`, nothing happens. @@ -1328,7 +1350,7 @@ Inserts ``text`` at the caret. If the resulting value is longer than :ref:`max_l .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const| +:ref:`bool<class_bool>` **is_menu_visible**\ (\ ) |const| :ref:`🔗<class_LineEdit_method_is_menu_visible>` Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). @@ -1340,7 +1362,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` .. rst-class:: classref-method -void **menu_option** **(** :ref:`int<class_int>` option **)** +|void| **menu_option**\ (\ option\: :ref:`int<class_int>`\ ) :ref:`🔗<class_LineEdit_method_menu_option>` Executes a given action as defined in the :ref:`MenuItems<enum_LineEdit_MenuItems>` enum. @@ -1352,7 +1374,7 @@ Executes a given action as defined in the :ref:`MenuItems<enum_LineEdit_MenuItem .. rst-class:: classref-method -void **select** **(** :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=-1 **)** +|void| **select**\ (\ from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_LineEdit_method_select>` Selects characters inside **LineEdit** between ``from`` and ``to``. By default, ``from`` is at the beginning and ``to`` at the end. @@ -1383,7 +1405,7 @@ Selects characters inside **LineEdit** between ``from`` and ``to``. By default, .. rst-class:: classref-method -void **select_all** **(** **)** +|void| **select_all**\ (\ ) :ref:`🔗<class_LineEdit_method_select_all>` Selects the whole :ref:`String<class_String>`. @@ -1400,7 +1422,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **caret_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **caret_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_LineEdit_theme_color_caret_color>` Color of the **LineEdit**'s caret (text cursor). This can be set to a fully transparent color to hide the caret entirely. @@ -1412,7 +1434,7 @@ Color of the **LineEdit**'s caret (text cursor). This can be set to a fully tran .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **clear_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **clear_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_LineEdit_theme_color_clear_button_color>` Color used as default tint for the clear button. @@ -1424,7 +1446,7 @@ Color used as default tint for the clear button. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **clear_button_color_pressed** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **clear_button_color_pressed** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LineEdit_theme_color_clear_button_color_pressed>` Color used for the clear button when it's pressed. @@ -1436,7 +1458,7 @@ Color used for the clear button when it's pressed. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_LineEdit_theme_color_font_color>` Default font color. @@ -1448,7 +1470,7 @@ Default font color. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_LineEdit_theme_color_font_outline_color>` The tint of text outline of the **LineEdit**. @@ -1460,7 +1482,7 @@ The tint of text outline of the **LineEdit**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` +:ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` :ref:`🔗<class_LineEdit_theme_color_font_placeholder_color>` Font color for :ref:`placeholder_text<class_LineEdit_property_placeholder_text>`. @@ -1472,7 +1494,7 @@ Font color for :ref:`placeholder_text<class_LineEdit_property_placeholder_text>` .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LineEdit_theme_color_font_selected_color>` Font color for selected text (inside the selection rectangle). @@ -1484,7 +1506,7 @@ Font color for selected text (inside the selection rectangle). .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_uneditable_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color<class_Color>` **font_uneditable_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_LineEdit_theme_color_font_uneditable_color>` Font color when editing is disabled. @@ -1496,7 +1518,7 @@ Font color when editing is disabled. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` +:ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` :ref:`🔗<class_LineEdit_theme_color_selection_color>` Color of the selection rectangle. @@ -1508,7 +1530,7 @@ Color of the selection rectangle. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **caret_width** = ``1`` +:ref:`int<class_int>` **caret_width** = ``1`` :ref:`🔗<class_LineEdit_theme_constant_caret_width>` The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. @@ -1520,7 +1542,7 @@ The caret's width in pixels. Greater values can be used to improve accessibility .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **minimum_character_width** = ``4`` +:ref:`int<class_int>` **minimum_character_width** = ``4`` :ref:`🔗<class_LineEdit_theme_constant_minimum_character_width>` Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this number of 'M' characters can be displayed without scrolling). @@ -1532,7 +1554,7 @@ Minimum horizontal space for the text (not counting the clear button and content .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_LineEdit_theme_constant_outline_size>` The size of the text outline. @@ -1546,7 +1568,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_LineEdit_theme_font_font>` Font used for the text. @@ -1558,7 +1580,7 @@ Font used for the text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_LineEdit_theme_font_size_font_size>` Font size of the **LineEdit**'s text. @@ -1570,7 +1592,7 @@ Font size of the **LineEdit**'s text. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **clear** +:ref:`Texture2D<class_Texture2D>` **clear** :ref:`🔗<class_LineEdit_theme_icon_clear>` Texture for the clear button. See :ref:`clear_button_enabled<class_LineEdit_property_clear_button_enabled>`. @@ -1582,7 +1604,7 @@ Texture for the clear button. See :ref:`clear_button_enabled<class_LineEdit_prop .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_LineEdit_theme_style_focus>` Background used when **LineEdit** has GUI focus. The :ref:`focus<class_LineEdit_theme_style_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. @@ -1594,7 +1616,7 @@ Background used when **LineEdit** has GUI focus. The :ref:`focus<class_LineEdit_ .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **normal** +:ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_LineEdit_theme_style_normal>` Default background for the **LineEdit**. @@ -1606,7 +1628,7 @@ Default background for the **LineEdit**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **read_only** +:ref:`StyleBox<class_StyleBox>` **read_only** :ref:`🔗<class_LineEdit_theme_style_read_only>` Background used when **LineEdit** is in read-only mode (:ref:`editable<class_LineEdit_property_editable>` is set to ``false``). @@ -1617,3 +1639,4 @@ Background used when **LineEdit** is in read-only mode (:ref:`editable<class_Lin .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_linkbutton.rst b/classes/class_linkbutton.rst index d35643caef0..6a6f3fca4d4 100644 --- a/classes/class_linkbutton.rst +++ b/classes/class_linkbutton.rst @@ -59,27 +59,31 @@ Theme Properties .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_color<class_LinkButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_LinkButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_LinkButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_LinkButton_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_LinkButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`outline_size<class_LinkButton_theme_constant_outline_size>` | ``0`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`underline_spacing<class_LinkButton_theme_constant_underline_spacing>` | ``2`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font<class_Font>` | :ref:`font<class_LinkButton_theme_font_font>` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`font_size<class_LinkButton_theme_font_size_font_size>` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_LinkButton_theme_style_focus>` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_color<class_LinkButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_LinkButton_theme_color_font_disabled_color>` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_LinkButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_LinkButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_LinkButton_theme_color_font_hover_pressed_color>` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_LinkButton_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_LinkButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`outline_size<class_LinkButton_theme_constant_outline_size>` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`underline_spacing<class_LinkButton_theme_constant_underline_spacing>` | ``2`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font<class_Font>` | :ref:`font<class_LinkButton_theme_font_font>` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`font_size<class_LinkButton_theme_font_size_font_size>` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_LinkButton_theme_style_focus>` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -94,7 +98,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **UnderlineMode**: +enum **UnderlineMode**: :ref:`🔗<enum_LinkButton_UnderlineMode>` .. _class_LinkButton_constant_UNDERLINE_MODE_ALWAYS: @@ -133,12 +137,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_LinkButton_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -150,12 +154,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_LinkButton_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -167,12 +171,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_LinkButton_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -184,12 +188,12 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_LinkButton_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) The button's text that will be displayed inside the button's area. @@ -201,12 +205,12 @@ The button's text that will be displayed inside the button's area. .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_LinkButton_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -218,12 +222,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` **underline** = ``0`` +:ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` **underline** = ``0`` :ref:`🔗<class_LinkButton_property_underline>` .. rst-class:: classref-property-setget -- void **set_underline_mode** **(** :ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` value **)** -- :ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` **get_underline_mode** **(** **)** +- |void| **set_underline_mode**\ (\ value\: :ref:`UnderlineMode<enum_LinkButton_UnderlineMode>`\ ) +- :ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` **get_underline_mode**\ (\ ) The underline mode to use for the text. See :ref:`UnderlineMode<enum_LinkButton_UnderlineMode>` for the available modes. @@ -235,12 +239,12 @@ The underline mode to use for the text. See :ref:`UnderlineMode<enum_LinkButton_ .. rst-class:: classref-property -:ref:`String<class_String>` **uri** = ``""`` +:ref:`String<class_String>` **uri** = ``""`` :ref:`🔗<class_LinkButton_property_uri>` .. rst-class:: classref-property-setget -- void **set_uri** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_uri** **(** **)** +- |void| **set_uri**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_uri**\ (\ ) The `URI <https://en.wikipedia.org/wiki/Uniform_Resource_Identifier>`__ for this **LinkButton**. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via :ref:`OS.shell_open<class_OS_method_shell_open>`). HTTP and HTTPS URLs open the default web browser. @@ -276,7 +280,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_color>` Default text :ref:`Color<class_Color>` of the **LinkButton**. @@ -284,11 +288,23 @@ Default text :ref:`Color<class_Color>` of the **LinkButton**. ---- +.. _class_LinkButton_theme_color_font_disabled_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_disabled_color>` + +Text :ref:`Color<class_Color>` used when the **LinkButton** is disabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_LinkButton_theme_color_font_focus_color: .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_focus_color>` Text :ref:`Color<class_Color>` used when the **LinkButton** is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. @@ -300,7 +316,7 @@ Text :ref:`Color<class_Color>` used when the **LinkButton** is focused. Only rep .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_hover_color>` Text :ref:`Color<class_Color>` used when the **LinkButton** is being hovered. @@ -308,11 +324,23 @@ Text :ref:`Color<class_Color>` used when the **LinkButton** is being hovered. ---- +.. _class_LinkButton_theme_color_font_hover_pressed_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **font_hover_pressed_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_hover_pressed_color>` + +Text :ref:`Color<class_Color>` used when the **LinkButton** is being hovered and pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_LinkButton_theme_color_font_outline_color: .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_outline_color>` The tint of text outline of the **LinkButton**. @@ -324,7 +352,7 @@ The tint of text outline of the **LinkButton**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_LinkButton_theme_color_font_pressed_color>` Text :ref:`Color<class_Color>` used when the **LinkButton** is being pressed. @@ -336,7 +364,7 @@ Text :ref:`Color<class_Color>` used when the **LinkButton** is being pressed. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_LinkButton_theme_constant_outline_size>` The size of the text outline. @@ -350,7 +378,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **underline_spacing** = ``2`` +:ref:`int<class_int>` **underline_spacing** = ``2`` :ref:`🔗<class_LinkButton_theme_constant_underline_spacing>` The vertical space between the baseline of text and the underline. @@ -362,7 +390,7 @@ The vertical space between the baseline of text and the underline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_LinkButton_theme_font_font>` :ref:`Font<class_Font>` of the **LinkButton**'s text. @@ -374,7 +402,7 @@ The vertical space between the baseline of text and the underline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_LinkButton_theme_font_size_font_size>` Font size of the **LinkButton**'s text. @@ -386,9 +414,9 @@ Font size of the **LinkButton**'s text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_LinkButton_theme_style_focus>` -:ref:`StyleBox<class_StyleBox>` used when the **LinkButton** is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +:ref:`StyleBox<class_StyleBox>` used when the **LinkButton** is focused. The :ref:`focus<class_LinkButton_theme_style_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -397,3 +425,4 @@ Font size of the **LinkButton**'s text. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_mainloop.rst b/classes/class_mainloop.rst index 4d109d21ccc..87540476895 100644 --- a/classes/class_mainloop.rst +++ b/classes/class_mainloop.rst @@ -23,7 +23,7 @@ Description **MainLoop** is the abstract base class for a Godot project's game loop. It is inherited by :ref:`SceneTree<class_SceneTree>`, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own **MainLoop** subclass instead of the scene tree. -Upon the application start, a **MainLoop** implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a :ref:`SceneTree<class_SceneTree>` is created) unless a **MainLoop** :ref:`Script<class_Script>` is provided from the command line (with e.g. ``godot -s my_loop.gd`` or the "Main Loop Type" project setting is overwritten. +Upon the application start, a **MainLoop** implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a :ref:`SceneTree<class_SceneTree>` is created) unless a **MainLoop** :ref:`Script<class_Script>` is provided from the command line (with e.g. ``godot -s my_loop.gd``) or the "Main Loop Type" project setting is overwritten. Here is an example script implementing a simple **MainLoop**: @@ -54,6 +54,7 @@ Here is an example script implementing a simple **MainLoop**: using Godot; + [GlobalClass] public partial class CustomMainLoop : MainLoop { private double _timeElapsed = 0; @@ -88,15 +89,15 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finalize<class_MainLoop_method__finalize>` **(** **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_initialize<class_MainLoop_method__initialize>` **(** **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_physics_process<class_MainLoop_method__physics_process>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_process<class_MainLoop_method__process>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_finalize<class_MainLoop_private_method__finalize>`\ (\ ) |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_initialize<class_MainLoop_private_method__initialize>`\ (\ ) |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_physics_process<class_MainLoop_private_method__physics_process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_process<class_MainLoop_private_method__process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,7 +112,7 @@ Signals .. rst-class:: classref-signal -**on_request_permissions_result** **(** :ref:`String<class_String>` permission, :ref:`bool<class_bool>` granted **)** +**on_request_permissions_result**\ (\ permission\: :ref:`String<class_String>`, granted\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MainLoop_signal_on_request_permissions_result>` Emitted when a user responds to a permission request. @@ -128,7 +129,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` +**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_OS_MEMORY_WARNING>` Notification received from the OS when the application is exceeding its allocated memory. @@ -138,7 +139,7 @@ Specific to the iOS platform. .. rst-class:: classref-constant -**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` +**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_TRANSLATION_CHANGED>` Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr<class_Object_method_tr>`. @@ -146,7 +147,7 @@ Notification received when translations may have changed. Can be triggered by th .. rst-class:: classref-constant -**NOTIFICATION_WM_ABOUT** = ``2011`` +**NOTIFICATION_WM_ABOUT** = ``2011`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_WM_ABOUT>` Notification received from the OS when a request for "About" information is sent. @@ -156,7 +157,7 @@ Specific to the macOS platform. .. rst-class:: classref-constant -**NOTIFICATION_CRASH** = ``2012`` +**NOTIFICATION_CRASH** = ``2012`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_CRASH>` Notification received from Godot's crash handler when the engine is about to crash. @@ -166,7 +167,7 @@ Implemented on desktop platforms if the crash handler is enabled. .. rst-class:: classref-constant -**NOTIFICATION_OS_IME_UPDATE** = ``2013`` +**NOTIFICATION_OS_IME_UPDATE** = ``2013`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_OS_IME_UPDATE>` Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). @@ -176,47 +177,49 @@ Specific to the macOS platform. .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` +**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_APPLICATION_RESUMED>` Notification received from the OS when the application is resumed. -Specific to the Android platform. +Specific to the Android and iOS platforms. .. _class_MainLoop_constant_NOTIFICATION_APPLICATION_PAUSED: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` +**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_APPLICATION_PAUSED>` Notification received from the OS when the application is paused. -Specific to the Android platform. +Specific to the Android and iOS platforms. + +\ **Note:** On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. .. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_IN: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` +**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_IN>` Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. -Implemented on desktop platforms. +Implemented on desktop and mobile platforms. .. _class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` +**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>` Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. -Implemented on desktop platforms. +Implemented on desktop and mobile platforms. .. _class_MainLoop_constant_NOTIFICATION_TEXT_SERVER_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` +**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` :ref:`🔗<class_MainLoop_constant_NOTIFICATION_TEXT_SERVER_CHANGED>` Notification received when text server is changed. @@ -229,11 +232,11 @@ Notification received when text server is changed. Method Descriptions ------------------- -.. _class_MainLoop_method__finalize: +.. _class_MainLoop_private_method__finalize: .. rst-class:: classref-method -void **_finalize** **(** **)** |virtual| +|void| **_finalize**\ (\ ) |virtual| :ref:`🔗<class_MainLoop_private_method__finalize>` Called before the program exits. @@ -241,11 +244,11 @@ Called before the program exits. ---- -.. _class_MainLoop_method__initialize: +.. _class_MainLoop_private_method__initialize: .. rst-class:: classref-method -void **_initialize** **(** **)** |virtual| +|void| **_initialize**\ (\ ) |virtual| :ref:`🔗<class_MainLoop_private_method__initialize>` Called once during initialization. @@ -253,13 +256,13 @@ Called once during initialization. ---- -.. _class_MainLoop_method__physics_process: +.. _class_MainLoop_private_method__physics_process: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_physics_process** **(** :ref:`float<class_float>` delta **)** |virtual| +:ref:`bool<class_bool>` **_physics_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_MainLoop_private_method__physics_process>` -Called each physics frame with the time since the last physics frame as argument (``delta``, in seconds). Equivalent to :ref:`Node._physics_process<class_Node_method__physics_process>`. +Called each physics frame with the time since the last physics frame as argument (``delta``, in seconds). Equivalent to :ref:`Node._physics_process<class_Node_private_method__physics_process>`. If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. @@ -267,13 +270,13 @@ If implemented, the method must return a boolean value. ``true`` ends the main l ---- -.. _class_MainLoop_method__process: +.. _class_MainLoop_private_method__process: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_process** **(** :ref:`float<class_float>` delta **)** |virtual| +:ref:`bool<class_bool>` **_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_MainLoop_private_method__process>` -Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to :ref:`Node._process<class_Node_method__process>`. +Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to :ref:`Node._process<class_Node_private_method__process>`. If implemented, the method must return a boolean value. ``true`` ends the main loop, while ``false`` lets it proceed to the next frame. @@ -284,3 +287,4 @@ If implemented, the method must return a boolean value. ``true`` ends the main l .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_margincontainer.rst b/classes/class_margincontainer.rst index bf2949a8f90..c3a1faaa121 100644 --- a/classes/class_margincontainer.rst +++ b/classes/class_margincontainer.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: padding + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -84,9 +87,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **margin_bottom** = ``0`` +:ref:`int<class_int>` **margin_bottom** = ``0`` :ref:`🔗<class_MarginContainer_theme_constant_margin_bottom>` -All direct children of **MarginContainer** will have a bottom margin of ``margin_bottom`` pixels. +Offsets towards the inside direct children of the container by this amount of pixels from the bottom. .. rst-class:: classref-item-separator @@ -96,9 +99,9 @@ All direct children of **MarginContainer** will have a bottom margin of ``margin .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **margin_left** = ``0`` +:ref:`int<class_int>` **margin_left** = ``0`` :ref:`🔗<class_MarginContainer_theme_constant_margin_left>` -All direct children of **MarginContainer** will have a left margin of ``margin_left`` pixels. +Offsets towards the inside direct children of the container by this amount of pixels from the left. .. rst-class:: classref-item-separator @@ -108,9 +111,9 @@ All direct children of **MarginContainer** will have a left margin of ``margin_l .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **margin_right** = ``0`` +:ref:`int<class_int>` **margin_right** = ``0`` :ref:`🔗<class_MarginContainer_theme_constant_margin_right>` -All direct children of **MarginContainer** will have a right margin of ``margin_right`` pixels. +Offsets towards the inside direct children of the container by this amount of pixels from the right. .. rst-class:: classref-item-separator @@ -120,9 +123,9 @@ All direct children of **MarginContainer** will have a right margin of ``margin_ .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **margin_top** = ``0`` +:ref:`int<class_int>` **margin_top** = ``0`` :ref:`🔗<class_MarginContainer_theme_constant_margin_top>` -All direct children of **MarginContainer** will have a top margin of ``margin_top`` pixels. +Offsets towards the inside direct children of the container by this amount of pixels from the top. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -131,3 +134,4 @@ All direct children of **MarginContainer** will have a top margin of ``margin_to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_marker2d.rst b/classes/class_marker2d.rst index 431cbc5d9fb..2f3bb6d1aab 100644 --- a/classes/class_marker2d.rst +++ b/classes/class_marker2d.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **gizmo_extents** = ``10.0`` +:ref:`float<class_float>` **gizmo_extents** = ``10.0`` :ref:`🔗<class_Marker2D_property_gizmo_extents>` .. rst-class:: classref-property-setget -- void **set_gizmo_extents** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gizmo_extents** **(** **)** +- |void| **set_gizmo_extents**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gizmo_extents**\ (\ ) Size of the gizmo cross that appears in the editor. @@ -62,3 +62,4 @@ Size of the gizmo cross that appears in the editor. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_marker3d.rst b/classes/class_marker3d.rst index cafdacc282d..da67a12828d 100644 --- a/classes/class_marker3d.rst +++ b/classes/class_marker3d.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **gizmo_extents** = ``0.25`` +:ref:`float<class_float>` **gizmo_extents** = ``0.25`` :ref:`🔗<class_Marker3D_property_gizmo_extents>` .. rst-class:: classref-property-setget -- void **set_gizmo_extents** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gizmo_extents** **(** **)** +- |void| **set_gizmo_extents**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gizmo_extents**\ (\ ) Size of the gizmo cross that appears in the editor. @@ -62,3 +62,4 @@ Size of the gizmo cross that appears in the editor. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_marshalls.rst b/classes/class_marshalls.rst index 6ca3b1434f8..98d1a81a7d6 100644 --- a/classes/class_marshalls.rst +++ b/classes/class_marshalls.rst @@ -29,19 +29,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`base64_to_raw<class_Marshalls_method_base64_to_raw>` **(** :ref:`String<class_String>` base64_str **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`base64_to_utf8<class_Marshalls_method_base64_to_utf8>` **(** :ref:`String<class_String>` base64_str **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`base64_to_variant<class_Marshalls_method_base64_to_variant>` **(** :ref:`String<class_String>` base64_str, :ref:`bool<class_bool>` allow_objects=false **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`raw_to_base64<class_Marshalls_method_raw_to_base64>` **(** :ref:`PackedByteArray<class_PackedByteArray>` array **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`utf8_to_base64<class_Marshalls_method_utf8_to_base64>` **(** :ref:`String<class_String>` utf8_str **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`variant_to_base64<class_Marshalls_method_variant_to_base64>` **(** :ref:`Variant<class_Variant>` variant, :ref:`bool<class_bool>` full_objects=false **)** | - +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`base64_to_raw<class_Marshalls_method_base64_to_raw>`\ (\ base64_str\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`base64_to_utf8<class_Marshalls_method_base64_to_utf8>`\ (\ base64_str\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`base64_to_variant<class_Marshalls_method_base64_to_variant>`\ (\ base64_str\: :ref:`String<class_String>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`raw_to_base64<class_Marshalls_method_raw_to_base64>`\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`utf8_to_base64<class_Marshalls_method_utf8_to_base64>`\ (\ utf8_str\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`variant_to_base64<class_Marshalls_method_variant_to_base64>`\ (\ variant\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,7 +56,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **base64_to_raw** **(** :ref:`String<class_String>` base64_str **)** +:ref:`PackedByteArray<class_PackedByteArray>` **base64_to_raw**\ (\ base64_str\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Marshalls_method_base64_to_raw>` Returns a decoded :ref:`PackedByteArray<class_PackedByteArray>` corresponding to the Base64-encoded string ``base64_str``. @@ -68,7 +68,7 @@ Returns a decoded :ref:`PackedByteArray<class_PackedByteArray>` corresponding to .. rst-class:: classref-method -:ref:`String<class_String>` **base64_to_utf8** **(** :ref:`String<class_String>` base64_str **)** +:ref:`String<class_String>` **base64_to_utf8**\ (\ base64_str\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Marshalls_method_base64_to_utf8>` Returns a decoded string corresponding to the Base64-encoded string ``base64_str``. @@ -80,7 +80,7 @@ Returns a decoded string corresponding to the Base64-encoded string ``base64_str .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **base64_to_variant** **(** :ref:`String<class_String>` base64_str, :ref:`bool<class_bool>` allow_objects=false **)** +:ref:`Variant<class_Variant>` **base64_to_variant**\ (\ base64_str\: :ref:`String<class_String>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Marshalls_method_base64_to_variant>` Returns a decoded :ref:`Variant<class_Variant>` corresponding to the Base64-encoded string ``base64_str``. If ``allow_objects`` is ``true``, decoding objects is allowed. @@ -96,7 +96,7 @@ Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.byte .. rst-class:: classref-method -:ref:`String<class_String>` **raw_to_base64** **(** :ref:`PackedByteArray<class_PackedByteArray>` array **)** +:ref:`String<class_String>` **raw_to_base64**\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_Marshalls_method_raw_to_base64>` Returns a Base64-encoded string of a given :ref:`PackedByteArray<class_PackedByteArray>`. @@ -108,7 +108,7 @@ Returns a Base64-encoded string of a given :ref:`PackedByteArray<class_PackedByt .. rst-class:: classref-method -:ref:`String<class_String>` **utf8_to_base64** **(** :ref:`String<class_String>` utf8_str **)** +:ref:`String<class_String>` **utf8_to_base64**\ (\ utf8_str\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Marshalls_method_utf8_to_base64>` Returns a Base64-encoded string of the UTF-8 string ``utf8_str``. @@ -120,7 +120,7 @@ Returns a Base64-encoded string of the UTF-8 string ``utf8_str``. .. rst-class:: classref-method -:ref:`String<class_String>` **variant_to_base64** **(** :ref:`Variant<class_Variant>` variant, :ref:`bool<class_bool>` full_objects=false **)** +:ref:`String<class_String>` **variant_to_base64**\ (\ variant\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Marshalls_method_variant_to_base64>` Returns a Base64-encoded string of the :ref:`Variant<class_Variant>` ``variant``. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). @@ -133,3 +133,4 @@ Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_material.rst b/classes/class_material.rst index 51fdf106f12..659b2dc8ceb 100644 --- a/classes/class_material.rst +++ b/classes/class_material.rst @@ -14,23 +14,25 @@ Material **Inherited By:** :ref:`BaseMaterial3D<class_BaseMaterial3D>`, :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`, :ref:`FogMaterial<class_FogMaterial>`, :ref:`PanoramaSkyMaterial<class_PanoramaSkyMaterial>`, :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>`, :ref:`PhysicalSkyMaterial<class_PhysicalSkyMaterial>`, :ref:`PlaceholderMaterial<class_PlaceholderMaterial>`, :ref:`ProceduralSkyMaterial<class_ProceduralSkyMaterial>`, :ref:`ShaderMaterial<class_ShaderMaterial>` -Abstract base :ref:`Resource<class_Resource>` for coloring and shading geometry. +Virtual base class for applying visual properties to an object, such as color and roughness. .. rst-class:: classref-introduction-group Description ----------- -Material is a base :ref:`Resource<class_Resource>` used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance3D<class_VisualInstance3D>` derived nodes carry a Material. A few flags and parameters are shared between all material types and are configured here. +**Material** is a base resource used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance3D<class_VisualInstance3D>` derived nodes carry a **Material**. A few flags and parameters are shared between all material types and are configured here. + +Importantly, you can inherit from **Material** to create your own custom material type in script or in GDExtension. .. rst-class:: classref-introduction-group Tutorials --------- -- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__ +- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -54,19 +56,19 @@ Methods .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_do_next_pass<class_Material_method__can_do_next_pass>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_use_render_priority<class_Material_method__can_use_render_priority>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`Mode<enum_Shader_Mode>` | :ref:`_get_shader_mode<class_Material_method__get_shader_mode>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_get_shader_rid<class_Material_method__get_shader_rid>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Material_method_create_placeholder>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | void | :ref:`inspect_native_shader_code<class_Material_method_inspect_native_shader_code>` **(** **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_do_next_pass<class_Material_private_method__can_do_next_pass>`\ (\ ) |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_use_render_priority<class_Material_private_method__can_use_render_priority>`\ (\ ) |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode<enum_Shader_Mode>` | :ref:`_get_shader_mode<class_Material_private_method__get_shader_mode>`\ (\ ) |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_shader_rid<class_Material_private_method__get_shader_rid>`\ (\ ) |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Material_method_create_placeholder>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`inspect_native_shader_code<class_Material_method_inspect_native_shader_code>`\ (\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,7 +83,7 @@ Constants .. rst-class:: classref-constant -**RENDER_PRIORITY_MAX** = ``127`` +**RENDER_PRIORITY_MAX** = ``127`` :ref:`🔗<class_Material_constant_RENDER_PRIORITY_MAX>` Maximum value for the :ref:`render_priority<class_Material_property_render_priority>` parameter. @@ -89,7 +91,7 @@ Maximum value for the :ref:`render_priority<class_Material_property_render_prior .. rst-class:: classref-constant -**RENDER_PRIORITY_MIN** = ``-128`` +**RENDER_PRIORITY_MIN** = ``-128`` :ref:`🔗<class_Material_constant_RENDER_PRIORITY_MIN>` Minimum value for the :ref:`render_priority<class_Material_property_render_priority>` parameter. @@ -106,15 +108,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Material<class_Material>` **next_pass** +:ref:`Material<class_Material>` **next_pass** :ref:`🔗<class_Material_property_next_pass>` .. rst-class:: classref-property-setget -- void **set_next_pass** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_next_pass** **(** **)** +- |void| **set_next_pass**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_next_pass**\ (\ ) Sets the **Material** to be used for the next pass. This renders the object again using a different material. +\ **Note:** :ref:`next_pass<class_Material_property_next_pass>` materials are not necessarily drawn immediately after the source **Material**. Draw order is determined by material properties, :ref:`render_priority<class_Material_property_render_priority>`, and distance to camera. + \ **Note:** This only applies to :ref:`StandardMaterial3D<class_StandardMaterial3D>`\ s and :ref:`ShaderMaterial<class_ShaderMaterial>`\ s with type "Spatial". .. rst-class:: classref-item-separator @@ -125,18 +129,18 @@ Sets the **Material** to be used for the next pass. This renders the object agai .. rst-class:: classref-property -:ref:`int<class_int>` **render_priority** +:ref:`int<class_int>` **render_priority** :ref:`🔗<class_Material_property_render_priority>` .. rst-class:: classref-property-setget -- void **set_render_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_render_priority** **(** **)** +- |void| **set_render_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_render_priority**\ (\ ) -Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. +Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with :ref:`render_priority<class_Material_property_render_priority>` ``1`` will render before all objects with :ref:`render_priority<class_Material_property_render_priority>` ``0``. \ **Note:** This only applies to :ref:`StandardMaterial3D<class_StandardMaterial3D>`\ s and :ref:`ShaderMaterial<class_ShaderMaterial>`\ s with type "Spatial". -\ **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). +\ **Note:** This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes. .. rst-class:: classref-section-separator @@ -147,57 +151,49 @@ Sets the render priority for transparent objects in 3D scenes. Higher priority o Method Descriptions ------------------- -.. _class_Material_method__can_do_next_pass: +.. _class_Material_private_method__can_do_next_pass: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_do_next_pass** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_do_next_pass**\ (\ ) |virtual| |const| :ref:`🔗<class_Material_private_method__can_do_next_pass>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if :ref:`next_pass<class_Material_property_next_pass>` should be shown in the editor or not. .. rst-class:: classref-item-separator ---- -.. _class_Material_method__can_use_render_priority: +.. _class_Material_private_method__can_use_render_priority: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_use_render_priority** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`bool<class_bool>` **_can_use_render_priority**\ (\ ) |virtual| |const| :ref:`🔗<class_Material_private_method__can_use_render_priority>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if :ref:`render_priority<class_Material_property_render_priority>` should be shown in the editor or not. .. rst-class:: classref-item-separator ---- -.. _class_Material_method__get_shader_mode: +.. _class_Material_private_method__get_shader_mode: .. rst-class:: classref-method -:ref:`Mode<enum_Shader_Mode>` **_get_shader_mode** **(** **)** |virtual| |const| +:ref:`Mode<enum_Shader_Mode>` **_get_shader_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_Material_private_method__get_shader_mode>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. .. rst-class:: classref-item-separator ---- -.. _class_Material_method__get_shader_rid: +.. _class_Material_private_method__get_shader_rid: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_get_shader_rid** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`RID<class_RID>` **_get_shader_rid**\ (\ ) |virtual| |const| :ref:`🔗<class_Material_private_method__get_shader_rid>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the **Material**'s :ref:`Shader<class_Shader>`. .. rst-class:: classref-item-separator @@ -207,7 +203,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const| +:ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Material_method_create_placeholder>` Creates a placeholder version of this resource (:ref:`PlaceholderMaterial<class_PlaceholderMaterial>`). @@ -219,11 +215,9 @@ Creates a placeholder version of this resource (:ref:`PlaceholderMaterial<class_ .. rst-class:: classref-method -void **inspect_native_shader_code** **(** **)** - -.. container:: contribute +|void| **inspect_native_shader_code**\ (\ ) :ref:`🔗<class_Material_method_inspect_native_shader_code>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -232,3 +226,4 @@ void **inspect_native_shader_code** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_menubar.rst b/classes/class_menubar.rst index 70aed810531..24c7825ed93 100644 --- a/classes/class_menubar.rst +++ b/classes/class_menubar.rst @@ -51,31 +51,31 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_menu_count<class_MenuBar_method_get_menu_count>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu_popup<class_MenuBar_method_get_menu_popup>` **(** :ref:`int<class_int>` menu **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_menu_title<class_MenuBar_method_get_menu_title>` **(** :ref:`int<class_int>` menu **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_menu_tooltip<class_MenuBar_method_get_menu_tooltip>` **(** :ref:`int<class_int>` menu **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_menu_disabled<class_MenuBar_method_is_menu_disabled>` **(** :ref:`int<class_int>` menu **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_menu_hidden<class_MenuBar_method_is_menu_hidden>` **(** :ref:`int<class_int>` menu **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_native_menu<class_MenuBar_method_is_native_menu>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_shortcuts<class_MenuBar_method_set_disable_shortcuts>` **(** :ref:`bool<class_bool>` disabled **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_menu_disabled<class_MenuBar_method_set_menu_disabled>` **(** :ref:`int<class_int>` menu, :ref:`bool<class_bool>` disabled **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_menu_hidden<class_MenuBar_method_set_menu_hidden>` **(** :ref:`int<class_int>` menu, :ref:`bool<class_bool>` hidden **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_menu_title<class_MenuBar_method_set_menu_title>` **(** :ref:`int<class_int>` menu, :ref:`String<class_String>` title **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_menu_tooltip<class_MenuBar_method_set_menu_tooltip>` **(** :ref:`int<class_int>` menu, :ref:`String<class_String>` tooltip **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_menu_count<class_MenuBar_method_get_menu_count>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu_popup<class_MenuBar_method_get_menu_popup>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_menu_title<class_MenuBar_method_get_menu_title>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_menu_tooltip<class_MenuBar_method_get_menu_tooltip>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_menu_disabled<class_MenuBar_method_is_menu_disabled>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_menu_hidden<class_MenuBar_method_is_menu_hidden>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_native_menu<class_MenuBar_method_is_native_menu>`\ (\ ) |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_shortcuts<class_MenuBar_method_set_disable_shortcuts>`\ (\ disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_menu_disabled<class_MenuBar_method_set_menu_disabled>`\ (\ menu\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_menu_hidden<class_MenuBar_method_set_menu_hidden>`\ (\ menu\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_menu_title<class_MenuBar_method_set_menu_title>`\ (\ menu\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_menu_tooltip<class_MenuBar_method_set_menu_tooltip>`\ (\ menu\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -96,7 +96,7 @@ Theme Properties +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_MenuBar_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_MenuBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_MenuBar_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_MenuBar_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ @@ -110,14 +110,24 @@ Theme Properties +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_MenuBar_theme_style_disabled>` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_MenuBar_theme_style_focus>` | | + | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled_mirrored<class_MenuBar_theme_style_disabled_mirrored>` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_MenuBar_theme_style_hover>` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_mirrored<class_MenuBar_theme_style_hover_mirrored>` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_pressed<class_MenuBar_theme_style_hover_pressed>` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_pressed_mirrored<class_MenuBar_theme_style_hover_pressed_mirrored>` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_MenuBar_theme_style_normal>` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`normal_mirrored<class_MenuBar_theme_style_normal_mirrored>` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_MenuBar_theme_style_pressed>` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed_mirrored<class_MenuBar_theme_style_pressed_mirrored>` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -132,12 +142,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **flat** = ``false`` +:ref:`bool<class_bool>` **flat** = ``false`` :ref:`🔗<class_MenuBar_property_flat>` .. rst-class:: classref-property-setget -- void **set_flat** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flat** **(** **)** +- |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flat**\ (\ ) Flat **MenuBar** don't display item decoration. @@ -149,12 +159,12 @@ Flat **MenuBar** don't display item decoration. .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_MenuBar_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -166,12 +176,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`bool<class_bool>` **prefer_global_menu** = ``true`` +:ref:`bool<class_bool>` **prefer_global_menu** = ``true`` :ref:`🔗<class_MenuBar_property_prefer_global_menu>` .. rst-class:: classref-property-setget -- void **set_prefer_global_menu** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_prefer_global_menu** **(** **)** +- |void| **set_prefer_global_menu**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_prefer_global_menu**\ (\ ) If ``true``, **MenuBar** will use system global menu when supported. @@ -183,12 +193,12 @@ If ``true``, **MenuBar** will use system global menu when supported. .. rst-class:: classref-property -:ref:`int<class_int>` **start_index** = ``-1`` +:ref:`int<class_int>` **start_index** = ``-1`` :ref:`🔗<class_MenuBar_property_start_index>` .. rst-class:: classref-property-setget -- void **set_start_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_start_index** **(** **)** +- |void| **set_start_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_start_index**\ (\ ) Position in the global menu to insert first **MenuBar** item at. @@ -200,12 +210,12 @@ Position in the global menu to insert first **MenuBar** item at. .. rst-class:: classref-property -:ref:`bool<class_bool>` **switch_on_hover** = ``true`` +:ref:`bool<class_bool>` **switch_on_hover** = ``true`` :ref:`🔗<class_MenuBar_property_switch_on_hover>` .. rst-class:: classref-property-setget -- void **set_switch_on_hover** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_switch_on_hover** **(** **)** +- |void| **set_switch_on_hover**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_switch_on_hover**\ (\ ) If ``true``, when the cursor hovers above menu item, it will close the current :ref:`PopupMenu<class_PopupMenu>` and open the other one. @@ -217,12 +227,12 @@ If ``true``, when the cursor hovers above menu item, it will close the current : .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_MenuBar_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -239,7 +249,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_menu_count** **(** **)** |const| +:ref:`int<class_int>` **get_menu_count**\ (\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_count>` Returns number of menu items. @@ -251,7 +261,7 @@ Returns number of menu items. .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_menu_popup** **(** :ref:`int<class_int>` menu **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_menu_popup**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_popup>` Returns :ref:`PopupMenu<class_PopupMenu>` associated with menu item. @@ -263,7 +273,7 @@ Returns :ref:`PopupMenu<class_PopupMenu>` associated with menu item. .. rst-class:: classref-method -:ref:`String<class_String>` **get_menu_title** **(** :ref:`int<class_int>` menu **)** |const| +:ref:`String<class_String>` **get_menu_title**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_title>` Returns menu item title. @@ -275,7 +285,7 @@ Returns menu item title. .. rst-class:: classref-method -:ref:`String<class_String>` **get_menu_tooltip** **(** :ref:`int<class_int>` menu **)** |const| +:ref:`String<class_String>` **get_menu_tooltip**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_tooltip>` Returns menu item tooltip. @@ -287,7 +297,7 @@ Returns menu item tooltip. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_menu_disabled** **(** :ref:`int<class_int>` menu **)** |const| +:ref:`bool<class_bool>` **is_menu_disabled**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_is_menu_disabled>` Returns ``true``, if menu item is disabled. @@ -299,7 +309,7 @@ Returns ``true``, if menu item is disabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_menu_hidden** **(** :ref:`int<class_int>` menu **)** |const| +:ref:`bool<class_bool>` **is_menu_hidden**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_is_menu_hidden>` Returns ``true``, if menu item is hidden. @@ -311,7 +321,7 @@ Returns ``true``, if menu item is hidden. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_native_menu** **(** **)** |const| +:ref:`bool<class_bool>` **is_native_menu**\ (\ ) |const| :ref:`🔗<class_MenuBar_method_is_native_menu>` Returns ``true``, if system global menu is supported and used by this **MenuBar**. @@ -323,7 +333,7 @@ Returns ``true``, if system global menu is supported and used by this **MenuBar* .. rst-class:: classref-method -void **set_disable_shortcuts** **(** :ref:`bool<class_bool>` disabled **)** +|void| **set_disable_shortcuts**\ (\ disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_disable_shortcuts>` If ``true``, shortcuts are disabled and cannot be used to trigger the button. @@ -335,7 +345,7 @@ If ``true``, shortcuts are disabled and cannot be used to trigger the button. .. rst-class:: classref-method -void **set_menu_disabled** **(** :ref:`int<class_int>` menu, :ref:`bool<class_bool>` disabled **)** +|void| **set_menu_disabled**\ (\ menu\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_disabled>` If ``true``, menu item is disabled. @@ -347,7 +357,7 @@ If ``true``, menu item is disabled. .. rst-class:: classref-method -void **set_menu_hidden** **(** :ref:`int<class_int>` menu, :ref:`bool<class_bool>` hidden **)** +|void| **set_menu_hidden**\ (\ menu\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_hidden>` If ``true``, menu item is hidden. @@ -359,7 +369,7 @@ If ``true``, menu item is hidden. .. rst-class:: classref-method -void **set_menu_title** **(** :ref:`int<class_int>` menu, :ref:`String<class_String>` title **)** +|void| **set_menu_title**\ (\ menu\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_title>` Sets menu item title. @@ -371,7 +381,7 @@ Sets menu item title. .. rst-class:: classref-method -void **set_menu_tooltip** **(** :ref:`int<class_int>` menu, :ref:`String<class_String>` tooltip **)** +|void| **set_menu_tooltip**\ (\ menu\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_tooltip>` Sets menu item tooltip. @@ -388,7 +398,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_color>` Default text :ref:`Color<class_Color>` of the menu item. @@ -400,7 +410,7 @@ Default text :ref:`Color<class_Color>` of the menu item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_MenuBar_theme_color_font_disabled_color>` Text :ref:`Color<class_Color>` used when the menu item is disabled. @@ -412,7 +422,7 @@ Text :ref:`Color<class_Color>` used when the menu item is disabled. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_focus_color>` Text :ref:`Color<class_Color>` used when the menu item is focused. Only replaces the normal text color of the menu item. Disabled, hovered, and pressed states take precedence over this color. @@ -424,7 +434,7 @@ Text :ref:`Color<class_Color>` used when the menu item is focused. Only replaces .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_hover_color>` Text :ref:`Color<class_Color>` used when the menu item is being hovered. @@ -436,7 +446,7 @@ Text :ref:`Color<class_Color>` used when the menu item is being hovered. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_hover_pressed_color>` Text :ref:`Color<class_Color>` used when the menu item is being hovered and pressed. @@ -448,7 +458,7 @@ Text :ref:`Color<class_Color>` used when the menu item is being hovered and pres .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_outline_color>` The tint of text outline of the menu item. @@ -460,7 +470,7 @@ The tint of text outline of the menu item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_pressed_color>` Text :ref:`Color<class_Color>` used when the menu item is being pressed. @@ -472,7 +482,7 @@ Text :ref:`Color<class_Color>` used when the menu item is being pressed. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_MenuBar_theme_constant_h_separation>` The horizontal space between menu items. @@ -484,7 +494,7 @@ The horizontal space between menu items. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_MenuBar_theme_constant_outline_size>` The size of the text outline. @@ -498,7 +508,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_MenuBar_theme_font_font>` :ref:`Font<class_Font>` of the menu item's text. @@ -510,7 +520,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_MenuBar_theme_font_size_font_size>` Font size of the menu item's text. @@ -522,7 +532,7 @@ Font size of the menu item's text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **disabled** +:ref:`StyleBox<class_StyleBox>` **disabled** :ref:`🔗<class_MenuBar_theme_style_disabled>` :ref:`StyleBox<class_StyleBox>` used when the menu item is disabled. @@ -530,13 +540,13 @@ Font size of the menu item's text. ---- -.. _class_MenuBar_theme_style_focus: +.. _class_MenuBar_theme_style_disabled_mirrored: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **disabled_mirrored** :ref:`🔗<class_MenuBar_theme_style_disabled_mirrored>` -:ref:`StyleBox<class_StyleBox>` used when the menu item is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +:ref:`StyleBox<class_StyleBox>` used when the menu item is disabled (for right-to-left layouts). .. rst-class:: classref-item-separator @@ -546,7 +556,7 @@ Font size of the menu item's text. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **hover** +:ref:`StyleBox<class_StyleBox>` **hover** :ref:`🔗<class_MenuBar_theme_style_hover>` :ref:`StyleBox<class_StyleBox>` used when the menu item is being hovered. @@ -554,11 +564,47 @@ Font size of the menu item's text. ---- +.. _class_MenuBar_theme_style_hover_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **hover_mirrored** :ref:`🔗<class_MenuBar_theme_style_hover_mirrored>` + +:ref:`StyleBox<class_StyleBox>` used when the menu item is being hovered (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_hover_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **hover_pressed** :ref:`🔗<class_MenuBar_theme_style_hover_pressed>` + +:ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed and hovered at the same time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_hover_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **hover_pressed_mirrored** :ref:`🔗<class_MenuBar_theme_style_hover_pressed_mirrored>` + +:ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed and hovered at the same time (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + .. _class_MenuBar_theme_style_normal: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **normal** +:ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_MenuBar_theme_style_normal>` Default :ref:`StyleBox<class_StyleBox>` for the menu item. @@ -566,14 +612,38 @@ Default :ref:`StyleBox<class_StyleBox>` for the menu item. ---- +.. _class_MenuBar_theme_style_normal_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **normal_mirrored** :ref:`🔗<class_MenuBar_theme_style_normal_mirrored>` + +Default :ref:`StyleBox<class_StyleBox>` for the menu item (for right-to-left layouts). + +.. rst-class:: classref-item-separator + +---- + .. _class_MenuBar_theme_style_pressed: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **pressed** +:ref:`StyleBox<class_StyleBox>` **pressed** :ref:`🔗<class_MenuBar_theme_style_pressed>` :ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed. +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **pressed_mirrored** :ref:`🔗<class_MenuBar_theme_style_pressed_mirrored>` + +:ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed (for right-to-left layouts). + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -581,3 +651,4 @@ Default :ref:`StyleBox<class_StyleBox>` for the menu item. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_menubutton.rst b/classes/class_menubutton.rst index 6790e986e6c..c46ad6361d4 100644 --- a/classes/class_menubutton.rst +++ b/classes/class_menubutton.rst @@ -53,53 +53,13 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_popup<class_MenuButton_method_get_popup>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_shortcuts<class_MenuButton_method_set_disable_shortcuts>` **(** :ref:`bool<class_bool>` disabled **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show_popup<class_MenuButton_method_show_popup>` **(** **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ - -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_color<class_MenuButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_MenuButton_theme_color_font_disabled_color>` | ``Color(1, 1, 1, 0.3)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_MenuButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_MenuButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_MenuButton_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_MenuButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`h_separation<class_MenuButton_theme_constant_h_separation>` | ``3`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`outline_size<class_MenuButton_theme_constant_outline_size>` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font<class_Font>` | :ref:`font<class_MenuButton_theme_font_font>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`font_size<class_MenuButton_theme_font_size_font_size>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_MenuButton_theme_style_disabled>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_MenuButton_theme_style_focus>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_MenuButton_theme_style_hover>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_MenuButton_theme_style_normal>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_MenuButton_theme_style_pressed>` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ + +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_popup<class_MenuButton_method_get_popup>`\ (\ ) |const| | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_shortcuts<class_MenuButton_method_set_disable_shortcuts>`\ (\ disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show_popup<class_MenuButton_method_show_popup>`\ (\ ) | + +-----------------------------------+-----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -114,7 +74,7 @@ Signals .. rst-class:: classref-signal -**about_to_popup** **(** **)** +**about_to_popup**\ (\ ) :ref:`🔗<class_MenuButton_signal_about_to_popup>` Emitted when the :ref:`PopupMenu<class_PopupMenu>` of this MenuButton is about to show. @@ -131,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **item_count** = ``0`` +:ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_MenuButton_property_item_count>` .. rst-class:: classref-property-setget -- void **set_item_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_count** **(** **)** +- |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_count**\ (\ ) The number of items currently in the list. @@ -148,14 +108,14 @@ The number of items currently in the list. .. rst-class:: classref-property -:ref:`bool<class_bool>` **switch_on_hover** = ``false`` +:ref:`bool<class_bool>` **switch_on_hover** = ``false`` :ref:`🔗<class_MenuButton_property_switch_on_hover>` .. rst-class:: classref-property-setget -- void **set_switch_on_hover** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_switch_on_hover** **(** **)** +- |void| **set_switch_on_hover**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_switch_on_hover**\ (\ ) -If ``true``, when the cursor hovers above another **MenuButton** within the same parent which also has ``switch_on_hover`` enabled, it will close the current **MenuButton** and open the other one. +If ``true``, when the cursor hovers above another **MenuButton** within the same parent which also has :ref:`switch_on_hover<class_MenuButton_property_switch_on_hover>` enabled, it will close the current **MenuButton** and open the other one. .. rst-class:: classref-section-separator @@ -170,7 +130,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_popup** **(** **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_popup**\ (\ ) |const| :ref:`🔗<class_MenuButton_method_get_popup>` Returns the :ref:`PopupMenu<class_PopupMenu>` contained in this button. @@ -184,7 +144,7 @@ Returns the :ref:`PopupMenu<class_PopupMenu>` contained in this button. .. rst-class:: classref-method -void **set_disable_shortcuts** **(** :ref:`bool<class_bool>` disabled **)** +|void| **set_disable_shortcuts**\ (\ disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuButton_method_set_disable_shortcuts>` If ``true``, shortcuts are disabled and cannot be used to trigger the button. @@ -196,197 +156,10 @@ If ``true``, shortcuts are disabled and cannot be used to trigger the button. .. rst-class:: classref-method -void **show_popup** **(** **)** +|void| **show_popup**\ (\ ) :ref:`🔗<class_MenuButton_method_show_popup>` Adjusts popup position and sizing for the **MenuButton**, then shows the :ref:`PopupMenu<class_PopupMenu>`. Prefer this over using ``get_popup().popup()``. -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_MenuButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -Default text :ref:`Color<class_Color>` of the **MenuButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(1, 1, 1, 0.3)`` - -Text :ref:`Color<class_Color>` used when the **MenuButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -Text :ref:`Color<class_Color>` used when the **MenuButton** is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -Text :ref:`Color<class_Color>` used when the **MenuButton** is being hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **MenuButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -Text :ref:`Color<class_Color>` used when the **MenuButton** is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **h_separation** = ``3`` - -The horizontal space between **MenuButton**'s icon and text. Negative values will be treated as ``0`` when used. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_MenuButton_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font<class_Font>` **font** - -:ref:`Font<class_Font>` of the **MenuButton**'s text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **font_size** - -Font size of the **MenuButton**'s text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **disabled** - -:ref:`StyleBox<class_StyleBox>` used when the **MenuButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **focus** - -:ref:`StyleBox<class_StyleBox>` used when the **MenuButton** is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **hover** - -:ref:`StyleBox<class_StyleBox>` used when the **MenuButton** is being hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **normal** - -Default :ref:`StyleBox<class_StyleBox>` for the **MenuButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **pressed** - -:ref:`StyleBox<class_StyleBox>` used when the **MenuButton** is being pressed. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -394,3 +167,4 @@ Default :ref:`StyleBox<class_StyleBox>` for the **MenuButton**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_mesh.rst b/classes/class_mesh.rst index 58252817b5e..ced3064f9a2 100644 --- a/classes/class_mesh.rst +++ b/classes/class_mesh.rst @@ -21,20 +21,20 @@ A :ref:`Resource<class_Resource>` that contains vertex array-based geometry. Description ----------- -Mesh is a type of :ref:`Resource<class_Resource>` that contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. +Mesh is a type of :ref:`Resource<class_Resource>` that contains vertex array-based geometry, divided in *surfaces*. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. The maximum number of surfaces per mesh is :ref:`RenderingServer.MAX_MESH_SURFACES<class_RenderingServer_constant_MAX_MESH_SURFACES>`. .. rst-class:: classref-introduction-group Tutorials --------- -- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__ +- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__ -- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__ +- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2739>`__ -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -56,59 +56,59 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`_get_aabb<class_Mesh_method__get_aabb>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_blend_shape_count<class_Mesh_method__get_blend_shape_count>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`_get_blend_shape_name<class_Mesh_method__get_blend_shape_name>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_surface_count<class_Mesh_method__get_surface_count>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_blend_shape_name<class_Mesh_method__set_blend_shape_name>` **(** :ref:`int<class_int>` index, :ref:`StringName<class_StringName>` name **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_surface_get_array_index_len<class_Mesh_method__surface_get_array_index_len>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_surface_get_array_len<class_Mesh_method__surface_get_array_len>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`_surface_get_arrays<class_Mesh_method__surface_get_arrays>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array[]<class_Array>` | :ref:`_surface_get_blend_shape_arrays<class_Mesh_method__surface_get_blend_shape_arrays>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_surface_get_format<class_Mesh_method__surface_get_format>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_surface_get_lods<class_Mesh_method__surface_get_lods>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`_surface_get_material<class_Mesh_method__surface_get_material>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_surface_get_primitive_type<class_Mesh_method__surface_get_primitive_type>` **(** :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_surface_set_material<class_Mesh_method__surface_set_material>` **(** :ref:`int<class_int>` index, :ref:`Material<class_Material>` material **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` | :ref:`create_convex_shape<class_Mesh_method_create_convex_shape>` **(** :ref:`bool<class_bool>` clean=true, :ref:`bool<class_bool>` simplify=false **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mesh<class_Mesh>` | :ref:`create_outline<class_Mesh_method_create_outline>` **(** :ref:`float<class_float>` margin **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Mesh_method_create_placeholder>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` | :ref:`create_trimesh_shape<class_Mesh_method_create_trimesh_shape>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Mesh_method_generate_triangle_mesh>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_Mesh_method_get_aabb>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_faces<class_Mesh_method_get_faces>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_surface_count<class_Mesh_method_get_surface_count>` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`surface_get_arrays<class_Mesh_method_surface_get_arrays>` **(** :ref:`int<class_int>` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array[]<class_Array>` | :ref:`surface_get_blend_shape_arrays<class_Mesh_method_surface_get_blend_shape_arrays>` **(** :ref:`int<class_int>` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`surface_get_material<class_Mesh_method_surface_get_material>` **(** :ref:`int<class_int>` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_material<class_Mesh_method_surface_set_material>` **(** :ref:`int<class_int>` surf_idx, :ref:`Material<class_Material>` material **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`_get_aabb<class_Mesh_private_method__get_aabb>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_blend_shape_count<class_Mesh_private_method__get_blend_shape_count>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`_get_blend_shape_name<class_Mesh_private_method__get_blend_shape_name>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_surface_count<class_Mesh_private_method__get_surface_count>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_blend_shape_name<class_Mesh_private_method__set_blend_shape_name>`\ (\ index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_surface_get_array_index_len<class_Mesh_private_method__surface_get_array_index_len>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_surface_get_array_len<class_Mesh_private_method__surface_get_array_len>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`_surface_get_arrays<class_Mesh_private_method__surface_get_arrays>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] | :ref:`_surface_get_blend_shape_arrays<class_Mesh_private_method__surface_get_blend_shape_arrays>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_surface_get_format<class_Mesh_private_method__surface_get_format>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_surface_get_lods<class_Mesh_private_method__surface_get_lods>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`_surface_get_material<class_Mesh_private_method__surface_get_material>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_surface_get_primitive_type<class_Mesh_private_method__surface_get_primitive_type>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_surface_set_material<class_Mesh_private_method__surface_set_material>`\ (\ index\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) |virtual| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` | :ref:`create_convex_shape<class_Mesh_method_create_convex_shape>`\ (\ clean\: :ref:`bool<class_bool>` = true, simplify\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh<class_Mesh>` | :ref:`create_outline<class_Mesh_method_create_outline>`\ (\ margin\: :ref:`float<class_float>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Mesh_method_create_placeholder>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` | :ref:`create_trimesh_shape<class_Mesh_method_create_trimesh_shape>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_Mesh_method_generate_triangle_mesh>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_Mesh_method_get_aabb>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_faces<class_Mesh_method_get_faces>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_surface_count<class_Mesh_method_get_surface_count>`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`surface_get_arrays<class_Mesh_method_surface_get_arrays>`\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] | :ref:`surface_get_blend_shape_arrays<class_Mesh_method_surface_get_blend_shape_arrays>`\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`surface_get_material<class_Mesh_method_surface_get_material>`\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`surface_set_material<class_Mesh_method_surface_set_material>`\ (\ surf_idx\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -123,7 +123,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PrimitiveType**: +enum **PrimitiveType**: :ref:`🔗<enum_Mesh_PrimitiveType>` .. _class_Mesh_constant_PRIMITIVE_POINTS: @@ -173,7 +173,7 @@ Render array as triangle strips. .. rst-class:: classref-enumeration -enum **ArrayType**: +enum **ArrayType**: :ref:`🔗<enum_Mesh_ArrayType>` .. _class_Mesh_constant_ARRAY_VERTEX: @@ -229,7 +229,7 @@ enum **ArrayType**: :ref:`ArrayType<enum_Mesh_ArrayType>` **ARRAY_CUSTOM0** = ``6`` -Contains custom color channel 0. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>` or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. +Contains custom color channel 0. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_SNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>`, or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM1: @@ -237,7 +237,7 @@ Contains custom color channel 0. :ref:`PackedByteArray<class_PackedByteArray>` i :ref:`ArrayType<enum_Mesh_ArrayType>` **ARRAY_CUSTOM1** = ``7`` -Contains custom color channel 1. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>` or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. +Contains custom color channel 1. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_SNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>`, or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM2: @@ -245,7 +245,7 @@ Contains custom color channel 1. :ref:`PackedByteArray<class_PackedByteArray>` i :ref:`ArrayType<enum_Mesh_ArrayType>` **ARRAY_CUSTOM2** = ``8`` -Contains custom color channel 2. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>` or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. +Contains custom color channel 2. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_SNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>`, or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. .. _class_Mesh_constant_ARRAY_CUSTOM3: @@ -253,7 +253,7 @@ Contains custom color channel 2. :ref:`PackedByteArray<class_PackedByteArray>` i :ref:`ArrayType<enum_Mesh_ArrayType>` **ARRAY_CUSTOM3** = ``9`` -Contains custom color channel 3. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>` or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. +Contains custom color channel 3. :ref:`PackedByteArray<class_PackedByteArray>` if ``(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK`` is :ref:`ARRAY_CUSTOM_RGBA8_UNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM>`, :ref:`ARRAY_CUSTOM_RGBA8_SNORM<class_Mesh_constant_ARRAY_CUSTOM_RGBA8_SNORM>`, :ref:`ARRAY_CUSTOM_RG_HALF<class_Mesh_constant_ARRAY_CUSTOM_RG_HALF>`, or :ref:`ARRAY_CUSTOM_RGBA_HALF<class_Mesh_constant_ARRAY_CUSTOM_RGBA_HALF>`. :ref:`PackedFloat32Array<class_PackedFloat32Array>` otherwise. .. _class_Mesh_constant_ARRAY_BONES: @@ -277,7 +277,7 @@ Contains custom color channel 3. :ref:`PackedByteArray<class_PackedByteArray>` i :ref:`ArrayType<enum_Mesh_ArrayType>` **ARRAY_INDEX** = ``12`` -:ref:`PackedInt32Array<class_PackedInt32Array>` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the \*i\*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. +:ref:`PackedInt32Array<class_PackedInt32Array>` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. @@ -297,7 +297,7 @@ Represents the size of the :ref:`ArrayType<enum_Mesh_ArrayType>` enum. .. rst-class:: classref-enumeration -enum **ArrayCustomFormat**: +enum **ArrayCustomFormat**: :ref:`🔗<enum_Mesh_ArrayCustomFormat>` .. _class_Mesh_constant_ARRAY_CUSTOM_RGBA8_UNORM: @@ -379,7 +379,7 @@ Represents the size of the :ref:`ArrayCustomFormat<enum_Mesh_ArrayCustomFormat>` .. rst-class:: classref-enumeration -flags **ArrayFormat**: +flags **ArrayFormat**: :ref:`🔗<enum_Mesh_ArrayFormat>` .. _class_Mesh_constant_ARRAY_FORMAT_VERTEX: @@ -589,6 +589,14 @@ Flag used to mark that the mesh contains up to 8 bone influences per vertex. Thi Flag used to mark that the mesh intentionally contains no vertex array. +.. _class_Mesh_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_Mesh_ArrayFormat>` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912`` + +Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. + .. rst-class:: classref-item-separator ---- @@ -597,7 +605,7 @@ Flag used to mark that the mesh intentionally contains no vertex array. .. rst-class:: classref-enumeration -enum **BlendShapeMode**: +enum **BlendShapeMode**: :ref:`🔗<enum_Mesh_BlendShapeMode>` .. _class_Mesh_constant_BLEND_SHAPE_MODE_NORMALIZED: @@ -628,12 +636,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **lightmap_size_hint** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **lightmap_size_hint** = ``Vector2i(0, 0)`` :ref:`🔗<class_Mesh_property_lightmap_size_hint>` .. rst-class:: classref-property-setget -- void **set_lightmap_size_hint** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_lightmap_size_hint** **(** **)** +- |void| **set_lightmap_size_hint**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_lightmap_size_hint**\ (\ ) Sets a hint to be used for lightmap resolution. @@ -646,11 +654,11 @@ Sets a hint to be used for lightmap resolution. Method Descriptions ------------------- -.. _class_Mesh_method__get_aabb: +.. _class_Mesh_private_method__get_aabb: .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **_get_aabb** **(** **)** |virtual| |const| +:ref:`AABB<class_AABB>` **_get_aabb**\ (\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__get_aabb>` Virtual method to override the :ref:`AABB<class_AABB>` for a custom class extending **Mesh**. @@ -658,11 +666,11 @@ Virtual method to override the :ref:`AABB<class_AABB>` for a custom class extend ---- -.. _class_Mesh_method__get_blend_shape_count: +.. _class_Mesh_private_method__get_blend_shape_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_blend_shape_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_blend_shape_count**\ (\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__get_blend_shape_count>` Virtual method to override the number of blend shapes for a custom class extending **Mesh**. @@ -670,11 +678,11 @@ Virtual method to override the number of blend shapes for a custom class extendi ---- -.. _class_Mesh_method__get_blend_shape_name: +.. _class_Mesh_private_method__get_blend_shape_name: .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **_get_blend_shape_name** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`StringName<class_StringName>` **_get_blend_shape_name**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__get_blend_shape_name>` Virtual method to override the retrieval of blend shape names for a custom class extending **Mesh**. @@ -682,11 +690,11 @@ Virtual method to override the retrieval of blend shape names for a custom class ---- -.. _class_Mesh_method__get_surface_count: +.. _class_Mesh_private_method__get_surface_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_surface_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_surface_count**\ (\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__get_surface_count>` Virtual method to override the surface count for a custom class extending **Mesh**. @@ -694,11 +702,11 @@ Virtual method to override the surface count for a custom class extending **Mesh ---- -.. _class_Mesh_method__set_blend_shape_name: +.. _class_Mesh_private_method__set_blend_shape_name: .. rst-class:: classref-method -void **_set_blend_shape_name** **(** :ref:`int<class_int>` index, :ref:`StringName<class_StringName>` name **)** |virtual| +|void| **_set_blend_shape_name**\ (\ index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ ) |virtual| :ref:`🔗<class_Mesh_private_method__set_blend_shape_name>` Virtual method to override the names of blend shapes for a custom class extending **Mesh**. @@ -706,11 +714,11 @@ Virtual method to override the names of blend shapes for a custom class extendin ---- -.. _class_Mesh_method__surface_get_array_index_len: +.. _class_Mesh_private_method__surface_get_array_index_len: .. rst-class:: classref-method -:ref:`int<class_int>` **_surface_get_array_index_len** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`int<class_int>` **_surface_get_array_index_len**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_array_index_len>` Virtual method to override the surface array index length for a custom class extending **Mesh**. @@ -718,11 +726,11 @@ Virtual method to override the surface array index length for a custom class ext ---- -.. _class_Mesh_method__surface_get_array_len: +.. _class_Mesh_private_method__surface_get_array_len: .. rst-class:: classref-method -:ref:`int<class_int>` **_surface_get_array_len** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`int<class_int>` **_surface_get_array_len**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_array_len>` Virtual method to override the surface array length for a custom class extending **Mesh**. @@ -730,11 +738,11 @@ Virtual method to override the surface array length for a custom class extending ---- -.. _class_Mesh_method__surface_get_arrays: +.. _class_Mesh_private_method__surface_get_arrays: .. rst-class:: classref-method -:ref:`Array<class_Array>` **_surface_get_arrays** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`Array<class_Array>` **_surface_get_arrays**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_arrays>` Virtual method to override the surface arrays for a custom class extending **Mesh**. @@ -742,11 +750,11 @@ Virtual method to override the surface arrays for a custom class extending **Mes ---- -.. _class_Mesh_method__surface_get_blend_shape_arrays: +.. _class_Mesh_private_method__surface_get_blend_shape_arrays: .. rst-class:: classref-method -:ref:`Array[]<class_Array>` **_surface_get_blend_shape_arrays** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] **_surface_get_blend_shape_arrays**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_blend_shape_arrays>` Virtual method to override the blend shape arrays for a custom class extending **Mesh**. @@ -754,11 +762,11 @@ Virtual method to override the blend shape arrays for a custom class extending * ---- -.. _class_Mesh_method__surface_get_format: +.. _class_Mesh_private_method__surface_get_format: .. rst-class:: classref-method -:ref:`int<class_int>` **_surface_get_format** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`int<class_int>` **_surface_get_format**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_format>` Virtual method to override the surface format for a custom class extending **Mesh**. @@ -766,11 +774,11 @@ Virtual method to override the surface format for a custom class extending **Mes ---- -.. _class_Mesh_method__surface_get_lods: +.. _class_Mesh_private_method__surface_get_lods: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_surface_get_lods** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_surface_get_lods**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_lods>` Virtual method to override the surface LODs for a custom class extending **Mesh**. @@ -778,11 +786,11 @@ Virtual method to override the surface LODs for a custom class extending **Mesh* ---- -.. _class_Mesh_method__surface_get_material: +.. _class_Mesh_private_method__surface_get_material: .. rst-class:: classref-method -:ref:`Material<class_Material>` **_surface_get_material** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`Material<class_Material>` **_surface_get_material**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_material>` Virtual method to override the surface material for a custom class extending **Mesh**. @@ -790,11 +798,11 @@ Virtual method to override the surface material for a custom class extending **M ---- -.. _class_Mesh_method__surface_get_primitive_type: +.. _class_Mesh_private_method__surface_get_primitive_type: .. rst-class:: classref-method -:ref:`int<class_int>` **_surface_get_primitive_type** **(** :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`int<class_int>` **_surface_get_primitive_type**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Mesh_private_method__surface_get_primitive_type>` Virtual method to override the surface primitive type for a custom class extending **Mesh**. @@ -802,11 +810,11 @@ Virtual method to override the surface primitive type for a custom class extendi ---- -.. _class_Mesh_method__surface_set_material: +.. _class_Mesh_private_method__surface_set_material: .. rst-class:: classref-method -void **_surface_set_material** **(** :ref:`int<class_int>` index, :ref:`Material<class_Material>` material **)** |virtual| +|void| **_surface_set_material**\ (\ index\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) |virtual| :ref:`🔗<class_Mesh_private_method__surface_set_material>` Virtual method to override the setting of a ``material`` at the given ``index`` for a custom class extending **Mesh**. @@ -818,7 +826,7 @@ Virtual method to override the setting of a ``material`` at the given ``index`` .. rst-class:: classref-method -:ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` **create_convex_shape** **(** :ref:`bool<class_bool>` clean=true, :ref:`bool<class_bool>` simplify=false **)** |const| +:ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` **create_convex_shape**\ (\ clean\: :ref:`bool<class_bool>` = true, simplify\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Mesh_method_create_convex_shape>` Calculate a :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` from the mesh. @@ -834,7 +842,7 @@ If ``simplify`` is ``true``, the geometry can be further simplified to reduce th .. rst-class:: classref-method -:ref:`Mesh<class_Mesh>` **create_outline** **(** :ref:`float<class_float>` margin **)** |const| +:ref:`Mesh<class_Mesh>` **create_outline**\ (\ margin\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Mesh_method_create_outline>` Calculate an outline mesh at a defined offset (margin) from the original mesh. @@ -848,7 +856,7 @@ Calculate an outline mesh at a defined offset (margin) from the original mesh. .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const| +:ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Mesh_method_create_placeholder>` Creates a placeholder version of this resource (:ref:`PlaceholderMesh<class_PlaceholderMesh>`). @@ -860,7 +868,7 @@ Creates a placeholder version of this resource (:ref:`PlaceholderMesh<class_Plac .. rst-class:: classref-method -:ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` **create_trimesh_shape** **(** **)** |const| +:ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` **create_trimesh_shape**\ (\ ) |const| :ref:`🔗<class_Mesh_method_create_trimesh_shape>` Calculate a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` from the mesh. @@ -872,7 +880,7 @@ Calculate a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` from the m .. rst-class:: classref-method -:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh** **(** **)** |const| +:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh**\ (\ ) |const| :ref:`🔗<class_Mesh_method_generate_triangle_mesh>` Generate a :ref:`TriangleMesh<class_TriangleMesh>` from the mesh. Considers only surfaces using one of these primitive types: :ref:`PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`, :ref:`PRIMITIVE_TRIANGLE_STRIP<class_Mesh_constant_PRIMITIVE_TRIANGLE_STRIP>`. @@ -884,7 +892,7 @@ Generate a :ref:`TriangleMesh<class_TriangleMesh>` from the mesh. Considers only .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **get_aabb** **(** **)** |const| +:ref:`AABB<class_AABB>` **get_aabb**\ (\ ) |const| :ref:`🔗<class_Mesh_method_get_aabb>` Returns the smallest :ref:`AABB<class_AABB>` enclosing this mesh in local space. Not affected by ``custom_aabb``. @@ -898,7 +906,7 @@ Returns the smallest :ref:`AABB<class_AABB>` enclosing this mesh in local space. .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **get_faces** **(** **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **get_faces**\ (\ ) |const| :ref:`🔗<class_Mesh_method_get_faces>` Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. @@ -910,9 +918,9 @@ Returns all the vertices that make up the faces of the mesh. Each three vertices .. rst-class:: classref-method -:ref:`int<class_int>` **get_surface_count** **(** **)** |const| +:ref:`int<class_int>` **get_surface_count**\ (\ ) |const| :ref:`🔗<class_Mesh_method_get_surface_count>` -Returns the number of surfaces that the **Mesh** holds. +Returns the number of surfaces that the **Mesh** holds. This is equivalent to :ref:`MeshInstance3D.get_surface_override_material_count<class_MeshInstance3D_method_get_surface_override_material_count>`. .. rst-class:: classref-item-separator @@ -922,9 +930,9 @@ Returns the number of surfaces that the **Mesh** holds. .. rst-class:: classref-method -:ref:`Array<class_Array>` **surface_get_arrays** **(** :ref:`int<class_int>` surf_idx **)** |const| +:ref:`Array<class_Array>` **surface_get_arrays**\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Mesh_method_surface_get_arrays>` -Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>`). +Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>`). .. rst-class:: classref-item-separator @@ -934,7 +942,7 @@ Returns the arrays for the vertices, normals, uvs, etc. that make up the request .. rst-class:: classref-method -:ref:`Array[]<class_Array>` **surface_get_blend_shape_arrays** **(** :ref:`int<class_int>` surf_idx **)** |const| +:ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] **surface_get_blend_shape_arrays**\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Mesh_method_surface_get_blend_shape_arrays>` Returns the blend shape arrays for the requested surface. @@ -946,10 +954,12 @@ Returns the blend shape arrays for the requested surface. .. rst-class:: classref-method -:ref:`Material<class_Material>` **surface_get_material** **(** :ref:`int<class_int>` surf_idx **)** |const| +:ref:`Material<class_Material>` **surface_get_material**\ (\ surf_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Mesh_method_surface_get_material>` Returns a :ref:`Material<class_Material>` in a given surface. Surface is rendered using this material. +\ **Note:** This returns the material within the **Mesh** resource, not the :ref:`Material<class_Material>` associated to the :ref:`MeshInstance3D<class_MeshInstance3D>`'s Surface Material Override properties. To get the :ref:`Material<class_Material>` associated to the :ref:`MeshInstance3D<class_MeshInstance3D>`'s Surface Material Override properties, use :ref:`MeshInstance3D.get_surface_override_material<class_MeshInstance3D_method_get_surface_override_material>` instead. + .. rst-class:: classref-item-separator ---- @@ -958,10 +968,12 @@ Returns a :ref:`Material<class_Material>` in a given surface. Surface is rendere .. rst-class:: classref-method -void **surface_set_material** **(** :ref:`int<class_int>` surf_idx, :ref:`Material<class_Material>` material **)** +|void| **surface_set_material**\ (\ surf_idx\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) :ref:`🔗<class_Mesh_method_surface_set_material>` Sets a :ref:`Material<class_Material>` for a given surface. Surface will be rendered using this material. +\ **Note:** This assigns the material within the **Mesh** resource, not the :ref:`Material<class_Material>` associated to the :ref:`MeshInstance3D<class_MeshInstance3D>`'s Surface Material Override properties. To set the :ref:`Material<class_Material>` associated to the :ref:`MeshInstance3D<class_MeshInstance3D>`'s Surface Material Override properties, use :ref:`MeshInstance3D.set_surface_override_material<class_MeshInstance3D_method_set_surface_override_material>` instead. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -969,3 +981,4 @@ Sets a :ref:`Material<class_Material>` for a given surface. Surface will be rend .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshconvexdecompositionsettings.rst b/classes/class_meshconvexdecompositionsettings.rst index c1c6ab045e3..bb906617373 100644 --- a/classes/class_meshconvexdecompositionsettings.rst +++ b/classes/class_meshconvexdecompositionsettings.rst @@ -70,7 +70,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗<enum_MeshConvexDecompositionSettings_Mode>` .. _class_MeshConvexDecompositionSettings_constant_CONVEX_DECOMPOSITION_MODE_VOXEL: @@ -101,14 +101,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **convex_hull_approximation** = ``true`` +:ref:`bool<class_bool>` **convex_hull_approximation** = ``true`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_convex_hull_approximation>` .. rst-class:: classref-property-setget -- void **set_convex_hull_approximation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_convex_hull_approximation** **(** **)** +- |void| **set_convex_hull_approximation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_convex_hull_approximation**\ (\ ) -If enabled uses approximation for computing convex hulls. +If ``true``, uses approximation for computing convex hulls. .. rst-class:: classref-item-separator @@ -118,12 +118,12 @@ If enabled uses approximation for computing convex hulls. .. rst-class:: classref-property -:ref:`int<class_int>` **convex_hull_downsampling** = ``4`` +:ref:`int<class_int>` **convex_hull_downsampling** = ``4`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_convex_hull_downsampling>` .. rst-class:: classref-property-setget -- void **set_convex_hull_downsampling** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_convex_hull_downsampling** **(** **)** +- |void| **set_convex_hull_downsampling**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_convex_hull_downsampling**\ (\ ) Controls the precision of the convex-hull generation process during the clipping plane selection stage. Ranges from ``1`` to ``16``. @@ -135,12 +135,12 @@ Controls the precision of the convex-hull generation process during the clipping .. rst-class:: classref-property -:ref:`float<class_float>` **max_concavity** = ``1.0`` +:ref:`float<class_float>` **max_concavity** = ``1.0`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_max_concavity>` .. rst-class:: classref-property-setget -- void **set_max_concavity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max_concavity** **(** **)** +- |void| **set_max_concavity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max_concavity**\ (\ ) Maximum concavity. Ranges from ``0.0`` to ``1.0``. @@ -152,12 +152,12 @@ Maximum concavity. Ranges from ``0.0`` to ``1.0``. .. rst-class:: classref-property -:ref:`int<class_int>` **max_convex_hulls** = ``1`` +:ref:`int<class_int>` **max_convex_hulls** = ``1`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_max_convex_hulls>` .. rst-class:: classref-property-setget -- void **set_max_convex_hulls** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_convex_hulls** **(** **)** +- |void| **set_max_convex_hulls**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_convex_hulls**\ (\ ) The maximum number of convex hulls to produce from the merge operation. @@ -169,12 +169,12 @@ The maximum number of convex hulls to produce from the merge operation. .. rst-class:: classref-property -:ref:`int<class_int>` **max_num_vertices_per_convex_hull** = ``32`` +:ref:`int<class_int>` **max_num_vertices_per_convex_hull** = ``32`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_max_num_vertices_per_convex_hull>` .. rst-class:: classref-property-setget -- void **set_max_num_vertices_per_convex_hull** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_num_vertices_per_convex_hull** **(** **)** +- |void| **set_max_num_vertices_per_convex_hull**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_num_vertices_per_convex_hull**\ (\ ) Controls the maximum number of triangles per convex-hull. Ranges from ``4`` to ``1024``. @@ -186,12 +186,12 @@ Controls the maximum number of triangles per convex-hull. Ranges from ``4`` to ` .. rst-class:: classref-property -:ref:`float<class_float>` **min_volume_per_convex_hull** = ``0.0001`` +:ref:`float<class_float>` **min_volume_per_convex_hull** = ``0.0001`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_min_volume_per_convex_hull>` .. rst-class:: classref-property-setget -- void **set_min_volume_per_convex_hull** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min_volume_per_convex_hull** **(** **)** +- |void| **set_min_volume_per_convex_hull**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min_volume_per_convex_hull**\ (\ ) Controls the adaptive sampling of the generated convex-hulls. Ranges from ``0.0`` to ``0.01``. @@ -203,12 +203,12 @@ Controls the adaptive sampling of the generated convex-hulls. Ranges from ``0.0` .. rst-class:: classref-property -:ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>` **mode** = ``0`` +:ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>` **mode** = ``0`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_mode>` .. rst-class:: classref-property-setget -- void **set_mode** **(** :ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>` value **)** -- :ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>` **get_mode** **(** **)** +- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>`\ ) +- :ref:`Mode<enum_MeshConvexDecompositionSettings_Mode>` **get_mode**\ (\ ) Mode for the approximate convex decomposition. @@ -220,14 +220,14 @@ Mode for the approximate convex decomposition. .. rst-class:: classref-property -:ref:`bool<class_bool>` **normalize_mesh** = ``false`` +:ref:`bool<class_bool>` **normalize_mesh** = ``false`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_normalize_mesh>` .. rst-class:: classref-property-setget -- void **set_normalize_mesh** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_normalize_mesh** **(** **)** +- |void| **set_normalize_mesh**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_normalize_mesh**\ (\ ) -If enabled normalizes the mesh before applying the convex decomposition. +If ``true``, normalizes the mesh before applying the convex decomposition. .. rst-class:: classref-item-separator @@ -237,12 +237,12 @@ If enabled normalizes the mesh before applying the convex decomposition. .. rst-class:: classref-property -:ref:`int<class_int>` **plane_downsampling** = ``4`` +:ref:`int<class_int>` **plane_downsampling** = ``4`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_plane_downsampling>` .. rst-class:: classref-property-setget -- void **set_plane_downsampling** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_plane_downsampling** **(** **)** +- |void| **set_plane_downsampling**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_plane_downsampling**\ (\ ) Controls the granularity of the search for the "best" clipping plane. Ranges from ``1`` to ``16``. @@ -254,14 +254,14 @@ Controls the granularity of the search for the "best" clipping plane. Ranges fro .. rst-class:: classref-property -:ref:`bool<class_bool>` **project_hull_vertices** = ``true`` +:ref:`bool<class_bool>` **project_hull_vertices** = ``true`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_project_hull_vertices>` .. rst-class:: classref-property-setget -- void **set_project_hull_vertices** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_project_hull_vertices** **(** **)** +- |void| **set_project_hull_vertices**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_project_hull_vertices**\ (\ ) -If enabled projects output convex hull vertices onto original source mesh to increase floating point accuracy of the results. +If ``true``, projects output convex hull vertices onto the original source mesh to increase floating-point accuracy of the results. .. rst-class:: classref-item-separator @@ -271,12 +271,12 @@ If enabled projects output convex hull vertices onto original source mesh to inc .. rst-class:: classref-property -:ref:`int<class_int>` **resolution** = ``10000`` +:ref:`int<class_int>` **resolution** = ``10000`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_resolution>` .. rst-class:: classref-property-setget -- void **set_resolution** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_resolution** **(** **)** +- |void| **set_resolution**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_resolution**\ (\ ) Maximum number of voxels generated during the voxelization stage. @@ -288,12 +288,12 @@ Maximum number of voxels generated during the voxelization stage. .. rst-class:: classref-property -:ref:`float<class_float>` **revolution_axes_clipping_bias** = ``0.05`` +:ref:`float<class_float>` **revolution_axes_clipping_bias** = ``0.05`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_revolution_axes_clipping_bias>` .. rst-class:: classref-property-setget -- void **set_revolution_axes_clipping_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_revolution_axes_clipping_bias** **(** **)** +- |void| **set_revolution_axes_clipping_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_revolution_axes_clipping_bias**\ (\ ) Controls the bias toward clipping along revolution axes. Ranges from ``0.0`` to ``1.0``. @@ -305,12 +305,12 @@ Controls the bias toward clipping along revolution axes. Ranges from ``0.0`` to .. rst-class:: classref-property -:ref:`float<class_float>` **symmetry_planes_clipping_bias** = ``0.05`` +:ref:`float<class_float>` **symmetry_planes_clipping_bias** = ``0.05`` :ref:`🔗<class_MeshConvexDecompositionSettings_property_symmetry_planes_clipping_bias>` .. rst-class:: classref-property-setget -- void **set_symmetry_planes_clipping_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_symmetry_planes_clipping_bias** **(** **)** +- |void| **set_symmetry_planes_clipping_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_symmetry_planes_clipping_bias**\ (\ ) Controls the bias toward clipping along symmetry planes. Ranges from ``0.0`` to ``1.0``. @@ -321,3 +321,4 @@ Controls the bias toward clipping along symmetry planes. Ranges from ``0.0`` to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshdatatool.rst b/classes/class_meshdatatool.rst index 273a9ea7936..befab3f9868 100644 --- a/classes/class_meshdatatool.rst +++ b/classes/class_meshdatatool.rst @@ -72,6 +72,13 @@ See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateMesh<class_ImmediateM \ **Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`__ for front faces of triangle primitive modes. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using the MeshDataTool <../tutorials/3d/procedural_geometry/meshdatatool>` + .. rst-class:: classref-reftable-group Methods @@ -80,83 +87,83 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_MeshDataTool_method_clear>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`commit_to_surface<class_MeshDataTool_method_commit_to_surface>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_surface<class_MeshDataTool_method_create_from_surface>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`int<class_int>` surface **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_edge_count<class_MeshDataTool_method_get_edge_count>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_edge_faces<class_MeshDataTool_method_get_edge_faces>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_edge_meta<class_MeshDataTool_method_get_edge_meta>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_edge_vertex<class_MeshDataTool_method_get_edge_vertex>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_face_count<class_MeshDataTool_method_get_face_count>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_face_edge<class_MeshDataTool_method_get_face_edge>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` edge **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_face_meta<class_MeshDataTool_method_get_face_meta>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_face_normal<class_MeshDataTool_method_get_face_normal>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_face_vertex<class_MeshDataTool_method_get_face_vertex>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_format<class_MeshDataTool_method_get_format>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`get_material<class_MeshDataTool_method_get_material>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_vertex<class_MeshDataTool_method_get_vertex>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_bones<class_MeshDataTool_method_get_vertex_bones>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_vertex_color<class_MeshDataTool_method_get_vertex_color>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_vertex_count<class_MeshDataTool_method_get_vertex_count>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_edges<class_MeshDataTool_method_get_vertex_edges>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_faces<class_MeshDataTool_method_get_vertex_faces>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_vertex_meta<class_MeshDataTool_method_get_vertex_meta>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_vertex_normal<class_MeshDataTool_method_get_vertex_normal>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`get_vertex_tangent<class_MeshDataTool_method_get_vertex_tangent>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv<class_MeshDataTool_method_get_vertex_uv>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv2<class_MeshDataTool_method_get_vertex_uv2>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertex_weights<class_MeshDataTool_method_get_vertex_weights>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_edge_meta<class_MeshDataTool_method_set_edge_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_face_meta<class_MeshDataTool_method_set_face_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_material<class_MeshDataTool_method_set_material>` **(** :ref:`Material<class_Material>` material **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex<class_MeshDataTool_method_set_vertex>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vertex **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_bones<class_MeshDataTool_method_set_vertex_bones>` **(** :ref:`int<class_int>` idx, :ref:`PackedInt32Array<class_PackedInt32Array>` bones **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_color<class_MeshDataTool_method_set_vertex_color>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_meta<class_MeshDataTool_method_set_vertex_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_normal<class_MeshDataTool_method_set_vertex_normal>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` normal **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_tangent<class_MeshDataTool_method_set_vertex_tangent>` **(** :ref:`int<class_int>` idx, :ref:`Plane<class_Plane>` tangent **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_uv<class_MeshDataTool_method_set_vertex_uv>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_uv2<class_MeshDataTool_method_set_vertex_uv2>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv2 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex_weights<class_MeshDataTool_method_set_vertex_weights>` **(** :ref:`int<class_int>` idx, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_MeshDataTool_method_clear>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`commit_to_surface<class_MeshDataTool_method_commit_to_surface>`\ (\ mesh\: :ref:`ArrayMesh<class_ArrayMesh>`, compression_flags\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_surface<class_MeshDataTool_method_create_from_surface>`\ (\ mesh\: :ref:`ArrayMesh<class_ArrayMesh>`, surface\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_edge_count<class_MeshDataTool_method_get_edge_count>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_edge_faces<class_MeshDataTool_method_get_edge_faces>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_edge_meta<class_MeshDataTool_method_get_edge_meta>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_edge_vertex<class_MeshDataTool_method_get_edge_vertex>`\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_face_count<class_MeshDataTool_method_get_face_count>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_face_edge<class_MeshDataTool_method_get_face_edge>`\ (\ idx\: :ref:`int<class_int>`, edge\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_face_meta<class_MeshDataTool_method_get_face_meta>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_face_normal<class_MeshDataTool_method_get_face_normal>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_face_vertex<class_MeshDataTool_method_get_face_vertex>`\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_format<class_MeshDataTool_method_get_format>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`get_material<class_MeshDataTool_method_get_material>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_vertex<class_MeshDataTool_method_get_vertex>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_bones<class_MeshDataTool_method_get_vertex_bones>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_vertex_color<class_MeshDataTool_method_get_vertex_color>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_vertex_count<class_MeshDataTool_method_get_vertex_count>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_edges<class_MeshDataTool_method_get_vertex_edges>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_vertex_faces<class_MeshDataTool_method_get_vertex_faces>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_vertex_meta<class_MeshDataTool_method_get_vertex_meta>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_vertex_normal<class_MeshDataTool_method_get_vertex_normal>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`get_vertex_tangent<class_MeshDataTool_method_get_vertex_tangent>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv<class_MeshDataTool_method_get_vertex_uv>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv2<class_MeshDataTool_method_get_vertex_uv2>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertex_weights<class_MeshDataTool_method_get_vertex_weights>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_edge_meta<class_MeshDataTool_method_set_edge_meta>`\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_face_meta<class_MeshDataTool_method_set_face_meta>`\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_material<class_MeshDataTool_method_set_material>`\ (\ material\: :ref:`Material<class_Material>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex<class_MeshDataTool_method_set_vertex>`\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_bones<class_MeshDataTool_method_set_vertex_bones>`\ (\ idx\: :ref:`int<class_int>`, bones\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_color<class_MeshDataTool_method_set_vertex_color>`\ (\ idx\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_meta<class_MeshDataTool_method_set_vertex_meta>`\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_normal<class_MeshDataTool_method_set_vertex_normal>`\ (\ idx\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_tangent<class_MeshDataTool_method_set_vertex_tangent>`\ (\ idx\: :ref:`int<class_int>`, tangent\: :ref:`Plane<class_Plane>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_uv<class_MeshDataTool_method_set_vertex_uv>`\ (\ idx\: :ref:`int<class_int>`, uv\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_uv2<class_MeshDataTool_method_set_vertex_uv2>`\ (\ idx\: :ref:`int<class_int>`, uv2\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex_weights<class_MeshDataTool_method_set_vertex_weights>`\ (\ idx\: :ref:`int<class_int>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -171,7 +178,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_MeshDataTool_method_clear>` Clears all data currently in MeshDataTool. @@ -183,7 +190,7 @@ Clears all data currently in MeshDataTool. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **commit_to_surface** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh **)** +:ref:`Error<enum_@GlobalScope_Error>` **commit_to_surface**\ (\ mesh\: :ref:`ArrayMesh<class_ArrayMesh>`, compression_flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_MeshDataTool_method_commit_to_surface>` Adds a new surface to specified :ref:`Mesh<class_Mesh>` with edited data. @@ -195,7 +202,7 @@ Adds a new surface to specified :ref:`Mesh<class_Mesh>` with edited data. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_from_surface** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`int<class_int>` surface **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_from_surface**\ (\ mesh\: :ref:`ArrayMesh<class_ArrayMesh>`, surface\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MeshDataTool_method_create_from_surface>` Uses specified surface of given :ref:`Mesh<class_Mesh>` to populate data for MeshDataTool. @@ -209,7 +216,7 @@ Requires :ref:`Mesh<class_Mesh>` with primitive type :ref:`Mesh.PRIMITIVE_TRIANG .. rst-class:: classref-method -:ref:`int<class_int>` **get_edge_count** **(** **)** |const| +:ref:`int<class_int>` **get_edge_count**\ (\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_edge_count>` Returns the number of edges in this :ref:`Mesh<class_Mesh>`. @@ -221,7 +228,7 @@ Returns the number of edges in this :ref:`Mesh<class_Mesh>`. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_edge_faces** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_edge_faces**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_edge_faces>` Returns array of faces that touch given edge. @@ -233,7 +240,7 @@ Returns array of faces that touch given edge. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_edge_meta** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Variant<class_Variant>` **get_edge_meta**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_edge_meta>` Returns meta information assigned to given edge. @@ -245,7 +252,7 @@ Returns meta information assigned to given edge. .. rst-class:: classref-method -:ref:`int<class_int>` **get_edge_vertex** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| +:ref:`int<class_int>` **get_edge_vertex**\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_edge_vertex>` Returns index of specified vertex connected to given edge. @@ -259,7 +266,7 @@ Vertex argument can only be 0 or 1 because edges are comprised of two vertices. .. rst-class:: classref-method -:ref:`int<class_int>` **get_face_count** **(** **)** |const| +:ref:`int<class_int>` **get_face_count**\ (\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_face_count>` Returns the number of faces in this :ref:`Mesh<class_Mesh>`. @@ -271,7 +278,7 @@ Returns the number of faces in this :ref:`Mesh<class_Mesh>`. .. rst-class:: classref-method -:ref:`int<class_int>` **get_face_edge** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` edge **)** |const| +:ref:`int<class_int>` **get_face_edge**\ (\ idx\: :ref:`int<class_int>`, edge\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_face_edge>` Returns specified edge associated with given face. @@ -285,7 +292,7 @@ Edge argument must be either 0, 1, or 2 because a face only has three edges. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_face_meta** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Variant<class_Variant>` **get_face_meta**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_face_meta>` Returns the metadata associated with the given face. @@ -297,7 +304,7 @@ Returns the metadata associated with the given face. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_face_normal** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_face_normal**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_face_normal>` Calculates and returns the face normal of the given face. @@ -309,12 +316,31 @@ Calculates and returns the face normal of the given face. .. rst-class:: classref-method -:ref:`int<class_int>` **get_face_vertex** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| +:ref:`int<class_int>` **get_face_vertex**\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_face_vertex>` -Returns the specified vertex of the given face. +Returns the specified vertex index of the given face. Vertex argument must be either 0, 1, or 2 because faces contain three vertices. +\ **Example:**\ + + +.. tabs:: + + .. code-tab:: gdscript + + var index = mesh_data_tool.get_face_vertex(0, 1) # Gets the index of the second vertex of the first face. + var position = mesh_data_tool.get_vertex(index) + var normal = mesh_data_tool.get_vertex_normal(index) + + .. code-tab:: csharp + + int index = meshDataTool.GetFaceVertex(0, 1); // Gets the index of the second vertex of the first face. + Vector3 position = meshDataTool.GetVertex(index); + Vector3 normal = meshDataTool.GetVertexNormal(index); + + + .. rst-class:: classref-item-separator ---- @@ -323,11 +349,9 @@ Vertex argument must be either 0, 1, or 2 because faces contain three vertices. .. rst-class:: classref-method -:ref:`int<class_int>` **get_format** **(** **)** |const| - -Returns the :ref:`Mesh<class_Mesh>`'s format. Format is an integer made up of :ref:`Mesh<class_Mesh>` format flags combined together. For example, a mesh containing both vertices and normals would return a format of ``3`` because :ref:`Mesh.ARRAY_FORMAT_VERTEX<class_Mesh_constant_ARRAY_FORMAT_VERTEX>` is ``1`` and :ref:`Mesh.ARRAY_FORMAT_NORMAL<class_Mesh_constant_ARRAY_FORMAT_NORMAL>` is ``2``. +:ref:`int<class_int>` **get_format**\ (\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_format>` -See :ref:`ArrayFormat<enum_Mesh_ArrayFormat>` for a list of format flags. +Returns the :ref:`Mesh<class_Mesh>`'s format as a combination of the :ref:`ArrayFormat<enum_Mesh_ArrayFormat>` flags. For example, a mesh containing both vertices and normals would return a format of ``3`` because :ref:`Mesh.ARRAY_FORMAT_VERTEX<class_Mesh_constant_ARRAY_FORMAT_VERTEX>` is ``1`` and :ref:`Mesh.ARRAY_FORMAT_NORMAL<class_Mesh_constant_ARRAY_FORMAT_NORMAL>` is ``2``. .. rst-class:: classref-item-separator @@ -337,7 +361,7 @@ See :ref:`ArrayFormat<enum_Mesh_ArrayFormat>` for a list of format flags. .. rst-class:: classref-method -:ref:`Material<class_Material>` **get_material** **(** **)** |const| +:ref:`Material<class_Material>` **get_material**\ (\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_material>` Returns the material assigned to the :ref:`Mesh<class_Mesh>`. @@ -349,9 +373,9 @@ Returns the material assigned to the :ref:`Mesh<class_Mesh>`. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_vertex** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_vertex**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex>` -Returns the vertex at given index. +Returns the position of the given vertex. .. rst-class:: classref-item-separator @@ -361,7 +385,7 @@ Returns the vertex at given index. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_bones** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_bones**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_bones>` Returns the bones of the given vertex. @@ -373,7 +397,7 @@ Returns the bones of the given vertex. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_vertex_color** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Color<class_Color>` **get_vertex_color**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_color>` Returns the color of the given vertex. @@ -385,7 +409,7 @@ Returns the color of the given vertex. .. rst-class:: classref-method -:ref:`int<class_int>` **get_vertex_count** **(** **)** |const| +:ref:`int<class_int>` **get_vertex_count**\ (\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_count>` Returns the total number of vertices in :ref:`Mesh<class_Mesh>`. @@ -397,7 +421,7 @@ Returns the total number of vertices in :ref:`Mesh<class_Mesh>`. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_edges** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_edges**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_edges>` Returns an array of edges that share the given vertex. @@ -409,7 +433,7 @@ Returns an array of edges that share the given vertex. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_faces** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_vertex_faces**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_faces>` Returns an array of faces that share the given vertex. @@ -421,7 +445,7 @@ Returns an array of faces that share the given vertex. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_vertex_meta** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Variant<class_Variant>` **get_vertex_meta**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_meta>` Returns the metadata associated with the given vertex. @@ -433,7 +457,7 @@ Returns the metadata associated with the given vertex. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_vertex_normal** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_vertex_normal**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_normal>` Returns the normal of the given vertex. @@ -445,7 +469,7 @@ Returns the normal of the given vertex. .. rst-class:: classref-method -:ref:`Plane<class_Plane>` **get_vertex_tangent** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Plane<class_Plane>` **get_vertex_tangent**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_tangent>` Returns the tangent of the given vertex. @@ -457,7 +481,7 @@ Returns the tangent of the given vertex. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_vertex_uv** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_vertex_uv**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_uv>` Returns the UV of the given vertex. @@ -469,7 +493,7 @@ Returns the UV of the given vertex. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_vertex_uv2** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_vertex_uv2**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_uv2>` Returns the UV2 of the given vertex. @@ -481,7 +505,7 @@ Returns the UV2 of the given vertex. .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertex_weights** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertex_weights**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshDataTool_method_get_vertex_weights>` Returns bone weights of the given vertex. @@ -493,7 +517,7 @@ Returns bone weights of the given vertex. .. rst-class:: classref-method -void **set_edge_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** +|void| **set_edge_meta**\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_MeshDataTool_method_set_edge_meta>` Sets the metadata of the given edge. @@ -505,7 +529,7 @@ Sets the metadata of the given edge. .. rst-class:: classref-method -void **set_face_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** +|void| **set_face_meta**\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_MeshDataTool_method_set_face_meta>` Sets the metadata of the given face. @@ -517,7 +541,7 @@ Sets the metadata of the given face. .. rst-class:: classref-method -void **set_material** **(** :ref:`Material<class_Material>` material **)** +|void| **set_material**\ (\ material\: :ref:`Material<class_Material>`\ ) :ref:`🔗<class_MeshDataTool_method_set_material>` Sets the material to be used by newly-constructed :ref:`Mesh<class_Mesh>`. @@ -529,7 +553,7 @@ Sets the material to be used by newly-constructed :ref:`Mesh<class_Mesh>`. .. rst-class:: classref-method -void **set_vertex** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vertex **)** +|void| **set_vertex**\ (\ idx\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex>` Sets the position of the given vertex. @@ -541,7 +565,7 @@ Sets the position of the given vertex. .. rst-class:: classref-method -void **set_vertex_bones** **(** :ref:`int<class_int>` idx, :ref:`PackedInt32Array<class_PackedInt32Array>` bones **)** +|void| **set_vertex_bones**\ (\ idx\: :ref:`int<class_int>`, bones\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_bones>` Sets the bones of the given vertex. @@ -553,7 +577,7 @@ Sets the bones of the given vertex. .. rst-class:: classref-method -void **set_vertex_color** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` color **)** +|void| **set_vertex_color**\ (\ idx\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_color>` Sets the color of the given vertex. @@ -565,7 +589,7 @@ Sets the color of the given vertex. .. rst-class:: classref-method -void **set_vertex_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** +|void| **set_vertex_meta**\ (\ idx\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_meta>` Sets the metadata associated with the given vertex. @@ -577,7 +601,7 @@ Sets the metadata associated with the given vertex. .. rst-class:: classref-method -void **set_vertex_normal** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` normal **)** +|void| **set_vertex_normal**\ (\ idx\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_normal>` Sets the normal of the given vertex. @@ -589,7 +613,7 @@ Sets the normal of the given vertex. .. rst-class:: classref-method -void **set_vertex_tangent** **(** :ref:`int<class_int>` idx, :ref:`Plane<class_Plane>` tangent **)** +|void| **set_vertex_tangent**\ (\ idx\: :ref:`int<class_int>`, tangent\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_tangent>` Sets the tangent of the given vertex. @@ -601,7 +625,7 @@ Sets the tangent of the given vertex. .. rst-class:: classref-method -void **set_vertex_uv** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv **)** +|void| **set_vertex_uv**\ (\ idx\: :ref:`int<class_int>`, uv\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_uv>` Sets the UV of the given vertex. @@ -613,7 +637,7 @@ Sets the UV of the given vertex. .. rst-class:: classref-method -void **set_vertex_uv2** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv2 **)** +|void| **set_vertex_uv2**\ (\ idx\: :ref:`int<class_int>`, uv2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_uv2>` Sets the UV2 of the given vertex. @@ -625,7 +649,7 @@ Sets the UV2 of the given vertex. .. rst-class:: classref-method -void **set_vertex_weights** **(** :ref:`int<class_int>` idx, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** +|void| **set_vertex_weights**\ (\ idx\: :ref:`int<class_int>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_MeshDataTool_method_set_vertex_weights>` Sets the bone weights of the given vertex. @@ -636,3 +660,4 @@ Sets the bone weights of the given vertex. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshinstance2d.rst b/classes/class_meshinstance2d.rst index 5cf3f8028fe..f687023911b 100644 --- a/classes/class_meshinstance2d.rst +++ b/classes/class_meshinstance2d.rst @@ -55,7 +55,7 @@ Signals .. rst-class:: classref-signal -**texture_changed** **(** **)** +**texture_changed**\ (\ ) :ref:`🔗<class_MeshInstance2D_signal_texture_changed>` Emitted when the :ref:`texture<class_MeshInstance2D_property_texture>` is changed. @@ -72,12 +72,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **mesh** +:ref:`Mesh<class_Mesh>` **mesh** :ref:`🔗<class_MeshInstance2D_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh<class_Mesh>` value **)** -- :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_mesh**\ (\ ) The :ref:`Mesh<class_Mesh>` that will be drawn by the **MeshInstance2D**. @@ -89,12 +89,12 @@ The :ref:`Mesh<class_Mesh>` that will be drawn by the **MeshInstance2D**. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_MeshInstance2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The :ref:`Texture2D<class_Texture2D>` that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`. Can be accessed as ``TEXTURE`` in CanvasItem shader. @@ -105,3 +105,4 @@ The :ref:`Texture2D<class_Texture2D>` that will be used if using the default :re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshinstance3d.rst b/classes/class_meshinstance3d.rst index f4f90efb397..604d6978821 100644 --- a/classes/class_meshinstance3d.rst +++ b/classes/class_meshinstance3d.rst @@ -28,13 +28,13 @@ MeshInstance3D is a node that takes a :ref:`Mesh<class_Mesh>` resource and adds Tutorials --------- -- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__ +- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__ -- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__ +- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2739>`__ -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -60,31 +60,35 @@ Methods .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_convex_collision<class_MeshInstance3D_method_create_convex_collision>` **(** :ref:`bool<class_bool>` clean=true, :ref:`bool<class_bool>` simplify=false **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_debug_tangents<class_MeshInstance3D_method_create_debug_tangents>` **(** **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_multiple_convex_collisions<class_MeshInstance3D_method_create_multiple_convex_collisions>` **(** :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>` settings=null **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_trimesh_collision<class_MeshInstance3D_method_create_trimesh_collision>` **(** **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_blend_shape_by_name<class_MeshInstance3D_method_find_blend_shape_by_name>` **(** :ref:`StringName<class_StringName>` name **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`get_active_material<class_MeshInstance3D_method_get_active_material>` **(** :ref:`int<class_int>` surface **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_blend_shape_count<class_MeshInstance3D_method_get_blend_shape_count>` **(** **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_blend_shape_value<class_MeshInstance3D_method_get_blend_shape_value>` **(** :ref:`int<class_int>` blend_shape_idx **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material<class_Material>` | :ref:`get_surface_override_material<class_MeshInstance3D_method_get_surface_override_material>` **(** :ref:`int<class_int>` surface **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_surface_override_material_count<class_MeshInstance3D_method_get_surface_override_material_count>` **(** **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_shape_value<class_MeshInstance3D_method_set_blend_shape_value>` **(** :ref:`int<class_int>` blend_shape_idx, :ref:`float<class_float>` value **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_surface_override_material<class_MeshInstance3D_method_set_surface_override_material>` **(** :ref:`int<class_int>` surface, :ref:`Material<class_Material>` material **)** | - +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`bake_mesh_from_current_blend_shape_mix<class_MeshInstance3D_method_bake_mesh_from_current_blend_shape_mix>`\ (\ existing\: :ref:`ArrayMesh<class_ArrayMesh>` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_convex_collision<class_MeshInstance3D_method_create_convex_collision>`\ (\ clean\: :ref:`bool<class_bool>` = true, simplify\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_debug_tangents<class_MeshInstance3D_method_create_debug_tangents>`\ (\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_multiple_convex_collisions<class_MeshInstance3D_method_create_multiple_convex_collisions>`\ (\ settings\: :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_trimesh_collision<class_MeshInstance3D_method_create_trimesh_collision>`\ (\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_blend_shape_by_name<class_MeshInstance3D_method_find_blend_shape_by_name>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`get_active_material<class_MeshInstance3D_method_get_active_material>`\ (\ surface\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_blend_shape_count<class_MeshInstance3D_method_get_blend_shape_count>`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_blend_shape_value<class_MeshInstance3D_method_get_blend_shape_value>`\ (\ blend_shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinReference<class_SkinReference>` | :ref:`get_skin_reference<class_MeshInstance3D_method_get_skin_reference>`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material<class_Material>` | :ref:`get_surface_override_material<class_MeshInstance3D_method_get_surface_override_material>`\ (\ surface\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_surface_override_material_count<class_MeshInstance3D_method_get_surface_override_material_count>`\ (\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_shape_value<class_MeshInstance3D_method_set_blend_shape_value>`\ (\ blend_shape_idx\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_surface_override_material<class_MeshInstance3D_method_set_surface_override_material>`\ (\ surface\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -99,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **mesh** +:ref:`Mesh<class_Mesh>` **mesh** :ref:`🔗<class_MeshInstance3D_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh<class_Mesh>` value **)** -- :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_mesh**\ (\ ) The :ref:`Mesh<class_Mesh>` resource for the instance. @@ -116,12 +120,12 @@ The :ref:`Mesh<class_Mesh>` resource for the instance. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **skeleton** = ``NodePath("..")`` +:ref:`NodePath<class_NodePath>` **skeleton** = ``NodePath("..")`` :ref:`🔗<class_MeshInstance3D_property_skeleton>` .. rst-class:: classref-property-setget -- void **set_skeleton_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_skeleton_path** **(** **)** +- |void| **set_skeleton_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_skeleton_path**\ (\ ) :ref:`NodePath<class_NodePath>` to the :ref:`Skeleton3D<class_Skeleton3D>` associated with the instance. @@ -133,12 +137,12 @@ The :ref:`Mesh<class_Mesh>` resource for the instance. .. rst-class:: classref-property -:ref:`Skin<class_Skin>` **skin** +:ref:`Skin<class_Skin>` **skin** :ref:`🔗<class_MeshInstance3D_property_skin>` .. rst-class:: classref-property-setget -- void **set_skin** **(** :ref:`Skin<class_Skin>` value **)** -- :ref:`Skin<class_Skin>` **get_skin** **(** **)** +- |void| **set_skin**\ (\ value\: :ref:`Skin<class_Skin>`\ ) +- :ref:`Skin<class_Skin>` **get_skin**\ (\ ) The :ref:`Skin<class_Skin>` to be used by this instance. @@ -151,11 +155,25 @@ The :ref:`Skin<class_Skin>` to be used by this instance. Method Descriptions ------------------- +.. _class_MeshInstance3D_method_bake_mesh_from_current_blend_shape_mix: + +.. rst-class:: classref-method + +:ref:`ArrayMesh<class_ArrayMesh>` **bake_mesh_from_current_blend_shape_mix**\ (\ existing\: :ref:`ArrayMesh<class_ArrayMesh>` = null\ ) :ref:`🔗<class_MeshInstance3D_method_bake_mesh_from_current_blend_shape_mix>` + +Takes a snapshot from the current :ref:`ArrayMesh<class_ArrayMesh>` with all blend shapes applied according to their current weights and bakes it to the provided ``existing`` mesh. If no ``existing`` mesh is provided a new :ref:`ArrayMesh<class_ArrayMesh>` is created, baked and returned. Mesh surface materials are not copied. + +\ **Performance:** :ref:`Mesh<class_Mesh>` data needs to be received from the GPU, stalling the :ref:`RenderingServer<class_RenderingServer>` in the process. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshInstance3D_method_create_convex_collision: .. rst-class:: classref-method -void **create_convex_collision** **(** :ref:`bool<class_bool>` clean=true, :ref:`bool<class_bool>` simplify=false **)** +|void| **create_convex_collision**\ (\ clean\: :ref:`bool<class_bool>` = true, simplify\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_MeshInstance3D_method_create_convex_collision>` This helper creates a :ref:`StaticBody3D<class_StaticBody3D>` child node with a :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` collision shape calculated from the mesh geometry. It's mainly used for testing. @@ -171,7 +189,7 @@ If ``simplify`` is ``true``, the geometry can be further simplified to reduce th .. rst-class:: classref-method -void **create_debug_tangents** **(** **)** +|void| **create_debug_tangents**\ (\ ) :ref:`🔗<class_MeshInstance3D_method_create_debug_tangents>` This helper creates a **MeshInstance3D** child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. @@ -183,7 +201,7 @@ This helper creates a **MeshInstance3D** child node with gizmos at every vertex .. rst-class:: classref-method -void **create_multiple_convex_collisions** **(** :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>` settings=null **)** +|void| **create_multiple_convex_collisions**\ (\ settings\: :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>` = null\ ) :ref:`🔗<class_MeshInstance3D_method_create_multiple_convex_collisions>` This helper creates a :ref:`StaticBody3D<class_StaticBody3D>` child node with multiple :ref:`ConvexPolygonShape3D<class_ConvexPolygonShape3D>` collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional ``settings``. @@ -195,7 +213,7 @@ This helper creates a :ref:`StaticBody3D<class_StaticBody3D>` child node with mu .. rst-class:: classref-method -void **create_trimesh_collision** **(** **)** +|void| **create_trimesh_collision**\ (\ ) :ref:`🔗<class_MeshInstance3D_method_create_trimesh_collision>` This helper creates a :ref:`StaticBody3D<class_StaticBody3D>` child node with a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>` collision shape calculated from the mesh geometry. It's mainly used for testing. @@ -207,7 +225,7 @@ This helper creates a :ref:`StaticBody3D<class_StaticBody3D>` child node with a .. rst-class:: classref-method -:ref:`int<class_int>` **find_blend_shape_by_name** **(** :ref:`StringName<class_StringName>` name **)** +:ref:`int<class_int>` **find_blend_shape_by_name**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_MeshInstance3D_method_find_blend_shape_by_name>` Returns the index of the blend shape with the given ``name``. Returns ``-1`` if no blend shape with this name exists, including when :ref:`mesh<class_MeshInstance3D_property_mesh>` is ``null``. @@ -219,7 +237,7 @@ Returns the index of the blend shape with the given ``name``. Returns ``-1`` if .. rst-class:: classref-method -:ref:`Material<class_Material>` **get_active_material** **(** :ref:`int<class_int>` surface **)** |const| +:ref:`Material<class_Material>` **get_active_material**\ (\ surface\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_active_material>` Returns the :ref:`Material<class_Material>` that will be used by the :ref:`Mesh<class_Mesh>` when drawing. This can return the :ref:`GeometryInstance3D.material_override<class_GeometryInstance3D_property_material_override>`, the surface override :ref:`Material<class_Material>` defined in this **MeshInstance3D**, or the surface :ref:`Material<class_Material>` defined in the :ref:`mesh<class_MeshInstance3D_property_mesh>`. For example, if :ref:`GeometryInstance3D.material_override<class_GeometryInstance3D_property_material_override>` is used, all surfaces will return the override material. @@ -233,7 +251,7 @@ Returns ``null`` if no material is active, including when :ref:`mesh<class_MeshI .. rst-class:: classref-method -:ref:`int<class_int>` **get_blend_shape_count** **(** **)** |const| +:ref:`int<class_int>` **get_blend_shape_count**\ (\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_blend_shape_count>` Returns the number of blend shapes available. Produces an error if :ref:`mesh<class_MeshInstance3D_property_mesh>` is ``null``. @@ -245,7 +263,7 @@ Returns the number of blend shapes available. Produces an error if :ref:`mesh<cl .. rst-class:: classref-method -:ref:`float<class_float>` **get_blend_shape_value** **(** :ref:`int<class_int>` blend_shape_idx **)** |const| +:ref:`float<class_float>` **get_blend_shape_value**\ (\ blend_shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_blend_shape_value>` Returns the value of the blend shape at the given ``blend_shape_idx``. Returns ``0.0`` and produces an error if :ref:`mesh<class_MeshInstance3D_property_mesh>` is ``null`` or doesn't have a blend shape at that index. @@ -253,13 +271,27 @@ Returns the value of the blend shape at the given ``blend_shape_idx``. Returns ` ---- +.. _class_MeshInstance3D_method_get_skin_reference: + +.. rst-class:: classref-method + +:ref:`SkinReference<class_SkinReference>` **get_skin_reference**\ (\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_skin_reference>` + +Returns the internal :ref:`SkinReference<class_SkinReference>` containing the skeleton's :ref:`RID<class_RID>` attached to this RID. See also :ref:`Resource.get_rid<class_Resource_method_get_rid>`, :ref:`SkinReference.get_skeleton<class_SkinReference_method_get_skeleton>`, and :ref:`RenderingServer.instance_attach_skeleton<class_RenderingServer_method_instance_attach_skeleton>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_MeshInstance3D_method_get_surface_override_material: .. rst-class:: classref-method -:ref:`Material<class_Material>` **get_surface_override_material** **(** :ref:`int<class_int>` surface **)** |const| +:ref:`Material<class_Material>` **get_surface_override_material**\ (\ surface\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_surface_override_material>` -Returns the override :ref:`Material<class_Material>` for the specified ``surface`` of the :ref:`Mesh<class_Mesh>` resource. +Returns the override :ref:`Material<class_Material>` for the specified ``surface`` of the :ref:`Mesh<class_Mesh>` resource. See also :ref:`get_surface_override_material_count<class_MeshInstance3D_method_get_surface_override_material_count>`. + +\ **Note:** This returns the :ref:`Material<class_Material>` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh<class_Mesh>` resource. To get the material within the :ref:`Mesh<class_Mesh>` resource, use :ref:`Mesh.surface_get_material<class_Mesh_method_surface_get_material>` instead. .. rst-class:: classref-item-separator @@ -269,9 +301,9 @@ Returns the override :ref:`Material<class_Material>` for the specified ``surface .. rst-class:: classref-method -:ref:`int<class_int>` **get_surface_override_material_count** **(** **)** |const| +:ref:`int<class_int>` **get_surface_override_material_count**\ (\ ) |const| :ref:`🔗<class_MeshInstance3D_method_get_surface_override_material_count>` -Returns the number of surface override materials. This is equivalent to :ref:`Mesh.get_surface_count<class_Mesh_method_get_surface_count>`. +Returns the number of surface override materials. This is equivalent to :ref:`Mesh.get_surface_count<class_Mesh_method_get_surface_count>`. See also :ref:`get_surface_override_material<class_MeshInstance3D_method_get_surface_override_material>`. .. rst-class:: classref-item-separator @@ -281,7 +313,7 @@ Returns the number of surface override materials. This is equivalent to :ref:`Me .. rst-class:: classref-method -void **set_blend_shape_value** **(** :ref:`int<class_int>` blend_shape_idx, :ref:`float<class_float>` value **)** +|void| **set_blend_shape_value**\ (\ blend_shape_idx\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_MeshInstance3D_method_set_blend_shape_value>` Sets the value of the blend shape at ``blend_shape_idx`` to ``value``. Produces an error if :ref:`mesh<class_MeshInstance3D_property_mesh>` is ``null`` or doesn't have a blend shape at that index. @@ -293,10 +325,12 @@ Sets the value of the blend shape at ``blend_shape_idx`` to ``value``. Produces .. rst-class:: classref-method -void **set_surface_override_material** **(** :ref:`int<class_int>` surface, :ref:`Material<class_Material>` material **)** +|void| **set_surface_override_material**\ (\ surface\: :ref:`int<class_int>`, material\: :ref:`Material<class_Material>`\ ) :ref:`🔗<class_MeshInstance3D_method_set_surface_override_material>` Sets the override ``material`` for the specified ``surface`` of the :ref:`Mesh<class_Mesh>` resource. This material is associated with this **MeshInstance3D** rather than with :ref:`mesh<class_MeshInstance3D_property_mesh>`. +\ **Note:** This assigns the :ref:`Material<class_Material>` associated to the **MeshInstance3D**'s Surface Material Override properties, not the material within the :ref:`Mesh<class_Mesh>` resource. To set the material within the :ref:`Mesh<class_Mesh>` resource, use :ref:`Mesh.surface_get_material<class_Mesh_method_surface_get_material>` instead. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -304,3 +338,4 @@ Sets the override ``material`` for the specified ``surface`` of the :ref:`Mesh<c .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshlibrary.rst b/classes/class_meshlibrary.rst index 432fc444b3d..bf39e2d7a81 100644 --- a/classes/class_meshlibrary.rst +++ b/classes/class_meshlibrary.rst @@ -26,9 +26,9 @@ A library of meshes. Contains a list of :ref:`Mesh<class_Mesh>` resources, each Tutorials --------- -- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/126>`__ +- `3D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2739>`__ -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ .. rst-class:: classref-reftable-group @@ -38,51 +38,51 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_MeshLibrary_method_clear>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_item<class_MeshLibrary_method_create_item>` **(** :ref:`int<class_int>` id **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_item_by_name<class_MeshLibrary_method_find_item_by_name>` **(** :ref:`String<class_String>` name **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_item_list<class_MeshLibrary_method_get_item_list>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mesh<class_Mesh>` | :ref:`get_item_mesh<class_MeshLibrary_method_get_item_mesh>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_item_mesh_transform<class_MeshLibrary_method_get_item_mesh_transform>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_name<class_MeshLibrary_method_get_item_name>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_navigation_layers<class_MeshLibrary_method_get_item_navigation_layers>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`get_item_navigation_mesh<class_MeshLibrary_method_get_item_navigation_mesh>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_item_navigation_mesh_transform<class_MeshLibrary_method_get_item_navigation_mesh_transform>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_preview<class_MeshLibrary_method_get_item_preview>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_item_shapes<class_MeshLibrary_method_get_item_shapes>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_last_unused_item_id<class_MeshLibrary_method_get_last_unused_item_id>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_item<class_MeshLibrary_method_remove_item>` **(** :ref:`int<class_int>` id **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_mesh<class_MeshLibrary_method_set_item_mesh>` **(** :ref:`int<class_int>` id, :ref:`Mesh<class_Mesh>` mesh **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_mesh_transform<class_MeshLibrary_method_set_item_mesh_transform>` **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` mesh_transform **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_name<class_MeshLibrary_method_set_item_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_navigation_layers<class_MeshLibrary_method_set_item_navigation_layers>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` navigation_layers **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_navigation_mesh<class_MeshLibrary_method_set_item_navigation_mesh>` **(** :ref:`int<class_int>` id, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_navigation_mesh_transform<class_MeshLibrary_method_set_item_navigation_mesh_transform>` **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` navigation_mesh **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_preview<class_MeshLibrary_method_set_item_preview>` **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` texture **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_shapes<class_MeshLibrary_method_set_item_shapes>` **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_MeshLibrary_method_clear>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_item<class_MeshLibrary_method_create_item>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_item_by_name<class_MeshLibrary_method_find_item_by_name>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_item_list<class_MeshLibrary_method_get_item_list>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh<class_Mesh>` | :ref:`get_item_mesh<class_MeshLibrary_method_get_item_mesh>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_item_mesh_transform<class_MeshLibrary_method_get_item_mesh_transform>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_name<class_MeshLibrary_method_get_item_name>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_navigation_layers<class_MeshLibrary_method_get_item_navigation_layers>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`get_item_navigation_mesh<class_MeshLibrary_method_get_item_navigation_mesh>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_item_navigation_mesh_transform<class_MeshLibrary_method_get_item_navigation_mesh_transform>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_preview<class_MeshLibrary_method_get_item_preview>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_item_shapes<class_MeshLibrary_method_get_item_shapes>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_last_unused_item_id<class_MeshLibrary_method_get_last_unused_item_id>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item<class_MeshLibrary_method_remove_item>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_mesh<class_MeshLibrary_method_set_item_mesh>`\ (\ id\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_mesh_transform<class_MeshLibrary_method_set_item_mesh_transform>`\ (\ id\: :ref:`int<class_int>`, mesh_transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_name<class_MeshLibrary_method_set_item_name>`\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_layers<class_MeshLibrary_method_set_item_navigation_layers>`\ (\ id\: :ref:`int<class_int>`, navigation_layers\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_mesh<class_MeshLibrary_method_set_item_navigation_mesh>`\ (\ id\: :ref:`int<class_int>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_navigation_mesh_transform<class_MeshLibrary_method_set_item_navigation_mesh_transform>`\ (\ id\: :ref:`int<class_int>`, navigation_mesh\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_preview<class_MeshLibrary_method_set_item_preview>`\ (\ id\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_shapes<class_MeshLibrary_method_set_item_shapes>`\ (\ id\: :ref:`int<class_int>`, shapes\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -97,7 +97,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_MeshLibrary_method_clear>` Clears the library. @@ -109,7 +109,7 @@ Clears the library. .. rst-class:: classref-method -void **create_item** **(** :ref:`int<class_int>` id **)** +|void| **create_item**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MeshLibrary_method_create_item>` Creates a new item in the library with the given ID. @@ -123,9 +123,9 @@ You can get an unused ID from :ref:`get_last_unused_item_id<class_MeshLibrary_me .. rst-class:: classref-method -:ref:`int<class_int>` **find_item_by_name** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **find_item_by_name**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_find_item_by_name>` -Returns the first item with the given name. +Returns the first item with the given name, or ``-1`` if no item is found. .. rst-class:: classref-item-separator @@ -135,7 +135,7 @@ Returns the first item with the given name. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_item_list** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_item_list**\ (\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_list>` Returns the list of item IDs in use. @@ -147,7 +147,7 @@ Returns the list of item IDs in use. .. rst-class:: classref-method -:ref:`Mesh<class_Mesh>` **get_item_mesh** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Mesh<class_Mesh>` **get_item_mesh**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_mesh>` Returns the item's mesh. @@ -159,7 +159,7 @@ Returns the item's mesh. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_item_mesh_transform** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_item_mesh_transform**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_mesh_transform>` Returns the transform applied to the item's mesh. @@ -171,7 +171,7 @@ Returns the transform applied to the item's mesh. .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_name** **(** :ref:`int<class_int>` id **)** |const| +:ref:`String<class_String>` **get_item_name**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_name>` Returns the item's name. @@ -183,7 +183,7 @@ Returns the item's name. .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_navigation_layers** **(** :ref:`int<class_int>` id **)** |const| +:ref:`int<class_int>` **get_item_navigation_layers**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_navigation_layers>` Returns the item's navigation layers bitmask. @@ -195,7 +195,7 @@ Returns the item's navigation layers bitmask. .. rst-class:: classref-method -:ref:`NavigationMesh<class_NavigationMesh>` **get_item_navigation_mesh** **(** :ref:`int<class_int>` id **)** |const| +:ref:`NavigationMesh<class_NavigationMesh>` **get_item_navigation_mesh**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_navigation_mesh>` Returns the item's navigation mesh. @@ -207,7 +207,7 @@ Returns the item's navigation mesh. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_item_navigation_mesh_transform** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_item_navigation_mesh_transform**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_navigation_mesh_transform>` Returns the transform applied to the item's navigation mesh. @@ -219,7 +219,7 @@ Returns the transform applied to the item's navigation mesh. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_item_preview** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_item_preview**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_preview>` When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using :ref:`set_item_preview<class_MeshLibrary_method_set_item_preview>`. Returns an empty :ref:`Texture2D<class_Texture2D>` if no preview was manually set in a running project. @@ -231,7 +231,7 @@ When running in the editor, returns a generated item preview (a 3D rendering in .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_item_shapes** **(** :ref:`int<class_int>` id **)** |const| +:ref:`Array<class_Array>` **get_item_shapes**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_item_shapes>` Returns an item's collision shapes. @@ -245,7 +245,7 @@ The array consists of each :ref:`Shape3D<class_Shape3D>` followed by its :ref:`T .. rst-class:: classref-method -:ref:`int<class_int>` **get_last_unused_item_id** **(** **)** |const| +:ref:`int<class_int>` **get_last_unused_item_id**\ (\ ) |const| :ref:`🔗<class_MeshLibrary_method_get_last_unused_item_id>` Gets an unused ID for a new item. @@ -257,7 +257,7 @@ Gets an unused ID for a new item. .. rst-class:: classref-method -void **remove_item** **(** :ref:`int<class_int>` id **)** +|void| **remove_item**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MeshLibrary_method_remove_item>` Removes the item. @@ -269,7 +269,7 @@ Removes the item. .. rst-class:: classref-method -void **set_item_mesh** **(** :ref:`int<class_int>` id, :ref:`Mesh<class_Mesh>` mesh **)** +|void| **set_item_mesh**\ (\ id\: :ref:`int<class_int>`, mesh\: :ref:`Mesh<class_Mesh>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_mesh>` Sets the item's mesh. @@ -281,7 +281,7 @@ Sets the item's mesh. .. rst-class:: classref-method -void **set_item_mesh_transform** **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` mesh_transform **)** +|void| **set_item_mesh_transform**\ (\ id\: :ref:`int<class_int>`, mesh_transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_mesh_transform>` Sets the transform to apply to the item's mesh. @@ -293,7 +293,7 @@ Sets the transform to apply to the item's mesh. .. rst-class:: classref-method -void **set_item_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** +|void| **set_item_name**\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_name>` Sets the item's name. @@ -307,7 +307,7 @@ This name is shown in the editor. It can also be used to look up the item later .. rst-class:: classref-method -void **set_item_navigation_layers** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` navigation_layers **)** +|void| **set_item_navigation_layers**\ (\ id\: :ref:`int<class_int>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_navigation_layers>` Sets the item's navigation layers bitmask. @@ -319,7 +319,7 @@ Sets the item's navigation layers bitmask. .. rst-class:: classref-method -void **set_item_navigation_mesh** **(** :ref:`int<class_int>` id, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** +|void| **set_item_navigation_mesh**\ (\ id\: :ref:`int<class_int>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_navigation_mesh>` Sets the item's navigation mesh. @@ -331,7 +331,7 @@ Sets the item's navigation mesh. .. rst-class:: classref-method -void **set_item_navigation_mesh_transform** **(** :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` navigation_mesh **)** +|void| **set_item_navigation_mesh_transform**\ (\ id\: :ref:`int<class_int>`, navigation_mesh\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_navigation_mesh_transform>` Sets the transform to apply to the item's navigation mesh. @@ -343,7 +343,7 @@ Sets the transform to apply to the item's navigation mesh. .. rst-class:: classref-method -void **set_item_preview** **(** :ref:`int<class_int>` id, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_item_preview**\ (\ id\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_preview>` Sets a texture to use as the item's preview icon in the editor. @@ -355,7 +355,7 @@ Sets a texture to use as the item's preview icon in the editor. .. rst-class:: classref-method -void **set_item_shapes** **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)** +|void| **set_item_shapes**\ (\ id\: :ref:`int<class_int>`, shapes\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_MeshLibrary_method_set_item_shapes>` Sets an item's collision shapes. @@ -368,3 +368,4 @@ The array should consist of :ref:`Shape3D<class_Shape3D>` objects, each followed .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_meshtexture.rst b/classes/class_meshtexture.rst index dbfe9014f28..8536ba640b0 100644 --- a/classes/class_meshtexture.rst +++ b/classes/class_meshtexture.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **base_texture** +:ref:`Texture2D<class_Texture2D>` **base_texture** :ref:`🔗<class_MeshTexture_property_base_texture>` .. rst-class:: classref-property-setget -- void **set_base_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_base_texture** **(** **)** +- |void| **set_base_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_base_texture**\ (\ ) Sets the base texture that the Mesh will use to draw. @@ -69,12 +69,12 @@ Sets the base texture that the Mesh will use to draw. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **image_size** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **image_size** = ``Vector2(0, 0)`` :ref:`🔗<class_MeshTexture_property_image_size>` .. rst-class:: classref-property-setget -- void **set_image_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_image_size** **(** **)** +- |void| **set_image_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_image_size**\ (\ ) Sets the size of the image, needed for reference. @@ -86,12 +86,12 @@ Sets the size of the image, needed for reference. .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **mesh** +:ref:`Mesh<class_Mesh>` **mesh** :ref:`🔗<class_MeshTexture_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh<class_Mesh>` value **)** -- :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_mesh**\ (\ ) Sets the mesh used to draw. It must be a mesh using 2D vertices. @@ -102,3 +102,4 @@ Sets the mesh used to draw. It must be a mesh using 2D vertices. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_methodtweener.rst b/classes/class_methodtweener.rst index 4c52a6871cc..3e421a24b25 100644 --- a/classes/class_methodtweener.rst +++ b/classes/class_methodtweener.rst @@ -21,6 +21,8 @@ Description **MethodTweener** is similar to a combination of :ref:`CallbackTweener<class_CallbackTweener>` and :ref:`PropertyTweener<class_PropertyTweener>`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method<class_Tween_method_tween_method>` for more usage information. +The tweener will finish automatically if the callback's target object is freed. + \ **Note:** :ref:`Tween.tween_method<class_Tween_method_tween_method>` is the only correct way to create **MethodTweener**. Any **MethodTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -31,13 +33,13 @@ Methods .. table:: :widths: auto - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_delay<class_MethodTweener_method_set_delay>` **(** :ref:`float<class_float>` delay **)** | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_ease<class_MethodTweener_method_set_ease>` **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_trans<class_MethodTweener_method_set_trans>` **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** | - +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_delay<class_MethodTweener_method_set_delay>`\ (\ delay\: :ref:`float<class_float>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_ease<class_MethodTweener_method_set_ease>`\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener<class_MethodTweener>` | :ref:`set_trans<class_MethodTweener_method_set_trans>`\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +54,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`MethodTweener<class_MethodTweener>` **set_delay** **(** :ref:`float<class_float>` delay **)** +:ref:`MethodTweener<class_MethodTweener>` **set_delay**\ (\ delay\: :ref:`float<class_float>`\ ) :ref:`🔗<class_MethodTweener_method_set_delay>` Sets the time in seconds after which the **MethodTweener** will start interpolating. By default there's no delay. @@ -64,7 +66,7 @@ Sets the time in seconds after which the **MethodTweener** will start interpolat .. rst-class:: classref-method -:ref:`MethodTweener<class_MethodTweener>` **set_ease** **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** +:ref:`MethodTweener<class_MethodTweener>` **set_ease**\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) :ref:`🔗<class_MethodTweener_method_set_ease>` Sets the type of used easing from :ref:`EaseType<enum_Tween_EaseType>`. If not set, the default easing is used from the :ref:`Tween<class_Tween>` that contains this Tweener. @@ -76,7 +78,7 @@ Sets the type of used easing from :ref:`EaseType<enum_Tween_EaseType>`. If not s .. rst-class:: classref-method -:ref:`MethodTweener<class_MethodTweener>` **set_trans** **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** +:ref:`MethodTweener<class_MethodTweener>` **set_trans**\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) :ref:`🔗<class_MethodTweener_method_set_trans>` Sets the type of used transition from :ref:`TransitionType<enum_Tween_TransitionType>`. If not set, the default transition is used from the :ref:`Tween<class_Tween>` that contains this Tweener. @@ -87,3 +89,4 @@ Sets the type of used transition from :ref:`TransitionType<enum_Tween_Transition .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_missingnode.rst b/classes/class_missingnode.rst index f1a5d9a88e5..a56c2edbc4c 100644 --- a/classes/class_missingnode.rst +++ b/classes/class_missingnode.rst @@ -19,7 +19,9 @@ An internal editor class intended for keeping the data of unrecognized nodes. Description ----------- -This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is. +This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in a scene. + +\ **Warning:** Ignore missing nodes unless you know what you are doing. Existing properties on a missing node can be freely modified in code, regardless of the type they are intended to be. .. rst-class:: classref-reftable-group @@ -32,6 +34,8 @@ Properties +-----------------------------+------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`original_class<class_MissingNode_property_original_class>` | +-----------------------------+------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`original_scene<class_MissingNode_property_original_scene>` | + +-----------------------------+------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`recording_properties<class_MissingNode_property_recording_properties>` | +-----------------------------+------------------------------------------------------------------------------+ @@ -48,33 +52,48 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **original_class** +:ref:`String<class_String>` **original_class** :ref:`🔗<class_MissingNode_property_original_class>` .. rst-class:: classref-property-setget -- void **set_original_class** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_original_class** **(** **)** +- |void| **set_original_class**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_class**\ (\ ) -Returns the name of the type this node was originally. +The name of the class this node was supposed to be (see :ref:`Object.get_class<class_Object_method_get_class>`). .. rst-class:: classref-item-separator ---- -.. _class_MissingNode_property_recording_properties: +.. _class_MissingNode_property_original_scene: .. rst-class:: classref-property -:ref:`bool<class_bool>` **recording_properties** +:ref:`String<class_String>` **original_scene** :ref:`🔗<class_MissingNode_property_original_scene>` .. rst-class:: classref-property-setget -- void **set_recording_properties** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_recording_properties** **(** **)** +- |void| **set_original_scene**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_scene**\ (\ ) + +Returns the path of the scene this node was instance of originally. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MissingNode_property_recording_properties: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **recording_properties** :ref:`🔗<class_MissingNode_property_recording_properties>` + +.. rst-class:: classref-property-setget -.. container:: contribute +- |void| **set_recording_properties**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_recording_properties**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, allows new properties to be set along with existing ones. If ``false``, only existing properties' values can be set, and new properties cannot be added. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -83,3 +102,4 @@ Returns the name of the type this node was originally. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_missingresource.rst b/classes/class_missingresource.rst index 3e39850411a..6037d41037e 100644 --- a/classes/class_missingresource.rst +++ b/classes/class_missingresource.rst @@ -19,7 +19,9 @@ An internal editor class intended for keeping the data of unrecognized resources Description ----------- -This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in the scene. Ignore it if you don't know what it is. +This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in a scene. + +\ **Warning:** Ignore missing resources unless you know what you are doing. Existing properties on a missing resource can be freely modified in code, regardless of the type they are intended to be. .. rst-class:: classref-reftable-group @@ -48,14 +50,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **original_class** +:ref:`String<class_String>` **original_class** :ref:`🔗<class_MissingResource_property_original_class>` .. rst-class:: classref-property-setget -- void **set_original_class** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_original_class** **(** **)** +- |void| **set_original_class**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_original_class**\ (\ ) -Returns the name of the class this resource was originally. +The name of the class this resource was supposed to be (see :ref:`Object.get_class<class_Object_method_get_class>`). .. rst-class:: classref-item-separator @@ -65,16 +67,14 @@ Returns the name of the class this resource was originally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **recording_properties** +:ref:`bool<class_bool>` **recording_properties** :ref:`🔗<class_MissingResource_property_recording_properties>` .. rst-class:: classref-property-setget -- void **set_recording_properties** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_recording_properties** **(** **)** - -.. container:: contribute +- |void| **set_recording_properties**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_recording_properties**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true``, allows new properties to be added on top of the existing ones with :ref:`Object.set<class_Object_method_set>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -83,3 +83,4 @@ Returns the name of the class this resource was originally. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_mobilevrinterface.rst b/classes/class_mobilevrinterface.rst index b1324bbb504..14b69591f74 100644 --- a/classes/class_mobilevrinterface.rst +++ b/classes/class_mobilevrinterface.rst @@ -52,8 +52,14 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`k2<class_MobileVRInterface_property_k2>` | ``0.215`` | +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`offset_rect<class_MobileVRInterface_property_offset_rect>` | ``Rect2(0, 0, 1, 1)`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`oversample<class_MobileVRInterface_property_oversample>` | ``1.5`` | +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`vrs_min_radius<class_MobileVRInterface_property_vrs_min_radius>` | ``20.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`vrs_strength<class_MobileVRInterface_property_vrs_strength>` | ``1.0`` | + +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ | :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` | xr_play_area_mode | ``1`` (overrides :ref:`XRInterface<class_XRInterface_property_xr_play_area_mode>`) | +----------------------------------------------------+--------------------------------------------------------------------------+------------------------------------------------------------------------------------+ @@ -70,12 +76,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **display_to_lens** = ``4.0`` +:ref:`float<class_float>` **display_to_lens** = ``4.0`` :ref:`🔗<class_MobileVRInterface_property_display_to_lens>` .. rst-class:: classref-property-setget -- void **set_display_to_lens** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_display_to_lens** **(** **)** +- |void| **set_display_to_lens**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_display_to_lens**\ (\ ) The distance between the display and the lenses inside of the device in centimeters. @@ -87,12 +93,12 @@ The distance between the display and the lenses inside of the device in centimet .. rst-class:: classref-property -:ref:`float<class_float>` **display_width** = ``14.5`` +:ref:`float<class_float>` **display_width** = ``14.5`` :ref:`🔗<class_MobileVRInterface_property_display_width>` .. rst-class:: classref-property-setget -- void **set_display_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_display_width** **(** **)** +- |void| **set_display_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_display_width**\ (\ ) The width of the display in centimeters. @@ -104,12 +110,12 @@ The width of the display in centimeters. .. rst-class:: classref-property -:ref:`float<class_float>` **eye_height** = ``1.85`` +:ref:`float<class_float>` **eye_height** = ``1.85`` :ref:`🔗<class_MobileVRInterface_property_eye_height>` .. rst-class:: classref-property-setget -- void **set_eye_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_eye_height** **(** **)** +- |void| **set_eye_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_eye_height**\ (\ ) The height at which the camera is placed in relation to the ground (i.e. :ref:`XROrigin3D<class_XROrigin3D>` node). @@ -121,12 +127,12 @@ The height at which the camera is placed in relation to the ground (i.e. :ref:`X .. rst-class:: classref-property -:ref:`float<class_float>` **iod** = ``6.0`` +:ref:`float<class_float>` **iod** = ``6.0`` :ref:`🔗<class_MobileVRInterface_property_iod>` .. rst-class:: classref-property-setget -- void **set_iod** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_iod** **(** **)** +- |void| **set_iod**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_iod**\ (\ ) The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye. @@ -138,12 +144,12 @@ The interocular distance, also known as the interpupillary distance. The distanc .. rst-class:: classref-property -:ref:`float<class_float>` **k1** = ``0.215`` +:ref:`float<class_float>` **k1** = ``0.215`` :ref:`🔗<class_MobileVRInterface_property_k1>` .. rst-class:: classref-property-setget -- void **set_k1** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_k1** **(** **)** +- |void| **set_k1**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_k1**\ (\ ) The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect. @@ -155,12 +161,12 @@ The k1 lens factor is one of the two constants that define the strength of the l .. rst-class:: classref-property -:ref:`float<class_float>` **k2** = ``0.215`` +:ref:`float<class_float>` **k2** = ``0.215`` :ref:`🔗<class_MobileVRInterface_property_k2>` .. rst-class:: classref-property-setget -- void **set_k2** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_k2** **(** **)** +- |void| **set_k2**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_k2**\ (\ ) The k2 lens factor, see k1. @@ -168,19 +174,74 @@ The k2 lens factor, see k1. ---- +.. _class_MobileVRInterface_property_offset_rect: + +.. rst-class:: classref-property + +:ref:`Rect2<class_Rect2>` **offset_rect** = ``Rect2(0, 0, 1, 1)`` :ref:`🔗<class_MobileVRInterface_property_offset_rect>` + +.. rst-class:: classref-property-setget + +- |void| **set_offset_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_offset_rect**\ (\ ) + +Set the offset rect relative to the area being rendered. A length of 1 represents the whole rendering area on that axis. + +.. rst-class:: classref-item-separator + +---- + .. _class_MobileVRInterface_property_oversample: .. rst-class:: classref-property -:ref:`float<class_float>` **oversample** = ``1.5`` +:ref:`float<class_float>` **oversample** = ``1.5`` :ref:`🔗<class_MobileVRInterface_property_oversample>` .. rst-class:: classref-property-setget -- void **set_oversample** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_oversample** **(** **)** +- |void| **set_oversample**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_oversample**\ (\ ) The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance. +.. rst-class:: classref-item-separator + +---- + +.. _class_MobileVRInterface_property_vrs_min_radius: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **vrs_min_radius** = ``20.0`` :ref:`🔗<class_MobileVRInterface_property_vrs_min_radius>` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_min_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vrs_min_radius**\ (\ ) + +The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + +\ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MobileVRInterface_property_vrs_strength: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **vrs_strength** = ``1.0`` :ref:`🔗<class_MobileVRInterface_property_vrs_strength>` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vrs_strength**\ (\ ) + +The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + +\ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -188,3 +249,4 @@ The oversample setting. Because of the lens distortion we have to render our buf .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_moviewriter.rst b/classes/class_moviewriter.rst index bcde643e217..62b318c730e 100644 --- a/classes/class_moviewriter.rst +++ b/classes/class_moviewriter.rst @@ -19,7 +19,7 @@ Abstract class for non-real-time video recording encoders. Description ----------- -Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process<class_Node_method__process>` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. +Godot can record videos with non-real-time simulation. Like the ``--fixed-fps`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, this forces the reported ``delta`` in :ref:`Node._process<class_Node_private_method__process>` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. Godot has 2 built-in **MovieWriter**\ s: @@ -29,7 +29,7 @@ Godot has 2 built-in **MovieWriter**\ s: If you need to encode to a different format or pipe a stream through third-party software, you can extend the **MovieWriter** class to create your own movie writers. This should typically be done using GDExtension for performance reasons. -\ **Editor usage:** A default movie file path can be specified in :ref:`ProjectSettings.editor/movie_writer/movie_file<class_ProjectSettings_property_editor/movie_writer/movie_file>`. Alternatively, for running single scenes, a ``movie_path`` metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running. +\ **Editor usage:** A default movie file path can be specified in :ref:`ProjectSettings.editor/movie_writer/movie_file<class_ProjectSettings_property_editor/movie_writer/movie_file>`. Alternatively, for running single scenes, a ``movie_file`` metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running. \ **Note:** MovieWriter is available for use in both the editor and exported projects, but it is *not* designed for use by end users to record videos while playing. Players wishing to record gameplay videos should install tools such as `OBS Studio <https://obsproject.com/>`__ or `SimpleScreenRecorder <https://www.maartenbaert.be/simplescreenrecorder/>`__ instead. @@ -41,21 +41,21 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_audio_mix_rate<class_MovieWriter_method__get_audio_mix_rate>` **(** **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` | :ref:`_get_audio_speaker_mode<class_MovieWriter_method__get_audio_speaker_mode>` **(** **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles_file<class_MovieWriter_method__handles_file>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_write_begin<class_MovieWriter_method__write_begin>` **(** :ref:`Vector2i<class_Vector2i>` movie_size, :ref:`int<class_int>` fps, :ref:`String<class_String>` base_path **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_write_end<class_MovieWriter_method__write_end>` **(** **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_write_frame<class_MovieWriter_method__write_frame>` **(** :ref:`Image<class_Image>` frame_image, const void* audio_frame_block **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_writer<class_MovieWriter_method_add_writer>` **(** :ref:`MovieWriter<class_MovieWriter>` writer **)** |static| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_audio_mix_rate<class_MovieWriter_private_method__get_audio_mix_rate>`\ (\ ) |virtual| |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` | :ref:`_get_audio_speaker_mode<class_MovieWriter_private_method__get_audio_speaker_mode>`\ (\ ) |virtual| |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles_file<class_MovieWriter_private_method__handles_file>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_write_begin<class_MovieWriter_private_method__write_begin>`\ (\ movie_size\: :ref:`Vector2i<class_Vector2i>`, fps\: :ref:`int<class_int>`, base_path\: :ref:`String<class_String>`\ ) |virtual| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_write_end<class_MovieWriter_private_method__write_end>`\ (\ ) |virtual| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_write_frame<class_MovieWriter_private_method__write_frame>`\ (\ frame_image\: :ref:`Image<class_Image>`, audio_frame_block\: ``const void*``\ ) |virtual| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_writer<class_MovieWriter_method_add_writer>`\ (\ writer\: :ref:`MovieWriter<class_MovieWriter>`\ ) |static| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,37 +66,37 @@ Methods Method Descriptions ------------------- -.. _class_MovieWriter_method__get_audio_mix_rate: +.. _class_MovieWriter_private_method__get_audio_mix_rate: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_audio_mix_rate** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_audio_mix_rate**\ (\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__get_audio_mix_rate>` -Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate<class_MovieWriter_method__get_audio_mix_rate>` is not overridden. +Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if :ref:`_get_audio_mix_rate<class_MovieWriter_private_method__get_audio_mix_rate>` is not overridden. .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__get_audio_speaker_mode: +.. _class_MovieWriter_private_method__get_audio_speaker_mode: .. rst-class:: classref-method -:ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` **_get_audio_speaker_mode** **(** **)** |virtual| |const| +:ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` **_get_audio_speaker_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__get_audio_speaker_mode>` -Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO<class_AudioServer_constant_SPEAKER_MODE_STEREO>` if :ref:`_get_audio_speaker_mode<class_MovieWriter_method__get_audio_speaker_mode>` is not overridden. +Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to :ref:`AudioServer.SPEAKER_MODE_STEREO<class_AudioServer_constant_SPEAKER_MODE_STEREO>` if :ref:`_get_audio_speaker_mode<class_MovieWriter_private_method__get_audio_speaker_mode>` is not overridden. .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__handles_file: +.. _class_MovieWriter_private_method__handles_file: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles_file** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles_file**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_MovieWriter_private_method__handles_file>` -Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file<class_MovieWriter_method__handles_file>` is overridden as follows to allow the user to record a file at any path with a given file extension: +Called when the engine determines whether this **MovieWriter** is able to handle the file at ``path``. Must return ``true`` if this **MovieWriter** is able to handle the given file path, ``false`` otherwise. Typically, :ref:`_handles_file<class_MovieWriter_private_method__handles_file>` is overridden as follows to allow the user to record a file at any path with a given file extension: :: @@ -109,11 +109,11 @@ Called when the engine determines whether this **MovieWriter** is able to handle ---- -.. _class_MovieWriter_method__write_begin: +.. _class_MovieWriter_private_method__write_begin: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_write_begin** **(** :ref:`Vector2i<class_Vector2i>` movie_size, :ref:`int<class_int>` fps, :ref:`String<class_String>` base_path **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_write_begin**\ (\ movie_size\: :ref:`Vector2i<class_Vector2i>`, fps\: :ref:`int<class_int>`, base_path\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_MovieWriter_private_method__write_begin>` Called once before the engine starts writing video and audio data. ``movie_size`` is the width and height of the video to save. ``fps`` is the number of frames per second specified in the project settings or using the ``--fixed-fps <fps>`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. @@ -121,25 +121,25 @@ Called once before the engine starts writing video and audio data. ``movie_size` ---- -.. _class_MovieWriter_method__write_end: +.. _class_MovieWriter_private_method__write_end: .. rst-class:: classref-method -void **_write_end** **(** **)** |virtual| +|void| **_write_end**\ (\ ) |virtual| :ref:`🔗<class_MovieWriter_private_method__write_end>` Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when :ref:`SceneTree.quit<class_SceneTree_method_quit>` is called. -\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end<class_MovieWriter_method__write_end>` being called. +\ **Note:** Pressing :kbd:`Ctrl + C` on the terminal running the editor/project does *not* result in :ref:`_write_end<class_MovieWriter_private_method__write_end>` being called. .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__write_frame: +.. _class_MovieWriter_private_method__write_frame: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_write_frame** **(** :ref:`Image<class_Image>` frame_image, const void* audio_frame_block **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_write_frame**\ (\ frame_image\: :ref:`Image<class_Image>`, audio_frame_block\: ``const void*``\ ) |virtual| :ref:`🔗<class_MovieWriter_private_method__write_frame>` Called at the end of every rendered frame. The ``frame_image`` and ``audio_frame_block`` function arguments should be written to. @@ -151,9 +151,9 @@ Called at the end of every rendered frame. The ``frame_image`` and ``audio_frame .. rst-class:: classref-method -void **add_writer** **(** :ref:`MovieWriter<class_MovieWriter>` writer **)** |static| +|void| **add_writer**\ (\ writer\: :ref:`MovieWriter<class_MovieWriter>`\ ) |static| :ref:`🔗<class_MovieWriter_method_add_writer>` -Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file<class_MovieWriter_method__handles_file>`. +Adds a writer to be usable by the engine. The supported file extensions can be set by overriding :ref:`_handles_file<class_MovieWriter_private_method__handles_file>`. \ **Note:** :ref:`add_writer<class_MovieWriter_method_add_writer>` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. @@ -164,3 +164,4 @@ Adds a writer to be usable by the engine. The supported file extensions can be s .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multimesh.rst b/classes/class_multimesh.rst index c6db9a01c96..e212c9e387b 100644 --- a/classes/class_multimesh.rst +++ b/classes/class_multimesh.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: batch + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -36,10 +39,12 @@ Since instances may have any behavior, the AABB used for visibility must be prov Tutorials --------- -- :doc:`Animating thousands of fish with MultiMeshInstance <../tutorials/performance/vertex_animation/animating_thousands_of_fish>` +- :doc:`Using MultiMeshInstance <../tutorials/3d/using_multi_mesh_instance>` - :doc:`Optimization using MultiMeshes <../tutorials/performance/using_multimesh>` +- :doc:`Animating thousands of fish with MultiMeshInstance <../tutorials/performance/vertex_animation/animating_thousands_of_fish>` + .. rst-class:: classref-reftable-group Properties @@ -48,29 +53,31 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`buffer<class_MultiMesh_property_buffer>` | ``PackedFloat32Array()`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`color_array<class_MultiMesh_property_color_array>` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`custom_data_array<class_MultiMesh_property_custom_data_array>` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`instance_count<class_MultiMesh_property_instance_count>` | ``0`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_MultiMesh_property_mesh>` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`transform_2d_array<class_MultiMesh_property_transform_2d_array>` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`transform_array<class_MultiMesh_property_transform_array>` | | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`TransformFormat<enum_MultiMesh_TransformFormat>` | :ref:`transform_format<class_MultiMesh_property_transform_format>` | ``0`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_colors<class_MultiMesh_property_use_colors>` | ``false`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_custom_data<class_MultiMesh_property_use_custom_data>` | ``false`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`visible_instance_count<class_MultiMesh_property_visible_instance_count>` | ``-1`` | - +--------------------------------------------------------+--------------------------------------------------------------------------------+--------------------------+ + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`buffer<class_MultiMesh_property_buffer>` | ``PackedFloat32Array()`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`color_array<class_MultiMesh_property_color_array>` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`custom_aabb<class_MultiMesh_property_custom_aabb>` | ``AABB(0, 0, 0, 0, 0, 0)`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`custom_data_array<class_MultiMesh_property_custom_data_array>` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`int<class_int>` | :ref:`instance_count<class_MultiMesh_property_instance_count>` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`Mesh<class_Mesh>` | :ref:`mesh<class_MultiMesh_property_mesh>` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`transform_2d_array<class_MultiMesh_property_transform_2d_array>` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`transform_array<class_MultiMesh_property_transform_array>` | | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`TransformFormat<enum_MultiMesh_TransformFormat>` | :ref:`transform_format<class_MultiMesh_property_transform_format>` | ``0`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_colors<class_MultiMesh_property_use_colors>` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_custom_data<class_MultiMesh_property_use_custom_data>` | ``false`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ + | :ref:`int<class_int>` | :ref:`visible_instance_count<class_MultiMesh_property_visible_instance_count>` | ``-1`` | + +--------------------------------------------------------+--------------------------------------------------------------------------------+----------------------------+ .. rst-class:: classref-reftable-group @@ -80,25 +87,25 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_MultiMesh_method_get_aabb>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_instance_color<class_MultiMesh_method_get_instance_color>` **(** :ref:`int<class_int>` instance **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_instance_custom_data<class_MultiMesh_method_get_instance_custom_data>` **(** :ref:`int<class_int>` instance **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_instance_transform<class_MultiMesh_method_get_instance_transform>` **(** :ref:`int<class_int>` instance **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_instance_transform_2d<class_MultiMesh_method_get_instance_transform_2d>` **(** :ref:`int<class_int>` instance **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>` **(** :ref:`int<class_int>` instance, :ref:`Color<class_Color>` color **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>` **(** :ref:`int<class_int>` instance, :ref:`Color<class_Color>` custom_data **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_instance_transform<class_MultiMesh_method_set_instance_transform>` **(** :ref:`int<class_int>` instance, :ref:`Transform3D<class_Transform3D>` transform **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_instance_transform_2d<class_MultiMesh_method_set_instance_transform_2d>` **(** :ref:`int<class_int>` instance, :ref:`Transform2D<class_Transform2D>` transform **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_MultiMesh_method_get_aabb>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_instance_color<class_MultiMesh_method_get_instance_color>`\ (\ instance\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_instance_custom_data<class_MultiMesh_method_get_instance_custom_data>`\ (\ instance\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_instance_transform<class_MultiMesh_method_get_instance_transform>`\ (\ instance\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_instance_transform_2d<class_MultiMesh_method_get_instance_transform_2d>`\ (\ instance\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>`\ (\ instance\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>`\ (\ instance\: :ref:`int<class_int>`, custom_data\: :ref:`Color<class_Color>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_transform<class_MultiMesh_method_set_instance_transform>`\ (\ instance\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_transform_2d<class_MultiMesh_method_set_instance_transform_2d>`\ (\ instance\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -113,7 +120,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TransformFormat**: +enum **TransformFormat**: :ref:`🔗<enum_MultiMesh_TransformFormat>` .. _class_MultiMesh_constant_TRANSFORM_2D: @@ -144,12 +151,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **buffer** = ``PackedFloat32Array()`` +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **buffer** = ``PackedFloat32Array()`` :ref:`🔗<class_MultiMesh_property_buffer>` .. rst-class:: classref-property-setget -- void **set_buffer** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` value **)** -- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_buffer** **(** **)** +- |void| **set_buffer**\ (\ value\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) +- :ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_buffer**\ (\ ) .. container:: contribute @@ -163,9 +170,30 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedColorArray<class_PackedColorArray>` **color_array** +:ref:`PackedColorArray<class_PackedColorArray>` **color_array** :ref:`🔗<class_MultiMesh_property_color_array>` + +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>` and :ref:`get_instance_color<class_MultiMesh_method_get_instance_color>` instead. + +Array containing each :ref:`Color<class_Color>` used by all instances of this mesh. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray<class_PackedColorArray>` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_MultiMesh_property_custom_aabb: + +.. rst-class:: classref-property + +:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_MultiMesh_property_custom_aabb>` + +.. rst-class:: classref-property-setget + +- |void| **set_custom_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_custom_aabb**\ (\ ) -See :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>`. +Custom AABB for this MultiMesh resource. Setting this manually prevents costly runtime AABB recalculations. .. rst-class:: classref-item-separator @@ -175,9 +203,13 @@ See :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>`. .. rst-class:: classref-property -:ref:`PackedColorArray<class_PackedColorArray>` **custom_data_array** +:ref:`PackedColorArray<class_PackedColorArray>` **custom_data_array** :ref:`🔗<class_MultiMesh_property_custom_data_array>` -See :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>`. +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>` and :ref:`get_instance_custom_data<class_MultiMesh_method_get_instance_custom_data>` instead. + +Array containing each custom data value used by all instances of this mesh, as a :ref:`PackedColorArray<class_PackedColorArray>`. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray<class_PackedColorArray>` for more details. .. rst-class:: classref-item-separator @@ -187,12 +219,12 @@ See :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_da .. rst-class:: classref-property -:ref:`int<class_int>` **instance_count** = ``0`` +:ref:`int<class_int>` **instance_count** = ``0`` :ref:`🔗<class_MultiMesh_property_instance_count>` .. rst-class:: classref-property-setget -- void **set_instance_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_instance_count** **(** **)** +- |void| **set_instance_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_instance_count**\ (\ ) Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect. @@ -206,12 +238,12 @@ By default, all instances are drawn but you can limit this with :ref:`visible_in .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **mesh** +:ref:`Mesh<class_Mesh>` **mesh** :ref:`🔗<class_MultiMesh_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh<class_Mesh>` value **)** -- :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_mesh**\ (\ ) :ref:`Mesh<class_Mesh>` resource to be instanced. @@ -225,9 +257,13 @@ The looks of the individual instances can be modified using :ref:`set_instance_c .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **transform_2d_array** +:ref:`PackedVector2Array<class_PackedVector2Array>` **transform_2d_array** :ref:`🔗<class_MultiMesh_property_transform_2d_array>` + +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform_2d<class_MultiMesh_method_set_instance_transform_2d>` and :ref:`get_instance_transform_2d<class_MultiMesh_method_get_instance_transform_2d>` instead. -See :ref:`set_instance_transform_2d<class_MultiMesh_method_set_instance_transform_2d>`. +Array containing each :ref:`Transform2D<class_Transform2D>` value used by all instances of this mesh, as a :ref:`PackedVector2Array<class_PackedVector2Array>`. Each transform is divided into 3 :ref:`Vector2<class_Vector2>` values corresponding to the transforms' ``x``, ``y``, and ``origin``. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. .. rst-class:: classref-item-separator @@ -237,9 +273,13 @@ See :ref:`set_instance_transform_2d<class_MultiMesh_method_set_instance_transfor .. rst-class:: classref-property -:ref:`PackedVector3Array<class_PackedVector3Array>` **transform_array** +:ref:`PackedVector3Array<class_PackedVector3Array>` **transform_array** :ref:`🔗<class_MultiMesh_property_transform_array>` + +**Deprecated:** Accessing this property is very slow. Use :ref:`set_instance_transform<class_MultiMesh_method_set_instance_transform>` and :ref:`get_instance_transform<class_MultiMesh_method_get_instance_transform>` instead. + +Array containing each :ref:`Transform3D<class_Transform3D>` value used by all instances of this mesh, as a :ref:`PackedVector3Array<class_PackedVector3Array>`. Each transform is divided into 4 :ref:`Vector3<class_Vector3>` values corresponding to the transforms' ``x``, ``y``, ``z``, and ``origin``. -See :ref:`set_instance_transform<class_MultiMesh_method_set_instance_transform>`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array<class_PackedVector3Array>` for more details. .. rst-class:: classref-item-separator @@ -249,12 +289,12 @@ See :ref:`set_instance_transform<class_MultiMesh_method_set_instance_transform>` .. rst-class:: classref-property -:ref:`TransformFormat<enum_MultiMesh_TransformFormat>` **transform_format** = ``0`` +:ref:`TransformFormat<enum_MultiMesh_TransformFormat>` **transform_format** = ``0`` :ref:`🔗<class_MultiMesh_property_transform_format>` .. rst-class:: classref-property-setget -- void **set_transform_format** **(** :ref:`TransformFormat<enum_MultiMesh_TransformFormat>` value **)** -- :ref:`TransformFormat<enum_MultiMesh_TransformFormat>` **get_transform_format** **(** **)** +- |void| **set_transform_format**\ (\ value\: :ref:`TransformFormat<enum_MultiMesh_TransformFormat>`\ ) +- :ref:`TransformFormat<enum_MultiMesh_TransformFormat>` **get_transform_format**\ (\ ) Format of transform used to transform mesh, either 2D or 3D. @@ -266,12 +306,12 @@ Format of transform used to transform mesh, either 2D or 3D. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_colors** = ``false`` +:ref:`bool<class_bool>` **use_colors** = ``false`` :ref:`🔗<class_MultiMesh_property_use_colors>` .. rst-class:: classref-property-setget -- void **set_use_colors** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_colors** **(** **)** +- |void| **set_use_colors**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_colors**\ (\ ) If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color<class_MultiMesh_method_set_instance_color>`). Can only be set when :ref:`instance_count<class_MultiMesh_property_instance_count>` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. @@ -283,12 +323,12 @@ If ``true``, the **MultiMesh** will use color data (see :ref:`set_instance_color .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_custom_data** = ``false`` +:ref:`bool<class_bool>` **use_custom_data** = ``false`` :ref:`🔗<class_MultiMesh_property_use_custom_data>` .. rst-class:: classref-property-setget -- void **set_use_custom_data** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_custom_data** **(** **)** +- |void| **set_use_custom_data**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_custom_data**\ (\ ) If ``true``, the **MultiMesh** will use custom data (see :ref:`set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>`). Can only be set when :ref:`instance_count<class_MultiMesh_property_instance_count>` is ``0`` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to ``0``. @@ -300,12 +340,12 @@ If ``true``, the **MultiMesh** will use custom data (see :ref:`set_instance_cust .. rst-class:: classref-property -:ref:`int<class_int>` **visible_instance_count** = ``-1`` +:ref:`int<class_int>` **visible_instance_count** = ``-1`` :ref:`🔗<class_MultiMesh_property_visible_instance_count>` .. rst-class:: classref-property-setget -- void **set_visible_instance_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_visible_instance_count** **(** **)** +- |void| **set_visible_instance_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_visible_instance_count**\ (\ ) Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. @@ -322,7 +362,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **get_aabb** **(** **)** |const| +:ref:`AABB<class_AABB>` **get_aabb**\ (\ ) |const| :ref:`🔗<class_MultiMesh_method_get_aabb>` Returns the visibility axis-aligned bounding box in local space. @@ -334,7 +374,7 @@ Returns the visibility axis-aligned bounding box in local space. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_instance_color** **(** :ref:`int<class_int>` instance **)** |const| +:ref:`Color<class_Color>` **get_instance_color**\ (\ instance\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiMesh_method_get_instance_color>` Gets a specific instance's color multiplier. @@ -346,7 +386,7 @@ Gets a specific instance's color multiplier. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_instance_custom_data** **(** :ref:`int<class_int>` instance **)** |const| +:ref:`Color<class_Color>` **get_instance_custom_data**\ (\ instance\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiMesh_method_get_instance_custom_data>` Returns the custom data that has been set for a specific instance. @@ -358,7 +398,7 @@ Returns the custom data that has been set for a specific instance. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_instance_transform** **(** :ref:`int<class_int>` instance **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_instance_transform**\ (\ instance\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiMesh_method_get_instance_transform>` Returns the :ref:`Transform3D<class_Transform3D>` of a specific instance. @@ -370,7 +410,7 @@ Returns the :ref:`Transform3D<class_Transform3D>` of a specific instance. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_instance_transform_2d** **(** :ref:`int<class_int>` instance **)** |const| +:ref:`Transform2D<class_Transform2D>` **get_instance_transform_2d**\ (\ instance\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiMesh_method_get_instance_transform_2d>` Returns the :ref:`Transform2D<class_Transform2D>` of a specific instance. @@ -382,7 +422,7 @@ Returns the :ref:`Transform2D<class_Transform2D>` of a specific instance. .. rst-class:: classref-method -void **set_instance_color** **(** :ref:`int<class_int>` instance, :ref:`Color<class_Color>` color **)** +|void| **set_instance_color**\ (\ instance\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_MultiMesh_method_set_instance_color>` Sets the color of a specific instance by *multiplying* the mesh's existing vertex colors. This allows for different color tinting per instance. @@ -396,9 +436,9 @@ For the color to take effect, ensure that :ref:`use_colors<class_MultiMesh_prope .. rst-class:: classref-method -void **set_instance_custom_data** **(** :ref:`int<class_int>` instance, :ref:`Color<class_Color>` custom_data **)** +|void| **set_instance_custom_data**\ (\ instance\: :ref:`int<class_int>`, custom_data\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_MultiMesh_method_set_instance_custom_data>` -Sets custom data for a specific instance. Although :ref:`Color<class_Color>` is used, it is just a container for 4 floating point numbers. +Sets custom data for a specific instance. ``custom_data`` is a :ref:`Color<class_Color>` type only to contain 4 floating-point numbers. For the custom data to be used, ensure that :ref:`use_custom_data<class_MultiMesh_property_use_custom_data>` is ``true``. @@ -412,7 +452,7 @@ This custom instance data has to be manually accessed in your custom shader usin .. rst-class:: classref-method -void **set_instance_transform** **(** :ref:`int<class_int>` instance, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **set_instance_transform**\ (\ instance\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_MultiMesh_method_set_instance_transform>` Sets the :ref:`Transform3D<class_Transform3D>` for a specific instance. @@ -424,7 +464,7 @@ Sets the :ref:`Transform3D<class_Transform3D>` for a specific instance. .. rst-class:: classref-method -void **set_instance_transform_2d** **(** :ref:`int<class_int>` instance, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **set_instance_transform_2d**\ (\ instance\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_MultiMesh_method_set_instance_transform_2d>` Sets the :ref:`Transform2D<class_Transform2D>` for a specific instance. @@ -435,3 +475,4 @@ Sets the :ref:`Transform2D<class_Transform2D>` for a specific instance. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multimeshinstance2d.rst b/classes/class_multimeshinstance2d.rst index e30a8c4cce5..9e29da8416c 100644 --- a/classes/class_multimeshinstance2d.rst +++ b/classes/class_multimeshinstance2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: batch + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -50,7 +53,7 @@ Signals .. rst-class:: classref-signal -**texture_changed** **(** **)** +**texture_changed**\ (\ ) :ref:`🔗<class_MultiMeshInstance2D_signal_texture_changed>` Emitted when the :ref:`texture<class_MultiMeshInstance2D_property_texture>` is changed. @@ -67,12 +70,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`MultiMesh<class_MultiMesh>` **multimesh** +:ref:`MultiMesh<class_MultiMesh>` **multimesh** :ref:`🔗<class_MultiMeshInstance2D_property_multimesh>` .. rst-class:: classref-property-setget -- void **set_multimesh** **(** :ref:`MultiMesh<class_MultiMesh>` value **)** -- :ref:`MultiMesh<class_MultiMesh>` **get_multimesh** **(** **)** +- |void| **set_multimesh**\ (\ value\: :ref:`MultiMesh<class_MultiMesh>`\ ) +- :ref:`MultiMesh<class_MultiMesh>` **get_multimesh**\ (\ ) The :ref:`MultiMesh<class_MultiMesh>` that will be drawn by the **MultiMeshInstance2D**. @@ -84,12 +87,12 @@ The :ref:`MultiMesh<class_MultiMesh>` that will be drawn by the **MultiMeshInsta .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_MultiMeshInstance2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The :ref:`Texture2D<class_Texture2D>` that will be used if using the default :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`. Can be accessed as ``TEXTURE`` in CanvasItem shader. @@ -100,3 +103,4 @@ The :ref:`Texture2D<class_Texture2D>` that will be used if using the default :re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multimeshinstance3d.rst b/classes/class_multimeshinstance3d.rst index 34e6844d273..1484ec4102c 100644 --- a/classes/class_multimeshinstance3d.rst +++ b/classes/class_multimeshinstance3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: batch + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -28,12 +31,12 @@ This is useful to optimize the rendering of a high number of instances of a give Tutorials --------- -- :doc:`Animating thousands of fish with MultiMeshInstance <../tutorials/performance/vertex_animation/animating_thousands_of_fish>` - - :doc:`Using MultiMeshInstance <../tutorials/3d/using_multi_mesh_instance>` - :doc:`Optimization using MultiMeshes <../tutorials/performance/using_multimesh>` +- :doc:`Animating thousands of fish with MultiMeshInstance <../tutorials/performance/vertex_animation/animating_thousands_of_fish>` + .. rst-class:: classref-reftable-group Properties @@ -59,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`MultiMesh<class_MultiMesh>` **multimesh** +:ref:`MultiMesh<class_MultiMesh>` **multimesh** :ref:`🔗<class_MultiMeshInstance3D_property_multimesh>` .. rst-class:: classref-property-setget -- void **set_multimesh** **(** :ref:`MultiMesh<class_MultiMesh>` value **)** -- :ref:`MultiMesh<class_MultiMesh>` **get_multimesh** **(** **)** +- |void| **set_multimesh**\ (\ value\: :ref:`MultiMesh<class_MultiMesh>`\ ) +- :ref:`MultiMesh<class_MultiMesh>` **get_multimesh**\ (\ ) The :ref:`MultiMesh<class_MultiMesh>` resource that will be used and shared among all instances of the **MultiMeshInstance3D**. @@ -75,3 +78,4 @@ The :ref:`MultiMesh<class_MultiMesh>` resource that will be used and shared amon .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayerapi.rst b/classes/class_multiplayerapi.rst index 850a9eba07a..69bb3c49801 100644 --- a/classes/class_multiplayerapi.rst +++ b/classes/class_multiplayerapi.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -49,31 +52,31 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`create_default_interface<class_MultiplayerAPI_method_create_default_interface>` **(** **)** |static| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_default_interface<class_MultiplayerAPI_method_get_default_interface>` **(** **)** |static| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_peers<class_MultiplayerAPI_method_get_peers>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_remote_sender_id<class_MultiplayerAPI_method_get_remote_sender_id>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_unique_id<class_MultiplayerAPI_method_get_unique_id>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_multiplayer_peer<class_MultiplayerAPI_method_has_multiplayer_peer>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_server<class_MultiplayerAPI_method_is_server>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`object_configuration_add<class_MultiplayerAPI_method_object_configuration_add>` **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`object_configuration_remove<class_MultiplayerAPI_method_object_configuration_remove>` **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_MultiplayerAPI_method_poll>` **(** **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_MultiplayerAPI_method_rpc>` **(** :ref:`int<class_int>` peer, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` arguments=[] **)** | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_interface<class_MultiplayerAPI_method_set_default_interface>` **(** :ref:`StringName<class_StringName>` interface_name **)** |static| | - +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`create_default_interface<class_MultiplayerAPI_method_create_default_interface>`\ (\ ) |static| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_default_interface<class_MultiplayerAPI_method_get_default_interface>`\ (\ ) |static| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_peers<class_MultiplayerAPI_method_get_peers>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_remote_sender_id<class_MultiplayerAPI_method_get_remote_sender_id>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_unique_id<class_MultiplayerAPI_method_get_unique_id>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_multiplayer_peer<class_MultiplayerAPI_method_has_multiplayer_peer>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_server<class_MultiplayerAPI_method_is_server>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`object_configuration_add<class_MultiplayerAPI_method_object_configuration_add>`\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`object_configuration_remove<class_MultiplayerAPI_method_object_configuration_remove>`\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_MultiplayerAPI_method_poll>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_MultiplayerAPI_method_rpc>`\ (\ peer\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, arguments\: :ref:`Array<class_Array>` = []\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_interface<class_MultiplayerAPI_method_set_default_interface>`\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) |static| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,7 +91,7 @@ Signals .. rst-class:: classref-signal -**connected_to_server** **(** **)** +**connected_to_server**\ (\ ) :ref:`🔗<class_MultiplayerAPI_signal_connected_to_server>` Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` successfully connected to a server. Only emitted on clients. @@ -100,7 +103,7 @@ Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_p .. rst-class:: classref-signal -**connection_failed** **(** **)** +**connection_failed**\ (\ ) :ref:`🔗<class_MultiplayerAPI_signal_connection_failed>` Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` fails to establish a connection to a server. Only emitted on clients. @@ -112,7 +115,7 @@ Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_p .. rst-class:: classref-signal -**peer_connected** **(** :ref:`int<class_int>` id **)** +**peer_connected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerAPI_signal_peer_connected>` Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). @@ -124,7 +127,7 @@ Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_p .. rst-class:: classref-signal -**peer_disconnected** **(** :ref:`int<class_int>` id **)** +**peer_disconnected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerAPI_signal_peer_disconnected>` Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` disconnects from a peer. Clients get notified when other clients disconnect from the same server. @@ -136,7 +139,7 @@ Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_p .. rst-class:: classref-signal -**server_disconnected** **(** **)** +**server_disconnected**\ (\ ) :ref:`🔗<class_MultiplayerAPI_signal_server_disconnected>` Emitted when this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` disconnects from server. Only emitted on clients. @@ -153,7 +156,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **RPCMode**: +enum **RPCMode**: :ref:`🔗<enum_MultiplayerAPI_RPCMode>` .. _class_MultiplayerAPI_constant_RPC_MODE_DISABLED: @@ -192,12 +195,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`MultiplayerPeer<class_MultiplayerPeer>` **multiplayer_peer** +:ref:`MultiplayerPeer<class_MultiplayerPeer>` **multiplayer_peer** :ref:`🔗<class_MultiplayerAPI_property_multiplayer_peer>` .. rst-class:: classref-property-setget -- void **set_multiplayer_peer** **(** :ref:`MultiplayerPeer<class_MultiplayerPeer>` value **)** -- :ref:`MultiplayerPeer<class_MultiplayerPeer>` **get_multiplayer_peer** **(** **)** +- |void| **set_multiplayer_peer**\ (\ value\: :ref:`MultiplayerPeer<class_MultiplayerPeer>`\ ) +- :ref:`MultiplayerPeer<class_MultiplayerPeer>` **get_multiplayer_peer**\ (\ ) 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 :ref:`is_server<class_MultiplayerAPI_method_is_server>`) and will set root node's network mode to authority, or it will become a regular client peer. 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. @@ -214,7 +217,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`MultiplayerAPI<class_MultiplayerAPI>` **create_default_interface** **(** **)** |static| +:ref:`MultiplayerAPI<class_MultiplayerAPI>` **create_default_interface**\ (\ ) |static| :ref:`🔗<class_MultiplayerAPI_method_create_default_interface>` Returns a new instance of the default MultiplayerAPI. @@ -226,7 +229,7 @@ Returns a new instance of the default MultiplayerAPI. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_default_interface** **(** **)** |static| +:ref:`StringName<class_StringName>` **get_default_interface**\ (\ ) |static| :ref:`🔗<class_MultiplayerAPI_method_get_default_interface>` Returns the default MultiplayerAPI implementation class name. This is usually ``"SceneMultiplayer"`` when :ref:`SceneMultiplayer<class_SceneMultiplayer>` is available. See :ref:`set_default_interface<class_MultiplayerAPI_method_set_default_interface>`. @@ -238,7 +241,7 @@ Returns the default MultiplayerAPI implementation class name. This is usually `` .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_peers** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_peers**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_get_peers>` Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>`. @@ -250,11 +253,11 @@ Returns the peer IDs of all connected peers of this MultiplayerAPI's :ref:`multi .. rst-class:: classref-method -:ref:`int<class_int>` **get_remote_sender_id** **(** **)** +:ref:`int<class_int>` **get_remote_sender_id**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_get_remote_sender_id>` Returns the sender's peer ID for the RPC currently being executed. -\ **Note:** If not inside an RPC this method will return 0. +\ **Note:** This method returns ``0`` when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's ``await`` keyword). .. rst-class:: classref-item-separator @@ -264,7 +267,7 @@ Returns the sender's peer ID for the RPC currently being executed. .. rst-class:: classref-method -:ref:`int<class_int>` **get_unique_id** **(** **)** +:ref:`int<class_int>` **get_unique_id**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_get_unique_id>` Returns the unique peer ID of this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>`. @@ -276,7 +279,7 @@ Returns the unique peer ID of this MultiplayerAPI's :ref:`multiplayer_peer<class .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_multiplayer_peer** **(** **)** +:ref:`bool<class_bool>` **has_multiplayer_peer**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_has_multiplayer_peer>` Returns ``true`` if there is a :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` set. @@ -288,7 +291,7 @@ Returns ``true`` if there is a :ref:`multiplayer_peer<class_MultiplayerAPI_prope .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_server** **(** **)** +:ref:`bool<class_bool>` **is_server**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_is_server>` Returns ``true`` if this MultiplayerAPI's :ref:`multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` is valid and in server mode (listening for connections). @@ -300,7 +303,7 @@ Returns ``true`` if this MultiplayerAPI's :ref:`multiplayer_peer<class_Multiplay .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **object_configuration_add** **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** +:ref:`Error<enum_@GlobalScope_Error>` **object_configuration_add**\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_MultiplayerAPI_method_object_configuration_add>` Notifies the MultiplayerAPI of a new ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree<class_SceneTree>` to configure the root path for this MultiplayerAPI (passing ``null`` and a valid :ref:`NodePath<class_NodePath>` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer<class_SceneMultiplayer>`) for details on how they use it. @@ -314,7 +317,7 @@ Notifies the MultiplayerAPI of a new ``configuration`` for the given ``object``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **object_configuration_remove** **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** +:ref:`Error<enum_@GlobalScope_Error>` **object_configuration_remove**\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_MultiplayerAPI_method_object_configuration_remove>` Notifies the MultiplayerAPI to remove a ``configuration`` for the given ``object``. This method is used internally by :ref:`SceneTree<class_SceneTree>` to configure the root path for this MultiplayerAPI (passing ``null`` and an empty :ref:`NodePath<class_NodePath>` as ``configuration``). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. :ref:`SceneMultiplayer<class_SceneMultiplayer>`) for details on how they use it. @@ -328,7 +331,7 @@ Notifies the MultiplayerAPI to remove a ``configuration`` for the given ``object .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_MultiplayerAPI_method_poll>` Method used for polling the MultiplayerAPI. You only need to worry about this if you set :ref:`SceneTree.multiplayer_poll<class_SceneTree_property_multiplayer_poll>` to ``false``. By default, :ref:`SceneTree<class_SceneTree>` will poll its MultiplayerAPI(s) for you. @@ -342,7 +345,7 @@ Method used for polling the MultiplayerAPI. You only need to worry about this if .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **rpc** **(** :ref:`int<class_int>` peer, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` arguments=[] **)** +:ref:`Error<enum_@GlobalScope_Error>` **rpc**\ (\ peer\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, arguments\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_MultiplayerAPI_method_rpc>` Sends an RPC to the target ``peer``. The given ``method`` will be called on the remote ``object`` with the provided ``arguments``. The RPC may also be called locally depending on the implementation and RPC configuration. See :ref:`Node.rpc<class_Node_method_rpc>` and :ref:`Node.rpc_config<class_Node_method_rpc_config>`. @@ -356,7 +359,7 @@ Sends an RPC to the target ``peer``. The given ``method`` will be called on the .. rst-class:: classref-method -void **set_default_interface** **(** :ref:`StringName<class_StringName>` interface_name **)** |static| +|void| **set_default_interface**\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) |static| :ref:`🔗<class_MultiplayerAPI_method_set_default_interface>` Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by :ref:`SceneTree<class_SceneTree>` when the engine starts. @@ -367,3 +370,4 @@ Sets the default MultiplayerAPI implementation class. This method can be used by .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayerapiextension.rst b/classes/class_multiplayerapiextension.rst index b06a29e93e6..956a065341e 100644 --- a/classes/class_multiplayerapiextension.rst +++ b/classes/class_multiplayerapiextension.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -35,7 +38,7 @@ The following example augment the default implementation (:ref:`SceneMultiplayer var base_multiplayer = SceneMultiplayer.new() func _init(): - # Just passthourgh base signals (copied to var to avoid cyclic reference) + # Just passthrough base signals (copied to var to avoid cyclic reference) var cts = connected_to_server var cf = connection_failed var pc = peer_connected @@ -45,13 +48,16 @@ The following example augment the default implementation (:ref:`SceneMultiplayer base_multiplayer.peer_connected.connect(func(id): pc.emit(id)) base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id)) + func _poll(): + return base_multiplayer.poll() + # Log RPC being made and forward it to the default multiplayer. - func _rpc(peer: int, object: Object, method: StringName, args: Array) -> int: # Error + func _rpc(peer: int, object: Object, method: StringName, args: Array) -> Error: print("Got RPC for %d: %s::%s(%s)" % [peer, object, method, args]) return base_multiplayer.rpc(peer, object, method, args) # Log configuration add. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom. - func _object_configuration_add(object, config: Variant) -> int: # Error + func _object_configuration_add(object, config: Variant) -> Error: if config is MultiplayerSynchronizer: print("Adding synchronization configuration for %s. Synchronizer: %s" % [object, config]) elif config is MultiplayerSpawner: @@ -59,7 +65,7 @@ The following example augment the default implementation (:ref:`SceneMultiplayer return base_multiplayer.object_configuration_add(object, config) # Log configuration remove. E.g. root path (nullptr, NodePath), replication (Node, Spawner|Synchronizer), custom. - func _object_configuration_remove(object, config: Variant) -> int: # Error + func _object_configuration_remove(object, config: Variant) -> Error: if config is MultiplayerSynchronizer: print("Removing synchronization configuration for %s. Synchronizer: %s" % [object, config]) elif config is MultiplayerSpawner: @@ -105,25 +111,25 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MultiplayerPeer<class_MultiplayerPeer>` | :ref:`_get_multiplayer_peer<class_MultiplayerAPIExtension_method__get_multiplayer_peer>` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_get_peer_ids<class_MultiplayerAPIExtension_method__get_peer_ids>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_remote_sender_id<class_MultiplayerAPIExtension_method__get_remote_sender_id>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_unique_id<class_MultiplayerAPIExtension_method__get_unique_id>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_object_configuration_add<class_MultiplayerAPIExtension_method__object_configuration_add>` **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_object_configuration_remove<class_MultiplayerAPIExtension_method__object_configuration_remove>` **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_MultiplayerAPIExtension_method__poll>` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_rpc<class_MultiplayerAPIExtension_method__rpc>` **(** :ref:`int<class_int>` peer, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_multiplayer_peer<class_MultiplayerAPIExtension_method__set_multiplayer_peer>` **(** :ref:`MultiplayerPeer<class_MultiplayerPeer>` multiplayer_peer **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerPeer<class_MultiplayerPeer>` | :ref:`_get_multiplayer_peer<class_MultiplayerAPIExtension_private_method__get_multiplayer_peer>`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_get_peer_ids<class_MultiplayerAPIExtension_private_method__get_peer_ids>`\ (\ ) |virtual| |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_remote_sender_id<class_MultiplayerAPIExtension_private_method__get_remote_sender_id>`\ (\ ) |virtual| |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_unique_id<class_MultiplayerAPIExtension_private_method__get_unique_id>`\ (\ ) |virtual| |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_object_configuration_add<class_MultiplayerAPIExtension_private_method__object_configuration_add>`\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_object_configuration_remove<class_MultiplayerAPIExtension_private_method__object_configuration_remove>`\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_MultiplayerAPIExtension_private_method__poll>`\ (\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_rpc<class_MultiplayerAPIExtension_private_method__rpc>`\ (\ peer\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_multiplayer_peer<class_MultiplayerAPIExtension_private_method__set_multiplayer_peer>`\ (\ multiplayer_peer\: :ref:`MultiplayerPeer<class_MultiplayerPeer>`\ ) |virtual| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -134,11 +140,11 @@ Methods Method Descriptions ------------------- -.. _class_MultiplayerAPIExtension_method__get_multiplayer_peer: +.. _class_MultiplayerAPIExtension_private_method__get_multiplayer_peer: .. rst-class:: classref-method -:ref:`MultiplayerPeer<class_MultiplayerPeer>` **_get_multiplayer_peer** **(** **)** |virtual| +:ref:`MultiplayerPeer<class_MultiplayerPeer>` **_get_multiplayer_peer**\ (\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__get_multiplayer_peer>` Called when the :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` is retrieved. @@ -146,11 +152,11 @@ Called when the :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_prope ---- -.. _class_MultiplayerAPIExtension_method__get_peer_ids: +.. _class_MultiplayerAPIExtension_private_method__get_peer_ids: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_get_peer_ids** **(** **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_get_peer_ids**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerAPIExtension_private_method__get_peer_ids>` Callback for :ref:`MultiplayerAPI.get_peers<class_MultiplayerAPI_method_get_peers>`. @@ -158,11 +164,11 @@ Callback for :ref:`MultiplayerAPI.get_peers<class_MultiplayerAPI_method_get_peer ---- -.. _class_MultiplayerAPIExtension_method__get_remote_sender_id: +.. _class_MultiplayerAPIExtension_private_method__get_remote_sender_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_remote_sender_id** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_remote_sender_id**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerAPIExtension_private_method__get_remote_sender_id>` Callback for :ref:`MultiplayerAPI.get_remote_sender_id<class_MultiplayerAPI_method_get_remote_sender_id>`. @@ -170,11 +176,11 @@ Callback for :ref:`MultiplayerAPI.get_remote_sender_id<class_MultiplayerAPI_meth ---- -.. _class_MultiplayerAPIExtension_method__get_unique_id: +.. _class_MultiplayerAPIExtension_private_method__get_unique_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_unique_id** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_unique_id**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerAPIExtension_private_method__get_unique_id>` Callback for :ref:`MultiplayerAPI.get_unique_id<class_MultiplayerAPI_method_get_unique_id>`. @@ -182,11 +188,11 @@ Callback for :ref:`MultiplayerAPI.get_unique_id<class_MultiplayerAPI_method_get_ ---- -.. _class_MultiplayerAPIExtension_method__object_configuration_add: +.. _class_MultiplayerAPIExtension_private_method__object_configuration_add: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_object_configuration_add** **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_object_configuration_add**\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__object_configuration_add>` Callback for :ref:`MultiplayerAPI.object_configuration_add<class_MultiplayerAPI_method_object_configuration_add>`. @@ -194,11 +200,11 @@ Callback for :ref:`MultiplayerAPI.object_configuration_add<class_MultiplayerAPI_ ---- -.. _class_MultiplayerAPIExtension_method__object_configuration_remove: +.. _class_MultiplayerAPIExtension_private_method__object_configuration_remove: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_object_configuration_remove** **(** :ref:`Object<class_Object>` object, :ref:`Variant<class_Variant>` configuration **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_object_configuration_remove**\ (\ object\: :ref:`Object<class_Object>`, configuration\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__object_configuration_remove>` Callback for :ref:`MultiplayerAPI.object_configuration_remove<class_MultiplayerAPI_method_object_configuration_remove>`. @@ -206,11 +212,11 @@ Callback for :ref:`MultiplayerAPI.object_configuration_remove<class_MultiplayerA ---- -.. _class_MultiplayerAPIExtension_method__poll: +.. _class_MultiplayerAPIExtension_private_method__poll: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_poll** **(** **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_poll**\ (\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__poll>` Callback for :ref:`MultiplayerAPI.poll<class_MultiplayerAPI_method_poll>`. @@ -218,11 +224,11 @@ Callback for :ref:`MultiplayerAPI.poll<class_MultiplayerAPI_method_poll>`. ---- -.. _class_MultiplayerAPIExtension_method__rpc: +.. _class_MultiplayerAPIExtension_private_method__rpc: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_rpc** **(** :ref:`int<class_int>` peer, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_rpc**\ (\ peer\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>`\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__rpc>` Callback for :ref:`MultiplayerAPI.rpc<class_MultiplayerAPI_method_rpc>`. @@ -230,11 +236,11 @@ Callback for :ref:`MultiplayerAPI.rpc<class_MultiplayerAPI_method_rpc>`. ---- -.. _class_MultiplayerAPIExtension_method__set_multiplayer_peer: +.. _class_MultiplayerAPIExtension_private_method__set_multiplayer_peer: .. rst-class:: classref-method -void **_set_multiplayer_peer** **(** :ref:`MultiplayerPeer<class_MultiplayerPeer>` multiplayer_peer **)** |virtual| +|void| **_set_multiplayer_peer**\ (\ multiplayer_peer\: :ref:`MultiplayerPeer<class_MultiplayerPeer>`\ ) |virtual| :ref:`🔗<class_MultiplayerAPIExtension_private_method__set_multiplayer_peer>` Called when the :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` is set. @@ -245,3 +251,4 @@ Called when the :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_prope .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayerpeer.rst b/classes/class_multiplayerpeer.rst index a526e66186f..fbd2b190a85 100644 --- a/classes/class_multiplayerpeer.rst +++ b/classes/class_multiplayerpeer.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -34,8 +37,6 @@ Tutorials - :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>` -- `WebRTC Signaling Demo <https://godotengine.org/asset-library/asset/537>`__ - .. rst-class:: classref-reftable-group Properties @@ -60,29 +61,29 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_MultiplayerPeer_method_close>` **(** **)** | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_peer<class_MultiplayerPeer_method_disconnect_peer>` **(** :ref:`int<class_int>` peer, :ref:`bool<class_bool>` force=false **)** | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`generate_unique_id<class_MultiplayerPeer_method_generate_unique_id>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` | :ref:`get_connection_status<class_MultiplayerPeer_method_get_connection_status>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_packet_channel<class_MultiplayerPeer_method_get_packet_channel>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`get_packet_mode<class_MultiplayerPeer_method_get_packet_mode>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_packet_peer<class_MultiplayerPeer_method_get_packet_peer>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_unique_id<class_MultiplayerPeer_method_get_unique_id>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_server_relay_supported<class_MultiplayerPeer_method_is_server_relay_supported>` **(** **)** |const| | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`poll<class_MultiplayerPeer_method_poll>` **(** **)** | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_target_peer<class_MultiplayerPeer_method_set_target_peer>` **(** :ref:`int<class_int>` id **)** | - +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_MultiplayerPeer_method_close>`\ (\ ) | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_peer<class_MultiplayerPeer_method_disconnect_peer>`\ (\ peer\: :ref:`int<class_int>`, force\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`generate_unique_id<class_MultiplayerPeer_method_generate_unique_id>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` | :ref:`get_connection_status<class_MultiplayerPeer_method_get_connection_status>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_packet_channel<class_MultiplayerPeer_method_get_packet_channel>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`get_packet_mode<class_MultiplayerPeer_method_get_packet_mode>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_packet_peer<class_MultiplayerPeer_method_get_packet_peer>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_unique_id<class_MultiplayerPeer_method_get_unique_id>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_server_relay_supported<class_MultiplayerPeer_method_is_server_relay_supported>`\ (\ ) |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`poll<class_MultiplayerPeer_method_poll>`\ (\ ) | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_target_peer<class_MultiplayerPeer_method_set_target_peer>`\ (\ id\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -97,7 +98,7 @@ Signals .. rst-class:: classref-signal -**peer_connected** **(** :ref:`int<class_int>` id **)** +**peer_connected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerPeer_signal_peer_connected>` Emitted when a remote peer connects. @@ -109,7 +110,7 @@ Emitted when a remote peer connects. .. rst-class:: classref-signal -**peer_disconnected** **(** :ref:`int<class_int>` id **)** +**peer_disconnected**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerPeer_signal_peer_disconnected>` Emitted when a remote peer has disconnected. @@ -126,7 +127,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ConnectionStatus**: +enum **ConnectionStatus**: :ref:`🔗<enum_MultiplayerPeer_ConnectionStatus>` .. _class_MultiplayerPeer_constant_CONNECTION_DISCONNECTED: @@ -160,7 +161,7 @@ This MultiplayerPeer is connected. .. rst-class:: classref-enumeration -enum **TransferMode**: +enum **TransferMode**: :ref:`🔗<enum_MultiplayerPeer_TransferMode>` .. _class_MultiplayerPeer_constant_TRANSFER_MODE_UNRELIABLE: @@ -199,7 +200,7 @@ Constants .. rst-class:: classref-constant -**TARGET_PEER_BROADCAST** = ``0`` +**TARGET_PEER_BROADCAST** = ``0`` :ref:`🔗<class_MultiplayerPeer_constant_TARGET_PEER_BROADCAST>` Packets are sent to all connected peers. @@ -207,7 +208,7 @@ Packets are sent to all connected peers. .. rst-class:: classref-constant -**TARGET_PEER_SERVER** = ``1`` +**TARGET_PEER_SERVER** = ``1`` :ref:`🔗<class_MultiplayerPeer_constant_TARGET_PEER_SERVER>` Packets are sent to the remote peer acting as server. @@ -224,12 +225,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **refuse_new_connections** = ``false`` +:ref:`bool<class_bool>` **refuse_new_connections** = ``false`` :ref:`🔗<class_MultiplayerPeer_property_refuse_new_connections>` .. rst-class:: classref-property-setget -- void **set_refuse_new_connections** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_refusing_new_connections** **(** **)** +- |void| **set_refuse_new_connections**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_refusing_new_connections**\ (\ ) If ``true``, this **MultiplayerPeer** refuses new connections. @@ -241,12 +242,12 @@ If ``true``, this **MultiplayerPeer** refuses new connections. .. rst-class:: classref-property -:ref:`int<class_int>` **transfer_channel** = ``0`` +:ref:`int<class_int>` **transfer_channel** = ``0`` :ref:`🔗<class_MultiplayerPeer_property_transfer_channel>` .. rst-class:: classref-property-setget -- void **set_transfer_channel** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_transfer_channel** **(** **)** +- |void| **set_transfer_channel**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_transfer_channel**\ (\ ) The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send **different and independent** state updates is a common way to optimize network usage and decrease latency in fast-paced games. @@ -260,12 +261,12 @@ The channel to use to send packets. Many network APIs such as ENet and WebRTC al .. rst-class:: classref-property -:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **transfer_mode** = ``2`` +:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **transfer_mode** = ``2`` :ref:`🔗<class_MultiplayerPeer_property_transfer_mode>` .. rst-class:: classref-property-setget -- void **set_transfer_mode** **(** :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` value **)** -- :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **get_transfer_mode** **(** **)** +- |void| **set_transfer_mode**\ (\ value\: :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`\ ) +- :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **get_transfer_mode**\ (\ ) The manner in which to send packets to the target peer. See :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`, and the :ref:`set_target_peer<class_MultiplayerPeer_method_set_target_peer>` method. @@ -282,7 +283,7 @@ Method Descriptions .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_MultiplayerPeer_method_close>` Immediately close the multiplayer peer returning to the state :ref:`CONNECTION_DISCONNECTED<class_MultiplayerPeer_constant_CONNECTION_DISCONNECTED>`. Connected peers will be dropped without emitting :ref:`peer_disconnected<class_MultiplayerPeer_signal_peer_disconnected>`. @@ -294,7 +295,7 @@ Immediately close the multiplayer peer returning to the state :ref:`CONNECTION_D .. rst-class:: classref-method -void **disconnect_peer** **(** :ref:`int<class_int>` peer, :ref:`bool<class_bool>` force=false **)** +|void| **disconnect_peer**\ (\ peer\: :ref:`int<class_int>`, force\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_MultiplayerPeer_method_disconnect_peer>` Disconnects the given ``peer`` from this host. If ``force`` is ``true`` the :ref:`peer_disconnected<class_MultiplayerPeer_signal_peer_disconnected>` signal will not be emitted for this peer. @@ -306,7 +307,7 @@ Disconnects the given ``peer`` from this host. If ``force`` is ``true`` the :ref .. rst-class:: classref-method -:ref:`int<class_int>` **generate_unique_id** **(** **)** |const| +:ref:`int<class_int>` **generate_unique_id**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_generate_unique_id>` Returns a randomly generated integer that can be used as a network unique ID. @@ -318,7 +319,7 @@ Returns a randomly generated integer that can be used as a network unique ID. .. rst-class:: classref-method -:ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` **get_connection_status** **(** **)** |const| +:ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` **get_connection_status**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_get_connection_status>` Returns the current state of the connection. See :ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>`. @@ -330,7 +331,7 @@ Returns the current state of the connection. See :ref:`ConnectionStatus<enum_Mul .. rst-class:: classref-method -:ref:`int<class_int>` **get_packet_channel** **(** **)** |const| +:ref:`int<class_int>` **get_packet_channel**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_get_packet_channel>` Returns the channel over which the next available packet was received. See :ref:`PacketPeer.get_available_packet_count<class_PacketPeer_method_get_available_packet_count>`. @@ -342,9 +343,9 @@ Returns the channel over which the next available packet was received. See :ref: .. rst-class:: classref-method -:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **get_packet_mode** **(** **)** |const| +:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **get_packet_mode**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_get_packet_mode>` -Returns the :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count<class_PacketPeer_method_get_available_packet_count>`. +Returns the transfer mode the remote peer used to send the next available packet. See :ref:`PacketPeer.get_available_packet_count<class_PacketPeer_method_get_available_packet_count>`. .. rst-class:: classref-item-separator @@ -354,7 +355,7 @@ Returns the :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` the remote pe .. rst-class:: classref-method -:ref:`int<class_int>` **get_packet_peer** **(** **)** |const| +:ref:`int<class_int>` **get_packet_peer**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_get_packet_peer>` Returns the ID of the **MultiplayerPeer** who sent the next available packet. See :ref:`PacketPeer.get_available_packet_count<class_PacketPeer_method_get_available_packet_count>`. @@ -366,7 +367,7 @@ Returns the ID of the **MultiplayerPeer** who sent the next available packet. Se .. rst-class:: classref-method -:ref:`int<class_int>` **get_unique_id** **(** **)** |const| +:ref:`int<class_int>` **get_unique_id**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_get_unique_id>` Returns the ID of this **MultiplayerPeer**. @@ -378,7 +379,7 @@ Returns the ID of this **MultiplayerPeer**. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_server_relay_supported** **(** **)** |const| +:ref:`bool<class_bool>` **is_server_relay_supported**\ (\ ) |const| :ref:`🔗<class_MultiplayerPeer_method_is_server_relay_supported>` Returns true if the server can act as a relay in the current configuration (i.e. if the higher level :ref:`MultiplayerAPI<class_MultiplayerAPI>` should notify connected clients of other peers, and implement a relay protocol to allow communication between them). @@ -390,7 +391,7 @@ Returns true if the server can act as a relay in the current configuration (i.e. .. rst-class:: classref-method -void **poll** **(** **)** +|void| **poll**\ (\ ) :ref:`🔗<class_MultiplayerPeer_method_poll>` Waits up to 1 second to receive a new network event. @@ -402,7 +403,7 @@ Waits up to 1 second to receive a new network event. .. rst-class:: classref-method -void **set_target_peer** **(** :ref:`int<class_int>` id **)** +|void| **set_target_peer**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerPeer_method_set_target_peer>` Sets the peer to which packets will be sent. @@ -415,3 +416,4 @@ The ``id`` can be one of: :ref:`TARGET_PEER_BROADCAST<class_MultiplayerPeer_cons .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayerpeerextension.rst b/classes/class_multiplayerpeerextension.rst index 9e0695f3286..3f6b528a147 100644 --- a/classes/class_multiplayerpeerextension.rst +++ b/classes/class_multiplayerpeerextension.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -29,53 +32,53 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close<class_MultiplayerPeerExtension_method__close>` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_disconnect_peer<class_MultiplayerPeerExtension_method__disconnect_peer>` **(** :ref:`int<class_int>` p_peer, :ref:`bool<class_bool>` p_force **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_MultiplayerPeerExtension_method__get_available_packet_count>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` | :ref:`_get_connection_status<class_MultiplayerPeerExtension_method__get_connection_status>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_MultiplayerPeerExtension_method__get_max_packet_size>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_MultiplayerPeerExtension_method__get_packet>` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_packet_channel<class_MultiplayerPeerExtension_method__get_packet_channel>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`_get_packet_mode<class_MultiplayerPeerExtension_method__get_packet_mode>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_packet_peer<class_MultiplayerPeerExtension_method__get_packet_peer>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`_get_packet_script<class_MultiplayerPeerExtension_method__get_packet_script>` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_transfer_channel<class_MultiplayerPeerExtension_method__get_transfer_channel>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`_get_transfer_mode<class_MultiplayerPeerExtension_method__get_transfer_mode>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_unique_id<class_MultiplayerPeerExtension_method__get_unique_id>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_refusing_new_connections<class_MultiplayerPeerExtension_method__is_refusing_new_connections>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_server<class_MultiplayerPeerExtension_method__is_server>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_server_relay_supported<class_MultiplayerPeerExtension_method__is_server_relay_supported>` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_poll<class_MultiplayerPeerExtension_method__poll>` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_MultiplayerPeerExtension_method__put_packet>` **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet_script<class_MultiplayerPeerExtension_method__put_packet_script>` **(** :ref:`PackedByteArray<class_PackedByteArray>` p_buffer **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_refuse_new_connections<class_MultiplayerPeerExtension_method__set_refuse_new_connections>` **(** :ref:`bool<class_bool>` p_enable **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_target_peer<class_MultiplayerPeerExtension_method__set_target_peer>` **(** :ref:`int<class_int>` p_peer **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transfer_channel<class_MultiplayerPeerExtension_method__set_transfer_channel>` **(** :ref:`int<class_int>` p_channel **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transfer_mode<class_MultiplayerPeerExtension_method__set_transfer_mode>` **(** :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` p_mode **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_close<class_MultiplayerPeerExtension_private_method__close>`\ (\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_disconnect_peer<class_MultiplayerPeerExtension_private_method__disconnect_peer>`\ (\ p_peer\: :ref:`int<class_int>`, p_force\: :ref:`bool<class_bool>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_MultiplayerPeerExtension_private_method__get_available_packet_count>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` | :ref:`_get_connection_status<class_MultiplayerPeerExtension_private_method__get_connection_status>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_MultiplayerPeerExtension_private_method__get_max_packet_size>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_MultiplayerPeerExtension_private_method__get_packet>`\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_packet_channel<class_MultiplayerPeerExtension_private_method__get_packet_channel>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`_get_packet_mode<class_MultiplayerPeerExtension_private_method__get_packet_mode>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_packet_peer<class_MultiplayerPeerExtension_private_method__get_packet_peer>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`_get_packet_script<class_MultiplayerPeerExtension_private_method__get_packet_script>`\ (\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_transfer_channel<class_MultiplayerPeerExtension_private_method__get_transfer_channel>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` | :ref:`_get_transfer_mode<class_MultiplayerPeerExtension_private_method__get_transfer_mode>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_unique_id<class_MultiplayerPeerExtension_private_method__get_unique_id>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_refusing_new_connections<class_MultiplayerPeerExtension_private_method__is_refusing_new_connections>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_server<class_MultiplayerPeerExtension_private_method__is_server>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_server_relay_supported<class_MultiplayerPeerExtension_private_method__is_server_relay_supported>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_poll<class_MultiplayerPeerExtension_private_method__poll>`\ (\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_MultiplayerPeerExtension_private_method__put_packet>`\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet_script<class_MultiplayerPeerExtension_private_method__put_packet_script>`\ (\ p_buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_refuse_new_connections<class_MultiplayerPeerExtension_private_method__set_refuse_new_connections>`\ (\ p_enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_target_peer<class_MultiplayerPeerExtension_private_method__set_target_peer>`\ (\ p_peer\: :ref:`int<class_int>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_transfer_channel<class_MultiplayerPeerExtension_private_method__set_transfer_channel>`\ (\ p_channel\: :ref:`int<class_int>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_transfer_mode<class_MultiplayerPeerExtension_private_method__set_transfer_mode>`\ (\ p_mode\: :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`\ ) |virtual| | + +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -86,11 +89,11 @@ Methods Method Descriptions ------------------- -.. _class_MultiplayerPeerExtension_method__close: +.. _class_MultiplayerPeerExtension_private_method__close: .. rst-class:: classref-method -void **_close** **(** **)** |virtual| +|void| **_close**\ (\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__close>` Called when the multiplayer peer should be immediately closed (see :ref:`MultiplayerPeer.close<class_MultiplayerPeer_method_close>`). @@ -98,11 +101,11 @@ Called when the multiplayer peer should be immediately closed (see :ref:`Multipl ---- -.. _class_MultiplayerPeerExtension_method__disconnect_peer: +.. _class_MultiplayerPeerExtension_private_method__disconnect_peer: .. rst-class:: classref-method -void **_disconnect_peer** **(** :ref:`int<class_int>` p_peer, :ref:`bool<class_bool>` p_force **)** |virtual| +|void| **_disconnect_peer**\ (\ p_peer\: :ref:`int<class_int>`, p_force\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__disconnect_peer>` Called when the connected ``p_peer`` should be forcibly disconnected (see :ref:`MultiplayerPeer.disconnect_peer<class_MultiplayerPeer_method_disconnect_peer>`). @@ -110,11 +113,11 @@ Called when the connected ``p_peer`` should be forcibly disconnected (see :ref:` ---- -.. _class_MultiplayerPeerExtension_method__get_available_packet_count: +.. _class_MultiplayerPeerExtension_private_method__get_available_packet_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_available_packet_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_available_packet_count**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_available_packet_count>` Called when the available packet count is internally requested by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. @@ -122,11 +125,11 @@ Called when the available packet count is internally requested by the :ref:`Mult ---- -.. _class_MultiplayerPeerExtension_method__get_connection_status: +.. _class_MultiplayerPeerExtension_private_method__get_connection_status: .. rst-class:: classref-method -:ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` **_get_connection_status** **(** **)** |virtual| |const| +:ref:`ConnectionStatus<enum_MultiplayerPeer_ConnectionStatus>` **_get_connection_status**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_connection_status>` Called when the connection status is requested on the :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.get_connection_status<class_MultiplayerPeer_method_get_connection_status>`). @@ -134,11 +137,11 @@ Called when the connection status is requested on the :ref:`MultiplayerPeer<clas ---- -.. _class_MultiplayerPeerExtension_method__get_max_packet_size: +.. _class_MultiplayerPeerExtension_private_method__get_max_packet_size: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_max_packet_size** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_max_packet_size**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_max_packet_size>` Called when the maximum allowed packet size (in bytes) is requested by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. @@ -146,11 +149,11 @@ Called when the maximum allowed packet size (in bytes) is requested by the :ref: ---- -.. _class_MultiplayerPeerExtension_method__get_packet: +.. _class_MultiplayerPeerExtension_private_method__get_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_get_packet**\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_packet>` Called when a packet needs to be received by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, with ``r_buffer_size`` being the size of the binary ``r_buffer`` in bytes. @@ -158,11 +161,11 @@ Called when a packet needs to be received by the :ref:`MultiplayerAPI<class_Mult ---- -.. _class_MultiplayerPeerExtension_method__get_packet_channel: +.. _class_MultiplayerPeerExtension_private_method__get_packet_channel: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_packet_channel** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_packet_channel**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_packet_channel>` Called to get the channel over which the next available packet was received. See :ref:`MultiplayerPeer.get_packet_channel<class_MultiplayerPeer_method_get_packet_channel>`. @@ -170,23 +173,23 @@ Called to get the channel over which the next available packet was received. See ---- -.. _class_MultiplayerPeerExtension_method__get_packet_mode: +.. _class_MultiplayerPeerExtension_private_method__get_packet_mode: .. rst-class:: classref-method -:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **_get_packet_mode** **(** **)** |virtual| |const| +:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **_get_packet_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_packet_mode>` -Called to get the :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode<class_MultiplayerPeer_method_get_packet_mode>`. +Called to get the transfer mode the remote peer used to send the next available packet. See :ref:`MultiplayerPeer.get_packet_mode<class_MultiplayerPeer_method_get_packet_mode>`. .. rst-class:: classref-item-separator ---- -.. _class_MultiplayerPeerExtension_method__get_packet_peer: +.. _class_MultiplayerPeerExtension_private_method__get_packet_peer: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_packet_peer** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_packet_peer**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_packet_peer>` Called when the ID of the :ref:`MultiplayerPeer<class_MultiplayerPeer>` who sent the most recent packet is requested (see :ref:`MultiplayerPeer.get_packet_peer<class_MultiplayerPeer_method_get_packet_peer>`). @@ -194,23 +197,23 @@ Called when the ID of the :ref:`MultiplayerPeer<class_MultiplayerPeer>` who sent ---- -.. _class_MultiplayerPeerExtension_method__get_packet_script: +.. _class_MultiplayerPeerExtension_private_method__get_packet_script: .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **_get_packet_script** **(** **)** |virtual| +:ref:`PackedByteArray<class_PackedByteArray>` **_get_packet_script**\ (\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_packet_script>` -Called when a packet needs to be received by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, if :ref:`_get_packet<class_MultiplayerPeerExtension_method__get_packet>` isn't implemented. Use this when extending this class via GDScript. +Called when a packet needs to be received by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, if :ref:`_get_packet<class_MultiplayerPeerExtension_private_method__get_packet>` isn't implemented. Use this when extending this class via GDScript. .. rst-class:: classref-item-separator ---- -.. _class_MultiplayerPeerExtension_method__get_transfer_channel: +.. _class_MultiplayerPeerExtension_private_method__get_transfer_channel: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_transfer_channel** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_transfer_channel**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_transfer_channel>` Called when the transfer channel to use is read on this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.transfer_channel<class_MultiplayerPeer_property_transfer_channel>`). @@ -218,11 +221,11 @@ Called when the transfer channel to use is read on this :ref:`MultiplayerPeer<cl ---- -.. _class_MultiplayerPeerExtension_method__get_transfer_mode: +.. _class_MultiplayerPeerExtension_private_method__get_transfer_mode: .. rst-class:: classref-method -:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **_get_transfer_mode** **(** **)** |virtual| |const| +:ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` **_get_transfer_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_transfer_mode>` Called when the transfer mode to use is read on this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.transfer_mode<class_MultiplayerPeer_property_transfer_mode>`). @@ -230,11 +233,11 @@ Called when the transfer mode to use is read on this :ref:`MultiplayerPeer<class ---- -.. _class_MultiplayerPeerExtension_method__get_unique_id: +.. _class_MultiplayerPeerExtension_private_method__get_unique_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_unique_id** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_unique_id**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__get_unique_id>` Called when the unique ID of this :ref:`MultiplayerPeer<class_MultiplayerPeer>` is requested (see :ref:`MultiplayerPeer.get_unique_id<class_MultiplayerPeer_method_get_unique_id>`). The value must be between ``1`` and ``2147483647``. @@ -242,11 +245,11 @@ Called when the unique ID of this :ref:`MultiplayerPeer<class_MultiplayerPeer>` ---- -.. _class_MultiplayerPeerExtension_method__is_refusing_new_connections: +.. _class_MultiplayerPeerExtension_private_method__is_refusing_new_connections: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_refusing_new_connections** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_refusing_new_connections**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__is_refusing_new_connections>` Called when the "refuse new connections" status is requested on this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.refuse_new_connections<class_MultiplayerPeer_property_refuse_new_connections>`). @@ -254,11 +257,11 @@ Called when the "refuse new connections" status is requested on this :ref:`Multi ---- -.. _class_MultiplayerPeerExtension_method__is_server: +.. _class_MultiplayerPeerExtension_private_method__is_server: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_server** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_server**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__is_server>` Called when the "is server" status is requested on the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. See :ref:`MultiplayerAPI.is_server<class_MultiplayerAPI_method_is_server>`. @@ -266,11 +269,11 @@ Called when the "is server" status is requested on the :ref:`MultiplayerAPI<clas ---- -.. _class_MultiplayerPeerExtension_method__is_server_relay_supported: +.. _class_MultiplayerPeerExtension_private_method__is_server_relay_supported: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_server_relay_supported** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_server_relay_supported**\ (\ ) |virtual| |const| :ref:`🔗<class_MultiplayerPeerExtension_private_method__is_server_relay_supported>` Called to check if the server can act as a relay in the current configuration. See :ref:`MultiplayerPeer.is_server_relay_supported<class_MultiplayerPeer_method_is_server_relay_supported>`. @@ -278,11 +281,11 @@ Called to check if the server can act as a relay in the current configuration. S ---- -.. _class_MultiplayerPeerExtension_method__poll: +.. _class_MultiplayerPeerExtension_private_method__poll: .. rst-class:: classref-method -void **_poll** **(** **)** |virtual| +|void| **_poll**\ (\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__poll>` Called when the :ref:`MultiplayerAPI<class_MultiplayerAPI>` is polled. See :ref:`MultiplayerAPI.poll<class_MultiplayerAPI_method_poll>`. @@ -290,11 +293,11 @@ Called when the :ref:`MultiplayerAPI<class_MultiplayerAPI>` is polled. See :ref: ---- -.. _class_MultiplayerPeerExtension_method__put_packet: +.. _class_MultiplayerPeerExtension_private_method__put_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_packet**\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__put_packet>` Called when a packet needs to be sent by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, with ``p_buffer_size`` being the size of the binary ``p_buffer`` in bytes. @@ -302,23 +305,23 @@ Called when a packet needs to be sent by the :ref:`MultiplayerAPI<class_Multipla ---- -.. _class_MultiplayerPeerExtension_method__put_packet_script: +.. _class_MultiplayerPeerExtension_private_method__put_packet_script: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_packet_script** **(** :ref:`PackedByteArray<class_PackedByteArray>` p_buffer **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_packet_script**\ (\ p_buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__put_packet_script>` -Called when a packet needs to be sent by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, if :ref:`_put_packet<class_MultiplayerPeerExtension_method__put_packet>` isn't implemented. Use this when extending this class via GDScript. +Called when a packet needs to be sent by the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, if :ref:`_put_packet<class_MultiplayerPeerExtension_private_method__put_packet>` isn't implemented. Use this when extending this class via GDScript. .. rst-class:: classref-item-separator ---- -.. _class_MultiplayerPeerExtension_method__set_refuse_new_connections: +.. _class_MultiplayerPeerExtension_private_method__set_refuse_new_connections: .. rst-class:: classref-method -void **_set_refuse_new_connections** **(** :ref:`bool<class_bool>` p_enable **)** |virtual| +|void| **_set_refuse_new_connections**\ (\ p_enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__set_refuse_new_connections>` Called when the "refuse new connections" status is set on this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.refuse_new_connections<class_MultiplayerPeer_property_refuse_new_connections>`). @@ -326,11 +329,11 @@ Called when the "refuse new connections" status is set on this :ref:`Multiplayer ---- -.. _class_MultiplayerPeerExtension_method__set_target_peer: +.. _class_MultiplayerPeerExtension_private_method__set_target_peer: .. rst-class:: classref-method -void **_set_target_peer** **(** :ref:`int<class_int>` p_peer **)** |virtual| +|void| **_set_target_peer**\ (\ p_peer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__set_target_peer>` Called when the target peer to use is set for this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.set_target_peer<class_MultiplayerPeer_method_set_target_peer>`). @@ -338,11 +341,11 @@ Called when the target peer to use is set for this :ref:`MultiplayerPeer<class_M ---- -.. _class_MultiplayerPeerExtension_method__set_transfer_channel: +.. _class_MultiplayerPeerExtension_private_method__set_transfer_channel: .. rst-class:: classref-method -void **_set_transfer_channel** **(** :ref:`int<class_int>` p_channel **)** |virtual| +|void| **_set_transfer_channel**\ (\ p_channel\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__set_transfer_channel>` Called when the channel to use is set for this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.transfer_channel<class_MultiplayerPeer_property_transfer_channel>`). @@ -350,11 +353,11 @@ Called when the channel to use is set for this :ref:`MultiplayerPeer<class_Multi ---- -.. _class_MultiplayerPeerExtension_method__set_transfer_mode: +.. _class_MultiplayerPeerExtension_private_method__set_transfer_mode: .. rst-class:: classref-method -void **_set_transfer_mode** **(** :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` p_mode **)** |virtual| +|void| **_set_transfer_mode**\ (\ p_mode\: :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`\ ) |virtual| :ref:`🔗<class_MultiplayerPeerExtension_private_method__set_transfer_mode>` Called when the transfer mode is set on this :ref:`MultiplayerPeer<class_MultiplayerPeer>` (see :ref:`MultiplayerPeer.transfer_mode<class_MultiplayerPeer_property_transfer_mode>`). @@ -365,3 +368,4 @@ Called when the transfer mode is set on this :ref:`MultiplayerPeer<class_Multipl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayerspawner.rst b/classes/class_multiplayerspawner.rst index d6696ebc5a9..557d860fb72 100644 --- a/classes/class_multiplayerspawner.rst +++ b/classes/class_multiplayerspawner.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -49,17 +52,17 @@ Methods .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_spawnable_scene<class_MultiplayerSpawner_method_add_spawnable_scene>` **(** :ref:`String<class_String>` path **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_spawnable_scenes<class_MultiplayerSpawner_method_clear_spawnable_scenes>` **(** **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_spawnable_scene<class_MultiplayerSpawner_method_get_spawnable_scene>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_spawnable_scene_count<class_MultiplayerSpawner_method_get_spawnable_scene_count>` **(** **)** |const| | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`spawn<class_MultiplayerSpawner_method_spawn>` **(** :ref:`Variant<class_Variant>` data=null **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_spawnable_scene<class_MultiplayerSpawner_method_add_spawnable_scene>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_spawnable_scenes<class_MultiplayerSpawner_method_clear_spawnable_scenes>`\ (\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_spawnable_scene<class_MultiplayerSpawner_method_get_spawnable_scene>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_spawnable_scene_count<class_MultiplayerSpawner_method_get_spawnable_scene_count>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`spawn<class_MultiplayerSpawner_method_spawn>`\ (\ data\: :ref:`Variant<class_Variant>` = null\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,7 +77,7 @@ Signals .. rst-class:: classref-signal -**despawned** **(** :ref:`Node<class_Node>` node **)** +**despawned**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_MultiplayerSpawner_signal_despawned>` Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. @@ -86,7 +89,7 @@ Emitted when a spawnable scene or custom spawn was despawned by the multiplayer .. rst-class:: classref-signal -**spawned** **(** :ref:`Node<class_Node>` node **)** +**spawned**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_MultiplayerSpawner_signal_spawned>` Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. @@ -103,12 +106,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Callable<class_Callable>` **spawn_function** +:ref:`Callable<class_Callable>` **spawn_function** :ref:`🔗<class_MultiplayerSpawner_property_spawn_function>` .. rst-class:: classref-property-setget -- void **set_spawn_function** **(** :ref:`Callable<class_Callable>` value **)** -- :ref:`Callable<class_Callable>` **get_spawn_function** **(** **)** +- |void| **set_spawn_function**\ (\ value\: :ref:`Callable<class_Callable>`\ ) +- :ref:`Callable<class_Callable>` **get_spawn_function**\ (\ ) Method called on all peers when for every custom :ref:`spawn<class_MultiplayerSpawner_method_spawn>` requested by the authority. Will receive the ``data`` parameter, and should return a :ref:`Node<class_Node>` that is not in the scene tree. @@ -122,12 +125,12 @@ Method called on all peers when for every custom :ref:`spawn<class_MultiplayerSp .. rst-class:: classref-property -:ref:`int<class_int>` **spawn_limit** = ``0`` +:ref:`int<class_int>` **spawn_limit** = ``0`` :ref:`🔗<class_MultiplayerSpawner_property_spawn_limit>` .. rst-class:: classref-property-setget -- void **set_spawn_limit** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_spawn_limit** **(** **)** +- |void| **set_spawn_limit**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_spawn_limit**\ (\ ) Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. @@ -141,12 +144,12 @@ When set to ``0`` (the default), there is no limit. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **spawn_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **spawn_path** = ``NodePath("")`` :ref:`🔗<class_MultiplayerSpawner_property_spawn_path>` .. rst-class:: classref-property-setget -- void **set_spawn_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_spawn_path** **(** **)** +- |void| **set_spawn_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_spawn_path**\ (\ ) Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers. @@ -163,7 +166,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_spawnable_scene** **(** :ref:`String<class_String>` path **)** +|void| **add_spawnable_scene**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MultiplayerSpawner_method_add_spawnable_scene>` Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by :ref:`spawn_path<class_MultiplayerSpawner_property_spawn_path>`. @@ -175,7 +178,7 @@ Adds a scene path to spawnable scenes, making it automatically replicated from t .. rst-class:: classref-method -void **clear_spawnable_scenes** **(** **)** +|void| **clear_spawnable_scenes**\ (\ ) :ref:`🔗<class_MultiplayerSpawner_method_clear_spawnable_scenes>` Clears all spawnable scenes. Does not despawn existing instances on remote peers. @@ -187,7 +190,7 @@ Clears all spawnable scenes. Does not despawn existing instances on remote peers .. rst-class:: classref-method -:ref:`String<class_String>` **get_spawnable_scene** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_spawnable_scene**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiplayerSpawner_method_get_spawnable_scene>` Returns the spawnable scene path by index. @@ -199,7 +202,7 @@ Returns the spawnable scene path by index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_spawnable_scene_count** **(** **)** |const| +:ref:`int<class_int>` **get_spawnable_scene_count**\ (\ ) |const| :ref:`🔗<class_MultiplayerSpawner_method_get_spawnable_scene_count>` Returns the count of spawnable scene paths. @@ -211,7 +214,7 @@ Returns the count of spawnable scene paths. .. rst-class:: classref-method -:ref:`Node<class_Node>` **spawn** **(** :ref:`Variant<class_Variant>` data=null **)** +:ref:`Node<class_Node>` **spawn**\ (\ data\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_MultiplayerSpawner_method_spawn>` Requests a custom spawn, with ``data`` passed to :ref:`spawn_function<class_MultiplayerSpawner_property_spawn_function>` on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by :ref:`spawn_path<class_MultiplayerSpawner_property_spawn_path>`. @@ -224,3 +227,4 @@ Requests a custom spawn, with ``data`` passed to :ref:`spawn_function<class_Mult .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_multiplayersynchronizer.rst b/classes/class_multiplayersynchronizer.rst index 4c05809994e..fe1036fce01 100644 --- a/classes/class_multiplayersynchronizer.rst +++ b/classes/class_multiplayersynchronizer.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: network + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -59,17 +62,17 @@ Methods .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_visibility_filter<class_MultiplayerSynchronizer_method_add_visibility_filter>` **(** :ref:`Callable<class_Callable>` filter **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_visibility_for<class_MultiplayerSynchronizer_method_get_visibility_for>` **(** :ref:`int<class_int>` peer **)** |const| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_visibility_filter<class_MultiplayerSynchronizer_method_remove_visibility_filter>` **(** :ref:`Callable<class_Callable>` filter **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_visibility_for<class_MultiplayerSynchronizer_method_set_visibility_for>` **(** :ref:`int<class_int>` peer, :ref:`bool<class_bool>` visible **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_visibility<class_MultiplayerSynchronizer_method_update_visibility>` **(** :ref:`int<class_int>` for_peer=0 **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_visibility_filter<class_MultiplayerSynchronizer_method_add_visibility_filter>`\ (\ filter\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_visibility_for<class_MultiplayerSynchronizer_method_get_visibility_for>`\ (\ peer\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_visibility_filter<class_MultiplayerSynchronizer_method_remove_visibility_filter>`\ (\ filter\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_visibility_for<class_MultiplayerSynchronizer_method_set_visibility_for>`\ (\ peer\: :ref:`int<class_int>`, visible\: :ref:`bool<class_bool>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_visibility<class_MultiplayerSynchronizer_method_update_visibility>`\ (\ for_peer\: :ref:`int<class_int>` = 0\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,7 +87,7 @@ Signals .. rst-class:: classref-signal -**delta_synchronized** **(** **)** +**delta_synchronized**\ (\ ) :ref:`🔗<class_MultiplayerSynchronizer_signal_delta_synchronized>` Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated. @@ -96,7 +99,7 @@ Emitted when a new delta synchronization state is received by this synchronizer .. rst-class:: classref-signal -**synchronized** **(** **)** +**synchronized**\ (\ ) :ref:`🔗<class_MultiplayerSynchronizer_signal_synchronized>` Emitted when a new synchronization state is received by this synchronizer after the properties have been updated. @@ -108,7 +111,7 @@ Emitted when a new synchronization state is received by this synchronizer after .. rst-class:: classref-signal -**visibility_changed** **(** :ref:`int<class_int>` for_peer **)** +**visibility_changed**\ (\ for_peer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_MultiplayerSynchronizer_signal_visibility_changed>` Emitted when visibility of ``for_peer`` is updated. See :ref:`update_visibility<class_MultiplayerSynchronizer_method_update_visibility>`. @@ -125,7 +128,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **VisibilityUpdateMode**: +enum **VisibilityUpdateMode**: :ref:`🔗<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` .. _class_MultiplayerSynchronizer_constant_VISIBILITY_PROCESS_IDLE: @@ -164,12 +167,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **delta_interval** = ``0.0`` +:ref:`float<class_float>` **delta_interval** = ``0.0`` :ref:`🔗<class_MultiplayerSynchronizer_property_delta_interval>` .. rst-class:: classref-property-setget -- void **set_delta_interval** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_delta_interval** **(** **)** +- |void| **set_delta_interval**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_delta_interval**\ (\ ) Time interval between delta synchronizations. When set to ``0.0`` (the default), delta synchronizations happen every network process frame. @@ -181,12 +184,12 @@ Time interval between delta synchronizations. When set to ``0.0`` (the default), .. rst-class:: classref-property -:ref:`bool<class_bool>` **public_visibility** = ``true`` +:ref:`bool<class_bool>` **public_visibility** = ``true`` :ref:`🔗<class_MultiplayerSynchronizer_property_public_visibility>` .. rst-class:: classref-property-setget -- void **set_visibility_public** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_visibility_public** **(** **)** +- |void| **set_visibility_public**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_visibility_public**\ (\ ) Whether synchronization should be visible to all peers by default. See :ref:`set_visibility_for<class_MultiplayerSynchronizer_method_set_visibility_for>` and :ref:`add_visibility_filter<class_MultiplayerSynchronizer_method_add_visibility_filter>` for ways of configuring fine-grained visibility options. @@ -198,12 +201,12 @@ Whether synchronization should be visible to all peers by default. See :ref:`set .. rst-class:: classref-property -:ref:`SceneReplicationConfig<class_SceneReplicationConfig>` **replication_config** +:ref:`SceneReplicationConfig<class_SceneReplicationConfig>` **replication_config** :ref:`🔗<class_MultiplayerSynchronizer_property_replication_config>` .. rst-class:: classref-property-setget -- void **set_replication_config** **(** :ref:`SceneReplicationConfig<class_SceneReplicationConfig>` value **)** -- :ref:`SceneReplicationConfig<class_SceneReplicationConfig>` **get_replication_config** **(** **)** +- |void| **set_replication_config**\ (\ value\: :ref:`SceneReplicationConfig<class_SceneReplicationConfig>`\ ) +- :ref:`SceneReplicationConfig<class_SceneReplicationConfig>` **get_replication_config**\ (\ ) Resource containing which properties to synchronize. @@ -215,12 +218,12 @@ Resource containing which properties to synchronize. .. rst-class:: classref-property -:ref:`float<class_float>` **replication_interval** = ``0.0`` +:ref:`float<class_float>` **replication_interval** = ``0.0`` :ref:`🔗<class_MultiplayerSynchronizer_property_replication_interval>` .. rst-class:: classref-property-setget -- void **set_replication_interval** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_replication_interval** **(** **)** +- |void| **set_replication_interval**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_replication_interval**\ (\ ) Time interval between synchronizations. When set to ``0.0`` (the default), synchronizations happen every network process frame. @@ -232,12 +235,12 @@ Time interval between synchronizations. When set to ``0.0`` (the default), synch .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **root_path** = ``NodePath("..")`` +:ref:`NodePath<class_NodePath>` **root_path** = ``NodePath("..")`` :ref:`🔗<class_MultiplayerSynchronizer_property_root_path>` .. rst-class:: classref-property-setget -- void **set_root_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_root_path** **(** **)** +- |void| **set_root_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_root_path**\ (\ ) Node path that replicated properties are relative to. @@ -251,12 +254,12 @@ If :ref:`root_path<class_MultiplayerSynchronizer_property_root_path>` was spawne .. rst-class:: classref-property -:ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` **visibility_update_mode** = ``0`` +:ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` **visibility_update_mode** = ``0`` :ref:`🔗<class_MultiplayerSynchronizer_property_visibility_update_mode>` .. rst-class:: classref-property-setget -- void **set_visibility_update_mode** **(** :ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` value **)** -- :ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` **get_visibility_update_mode** **(** **)** +- |void| **set_visibility_update_mode**\ (\ value\: :ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>`\ ) +- :ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` **get_visibility_update_mode**\ (\ ) Specifies when visibility filters are updated (see :ref:`VisibilityUpdateMode<enum_MultiplayerSynchronizer_VisibilityUpdateMode>` for options). @@ -273,7 +276,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_visibility_filter** **(** :ref:`Callable<class_Callable>` filter **)** +|void| **add_visibility_filter**\ (\ filter\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_MultiplayerSynchronizer_method_add_visibility_filter>` Adds a peer visibility filter for this synchronizer. @@ -287,7 +290,7 @@ Adds a peer visibility filter for this synchronizer. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_visibility_for** **(** :ref:`int<class_int>` peer **)** |const| +:ref:`bool<class_bool>` **get_visibility_for**\ (\ peer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MultiplayerSynchronizer_method_get_visibility_for>` Queries the current visibility for peer ``peer``. @@ -299,7 +302,7 @@ Queries the current visibility for peer ``peer``. .. rst-class:: classref-method -void **remove_visibility_filter** **(** :ref:`Callable<class_Callable>` filter **)** +|void| **remove_visibility_filter**\ (\ filter\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_MultiplayerSynchronizer_method_remove_visibility_filter>` Removes a peer visibility filter from this synchronizer. @@ -311,7 +314,7 @@ Removes a peer visibility filter from this synchronizer. .. rst-class:: classref-method -void **set_visibility_for** **(** :ref:`int<class_int>` peer, :ref:`bool<class_bool>` visible **)** +|void| **set_visibility_for**\ (\ peer\: :ref:`int<class_int>`, visible\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MultiplayerSynchronizer_method_set_visibility_for>` Sets the visibility of ``peer`` to ``visible``. If ``peer`` is ``0``, the value of :ref:`public_visibility<class_MultiplayerSynchronizer_property_public_visibility>` will be updated instead. @@ -323,7 +326,7 @@ Sets the visibility of ``peer`` to ``visible``. If ``peer`` is ``0``, the value .. rst-class:: classref-method -void **update_visibility** **(** :ref:`int<class_int>` for_peer=0 **)** +|void| **update_visibility**\ (\ for_peer\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_MultiplayerSynchronizer_method_update_visibility>` Updates the visibility of ``for_peer`` according to visibility filters. If ``for_peer`` is ``0`` (the default), all peers' visibilties are updated. @@ -334,3 +337,4 @@ Updates the visibility of ``for_peer`` according to visibility filters. If ``for .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 869ae609774..aacea2cc3c7 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -48,13 +48,13 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------+ - | void | :ref:`lock<class_Mutex_method_lock>` **(** **)** | - +-------------------------+----------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`try_lock<class_Mutex_method_try_lock>` **(** **)** | - +-------------------------+----------------------------------------------------------+ - | void | :ref:`unlock<class_Mutex_method_unlock>` **(** **)** | - +-------------------------+----------------------------------------------------------+ + +-------------------------+----------------------------------------------------+ + | |void| | :ref:`lock<class_Mutex_method_lock>`\ (\ ) | + +-------------------------+----------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`try_lock<class_Mutex_method_try_lock>`\ (\ ) | + +-------------------------+----------------------------------------------------+ + | |void| | :ref:`unlock<class_Mutex_method_unlock>`\ (\ ) | + +-------------------------+----------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,7 +69,7 @@ Method Descriptions .. rst-class:: classref-method -void **lock** **(** **)** +|void| **lock**\ (\ ) :ref:`🔗<class_Mutex_method_lock>` Locks this **Mutex**, blocks until it is unlocked by the current owner. @@ -83,7 +83,7 @@ Locks this **Mutex**, blocks until it is unlocked by the current owner. .. rst-class:: classref-method -:ref:`bool<class_bool>` **try_lock** **(** **)** +:ref:`bool<class_bool>` **try_lock**\ (\ ) :ref:`🔗<class_Mutex_method_try_lock>` Tries locking this **Mutex**, but does not block. Returns ``true`` on success, ``false`` otherwise. @@ -97,7 +97,7 @@ Tries locking this **Mutex**, but does not block. Returns ``true`` on success, ` .. rst-class:: classref-method -void **unlock** **(** **)** +|void| **unlock**\ (\ ) :ref:`🔗<class_Mutex_method_unlock>` Unlocks this **Mutex**, leaving it to other threads. @@ -112,3 +112,4 @@ Unlocks this **Mutex**, leaving it to other threads. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_nativemenu.rst b/classes/class_nativemenu.rst new file mode 100644 index 00000000000..270fd9bf7da --- /dev/null +++ b/classes/class_nativemenu.rst @@ -0,0 +1,1335 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NativeMenu.xml. + +.. _class_NativeMenu: + +NativeMenu +========== + +**Inherits:** :ref:`Object<class_Object>` + +A server interface for OS native menus. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**NativeMenu** handles low-level access to the OS native global menu bar and popup menus. + +\ **Note:** This is low-level API, consider using :ref:`MenuBar<class_MenuBar>` with :ref:`MenuBar.prefer_global_menu<class_MenuBar_property_prefer_global_menu>` set to ``true``, and :ref:`PopupMenu<class_PopupMenu>` with :ref:`PopupMenu.prefer_native_menu<class_PopupMenu_property_prefer_native_menu>` set to ``true``. + +To create a menu, use :ref:`create_menu<class_NativeMenu_method_create_menu>`, add menu items using ``add_*_item`` methods. To remove a menu, use :ref:`free_menu<class_NativeMenu_method_free_menu>`. + +:: + + var menu + + func _menu_callback(item_id): + if item_id == "ITEM_CUT": + cut() + elif item_id == "ITEM_COPY": + copy() + elif item_id == "ITEM_PASTE": + paste() + + func _enter_tree(): + # Create new menu and add items: + menu = NativeMenu.create_menu() + NativeMenu.add_item(menu, "Cut", _menu_callback, Callable(), "ITEM_CUT") + NativeMenu.add_item(menu, "Copy", _menu_callback, Callable(), "ITEM_COPY") + NativeMenu.add_separator(menu) + NativeMenu.add_item(menu, "Paste", _menu_callback, Callable(), "ITEM_PASTE") + + func _on_button_pressed(): + # Show popup menu at mouse position: + NativeMenu.popup(menu, DisplayServer.mouse_get_position()) + + func _exit_tree(): + # Remove menu when it's no longer needed: + NativeMenu.free_menu(menu) + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_check_item<class_NativeMenu_method_add_check_item>`\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_icon_check_item<class_NativeMenu_method_add_icon_check_item>`\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_icon_item<class_NativeMenu_method_add_icon_item>`\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_icon_radio_check_item<class_NativeMenu_method_add_icon_radio_check_item>`\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_item<class_NativeMenu_method_add_item>`\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>`\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_radio_check_item<class_NativeMenu_method_add_radio_check_item>`\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_separator<class_NativeMenu_method_add_separator>`\ (\ rid\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_submenu_item<class_NativeMenu_method_add_submenu_item>`\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, submenu_rid\: :ref:`RID<class_RID>`, tag\: :ref:`Variant<class_Variant>` = null, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NativeMenu_method_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_menu<class_NativeMenu_method_create_menu>`\ (\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_item_index_with_submenu<class_NativeMenu_method_find_item_index_with_submenu>`\ (\ rid\: :ref:`RID<class_RID>`, submenu_rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_item_index_with_tag<class_NativeMenu_method_find_item_index_with_tag>`\ (\ rid\: :ref:`RID<class_RID>`, tag\: :ref:`Variant<class_Variant>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_item_index_with_text<class_NativeMenu_method_find_item_index_with_text>`\ (\ rid\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_menu<class_NativeMenu_method_free_menu>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_item_accelerator<class_NativeMenu_method_get_item_accelerator>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable<class_Callable>` | :ref:`get_item_callback<class_NativeMenu_method_get_item_callback>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_count<class_NativeMenu_method_get_item_count>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_NativeMenu_method_get_item_icon>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_indentation_level<class_NativeMenu_method_get_item_indentation_level>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable<class_Callable>` | :ref:`get_item_key_callback<class_NativeMenu_method_get_item_key_callback>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_max_states<class_NativeMenu_method_get_item_max_states>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_state<class_NativeMenu_method_get_item_state>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_item_submenu<class_NativeMenu_method_get_item_submenu>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_item_tag<class_NativeMenu_method_get_item_tag>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_text<class_NativeMenu_method_get_item_text>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_NativeMenu_method_get_item_tooltip>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_minimum_width<class_NativeMenu_method_get_minimum_width>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable<class_Callable>` | :ref:`get_popup_close_callback<class_NativeMenu_method_get_popup_close_callback>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable<class_Callable>` | :ref:`get_popup_open_callback<class_NativeMenu_method_get_popup_open_callback>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_NativeMenu_method_get_size>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_system_menu<class_NativeMenu_method_get_system_menu>`\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_system_menu_name<class_NativeMenu_method_get_system_menu_name>`\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_feature<class_NativeMenu_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_NativeMenu_Feature>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_menu<class_NativeMenu_method_has_menu>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_system_menu<class_NativeMenu_method_has_system_menu>`\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_checkable<class_NativeMenu_method_is_item_checkable>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_checked<class_NativeMenu_method_is_item_checked>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_NativeMenu_method_is_item_disabled>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_hidden<class_NativeMenu_method_is_item_hidden>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_radio_checkable<class_NativeMenu_method_is_item_radio_checkable>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_opened<class_NativeMenu_method_is_opened>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_system_menu<class_NativeMenu_method_is_system_menu>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup<class_NativeMenu_method_popup>`\ (\ rid\: :ref:`RID<class_RID>`, position\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item<class_NativeMenu_method_remove_item>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_interface_direction<class_NativeMenu_method_set_interface_direction>`\ (\ rid\: :ref:`RID<class_RID>`, is_rtl\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_accelerator<class_NativeMenu_method_set_item_accelerator>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_callback<class_NativeMenu_method_set_item_callback>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_checkable<class_NativeMenu_method_set_item_checkable>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_checked<class_NativeMenu_method_set_item_checked>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_disabled<class_NativeMenu_method_set_item_disabled>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_hidden<class_NativeMenu_method_set_item_hidden>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_hover_callbacks<class_NativeMenu_method_set_item_hover_callbacks>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon<class_NativeMenu_method_set_item_icon>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_indentation_level<class_NativeMenu_method_set_item_indentation_level>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_key_callback<class_NativeMenu_method_set_item_key_callback>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_max_states<class_NativeMenu_method_set_item_max_states>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_radio_checkable<class_NativeMenu_method_set_item_radio_checkable>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_state<class_NativeMenu_method_set_item_state>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_submenu<class_NativeMenu_method_set_item_submenu>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, submenu_rid\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tag<class_NativeMenu_method_set_item_tag>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text<class_NativeMenu_method_set_item_text>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip<class_NativeMenu_method_set_item_tooltip>`\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_minimum_width<class_NativeMenu_method_set_minimum_width>`\ (\ rid\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_popup_close_callback<class_NativeMenu_method_set_popup_close_callback>`\ (\ rid\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_popup_open_callback<class_NativeMenu_method_set_popup_open_callback>`\ (\ rid\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_NativeMenu_Feature: + +.. rst-class:: classref-enumeration + +enum **Feature**: :ref:`🔗<enum_NativeMenu_Feature>` + +.. _class_NativeMenu_constant_FEATURE_GLOBAL_MENU: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_GLOBAL_MENU** = ``0`` + +**NativeMenu** supports native global main menu. + +.. _class_NativeMenu_constant_FEATURE_POPUP_MENU: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_POPUP_MENU** = ``1`` + +**NativeMenu** supports native popup menus. + +.. _class_NativeMenu_constant_FEATURE_OPEN_CLOSE_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_OPEN_CLOSE_CALLBACK** = ``2`` + +**NativeMenu** supports menu open and close callbacks. + +.. _class_NativeMenu_constant_FEATURE_HOVER_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_HOVER_CALLBACK** = ``3`` + +**NativeMenu** supports menu item hover callback. + +.. _class_NativeMenu_constant_FEATURE_KEY_CALLBACK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature<enum_NativeMenu_Feature>` **FEATURE_KEY_CALLBACK** = ``4`` + +**NativeMenu** supports menu item accelerator/key callback. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_NativeMenu_SystemMenus: + +.. rst-class:: classref-enumeration + +enum **SystemMenus**: :ref:`🔗<enum_NativeMenu_SystemMenus>` + +.. _class_NativeMenu_constant_INVALID_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **INVALID_MENU_ID** = ``0`` + +Invalid special system menu ID. + +.. _class_NativeMenu_constant_MAIN_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **MAIN_MENU_ID** = ``1`` + +Global main menu ID. + +.. _class_NativeMenu_constant_APPLICATION_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **APPLICATION_MENU_ID** = ``2`` + +Application (first menu after "Apple" menu on macOS) menu ID. + +.. _class_NativeMenu_constant_WINDOW_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **WINDOW_MENU_ID** = ``3`` + +"Window" menu ID (on macOS this menu includes standard window control items and a list of open windows). + +.. _class_NativeMenu_constant_HELP_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **HELP_MENU_ID** = ``4`` + +"Help" menu ID (on macOS this menu includes help search bar). + +.. _class_NativeMenu_constant_DOCK_MENU_ID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **DOCK_MENU_ID** = ``5`` + +Dock icon right-click menu ID (on macOS this menu include standard application control items and a list of open windows). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_NativeMenu_method_add_check_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_check_item**\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_check_item>` + +Adds a new checkable item with text ``label`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_icon_check_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_icon_check_item**\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_icon_check_item>` + +Adds a new checkable item with text ``label`` and icon ``icon`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_icon_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_icon_item**\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_icon_item>` + +Adds a new item with text ``label`` and icon ``icon`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_icon_radio_check_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_icon_radio_check_item**\ (\ rid\: :ref:`RID<class_RID>`, icon\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_icon_radio_check_item>` + +Adds a new radio-checkable item with text ``label`` and icon ``icon`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked<class_NativeMenu_method_set_item_checked>` for more info on how to control it. + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_item**\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_item>` + +Adds a new item with text ``label`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_multistate_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_multistate_item**\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_multistate_item>` + +Adds a new item with text ``label`` to the global menu ``rid``. + +Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** By default, there's no indication of the current item state, it should be changed manually. + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_radio_check_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_radio_check_item**\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, callback\: :ref:`Callable<class_Callable>` = Callable(), key_callback\: :ref:`Callable<class_Callable>` = Callable(), tag\: :ref:`Variant<class_Variant>` = null, accelerator\: :ref:`Key<enum_@GlobalScope_Key>` = 0, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_radio_check_item>` + +Adds a new radio-checkable item with text ``label`` to the global menu ``rid``. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`set_item_checked<class_NativeMenu_method_set_item_checked>` for more info on how to control it. + +\ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** On Windows, ``accelerator`` and ``key_callback`` are ignored. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_separator: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_separator**\ (\ rid\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_separator>` + +Adds a separator between items to the global menu ``rid``. Separators also occupy an index. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_add_submenu_item: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **add_submenu_item**\ (\ rid\: :ref:`RID<class_RID>`, label\: :ref:`String<class_String>`, submenu_rid\: :ref:`RID<class_RID>`, tag\: :ref:`Variant<class_Variant>` = null, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_NativeMenu_method_add_submenu_item>` + +Adds an item that will act as a submenu of the global menu ``rid``. The ``submenu_rid`` argument is the RID of the global menu that will be shown when the item is clicked. + +Returns index of the inserted item, it's not guaranteed to be the same as ``index`` value. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NativeMenu_method_clear>` + +Removes all items from the global menu ``rid``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_create_menu: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **create_menu**\ (\ ) :ref:`🔗<class_NativeMenu_method_create_menu>` + +Creates a new global menu object. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_find_item_index_with_submenu: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **find_item_index_with_submenu**\ (\ rid\: :ref:`RID<class_RID>`, submenu_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_find_item_index_with_submenu>` + +Returns the index of the item with the submenu specified by ``submenu_rid``. Indices are automatically assigned to each item by the engine, and cannot be set manually. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_find_item_index_with_tag: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **find_item_index_with_tag**\ (\ rid\: :ref:`RID<class_RID>`, tag\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_NativeMenu_method_find_item_index_with_tag>` + +Returns the index of the item with the specified ``tag``. Indices are automatically assigned to each item by the engine, and cannot be set manually. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_find_item_index_with_text: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **find_item_index_with_text**\ (\ rid\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_NativeMenu_method_find_item_index_with_text>` + +Returns the index of the item with the specified ``text``. Indices are automatically assigned to each item by the engine, and cannot be set manually. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_free_menu: + +.. rst-class:: classref-method + +|void| **free_menu**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NativeMenu_method_free_menu>` + +Frees a global menu object created by this **NativeMenu**. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_accelerator: + +.. rst-class:: classref-method + +:ref:`Key<enum_@GlobalScope_Key>` **get_item_accelerator**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_accelerator>` + +Returns the accelerator of the item at index ``idx``. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_callback: + +.. rst-class:: classref-method + +:ref:`Callable<class_Callable>` **get_item_callback**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_callback>` + +Returns the callback of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_count**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_count>` + +Returns number of items in the global menu ``rid``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_icon: + +.. rst-class:: classref-method + +:ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_icon>` + +Returns the icon of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_indentation_level: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_indentation_level**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_indentation_level>` + +Returns the horizontal offset of the item at the given ``idx``. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_key_callback: + +.. rst-class:: classref-method + +:ref:`Callable<class_Callable>` **get_item_key_callback**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_key_callback>` + +Returns the callback of the item accelerator at index ``idx``. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_max_states: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_max_states**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_max_states>` + +Returns number of states of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_state: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_state**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_state>` + +Returns the state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_submenu: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_item_submenu**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_submenu>` + +Returns the submenu ID of the item at index ``idx``. See :ref:`add_submenu_item<class_NativeMenu_method_add_submenu_item>` for more info on how to add a submenu. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_tag: + +.. rst-class:: classref-method + +:ref:`Variant<class_Variant>` **get_item_tag**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_tag>` + +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_tag<class_NativeMenu_method_set_item_tag>`, which provides a simple way of assigning context data to items. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_text: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_item_text**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_text>` + +Returns the text of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_item_tooltip: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_item_tooltip**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_item_tooltip>` + +Returns the tooltip associated with the specified index ``idx``. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_minimum_width: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **get_minimum_width**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_minimum_width>` + +Returns global menu minimum width. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_popup_close_callback: + +.. rst-class:: classref-method + +:ref:`Callable<class_Callable>` **get_popup_close_callback**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_popup_close_callback>` + +Returns global menu close callback. + +b]Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_popup_open_callback: + +.. rst-class:: classref-method + +:ref:`Callable<class_Callable>` **get_popup_open_callback**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_popup_open_callback>` + +Returns global menu open callback. + +b]Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_size: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **get_size**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_size>` + +Returns global menu size. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_system_menu: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_system_menu**\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_system_menu>` + +Returns RID of a special system menu. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_get_system_menu_name: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_system_menu_name**\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| :ref:`🔗<class_NativeMenu_method_get_system_menu_name>` + +Returns readable name of a special system menu. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_has_feature: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_NativeMenu_Feature>`\ ) |const| :ref:`🔗<class_NativeMenu_method_has_feature>` + +Returns ``true`` if the specified ``feature`` is supported by the current **NativeMenu**, ``false`` otherwise. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_has_menu: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_menu**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_has_menu>` + +Returns ``true`` if ``rid`` is valid global menu. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_has_system_menu: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_system_menu**\ (\ menu_id\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) |const| :ref:`🔗<class_NativeMenu_method_has_system_menu>` + +Returns ``true`` if a special system menu is supported. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_item_checkable: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_item_checkable**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_item_checkable>` + +Returns ``true`` if the item at index ``idx`` is checkable in some way, i.e. if it has a checkbox or radio button. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_item_checked: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_item_checked**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_item_checked>` + +Returns ``true`` if the item at index ``idx`` is checked. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_item_disabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_item_disabled**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_item_disabled>` + +Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. + +See :ref:`set_item_disabled<class_NativeMenu_method_set_item_disabled>` for more info on how to disable an item. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_item_hidden: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_item_hidden**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_item_hidden>` + +Returns ``true`` if the item at index ``idx`` is hidden. + +See :ref:`set_item_hidden<class_NativeMenu_method_set_item_hidden>` for more info on how to hide an item. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_item_radio_checkable: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_item_radio_checkable**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_item_radio_checkable>` + +Returns ``true`` if the item at index ``idx`` has radio button-style checkability. + +\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_opened: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_opened**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_opened>` + +Returns ``true`` if the menu is currently opened. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_is_system_menu: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_system_menu**\ (\ rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NativeMenu_method_is_system_menu>` + +Return ``true`` is global menu is a special system menu. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_popup: + +.. rst-class:: classref-method + +|void| **popup**\ (\ rid\: :ref:`RID<class_RID>`, position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_NativeMenu_method_popup>` + +Shows the global menu at ``position`` in the screen coordinates. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_remove_item: + +.. rst-class:: classref-method + +|void| **remove_item**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NativeMenu_method_remove_item>` + +Removes the item at index ``idx`` from the global menu ``rid``. + +\ **Note:** The indices of items after the removed item will be shifted by one. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_interface_direction: + +.. rst-class:: classref-method + +|void| **set_interface_direction**\ (\ rid\: :ref:`RID<class_RID>`, is_rtl\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_interface_direction>` + +Sets the menu text layout direction from right-to-left if ``is_rtl`` is ``true``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_accelerator: + +.. rst-class:: classref-method + +|void| **set_item_accelerator**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, keycode\: :ref:`Key<enum_@GlobalScope_Key>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_accelerator>` + +Sets the accelerator of the item at index ``idx``. ``keycode`` can be a single :ref:`Key<enum_@GlobalScope_Key>`, or a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_callback: + +.. rst-class:: classref-method + +|void| **set_item_callback**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_callback>` + +Sets the callback of the item at index ``idx``. Callback is emitted when an item is pressed. + +\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_checkable: + +.. rst-class:: classref-method + +|void| **set_item_checkable**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_checkable>` + +Sets whether the item at index ``idx`` has a checkbox. If ``false``, sets the type of the item to plain text. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_checked: + +.. rst-class:: classref-method + +|void| **set_item_checked**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_checked>` + +Sets the checkstate status of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_disabled: + +.. rst-class:: classref-method + +|void| **set_item_disabled**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_disabled>` + +Enables/disables the item at index ``idx``. When it is disabled, it can't be selected and its action can't be invoked. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_hidden: + +.. rst-class:: classref-method + +|void| **set_item_hidden**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_hidden>` + +Hides/shows the item at index ``idx``. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_hover_callbacks: + +.. rst-class:: classref-method + +|void| **set_item_hover_callbacks**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_hover_callbacks>` + +Sets the callback of the item at index ``idx``. The callback is emitted when an item is hovered. + +\ **Note:** The ``callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_icon: + +.. rst-class:: classref-method + +|void| **set_item_icon**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_icon>` + +Replaces the :ref:`Texture2D<class_Texture2D>` icon of the specified ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +\ **Note:** This method is not supported by macOS Dock menu items. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_indentation_level: + +.. rst-class:: classref-method + +|void| **set_item_indentation_level**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, level\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_indentation_level>` + +Sets the horizontal offset of the item at the given ``idx``. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_key_callback: + +.. rst-class:: classref-method + +|void| **set_item_key_callback**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, key_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_key_callback>` + +Sets the callback of the item at index ``idx``. Callback is emitted when its accelerator is activated. + +\ **Note:** The ``key_callback`` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the ``tag`` parameter when the menu item was created. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_max_states: + +.. rst-class:: classref-method + +|void| **set_item_max_states**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_max_states>` + +Sets number of state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_radio_checkable: + +.. rst-class:: classref-method + +|void| **set_item_radio_checkable**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, checkable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_radio_checkable>` + +Sets the type of the item at the specified index ``idx`` to radio button. If ``false``, sets the type of the item to plain text. + +\ **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_state: + +.. rst-class:: classref-method + +|void| **set_item_state**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_state>` + +Sets the state of a multistate item. See :ref:`add_multistate_item<class_NativeMenu_method_add_multistate_item>` for details. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_submenu: + +.. rst-class:: classref-method + +|void| **set_item_submenu**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, submenu_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_submenu>` + +Sets the submenu RID of the item at index ``idx``. The submenu is a global menu that would be shown when the item is clicked. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_tag: + +.. rst-class:: classref-method + +|void| **set_item_tag**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, tag\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_tag>` + +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_tag<class_NativeMenu_method_get_item_tag>`, which provides a simple way of assigning context data to items. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_text: + +.. rst-class:: classref-method + +|void| **set_item_text**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_text>` + +Sets the text of the item at index ``idx``. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_item_tooltip: + +.. rst-class:: classref-method + +|void| **set_item_tooltip**\ (\ rid\: :ref:`RID<class_RID>`, idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_NativeMenu_method_set_item_tooltip>` + +Sets the :ref:`String<class_String>` tooltip of the item at the specified index ``idx``. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_minimum_width: + +.. rst-class:: classref-method + +|void| **set_minimum_width**\ (\ rid\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NativeMenu_method_set_minimum_width>` + +Sets the minimum width of the global menu. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_popup_close_callback: + +.. rst-class:: classref-method + +|void| **set_popup_close_callback**\ (\ rid\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NativeMenu_method_set_popup_close_callback>` + +Registers callable to emit when the menu is about to show. + +\ **Note:** The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use :ref:`is_opened<class_NativeMenu_method_is_opened>` to check if the menu is currently opened. + +\ **Note:** This method is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NativeMenu_method_set_popup_open_callback: + +.. rst-class:: classref-method + +|void| **set_popup_open_callback**\ (\ rid\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NativeMenu_method_set_popup_open_callback>` + +Registers callable to emit after the menu is closed. + +\ **Note:** This method is implemented only on macOS. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationagent2d.rst b/classes/class_navigationagent2d.rst index 04b4afe2df1..c478eef2f29 100644 --- a/classes/class_navigationagent2d.rst +++ b/classes/class_navigationagent2d.rst @@ -10,6 +10,8 @@ NavigationAgent2D ================= +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A 2D agent used to pathfind to a position while avoiding obstacles. @@ -71,7 +73,7 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`path_max_distance<class_NavigationAgent2D_property_path_max_distance>` | ``100.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> | :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>` | ``7`` | + | |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] | :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>` | ``7`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` | :ref:`path_postprocessing<class_NavigationAgent2D_property_path_postprocessing>` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ @@ -79,6 +81,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`radius<class_NavigationAgent2D_property_radius>` | ``10.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float<class_float>` | :ref:`simplify_epsilon<class_NavigationAgent2D_property_simplify_epsilon>` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`simplify_path<class_NavigationAgent2D_property_simplify_path>` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` | ``10.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`target_position<class_NavigationAgent2D_property_target_position>` | ``Vector2(0, 0)`` | @@ -98,45 +104,45 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent2D_method_distance_to_target>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent2D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent2D_method_get_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_current_navigation_path<class_NavigationAgent2D_method_get_current_navigation_path>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent2D_method_get_current_navigation_path_index>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` | :ref:`get_current_navigation_result<class_NavigationAgent2D_method_get_current_navigation_result>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent2D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent2D_method_get_navigation_map>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent2D_method_get_rid>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent2D_method_is_target_reachable>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent2D_method_is_target_reached>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_layer_value<class_NavigationAgent2D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_mask_value<class_NavigationAgent2D_method_set_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationAgent2D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>` **(** :ref:`Vector2<class_Vector2>` velocity **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent2D_method_distance_to_target>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent2D_method_get_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent2D_method_get_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_current_navigation_path<class_NavigationAgent2D_method_get_current_navigation_path>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent2D_method_get_current_navigation_path_index>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` | :ref:`get_current_navigation_result<class_NavigationAgent2D_method_get_current_navigation_result>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent2D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent2D_method_get_navigation_map>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent2D_method_get_rid>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent2D_method_is_target_reachable>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent2D_method_is_target_reached>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_layer_value<class_NavigationAgent2D_method_set_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_mask_value<class_NavigationAgent2D_method_set_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationAgent2D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>`\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -151,9 +157,9 @@ Signals .. rst-class:: classref-signal -**link_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)** +**link_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_NavigationAgent2D_signal_link_reached>` -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>`: @@ -177,9 +183,11 @@ The details dictionary may contain the following keys depending on the value of .. rst-class:: classref-signal -**navigation_finished** **(** **)** +**navigation_finished**\ (\ ) :ref:`🔗<class_NavigationAgent2D_signal_navigation_finished>` -Notifies when the final position is reached. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached<class_NavigationAgent2D_signal_target_reached>` when the target is reachable. .. rst-class:: classref-item-separator @@ -189,9 +197,15 @@ Notifies when the final position is reached. .. rst-class:: classref-signal -**path_changed** **(** **)** +**path_changed**\ (\ ) :ref:`🔗<class_NavigationAgent2D_signal_path_changed>` + +Emitted when the agent had to update the loaded path: -Notifies when the navigation path changes. +- because path was previously empty. + +- because navigation map has changed. + +- because agent pushed further away from the current path segment than the :ref:`path_max_distance<class_NavigationAgent2D_property_path_max_distance>`. .. rst-class:: classref-item-separator @@ -201,9 +215,13 @@ Notifies when the navigation path changes. .. rst-class:: classref-signal -**target_reached** **(** **)** +**target_reached**\ (\ ) :ref:`🔗<class_NavigationAgent2D_signal_target_reached>` + +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. This signal is emitted only once per loaded path. -Notifies when the player-defined :ref:`target_position<class_NavigationAgent2D_property_target_position>` is reached. +This signal will be emitted just before :ref:`navigation_finished<class_NavigationAgent2D_signal_navigation_finished>` when the target is reachable. + +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`. .. rst-class:: classref-item-separator @@ -213,9 +231,9 @@ Notifies when the player-defined :ref:`target_position<class_NavigationAgent2D_p .. rst-class:: classref-signal -**velocity_computed** **(** :ref:`Vector2<class_Vector2>` safe_velocity **)** +**velocity_computed**\ (\ safe_velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationAgent2D_signal_velocity_computed>` -Notifies when the collision avoidance velocity is calculated. Emitted when :ref:`velocity<class_NavigationAgent2D_property_velocity>` is set. Only emitted when :ref:`avoidance_enabled<class_NavigationAgent2D_property_avoidance_enabled>` is true. +Notifies when the collision avoidance velocity is calculated. Emitted every update as long as :ref:`avoidance_enabled<class_NavigationAgent2D_property_avoidance_enabled>` is ``true`` and the agent has a navigation map. .. rst-class:: classref-item-separator @@ -225,9 +243,9 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: .. rst-class:: classref-signal -**waypoint_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)** +**waypoint_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_NavigationAgent2D_signal_waypoint_reached>` -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>`: @@ -252,12 +270,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **avoidance_enabled** = ``false`` +:ref:`bool<class_bool>` **avoidance_enabled** = ``false`` :ref:`🔗<class_NavigationAgent2D_property_avoidance_enabled>` .. rst-class:: classref-property-setget -- void **set_avoidance_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_avoidance_enabled** **(** **)** +- |void| **set_avoidance_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_avoidance_enabled**\ (\ ) If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D<class_NavigationServer2D>`. When :ref:`velocity<class_NavigationAgent2D_property_velocity>` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed<class_NavigationAgent2D_signal_velocity_computed>`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. @@ -269,12 +287,12 @@ If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`N .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_layers** = ``1`` +:ref:`int<class_int>` **avoidance_layers** = ``1`` :ref:`🔗<class_NavigationAgent2D_property_avoidance_layers>` .. rst-class:: classref-property-setget -- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_layers** **(** **)** +- |void| **set_avoidance_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_layers**\ (\ ) A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` will avoid this agent. @@ -286,12 +304,12 @@ A bitfield determining the avoidance layers for this NavigationAgent. Other agen .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_mask** = ``1`` +:ref:`int<class_int>` **avoidance_mask** = ``1`` :ref:`🔗<class_NavigationAgent2D_property_avoidance_mask>` .. rst-class:: classref-property-setget -- void **set_avoidance_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_mask** **(** **)** +- |void| **set_avoidance_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_mask**\ (\ ) A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>`. @@ -303,12 +321,12 @@ A bitfield determining what other avoidance agents and obstacles this Navigation .. rst-class:: classref-property -:ref:`float<class_float>` **avoidance_priority** = ``1.0`` +:ref:`float<class_float>` **avoidance_priority** = ``1.0`` :ref:`🔗<class_NavigationAgent2D_property_avoidance_priority>` .. rst-class:: classref-property-setget -- void **set_avoidance_priority** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_avoidance_priority** **(** **)** +- |void| **set_avoidance_priority**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_avoidance_priority**\ (\ ) The agent does not adjust the velocity for other agents that would match the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` but have a lower :ref:`avoidance_priority<class_NavigationAgent2D_property_avoidance_priority>`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. @@ -320,12 +338,12 @@ The agent does not adjust the velocity for other agents that would match the :re .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_enabled** = ``false`` +:ref:`bool<class_bool>` **debug_enabled** = ``false`` :ref:`🔗<class_NavigationAgent2D_property_debug_enabled>` .. rst-class:: classref-property-setget -- void **set_debug_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_debug_enabled** **(** **)** +- |void| **set_debug_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_debug_enabled**\ (\ ) If ``true`` shows debug visuals for this agent. @@ -337,12 +355,12 @@ If ``true`` shows debug visuals for this agent. .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug_path_custom_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **debug_path_custom_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_NavigationAgent2D_property_debug_path_custom_color>` .. rst-class:: classref-property-setget -- void **set_debug_path_custom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_debug_path_custom_color** **(** **)** +- |void| **set_debug_path_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_debug_path_custom_color**\ (\ ) If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this color for this agent instead of global color. @@ -354,12 +372,12 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is .. rst-class:: classref-property -:ref:`float<class_float>` **debug_path_custom_line_width** = ``-1.0`` +:ref:`float<class_float>` **debug_path_custom_line_width** = ``-1.0`` :ref:`🔗<class_NavigationAgent2D_property_debug_path_custom_line_width>` .. rst-class:: classref-property-setget -- void **set_debug_path_custom_line_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_debug_path_custom_line_width** **(** **)** +- |void| **set_debug_path_custom_line_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_debug_path_custom_line_width**\ (\ ) If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this line width for rendering paths for this agent instead of global line width. @@ -371,12 +389,12 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is .. rst-class:: classref-property -:ref:`float<class_float>` **debug_path_custom_point_size** = ``4.0`` +:ref:`float<class_float>` **debug_path_custom_point_size** = ``4.0`` :ref:`🔗<class_NavigationAgent2D_property_debug_path_custom_point_size>` .. rst-class:: classref-property-setget -- void **set_debug_path_custom_point_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_debug_path_custom_point_size** **(** **)** +- |void| **set_debug_path_custom_point_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_debug_path_custom_point_size**\ (\ ) If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this rasterized point size for rendering path points for this agent instead of global point size. @@ -388,12 +406,12 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_use_custom** = ``false`` +:ref:`bool<class_bool>` **debug_use_custom** = ``false`` :ref:`🔗<class_NavigationAgent2D_property_debug_use_custom>` .. rst-class:: classref-property-setget -- void **set_debug_use_custom** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_debug_use_custom** **(** **)** +- |void| **set_debug_use_custom**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_debug_use_custom**\ (\ ) If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent2D_property_debug_path_custom_color>` for this agent instead of global color. @@ -405,12 +423,12 @@ If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent .. rst-class:: classref-property -:ref:`int<class_int>` **max_neighbors** = ``10`` +:ref:`int<class_int>` **max_neighbors** = ``10`` :ref:`🔗<class_NavigationAgent2D_property_max_neighbors>` .. rst-class:: classref-property-setget -- void **set_max_neighbors** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_neighbors** **(** **)** +- |void| **set_max_neighbors**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_neighbors**\ (\ ) The maximum number of neighbors for the agent to consider. @@ -422,12 +440,12 @@ The maximum number of neighbors for the agent to consider. .. rst-class:: classref-property -:ref:`float<class_float>` **max_speed** = ``100.0`` +:ref:`float<class_float>` **max_speed** = ``100.0`` :ref:`🔗<class_NavigationAgent2D_property_max_speed>` .. rst-class:: classref-property-setget -- void **set_max_speed** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max_speed** **(** **)** +- |void| **set_max_speed**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max_speed**\ (\ ) The maximum speed that an agent can move. @@ -439,12 +457,12 @@ The maximum speed that an agent can move. .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationAgent2D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. @@ -456,12 +474,12 @@ A bitfield determining which navigation layers of navigation regions this agent .. rst-class:: classref-property -:ref:`float<class_float>` **neighbor_distance** = ``500.0`` +:ref:`float<class_float>` **neighbor_distance** = ``500.0`` :ref:`🔗<class_NavigationAgent2D_property_neighbor_distance>` .. rst-class:: classref-property-setget -- void **set_neighbor_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_neighbor_distance** **(** **)** +- |void| **set_neighbor_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_neighbor_distance**\ (\ ) The distance to search for other agents. @@ -473,14 +491,14 @@ The distance to search for other agents. .. rst-class:: classref-property -:ref:`float<class_float>` **path_desired_distance** = ``20.0`` +:ref:`float<class_float>` **path_desired_distance** = ``20.0`` :ref:`🔗<class_NavigationAgent2D_property_path_desired_distance>` .. rst-class:: classref-property-setget -- void **set_path_desired_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_path_desired_distance** **(** **)** +- |void| **set_path_desired_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_path_desired_distance**\ (\ ) -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead too leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -490,12 +508,12 @@ The distance threshold before a path point is considered to be reached. This all .. rst-class:: classref-property -:ref:`float<class_float>` **path_max_distance** = ``100.0`` +:ref:`float<class_float>` **path_max_distance** = ``100.0`` :ref:`🔗<class_NavigationAgent2D_property_path_max_distance>` .. rst-class:: classref-property-setget -- void **set_path_max_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_path_max_distance** **(** **)** +- |void| **set_path_max_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_path_max_distance**\ (\ ) The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. @@ -507,12 +525,12 @@ The maximum distance the agent is allowed away from the ideal path to the final .. rst-class:: classref-property -|bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **path_metadata_flags** = ``7`` +|bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **path_metadata_flags** = ``7`` :ref:`🔗<class_NavigationAgent2D_property_path_metadata_flags>` .. rst-class:: classref-property-setget -- void **set_path_metadata_flags** **(** |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> value **)** -- |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **get_path_metadata_flags** **(** **)** +- |void| **set_path_metadata_flags**\ (\ value\: |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\]\ ) +- |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **get_path_metadata_flags**\ (\ ) Additional information to return with the navigation path. @@ -524,12 +542,12 @@ Additional information to return with the navigation path. .. rst-class:: classref-property -:ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **path_postprocessing** = ``0`` +:ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **path_postprocessing** = ``0`` :ref:`🔗<class_NavigationAgent2D_property_path_postprocessing>` .. rst-class:: classref-property-setget -- void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` value **)** -- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing** **(** **)** +- |void| **set_path_postprocessing**\ (\ value\: :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>`\ ) +- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing**\ (\ ) The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationAgent2D_property_pathfinding_algorithm>`. @@ -541,12 +559,12 @@ The path postprocessing applied to the raw path corridor found by the :ref:`path .. rst-class:: classref-property -:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` +:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` :ref:`🔗<class_NavigationAgent2D_property_pathfinding_algorithm>` .. rst-class:: classref-property-setget -- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` value **)** -- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)** +- |void| **set_pathfinding_algorithm**\ (\ value\: :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>`\ ) +- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm**\ (\ ) The pathfinding algorithm used in the path query. @@ -558,12 +576,12 @@ The pathfinding algorithm used in the path query. .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``10.0`` +:ref:`float<class_float>` **radius** = ``10.0`` :ref:`🔗<class_NavigationAgent2D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_distance<class_NavigationAgent2D_property_neighbor_distance>`). @@ -573,18 +591,58 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake ---- +.. _class_NavigationAgent2D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **simplify_epsilon** = ``0.0`` :ref:`🔗<class_NavigationAgent2D_property_simplify_epsilon>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent2D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **simplify_path** = ``false`` :ref:`🔗<class_NavigationAgent2D_property_simplify_path>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon<class_NavigationAgent2D_property_simplify_epsilon>`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent2D_property_target_desired_distance: .. rst-class:: classref-property -:ref:`float<class_float>` **target_desired_distance** = ``10.0`` +:ref:`float<class_float>` **target_desired_distance** = ``10.0`` :ref:`🔗<class_NavigationAgent2D_property_target_desired_distance>` .. rst-class:: classref-property-setget -- void **set_target_desired_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_target_desired_distance** **(** **)** +- |void| **set_target_desired_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_target_desired_distance**\ (\ ) + +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached<class_NavigationAgent2D_signal_target_reached>` is emitted and navigation ends (see :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>` and :ref:`navigation_finished<class_NavigationAgent2D_signal_navigation_finished>`). -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general area. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -594,14 +652,14 @@ The distance threshold before the final target point is considered to be reached .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationAgent2D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_target_position**\ (\ ) -If set a new navigation path from the current agent position to the :ref:`target_position<class_NavigationAgent2D_property_target_position>` is requested from the NavigationServer. +If set, a new navigation path from the current agent position to the :ref:`target_position<class_NavigationAgent2D_property_target_position>` is requested from the NavigationServer. .. rst-class:: classref-item-separator @@ -611,12 +669,12 @@ If set a new navigation path from the current agent position to the :ref:`target .. rst-class:: classref-property -:ref:`float<class_float>` **time_horizon_agents** = ``1.0`` +:ref:`float<class_float>` **time_horizon_agents** = ``1.0`` :ref:`🔗<class_NavigationAgent2D_property_time_horizon_agents>` .. rst-class:: classref-property-setget -- void **set_time_horizon_agents** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_horizon_agents** **(** **)** +- |void| **set_time_horizon_agents**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_horizon_agents**\ (\ ) The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -628,12 +686,12 @@ The minimal amount of time for which this agent's velocities, that are computed .. rst-class:: classref-property -:ref:`float<class_float>` **time_horizon_obstacles** = ``0.0`` +:ref:`float<class_float>` **time_horizon_obstacles** = ``0.0`` :ref:`🔗<class_NavigationAgent2D_property_time_horizon_obstacles>` .. rst-class:: classref-property-setget -- void **set_time_horizon_obstacles** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_horizon_obstacles** **(** **)** +- |void| **set_time_horizon_obstacles**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_horizon_obstacles**\ (\ ) The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -645,12 +703,12 @@ The minimal amount of time for which this agent's velocities, that are computed .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationAgent2D_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ ) Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>` as well to reset the internal simulation velocity. @@ -667,7 +725,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to_target** **(** **)** |const| +:ref:`float<class_float>` **distance_to_target**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_distance_to_target>` Returns the distance to the target position, using the agent's global position. The user must set :ref:`target_position<class_NavigationAgent2D_property_target_position>` in order for this to be accurate. @@ -679,7 +737,7 @@ Returns the distance to the target position, using the agent's global position. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_avoidance_layer_value>` Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -691,7 +749,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_avoidance_mask_value>` Returns whether or not the specified mask of the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` bitmask is enabled, given a ``mask_number`` between 1 and 32. @@ -703,7 +761,7 @@ Returns whether or not the specified mask of the :ref:`avoidance_mask<class_Navi .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_current_navigation_path** **(** **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_current_navigation_path**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_current_navigation_path>` Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. @@ -715,7 +773,7 @@ Returns this agent's current path from start to finish in global coordinates. Th .. rst-class:: classref-method -:ref:`int<class_int>` **get_current_navigation_path_index** **(** **)** |const| +:ref:`int<class_int>` **get_current_navigation_path_index**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_current_navigation_path_index>` Returns which index the agent is currently on in the navigation path's :ref:`PackedVector2Array<class_PackedVector2Array>`. @@ -727,7 +785,7 @@ Returns which index the agent is currently on in the navigation path's :ref:`Pac .. rst-class:: classref-method -:ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` **get_current_navigation_result** **(** **)** |const| +:ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` **get_current_navigation_result**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_current_navigation_result>` Returns the path query result for the path the agent is currently following. @@ -739,9 +797,9 @@ Returns the path query result for the path the agent is currently following. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_final_position** **(** **)** +:ref:`Vector2<class_Vector2>` **get_final_position**\ (\ ) :ref:`🔗<class_NavigationAgent2D_method_get_final_position>` -Returns the reachable final position of the current navigation path in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. +Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the :ref:`path_changed<class_NavigationAgent2D_signal_path_changed>` signal. .. rst-class:: classref-item-separator @@ -751,7 +809,7 @@ Returns the reachable final position of the current navigation path in global co .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationAgent2D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -763,7 +821,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_navigation_map>` Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. @@ -775,7 +833,7 @@ Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_next_path_position** **(** **)** +:ref:`Vector2<class_Vector2>` **get_next_path_position**\ (\ ) :ref:`🔗<class_NavigationAgent2D_method_get_next_path_position>` Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. @@ -787,7 +845,7 @@ Returns the next position in global coordinates that can be moved to, making sur .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer2D<class_NavigationServer2D>`. @@ -799,9 +857,11 @@ Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer2D< .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_navigation_finished** **(** **)** +:ref:`bool<class_bool>` **is_navigation_finished**\ (\ ) :ref:`🔗<class_NavigationAgent2D_method_is_navigation_finished>` + +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -Returns true if the navigation path's final position has been reached. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -811,9 +871,9 @@ Returns true if the navigation path's final position has been reached. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_target_reachable** **(** **)** +:ref:`bool<class_bool>` **is_target_reachable**\ (\ ) :ref:`🔗<class_NavigationAgent2D_method_is_target_reachable>` -Returns true if :ref:`target_position<class_NavigationAgent2D_property_target_position>` is reachable. The target position is set using :ref:`target_position<class_NavigationAgent2D_property_target_position>`. +Returns ``true`` if :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>` is within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. .. rst-class:: classref-item-separator @@ -823,9 +883,9 @@ Returns true if :ref:`target_position<class_NavigationAgent2D_property_target_po .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_target_reached** **(** **)** |const| +:ref:`bool<class_bool>` **is_target_reached**\ (\ ) |const| :ref:`🔗<class_NavigationAgent2D_method_is_target_reached>` -Returns true if :ref:`target_position<class_NavigationAgent2D_property_target_position>` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`. .. rst-class:: classref-item-separator @@ -835,7 +895,7 @@ Returns true if :ref:`target_position<class_NavigationAgent2D_property_target_po .. rst-class:: classref-method -void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent2D_method_set_avoidance_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -847,7 +907,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan .. rst-class:: classref-method -void **set_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent2D_method_set_avoidance_mask_value>` Based on ``value``, enables or disables the specified mask in the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` bitmask, given a ``mask_number`` between 1 and 32. @@ -859,7 +919,7 @@ Based on ``value``, enables or disables the specified mask in the :ref:`avoidanc .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent2D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationAgent2D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -871,7 +931,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationAgent2D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node should use and also updates the ``agent`` on the NavigationServer. @@ -883,7 +943,7 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node s .. rst-class:: classref-method -void **set_velocity_forced** **(** :ref:`Vector2<class_Vector2>` velocity **)** +|void| **set_velocity_forced**\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationAgent2D_method_set_velocity_forced>` Replaces the internal velocity in the collision avoidance simulation with ``velocity``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. @@ -894,3 +954,4 @@ Replaces the internal velocity in the collision avoidance simulation with ``velo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationagent3d.rst b/classes/class_navigationagent3d.rst index 0aaf75c0b61..2d7ab5878cc 100644 --- a/classes/class_navigationagent3d.rst +++ b/classes/class_navigationagent3d.rst @@ -10,6 +10,8 @@ NavigationAgent3D ================= +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A 3D agent used to pathfind to a position while avoiding obstacles. @@ -59,6 +61,8 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`height<class_NavigationAgent3D_property_height>` | ``1.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`keep_y_velocity<class_NavigationAgent3D_property_keep_y_velocity>` | ``true`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int<class_int>` | :ref:`max_neighbors<class_NavigationAgent3D_property_max_neighbors>` | ``10`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`max_speed<class_NavigationAgent3D_property_max_speed>` | ``10.0`` | @@ -73,7 +77,7 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`path_max_distance<class_NavigationAgent3D_property_path_max_distance>` | ``5.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ - | |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> | :ref:`path_metadata_flags<class_NavigationAgent3D_property_path_metadata_flags>` | ``7`` | + | |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] | :ref:`path_metadata_flags<class_NavigationAgent3D_property_path_metadata_flags>` | ``7`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` | :ref:`path_postprocessing<class_NavigationAgent3D_property_path_postprocessing>` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ @@ -81,6 +85,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`radius<class_NavigationAgent3D_property_radius>` | ``0.5`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float<class_float>` | :ref:`simplify_epsilon<class_NavigationAgent3D_property_simplify_epsilon>` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`simplify_path<class_NavigationAgent3D_property_simplify_path>` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float<class_float>` | :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` | ``1.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`target_position<class_NavigationAgent3D_property_target_position>` | ``Vector3(0, 0, 0)`` | @@ -102,45 +110,45 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent3D_method_distance_to_target>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent3D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent3D_method_get_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_current_navigation_path<class_NavigationAgent3D_method_get_current_navigation_path>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent3D_method_get_current_navigation_path_index>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` | :ref:`get_current_navigation_result<class_NavigationAgent3D_method_get_current_navigation_result>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent3D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent3D_method_get_navigation_map>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_next_path_position<class_NavigationAgent3D_method_get_next_path_position>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent3D_method_get_rid>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent3D_method_is_navigation_finished>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent3D_method_is_target_reachable>` **(** **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent3D_method_is_target_reached>` **(** **)** |const| | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_layer_value<class_NavigationAgent3D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_mask_value<class_NavigationAgent3D_method_set_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationAgent3D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationAgent3D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_velocity_forced<class_NavigationAgent3D_method_set_velocity_forced>` **(** :ref:`Vector3<class_Vector3>` velocity **)** | - +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent3D_method_distance_to_target>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent3D_method_get_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent3D_method_get_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_current_navigation_path<class_NavigationAgent3D_method_get_current_navigation_path>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent3D_method_get_current_navigation_path_index>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` | :ref:`get_current_navigation_result<class_NavigationAgent3D_method_get_current_navigation_result>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent3D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent3D_method_get_navigation_map>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_next_path_position<class_NavigationAgent3D_method_get_next_path_position>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent3D_method_get_rid>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent3D_method_is_navigation_finished>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent3D_method_is_target_reachable>`\ (\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent3D_method_is_target_reached>`\ (\ ) |const| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_layer_value<class_NavigationAgent3D_method_set_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_mask_value<class_NavigationAgent3D_method_set_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationAgent3D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationAgent3D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_velocity_forced<class_NavigationAgent3D_method_set_velocity_forced>`\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,9 +163,9 @@ Signals .. rst-class:: classref-signal -**link_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)** +**link_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_NavigationAgent3D_signal_link_reached>` -Notifies when a navigation link has been reached. +Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` of the next position of the path when that position is a navigation link. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent3D_property_path_metadata_flags>`: @@ -169,9 +177,9 @@ The details dictionary may contain the following keys depending on the value of - ``owner``: The object which manages the link (usually :ref:`NavigationLink3D<class_NavigationLink3D>`). -- ``link_entry_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink2D<class_NavigationLink2D>`, it will contain the global position of the link's point the agent is entering. +- ``link_entry_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink3D<class_NavigationLink3D>`, it will contain the global position of the link's point the agent is entering. -- ``link_exit_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink2D<class_NavigationLink2D>`, it will contain the global position of the link's point which the agent is exiting. +- ``link_exit_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink3D<class_NavigationLink3D>`, it will contain the global position of the link's point which the agent is exiting. .. rst-class:: classref-item-separator @@ -181,9 +189,11 @@ The details dictionary may contain the following keys depending on the value of .. rst-class:: classref-signal -**navigation_finished** **(** **)** +**navigation_finished**\ (\ ) :ref:`🔗<class_NavigationAgent3D_signal_navigation_finished>` -Notifies when the final position is reached. +Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + +This signal will be emitted just after :ref:`target_reached<class_NavigationAgent3D_signal_target_reached>` when the target is reachable. .. rst-class:: classref-item-separator @@ -193,9 +203,15 @@ Notifies when the final position is reached. .. rst-class:: classref-signal -**path_changed** **(** **)** +**path_changed**\ (\ ) :ref:`🔗<class_NavigationAgent3D_signal_path_changed>` + +Emitted when the agent had to update the loaded path: + +- because path was previously empty. -Notifies when the navigation path changes. +- because navigation map has changed. + +- because agent pushed further away from the current path segment than the :ref:`path_max_distance<class_NavigationAgent3D_property_path_max_distance>`. .. rst-class:: classref-item-separator @@ -205,9 +221,13 @@ Notifies when the navigation path changes. .. rst-class:: classref-signal -**target_reached** **(** **)** +**target_reached**\ (\ ) :ref:`🔗<class_NavigationAgent3D_signal_target_reached>` + +Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent3D_property_target_position>`. This signal is emitted only once per loaded path. + +This signal will be emitted just before :ref:`navigation_finished<class_NavigationAgent3D_signal_navigation_finished>` when the target is reachable. -Notifies when the player-defined :ref:`target_position<class_NavigationAgent3D_property_target_position>` is reached. +It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>`. .. rst-class:: classref-item-separator @@ -217,9 +237,9 @@ Notifies when the player-defined :ref:`target_position<class_NavigationAgent3D_p .. rst-class:: classref-signal -**velocity_computed** **(** :ref:`Vector3<class_Vector3>` safe_velocity **)** +**velocity_computed**\ (\ safe_velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationAgent3D_signal_velocity_computed>` -Notifies when the collision avoidance velocity is calculated. Emitted when :ref:`velocity<class_NavigationAgent3D_property_velocity>` is set. Only emitted when :ref:`avoidance_enabled<class_NavigationAgent3D_property_avoidance_enabled>` is true. +Notifies when the collision avoidance velocity is calculated. Emitted every update as long as :ref:`avoidance_enabled<class_NavigationAgent3D_property_avoidance_enabled>` is ``true`` and the agent has a navigation map. .. rst-class:: classref-item-separator @@ -229,9 +249,9 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref: .. rst-class:: classref-signal -**waypoint_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)** +**waypoint_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_NavigationAgent3D_signal_waypoint_reached>` -Notifies when a waypoint along the path has been reached. +Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` of the next position of the path. The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags<class_NavigationAgent3D_property_path_metadata_flags>`: @@ -256,12 +276,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **avoidance_enabled** = ``false`` +:ref:`bool<class_bool>` **avoidance_enabled** = ``false`` :ref:`🔗<class_NavigationAgent3D_property_avoidance_enabled>` .. rst-class:: classref-property-setget -- void **set_avoidance_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_avoidance_enabled** **(** **)** +- |void| **set_avoidance_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_avoidance_enabled**\ (\ ) If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer3D<class_NavigationServer3D>`. When :ref:`velocity<class_NavigationAgent3D_property_velocity>` is set and the processing is completed a ``safe_velocity`` Vector3 is received with a signal connection to :ref:`velocity_computed<class_NavigationAgent3D_signal_velocity_computed>`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. @@ -273,14 +293,14 @@ If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`N .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_layers** = ``1`` +:ref:`int<class_int>` **avoidance_layers** = ``1`` :ref:`🔗<class_NavigationAgent3D_property_avoidance_layers>` .. rst-class:: classref-property-setget -- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_layers** **(** **)** +- |void| **set_avoidance_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_layers**\ (\ ) -A bitfield determining the avoidance layers for this NavigationAgent. Other agent's with a matching bit on the :ref:`avoidance_mask<class_NavigationAgent3D_property_avoidance_mask>` will avoid this agent. +A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the :ref:`avoidance_mask<class_NavigationAgent3D_property_avoidance_mask>` will avoid this agent. .. rst-class:: classref-item-separator @@ -290,12 +310,12 @@ A bitfield determining the avoidance layers for this NavigationAgent. Other agen .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_mask** = ``1`` +:ref:`int<class_int>` **avoidance_mask** = ``1`` :ref:`🔗<class_NavigationAgent3D_property_avoidance_mask>` .. rst-class:: classref-property-setget -- void **set_avoidance_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_mask** **(** **)** +- |void| **set_avoidance_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_mask**\ (\ ) A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their :ref:`avoidance_layers<class_NavigationAgent3D_property_avoidance_layers>`. @@ -307,12 +327,12 @@ A bitfield determining what other avoidance agents and obstacles this Navigation .. rst-class:: classref-property -:ref:`float<class_float>` **avoidance_priority** = ``1.0`` +:ref:`float<class_float>` **avoidance_priority** = ``1.0`` :ref:`🔗<class_NavigationAgent3D_property_avoidance_priority>` .. rst-class:: classref-property-setget -- void **set_avoidance_priority** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_avoidance_priority** **(** **)** +- |void| **set_avoidance_priority**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_avoidance_priority**\ (\ ) The agent does not adjust the velocity for other agents that would match the :ref:`avoidance_mask<class_NavigationAgent3D_property_avoidance_mask>` but have a lower :ref:`avoidance_priority<class_NavigationAgent3D_property_avoidance_priority>`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. @@ -324,12 +344,12 @@ The agent does not adjust the velocity for other agents that would match the :re .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_enabled** = ``false`` +:ref:`bool<class_bool>` **debug_enabled** = ``false`` :ref:`🔗<class_NavigationAgent3D_property_debug_enabled>` .. rst-class:: classref-property-setget -- void **set_debug_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_debug_enabled** **(** **)** +- |void| **set_debug_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_debug_enabled**\ (\ ) If ``true`` shows debug visuals for this agent. @@ -341,12 +361,12 @@ If ``true`` shows debug visuals for this agent. .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug_path_custom_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **debug_path_custom_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_NavigationAgent3D_property_debug_path_custom_color>` .. rst-class:: classref-property-setget -- void **set_debug_path_custom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_debug_path_custom_color** **(** **)** +- |void| **set_debug_path_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_debug_path_custom_color**\ (\ ) If :ref:`debug_use_custom<class_NavigationAgent3D_property_debug_use_custom>` is ``true`` uses this color for this agent instead of global color. @@ -358,12 +378,12 @@ If :ref:`debug_use_custom<class_NavigationAgent3D_property_debug_use_custom>` is .. rst-class:: classref-property -:ref:`float<class_float>` **debug_path_custom_point_size** = ``4.0`` +:ref:`float<class_float>` **debug_path_custom_point_size** = ``4.0`` :ref:`🔗<class_NavigationAgent3D_property_debug_path_custom_point_size>` .. rst-class:: classref-property-setget -- void **set_debug_path_custom_point_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_debug_path_custom_point_size** **(** **)** +- |void| **set_debug_path_custom_point_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_debug_path_custom_point_size**\ (\ ) If :ref:`debug_use_custom<class_NavigationAgent3D_property_debug_use_custom>` is ``true`` uses this rasterized point size for rendering path points for this agent instead of global point size. @@ -375,12 +395,12 @@ If :ref:`debug_use_custom<class_NavigationAgent3D_property_debug_use_custom>` is .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_use_custom** = ``false`` +:ref:`bool<class_bool>` **debug_use_custom** = ``false`` :ref:`🔗<class_NavigationAgent3D_property_debug_use_custom>` .. rst-class:: classref-property-setget -- void **set_debug_use_custom** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_debug_use_custom** **(** **)** +- |void| **set_debug_use_custom**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_debug_use_custom**\ (\ ) If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent3D_property_debug_path_custom_color>` for this agent instead of global color. @@ -392,12 +412,12 @@ If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent .. rst-class:: classref-property -:ref:`float<class_float>` **height** = ``1.0`` +:ref:`float<class_float>` **height** = ``1.0`` :ref:`🔗<class_NavigationAgent3D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height**\ (\ ) The height of the avoidance agent. Agents will ignore other agents or obstacles that are above or below their current position + height in 2D avoidance. Does nothing in 3D avoidance which uses radius spheres alone. @@ -405,16 +425,33 @@ The height of the avoidance agent. Agents will ignore other agents or obstacles ---- +.. _class_NavigationAgent3D_property_keep_y_velocity: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **keep_y_velocity** = ``true`` :ref:`🔗<class_NavigationAgent3D_property_keep_y_velocity>` + +.. rst-class:: classref-property-setget + +- |void| **set_keep_y_velocity**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_keep_y_velocity**\ (\ ) + +If ``true``, and the agent uses 2D avoidance, it will remember the set y-axis velocity and reapply it after the avoidance step. While 2D avoidance has no y-axis and simulates on a flat plane this setting can help to soften the most obvious clipping on uneven 3D geometry. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_max_neighbors: .. rst-class:: classref-property -:ref:`int<class_int>` **max_neighbors** = ``10`` +:ref:`int<class_int>` **max_neighbors** = ``10`` :ref:`🔗<class_NavigationAgent3D_property_max_neighbors>` .. rst-class:: classref-property-setget -- void **set_max_neighbors** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_neighbors** **(** **)** +- |void| **set_max_neighbors**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_neighbors**\ (\ ) The maximum number of neighbors for the agent to consider. @@ -426,12 +463,12 @@ The maximum number of neighbors for the agent to consider. .. rst-class:: classref-property -:ref:`float<class_float>` **max_speed** = ``10.0`` +:ref:`float<class_float>` **max_speed** = ``10.0`` :ref:`🔗<class_NavigationAgent3D_property_max_speed>` .. rst-class:: classref-property-setget -- void **set_max_speed** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max_speed** **(** **)** +- |void| **set_max_speed**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max_speed**\ (\ ) The maximum speed that an agent can move. @@ -443,12 +480,12 @@ The maximum speed that an agent can move. .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationAgent3D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. @@ -460,12 +497,12 @@ A bitfield determining which navigation layers of navigation regions this agent .. rst-class:: classref-property -:ref:`float<class_float>` **neighbor_distance** = ``50.0`` +:ref:`float<class_float>` **neighbor_distance** = ``50.0`` :ref:`🔗<class_NavigationAgent3D_property_neighbor_distance>` .. rst-class:: classref-property-setget -- void **set_neighbor_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_neighbor_distance** **(** **)** +- |void| **set_neighbor_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_neighbor_distance**\ (\ ) The distance to search for other agents. @@ -477,14 +514,14 @@ The distance to search for other agents. .. rst-class:: classref-property -:ref:`float<class_float>` **path_desired_distance** = ``1.0`` +:ref:`float<class_float>` **path_desired_distance** = ``1.0`` :ref:`🔗<class_NavigationAgent3D_property_path_desired_distance>` .. rst-class:: classref-property-setget -- void **set_path_desired_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_path_desired_distance** **(** **)** +- |void| **set_path_desired_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_path_desired_distance**\ (\ ) -The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the next point on each physics frame update. +The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. .. rst-class:: classref-item-separator @@ -494,12 +531,12 @@ The distance threshold before a path point is considered to be reached. This all .. rst-class:: classref-property -:ref:`float<class_float>` **path_height_offset** = ``0.0`` +:ref:`float<class_float>` **path_height_offset** = ``0.0`` :ref:`🔗<class_NavigationAgent3D_property_path_height_offset>` .. rst-class:: classref-property-setget -- void **set_path_height_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_path_height_offset** **(** **)** +- |void| **set_path_height_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_path_height_offset**\ (\ ) The height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. @@ -511,12 +548,12 @@ The height offset is subtracted from the y-axis value of any vector path positio .. rst-class:: classref-property -:ref:`float<class_float>` **path_max_distance** = ``5.0`` +:ref:`float<class_float>` **path_max_distance** = ``5.0`` :ref:`🔗<class_NavigationAgent3D_property_path_max_distance>` .. rst-class:: classref-property-setget -- void **set_path_max_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_path_max_distance** **(** **)** +- |void| **set_path_max_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_path_max_distance**\ (\ ) The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. @@ -528,12 +565,12 @@ The maximum distance the agent is allowed away from the ideal path to the final .. rst-class:: classref-property -|bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> **path_metadata_flags** = ``7`` +|bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] **path_metadata_flags** = ``7`` :ref:`🔗<class_NavigationAgent3D_property_path_metadata_flags>` .. rst-class:: classref-property-setget -- void **set_path_metadata_flags** **(** |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> value **)** -- |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> **get_path_metadata_flags** **(** **)** +- |void| **set_path_metadata_flags**\ (\ value\: |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\]\ ) +- |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] **get_path_metadata_flags**\ (\ ) Additional information to return with the navigation path. @@ -545,12 +582,12 @@ Additional information to return with the navigation path. .. rst-class:: classref-property -:ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **path_postprocessing** = ``0`` +:ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **path_postprocessing** = ``0`` :ref:`🔗<class_NavigationAgent3D_property_path_postprocessing>` .. rst-class:: classref-property-setget -- void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` value **)** -- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **get_path_postprocessing** **(** **)** +- |void| **set_path_postprocessing**\ (\ value\: :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>`\ ) +- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **get_path_postprocessing**\ (\ ) The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationAgent3D_property_pathfinding_algorithm>`. @@ -562,12 +599,12 @@ The path postprocessing applied to the raw path corridor found by the :ref:`path .. rst-class:: classref-property -:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` +:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` :ref:`🔗<class_NavigationAgent3D_property_pathfinding_algorithm>` .. rst-class:: classref-property-setget -- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` value **)** -- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)** +- |void| **set_pathfinding_algorithm**\ (\ value\: :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>`\ ) +- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **get_pathfinding_algorithm**\ (\ ) The pathfinding algorithm used in the path query. @@ -579,12 +616,12 @@ The pathfinding algorithm used in the path query. .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.5`` +:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_NavigationAgent3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_distance<class_NavigationAgent3D_property_neighbor_distance>`). @@ -594,18 +631,58 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake ---- +.. _class_NavigationAgent3D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **simplify_epsilon** = ``0.0`` :ref:`🔗<class_NavigationAgent3D_property_simplify_epsilon>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationAgent3D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **simplify_path** = ``false`` :ref:`🔗<class_NavigationAgent3D_property_simplify_path>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon<class_NavigationAgent3D_property_simplify_epsilon>`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_target_desired_distance: .. rst-class:: classref-property -:ref:`float<class_float>` **target_desired_distance** = ``1.0`` +:ref:`float<class_float>` **target_desired_distance** = ``1.0`` :ref:`🔗<class_NavigationAgent3D_property_target_desired_distance>` .. rst-class:: classref-property-setget -- void **set_target_desired_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_target_desired_distance** **(** **)** +- |void| **set_target_desired_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_target_desired_distance**\ (\ ) -The distance threshold before the final target point is considered to be reached. This allows agents to not have to hit the point of the final target exactly, but only to reach its general. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. +The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached<class_NavigationAgent3D_signal_target_reached>` is emitted and navigation ends (see :ref:`is_navigation_finished<class_NavigationAgent3D_method_is_navigation_finished>` and :ref:`navigation_finished<class_NavigationAgent3D_signal_navigation_finished>`). + +You can make navigation end early by setting this property to a value greater than :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` (navigation will end before reaching the last waypoint). + +You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. .. rst-class:: classref-item-separator @@ -615,14 +692,14 @@ The distance threshold before the final target point is considered to be reached .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationAgent3D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_target_position**\ (\ ) -If set a new navigation path from the current agent position to the :ref:`target_position<class_NavigationAgent3D_property_target_position>` is requested from the NavigationServer. +If set, a new navigation path from the current agent position to the :ref:`target_position<class_NavigationAgent3D_property_target_position>` is requested from the NavigationServer. .. rst-class:: classref-item-separator @@ -632,12 +709,12 @@ If set a new navigation path from the current agent position to the :ref:`target .. rst-class:: classref-property -:ref:`float<class_float>` **time_horizon_agents** = ``1.0`` +:ref:`float<class_float>` **time_horizon_agents** = ``1.0`` :ref:`🔗<class_NavigationAgent3D_property_time_horizon_agents>` .. rst-class:: classref-property-setget -- void **set_time_horizon_agents** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_horizon_agents** **(** **)** +- |void| **set_time_horizon_agents**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_horizon_agents**\ (\ ) The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -649,12 +726,12 @@ The minimal amount of time for which this agent's velocities, that are computed .. rst-class:: classref-property -:ref:`float<class_float>` **time_horizon_obstacles** = ``0.0`` +:ref:`float<class_float>` **time_horizon_obstacles** = ``0.0`` :ref:`🔗<class_NavigationAgent3D_property_time_horizon_obstacles>` .. rst-class:: classref-property-setget -- void **set_time_horizon_obstacles** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_horizon_obstacles** **(** **)** +- |void| **set_time_horizon_obstacles**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_horizon_obstacles**\ (\ ) The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -666,12 +743,12 @@ The minimal amount of time for which this agent's velocities, that are computed .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_3d_avoidance** = ``false`` +:ref:`bool<class_bool>` **use_3d_avoidance** = ``false`` :ref:`🔗<class_NavigationAgent3D_property_use_3d_avoidance>` .. rst-class:: classref-property-setget -- void **set_use_3d_avoidance** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_3d_avoidance** **(** **)** +- |void| **set_use_3d_avoidance**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_3d_avoidance**\ (\ ) If ``true``, the agent calculates avoidance velocities in 3D omnidirectionally, e.g. for games that take place in air, underwater or space. Agents using 3D avoidance only avoid other agents using 3D avoidance, and react to radius-based avoidance obstacles. They ignore any vertex-based obstacles. @@ -685,12 +762,12 @@ If ``false``, the agent calculates avoidance velocities in 2D along the x and z- .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationAgent3D_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_velocity**\ (\ ) Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced<class_NavigationAgent3D_method_set_velocity_forced>` as well to reset the internal simulation velocity. @@ -707,7 +784,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to_target** **(** **)** |const| +:ref:`float<class_float>` **distance_to_target**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_distance_to_target>` Returns the distance to the target position, using the agent's global position. The user must set :ref:`target_position<class_NavigationAgent3D_property_target_position>` in order for this to be accurate. @@ -719,7 +796,7 @@ Returns the distance to the target position, using the agent's global position. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_avoidance_layer_value>` Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationAgent3D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -731,7 +808,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_avoidance_mask_value>` Returns whether or not the specified mask of the :ref:`avoidance_mask<class_NavigationAgent3D_property_avoidance_mask>` bitmask is enabled, given a ``mask_number`` between 1 and 32. @@ -743,7 +820,7 @@ Returns whether or not the specified mask of the :ref:`avoidance_mask<class_Navi .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **get_current_navigation_path** **(** **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **get_current_navigation_path**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_current_navigation_path>` Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position<class_NavigationAgent3D_method_get_next_path_position>` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. @@ -755,7 +832,7 @@ Returns this agent's current path from start to finish in global coordinates. Th .. rst-class:: classref-method -:ref:`int<class_int>` **get_current_navigation_path_index** **(** **)** |const| +:ref:`int<class_int>` **get_current_navigation_path_index**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_current_navigation_path_index>` Returns which index the agent is currently on in the navigation path's :ref:`PackedVector3Array<class_PackedVector3Array>`. @@ -767,7 +844,7 @@ Returns which index the agent is currently on in the navigation path's :ref:`Pac .. rst-class:: classref-method -:ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` **get_current_navigation_result** **(** **)** |const| +:ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` **get_current_navigation_result**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_current_navigation_result>` Returns the path query result for the path the agent is currently following. @@ -779,9 +856,9 @@ Returns the path query result for the path the agent is currently following. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_final_position** **(** **)** +:ref:`Vector3<class_Vector3>` **get_final_position**\ (\ ) :ref:`🔗<class_NavigationAgent3D_method_get_final_position>` -Returns the reachable final position of the current navigation path in global coordinates. This position can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. +Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the :ref:`path_changed<class_NavigationAgent3D_signal_path_changed>` signal. .. rst-class:: classref-item-separator @@ -791,7 +868,7 @@ Returns the reachable final position of the current navigation path in global co .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationAgent3D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -803,7 +880,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_navigation_map>` Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationAgent3D_method_set_navigation_map>` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. @@ -815,7 +892,7 @@ Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_next_path_position** **(** **)** +:ref:`Vector3<class_Vector3>` **get_next_path_position**\ (\ ) :ref:`🔗<class_NavigationAgent3D_method_get_next_path_position>` Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. @@ -827,7 +904,7 @@ Returns the next position in global coordinates that can be moved to, making sur .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer3D<class_NavigationServer3D>`. @@ -839,9 +916,11 @@ Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer3D< .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_navigation_finished** **(** **)** +:ref:`bool<class_bool>` **is_navigation_finished**\ (\ ) :ref:`🔗<class_NavigationAgent3D_method_is_navigation_finished>` + +Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. -Returns true if the navigation path's final position has been reached. +\ **Note:** While ``true`` prefer to stop calling update functions like :ref:`get_next_path_position<class_NavigationAgent3D_method_get_next_path_position>`. This avoids jittering the standing agent due to calling repeated path updates. .. rst-class:: classref-item-separator @@ -851,9 +930,9 @@ Returns true if the navigation path's final position has been reached. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_target_reachable** **(** **)** +:ref:`bool<class_bool>` **is_target_reachable**\ (\ ) :ref:`🔗<class_NavigationAgent3D_method_is_target_reachable>` -Returns true if :ref:`target_position<class_NavigationAgent3D_property_target_position>` is reachable. The target position is set using :ref:`target_position<class_NavigationAgent3D_property_target_position>`. +Returns ``true`` if :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>` is within :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent3D_property_target_position>`. .. rst-class:: classref-item-separator @@ -863,9 +942,9 @@ Returns true if :ref:`target_position<class_NavigationAgent3D_property_target_po .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_target_reached** **(** **)** |const| +:ref:`bool<class_bool>` **is_target_reached**\ (\ ) |const| :ref:`🔗<class_NavigationAgent3D_method_is_target_reached>` -Returns true if :ref:`target_position<class_NavigationAgent3D_property_target_position>` is reached. It may not always be possible to reach the target position. It should always be possible to reach the final position though. See :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>`. +Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent3D_property_target_position>`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent3D_method_get_final_position>`. .. rst-class:: classref-item-separator @@ -875,7 +954,7 @@ Returns true if :ref:`target_position<class_NavigationAgent3D_property_target_po .. rst-class:: classref-method -void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent3D_method_set_avoidance_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationAgent3D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -887,7 +966,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan .. rst-class:: classref-method -void **set_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent3D_method_set_avoidance_mask_value>` Based on ``value``, enables or disables the specified mask in the :ref:`avoidance_mask<class_NavigationAgent3D_property_avoidance_mask>` bitmask, given a ``mask_number`` between 1 and 32. @@ -899,7 +978,7 @@ Based on ``value``, enables or disables the specified mask in the :ref:`avoidanc .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationAgent3D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationAgent3D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -911,7 +990,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationAgent3D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node should use and also updates the ``agent`` on the NavigationServer. @@ -923,7 +1002,7 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node s .. rst-class:: classref-method -void **set_velocity_forced** **(** :ref:`Vector3<class_Vector3>` velocity **)** +|void| **set_velocity_forced**\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationAgent3D_method_set_velocity_forced>` Replaces the internal velocity in the collision avoidance simulation with ``velocity``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. @@ -934,3 +1013,4 @@ Replaces the internal velocity in the collision avoidance simulation with ``velo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationlink2d.rst b/classes/class_navigationlink2d.rst index d7da9c51b34..ee524d16615 100644 --- a/classes/class_navigationlink2d.rst +++ b/classes/class_navigationlink2d.rst @@ -10,6 +10,8 @@ NavigationLink2D ================ +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A link between two positions on :ref:`NavigationRegion2D<class_NavigationRegion2D>`\ s that agents can be routed through. @@ -60,19 +62,21 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_global_end_position<class_NavigationLink2D_method_get_global_end_position>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_global_start_position<class_NavigationLink2D_method_get_global_start_position>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationLink2D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_global_end_position<class_NavigationLink2D_method_set_global_end_position>` **(** :ref:`Vector2<class_Vector2>` position **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_global_start_position<class_NavigationLink2D_method_set_global_start_position>` **(** :ref:`Vector2<class_Vector2>` position **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationLink2D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_global_end_position<class_NavigationLink2D_method_get_global_end_position>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_global_start_position<class_NavigationLink2D_method_get_global_start_position>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationLink2D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationLink2D_method_get_rid>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_global_end_position<class_NavigationLink2D_method_set_global_end_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_global_start_position<class_NavigationLink2D_method_set_global_start_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationLink2D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **bidirectional** = ``true`` +:ref:`bool<class_bool>` **bidirectional** = ``true`` :ref:`🔗<class_NavigationLink2D_property_bidirectional>` .. rst-class:: classref-property-setget -- void **set_bidirectional** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_bidirectional** **(** **)** +- |void| **set_bidirectional**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_bidirectional**\ (\ ) Whether this link can be traveled in both directions or only from :ref:`start_position<class_NavigationLink2D_property_start_position>` to :ref:`end_position<class_NavigationLink2D_property_end_position>`. @@ -104,12 +108,12 @@ Whether this link can be traveled in both directions or only from :ref:`start_po .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_NavigationLink2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) Whether this link is currently active. If ``false``, :ref:`NavigationServer2D.map_get_path<class_NavigationServer2D_method_map_get_path>` will ignore this link. @@ -121,12 +125,12 @@ Whether this link is currently active. If ``false``, :ref:`NavigationServer2D.ma .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **end_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **end_position** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationLink2D_property_end_position>` .. rst-class:: classref-property-setget -- void **set_end_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_end_position** **(** **)** +- |void| **set_end_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_end_position**\ (\ ) Ending position of the link. @@ -142,12 +146,12 @@ The distance the link will search is controlled by :ref:`NavigationServer2D.map_ .. rst-class:: classref-property -:ref:`float<class_float>` **enter_cost** = ``0.0`` +:ref:`float<class_float>` **enter_cost** = ``0.0`` :ref:`🔗<class_NavigationLink2D_property_enter_cost>` .. rst-class:: classref-property-setget -- void **set_enter_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_enter_cost** **(** **)** +- |void| **set_enter_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_enter_cost**\ (\ ) When pathfinding enters this link from another regions navigation mesh the :ref:`enter_cost<class_NavigationLink2D_property_enter_cost>` value is added to the path distance for determining the shortest path. @@ -159,12 +163,12 @@ When pathfinding enters this link from another regions navigation mesh the :ref: .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationLink2D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer2D.map_get_path<class_NavigationServer2D_method_map_get_path>`. @@ -176,12 +180,12 @@ A bitfield determining all navigation layers the link belongs to. These navigati .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **start_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **start_position** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationLink2D_property_start_position>` .. rst-class:: classref-property-setget -- void **set_start_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_start_position** **(** **)** +- |void| **set_start_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_start_position**\ (\ ) Starting position of the link. @@ -197,12 +201,12 @@ The distance the link will search is controlled by :ref:`NavigationServer2D.map_ .. rst-class:: classref-property -:ref:`float<class_float>` **travel_cost** = ``1.0`` +:ref:`float<class_float>` **travel_cost** = ``1.0`` :ref:`🔗<class_NavigationLink2D_property_travel_cost>` .. rst-class:: classref-property-setget -- void **set_travel_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_travel_cost** **(** **)** +- |void| **set_travel_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_travel_cost**\ (\ ) When pathfinding moves along the link the traveled distance is multiplied with :ref:`travel_cost<class_NavigationLink2D_property_travel_cost>` for determining the shortest path. @@ -219,7 +223,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_global_end_position** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_global_end_position**\ (\ ) |const| :ref:`🔗<class_NavigationLink2D_method_get_global_end_position>` Returns the :ref:`end_position<class_NavigationLink2D_property_end_position>` that is relative to the link as a global position. @@ -231,7 +235,7 @@ Returns the :ref:`end_position<class_NavigationLink2D_property_end_position>` th .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_global_start_position** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_global_start_position**\ (\ ) |const| :ref:`🔗<class_NavigationLink2D_method_get_global_start_position>` Returns the :ref:`start_position<class_NavigationLink2D_property_start_position>` that is relative to the link as a global position. @@ -243,7 +247,7 @@ Returns the :ref:`start_position<class_NavigationLink2D_property_start_position> .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationLink2D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationLink2D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -251,11 +255,23 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ ---- +.. _class_NavigationLink2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationLink2D_method_get_rid>` + +Returns the :ref:`RID<class_RID>` of this link on the :ref:`NavigationServer2D<class_NavigationServer2D>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink2D_method_set_global_end_position: .. rst-class:: classref-method -void **set_global_end_position** **(** :ref:`Vector2<class_Vector2>` position **)** +|void| **set_global_end_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationLink2D_method_set_global_end_position>` Sets the :ref:`end_position<class_NavigationLink2D_property_end_position>` that is relative to the link from a global ``position``. @@ -267,7 +283,7 @@ Sets the :ref:`end_position<class_NavigationLink2D_property_end_position>` that .. rst-class:: classref-method -void **set_global_start_position** **(** :ref:`Vector2<class_Vector2>` position **)** +|void| **set_global_start_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationLink2D_method_set_global_start_position>` Sets the :ref:`start_position<class_NavigationLink2D_property_start_position>` that is relative to the link from a global ``position``. @@ -279,7 +295,7 @@ Sets the :ref:`start_position<class_NavigationLink2D_property_start_position>` t .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationLink2D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationLink2D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -290,3 +306,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationlink3d.rst b/classes/class_navigationlink3d.rst index 9ed2fb436cd..11a90a70ecd 100644 --- a/classes/class_navigationlink3d.rst +++ b/classes/class_navigationlink3d.rst @@ -10,6 +10,8 @@ NavigationLink3D ================ +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A link between two positions on :ref:`NavigationRegion3D<class_NavigationRegion3D>`\ s that agents can be routed through. @@ -60,19 +62,21 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_global_end_position<class_NavigationLink3D_method_get_global_end_position>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_global_start_position<class_NavigationLink3D_method_get_global_start_position>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationLink3D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_global_end_position<class_NavigationLink3D_method_set_global_end_position>` **(** :ref:`Vector3<class_Vector3>` position **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_global_start_position<class_NavigationLink3D_method_set_global_start_position>` **(** :ref:`Vector3<class_Vector3>` position **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationLink3D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_global_end_position<class_NavigationLink3D_method_get_global_end_position>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_global_start_position<class_NavigationLink3D_method_get_global_start_position>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationLink3D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationLink3D_method_get_rid>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_global_end_position<class_NavigationLink3D_method_set_global_end_position>`\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_global_start_position<class_NavigationLink3D_method_set_global_start_position>`\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationLink3D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **bidirectional** = ``true`` +:ref:`bool<class_bool>` **bidirectional** = ``true`` :ref:`🔗<class_NavigationLink3D_property_bidirectional>` .. rst-class:: classref-property-setget -- void **set_bidirectional** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_bidirectional** **(** **)** +- |void| **set_bidirectional**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_bidirectional**\ (\ ) Whether this link can be traveled in both directions or only from :ref:`start_position<class_NavigationLink3D_property_start_position>` to :ref:`end_position<class_NavigationLink3D_property_end_position>`. @@ -104,12 +108,12 @@ Whether this link can be traveled in both directions or only from :ref:`start_po .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_NavigationLink3D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) Whether this link is currently active. If ``false``, :ref:`NavigationServer3D.map_get_path<class_NavigationServer3D_method_map_get_path>` will ignore this link. @@ -121,12 +125,12 @@ Whether this link is currently active. If ``false``, :ref:`NavigationServer3D.ma .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **end_position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **end_position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationLink3D_property_end_position>` .. rst-class:: classref-property-setget -- void **set_end_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_end_position** **(** **)** +- |void| **set_end_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_end_position**\ (\ ) Ending position of the link. @@ -142,12 +146,12 @@ The distance the link will search is controlled by :ref:`NavigationServer3D.map_ .. rst-class:: classref-property -:ref:`float<class_float>` **enter_cost** = ``0.0`` +:ref:`float<class_float>` **enter_cost** = ``0.0`` :ref:`🔗<class_NavigationLink3D_property_enter_cost>` .. rst-class:: classref-property-setget -- void **set_enter_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_enter_cost** **(** **)** +- |void| **set_enter_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_enter_cost**\ (\ ) When pathfinding enters this link from another regions navigation mesh the :ref:`enter_cost<class_NavigationLink3D_property_enter_cost>` value is added to the path distance for determining the shortest path. @@ -159,12 +163,12 @@ When pathfinding enters this link from another regions navigation mesh the :ref: .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationLink3D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with :ref:`NavigationServer3D.map_get_path<class_NavigationServer3D_method_map_get_path>`. @@ -176,12 +180,12 @@ A bitfield determining all navigation layers the link belongs to. These navigati .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **start_position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **start_position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationLink3D_property_start_position>` .. rst-class:: classref-property-setget -- void **set_start_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_start_position** **(** **)** +- |void| **set_start_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_start_position**\ (\ ) Starting position of the link. @@ -197,12 +201,12 @@ The distance the link will search is controlled by :ref:`NavigationServer3D.map_ .. rst-class:: classref-property -:ref:`float<class_float>` **travel_cost** = ``1.0`` +:ref:`float<class_float>` **travel_cost** = ``1.0`` :ref:`🔗<class_NavigationLink3D_property_travel_cost>` .. rst-class:: classref-property-setget -- void **set_travel_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_travel_cost** **(** **)** +- |void| **set_travel_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_travel_cost**\ (\ ) When pathfinding moves along the link the traveled distance is multiplied with :ref:`travel_cost<class_NavigationLink3D_property_travel_cost>` for determining the shortest path. @@ -219,7 +223,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_global_end_position** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_global_end_position**\ (\ ) |const| :ref:`🔗<class_NavigationLink3D_method_get_global_end_position>` Returns the :ref:`end_position<class_NavigationLink3D_property_end_position>` that is relative to the link as a global position. @@ -231,7 +235,7 @@ Returns the :ref:`end_position<class_NavigationLink3D_property_end_position>` th .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_global_start_position** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_global_start_position**\ (\ ) |const| :ref:`🔗<class_NavigationLink3D_method_get_global_start_position>` Returns the :ref:`start_position<class_NavigationLink3D_property_start_position>` that is relative to the link as a global position. @@ -243,7 +247,7 @@ Returns the :ref:`start_position<class_NavigationLink3D_property_start_position> .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationLink3D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationLink3D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -251,11 +255,23 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ ---- +.. _class_NavigationLink3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationLink3D_method_get_rid>` + +Returns the :ref:`RID<class_RID>` of this link on the :ref:`NavigationServer3D<class_NavigationServer3D>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationLink3D_method_set_global_end_position: .. rst-class:: classref-method -void **set_global_end_position** **(** :ref:`Vector3<class_Vector3>` position **)** +|void| **set_global_end_position**\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationLink3D_method_set_global_end_position>` Sets the :ref:`end_position<class_NavigationLink3D_property_end_position>` that is relative to the link from a global ``position``. @@ -267,7 +283,7 @@ Sets the :ref:`end_position<class_NavigationLink3D_property_end_position>` that .. rst-class:: classref-method -void **set_global_start_position** **(** :ref:`Vector3<class_Vector3>` position **)** +|void| **set_global_start_position**\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationLink3D_method_set_global_start_position>` Sets the :ref:`start_position<class_NavigationLink3D_property_start_position>` that is relative to the link from a global ``position``. @@ -279,7 +295,7 @@ Sets the :ref:`start_position<class_NavigationLink3D_property_start_position>` t .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationLink3D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationLink3D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -290,3 +306,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationmesh.rst b/classes/class_navigationmesh.rst index 3c115a0bc17..1562e6021af 100644 --- a/classes/class_navigationmesh.rst +++ b/classes/class_navigationmesh.rst @@ -10,6 +10,8 @@ NavigationMesh ============== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A navigation mesh that defines traversable areas and obstacles. @@ -26,10 +28,10 @@ A navigation mesh is a collection of polygons that define which areas of an envi Tutorials --------- -- `3D Navmesh Demo <https://godotengine.org/asset-library/asset/124>`__ - - :doc:`Using NavigationMeshes <../tutorials/navigation/navigation_using_navigationmeshes>` +- `3D Navigation Demo <https://godotengine.org/asset-library/asset/2743>`__ + .. rst-class:: classref-reftable-group Properties @@ -47,6 +49,8 @@ Properties +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float<class_float>` | :ref:`agent_radius<class_NavigationMesh_property_agent_radius>` | ``0.5`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`float<class_float>` | :ref:`border_size<class_NavigationMesh_property_border_size>` | ``0.0`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float<class_float>` | :ref:`cell_height<class_NavigationMesh_property_cell_height>` | ``0.25`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float<class_float>` | :ref:`cell_size<class_NavigationMesh_property_cell_size>` | ``0.25`` | @@ -57,7 +61,7 @@ Properties +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`float<class_float>` | :ref:`edge_max_error<class_NavigationMesh_property_edge_max_error>` | ``1.3`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`float<class_float>` | :ref:`edge_max_length<class_NavigationMesh_property_edge_max_length>` | ``12.0`` | + | :ref:`float<class_float>` | :ref:`edge_max_length<class_NavigationMesh_property_edge_max_length>` | ``0.0`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`AABB<class_AABB>` | :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` | ``AABB(0, 0, 0, 0, 0, 0)`` | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------------------+ @@ -94,25 +98,27 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_polygon<class_NavigationMesh_method_add_polygon>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` polygon **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_polygons<class_NavigationMesh_method_clear_polygons>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from_mesh<class_NavigationMesh_method_create_from_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_NavigationMesh_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_polygon<class_NavigationMesh_method_get_polygon>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationMesh_method_get_polygon_count>` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_vertices<class_NavigationMesh_method_get_vertices>` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_NavigationMesh_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertices<class_NavigationMesh_method_set_vertices>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_polygon<class_NavigationMesh_method_add_polygon>`\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NavigationMesh_method_clear>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_polygons<class_NavigationMesh_method_clear_polygons>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from_mesh<class_NavigationMesh_method_create_from_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_NavigationMesh_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_polygon<class_NavigationMesh_method_get_polygon>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationMesh_method_get_polygon_count>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_vertices<class_NavigationMesh_method_get_vertices>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_NavigationMesh_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertices<class_NavigationMesh_method_set_vertices>`\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -127,7 +133,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SamplePartitionType**: +enum **SamplePartitionType**: :ref:`🔗<enum_NavigationMesh_SamplePartitionType>` .. _class_NavigationMesh_constant_SAMPLE_PARTITION_WATERSHED: @@ -169,7 +175,7 @@ Represents the size of the :ref:`SamplePartitionType<enum_NavigationMesh_SampleP .. rst-class:: classref-enumeration -enum **ParsedGeometryType**: +enum **ParsedGeometryType**: :ref:`🔗<enum_NavigationMesh_ParsedGeometryType>` .. _class_NavigationMesh_constant_PARSED_GEOMETRY_MESH_INSTANCES: @@ -211,7 +217,7 @@ Represents the size of the :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGe .. rst-class:: classref-enumeration -enum **SourceGeometryMode**: +enum **SourceGeometryMode**: :ref:`🔗<enum_NavigationMesh_SourceGeometryMode>` .. _class_NavigationMesh_constant_SOURCE_GEOMETRY_ROOT_NODE_CHILDREN: @@ -258,12 +264,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **agent_height** = ``1.5`` +:ref:`float<class_float>` **agent_height** = ``1.5`` :ref:`🔗<class_NavigationMesh_property_agent_height>` .. rst-class:: classref-property-setget -- void **set_agent_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_agent_height** **(** **)** +- |void| **set_agent_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_agent_height**\ (\ ) The minimum floor to ceiling height that will still allow the floor area to be considered walkable. @@ -277,12 +283,12 @@ The minimum floor to ceiling height that will still allow the floor area to be c .. rst-class:: classref-property -:ref:`float<class_float>` **agent_max_climb** = ``0.25`` +:ref:`float<class_float>` **agent_max_climb** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_agent_max_climb>` .. rst-class:: classref-property-setget -- void **set_agent_max_climb** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_agent_max_climb** **(** **)** +- |void| **set_agent_max_climb**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_agent_max_climb**\ (\ ) The minimum ledge height that is considered to still be traversable. @@ -296,12 +302,12 @@ The minimum ledge height that is considered to still be traversable. .. rst-class:: classref-property -:ref:`float<class_float>` **agent_max_slope** = ``45.0`` +:ref:`float<class_float>` **agent_max_slope** = ``45.0`` :ref:`🔗<class_NavigationMesh_property_agent_max_slope>` .. rst-class:: classref-property-setget -- void **set_agent_max_slope** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_agent_max_slope** **(** **)** +- |void| **set_agent_max_slope**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_agent_max_slope**\ (\ ) The maximum slope that is considered walkable, in degrees. @@ -313,12 +319,12 @@ The maximum slope that is considered walkable, in degrees. .. rst-class:: classref-property -:ref:`float<class_float>` **agent_radius** = ``0.5`` +:ref:`float<class_float>` **agent_radius** = ``0.5`` :ref:`🔗<class_NavigationMesh_property_agent_radius>` .. rst-class:: classref-property-setget -- void **set_agent_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_agent_radius** **(** **)** +- |void| **set_agent_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_agent_radius**\ (\ ) The distance to erode/shrink the walkable area of the heightfield away from obstructions. @@ -328,16 +334,37 @@ The distance to erode/shrink the walkable area of the heightfield away from obst ---- +.. _class_NavigationMesh_property_border_size: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **border_size** = ``0.0`` :ref:`🔗<class_NavigationMesh_property_border_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_border_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_border_size**\ (\ ) + +The size of the non-navigable border around the bake bounding area. + +In conjunction with the :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` and a :ref:`edge_max_error<class_NavigationMesh_property_edge_max_error>` value at ``1.0`` or below the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by :ref:`agent_radius<class_NavigationMesh_property_agent_radius>`. + +\ **Note:** While baking and not zero, this value will be rounded up to the nearest multiple of :ref:`cell_size<class_NavigationMesh_property_cell_size>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMesh_property_cell_height: .. rst-class:: classref-property -:ref:`float<class_float>` **cell_height** = ``0.25`` +:ref:`float<class_float>` **cell_height** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_cell_height>` .. rst-class:: classref-property-setget -- void **set_cell_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cell_height** **(** **)** +- |void| **set_cell_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cell_height**\ (\ ) The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map. @@ -349,12 +376,12 @@ The cell height used to rasterize the navigation mesh vertices on the Y axis. Mu .. rst-class:: classref-property -:ref:`float<class_float>` **cell_size** = ``0.25`` +:ref:`float<class_float>` **cell_size** = ``0.25`` :ref:`🔗<class_NavigationMesh_property_cell_size>` .. rst-class:: classref-property-setget -- void **set_cell_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cell_size** **(** **)** +- |void| **set_cell_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cell_size**\ (\ ) The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map. @@ -366,12 +393,12 @@ The cell size used to rasterize the navigation mesh vertices on the XZ plane. Mu .. rst-class:: classref-property -:ref:`float<class_float>` **detail_sample_distance** = ``6.0`` +:ref:`float<class_float>` **detail_sample_distance** = ``6.0`` :ref:`🔗<class_NavigationMesh_property_detail_sample_distance>` .. rst-class:: classref-property-setget -- void **set_detail_sample_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_detail_sample_distance** **(** **)** +- |void| **set_detail_sample_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_detail_sample_distance**\ (\ ) The sampling distance to use when generating the detail mesh, in cell unit. @@ -383,12 +410,12 @@ The sampling distance to use when generating the detail mesh, in cell unit. .. rst-class:: classref-property -:ref:`float<class_float>` **detail_sample_max_error** = ``1.0`` +:ref:`float<class_float>` **detail_sample_max_error** = ``1.0`` :ref:`🔗<class_NavigationMesh_property_detail_sample_max_error>` .. rst-class:: classref-property-setget -- void **set_detail_sample_max_error** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_detail_sample_max_error** **(** **)** +- |void| **set_detail_sample_max_error**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_detail_sample_max_error**\ (\ ) The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. @@ -400,12 +427,12 @@ The maximum distance the detail mesh surface should deviate from heightfield, in .. rst-class:: classref-property -:ref:`float<class_float>` **edge_max_error** = ``1.3`` +:ref:`float<class_float>` **edge_max_error** = ``1.3`` :ref:`🔗<class_NavigationMesh_property_edge_max_error>` .. rst-class:: classref-property-setget -- void **set_edge_max_error** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_edge_max_error** **(** **)** +- |void| **set_edge_max_error**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_edge_max_error**\ (\ ) The maximum distance a simplified contour's border edges should deviate the original raw contour. @@ -417,14 +444,14 @@ The maximum distance a simplified contour's border edges should deviate the orig .. rst-class:: classref-property -:ref:`float<class_float>` **edge_max_length** = ``12.0`` +:ref:`float<class_float>` **edge_max_length** = ``0.0`` :ref:`🔗<class_NavigationMesh_property_edge_max_length>` .. rst-class:: classref-property-setget -- void **set_edge_max_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_edge_max_length** **(** **)** +- |void| **set_edge_max_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_edge_max_length**\ (\ ) -The maximum allowed length for contour edges along the border of the mesh. +The maximum allowed length for contour edges along the border of the mesh. A value of ``0.0`` disables this feature. \ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_size<class_NavigationMesh_property_cell_size>`. @@ -436,12 +463,12 @@ The maximum allowed length for contour edges along the border of the mesh. .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **filter_baking_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` +:ref:`AABB<class_AABB>` **filter_baking_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_NavigationMesh_property_filter_baking_aabb>` .. rst-class:: classref-property-setget -- void **set_filter_baking_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_filter_baking_aabb** **(** **)** +- |void| **set_filter_baking_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_filter_baking_aabb**\ (\ ) If the baking :ref:`AABB<class_AABB>` has a volume the navigation mesh baking will be restricted to its enclosing area. @@ -453,12 +480,12 @@ If the baking :ref:`AABB<class_AABB>` has a volume the navigation mesh baking wi .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **filter_baking_aabb_offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **filter_baking_aabb_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationMesh_property_filter_baking_aabb_offset>` .. rst-class:: classref-property-setget -- void **set_filter_baking_aabb_offset** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_filter_baking_aabb_offset** **(** **)** +- |void| **set_filter_baking_aabb_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_filter_baking_aabb_offset**\ (\ ) The position offset applied to the :ref:`filter_baking_aabb<class_NavigationMesh_property_filter_baking_aabb>` :ref:`AABB<class_AABB>`. @@ -470,12 +497,12 @@ The position offset applied to the :ref:`filter_baking_aabb<class_NavigationMesh .. rst-class:: classref-property -:ref:`bool<class_bool>` **filter_ledge_spans** = ``false`` +:ref:`bool<class_bool>` **filter_ledge_spans** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_ledge_spans>` .. rst-class:: classref-property-setget -- void **set_filter_ledge_spans** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_filter_ledge_spans** **(** **)** +- |void| **set_filter_ledge_spans**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_filter_ledge_spans**\ (\ ) If ``true``, marks spans that are ledges as non-walkable. @@ -487,12 +514,12 @@ If ``true``, marks spans that are ledges as non-walkable. .. rst-class:: classref-property -:ref:`bool<class_bool>` **filter_low_hanging_obstacles** = ``false`` +:ref:`bool<class_bool>` **filter_low_hanging_obstacles** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_low_hanging_obstacles>` .. rst-class:: classref-property-setget -- void **set_filter_low_hanging_obstacles** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_filter_low_hanging_obstacles** **(** **)** +- |void| **set_filter_low_hanging_obstacles**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_filter_low_hanging_obstacles**\ (\ ) If ``true``, marks non-walkable spans as walkable if their maximum is within :ref:`agent_max_climb<class_NavigationMesh_property_agent_max_climb>` of a walkable neighbor. @@ -504,12 +531,12 @@ If ``true``, marks non-walkable spans as walkable if their maximum is within :re .. rst-class:: classref-property -:ref:`bool<class_bool>` **filter_walkable_low_height_spans** = ``false`` +:ref:`bool<class_bool>` **filter_walkable_low_height_spans** = ``false`` :ref:`🔗<class_NavigationMesh_property_filter_walkable_low_height_spans>` .. rst-class:: classref-property-setget -- void **set_filter_walkable_low_height_spans** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_filter_walkable_low_height_spans** **(** **)** +- |void| **set_filter_walkable_low_height_spans**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_filter_walkable_low_height_spans**\ (\ ) If ``true``, marks walkable spans as not walkable if the clearance above the span is less than :ref:`agent_height<class_NavigationMesh_property_agent_height>`. @@ -521,12 +548,12 @@ If ``true``, marks walkable spans as not walkable if the clearance above the spa .. rst-class:: classref-property -:ref:`int<class_int>` **geometry_collision_mask** = ``4294967295`` +:ref:`int<class_int>` **geometry_collision_mask** = ``4294967295`` :ref:`🔗<class_NavigationMesh_property_geometry_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers to scan for static colliders. @@ -540,12 +567,12 @@ Only used when :ref:`geometry_parsed_geometry_type<class_NavigationMesh_property .. rst-class:: classref-property -:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **geometry_parsed_geometry_type** = ``0`` +:ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **geometry_parsed_geometry_type** = ``0`` :ref:`🔗<class_NavigationMesh_property_geometry_parsed_geometry_type>` .. rst-class:: classref-property-setget -- void **set_parsed_geometry_type** **(** :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` value **)** -- :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **get_parsed_geometry_type** **(** **)** +- |void| **set_parsed_geometry_type**\ (\ value\: :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>`\ ) +- :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` **get_parsed_geometry_type**\ (\ ) Determines which type of nodes will be parsed as geometry. See :ref:`ParsedGeometryType<enum_NavigationMesh_ParsedGeometryType>` for possible values. @@ -557,12 +584,12 @@ Determines which type of nodes will be parsed as geometry. See :ref:`ParsedGeome .. rst-class:: classref-property -:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **geometry_source_geometry_mode** = ``0`` +:ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **geometry_source_geometry_mode** = ``0`` :ref:`🔗<class_NavigationMesh_property_geometry_source_geometry_mode>` .. rst-class:: classref-property-setget -- void **set_source_geometry_mode** **(** :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` value **)** -- :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **get_source_geometry_mode** **(** **)** +- |void| **set_source_geometry_mode**\ (\ value\: :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>`\ ) +- :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` **get_source_geometry_mode**\ (\ ) The source of the geometry used when baking. See :ref:`SourceGeometryMode<enum_NavigationMesh_SourceGeometryMode>` for possible values. @@ -574,12 +601,12 @@ The source of the geometry used when baking. See :ref:`SourceGeometryMode<enum_N .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **geometry_source_group_name** = ``&"navigation_mesh_source_group"`` +:ref:`StringName<class_StringName>` **geometry_source_group_name** = ``&"navigation_mesh_source_group"`` :ref:`🔗<class_NavigationMesh_property_geometry_source_group_name>` .. rst-class:: classref-property-setget -- void **set_source_group_name** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_source_group_name** **(** **)** +- |void| **set_source_group_name**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_source_group_name**\ (\ ) The name of the group to scan for geometry. @@ -593,12 +620,12 @@ Only used when :ref:`geometry_source_geometry_mode<class_NavigationMesh_property .. rst-class:: classref-property -:ref:`float<class_float>` **region_merge_size** = ``20.0`` +:ref:`float<class_float>` **region_merge_size** = ``20.0`` :ref:`🔗<class_NavigationMesh_property_region_merge_size>` .. rst-class:: classref-property-setget -- void **set_region_merge_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_region_merge_size** **(** **)** +- |void| **set_region_merge_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_region_merge_size**\ (\ ) Any regions with a size smaller than this will be merged with larger regions if possible. @@ -612,12 +639,12 @@ Any regions with a size smaller than this will be merged with larger regions if .. rst-class:: classref-property -:ref:`float<class_float>` **region_min_size** = ``2.0`` +:ref:`float<class_float>` **region_min_size** = ``2.0`` :ref:`🔗<class_NavigationMesh_property_region_min_size>` .. rst-class:: classref-property-setget -- void **set_region_min_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_region_min_size** **(** **)** +- |void| **set_region_min_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_region_min_size**\ (\ ) The minimum size of a region for it to be created. @@ -631,12 +658,12 @@ The minimum size of a region for it to be created. .. rst-class:: classref-property -:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **sample_partition_type** = ``0`` +:ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **sample_partition_type** = ``0`` :ref:`🔗<class_NavigationMesh_property_sample_partition_type>` .. rst-class:: classref-property-setget -- void **set_sample_partition_type** **(** :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` value **)** -- :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **get_sample_partition_type** **(** **)** +- |void| **set_sample_partition_type**\ (\ value\: :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>`\ ) +- :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` **get_sample_partition_type**\ (\ ) Partitioning algorithm for creating the navigation mesh polys. See :ref:`SamplePartitionType<enum_NavigationMesh_SamplePartitionType>` for possible values. @@ -648,12 +675,12 @@ Partitioning algorithm for creating the navigation mesh polys. See :ref:`SampleP .. rst-class:: classref-property -:ref:`float<class_float>` **vertices_per_polygon** = ``6.0`` +:ref:`float<class_float>` **vertices_per_polygon** = ``6.0`` :ref:`🔗<class_NavigationMesh_property_vertices_per_polygon>` .. rst-class:: classref-property-setget -- void **set_vertices_per_polygon** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_vertices_per_polygon** **(** **)** +- |void| **set_vertices_per_polygon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vertices_per_polygon**\ (\ ) The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. @@ -670,7 +697,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_polygon** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` polygon **)** +|void| **add_polygon**\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_NavigationMesh_method_add_polygon>` Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices<class_NavigationMesh_method_get_vertices>`. @@ -678,11 +705,23 @@ Adds a polygon using the indices of the vertices you get when calling :ref:`get_ ---- +.. _class_NavigationMesh_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗<class_NavigationMesh_method_clear>` + +Clears the internal arrays for vertices and polygon indices. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMesh_method_clear_polygons: .. rst-class:: classref-method -void **clear_polygons** **(** **)** +|void| **clear_polygons**\ (\ ) :ref:`🔗<class_NavigationMesh_method_clear_polygons>` Clears the array of polygons, but it doesn't clear the array of vertices. @@ -694,7 +733,7 @@ Clears the array of polygons, but it doesn't clear the array of vertices. .. rst-class:: classref-method -void **create_from_mesh** **(** :ref:`Mesh<class_Mesh>` mesh **)** +|void| **create_from_mesh**\ (\ mesh\: :ref:`Mesh<class_Mesh>`\ ) :ref:`🔗<class_NavigationMesh_method_create_from_mesh>` Initializes the navigation mesh by setting the vertices and indices according to a :ref:`Mesh<class_Mesh>`. @@ -708,7 +747,7 @@ Initializes the navigation mesh by setting the vertices and indices according to .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -720,7 +759,7 @@ Returns whether or not the specified layer of the :ref:`geometry_collision_mask< .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_polygon** **(** :ref:`int<class_int>` idx **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_polygon**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationMesh_method_get_polygon>` Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` containing the indices of the vertices of a created polygon. @@ -732,7 +771,7 @@ Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` containing the indices .. rst-class:: classref-method -:ref:`int<class_int>` **get_polygon_count** **(** **)** |const| +:ref:`int<class_int>` **get_polygon_count**\ (\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_polygon_count>` Returns the number of polygons in the navigation mesh. @@ -744,7 +783,7 @@ Returns the number of polygons in the navigation mesh. .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices** **(** **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices**\ (\ ) |const| :ref:`🔗<class_NavigationMesh_method_get_vertices>` Returns a :ref:`PackedVector3Array<class_PackedVector3Array>` containing all the vertices being used to create the polygons. @@ -756,7 +795,7 @@ Returns a :ref:`PackedVector3Array<class_PackedVector3Array>` containing all the .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationMesh_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`geometry_collision_mask<class_NavigationMesh_property_geometry_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -768,7 +807,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`geometr .. rst-class:: classref-method -void **set_vertices** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** +|void| **set_vertices**\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_NavigationMesh_method_set_vertices>` Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon<class_NavigationMesh_method_add_polygon>` method. @@ -779,3 +818,4 @@ Sets the vertices that can be then indexed to create polygons with the :ref:`add .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationmeshgenerator.rst b/classes/class_navigationmeshgenerator.rst index 78966926def..69f5e44a213 100644 --- a/classes/class_navigationmeshgenerator.rst +++ b/classes/class_navigationmeshgenerator.rst @@ -10,6 +10,8 @@ NavigationMeshGenerator ======================= +**Deprecated:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Object<class_Object>` Helper class for creating and clearing navigation meshes. @@ -21,7 +23,7 @@ Description This class is responsible for creating and clearing 3D navigation meshes used as :ref:`NavigationMesh<class_NavigationMesh>` resources inside :ref:`NavigationRegion3D<class_NavigationRegion3D>`. The **NavigationMeshGenerator** has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. -The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very performance and time hungry operations. +The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very slow and performance-intensive operations. Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the :ref:`NavigationMesh<class_NavigationMesh>` resource. In the first step, starting from a root node and depending on :ref:`NavigationMesh<class_NavigationMesh>` properties all valid 3D source geometry nodes are collected from the :ref:`SceneTree<class_SceneTree>`. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal :ref:`MeshInstance3D<class_MeshInstance3D>`\ s to :ref:`CSGShape3D<class_CSGShape3D>`\ s or various :ref:`CollisionObject3D<class_CollisionObject3D>`\ s, some operations to collect geometry data can trigger :ref:`RenderingServer<class_RenderingServer>` and :ref:`PhysicsServer3D<class_PhysicsServer3D>` synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves :ref:`Mutex<class_Mutex>` locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total number of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to :ref:`NavigationMesh<class_NavigationMesh>` agent properties by creating a voxel world around the meshes bounding area. @@ -44,15 +46,15 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake<class_NavigationMeshGenerator_method_bake>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake_from_source_geometry_data<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_NavigationMeshGenerator_method_clear>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_source_geometry_data<class_NavigationMeshGenerator_method_parse_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake<class_NavigationMeshGenerator_method_bake>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_from_source_geometry_data<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NavigationMeshGenerator_method_clear>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`parse_source_geometry_data<class_NavigationMeshGenerator_method_parse_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,9 +69,11 @@ Method Descriptions .. rst-class:: classref-method -void **bake** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)** +|void| **bake**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_NavigationMeshGenerator_method_bake>` + +**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` resource. Use this resource with :ref:`parse_source_geometry_data<class_NavigationMeshGenerator_method_parse_source_geometry_data>` to parse the :ref:`SceneTree<class_SceneTree>` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree<class_SceneTree>` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>` to bake a navigation mesh. -The bake function is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` resource. Use this resource with :ref:`parse_source_geometry_data<class_NavigationMeshGenerator_method_parse_source_geometry_data>` to parse the SceneTree for nodes that should contribute to the navigation mesh baking. The SceneTree parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>` to bake a navigation mesh. +Bakes the ``navigation_mesh`` with source geometry collected starting from the ``root_node``. .. rst-class:: classref-item-separator @@ -79,7 +83,7 @@ The bake function is deprecated due to core threading changes. To upgrade existi .. rst-class:: classref-method -void **bake_from_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** +|void| **bake_from_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>` Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data``. After the process is finished the optional ``callback`` will be called. @@ -91,7 +95,7 @@ Bakes the provided ``navigation_mesh`` with the data from the provided ``source_ .. rst-class:: classref-method -void **clear** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** +|void| **clear**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) :ref:`🔗<class_NavigationMeshGenerator_method_clear>` Removes all polygons and vertices from the provided ``navigation_mesh`` resource. @@ -103,7 +107,7 @@ Removes all polygons and vertices from the provided ``navigation_mesh`` resource .. rst-class:: classref-method -void **parse_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)** +|void| **parse_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationMeshGenerator_method_parse_source_geometry_data>` Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data<class_NavigationMeshGenerator_method_bake_from_source_geometry_data>`. After the process is finished the optional ``callback`` will be called. @@ -118,3 +122,4 @@ Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationmeshsourcegeometrydata2d.rst b/classes/class_navigationmeshsourcegeometrydata2d.rst new file mode 100644 index 00000000000..557a839f4c5 --- /dev/null +++ b/classes/class_navigationmeshsourcegeometrydata2d.rst @@ -0,0 +1,272 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NavigationMeshSourceGeometryData2D.xml. + +.. _class_NavigationMeshSourceGeometryData2D: + +NavigationMeshSourceGeometryData2D +================================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Container for parsed source geometry data used in navigation mesh baking. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Container for parsed source geometry data used in navigation mesh baking. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_obstruction_outline<class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_projected_obstruction<class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction>`\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_traversable_outline<class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline>`\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NavigationMeshSourceGeometryData2D_method_clear>`\ (\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>`\ (\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] | :ref:`get_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData2D_method_has_data>`\ (\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge<class_NavigationMeshSourceGeometryData2D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_obstruction_outlines<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>`\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_traversable_outlines<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>`\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) | + +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline: + +.. rst-class:: classref-method + +|void| **add_obstruction_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline>` + +Adds the outline points of a shape as obstructed area. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction: + +.. rst-class:: classref-method + +|void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`, carve\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction>` + +Adds a projected obstruction shape to the source geometry. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline: + +.. rst-class:: classref-method + +|void| **add_traversable_outline**\ (\ shape_outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline>` + +Adds the outline points of a shape as traversable area. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines: + +.. rst-class:: classref-method + +|void| **append_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines>` + +Appends another array of ``obstruction_outlines`` at the end of the existing obstruction outlines array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines: + +.. rst-class:: classref-method + +|void| **append_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines>` + +Appends another array of ``traversable_outlines`` at the end of the existing traversable outlines array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_clear>` + +Clears the internal data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions: + +.. rst-class:: classref-method + +|void| **clear_projected_obstructions**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions>` + +Clears all projected obstructions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_obstruction_outlines**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines>` + +Returns all the obstructed area outlines arrays. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions>` + +Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries: + +- ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape. + +- ``carve`` - A :ref:`bool<class_bool>` that defines how the projected shape affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\] **get_traversable_outlines**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines>` + +Returns all the traversable area outlines arrays. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_has_data: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_data**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_has_data>` + +Returns ``true`` when parsed source geometry data exists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_merge: + +.. rst-class:: classref-method + +|void| **merge**\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_merge>` + +Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the navigation mesh baking data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines: + +.. rst-class:: classref-method + +|void| **set_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines>` + +Sets all the obstructed area outlines arrays. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions: + +.. rst-class:: classref-method + +|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions>` + +Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + + +.. tabs:: + + .. code-tab:: gdscript + + "vertices" : PackedFloat32Array + "carve" : bool + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines: + +.. rst-class:: classref-method + +|void| **set_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array<class_Array>`\[:ref:`PackedVector2Array<class_PackedVector2Array>`\]\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines>` + +Sets all the traversable area outlines arrays. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationmeshsourcegeometrydata3d.rst b/classes/class_navigationmeshsourcegeometrydata3d.rst index 11a11ce9447..1543fe5205e 100644 --- a/classes/class_navigationmeshsourcegeometrydata3d.rst +++ b/classes/class_navigationmeshsourcegeometrydata3d.rst @@ -10,6 +10,8 @@ NavigationMeshSourceGeometryData3D ================================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` Container for parsed source geometry data used in navigation mesh baking. @@ -29,25 +31,37 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>` **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>` **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>` **(** **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>` **(** **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)** | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_faces<class_NavigationMeshSourceGeometryData3D_method_add_faces>`\ (\ faces\: :ref:`PackedVector3Array<class_PackedVector3Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_mesh<class_NavigationMeshSourceGeometryData3D_method_add_mesh>`\ (\ mesh\: :ref:`Mesh<class_Mesh>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_mesh_array<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>`\ (\ mesh_array\: :ref:`Array<class_Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_projected_obstruction<class_NavigationMeshSourceGeometryData3D_method_add_projected_obstruction>`\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, elevation\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, carve\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_arrays<class_NavigationMeshSourceGeometryData3D_method_append_arrays>`\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NavigationMeshSourceGeometryData3D_method_clear>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_NavigationMeshSourceGeometryData3D_method_get_indices>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_vertices<class_NavigationMeshSourceGeometryData3D_method_get_vertices>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_data<class_NavigationMeshSourceGeometryData3D_method_has_data>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge<class_NavigationMeshSourceGeometryData3D_method_merge>`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_indices<class_NavigationMeshSourceGeometryData3D_method_set_indices>`\ (\ indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_projected_obstructions<class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions>`\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertices<class_NavigationMeshSourceGeometryData3D_method_set_vertices>`\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,9 +76,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_faces** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` faces, :ref:`Transform3D<class_Transform3D>` xform **)** +|void| **add_faces**\ (\ faces\: :ref:`PackedVector3Array<class_PackedVector3Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_add_faces>` -Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since :ref:`NavigationMesh<class_NavigationMesh>` resource have no transform all vertex positions need to be offset by the node's transform using the ``xform`` parameter. +Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``. .. rst-class:: classref-item-separator @@ -74,9 +88,9 @@ Adds an array of vertex positions to the geometry data for navigation mesh bakin .. rst-class:: classref-method -void **add_mesh** **(** :ref:`Mesh<class_Mesh>` mesh, :ref:`Transform3D<class_Transform3D>` xform **)** +|void| **add_mesh**\ (\ mesh\: :ref:`Mesh<class_Mesh>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_add_mesh>` -Adds the geometry data of a :ref:`Mesh<class_Mesh>` resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resource have no transform all vertex positions need to be offset by the node's transform using the ``xform`` parameter. +Adds the geometry data of a :ref:`Mesh<class_Mesh>` resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``. .. rst-class:: classref-item-separator @@ -86,9 +100,33 @@ Adds the geometry data of a :ref:`Mesh<class_Mesh>` resource to the navigation m .. rst-class:: classref-method -void **add_mesh_array** **(** :ref:`Array<class_Array>` mesh_array, :ref:`Transform3D<class_Transform3D>` xform **)** +|void| **add_mesh_array**\ (\ mesh_array\: :ref:`Array<class_Array>`, xform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_add_mesh_array>` -Adds an :ref:`Array<class_Array>` the size of :ref:`Mesh.ARRAY_MAX<class_Mesh_constant_ARRAY_MAX>` and with vertices at index :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>` and indices at index :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resource have no transform all vertex positions need to be offset by the node's transform using the ``xform`` parameter. +Adds an :ref:`Array<class_Array>` the size of :ref:`Mesh.ARRAY_MAX<class_Mesh_constant_ARRAY_MAX>` and with vertices at index :ref:`Mesh.ARRAY_VERTEX<class_Mesh_constant_ARRAY_VERTEX>` and indices at index :ref:`Mesh.ARRAY_INDEX<class_Mesh_constant_ARRAY_INDEX>` to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since :ref:`NavigationMesh<class_NavigationMesh>` resources have no transform, all vertex positions need to be offset by the node's transform using ``xform``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData3D_method_add_projected_obstruction: + +.. rst-class:: classref-method + +|void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, elevation\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, carve\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_add_projected_obstruction>` + +Adds a projected obstruction shape to the source geometry. The ``vertices`` are considered projected on a xz-axes plane, placed at the global y-axis ``elevation`` and extruded by ``height``. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData3D_method_append_arrays: + +.. rst-class:: classref-method + +|void| **append_arrays**\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_append_arrays>` + +Appends arrays of ``vertices`` and ``indices`` at the end of the existing arrays. Adds the existing index as an offset to the appended indices. .. rst-class:: classref-item-separator @@ -98,7 +136,7 @@ Adds an :ref:`Array<class_Array>` the size of :ref:`Mesh.ARRAY_MAX<class_Mesh_co .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_clear>` Clears the internal data. @@ -106,11 +144,23 @@ Clears the internal data. ---- +.. _class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions: + +.. rst-class:: classref-method + +|void| **clear_projected_obstructions**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_clear_projected_obstructions>` + +Clears all projected obstructions. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_get_indices: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_get_indices>` Returns the parsed source geometry data indices array. @@ -118,11 +168,31 @@ Returns the parsed source geometry data indices array. ---- +.. _class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>` **get_projected_obstructions**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_get_projected_obstructions>` + +Returns the projected obstructions as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries: + +- ``vertices`` - A :ref:`PackedFloat32Array<class_PackedFloat32Array>` that defines the outline points of the projected shape. + +- ``elevation`` - A :ref:`float<class_float>` that defines the projected shape placement on the y-axis. + +- ``height`` - A :ref:`float<class_float>` that defines how much the projected shape is extruded along the y-axis. + +- ``carve`` - A :ref:`bool<class_bool>` that defines how the obstacle affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationMeshSourceGeometryData3D_method_get_vertices: .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertices** **(** **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_vertices**\ (\ ) |const| :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_get_vertices>` Returns the parsed source geometry data vertices array. @@ -134,9 +204,21 @@ Returns the parsed source geometry data vertices array. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_data** **(** **)** +:ref:`bool<class_bool>` **has_data**\ (\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_has_data>` + +Returns ``true`` when parsed source geometry data exists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData3D_method_merge: + +.. rst-class:: classref-method + +|void| **merge**\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_merge>` -Returns **true** when parsed source geometry data exists. +Adds the geometry data of another **NavigationMeshSourceGeometryData3D** to the navigation mesh baking data. .. rst-class:: classref-item-separator @@ -146,12 +228,36 @@ Returns **true** when parsed source geometry data exists. .. rst-class:: classref-method -void **set_indices** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** +|void| **set_indices**\ (\ indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_set_indices>` Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices. \ **Warning:** Inappropriate data can crash the baking process of the involved third-party libraries. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions: + +.. rst-class:: classref-method + +|void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_set_projected_obstructions>` + +Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + + +.. tabs:: + + .. code-tab:: gdscript + + "vertices" : PackedFloat32Array + "elevation" : float + "height" : float + "carve" : bool + + + .. rst-class:: classref-item-separator ---- @@ -160,7 +266,7 @@ Sets the parsed source geometry data indices. The indices need to be matched wit .. rst-class:: classref-method -void **set_vertices** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` vertices **)** +|void| **set_vertices**\ (\ vertices\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_NavigationMeshSourceGeometryData3D_method_set_vertices>` Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices. @@ -173,3 +279,4 @@ Sets the parsed source geometry data vertices. The vertices need to be matched w .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationobstacle2d.rst b/classes/class_navigationobstacle2d.rst index 2b679abc52d..5ae629c5676 100644 --- a/classes/class_navigationobstacle2d.rst +++ b/classes/class_navigationobstacle2d.rst @@ -10,22 +10,22 @@ NavigationObstacle2D ==================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. +2D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. .. rst-class:: classref-introduction-group Description ----------- -2D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. - -If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. +An obstacle needs a navigation map and outline :ref:`vertices<class_NavigationObstacle2D_property_vertices>` defined to work correctly. The outlines can not cross or overlap. -Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. +Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places. If :ref:`carve_navigation_mesh<class_NavigationObstacle2D_property_carve_navigation_mesh>` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. -Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. +With :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -42,17 +42,21 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` | ``true`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` | ``1`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle2D_property_radius>` | ``0.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_NavigationObstacle2D_property_velocity>` | ``Vector2(0, 0)`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`vertices<class_NavigationObstacle2D_property_vertices>` | ``PackedVector2Array()`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle2D_property_avoidance_enabled>` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`carve_navigation_mesh<class_NavigationObstacle2D_property_carve_navigation_mesh>` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle2D_property_radius>` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`velocity<class_NavigationObstacle2D_property_velocity>` | ``Vector2(0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`vertices<class_NavigationObstacle2D_property_vertices>` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -62,17 +66,17 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationObstacle2D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationObstacle2D_method_get_navigation_map>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle2D_method_get_rid>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_layer_value<class_NavigationObstacle2D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationObstacle2D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationObstacle2D_method_get_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationObstacle2D_method_get_navigation_map>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle2D_method_get_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_layer_value<class_NavigationObstacle2D_method_set_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationObstacle2D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,16 +87,33 @@ Methods Property Descriptions --------------------- +.. _class_NavigationObstacle2D_property_affect_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **affect_navigation_mesh** = ``false`` :ref:`🔗<class_NavigationObstacle2D_property_affect_navigation_mesh>` + +.. rst-class:: classref-property-setget + +- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_affect_navigation_mesh**\ (\ ) + +If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices<class_NavigationObstacle2D_property_vertices>` defined shape. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle2D_property_avoidance_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **avoidance_enabled** = ``true`` +:ref:`bool<class_bool>` **avoidance_enabled** = ``true`` :ref:`🔗<class_NavigationObstacle2D_property_avoidance_enabled>` .. rst-class:: classref-property-setget -- void **set_avoidance_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_avoidance_enabled** **(** **)** +- |void| **set_avoidance_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_avoidance_enabled**\ (\ ) If ``true`` the obstacle affects avoidance using agents. @@ -104,14 +125,35 @@ If ``true`` the obstacle affects avoidance using agents. .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_layers** = ``1`` +:ref:`int<class_int>` **avoidance_layers** = ``1`` :ref:`🔗<class_NavigationObstacle2D_property_avoidance_layers>` .. rst-class:: classref-property-setget -- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_layers** **(** **)** +- |void| **set_avoidance_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_layers**\ (\ ) -A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle. +A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle2D_property_carve_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **carve_navigation_mesh** = ``false`` :ref:`🔗<class_NavigationObstacle2D_property_carve_navigation_mesh>` + +.. rst-class:: classref-property-setget + +- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_carve_navigation_mesh**\ (\ ) + +If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + +It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + +Requires :ref:`affect_navigation_mesh<class_NavigationObstacle2D_property_affect_navigation_mesh>` to be enabled. .. rst-class:: classref-item-separator @@ -121,12 +163,12 @@ A bitfield determining the avoidance layers for this obstacle. Agent's with a ma .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.0`` +:ref:`float<class_float>` **radius** = ``0.0`` :ref:`🔗<class_NavigationObstacle2D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) Sets the avoidance radius for the obstacle. @@ -138,12 +180,12 @@ Sets the avoidance radius for the obstacle. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationObstacle2D_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ ) Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles :ref:`radius<class_NavigationObstacle2D_property_radius>`. Does nothing for the obstacles static vertices. @@ -155,15 +197,17 @@ Sets the wanted velocity for the obstacle so other agent's can better predict th .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **vertices** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **vertices** = ``PackedVector2Array()`` :ref:`🔗<class_NavigationObstacle2D_property_vertices>` .. rst-class:: classref-property-setget -- void **set_vertices** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_vertices** **(** **)** +- |void| **set_vertices**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_vertices**\ (\ ) The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. + .. rst-class:: classref-section-separator ---- @@ -177,7 +221,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationObstacle2D_method_get_avoidance_layer_value>` Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -189,7 +233,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationObstacle2D_method_get_navigation_map>` Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationObstacle2D_method_set_navigation_map>` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. @@ -201,7 +245,7 @@ Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationObsta .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationObstacle2D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer2D<class_NavigationServer2D>`. @@ -213,7 +257,7 @@ Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer .. rst-class:: classref-method -void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationObstacle2D_method_set_avoidance_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationObstacle2D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -225,7 +269,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationObstacle2D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this NavigationObstacle node should use and also updates the ``obstacle`` on the NavigationServer. @@ -236,3 +280,4 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationObstacle nod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationobstacle3d.rst b/classes/class_navigationobstacle3d.rst index 048f64a0008..4389920c21b 100644 --- a/classes/class_navigationobstacle3d.rst +++ b/classes/class_navigationobstacle3d.rst @@ -10,22 +10,22 @@ NavigationObstacle3D ==================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. +3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. .. rst-class:: classref-introduction-group Description ----------- -3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly. - -If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap. +An obstacle needs a navigation map and outline :ref:`vertices<class_NavigationObstacle3D_property_vertices>` defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis. -Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent. +Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places, e.g. inside "solid" geometry or on top of it. If :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. -Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map. +With :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. .. rst-class:: classref-introduction-group @@ -42,21 +42,25 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` | - +-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group @@ -66,17 +70,17 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationObstacle3D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationObstacle3D_method_get_navigation_map>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle3D_method_get_rid>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_layer_value<class_NavigationObstacle3D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationObstacle3D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationObstacle3D_method_get_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationObstacle3D_method_get_navigation_map>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle3D_method_get_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_avoidance_layer_value<class_NavigationObstacle3D_method_set_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationObstacle3D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,16 +91,33 @@ Methods Property Descriptions --------------------- +.. _class_NavigationObstacle3D_property_affect_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **affect_navigation_mesh** = ``false`` :ref:`🔗<class_NavigationObstacle3D_property_affect_navigation_mesh>` + +.. rst-class:: classref-property-setget + +- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_affect_navigation_mesh**\ (\ ) + +If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices<class_NavigationObstacle3D_property_vertices>` and :ref:`height<class_NavigationObstacle3D_property_height>` defined shape. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationObstacle3D_property_avoidance_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **avoidance_enabled** = ``true`` +:ref:`bool<class_bool>` **avoidance_enabled** = ``true`` :ref:`🔗<class_NavigationObstacle3D_property_avoidance_enabled>` .. rst-class:: classref-property-setget -- void **set_avoidance_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_avoidance_enabled** **(** **)** +- |void| **set_avoidance_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_avoidance_enabled**\ (\ ) If ``true`` the obstacle affects avoidance using agents. @@ -108,14 +129,35 @@ If ``true`` the obstacle affects avoidance using agents. .. rst-class:: classref-property -:ref:`int<class_int>` **avoidance_layers** = ``1`` +:ref:`int<class_int>` **avoidance_layers** = ``1`` :ref:`🔗<class_NavigationObstacle3D_property_avoidance_layers>` .. rst-class:: classref-property-setget -- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_layers** **(** **)** +- |void| **set_avoidance_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_avoidance_layers**\ (\ ) -A bitfield determining the avoidance layers for this obstacle. Agent's with a matching bit on the their avoidance mask will avoid this obstacle. +A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationObstacle3D_property_carve_navigation_mesh: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **carve_navigation_mesh** = ``false`` :ref:`🔗<class_NavigationObstacle3D_property_carve_navigation_mesh>` + +.. rst-class:: classref-property-setget + +- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_carve_navigation_mesh**\ (\ ) + +If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + +It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + +Requires :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` to be enabled. .. rst-class:: classref-item-separator @@ -125,12 +167,12 @@ A bitfield determining the avoidance layers for this obstacle. Agent's with a ma .. rst-class:: classref-property -:ref:`float<class_float>` **height** = ``1.0`` +:ref:`float<class_float>` **height** = ``1.0`` :ref:`🔗<class_NavigationObstacle3D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height**\ (\ ) Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore obstacles that are below or above them. @@ -142,12 +184,12 @@ Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.0`` +:ref:`float<class_float>` **radius** = ``0.0`` :ref:`🔗<class_NavigationObstacle3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) Sets the avoidance radius for the obstacle. @@ -159,12 +201,12 @@ Sets the avoidance radius for the obstacle. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_3d_avoidance** = ``false`` +:ref:`bool<class_bool>` **use_3d_avoidance** = ``false`` :ref:`🔗<class_NavigationObstacle3D_property_use_3d_avoidance>` .. rst-class:: classref-property-setget -- void **set_use_3d_avoidance** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_3d_avoidance** **(** **)** +- |void| **set_use_3d_avoidance**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_3d_avoidance**\ (\ ) If ``true`` the obstacle affects 3D avoidance using agent's with obstacle :ref:`radius<class_NavigationObstacle3D_property_radius>`. @@ -178,12 +220,12 @@ If ``false`` the obstacle affects 2D avoidance using agent's with both obstacle .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationObstacle3D_property_velocity>` .. rst-class:: classref-property-setget -- void **set_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_velocity** **(** **)** +- |void| **set_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_velocity**\ (\ ) Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles :ref:`radius<class_NavigationObstacle3D_property_radius>`. Does nothing for the obstacles static vertices. @@ -195,15 +237,17 @@ Sets the wanted velocity for the obstacle so other agent's can better predict th .. rst-class:: classref-property -:ref:`PackedVector3Array<class_PackedVector3Array>` **vertices** = ``PackedVector3Array()`` +:ref:`PackedVector3Array<class_PackedVector3Array>` **vertices** = ``PackedVector3Array()`` :ref:`🔗<class_NavigationObstacle3D_property_vertices>` .. rst-class:: classref-property-setget -- void **set_vertices** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` value **)** -- :ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices** **(** **)** +- |void| **set_vertices**\ (\ value\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) +- :ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices**\ (\ ) The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array<class_PackedVector3Array>` for more details. + .. rst-class:: classref-section-separator ---- @@ -217,7 +261,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationObstacle3D_method_get_avoidance_layer_value>` Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -229,7 +273,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationObstacle3D_method_get_navigation_map>` Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationObstacle3D_method_set_navigation_map>` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. @@ -241,7 +285,7 @@ Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationObsta .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationObstacle3D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer3D<class_NavigationServer3D>`. @@ -253,7 +297,7 @@ Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer .. rst-class:: classref-method -void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationObstacle3D_method_set_avoidance_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -265,7 +309,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationObstacle3D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this NavigationObstacle node should use and also updates the ``obstacle`` on the NavigationServer. @@ -276,3 +320,4 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationObstacle nod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationpathqueryparameters2d.rst b/classes/class_navigationpathqueryparameters2d.rst index 19a74f3c556..cab547f0d07 100644 --- a/classes/class_navigationpathqueryparameters2d.rst +++ b/classes/class_navigationpathqueryparameters2d.rst @@ -10,6 +10,8 @@ NavigationPathQueryParameters2D =============================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` Provides parameters for 2D navigation path queries. @@ -39,7 +41,7 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`RID<class_RID>` | :ref:`map<class_NavigationPathQueryParameters2D_property_map>` | ``RID()`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> | :ref:`metadata_flags<class_NavigationPathQueryParameters2D_property_metadata_flags>` | ``7`` | + | |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] | :ref:`metadata_flags<class_NavigationPathQueryParameters2D_property_metadata_flags>` | ``7`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationPathQueryParameters2D_property_navigation_layers>` | ``1`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ @@ -47,6 +49,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` | :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters2D_property_pathfinding_algorithm>` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`float<class_float>` | :ref:`simplify_epsilon<class_NavigationPathQueryParameters2D_property_simplify_epsilon>` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`simplify_path<class_NavigationPathQueryParameters2D_property_simplify_path>` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`start_position<class_NavigationPathQueryParameters2D_property_start_position>` | ``Vector2(0, 0)`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`target_position<class_NavigationPathQueryParameters2D_property_target_position>` | ``Vector2(0, 0)`` | @@ -65,7 +71,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PathfindingAlgorithm**: +enum **PathfindingAlgorithm**: :ref:`🔗<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` .. _class_NavigationPathQueryParameters2D_constant_PATHFINDING_ALGORITHM_ASTAR: @@ -83,7 +89,7 @@ The path query uses the default A\* pathfinding algorithm. .. rst-class:: classref-enumeration -enum **PathPostProcessing**: +enum **PathPostProcessing**: :ref:`🔗<enum_NavigationPathQueryParameters2D_PathPostProcessing>` .. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: @@ -109,7 +115,7 @@ Centers every path position in the middle of the traveled navigation mesh polygo .. rst-class:: classref-enumeration -flags **PathMetadataFlags**: +flags **PathMetadataFlags**: :ref:`🔗<enum_NavigationPathQueryParameters2D_PathMetadataFlags>` .. _class_NavigationPathQueryParameters2D_constant_PATH_METADATA_INCLUDE_NONE: @@ -164,14 +170,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`RID<class_RID>` **map** = ``RID()`` +:ref:`RID<class_RID>` **map** = ``RID()`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_map>` .. rst-class:: classref-property-setget -- void **set_map** **(** :ref:`RID<class_RID>` value **)** -- :ref:`RID<class_RID>` **get_map** **(** **)** +- |void| **set_map**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_map**\ (\ ) -The navigation ``map`` :ref:`RID<class_RID>` used in the path query. +The navigation map :ref:`RID<class_RID>` used in the path query. .. rst-class:: classref-item-separator @@ -181,12 +187,12 @@ The navigation ``map`` :ref:`RID<class_RID>` used in the path query. .. rst-class:: classref-property -|bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **metadata_flags** = ``7`` +|bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **metadata_flags** = ``7`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_metadata_flags>` .. rst-class:: classref-property-setget -- void **set_metadata_flags** **(** |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> value **)** -- |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **get_metadata_flags** **(** **)** +- |void| **set_metadata_flags**\ (\ value\: |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\]\ ) +- |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **get_metadata_flags**\ (\ ) Additional information to include with the navigation path. @@ -198,12 +204,12 @@ Additional information to include with the navigation path. .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) The navigation layers the query will use (as a bitmask). @@ -215,12 +221,12 @@ The navigation layers the query will use (as a bitmask). .. rst-class:: classref-property -:ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **path_postprocessing** = ``0`` +:ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **path_postprocessing** = ``0`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_path_postprocessing>` .. rst-class:: classref-property-setget -- void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` value **)** -- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing** **(** **)** +- |void| **set_path_postprocessing**\ (\ value\: :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>`\ ) +- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing**\ (\ ) The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters2D_property_pathfinding_algorithm>`. @@ -232,12 +238,12 @@ The path postprocessing applied to the raw path corridor found by the :ref:`path .. rst-class:: classref-property -:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` +:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_pathfinding_algorithm>` .. rst-class:: classref-property-setget -- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` value **)** -- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)** +- |void| **set_pathfinding_algorithm**\ (\ value\: :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>`\ ) +- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm**\ (\ ) The pathfinding algorithm used in the path query. @@ -245,16 +251,52 @@ The pathfinding algorithm used in the path query. ---- +.. _class_NavigationPathQueryParameters2D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **simplify_epsilon** = ``0.0`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_simplify_epsilon>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryParameters2D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **simplify_path** = ``false`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_simplify_path>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon<class_NavigationPathQueryParameters2D_property_simplify_epsilon>`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters2D_property_start_position: .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **start_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **start_position** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_start_position>` .. rst-class:: classref-property-setget -- void **set_start_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_start_position** **(** **)** +- |void| **set_start_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_start_position**\ (\ ) The pathfinding start position in global coordinates. @@ -266,12 +308,12 @@ The pathfinding start position in global coordinates. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationPathQueryParameters2D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_target_position**\ (\ ) The pathfinding target position in global coordinates. @@ -282,3 +324,4 @@ The pathfinding target position in global coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationpathqueryparameters3d.rst b/classes/class_navigationpathqueryparameters3d.rst index f34119a6dab..15599d6b393 100644 --- a/classes/class_navigationpathqueryparameters3d.rst +++ b/classes/class_navigationpathqueryparameters3d.rst @@ -10,6 +10,8 @@ NavigationPathQueryParameters3D =============================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` Provides parameters for 3D navigation path queries. @@ -39,7 +41,7 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`RID<class_RID>` | :ref:`map<class_NavigationPathQueryParameters3D_property_map>` | ``RID()`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ - | |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> | :ref:`metadata_flags<class_NavigationPathQueryParameters3D_property_metadata_flags>` | ``7`` | + | |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] | :ref:`metadata_flags<class_NavigationPathQueryParameters3D_property_metadata_flags>` | ``7`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationPathQueryParameters3D_property_navigation_layers>` | ``1`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ @@ -47,6 +49,10 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` | :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters3D_property_pathfinding_algorithm>` | ``0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`float<class_float>` | :ref:`simplify_epsilon<class_NavigationPathQueryParameters3D_property_simplify_epsilon>` | ``0.0`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`simplify_path<class_NavigationPathQueryParameters3D_property_simplify_path>` | ``false`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`start_position<class_NavigationPathQueryParameters3D_property_start_position>` | ``Vector3(0, 0, 0)`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`target_position<class_NavigationPathQueryParameters3D_property_target_position>` | ``Vector3(0, 0, 0)`` | @@ -65,7 +71,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PathfindingAlgorithm**: +enum **PathfindingAlgorithm**: :ref:`🔗<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` .. _class_NavigationPathQueryParameters3D_constant_PATHFINDING_ALGORITHM_ASTAR: @@ -83,7 +89,7 @@ The path query uses the default A\* pathfinding algorithm. .. rst-class:: classref-enumeration -enum **PathPostProcessing**: +enum **PathPostProcessing**: :ref:`🔗<enum_NavigationPathQueryParameters3D_PathPostProcessing>` .. _class_NavigationPathQueryParameters3D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL: @@ -109,7 +115,7 @@ Centers every path position in the middle of the traveled navigation mesh polygo .. rst-class:: classref-enumeration -flags **PathMetadataFlags**: +flags **PathMetadataFlags**: :ref:`🔗<enum_NavigationPathQueryParameters3D_PathMetadataFlags>` .. _class_NavigationPathQueryParameters3D_constant_PATH_METADATA_INCLUDE_NONE: @@ -164,14 +170,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`RID<class_RID>` **map** = ``RID()`` +:ref:`RID<class_RID>` **map** = ``RID()`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_map>` .. rst-class:: classref-property-setget -- void **set_map** **(** :ref:`RID<class_RID>` value **)** -- :ref:`RID<class_RID>` **get_map** **(** **)** +- |void| **set_map**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_map**\ (\ ) -The navigation ``map`` :ref:`RID<class_RID>` used in the path query. +The navigation map :ref:`RID<class_RID>` used in the path query. .. rst-class:: classref-item-separator @@ -181,12 +187,12 @@ The navigation ``map`` :ref:`RID<class_RID>` used in the path query. .. rst-class:: classref-property -|bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> **metadata_flags** = ``7`` +|bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] **metadata_flags** = ``7`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_metadata_flags>` .. rst-class:: classref-property-setget -- void **set_metadata_flags** **(** |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> value **)** -- |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\> **get_metadata_flags** **(** **)** +- |void| **set_metadata_flags**\ (\ value\: |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\]\ ) +- |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters3D_PathMetadataFlags>`\] **get_metadata_flags**\ (\ ) Additional information to include with the navigation path. @@ -198,12 +204,12 @@ Additional information to include with the navigation path. .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) The navigation layers the query will use (as a bitmask). @@ -215,12 +221,12 @@ The navigation layers the query will use (as a bitmask). .. rst-class:: classref-property -:ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **path_postprocessing** = ``0`` +:ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **path_postprocessing** = ``0`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_path_postprocessing>` .. rst-class:: classref-property-setget -- void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` value **)** -- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **get_path_postprocessing** **(** **)** +- |void| **set_path_postprocessing**\ (\ value\: :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>`\ ) +- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters3D_PathPostProcessing>` **get_path_postprocessing**\ (\ ) The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters3D_property_pathfinding_algorithm>`. @@ -232,12 +238,12 @@ The path postprocessing applied to the raw path corridor found by the :ref:`path .. rst-class:: classref-property -:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` +:ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_pathfinding_algorithm>` .. rst-class:: classref-property-setget -- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` value **)** -- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)** +- |void| **set_pathfinding_algorithm**\ (\ value\: :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>`\ ) +- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters3D_PathfindingAlgorithm>` **get_pathfinding_algorithm**\ (\ ) The pathfinding algorithm used in the path query. @@ -245,16 +251,52 @@ The pathfinding algorithm used in the path query. ---- +.. _class_NavigationPathQueryParameters3D_property_simplify_epsilon: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **simplify_epsilon** = ``0.0`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_simplify_epsilon>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_epsilon**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_simplify_epsilon**\ (\ ) + +The path simplification amount in worlds units. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPathQueryParameters3D_property_simplify_path: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **simplify_path** = ``false`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_simplify_path>` + +.. rst-class:: classref-property-setget + +- |void| **set_simplify_path**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_simplify_path**\ (\ ) + +If ``true`` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by :ref:`simplify_epsilon<class_NavigationPathQueryParameters3D_property_simplify_epsilon>`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPathQueryParameters3D_property_start_position: .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **start_position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **start_position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_start_position>` .. rst-class:: classref-property-setget -- void **set_start_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_start_position** **(** **)** +- |void| **set_start_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_start_position**\ (\ ) The pathfinding start position in global coordinates. @@ -266,12 +308,12 @@ The pathfinding start position in global coordinates. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_NavigationPathQueryParameters3D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_target_position**\ (\ ) The pathfinding target position in global coordinates. @@ -282,3 +324,4 @@ The pathfinding target position in global coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationpathqueryresult2d.rst b/classes/class_navigationpathqueryresult2d.rst index bce6999c3cd..3ffb4050521 100644 --- a/classes/class_navigationpathqueryresult2d.rst +++ b/classes/class_navigationpathqueryresult2d.rst @@ -10,6 +10,8 @@ NavigationPathQueryResult2D =========================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` Represents the result of a 2D pathfinding query. @@ -41,7 +43,7 @@ Properties +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`path_owner_ids<class_NavigationPathQueryResult2D_property_path_owner_ids>` | ``PackedInt64Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`path_rids<class_NavigationPathQueryResult2D_property_path_rids>` | ``[]`` | + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`path_rids<class_NavigationPathQueryResult2D_property_path_rids>` | ``[]`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`path_types<class_NavigationPathQueryResult2D_property_path_types>` | ``PackedInt32Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ @@ -54,9 +56,9 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------+ - | void | :ref:`reset<class_NavigationPathQueryResult2D_method_reset>` **(** **)** | - +------+--------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------+ + | |void| | :ref:`reset<class_NavigationPathQueryResult2D_method_reset>`\ (\ ) | + +--------+--------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,7 +73,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PathSegmentType**: +enum **PathSegmentType**: :ref:`🔗<enum_NavigationPathQueryResult2D_PathSegmentType>` .. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_REGION: @@ -102,15 +104,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **path** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **path** = ``PackedVector2Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path>` .. rst-class:: classref-property-setget -- void **set_path** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_path** **(** **)** +- |void| **set_path**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_path**\ (\ ) The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer2D.map_get_path<class_NavigationServer2D_method_map_get_path>`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -119,15 +123,17 @@ The resulting path array from the navigation query. All path array positions are .. rst-class:: classref-property -:ref:`PackedInt64Array<class_PackedInt64Array>` **path_owner_ids** = ``PackedInt64Array()`` +:ref:`PackedInt64Array<class_PackedInt64Array>` **path_owner_ids** = ``PackedInt64Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_owner_ids>` .. rst-class:: classref-property-setget -- void **set_path_owner_ids** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` value **)** -- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_path_owner_ids** **(** **)** +- |void| **set_path_owner_ids**\ (\ value\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) +- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_path_owner_ids**\ (\ ) The ``ObjectID``\ s of the :ref:`Object<class_Object>`\ s which manage the regions and links each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array<class_PackedInt64Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -136,12 +142,12 @@ The ``ObjectID``\ s of the :ref:`Object<class_Object>`\ s which manage the regio .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **path_rids** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **path_rids** = ``[]`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_rids>` .. rst-class:: classref-property-setget -- void **set_path_rids** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_path_rids** **(** **)** +- |void| **set_path_rids**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_path_rids**\ (\ ) The :ref:`RID<class_RID>`\ s of the regions and links that each point of the path goes through. @@ -153,15 +159,17 @@ The :ref:`RID<class_RID>`\ s of the regions and links that each point of the pat .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **path_types** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **path_types** = ``PackedInt32Array()`` :ref:`🔗<class_NavigationPathQueryResult2D_property_path_types>` .. rst-class:: classref-property-setget -- void **set_path_types** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_path_types** **(** **)** +- |void| **set_path_types**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_path_types**\ (\ ) The type of navigation primitive (region or link) that each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-section-separator ---- @@ -175,7 +183,7 @@ Method Descriptions .. rst-class:: classref-method -void **reset** **(** **)** +|void| **reset**\ (\ ) :ref:`🔗<class_NavigationPathQueryResult2D_method_reset>` Reset the result object to its initial state. This is useful to reuse the object across multiple queries. @@ -186,3 +194,4 @@ Reset the result object to its initial state. This is useful to reuse the object .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationpathqueryresult3d.rst b/classes/class_navigationpathqueryresult3d.rst index 13067bad99e..430593c65c2 100644 --- a/classes/class_navigationpathqueryresult3d.rst +++ b/classes/class_navigationpathqueryresult3d.rst @@ -10,6 +10,8 @@ NavigationPathQueryResult3D =========================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` Represents the result of a 3D pathfinding query. @@ -41,7 +43,7 @@ Properties +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`path_owner_ids<class_NavigationPathQueryResult3D_property_path_owner_ids>` | ``PackedInt64Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`path_rids<class_NavigationPathQueryResult3D_property_path_rids>` | ``[]`` | + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`path_rids<class_NavigationPathQueryResult3D_property_path_rids>` | ``[]`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`path_types<class_NavigationPathQueryResult3D_property_path_types>` | ``PackedInt32Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ @@ -54,9 +56,9 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------+ - | void | :ref:`reset<class_NavigationPathQueryResult3D_method_reset>` **(** **)** | - +------+--------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------+ + | |void| | :ref:`reset<class_NavigationPathQueryResult3D_method_reset>`\ (\ ) | + +--------+--------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,7 +73,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PathSegmentType**: +enum **PathSegmentType**: :ref:`🔗<enum_NavigationPathQueryResult3D_PathSegmentType>` .. _class_NavigationPathQueryResult3D_constant_PATH_SEGMENT_TYPE_REGION: @@ -102,15 +104,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector3Array<class_PackedVector3Array>` **path** = ``PackedVector3Array()`` +:ref:`PackedVector3Array<class_PackedVector3Array>` **path** = ``PackedVector3Array()`` :ref:`🔗<class_NavigationPathQueryResult3D_property_path>` .. rst-class:: classref-property-setget -- void **set_path** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` value **)** -- :ref:`PackedVector3Array<class_PackedVector3Array>` **get_path** **(** **)** +- |void| **set_path**\ (\ value\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) +- :ref:`PackedVector3Array<class_PackedVector3Array>` **get_path**\ (\ ) The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by :ref:`NavigationServer3D.map_get_path<class_NavigationServer3D_method_map_get_path>`. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array<class_PackedVector3Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -119,15 +123,17 @@ The resulting path array from the navigation query. All path array positions are .. rst-class:: classref-property -:ref:`PackedInt64Array<class_PackedInt64Array>` **path_owner_ids** = ``PackedInt64Array()`` +:ref:`PackedInt64Array<class_PackedInt64Array>` **path_owner_ids** = ``PackedInt64Array()`` :ref:`🔗<class_NavigationPathQueryResult3D_property_path_owner_ids>` .. rst-class:: classref-property-setget -- void **set_path_owner_ids** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` value **)** -- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_path_owner_ids** **(** **)** +- |void| **set_path_owner_ids**\ (\ value\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) +- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_path_owner_ids**\ (\ ) The ``ObjectID``\ s of the :ref:`Object<class_Object>`\ s which manage the regions and links each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array<class_PackedInt64Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -136,12 +142,12 @@ The ``ObjectID``\ s of the :ref:`Object<class_Object>`\ s which manage the regio .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **path_rids** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **path_rids** = ``[]`` :ref:`🔗<class_NavigationPathQueryResult3D_property_path_rids>` .. rst-class:: classref-property-setget -- void **set_path_rids** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_path_rids** **(** **)** +- |void| **set_path_rids**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_path_rids**\ (\ ) The :ref:`RID<class_RID>`\ s of the regions and links that each point of the path goes through. @@ -153,15 +159,17 @@ The :ref:`RID<class_RID>`\ s of the regions and links that each point of the pat .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **path_types** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **path_types** = ``PackedInt32Array()`` :ref:`🔗<class_NavigationPathQueryResult3D_property_path_types>` .. rst-class:: classref-property-setget -- void **set_path_types** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_path_types** **(** **)** +- |void| **set_path_types**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_path_types**\ (\ ) The type of navigation primitive (region or link) that each point of the path goes through. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-section-separator ---- @@ -175,7 +183,7 @@ Method Descriptions .. rst-class:: classref-method -void **reset** **(** **)** +|void| **reset**\ (\ ) :ref:`🔗<class_NavigationPathQueryResult3D_method_reset>` Reset the result object to its initial state. This is useful to reuse the object across multiple queries. @@ -186,3 +194,4 @@ Reset the result object to its initial state. This is useful to reuse the object .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationpolygon.rst b/classes/class_navigationpolygon.rst index 9554ba0f5c7..b55607d9068 100644 --- a/classes/class_navigationpolygon.rst +++ b/classes/class_navigationpolygon.rst @@ -10,62 +10,64 @@ NavigationPolygon ================= +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A navigation polygon that defines traversable areas and obstacles. +A 2D navigation mesh that describes a traversable surface for pathfinding. .. rst-class:: classref-introduction-group Description ----------- -There are two ways to create polygons. Either by using the :ref:`add_outline<class_NavigationPolygon_method_add_outline>` method, or using the :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>` method. +A navigation mesh can be created either by baking it with the help of the :ref:`NavigationServer2D<class_NavigationServer2D>`, or by adding vertices and convex polygon indices arrays manually. -Using :ref:`add_outline<class_NavigationPolygon_method_add_outline>`: +To bake a navigation mesh at least one outline needs to be added that defines the outer bounds of the baked area. .. tabs:: .. code-tab:: gdscript - var polygon = NavigationPolygon.new() - var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.add_outline(outline) - polygon.make_polygons_from_outlines() - $NavigationRegion2D.navigation_polygon = polygon + var new_navigation_mesh = NavigationPolygon.new() + var bounding_outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + new_navigation_mesh.add_outline(bounding_outline) + NavigationServer2D.bake_from_source_geometry_data(new_navigation_mesh, NavigationMeshSourceGeometryData2D.new()); + $NavigationRegion2D.navigation_polygon = new_navigation_mesh .. code-tab:: csharp - var polygon = new NavigationPolygon(); - var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; - polygon.AddOutline(outline); - polygon.MakePolygonsFromOutlines(); - GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon; + var newNavigationMesh = new NavigationPolygon(); + var boundingOutline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + newNavigationMesh.AddOutline(boundingOutline); + NavigationServer2D.BakeFromSourceGeometryData(newNavigationMesh, new NavigationMeshSourceGeometryData2D()); + GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = newNavigationMesh; -Using :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>` and indices of the vertices array. +Adding vertices and polygon indices manually. .. tabs:: .. code-tab:: gdscript - var polygon = NavigationPolygon.new() - var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.vertices = vertices - var indices = PackedInt32Array([0, 1, 2, 3]) - polygon.add_polygon(indices) - $NavigationRegion2D.navigation_polygon = polygon + var new_navigation_mesh = NavigationPolygon.new() + var new_vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + new_navigation_mesh.vertices = new_vertices + var new_polygon_indices = PackedInt32Array([0, 1, 2, 3]) + new_navigation_mesh.add_polygon(new_polygon_indices) + $NavigationRegion2D.navigation_polygon = new_navigation_mesh .. code-tab:: csharp - var polygon = new NavigationPolygon(); - var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; - polygon.Vertices = vertices; - var indices = new int[] { 0, 1, 2, 3 }; - polygon.AddPolygon(indices); - GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = polygon; + var newNavigationMesh = new NavigationPolygon(); + var newVertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + newNavigationMesh.Vertices = newVertices; + var newPolygonIndices = new int[] { 0, 1, 2, 3 }; + newNavigationMesh.AddPolygon(newPolygonIndices); + GetNode<NavigationRegion2D>("NavigationRegion2D").NavigationPolygon = newNavigationMesh; @@ -74,10 +76,10 @@ Using :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>` and indices Tutorials --------- -- `2D Navigation Demo <https://godotengine.org/asset-library/asset/117>`__ - - :doc:`Using NavigationMeshes <../tutorials/navigation/navigation_using_navigationmeshes>` +- `Navigation Polygon 2D Demo <https://godotengine.org/asset-library/asset/2722>`__ + .. rst-class:: classref-reftable-group Properties @@ -86,9 +88,25 @@ Properties .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------+---------+ - | :ref:`float<class_float>` | :ref:`cell_size<class_NavigationPolygon_property_cell_size>` | ``1.0`` | - +---------------------------+--------------------------------------------------------------+---------+ + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_radius<class_NavigationPolygon_property_agent_radius>` | ``10.0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`baking_rect<class_NavigationPolygon_property_baking_rect>` | ``Rect2(0, 0, 0, 0)`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`baking_rect_offset<class_NavigationPolygon_property_baking_rect_offset>` | ``Vector2(0, 0)`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`border_size<class_NavigationPolygon_property_border_size>` | ``0.0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`cell_size<class_NavigationPolygon_property_cell_size>` | ``1.0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`parsed_collision_mask<class_NavigationPolygon_property_parsed_collision_mask>` | ``4294967295`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` | :ref:`parsed_geometry_type<class_NavigationPolygon_property_parsed_geometry_type>` | ``2`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`source_geometry_group_name<class_NavigationPolygon_property_source_geometry_group_name>` | ``&"navigation_polygon_source_geometry_group"`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` | :ref:`source_geometry_mode<class_NavigationPolygon_property_source_geometry_mode>` | ``0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -98,37 +116,134 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_outline<class_NavigationPolygon_method_add_outline>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` outline **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_outline_at_index<class_NavigationPolygon_method_add_outline_at_index>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` outline, :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` polygon **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_outlines<class_NavigationPolygon_method_clear_outlines>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_polygons<class_NavigationPolygon_method_clear_polygons>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`get_navigation_mesh<class_NavigationPolygon_method_get_navigation_mesh>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_outline<class_NavigationPolygon_method_get_outline>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_outline_count<class_NavigationPolygon_method_get_outline_count>` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_polygon<class_NavigationPolygon_method_get_polygon>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationPolygon_method_get_polygon_count>` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_vertices<class_NavigationPolygon_method_get_vertices>` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_outline<class_NavigationPolygon_method_remove_outline>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_outline<class_NavigationPolygon_method_set_outline>` **(** :ref:`int<class_int>` idx, :ref:`PackedVector2Array<class_PackedVector2Array>` outline **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertices<class_NavigationPolygon_method_set_vertices>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` vertices **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_outline<class_NavigationPolygon_method_add_outline>`\ (\ outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_outline_at_index<class_NavigationPolygon_method_add_outline_at_index>`\ (\ outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>`\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_NavigationPolygon_method_clear>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_outlines<class_NavigationPolygon_method_clear_outlines>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_polygons<class_NavigationPolygon_method_clear_polygons>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`get_navigation_mesh<class_NavigationPolygon_method_get_navigation_mesh>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_outline<class_NavigationPolygon_method_get_outline>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_outline_count<class_NavigationPolygon_method_get_outline_count>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_parsed_collision_mask_value<class_NavigationPolygon_method_get_parsed_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_polygon<class_NavigationPolygon_method_get_polygon>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_polygon_count<class_NavigationPolygon_method_get_polygon_count>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_vertices<class_NavigationPolygon_method_get_vertices>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_outline<class_NavigationPolygon_method_remove_outline>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_outline<class_NavigationPolygon_method_set_outline>`\ (\ idx\: :ref:`int<class_int>`, outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_parsed_collision_mask_value<class_NavigationPolygon_method_set_parsed_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertices<class_NavigationPolygon_method_set_vertices>`\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_NavigationPolygon_ParsedGeometryType: + +.. rst-class:: classref-enumeration + +enum **ParsedGeometryType**: :ref:`🔗<enum_NavigationPolygon_ParsedGeometryType>` + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_MESH_INSTANCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **PARSED_GEOMETRY_MESH_INSTANCES** = ``0`` + +Parses mesh instances as obstruction geometry. This includes :ref:`Polygon2D<class_Polygon2D>`, :ref:`MeshInstance2D<class_MeshInstance2D>`, :ref:`MultiMeshInstance2D<class_MultiMeshInstance2D>`, and :ref:`TileMap<class_TileMap>` nodes. + +Meshes are only parsed when they use a 2D vertices surface format. + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_STATIC_COLLIDERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **PARSED_GEOMETRY_STATIC_COLLIDERS** = ``1`` + +Parses :ref:`StaticBody2D<class_StaticBody2D>` and :ref:`TileMap<class_TileMap>` colliders as obstruction geometry. The collider should be in any of the layers specified by :ref:`parsed_collision_mask<class_NavigationPolygon_property_parsed_collision_mask>`. + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_BOTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **PARSED_GEOMETRY_BOTH** = ``2`` + +Both :ref:`PARSED_GEOMETRY_MESH_INSTANCES<class_NavigationPolygon_constant_PARSED_GEOMETRY_MESH_INSTANCES>` and :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS<class_NavigationPolygon_constant_PARSED_GEOMETRY_STATIC_COLLIDERS>`. + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **PARSED_GEOMETRY_MAX** = ``3`` + +Represents the size of the :ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_NavigationPolygon_SourceGeometryMode: + +.. rst-class:: classref-enumeration + +enum **SourceGeometryMode**: :ref:`🔗<enum_NavigationPolygon_SourceGeometryMode>` + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_ROOT_NODE_CHILDREN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **SOURCE_GEOMETRY_ROOT_NODE_CHILDREN** = ``0`` + +Scans the child nodes of the root node recursively for geometry. + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN** = ``1`` + +Scans nodes in a group and their child nodes recursively for geometry. The group is specified by :ref:`source_geometry_group_name<class_NavigationPolygon_property_source_geometry_group_name>`. + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **SOURCE_GEOMETRY_GROUPS_EXPLICIT** = ``2`` + +Uses nodes in a group for geometry. The group is specified by :ref:`source_geometry_group_name<class_NavigationPolygon_property_source_geometry_group_name>`. + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **SOURCE_GEOMETRY_MAX** = ``3`` + +Represents the size of the :ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` enum. .. rst-class:: classref-section-separator @@ -139,19 +254,161 @@ Methods Property Descriptions --------------------- +.. _class_NavigationPolygon_property_agent_radius: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **agent_radius** = ``10.0`` :ref:`🔗<class_NavigationPolygon_property_agent_radius>` + +.. rst-class:: classref-property-setget + +- |void| **set_agent_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_agent_radius**\ (\ ) + +The distance to erode/shrink the walkable surface when baking the navigation mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_baking_rect: + +.. rst-class:: classref-property + +:ref:`Rect2<class_Rect2>` **baking_rect** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗<class_NavigationPolygon_property_baking_rect>` + +.. rst-class:: classref-property-setget + +- |void| **set_baking_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_baking_rect**\ (\ ) + +If the baking :ref:`Rect2<class_Rect2>` has an area the navigation mesh baking will be restricted to its enclosing area. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_baking_rect_offset: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **baking_rect_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_NavigationPolygon_property_baking_rect_offset>` + +.. rst-class:: classref-property-setget + +- |void| **set_baking_rect_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_baking_rect_offset**\ (\ ) + +The position offset applied to the :ref:`baking_rect<class_NavigationPolygon_property_baking_rect>` :ref:`Rect2<class_Rect2>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_border_size: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **border_size** = ``0.0`` :ref:`🔗<class_NavigationPolygon_property_border_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_border_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_border_size**\ (\ ) + +The size of the non-navigable border around the bake bounding area defined by the :ref:`baking_rect<class_NavigationPolygon_property_baking_rect>` :ref:`Rect2<class_Rect2>`. + +In conjunction with the :ref:`baking_rect<class_NavigationPolygon_property_baking_rect>` the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by :ref:`agent_radius<class_NavigationPolygon_property_agent_radius>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_property_cell_size: .. rst-class:: classref-property -:ref:`float<class_float>` **cell_size** = ``1.0`` +:ref:`float<class_float>` **cell_size** = ``1.0`` :ref:`🔗<class_NavigationPolygon_property_cell_size>` .. rst-class:: classref-property-setget -- void **set_cell_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cell_size** **(** **)** +- |void| **set_cell_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cell_size**\ (\ ) The cell size used to rasterize the navigation mesh vertices. Must match with the cell size on the navigation map. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_parsed_collision_mask: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **parsed_collision_mask** = ``4294967295`` :ref:`🔗<class_NavigationPolygon_property_parsed_collision_mask>` + +.. rst-class:: classref-property-setget + +- |void| **set_parsed_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_parsed_collision_mask**\ (\ ) + +The physics layers to scan for static colliders. + +Only used when :ref:`parsed_geometry_type<class_NavigationPolygon_property_parsed_geometry_type>` is :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS<class_NavigationPolygon_constant_PARSED_GEOMETRY_STATIC_COLLIDERS>` or :ref:`PARSED_GEOMETRY_BOTH<class_NavigationPolygon_constant_PARSED_GEOMETRY_BOTH>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_parsed_geometry_type: + +.. rst-class:: classref-property + +:ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **parsed_geometry_type** = ``2`` :ref:`🔗<class_NavigationPolygon_property_parsed_geometry_type>` + +.. rst-class:: classref-property-setget + +- |void| **set_parsed_geometry_type**\ (\ value\: :ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>`\ ) +- :ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` **get_parsed_geometry_type**\ (\ ) + +Determines which type of nodes will be parsed as geometry. See :ref:`ParsedGeometryType<enum_NavigationPolygon_ParsedGeometryType>` for possible values. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_source_geometry_group_name: + +.. rst-class:: classref-property + +:ref:`StringName<class_StringName>` **source_geometry_group_name** = ``&"navigation_polygon_source_geometry_group"`` :ref:`🔗<class_NavigationPolygon_property_source_geometry_group_name>` + +.. rst-class:: classref-property-setget + +- |void| **set_source_geometry_group_name**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_source_geometry_group_name**\ (\ ) + +The group name of nodes that should be parsed for baking source geometry. + +Only used when :ref:`source_geometry_mode<class_NavigationPolygon_property_source_geometry_mode>` is :ref:`SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN<class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN>` or :ref:`SOURCE_GEOMETRY_GROUPS_EXPLICIT<class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_source_geometry_mode: + +.. rst-class:: classref-property + +:ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **source_geometry_mode** = ``0`` :ref:`🔗<class_NavigationPolygon_property_source_geometry_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_source_geometry_mode**\ (\ value\: :ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>`\ ) +- :ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` **get_source_geometry_mode**\ (\ ) + +The source of the geometry used when baking. See :ref:`SourceGeometryMode<enum_NavigationPolygon_SourceGeometryMode>` for possible values. + .. rst-class:: classref-section-separator ---- @@ -165,9 +422,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_outline** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` outline **)** +|void| **add_outline**\ (\ outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationPolygon_method_add_outline>` -Appends a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the vertices of an outline to the internal array that contains all the outlines. You have to call :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>` in order for this array to be converted to polygons that the engine will use. +Appends a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the vertices of an outline to the internal array that contains all the outlines. .. rst-class:: classref-item-separator @@ -177,9 +434,9 @@ Appends a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the .. rst-class:: classref-method -void **add_outline_at_index** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` outline, :ref:`int<class_int>` index **)** +|void| **add_outline_at_index**\ (\ outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationPolygon_method_add_outline_at_index>` -Adds a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>` in order for this array to be converted to polygons that the engine will use. +Adds a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. .. rst-class:: classref-item-separator @@ -189,7 +446,7 @@ Adds a :ref:`PackedVector2Array<class_PackedVector2Array>` that contains the ver .. rst-class:: classref-method -void **add_polygon** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` polygon **)** +|void| **add_polygon**\ (\ polygon\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_NavigationPolygon_method_add_polygon>` Adds a polygon using the indices of the vertices you get when calling :ref:`get_vertices<class_NavigationPolygon_method_get_vertices>`. @@ -197,11 +454,23 @@ Adds a polygon using the indices of the vertices you get when calling :ref:`get_ ---- +.. _class_NavigationPolygon_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗<class_NavigationPolygon_method_clear>` + +Clears the internal arrays for vertices and polygon indices. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_method_clear_outlines: .. rst-class:: classref-method -void **clear_outlines** **(** **)** +|void| **clear_outlines**\ (\ ) :ref:`🔗<class_NavigationPolygon_method_clear_outlines>` Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. @@ -213,7 +482,7 @@ Clears the array of the outlines, but it doesn't clear the vertices and the poly .. rst-class:: classref-method -void **clear_polygons** **(** **)** +|void| **clear_polygons**\ (\ ) :ref:`🔗<class_NavigationPolygon_method_clear_polygons>` Clears the array of polygons, but it doesn't clear the array of outlines and vertices. @@ -225,7 +494,7 @@ Clears the array of polygons, but it doesn't clear the array of outlines and ver .. rst-class:: classref-method -:ref:`NavigationMesh<class_NavigationMesh>` **get_navigation_mesh** **(** **)** +:ref:`NavigationMesh<class_NavigationMesh>` **get_navigation_mesh**\ (\ ) :ref:`🔗<class_NavigationPolygon_method_get_navigation_mesh>` Returns the :ref:`NavigationMesh<class_NavigationMesh>` resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the :ref:`NavigationServer3D.region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>` API directly (as 2D uses the 3D server behind the scene). @@ -237,7 +506,7 @@ Returns the :ref:`NavigationMesh<class_NavigationMesh>` resulting from this navi .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_outline** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_outline**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationPolygon_method_get_outline>` Returns a :ref:`PackedVector2Array<class_PackedVector2Array>` containing the vertices of an outline that was created in the editor or by script. @@ -249,7 +518,7 @@ Returns a :ref:`PackedVector2Array<class_PackedVector2Array>` containing the ver .. rst-class:: classref-method -:ref:`int<class_int>` **get_outline_count** **(** **)** |const| +:ref:`int<class_int>` **get_outline_count**\ (\ ) |const| :ref:`🔗<class_NavigationPolygon_method_get_outline_count>` Returns the number of outlines that were created in the editor or by script. @@ -257,11 +526,23 @@ Returns the number of outlines that were created in the editor or by script. ---- +.. _class_NavigationPolygon_method_get_parsed_collision_mask_value: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **get_parsed_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationPolygon_method_get_parsed_collision_mask_value>` + +Returns whether or not the specified layer of the :ref:`parsed_collision_mask<class_NavigationPolygon_property_parsed_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_method_get_polygon: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_polygon** **(** :ref:`int<class_int>` idx **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_polygon**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationPolygon_method_get_polygon>` Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` containing the indices of the vertices of a created polygon. @@ -273,7 +554,7 @@ Returns a :ref:`PackedInt32Array<class_PackedInt32Array>` containing the indices .. rst-class:: classref-method -:ref:`int<class_int>` **get_polygon_count** **(** **)** |const| +:ref:`int<class_int>` **get_polygon_count**\ (\ ) |const| :ref:`🔗<class_NavigationPolygon_method_get_polygon_count>` Returns the count of all polygons. @@ -285,7 +566,7 @@ Returns the count of all polygons. .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_vertices** **(** **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_vertices**\ (\ ) |const| :ref:`🔗<class_NavigationPolygon_method_get_vertices>` Returns a :ref:`PackedVector2Array<class_PackedVector2Array>` containing all the vertices being used to create the polygons. @@ -297,7 +578,9 @@ Returns a :ref:`PackedVector2Array<class_PackedVector2Array>` containing all the .. rst-class:: classref-method -void **make_polygons_from_outlines** **(** **)** +|void| **make_polygons_from_outlines**\ (\ ) :ref:`🔗<class_NavigationPolygon_method_make_polygons_from_outlines>` + +**Deprecated:** Use :ref:`NavigationServer2D.parse_source_geometry_data<class_NavigationServer2D_method_parse_source_geometry_data>` and :ref:`NavigationServer2D.bake_from_source_geometry_data<class_NavigationServer2D_method_bake_from_source_geometry_data>` instead. Creates polygons from the outlines added in the editor or by script. @@ -309,7 +592,7 @@ Creates polygons from the outlines added in the editor or by script. .. rst-class:: classref-method -void **remove_outline** **(** :ref:`int<class_int>` idx **)** +|void| **remove_outline**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationPolygon_method_remove_outline>` Removes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>` for the polygons to update. @@ -321,7 +604,7 @@ Removes an outline created in the editor or by script. You have to call :ref:`ma .. rst-class:: classref-method -void **set_outline** **(** :ref:`int<class_int>` idx, :ref:`PackedVector2Array<class_PackedVector2Array>` outline **)** +|void| **set_outline**\ (\ idx\: :ref:`int<class_int>`, outline\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationPolygon_method_set_outline>` Changes an outline created in the editor or by script. You have to call :ref:`make_polygons_from_outlines<class_NavigationPolygon_method_make_polygons_from_outlines>` for the polygons to update. @@ -329,11 +612,23 @@ Changes an outline created in the editor or by script. You have to call :ref:`ma ---- +.. _class_NavigationPolygon_method_set_parsed_collision_mask_value: + +.. rst-class:: classref-method + +|void| **set_parsed_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationPolygon_method_set_parsed_collision_mask_value>` + +Based on ``value``, enables or disables the specified layer in the :ref:`parsed_collision_mask<class_NavigationPolygon_property_parsed_collision_mask>`, given a ``layer_number`` between 1 and 32. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_method_set_vertices: .. rst-class:: classref-method -void **set_vertices** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` vertices **)** +|void| **set_vertices**\ (\ vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationPolygon_method_set_vertices>` Sets the vertices that can be then indexed to create polygons with the :ref:`add_polygon<class_NavigationPolygon_method_add_polygon>` method. @@ -344,3 +639,4 @@ Sets the vertices that can be then indexed to create polygons with the :ref:`add .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationregion2d.rst b/classes/class_navigationregion2d.rst index 07c20b39ae0..59fe054d2a5 100644 --- a/classes/class_navigationregion2d.rst +++ b/classes/class_navigationregion2d.rst @@ -10,6 +10,8 @@ NavigationRegion2D ================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A traversable 2D region that :ref:`NavigationAgent2D<class_NavigationAgent2D>`\ s can use for pathfinding. @@ -48,23 +50,19 @@ Properties .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationRegion2D_property_avoidance_layers>` | ``1`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`constrain_avoidance<class_NavigationRegion2D_property_constrain_avoidance>` | ``false`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`enabled<class_NavigationRegion2D_property_enabled>` | ``true`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`float<class_float>` | :ref:`enter_cost<class_NavigationRegion2D_property_enter_cost>` | ``0.0`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationRegion2D_property_navigation_layers>` | ``1`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`navigation_polygon<class_NavigationRegion2D_property_navigation_polygon>` | | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`float<class_float>` | :ref:`travel_cost<class_NavigationRegion2D_property_travel_cost>` | ``1.0`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`use_edge_connections<class_NavigationRegion2D_property_use_edge_connections>` | ``true`` | - +---------------------------------------------------+-------------------------------------------------------------------------------------+-----------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`bool<class_bool>` | :ref:`enabled<class_NavigationRegion2D_property_enabled>` | ``true`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`float<class_float>` | :ref:`enter_cost<class_NavigationRegion2D_property_enter_cost>` | ``0.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationRegion2D_property_navigation_layers>` | ``1`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`navigation_polygon<class_NavigationRegion2D_property_navigation_polygon>` | | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`float<class_float>` | :ref:`travel_cost<class_NavigationRegion2D_property_travel_cost>` | ``1.0`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ + | :ref:`bool<class_bool>` | :ref:`use_edge_connections<class_NavigationRegion2D_property_use_edge_connections>` | ``true`` | + +---------------------------------------------------+-------------------------------------------------------------------------------------+----------+ .. rst-class:: classref-reftable-group @@ -74,21 +72,23 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationRegion2D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationRegion2D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationRegion2D_method_get_navigation_map>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_region_rid<class_NavigationRegion2D_method_get_region_rid>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_avoidance_layer_value<class_NavigationRegion2D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationRegion2D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationRegion2D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_navigation_polygon<class_NavigationRegion2D_method_bake_navigation_polygon>`\ (\ on_thread\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationRegion2D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationRegion2D_method_get_navigation_map>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_region_rid<class_NavigationRegion2D_method_get_region_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationRegion2D_method_get_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_baking<class_NavigationRegion2D_method_is_baking>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationRegion2D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationRegion2D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -96,55 +96,48 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_NavigationRegion2D_property_avoidance_layers: - -.. rst-class:: classref-property +Signals +------- -:ref:`int<class_int>` **avoidance_layers** = ``1`` +.. _class_NavigationRegion2D_signal_bake_finished: -.. rst-class:: classref-property-setget +.. rst-class:: classref-signal -- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_avoidance_layers** **(** **)** +**bake_finished**\ (\ ) :ref:`🔗<class_NavigationRegion2D_signal_bake_finished>` -A bitfield determining all avoidance layers for the avoidance constrain. +Emitted when a navigation polygon bake operation is completed. .. rst-class:: classref-item-separator ---- -.. _class_NavigationRegion2D_property_constrain_avoidance: - -.. rst-class:: classref-property +.. _class_NavigationRegion2D_signal_navigation_polygon_changed: -:ref:`bool<class_bool>` **constrain_avoidance** = ``false`` +.. rst-class:: classref-signal -.. rst-class:: classref-property-setget +**navigation_polygon_changed**\ (\ ) :ref:`🔗<class_NavigationRegion2D_signal_navigation_polygon_changed>` -- void **set_constrain_avoidance** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_constrain_avoidance** **(** **)** +Emitted when the used navigation polygon is replaced or changes to the internals of the current navigation polygon are committed. -If ``true`` constraints avoidance agent's with an avoidance mask bit that matches with a bit of the :ref:`avoidance_layers<class_NavigationRegion2D_property_avoidance_layers>` to the navigation polygon. Due to each navigation polygon outline creating an obstacle and each polygon edge creating an avoidance line constrain keep the navigation polygon shape as simple as possible for performance. +.. rst-class:: classref-section-separator -\ **Experimental:** This is an experimental feature and should not be used in production as agent's can get stuck on the navigation polygon corners and edges especially at high frame rate. +---- -.. rst-class:: classref-item-separator +.. rst-class:: classref-descriptions-group ----- +Property Descriptions +--------------------- .. _class_NavigationRegion2D_property_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_NavigationRegion2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) Determines if the **NavigationRegion2D** is enabled or disabled. @@ -156,14 +149,14 @@ Determines if the **NavigationRegion2D** is enabled or disabled. .. rst-class:: classref-property -:ref:`float<class_float>` **enter_cost** = ``0.0`` +:ref:`float<class_float>` **enter_cost** = ``0.0`` :ref:`🔗<class_NavigationRegion2D_property_enter_cost>` .. rst-class:: classref-property-setget -- void **set_enter_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_enter_cost** **(** **)** +- |void| **set_enter_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_enter_cost**\ (\ ) -When pathfinding enters this region's navigation mesh from another regions navigation mesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +When pathfinding enters this region's navigation mesh from another regions navigation mesh the :ref:`enter_cost<class_NavigationRegion2D_property_enter_cost>` value is added to the path distance for determining the shortest path. .. rst-class:: classref-item-separator @@ -173,12 +166,12 @@ When pathfinding enters this region's navigation mesh from another regions navig .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationRegion2D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer2D.map_get_path<class_NavigationServer2D_method_map_get_path>`. @@ -190,12 +183,12 @@ A bitfield determining all navigation layers the region belongs to. These naviga .. rst-class:: classref-property -:ref:`NavigationPolygon<class_NavigationPolygon>` **navigation_polygon** +:ref:`NavigationPolygon<class_NavigationPolygon>` **navigation_polygon** :ref:`🔗<class_NavigationRegion2D_property_navigation_polygon>` .. rst-class:: classref-property-setget -- void **set_navigation_polygon** **(** :ref:`NavigationPolygon<class_NavigationPolygon>` value **)** -- :ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon** **(** **)** +- |void| **set_navigation_polygon**\ (\ value\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) +- :ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon**\ (\ ) The :ref:`NavigationPolygon<class_NavigationPolygon>` resource to use. @@ -207,14 +200,14 @@ The :ref:`NavigationPolygon<class_NavigationPolygon>` resource to use. .. rst-class:: classref-property -:ref:`float<class_float>` **travel_cost** = ``1.0`` +:ref:`float<class_float>` **travel_cost** = ``1.0`` :ref:`🔗<class_NavigationRegion2D_property_travel_cost>` .. rst-class:: classref-property-setget -- void **set_travel_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_travel_cost** **(** **)** +- |void| **set_travel_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_travel_cost**\ (\ ) -When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with :ref:`travel_cost<class_NavigationRegion2D_property_travel_cost>` for determining the shortest path. .. rst-class:: classref-item-separator @@ -224,12 +217,12 @@ When pathfinding moves inside this region's navigation mesh the traveled distanc .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_edge_connections** = ``true`` +:ref:`bool<class_bool>` **use_edge_connections** = ``true`` :ref:`🔗<class_NavigationRegion2D_property_use_edge_connections>` .. rst-class:: classref-property-setget -- void **set_use_edge_connections** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_edge_connections** **(** **)** +- |void| **set_use_edge_connections**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_edge_connections**\ (\ ) If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -242,13 +235,13 @@ If enabled the navigation region will use edge connections to connect with other Method Descriptions ------------------- -.. _class_NavigationRegion2D_method_get_avoidance_layer_value: +.. _class_NavigationRegion2D_method_bake_navigation_polygon: .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +|void| **bake_navigation_polygon**\ (\ on_thread\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_NavigationRegion2D_method_bake_navigation_polygon>` -Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationRegion2D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. +Bakes the :ref:`NavigationPolygon<class_NavigationPolygon>`. If ``on_thread`` is set to ``true`` (default), the baking is done on a separate thread. .. rst-class:: classref-item-separator @@ -258,7 +251,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationRegion2D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationRegion2D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -270,7 +263,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationRegion2D_method_get_navigation_map>` Returns the current navigation map :ref:`RID<class_RID>` used by this region. @@ -282,7 +275,21 @@ Returns the current navigation map :ref:`RID<class_RID>` used by this region. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_region_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_region_rid**\ (\ ) |const| :ref:`🔗<class_NavigationRegion2D_method_get_region_rid>` + +**Deprecated:** Use :ref:`get_rid<class_NavigationRegion2D_method_get_rid>` instead. + +Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer2D<class_NavigationServer2D>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationRegion2D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer2D<class_NavigationServer2D>`. Combined with :ref:`NavigationServer2D.map_get_closest_point_owner<class_NavigationServer2D_method_map_get_closest_point_owner>` can be used to identify the **NavigationRegion2D** closest to a point on the merged navigation map. @@ -290,13 +297,13 @@ Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer2D ---- -.. _class_NavigationRegion2D_method_set_avoidance_layer_value: +.. _class_NavigationRegion2D_method_is_baking: .. rst-class:: classref-method -void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +:ref:`bool<class_bool>` **is_baking**\ (\ ) |const| :ref:`🔗<class_NavigationRegion2D_method_is_baking>` -Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationRegion2D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32. +Returns ``true`` when the :ref:`NavigationPolygon<class_NavigationPolygon>` is being baked on a background thread. .. rst-class:: classref-item-separator @@ -306,7 +313,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationRegion2D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationRegion2D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -318,7 +325,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationRegion2D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this region should use. By default the region will automatically join the :ref:`World2D<class_World2D>` default navigation map so this function is only required to override the default map. @@ -329,3 +336,4 @@ Sets the :ref:`RID<class_RID>` of the navigation map this region should use. By .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationregion3d.rst b/classes/class_navigationregion3d.rst index 6c2779db870..15f9a586c7a 100644 --- a/classes/class_navigationregion3d.rst +++ b/classes/class_navigationregion3d.rst @@ -10,6 +10,8 @@ NavigationRegion3D ================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A traversable 3D region that :ref:`NavigationAgent3D<class_NavigationAgent3D>`\ s can use for pathfinding. @@ -70,19 +72,23 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake_navigation_mesh<class_NavigationRegion3D_method_bake_navigation_mesh>` **(** :ref:`bool<class_bool>` on_thread=true **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationRegion3D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationRegion3D_method_get_navigation_map>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_region_rid<class_NavigationRegion3D_method_get_region_rid>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_value<class_NavigationRegion3D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_NavigationRegion3D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_navigation_mesh<class_NavigationRegion3D_method_bake_navigation_mesh>`\ (\ on_thread\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationRegion3D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationRegion3D_method_get_navigation_map>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_region_rid<class_NavigationRegion3D_method_get_region_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationRegion3D_method_get_rid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_baking<class_NavigationRegion3D_method_is_baking>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_value<class_NavigationRegion3D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_NavigationRegion3D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -97,7 +103,7 @@ Signals .. rst-class:: classref-signal -**bake_finished** **(** **)** +**bake_finished**\ (\ ) :ref:`🔗<class_NavigationRegion3D_signal_bake_finished>` Notifies when the navigation mesh bake operation is completed. @@ -109,7 +115,7 @@ Notifies when the navigation mesh bake operation is completed. .. rst-class:: classref-signal -**navigation_mesh_changed** **(** **)** +**navigation_mesh_changed**\ (\ ) :ref:`🔗<class_NavigationRegion3D_signal_navigation_mesh_changed>` Notifies when the :ref:`NavigationMesh<class_NavigationMesh>` has changed. @@ -126,12 +132,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_NavigationRegion3D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) Determines if the **NavigationRegion3D** is enabled or disabled. @@ -143,14 +149,14 @@ Determines if the **NavigationRegion3D** is enabled or disabled. .. rst-class:: classref-property -:ref:`float<class_float>` **enter_cost** = ``0.0`` +:ref:`float<class_float>` **enter_cost** = ``0.0`` :ref:`🔗<class_NavigationRegion3D_property_enter_cost>` .. rst-class:: classref-property-setget -- void **set_enter_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_enter_cost** **(** **)** +- |void| **set_enter_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_enter_cost**\ (\ ) -When pathfinding enters this region's navigation mesh from another regions navigation mesh the ``enter_cost`` value is added to the path distance for determining the shortest path. +When pathfinding enters this region's navigation mesh from another regions navigation mesh the :ref:`enter_cost<class_NavigationRegion3D_property_enter_cost>` value is added to the path distance for determining the shortest path. .. rst-class:: classref-item-separator @@ -160,12 +166,12 @@ When pathfinding enters this region's navigation mesh from another regions navig .. rst-class:: classref-property -:ref:`int<class_int>` **navigation_layers** = ``1`` +:ref:`int<class_int>` **navigation_layers** = ``1`` :ref:`🔗<class_NavigationRegion3D_property_navigation_layers>` .. rst-class:: classref-property-setget -- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_navigation_layers** **(** **)** +- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_navigation_layers**\ (\ ) A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path<class_NavigationServer3D_method_map_get_path>`. @@ -177,12 +183,12 @@ A bitfield determining all navigation layers the region belongs to. These naviga .. rst-class:: classref-property -:ref:`NavigationMesh<class_NavigationMesh>` **navigation_mesh** +:ref:`NavigationMesh<class_NavigationMesh>` **navigation_mesh** :ref:`🔗<class_NavigationRegion3D_property_navigation_mesh>` .. rst-class:: classref-property-setget -- void **set_navigation_mesh** **(** :ref:`NavigationMesh<class_NavigationMesh>` value **)** -- :ref:`NavigationMesh<class_NavigationMesh>` **get_navigation_mesh** **(** **)** +- |void| **set_navigation_mesh**\ (\ value\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) +- :ref:`NavigationMesh<class_NavigationMesh>` **get_navigation_mesh**\ (\ ) The :ref:`NavigationMesh<class_NavigationMesh>` resource to use. @@ -194,14 +200,14 @@ The :ref:`NavigationMesh<class_NavigationMesh>` resource to use. .. rst-class:: classref-property -:ref:`float<class_float>` **travel_cost** = ``1.0`` +:ref:`float<class_float>` **travel_cost** = ``1.0`` :ref:`🔗<class_NavigationRegion3D_property_travel_cost>` .. rst-class:: classref-property-setget -- void **set_travel_cost** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_travel_cost** **(** **)** +- |void| **set_travel_cost**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_travel_cost**\ (\ ) -When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travel_cost`` for determining the shortest path. +When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with :ref:`travel_cost<class_NavigationRegion3D_property_travel_cost>` for determining the shortest path. .. rst-class:: classref-item-separator @@ -211,12 +217,12 @@ When pathfinding moves inside this region's navigation mesh the traveled distanc .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_edge_connections** = ``true`` +:ref:`bool<class_bool>` **use_edge_connections** = ``true`` :ref:`🔗<class_NavigationRegion3D_property_use_edge_connections>` .. rst-class:: classref-property-setget -- void **set_use_edge_connections** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_edge_connections** **(** **)** +- |void| **set_use_edge_connections**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_edge_connections**\ (\ ) If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -233,7 +239,7 @@ Method Descriptions .. rst-class:: classref-method -void **bake_navigation_mesh** **(** :ref:`bool<class_bool>` on_thread=true **)** +|void| **bake_navigation_mesh**\ (\ on_thread\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_NavigationRegion3D_method_bake_navigation_mesh>` Bakes the :ref:`NavigationMesh<class_NavigationMesh>`. If ``on_thread`` is set to ``true`` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new :ref:`NavigationMesh<class_NavigationMesh>`. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled). @@ -245,7 +251,7 @@ Bakes the :ref:`NavigationMesh<class_NavigationMesh>`. If ``on_thread`` is set t .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationRegion3D_method_get_navigation_layer_value>` Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationRegion3D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32. @@ -257,7 +263,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_ .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_NavigationRegion3D_method_get_navigation_map>` Returns the current navigation map :ref:`RID<class_RID>` used by this region. @@ -269,7 +275,21 @@ Returns the current navigation map :ref:`RID<class_RID>` used by this region. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_region_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_region_rid**\ (\ ) |const| :ref:`🔗<class_NavigationRegion3D_method_get_region_rid>` + +**Deprecated:** Use :ref:`get_rid<class_NavigationRegion3D_method_get_rid>` instead. + +Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer3D<class_NavigationServer3D>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion3D_method_get_rid: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_NavigationRegion3D_method_get_rid>` Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer3D<class_NavigationServer3D>`. Combined with :ref:`NavigationServer3D.map_get_closest_point_owner<class_NavigationServer3D_method_map_get_closest_point_owner>` can be used to identify the **NavigationRegion3D** closest to a point on the merged navigation map. @@ -277,11 +297,23 @@ Returns the :ref:`RID<class_RID>` of this region on the :ref:`NavigationServer3D ---- +.. _class_NavigationRegion3D_method_is_baking: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_baking**\ (\ ) |const| :ref:`🔗<class_NavigationRegion3D_method_is_baking>` + +Returns ``true`` when the :ref:`NavigationMesh<class_NavigationMesh>` is being baked on a background thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationRegion3D_method_set_navigation_layer_value: .. rst-class:: classref-method -void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationRegion3D_method_set_navigation_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationRegion3D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32. @@ -293,7 +325,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)** +|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationRegion3D_method_set_navigation_map>` Sets the :ref:`RID<class_RID>` of the navigation map this region should use. By default the region will automatically join the :ref:`World3D<class_World3D>` default navigation map so this function is only required to override the default map. @@ -304,3 +336,4 @@ Sets the :ref:`RID<class_RID>` of the navigation map this region should use. By .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationserver2d.rst b/classes/class_navigationserver2d.rst index 961a474a646..d0b2b4c41ad 100644 --- a/classes/class_navigationserver2d.rst +++ b/classes/class_navigationserver2d.rst @@ -10,6 +10,8 @@ NavigationServer2D ================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Object<class_Object>` A server interface for low-level 2D navigation access. @@ -21,7 +23,7 @@ Description NavigationServer2D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar2D<class_AStar2D>` or :ref:`AStarGrid2D<class_AStarGrid2D>`. -Maps are made up of regions, which are made of navigation polygons. Together, they define the traversable areas in the 2D world. +Maps are divided into regions, which are composed of navigation polygons. Together, they define the traversable areas in the 2D world. \ **Note:** Most **NavigationServer2D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. @@ -40,10 +42,10 @@ This server keeps tracks of any call and executes them during the sync phase. Th Tutorials --------- -- `2D Navigation Demo <https://godotengine.org/asset-library/asset/117>`__ - - :doc:`Using NavigationServer <../tutorials/navigation/navigation_using_navigationservers>` +- `Navigation Polygon 2D Demo <https://godotengine.org/asset-library/asset/2722>`__ + .. rst-class:: classref-reftable-group Methods @@ -52,193 +54,257 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer2D_method_agent_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer2D_method_agent_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer2D_method_agent_get_map>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer2D_method_agent_get_paused>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer2D_method_agent_is_map_changed>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_callback<class_NavigationServer2D_method_agent_set_avoidance_callback>` **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_enabled<class_NavigationServer2D_method_agent_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_layers<class_NavigationServer2D_method_agent_set_avoidance_layers>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_mask<class_NavigationServer2D_method_agent_set_avoidance_mask>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_priority<class_NavigationServer2D_method_agent_set_avoidance_priority>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_map<class_NavigationServer2D_method_agent_set_map>` **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_neighbors<class_NavigationServer2D_method_agent_set_max_neighbors>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_speed<class_NavigationServer2D_method_agent_set_max_speed>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_neighbor_distance<class_NavigationServer2D_method_agent_set_neighbor_distance>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_paused<class_NavigationServer2D_method_agent_set_paused>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_position<class_NavigationServer2D_method_agent_set_position>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_radius<class_NavigationServer2D_method_agent_set_radius>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_agents<class_NavigationServer2D_method_agent_set_time_horizon_agents>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer2D_method_agent_set_time_horizon_obstacles>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity<class_NavigationServer2D_method_agent_set_velocity>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity_forced<class_NavigationServer2D_method_agent_set_velocity_forced>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_NavigationServer2D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer2D_method_get_debug_enabled>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`get_maps<class_NavigationServer2D_method_get_maps>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer2D_method_link_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`link_get_end_position<class_NavigationServer2D_method_link_get_end_position>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer2D_method_link_get_enter_cost>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer2D_method_link_get_map>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer2D_method_link_get_navigation_layers>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer2D_method_link_get_owner_id>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`link_get_start_position<class_NavigationServer2D_method_link_get_start_position>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer2D_method_link_get_travel_cost>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer2D_method_link_is_bidirectional>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_bidirectional<class_NavigationServer2D_method_link_set_bidirectional>` **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_end_position<class_NavigationServer2D_method_link_set_end_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector2<class_Vector2>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_enter_cost<class_NavigationServer2D_method_link_set_enter_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_map<class_NavigationServer2D_method_link_set_map>` **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_navigation_layers<class_NavigationServer2D_method_link_set_navigation_layers>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_owner_id<class_NavigationServer2D_method_link_set_owner_id>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_start_position<class_NavigationServer2D_method_link_set_start_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector2<class_Vector2>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_travel_cost<class_NavigationServer2D_method_link_set_travel_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer2D_method_map_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_force_update<class_NavigationServer2D_method_map_force_update>` **(** :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_agents<class_NavigationServer2D_method_map_get_agents>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer2D_method_map_get_cell_size>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`map_get_closest_point<class_NavigationServer2D_method_map_get_closest_point>` **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer2D_method_map_get_closest_point_owner>` **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer2D_method_map_get_edge_connection_margin>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer2D_method_map_get_link_connection_radius>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_links<class_NavigationServer2D_method_map_get_links>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_obstacles<class_NavigationServer2D_method_map_get_obstacles>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`map_get_path<class_NavigationServer2D_method_map_get_path>` **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` origin, :ref:`Vector2<class_Vector2>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_regions<class_NavigationServer2D_method_map_get_regions>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer2D_method_map_get_use_edge_connections>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer2D_method_map_is_active>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_active<class_NavigationServer2D_method_map_set_active>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_cell_size<class_NavigationServer2D_method_map_set_cell_size>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_edge_connection_margin<class_NavigationServer2D_method_map_set_edge_connection_margin>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_link_connection_radius<class_NavigationServer2D_method_map_set_link_connection_radius>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_use_edge_connections<class_NavigationServer2D_method_map_set_use_edge_connections>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer2D_method_obstacle_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer2D_method_obstacle_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer2D_method_obstacle_get_map>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer2D_method_obstacle_get_paused>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer2D_method_obstacle_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_layers<class_NavigationServer2D_method_obstacle_set_avoidance_layers>` **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_map<class_NavigationServer2D_method_obstacle_set_map>` **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_paused<class_NavigationServer2D_method_obstacle_set_paused>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_position<class_NavigationServer2D_method_obstacle_set_position>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector2<class_Vector2>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_radius<class_NavigationServer2D_method_obstacle_set_radius>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_velocity<class_NavigationServer2D_method_obstacle_set_velocity>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector2<class_Vector2>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_vertices<class_NavigationServer2D_method_obstacle_set_vertices>` **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector2Array<class_PackedVector2Array>` vertices **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`query_path<class_NavigationServer2D_method_query_path>` **(** :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>` parameters, :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` result **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer2D_method_region_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`region_get_connection_pathway_end<class_NavigationServer2D_method_region_get_connection_pathway_end>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`region_get_connection_pathway_start<class_NavigationServer2D_method_region_get_connection_pathway_start>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer2D_method_region_get_connections_count>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer2D_method_region_get_enter_cost>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer2D_method_region_get_map>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer2D_method_region_get_navigation_layers>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer2D_method_region_get_owner_id>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer2D_method_region_get_travel_cost>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer2D_method_region_get_use_edge_connections>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer2D_method_region_owns_point>` **(** :ref:`RID<class_RID>` region, :ref:`Vector2<class_Vector2>` point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_enter_cost<class_NavigationServer2D_method_region_set_enter_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_map<class_NavigationServer2D_method_region_set_map>` **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_layers<class_NavigationServer2D_method_region_set_navigation_layers>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_polygon<class_NavigationServer2D_method_region_set_navigation_polygon>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_owner_id<class_NavigationServer2D_method_region_set_owner_id>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_transform<class_NavigationServer2D_method_region_set_transform>` **(** :ref:`RID<class_RID>` region, :ref:`Transform2D<class_Transform2D>` transform **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_travel_cost<class_NavigationServer2D_method_region_set_travel_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_use_edge_connections<class_NavigationServer2D_method_region_set_use_edge_connections>` **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_debug_enabled<class_NavigationServer2D_method_set_debug_enabled>` **(** :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer2D_method_agent_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer2D_method_agent_get_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_avoidance_layers<class_NavigationServer2D_method_agent_get_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_avoidance_mask<class_NavigationServer2D_method_agent_get_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_avoidance_priority<class_NavigationServer2D_method_agent_get_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer2D_method_agent_get_map>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_max_neighbors<class_NavigationServer2D_method_agent_get_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_max_speed<class_NavigationServer2D_method_agent_get_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_neighbor_distance<class_NavigationServer2D_method_agent_get_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer2D_method_agent_get_paused>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`agent_get_position<class_NavigationServer2D_method_agent_get_position>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_radius<class_NavigationServer2D_method_agent_get_radius>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_time_horizon_agents<class_NavigationServer2D_method_agent_get_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_time_horizon_obstacles<class_NavigationServer2D_method_agent_get_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`agent_get_velocity<class_NavigationServer2D_method_agent_get_velocity>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_has_avoidance_callback<class_NavigationServer2D_method_agent_has_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer2D_method_agent_is_map_changed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_callback<class_NavigationServer2D_method_agent_set_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_enabled<class_NavigationServer2D_method_agent_set_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_layers<class_NavigationServer2D_method_agent_set_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_mask<class_NavigationServer2D_method_agent_set_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_priority<class_NavigationServer2D_method_agent_set_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_map<class_NavigationServer2D_method_agent_set_map>`\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_max_neighbors<class_NavigationServer2D_method_agent_set_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_max_speed<class_NavigationServer2D_method_agent_set_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_neighbor_distance<class_NavigationServer2D_method_agent_set_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_paused<class_NavigationServer2D_method_agent_set_paused>`\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_position<class_NavigationServer2D_method_agent_set_position>`\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_radius<class_NavigationServer2D_method_agent_set_radius>`\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_time_horizon_agents<class_NavigationServer2D_method_agent_set_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer2D_method_agent_set_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_velocity<class_NavigationServer2D_method_agent_set_velocity>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_velocity_forced<class_NavigationServer2D_method_agent_set_velocity_forced>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_from_source_geometry_data<class_NavigationServer2D_method_bake_from_source_geometry_data>`\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_from_source_geometry_data_async<class_NavigationServer2D_method_bake_from_source_geometry_data_async>`\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_NavigationServer2D_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer2D_method_get_debug_enabled>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`get_maps<class_NavigationServer2D_method_get_maps>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_baking_navigation_polygon<class_NavigationServer2D_method_is_baking_navigation_polygon>`\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer2D_method_link_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`link_get_enabled<class_NavigationServer2D_method_link_get_enabled>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`link_get_end_position<class_NavigationServer2D_method_link_get_end_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer2D_method_link_get_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer2D_method_link_get_map>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer2D_method_link_get_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer2D_method_link_get_owner_id>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`link_get_start_position<class_NavigationServer2D_method_link_get_start_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer2D_method_link_get_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer2D_method_link_is_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_bidirectional<class_NavigationServer2D_method_link_set_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_enabled<class_NavigationServer2D_method_link_set_enabled>`\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_end_position<class_NavigationServer2D_method_link_set_end_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_enter_cost<class_NavigationServer2D_method_link_set_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_map<class_NavigationServer2D_method_link_set_map>`\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_navigation_layers<class_NavigationServer2D_method_link_set_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_owner_id<class_NavigationServer2D_method_link_set_owner_id>`\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_start_position<class_NavigationServer2D_method_link_set_start_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_travel_cost<class_NavigationServer2D_method_link_set_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer2D_method_map_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_force_update<class_NavigationServer2D_method_map_force_update>`\ (\ map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_agents<class_NavigationServer2D_method_map_get_agents>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer2D_method_map_get_cell_size>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`map_get_closest_point<class_NavigationServer2D_method_map_get_closest_point>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer2D_method_map_get_closest_point_owner>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer2D_method_map_get_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`map_get_iteration_id<class_NavigationServer2D_method_map_get_iteration_id>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer2D_method_map_get_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_links<class_NavigationServer2D_method_map_get_links>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_obstacles<class_NavigationServer2D_method_map_get_obstacles>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`map_get_path<class_NavigationServer2D_method_map_get_path>`\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector2<class_Vector2>`, destination\: :ref:`Vector2<class_Vector2>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`map_get_random_point<class_NavigationServer2D_method_map_get_random_point>`\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_regions<class_NavigationServer2D_method_map_get_regions>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer2D_method_map_get_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer2D_method_map_is_active>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_active<class_NavigationServer2D_method_map_set_active>`\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_cell_size<class_NavigationServer2D_method_map_set_cell_size>`\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_edge_connection_margin<class_NavigationServer2D_method_map_set_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_link_connection_radius<class_NavigationServer2D_method_map_set_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_use_edge_connections<class_NavigationServer2D_method_map_set_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer2D_method_obstacle_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer2D_method_obstacle_get_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`obstacle_get_avoidance_layers<class_NavigationServer2D_method_obstacle_get_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer2D_method_obstacle_get_map>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer2D_method_obstacle_get_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`obstacle_get_position<class_NavigationServer2D_method_obstacle_get_position>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`obstacle_get_radius<class_NavigationServer2D_method_obstacle_get_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`obstacle_get_velocity<class_NavigationServer2D_method_obstacle_get_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`obstacle_get_vertices<class_NavigationServer2D_method_obstacle_get_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer2D_method_obstacle_set_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_avoidance_layers<class_NavigationServer2D_method_obstacle_set_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_map<class_NavigationServer2D_method_obstacle_set_map>`\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_paused<class_NavigationServer2D_method_obstacle_set_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_position<class_NavigationServer2D_method_obstacle_set_position>`\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_radius<class_NavigationServer2D_method_obstacle_set_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_velocity<class_NavigationServer2D_method_obstacle_set_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_vertices<class_NavigationServer2D_method_obstacle_set_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`parse_source_geometry_data<class_NavigationServer2D_method_parse_source_geometry_data>`\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`query_path<class_NavigationServer2D_method_query_path>`\ (\ parameters\: :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>`, result\: :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer2D_method_region_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`region_get_connection_pathway_end<class_NavigationServer2D_method_region_get_connection_pathway_end>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`region_get_connection_pathway_start<class_NavigationServer2D_method_region_get_connection_pathway_start>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer2D_method_region_get_connections_count>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_get_enabled<class_NavigationServer2D_method_region_get_enabled>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer2D_method_region_get_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer2D_method_region_get_map>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer2D_method_region_get_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer2D_method_region_get_owner_id>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`region_get_random_point<class_NavigationServer2D_method_region_get_random_point>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`region_get_transform<class_NavigationServer2D_method_region_get_transform>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer2D_method_region_get_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer2D_method_region_get_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer2D_method_region_owns_point>`\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_enabled<class_NavigationServer2D_method_region_set_enabled>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_enter_cost<class_NavigationServer2D_method_region_set_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_map<class_NavigationServer2D_method_region_set_map>`\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_navigation_layers<class_NavigationServer2D_method_region_set_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_navigation_polygon<class_NavigationServer2D_method_region_set_navigation_polygon>`\ (\ region\: :ref:`RID<class_RID>`, navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_owner_id<class_NavigationServer2D_method_region_set_owner_id>`\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_transform<class_NavigationServer2D_method_region_set_transform>`\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_travel_cost<class_NavigationServer2D_method_region_set_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_use_edge_connections<class_NavigationServer2D_method_region_set_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_debug_enabled<class_NavigationServer2D_method_set_debug_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`simplify_path<class_NavigationServer2D_method_simplify_path>`\ (\ path\: :ref:`PackedVector2Array<class_PackedVector2Array>`, epsilon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`source_geometry_parser_create<class_NavigationServer2D_method_source_geometry_parser_create>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`source_geometry_parser_set_callback<class_NavigationServer2D_method_source_geometry_parser_set_callback>`\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -253,7 +319,7 @@ Signals .. rst-class:: classref-signal -**map_changed** **(** :ref:`RID<class_RID>` map **)** +**map_changed**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_signal_map_changed>` Emitted when a navigation map is updated, when a region moves or is modified. @@ -265,7 +331,7 @@ Emitted when a navigation map is updated, when a region moves or is modified. .. rst-class:: classref-signal -**navigation_debug_changed** **(** **)** +**navigation_debug_changed**\ (\ ) :ref:`🔗<class_NavigationServer2D_signal_navigation_debug_changed>` Emitted when navigation debug settings are changed. Only available in debug builds. @@ -282,7 +348,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID<class_RID>` **agent_create** **(** **)** +:ref:`RID<class_RID>` **agent_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_agent_create>` Creates the agent. @@ -294,7 +360,7 @@ Creates the agent. .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_get_avoidance_enabled** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_get_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_avoidance_enabled>` Return ``true`` if the specified ``agent`` uses avoidance. @@ -302,11 +368,47 @@ Return ``true`` if the specified ``agent`` uses avoidance. ---- +.. _class_NavigationServer2D_method_agent_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_avoidance_layers>` + +Returns the ``avoidance_layers`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_avoidance_mask: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_avoidance_mask>` + +Returns the ``avoidance_mask`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_avoidance_priority: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_avoidance_priority>` + +Returns the ``avoidance_priority`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_get_map: .. rst-class:: classref-method -:ref:`RID<class_RID>` **agent_get_map** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`RID<class_RID>` **agent_get_map**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is currently assigned to. @@ -314,11 +416,47 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is curr ---- +.. _class_NavigationServer2D_method_agent_get_max_neighbors: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_max_neighbors>` + +Returns the maximum number of other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_max_speed: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_max_speed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_max_speed>` + +Returns the maximum speed of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_neighbor_distance: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_neighbor_distance>` + +Returns the maximum distance to other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_get_paused: .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_get_paused** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_get_paused**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_paused>` Returns ``true`` if the specified ``agent`` is paused. @@ -326,11 +464,83 @@ Returns ``true`` if the specified ``agent`` is paused. ---- +.. _class_NavigationServer2D_method_agent_get_position: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **agent_get_position**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_position>` + +Returns the position of the specified ``agent`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_radius: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_radius**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_radius>` + +Returns the radius of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_time_horizon_agents: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_time_horizon_agents>` + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to other agents. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_time_horizon_obstacles: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_time_horizon_obstacles>` + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **agent_get_velocity**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_get_velocity>` + +Returns the velocity of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_agent_has_avoidance_callback: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **agent_has_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_has_avoidance_callback>` + +Return ``true`` if the specified ``agent`` has an avoidance callback. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_agent_is_map_changed: .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_is_map_changed** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_is_map_changed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_agent_is_map_changed>` Returns true if the map got changed the previous frame. @@ -342,7 +552,7 @@ Returns true if the map got changed the previous frame. .. rst-class:: classref-method -void **agent_set_avoidance_callback** **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)** +|void| **agent_set_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_avoidance_callback>` Sets the callback :ref:`Callable<class_Callable>` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations. @@ -356,9 +566,9 @@ Sets the callback :ref:`Callable<class_Callable>` that gets called after each av .. rst-class:: classref-method -void **agent_set_avoidance_enabled** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** +|void| **agent_set_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_avoidance_enabled>` -If ``enabled`` is ``true`` the specified ``agent`` uses avoidance. +If ``enabled`` is ``true``, the specified ``agent`` uses avoidance. .. rst-class:: classref-item-separator @@ -368,7 +578,7 @@ If ``enabled`` is ``true`` the specified ``agent`` uses avoidance. .. rst-class:: classref-method -void **agent_set_avoidance_layers** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)** +|void| **agent_set_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_avoidance_layers>` Set the agent's ``avoidance_layers`` bitmask. @@ -380,7 +590,7 @@ Set the agent's ``avoidance_layers`` bitmask. .. rst-class:: classref-method -void **agent_set_avoidance_mask** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)** +|void| **agent_set_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_avoidance_mask>` Set the agent's ``avoidance_mask`` bitmask. @@ -392,11 +602,11 @@ Set the agent's ``avoidance_mask`` bitmask. .. rst-class:: classref-method -void **agent_set_avoidance_priority** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)** +|void| **agent_set_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_avoidance_priority>` Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority). -The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower `` avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. +The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower ``avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. .. rst-class:: classref-item-separator @@ -406,7 +616,7 @@ The specified ``agent`` does not adjust the velocity for other agents that would .. rst-class:: classref-method -void **agent_set_map** **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** +|void| **agent_set_map**\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_map>` Puts the agent in the map. @@ -418,7 +628,7 @@ Puts the agent in the map. .. rst-class:: classref-method -void **agent_set_max_neighbors** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)** +|void| **agent_set_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_max_neighbors>` Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -430,7 +640,7 @@ Sets the maximum number of other agents the agent takes into account in the navi .. rst-class:: classref-method -void **agent_set_max_speed** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)** +|void| **agent_set_max_speed**\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_max_speed>` Sets the maximum speed of the agent. Must be positive. @@ -442,7 +652,7 @@ Sets the maximum speed of the agent. Must be positive. .. rst-class:: classref-method -void **agent_set_neighbor_distance** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)** +|void| **agent_set_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_neighbor_distance>` Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -454,7 +664,7 @@ Sets the maximum distance to other agents this agent takes into account in the n .. rst-class:: classref-method -void **agent_set_paused** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)** +|void| **agent_set_paused**\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_paused>` If ``paused`` is true the specified ``agent`` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. @@ -466,7 +676,7 @@ If ``paused`` is true the specified ``agent`` will not be processed, e.g. calcul .. rst-class:: classref-method -void **agent_set_position** **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` position **)** +|void| **agent_set_position**\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_position>` Sets the position of the agent in world space. @@ -478,7 +688,7 @@ Sets the position of the agent in world space. .. rst-class:: classref-method -void **agent_set_radius** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)** +|void| **agent_set_radius**\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_radius>` Sets the radius of the agent. @@ -490,7 +700,7 @@ Sets the radius of the agent. .. rst-class:: classref-method -void **agent_set_time_horizon_agents** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** +|void| **agent_set_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_time_horizon_agents>` The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -502,7 +712,7 @@ The minimal amount of time for which the agent's velocities that are computed by .. rst-class:: classref-method -void **agent_set_time_horizon_obstacles** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** +|void| **agent_set_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_time_horizon_obstacles>` The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -514,7 +724,7 @@ The minimal amount of time for which the agent's velocities that are computed by .. rst-class:: classref-method -void **agent_set_velocity** **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` velocity **)** +|void| **agent_set_velocity**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_velocity>` Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use :ref:`agent_set_velocity_forced<class_NavigationServer2D_method_agent_set_velocity_forced>` instead to reset the internal velocity state. @@ -526,7 +736,7 @@ Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The av .. rst-class:: classref-method -void **agent_set_velocity_forced** **(** :ref:`RID<class_RID>` agent, :ref:`Vector2<class_Vector2>` velocity **)** +|void| **agent_set_velocity_forced**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_agent_set_velocity_forced>` Replaces the internal velocity in the collision avoidance simulation with ``velocity`` for the specified ``agent``. When an agent is teleported to a new position far away this function should be used in the same frame. If called frequently this function can get agents stuck. @@ -534,11 +744,35 @@ Replaces the internal velocity in the collision avoidance simulation with ``velo ---- +.. _class_NavigationServer2D_method_bake_from_source_geometry_data: + +.. rst-class:: classref-method + +|void| **bake_from_source_geometry_data**\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer2D_method_bake_from_source_geometry_data>` + +Bakes the provided ``navigation_polygon`` with the data from the provided ``source_geometry_data``. After the process is finished the optional ``callback`` will be called. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_bake_from_source_geometry_data_async: + +.. rst-class:: classref-method + +|void| **bake_from_source_geometry_data_async**\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer2D_method_bake_from_source_geometry_data_async>` + +Bakes the provided ``navigation_polygon`` with the data from the provided ``source_geometry_data`` as an async task running on a background thread. After the process is finished the optional ``callback`` will be called. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_free_rid: .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_free_rid>` Destroys the given RID. @@ -550,7 +784,7 @@ Destroys the given RID. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_debug_enabled** **(** **)** |const| +:ref:`bool<class_bool>` **get_debug_enabled**\ (\ ) |const| :ref:`🔗<class_NavigationServer2D_method_get_debug_enabled>` Returns ``true`` when the NavigationServer has debug enabled. @@ -562,7 +796,7 @@ Returns ``true`` when the NavigationServer has debug enabled. .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **get_maps** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_maps**\ (\ ) |const| :ref:`🔗<class_NavigationServer2D_method_get_maps>` Returns all created navigation map :ref:`RID<class_RID>`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. @@ -570,11 +804,23 @@ Returns all created navigation map :ref:`RID<class_RID>`\ s on the NavigationSer ---- +.. _class_NavigationServer2D_method_is_baking_navigation_polygon: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_baking_navigation_polygon**\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_is_baking_navigation_polygon>` + +Returns ``true`` when the provided navigation polygon is being baked on a background thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_link_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **link_create** **(** **)** +:ref:`RID<class_RID>` **link_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_link_create>` Create a new link between two positions on a map. @@ -582,11 +828,23 @@ Create a new link between two positions on a map. ---- +.. _class_NavigationServer2D_method_link_get_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **link_get_enabled**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_enabled>` + +Returns ``true`` if the specified ``link`` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_link_get_end_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **link_get_end_position** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`Vector2<class_Vector2>` **link_get_end_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_end_position>` Returns the ending position of this ``link``. @@ -598,7 +856,7 @@ Returns the ending position of this ``link``. .. rst-class:: classref-method -:ref:`float<class_float>` **link_get_enter_cost** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`float<class_float>` **link_get_enter_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_enter_cost>` Returns the enter cost of this ``link``. @@ -610,7 +868,7 @@ Returns the enter cost of this ``link``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **link_get_map** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`RID<class_RID>` **link_get_map**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is currently assigned to. @@ -622,7 +880,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is curre .. rst-class:: classref-method -:ref:`int<class_int>` **link_get_navigation_layers** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`int<class_int>` **link_get_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_navigation_layers>` Returns the navigation layers for this ``link``. @@ -634,7 +892,7 @@ Returns the navigation layers for this ``link``. .. rst-class:: classref-method -:ref:`int<class_int>` **link_get_owner_id** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`int<class_int>` **link_get_owner_id**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_owner_id>` Returns the ``ObjectID`` of the object which manages this link. @@ -646,7 +904,7 @@ Returns the ``ObjectID`` of the object which manages this link. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **link_get_start_position** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`Vector2<class_Vector2>` **link_get_start_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_start_position>` Returns the starting position of this ``link``. @@ -658,7 +916,7 @@ Returns the starting position of this ``link``. .. rst-class:: classref-method -:ref:`float<class_float>` **link_get_travel_cost** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`float<class_float>` **link_get_travel_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_get_travel_cost>` Returns the travel cost of this ``link``. @@ -670,7 +928,7 @@ Returns the travel cost of this ``link``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **link_is_bidirectional** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`bool<class_bool>` **link_is_bidirectional**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_link_is_bidirectional>` Returns whether this ``link`` can be travelled in both directions. @@ -682,7 +940,7 @@ Returns whether this ``link`` can be travelled in both directions. .. rst-class:: classref-method -void **link_set_bidirectional** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)** +|void| **link_set_bidirectional**\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_bidirectional>` Sets whether this ``link`` can be travelled in both directions. @@ -690,11 +948,23 @@ Sets whether this ``link`` can be travelled in both directions. ---- +.. _class_NavigationServer2D_method_link_set_enabled: + +.. rst-class:: classref-method + +|void| **link_set_enabled**\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_enabled>` + +If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_link_set_end_position: .. rst-class:: classref-method -void **link_set_end_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector2<class_Vector2>` position **)** +|void| **link_set_end_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_end_position>` Sets the exit position for the ``link``. @@ -706,7 +976,7 @@ Sets the exit position for the ``link``. .. rst-class:: classref-method -void **link_set_enter_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)** +|void| **link_set_enter_cost**\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_enter_cost>` Sets the ``enter_cost`` for this ``link``. @@ -718,7 +988,7 @@ Sets the ``enter_cost`` for this ``link``. .. rst-class:: classref-method -void **link_set_map** **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)** +|void| **link_set_map**\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_map>` Sets the navigation map :ref:`RID<class_RID>` for the link. @@ -730,7 +1000,7 @@ Sets the navigation map :ref:`RID<class_RID>` for the link. .. rst-class:: classref-method -void **link_set_navigation_layers** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** +|void| **link_set_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_navigation_layers>` Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path<class_NavigationServer2D_method_map_get_path>`). @@ -742,7 +1012,7 @@ Set the links's navigation layers. This allows selecting links from a path reque .. rst-class:: classref-method -void **link_set_owner_id** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** +|void| **link_set_owner_id**\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_owner_id>` Set the ``ObjectID`` of the object which manages this link. @@ -754,7 +1024,7 @@ Set the ``ObjectID`` of the object which manages this link. .. rst-class:: classref-method -void **link_set_start_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector2<class_Vector2>` position **)** +|void| **link_set_start_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_start_position>` Sets the entry position for this ``link``. @@ -766,7 +1036,7 @@ Sets the entry position for this ``link``. .. rst-class:: classref-method -void **link_set_travel_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** +|void| **link_set_travel_cost**\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_link_set_travel_cost>` Sets the ``travel_cost`` for this ``link``. @@ -778,7 +1048,7 @@ Sets the ``travel_cost`` for this ``link``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **map_create** **(** **)** +:ref:`RID<class_RID>` **map_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_map_create>` Create a new map. @@ -790,13 +1060,13 @@ Create a new map. .. rst-class:: classref-method -void **map_force_update** **(** :ref:`RID<class_RID>` map **)** +|void| **map_force_update**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_force_update>` This function immediately forces synchronization of the specified navigation ``map`` :ref:`RID<class_RID>`. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. -Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. +Avoidance processing and dispatch of the ``safe_velocity`` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. \ **Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. @@ -808,7 +1078,7 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_agents** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_agents**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_agents>` Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -820,7 +1090,7 @@ Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assign .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_cell_size** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_cell_size**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_cell_size>` Returns the map cell size used to rasterize the navigation mesh vertices. @@ -832,7 +1102,7 @@ Returns the map cell size used to rasterize the navigation mesh vertices. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **map_get_closest_point** **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` to_point **)** |const| +:ref:`Vector2<class_Vector2>` **map_get_closest_point**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_closest_point>` Returns the point closest to the provided ``to_point`` on the navigation mesh surface. @@ -844,7 +1114,7 @@ Returns the point closest to the provided ``to_point`` on the navigation mesh su .. rst-class:: classref-method -:ref:`RID<class_RID>` **map_get_closest_point_owner** **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` to_point **)** |const| +:ref:`RID<class_RID>` **map_get_closest_point_owner**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_closest_point_owner>` Returns the owner region RID for the point returned by :ref:`map_get_closest_point<class_NavigationServer2D_method_map_get_closest_point>`. @@ -856,7 +1126,7 @@ Returns the owner region RID for the point returned by :ref:`map_get_closest_poi .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_edge_connection_margin** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_edge_connection_margin>` Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. @@ -864,11 +1134,25 @@ Returns the edge connection margin of the map. The edge connection margin is a d ---- +.. _class_NavigationServer2D_method_map_get_iteration_id: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **map_get_iteration_id**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_iteration_id>` + +Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + +\ **Note:** The iteration id will wrap back to 1 after reaching its range limit. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_get_link_connection_radius: .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_link_connection_radius** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_link_connection_radius>` Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. @@ -880,7 +1164,7 @@ Returns the link connection radius of the map. This distance is the maximum rang .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_links** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_links**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_links>` Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -892,7 +1176,7 @@ Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_obstacles** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_obstacles**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_obstacles>` Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -904,7 +1188,7 @@ Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assi .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **map_get_path** **(** :ref:`RID<class_RID>` map, :ref:`Vector2<class_Vector2>` origin, :ref:`Vector2<class_Vector2>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **map_get_path**\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector2<class_Vector2>`, destination\: :ref:`Vector2<class_Vector2>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_path>` Returns the navigation path to reach the destination from the origin. ``navigation_layers`` is a bitmask of all region navigation layers that are allowed to be in the path. @@ -912,11 +1196,27 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer2D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **map_get_random_point**\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_random_point>` + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_map_get_regions: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_regions** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_regions**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_regions>` Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -928,7 +1228,7 @@ Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assig .. rst-class:: classref-method -:ref:`bool<class_bool>` **map_get_use_edge_connections** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`bool<class_bool>` **map_get_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_get_use_edge_connections>` Returns whether the navigation ``map`` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -940,7 +1240,7 @@ Returns whether the navigation ``map`` allows navigation regions to use edge con .. rst-class:: classref-method -:ref:`bool<class_bool>` **map_is_active** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`bool<class_bool>` **map_is_active**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_map_is_active>` Returns true if the map is active. @@ -952,7 +1252,7 @@ Returns true if the map is active. .. rst-class:: classref-method -void **map_set_active** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** +|void| **map_set_active**\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_set_active>` Sets the map active. @@ -964,7 +1264,7 @@ Sets the map active. .. rst-class:: classref-method -void **map_set_cell_size** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** +|void| **map_set_cell_size**\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_set_cell_size>` Sets the map cell size used to rasterize the navigation mesh vertices. Must match with the cell size of the used navigation meshes. @@ -976,7 +1276,7 @@ Sets the map cell size used to rasterize the navigation mesh vertices. Must matc .. rst-class:: classref-method -void **map_set_edge_connection_margin** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)** +|void| **map_set_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_set_edge_connection_margin>` Set the map edge connection margin used to weld the compatible region edges. @@ -988,7 +1288,7 @@ Set the map edge connection margin used to weld the compatible region edges. .. rst-class:: classref-method -void **map_set_link_connection_radius** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)** +|void| **map_set_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_set_link_connection_radius>` Set the map's link connection radius used to connect links to navigation polygons. @@ -1000,9 +1300,9 @@ Set the map's link connection radius used to connect links to navigation polygon .. rst-class:: classref-method -void **map_set_use_edge_connections** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)** +|void| **map_set_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_map_set_use_edge_connections>` -Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1012,7 +1312,7 @@ Set the navigation ``map`` edge connection use. If ``enabled`` the navigation ma .. rst-class:: classref-method -:ref:`RID<class_RID>` **obstacle_create** **(** **)** +:ref:`RID<class_RID>` **obstacle_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_create>` Creates a new navigation obstacle. @@ -1024,7 +1324,7 @@ Creates a new navigation obstacle. .. rst-class:: classref-method -:ref:`bool<class_bool>` **obstacle_get_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`bool<class_bool>` **obstacle_get_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_avoidance_enabled>` Returns ``true`` if the provided ``obstacle`` has avoidance enabled. @@ -1032,11 +1332,23 @@ Returns ``true`` if the provided ``obstacle`` has avoidance enabled. ---- +.. _class_NavigationServer2D_method_obstacle_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **obstacle_get_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_avoidance_layers>` + +Returns the ``avoidance_layers`` bitmask of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_obstacle_get_map: .. rst-class:: classref-method -:ref:`RID<class_RID>` **obstacle_get_map** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`RID<class_RID>` **obstacle_get_map**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is currently assigned to. @@ -1048,7 +1360,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is c .. rst-class:: classref-method -:ref:`bool<class_bool>` **obstacle_get_paused** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`bool<class_bool>` **obstacle_get_paused**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_paused>` Returns ``true`` if the specified ``obstacle`` is paused. @@ -1056,13 +1368,61 @@ Returns ``true`` if the specified ``obstacle`` is paused. ---- +.. _class_NavigationServer2D_method_obstacle_get_position: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **obstacle_get_position**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_position>` + +Returns the position of the specified ``obstacle`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_radius: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **obstacle_get_radius**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_radius>` + +Returns the radius of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **obstacle_get_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_velocity>` + +Returns the velocity of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_obstacle_get_vertices: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array<class_PackedVector2Array>` **obstacle_get_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_obstacle_get_vertices>` + +Returns the outline vertices for the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_obstacle_set_avoidance_enabled: .. rst-class:: classref-method -void **obstacle_set_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** +|void| **obstacle_set_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_avoidance_enabled>` -If ``enabled`` the provided ``obstacle`` affects avoidance using agents. +If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-item-separator @@ -1072,7 +1432,7 @@ If ``enabled`` the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-method -void **obstacle_set_avoidance_layers** **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** +|void| **obstacle_set_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_avoidance_layers>` Set the obstacles's ``avoidance_layers`` bitmask. @@ -1084,7 +1444,7 @@ Set the obstacles's ``avoidance_layers`` bitmask. .. rst-class:: classref-method -void **obstacle_set_map** **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** +|void| **obstacle_set_map**\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_map>` Sets the navigation map :ref:`RID<class_RID>` for the obstacle. @@ -1096,7 +1456,7 @@ Sets the navigation map :ref:`RID<class_RID>` for the obstacle. .. rst-class:: classref-method -void **obstacle_set_paused** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** +|void| **obstacle_set_paused**\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_paused>` If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. affect avoidance velocities. @@ -1108,7 +1468,7 @@ If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. aff .. rst-class:: classref-method -void **obstacle_set_position** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector2<class_Vector2>` position **)** +|void| **obstacle_set_position**\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_position>` Sets the position of the obstacle in world space. @@ -1120,7 +1480,7 @@ Sets the position of the obstacle in world space. .. rst-class:: classref-method -void **obstacle_set_radius** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** +|void| **obstacle_set_radius**\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_radius>` Sets the radius of the dynamic obstacle. @@ -1132,7 +1492,7 @@ Sets the radius of the dynamic obstacle. .. rst-class:: classref-method -void **obstacle_set_velocity** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector2<class_Vector2>` velocity **)** +|void| **obstacle_set_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_velocity>` Sets ``velocity`` of the dynamic ``obstacle``. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. @@ -1144,7 +1504,7 @@ Sets ``velocity`` of the dynamic ``obstacle``. Allows other agents to better pre .. rst-class:: classref-method -void **obstacle_set_vertices** **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector2Array<class_PackedVector2Array>` vertices **)** +|void| **obstacle_set_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_NavigationServer2D_method_obstacle_set_vertices>` Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. @@ -1152,11 +1512,27 @@ Sets the outline vertices for the obstacle. If the vertices are winded in clockw ---- +.. _class_NavigationServer2D_method_parse_source_geometry_data: + +.. rst-class:: classref-method + +|void| **parse_source_geometry_data**\ (\ navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer2D_method_parse_source_geometry_data>` + +Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to the properties of ``navigation_polygon``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data<class_NavigationServer2D_method_bake_from_source_geometry_data>`. After the process is finished the optional ``callback`` will be called. + +\ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + +\ **Performance:** While convenient, reading data arrays from :ref:`Mesh<class_Mesh>` resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the :ref:`RenderingServer<class_RenderingServer>` in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_query_path: .. rst-class:: classref-method -void **query_path** **(** :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>` parameters, :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` result **)** |const| +|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>`, result\: :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_query_path>` Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>`. Updates the provided :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` result object with the path among other results requested by the query. @@ -1168,7 +1544,7 @@ Queries a path in a given navigation map. Start and target position and other pa .. rst-class:: classref-method -:ref:`RID<class_RID>` **region_create** **(** **)** +:ref:`RID<class_RID>` **region_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_region_create>` Creates a new region. @@ -1180,7 +1556,7 @@ Creates a new region. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **region_get_connection_pathway_end** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| +:ref:`Vector2<class_Vector2>` **region_get_connection_pathway_end**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_connection_pathway_end>` Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer2D_method_region_get_connections_count>`. @@ -1192,7 +1568,7 @@ Returns the ending point of a connection door. ``connection`` is an index betwee .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **region_get_connection_pathway_start** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| +:ref:`Vector2<class_Vector2>` **region_get_connection_pathway_start**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_connection_pathway_start>` Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer2D_method_region_get_connections_count>`. @@ -1204,7 +1580,7 @@ Returns the starting point of a connection door. ``connection`` is an index betw .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_connections_count** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_connections_count**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_connections_count>` Returns how many connections this ``region`` has with other regions in the map. @@ -1212,11 +1588,23 @@ Returns how many connections this ``region`` has with other regions in the map. ---- +.. _class_NavigationServer2D_method_region_get_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **region_get_enabled**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_enabled>` + +Returns ``true`` if the specified ``region`` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_get_enter_cost: .. rst-class:: classref-method -:ref:`float<class_float>` **region_get_enter_cost** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`float<class_float>` **region_get_enter_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_enter_cost>` Returns the enter cost of this ``region``. @@ -1228,7 +1616,7 @@ Returns the enter cost of this ``region``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **region_get_map** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`RID<class_RID>` **region_get_map**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is currently assigned to. @@ -1240,7 +1628,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is cur .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_navigation_layers** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_navigation_layers>` Returns the region's navigation layers. @@ -1252,7 +1640,7 @@ Returns the region's navigation layers. .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_owner_id** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_owner_id**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_owner_id>` Returns the ``ObjectID`` of the object which manages this region. @@ -1260,11 +1648,39 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer2D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **region_get_random_point**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_random_point>` + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_region_get_transform: + +.. rst-class:: classref-method + +:ref:`Transform2D<class_Transform2D>` **region_get_transform**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_transform>` + +Returns the global transformation of this ``region``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_get_travel_cost: .. rst-class:: classref-method -:ref:`float<class_float>` **region_get_travel_cost** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`float<class_float>` **region_get_travel_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_travel_cost>` Returns the travel cost of this ``region``. @@ -1276,7 +1692,7 @@ Returns the travel cost of this ``region``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **region_get_use_edge_connections** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`bool<class_bool>` **region_get_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_get_use_edge_connections>` Returns whether the navigation ``region`` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -1288,7 +1704,7 @@ Returns whether the navigation ``region`` is set to use edge connections to conn .. rst-class:: classref-method -:ref:`bool<class_bool>` **region_owns_point** **(** :ref:`RID<class_RID>` region, :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`bool<class_bool>` **region_owns_point**\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_NavigationServer2D_method_region_owns_point>` Returns ``true`` if the provided ``point`` in world space is currently owned by the provided navigation ``region``. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. @@ -1300,11 +1716,23 @@ If multiple navigation meshes have positions at equal distance the navigation re ---- +.. _class_NavigationServer2D_method_region_set_enabled: + +.. rst-class:: classref-method + +|void| **region_set_enabled**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_enabled>` + +If ``enabled`` is ``true`` the specified ``region`` will contribute to its current navigation map. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_region_set_enter_cost: .. rst-class:: classref-method -void **region_set_enter_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** +|void| **region_set_enter_cost**\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_enter_cost>` Sets the ``enter_cost`` for this ``region``. @@ -1316,7 +1744,7 @@ Sets the ``enter_cost`` for this ``region``. .. rst-class:: classref-method -void **region_set_map** **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** +|void| **region_set_map**\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_map>` Sets the map for the region. @@ -1328,7 +1756,7 @@ Sets the map for the region. .. rst-class:: classref-method -void **region_set_navigation_layers** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** +|void| **region_set_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_navigation_layers>` Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path<class_NavigationServer2D_method_map_get_path>`). @@ -1340,7 +1768,7 @@ Set the region's navigation layers. This allows selecting regions from a path re .. rst-class:: classref-method -void **region_set_navigation_polygon** **(** :ref:`RID<class_RID>` region, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** +|void| **region_set_navigation_polygon**\ (\ region\: :ref:`RID<class_RID>`, navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_navigation_polygon>` Sets the ``navigation_polygon`` for the region. @@ -1352,7 +1780,7 @@ Sets the ``navigation_polygon`` for the region. .. rst-class:: classref-method -void **region_set_owner_id** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** +|void| **region_set_owner_id**\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_owner_id>` Set the ``ObjectID`` of the object which manages this region. @@ -1364,7 +1792,7 @@ Set the ``ObjectID`` of the object which manages this region. .. rst-class:: classref-method -void **region_set_transform** **(** :ref:`RID<class_RID>` region, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **region_set_transform**\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_transform>` Sets the global transformation for the region. @@ -1376,7 +1804,7 @@ Sets the global transformation for the region. .. rst-class:: classref-method -void **region_set_travel_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** +|void| **region_set_travel_cost**\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_travel_cost>` Sets the ``travel_cost`` for this ``region``. @@ -1388,9 +1816,9 @@ Sets the ``travel_cost`` for this ``region``. .. rst-class:: classref-method -void **region_set_use_edge_connections** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** +|void| **region_set_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_region_set_use_edge_connections>` -If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1400,10 +1828,54 @@ If ``enabled`` the navigation ``region`` will use edge connections to connect wi .. rst-class:: classref-method -void **set_debug_enabled** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_debug_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer2D_method_set_debug_enabled>` If ``true`` enables debug mode on the NavigationServer. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_simplify_path: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array<class_PackedVector2Array>` **simplify_path**\ (\ path\: :ref:`PackedVector2Array<class_PackedVector2Array>`, epsilon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer2D_method_simplify_path>` + +Returns a simplified version of ``path`` with less critical path points removed. The simplification amount is in worlds units and controlled by ``epsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_source_geometry_parser_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **source_geometry_parser_create**\ (\ ) :ref:`🔗<class_NavigationServer2D_method_source_geometry_parser_create>` + +Creates a new source geometry parser. If a :ref:`Callable<class_Callable>` is set for the parser with :ref:`source_geometry_parser_set_callback<class_NavigationServer2D_method_source_geometry_parser_set_callback>` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data<class_NavigationServer2D_method_parse_source_geometry_data>` is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_source_geometry_parser_set_callback: + +.. rst-class:: classref-method + +|void| **source_geometry_parser_set_callback**\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer2D_method_source_geometry_parser_set_callback>` + +Sets the ``callback`` :ref:`Callable<class_Callable>` for the specific source geometry ``parser``. The :ref:`Callable<class_Callable>` will receive a call with the following parameters: + +- ``navigation_mesh`` - The :ref:`NavigationPolygon<class_NavigationPolygon>` reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + +- ``source_geometry_data`` - The :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>` reference. Add custom source geometry for navigation mesh baking to this object. + +- ``node`` - The :ref:`Node<class_Node>` that is parsed. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -1411,3 +1883,4 @@ If ``true`` enables debug mode on the NavigationServer. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_navigationserver3d.rst b/classes/class_navigationserver3d.rst index a37aaeb3bdb..370ebd0bf5e 100644 --- a/classes/class_navigationserver3d.rst +++ b/classes/class_navigationserver3d.rst @@ -10,6 +10,8 @@ NavigationServer3D ================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Object<class_Object>` A server interface for low-level 3D navigation access. @@ -19,9 +21,9 @@ A server interface for low-level 3D navigation access. Description ----------- -NavigationServer2D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D<class_AStar3D>`. +NavigationServer3D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D<class_AStar3D>`. -Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. +Maps are divided into regions, which are composed of navigation meshes. Together, they define the navigable areas in the 3D world. \ **Note:** Most **NavigationServer3D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. @@ -40,10 +42,10 @@ This server keeps tracks of any call and executes them during the sync phase. Th Tutorials --------- -- `3D Navmesh Demo <https://godotengine.org/asset-library/asset/124>`__ - - :doc:`Using NavigationServer <../tutorials/navigation/navigation_using_navigationservers>` +- `3D Navigation Demo <https://godotengine.org/asset-library/asset/2743>`__ + .. rst-class:: classref-reftable-group Methods @@ -52,227 +54,295 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer3D_method_agent_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer3D_method_agent_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer3D_method_agent_get_map>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer3D_method_agent_get_paused>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_get_use_3d_avoidance<class_NavigationServer3D_method_agent_get_use_3d_avoidance>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer3D_method_agent_is_map_changed>` **(** :ref:`RID<class_RID>` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_callback<class_NavigationServer3D_method_agent_set_avoidance_callback>` **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_enabled<class_NavigationServer3D_method_agent_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_layers<class_NavigationServer3D_method_agent_set_avoidance_layers>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_mask<class_NavigationServer3D_method_agent_set_avoidance_mask>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_priority<class_NavigationServer3D_method_agent_set_avoidance_priority>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_height<class_NavigationServer3D_method_agent_set_height>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` height **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_map<class_NavigationServer3D_method_agent_set_map>` **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_neighbors<class_NavigationServer3D_method_agent_set_max_neighbors>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_speed<class_NavigationServer3D_method_agent_set_max_speed>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_neighbor_distance<class_NavigationServer3D_method_agent_set_neighbor_distance>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_paused<class_NavigationServer3D_method_agent_set_paused>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_position<class_NavigationServer3D_method_agent_set_position>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_radius<class_NavigationServer3D_method_agent_set_radius>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_agents<class_NavigationServer3D_method_agent_set_time_horizon_agents>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_use_3d_avoidance<class_NavigationServer3D_method_agent_set_use_3d_avoidance>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity<class_NavigationServer3D_method_agent_set_velocity>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_NavigationServer3D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer3D_method_get_debug_enabled>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`get_maps<class_NavigationServer3D_method_get_maps>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_process_info<class_NavigationServer3D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` process_info **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer3D_method_link_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`link_get_end_position<class_NavigationServer3D_method_link_get_end_position>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer3D_method_link_get_enter_cost>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer3D_method_link_get_map>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer3D_method_link_get_navigation_layers>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer3D_method_link_get_owner_id>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`link_get_start_position<class_NavigationServer3D_method_link_get_start_position>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer3D_method_link_get_travel_cost>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer3D_method_link_is_bidirectional>` **(** :ref:`RID<class_RID>` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_bidirectional<class_NavigationServer3D_method_link_set_bidirectional>` **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_end_position<class_NavigationServer3D_method_link_set_end_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_enter_cost<class_NavigationServer3D_method_link_set_enter_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_map<class_NavigationServer3D_method_link_set_map>` **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_navigation_layers<class_NavigationServer3D_method_link_set_navigation_layers>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_owner_id<class_NavigationServer3D_method_link_set_owner_id>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_start_position<class_NavigationServer3D_method_link_set_start_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_travel_cost<class_NavigationServer3D_method_link_set_travel_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer3D_method_map_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_force_update<class_NavigationServer3D_method_map_force_update>` **(** :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_agents<class_NavigationServer3D_method_map_get_agents>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_cell_height<class_NavigationServer3D_method_map_get_cell_height>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer3D_method_map_get_cell_size>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_normal<class_NavigationServer3D_method_map_get_closest_point_normal>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer3D_method_map_get_closest_point_owner>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_to_segment<class_NavigationServer3D_method_map_get_closest_point_to_segment>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` start, :ref:`Vector3<class_Vector3>` end, :ref:`bool<class_bool>` use_collision=false **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer3D_method_map_get_edge_connection_margin>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer3D_method_map_get_link_connection_radius>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_links<class_NavigationServer3D_method_map_get_links>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_obstacles<class_NavigationServer3D_method_map_get_obstacles>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` origin, :ref:`Vector3<class_Vector3>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`map_get_regions<class_NavigationServer3D_method_map_get_regions>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`map_get_up<class_NavigationServer3D_method_map_get_up>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer3D_method_map_get_use_edge_connections>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer3D_method_map_is_active>` **(** :ref:`RID<class_RID>` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_active<class_NavigationServer3D_method_map_set_active>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_link_connection_radius<class_NavigationServer3D_method_map_set_link_connection_radius>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_up<class_NavigationServer3D_method_map_set_up>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_use_edge_connections<class_NavigationServer3D_method_map_set_use_edge_connections>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer3D_method_obstacle_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer3D_method_obstacle_get_map>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer3D_method_obstacle_get_paused>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`obstacle_get_use_3d_avoidance<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>` **(** :ref:`RID<class_RID>` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_layers<class_NavigationServer3D_method_obstacle_set_avoidance_layers>` **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_height<class_NavigationServer3D_method_obstacle_set_height>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_map<class_NavigationServer3D_method_obstacle_set_map>` **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_paused<class_NavigationServer3D_method_obstacle_set_paused>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_position<class_NavigationServer3D_method_obstacle_set_position>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_radius<class_NavigationServer3D_method_obstacle_set_radius>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_use_3d_avoidance<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_velocity<class_NavigationServer3D_method_obstacle_set_velocity>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_vertices<class_NavigationServer3D_method_obstacle_set_vertices>` **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`query_path<class_NavigationServer3D_method_query_path>` **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_bake_navigation_mesh<class_NavigationServer3D_method_region_bake_navigation_mesh>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer3D_method_region_create>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_end<class_NavigationServer3D_method_region_get_connection_pathway_end>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_start<class_NavigationServer3D_method_region_get_connection_pathway_start>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer3D_method_region_get_enter_cost>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer3D_method_region_get_map>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer3D_method_region_get_navigation_layers>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer3D_method_region_get_owner_id>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer3D_method_region_get_travel_cost>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer3D_method_region_get_use_edge_connections>` **(** :ref:`RID<class_RID>` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer3D_method_region_owns_point>` **(** :ref:`RID<class_RID>` region, :ref:`Vector3<class_Vector3>` point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_enter_cost<class_NavigationServer3D_method_region_set_enter_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_map<class_NavigationServer3D_method_region_set_map>` **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_owner_id<class_NavigationServer3D_method_region_set_owner_id>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_transform<class_NavigationServer3D_method_region_set_transform>` **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_travel_cost<class_NavigationServer3D_method_region_set_travel_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_use_edge_connections<class_NavigationServer3D_method_region_set_use_edge_connections>` **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_active<class_NavigationServer3D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_debug_enabled<class_NavigationServer3D_method_set_debug_enabled>` **(** :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer3D_method_agent_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer3D_method_agent_get_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_avoidance_layers<class_NavigationServer3D_method_agent_get_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_avoidance_mask<class_NavigationServer3D_method_agent_get_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_avoidance_priority<class_NavigationServer3D_method_agent_get_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_height<class_NavigationServer3D_method_agent_get_height>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer3D_method_agent_get_map>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`agent_get_max_neighbors<class_NavigationServer3D_method_agent_get_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_max_speed<class_NavigationServer3D_method_agent_get_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_neighbor_distance<class_NavigationServer3D_method_agent_get_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer3D_method_agent_get_paused>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`agent_get_position<class_NavigationServer3D_method_agent_get_position>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_radius<class_NavigationServer3D_method_agent_get_radius>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_time_horizon_agents<class_NavigationServer3D_method_agent_get_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`agent_get_time_horizon_obstacles<class_NavigationServer3D_method_agent_get_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_get_use_3d_avoidance<class_NavigationServer3D_method_agent_get_use_3d_avoidance>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`agent_get_velocity<class_NavigationServer3D_method_agent_get_velocity>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_has_avoidance_callback<class_NavigationServer3D_method_agent_has_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer3D_method_agent_is_map_changed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_callback<class_NavigationServer3D_method_agent_set_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_enabled<class_NavigationServer3D_method_agent_set_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_layers<class_NavigationServer3D_method_agent_set_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_mask<class_NavigationServer3D_method_agent_set_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_avoidance_priority<class_NavigationServer3D_method_agent_set_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_height<class_NavigationServer3D_method_agent_set_height>`\ (\ agent\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_map<class_NavigationServer3D_method_agent_set_map>`\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_max_neighbors<class_NavigationServer3D_method_agent_set_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_max_speed<class_NavigationServer3D_method_agent_set_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_neighbor_distance<class_NavigationServer3D_method_agent_set_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_paused<class_NavigationServer3D_method_agent_set_paused>`\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_position<class_NavigationServer3D_method_agent_set_position>`\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_radius<class_NavigationServer3D_method_agent_set_radius>`\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_time_horizon_agents<class_NavigationServer3D_method_agent_set_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_use_3d_avoidance<class_NavigationServer3D_method_agent_set_use_3d_avoidance>`\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_velocity<class_NavigationServer3D_method_agent_set_velocity>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake_from_source_geometry_data_async<class_NavigationServer3D_method_bake_from_source_geometry_data_async>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_NavigationServer3D_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer3D_method_get_debug_enabled>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`get_maps<class_NavigationServer3D_method_get_maps>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_info<class_NavigationServer3D_method_get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_baking_navigation_mesh<class_NavigationServer3D_method_is_baking_navigation_mesh>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer3D_method_link_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`link_get_enabled<class_NavigationServer3D_method_link_get_enabled>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`link_get_end_position<class_NavigationServer3D_method_link_get_end_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer3D_method_link_get_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer3D_method_link_get_map>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer3D_method_link_get_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer3D_method_link_get_owner_id>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`link_get_start_position<class_NavigationServer3D_method_link_get_start_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer3D_method_link_get_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer3D_method_link_is_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_bidirectional<class_NavigationServer3D_method_link_set_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_enabled<class_NavigationServer3D_method_link_set_enabled>`\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_end_position<class_NavigationServer3D_method_link_set_end_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_enter_cost<class_NavigationServer3D_method_link_set_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_map<class_NavigationServer3D_method_link_set_map>`\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_navigation_layers<class_NavigationServer3D_method_link_set_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_owner_id<class_NavigationServer3D_method_link_set_owner_id>`\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_start_position<class_NavigationServer3D_method_link_set_start_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`link_set_travel_cost<class_NavigationServer3D_method_link_set_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer3D_method_map_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_force_update<class_NavigationServer3D_method_map_force_update>`\ (\ map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_agents<class_NavigationServer3D_method_map_get_agents>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_cell_height<class_NavigationServer3D_method_map_get_cell_height>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer3D_method_map_get_cell_size>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_normal<class_NavigationServer3D_method_map_get_closest_point_normal>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer3D_method_map_get_closest_point_owner>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_to_segment<class_NavigationServer3D_method_map_get_closest_point_to_segment>`\ (\ map\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer3D_method_map_get_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`map_get_iteration_id<class_NavigationServer3D_method_map_get_iteration_id>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer3D_method_map_get_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_links<class_NavigationServer3D_method_map_get_links>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`map_get_merge_rasterizer_cell_scale<class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_obstacles<class_NavigationServer3D_method_map_get_obstacles>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector3<class_Vector3>`, destination\: :ref:`Vector3<class_Vector3>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_get_random_point<class_NavigationServer3D_method_map_get_random_point>`\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_regions<class_NavigationServer3D_method_map_get_regions>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`map_get_up<class_NavigationServer3D_method_map_get_up>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer3D_method_map_get_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer3D_method_map_is_active>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_active<class_NavigationServer3D_method_map_set_active>`\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>`\ (\ map\: :ref:`RID<class_RID>`, cell_height\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>`\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_link_connection_radius<class_NavigationServer3D_method_map_set_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_merge_rasterizer_cell_scale<class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale>`\ (\ map\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_up<class_NavigationServer3D_method_map_set_up>`\ (\ map\: :ref:`RID<class_RID>`, up\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`map_set_use_edge_connections<class_NavigationServer3D_method_map_set_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer3D_method_obstacle_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`obstacle_get_avoidance_layers<class_NavigationServer3D_method_obstacle_get_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`obstacle_get_height<class_NavigationServer3D_method_obstacle_get_height>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer3D_method_obstacle_get_map>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer3D_method_obstacle_get_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`obstacle_get_position<class_NavigationServer3D_method_obstacle_get_position>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`obstacle_get_radius<class_NavigationServer3D_method_obstacle_get_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`obstacle_get_use_3d_avoidance<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`obstacle_get_velocity<class_NavigationServer3D_method_obstacle_get_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`obstacle_get_vertices<class_NavigationServer3D_method_obstacle_get_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_avoidance_layers<class_NavigationServer3D_method_obstacle_set_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_height<class_NavigationServer3D_method_obstacle_set_height>`\ (\ obstacle\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_map<class_NavigationServer3D_method_obstacle_set_map>`\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_paused<class_NavigationServer3D_method_obstacle_set_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_position<class_NavigationServer3D_method_obstacle_set_position>`\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_radius<class_NavigationServer3D_method_obstacle_set_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_use_3d_avoidance<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>`\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_velocity<class_NavigationServer3D_method_obstacle_set_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`obstacle_set_vertices<class_NavigationServer3D_method_obstacle_set_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`query_path<class_NavigationServer3D_method_query_path>`\ (\ parameters\: :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, result\: :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_bake_navigation_mesh<class_NavigationServer3D_method_region_bake_navigation_mesh>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer3D_method_region_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_end<class_NavigationServer3D_method_region_get_connection_pathway_end>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_start<class_NavigationServer3D_method_region_get_connection_pathway_start>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_get_enabled<class_NavigationServer3D_method_region_get_enabled>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer3D_method_region_get_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer3D_method_region_get_map>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer3D_method_region_get_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer3D_method_region_get_owner_id>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`region_get_random_point<class_NavigationServer3D_method_region_get_random_point>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`region_get_transform<class_NavigationServer3D_method_region_get_transform>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer3D_method_region_get_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer3D_method_region_get_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer3D_method_region_owns_point>`\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_enabled<class_NavigationServer3D_method_region_set_enabled>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_enter_cost<class_NavigationServer3D_method_region_set_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_map<class_NavigationServer3D_method_region_set_map>`\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>`\ (\ region\: :ref:`RID<class_RID>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_owner_id<class_NavigationServer3D_method_region_set_owner_id>`\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_transform<class_NavigationServer3D_method_region_set_transform>`\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_travel_cost<class_NavigationServer3D_method_region_set_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`region_set_use_edge_connections<class_NavigationServer3D_method_region_set_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_active<class_NavigationServer3D_method_set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_debug_enabled<class_NavigationServer3D_method_set_debug_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`simplify_path<class_NavigationServer3D_method_simplify_path>`\ (\ path\: :ref:`PackedVector3Array<class_PackedVector3Array>`, epsilon\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`source_geometry_parser_create<class_NavigationServer3D_method_source_geometry_parser_create>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`source_geometry_parser_set_callback<class_NavigationServer3D_method_source_geometry_parser_set_callback>`\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -287,7 +357,7 @@ Signals .. rst-class:: classref-signal -**avoidance_debug_changed** **(** **)** +**avoidance_debug_changed**\ (\ ) :ref:`🔗<class_NavigationServer3D_signal_avoidance_debug_changed>` Emitted when avoidance debug settings are changed. Only available in debug builds. @@ -299,7 +369,7 @@ Emitted when avoidance debug settings are changed. Only available in debug build .. rst-class:: classref-signal -**map_changed** **(** :ref:`RID<class_RID>` map **)** +**map_changed**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_signal_map_changed>` Emitted when a navigation map is updated, when a region moves or is modified. @@ -311,7 +381,7 @@ Emitted when a navigation map is updated, when a region moves or is modified. .. rst-class:: classref-signal -**navigation_debug_changed** **(** **)** +**navigation_debug_changed**\ (\ ) :ref:`🔗<class_NavigationServer3D_signal_navigation_debug_changed>` Emitted when navigation debug settings are changed. Only available in debug builds. @@ -328,7 +398,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ProcessInfo**: +enum **ProcessInfo**: :ref:`🔗<enum_NavigationServer3D_ProcessInfo>` .. _class_NavigationServer3D_constant_INFO_ACTIVE_MAPS: @@ -415,7 +485,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID<class_RID>` **agent_create** **(** **)** +:ref:`RID<class_RID>` **agent_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_agent_create>` Creates the agent. @@ -427,7 +497,7 @@ Creates the agent. .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_get_avoidance_enabled** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_get_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_enabled>` Returns ``true`` if the provided ``agent`` has avoidance enabled. @@ -435,11 +505,59 @@ Returns ``true`` if the provided ``agent`` has avoidance enabled. ---- +.. _class_NavigationServer3D_method_agent_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_layers>` + +Returns the ``avoidance_layers`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_avoidance_mask: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_mask>` + +Returns the ``avoidance_mask`` bitmask of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_avoidance_priority: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_priority>` + +Returns the ``avoidance_priority`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_height: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_height**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_height>` + +Returns the ``height`` of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_map: .. rst-class:: classref-method -:ref:`RID<class_RID>` **agent_get_map** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`RID<class_RID>` **agent_get_map**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is currently assigned to. @@ -447,11 +565,47 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is curr ---- +.. _class_NavigationServer3D_method_agent_get_max_neighbors: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **agent_get_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_max_neighbors>` + +Returns the maximum number of other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_max_speed: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_max_speed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_max_speed>` + +Returns the maximum speed of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_neighbor_distance: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_neighbor_distance>` + +Returns the maximum distance to other agents the specified ``agent`` takes into account in the navigation. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_paused: .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_get_paused** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_get_paused**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_paused>` Returns ``true`` if the specified ``agent`` is paused. @@ -459,11 +613,59 @@ Returns ``true`` if the specified ``agent`` is paused. ---- +.. _class_NavigationServer3D_method_agent_get_position: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **agent_get_position**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_position>` + +Returns the position of the specified ``agent`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_radius: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_radius**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_radius>` + +Returns the radius of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_time_horizon_agents: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_time_horizon_agents>` + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to other agents. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_get_time_horizon_obstacles: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **agent_get_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_time_horizon_obstacles>` + +Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_get_use_3d_avoidance: .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_get_use_3d_avoidance**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_use_3d_avoidance>` Returns ``true`` if the provided ``agent`` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). @@ -471,11 +673,35 @@ Returns ``true`` if the provided ``agent`` uses avoidance in 3D space Vector3(x, ---- +.. _class_NavigationServer3D_method_agent_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **agent_get_velocity**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_velocity>` + +Returns the velocity of the specified ``agent``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_agent_has_avoidance_callback: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **agent_has_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_has_avoidance_callback>` + +Return ``true`` if the specified ``agent`` has an avoidance callback. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_agent_is_map_changed: .. rst-class:: classref-method -:ref:`bool<class_bool>` **agent_is_map_changed** **(** :ref:`RID<class_RID>` agent **)** |const| +:ref:`bool<class_bool>` **agent_is_map_changed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_is_map_changed>` Returns true if the map got changed the previous frame. @@ -487,7 +713,7 @@ Returns true if the map got changed the previous frame. .. rst-class:: classref-method -void **agent_set_avoidance_callback** **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)** +|void| **agent_set_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_callback>` Sets the callback :ref:`Callable<class_Callable>` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations. @@ -501,9 +727,9 @@ Sets the callback :ref:`Callable<class_Callable>` that gets called after each av .. rst-class:: classref-method -void **agent_set_avoidance_enabled** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** +|void| **agent_set_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_enabled>` -If ``enabled`` the provided ``agent`` calculates avoidance. +If ``enabled`` is ``true``, the provided ``agent`` calculates avoidance. .. rst-class:: classref-item-separator @@ -513,7 +739,7 @@ If ``enabled`` the provided ``agent`` calculates avoidance. .. rst-class:: classref-method -void **agent_set_avoidance_layers** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)** +|void| **agent_set_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_layers>` Set the agent's ``avoidance_layers`` bitmask. @@ -525,7 +751,7 @@ Set the agent's ``avoidance_layers`` bitmask. .. rst-class:: classref-method -void **agent_set_avoidance_mask** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)** +|void| **agent_set_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_mask>` Set the agent's ``avoidance_mask`` bitmask. @@ -537,11 +763,11 @@ Set the agent's ``avoidance_mask`` bitmask. .. rst-class:: classref-method -void **agent_set_avoidance_priority** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)** +|void| **agent_set_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_priority>` Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority). -The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower `` avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. +The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower ``avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. .. rst-class:: classref-item-separator @@ -551,7 +777,7 @@ The specified ``agent`` does not adjust the velocity for other agents that would .. rst-class:: classref-method -void **agent_set_height** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` height **)** +|void| **agent_set_height**\ (\ agent\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_height>` Updates the provided ``agent`` ``height``. @@ -563,7 +789,7 @@ Updates the provided ``agent`` ``height``. .. rst-class:: classref-method -void **agent_set_map** **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** +|void| **agent_set_map**\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_map>` Puts the agent in the map. @@ -575,7 +801,7 @@ Puts the agent in the map. .. rst-class:: classref-method -void **agent_set_max_neighbors** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)** +|void| **agent_set_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_max_neighbors>` Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -587,7 +813,7 @@ Sets the maximum number of other agents the agent takes into account in the navi .. rst-class:: classref-method -void **agent_set_max_speed** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)** +|void| **agent_set_max_speed**\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_max_speed>` Sets the maximum speed of the agent. Must be positive. @@ -599,7 +825,7 @@ Sets the maximum speed of the agent. Must be positive. .. rst-class:: classref-method -void **agent_set_neighbor_distance** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)** +|void| **agent_set_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_neighbor_distance>` Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. @@ -611,7 +837,7 @@ Sets the maximum distance to other agents this agent takes into account in the n .. rst-class:: classref-method -void **agent_set_paused** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)** +|void| **agent_set_paused**\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_paused>` If ``paused`` is true the specified ``agent`` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. @@ -623,7 +849,7 @@ If ``paused`` is true the specified ``agent`` will not be processed, e.g. calcul .. rst-class:: classref-method -void **agent_set_position** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` position **)** +|void| **agent_set_position**\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_position>` Sets the position of the agent in world space. @@ -635,7 +861,7 @@ Sets the position of the agent in world space. .. rst-class:: classref-method -void **agent_set_radius** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)** +|void| **agent_set_radius**\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_radius>` Sets the radius of the agent. @@ -647,7 +873,7 @@ Sets the radius of the agent. .. rst-class:: classref-method -void **agent_set_time_horizon_agents** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** +|void| **agent_set_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_time_horizon_agents>` The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -659,7 +885,7 @@ The minimal amount of time for which the agent's velocities that are computed by .. rst-class:: classref-method -void **agent_set_time_horizon_obstacles** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** +|void| **agent_set_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>` The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. @@ -671,11 +897,11 @@ The minimal amount of time for which the agent's velocities that are computed by .. rst-class:: classref-method -void **agent_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** +|void| **agent_set_use_3d_avoidance**\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_use_3d_avoidance>` Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled. -If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, unterwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's. +If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, underwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's. If ``false`` the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance. @@ -687,7 +913,7 @@ If ``false`` the agent calculates avoidance velocities in 2D along the xz-axis i .. rst-class:: classref-method -void **agent_set_velocity** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** +|void| **agent_set_velocity**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_velocity>` Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>` as well to reset the internal simulation velocity. @@ -699,7 +925,7 @@ Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The av .. rst-class:: classref-method -void **agent_set_velocity_forced** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** +|void| **agent_set_velocity_forced**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_velocity_forced>` Replaces the internal velocity in the collision avoidance simulation with ``velocity`` for the specified ``agent``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. @@ -711,7 +937,7 @@ Replaces the internal velocity in the collision avoidance simulation with ``velo .. rst-class:: classref-method -void **bake_from_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** +|void| **bake_from_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_bake_from_source_geometry_data>` Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data``. After the process is finished the optional ``callback`` will be called. @@ -719,11 +945,23 @@ Bakes the provided ``navigation_mesh`` with the data from the provided ``source_ ---- +.. _class_NavigationServer3D_method_bake_from_source_geometry_data_async: + +.. rst-class:: classref-method + +|void| **bake_from_source_geometry_data_async**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_bake_from_source_geometry_data_async>` + +Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data`` as an async task running on a background thread. After the process is finished the optional ``callback`` will be called. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_free_rid: .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_free_rid>` Destroys the given RID. @@ -735,7 +973,7 @@ Destroys the given RID. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_debug_enabled** **(** **)** |const| +:ref:`bool<class_bool>` **get_debug_enabled**\ (\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_debug_enabled>` Returns ``true`` when the NavigationServer has debug enabled. @@ -747,7 +985,7 @@ Returns ``true`` when the NavigationServer has debug enabled. .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **get_maps** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_maps**\ (\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_maps>` Returns all created navigation map :ref:`RID<class_RID>`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. @@ -759,7 +997,7 @@ Returns all created navigation map :ref:`RID<class_RID>`\ s on the NavigationSer .. rst-class:: classref-method -:ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` process_info **)** |const| +:ref:`int<class_int>` **get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_process_info>` Returns information about the current state of the NavigationServer. See :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` for a list of available states. @@ -767,11 +1005,23 @@ Returns information about the current state of the NavigationServer. See :ref:`P ---- +.. _class_NavigationServer3D_method_is_baking_navigation_mesh: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_baking_navigation_mesh**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_is_baking_navigation_mesh>` + +Returns ``true`` when the provided navigation mesh is being baked on a background thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_link_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **link_create** **(** **)** +:ref:`RID<class_RID>` **link_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_link_create>` Create a new link between two positions on a map. @@ -779,11 +1029,23 @@ Create a new link between two positions on a map. ---- +.. _class_NavigationServer3D_method_link_get_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **link_get_enabled**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_enabled>` + +Returns ``true`` if the specified ``link`` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_link_get_end_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **link_get_end_position** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`Vector3<class_Vector3>` **link_get_end_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_end_position>` Returns the ending position of this ``link``. @@ -795,7 +1057,7 @@ Returns the ending position of this ``link``. .. rst-class:: classref-method -:ref:`float<class_float>` **link_get_enter_cost** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`float<class_float>` **link_get_enter_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_enter_cost>` Returns the enter cost of this ``link``. @@ -807,7 +1069,7 @@ Returns the enter cost of this ``link``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **link_get_map** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`RID<class_RID>` **link_get_map**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is currently assigned to. @@ -819,7 +1081,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is curre .. rst-class:: classref-method -:ref:`int<class_int>` **link_get_navigation_layers** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`int<class_int>` **link_get_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_navigation_layers>` Returns the navigation layers for this ``link``. @@ -831,7 +1093,7 @@ Returns the navigation layers for this ``link``. .. rst-class:: classref-method -:ref:`int<class_int>` **link_get_owner_id** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`int<class_int>` **link_get_owner_id**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_owner_id>` Returns the ``ObjectID`` of the object which manages this link. @@ -843,7 +1105,7 @@ Returns the ``ObjectID`` of the object which manages this link. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **link_get_start_position** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`Vector3<class_Vector3>` **link_get_start_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_start_position>` Returns the starting position of this ``link``. @@ -855,7 +1117,7 @@ Returns the starting position of this ``link``. .. rst-class:: classref-method -:ref:`float<class_float>` **link_get_travel_cost** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`float<class_float>` **link_get_travel_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_travel_cost>` Returns the travel cost of this ``link``. @@ -867,7 +1129,7 @@ Returns the travel cost of this ``link``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **link_is_bidirectional** **(** :ref:`RID<class_RID>` link **)** |const| +:ref:`bool<class_bool>` **link_is_bidirectional**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_is_bidirectional>` Returns whether this ``link`` can be travelled in both directions. @@ -879,7 +1141,7 @@ Returns whether this ``link`` can be travelled in both directions. .. rst-class:: classref-method -void **link_set_bidirectional** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)** +|void| **link_set_bidirectional**\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_bidirectional>` Sets whether this ``link`` can be travelled in both directions. @@ -887,11 +1149,23 @@ Sets whether this ``link`` can be travelled in both directions. ---- +.. _class_NavigationServer3D_method_link_set_enabled: + +.. rst-class:: classref-method + +|void| **link_set_enabled**\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_enabled>` + +If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_link_set_end_position: .. rst-class:: classref-method -void **link_set_end_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** +|void| **link_set_end_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_end_position>` Sets the exit position for the ``link``. @@ -903,7 +1177,7 @@ Sets the exit position for the ``link``. .. rst-class:: classref-method -void **link_set_enter_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)** +|void| **link_set_enter_cost**\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_enter_cost>` Sets the ``enter_cost`` for this ``link``. @@ -915,7 +1189,7 @@ Sets the ``enter_cost`` for this ``link``. .. rst-class:: classref-method -void **link_set_map** **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)** +|void| **link_set_map**\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_map>` Sets the navigation map :ref:`RID<class_RID>` for the link. @@ -927,7 +1201,7 @@ Sets the navigation map :ref:`RID<class_RID>` for the link. .. rst-class:: classref-method -void **link_set_navigation_layers** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** +|void| **link_set_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_navigation_layers>` Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`). @@ -939,7 +1213,7 @@ Set the links's navigation layers. This allows selecting links from a path reque .. rst-class:: classref-method -void **link_set_owner_id** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** +|void| **link_set_owner_id**\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_owner_id>` Set the ``ObjectID`` of the object which manages this link. @@ -951,7 +1225,7 @@ Set the ``ObjectID`` of the object which manages this link. .. rst-class:: classref-method -void **link_set_start_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** +|void| **link_set_start_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_start_position>` Sets the entry position for this ``link``. @@ -963,7 +1237,7 @@ Sets the entry position for this ``link``. .. rst-class:: classref-method -void **link_set_travel_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** +|void| **link_set_travel_cost**\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_travel_cost>` Sets the ``travel_cost`` for this ``link``. @@ -975,7 +1249,7 @@ Sets the ``travel_cost`` for this ``link``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **map_create** **(** **)** +:ref:`RID<class_RID>` **map_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_map_create>` Create a new map. @@ -987,13 +1261,13 @@ Create a new map. .. rst-class:: classref-method -void **map_force_update** **(** :ref:`RID<class_RID>` map **)** +|void| **map_force_update**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_force_update>` This function immediately forces synchronization of the specified navigation ``map`` :ref:`RID<class_RID>`. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. -Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame. +Avoidance processing and dispatch of the ``safe_velocity`` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. \ **Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. @@ -1005,7 +1279,7 @@ Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_agents** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_agents**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_agents>` Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -1017,7 +1291,7 @@ Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assign .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_cell_height** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_cell_height**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_cell_height>` Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis. @@ -1029,7 +1303,7 @@ Returns the map cell height used to rasterize the navigation mesh vertices on th .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_cell_size** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_cell_size**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_cell_size>` Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane. @@ -1041,7 +1315,7 @@ Returns the map cell size used to rasterize the navigation mesh vertices on the .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **map_get_closest_point** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| +:ref:`Vector3<class_Vector3>` **map_get_closest_point**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point>` Returns the point closest to the provided ``to_point`` on the navigation mesh surface. @@ -1053,7 +1327,7 @@ Returns the point closest to the provided ``to_point`` on the navigation mesh su .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **map_get_closest_point_normal** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| +:ref:`Vector3<class_Vector3>` **map_get_closest_point_normal**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_normal>` Returns the normal for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`. @@ -1065,7 +1339,7 @@ Returns the normal for the point returned by :ref:`map_get_closest_point<class_N .. rst-class:: classref-method -:ref:`RID<class_RID>` **map_get_closest_point_owner** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| +:ref:`RID<class_RID>` **map_get_closest_point_owner**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_owner>` Returns the owner region RID for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`. @@ -1077,7 +1351,7 @@ Returns the owner region RID for the point returned by :ref:`map_get_closest_poi .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **map_get_closest_point_to_segment** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` start, :ref:`Vector3<class_Vector3>` end, :ref:`bool<class_bool>` use_collision=false **)** |const| +:ref:`Vector3<class_Vector3>` **map_get_closest_point_to_segment**\ (\ map\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_to_segment>` Returns the closest point between the navigation surface and the segment. @@ -1089,7 +1363,7 @@ Returns the closest point between the navigation surface and the segment. .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_edge_connection_margin** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_edge_connection_margin>` Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. @@ -1097,11 +1371,25 @@ Returns the edge connection margin of the map. This distance is the minimum vert ---- +.. _class_NavigationServer3D_method_map_get_iteration_id: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **map_get_iteration_id**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_iteration_id>` + +Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + +\ **Note:** The iteration id will wrap back to 1 after reaching its range limit. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_link_connection_radius: .. rst-class:: classref-method -:ref:`float<class_float>` **map_get_link_connection_radius** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`float<class_float>` **map_get_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_link_connection_radius>` Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. @@ -1113,7 +1401,7 @@ Returns the link connection radius of the map. This distance is the maximum rang .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_links** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_links**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_links>` Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -1121,11 +1409,23 @@ Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned ---- +.. _class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **map_get_merge_rasterizer_cell_scale**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale>` + +Returns map's internal merge rasterizer cell scale. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_obstacles: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_obstacles** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_obstacles**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_obstacles>` Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -1137,7 +1437,7 @@ Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assi .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **map_get_path** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` origin, :ref:`Vector3<class_Vector3>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **map_get_path**\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector3<class_Vector3>`, destination\: :ref:`Vector3<class_Vector3>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_path>` Returns the navigation path to reach the destination from the origin. ``navigation_layers`` is a bitmask of all region navigation layers that are allowed to be in the path. @@ -1145,11 +1445,27 @@ Returns the navigation path to reach the destination from the origin. ``navigati ---- +.. _class_NavigationServer3D_method_map_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **map_get_random_point**\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_random_point>` + +Returns a random position picked from all map region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster). + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_get_regions: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **map_get_regions** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_regions**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_regions>` Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``. @@ -1161,7 +1477,7 @@ Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assig .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **map_get_up** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`Vector3<class_Vector3>` **map_get_up**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_up>` Returns the map's up direction. @@ -1173,7 +1489,7 @@ Returns the map's up direction. .. rst-class:: classref-method -:ref:`bool<class_bool>` **map_get_use_edge_connections** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`bool<class_bool>` **map_get_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_use_edge_connections>` Returns true if the navigation ``map`` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -1185,7 +1501,7 @@ Returns true if the navigation ``map`` allows navigation regions to use edge con .. rst-class:: classref-method -:ref:`bool<class_bool>` **map_is_active** **(** :ref:`RID<class_RID>` map **)** |const| +:ref:`bool<class_bool>` **map_is_active**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_is_active>` Returns true if the map is active. @@ -1197,7 +1513,7 @@ Returns true if the map is active. .. rst-class:: classref-method -void **map_set_active** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** +|void| **map_set_active**\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_active>` Sets the map active. @@ -1209,7 +1525,7 @@ Sets the map active. .. rst-class:: classref-method -void **map_set_cell_height** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)** +|void| **map_set_cell_height**\ (\ map\: :ref:`RID<class_RID>`, cell_height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_cell_height>` Sets the map cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height of the used navigation meshes. @@ -1221,7 +1537,7 @@ Sets the map cell height used to rasterize the navigation mesh vertices on the Y .. rst-class:: classref-method -void **map_set_cell_size** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** +|void| **map_set_cell_size**\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_cell_size>` Sets the map cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size of the used navigation meshes. @@ -1233,7 +1549,7 @@ Sets the map cell size used to rasterize the navigation mesh vertices on the XZ .. rst-class:: classref-method -void **map_set_edge_connection_margin** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)** +|void| **map_set_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_edge_connection_margin>` Set the map edge connection margin used to weld the compatible region edges. @@ -1245,7 +1561,7 @@ Set the map edge connection margin used to weld the compatible region edges. .. rst-class:: classref-method -void **map_set_link_connection_radius** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)** +|void| **map_set_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_link_connection_radius>` Set the map's link connection radius used to connect links to navigation polygons. @@ -1253,11 +1569,23 @@ Set the map's link connection radius used to connect links to navigation polygon ---- +.. _class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale: + +.. rst-class:: classref-method + +|void| **map_set_merge_rasterizer_cell_scale**\ (\ map\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale>` + +Set the map's internal merge rasterizer cell scale used to control merging sensitivity. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_map_set_up: .. rst-class:: classref-method -void **map_set_up** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)** +|void| **map_set_up**\ (\ map\: :ref:`RID<class_RID>`, up\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_up>` Sets the map up direction. @@ -1269,9 +1597,9 @@ Sets the map up direction. .. rst-class:: classref-method -void **map_set_use_edge_connections** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)** +|void| **map_set_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_use_edge_connections>` -Set the navigation ``map`` edge connection use. If ``enabled`` the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1281,7 +1609,7 @@ Set the navigation ``map`` edge connection use. If ``enabled`` the navigation ma .. rst-class:: classref-method -:ref:`RID<class_RID>` **obstacle_create** **(** **)** +:ref:`RID<class_RID>` **obstacle_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_create>` Creates a new obstacle. @@ -1293,7 +1621,7 @@ Creates a new obstacle. .. rst-class:: classref-method -:ref:`bool<class_bool>` **obstacle_get_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`bool<class_bool>` **obstacle_get_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>` Returns ``true`` if the provided ``obstacle`` has avoidance enabled. @@ -1301,11 +1629,35 @@ Returns ``true`` if the provided ``obstacle`` has avoidance enabled. ---- +.. _class_NavigationServer3D_method_obstacle_get_avoidance_layers: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **obstacle_get_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_avoidance_layers>` + +Returns the ``avoidance_layers`` bitmask of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_height: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **obstacle_get_height**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_height>` + +Returns the ``height`` of the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_get_map: .. rst-class:: classref-method -:ref:`RID<class_RID>` **obstacle_get_map** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`RID<class_RID>` **obstacle_get_map**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is currently assigned to. @@ -1317,7 +1669,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is c .. rst-class:: classref-method -:ref:`bool<class_bool>` **obstacle_get_paused** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`bool<class_bool>` **obstacle_get_paused**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_paused>` Returns ``true`` if the specified ``obstacle`` is paused. @@ -1325,11 +1677,35 @@ Returns ``true`` if the specified ``obstacle`` is paused. ---- +.. _class_NavigationServer3D_method_obstacle_get_position: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **obstacle_get_position**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_position>` + +Returns the position of the specified ``obstacle`` in world space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_radius: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **obstacle_get_radius**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_radius>` + +Returns the radius of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_get_use_3d_avoidance: .. rst-class:: classref-method -:ref:`bool<class_bool>` **obstacle_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle **)** |const| +:ref:`bool<class_bool>` **obstacle_get_use_3d_avoidance**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>` Returns ``true`` if the provided ``obstacle`` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). @@ -1337,13 +1713,37 @@ Returns ``true`` if the provided ``obstacle`` uses avoidance in 3D space Vector3 ---- +.. _class_NavigationServer3D_method_obstacle_get_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **obstacle_get_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_velocity>` + +Returns the velocity of the specified dynamic ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_obstacle_get_vertices: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array<class_PackedVector3Array>` **obstacle_get_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_vertices>` + +Returns the outline vertices for the specified ``obstacle``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_obstacle_set_avoidance_enabled: .. rst-class:: classref-method -void **obstacle_set_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** +|void| **obstacle_set_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>` -If ``enabled`` the provided ``obstacle`` affects avoidance using agents. +If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-item-separator @@ -1353,7 +1753,7 @@ If ``enabled`` the provided ``obstacle`` affects avoidance using agents. .. rst-class:: classref-method -void **obstacle_set_avoidance_layers** **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** +|void| **obstacle_set_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_avoidance_layers>` Set the obstacles's ``avoidance_layers`` bitmask. @@ -1365,7 +1765,7 @@ Set the obstacles's ``avoidance_layers`` bitmask. .. rst-class:: classref-method -void **obstacle_set_height** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)** +|void| **obstacle_set_height**\ (\ obstacle\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_height>` Sets the ``height`` for the ``obstacle``. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance. @@ -1377,7 +1777,7 @@ Sets the ``height`` for the ``obstacle``. In 3D agents will ignore obstacles tha .. rst-class:: classref-method -void **obstacle_set_map** **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** +|void| **obstacle_set_map**\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_map>` Assigns the ``obstacle`` to a navigation map. @@ -1389,7 +1789,7 @@ Assigns the ``obstacle`` to a navigation map. .. rst-class:: classref-method -void **obstacle_set_paused** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** +|void| **obstacle_set_paused**\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_paused>` If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. affect avoidance velocities. @@ -1401,7 +1801,7 @@ If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. aff .. rst-class:: classref-method -void **obstacle_set_position** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)** +|void| **obstacle_set_position**\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_position>` Updates the ``position`` in world space for the ``obstacle``. @@ -1413,7 +1813,7 @@ Updates the ``position`` in world space for the ``obstacle``. .. rst-class:: classref-method -void **obstacle_set_radius** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** +|void| **obstacle_set_radius**\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_radius>` Sets the radius of the dynamic obstacle. @@ -1425,7 +1825,7 @@ Sets the radius of the dynamic obstacle. .. rst-class:: classref-method -void **obstacle_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** +|void| **obstacle_set_use_3d_avoidance**\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>` Sets if the ``obstacle`` uses the 2D avoidance or the 3D avoidance while avoidance is enabled. @@ -1437,7 +1837,7 @@ Sets if the ``obstacle`` uses the 2D avoidance or the 3D avoidance while avoidan .. rst-class:: classref-method -void **obstacle_set_velocity** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)** +|void| **obstacle_set_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_velocity>` Sets ``velocity`` of the dynamic ``obstacle``. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. @@ -1449,7 +1849,7 @@ Sets ``velocity`` of the dynamic ``obstacle``. Allows other agents to better pre .. rst-class:: classref-method -void **obstacle_set_vertices** **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** +|void| **obstacle_set_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_vertices>` Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. @@ -1461,7 +1861,7 @@ Sets the outline vertices for the obstacle. If the vertices are winded in clockw .. rst-class:: classref-method -void **parse_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)** +|void| **parse_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_parse_source_geometry_data>` Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>`. After the process is finished the optional ``callback`` will be called. @@ -1477,7 +1877,7 @@ Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to th .. rst-class:: classref-method -void **query_path** **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const| +|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, result\: :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_query_path>` Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`. Updates the provided :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result object with the path among other results requested by the query. @@ -1489,11 +1889,11 @@ Queries a path in a given navigation map. Start and target position and other pa .. rst-class:: classref-method -void **region_bake_navigation_mesh** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)** +|void| **region_bake_navigation_mesh**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_bake_navigation_mesh>` -Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``. +**Deprecated:** This method is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` resource. Use this resource with :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` to parse the :ref:`SceneTree<class_SceneTree>` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree<class_SceneTree>` parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>` to bake a navigation mesh. -\ *Deprecated.* This function is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` resource. Use this resource with :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` to parse the SceneTree for nodes that should contribute to the navigation mesh baking. The SceneTree parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>` to bake a navigation mesh. +Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``. .. rst-class:: classref-item-separator @@ -1503,7 +1903,7 @@ Bakes the ``navigation_mesh`` with bake source geometry collected starting from .. rst-class:: classref-method -:ref:`RID<class_RID>` **region_create** **(** **)** +:ref:`RID<class_RID>` **region_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_region_create>` Creates a new region. @@ -1515,7 +1915,7 @@ Creates a new region. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_end** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| +:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_end**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connection_pathway_end>` Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`. @@ -1527,7 +1927,7 @@ Returns the ending point of a connection door. ``connection`` is an index betwee .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_start** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| +:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_start**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connection_pathway_start>` Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`. @@ -1539,7 +1939,7 @@ Returns the starting point of a connection door. ``connection`` is an index betw .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_connections_count** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_connections_count**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connections_count>` Returns how many connections this ``region`` has with other regions in the map. @@ -1547,11 +1947,23 @@ Returns how many connections this ``region`` has with other regions in the map. ---- +.. _class_NavigationServer3D_method_region_get_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **region_get_enabled**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_enabled>` + +Returns ``true`` if the specified ``region`` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_get_enter_cost: .. rst-class:: classref-method -:ref:`float<class_float>` **region_get_enter_cost** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`float<class_float>` **region_get_enter_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_enter_cost>` Returns the enter cost of this ``region``. @@ -1563,7 +1975,7 @@ Returns the enter cost of this ``region``. .. rst-class:: classref-method -:ref:`RID<class_RID>` **region_get_map** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`RID<class_RID>` **region_get_map**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_map>` Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is currently assigned to. @@ -1575,7 +1987,7 @@ Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is cur .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_navigation_layers** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_navigation_layers>` Returns the region's navigation layers. @@ -1587,7 +1999,7 @@ Returns the region's navigation layers. .. rst-class:: classref-method -:ref:`int<class_int>` **region_get_owner_id** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`int<class_int>` **region_get_owner_id**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_owner_id>` Returns the ``ObjectID`` of the object which manages this region. @@ -1595,11 +2007,39 @@ Returns the ``ObjectID`` of the object which manages this region. ---- +.. _class_NavigationServer3D_method_region_get_random_point: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **region_get_random_point**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_random_point>` + +Returns a random position picked from all region polygons with matching ``navigation_layers``. + +If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower). + +If ``uniformly`` is ``false``, just a random polygon and face is picked (faster). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_region_get_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D<class_Transform3D>` **region_get_transform**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_transform>` + +Returns the global transformation of this ``region``. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_get_travel_cost: .. rst-class:: classref-method -:ref:`float<class_float>` **region_get_travel_cost** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`float<class_float>` **region_get_travel_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_travel_cost>` Returns the travel cost of this ``region``. @@ -1611,7 +2051,7 @@ Returns the travel cost of this ``region``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **region_get_use_edge_connections** **(** :ref:`RID<class_RID>` region **)** |const| +:ref:`bool<class_bool>` **region_get_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_use_edge_connections>` Returns true if the navigation ``region`` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. @@ -1623,7 +2063,7 @@ Returns true if the navigation ``region`` is set to use edge connections to conn .. rst-class:: classref-method -:ref:`bool<class_bool>` **region_owns_point** **(** :ref:`RID<class_RID>` region, :ref:`Vector3<class_Vector3>` point **)** |const| +:ref:`bool<class_bool>` **region_owns_point**\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_owns_point>` Returns ``true`` if the provided ``point`` in world space is currently owned by the provided navigation ``region``. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. @@ -1635,11 +2075,23 @@ If multiple navigation meshes have positions at equal distance the navigation re ---- +.. _class_NavigationServer3D_method_region_set_enabled: + +.. rst-class:: classref-method + +|void| **region_set_enabled**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_enabled>` + +If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map. + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer3D_method_region_set_enter_cost: .. rst-class:: classref-method -void **region_set_enter_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** +|void| **region_set_enter_cost**\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_enter_cost>` Sets the ``enter_cost`` for this ``region``. @@ -1651,7 +2103,7 @@ Sets the ``enter_cost`` for this ``region``. .. rst-class:: classref-method -void **region_set_map** **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** +|void| **region_set_map**\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_map>` Sets the map for the region. @@ -1663,7 +2115,7 @@ Sets the map for the region. .. rst-class:: classref-method -void **region_set_navigation_layers** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** +|void| **region_set_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_navigation_layers>` Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`). @@ -1675,7 +2127,7 @@ Set the region's navigation layers. This allows selecting regions from a path re .. rst-class:: classref-method -void **region_set_navigation_mesh** **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** +|void| **region_set_navigation_mesh**\ (\ region\: :ref:`RID<class_RID>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_navigation_mesh>` Sets the navigation mesh for the region. @@ -1687,7 +2139,7 @@ Sets the navigation mesh for the region. .. rst-class:: classref-method -void **region_set_owner_id** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** +|void| **region_set_owner_id**\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_owner_id>` Set the ``ObjectID`` of the object which manages this region. @@ -1699,7 +2151,7 @@ Set the ``ObjectID`` of the object which manages this region. .. rst-class:: classref-method -void **region_set_transform** **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **region_set_transform**\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_transform>` Sets the global transformation for the region. @@ -1711,7 +2163,7 @@ Sets the global transformation for the region. .. rst-class:: classref-method -void **region_set_travel_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** +|void| **region_set_travel_cost**\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_travel_cost>` Sets the ``travel_cost`` for this ``region``. @@ -1723,9 +2175,9 @@ Sets the ``travel_cost`` for this ``region``. .. rst-class:: classref-method -void **region_set_use_edge_connections** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** +|void| **region_set_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_use_edge_connections>` -If ``enabled`` the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. .. rst-class:: classref-item-separator @@ -1735,7 +2187,7 @@ If ``enabled`` the navigation ``region`` will use edge connections to connect wi .. rst-class:: classref-method -void **set_active** **(** :ref:`bool<class_bool>` active **)** +|void| **set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_set_active>` Control activation of this server. @@ -1747,10 +2199,54 @@ Control activation of this server. .. rst-class:: classref-method -void **set_debug_enabled** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_debug_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_set_debug_enabled>` If ``true`` enables debug mode on the NavigationServer. +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_simplify_path: + +.. rst-class:: classref-method + +:ref:`PackedVector3Array<class_PackedVector3Array>` **simplify_path**\ (\ path\: :ref:`PackedVector3Array<class_PackedVector3Array>`, epsilon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_simplify_path>` + +Returns a simplified version of ``path`` with less critical path points removed. The simplification amount is in worlds units and controlled by ``epsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + +Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_source_geometry_parser_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **source_geometry_parser_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_source_geometry_parser_create>` + +Creates a new source geometry parser. If a :ref:`Callable<class_Callable>` is set for the parser with :ref:`source_geometry_parser_set_callback<class_NavigationServer3D_method_source_geometry_parser_set_callback>` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer3D_method_source_geometry_parser_set_callback: + +.. rst-class:: classref-method + +|void| **source_geometry_parser_set_callback**\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer3D_method_source_geometry_parser_set_callback>` + +Sets the ``callback`` :ref:`Callable<class_Callable>` for the specific source geometry ``parser``. The :ref:`Callable<class_Callable>` will receive a call with the following parameters: + +- ``navigation_mesh`` - The :ref:`NavigationMesh<class_NavigationMesh>` reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + +- ``source_geometry_data`` - The :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` reference. Add custom source geometry for navigation mesh baking to this object. + +- ``node`` - The :ref:`Node<class_Node>` that is parsed. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -1758,3 +2254,4 @@ If ``true`` enables debug mode on the NavigationServer. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_ninepatchrect.rst b/classes/class_ninepatchrect.rst index 14219a4a554..7b12a95868d 100644 --- a/classes/class_ninepatchrect.rst +++ b/classes/class_ninepatchrect.rst @@ -59,11 +59,11 @@ Methods .. table:: :widths: auto - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_patch_margin<class_NinePatchRect_method_get_patch_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_patch_margin<class_NinePatchRect_method_set_patch_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** | - +-----------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_patch_margin<class_NinePatchRect_method_get_patch_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_patch_margin<class_NinePatchRect_method_set_patch_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,7 +78,7 @@ Signals .. rst-class:: classref-signal -**texture_changed** **(** **)** +**texture_changed**\ (\ ) :ref:`🔗<class_NinePatchRect_signal_texture_changed>` Emitted when the node's texture changes. @@ -95,7 +95,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AxisStretchMode**: +enum **AxisStretchMode**: :ref:`🔗<enum_NinePatchRect_AxisStretchMode>` .. _class_NinePatchRect_constant_AXIS_STRETCH_MODE_STRETCH: @@ -134,12 +134,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **axis_stretch_horizontal** = ``0`` +:ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **axis_stretch_horizontal** = ``0`` :ref:`🔗<class_NinePatchRect_property_axis_stretch_horizontal>` .. rst-class:: classref-property-setget -- void **set_h_axis_stretch_mode** **(** :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` value **)** -- :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **get_h_axis_stretch_mode** **(** **)** +- |void| **set_h_axis_stretch_mode**\ (\ value\: :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>`\ ) +- :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **get_h_axis_stretch_mode**\ (\ ) The stretch mode to use for horizontal stretching/tiling. See :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` for possible values. @@ -151,12 +151,12 @@ The stretch mode to use for horizontal stretching/tiling. See :ref:`AxisStretchM .. rst-class:: classref-property -:ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **axis_stretch_vertical** = ``0`` +:ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **axis_stretch_vertical** = ``0`` :ref:`🔗<class_NinePatchRect_property_axis_stretch_vertical>` .. rst-class:: classref-property-setget -- void **set_v_axis_stretch_mode** **(** :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` value **)** -- :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **get_v_axis_stretch_mode** **(** **)** +- |void| **set_v_axis_stretch_mode**\ (\ value\: :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>`\ ) +- :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` **get_v_axis_stretch_mode**\ (\ ) The stretch mode to use for vertical stretching/tiling. See :ref:`AxisStretchMode<enum_NinePatchRect_AxisStretchMode>` for possible values. @@ -168,12 +168,12 @@ The stretch mode to use for vertical stretching/tiling. See :ref:`AxisStretchMod .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_center** = ``true`` +:ref:`bool<class_bool>` **draw_center** = ``true`` :ref:`🔗<class_NinePatchRect_property_draw_center>` .. rst-class:: classref-property-setget -- void **set_draw_center** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_draw_center_enabled** **(** **)** +- |void| **set_draw_center**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_draw_center_enabled**\ (\ ) If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. @@ -185,12 +185,12 @@ If ``true``, draw the panel's center. Else, only draw the 9-slice's borders. .. rst-class:: classref-property -:ref:`int<class_int>` **patch_margin_bottom** = ``0`` +:ref:`int<class_int>` **patch_margin_bottom** = ``0`` :ref:`🔗<class_NinePatchRect_property_patch_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. @@ -202,12 +202,12 @@ The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's botto .. rst-class:: classref-property -:ref:`int<class_int>` **patch_margin_left** = ``0`` +:ref:`int<class_int>` **patch_margin_left** = ``0`` :ref:`🔗<class_NinePatchRect_property_patch_margin_left>` .. rst-class:: classref-property-setget -- void **set_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. @@ -219,12 +219,12 @@ The width of the 9-slice's left column. A margin of 16 means the 9-slice's left .. rst-class:: classref-property -:ref:`int<class_int>` **patch_margin_right** = ``0`` +:ref:`int<class_int>` **patch_margin_right** = ``0`` :ref:`🔗<class_NinePatchRect_property_patch_margin_right>` .. rst-class:: classref-property-setget -- void **set_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. @@ -236,12 +236,12 @@ The width of the 9-slice's right column. A margin of 16 means the 9-slice's righ .. rst-class:: classref-property -:ref:`int<class_int>` **patch_margin_top** = ``0`` +:ref:`int<class_int>` **patch_margin_top** = ``0`` :ref:`🔗<class_NinePatchRect_property_patch_margin_top>` .. rst-class:: classref-property-setget -- void **set_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. @@ -253,12 +253,12 @@ The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corn .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗<class_NinePatchRect_property_region_rect>` .. rst-class:: classref-property-setget -- void **set_region_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_region_rect** **(** **)** +- |void| **set_region_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_region_rect**\ (\ ) Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. @@ -270,12 +270,12 @@ Rectangular region of the texture to sample from. If you're working with an atla .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_NinePatchRect_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The node's texture resource. @@ -292,7 +292,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`int<class_int>` **get_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_NinePatchRect_method_get_patch_margin>` Returns the size of the margin on the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -304,7 +304,7 @@ Returns the size of the margin on the specified :ref:`Side<enum_@GlobalScope_Sid .. rst-class:: classref-method -void **set_patch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** +|void| **set_patch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NinePatchRect_method_set_patch_margin>` Sets the size of the margin on the specified :ref:`Side<enum_@GlobalScope_Side>` to ``value`` pixels. @@ -315,3 +315,4 @@ Sets the size of the margin on the specified :ref:`Side<enum_@GlobalScope_Side>` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_node.rst b/classes/class_node.rst index 20ddcd3e5d7..e6c2af5e0eb 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -12,7 +12,7 @@ Node **Inherits:** :ref:`Object<class_Object>` -**Inherited By:** :ref:`AnimationPlayer<class_AnimationPlayer>`, :ref:`AnimationTree<class_AnimationTree>`, :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, :ref:`CanvasItem<class_CanvasItem>`, :ref:`CanvasLayer<class_CanvasLayer>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorPlugin<class_EditorPlugin>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`HTTPRequest<class_HTTPRequest>`, :ref:`InstancePlaceholder<class_InstancePlaceholder>`, :ref:`MissingNode<class_MissingNode>`, :ref:`MultiplayerSpawner<class_MultiplayerSpawner>`, :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`, :ref:`NavigationAgent2D<class_NavigationAgent2D>`, :ref:`NavigationAgent3D<class_NavigationAgent3D>`, :ref:`Node3D<class_Node3D>`, :ref:`ResourcePreloader<class_ResourcePreloader>`, :ref:`ShaderGlobalsOverride<class_ShaderGlobalsOverride>`, :ref:`SkeletonIK3D<class_SkeletonIK3D>`, :ref:`Timer<class_Timer>`, :ref:`Viewport<class_Viewport>`, :ref:`WorldEnvironment<class_WorldEnvironment>` +**Inherited By:** :ref:`AnimationMixer<class_AnimationMixer>`, :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, :ref:`CanvasItem<class_CanvasItem>`, :ref:`CanvasLayer<class_CanvasLayer>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorPlugin<class_EditorPlugin>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`HTTPRequest<class_HTTPRequest>`, :ref:`InstancePlaceholder<class_InstancePlaceholder>`, :ref:`MissingNode<class_MissingNode>`, :ref:`MultiplayerSpawner<class_MultiplayerSpawner>`, :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`, :ref:`NavigationAgent2D<class_NavigationAgent2D>`, :ref:`NavigationAgent3D<class_NavigationAgent3D>`, :ref:`Node3D<class_Node3D>`, :ref:`ResourcePreloader<class_ResourcePreloader>`, :ref:`ShaderGlobalsOverride<class_ShaderGlobalsOverride>`, :ref:`StatusIndicator<class_StatusIndicator>`, :ref:`Timer<class_Timer>`, :ref:`Viewport<class_Viewport>`, :ref:`WorldEnvironment<class_WorldEnvironment>` Base class for all scene objects. @@ -25,17 +25,17 @@ Nodes are Godot's building blocks. They can be assigned as the child of another A tree of nodes is called a *scene*. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. -\ **Scene tree:** The :ref:`SceneTree<class_SceneTree>` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification and its :ref:`_enter_tree<class_Node_method__enter_tree>` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree<class_Node_method__enter_tree>` callback of a parent node will be triggered before its child's. +\ **Scene tree:** The :ref:`SceneTree<class_SceneTree>` contains the active tree of nodes. When a node is added to the scene tree, it receives the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification and its :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback is triggered. Child nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback of a parent node will be triggered before its child's. -Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification and their respective :ref:`_ready<class_Node_method__ready>` callbacks are triggered. For groups of nodes, the :ref:`_ready<class_Node_method__ready>` callback is called in reverse order, starting with the children and moving up to the parent nodes. +Once all nodes have been added in the scene tree, they receive the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification and their respective :ref:`_ready<class_Node_private_method__ready>` callbacks are triggered. For groups of nodes, the :ref:`_ready<class_Node_private_method__ready>` callback is called in reverse order, starting with the children and moving up to the parent nodes. -This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree<class_Node_method__enter_tree>` of the parent, :ref:`_enter_tree<class_Node_method__enter_tree>` of the children, :ref:`_ready<class_Node_method__ready>` of the children and finally :ref:`_ready<class_Node_method__ready>` of the parent (recursively for the entire scene tree). +This means that when adding a node to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree<class_Node_private_method__enter_tree>` of the parent, :ref:`_enter_tree<class_Node_private_method__enter_tree>` of the children, :ref:`_ready<class_Node_private_method__ready>` of the children and finally :ref:`_ready<class_Node_private_method__ready>` of the parent (recursively for the entire scene tree). -\ **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process<class_Node_method__process>`, toggled with :ref:`set_process<class_Node_method_set_process>`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* (in seconds) is passed as an argument. Physics processing (callback :ref:`_physics_process<class_Node_method__physics_process>`, toggled with :ref:`set_physics_process<class_Node_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. +\ **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process<class_Node_private_method__process>`, toggled with :ref:`set_process<class_Node_method_set_process>`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* (in seconds) is passed as an argument. Physics processing (callback :ref:`_physics_process<class_Node_private_method__physics_process>`, toggled with :ref:`set_physics_process<class_Node_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 :ref:`_input<class_Node_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 :ref:`_unhandled_input<class_Node_method__unhandled_input>` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control<class_Control>` nodes), ensuring that the node only receives the events that were meant for it. +Nodes can also process input events. When present, the :ref:`_input<class_Node_private_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 :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control<class_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 the :ref:`owner<class_Node_property_owner>` property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. +To keep track of the scene hierarchy (especially when instantiating scenes into other scenes), an "owner" can be set for the node with the :ref:`owner<class_Node_property_owner>` property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with :ref:`Object.free<class_Object_method_free>` or :ref:`queue_free<class_Node_method_queue_free>`, it will also free all its children. @@ -43,7 +43,7 @@ Finally, when a node is freed with :ref:`Object.free<class_Object_method_free>` \ **Networking with nodes:** After connecting to a server (or making one, see :ref:`ENetMultiplayerPeer<class_ENetMultiplayerPeer>`), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling :ref:`rpc<class_Node_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 :ref:`NodePath<class_NodePath>` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. -\ **Note:** The ``script`` property is part of the :ref:`Object<class_Object>` class, not **Node**. It isn't exposed like most properties but does have a setter and getter (``set_script()`` and ``get_script()``). +\ **Note:** The ``script`` property is part of the :ref:`Object<class_Object>` class, not **Node**. It isn't exposed like most properties but does have a setter and getter (see :ref:`Object.set_script<class_Object_method_set_script>` and :ref:`Object.get_script<class_Object_method_get_script>`). .. rst-class:: classref-introduction-group @@ -62,6 +62,8 @@ Properties .. table:: :widths: auto + +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` | :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` | ``0`` | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`String<class_String>` | :ref:`editor_description<class_Node_property_editor_description>` | ``""`` | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ @@ -71,6 +73,8 @@ Properties +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`Node<class_Node>` | :ref:`owner<class_Node_property_owner>` | | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>` | ``0`` | + +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`ProcessMode<enum_Node_ProcessMode>` | :ref:`process_mode<class_Node_property_process_mode>` | ``0`` | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`int<class_int>` | :ref:`process_physics_priority<class_Node_property_process_physics_priority>` | ``0`` | @@ -81,7 +85,7 @@ Properties +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`int<class_int>` | :ref:`process_thread_group_order<class_Node_property_process_thread_group_order>` | | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> | :ref:`process_thread_messages<class_Node_property_process_thread_messages>` | | + | |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] | :ref:`process_thread_messages<class_Node_property_process_thread_messages>` | | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ | :ref:`String<class_String>` | :ref:`scene_file_path<class_Node_property_scene_file_path>` | | +-----------------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ @@ -96,187 +100,203 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enter_tree<class_Node_method__enter_tree>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_exit_tree<class_Node_method__exit_tree>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_configuration_warnings<class_Node_method__get_configuration_warnings>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input<class_Node_method__input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_physics_process<class_Node_method__physics_process>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process<class_Node_method__process>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_ready<class_Node_method__ready>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shortcut_input<class_Node_method__shortcut_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unhandled_input<class_Node_method__unhandled_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_child<class_Node_method_add_child>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` force_readable_name=false, :ref:`InternalMode<enum_Node_InternalMode>` internal=0 **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_sibling<class_Node_method_add_sibling>` **(** :ref:`Node<class_Node>` sibling, :ref:`bool<class_bool>` force_readable_name=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_to_group<class_Node_method_add_to_group>` **(** :ref:`StringName<class_StringName>` group, :ref:`bool<class_bool>` persistent=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`call_thread_safe<class_Node_method_call_thread_safe>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_process<class_Node_method_can_process>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_Node_method_create_tween>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`duplicate<class_Node_method_duplicate>` **(** :ref:`int<class_int>` flags=15 **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`find_child<class_Node_method_find_child>` **(** :ref:`String<class_String>` pattern, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node[]<class_Node>` | :ref:`find_children<class_Node_method_find_children>` **(** :ref:`String<class_String>` pattern, :ref:`String<class_String>` type="", :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`find_parent<class_Node_method_find_parent>` **(** :ref:`String<class_String>` pattern **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_child<class_Node_method_get_child>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` include_internal=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_child_count<class_Node_method_get_child_count>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node[]<class_Node>` | :ref:`get_children<class_Node_method_get_children>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`get_groups<class_Node_method_get_groups>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_index<class_Node_method_get_index>` **(** :ref:`bool<class_bool>` include_internal=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Window<class_Window>` | :ref:`get_last_exclusive_window<class_Node_method_get_last_exclusive_window>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_multiplayer_authority<class_Node_method_get_multiplayer_authority>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_node<class_Node_method_get_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_node_or_null<class_Node_method_get_node_or_null>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_parent<class_Node_method_get_parent>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_path<class_Node_method_get_path>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_path_to<class_Node_method_get_path_to>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` use_unique_path=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_process_delta_time<class_Node_method_get_process_delta_time>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SceneTree<class_SceneTree>` | :ref:`get_tree<class_Node_method_get_tree>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Viewport<class_Viewport>` | :ref:`get_viewport<class_Node_method_get_viewport>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Window<class_Window>` | :ref:`get_window<class_Node_method_get_window>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_node<class_Node_method_has_node>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_node_and_resource<class_Node_method_has_node_and_resource>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>` **(** :ref:`Node<class_Node>` node **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_editable_instance<class_Node_method_is_editable_instance>` **(** :ref:`Node<class_Node>` node **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_greater_than<class_Node_method_is_greater_than>` **(** :ref:`Node<class_Node>` node **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_in_group<class_Node_method_is_in_group>` **(** :ref:`StringName<class_StringName>` group **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_inside_tree<class_Node_method_is_inside_tree>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_multiplayer_authority<class_Node_method_is_multiplayer_authority>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_node_ready<class_Node_method_is_node_ready>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_physics_processing<class_Node_method_is_physics_processing>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing<class_Node_method_is_processing>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing_input<class_Node_method_is_processing_input>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing_internal<class_Node_method_is_processing_internal>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing_shortcut_input<class_Node_method_is_processing_shortcut_input>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_input<class_Node_method_is_processing_unhandled_input>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_key_input<class_Node_method_is_processing_unhandled_key_input>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_child<class_Node_method_move_child>` **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_index **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_deferred_thread_group<class_Node_method_notify_deferred_thread_group>` **(** :ref:`int<class_int>` what **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_thread_safe<class_Node_method_notify_thread_safe>` **(** :ref:`int<class_int>` what **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` **(** **)** |static| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_tree<class_Node_method_print_tree>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`propagate_call<class_Node_method_propagate_call>` **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args=[], :ref:`bool<class_bool>` parent_first=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`propagate_notification<class_Node_method_propagate_notification>` **(** :ref:`int<class_int>` what **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_free<class_Node_method_queue_free>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_child<class_Node_method_remove_child>` **(** :ref:`Node<class_Node>` node **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_from_group<class_Node_method_remove_from_group>` **(** :ref:`StringName<class_StringName>` group **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reparent<class_Node_method_reparent>` **(** :ref:`Node<class_Node>` new_parent, :ref:`bool<class_bool>` keep_global_transform=true **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`replace_by<class_Node_method_replace_by>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_groups=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_ready<class_Node_method_request_ready>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_Node_method_rpc>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rpc_config<class_Node_method_rpc_config>` **(** :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` config **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc_id<class_Node_method_rpc_id>` **(** :ref:`int<class_int>` peer_id, :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_deferred_thread_group<class_Node_method_set_deferred_thread_group>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_display_folded<class_Node_method_set_display_folded>` **(** :ref:`bool<class_bool>` fold **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_editable_instance<class_Node_method_set_editable_instance>` **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` is_editable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physics_process<class_Node_method_set_physics_process>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process<class_Node_method_set_process>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process_input<class_Node_method_set_process_input>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process_internal<class_Node_method_set_process_internal>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>` **(** :ref:`bool<class_bool>` load_placeholder **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_thread_safe<class_Node_method_set_thread_safe>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_enter_tree<class_Node_private_method__enter_tree>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_exit_tree<class_Node_private_method__exit_tree>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_input<class_Node_private_method__input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_physics_process<class_Node_private_method__physics_process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process<class_Node_private_method__process>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_ready<class_Node_private_method__ready>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shortcut_input<class_Node_private_method__shortcut_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_child<class_Node_method_add_child>`\ (\ node\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false, internal\: :ref:`InternalMode<enum_Node_InternalMode>` = 0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_sibling<class_Node_method_add_sibling>`\ (\ sibling\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_to_group<class_Node_method_add_to_group>`\ (\ group\: :ref:`StringName<class_StringName>`, persistent\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`atr<class_Node_method_atr>`\ (\ message\: :ref:`String<class_String>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`atr_n<class_Node_method_atr_n>`\ (\ message\: :ref:`String<class_String>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`call_thread_safe<class_Node_method_call_thread_safe>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_process<class_Node_method_can_process>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_Node_method_create_tween>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`duplicate<class_Node_method_duplicate>`\ (\ flags\: :ref:`int<class_int>` = 15\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`find_child<class_Node_method_find_child>`\ (\ pattern\: :ref:`String<class_String>`, recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`find_children<class_Node_method_find_children>`\ (\ pattern\: :ref:`String<class_String>`, type\: :ref:`String<class_String>` = "", recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`find_parent<class_Node_method_find_parent>`\ (\ pattern\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_child<class_Node_method_get_child>`\ (\ idx\: :ref:`int<class_int>`, include_internal\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_child_count<class_Node_method_get_child_count>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_children<class_Node_method_get_children>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_groups<class_Node_method_get_groups>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_index<class_Node_method_get_index>`\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Window<class_Window>` | :ref:`get_last_exclusive_window<class_Node_method_get_last_exclusive_window>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_multiplayer_authority<class_Node_method_get_multiplayer_authority>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_node<class_Node_method_get_node>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_node_or_null<class_Node_method_get_node_or_null>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_parent<class_Node_method_get_parent>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_path<class_Node_method_get_path>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_path_to<class_Node_method_get_path_to>`\ (\ node\: :ref:`Node<class_Node>`, use_unique_path\: :ref:`bool<class_bool>` = false\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_process_delta_time<class_Node_method_get_process_delta_time>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneTree<class_SceneTree>` | :ref:`get_tree<class_Node_method_get_tree>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tree_string<class_Node_method_get_tree_string>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tree_string_pretty<class_Node_method_get_tree_string_pretty>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Viewport<class_Viewport>` | :ref:`get_viewport<class_Node_method_get_viewport>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Window<class_Window>` | :ref:`get_window<class_Node_method_get_window>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_node<class_Node_method_has_node>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_node_and_resource<class_Node_method_has_node_and_resource>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_editable_instance<class_Node_method_is_editable_instance>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_greater_than<class_Node_method_is_greater_than>`\ (\ node\: :ref:`Node<class_Node>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_in_group<class_Node_method_is_in_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_inside_tree<class_Node_method_is_inside_tree>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_multiplayer_authority<class_Node_method_is_multiplayer_authority>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_node_ready<class_Node_method_is_node_ready>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_part_of_edited_scene<class_Node_method_is_part_of_edited_scene>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_physics_interpolated<class_Node_method_is_physics_interpolated>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_physics_interpolated_and_enabled<class_Node_method_is_physics_interpolated_and_enabled>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_physics_processing<class_Node_method_is_physics_processing>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing<class_Node_method_is_processing>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing_input<class_Node_method_is_processing_input>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing_internal<class_Node_method_is_processing_internal>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing_shortcut_input<class_Node_method_is_processing_shortcut_input>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_input<class_Node_method_is_processing_unhandled_input>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_processing_unhandled_key_input<class_Node_method_is_processing_unhandled_key_input>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_child<class_Node_method_move_child>`\ (\ child_node\: :ref:`Node<class_Node>`, to_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_deferred_thread_group<class_Node_method_notify_deferred_thread_group>`\ (\ what\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_thread_safe<class_Node_method_notify_thread_safe>`\ (\ what\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>`\ (\ ) |static| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_tree<class_Node_method_print_tree>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`propagate_call<class_Node_method_propagate_call>`\ (\ method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>` = [], parent_first\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`propagate_notification<class_Node_method_propagate_notification>`\ (\ what\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_free<class_Node_method_queue_free>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_child<class_Node_method_remove_child>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_from_group<class_Node_method_remove_from_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reparent<class_Node_method_reparent>`\ (\ new_parent\: :ref:`Node<class_Node>`, keep_global_transform\: :ref:`bool<class_bool>` = true\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`replace_by<class_Node_method_replace_by>`\ (\ node\: :ref:`Node<class_Node>`, keep_groups\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_ready<class_Node_method_request_ready>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc<class_Node_method_rpc>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rpc_config<class_Node_method_rpc_config>`\ (\ method\: :ref:`StringName<class_StringName>`, config\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`rpc_id<class_Node_method_rpc_id>`\ (\ peer_id\: :ref:`int<class_int>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_deferred_thread_group<class_Node_method_set_deferred_thread_group>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_display_folded<class_Node_method_set_display_folded>`\ (\ fold\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_editable_instance<class_Node_method_set_editable_instance>`\ (\ node\: :ref:`Node<class_Node>`, is_editable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>`\ (\ id\: :ref:`int<class_int>`, recursive\: :ref:`bool<class_bool>` = true\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physics_process<class_Node_method_set_physics_process>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process<class_Node_method_set_process>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_input<class_Node_method_set_process_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_internal<class_Node_method_set_process_internal>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>`\ (\ load_placeholder\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_thread_safe<class_Node_method_set_thread_safe>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_configuration_warnings<class_Node_method_update_configuration_warnings>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -291,9 +311,9 @@ Signals .. rst-class:: classref-signal -**child_entered_tree** **(** :ref:`Node<class_Node>` node **)** +**child_entered_tree**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Node_signal_child_entered_tree>` -Emitted when a child node enters the scene tree, either because it entered on its own or because this node entered with it. +Emitted when the child ``node`` enters the :ref:`SceneTree<class_SceneTree>`, usually because this node entered the tree (see :ref:`tree_entered<class_Node_signal_tree_entered>`), or :ref:`add_child<class_Node_method_add_child>` has been called. This signal is emitted *after* the child node's own :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` and :ref:`tree_entered<class_Node_signal_tree_entered>`. @@ -305,11 +325,11 @@ This signal is emitted *after* the child node's own :ref:`NOTIFICATION_ENTER_TRE .. rst-class:: classref-signal -**child_exiting_tree** **(** :ref:`Node<class_Node>` node **)** +**child_exiting_tree**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Node_signal_child_exiting_tree>` -Emitted when a child node is about to exit the scene tree, either because it is being removed or freed directly, or because this node is exiting the tree. +Emitted when the child ``node`` is about to exit the :ref:`SceneTree<class_SceneTree>`, usually because this node is exiting the tree (see :ref:`tree_exiting<class_Node_signal_tree_exiting>`), or because the child ``node`` is being removed or freed. -When this signal is received, the child ``node`` is still in the tree and valid. This signal is emitted *after* the child node's own :ref:`tree_exiting<class_Node_signal_tree_exiting>` and :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>`. +When this signal is received, the child ``node`` is still accessible inside the tree. This signal is emitted *after* the child node's own :ref:`tree_exiting<class_Node_signal_tree_exiting>` and :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>`. .. rst-class:: classref-item-separator @@ -319,7 +339,7 @@ When this signal is received, the child ``node`` is still in the tree and valid. .. rst-class:: classref-signal -**child_order_changed** **(** **)** +**child_order_changed**\ (\ ) :ref:`🔗<class_Node_signal_child_order_changed>` Emitted when the list of children is changed. This happens when child nodes are added, moved or removed. @@ -327,13 +347,25 @@ Emitted when the list of children is changed. This happens when child nodes are ---- +.. _class_Node_signal_editor_description_changed: + +.. rst-class:: classref-signal + +**editor_description_changed**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Node_signal_editor_description_changed>` + +Emitted when the node's editor description field changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_signal_ready: .. rst-class:: classref-signal -**ready** **(** **)** +**ready**\ (\ ) :ref:`🔗<class_Node_signal_ready>` -Emitted when the node is ready. Comes after :ref:`_ready<class_Node_method__ready>` callback and follows the same rules. +Emitted when the node is considered ready, after :ref:`_ready<class_Node_private_method__ready>` is called. .. rst-class:: classref-item-separator @@ -343,9 +375,9 @@ Emitted when the node is ready. Comes after :ref:`_ready<class_Node_method__read .. rst-class:: classref-signal -**renamed** **(** **)** +**renamed**\ (\ ) :ref:`🔗<class_Node_signal_renamed>` -Emitted when the node is renamed. +Emitted when the node's :ref:`name<class_Node_property_name>` is changed, if the node is inside the tree. .. rst-class:: classref-item-separator @@ -355,7 +387,7 @@ Emitted when the node is renamed. .. rst-class:: classref-signal -**replacing_by** **(** :ref:`Node<class_Node>` node **)** +**replacing_by**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Node_signal_replacing_by>` Emitted when this node is being replaced by the ``node``, see :ref:`replace_by<class_Node_method_replace_by>`. @@ -369,7 +401,7 @@ This signal is emitted *after* ``node`` has been added as a child of the origina .. rst-class:: classref-signal -**tree_entered** **(** **)** +**tree_entered**\ (\ ) :ref:`🔗<class_Node_signal_tree_entered>` Emitted when the node enters the tree. @@ -383,10 +415,12 @@ This signal is emitted *after* the related :ref:`NOTIFICATION_ENTER_TREE<class_N .. rst-class:: classref-signal -**tree_exited** **(** **)** +**tree_exited**\ (\ ) :ref:`🔗<class_Node_signal_tree_exited>` Emitted after the node exits the tree and is no longer active. +This signal is emitted *after* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification. + .. rst-class:: classref-item-separator ---- @@ -395,11 +429,11 @@ Emitted after the node exits the tree and is no longer active. .. rst-class:: classref-signal -**tree_exiting** **(** **)** +**tree_exiting**\ (\ ) :ref:`🔗<class_Node_signal_tree_exiting>` -Emitted when the node is still active but about to exit the tree. This is the right place for de-initialization (or a "destructor", if you will). +Emitted when the node is just about to exit the tree. The node is still valid. As such, this is the right place for de-initialization (or a "destructor", if you will). -This signal is emitted *before* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification. +This signal is emitted *after* the node's :ref:`_exit_tree<class_Node_private_method__exit_tree>`, and *before* the related :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>`. .. rst-class:: classref-section-separator @@ -414,7 +448,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ProcessMode**: +enum **ProcessMode**: :ref:`🔗<enum_Node_ProcessMode>` .. _class_Node_constant_PROCESS_MODE_INHERIT: @@ -422,7 +456,7 @@ enum **ProcessMode**: :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_INHERIT** = ``0`` -Inherits process mode from the node's parent. For the root node, it is equivalent to :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`. Default. +Inherits :ref:`process_mode<class_Node_property_process_mode>` from the node's parent. This is the default for any newly created node. .. _class_Node_constant_PROCESS_MODE_PAUSABLE: @@ -430,7 +464,7 @@ Inherits process mode from the node's parent. For the root node, it is equivalen :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_PAUSABLE** = ``1`` -Stops processing when the :ref:`SceneTree<class_SceneTree>` is paused (process when unpaused). This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`. +Stops processing when :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``. This is the inverse of :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`, and the default for the root node. .. _class_Node_constant_PROCESS_MODE_WHEN_PAUSED: @@ -438,7 +472,7 @@ Stops processing when the :ref:`SceneTree<class_SceneTree>` is paused (process w :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_WHEN_PAUSED** = ``2`` -Only process when the :ref:`SceneTree<class_SceneTree>` is paused (don't process when unpaused). This is the inverse of :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`. +Process **only** when :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``. This is the inverse of :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`. .. _class_Node_constant_PROCESS_MODE_ALWAYS: @@ -446,7 +480,7 @@ Only process when the :ref:`SceneTree<class_SceneTree>` is paused (don't process :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_ALWAYS** = ``3`` -Always process. Continue processing always, ignoring the :ref:`SceneTree<class_SceneTree>`'s paused property. This is the inverse of :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. +Always process. Keeps processing, ignoring :ref:`SceneTree.paused<class_SceneTree_property_paused>`. This is the inverse of :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. .. _class_Node_constant_PROCESS_MODE_DISABLED: @@ -454,7 +488,7 @@ Always process. Continue processing always, ignoring the :ref:`SceneTree<class_S :ref:`ProcessMode<enum_Node_ProcessMode>` **PROCESS_MODE_DISABLED** = ``4`` -Never process. Completely disables processing, ignoring the :ref:`SceneTree<class_SceneTree>`'s paused property. This is the inverse of :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`. +Never process. Completely disables processing, ignoring :ref:`SceneTree.paused<class_SceneTree_property_paused>`. This is the inverse of :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`. .. rst-class:: classref-item-separator @@ -464,7 +498,7 @@ Never process. Completely disables processing, ignoring the :ref:`SceneTree<clas .. rst-class:: classref-enumeration -enum **ProcessThreadGroup**: +enum **ProcessThreadGroup**: :ref:`🔗<enum_Node_ProcessThreadGroup>` .. _class_Node_constant_PROCESS_THREAD_GROUP_INHERIT: @@ -472,7 +506,7 @@ enum **ProcessThreadGroup**: :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_INHERIT** = ``0`` -If the :ref:`process_thread_group<class_Node_property_process_thread_group>` property is sent to this, the node will belong to any parent (or grandparent) node that has a thread group mode that is not inherit. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. +Process this node based on the thread group mode of the first parent (or grandparent) node that has a thread group mode that is not inherit. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. .. _class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD: @@ -480,7 +514,7 @@ If the :ref:`process_thread_group<class_Node_property_process_thread_group>` pro :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_MAIN_THREAD** = ``1`` -Process this node (and children nodes set to inherit) on the main thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. +Process this node (and child nodes set to inherit) on the main thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. .. _class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD: @@ -488,7 +522,7 @@ Process this node (and children nodes set to inherit) on the main thread. See :r :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **PROCESS_THREAD_GROUP_SUB_THREAD** = ``2`` -Process this node (and children nodes set to inherit) on a sub-thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. +Process this node (and child nodes set to inherit) on a sub-thread. See :ref:`process_thread_group<class_Node_property_process_thread_group>` for more information. .. rst-class:: classref-item-separator @@ -498,7 +532,7 @@ Process this node (and children nodes set to inherit) on a sub-thread. See :ref: .. rst-class:: classref-enumeration -flags **ProcessThreadMessages**: +flags **ProcessThreadMessages**: :ref:`🔗<enum_Node_ProcessThreadMessages>` .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES: @@ -506,7 +540,7 @@ flags **ProcessThreadMessages**: :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES** = ``1`` - +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before :ref:`_process<class_Node_private_method__process>` is called. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_PHYSICS: @@ -514,7 +548,7 @@ flags **ProcessThreadMessages**: :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_PHYSICS** = ``2`` - +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before :ref:`_physics_process<class_Node_private_method__physics_process>` is called. .. _class_Node_constant_FLAG_PROCESS_THREAD_MESSAGES_ALL: @@ -522,7 +556,41 @@ flags **ProcessThreadMessages**: :ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>` **FLAG_PROCESS_THREAD_MESSAGES_ALL** = ``3`` +Allows this node to process threaded messages created with :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` right before either :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` are called. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Node_PhysicsInterpolationMode: + +.. rst-class:: classref-enumeration + +enum **PhysicsInterpolationMode**: :ref:`🔗<enum_Node_PhysicsInterpolationMode>` + +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_INHERIT** = ``0`` + +Inherits :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>` from the node's parent. This is the default for any newly created node. + +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_ON: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_ON** = ``1`` + +Enables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT<class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT>`. This is the default for the root node. +.. _class_Node_constant_PHYSICS_INTERPOLATION_MODE_OFF: + +.. rst-class:: classref-enumeration-constant + +:ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **PHYSICS_INTERPOLATION_MODE_OFF** = ``2`` + +Disables physics interpolation for this node and for children set to :ref:`PHYSICS_INTERPOLATION_MODE_INHERIT<class_Node_constant_PHYSICS_INTERPOLATION_MODE_INHERIT>`. .. rst-class:: classref-item-separator @@ -532,7 +600,7 @@ flags **ProcessThreadMessages**: .. rst-class:: classref-enumeration -enum **DuplicateFlags**: +enum **DuplicateFlags**: :ref:`🔗<enum_Node_DuplicateFlags>` .. _class_Node_constant_DUPLICATE_SIGNALS: @@ -540,7 +608,7 @@ enum **DuplicateFlags**: :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SIGNALS** = ``1`` -Duplicate the node's signals. +Duplicate the node's signal connections. .. _class_Node_constant_DUPLICATE_GROUPS: @@ -556,7 +624,7 @@ Duplicate the node's groups. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_SCRIPTS** = ``4`` -Duplicate the node's scripts. +Duplicate the node's script (also overriding the duplicated children's scripts, if combined with :ref:`DUPLICATE_USE_INSTANTIATION<class_Node_constant_DUPLICATE_USE_INSTANTIATION>`). .. _class_Node_constant_DUPLICATE_USE_INSTANTIATION: @@ -564,9 +632,7 @@ Duplicate the node's scripts. :ref:`DuplicateFlags<enum_Node_DuplicateFlags>` **DUPLICATE_USE_INSTANTIATION** = ``8`` -Duplicate using instancing. - -An instance stays linked to the original so when the original changes, the instance changes too. +Duplicate using :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>`. If the node comes from a scene saved on disk, re-uses :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` as the base for the duplicated node and its children. .. rst-class:: classref-item-separator @@ -576,7 +642,7 @@ An instance stays linked to the original so when the original changes, the insta .. rst-class:: classref-enumeration -enum **InternalMode**: +enum **InternalMode**: :ref:`🔗<enum_Node_InternalMode>` .. _class_Node_constant_INTERNAL_MODE_DISABLED: @@ -584,7 +650,7 @@ enum **InternalMode**: :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_DISABLED** = ``0`` -Node will not be internal. +The node will not be internal. .. _class_Node_constant_INTERNAL_MODE_FRONT: @@ -592,7 +658,7 @@ Node will not be internal. :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_FRONT** = ``1`` -Node will be placed at the front of parent's node list, before any non-internal sibling. +The node will be placed at the beginning of the parent's children, before any non-internal sibling. .. _class_Node_constant_INTERNAL_MODE_BACK: @@ -600,7 +666,43 @@ Node will be placed at the front of parent's node list, before any non-internal :ref:`InternalMode<enum_Node_InternalMode>` **INTERNAL_MODE_BACK** = ``2`` -Node will be placed at the back of parent's node list, after any non-internal sibling. +The node will be placed at the end of the parent's children, after any non-internal sibling. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Node_AutoTranslateMode: + +.. rst-class:: classref-enumeration + +enum **AutoTranslateMode**: :ref:`🔗<enum_Node_AutoTranslateMode>` + +.. _class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_INHERIT** = ``0`` + +Inherits :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` from the node's parent. This is the default for any newly created node. + +.. _class_Node_constant_AUTO_TRANSLATE_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_ALWAYS** = ``1`` + +Always automatically translate. This is the inverse of :ref:`AUTO_TRANSLATE_MODE_DISABLED<class_Node_constant_AUTO_TRANSLATE_MODE_DISABLED>`, and the default for the root node. + +.. _class_Node_constant_AUTO_TRANSLATE_MODE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **AUTO_TRANSLATE_MODE_DISABLED** = ``2`` + +Never automatically translate. This is the inverse of :ref:`AUTO_TRANSLATE_MODE_ALWAYS<class_Node_constant_AUTO_TRANSLATE_MODE_ALWAYS>`. + +String parsing for POT generation will be skipped for this node and children that are set to :ref:`AUTO_TRANSLATE_MODE_INHERIT<class_Node_constant_AUTO_TRANSLATE_MODE_INHERIT>`. .. rst-class:: classref-section-separator @@ -615,105 +717,109 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_ENTER_TREE** = ``10`` +**NOTIFICATION_ENTER_TREE** = ``10`` :ref:`🔗<class_Node_constant_NOTIFICATION_ENTER_TREE>` -Notification received when the node enters a :ref:`SceneTree<class_SceneTree>`. +Notification received when the node enters a :ref:`SceneTree<class_SceneTree>`. See :ref:`_enter_tree<class_Node_private_method__enter_tree>`. -This notification is emitted *before* the related :ref:`tree_entered<class_Node_signal_tree_entered>`. +This notification is received *before* the related :ref:`tree_entered<class_Node_signal_tree_entered>` signal. .. _class_Node_constant_NOTIFICATION_EXIT_TREE: .. rst-class:: classref-constant -**NOTIFICATION_EXIT_TREE** = ``11`` +**NOTIFICATION_EXIT_TREE** = ``11`` :ref:`🔗<class_Node_constant_NOTIFICATION_EXIT_TREE>` -Notification received when the node is about to exit a :ref:`SceneTree<class_SceneTree>`. +Notification received when the node is about to exit a :ref:`SceneTree<class_SceneTree>`. See :ref:`_exit_tree<class_Node_private_method__exit_tree>`. -This notification is emitted *after* the related :ref:`tree_exiting<class_Node_signal_tree_exiting>`. +This notification is received *after* the related :ref:`tree_exiting<class_Node_signal_tree_exiting>` signal. .. _class_Node_constant_NOTIFICATION_MOVED_IN_PARENT: .. rst-class:: classref-constant -**NOTIFICATION_MOVED_IN_PARENT** = ``12`` +**NOTIFICATION_MOVED_IN_PARENT** = ``12`` :ref:`🔗<class_Node_constant_NOTIFICATION_MOVED_IN_PARENT>` + +**Deprecated:** This notification is no longer sent by the engine. Use :ref:`NOTIFICATION_CHILD_ORDER_CHANGED<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>` instead. + -*Deprecated.* This notification is no longer emitted. Use :ref:`NOTIFICATION_CHILD_ORDER_CHANGED<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>` instead. .. _class_Node_constant_NOTIFICATION_READY: .. rst-class:: classref-constant -**NOTIFICATION_READY** = ``13`` +**NOTIFICATION_READY** = ``13`` :ref:`🔗<class_Node_constant_NOTIFICATION_READY>` -Notification received when the node is ready. See :ref:`_ready<class_Node_method__ready>`. +Notification received when the node is ready. See :ref:`_ready<class_Node_private_method__ready>`. .. _class_Node_constant_NOTIFICATION_PAUSED: .. rst-class:: classref-constant -**NOTIFICATION_PAUSED** = ``14`` +**NOTIFICATION_PAUSED** = ``14`` :ref:`🔗<class_Node_constant_NOTIFICATION_PAUSED>` -Notification received when the node is paused. +Notification received when the node is paused. See :ref:`process_mode<class_Node_property_process_mode>`. .. _class_Node_constant_NOTIFICATION_UNPAUSED: .. rst-class:: classref-constant -**NOTIFICATION_UNPAUSED** = ``15`` +**NOTIFICATION_UNPAUSED** = ``15`` :ref:`🔗<class_Node_constant_NOTIFICATION_UNPAUSED>` -Notification received when the node is unpaused. +Notification received when the node is unpaused. See :ref:`process_mode<class_Node_property_process_mode>`. .. _class_Node_constant_NOTIFICATION_PHYSICS_PROCESS: .. rst-class:: classref-constant -**NOTIFICATION_PHYSICS_PROCESS** = ``16`` +**NOTIFICATION_PHYSICS_PROCESS** = ``16`` :ref:`🔗<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` -Notification received every frame when the physics process flag is set (see :ref:`set_physics_process<class_Node_method_set_physics_process>`). +Notification received from the tree every physics frame when :ref:`is_physics_processing<class_Node_method_is_physics_processing>` returns ``true``. See :ref:`_physics_process<class_Node_private_method__physics_process>`. .. _class_Node_constant_NOTIFICATION_PROCESS: .. rst-class:: classref-constant -**NOTIFICATION_PROCESS** = ``17`` +**NOTIFICATION_PROCESS** = ``17`` :ref:`🔗<class_Node_constant_NOTIFICATION_PROCESS>` -Notification received every frame when the process flag is set (see :ref:`set_process<class_Node_method_set_process>`). +Notification received from the tree every rendered frame when :ref:`is_processing<class_Node_method_is_processing>` returns ``true``. See :ref:`_process<class_Node_private_method__process>`. .. _class_Node_constant_NOTIFICATION_PARENTED: .. rst-class:: classref-constant -**NOTIFICATION_PARENTED** = ``18`` +**NOTIFICATION_PARENTED** = ``18`` :ref:`🔗<class_Node_constant_NOTIFICATION_PARENTED>` -Notification received when a node is set as a child of another node. +Notification received when the node is set as a child of another node (see :ref:`add_child<class_Node_method_add_child>` and :ref:`add_sibling<class_Node_method_add_sibling>`). -\ **Note:** This doesn't mean that a node entered the :ref:`SceneTree<class_SceneTree>`. +\ **Note:** This does *not* mean that the node entered the :ref:`SceneTree<class_SceneTree>`. .. _class_Node_constant_NOTIFICATION_UNPARENTED: .. rst-class:: classref-constant -**NOTIFICATION_UNPARENTED** = ``19`` +**NOTIFICATION_UNPARENTED** = ``19`` :ref:`🔗<class_Node_constant_NOTIFICATION_UNPARENTED>` + +Notification received when the parent node calls :ref:`remove_child<class_Node_method_remove_child>` on this node. -Notification received when a node is unparented (parent removed it from the list of children). +\ **Note:** This does *not* mean that the node exited the :ref:`SceneTree<class_SceneTree>`. .. _class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED: .. rst-class:: classref-constant -**NOTIFICATION_SCENE_INSTANTIATED** = ``20`` +**NOTIFICATION_SCENE_INSTANTIATED** = ``20`` :ref:`🔗<class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED>` -Notification received by scene owner when its scene is instantiated. +Notification received *only* by the newly instantiated scene root node, when :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` is completed. .. _class_Node_constant_NOTIFICATION_DRAG_BEGIN: .. rst-class:: classref-constant -**NOTIFICATION_DRAG_BEGIN** = ``21`` +**NOTIFICATION_DRAG_BEGIN** = ``21`` :ref:`🔗<class_Node_constant_NOTIFICATION_DRAG_BEGIN>` Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. -Can be triggered either by dragging a :ref:`Control<class_Control>` that provides drag data (see :ref:`Control._get_drag_data<class_Control_method__get_drag_data>`) or using :ref:`Control.force_drag<class_Control_method_force_drag>`. +Can be triggered either by dragging a :ref:`Control<class_Control>` that provides drag data (see :ref:`Control._get_drag_data<class_Control_private_method__get_drag_data>`) or using :ref:`Control.force_drag<class_Control_method_force_drag>`. Use :ref:`Viewport.gui_get_drag_data<class_Viewport_method_gui_get_drag_data>` to get the dragged data. @@ -721,7 +827,7 @@ Use :ref:`Viewport.gui_get_drag_data<class_Viewport_method_gui_get_drag_data>` t .. rst-class:: classref-constant -**NOTIFICATION_DRAG_END** = ``22`` +**NOTIFICATION_DRAG_END** = ``22`` :ref:`🔗<class_Node_constant_NOTIFICATION_DRAG_END>` Notification received when a drag operation ends. @@ -731,15 +837,15 @@ Use :ref:`Viewport.gui_is_drag_successful<class_Viewport_method_gui_is_drag_succ .. rst-class:: classref-constant -**NOTIFICATION_PATH_RENAMED** = ``23`` +**NOTIFICATION_PATH_RENAMED** = ``23`` :ref:`🔗<class_Node_constant_NOTIFICATION_PATH_RENAMED>` -Notification received when the node's name or one of its parents' name is changed. This notification is *not* received when the node is removed from the scene tree to be added to another parent later on. +Notification received when the node's :ref:`name<class_Node_property_name>` or one of its ancestors' :ref:`name<class_Node_property_name>` is changed. This notification is *not* received when the node is removed from the :ref:`SceneTree<class_SceneTree>`. .. _class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_CHILD_ORDER_CHANGED** = ``24`` +**NOTIFICATION_CHILD_ORDER_CHANGED** = ``24`` :ref:`🔗<class_Node_constant_NOTIFICATION_CHILD_ORDER_CHANGED>` Notification received when the list of children is changed. This happens when child nodes are added, moved or removed. @@ -747,31 +853,31 @@ Notification received when the list of children is changed. This happens when ch .. rst-class:: classref-constant -**NOTIFICATION_INTERNAL_PROCESS** = ``25`` +**NOTIFICATION_INTERNAL_PROCESS** = ``25`` :ref:`🔗<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>` -Notification received every frame when the internal process flag is set (see :ref:`set_process_internal<class_Node_method_set_process_internal>`). +Notification received from the tree every rendered frame when :ref:`is_processing_internal<class_Node_method_is_processing_internal>` returns ``true``. .. _class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS: .. rst-class:: classref-constant -**NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26`` +**NOTIFICATION_INTERNAL_PHYSICS_PROCESS** = ``26`` :ref:`🔗<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>` -Notification received every frame when the internal physics process flag is set (see :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`). +Notification received from the tree every physics frame when :ref:`is_physics_processing_internal<class_Node_method_is_physics_processing_internal>` returns ``true``. .. _class_Node_constant_NOTIFICATION_POST_ENTER_TREE: .. rst-class:: classref-constant -**NOTIFICATION_POST_ENTER_TREE** = ``27`` +**NOTIFICATION_POST_ENTER_TREE** = ``27`` :ref:`🔗<class_Node_constant_NOTIFICATION_POST_ENTER_TREE>` -Notification received when the node is ready, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` is received. Unlike the latter, it's sent every time the node enters tree, instead of only once. +Notification received when the node enters the tree, just before :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` may be received. Unlike the latter, it is sent every time the node enters tree, not just once. .. _class_Node_constant_NOTIFICATION_DISABLED: .. rst-class:: classref-constant -**NOTIFICATION_DISABLED** = ``28`` +**NOTIFICATION_DISABLED** = ``28`` :ref:`🔗<class_Node_constant_NOTIFICATION_DISABLED>` Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. @@ -779,23 +885,23 @@ Notification received when the node is disabled. See :ref:`PROCESS_MODE_DISABLED .. rst-class:: classref-constant -**NOTIFICATION_ENABLED** = ``29`` +**NOTIFICATION_ENABLED** = ``29`` :ref:`🔗<class_Node_constant_NOTIFICATION_ENABLED>` Notification received when the node is enabled again after being disabled. See :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. -.. _class_Node_constant_NOTIFICATION_NODE_RECACHE_REQUESTED: +.. _class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION: .. rst-class:: classref-constant -**NOTIFICATION_NODE_RECACHE_REQUESTED** = ``30`` +**NOTIFICATION_RESET_PHYSICS_INTERPOLATION** = ``2001`` :ref:`🔗<class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION>` -Notification received when other nodes in the tree may have been removed/replaced and node pointers may require re-caching. +Notification received when :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>` is called on the node or its ancestors. .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: .. rst-class:: classref-constant -**NOTIFICATION_EDITOR_PRE_SAVE** = ``9001`` +**NOTIFICATION_EDITOR_PRE_SAVE** = ``9001`` :ref:`🔗<class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE>` Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. @@ -803,7 +909,7 @@ Notification received right before the scene with the node is saved in the edito .. rst-class:: classref-constant -**NOTIFICATION_EDITOR_POST_SAVE** = ``9002`` +**NOTIFICATION_EDITOR_POST_SAVE** = ``9002`` :ref:`🔗<class_Node_constant_NOTIFICATION_EDITOR_POST_SAVE>` Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. @@ -811,29 +917,29 @@ Notification received right after the scene with the node is saved in the editor .. rst-class:: classref-constant -**NOTIFICATION_WM_MOUSE_ENTER** = ``1002`` +**NOTIFICATION_WM_MOUSE_ENTER** = ``1002`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_MOUSE_ENTER>` -Notification received from the OS when the mouse enters the game window. +Notification received when the mouse enters the window. -Implemented on desktop and web platforms. +Implemented for embedded windows and on desktop and web platforms. .. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT: .. rst-class:: classref-constant -**NOTIFICATION_WM_MOUSE_EXIT** = ``1003`` +**NOTIFICATION_WM_MOUSE_EXIT** = ``1003`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT>` -Notification received from the OS when the mouse leaves the game window. +Notification received when the mouse leaves the window. -Implemented on desktop and web platforms. +Implemented for embedded windows and on desktop and web platforms. .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN: .. rst-class:: classref-constant -**NOTIFICATION_WM_WINDOW_FOCUS_IN** = ``1004`` +**NOTIFICATION_WM_WINDOW_FOCUS_IN** = ``1004`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN>` -Notification received when the node's parent :ref:`Window<class_Window>` is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_IN<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN>` is also emitted). +Notification received from the OS when the node's :ref:`Window<class_Window>` ancestor is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_IN<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN>` is also received). A :ref:`Window<class_Window>` node receives this notification when it is focused. @@ -841,9 +947,9 @@ A :ref:`Window<class_Window>` node receives this notification when it is focused .. rst-class:: classref-constant -**NOTIFICATION_WM_WINDOW_FOCUS_OUT** = ``1005`` +**NOTIFICATION_WM_WINDOW_FOCUS_OUT** = ``1005`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_OUT>` -Notification received when the node's parent :ref:`Window<class_Window>` is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_OUT<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>` is also emitted). +Notification received from the OS when the node's :ref:`Window<class_Window>` ancestor is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case :ref:`NOTIFICATION_APPLICATION_FOCUS_OUT<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>` is also received). A :ref:`Window<class_Window>` node receives this notification when it is defocused. @@ -851,7 +957,7 @@ A :ref:`Window<class_Window>` node receives this notification when it is defocus .. rst-class:: classref-constant -**NOTIFICATION_WM_CLOSE_REQUEST** = ``1006`` +**NOTIFICATION_WM_CLOSE_REQUEST** = ``1006`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST>` Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or :kbd:`Alt + F4`). @@ -861,139 +967,153 @@ Implemented on desktop platforms. .. rst-class:: classref-constant -**NOTIFICATION_WM_GO_BACK_REQUEST** = ``1007`` +**NOTIFICATION_WM_GO_BACK_REQUEST** = ``1007`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST>` Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). -Specific to the Android platform. +Implemented only on iOS. .. _class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_WM_SIZE_CHANGED** = ``1008`` +**NOTIFICATION_WM_SIZE_CHANGED** = ``1008`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_SIZE_CHANGED>` -Notification received from the OS when the window is resized. +Notification received when the window is resized. + +\ **Note:** Only the resized :ref:`Window<class_Window>` node receives this notification, and it's not propagated to the child nodes. .. _class_Node_constant_NOTIFICATION_WM_DPI_CHANGE: .. rst-class:: classref-constant -**NOTIFICATION_WM_DPI_CHANGE** = ``1009`` +**NOTIFICATION_WM_DPI_CHANGE** = ``1009`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_DPI_CHANGE>` -Notification received from the OS when the screen's DPI has been changed. Only implemented on macOS. +Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS. .. _class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER: .. rst-class:: classref-constant -**NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` +**NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` :ref:`🔗<class_Node_constant_NOTIFICATION_VP_MOUSE_ENTER>` -Notification received when the mouse enters the viewport. +Notification received when the mouse cursor enters the :ref:`Viewport<class_Viewport>`'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or :ref:`Window<class_Window>`\ s, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not. .. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT: .. rst-class:: classref-constant -**NOTIFICATION_VP_MOUSE_EXIT** = ``1011`` +**NOTIFICATION_VP_MOUSE_EXIT** = ``1011`` :ref:`🔗<class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT>` -Notification received when the mouse leaves the viewport. +Notification received when the mouse cursor leaves the :ref:`Viewport<class_Viewport>`'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or :ref:`Window<class_Window>`\ s, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not. .. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING: .. rst-class:: classref-constant -**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` +**NOTIFICATION_OS_MEMORY_WARNING** = ``2009`` :ref:`🔗<class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING>` Notification received from the OS when the application is exceeding its allocated memory. -Specific to the iOS platform. +Implemented only on iOS. .. _class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` +**NOTIFICATION_TRANSLATION_CHANGED** = ``2010`` :ref:`🔗<class_Node_constant_NOTIFICATION_TRANSLATION_CHANGED>` + +Notification received when translations may have changed. Can be triggered by the user changing the locale, changing :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` or when the node enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr<class_Object_method_tr>`. + +\ **Note:** This notification is received alongside :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`is_node_ready<class_Node_method_is_node_ready>`. + +:: -Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like :ref:`Object.tr<class_Object_method_tr>`. + func _notification(what): + if what == NOTIFICATION_TRANSLATION_CHANGED: + if not is_node_ready(): + await ready # Wait until ready signal. + $Label.text = atr("%d Bananas") % banana_counter .. _class_Node_constant_NOTIFICATION_WM_ABOUT: .. rst-class:: classref-constant -**NOTIFICATION_WM_ABOUT** = ``2011`` +**NOTIFICATION_WM_ABOUT** = ``2011`` :ref:`🔗<class_Node_constant_NOTIFICATION_WM_ABOUT>` Notification received from the OS when a request for "About" information is sent. -Specific to the macOS platform. +Implemented only on macOS. .. _class_Node_constant_NOTIFICATION_CRASH: .. rst-class:: classref-constant -**NOTIFICATION_CRASH** = ``2012`` +**NOTIFICATION_CRASH** = ``2012`` :ref:`🔗<class_Node_constant_NOTIFICATION_CRASH>` Notification received from Godot's crash handler when the engine is about to crash. -Implemented on desktop platforms if the crash handler is enabled. +Implemented on desktop platforms, if the crash handler is enabled. .. _class_Node_constant_NOTIFICATION_OS_IME_UPDATE: .. rst-class:: classref-constant -**NOTIFICATION_OS_IME_UPDATE** = ``2013`` +**NOTIFICATION_OS_IME_UPDATE** = ``2013`` :ref:`🔗<class_Node_constant_NOTIFICATION_OS_IME_UPDATE>` Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). -Specific to the macOS platform. +Implemented only on macOS. .. _class_Node_constant_NOTIFICATION_APPLICATION_RESUMED: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` +**NOTIFICATION_APPLICATION_RESUMED** = ``2014`` :ref:`🔗<class_Node_constant_NOTIFICATION_APPLICATION_RESUMED>` Notification received from the OS when the application is resumed. -Specific to the Android platform. +Specific to the Android and iOS platforms. .. _class_Node_constant_NOTIFICATION_APPLICATION_PAUSED: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` +**NOTIFICATION_APPLICATION_PAUSED** = ``2015`` :ref:`🔗<class_Node_constant_NOTIFICATION_APPLICATION_PAUSED>` Notification received from the OS when the application is paused. -Specific to the Android platform. +Specific to the Android and iOS platforms. + +\ **Note:** On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` +**NOTIFICATION_APPLICATION_FOCUS_IN** = ``2016`` :ref:`🔗<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_IN>` Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. -Implemented on desktop platforms. +Implemented on desktop and mobile platforms. .. _class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT: .. rst-class:: classref-constant -**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` +**NOTIFICATION_APPLICATION_FOCUS_OUT** = ``2017`` :ref:`🔗<class_Node_constant_NOTIFICATION_APPLICATION_FOCUS_OUT>` Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. -Implemented on desktop platforms. +Implemented on desktop and mobile platforms. .. _class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` +**NOTIFICATION_TEXT_SERVER_CHANGED** = ``2018`` :ref:`🔗<class_Node_constant_NOTIFICATION_TEXT_SERVER_CHANGED>` -Notification received when text server is changed. +Notification received when the :ref:`TextServer<class_TextServer>` is changed. .. rst-class:: classref-section-separator @@ -1004,18 +1124,37 @@ Notification received when text server is changed. Property Descriptions --------------------- +.. _class_Node_property_auto_translate_mode: + +.. rst-class:: classref-property + +:ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **auto_translate_mode** = ``0`` :ref:`🔗<class_Node_property_auto_translate_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_auto_translate_mode**\ (\ value\: :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>`\ ) +- :ref:`AutoTranslateMode<enum_Node_AutoTranslateMode>` **get_auto_translate_mode**\ (\ ) + +Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as :ref:`Label<class_Label>`, :ref:`RichTextLabel<class_RichTextLabel>`, :ref:`Window<class_Window>`, etc.). Also decides if the node's strings should be parsed for POT generation. + +\ **Note:** For the root node, auto translate mode can also be set via :ref:`ProjectSettings.internationalization/rendering/root_node_auto_translate<class_ProjectSettings_property_internationalization/rendering/root_node_auto_translate>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_property_editor_description: .. rst-class:: classref-property -:ref:`String<class_String>` **editor_description** = ``""`` +:ref:`String<class_String>` **editor_description** = ``""`` :ref:`🔗<class_Node_property_editor_description>` .. rst-class:: classref-property-setget -- void **set_editor_description** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_editor_description** **(** **)** +- |void| **set_editor_description**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_editor_description**\ (\ ) -Add a custom description to a node. It will be displayed in a tooltip when hovered in editor's scene tree. +An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock. .. rst-class:: classref-item-separator @@ -1025,14 +1164,16 @@ Add a custom description to a node. It will be displayed in a tooltip when hover .. rst-class:: classref-property -:ref:`MultiplayerAPI<class_MultiplayerAPI>` **multiplayer** +:ref:`MultiplayerAPI<class_MultiplayerAPI>` **multiplayer** :ref:`🔗<class_Node_property_multiplayer>` .. rst-class:: classref-property-setget -- :ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer** **(** **)** +- :ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer**\ (\ ) The :ref:`MultiplayerAPI<class_MultiplayerAPI>` instance associated with this node. See :ref:`SceneTree.get_multiplayer<class_SceneTree_method_get_multiplayer>`. +\ **Note:** Renaming the node, or moving it in the tree, will not move the :ref:`MultiplayerAPI<class_MultiplayerAPI>` to the new path, you will have to update this manually. + .. rst-class:: classref-item-separator ---- @@ -1041,16 +1182,16 @@ The :ref:`MultiplayerAPI<class_MultiplayerAPI>` instance associated with this no .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **name** +:ref:`StringName<class_StringName>` **name** :ref:`🔗<class_Node_property_name>` .. rst-class:: classref-property-setget -- void **set_name** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_name** **(** **)** +- |void| **set_name**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_name**\ (\ ) -The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. +The name of the node. This name must be unique among the siblings (other child nodes from the same parent). When set to an existing sibling's name, the node is automatically renamed. -\ **Note:** Auto-generated names might include the ``@`` character, which is reserved for unique names when using :ref:`add_child<class_Node_method_add_child>`. When setting the name manually, any ``@`` will be removed. +\ **Note:** When changing the name, the following characters will be replaced with an underscore: (``.`` ``:`` ``@`` ``/`` ``"`` ``%``). In particular, the ``@`` character is reserved for auto-generated names. See also :ref:`String.validate_node_name<class_String_method_validate_node_name>`. .. rst-class:: classref-item-separator @@ -1060,16 +1201,35 @@ The name of the node. This name is unique among the siblings (other child nodes .. rst-class:: classref-property -:ref:`Node<class_Node>` **owner** +:ref:`Node<class_Node>` **owner** :ref:`🔗<class_Node_property_owner>` + +.. rst-class:: classref-property-setget + +- |void| **set_owner**\ (\ value\: :ref:`Node<class_Node>`\ ) +- :ref:`Node<class_Node>` **get_owner**\ (\ ) + +The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a :ref:`PackedScene<class_PackedScene>`, all the nodes it owns are also saved with it. + +\ **Note:** In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling :ref:`add_child<class_Node_method_add_child>`. See also (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`) + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_property_physics_interpolation_mode: + +.. rst-class:: classref-property + +:ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **physics_interpolation_mode** = ``0`` :ref:`🔗<class_Node_property_physics_interpolation_mode>` .. rst-class:: classref-property-setget -- void **set_owner** **(** :ref:`Node<class_Node>` value **)** -- :ref:`Node<class_Node>` **get_owner** **(** **)** +- |void| **set_physics_interpolation_mode**\ (\ value\: :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>`\ ) +- :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` **get_physics_interpolation_mode**\ (\ ) -The node owner. A node can have any ancestor node as owner (i.e. a parent, grandparent, etc. node ascending in the tree). This implies that :ref:`add_child<class_Node_method_add_child>` should be called before setting the owner, so that this relationship of parenting exists. When saving a node (using :ref:`PackedScene<class_PackedScene>`), all the nodes it owns will be saved with it. This allows for the creation of complex scene trees, with instancing and subinstancing. +Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally. See :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>` and :ref:`SceneTree.physics_interpolation<class_SceneTree_property_physics_interpolation>` for the global setting. -\ **Note:** If you want a child to be persisted to a :ref:`PackedScene<class_PackedScene>`, you must set :ref:`owner<class_Node_property_owner>` in addition to calling :ref:`add_child<class_Node_method_add_child>`. This is typically relevant for :doc:`tool scripts <../tutorials/plugins/running_code_in_the_editor>` and :doc:`editor plugins <../tutorials/plugins/editor/index>`. If a new node is added to the tree without setting its owner as an ancestor in that tree, it will be visible in the 2D/3D view, but not in the scene tree (and not persisted when packing or saving). +\ **Note:** When teleporting a node to a distant position you should temporarily disable interpolation with :ref:`reset_physics_interpolation<class_Node_method_reset_physics_interpolation>`. .. rst-class:: classref-item-separator @@ -1079,14 +1239,14 @@ The node owner. A node can have any ancestor node as owner (i.e. a parent, grand .. rst-class:: classref-property -:ref:`ProcessMode<enum_Node_ProcessMode>` **process_mode** = ``0`` +:ref:`ProcessMode<enum_Node_ProcessMode>` **process_mode** = ``0`` :ref:`🔗<class_Node_property_process_mode>` .. rst-class:: classref-property-setget -- void **set_process_mode** **(** :ref:`ProcessMode<enum_Node_ProcessMode>` value **)** -- :ref:`ProcessMode<enum_Node_ProcessMode>` **get_process_mode** **(** **)** +- |void| **set_process_mode**\ (\ value\: :ref:`ProcessMode<enum_Node_ProcessMode>`\ ) +- :ref:`ProcessMode<enum_Node_ProcessMode>` **get_process_mode**\ (\ ) -Can be used to pause or unpause the node, or make the node paused based on the :ref:`SceneTree<class_SceneTree>`, or make it inherit the process mode from its parent (default). +The node's processing behavior (see :ref:`ProcessMode<enum_Node_ProcessMode>`). To check if the node can process in its current mode, use :ref:`can_process<class_Node_method_can_process>`. .. rst-class:: classref-item-separator @@ -1096,14 +1256,14 @@ Can be used to pause or unpause the node, or make the node paused based on the : .. rst-class:: classref-property -:ref:`int<class_int>` **process_physics_priority** = ``0`` +:ref:`int<class_int>` **process_physics_priority** = ``0`` :ref:`🔗<class_Node_property_process_physics_priority>` .. rst-class:: classref-property-setget -- void **set_physics_process_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_physics_process_priority** **(** **)** +- |void| **set_physics_process_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_physics_process_priority**\ (\ ) -Similar to :ref:`process_priority<class_Node_property_process_priority>` but for :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_physics_process<class_Node_method__physics_process>` or the internal version. +Similar to :ref:`process_priority<class_Node_property_process_priority>` but for :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_physics_process<class_Node_private_method__physics_process>` or the internal version. .. rst-class:: classref-item-separator @@ -1113,14 +1273,14 @@ Similar to :ref:`process_priority<class_Node_property_process_priority>` but for .. rst-class:: classref-property -:ref:`int<class_int>` **process_priority** = ``0`` +:ref:`int<class_int>` **process_priority** = ``0`` :ref:`🔗<class_Node_property_process_priority>` .. rst-class:: classref-property-setget -- void **set_process_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_process_priority** **(** **)** +- |void| **set_process_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_process_priority**\ (\ ) -The node's priority in the execution order of the enabled processing callbacks (i.e. :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` and their internal counterparts). Nodes whose process priority value is *lower* will have their processing callbacks executed first. +The node's execution order of the process callbacks (:ref:`_process<class_Node_private_method__process>`, :ref:`_physics_process<class_Node_private_method__physics_process>`, and internal processing). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. .. rst-class:: classref-item-separator @@ -1130,20 +1290,20 @@ The node's priority in the execution order of the enabled processing callbacks ( .. rst-class:: classref-property -:ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **process_thread_group** = ``0`` +:ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **process_thread_group** = ``0`` :ref:`🔗<class_Node_property_process_thread_group>` .. rst-class:: classref-property-setget -- void **set_process_thread_group** **(** :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` value **)** -- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **get_process_thread_group** **(** **)** +- |void| **set_process_thread_group**\ (\ value\: :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>`\ ) +- :ref:`ProcessThreadGroup<enum_Node_ProcessThreadGroup>` **get_process_thread_group**\ (\ ) -Set the process thread group for this node (basically, whether it receives :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_process<class_Node_method__process>` or :ref:`_physics_process<class_Node_method__physics_process>` (and the internal versions) on the main thread or in a sub-thread. +Set the process thread group for this node (basically, whether it receives :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` (and the internal versions) on the main thread or in a sub-thread. By default, the thread group is :ref:`PROCESS_THREAD_GROUP_INHERIT<class_Node_constant_PROCESS_THREAD_GROUP_INHERIT>`, which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on :ref:`process_thread_group_order<class_Node_property_process_thread_group_order>`). If the value is set is :ref:`PROCESS_THREAD_GROUP_SUB_THREAD<class_Node_constant_PROCESS_THREAD_GROUP_SUB_THREAD>`, this thread group will occur on a sub thread (not the main thread), otherwise if set to :ref:`PROCESS_THREAD_GROUP_MAIN_THREAD<class_Node_constant_PROCESS_THREAD_GROUP_MAIN_THREAD>` it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the *default thread group*. This default group will process on the main thread and its group order is 0. During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use :ref:`Object.call_deferred<class_Object_method_call_deferred>`, :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` and the likes in order to communicate from the thread groups to the main thread (or to other thread groups). -To better understand process thread groups, the idea is that any node set to any other value than :ref:`PROCESS_THREAD_GROUP_INHERIT<class_Node_constant_PROCESS_THREAD_GROUP_INHERIT>` will include any children (and grandchildren) nodes set to inherit into its process thread group. this means that the processing of all the nodes in the group will happen together, at the same time as the node including them. +To better understand process thread groups, the idea is that any node set to any other value than :ref:`PROCESS_THREAD_GROUP_INHERIT<class_Node_constant_PROCESS_THREAD_GROUP_INHERIT>` will include any child (and grandchild) nodes set to inherit into its process thread group. This means that the processing of all the nodes in the group will happen together, at the same time as the node including them. .. rst-class:: classref-item-separator @@ -1153,12 +1313,12 @@ To better understand process thread groups, the idea is that any node set to any .. rst-class:: classref-property -:ref:`int<class_int>` **process_thread_group_order** +:ref:`int<class_int>` **process_thread_group_order** :ref:`🔗<class_Node_property_process_thread_group_order>` .. rst-class:: classref-property-setget -- void **set_process_thread_group_order** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_process_thread_group_order** **(** **)** +- |void| **set_process_thread_group_order**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_process_thread_group_order**\ (\ ) Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example. @@ -1170,14 +1330,14 @@ Change the process thread group order. Groups with a lesser order will process b .. rst-class:: classref-property -|bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> **process_thread_messages** +|bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] **process_thread_messages** :ref:`🔗<class_Node_property_process_thread_messages>` .. rst-class:: classref-property-setget -- void **set_process_thread_messages** **(** |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> value **)** -- |bitfield|\<:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\> **get_process_thread_messages** **(** **)** +- |void| **set_process_thread_messages**\ (\ value\: |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\]\ ) +- |bitfield|\[:ref:`ProcessThreadMessages<enum_Node_ProcessThreadMessages>`\] **get_process_thread_messages**\ (\ ) -Set whether the current thread group will process messages (calls to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` on threads, and whether it wants to receive them during regular process or physics process callbacks. +Set whether the current thread group will process messages (calls to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>` on threads), and whether it wants to receive them during regular process or physics process callbacks. .. rst-class:: classref-item-separator @@ -1187,14 +1347,14 @@ Set whether the current thread group will process messages (calls to :ref:`call_ .. rst-class:: classref-property -:ref:`String<class_String>` **scene_file_path** +:ref:`String<class_String>` **scene_file_path** :ref:`🔗<class_Node_property_scene_file_path>` .. rst-class:: classref-property-setget -- void **set_scene_file_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_scene_file_path** **(** **)** +- |void| **set_scene_file_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_scene_file_path**\ (\ ) -If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in :ref:`scene_file_path<class_Node_property_scene_file_path>` (e.g. ``res://levels/1.tscn``). Otherwise, :ref:`scene_file_path<class_Node_property_scene_file_path>` is set to an empty string. +The original scene's file path, if the node has been instantiated from a :ref:`PackedScene<class_PackedScene>` file. Only scene root nodes contains this. .. rst-class:: classref-item-separator @@ -1204,16 +1364,16 @@ If a scene is instantiated from a file, its topmost node contains the absolute f .. rst-class:: classref-property -:ref:`bool<class_bool>` **unique_name_in_owner** = ``false`` +:ref:`bool<class_bool>` **unique_name_in_owner** = ``false`` :ref:`🔗<class_Node_property_unique_name_in_owner>` .. rst-class:: classref-property-setget -- void **set_unique_name_in_owner** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_unique_name_in_owner** **(** **)** +- |void| **set_unique_name_in_owner**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_unique_name_in_owner**\ (\ ) -Sets this node's name as a unique name in its :ref:`owner<class_Node_property_owner>`. This allows the node to be accessed as ``%Name`` instead of the full path, from any node within that scene. +If ``true``, the node can be accessed from any node sharing the same :ref:`owner<class_Node_property_owner>` or from the :ref:`owner<class_Node_property_owner>` itself, with special ``%Name`` syntax in :ref:`get_node<class_Node_method_get_node>`. -If another node with the same owner already had that name declared as unique, that other node's name will no longer be set as having a unique name. +\ **Note:** If another node with the same :ref:`owner<class_Node_property_owner>` shares the same :ref:`name<class_Node_property_name>` as this node, the other node will no longer be accessible as unique. .. rst-class:: classref-section-separator @@ -1224,39 +1384,39 @@ If another node with the same owner already had that name declared as unique, th Method Descriptions ------------------- -.. _class_Node_method__enter_tree: +.. _class_Node_private_method__enter_tree: .. rst-class:: classref-method -void **_enter_tree** **(** **)** |virtual| +|void| **_enter_tree**\ (\ ) |virtual| :ref:`🔗<class_Node_private_method__enter_tree>` -Called when the node enters the :ref:`SceneTree<class_SceneTree>` (e.g. upon instancing, scene changing, or after calling :ref:`add_child<class_Node_method_add_child>` in a script). If the node has children, its :ref:`_enter_tree<class_Node_method__enter_tree>` callback will be called first, and then that of the children. +Called when the node enters the :ref:`SceneTree<class_SceneTree>` (e.g. upon instantiating, scene changing, or after calling :ref:`add_child<class_Node_method_add_child>` in a script). If the node has children, its :ref:`_enter_tree<class_Node_private_method__enter_tree>` callback will be called first, and then that of the children. -Corresponds to the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification in :ref:`Object._notification<class_Object_method__notification>`. +Corresponds to the :ref:`NOTIFICATION_ENTER_TREE<class_Node_constant_NOTIFICATION_ENTER_TREE>` notification in :ref:`Object._notification<class_Object_private_method__notification>`. .. rst-class:: classref-item-separator ---- -.. _class_Node_method__exit_tree: +.. _class_Node_private_method__exit_tree: .. rst-class:: classref-method -void **_exit_tree** **(** **)** |virtual| +|void| **_exit_tree**\ (\ ) |virtual| :ref:`🔗<class_Node_private_method__exit_tree>` -Called when the node is about to leave the :ref:`SceneTree<class_SceneTree>` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child<class_Node_method_remove_child>` in a script). If the node has children, its :ref:`_exit_tree<class_Node_method__exit_tree>` callback will be called last, after all its children have left the tree. +Called when the node is about to leave the :ref:`SceneTree<class_SceneTree>` (e.g. upon freeing, scene changing, or after calling :ref:`remove_child<class_Node_method_remove_child>` in a script). If the node has children, its :ref:`_exit_tree<class_Node_private_method__exit_tree>` callback will be called last, after all its children have left the tree. -Corresponds to the :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification in :ref:`Object._notification<class_Object_method__notification>` and signal :ref:`tree_exiting<class_Node_signal_tree_exiting>`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited<class_Node_signal_tree_exited>`. +Corresponds to the :ref:`NOTIFICATION_EXIT_TREE<class_Node_constant_NOTIFICATION_EXIT_TREE>` notification in :ref:`Object._notification<class_Object_private_method__notification>` and signal :ref:`tree_exiting<class_Node_signal_tree_exiting>`. To get notified when the node has already left the active tree, connect to the :ref:`tree_exited<class_Node_signal_tree_exited>`. .. rst-class:: classref-item-separator ---- -.. _class_Node_method__get_configuration_warnings: +.. _class_Node_private_method__get_configuration_warnings: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_configuration_warnings** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_configuration_warnings**\ (\ ) |virtual| |const| :ref:`🔗<class_Node_private_method__get_configuration_warnings>` The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a ``tool`` script. @@ -1281,11 +1441,11 @@ Call :ref:`update_configuration_warnings<class_Node_method_update_configuration_ ---- -.. _class_Node_method__input: +.. _class_Node_private_method__input: .. rst-class:: classref-method -void **_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +|void| **_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_Node_private_method__input>` Called when there is an input event. The input event propagates up through the node tree until a node consumes it. @@ -1293,7 +1453,7 @@ It is only called if input processing is enabled, which is done automatically if To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called. -For gameplay input, :ref:`_unhandled_input<class_Node_method__unhandled_input>` and :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` are usually a better fit as they allow the GUI to intercept the events first. +For gameplay input, :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` and :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` are usually a better fit as they allow the GUI to intercept the events first. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1301,17 +1461,17 @@ For gameplay input, :ref:`_unhandled_input<class_Node_method__unhandled_input>` ---- -.. _class_Node_method__physics_process: +.. _class_Node_private_method__physics_process: .. rst-class:: classref-method -void **_physics_process** **(** :ref:`float<class_float>` delta **)** |virtual| +|void| **_physics_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_Node_private_method__physics_process>` Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the ``delta`` variable should be constant. ``delta`` is in seconds. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_physics_process<class_Node_method_set_physics_process>`. -Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` notification in :ref:`Object._notification<class_Object_method__notification>`. +Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1319,17 +1479,17 @@ Corresponds to the :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFI ---- -.. _class_Node_method__process: +.. _class_Node_private_method__process: .. rst-class:: classref-method -void **_process** **(** :ref:`float<class_float>` delta **)** |virtual| +|void| **_process**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_Node_private_method__process>` Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the ``delta`` time since the previous frame is not constant. ``delta`` is in seconds. It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process<class_Node_method_set_process>`. -Corresponds to the :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` notification in :ref:`Object._notification<class_Object_method__notification>`. +Corresponds to the :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` notification in :ref:`Object._notification<class_Object_private_method__notification>`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1337,37 +1497,37 @@ Corresponds to the :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_P ---- -.. _class_Node_method__ready: +.. _class_Node_private_method__ready: .. rst-class:: classref-method -void **_ready** **(** **)** |virtual| +|void| **_ready**\ (\ ) |virtual| :ref:`🔗<class_Node_private_method__ready>` -Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready<class_Node_method__ready>` callbacks get triggered first, and the parent node will receive the ready notification afterwards. +Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready<class_Node_private_method__ready>` callbacks get triggered first, and the parent node will receive the ready notification afterwards. -Corresponds to the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification in :ref:`Object._notification<class_Object_method__notification>`. See also the ``@onready`` annotation for variables. +Corresponds to the :ref:`NOTIFICATION_READY<class_Node_constant_NOTIFICATION_READY>` notification in :ref:`Object._notification<class_Object_private_method__notification>`. See also the ``@onready`` annotation for variables. -Usually used for initialization. For even earlier initialization, :ref:`Object._init<class_Object_method__init>` may be used. See also :ref:`_enter_tree<class_Node_method__enter_tree>`. +Usually used for initialization. For even earlier initialization, :ref:`Object._init<class_Object_private_method__init>` may be used. See also :ref:`_enter_tree<class_Node_private_method__enter_tree>`. -\ **Note:** :ref:`_ready<class_Node_method__ready>` may be called only once for each node. After removing a node from the scene tree and adding it again, ``_ready`` will not be called a second time. This can be bypassed by requesting another call with :ref:`request_ready<class_Node_method_request_ready>`, which may be called anywhere before adding the node again. +\ **Note:** This method may be called only once for each node. After removing a node from the scene tree and adding it again, :ref:`_ready<class_Node_private_method__ready>` will **not** be called a second time. This can be bypassed by requesting another call with :ref:`request_ready<class_Node_method_request_ready>`, which may be called anywhere before adding the node again. .. rst-class:: classref-item-separator ---- -.. _class_Node_method__shortcut_input: +.. _class_Node_private_method__shortcut_input: .. rst-class:: classref-method -void **_shortcut_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +|void| **_shortcut_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_Node_private_method__shortcut_input>` -Called when an :ref:`InputEventKey<class_InputEventKey>` or :ref:`InputEventShortcut<class_InputEventShortcut>` hasn't been consumed by :ref:`_input<class_Node_method__input>` or any GUI :ref:`Control<class_Control>` item. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEventKey<class_InputEventKey>`, :ref:`InputEventShortcut<class_InputEventShortcut>`, or :ref:`InputEventJoypadButton<class_InputEventJoypadButton>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called before :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` and :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`. The input event propagates up through the node tree until a node consumes it. It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`. To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called. -This method can be used to handle shortcuts. +This method can be used to handle shortcuts. For generic GUI events, use :ref:`_input<class_Node_private_method__input>` instead. Gameplay events should usually be handled with either :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` or :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). @@ -1375,19 +1535,19 @@ This method can be used to handle shortcuts. ---- -.. _class_Node_method__unhandled_input: +.. _class_Node_private_method__unhandled_input: .. rst-class:: classref-method -void **_unhandled_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +|void| **_unhandled_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_Node_private_method__unhandled_input>` -Called when an :ref:`InputEvent<class_InputEvent>` hasn't been consumed by :ref:`_input<class_Node_method__input>` or any GUI :ref:`Control<class_Control>` item. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEvent<class_InputEvent>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called after :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` and after :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>`. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`. To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled<class_Viewport_method_set_input_as_handled>` can be called. -For gameplay input, this and :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` are usually a better fit than :ref:`_input<class_Node_method__input>` as they allow the GUI to intercept the events first. +For gameplay input, this method is usually a better fit than :ref:`_input<class_Node_private_method__input>`, as GUI events need a higher priority. For keyboard shortcuts, consider using :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` instead, as it is called before this method. Finally, to handle keyboard events, consider using :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` for performance reasons. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1395,13 +1555,13 @@ For gameplay input, this and :ref:`_unhandled_key_input<class_Node_method__unhan ---- -.. _class_Node_method__unhandled_key_input: +.. _class_Node_private_method__unhandled_key_input: .. rst-class:: classref-method -void **_unhandled_key_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| +|void| **_unhandled_key_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_Node_private_method__unhandled_key_input>` -Called when an :ref:`InputEventKey<class_InputEventKey>` hasn't been consumed by :ref:`_input<class_Node_method__input>` or any GUI :ref:`Control<class_Control>` item. The input event propagates up through the node tree until a node consumes it. +Called when an :ref:`InputEventKey<class_InputEventKey>` hasn't been consumed by :ref:`_input<class_Node_private_method__input>` or any GUI :ref:`Control<class_Control>` item. It is called after :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` but before :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`. @@ -1409,9 +1569,7 @@ To consume the input event and stop it propagating further to other nodes, :ref: This method can be used to handle Unicode character input with :kbd:`Alt`, :kbd:`Alt + Ctrl`, and :kbd:`Alt + Shift` modifiers, after shortcuts were handled. -For gameplay input, this and :ref:`_unhandled_input<class_Node_method__unhandled_input>` are usually a better fit than :ref:`_input<class_Node_method__input>` as they allow the GUI to intercept the events first. - -This method also performs better than :ref:`_unhandled_input<class_Node_method__unhandled_input>`, since unrelated events such as :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` are automatically filtered. +For gameplay input, this and :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` are usually a better fit than :ref:`_input<class_Node_private_method__input>`, as GUI events should be handled first. This method also performs better than :ref:`_unhandled_input<class_Node_private_method__unhandled_input>`, since unrelated events such as :ref:`InputEventMouseMotion<class_InputEventMouseMotion>` are automatically filtered. For shortcuts, consider using :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` instead. \ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). @@ -1423,15 +1581,15 @@ This method also performs better than :ref:`_unhandled_input<class_Node_method__ .. rst-class:: classref-method -void **add_child** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` force_readable_name=false, :ref:`InternalMode<enum_Node_InternalMode>` internal=0 **)** +|void| **add_child**\ (\ node\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false, internal\: :ref:`InternalMode<enum_Node_InternalMode>` = 0\ ) :ref:`🔗<class_Node_method_add_child>` Adds a child ``node``. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. If ``force_readable_name`` is ``true``, improves the readability of the added ``node``. If not named, the ``node`` is renamed to its type, and if it shares :ref:`name<class_Node_property_name>` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations. -If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED<class_Node_constant_INTERNAL_MODE_DISABLED>`, the child will be added as internal node. Such nodes are ignored by methods like :ref:`get_children<class_Node_method_get_children>`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker<class_ColorPicker>`. See :ref:`InternalMode<enum_Node_InternalMode>` for available modes. +If ``internal`` is different than :ref:`INTERNAL_MODE_DISABLED<class_Node_constant_INTERNAL_MODE_DISABLED>`, the child will be added as internal node. These nodes are ignored by methods like :ref:`get_children<class_Node_method_get_children>`, unless their parameter ``include_internal`` is ``true``. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. :ref:`ColorPicker<class_ColorPicker>`. See :ref:`InternalMode<enum_Node_InternalMode>` for available modes. -\ **Note:** If the child node already has a parent, the function will fail. Use :ref:`remove_child<class_Node_method_remove_child>` first to remove the node from its current parent. For example: +\ **Note:** If ``node`` already has a parent, this method will fail. Use :ref:`remove_child<class_Node_method_remove_child>` first to remove ``node`` from its current parent. For example: .. tabs:: @@ -1466,15 +1624,15 @@ If you need the child node to be added below a specific node in the list of chil .. rst-class:: classref-method -void **add_sibling** **(** :ref:`Node<class_Node>` sibling, :ref:`bool<class_bool>` force_readable_name=false **)** +|void| **add_sibling**\ (\ sibling\: :ref:`Node<class_Node>`, force_readable_name\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node_method_add_sibling>` -Adds a ``sibling`` node to current's node parent, at the same level as that node, right below it. +Adds a ``sibling`` node to this node's parent, and moves the added sibling right below this node. If ``force_readable_name`` is ``true``, improves the readability of the added ``sibling``. If not named, the ``sibling`` is renamed to its type, and if it shares :ref:`name<class_Node_property_name>` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to ``false``, which assigns a dummy name featuring ``@`` in both situations. Use :ref:`add_child<class_Node_method_add_child>` instead of this method if you don't need the child node to be added below a specific node in the list of children. -\ **Note:** If this node is internal, the new sibling will be internal too (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +\ **Note:** If this node is internal, the added sibling will be internal too (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1484,13 +1642,55 @@ Use :ref:`add_child<class_Node_method_add_child>` instead of this method if you .. rst-class:: classref-method -void **add_to_group** **(** :ref:`StringName<class_StringName>` group, :ref:`bool<class_bool>` persistent=false **)** +|void| **add_to_group**\ (\ group\: :ref:`StringName<class_StringName>`, persistent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node_method_add_to_group>` + +Adds the node to the ``group``. Groups can be helpful to organize a subset of nodes, for example ``"enemies"`` or ``"collectables"``. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`. + +If ``persistent`` is ``true``, the group will be stored when saved inside a :ref:`PackedScene<class_PackedScene>`. All groups created and displayed in the Node dock are persistent. + +\ **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order. + +\ **Note:** :ref:`SceneTree<class_SceneTree>`'s group methods will *not* work on this node if not inside the tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_atr: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **atr**\ (\ message\: :ref:`String<class_String>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| :ref:`🔗<class_Node_method_atr>` -Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`. +Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. Note that most :ref:`Control<class_Control>` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. -The ``persistent`` option is used when packing node to :ref:`PackedScene<class_PackedScene>` and saving to file. Non-persistent groups aren't stored. +This method works the same as :ref:`Object.tr<class_Object_method_tr>`, with the addition of respecting the :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` state. -\ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs. +If :ref:`Object.can_translate_messages<class_Object_method_can_translate_messages>` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`Object.set_message_translation<class_Object_method_set_message_translation>`. + +For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_atr_n: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **atr_n**\ (\ message\: :ref:`String<class_String>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = ""\ ) |const| :ref:`🔗<class_Node_method_atr_n>` + +Translates a ``message`` or ``plural_message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. + +This method works the same as :ref:`Object.tr_n<class_Object_method_tr_n>`, with the addition of respecting the :ref:`auto_translate_mode<class_Node_property_auto_translate_mode>` state. + +If :ref:`Object.can_translate_messages<class_Object_method_can_translate_messages>` is ``false``, or no translation is available, this method returns ``message`` or ``plural_message``, without changes. See :ref:`Object.set_message_translation<class_Object_method_set_message_translation>`. + +The ``n`` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. + +For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`. + +\ **Note:** Negative and :ref:`float<class_float>` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`atr<class_Node_method_atr>`. .. rst-class:: classref-item-separator @@ -1500,9 +1700,9 @@ The ``persistent`` option is used when packing node to :ref:`PackedScene<class_P .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **call_deferred_thread_group** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Variant<class_Variant>` **call_deferred_thread_group**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Node_method_call_deferred_thread_group>` -This function is similar to :ref:`Object.call_deferred<class_Object_method_call_deferred>` except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` or :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, the :ref:`_process<class_Node_method__process>` or :ref:`_physics_process<class_Node_method__physics_process>` or their internal versions are called. +This function is similar to :ref:`Object.call_deferred<class_Object_method_call_deferred>` except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` or :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`, the :ref:`_process<class_Node_private_method__process>` or :ref:`_physics_process<class_Node_private_method__physics_process>` or their internal versions are called. .. rst-class:: classref-item-separator @@ -1512,7 +1712,7 @@ This function is similar to :ref:`Object.call_deferred<class_Object_method_call_ .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **call_thread_safe** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Variant<class_Variant>` **call_thread_safe**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Node_method_call_thread_safe>` This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly. @@ -1524,9 +1724,21 @@ This function ensures that the calling of this function will succeed, no matter .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_process** **(** **)** |const| +:ref:`bool<class_bool>` **can_process**\ (\ ) |const| :ref:`🔗<class_Node_method_can_process>` + +Returns ``true`` if the node can receive processing notifications and input callbacks (:ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`, :ref:`_input<class_Node_private_method__input>`, etc.) from the :ref:`SceneTree<class_SceneTree>` and :ref:`Viewport<class_Viewport>`. The returned value depends on :ref:`process_mode<class_Node_property_process_mode>`: -Returns ``true`` if the node can process while the scene tree is paused (see :ref:`process_mode<class_Node_property_process_mode>`). Always returns ``true`` if the scene tree is not paused, and ``false`` if the node is not in the tree. +- If set to :ref:`PROCESS_MODE_PAUSABLE<class_Node_constant_PROCESS_MODE_PAUSABLE>`, returns ``true`` when the game is processing, i.e. :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``false``; + +- If set to :ref:`PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`, returns ``true`` when the game is paused, i.e. :ref:`SceneTree.paused<class_SceneTree_property_paused>` is ``true``; + +- If set to :ref:`PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`, always returns ``true``; + +- If set to :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`, always returns ``false``; + +- If set to :ref:`PROCESS_MODE_INHERIT<class_Node_constant_PROCESS_MODE_INHERIT>`, use the parent node's :ref:`process_mode<class_Node_property_process_mode>` to determine the result. + +If the node is not inside the tree, returns ``false`` no matter the value of :ref:`process_mode<class_Node_property_process_mode>`. .. rst-class:: classref-item-separator @@ -1536,9 +1748,11 @@ Returns ``true`` if the node can process while the scene tree is paused (see :re .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **create_tween** **(** **)** +:ref:`Tween<class_Tween>` **create_tween**\ (\ ) :ref:`🔗<class_Node_method_create_tween>` + +Creates a new :ref:`Tween<class_Tween>` and binds it to this node. -Creates a new :ref:`Tween<class_Tween>` and binds it to this node. This is equivalent of doing: +This is the equivalent of doing: .. tabs:: @@ -1553,7 +1767,9 @@ Creates a new :ref:`Tween<class_Tween>` and binds it to this node. This is equiv -The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`). +The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`). See :ref:`Tween.bind_node<class_Tween_method_bind_node>` for more info on Tweens bound to nodes. + +\ **Note:** The method can still be used when the node is not inside :ref:`SceneTree<class_SceneTree>`. It can fail in an unlikely case of using a custom :ref:`MainLoop<class_MainLoop>`. .. rst-class:: classref-item-separator @@ -1563,13 +1779,11 @@ The Tween will start automatically on the next process frame or physics frame (d .. rst-class:: classref-method -:ref:`Node<class_Node>` **duplicate** **(** :ref:`int<class_int>` flags=15 **)** |const| - -Duplicates the node, returning a new node. +:ref:`Node<class_Node>` **duplicate**\ (\ flags\: :ref:`int<class_int>` = 15\ ) |const| :ref:`🔗<class_Node_method_duplicate>` -You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags<enum_Node_DuplicateFlags>`). +Duplicates the node, returning a new node with all of its properties, signals and groups copied from the original. The behavior can be tweaked through the ``flags`` (see :ref:`DuplicateFlags<enum_Node_DuplicateFlags>`). -\ **Note:** It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to :ref:`Object._init<class_Object_method__init>` method). In that case, the node will be duplicated without a script. +\ **Note:** For nodes with a :ref:`Script<class_Script>` attached, if :ref:`Object._init<class_Object_private_method__init>` has been defined with required parameters, the duplicated node will not have a :ref:`Script<class_Script>`. .. rst-class:: classref-item-separator @@ -1579,19 +1793,15 @@ You can fine-tune the behavior using the ``flags`` (see :ref:`DuplicateFlags<enu .. rst-class:: classref-method -:ref:`Node<class_Node>` **find_child** **(** :ref:`String<class_String>` pattern, :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| +:ref:`Node<class_Node>` **find_child**\ (\ pattern\: :ref:`String<class_String>`, recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Node_method_find_child>` -Finds the first descendant of this node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +Finds the first descendant of this node whose :ref:`name<class_Node_property_name>` matches ``pattern``, returning ``null`` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). -If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. +If ``owned`` is ``true``, only descendants with a valid :ref:`owner<class_Node_property_owner>` node are checked. -If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner<class_Node_property_owner>`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. - -Returns ``null`` if no matching **Node** is found. - -\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` with unique names instead (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`), or caching the node references into variable. +\ **Note:** This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node<class_Node_method_get_node>` with unique names (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`). \ **Note:** To find all descendant nodes matching a pattern or a class type, see :ref:`find_children<class_Node_method_find_children>`. @@ -1603,23 +1813,19 @@ Returns ``null`` if no matching **Node** is found. .. rst-class:: classref-method -:ref:`Node[]<class_Node>` **find_children** **(** :ref:`String<class_String>` pattern, :ref:`String<class_String>` type="", :ref:`bool<class_bool>` recursive=true, :ref:`bool<class_bool>` owned=true **)** |const| - -Finds descendants of this node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`, and/or type matches ``type`` as in :ref:`Object.is_class<class_Object_method_is_class>`. Internal children are also searched over (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). - -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). +:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **find_children**\ (\ pattern\: :ref:`String<class_String>`, type\: :ref:`String<class_String>` = "", recursive\: :ref:`bool<class_bool>` = true, owned\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Node_method_find_children>` -\ ``type`` will check equality or inheritance, and is case-sensitive. ``"Object"`` will match a node whose type is ``"Node"`` but not the other way around. +Finds all descendants of this node whose names match ``pattern``, returning an empty :ref:`Array<class_Array>` if no match is found. The matching is done against node names, *not* their paths, through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. -If ``recursive`` is ``true``, all child nodes are included, even if deeply nested. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. If ``recursive`` is ``false``, only this node's direct children are matched. +If ``type`` is not empty, only ancestors inheriting from ``type`` are included (see :ref:`Object.is_class<class_Object_method_is_class>`). -If ``owned`` is ``true``, this method only finds nodes who have an assigned :ref:`owner<class_Node_property_owner>`. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. +If ``recursive`` is ``false``, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). -Returns an empty array if no matching nodes are found. +If ``owned`` is ``true``, only descendants with a valid :ref:`owner<class_Node_property_owner>` node are checked. -\ **Note:** As this method walks through all the descendants of the node, it is the slowest way to get references to other nodes. Whenever possible, consider caching the node references into variables. +\ **Note:** This method can be very slow. Consider storing references to the found nodes in a variable. -\ **Note:** If you only want to find the first descendant node that matches a pattern, see :ref:`find_child<class_Node_method_find_child>`. +\ **Note:** To find a single descendant node matching a pattern, see :ref:`find_child<class_Node_method_find_child>`. .. rst-class:: classref-item-separator @@ -1629,13 +1835,11 @@ Returns an empty array if no matching nodes are found. .. rst-class:: classref-method -:ref:`Node<class_Node>` **find_parent** **(** :ref:`String<class_String>` pattern **)** |const| +:ref:`Node<class_Node>` **find_parent**\ (\ pattern\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Node_method_find_parent>` -Finds the first parent of the current node whose name matches ``pattern`` as in :ref:`String.match<class_String_method_match>`. +Finds the first ancestor of this node whose :ref:`name<class_Node_property_name>` matches ``pattern``, returning ``null`` if no match is found. The matching is done through :ref:`String.match<class_String_method_match>`. As such, it is case-sensitive, ``"*"`` matches zero or more characters, and ``"?"`` matches any single character. See also :ref:`find_child<class_Node_method_find_child>` and :ref:`find_children<class_Node_method_find_children>`. -\ ``pattern`` does not match against the full path, just against individual node names. It is case-sensitive, with ``"*"`` matching zero or more characters and ``"?"`` matching any single character except ``"."``). - -\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using :ref:`get_node<class_Node_method_get_node>` with unique names instead (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`), or caching the node references into variable. +\ **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use :ref:`get_node<class_Node_method_get_node>` with unique names (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`). .. rst-class:: classref-item-separator @@ -1645,15 +1849,23 @@ Finds the first parent of the current node whose name matches ``pattern`` as in .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_child** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` include_internal=false **)** |const| +:ref:`Node<class_Node>` **get_child**\ (\ idx\: :ref:`int<class_int>`, include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Node_method_get_child>` + +Fetches a child node by its index. Each child node has an index relative its siblings (see :ref:`get_index<class_Node_method_get_index>`). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with :ref:`get_child_count<class_Node_method_get_child_count>` to iterate over this node's children. If no child exists at the given index, this method returns ``null`` and an error is generated. -Returns a child node by its index (see :ref:`get_child_count<class_Node_method_get_child_count>`). This method is often used for iterating all children of a node. +If ``include_internal`` is ``false``, internal children are ignored (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter). -Negative indices access the children from the last one. +:: -If ``include_internal`` is ``false``, internal children are skipped (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). + # Assuming the following are children of this node, in order: + # First, Middle, Last. + + var a = get_child(0).name # a is "First" + var b = get_child(1).name # b is "Middle" + var b = get_child(2).name # b is "Last" + var c = get_child(-1).name # c is "Last" -To access a child node via its name, use :ref:`get_node<class_Node_method_get_node>`. +\ **Note:** To fetch a node by :ref:`NodePath<class_NodePath>`, use :ref:`get_node<class_Node_method_get_node>`. .. rst-class:: classref-item-separator @@ -1663,11 +1875,11 @@ To access a child node via its name, use :ref:`get_node<class_Node_method_get_no .. rst-class:: classref-method -:ref:`int<class_int>` **get_child_count** **(** :ref:`bool<class_bool>` include_internal=false **)** |const| +:ref:`int<class_int>` **get_child_count**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Node_method_get_child_count>` -Returns the number of child nodes. +Returns the number of children of this node. -If ``include_internal`` is ``false``, internal children aren't counted (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +If ``include_internal`` is ``false``, internal children are not counted (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1677,11 +1889,11 @@ If ``include_internal`` is ``false``, internal children aren't counted (see ``in .. rst-class:: classref-method -:ref:`Node[]<class_Node>` **get_children** **(** :ref:`bool<class_bool>` include_internal=false **)** |const| +:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_children**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Node_method_get_children>` -Returns an array of references to node's children. +Returns all children of this node inside an :ref:`Array<class_Array>`. -If ``include_internal`` is ``false``, the returned array won't include internal children (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +If ``include_internal`` is ``false``, excludes internal children from the returned array (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1691,28 +1903,28 @@ If ``include_internal`` is ``false``, the returned array won't include internal .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **get_groups** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_groups**\ (\ ) |const| :ref:`🔗<class_Node_method_get_groups>` -Returns an array listing the groups that the node is a member of. +Returns an :ref:`Array<class_Array>` of group names that the node has been added to. -\ **Note:** For performance reasons, the order of node groups is *not* guaranteed. The order of node groups should not be relied upon as it can vary across project runs. +\ **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order. -\ **Note:** The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over :ref:`get_groups<class_Node_method_get_groups>`, use the following snippet: +\ **Note:** This method may also return some group names starting with an underscore (``_``). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet: .. tabs:: .. code-tab:: gdscript - # Stores the node's non-internal groups only (as an array of Strings). + # Stores the node's non-internal groups only (as an array of StringNames). var non_internal_groups = [] for group in get_groups(): - if not group.begins_with("_"): + if not str(group).begins_with("_"): non_internal_groups.push_back(group) .. code-tab:: csharp - // Stores the node's non-internal groups only (as a List of strings). + // Stores the node's non-internal groups only (as a List of StringNames). List<string> nonInternalGroups = new List<string>(); foreach (string group in GetGroups()) { @@ -1730,11 +1942,11 @@ Returns an array listing the groups that the node is a member of. .. rst-class:: classref-method -:ref:`int<class_int>` **get_index** **(** :ref:`bool<class_bool>` include_internal=false **)** |const| +:ref:`int<class_int>` **get_index**\ (\ include_internal\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Node_method_get_index>` -Returns the node's order in the scene tree branch. For example, if called on the first child node the position is ``0``. +Returns this node's order among its siblings. The first node's index is ``0``. See also :ref:`get_child<class_Node_method_get_child>`. -If ``include_internal`` is ``false``, the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +If ``include_internal`` is ``false``, returns the index ignoring internal children. The first, non-internal child will have an index of ``0`` (see :ref:`add_child<class_Node_method_add_child>`'s ``internal`` parameter). .. rst-class:: classref-item-separator @@ -1744,7 +1956,7 @@ If ``include_internal`` is ``false``, the index won't take internal children int .. rst-class:: classref-method -:ref:`Window<class_Window>` **get_last_exclusive_window** **(** **)** |const| +:ref:`Window<class_Window>` **get_last_exclusive_window**\ (\ ) |const| :ref:`🔗<class_Node_method_get_last_exclusive_window>` Returns the :ref:`Window<class_Window>` that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node. @@ -1756,7 +1968,7 @@ Returns the :ref:`Window<class_Window>` that contains this node, or the last exc .. rst-class:: classref-method -:ref:`int<class_int>` **get_multiplayer_authority** **(** **)** |const| +:ref:`int<class_int>` **get_multiplayer_authority**\ (\ ) |const| :ref:`🔗<class_Node_method_get_multiplayer_authority>` Returns the peer ID of the multiplayer authority for this node. See :ref:`set_multiplayer_authority<class_Node_method_set_multiplayer_authority>`. @@ -1768,26 +1980,28 @@ Returns the peer ID of the multiplayer authority for this node. See :ref:`set_mu .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`Node<class_Node>` **get_node**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_Node_method_get_node>` -Fetches a node. The :ref:`NodePath<class_NodePath>` can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, ``null`` is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call <method> on a null instance." error. +Fetches a node. The :ref:`NodePath<class_NodePath>` can either be a relative path (from this node), or an absolute path (from the :ref:`SceneTree.root<class_SceneTree_property_root>`) to a node. If ``path`` does not point to a valid node, generates an error and returns ``null``. Attempts to access methods on the return value will result in an *"Attempt to call <method> on a null instance."* error. -\ **Note:** Fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). +\ **Note:** Fetching by absolute path only works when the node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). -\ **Example:** Assume your current node is Character and the following tree: +\ **Example:** Assume this method is called from the Character node, inside the following tree: -:: +.. code:: text - /root - /root/Character - /root/Character/Sword - /root/Character/Backpack/Dagger - /root/MyGame - /root/Swamp/Alligator - /root/Swamp/Mosquito - /root/Swamp/Goblin + ┖╴root + ┠╴Character (you are here!) + ┃ ┠╴Sword + ┃ ┖╴Backpack + ┃ ┖╴Dagger + ┠╴MyGame + ┖╴Swamp + ┠╴Alligator + ┠╴Mosquito + ┖╴Goblin -Possible paths are: +The following calls will return a valid node: .. tabs:: @@ -1816,28 +2030,54 @@ Possible paths are: .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)** +:ref:`Array<class_Array>` **get_node_and_resource**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_Node_method_get_node_and_resource>` + +Fetches a node and its most nested resource as specified by the :ref:`NodePath<class_NodePath>`'s subname. Returns an :ref:`Array<class_Array>` of size ``3`` where: -Fetches a node and one of its resources as specified by the :ref:`NodePath<class_NodePath>`'s subname (e.g. ``Area2D/CollisionShape2D:shape``). If several nested resources are specified in the :ref:`NodePath<class_NodePath>`, the last one will be fetched. +- Element ``0`` is the **Node**, or ``null`` if not found; -The return value is an array of size 3: the first index points to the **Node** (or ``null`` if not found), the second index points to the :ref:`Resource<class_Resource>` (or ``null`` if not found), and the third index is the remaining :ref:`NodePath<class_NodePath>`, if any. +- Element ``1`` is the subname's last nested :ref:`Resource<class_Resource>`, or ``null`` if not found; -For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that its ``shape`` property has been assigned a :ref:`RectangleShape2D<class_RectangleShape2D>` resource, one could have this kind of output: +- Element ``2`` is the remaining :ref:`NodePath<class_NodePath>`, referring to an existing, non-:ref:`Resource<class_Resource>` property (see :ref:`Object.get_indexed<class_Object_method_get_indexed>`). + +\ **Example:** Assume that the child's :ref:`Sprite2D.texture<class_Sprite2D_property_texture>` has been assigned a :ref:`AtlasTexture<class_AtlasTexture>`: .. tabs:: .. code-tab:: gdscript - print(get_node_and_resource("Area2D/CollisionShape2D")) # [[CollisionShape2D:1161], Null, ] - print(get_node_and_resource("Area2D/CollisionShape2D:shape")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ] - print(get_node_and_resource("Area2D/CollisionShape2D:shape:extents")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents] + var a = get_node_and_resource("Area2D/Sprite2D") + print(a[0].name) # Prints Sprite2D + print(a[1]) # Prints <null> + print(a[2]) # Prints ^"" + + var b = get_node_and_resource("Area2D/Sprite2D:texture:atlas") + print(b[0].name) # Prints Sprite2D + print(b[1].get_class()) # Prints AtlasTexture + print(b[2]) # Prints ^"" + + var c = get_node_and_resource("Area2D/Sprite2D:texture:atlas:region") + print(c[0].name) # Prints Sprite2D + print(c[1].get_class()) # Prints AtlasTexture + print(c[2]) # Prints ^":region" .. code-tab:: csharp - GD.Print(GetNodeAndResource("Area2D/CollisionShape2D")); // [[CollisionShape2D:1161], Null, ] - GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], ] - GD.Print(GetNodeAndResource("Area2D/CollisionShape2D:shape:extents")); // [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents] + var a = GetNodeAndResource(NodePath("Area2D/Sprite2D")); + GD.Print(a[0].Name); // Prints Sprite2D + GD.Print(a[1]); // Prints <null> + GD.Print(a[2]); // Prints ^" + + var b = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas")); + GD.Print(b[0].name); // Prints Sprite2D + GD.Print(b[1].get_class()); // Prints AtlasTexture + GD.Print(b[2]); // Prints ^"" + + var c = GetNodeAndResource(NodePath("Area2D/Sprite2D:texture:atlas:region")); + GD.Print(c[0].name); // Prints Sprite2D + GD.Print(c[1].get_class()); // Prints AtlasTexture + GD.Print(c[2]); // Prints ^":region" @@ -1849,9 +2089,9 @@ For example, assuming that ``Area2D/CollisionShape2D`` is a valid node and that .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_node_or_null** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`Node<class_Node>` **get_node_or_null**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_Node_method_get_node_or_null>` -Similar to :ref:`get_node<class_Node_method_get_node>`, but does not log an error if ``path`` does not point to a valid **Node**. +Fetches a node by :ref:`NodePath<class_NodePath>`. Similar to :ref:`get_node<class_Node_method_get_node>`, but does not generate an error if ``path`` does not point to a valid node. .. rst-class:: classref-item-separator @@ -1861,9 +2101,9 @@ Similar to :ref:`get_node<class_Node_method_get_node>`, but does not log an erro .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_parent** **(** **)** |const| +:ref:`Node<class_Node>` **get_parent**\ (\ ) |const| :ref:`🔗<class_Node_method_get_parent>` -Returns the parent node of the current node, or ``null`` if the node lacks a parent. +Returns this node's parent node, or ``null`` if the node doesn't have a parent. .. rst-class:: classref-item-separator @@ -1873,9 +2113,9 @@ Returns the parent node of the current node, or ``null`` if the node lacks a par .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_path** **(** **)** |const| +:ref:`NodePath<class_NodePath>` **get_path**\ (\ ) |const| :ref:`🔗<class_Node_method_get_path>` -Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see :ref:`is_inside_tree<class_Node_method_is_inside_tree>`). +Returns the node's absolute path, relative to the :ref:`SceneTree.root<class_SceneTree_property_root>`. If the node is not inside the scene tree, this method fails and returns an empty :ref:`NodePath<class_NodePath>`. .. rst-class:: classref-item-separator @@ -1885,13 +2125,13 @@ Returns the absolute path of the current node. This only works if the current no .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_path_to** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` use_unique_path=false **)** |const| +:ref:`NodePath<class_NodePath>` **get_path_to**\ (\ node\: :ref:`Node<class_Node>`, use_unique_path\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Node_method_get_path_to>` -Returns the relative :ref:`NodePath<class_NodePath>` from this node to the specified ``node``. Both nodes must be in the same scene or the function will fail. +Returns the relative :ref:`NodePath<class_NodePath>` from this node to the specified ``node``. Both nodes must be in the same :ref:`SceneTree<class_SceneTree>` or scene hierarchy, otherwise this method fails and returns an empty :ref:`NodePath<class_NodePath>`. -If ``use_unique_path`` is ``true``, returns the shortest path considering unique node. +If ``use_unique_path`` is ``true``, returns the shortest path accounting for this node's unique name (see :ref:`unique_name_in_owner<class_Node_property_unique_name_in_owner>`). -\ **Note:** If you get a relative path which starts from a unique node, the path may be longer than a normal relative path due to the addition of the unique node's name. +\ **Note:** If you get a relative path which starts from a unique node, the path may be longer than a normal relative path, due to the addition of the unique node's name. .. rst-class:: classref-item-separator @@ -1901,9 +2141,9 @@ If ``use_unique_path`` is ``true``, returns the shortest path considering unique .. rst-class:: classref-method -:ref:`float<class_float>` **get_physics_process_delta_time** **(** **)** |const| +:ref:`float<class_float>` **get_physics_process_delta_time**\ (\ ) |const| :ref:`🔗<class_Node_method_get_physics_process_delta_time>` -Returns the time elapsed (in seconds) since the last physics-bound frame (see :ref:`_physics_process<class_Node_method__physics_process>`). This is always a constant value in physics processing unless the frames per second is changed via :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`. +Returns the time elapsed (in seconds) since the last physics callback. This value is identical to :ref:`_physics_process<class_Node_private_method__physics_process>`'s ``delta`` parameter, and is often consistent at run-time, unless :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` is changed. See also :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>`. .. rst-class:: classref-item-separator @@ -1913,9 +2153,9 @@ Returns the time elapsed (in seconds) since the last physics-bound frame (see :r .. rst-class:: classref-method -:ref:`float<class_float>` **get_process_delta_time** **(** **)** |const| +:ref:`float<class_float>` **get_process_delta_time**\ (\ ) |const| :ref:`🔗<class_Node_method_get_process_delta_time>` -Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame. +Returns the time elapsed (in seconds) since the last process callback. This value is identical to :ref:`_process<class_Node_private_method__process>`'s ``delta`` parameter, and may vary from frame to frame. See also :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`. .. rst-class:: classref-item-separator @@ -1925,9 +2165,9 @@ Returns the time elapsed (in seconds) since the last process callback. This valu .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_scene_instance_load_placeholder** **(** **)** |const| +:ref:`bool<class_bool>` **get_scene_instance_load_placeholder**\ (\ ) |const| :ref:`🔗<class_Node_method_get_scene_instance_load_placeholder>` -Returns ``true`` if this is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>`. +Returns ``true`` if this node is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>` and :ref:`set_scene_instance_load_placeholder<class_Node_method_set_scene_instance_load_placeholder>`. .. rst-class:: classref-item-separator @@ -1937,9 +2177,55 @@ Returns ``true`` if this is an instance load placeholder. See :ref:`InstancePlac .. rst-class:: classref-method -:ref:`SceneTree<class_SceneTree>` **get_tree** **(** **)** |const| +:ref:`SceneTree<class_SceneTree>` **get_tree**\ (\ ) |const| :ref:`🔗<class_Node_method_get_tree>` + +Returns the :ref:`SceneTree<class_SceneTree>` that contains this node. If this node is not inside the tree, generates an error and returns ``null``. See also :ref:`is_inside_tree<class_Node_method_is_inside_tree>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_get_tree_string: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_tree_string**\ (\ ) :ref:`🔗<class_Node_method_get_tree_string>` -Returns the :ref:`SceneTree<class_SceneTree>` that contains this node. +Returns the tree as a :ref:`String<class_String>`. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node<class_Node_method_get_node>` function. It also can be used in game UI/UX. + +May print, for example: + +.. code:: text + + TheGame + TheGame/Menu + TheGame/Menu/Label + TheGame/Menu/Camera2D + TheGame/SplashScreen + TheGame/SplashScreen/Camera2D + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_get_tree_string_pretty: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_tree_string_pretty**\ (\ ) :ref:`🔗<class_Node_method_get_tree_string_pretty>` + +Similar to :ref:`get_tree_string<class_Node_method_get_tree_string>`, this returns the tree as a :ref:`String<class_String>`. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. + +May print, for example: + +.. code:: text + + ┖╴TheGame + ┠╴Menu + ┃ ┠╴Label + ┃ ┖╴Camera2D + ┖╴SplashScreen + ┖╴Camera2D .. rst-class:: classref-item-separator @@ -1949,9 +2235,9 @@ Returns the :ref:`SceneTree<class_SceneTree>` that contains this node. .. rst-class:: classref-method -:ref:`Viewport<class_Viewport>` **get_viewport** **(** **)** |const| +:ref:`Viewport<class_Viewport>` **get_viewport**\ (\ ) |const| :ref:`🔗<class_Node_method_get_viewport>` -Returns the node's :ref:`Viewport<class_Viewport>`. +Returns the node's closest :ref:`Viewport<class_Viewport>` ancestor, if the node is inside the tree. Otherwise, returns ``null``. .. rst-class:: classref-item-separator @@ -1961,7 +2247,7 @@ Returns the node's :ref:`Viewport<class_Viewport>`. .. rst-class:: classref-method -:ref:`Window<class_Window>` **get_window** **(** **)** |const| +:ref:`Window<class_Window>` **get_window**\ (\ ) |const| :ref:`🔗<class_Node_method_get_window>` Returns the :ref:`Window<class_Window>` that contains this node. If the node is in the main window, this is equivalent to getting the root node (``get_tree().get_root()``). @@ -1973,9 +2259,9 @@ Returns the :ref:`Window<class_Window>` that contains this node. If the node is .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_node** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`bool<class_bool>` **has_node**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_Node_method_has_node>` -Returns ``true`` if the node that the :ref:`NodePath<class_NodePath>` points to exists. +Returns ``true`` if the ``path`` points to a valid node. See also :ref:`get_node<class_Node_method_get_node>`. .. rst-class:: classref-item-separator @@ -1985,9 +2271,9 @@ Returns ``true`` if the node that the :ref:`NodePath<class_NodePath>` points to .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_node_and_resource** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`bool<class_bool>` **has_node_and_resource**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_Node_method_has_node_and_resource>` -Returns ``true`` if the :ref:`NodePath<class_NodePath>` points to a valid node and its subname points to a valid resource, e.g. ``Area2D/CollisionShape2D:shape``. Properties with a non-:ref:`Resource<class_Resource>` type (e.g. nodes or primitive math types) are not considered resources. +Returns ``true`` if ``path`` points to a valid node and its subnames point to a valid :ref:`Resource<class_Resource>`, e.g. ``Area2D/CollisionShape2D:shape``. Properties that are not :ref:`Resource<class_Resource>` types (such as nodes or other :ref:`Variant<class_Variant>` types) are not considered. See also :ref:`get_node_and_resource<class_Node_method_get_node_and_resource>`. .. rst-class:: classref-item-separator @@ -1997,9 +2283,9 @@ Returns ``true`` if the :ref:`NodePath<class_NodePath>` points to a valid node a .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_ancestor_of** **(** :ref:`Node<class_Node>` node **)** |const| +:ref:`bool<class_bool>` **is_ancestor_of**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`🔗<class_Node_method_is_ancestor_of>` -Returns ``true`` if the given node is a direct or indirect child of the current node. +Returns ``true`` if the given ``node`` is a direct or indirect child of this node. .. rst-class:: classref-item-separator @@ -2009,9 +2295,9 @@ Returns ``true`` if the given node is a direct or indirect child of the current .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_displayed_folded** **(** **)** |const| +:ref:`bool<class_bool>` **is_displayed_folded**\ (\ ) |const| :ref:`🔗<class_Node_method_is_displayed_folded>` -Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling. +Returns ``true`` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also :ref:`set_display_folded<class_Node_method_set_display_folded>`. .. rst-class:: classref-item-separator @@ -2021,9 +2307,9 @@ Returns ``true`` if the node is folded (collapsed) in the Scene dock. This metho .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_editable_instance** **(** :ref:`Node<class_Node>` node **)** |const| +:ref:`bool<class_bool>` **is_editable_instance**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`🔗<class_Node_method_is_editable_instance>` -Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is only intended for use with editor tooling. +Returns ``true`` if ``node`` has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also :ref:`set_editable_instance<class_Node_method_set_editable_instance>`. .. rst-class:: classref-item-separator @@ -2033,9 +2319,9 @@ Returns ``true`` if ``node`` has editable children enabled relative to this node .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_greater_than** **(** :ref:`Node<class_Node>` node **)** |const| +:ref:`bool<class_bool>` **is_greater_than**\ (\ node\: :ref:`Node<class_Node>`\ ) |const| :ref:`🔗<class_Node_method_is_greater_than>` -Returns ``true`` if the given node occurs later in the scene hierarchy than the current node. +Returns ``true`` if the given ``node`` occurs later in the scene hierarchy than this node. A node occurring later is usually processed last. .. rst-class:: classref-item-separator @@ -2045,9 +2331,9 @@ Returns ``true`` if the given node occurs later in the scene hierarchy than the .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_in_group** **(** :ref:`StringName<class_StringName>` group **)** |const| +:ref:`bool<class_bool>` **is_in_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Node_method_is_in_group>` -Returns ``true`` if this node is in the specified group. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`. +Returns ``true`` if this node has been added to the given ``group``. See :ref:`add_to_group<class_Node_method_add_to_group>` and :ref:`remove_from_group<class_Node_method_remove_from_group>`. See also notes in the description, and the :ref:`SceneTree<class_SceneTree>`'s group methods. .. rst-class:: classref-item-separator @@ -2057,9 +2343,9 @@ Returns ``true`` if this node is in the specified group. See notes in the descri .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_inside_tree** **(** **)** |const| +:ref:`bool<class_bool>` **is_inside_tree**\ (\ ) |const| :ref:`🔗<class_Node_method_is_inside_tree>` -Returns ``true`` if this node is currently inside a :ref:`SceneTree<class_SceneTree>`. +Returns ``true`` if this node is currently inside a :ref:`SceneTree<class_SceneTree>`. See also :ref:`get_tree<class_Node_method_get_tree>`. .. rst-class:: classref-item-separator @@ -2069,7 +2355,7 @@ Returns ``true`` if this node is currently inside a :ref:`SceneTree<class_SceneT .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_multiplayer_authority** **(** **)** |const| +:ref:`bool<class_bool>` **is_multiplayer_authority**\ (\ ) |const| :ref:`🔗<class_Node_method_is_multiplayer_authority>` Returns ``true`` if the local system is the multiplayer authority of this node. @@ -2081,7 +2367,7 @@ Returns ``true`` if the local system is the multiplayer authority of this node. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_node_ready** **(** **)** |const| +:ref:`bool<class_bool>` **is_node_ready**\ (\ ) |const| :ref:`🔗<class_Node_method_is_node_ready>` Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its children are initialized. @@ -2091,11 +2377,53 @@ Returns ``true`` if the node is ready, i.e. it's inside scene tree and all its c ---- +.. _class_Node_method_is_part_of_edited_scene: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_part_of_edited_scene**\ (\ ) |const| :ref:`🔗<class_Node_method_is_part_of_edited_scene>` + +Returns ``true`` if the node is part of the scene currently opened in the editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_is_physics_interpolated: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_physics_interpolated**\ (\ ) |const| :ref:`🔗<class_Node_method_is_physics_interpolated>` + +Returns ``true`` if physics interpolation is enabled for this node (see :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>`). + +\ **Note:** Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the :ref:`SceneTree<class_SceneTree>`. This can be tested using :ref:`is_physics_interpolated_and_enabled<class_Node_method_is_physics_interpolated_and_enabled>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_is_physics_interpolated_and_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_physics_interpolated_and_enabled**\ (\ ) |const| :ref:`🔗<class_Node_method_is_physics_interpolated_and_enabled>` + +Returns ``true`` if physics interpolation is enabled (see :ref:`physics_interpolation_mode<class_Node_property_physics_interpolation_mode>`) **and** enabled in the :ref:`SceneTree<class_SceneTree>`. + +This is a convenience version of :ref:`is_physics_interpolated<class_Node_method_is_physics_interpolated>` that also checks whether physics interpolation is enabled globally. + +See :ref:`SceneTree.physics_interpolation<class_SceneTree_property_physics_interpolation>` and :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_is_physics_processing: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_physics_processing** **(** **)** |const| +:ref:`bool<class_bool>` **is_physics_processing**\ (\ ) |const| :ref:`🔗<class_Node_method_is_physics_processing>` Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process<class_Node_method_set_physics_process>`). @@ -2107,7 +2435,7 @@ Returns ``true`` if physics processing is enabled (see :ref:`set_physics_process .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_physics_processing_internal** **(** **)** |const| +:ref:`bool<class_bool>` **is_physics_processing_internal**\ (\ ) |const| :ref:`🔗<class_Node_method_is_physics_processing_internal>` Returns ``true`` if internal physics processing is enabled (see :ref:`set_physics_process_internal<class_Node_method_set_physics_process_internal>`). @@ -2119,7 +2447,7 @@ Returns ``true`` if internal physics processing is enabled (see :ref:`set_physic .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing>` Returns ``true`` if processing is enabled (see :ref:`set_process<class_Node_method_set_process>`). @@ -2131,7 +2459,7 @@ Returns ``true`` if processing is enabled (see :ref:`set_process<class_Node_meth .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing_input** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing_input**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing_input>` Returns ``true`` if the node is processing input (see :ref:`set_process_input<class_Node_method_set_process_input>`). @@ -2143,7 +2471,7 @@ Returns ``true`` if the node is processing input (see :ref:`set_process_input<cl .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing_internal** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing_internal**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing_internal>` Returns ``true`` if internal processing is enabled (see :ref:`set_process_internal<class_Node_method_set_process_internal>`). @@ -2155,7 +2483,7 @@ Returns ``true`` if internal processing is enabled (see :ref:`set_process_intern .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing_shortcut_input** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing_shortcut_input**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing_shortcut_input>` Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shortcut_input<class_Node_method_set_process_shortcut_input>`). @@ -2167,7 +2495,7 @@ Returns ``true`` if the node is processing shortcuts (see :ref:`set_process_shor .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing_unhandled_input** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing_unhandled_input**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing_unhandled_input>` Returns ``true`` if the node is processing unhandled input (see :ref:`set_process_unhandled_input<class_Node_method_set_process_unhandled_input>`). @@ -2179,7 +2507,7 @@ Returns ``true`` if the node is processing unhandled input (see :ref:`set_proces .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_processing_unhandled_key_input** **(** **)** |const| +:ref:`bool<class_bool>` **is_processing_unhandled_key_input**\ (\ ) |const| :ref:`🔗<class_Node_method_is_processing_unhandled_key_input>` Returns ``true`` if the node is processing unhandled key input (see :ref:`set_process_unhandled_key_input<class_Node_method_set_process_unhandled_key_input>`). @@ -2191,11 +2519,11 @@ Returns ``true`` if the node is processing unhandled key input (see :ref:`set_pr .. rst-class:: classref-method -void **move_child** **(** :ref:`Node<class_Node>` child_node, :ref:`int<class_int>` to_index **)** +|void| **move_child**\ (\ child_node\: :ref:`Node<class_Node>`, to_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Node_method_move_child>` -Moves a child node to a different index (order) among the other children. Since calls, signals, etc. are performed by tree order, changing the order of children nodes may be useful. If ``to_index`` is negative, the index will be counted from the end. +Moves ``child_node`` to the given index. A node's index is the order among its siblings. If ``to_index`` is negative, the index is counted from the end of the list. See also :ref:`get_child<class_Node_method_get_child>` and :ref:`get_index<class_Node_method_get_index>`. -\ **Note:** Internal children can only be moved within their expected "internal range" (see ``internal`` parameter in :ref:`add_child<class_Node_method_add_child>`). +\ **Note:** The processing order of several engine callbacks (:ref:`_ready<class_Node_private_method__ready>`, :ref:`_process<class_Node_private_method__process>`, etc.) and notifications sent through :ref:`propagate_notification<class_Node_method_propagate_notification>` is affected by tree order. :ref:`CanvasItem<class_CanvasItem>` nodes are also rendered in tree order. See also :ref:`process_priority<class_Node_property_process_priority>`. .. rst-class:: classref-item-separator @@ -2205,7 +2533,7 @@ Moves a child node to a different index (order) among the other children. Since .. rst-class:: classref-method -void **notify_deferred_thread_group** **(** :ref:`int<class_int>` what **)** +|void| **notify_deferred_thread_group**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Node_method_notify_deferred_thread_group>` Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for notifications. @@ -2217,7 +2545,7 @@ Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thre .. rst-class:: classref-method -void **notify_thread_safe** **(** :ref:`int<class_int>` what **)** +|void| **notify_thread_safe**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Node_method_notify_thread_safe>` Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for notifications. @@ -2229,11 +2557,11 @@ Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for .. rst-class:: classref-method -void **print_orphan_nodes** **(** **)** |static| +|void| **print_orphan_nodes**\ (\ ) |static| :ref:`🔗<class_Node_method_print_orphan_nodes>` -Prints all orphan nodes (nodes outside the :ref:`SceneTree<class_SceneTree>`). Used for debugging. +Prints all orphan nodes (nodes outside the :ref:`SceneTree<class_SceneTree>`). Useful for debugging. -\ **Note:** :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` only works in debug builds. When called in a project exported in release mode, :ref:`print_orphan_nodes<class_Node_method_print_orphan_nodes>` will not print anything. +\ **Note:** This method only works in debug builds. Does nothing in a project exported in release mode. .. rst-class:: classref-item-separator @@ -2243,20 +2571,20 @@ Prints all orphan nodes (nodes outside the :ref:`SceneTree<class_SceneTree>`). U .. rst-class:: classref-method -void **print_tree** **(** **)** +|void| **print_tree**\ (\ ) :ref:`🔗<class_Node_method_print_tree>` -Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the :ref:`get_node<class_Node_method_get_node>` function. +Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs :ref:`NodePath<class_NodePath>`\ s relative to this node, and is good for copy/pasting into :ref:`get_node<class_Node_method_get_node>`. See also :ref:`print_tree_pretty<class_Node_method_print_tree_pretty>`. -\ **Example output:**\ +May print, for example: -:: +.. code:: text - TheGame - TheGame/Menu - TheGame/Menu/Label - TheGame/Menu/Camera2D - TheGame/SplashScreen - TheGame/SplashScreen/Camera2D + . + Menu + Menu/Label + Menu/Camera2D + SplashScreen + SplashScreen/Camera2D .. rst-class:: classref-item-separator @@ -2266,13 +2594,13 @@ Prints the tree to stdout. Used mainly for debugging purposes. This version disp .. rst-class:: classref-method -void **print_tree_pretty** **(** **)** +|void| **print_tree_pretty**\ (\ ) :ref:`🔗<class_Node_method_print_tree_pretty>` -Similar to :ref:`print_tree<class_Node_method_print_tree>`, this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. +Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to :ref:`print_tree<class_Node_method_print_tree>`, but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees. -\ **Example output:**\ +May print, for example: -:: +.. code:: text ┖╴TheGame ┠╴Menu @@ -2289,9 +2617,11 @@ Similar to :ref:`print_tree<class_Node_method_print_tree>`, this prints the tree .. rst-class:: classref-method -void **propagate_call** **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` args=[], :ref:`bool<class_bool>` parent_first=false **)** +|void| **propagate_call**\ (\ method\: :ref:`StringName<class_StringName>`, args\: :ref:`Array<class_Array>` = [], parent_first\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node_method_propagate_call>` + +Calls the given ``method`` name, passing ``args`` as arguments, on this node and all of its children, recursively. -Calls the given method (if present) with the arguments given in ``args`` on this node and recursively on all its children. If the ``parent_first`` argument is ``true``, the method will be called on the current node first, then on all its children. If ``parent_first`` is ``false``, the children will be called first. +If ``parent_first`` is ``true``, the method is called on this node first, then on all of its children. If ``false``, the children's methods are called first. .. rst-class:: classref-item-separator @@ -2301,9 +2631,9 @@ Calls the given method (if present) with the arguments given in ``args`` on this .. rst-class:: classref-method -void **propagate_notification** **(** :ref:`int<class_int>` what **)** +|void| **propagate_notification**\ (\ what\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Node_method_propagate_notification>` -Notifies the current node and all its children recursively by calling :ref:`Object.notification<class_Object_method_notification>` on all of them. +Calls :ref:`Object.notification<class_Object_method_notification>` with ``what`` on this node and all of its children, recursively. .. rst-class:: classref-item-separator @@ -2313,13 +2643,13 @@ Notifies the current node and all its children recursively by calling :ref:`Obje .. rst-class:: classref-method -void **queue_free** **(** **)** +|void| **queue_free**\ (\ ) :ref:`🔗<class_Node_method_queue_free>` -Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well, and all references to the node and its children will become invalid, see :ref:`Object.free<class_Object_method_free>`. +Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid. -It is safe to call :ref:`queue_free<class_Node_method_queue_free>` multiple times per frame on a node, and to :ref:`Object.free<class_Object_method_free>` a node that is currently queued for deletion. Use :ref:`Object.is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` to check whether a node will be deleted at the end of the frame. +Unlike with :ref:`Object.free<class_Object_method_free>`, the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call :ref:`queue_free<class_Node_method_queue_free>` multiple times. Use :ref:`Object.is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` to check if the node will be deleted at the end of the frame. -The node will only be freed after all other deferred calls are finished, so using :ref:`queue_free<class_Node_method_queue_free>` is not always the same as calling :ref:`Object.free<class_Object_method_free>` through :ref:`Object.call_deferred<class_Object_method_call_deferred>`. +\ **Note:** The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling :ref:`Object.free<class_Object_method_free>` through :ref:`Object.call_deferred<class_Object_method_call_deferred>`. .. rst-class:: classref-item-separator @@ -2329,11 +2659,11 @@ The node will only be freed after all other deferred calls are finished, so usin .. rst-class:: classref-method -void **remove_child** **(** :ref:`Node<class_Node>` node **)** +|void| **remove_child**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Node_method_remove_child>` -Removes a child node. The node is NOT deleted and must be deleted manually. +Removes a child ``node``. The ``node``, along with its children, are **not** deleted. To delete a node, see :ref:`queue_free<class_Node_method_queue_free>`. -\ **Note:** This function may set the :ref:`owner<class_Node_property_owner>` of the removed Node (or its descendants) to be ``null``, if that :ref:`owner<class_Node_property_owner>` is no longer a parent or ancestor. +\ **Note:** When this node is inside the tree, this method sets the :ref:`owner<class_Node_property_owner>` of the removed ``node`` (or its descendants) to ``null``, if their :ref:`owner<class_Node_property_owner>` is no longer an ancestor (see :ref:`is_ancestor_of<class_Node_method_is_ancestor_of>`). .. rst-class:: classref-item-separator @@ -2343,9 +2673,9 @@ Removes a child node. The node is NOT deleted and must be deleted manually. .. rst-class:: classref-method -void **remove_from_group** **(** :ref:`StringName<class_StringName>` group **)** +|void| **remove_from_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Node_method_remove_from_group>` -Removes a node from the ``group``. Does nothing if the node is not in the ``group``. See notes in the description, and the group methods in :ref:`SceneTree<class_SceneTree>`. +Removes the node from the given ``group``. Does nothing if the node is not in the ``group``. See also notes in the description, and the :ref:`SceneTree<class_SceneTree>`'s group methods. .. rst-class:: classref-item-separator @@ -2355,9 +2685,9 @@ Removes a node from the ``group``. Does nothing if the node is not in the ``grou .. rst-class:: classref-method -void **reparent** **(** :ref:`Node<class_Node>` new_parent, :ref:`bool<class_bool>` keep_global_transform=true **)** +|void| **reparent**\ (\ new_parent\: :ref:`Node<class_Node>`, keep_global_transform\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Node_method_reparent>` -Changes the parent of this **Node** to the ``new_parent``. The node needs to already have a parent. +Changes the parent of this **Node** to the ``new_parent``. The node needs to already have a parent. The node's :ref:`owner<class_Node_property_owner>` is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation). If ``keep_global_transform`` is ``true``, the node's global transform will be preserved if supported. :ref:`Node2D<class_Node2D>`, :ref:`Node3D<class_Node3D>` and :ref:`Control<class_Control>` support this argument (but :ref:`Control<class_Control>` keeps only position). @@ -2369,15 +2699,13 @@ If ``keep_global_transform`` is ``true``, the node's global transform will be pr .. rst-class:: classref-method -void **replace_by** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` keep_groups=false **)** +|void| **replace_by**\ (\ node\: :ref:`Node<class_Node>`, keep_groups\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node_method_replace_by>` -Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost. +Replaces this node by the given ``node``. All children of this node are moved to ``node``. -If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in. +If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that the replaced node is in (see :ref:`add_to_group<class_Node_method_add_to_group>`). -\ **Note:** The given node will become the new parent of any child nodes that the replaced node had. - -\ **Note:** The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using :ref:`Object.free<class_Object_method_free>`. +\ **Warning:** The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use :ref:`Object.free<class_Object_method_free>`. .. rst-class:: classref-item-separator @@ -2387,9 +2715,29 @@ If ``keep_groups`` is ``true``, the ``node`` is added to the same groups that th .. rst-class:: classref-method -void **request_ready** **(** **)** +|void| **request_ready**\ (\ ) :ref:`🔗<class_Node_method_request_ready>` + +Requests :ref:`_ready<class_Node_private_method__ready>` to be called again the next time the node enters the tree. Does **not** immediately call :ref:`_ready<class_Node_private_method__ready>`. + +\ **Note:** This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of :ref:`_ready<class_Node_private_method__ready>` callbacks will be the same as normal. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **reset_physics_interpolation**\ (\ ) :ref:`🔗<class_Node_method_reset_physics_interpolation>` + +When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick. + +That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete. + +The notification :ref:`NOTIFICATION_RESET_PHYSICS_INTERPOLATION<class_Node_constant_NOTIFICATION_RESET_PHYSICS_INTERPOLATION>` will be received by the node and all children recursively. -Requests that ``_ready`` be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see :ref:`_ready<class_Node_method__ready>`). ``_ready`` is called only for the node which requested it, which means that you need to request ready for each child if you want them to call ``_ready`` too (in which case, ``_ready`` will be called in the same order as it would normally). +\ **Note:** This function should be called **after** moving the node, rather than before. .. rst-class:: classref-item-separator @@ -2399,11 +2747,13 @@ Requests that ``_ready`` be called again. Note that the method won't be called i .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **rpc** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Error<enum_@GlobalScope_Error>` **rpc**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Node_method_rpc>` -Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath<class_NodePath>`, including the exact same node name. Behavior depends on the RPC configuration for the given method, see :ref:`rpc_config<class_Node_method_rpc_config>` and :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>`. Methods are not exposed to RPCs by default. Returns ``null``. +Sends a remote procedure call request for the given ``method`` to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same :ref:`NodePath<class_NodePath>`, including the exact same :ref:`name<class_Node_property_name>`. Behavior depends on the RPC configuration for the given ``method`` (see :ref:`rpc_config<class_Node_method_rpc_config>` and :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>`). By default, methods are not exposed to RPCs. -\ **Note:** You can only safely use RPCs on clients after you received the ``connected_to_server`` signal from the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. You also need to keep track of the connection state, either by the :ref:`MultiplayerAPI<class_MultiplayerAPI>` signals like ``server_disconnected`` or by checking ``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``. +May return :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if the node's :ref:`multiplayer<class_Node_property_multiplayer>` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR<class_@GlobalScope_constant_ERR_CONNECTION_ERROR>` if :ref:`multiplayer<class_Node_property_multiplayer>`'s connection is not available. + +\ **Note:** You can only safely use RPCs on clients after you received the :ref:`MultiplayerAPI.connected_to_server<class_MultiplayerAPI_signal_connected_to_server>` signal from the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. You also need to keep track of the connection state, either by the :ref:`MultiplayerAPI<class_MultiplayerAPI>` signals like :ref:`MultiplayerAPI.server_disconnected<class_MultiplayerAPI_signal_server_disconnected>` or by checking (``get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED``). .. rst-class:: classref-item-separator @@ -2413,20 +2763,19 @@ Sends a remote procedure call request for the given ``method`` to peers on the n .. rst-class:: classref-method -void **rpc_config** **(** :ref:`StringName<class_StringName>` method, :ref:`Variant<class_Variant>` config **)** +|void| **rpc_config**\ (\ method\: :ref:`StringName<class_StringName>`, config\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Node_method_rpc_config>` -Changes the RPC mode for the given ``method`` with the given ``config`` which should be ``null`` (to disable) or a :ref:`Dictionary<class_Dictionary>` in the form: +Changes the RPC configuration for the given ``method``. ``config`` should either be ``null`` to disable the feature (as by default), or a :ref:`Dictionary<class_Dictionary>` containing the following entries: -:: +- ``rpc_mode``: see :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>`; - { - rpc_mode = MultiplayerAPI.RPCMode, - transfer_mode = MultiplayerPeer.TransferMode, - call_local = false, - channel = 0, - } +- ``transfer_mode``: see :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`; -See :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` and :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>`. An alternative is annotating methods and properties with the corresponding :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` annotation (``@rpc("any_peer")``, ``@rpc("authority")``). By default, methods are not exposed to networking (and RPCs). +- ``call_local``: if ``true``, the method will also be called locally; + +- ``channel``: an :ref:`int<class_int>` representing the channel to send the RPC on. + +\ **Note:** In GDScript, this method corresponds to the :ref:`@GDScript.@rpc<class_@GDScript_annotation_@rpc>` annotation, with various parameters passed (``@rpc(any)``, ``@rpc(authority)``...). See also the :doc:`high-level multiplayer <../tutorials/networking/high_level_multiplayer>` tutorial. .. rst-class:: classref-item-separator @@ -2436,9 +2785,11 @@ See :ref:`RPCMode<enum_MultiplayerAPI_RPCMode>` and :ref:`TransferMode<enum_Mult .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **rpc_id** **(** :ref:`int<class_int>` peer_id, :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Error<enum_@GlobalScope_Error>` **rpc_id**\ (\ peer_id\: :ref:`int<class_int>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Node_method_rpc_id>` -Sends a :ref:`rpc<class_Node_method_rpc>` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer<class_MultiplayerPeer_method_set_target_peer>`). Returns ``null``. +Sends a :ref:`rpc<class_Node_method_rpc>` to a specific peer identified by ``peer_id`` (see :ref:`MultiplayerPeer.set_target_peer<class_MultiplayerPeer_method_set_target_peer>`). + +May return :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the call is successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the arguments passed in the ``method`` do not match, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if the node's :ref:`multiplayer<class_Node_property_multiplayer>` cannot be fetched (such as when the node is not inside the tree), :ref:`@GlobalScope.ERR_CONNECTION_ERROR<class_@GlobalScope_constant_ERR_CONNECTION_ERROR>` if :ref:`multiplayer<class_Node_property_multiplayer>`'s connection is not available. .. rst-class:: classref-item-separator @@ -2448,7 +2799,7 @@ Sends a :ref:`rpc<class_Node_method_rpc>` to a specific peer identified by ``pee .. rst-class:: classref-method -void **set_deferred_thread_group** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set_deferred_thread_group**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Node_method_set_deferred_thread_group>` Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thread_group>`, but for setting properties. @@ -2460,9 +2811,9 @@ Similar to :ref:`call_deferred_thread_group<class_Node_method_call_deferred_thre .. rst-class:: classref-method -void **set_display_folded** **(** :ref:`bool<class_bool>` fold **)** +|void| **set_display_folded**\ (\ fold\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_display_folded>` -Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling. +If set to ``true``, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_displayed_folded<class_Node_method_is_displayed_folded>`. .. rst-class:: classref-item-separator @@ -2472,9 +2823,9 @@ Sets the folded state of the node in the Scene dock. This method is only intende .. rst-class:: classref-method -void **set_editable_instance** **(** :ref:`Node<class_Node>` node, :ref:`bool<class_bool>` is_editable **)** +|void| **set_editable_instance**\ (\ node\: :ref:`Node<class_Node>`, is_editable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_editable_instance>` -Sets the editable children state of ``node`` relative to this node. This method is only intended for use with editor tooling. +Set to ``true`` to allow all nodes owned by ``node`` to be available, and editable, in the Scene dock, even if their :ref:`owner<class_Node_property_owner>` is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also :ref:`is_editable_instance<class_Node_method_is_editable_instance>`. .. rst-class:: classref-item-separator @@ -2484,11 +2835,13 @@ Sets the editable children state of ``node`` relative to this node. This method .. rst-class:: classref-method -void **set_multiplayer_authority** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` recursive=true **)** +|void| **set_multiplayer_authority**\ (\ id\: :ref:`int<class_int>`, recursive\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Node_method_set_multiplayer_authority>` + +Sets the node's multiplayer authority to the peer with the given peer ``id``. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with :ref:`rpc_config<class_Node_method_rpc_config>` and the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. -Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with :ref:`rpc_config<class_Node_method_rpc_config>` and the :ref:`MultiplayerAPI<class_MultiplayerAPI>`. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If ``recursive``, the given peer is recursively set as the authority for all children of this node. +If ``recursive`` is ``true``, the given peer is recursively set as the authority for all children of this node. -\ **Warning:** This does **not** automatically replicate the new authority to other peers. It is developer's responsibility to do so. You can propagate the information about the new authority using :ref:`MultiplayerSpawner.spawn_function<class_MultiplayerSpawner_property_spawn_function>`, an RPC, or using a :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. +\ **Warning:** This does **not** automatically replicate the new authority to other peers. It is the developer's responsibility to do so. You may replicate the new authority's information using :ref:`MultiplayerSpawner.spawn_function<class_MultiplayerSpawner_property_spawn_function>`, an RPC, or a :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. Furthermore, the parent's authority does **not** propagate to newly added children. .. rst-class:: classref-item-separator @@ -2498,9 +2851,11 @@ Sets the node's multiplayer authority to the peer with the given peer ID. The mu .. rst-class:: classref-method -void **set_physics_process** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_physics_process**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_physics_process>` -Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` to change) interval (and the :ref:`_physics_process<class_Node_method__physics_process>` callback will be called if exists). Enabled automatically if :ref:`_physics_process<class_Node_method__physics_process>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +If set to ``true``, enables physics (fixed framerate) processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_PHYSICS_PROCESS>` at a fixed (usually 60 FPS, see :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` to change) interval (and the :ref:`_physics_process<class_Node_private_method__physics_process>` callback will be called if it exists). + +\ **Note:** If :ref:`_physics_process<class_Node_private_method__physics_process>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. .. rst-class:: classref-item-separator @@ -2510,11 +2865,11 @@ Enables or disables physics (i.e. fixed framerate) processing. When a node is be .. rst-class:: classref-method -void **set_physics_process_internal** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_physics_process_internal**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_physics_process_internal>` -Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process<class_Node_method__physics_process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process<class_Node_method_set_physics_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior. +If set to ``true``, enables internal physics for this node. Internal physics processing happens in isolation from the normal :ref:`_physics_process<class_Node_private_method__physics_process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (:ref:`set_physics_process<class_Node_method_set_physics_process>`). -\ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported. +\ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. .. rst-class:: classref-item-separator @@ -2524,9 +2879,13 @@ Enables or disables internal physics for this node. Internal physics processing .. rst-class:: classref-method -void **set_process** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process>` + +If set to ``true``, enables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` on every drawn frame (and the :ref:`_process<class_Node_private_method__process>` callback will be called if it exists). -Enables or disables processing. When a node is being processed, it will receive a :ref:`NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>` on every drawn frame (and the :ref:`_process<class_Node_method__process>` callback will be called if exists). Enabled automatically if :ref:`_process<class_Node_method__process>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +\ **Note:** If :ref:`_process<class_Node_private_method__process>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. + +\ **Note:** This method only affects the :ref:`_process<class_Node_private_method__process>` callback, i.e. it has no effect on other callbacks like :ref:`_physics_process<class_Node_private_method__physics_process>`. If you want to disable all processing for the node, set :ref:`process_mode<class_Node_property_process_mode>` to :ref:`PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. .. rst-class:: classref-item-separator @@ -2536,9 +2895,11 @@ Enables or disables processing. When a node is being processed, it will receive .. rst-class:: classref-method -void **set_process_input** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process_input>` + +If set to ``true``, enables input processing. -Enables or disables input processing. This is not required for GUI controls! Enabled automatically if :ref:`_input<class_Node_method__input>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +\ **Note:** If :ref:`_input<class_Node_private_method__input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. Input processing is also already enabled for GUI controls, such as :ref:`Button<class_Button>` and :ref:`TextEdit<class_TextEdit>`. .. rst-class:: classref-item-separator @@ -2548,11 +2909,11 @@ Enables or disables input processing. This is not required for GUI controls! Ena .. rst-class:: classref-method -void **set_process_internal** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process_internal**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process_internal>` -Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process<class_Node_method__process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process<class_Node_method_set_process>`). Only useful for advanced uses to manipulate built-in nodes' behavior. +If set to ``true``, enables internal processing for this node. Internal processing happens in isolation from the normal :ref:`_process<class_Node_private_method__process>` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (:ref:`set_process<class_Node_method_set_process>`). -\ **Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported. +\ **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. .. rst-class:: classref-item-separator @@ -2562,9 +2923,11 @@ Enables or disabled internal processing for this node. Internal processing happe .. rst-class:: classref-method -void **set_process_shortcut_input** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process_shortcut_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process_shortcut_input>` -Enables shortcut processing. Enabled automatically if :ref:`_shortcut_input<class_Node_method__shortcut_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +If set to ``true``, enables shortcut processing for this node. + +\ **Note:** If :ref:`_shortcut_input<class_Node_private_method__shortcut_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. .. rst-class:: classref-item-separator @@ -2574,9 +2937,11 @@ Enables shortcut processing. Enabled automatically if :ref:`_shortcut_input<clas .. rst-class:: classref-method -void **set_process_unhandled_input** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process_unhandled_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process_unhandled_input>` + +If set to ``true``, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a :ref:`Control<class_Control>`). -Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a :ref:`Control<class_Control>`). Enabled automatically if :ref:`_unhandled_input<class_Node_method__unhandled_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +\ **Note:** If :ref:`_unhandled_input<class_Node_private_method__unhandled_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. Unhandled input processing is also already enabled for GUI controls, such as :ref:`Button<class_Button>` and :ref:`TextEdit<class_TextEdit>`. .. rst-class:: classref-item-separator @@ -2586,9 +2951,11 @@ Enables unhandled input processing. This is not required for GUI controls! It en .. rst-class:: classref-method -void **set_process_unhandled_key_input** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_process_unhandled_key_input**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_process_unhandled_key_input>` -Enables unhandled key input processing. Enabled automatically if :ref:`_unhandled_key_input<class_Node_method__unhandled_key_input>` is overridden. Any calls to this before :ref:`_ready<class_Node_method__ready>` will be ignored. +If set to ``true``, enables unhandled key input processing. + +\ **Note:** If :ref:`_unhandled_key_input<class_Node_private_method__unhandled_key_input>` is overridden, this will be automatically enabled before :ref:`_ready<class_Node_private_method__ready>` is called. .. rst-class:: classref-item-separator @@ -2598,9 +2965,9 @@ Enables unhandled key input processing. Enabled automatically if :ref:`_unhandle .. rst-class:: classref-method -void **set_scene_instance_load_placeholder** **(** :ref:`bool<class_bool>` load_placeholder **)** +|void| **set_scene_instance_load_placeholder**\ (\ load_placeholder\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node_method_set_scene_instance_load_placeholder>` -Sets whether this is an instance load placeholder. See :ref:`InstancePlaceholder<class_InstancePlaceholder>`. +If set to ``true``, the node becomes a :ref:`InstancePlaceholder<class_InstancePlaceholder>` when packed and instantiated from a :ref:`PackedScene<class_PackedScene>`. See also :ref:`get_scene_instance_load_placeholder<class_Node_method_get_scene_instance_load_placeholder>`. .. rst-class:: classref-item-separator @@ -2610,7 +2977,7 @@ Sets whether this is an instance load placeholder. See :ref:`InstancePlaceholder .. rst-class:: classref-method -void **set_thread_safe** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set_thread_safe**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Node_method_set_thread_safe>` Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for setting properties. @@ -2622,11 +2989,9 @@ Similar to :ref:`call_thread_safe<class_Node_method_call_thread_safe>`, but for .. rst-class:: classref-method -void **update_configuration_warnings** **(** **)** - -Updates the warning displayed for this node in the Scene Dock. +|void| **update_configuration_warnings**\ (\ ) :ref:`🔗<class_Node_method_update_configuration_warnings>` -Use :ref:`_get_configuration_warnings<class_Node_method__get_configuration_warnings>` to setup the warning message to display. +Refreshes the warnings displayed for this node in the Scene dock. Use :ref:`_get_configuration_warnings<class_Node_private_method__get_configuration_warnings>` to customize the warning messages to display. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -2635,3 +3000,4 @@ Use :ref:`_get_configuration_warnings<class_Node_method__get_configuration_warni .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_node2d.rst b/classes/class_node2d.rst index 345effed24b..a48128eb7cc 100644 --- a/classes/class_node2d.rst +++ b/classes/class_node2d.rst @@ -12,7 +12,7 @@ Node2D **Inherits:** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`AnimatedSprite2D<class_AnimatedSprite2D>`, :ref:`AudioListener2D<class_AudioListener2D>`, :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>`, :ref:`BackBufferCopy<class_BackBufferCopy>`, :ref:`Bone2D<class_Bone2D>`, :ref:`Camera2D<class_Camera2D>`, :ref:`CanvasGroup<class_CanvasGroup>`, :ref:`CanvasModulate<class_CanvasModulate>`, :ref:`CollisionObject2D<class_CollisionObject2D>`, :ref:`CollisionPolygon2D<class_CollisionPolygon2D>`, :ref:`CollisionShape2D<class_CollisionShape2D>`, :ref:`CPUParticles2D<class_CPUParticles2D>`, :ref:`GPUParticles2D<class_GPUParticles2D>`, :ref:`Joint2D<class_Joint2D>`, :ref:`Light2D<class_Light2D>`, :ref:`LightOccluder2D<class_LightOccluder2D>`, :ref:`Line2D<class_Line2D>`, :ref:`Marker2D<class_Marker2D>`, :ref:`MeshInstance2D<class_MeshInstance2D>`, :ref:`MultiMeshInstance2D<class_MultiMeshInstance2D>`, :ref:`NavigationLink2D<class_NavigationLink2D>`, :ref:`NavigationObstacle2D<class_NavigationObstacle2D>`, :ref:`NavigationRegion2D<class_NavigationRegion2D>`, :ref:`ParallaxLayer<class_ParallaxLayer>`, :ref:`Path2D<class_Path2D>`, :ref:`PathFollow2D<class_PathFollow2D>`, :ref:`Polygon2D<class_Polygon2D>`, :ref:`RayCast2D<class_RayCast2D>`, :ref:`RemoteTransform2D<class_RemoteTransform2D>`, :ref:`ShapeCast2D<class_ShapeCast2D>`, :ref:`Skeleton2D<class_Skeleton2D>`, :ref:`Sprite2D<class_Sprite2D>`, :ref:`TileMap<class_TileMap>`, :ref:`TouchScreenButton<class_TouchScreenButton>`, :ref:`VisibleOnScreenNotifier2D<class_VisibleOnScreenNotifier2D>` +**Inherited By:** :ref:`AnimatedSprite2D<class_AnimatedSprite2D>`, :ref:`AudioListener2D<class_AudioListener2D>`, :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>`, :ref:`BackBufferCopy<class_BackBufferCopy>`, :ref:`Bone2D<class_Bone2D>`, :ref:`Camera2D<class_Camera2D>`, :ref:`CanvasGroup<class_CanvasGroup>`, :ref:`CanvasModulate<class_CanvasModulate>`, :ref:`CollisionObject2D<class_CollisionObject2D>`, :ref:`CollisionPolygon2D<class_CollisionPolygon2D>`, :ref:`CollisionShape2D<class_CollisionShape2D>`, :ref:`CPUParticles2D<class_CPUParticles2D>`, :ref:`GPUParticles2D<class_GPUParticles2D>`, :ref:`Joint2D<class_Joint2D>`, :ref:`Light2D<class_Light2D>`, :ref:`LightOccluder2D<class_LightOccluder2D>`, :ref:`Line2D<class_Line2D>`, :ref:`Marker2D<class_Marker2D>`, :ref:`MeshInstance2D<class_MeshInstance2D>`, :ref:`MultiMeshInstance2D<class_MultiMeshInstance2D>`, :ref:`NavigationLink2D<class_NavigationLink2D>`, :ref:`NavigationObstacle2D<class_NavigationObstacle2D>`, :ref:`NavigationRegion2D<class_NavigationRegion2D>`, :ref:`Parallax2D<class_Parallax2D>`, :ref:`ParallaxLayer<class_ParallaxLayer>`, :ref:`Path2D<class_Path2D>`, :ref:`PathFollow2D<class_PathFollow2D>`, :ref:`Polygon2D<class_Polygon2D>`, :ref:`RayCast2D<class_RayCast2D>`, :ref:`RemoteTransform2D<class_RemoteTransform2D>`, :ref:`ShapeCast2D<class_ShapeCast2D>`, :ref:`Skeleton2D<class_Skeleton2D>`, :ref:`Sprite2D<class_Sprite2D>`, :ref:`TileMap<class_TileMap>`, :ref:`TileMapLayer<class_TileMapLayer>`, :ref:`TouchScreenButton<class_TouchScreenButton>`, :ref:`VisibleOnScreenNotifier2D<class_VisibleOnScreenNotifier2D>` A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. @@ -74,29 +74,29 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_scale<class_Node2D_method_apply_scale>` **(** :ref:`Vector2<class_Vector2>` ratio **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_angle_to<class_Node2D_method_get_angle_to>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_relative_transform_to_parent<class_Node2D_method_get_relative_transform_to_parent>` **(** :ref:`Node<class_Node>` parent **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_translate<class_Node2D_method_global_translate>` **(** :ref:`Vector2<class_Vector2>` offset **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`look_at<class_Node2D_method_look_at>` **(** :ref:`Vector2<class_Vector2>` point **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_local_x<class_Node2D_method_move_local_x>` **(** :ref:`float<class_float>` delta, :ref:`bool<class_bool>` scaled=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_local_y<class_Node2D_method_move_local_y>` **(** :ref:`float<class_float>` delta, :ref:`bool<class_bool>` scaled=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate<class_Node2D_method_rotate>` **(** :ref:`float<class_float>` radians **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`to_global<class_Node2D_method_to_global>` **(** :ref:`Vector2<class_Vector2>` local_point **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`to_local<class_Node2D_method_to_local>` **(** :ref:`Vector2<class_Vector2>` global_point **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`translate<class_Node2D_method_translate>` **(** :ref:`Vector2<class_Vector2>` offset **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_scale<class_Node2D_method_apply_scale>`\ (\ ratio\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_angle_to<class_Node2D_method_get_angle_to>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_relative_transform_to_parent<class_Node2D_method_get_relative_transform_to_parent>`\ (\ parent\: :ref:`Node<class_Node>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_translate<class_Node2D_method_global_translate>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`look_at<class_Node2D_method_look_at>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_local_x<class_Node2D_method_move_local_x>`\ (\ delta\: :ref:`float<class_float>`, scaled\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_local_y<class_Node2D_method_move_local_y>`\ (\ delta\: :ref:`float<class_float>`, scaled\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate<class_Node2D_method_rotate>`\ (\ radians\: :ref:`float<class_float>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`to_global<class_Node2D_method_to_global>`\ (\ local_point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`to_local<class_Node2D_method_to_local>`\ (\ global_point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`translate<class_Node2D_method_translate>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,12 +111,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **global_position** +:ref:`Vector2<class_Vector2>` **global_position** :ref:`🔗<class_Node2D_property_global_position>` .. rst-class:: classref-property-setget -- void **set_global_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_global_position** **(** **)** +- |void| **set_global_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_global_position**\ (\ ) Global position. @@ -128,12 +128,12 @@ Global position. .. rst-class:: classref-property -:ref:`float<class_float>` **global_rotation** +:ref:`float<class_float>` **global_rotation** :ref:`🔗<class_Node2D_property_global_rotation>` .. rst-class:: classref-property-setget -- void **set_global_rotation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_global_rotation** **(** **)** +- |void| **set_global_rotation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_global_rotation**\ (\ ) Global rotation in radians. @@ -145,12 +145,12 @@ Global rotation in radians. .. rst-class:: classref-property -:ref:`float<class_float>` **global_rotation_degrees** +:ref:`float<class_float>` **global_rotation_degrees** :ref:`🔗<class_Node2D_property_global_rotation_degrees>` .. rst-class:: classref-property-setget -- void **set_global_rotation_degrees** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_global_rotation_degrees** **(** **)** +- |void| **set_global_rotation_degrees**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_global_rotation_degrees**\ (\ ) Helper property to access :ref:`global_rotation<class_Node2D_property_global_rotation>` in degrees instead of radians. @@ -162,12 +162,12 @@ Helper property to access :ref:`global_rotation<class_Node2D_property_global_rot .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **global_scale** +:ref:`Vector2<class_Vector2>` **global_scale** :ref:`🔗<class_Node2D_property_global_scale>` .. rst-class:: classref-property-setget -- void **set_global_scale** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_global_scale** **(** **)** +- |void| **set_global_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_global_scale**\ (\ ) Global scale. @@ -179,12 +179,12 @@ Global scale. .. rst-class:: classref-property -:ref:`float<class_float>` **global_skew** +:ref:`float<class_float>` **global_skew** :ref:`🔗<class_Node2D_property_global_skew>` .. rst-class:: classref-property-setget -- void **set_global_skew** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_global_skew** **(** **)** +- |void| **set_global_skew**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_global_skew**\ (\ ) Global skew in radians. @@ -196,12 +196,12 @@ Global skew in radians. .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **global_transform** +:ref:`Transform2D<class_Transform2D>` **global_transform** :ref:`🔗<class_Node2D_property_global_transform>` .. rst-class:: classref-property-setget -- void **set_global_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_global_transform** **(** **)** +- |void| **set_global_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_global_transform**\ (\ ) Global :ref:`Transform2D<class_Transform2D>`. @@ -213,12 +213,12 @@ Global :ref:`Transform2D<class_Transform2D>`. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_Node2D_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) Position, relative to the node's parent. @@ -230,12 +230,12 @@ Position, relative to the node's parent. .. rst-class:: classref-property -:ref:`float<class_float>` **rotation** = ``0.0`` +:ref:`float<class_float>` **rotation** = ``0.0`` :ref:`🔗<class_Node2D_property_rotation>` .. rst-class:: classref-property-setget -- void **set_rotation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_rotation** **(** **)** +- |void| **set_rotation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_rotation**\ (\ ) Rotation in radians, relative to the node's parent. @@ -249,12 +249,12 @@ Rotation in radians, relative to the node's parent. .. rst-class:: classref-property -:ref:`float<class_float>` **rotation_degrees** +:ref:`float<class_float>` **rotation_degrees** :ref:`🔗<class_Node2D_property_rotation_degrees>` .. rst-class:: classref-property-setget -- void **set_rotation_degrees** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_rotation_degrees** **(** **)** +- |void| **set_rotation_degrees**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_rotation_degrees**\ (\ ) Helper property to access :ref:`rotation<class_Node2D_property_rotation>` in degrees instead of radians. @@ -266,12 +266,12 @@ Helper property to access :ref:`rotation<class_Node2D_property_rotation>` in deg .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scale** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **scale** = ``Vector2(1, 1)`` :ref:`🔗<class_Node2D_property_scale>` .. rst-class:: classref-property-setget -- void **set_scale** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_scale** **(** **)** +- |void| **set_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scale**\ (\ ) The node's scale. Unscaled value: ``(1, 1)``. @@ -285,12 +285,12 @@ The node's scale. Unscaled value: ``(1, 1)``. .. rst-class:: classref-property -:ref:`float<class_float>` **skew** = ``0.0`` +:ref:`float<class_float>` **skew** = ``0.0`` :ref:`🔗<class_Node2D_property_skew>` .. rst-class:: classref-property-setget -- void **set_skew** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_skew** **(** **)** +- |void| **set_skew**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_skew**\ (\ ) Slants the node. @@ -304,12 +304,12 @@ Slants the node. .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **transform** +:ref:`Transform2D<class_Transform2D>` **transform** :ref:`🔗<class_Node2D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_transform**\ (\ ) Local :ref:`Transform2D<class_Transform2D>`. @@ -326,7 +326,7 @@ Method Descriptions .. rst-class:: classref-method -void **apply_scale** **(** :ref:`Vector2<class_Vector2>` ratio **)** +|void| **apply_scale**\ (\ ratio\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Node2D_method_apply_scale>` Multiplies the current scale by the ``ratio`` vector. @@ -338,7 +338,7 @@ Multiplies the current scale by the ``ratio`` vector. .. rst-class:: classref-method -:ref:`float<class_float>` **get_angle_to** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`float<class_float>` **get_angle_to**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Node2D_method_get_angle_to>` Returns the angle between the node and the ``point`` in radians. @@ -352,7 +352,7 @@ Returns the angle between the node and the ``point`` in radians. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_relative_transform_to_parent** **(** :ref:`Node<class_Node>` parent **)** |const| +:ref:`Transform2D<class_Transform2D>` **get_relative_transform_to_parent**\ (\ parent\: :ref:`Node<class_Node>`\ ) |const| :ref:`🔗<class_Node2D_method_get_relative_transform_to_parent>` Returns the :ref:`Transform2D<class_Transform2D>` relative to this node's parent. @@ -364,7 +364,7 @@ Returns the :ref:`Transform2D<class_Transform2D>` relative to this node's parent .. rst-class:: classref-method -void **global_translate** **(** :ref:`Vector2<class_Vector2>` offset **)** +|void| **global_translate**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Node2D_method_global_translate>` Adds the ``offset`` vector to the node's global position. @@ -376,9 +376,11 @@ Adds the ``offset`` vector to the node's global position. .. rst-class:: classref-method -void **look_at** **(** :ref:`Vector2<class_Vector2>` point **)** +|void| **look_at**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Node2D_method_look_at>` -Rotates the node so it points towards the ``point``, which is expected to use global coordinates. +Rotates the node so that its local +X axis points towards the ``point``, which is expected to use global coordinates. + +\ ``point`` should not be the same as the node's position, otherwise the node always looks to the right. .. rst-class:: classref-item-separator @@ -388,9 +390,9 @@ Rotates the node so it points towards the ``point``, which is expected to use gl .. rst-class:: classref-method -void **move_local_x** **(** :ref:`float<class_float>` delta, :ref:`bool<class_bool>` scaled=false **)** +|void| **move_local_x**\ (\ delta\: :ref:`float<class_float>`, scaled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node2D_method_move_local_x>` -Applies a local translation on the node's X axis based on the :ref:`Node._process<class_Node_method__process>`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +Applies a local translation on the node's X axis based on the :ref:`Node._process<class_Node_private_method__process>`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. .. rst-class:: classref-item-separator @@ -400,9 +402,9 @@ Applies a local translation on the node's X axis based on the :ref:`Node._proces .. rst-class:: classref-method -void **move_local_y** **(** :ref:`float<class_float>` delta, :ref:`bool<class_bool>` scaled=false **)** +|void| **move_local_y**\ (\ delta\: :ref:`float<class_float>`, scaled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node2D_method_move_local_y>` -Applies a local translation on the node's Y axis based on the :ref:`Node._process<class_Node_method__process>`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. +Applies a local translation on the node's Y axis based on the :ref:`Node._process<class_Node_private_method__process>`'s ``delta``. If ``scaled`` is ``false``, normalizes the movement. .. rst-class:: classref-item-separator @@ -412,7 +414,7 @@ Applies a local translation on the node's Y axis based on the :ref:`Node._proces .. rst-class:: classref-method -void **rotate** **(** :ref:`float<class_float>` radians **)** +|void| **rotate**\ (\ radians\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node2D_method_rotate>` Applies a rotation to the node, in radians, starting from its current rotation. @@ -424,7 +426,7 @@ Applies a rotation to the node, in radians, starting from its current rotation. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **to_global** **(** :ref:`Vector2<class_Vector2>` local_point **)** |const| +:ref:`Vector2<class_Vector2>` **to_global**\ (\ local_point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Node2D_method_to_global>` Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the **Node2D** it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position. @@ -436,7 +438,7 @@ Transforms the provided local position into a position in global coordinate spac .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **to_local** **(** :ref:`Vector2<class_Vector2>` global_point **)** |const| +:ref:`Vector2<class_Vector2>` **to_local**\ (\ global_point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Node2D_method_to_local>` Transforms the provided global position into a position in local coordinate space. The output will be local relative to the **Node2D** it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent. @@ -448,7 +450,7 @@ Transforms the provided global position into a position in local coordinate spac .. rst-class:: classref-method -void **translate** **(** :ref:`Vector2<class_Vector2>` offset **)** +|void| **translate**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Node2D_method_translate>` Translates the node by the given ``offset`` in local coordinates. @@ -459,3 +461,4 @@ Translates the node by the given ``offset`` in local coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_node3d.rst b/classes/class_node3d.rst index 4362c132fa9..f8a6153a0cc 100644 --- a/classes/class_node3d.rst +++ b/classes/class_node3d.rst @@ -12,7 +12,7 @@ Node3D **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`AudioListener3D<class_AudioListener3D>`, :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`, :ref:`BoneAttachment3D<class_BoneAttachment3D>`, :ref:`Camera3D<class_Camera3D>`, :ref:`CollisionObject3D<class_CollisionObject3D>`, :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`, :ref:`CollisionShape3D<class_CollisionShape3D>`, :ref:`GridMap<class_GridMap>`, :ref:`ImporterMeshInstance3D<class_ImporterMeshInstance3D>`, :ref:`Joint3D<class_Joint3D>`, :ref:`LightmapProbe<class_LightmapProbe>`, :ref:`Marker3D<class_Marker3D>`, :ref:`NavigationLink3D<class_NavigationLink3D>`, :ref:`NavigationObstacle3D<class_NavigationObstacle3D>`, :ref:`NavigationRegion3D<class_NavigationRegion3D>`, :ref:`OccluderInstance3D<class_OccluderInstance3D>`, :ref:`OpenXRHand<class_OpenXRHand>`, :ref:`Path3D<class_Path3D>`, :ref:`PathFollow3D<class_PathFollow3D>`, :ref:`RayCast3D<class_RayCast3D>`, :ref:`RemoteTransform3D<class_RemoteTransform3D>`, :ref:`ShapeCast3D<class_ShapeCast3D>`, :ref:`Skeleton3D<class_Skeleton3D>`, :ref:`SpringArm3D<class_SpringArm3D>`, :ref:`VehicleWheel3D<class_VehicleWheel3D>`, :ref:`VisualInstance3D<class_VisualInstance3D>`, :ref:`XRNode3D<class_XRNode3D>`, :ref:`XROrigin3D<class_XROrigin3D>` +**Inherited By:** :ref:`AudioListener3D<class_AudioListener3D>`, :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>`, :ref:`BoneAttachment3D<class_BoneAttachment3D>`, :ref:`Camera3D<class_Camera3D>`, :ref:`CollisionObject3D<class_CollisionObject3D>`, :ref:`CollisionPolygon3D<class_CollisionPolygon3D>`, :ref:`CollisionShape3D<class_CollisionShape3D>`, :ref:`GridMap<class_GridMap>`, :ref:`ImporterMeshInstance3D<class_ImporterMeshInstance3D>`, :ref:`Joint3D<class_Joint3D>`, :ref:`LightmapProbe<class_LightmapProbe>`, :ref:`Marker3D<class_Marker3D>`, :ref:`NavigationLink3D<class_NavigationLink3D>`, :ref:`NavigationObstacle3D<class_NavigationObstacle3D>`, :ref:`NavigationRegion3D<class_NavigationRegion3D>`, :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>`, :ref:`OpenXRHand<class_OpenXRHand>`, :ref:`Path3D<class_Path3D>`, :ref:`PathFollow3D<class_PathFollow3D>`, :ref:`RayCast3D<class_RayCast3D>`, :ref:`RemoteTransform3D<class_RemoteTransform3D>`, :ref:`ShapeCast3D<class_ShapeCast3D>`, :ref:`Skeleton3D<class_Skeleton3D>`, :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`, :ref:`SpringArm3D<class_SpringArm3D>`, :ref:`VehicleWheel3D<class_VehicleWheel3D>`, :ref:`VisualInstance3D<class_VisualInstance3D>`, :ref:`XRFaceModifier3D<class_XRFaceModifier3D>`, :ref:`XRNode3D<class_XRNode3D>`, :ref:`XROrigin3D<class_XROrigin3D>` Most basic 3D game object, parent of all 3D-related nodes. @@ -21,7 +21,7 @@ Most basic 3D game object, parent of all 3D-related nodes. Description ----------- -Most basic 3D game object, with a :ref:`Transform3D<class_Transform3D>` and visibility settings. All other 3D game objects inherit from Node3D. Use **Node3D** as a parent node to move, scale, rotate and show/hide children in a 3D project. +Most basic 3D game object, with a :ref:`Transform3D<class_Transform3D>` and visibility settings. All other 3D game objects inherit from **Node3D**. Use **Node3D** 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 **Node3D** object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the **Node3D**'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the **Node3D** object itself is referred to as object-local coordinate system. @@ -49,6 +49,8 @@ Properties +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Basis<class_Basis>` | :ref:`basis<class_Node3D_property_basis>` | | +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`global_basis<class_Node3D_property_global_basis>` | | + +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`global_position<class_Node3D_property_global_position>` | | +-------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`global_rotation<class_Node3D_property_global_rotation>` | | @@ -88,79 +90,79 @@ Methods .. table:: :widths: auto - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_gizmo<class_Node3D_method_add_gizmo>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_gizmos<class_Node3D_method_clear_gizmos>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_subgizmo_selection<class_Node3D_method_clear_subgizmo_selection>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_transform<class_Node3D_method_force_update_transform>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3DGizmo[]<class_Node3DGizmo>` | :ref:`get_gizmos<class_Node3D_method_get_gizmos>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D<class_Node3D>` | :ref:`get_parent_node_3d<class_Node3D_method_get_parent_node_3d>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World3D<class_World3D>` | :ref:`get_world_3d<class_Node3D_method_get_world_3d>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_rotate<class_Node3D_method_global_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_scale<class_Node3D_method_global_scale>` **(** :ref:`Vector3<class_Vector3>` scale **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_translate<class_Node3D_method_global_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide<class_Node3D_method_hide>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_Node3D_method_is_local_transform_notification_enabled>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_scale_disabled<class_Node3D_method_is_scale_disabled>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_Node3D_method_is_transform_notification_enabled>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` **(** **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`look_at<class_Node3D_method_look_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`look_at_from_position<class_Node3D_method_look_at_from_position>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`orthonormalize<class_Node3D_method_orthonormalize>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate<class_Node3D_method_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_object_local<class_Node3D_method_rotate_object_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_x<class_Node3D_method_rotate_x>` **(** :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_y<class_Node3D_method_rotate_y>` **(** :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rotate_z<class_Node3D_method_rotate_z>` **(** :ref:`float<class_float>` angle **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scale_object_local<class_Node3D_method_scale_object_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_disable_scale<class_Node3D_method_set_disable_scale>` **(** :ref:`bool<class_bool>` disable **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_identity<class_Node3D_method_set_identity>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ignore_transform_notification<class_Node3D_method_set_ignore_transform_notification>` **(** :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>` **(** :ref:`bool<class_bool>` enable **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>` **(** :ref:`bool<class_bool>` enable **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_subgizmo_selection<class_Node3D_method_set_subgizmo_selection>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show<class_Node3D_method_show>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`to_global<class_Node3D_method_to_global>` **(** :ref:`Vector3<class_Vector3>` local_point **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`to_local<class_Node3D_method_to_local>` **(** :ref:`Vector3<class_Vector3>` global_point **)** |const| | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`translate<class_Node3D_method_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`translate_object_local<class_Node3D_method_translate_object_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_gizmos<class_Node3D_method_update_gizmos>` **(** **)** | - +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_gizmo<class_Node3D_method_add_gizmo>`\ (\ gizmo\: :ref:`Node3DGizmo<class_Node3DGizmo>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_gizmos<class_Node3D_method_clear_gizmos>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_subgizmo_selection<class_Node3D_method_clear_subgizmo_selection>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_transform<class_Node3D_method_force_update_transform>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node3DGizmo<class_Node3DGizmo>`\] | :ref:`get_gizmos<class_Node3D_method_get_gizmos>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D<class_Node3D>` | :ref:`get_parent_node_3d<class_Node3D_method_get_parent_node_3d>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World3D<class_World3D>` | :ref:`get_world_3d<class_Node3D_method_get_world_3d>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_rotate<class_Node3D_method_global_rotate>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_scale<class_Node3D_method_global_scale>`\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_translate<class_Node3D_method_global_translate>`\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hide<class_Node3D_method_hide>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_Node3D_method_is_local_transform_notification_enabled>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_scale_disabled<class_Node3D_method_is_scale_disabled>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_Node3D_method_is_transform_notification_enabled>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>`\ (\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`look_at<class_Node3D_method_look_at>`\ (\ target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`look_at_from_position<class_Node3D_method_look_at_from_position>`\ (\ position\: :ref:`Vector3<class_Vector3>`, target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`orthonormalize<class_Node3D_method_orthonormalize>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate<class_Node3D_method_rotate>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_object_local<class_Node3D_method_rotate_object_local>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_x<class_Node3D_method_rotate_x>`\ (\ angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_y<class_Node3D_method_rotate_y>`\ (\ angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rotate_z<class_Node3D_method_rotate_z>`\ (\ angle\: :ref:`float<class_float>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scale_object_local<class_Node3D_method_scale_object_local>`\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_scale<class_Node3D_method_set_disable_scale>`\ (\ disable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_identity<class_Node3D_method_set_identity>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ignore_transform_notification<class_Node3D_method_set_ignore_transform_notification>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_subgizmo_selection<class_Node3D_method_set_subgizmo_selection>`\ (\ gizmo\: :ref:`Node3DGizmo<class_Node3DGizmo>`, id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show<class_Node3D_method_show>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`to_global<class_Node3D_method_to_global>`\ (\ local_point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`to_local<class_Node3D_method_to_local>`\ (\ global_point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`translate<class_Node3D_method_translate>`\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`translate_object_local<class_Node3D_method_translate_object_local>`\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_gizmos<class_Node3D_method_update_gizmos>`\ (\ ) | + +--------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -175,7 +177,7 @@ Signals .. rst-class:: classref-signal -**visibility_changed** **(** **)** +**visibility_changed**\ (\ ) :ref:`🔗<class_Node3D_signal_visibility_changed>` Emitted when node visibility changes. @@ -192,7 +194,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **RotationEditMode**: +enum **RotationEditMode**: :ref:`🔗<enum_Node3D_RotationEditMode>` .. _class_Node3D_constant_ROTATION_EDIT_MODE_EULER: @@ -231,9 +233,9 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` +**NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` :ref:`🔗<class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED>` -Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. +**Node3D** nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform. In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED<class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED>` to work, users first need to ask for it, with :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>`. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. @@ -241,33 +243,33 @@ In order for :ref:`NOTIFICATION_TRANSFORM_CHANGED<class_Node3D_constant_NOTIFICA .. rst-class:: classref-constant -**NOTIFICATION_ENTER_WORLD** = ``41`` +**NOTIFICATION_ENTER_WORLD** = ``41`` :ref:`🔗<class_Node3D_constant_NOTIFICATION_ENTER_WORLD>` -Node3D nodes receives this notification when they are registered to new :ref:`World3D<class_World3D>` resource. +**Node3D** nodes receive this notification when they are registered to new :ref:`World3D<class_World3D>` resource. .. _class_Node3D_constant_NOTIFICATION_EXIT_WORLD: .. rst-class:: classref-constant -**NOTIFICATION_EXIT_WORLD** = ``42`` +**NOTIFICATION_EXIT_WORLD** = ``42`` :ref:`🔗<class_Node3D_constant_NOTIFICATION_EXIT_WORLD>` -Node3D nodes receives this notification when they are unregistered from current :ref:`World3D<class_World3D>` resource. +**Node3D** nodes receive this notification when they are unregistered from current :ref:`World3D<class_World3D>` resource. .. _class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_VISIBILITY_CHANGED** = ``43`` +**NOTIFICATION_VISIBILITY_CHANGED** = ``43`` :ref:`🔗<class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED>` -Node3D nodes receives this notification when their visibility changes. +**Node3D** nodes receive this notification when their visibility changes. .. _class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: .. rst-class:: classref-constant -**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``44`` +**NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``44`` :ref:`🔗<class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED>` -Node3D nodes receives this notification when their local transform changes. This is not received when the transform of a parent node is changed. +**Node3D** nodes receive this notification when their local transform changes. This is not received when the transform of a parent node is changed. In order for :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED<class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED>` to work, users first need to ask for it, with :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>`. @@ -284,14 +286,31 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Basis<class_Basis>` **basis** +:ref:`Basis<class_Basis>` **basis** :ref:`🔗<class_Node3D_property_basis>` + +.. rst-class:: classref-property-setget + +- |void| **set_basis**\ (\ value\: :ref:`Basis<class_Basis>`\ ) +- :ref:`Basis<class_Basis>` **get_basis**\ (\ ) + +Basis of the :ref:`transform<class_Node3D_property_transform>` property. Represents the rotation, scale, and shear of this node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node3D_property_global_basis: + +.. rst-class:: classref-property + +:ref:`Basis<class_Basis>` **global_basis** :ref:`🔗<class_Node3D_property_global_basis>` .. rst-class:: classref-property-setget -- void **set_basis** **(** :ref:`Basis<class_Basis>` value **)** -- :ref:`Basis<class_Basis>` **get_basis** **(** **)** +- |void| **set_global_basis**\ (\ value\: :ref:`Basis<class_Basis>`\ ) +- :ref:`Basis<class_Basis>` **get_global_basis**\ (\ ) -Direct access to the 3x3 basis of the :ref:`Transform3D<class_Transform3D>` property. +Global basis of this node. This is equivalent to ``global_transform.basis``. .. rst-class:: classref-item-separator @@ -301,12 +320,12 @@ Direct access to the 3x3 basis of the :ref:`Transform3D<class_Transform3D>` prop .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **global_position** +:ref:`Vector3<class_Vector3>` **global_position** :ref:`🔗<class_Node3D_property_global_position>` .. rst-class:: classref-property-setget -- void **set_global_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_global_position** **(** **)** +- |void| **set_global_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_global_position**\ (\ ) Global position of this node. This is equivalent to ``global_transform.origin``. @@ -318,12 +337,12 @@ Global position of this node. This is equivalent to ``global_transform.origin``. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **global_rotation** +:ref:`Vector3<class_Vector3>` **global_rotation** :ref:`🔗<class_Node3D_property_global_rotation>` .. rst-class:: classref-property-setget -- void **set_global_rotation** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_global_rotation** **(** **)** +- |void| **set_global_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_global_rotation**\ (\ ) Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). @@ -337,12 +356,12 @@ Rotation part of the global transformation in radians, specified in terms of YXZ .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **global_rotation_degrees** +:ref:`Vector3<class_Vector3>` **global_rotation_degrees** :ref:`🔗<class_Node3D_property_global_rotation_degrees>` .. rst-class:: classref-property-setget -- void **set_global_rotation_degrees** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_global_rotation_degrees** **(** **)** +- |void| **set_global_rotation_degrees**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_global_rotation_degrees**\ (\ ) Helper property to access :ref:`global_rotation<class_Node3D_property_global_rotation>` in degrees instead of radians. @@ -354,12 +373,12 @@ Helper property to access :ref:`global_rotation<class_Node3D_property_global_rot .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **global_transform** +:ref:`Transform3D<class_Transform3D>` **global_transform** :ref:`🔗<class_Node3D_property_global_transform>` .. rst-class:: classref-property-setget -- void **set_global_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_global_transform** **(** **)** +- |void| **set_global_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_global_transform**\ (\ ) World3D space (global) :ref:`Transform3D<class_Transform3D>` of this node. @@ -371,12 +390,12 @@ World3D space (global) :ref:`Transform3D<class_Transform3D>` of this node. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Node3D_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_position**\ (\ ) Local position or translation of this node relative to the parent. This is equivalent to ``transform.origin``. @@ -388,12 +407,12 @@ Local position or translation of this node relative to the parent. This is equiv .. rst-class:: classref-property -:ref:`Quaternion<class_Quaternion>` **quaternion** +:ref:`Quaternion<class_Quaternion>` **quaternion** :ref:`🔗<class_Node3D_property_quaternion>` .. rst-class:: classref-property-setget -- void **set_quaternion** **(** :ref:`Quaternion<class_Quaternion>` value **)** -- :ref:`Quaternion<class_Quaternion>` **get_quaternion** **(** **)** +- |void| **set_quaternion**\ (\ value\: :ref:`Quaternion<class_Quaternion>`\ ) +- :ref:`Quaternion<class_Quaternion>` **get_quaternion**\ (\ ) Access to the node rotation as a :ref:`Quaternion<class_Quaternion>`. This property is ideal for tweening complex rotations. @@ -405,14 +424,14 @@ Access to the node rotation as a :ref:`Quaternion<class_Quaternion>`. This prope .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **rotation** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Node3D_property_rotation>` .. rst-class:: classref-property-setget -- void **set_rotation** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_rotation** **(** **)** +- |void| **set_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_rotation**\ (\ ) -Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the :ref:`rotation_order<class_Node3D_property_rotation_order>` property. +Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the :ref:`rotation_order<class_Node3D_property_rotation_order>` property. \ **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3<class_Vector3>` data structure not because the rotation is a vector, but only because :ref:`Vector3<class_Vector3>` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. @@ -426,12 +445,12 @@ Rotation part of the local transformation in radians, specified in terms of Eule .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **rotation_degrees** +:ref:`Vector3<class_Vector3>` **rotation_degrees** :ref:`🔗<class_Node3D_property_rotation_degrees>` .. rst-class:: classref-property-setget -- void **set_rotation_degrees** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_rotation_degrees** **(** **)** +- |void| **set_rotation_degrees**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_rotation_degrees**\ (\ ) Helper property to access :ref:`rotation<class_Node3D_property_rotation>` in degrees instead of radians. @@ -443,12 +462,12 @@ Helper property to access :ref:`rotation<class_Node3D_property_rotation>` in deg .. rst-class:: classref-property -:ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **rotation_edit_mode** = ``0`` +:ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **rotation_edit_mode** = ``0`` :ref:`🔗<class_Node3D_property_rotation_edit_mode>` .. rst-class:: classref-property-setget -- void **set_rotation_edit_mode** **(** :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` value **)** -- :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **get_rotation_edit_mode** **(** **)** +- |void| **set_rotation_edit_mode**\ (\ value\: :ref:`RotationEditMode<enum_Node3D_RotationEditMode>`\ ) +- :ref:`RotationEditMode<enum_Node3D_RotationEditMode>` **get_rotation_edit_mode**\ (\ ) Specify how rotation (and scale) will be presented in the editor. @@ -460,12 +479,12 @@ Specify how rotation (and scale) will be presented in the editor. .. rst-class:: classref-property -:ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **rotation_order** = ``2`` +:ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **rotation_order** = ``2`` :ref:`🔗<class_Node3D_property_rotation_order>` .. rst-class:: classref-property-setget -- void **set_rotation_order** **(** :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` value **)** -- :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **get_rotation_order** **(** **)** +- |void| **set_rotation_order**\ (\ value\: :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>`\ ) +- :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` **get_rotation_order**\ (\ ) Specify the axis rotation order of the :ref:`rotation<class_Node3D_property_rotation>` property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. @@ -477,12 +496,12 @@ Specify the axis rotation order of the :ref:`rotation<class_Node3D_property_rota .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)`` +:ref:`Vector3<class_Vector3>` **scale** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_Node3D_property_scale>` .. rst-class:: classref-property-setget -- void **set_scale** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_scale** **(** **)** +- |void| **set_scale**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_scale**\ (\ ) Scale part of the local transformation. @@ -498,12 +517,12 @@ Scale part of the local transformation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **top_level** = ``false`` +:ref:`bool<class_bool>` **top_level** = ``false`` :ref:`🔗<class_Node3D_property_top_level>` .. rst-class:: classref-property-setget -- void **set_as_top_level** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_set_as_top_level** **(** **)** +- |void| **set_as_top_level**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_set_as_top_level**\ (\ ) If ``true``, the node will not inherit its transformations from its parent. Node transformations are only in global space. @@ -515,12 +534,12 @@ If ``true``, the node will not inherit its transformations from its parent. Node .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_Node3D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_transform**\ (\ ) Local space :ref:`Transform3D<class_Transform3D>` of this node, with respect to the parent node. @@ -532,12 +551,12 @@ Local space :ref:`Transform3D<class_Transform3D>` of this node, with respect to .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **visibility_parent** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **visibility_parent** = ``NodePath("")`` :ref:`🔗<class_Node3D_property_visibility_parent>` .. rst-class:: classref-property-setget -- void **set_visibility_parent** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_visibility_parent** **(** **)** +- |void| **set_visibility_parent**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_visibility_parent**\ (\ ) Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own :ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>`. Nodes hidden via the :ref:`visible<class_Node3D_property_visible>` property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account. @@ -549,12 +568,12 @@ Defines the visibility range parent for this node and its subtree. The visibilit .. rst-class:: classref-property -:ref:`bool<class_bool>` **visible** = ``true`` +:ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_Node3D_property_visible>` .. rst-class:: classref-property-setget -- void **set_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_visible** **(** **)** +- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_visible**\ (\ ) If ``true``, this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` must return ``true``). @@ -571,9 +590,11 @@ Method Descriptions .. rst-class:: classref-method -void **add_gizmo** **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)** +|void| **add_gizmo**\ (\ gizmo\: :ref:`Node3DGizmo<class_Node3DGizmo>`\ ) :ref:`🔗<class_Node3D_method_add_gizmo>` + +Attach an editor gizmo to this **Node3D**. -Attach a gizmo to this ``Node3D``. +\ **Note:** The gizmo object would typically be an instance of :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, but the argument type is kept generic to avoid creating a dependency on editor classes in **Node3D**. .. rst-class:: classref-item-separator @@ -583,9 +604,9 @@ Attach a gizmo to this ``Node3D``. .. rst-class:: classref-method -void **clear_gizmos** **(** **)** +|void| **clear_gizmos**\ (\ ) :ref:`🔗<class_Node3D_method_clear_gizmos>` -Clear all gizmos attached to this ``Node3D``. +Clear all gizmos attached to this **Node3D**. .. rst-class:: classref-item-separator @@ -595,7 +616,7 @@ Clear all gizmos attached to this ``Node3D``. .. rst-class:: classref-method -void **clear_subgizmo_selection** **(** **)** +|void| **clear_subgizmo_selection**\ (\ ) :ref:`🔗<class_Node3D_method_clear_subgizmo_selection>` Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change. @@ -607,7 +628,7 @@ Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs .. rst-class:: classref-method -void **force_update_transform** **(** **)** +|void| **force_update_transform**\ (\ ) :ref:`🔗<class_Node3D_method_force_update_transform>` Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. @@ -619,9 +640,9 @@ Forces the transform to update. Transform changes in physics are not instant for .. rst-class:: classref-method -:ref:`Node3DGizmo[]<class_Node3DGizmo>` **get_gizmos** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Node3DGizmo<class_Node3DGizmo>`\] **get_gizmos**\ (\ ) |const| :ref:`🔗<class_Node3D_method_get_gizmos>` -Returns all the gizmos attached to this ``Node3D``. +Returns all the gizmos attached to this **Node3D**. .. rst-class:: classref-item-separator @@ -631,9 +652,11 @@ Returns all the gizmos attached to this ``Node3D``. .. rst-class:: classref-method -:ref:`Node3D<class_Node3D>` **get_parent_node_3d** **(** **)** |const| +:ref:`Node3D<class_Node3D>` **get_parent_node_3d**\ (\ ) |const| :ref:`🔗<class_Node3D_method_get_parent_node_3d>` -Returns the parent **Node3D**, or an empty :ref:`Object<class_Object>` if no parent exists or parent is not of type **Node3D**. +Returns the parent **Node3D**, or ``null`` if no parent exists, the parent is not of type **Node3D**, or :ref:`top_level<class_Node3D_property_top_level>` is ``true``. + +\ **Note:** Calling this method is not equivalent to ``get_parent() as Node3D``, which does not take :ref:`top_level<class_Node3D_property_top_level>` into account. .. rst-class:: classref-item-separator @@ -643,7 +666,7 @@ Returns the parent **Node3D**, or an empty :ref:`Object<class_Object>` if no par .. rst-class:: classref-method -:ref:`World3D<class_World3D>` **get_world_3d** **(** **)** |const| +:ref:`World3D<class_World3D>` **get_world_3d**\ (\ ) |const| :ref:`🔗<class_Node3D_method_get_world_3d>` Returns the current :ref:`World3D<class_World3D>` resource this **Node3D** node is registered to. @@ -655,7 +678,7 @@ Returns the current :ref:`World3D<class_World3D>` resource this **Node3D** node .. rst-class:: classref-method -void **global_rotate** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** +|void| **global_rotate**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_global_rotate>` Rotates the global (world) transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians. The rotation axis is in global coordinate system. @@ -667,7 +690,7 @@ Rotates the global (world) transformation around axis, a unit :ref:`Vector3<clas .. rst-class:: classref-method -void **global_scale** **(** :ref:`Vector3<class_Vector3>` scale **)** +|void| **global_scale**\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Node3D_method_global_scale>` Scales the global (world) transformation by the given :ref:`Vector3<class_Vector3>` scale factors. @@ -679,7 +702,7 @@ Scales the global (world) transformation by the given :ref:`Vector3<class_Vector .. rst-class:: classref-method -void **global_translate** **(** :ref:`Vector3<class_Vector3>` offset **)** +|void| **global_translate**\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Node3D_method_global_translate>` Moves the global (world) transformation by :ref:`Vector3<class_Vector3>` offset. The offset is in global coordinate system. @@ -691,7 +714,7 @@ Moves the global (world) transformation by :ref:`Vector3<class_Vector3>` offset. .. rst-class:: classref-method -void **hide** **(** **)** +|void| **hide**\ (\ ) :ref:`🔗<class_Node3D_method_hide>` Disables rendering of this node. Changes :ref:`visible<class_Node3D_property_visible>` to ``false``. @@ -703,7 +726,7 @@ Disables rendering of this node. Changes :ref:`visible<class_Node3D_property_vis .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_local_transform_notification_enabled** **(** **)** |const| +:ref:`bool<class_bool>` **is_local_transform_notification_enabled**\ (\ ) |const| :ref:`🔗<class_Node3D_method_is_local_transform_notification_enabled>` Returns whether node notifies about its local transformation changes. **Node3D** will not propagate this by default. @@ -715,7 +738,7 @@ Returns whether node notifies about its local transformation changes. **Node3D** .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_scale_disabled** **(** **)** |const| +:ref:`bool<class_bool>` **is_scale_disabled**\ (\ ) |const| :ref:`🔗<class_Node3D_method_is_scale_disabled>` Returns whether this node uses a scale of ``(1, 1, 1)`` or its local transformation scale. @@ -727,7 +750,7 @@ Returns whether this node uses a scale of ``(1, 1, 1)`` or its local transformat .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_transform_notification_enabled** **(** **)** |const| +:ref:`bool<class_bool>` **is_transform_notification_enabled**\ (\ ) |const| :ref:`🔗<class_Node3D_method_is_transform_notification_enabled>` Returns whether the node notifies about its global and local transformation changes. **Node3D** will not propagate this by default. @@ -739,7 +762,7 @@ Returns whether the node notifies about its global and local transformation chan .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_visible_in_tree** **(** **)** |const| +:ref:`bool<class_bool>` **is_visible_in_tree**\ (\ ) |const| :ref:`🔗<class_Node3D_method_is_visible_in_tree>` Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>`, its :ref:`visible<class_Node3D_property_visible>` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree. @@ -751,7 +774,7 @@ Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>` .. rst-class:: classref-method -void **look_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** +|void| **look_at**\ (\ target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node3D_method_look_at>` Rotates the node so that the local forward axis (-Z, :ref:`Vector3.FORWARD<class_Vector3_constant_FORWARD>`) points toward the ``target`` position. @@ -771,7 +794,7 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw .. rst-class:: classref-method -void **look_at_from_position** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** +|void| **look_at_from_position**\ (\ position\: :ref:`Vector3<class_Vector3>`, target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Node3D_method_look_at_from_position>` Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at<class_Node3D_method_look_at>`. Operations take place in global space. @@ -783,7 +806,7 @@ Moves the node to the specified ``position``, and then rotates the node to point .. rst-class:: classref-method -void **orthonormalize** **(** **)** +|void| **orthonormalize**\ (\ ) :ref:`🔗<class_Node3D_method_orthonormalize>` Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's :ref:`Transform3D<class_Transform3D>`. @@ -795,7 +818,7 @@ Resets this node's transformations (like scale, skew and taper) preserving its r .. rst-class:: classref-method -void **rotate** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** +|void| **rotate**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_rotate>` Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians. @@ -807,7 +830,7 @@ Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3 .. rst-class:: classref-method -void **rotate_object_local** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** +|void| **rotate_object_local**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_rotate_object_local>` Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3>`, by specified angle in radians. The rotation axis is in object-local coordinate system. @@ -819,7 +842,7 @@ Rotates the local transformation around axis, a unit :ref:`Vector3<class_Vector3 .. rst-class:: classref-method -void **rotate_x** **(** :ref:`float<class_float>` angle **)** +|void| **rotate_x**\ (\ angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_rotate_x>` Rotates the local transformation around the X axis by angle in radians. @@ -831,7 +854,7 @@ Rotates the local transformation around the X axis by angle in radians. .. rst-class:: classref-method -void **rotate_y** **(** :ref:`float<class_float>` angle **)** +|void| **rotate_y**\ (\ angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_rotate_y>` Rotates the local transformation around the Y axis by angle in radians. @@ -843,7 +866,7 @@ Rotates the local transformation around the Y axis by angle in radians. .. rst-class:: classref-method -void **rotate_z** **(** :ref:`float<class_float>` angle **)** +|void| **rotate_z**\ (\ angle\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Node3D_method_rotate_z>` Rotates the local transformation around the Z axis by angle in radians. @@ -855,7 +878,7 @@ Rotates the local transformation around the Z axis by angle in radians. .. rst-class:: classref-method -void **scale_object_local** **(** :ref:`Vector3<class_Vector3>` scale **)** +|void| **scale_object_local**\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Node3D_method_scale_object_local>` Scales the local transformation by given 3D scale factors in object-local coordinate system. @@ -867,7 +890,7 @@ Scales the local transformation by given 3D scale factors in object-local coordi .. rst-class:: classref-method -void **set_disable_scale** **(** :ref:`bool<class_bool>` disable **)** +|void| **set_disable_scale**\ (\ disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node3D_method_set_disable_scale>` Sets whether the node uses a scale of ``(1, 1, 1)`` or its local transformation scale. Changes to the local transformation scale are preserved. @@ -879,7 +902,7 @@ Sets whether the node uses a scale of ``(1, 1, 1)`` or its local transformation .. rst-class:: classref-method -void **set_identity** **(** **)** +|void| **set_identity**\ (\ ) :ref:`🔗<class_Node3D_method_set_identity>` Reset all transformations for this node (sets its :ref:`Transform3D<class_Transform3D>` to the identity matrix). @@ -891,7 +914,7 @@ Reset all transformations for this node (sets its :ref:`Transform3D<class_Transf .. rst-class:: classref-method -void **set_ignore_transform_notification** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_ignore_transform_notification**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node3D_method_set_ignore_transform_notification>` Sets whether the node ignores notification that its transformation (global or local) changed. @@ -903,7 +926,7 @@ Sets whether the node ignores notification that its transformation (global or lo .. rst-class:: classref-method -void **set_notify_local_transform** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_notify_local_transform**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node3D_method_set_notify_local_transform>` Sets whether the node notifies about its local transformation changes. **Node3D** will not propagate this by default. @@ -915,7 +938,7 @@ Sets whether the node notifies about its local transformation changes. **Node3D* .. rst-class:: classref-method -void **set_notify_transform** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_notify_transform**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Node3D_method_set_notify_transform>` Sets whether the node notifies about its global and local transformation changes. **Node3D** will not propagate this by default, unless it is in the editor context and it has a valid gizmo. @@ -927,10 +950,12 @@ Sets whether the node notifies about its global and local transformation changes .. rst-class:: classref-method -void **set_subgizmo_selection** **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **set_subgizmo_selection**\ (\ gizmo\: :ref:`Node3DGizmo<class_Node3DGizmo>`, id\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Node3D_method_set_subgizmo_selection>` Set subgizmo selection for this node in the editor. +\ **Note:** The gizmo object would typically be an instance of :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>`, but the argument type is kept generic to avoid creating a dependency on editor classes in **Node3D**. + .. rst-class:: classref-item-separator ---- @@ -939,7 +964,7 @@ Set subgizmo selection for this node in the editor. .. rst-class:: classref-method -void **show** **(** **)** +|void| **show**\ (\ ) :ref:`🔗<class_Node3D_method_show>` Enables rendering of this node. Changes :ref:`visible<class_Node3D_property_visible>` to ``true``. @@ -951,7 +976,7 @@ Enables rendering of this node. Changes :ref:`visible<class_Node3D_property_visi .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **to_global** **(** :ref:`Vector3<class_Vector3>` local_point **)** |const| +:ref:`Vector3<class_Vector3>` **to_global**\ (\ local_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Node3D_method_to_global>` Transforms ``local_point`` from this node's local space to world space. @@ -963,7 +988,7 @@ Transforms ``local_point`` from this node's local space to world space. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **to_local** **(** :ref:`Vector3<class_Vector3>` global_point **)** |const| +:ref:`Vector3<class_Vector3>` **to_local**\ (\ global_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Node3D_method_to_local>` Transforms ``global_point`` from world space to this node's local space. @@ -975,7 +1000,7 @@ Transforms ``global_point`` from world space to this node's local space. .. rst-class:: classref-method -void **translate** **(** :ref:`Vector3<class_Vector3>` offset **)** +|void| **translate**\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Node3D_method_translate>` Changes the node's position by the given offset :ref:`Vector3<class_Vector3>`. @@ -989,7 +1014,7 @@ Note that the translation ``offset`` is affected by the node's scale, so if scal .. rst-class:: classref-method -void **translate_object_local** **(** :ref:`Vector3<class_Vector3>` offset **)** +|void| **translate_object_local**\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Node3D_method_translate_object_local>` Changes the node's position by the given offset :ref:`Vector3<class_Vector3>` in local space. @@ -1001,9 +1026,9 @@ Changes the node's position by the given offset :ref:`Vector3<class_Vector3>` in .. rst-class:: classref-method -void **update_gizmos** **(** **)** +|void| **update_gizmos**\ (\ ) :ref:`🔗<class_Node3D_method_update_gizmos>` -Updates all the :ref:`Node3DGizmo<class_Node3DGizmo>`\ s attached to this node. +Updates all the **Node3D** gizmos attached to this node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1012,3 +1037,4 @@ Updates all the :ref:`Node3DGizmo<class_Node3DGizmo>`\ s attached to this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_node3dgizmo.rst b/classes/class_node3dgizmo.rst index da8169470f2..439f4bad10c 100644 --- a/classes/class_node3dgizmo.rst +++ b/classes/class_node3dgizmo.rst @@ -14,9 +14,16 @@ Node3DGizmo **Inherited By:** :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` -.. container:: contribute +Abstract class to expose editor gizmos for :ref:`Node3D<class_Node3D>`. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This abstract class helps connect the :ref:`Node3D<class_Node3D>` scene with the editor-specific :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` class. + +\ **Node3DGizmo** by itself has no exposed API, refer to :ref:`Node3D.add_gizmo<class_Node3D_method_add_gizmo>` and pass it an :ref:`EditorNode3DGizmo<class_EditorNode3DGizmo>` instance. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -25,3 +32,4 @@ Node3DGizmo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_nodepath.rst b/classes/class_nodepath.rst index 81403ff52a6..842dd3e8a9c 100644 --- a/classes/class_nodepath.rst +++ b/classes/class_nodepath.rst @@ -17,31 +17,43 @@ A pre-parsed scene tree path. Description ----------- -A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node<class_Node_method_get_node>` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For example, ``"Path2D/PathFollow2D/Sprite2D:texture:size"`` would refer to the ``size`` property of the ``texture`` resource on the node named ``"Sprite2D"`` which is a child of the other named nodes in the path. +The **NodePath** built-in :ref:`Variant<class_Variant>` type represents a path to a node or property in a hierarchy of nodes. It is designed to be efficiently passed into many built-in methods (such as :ref:`Node.get_node<class_Node_method_get_node>`, :ref:`Object.set_indexed<class_Object_method_set_indexed>`, :ref:`Tween.tween_property<class_Tween_method_tween_property>`, etc.) without a hard dependence on the node or property they point to. -You will usually just pass a string to :ref:`Node.get_node<class_Node_method_get_node>` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with **NodePath** or the literal syntax ``^"path"``. Exporting a **NodePath** variable will give you a node selection widget in the properties panel of the editor, which can often be useful. +A node path is represented as a :ref:`String<class_String>` composed of slash-separated (``/``) node names and colon-separated (``:``) property names (also called "subnames"). Similar to a filesystem path, ``".."`` and ``"."`` are special node names. They refer to the parent node and the current node, respectively. -A **NodePath** is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties. +The following examples are paths relative to the current node: -Some examples of NodePaths include the following: +:: + + ^"A" # Points to the direct child A. + ^"A/B" # Points to A's child B. + ^"." # Points to the current node. + ^".." # Points to the parent node. + ^"../C" # Points to the sibling node C. + ^"../.." # Points to the grandparent node. + +A leading slash means the path is absolute, and begins from the :ref:`SceneTree<class_SceneTree>`: :: - # No leading slash means it is relative to the current node. - ^"A" # Immediate child A - ^"A/B" # A's child B - ^"." # The current node. - ^".." # The parent node. - ^"../C" # A sibling node C. - ^"../.." # The grandparent node. - # A leading slash means it is absolute from the SceneTree. - ^"/root" # Equivalent to get_tree().get_root(). - ^"/root/Main" # If your main scene's root node were named "Main". - ^"/root/MyAutoload" # If you have an autoloaded node or scene. + ^"/root" # Points to the SceneTree's root Window. + ^"/root/Title" # May point to the main scene's root node named "Title". + ^"/root/Global" # May point to an autoloaded node or scene named "Global". + +Despite their name, node paths may also point to a property: + +:: -See also :ref:`StringName<class_StringName>`, which is a similar concept for general-purpose string interning. + ^"position" # Points to this object's position. + ^"position:x" # Points to this object's position in the x axis. + ^"Camera3D:rotation:y" # Points to the child Camera3D and its y rotation. + ^"/root:size:x" # Points to the root Window and its width. -\ **Note:** In the editor, **NodePath** properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime. +Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used. + +You usually do not have to worry about the **NodePath** type, as strings are automatically converted to the type when necessary. There are still times when defining node paths is useful. For example, exported **NodePath** properties allow you to easily select any node within the currently edited scene. They are also automatically updated when moving, renaming or deleting nodes in the scene tree editor. See also :ref:`@GDScript.@export_node_path<class_@GDScript_annotation_@export_node_path>`. + +See also :ref:`StringName<class_StringName>`, which is a similar type designed for optimized strings. \ **Note:** In a boolean context, a **NodePath** will evaluate to ``false`` if it is empty (``NodePath("")``). Otherwise, a **NodePath** will always evaluate to ``true``. @@ -54,7 +66,7 @@ See also :ref:`StringName<class_StringName>`, which is a similar concept for gen Tutorials --------- -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ .. rst-class:: classref-reftable-group @@ -64,13 +76,13 @@ Constructors .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>` **(** :ref:`NodePath<class_NodePath>` from **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>` **(** :ref:`String<class_String>` from **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>`\ (\ from\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`NodePath<class_NodePath_constructor_NodePath>`\ (\ from\: :ref:`String<class_String>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -80,27 +92,29 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_as_property_path<class_NodePath_method_get_as_property_path>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_names<class_NodePath_method_get_concatenated_names>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_subnames<class_NodePath_method_get_concatenated_subnames>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_name<class_NodePath_method_get_name>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_name_count<class_NodePath_method_get_name_count>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_subname<class_NodePath_method_get_subname>` **(** :ref:`int<class_int>` idx **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_subname_count<class_NodePath_method_get_subname_count>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hash<class_NodePath_method_hash>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_absolute<class_NodePath_method_is_absolute>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_NodePath_method_is_empty>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_as_property_path<class_NodePath_method_get_as_property_path>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_names<class_NodePath_method_get_concatenated_names>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_subnames<class_NodePath_method_get_concatenated_subnames>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_name<class_NodePath_method_get_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_name_count<class_NodePath_method_get_name_count>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_subname<class_NodePath_method_get_subname>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_subname_count<class_NodePath_method_get_subname_count>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hash<class_NodePath_method_hash>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_absolute<class_NodePath_method_is_absolute>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_NodePath_method_is_empty>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`slice<class_NodePath_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -110,11 +124,11 @@ Operators .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_NodePath_operator_neq_NodePath>` **(** :ref:`NodePath<class_NodePath>` right **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_NodePath_operator_eq_NodePath>` **(** :ref:`NodePath<class_NodePath>` right **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_NodePath_operator_neq_NodePath>`\ (\ right\: :ref:`NodePath<class_NodePath>`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_NodePath_operator_eq_NodePath>`\ (\ right\: :ref:`NodePath<class_NodePath>`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -129,7 +143,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`NodePath<class_NodePath>` **NodePath** **(** **)** +:ref:`NodePath<class_NodePath>` **NodePath**\ (\ ) :ref:`🔗<class_NodePath_constructor_NodePath>` Constructs an empty **NodePath**. @@ -139,9 +153,9 @@ Constructs an empty **NodePath**. .. rst-class:: classref-constructor -:ref:`NodePath<class_NodePath>` **NodePath** **(** :ref:`NodePath<class_NodePath>` from **)** +:ref:`NodePath<class_NodePath>` **NodePath**\ (\ from\: :ref:`NodePath<class_NodePath>`\ ) -Constructs a **NodePath** as a copy of the given **NodePath**. ``NodePath("example")`` is equivalent to ``^"example"``. +Constructs a **NodePath** as a copy of the given **NodePath**. .. rst-class:: classref-item-separator @@ -149,28 +163,34 @@ Constructs a **NodePath** as a copy of the given **NodePath**. ``NodePath("examp .. rst-class:: classref-constructor -:ref:`NodePath<class_NodePath>` **NodePath** **(** :ref:`String<class_String>` from **)** +:ref:`NodePath<class_NodePath>` **NodePath**\ (\ from\: :ref:`String<class_String>`\ ) -Creates a NodePath from a string, e.g. ``"Path2D/PathFollow2D/Sprite2D:texture:size"``. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, ``"."`` and ``".."`` indicate the current node and its parent. +Constructs a **NodePath** from a :ref:`String<class_String>`. The created path is absolute if prefixed with a slash (see :ref:`is_absolute<class_NodePath_method_is_absolute>`). -The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. +The "subnames" optionally included after the path to the target node can point to properties, and can also be nested. -Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties): +Examples of strings that could be node paths: :: # Points to the Sprite2D node. - "Path2D/PathFollow2D/Sprite2D" + "Level/RigidBody2D/Sprite2D" + # Points to the Sprite2D node and its "texture" resource. - # get_node() would retrieve "Sprite2D", while get_node_and_resource() + # get_node() would retrieve the Sprite2D, while get_node_and_resource() # would retrieve both the Sprite2D node and the "texture" resource. - "Path2D/PathFollow2D/Sprite2D:texture" + "Level/RigidBody2D/Sprite2D:texture" + # Points to the Sprite2D node and its "position" property. - "Path2D/PathFollow2D/Sprite2D:position" + "Level/RigidBody2D/Sprite2D:position" + # Points to the Sprite2D node and the "x" component of its "position" property. - "Path2D/PathFollow2D/Sprite2D:position:x" - # Absolute path (from "root") - "/root/Level/Path2D" + "Level/RigidBody2D/Sprite2D:position:x" + + # Points to the RigidBody2D node as an absolute path beginning from the SceneTree. + "/root/Level/RigidBody2D" + +\ **Note:** In GDScript, it's also possible to convert a constant string into a node path by prefixing it with ``^``. ``^"path/to/node"`` is equivalent to ``NodePath("path/to/node")``. .. rst-class:: classref-section-separator @@ -185,28 +205,30 @@ Method Descriptions .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_as_property_path** **(** **)** |const| +:ref:`NodePath<class_NodePath>` **get_as_property_path**\ (\ ) |const| :ref:`🔗<class_NodePath_method_get_as_property_path>` -Returns a node path with a colon character (``:``) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). +Returns a copy of this node path with a colon character (``:``) prefixed, transforming it to a pure property path with no node names (relative to the current node). .. tabs:: .. code-tab:: gdscript - # This will be parsed as a node path to the "x" property in the "position" node. - var node_path = NodePath("position:x") - # This will be parsed as a node path to the "x" component of the "position" property in the current node. + # node_path points to the "x" property of the child node named "position". + var node_path = ^"position:x" + + # property_path points to the "position" in the "x" axis of this node. var property_path = node_path.get_as_property_path() - print(property_path) # :position:x + print(property_path) # Prints ":position:x" .. code-tab:: csharp - // This will be parsed as a node path to the "x" property in the "position" node. + // nodePath points to the "x" property of the child node named "position". var nodePath = new NodePath("position:x"); - // This will be parsed as a node path to the "x" component of the "position" property in the current node. + + // propertyPath points to the "position" in the "x" axis of this node. NodePath propertyPath = nodePath.GetAsPropertyPath(); - GD.Print(propertyPath); // :position:x + GD.Print(propertyPath); // Prints ":position:x". @@ -218,9 +240,9 @@ Returns a node path with a colon character (``:``) prepended, transforming it to .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_concatenated_names** **(** **)** |const| +:ref:`StringName<class_StringName>` **get_concatenated_names**\ (\ ) |const| :ref:`🔗<class_NodePath_method_get_concatenated_names>` -Returns all paths concatenated with a slash character (``/``) as separator without subnames. +Returns all node names concatenated with a slash character (``/``) as a single :ref:`StringName<class_StringName>`. .. rst-class:: classref-item-separator @@ -230,22 +252,22 @@ Returns all paths concatenated with a slash character (``/``) as separator witho .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_concatenated_subnames** **(** **)** |const| +:ref:`StringName<class_StringName>` **get_concatenated_subnames**\ (\ ) |const| :ref:`🔗<class_NodePath_method_get_concatenated_subnames>` -Returns all subnames concatenated with a colon character (``:``) as separator, i.e. the right side of the first colon in a node path. +Returns all property subnames concatenated with a colon character (``:``) as a single :ref:`StringName<class_StringName>`. .. tabs:: .. code-tab:: gdscript - var nodepath = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") - print(nodepath.get_concatenated_subnames()) # texture:load_path + var node_path = ^"Sprite2D:texture:resource_name" + print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name". .. code-tab:: csharp - var nodepath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); - GD.Print(nodepath.GetConcatenatedSubnames()); // texture:load_path + var nodePath = new NodePath("Sprite2D:texture:resource_name"); + GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name". @@ -257,26 +279,26 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_name** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NodePath_method_get_name>` -Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count<class_NodePath_method_get_name_count>` - 1). +Returns the node name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count<class_NodePath_method_get_subname_count>` and :ref:`get_name_count<class_NodePath_method_get_name_count>`. .. tabs:: .. code-tab:: gdscript - var node_path = NodePath("Path2D/PathFollow2D/Sprite2D") - print(node_path.get_name(0)) # Path2D - print(node_path.get_name(1)) # PathFollow2D - print(node_path.get_name(2)) # Sprite + var sprite_path = NodePath("../RigidBody2D/Sprite2D") + print(sprite_path.get_name(0)) # Prints "..". + print(sprite_path.get_name(1)) # Prints "RigidBody2D". + print(sprite_path.get_name(2)) # Prints "Sprite". .. code-tab:: csharp - var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D"); - GD.Print(nodePath.GetName(0)); // Path2D - GD.Print(nodePath.GetName(1)); // PathFollow2D - GD.Print(nodePath.GetName(2)); // Sprite + var spritePath = new NodePath("../RigidBody2D/Sprite2D"); + GD.Print(spritePath.GetName(0)); // Prints "..". + GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D". + GD.Print(spritePath.GetName(2)); // Prints "Sprite". @@ -288,11 +310,11 @@ Gets the node name indicated by ``idx`` (0 to :ref:`get_name_count<class_NodePat .. rst-class:: classref-method -:ref:`int<class_int>` **get_name_count** **(** **)** |const| +:ref:`int<class_int>` **get_name_count**\ (\ ) |const| :ref:`🔗<class_NodePath_method_get_name_count>` -Gets the number of node names which make up the path. Subnames (see :ref:`get_subname_count<class_NodePath_method_get_subname_count>`) are not included. +Returns the number of node names in the path. Property subnames are not included. -For example, ``"Path2D/PathFollow2D/Sprite2D"`` has 3 names. +For example, ``"../RigidBody2D/Sprite2D:texture"`` contains 3 node names. .. rst-class:: classref-item-separator @@ -302,24 +324,24 @@ For example, ``"Path2D/PathFollow2D/Sprite2D"`` has 3 names. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_subname** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_subname**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NodePath_method_get_subname>` -Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_count<class_NodePath_method_get_subname_count>` - 1). +Returns the property name indicated by ``idx``, starting from 0. If ``idx`` is out of bounds, an error is generated. See also :ref:`get_subname_count<class_NodePath_method_get_subname_count>`. .. tabs:: .. code-tab:: gdscript - var node_path = NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path") - print(node_path.get_subname(0)) # texture - print(node_path.get_subname(1)) # load_path + var path_to_name = NodePath("Sprite2D:texture:resource_name") + print(path_to_name.get_subname(0)) # Prints "texture". + print(path_to_name.get_subname(1)) # Prints "resource_name". .. code-tab:: csharp - var nodePath = new NodePath("Path2D/PathFollow2D/Sprite2D:texture:load_path"); - GD.Print(nodePath.GetSubname(0)); // texture - GD.Print(nodePath.GetSubname(1)); // load_path + var pathToName = new NodePath("Sprite2D:texture:resource_name"); + GD.Print(pathToName.GetSubname(0)); // Prints "texture". + GD.Print(pathToName.GetSubname(1)); // Prints "resource_name". @@ -331,11 +353,11 @@ Gets the resource or property name indicated by ``idx`` (0 to :ref:`get_subname_ .. rst-class:: classref-method -:ref:`int<class_int>` **get_subname_count** **(** **)** |const| +:ref:`int<class_int>` **get_subname_count**\ (\ ) |const| :ref:`🔗<class_NodePath_method_get_subname_count>` -Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character (``:``) in the node path. +Returns the number of property names ("subnames") in the path. Each subname in the node path is listed after a colon character (``:``). -For example, ``"Path2D/PathFollow2D/Sprite2D:texture:load_path"`` has 2 subnames. +For example, ``"Level/RigidBody2D/Sprite2D:texture:resource_name"`` contains 2 subnames. .. rst-class:: classref-item-separator @@ -345,9 +367,11 @@ For example, ``"Path2D/PathFollow2D/Sprite2D:texture:load_path"`` has 2 subnames .. rst-class:: classref-method -:ref:`int<class_int>` **hash** **(** **)** |const| +:ref:`int<class_int>` **hash**\ (\ ) |const| :ref:`🔗<class_NodePath_method_hash>` -Returns the 32-bit hash value representing the **NodePath**'s contents. +Returns the 32-bit hash value representing the node path's contents. + +\ **Note:** Node paths with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. Node paths with different hash values are guaranteed to be different. .. rst-class:: classref-item-separator @@ -357,9 +381,9 @@ Returns the 32-bit hash value representing the **NodePath**'s contents. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_absolute** **(** **)** |const| +:ref:`bool<class_bool>` **is_absolute**\ (\ ) |const| :ref:`🔗<class_NodePath_method_is_absolute>` -Returns ``true`` if the node path is absolute (as opposed to relative), which means that it starts with a slash character (``/``). Absolute node paths can be used to access the root node (``"/root"``) or autoloads (e.g. ``"/global"`` if a "global" autoload was registered). +Returns ``true`` if the node path is absolute. Unlike a relative path, an absolute path is represented by a leading slash character (``/``) and always begins from the :ref:`SceneTree<class_SceneTree>`. It can be used to reliably access nodes from the root node (e.g. ``"/root/Global"`` if an autoload named "Global" exists). .. rst-class:: classref-item-separator @@ -369,9 +393,25 @@ Returns ``true`` if the node path is absolute (as opposed to relative), which me .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_NodePath_method_is_empty>` + +Returns ``true`` if the node path has been constructed from an empty :ref:`String<class_String>` (``""``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_NodePath_method_slice: + +.. rst-class:: classref-method + +:ref:`NodePath<class_NodePath>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_NodePath_method_slice>` + +Returns the slice of the **NodePath**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **NodePath**. + +The absolute value of ``begin`` and ``end`` will be clamped to the sum of :ref:`get_name_count<class_NodePath_method_get_name_count>` and :ref:`get_subname_count<class_NodePath_method_get_subname_count>`, so the default value for ``end`` makes it slice to the end of the **NodePath** by default (i.e. ``path.slice(1)`` is a shorthand for ``path.slice(1, path.get_name_count() + path.get_subname_count())``). -Returns ``true`` if the node path is empty. +If either ``begin`` or ``end`` are negative, they will be relative to the end of the **NodePath** (i.e. ``path.slice(0, -2)`` is a shorthand for ``path.slice(0, path.get_name_count() + path.get_subname_count() - 2)``). .. rst-class:: classref-section-separator @@ -386,7 +426,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`NodePath<class_NodePath>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_NodePath_operator_neq_NodePath>` Returns ``true`` if two node paths are not equal. @@ -398,9 +438,9 @@ Returns ``true`` if two node paths are not equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`NodePath<class_NodePath>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_NodePath_operator_eq_NodePath>` -Returns ``true`` if two node paths are equal, i.e. all node names in the path are the same and in the same order. +Returns ``true`` if two node paths are equal, that is, they are composed of the same node names and subnames in the same order. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -409,3 +449,4 @@ Returns ``true`` if two node paths are equal, i.e. all node names in the path ar .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_noise.rst b/classes/class_noise.rst index 6db9c05109b..fad4510dcde 100644 --- a/classes/class_noise.rst +++ b/classes/class_noise.rst @@ -23,7 +23,7 @@ Description This class defines the interface for noise generation libraries to inherit from. -A default get_seamless_noise() implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from get_image(), reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. +A default :ref:`get_seamless_image<class_Noise_method_get_seamless_image>` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the :ref:`get_image<class_Noise_method_get_image>` method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. Inheriting noise classes can optionally override this function to provide a more optimal algorithm. @@ -35,25 +35,25 @@ Methods .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_image<class_Noise_method_get_image>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`bool<class_bool>` normalize=true **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`get_image_3d<class_Noise_method_get_image_3d>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` normalize=true **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_noise_1d<class_Noise_method_get_noise_1d>` **(** :ref:`float<class_float>` x **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_noise_2d<class_Noise_method_get_noise_2d>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_noise_2dv<class_Noise_method_get_noise_2dv>` **(** :ref:`Vector2<class_Vector2>` v **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_noise_3d<class_Noise_method_get_noise_3d>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_noise_3dv<class_Noise_method_get_noise_3dv>` **(** :ref:`Vector3<class_Vector3>` v **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_seamless_image<class_Noise_method_get_seamless_image>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`float<class_float>` skirt=0.1, :ref:`bool<class_bool>` normalize=true **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`get_seamless_image_3d<class_Noise_method_get_seamless_image_3d>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` invert=false, :ref:`float<class_float>` skirt=0.1, :ref:`bool<class_bool>` normalize=true **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_image<class_Noise_method_get_image>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, in_3d_space\: :ref:`bool<class_bool>` = false, normalize\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`get_image_3d<class_Noise_method_get_image_3d>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, normalize\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_noise_1d<class_Noise_method_get_noise_1d>`\ (\ x\: :ref:`float<class_float>`\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_noise_2d<class_Noise_method_get_noise_2d>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_noise_2dv<class_Noise_method_get_noise_2dv>`\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_noise_3d<class_Noise_method_get_noise_3d>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_noise_3dv<class_Noise_method_get_noise_3dv>`\ (\ v\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_seamless_image<class_Noise_method_get_seamless_image>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, in_3d_space\: :ref:`bool<class_bool>` = false, skirt\: :ref:`float<class_float>` = 0.1, normalize\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`get_seamless_image_3d<class_Noise_method_get_seamless_image_3d>`\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, skirt\: :ref:`float<class_float>` = 0.1, normalize\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_image** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`bool<class_bool>` normalize=true **)** |const| +:ref:`Image<class_Image>` **get_image**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, in_3d_space\: :ref:`bool<class_bool>` = false, normalize\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Noise_method_get_image>` Returns an :ref:`Image<class_Image>` containing 2D noise values. @@ -82,7 +82,7 @@ Returns an :ref:`Image<class_Image>` containing 2D noise values. .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **get_image_3d** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` normalize=true **)** |const| +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **get_image_3d**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, normalize\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Noise_method_get_image_3d>` Returns an :ref:`Array<class_Array>` of :ref:`Image<class_Image>`\ s containing 3D noise values for use with :ref:`ImageTexture3D.create<class_ImageTexture3D_method_create>`. @@ -96,7 +96,7 @@ Returns an :ref:`Array<class_Array>` of :ref:`Image<class_Image>`\ s containing .. rst-class:: classref-method -:ref:`float<class_float>` **get_noise_1d** **(** :ref:`float<class_float>` x **)** |const| +:ref:`float<class_float>` **get_noise_1d**\ (\ x\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Noise_method_get_noise_1d>` Returns the 1D noise value at the given (x) coordinate. @@ -108,7 +108,7 @@ Returns the 1D noise value at the given (x) coordinate. .. rst-class:: classref-method -:ref:`float<class_float>` **get_noise_2d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |const| +:ref:`float<class_float>` **get_noise_2d**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Noise_method_get_noise_2d>` Returns the 2D noise value at the given position. @@ -120,7 +120,7 @@ Returns the 2D noise value at the given position. .. rst-class:: classref-method -:ref:`float<class_float>` **get_noise_2dv** **(** :ref:`Vector2<class_Vector2>` v **)** |const| +:ref:`float<class_float>` **get_noise_2dv**\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Noise_method_get_noise_2dv>` Returns the 2D noise value at the given position. @@ -132,7 +132,7 @@ Returns the 2D noise value at the given position. .. rst-class:: classref-method -:ref:`float<class_float>` **get_noise_3d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** |const| +:ref:`float<class_float>` **get_noise_3d**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Noise_method_get_noise_3d>` Returns the 3D noise value at the given position. @@ -144,7 +144,7 @@ Returns the 3D noise value at the given position. .. rst-class:: classref-method -:ref:`float<class_float>` **get_noise_3dv** **(** :ref:`Vector3<class_Vector3>` v **)** |const| +:ref:`float<class_float>` **get_noise_3dv**\ (\ v\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Noise_method_get_noise_3dv>` Returns the 3D noise value at the given position. @@ -156,7 +156,7 @@ Returns the 3D noise value at the given position. .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_seamless_image** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`float<class_float>` skirt=0.1, :ref:`bool<class_bool>` normalize=true **)** |const| +:ref:`Image<class_Image>` **get_seamless_image**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, in_3d_space\: :ref:`bool<class_bool>` = false, skirt\: :ref:`float<class_float>` = 0.1, normalize\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Noise_method_get_seamless_image>` Returns an :ref:`Image<class_Image>` containing seamless 2D noise values. @@ -170,7 +170,7 @@ Returns an :ref:`Image<class_Image>` containing seamless 2D noise values. .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **get_seamless_image_3d** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` invert=false, :ref:`float<class_float>` skirt=0.1, :ref:`bool<class_bool>` normalize=true **)** |const| +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **get_seamless_image_3d**\ (\ width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>` = false, skirt\: :ref:`float<class_float>` = 0.1, normalize\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Noise_method_get_seamless_image_3d>` Returns an :ref:`Array<class_Array>` of :ref:`Image<class_Image>`\ s containing seamless 3D noise values for use with :ref:`ImageTexture3D.create<class_ImageTexture3D_method_create>`. @@ -183,3 +183,4 @@ Returns an :ref:`Array<class_Array>` of :ref:`Image<class_Image>`\ s containing .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_noisetexture2d.rst b/classes/class_noisetexture2d.rst index b0770284533..87439723364 100644 --- a/classes/class_noisetexture2d.rst +++ b/classes/class_noisetexture2d.rst @@ -12,14 +12,14 @@ NoiseTexture2D **Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A texture filled with noise generated by a :ref:`Noise<class_Noise>` object. +A 2D texture filled with noise generated by a :ref:`Noise<class_Noise>` object. .. rst-class:: classref-introduction-group Description ----------- -Uses :ref:`FastNoiseLite<class_FastNoiseLite>` or other libraries to fill the texture data of your desired size. **NoiseTexture2D** can also generate normal map textures. +Uses the :ref:`FastNoiseLite<class_FastNoiseLite>` library or other noise generators to fill the texture data of your desired size. **NoiseTexture2D** can also generate normal map textures. The class uses :ref:`Thread<class_Thread>`\ s to generate the texture data internally, so :ref:`Texture2D.get_image<class_Texture2D_method_get_image>` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: @@ -80,12 +80,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **as_normal_map** = ``false`` +:ref:`bool<class_bool>` **as_normal_map** = ``false`` :ref:`🔗<class_NoiseTexture2D_property_as_normal_map>` .. rst-class:: classref-property-setget -- void **set_as_normal_map** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_normal_map** **(** **)** +- |void| **set_as_normal_map**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_normal_map**\ (\ ) If ``true``, the resulting texture contains a normal map created from the original noise interpreted as a bump map. @@ -97,12 +97,12 @@ If ``true``, the resulting texture contains a normal map created from the origin .. rst-class:: classref-property -:ref:`float<class_float>` **bump_strength** = ``8.0`` +:ref:`float<class_float>` **bump_strength** = ``8.0`` :ref:`🔗<class_NoiseTexture2D_property_bump_strength>` .. rst-class:: classref-property-setget -- void **set_bump_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bump_strength** **(** **)** +- |void| **set_bump_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bump_strength**\ (\ ) Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer. @@ -114,12 +114,12 @@ Strength of the bump maps used in this texture. A higher value will make the bum .. rst-class:: classref-property -:ref:`Gradient<class_Gradient>` **color_ramp** +:ref:`Gradient<class_Gradient>` **color_ramp** :ref:`🔗<class_NoiseTexture2D_property_color_ramp>` .. rst-class:: classref-property-setget -- void **set_color_ramp** **(** :ref:`Gradient<class_Gradient>` value **)** -- :ref:`Gradient<class_Gradient>` **get_color_ramp** **(** **)** +- |void| **set_color_ramp**\ (\ value\: :ref:`Gradient<class_Gradient>`\ ) +- :ref:`Gradient<class_Gradient>` **get_color_ramp**\ (\ ) A :ref:`Gradient<class_Gradient>` which is used to map the luminance of each pixel to a color value. @@ -131,12 +131,12 @@ A :ref:`Gradient<class_Gradient>` which is used to map the luminance of each pix .. rst-class:: classref-property -:ref:`bool<class_bool>` **generate_mipmaps** = ``true`` +:ref:`bool<class_bool>` **generate_mipmaps** = ``true`` :ref:`🔗<class_NoiseTexture2D_property_generate_mipmaps>` .. rst-class:: classref-property-setget -- void **set_generate_mipmaps** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_generating_mipmaps** **(** **)** +- |void| **set_generate_mipmaps**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_generating_mipmaps**\ (\ ) Determines whether mipmaps are generated for this texture. Enabling this results in less texture aliasing in the distance, at the cost of increasing memory usage by roughly 33% and making the noise texture generation take longer. @@ -150,12 +150,12 @@ Determines whether mipmaps are generated for this texture. Enabling this results .. rst-class:: classref-property -:ref:`int<class_int>` **height** = ``512`` +:ref:`int<class_int>` **height** = ``512`` :ref:`🔗<class_NoiseTexture2D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_height**\ (\ ) Height of the generated texture (in pixels). @@ -167,12 +167,12 @@ Height of the generated texture (in pixels). .. rst-class:: classref-property -:ref:`bool<class_bool>` **in_3d_space** = ``false`` +:ref:`bool<class_bool>` **in_3d_space** = ``false`` :ref:`🔗<class_NoiseTexture2D_property_in_3d_space>` .. rst-class:: classref-property-setget -- void **set_in_3d_space** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_in_3d_space** **(** **)** +- |void| **set_in_3d_space**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_in_3d_space**\ (\ ) Determines whether the noise image is calculated in 3D space. May result in reduced contrast. @@ -184,12 +184,12 @@ Determines whether the noise image is calculated in 3D space. May result in redu .. rst-class:: classref-property -:ref:`bool<class_bool>` **invert** = ``false`` +:ref:`bool<class_bool>` **invert** = ``false`` :ref:`🔗<class_NoiseTexture2D_property_invert>` .. rst-class:: classref-property-setget -- void **set_invert** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_invert** **(** **)** +- |void| **set_invert**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_invert**\ (\ ) If ``true``, inverts the noise texture. White becomes black, black becomes white. @@ -201,12 +201,12 @@ If ``true``, inverts the noise texture. White becomes black, black becomes white .. rst-class:: classref-property -:ref:`Noise<class_Noise>` **noise** +:ref:`Noise<class_Noise>` **noise** :ref:`🔗<class_NoiseTexture2D_property_noise>` .. rst-class:: classref-property-setget -- void **set_noise** **(** :ref:`Noise<class_Noise>` value **)** -- :ref:`Noise<class_Noise>` **get_noise** **(** **)** +- |void| **set_noise**\ (\ value\: :ref:`Noise<class_Noise>`\ ) +- :ref:`Noise<class_Noise>` **get_noise**\ (\ ) The instance of the :ref:`Noise<class_Noise>` object. @@ -218,12 +218,12 @@ The instance of the :ref:`Noise<class_Noise>` object. .. rst-class:: classref-property -:ref:`bool<class_bool>` **normalize** = ``true`` +:ref:`bool<class_bool>` **normalize** = ``true`` :ref:`🔗<class_NoiseTexture2D_property_normalize>` .. rst-class:: classref-property-setget -- void **set_normalize** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_normalized** **(** **)** +- |void| **set_normalize**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_normalized**\ (\ ) If ``true``, the noise image coming from the noise generator is normalized to the range ``0.0`` to ``1.0``. @@ -237,12 +237,12 @@ Turning normalization off can affect the contrast and allows you to generate non .. rst-class:: classref-property -:ref:`bool<class_bool>` **seamless** = ``false`` +:ref:`bool<class_bool>` **seamless** = ``false`` :ref:`🔗<class_NoiseTexture2D_property_seamless>` .. rst-class:: classref-property-setget -- void **set_seamless** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_seamless** **(** **)** +- |void| **set_seamless**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_seamless**\ (\ ) If ``true``, a seamless texture is requested from the :ref:`Noise<class_Noise>` resource. @@ -258,12 +258,12 @@ If ``true``, a seamless texture is requested from the :ref:`Noise<class_Noise>` .. rst-class:: classref-property -:ref:`float<class_float>` **seamless_blend_skirt** = ``0.1`` +:ref:`float<class_float>` **seamless_blend_skirt** = ``0.1`` :ref:`🔗<class_NoiseTexture2D_property_seamless_blend_skirt>` .. rst-class:: classref-property-setget -- void **set_seamless_blend_skirt** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_seamless_blend_skirt** **(** **)** +- |void| **set_seamless_blend_skirt**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_seamless_blend_skirt**\ (\ ) Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See :ref:`Noise<class_Noise>` for further details. @@ -277,12 +277,12 @@ Used for the default/fallback implementation of the seamless texture generation. .. rst-class:: classref-property -:ref:`int<class_int>` **width** = ``512`` +:ref:`int<class_int>` **width** = ``512`` :ref:`🔗<class_NoiseTexture2D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_width**\ (\ ) Width of the generated texture (in pixels). @@ -293,3 +293,4 @@ Width of the generated texture (in pixels). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_noisetexture3d.rst b/classes/class_noisetexture3d.rst index 69cffc5873f..29d82b62deb 100644 --- a/classes/class_noisetexture3d.rst +++ b/classes/class_noisetexture3d.rst @@ -12,14 +12,14 @@ NoiseTexture3D **Inherits:** :ref:`Texture3D<class_Texture3D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A texture filled with noise generated by a :ref:`Noise<class_Noise>` object. +A 3D texture filled with noise generated by a :ref:`Noise<class_Noise>` object. .. rst-class:: classref-introduction-group Description ----------- -Uses :ref:`FastNoiseLite<class_FastNoiseLite>` or other libraries to fill the texture data of your desired size. +Uses the :ref:`FastNoiseLite<class_FastNoiseLite>` library or other noise generators to fill the texture data of your desired size. The class uses :ref:`Thread<class_Thread>`\ s to generate the texture data internally, so :ref:`Texture3D.get_data<class_Texture3D_method_get_data>` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image: @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Gradient<class_Gradient>` **color_ramp** +:ref:`Gradient<class_Gradient>` **color_ramp** :ref:`🔗<class_NoiseTexture3D_property_color_ramp>` .. rst-class:: classref-property-setget -- void **set_color_ramp** **(** :ref:`Gradient<class_Gradient>` value **)** -- :ref:`Gradient<class_Gradient>` **get_color_ramp** **(** **)** +- |void| **set_color_ramp**\ (\ value\: :ref:`Gradient<class_Gradient>`\ ) +- :ref:`Gradient<class_Gradient>` **get_color_ramp**\ (\ ) A :ref:`Gradient<class_Gradient>` which is used to map the luminance of each pixel to a color value. @@ -88,12 +88,12 @@ A :ref:`Gradient<class_Gradient>` which is used to map the luminance of each pix .. rst-class:: classref-property -:ref:`int<class_int>` **depth** = ``64`` +:ref:`int<class_int>` **depth** = ``64`` :ref:`🔗<class_NoiseTexture3D_property_depth>` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_depth**\ (\ ) Depth of the generated texture (in pixels). @@ -105,12 +105,12 @@ Depth of the generated texture (in pixels). .. rst-class:: classref-property -:ref:`int<class_int>` **height** = ``64`` +:ref:`int<class_int>` **height** = ``64`` :ref:`🔗<class_NoiseTexture3D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_height**\ (\ ) Height of the generated texture (in pixels). @@ -122,12 +122,12 @@ Height of the generated texture (in pixels). .. rst-class:: classref-property -:ref:`bool<class_bool>` **invert** = ``false`` +:ref:`bool<class_bool>` **invert** = ``false`` :ref:`🔗<class_NoiseTexture3D_property_invert>` .. rst-class:: classref-property-setget -- void **set_invert** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_invert** **(** **)** +- |void| **set_invert**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_invert**\ (\ ) If ``true``, inverts the noise texture. White becomes black, black becomes white. @@ -139,12 +139,12 @@ If ``true``, inverts the noise texture. White becomes black, black becomes white .. rst-class:: classref-property -:ref:`Noise<class_Noise>` **noise** +:ref:`Noise<class_Noise>` **noise** :ref:`🔗<class_NoiseTexture3D_property_noise>` .. rst-class:: classref-property-setget -- void **set_noise** **(** :ref:`Noise<class_Noise>` value **)** -- :ref:`Noise<class_Noise>` **get_noise** **(** **)** +- |void| **set_noise**\ (\ value\: :ref:`Noise<class_Noise>`\ ) +- :ref:`Noise<class_Noise>` **get_noise**\ (\ ) The instance of the :ref:`Noise<class_Noise>` object. @@ -156,12 +156,12 @@ The instance of the :ref:`Noise<class_Noise>` object. .. rst-class:: classref-property -:ref:`bool<class_bool>` **normalize** = ``true`` +:ref:`bool<class_bool>` **normalize** = ``true`` :ref:`🔗<class_NoiseTexture3D_property_normalize>` .. rst-class:: classref-property-setget -- void **set_normalize** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_normalized** **(** **)** +- |void| **set_normalize**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_normalized**\ (\ ) If ``true``, the noise image coming from the noise generator is normalized to the range ``0.0`` to ``1.0``. @@ -175,12 +175,12 @@ Turning normalization off can affect the contrast and allows you to generate non .. rst-class:: classref-property -:ref:`bool<class_bool>` **seamless** = ``false`` +:ref:`bool<class_bool>` **seamless** = ``false`` :ref:`🔗<class_NoiseTexture3D_property_seamless>` .. rst-class:: classref-property-setget -- void **set_seamless** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_seamless** **(** **)** +- |void| **set_seamless**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_seamless**\ (\ ) If ``true``, a seamless texture is requested from the :ref:`Noise<class_Noise>` resource. @@ -196,12 +196,12 @@ If ``true``, a seamless texture is requested from the :ref:`Noise<class_Noise>` .. rst-class:: classref-property -:ref:`float<class_float>` **seamless_blend_skirt** = ``0.1`` +:ref:`float<class_float>` **seamless_blend_skirt** = ``0.1`` :ref:`🔗<class_NoiseTexture3D_property_seamless_blend_skirt>` .. rst-class:: classref-property-setget -- void **set_seamless_blend_skirt** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_seamless_blend_skirt** **(** **)** +- |void| **set_seamless_blend_skirt**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_seamless_blend_skirt**\ (\ ) Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See :ref:`Noise<class_Noise>` for further details. @@ -215,12 +215,12 @@ Used for the default/fallback implementation of the seamless texture generation. .. rst-class:: classref-property -:ref:`int<class_int>` **width** = ``64`` +:ref:`int<class_int>` **width** = ``64`` :ref:`🔗<class_NoiseTexture3D_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_width**\ (\ ) Width of the generated texture (in pixels). @@ -231,3 +231,4 @@ Width of the generated texture (in pixels). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_object.rst b/classes/class_object.rst index f432023454d..4910f84f598 100644 --- a/classes/class_object.rst +++ b/classes/class_object.rst @@ -10,7 +10,7 @@ Object ====== -**Inherited By:** :ref:`AudioServer<class_AudioServer>`, :ref:`CameraServer<class_CameraServer>`, :ref:`ClassDB<class_ClassDB>`, :ref:`DisplayServer<class_DisplayServer>`, :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>`, :ref:`EditorInterface<class_EditorInterface>`, :ref:`EditorPaths<class_EditorPaths>`, :ref:`EditorSelection<class_EditorSelection>`, :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>`, :ref:`EditorVCSInterface<class_EditorVCSInterface>`, :ref:`Engine<class_Engine>`, :ref:`EngineDebugger<class_EngineDebugger>`, :ref:`GDExtensionManager<class_GDExtensionManager>`, :ref:`Geometry2D<class_Geometry2D>`, :ref:`Geometry3D<class_Geometry3D>`, :ref:`GodotSharp<class_GodotSharp>`, :ref:`Input<class_Input>`, :ref:`InputMap<class_InputMap>`, :ref:`IP<class_IP>`, :ref:`JavaClassWrapper<class_JavaClassWrapper>`, :ref:`JavaScriptBridge<class_JavaScriptBridge>`, :ref:`JNISingleton<class_JNISingleton>`, :ref:`JSONRPC<class_JSONRPC>`, :ref:`MainLoop<class_MainLoop>`, :ref:`Marshalls<class_Marshalls>`, :ref:`MovieWriter<class_MovieWriter>`, :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>`, :ref:`NavigationServer2D<class_NavigationServer2D>`, :ref:`NavigationServer3D<class_NavigationServer3D>`, :ref:`Node<class_Node>`, :ref:`OS<class_OS>`, :ref:`Performance<class_Performance>`, :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>`, :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`, :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>`, :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>`, :ref:`PhysicsServer2D<class_PhysicsServer2D>`, :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>`, :ref:`PhysicsServer3D<class_PhysicsServer3D>`, :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>`, :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`, :ref:`ProjectSettings<class_ProjectSettings>`, :ref:`RefCounted<class_RefCounted>`, :ref:`RenderingDevice<class_RenderingDevice>`, :ref:`RenderingServer<class_RenderingServer>`, :ref:`ResourceLoader<class_ResourceLoader>`, :ref:`ResourceSaver<class_ResourceSaver>`, :ref:`ResourceUID<class_ResourceUID>`, :ref:`ScriptLanguage<class_ScriptLanguage>`, :ref:`TextServerManager<class_TextServerManager>`, :ref:`ThemeDB<class_ThemeDB>`, :ref:`TileData<class_TileData>`, :ref:`Time<class_Time>`, :ref:`TranslationServer<class_TranslationServer>`, :ref:`TreeItem<class_TreeItem>`, :ref:`UndoRedo<class_UndoRedo>`, :ref:`WorkerThreadPool<class_WorkerThreadPool>`, :ref:`XRServer<class_XRServer>` +**Inherited By:** :ref:`AudioServer<class_AudioServer>`, :ref:`CameraServer<class_CameraServer>`, :ref:`ClassDB<class_ClassDB>`, :ref:`DisplayServer<class_DisplayServer>`, :ref:`EditorFileSystemDirectory<class_EditorFileSystemDirectory>`, :ref:`EditorInterface<class_EditorInterface>`, :ref:`EditorPaths<class_EditorPaths>`, :ref:`EditorSelection<class_EditorSelection>`, :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>`, :ref:`EditorVCSInterface<class_EditorVCSInterface>`, :ref:`Engine<class_Engine>`, :ref:`EngineDebugger<class_EngineDebugger>`, :ref:`FramebufferCacheRD<class_FramebufferCacheRD>`, :ref:`GDExtensionManager<class_GDExtensionManager>`, :ref:`Geometry2D<class_Geometry2D>`, :ref:`Geometry3D<class_Geometry3D>`, :ref:`Input<class_Input>`, :ref:`InputMap<class_InputMap>`, :ref:`IP<class_IP>`, :ref:`JavaClassWrapper<class_JavaClassWrapper>`, :ref:`JavaScriptBridge<class_JavaScriptBridge>`, :ref:`JNISingleton<class_JNISingleton>`, :ref:`JSONRPC<class_JSONRPC>`, :ref:`MainLoop<class_MainLoop>`, :ref:`Marshalls<class_Marshalls>`, :ref:`MovieWriter<class_MovieWriter>`, :ref:`NativeMenu<class_NativeMenu>`, :ref:`NavigationMeshGenerator<class_NavigationMeshGenerator>`, :ref:`NavigationServer2D<class_NavigationServer2D>`, :ref:`NavigationServer3D<class_NavigationServer3D>`, :ref:`Node<class_Node>`, :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`, :ref:`OpenXRInteractionProfileMetadata<class_OpenXRInteractionProfileMetadata>`, :ref:`OS<class_OS>`, :ref:`Performance<class_Performance>`, :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>`, :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`, :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>`, :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>`, :ref:`PhysicsServer2D<class_PhysicsServer2D>`, :ref:`PhysicsServer2DManager<class_PhysicsServer2DManager>`, :ref:`PhysicsServer3D<class_PhysicsServer3D>`, :ref:`PhysicsServer3DManager<class_PhysicsServer3DManager>`, :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`, :ref:`ProjectSettings<class_ProjectSettings>`, :ref:`RefCounted<class_RefCounted>`, :ref:`RenderData<class_RenderData>`, :ref:`RenderingDevice<class_RenderingDevice>`, :ref:`RenderingServer<class_RenderingServer>`, :ref:`RenderSceneData<class_RenderSceneData>`, :ref:`ResourceLoader<class_ResourceLoader>`, :ref:`ResourceSaver<class_ResourceSaver>`, :ref:`ResourceUID<class_ResourceUID>`, :ref:`ScriptLanguage<class_ScriptLanguage>`, :ref:`TextServerManager<class_TextServerManager>`, :ref:`ThemeDB<class_ThemeDB>`, :ref:`TileData<class_TileData>`, :ref:`Time<class_Time>`, :ref:`TranslationServer<class_TranslationServer>`, :ref:`TreeItem<class_TreeItem>`, :ref:`UndoRedo<class_UndoRedo>`, :ref:`UniformSetCacheRD<class_UniformSetCacheRD>`, :ref:`WorkerThreadPool<class_WorkerThreadPool>`, :ref:`XRServer<class_XRServer>`, :ref:`XRVRS<class_XRVRS>` Base class for all other classes in the engine. @@ -21,13 +21,13 @@ Description An advanced :ref:`Variant<class_Variant>` type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes. For example, a :ref:`Sprite2D<class_Sprite2D>` instance is able to call :ref:`Node.add_child<class_Node_method_add_child>` because it inherits from :ref:`Node<class_Node>`. -You can create new instances, using ``Object.new()`` in GDScript, or ``new Object`` in C#. +You can create new instances, using ``Object.new()`` in GDScript, or ``new GodotObject`` in C#. To delete an Object instance, call :ref:`free<class_Object_method_free>`. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, :ref:`RefCounted<class_RefCounted>` (and by extension :ref:`Resource<class_Resource>`) deletes itself when no longer referenced, and :ref:`Node<class_Node>` deletes its children when freed. Objects can have a :ref:`Script<class_Script>` attached to them. Once the :ref:`Script<class_Script>` is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. -Inside a :ref:`Script<class_Script>`, :ref:`_get_property_list<class_Object_method__get_property_list>` may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the :ref:`@GDScript.@export<class_@GDScript_annotation_@export>` annotation. +Inside a :ref:`Script<class_Script>`, :ref:`_get_property_list<class_Object_private_method__get_property_list>` may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the :ref:`@GDScript.@export<class_@GDScript_annotation_@export>` annotation. Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as :ref:`set<class_Object_method_set>`, :ref:`get<class_Object_method_get>`, :ref:`call<class_Object_method_call>`, :ref:`has_method<class_Object_method_has_method>`, :ref:`has_signal<class_Object_method_has_signal>`, etc. Note that these methods are **much** slower than direct references. @@ -41,7 +41,7 @@ In GDScript, you can also check if a given property, method, or signal name exis print("tree_entered" in node) # Prints true print("unknown" in node) # Prints false -Notifications are :ref:`int<class_int>` constants commonly sent and received by objects. For example, on every rendered frame, the :ref:`SceneTree<class_SceneTree>` notifies nodes inside the tree with a :ref:`Node.NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`. The nodes receive it and may call :ref:`Node._process<class_Node_method__process>` to update. To make use of notifications, see :ref:`notification<class_Object_method_notification>` and :ref:`_notification<class_Object_method__notification>`. +Notifications are :ref:`int<class_int>` constants commonly sent and received by objects. For example, on every rendered frame, the :ref:`SceneTree<class_SceneTree>` notifies nodes inside the tree with a :ref:`Node.NOTIFICATION_PROCESS<class_Node_constant_NOTIFICATION_PROCESS>`. The nodes receive it and may call :ref:`Node._process<class_Node_private_method__process>` to update. To make use of notifications, see :ref:`notification<class_Object_method_notification>` and :ref:`_notification<class_Object_private_method__notification>`. Lastly, every object can also contain metadata (data about data). :ref:`set_meta<class_Object_method_set_meta>` can be useful to store information that the object itself does not depend on. To keep your code clean, making excessive use of metadata is discouraged. @@ -68,113 +68,119 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get<class_Object_method__get>` **(** :ref:`StringName<class_StringName>` property **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_property_list<class_Object_method__get_property_list>` **(** **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init<class_Object_method__init>` **(** **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_notification<class_Object_method__notification>` **(** :ref:`int<class_int>` what **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_property_can_revert<class_Object_method__property_can_revert>` **(** :ref:`StringName<class_StringName>` property **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_property_get_revert<class_Object_method__property_get_revert>` **(** :ref:`StringName<class_StringName>` property **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_set<class_Object_method__set>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_to_string<class_Object_method__to_string>` **(** **)** |virtual| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_user_signal<class_Object_method_add_user_signal>` **(** :ref:`String<class_String>` signal, :ref:`Array<class_Array>` arguments=[] **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`call<class_Object_method_call>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`call_deferred<class_Object_method_call_deferred>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`callv<class_Object_method_callv>` **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` arg_array **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_translate_messages<class_Object_method_can_translate_messages>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cancel_free<class_Object_method_cancel_free>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect<class_Object_method_connect>` **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable, :ref:`int<class_int>` flags=0 **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect<class_Object_method_disconnect>` **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`emit_signal<class_Object_method_emit_signal>` **(** :ref:`StringName<class_StringName>` signal, ... **)** |vararg| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free<class_Object_method_free>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get<class_Object_method_get>` **(** :ref:`StringName<class_StringName>` property **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_class<class_Object_method_get_class>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_incoming_connections<class_Object_method_get_incoming_connections>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_indexed<class_Object_method_get_indexed>` **(** :ref:`NodePath<class_NodePath>` property_path **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_instance_id<class_Object_method_get_instance_id>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_meta<class_Object_method_get_meta>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` default=null **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`get_meta_list<class_Object_method_get_meta_list>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_method_list<class_Object_method_get_method_list>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_property_list<class_Object_method_get_property_list>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_script<class_Object_method_get_script>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_signal_connection_list<class_Object_method_get_signal_connection_list>` **(** :ref:`StringName<class_StringName>` signal **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_signal_list<class_Object_method_get_signal_list>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_meta<class_Object_method_has_meta>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_method<class_Object_method_has_method>` **(** :ref:`StringName<class_StringName>` method **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_signal<class_Object_method_has_signal>` **(** :ref:`StringName<class_StringName>` signal **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_user_signal<class_Object_method_has_user_signal>` **(** :ref:`StringName<class_StringName>` signal **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_blocking_signals<class_Object_method_is_blocking_signals>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_class<class_Object_method_is_class>` **(** :ref:`String<class_String>` class **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_connected<class_Object_method_is_connected>` **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_queued_for_deletion<class_Object_method_is_queued_for_deletion>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notification<class_Object_method_notification>` **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_property_list_changed<class_Object_method_notify_property_list_changed>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`property_can_revert<class_Object_method_property_can_revert>` **(** :ref:`StringName<class_StringName>` property **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`property_get_revert<class_Object_method_property_get_revert>` **(** :ref:`StringName<class_StringName>` property **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_meta<class_Object_method_remove_meta>` **(** :ref:`StringName<class_StringName>` name **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_Object_method_set>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_block_signals<class_Object_method_set_block_signals>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_deferred<class_Object_method_set_deferred>` **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_indexed<class_Object_method_set_indexed>` **(** :ref:`NodePath<class_NodePath>` property_path, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_message_translation<class_Object_method_set_message_translation>` **(** :ref:`bool<class_bool>` enable **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_meta<class_Object_method_set_meta>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_script<class_Object_method_set_script>` **(** :ref:`Variant<class_Variant>` script **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_string<class_Object_method_to_string>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`tr<class_Object_method_tr>` **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`tr_n<class_Object_method_tr_n>` **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get<class_Object_private_method__get>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_property_list<class_Object_private_method__get_property_list>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_init<class_Object_private_method__init>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_notification<class_Object_private_method__notification>`\ (\ what\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_property_can_revert<class_Object_private_method__property_can_revert>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_property_get_revert<class_Object_private_method__property_get_revert>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_set<class_Object_private_method__set>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_to_string<class_Object_private_method__to_string>`\ (\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_validate_property<class_Object_private_method__validate_property>`\ (\ property\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_user_signal<class_Object_method_add_user_signal>`\ (\ signal\: :ref:`String<class_String>`, arguments\: :ref:`Array<class_Array>` = []\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`call<class_Object_method_call>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`call_deferred<class_Object_method_call_deferred>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`callv<class_Object_method_callv>`\ (\ method\: :ref:`StringName<class_StringName>`, arg_array\: :ref:`Array<class_Array>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_translate_messages<class_Object_method_can_translate_messages>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_free<class_Object_method_cancel_free>`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect<class_Object_method_connect>`\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`, flags\: :ref:`int<class_int>` = 0\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect<class_Object_method_disconnect>`\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`emit_signal<class_Object_method_emit_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free<class_Object_method_free>`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get<class_Object_method_get>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_class<class_Object_method_get_class>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_incoming_connections<class_Object_method_get_incoming_connections>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_indexed<class_Object_method_get_indexed>`\ (\ property_path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_instance_id<class_Object_method_get_instance_id>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_meta<class_Object_method_get_meta>`\ (\ name\: :ref:`StringName<class_StringName>`, default\: :ref:`Variant<class_Variant>` = null\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_meta_list<class_Object_method_get_meta_list>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_method_argument_count<class_Object_method_get_method_argument_count>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_method_list<class_Object_method_get_method_list>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_property_list<class_Object_method_get_property_list>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_script<class_Object_method_get_script>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_signal_connection_list<class_Object_method_get_signal_connection_list>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_signal_list<class_Object_method_get_signal_list>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_meta<class_Object_method_has_meta>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_method<class_Object_method_has_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_signal<class_Object_method_has_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_user_signal<class_Object_method_has_user_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_blocking_signals<class_Object_method_is_blocking_signals>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_class<class_Object_method_is_class>`\ (\ class\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_connected<class_Object_method_is_connected>`\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_queued_for_deletion<class_Object_method_is_queued_for_deletion>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notification<class_Object_method_notification>`\ (\ what\: :ref:`int<class_int>`, reversed\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_property_list_changed<class_Object_method_notify_property_list_changed>`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`property_can_revert<class_Object_method_property_can_revert>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`property_get_revert<class_Object_method_property_get_revert>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_meta<class_Object_method_remove_meta>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_user_signal<class_Object_method_remove_user_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_Object_method_set>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_block_signals<class_Object_method_set_block_signals>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_deferred<class_Object_method_set_deferred>`\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_indexed<class_Object_method_set_indexed>`\ (\ property_path\: :ref:`NodePath<class_NodePath>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_message_translation<class_Object_method_set_message_translation>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_meta<class_Object_method_set_meta>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_script<class_Object_method_set_script>`\ (\ script\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_string<class_Object_method_to_string>`\ (\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`tr<class_Object_method_tr>`\ (\ message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`tr_n<class_Object_method_tr_n>`\ (\ message\: :ref:`StringName<class_StringName>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -189,7 +195,7 @@ Signals .. rst-class:: classref-signal -**property_list_changed** **(** **)** +**property_list_changed**\ (\ ) :ref:`🔗<class_Object_signal_property_list_changed>` Emitted when :ref:`notify_property_list_changed<class_Object_method_notify_property_list_changed>` is called. @@ -201,7 +207,7 @@ Emitted when :ref:`notify_property_list_changed<class_Object_method_notify_prope .. rst-class:: classref-signal -**script_changed** **(** **)** +**script_changed**\ (\ ) :ref:`🔗<class_Object_signal_script_changed>` Emitted when the object's script is changed. @@ -220,7 +226,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ConnectFlags**: +enum **ConnectFlags**: :ref:`🔗<enum_Object_ConnectFlags>` .. _class_Object_constant_CONNECT_DEFERRED: @@ -267,7 +273,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_POSTINITIALIZE** = ``0`` +**NOTIFICATION_POSTINITIALIZE** = ``0`` :ref:`🔗<class_Object_constant_NOTIFICATION_POSTINITIALIZE>` Notification received when the object is initialized, before its script is attached. Used internally. @@ -275,10 +281,18 @@ Notification received when the object is initialized, before its script is attac .. rst-class:: classref-constant -**NOTIFICATION_PREDELETE** = ``1`` +**NOTIFICATION_PREDELETE** = ``1`` :ref:`🔗<class_Object_constant_NOTIFICATION_PREDELETE>` Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages. +.. _class_Object_constant_NOTIFICATION_EXTENSION_RELOADED: + +.. rst-class:: classref-constant + +**NOTIFICATION_EXTENSION_RELOADED** = ``2`` :ref:`🔗<class_Object_constant_NOTIFICATION_EXTENSION_RELOADED>` + +Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived. + .. rst-class:: classref-section-separator ---- @@ -288,15 +302,15 @@ Notification received when the object is about to be deleted. Can act as the dec Method Descriptions ------------------- -.. _class_Object_method__get: +.. _class_Object_private_method__get: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get** **(** :ref:`StringName<class_StringName>` property **)** |virtual| +:ref:`Variant<class_Variant>` **_get**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| :ref:`🔗<class_Object_private_method__get>` Override this method to customize the behavior of :ref:`get<class_Object_method_get>`. Should return the given ``property``'s value, or ``null`` if the ``property`` should be handled normally. -Combined with :ref:`_set<class_Object_method__set>` and :ref:`_get_property_list<class_Object_method__get_property_list>`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in :ref:`get_property_list<class_Object_method_get_property_list>`, otherwise this method will not be called. +Combined with :ref:`_set<class_Object_private_method__set>` and :ref:`_get_property_list<class_Object_private_method__get_property_list>`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in :ref:`get_property_list<class_Object_method_get_property_list>`, otherwise this method will not be called. .. tabs:: @@ -304,7 +318,7 @@ Combined with :ref:`_set<class_Object_method__set>` and :ref:`_get_property_list .. code-tab:: gdscript func _get(property): - if (property == "fake_property"): + if property == "fake_property": print("Getting my property!") return 4 @@ -343,17 +357,19 @@ Combined with :ref:`_set<class_Object_method__set>` and :ref:`_get_property_list ---- -.. _class_Object_method__get_property_list: +.. _class_Object_private_method__get_property_list: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_property_list** **(** **)** |virtual| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_property_list**\ (\ ) |virtual| :ref:`🔗<class_Object_private_method__get_property_list>` -Override this method to customize how script properties should be handled by the engine. +Override this method to provide a custom list of additional properties to handle by the engine. Should return a property list, as an :ref:`Array<class_Array>` of dictionaries. The result is added to the array of :ref:`get_property_list<class_Object_method_get_property_list>`, and should be formatted in the same way. Each :ref:`Dictionary<class_Dictionary>` must at least contain the ``name`` and ``type`` entries. -The example below displays ``hammer_type`` in the Inspector dock, only if ``holding_hammer`` is ``true``: +You can use :ref:`_property_can_revert<class_Object_private_method__property_can_revert>` and :ref:`_property_get_revert<class_Object_private_method__property_get_revert>` to customize the default values of the properties added by this method. + +The example below displays a list of numbers shown as words going from ``ZERO`` to ``FIVE``, with ``number_count`` controlling the size of the list: .. tabs:: @@ -361,79 +377,107 @@ The example below displays ``hammer_type`` in the Inspector dock, only if ``hold .. code-tab:: gdscript @tool - extends Node2D + extends Node - @export var holding_hammer = false: - set(value): - holding_hammer = value + @export var number_count = 3: + set(nc): + number_count = nc + numbers.resize(number_count) notify_property_list_changed() - var hammer_type = 0 - func _get_property_list(): - # By default, `hammer_type` is not visible in the editor. - var property_usage = PROPERTY_USAGE_NO_EDITOR - - if holding_hammer: - property_usage = PROPERTY_USAGE_DEFAULT + var numbers = PackedInt32Array([0, 0, 0]) + func _get_property_list(): var properties = [] - properties.append({ - "name": "hammer_type", - "type": TYPE_INT, - "usage": property_usage, # See above assignment. - "hint": PROPERTY_HINT_ENUM, - "hint_string": "Wooden,Iron,Golden,Enchanted" - }) + + for i in range(number_count): + properties.append({ + "name": "number_%d" % i, + "type": TYPE_INT, + "hint": PROPERTY_HINT_ENUM, + "hint_string": "ZERO,ONE,TWO,THREE,FOUR,FIVE", + }) return properties + + func _get(property): + if property.begins_with("number_"): + var index = property.get_slice("_", 1).to_int() + return numbers[index] + + func _set(property, value): + if property.begins_with("number_"): + var index = property.get_slice("_", 1).to_int() + numbers[index] = value + return true + return false .. code-tab:: csharp [Tool] - public partial class MyNode2D : Node2D + public partial class MyNode : Node { - private bool _holdingHammer; + private int _numberCount; [Export] - public bool HoldingHammer + public int NumberCount { - get => _holdingHammer; + get => _numberCount; set { - _holdingHammer = value; + _numberCount = value; + _numbers.Resize(_numberCount); NotifyPropertyListChanged(); } } - public int HammerType { get; set; } + private List<int> _numbers = new(); public override Godot.Collections.Array<Godot.Collections.Dictionary> _GetPropertyList() { - // By default, `HammerType` is not visible in the editor. - var propertyUsage = PropertyUsageFlags.NoEditor; + var properties = new Godot.Collections.Array<Godot.Collections.Dictionary>(); - if (HoldingHammer) + for (int i = 0; i < _numberCount; i++) { - propertyUsage = PropertyUsageFlags.Default; + properties.Add(new Godot.Collections.Dictionary() + { + { "name", $"number_{i}" }, + { "type", (int)Variant.Type.Int }, + { "hint", (int)PropertyHint.Enum }, + { "hint_string", "Zero,One,Two,Three,Four,Five" }, + }); } - var properties = new Godot.Collections.Array<Godot.Collections.Dictionary>(); - properties.Add(new Godot.Collections.Dictionary() + return properties; + } + + public override Variant _Get(StringName property) + { + string propertyName = property.ToString(); + if (propertyName.StartsWith("number_")) { - { "name", "HammerType" }, - { "type", (int)Variant.Type.Int }, - { "usage", (int)propertyUsage }, // See above assignment. - { "hint", (int)PropertyHint.Enum }, - { "hint_string", "Wooden,Iron,Golden,Enchanted" } - }); + int index = int.Parse(propertyName.Substring("number_".Length)); + return _numbers[index]; + } + return default; + } - return properties; + public override bool _Set(StringName property, Variant value) + { + string propertyName = property.ToString(); + if (propertyName.StartsWith("number_")) + { + int index = int.Parse(propertyName.Substring("number_".Length)); + numbers[index] = value.As<int>(); + return true; + } + return false; } } -\ **Note:** This method is intended for advanced purposes. For most common use cases, the scripting languages offer easier ways to handle properties. See :ref:`@GDScript.@export<class_@GDScript_annotation_@export>`, :ref:`@GDScript.@export_enum<class_@GDScript_annotation_@export_enum>`, :ref:`@GDScript.@export_group<class_@GDScript_annotation_@export_group>`, etc. +\ **Note:** This method is intended for advanced purposes. For most common use cases, the scripting languages offer easier ways to handle properties. See :ref:`@GDScript.@export<class_@GDScript_annotation_@export>`, :ref:`@GDScript.@export_enum<class_@GDScript_annotation_@export_enum>`, :ref:`@GDScript.@export_group<class_@GDScript_annotation_@export_group>`, etc. If you want to customize exported properties, use :ref:`_validate_property<class_Object_private_method__validate_property>`. \ **Note:** If the object's script is not :ref:`@GDScript.@tool<class_@GDScript_annotation_@tool>`, this method will not be called in the editor. @@ -441,25 +485,25 @@ The example below displays ``hammer_type`` in the Inspector dock, only if ``hold ---- -.. _class_Object_method__init: +.. _class_Object_private_method__init: .. rst-class:: classref-method -void **_init** **(** **)** |virtual| +|void| **_init**\ (\ ) |virtual| :ref:`🔗<class_Object_private_method__init>` -Called when the object's script is instantiated, oftentimes after the object is initialized in memory (through ``Object.new()`` in GDScript, or ``new Object`` in C#). It can be also defined to take in parameters. This method is similar to a constructor in most programming languages. +Called when the object's script is instantiated, oftentimes after the object is initialized in memory (through ``Object.new()`` in GDScript, or ``new GodotObject`` in C#). It can be also defined to take in parameters. This method is similar to a constructor in most programming languages. -\ **Note:** If :ref:`_init<class_Object_method__init>` is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` or :ref:`Node.duplicate<class_Node_method_duplicate>`) are used, the script's initialization will fail. +\ **Note:** If :ref:`_init<class_Object_private_method__init>` is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` or :ref:`Node.duplicate<class_Node_method_duplicate>`) are used, the script's initialization will fail. .. rst-class:: classref-item-separator ---- -.. _class_Object_method__notification: +.. _class_Object_private_method__notification: .. rst-class:: classref-method -void **_notification** **(** :ref:`int<class_int>` what **)** |virtual| +|void| **_notification**\ (\ what\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_Object_private_method__notification>` Called when the object receives a notification, which can be identified in ``what`` by comparing it with a constant. See also :ref:`notification<class_Object_method_notification>`. @@ -490,13 +534,13 @@ Called when the object receives a notification, which can be identified in ``wha ---- -.. _class_Object_method__property_can_revert: +.. _class_Object_private_method__property_can_revert: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_property_can_revert** **(** :ref:`StringName<class_StringName>` property **)** |virtual| +:ref:`bool<class_bool>` **_property_can_revert**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| :ref:`🔗<class_Object_private_method__property_can_revert>` -Override this method to customize the given ``property``'s revert behavior. Should return ``true`` if the ``property`` can be reverted in the Inspector dock. Use :ref:`_property_get_revert<class_Object_method__property_get_revert>` to specify the ``property``'s default value. +Override this method to customize the given ``property``'s revert behavior. Should return ``true`` if the ``property`` has a custom default value and is revertible in the Inspector dock. Use :ref:`_property_get_revert<class_Object_private_method__property_get_revert>` to specify the ``property``'s default value. \ **Note:** This method must return consistently, regardless of the current value of the ``property``. @@ -504,38 +548,43 @@ Override this method to customize the given ``property``'s revert behavior. Shou ---- -.. _class_Object_method__property_get_revert: +.. _class_Object_private_method__property_get_revert: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_property_get_revert** **(** :ref:`StringName<class_StringName>` property **)** |virtual| +:ref:`Variant<class_Variant>` **_property_get_revert**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| :ref:`🔗<class_Object_private_method__property_get_revert>` Override this method to customize the given ``property``'s revert behavior. Should return the default value for the ``property``. If the default value differs from the ``property``'s current value, a revert icon is displayed in the Inspector dock. -\ **Note:** :ref:`_property_can_revert<class_Object_method__property_can_revert>` must also be overridden for this method to be called. +\ **Note:** :ref:`_property_can_revert<class_Object_private_method__property_can_revert>` must also be overridden for this method to be called. .. rst-class:: classref-item-separator ---- -.. _class_Object_method__set: +.. _class_Object_private_method__set: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_set** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** |virtual| +:ref:`bool<class_bool>` **_set**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_Object_private_method__set>` Override this method to customize the behavior of :ref:`set<class_Object_method_set>`. Should set the ``property`` to ``value`` and return ``true``, or ``false`` if the ``property`` should be handled normally. The *exact* way to set the ``property`` is up to this method's implementation. -Combined with :ref:`_get<class_Object_method__get>` and :ref:`_get_property_list<class_Object_method__get_property_list>`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in :ref:`get_property_list<class_Object_method_get_property_list>`, otherwise this method will not be called. +Combined with :ref:`_get<class_Object_private_method__get>` and :ref:`_get_property_list<class_Object_private_method__get_property_list>`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in :ref:`get_property_list<class_Object_method_get_property_list>`, otherwise this method will not be called. .. tabs:: .. code-tab:: gdscript + var internal_data = {} + func _set(property, value): - if (property == "fake_property"): - print("Setting my property to ", value) + if property == "fake_property": + # Storing the value in the fake property. + internal_data["fake_property"] = value + return true + return false func _get_property_list(): return [ @@ -544,11 +593,14 @@ Combined with :ref:`_get<class_Object_method__get>` and :ref:`_get_property_list .. code-tab:: csharp - public override void _Set(StringName property, Variant value) + private Godot.Collections.Dictionary _internalData = new Godot.Collections.Dictionary(); + + public override bool _Set(StringName property, Variant value) { if (property == "FakeProperty") { - GD.Print($"Setting my property to {value}"); + // Storing the value in the fake property. + _internalData["FakeProperty"] = value; return true; } @@ -573,11 +625,11 @@ Combined with :ref:`_get<class_Object_method__get>` and :ref:`_get_property_list ---- -.. _class_Object_method__to_string: +.. _class_Object_private_method__to_string: .. rst-class:: classref-method -:ref:`String<class_String>` **_to_string** **(** **)** |virtual| +:ref:`String<class_String>` **_to_string**\ (\ ) |virtual| :ref:`🔗<class_Object_private_method__to_string>` Override this method to customize the return value of :ref:`to_string<class_Object_method_to_string>`, and therefore the object's representation as a :ref:`String<class_String>`. @@ -590,6 +642,69 @@ Override this method to customize the return value of :ref:`to_string<class_Obje print(self) # Prints Welcome to Godot 4!" var a = str(self) # a is "Welcome to Godot 4!" +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_private_method__validate_property: + +.. rst-class:: classref-method + +|void| **_validate_property**\ (\ property\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_Object_private_method__validate_property>` + +Override this method to customize existing properties. Every property info goes through this method, except properties added with :ref:`_get_property_list<class_Object_private_method__get_property_list>`. The dictionary contents is the same as in :ref:`_get_property_list<class_Object_private_method__get_property_list>`. + + +.. tabs:: + + .. code-tab:: gdscript + + @tool + extends Node + + @export var is_number_editable: bool: + set(value): + is_number_editable = value + notify_property_list_changed() + @export var number: int + + func _validate_property(property: Dictionary): + if property.name == "number" and not is_number_editable: + property.usage |= PROPERTY_USAGE_READ_ONLY + + .. code-tab:: csharp + + [Tool] + public partial class MyNode : Node + { + private bool _isNumberEditable; + + [Export] + public bool IsNumberEditable + { + get => _isNumberEditable; + set + { + _isNumberEditable = value; + NotifyPropertyListChanged(); + } + } + + [Export] + public int Number { get; set; } + + public override void _ValidateProperty(Godot.Collections.Dictionary property) + { + if (property["name"].AsStringName() == PropertyName.Number && IsNumberEditable) + { + var usage = property["usage"].As<PropertyUsageFlags>() | PropertyUsageFlags.ReadOnly; + property["usage"] = (int)usage; + } + } + } + + + .. rst-class:: classref-item-separator ---- @@ -598,9 +713,9 @@ Override this method to customize the return value of :ref:`to_string<class_Obje .. rst-class:: classref-method -void **add_user_signal** **(** :ref:`String<class_String>` signal, :ref:`Array<class_Array>` arguments=[] **)** +|void| **add_user_signal**\ (\ signal\: :ref:`String<class_String>`, arguments\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_Object_method_add_user_signal>` -Adds a user-defined ``signal``. Optional arguments for the signal can be added as an :ref:`Array<class_Array>` of dictionaries, each defining a ``name`` :ref:`String<class_String>` and a ``type`` :ref:`int<class_int>` (see :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`). See also :ref:`has_user_signal<class_Object_method_has_user_signal>`. +Adds a user-defined ``signal``. Optional arguments for the signal can be added as an :ref:`Array<class_Array>` of dictionaries, each defining a ``name`` :ref:`String<class_String>` and a ``type`` :ref:`int<class_int>` (see :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`). See also :ref:`has_user_signal<class_Object_method_has_user_signal>` and :ref:`remove_user_signal<class_Object_method_remove_user_signal>`. .. tabs:: @@ -638,7 +753,7 @@ Adds a user-defined ``signal``. Optional arguments for the signal can be added a .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **call** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Variant<class_Variant>` **call**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Object_method_call>` Calls the ``method`` on the object and returns the result. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. @@ -667,11 +782,11 @@ Calls the ``method`` on the object and returns the result. This method supports .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **call_deferred** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +:ref:`Variant<class_Variant>` **call_deferred**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Object_method_call_deferred>` Calls the ``method`` on the object during idle time. Always returns null, **not** the method's result. -Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. If not done carefully, this can result in infinite recursion without causing a stack overflow, which will hang the game similarly to an infinite loop. +Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. @@ -713,7 +828,7 @@ See also :ref:`Callable.call_deferred<class_Callable_method_call_deferred>`. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **callv** **(** :ref:`StringName<class_StringName>` method, :ref:`Array<class_Array>` arg_array **)** +:ref:`Variant<class_Variant>` **callv**\ (\ method\: :ref:`StringName<class_StringName>`, arg_array\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_Object_method_callv>` Calls the ``method`` on the object and returns the result. Unlike :ref:`call<class_Object_method_call>`, this method expects all parameters to be contained inside ``arg_array``. @@ -742,7 +857,7 @@ Calls the ``method`` on the object and returns the result. Unlike :ref:`call<cla .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_translate_messages** **(** **)** |const| +:ref:`bool<class_bool>` **can_translate_messages**\ (\ ) |const| :ref:`🔗<class_Object_method_can_translate_messages>` Returns ``true`` if the object is allowed to translate messages with :ref:`tr<class_Object_method_tr>` and :ref:`tr_n<class_Object_method_tr_n>`. See also :ref:`set_message_translation<class_Object_method_set_message_translation>`. @@ -754,7 +869,7 @@ Returns ``true`` if the object is allowed to translate messages with :ref:`tr<cl .. rst-class:: classref-method -void **cancel_free** **(** **)** +|void| **cancel_free**\ (\ ) :ref:`🔗<class_Object_method_cancel_free>` If this method is called during :ref:`NOTIFICATION_PREDELETE<class_Object_constant_NOTIFICATION_PREDELETE>`, this object will reject being freed and will remain allocated. This is mostly an internal function used for error handling to avoid the user from freeing objects when they are not intended to. @@ -766,7 +881,7 @@ If this method is called during :ref:`NOTIFICATION_PREDELETE<class_Object_consta .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect** **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable, :ref:`int<class_int>` flags=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect**\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`, flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_Object_method_connect>` Connects a ``signal`` by name to a ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags<enum_Object_ConnectFlags>` constants). @@ -876,7 +991,7 @@ While all options have the same outcome (``button``'s :ref:`BaseButton.button_do The syntax to bind parameters is through :ref:`Callable.bind<class_Callable_method_bind>`, which returns a copy of the :ref:`Callable<class_Callable>` with its parameters bound. -When calling :ref:`emit_signal<class_Object_method_emit_signal>`, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. +When calling :ref:`emit_signal<class_Object_method_emit_signal>` or :ref:`Signal.emit<class_Signal_method_emit>`, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. .. tabs:: @@ -890,7 +1005,7 @@ When calling :ref:`emit_signal<class_Object_method_emit_signal>`, the signal par player.hit.connect(_on_player_hit.bind("sword", 100)) # Parameters added when emitting the signal are passed first. - player.emit_signal("hit", "Dark lord", 5) + player.hit.emit("Dark lord", 5) # We pass two arguments when emitting (`hit_by`, `level`), # and bind two more arguments when connecting (`weapon_type`, `damage`). @@ -928,7 +1043,7 @@ When calling :ref:`emit_signal<class_Object_method_emit_signal>`, the signal par .. rst-class:: classref-method -void **disconnect** **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable **)** +|void| **disconnect**\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_Object_method_disconnect>` Disconnects a ``signal`` by name from a given ``callable``. If the connection does not exist, generates an error. Use :ref:`is_connected<class_Object_method_is_connected>` to make sure that the connection exists. @@ -940,7 +1055,7 @@ Disconnects a ``signal`` by name from a given ``callable``. If the connection do .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **emit_signal** **(** :ref:`StringName<class_StringName>` signal, ... **)** |vararg| +:ref:`Error<enum_@GlobalScope_Error>` **emit_signal**\ (\ signal\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_Object_method_emit_signal>` Emits the given ``signal`` by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see :ref:`add_user_signal<class_Object_method_add_user_signal>`). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. @@ -971,7 +1086,7 @@ Returns :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVA .. rst-class:: classref-method -void **free** **(** **)** +|void| **free**\ (\ ) :ref:`🔗<class_Object_method_free>` Deletes the object from memory. Pre-existing references to the object become invalid, and any attempt to access them will result in a run-time error. Checking the references with :ref:`@GlobalScope.is_instance_valid<class_@GlobalScope_method_is_instance_valid>` will return ``false``. @@ -983,7 +1098,7 @@ Deletes the object from memory. Pre-existing references to the object become inv .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get** **(** :ref:`StringName<class_StringName>` property **)** |const| +:ref:`Variant<class_Variant>` **get**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_get>` Returns the :ref:`Variant<class_Variant>` value of the given ``property``. If the ``property`` does not exist, this method returns ``null``. @@ -1000,7 +1115,7 @@ Returns the :ref:`Variant<class_Variant>` value of the given ``property``. If th var node = new Node2D(); node.Rotation = 1.5f; - var a = node.Get("rotation"); // a is 1.5 + var a = node.Get(Node2D.PropertyName.Rotation); // a is 1.5 @@ -1014,7 +1129,7 @@ Returns the :ref:`Variant<class_Variant>` value of the given ``property``. If th .. rst-class:: classref-method -:ref:`String<class_String>` **get_class** **(** **)** |const| +:ref:`String<class_String>` **get_class**\ (\ ) |const| :ref:`🔗<class_Object_method_get_class>` Returns the object's built-in class name, as a :ref:`String<class_String>`. See also :ref:`is_class<class_Object_method_is_class>`. @@ -1028,7 +1143,7 @@ Returns the object's built-in class name, as a :ref:`String<class_String>`. See .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_incoming_connections** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_incoming_connections**\ (\ ) |const| :ref:`🔗<class_Object_method_get_incoming_connections>` Returns an :ref:`Array<class_Array>` of signal connections received by this object. Each connection is represented as a :ref:`Dictionary<class_Dictionary>` that contains three entries: @@ -1046,7 +1161,7 @@ Returns an :ref:`Array<class_Array>` of signal connections received by this obje .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_indexed** **(** :ref:`NodePath<class_NodePath>` property_path **)** |const| +:ref:`Variant<class_Variant>` **get_indexed**\ (\ property_path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_Object_method_get_indexed>` Gets the object's property indexed by the given ``property_path``. The path should be a :ref:`NodePath<class_NodePath>` relative to the current object and can use the colon character (``:``) to access nested properties. @@ -1083,10 +1198,12 @@ Gets the object's property indexed by the given ``property_path``. The path shou .. rst-class:: classref-method -:ref:`int<class_int>` **get_instance_id** **(** **)** |const| +:ref:`int<class_int>` **get_instance_id**\ (\ ) |const| :ref:`🔗<class_Object_method_get_instance_id>` Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedObjectAsID<class_EncodedObjectAsID>`, and can be used to retrieve this object instance with :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>`. +\ **Note:** This ID is only useful during the current session. It won't correspond to a similar object if the ID is sent over a network, or loaded from a file at a later time. + .. rst-class:: classref-item-separator ---- @@ -1095,13 +1212,13 @@ Returns the object's unique instance ID. This ID can be saved in :ref:`EncodedOb .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_meta** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` default=null **)** |const| +:ref:`Variant<class_Variant>` **get_meta**\ (\ name\: :ref:`StringName<class_StringName>`, default\: :ref:`Variant<class_Variant>` = null\ ) |const| :ref:`🔗<class_Object_method_get_meta>` Returns the object's metadata value for the given entry ``name``. If the entry does not exist, returns ``default``. If ``default`` is ``null``, an error is also generated. -\ **Note:** A metadata's ``name`` must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. -\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. .. rst-class:: classref-item-separator @@ -1111,7 +1228,7 @@ Returns the object's metadata value for the given entry ``name``. If the entry d .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **get_meta_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_meta_list**\ (\ ) |const| :ref:`🔗<class_Object_method_get_meta_list>` Returns the object's metadata entry names as a :ref:`PackedStringArray<class_PackedStringArray>`. @@ -1119,11 +1236,25 @@ Returns the object's metadata entry names as a :ref:`PackedStringArray<class_Pac ---- +.. _class_Object_method_get_method_argument_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_method_argument_count**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_get_method_argument_count>` + +Returns the number of arguments of the given ``method`` by name. + +\ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call. + +.. rst-class:: classref-item-separator + +---- + .. _class_Object_method_get_method_list: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_method_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_method_list**\ (\ ) |const| :ref:`🔗<class_Object_method_get_method_list>` Returns this object's methods and their signatures as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries: @@ -1149,7 +1280,7 @@ Returns this object's methods and their signatures as an :ref:`Array<class_Array .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_property_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_property_list**\ (\ ) |const| :ref:`🔗<class_Object_method_get_property_list>` Returns the object's property list as an :ref:`Array<class_Array>` of dictionaries. Each :ref:`Dictionary<class_Dictionary>` contains the following entries: @@ -1165,6 +1296,8 @@ Returns the object's property list as an :ref:`Array<class_Array>` of dictionari - ``usage`` is a combination of :ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>`. +\ **Note:** In GDScript, all class members are treated as properties. In C# and GDExtension, it may be necessary to explicitly mark class members as Godot properties using decorators or attributes. + .. rst-class:: classref-item-separator ---- @@ -1173,7 +1306,7 @@ Returns the object's property list as an :ref:`Array<class_Array>` of dictionari .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_script** **(** **)** |const| +:ref:`Variant<class_Variant>` **get_script**\ (\ ) |const| :ref:`🔗<class_Object_method_get_script>` Returns the object's :ref:`Script<class_Script>` instance, or ``null`` if no script is attached. @@ -1185,7 +1318,7 @@ Returns the object's :ref:`Script<class_Script>` instance, or ``null`` if no scr .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_signal_connection_list** **(** :ref:`StringName<class_StringName>` signal **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_signal_connection_list**\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_get_signal_connection_list>` Returns an :ref:`Array<class_Array>` of connections for the given ``signal`` name. Each connection is represented as a :ref:`Dictionary<class_Dictionary>` that contains three entries: @@ -1203,7 +1336,7 @@ Returns an :ref:`Array<class_Array>` of connections for the given ``signal`` nam .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_signal_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_signal_list**\ (\ ) |const| :ref:`🔗<class_Object_method_get_signal_list>` Returns the list of existing signals as an :ref:`Array<class_Array>` of dictionaries. @@ -1217,13 +1350,13 @@ Returns the list of existing signals as an :ref:`Array<class_Array>` of dictiona .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_meta** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_meta**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_has_meta>` Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta<class_Object_method_get_meta>`, :ref:`set_meta<class_Object_method_set_meta>` and :ref:`remove_meta<class_Object_method_remove_meta>`. -\ **Note:** A metadata's ``name`` must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. -\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. .. rst-class:: classref-item-separator @@ -1233,7 +1366,7 @@ Returns ``true`` if a metadata entry is found with the given ``name``. See also .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_method** **(** :ref:`StringName<class_StringName>` method **)** |const| +:ref:`bool<class_bool>` **has_method**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_has_method>` Returns ``true`` if the given ``method`` name exists in the object. @@ -1247,7 +1380,7 @@ Returns ``true`` if the given ``method`` name exists in the object. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_signal** **(** :ref:`StringName<class_StringName>` signal **)** |const| +:ref:`bool<class_bool>` **has_signal**\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_has_signal>` Returns ``true`` if the given ``signal`` name exists in the object. @@ -1261,9 +1394,9 @@ Returns ``true`` if the given ``signal`` name exists in the object. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_user_signal** **(** :ref:`StringName<class_StringName>` signal **)** |const| +:ref:`bool<class_bool>` **has_user_signal**\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_has_user_signal>` -Returns ``true`` if the given user-defined ``signal`` name exists. Only signals added with :ref:`add_user_signal<class_Object_method_add_user_signal>` are included. +Returns ``true`` if the given user-defined ``signal`` name exists. Only signals added with :ref:`add_user_signal<class_Object_method_add_user_signal>` are included. See also :ref:`remove_user_signal<class_Object_method_remove_user_signal>`. .. rst-class:: classref-item-separator @@ -1273,7 +1406,7 @@ Returns ``true`` if the given user-defined ``signal`` name exists. Only signals .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_blocking_signals** **(** **)** |const| +:ref:`bool<class_bool>` **is_blocking_signals**\ (\ ) |const| :ref:`🔗<class_Object_method_is_blocking_signals>` Returns ``true`` if the object is blocking its signals from being emitted. See :ref:`set_block_signals<class_Object_method_set_block_signals>`. @@ -1285,7 +1418,7 @@ Returns ``true`` if the object is blocking its signals from being emitted. See : .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_class** **(** :ref:`String<class_String>` class **)** |const| +:ref:`bool<class_bool>` **is_class**\ (\ class\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Object_method_is_class>` Returns ``true`` if the object inherits from the given ``class``. See also :ref:`get_class<class_Object_method_get_class>`. @@ -1318,7 +1451,7 @@ Returns ``true`` if the object inherits from the given ``class``. See also :ref: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_connected** **(** :ref:`StringName<class_StringName>` signal, :ref:`Callable<class_Callable>` callable **)** |const| +:ref:`bool<class_bool>` **is_connected**\ (\ signal\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`\ ) |const| :ref:`🔗<class_Object_method_is_connected>` Returns ``true`` if a connection exists between the given ``signal`` name and ``callable``. @@ -1332,7 +1465,7 @@ Returns ``true`` if a connection exists between the given ``signal`` name and `` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_queued_for_deletion** **(** **)** |const| +:ref:`bool<class_bool>` **is_queued_for_deletion**\ (\ ) |const| :ref:`🔗<class_Object_method_is_queued_for_deletion>` Returns ``true`` if the :ref:`Node.queue_free<class_Node_method_queue_free>` method was called for the object. @@ -1344,9 +1477,9 @@ Returns ``true`` if the :ref:`Node.queue_free<class_Node_method_queue_free>` met .. rst-class:: classref-method -void **notification** **(** :ref:`int<class_int>` what, :ref:`bool<class_bool>` reversed=false **)** +|void| **notification**\ (\ what\: :ref:`int<class_int>`, reversed\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Object_method_notification>` -Sends the given ``what`` notification to all classes inherited by the object, triggering calls to :ref:`_notification<class_Object_method__notification>`, starting from the highest ancestor (the **Object** class) and going down to the object's script. +Sends the given ``what`` notification to all classes inherited by the object, triggering calls to :ref:`_notification<class_Object_private_method__notification>`, starting from the highest ancestor (the **Object** class) and going down to the object's script. If ``reversed`` is ``true``, the call order is reversed. @@ -1385,7 +1518,7 @@ If ``reversed`` is ``true``, the call order is reversed. .. rst-class:: classref-method -void **notify_property_list_changed** **(** **)** +|void| **notify_property_list_changed**\ (\ ) :ref:`🔗<class_Object_method_notify_property_list_changed>` Emits the :ref:`property_list_changed<class_Object_signal_property_list_changed>` signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated. @@ -1397,11 +1530,11 @@ Emits the :ref:`property_list_changed<class_Object_signal_property_list_changed> .. rst-class:: classref-method -:ref:`bool<class_bool>` **property_can_revert** **(** :ref:`StringName<class_StringName>` property **)** |const| +:ref:`bool<class_bool>` **property_can_revert**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_property_can_revert>` Returns ``true`` if the given ``property`` has a custom default value. Use :ref:`property_get_revert<class_Object_method_property_get_revert>` to get the ``property``'s default value. -\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_can_revert<class_Object_method__property_can_revert>` to customize the default value. If :ref:`_property_can_revert<class_Object_method__property_can_revert>` is not implemented, this method returns ``false``. +\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_can_revert<class_Object_private_method__property_can_revert>` to customize the default value. If :ref:`_property_can_revert<class_Object_private_method__property_can_revert>` is not implemented, this method returns ``false``. .. rst-class:: classref-item-separator @@ -1411,11 +1544,11 @@ Returns ``true`` if the given ``property`` has a custom default value. Use :ref: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **property_get_revert** **(** :ref:`StringName<class_StringName>` property **)** |const| +:ref:`Variant<class_Variant>` **property_get_revert**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Object_method_property_get_revert>` Returns the custom default value of the given ``property``. Use :ref:`property_can_revert<class_Object_method_property_can_revert>` to check if the ``property`` has a custom default value. -\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_get_revert<class_Object_method__property_get_revert>` to customize the default value. If :ref:`_property_get_revert<class_Object_method__property_get_revert>` is not implemented, this method returns ``null``. +\ **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement :ref:`_property_get_revert<class_Object_private_method__property_get_revert>` to customize the default value. If :ref:`_property_get_revert<class_Object_private_method__property_get_revert>` is not implemented, this method returns ``null``. .. rst-class:: classref-item-separator @@ -1425,13 +1558,25 @@ Returns the custom default value of the given ``property``. Use :ref:`property_c .. rst-class:: classref-method -void **remove_meta** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_meta**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Object_method_remove_meta>` Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta<class_Object_method_has_meta>`, :ref:`get_meta<class_Object_method_get_meta>` and :ref:`set_meta<class_Object_method_set_meta>`. -\ **Note:** A metadata's ``name`` must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. + +\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. -\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +.. rst-class:: classref-item-separator + +---- + +.. _class_Object_method_remove_user_signal: + +.. rst-class:: classref-method + +|void| **remove_user_signal**\ (\ signal\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Object_method_remove_user_signal>` + +Removes the given user signal ``signal`` from the object. See also :ref:`add_user_signal<class_Object_method_add_user_signal>` and :ref:`has_user_signal<class_Object_method_has_user_signal>`. .. rst-class:: classref-item-separator @@ -1441,7 +1586,7 @@ Removes the given entry ``name`` from the object's metadata. See also :ref:`has_ .. rst-class:: classref-method -void **set** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Object_method_set>` Assigns ``value`` to the given ``property``. If the property does not exist or the given ``value``'s type doesn't match, nothing happens. @@ -1457,7 +1602,7 @@ Assigns ``value`` to the given ``property``. If the property does not exist or t .. code-tab:: csharp var node = new Node2D(); - node.Set("global_scale", new Vector2(8, 2.5)); + node.Set(Node2D.PropertyName.GlobalScale, new Vector2(8, 2.5)); GD.Print(node.GlobalScale); // Prints Vector2(8, 2.5) @@ -1472,7 +1617,7 @@ Assigns ``value`` to the given ``property``. If the property does not exist or t .. rst-class:: classref-method -void **set_block_signals** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_block_signals**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Object_method_set_block_signals>` If set to ``true``, the object becomes unable to emit signals. As such, :ref:`emit_signal<class_Object_method_emit_signal>` and signal connections will not work, until it is set to ``false``. @@ -1484,7 +1629,7 @@ If set to ``true``, the object becomes unable to emit signals. As such, :ref:`em .. rst-class:: classref-method -void **set_deferred** **(** :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set_deferred**\ (\ property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Object_method_set_deferred>` Assigns ``value`` to the given ``property``, at the end of the current frame. This is equivalent to calling :ref:`set<class_Object_method_set>` through :ref:`call_deferred<class_Object_method_call_deferred>`. @@ -1496,22 +1641,22 @@ Assigns ``value`` to the given ``property``, at the end of the current frame. Th var node = Node2D.new() add_child(node) - node.rotation = 45.0 - node.set_deferred("rotation", 90.0) - print(node.rotation) # Prints 45.0 + node.rotation = 1.5 + node.set_deferred("rotation", 3.0) + print(node.rotation) # Prints 1.5 await get_tree().process_frame - print(node.rotation) # Prints 90.0 + print(node.rotation) # Prints 3.0 .. code-tab:: csharp var node = new Node2D(); - node.Rotation = 45f; - node.SetDeferred("rotation", 90f); - GD.Print(node.Rotation); // Prints 45.0 + node.Rotation = 1.5f; + node.SetDeferred(Node2D.PropertyName.Rotation, 3f); + GD.Print(node.Rotation); // Prints 1.5 await ToSignal(GetTree(), SceneTree.SignalName.ProcessFrame); - GD.Print(node.Rotation); // Prints 90.0 + GD.Print(node.Rotation); // Prints 3.0 @@ -1525,7 +1670,7 @@ Assigns ``value`` to the given ``property``, at the end of the current frame. Th .. rst-class:: classref-method -void **set_indexed** **(** :ref:`NodePath<class_NodePath>` property_path, :ref:`Variant<class_Variant>` value **)** +|void| **set_indexed**\ (\ property_path\: :ref:`NodePath<class_NodePath>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Object_method_set_indexed>` Assigns a new ``value`` to the property identified by the ``property_path``. The path should be a :ref:`NodePath<class_NodePath>` relative to this object, and can use the colon character (``:``) to access nested properties. @@ -1558,7 +1703,7 @@ Assigns a new ``value`` to the property identified by the ``property_path``. The .. rst-class:: classref-method -void **set_message_translation** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_message_translation**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Object_method_set_message_translation>` If set to ``true``, allows the object to translate messages with :ref:`tr<class_Object_method_tr>` and :ref:`tr_n<class_Object_method_tr_n>`. Enabled by default. See also :ref:`can_translate_messages<class_Object_method_can_translate_messages>`. @@ -1570,15 +1715,15 @@ If set to ``true``, allows the object to translate messages with :ref:`tr<class_ .. rst-class:: classref-method -void **set_meta** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** +|void| **set_meta**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Object_method_set_meta>` Adds or changes the entry ``name`` inside the object's metadata. The metadata ``value`` can be any :ref:`Variant<class_Variant>`, although some types cannot be serialized correctly. If ``value`` is ``null``, the entry is removed. This is the equivalent of using :ref:`remove_meta<class_Object_method_remove_meta>`. See also :ref:`has_meta<class_Object_method_has_meta>` and :ref:`get_meta<class_Object_method_get_meta>`. -\ **Note:** A metadata's ``name`` must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. +\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier<class_StringName_method_is_valid_identifier>` method. -\ **Note:** Metadata that has a ``name`` starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. .. rst-class:: classref-item-separator @@ -1588,9 +1733,9 @@ If ``value`` is ``null``, the entry is removed. This is the equivalent of using .. rst-class:: classref-method -void **set_script** **(** :ref:`Variant<class_Variant>` script **)** +|void| **set_script**\ (\ script\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Object_method_set_script>` -Attaches ``script`` to the object, and instantiates it. As a result, the script's :ref:`_init<class_Object_method__init>` is called. A :ref:`Script<class_Script>` is used to extend the object's functionality. +Attaches ``script`` to the object, and instantiates it. As a result, the script's :ref:`_init<class_Object_private_method__init>` is called. A :ref:`Script<class_Script>` is used to extend the object's functionality. If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept. @@ -1602,9 +1747,9 @@ If a script already exists, its instance is detached, and its property values an .. rst-class:: classref-method -:ref:`String<class_String>` **to_string** **(** **)** +:ref:`String<class_String>` **to_string**\ (\ ) :ref:`🔗<class_Object_method_to_string>` -Returns a :ref:`String<class_String>` representing the object. Defaults to ``"<ClassName#RID>"``. Override :ref:`_to_string<class_Object_method__to_string>` to customize the string representation of the object. +Returns a :ref:`String<class_String>` representing the object. Defaults to ``"<ClassName#RID>"``. Override :ref:`_to_string<class_Object_private_method__to_string>` to customize the string representation of the object. .. rst-class:: classref-item-separator @@ -1614,14 +1759,16 @@ Returns a :ref:`String<class_String>` representing the object. Defaults to ``"<C .. rst-class:: classref-method -:ref:`String<class_String>` **tr** **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`String<class_String>` **tr**\ (\ message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Object_method_tr>` -Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. +Translates a ``message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. Note that most :ref:`Control<class_Control>` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. If :ref:`can_translate_messages<class_Object_method_can_translate_messages>` is ``false``, or no translation is available, this method returns the ``message`` without changes. See :ref:`set_message_translation<class_Object_method_set_message_translation>`. For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/internationalizing_games>`. +\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages<class_Object_method_can_translate_messages>` method. To translate strings in a static context, use :ref:`TranslationServer.translate<class_TranslationServer_method_translate>`. + .. rst-class:: classref-item-separator ---- @@ -1630,7 +1777,7 @@ For detailed examples, see :doc:`Internationalizing games <../tutorials/i18n/int .. rst-class:: classref-method -:ref:`String<class_String>` **tr_n** **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`String<class_String>` **tr_n**\ (\ message\: :ref:`StringName<class_StringName>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Object_method_tr_n>` Translates a ``message`` or ``plural_message``, using the translation catalogs configured in the Project Settings. Further ``context`` can be specified to help with the translation. @@ -1640,7 +1787,9 @@ The ``n`` is the number, or amount, of the message's subject. It is used by the For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/localization_using_gettext>`. -\ **Note:** Negative and :ref:`float<class_float>` numbers may not properly apply to some countable subjects. It's recommended handling these cases with :ref:`tr<class_Object_method_tr>`. +\ **Note:** Negative and :ref:`float<class_float>` numbers may not properly apply to some countable subjects. It's recommended to handle these cases with :ref:`tr<class_Object_method_tr>`. + +\ **Note:** This method can't be used without an **Object** instance, as it requires the :ref:`can_translate_messages<class_Object_method_can_translate_messages>` method. To translate strings in a static context, use :ref:`TranslationServer.translate_plural<class_TranslationServer_method_translate_plural>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1649,3 +1798,4 @@ For detailed examples, see :doc:`Localization using gettext <../tutorials/i18n/l .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_occluder3d.rst b/classes/class_occluder3d.rst index 87313c3b87e..3adc96f721b 100644 --- a/classes/class_occluder3d.rst +++ b/classes/class_occluder3d.rst @@ -25,6 +25,13 @@ Description See :ref:`OccluderInstance3D<class_OccluderInstance3D>`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Methods @@ -33,11 +40,11 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_Occluder3D_method_get_indices>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_vertices<class_Occluder3D_method_get_vertices>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_indices<class_Occluder3D_method_get_indices>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`get_vertices<class_Occluder3D_method_get_vertices>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +59,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_indices**\ (\ ) |const| :ref:`🔗<class_Occluder3D_method_get_indices>` Returns the occluder shape's vertex indices. @@ -64,7 +71,7 @@ Returns the occluder shape's vertex indices. .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices** **(** **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **get_vertices**\ (\ ) |const| :ref:`🔗<class_Occluder3D_method_get_vertices>` Returns the occluder shape's vertex positions. @@ -75,3 +82,4 @@ Returns the occluder shape's vertex positions. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_occluderinstance3d.rst b/classes/class_occluderinstance3d.rst index 7d49216f05c..332353bd8fc 100644 --- a/classes/class_occluderinstance3d.rst +++ b/classes/class_occluderinstance3d.rst @@ -10,7 +10,7 @@ OccluderInstance3D ================== -**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` +**Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` Provides occlusion culling for 3D nodes, which improves performance in closed areas. @@ -29,6 +29,15 @@ The occlusion culling system works by rendering the occluders on the CPU in para \ **Note:** Occlusion culling is only effective if :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling<class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling>` is ``true``. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` and :ref:`GeometryInstance3D.visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -53,11 +62,11 @@ Methods .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_bake_mask_value<class_OccluderInstance3D_method_get_bake_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bake_mask_value<class_OccluderInstance3D_method_set_bake_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_bake_mask_value<class_OccluderInstance3D_method_get_bake_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bake_mask_value<class_OccluderInstance3D_method_set_bake_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,12 +81,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **bake_mask** = ``4294967295`` +:ref:`int<class_int>` **bake_mask** = ``4294967295`` :ref:`🔗<class_OccluderInstance3D_property_bake_mask>` .. rst-class:: classref-property-setget -- void **set_bake_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bake_mask** **(** **)** +- |void| **set_bake_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bake_mask**\ (\ ) The visual layers to account for when baking for occluders. Only :ref:`MeshInstance3D<class_MeshInstance3D>`\ s whose :ref:`VisualInstance3D.layers<class_VisualInstance3D_property_layers>` match with this :ref:`bake_mask<class_OccluderInstance3D_property_bake_mask>` will be included in the generated occluder mesh. By default, all objects with *opaque* materials are taken into account for the occluder baking. @@ -91,12 +100,12 @@ To improve performance and avoid artifacts, it is recommended to exclude dynamic .. rst-class:: classref-property -:ref:`float<class_float>` **bake_simplification_distance** = ``0.1`` +:ref:`float<class_float>` **bake_simplification_distance** = ``0.1`` :ref:`🔗<class_OccluderInstance3D_property_bake_simplification_distance>` .. rst-class:: classref-property-setget -- void **set_bake_simplification_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bake_simplification_distance** **(** **)** +- |void| **set_bake_simplification_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bake_simplification_distance**\ (\ ) The simplification distance to use for simplifying the generated occluder polygon (in 3D units). Higher values result in a less detailed occluder mesh, which improves performance but reduces culling accuracy. @@ -114,12 +123,12 @@ Setting this to ``0.0`` disables simplification entirely, but vertices in the ex .. rst-class:: classref-property -:ref:`Occluder3D<class_Occluder3D>` **occluder** +:ref:`Occluder3D<class_Occluder3D>` **occluder** :ref:`🔗<class_OccluderInstance3D_property_occluder>` .. rst-class:: classref-property-setget -- void **set_occluder** **(** :ref:`Occluder3D<class_Occluder3D>` value **)** -- :ref:`Occluder3D<class_Occluder3D>` **get_occluder** **(** **)** +- |void| **set_occluder**\ (\ value\: :ref:`Occluder3D<class_Occluder3D>`\ ) +- :ref:`Occluder3D<class_Occluder3D>` **get_occluder**\ (\ ) The occluder resource for this **OccluderInstance3D**. You can generate an occluder resource by selecting an **OccluderInstance3D** node then using the **Bake Occluders** button at the top of the editor. @@ -140,7 +149,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_bake_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_bake_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OccluderInstance3D_method_get_bake_mask_value>` Returns whether or not the specified layer of the :ref:`bake_mask<class_OccluderInstance3D_property_bake_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -152,7 +161,7 @@ Returns whether or not the specified layer of the :ref:`bake_mask<class_Occluder .. rst-class:: classref-method -void **set_bake_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_bake_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OccluderInstance3D_method_set_bake_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`bake_mask<class_OccluderInstance3D_property_bake_mask>`, given a ``layer_number`` between 1 and 32. @@ -163,3 +172,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`bake_ma .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_occluderpolygon2d.rst b/classes/class_occluderpolygon2d.rst index cf390932c8a..896ac20c74c 100644 --- a/classes/class_occluderpolygon2d.rst +++ b/classes/class_occluderpolygon2d.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CullMode**: +enum **CullMode**: :ref:`🔗<enum_OccluderPolygon2D_CullMode>` .. _class_OccluderPolygon2D_constant_CULL_DISABLED: @@ -89,12 +89,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **closed** = ``true`` +:ref:`bool<class_bool>` **closed** = ``true`` :ref:`🔗<class_OccluderPolygon2D_property_closed>` .. rst-class:: classref-property-setget -- void **set_closed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_closed** **(** **)** +- |void| **set_closed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_closed**\ (\ ) If ``true``, 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. @@ -106,12 +106,12 @@ If ``true``, closes the polygon. A closed OccluderPolygon2D occludes the light c .. rst-class:: classref-property -:ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode** = ``0`` +:ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode** = ``0`` :ref:`🔗<class_OccluderPolygon2D_property_cull_mode>` .. rst-class:: classref-property-setget -- void **set_cull_mode** **(** :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` value **)** -- :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **get_cull_mode** **(** **)** +- |void| **set_cull_mode**\ (\ value\: :ref:`CullMode<enum_OccluderPolygon2D_CullMode>`\ ) +- :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **get_cull_mode**\ (\ ) The culling mode to use. @@ -123,16 +123,16 @@ The culling mode to use. .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_OccluderPolygon2D_property_polygon>` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ ) A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions. -\ **Note:** The returned value is a copy of the underlying array, rather than a reference. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -141,3 +141,4 @@ A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices posi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_offlinemultiplayerpeer.rst b/classes/class_offlinemultiplayerpeer.rst index 1aa7b2c72ec..10ceec7ae58 100644 --- a/classes/class_offlinemultiplayerpeer.rst +++ b/classes/class_offlinemultiplayerpeer.rst @@ -30,3 +30,4 @@ This means that the :ref:`SceneTree<class_SceneTree>` will act as the multiplaye .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_oggpacketsequence.rst b/classes/class_oggpacketsequence.rst index 0daafa57530..e4b1928438b 100644 --- a/classes/class_oggpacketsequence.rst +++ b/classes/class_oggpacketsequence.rst @@ -29,13 +29,13 @@ Properties .. table:: :widths: auto - +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`granule_positions<class_OggPacketSequence_property_granule_positions>` | ``PackedInt64Array()`` | - +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ - | :ref:`Array[]<class_Array>` | :ref:`packet_data<class_OggPacketSequence_property_packet_data>` | ``[]`` | - +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ - | :ref:`float<class_float>` | :ref:`sampling_rate<class_OggPacketSequence_property_sampling_rate>` | ``0.0`` | - +-------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + +--------------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`granule_positions<class_OggPacketSequence_property_granule_positions>` | ``PackedInt64Array()`` | + +--------------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] | :ref:`packet_data<class_OggPacketSequence_property_packet_data>` | ``[]`` | + +--------------------------------------------------------+------------------------------------------------------------------------------+------------------------+ + | :ref:`float<class_float>` | :ref:`sampling_rate<class_OggPacketSequence_property_sampling_rate>` | ``0.0`` | + +--------------------------------------------------------+------------------------------------------------------------------------------+------------------------+ .. rst-class:: classref-reftable-group @@ -45,9 +45,9 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_length<class_OggPacketSequence_method_get_length>` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_length<class_OggPacketSequence_method_get_length>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,15 +62,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt64Array<class_PackedInt64Array>` **granule_positions** = ``PackedInt64Array()`` +:ref:`PackedInt64Array<class_PackedInt64Array>` **granule_positions** = ``PackedInt64Array()`` :ref:`🔗<class_OggPacketSequence_property_granule_positions>` .. rst-class:: classref-property-setget -- void **set_packet_granule_positions** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` value **)** -- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_packet_granule_positions** **(** **)** +- |void| **set_packet_granule_positions**\ (\ value\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) +- :ref:`PackedInt64Array<class_PackedInt64Array>` **get_packet_granule_positions**\ (\ ) Contains the granule positions for each page in this packet sequence. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array<class_PackedInt64Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -79,12 +81,12 @@ Contains the granule positions for each page in this packet sequence. .. rst-class:: classref-property -:ref:`Array[]<class_Array>` **packet_data** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] **packet_data** = ``[]`` :ref:`🔗<class_OggPacketSequence_property_packet_data>` .. rst-class:: classref-property-setget -- void **set_packet_data** **(** :ref:`Array[]<class_Array>` value **)** -- :ref:`Array[]<class_Array>` **get_packet_data** **(** **)** +- |void| **set_packet_data**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] **get_packet_data**\ (\ ) Contains the raw packets that make up this OggPacketSequence. @@ -96,12 +98,12 @@ Contains the raw packets that make up this OggPacketSequence. .. rst-class:: classref-property -:ref:`float<class_float>` **sampling_rate** = ``0.0`` +:ref:`float<class_float>` **sampling_rate** = ``0.0`` :ref:`🔗<class_OggPacketSequence_property_sampling_rate>` .. rst-class:: classref-property-setget -- void **set_sampling_rate** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sampling_rate** **(** **)** +- |void| **set_sampling_rate**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sampling_rate**\ (\ ) Holds sample rate information about this sequence. Must be set by another class that actually understands the codec. @@ -118,7 +120,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_length** **(** **)** |const| +:ref:`float<class_float>` **get_length**\ (\ ) |const| :ref:`🔗<class_OggPacketSequence_method_get_length>` The length of this stream, in seconds. @@ -129,3 +131,4 @@ The length of this stream, in seconds. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_oggpacketsequenceplayback.rst b/classes/class_oggpacketsequenceplayback.rst index 2c8b750f537..d974f7256c5 100644 --- a/classes/class_oggpacketsequenceplayback.rst +++ b/classes/class_oggpacketsequenceplayback.rst @@ -23,3 +23,4 @@ OggPacketSequencePlayback .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_omnilight3d.rst b/classes/class_omnilight3d.rst index 8d17e42ae40..35b810735a7 100644 --- a/classes/class_omnilight3d.rst +++ b/classes/class_omnilight3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: point + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -32,6 +35,8 @@ Tutorials - :doc:`3D lights and shadows <../tutorials/3d/lights_and_shadows>` +- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` + .. rst-class:: classref-reftable-group Properties @@ -63,7 +68,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ShadowMode**: +enum **ShadowMode**: :ref:`🔗<enum_OmniLight3D_ShadowMode>` .. _class_OmniLight3D_constant_SHADOW_DUAL_PARABOLOID: @@ -94,16 +99,20 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **omni_attenuation** = ``1.0`` +:ref:`float<class_float>` **omni_attenuation** = ``1.0`` :ref:`🔗<class_OmniLight3D_property_omni_attenuation>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) + +Controls the distance attenuation function for omnilights. + +A value of ``0.0`` will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of ``2.0`` for physically accurate lights as it results in the proper inverse square attenutation. -The light's attenuation (drop-off) curve. A number of presets are available in the **Inspector** by right-clicking the curve. Zero and negative values are allowed but can produce unusual effects. +\ **Note:** Setting attenuation to ``2.0`` or higher may result in distant objects receiving minimal light, even within range. For example, with a range of ``4096``, an object at ``100`` units is attenuated by a factor of ``0.0001``. With a default brightness of ``1``, the light would not be visible at that distance. -\ **Note:** Very high :ref:`omni_attenuation<class_OmniLight3D_property_omni_attenuation>` values (typically above 10) can impact performance negatively if the light is made to use a larger :ref:`omni_range<class_OmniLight3D_property_omni_range>` to compensate. This is because culling opportunities will become less common and shading costs will be increased (as the light will cover more pixels on screen while resulting in the same amount of brightness). To improve performance, use the lowest :ref:`omni_attenuation<class_OmniLight3D_property_omni_attenuation>` value possible for the visuals you're trying to achieve. +\ **Note:** Using negative or values higher than ``10.0`` may lead to unexpected results. .. rst-class:: classref-item-separator @@ -113,12 +122,12 @@ The light's attenuation (drop-off) curve. A number of presets are available in t .. rst-class:: classref-property -:ref:`float<class_float>` **omni_range** = ``5.0`` +:ref:`float<class_float>` **omni_range** = ``5.0`` :ref:`🔗<class_OmniLight3D_property_omni_range>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) The light's radius. Note that the effectively lit area may appear to be smaller depending on the :ref:`omni_attenuation<class_OmniLight3D_property_omni_attenuation>` in use. No matter the :ref:`omni_attenuation<class_OmniLight3D_property_omni_attenuation>` in use, the light will never reach anything outside this radius. @@ -132,12 +141,12 @@ The light's radius. Note that the effectively lit area may appear to be smaller .. rst-class:: classref-property -:ref:`ShadowMode<enum_OmniLight3D_ShadowMode>` **omni_shadow_mode** = ``1`` +:ref:`ShadowMode<enum_OmniLight3D_ShadowMode>` **omni_shadow_mode** = ``1`` :ref:`🔗<class_OmniLight3D_property_omni_shadow_mode>` .. rst-class:: classref-property-setget -- void **set_shadow_mode** **(** :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>` value **)** -- :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>` **get_shadow_mode** **(** **)** +- |void| **set_shadow_mode**\ (\ value\: :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>`\ ) +- :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>` **get_shadow_mode**\ (\ ) See :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>`. @@ -148,3 +157,4 @@ See :ref:`ShadowMode<enum_OmniLight3D_ShadowMode>`. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxraction.rst b/classes/class_openxraction.rst index 13ca5faf08d..bf367a74145 100644 --- a/classes/class_openxraction.rst +++ b/classes/class_openxraction.rst @@ -19,7 +19,7 @@ An OpenXR action. Description ----------- -This resource defines an OpenXR action. Actions can be used both for inputs (buttons/joystick/trigger/etc) and outputs (haptics). +This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, etc.) and outputs (haptics). OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return ``false`` if the trigger is depressed and ``true`` if pressed fully. @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ActionType**: +enum **ActionType**: :ref:`🔗<enum_OpenXRAction_ActionType>` .. _class_OpenXRAction_constant_OPENXR_ACTION_BOOL: @@ -88,6 +88,10 @@ This action provides a :ref:`Vector2<class_Vector2>` value and can be bound to e :ref:`ActionType<enum_OpenXRAction_ActionType>` **OPENXR_ACTION_POSE** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -103,12 +107,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ActionType<enum_OpenXRAction_ActionType>` **action_type** = ``1`` +:ref:`ActionType<enum_OpenXRAction_ActionType>` **action_type** = ``1`` :ref:`🔗<class_OpenXRAction_property_action_type>` .. rst-class:: classref-property-setget -- void **set_action_type** **(** :ref:`ActionType<enum_OpenXRAction_ActionType>` value **)** -- :ref:`ActionType<enum_OpenXRAction_ActionType>` **get_action_type** **(** **)** +- |void| **set_action_type**\ (\ value\: :ref:`ActionType<enum_OpenXRAction_ActionType>`\ ) +- :ref:`ActionType<enum_OpenXRAction_ActionType>` **get_action_type**\ (\ ) The type of action. @@ -120,12 +124,12 @@ The type of action. .. rst-class:: classref-property -:ref:`String<class_String>` **localized_name** = ``""`` +:ref:`String<class_String>` **localized_name** = ``""`` :ref:`🔗<class_OpenXRAction_property_localized_name>` .. rst-class:: classref-property-setget -- void **set_localized_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_localized_name** **(** **)** +- |void| **set_localized_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_localized_name**\ (\ ) The localized description of this action. @@ -137,15 +141,17 @@ The localized description of this action. .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **toplevel_paths** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **toplevel_paths** = ``PackedStringArray()`` :ref:`🔗<class_OpenXRAction_property_toplevel_paths>` .. rst-class:: classref-property-setget -- void **set_toplevel_paths** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_toplevel_paths** **(** **)** +- |void| **set_toplevel_paths**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_toplevel_paths**\ (\ ) A collections of toplevel paths to which this action can be bound. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -153,3 +159,4 @@ A collections of toplevel paths to which this action can be bound. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxractionmap.rst b/classes/class_openxractionmap.rst index 94d3b968e3c..7265681d325 100644 --- a/classes/class_openxractionmap.rst +++ b/classes/class_openxractionmap.rst @@ -47,29 +47,29 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_action_set<class_OpenXRActionMap_method_add_action_set>` **(** :ref:`OpenXRActionSet<class_OpenXRActionSet>` action_set **)** | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_interaction_profile<class_OpenXRActionMap_method_add_interaction_profile>` **(** :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` interaction_profile **)** | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_default_action_sets<class_OpenXRActionMap_method_create_default_action_sets>` **(** **)** | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRActionSet<class_OpenXRActionSet>` | :ref:`find_action_set<class_OpenXRActionMap_method_find_action_set>` **(** :ref:`String<class_String>` name **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` | :ref:`find_interaction_profile<class_OpenXRActionMap_method_find_interaction_profile>` **(** :ref:`String<class_String>` name **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRActionSet<class_OpenXRActionSet>` | :ref:`get_action_set<class_OpenXRActionMap_method_get_action_set>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_action_set_count<class_OpenXRActionMap_method_get_action_set_count>` **(** **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` | :ref:`get_interaction_profile<class_OpenXRActionMap_method_get_interaction_profile>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_interaction_profile_count<class_OpenXRActionMap_method_get_interaction_profile_count>` **(** **)** |const| | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_action_set<class_OpenXRActionMap_method_remove_action_set>` **(** :ref:`OpenXRActionSet<class_OpenXRActionSet>` action_set **)** | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_interaction_profile<class_OpenXRActionMap_method_remove_interaction_profile>` **(** :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` interaction_profile **)** | - +-----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_action_set<class_OpenXRActionMap_method_add_action_set>`\ (\ action_set\: :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ ) | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_interaction_profile<class_OpenXRActionMap_method_add_interaction_profile>`\ (\ interaction_profile\: :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`\ ) | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_default_action_sets<class_OpenXRActionMap_method_create_default_action_sets>`\ (\ ) | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRActionSet<class_OpenXRActionSet>` | :ref:`find_action_set<class_OpenXRActionMap_method_find_action_set>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` | :ref:`find_interaction_profile<class_OpenXRActionMap_method_find_interaction_profile>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRActionSet<class_OpenXRActionSet>` | :ref:`get_action_set<class_OpenXRActionMap_method_get_action_set>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_action_set_count<class_OpenXRActionMap_method_get_action_set_count>`\ (\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` | :ref:`get_interaction_profile<class_OpenXRActionMap_method_get_interaction_profile>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_interaction_profile_count<class_OpenXRActionMap_method_get_interaction_profile_count>`\ (\ ) |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_action_set<class_OpenXRActionMap_method_remove_action_set>`\ (\ action_set\: :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ ) | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_interaction_profile<class_OpenXRActionMap_method_remove_interaction_profile>`\ (\ interaction_profile\: :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`\ ) | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,12 +84,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **action_sets** = ``[]`` +:ref:`Array<class_Array>` **action_sets** = ``[]`` :ref:`🔗<class_OpenXRActionMap_property_action_sets>` .. rst-class:: classref-property-setget -- void **set_action_sets** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_action_sets** **(** **)** +- |void| **set_action_sets**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_action_sets**\ (\ ) Collection of :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ s that are part of this action map. @@ -101,12 +101,12 @@ Collection of :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ s that are part of .. rst-class:: classref-property -:ref:`Array<class_Array>` **interaction_profiles** = ``[]`` +:ref:`Array<class_Array>` **interaction_profiles** = ``[]`` :ref:`🔗<class_OpenXRActionMap_property_interaction_profiles>` .. rst-class:: classref-property-setget -- void **set_interaction_profiles** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_interaction_profiles** **(** **)** +- |void| **set_interaction_profiles**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_interaction_profiles**\ (\ ) Collection of :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`\ s that are part of this action map. @@ -123,7 +123,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_action_set** **(** :ref:`OpenXRActionSet<class_OpenXRActionSet>` action_set **)** +|void| **add_action_set**\ (\ action_set\: :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ ) :ref:`🔗<class_OpenXRActionMap_method_add_action_set>` Add an action set. @@ -135,7 +135,7 @@ Add an action set. .. rst-class:: classref-method -void **add_interaction_profile** **(** :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` interaction_profile **)** +|void| **add_interaction_profile**\ (\ interaction_profile\: :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`\ ) :ref:`🔗<class_OpenXRActionMap_method_add_interaction_profile>` Add an interaction profile. @@ -147,7 +147,7 @@ Add an interaction profile. .. rst-class:: classref-method -void **create_default_action_sets** **(** **)** +|void| **create_default_action_sets**\ (\ ) :ref:`🔗<class_OpenXRActionMap_method_create_default_action_sets>` Setup this action set with our default actions. @@ -159,7 +159,7 @@ Setup this action set with our default actions. .. rst-class:: classref-method -:ref:`OpenXRActionSet<class_OpenXRActionSet>` **find_action_set** **(** :ref:`String<class_String>` name **)** |const| +:ref:`OpenXRActionSet<class_OpenXRActionSet>` **find_action_set**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_find_action_set>` Retrieve an action set by name. @@ -171,7 +171,7 @@ Retrieve an action set by name. .. rst-class:: classref-method -:ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` **find_interaction_profile** **(** :ref:`String<class_String>` name **)** |const| +:ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` **find_interaction_profile**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_find_interaction_profile>` Find an interaction profile by its name (path). @@ -183,7 +183,7 @@ Find an interaction profile by its name (path). .. rst-class:: classref-method -:ref:`OpenXRActionSet<class_OpenXRActionSet>` **get_action_set** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`OpenXRActionSet<class_OpenXRActionSet>` **get_action_set**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_get_action_set>` Retrieve the action set at this index. @@ -195,7 +195,7 @@ Retrieve the action set at this index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_action_set_count** **(** **)** |const| +:ref:`int<class_int>` **get_action_set_count**\ (\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_get_action_set_count>` Retrieve the number of actions sets in our action map. @@ -207,7 +207,7 @@ Retrieve the number of actions sets in our action map. .. rst-class:: classref-method -:ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` **get_interaction_profile** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` **get_interaction_profile**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_get_interaction_profile>` Get the interaction profile at this index. @@ -219,7 +219,7 @@ Get the interaction profile at this index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_interaction_profile_count** **(** **)** |const| +:ref:`int<class_int>` **get_interaction_profile_count**\ (\ ) |const| :ref:`🔗<class_OpenXRActionMap_method_get_interaction_profile_count>` Retrieve the number of interaction profiles in our action map. @@ -231,7 +231,7 @@ Retrieve the number of interaction profiles in our action map. .. rst-class:: classref-method -void **remove_action_set** **(** :ref:`OpenXRActionSet<class_OpenXRActionSet>` action_set **)** +|void| **remove_action_set**\ (\ action_set\: :ref:`OpenXRActionSet<class_OpenXRActionSet>`\ ) :ref:`🔗<class_OpenXRActionMap_method_remove_action_set>` Remove an action set. @@ -243,7 +243,7 @@ Remove an action set. .. rst-class:: classref-method -void **remove_interaction_profile** **(** :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>` interaction_profile **)** +|void| **remove_interaction_profile**\ (\ interaction_profile\: :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`\ ) :ref:`🔗<class_OpenXRActionMap_method_remove_interaction_profile>` Remove an interaction profile. @@ -254,3 +254,4 @@ Remove an interaction profile. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxractionset.rst b/classes/class_openxractionset.rst index 8e28559793e..7647dd15cff 100644 --- a/classes/class_openxractionset.rst +++ b/classes/class_openxractionset.rst @@ -47,13 +47,13 @@ Methods .. table:: :widths: auto - +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_action<class_OpenXRActionSet_method_add_action>` **(** :ref:`OpenXRAction<class_OpenXRAction>` action **)** | - +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_action_count<class_OpenXRActionSet_method_get_action_count>` **(** **)** |const| | - +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_action<class_OpenXRActionSet_method_remove_action>` **(** :ref:`OpenXRAction<class_OpenXRAction>` action **)** | - +-----------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_action<class_OpenXRActionSet_method_add_action>`\ (\ action\: :ref:`OpenXRAction<class_OpenXRAction>`\ ) | + +-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_action_count<class_OpenXRActionSet_method_get_action_count>`\ (\ ) |const| | + +-----------------------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_action<class_OpenXRActionSet_method_remove_action>`\ (\ action\: :ref:`OpenXRAction<class_OpenXRAction>`\ ) | + +-----------------------+--------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **actions** = ``[]`` +:ref:`Array<class_Array>` **actions** = ``[]`` :ref:`🔗<class_OpenXRActionSet_property_actions>` .. rst-class:: classref-property-setget -- void **set_actions** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_actions** **(** **)** +- |void| **set_actions**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_actions**\ (\ ) Collection of actions for this action set. @@ -85,12 +85,12 @@ Collection of actions for this action set. .. rst-class:: classref-property -:ref:`String<class_String>` **localized_name** = ``""`` +:ref:`String<class_String>` **localized_name** = ``""`` :ref:`🔗<class_OpenXRActionSet_property_localized_name>` .. rst-class:: classref-property-setget -- void **set_localized_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_localized_name** **(** **)** +- |void| **set_localized_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_localized_name**\ (\ ) The localized name of this action set. @@ -102,12 +102,12 @@ The localized name of this action set. .. rst-class:: classref-property -:ref:`int<class_int>` **priority** = ``0`` +:ref:`int<class_int>` **priority** = ``0`` :ref:`🔗<class_OpenXRActionSet_property_priority>` .. rst-class:: classref-property-setget -- void **set_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_priority** **(** **)** +- |void| **set_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_priority**\ (\ ) The priority for this action set. @@ -124,7 +124,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_action** **(** :ref:`OpenXRAction<class_OpenXRAction>` action **)** +|void| **add_action**\ (\ action\: :ref:`OpenXRAction<class_OpenXRAction>`\ ) :ref:`🔗<class_OpenXRActionSet_method_add_action>` Add an action to this action set. @@ -136,7 +136,7 @@ Add an action to this action set. .. rst-class:: classref-method -:ref:`int<class_int>` **get_action_count** **(** **)** |const| +:ref:`int<class_int>` **get_action_count**\ (\ ) |const| :ref:`🔗<class_OpenXRActionSet_method_get_action_count>` Retrieve the number of actions in our action set. @@ -148,7 +148,7 @@ Retrieve the number of actions in our action set. .. rst-class:: classref-method -void **remove_action** **(** :ref:`OpenXRAction<class_OpenXRAction>` action **)** +|void| **remove_action**\ (\ action\: :ref:`OpenXRAction<class_OpenXRAction>`\ ) :ref:`🔗<class_OpenXRActionSet_method_remove_action>` Remove an action from this action set. @@ -159,3 +159,4 @@ Remove an action from this action set. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrapiextension.rst b/classes/class_openxrapiextension.rst new file mode 100644 index 00000000000..60781adebea --- /dev/null +++ b/classes/class_openxrapiextension.rst @@ -0,0 +1,388 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRAPIExtension.xml. + +.. _class_OpenXRAPIExtension: + +OpenXRAPIExtension +================== + +**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Makes the OpenXR API available for GDExtension. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**OpenXRAPIExtension** makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the :ref:`get_instance_proc_addr<class_OpenXRAPIExtension_method_get_instance_proc_addr>` method, and the OpenXR instance through :ref:`get_instance<class_OpenXRAPIExtension_method_get_instance>`. + +It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `XrResult documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__ + +- `XrInstance documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html>`__ + +- `XrSpace documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html>`__ + +- `XrSession documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html>`__ + +- `XrSystemId documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html>`__ + +- `xrBeginSession documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html>`__ + +- `XrPosef documentation <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html>`__ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_render<class_OpenXRAPIExtension_method_can_render>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_error_string<class_OpenXRAPIExtension_method_get_error_string>`\ (\ result\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_hand_tracker<class_OpenXRAPIExtension_method_get_hand_tracker>`\ (\ hand_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_instance<class_OpenXRAPIExtension_method_get_instance>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_instance_proc_addr<class_OpenXRAPIExtension_method_get_instance_proc_addr>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_next_frame_time<class_OpenXRAPIExtension_method_get_next_frame_time>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_play_space<class_OpenXRAPIExtension_method_get_play_space>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_predicted_display_time<class_OpenXRAPIExtension_method_get_predicted_display_time>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_session<class_OpenXRAPIExtension_method_get_session>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_swapchain_format_name<class_OpenXRAPIExtension_method_get_swapchain_format_name>`\ (\ swapchain_format\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_system_id<class_OpenXRAPIExtension_method_get_system_id>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` | :ref:`is_environment_blend_mode_alpha_supported<class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_initialized<class_OpenXRAPIExtension_method_is_initialized>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_running<class_OpenXRAPIExtension_method_is_running>`\ (\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`openxr_is_enabled<class_OpenXRAPIExtension_method_openxr_is_enabled>`\ (\ check_run_in_editor\: :ref:`bool<class_bool>`\ ) |static| | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_emulate_environment_blend_mode_alpha_blend<class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`transform_from_pose<class_OpenXRAPIExtension_method_transform_from_pose>`\ (\ pose\: ``const void*``\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_composition_layer_provider<class_OpenXRAPIExtension_method_unregister_composition_layer_provider>`\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`xr_result<class_OpenXRAPIExtension_method_xr_result>`\ (\ result\: :ref:`int<class_int>`, format\: :ref:`String<class_String>`, args\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport: + +.. rst-class:: classref-enumeration + +enum **OpenXRAlphaBlendModeSupport**: :ref:`🔗<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` + +.. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE** = ``0`` + +Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` isn't supported at all. + +.. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL** = ``1`` + +Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is really supported. + +.. _class_OpenXRAPIExtension_constant_OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING: + +.. rst-class:: classref-enumeration-constant + +:ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING** = ``2`` + +Means that :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is emulated. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRAPIExtension_method_can_render: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **can_render**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_can_render>` + +Returns ``true`` if OpenXR is initialized for rendering with an XR viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_error_string: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_error_string**\ (\ result\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_error_string>` + +Returns an error string for the given `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_hand_tracker: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_hand_tracker**\ (\ hand_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_hand_tracker>` + +Returns the corresponding ``XRHandTrackerEXT`` handle for the given hand index value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_instance: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_instance**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_instance>` + +Returns the `XrInstance <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html>`__ created during the initialization of the OpenXR API. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_instance_proc_addr: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_instance_proc_addr**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_instance_proc_addr>` + +Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns ``0``. + +\ **Note:** ``openxr/util.h`` contains utility macros for acquiring OpenXR functions, e.g. ``GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_next_frame_time: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_next_frame_time**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_next_frame_time>` + +Returns the predicted display timing for the next frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_play_space: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_play_space**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_play_space>` + +Returns the play space, which is an `XrSpace <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html>`__ cast to an integer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_predicted_display_time: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_predicted_display_time**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_predicted_display_time>` + +Returns the predicted display timing for the current frame. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_session: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_session**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_session>` + +Returns the OpenXR session, which is an `XrSession <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html>`__ cast to an integer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_swapchain_format_name: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_swapchain_format_name**\ (\ swapchain_format\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_swapchain_format_name>` + +Returns the name of the specified swapchain format. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_get_system_id: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_system_id**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_get_system_id>` + +Returns the id of the system, which is a `XrSystemId <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html>`__ cast to an integer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported: + +.. rst-class:: classref-method + +:ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` **is_environment_blend_mode_alpha_supported**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_is_environment_blend_mode_alpha_supported>` + +Returns :ref:`OpenXRAlphaBlendModeSupport<enum_OpenXRAPIExtension_OpenXRAlphaBlendModeSupport>` denoting if :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` is really supported, emulated or not supported at all. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_is_initialized: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_initialized**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_is_initialized>` + +Returns ``true`` if OpenXR is initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_is_running: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_running**\ (\ ) :ref:`🔗<class_OpenXRAPIExtension_method_is_running>` + +Returns ``true`` if OpenXR is running (`xrBeginSession <https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html>`__ was successfully called and the swapchains were created). + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_openxr_is_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **openxr_is_enabled**\ (\ check_run_in_editor\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_OpenXRAPIExtension_method_openxr_is_enabled>` + +Returns ``true`` if OpenXR is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_register_composition_layer_provider: + +.. rst-class:: classref-method + +|void| **register_composition_layer_provider**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_register_composition_layer_provider>` + +Registers the given extension as a composition layer provider. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend: + +.. rst-class:: classref-method + +|void| **set_emulate_environment_blend_mode_alpha_blend**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_set_emulate_environment_blend_mode_alpha_blend>` + +If set to ``true``, an OpenXR extension is loaded which is capable of emulating the :ref:`XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND<class_XRInterface_constant_XR_ENV_BLEND_MODE_ALPHA_BLEND>` blend mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_transform_from_pose: + +.. rst-class:: classref-method + +:ref:`Transform3D<class_Transform3D>` **transform_from_pose**\ (\ pose\: ``const void*``\ ) :ref:`🔗<class_OpenXRAPIExtension_method_transform_from_pose>` + +Creates a :ref:`Transform3D<class_Transform3D>` from an `XrPosef <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html>`__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_unregister_composition_layer_provider: + +.. rst-class:: classref-method + +|void| **unregister_composition_layer_provider**\ (\ extension\: :ref:`OpenXRExtensionWrapperExtension<class_OpenXRExtensionWrapperExtension>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_unregister_composition_layer_provider>` + +Unregisters the given extension as a composition layer provider. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRAPIExtension_method_xr_result: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **xr_result**\ (\ result\: :ref:`int<class_int>`, format\: :ref:`String<class_String>`, args\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_OpenXRAPIExtension_method_xr_result>` + +Returns ``true`` if the provided `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__ (cast to an integer) is successful. Otherwise returns ``false`` and prints the `XrResult <https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html>`__ converted to a string, with the specified additional information. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayer.rst b/classes/class_openxrcompositionlayer.rst new file mode 100644 index 00000000000..751e86fabe5 --- /dev/null +++ b/classes/class_openxrcompositionlayer.rst @@ -0,0 +1,181 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayer.xml. + +.. _class_OpenXRCompositionLayer: + +OpenXRCompositionLayer +====================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`OpenXRCompositionLayerCylinder<class_OpenXRCompositionLayerCylinder>`, :ref:`OpenXRCompositionLayerEquirect<class_OpenXRCompositionLayerEquirect>`, :ref:`OpenXRCompositionLayerQuad<class_OpenXRCompositionLayerQuad>` + +The parent class of all OpenXR composition layer nodes. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution. + +\ **Note:** If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a :ref:`ViewportTexture<class_ViewportTexture>`, in order to emulate the composition layer. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`alpha_blend<class_OpenXRCompositionLayer_property_alpha_blend>` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`enable_hole_punch<class_OpenXRCompositionLayer_property_enable_hole_punch>` | ``false`` | + +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`SubViewport<class_SubViewport>` | :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>` | | + +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` | ``1`` | + +---------------------------------------+-----------------------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`intersects_ray<class_OpenXRCompositionLayer_method_intersects_ray>`\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_natively_supported<class_OpenXRCompositionLayer_method_is_natively_supported>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayer_property_alpha_blend: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **alpha_blend** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_alpha_blend>` + +.. rst-class:: classref-property-setget + +- |void| **set_alpha_blend**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_alpha_blend**\ (\ ) + +Enables the blending the layer using its alpha channel. + +Can be combined with :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` to give the layer a transparent background. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_enable_hole_punch: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **enable_hole_punch** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_enable_hole_punch>` + +.. rst-class:: classref-property-setget + +- |void| **set_enable_hole_punch**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_hole_punch**\ (\ ) + +Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible. + +This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_layer_viewport: + +.. rst-class:: classref-property + +:ref:`SubViewport<class_SubViewport>` **layer_viewport** :ref:`🔗<class_OpenXRCompositionLayer_property_layer_viewport>` + +.. rst-class:: classref-property-setget + +- |void| **set_layer_viewport**\ (\ value\: :ref:`SubViewport<class_SubViewport>`\ ) +- :ref:`SubViewport<class_SubViewport>` **get_layer_viewport**\ (\ ) + +The :ref:`SubViewport<class_SubViewport>` to render on the composition layer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_property_sort_order: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **sort_order** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_sort_order>` + +.. rst-class:: classref-property-setget + +- |void| **set_sort_order**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sort_order**\ (\ ) + +The sort order for this composition layer. Higher numbers will be shown in front of lower numbers. + +\ **Note:** This will have no effect if a fallback mesh is being used. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRCompositionLayer_method_intersects_ray: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **intersects_ray**\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_intersects_ray>` + +Returns UV coordinates where the given ray intersects with the composition layer. ``origin`` and ``direction`` must be in global space. + +Returns ``Vector2(-1.0, -1.0)`` if the ray doesn't intersect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayer_method_is_natively_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_natively_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_is_natively_supported>` + +Returns true if the OpenXR runtime natively supports this composition layer type. + +\ **Note:** This will only return an accurate result after the OpenXR session has started. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayercylinder.rst b/classes/class_openxrcompositionlayercylinder.rst new file mode 100644 index 00000000000..05e44866d6a --- /dev/null +++ b/classes/class_openxrcompositionlayercylinder.rst @@ -0,0 +1,124 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerCylinder.xml. + +.. _class_OpenXRCompositionLayerCylinder: + +OpenXRCompositionLayerCylinder +============================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +An OpenXR composition layer that is rendered as an internal slice of a cylinder. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An OpenXR composition layer that allows rendering a :ref:`SubViewport<class_SubViewport>` on an internal slice of a cylinder. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`aspect_ratio<class_OpenXRCompositionLayerCylinder_property_aspect_ratio>` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`central_angle<class_OpenXRCompositionLayerCylinder_property_central_angle>` | ``1.5708`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`int<class_int>` | :ref:`fallback_segments<class_OpenXRCompositionLayerCylinder_property_fallback_segments>` | ``10`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + | :ref:`float<class_float>` | :ref:`radius<class_OpenXRCompositionLayerCylinder_property_radius>` | ``1.0`` | + +---------------------------+-------------------------------------------------------------------------------------------+------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayerCylinder_property_aspect_ratio: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **aspect_ratio** = ``1.0`` :ref:`🔗<class_OpenXRCompositionLayerCylinder_property_aspect_ratio>` + +.. rst-class:: classref-property-setget + +- |void| **set_aspect_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_aspect_ratio**\ (\ ) + +The aspect ratio of the slice. Used to set the height relative to the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_central_angle: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **central_angle** = ``1.5708`` :ref:`🔗<class_OpenXRCompositionLayerCylinder_property_central_angle>` + +.. rst-class:: classref-property-setget + +- |void| **set_central_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_central_angle**\ (\ ) + +The central angle of the cylinder. Used to set the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_fallback_segments: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **fallback_segments** = ``10`` :ref:`🔗<class_OpenXRCompositionLayerCylinder_property_fallback_segments>` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_segments**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fallback_segments**\ (\ ) + +The number of segments to use in the fallback mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerCylinder_property_radius: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **radius** = ``1.0`` :ref:`🔗<class_OpenXRCompositionLayerCylinder_property_radius>` + +.. rst-class:: classref-property-setget + +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) + +The radius of the cylinder. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayerequirect.rst b/classes/class_openxrcompositionlayerequirect.rst new file mode 100644 index 00000000000..2992d3e1331 --- /dev/null +++ b/classes/class_openxrcompositionlayerequirect.rst @@ -0,0 +1,143 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerEquirect.xml. + +.. _class_OpenXRCompositionLayerEquirect: + +OpenXRCompositionLayerEquirect +============================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +An OpenXR composition layer that is rendered as an internal slice of a sphere. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An OpenXR composition layer that allows rendering a :ref:`SubViewport<class_SubViewport>` on an internal slice of a sphere. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float<class_float>` | :ref:`central_horizontal_angle<class_OpenXRCompositionLayerEquirect_property_central_horizontal_angle>` | ``1.5708`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`int<class_int>` | :ref:`fallback_segments<class_OpenXRCompositionLayerEquirect_property_fallback_segments>` | ``10`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float<class_float>` | :ref:`lower_vertical_angle<class_OpenXRCompositionLayerEquirect_property_lower_vertical_angle>` | ``0.785398`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float<class_float>` | :ref:`radius<class_OpenXRCompositionLayerEquirect_property_radius>` | ``1.0`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + | :ref:`float<class_float>` | :ref:`upper_vertical_angle<class_OpenXRCompositionLayerEquirect_property_upper_vertical_angle>` | ``0.785398`` | + +---------------------------+---------------------------------------------------------------------------------------------------------+--------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayerEquirect_property_central_horizontal_angle: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **central_horizontal_angle** = ``1.5708`` :ref:`🔗<class_OpenXRCompositionLayerEquirect_property_central_horizontal_angle>` + +.. rst-class:: classref-property-setget + +- |void| **set_central_horizontal_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_central_horizontal_angle**\ (\ ) + +The central horizontal angle of the sphere. Used to set the width. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_fallback_segments: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **fallback_segments** = ``10`` :ref:`🔗<class_OpenXRCompositionLayerEquirect_property_fallback_segments>` + +.. rst-class:: classref-property-setget + +- |void| **set_fallback_segments**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fallback_segments**\ (\ ) + +The number of segments to use in the fallback mesh. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_lower_vertical_angle: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **lower_vertical_angle** = ``0.785398`` :ref:`🔗<class_OpenXRCompositionLayerEquirect_property_lower_vertical_angle>` + +.. rst-class:: classref-property-setget + +- |void| **set_lower_vertical_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lower_vertical_angle**\ (\ ) + +The lower vertical angle of the sphere. Used (together with :ref:`upper_vertical_angle<class_OpenXRCompositionLayerEquirect_property_upper_vertical_angle>`) to set the height. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_radius: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **radius** = ``1.0`` :ref:`🔗<class_OpenXRCompositionLayerEquirect_property_radius>` + +.. rst-class:: classref-property-setget + +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) + +The radius of the sphere. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRCompositionLayerEquirect_property_upper_vertical_angle: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **upper_vertical_angle** = ``0.785398`` :ref:`🔗<class_OpenXRCompositionLayerEquirect_property_upper_vertical_angle>` + +.. rst-class:: classref-property-setget + +- |void| **set_upper_vertical_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_upper_vertical_angle**\ (\ ) + +The upper vertical angle of the sphere. Used (together with :ref:`lower_vertical_angle<class_OpenXRCompositionLayerEquirect_property_lower_vertical_angle>`) to set the height. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrcompositionlayerquad.rst b/classes/class_openxrcompositionlayerquad.rst new file mode 100644 index 00000000000..42a5dac104c --- /dev/null +++ b/classes/class_openxrcompositionlayerquad.rst @@ -0,0 +1,67 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayerQuad.xml. + +.. _class_OpenXRCompositionLayerQuad: + +OpenXRCompositionLayerQuad +========================== + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +An OpenXR composition layer that is rendered as a quad. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An OpenXR composition layer that allows rendering a :ref:`SubViewport<class_SubViewport>` on a quad. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------+-----------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`quad_size<class_OpenXRCompositionLayerQuad_property_quad_size>` | ``Vector2(1, 1)`` | + +-------------------------------+-----------------------------------------------------------------------+-------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_OpenXRCompositionLayerQuad_property_quad_size: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **quad_size** = ``Vector2(1, 1)`` :ref:`🔗<class_OpenXRCompositionLayerQuad_property_quad_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_quad_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_quad_size**\ (\ ) + +The dimensions of the quad. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrextensionwrapperextension.rst b/classes/class_openxrextensionwrapperextension.rst new file mode 100644 index 00000000000..672d1ab4b43 --- /dev/null +++ b/classes/class_openxrextensionwrapperextension.rst @@ -0,0 +1,540 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRExtensionWrapperExtension.xml. + +.. _class_OpenXRExtensionWrapperExtension: + +OpenXRExtensionWrapperExtension +=============================== + +**Inherits:** :ref:`Object<class_Object>` + +Allows clients to implement OpenXR extensions with GDExtension. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**OpenXRExtensionWrapperExtension** allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with :ref:`register_extension_wrapper<class_OpenXRExtensionWrapperExtension_method_register_extension_wrapper>`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_composition_layer_count<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_composition_layer_order<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_requested_extensions<class_OpenXRExtensionWrapperExtension_private_method__get_requested_extensions>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_suggested_tracker_names<class_OpenXRExtensionWrapperExtension_private_method__get_suggested_tracker_names>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_viewport_composition_layer_extension_properties<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_viewport_composition_layer_extension_property_defaults<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_property_defaults>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_before_instance_created<class_OpenXRExtensionWrapperExtension_private_method__on_before_instance_created>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_on_event_polled<class_OpenXRExtensionWrapperExtension_private_method__on_event_polled>`\ (\ event\: ``const void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_instance_created<class_OpenXRExtensionWrapperExtension_private_method__on_instance_created>`\ (\ instance\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_instance_destroyed<class_OpenXRExtensionWrapperExtension_private_method__on_instance_destroyed>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_main_swapchains_created<class_OpenXRExtensionWrapperExtension_private_method__on_main_swapchains_created>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_pre_render<class_OpenXRExtensionWrapperExtension_private_method__on_pre_render>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_process<class_OpenXRExtensionWrapperExtension_private_method__on_process>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_register_metadata<class_OpenXRExtensionWrapperExtension_private_method__on_register_metadata>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_session_created<class_OpenXRExtensionWrapperExtension_private_method__on_session_created>`\ (\ session\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_session_destroyed<class_OpenXRExtensionWrapperExtension_private_method__on_session_destroyed>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_exiting<class_OpenXRExtensionWrapperExtension_private_method__on_state_exiting>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_focused<class_OpenXRExtensionWrapperExtension_private_method__on_state_focused>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_idle<class_OpenXRExtensionWrapperExtension_private_method__on_state_idle>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_loss_pending<class_OpenXRExtensionWrapperExtension_private_method__on_state_loss_pending>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_ready<class_OpenXRExtensionWrapperExtension_private_method__on_state_ready>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_stopping<class_OpenXRExtensionWrapperExtension_private_method__on_state_stopping>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_synchronized<class_OpenXRExtensionWrapperExtension_private_method__on_state_synchronized>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_state_visible<class_OpenXRExtensionWrapperExtension_private_method__on_state_visible>`\ (\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_on_viewport_composition_layer_destroyed<class_OpenXRExtensionWrapperExtension_private_method__on_viewport_composition_layer_destroyed>`\ (\ layer\: ``const void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_hand_joint_locations_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_hand_joint_locations_and_get_next_pointer>`\ (\ hand_index\: :ref:`int<class_int>`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_instance_create_info_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_instance_create_info_and_get_next_pointer>`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_session_create_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_session_create_and_get_next_pointer>`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_swapchain_create_info_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_swapchain_create_info_and_get_next_pointer>`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_system_properties_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_system_properties_and_get_next_pointer>`\ (\ next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_set_viewport_composition_layer_and_get_next_pointer<class_OpenXRExtensionWrapperExtension_private_method__set_viewport_composition_layer_and_get_next_pointer>`\ (\ layer\: ``const void*``, property_values\: :ref:`Dictionary<class_Dictionary>`, next_pointer\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRAPIExtension<class_OpenXRAPIExtension>` | :ref:`get_openxr_api<class_OpenXRExtensionWrapperExtension_method_get_openxr_api>`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_extension_wrapper<class_OpenXRExtensionWrapperExtension_method_register_extension_wrapper>`\ (\ ) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_composition_layer**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>` + +Returns a pointer to an ``XrCompositionLayerBaseHeader`` struct to provide the given composition layer. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_composition_layer_count**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_count>` + +Returns the number of composition layers this extension wrapper provides via :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_composition_layer_order**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer_order>` + +Returns an integer that will be used to sort the given composition layer provided via :ref:`_get_composition_layer<class_OpenXRExtensionWrapperExtension_private_method__get_composition_layer>`. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of ``0``, so layers provided by this method should probably be above or below (but not exactly) ``0``. + +This will only be called if the extension previously registered itself with :ref:`OpenXRAPIExtension.register_composition_layer_provider<class_OpenXRAPIExtension_method_register_composition_layer_provider>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_requested_extensions: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **_get_requested_extensions**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_requested_extensions>` + +Returns a :ref:`Dictionary<class_Dictionary>` of OpenXR extensions related to this extension. The :ref:`Dictionary<class_Dictionary>` should contain the name of the extension, mapped to a ``bool *`` cast to an integer: + +- If the ``bool *`` is a ``nullptr`` this extension is mandatory. + +- If the ``bool *`` points to a boolean, the boolean will be updated to ``true`` if the extension is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_suggested_tracker_names: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_suggested_tracker_names**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_suggested_tracker_names>` + +Returns a :ref:`PackedStringArray<class_PackedStringArray>` of positional tracker names that are used within the extension wrapper. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_viewport_composition_layer_extension_properties**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties>` + +Gets an array of :ref:`Dictionary<class_Dictionary>`\ s that represent properties, just like :ref:`Object._get_property_list<class_Object_private_method__get_property_list>`, that will be added to :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_property_defaults: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **_get_viewport_composition_layer_extension_property_defaults**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_property_defaults>` + +Gets a :ref:`Dictionary<class_Dictionary>` containing the default values for the properties returned by :ref:`_get_viewport_composition_layer_extension_properties<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_before_instance_created: + +.. rst-class:: classref-method + +|void| **_on_before_instance_created**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_before_instance_created>` + +Called before the OpenXR instance is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_event_polled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_on_event_polled**\ (\ event\: ``const void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_event_polled>` + +Called when there is an OpenXR event to process. When implementing, return ``true`` if the event was handled, return ``false`` otherwise. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_instance_created: + +.. rst-class:: classref-method + +|void| **_on_instance_created**\ (\ instance\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_instance_created>` + +Called right after the OpenXR instance is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_instance_destroyed: + +.. rst-class:: classref-method + +|void| **_on_instance_destroyed**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_instance_destroyed>` + +Called right before the OpenXR instance is destroyed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_main_swapchains_created: + +.. rst-class:: classref-method + +|void| **_on_main_swapchains_created**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_main_swapchains_created>` + +Called right after the main swapchains are (re)created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_pre_render: + +.. rst-class:: classref-method + +|void| **_on_pre_render**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_pre_render>` + +Called right before the XR viewports begin their rendering step. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_process: + +.. rst-class:: classref-method + +|void| **_on_process**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_process>` + +Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_register_metadata: + +.. rst-class:: classref-method + +|void| **_on_register_metadata**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_register_metadata>` + +Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor. + +Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_session_created: + +.. rst-class:: classref-method + +|void| **_on_session_created**\ (\ session\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_session_created>` + +Called right after the OpenXR session is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_session_destroyed: + +.. rst-class:: classref-method + +|void| **_on_session_destroyed**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_session_destroyed>` + +Called right before the OpenXR session is destroyed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_exiting: + +.. rst-class:: classref-method + +|void| **_on_state_exiting**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_exiting>` + +Called when the OpenXR session state is changed to exiting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_focused: + +.. rst-class:: classref-method + +|void| **_on_state_focused**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_focused>` + +Called when the OpenXR session state is changed to focused. This state is the active state when the game runs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_idle: + +.. rst-class:: classref-method + +|void| **_on_state_idle**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_idle>` + +Called when the OpenXR session state is changed to idle. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_loss_pending: + +.. rst-class:: classref-method + +|void| **_on_state_loss_pending**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_loss_pending>` + +Called when the OpenXR session state is changed to loss pending. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_ready: + +.. rst-class:: classref-method + +|void| **_on_state_ready**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_ready>` + +Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_stopping: + +.. rst-class:: classref-method + +|void| **_on_state_stopping**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_stopping>` + +Called when the OpenXR session state is changed to stopping. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_synchronized: + +.. rst-class:: classref-method + +|void| **_on_state_synchronized**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_synchronized>` + +Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_visible: + +.. rst-class:: classref-method + +|void| **_on_state_visible**\ (\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_state_visible>` + +Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__on_viewport_composition_layer_destroyed: + +.. rst-class:: classref-method + +|void| **_on_viewport_composition_layer_destroyed**\ (\ layer\: ``const void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__on_viewport_composition_layer_destroyed>` + +Called when a composition layer created via :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>` is destroyed. + +\ ``layer`` is a pointer to an ``XrCompositionLayerBaseHeader`` struct. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_hand_joint_locations_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_hand_joint_locations_and_get_next_pointer**\ (\ hand_index\: :ref:`int<class_int>`, next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_hand_joint_locations_and_get_next_pointer>` + +Adds additional data structures when each hand tracker is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_instance_create_info_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_instance_create_info_and_get_next_pointer**\ (\ next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_instance_create_info_and_get_next_pointer>` + +Adds additional data structures when the OpenXR instance is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_session_create_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_session_create_and_get_next_pointer**\ (\ next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_session_create_and_get_next_pointer>` + +Adds additional data structures when the OpenXR session is created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_swapchain_create_info_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_swapchain_create_info_and_get_next_pointer**\ (\ next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_swapchain_create_info_and_get_next_pointer>` + +Adds additional data structures when creating OpenXR swapchains. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_system_properties_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_system_properties_and_get_next_pointer**\ (\ next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_system_properties_and_get_next_pointer>` + +Adds additional data structures when interogating OpenXR system abilities. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_private_method__set_viewport_composition_layer_and_get_next_pointer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_set_viewport_composition_layer_and_get_next_pointer**\ (\ layer\: ``const void*``, property_values\: :ref:`Dictionary<class_Dictionary>`, next_pointer\: ``void*``\ ) |virtual| :ref:`🔗<class_OpenXRExtensionWrapperExtension_private_method__set_viewport_composition_layer_and_get_next_pointer>` + +Adds additional data structures to composition layers created by :ref:`OpenXRCompositionLayer<class_OpenXRCompositionLayer>`. + +\ ``property_values`` contains the values of the properties returned by :ref:`_get_viewport_composition_layer_extension_properties<class_OpenXRExtensionWrapperExtension_private_method__get_viewport_composition_layer_extension_properties>`. + +\ ``layer`` is a pointer to an ``XrCompositionLayerBaseHeader`` struct. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_method_get_openxr_api: + +.. rst-class:: classref-method + +:ref:`OpenXRAPIExtension<class_OpenXRAPIExtension>` **get_openxr_api**\ (\ ) :ref:`🔗<class_OpenXRExtensionWrapperExtension_method_get_openxr_api>` + +Returns the created :ref:`OpenXRAPIExtension<class_OpenXRAPIExtension>`, which can be used to access the OpenXR API. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRExtensionWrapperExtension_method_register_extension_wrapper: + +.. rst-class:: classref-method + +|void| **register_extension_wrapper**\ (\ ) :ref:`🔗<class_OpenXRExtensionWrapperExtension_method_register_extension_wrapper>` + +Registers the extension. This should happen at core module initialization level. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrhand.rst b/classes/class_openxrhand.rst index 3c06b4f0911..bbad64f1aa2 100644 --- a/classes/class_openxrhand.rst +++ b/classes/class_openxrhand.rst @@ -10,16 +10,24 @@ OpenXRHand ========== +**Deprecated:** Use :ref:`XRHandModifier3D<class_XRHandModifier3D>` instead. + **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Node supporting finger tracking in OpenXR. +Node supporting hand and finger tracking in OpenXR. .. rst-class:: classref-introduction-group Description ----------- -This node enables OpenXR's hand tracking functionality. The node should be a child node of an :ref:`XROrigin3D<class_XROrigin3D>` node, tracking will update its position to where the player's actual hand is positioned. This node also updates the skeleton of a properly skinned hand model. The hand mesh should be a child node of this node. +This node enables OpenXR's hand tracking functionality. The node should be a child node of an :ref:`XROrigin3D<class_XROrigin3D>` node, tracking will update its position to the player's tracked hand Palm joint location (the center of the middle finger's metacarpal bone). This node also updates the skeleton of a properly skinned hand or avatar model. + +If the skeleton is a hand (one of the hand bones is the root node of the skeleton), then the skeleton will be placed relative to the hand palm location and the hand mesh and skeleton should be children of the OpenXRHand node. + +If the hand bones are part of a full skeleton, then the root of the hand will keep its location with the assumption that IK is used to position the hand and arm. + +By default the skeleton hand bones are repositioned to match the size of the tracked hand. To preserve the modeled bone sizes change :ref:`bone_update<class_OpenXRHand_property_bone_update>` to apply rotation only. .. rst-class:: classref-reftable-group @@ -29,6 +37,8 @@ Properties .. table:: :widths: auto + +-------------------------------------------------+---------------------------------------------------------------+------------------+ + | :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` | :ref:`bone_update<class_OpenXRHand_property_bone_update>` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------+------------------+ | :ref:`Hands<enum_OpenXRHand_Hands>` | :ref:`hand<class_OpenXRHand_property_hand>` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------+------------------+ @@ -36,6 +46,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------+------------------+ | :ref:`MotionRange<enum_OpenXRHand_MotionRange>` | :ref:`motion_range<class_OpenXRHand_property_motion_range>` | ``0`` | +-------------------------------------------------+---------------------------------------------------------------+------------------+ + | :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` | :ref:`skeleton_rig<class_OpenXRHand_property_skeleton_rig>` | ``0`` | + +-------------------------------------------------+---------------------------------------------------------------+------------------+ .. rst-class:: classref-section-separator @@ -50,7 +62,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Hands**: +enum **Hands**: :ref:`🔗<enum_OpenXRHand_Hands>` .. _class_OpenXRHand_constant_HAND_LEFT: @@ -84,7 +96,7 @@ Maximum supported hands. .. rst-class:: classref-enumeration -enum **MotionRange**: +enum **MotionRange**: :ref:`🔗<enum_OpenXRHand_MotionRange>` .. _class_OpenXRHand_constant_MOTION_RANGE_UNOBSTRUCTED: @@ -110,6 +122,74 @@ When player grips, hand skeleton conforms to the controller the player is holdin Maximum supported motion ranges. +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRHand_SkeletonRig: + +.. rst-class:: classref-enumeration + +enum **SkeletonRig**: :ref:`🔗<enum_OpenXRHand_SkeletonRig>` + +.. _class_OpenXRHand_constant_SKELETON_RIG_OPENXR: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_OPENXR** = ``0`` + +An OpenXR compliant skeleton. + +.. _class_OpenXRHand_constant_SKELETON_RIG_HUMANOID: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_HUMANOID** = ``1`` + +A :ref:`SkeletonProfileHumanoid<class_SkeletonProfileHumanoid>` compliant skeleton. + +.. _class_OpenXRHand_constant_SKELETON_RIG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **SKELETON_RIG_MAX** = ``2`` + +Maximum supported hands. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRHand_BoneUpdate: + +.. rst-class:: classref-enumeration + +enum **BoneUpdate**: :ref:`🔗<enum_OpenXRHand_BoneUpdate>` + +.. _class_OpenXRHand_constant_BONE_UPDATE_FULL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_FULL** = ``0`` + +The skeletons bones are fully updated (both position and rotation) to match the tracked bones. + +.. _class_OpenXRHand_constant_BONE_UPDATE_ROTATION_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_ROTATION_ONLY** = ``1`` + +The skeletons bones are only rotated to align with the tracked bones, preserving bone length. + +.. _class_OpenXRHand_constant_BONE_UPDATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **BONE_UPDATE_MAX** = ``2`` + +Maximum supported bone update mode. + .. rst-class:: classref-section-separator ---- @@ -119,16 +199,33 @@ Maximum supported motion ranges. Property Descriptions --------------------- +.. _class_OpenXRHand_property_bone_update: + +.. rst-class:: classref-property + +:ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **bone_update** = ``0`` :ref:`🔗<class_OpenXRHand_property_bone_update>` + +.. rst-class:: classref-property-setget + +- |void| **set_bone_update**\ (\ value\: :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>`\ ) +- :ref:`BoneUpdate<enum_OpenXRHand_BoneUpdate>` **get_bone_update**\ (\ ) + +Specify the type of updates to perform on the bone. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRHand_property_hand: .. rst-class:: classref-property -:ref:`Hands<enum_OpenXRHand_Hands>` **hand** = ``0`` +:ref:`Hands<enum_OpenXRHand_Hands>` **hand** = ``0`` :ref:`🔗<class_OpenXRHand_property_hand>` .. rst-class:: classref-property-setget -- void **set_hand** **(** :ref:`Hands<enum_OpenXRHand_Hands>` value **)** -- :ref:`Hands<enum_OpenXRHand_Hands>` **get_hand** **(** **)** +- |void| **set_hand**\ (\ value\: :ref:`Hands<enum_OpenXRHand_Hands>`\ ) +- :ref:`Hands<enum_OpenXRHand_Hands>` **get_hand**\ (\ ) Specifies whether this node tracks the left or right hand of the player. @@ -140,12 +237,12 @@ Specifies whether this node tracks the left or right hand of the player. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **hand_skeleton** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **hand_skeleton** = ``NodePath("")`` :ref:`🔗<class_OpenXRHand_property_hand_skeleton>` .. rst-class:: classref-property-setget -- void **set_hand_skeleton** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_hand_skeleton** **(** **)** +- |void| **set_hand_skeleton**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_hand_skeleton**\ (\ ) Set a :ref:`Skeleton3D<class_Skeleton3D>` node for which the pose positions will be updated. @@ -157,15 +254,32 @@ Set a :ref:`Skeleton3D<class_Skeleton3D>` node for which the pose positions will .. rst-class:: classref-property -:ref:`MotionRange<enum_OpenXRHand_MotionRange>` **motion_range** = ``0`` +:ref:`MotionRange<enum_OpenXRHand_MotionRange>` **motion_range** = ``0`` :ref:`🔗<class_OpenXRHand_property_motion_range>` .. rst-class:: classref-property-setget -- void **set_motion_range** **(** :ref:`MotionRange<enum_OpenXRHand_MotionRange>` value **)** -- :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **get_motion_range** **(** **)** +- |void| **set_motion_range**\ (\ value\: :ref:`MotionRange<enum_OpenXRHand_MotionRange>`\ ) +- :ref:`MotionRange<enum_OpenXRHand_MotionRange>` **get_motion_range**\ (\ ) Set the motion range (if supported) limiting the hand motion. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRHand_property_skeleton_rig: + +.. rst-class:: classref-property + +:ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **skeleton_rig** = ``0`` :ref:`🔗<class_OpenXRHand_property_skeleton_rig>` + +.. rst-class:: classref-property-setget + +- |void| **set_skeleton_rig**\ (\ value\: :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>`\ ) +- :ref:`SkeletonRig<enum_OpenXRHand_SkeletonRig>` **get_skeleton_rig**\ (\ ) + +Set the type of skeleton rig the :ref:`hand_skeleton<class_OpenXRHand_property_hand_skeleton>` is compliant with. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -173,3 +287,4 @@ Set the motion range (if supported) limiting the hand motion. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinteractionprofile.rst b/classes/class_openxrinteractionprofile.rst index ffc8ec33003..24ad57e75bd 100644 --- a/classes/class_openxrinteractionprofile.rst +++ b/classes/class_openxrinteractionprofile.rst @@ -19,7 +19,7 @@ Suggested bindings object for OpenXR. Description ----------- -This object stores suggested bindings for an interaction profile. Interaction profiles define the meta data for a tracked XR device such as an XR controller. +This object stores suggested bindings for an interaction profile. Interaction profiles define the metadata for a tracked XR device such as an XR controller. For more information see the `interaction profiles info in the OpenXR specification <https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#semantic-path-interaction-profiles>`__. @@ -45,11 +45,11 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRIPBinding<class_OpenXRIPBinding>` | :ref:`get_binding<class_OpenXRInteractionProfile_method_get_binding>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_binding_count<class_OpenXRInteractionProfile_method_get_binding_count>` **(** **)** |const| | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRIPBinding<class_OpenXRIPBinding>` | :ref:`get_binding<class_OpenXRInteractionProfile_method_get_binding>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_binding_count<class_OpenXRInteractionProfile_method_get_binding_count>`\ (\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,12 +64,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **bindings** = ``[]`` +:ref:`Array<class_Array>` **bindings** = ``[]`` :ref:`🔗<class_OpenXRInteractionProfile_property_bindings>` .. rst-class:: classref-property-setget -- void **set_bindings** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_bindings** **(** **)** +- |void| **set_bindings**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_bindings**\ (\ ) Action bindings for this interaction profile. @@ -81,12 +81,12 @@ Action bindings for this interaction profile. .. rst-class:: classref-property -:ref:`String<class_String>` **interaction_profile_path** = ``""`` +:ref:`String<class_String>` **interaction_profile_path** = ``""`` :ref:`🔗<class_OpenXRInteractionProfile_property_interaction_profile_path>` .. rst-class:: classref-property-setget -- void **set_interaction_profile_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_interaction_profile_path** **(** **)** +- |void| **set_interaction_profile_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_interaction_profile_path**\ (\ ) The interaction profile path identifying the XR device. @@ -103,7 +103,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`OpenXRIPBinding<class_OpenXRIPBinding>` **get_binding** **(** :ref:`int<class_int>` index **)** |const| +:ref:`OpenXRIPBinding<class_OpenXRIPBinding>` **get_binding**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OpenXRInteractionProfile_method_get_binding>` Retrieve the binding at this index. @@ -115,7 +115,7 @@ Retrieve the binding at this index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_binding_count** **(** **)** |const| +:ref:`int<class_int>` **get_binding_count**\ (\ ) |const| :ref:`🔗<class_OpenXRInteractionProfile_method_get_binding_count>` Get the number of bindings in this interaction profile. @@ -126,3 +126,4 @@ Get the number of bindings in this interaction profile. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinteractionprofilemetadata.rst b/classes/class_openxrinteractionprofilemetadata.rst new file mode 100644 index 00000000000..675464241f7 --- /dev/null +++ b/classes/class_openxrinteractionprofilemetadata.rst @@ -0,0 +1,108 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRInteractionProfileMetadata.xml. + +.. _class_OpenXRInteractionProfileMetadata: + +OpenXRInteractionProfileMetadata +================================ + +**Inherits:** :ref:`Object<class_Object>` + +Meta class registering supported devices in OpenXR. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class allows OpenXR core and extensions to register metadata relating to supported interaction devices such as controllers, trackers, haptic devices, etc. It is primarily used by the action map editor and to sanitize any action map by removing extension-dependent entries when applicable. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_interaction_profile<class_OpenXRInteractionProfileMetadata_method_register_interaction_profile>`\ (\ display_name\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_io_path<class_OpenXRInteractionProfileMetadata_method_register_io_path>`\ (\ interaction_profile\: :ref:`String<class_String>`, display_name\: :ref:`String<class_String>`, toplevel_path\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`, action_type\: :ref:`ActionType<enum_OpenXRAction_ActionType>`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_profile_rename<class_OpenXRInteractionProfileMetadata_method_register_profile_rename>`\ (\ old_name\: :ref:`String<class_String>`, new_name\: :ref:`String<class_String>`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_top_level_path<class_OpenXRInteractionProfileMetadata_method_register_top_level_path>`\ (\ display_name\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`\ ) | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_OpenXRInteractionProfileMetadata_method_register_interaction_profile: + +.. rst-class:: classref-method + +|void| **register_interaction_profile**\ (\ display_name\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRInteractionProfileMetadata_method_register_interaction_profile>` + +Registers an interaction profile using its OpenXR designation (e.g. ``/interaction_profiles/khr/simple_controller`` is the profile for OpenXR's simple controller profile). + +\ ``display_name`` is the description shown to the user. ``openxr_path`` is the interaction profile path being registered. ``openxr_extension_name`` optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInteractionProfileMetadata_method_register_io_path: + +.. rst-class:: classref-method + +|void| **register_io_path**\ (\ interaction_profile\: :ref:`String<class_String>`, display_name\: :ref:`String<class_String>`, toplevel_path\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`, action_type\: :ref:`ActionType<enum_OpenXRAction_ActionType>`\ ) :ref:`🔗<class_OpenXRInteractionProfileMetadata_method_register_io_path>` + +Registers an input/output path for the given ``interaction_profile``. The profile should previously have been registered using :ref:`register_interaction_profile<class_OpenXRInteractionProfileMetadata_method_register_interaction_profile>`. ``display_name`` is the description shown to the user. ``toplevel_path`` specifies the bind path this input/output can be bound to (e.g. ``/user/hand/left`` or ``/user/hand/right``). ``openxr_path`` is the action input/output being registered (e.g. ``/user/hand/left/input/aim/pose``). ``openxr_extension_name`` restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. ``XR_EXT_palm_pose`` that introduces ``…/input/palm_ext/pose`` input paths). ``action_type`` defines the type of input or output provided by OpenXR. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInteractionProfileMetadata_method_register_profile_rename: + +.. rst-class:: classref-method + +|void| **register_profile_rename**\ (\ old_name\: :ref:`String<class_String>`, new_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRInteractionProfileMetadata_method_register_profile_rename>` + +Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInteractionProfileMetadata_method_register_top_level_path: + +.. rst-class:: classref-method + +|void| **register_top_level_path**\ (\ display_name\: :ref:`String<class_String>`, openxr_path\: :ref:`String<class_String>`, openxr_extension_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRInteractionProfileMetadata_method_register_top_level_path>` + +Registers a top level path to which profiles can be bound. For instance ``/user/hand/left`` refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register ``/user/body/vest``. + +\ ``display_name`` is the name shown to the user. ``openxr_path`` is the top level path being registered. ``openxr_extension_name`` is optional and ensures the top level path is only used if the specified extension is available/enabled. + +When a top level path ends up being bound by OpenXR, a :ref:`XRPositionalTracker<class_XRPositionalTracker>` is instantiated to manage the state of the device. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxrinterface.rst b/classes/class_openxrinterface.rst index 78a6fff0170..56f5cb446cd 100644 --- a/classes/class_openxrinterface.rst +++ b/classes/class_openxrinterface.rst @@ -38,11 +38,19 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ - | :ref:`float<class_float>` | :ref:`display_refresh_rate<class_OpenXRInterface_property_display_refresh_rate>` | ``0.0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ - | :ref:`float<class_float>` | :ref:`render_target_size_multiplier<class_OpenXRInterface_property_render_target_size_multiplier>` | ``1.0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`display_refresh_rate<class_OpenXRInterface_property_display_refresh_rate>` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`foveation_dynamic<class_OpenXRInterface_property_foveation_dynamic>` | ``false`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>` | ``0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`render_target_size_multiplier<class_OpenXRInterface_property_render_target_size_multiplier>` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`vrs_min_radius<class_OpenXRInterface_property_vrs_min_radius>` | ``20.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`vrs_strength<class_OpenXRInterface_property_vrs_strength>` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -52,15 +60,41 @@ Methods .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** | - +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_action_sets<class_OpenXRInterface_method_get_action_sets>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_OpenXRInterface_method_get_available_display_refresh_rates>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_angular_velocity<class_OpenXRInterface_method_get_hand_joint_angular_velocity>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\] | :ref:`get_hand_joint_flags<class_OpenXRInterface_method_get_hand_joint_flags>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_linear_velocity<class_OpenXRInterface_method_get_hand_joint_linear_velocity>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_hand_joint_position<class_OpenXRInterface_method_get_hand_joint_position>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_hand_joint_radius<class_OpenXRInterface_method_get_hand_joint_radius>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`get_hand_joint_rotation<class_OpenXRInterface_method_get_hand_joint_rotation>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` | :ref:`get_hand_tracking_source<class_OpenXRInterface_method_get_hand_tracking_source>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` | :ref:`get_motion_range<class_OpenXRInterface_method_get_motion_range>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_action_set_active<class_OpenXRInterface_method_is_action_set_active>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_eye_gaze_interaction_supported<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>`\ (\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_foveation_supported<class_OpenXRInterface_method_is_foveation_supported>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_hand_interaction_supported<class_OpenXRInterface_method_is_hand_interaction_supported>`\ (\ ) |const| | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_hand_tracking_supported<class_OpenXRInterface_method_is_hand_tracking_supported>`\ (\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_action_set_active<class_OpenXRInterface_method_set_action_set_active>`\ (\ name\: :ref:`String<class_String>`, active\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_motion_range<class_OpenXRInterface_method_set_motion_range>`\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, motion_range\: :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>`\ ) | + +--------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,11 +105,23 @@ Methods Signals ------- +.. _class_OpenXRInterface_signal_instance_exiting: + +.. rst-class:: classref-signal + +**instance_exiting**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_instance_exiting>` + +Informs our OpenXR instance is exiting. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_signal_pose_recentered: .. rst-class:: classref-signal -**pose_recentered** **(** **)** +**pose_recentered**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_pose_recentered>` Informs the user queued a recenter of the player position. @@ -83,11 +129,25 @@ Informs the user queued a recenter of the player position. ---- +.. _class_OpenXRInterface_signal_refresh_rate_changed: + +.. rst-class:: classref-signal + +**refresh_rate_changed**\ (\ refresh_rate\: :ref:`float<class_float>`\ ) :ref:`🔗<class_OpenXRInterface_signal_refresh_rate_changed>` + +Informs the user the HMD refresh rate has changed. + +\ **Node:** Only emitted if XR runtime supports the refresh rate extension. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_signal_session_begun: .. rst-class:: classref-signal -**session_begun** **(** **)** +**session_begun**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_begun>` Informs our OpenXR session has been started. @@ -99,7 +159,7 @@ Informs our OpenXR session has been started. .. rst-class:: classref-signal -**session_focussed** **(** **)** +**session_focussed**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_focussed>` Informs our OpenXR session now has focus. @@ -107,11 +167,23 @@ Informs our OpenXR session now has focus. ---- +.. _class_OpenXRInterface_signal_session_loss_pending: + +.. rst-class:: classref-signal + +**session_loss_pending**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_loss_pending>` + +Informs our OpenXR session is in the process of being lost. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_signal_session_stopping: .. rst-class:: classref-signal -**session_stopping** **(** **)** +**session_stopping**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_stopping>` Informs our OpenXR session is stopping. @@ -123,7 +195,7 @@ Informs our OpenXR session is stopping. .. rst-class:: classref-signal -**session_visible** **(** **)** +**session_visible**\ (\ ) :ref:`🔗<class_OpenXRInterface_signal_session_visible>` Informs our OpenXR session is now visible (output is being sent to the HMD). @@ -133,6 +205,413 @@ Informs our OpenXR session is now visible (output is being sent to the HMD). .. rst-class:: classref-descriptions-group +Enumerations +------------ + +.. _enum_OpenXRInterface_Hand: + +.. rst-class:: classref-enumeration + +enum **Hand**: :ref:`🔗<enum_OpenXRInterface_Hand>` + +.. _class_OpenXRInterface_constant_HAND_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_LEFT** = ``0`` + +Left hand. + +.. _class_OpenXRInterface_constant_HAND_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_RIGHT** = ``1`` + +Right hand. + +.. _class_OpenXRInterface_constant_HAND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Hand<enum_OpenXRInterface_Hand>` **HAND_MAX** = ``2`` + +Maximum value for the hand enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandMotionRange: + +.. rst-class:: classref-enumeration + +enum **HandMotionRange**: :ref:`🔗<enum_OpenXRInterface_HandMotionRange>` + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_UNOBSTRUCTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_UNOBSTRUCTED** = ``0`` + +Full hand range, if user closes their hands, we make a full fist. + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER** = ``1`` + +Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller. + +.. _class_OpenXRInterface_constant_HAND_MOTION_RANGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **HAND_MOTION_RANGE_MAX** = ``2`` + +Maximum value for the motion range enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandTrackedSource: + +.. rst-class:: classref-enumeration + +enum **HandTrackedSource**: :ref:`🔗<enum_OpenXRInterface_HandTrackedSource>` + +.. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNKNOWN** = ``0`` + +The source of hand tracking data is unknown (the extension is likely unsupported). + +.. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_UNOBSTRUCTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_UNOBSTRUCTED** = ``1`` + +The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc. + +.. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_CONTROLLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_CONTROLLER** = ``2`` + +The source of hand tracking is a controller, bone positions are inferred from controller inputs. + +.. _class_OpenXRInterface_constant_HAND_TRACKED_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **HAND_TRACKED_SOURCE_MAX** = ``3`` + +Maximum value for the hand tracked source enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandJoints: + +.. rst-class:: classref-enumeration + +enum **HandJoints**: :ref:`🔗<enum_OpenXRInterface_HandJoints>` + +.. _class_OpenXRInterface_constant_HAND_JOINT_PALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_PALM** = ``0`` + +Palm joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_WRIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_WRIST** = ``1`` + +Wrist joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_METACARPAL** = ``2`` + +Thumb metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_PROXIMAL** = ``3`` + +Thumb proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_DISTAL** = ``4`` + +Thumb distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_THUMB_TIP** = ``5`` + +Thumb tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_METACARPAL** = ``6`` + +Index metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_PROXIMAL** = ``7`` + +Index proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8`` + +Index intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_DISTAL** = ``9`` + +Index distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_INDEX_TIP** = ``10`` + +Index tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_METACARPAL** = ``11`` + +Middle metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12`` + +Middle proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13`` + +Middle intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_DISTAL** = ``14`` + +Middle distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MIDDLE_TIP** = ``15`` + +Middle tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_METACARPAL** = ``16`` + +Ring metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_PROXIMAL** = ``17`` + +Ring proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_INTERMEDIATE** = ``18`` + +Ring intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_DISTAL** = ``19`` + +Ring distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_RING_TIP** = ``20`` + +Ring tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_METACARPAL** = ``21`` + +Little metacarpal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_PROXIMAL** = ``22`` + +Little proximal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23`` + +Little intermediate joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_DISTAL** = ``24`` + +Little distal joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_LITTLE_TIP** = ``25`` + +Little tip joint. + +.. _class_OpenXRInterface_constant_HAND_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoints<enum_OpenXRInterface_HandJoints>` **HAND_JOINT_MAX** = ``26`` + +Maximum value for the hand joint enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandJointFlags: + +.. rst-class:: classref-enumeration + +flags **HandJointFlags**: :ref:`🔗<enum_OpenXRInterface_HandJointFlags>` + +.. _class_OpenXRInterface_constant_HAND_JOINT_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_NONE** = ``0`` + +No flags are set. + +.. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_VALID** = ``1`` + +If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used. + +.. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ORIENTATION_TRACKED** = ``2`` + +If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data. + +.. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_VALID** = ``4`` + +If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used. + +.. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_POSITION_TRACKED** = ``8`` + +If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data. + +.. _class_OpenXRInterface_constant_HAND_JOINT_LINEAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_LINEAR_VELOCITY_VALID** = ``16`` + +If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used. + +.. _class_OpenXRInterface_constant_HAND_JOINT_ANGULAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>` **HAND_JOINT_ANGULAR_VELOCITY_VALID** = ``32`` + +If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -140,12 +619,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **display_refresh_rate** = ``0.0`` +:ref:`float<class_float>` **display_refresh_rate** = ``0.0`` :ref:`🔗<class_OpenXRInterface_property_display_refresh_rate>` .. rst-class:: classref-property-setget -- void **set_display_refresh_rate** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_display_refresh_rate** **(** **)** +- |void| **set_display_refresh_rate**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_display_refresh_rate**\ (\ ) The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized. @@ -153,19 +632,95 @@ The display refresh rate for the current HMD. Only functional if this feature is ---- +.. _class_OpenXRInterface_property_foveation_dynamic: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **foveation_dynamic** = ``false`` :ref:`🔗<class_OpenXRInterface_property_foveation_dynamic>` + +.. rst-class:: classref-property-setget + +- |void| **set_foveation_dynamic**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_foveation_dynamic**\ (\ ) + +Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and :ref:`foveation_level<class_OpenXRInterface_property_foveation_level>`. + +\ **Note:** Only works on compatibility renderer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_foveation_level: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **foveation_level** = ``0`` :ref:`🔗<class_OpenXRInterface_property_foveation_level>` + +.. rst-class:: classref-property-setget + +- |void| **set_foveation_level**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_foveation_level**\ (\ ) + +Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible. + +\ **Note:** Only works on compatibility renderer. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_property_render_target_size_multiplier: .. rst-class:: classref-property -:ref:`float<class_float>` **render_target_size_multiplier** = ``1.0`` +:ref:`float<class_float>` **render_target_size_multiplier** = ``1.0`` :ref:`🔗<class_OpenXRInterface_property_render_target_size_multiplier>` .. rst-class:: classref-property-setget -- void **set_render_target_size_multiplier** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_render_target_size_multiplier** **(** **)** +- |void| **set_render_target_size_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_render_target_size_multiplier**\ (\ ) The render size multiplier for the current HMD. Must be set before the interface has been initialized. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_vrs_min_radius: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **vrs_min_radius** = ``20.0`` :ref:`🔗<class_OpenXRInterface_property_vrs_min_radius>` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_min_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vrs_min_radius**\ (\ ) + +The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + +\ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_vrs_strength: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **vrs_strength** = ``1.0`` :ref:`🔗<class_OpenXRInterface_property_vrs_strength>` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vrs_strength**\ (\ ) + +The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + +\ **Note:** Mobile and Forward+ renderers only. Requires :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to be set to :ref:`Viewport.VRS_XR<class_Viewport_constant_VRS_XR>`. + .. rst-class:: classref-section-separator ---- @@ -179,7 +734,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_action_sets** **(** **)** |const| +:ref:`Array<class_Array>` **get_action_sets**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_action_sets>` Returns a list of action sets registered with Godot (loaded from the action map at runtime). @@ -191,7 +746,7 @@ Returns a list of action sets registered with Godot (loaded from the action map .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const| +:ref:`Array<class_Array>` **get_available_display_refresh_rates**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_available_display_refresh_rates>` Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized. @@ -199,11 +754,121 @@ Returns display refresh rates supported by the current HMD. Only returned if thi ---- +.. _class_OpenXRInterface_method_get_hand_joint_angular_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_hand_joint_angular_velocity**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_angular_velocity>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_angular_velocity<class_XRHandTracker_method_get_hand_joint_angular_velocity>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`HandJointFlags<enum_OpenXRInterface_HandJointFlags>`\] **get_hand_joint_flags**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_flags>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_flags<class_XRHandTracker_method_get_hand_joint_flags>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns flags that inform us of the validity of the tracking data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_linear_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_hand_joint_linear_velocity**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_linear_velocity>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_linear_velocity<class_XRHandTracker_method_get_hand_joint_linear_velocity>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_position: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_hand_joint_position**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_position>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform<class_XRHandTracker_method_get_hand_joint_transform>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D<class_XROrigin3D>` without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_radius: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **get_hand_joint_radius**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_radius>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_radius<class_XRHandTracker_method_get_hand_joint_radius>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_rotation: + +.. rst-class:: classref-method + +:ref:`Quaternion<class_Quaternion>` **get_hand_joint_rotation**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, joint\: :ref:`HandJoints<enum_OpenXRInterface_HandJoints>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_joint_rotation>` + +**Deprecated:** Use :ref:`XRHandTracker.get_hand_joint_transform<class_XRHandTracker_method_get_hand_joint_transform>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_tracking_source: + +.. rst-class:: classref-method + +:ref:`HandTrackedSource<enum_OpenXRInterface_HandTrackedSource>` **get_hand_tracking_source**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_hand_tracking_source>` + +**Deprecated:** Use :ref:`XRHandTracker.hand_tracking_source<class_XRHandTracker_property_hand_tracking_source>` obtained from :ref:`XRServer.get_tracker<class_XRServer_method_get_tracker>` instead. + +If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for ``hand``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_motion_range: + +.. rst-class:: classref-method + +:ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>` **get_motion_range**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_get_motion_range>` + +If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_method_is_action_set_active: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_action_set_active** **(** :ref:`String<class_String>` name **)** |const| +:ref:`bool<class_bool>` **is_action_set_active**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_action_set_active>` Returns ``true`` if the given action set is active. @@ -211,14 +876,82 @@ Returns ``true`` if the given action set is active. ---- +.. _class_OpenXRInterface_method_is_eye_gaze_interaction_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_eye_gaze_interaction_supported**\ (\ ) :ref:`🔗<class_OpenXRInterface_method_is_eye_gaze_interaction_supported>` + +Returns the capabilities of the eye gaze interaction extension. + +\ **Note:** This only returns a valid value after OpenXR has been initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_is_foveation_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_foveation_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_foveation_supported>` + +Returns ``true`` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value. + +\ **Note:** This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to ``VRS_XR`` on desktop. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_is_hand_interaction_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_hand_interaction_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRInterface_method_is_hand_interaction_supported>` + +Returns ``true`` if OpenXR's hand interaction profile is supported and enabled. + +\ **Note:** This only returns a valid value after OpenXR has been initialized. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_is_hand_tracking_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_hand_tracking_supported**\ (\ ) :ref:`🔗<class_OpenXRInterface_method_is_hand_tracking_supported>` + +Returns ``true`` if OpenXR's hand tracking is supported and enabled. + +\ **Note:** This only returns a valid value after OpenXR has been initialized. + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_method_set_action_set_active: .. rst-class:: classref-method -void **set_action_set_active** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` active **)** +|void| **set_action_set_active**\ (\ name\: :ref:`String<class_String>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OpenXRInterface_method_set_action_set_active>` Sets the given action set as active or inactive. +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_set_motion_range: + +.. rst-class:: classref-method + +|void| **set_motion_range**\ (\ hand\: :ref:`Hand<enum_OpenXRInterface_Hand>`, motion_range\: :ref:`HandMotionRange<enum_OpenXRInterface_HandMotionRange>`\ ) :ref:`🔗<class_OpenXRInterface_method_set_motion_range>` + +If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -226,3 +959,4 @@ Sets the given action set as active or inactive. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_openxripbinding.rst b/classes/class_openxripbinding.rst index 1a1385fb1be..8f0534e8534 100644 --- a/classes/class_openxripbinding.rst +++ b/classes/class_openxripbinding.rst @@ -43,15 +43,15 @@ Methods .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_path<class_OpenXRIPBinding_method_add_path>` **(** :ref:`String<class_String>` path **)** | - +-------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_path_count<class_OpenXRIPBinding_method_get_path_count>` **(** **)** |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_path<class_OpenXRIPBinding_method_has_path>` **(** :ref:`String<class_String>` path **)** |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_path<class_OpenXRIPBinding_method_remove_path>` **(** :ref:`String<class_String>` path **)** | - +-------------------------+-------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_path<class_OpenXRIPBinding_method_add_path>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_path_count<class_OpenXRIPBinding_method_get_path_count>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_path<class_OpenXRIPBinding_method_has_path>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_path<class_OpenXRIPBinding_method_remove_path>`\ (\ path\: :ref:`String<class_String>`\ ) | + +-------------------------+----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,12 +66,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpenXRAction<class_OpenXRAction>` **action** +:ref:`OpenXRAction<class_OpenXRAction>` **action** :ref:`🔗<class_OpenXRIPBinding_property_action>` .. rst-class:: classref-property-setget -- void **set_action** **(** :ref:`OpenXRAction<class_OpenXRAction>` value **)** -- :ref:`OpenXRAction<class_OpenXRAction>` **get_action** **(** **)** +- |void| **set_action**\ (\ value\: :ref:`OpenXRAction<class_OpenXRAction>`\ ) +- :ref:`OpenXRAction<class_OpenXRAction>` **get_action**\ (\ ) :ref:`OpenXRAction<class_OpenXRAction>` that is bound to these paths. @@ -83,15 +83,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **paths** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **paths** = ``PackedStringArray()`` :ref:`🔗<class_OpenXRIPBinding_property_paths>` .. rst-class:: classref-property-setget -- void **set_paths** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_paths** **(** **)** +- |void| **set_paths**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_paths**\ (\ ) Paths that define the inputs or outputs bound on the device. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-section-separator ---- @@ -105,7 +107,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_path** **(** :ref:`String<class_String>` path **)** +|void| **add_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRIPBinding_method_add_path>` Add an input/output path to this binding. @@ -117,7 +119,7 @@ Add an input/output path to this binding. .. rst-class:: classref-method -:ref:`int<class_int>` **get_path_count** **(** **)** |const| +:ref:`int<class_int>` **get_path_count**\ (\ ) |const| :ref:`🔗<class_OpenXRIPBinding_method_get_path_count>` Get the number of input/output paths in this binding. @@ -129,7 +131,7 @@ Get the number of input/output paths in this binding. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_path** **(** :ref:`String<class_String>` path **)** |const| +:ref:`bool<class_bool>` **has_path**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OpenXRIPBinding_method_has_path>` Returns ``true`` if this input/output path is part of this binding. @@ -141,7 +143,7 @@ Returns ``true`` if this input/output path is part of this binding. .. rst-class:: classref-method -void **remove_path** **(** :ref:`String<class_String>` path **)** +|void| **remove_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OpenXRIPBinding_method_remove_path>` Removes this input/output path from this binding. @@ -152,3 +154,4 @@ Removes this input/output path from this binding. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_optimizedtranslation.rst b/classes/class_optimizedtranslation.rst index e404d60ac74..baa1e451239 100644 --- a/classes/class_optimizedtranslation.rst +++ b/classes/class_optimizedtranslation.rst @@ -29,9 +29,9 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate<class_OptimizedTranslation_method_generate>` **(** :ref:`Translation<class_Translation>` from **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ + +--------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generate<class_OptimizedTranslation_method_generate>`\ (\ from\: :ref:`Translation<class_Translation>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,7 +46,7 @@ Method Descriptions .. rst-class:: classref-method -void **generate** **(** :ref:`Translation<class_Translation>` from **)** +|void| **generate**\ (\ from\: :ref:`Translation<class_Translation>`\ ) :ref:`🔗<class_OptimizedTranslation_method_generate>` Generates and sets an optimized translation from the given :ref:`Translation<class_Translation>` resource. @@ -57,3 +57,4 @@ Generates and sets an optimized translation from the given :ref:`Translation<cla .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_optionbutton.rst b/classes/class_optionbutton.rst index b3be2271549..199d36b5d08 100644 --- a/classes/class_optionbutton.rst +++ b/classes/class_optionbutton.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: select + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -23,12 +26,8 @@ Description See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node. -\ **Note:** Properties :ref:`Button.text<class_Button_property_text>` and :ref:`Button.icon<class_Button_property_icon>` are automatically set based on the selected item. They shouldn't be changed manually. - \ **Note:** The ID values used for items are limited to 32 bits, not full 64 bits of :ref:`int<class_int>`. This has a range of ``-2^32`` to ``2^32 - 1``, i.e. ``-2147483648`` to ``2147483647``. -\ **Note:** The ID values used for items are 32-bit, unlike :ref:`int<class_int>` which is always 64-bit. They go from ``-2147483648`` to ``2147483647``. - \ **Note:** The :ref:`Button.text<class_Button_property_text>` and :ref:`Button.icon<class_Button_property_icon>` properties are set automatically based on the selected item. They shouldn't be changed manually. .. rst-class:: classref-reftable-group @@ -63,59 +62,61 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_item<class_OptionButton_method_add_icon_item>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1 **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_item<class_OptionButton_method_add_item>` **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1 **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_separator<class_OptionButton_method_add_separator>` **(** :ref:`String<class_String>` text="" **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_OptionButton_method_clear>` **(** **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_OptionButton_method_get_item_icon>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_id<class_OptionButton_method_get_item_id>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_index<class_OptionButton_method_get_item_index>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_OptionButton_method_get_item_metadata>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_text<class_OptionButton_method_get_item_text>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_OptionButton_method_get_item_tooltip>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_popup<class_OptionButton_method_get_popup>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selectable_item<class_OptionButton_method_get_selectable_item>` **(** :ref:`bool<class_bool>` from_last=false **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selected_id<class_OptionButton_method_get_selected_id>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_selected_metadata<class_OptionButton_method_get_selected_metadata>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_selectable_items<class_OptionButton_method_has_selectable_items>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_OptionButton_method_is_item_disabled>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_separator<class_OptionButton_method_is_item_separator>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_item<class_OptionButton_method_remove_item>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select<class_OptionButton_method_select>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_disabled<class_OptionButton_method_set_item_disabled>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon<class_OptionButton_method_set_item_icon>` **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_id<class_OptionButton_method_set_item_id>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` id **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_metadata<class_OptionButton_method_set_item_metadata>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` metadata **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_text<class_OptionButton_method_set_item_text>` **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_tooltip<class_OptionButton_method_set_item_tooltip>` **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show_popup<class_OptionButton_method_show_popup>` **(** **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_item<class_OptionButton_method_add_icon_item>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_item<class_OptionButton_method_add_item>`\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_separator<class_OptionButton_method_add_separator>`\ (\ text\: :ref:`String<class_String>` = ""\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_OptionButton_method_clear>`\ (\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_OptionButton_method_get_item_icon>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_id<class_OptionButton_method_get_item_id>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_index<class_OptionButton_method_get_item_index>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_OptionButton_method_get_item_metadata>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_text<class_OptionButton_method_get_item_text>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_OptionButton_method_get_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_popup<class_OptionButton_method_get_popup>`\ (\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selectable_item<class_OptionButton_method_get_selectable_item>`\ (\ from_last\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selected_id<class_OptionButton_method_get_selected_id>`\ (\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_selected_metadata<class_OptionButton_method_get_selected_metadata>`\ (\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_selectable_items<class_OptionButton_method_has_selectable_items>`\ (\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_OptionButton_method_is_item_disabled>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_separator<class_OptionButton_method_is_item_separator>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item<class_OptionButton_method_remove_item>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select<class_OptionButton_method_select>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_disable_shortcuts<class_OptionButton_method_set_disable_shortcuts>`\ (\ disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_disabled<class_OptionButton_method_set_item_disabled>`\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon<class_OptionButton_method_set_item_icon>`\ (\ idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_id<class_OptionButton_method_set_item_id>`\ (\ idx\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_metadata<class_OptionButton_method_set_item_metadata>`\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text<class_OptionButton_method_set_item_text>`\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip<class_OptionButton_method_set_item_tooltip>`\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show_popup<class_OptionButton_method_show_popup>`\ (\ ) | + +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -125,53 +126,13 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_color<class_OptionButton_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_OptionButton_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_OptionButton_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_OptionButton_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_OptionButton_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_OptionButton_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_OptionButton_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int<class_int>` | :ref:`arrow_margin<class_OptionButton_theme_constant_arrow_margin>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int<class_int>` | :ref:`h_separation<class_OptionButton_theme_constant_h_separation>` | ``2`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int<class_int>` | :ref:`modulate_arrow<class_OptionButton_theme_constant_modulate_arrow>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int<class_int>` | :ref:`outline_size<class_OptionButton_theme_constant_outline_size>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font<class_Font>` | :ref:`font<class_OptionButton_theme_font_font>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_size<class_OptionButton_theme_font_size_font_size>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_OptionButton_theme_icon_arrow>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_OptionButton_theme_style_disabled>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled_mirrored<class_OptionButton_theme_style_disabled_mirrored>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_OptionButton_theme_style_focus>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_OptionButton_theme_style_hover>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_mirrored<class_OptionButton_theme_style_hover_mirrored>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_OptionButton_theme_style_normal>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`normal_mirrored<class_OptionButton_theme_style_normal_mirrored>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_OptionButton_theme_style_pressed>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed_mirrored<class_OptionButton_theme_style_pressed_mirrored>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`arrow_margin<class_OptionButton_theme_constant_arrow_margin>` | ``4`` | + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`modulate_arrow<class_OptionButton_theme_constant_modulate_arrow>` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_OptionButton_theme_icon_arrow>` | | + +-----------------------------------+-------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -186,7 +147,7 @@ Signals .. rst-class:: classref-signal -**item_focused** **(** :ref:`int<class_int>` index **)** +**item_focused**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OptionButton_signal_item_focused>` Emitted when the user navigates to an item using the :ref:`ProjectSettings.input/ui_up<class_ProjectSettings_property_input/ui_up>` or :ref:`ProjectSettings.input/ui_down<class_ProjectSettings_property_input/ui_down>` input actions. The index of the item selected is passed as argument. @@ -198,7 +159,7 @@ Emitted when the user navigates to an item using the :ref:`ProjectSettings.input .. rst-class:: classref-signal -**item_selected** **(** :ref:`int<class_int>` index **)** +**item_selected**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OptionButton_signal_item_selected>` Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. @@ -217,12 +178,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_reselect** = ``false`` +:ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_OptionButton_property_allow_reselect>` .. rst-class:: classref-property-setget -- void **set_allow_reselect** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_reselect** **(** **)** +- |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_reselect**\ (\ ) If ``true``, the currently selected item can be selected again. @@ -234,12 +195,12 @@ If ``true``, the currently selected item can be selected again. .. rst-class:: classref-property -:ref:`bool<class_bool>` **fit_to_longest_item** = ``true`` +:ref:`bool<class_bool>` **fit_to_longest_item** = ``true`` :ref:`🔗<class_OptionButton_property_fit_to_longest_item>` .. rst-class:: classref-property-setget -- void **set_fit_to_longest_item** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_fit_to_longest_item** **(** **)** +- |void| **set_fit_to_longest_item**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_fit_to_longest_item**\ (\ ) If ``true``, minimum size will be determined by the longest item's text, instead of the currently selected one's. @@ -253,12 +214,12 @@ If ``true``, minimum size will be determined by the longest item's text, instead .. rst-class:: classref-property -:ref:`int<class_int>` **item_count** = ``0`` +:ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_OptionButton_property_item_count>` .. rst-class:: classref-property-setget -- void **set_item_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_count** **(** **)** +- |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_count**\ (\ ) The number of items to select from. @@ -270,11 +231,11 @@ The number of items to select from. .. rst-class:: classref-property -:ref:`int<class_int>` **selected** = ``-1`` +:ref:`int<class_int>` **selected** = ``-1`` :ref:`🔗<class_OptionButton_property_selected>` .. rst-class:: classref-property-setget -- :ref:`int<class_int>` **get_selected** **(** **)** +- :ref:`int<class_int>` **get_selected**\ (\ ) The index of the currently selected item, or ``-1`` if no item is selected. @@ -291,7 +252,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_icon_item** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1 **)** +|void| **add_icon_item**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_OptionButton_method_add_icon_item>` Adds an item, with a ``texture`` icon, text ``label`` and (optionally) ``id``. If no ``id`` is passed, the item index will be used as the item's ID. New items are appended at the end. @@ -303,7 +264,7 @@ Adds an item, with a ``texture`` icon, text ``label`` and (optionally) ``id``. I .. rst-class:: classref-method -void **add_item** **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1 **)** +|void| **add_item**\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_OptionButton_method_add_item>` Adds an item, with text ``label`` and (optionally) ``id``. If no ``id`` is passed, the item index will be used as the item's ID. New items are appended at the end. @@ -315,7 +276,7 @@ Adds an item, with text ``label`` and (optionally) ``id``. If no ``id`` is passe .. rst-class:: classref-method -void **add_separator** **(** :ref:`String<class_String>` text="" **)** +|void| **add_separator**\ (\ text\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_OptionButton_method_add_separator>` Adds a separator to the list of items. Separators help to group items, and can optionally be given a ``text`` header. A separator also gets an index assigned, and is appended at the end of the item list. @@ -327,7 +288,7 @@ Adds a separator to the list of items. Separators help to group items, and can o .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_OptionButton_method_clear>` Clears all the items in the **OptionButton**. @@ -339,7 +300,7 @@ Clears all the items in the **OptionButton**. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_item_icon** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_icon>` Returns the icon of the item at index ``idx``. @@ -351,7 +312,7 @@ Returns the icon of the item at index ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_id** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`int<class_int>` **get_item_id**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_id>` Returns the ID of the item at index ``idx``. @@ -363,7 +324,7 @@ Returns the ID of the item at index ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_index** **(** :ref:`int<class_int>` id **)** |const| +:ref:`int<class_int>` **get_item_index**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_index>` Returns the index of the item with the given ``id``. @@ -375,7 +336,7 @@ Returns the index of the item with the given ``id``. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_item_metadata** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Variant<class_Variant>` **get_item_metadata**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_metadata>` Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. @@ -387,7 +348,7 @@ Retrieves the metadata of an item. Metadata may be any type and can be used to s .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_text** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_item_text**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_text>` Returns the text of the item at index ``idx``. @@ -399,7 +360,7 @@ Returns the text of the item at index ``idx``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_tooltip** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_item_tooltip**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_get_item_tooltip>` Returns the tooltip of the item at index ``idx``. @@ -411,7 +372,7 @@ Returns the tooltip of the item at index ``idx``. .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_popup** **(** **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_popup**\ (\ ) |const| :ref:`🔗<class_OptionButton_method_get_popup>` Returns the :ref:`PopupMenu<class_PopupMenu>` contained in this button. @@ -425,7 +386,7 @@ Returns the :ref:`PopupMenu<class_PopupMenu>` contained in this button. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selectable_item** **(** :ref:`bool<class_bool>` from_last=false **)** |const| +:ref:`int<class_int>` **get_selectable_item**\ (\ from_last\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_OptionButton_method_get_selectable_item>` Returns the index of the first item which is not disabled, or marked as a separator. If ``from_last`` is ``true``, the items will be searched in reverse order. @@ -439,7 +400,7 @@ Returns ``-1`` if no item is found. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selected_id** **(** **)** |const| +:ref:`int<class_int>` **get_selected_id**\ (\ ) |const| :ref:`🔗<class_OptionButton_method_get_selected_id>` Returns the ID of the selected item, or ``-1`` if no item is selected. @@ -451,7 +412,7 @@ Returns the ID of the selected item, or ``-1`` if no item is selected. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_selected_metadata** **(** **)** |const| +:ref:`Variant<class_Variant>` **get_selected_metadata**\ (\ ) |const| :ref:`🔗<class_OptionButton_method_get_selected_metadata>` Gets the metadata of the selected item. Metadata for items can be set using :ref:`set_item_metadata<class_OptionButton_method_set_item_metadata>`. @@ -463,7 +424,7 @@ Gets the metadata of the selected item. Metadata for items can be set using :ref .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_selectable_items** **(** **)** |const| +:ref:`bool<class_bool>` **has_selectable_items**\ (\ ) |const| :ref:`🔗<class_OptionButton_method_has_selectable_items>` Returns ``true`` if this button contains at least one item which is not disabled, or marked as a separator. @@ -475,7 +436,7 @@ Returns ``true`` if this button contains at least one item which is not disabled .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_disabled** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_disabled**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_is_item_disabled>` Returns ``true`` if the item at index ``idx`` is disabled. @@ -487,7 +448,7 @@ Returns ``true`` if the item at index ``idx`` is disabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_separator** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_item_separator**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OptionButton_method_is_item_separator>` Returns ``true`` if the item at index ``idx`` is marked as a separator. @@ -499,7 +460,7 @@ Returns ``true`` if the item at index ``idx`` is marked as a separator. .. rst-class:: classref-method -void **remove_item** **(** :ref:`int<class_int>` idx **)** +|void| **remove_item**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OptionButton_method_remove_item>` Removes the item at index ``idx``. @@ -511,7 +472,7 @@ Removes the item at index ``idx``. .. rst-class:: classref-method -void **select** **(** :ref:`int<class_int>` idx **)** +|void| **select**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OptionButton_method_select>` Selects an item by index and makes it the current item. This will work even if the item is disabled. @@ -521,11 +482,23 @@ Passing ``-1`` as the index deselects any currently selected item. ---- +.. _class_OptionButton_method_set_disable_shortcuts: + +.. rst-class:: classref-method + +|void| **set_disable_shortcuts**\ (\ disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OptionButton_method_set_disable_shortcuts>` + +If ``true``, shortcuts are disabled and cannot be used to trigger the button. + +.. rst-class:: classref-item-separator + +---- + .. _class_OptionButton_method_set_item_disabled: .. rst-class:: classref-method -void **set_item_disabled** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` disabled **)** +|void| **set_item_disabled**\ (\ idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OptionButton_method_set_item_disabled>` Sets whether the item at index ``idx`` is disabled. @@ -539,7 +512,7 @@ Disabled items are drawn differently in the dropdown and are not selectable by t .. rst-class:: classref-method -void **set_item_icon** **(** :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_item_icon**\ (\ idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_OptionButton_method_set_item_icon>` Sets the icon of the item at index ``idx``. @@ -551,7 +524,7 @@ Sets the icon of the item at index ``idx``. .. rst-class:: classref-method -void **set_item_id** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` id **)** +|void| **set_item_id**\ (\ idx\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OptionButton_method_set_item_id>` Sets the ID of the item at index ``idx``. @@ -563,7 +536,7 @@ Sets the ID of the item at index ``idx``. .. rst-class:: classref-method -void **set_item_metadata** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_item_metadata**\ (\ idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_OptionButton_method_set_item_metadata>` Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. @@ -575,7 +548,7 @@ Sets the metadata of an item. Metadata may be of any type and can be used to sto .. rst-class:: classref-method -void **set_item_text** **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` text **)** +|void| **set_item_text**\ (\ idx\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OptionButton_method_set_item_text>` Sets the text of the item at index ``idx``. @@ -587,7 +560,7 @@ Sets the text of the item at index ``idx``. .. rst-class:: classref-method -void **set_item_tooltip** **(** :ref:`int<class_int>` idx, :ref:`String<class_String>` tooltip **)** +|void| **set_item_tooltip**\ (\ idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OptionButton_method_set_item_tooltip>` Sets the tooltip of the item at index ``idx``. @@ -599,7 +572,7 @@ Sets the tooltip of the item at index ``idx``. .. rst-class:: classref-method -void **show_popup** **(** **)** +|void| **show_popup**\ (\ ) :ref:`🔗<class_OptionButton_method_show_popup>` Adjusts popup position and sizing for the **OptionButton**, then shows the :ref:`PopupMenu<class_PopupMenu>`. Prefer this over using ``get_popup().popup()``. @@ -612,95 +585,11 @@ Adjusts popup position and sizing for the **OptionButton**, then shows the :ref: Theme Property Descriptions --------------------------- -.. _class_OptionButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -Default text :ref:`Color<class_Color>` of the **OptionButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -Text :ref:`Color<class_Color>` used when the **OptionButton** is disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -Text :ref:`Color<class_Color>` used when the **OptionButton** is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -Text :ref:`Color<class_Color>` used when the **OptionButton** is being hovered. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -Text :ref:`Color<class_Color>` used when the **OptionButton** is being hovered and pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -The tint of text outline of the **OptionButton**. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -Text :ref:`Color<class_Color>` used when the **OptionButton** is being pressed. - -.. rst-class:: classref-item-separator - ----- - .. _class_OptionButton_theme_constant_arrow_margin: .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **arrow_margin** = ``4`` +:ref:`int<class_int>` **arrow_margin** = ``4`` :ref:`🔗<class_OptionButton_theme_constant_arrow_margin>` The horizontal space between the arrow icon and the right edge of the button. @@ -708,23 +597,11 @@ The horizontal space between the arrow icon and the right edge of the button. ---- -.. _class_OptionButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **h_separation** = ``2`` - -The horizontal space between **OptionButton**'s icon and text. Negative values will be treated as ``0`` when used. - -.. rst-class:: classref-item-separator - ----- - .. _class_OptionButton_theme_constant_modulate_arrow: .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **modulate_arrow** = ``0`` +:ref:`int<class_int>` **modulate_arrow** = ``0`` :ref:`🔗<class_OptionButton_theme_constant_modulate_arrow>` If different than ``0``, the arrow icon will be modulated to the font color. @@ -732,160 +609,14 @@ If different than ``0``, the arrow icon will be modulated to the font color. ---- -.. _class_OptionButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **outline_size** = ``0`` - -The size of the text outline. - -\ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_OptionButton_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font<class_Font>` **font** - -:ref:`Font<class_Font>` of the **OptionButton**'s text. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **font_size** - -Font size of the **OptionButton**'s text. - -.. rst-class:: classref-item-separator - ----- - .. _class_OptionButton_theme_icon_arrow: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **arrow** +:ref:`Texture2D<class_Texture2D>` **arrow** :ref:`🔗<class_OptionButton_theme_icon_arrow>` The arrow icon to be drawn on the right end of the button. -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **disabled** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is disabled (for left-to-right layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_disabled_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **disabled_mirrored** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is disabled (for right-to-left layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **focus** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **hover** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is being hovered (for left-to-right layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_hover_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **hover_mirrored** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is being hovered (for right-to-left layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **normal** - -Default :ref:`StyleBox<class_StyleBox>` for the **OptionButton** (for left-to-right layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_normal_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **normal_mirrored** - -Default :ref:`StyleBox<class_StyleBox>` for the **OptionButton** (for right-to-left layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **pressed** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is being pressed (for left-to-right layouts). - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_pressed_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **pressed_mirrored** - -:ref:`StyleBox<class_StyleBox>` used when the **OptionButton** is being pressed (for right-to-left layouts). - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -893,3 +624,4 @@ Default :ref:`StyleBox<class_StyleBox>` for the **OptionButton** (for right-to-l .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_ormmaterial3d.rst b/classes/class_ormmaterial3d.rst index 87e804705d5..be989b52dc0 100644 --- a/classes/class_ormmaterial3d.rst +++ b/classes/class_ormmaterial3d.rst @@ -12,7 +12,7 @@ ORMMaterial3D **Inherits:** :ref:`BaseMaterial3D<class_BaseMaterial3D>` **<** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Physically based rendering (PBR) material that can be applied to 3D objects, can use an ORM texture. +A PBR (Physically Based Rendering) material to be used on 3D objects. Uses an ORM texture. .. rst-class:: classref-introduction-group @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_os.rst b/classes/class_os.rst index f2ec22095e6..1eca41e0573 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -19,16 +19,16 @@ Provides access to common operating system functionalities. Description ----------- -This class wraps the most common functionalities for communicating with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. +The **OS** class wraps the most common functionalities for communicating with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. -\ **Note:** In Godot 4, **OS** functions related to window management were moved to the :ref:`DisplayServer<class_DisplayServer>` singleton. +\ **Note:** In Godot 4, **OS** functions related to window management, clipboard, and TTS were moved to the :ref:`DisplayServer<class_DisplayServer>` singleton (and the :ref:`Window<class_Window>` class). Functions related to time were removed and are only available in the :ref:`Time<class_Time>` class. .. rst-class:: classref-introduction-group Tutorials --------- -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -54,135 +54,143 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`alert<class_OS_method_alert>` **(** :ref:`String<class_String>` text, :ref:`String<class_String>` title="Alert!" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close_midi_inputs<class_OS_method_close_midi_inputs>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`crash<class_OS_method_crash>` **(** :ref:`String<class_String>` message **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`create_instance<class_OS_method_create_instance>` **(** :ref:`PackedStringArray<class_PackedStringArray>` arguments **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`create_process<class_OS_method_create_process>` **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` arguments, :ref:`bool<class_bool>` open_console=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delay_msec<class_OS_method_delay_msec>` **(** :ref:`int<class_int>` msec **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delay_usec<class_OS_method_delay_usec>` **(** :ref:`int<class_int>` usec **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`execute<class_OS_method_execute>` **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` arguments, :ref:`Array<class_Array>` output=[], :ref:`bool<class_bool>` read_stderr=false, :ref:`bool<class_bool>` open_console=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`find_keycode_from_string<class_OS_method_find_keycode_from_string>` **(** :ref:`String<class_String>` string **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_cache_dir<class_OS_method_get_cache_dir>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_config_dir<class_OS_method_get_config_dir>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_data_dir<class_OS_method_get_data_dir>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_distribution_name<class_OS_method_get_distribution_name>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_environment<class_OS_method_get_environment>` **(** :ref:`String<class_String>` variable **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_executable_path<class_OS_method_get_executable_path>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_granted_permissions<class_OS_method_get_granted_permissions>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_keycode_string<class_OS_method_get_keycode_string>` **(** :ref:`Key<enum_@GlobalScope_Key>` code **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_locale<class_OS_method_get_locale>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_locale_language<class_OS_method_get_locale_language>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_main_thread_id<class_OS_method_get_main_thread_id>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_memory_info<class_OS_method_get_memory_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_model_name<class_OS_method_get_model_name>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_name<class_OS_method_get_name>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_process_id<class_OS_method_get_process_id>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_processor_count<class_OS_method_get_processor_count>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_processor_name<class_OS_method_get_processor_name>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_restart_on_exit_arguments<class_OS_method_get_restart_on_exit_arguments>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_static_memory_peak_usage<class_OS_method_get_static_memory_peak_usage>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_static_memory_usage<class_OS_method_get_static_memory_usage>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_system_dir<class_OS_method_get_system_dir>` **(** :ref:`SystemDir<enum_OS_SystemDir>` dir, :ref:`bool<class_bool>` shared_storage=true **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_system_font_path<class_OS_method_get_system_font_path>` **(** :ref:`String<class_String>` font_name, :ref:`int<class_int>` weight=400, :ref:`int<class_int>` stretch=100, :ref:`bool<class_bool>` italic=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_system_font_path_for_text<class_OS_method_get_system_font_path_for_text>` **(** :ref:`String<class_String>` font_name, :ref:`String<class_String>` text, :ref:`String<class_String>` locale="", :ref:`String<class_String>` script="", :ref:`int<class_int>` weight=400, :ref:`int<class_int>` stretch=100, :ref:`bool<class_bool>` italic=false **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_system_fonts<class_OS_method_get_system_fonts>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_thread_caller_id<class_OS_method_get_thread_caller_id>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_unique_id<class_OS_method_get_unique_id>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_user_data_dir<class_OS_method_get_user_data_dir>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_version<class_OS_method_get_version>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_video_adapter_driver_info<class_OS_method_get_video_adapter_driver_info>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_environment<class_OS_method_has_environment>` **(** :ref:`String<class_String>` variable **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_feature<class_OS_method_has_feature>` **(** :ref:`String<class_String>` tag_name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_debug_build<class_OS_method_is_debug_build>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_keycode_unicode<class_OS_method_is_keycode_unicode>` **(** :ref:`int<class_int>` code **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_process_running<class_OS_method_is_process_running>` **(** :ref:`int<class_int>` pid **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_restart_on_exit_set<class_OS_method_is_restart_on_exit_set>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_sandboxed<class_OS_method_is_sandboxed>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_stdout_verbose<class_OS_method_is_stdout_verbose>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_userfs_persistent<class_OS_method_is_userfs_persistent>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`kill<class_OS_method_kill>` **(** :ref:`int<class_int>` pid **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`move_to_trash<class_OS_method_move_to_trash>` **(** :ref:`String<class_String>` path **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`open_midi_inputs<class_OS_method_open_midi_inputs>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`read_string_from_stdin<class_OS_method_read_string_from_stdin>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`request_permission<class_OS_method_request_permission>` **(** :ref:`String<class_String>` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`request_permissions<class_OS_method_request_permissions>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`revoke_granted_permissions<class_OS_method_revoke_granted_permissions>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_environment<class_OS_method_set_environment>` **(** :ref:`String<class_String>` variable, :ref:`String<class_String>` value **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_restart_on_exit<class_OS_method_set_restart_on_exit>` **(** :ref:`bool<class_bool>` restart, :ref:`PackedStringArray<class_PackedStringArray>` arguments=PackedStringArray() **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_thread_name<class_OS_method_set_thread_name>` **(** :ref:`String<class_String>` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_file_access_save_and_swap<class_OS_method_set_use_file_access_save_and_swap>` **(** :ref:`bool<class_bool>` enabled **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`shell_open<class_OS_method_shell_open>` **(** :ref:`String<class_String>` uri **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`shell_show_in_file_manager<class_OS_method_shell_show_in_file_manager>` **(** :ref:`String<class_String>` file_or_dir_path, :ref:`bool<class_bool>` open_folder=true **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unset_environment<class_OS_method_unset_environment>` **(** :ref:`String<class_String>` variable **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`alert<class_OS_method_alert>`\ (\ text\: :ref:`String<class_String>`, title\: :ref:`String<class_String>` = "Alert!"\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close_midi_inputs<class_OS_method_close_midi_inputs>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`crash<class_OS_method_crash>`\ (\ message\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`create_instance<class_OS_method_create_instance>`\ (\ arguments\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`create_process<class_OS_method_create_process>`\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`, open_console\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delay_msec<class_OS_method_delay_msec>`\ (\ msec\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delay_usec<class_OS_method_delay_usec>`\ (\ usec\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`execute<class_OS_method_execute>`\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`, output\: :ref:`Array<class_Array>` = [], read_stderr\: :ref:`bool<class_bool>` = false, open_console\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`execute_with_pipe<class_OS_method_execute_with_pipe>`\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`find_keycode_from_string<class_OS_method_find_keycode_from_string>`\ (\ string\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_cache_dir<class_OS_method_get_cache_dir>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_config_dir<class_OS_method_get_config_dir>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_data_dir<class_OS_method_get_data_dir>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_distribution_name<class_OS_method_get_distribution_name>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_entropy<class_OS_method_get_entropy>`\ (\ size\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_environment<class_OS_method_get_environment>`\ (\ variable\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_executable_path<class_OS_method_get_executable_path>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_granted_permissions<class_OS_method_get_granted_permissions>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_keycode_string<class_OS_method_get_keycode_string>`\ (\ code\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_locale<class_OS_method_get_locale>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_locale_language<class_OS_method_get_locale_language>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_main_thread_id<class_OS_method_get_main_thread_id>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_memory_info<class_OS_method_get_memory_info>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_model_name<class_OS_method_get_model_name>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_name<class_OS_method_get_name>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_exit_code<class_OS_method_get_process_exit_code>`\ (\ pid\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_id<class_OS_method_get_process_id>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_processor_count<class_OS_method_get_processor_count>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_processor_name<class_OS_method_get_processor_name>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_restart_on_exit_arguments<class_OS_method_get_restart_on_exit_arguments>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_static_memory_peak_usage<class_OS_method_get_static_memory_peak_usage>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_static_memory_usage<class_OS_method_get_static_memory_usage>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_system_ca_certificates<class_OS_method_get_system_ca_certificates>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_system_dir<class_OS_method_get_system_dir>`\ (\ dir\: :ref:`SystemDir<enum_OS_SystemDir>`, shared_storage\: :ref:`bool<class_bool>` = true\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_system_font_path<class_OS_method_get_system_font_path>`\ (\ font_name\: :ref:`String<class_String>`, weight\: :ref:`int<class_int>` = 400, stretch\: :ref:`int<class_int>` = 100, italic\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_system_font_path_for_text<class_OS_method_get_system_font_path_for_text>`\ (\ font_name\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`, locale\: :ref:`String<class_String>` = "", script\: :ref:`String<class_String>` = "", weight\: :ref:`int<class_int>` = 400, stretch\: :ref:`int<class_int>` = 100, italic\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_system_fonts<class_OS_method_get_system_fonts>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_thread_caller_id<class_OS_method_get_thread_caller_id>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_unique_id<class_OS_method_get_unique_id>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_user_data_dir<class_OS_method_get_user_data_dir>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_version<class_OS_method_get_version>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_video_adapter_driver_info<class_OS_method_get_video_adapter_driver_info>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_environment<class_OS_method_has_environment>`\ (\ variable\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_feature<class_OS_method_has_feature>`\ (\ tag_name\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_debug_build<class_OS_method_is_debug_build>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_keycode_unicode<class_OS_method_is_keycode_unicode>`\ (\ code\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_process_running<class_OS_method_is_process_running>`\ (\ pid\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_restart_on_exit_set<class_OS_method_is_restart_on_exit_set>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_sandboxed<class_OS_method_is_sandboxed>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_stdout_verbose<class_OS_method_is_stdout_verbose>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_userfs_persistent<class_OS_method_is_userfs_persistent>`\ (\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`kill<class_OS_method_kill>`\ (\ pid\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`move_to_trash<class_OS_method_move_to_trash>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_midi_inputs<class_OS_method_open_midi_inputs>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`read_string_from_stdin<class_OS_method_read_string_from_stdin>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`request_permission<class_OS_method_request_permission>`\ (\ name\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`request_permissions<class_OS_method_request_permissions>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`revoke_granted_permissions<class_OS_method_revoke_granted_permissions>`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_environment<class_OS_method_set_environment>`\ (\ variable\: :ref:`String<class_String>`, value\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_restart_on_exit<class_OS_method_set_restart_on_exit>`\ (\ restart\: :ref:`bool<class_bool>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray()\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_thread_name<class_OS_method_set_thread_name>`\ (\ name\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_file_access_save_and_swap<class_OS_method_set_use_file_access_save_and_swap>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`shell_open<class_OS_method_shell_open>`\ (\ uri\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`shell_show_in_file_manager<class_OS_method_shell_show_in_file_manager>`\ (\ file_or_dir_path\: :ref:`String<class_String>`, open_folder\: :ref:`bool<class_bool>` = true\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unset_environment<class_OS_method_unset_environment>`\ (\ variable\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -197,7 +205,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **RenderingDriver**: +enum **RenderingDriver**: :ref:`🔗<enum_OS_RenderingDriver>` .. _class_OS_constant_RENDERING_DRIVER_VULKAN: @@ -215,6 +223,14 @@ The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically us The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. +.. _class_OS_constant_RENDERING_DRIVER_D3D12: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderingDriver<enum_OS_RenderingDriver>` **RENDERING_DRIVER_D3D12** = ``2`` + +The Direct3D 12 rendering driver. + .. rst-class:: classref-item-separator ---- @@ -223,7 +239,7 @@ The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platfo .. rst-class:: classref-enumeration -enum **SystemDir**: +enum **SystemDir**: :ref:`🔗<enum_OS_SystemDir>` .. _class_OS_constant_SYSTEM_DIR_DESKTOP: @@ -231,7 +247,7 @@ enum **SystemDir**: :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_DESKTOP** = ``0`` -Desktop directory path. +Refers to the Desktop directory path. .. _class_OS_constant_SYSTEM_DIR_DCIM: @@ -239,7 +255,7 @@ Desktop directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_DCIM** = ``1`` -DCIM (Digital Camera Images) directory path. +Refers to the DCIM (Digital Camera Images) directory path. .. _class_OS_constant_SYSTEM_DIR_DOCUMENTS: @@ -247,7 +263,7 @@ DCIM (Digital Camera Images) directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_DOCUMENTS** = ``2`` -Documents directory path. +Refers to the Documents directory path. .. _class_OS_constant_SYSTEM_DIR_DOWNLOADS: @@ -255,7 +271,7 @@ Documents directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_DOWNLOADS** = ``3`` -Downloads directory path. +Refers to the Downloads directory path. .. _class_OS_constant_SYSTEM_DIR_MOVIES: @@ -263,7 +279,7 @@ Downloads directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_MOVIES** = ``4`` -Movies directory path. +Refers to the Movies (or Videos) directory path. .. _class_OS_constant_SYSTEM_DIR_MUSIC: @@ -271,7 +287,7 @@ Movies directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_MUSIC** = ``5`` -Music directory path. +Refers to the Music directory path. .. _class_OS_constant_SYSTEM_DIR_PICTURES: @@ -279,7 +295,7 @@ Music directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_PICTURES** = ``6`` -Pictures directory path. +Refers to the Pictures directory path. .. _class_OS_constant_SYSTEM_DIR_RINGTONES: @@ -287,7 +303,7 @@ Pictures directory path. :ref:`SystemDir<enum_OS_SystemDir>` **SYSTEM_DIR_RINGTONES** = ``7`` -Ringtones directory path. +Refers to the Ringtones directory path. .. rst-class:: classref-section-separator @@ -302,14 +318,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **delta_smoothing** = ``true`` +:ref:`bool<class_bool>` **delta_smoothing** = ``true`` :ref:`🔗<class_OS_property_delta_smoothing>` .. rst-class:: classref-property-setget -- void **set_delta_smoothing** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_delta_smoothing_enabled** **(** **)** +- |void| **set_delta_smoothing**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_delta_smoothing_enabled**\ (\ ) + +If ``true``, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This only works on systems where V-Sync is active. -If ``true``, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This will only operate on systems where V-Sync is active. +\ **Note:** On start-up, this is the same as :ref:`ProjectSettings.application/run/delta_smoothing<class_ProjectSettings_property_application/run/delta_smoothing>`. .. rst-class:: classref-item-separator @@ -319,15 +337,17 @@ If ``true``, the engine filters the time delta measured between each frame, and .. rst-class:: classref-property -:ref:`bool<class_bool>` **low_processor_usage_mode** = ``false`` +:ref:`bool<class_bool>` **low_processor_usage_mode** = ``false`` :ref:`🔗<class_OS_property_low_processor_usage_mode>` .. rst-class:: classref-property-setget -- void **set_low_processor_usage_mode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_in_low_processor_usage_mode** **(** **)** +- |void| **set_low_processor_usage_mode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_in_low_processor_usage_mode**\ (\ ) If ``true``, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. +\ **Note:** On start-up, this is the same as :ref:`ProjectSettings.application/run/low_processor_mode<class_ProjectSettings_property_application/run/low_processor_mode>`. + .. rst-class:: classref-item-separator ---- @@ -336,14 +356,16 @@ If ``true``, the engine optimizes for low processor usage by only refreshing the .. rst-class:: classref-property -:ref:`int<class_int>` **low_processor_usage_mode_sleep_usec** = ``6900`` +:ref:`int<class_int>` **low_processor_usage_mode_sleep_usec** = ``6900`` :ref:`🔗<class_OS_property_low_processor_usage_mode_sleep_usec>` .. rst-class:: classref-property-setget -- void **set_low_processor_usage_mode_sleep_usec** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_low_processor_usage_mode_sleep_usec** **(** **)** +- |void| **set_low_processor_usage_mode_sleep_usec**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_low_processor_usage_mode_sleep_usec**\ (\ ) + +The amount of sleeping between frames when the low-processor usage mode is enabled, in microseconds. Higher values will result in lower CPU usage. See also :ref:`low_processor_usage_mode<class_OS_property_low_processor_usage_mode>`. -The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. +\ **Note:** On start-up, this is the same as :ref:`ProjectSettings.application/run/low_processor_mode_sleep_usec<class_ProjectSettings_property_application/run/low_processor_mode_sleep_usec>`. .. rst-class:: classref-section-separator @@ -358,9 +380,9 @@ Method Descriptions .. rst-class:: classref-method -void **alert** **(** :ref:`String<class_String>` text, :ref:`String<class_String>` title="Alert!" **)** +|void| **alert**\ (\ text\: :ref:`String<class_String>`, title\: :ref:`String<class_String>` = "Alert!"\ ) :ref:`🔗<class_OS_method_alert>` -Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. +Displays a modal dialog box using the host platform's implementation. The engine execution is blocked until the dialog is closed. .. rst-class:: classref-item-separator @@ -370,9 +392,9 @@ Displays a modal dialog box using the host OS' facilities. Execution is blocked .. rst-class:: classref-method -void **close_midi_inputs** **(** **)** +|void| **close_midi_inputs**\ (\ ) :ref:`🔗<class_OS_method_close_midi_inputs>` -Shuts down system MIDI driver. +Shuts down the system MIDI driver. Godot will no longer receive :ref:`InputEventMIDI<class_InputEventMIDI>`. See also :ref:`open_midi_inputs<class_OS_method_open_midi_inputs>` and :ref:`get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>`. \ **Note:** This method is implemented on Linux, macOS and Windows. @@ -384,9 +406,11 @@ Shuts down system MIDI driver. .. rst-class:: classref-method -void **crash** **(** :ref:`String<class_String>` message **)** +|void| **crash**\ (\ message\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OS_method_crash>` -Crashes the engine (or the editor if called within a ``@tool`` script). This should *only* be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) :ref:`@GDScript.assert<class_@GDScript_method_assert>`, :ref:`@GlobalScope.push_error<class_@GlobalScope_method_push_error>` or :ref:`alert<class_OS_method_alert>`. See also :ref:`kill<class_OS_method_kill>`. +Crashes the engine (or the editor if called within a ``@tool`` script). See also :ref:`kill<class_OS_method_kill>`. + +\ **Note:** This method should *only* be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) :ref:`@GDScript.assert<class_@GDScript_method_assert>`, :ref:`@GlobalScope.push_error<class_@GlobalScope_method_push_error>`, or :ref:`alert<class_OS_method_alert>`. .. rst-class:: classref-item-separator @@ -396,13 +420,15 @@ Crashes the engine (or the editor if called within a ``@tool`` script). This sho .. rst-class:: classref-method -:ref:`int<class_int>` **create_instance** **(** :ref:`PackedStringArray<class_PackedStringArray>` arguments **)** +:ref:`int<class_int>` **create_instance**\ (\ arguments\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_OS_method_create_instance>` Creates a new instance of Godot that runs independently. The ``arguments`` are used in the given order and separated by a space. -If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill<class_OS_method_kill>`). If the process creation fails, the method will return ``-1``. +If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill<class_OS_method_kill>`). If the process cannot be created, this method returns ``-1``. -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +See :ref:`create_process<class_OS_method_create_process>` if you wish to run a different process. + +\ **Note:** This method is implemented on Android, Linux, macOS and Windows. .. rst-class:: classref-item-separator @@ -412,13 +438,13 @@ If the process creation succeeds, the method will return the new process ID, whi .. rst-class:: classref-method -:ref:`int<class_int>` **create_process** **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` arguments, :ref:`bool<class_bool>` open_console=false **)** +:ref:`int<class_int>` **create_process**\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`, open_console\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_OS_method_create_process>` -Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The path specified in ``path`` must exist and be executable file or macOS .app bundle. Platform path resolution will be used. The ``arguments`` are used in the given order and separated by a space. +Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be an executable file or macOS ``.app`` bundle. The path is resolved based on the current platform. The ``arguments`` are used in the given order and separated by a space. -On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. +On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window will be opened. -If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill<class_OS_method_kill>`). If the process creation fails, the method will return ``-1``. +If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with :ref:`kill<class_OS_method_kill>`). Otherwise, this method returns ``-1``. For example, running another instance of the project: @@ -437,7 +463,7 @@ For example, running another instance of the project: See :ref:`execute<class_OS_method_execute>` if you wish to run an external command and retrieve the results. -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. \ **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. @@ -449,11 +475,11 @@ See :ref:`execute<class_OS_method_execute>` if you wish to run an external comma .. rst-class:: classref-method -void **delay_msec** **(** :ref:`int<class_int>` msec **)** |const| +|void| **delay_msec**\ (\ msec\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OS_method_delay_msec>` -Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_msec<class_OS_method_delay_msec>` will do nothing and will print an error message. +Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_msec<class_OS_method_delay_msec>` does nothing and prints an error message. -\ **Note:** :ref:`delay_msec<class_OS_method_delay_msec>` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, see :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`. Awaiting with :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` will delay the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin<class_EditorPlugin>`\ s and :ref:`EditorScript<class_EditorScript>`\ s). +\ **Note:** :ref:`delay_msec<class_OS_method_delay_msec>` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`. Awaiting with :ref:`SceneTreeTimer<class_SceneTreeTimer>` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin<class_EditorPlugin>`\ s and :ref:`EditorScript<class_EditorScript>`\ s). \ **Note:** When :ref:`delay_msec<class_OS_method_delay_msec>` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_msec<class_OS_method_delay_msec>` as part of an :ref:`EditorPlugin<class_EditorPlugin>` or :ref:`EditorScript<class_EditorScript>`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). @@ -465,11 +491,11 @@ Delays execution of the current thread by ``msec`` milliseconds. ``msec`` must b .. rst-class:: classref-method -void **delay_usec** **(** :ref:`int<class_int>` usec **)** |const| +|void| **delay_usec**\ (\ usec\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OS_method_delay_usec>` -Delays execution of the current thread by ``usec`` microseconds. ``usec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_usec<class_OS_method_delay_usec>` will do nothing and will print an error message. +Delays execution of the current thread by ``usec`` microseconds. ``usec`` must be greater than or equal to ``0``. Otherwise, :ref:`delay_usec<class_OS_method_delay_usec>` does nothing and prints an error message. -\ **Note:** :ref:`delay_usec<class_OS_method_delay_usec>` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, see :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`. Awaiting with :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` will delay the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin<class_EditorPlugin>`\ s and :ref:`EditorScript<class_EditorScript>`\ s). +\ **Note:** :ref:`delay_usec<class_OS_method_delay_usec>` is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`. Awaiting with a :ref:`SceneTreeTimer<class_SceneTreeTimer>` delays the execution of code placed below the ``await`` without affecting the rest of the project (or editor, for :ref:`EditorPlugin<class_EditorPlugin>`\ s and :ref:`EditorScript<class_EditorScript>`\ s). \ **Note:** When :ref:`delay_usec<class_OS_method_delay_usec>` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using :ref:`delay_usec<class_OS_method_delay_usec>` as part of an :ref:`EditorPlugin<class_EditorPlugin>` or :ref:`EditorScript<class_EditorScript>`, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). @@ -481,15 +507,17 @@ Delays execution of the current thread by ``usec`` microseconds. ``usec`` must b .. rst-class:: classref-method -:ref:`int<class_int>` **execute** **(** :ref:`String<class_String>` path, :ref:`PackedStringArray<class_PackedStringArray>` arguments, :ref:`Array<class_Array>` output=[], :ref:`bool<class_bool>` read_stderr=false, :ref:`bool<class_bool>` open_console=false **)** +:ref:`int<class_int>` **execute**\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`, output\: :ref:`Array<class_Array>` = [], read_stderr\: :ref:`bool<class_bool>` = false, open_console\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_OS_method_execute>` + +Executes the given process in a *blocking* way. The file specified in ``path`` must exist and be executable. The system path resolution will be used. The ``arguments`` are used in the given order, separated by spaces, and wrapped in quotes. -Executes a command. The file specified in ``path`` must exist and be executable. Platform path resolution will be used. The ``arguments`` are used in the given order, separated by spaces, and wrapped in quotes. If an ``output`` :ref:`Array<class_Array>` is provided, the complete shell output of the process will be appended as a single :ref:`String<class_String>` element in ``output``. If ``read_stderr`` is ``true``, the output to the standard error stream will be included too. +If an ``output`` array is provided, the complete shell output of the process is appended to ``output`` as a single :ref:`String<class_String>` element. If ``read_stderr`` is ``true``, the output to the standard error stream is also appended to the array. -On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window will be opened. This is ignored on other platforms. +On Windows, if ``open_console`` is ``true`` and the process is a console app, a new terminal window is opened. -If the command is successfully executed, the method will return the exit code of the command, or ``-1`` if it fails. +This method returns the exit code of the command, or ``-1`` if the process fails to execute. -\ **Note:** The Godot thread will pause its execution until the executed command terminates. Use :ref:`Thread<class_Thread>` to create a separate thread that will not pause the Godot thread, or use :ref:`create_process<class_OS_method_create_process>` to create a completely independent process. +\ **Note:** The main thread will be blocked until the executed command terminates. Use :ref:`Thread<class_Thread>` to create a separate thread that will not block the main thread, or use :ref:`create_process<class_OS_method_create_process>` to create a completely independent process. For example, to retrieve a list of the working directory's contents: @@ -525,7 +553,7 @@ If you wish to access a shell built-in or execute a composite command, a platfor -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. \ **Note:** To execute a Windows command interpreter built-in command, specify ``cmd.exe`` in ``path``, ``/c`` as the first argument, and the desired command as the second argument. @@ -535,6 +563,38 @@ If you wish to access a shell built-in or execute a composite command, a platfor \ **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export. +\ **Note:** On Android, system commands such as ``dumpsys`` can only be run on a rooted device. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OS_method_execute_with_pipe: + +.. rst-class:: classref-method + +:ref:`Dictionary<class_Dictionary>` **execute_with_pipe**\ (\ path\: :ref:`String<class_String>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_OS_method_execute_with_pipe>` + +Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in ``path`` must exist and be an executable file or macOS ``.app`` bundle. The path is resolved based on the current platform. The ``arguments`` are used in the given order and separated by a space. + +If the process cannot be created, this method returns an empty :ref:`Dictionary<class_Dictionary>`. Otherwise, this method returns a :ref:`Dictionary<class_Dictionary>` with the following keys: + +- ``"stdio"`` - :ref:`FileAccess<class_FileAccess>` to access the process stdin and stdout pipes (read/write). + +- ``"stderr"`` - :ref:`FileAccess<class_FileAccess>` to access the process stderr pipe (read only). + +- ``"pid"`` - Process ID as an :ref:`int<class_int>`, which you can use to monitor the process (and potentially terminate it with :ref:`kill<class_OS_method_kill>`). + +\ **Note:** This method is implemented on Android, Linux, macOS, and Windows. + +\ **Note:** To execute a Windows command interpreter built-in command, specify ``cmd.exe`` in ``path``, ``/c`` as the first argument, and the desired command as the second argument. + +\ **Note:** To execute a PowerShell built-in command, specify ``powershell.exe`` in ``path``, ``-Command`` as the first argument, and the desired command as the second argument. + +\ **Note:** To execute a Unix shell built-in command, specify shell executable name in ``path``, ``-c`` as the first argument, and the desired command as the second argument. + +\ **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + .. rst-class:: classref-item-separator ---- @@ -543,9 +603,30 @@ If you wish to access a shell built-in or execute a composite command, a platfor .. rst-class:: classref-method -:ref:`Key<enum_@GlobalScope_Key>` **find_keycode_from_string** **(** :ref:`String<class_String>` string **)** |const| +:ref:`Key<enum_@GlobalScope_Key>` **find_keycode_from_string**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_find_keycode_from_string>` + +Finds the keycode for the given string. The returned values are equivalent to the :ref:`Key<enum_@GlobalScope_Key>` constants. + + +.. tabs:: + + .. code-tab:: gdscript + + print(OS.find_keycode_from_string("C")) # Prints 67 (KEY_C) + print(OS.find_keycode_from_string("Escape")) # Prints 4194305 (KEY_ESCAPE) + print(OS.find_keycode_from_string("Shift+Tab")) # Prints 37748738 (KEY_MASK_SHIFT | KEY_TAB) + print(OS.find_keycode_from_string("Unknown")) # Prints 0 (KEY_NONE) + + .. code-tab:: csharp + + GD.Print(OS.FindKeycodeFromString("C")); // Prints C (Key.C) + GD.Print(OS.FindKeycodeFromString("Escape")); // Prints Escape (Key.Escape) + GD.Print(OS.FindKeycodeFromString("Shift+Tab")); // Prints 37748738 (KeyModifierMask.MaskShift | Key.Tab) + GD.Print(OS.FindKeycodeFromString("Unknown")); // Prints None (Key.None) -Returns the keycode of the given string (e.g. "Escape"). + + +See also :ref:`get_keycode_string<class_OS_method_get_keycode_string>`. .. rst-class:: classref-item-separator @@ -555,9 +636,11 @@ Returns the keycode of the given string (e.g. "Escape"). .. rst-class:: classref-method -:ref:`String<class_String>` **get_cache_dir** **(** **)** |const| +:ref:`String<class_String>` **get_cache_dir**\ (\ ) |const| :ref:`🔗<class_OS_method_get_cache_dir>` -Returns the *global* cache data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CACHE_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_config_dir<class_OS_method_get_config_dir>` and :ref:`get_data_dir<class_OS_method_get_data_dir>`. +Returns the *global* cache data directory according to the operating system's standards. + +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CACHE_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_config_dir<class_OS_method_get_config_dir>` and :ref:`get_data_dir<class_OS_method_get_data_dir>`. Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_dir>`, which returns the *project-specific* user data path. @@ -569,7 +652,7 @@ Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_di .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_cmdline_args** **(** **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_cmdline_args**\ (\ ) :ref:`🔗<class_OS_method_get_cmdline_args>` Returns the command-line arguments passed to the engine. @@ -579,7 +662,7 @@ You can also incorporate environment variables using the :ref:`get_environment<c You can set :ref:`ProjectSettings.editor/run/main_run_args<class_ProjectSettings_property_editor/run/main_run_args>` to define command-line arguments to be passed by the editor when running the project. -Here's a minimal example on how to parse command-line arguments into a dictionary using the ``--key=value`` form for arguments: +Here's a minimal example on how to parse command-line arguments into a :ref:`Dictionary<class_Dictionary>` using the ``--key=value`` form for arguments: .. tabs:: @@ -588,35 +671,35 @@ Here's a minimal example on how to parse command-line arguments into a dictionar var arguments = {} for argument in OS.get_cmdline_args(): - if argument.find("=") > -1: + if argument.contains("="): var key_value = argument.split("=") - arguments[key_value[0].lstrip("--")] = key_value[1] + arguments[key_value[0].trim_prefix("--")] = key_value[1] else: # Options without an argument will be present in the dictionary, # with the value set to an empty string. - arguments[argument.lstrip("--")] = "" + arguments[argument.trim_prefix("--")] = "" .. code-tab:: csharp - var arguments = new Godot.Collections.Dictionary(); + var arguments = new Dictionary<string, string>(); foreach (var argument in OS.GetCmdlineArgs()) { - if (argument.Find("=") > -1) + if (argument.Contains('=')) { string[] keyValue = argument.Split("="); - arguments[keyValue[0].LStrip("--")] = keyValue[1]; + arguments[keyValue[0].TrimPrefix("--")] = keyValue[1]; } else { // Options without an argument will be present in the dictionary, // with the value set to an empty string. - arguments[keyValue[0].LStrip("--")] = ""; + arguments[argument.TrimPrefix("--")] = ""; } } -\ **Note:** Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, the best way is to use the standard UNIX double dash (``--``) and then pass custom arguments, which the engine itself will ignore. These can be read via :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>`. +\ **Note:** Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, pass the standard UNIX double dash (``--``) and then the custom arguments, which the engine will ignore by design. These can be read via :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>`. .. rst-class:: classref-item-separator @@ -626,17 +709,19 @@ Here's a minimal example on how to parse command-line arguments into a dictionar .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_cmdline_user_args** **(** **)** - -Similar to :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>`, but this returns the user arguments (any argument passed after the double dash ``--`` or double plus ``++`` argument). These are left untouched by Godot for the user. ``++`` can be used in situations where ``--`` is intercepted by another program (such as ``startx``). +:ref:`PackedStringArray<class_PackedStringArray>` **get_cmdline_user_args**\ (\ ) :ref:`🔗<class_OS_method_get_cmdline_user_args>` -For example, in the command line below, ``--fullscreen`` will not be returned in :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>` and ``--level 1`` will only be returned in :ref:`get_cmdline_user_args<class_OS_method_get_cmdline_user_args>`: +Returns the command-line user arguments passed to the engine. User arguments are ignored by the engine and reserved for the user. They are passed after the double dash ``--`` argument. ``++`` may be used when ``--`` is intercepted by another program (such as ``startx``). :: - godot --fullscreen -- --level 1 - # Or: - godot --fullscreen ++ --level 1 + # Godot has been executed with the following command: + # godot --fullscreen -- --level=2 --hardcore + + OS.get_cmdline_args() # Returns ["--fullscreen", "--level=2", "--hardcore"] + OS.get_cmdline_user_args() # Returns ["--level=2", "--hardcore"] + +To get all passed arguments, use :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>`. .. rst-class:: classref-item-separator @@ -646,9 +731,11 @@ For example, in the command line below, ``--fullscreen`` will not be returned in .. rst-class:: classref-method -:ref:`String<class_String>` **get_config_dir** **(** **)** |const| +:ref:`String<class_String>` **get_config_dir**\ (\ ) |const| :ref:`🔗<class_OS_method_get_config_dir>` + +Returns the *global* user configuration directory according to the operating system's standards. -Returns the *global* user configuration directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CONFIG_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir<class_OS_method_get_cache_dir>` and :ref:`get_data_dir<class_OS_method_get_data_dir>`. +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_CONFIG_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir<class_OS_method_get_cache_dir>` and :ref:`get_data_dir<class_OS_method_get_data_dir>`. Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_dir>`, which returns the *project-specific* user data path. @@ -660,11 +747,9 @@ Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_di .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_connected_midi_inputs** **(** **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_connected_midi_inputs**\ (\ ) :ref:`🔗<class_OS_method_get_connected_midi_inputs>` -Returns an array of MIDI device names. - -The returned array will be empty if the system MIDI driver has not previously been initialized with :ref:`open_midi_inputs<class_OS_method_open_midi_inputs>`. +Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with :ref:`open_midi_inputs<class_OS_method_open_midi_inputs>`. See also :ref:`close_midi_inputs<class_OS_method_close_midi_inputs>`. \ **Note:** This method is implemented on Linux, macOS and Windows. @@ -676,9 +761,11 @@ The returned array will be empty if the system MIDI driver has not previously be .. rst-class:: classref-method -:ref:`String<class_String>` **get_data_dir** **(** **)** |const| +:ref:`String<class_String>` **get_data_dir**\ (\ ) |const| :ref:`🔗<class_OS_method_get_data_dir>` + +Returns the *global* user data directory according to the operating system's standards. -Returns the *global* user data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the ``XDG_DATA_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir<class_OS_method_get_cache_dir>` and :ref:`get_config_dir<class_OS_method_get_config_dir>`. +On the Linux/BSD platform, this path can be overridden by setting the ``XDG_DATA_HOME`` environment variable before starting the project. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` in the documentation for more information. See also :ref:`get_cache_dir<class_OS_method_get_cache_dir>` and :ref:`get_config_dir<class_OS_method_get_config_dir>`. Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_dir>`, which returns the *project-specific* user data path. @@ -690,15 +777,29 @@ Not to be confused with :ref:`get_user_data_dir<class_OS_method_get_user_data_di .. rst-class:: classref-method -:ref:`String<class_String>` **get_distribution_name** **(** **)** |const| +:ref:`String<class_String>` **get_distribution_name**\ (\ ) |const| :ref:`🔗<class_OS_method_get_distribution_name>` -Returns the name of the distribution for Linux and BSD platforms (e.g. Ubuntu, Manjaro, OpenBSD, etc.). +Returns the name of the distribution for Linux and BSD platforms (e.g. "Ubuntu", "Manjaro", "OpenBSD", etc.). -Returns the same value as :ref:`get_name<class_OS_method_get_name>` for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as LineageOS. +Returns the same value as :ref:`get_name<class_OS_method_get_name>` for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". Returns the same value as :ref:`get_name<class_OS_method_get_name>` for other platforms. -\ **Note:** This method is not supported on the web platform. It returns an empty string. +\ **Note:** This method is not supported on the Web platform. It returns an empty string. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OS_method_get_entropy: + +.. rst-class:: classref-method + +:ref:`PackedByteArray<class_PackedByteArray>` **get_entropy**\ (\ size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OS_method_get_entropy>` + +Generates a :ref:`PackedByteArray<class_PackedByteArray>` of cryptographically secure random bytes with given ``size``. + +\ **Note:** Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using :ref:`Crypto.generate_random_bytes<class_Crypto_method_generate_random_bytes>` is preferred in most cases. .. rst-class:: classref-item-separator @@ -708,12 +809,14 @@ Returns the same value as :ref:`get_name<class_OS_method_get_name>` for other pl .. rst-class:: classref-method -:ref:`String<class_String>` **get_environment** **(** :ref:`String<class_String>` variable **)** |const| +:ref:`String<class_String>` **get_environment**\ (\ variable\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_get_environment>` -Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. +Returns the value of the given environment variable, or an empty string if ``variable`` doesn't exist. \ **Note:** Double-check the casing of ``variable``. Environment variable names are case-sensitive on all platforms except Windows. +\ **Note:** On macOS, applications do not have access to shell environment variables. + .. rst-class:: classref-item-separator ---- @@ -722,9 +825,9 @@ Returns the value of an environment variable. Returns an empty string if the env .. rst-class:: classref-method -:ref:`String<class_String>` **get_executable_path** **(** **)** |const| +:ref:`String<class_String>` **get_executable_path**\ (\ ) |const| :ref:`🔗<class_OS_method_get_executable_path>` -Returns the path to the current engine executable. +Returns the file path to the current engine executable. \ **Note:** On macOS, always use :ref:`create_instance<class_OS_method_create_instance>` instead of relying on executable path. @@ -736,11 +839,11 @@ Returns the path to the current engine executable. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_granted_permissions** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_granted_permissions**\ (\ ) |const| :ref:`🔗<class_OS_method_get_granted_permissions>` -On Android devices: With this function, you can get the list of dangerous permissions that have been granted. +On Android devices: Returns the list of dangerous permissions that have been granted. -On macOS (sandboxed applications only): This function returns the list of user selected folders accessible to the application. Use native file dialog to request folder access permission. +On macOS: Returns the list of user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission. .. rst-class:: classref-item-separator @@ -750,11 +853,28 @@ On macOS (sandboxed applications only): This function returns the list of user s .. rst-class:: classref-method -:ref:`String<class_String>` **get_keycode_string** **(** :ref:`Key<enum_@GlobalScope_Key>` code **)** |const| +:ref:`String<class_String>` **get_keycode_string**\ (\ code\: :ref:`Key<enum_@GlobalScope_Key>`\ ) |const| :ref:`🔗<class_OS_method_get_keycode_string>` + +Returns the given keycode as a :ref:`String<class_String>`. + + +.. tabs:: + + .. code-tab:: gdscript + + print(OS.get_keycode_string(KEY_C)) # Prints "C" + print(OS.get_keycode_string(KEY_ESCAPE)) # Prints "Escape" + print(OS.get_keycode_string(KEY_MASK_SHIFT | KEY_TAB)) # Prints "Shift+Tab" + + .. code-tab:: csharp + + GD.Print(OS.GetKeycodeString(Key.C)); // Prints "C" + GD.Print(OS.GetKeycodeString(Key.Escape)); // Prints "Escape" + GD.Print(OS.GetKeycodeString((Key)KeyModifierMask.MaskShift | Key.Tab)); // Prints "Shift+Tab" -Returns the given keycode as a string (e.g. Return values: ``"Escape"``, ``"Shift+Escape"``). -See also :ref:`InputEventKey.keycode<class_InputEventKey_property_keycode>` and :ref:`InputEventKey.get_keycode_with_modifiers<class_InputEventKey_method_get_keycode_with_modifiers>`. + +See also :ref:`find_keycode_from_string<class_OS_method_find_keycode_from_string>`, :ref:`InputEventKey.keycode<class_InputEventKey_property_keycode>`, and :ref:`InputEventKey.get_keycode_with_modifiers<class_InputEventKey_method_get_keycode_with_modifiers>`. .. rst-class:: classref-item-separator @@ -764,19 +884,21 @@ See also :ref:`InputEventKey.keycode<class_InputEventKey_property_keycode>` and .. rst-class:: classref-method -:ref:`String<class_String>` **get_locale** **(** **)** |const| +:ref:`String<class_String>` **get_locale**\ (\ ) |const| :ref:`🔗<class_OS_method_get_locale>` + +Returns the host OS locale as a :ref:`String<class_String>` of the form ``language_Script_COUNTRY_VARIANT@extra``. Every substring after ``language`` is optional and may not exist. -Returns the host OS locale as a string of the form ``language_Script_COUNTRY_VARIANT@extra``. If you want only the language code and not the fully specified locale from the OS, you can use :ref:`get_locale_language<class_OS_method_get_locale_language>`. +- ``language`` - 2 or 3-letter `language code <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__, in lower case. -\ ``language`` - 2 or 3-letter `language code <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__, in lower case. +- ``Script`` - 4-letter `script code <https://en.wikipedia.org/wiki/ISO_15924>`__, in title case. -\ ``Script`` - optional, 4-letter `script code <https://en.wikipedia.org/wiki/ISO_15924>`__, in title case. +- ``COUNTRY`` - 2 or 3-letter `country code <https://en.wikipedia.org/wiki/ISO_3166-1>`__, in upper case. -\ ``COUNTRY`` - optional, 2 or 3-letter `country code <https://en.wikipedia.org/wiki/ISO_3166-1>`__, in upper case. +- ``VARIANT`` - language variant, region and sort order. The variant can have any number of underscored keywords. -\ ``VARIANT`` - optional, language variant, region and sort order. Variant can have any number of underscored keywords. +- ``extra`` - semicolon separated list of additional key words. This may include currency, calendar, sort order and numbering system information. -\ ``extra`` - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. +If you want only the language code and not the fully specified locale from the OS, you can use :ref:`get_locale_language<class_OS_method_get_locale_language>`. .. rst-class:: classref-item-separator @@ -786,7 +908,7 @@ Returns the host OS locale as a string of the form ``language_Script_COUNTRY_VAR .. rst-class:: classref-method -:ref:`String<class_String>` **get_locale_language** **(** **)** |const| +:ref:`String<class_String>` **get_locale_language**\ (\ ) |const| :ref:`🔗<class_OS_method_get_locale_language>` Returns the host OS locale's 2 or 3-letter `language code <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__ as a string which should be consistent on all platforms. This is equivalent to extracting the ``language`` part of the :ref:`get_locale<class_OS_method_get_locale>` string. @@ -800,7 +922,7 @@ This can be used to narrow down fully specified locale strings to only the "comm .. rst-class:: classref-method -:ref:`int<class_int>` **get_main_thread_id** **(** **)** |const| +:ref:`int<class_int>` **get_main_thread_id**\ (\ ) |const| :ref:`🔗<class_OS_method_get_main_thread_id>` Returns the ID of the main thread. See :ref:`get_thread_caller_id<class_OS_method_get_thread_caller_id>`. @@ -814,17 +936,19 @@ Returns the ID of the main thread. See :ref:`get_thread_caller_id<class_OS_metho .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_memory_info** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_memory_info**\ (\ ) |const| :ref:`🔗<class_OS_method_get_memory_info>` -Returns the :ref:`Dictionary<class_Dictionary>` with the following keys: +Returns a :ref:`Dictionary<class_Dictionary>` containing information about the current memory with the following entries: -\ ``"physical"`` - total amount of usable physical memory, in bytes or ``-1`` if unknown. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by kernel and devices. +- ``"physical"`` - total amount of usable physical memory in bytes. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by the kernel and devices. -\ ``"free"`` - amount of physical memory, that can be immediately allocated without disk access or other costly operation, in bytes or ``-1`` if unknown. The process might be able to allocate more physical memory, but such allocation will require moving inactive pages to disk and can take some time. +- ``"free"`` - amount of physical memory, that can be immediately allocated without disk access or other costly operations, in bytes. The process might be able to allocate more physical memory, but this action will require moving inactive pages to disk, which can be expensive. -\ ``"available"`` - amount of memory, that can be allocated without extending the swap file(s), in bytes or ``-1`` if unknown. This value include both physical memory and swap. +- ``"available"`` - amount of memory that can be allocated without extending the swap file(s), in bytes. This value includes both physical memory and swap. -\ ``"stack"`` - size of the current thread stack, in bytes or ``-1`` if unknown. +- ``"stack"`` - size of the current thread stack in bytes. + +\ **Note:** Each entry's value may be ``-1`` if it is unknown. .. rst-class:: classref-item-separator @@ -834,7 +958,7 @@ Returns the :ref:`Dictionary<class_Dictionary>` with the following keys: .. rst-class:: classref-method -:ref:`String<class_String>` **get_model_name** **(** **)** |const| +:ref:`String<class_String>` **get_model_name**\ (\ ) |const| :ref:`🔗<class_OS_method_get_model_name>` Returns the model name of the current device. @@ -848,25 +972,25 @@ Returns the model name of the current device. .. rst-class:: classref-method -:ref:`String<class_String>` **get_name** **(** **)** |const| +:ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`🔗<class_OS_method_get_name>` -Returns the name of the host OS. +Returns the name of the host platform. -On Windows, this is ``"Windows"`` or ``"UWP"`` if exported on Universal Windows Platform. +- On Windows, this is ``"Windows"``. -On macOS, this is ``"macOS"``. +- On macOS, this is ``"macOS"``. -On Linux-based operating systems, this is ``"Linux"``. +- On Linux-based operating systems, this is ``"Linux"``. -On BSD-based operating systems, this is ``"FreeBSD"``, ``"NetBSD"``, ``"OpenBSD"``, or ``"BSD"`` as a fallback. +- On BSD-based operating systems, this is ``"FreeBSD"``, ``"NetBSD"``, ``"OpenBSD"``, or ``"BSD"`` as a fallback. -On Android, this is ``"Android"``. +- On Android, this is ``"Android"``. -On iOS, this is ``"iOS"``. +- On iOS, this is ``"iOS"``. -On the web, this is ``"Web"``. +- On Web, this is ``"Web"``. -\ **Note:** Custom builds of the engine may support additional platforms, such as consoles, yielding other return values. +\ **Note:** Custom builds of the engine may support additional platforms, such as consoles, possibly returning other names. .. tabs:: @@ -874,50 +998,67 @@ On the web, this is ``"Web"``. .. code-tab:: gdscript match OS.get_name(): - "Windows", "UWP": - print("Windows") + "Windows": + print("Welcome to Windows!") "macOS": - print("macOS") + print("Welcome to macOS!") "Linux", "FreeBSD", "NetBSD", "OpenBSD", "BSD": - print("Linux/BSD") + print("Welcome to Linux/BSD!") "Android": - print("Android") + print("Welcome to Android!") "iOS": - print("iOS") + print("Welcome to iOS!") "Web": - print("Web") + print("Welcome to the Web!") .. code-tab:: csharp switch (OS.GetName()) { case "Windows": - case "UWP": - GD.Print("Windows"); + GD.Print("Welcome to Windows"); break; case "macOS": - GD.Print("macOS"); + GD.Print("Welcome to macOS!"); break; case "Linux": case "FreeBSD": case "NetBSD": - case "OpenBSD" + case "OpenBSD": case "BSD": - GD.Print("Linux/BSD"); + GD.Print("Welcome to Linux/BSD!"); break; case "Android": - GD.Print("Android"); + GD.Print("Welcome to Android!"); break; case "iOS": - GD.Print("iOS"); + GD.Print("Welcome to iOS!"); break; case "Web": - GD.Print("Web"); + GD.Print("Welcome to the Web!"); break; } +\ **Note:** On Web platforms, it is still possible to determine the host platform's OS with feature tags. See :ref:`has_feature<class_OS_method_has_feature>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OS_method_get_process_exit_code: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_process_exit_code**\ (\ pid\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OS_method_get_process_exit_code>` + +Returns the exit code of a spawned process once it has finished running (see :ref:`is_process_running<class_OS_method_is_process_running>`). + +Returns ``-1`` if the ``pid`` is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. + +\ **Note:** This method is implemented on Android, Linux, macOS and Windows. + .. rst-class:: classref-item-separator ---- @@ -926,11 +1067,11 @@ On the web, this is ``"Web"``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_process_id** **(** **)** |const| +:ref:`int<class_int>` **get_process_id**\ (\ ) |const| :ref:`🔗<class_OS_method_get_process_id>` -Returns the project's process ID. +Returns the number used by the host machine to uniquely identify this application. -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, iOS, Linux, macOS, and Windows. .. rst-class:: classref-item-separator @@ -940,7 +1081,7 @@ Returns the project's process ID. .. rst-class:: classref-method -:ref:`int<class_int>` **get_processor_count** **(** **)** |const| +:ref:`int<class_int>` **get_processor_count**\ (\ ) |const| :ref:`🔗<class_OS_method_get_processor_count>` Returns the number of *logical* CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of *physical* CPU cores. @@ -952,11 +1093,11 @@ Returns the number of *logical* CPU cores available on the host machine. On CPUs .. rst-class:: classref-method -:ref:`String<class_String>` **get_processor_name** **(** **)** |const| +:ref:`String<class_String>` **get_processor_name**\ (\ ) |const| :ref:`🔗<class_OS_method_get_processor_name>` -Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"). +Returns the full name of the CPU model on the host machine (e.g. ``"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"``). -\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android, Web and UWP, :ref:`get_processor_name<class_OS_method_get_processor_name>` returns an empty string. +\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, :ref:`get_processor_name<class_OS_method_get_processor_name>` returns an empty string. .. rst-class:: classref-item-separator @@ -966,7 +1107,7 @@ Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_restart_on_exit_arguments** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_restart_on_exit_arguments**\ (\ ) |const| :ref:`🔗<class_OS_method_get_restart_on_exit_arguments>` Returns the list of command line arguments that will be used when the project automatically restarts using :ref:`set_restart_on_exit<class_OS_method_set_restart_on_exit>`. See also :ref:`is_restart_on_exit_set<class_OS_method_is_restart_on_exit_set>`. @@ -978,9 +1119,9 @@ Returns the list of command line arguments that will be used when the project au .. rst-class:: classref-method -:ref:`int<class_int>` **get_static_memory_peak_usage** **(** **)** |const| +:ref:`int<class_int>` **get_static_memory_peak_usage**\ (\ ) |const| :ref:`🔗<class_OS_method_get_static_memory_peak_usage>` -Returns the maximum amount of static memory used (only works in debug). +Returns the maximum amount of static memory used. Only works in debug builds. .. rst-class:: classref-item-separator @@ -990,9 +1131,21 @@ Returns the maximum amount of static memory used (only works in debug). .. rst-class:: classref-method -:ref:`int<class_int>` **get_static_memory_usage** **(** **)** |const| +:ref:`int<class_int>` **get_static_memory_usage**\ (\ ) |const| :ref:`🔗<class_OS_method_get_static_memory_usage>` -Returns the amount of static memory being used by the program in bytes (only works in debug). +Returns the amount of static memory being used by the program in bytes. Only works in debug builds. + +.. rst-class:: classref-item-separator + +---- + +.. _class_OS_method_get_system_ca_certificates: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_system_ca_certificates**\ (\ ) :ref:`🔗<class_OS_method_get_system_ca_certificates>` + +Returns the list of certification authorities trusted by the operating system as a string of concatenated certificates in PEM format. .. rst-class:: classref-item-separator @@ -1002,13 +1155,13 @@ Returns the amount of static memory being used by the program in bytes (only wor .. rst-class:: classref-method -:ref:`String<class_String>` **get_system_dir** **(** :ref:`SystemDir<enum_OS_SystemDir>` dir, :ref:`bool<class_bool>` shared_storage=true **)** |const| +:ref:`String<class_String>` **get_system_dir**\ (\ dir\: :ref:`SystemDir<enum_OS_SystemDir>`, shared_storage\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_OS_method_get_system_dir>` -Returns the actual path to commonly used folders across different platforms. Available locations are specified in :ref:`SystemDir<enum_OS_SystemDir>`. +Returns the path to commonly used folders across different platforms, as defined by ``dir``. See the :ref:`SystemDir<enum_OS_SystemDir>` constants for available locations. \ **Note:** This method is implemented on Android, Linux, macOS and Windows. -\ **Note:** Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android. +\ **Note:** Shared storage is implemented on Android and allows to differentiate between app specific and shared directories, if ``shared_storage`` is ``true``. Shared directories have additional restrictions on Android. .. rst-class:: classref-item-separator @@ -1018,9 +1171,9 @@ Returns the actual path to commonly used folders across different platforms. Ava .. rst-class:: classref-method -:ref:`String<class_String>` **get_system_font_path** **(** :ref:`String<class_String>` font_name, :ref:`int<class_int>` weight=400, :ref:`int<class_int>` stretch=100, :ref:`bool<class_bool>` italic=false **)** |const| +:ref:`String<class_String>` **get_system_font_path**\ (\ font_name\: :ref:`String<class_String>`, weight\: :ref:`int<class_int>` = 400, stretch\: :ref:`int<class_int>` = 100, italic\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_OS_method_get_system_font_path>` -Returns path to the system font file with ``font_name`` and style. Returns empty string if no matching fonts found. +Returns the path to the system font file with ``font_name`` and style. Returns an empty string if no matching fonts found. The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". @@ -1036,9 +1189,9 @@ The following aliases can be used to request default fonts: "sans-serif", "serif .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_system_font_path_for_text** **(** :ref:`String<class_String>` font_name, :ref:`String<class_String>` text, :ref:`String<class_String>` locale="", :ref:`String<class_String>` script="", :ref:`int<class_int>` weight=400, :ref:`int<class_int>` stretch=100, :ref:`bool<class_bool>` italic=false **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_system_font_path_for_text**\ (\ font_name\: :ref:`String<class_String>`, text\: :ref:`String<class_String>`, locale\: :ref:`String<class_String>` = "", script\: :ref:`String<class_String>` = "", weight\: :ref:`int<class_int>` = 400, stretch\: :ref:`int<class_int>` = 100, italic\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_OS_method_get_system_font_path_for_text>` -Returns an array of the system substitute font file paths, which are similar to the font with ``font_name`` and style for the specified text, locale and script. Returns empty array if no matching fonts found. +Returns an array of the system substitute font file paths, which are similar to the font with ``font_name`` and style for the specified text, locale, and script. Returns an empty array if no matching fonts found. The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". @@ -1056,9 +1209,9 @@ The following aliases can be used to request default fonts: "sans-serif", "serif .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_system_fonts** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_system_fonts**\ (\ ) |const| :ref:`🔗<class_OS_method_get_system_fonts>` -Returns list of font family names available. +Returns the list of font family names available. \ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. @@ -1070,7 +1223,7 @@ Returns list of font family names available. .. rst-class:: classref-method -:ref:`int<class_int>` **get_thread_caller_id** **(** **)** |const| +:ref:`int<class_int>` **get_thread_caller_id**\ (\ ) |const| :ref:`🔗<class_OS_method_get_thread_caller_id>` Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. @@ -1084,13 +1237,13 @@ Returns the ID of the current thread. This can be used in logs to ease debugging .. rst-class:: classref-method -:ref:`String<class_String>` **get_unique_id** **(** **)** |const| +:ref:`String<class_String>` **get_unique_id**\ (\ ) |const| :ref:`🔗<class_OS_method_get_unique_id>` Returns a string that is unique to the device. -\ **Note:** This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by :ref:`get_unique_id<class_OS_method_get_unique_id>` for security purposes. +\ **Note:** This string may change without notice if the user reinstalls their operating system, upgrades it, or modifies their hardware. This means it should generally not be used to encrypt persistent data, as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by this method for security purposes. -\ **Note:** Returns an empty string on Web and UWP, as this method isn't implemented on those platforms yet. +\ **Note:** On Web, returns an empty string and generates an error, as this method cannot be implemented for security reasons. .. rst-class:: classref-item-separator @@ -1100,19 +1253,19 @@ Returns a string that is unique to the device. .. rst-class:: classref-method -:ref:`String<class_String>` **get_user_data_dir** **(** **)** |const| +:ref:`String<class_String>` **get_user_data_dir**\ (\ ) |const| :ref:`🔗<class_OS_method_get_user_data_dir>` -Returns the absolute directory path where user data is written (``user://``). +Returns the absolute directory path where user data is written (the ``user://`` directory in Godot). The path depends on the project name and :ref:`ProjectSettings.application/config/use_custom_user_dir<class_ProjectSettings_property_application/config/use_custom_user_dir>`. -On Windows, this is ``%AppData%\Godot\app_userdata\[project_name]``, or ``%AppData%\[custom_name]`` if ``use_custom_user_dir`` is set. ``%AppData%`` expands to ``%UserProfile%\AppData\Roaming``. +- On Windows, this is ``%AppData%\Godot\app_userdata\[project_name]``, or ``%AppData%\[custom_name]`` if ``use_custom_user_dir`` is set. ``%AppData%`` expands to ``%UserProfile%\AppData\Roaming``. -On macOS, this is ``~/Library/Application Support/Godot/app_userdata/[project_name]``, or ``~/Library/Application Support/[custom_name]`` if ``use_custom_user_dir`` is set. +- On macOS, this is ``~/Library/Application Support/Godot/app_userdata/[project_name]``, or ``~/Library/Application Support/[custom_name]`` if ``use_custom_user_dir`` is set. -On Linux and BSD, this is ``~/.local/share/godot/app_userdata/[project_name]``, or ``~/.local/share/[custom_name]`` if ``use_custom_user_dir`` is set. +- On Linux and BSD, this is ``~/.local/share/godot/app_userdata/[project_name]``, or ``~/.local/share/[custom_name]`` if ``use_custom_user_dir`` is set. -On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration. +- On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration. -On the web, this is a virtual directory managed by the browser. +- On Web, this is a virtual directory managed by the browser. If the project name is empty, ``[project_name]`` falls back to ``[unnamed project]``. @@ -1126,21 +1279,19 @@ Not to be confused with :ref:`get_data_dir<class_OS_method_get_data_dir>`, which .. rst-class:: classref-method -:ref:`String<class_String>` **get_version** **(** **)** |const| +:ref:`String<class_String>` **get_version**\ (\ ) |const| :ref:`🔗<class_OS_method_get_version>` Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds. -For Windows, the major and minor version are returned, as well as the build number. For example, the returned string can look like ``10.0.9926`` for a build of Windows 10, and it can look like ``6.1.7601`` for a build of Windows 7 SP1. - -For rolling distributions, such as Arch Linux, an empty string is returned. +- For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like ``10.0.9926`` for a build of Windows 10, and it may look like ``6.1.7601`` for a build of Windows 7 SP1. -For macOS and iOS, the major and minor version are returned, as well as the patch number. +- For rolling distributions, such as Arch Linux, an empty string is returned. -For UWP, the device family version is returned. +- For macOS and iOS, the major and minor version are returned, as well as the patch number. -For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. +- For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. -\ **Note:** This method is not supported on the web platform. It returns an empty string. +\ **Note:** This method is not supported on the Web platform. It returns an empty string. .. rst-class:: classref-item-separator @@ -1150,15 +1301,15 @@ For Android, the SDK version and the incremental build number are returned. If i .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_video_adapter_driver_info** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_video_adapter_driver_info**\ (\ ) |const| :ref:`🔗<class_OS_method_get_video_adapter_driver_info>` -Returns the video adapter driver name and version for the user's currently active graphics card. See also :ref:`RenderingServer.get_video_adapter_api_version<class_RenderingServer_method_get_video_adapter_api_version>`. +Returns the video adapter driver name and version for the user's currently active graphics card, as a :ref:`PackedStringArray<class_PackedStringArray>`. See also :ref:`RenderingServer.get_video_adapter_api_version<class_RenderingServer_method_get_video_adapter_api_version>`. The first element holds the driver name, such as ``nvidia``, ``amdgpu``, etc. -The second element holds the driver version. For e.g. the ``nvidia`` driver on a Linux/BSD platform, the version is in the format ``510.85.02``. For Windows, the driver's format is ``31.0.15.1659``. +The second element holds the driver version. For example, on the ``nvidia`` driver on a Linux/BSD platform, the version is in the format ``510.85.02``. For Windows, the driver's format is ``31.0.15.1659``. -\ **Note:** This method is only supported on the platforms Linux/BSD and Windows when not running in headless mode. It returns an empty array on other platforms. +\ **Note:** This method is only supported on Linux/BSD and Windows when not running in headless mode. On other platforms, it returns an empty array. .. rst-class:: classref-item-separator @@ -1168,7 +1319,7 @@ The second element holds the driver version. For e.g. the ``nvidia`` driver on a .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_environment** **(** :ref:`String<class_String>` variable **)** |const| +:ref:`bool<class_bool>` **has_environment**\ (\ variable\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_has_environment>` Returns ``true`` if the environment variable with the name ``variable`` exists. @@ -1182,13 +1333,13 @@ Returns ``true`` if the environment variable with the name ``variable`` exists. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_feature** **(** :ref:`String<class_String>` tag_name **)** |const| +:ref:`bool<class_bool>` **has_feature**\ (\ tag_name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_has_feature>` Returns ``true`` if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the :doc:`Feature Tags <../tutorials/export/feature_tags>` documentation for more details. \ **Note:** Tag names are case-sensitive. -\ **Note:** On the web platform, one of the following additional tags is defined to indicate host platform: ``web_android``, ``web_ios``, ``web_linuxbsd``, ``web_macos``, or ``web_windows``. +\ **Note:** On the Web platform, one of the following additional tags is defined to indicate the host platform: ``web_android``, ``web_ios``, ``web_linuxbsd``, ``web_macos``, or ``web_windows``. .. rst-class:: classref-item-separator @@ -1198,13 +1349,13 @@ Returns ``true`` if the feature for the given feature tag is supported in the cu .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_debug_build** **(** **)** |const| +:ref:`bool<class_bool>` **is_debug_build**\ (\ ) |const| :ref:`🔗<class_OS_method_is_debug_build>` Returns ``true`` if the Godot binary used to run the project is a *debug* export template, or when running in the editor. Returns ``false`` if the Godot binary used to run the project is a *release* export template. -To check whether the Godot binary used to run the project is an export template (debug or release), use ``OS.has_feature("template")`` instead. +\ **Note:** To check whether the Godot binary used to run the project is an export template (debug or release), use ``OS.has_feature("template")`` instead. .. rst-class:: classref-item-separator @@ -1214,9 +1365,28 @@ To check whether the Godot binary used to run the project is an export template .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_keycode_unicode** **(** :ref:`int<class_int>` code **)** |const| +:ref:`bool<class_bool>` **is_keycode_unicode**\ (\ code\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OS_method_is_keycode_unicode>` + +Returns ``true`` if the input keycode corresponds to a Unicode character. For a list of codes, see the :ref:`Key<enum_@GlobalScope_Key>` constants. + + +.. tabs:: + + .. code-tab:: gdscript + + print(OS.is_keycode_unicode(KEY_G)) # Prints true + print(OS.is_keycode_unicode(KEY_KP_4)) # Prints true + print(OS.is_keycode_unicode(KEY_TAB)) # Prints false + print(OS.is_keycode_unicode(KEY_ESCAPE)) # Prints false + + .. code-tab:: csharp + + GD.Print(OS.IsKeycodeUnicode((long)Key.G)); // Prints true + GD.Print(OS.IsKeycodeUnicode((long)Key.Kp4)); // Prints true + GD.Print(OS.IsKeycodeUnicode((long)Key.Tab)); // Prints false + GD.Print(OS.IsKeycodeUnicode((long)Key.Escape)); // Prints false + -Returns ``true`` if the input keycode corresponds to a Unicode character. .. rst-class:: classref-item-separator @@ -1226,13 +1396,11 @@ Returns ``true`` if the input keycode corresponds to a Unicode character. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_process_running** **(** :ref:`int<class_int>` pid **)** |const| - -Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. +:ref:`bool<class_bool>` **is_process_running**\ (\ pid\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_OS_method_is_process_running>` -Must be a valid ID generated from :ref:`create_process<class_OS_method_create_process>`. +Returns ``true`` if the child process ID (``pid``) is still running or ``false`` if it has terminated. ``pid`` must be a valid ID generated from :ref:`create_process<class_OS_method_create_process>`. -\ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. +\ **Note:** This method is implemented on Android, iOS, Linux, macOS, and Windows. .. rst-class:: classref-item-separator @@ -1242,7 +1410,7 @@ Must be a valid ID generated from :ref:`create_process<class_OS_method_create_pr .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_restart_on_exit_set** **(** **)** |const| +:ref:`bool<class_bool>` **is_restart_on_exit_set**\ (\ ) |const| :ref:`🔗<class_OS_method_is_restart_on_exit_set>` Returns ``true`` if the project will automatically restart when it exits for any reason, ``false`` otherwise. See also :ref:`set_restart_on_exit<class_OS_method_set_restart_on_exit>` and :ref:`get_restart_on_exit_arguments<class_OS_method_get_restart_on_exit_arguments>`. @@ -1254,11 +1422,11 @@ Returns ``true`` if the project will automatically restart when it exits for any .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_sandboxed** **(** **)** |const| +:ref:`bool<class_bool>` **is_sandboxed**\ (\ ) |const| :ref:`🔗<class_OS_method_is_sandboxed>` -Returns ``true`` if application is running in the sandbox. +Returns ``true`` if the application is running in the sandbox. -\ **Note:** This method is implemented on macOS. +\ **Note:** This method is only implemented on macOS and Linux. .. rst-class:: classref-item-separator @@ -1268,7 +1436,7 @@ Returns ``true`` if application is running in the sandbox. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_stdout_verbose** **(** **)** |const| +:ref:`bool<class_bool>` **is_stdout_verbose**\ (\ ) |const| :ref:`🔗<class_OS_method_is_stdout_verbose>` Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` command line argument, or if :ref:`ProjectSettings.debug/settings/stdout/verbose_stdout<class_ProjectSettings_property_debug/settings/stdout/verbose_stdout>` is ``true``. See also :ref:`@GlobalScope.print_verbose<class_@GlobalScope_method_print_verbose>`. @@ -1280,9 +1448,9 @@ Returns ``true`` if the engine was executed with the ``--verbose`` or ``-v`` com .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_userfs_persistent** **(** **)** |const| +:ref:`bool<class_bool>` **is_userfs_persistent**\ (\ ) |const| :ref:`🔗<class_OS_method_is_userfs_persistent>` -If ``true``, the ``user://`` file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable. +Returns ``true`` if the ``user://`` file system is persistent, that is, its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable. .. rst-class:: classref-item-separator @@ -1292,11 +1460,11 @@ If ``true``, the ``user://`` file system is persistent, so that its state is the .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **kill** **(** :ref:`int<class_int>` pid **)** +:ref:`Error<enum_@GlobalScope_Error>` **kill**\ (\ pid\: :ref:`int<class_int>`\ ) :ref:`🔗<class_OS_method_kill>` -Kill (terminate) the process identified by the given process ID (``pid``), e.g. the one returned by :ref:`execute<class_OS_method_execute>` in non-blocking mode. See also :ref:`crash<class_OS_method_crash>`. +Kill (terminate) the process identified by the given process ID (``pid``), such as the ID returned by :ref:`execute<class_OS_method_execute>` in non-blocking mode. See also :ref:`crash<class_OS_method_crash>`. -\ **Note:** This method can also be used to kill processes that were not spawned by the game. +\ **Note:** This method can also be used to kill processes that were not spawned by the engine. \ **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. @@ -1308,13 +1476,13 @@ Kill (terminate) the process identified by the given process ID (``pid``), e.g. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **move_to_trash** **(** :ref:`String<class_String>` path **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **move_to_trash**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_move_to_trash>` -Moves the file or directory to the system's recycle bin. See also :ref:`DirAccess.remove<class_DirAccess_method_remove>`. +Moves the file or directory at the given ``path`` to the system's recycle bin. See also :ref:`DirAccess.remove<class_DirAccess_method_remove>`. The method takes only global paths, so you may need to use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>`. Do not use it for files in ``res://`` as it will not work in exported projects. -\ **Note:** If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. +Returns :ref:`@GlobalScope.FAILED<class_@GlobalScope_constant_FAILED>` if the file or directory cannot be found, or the system does not support this method. .. tabs:: @@ -1331,6 +1499,10 @@ The method takes only global paths, so you may need to use :ref:`ProjectSettings +\ **Note:** This method is implemented on Android, Linux, macOS and Windows. + +\ **Note:** If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. + .. rst-class:: classref-item-separator ---- @@ -1339,9 +1511,9 @@ The method takes only global paths, so you may need to use :ref:`ProjectSettings .. rst-class:: classref-method -void **open_midi_inputs** **(** **)** +|void| **open_midi_inputs**\ (\ ) :ref:`🔗<class_OS_method_open_midi_inputs>` -Initializes the singleton for the system MIDI driver. +Initializes the singleton for the system MIDI driver, allowing Godot to receive :ref:`InputEventMIDI<class_InputEventMIDI>`. See also :ref:`get_connected_midi_inputs<class_OS_method_get_connected_midi_inputs>` and :ref:`close_midi_inputs<class_OS_method_close_midi_inputs>`. \ **Note:** This method is implemented on Linux, macOS and Windows. @@ -1353,12 +1525,14 @@ Initializes the singleton for the system MIDI driver. .. rst-class:: classref-method -:ref:`String<class_String>` **read_string_from_stdin** **(** **)** +:ref:`String<class_String>` **read_string_from_stdin**\ (\ ) :ref:`🔗<class_OS_method_read_string_from_stdin>` Reads a user input string from the standard input (usually the terminal). This operation is *blocking*, which causes the window to freeze if :ref:`read_string_from_stdin<class_OS_method_read_string_from_stdin>` is called on the main thread. The thread calling :ref:`read_string_from_stdin<class_OS_method_read_string_from_stdin>` will block until the program receives a line break in standard input (usually by the user pressing :kbd:`Enter`). \ **Note:** This method is implemented on Linux, macOS and Windows. +\ **Note:** On exported Windows builds, run the console wrapper executable to access the terminal. Otherwise, the standard input will not work correctly. If you need a single executable with console support, use a custom build compiled with the ``windows_subsystem=console`` flag. + .. rst-class:: classref-item-separator ---- @@ -1367,9 +1541,11 @@ Reads a user input string from the standard input (usually the terminal). This o .. rst-class:: classref-method -:ref:`bool<class_bool>` **request_permission** **(** :ref:`String<class_String>` name **)** +:ref:`bool<class_bool>` **request_permission**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OS_method_request_permission>` + +Requests permission from the OS for the given ``name``. Returns ``true`` if the permission has been successfully granted. -At the moment this function is only used by ``AudioDriverOpenSL`` to request permission for ``RECORD_AUDIO`` on Android. +\ **Note:** This method is currently only implemented on Android, to specifically request permission for ``"RECORD_AUDIO"`` by ``AudioDriverOpenSL``. .. rst-class:: classref-item-separator @@ -1379,11 +1555,11 @@ At the moment this function is only used by ``AudioDriverOpenSL`` to request per .. rst-class:: classref-method -:ref:`bool<class_bool>` **request_permissions** **(** **)** +:ref:`bool<class_bool>` **request_permissions**\ (\ ) :ref:`🔗<class_OS_method_request_permissions>` -With this function, you can request dangerous permissions since normal permissions are automatically granted at install time in Android applications. +Requests *dangerous* permissions from the OS. Returns ``true`` if permissions have been successfully granted. -\ **Note:** This method is implemented only on Android. +\ **Note:** This method is only implemented on Android. Normal permissions are automatically granted at install time in Android applications. .. rst-class:: classref-item-separator @@ -1393,7 +1569,7 @@ With this function, you can request dangerous permissions since normal permissio .. rst-class:: classref-method -void **revoke_granted_permissions** **(** **)** +|void| **revoke_granted_permissions**\ (\ ) :ref:`🔗<class_OS_method_revoke_granted_permissions>` On macOS (sandboxed applications only), this function clears list of user selected folders accessible to the application. @@ -1405,7 +1581,7 @@ On macOS (sandboxed applications only), this function clears list of user select .. rst-class:: classref-method -void **set_environment** **(** :ref:`String<class_String>` variable, :ref:`String<class_String>` value **)** |const| +|void| **set_environment**\ (\ variable\: :ref:`String<class_String>`, value\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_set_environment>` Sets the value of the environment variable ``variable`` to ``value``. The environment variable will be set for the Godot process and any process executed with :ref:`execute<class_OS_method_execute>` after running :ref:`set_environment<class_OS_method_set_environment>`. The environment variable will *not* persist to processes run after the Godot process was terminated. @@ -1419,11 +1595,11 @@ Sets the value of the environment variable ``variable`` to ``value``. The enviro .. rst-class:: classref-method -void **set_restart_on_exit** **(** :ref:`bool<class_bool>` restart, :ref:`PackedStringArray<class_PackedStringArray>` arguments=PackedStringArray() **)** +|void| **set_restart_on_exit**\ (\ restart\: :ref:`bool<class_bool>`, arguments\: :ref:`PackedStringArray<class_PackedStringArray>` = PackedStringArray()\ ) :ref:`🔗<class_OS_method_set_restart_on_exit>` -If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit<class_SceneTree_method_quit>` or :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST<class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST>`. Command line ``arguments`` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>` as the value for ``arguments``. +If ``restart`` is ``true``, restarts the project automatically when it is exited with :ref:`SceneTree.quit<class_SceneTree_method_quit>` or :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST<class_Node_constant_NOTIFICATION_WM_CLOSE_REQUEST>`. Command-line ``arguments`` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass :ref:`get_cmdline_args<class_OS_method_get_cmdline_args>` as the value for ``arguments``. -\ :ref:`set_restart_on_exit<class_OS_method_set_restart_on_exit>` can be used to apply setting changes that require a restart. See also :ref:`is_restart_on_exit_set<class_OS_method_is_restart_on_exit_set>` and :ref:`get_restart_on_exit_arguments<class_OS_method_get_restart_on_exit_arguments>`. +This method can be used to apply setting changes that require a restart. See also :ref:`is_restart_on_exit_set<class_OS_method_is_restart_on_exit_set>` and :ref:`get_restart_on_exit_arguments<class_OS_method_get_restart_on_exit_arguments>`. \ **Note:** This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. @@ -1437,9 +1613,9 @@ If ``restart`` is ``true``, restarts the project automatically when it is exited .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **set_thread_name** **(** :ref:`String<class_String>` name **)** +:ref:`Error<enum_@GlobalScope_Error>` **set_thread_name**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OS_method_set_thread_name>` -Sets the name of the current thread. +Assigns the given name to the current thread. Returns :ref:`@GlobalScope.ERR_UNAVAILABLE<class_@GlobalScope_constant_ERR_UNAVAILABLE>` if unavailable on the current platform. .. rst-class:: classref-item-separator @@ -1449,9 +1625,11 @@ Sets the name of the current thread. .. rst-class:: classref-method -void **set_use_file_access_save_and_swap** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_use_file_access_save_and_swap**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_OS_method_set_use_file_access_save_and_swap>` + +If ``enabled`` is ``true``, when opening a file for writing, a temporary file is used in its place. When closed, it is automatically applied to the target file. -Enables backup saves if ``enabled`` is ``true``. +This can useful when files may be opened by other applications, such as antiviruses, text editors, or even the Godot editor itself. .. rst-class:: classref-item-separator @@ -1461,9 +1639,9 @@ Enables backup saves if ``enabled`` is ``true``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **shell_open** **(** :ref:`String<class_String>` uri **)** +:ref:`Error<enum_@GlobalScope_Error>` **shell_open**\ (\ uri\: :ref:`String<class_String>`\ ) :ref:`🔗<class_OS_method_shell_open>` -Requests the OS to open a resource with the most appropriate program. For example: +Requests the OS to open a resource identified by ``uri`` with the most appropriate program. For example: - ``OS.shell_open("C:\\Users\name\Downloads")`` on Windows opens the file explorer at the user's Downloads folder. @@ -1471,7 +1649,7 @@ Requests the OS to open a resource with the most appropriate program. For exampl - ``OS.shell_open("mailto:example@example.com")`` opens the default email client with the "To" field set to ``example@example.com``. See `RFC 2368 - The [code]mailto[/code] URL scheme <https://datatracker.ietf.org/doc/html/rfc2368>`__ for a list of fields that can be added. -Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` path into a system path for use with this method. +Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` project path into a system path for use with this method. \ **Note:** Use :ref:`String.uri_encode<class_String_method_uri_encode>` to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, :ref:`shell_open<class_OS_method_shell_open>` may not work correctly in a project exported to the Web platform. @@ -1485,15 +1663,15 @@ Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_ .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **shell_show_in_file_manager** **(** :ref:`String<class_String>` file_or_dir_path, :ref:`bool<class_bool>` open_folder=true **)** +:ref:`Error<enum_@GlobalScope_Error>` **shell_show_in_file_manager**\ (\ file_or_dir_path\: :ref:`String<class_String>`, open_folder\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_OS_method_shell_show_in_file_manager>` -Requests the OS to open the file manager, then navigate to the given ``file_or_dir_path`` and select the target file or folder. +Requests the OS to open the file manager, navigate to the given ``file_or_dir_path`` and select the target file or folder. -If ``file_or_dir_path`` is a valid directory path, and ``open_folder`` is ``true``, the method will open the file manager and enter the target folder without selecting anything. +If ``open_folder`` is ``true`` and ``file_or_dir_path`` is a valid directory path, the OS will open the file manager and navigate to the target folder without selecting anything. -Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` path into a system path for use with this method. +Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_path>` to convert a ``res://`` or ``user://`` project path into a system path to use with this method. -\ **Note:** Currently this method is only implemented on Windows and macOS. On other platforms, it will fallback to :ref:`shell_open<class_OS_method_shell_open>` with a directory path of ``file_or_dir_path`` with prefix ``file://``. +\ **Note:** This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to :ref:`shell_open<class_OS_method_shell_open>` with a directory path of ``file_or_dir_path`` prefixed with ``file://``. .. rst-class:: classref-item-separator @@ -1503,11 +1681,11 @@ Use :ref:`ProjectSettings.globalize_path<class_ProjectSettings_method_globalize_ .. rst-class:: classref-method -void **unset_environment** **(** :ref:`String<class_String>` variable **)** |const| +|void| **unset_environment**\ (\ variable\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_OS_method_unset_environment>` -Removes the environment ``variable`` from the current environment, if it exists. The environment variable will be removed for the Godot process and any process executed with :ref:`execute<class_OS_method_execute>` after running :ref:`unset_environment<class_OS_method_unset_environment>`. The removal of the environment variable will *not* persist to processes run after the Godot process was terminated. +Removes the given environment variable from the current environment, if it exists. The ``variable`` name cannot be empty or include the ``=`` character. The environment variable will be removed for the Godot process and any process executed with :ref:`execute<class_OS_method_execute>` after running :ref:`unset_environment<class_OS_method_unset_environment>`. The removal of the environment variable will *not* persist to processes run after the Godot process was terminated. -\ **Note:** Environment variable names are case-sensitive on all platforms except Windows. The ``variable`` name cannot be empty or include the ``=`` character. +\ **Note:** Environment variable names are case-sensitive on all platforms except Windows. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1516,3 +1694,4 @@ Removes the environment ``variable`` from the current environment, if it exists. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedbytearray.rst b/classes/class_packedbytearray.rst index da789579375..4cd742c92e8 100644 --- a/classes/class_packedbytearray.rst +++ b/classes/class_packedbytearray.rst @@ -21,6 +21,8 @@ An array specifically designed to hold bytes. Packs data tightly, so it saves me \ **PackedByteArray** also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedByteArray_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,13 +35,13 @@ Constructors .. table:: :widths: auto - +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>` **(** **)** | - +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>` **(** :ref:`PackedByteArray<class_PackedByteArray>` from **)** | - +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>` **(** :ref:`Array<class_Array>` from **)** | - +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ from\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`PackedByteArray<class_PackedByteArray_constructor_PackedByteArray>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -49,125 +51,125 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedByteArray_method_append>` **(** :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedByteArray_method_append_array>` **(** :ref:`PackedByteArray<class_PackedByteArray>` array **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedByteArray_method_bsearch>` **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedByteArray_method_clear>` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`compress<class_PackedByteArray_method_compress>` **(** :ref:`int<class_int>` compression_mode=0 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedByteArray_method_count>` **(** :ref:`int<class_int>` value **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`decode_double<class_PackedByteArray_method_decode_double>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`decode_float<class_PackedByteArray_method_decode_float>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`decode_half<class_PackedByteArray_method_decode_half>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_s8<class_PackedByteArray_method_decode_s8>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_s16<class_PackedByteArray_method_decode_s16>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_s32<class_PackedByteArray_method_decode_s32>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_s64<class_PackedByteArray_method_decode_s64>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_u8<class_PackedByteArray_method_decode_u8>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_u16<class_PackedByteArray_method_decode_u16>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_u32<class_PackedByteArray_method_decode_u32>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_u64<class_PackedByteArray_method_decode_u64>` **(** :ref:`int<class_int>` byte_offset **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`decode_var<class_PackedByteArray_method_decode_var>` **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`decode_var_size<class_PackedByteArray_method_decode_var_size>` **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress<class_PackedByteArray_method_decompress>` **(** :ref:`int<class_int>` buffer_size, :ref:`int<class_int>` compression_mode=0 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress_dynamic<class_PackedByteArray_method_decompress_dynamic>` **(** :ref:`int<class_int>` max_output_size, :ref:`int<class_int>` compression_mode=0 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`duplicate<class_PackedByteArray_method_duplicate>` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_double<class_PackedByteArray_method_encode_double>` **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_float<class_PackedByteArray_method_encode_float>` **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_half<class_PackedByteArray_method_encode_half>` **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_s8<class_PackedByteArray_method_encode_s8>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_s16<class_PackedByteArray_method_encode_s16>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_s32<class_PackedByteArray_method_encode_s32>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_s64<class_PackedByteArray_method_encode_s64>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_u8<class_PackedByteArray_method_encode_u8>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_u16<class_PackedByteArray_method_encode_u16>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_u32<class_PackedByteArray_method_encode_u32>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`encode_u64<class_PackedByteArray_method_encode_u64>` **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`encode_var<class_PackedByteArray_method_encode_var>` **(** :ref:`int<class_int>` byte_offset, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` allow_objects=false **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedByteArray_method_fill>` **(** :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedByteArray_method_find>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string_from_ascii<class_PackedByteArray_method_get_string_from_ascii>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string_from_utf16<class_PackedByteArray_method_get_string_from_utf16>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string_from_utf32<class_PackedByteArray_method_get_string_from_utf32>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string_from_wchar<class_PackedByteArray_method_get_string_from_wchar>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedByteArray_method_has>` **(** :ref:`int<class_int>` value **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_encoded_var<class_PackedByteArray_method_has_encoded_var>` **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`hex_encode<class_PackedByteArray_method_hex_encode>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedByteArray_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedByteArray_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedByteArray_method_push_back>` **(** :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedByteArray_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedByteArray_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedByteArray_method_reverse>` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedByteArray_method_rfind>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedByteArray_method_set>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedByteArray_method_size>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`slice<class_PackedByteArray_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedByteArray_method_sort>` **(** **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`to_float32_array<class_PackedByteArray_method_to_float32_array>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`to_float64_array<class_PackedByteArray_method_to_float64_array>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`to_int32_array<class_PackedByteArray_method_to_int32_array>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`to_int64_array<class_PackedByteArray_method_to_int64_array>` **(** **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedByteArray_method_append>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedByteArray_method_append_array>`\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedByteArray_method_bsearch>`\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedByteArray_method_clear>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`compress<class_PackedByteArray_method_compress>`\ (\ compression_mode\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedByteArray_method_count>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`decode_double<class_PackedByteArray_method_decode_double>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`decode_float<class_PackedByteArray_method_decode_float>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`decode_half<class_PackedByteArray_method_decode_half>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_s8<class_PackedByteArray_method_decode_s8>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_s16<class_PackedByteArray_method_decode_s16>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_s32<class_PackedByteArray_method_decode_s32>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_s64<class_PackedByteArray_method_decode_s64>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_u8<class_PackedByteArray_method_decode_u8>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_u16<class_PackedByteArray_method_decode_u16>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_u32<class_PackedByteArray_method_decode_u32>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_u64<class_PackedByteArray_method_decode_u64>`\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`decode_var<class_PackedByteArray_method_decode_var>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`decode_var_size<class_PackedByteArray_method_decode_var_size>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress<class_PackedByteArray_method_decompress>`\ (\ buffer_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`decompress_dynamic<class_PackedByteArray_method_decompress_dynamic>`\ (\ max_output_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`duplicate<class_PackedByteArray_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_double<class_PackedByteArray_method_encode_double>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_float<class_PackedByteArray_method_encode_float>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_half<class_PackedByteArray_method_encode_half>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_s8<class_PackedByteArray_method_encode_s8>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_s16<class_PackedByteArray_method_encode_s16>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_s32<class_PackedByteArray_method_encode_s32>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_s64<class_PackedByteArray_method_encode_s64>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_u8<class_PackedByteArray_method_encode_u8>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_u16<class_PackedByteArray_method_encode_u16>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_u32<class_PackedByteArray_method_encode_u32>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`encode_u64<class_PackedByteArray_method_encode_u64>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`encode_var<class_PackedByteArray_method_encode_var>`\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedByteArray_method_fill>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedByteArray_method_find>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string_from_ascii<class_PackedByteArray_method_get_string_from_ascii>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string_from_utf16<class_PackedByteArray_method_get_string_from_utf16>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string_from_utf32<class_PackedByteArray_method_get_string_from_utf32>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string_from_wchar<class_PackedByteArray_method_get_string_from_wchar>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedByteArray_method_has>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_encoded_var<class_PackedByteArray_method_has_encoded_var>`\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`hex_encode<class_PackedByteArray_method_hex_encode>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedByteArray_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedByteArray_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedByteArray_method_push_back>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedByteArray_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedByteArray_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedByteArray_method_reverse>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedByteArray_method_rfind>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedByteArray_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedByteArray_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`slice<class_PackedByteArray_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedByteArray_method_sort>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`to_float32_array<class_PackedByteArray_method_to_float32_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`to_float64_array<class_PackedByteArray_method_to_float64_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`to_int32_array<class_PackedByteArray_method_to_int32_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`to_int64_array<class_PackedByteArray_method_to_int64_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -177,15 +179,15 @@ Operators .. table:: :widths: auto - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedByteArray_operator_neq_PackedByteArray>` **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`operator +<class_PackedByteArray_operator_sum_PackedByteArray>` **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedByteArray_operator_eq_PackedByteArray>` **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_PackedByteArray_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedByteArray_operator_neq_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`operator +<class_PackedByteArray_operator_sum_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedByteArray_operator_eq_PackedByteArray>`\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_PackedByteArray_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -200,7 +202,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ ) :ref:`🔗<class_PackedByteArray_constructor_PackedByteArray>` Constructs an empty **PackedByteArray**. @@ -210,7 +212,7 @@ Constructs an empty **PackedByteArray**. .. rst-class:: classref-constructor -:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray** **(** :ref:`PackedByteArray<class_PackedByteArray>` from **)** +:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ from\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) Constructs a **PackedByteArray** as a copy of the given **PackedByteArray**. @@ -220,7 +222,7 @@ Constructs a **PackedByteArray** as a copy of the given **PackedByteArray**. .. rst-class:: classref-constructor -:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedByteArray<class_PackedByteArray>` **PackedByteArray**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedByteArray**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -237,7 +239,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedByteArray_method_push_back>`). @@ -249,7 +251,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedByteArray<class_PackedByteArray>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_method_append_array>` Appends a **PackedByteArray** at the end of this array. @@ -261,7 +263,7 @@ Appends a **PackedByteArray** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedByteArray_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -275,7 +277,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedByteArray_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedByteArray_method_resize>` with a size of ``0``. @@ -287,7 +289,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedByteArray .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **compress** **(** :ref:`int<class_int>` compression_mode=0 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **compress**\ (\ compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_compress>` Returns a new **PackedByteArray** with the data compressed. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants. @@ -299,7 +301,7 @@ Returns a new **PackedByteArray** with the data compressed. Set the compression .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`int<class_int>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_count>` Returns the number of times an element is in the array. @@ -311,9 +313,9 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`float<class_float>` **decode_double** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`float<class_float>` **decode_double**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_double>` -Decodes a 64-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. +Decodes a 64-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. .. rst-class:: classref-item-separator @@ -323,9 +325,9 @@ Decodes a 64-bit floating point number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`float<class_float>` **decode_float** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`float<class_float>` **decode_float**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_float>` -Decodes a 32-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. +Decodes a 32-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. .. rst-class:: classref-item-separator @@ -335,9 +337,9 @@ Decodes a 32-bit floating point number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`float<class_float>` **decode_half** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`float<class_float>` **decode_half**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_half>` -Decodes a 16-bit floating point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. +Decodes a 16-bit floating-point number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0.0`` if a valid number can't be decoded. .. rst-class:: classref-item-separator @@ -347,7 +349,7 @@ Decodes a 16-bit floating point number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`int<class_int>` **decode_s8** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_s8**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s8>` Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -359,7 +361,7 @@ Decodes a 8-bit signed integer number from the bytes starting at ``byte_offset`` .. rst-class:: classref-method -:ref:`int<class_int>` **decode_s16** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_s16**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s16>` Decodes a 16-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -371,7 +373,7 @@ Decodes a 16-bit signed integer number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`int<class_int>` **decode_s32** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_s32**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s32>` Decodes a 32-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -383,7 +385,7 @@ Decodes a 32-bit signed integer number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`int<class_int>` **decode_s64** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_s64**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_s64>` Decodes a 64-bit signed integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -395,7 +397,7 @@ Decodes a 64-bit signed integer number from the bytes starting at ``byte_offset` .. rst-class:: classref-method -:ref:`int<class_int>` **decode_u8** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_u8**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u8>` Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -407,7 +409,7 @@ Decodes a 8-bit unsigned integer number from the bytes starting at ``byte_offset .. rst-class:: classref-method -:ref:`int<class_int>` **decode_u16** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_u16**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u16>` Decodes a 16-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -419,7 +421,7 @@ Decodes a 16-bit unsigned integer number from the bytes starting at ``byte_offse .. rst-class:: classref-method -:ref:`int<class_int>` **decode_u32** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_u32**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u32>` Decodes a 32-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -431,7 +433,7 @@ Decodes a 32-bit unsigned integer number from the bytes starting at ``byte_offse .. rst-class:: classref-method -:ref:`int<class_int>` **decode_u64** **(** :ref:`int<class_int>` byte_offset **)** |const| +:ref:`int<class_int>` **decode_u64**\ (\ byte_offset\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_u64>` Decodes a 64-bit unsigned integer number from the bytes starting at ``byte_offset``. Fails if the byte count is insufficient. Returns ``0`` if a valid number can't be decoded. @@ -443,7 +445,7 @@ Decodes a 64-bit unsigned integer number from the bytes starting at ``byte_offse .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **decode_var** **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| +:ref:`Variant<class_Variant>` **decode_var**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_var>` Decodes a :ref:`Variant<class_Variant>` from the bytes starting at ``byte_offset``. Returns ``null`` if a valid variant can't be decoded or the value is :ref:`Object<class_Object>`-derived and ``allow_objects`` is ``false``. @@ -455,7 +457,7 @@ Decodes a :ref:`Variant<class_Variant>` from the bytes starting at ``byte_offset .. rst-class:: classref-method -:ref:`int<class_int>` **decode_var_size** **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| +:ref:`int<class_int>` **decode_var_size**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_decode_var_size>` Decodes a size of a :ref:`Variant<class_Variant>` from the bytes starting at ``byte_offset``. Requires at least 4 bytes of data starting at the offset, otherwise fails. @@ -467,10 +469,12 @@ Decodes a size of a :ref:`Variant<class_Variant>` from the bytes starting at ``b .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **decompress** **(** :ref:`int<class_int>` buffer_size, :ref:`int<class_int>` compression_mode=0 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **decompress**\ (\ buffer_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_decompress>` Returns a new **PackedByteArray** with the data decompressed. Set ``buffer_size`` to the size of the uncompressed data. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants. +\ **Note:** Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header. + .. rst-class:: classref-item-separator ---- @@ -479,14 +483,16 @@ Returns a new **PackedByteArray** with the data decompressed. Set ``buffer_size` .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **decompress_dynamic** **(** :ref:`int<class_int>` max_output_size, :ref:`int<class_int>` compression_mode=0 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **decompress_dynamic**\ (\ max_output_size\: :ref:`int<class_int>`, compression_mode\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_decompress_dynamic>` Returns a new **PackedByteArray** with the data decompressed. Set the compression mode using one of :ref:`CompressionMode<enum_FileAccess_CompressionMode>`'s constants. **This method only accepts brotli, gzip, and deflate compression modes.**\ -This method is potentially slower than ``decompress``, as it may have to re-allocate its output buffer multiple times while decompressing, whereas ``decompress`` knows it's output buffer size from the beginning. +This method is potentially slower than :ref:`decompress<class_PackedByteArray_method_decompress>`, as it may have to re-allocate its output buffer multiple times while decompressing, whereas :ref:`decompress<class_PackedByteArray_method_decompress>` knows it's output buffer size from the beginning. GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via ``max_output_size``. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned. +\ **Note:** Decompression is not guaranteed to work with data not compressed by Godot, for example if data compressed with the deflate compression mode lacks a checksum or header. + .. rst-class:: classref-item-separator ---- @@ -495,7 +501,7 @@ GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **duplicate** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **duplicate**\ (\ ) :ref:`🔗<class_PackedByteArray_method_duplicate>` Creates a copy of the array, and returns it. @@ -507,9 +513,9 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **encode_double** **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** +|void| **encode_double**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_double>` -Encodes a 64-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of allocated space, starting at the offset. +Encodes a 64-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of allocated space, starting at the offset. .. rst-class:: classref-item-separator @@ -519,9 +525,9 @@ Encodes a 64-bit floating point number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_float** **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** +|void| **encode_float**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_float>` -Encodes a 32-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. +Encodes a 32-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. .. rst-class:: classref-item-separator @@ -531,9 +537,9 @@ Encodes a 32-bit floating point number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_half** **(** :ref:`int<class_int>` byte_offset, :ref:`float<class_float>` value **)** +|void| **encode_half**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_half>` -Encodes a 16-bit floating point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. +Encodes a 16-bit floating-point number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. .. rst-class:: classref-item-separator @@ -543,7 +549,7 @@ Encodes a 16-bit floating point number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_s8** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_s8**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s8>` Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. @@ -555,7 +561,7 @@ Encodes a 8-bit signed integer number (signed byte) at the index of ``byte_offse .. rst-class:: classref-method -void **encode_s16** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_s16**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s16>` Encodes a 16-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. @@ -567,7 +573,7 @@ Encodes a 16-bit signed integer number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_s32** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_s32**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s32>` Encodes a 32-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. @@ -579,7 +585,7 @@ Encodes a 32-bit signed integer number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_s64** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_s64**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_s64>` Encodes a 64-bit signed integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of space, starting at the offset. @@ -591,7 +597,7 @@ Encodes a 64-bit signed integer number as bytes at the index of ``byte_offset`` .. rst-class:: classref-method -void **encode_u8** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_u8**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u8>` Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` bytes. The array must have at least 1 byte of space, starting at the offset. @@ -603,7 +609,7 @@ Encodes a 8-bit unsigned integer number (byte) at the index of ``byte_offset`` b .. rst-class:: classref-method -void **encode_u16** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_u16**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u16>` Encodes a 16-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 2 bytes of space, starting at the offset. @@ -615,7 +621,7 @@ Encodes a 16-bit unsigned integer number as bytes at the index of ``byte_offset` .. rst-class:: classref-method -void **encode_u32** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_u32**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u32>` Encodes a 32-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 4 bytes of space, starting at the offset. @@ -627,7 +633,7 @@ Encodes a 32-bit unsigned integer number as bytes at the index of ``byte_offset` .. rst-class:: classref-method -void **encode_u64** **(** :ref:`int<class_int>` byte_offset, :ref:`int<class_int>` value **)** +|void| **encode_u64**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_encode_u64>` Encodes a 64-bit unsigned integer number as bytes at the index of ``byte_offset`` bytes. The array must have at least 8 bytes of space, starting at the offset. @@ -639,7 +645,7 @@ Encodes a 64-bit unsigned integer number as bytes at the index of ``byte_offset` .. rst-class:: classref-method -:ref:`int<class_int>` **encode_var** **(** :ref:`int<class_int>` byte_offset, :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` allow_objects=false **)** +:ref:`int<class_int>` **encode_var**\ (\ byte_offset\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PackedByteArray_method_encode_var>` Encodes a :ref:`Variant<class_Variant>` at the index of ``byte_offset`` bytes. A sufficient space must be allocated, depending on the encoded variant's size. If ``allow_objects`` is ``false``, :ref:`Object<class_Object>`-derived values are not permitted and will instead be serialized as ID-only. @@ -651,7 +657,7 @@ Encodes a :ref:`Variant<class_Variant>` at the index of ``byte_offset`` bytes. A .. rst-class:: classref-method -void **fill** **(** :ref:`int<class_int>` value **)** +|void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedByteArray_method_resize>` to create an array with a given size and initialized elements. @@ -663,7 +669,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedByteArray_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -675,9 +681,9 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`String<class_String>` **get_string_from_ascii** **(** **)** |const| +:ref:`String<class_String>` **get_string_from_ascii**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_ascii>` -Converts ASCII/Latin-1 encoded array to :ref:`String<class_String>`. Fast alternative to :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>` if the content is ASCII/Latin-1 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 :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`. +Converts ASCII/Latin-1 encoded array to :ref:`String<class_String>`. Fast alternative to :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>` if the content is ASCII/Latin-1 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 :ref:`get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`. This is the inverse of :ref:`String.to_ascii_buffer<class_String_method_to_ascii_buffer>`. .. rst-class:: classref-item-separator @@ -687,9 +693,9 @@ Converts ASCII/Latin-1 encoded array to :ref:`String<class_String>`. Fast altern .. rst-class:: classref-method -:ref:`String<class_String>` **get_string_from_utf8** **(** **)** |const| +:ref:`String<class_String>` **get_string_from_utf8**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf8>` -Converts UTF-8 encoded array to :ref:`String<class_String>`. Slower than :ref:`get_string_from_ascii<class_PackedByteArray_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. Returns empty string if source array is not valid UTF-8 string. +Converts UTF-8 encoded array to :ref:`String<class_String>`. Slower than :ref:`get_string_from_ascii<class_PackedByteArray_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. Returns empty string if source array is not valid UTF-8 string. This is the inverse of :ref:`String.to_utf8_buffer<class_String_method_to_utf8_buffer>`. .. rst-class:: classref-item-separator @@ -699,9 +705,9 @@ Converts UTF-8 encoded array to :ref:`String<class_String>`. Slower than :ref:`g .. rst-class:: classref-method -:ref:`String<class_String>` **get_string_from_utf16** **(** **)** |const| +:ref:`String<class_String>` **get_string_from_utf16**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf16>` -Converts UTF-16 encoded array to :ref:`String<class_String>`. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. +Converts UTF-16 encoded array to :ref:`String<class_String>`. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of :ref:`String.to_utf16_buffer<class_String_method_to_utf16_buffer>`. .. rst-class:: classref-item-separator @@ -711,9 +717,9 @@ Converts UTF-16 encoded array to :ref:`String<class_String>`. If the BOM is miss .. rst-class:: classref-method -:ref:`String<class_String>` **get_string_from_utf32** **(** **)** |const| +:ref:`String<class_String>` **get_string_from_utf32**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_utf32>` -Converts UTF-32 encoded array to :ref:`String<class_String>`. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. +Converts UTF-32 encoded array to :ref:`String<class_String>`. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. This is the inverse of :ref:`String.to_utf32_buffer<class_String_method_to_utf32_buffer>`. .. rst-class:: classref-item-separator @@ -723,9 +729,9 @@ Converts UTF-32 encoded array to :ref:`String<class_String>`. System endianness .. rst-class:: classref-method -:ref:`String<class_String>` **get_string_from_wchar** **(** **)** |const| +:ref:`String<class_String>` **get_string_from_wchar**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_get_string_from_wchar>` -Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String<class_String>`. Returns empty string if source array is not valid wide string. +Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded array to :ref:`String<class_String>`. Returns empty string if source array is not valid wide string. This is the inverse of :ref:`String.to_wchar_buffer<class_String_method_to_wchar_buffer>`. .. rst-class:: classref-item-separator @@ -735,7 +741,7 @@ Converts wide character (``wchar_t``, UTF-16 on Windows, UTF-32 on other platfor .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`int<class_int>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedByteArray_method_has>` Returns ``true`` if the array contains ``value``. @@ -747,9 +753,9 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_encoded_var** **(** :ref:`int<class_int>` byte_offset, :ref:`bool<class_bool>` allow_objects=false **)** |const| +:ref:`bool<class_bool>` **has_encoded_var**\ (\ byte_offset\: :ref:`int<class_int>`, allow_objects\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_PackedByteArray_method_has_encoded_var>` -Returns ``true`` if a valid :ref:`Variant<class_Variant>` value can be decoded at the ``byte_offset``. Returns ``false`` othewrise or when the value is :ref:`Object<class_Object>`-derived and ``allow_objects`` is ``false``. +Returns ``true`` if a valid :ref:`Variant<class_Variant>` value can be decoded at the ``byte_offset``. Returns ``false`` otherwise or when the value is :ref:`Object<class_Object>`-derived and ``allow_objects`` is ``false``. .. rst-class:: classref-item-separator @@ -759,7 +765,7 @@ Returns ``true`` if a valid :ref:`Variant<class_Variant>` value can be decoded a .. rst-class:: classref-method -:ref:`String<class_String>` **hex_encode** **(** **)** |const| +:ref:`String<class_String>` **hex_encode**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_hex_encode>` Returns a hexadecimal representation of this array as a :ref:`String<class_String>`. @@ -786,7 +792,7 @@ Returns a hexadecimal representation of this array as a :ref:`String<class_Strin .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -798,7 +804,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_is_empty>` Returns ``true`` if the array is empty. @@ -810,7 +816,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_push_back>` Appends an element at the end of the array. @@ -822,7 +828,7 @@ Appends an element at the end of the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_remove_at>` Removes an element from the array by index. @@ -834,9 +840,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedByteArray_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -846,7 +852,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedByteArray_method_reverse>` Reverses the order of the elements in the array. @@ -858,7 +864,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedByteArray_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -870,7 +876,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_method_set>` Changes the byte at the given index. @@ -882,7 +888,7 @@ Changes the byte at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_size>` Returns the number of elements in the array. @@ -894,7 +900,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedByteArray_method_slice>` Returns the slice of the **PackedByteArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedByteArray**. @@ -910,7 +916,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedByteArray_method_sort>` Sorts the elements of the array in ascending order. @@ -922,7 +928,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **to_float32_array** **(** **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **to_float32_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_float32_array>` Returns a copy of the data converted to a :ref:`PackedFloat32Array<class_PackedFloat32Array>`, where each block of 4 bytes has been converted to a 32-bit float (C++ ``float``). @@ -938,7 +944,7 @@ If the original data can't be converted to 32-bit floats, the resulting data is .. rst-class:: classref-method -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **to_float64_array** **(** **)** |const| +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **to_float64_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_float64_array>` Returns a copy of the data converted to a :ref:`PackedFloat64Array<class_PackedFloat64Array>`, where each block of 8 bytes has been converted to a 64-bit float (C++ ``double``, Godot :ref:`float<class_float>`). @@ -954,7 +960,7 @@ If the original data can't be converted to 64-bit floats, the resulting data is .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **to_int32_array** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **to_int32_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_int32_array>` Returns a copy of the data converted to a :ref:`PackedInt32Array<class_PackedInt32Array>`, where each block of 4 bytes has been converted to a signed 32-bit integer (C++ ``int32_t``). @@ -970,7 +976,7 @@ If the original data can't be converted to signed 32-bit integers, the resulting .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **to_int64_array** **(** **)** |const| +:ref:`PackedInt64Array<class_PackedInt64Array>` **to_int64_array**\ (\ ) |const| :ref:`🔗<class_PackedByteArray_method_to_int64_array>` Returns a copy of the data converted to a :ref:`PackedInt64Array<class_PackedInt64Array>`, where each block of 8 bytes has been converted to a signed 64-bit integer (C++ ``int64_t``, Godot :ref:`int<class_int>`). @@ -991,7 +997,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_neq_PackedByteArray>` Returns ``true`` if contents of the arrays differ. @@ -1003,7 +1009,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedByteArray<class_PackedByteArray>` **operator +** **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** +:ref:`PackedByteArray<class_PackedByteArray>` **operator +**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_sum_PackedByteArray>` Returns a new **PackedByteArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedByteArray_method_append_array>` instead. @@ -1015,7 +1021,7 @@ Returns a new **PackedByteArray** with contents of ``right`` added at the end of .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedByteArray<class_PackedByteArray>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PackedByteArray_operator_eq_PackedByteArray>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices. @@ -1027,7 +1033,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedByteArray_operator_idx_int>` Returns the byte at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -1040,3 +1046,4 @@ Note that the byte is returned as a 64-bit :ref:`int<class_int>`. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedcolorarray.rst b/classes/class_packedcolorarray.rst index 4f44ff7721d..7b3775ce4ea 100644 --- a/classes/class_packedcolorarray.rst +++ b/classes/class_packedcolorarray.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Color<class_Color>`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedColorArray** versus ``Array[Color]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedColorArray_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -31,13 +35,13 @@ Constructors .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>` **(** :ref:`PackedColorArray<class_PackedColorArray>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>` **(** :ref:`Array<class_Array>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>`\ (\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>`\ (\ from\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`PackedColorArray<class_PackedColorArray_constructor_PackedColorArray>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -47,49 +51,49 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedColorArray_method_append>` **(** :ref:`Color<class_Color>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedColorArray_method_append_array>` **(** :ref:`PackedColorArray<class_PackedColorArray>` array **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedColorArray_method_bsearch>` **(** :ref:`Color<class_Color>` value, :ref:`bool<class_bool>` before=true **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedColorArray_method_clear>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedColorArray_method_count>` **(** :ref:`Color<class_Color>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`duplicate<class_PackedColorArray_method_duplicate>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedColorArray_method_fill>` **(** :ref:`Color<class_Color>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedColorArray_method_find>` **(** :ref:`Color<class_Color>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedColorArray_method_has>` **(** :ref:`Color<class_Color>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedColorArray_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`Color<class_Color>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedColorArray_method_is_empty>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedColorArray_method_push_back>` **(** :ref:`Color<class_Color>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedColorArray_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedColorArray_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedColorArray_method_reverse>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedColorArray_method_rfind>` **(** :ref:`Color<class_Color>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedColorArray_method_set>` **(** :ref:`int<class_int>` index, :ref:`Color<class_Color>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedColorArray_method_size>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`slice<class_PackedColorArray_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedColorArray_method_sort>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedColorArray_method_to_byte_array>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedColorArray_method_append>`\ (\ value\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedColorArray_method_append_array>`\ (\ array\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedColorArray_method_bsearch>`\ (\ value\: :ref:`Color<class_Color>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedColorArray_method_clear>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedColorArray_method_count>`\ (\ value\: :ref:`Color<class_Color>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`duplicate<class_PackedColorArray_method_duplicate>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedColorArray_method_fill>`\ (\ value\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedColorArray_method_find>`\ (\ value\: :ref:`Color<class_Color>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedColorArray_method_has>`\ (\ value\: :ref:`Color<class_Color>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedColorArray_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedColorArray_method_is_empty>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedColorArray_method_push_back>`\ (\ value\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedColorArray_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedColorArray_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedColorArray_method_reverse>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedColorArray_method_rfind>`\ (\ value\: :ref:`Color<class_Color>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedColorArray_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedColorArray_method_size>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`slice<class_PackedColorArray_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedColorArray_method_sort>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedColorArray_method_to_byte_array>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -99,15 +103,15 @@ Operators .. table:: :widths: auto - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedColorArray_operator_neq_PackedColorArray>` **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`operator +<class_PackedColorArray_operator_sum_PackedColorArray>` **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedColorArray_operator_eq_PackedColorArray>` **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`operator []<class_PackedColorArray_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedColorArray_operator_neq_PackedColorArray>`\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`operator +<class_PackedColorArray_operator_sum_PackedColorArray>`\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedColorArray_operator_eq_PackedColorArray>`\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`operator []<class_PackedColorArray_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -122,7 +126,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray** **(** **)** +:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray**\ (\ ) :ref:`🔗<class_PackedColorArray_constructor_PackedColorArray>` Constructs an empty **PackedColorArray**. @@ -132,7 +136,7 @@ Constructs an empty **PackedColorArray**. .. rst-class:: classref-constructor -:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray** **(** :ref:`PackedColorArray<class_PackedColorArray>` from **)** +:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray**\ (\ from\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) Constructs a **PackedColorArray** as a copy of the given **PackedColorArray**. @@ -142,7 +146,7 @@ Constructs a **PackedColorArray** as a copy of the given **PackedColorArray**. .. rst-class:: classref-constructor -:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedColorArray<class_PackedColorArray>` **PackedColorArray**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedColorArray**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -165,7 +169,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`Color<class_Color>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PackedColorArray_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedColorArray_method_push_back>`). @@ -177,7 +181,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedColorArray<class_PackedColorArray>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) :ref:`🔗<class_PackedColorArray_method_append_array>` Appends a **PackedColorArray** at the end of this array. @@ -189,7 +193,7 @@ Appends a **PackedColorArray** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`Color<class_Color>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`Color<class_Color>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedColorArray_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -203,7 +207,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedColorArray_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedColorArray_method_resize>` with a size of ``0``. @@ -215,7 +219,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedColorArra .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`Color<class_Color>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`Color<class_Color>`\ ) |const| :ref:`🔗<class_PackedColorArray_method_count>` Returns the number of times an element is in the array. @@ -227,7 +231,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedColorArray<class_PackedColorArray>` **duplicate** **(** **)** +:ref:`PackedColorArray<class_PackedColorArray>` **duplicate**\ (\ ) :ref:`🔗<class_PackedColorArray_method_duplicate>` Creates a copy of the array, and returns it. @@ -239,7 +243,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`Color<class_Color>` value **)** +|void| **fill**\ (\ value\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PackedColorArray_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedColorArray_method_resize>` to create an array with a given size and initialized elements. @@ -251,7 +255,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`Color<class_Color>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`Color<class_Color>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedColorArray_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -263,7 +267,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`Color<class_Color>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`Color<class_Color>`\ ) |const| :ref:`🔗<class_PackedColorArray_method_has>` Returns ``true`` if the array contains ``value``. @@ -275,7 +279,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`Color<class_Color>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PackedColorArray_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -287,7 +291,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedColorArray_method_is_empty>` Returns ``true`` if the array is empty. @@ -299,7 +303,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`Color<class_Color>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PackedColorArray_method_push_back>` Appends a value to the array. @@ -311,7 +315,7 @@ Appends a value to the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedColorArray_method_remove_at>` Removes an element from the array by index. @@ -323,9 +327,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedColorArray_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedColorArray_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -335,7 +339,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedColorArray_method_reverse>` Reverses the order of the elements in the array. @@ -347,7 +351,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`Color<class_Color>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`Color<class_Color>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedColorArray_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -359,7 +363,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`Color<class_Color>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PackedColorArray_method_set>` Changes the :ref:`Color<class_Color>` at the given index. @@ -371,7 +375,7 @@ Changes the :ref:`Color<class_Color>` at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedColorArray_method_size>` Returns the number of elements in the array. @@ -383,7 +387,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedColorArray<class_PackedColorArray>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedColorArray<class_PackedColorArray>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedColorArray_method_slice>` Returns the slice of the **PackedColorArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedColorArray**. @@ -399,7 +403,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedColorArray_method_sort>` Sorts the elements of the array in ascending order. @@ -411,7 +415,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedColorArray_method_to_byte_array>` Returns a :ref:`PackedByteArray<class_PackedByteArray>` with each color encoded as bytes. @@ -428,7 +432,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) :ref:`🔗<class_PackedColorArray_operator_neq_PackedColorArray>` Returns ``true`` if contents of the arrays differ. @@ -440,7 +444,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedColorArray<class_PackedColorArray>` **operator +** **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** +:ref:`PackedColorArray<class_PackedColorArray>` **operator +**\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) :ref:`🔗<class_PackedColorArray_operator_sum_PackedColorArray>` Returns a new **PackedColorArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedColorArray_method_append_array>` instead. @@ -452,7 +456,7 @@ Returns a new **PackedColorArray** with contents of ``right`` added at the end o .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedColorArray<class_PackedColorArray>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) :ref:`🔗<class_PackedColorArray_operator_eq_PackedColorArray>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Color<class_Color>`\ s at the corresponding indices. @@ -464,7 +468,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`Color<class_Color>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`Color<class_Color>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedColorArray_operator_idx_int>` Returns the :ref:`Color<class_Color>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -475,3 +479,4 @@ Returns the :ref:`Color<class_Color>` at index ``index``. Negative indices can b .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packeddatacontainer.rst b/classes/class_packeddatacontainer.rst index 01c94c60695..d62329be378 100644 --- a/classes/class_packeddatacontainer.rst +++ b/classes/class_packeddatacontainer.rst @@ -51,11 +51,11 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pack<class_PackedDataContainer_method_pack>` **(** :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedDataContainer_method_size>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pack<class_PackedDataContainer_method_pack>`\ (\ value\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedDataContainer_method_size>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +70,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **pack** **(** :ref:`Variant<class_Variant>` value **)** +:ref:`Error<enum_@GlobalScope_Error>` **pack**\ (\ value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PackedDataContainer_method_pack>` Packs the given container into a binary representation. The ``value`` must be either :ref:`Array<class_Array>` or :ref:`Dictionary<class_Dictionary>`, any other type will result in invalid data error. @@ -84,7 +84,7 @@ Packs the given container into a binary representation. The ``value`` must be ei .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedDataContainer_method_size>` Returns the size of the packed container (see :ref:`Array.size<class_Array_method_size>` and :ref:`Dictionary.size<class_Dictionary_method_size>`). @@ -95,3 +95,4 @@ Returns the size of the packed container (see :ref:`Array.size<class_Array_metho .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packeddatacontainerref.rst b/classes/class_packeddatacontainerref.rst index 13d73b0ee9f..7d86c5ad767 100644 --- a/classes/class_packeddatacontainerref.rst +++ b/classes/class_packeddatacontainerref.rst @@ -51,9 +51,9 @@ Methods .. table:: :widths: auto - +-----------------------+---------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedDataContainerRef_method_size>` **(** **)** |const| | - +-----------------------+---------------------------------------------------------------------------+ + +-----------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedDataContainerRef_method_size>`\ (\ ) |const| | + +-----------------------+---------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedDataContainerRef_method_size>` Returns the size of the packed container (see :ref:`Array.size<class_Array_method_size>` and :ref:`Dictionary.size<class_Dictionary_method_size>`). @@ -79,3 +79,4 @@ Returns the size of the packed container (see :ref:`Array.size<class_Array_metho .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedfloat32array.rst b/classes/class_packedfloat32array.rst index 6244485388e..d06bec47b6d 100644 --- a/classes/class_packedfloat32array.rst +++ b/classes/class_packedfloat32array.rst @@ -21,6 +21,8 @@ An array specifically designed to hold 32-bit floating-point values (float). Pac If you need to pack 64-bit floats tightly, see :ref:`PackedFloat64Array<class_PackedFloat64Array>`. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedFloat32Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,13 +35,13 @@ Constructors .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>` **(** :ref:`Array<class_Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>`\ (\ from\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`PackedFloat32Array<class_PackedFloat32Array_constructor_PackedFloat32Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -49,49 +51,49 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedFloat32Array_method_append>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedFloat32Array_method_append_array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` array **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedFloat32Array_method_bsearch>` **(** :ref:`float<class_float>` value, :ref:`bool<class_bool>` before=true **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedFloat32Array_method_clear>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedFloat32Array_method_count>` **(** :ref:`float<class_float>` value **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`duplicate<class_PackedFloat32Array_method_duplicate>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedFloat32Array_method_fill>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedFloat32Array_method_find>` **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedFloat32Array_method_has>` **(** :ref:`float<class_float>` value **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedFloat32Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedFloat32Array_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedFloat32Array_method_push_back>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedFloat32Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedFloat32Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedFloat32Array_method_reverse>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedFloat32Array_method_rfind>` **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedFloat32Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedFloat32Array_method_size>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`slice<class_PackedFloat32Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedFloat32Array_method_sort>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedFloat32Array_method_to_byte_array>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedFloat32Array_method_append>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedFloat32Array_method_append_array>`\ (\ array\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedFloat32Array_method_bsearch>`\ (\ value\: :ref:`float<class_float>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedFloat32Array_method_clear>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedFloat32Array_method_count>`\ (\ value\: :ref:`float<class_float>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`duplicate<class_PackedFloat32Array_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedFloat32Array_method_fill>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedFloat32Array_method_find>`\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedFloat32Array_method_has>`\ (\ value\: :ref:`float<class_float>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedFloat32Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedFloat32Array_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedFloat32Array_method_push_back>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedFloat32Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedFloat32Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedFloat32Array_method_reverse>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedFloat32Array_method_rfind>`\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedFloat32Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedFloat32Array_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`slice<class_PackedFloat32Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedFloat32Array_method_sort>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedFloat32Array_method_to_byte_array>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -101,15 +103,15 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedFloat32Array_operator_neq_PackedFloat32Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`operator +<class_PackedFloat32Array_operator_sum_PackedFloat32Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedFloat32Array_operator_eq_PackedFloat32Array>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_PackedFloat32Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedFloat32Array_operator_neq_PackedFloat32Array>`\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`operator +<class_PackedFloat32Array_operator_sum_PackedFloat32Array>`\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedFloat32Array_operator_eq_PackedFloat32Array>`\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_PackedFloat32Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +126,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array** **(** **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array**\ (\ ) :ref:`🔗<class_PackedFloat32Array_constructor_PackedFloat32Array>` Constructs an empty **PackedFloat32Array**. @@ -134,7 +136,7 @@ Constructs an empty **PackedFloat32Array**. .. rst-class:: classref-constructor -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` from **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array**\ (\ from\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) Constructs a **PackedFloat32Array** as a copy of the given **PackedFloat32Array**. @@ -144,7 +146,7 @@ Constructs a **PackedFloat32Array** as a copy of the given **PackedFloat32Array* .. rst-class:: classref-constructor -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **PackedFloat32Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedFloat32Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -161,7 +163,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`float<class_float>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedFloat32Array_method_push_back>`). @@ -173,7 +175,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_PackedFloat32Array_method_append_array>` Appends a **PackedFloat32Array** at the end of this array. @@ -185,7 +187,7 @@ Appends a **PackedFloat32Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`float<class_float>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`float<class_float>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedFloat32Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -201,7 +203,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedFloat32Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedFloat32Array_method_resize>` with a size of ``0``. @@ -213,7 +215,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedFloat32Ar .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`float<class_float>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_count>` Returns the number of times an element is in the array. @@ -227,7 +229,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **duplicate** **(** **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedFloat32Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -239,7 +241,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`float<class_float>` value **)** +|void| **fill**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedFloat32Array_method_resize>` to create an array with a given size and initialized elements. @@ -251,7 +253,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -265,7 +267,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`float<class_float>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -279,7 +281,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`float<class_float>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -291,7 +293,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -303,7 +305,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`float<class_float>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_push_back>` Appends an element at the end of the array. @@ -315,7 +317,7 @@ Appends an element at the end of the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat32Array_method_remove_at>` Removes an element from the array by index. @@ -327,9 +329,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat32Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedFloat32Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -339,7 +341,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedFloat32Array_method_reverse>` Reverses the order of the elements in the array. @@ -351,7 +353,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -365,7 +367,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`float<class_float>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat32Array_method_set>` Changes the float at the given index. @@ -377,7 +379,7 @@ Changes the float at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_size>` Returns the number of elements in the array. @@ -389,7 +391,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_slice>` Returns the slice of the **PackedFloat32Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedFloat32Array**. @@ -405,7 +407,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedFloat32Array_method_sort>` Sorts the elements of the array in ascending order. @@ -419,7 +421,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedFloat32Array_method_to_byte_array>` Returns a copy of the data converted to a :ref:`PackedByteArray<class_PackedByteArray>`, where each element have been encoded as 4 bytes. @@ -438,7 +440,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_PackedFloat32Array_operator_neq_PackedFloat32Array>` Returns ``true`` if contents of the arrays differ. @@ -450,7 +452,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **operator +** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **operator +**\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_PackedFloat32Array_operator_sum_PackedFloat32Array>` Returns a new **PackedFloat32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedFloat32Array_method_append_array>` instead. @@ -462,7 +464,7 @@ Returns a new **PackedFloat32Array** with contents of ``right`` added at the end .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_PackedFloat32Array_operator_eq_PackedFloat32Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices. @@ -474,7 +476,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat32Array_operator_idx_int>` Returns the :ref:`float<class_float>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -487,3 +489,4 @@ Note that :ref:`float<class_float>` type is 64-bit, unlike the values stored in .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedfloat64array.rst b/classes/class_packedfloat64array.rst index 4020f7a7b14..c77ec3e8124 100644 --- a/classes/class_packedfloat64array.rst +++ b/classes/class_packedfloat64array.rst @@ -21,6 +21,10 @@ An array specifically designed to hold 64-bit floating-point values (double). Pa If you only need to pack 32-bit floats tightly, see :ref:`PackedFloat32Array<class_PackedFloat32Array>` for a more memory-friendly alternative. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedFloat64Array** versus ``Array[float]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedFloat64Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,13 +37,13 @@ Constructors .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>` **(** :ref:`Array<class_Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>`\ (\ from\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`PackedFloat64Array<class_PackedFloat64Array_constructor_PackedFloat64Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -49,49 +53,49 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedFloat64Array_method_append>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedFloat64Array_method_append_array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` array **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedFloat64Array_method_bsearch>` **(** :ref:`float<class_float>` value, :ref:`bool<class_bool>` before=true **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedFloat64Array_method_clear>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedFloat64Array_method_count>` **(** :ref:`float<class_float>` value **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`duplicate<class_PackedFloat64Array_method_duplicate>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedFloat64Array_method_fill>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedFloat64Array_method_find>` **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedFloat64Array_method_has>` **(** :ref:`float<class_float>` value **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedFloat64Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedFloat64Array_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedFloat64Array_method_push_back>` **(** :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedFloat64Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedFloat64Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedFloat64Array_method_reverse>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedFloat64Array_method_rfind>` **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedFloat64Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`float<class_float>` value **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedFloat64Array_method_size>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`slice<class_PackedFloat64Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedFloat64Array_method_sort>` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedFloat64Array_method_to_byte_array>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedFloat64Array_method_append>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedFloat64Array_method_append_array>`\ (\ array\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedFloat64Array_method_bsearch>`\ (\ value\: :ref:`float<class_float>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedFloat64Array_method_clear>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedFloat64Array_method_count>`\ (\ value\: :ref:`float<class_float>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`duplicate<class_PackedFloat64Array_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedFloat64Array_method_fill>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedFloat64Array_method_find>`\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedFloat64Array_method_has>`\ (\ value\: :ref:`float<class_float>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedFloat64Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedFloat64Array_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedFloat64Array_method_push_back>`\ (\ value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedFloat64Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedFloat64Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedFloat64Array_method_reverse>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedFloat64Array_method_rfind>`\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedFloat64Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedFloat64Array_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`slice<class_PackedFloat64Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedFloat64Array_method_sort>`\ (\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedFloat64Array_method_to_byte_array>`\ (\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -101,15 +105,15 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedFloat64Array_operator_neq_PackedFloat64Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`operator +<class_PackedFloat64Array_operator_sum_PackedFloat64Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedFloat64Array_operator_eq_PackedFloat64Array>` **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_PackedFloat64Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedFloat64Array_operator_neq_PackedFloat64Array>`\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`operator +<class_PackedFloat64Array_operator_sum_PackedFloat64Array>`\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedFloat64Array_operator_eq_PackedFloat64Array>`\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_PackedFloat64Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +128,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array** **(** **)** +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array**\ (\ ) :ref:`🔗<class_PackedFloat64Array_constructor_PackedFloat64Array>` Constructs an empty **PackedFloat64Array**. @@ -134,7 +138,7 @@ Constructs an empty **PackedFloat64Array**. .. rst-class:: classref-constructor -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` from **)** +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array**\ (\ from\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) Constructs a **PackedFloat64Array** as a copy of the given **PackedFloat64Array**. @@ -144,7 +148,7 @@ Constructs a **PackedFloat64Array** as a copy of the given **PackedFloat64Array* .. rst-class:: classref-constructor -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **PackedFloat64Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedFloat64Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -161,7 +165,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`float<class_float>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat64Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedFloat64Array_method_push_back>`). @@ -173,7 +177,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) :ref:`🔗<class_PackedFloat64Array_method_append_array>` Appends a **PackedFloat64Array** at the end of this array. @@ -185,7 +189,7 @@ Appends a **PackedFloat64Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`float<class_float>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`float<class_float>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedFloat64Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -201,7 +205,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedFloat64Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedFloat64Array_method_resize>` with a size of ``0``. @@ -213,7 +217,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedFloat64Ar .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`float<class_float>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_count>` Returns the number of times an element is in the array. @@ -227,7 +231,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **duplicate** **(** **)** +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedFloat64Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -239,7 +243,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`float<class_float>` value **)** +|void| **fill**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat64Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedFloat64Array_method_resize>` to create an array with a given size and initialized elements. @@ -251,7 +255,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -265,7 +269,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`float<class_float>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -279,7 +283,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`float<class_float>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat64Array_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -291,7 +295,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -303,7 +307,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`float<class_float>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat64Array_method_push_back>` Appends an element at the end of the array. @@ -315,7 +319,7 @@ Appends an element at the end of the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat64Array_method_remove_at>` Removes an element from the array by index. @@ -327,9 +331,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat64Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedFloat64Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -339,7 +343,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedFloat64Array_method_reverse>` Reverses the order of the elements in the array. @@ -351,7 +355,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`float<class_float>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`float<class_float>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -365,7 +369,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`float<class_float>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PackedFloat64Array_method_set>` Changes the float at the given index. @@ -377,7 +381,7 @@ Changes the float at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_size>` Returns the number of elements in the array. @@ -389,7 +393,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_slice>` Returns the slice of the **PackedFloat64Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedFloat64Array**. @@ -405,7 +409,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedFloat64Array_method_sort>` Sorts the elements of the array in ascending order. @@ -419,7 +423,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedFloat64Array_method_to_byte_array>` Returns a copy of the data converted to a :ref:`PackedByteArray<class_PackedByteArray>`, where each element have been encoded as 8 bytes. @@ -438,7 +442,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) :ref:`🔗<class_PackedFloat64Array_operator_neq_PackedFloat64Array>` Returns ``true`` if contents of the arrays differ. @@ -450,7 +454,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **operator +** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **operator +**\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) :ref:`🔗<class_PackedFloat64Array_operator_sum_PackedFloat64Array>` Returns a new **PackedFloat64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedFloat64Array_method_append_array>` instead. @@ -462,7 +466,7 @@ Returns a new **PackedFloat64Array** with contents of ``right`` added at the end .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedFloat64Array<class_PackedFloat64Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ ) :ref:`🔗<class_PackedFloat64Array_operator_eq_PackedFloat64Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices. @@ -474,7 +478,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedFloat64Array_operator_idx_int>` Returns the :ref:`float<class_float>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -485,3 +489,4 @@ Returns the :ref:`float<class_float>` at index ``index``. Negative indices can b .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedint32array.rst b/classes/class_packedint32array.rst index e5e4dfa230e..66bb53c8e28 100644 --- a/classes/class_packedint32array.rst +++ b/classes/class_packedint32array.rst @@ -21,6 +21,8 @@ An array specifically designed to hold 32-bit integer values. Packs data tightly \ **Note:** This type stores signed 32-bit integers, which means it can take values in the interval ``[-2^31, 2^31 - 1]``, i.e. ``[-2147483648, 2147483647]``. Exceeding those bounds will wrap around. In comparison, :ref:`int<class_int>` uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see :ref:`PackedInt64Array<class_PackedInt64Array>`. +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedInt32Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,13 +35,13 @@ Constructors .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>` **(** :ref:`Array<class_Array>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>`\ (\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>`\ (\ from\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`PackedInt32Array<class_PackedInt32Array_constructor_PackedInt32Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -49,49 +51,49 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedInt32Array_method_append>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedInt32Array_method_append_array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` array **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedInt32Array_method_bsearch>` **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedInt32Array_method_clear>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedInt32Array_method_count>` **(** :ref:`int<class_int>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`duplicate<class_PackedInt32Array_method_duplicate>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedInt32Array_method_fill>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedInt32Array_method_find>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedInt32Array_method_has>` **(** :ref:`int<class_int>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedInt32Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedInt32Array_method_is_empty>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedInt32Array_method_push_back>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedInt32Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedInt32Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedInt32Array_method_reverse>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedInt32Array_method_rfind>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedInt32Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedInt32Array_method_size>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`slice<class_PackedInt32Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedInt32Array_method_sort>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedInt32Array_method_to_byte_array>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedInt32Array_method_append>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedInt32Array_method_append_array>`\ (\ array\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedInt32Array_method_bsearch>`\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedInt32Array_method_clear>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedInt32Array_method_count>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`duplicate<class_PackedInt32Array_method_duplicate>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedInt32Array_method_fill>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedInt32Array_method_find>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedInt32Array_method_has>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedInt32Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedInt32Array_method_is_empty>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedInt32Array_method_push_back>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedInt32Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedInt32Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedInt32Array_method_reverse>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedInt32Array_method_rfind>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedInt32Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedInt32Array_method_size>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`slice<class_PackedInt32Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedInt32Array_method_sort>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedInt32Array_method_to_byte_array>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -101,15 +103,15 @@ Operators .. table:: :widths: auto - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedInt32Array_operator_neq_PackedInt32Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`operator +<class_PackedInt32Array_operator_sum_PackedInt32Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedInt32Array_operator_eq_PackedInt32Array>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_PackedInt32Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedInt32Array_operator_neq_PackedInt32Array>`\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`operator +<class_PackedInt32Array_operator_sum_PackedInt32Array>`\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedInt32Array_operator_eq_PackedInt32Array>`\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_PackedInt32Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +126,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array**\ (\ ) :ref:`🔗<class_PackedInt32Array_constructor_PackedInt32Array>` Constructs an empty **PackedInt32Array**. @@ -134,7 +136,7 @@ Constructs an empty **PackedInt32Array**. .. rst-class:: classref-constructor -:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` from **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array**\ (\ from\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) Constructs a **PackedInt32Array** as a copy of the given **PackedInt32Array**. @@ -144,7 +146,7 @@ Constructs a **PackedInt32Array** as a copy of the given **PackedInt32Array**. .. rst-class:: classref-constructor -:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **PackedInt32Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedInt32Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -161,7 +163,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedInt32Array_method_push_back>`). @@ -173,7 +175,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PackedInt32Array_method_append_array>` Appends a **PackedInt32Array** at the end of this array. @@ -185,7 +187,7 @@ Appends a **PackedInt32Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedInt32Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -199,7 +201,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedInt32Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedInt32Array_method_resize>` with a size of ``0``. @@ -211,7 +213,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedInt32Arra .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`int<class_int>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt32Array_method_count>` Returns the number of times an element is in the array. @@ -223,7 +225,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **duplicate** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedInt32Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -235,7 +237,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`int<class_int>` value **)** +|void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedInt32Array_method_resize>` to create an array with a given size and initialized elements. @@ -247,7 +249,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedInt32Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -259,7 +261,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`int<class_int>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt32Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -271,7 +273,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_insert>` Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -283,7 +285,7 @@ Inserts a new integer at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedInt32Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -295,7 +297,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_push_back>` Appends a value to the array. @@ -307,7 +309,7 @@ Appends a value to the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_remove_at>` Removes an element from the array by index. @@ -319,9 +321,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedInt32Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -331,7 +333,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedInt32Array_method_reverse>` Reverses the order of the elements in the array. @@ -343,7 +345,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedInt32Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -355,7 +357,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_method_set>` Changes the integer at the given index. @@ -367,7 +369,7 @@ Changes the integer at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedInt32Array_method_size>` Returns the number of elements in the array. @@ -379,7 +381,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedInt32Array_method_slice>` Returns the slice of the **PackedInt32Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedInt32Array**. @@ -395,7 +397,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedInt32Array_method_sort>` Sorts the elements of the array in ascending order. @@ -407,7 +409,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedInt32Array_method_to_byte_array>` Returns a copy of the data converted to a :ref:`PackedByteArray<class_PackedByteArray>`, where each element have been encoded as 4 bytes. @@ -426,7 +428,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PackedInt32Array_operator_neq_PackedInt32Array>` Returns ``true`` if contents of the arrays differ. @@ -438,7 +440,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedInt32Array<class_PackedInt32Array>` **operator +** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **operator +**\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PackedInt32Array_operator_sum_PackedInt32Array>` Returns a new **PackedInt32Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedInt32Array_method_append_array>` instead. @@ -450,7 +452,7 @@ Returns a new **PackedInt32Array** with contents of ``right`` added at the end o .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PackedInt32Array_operator_eq_PackedInt32Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. @@ -462,7 +464,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt32Array_operator_idx_int>` Returns the :ref:`int<class_int>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -475,3 +477,4 @@ Note that :ref:`int<class_int>` type is 64-bit, unlike the values stored in the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedint64array.rst b/classes/class_packedint64array.rst index 8b710ef908d..4a7ea79463b 100644 --- a/classes/class_packedint64array.rst +++ b/classes/class_packedint64array.rst @@ -21,6 +21,10 @@ An array specifically designed to hold 64-bit integer values. Packs data tightly \ **Note:** This type stores signed 64-bit integers, which means it can take values in the interval ``[-2^63, 2^63 - 1]``, i.e. ``[-9223372036854775808, 9223372036854775807]``. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see :ref:`PackedInt32Array<class_PackedInt32Array>` for a more memory-friendly alternative. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt32Array<class_PackedInt32Array>` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedInt64Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,13 +37,13 @@ Constructors .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>` **(** :ref:`Array<class_Array>` from **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ from\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`PackedInt64Array<class_PackedInt64Array_constructor_PackedInt64Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -49,49 +53,49 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedInt64Array_method_append>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedInt64Array_method_append_array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` array **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedInt64Array_method_bsearch>` **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedInt64Array_method_clear>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedInt64Array_method_count>` **(** :ref:`int<class_int>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`duplicate<class_PackedInt64Array_method_duplicate>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedInt64Array_method_fill>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedInt64Array_method_find>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedInt64Array_method_has>` **(** :ref:`int<class_int>` value **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedInt64Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedInt64Array_method_is_empty>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedInt64Array_method_push_back>` **(** :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedInt64Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedInt64Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedInt64Array_method_reverse>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedInt64Array_method_rfind>` **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedInt64Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedInt64Array_method_size>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`slice<class_PackedInt64Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedInt64Array_method_sort>` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedInt64Array_method_to_byte_array>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedInt64Array_method_append>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedInt64Array_method_append_array>`\ (\ array\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedInt64Array_method_bsearch>`\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedInt64Array_method_clear>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedInt64Array_method_count>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`duplicate<class_PackedInt64Array_method_duplicate>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedInt64Array_method_fill>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedInt64Array_method_find>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedInt64Array_method_has>`\ (\ value\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedInt64Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedInt64Array_method_is_empty>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedInt64Array_method_push_back>`\ (\ value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedInt64Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedInt64Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedInt64Array_method_reverse>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedInt64Array_method_rfind>`\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedInt64Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedInt64Array_method_size>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`slice<class_PackedInt64Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedInt64Array_method_sort>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedInt64Array_method_to_byte_array>`\ (\ ) |const| | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -101,15 +105,15 @@ Operators .. table:: :widths: auto - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedInt64Array_operator_neq_PackedInt64Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`operator +<class_PackedInt64Array_operator_sum_PackedInt64Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedInt64Array_operator_eq_PackedInt64Array>` **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_PackedInt64Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedInt64Array_operator_neq_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`operator +<class_PackedInt64Array_operator_sum_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedInt64Array_operator_eq_PackedInt64Array>`\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_PackedInt64Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +128,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array** **(** **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ ) :ref:`🔗<class_PackedInt64Array_constructor_PackedInt64Array>` Constructs an empty **PackedInt64Array**. @@ -134,7 +138,7 @@ Constructs an empty **PackedInt64Array**. .. rst-class:: classref-constructor -:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` from **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ from\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) Constructs a **PackedInt64Array** as a copy of the given **PackedInt64Array**. @@ -144,7 +148,7 @@ Constructs a **PackedInt64Array** as a copy of the given **PackedInt64Array**. .. rst-class:: classref-constructor -:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **PackedInt64Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedInt64Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -161,7 +165,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedInt64Array_method_push_back>`). @@ -173,7 +177,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_method_append_array>` Appends a **PackedInt64Array** at the end of this array. @@ -185,7 +189,7 @@ Appends a **PackedInt64Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`int<class_int>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`int<class_int>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedInt64Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -199,7 +203,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedInt64Array_method_resize>` with a size of ``0``. @@ -211,7 +215,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedInt64Arra .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`int<class_int>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt64Array_method_count>` Returns the number of times an element is in the array. @@ -223,7 +227,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **duplicate** **(** **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -235,7 +239,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`int<class_int>` value **)** +|void| **fill**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedInt64Array_method_resize>` to create an array with a given size and initialized elements. @@ -247,7 +251,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedInt64Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -259,7 +263,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`int<class_int>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PackedInt64Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -271,7 +275,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`int<class_int>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_insert>` Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -283,7 +287,7 @@ Inserts a new integer at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -295,7 +299,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`int<class_int>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_push_back>` Appends a value to the array. @@ -307,7 +311,7 @@ Appends a value to the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_remove_at>` Removes an element from the array by index. @@ -319,9 +323,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedInt64Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -331,7 +335,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_reverse>` Reverses the order of the elements in the array. @@ -343,7 +347,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`int<class_int>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`int<class_int>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedInt64Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -355,7 +359,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_method_set>` Changes the integer at the given index. @@ -367,7 +371,7 @@ Changes the integer at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_size>` Returns the number of elements in the array. @@ -379,7 +383,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedInt64Array<class_PackedInt64Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedInt64Array_method_slice>` Returns the slice of the **PackedInt64Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedInt64Array**. @@ -395,7 +399,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedInt64Array_method_sort>` Sorts the elements of the array in ascending order. @@ -407,7 +411,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedInt64Array_method_to_byte_array>` Returns a copy of the data converted to a :ref:`PackedByteArray<class_PackedByteArray>`, where each element have been encoded as 8 bytes. @@ -426,7 +430,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_neq_PackedInt64Array>` Returns ``true`` if contents of the arrays differ. @@ -438,7 +442,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedInt64Array<class_PackedInt64Array>` **operator +** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **operator +**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_sum_PackedInt64Array>` Returns a new **PackedInt64Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedInt64Array_method_append_array>` instead. @@ -450,7 +454,7 @@ Returns a new **PackedInt64Array** with contents of ``right`` added at the end o .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedInt64Array<class_PackedInt64Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedInt64Array<class_PackedInt64Array>`\ ) :ref:`🔗<class_PackedInt64Array_operator_eq_PackedInt64Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices. @@ -462,7 +466,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedInt64Array_operator_idx_int>` Returns the :ref:`int<class_int>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -473,3 +477,4 @@ Returns the :ref:`int<class_int>` at index ``index``. Negative indices can be us .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedscene.rst b/classes/class_packedscene.rst index dee78eeaed3..497d46b6eb9 100644 --- a/classes/class_packedscene.rst +++ b/classes/class_packedscene.rst @@ -46,7 +46,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n -\ **Example of saving a node with different owners:** The following example creates 3 objects: :ref:`Node2D<class_Node2D>` (``node``), :ref:`RigidBody2D<class_RigidBody2D>` (``body``) and :ref:`CollisionObject2D<class_CollisionObject2D>` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and ``pack`` will therefore only save those two nodes, but not ``collision``. +\ **Example of saving a node with different owners:** The following example creates 3 objects: :ref:`Node2D<class_Node2D>` (``node``), :ref:`RigidBody2D<class_RigidBody2D>` (``body``) and :ref:`CollisionObject2D<class_CollisionObject2D>` (``collision``). ``collision`` is a child of ``body`` which is a child of ``node``. Only ``body`` is owned by ``node`` and :ref:`pack<class_PackedScene_method_pack>` will therefore only save those two nodes, but not ``collision``. .. tabs:: @@ -106,7 +106,7 @@ Can be used to save a node to a file. When saving, the node as well as all the n Tutorials --------- -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ .. rst-class:: classref-reftable-group @@ -128,15 +128,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_instantiate<class_PackedScene_method_can_instantiate>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SceneState<class_SceneState>` | :ref:`get_state<class_PackedScene_method_get_state>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`instantiate<class_PackedScene_method_instantiate>` **(** :ref:`GenEditState<enum_PackedScene_GenEditState>` edit_state=0 **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pack<class_PackedScene_method_pack>` **(** :ref:`Node<class_Node>` path **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_instantiate<class_PackedScene_method_can_instantiate>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneState<class_SceneState>` | :ref:`get_state<class_PackedScene_method_get_state>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`instantiate<class_PackedScene_method_instantiate>`\ (\ edit_state\: :ref:`GenEditState<enum_PackedScene_GenEditState>` = 0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pack<class_PackedScene_method_pack>`\ (\ path\: :ref:`Node<class_Node>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -151,7 +151,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **GenEditState**: +enum **GenEditState**: :ref:`🔗<enum_PackedScene_GenEditState>` .. _class_PackedScene_constant_GEN_EDIT_STATE_DISABLED: @@ -204,11 +204,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **_bundled** = ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }`` +:ref:`Dictionary<class_Dictionary>` **_bundled** = ``{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }`` :ref:`🔗<class_PackedScene_property__bundled>` A dictionary representation of the scene contents. -Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. +Available keys include "names" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. .. rst-class:: classref-section-separator @@ -223,7 +223,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_instantiate** **(** **)** |const| +:ref:`bool<class_bool>` **can_instantiate**\ (\ ) |const| :ref:`🔗<class_PackedScene_method_can_instantiate>` Returns ``true`` if the scene file has nodes. @@ -235,9 +235,9 @@ Returns ``true`` if the scene file has nodes. .. rst-class:: classref-method -:ref:`SceneState<class_SceneState>` **get_state** **(** **)** |const| +:ref:`SceneState<class_SceneState>` **get_state**\ (\ ) |const| :ref:`🔗<class_PackedScene_method_get_state>` -Returns the ``SceneState`` representing the scene file contents. +Returns the :ref:`SceneState<class_SceneState>` representing the scene file contents. .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ Returns the ``SceneState`` representing the scene file contents. .. rst-class:: classref-method -:ref:`Node<class_Node>` **instantiate** **(** :ref:`GenEditState<enum_PackedScene_GenEditState>` edit_state=0 **)** |const| +:ref:`Node<class_Node>` **instantiate**\ (\ edit_state\: :ref:`GenEditState<enum_PackedScene_GenEditState>` = 0\ ) |const| :ref:`🔗<class_PackedScene_method_instantiate>` Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a :ref:`Node.NOTIFICATION_SCENE_INSTANTIATED<class_Node_constant_NOTIFICATION_SCENE_INSTANTIATED>` notification on the root node. @@ -259,9 +259,9 @@ Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **pack** **(** :ref:`Node<class_Node>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **pack**\ (\ path\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_PackedScene_method_pack>` -Pack will ignore any sub-nodes not owned by given node. See :ref:`Node.owner<class_Node_property_owner>`. +Packs the ``path`` node, and all owned sub-nodes, into this **PackedScene**. Any existing data will be cleared. See :ref:`Node.owner<class_Node_property_owner>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -270,3 +270,4 @@ Pack will ignore any sub-nodes not owned by given node. See :ref:`Node.owner<cla .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedstringarray.rst b/classes/class_packedstringarray.rst index b623f3e9ec0..76fca07c585 100644 --- a/classes/class_packedstringarray.rst +++ b/classes/class_packedstringarray.rst @@ -27,6 +27,10 @@ If you want to join the strings in the array, use :ref:`String.join<class_String var string = " ".join(string_array) print(string) # "hello world" +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedStringArray** versus ``Array[String]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedStringArray_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -36,7 +40,7 @@ If you want to join the strings in the array, use :ref:`String.join<class_String Tutorials --------- -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -46,13 +50,13 @@ Constructors .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>` **(** :ref:`PackedStringArray<class_PackedStringArray>` from **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>` **(** :ref:`Array<class_Array>` from **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>`\ (\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>`\ (\ from\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`PackedStringArray<class_PackedStringArray_constructor_PackedStringArray>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -62,49 +66,49 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedStringArray_method_append>` **(** :ref:`String<class_String>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedStringArray_method_append_array>` **(** :ref:`PackedStringArray<class_PackedStringArray>` array **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedStringArray_method_bsearch>` **(** :ref:`String<class_String>` value, :ref:`bool<class_bool>` before=true **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedStringArray_method_clear>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedStringArray_method_count>` **(** :ref:`String<class_String>` value **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`duplicate<class_PackedStringArray_method_duplicate>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedStringArray_method_fill>` **(** :ref:`String<class_String>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedStringArray_method_find>` **(** :ref:`String<class_String>` value, :ref:`int<class_int>` from=0 **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedStringArray_method_has>` **(** :ref:`String<class_String>` value **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedStringArray_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`String<class_String>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedStringArray_method_is_empty>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedStringArray_method_push_back>` **(** :ref:`String<class_String>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedStringArray_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedStringArray_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedStringArray_method_reverse>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedStringArray_method_rfind>` **(** :ref:`String<class_String>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedStringArray_method_set>` **(** :ref:`int<class_int>` index, :ref:`String<class_String>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedStringArray_method_size>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`slice<class_PackedStringArray_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedStringArray_method_sort>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedStringArray_method_to_byte_array>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedStringArray_method_append>`\ (\ value\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedStringArray_method_append_array>`\ (\ array\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedStringArray_method_bsearch>`\ (\ value\: :ref:`String<class_String>`, before\: :ref:`bool<class_bool>` = true\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedStringArray_method_clear>`\ (\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedStringArray_method_count>`\ (\ value\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`duplicate<class_PackedStringArray_method_duplicate>`\ (\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedStringArray_method_fill>`\ (\ value\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedStringArray_method_find>`\ (\ value\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedStringArray_method_has>`\ (\ value\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedStringArray_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedStringArray_method_is_empty>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedStringArray_method_push_back>`\ (\ value\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedStringArray_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedStringArray_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedStringArray_method_reverse>`\ (\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedStringArray_method_rfind>`\ (\ value\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedStringArray_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedStringArray_method_size>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`slice<class_PackedStringArray_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedStringArray_method_sort>`\ (\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedStringArray_method_to_byte_array>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -114,15 +118,15 @@ Operators .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedStringArray_operator_neq_PackedStringArray>` **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`operator +<class_PackedStringArray_operator_sum_PackedStringArray>` **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedStringArray_operator_eq_PackedStringArray>` **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator []<class_PackedStringArray_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedStringArray_operator_neq_PackedStringArray>`\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`operator +<class_PackedStringArray_operator_sum_PackedStringArray>`\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedStringArray_operator_eq_PackedStringArray>`\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator []<class_PackedStringArray_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -137,7 +141,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray** **(** **)** +:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray**\ (\ ) :ref:`🔗<class_PackedStringArray_constructor_PackedStringArray>` Constructs an empty **PackedStringArray**. @@ -147,7 +151,7 @@ Constructs an empty **PackedStringArray**. .. rst-class:: classref-constructor -:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray** **(** :ref:`PackedStringArray<class_PackedStringArray>` from **)** +:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray**\ (\ from\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) Constructs a **PackedStringArray** as a copy of the given **PackedStringArray**. @@ -157,7 +161,7 @@ Constructs a **PackedStringArray** as a copy of the given **PackedStringArray**. .. rst-class:: classref-constructor -:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedStringArray<class_PackedStringArray>` **PackedStringArray**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedStringArray**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -174,7 +178,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`String<class_String>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PackedStringArray_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedStringArray_method_push_back>`). @@ -186,7 +190,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedStringArray<class_PackedStringArray>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_PackedStringArray_method_append_array>` Appends a **PackedStringArray** at the end of this array. @@ -198,7 +202,7 @@ Appends a **PackedStringArray** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`String<class_String>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`String<class_String>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedStringArray_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -212,7 +216,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedStringArray_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedStringArray_method_resize>` with a size of ``0``. @@ -224,7 +228,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedStringArr .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`String<class_String>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_PackedStringArray_method_count>` Returns the number of times an element is in the array. @@ -236,7 +240,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **duplicate** **(** **)** +:ref:`PackedStringArray<class_PackedStringArray>` **duplicate**\ (\ ) :ref:`🔗<class_PackedStringArray_method_duplicate>` Creates a copy of the array, and returns it. @@ -248,7 +252,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`String<class_String>` value **)** +|void| **fill**\ (\ value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PackedStringArray_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedStringArray_method_resize>` to create an array with a given size and initialized elements. @@ -260,7 +264,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`String<class_String>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedStringArray_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -272,7 +276,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`String<class_String>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_PackedStringArray_method_has>` Returns ``true`` if the array contains ``value``. @@ -284,7 +288,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`String<class_String>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PackedStringArray_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -296,7 +300,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedStringArray_method_is_empty>` Returns ``true`` if the array is empty. @@ -308,7 +312,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`String<class_String>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PackedStringArray_method_push_back>` Appends a string element at end of the array. @@ -320,7 +324,7 @@ Appends a string element at end of the array. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedStringArray_method_remove_at>` Removes an element from the array by index. @@ -332,9 +336,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedStringArray_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedStringArray_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -344,7 +348,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedStringArray_method_reverse>` Reverses the order of the elements in the array. @@ -356,7 +360,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`String<class_String>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedStringArray_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -368,7 +372,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`String<class_String>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PackedStringArray_method_set>` Changes the :ref:`String<class_String>` at the given index. @@ -380,7 +384,7 @@ Changes the :ref:`String<class_String>` at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedStringArray_method_size>` Returns the number of elements in the array. @@ -392,7 +396,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedStringArray_method_slice>` Returns the slice of the **PackedStringArray**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedStringArray**. @@ -408,7 +412,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedStringArray_method_sort>` Sorts the elements of the array in ascending order. @@ -420,7 +424,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedStringArray_method_to_byte_array>` Returns a :ref:`PackedByteArray<class_PackedByteArray>` with each string encoded as bytes. @@ -437,7 +441,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_PackedStringArray_operator_neq_PackedStringArray>` Returns ``true`` if contents of the arrays differ. @@ -449,7 +453,7 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedStringArray<class_PackedStringArray>` **operator +** **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** +:ref:`PackedStringArray<class_PackedStringArray>` **operator +**\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_PackedStringArray_operator_sum_PackedStringArray>` Returns a new **PackedStringArray** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedStringArray_method_append_array>` instead. @@ -461,7 +465,7 @@ Returns a new **PackedStringArray** with contents of ``right`` added at the end .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedStringArray<class_PackedStringArray>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_PackedStringArray_operator_eq_PackedStringArray>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`String<class_String>`\ s at the corresponding indices. @@ -473,7 +477,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`String<class_String>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`String<class_String>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedStringArray_operator_idx_int>` Returns the :ref:`String<class_String>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -484,3 +488,4 @@ Returns the :ref:`String<class_String>` at index ``index``. Negative indices can .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedvector2array.rst b/classes/class_packedvector2array.rst index 35874ee6c2f..33783faf019 100644 --- a/classes/class_packedvector2array.rst +++ b/classes/class_packedvector2array.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Vector2<class_Vector2>`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedVector3Array<class_PackedVector3Array>` versus ``Array[Vector2]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedVector2Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -28,7 +32,7 @@ An array specifically designed to hold :ref:`Vector2<class_Vector2>`. Packs data Tutorials --------- -- `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__ +- `Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__ .. rst-class:: classref-reftable-group @@ -38,13 +42,13 @@ Constructors .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>` **(** :ref:`Array<class_Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>`\ (\ from\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`PackedVector2Array<class_PackedVector2Array_constructor_PackedVector2Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -54,49 +58,49 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedVector2Array_method_append>` **(** :ref:`Vector2<class_Vector2>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedVector2Array_method_append_array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` array **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedVector2Array_method_bsearch>` **(** :ref:`Vector2<class_Vector2>` value, :ref:`bool<class_bool>` before=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedVector2Array_method_clear>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedVector2Array_method_count>` **(** :ref:`Vector2<class_Vector2>` value **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`duplicate<class_PackedVector2Array_method_duplicate>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedVector2Array_method_fill>` **(** :ref:`Vector2<class_Vector2>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedVector2Array_method_find>` **(** :ref:`Vector2<class_Vector2>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedVector2Array_method_has>` **(** :ref:`Vector2<class_Vector2>` value **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedVector2Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`Vector2<class_Vector2>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedVector2Array_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedVector2Array_method_push_back>` **(** :ref:`Vector2<class_Vector2>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedVector2Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedVector2Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedVector2Array_method_reverse>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedVector2Array_method_rfind>` **(** :ref:`Vector2<class_Vector2>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedVector2Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`Vector2<class_Vector2>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedVector2Array_method_size>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`slice<class_PackedVector2Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedVector2Array_method_sort>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedVector2Array_method_to_byte_array>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedVector2Array_method_append>`\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedVector2Array_method_append_array>`\ (\ array\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedVector2Array_method_bsearch>`\ (\ value\: :ref:`Vector2<class_Vector2>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedVector2Array_method_clear>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedVector2Array_method_count>`\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`duplicate<class_PackedVector2Array_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedVector2Array_method_fill>`\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedVector2Array_method_find>`\ (\ value\: :ref:`Vector2<class_Vector2>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedVector2Array_method_has>`\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedVector2Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedVector2Array_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedVector2Array_method_push_back>`\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedVector2Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedVector2Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedVector2Array_method_reverse>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedVector2Array_method_rfind>`\ (\ value\: :ref:`Vector2<class_Vector2>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedVector2Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedVector2Array_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`slice<class_PackedVector2Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedVector2Array_method_sort>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedVector2Array_method_to_byte_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -106,17 +110,17 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedVector2Array_operator_neq_PackedVector2Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator *<class_PackedVector2Array_operator_mul_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator +<class_PackedVector2Array_operator_sum_PackedVector2Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedVector2Array_operator_eq_PackedVector2Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator []<class_PackedVector2Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedVector2Array_operator_neq_PackedVector2Array>`\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator *<class_PackedVector2Array_operator_mul_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator +<class_PackedVector2Array_operator_sum_PackedVector2Array>`\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedVector2Array_operator_eq_PackedVector2Array>`\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator []<class_PackedVector2Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,7 +135,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array** **(** **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array**\ (\ ) :ref:`🔗<class_PackedVector2Array_constructor_PackedVector2Array>` Constructs an empty **PackedVector2Array**. @@ -141,7 +145,7 @@ Constructs an empty **PackedVector2Array**. .. rst-class:: classref-constructor -:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` from **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array**\ (\ from\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) Constructs a **PackedVector2Array** as a copy of the given **PackedVector2Array**. @@ -151,7 +155,7 @@ Constructs a **PackedVector2Array** as a copy of the given **PackedVector2Array* .. rst-class:: classref-constructor -:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **PackedVector2Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedVector2Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -174,7 +178,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`Vector2<class_Vector2>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PackedVector2Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedVector2Array_method_push_back>`). @@ -186,7 +190,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_PackedVector2Array_method_append_array>` Appends a **PackedVector2Array** at the end of this array. @@ -198,7 +202,7 @@ Appends a **PackedVector2Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`Vector2<class_Vector2>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`Vector2<class_Vector2>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedVector2Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -214,7 +218,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedVector2Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedVector2Array_method_resize>` with a size of ``0``. @@ -226,7 +230,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedVector2Ar .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`Vector2<class_Vector2>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PackedVector2Array_method_count>` Returns the number of times an element is in the array. @@ -240,7 +244,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **duplicate** **(** **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedVector2Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -252,7 +256,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`Vector2<class_Vector2>` value **)** +|void| **fill**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PackedVector2Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedVector2Array_method_resize>` to create an array with a given size and initialized elements. @@ -264,7 +268,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`Vector2<class_Vector2>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`Vector2<class_Vector2>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedVector2Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -278,7 +282,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`Vector2<class_Vector2>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PackedVector2Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -292,7 +296,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`Vector2<class_Vector2>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PackedVector2Array_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -304,7 +308,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedVector2Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -316,7 +320,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`Vector2<class_Vector2>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PackedVector2Array_method_push_back>` Inserts a :ref:`Vector2<class_Vector2>` at the end. @@ -328,7 +332,7 @@ Inserts a :ref:`Vector2<class_Vector2>` at the end. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector2Array_method_remove_at>` Removes an element from the array by index. @@ -340,9 +344,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector2Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedVector2Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -352,7 +356,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedVector2Array_method_reverse>` Reverses the order of the elements in the array. @@ -364,7 +368,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`Vector2<class_Vector2>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`Vector2<class_Vector2>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedVector2Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -378,7 +382,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`Vector2<class_Vector2>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PackedVector2Array_method_set>` Changes the :ref:`Vector2<class_Vector2>` at the given index. @@ -390,7 +394,7 @@ Changes the :ref:`Vector2<class_Vector2>` at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedVector2Array_method_size>` Returns the number of elements in the array. @@ -402,7 +406,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedVector2Array_method_slice>` Returns the slice of the **PackedVector2Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedVector2Array**. @@ -418,7 +422,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedVector2Array_method_sort>` Sorts the elements of the array in ascending order. @@ -432,7 +436,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedVector2Array_method_to_byte_array>` Returns a :ref:`PackedByteArray<class_PackedByteArray>` with each vector encoded as bytes. @@ -449,7 +453,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_PackedVector2Array_operator_neq_PackedVector2Array>` Returns ``true`` if contents of the arrays differ. @@ -461,9 +465,13 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedVector2Array<class_PackedVector2Array>` **operator *** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **operator ***\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_PackedVector2Array_operator_mul_Transform2D>` + +Returns a new **PackedVector2Array** with all vectors in this array inversely transformed (multiplied) by the given :ref:`Transform2D<class_Transform2D>` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform2D.inverse<class_Transform2D_method_inverse>`. -Transforms (multiplies) all vectors in the array by the :ref:`Transform2D<class_Transform2D>` matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform2D.affine_inverse<class_Transform2D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -473,7 +481,7 @@ Transforms (multiplies) all vectors in the array by the :ref:`Transform2D<class_ .. rst-class:: classref-operator -:ref:`PackedVector2Array<class_PackedVector2Array>` **operator +** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **operator +**\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_PackedVector2Array_operator_sum_PackedVector2Array>` Returns a new **PackedVector2Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedVector2Array_method_append_array>` instead. @@ -485,7 +493,7 @@ Returns a new **PackedVector2Array** with contents of ``right`` added at the end .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_PackedVector2Array_operator_eq_PackedVector2Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector2<class_Vector2>`\ s at the corresponding indices. @@ -497,7 +505,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`Vector2<class_Vector2>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector2Array_operator_idx_int>` Returns the :ref:`Vector2<class_Vector2>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -508,3 +516,4 @@ Returns the :ref:`Vector2<class_Vector2>` at index ``index``. Negative indices c .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedvector3array.rst b/classes/class_packedvector3array.rst index e6072f8f31a..9b667b549ed 100644 --- a/classes/class_packedvector3array.rst +++ b/classes/class_packedvector3array.rst @@ -19,6 +19,10 @@ Description An array specifically designed to hold :ref:`Vector3<class_Vector3>`. Packs data tightly, so it saves memory for large array sizes. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. **PackedVector3Array** versus ``Array[Vector3]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedVector3Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -31,13 +35,13 @@ Constructors .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>` **(** :ref:`Array<class_Array>` from **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>`\ (\ from\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`PackedVector3Array<class_PackedVector3Array_constructor_PackedVector3Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -47,49 +51,49 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`append<class_PackedVector3Array_method_append>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_array<class_PackedVector3Array_method_append_array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` array **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bsearch<class_PackedVector3Array_method_bsearch>` **(** :ref:`Vector3<class_Vector3>` value, :ref:`bool<class_bool>` before=true **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PackedVector3Array_method_clear>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_PackedVector3Array_method_count>` **(** :ref:`Vector3<class_Vector3>` value **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`duplicate<class_PackedVector3Array_method_duplicate>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill<class_PackedVector3Array_method_fill>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_PackedVector3Array_method_find>` **(** :ref:`Vector3<class_Vector3>` value, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_PackedVector3Array_method_has>` **(** :ref:`Vector3<class_Vector3>` value **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`insert<class_PackedVector3Array_method_insert>` **(** :ref:`int<class_int>` at_index, :ref:`Vector3<class_Vector3>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedVector3Array_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedVector3Array_method_push_back>` **(** :ref:`Vector3<class_Vector3>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_at<class_PackedVector3Array_method_remove_at>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`resize<class_PackedVector3Array_method_resize>` **(** :ref:`int<class_int>` new_size **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reverse<class_PackedVector3Array_method_reverse>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_PackedVector3Array_method_rfind>` **(** :ref:`Vector3<class_Vector3>` value, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set<class_PackedVector3Array_method_set>` **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` value **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`size<class_PackedVector3Array_method_size>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`slice<class_PackedVector3Array_method_slice>` **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sort<class_PackedVector3Array_method_sort>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedVector3Array_method_to_byte_array>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedVector3Array_method_append>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedVector3Array_method_append_array>`\ (\ array\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedVector3Array_method_bsearch>`\ (\ value\: :ref:`Vector3<class_Vector3>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedVector3Array_method_clear>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedVector3Array_method_count>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`duplicate<class_PackedVector3Array_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedVector3Array_method_fill>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedVector3Array_method_find>`\ (\ value\: :ref:`Vector3<class_Vector3>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedVector3Array_method_has>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedVector3Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedVector3Array_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedVector3Array_method_push_back>`\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedVector3Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedVector3Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedVector3Array_method_reverse>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedVector3Array_method_rfind>`\ (\ value\: :ref:`Vector3<class_Vector3>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedVector3Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedVector3Array_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`slice<class_PackedVector3Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedVector3Array_method_sort>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedVector3Array_method_to_byte_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -99,17 +103,17 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedVector3Array_operator_neq_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator *<class_PackedVector3Array_operator_mul_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator +<class_PackedVector3Array_operator_sum_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedVector3Array_operator_eq_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator []<class_PackedVector3Array_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedVector3Array_operator_neq_PackedVector3Array>`\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator *<class_PackedVector3Array_operator_mul_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator +<class_PackedVector3Array_operator_sum_PackedVector3Array>`\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedVector3Array_operator_eq_PackedVector3Array>`\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator []<class_PackedVector3Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +128,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array** **(** **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array**\ (\ ) :ref:`🔗<class_PackedVector3Array_constructor_PackedVector3Array>` Constructs an empty **PackedVector3Array**. @@ -134,7 +138,7 @@ Constructs an empty **PackedVector3Array**. .. rst-class:: classref-constructor -:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` from **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array**\ (\ from\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) Constructs a **PackedVector3Array** as a copy of the given **PackedVector3Array**. @@ -144,7 +148,7 @@ Constructs a **PackedVector3Array** as a copy of the given **PackedVector3Array* .. rst-class:: classref-constructor -:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array** **(** :ref:`Array<class_Array>` from **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **PackedVector3Array**\ (\ from\: :ref:`Array<class_Array>`\ ) Constructs a new **PackedVector3Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. @@ -167,7 +171,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **append** **(** :ref:`Vector3<class_Vector3>` value **)** +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PackedVector3Array_method_append>` Appends an element at the end of the array (alias of :ref:`push_back<class_PackedVector3Array_method_push_back>`). @@ -179,7 +183,7 @@ Appends an element at the end of the array (alias of :ref:`push_back<class_Packe .. rst-class:: classref-method -void **append_array** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` array **)** +|void| **append_array**\ (\ array\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_PackedVector3Array_method_append_array>` Appends a **PackedVector3Array** at the end of this array. @@ -191,7 +195,7 @@ Appends a **PackedVector3Array** at the end of this array. .. rst-class:: classref-method -:ref:`int<class_int>` **bsearch** **(** :ref:`Vector3<class_Vector3>` value, :ref:`bool<class_bool>` before=true **)** +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`Vector3<class_Vector3>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedVector3Array_method_bsearch>` Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. @@ -207,7 +211,7 @@ Finds the index of an existing value (or the insertion index that maintains sort .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_PackedVector3Array_method_clear>` Clears the array. This is equivalent to using :ref:`resize<class_PackedVector3Array_method_resize>` with a size of ``0``. @@ -219,7 +223,7 @@ Clears the array. This is equivalent to using :ref:`resize<class_PackedVector3Ar .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`Vector3<class_Vector3>` value **)** |const| +:ref:`int<class_int>` **count**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_PackedVector3Array_method_count>` Returns the number of times an element is in the array. @@ -233,7 +237,7 @@ Returns the number of times an element is in the array. .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **duplicate** **(** **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedVector3Array_method_duplicate>` Creates a copy of the array, and returns it. @@ -245,7 +249,7 @@ Creates a copy of the array, and returns it. .. rst-class:: classref-method -void **fill** **(** :ref:`Vector3<class_Vector3>` value **)** +|void| **fill**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PackedVector3Array_method_fill>` Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedVector3Array_method_resize>` to create an array with a given size and initialized elements. @@ -257,7 +261,7 @@ Assigns the given value to all elements in the array. This can typically be used .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`Vector3<class_Vector3>` value, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ value\: :ref:`Vector3<class_Vector3>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedVector3Array_method_find>` Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. @@ -271,7 +275,7 @@ Searches the array for a value and returns its index or ``-1`` if not found. Opt .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`Vector3<class_Vector3>` value **)** |const| +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_PackedVector3Array_method_has>` Returns ``true`` if the array contains ``value``. @@ -285,7 +289,7 @@ Returns ``true`` if the array contains ``value``. .. rst-class:: classref-method -:ref:`int<class_int>` **insert** **(** :ref:`int<class_int>` at_index, :ref:`Vector3<class_Vector3>` value **)** +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PackedVector3Array_method_insert>` Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). @@ -297,7 +301,7 @@ Inserts a new element at a given position in the array. The position must be val .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedVector3Array_method_is_empty>` Returns ``true`` if the array is empty. @@ -309,7 +313,7 @@ Returns ``true`` if the array is empty. .. rst-class:: classref-method -:ref:`bool<class_bool>` **push_back** **(** :ref:`Vector3<class_Vector3>` value **)** +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PackedVector3Array_method_push_back>` Inserts a :ref:`Vector3<class_Vector3>` at the end. @@ -321,7 +325,7 @@ Inserts a :ref:`Vector3<class_Vector3>` at the end. .. rst-class:: classref-method -void **remove_at** **(** :ref:`int<class_int>` index **)** +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector3Array_method_remove_at>` Removes an element from the array by index. @@ -333,9 +337,9 @@ Removes an element from the array by index. .. rst-class:: classref-method -:ref:`int<class_int>` **resize** **(** :ref:`int<class_int>` new_size **)** +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector3Array_method_resize>` -Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. Calling :ref:`resize<class_PackedVector3Array_method_resize>` once and assigning the new values is faster than adding new elements one by one. .. rst-class:: classref-item-separator @@ -345,7 +349,7 @@ Sets the size of the array. If the array is grown, reserves elements at the end .. rst-class:: classref-method -void **reverse** **(** **)** +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedVector3Array_method_reverse>` Reverses the order of the elements in the array. @@ -357,7 +361,7 @@ Reverses the order of the elements in the array. .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`Vector3<class_Vector3>` value, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`Vector3<class_Vector3>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedVector3Array_method_rfind>` Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. @@ -371,7 +375,7 @@ Searches the array in reverse order. Optionally, a start search index can be pas .. rst-class:: classref-method -void **set** **(** :ref:`int<class_int>` index, :ref:`Vector3<class_Vector3>` value **)** +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PackedVector3Array_method_set>` Changes the :ref:`Vector3<class_Vector3>` at the given index. @@ -383,7 +387,7 @@ Changes the :ref:`Vector3<class_Vector3>` at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **size** **(** **)** |const| +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedVector3Array_method_size>` Returns the number of elements in the array. @@ -395,7 +399,7 @@ Returns the number of elements in the array. .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **slice** **(** :ref:`int<class_int>` begin, :ref:`int<class_int>` end=2147483647 **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedVector3Array_method_slice>` Returns the slice of the **PackedVector3Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedVector3Array**. @@ -411,7 +415,7 @@ If either ``begin`` or ``end`` are negative, they will be relative to the end of .. rst-class:: classref-method -void **sort** **(** **)** +|void| **sort**\ (\ ) :ref:`🔗<class_PackedVector3Array_method_sort>` Sorts the elements of the array in ascending order. @@ -425,7 +429,7 @@ Sorts the elements of the array in ascending order. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedVector3Array_method_to_byte_array>` Returns a :ref:`PackedByteArray<class_PackedByteArray>` with each vector encoded as bytes. @@ -442,7 +446,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_PackedVector3Array_operator_neq_PackedVector3Array>` Returns ``true`` if contents of the arrays differ. @@ -454,9 +458,13 @@ Returns ``true`` if contents of the arrays differ. .. rst-class:: classref-operator -:ref:`PackedVector3Array<class_PackedVector3Array>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **operator ***\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PackedVector3Array_operator_mul_Transform3D>` + +Returns a new **PackedVector3Array** with all vectors in this array inversely transformed (multiplied) by the given :ref:`Transform3D<class_Transform3D>` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``array * transform`` is equivalent to ``transform.inverse() * array``. See :ref:`Transform3D.inverse<class_Transform3D_method_inverse>`. -Transforms (multiplies) all vectors in the array by the :ref:`Transform3D<class_Transform3D>` matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * array`` can be used instead. See :ref:`Transform3D.affine_inverse<class_Transform3D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -466,7 +474,7 @@ Transforms (multiplies) all vectors in the array by the :ref:`Transform3D<class_ .. rst-class:: classref-operator -:ref:`PackedVector3Array<class_PackedVector3Array>` **operator +** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **operator +**\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_PackedVector3Array_operator_sum_PackedVector3Array>` Returns a new **PackedVector3Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedVector3Array_method_append_array>` instead. @@ -478,7 +486,7 @@ Returns a new **PackedVector3Array** with contents of ``right`` added at the end .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_PackedVector3Array_operator_eq_PackedVector3Array>` Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector3<class_Vector3>`\ s at the corresponding indices. @@ -490,7 +498,7 @@ Returns ``true`` if contents of both arrays are the same, i.e. they have all equ .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`Vector3<class_Vector3>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector3Array_operator_idx_int>` Returns the :ref:`Vector3<class_Vector3>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. @@ -501,3 +509,4 @@ Returns the :ref:`Vector3<class_Vector3>` at index ``index``. Negative indices c .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packedvector4array.rst b/classes/class_packedvector4array.rst new file mode 100644 index 00000000000..1ddf1682fac --- /dev/null +++ b/classes/class_packedvector4array.rst @@ -0,0 +1,492 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PackedVector4Array.xml. + +.. _class_PackedVector4Array: + +PackedVector4Array +================== + +A packed array of :ref:`Vector4<class_Vector4>`\ s. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An array specifically designed to hold :ref:`Vector4<class_Vector4>`. Packs data tightly, so it saves memory for large array sizes. + +\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedVector4Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + +.. note:: + + There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + +.. rst-class:: classref-reftable-group + +Constructors +------------ + +.. table:: + :widths: auto + + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`PackedVector4Array<class_PackedVector4Array_constructor_PackedVector4Array>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`PackedVector4Array<class_PackedVector4Array_constructor_PackedVector4Array>`\ (\ from\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`PackedVector4Array<class_PackedVector4Array_constructor_PackedVector4Array>`\ (\ from\: :ref:`Array<class_Array>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`append<class_PackedVector4Array_method_append>`\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_array<class_PackedVector4Array_method_append_array>`\ (\ array\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bsearch<class_PackedVector4Array_method_bsearch>`\ (\ value\: :ref:`Vector4<class_Vector4>`, before\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PackedVector4Array_method_clear>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_PackedVector4Array_method_count>`\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`duplicate<class_PackedVector4Array_method_duplicate>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fill<class_PackedVector4Array_method_fill>`\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_PackedVector4Array_method_find>`\ (\ value\: :ref:`Vector4<class_Vector4>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_PackedVector4Array_method_has>`\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`insert<class_PackedVector4Array_method_insert>`\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector4<class_Vector4>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_PackedVector4Array_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`push_back<class_PackedVector4Array_method_push_back>`\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_at<class_PackedVector4Array_method_remove_at>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`resize<class_PackedVector4Array_method_resize>`\ (\ new_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reverse<class_PackedVector4Array_method_reverse>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_PackedVector4Array_method_rfind>`\ (\ value\: :ref:`Vector4<class_Vector4>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set<class_PackedVector4Array_method_set>`\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector4<class_Vector4>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`size<class_PackedVector4Array_method_size>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`slice<class_PackedVector4Array_method_slice>`\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sort<class_PackedVector4Array_method_sort>`\ (\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_byte_array<class_PackedVector4Array_method_to_byte_array>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Operators +--------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_PackedVector4Array_operator_neq_PackedVector4Array>`\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector4Array<class_PackedVector4Array>` | :ref:`operator +<class_PackedVector4Array_operator_sum_PackedVector4Array>`\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_PackedVector4Array_operator_eq_PackedVector4Array>`\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator []<class_PackedVector4Array_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constructor Descriptions +------------------------ + +.. _class_PackedVector4Array_constructor_PackedVector4Array: + +.. rst-class:: classref-constructor + +:ref:`PackedVector4Array<class_PackedVector4Array>` **PackedVector4Array**\ (\ ) :ref:`🔗<class_PackedVector4Array_constructor_PackedVector4Array>` + +Constructs an empty **PackedVector4Array**. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`PackedVector4Array<class_PackedVector4Array>` **PackedVector4Array**\ (\ from\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) + +Constructs a **PackedVector4Array** as a copy of the given **PackedVector4Array**. + +.. rst-class:: classref-item-separator + +---- + +.. rst-class:: classref-constructor + +:ref:`PackedVector4Array<class_PackedVector4Array>` **PackedVector4Array**\ (\ from\: :ref:`Array<class_Array>`\ ) + +Constructs a new **PackedVector4Array**. Optionally, you can pass in a generic :ref:`Array<class_Array>` that will be converted. + +\ **Note:** When initializing a **PackedVector4Array** with elements, it must be initialized with an :ref:`Array<class_Array>` of :ref:`Vector4<class_Vector4>` values: + +:: + + var array = PackedVector4Array([Vector4(12, 34, 56, 78), Vector4(90, 12, 34, 56)]) + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_PackedVector4Array_method_append: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **append**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_PackedVector4Array_method_append>` + +Appends an element at the end of the array (alias of :ref:`push_back<class_PackedVector4Array_method_push_back>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_append_array: + +.. rst-class:: classref-method + +|void| **append_array**\ (\ array\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) :ref:`🔗<class_PackedVector4Array_method_append_array>` + +Appends a **PackedVector4Array** at the end of this array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_bsearch: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **bsearch**\ (\ value\: :ref:`Vector4<class_Vector4>`, before\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_PackedVector4Array_method_bsearch>` + +Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a ``before`` specifier can be passed. If ``false``, the returned index comes after all existing entries of the value in the array. + +\ **Note:** Calling :ref:`bsearch<class_PackedVector4Array_method_bsearch>` on an unsorted array results in unexpected behavior. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗<class_PackedVector4Array_method_clear>` + +Clears the array. This is equivalent to using :ref:`resize<class_PackedVector4Array_method_resize>` with a size of ``0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **count**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_PackedVector4Array_method_count>` + +Returns the number of times an element is in the array. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_duplicate: + +.. rst-class:: classref-method + +:ref:`PackedVector4Array<class_PackedVector4Array>` **duplicate**\ (\ ) :ref:`🔗<class_PackedVector4Array_method_duplicate>` + +Creates a copy of the array, and returns it. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_fill: + +.. rst-class:: classref-method + +|void| **fill**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_PackedVector4Array_method_fill>` + +Assigns the given value to all elements in the array. This can typically be used together with :ref:`resize<class_PackedVector4Array_method_resize>` to create an array with a given size and initialized elements. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_find: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **find**\ (\ value\: :ref:`Vector4<class_Vector4>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PackedVector4Array_method_find>` + +Searches the array for a value and returns its index or ``-1`` if not found. Optionally, the initial search index can be passed. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_has: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_PackedVector4Array_method_has>` + +Returns ``true`` if the array contains ``value``. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_insert: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **insert**\ (\ at_index\: :ref:`int<class_int>`, value\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_PackedVector4Array_method_insert>` + +Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``idx == size()``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_is_empty: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_PackedVector4Array_method_is_empty>` + +Returns ``true`` if the array is empty. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_push_back: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **push_back**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_PackedVector4Array_method_push_back>` + +Inserts a :ref:`Vector4<class_Vector4>` at the end. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_remove_at: + +.. rst-class:: classref-method + +|void| **remove_at**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector4Array_method_remove_at>` + +Removes an element from the array by index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_resize: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **resize**\ (\ new_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector4Array_method_resize>` + +Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_reverse: + +.. rst-class:: classref-method + +|void| **reverse**\ (\ ) :ref:`🔗<class_PackedVector4Array_method_reverse>` + +Reverses the order of the elements in the array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_rfind: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **rfind**\ (\ value\: :ref:`Vector4<class_Vector4>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_PackedVector4Array_method_rfind>` + +Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_set: + +.. rst-class:: classref-method + +|void| **set**\ (\ index\: :ref:`int<class_int>`, value\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_PackedVector4Array_method_set>` + +Changes the :ref:`Vector4<class_Vector4>` at the given index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_size: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **size**\ (\ ) |const| :ref:`🔗<class_PackedVector4Array_method_size>` + +Returns the number of elements in the array. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_slice: + +.. rst-class:: classref-method + +:ref:`PackedVector4Array<class_PackedVector4Array>` **slice**\ (\ begin\: :ref:`int<class_int>`, end\: :ref:`int<class_int>` = 2147483647\ ) |const| :ref:`🔗<class_PackedVector4Array_method_slice>` + +Returns the slice of the **PackedVector4Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **PackedVector4Array**. + +The absolute value of ``begin`` and ``end`` will be clamped to the array size, so the default value for ``end`` makes it slice to the size of the array by default (i.e. ``arr.slice(1)`` is a shorthand for ``arr.slice(1, arr.size())``). + +If either ``begin`` or ``end`` are negative, they will be relative to the end of the array (i.e. ``arr.slice(0, -2)`` is a shorthand for ``arr.slice(0, arr.size() - 2)``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_sort: + +.. rst-class:: classref-method + +|void| **sort**\ (\ ) :ref:`🔗<class_PackedVector4Array_method_sort>` + +Sorts the elements of the array in ascending order. + +\ **Note:** Vectors with :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>` elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_method_to_byte_array: + +.. rst-class:: classref-method + +:ref:`PackedByteArray<class_PackedByteArray>` **to_byte_array**\ (\ ) |const| :ref:`🔗<class_PackedVector4Array_method_to_byte_array>` + +Returns a :ref:`PackedByteArray<class_PackedByteArray>` with each vector encoded as bytes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Operator Descriptions +--------------------- + +.. _class_PackedVector4Array_operator_neq_PackedVector4Array: + +.. rst-class:: classref-operator + +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) :ref:`🔗<class_PackedVector4Array_operator_neq_PackedVector4Array>` + +Returns ``true`` if contents of the arrays differ. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_operator_sum_PackedVector4Array: + +.. rst-class:: classref-operator + +:ref:`PackedVector4Array<class_PackedVector4Array>` **operator +**\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) :ref:`🔗<class_PackedVector4Array_operator_sum_PackedVector4Array>` + +Returns a new **PackedVector4Array** with contents of ``right`` added at the end of this array. For better performance, consider using :ref:`append_array<class_PackedVector4Array_method_append_array>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_operator_eq_PackedVector4Array: + +.. rst-class:: classref-operator + +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`PackedVector4Array<class_PackedVector4Array>`\ ) :ref:`🔗<class_PackedVector4Array_operator_eq_PackedVector4Array>` + +Returns ``true`` if contents of both arrays are the same, i.e. they have all equal :ref:`Vector4<class_Vector4>`\ s at the corresponding indices. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PackedVector4Array_operator_idx_int: + +.. rst-class:: classref-operator + +:ref:`Vector4<class_Vector4>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PackedVector4Array_operator_idx_int>` + +Returns the :ref:`Vector4<class_Vector4>` at index ``index``. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packetpeer.rst b/classes/class_packetpeer.rst index 6a883200da7..88180b22ac2 100644 --- a/classes/class_packetpeer.rst +++ b/classes/class_packetpeer.rst @@ -45,19 +45,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_available_packet_count<class_PacketPeer_method_get_available_packet_count>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_packet<class_PacketPeer_method_get_packet>` **(** **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_packet_error<class_PacketPeer_method_get_packet_error>` **(** **)** |const| | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_var<class_PacketPeer_method_get_var>` **(** :ref:`bool<class_bool>` allow_objects=false **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_packet<class_PacketPeer_method_put_packet>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_var<class_PacketPeer_method_put_var>` **(** :ref:`Variant<class_Variant>` var, :ref:`bool<class_bool>` full_objects=false **)** | - +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_available_packet_count<class_PacketPeer_method_get_available_packet_count>`\ (\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_packet<class_PacketPeer_method_get_packet>`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`get_packet_error<class_PacketPeer_method_get_packet_error>`\ (\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_var<class_PacketPeer_method_get_var>`\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_packet<class_PacketPeer_method_put_packet>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_var<class_PacketPeer_method_put_var>`\ (\ var\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,16 +72,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **encode_buffer_max_size** = ``8388608`` +:ref:`int<class_int>` **encode_buffer_max_size** = ``8388608`` :ref:`🔗<class_PacketPeer_property_encode_buffer_max_size>` .. rst-class:: classref-property-setget -- void **set_encode_buffer_max_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_encode_buffer_max_size** **(** **)** +- |void| **set_encode_buffer_max_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_encode_buffer_max_size**\ (\ ) Maximum buffer size allowed when encoding :ref:`Variant<class_Variant>`\ s. Raise this value to support heavier memory allocations. -The :ref:`put_var<class_PacketPeer_method_put_var>` method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the :ref:`Variant<class_Variant>`. If the :ref:`Variant<class_Variant>` is bigger than ``encode_buffer_max_size``, the method will error out with :ref:`@GlobalScope.ERR_OUT_OF_MEMORY<class_@GlobalScope_constant_ERR_OUT_OF_MEMORY>`. +The :ref:`put_var<class_PacketPeer_method_put_var>` method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the :ref:`Variant<class_Variant>`. If the :ref:`Variant<class_Variant>` is bigger than :ref:`encode_buffer_max_size<class_PacketPeer_property_encode_buffer_max_size>`, the method will error out with :ref:`@GlobalScope.ERR_OUT_OF_MEMORY<class_@GlobalScope_constant_ERR_OUT_OF_MEMORY>`. .. rst-class:: classref-section-separator @@ -96,7 +96,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_available_packet_count** **(** **)** |const| +:ref:`int<class_int>` **get_available_packet_count**\ (\ ) |const| :ref:`🔗<class_PacketPeer_method_get_available_packet_count>` Returns the number of packets currently available in the ring-buffer. @@ -108,7 +108,7 @@ Returns the number of packets currently available in the ring-buffer. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_packet** **(** **)** +:ref:`PackedByteArray<class_PackedByteArray>` **get_packet**\ (\ ) :ref:`🔗<class_PacketPeer_method_get_packet>` Gets a raw packet. @@ -120,7 +120,7 @@ Gets a raw packet. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **get_packet_error** **(** **)** |const| +:ref:`Error<enum_@GlobalScope_Error>` **get_packet_error**\ (\ ) |const| :ref:`🔗<class_PacketPeer_method_get_packet_error>` Returns the error state of the last packet received (via :ref:`get_packet<class_PacketPeer_method_get_packet>` and :ref:`get_var<class_PacketPeer_method_get_var>`). @@ -132,7 +132,7 @@ Returns the error state of the last packet received (via :ref:`get_packet<class_ .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_var** **(** :ref:`bool<class_bool>` allow_objects=false **)** +:ref:`Variant<class_Variant>` **get_var**\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PacketPeer_method_get_var>` Gets a Variant. If ``allow_objects`` is ``true``, decoding objects is allowed. @@ -148,7 +148,7 @@ Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.byte .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **put_packet** **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** +:ref:`Error<enum_@GlobalScope_Error>` **put_packet**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_PacketPeer_method_put_packet>` Sends a raw packet. @@ -160,7 +160,7 @@ Sends a raw packet. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **put_var** **(** :ref:`Variant<class_Variant>` var, :ref:`bool<class_bool>` full_objects=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **put_var**\ (\ var\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PacketPeer_method_put_var>` Sends a :ref:`Variant<class_Variant>` as a packet. If ``full_objects`` is ``true``, encoding objects is allowed (and can potentially include code). @@ -173,3 +173,4 @@ Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packetpeerdtls.rst b/classes/class_packetpeerdtls.rst index b9551d35313..8d5775e604e 100644 --- a/classes/class_packetpeerdtls.rst +++ b/classes/class_packetpeerdtls.rst @@ -33,15 +33,15 @@ Methods .. table:: :widths: auto - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_peer<class_PacketPeerDTLS_method_connect_to_peer>` **(** :ref:`PacketPeerUDP<class_PacketPeerUDP>` packet_peer, :ref:`String<class_String>` hostname, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_from_peer<class_PacketPeerDTLS_method_disconnect_from_peer>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status<enum_PacketPeerDTLS_Status>` | :ref:`get_status<class_PacketPeerDTLS_method_get_status>` **(** **)** |const| | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`poll<class_PacketPeerDTLS_method_poll>` **(** **)** | - +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_peer<class_PacketPeerDTLS_method_connect_to_peer>`\ (\ packet_peer\: :ref:`PacketPeerUDP<class_PacketPeerUDP>`, hostname\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_from_peer<class_PacketPeerDTLS_method_disconnect_from_peer>`\ (\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status<enum_PacketPeerDTLS_Status>` | :ref:`get_status<class_PacketPeerDTLS_method_get_status>`\ (\ ) |const| | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`poll<class_PacketPeerDTLS_method_poll>`\ (\ ) | + +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Status**: +enum **Status**: :ref:`🔗<enum_PacketPeerDTLS_Status>` .. _class_PacketPeerDTLS_constant_STATUS_DISCONNECTED: @@ -111,7 +111,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_peer** **(** :ref:`PacketPeerUDP<class_PacketPeerUDP>` packet_peer, :ref:`String<class_String>` hostname, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_peer**\ (\ packet_peer\: :ref:`PacketPeerUDP<class_PacketPeerUDP>`, hostname\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_PacketPeerDTLS_method_connect_to_peer>` Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :ref:`PacketPeerUDP<class_PacketPeerUDP>` which must be connected (see :ref:`PacketPeerUDP.connect_to_host<class_PacketPeerUDP_method_connect_to_host>`). You can optionally specify the ``client_options`` to be used while verifying the TLS connections. See :ref:`TLSOptions.client<class_TLSOptions_method_client>` and :ref:`TLSOptions.client_unsafe<class_TLSOptions_method_client_unsafe>`. @@ -123,7 +123,7 @@ Connects a ``packet_peer`` beginning the DTLS handshake using the underlying :re .. rst-class:: classref-method -void **disconnect_from_peer** **(** **)** +|void| **disconnect_from_peer**\ (\ ) :ref:`🔗<class_PacketPeerDTLS_method_disconnect_from_peer>` Disconnects this peer, terminating the DTLS session. @@ -135,7 +135,7 @@ Disconnects this peer, terminating the DTLS session. .. rst-class:: classref-method -:ref:`Status<enum_PacketPeerDTLS_Status>` **get_status** **(** **)** |const| +:ref:`Status<enum_PacketPeerDTLS_Status>` **get_status**\ (\ ) |const| :ref:`🔗<class_PacketPeerDTLS_method_get_status>` Returns the status of the connection. See :ref:`Status<enum_PacketPeerDTLS_Status>` for values. @@ -147,7 +147,7 @@ Returns the status of the connection. See :ref:`Status<enum_PacketPeerDTLS_Statu .. rst-class:: classref-method -void **poll** **(** **)** +|void| **poll**\ (\ ) :ref:`🔗<class_PacketPeerDTLS_method_poll>` Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. @@ -158,3 +158,4 @@ Poll the connection to check for incoming packets. Call this frequently to updat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packetpeerextension.rst b/classes/class_packetpeerextension.rst index 7b576b0caf2..d50c2bfef06 100644 --- a/classes/class_packetpeerextension.rst +++ b/classes/class_packetpeerextension.rst @@ -24,15 +24,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_PacketPeerExtension_method__get_available_packet_count>` **(** **)** |virtual| |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_PacketPeerExtension_method__get_max_packet_size>` **(** **)** |virtual| |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_PacketPeerExtension_method__get_packet>` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_PacketPeerExtension_method__put_packet>` **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_PacketPeerExtension_private_method__get_available_packet_count>`\ (\ ) |virtual| |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_PacketPeerExtension_private_method__get_max_packet_size>`\ (\ ) |virtual| |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_PacketPeerExtension_private_method__get_packet>`\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_PacketPeerExtension_private_method__put_packet>`\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,11 +43,11 @@ Methods Method Descriptions ------------------- -.. _class_PacketPeerExtension_method__get_available_packet_count: +.. _class_PacketPeerExtension_private_method__get_available_packet_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_available_packet_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_available_packet_count**\ (\ ) |virtual| |const| :ref:`🔗<class_PacketPeerExtension_private_method__get_available_packet_count>` .. container:: contribute @@ -57,11 +57,11 @@ Method Descriptions ---- -.. _class_PacketPeerExtension_method__get_max_packet_size: +.. _class_PacketPeerExtension_private_method__get_max_packet_size: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_max_packet_size** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_max_packet_size**\ (\ ) |virtual| |const| :ref:`🔗<class_PacketPeerExtension_private_method__get_max_packet_size>` .. container:: contribute @@ -71,11 +71,11 @@ Method Descriptions ---- -.. _class_PacketPeerExtension_method__get_packet: +.. _class_PacketPeerExtension_private_method__get_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_get_packet**\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_PacketPeerExtension_private_method__get_packet>` .. container:: contribute @@ -85,11 +85,11 @@ Method Descriptions ---- -.. _class_PacketPeerExtension_method__put_packet: +.. _class_PacketPeerExtension_private_method__put_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_packet**\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PacketPeerExtension_private_method__put_packet>` .. container:: contribute @@ -102,3 +102,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packetpeerstream.rst b/classes/class_packetpeerstream.rst index 1de903a9ccd..3b7d62d1742 100644 --- a/classes/class_packetpeerstream.rst +++ b/classes/class_packetpeerstream.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **input_buffer_max_size** = ``65532`` +:ref:`int<class_int>` **input_buffer_max_size** = ``65532`` :ref:`🔗<class_PacketPeerStream_property_input_buffer_max_size>` .. rst-class:: classref-property-setget -- void **set_input_buffer_max_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_input_buffer_max_size** **(** **)** +- |void| **set_input_buffer_max_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_input_buffer_max_size**\ (\ ) .. container:: contribute @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **output_buffer_max_size** = ``65532`` +:ref:`int<class_int>` **output_buffer_max_size** = ``65532`` :ref:`🔗<class_PacketPeerStream_property_output_buffer_max_size>` .. rst-class:: classref-property-setget -- void **set_output_buffer_max_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_output_buffer_max_size** **(** **)** +- |void| **set_output_buffer_max_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_output_buffer_max_size**\ (\ ) .. container:: contribute @@ -90,12 +90,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StreamPeer<class_StreamPeer>` **stream_peer** +:ref:`StreamPeer<class_StreamPeer>` **stream_peer** :ref:`🔗<class_PacketPeerStream_property_stream_peer>` .. rst-class:: classref-property-setget -- void **set_stream_peer** **(** :ref:`StreamPeer<class_StreamPeer>` value **)** -- :ref:`StreamPeer<class_StreamPeer>` **get_stream_peer** **(** **)** +- |void| **set_stream_peer**\ (\ value\: :ref:`StreamPeer<class_StreamPeer>`\ ) +- :ref:`StreamPeer<class_StreamPeer>` **get_stream_peer**\ (\ ) The wrapped :ref:`StreamPeer<class_StreamPeer>` object. @@ -106,3 +106,4 @@ The wrapped :ref:`StreamPeer<class_StreamPeer>` object. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_packetpeerudp.rst b/classes/class_packetpeerudp.rst index 08595acba54..745ea55799b 100644 --- a/classes/class_packetpeerudp.rst +++ b/classes/class_packetpeerudp.rst @@ -31,33 +31,33 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`bind<class_PacketPeerUDP_method_bind>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*", :ref:`int<class_int>` recv_buf_size=65536 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_PacketPeerUDP_method_close>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_PacketPeerUDP_method_connect_to_host>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_local_port<class_PacketPeerUDP_method_get_local_port>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_packet_ip<class_PacketPeerUDP_method_get_packet_ip>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_packet_port<class_PacketPeerUDP_method_get_packet_port>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_bound<class_PacketPeerUDP_method_is_bound>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_socket_connected<class_PacketPeerUDP_method_is_socket_connected>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`join_multicast_group<class_PacketPeerUDP_method_join_multicast_group>` **(** :ref:`String<class_String>` multicast_address, :ref:`String<class_String>` interface_name **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`leave_multicast_group<class_PacketPeerUDP_method_leave_multicast_group>` **(** :ref:`String<class_String>` multicast_address, :ref:`String<class_String>` interface_name **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_broadcast_enabled<class_PacketPeerUDP_method_set_broadcast_enabled>` **(** :ref:`bool<class_bool>` enabled **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_dest_address<class_PacketPeerUDP_method_set_dest_address>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`wait<class_PacketPeerUDP_method_wait>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`bind<class_PacketPeerUDP_method_bind>`\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*", recv_buf_size\: :ref:`int<class_int>` = 65536\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_PacketPeerUDP_method_close>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_PacketPeerUDP_method_connect_to_host>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_local_port<class_PacketPeerUDP_method_get_local_port>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_packet_ip<class_PacketPeerUDP_method_get_packet_ip>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_packet_port<class_PacketPeerUDP_method_get_packet_port>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_bound<class_PacketPeerUDP_method_is_bound>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_socket_connected<class_PacketPeerUDP_method_is_socket_connected>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`join_multicast_group<class_PacketPeerUDP_method_join_multicast_group>`\ (\ multicast_address\: :ref:`String<class_String>`, interface_name\: :ref:`String<class_String>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`leave_multicast_group<class_PacketPeerUDP_method_leave_multicast_group>`\ (\ multicast_address\: :ref:`String<class_String>`, interface_name\: :ref:`String<class_String>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_broadcast_enabled<class_PacketPeerUDP_method_set_broadcast_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_dest_address<class_PacketPeerUDP_method_set_dest_address>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`wait<class_PacketPeerUDP_method_wait>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +72,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **bind** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*", :ref:`int<class_int>` recv_buf_size=65536 **)** +:ref:`Error<enum_@GlobalScope_Error>` **bind**\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*", recv_buf_size\: :ref:`int<class_int>` = 65536\ ) :ref:`🔗<class_PacketPeerUDP_method_bind>` Binds this **PacketPeerUDP** to the specified ``port`` and ``bind_address`` with a buffer size ``recv_buf_size``, allowing it to receive incoming packets. @@ -80,7 +80,7 @@ If ``bind_address`` is set to ``"*"`` (default), the peer will be bound on all a If ``bind_address`` is set to ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the peer will be bound to all available addresses matching that IP type. -If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the peer will only be bound to the interface with that addresses (or fail if no interface with the given address exists). +If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc.), the peer will only be bound to the interface with that address (or fail if no interface with the given address exists). .. rst-class:: classref-item-separator @@ -90,7 +90,7 @@ If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``":: .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_PacketPeerUDP_method_close>` Closes the **PacketPeerUDP**'s underlying UDP socket. @@ -102,7 +102,7 @@ Closes the **PacketPeerUDP**'s underlying UDP socket. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PacketPeerUDP_method_connect_to_host>` Calling this method connects this UDP peer to the given ``host``/``port`` pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to :ref:`set_dest_address<class_PacketPeerUDP_method_set_dest_address>` are not allowed). This method does not send any data to the remote peer, to do that, use :ref:`PacketPeer.put_var<class_PacketPeer_method_put_var>` or :ref:`PacketPeer.put_packet<class_PacketPeer_method_put_packet>` as usual. See also :ref:`UDPServer<class_UDPServer>`. @@ -116,7 +116,7 @@ Calling this method connects this UDP peer to the given ``host``/``port`` pair. .. rst-class:: classref-method -:ref:`int<class_int>` **get_local_port** **(** **)** |const| +:ref:`int<class_int>` **get_local_port**\ (\ ) |const| :ref:`🔗<class_PacketPeerUDP_method_get_local_port>` Returns the local port to which this peer is bound. @@ -128,7 +128,7 @@ Returns the local port to which this peer is bound. .. rst-class:: classref-method -:ref:`String<class_String>` **get_packet_ip** **(** **)** |const| +:ref:`String<class_String>` **get_packet_ip**\ (\ ) |const| :ref:`🔗<class_PacketPeerUDP_method_get_packet_ip>` Returns the IP of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet<class_PacketPeer_method_get_packet>` or :ref:`PacketPeer.get_var<class_PacketPeer_method_get_var>`). @@ -140,7 +140,7 @@ Returns the IP of the remote peer that sent the last packet(that was received wi .. rst-class:: classref-method -:ref:`int<class_int>` **get_packet_port** **(** **)** |const| +:ref:`int<class_int>` **get_packet_port**\ (\ ) |const| :ref:`🔗<class_PacketPeerUDP_method_get_packet_port>` Returns the port of the remote peer that sent the last packet(that was received with :ref:`PacketPeer.get_packet<class_PacketPeer_method_get_packet>` or :ref:`PacketPeer.get_var<class_PacketPeer_method_get_var>`). @@ -152,7 +152,7 @@ Returns the port of the remote peer that sent the last packet(that was received .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_bound** **(** **)** |const| +:ref:`bool<class_bool>` **is_bound**\ (\ ) |const| :ref:`🔗<class_PacketPeerUDP_method_is_bound>` Returns whether this **PacketPeerUDP** is bound to an address and can receive packets. @@ -164,7 +164,7 @@ Returns whether this **PacketPeerUDP** is bound to an address and can receive pa .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_socket_connected** **(** **)** |const| +:ref:`bool<class_bool>` **is_socket_connected**\ (\ ) |const| :ref:`🔗<class_PacketPeerUDP_method_is_socket_connected>` Returns ``true`` if the UDP socket is open and has been connected to a remote address. See :ref:`connect_to_host<class_PacketPeerUDP_method_connect_to_host>`. @@ -176,7 +176,7 @@ Returns ``true`` if the UDP socket is open and has been connected to a remote ad .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **join_multicast_group** **(** :ref:`String<class_String>` multicast_address, :ref:`String<class_String>` interface_name **)** +:ref:`Error<enum_@GlobalScope_Error>` **join_multicast_group**\ (\ multicast_address\: :ref:`String<class_String>`, interface_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PacketPeerUDP_method_join_multicast_group>` Joins the multicast group specified by ``multicast_address`` using the interface identified by ``interface_name``. @@ -192,7 +192,7 @@ You can join the same multicast group with multiple interfaces. Use :ref:`IP.get .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **leave_multicast_group** **(** :ref:`String<class_String>` multicast_address, :ref:`String<class_String>` interface_name **)** +:ref:`Error<enum_@GlobalScope_Error>` **leave_multicast_group**\ (\ multicast_address\: :ref:`String<class_String>`, interface_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PacketPeerUDP_method_leave_multicast_group>` Removes the interface identified by ``interface_name`` from the multicast group specified by ``multicast_address``. @@ -204,7 +204,7 @@ Removes the interface identified by ``interface_name`` from the multicast group .. rst-class:: classref-method -void **set_broadcast_enabled** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_broadcast_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PacketPeerUDP_method_set_broadcast_enabled>` Enable or disable sending of broadcast packets (e.g. ``set_dest_address("255.255.255.255", 4343)``. This option is disabled by default. @@ -218,7 +218,7 @@ Enable or disable sending of broadcast packets (e.g. ``set_dest_address("255.255 .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **set_dest_address** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +:ref:`Error<enum_@GlobalScope_Error>` **set_dest_address**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PacketPeerUDP_method_set_dest_address>` Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. @@ -232,7 +232,7 @@ Sets the destination address and port for sending packets and variables. A hostn .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **wait** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **wait**\ (\ ) :ref:`🔗<class_PacketPeerUDP_method_wait>` Waits for a packet to arrive on the bound address. See :ref:`bind<class_PacketPeerUDP_method_bind>`. @@ -256,7 +256,7 @@ Waits for a packet to arrive on the bound address. See :ref:`bind<class_PacketPe .. code-tab:: csharp - var socket = new PacketPeerUDP(); + var socket = new PacketPeerUdp(); // Server socket.SetDestAddress("127.0.0.1", 789); socket.PutPacket("Time to stop".ToAsciiBuffer()); @@ -280,3 +280,4 @@ Waits for a packet to arrive on the bound address. See :ref:`bind<class_PacketPe .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_panel.rst b/classes/class_panel.rst index b66a115c2ed..c5ec36b1f2e 100644 --- a/classes/class_panel.rst +++ b/classes/class_panel.rst @@ -26,11 +26,9 @@ Description Tutorials --------- -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ -- `2D Finite State Machine Demo <https://godotengine.org/asset-library/asset/516>`__ - -- `3D Inverse Kinematics Demo <https://godotengine.org/asset-library/asset/523>`__ +- `Hierarchical Finite State Machine Demo <https://godotengine.org/asset-library/asset/2714>`__ .. rst-class:: classref-reftable-group @@ -57,7 +55,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_Panel_theme_style_panel>` The :ref:`StyleBox<class_StyleBox>` of this control. @@ -68,3 +66,4 @@ The :ref:`StyleBox<class_StyleBox>` of this control. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_panelcontainer.rst b/classes/class_panelcontainer.rst index 67886a98cbb..8505ed8780a 100644 --- a/classes/class_panelcontainer.rst +++ b/classes/class_panelcontainer.rst @@ -30,7 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ .. rst-class:: classref-reftable-group @@ -69,7 +69,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_PanelContainer_theme_style_panel>` The style of **PanelContainer**'s background. @@ -80,3 +80,4 @@ The style of **PanelContainer**'s background. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_panoramaskymaterial.rst b/classes/class_panoramaskymaterial.rst index b0c7d8769ca..0759e569aa0 100644 --- a/classes/class_panoramaskymaterial.rst +++ b/classes/class_panoramaskymaterial.rst @@ -12,14 +12,14 @@ PanoramaSkyMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A :ref:`Material<class_Material>` used with :ref:`Sky<class_Sky>` to draw a background texture. +A material that provides a special texture to a :ref:`Sky<class_Sky>`, usually an HDR panorama. .. rst-class:: classref-introduction-group Description ----------- -A resource referenced in a :ref:`Sky<class_Sky>` that is used to draw a background. The Panorama sky material functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cubemap. +A resource referenced in a :ref:`Sky<class_Sky>` that is used to draw a background. **PanoramaSkyMaterial** functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a :ref:`Cubemap<class_Cubemap>`. Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR (``.hdr``) and OpenEXR (``.exr``) image formats for this purpose. @@ -33,11 +33,13 @@ Properties .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`bool<class_bool>` | :ref:`filter<class_PanoramaSkyMaterial_property_filter>` | ``true`` | - +-----------------------------------+--------------------------------------------------------------+----------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`panorama<class_PanoramaSkyMaterial_property_panorama>` | | - +-----------------------------------+--------------------------------------------------------------+----------+ + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`float<class_float>` | :ref:`energy_multiplier<class_PanoramaSkyMaterial_property_energy_multiplier>` | ``1.0`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`bool<class_bool>` | :ref:`filter<class_PanoramaSkyMaterial_property_filter>` | ``true`` | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`panorama<class_PanoramaSkyMaterial_property_panorama>` | | + +-----------------------------------+--------------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -48,16 +50,33 @@ Properties Property Descriptions --------------------- +.. _class_PanoramaSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **energy_multiplier** = ``1.0`` :ref:`🔗<class_PanoramaSkyMaterial_property_energy_multiplier>` + +.. rst-class:: classref-property-setget + +- |void| **set_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_energy_multiplier**\ (\ ) + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_PanoramaSkyMaterial_property_filter: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filter** = ``true`` +:ref:`bool<class_bool>` **filter** = ``true`` :ref:`🔗<class_PanoramaSkyMaterial_property_filter>` .. rst-class:: classref-property-setget -- void **set_filtering_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_filtering_enabled** **(** **)** +- |void| **set_filtering_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_filtering_enabled**\ (\ ) A boolean value to determine if the background texture should be filtered or not. @@ -69,12 +88,12 @@ A boolean value to determine if the background texture should be filtered or not .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **panorama** +:ref:`Texture2D<class_Texture2D>` **panorama** :ref:`🔗<class_PanoramaSkyMaterial_property_panorama>` .. rst-class:: classref-property-setget -- void **set_panorama** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_panorama** **(** **)** +- |void| **set_panorama**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_panorama**\ (\ ) :ref:`Texture2D<class_Texture2D>` to be applied to the **PanoramaSkyMaterial**. @@ -85,3 +104,4 @@ A boolean value to determine if the background texture should be filtered or not .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_parallax2d.rst b/classes/class_parallax2d.rst new file mode 100644 index 00000000000..a8d7337406c --- /dev/null +++ b/classes/class_parallax2d.rst @@ -0,0 +1,246 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Parallax2D.xml. + +.. _class_Parallax2D: + +Parallax2D +========== + +**Experimental:** This node is meant to replace :ref:`ParallaxBackground<class_ParallaxBackground>` and :ref:`ParallaxLayer<class_ParallaxLayer>`. The implementation may change in the future. + +**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +A node used to create a parallax scrolling background. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A **Parallax2D** is used to create a parallax effect. It can move at a different speed relative to the camera movement using :ref:`scroll_scale<class_Parallax2D_property_scroll_scale>`. This creates an illusion of depth in a 2D game. If manual scrolling is desired, the :ref:`Camera2D<class_Camera2D>` position can be ignored with :ref:`ignore_camera_scroll<class_Parallax2D_property_ignore_camera_scroll>`. + +\ **Note:** Any changes to this node's position made after it enters the scene tree will be overridden if :ref:`ignore_camera_scroll<class_Parallax2D_property_ignore_camera_scroll>` is ``false`` or :ref:`screen_offset<class_Parallax2D_property_screen_offset>` is modified. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`autoscroll<class_Parallax2D_property_autoscroll>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`follow_viewport<class_Parallax2D_property_follow_viewport>` | ``true`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`ignore_camera_scroll<class_Parallax2D_property_ignore_camera_scroll>` | ``false`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`limit_begin<class_Parallax2D_property_limit_begin>` | ``Vector2(-1e+07, -1e+07)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`limit_end<class_Parallax2D_property_limit_end>` | ``Vector2(1e+07, 1e+07)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | physics_interpolation_mode | ``2`` (overrides :ref:`Node<class_Node_property_physics_interpolation_mode>`) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`repeat_size<class_Parallax2D_property_repeat_size>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`repeat_times<class_Parallax2D_property_repeat_times>` | ``1`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`screen_offset<class_Parallax2D_property_screen_offset>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`scroll_offset<class_Parallax2D_property_scroll_offset>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`scroll_scale<class_Parallax2D_property_scroll_scale>` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Parallax2D_property_autoscroll: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **autoscroll** = ``Vector2(0, 0)`` :ref:`🔗<class_Parallax2D_property_autoscroll>` + +.. rst-class:: classref-property-setget + +- |void| **set_autoscroll**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_autoscroll**\ (\ ) + +Velocity at which the offset scrolls automatically, in pixels per second. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_follow_viewport: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **follow_viewport** = ``true`` :ref:`🔗<class_Parallax2D_property_follow_viewport>` + +.. rst-class:: classref-property-setget + +- |void| **set_follow_viewport**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_follow_viewport**\ (\ ) + +If ``true``, this **Parallax2D** is offset by the current camera's position. If the **Parallax2D** is in a :ref:`CanvasLayer<class_CanvasLayer>` separate from the current camera, it may be desired to match the value with :ref:`CanvasLayer.follow_viewport_enabled<class_CanvasLayer_property_follow_viewport_enabled>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_ignore_camera_scroll: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **ignore_camera_scroll** = ``false`` :ref:`🔗<class_Parallax2D_property_ignore_camera_scroll>` + +.. rst-class:: classref-property-setget + +- |void| **set_ignore_camera_scroll**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ignore_camera_scroll**\ (\ ) + +If ``true``, **Parallax2D**'s position is not affected by the position of the camera. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_limit_begin: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **limit_begin** = ``Vector2(-1e+07, -1e+07)`` :ref:`🔗<class_Parallax2D_property_limit_begin>` + +.. rst-class:: classref-property-setget + +- |void| **set_limit_begin**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_limit_begin**\ (\ ) + +Top-left limits for scrolling to begin. If the camera is outside of this limit, the **Parallax2D** stops scrolling. Must be lower than :ref:`limit_end<class_Parallax2D_property_limit_end>` minus the viewport size to work. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_limit_end: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **limit_end** = ``Vector2(1e+07, 1e+07)`` :ref:`🔗<class_Parallax2D_property_limit_end>` + +.. rst-class:: classref-property-setget + +- |void| **set_limit_end**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_limit_end**\ (\ ) + +Bottom-right limits for scrolling to end. If the camera is outside of this limit, the **Parallax2D** will stop scrolling. Must be higher than :ref:`limit_begin<class_Parallax2D_property_limit_begin>` and the viewport size combined to work. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_repeat_size: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **repeat_size** = ``Vector2(0, 0)`` :ref:`🔗<class_Parallax2D_property_repeat_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_repeat_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_repeat_size**\ (\ ) + +Repeats the :ref:`Texture2D<class_Texture2D>` of each of this node's children and offsets them by this value. When scrolling, the node's position loops, giving the illusion of an infinite scrolling background if the values are larger than the screen size. If an axis is set to ``0``, the :ref:`Texture2D<class_Texture2D>` will not be repeated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_repeat_times: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **repeat_times** = ``1`` :ref:`🔗<class_Parallax2D_property_repeat_times>` + +.. rst-class:: classref-property-setget + +- |void| **set_repeat_times**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_repeat_times**\ (\ ) + +Overrides the amount of times the texture repeats. Each texture copy spreads evenly from the original by :ref:`repeat_size<class_Parallax2D_property_repeat_size>`. Useful for when zooming out with a camera. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_screen_offset: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **screen_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Parallax2D_property_screen_offset>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_screen_offset**\ (\ ) + +Offset used to scroll this **Parallax2D**. This value is updated automatically unless :ref:`ignore_camera_scroll<class_Parallax2D_property_ignore_camera_scroll>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_scroll_offset: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Parallax2D_property_scroll_offset>` + +.. rst-class:: classref-property-setget + +- |void| **set_scroll_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_offset**\ (\ ) + +The **Parallax2D**'s offset. Similar to :ref:`screen_offset<class_Parallax2D_property_screen_offset>` and :ref:`Node2D.position<class_Node2D_property_position>`, but will not be overridden. + +\ **Note:** Values will loop if :ref:`repeat_size<class_Parallax2D_property_repeat_size>` is set higher than ``0``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Parallax2D_property_scroll_scale: + +.. rst-class:: classref-property + +:ref:`Vector2<class_Vector2>` **scroll_scale** = ``Vector2(1, 1)`` :ref:`🔗<class_Parallax2D_property_scroll_scale>` + +.. rst-class:: classref-property-setget + +- |void| **set_scroll_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_scale**\ (\ ) + +Multiplier to the final **Parallax2D**'s offset. Can be used to simulate distance from the camera. + +For example, a value of ``1`` scrolls at the same speed as the camera. A value greater than ``1`` scrolls faster, making objects appear closer. Less than ``1`` scrolls slower, making objects appear further, and a value of ``0`` stops the objects completely. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_parallaxbackground.rst b/classes/class_parallaxbackground.rst index fcab0d205bc..a7c2621c574 100644 --- a/classes/class_parallaxbackground.rst +++ b/classes/class_parallaxbackground.rst @@ -60,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_base_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **scroll_base_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxBackground_property_scroll_base_offset>` .. rst-class:: classref-property-setget -- void **set_scroll_base_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_scroll_base_offset** **(** **)** +- |void| **set_scroll_base_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_base_offset**\ (\ ) The base position offset for all :ref:`ParallaxLayer<class_ParallaxLayer>` children. @@ -77,12 +77,12 @@ The base position offset for all :ref:`ParallaxLayer<class_ParallaxLayer>` child .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_base_scale** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **scroll_base_scale** = ``Vector2(1, 1)`` :ref:`🔗<class_ParallaxBackground_property_scroll_base_scale>` .. rst-class:: classref-property-setget -- void **set_scroll_base_scale** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_scroll_base_scale** **(** **)** +- |void| **set_scroll_base_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_base_scale**\ (\ ) The base motion scale for all :ref:`ParallaxLayer<class_ParallaxLayer>` children. @@ -94,12 +94,12 @@ The base motion scale for all :ref:`ParallaxLayer<class_ParallaxLayer>` children .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_ignore_camera_zoom** = ``false`` +:ref:`bool<class_bool>` **scroll_ignore_camera_zoom** = ``false`` :ref:`🔗<class_ParallaxBackground_property_scroll_ignore_camera_zoom>` .. rst-class:: classref-property-setget -- void **set_ignore_camera_zoom** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ignore_camera_zoom** **(** **)** +- |void| **set_ignore_camera_zoom**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ignore_camera_zoom**\ (\ ) If ``true``, elements in :ref:`ParallaxLayer<class_ParallaxLayer>` child aren't affected by the zoom level of the camera. @@ -111,12 +111,12 @@ If ``true``, elements in :ref:`ParallaxLayer<class_ParallaxLayer>` child aren't .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_limit_begin** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **scroll_limit_begin** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxBackground_property_scroll_limit_begin>` .. rst-class:: classref-property-setget -- void **set_limit_begin** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_limit_begin** **(** **)** +- |void| **set_limit_begin**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **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 :ref:`scroll_limit_end<class_ParallaxBackground_property_scroll_limit_end>` to work. @@ -128,12 +128,12 @@ Top-left limits for scrolling to begin. If the camera is outside of this limit, .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_limit_end** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **scroll_limit_end** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxBackground_property_scroll_limit_end>` .. rst-class:: classref-property-setget -- void **set_limit_end** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_limit_end** **(** **)** +- |void| **set_limit_end**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_limit_end**\ (\ ) Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than :ref:`scroll_limit_begin<class_ParallaxBackground_property_scroll_limit_begin>` to work. @@ -145,12 +145,12 @@ Bottom-right limits for scrolling to end. If the camera is outside of this limit .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxBackground_property_scroll_offset>` .. rst-class:: classref-property-setget -- void **set_scroll_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_scroll_offset** **(** **)** +- |void| **set_scroll_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_scroll_offset**\ (\ ) The ParallaxBackground's scroll value. Calculated automatically when using a :ref:`Camera2D<class_Camera2D>`, but can be used to manually manage scrolling when no camera is present. @@ -161,3 +161,4 @@ The ParallaxBackground's scroll value. Calculated automatically when using a :re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index a6eb8324d19..7dc0f710a2c 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -33,13 +33,15 @@ Properties .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` | ``Vector2(0, 0)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` | ``Vector2(1, 1)`` | - +-------------------------------+------------------------------------------------------------------------+-------------------+ + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`motion_mirroring<class_ParallaxLayer_property_motion_mirroring>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`motion_offset<class_ParallaxLayer_property_motion_offset>` | ``Vector2(0, 0)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`motion_scale<class_ParallaxLayer_property_motion_scale>` | ``Vector2(1, 1)`` | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode<enum_Node_PhysicsInterpolationMode>` | physics_interpolation_mode | ``2`` (overrides :ref:`Node<class_Node_property_physics_interpolation_mode>`) | + +---------------------------------------------------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,18 +56,20 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **motion_mirroring** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **motion_mirroring** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxLayer_property_motion_mirroring>` .. rst-class:: classref-property-setget -- void **set_mirroring** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_mirroring** **(** **)** +- |void| **set_mirroring**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_mirroring**\ (\ ) -The ParallaxLayer's :ref:`Texture2D<class_Texture2D>` repeating. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D<class_Texture2D>` will not be repeated. +The interval, in pixels, at which the **ParallaxLayer** is drawn repeatedly. Useful for creating an infinitely scrolling background. If an axis is set to ``0``, the **ParallaxLayer** will be drawn only once along that direction. -If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any given time. +\ **Note:** If you want the repetition to pixel-perfect match a :ref:`Texture2D<class_Texture2D>` displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child :ref:`Sprite2D<class_Sprite2D>` scaled to ``0.5`` to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to ``Vector2(300, 0)``. -\ **Note:** Despite its name, the texture will not be mirrored, it will simply be repeated. +\ **Note:** If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the layer at any given time. The visibility window is calculated from the parent :ref:`ParallaxBackground<class_ParallaxBackground>`'s position, not the layer's own position. So, if you use mirroring, **do not** change the **ParallaxLayer** position relative to its parent. Instead, if you need to adjust the background's position, set the :ref:`CanvasLayer.offset<class_CanvasLayer_property_offset>` property in the parent :ref:`ParallaxBackground<class_ParallaxBackground>`. + +\ **Note:** Despite the name, the layer will not be mirrored, it will only be repeated. .. rst-class:: classref-item-separator @@ -75,12 +79,12 @@ If the length of the viewport axis is bigger than twice the repeated axis size, .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **motion_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **motion_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_ParallaxLayer_property_motion_offset>` .. rst-class:: classref-property-setget -- void **set_motion_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_motion_offset** **(** **)** +- |void| **set_motion_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_motion_offset**\ (\ ) The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`ParallaxBackground.scroll_offset<class_ParallaxBackground_property_scroll_offset>`. @@ -92,12 +96,12 @@ The ParallaxLayer's offset relative to the parent ParallaxBackground's :ref:`Par .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **motion_scale** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **motion_scale** = ``Vector2(1, 1)`` :ref:`🔗<class_ParallaxLayer_property_motion_scale>` .. rst-class:: classref-property-setget -- void **set_motion_scale** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_motion_scale** **(** **)** +- |void| **set_motion_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_motion_scale**\ (\ ) Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not scroll. @@ -108,3 +112,4 @@ Multiplies the ParallaxLayer's motion. If an axis is set to ``0``, it will not s .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index f418956244b..0ea83a1e990 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -12,18 +12,14 @@ ParticleProcessMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Particle properties for :ref:`GPUParticles3D<class_GPUParticles3D>` and :ref:`GPUParticles2D<class_GPUParticles2D>` nodes. +Holds a particle configuration for :ref:`GPUParticles2D<class_GPUParticles2D>` or :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. .. rst-class:: classref-introduction-group Description ----------- -ParticleProcessMaterial defines particle properties and behavior. It is used in the ``process_material`` of :ref:`GPUParticles3D<class_GPUParticles3D>` and :ref:`GPUParticles2D<class_GPUParticles2D>` emitter nodes. - -Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture<class_CurveTexture>` applied to vary values over the lifetime of the particle. - -Particle animation is available only in :ref:`GPUParticles2D<class_GPUParticles2D>`. To use it, attach a :ref:`CanvasItemMaterial<class_CanvasItemMaterial>`, with :ref:`CanvasItemMaterial.particles_animation<class_CanvasItemMaterial_property_particles_animation>` enabled, to the particles node. +**ParticleProcessMaterial** defines particle properties and behavior. It is used in the ``process_material`` of the :ref:`GPUParticles2D<class_GPUParticles2D>` and :ref:`GPUParticles3D<class_GPUParticles3D>` nodes. Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture<class_CurveTexture>` or a :ref:`GradientTexture1D<class_GradientTexture1D>` applied to vary numerical or color values over the lifetime of the particle. .. rst-class:: classref-reftable-group @@ -33,6 +29,8 @@ Properties .. table:: :widths: auto + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`alpha_curve<class_ParticleProcessMaterial_property_alpha_curve>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`angle_curve<class_ParticleProcessMaterial_property_angle_curve>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ @@ -82,10 +80,18 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`direction<class_ParticleProcessMaterial_property_direction>` | ``Vector3(1, 0, 0)`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`directional_velocity_curve<class_ParticleProcessMaterial_property_directional_velocity_curve>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`directional_velocity_max<class_ParticleProcessMaterial_property_directional_velocity_max>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`directional_velocity_min<class_ParticleProcessMaterial_property_directional_velocity_min>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`emission_box_extents<class_ParticleProcessMaterial_property_emission_box_extents>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`emission_color_texture<class_ParticleProcessMaterial_property_emission_color_texture>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`emission_curve<class_ParticleProcessMaterial_property_emission_curve>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`emission_normal_texture<class_ParticleProcessMaterial_property_emission_normal_texture>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int<class_int>` | :ref:`emission_point_count<class_ParticleProcessMaterial_property_emission_point_count>` | | @@ -102,6 +108,10 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` | :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>` | ``0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`emission_shape_offset<class_ParticleProcessMaterial_property_emission_shape_offset>` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`emission_shape_scale<class_ParticleProcessMaterial_property_emission_shape_scale>` | ``Vector3(1, 1, 1)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`emission_sphere_radius<class_ParticleProcessMaterial_property_emission_sphere_radius>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`flatness<class_ParticleProcessMaterial_property_flatness>` | ``0.0`` | @@ -114,6 +124,8 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`hue_variation_min<class_ParticleProcessMaterial_property_hue_variation_min>` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`inherit_velocity_ratio<class_ParticleProcessMaterial_property_inherit_velocity_ratio>` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`initial_velocity_max<class_ParticleProcessMaterial_property_initial_velocity_max>` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`initial_velocity_min<class_ParticleProcessMaterial_property_initial_velocity_min>` | ``0.0`` | @@ -128,12 +140,14 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`orbit_velocity_curve<class_ParticleProcessMaterial_property_orbit_velocity_curve>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float<class_float>` | :ref:`orbit_velocity_max<class_ParticleProcessMaterial_property_orbit_velocity_max>` | | + | :ref:`float<class_float>` | :ref:`orbit_velocity_max<class_ParticleProcessMaterial_property_orbit_velocity_max>` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float<class_float>` | :ref:`orbit_velocity_min<class_ParticleProcessMaterial_property_orbit_velocity_min>` | | + | :ref:`float<class_float>` | :ref:`orbit_velocity_min<class_ParticleProcessMaterial_property_orbit_velocity_min>` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool<class_bool>` | :ref:`particle_flag_align_y<class_ParticleProcessMaterial_property_particle_flag_align_y>` | ``false`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool<class_bool>` | :ref:`particle_flag_damping_as_friction<class_ParticleProcessMaterial_property_particle_flag_damping_as_friction>` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool<class_bool>` | :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_property_particle_flag_disable_z>` | ``false`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool<class_bool>` | :ref:`particle_flag_rotate_y<class_ParticleProcessMaterial_property_particle_flag_rotate_y>` | ``false`` | @@ -144,12 +158,24 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`radial_accel_min<class_ParticleProcessMaterial_property_radial_accel_min>` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`radial_velocity_curve<class_ParticleProcessMaterial_property_radial_velocity_curve>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`radial_velocity_max<class_ParticleProcessMaterial_property_radial_velocity_max>` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`radial_velocity_min<class_ParticleProcessMaterial_property_radial_velocity_min>` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`scale_curve<class_ParticleProcessMaterial_property_scale_curve>` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`scale_max<class_ParticleProcessMaterial_property_scale_max>` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`scale_min<class_ParticleProcessMaterial_property_scale_min>` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`scale_over_velocity_max<class_ParticleProcessMaterial_property_scale_over_velocity_max>` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float<class_float>` | :ref:`scale_over_velocity_min<class_ParticleProcessMaterial_property_scale_over_velocity_min>` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`spread<class_ParticleProcessMaterial_property_spread>` | ``45.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int<class_int>` | :ref:`sub_emitter_amount_at_collision<class_ParticleProcessMaterial_property_sub_emitter_amount_at_collision>` | | @@ -188,6 +214,10 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float<class_float>` | :ref:`turbulence_noise_strength<class_ParticleProcessMaterial_property_turbulence_noise_strength>` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`velocity_pivot<class_ParticleProcessMaterial_property_velocity_pivot>` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-reftable-group @@ -197,23 +227,27 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param_max<class_ParticleProcessMaterial_method_get_param_max>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param_min<class_ParticleProcessMaterial_method_get_param_min>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_param_texture<class_ParticleProcessMaterial_method_get_param_texture>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_ParticleProcessMaterial_method_get_particle_flag>` **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>` **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_particle_flag<class_ParticleProcessMaterial_method_set_particle_flag>` **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_param<class_ParticleProcessMaterial_method_get_param>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param_max<class_ParticleProcessMaterial_method_get_param_max>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param_min<class_ParticleProcessMaterial_method_get_param_min>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_param_texture<class_ParticleProcessMaterial_method_get_param_texture>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_particle_flag<class_ParticleProcessMaterial_method_get_particle_flag>`\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param<class_ParticleProcessMaterial_method_set_param>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>`\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_particle_flag<class_ParticleProcessMaterial_method_set_particle_flag>`\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -228,7 +262,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Parameter**: +enum **Parameter**: :ref:`🔗<enum_ParticleProcessMaterial_Parameter>` .. _class_ParticleProcessMaterial_constant_PARAM_INITIAL_LINEAR_VELOCITY: @@ -326,11 +360,35 @@ Use with :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min> Use with :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>`, :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>`, and :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>` to set animation offset properties. +.. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` **PARAM_RADIAL_VELOCITY** = ``15`` + +Use with :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>`, :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>`, and :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>` to set radial velocity properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_DIRECTIONAL_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` **PARAM_DIRECTIONAL_VELOCITY** = ``16`` + +Use with :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>`, :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>`, and :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>` to set directional velocity properties. + +.. _class_ParticleProcessMaterial_constant_PARAM_SCALE_OVER_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` **PARAM_SCALE_OVER_VELOCITY** = ``17`` + +Use with :ref:`set_param_min<class_ParticleProcessMaterial_method_set_param_min>`, :ref:`set_param_max<class_ParticleProcessMaterial_method_set_param_max>`, and :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_texture>` to set scale over velocity properties. + .. _class_ParticleProcessMaterial_constant_PARAM_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` **PARAM_MAX** = ``15`` +:ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` **PARAM_MAX** = ``18`` Represents the size of the :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` enum. @@ -366,7 +424,7 @@ Use with :ref:`set_param_texture<class_ParticleProcessMaterial_method_set_param_ .. rst-class:: classref-enumeration -enum **ParticleFlags**: +enum **ParticleFlags**: :ref:`🔗<enum_ParticleProcessMaterial_ParticleFlags>` .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY: @@ -392,11 +450,23 @@ Use with :ref:`set_particle_flag<class_ParticleProcessMaterial_method_set_partic Use with :ref:`set_particle_flag<class_ParticleProcessMaterial_method_set_particle_flag>` to set :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_property_particle_flag_disable_z>`. +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DAMPING_AS_FRICTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` **PARTICLE_FLAG_DAMPING_AS_FRICTION** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` **PARTICLE_FLAG_MAX** = ``3`` +:ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` **PARTICLE_FLAG_MAX** = ``4`` Represents the size of the :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` enum. @@ -408,7 +478,7 @@ Represents the size of the :ref:`ParticleFlags<enum_ParticleProcessMaterial_Part .. rst-class:: classref-enumeration -enum **EmissionShape**: +enum **EmissionShape**: :ref:`🔗<enum_ParticleProcessMaterial_EmissionShape>` .. _class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINT: @@ -482,7 +552,7 @@ Represents the size of the :ref:`EmissionShape<enum_ParticleProcessMaterial_Emis .. rst-class:: classref-enumeration -enum **SubEmitterMode**: +enum **SubEmitterMode**: :ref:`🔗<enum_ParticleProcessMaterial_SubEmitterMode>` .. _class_ParticleProcessMaterial_constant_SUB_EMITTER_DISABLED: @@ -490,6 +560,10 @@ enum **SubEmitterMode**: :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **SUB_EMITTER_DISABLED** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ParticleProcessMaterial_constant_SUB_EMITTER_CONSTANT: @@ -498,6 +572,10 @@ enum **SubEmitterMode**: :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **SUB_EMITTER_CONSTANT** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_END: @@ -506,6 +584,10 @@ enum **SubEmitterMode**: :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **SUB_EMITTER_AT_END** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ParticleProcessMaterial_constant_SUB_EMITTER_AT_COLLISION: @@ -514,6 +596,10 @@ enum **SubEmitterMode**: :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **SUB_EMITTER_AT_COLLISION** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ParticleProcessMaterial_constant_SUB_EMITTER_MAX: @@ -532,7 +618,7 @@ Represents the size of the :ref:`SubEmitterMode<enum_ParticleProcessMaterial_Sub .. rst-class:: classref-enumeration -enum **CollisionMode**: +enum **CollisionMode**: :ref:`🔗<enum_ParticleProcessMaterial_CollisionMode>` .. _class_ParticleProcessMaterial_constant_COLLISION_DISABLED: @@ -575,16 +661,33 @@ Represents the size of the :ref:`CollisionMode<enum_ParticleProcessMaterial_Coll Property Descriptions --------------------- +.. _class_ParticleProcessMaterial_property_alpha_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **alpha_curve** :ref:`🔗<class_ParticleProcessMaterial_property_alpha_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_alpha_curve**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_alpha_curve**\ (\ ) + +The alpha value of each particle's color will be multiplied by this :ref:`CurveTexture<class_CurveTexture>` over its lifetime. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_angle_curve: .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **angle_curve** +:ref:`Texture2D<class_Texture2D>` **angle_curve** :ref:`🔗<class_ParticleProcessMaterial_property_angle_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's rotation will be animated along this :ref:`CurveTexture<class_CurveTexture>`. @@ -596,12 +699,12 @@ Each particle's rotation will be animated along this :ref:`CurveTexture<class_Cu .. rst-class:: classref-property -:ref:`float<class_float>` **angle_max** = ``0.0`` +:ref:`float<class_float>` **angle_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_angle_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum initial rotation applied to each particle, in degrees. @@ -615,12 +718,12 @@ Only applied when :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_pr .. rst-class:: classref-property -:ref:`float<class_float>` **angle_min** = ``0.0`` +:ref:`float<class_float>` **angle_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_angle_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`angle_max<class_ParticleProcessMaterial_property_angle_max>`. @@ -632,12 +735,12 @@ Minimum equivalent of :ref:`angle_max<class_ParticleProcessMaterial_property_ang .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **angular_velocity_curve** +:ref:`Texture2D<class_Texture2D>` **angular_velocity_curve** :ref:`🔗<class_ParticleProcessMaterial_property_angular_velocity_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's angular velocity (rotation speed) will vary along this :ref:`CurveTexture<class_CurveTexture>` over its lifetime. @@ -649,12 +752,12 @@ Each particle's angular velocity (rotation speed) will vary along this :ref:`Cur .. rst-class:: classref-property -:ref:`float<class_float>` **angular_velocity_max** = ``0.0`` +:ref:`float<class_float>` **angular_velocity_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_angular_velocity_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. @@ -668,12 +771,12 @@ Only applied when :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_pr .. rst-class:: classref-property -:ref:`float<class_float>` **angular_velocity_min** = ``0.0`` +:ref:`float<class_float>` **angular_velocity_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_angular_velocity_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`angular_velocity_max<class_ParticleProcessMaterial_property_angular_velocity_max>`. @@ -685,12 +788,12 @@ Minimum equivalent of :ref:`angular_velocity_max<class_ParticleProcessMaterial_p .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **anim_offset_curve** +:ref:`Texture2D<class_Texture2D>` **anim_offset_curve** :ref:`🔗<class_ParticleProcessMaterial_property_anim_offset_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's animation offset will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -702,12 +805,12 @@ Each particle's animation offset will vary along this :ref:`CurveTexture<class_C .. rst-class:: classref-property -:ref:`float<class_float>` **anim_offset_max** = ``0.0`` +:ref:`float<class_float>` **anim_offset_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_anim_offset_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum animation offset that corresponds to frame index in the texture. ``0`` is the first frame, ``1`` is the last one. See :ref:`CanvasItemMaterial.particles_animation<class_CanvasItemMaterial_property_particles_animation>`. @@ -719,12 +822,12 @@ Maximum animation offset that corresponds to frame index in the texture. ``0`` i .. rst-class:: classref-property -:ref:`float<class_float>` **anim_offset_min** = ``0.0`` +:ref:`float<class_float>` **anim_offset_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_anim_offset_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`anim_offset_max<class_ParticleProcessMaterial_property_anim_offset_max>`. @@ -736,12 +839,12 @@ Minimum equivalent of :ref:`anim_offset_max<class_ParticleProcessMaterial_proper .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **anim_speed_curve** +:ref:`Texture2D<class_Texture2D>` **anim_speed_curve** :ref:`🔗<class_ParticleProcessMaterial_property_anim_speed_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's animation speed will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -753,12 +856,12 @@ Each particle's animation speed will vary along this :ref:`CurveTexture<class_Cu .. rst-class:: classref-property -:ref:`float<class_float>` **anim_speed_max** = ``0.0`` +:ref:`float<class_float>` **anim_speed_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_anim_speed_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum particle animation speed. Animation speed of ``1`` means that the particles will make full ``0`` to ``1`` offset cycle during lifetime, ``2`` means ``2`` cycles etc. @@ -772,12 +875,12 @@ With animation speed greater than ``1``, remember to enable :ref:`CanvasItemMate .. rst-class:: classref-property -:ref:`float<class_float>` **anim_speed_min** = ``0.0`` +:ref:`float<class_float>` **anim_speed_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_anim_speed_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`anim_speed_max<class_ParticleProcessMaterial_property_anim_speed_max>`. @@ -789,14 +892,14 @@ Minimum equivalent of :ref:`anim_speed_max<class_ParticleProcessMaterial_propert .. rst-class:: classref-property -:ref:`bool<class_bool>` **attractor_interaction_enabled** = ``true`` +:ref:`bool<class_bool>` **attractor_interaction_enabled** = ``true`` :ref:`🔗<class_ParticleProcessMaterial_property_attractor_interaction_enabled>` .. rst-class:: classref-property-setget -- void **set_attractor_interaction_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_attractor_interaction_enabled** **(** **)** +- |void| **set_attractor_interaction_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_attractor_interaction_enabled**\ (\ ) -True if the interaction with particle attractors is enabled. +If ``true``, interaction with particle attractors is enabled. In 3D, attraction only occurs within the area defined by the :ref:`GPUParticles3D<class_GPUParticles3D>` node's :ref:`GPUParticles3D.visibility_aabb<class_GPUParticles3D_property_visibility_aabb>`. .. rst-class:: classref-item-separator @@ -806,12 +909,12 @@ True if the interaction with particle attractors is enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **collision_bounce** +:ref:`float<class_float>` **collision_bounce** :ref:`🔗<class_ParticleProcessMaterial_property_collision_bounce>` .. rst-class:: classref-property-setget -- void **set_collision_bounce** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_collision_bounce** **(** **)** +- |void| **set_collision_bounce**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_collision_bounce**\ (\ ) The particles' bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). Only effective if :ref:`collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>`. @@ -823,12 +926,12 @@ The particles' bounciness. Values range from ``0`` (no bounce) to ``1`` (full bo .. rst-class:: classref-property -:ref:`float<class_float>` **collision_friction** +:ref:`float<class_float>` **collision_friction** :ref:`🔗<class_ParticleProcessMaterial_property_collision_friction>` .. rst-class:: classref-property-setget -- void **set_collision_friction** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_collision_friction** **(** **)** +- |void| **set_collision_friction**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_collision_friction**\ (\ ) The particles' friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). Only effective if :ref:`collision_mode<class_ParticleProcessMaterial_property_collision_mode>` is :ref:`COLLISION_RIGID<class_ParticleProcessMaterial_constant_COLLISION_RIGID>`. @@ -840,16 +943,16 @@ The particles' friction. Values range from ``0`` (frictionless) to ``1`` (maximu .. rst-class:: classref-property -:ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>` **collision_mode** = ``0`` +:ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>` **collision_mode** = ``0`` :ref:`🔗<class_ParticleProcessMaterial_property_collision_mode>` .. rst-class:: classref-property-setget -- void **set_collision_mode** **(** :ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>` value **)** -- :ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>` **get_collision_mode** **(** **)** +- |void| **set_collision_mode**\ (\ value\: :ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>`\ ) +- :ref:`CollisionMode<enum_ParticleProcessMaterial_CollisionMode>` **get_collision_mode**\ (\ ) The particles' collision mode. -\ **Note:** 3D Particles can only collide with :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` nodes, not :ref:`PhysicsBody3D<class_PhysicsBody3D>` nodes. To make particles collide with various objects, you can add :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` nodes as children of :ref:`PhysicsBody3D<class_PhysicsBody3D>` nodes. +\ **Note:** 3D Particles can only collide with :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` nodes, not :ref:`PhysicsBody3D<class_PhysicsBody3D>` nodes. To make particles collide with various objects, you can add :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>` nodes as children of :ref:`PhysicsBody3D<class_PhysicsBody3D>` nodes. In 3D, collisions only occur within the area defined by the :ref:`GPUParticles3D<class_GPUParticles3D>` node's :ref:`GPUParticles3D.visibility_aabb<class_GPUParticles3D_property_visibility_aabb>`. \ **Note:** 2D Particles can only collide with :ref:`LightOccluder2D<class_LightOccluder2D>` nodes, not :ref:`PhysicsBody2D<class_PhysicsBody2D>` nodes. @@ -861,14 +964,14 @@ The particles' collision mode. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collision_use_scale** = ``false`` +:ref:`bool<class_bool>` **collision_use_scale** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_collision_use_scale>` .. rst-class:: classref-property-setget -- void **set_collision_use_scale** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collision_using_scale** **(** **)** +- |void| **set_collision_use_scale**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collision_using_scale**\ (\ ) -Should collision take scale into account. +If ``true``, :ref:`GPUParticles3D.collision_base_size<class_GPUParticles3D_property_collision_base_size>` is multiplied by the particle's effective scale (see :ref:`scale_min<class_ParticleProcessMaterial_property_scale_min>`, :ref:`scale_max<class_ParticleProcessMaterial_property_scale_max>`, :ref:`scale_curve<class_ParticleProcessMaterial_property_scale_curve>`, and :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>`). .. rst-class:: classref-item-separator @@ -878,12 +981,12 @@ Should collision take scale into account. .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ParticleProcessMaterial_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) Each particle's initial color. If the :ref:`GPUParticles2D<class_GPUParticles2D>`'s ``texture`` is defined, it will be multiplied by this color. @@ -897,12 +1000,12 @@ Each particle's initial color. If the :ref:`GPUParticles2D<class_GPUParticles2D> .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **color_initial_ramp** +:ref:`Texture2D<class_Texture2D>` **color_initial_ramp** :ref:`🔗<class_ParticleProcessMaterial_property_color_initial_ramp>` .. rst-class:: classref-property-setget -- void **set_color_initial_ramp** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_color_initial_ramp** **(** **)** +- |void| **set_color_initial_ramp**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_color_initial_ramp**\ (\ ) Each particle's initial color will vary along this :ref:`GradientTexture1D<class_GradientTexture1D>` (multiplied with :ref:`color<class_ParticleProcessMaterial_property_color>`). @@ -916,12 +1019,12 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D<class .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **color_ramp** +:ref:`Texture2D<class_Texture2D>` **color_ramp** :ref:`🔗<class_ParticleProcessMaterial_property_color_ramp>` .. rst-class:: classref-property-setget -- void **set_color_ramp** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_color_ramp** **(** **)** +- |void| **set_color_ramp**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_color_ramp**\ (\ ) Each particle's color will vary along this :ref:`GradientTexture1D<class_GradientTexture1D>` over its lifetime (multiplied with :ref:`color<class_ParticleProcessMaterial_property_color>`). @@ -935,12 +1038,12 @@ Each particle's color will vary along this :ref:`GradientTexture1D<class_Gradien .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **damping_curve** +:ref:`Texture2D<class_Texture2D>` **damping_curve** :ref:`🔗<class_ParticleProcessMaterial_property_damping_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Damping will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -952,12 +1055,12 @@ Damping will vary along this :ref:`CurveTexture<class_CurveTexture>`. .. rst-class:: classref-property -:ref:`float<class_float>` **damping_max** = ``0.0`` +:ref:`float<class_float>` **damping_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_damping_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| The maximum rate at which particles lose velocity. For example value of ``100`` means that the particle will go from ``100`` velocity to ``0`` in ``1`` second. @@ -969,12 +1072,12 @@ The maximum rate at which particles lose velocity. For example value of ``100`` .. rst-class:: classref-property -:ref:`float<class_float>` **damping_min** = ``0.0`` +:ref:`float<class_float>` **damping_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_damping_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`damping_max<class_ParticleProcessMaterial_property_damping_max>`. @@ -986,12 +1089,12 @@ Minimum equivalent of :ref:`damping_max<class_ParticleProcessMaterial_property_d .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **direction** = ``Vector3(1, 0, 0)`` +:ref:`Vector3<class_Vector3>` **direction** = ``Vector3(1, 0, 0)`` :ref:`🔗<class_ParticleProcessMaterial_property_direction>` .. rst-class:: classref-property-setget -- void **set_direction** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_direction** **(** **)** +- |void| **set_direction**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_direction**\ (\ ) Unit vector specifying the particles' emission direction. @@ -999,18 +1102,77 @@ Unit vector specifying the particles' emission direction. ---- +.. _class_ParticleProcessMaterial_property_directional_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **directional_velocity_curve** :ref:`🔗<class_ParticleProcessMaterial_property_directional_velocity_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +A curve that specifies the velocity along each of the axes of the particle system along its lifetime. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_directional_velocity_max: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **directional_velocity_max** :ref:`🔗<class_ParticleProcessMaterial_property_directional_velocity_max>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Maximum directional velocity value, which is multiplied by :ref:`directional_velocity_curve<class_ParticleProcessMaterial_property_directional_velocity_curve>`. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_directional_velocity_min: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **directional_velocity_min** :ref:`🔗<class_ParticleProcessMaterial_property_directional_velocity_min>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Minimum directional velocity value, which is multiplied by :ref:`directional_velocity_curve<class_ParticleProcessMaterial_property_directional_velocity_curve>`. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_box_extents: .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **emission_box_extents** +:ref:`Vector3<class_Vector3>` **emission_box_extents** :ref:`🔗<class_ParticleProcessMaterial_property_emission_box_extents>` .. rst-class:: classref-property-setget -- void **set_emission_box_extents** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_emission_box_extents** **(** **)** +- |void| **set_emission_box_extents**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_emission_box_extents**\ (\ ) -The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_BOX>`. +The box's extents if :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_BOX<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_BOX>`. + +\ **Note:** :ref:`emission_box_extents<class_ParticleProcessMaterial_property_emission_box_extents>` starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents. .. rst-class:: classref-item-separator @@ -1020,12 +1182,12 @@ The box's extents if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_BOX<class .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **emission_color_texture** +:ref:`Texture2D<class_Texture2D>` **emission_color_texture** :ref:`🔗<class_ParticleProcessMaterial_property_emission_color_texture>` .. rst-class:: classref-property-setget -- void **set_emission_color_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_emission_color_texture** **(** **)** +- |void| **set_emission_color_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_emission_color_texture**\ (\ ) Particle color will be modulated by color determined by sampling this texture at the same point as the :ref:`emission_point_texture<class_ParticleProcessMaterial_property_emission_point_texture>`. @@ -1035,16 +1197,35 @@ Particle color will be modulated by color determined by sampling this texture at ---- +.. _class_ParticleProcessMaterial_property_emission_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **emission_curve** :ref:`🔗<class_ParticleProcessMaterial_property_emission_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_emission_curve**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_emission_curve**\ (\ ) + +Each particle's color will be multiplied by this :ref:`CurveTexture<class_CurveTexture>` over its lifetime. + +\ **Note:** This property won't have a visible effect unless the render material is marked as unshaded. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_normal_texture: .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **emission_normal_texture** +:ref:`Texture2D<class_Texture2D>` **emission_normal_texture** :ref:`🔗<class_ParticleProcessMaterial_property_emission_normal_texture>` .. rst-class:: classref-property-setget -- void **set_emission_normal_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_emission_normal_texture** **(** **)** +- |void| **set_emission_normal_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_emission_normal_texture**\ (\ ) Particle velocity and rotation will be set by sampling this texture at the same point as the :ref:`emission_point_texture<class_ParticleProcessMaterial_property_emission_point_texture>`. Used only in :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS>`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. @@ -1056,14 +1237,14 @@ Particle velocity and rotation will be set by sampling this texture at the same .. rst-class:: classref-property -:ref:`int<class_int>` **emission_point_count** +:ref:`int<class_int>` **emission_point_count** :ref:`🔗<class_ParticleProcessMaterial_property_emission_point_count>` .. rst-class:: classref-property-setget -- void **set_emission_point_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_emission_point_count** **(** **)** +- |void| **set_emission_point_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_emission_point_count**\ (\ ) -The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS>`. +The number of emission points if :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS>` or :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS>`. .. rst-class:: classref-item-separator @@ -1073,12 +1254,12 @@ The number of emission points if ``emission_shape`` is set to :ref:`EMISSION_SHA .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **emission_point_texture** +:ref:`Texture2D<class_Texture2D>` **emission_point_texture** :ref:`🔗<class_ParticleProcessMaterial_property_emission_point_texture>` .. rst-class:: classref-property-setget -- void **set_emission_point_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_emission_point_texture** **(** **)** +- |void| **set_emission_point_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_emission_point_texture**\ (\ ) Particles will be emitted at positions determined by sampling this texture at a random position. Used with :ref:`EMISSION_SHAPE_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_POINTS>` and :ref:`EMISSION_SHAPE_DIRECTED_POINTS<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_DIRECTED_POINTS>`. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. @@ -1090,12 +1271,12 @@ Particles will be emitted at positions determined by sampling this texture at a .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **emission_ring_axis** +:ref:`Vector3<class_Vector3>` **emission_ring_axis** :ref:`🔗<class_ParticleProcessMaterial_property_emission_ring_axis>` .. rst-class:: classref-property-setget -- void **set_emission_ring_axis** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_emission_ring_axis** **(** **)** +- |void| **set_emission_ring_axis**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_emission_ring_axis**\ (\ ) The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING>`. @@ -1107,12 +1288,12 @@ The axis of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_Part .. rst-class:: classref-property -:ref:`float<class_float>` **emission_ring_height** +:ref:`float<class_float>` **emission_ring_height** :ref:`🔗<class_ParticleProcessMaterial_property_emission_ring_height>` .. rst-class:: classref-property-setget -- void **set_emission_ring_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_emission_ring_height** **(** **)** +- |void| **set_emission_ring_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_emission_ring_height**\ (\ ) The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING>`. @@ -1124,12 +1305,12 @@ The height of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_Pa .. rst-class:: classref-property -:ref:`float<class_float>` **emission_ring_inner_radius** +:ref:`float<class_float>` **emission_ring_inner_radius** :ref:`🔗<class_ParticleProcessMaterial_property_emission_ring_inner_radius>` .. rst-class:: classref-property-setget -- void **set_emission_ring_inner_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_emission_ring_inner_radius** **(** **)** +- |void| **set_emission_ring_inner_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_emission_ring_inner_radius**\ (\ ) The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING>`. @@ -1141,12 +1322,12 @@ The inner radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<cl .. rst-class:: classref-property -:ref:`float<class_float>` **emission_ring_radius** +:ref:`float<class_float>` **emission_ring_radius** :ref:`🔗<class_ParticleProcessMaterial_property_emission_ring_radius>` .. rst-class:: classref-property-setget -- void **set_emission_ring_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_emission_ring_radius** **(** **)** +- |void| **set_emission_ring_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_emission_ring_radius**\ (\ ) The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_RING>`. @@ -1158,12 +1339,12 @@ The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING<class_Pa .. rst-class:: classref-property -:ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` **emission_shape** = ``0`` +:ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` **emission_shape** = ``0`` :ref:`🔗<class_ParticleProcessMaterial_property_emission_shape>` .. rst-class:: classref-property-setget -- void **set_emission_shape** **(** :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` value **)** -- :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` **get_emission_shape** **(** **)** +- |void| **set_emission_shape**\ (\ value\: :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>`\ ) +- :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` **get_emission_shape**\ (\ ) Particles will be emitted inside this region. Use :ref:`EmissionShape<enum_ParticleProcessMaterial_EmissionShape>` constants for values. @@ -1171,18 +1352,52 @@ Particles will be emitted inside this region. Use :ref:`EmissionShape<enum_Parti ---- +.. _class_ParticleProcessMaterial_property_emission_shape_offset: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **emission_shape_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ParticleProcessMaterial_property_emission_shape_offset>` + +.. rst-class:: classref-property-setget + +- |void| **set_emission_shape_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_emission_shape_offset**\ (\ ) + +The offset for the :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>`, in local space. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_emission_shape_scale: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **emission_shape_scale** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_ParticleProcessMaterial_property_emission_shape_scale>` + +.. rst-class:: classref-property-setget + +- |void| **set_emission_shape_scale**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_emission_shape_scale**\ (\ ) + +The scale of the :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>`, in local space. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_sphere_radius: .. rst-class:: classref-property -:ref:`float<class_float>` **emission_sphere_radius** +:ref:`float<class_float>` **emission_sphere_radius** :ref:`🔗<class_ParticleProcessMaterial_property_emission_sphere_radius>` .. rst-class:: classref-property-setget -- void **set_emission_sphere_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_emission_sphere_radius** **(** **)** +- |void| **set_emission_sphere_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_emission_sphere_radius**\ (\ ) -The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE>`. +The sphere's radius if :ref:`emission_shape<class_ParticleProcessMaterial_property_emission_shape>` is set to :ref:`EMISSION_SHAPE_SPHERE<class_ParticleProcessMaterial_constant_EMISSION_SHAPE_SPHERE>`. .. rst-class:: classref-item-separator @@ -1192,12 +1407,12 @@ The sphere's radius if ``emission_shape`` is set to :ref:`EMISSION_SHAPE_SPHERE< .. rst-class:: classref-property -:ref:`float<class_float>` **flatness** = ``0.0`` +:ref:`float<class_float>` **flatness** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_flatness>` .. rst-class:: classref-property-setget -- void **set_flatness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_flatness** **(** **)** +- |void| **set_flatness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_flatness**\ (\ ) Amount of :ref:`spread<class_ParticleProcessMaterial_property_spread>` along the Y axis. @@ -1209,12 +1424,12 @@ Amount of :ref:`spread<class_ParticleProcessMaterial_property_spread>` along the .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **gravity** = ``Vector3(0, -9.8, 0)`` +:ref:`Vector3<class_Vector3>` **gravity** = ``Vector3(0, -9.8, 0)`` :ref:`🔗<class_ParticleProcessMaterial_property_gravity>` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_gravity**\ (\ ) Gravity applied to every particle. @@ -1226,12 +1441,12 @@ Gravity applied to every particle. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **hue_variation_curve** +:ref:`Texture2D<class_Texture2D>` **hue_variation_curve** :ref:`🔗<class_ParticleProcessMaterial_property_hue_variation_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's hue will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -1243,12 +1458,12 @@ Each particle's hue will vary along this :ref:`CurveTexture<class_CurveTexture>` .. rst-class:: classref-property -:ref:`float<class_float>` **hue_variation_max** = ``0.0`` +:ref:`float<class_float>` **hue_variation_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_hue_variation_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum initial hue variation applied to each particle. It will shift the particle color's hue. @@ -1260,12 +1475,12 @@ Maximum initial hue variation applied to each particle. It will shift the partic .. rst-class:: classref-property -:ref:`float<class_float>` **hue_variation_min** = ``0.0`` +:ref:`float<class_float>` **hue_variation_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_hue_variation_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`hue_variation_max<class_ParticleProcessMaterial_property_hue_variation_max>`. @@ -1273,16 +1488,33 @@ Minimum equivalent of :ref:`hue_variation_max<class_ParticleProcessMaterial_prop ---- +.. _class_ParticleProcessMaterial_property_inherit_velocity_ratio: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **inherit_velocity_ratio** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_inherit_velocity_ratio>` + +.. rst-class:: classref-property-setget + +- |void| **set_inherit_velocity_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_inherit_velocity_ratio**\ (\ ) + +Percentage of the velocity of the respective :ref:`GPUParticles2D<class_GPUParticles2D>` or :ref:`GPUParticles3D<class_GPUParticles3D>` inherited by each particle when spawning. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_initial_velocity_max: .. rst-class:: classref-property -:ref:`float<class_float>` **initial_velocity_max** = ``0.0`` +:ref:`float<class_float>` **initial_velocity_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_initial_velocity_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum initial velocity magnitude for each particle. Direction comes from :ref:`direction<class_ParticleProcessMaterial_property_direction>` and :ref:`spread<class_ParticleProcessMaterial_property_spread>`. @@ -1294,12 +1526,12 @@ Maximum initial velocity magnitude for each particle. Direction comes from :ref: .. rst-class:: classref-property -:ref:`float<class_float>` **initial_velocity_min** = ``0.0`` +:ref:`float<class_float>` **initial_velocity_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_initial_velocity_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`initial_velocity_max<class_ParticleProcessMaterial_property_initial_velocity_max>`. @@ -1311,12 +1543,12 @@ Minimum equivalent of :ref:`initial_velocity_max<class_ParticleProcessMaterial_p .. rst-class:: classref-property -:ref:`float<class_float>` **lifetime_randomness** = ``0.0`` +:ref:`float<class_float>` **lifetime_randomness** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_lifetime_randomness>` .. rst-class:: classref-property-setget -- void **set_lifetime_randomness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_lifetime_randomness** **(** **)** +- |void| **set_lifetime_randomness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lifetime_randomness**\ (\ ) Particle lifetime randomness ratio. The equation for the lifetime of a particle is ``lifetime * (1.0 - randf() * lifetime_randomness)``. For example, a :ref:`lifetime_randomness<class_ParticleProcessMaterial_property_lifetime_randomness>` of ``0.4`` scales the lifetime between ``0.6`` to ``1.0`` of its original value. @@ -1328,12 +1560,12 @@ Particle lifetime randomness ratio. The equation for the lifetime of a particle .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **linear_accel_curve** +:ref:`Texture2D<class_Texture2D>` **linear_accel_curve** :ref:`🔗<class_ParticleProcessMaterial_property_linear_accel_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's linear acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -1345,12 +1577,12 @@ Each particle's linear acceleration will vary along this :ref:`CurveTexture<clas .. rst-class:: classref-property -:ref:`float<class_float>` **linear_accel_max** = ``0.0`` +:ref:`float<class_float>` **linear_accel_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_linear_accel_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum linear acceleration applied to each particle in the direction of motion. @@ -1362,12 +1594,12 @@ Maximum linear acceleration applied to each particle in the direction of motion. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_accel_min** = ``0.0`` +:ref:`float<class_float>` **linear_accel_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_linear_accel_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`linear_accel_max<class_ParticleProcessMaterial_property_linear_accel_max>`. @@ -1379,15 +1611,19 @@ Minimum equivalent of :ref:`linear_accel_max<class_ParticleProcessMaterial_prope .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **orbit_velocity_curve** +:ref:`Texture2D<class_Texture2D>` **orbit_velocity_curve** :ref:`🔗<class_ParticleProcessMaterial_property_orbit_velocity_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's orbital velocity will vary along this :ref:`CurveTexture<class_CurveTexture>`. +\ **Note:** For 3D orbital velocity, use a :ref:`CurveXYZTexture<class_CurveXYZTexture>`. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + .. rst-class:: classref-item-separator ---- @@ -1396,16 +1632,16 @@ Each particle's orbital velocity will vary along this :ref:`CurveTexture<class_C .. rst-class:: classref-property -:ref:`float<class_float>` **orbit_velocity_max** +:ref:`float<class_float>` **orbit_velocity_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_orbit_velocity_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum 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 :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_property_particle_flag_disable_z>` is ``true``. +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. .. rst-class:: classref-item-separator @@ -1415,15 +1651,17 @@ Only available when :ref:`particle_flag_disable_z<class_ParticleProcessMaterial_ .. rst-class:: classref-property -:ref:`float<class_float>` **orbit_velocity_min** +:ref:`float<class_float>` **orbit_velocity_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_orbit_velocity_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`orbit_velocity_max<class_ParticleProcessMaterial_property_orbit_velocity_max>`. +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + .. rst-class:: classref-item-separator ---- @@ -1432,12 +1670,12 @@ Minimum equivalent of :ref:`orbit_velocity_max<class_ParticleProcessMaterial_pro .. rst-class:: classref-property -:ref:`bool<class_bool>` **particle_flag_align_y** = ``false`` +:ref:`bool<class_bool>` **particle_flag_align_y** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_particle_flag_align_y>` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** -- :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| Align Y axis of particle with the direction of its velocity. @@ -1445,16 +1683,33 @@ Align Y axis of particle with the direction of its velocity. ---- +.. _class_ParticleProcessMaterial_property_particle_flag_damping_as_friction: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **particle_flag_damping_as_friction** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_particle_flag_damping_as_friction>` + +.. rst-class:: classref-property-setget + +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| + +Changes the behavior of the damping properties from a linear deceleration to a deceleration based on speed percentage. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_particle_flag_disable_z: .. rst-class:: classref-property -:ref:`bool<class_bool>` **particle_flag_disable_z** = ``false`` +:ref:`bool<class_bool>` **particle_flag_disable_z** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_particle_flag_disable_z>` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** -- :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| If ``true``, particles will not move on the z axis. @@ -1466,12 +1721,12 @@ If ``true``, particles will not move on the z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **particle_flag_rotate_y** = ``false`` +:ref:`bool<class_bool>` **particle_flag_rotate_y** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_particle_flag_rotate_y>` .. rst-class:: classref-property-setget -- void **set_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** -- :ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag **)** |const| +- |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| If ``true``, particles rotate around Y axis by :ref:`angle_min<class_ParticleProcessMaterial_property_angle_min>`. @@ -1483,12 +1738,12 @@ If ``true``, particles rotate around Y axis by :ref:`angle_min<class_ParticlePro .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **radial_accel_curve** +:ref:`Texture2D<class_Texture2D>` **radial_accel_curve** :ref:`🔗<class_ParticleProcessMaterial_property_radial_accel_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's radial acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -1500,12 +1755,12 @@ Each particle's radial acceleration will vary along this :ref:`CurveTexture<clas .. rst-class:: classref-property -:ref:`float<class_float>` **radial_accel_max** = ``0.0`` +:ref:`float<class_float>` **radial_accel_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_radial_accel_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. @@ -1517,12 +1772,12 @@ Maximum radial acceleration applied to each particle. Makes particle accelerate .. rst-class:: classref-property -:ref:`float<class_float>` **radial_accel_min** = ``0.0`` +:ref:`float<class_float>` **radial_accel_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_radial_accel_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`radial_accel_max<class_ParticleProcessMaterial_property_radial_accel_max>`. @@ -1530,18 +1785,75 @@ Minimum equivalent of :ref:`radial_accel_max<class_ParticleProcessMaterial_prope ---- +.. _class_ParticleProcessMaterial_property_radial_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **radial_velocity_curve** :ref:`🔗<class_ParticleProcessMaterial_property_radial_velocity_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +A :ref:`CurveTexture<class_CurveTexture>` that defines the velocity over the particle's lifetime away (or toward) the :ref:`velocity_pivot<class_ParticleProcessMaterial_property_velocity_pivot>`. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_radial_velocity_max: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **radial_velocity_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_radial_velocity_max>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Maximum radial velocity applied to each particle. Makes particles move away from the :ref:`velocity_pivot<class_ParticleProcessMaterial_property_velocity_pivot>`, or toward it if negative. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_radial_velocity_min: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **radial_velocity_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_radial_velocity_min>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Minimum radial velocity applied to each particle. Makes particles move away from the :ref:`velocity_pivot<class_ParticleProcessMaterial_property_velocity_pivot>`, or toward it if negative. + +\ **Note:** Animated velocities will not be affected by damping, use :ref:`velocity_limit_curve<class_ParticleProcessMaterial_property_velocity_limit_curve>` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_scale_curve: .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **scale_curve** +:ref:`Texture2D<class_Texture2D>` **scale_curve** :ref:`🔗<class_ParticleProcessMaterial_property_scale_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| -Each particle's scale will vary along this :ref:`CurveTexture<class_CurveTexture>`. If a :ref:`CurveXYZTexture<class_CurveXYZTexture>` is supplied instead, the scale will be separated per-axis. +Each particle's scale will vary along this :ref:`CurveTexture<class_CurveTexture>` over its lifetime. If a :ref:`CurveXYZTexture<class_CurveXYZTexture>` is supplied instead, the scale will be separated per-axis. .. rst-class:: classref-item-separator @@ -1551,12 +1863,12 @@ Each particle's scale will vary along this :ref:`CurveTexture<class_CurveTexture .. rst-class:: classref-property -:ref:`float<class_float>` **scale_max** = ``1.0`` +:ref:`float<class_float>` **scale_max** = ``1.0`` :ref:`🔗<class_ParticleProcessMaterial_property_scale_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum initial scale applied to each particle. @@ -1568,12 +1880,12 @@ Maximum initial scale applied to each particle. .. rst-class:: classref-property -:ref:`float<class_float>` **scale_min** = ``1.0`` +:ref:`float<class_float>` **scale_min** = ``1.0`` :ref:`🔗<class_ParticleProcessMaterial_property_scale_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`scale_max<class_ParticleProcessMaterial_property_scale_max>`. @@ -1581,16 +1893,71 @@ Minimum equivalent of :ref:`scale_max<class_ParticleProcessMaterial_property_sca ---- +.. _class_ParticleProcessMaterial_property_scale_over_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **scale_over_velocity_curve** :ref:`🔗<class_ParticleProcessMaterial_property_scale_over_velocity_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Either a :ref:`CurveTexture<class_CurveTexture>` or a :ref:`CurveXYZTexture<class_CurveXYZTexture>` that scales each particle based on its velocity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_over_velocity_max: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **scale_over_velocity_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_scale_over_velocity_max>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Maximum velocity value reference for :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>`. + +\ :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>` will be interpolated between :ref:`scale_over_velocity_min<class_ParticleProcessMaterial_property_scale_over_velocity_min>` and :ref:`scale_over_velocity_max<class_ParticleProcessMaterial_property_scale_over_velocity_max>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_over_velocity_min: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **scale_over_velocity_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_scale_over_velocity_min>` + +.. rst-class:: classref-property-setget + +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| + +Minimum velocity value reference for :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>`. + +\ :ref:`scale_over_velocity_curve<class_ParticleProcessMaterial_property_scale_over_velocity_curve>` will be interpolated between :ref:`scale_over_velocity_min<class_ParticleProcessMaterial_property_scale_over_velocity_min>` and :ref:`scale_over_velocity_max<class_ParticleProcessMaterial_property_scale_over_velocity_max>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_spread: .. rst-class:: classref-property -:ref:`float<class_float>` **spread** = ``45.0`` +:ref:`float<class_float>` **spread** = ``45.0`` :ref:`🔗<class_ParticleProcessMaterial_property_spread>` .. rst-class:: classref-property-setget -- void **set_spread** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_spread** **(** **)** +- |void| **set_spread**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_spread**\ (\ ) Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. @@ -1602,16 +1969,16 @@ Each particle's initial direction range from ``+spread`` to ``-spread`` degrees. .. rst-class:: classref-property -:ref:`int<class_int>` **sub_emitter_amount_at_collision** +:ref:`int<class_int>` **sub_emitter_amount_at_collision** :ref:`🔗<class_ParticleProcessMaterial_property_sub_emitter_amount_at_collision>` .. rst-class:: classref-property-setget -- void **set_sub_emitter_amount_at_collision** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sub_emitter_amount_at_collision** **(** **)** +- |void| **set_sub_emitter_amount_at_collision**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sub_emitter_amount_at_collision**\ (\ ) -Sub particle amount on collision. +The amount of particles to spawn from the subemitter node when a collision occurs. When combined with :ref:`COLLISION_HIDE_ON_CONTACT<class_ParticleProcessMaterial_constant_COLLISION_HIDE_ON_CONTACT>` on the main particles material, this can be used to achieve effects such as raindrops hitting the ground. -Maximum amount set in the sub particles emitter. +\ **Note:** This value shouldn't exceed :ref:`GPUParticles2D.amount<class_GPUParticles2D_property_amount>` or :ref:`GPUParticles3D.amount<class_GPUParticles3D_property_amount>` defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. .. rst-class:: classref-item-separator @@ -1621,16 +1988,16 @@ Maximum amount set in the sub particles emitter. .. rst-class:: classref-property -:ref:`int<class_int>` **sub_emitter_amount_at_end** +:ref:`int<class_int>` **sub_emitter_amount_at_end** :ref:`🔗<class_ParticleProcessMaterial_property_sub_emitter_amount_at_end>` .. rst-class:: classref-property-setget -- void **set_sub_emitter_amount_at_end** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sub_emitter_amount_at_end** **(** **)** +- |void| **set_sub_emitter_amount_at_end**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sub_emitter_amount_at_end**\ (\ ) -.. container:: contribute +The amount of particles to spawn from the subemitter node when the particle expires. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This value shouldn't exceed :ref:`GPUParticles2D.amount<class_GPUParticles2D_property_amount>` or :ref:`GPUParticles3D.amount<class_GPUParticles3D_property_amount>` defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. .. rst-class:: classref-item-separator @@ -1640,16 +2007,16 @@ Maximum amount set in the sub particles emitter. .. rst-class:: classref-property -:ref:`float<class_float>` **sub_emitter_frequency** +:ref:`float<class_float>` **sub_emitter_frequency** :ref:`🔗<class_ParticleProcessMaterial_property_sub_emitter_frequency>` .. rst-class:: classref-property-setget -- void **set_sub_emitter_frequency** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sub_emitter_frequency** **(** **)** +- |void| **set_sub_emitter_frequency**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sub_emitter_frequency**\ (\ ) -.. container:: contribute +The frequency at which particles should be emitted from the subemitter node. One particle will be spawned every :ref:`sub_emitter_frequency<class_ParticleProcessMaterial_property_sub_emitter_frequency>` seconds. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This value shouldn't exceed :ref:`GPUParticles2D.amount<class_GPUParticles2D_property_amount>` or :ref:`GPUParticles3D.amount<class_GPUParticles3D_property_amount>` defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. .. rst-class:: classref-item-separator @@ -1659,16 +2026,14 @@ Maximum amount set in the sub particles emitter. .. rst-class:: classref-property -:ref:`bool<class_bool>` **sub_emitter_keep_velocity** = ``false`` +:ref:`bool<class_bool>` **sub_emitter_keep_velocity** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_sub_emitter_keep_velocity>` .. rst-class:: classref-property-setget -- void **set_sub_emitter_keep_velocity** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_sub_emitter_keep_velocity** **(** **)** - -.. container:: contribute +- |void| **set_sub_emitter_keep_velocity**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_sub_emitter_keep_velocity**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, the subemitter inherits the parent particle's velocity when it spawns. .. rst-class:: classref-item-separator @@ -1678,16 +2043,14 @@ Maximum amount set in the sub particles emitter. .. rst-class:: classref-property -:ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **sub_emitter_mode** = ``0`` +:ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **sub_emitter_mode** = ``0`` :ref:`🔗<class_ParticleProcessMaterial_property_sub_emitter_mode>` .. rst-class:: classref-property-setget -- void **set_sub_emitter_mode** **(** :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` value **)** -- :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **get_sub_emitter_mode** **(** **)** +- |void| **set_sub_emitter_mode**\ (\ value\: :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>`\ ) +- :ref:`SubEmitterMode<enum_ParticleProcessMaterial_SubEmitterMode>` **get_sub_emitter_mode**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The particle subemitter mode (see :ref:`GPUParticles2D.sub_emitter<class_GPUParticles2D_property_sub_emitter>` and :ref:`GPUParticles3D.sub_emitter<class_GPUParticles3D_property_sub_emitter>`). .. rst-class:: classref-item-separator @@ -1697,12 +2060,12 @@ Maximum amount set in the sub particles emitter. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **tangential_accel_curve** +:ref:`Texture2D<class_Texture2D>` **tangential_accel_curve** :ref:`🔗<class_ParticleProcessMaterial_property_tangential_accel_curve>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's tangential acceleration will vary along this :ref:`CurveTexture<class_CurveTexture>`. @@ -1714,12 +2077,12 @@ Each particle's tangential acceleration will vary along this :ref:`CurveTexture< .. rst-class:: classref-property -:ref:`float<class_float>` **tangential_accel_max** = ``0.0`` +:ref:`float<class_float>` **tangential_accel_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_tangential_accel_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. @@ -1731,12 +2094,12 @@ Maximum tangential acceleration applied to each particle. Tangential acceleratio .. rst-class:: classref-property -:ref:`float<class_float>` **tangential_accel_min** = ``0.0`` +:ref:`float<class_float>` **tangential_accel_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_tangential_accel_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum equivalent of :ref:`tangential_accel_max<class_ParticleProcessMaterial_property_tangential_accel_max>`. @@ -1748,12 +2111,12 @@ Minimum equivalent of :ref:`tangential_accel_max<class_ParticleProcessMaterial_p .. rst-class:: classref-property -:ref:`bool<class_bool>` **turbulence_enabled** = ``false`` +:ref:`bool<class_bool>` **turbulence_enabled** = ``false`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_enabled>` .. rst-class:: classref-property-setget -- void **set_turbulence_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_turbulence_enabled** **(** **)** +- |void| **set_turbulence_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_turbulence_enabled**\ (\ ) If ``true``, enables turbulence for the particle system. Turbulence can be used to vary particle movement according to its position (based on a 3D noise pattern). In 3D, :ref:`GPUParticlesAttractorVectorField3D<class_GPUParticlesAttractorVectorField3D>` with :ref:`NoiseTexture3D<class_NoiseTexture3D>` can be used as an alternative to turbulence that works in world space and with multiple particle systems reacting in the same way. @@ -1767,12 +2130,12 @@ If ``true``, enables turbulence for the particle system. Turbulence can be used .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_influence_max** = ``0.1`` +:ref:`float<class_float>` **turbulence_influence_max** = ``0.1`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_influence_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum turbulence influence on each particle. @@ -1786,12 +2149,12 @@ The actual amount of turbulence influence on each particle is calculated as a ra .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_influence_min** = ``0.1`` +:ref:`float<class_float>` **turbulence_influence_min** = ``0.1`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_influence_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum turbulence influence on each particle. @@ -1805,12 +2168,12 @@ The actual amount of turbulence influence on each particle is calculated as a ra .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **turbulence_influence_over_life** +:ref:`Texture2D<class_Texture2D>` **turbulence_influence_over_life** :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_influence_over_life>` .. rst-class:: classref-property-setget -- void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** -- :ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Each particle's amount of turbulence will be influenced along this :ref:`CurveTexture<class_CurveTexture>` over its life time. @@ -1822,12 +2185,12 @@ Each particle's amount of turbulence will be influenced along this :ref:`CurveTe .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_initial_displacement_max** = ``0.0`` +:ref:`float<class_float>` **turbulence_initial_displacement_max** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_initial_displacement_max>` .. rst-class:: classref-property-setget -- void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Maximum displacement of each particle's spawn position by the turbulence. @@ -1841,12 +2204,12 @@ The actual amount of displacement will be a factor of the underlying turbulence .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_initial_displacement_min** = ``0.0`` +:ref:`float<class_float>` **turbulence_initial_displacement_min** = ``0.0`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_initial_displacement_min>` .. rst-class:: classref-property-setget -- void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +- |void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| Minimum displacement of each particle's spawn position by the turbulence. @@ -1860,12 +2223,12 @@ The actual amount of displacement will be a factor of the underlying turbulence .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_noise_scale** = ``9.0`` +:ref:`float<class_float>` **turbulence_noise_scale** = ``9.0`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_noise_scale>` .. rst-class:: classref-property-setget -- void **set_turbulence_noise_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_turbulence_noise_scale** **(** **)** +- |void| **set_turbulence_noise_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_turbulence_noise_scale**\ (\ ) This value controls the overall scale/frequency of the turbulence noise pattern. @@ -1879,12 +2242,12 @@ A small scale will result in smaller features with more detail while a high scal .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **turbulence_noise_speed** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **turbulence_noise_speed** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_noise_speed>` .. rst-class:: classref-property-setget -- void **set_turbulence_noise_speed** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_turbulence_noise_speed** **(** **)** +- |void| **set_turbulence_noise_speed**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_turbulence_noise_speed**\ (\ ) A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. @@ -1898,12 +2261,12 @@ The default value of ``Vector3(0, 0, 0)`` turns off the scrolling. .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_noise_speed_random** = ``0.2`` +:ref:`float<class_float>` **turbulence_noise_speed_random** = ``0.2`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_noise_speed_random>` .. rst-class:: classref-property-setget -- void **set_turbulence_noise_speed_random** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_turbulence_noise_speed_random** **(** **)** +- |void| **set_turbulence_noise_speed_random**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_turbulence_noise_speed_random**\ (\ ) The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. @@ -1917,15 +2280,49 @@ A value of 0.0 will result in a fixed pattern. .. rst-class:: classref-property -:ref:`float<class_float>` **turbulence_noise_strength** = ``1.0`` +:ref:`float<class_float>` **turbulence_noise_strength** = ``1.0`` :ref:`🔗<class_ParticleProcessMaterial_property_turbulence_noise_strength>` .. rst-class:: classref-property-setget -- void **set_turbulence_noise_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_turbulence_noise_strength** **(** **)** +- |void| **set_turbulence_noise_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_turbulence_noise_strength**\ (\ ) The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern. +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_velocity_limit_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **velocity_limit_curve** :ref:`🔗<class_ParticleProcessMaterial_property_velocity_limit_curve>` + +.. rst-class:: classref-property-setget + +- |void| **set_velocity_limit_curve**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_velocity_limit_curve**\ (\ ) + +A :ref:`CurveTexture<class_CurveTexture>` that defines the maximum velocity of a particle during its lifetime. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_velocity_pivot: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **velocity_pivot** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ParticleProcessMaterial_property_velocity_pivot>` + +.. rst-class:: classref-property-setget + +- |void| **set_velocity_pivot**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_velocity_pivot**\ (\ ) + +A pivot point used to calculate radial and orbital velocity of particles. + .. rst-class:: classref-section-separator ---- @@ -1935,11 +2332,25 @@ The turbulence noise strength. Increasing this will result in a stronger, more c Method Descriptions ------------------- +.. _class_ParticleProcessMaterial_method_get_param: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **get_param**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| :ref:`🔗<class_ParticleProcessMaterial_method_get_param>` + +Returns the minimum and maximum values of the given ``param`` as a vector. + +The ``x`` component of the returned vector corresponds to minimum and the ``y`` component corresponds to maximum. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_method_get_param_max: .. rst-class:: classref-method -:ref:`float<class_float>` **get_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +:ref:`float<class_float>` **get_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| :ref:`🔗<class_ParticleProcessMaterial_method_get_param_max>` Returns the maximum value range for the given parameter. @@ -1951,7 +2362,7 @@ Returns the maximum value range for the given parameter. .. rst-class:: classref-method -:ref:`float<class_float>` **get_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +:ref:`float<class_float>` **get_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| :ref:`🔗<class_ParticleProcessMaterial_method_get_param_min>` Returns the minimum value range for the given parameter. @@ -1963,7 +2374,7 @@ Returns the minimum value range for the given parameter. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`\ ) |const| :ref:`🔗<class_ParticleProcessMaterial_method_get_param_texture>` Returns the :ref:`Texture2D<class_Texture2D>` used by the specified parameter. @@ -1975,7 +2386,7 @@ Returns the :ref:`Texture2D<class_Texture2D>` used by the specified parameter. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag **)** |const| +:ref:`bool<class_bool>` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`\ ) |const| :ref:`🔗<class_ParticleProcessMaterial_method_get_particle_flag>` Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` for options. @@ -1983,11 +2394,25 @@ Returns ``true`` if the specified particle flag is enabled. See :ref:`ParticleFl ---- +.. _class_ParticleProcessMaterial_method_set_param: + +.. rst-class:: classref-method + +|void| **set_param**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_ParticleProcessMaterial_method_set_param>` + +Sets the minimum and maximum values of the given ``param``. + +The ``x`` component of the argument vector corresponds to minimum and the ``y`` component corresponds to maximum. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_method_set_param_max: .. rst-class:: classref-method -void **set_param_max** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** +|void| **set_param_max**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_ParticleProcessMaterial_method_set_param_max>` Sets the maximum value range for the given parameter. @@ -1999,7 +2424,7 @@ Sets the maximum value range for the given parameter. .. rst-class:: classref-method -void **set_param_min** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`float<class_float>` value **)** +|void| **set_param_min**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_ParticleProcessMaterial_method_set_param_min>` Sets the minimum value range for the given parameter. @@ -2011,7 +2436,7 @@ Sets the minimum value range for the given parameter. .. rst-class:: classref-method -void **set_param_texture** **(** :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>` param, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_param_texture**\ (\ param\: :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_ParticleProcessMaterial_method_set_param_texture>` Sets the :ref:`Texture2D<class_Texture2D>` for the specified :ref:`Parameter<enum_ParticleProcessMaterial_Parameter>`. @@ -2023,7 +2448,7 @@ Sets the :ref:`Texture2D<class_Texture2D>` for the specified :ref:`Parameter<enu .. rst-class:: classref-method -void **set_particle_flag** **(** :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` particle_flag, :ref:`bool<class_bool>` enable **)** +|void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ParticleProcessMaterial_method_set_particle_flag>` If ``true``, enables the specified particle flag. See :ref:`ParticleFlags<enum_ParticleProcessMaterial_ParticleFlags>` for options. @@ -2034,3 +2459,4 @@ If ``true``, enables the specified particle flag. See :ref:`ParticleFlags<enum_P .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_path2d.rst b/classes/class_path2d.rst index d6c027fb6ae..058f946639b 100644 --- a/classes/class_path2d.rst +++ b/classes/class_path2d.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Curve2D<class_Curve2D>` **curve** +:ref:`Curve2D<class_Curve2D>` **curve** :ref:`🔗<class_Path2D_property_curve>` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve2D<class_Curve2D>` value **)** -- :ref:`Curve2D<class_Curve2D>` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve2D<class_Curve2D>`\ ) +- :ref:`Curve2D<class_Curve2D>` **get_curve**\ (\ ) A :ref:`Curve2D<class_Curve2D>` describing the path. @@ -64,3 +64,4 @@ A :ref:`Curve2D<class_Curve2D>` describing the path. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_path3d.rst b/classes/class_path3d.rst index dd9b3e1e5b9..500c6ba958e 100644 --- a/classes/class_path3d.rst +++ b/classes/class_path3d.rst @@ -48,7 +48,7 @@ Signals .. rst-class:: classref-signal -**curve_changed** **(** **)** +**curve_changed**\ (\ ) :ref:`🔗<class_Path3D_signal_curve_changed>` Emitted when the :ref:`curve<class_Path3D_property_curve>` changes. @@ -65,12 +65,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Curve3D<class_Curve3D>` **curve** +:ref:`Curve3D<class_Curve3D>` **curve** :ref:`🔗<class_Path3D_property_curve>` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve3D<class_Curve3D>` value **)** -- :ref:`Curve3D<class_Curve3D>` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve3D<class_Curve3D>`\ ) +- :ref:`Curve3D<class_Curve3D>` **get_curve**\ (\ ) A :ref:`Curve3D<class_Curve3D>` describing the path. @@ -81,3 +81,4 @@ A :ref:`Curve3D<class_Curve3D>` describing the path. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pathfollow2d.rst b/classes/class_pathfollow2d.rst index c6de58a0b89..16ecfbdfd0f 100644 --- a/classes/class_pathfollow2d.rst +++ b/classes/class_pathfollow2d.rst @@ -60,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **cubic_interp** = ``true`` +:ref:`bool<class_bool>` **cubic_interp** = ``true`` :ref:`🔗<class_PathFollow2D_property_cubic_interp>` .. rst-class:: classref-property-setget -- void **set_cubic_interpolation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_cubic_interpolation** **(** **)** +- |void| **set_cubic_interpolation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_cubic_interpolation**\ (\ ) If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise. @@ -81,12 +81,12 @@ There are two answers to this problem: either increase the number of cached poin .. rst-class:: classref-property -:ref:`float<class_float>` **h_offset** = ``0.0`` +:ref:`float<class_float>` **h_offset** = ``0.0`` :ref:`🔗<class_PathFollow2D_property_h_offset>` .. rst-class:: classref-property-setget -- void **set_h_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_h_offset** **(** **)** +- |void| **set_h_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_h_offset**\ (\ ) The node's offset along the curve. @@ -98,12 +98,12 @@ The node's offset along the curve. .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``true`` +:ref:`bool<class_bool>` **loop** = ``true`` :ref:`🔗<class_PathFollow2D_property_loop>` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_loop**\ (\ ) If ``true``, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. @@ -115,12 +115,12 @@ If ``true``, any offset outside the path's length will wrap around, instead of s .. rst-class:: classref-property -:ref:`float<class_float>` **progress** = ``0.0`` +:ref:`float<class_float>` **progress** = ``0.0`` :ref:`🔗<class_PathFollow2D_property_progress>` .. rst-class:: classref-property-setget -- void **set_progress** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_progress** **(** **)** +- |void| **set_progress**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_progress**\ (\ ) The distance along the path, in pixels. Changing this value sets this node's position to a point within the path. @@ -132,12 +132,12 @@ The distance along the path, in pixels. Changing this value sets this node's pos .. rst-class:: classref-property -:ref:`float<class_float>` **progress_ratio** = ``0.0`` +:ref:`float<class_float>` **progress_ratio** = ``0.0`` :ref:`🔗<class_PathFollow2D_property_progress_ratio>` .. rst-class:: classref-property-setget -- void **set_progress_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_progress_ratio** **(** **)** +- |void| **set_progress_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_progress_ratio**\ (\ ) The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length. @@ -149,12 +149,12 @@ The distance along the path as a number in the range 0.0 (for the first vertex) .. rst-class:: classref-property -:ref:`bool<class_bool>` **rotates** = ``true`` +:ref:`bool<class_bool>` **rotates** = ``true`` :ref:`🔗<class_PathFollow2D_property_rotates>` .. rst-class:: classref-property-setget -- void **set_rotates** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_rotating** **(** **)** +- |void| **set_rotates**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_rotating**\ (\ ) If ``true``, this node rotates to follow the path, with the +X direction facing forward on the path. @@ -166,12 +166,12 @@ If ``true``, this node rotates to follow the path, with the +X direction facing .. rst-class:: classref-property -:ref:`float<class_float>` **v_offset** = ``0.0`` +:ref:`float<class_float>` **v_offset** = ``0.0`` :ref:`🔗<class_PathFollow2D_property_v_offset>` .. rst-class:: classref-property-setget -- void **set_v_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_v_offset** **(** **)** +- |void| **set_v_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_v_offset**\ (\ ) The node's offset perpendicular to the curve. @@ -182,3 +182,4 @@ The node's offset perpendicular to the curve. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pathfollow3d.rst b/classes/class_pathfollow3d.rst index 2b8455ddf2d..1323bd70faf 100644 --- a/classes/class_pathfollow3d.rst +++ b/classes/class_pathfollow3d.rst @@ -59,9 +59,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`correct_posture<class_PathFollow3D_method_correct_posture>` **(** :ref:`Transform3D<class_Transform3D>` transform, :ref:`RotationMode<enum_PathFollow3D_RotationMode>` rotation_mode **)** |static| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`correct_posture<class_PathFollow3D_method_correct_posture>`\ (\ transform\: :ref:`Transform3D<class_Transform3D>`, rotation_mode\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ ) |static| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -76,7 +76,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **RotationMode**: +enum **RotationMode**: :ref:`🔗<enum_PathFollow3D_RotationMode>` .. _class_PathFollow3D_constant_ROTATION_NONE: @@ -131,12 +131,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **cubic_interp** = ``true`` +:ref:`bool<class_bool>` **cubic_interp** = ``true`` :ref:`🔗<class_PathFollow3D_property_cubic_interp>` .. rst-class:: classref-property-setget -- void **set_cubic_interpolation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_cubic_interpolation** **(** **)** +- |void| **set_cubic_interpolation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_cubic_interpolation**\ (\ ) If ``true``, the position between two cached points is interpolated cubically, and linearly otherwise. @@ -152,12 +152,12 @@ There are two answers to this problem: either increase the number of cached poin .. rst-class:: classref-property -:ref:`float<class_float>` **h_offset** = ``0.0`` +:ref:`float<class_float>` **h_offset** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_h_offset>` .. rst-class:: classref-property-setget -- void **set_h_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_h_offset** **(** **)** +- |void| **set_h_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_h_offset**\ (\ ) The node's offset along the curve. @@ -169,12 +169,12 @@ The node's offset along the curve. .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``true`` +:ref:`bool<class_bool>` **loop** = ``true`` :ref:`🔗<class_PathFollow3D_property_loop>` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_loop**\ (\ ) If ``true``, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. @@ -186,12 +186,12 @@ If ``true``, any offset outside the path's length will wrap around, instead of s .. rst-class:: classref-property -:ref:`float<class_float>` **progress** = ``0.0`` +:ref:`float<class_float>` **progress** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_progress>` .. rst-class:: classref-property-setget -- void **set_progress** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_progress** **(** **)** +- |void| **set_progress**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_progress**\ (\ ) The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path. @@ -203,12 +203,12 @@ The distance from the first vertex, measured in 3D units along the path. Changin .. rst-class:: classref-property -:ref:`float<class_float>` **progress_ratio** = ``0.0`` +:ref:`float<class_float>` **progress_ratio** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_progress_ratio>` .. rst-class:: classref-property-setget -- void **set_progress_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_progress_ratio** **(** **)** +- |void| **set_progress_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_progress_ratio**\ (\ ) 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 progress within the path, as the progress supplied is multiplied internally by the path's length. @@ -220,12 +220,12 @@ The distance from the first vertex, considering 0.0 as the first vertex and 1.0 .. rst-class:: classref-property -:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **rotation_mode** = ``3`` +:ref:`RotationMode<enum_PathFollow3D_RotationMode>` **rotation_mode** = ``3`` :ref:`🔗<class_PathFollow3D_property_rotation_mode>` .. rst-class:: classref-property-setget -- void **set_rotation_mode** **(** :ref:`RotationMode<enum_PathFollow3D_RotationMode>` value **)** -- :ref:`RotationMode<enum_PathFollow3D_RotationMode>` **get_rotation_mode** **(** **)** +- |void| **set_rotation_mode**\ (\ value\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ ) +- :ref:`RotationMode<enum_PathFollow3D_RotationMode>` **get_rotation_mode**\ (\ ) Allows or forbids rotation on one or more axes, depending on the :ref:`RotationMode<enum_PathFollow3D_RotationMode>` constants being used. @@ -237,12 +237,12 @@ Allows or forbids rotation on one or more axes, depending on the :ref:`RotationM .. rst-class:: classref-property -:ref:`bool<class_bool>` **tilt_enabled** = ``true`` +:ref:`bool<class_bool>` **tilt_enabled** = ``true`` :ref:`🔗<class_PathFollow3D_property_tilt_enabled>` .. rst-class:: classref-property-setget -- void **set_tilt_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_tilt_enabled** **(** **)** +- |void| **set_tilt_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_tilt_enabled**\ (\ ) If ``true``, the tilt property of :ref:`Curve3D<class_Curve3D>` takes effect. @@ -254,12 +254,12 @@ If ``true``, the tilt property of :ref:`Curve3D<class_Curve3D>` takes effect. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_model_front** = ``false`` +:ref:`bool<class_bool>` **use_model_front** = ``false`` :ref:`🔗<class_PathFollow3D_property_use_model_front>` .. rst-class:: classref-property-setget -- void **set_use_model_front** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_model_front** **(** **)** +- |void| **set_use_model_front**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_model_front**\ (\ ) If ``true``, the node moves on the travel path with orienting the +Z axis as forward. See also :ref:`Vector3.FORWARD<class_Vector3_constant_FORWARD>` and :ref:`Vector3.MODEL_FRONT<class_Vector3_constant_MODEL_FRONT>`. @@ -271,12 +271,12 @@ If ``true``, the node moves on the travel path with orienting the +Z axis as for .. rst-class:: classref-property -:ref:`float<class_float>` **v_offset** = ``0.0`` +:ref:`float<class_float>` **v_offset** = ``0.0`` :ref:`🔗<class_PathFollow3D_property_v_offset>` .. rst-class:: classref-property-setget -- void **set_v_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_v_offset** **(** **)** +- |void| **set_v_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_v_offset**\ (\ ) The node's offset perpendicular to the curve. @@ -293,7 +293,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **correct_posture** **(** :ref:`Transform3D<class_Transform3D>` transform, :ref:`RotationMode<enum_PathFollow3D_RotationMode>` rotation_mode **)** |static| +:ref:`Transform3D<class_Transform3D>` **correct_posture**\ (\ transform\: :ref:`Transform3D<class_Transform3D>`, rotation_mode\: :ref:`RotationMode<enum_PathFollow3D_RotationMode>`\ ) |static| :ref:`🔗<class_PathFollow3D_method_correct_posture>` Correct the ``transform``. ``rotation_mode`` implicitly specifies how posture (forward, up and sideway direction) is calculated. @@ -304,3 +304,4 @@ Correct the ``transform``. ``rotation_mode`` implicitly specifies how posture (f .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pckpacker.rst b/classes/class_pckpacker.rst index 0b78762ad92..019f889c9d8 100644 --- a/classes/class_pckpacker.rst +++ b/classes/class_pckpacker.rst @@ -33,7 +33,7 @@ The **PCKPacker** is used to create packages that can be loaded into a running p .. code-tab:: csharp - var packer = new PCKPacker(); + var packer = new PckPacker(); packer.PckStart("test.pck"); packer.AddFile("res://text.txt", "text.txt"); packer.Flush(); @@ -50,13 +50,13 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_file<class_PCKPacker_method_add_file>` **(** :ref:`String<class_String>` pck_path, :ref:`String<class_String>` source_path, :ref:`bool<class_bool>` encrypt=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`flush<class_PCKPacker_method_flush>` **(** :ref:`bool<class_bool>` verbose=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pck_start<class_PCKPacker_method_pck_start>` **(** :ref:`String<class_String>` pck_name, :ref:`int<class_int>` alignment=32, :ref:`String<class_String>` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool<class_bool>` encrypt_directory=false **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_file<class_PCKPacker_method_add_file>`\ (\ pck_path\: :ref:`String<class_String>`, source_path\: :ref:`String<class_String>`, encrypt\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`flush<class_PCKPacker_method_flush>`\ (\ verbose\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`pck_start<class_PCKPacker_method_pck_start>`\ (\ pck_name\: :ref:`String<class_String>`, alignment\: :ref:`int<class_int>` = 32, key\: :ref:`String<class_String>` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,7 +71,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **add_file** **(** :ref:`String<class_String>` pck_path, :ref:`String<class_String>` source_path, :ref:`bool<class_bool>` encrypt=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **add_file**\ (\ pck_path\: :ref:`String<class_String>`, source_path\: :ref:`String<class_String>`, encrypt\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PCKPacker_method_add_file>` Adds the ``source_path`` file to the current PCK package at the ``pck_path`` internal path (should start with ``res://``). @@ -83,7 +83,7 @@ Adds the ``source_path`` file to the current PCK package at the ``pck_path`` int .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **flush** **(** :ref:`bool<class_bool>` verbose=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **flush**\ (\ verbose\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PCKPacker_method_flush>` Writes the files specified using all :ref:`add_file<class_PCKPacker_method_add_file>` calls since the last flush. If ``verbose`` is ``true``, a list of files added will be printed to the console for easier debugging. @@ -95,7 +95,7 @@ Writes the files specified using all :ref:`add_file<class_PCKPacker_method_add_f .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **pck_start** **(** :ref:`String<class_String>` pck_name, :ref:`int<class_int>` alignment=32, :ref:`String<class_String>` key="0000000000000000000000000000000000000000000000000000000000000000", :ref:`bool<class_bool>` encrypt_directory=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **pck_start**\ (\ pck_name\: :ref:`String<class_String>`, alignment\: :ref:`int<class_int>` = 32, key\: :ref:`String<class_String>` = "0000000000000000000000000000000000000000000000000000000000000000", encrypt_directory\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PCKPacker_method_pck_start>` Creates a new PCK file with the name ``pck_name``. The ``.pck`` file extension isn't added automatically, so it should be part of ``pck_name`` (even though it's not required). @@ -106,3 +106,4 @@ Creates a new PCK file with the name ``pck_name``. The ``.pck`` file extension i .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_performance.rst b/classes/class_performance.rst index bf0f21d200a..8928c4e8237 100644 --- a/classes/class_performance.rst +++ b/classes/class_performance.rst @@ -37,21 +37,21 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_custom_monitor<class_Performance_method_add_custom_monitor>` **(** :ref:`StringName<class_StringName>` id, :ref:`Callable<class_Callable>` callable, :ref:`Array<class_Array>` arguments=[] **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_custom_monitor<class_Performance_method_get_custom_monitor>` **(** :ref:`StringName<class_StringName>` id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`get_custom_monitor_names<class_Performance_method_get_custom_monitor_names>` **(** **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_monitor<class_Performance_method_get_monitor>` **(** :ref:`Monitor<enum_Performance_Monitor>` monitor **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_monitor_modification_time<class_Performance_method_get_monitor_modification_time>` **(** **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_custom_monitor<class_Performance_method_has_custom_monitor>` **(** :ref:`StringName<class_StringName>` id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_custom_monitor<class_Performance_method_remove_custom_monitor>` **(** :ref:`StringName<class_StringName>` id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_custom_monitor<class_Performance_method_add_custom_monitor>`\ (\ id\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`, arguments\: :ref:`Array<class_Array>` = []\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_custom_monitor<class_Performance_method_get_custom_monitor>`\ (\ id\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_custom_monitor_names<class_Performance_method_get_custom_monitor_names>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_monitor<class_Performance_method_get_monitor>`\ (\ monitor\: :ref:`Monitor<enum_Performance_Monitor>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_monitor_modification_time<class_Performance_method_get_monitor_modification_time>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_custom_monitor<class_Performance_method_has_custom_monitor>`\ (\ id\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_custom_monitor<class_Performance_method_remove_custom_monitor>`\ (\ id\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,7 +66,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Monitor**: +enum **Monitor**: :ref:`🔗<enum_Performance_Monitor>` .. _class_Performance_constant_TIME_FPS: @@ -258,7 +258,7 @@ Number of islands in the 3D physics engine. *Lower is better.* :ref:`Monitor<enum_Performance_Monitor>` **AUDIO_OUTPUT_LATENCY** = ``23`` -Output latency of the :ref:`AudioServer<class_AudioServer>`. *Lower is better.* +Output latency of the :ref:`AudioServer<class_AudioServer>`. Equivalent to calling :ref:`AudioServer.get_output_latency<class_AudioServer_method_get_output_latency>`, it is not recommended to call this every frame. .. _class_Performance_constant_NAVIGATION_ACTIVE_MAPS: @@ -353,7 +353,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_custom_monitor** **(** :ref:`StringName<class_StringName>` id, :ref:`Callable<class_Callable>` callable, :ref:`Array<class_Array>` arguments=[] **)** +|void| **add_custom_monitor**\ (\ id\: :ref:`StringName<class_StringName>`, callable\: :ref:`Callable<class_Callable>`, arguments\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_Performance_method_add_custom_monitor>` Adds a custom monitor with the name ``id``. You can specify the category of the monitor using slash delimiters in ``id`` (for example: ``"Game/NumberOfNPCs"``). If there is more than one slash delimiter, then the default category is used. The default category is ``"Custom"``. Prints an error if given ``id`` is already present. @@ -421,7 +421,7 @@ Callables are called with arguments supplied in argument array. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_custom_monitor** **(** :ref:`StringName<class_StringName>` id **)** +:ref:`Variant<class_Variant>` **get_custom_monitor**\ (\ id\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Performance_method_get_custom_monitor>` Returns the value of custom monitor with given ``id``. The callable is called to get the value of custom monitor. See also :ref:`has_custom_monitor<class_Performance_method_has_custom_monitor>`. Prints an error if the given ``id`` is absent. @@ -433,7 +433,7 @@ Returns the value of custom monitor with given ``id``. The callable is called to .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **get_custom_monitor_names** **(** **)** +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_custom_monitor_names**\ (\ ) :ref:`🔗<class_Performance_method_get_custom_monitor_names>` Returns the names of active custom monitors in an :ref:`Array<class_Array>`. @@ -445,7 +445,7 @@ Returns the names of active custom monitors in an :ref:`Array<class_Array>`. .. rst-class:: classref-method -:ref:`float<class_float>` **get_monitor** **(** :ref:`Monitor<enum_Performance_Monitor>` monitor **)** |const| +:ref:`float<class_float>` **get_monitor**\ (\ monitor\: :ref:`Monitor<enum_Performance_Monitor>`\ ) |const| :ref:`🔗<class_Performance_method_get_monitor>` Returns the value of one of the available built-in monitors. You should provide one of the :ref:`Monitor<enum_Performance_Monitor>` constants as the argument, like this: @@ -472,7 +472,7 @@ See :ref:`get_custom_monitor<class_Performance_method_get_custom_monitor>` to qu .. rst-class:: classref-method -:ref:`int<class_int>` **get_monitor_modification_time** **(** **)** +:ref:`int<class_int>` **get_monitor_modification_time**\ (\ ) :ref:`🔗<class_Performance_method_get_monitor_modification_time>` Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to :ref:`Time.get_ticks_usec<class_Time_method_get_ticks_usec>` when the monitor is updated. @@ -484,7 +484,7 @@ Returns the last tick in which custom monitor was added/removed (in microseconds .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_custom_monitor** **(** :ref:`StringName<class_StringName>` id **)** +:ref:`bool<class_bool>` **has_custom_monitor**\ (\ id\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Performance_method_has_custom_monitor>` Returns ``true`` if custom monitor with the given ``id`` is present, ``false`` otherwise. @@ -496,7 +496,7 @@ Returns ``true`` if custom monitor with the given ``id`` is present, ``false`` o .. rst-class:: classref-method -void **remove_custom_monitor** **(** :ref:`StringName<class_StringName>` id **)** +|void| **remove_custom_monitor**\ (\ id\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Performance_method_remove_custom_monitor>` Removes the custom monitor with given ``id``. Prints an error if the given ``id`` is already absent. @@ -507,3 +507,4 @@ Removes the custom monitor with given ``id``. Prints an error if the given ``id` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicalbone2d.rst b/classes/class_physicalbone2d.rst index 4464986d426..9f663ff57b0 100644 --- a/classes/class_physicalbone2d.rst +++ b/classes/class_physicalbone2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: ragdoll + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -53,11 +56,11 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`Joint2D<class_Joint2D>` | :ref:`get_joint<class_PhysicalBone2D_method_get_joint>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone2D_method_is_simulating_physics>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`Joint2D<class_Joint2D>` | :ref:`get_joint<class_PhysicalBone2D_method_get_joint>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone2D_method_is_simulating_physics>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,12 +75,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **auto_configure_joint** = ``true`` +:ref:`bool<class_bool>` **auto_configure_joint** = ``true`` :ref:`🔗<class_PhysicalBone2D_property_auto_configure_joint>` .. rst-class:: classref-property-setget -- void **set_auto_configure_joint** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_auto_configure_joint** **(** **)** +- |void| **set_auto_configure_joint**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_auto_configure_joint**\ (\ ) If ``true``, the **PhysicalBone2D** will automatically configure the first :ref:`Joint2D<class_Joint2D>` child node. The automatic configuration is limited to setting up the node properties and positioning the :ref:`Joint2D<class_Joint2D>`. @@ -89,12 +92,12 @@ If ``true``, the **PhysicalBone2D** will automatically configure the first :ref: .. rst-class:: classref-property -:ref:`int<class_int>` **bone2d_index** = ``-1`` +:ref:`int<class_int>` **bone2d_index** = ``-1`` :ref:`🔗<class_PhysicalBone2D_property_bone2d_index>` .. rst-class:: classref-property-setget -- void **set_bone2d_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bone2d_index** **(** **)** +- |void| **set_bone2d_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bone2d_index**\ (\ ) The index of the :ref:`Bone2D<class_Bone2D>` that this **PhysicalBone2D** should simulate. @@ -106,12 +109,12 @@ The index of the :ref:`Bone2D<class_Bone2D>` that this **PhysicalBone2D** should .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **bone2d_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **bone2d_nodepath** = ``NodePath("")`` :ref:`🔗<class_PhysicalBone2D_property_bone2d_nodepath>` .. rst-class:: classref-property-setget -- void **set_bone2d_nodepath** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_bone2d_nodepath** **(** **)** +- |void| **set_bone2d_nodepath**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_bone2d_nodepath**\ (\ ) The :ref:`NodePath<class_NodePath>` to the :ref:`Bone2D<class_Bone2D>` that this **PhysicalBone2D** should simulate. @@ -123,12 +126,12 @@ The :ref:`NodePath<class_NodePath>` to the :ref:`Bone2D<class_Bone2D>` that this .. rst-class:: classref-property -:ref:`bool<class_bool>` **follow_bone_when_simulating** = ``false`` +:ref:`bool<class_bool>` **follow_bone_when_simulating** = ``false`` :ref:`🔗<class_PhysicalBone2D_property_follow_bone_when_simulating>` .. rst-class:: classref-property-setget -- void **set_follow_bone_when_simulating** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_follow_bone_when_simulating** **(** **)** +- |void| **set_follow_bone_when_simulating**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_follow_bone_when_simulating**\ (\ ) If ``true``, the **PhysicalBone2D** will keep the transform of the bone it is bound to when simulating physics. @@ -140,12 +143,12 @@ If ``true``, the **PhysicalBone2D** will keep the transform of the bone it is bo .. rst-class:: classref-property -:ref:`bool<class_bool>` **simulate_physics** = ``false`` +:ref:`bool<class_bool>` **simulate_physics** = ``false`` :ref:`🔗<class_PhysicalBone2D_property_simulate_physics>` .. rst-class:: classref-property-setget -- void **set_simulate_physics** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_simulate_physics** **(** **)** +- |void| **set_simulate_physics**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_simulate_physics**\ (\ ) If ``true``, the **PhysicalBone2D** will start simulating using physics. If ``false``, the **PhysicalBone2D** will follow the transform of the :ref:`Bone2D<class_Bone2D>` node. @@ -164,7 +167,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Joint2D<class_Joint2D>` **get_joint** **(** **)** |const| +:ref:`Joint2D<class_Joint2D>` **get_joint**\ (\ ) |const| :ref:`🔗<class_PhysicalBone2D_method_get_joint>` Returns the first :ref:`Joint2D<class_Joint2D>` child node, if one exists. This is mainly a helper function to make it easier to get the :ref:`Joint2D<class_Joint2D>` that the **PhysicalBone2D** is autoconfiguring. @@ -176,7 +179,7 @@ Returns the first :ref:`Joint2D<class_Joint2D>` child node, if one exists. This .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_simulating_physics** **(** **)** |const| +:ref:`bool<class_bool>` **is_simulating_physics**\ (\ ) |const| :ref:`🔗<class_PhysicalBone2D_method_is_simulating_physics>` Returns a boolean that indicates whether the **PhysicalBone2D** is running and simulating using the Godot 2D physics engine. When ``true``, the PhysicalBone2D node is using physics. @@ -187,3 +190,4 @@ Returns a boolean that indicates whether the **PhysicalBone2D** is running and s .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicalbone3d.rst b/classes/class_physicalbone3d.rst index a2a8288ba79..2325c9a540b 100644 --- a/classes/class_physicalbone3d.rst +++ b/classes/class_physicalbone3d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: ragdoll + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -21,6 +24,8 @@ Description The **PhysicalBone3D** node is a physics body that can be used to make bones in a :ref:`Skeleton3D<class_Skeleton3D>` react to physics. +\ **Note:** In order to detect physical bones with raycasts, the :ref:`SkeletonModifier3D.active<class_SkeletonModifier3D_property_active>` property of the parent :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>` must be ``true`` and the :ref:`Skeleton3D<class_Skeleton3D>`'s bone must be assigned to **PhysicalBone3D** correctly; it means that :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>` should return a valid id (``>= 0``). + .. rst-class:: classref-reftable-group Properties @@ -71,19 +76,19 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces<class_PhysicalBone3D_method__integrate_forces>` **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse<class_PhysicalBone3D_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone3D_method_get_simulate_physics>` **(** **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone3D_method_is_simulating_physics>` **(** **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_impulse<class_PhysicalBone3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_impulse<class_PhysicalBone3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone3D_method_get_bone_id>`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone3D_method_get_simulate_physics>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone3D_method_is_simulating_physics>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,7 +103,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DampMode**: +enum **DampMode**: :ref:`🔗<enum_PhysicalBone3D_DampMode>` .. _class_PhysicalBone3D_constant_DAMP_MODE_COMBINE: @@ -124,7 +129,7 @@ In this mode, the body's damping value replaces any value set in areas or the de .. rst-class:: classref-enumeration -enum **JointType**: +enum **JointType**: :ref:`🔗<enum_PhysicalBone3D_JointType>` .. _class_PhysicalBone3D_constant_JOINT_TYPE_NONE: @@ -132,6 +137,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_NONE** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicalBone3D_constant_JOINT_TYPE_PIN: @@ -140,6 +149,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_PIN** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicalBone3D_constant_JOINT_TYPE_CONE: @@ -148,6 +161,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_CONE** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicalBone3D_constant_JOINT_TYPE_HINGE: @@ -156,6 +173,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_HINGE** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicalBone3D_constant_JOINT_TYPE_SLIDER: @@ -164,6 +185,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_SLIDER** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicalBone3D_constant_JOINT_TYPE_6DOF: @@ -172,6 +197,10 @@ enum **JointType**: :ref:`JointType<enum_PhysicalBone3D_JointType>` **JOINT_TYPE_6DOF** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -187,12 +216,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_damp** = ``0.0`` +:ref:`float<class_float>` **angular_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp>` .. rst-class:: classref-property-setget -- void **set_angular_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_angular_damp** **(** **)** +- |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_damp**\ (\ ) Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>`, you can set :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` to be added to or to replace the body's damping value. @@ -206,12 +235,12 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_ .. rst-class:: classref-property -:ref:`DampMode<enum_PhysicalBone3D_DampMode>` **angular_damp_mode** = ``0`` +:ref:`DampMode<enum_PhysicalBone3D_DampMode>` **angular_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_angular_damp_mode>` .. rst-class:: classref-property-setget -- void **set_angular_damp_mode** **(** :ref:`DampMode<enum_PhysicalBone3D_DampMode>` value **)** -- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_angular_damp_mode** **(** **)** +- |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ ) +- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_angular_damp_mode**\ (\ ) Defines how :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values. @@ -223,12 +252,12 @@ Defines how :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` is a .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ ) The PhysicalBone3D's rotational velocity in *radians* per second. @@ -240,12 +269,12 @@ The PhysicalBone3D's rotational velocity in *radians* per second. .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **body_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **body_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_body_offset>` .. rst-class:: classref-property-setget -- void **set_body_offset** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_body_offset** **(** **)** +- |void| **set_body_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_body_offset**\ (\ ) Sets the body's transform. @@ -257,15 +286,17 @@ Sets the body's transform. .. rst-class:: classref-property -:ref:`float<class_float>` **bounce** = ``0.0`` +:ref:`float<class_float>` **bounce** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_bounce>` .. rst-class:: classref-property-setget -- void **set_bounce** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bounce** **(** **)** +- |void| **set_bounce**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bounce**\ (\ ) The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). +\ **Note:** Even with :ref:`bounce<class_PhysicalBone3D_property_bounce>` set to ``1.0``, some energy will be lost over time due to linear and angular damping. To have a **PhysicalBone3D** that preserves all its energy over time, set :ref:`bounce<class_PhysicalBone3D_property_bounce>` to ``1.0``, :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>` to :ref:`DAMP_MODE_REPLACE<class_PhysicalBone3D_constant_DAMP_MODE_REPLACE>`, :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` to ``0.0``, :ref:`angular_damp_mode<class_PhysicalBone3D_property_angular_damp_mode>` to :ref:`DAMP_MODE_REPLACE<class_PhysicalBone3D_constant_DAMP_MODE_REPLACE>`, and :ref:`angular_damp<class_PhysicalBone3D_property_angular_damp>` to ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -274,12 +305,12 @@ The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounci .. rst-class:: classref-property -:ref:`bool<class_bool>` **can_sleep** = ``true`` +:ref:`bool<class_bool>` **can_sleep** = ``true`` :ref:`🔗<class_PhysicalBone3D_property_can_sleep>` .. rst-class:: classref-property-setget -- void **set_can_sleep** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_able_to_sleep** **(** **)** +- |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ ) If ``true``, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force. @@ -291,14 +322,16 @@ If ``true``, the body is deactivated when there is no movement, so it will not t .. rst-class:: classref-property -:ref:`bool<class_bool>` **custom_integrator** = ``false`` +:ref:`bool<class_bool>` **custom_integrator** = ``false`` :ref:`🔗<class_PhysicalBone3D_property_custom_integrator>` .. rst-class:: classref-property-setget -- void **set_use_custom_integrator** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_custom_integrator** **(** **)** +- |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ ) + +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>` method, if that virtual method is overridden. -If ``true``, 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 :ref:`_integrate_forces<class_PhysicalBone3D_method__integrate_forces>` function, if defined. +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>` internally. .. rst-class:: classref-item-separator @@ -308,12 +341,12 @@ If ``true``, internal force integration will be disabled (like gravity or air fr .. rst-class:: classref-property -:ref:`float<class_float>` **friction** = ``1.0`` +:ref:`float<class_float>` **friction** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_friction>` .. rst-class:: classref-property-setget -- void **set_friction** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_friction** **(** **)** +- |void| **set_friction**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_friction**\ (\ ) The body's friction, from ``0`` (frictionless) to ``1`` (max friction). @@ -325,12 +358,12 @@ The body's friction, from ``0`` (frictionless) to ``1`` (max friction). .. rst-class:: classref-property -:ref:`float<class_float>` **gravity_scale** = ``1.0`` +:ref:`float<class_float>` **gravity_scale** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_gravity_scale>` .. rst-class:: classref-property-setget -- void **set_gravity_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gravity_scale** **(** **)** +- |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gravity_scale**\ (\ ) This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. @@ -342,12 +375,12 @@ This is multiplied by the global 3D gravity setting found in **Project > Project .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **joint_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **joint_offset** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_joint_offset>` .. rst-class:: classref-property-setget -- void **set_joint_offset** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_joint_offset** **(** **)** +- |void| **set_joint_offset**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_joint_offset**\ (\ ) Sets the joint's transform. @@ -359,12 +392,12 @@ Sets the joint's transform. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **joint_rotation** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **joint_rotation** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_joint_rotation>` .. rst-class:: classref-property-setget -- void **set_joint_rotation** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_joint_rotation** **(** **)** +- |void| **set_joint_rotation**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_joint_rotation**\ (\ ) Sets the joint's rotation in radians. @@ -376,12 +409,12 @@ Sets the joint's rotation in radians. .. rst-class:: classref-property -:ref:`JointType<enum_PhysicalBone3D_JointType>` **joint_type** = ``0`` +:ref:`JointType<enum_PhysicalBone3D_JointType>` **joint_type** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_joint_type>` .. rst-class:: classref-property-setget -- void **set_joint_type** **(** :ref:`JointType<enum_PhysicalBone3D_JointType>` value **)** -- :ref:`JointType<enum_PhysicalBone3D_JointType>` **get_joint_type** **(** **)** +- |void| **set_joint_type**\ (\ value\: :ref:`JointType<enum_PhysicalBone3D_JointType>`\ ) +- :ref:`JointType<enum_PhysicalBone3D_JointType>` **get_joint_type**\ (\ ) Sets the joint type. See :ref:`JointType<enum_PhysicalBone3D_JointType>` for possible values. @@ -393,12 +426,12 @@ Sets the joint type. See :ref:`JointType<enum_PhysicalBone3D_JointType>` for pos .. rst-class:: classref-property -:ref:`float<class_float>` **linear_damp** = ``0.0`` +:ref:`float<class_float>` **linear_damp** = ``0.0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp>` .. rst-class:: classref-property-setget -- void **set_linear_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_linear_damp** **(** **)** +- |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_linear_damp**\ (\ ) Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`linear_damp_mode<class_PhysicalBone3D_property_linear_damp_mode>`, you can set :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` to be added to or to replace the body's damping value. @@ -412,12 +445,12 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`DampMode<enum_PhysicalBone3D_DampMode>` **linear_damp_mode** = ``0`` +:ref:`DampMode<enum_PhysicalBone3D_DampMode>` **linear_damp_mode** = ``0`` :ref:`🔗<class_PhysicalBone3D_property_linear_damp_mode>` .. rst-class:: classref-property-setget -- void **set_linear_damp_mode** **(** :ref:`DampMode<enum_PhysicalBone3D_DampMode>` value **)** -- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_linear_damp_mode** **(** **)** +- |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_PhysicalBone3D_DampMode>`\ ) +- :ref:`DampMode<enum_PhysicalBone3D_DampMode>` **get_linear_damp_mode**\ (\ ) Defines how :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` is applied. See :ref:`DampMode<enum_PhysicalBone3D_DampMode>` for possible values. @@ -429,14 +462,14 @@ Defines how :ref:`linear_damp<class_PhysicalBone3D_property_linear_damp>` is app .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicalBone3D_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ ) -The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_PhysicalBone3D_method__integrate_forces>` as your process loop for precise control of the body state. +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_PhysicalBone3D_private_method__integrate_forces>` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -446,12 +479,12 @@ The body's linear velocity in units per second. Can be used sporadically, but ** .. rst-class:: classref-property -:ref:`float<class_float>` **mass** = ``1.0`` +:ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_PhysicalBone3D_property_mass>` .. rst-class:: classref-property-setget -- void **set_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mass** **(** **)** +- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mass**\ (\ ) The body's mass. @@ -464,13 +497,13 @@ The body's mass. Method Descriptions ------------------- -.. _class_PhysicalBone3D_method__integrate_forces: +.. _class_PhysicalBone3D_private_method__integrate_forces: .. rst-class:: classref-method -void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual| +|void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| :ref:`🔗<class_PhysicalBone3D_private_method__integrate_forces>` -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 :ref:`custom_integrator<class_PhysicalBone3D_property_custom_integrator>` property 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 is called before the standard force integration, but the :ref:`custom_integrator<class_PhysicalBone3D_property_custom_integrator>` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator @@ -480,7 +513,7 @@ Called during physics processing, allowing you to read and safely modify the sim .. rst-class:: classref-method -void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** +|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicalBone3D_method_apply_central_impulse>` .. container:: contribute @@ -494,7 +527,7 @@ void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** .. rst-class:: classref-method -void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicalBone3D_method_apply_impulse>` .. container:: contribute @@ -508,7 +541,7 @@ void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_id** **(** **)** |const| +:ref:`int<class_int>` **get_bone_id**\ (\ ) |const| :ref:`🔗<class_PhysicalBone3D_method_get_bone_id>` .. container:: contribute @@ -522,7 +555,7 @@ void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_simulate_physics** **(** **)** +:ref:`bool<class_bool>` **get_simulate_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_get_simulate_physics>` .. container:: contribute @@ -536,7 +569,7 @@ void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_simulating_physics** **(** **)** +:ref:`bool<class_bool>` **is_simulating_physics**\ (\ ) :ref:`🔗<class_PhysicalBone3D_method_is_simulating_physics>` .. container:: contribute @@ -549,3 +582,4 @@ void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicalbonesimulator3d.rst b/classes/class_physicalbonesimulator3d.rst new file mode 100644 index 00000000000..33817f8a26c --- /dev/null +++ b/classes/class_physicalbonesimulator3d.rst @@ -0,0 +1,122 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/PhysicalBoneSimulator3D.xml. + +.. _class_PhysicalBoneSimulator3D: + +PhysicalBoneSimulator3D +======================= + +**Inherits:** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +Node that can be the parent of :ref:`PhysicalBone3D<class_PhysicalBone3D>` and can apply the simulation results to :ref:`Skeleton3D<class_Skeleton3D>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Node that can be the parent of :ref:`PhysicalBone3D<class_PhysicalBone3D>` and can apply the simulation results to :ref:`Skeleton3D<class_Skeleton3D>`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBoneSimulator3D_method_is_simulating_physics>`\ (\ ) |const| | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_add_collision_exception<class_PhysicalBoneSimulator3D_method_physical_bones_add_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_remove_collision_exception<class_PhysicalBoneSimulator3D_method_physical_bones_remove_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_start_simulation<class_PhysicalBoneSimulator3D_method_physical_bones_start_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_stop_simulation<class_PhysicalBoneSimulator3D_method_physical_bones_stop_simulation>`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_PhysicalBoneSimulator3D_method_is_simulating_physics: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_simulating_physics**\ (\ ) |const| :ref:`🔗<class_PhysicalBoneSimulator3D_method_is_simulating_physics>` + +Returns a boolean that indicates whether the **PhysicalBoneSimulator3D** is running and simulating. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_add_collision_exception: + +.. rst-class:: classref-method + +|void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicalBoneSimulator3D_method_physical_bones_add_collision_exception>` + +Adds a collision exception to the physical bone. + +Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_remove_collision_exception: + +.. rst-class:: classref-method + +|void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicalBoneSimulator3D_method_physical_bones_remove_collision_exception>` + +Removes a collision exception to the physical bone. + +Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_start_simulation: + +.. rst-class:: classref-method + +|void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_PhysicalBoneSimulator3D_method_physical_bones_start_simulation>` + +Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to start simulating and reacting to the physics world. + +Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicalBoneSimulator3D_method_physical_bones_stop_simulation: + +.. rst-class:: classref-method + +|void| **physical_bones_stop_simulation**\ (\ ) :ref:`🔗<class_PhysicalBoneSimulator3D_method_physical_bones_stop_simulation>` + +Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to stop simulating. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicalskymaterial.rst b/classes/class_physicalskymaterial.rst index 81dceddafb2..c75928f6be0 100644 --- a/classes/class_physicalskymaterial.rst +++ b/classes/class_physicalskymaterial.rst @@ -12,7 +12,7 @@ PhysicalSkyMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -:ref:`Sky<class_Sky>` :ref:`Material<class_Material>` used for a physically based sky. +A material that defines a sky for a :ref:`Sky<class_Sky>` resource by a set of physical properties. .. rst-class:: classref-introduction-group @@ -23,8 +23,6 @@ The **PhysicalSkyMaterial** uses the Preetham analytic daylight model to draw a The **PhysicalSkyMaterial** only supports one sun. The color, energy, and direction of the sun are taken from the first :ref:`DirectionalLight3D<class_DirectionalLight3D>` in the scene tree. -As it is based on a daylight model, the sky fades to black as the sunset ends. If you want a full day/night cycle, you will have to add a night sky by converting this to a :ref:`ShaderMaterial<class_ShaderMaterial>` and adding a night sky directly into the resulting shader. - .. rst-class:: classref-reftable-group Properties @@ -70,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **energy_multiplier** = ``1.0`` +:ref:`float<class_float>` **energy_multiplier** = ``1.0`` :ref:`🔗<class_PhysicalSkyMaterial_property_energy_multiplier>` .. rst-class:: classref-property-setget -- void **set_energy_multiplier** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_energy_multiplier** **(** **)** +- |void| **set_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_energy_multiplier**\ (\ ) The sky's overall brightness multiplier. Higher values result in a brighter sky. @@ -87,12 +85,12 @@ The sky's overall brightness multiplier. Higher values result in a brighter sky. .. rst-class:: classref-property -:ref:`Color<class_Color>` **ground_color** = ``Color(0.1, 0.07, 0.034, 1)`` +:ref:`Color<class_Color>` **ground_color** = ``Color(0.1, 0.07, 0.034, 1)`` :ref:`🔗<class_PhysicalSkyMaterial_property_ground_color>` .. rst-class:: classref-property-setget -- void **set_ground_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_ground_color** **(** **)** +- |void| **set_ground_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_ground_color**\ (\ ) Modulates the :ref:`Color<class_Color>` on the bottom half of the sky to represent the ground. @@ -104,12 +102,12 @@ Modulates the :ref:`Color<class_Color>` on the bottom half of the sky to represe .. rst-class:: classref-property -:ref:`float<class_float>` **mie_coefficient** = ``0.005`` +:ref:`float<class_float>` **mie_coefficient** = ``0.005`` :ref:`🔗<class_PhysicalSkyMaterial_property_mie_coefficient>` .. rst-class:: classref-property-setget -- void **set_mie_coefficient** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mie_coefficient** **(** **)** +- |void| **set_mie_coefficient**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mie_coefficient**\ (\ ) Controls the strength of `Mie scattering <https://en.wikipedia.org/wiki/Mie_scattering>`__ for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, Mie scattering results in a whitish color around the sun and horizon. @@ -121,12 +119,12 @@ Controls the strength of `Mie scattering <https://en.wikipedia.org/wiki/Mie_scat .. rst-class:: classref-property -:ref:`Color<class_Color>` **mie_color** = ``Color(0.69, 0.729, 0.812, 1)`` +:ref:`Color<class_Color>` **mie_color** = ``Color(0.69, 0.729, 0.812, 1)`` :ref:`🔗<class_PhysicalSkyMaterial_property_mie_color>` .. rst-class:: classref-property-setget -- void **set_mie_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_mie_color** **(** **)** +- |void| **set_mie_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_mie_color**\ (\ ) Controls the :ref:`Color<class_Color>` of the `Mie scattering <https://en.wikipedia.org/wiki/Mie_scattering>`__ effect. While not physically accurate, this allows for the creation of alien-looking planets. @@ -138,12 +136,12 @@ Controls the :ref:`Color<class_Color>` of the `Mie scattering <https://en.wikipe .. rst-class:: classref-property -:ref:`float<class_float>` **mie_eccentricity** = ``0.8`` +:ref:`float<class_float>` **mie_eccentricity** = ``0.8`` :ref:`🔗<class_PhysicalSkyMaterial_property_mie_eccentricity>` .. rst-class:: classref-property-setget -- void **set_mie_eccentricity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mie_eccentricity** **(** **)** +- |void| **set_mie_eccentricity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mie_eccentricity**\ (\ ) Controls the direction of the `Mie scattering <https://en.wikipedia.org/wiki/Mie_scattering>`__. A value of ``1`` means that when light hits a particle it's passing through straight forward. A value of ``-1`` means that all light is scatter backwards. @@ -155,12 +153,12 @@ Controls the direction of the `Mie scattering <https://en.wikipedia.org/wiki/Mie .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **night_sky** +:ref:`Texture2D<class_Texture2D>` **night_sky** :ref:`🔗<class_PhysicalSkyMaterial_property_night_sky>` .. rst-class:: classref-property-setget -- void **set_night_sky** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_night_sky** **(** **)** +- |void| **set_night_sky**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_night_sky**\ (\ ) :ref:`Texture2D<class_Texture2D>` for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. @@ -172,12 +170,12 @@ Controls the direction of the `Mie scattering <https://en.wikipedia.org/wiki/Mie .. rst-class:: classref-property -:ref:`float<class_float>` **rayleigh_coefficient** = ``2.0`` +:ref:`float<class_float>` **rayleigh_coefficient** = ``2.0`` :ref:`🔗<class_PhysicalSkyMaterial_property_rayleigh_coefficient>` .. rst-class:: classref-property-setget -- void **set_rayleigh_coefficient** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_rayleigh_coefficient** **(** **)** +- |void| **set_rayleigh_coefficient**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_rayleigh_coefficient**\ (\ ) Controls the strength of the `Rayleigh scattering <https://en.wikipedia.org/wiki/Rayleigh_scattering>`__. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. @@ -189,12 +187,12 @@ Controls the strength of the `Rayleigh scattering <https://en.wikipedia.org/wiki .. rst-class:: classref-property -:ref:`Color<class_Color>` **rayleigh_color** = ``Color(0.3, 0.405, 0.6, 1)`` +:ref:`Color<class_Color>` **rayleigh_color** = ``Color(0.3, 0.405, 0.6, 1)`` :ref:`🔗<class_PhysicalSkyMaterial_property_rayleigh_color>` .. rst-class:: classref-property-setget -- void **set_rayleigh_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_rayleigh_color** **(** **)** +- |void| **set_rayleigh_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_rayleigh_color**\ (\ ) Controls the :ref:`Color<class_Color>` of the `Rayleigh scattering <https://en.wikipedia.org/wiki/Rayleigh_scattering>`__. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red :ref:`Color<class_Color>` results in a Mars-looking atmosphere with a corresponding blue sunset. @@ -206,12 +204,12 @@ Controls the :ref:`Color<class_Color>` of the `Rayleigh scattering <https://en.w .. rst-class:: classref-property -:ref:`float<class_float>` **sun_disk_scale** = ``1.0`` +:ref:`float<class_float>` **sun_disk_scale** = ``1.0`` :ref:`🔗<class_PhysicalSkyMaterial_property_sun_disk_scale>` .. rst-class:: classref-property-setget -- void **set_sun_disk_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sun_disk_scale** **(** **)** +- |void| **set_sun_disk_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sun_disk_scale**\ (\ ) Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. @@ -223,12 +221,12 @@ Sets the size of the sun disk. Default value is based on Sol's perceived size fr .. rst-class:: classref-property -:ref:`float<class_float>` **turbidity** = ``10.0`` +:ref:`float<class_float>` **turbidity** = ``10.0`` :ref:`🔗<class_PhysicalSkyMaterial_property_turbidity>` .. rst-class:: classref-property-setget -- void **set_turbidity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_turbidity** **(** **)** +- |void| **set_turbidity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_turbidity**\ (\ ) Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. @@ -240,12 +238,12 @@ Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atm .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_debanding** = ``true`` +:ref:`bool<class_bool>` **use_debanding** = ``true`` :ref:`🔗<class_PhysicalSkyMaterial_property_use_debanding>` .. rst-class:: classref-property-setget -- void **set_use_debanding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_debanding** **(** **)** +- |void| **set_use_debanding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_debanding**\ (\ ) If ``true``, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. @@ -256,3 +254,4 @@ If ``true``, enables debanding. Debanding adds a small amount of noise which hel .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsbody2d.rst b/classes/class_physicsbody2d.rst index 96819b544eb..b9eaef04a76 100644 --- a/classes/class_physicsbody2d.rst +++ b/classes/class_physicsbody2d.rst @@ -50,17 +50,19 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_exception_with<class_PhysicsBody2D_method_add_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsBody2D[]<class_PhysicsBody2D>` | :ref:`get_collision_exceptions<class_PhysicsBody2D_method_get_collision_exceptions>` **(** **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision2D<class_KinematicCollision2D>` | :ref:`move_and_collide<class_PhysicsBody2D_method_move_and_collide>` **(** :ref:`Vector2<class_Vector2>` motion, :ref:`bool<class_bool>` test_only=false, :ref:`float<class_float>` safe_margin=0.08, :ref:`bool<class_bool>` recovery_as_collision=false **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_exception_with<class_PhysicsBody2D_method_remove_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`test_move<class_PhysicsBody2D_method_test_move>` **(** :ref:`Transform2D<class_Transform2D>` from, :ref:`Vector2<class_Vector2>` motion, :ref:`KinematicCollision2D<class_KinematicCollision2D>` collision=null, :ref:`float<class_float>` safe_margin=0.08, :ref:`bool<class_bool>` recovery_as_collision=false **)** | - +---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_exception_with<class_PhysicsBody2D_method_add_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PhysicsBody2D<class_PhysicsBody2D>`\] | :ref:`get_collision_exceptions<class_PhysicsBody2D_method_get_collision_exceptions>`\ (\ ) | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_gravity<class_PhysicsBody2D_method_get_gravity>`\ (\ ) |const| | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision2D<class_KinematicCollision2D>` | :ref:`move_and_collide<class_PhysicsBody2D_method_move_and_collide>`\ (\ motion\: :ref:`Vector2<class_Vector2>`, test_only\: :ref:`bool<class_bool>` = false, safe_margin\: :ref:`float<class_float>` = 0.08, recovery_as_collision\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_exception_with<class_PhysicsBody2D_method_remove_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`test_move<class_PhysicsBody2D_method_test_move>`\ (\ from\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, collision\: :ref:`KinematicCollision2D<class_KinematicCollision2D>` = null, safe_margin\: :ref:`float<class_float>` = 0.08, recovery_as_collision\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,7 +77,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **add_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_PhysicsBody2D_method_add_collision_exception_with>` Adds a body to the list of bodies that this body can't collide with. @@ -87,7 +89,7 @@ Adds a body to the list of bodies that this body can't collide with. .. rst-class:: classref-method -:ref:`PhysicsBody2D[]<class_PhysicsBody2D>` **get_collision_exceptions** **(** **)** +:ref:`Array<class_Array>`\[:ref:`PhysicsBody2D<class_PhysicsBody2D>`\] **get_collision_exceptions**\ (\ ) :ref:`🔗<class_PhysicsBody2D_method_get_collision_exceptions>` Returns an array of nodes that were added as collision exceptions for this body. @@ -95,13 +97,25 @@ Returns an array of nodes that were added as collision exceptions for this body. ---- +.. _class_PhysicsBody2D_method_get_gravity: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **get_gravity**\ (\ ) |const| :ref:`🔗<class_PhysicsBody2D_method_get_gravity>` + +Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from :ref:`Area2D<class_Area2D>` nodes and the global world gravity. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsBody2D_method_move_and_collide: .. rst-class:: classref-method -:ref:`KinematicCollision2D<class_KinematicCollision2D>` **move_and_collide** **(** :ref:`Vector2<class_Vector2>` motion, :ref:`bool<class_bool>` test_only=false, :ref:`float<class_float>` safe_margin=0.08, :ref:`bool<class_bool>` recovery_as_collision=false **)** +:ref:`KinematicCollision2D<class_KinematicCollision2D>` **move_and_collide**\ (\ motion\: :ref:`Vector2<class_Vector2>`, test_only\: :ref:`bool<class_bool>` = false, safe_margin\: :ref:`float<class_float>` = 0.08, recovery_as_collision\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsBody2D_method_move_and_collide>` -Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_method__physics_process>` or :ref:`Node._process<class_Node_method__process>`, ``motion`` should be computed using ``delta``. +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_private_method__physics_process>` or :ref:`Node._process<class_Node_private_method__process>`, ``motion`` should be computed using ``delta``. Returns a :ref:`KinematicCollision2D<class_KinematicCollision2D>`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -119,7 +133,7 @@ If ``recovery_as_collision`` is ``true``, any depenetration from the recovery ph .. rst-class:: classref-method -void **remove_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **remove_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_PhysicsBody2D_method_remove_collision_exception_with>` Removes a body from the list of bodies that this body can't collide with. @@ -131,9 +145,9 @@ Removes a body from the list of bodies that this body can't collide with. .. rst-class:: classref-method -:ref:`bool<class_bool>` **test_move** **(** :ref:`Transform2D<class_Transform2D>` from, :ref:`Vector2<class_Vector2>` motion, :ref:`KinematicCollision2D<class_KinematicCollision2D>` collision=null, :ref:`float<class_float>` safe_margin=0.08, :ref:`bool<class_bool>` recovery_as_collision=false **)** +:ref:`bool<class_bool>` **test_move**\ (\ from\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, collision\: :ref:`KinematicCollision2D<class_KinematicCollision2D>` = null, safe_margin\: :ref:`float<class_float>` = 0.08, recovery_as_collision\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsBody2D_method_test_move>` -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_method__physics_process>` or :ref:`Node._process<class_Node_method__process>`, ``motion`` should be computed using ``delta``. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_private_method__physics_process>` or :ref:`Node._process<class_Node_private_method__process>`, ``motion`` should be computed using ``delta``. Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform2D<class_Transform2D>`, then tries to move the body along the vector ``motion``. Returns ``true`` if a collision would stop the body from moving along the whole path. @@ -150,3 +164,4 @@ If ``recovery_as_collision`` is ``true``, any depenetration from the recovery ph .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsbody3d.rst b/classes/class_physicsbody3d.rst index d5e01a76066..ba70d009166 100644 --- a/classes/class_physicsbody3d.rst +++ b/classes/class_physicsbody3d.rst @@ -62,21 +62,23 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_exception_with<class_PhysicsBody3D_method_add_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_axis_lock<class_PhysicsBody3D_method_get_axis_lock>` **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsBody3D[]<class_PhysicsBody3D>` | :ref:`get_collision_exceptions<class_PhysicsBody3D_method_get_collision_exceptions>` **(** **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`KinematicCollision3D<class_KinematicCollision3D>` | :ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>` **(** :ref:`Vector3<class_Vector3>` motion, :ref:`bool<class_bool>` test_only=false, :ref:`float<class_float>` safe_margin=0.001, :ref:`bool<class_bool>` recovery_as_collision=false, :ref:`int<class_int>` max_collisions=1 **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_exception_with<class_PhysicsBody3D_method_remove_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_axis_lock<class_PhysicsBody3D_method_set_axis_lock>` **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`test_move<class_PhysicsBody3D_method_test_move>` **(** :ref:`Transform3D<class_Transform3D>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`KinematicCollision3D<class_KinematicCollision3D>` collision=null, :ref:`float<class_float>` safe_margin=0.001, :ref:`bool<class_bool>` recovery_as_collision=false, :ref:`int<class_int>` max_collisions=1 **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_exception_with<class_PhysicsBody3D_method_add_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_axis_lock<class_PhysicsBody3D_method_get_axis_lock>`\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] | :ref:`get_collision_exceptions<class_PhysicsBody3D_method_get_collision_exceptions>`\ (\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_gravity<class_PhysicsBody3D_method_get_gravity>`\ (\ ) |const| | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`KinematicCollision3D<class_KinematicCollision3D>` | :ref:`move_and_collide<class_PhysicsBody3D_method_move_and_collide>`\ (\ motion\: :ref:`Vector3<class_Vector3>`, test_only\: :ref:`bool<class_bool>` = false, safe_margin\: :ref:`float<class_float>` = 0.001, recovery_as_collision\: :ref:`bool<class_bool>` = false, max_collisions\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_exception_with<class_PhysicsBody3D_method_remove_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_lock<class_PhysicsBody3D_method_set_axis_lock>`\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`test_move<class_PhysicsBody3D_method_test_move>`\ (\ from\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, collision\: :ref:`KinematicCollision3D<class_KinematicCollision3D>` = null, safe_margin\: :ref:`float<class_float>` = 0.001, recovery_as_collision\: :ref:`bool<class_bool>` = false, max_collisions\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,12 +93,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_angular_x** = ``false`` +:ref:`bool<class_bool>` **axis_lock_angular_x** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_angular_x>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's rotation in the X axis. @@ -108,12 +110,12 @@ Lock the body's rotation in the X axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_angular_y** = ``false`` +:ref:`bool<class_bool>` **axis_lock_angular_y** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_angular_y>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's rotation in the Y axis. @@ -125,12 +127,12 @@ Lock the body's rotation in the Y axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_angular_z** = ``false`` +:ref:`bool<class_bool>` **axis_lock_angular_z** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_angular_z>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's rotation in the Z axis. @@ -142,12 +144,12 @@ Lock the body's rotation in the Z axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_linear_x** = ``false`` +:ref:`bool<class_bool>` **axis_lock_linear_x** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_linear_x>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's linear movement in the X axis. @@ -159,12 +161,12 @@ Lock the body's linear movement in the X axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_linear_y** = ``false`` +:ref:`bool<class_bool>` **axis_lock_linear_y** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_linear_y>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's linear movement in the Y axis. @@ -176,12 +178,12 @@ Lock the body's linear movement in the Y axis. .. rst-class:: classref-property -:ref:`bool<class_bool>` **axis_lock_linear_z** = ``false`` +:ref:`bool<class_bool>` **axis_lock_linear_z** = ``false`` :ref:`🔗<class_PhysicsBody3D_property_axis_lock_linear_z>` .. rst-class:: classref-property-setget -- void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** -- :ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +- |void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| Lock the body's linear movement in the Z axis. @@ -198,7 +200,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **add_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_PhysicsBody3D_method_add_collision_exception_with>` Adds a body to the list of bodies that this body can't collide with. @@ -210,7 +212,7 @@ Adds a body to the list of bodies that this body can't collide with. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +:ref:`bool<class_bool>` **get_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| :ref:`🔗<class_PhysicsBody3D_method_get_axis_lock>` Returns ``true`` if the specified linear or rotational ``axis`` is locked. @@ -222,7 +224,7 @@ Returns ``true`` if the specified linear or rotational ``axis`` is locked. .. rst-class:: classref-method -:ref:`PhysicsBody3D[]<class_PhysicsBody3D>` **get_collision_exceptions** **(** **)** +:ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] **get_collision_exceptions**\ (\ ) :ref:`🔗<class_PhysicsBody3D_method_get_collision_exceptions>` Returns an array of nodes that were added as collision exceptions for this body. @@ -230,13 +232,25 @@ Returns an array of nodes that were added as collision exceptions for this body. ---- +.. _class_PhysicsBody3D_method_get_gravity: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_gravity**\ (\ ) |const| :ref:`🔗<class_PhysicsBody3D_method_get_gravity>` + +Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from :ref:`Area3D<class_Area3D>` nodes and the global world gravity. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsBody3D_method_move_and_collide: .. rst-class:: classref-method -:ref:`KinematicCollision3D<class_KinematicCollision3D>` **move_and_collide** **(** :ref:`Vector3<class_Vector3>` motion, :ref:`bool<class_bool>` test_only=false, :ref:`float<class_float>` safe_margin=0.001, :ref:`bool<class_bool>` recovery_as_collision=false, :ref:`int<class_int>` max_collisions=1 **)** +:ref:`KinematicCollision3D<class_KinematicCollision3D>` **move_and_collide**\ (\ motion\: :ref:`Vector3<class_Vector3>`, test_only\: :ref:`bool<class_bool>` = false, safe_margin\: :ref:`float<class_float>` = 0.001, recovery_as_collision\: :ref:`bool<class_bool>` = false, max_collisions\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_PhysicsBody3D_method_move_and_collide>` -Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_method__physics_process>` or :ref:`Node._process<class_Node_method__process>`, ``motion`` should be computed using ``delta``. +Moves the body along the vector ``motion``. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_private_method__physics_process>` or :ref:`Node._process<class_Node_private_method__process>`, ``motion`` should be computed using ``delta``. The body will stop if it collides. Returns a :ref:`KinematicCollision3D<class_KinematicCollision3D>`, which contains information about the collision when stopped, or when touching another body along the motion. @@ -256,7 +270,7 @@ If ``recovery_as_collision`` is ``true``, any depenetration from the recovery ph .. rst-class:: classref-method -void **remove_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **remove_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_PhysicsBody3D_method_remove_collision_exception_with>` Removes a body from the list of bodies that this body can't collide with. @@ -268,7 +282,7 @@ Removes a body from the list of bodies that this body can't collide with. .. rst-class:: classref-method -void **set_axis_lock** **(** :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** +|void| **set_axis_lock**\ (\ axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsBody3D_method_set_axis_lock>` Locks or unlocks the specified linear or rotational ``axis`` depending on the value of ``lock``. @@ -280,9 +294,9 @@ Locks or unlocks the specified linear or rotational ``axis`` depending on the va .. rst-class:: classref-method -:ref:`bool<class_bool>` **test_move** **(** :ref:`Transform3D<class_Transform3D>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`KinematicCollision3D<class_KinematicCollision3D>` collision=null, :ref:`float<class_float>` safe_margin=0.001, :ref:`bool<class_bool>` recovery_as_collision=false, :ref:`int<class_int>` max_collisions=1 **)** +:ref:`bool<class_bool>` **test_move**\ (\ from\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, collision\: :ref:`KinematicCollision3D<class_KinematicCollision3D>` = null, safe_margin\: :ref:`float<class_float>` = 0.001, recovery_as_collision\: :ref:`bool<class_bool>` = false, max_collisions\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_PhysicsBody3D_method_test_move>` -Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_method__physics_process>` or :ref:`Node._process<class_Node_method__process>`, ``motion`` should be computed using ``delta``. +Checks for collisions without moving the body. In order to be frame rate independent in :ref:`Node._physics_process<class_Node_private_method__physics_process>` or :ref:`Node._process<class_Node_private_method__process>`, ``motion`` should be computed using ``delta``. Virtually sets the node's position, scale and rotation to that of the given :ref:`Transform3D<class_Transform3D>`, then tries to move the body along the vector ``motion``. Returns ``true`` if a collision would stop the body from moving along the whole path. @@ -301,3 +315,4 @@ If ``recovery_as_collision`` is ``true``, any depenetration from the recovery ph .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectbodystate2d.rst b/classes/class_physicsdirectbodystate2d.rst index 1f8ef449f84..c41b3638adf 100644 --- a/classes/class_physicsdirectbodystate2d.rst +++ b/classes/class_physicsdirectbodystate2d.rst @@ -21,7 +21,7 @@ Provides direct access to a physics body in the :ref:`PhysicsServer2D<class_Phys Description ----------- -Provides direct access to a physics body in the :ref:`PhysicsServer2D<class_PhysicsServer2D>`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody2D<class_RigidBody2D>`, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces<class_RigidBody2D_method__integrate_forces>`. +Provides direct access to a physics body in the :ref:`PhysicsServer2D<class_PhysicsServer2D>`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody2D<class_RigidBody2D>`, and is intended for changing the direct state of that body. See :ref:`RigidBody2D._integrate_forces<class_RigidBody2D_private_method__integrate_forces>`. .. rst-class:: classref-introduction-group @@ -74,63 +74,63 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_central_force<class_PhysicsDirectBodyState2D_method_add_constant_central_force>` **(** :ref:`Vector2<class_Vector2>` force=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant_torque>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_force<class_PhysicsDirectBodyState2D_method_apply_central_force>` **(** :ref:`Vector2<class_Vector2>` force=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse<class_PhysicsDirectBodyState2D_method_apply_central_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_force<class_PhysicsDirectBodyState2D_method_apply_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse<class_PhysicsDirectBodyState2D_method_apply_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque<class_PhysicsDirectBodyState2D_method_apply_torque>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque_impulse<class_PhysicsDirectBodyState2D_method_apply_torque_impulse>` **(** :ref:`float<class_float>` impulse **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_force<class_PhysicsDirectBodyState2D_method_get_constant_force>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_constant_torque<class_PhysicsDirectBodyState2D_method_get_constant_torque>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_contact_collider<class_PhysicsDirectBodyState2D_method_get_contact_collider>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_collider_id<class_PhysicsDirectBodyState2D_method_get_contact_collider_id>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_contact_collider_object<class_PhysicsDirectBodyState2D_method_get_contact_collider_object>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_collider_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_collider_shape<class_PhysicsDirectBodyState2D_method_get_contact_collider_shape>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_count<class_PhysicsDirectBodyState2D_method_get_contact_count>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_impulse<class_PhysicsDirectBodyState2D_method_get_contact_impulse>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_normal<class_PhysicsDirectBodyState2D_method_get_contact_local_normal>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_position<class_PhysicsDirectBodyState2D_method_get_contact_local_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_local_shape<class_PhysicsDirectBodyState2D_method_get_contact_local_shape>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`get_space_state<class_PhysicsDirectBodyState2D_method_get_space_state>` **(** **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_velocity_at_local_position<class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position>` **(** :ref:`Vector2<class_Vector2>` local_position **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`integrate_forces<class_PhysicsDirectBodyState2D_method_integrate_forces>` **(** **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_force<class_PhysicsDirectBodyState2D_method_set_constant_force>` **(** :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_torque<class_PhysicsDirectBodyState2D_method_set_constant_torque>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_central_force<class_PhysicsDirectBodyState2D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_force<class_PhysicsDirectBodyState2D_method_apply_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_impulse<class_PhysicsDirectBodyState2D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_force<class_PhysicsDirectBodyState2D_method_apply_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_impulse<class_PhysicsDirectBodyState2D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque<class_PhysicsDirectBodyState2D_method_apply_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque_impulse<class_PhysicsDirectBodyState2D_method_apply_torque_impulse>`\ (\ impulse\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_force<class_PhysicsDirectBodyState2D_method_get_constant_force>`\ (\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_constant_torque<class_PhysicsDirectBodyState2D_method_get_constant_torque>`\ (\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_contact_collider<class_PhysicsDirectBodyState2D_method_get_contact_collider>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_collider_id<class_PhysicsDirectBodyState2D_method_get_contact_collider_id>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_contact_collider_object<class_PhysicsDirectBodyState2D_method_get_contact_collider_object>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_collider_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_collider_shape<class_PhysicsDirectBodyState2D_method_get_contact_collider_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_count<class_PhysicsDirectBodyState2D_method_get_contact_count>`\ (\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_impulse<class_PhysicsDirectBodyState2D_method_get_contact_impulse>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_normal<class_PhysicsDirectBodyState2D_method_get_contact_local_normal>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_position<class_PhysicsDirectBodyState2D_method_get_contact_local_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_local_shape<class_PhysicsDirectBodyState2D_method_get_contact_local_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`get_space_state<class_PhysicsDirectBodyState2D_method_get_space_state>`\ (\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_velocity_at_local_position<class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position>`\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`integrate_forces<class_PhysicsDirectBodyState2D_method_integrate_forces>`\ (\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_force<class_PhysicsDirectBodyState2D_method_set_constant_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_torque<class_PhysicsDirectBodyState2D_method_set_constant_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -145,12 +145,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_velocity** +:ref:`float<class_float>` **angular_velocity** :ref:`🔗<class_PhysicsDirectBodyState2D_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_velocity**\ (\ ) The body's rotational velocity in *radians* per second. @@ -162,11 +162,11 @@ The body's rotational velocity in *radians* per second. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **center_of_mass** +:ref:`Vector2<class_Vector2>` **center_of_mass** :ref:`🔗<class_PhysicsDirectBodyState2D_property_center_of_mass>` .. rst-class:: classref-property-setget -- :ref:`Vector2<class_Vector2>` **get_center_of_mass** **(** **)** +- :ref:`Vector2<class_Vector2>` **get_center_of_mass**\ (\ ) The body's center of mass position relative to the body's center in the global coordinate system. @@ -178,11 +178,11 @@ The body's center of mass position relative to the body's center in the global c .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **center_of_mass_local** +:ref:`Vector2<class_Vector2>` **center_of_mass_local** :ref:`🔗<class_PhysicsDirectBodyState2D_property_center_of_mass_local>` .. rst-class:: classref-property-setget -- :ref:`Vector2<class_Vector2>` **get_center_of_mass_local** **(** **)** +- :ref:`Vector2<class_Vector2>` **get_center_of_mass_local**\ (\ ) The body's center of mass position in the body's local coordinate system. @@ -194,11 +194,11 @@ The body's center of mass position in the body's local coordinate system. .. rst-class:: classref-property -:ref:`float<class_float>` **inverse_inertia** +:ref:`float<class_float>` **inverse_inertia** :ref:`🔗<class_PhysicsDirectBodyState2D_property_inverse_inertia>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_inverse_inertia** **(** **)** +- :ref:`float<class_float>` **get_inverse_inertia**\ (\ ) The inverse of the inertia of the body. @@ -210,11 +210,11 @@ The inverse of the inertia of the body. .. rst-class:: classref-property -:ref:`float<class_float>` **inverse_mass** +:ref:`float<class_float>` **inverse_mass** :ref:`🔗<class_PhysicsDirectBodyState2D_property_inverse_mass>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_inverse_mass** **(** **)** +- :ref:`float<class_float>` **get_inverse_mass**\ (\ ) The inverse of the mass of the body. @@ -226,12 +226,12 @@ The inverse of the mass of the body. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **linear_velocity** +:ref:`Vector2<class_Vector2>` **linear_velocity** :ref:`🔗<class_PhysicsDirectBodyState2D_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_linear_velocity**\ (\ ) The body's linear velocity in pixels per second. @@ -243,12 +243,12 @@ The body's linear velocity in pixels per second. .. rst-class:: classref-property -:ref:`bool<class_bool>` **sleeping** +:ref:`bool<class_bool>` **sleeping** :ref:`🔗<class_PhysicsDirectBodyState2D_property_sleeping>` .. rst-class:: classref-property-setget -- void **set_sleep_state** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sleeping** **(** **)** +- |void| **set_sleep_state**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sleeping**\ (\ ) If ``true``, this body is currently sleeping (not active). @@ -260,11 +260,11 @@ If ``true``, this body is currently sleeping (not active). .. rst-class:: classref-property -:ref:`float<class_float>` **step** +:ref:`float<class_float>` **step** :ref:`🔗<class_PhysicsDirectBodyState2D_property_step>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_step** **(** **)** +- :ref:`float<class_float>` **get_step**\ (\ ) The timestep (delta) used for the simulation. @@ -276,11 +276,11 @@ The timestep (delta) used for the simulation. .. rst-class:: classref-property -:ref:`float<class_float>` **total_angular_damp** +:ref:`float<class_float>` **total_angular_damp** :ref:`🔗<class_PhysicsDirectBodyState2D_property_total_angular_damp>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_total_angular_damp** **(** **)** +- :ref:`float<class_float>` **get_total_angular_damp**\ (\ ) The rate at which the body stops rotating, if there are not any other forces moving it. @@ -292,11 +292,11 @@ The rate at which the body stops rotating, if there are not any other forces mov .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **total_gravity** +:ref:`Vector2<class_Vector2>` **total_gravity** :ref:`🔗<class_PhysicsDirectBodyState2D_property_total_gravity>` .. rst-class:: classref-property-setget -- :ref:`Vector2<class_Vector2>` **get_total_gravity** **(** **)** +- :ref:`Vector2<class_Vector2>` **get_total_gravity**\ (\ ) The total gravity vector being currently applied to this body. @@ -308,11 +308,11 @@ The total gravity vector being currently applied to this body. .. rst-class:: classref-property -:ref:`float<class_float>` **total_linear_damp** +:ref:`float<class_float>` **total_linear_damp** :ref:`🔗<class_PhysicsDirectBodyState2D_property_total_linear_damp>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_total_linear_damp** **(** **)** +- :ref:`float<class_float>` **get_total_linear_damp**\ (\ ) The rate at which the body stops moving, if there are not any other forces moving it. @@ -324,12 +324,12 @@ The rate at which the body stops moving, if there are not any other forces movin .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **transform** +:ref:`Transform2D<class_Transform2D>` **transform** :ref:`🔗<class_PhysicsDirectBodyState2D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_transform**\ (\ ) The body's transformation matrix. @@ -346,7 +346,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_constant_central_force** **(** :ref:`Vector2<class_Vector2>` force=Vector2(0, 0) **)** +|void| **add_constant_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_add_constant_central_force>` Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. @@ -360,7 +360,7 @@ This is equivalent to using :ref:`add_constant_force<class_PhysicsDirectBodyStat .. rst-class:: classref-method -void **add_constant_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **add_constant_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_add_constant_force>` Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. @@ -374,7 +374,7 @@ Adds a constant positioned force to the body that keeps being applied over time .. rst-class:: classref-method -void **add_constant_torque** **(** :ref:`float<class_float>` torque **)** +|void| **add_constant_torque**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_add_constant_torque>` Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. @@ -386,7 +386,7 @@ Adds a constant rotational force without affecting position that keeps being app .. rst-class:: classref-method -void **apply_central_force** **(** :ref:`Vector2<class_Vector2>` force=Vector2(0, 0) **)** +|void| **apply_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_central_force>` Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. @@ -400,7 +400,7 @@ This is equivalent to using :ref:`apply_force<class_PhysicsDirectBodyState2D_met .. rst-class:: classref-method -void **apply_central_impulse** **(** :ref:`Vector2<class_Vector2>` impulse **)** +|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_central_impulse>` Applies a directional impulse without affecting rotation. @@ -416,7 +416,7 @@ This is equivalent to using :ref:`apply_impulse<class_PhysicsDirectBodyState2D_m .. rst-class:: classref-method -void **apply_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **apply_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_force>` Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. @@ -430,7 +430,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b .. rst-class:: classref-method -void **apply_impulse** **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **apply_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_impulse>` Applies a positioned impulse to the body. @@ -446,7 +446,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **apply_torque** **(** :ref:`float<class_float>` torque **)** +|void| **apply_torque**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_torque>` Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. @@ -460,7 +460,7 @@ Applies a rotational force without affecting position. A force is time dependent .. rst-class:: classref-method -void **apply_torque_impulse** **(** :ref:`float<class_float>` impulse **)** +|void| **apply_torque_impulse**\ (\ impulse\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_apply_torque_impulse>` Applies a rotational impulse to the body without affecting the position. @@ -476,7 +476,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_constant_force** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_constant_force**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_constant_force>` Returns the body's total constant positional forces applied during each physics update. @@ -490,7 +490,7 @@ See :ref:`add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_ .. rst-class:: classref-method -:ref:`float<class_float>` **get_constant_torque** **(** **)** |const| +:ref:`float<class_float>` **get_constant_torque**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_constant_torque>` Returns the body's total constant rotational forces applied during each physics update. @@ -504,7 +504,7 @@ See :ref:`add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_contact_collider** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`RID<class_RID>` **get_contact_collider**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider>` Returns the collider's :ref:`RID<class_RID>`. @@ -516,7 +516,7 @@ Returns the collider's :ref:`RID<class_RID>`. .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_collider_id** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_collider_id**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider_id>` Returns the collider's object id. @@ -528,7 +528,7 @@ Returns the collider's object id. .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_contact_collider_object** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Object<class_Object>` **get_contact_collider_object**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider_object>` Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). @@ -540,7 +540,7 @@ Returns the collider object. This depends on how it was created (will return a s .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_collider_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_collider_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider_position>` Returns the position of the contact point on the collider in the global coordinate system. @@ -552,7 +552,7 @@ Returns the position of the contact point on the collider in the global coordina .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_collider_shape** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_collider_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider_shape>` Returns the collider's shape index. @@ -564,7 +564,7 @@ Returns the collider's shape index. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_collider_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position>` Returns the velocity vector at the collider's contact point. @@ -576,7 +576,7 @@ Returns the velocity vector at the collider's contact point. .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_count** **(** **)** |const| +:ref:`int<class_int>` **get_contact_count**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_count>` Returns the number of contacts this body has with other bodies. @@ -590,7 +590,7 @@ Returns the number of contacts this body has with other bodies. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_impulse** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_impulse**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_impulse>` Returns the impulse created by the contact. @@ -602,7 +602,7 @@ Returns the impulse created by the contact. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_local_normal** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_local_normal**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_local_normal>` Returns the local normal at the contact point. @@ -614,7 +614,7 @@ Returns the local normal at the contact point. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_local_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_local_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_local_position>` Returns the position of the contact point on the body in the global coordinate system. @@ -626,7 +626,7 @@ Returns the position of the contact point on the body in the global coordinate s .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_local_shape** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_local_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_local_shape>` Returns the local shape index of the collision. @@ -638,7 +638,7 @@ Returns the local shape index of the collision. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contact_local_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position>` Returns the velocity vector at the body's contact point. @@ -650,7 +650,7 @@ Returns the velocity vector at the body's contact point. .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **get_space_state** **(** **)** +:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **get_space_state**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_space_state>` Returns the current state of the space, useful for queries. @@ -662,7 +662,7 @@ Returns the current state of the space, useful for queries. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_velocity_at_local_position** **(** :ref:`Vector2<class_Vector2>` local_position **)** |const| +:ref:`Vector2<class_Vector2>` **get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position>` Returns the body's velocity at the given relative position, including both translation and rotation. @@ -674,9 +674,9 @@ Returns the body's velocity at the given relative position, including both trans .. rst-class:: classref-method -void **integrate_forces** **(** **)** +|void| **integrate_forces**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_integrate_forces>` -Calls the built-in force integration code. +Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. .. rst-class:: classref-item-separator @@ -686,7 +686,7 @@ Calls the built-in force integration code. .. rst-class:: classref-method -void **set_constant_force** **(** :ref:`Vector2<class_Vector2>` force **)** +|void| **set_constant_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_set_constant_force>` Sets the body's total constant positional forces applied during each physics update. @@ -700,7 +700,7 @@ See :ref:`add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_ .. rst-class:: classref-method -void **set_constant_torque** **(** :ref:`float<class_float>` torque **)** +|void| **set_constant_torque**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsDirectBodyState2D_method_set_constant_torque>` Sets the body's total constant rotational forces applied during each physics update. @@ -713,3 +713,4 @@ See :ref:`add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectbodystate2dextension.rst b/classes/class_physicsdirectbodystate2dextension.rst index e1f7344ea20..51e5668d1f0 100644 --- a/classes/class_physicsdirectbodystate2dextension.rst +++ b/classes/class_physicsdirectbodystate2dextension.rst @@ -31,95 +31,95 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_central_force<class_PhysicsDirectBodyState2DExtension_method__add_constant_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_force<class_PhysicsDirectBodyState2DExtension_method__add_constant_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_torque<class_PhysicsDirectBodyState2DExtension_method__add_constant_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_force<class_PhysicsDirectBodyState2DExtension_method__apply_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_impulse<class_PhysicsDirectBodyState2DExtension_method__apply_central_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_force<class_PhysicsDirectBodyState2DExtension_method__apply_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_impulse<class_PhysicsDirectBodyState2DExtension_method__apply_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque<class_PhysicsDirectBodyState2DExtension_method__apply_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque_impulse<class_PhysicsDirectBodyState2DExtension_method__apply_torque_impulse>` **(** :ref:`float<class_float>` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_angular_velocity<class_PhysicsDirectBodyState2DExtension_method__get_angular_velocity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass<class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass_local<class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass_local>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_constant_force<class_PhysicsDirectBodyState2DExtension_method__get_constant_force>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_constant_torque<class_PhysicsDirectBodyState2DExtension_method__get_constant_torque>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_get_contact_collider<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_collider_id<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_id>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`_get_contact_collider_object<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_object>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_position<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_collider_shape<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_count<class_PhysicsDirectBodyState2DExtension_method__get_contact_count>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_impulse<class_PhysicsDirectBodyState2DExtension_method__get_contact_impulse>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_normal<class_PhysicsDirectBodyState2DExtension_method__get_contact_local_normal>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_position<class_PhysicsDirectBodyState2DExtension_method__get_contact_local_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_local_shape<class_PhysicsDirectBodyState2DExtension_method__get_contact_local_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2DExtension_method__get_contact_local_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_inverse_inertia<class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_inverse_mass<class_PhysicsDirectBodyState2DExtension_method__get_inverse_mass>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_linear_velocity<class_PhysicsDirectBodyState2DExtension_method__get_linear_velocity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`_get_space_state<class_PhysicsDirectBodyState2DExtension_method__get_space_state>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_step<class_PhysicsDirectBodyState2DExtension_method__get_step>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_total_angular_damp<class_PhysicsDirectBodyState2DExtension_method__get_total_angular_damp>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_total_gravity<class_PhysicsDirectBodyState2DExtension_method__get_total_gravity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_total_linear_damp<class_PhysicsDirectBodyState2DExtension_method__get_total_linear_damp>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`_get_transform<class_PhysicsDirectBodyState2DExtension_method__get_transform>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_velocity_at_local_position<class_PhysicsDirectBodyState2DExtension_method__get_velocity_at_local_position>` **(** :ref:`Vector2<class_Vector2>` local_position **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces<class_PhysicsDirectBodyState2DExtension_method__integrate_forces>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_sleeping<class_PhysicsDirectBodyState2DExtension_method__is_sleeping>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_angular_velocity<class_PhysicsDirectBodyState2DExtension_method__set_angular_velocity>` **(** :ref:`float<class_float>` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_force<class_PhysicsDirectBodyState2DExtension_method__set_constant_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_torque<class_PhysicsDirectBodyState2DExtension_method__set_constant_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_linear_velocity<class_PhysicsDirectBodyState2DExtension_method__set_linear_velocity>` **(** :ref:`Vector2<class_Vector2>` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_sleep_state<class_PhysicsDirectBodyState2DExtension_method__set_sleep_state>` **(** :ref:`bool<class_bool>` enabled **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transform<class_PhysicsDirectBodyState2DExtension_method__set_transform>` **(** :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_central_force<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_central_force<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_central_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_force<class_PhysicsDirectBodyState2DExtension_private_method__apply_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_torque<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_torque_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse>`\ (\ impulse\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_angular_velocity<class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass_local<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_contact_collider<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_collider_id<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`_get_contact_collider_object<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_collider_shape<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_count<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_impulse<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_normal<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_local_shape<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_inverse_inertia<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_inverse_mass<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_linear_velocity<class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`_get_space_state<class_PhysicsDirectBodyState2DExtension_private_method__get_space_state>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_step<class_PhysicsDirectBodyState2DExtension_private_method__get_step>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_total_angular_damp<class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_total_gravity<class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_total_linear_damp<class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`_get_transform<class_PhysicsDirectBodyState2DExtension_private_method__get_transform>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_velocity_at_local_position<class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position>`\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_integrate_forces<class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_sleeping<class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_angular_velocity<class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity>`\ (\ velocity\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_linear_velocity<class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity>`\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_sleep_state<class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_transform<class_PhysicsDirectBodyState2DExtension_private_method__set_transform>`\ (\ transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -130,617 +130,529 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_central_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force: .. rst-class:: classref-method -void **_add_constant_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| +|void| **_add_constant_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force<class_PhysicsDirectBodyState2D_method_add_constant_central_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force: .. rst-class:: classref-method -void **_add_constant_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| - -.. container:: contribute +|void| **_add_constant_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque: .. rst-class:: classref-method -void **_add_constant_torque** **(** :ref:`float<class_float>` torque **)** |virtual| - -.. container:: contribute +|void| **_add_constant_torque**\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_central_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force: .. rst-class:: classref-method -void **_apply_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| +|void| **_apply_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force<class_PhysicsDirectBodyState2D_method_apply_central_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_central_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse: .. rst-class:: classref-method -void **_apply_central_impulse** **(** :ref:`Vector2<class_Vector2>` impulse **)** |virtual| - -.. container:: contribute +|void| **_apply_central_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse<class_PhysicsDirectBodyState2D_method_apply_central_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_force: .. rst-class:: classref-method -void **_apply_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| - -.. container:: contribute +|void| **_apply_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force<class_PhysicsDirectBodyState2D_method_apply_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse: .. rst-class:: classref-method -void **_apply_impulse** **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual| +|void| **_apply_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse<class_PhysicsDirectBodyState2D_method_apply_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque: .. rst-class:: classref-method -void **_apply_torque** **(** :ref:`float<class_float>` torque **)** |virtual| - -.. container:: contribute +|void| **_apply_torque**\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque<class_PhysicsDirectBodyState2D_method_apply_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_torque_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse: .. rst-class:: classref-method -void **_apply_torque_impulse** **(** :ref:`float<class_float>` impulse **)** |virtual| - -.. container:: contribute +|void| **_apply_torque_impulse**\ (\ impulse\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque_impulse<class_PhysicsDirectBodyState2D_method_apply_torque_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_angular_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_angular_velocity** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_angular_velocity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity<class_PhysicsDirectBodyState2D_property_angular_velocity>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_center_of_mass** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_center_of_mass**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass<class_PhysicsDirectBodyState2D_property_center_of_mass>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass_local: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_center_of_mass_local** **(** **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_center_of_mass_local**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass_local<class_PhysicsDirectBodyState2D_property_center_of_mass_local>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_constant_force** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_constant_force**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force<class_PhysicsDirectBodyState2D_method_get_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_constant_torque** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_get_constant_torque**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque<class_PhysicsDirectBodyState2D_method_get_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_get_contact_collider** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`RID<class_RID>` **_get_contact_collider**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider<class_PhysicsDirectBodyState2D_method_get_contact_collider>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_id: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_collider_id** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_get_contact_collider_id**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id<class_PhysicsDirectBodyState2D_method_get_contact_collider_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_object: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object: .. rst-class:: classref-method -:ref:`Object<class_Object>` **_get_contact_collider_object** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`Object<class_Object>` **_get_contact_collider_object**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_object<class_PhysicsDirectBodyState2D_method_get_contact_collider_object>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_collider_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_contact_collider_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_position>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_shape: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_collider_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_get_contact_collider_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape<class_PhysicsDirectBodyState2D_method_get_contact_collider_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_velocity_at_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_collider_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_count: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_contact_count**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count<class_PhysicsDirectBodyState2D_method_get_contact_count>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_impulse** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_contact_impulse**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse<class_PhysicsDirectBodyState2D_method_get_contact_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_normal: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_local_normal** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_contact_local_normal**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal<class_PhysicsDirectBodyState2D_method_get_contact_local_normal>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_local_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_contact_local_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position<class_PhysicsDirectBodyState2D_method_get_contact_local_position>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_shape: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_local_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_get_contact_local_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape<class_PhysicsDirectBodyState2D_method_get_contact_local_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_velocity_at_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_contact_local_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_inverse_inertia** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_get_inverse_inertia**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_inertia<class_PhysicsDirectBodyState2D_property_inverse_inertia>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_mass: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_inverse_mass** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_get_inverse_mass**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_mass<class_PhysicsDirectBodyState2D_property_inverse_mass>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_linear_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_linear_velocity** **(** **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_linear_velocity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity<class_PhysicsDirectBodyState2D_property_linear_velocity>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_space_state: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_space_state: .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **_get_space_state** **(** **)** |virtual| - -.. container:: contribute +:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **_get_space_state**\ (\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_space_state>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_space_state<class_PhysicsDirectBodyState2D_method_get_space_state>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_step: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_step: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_step** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_get_step**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_step>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.step<class_PhysicsDirectBodyState2D_property_step>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_angular_damp: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_total_angular_damp** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_total_angular_damp**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_angular_damp<class_PhysicsDirectBodyState2D_property_total_angular_damp>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_gravity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_total_gravity** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_total_gravity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_gravity<class_PhysicsDirectBodyState2D_property_total_gravity>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_linear_damp: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_total_linear_damp** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_total_linear_damp**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_linear_damp<class_PhysicsDirectBodyState2D_property_total_linear_damp>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_transform: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_transform: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **_get_transform** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`Transform2D<class_Transform2D>` **_get_transform**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform<class_PhysicsDirectBodyState2D_property_transform>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_velocity_at_local_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_velocity_at_local_position** **(** :ref:`Vector2<class_Vector2>` local_position **)** |virtual| |const| - -.. container:: contribute +:ref:`Vector2<class_Vector2>` **_get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_position<class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__integrate_forces: +.. _class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces: .. rst-class:: classref-method -void **_integrate_forces** **(** **)** |virtual| +|void| **_integrate_forces**\ (\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.integrate_forces<class_PhysicsDirectBodyState2D_method_integrate_forces>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__is_sleeping: +.. _class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_sleeping** **(** **)** |virtual| |const| - -.. container:: contribute +:ref:`bool<class_bool>` **_is_sleeping**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping<class_PhysicsDirectBodyState2D_property_sleeping>` and its respective getter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_angular_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity: .. rst-class:: classref-method -void **_set_angular_velocity** **(** :ref:`float<class_float>` velocity **)** |virtual| - -.. container:: contribute +|void| **_set_angular_velocity**\ (\ velocity\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity<class_PhysicsDirectBodyState2D_property_angular_velocity>` and its respective setter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force: .. rst-class:: classref-method -void **_set_constant_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| +|void| **_set_constant_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force<class_PhysicsDirectBodyState2D_method_set_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque: .. rst-class:: classref-method -void **_set_constant_torque** **(** :ref:`float<class_float>` torque **)** |virtual| - -.. container:: contribute +|void| **_set_constant_torque**\ (\ torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_torque<class_PhysicsDirectBodyState2D_method_set_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_linear_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity: .. rst-class:: classref-method -void **_set_linear_velocity** **(** :ref:`Vector2<class_Vector2>` velocity **)** |virtual| - -.. container:: contribute +|void| **_set_linear_velocity**\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity<class_PhysicsDirectBodyState2D_property_linear_velocity>` and its respective setter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_sleep_state: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state: .. rst-class:: classref-method -void **_set_sleep_state** **(** :ref:`bool<class_bool>` enabled **)** |virtual| +|void| **_set_sleep_state**\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping<class_PhysicsDirectBodyState2D_property_sleeping>` and its respective setter. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_transform: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_transform: .. rst-class:: classref-method -void **_set_transform** **(** :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| - -.. container:: contribute +|void| **_set_transform**\ (\ transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState2DExtension_private_method__set_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform<class_PhysicsDirectBodyState2D_property_transform>` and its respective setter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -749,3 +661,4 @@ void **_set_transform** **(** :ref:`Transform2D<class_Transform2D>` transform ** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectbodystate3d.rst b/classes/class_physicsdirectbodystate3d.rst index 76b4414fec8..14622b57b8e 100644 --- a/classes/class_physicsdirectbodystate3d.rst +++ b/classes/class_physicsdirectbodystate3d.rst @@ -21,7 +21,7 @@ Provides direct access to a physics body in the :ref:`PhysicsServer3D<class_Phys Description ----------- -Provides direct access to a physics body in the :ref:`PhysicsServer3D<class_PhysicsServer3D>`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody3D<class_RigidBody3D>`, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces<class_RigidBody3D_method__integrate_forces>`. +Provides direct access to a physics body in the :ref:`PhysicsServer3D<class_PhysicsServer3D>`, allowing safe changes to physics properties. This object is passed via the direct state callback of :ref:`RigidBody3D<class_RigidBody3D>`, and is intended for changing the direct state of that body. See :ref:`RigidBody3D._integrate_forces<class_RigidBody3D_private_method__integrate_forces>`. .. rst-class:: classref-introduction-group @@ -78,63 +78,63 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_central_force<class_PhysicsDirectBodyState3D_method_add_constant_central_force>` **(** :ref:`Vector3<class_Vector3>` force=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_force<class_PhysicsDirectBodyState3D_method_add_constant_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_torque<class_PhysicsDirectBodyState3D_method_add_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_force<class_PhysicsDirectBodyState3D_method_apply_central_force>` **(** :ref:`Vector3<class_Vector3>` force=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse<class_PhysicsDirectBodyState3D_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_force<class_PhysicsDirectBodyState3D_method_apply_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse<class_PhysicsDirectBodyState3D_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque<class_PhysicsDirectBodyState3D_method_apply_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque_impulse<class_PhysicsDirectBodyState3D_method_apply_torque_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_constant_force<class_PhysicsDirectBodyState3D_method_get_constant_force>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_constant_torque<class_PhysicsDirectBodyState3D_method_get_constant_torque>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_contact_collider<class_PhysicsDirectBodyState3D_method_get_contact_collider>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_collider_id<class_PhysicsDirectBodyState3D_method_get_contact_collider_id>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_contact_collider_object<class_PhysicsDirectBodyState3D_method_get_contact_collider_object>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_collider_shape<class_PhysicsDirectBodyState3D_method_get_contact_collider_shape>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_count<class_PhysicsDirectBodyState3D_method_get_contact_count>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_impulse<class_PhysicsDirectBodyState3D_method_get_contact_impulse>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_normal<class_PhysicsDirectBodyState3D_method_get_contact_local_normal>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_position<class_PhysicsDirectBodyState3D_method_get_contact_local_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_local_shape<class_PhysicsDirectBodyState3D_method_get_contact_local_shape>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`get_space_state<class_PhysicsDirectBodyState3D_method_get_space_state>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_velocity_at_local_position<class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position>` **(** :ref:`Vector3<class_Vector3>` local_position **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`integrate_forces<class_PhysicsDirectBodyState3D_method_integrate_forces>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_force<class_PhysicsDirectBodyState3D_method_set_constant_force>` **(** :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_torque<class_PhysicsDirectBodyState3D_method_set_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_central_force<class_PhysicsDirectBodyState3D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_force<class_PhysicsDirectBodyState3D_method_add_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_torque<class_PhysicsDirectBodyState3D_method_add_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_force<class_PhysicsDirectBodyState3D_method_apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_impulse<class_PhysicsDirectBodyState3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_force<class_PhysicsDirectBodyState3D_method_apply_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_impulse<class_PhysicsDirectBodyState3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque<class_PhysicsDirectBodyState3D_method_apply_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque_impulse<class_PhysicsDirectBodyState3D_method_apply_torque_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_constant_force<class_PhysicsDirectBodyState3D_method_get_constant_force>`\ (\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_constant_torque<class_PhysicsDirectBodyState3D_method_get_constant_torque>`\ (\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_contact_collider<class_PhysicsDirectBodyState3D_method_get_contact_collider>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_collider_id<class_PhysicsDirectBodyState3D_method_get_contact_collider_id>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_contact_collider_object<class_PhysicsDirectBodyState3D_method_get_contact_collider_object>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_collider_shape<class_PhysicsDirectBodyState3D_method_get_contact_collider_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_count<class_PhysicsDirectBodyState3D_method_get_contact_count>`\ (\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_impulse<class_PhysicsDirectBodyState3D_method_get_contact_impulse>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_normal<class_PhysicsDirectBodyState3D_method_get_contact_local_normal>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_position<class_PhysicsDirectBodyState3D_method_get_contact_local_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_local_shape<class_PhysicsDirectBodyState3D_method_get_contact_local_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_contact_local_velocity_at_position<class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`get_space_state<class_PhysicsDirectBodyState3D_method_get_space_state>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_velocity_at_local_position<class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position>`\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`integrate_forces<class_PhysicsDirectBodyState3D_method_integrate_forces>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_force<class_PhysicsDirectBodyState3D_method_set_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_torque<class_PhysicsDirectBodyState3D_method_set_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -149,12 +149,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **angular_velocity** +:ref:`Vector3<class_Vector3>` **angular_velocity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ ) The body's rotational velocity in *radians* per second. @@ -166,11 +166,11 @@ The body's rotational velocity in *radians* per second. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **center_of_mass** +:ref:`Vector3<class_Vector3>` **center_of_mass** :ref:`🔗<class_PhysicsDirectBodyState3D_property_center_of_mass>` .. rst-class:: classref-property-setget -- :ref:`Vector3<class_Vector3>` **get_center_of_mass** **(** **)** +- :ref:`Vector3<class_Vector3>` **get_center_of_mass**\ (\ ) The body's center of mass position relative to the body's center in the global coordinate system. @@ -182,11 +182,11 @@ The body's center of mass position relative to the body's center in the global c .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **center_of_mass_local** +:ref:`Vector3<class_Vector3>` **center_of_mass_local** :ref:`🔗<class_PhysicsDirectBodyState3D_property_center_of_mass_local>` .. rst-class:: classref-property-setget -- :ref:`Vector3<class_Vector3>` **get_center_of_mass_local** **(** **)** +- :ref:`Vector3<class_Vector3>` **get_center_of_mass_local**\ (\ ) The body's center of mass position in the body's local coordinate system. @@ -198,11 +198,11 @@ The body's center of mass position in the body's local coordinate system. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **inverse_inertia** +:ref:`Vector3<class_Vector3>` **inverse_inertia** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_inertia>` .. rst-class:: classref-property-setget -- :ref:`Vector3<class_Vector3>` **get_inverse_inertia** **(** **)** +- :ref:`Vector3<class_Vector3>` **get_inverse_inertia**\ (\ ) The inverse of the inertia of the body. @@ -214,11 +214,11 @@ The inverse of the inertia of the body. .. rst-class:: classref-property -:ref:`Basis<class_Basis>` **inverse_inertia_tensor** +:ref:`Basis<class_Basis>` **inverse_inertia_tensor** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_inertia_tensor>` .. rst-class:: classref-property-setget -- :ref:`Basis<class_Basis>` **get_inverse_inertia_tensor** **(** **)** +- :ref:`Basis<class_Basis>` **get_inverse_inertia_tensor**\ (\ ) The inverse of the inertia tensor of the body. @@ -230,11 +230,11 @@ The inverse of the inertia tensor of the body. .. rst-class:: classref-property -:ref:`float<class_float>` **inverse_mass** +:ref:`float<class_float>` **inverse_mass** :ref:`🔗<class_PhysicsDirectBodyState3D_property_inverse_mass>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_inverse_mass** **(** **)** +- :ref:`float<class_float>` **get_inverse_mass**\ (\ ) The inverse of the mass of the body. @@ -246,12 +246,12 @@ The inverse of the mass of the body. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **linear_velocity** +:ref:`Vector3<class_Vector3>` **linear_velocity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ ) The body's linear velocity in units per second. @@ -263,11 +263,11 @@ The body's linear velocity in units per second. .. rst-class:: classref-property -:ref:`Basis<class_Basis>` **principal_inertia_axes** +:ref:`Basis<class_Basis>` **principal_inertia_axes** :ref:`🔗<class_PhysicsDirectBodyState3D_property_principal_inertia_axes>` .. rst-class:: classref-property-setget -- :ref:`Basis<class_Basis>` **get_principal_inertia_axes** **(** **)** +- :ref:`Basis<class_Basis>` **get_principal_inertia_axes**\ (\ ) .. container:: contribute @@ -281,12 +281,12 @@ The body's linear velocity in units per second. .. rst-class:: classref-property -:ref:`bool<class_bool>` **sleeping** +:ref:`bool<class_bool>` **sleeping** :ref:`🔗<class_PhysicsDirectBodyState3D_property_sleeping>` .. rst-class:: classref-property-setget -- void **set_sleep_state** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sleeping** **(** **)** +- |void| **set_sleep_state**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sleeping**\ (\ ) If ``true``, this body is currently sleeping (not active). @@ -298,11 +298,11 @@ If ``true``, this body is currently sleeping (not active). .. rst-class:: classref-property -:ref:`float<class_float>` **step** +:ref:`float<class_float>` **step** :ref:`🔗<class_PhysicsDirectBodyState3D_property_step>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_step** **(** **)** +- :ref:`float<class_float>` **get_step**\ (\ ) The timestep (delta) used for the simulation. @@ -314,11 +314,11 @@ The timestep (delta) used for the simulation. .. rst-class:: classref-property -:ref:`float<class_float>` **total_angular_damp** +:ref:`float<class_float>` **total_angular_damp** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_angular_damp>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_total_angular_damp** **(** **)** +- :ref:`float<class_float>` **get_total_angular_damp**\ (\ ) The rate at which the body stops rotating, if there are not any other forces moving it. @@ -330,11 +330,11 @@ The rate at which the body stops rotating, if there are not any other forces mov .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **total_gravity** +:ref:`Vector3<class_Vector3>` **total_gravity** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_gravity>` .. rst-class:: classref-property-setget -- :ref:`Vector3<class_Vector3>` **get_total_gravity** **(** **)** +- :ref:`Vector3<class_Vector3>` **get_total_gravity**\ (\ ) The total gravity vector being currently applied to this body. @@ -346,11 +346,11 @@ The total gravity vector being currently applied to this body. .. rst-class:: classref-property -:ref:`float<class_float>` **total_linear_damp** +:ref:`float<class_float>` **total_linear_damp** :ref:`🔗<class_PhysicsDirectBodyState3D_property_total_linear_damp>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_total_linear_damp** **(** **)** +- :ref:`float<class_float>` **get_total_linear_damp**\ (\ ) The rate at which the body stops moving, if there are not any other forces moving it. @@ -362,12 +362,12 @@ The rate at which the body stops moving, if there are not any other forces movin .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **transform** +:ref:`Transform3D<class_Transform3D>` **transform** :ref:`🔗<class_PhysicsDirectBodyState3D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_transform**\ (\ ) The body's transformation matrix. @@ -384,7 +384,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_constant_central_force** **(** :ref:`Vector3<class_Vector3>` force=Vector3(0, 0, 0) **)** +|void| **add_constant_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_central_force>` Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. @@ -398,7 +398,7 @@ This is equivalent to using :ref:`add_constant_force<class_PhysicsDirectBodyStat .. rst-class:: classref-method -void **add_constant_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **add_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_force>` Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. @@ -412,7 +412,7 @@ Adds a constant positioned force to the body that keeps being applied over time .. rst-class:: classref-method -void **add_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** +|void| **add_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_add_constant_torque>` Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. @@ -424,7 +424,7 @@ Adds a constant rotational force without affecting position that keeps being app .. rst-class:: classref-method -void **apply_central_force** **(** :ref:`Vector3<class_Vector3>` force=Vector3(0, 0, 0) **)** +|void| **apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_central_force>` Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. @@ -438,7 +438,7 @@ This is equivalent to using :ref:`apply_force<class_PhysicsDirectBodyState3D_met .. rst-class:: classref-method -void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse=Vector3(0, 0, 0) **)** +|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_central_impulse>` Applies a directional impulse without affecting rotation. @@ -454,7 +454,7 @@ This is equivalent to using :ref:`apply_impulse<class_PhysicsDirectBodyState3D_m .. rst-class:: classref-method -void **apply_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **apply_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_force>` Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. @@ -468,7 +468,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b .. rst-class:: classref-method -void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_impulse>` Applies a positioned impulse to the body. @@ -484,7 +484,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **apply_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** +|void| **apply_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_torque>` Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. @@ -498,7 +498,7 @@ Applies a rotational force without affecting position. A force is time dependent .. rst-class:: classref-method -void **apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** +|void| **apply_torque_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_apply_torque_impulse>` Applies a rotational impulse to the body without affecting the position. @@ -514,7 +514,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_constant_force** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_constant_force**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_constant_force>` Returns the body's total constant positional forces applied during each physics update. @@ -528,7 +528,7 @@ See :ref:`add_constant_force<class_PhysicsDirectBodyState3D_method_add_constant_ .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_constant_torque** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_constant_torque**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_constant_torque>` Returns the body's total constant rotational forces applied during each physics update. @@ -542,7 +542,7 @@ See :ref:`add_constant_torque<class_PhysicsDirectBodyState3D_method_add_constant .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_contact_collider** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`RID<class_RID>` **get_contact_collider**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider>` Returns the collider's :ref:`RID<class_RID>`. @@ -554,7 +554,7 @@ Returns the collider's :ref:`RID<class_RID>`. .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_collider_id** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_collider_id**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_id>` Returns the collider's object id. @@ -566,7 +566,7 @@ Returns the collider's object id. .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_contact_collider_object** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Object<class_Object>` **get_contact_collider_object**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_object>` Returns the collider object. @@ -578,7 +578,7 @@ Returns the collider object. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_collider_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_collider_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_position>` Returns the position of the contact point on the collider in the global coordinate system. @@ -590,7 +590,7 @@ Returns the position of the contact point on the collider in the global coordina .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_collider_shape** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_collider_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_shape>` Returns the collider's shape index. @@ -602,7 +602,7 @@ Returns the collider's shape index. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_collider_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_collider_velocity_at_position>` Returns the linear velocity vector at the collider's contact point. @@ -614,7 +614,7 @@ Returns the linear velocity vector at the collider's contact point. .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_count** **(** **)** |const| +:ref:`int<class_int>` **get_contact_count**\ (\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_count>` Returns the number of contacts this body has with other bodies. @@ -628,7 +628,7 @@ Returns the number of contacts this body has with other bodies. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_impulse** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_impulse**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_impulse>` Impulse created by the contact. @@ -640,7 +640,7 @@ Impulse created by the contact. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_local_normal** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_local_normal**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_normal>` Returns the local normal at the contact point. @@ -652,7 +652,7 @@ Returns the local normal at the contact point. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_local_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_local_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_position>` Returns the position of the contact point on the body in the global coordinate system. @@ -664,7 +664,7 @@ Returns the position of the contact point on the body in the global coordinate s .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_local_shape** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`int<class_int>` **get_contact_local_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_shape>` Returns the local shape index of the collision. @@ -676,7 +676,7 @@ Returns the local shape index of the collision. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_contact_local_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |const| +:ref:`Vector3<class_Vector3>` **get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_contact_local_velocity_at_position>` Returns the linear velocity vector at the body's contact point. @@ -688,7 +688,7 @@ Returns the linear velocity vector at the body's contact point. .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **get_space_state** **(** **)** +:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **get_space_state**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_space_state>` Returns the current state of the space, useful for queries. @@ -700,7 +700,7 @@ Returns the current state of the space, useful for queries. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_velocity_at_local_position** **(** :ref:`Vector3<class_Vector3>` local_position **)** |const| +:ref:`Vector3<class_Vector3>` **get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_PhysicsDirectBodyState3D_method_get_velocity_at_local_position>` Returns the body's velocity at the given relative position, including both translation and rotation. @@ -712,9 +712,9 @@ Returns the body's velocity at the given relative position, including both trans .. rst-class:: classref-method -void **integrate_forces** **(** **)** +|void| **integrate_forces**\ (\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_integrate_forces>` -Calls the built-in force integration code. +Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. .. rst-class:: classref-item-separator @@ -724,7 +724,7 @@ Calls the built-in force integration code. .. rst-class:: classref-method -void **set_constant_force** **(** :ref:`Vector3<class_Vector3>` force **)** +|void| **set_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_set_constant_force>` Sets the body's total constant positional forces applied during each physics update. @@ -738,7 +738,7 @@ See :ref:`add_constant_force<class_PhysicsDirectBodyState3D_method_add_constant_ .. rst-class:: classref-method -void **set_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** +|void| **set_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsDirectBodyState3D_method_set_constant_torque>` Sets the body's total constant rotational forces applied during each physics update. @@ -751,3 +751,4 @@ See :ref:`add_constant_torque<class_PhysicsDirectBodyState3D_method_add_constant .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectbodystate3dextension.rst b/classes/class_physicsdirectbodystate3dextension.rst index a80d0091dda..c2b184ea997 100644 --- a/classes/class_physicsdirectbodystate3dextension.rst +++ b/classes/class_physicsdirectbodystate3dextension.rst @@ -31,99 +31,99 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_central_force<class_PhysicsDirectBodyState3DExtension_method__add_constant_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_force<class_PhysicsDirectBodyState3DExtension_method__add_constant_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_torque<class_PhysicsDirectBodyState3DExtension_method__add_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_force<class_PhysicsDirectBodyState3DExtension_method__apply_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_impulse<class_PhysicsDirectBodyState3DExtension_method__apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_force<class_PhysicsDirectBodyState3DExtension_method__apply_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_impulse<class_PhysicsDirectBodyState3DExtension_method__apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque<class_PhysicsDirectBodyState3DExtension_method__apply_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque_impulse<class_PhysicsDirectBodyState3DExtension_method__apply_torque_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_angular_velocity<class_PhysicsDirectBodyState3DExtension_method__get_angular_velocity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_center_of_mass<class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_center_of_mass_local<class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass_local>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_constant_force<class_PhysicsDirectBodyState3DExtension_method__get_constant_force>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_constant_torque<class_PhysicsDirectBodyState3DExtension_method__get_constant_torque>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_get_contact_collider<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_collider_id<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_id>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`_get_contact_collider_object<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_object>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_collider_position<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_collider_shape<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_count<class_PhysicsDirectBodyState3DExtension_method__get_contact_count>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_impulse<class_PhysicsDirectBodyState3DExtension_method__get_contact_impulse>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_normal<class_PhysicsDirectBodyState3DExtension_method__get_contact_local_normal>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_position<class_PhysicsDirectBodyState3DExtension_method__get_contact_local_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_contact_local_shape<class_PhysicsDirectBodyState3DExtension_method__get_contact_local_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_velocity_at_position<class_PhysicsDirectBodyState3DExtension_method__get_contact_local_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_inverse_inertia<class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`_get_inverse_inertia_tensor<class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia_tensor>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_inverse_mass<class_PhysicsDirectBodyState3DExtension_method__get_inverse_mass>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_linear_velocity<class_PhysicsDirectBodyState3DExtension_method__get_linear_velocity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`_get_principal_inertia_axes<class_PhysicsDirectBodyState3DExtension_method__get_principal_inertia_axes>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`_get_space_state<class_PhysicsDirectBodyState3DExtension_method__get_space_state>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_step<class_PhysicsDirectBodyState3DExtension_method__get_step>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_total_angular_damp<class_PhysicsDirectBodyState3DExtension_method__get_total_angular_damp>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_total_gravity<class_PhysicsDirectBodyState3DExtension_method__get_total_gravity>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_total_linear_damp<class_PhysicsDirectBodyState3DExtension_method__get_total_linear_damp>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_transform<class_PhysicsDirectBodyState3DExtension_method__get_transform>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_velocity_at_local_position<class_PhysicsDirectBodyState3DExtension_method__get_velocity_at_local_position>` **(** :ref:`Vector3<class_Vector3>` local_position **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces<class_PhysicsDirectBodyState3DExtension_method__integrate_forces>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_sleeping<class_PhysicsDirectBodyState3DExtension_method__is_sleeping>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_angular_velocity<class_PhysicsDirectBodyState3DExtension_method__set_angular_velocity>` **(** :ref:`Vector3<class_Vector3>` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_force<class_PhysicsDirectBodyState3DExtension_method__set_constant_force>` **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_torque<class_PhysicsDirectBodyState3DExtension_method__set_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_linear_velocity<class_PhysicsDirectBodyState3DExtension_method__set_linear_velocity>` **(** :ref:`Vector3<class_Vector3>` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_sleep_state<class_PhysicsDirectBodyState3DExtension_method__set_sleep_state>` **(** :ref:`bool<class_bool>` enabled **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transform<class_PhysicsDirectBodyState3DExtension_method__set_transform>` **(** :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_central_force<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_force<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_constant_torque<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_central_force<class_PhysicsDirectBodyState3DExtension_private_method__apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_central_impulse<class_PhysicsDirectBodyState3DExtension_private_method__apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_force<class_PhysicsDirectBodyState3DExtension_private_method__apply_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_impulse<class_PhysicsDirectBodyState3DExtension_private_method__apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_torque<class_PhysicsDirectBodyState3DExtension_private_method__apply_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_apply_torque_impulse<class_PhysicsDirectBodyState3DExtension_private_method__apply_torque_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_angular_velocity<class_PhysicsDirectBodyState3DExtension_private_method__get_angular_velocity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_center_of_mass<class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_center_of_mass_local<class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass_local>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_constant_force<class_PhysicsDirectBodyState3DExtension_private_method__get_constant_force>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_constant_torque<class_PhysicsDirectBodyState3DExtension_private_method__get_constant_torque>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_contact_collider<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_collider_id<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_id>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`_get_contact_collider_object<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_object>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_collider_position<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_collider_shape<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_count<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_count>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_impulse<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_impulse>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_normal<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_normal>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_position<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_contact_local_shape<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_shape>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_contact_local_velocity_at_position<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_velocity_at_position>`\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_inverse_inertia<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`_get_inverse_inertia_tensor<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia_tensor>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_inverse_mass<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_mass>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_linear_velocity<class_PhysicsDirectBodyState3DExtension_private_method__get_linear_velocity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`_get_principal_inertia_axes<class_PhysicsDirectBodyState3DExtension_private_method__get_principal_inertia_axes>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`_get_space_state<class_PhysicsDirectBodyState3DExtension_private_method__get_space_state>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_step<class_PhysicsDirectBodyState3DExtension_private_method__get_step>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_total_angular_damp<class_PhysicsDirectBodyState3DExtension_private_method__get_total_angular_damp>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_total_gravity<class_PhysicsDirectBodyState3DExtension_private_method__get_total_gravity>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_total_linear_damp<class_PhysicsDirectBodyState3DExtension_private_method__get_total_linear_damp>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_transform<class_PhysicsDirectBodyState3DExtension_private_method__get_transform>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_velocity_at_local_position<class_PhysicsDirectBodyState3DExtension_private_method__get_velocity_at_local_position>`\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_integrate_forces<class_PhysicsDirectBodyState3DExtension_private_method__integrate_forces>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_sleeping<class_PhysicsDirectBodyState3DExtension_private_method__is_sleeping>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_angular_velocity<class_PhysicsDirectBodyState3DExtension_private_method__set_angular_velocity>`\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_constant_force<class_PhysicsDirectBodyState3DExtension_private_method__set_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_constant_torque<class_PhysicsDirectBodyState3DExtension_private_method__set_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_linear_velocity<class_PhysicsDirectBodyState3DExtension_private_method__set_linear_velocity>`\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_sleep_state<class_PhysicsDirectBodyState3DExtension_private_method__set_sleep_state>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_transform<class_PhysicsDirectBodyState3DExtension_private_method__set_transform>`\ (\ transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -134,11 +134,11 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_central_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_central_force: .. rst-class:: classref-method -void **_add_constant_central_force** **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_add_constant_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_central_force>` .. container:: contribute @@ -148,11 +148,11 @@ void **_add_constant_central_force** **(** :ref:`Vector3<class_Vector3>` force * ---- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_force: .. rst-class:: classref-method -void **_add_constant_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_add_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_force>` .. container:: contribute @@ -162,11 +162,11 @@ void **_add_constant_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Ve ---- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_torque: .. rst-class:: classref-method -void **_add_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_add_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__add_constant_torque>` .. container:: contribute @@ -176,11 +176,11 @@ void **_add_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** | ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_central_force: .. rst-class:: classref-method -void **_apply_central_force** **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_central_force>` .. container:: contribute @@ -190,11 +190,11 @@ void **_apply_central_force** **(** :ref:`Vector3<class_Vector3>` force **)** |v ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_central_impulse: .. rst-class:: classref-method -void **_apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** |virtual| +|void| **_apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_central_impulse>` .. container:: contribute @@ -204,11 +204,11 @@ void **_apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)* ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_force: .. rst-class:: classref-method -void **_apply_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_apply_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_force>` .. container:: contribute @@ -218,11 +218,11 @@ void **_apply_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<c ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_impulse: .. rst-class:: classref-method -void **_apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_impulse>` .. container:: contribute @@ -232,11 +232,11 @@ void **_apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vecto ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_torque: .. rst-class:: classref-method -void **_apply_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_apply_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_torque>` .. container:: contribute @@ -246,11 +246,11 @@ void **_apply_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_torque_impulse: .. rst-class:: classref-method -void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** |virtual| +|void| **_apply_torque_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__apply_torque_impulse>` .. container:: contribute @@ -260,11 +260,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_angular_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_angular_velocity: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_angular_velocity** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_angular_velocity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_angular_velocity>` .. container:: contribute @@ -274,11 +274,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_center_of_mass** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_center_of_mass**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass>` .. container:: contribute @@ -288,11 +288,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass_local: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass_local: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_center_of_mass_local** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_center_of_mass_local**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass_local>` .. container:: contribute @@ -302,11 +302,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_constant_force: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_constant_force** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_constant_force**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_constant_force>` .. container:: contribute @@ -316,11 +316,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_constant_torque: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_constant_torque** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_constant_torque**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_constant_torque>` .. container:: contribute @@ -330,11 +330,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_get_contact_collider** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`RID<class_RID>` **_get_contact_collider**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider>` .. container:: contribute @@ -344,11 +344,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_id: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_collider_id** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`int<class_int>` **_get_contact_collider_id**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_id>` .. container:: contribute @@ -358,11 +358,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_object: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_object: .. rst-class:: classref-method -:ref:`Object<class_Object>` **_get_contact_collider_object** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Object<class_Object>` **_get_contact_collider_object**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_object>` .. container:: contribute @@ -372,11 +372,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_collider_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_collider_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_position>` .. container:: contribute @@ -386,11 +386,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_shape: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_collider_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`int<class_int>` **_get_contact_collider_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_shape>` .. container:: contribute @@ -400,11 +400,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_velocity_at_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_velocity_at_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_collider_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_collider_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_velocity_at_position>` .. container:: contribute @@ -414,11 +414,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_count: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_contact_count**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_count>` .. container:: contribute @@ -428,11 +428,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_impulse: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_impulse** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_impulse**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_impulse>` .. container:: contribute @@ -442,11 +442,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_normal: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_normal: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_local_normal** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_local_normal**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_normal>` .. container:: contribute @@ -456,11 +456,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_local_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_local_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_position>` .. container:: contribute @@ -470,11 +470,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_shape: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_contact_local_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`int<class_int>` **_get_contact_local_shape**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_shape>` .. container:: contribute @@ -484,11 +484,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_velocity_at_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_velocity_at_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_contact_local_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_contact_local_velocity_at_position**\ (\ contact_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_velocity_at_position>` .. container:: contribute @@ -498,11 +498,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_inverse_inertia** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_inverse_inertia**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia>` .. container:: contribute @@ -512,11 +512,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia_tensor: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia_tensor: .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **_get_inverse_inertia_tensor** **(** **)** |virtual| |const| +:ref:`Basis<class_Basis>` **_get_inverse_inertia_tensor**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia_tensor>` .. container:: contribute @@ -526,11 +526,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_mass: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_mass: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_inverse_mass** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_inverse_mass**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_mass>` .. container:: contribute @@ -540,11 +540,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_linear_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_linear_velocity: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_linear_velocity** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_linear_velocity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_linear_velocity>` .. container:: contribute @@ -554,11 +554,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_principal_inertia_axes: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_principal_inertia_axes: .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **_get_principal_inertia_axes** **(** **)** |virtual| |const| +:ref:`Basis<class_Basis>` **_get_principal_inertia_axes**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_principal_inertia_axes>` .. container:: contribute @@ -568,11 +568,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_space_state: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_space_state: .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **_get_space_state** **(** **)** |virtual| +:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **_get_space_state**\ (\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_space_state>` .. container:: contribute @@ -582,11 +582,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_step: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_step: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_step** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_step**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_step>` .. container:: contribute @@ -596,11 +596,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_angular_damp: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_angular_damp: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_total_angular_damp** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_total_angular_damp**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_total_angular_damp>` .. container:: contribute @@ -610,11 +610,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_gravity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_gravity: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_total_gravity** **(** **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_total_gravity**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_total_gravity>` .. container:: contribute @@ -624,11 +624,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_linear_damp: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_linear_damp: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_total_linear_damp** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_total_linear_damp**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_total_linear_damp>` .. container:: contribute @@ -638,11 +638,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_transform: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_get_transform** **(** **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_get_transform**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_transform>` .. container:: contribute @@ -652,11 +652,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_velocity_at_local_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_velocity_at_local_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_velocity_at_local_position** **(** :ref:`Vector3<class_Vector3>` local_position **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_velocity_at_local_position**\ (\ local_position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__get_velocity_at_local_position>` .. container:: contribute @@ -666,11 +666,11 @@ void **_apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__integrate_forces: +.. _class_PhysicsDirectBodyState3DExtension_private_method__integrate_forces: .. rst-class:: classref-method -void **_integrate_forces** **(** **)** |virtual| +|void| **_integrate_forces**\ (\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__integrate_forces>` .. container:: contribute @@ -680,11 +680,11 @@ void **_integrate_forces** **(** **)** |virtual| ---- -.. _class_PhysicsDirectBodyState3DExtension_method__is_sleeping: +.. _class_PhysicsDirectBodyState3DExtension_private_method__is_sleeping: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_sleeping** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_sleeping**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__is_sleeping>` .. container:: contribute @@ -694,11 +694,11 @@ void **_integrate_forces** **(** **)** |virtual| ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_angular_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_angular_velocity: .. rst-class:: classref-method -void **_set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` velocity **)** |virtual| +|void| **_set_angular_velocity**\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_angular_velocity>` .. container:: contribute @@ -708,11 +708,11 @@ void **_set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` velocity **)* ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_constant_force: .. rst-class:: classref-method -void **_set_constant_force** **(** :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_set_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_constant_force>` .. container:: contribute @@ -722,11 +722,11 @@ void **_set_constant_force** **(** :ref:`Vector3<class_Vector3>` force **)** |vi ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_constant_torque: .. rst-class:: classref-method -void **_set_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_set_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_constant_torque>` .. container:: contribute @@ -736,11 +736,11 @@ void **_set_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** | ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_linear_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_linear_velocity: .. rst-class:: classref-method -void **_set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` velocity **)** |virtual| +|void| **_set_linear_velocity**\ (\ velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_linear_velocity>` .. container:: contribute @@ -750,11 +750,11 @@ void **_set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` velocity **)** ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_sleep_state: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_sleep_state: .. rst-class:: classref-method -void **_set_sleep_state** **(** :ref:`bool<class_bool>` enabled **)** |virtual| +|void| **_set_sleep_state**\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_sleep_state>` .. container:: contribute @@ -764,11 +764,11 @@ void **_set_sleep_state** **(** :ref:`bool<class_bool>` enabled **)** |virtual| ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_transform: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_transform: .. rst-class:: classref-method -void **_set_transform** **(** :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_set_transform**\ (\ transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectBodyState3DExtension_private_method__set_transform>` .. container:: contribute @@ -781,3 +781,4 @@ void **_set_transform** **(** :ref:`Transform3D<class_Transform3D>` transform ** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectspacestate2d.rst b/classes/class_physicsdirectspacestate2d.rst index 25f7b87d0b7..976046cd908 100644 --- a/classes/class_physicsdirectspacestate2d.rst +++ b/classes/class_physicsdirectspacestate2d.rst @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`cast_motion<class_PhysicsDirectSpaceState2D_method_cast_motion>` **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2[]<class_Vector2>` | :ref:`collide_shape<class_PhysicsDirectSpaceState2D_method_collide_shape>` **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_rest_info<class_PhysicsDirectSpaceState2D_method_get_rest_info>` **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`intersect_point<class_PhysicsDirectSpaceState2D_method_intersect_point>` **(** :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`intersect_ray<class_PhysicsDirectSpaceState2D_method_intersect_ray>` **(** :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`intersect_shape<class_PhysicsDirectSpaceState2D_method_intersect_shape>` **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`cast_motion<class_PhysicsDirectSpaceState2D_method_cast_motion>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2<class_Vector2>`\] | :ref:`collide_shape<class_PhysicsDirectSpaceState2D_method_collide_shape>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_rest_info<class_PhysicsDirectSpaceState2D_method_get_rest_info>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`intersect_point<class_PhysicsDirectSpaceState2D_method_intersect_point>`\ (\ parameters\: :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`intersect_ray<class_PhysicsDirectSpaceState2D_method_intersect_ray>`\ (\ parameters\: :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`intersect_shape<class_PhysicsDirectSpaceState2D_method_intersect_shape>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,7 +67,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **cast_motion**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_cast_motion>` Checks how far a :ref:`Shape2D<class_Shape2D>` can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` object. @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`Vector2[]<class_Vector2>` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Vector2<class_Vector2>`\] **collide_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_collide_shape>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape<class_PhysicsDirectSpaceState2D_method_intersect_shape>`, the number of returned results can be limited to save processing time. @@ -97,7 +97,7 @@ Returned points are a list of pairs of contact points. For each pair the first o .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters **)** +:ref:`Dictionary<class_Dictionary>` **get_rest_info**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_get_rest_info>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. @@ -123,7 +123,7 @@ Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryPara .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **intersect_point** **(** :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **intersect_point**\ (\ parameters\: :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_intersect_point>` Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -147,7 +147,7 @@ The number of intersections can be limited with the ``max_results`` parameter, t .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` parameters **)** +:ref:`Dictionary<class_Dictionary>` **intersect_ray**\ (\ parameters\: :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_intersect_ray>` Intersects a ray in a given space. Ray position and other parameters are defined through :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>`. The returned object is a dictionary with the following fields: @@ -173,7 +173,7 @@ If the ray did not intersect anything, then an empty dictionary is returned inst .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **intersect_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState2D_method_intersect_shape>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: @@ -194,3 +194,4 @@ The number of intersections can be limited with the ``max_results`` parameter, t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectspacestate2dextension.rst b/classes/class_physicsdirectspacestate2dextension.rst index bc92eca4836..956bbef265a 100644 --- a/classes/class_physicsdirectspacestate2dextension.rst +++ b/classes/class_physicsdirectspacestate2dextension.rst @@ -31,21 +31,21 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_cast_motion<class_PhysicsDirectSpaceState2DExtension_method__cast_motion>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_collide_shape<class_PhysicsDirectSpaceState2DExtension_method__collide_shape>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_intersect_point<class_PhysicsDirectSpaceState2DExtension_method__intersect_point>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` canvas_instance_id, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int<class_int>` max_results **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_intersect_ray<class_PhysicsDirectSpaceState2DExtension_method__intersect_ray>` **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_intersect_shape<class_PhysicsDirectSpaceState2DExtension_method__intersect_shape>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int<class_int>` max_results **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_rest_info<class_PhysicsDirectSpaceState2DExtension_method__rest_info>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_body_excluded_from_query<class_PhysicsDirectSpaceState2DExtension_method_is_body_excluded_from_query>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_cast_motion<class_PhysicsDirectSpaceState2DExtension_private_method__cast_motion>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, closest_safe\: ``float*``, closest_unsafe\: ``float*``\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_collide_shape<class_PhysicsDirectSpaceState2DExtension_private_method__collide_shape>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``void*``, max_results\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_intersect_point<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_point>`\ (\ position\: :ref:`Vector2<class_Vector2>`, canvas_instance_id\: :ref:`int<class_int>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``PhysicsServer2DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_intersect_ray<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_ray>`\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, hit_from_inside\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionRayResult*``\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_intersect_shape<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_shape>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_rest_info<class_PhysicsDirectSpaceState2DExtension_private_method__rest_info>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, rest_info\: ``PhysicsServer2DExtensionShapeRestInfo*``\ ) |virtual| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_body_excluded_from_query<class_PhysicsDirectSpaceState2DExtension_method_is_body_excluded_from_query>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -56,11 +56,11 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsDirectSpaceState2DExtension_method__cast_motion: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__cast_motion: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_cast_motion** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| +:ref:`bool<class_bool>` **_cast_motion**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, closest_safe\: ``float*``, closest_unsafe\: ``float*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__cast_motion>` .. container:: contribute @@ -70,11 +70,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__collide_shape: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__collide_shape: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_collide_shape** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count **)** |virtual| +:ref:`bool<class_bool>` **_collide_shape**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``void*``, max_results\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__collide_shape>` .. container:: contribute @@ -84,11 +84,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_point: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_point: .. rst-class:: classref-method -:ref:`int<class_int>` **_intersect_point** **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` canvas_instance_id, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int<class_int>` max_results **)** |virtual| +:ref:`int<class_int>` **_intersect_point**\ (\ position\: :ref:`Vector2<class_Vector2>`, canvas_instance_id\: :ref:`int<class_int>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``PhysicsServer2DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_point>` .. container:: contribute @@ -98,11 +98,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_ray: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_ray: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_intersect_ray** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| +:ref:`bool<class_bool>` **_intersect_ray**\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, hit_from_inside\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionRayResult*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_ray>` .. container:: contribute @@ -112,11 +112,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_shape: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_intersect_shape** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int<class_int>` max_results **)** |virtual| +:ref:`int<class_int>` **_intersect_shape**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__intersect_shape>` .. container:: contribute @@ -126,11 +126,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__rest_info: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__rest_info: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_rest_info** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform2D<class_Transform2D>` transform, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| +:ref:`bool<class_bool>` **_rest_info**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, rest_info\: ``PhysicsServer2DExtensionShapeRestInfo*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_private_method__rest_info>` .. container:: contribute @@ -144,7 +144,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_body_excluded_from_query** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **is_body_excluded_from_query**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsDirectSpaceState2DExtension_method_is_body_excluded_from_query>` .. container:: contribute @@ -157,3 +157,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectspacestate3d.rst b/classes/class_physicsdirectspacestate3d.rst index 43a209d0fd6..5011f0d4b24 100644 --- a/classes/class_physicsdirectspacestate3d.rst +++ b/classes/class_physicsdirectspacestate3d.rst @@ -40,19 +40,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`cast_motion<class_PhysicsDirectSpaceState3D_method_cast_motion>` **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3[]<class_Vector3>` | :ref:`collide_shape<class_PhysicsDirectSpaceState3D_method_collide_shape>` **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_rest_info<class_PhysicsDirectSpaceState3D_method_get_rest_info>` **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`intersect_point<class_PhysicsDirectSpaceState3D_method_intersect_point>` **(** :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`intersect_ray<class_PhysicsDirectSpaceState3D_method_intersect_ray>` **(** :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` parameters **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`intersect_shape<class_PhysicsDirectSpaceState3D_method_intersect_shape>` **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`cast_motion<class_PhysicsDirectSpaceState3D_method_cast_motion>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector3<class_Vector3>`\] | :ref:`collide_shape<class_PhysicsDirectSpaceState3D_method_collide_shape>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_rest_info<class_PhysicsDirectSpaceState3D_method_get_rest_info>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`intersect_point<class_PhysicsDirectSpaceState3D_method_intersect_point>`\ (\ parameters\: :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`intersect_ray<class_PhysicsDirectSpaceState3D_method_intersect_ray>`\ (\ parameters\: :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`intersect_shape<class_PhysicsDirectSpaceState3D_method_intersect_shape>`\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,7 +67,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **cast_motion** **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters **)** +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **cast_motion**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_cast_motion>` Checks how far a :ref:`Shape3D<class_Shape3D>` can move without colliding. All the parameters for the query, including the shape, are supplied through a :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` object. @@ -83,7 +83,7 @@ Returns an array with the safe and unsafe proportions (between 0 and 1) of the m .. rst-class:: classref-method -:ref:`Vector3[]<class_Vector3>` **collide_shape** **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Vector3<class_Vector3>`\] **collide_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_collide_shape>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with :ref:`intersect_shape<class_PhysicsDirectSpaceState3D_method_intersect_shape>`, the number of returned results can be limited to save processing time. @@ -99,7 +99,7 @@ Returned points are a list of pairs of contact points. For each pair the first o .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_rest_info** **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters **)** +:ref:`Dictionary<class_Dictionary>` **get_rest_info**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_get_rest_info>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: @@ -127,7 +127,7 @@ If the shape did not intersect anything, then an empty dictionary is returned in .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **intersect_point** **(** :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **intersect_point**\ (\ parameters\: :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_intersect_point>` Checks whether a point is inside any solid shape. Position and other parameters are defined through :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: @@ -149,7 +149,7 @@ The number of intersections can be limited with the ``max_results`` parameter, t .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` parameters **)** +:ref:`Dictionary<class_Dictionary>` **intersect_ray**\ (\ parameters\: :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>`\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_intersect_ray>` Intersects a ray in a given space. Ray position and other parameters are defined through :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>`. The returned object is a dictionary with the following fields: @@ -161,6 +161,10 @@ Intersects a ray in a given space. Ray position and other parameters are defined \ ``position``: The intersection point. +\ ``face_index``: The face index at the intersection point. + +\ **Note:** Returns a valid number only if the intersected shape is a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>`. Otherwise, ``-1`` is returned. + \ ``rid``: The intersecting object's :ref:`RID<class_RID>`. \ ``shape``: The shape index of the colliding shape. @@ -175,7 +179,7 @@ If the ray did not intersect anything, then an empty dictionary is returned inst .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **intersect_shape** **(** :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` parameters, :ref:`int<class_int>` max_results=32 **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **intersect_shape**\ (\ parameters\: :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, max_results\: :ref:`int<class_int>` = 32\ ) :ref:`🔗<class_PhysicsDirectSpaceState3D_method_intersect_shape>` Checks the intersections of a shape, given through a :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: @@ -198,3 +202,4 @@ The number of intersections can be limited with the ``max_results`` parameter, t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsdirectspacestate3dextension.rst b/classes/class_physicsdirectspacestate3dextension.rst index 0bdb05ebd1d..81dc0b95419 100644 --- a/classes/class_physicsdirectspacestate3dextension.rst +++ b/classes/class_physicsdirectspacestate3dextension.rst @@ -31,23 +31,23 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_cast_motion<class_PhysicsDirectSpaceState3DExtension_method__cast_motion>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_collide_shape<class_PhysicsDirectSpaceState3DExtension_method__collide_shape>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_get_closest_point_to_object_volume<class_PhysicsDirectSpaceState3DExtension_method__get_closest_point_to_object_volume>` **(** :ref:`RID<class_RID>` object, :ref:`Vector3<class_Vector3>` point **)** |virtual| |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_intersect_point<class_PhysicsDirectSpaceState3DExtension_method__intersect_point>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int<class_int>` max_results **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_intersect_ray<class_PhysicsDirectSpaceState3DExtension_method__intersect_ray>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, :ref:`bool<class_bool>` hit_back_faces, :ref:`bool<class_bool>` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_intersect_shape<class_PhysicsDirectSpaceState3DExtension_method__intersect_shape>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int<class_int>` max_results **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_rest_info<class_PhysicsDirectSpaceState3DExtension_method__rest_info>` **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_body_excluded_from_query<class_PhysicsDirectSpaceState3DExtension_method_is_body_excluded_from_query>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_cast_motion<class_PhysicsDirectSpaceState3DExtension_private_method__cast_motion>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, closest_safe\: ``float*``, closest_unsafe\: ``float*``, info\: ``PhysicsServer3DExtensionShapeRestInfo*``\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_collide_shape<class_PhysicsDirectSpaceState3DExtension_private_method__collide_shape>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``void*``, max_results\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_closest_point_to_object_volume<class_PhysicsDirectSpaceState3DExtension_private_method__get_closest_point_to_object_volume>`\ (\ object\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |virtual| |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_intersect_point<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_point>`\ (\ position\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``PhysicsServer3DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_intersect_ray<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_ray>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, hit_from_inside\: :ref:`bool<class_bool>`, hit_back_faces\: :ref:`bool<class_bool>`, pick_ray\: :ref:`bool<class_bool>`, result\: ``PhysicsServer3DExtensionRayResult*``\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_intersect_shape<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_shape>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, result_count\: ``PhysicsServer3DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_rest_info<class_PhysicsDirectSpaceState3DExtension_private_method__rest_info>`\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, rest_info\: ``PhysicsServer3DExtensionShapeRestInfo*``\ ) |virtual| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_body_excluded_from_query<class_PhysicsDirectSpaceState3DExtension_method_is_body_excluded_from_query>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,11 +58,11 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsDirectSpaceState3DExtension_method__cast_motion: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__cast_motion: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_cast_motion** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| +:ref:`bool<class_bool>` **_cast_motion**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, closest_safe\: ``float*``, closest_unsafe\: ``float*``, info\: ``PhysicsServer3DExtensionShapeRestInfo*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__cast_motion>` .. container:: contribute @@ -72,11 +72,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__collide_shape: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__collide_shape: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_collide_shape** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, void* results, :ref:`int<class_int>` max_results, int32_t* result_count **)** |virtual| +:ref:`bool<class_bool>` **_collide_shape**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``void*``, max_results\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__collide_shape>` .. container:: contribute @@ -86,11 +86,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__get_closest_point_to_object_volume: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__get_closest_point_to_object_volume: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_get_closest_point_to_object_volume** **(** :ref:`RID<class_RID>` object, :ref:`Vector3<class_Vector3>` point **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_get_closest_point_to_object_volume**\ (\ object\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__get_closest_point_to_object_volume>` .. container:: contribute @@ -100,11 +100,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_point: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_point: .. rst-class:: classref-method -:ref:`int<class_int>` **_intersect_point** **(** :ref:`Vector3<class_Vector3>` position, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int<class_int>` max_results **)** |virtual| +:ref:`int<class_int>` **_intersect_point**\ (\ position\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, results\: ``PhysicsServer3DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_point>` .. container:: contribute @@ -114,11 +114,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_ray: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_ray: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_intersect_ray** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, :ref:`bool<class_bool>` hit_from_inside, :ref:`bool<class_bool>` hit_back_faces, :ref:`bool<class_bool>` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| +:ref:`bool<class_bool>` **_intersect_ray**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, hit_from_inside\: :ref:`bool<class_bool>`, hit_back_faces\: :ref:`bool<class_bool>`, pick_ray\: :ref:`bool<class_bool>`, result\: ``PhysicsServer3DExtensionRayResult*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_ray>` .. container:: contribute @@ -128,11 +128,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_shape: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_shape: .. rst-class:: classref-method -:ref:`int<class_int>` **_intersect_shape** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int<class_int>` max_results **)** |virtual| +:ref:`int<class_int>` **_intersect_shape**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, result_count\: ``PhysicsServer3DExtensionShapeResult*``, max_results\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__intersect_shape>` .. container:: contribute @@ -142,11 +142,11 @@ Method Descriptions ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__rest_info: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__rest_info: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_rest_info** **(** :ref:`RID<class_RID>` shape_rid, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` collision_mask, :ref:`bool<class_bool>` collide_with_bodies, :ref:`bool<class_bool>` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| +:ref:`bool<class_bool>` **_rest_info**\ (\ shape_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, collision_mask\: :ref:`int<class_int>`, collide_with_bodies\: :ref:`bool<class_bool>`, collide_with_areas\: :ref:`bool<class_bool>`, rest_info\: ``PhysicsServer3DExtensionShapeRestInfo*``\ ) |virtual| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_private_method__rest_info>` .. container:: contribute @@ -160,7 +160,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_body_excluded_from_query** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **is_body_excluded_from_query**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsDirectSpaceState3DExtension_method_is_body_excluded_from_query>` .. container:: contribute @@ -173,3 +173,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsmaterial.rst b/classes/class_physicsmaterial.rst index 9a13ede9df4..4920b20e6db 100644 --- a/classes/class_physicsmaterial.rst +++ b/classes/class_physicsmaterial.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **absorbent** = ``false`` +:ref:`bool<class_bool>` **absorbent** = ``false`` :ref:`🔗<class_PhysicsMaterial_property_absorbent>` .. rst-class:: classref-property-setget -- void **set_absorbent** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_absorbent** **(** **)** +- |void| **set_absorbent**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_absorbent**\ (\ ) If ``true``, subtracts the bounciness from the colliding object's bounciness instead of adding it. @@ -69,15 +69,17 @@ If ``true``, subtracts the bounciness from the colliding object's bounciness ins .. rst-class:: classref-property -:ref:`float<class_float>` **bounce** = ``0.0`` +:ref:`float<class_float>` **bounce** = ``0.0`` :ref:`🔗<class_PhysicsMaterial_property_bounce>` .. rst-class:: classref-property-setget -- void **set_bounce** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bounce** **(** **)** +- |void| **set_bounce**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bounce**\ (\ ) The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounciness). +\ **Note:** Even with :ref:`bounce<class_PhysicsMaterial_property_bounce>` set to ``1.0``, some energy will be lost over time due to linear and angular damping. To have a physics body that preserves all its energy over time, set :ref:`bounce<class_PhysicsMaterial_property_bounce>` to ``1.0``, the body's linear damp mode to **Replace** (if applicable), its linear damp to ``0.0``, its angular damp mode to **Replace** (if applicable), and its angular damp to ``0.0``. + .. rst-class:: classref-item-separator ---- @@ -86,12 +88,12 @@ The body's bounciness. Values range from ``0`` (no bounce) to ``1`` (full bounci .. rst-class:: classref-property -:ref:`float<class_float>` **friction** = ``1.0`` +:ref:`float<class_float>` **friction** = ``1.0`` :ref:`🔗<class_PhysicsMaterial_property_friction>` .. rst-class:: classref-property-setget -- void **set_friction** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_friction** **(** **)** +- |void| **set_friction**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_friction**\ (\ ) The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum friction). @@ -103,12 +105,12 @@ The body's friction. Values range from ``0`` (frictionless) to ``1`` (maximum fr .. rst-class:: classref-property -:ref:`bool<class_bool>` **rough** = ``false`` +:ref:`bool<class_bool>` **rough** = ``false`` :ref:`🔗<class_PhysicsMaterial_property_rough>` .. rst-class:: classref-property-setget -- void **set_rough** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_rough** **(** **)** +- |void| **set_rough**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_rough**\ (\ ) If ``true``, the physics engine will use the friction of the object marked as "rough" when two objects collide. If ``false``, the physics engine will use the lowest friction of all colliding objects instead. If ``true`` for both colliding objects, the physics engine will use the highest friction. @@ -119,3 +121,4 @@ If ``true``, the physics engine will use the friction of the object marked as "r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicspointqueryparameters2d.rst b/classes/class_physicspointqueryparameters2d.rst index c3376a8bf0b..0127643629b 100644 --- a/classes/class_physicspointqueryparameters2d.rst +++ b/classes/class_physicspointqueryparameters2d.rst @@ -29,19 +29,19 @@ Properties .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int<class_int>` | :ref:`canvas_instance_id<class_PhysicsPointQueryParameters2D_property_canvas_instance_id>` | ``0`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsPointQueryParameters2D_property_collide_with_areas>` | ``false`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsPointQueryParameters2D_property_collide_with_bodies>` | ``true`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsPointQueryParameters2D_property_collision_mask>` | ``4294967295`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsPointQueryParameters2D_property_exclude>` | ``[]`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`position<class_PhysicsPointQueryParameters2D_property_position>` | ``Vector2(0, 0)`` | - +-------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int<class_int>` | :ref:`canvas_instance_id<class_PhysicsPointQueryParameters2D_property_canvas_instance_id>` | ``0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsPointQueryParameters2D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsPointQueryParameters2D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsPointQueryParameters2D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsPointQueryParameters2D_property_exclude>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`position<class_PhysicsPointQueryParameters2D_property_position>` | ``Vector2(0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-section-separator @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **canvas_instance_id** = ``0`` +:ref:`int<class_int>` **canvas_instance_id** = ``0`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_canvas_instance_id>` .. rst-class:: classref-property-setget -- void **set_canvas_instance_id** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_canvas_instance_id** **(** **)** +- |void| **set_canvas_instance_id**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_canvas_instance_id**\ (\ ) If different from ``0``, restricts the query to a specific canvas layer specified by its instance ID. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -75,12 +75,12 @@ If ``0``, restricts the query to the Viewport's default canvas layer. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. @@ -92,12 +92,12 @@ If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s into account. @@ -109,12 +109,12 @@ If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -126,12 +126,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid<class_CollisionObject2D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject2D<class_CollisionObject2D>`-derived node. @@ -143,12 +143,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_PhysicsPointQueryParameters2D_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_position**\ (\ ) The position being queried for, in global coordinates. @@ -159,3 +159,4 @@ The position being queried for, in global coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicspointqueryparameters3d.rst b/classes/class_physicspointqueryparameters3d.rst index 13aa056a93b..2f2765e9c99 100644 --- a/classes/class_physicspointqueryparameters3d.rst +++ b/classes/class_physicspointqueryparameters3d.rst @@ -29,17 +29,17 @@ Properties .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsPointQueryParameters3D_property_collide_with_areas>` | ``false`` | - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsPointQueryParameters3D_property_collide_with_bodies>` | ``true`` | - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsPointQueryParameters3D_property_collision_mask>` | ``4294967295`` | - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsPointQueryParameters3D_property_exclude>` | ``[]`` | - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`position<class_PhysicsPointQueryParameters3D_property_position>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsPointQueryParameters3D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsPointQueryParameters3D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsPointQueryParameters3D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsPointQueryParameters3D_property_exclude>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`position<class_PhysicsPointQueryParameters3D_property_position>` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-section-separator @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsPointQueryParameters3D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. @@ -71,12 +71,12 @@ If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsPointQueryParameters3D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s into account. @@ -88,12 +88,12 @@ If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsPointQueryParameters3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -105,12 +105,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsPointQueryParameters3D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid<class_CollisionObject3D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject3D<class_CollisionObject3D>`-derived node. @@ -122,12 +122,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **position** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicsPointQueryParameters3D_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_position**\ (\ ) The position being queried for, in global coordinates. @@ -138,3 +138,4 @@ The position being queried for, in global coordinates. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsrayqueryparameters2d.rst b/classes/class_physicsrayqueryparameters2d.rst index 25bcc0d6a7f..4daa99ecba0 100644 --- a/classes/class_physicsrayqueryparameters2d.rst +++ b/classes/class_physicsrayqueryparameters2d.rst @@ -29,21 +29,21 @@ Properties .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsRayQueryParameters2D_property_collide_with_areas>` | ``false`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsRayQueryParameters2D_property_collide_with_bodies>` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsRayQueryParameters2D_property_collision_mask>` | ``4294967295`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsRayQueryParameters2D_property_exclude>` | ``[]`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`from<class_PhysicsRayQueryParameters2D_property_from>` | ``Vector2(0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool<class_bool>` | :ref:`hit_from_inside<class_PhysicsRayQueryParameters2D_property_hit_from_inside>` | ``false`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`to<class_PhysicsRayQueryParameters2D_property_to>` | ``Vector2(0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsRayQueryParameters2D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsRayQueryParameters2D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsRayQueryParameters2D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsRayQueryParameters2D_property_exclude>` | ``[]`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`from<class_PhysicsRayQueryParameters2D_property_from>` | ``Vector2(0, 0)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool<class_bool>` | :ref:`hit_from_inside<class_PhysicsRayQueryParameters2D_property_hit_from_inside>` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`to<class_PhysicsRayQueryParameters2D_property_to>` | ``Vector2(0, 0)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -53,9 +53,9 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` | :ref:`create<class_PhysicsRayQueryParameters2D_method_create>` **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask=4294967295, :ref:`RID[]<class_RID>` exclude=[] **)** |static| | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` | :ref:`create<class_PhysicsRayQueryParameters2D_method_create>`\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, collision_mask\: :ref:`int<class_int>` = 4294967295, exclude\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) |static| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,12 +70,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. @@ -87,12 +87,12 @@ If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s into account. @@ -104,12 +104,12 @@ If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -121,12 +121,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid<class_CollisionObject2D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject2D<class_CollisionObject2D>`-derived node. @@ -138,12 +138,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **from** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **from** = ``Vector2(0, 0)`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_from>` .. rst-class:: classref-property-setget -- void **set_from** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_from** **(** **)** +- |void| **set_from**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_from**\ (\ ) The starting point of the ray being queried for, in global coordinates. @@ -155,12 +155,12 @@ The starting point of the ray being queried for, in global coordinates. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_from_inside** = ``false`` +:ref:`bool<class_bool>` **hit_from_inside** = ``false`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_hit_from_inside>` .. rst-class:: classref-property-setget -- void **set_hit_from_inside** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_from_inside_enabled** **(** **)** +- |void| **set_hit_from_inside**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_from_inside_enabled**\ (\ ) If ``true``, the query will detect a hit when starting inside shapes. In this case the collision normal will be ``Vector2(0, 0)``. Does not affect concave polygon shapes. @@ -172,12 +172,12 @@ If ``true``, the query will detect a hit when starting inside shapes. In this ca .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **to** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **to** = ``Vector2(0, 0)`` :ref:`🔗<class_PhysicsRayQueryParameters2D_property_to>` .. rst-class:: classref-property-setget -- void **set_to** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_to** **(** **)** +- |void| **set_to**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_to**\ (\ ) The ending point of the ray being queried for, in global coordinates. @@ -194,7 +194,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` **create** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`int<class_int>` collision_mask=4294967295, :ref:`RID[]<class_RID>` exclude=[] **)** |static| +:ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>` **create**\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, collision_mask\: :ref:`int<class_int>` = 4294967295, exclude\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) |static| :ref:`🔗<class_PhysicsRayQueryParameters2D_method_create>` Returns a new, pre-configured **PhysicsRayQueryParameters2D** object. Use it to quickly create query parameters using the most common options. @@ -210,3 +210,4 @@ Returns a new, pre-configured **PhysicsRayQueryParameters2D** object. Use it to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsrayqueryparameters3d.rst b/classes/class_physicsrayqueryparameters3d.rst index 7699e26c05a..e53ca2eb15e 100644 --- a/classes/class_physicsrayqueryparameters3d.rst +++ b/classes/class_physicsrayqueryparameters3d.rst @@ -29,23 +29,23 @@ Properties .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsRayQueryParameters3D_property_collide_with_areas>` | ``false`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsRayQueryParameters3D_property_collide_with_bodies>` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsRayQueryParameters3D_property_collision_mask>` | ``4294967295`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsRayQueryParameters3D_property_exclude>` | ``[]`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`from<class_PhysicsRayQueryParameters3D_property_from>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`hit_back_faces<class_PhysicsRayQueryParameters3D_property_hit_back_faces>` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`hit_from_inside<class_PhysicsRayQueryParameters3D_property_hit_from_inside>` | ``false`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`to<class_PhysicsRayQueryParameters3D_property_to>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsRayQueryParameters3D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsRayQueryParameters3D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsRayQueryParameters3D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsRayQueryParameters3D_property_exclude>` | ``[]`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`from<class_PhysicsRayQueryParameters3D_property_from>` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`hit_back_faces<class_PhysicsRayQueryParameters3D_property_hit_back_faces>` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`hit_from_inside<class_PhysicsRayQueryParameters3D_property_hit_from_inside>` | ``false`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`to<class_PhysicsRayQueryParameters3D_property_to>` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group @@ -55,9 +55,9 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` | :ref:`create<class_PhysicsRayQueryParameters3D_method_create>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`int<class_int>` collision_mask=4294967295, :ref:`RID[]<class_RID>` exclude=[] **)** |static| | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` | :ref:`create<class_PhysicsRayQueryParameters3D_method_create>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>` = 4294967295, exclude\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) |static| | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,12 +72,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. @@ -89,12 +89,12 @@ If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s into account. @@ -106,12 +106,12 @@ If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -123,12 +123,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid<class_CollisionObject3D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject3D<class_CollisionObject3D>`-derived node. @@ -140,12 +140,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **from** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **from** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_from>` .. rst-class:: classref-property-setget -- void **set_from** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_from** **(** **)** +- |void| **set_from**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_from**\ (\ ) The starting point of the ray being queried for, in global coordinates. @@ -157,12 +157,12 @@ The starting point of the ray being queried for, in global coordinates. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_back_faces** = ``true`` +:ref:`bool<class_bool>` **hit_back_faces** = ``true`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_hit_back_faces>` .. rst-class:: classref-property-setget -- void **set_hit_back_faces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_back_faces_enabled** **(** **)** +- |void| **set_hit_back_faces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_back_faces_enabled**\ (\ ) If ``true``, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. @@ -174,12 +174,12 @@ If ``true``, the query will hit back faces with concave polygon shapes with back .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_from_inside** = ``false`` +:ref:`bool<class_bool>` **hit_from_inside** = ``false`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_hit_from_inside>` .. rst-class:: classref-property-setget -- void **set_hit_from_inside** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_from_inside_enabled** **(** **)** +- |void| **set_hit_from_inside**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_from_inside_enabled**\ (\ ) If ``true``, the query will detect a hit when starting inside shapes. In this case the collision normal will be ``Vector3(0, 0, 0)``. Does not affect concave polygon shapes or heightmap shapes. @@ -191,12 +191,12 @@ If ``true``, the query will detect a hit when starting inside shapes. In this ca .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **to** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **to** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicsRayQueryParameters3D_property_to>` .. rst-class:: classref-property-setget -- void **set_to** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_to** **(** **)** +- |void| **set_to**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_to**\ (\ ) The ending point of the ray being queried for, in global coordinates. @@ -213,7 +213,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` **create** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`int<class_int>` collision_mask=4294967295, :ref:`RID[]<class_RID>` exclude=[] **)** |static| +:ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>` **create**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, collision_mask\: :ref:`int<class_int>` = 4294967295, exclude\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) |static| :ref:`🔗<class_PhysicsRayQueryParameters3D_method_create>` Returns a new, pre-configured **PhysicsRayQueryParameters3D** object. Use it to quickly create query parameters using the most common options. @@ -229,3 +229,4 @@ Returns a new, pre-configured **PhysicsRayQueryParameters3D** object. Use it to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver2d.rst b/classes/class_physicsserver2d.rst index 088b0a0ef29..8a58d30b956 100644 --- a/classes/class_physicsserver2d.rst +++ b/classes/class_physicsserver2d.rst @@ -45,239 +45,243 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_attach_canvas_instance_id<class_PhysicsServer2D_method_area_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_attach_object_instance_id<class_PhysicsServer2D_method_area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_clear_shapes<class_PhysicsServer2D_method_area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer2D_method_area_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_canvas_instance_id<class_PhysicsServer2D_method_area_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_collision_layer<class_PhysicsServer2D_method_area_get_collision_layer>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_collision_mask<class_PhysicsServer2D_method_area_get_collision_mask>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer2D_method_area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer2D_method_area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer2D_method_area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer2D_method_area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_shape_transform<class_PhysicsServer2D_method_area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer2D_method_area_get_space>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_transform<class_PhysicsServer2D_method_area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_remove_shape<class_PhysicsServer2D_method_area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_area_monitor_callback<class_PhysicsServer2D_method_area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_collision_layer<class_PhysicsServer2D_method_area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_collision_mask<class_PhysicsServer2D_method_area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_monitor_callback<class_PhysicsServer2D_method_area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_param<class_PhysicsServer2D_method_area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape<class_PhysicsServer2D_method_area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape_disabled<class_PhysicsServer2D_method_area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape_transform<class_PhysicsServer2D_method_area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_collision_exception<class_PhysicsServer2D_method_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_central_force<class_PhysicsServer2D_method_body_add_constant_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_force<class_PhysicsServer2D_method_body_add_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_torque<class_PhysicsServer2D_method_body_add_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_central_force<class_PhysicsServer2D_method_body_apply_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_central_impulse<class_PhysicsServer2D_method_body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_force<class_PhysicsServer2D_method_body_apply_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_impulse<class_PhysicsServer2D_method_body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_torque<class_PhysicsServer2D_method_body_apply_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_torque_impulse<class_PhysicsServer2D_method_body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_attach_canvas_instance_id<class_PhysicsServer2D_method_body_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_attach_object_instance_id<class_PhysicsServer2D_method_body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_clear_shapes<class_PhysicsServer2D_method_body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer2D_method_body_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_canvas_instance_id<class_PhysicsServer2D_method_body_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer2D_method_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer2D_method_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`body_get_collision_priority<class_PhysicsServer2D_method_body_get_collision_priority>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`body_get_constant_force<class_PhysicsServer2D_method_body_get_constant_force>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`body_get_constant_torque<class_PhysicsServer2D_method_body_get_constant_torque>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`body_get_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`body_get_direct_state<class_PhysicsServer2D_method_body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer2D_method_body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer2D_method_body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer2D_method_body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer2D_method_body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer2D_method_body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer2D_method_body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`body_get_shape_transform<class_PhysicsServer2D_method_body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer2D_method_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer2D_method_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer2D_method_body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_remove_collision_exception<class_PhysicsServer2D_method_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_remove_shape<class_PhysicsServer2D_method_body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_reset_mass_properties<class_PhysicsServer2D_method_body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_axis_velocity<class_PhysicsServer2D_method_body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_layer<class_PhysicsServer2D_method_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_mask<class_PhysicsServer2D_method_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_priority<class_PhysicsServer2D_method_body_set_collision_priority>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_constant_force<class_PhysicsServer2D_method_body_set_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_constant_torque<class_PhysicsServer2D_method_body_set_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_mode<class_PhysicsServer2D_method_body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_param<class_PhysicsServer2D_method_body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape<class_PhysicsServer2D_method_body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape_as_one_way_collision<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape_disabled<class_PhysicsServer2D_method_body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape_transform<class_PhysicsServer2D_method_body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>` parameters, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` result=null **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer2D_method_capsule_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`circle_shape_create<class_PhysicsServer2D_method_circle_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer2D_method_concave_polygon_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer2D_method_convex_polygon_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`damped_spring_joint_get_param<class_PhysicsServer2D_method_damped_spring_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_PhysicsServer2D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer2D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_clear<class_PhysicsServer2D_method_joint_clear>` **(** :ref:`RID<class_RID>` joint **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer2D_method_joint_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_disable_collisions_between_bodies<class_PhysicsServer2D_method_joint_disable_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`joint_get_param<class_PhysicsServer2D_method_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`joint_get_type<class_PhysicsServer2D_method_joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`joint_is_disabled_collisions_between_bodies<class_PhysicsServer2D_method_joint_is_disabled_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b=RID() **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` groove1_a, :ref:`Vector2<class_Vector2>` groove2_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a=RID(), :ref:`RID<class_RID>` body_b=RID() **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b=RID() **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_set_param<class_PhysicsServer2D_method_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`pin_joint_get_param<class_PhysicsServer2D_method_pin_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pin_joint_set_param<class_PhysicsServer2D_method_pin_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`rectangle_shape_create<class_PhysicsServer2D_method_rectangle_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`segment_shape_create<class_PhysicsServer2D_method_segment_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer2D_method_separation_ray_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_active<class_PhysicsServer2D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer2D_method_shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer2D_method_shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer2D_method_space_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`space_get_direct_state<class_PhysicsServer2D_method_space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer2D_method_space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer2D_method_space_is_active>` **(** :ref:`RID<class_RID>` space **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`space_set_active<class_PhysicsServer2D_method_space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`space_set_param<class_PhysicsServer2D_method_space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer2D_method_world_boundary_shape_create>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_attach_canvas_instance_id<class_PhysicsServer2D_method_area_attach_canvas_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_attach_object_instance_id<class_PhysicsServer2D_method_area_attach_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_clear_shapes<class_PhysicsServer2D_method_area_clear_shapes>`\ (\ area\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer2D_method_area_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_canvas_instance_id<class_PhysicsServer2D_method_area_get_canvas_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_collision_layer<class_PhysicsServer2D_method_area_get_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_collision_mask<class_PhysicsServer2D_method_area_get_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer2D_method_area_get_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer2D_method_area_get_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer2D_method_area_get_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer2D_method_area_get_shape_count>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_shape_transform<class_PhysicsServer2D_method_area_get_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer2D_method_area_get_space>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_transform<class_PhysicsServer2D_method_area_get_transform>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_remove_shape<class_PhysicsServer2D_method_area_remove_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_area_monitor_callback<class_PhysicsServer2D_method_area_set_area_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_collision_layer<class_PhysicsServer2D_method_area_set_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_collision_mask<class_PhysicsServer2D_method_area_set_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_monitor_callback<class_PhysicsServer2D_method_area_set_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>`\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_param<class_PhysicsServer2D_method_area_set_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape<class_PhysicsServer2D_method_area_set_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape_disabled<class_PhysicsServer2D_method_area_set_shape_disabled>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape_transform<class_PhysicsServer2D_method_area_set_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>`\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>`\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_collision_exception<class_PhysicsServer2D_method_body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_central_force<class_PhysicsServer2D_method_body_add_constant_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_force<class_PhysicsServer2D_method_body_add_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_torque<class_PhysicsServer2D_method_body_add_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_central_force<class_PhysicsServer2D_method_body_apply_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_central_impulse<class_PhysicsServer2D_method_body_apply_central_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_force<class_PhysicsServer2D_method_body_apply_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_impulse<class_PhysicsServer2D_method_body_apply_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_torque<class_PhysicsServer2D_method_body_apply_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_torque_impulse<class_PhysicsServer2D_method_body_apply_torque_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_attach_canvas_instance_id<class_PhysicsServer2D_method_body_attach_canvas_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_attach_object_instance_id<class_PhysicsServer2D_method_body_attach_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_clear_shapes<class_PhysicsServer2D_method_body_clear_shapes>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer2D_method_body_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_canvas_instance_id<class_PhysicsServer2D_method_body_get_canvas_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer2D_method_body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer2D_method_body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`body_get_collision_priority<class_PhysicsServer2D_method_body_get_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`body_get_constant_force<class_PhysicsServer2D_method_body_get_constant_force>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`body_get_constant_torque<class_PhysicsServer2D_method_body_get_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`body_get_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`body_get_direct_state<class_PhysicsServer2D_method_body_get_direct_state>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer2D_method_body_get_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer2D_method_body_get_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer2D_method_body_get_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer2D_method_body_get_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer2D_method_body_get_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer2D_method_body_get_shape_count>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`body_get_shape_transform<class_PhysicsServer2D_method_body_get_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer2D_method_body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer2D_method_body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer2D_method_body_is_omitting_force_integration>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_remove_collision_exception<class_PhysicsServer2D_method_body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_remove_shape<class_PhysicsServer2D_method_body_remove_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_reset_mass_properties<class_PhysicsServer2D_method_body_reset_mass_properties>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_axis_velocity<class_PhysicsServer2D_method_body_set_axis_velocity>`\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_layer<class_PhysicsServer2D_method_body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_mask<class_PhysicsServer2D_method_body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_priority<class_PhysicsServer2D_method_body_set_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_constant_force<class_PhysicsServer2D_method_body_set_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_constant_torque<class_PhysicsServer2D_method_body_set_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>` = null\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_mode<class_PhysicsServer2D_method_body_set_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_param<class_PhysicsServer2D_method_body_set_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape<class_PhysicsServer2D_method_body_set_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape_as_one_way_collision<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`, margin\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape_disabled<class_PhysicsServer2D_method_body_set_shape_disabled>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape_transform<class_PhysicsServer2D_method_body_set_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>`\ (\ body\: :ref:`RID<class_RID>`, parameters\: :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>`, result\: :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` = null\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer2D_method_capsule_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`circle_shape_create<class_PhysicsServer2D_method_circle_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer2D_method_concave_polygon_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer2D_method_convex_polygon_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`damped_spring_joint_get_param<class_PhysicsServer2D_method_damped_spring_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_PhysicsServer2D_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer2D_method_get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_clear<class_PhysicsServer2D_method_joint_clear>`\ (\ joint\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer2D_method_joint_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_disable_collisions_between_bodies<class_PhysicsServer2D_method_joint_disable_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`joint_get_param<class_PhysicsServer2D_method_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`joint_get_type<class_PhysicsServer2D_method_joint_get_type>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`joint_is_disabled_collisions_between_bodies<class_PhysicsServer2D_method_joint_is_disabled_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>`\ (\ joint\: :ref:`RID<class_RID>`, anchor_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>` = RID()\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>`\ (\ joint\: :ref:`RID<class_RID>`, groove1_a\: :ref:`Vector2<class_Vector2>`, groove2_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>` = RID(), body_b\: :ref:`RID<class_RID>` = RID()\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>`\ (\ joint\: :ref:`RID<class_RID>`, anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>` = RID()\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_set_param<class_PhysicsServer2D_method_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`pin_joint_get_flag<class_PhysicsServer2D_method_pin_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`pin_joint_get_param<class_PhysicsServer2D_method_pin_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pin_joint_set_flag<class_PhysicsServer2D_method_pin_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pin_joint_set_param<class_PhysicsServer2D_method_pin_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`rectangle_shape_create<class_PhysicsServer2D_method_rectangle_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`segment_shape_create<class_PhysicsServer2D_method_segment_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer2D_method_separation_ray_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_active<class_PhysicsServer2D_method_set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer2D_method_shape_get_data>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer2D_method_shape_get_type>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>`\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer2D_method_space_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`space_get_direct_state<class_PhysicsServer2D_method_space_get_direct_state>`\ (\ space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer2D_method_space_get_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer2D_method_space_is_active>`\ (\ space\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`space_set_active<class_PhysicsServer2D_method_space_set_active>`\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`space_set_param<class_PhysicsServer2D_method_space_set_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer2D_method_world_boundary_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -292,7 +296,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SpaceParameter**: +enum **SpaceParameter**: :ref:`🔗<enum_PhysicsServer2D_SpaceParameter>` .. _class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: @@ -374,7 +378,7 @@ Constant to set/get the number of solver iterations for all contacts and constra .. rst-class:: classref-enumeration -enum **ShapeType**: +enum **ShapeType**: :ref:`🔗<enum_PhysicsServer2D_ShapeType>` .. _class_PhysicsServer2D_constant_SHAPE_WORLD_BOUNDARY: @@ -456,7 +460,7 @@ This constant is used internally by the engine. Any attempt to create this kind .. rst-class:: classref-enumeration -enum **AreaParameter**: +enum **AreaParameter**: :ref:`🔗<enum_PhysicsServer2D_AreaParameter>` .. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: @@ -548,7 +552,7 @@ Constant to set/get the priority (order of processing) of an area. The default v .. rst-class:: classref-enumeration -enum **AreaSpaceOverrideMode**: +enum **AreaSpaceOverrideMode**: :ref:`🔗<enum_PhysicsServer2D_AreaSpaceOverrideMode>` .. _class_PhysicsServer2D_constant_AREA_SPACE_OVERRIDE_DISABLED: @@ -598,7 +602,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the .. rst-class:: classref-enumeration -enum **BodyMode**: +enum **BodyMode**: :ref:`🔗<enum_PhysicsServer2D_BodyMode>` .. _class_PhysicsServer2D_constant_BODY_MODE_STATIC: @@ -640,7 +644,7 @@ Constant for linear rigid bodies. In this mode, a body can not rotate, and only .. rst-class:: classref-enumeration -enum **BodyParameter**: +enum **BodyParameter**: :ref:`🔗<enum_PhysicsServer2D_BodyParameter>` .. _class_PhysicsServer2D_constant_BODY_PARAM_BOUNCE: @@ -742,7 +746,7 @@ Represents the size of the :ref:`BodyParameter<enum_PhysicsServer2D_BodyParamete .. rst-class:: classref-enumeration -enum **BodyDampMode**: +enum **BodyDampMode**: :ref:`🔗<enum_PhysicsServer2D_BodyDampMode>` .. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_COMBINE: @@ -768,7 +772,7 @@ The body's damping value replaces any value set in areas or the default value. .. rst-class:: classref-enumeration -enum **BodyState**: +enum **BodyState**: :ref:`🔗<enum_PhysicsServer2D_BodyState>` .. _class_PhysicsServer2D_constant_BODY_STATE_TRANSFORM: @@ -818,7 +822,7 @@ Constant to set/get whether the body can sleep. .. rst-class:: classref-enumeration -enum **JointType**: +enum **JointType**: :ref:`🔗<enum_PhysicsServer2D_JointType>` .. _class_PhysicsServer2D_constant_JOINT_TYPE_PIN: @@ -860,7 +864,7 @@ Represents the size of the :ref:`JointType<enum_PhysicsServer2D_JointType>` enum .. rst-class:: classref-enumeration -enum **JointParam**: +enum **JointParam**: :ref:`🔗<enum_PhysicsServer2D_JointParam>` .. _class_PhysicsServer2D_constant_JOINT_PARAM_BIAS: @@ -900,7 +904,7 @@ Constant to set/get the maximum force that the joint can use to act on the two b .. rst-class:: classref-enumeration -enum **PinJointParam**: +enum **PinJointParam**: :ref:`🔗<enum_PhysicsServer2D_PinJointParam>` .. _class_PhysicsServer2D_constant_PIN_JOINT_SOFTNESS: @@ -910,6 +914,56 @@ enum **PinJointParam**: Constant to set/get a how much the bond of the pin joint can flex. The default value of this parameter is ``0.0``. +.. _class_PhysicsServer2D_constant_PIN_JOINT_LIMIT_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` **PIN_JOINT_LIMIT_UPPER** = ``1`` + +The maximum rotation around the pin. + +.. _class_PhysicsServer2D_constant_PIN_JOINT_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` **PIN_JOINT_LIMIT_LOWER** = ``2`` + +The minimum rotation around the pin. + +.. _class_PhysicsServer2D_constant_PIN_JOINT_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` **PIN_JOINT_MOTOR_TARGET_VELOCITY** = ``3`` + +Target speed for the motor. In radians per second. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_PhysicsServer2D_PinJointFlag: + +.. rst-class:: classref-enumeration + +enum **PinJointFlag**: :ref:`🔗<enum_PhysicsServer2D_PinJointFlag>` + +.. _class_PhysicsServer2D_constant_PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>` **PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED** = ``0`` + +If ``true``, the pin has a maximum and a minimum rotation. + +.. _class_PhysicsServer2D_constant_PIN_JOINT_FLAG_MOTOR_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>` **PIN_JOINT_FLAG_MOTOR_ENABLED** = ``1`` + +If ``true``, a motor turns the pin. + .. rst-class:: classref-item-separator ---- @@ -918,7 +972,7 @@ Constant to set/get a how much the bond of the pin joint can flex. The default v .. rst-class:: classref-enumeration -enum **DampedSpringParam**: +enum **DampedSpringParam**: :ref:`🔗<enum_PhysicsServer2D_DampedSpringParam>` .. _class_PhysicsServer2D_constant_DAMPED_SPRING_REST_LENGTH: @@ -952,7 +1006,7 @@ Sets the damping ratio of the spring joint. A value of 0 indicates an undamped s .. rst-class:: classref-enumeration -enum **CCDMode**: +enum **CCDMode**: :ref:`🔗<enum_PhysicsServer2D_CCDMode>` .. _class_PhysicsServer2D_constant_CCD_MODE_DISABLED: @@ -986,7 +1040,7 @@ Enables continuous collision detection by shapecasting. It is the slowest CCD me .. rst-class:: classref-enumeration -enum **AreaBodyStatus**: +enum **AreaBodyStatus**: :ref:`🔗<enum_PhysicsServer2D_AreaBodyStatus>` .. _class_PhysicsServer2D_constant_AREA_BODY_ADDED: @@ -1012,7 +1066,7 @@ The value of the first parameter and area callback function receives, when an ob .. rst-class:: classref-enumeration -enum **ProcessInfo**: +enum **ProcessInfo**: :ref:`🔗<enum_PhysicsServer2D_ProcessInfo>` .. _class_PhysicsServer2D_constant_INFO_ACTIVE_OBJECTS: @@ -1051,7 +1105,7 @@ Method Descriptions .. rst-class:: classref-method -void **area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** +|void| **area_add_shape**\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsServer2D_method_area_add_shape>` Adds a shape to the area, with the given local transform. The shape (together with its ``transform`` and ``disabled`` properties) is added to an array of shapes, and the shapes of an area are usually referenced by their index in this array. @@ -1063,7 +1117,7 @@ Adds a shape to the area, with the given local transform. The shape (together wi .. rst-class:: classref-method -void **area_attach_canvas_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** +|void| **area_attach_canvas_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_attach_canvas_instance_id>` Attaches the ``ObjectID`` of a canvas to the area. Use :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` to get the ``ObjectID`` of a :ref:`CanvasLayer<class_CanvasLayer>`. @@ -1075,7 +1129,7 @@ Attaches the ``ObjectID`` of a canvas to the area. Use :ref:`Object.get_instance .. rst-class:: classref-method -void **area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** +|void| **area_attach_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_attach_object_instance_id>` Attaches the ``ObjectID`` of an :ref:`Object<class_Object>` to the area. Use :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` to get the ``ObjectID`` of a :ref:`CollisionObject2D<class_CollisionObject2D>`. @@ -1087,7 +1141,7 @@ Attaches the ``ObjectID`` of an :ref:`Object<class_Object>` to the area. Use :re .. rst-class:: classref-method -void **area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** +|void| **area_clear_shapes**\ (\ area\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_clear_shapes>` Removes all shapes from the area. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. @@ -1099,9 +1153,11 @@ Removes all shapes from the area. This does not delete the shapes themselves, so .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_create** **(** **)** +:ref:`RID<class_RID>` **area_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_area_create>` + +Creates a 2D area object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and ``monitorable`` set to ``false``. -Creates a 2D area object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>` to add shapes to it, use :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>` to set its transform, and use :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>` to add the area to a space. +Use :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>` to add shapes to it, use :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>` to set its transform, and use :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>`. .. rst-class:: classref-item-separator @@ -1111,7 +1167,7 @@ Creates a 2D area object in the physics server, and returns the :ref:`RID<class_ .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_canvas_instance_id** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_canvas_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_canvas_instance_id>` Returns the ``ObjectID`` of the canvas attached to the area. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to retrieve a :ref:`CanvasLayer<class_CanvasLayer>` from a nonzero ``ObjectID``. @@ -1123,7 +1179,7 @@ Returns the ``ObjectID`` of the canvas attached to the area. Use :ref:`@GlobalSc .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_collision_layer** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_collision_layer**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_collision_layer>` Returns the physics layer or layers the area belongs to, as a bitmask. @@ -1135,7 +1191,7 @@ Returns the physics layer or layers the area belongs to, as a bitmask. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_collision_mask** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_collision_mask**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_collision_mask>` Returns the physics layer or layers the area can contact with, as a bitmask. @@ -1147,7 +1203,7 @@ Returns the physics layer or layers the area can contact with, as a bitmask. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_object_instance_id** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_object_instance_id>` Returns the ``ObjectID`` attached to the area. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to retrieve an :ref:`Object<class_Object>` from a nonzero ``ObjectID``. @@ -1159,7 +1215,7 @@ Returns the ``ObjectID`` attached to the area. Use :ref:`@GlobalScope.instance_f .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **area_get_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |const| +:ref:`Variant<class_Variant>` **area_get_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_param>` Returns the value of the given area parameter. See :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` for the list of available parameters. @@ -1171,7 +1227,7 @@ Returns the value of the given area parameter. See :ref:`AreaParameter<enum_Phys .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_get_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`RID<class_RID>` **area_get_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_shape>` Returns the :ref:`RID<class_RID>` of the shape with the given index in the area's array of shapes. @@ -1183,7 +1239,7 @@ Returns the :ref:`RID<class_RID>` of the shape with the given index in the area' .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_shape_count** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_shape_count**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_shape_count>` Returns the number of shapes added to the area. @@ -1195,7 +1251,7 @@ Returns the number of shapes added to the area. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **area_get_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`Transform2D<class_Transform2D>` **area_get_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_shape_transform>` Returns the local transform matrix of the shape with the given index in the area's array of shapes. @@ -1207,9 +1263,9 @@ Returns the local transform matrix of the shape with the given index in the area .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_get_space** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`RID<class_RID>` **area_get_space**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_space>` -Returns the :ref:`RID<class_RID>` of the space assigned to the area. Returns ``RID()`` if no space is assigned. +Returns the :ref:`RID<class_RID>` of the space assigned to the area. Returns an empty :ref:`RID<class_RID>` if no space is assigned. .. rst-class:: classref-item-separator @@ -1219,7 +1275,7 @@ Returns the :ref:`RID<class_RID>` of the space assigned to the area. Returns ``R .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **area_get_transform** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`Transform2D<class_Transform2D>` **area_get_transform**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_area_get_transform>` Returns the transform matrix of the area. @@ -1231,7 +1287,7 @@ Returns the transform matrix of the area. .. rst-class:: classref-method -void **area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** +|void| **area_remove_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_remove_shape>` Removes the shape with the given index from the area's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the area's shapes which used to have indices higher than ``shape_idx`` will have their index decreased by one. @@ -1243,7 +1299,7 @@ Removes the shape with the given index from the area's array of shapes. The shap .. rst-class:: classref-method -void **area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** +|void| **area_set_area_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_area_monitor_callback>` Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: @@ -1267,7 +1323,7 @@ By counting (or keeping track of) the shapes that enter and exit, it can be dete .. rst-class:: classref-method -void **area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** +|void| **area_set_collision_layer**\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_collision_layer>` Assigns the area to one or many physics layers, via a bitmask. @@ -1279,7 +1335,7 @@ Assigns the area to one or many physics layers, via a bitmask. .. rst-class:: classref-method -void **area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** +|void| **area_set_collision_mask**\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_collision_mask>` Sets which physics layers the area will monitor, via a bitmask. @@ -1291,7 +1347,7 @@ Sets which physics layers the area will monitor, via a bitmask. .. rst-class:: classref-method -void **area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** +|void| **area_set_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_monitor_callback>` Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: @@ -1315,7 +1371,7 @@ By counting (or keeping track of) the shapes that enter and exit, it can be dete .. rst-class:: classref-method -void **area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** +|void| **area_set_monitorable**\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_monitorable>` Sets whether the area is monitorable or not. If ``monitorable`` is ``true``, the area monitoring callback of other areas will be called when this area enters or exits them. @@ -1327,7 +1383,7 @@ Sets whether the area is monitorable or not. If ``monitorable`` is ``true``, the .. rst-class:: classref-method -void **area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** +|void| **area_set_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_param>` Sets the value of the given area parameter. See :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` for the list of available parameters. @@ -1339,7 +1395,7 @@ Sets the value of the given area parameter. See :ref:`AreaParameter<enum_Physics .. rst-class:: classref-method -void **area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** +|void| **area_set_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_shape>` Replaces the area's shape at the given index by another shape, while not affecting the ``transform`` and ``disabled`` properties at the same index. @@ -1351,7 +1407,7 @@ Replaces the area's shape at the given index by another shape, while not affecti .. rst-class:: classref-method -void **area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** +|void| **area_set_shape_disabled**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_shape_disabled>` Sets the disabled property of the area's shape with the given index. If ``disabled`` is ``true``, then the shape will not detect any other shapes entering or exiting it. @@ -1363,7 +1419,7 @@ Sets the disabled property of the area's shape with the given index. If ``disabl .. rst-class:: classref-method -void **area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **area_set_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_shape_transform>` Sets the local transform matrix of the area's shape with the given index. @@ -1375,7 +1431,7 @@ Sets the local transform matrix of the area's shape with the given index. .. rst-class:: classref-method -void **area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** +|void| **area_set_space**\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_space>` Adds the area to the given space, after removing the area from the previously assigned space (if any). @@ -1389,7 +1445,7 @@ Adds the area to the given space, after removing the area from the previously as .. rst-class:: classref-method -void **area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **area_set_transform**\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_PhysicsServer2D_method_area_set_transform>` Sets the transform matrix of the area. @@ -1401,7 +1457,7 @@ Sets the transform matrix of the area. .. rst-class:: classref-method -void **body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** +|void| **body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_add_collision_exception>` Adds ``excepted_body`` to the body's list of collision exceptions, so that collisions with it are ignored. @@ -1413,7 +1469,7 @@ Adds ``excepted_body`` to the body's list of collision exceptions, so that colli .. rst-class:: classref-method -void **body_add_constant_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** +|void| **body_add_constant_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_add_constant_central_force>` Adds a constant directional force to the body. The force does not affect rotation. The force remains applied over time until cleared with ``PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))``. @@ -1427,7 +1483,7 @@ This is equivalent to using :ref:`body_add_constant_force<class_PhysicsServer2D_ .. rst-class:: classref-method -void **body_add_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **body_add_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsServer2D_method_body_add_constant_force>` Adds a constant positioned force to the body. The force can affect rotation if ``position`` is different from the body's center of mass. The force remains applied over time until cleared with ``PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))``. @@ -1441,7 +1497,7 @@ Adds a constant positioned force to the body. The force can affect rotation if ` .. rst-class:: classref-method -void **body_add_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** +|void| **body_add_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_add_constant_torque>` Adds a constant rotational force to the body. The force does not affect position. The force remains applied over time until cleared with ``PhysicsServer2D.body_set_constant_torque(body, 0)``. @@ -1453,7 +1509,7 @@ Adds a constant rotational force to the body. The force does not affect position .. rst-class:: classref-method -void **body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** +|void| **body_add_shape**\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsServer2D_method_body_add_shape>` Adds a shape to the area, with the given local transform. The shape (together with its ``transform`` and ``disabled`` properties) is added to an array of shapes, and the shapes of a body are usually referenced by their index in this array. @@ -1465,7 +1521,7 @@ Adds a shape to the area, with the given local transform. The shape (together wi .. rst-class:: classref-method -void **body_apply_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** +|void| **body_apply_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_central_force>` Applies a directional force to the body, at the body's center of mass. The force does not affect rotation. A force is time dependent and meant to be applied every physics update. @@ -1479,7 +1535,7 @@ This is equivalent to using :ref:`body_apply_force<class_PhysicsServer2D_method_ .. rst-class:: classref-method -void **body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** +|void| **body_apply_central_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_central_impulse>` Applies a directional impulse to the body, at the body's center of mass. The impulse does not affect rotation. @@ -1495,7 +1551,7 @@ This is equivalent to using :ref:`body_apply_impulse<class_PhysicsServer2D_metho .. rst-class:: classref-method -void **body_apply_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **body_apply_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_force>` Applies a positioned force to the body. The force can affect rotation if ``position`` is different from the body's center of mass. A force is time dependent and meant to be applied every physics update. @@ -1509,7 +1565,7 @@ Applies a positioned force to the body. The force can affect rotation if ``posit .. rst-class:: classref-method -void **body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **body_apply_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_impulse>` Applies a positioned impulse to the body. The impulse can affect rotation if ``position`` is different from the body's center of mass. @@ -1525,7 +1581,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **body_apply_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** +|void| **body_apply_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_torque>` Applies a rotational force to the body. The force does not affect position. A force is time dependent and meant to be applied every physics update. @@ -1537,7 +1593,7 @@ Applies a rotational force to the body. The force does not affect position. A fo .. rst-class:: classref-method -void **body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** +|void| **body_apply_torque_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_apply_torque_impulse>` Applies a rotational impulse to the body. The impulse does not affect position. @@ -1551,7 +1607,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **body_attach_canvas_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** +|void| **body_attach_canvas_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_attach_canvas_instance_id>` Attaches the ``ObjectID`` of a canvas to the body. Use :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` to get the ``ObjectID`` of a :ref:`CanvasLayer<class_CanvasLayer>`. @@ -1563,7 +1619,7 @@ Attaches the ``ObjectID`` of a canvas to the body. Use :ref:`Object.get_instance .. rst-class:: classref-method -void **body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** +|void| **body_attach_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_attach_object_instance_id>` Attaches the ``ObjectID`` of an :ref:`Object<class_Object>` to the body. Use :ref:`Object.get_instance_id<class_Object_method_get_instance_id>` to get the ``ObjectID`` of a :ref:`CollisionObject2D<class_CollisionObject2D>`. @@ -1575,7 +1631,7 @@ Attaches the ``ObjectID`` of an :ref:`Object<class_Object>` to the body. Use :re .. rst-class:: classref-method -void **body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** +|void| **body_clear_shapes**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_clear_shapes>` Removes all shapes from the body. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. @@ -1587,9 +1643,11 @@ Removes all shapes from the body. This does not delete the shapes themselves, so .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_create** **(** **)** +:ref:`RID<class_RID>` **body_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_body_create>` + +Creates a 2D body object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and body mode set to :ref:`BODY_MODE_RIGID<class_PhysicsServer2D_constant_BODY_MODE_RIGID>`. -Creates a 2D body object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>` to add shapes to it, use :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>` to set its transform, and use :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>` to add the body to a space. +Use :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>` to add shapes to it, use :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>` to set its transform, and use :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>` to add the body to a space. .. rst-class:: classref-item-separator @@ -1599,7 +1657,7 @@ Creates a 2D body object in the physics server, and returns the :ref:`RID<class_ .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_canvas_instance_id** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_canvas_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_canvas_instance_id>` Returns the ``ObjectID`` of the canvas attached to the body. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to retrieve a :ref:`CanvasLayer<class_CanvasLayer>` from a nonzero ``ObjectID``. @@ -1611,7 +1669,7 @@ Returns the ``ObjectID`` of the canvas attached to the body. Use :ref:`@GlobalSc .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_collision_layer>` Returns the physics layer or layers the body belongs to, as a bitmask. @@ -1623,7 +1681,7 @@ Returns the physics layer or layers the body belongs to, as a bitmask. .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_collision_mask>` Returns the physics layer or layers the body can collide with, as a bitmask. @@ -1635,7 +1693,7 @@ Returns the physics layer or layers the body can collide with, as a bitmask. .. rst-class:: classref-method -:ref:`float<class_float>` **body_get_collision_priority** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`float<class_float>` **body_get_collision_priority**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_collision_priority>` Returns the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>`. The higher the priority is, the lower the penetration into the body will be. @@ -1647,7 +1705,7 @@ Returns the body's collision priority. This is used in the depenetration phase o .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **body_get_constant_force** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`Vector2<class_Vector2>` **body_get_constant_force**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_constant_force>` Returns the body's total constant positional force applied during each physics update. @@ -1661,7 +1719,7 @@ See :ref:`body_add_constant_force<class_PhysicsServer2D_method_body_add_constant .. rst-class:: classref-method -:ref:`float<class_float>` **body_get_constant_torque** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`float<class_float>` **body_get_constant_torque**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_constant_torque>` Returns the body's total constant rotational force applied during each physics update. @@ -1675,7 +1733,7 @@ See :ref:`body_add_constant_torque<class_PhysicsServer2D_method_body_add_constan .. rst-class:: classref-method -:ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` **body_get_continuous_collision_detection_mode** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` **body_get_continuous_collision_detection_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>` Returns the body's continuous collision detection mode (see :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>`). @@ -1687,7 +1745,7 @@ Returns the body's continuous collision detection mode (see :ref:`CCDMode<enum_P .. rst-class:: classref-method -:ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **body_get_direct_state** **(** :ref:`RID<class_RID>` body **)** +:ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **body_get_direct_state**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_get_direct_state>` Returns the :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` of the body. Returns ``null`` if the body is destroyed or not assigned to a space. @@ -1699,7 +1757,7 @@ Returns the :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` of t .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_max_contacts_reported** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_max_contacts_reported>` Returns the maximum number of contacts that the body can report. See :ref:`body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>`. @@ -1711,7 +1769,7 @@ Returns the maximum number of contacts that the body can report. See :ref:`body_ .. rst-class:: classref-method -:ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` **body_get_mode** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` **body_get_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_mode>` Returns the body's mode (see :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`). @@ -1723,7 +1781,7 @@ Returns the body's mode (see :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`). .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_object_instance_id** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_object_instance_id>` Returns the ``ObjectID`` attached to the body. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to retrieve an :ref:`Object<class_Object>` from a nonzero ``ObjectID``. @@ -1735,7 +1793,7 @@ Returns the ``ObjectID`` attached to the body. Use :ref:`@GlobalScope.instance_f .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **body_get_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |const| +:ref:`Variant<class_Variant>` **body_get_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_param>` Returns the value of the given body parameter. See :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` for the list of available parameters. @@ -1747,7 +1805,7 @@ Returns the value of the given body parameter. See :ref:`BodyParameter<enum_Phys .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_get_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`RID<class_RID>` **body_get_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_shape>` Returns the :ref:`RID<class_RID>` of the shape with the given index in the body's array of shapes. @@ -1759,7 +1817,7 @@ Returns the :ref:`RID<class_RID>` of the shape with the given index in the body' .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_shape_count** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_shape_count**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_shape_count>` Returns the number of shapes added to the body. @@ -1771,7 +1829,7 @@ Returns the number of shapes added to the body. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **body_get_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`Transform2D<class_Transform2D>` **body_get_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_shape_transform>` Returns the local transform matrix of the shape with the given index in the area's array of shapes. @@ -1783,9 +1841,9 @@ Returns the local transform matrix of the shape with the given index in the area .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_get_space** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`RID<class_RID>` **body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_space>` -Returns the :ref:`RID<class_RID>` of the space assigned to the body. Returns ``RID()`` if no space is assigned. +Returns the :ref:`RID<class_RID>` of the space assigned to the body. Returns an empty :ref:`RID<class_RID>` if no space is assigned. .. rst-class:: classref-item-separator @@ -1795,7 +1853,7 @@ Returns the :ref:`RID<class_RID>` of the space assigned to the body. Returns ``R .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |const| +:ref:`Variant<class_Variant>` **body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_get_state>` Returns the value of the given state of the body. See :ref:`BodyState<enum_PhysicsServer2D_BodyState>` for the list of available states. @@ -1807,9 +1865,9 @@ Returns the value of the given state of the body. See :ref:`BodyState<enum_Physi .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_is_omitting_force_integration** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_body_is_omitting_force_integration>` -Returns ``true`` if the body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>`). +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>`. .. rst-class:: classref-item-separator @@ -1819,7 +1877,7 @@ Returns ``true`` if the body uses a callback function to calculate its own physi .. rst-class:: classref-method -void **body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** +|void| **body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_remove_collision_exception>` Removes ``excepted_body`` from the body's list of collision exceptions, so that collisions with it are no longer ignored. @@ -1831,7 +1889,7 @@ Removes ``excepted_body`` from the body's list of collision exceptions, so that .. rst-class:: classref-method -void **body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** +|void| **body_remove_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_remove_shape>` Removes the shape with the given index from the body's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the body's shapes which used to have indices higher than ``shape_idx`` will have their index decreased by one. @@ -1843,7 +1901,7 @@ Removes the shape with the given index from the body's array of shapes. The shap .. rst-class:: classref-method -void **body_reset_mass_properties** **(** :ref:`RID<class_RID>` body **)** +|void| **body_reset_mass_properties**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_reset_mass_properties>` Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using :ref:`body_set_param<class_PhysicsServer2D_method_body_set_param>`. @@ -1855,7 +1913,7 @@ Restores the default inertia and center of mass of the body based on its shapes. .. rst-class:: classref-method -void **body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** +|void| **body_set_axis_velocity**\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_axis_velocity>` Modifies the body's linear velocity so that its projection to the axis ``axis_velocity.normalized()`` is exactly ``axis_velocity.length()``. This is useful for jumping behavior. @@ -1867,7 +1925,7 @@ Modifies the body's linear velocity so that its projection to the axis ``axis_ve .. rst-class:: classref-method -void **body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** +|void| **body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_collision_layer>` Sets the physics layer or layers the body belongs to, via a bitmask. @@ -1879,7 +1937,7 @@ Sets the physics layer or layers the body belongs to, via a bitmask. .. rst-class:: classref-method -void **body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** +|void| **body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_collision_mask>` Sets the physics layer or layers the body can collide with, via a bitmask. @@ -1891,7 +1949,7 @@ Sets the physics layer or layers the body can collide with, via a bitmask. .. rst-class:: classref-method -void **body_set_collision_priority** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** +|void| **body_set_collision_priority**\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_collision_priority>` Sets the body's collision priority. This is used in the depenetration phase of :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>`. The higher the priority is, the lower the penetration into the body will be. @@ -1903,7 +1961,7 @@ Sets the body's collision priority. This is used in the depenetration phase of : .. rst-class:: classref-method -void **body_set_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** +|void| **body_set_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_constant_force>` Sets the body's total constant positional force applied during each physics update. @@ -1917,7 +1975,7 @@ See :ref:`body_add_constant_force<class_PhysicsServer2D_method_body_add_constant .. rst-class:: classref-method -void **body_set_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** +|void| **body_set_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_constant_torque>` Sets the body's total constant rotational force applied during each physics update. @@ -1931,7 +1989,7 @@ See :ref:`body_add_constant_torque<class_PhysicsServer2D_method_body_add_constan .. rst-class:: classref-method -void **body_set_continuous_collision_detection_mode** **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** +|void| **body_set_continuous_collision_detection_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>` Sets the continuous collision detection mode using one of the :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` constants. @@ -1945,17 +2003,19 @@ Continuous collision detection tries to predict where a moving body would collid .. rst-class:: classref-method -void **body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** +|void| **body_set_force_integration_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_force_integration_callback>` -Sets the function used to calculate physics for the body, if that body allows it (see :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>`). +Sets the body's custom force integration callback function to ``callable``. Use an empty :ref:`Callable<class_Callable>` (``Callable()``) to clear the custom callback. -The force integration function takes the following two parameters: +The function ``callable`` will be called every physics tick, before the standard force integration (see :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>`). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. -1. a :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` ``state``: used to retrieve and modify the body's state, +If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: -2. a :ref:`Variant<class_Variant>` ``userdata``: optional user data. +1. ``state``: a :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` used to retrieve and modify the body's state, -\ **Note:** This callback is currently not called in Godot Physics. +2. ``userdata``: a :ref:`Variant<class_Variant>`; its value will be the ``userdata`` passed into this method. + +If ``userdata`` is ``null``, then ``callable`` must take only the ``state`` parameter. .. rst-class:: classref-item-separator @@ -1965,7 +2025,7 @@ The force integration function takes the following two parameters: .. rst-class:: classref-method -void **body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** +|void| **body_set_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_max_contacts_reported>` Sets the maximum number of contacts that the body can report. If ``amount`` is greater than zero, then the body will keep track of at most this many contacts with other bodies. @@ -1977,7 +2037,7 @@ Sets the maximum number of contacts that the body can report. If ``amount`` is g .. rst-class:: classref-method -void **body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** +|void| **body_set_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_mode>` Sets the body's mode. See :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` for the list of available modes. @@ -1989,9 +2049,11 @@ Sets the body's mode. See :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` for the .. rst-class:: classref-method -void **body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** +|void| **body_set_omit_force_integration**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_omit_force_integration>` + +Sets whether the body omits the standard force integration. If ``enable`` is ``true``, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>` can be used to manually update the linear and angular velocity instead. -Sets whether the body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>`). +This method is called when the property :ref:`RigidBody2D.custom_integrator<class_RigidBody2D_property_custom_integrator>` is set. .. rst-class:: classref-item-separator @@ -2001,7 +2063,7 @@ Sets whether the body uses a callback function to calculate its own physics (see .. rst-class:: classref-method -void **body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** +|void| **body_set_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_param>` Sets the value of the given body parameter. See :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` for the list of available parameters. @@ -2013,7 +2075,7 @@ Sets the value of the given body parameter. See :ref:`BodyParameter<enum_Physics .. rst-class:: classref-method -void **body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** +|void| **body_set_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_shape>` Replaces the body's shape at the given index by another shape, while not affecting the ``transform``, ``disabled``, and one-way collision properties at the same index. @@ -2025,7 +2087,7 @@ Replaces the body's shape at the given index by another shape, while not affecti .. rst-class:: classref-method -void **body_set_shape_as_one_way_collision** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** +|void| **body_set_shape_as_one_way_collision**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>` Sets the one-way collision properties of the body's shape with the given index. If ``enable`` is ``true``, the one-way collision direction given by the shape's local upward axis ``body_get_shape_transform(body, shape_idx).y`` will be used to ignore collisions with the shape in the opposite direction, and to ensure depenetration of kinematic bodies happens in this direction. @@ -2037,7 +2099,7 @@ Sets the one-way collision properties of the body's shape with the given index. .. rst-class:: classref-method -void **body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** +|void| **body_set_shape_disabled**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_shape_disabled>` Sets the disabled property of the body's shape with the given index. If ``disabled`` is ``true``, then the shape will be ignored in all collision detection. @@ -2049,7 +2111,7 @@ Sets the disabled property of the body's shape with the given index. If ``disabl .. rst-class:: classref-method -void **body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **body_set_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_shape_transform>` Sets the local transform matrix of the body's shape with the given index. @@ -2061,7 +2123,7 @@ Sets the local transform matrix of the body's shape with the given index. .. rst-class:: classref-method -void **body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** +|void| **body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_space>` Adds the body to the given space, after removing the body from the previously assigned space (if any). If the body's mode is set to :ref:`BODY_MODE_RIGID<class_PhysicsServer2D_constant_BODY_MODE_RIGID>`, then adding the body to a space will have the following additional effects: @@ -2079,7 +2141,7 @@ Adds the body to the given space, after removing the body from the previously as .. rst-class:: classref-method -void **body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** +|void| **body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer2D_method_body_set_state>` Sets the value of a body's state. See :ref:`BodyState<enum_PhysicsServer2D_BodyState>` for the list of available states. @@ -2093,7 +2155,7 @@ Sets the value of a body's state. See :ref:`BodyState<enum_PhysicsServer2D_BodyS .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion** **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>` parameters, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` result=null **)** +:ref:`bool<class_bool>` **body_test_motion**\ (\ body\: :ref:`RID<class_RID>`, parameters\: :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>`, result\: :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` = null\ ) :ref:`🔗<class_PhysicsServer2D_method_body_test_motion>` Returns ``true`` if a collision would result from moving the body along a motion vector from a given point in space. See :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>` for the available motion parameters. Optionally a :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` object can be passed, which will be used to store the information about the resulting collision. @@ -2105,7 +2167,7 @@ Returns ``true`` if a collision would result from moving the body along a motion .. rst-class:: classref-method -:ref:`RID<class_RID>` **capsule_shape_create** **(** **)** +:ref:`RID<class_RID>` **capsule_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_capsule_shape_create>` Creates a 2D capsule shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the capsule's height and radius. @@ -2117,7 +2179,7 @@ Creates a 2D capsule shape in the physics server, and returns the :ref:`RID<clas .. rst-class:: classref-method -:ref:`RID<class_RID>` **circle_shape_create** **(** **)** +:ref:`RID<class_RID>` **circle_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_circle_shape_create>` Creates a 2D circle shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the circle's radius. @@ -2129,7 +2191,7 @@ Creates a 2D circle shape in the physics server, and returns the :ref:`RID<class .. rst-class:: classref-method -:ref:`RID<class_RID>` **concave_polygon_shape_create** **(** **)** +:ref:`RID<class_RID>` **concave_polygon_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_concave_polygon_shape_create>` Creates a 2D concave polygon shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the concave polygon's segments. @@ -2141,7 +2203,7 @@ Creates a 2D concave polygon shape in the physics server, and returns the :ref:` .. rst-class:: classref-method -:ref:`RID<class_RID>` **convex_polygon_shape_create** **(** **)** +:ref:`RID<class_RID>` **convex_polygon_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_convex_polygon_shape_create>` Creates a 2D convex polygon shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the convex polygon's points. @@ -2153,7 +2215,7 @@ Creates a 2D convex polygon shape in the physics server, and returns the :ref:`R .. rst-class:: classref-method -:ref:`float<class_float>` **damped_spring_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |const| +:ref:`float<class_float>` **damped_spring_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_damped_spring_joint_get_param>` Returns the value of the given damped spring joint parameter. See :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` for the list of available parameters. @@ -2165,7 +2227,7 @@ Returns the value of the given damped spring joint parameter. See :ref:`DampedSp .. rst-class:: classref-method -void **damped_spring_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** +|void| **damped_spring_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_damped_spring_joint_set_param>` Sets the value of the given damped spring joint parameter. See :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` for the list of available parameters. @@ -2177,7 +2239,7 @@ Sets the value of the given damped spring joint parameter. See :ref:`DampedSprin .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_free_rid>` Destroys any of the objects created by PhysicsServer2D. If the :ref:`RID<class_RID>` passed is not one of the objects that can be created by PhysicsServer2D, an error will be printed to the console. @@ -2189,7 +2251,7 @@ Destroys any of the objects created by PhysicsServer2D. If the :ref:`RID<class_R .. rst-class:: classref-method -:ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** +:ref:`int<class_int>` **get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>`\ ) :ref:`🔗<class_PhysicsServer2D_method_get_process_info>` Returns information about the current state of the 2D physics engine. See :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` for the list of available states. @@ -2201,7 +2263,7 @@ Returns information about the current state of the 2D physics engine. See :ref:` .. rst-class:: classref-method -void **joint_clear** **(** :ref:`RID<class_RID>` joint **)** +|void| **joint_clear**\ (\ joint\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_clear>` Destroys the joint with the given :ref:`RID<class_RID>`, creates a new uninitialized joint, and makes the :ref:`RID<class_RID>` refer to this new joint. @@ -2213,7 +2275,7 @@ Destroys the joint with the given :ref:`RID<class_RID>`, creates a new uninitial .. rst-class:: classref-method -:ref:`RID<class_RID>` **joint_create** **(** **)** +:ref:`RID<class_RID>` **joint_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_create>` Creates a 2D joint in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. To set the joint type, use :ref:`joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>`, :ref:`joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>` or :ref:`joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>`. Use :ref:`joint_set_param<class_PhysicsServer2D_method_joint_set_param>` to set generic joint parameters. @@ -2225,7 +2287,7 @@ Creates a 2D joint in the physics server, and returns the :ref:`RID<class_RID>` .. rst-class:: classref-method -void **joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** +|void| **joint_disable_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_disable_collisions_between_bodies>` Sets whether the bodies attached to the :ref:`Joint2D<class_Joint2D>` will collide with each other. @@ -2237,7 +2299,7 @@ Sets whether the bodies attached to the :ref:`Joint2D<class_Joint2D>` will colli .. rst-class:: classref-method -:ref:`float<class_float>` **joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |const| +:ref:`float<class_float>` **joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_joint_get_param>` Returns the value of the given joint parameter. See :ref:`JointParam<enum_PhysicsServer2D_JointParam>` for the list of available parameters. @@ -2249,7 +2311,7 @@ Returns the value of the given joint parameter. See :ref:`JointParam<enum_Physic .. rst-class:: classref-method -:ref:`JointType<enum_PhysicsServer2D_JointType>` **joint_get_type** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`JointType<enum_PhysicsServer2D_JointType>` **joint_get_type**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_joint_get_type>` Returns the joint's type (see :ref:`JointType<enum_PhysicsServer2D_JointType>`). @@ -2261,7 +2323,7 @@ Returns the joint's type (see :ref:`JointType<enum_PhysicsServer2D_JointType>`). .. rst-class:: classref-method -:ref:`bool<class_bool>` **joint_is_disabled_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`bool<class_bool>` **joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_joint_is_disabled_collisions_between_bodies>` Returns whether the bodies attached to the :ref:`Joint2D<class_Joint2D>` will collide with each other. @@ -2273,7 +2335,7 @@ Returns whether the bodies attached to the :ref:`Joint2D<class_Joint2D>` will co .. rst-class:: classref-method -void **joint_make_damped_spring** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b=RID() **)** +|void| **joint_make_damped_spring**\ (\ joint\: :ref:`RID<class_RID>`, anchor_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_make_damped_spring>` Makes the joint a damped spring joint, attached at the point ``anchor_a`` (given in global coordinates) on the body ``body_a`` and at the point ``anchor_b`` (given in global coordinates) on the body ``body_b``. To set the parameters which are specific to the damped spring, see :ref:`damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>`. @@ -2285,7 +2347,7 @@ Makes the joint a damped spring joint, attached at the point ``anchor_a`` (given .. rst-class:: classref-method -void **joint_make_groove** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` groove1_a, :ref:`Vector2<class_Vector2>` groove2_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a=RID(), :ref:`RID<class_RID>` body_b=RID() **)** +|void| **joint_make_groove**\ (\ joint\: :ref:`RID<class_RID>`, groove1_a\: :ref:`Vector2<class_Vector2>`, groove2_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>` = RID(), body_b\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_make_groove>` Makes the joint a groove joint. @@ -2297,9 +2359,9 @@ Makes the joint a groove joint. .. rst-class:: classref-method -void **joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b=RID() **)** +|void| **joint_make_pin**\ (\ joint\: :ref:`RID<class_RID>`, anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_make_pin>` -Makes the joint a pin joint. If ``body_b`` is ``RID()``, then ``body_a`` is pinned to the point ``anchor`` (given in global coordinates); otherwise, ``body_a`` is pinned to ``body_b`` at the point ``anchor`` (given in global coordinates). To set the parameters which are specific to the pin joint, see :ref:`pin_joint_set_param<class_PhysicsServer2D_method_pin_joint_set_param>`. +Makes the joint a pin joint. If ``body_b`` is an empty :ref:`RID<class_RID>`, then ``body_a`` is pinned to the point ``anchor`` (given in global coordinates); otherwise, ``body_a`` is pinned to ``body_b`` at the point ``anchor`` (given in global coordinates). To set the parameters which are specific to the pin joint, see :ref:`pin_joint_set_param<class_PhysicsServer2D_method_pin_joint_set_param>`. .. rst-class:: classref-item-separator @@ -2309,7 +2371,7 @@ Makes the joint a pin joint. If ``body_b`` is ``RID()``, then ``body_a`` is pinn .. rst-class:: classref-method -void **joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** +|void| **joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_joint_set_param>` Sets the value of the given joint parameter. See :ref:`JointParam<enum_PhysicsServer2D_JointParam>` for the list of available parameters. @@ -2317,11 +2379,23 @@ Sets the value of the given joint parameter. See :ref:`JointParam<enum_PhysicsSe ---- +.. _class_PhysicsServer2D_method_pin_joint_get_flag: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **pin_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_pin_joint_get_flag>` + +Gets a pin joint flag (see :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>` constants). + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_pin_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **pin_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param **)** |const| +:ref:`float<class_float>` **pin_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_pin_joint_get_param>` Returns the value of a pin joint parameter. See :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` for a list of available parameters. @@ -2329,11 +2403,23 @@ Returns the value of a pin joint parameter. See :ref:`PinJointParam<enum_Physics ---- +.. _class_PhysicsServer2D_method_pin_joint_set_flag: + +.. rst-class:: classref-method + +|void| **pin_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_pin_joint_set_flag>` + +Sets a pin joint flag (see :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>` constants). + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_pin_joint_set_param: .. rst-class:: classref-method -void **pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param, :ref:`float<class_float>` value **)** +|void| **pin_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_pin_joint_set_param>` Sets a pin joint parameter. See :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` for a list of available parameters. @@ -2345,7 +2431,7 @@ Sets a pin joint parameter. See :ref:`PinJointParam<enum_PhysicsServer2D_PinJoin .. rst-class:: classref-method -:ref:`RID<class_RID>` **rectangle_shape_create** **(** **)** +:ref:`RID<class_RID>` **rectangle_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_rectangle_shape_create>` Creates a 2D rectangle shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the rectangle's half-extents. @@ -2357,7 +2443,7 @@ Creates a 2D rectangle shape in the physics server, and returns the :ref:`RID<cl .. rst-class:: classref-method -:ref:`RID<class_RID>` **segment_shape_create** **(** **)** +:ref:`RID<class_RID>` **segment_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_segment_shape_create>` Creates a 2D segment shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the segment's start and end points. @@ -2369,7 +2455,7 @@ Creates a 2D segment shape in the physics server, and returns the :ref:`RID<clas .. rst-class:: classref-method -:ref:`RID<class_RID>` **separation_ray_shape_create** **(** **)** +:ref:`RID<class_RID>` **separation_ray_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_separation_ray_shape_create>` Creates a 2D separation ray shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the shape's ``length`` and ``slide_on_slope`` properties. @@ -2381,7 +2467,7 @@ Creates a 2D separation ray shape in the physics server, and returns the :ref:`R .. rst-class:: classref-method -void **set_active** **(** :ref:`bool<class_bool>` active **)** +|void| **set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_set_active>` Activates or deactivates the 2D physics server. If ``active`` is ``false``, then the physics server will not do anything in its physics step. @@ -2393,7 +2479,7 @@ Activates or deactivates the 2D physics server. If ``active`` is ``false``, then .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **shape_get_data** **(** :ref:`RID<class_RID>` shape **)** |const| +:ref:`Variant<class_Variant>` **shape_get_data**\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_shape_get_data>` Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` for the precise format of this data in each case. @@ -2405,7 +2491,7 @@ Returns the shape data that defines the configuration of the shape, such as the .. rst-class:: classref-method -:ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` **shape_get_type** **(** :ref:`RID<class_RID>` shape **)** |const| +:ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` **shape_get_type**\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_shape_get_type>` Returns the shape's type (see :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>`). @@ -2417,23 +2503,23 @@ Returns the shape's type (see :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>`). .. rst-class:: classref-method -void **shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** +|void| **shape_set_data**\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer2D_method_shape_set_data>` Sets the shape data that defines the configuration of the shape. The ``data`` to be passed depends on the shape's type (see :ref:`shape_get_type<class_PhysicsServer2D_method_shape_get_type>`): -- :ref:`SHAPE_WORLD_BOUNDARY<class_PhysicsServer2D_constant_SHAPE_WORLD_BOUNDARY>`: an array of length two containing a :ref:`Vector2<class_Vector2>` ``normal`` direction and a ``float`` distance ``d``, +- :ref:`SHAPE_WORLD_BOUNDARY<class_PhysicsServer2D_constant_SHAPE_WORLD_BOUNDARY>`: an array of length two containing a :ref:`Vector2<class_Vector2>` ``normal`` direction and a :ref:`float<class_float>` distance ``d``, -- :ref:`SHAPE_SEPARATION_RAY<class_PhysicsServer2D_constant_SHAPE_SEPARATION_RAY>`: a dictionary containing the key ``length`` with a ``float`` value and the key ``slide_on_slope`` with a ``bool`` value, +- :ref:`SHAPE_SEPARATION_RAY<class_PhysicsServer2D_constant_SHAPE_SEPARATION_RAY>`: a dictionary containing the key ``length`` with a :ref:`float<class_float>` value and the key ``slide_on_slope`` with a :ref:`bool<class_bool>` value, - :ref:`SHAPE_SEGMENT<class_PhysicsServer2D_constant_SHAPE_SEGMENT>`: a :ref:`Rect2<class_Rect2>` ``rect`` containing the first point of the segment in ``rect.position`` and the second point of the segment in ``rect.size``, -- :ref:`SHAPE_CIRCLE<class_PhysicsServer2D_constant_SHAPE_CIRCLE>`: a ``float`` ``radius``, +- :ref:`SHAPE_CIRCLE<class_PhysicsServer2D_constant_SHAPE_CIRCLE>`: a :ref:`float<class_float>` ``radius``, - :ref:`SHAPE_RECTANGLE<class_PhysicsServer2D_constant_SHAPE_RECTANGLE>`: a :ref:`Vector2<class_Vector2>` ``half_extents``, -- :ref:`SHAPE_CAPSULE<class_PhysicsServer2D_constant_SHAPE_CAPSULE>`: an array of length two (or a :ref:`Vector2<class_Vector2>`) containing a ``float`` ``height`` and a ``float`` ``radius``, +- :ref:`SHAPE_CAPSULE<class_PhysicsServer2D_constant_SHAPE_CAPSULE>`: an array of length two (or a :ref:`Vector2<class_Vector2>`) containing a :ref:`float<class_float>` ``height`` and a :ref:`float<class_float>` ``radius``, -- :ref:`SHAPE_CONVEX_POLYGON<class_PhysicsServer2D_constant_SHAPE_CONVEX_POLYGON>`: either a :ref:`PackedVector2Array<class_PackedVector2Array>` of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a :ref:`PackedFloat32Array<class_PackedFloat32Array>` of length divisible by four so that every 4-tuple of ``float``\ s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point, +- :ref:`SHAPE_CONVEX_POLYGON<class_PhysicsServer2D_constant_SHAPE_CONVEX_POLYGON>`: either a :ref:`PackedVector2Array<class_PackedVector2Array>` of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a :ref:`PackedFloat32Array<class_PackedFloat32Array>` of length divisible by four so that every 4-tuple of :ref:`float<class_float>`\ s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point, - :ref:`SHAPE_CONCAVE_POLYGON<class_PhysicsServer2D_constant_SHAPE_CONCAVE_POLYGON>`: a :ref:`PackedVector2Array<class_PackedVector2Array>` of length divisible by two (each pair of points forms one segment). @@ -2447,7 +2533,7 @@ Sets the shape data that defines the configuration of the shape. The ``data`` to .. rst-class:: classref-method -:ref:`RID<class_RID>` **space_create** **(** **)** +:ref:`RID<class_RID>` **space_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_space_create>` Creates a 2D space in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. A space contains bodies and areas, and controls the stepping of the physics simulation of the objects in it. @@ -2459,7 +2545,7 @@ Creates a 2D space in the physics server, and returns the :ref:`RID<class_RID>` .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **space_get_direct_state** **(** :ref:`RID<class_RID>` space **)** +:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **space_get_direct_state**\ (\ space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer2D_method_space_get_direct_state>` Returns the state of a space, a :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>`. This object can be used for collision/intersection queries. @@ -2471,7 +2557,7 @@ Returns the state of a space, a :ref:`PhysicsDirectSpaceState2D<class_PhysicsDir .. rst-class:: classref-method -:ref:`float<class_float>` **space_get_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |const| +:ref:`float<class_float>` **space_get_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_space_get_param>` Returns the value of the given space parameter. See :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` for the list of available parameters. @@ -2483,7 +2569,7 @@ Returns the value of the given space parameter. See :ref:`SpaceParameter<enum_Ph .. rst-class:: classref-method -:ref:`bool<class_bool>` **space_is_active** **(** :ref:`RID<class_RID>` space **)** |const| +:ref:`bool<class_bool>` **space_is_active**\ (\ space\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2D_method_space_is_active>` Returns ``true`` if the space is active. @@ -2495,7 +2581,7 @@ Returns ``true`` if the space is active. .. rst-class:: classref-method -void **space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** +|void| **space_set_active**\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer2D_method_space_set_active>` Activates or deactivates the space. If ``active`` is ``false``, then the physics server will not do anything with this space in its physics step. @@ -2507,7 +2593,7 @@ Activates or deactivates the space. If ``active`` is ``false``, then the physics .. rst-class:: classref-method -void **space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** +|void| **space_set_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer2D_method_space_set_param>` Sets the value of the given space parameter. See :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` for the list of available parameters. @@ -2519,7 +2605,7 @@ Sets the value of the given space parameter. See :ref:`SpaceParameter<enum_Physi .. rst-class:: classref-method -:ref:`RID<class_RID>` **world_boundary_shape_create** **(** **)** +:ref:`RID<class_RID>` **world_boundary_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer2D_method_world_boundary_shape_create>` Creates a 2D world boundary shape in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. Use :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` to set the shape's normal direction and distance properties. @@ -2530,3 +2616,4 @@ Creates a 2D world boundary shape in the physics server, and returns the :ref:`R .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver2dextension.rst b/classes/class_physicsserver2dextension.rst index de46c4f1b4f..c93a466d3c2 100644 --- a/classes/class_physicsserver2dextension.rst +++ b/classes/class_physicsserver2dextension.rst @@ -31,283 +31,287 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape<class_PhysicsServer2DExtension_method__area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_canvas_instance_id<class_PhysicsServer2DExtension_method__area_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id<class_PhysicsServer2DExtension_method__area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes<class_PhysicsServer2DExtension_method__area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_create<class_PhysicsServer2DExtension_method__area_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_canvas_instance_id<class_PhysicsServer2DExtension_method__area_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_collision_layer<class_PhysicsServer2DExtension_method__area_get_collision_layer>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_collision_mask<class_PhysicsServer2DExtension_method__area_get_collision_mask>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_object_instance_id<class_PhysicsServer2DExtension_method__area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_area_get_param<class_PhysicsServer2DExtension_method__area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_get_shape<class_PhysicsServer2DExtension_method__area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_shape_count<class_PhysicsServer2DExtension_method__area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`_area_get_shape_transform<class_PhysicsServer2DExtension_method__area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_get_space<class_PhysicsServer2DExtension_method__area_get_space>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`_area_get_transform<class_PhysicsServer2DExtension_method__area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape<class_PhysicsServer2DExtension_method__area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback<class_PhysicsServer2DExtension_method__area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer<class_PhysicsServer2DExtension_method__area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask<class_PhysicsServer2DExtension_method__area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback<class_PhysicsServer2DExtension_method__area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable<class_PhysicsServer2DExtension_method__area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param<class_PhysicsServer2DExtension_method__area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_pickable<class_PhysicsServer2DExtension_method__area_set_pickable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` pickable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape<class_PhysicsServer2DExtension_method__area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled<class_PhysicsServer2DExtension_method__area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform<class_PhysicsServer2DExtension_method__area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space<class_PhysicsServer2DExtension_method__area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform<class_PhysicsServer2DExtension_method__area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception<class_PhysicsServer2DExtension_method__body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force<class_PhysicsServer2DExtension_method__body_add_constant_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force<class_PhysicsServer2DExtension_method__body_add_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque<class_PhysicsServer2DExtension_method__body_add_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape<class_PhysicsServer2DExtension_method__body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force<class_PhysicsServer2DExtension_method__body_apply_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse<class_PhysicsServer2DExtension_method__body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force<class_PhysicsServer2DExtension_method__body_apply_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse<class_PhysicsServer2DExtension_method__body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque<class_PhysicsServer2DExtension_method__body_apply_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse<class_PhysicsServer2DExtension_method__body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_canvas_instance_id<class_PhysicsServer2DExtension_method__body_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id<class_PhysicsServer2DExtension_method__body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes<class_PhysicsServer2DExtension_method__body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_collide_shape<class_PhysicsServer2DExtension_method__body_collide_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` body_shape, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` motion, void* results, :ref:`int<class_int>` result_max, int32_t* result_count **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_create<class_PhysicsServer2DExtension_method__body_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_canvas_instance_id<class_PhysicsServer2DExtension_method__body_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`_body_get_collision_exceptions<class_PhysicsServer2DExtension_method__body_get_collision_exceptions>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_collision_layer<class_PhysicsServer2DExtension_method__body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_collision_mask<class_PhysicsServer2DExtension_method__body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_body_get_collision_priority<class_PhysicsServer2DExtension_method__body_get_collision_priority>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_body_get_constant_force<class_PhysicsServer2DExtension_method__body_get_constant_force>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_body_get_constant_torque<class_PhysicsServer2DExtension_method__body_get_constant_torque>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_body_get_contacts_reported_depth_threshold<class_PhysicsServer2DExtension_method__body_get_contacts_reported_depth_threshold>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`_body_get_continuous_collision_detection_mode<class_PhysicsServer2DExtension_method__body_get_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`_body_get_direct_state<class_PhysicsServer2DExtension_method__body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_max_contacts_reported<class_PhysicsServer2DExtension_method__body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`_body_get_mode<class_PhysicsServer2DExtension_method__body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_object_instance_id<class_PhysicsServer2DExtension_method__body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_body_get_param<class_PhysicsServer2DExtension_method__body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_get_shape<class_PhysicsServer2DExtension_method__body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_shape_count<class_PhysicsServer2DExtension_method__body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`_body_get_shape_transform<class_PhysicsServer2DExtension_method__body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_get_space<class_PhysicsServer2DExtension_method__body_get_space>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_body_get_state<class_PhysicsServer2DExtension_method__body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_is_omitting_force_integration<class_PhysicsServer2DExtension_method__body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception<class_PhysicsServer2DExtension_method__body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape<class_PhysicsServer2DExtension_method__body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties<class_PhysicsServer2DExtension_method__body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity<class_PhysicsServer2DExtension_method__body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer<class_PhysicsServer2DExtension_method__body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask<class_PhysicsServer2DExtension_method__body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority<class_PhysicsServer2DExtension_method__body_set_collision_priority>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force<class_PhysicsServer2DExtension_method__body_set_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque<class_PhysicsServer2DExtension_method__body_set_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold<class_PhysicsServer2DExtension_method__body_set_contacts_reported_depth_threshold>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` threshold **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_continuous_collision_detection_mode<class_PhysicsServer2DExtension_method__body_set_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback<class_PhysicsServer2DExtension_method__body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported<class_PhysicsServer2DExtension_method__body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode<class_PhysicsServer2DExtension_method__body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration<class_PhysicsServer2DExtension_method__body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param<class_PhysicsServer2DExtension_method__body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_pickable<class_PhysicsServer2DExtension_method__body_set_pickable>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` pickable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape<class_PhysicsServer2DExtension_method__body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_as_one_way_collision<class_PhysicsServer2DExtension_method__body_set_shape_as_one_way_collision>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled<class_PhysicsServer2DExtension_method__body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform<class_PhysicsServer2DExtension_method__body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space<class_PhysicsServer2DExtension_method__body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state<class_PhysicsServer2DExtension_method__body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback<class_PhysicsServer2DExtension_method__body_set_state_sync_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_test_motion<class_PhysicsServer2DExtension_method__body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`Transform2D<class_Transform2D>` from, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`bool<class_bool>` collide_separation_ray, :ref:`bool<class_bool>` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_capsule_shape_create<class_PhysicsServer2DExtension_method__capsule_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_circle_shape_create<class_PhysicsServer2DExtension_method__circle_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_concave_polygon_shape_create<class_PhysicsServer2DExtension_method__concave_polygon_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_convex_polygon_shape_create<class_PhysicsServer2DExtension_method__convex_polygon_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_damped_spring_joint_get_param<class_PhysicsServer2DExtension_method__damped_spring_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_damped_spring_joint_set_param<class_PhysicsServer2DExtension_method__damped_spring_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync<class_PhysicsServer2DExtension_method__end_sync>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish<class_PhysicsServer2DExtension_method__finish>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries<class_PhysicsServer2DExtension_method__flush_queries>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid<class_PhysicsServer2DExtension_method__free_rid>` **(** :ref:`RID<class_RID>` rid **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_process_info<class_PhysicsServer2DExtension_method__get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init<class_PhysicsServer2DExtension_method__init>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_flushing_queries<class_PhysicsServer2DExtension_method__is_flushing_queries>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear<class_PhysicsServer2DExtension_method__joint_clear>` **(** :ref:`RID<class_RID>` joint **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_joint_create<class_PhysicsServer2DExtension_method__joint_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies<class_PhysicsServer2DExtension_method__joint_disable_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_joint_get_param<class_PhysicsServer2DExtension_method__joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`_joint_get_type<class_PhysicsServer2DExtension_method__joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_joint_is_disabled_collisions_between_bodies<class_PhysicsServer2DExtension_method__joint_is_disabled_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_damped_spring<class_PhysicsServer2DExtension_method__joint_make_damped_spring>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_groove<class_PhysicsServer2DExtension_method__joint_make_groove>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` a_groove1, :ref:`Vector2<class_Vector2>` a_groove2, :ref:`Vector2<class_Vector2>` b_anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin<class_PhysicsServer2DExtension_method__joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_param<class_PhysicsServer2DExtension_method__joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_pin_joint_get_param<class_PhysicsServer2DExtension_method__pin_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param<class_PhysicsServer2DExtension_method__pin_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_rectangle_shape_create<class_PhysicsServer2DExtension_method__rectangle_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_segment_shape_create<class_PhysicsServer2DExtension_method__segment_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_separation_ray_shape_create<class_PhysicsServer2DExtension_method__separation_ray_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active<class_PhysicsServer2DExtension_method__set_active>` **(** :ref:`bool<class_bool>` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shape_collide<class_PhysicsServer2DExtension_method__shape_collide>` **(** :ref:`RID<class_RID>` shape_A, :ref:`Transform2D<class_Transform2D>` xform_A, :ref:`Vector2<class_Vector2>` motion_A, :ref:`RID<class_RID>` shape_B, :ref:`Transform2D<class_Transform2D>` xform_B, :ref:`Vector2<class_Vector2>` motion_B, void* results, :ref:`int<class_int>` result_max, int32_t* result_count **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shape_get_custom_solver_bias<class_PhysicsServer2DExtension_method__shape_get_custom_solver_bias>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_shape_get_data<class_PhysicsServer2DExtension_method__shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`_shape_get_type<class_PhysicsServer2DExtension_method__shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias<class_PhysicsServer2DExtension_method__shape_set_custom_solver_bias>` **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` bias **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data<class_PhysicsServer2DExtension_method__shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_space_create<class_PhysicsServer2DExtension_method__space_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_space_get_contact_count<class_PhysicsServer2DExtension_method__space_get_contact_count>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_space_get_contacts<class_PhysicsServer2DExtension_method__space_get_contacts>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`_space_get_direct_state<class_PhysicsServer2DExtension_method__space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_space_get_param<class_PhysicsServer2DExtension_method__space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_space_is_active<class_PhysicsServer2DExtension_method__space_is_active>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active<class_PhysicsServer2DExtension_method__space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts<class_PhysicsServer2DExtension_method__space_set_debug_contacts>` **(** :ref:`RID<class_RID>` space, :ref:`int<class_int>` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param<class_PhysicsServer2DExtension_method__space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step<class_PhysicsServer2DExtension_method__step>` **(** :ref:`float<class_float>` step **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync<class_PhysicsServer2DExtension_method__sync>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_world_boundary_shape_create<class_PhysicsServer2DExtension_method__world_boundary_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_body<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_body>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_object<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_object>` **(** :ref:`int<class_int>` object **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_add_shape<class_PhysicsServer2DExtension_private_method__area_add_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_attach_canvas_instance_id<class_PhysicsServer2DExtension_private_method__area_attach_canvas_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_attach_object_instance_id<class_PhysicsServer2DExtension_private_method__area_attach_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_clear_shapes<class_PhysicsServer2DExtension_private_method__area_clear_shapes>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_create<class_PhysicsServer2DExtension_private_method__area_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_canvas_instance_id<class_PhysicsServer2DExtension_private_method__area_get_canvas_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_collision_layer<class_PhysicsServer2DExtension_private_method__area_get_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_collision_mask<class_PhysicsServer2DExtension_private_method__area_get_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_object_instance_id<class_PhysicsServer2DExtension_private_method__area_get_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_area_get_param<class_PhysicsServer2DExtension_private_method__area_get_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_get_shape<class_PhysicsServer2DExtension_private_method__area_get_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_shape_count<class_PhysicsServer2DExtension_private_method__area_get_shape_count>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`_area_get_shape_transform<class_PhysicsServer2DExtension_private_method__area_get_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_get_space<class_PhysicsServer2DExtension_private_method__area_get_space>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`_area_get_transform<class_PhysicsServer2DExtension_private_method__area_get_transform>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_remove_shape<class_PhysicsServer2DExtension_private_method__area_remove_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_area_monitor_callback<class_PhysicsServer2DExtension_private_method__area_set_area_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_collision_layer<class_PhysicsServer2DExtension_private_method__area_set_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_collision_mask<class_PhysicsServer2DExtension_private_method__area_set_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_monitor_callback<class_PhysicsServer2DExtension_private_method__area_set_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_monitorable<class_PhysicsServer2DExtension_private_method__area_set_monitorable>`\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_param<class_PhysicsServer2DExtension_private_method__area_set_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_pickable<class_PhysicsServer2DExtension_private_method__area_set_pickable>`\ (\ area\: :ref:`RID<class_RID>`, pickable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape<class_PhysicsServer2DExtension_private_method__area_set_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape_disabled<class_PhysicsServer2DExtension_private_method__area_set_shape_disabled>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape_transform<class_PhysicsServer2DExtension_private_method__area_set_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_space<class_PhysicsServer2DExtension_private_method__area_set_space>`\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_transform<class_PhysicsServer2DExtension_private_method__area_set_transform>`\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_collision_exception<class_PhysicsServer2DExtension_private_method__body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_central_force<class_PhysicsServer2DExtension_private_method__body_add_constant_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_force<class_PhysicsServer2DExtension_private_method__body_add_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_torque<class_PhysicsServer2DExtension_private_method__body_add_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_shape<class_PhysicsServer2DExtension_private_method__body_add_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_central_force<class_PhysicsServer2DExtension_private_method__body_apply_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_central_impulse<class_PhysicsServer2DExtension_private_method__body_apply_central_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_force<class_PhysicsServer2DExtension_private_method__body_apply_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_impulse<class_PhysicsServer2DExtension_private_method__body_apply_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_torque<class_PhysicsServer2DExtension_private_method__body_apply_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_torque_impulse<class_PhysicsServer2DExtension_private_method__body_apply_torque_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_attach_canvas_instance_id<class_PhysicsServer2DExtension_private_method__body_attach_canvas_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_attach_object_instance_id<class_PhysicsServer2DExtension_private_method__body_attach_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_clear_shapes<class_PhysicsServer2DExtension_private_method__body_clear_shapes>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_collide_shape<class_PhysicsServer2DExtension_private_method__body_collide_shape>`\ (\ body\: :ref:`RID<class_RID>`, body_shape\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, results\: ``void*``, result_max\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_create<class_PhysicsServer2DExtension_private_method__body_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_canvas_instance_id<class_PhysicsServer2DExtension_private_method__body_get_canvas_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`_body_get_collision_exceptions<class_PhysicsServer2DExtension_private_method__body_get_collision_exceptions>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_collision_layer<class_PhysicsServer2DExtension_private_method__body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_collision_mask<class_PhysicsServer2DExtension_private_method__body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_body_get_collision_priority<class_PhysicsServer2DExtension_private_method__body_get_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_body_get_constant_force<class_PhysicsServer2DExtension_private_method__body_get_constant_force>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_body_get_constant_torque<class_PhysicsServer2DExtension_private_method__body_get_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_body_get_contacts_reported_depth_threshold<class_PhysicsServer2DExtension_private_method__body_get_contacts_reported_depth_threshold>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`_body_get_continuous_collision_detection_mode<class_PhysicsServer2DExtension_private_method__body_get_continuous_collision_detection_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`_body_get_direct_state<class_PhysicsServer2DExtension_private_method__body_get_direct_state>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_max_contacts_reported<class_PhysicsServer2DExtension_private_method__body_get_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`_body_get_mode<class_PhysicsServer2DExtension_private_method__body_get_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_object_instance_id<class_PhysicsServer2DExtension_private_method__body_get_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_body_get_param<class_PhysicsServer2DExtension_private_method__body_get_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_get_shape<class_PhysicsServer2DExtension_private_method__body_get_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_shape_count<class_PhysicsServer2DExtension_private_method__body_get_shape_count>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`_body_get_shape_transform<class_PhysicsServer2DExtension_private_method__body_get_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_get_space<class_PhysicsServer2DExtension_private_method__body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_body_get_state<class_PhysicsServer2DExtension_private_method__body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_is_omitting_force_integration<class_PhysicsServer2DExtension_private_method__body_is_omitting_force_integration>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_remove_collision_exception<class_PhysicsServer2DExtension_private_method__body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_remove_shape<class_PhysicsServer2DExtension_private_method__body_remove_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_reset_mass_properties<class_PhysicsServer2DExtension_private_method__body_reset_mass_properties>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_axis_velocity<class_PhysicsServer2DExtension_private_method__body_set_axis_velocity>`\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_layer<class_PhysicsServer2DExtension_private_method__body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_mask<class_PhysicsServer2DExtension_private_method__body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_priority<class_PhysicsServer2DExtension_private_method__body_set_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_constant_force<class_PhysicsServer2DExtension_private_method__body_set_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_constant_torque<class_PhysicsServer2DExtension_private_method__body_set_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_contacts_reported_depth_threshold<class_PhysicsServer2DExtension_private_method__body_set_contacts_reported_depth_threshold>`\ (\ body\: :ref:`RID<class_RID>`, threshold\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_continuous_collision_detection_mode<class_PhysicsServer2DExtension_private_method__body_set_continuous_collision_detection_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_force_integration_callback<class_PhysicsServer2DExtension_private_method__body_set_force_integration_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_max_contacts_reported<class_PhysicsServer2DExtension_private_method__body_set_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_mode<class_PhysicsServer2DExtension_private_method__body_set_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_omit_force_integration<class_PhysicsServer2DExtension_private_method__body_set_omit_force_integration>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_param<class_PhysicsServer2DExtension_private_method__body_set_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_pickable<class_PhysicsServer2DExtension_private_method__body_set_pickable>`\ (\ body\: :ref:`RID<class_RID>`, pickable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape<class_PhysicsServer2DExtension_private_method__body_set_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape_as_one_way_collision<class_PhysicsServer2DExtension_private_method__body_set_shape_as_one_way_collision>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`, margin\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape_disabled<class_PhysicsServer2DExtension_private_method__body_set_shape_disabled>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape_transform<class_PhysicsServer2DExtension_private_method__body_set_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_space<class_PhysicsServer2DExtension_private_method__body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_state<class_PhysicsServer2DExtension_private_method__body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_state_sync_callback<class_PhysicsServer2DExtension_private_method__body_set_state_sync_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_test_motion<class_PhysicsServer2DExtension_private_method__body_test_motion>`\ (\ body\: :ref:`RID<class_RID>`, from\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collide_separation_ray\: :ref:`bool<class_bool>`, recovery_as_collision\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionMotionResult*``\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_capsule_shape_create<class_PhysicsServer2DExtension_private_method__capsule_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_circle_shape_create<class_PhysicsServer2DExtension_private_method__circle_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_concave_polygon_shape_create<class_PhysicsServer2DExtension_private_method__concave_polygon_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_convex_polygon_shape_create<class_PhysicsServer2DExtension_private_method__convex_polygon_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_damped_spring_joint_get_param<class_PhysicsServer2DExtension_private_method__damped_spring_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_damped_spring_joint_set_param<class_PhysicsServer2DExtension_private_method__damped_spring_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_end_sync<class_PhysicsServer2DExtension_private_method__end_sync>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_finish<class_PhysicsServer2DExtension_private_method__finish>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_flush_queries<class_PhysicsServer2DExtension_private_method__flush_queries>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_free_rid<class_PhysicsServer2DExtension_private_method__free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_process_info<class_PhysicsServer2DExtension_private_method__get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_init<class_PhysicsServer2DExtension_private_method__init>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_flushing_queries<class_PhysicsServer2DExtension_private_method__is_flushing_queries>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_clear<class_PhysicsServer2DExtension_private_method__joint_clear>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_joint_create<class_PhysicsServer2DExtension_private_method__joint_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_disable_collisions_between_bodies<class_PhysicsServer2DExtension_private_method__joint_disable_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_joint_get_param<class_PhysicsServer2DExtension_private_method__joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`_joint_get_type<class_PhysicsServer2DExtension_private_method__joint_get_type>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_joint_is_disabled_collisions_between_bodies<class_PhysicsServer2DExtension_private_method__joint_is_disabled_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_damped_spring<class_PhysicsServer2DExtension_private_method__joint_make_damped_spring>`\ (\ joint\: :ref:`RID<class_RID>`, anchor_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_groove<class_PhysicsServer2DExtension_private_method__joint_make_groove>`\ (\ joint\: :ref:`RID<class_RID>`, a_groove1\: :ref:`Vector2<class_Vector2>`, a_groove2\: :ref:`Vector2<class_Vector2>`, b_anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_pin<class_PhysicsServer2DExtension_private_method__joint_make_pin>`\ (\ joint\: :ref:`RID<class_RID>`, anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_set_param<class_PhysicsServer2DExtension_private_method__joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_pin_joint_get_flag<class_PhysicsServer2DExtension_private_method__pin_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_pin_joint_get_param<class_PhysicsServer2DExtension_private_method__pin_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pin_joint_set_flag<class_PhysicsServer2DExtension_private_method__pin_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pin_joint_set_param<class_PhysicsServer2DExtension_private_method__pin_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_rectangle_shape_create<class_PhysicsServer2DExtension_private_method__rectangle_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_segment_shape_create<class_PhysicsServer2DExtension_private_method__segment_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_separation_ray_shape_create<class_PhysicsServer2DExtension_private_method__separation_ray_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_active<class_PhysicsServer2DExtension_private_method__set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shape_collide<class_PhysicsServer2DExtension_private_method__shape_collide>`\ (\ shape_A\: :ref:`RID<class_RID>`, xform_A\: :ref:`Transform2D<class_Transform2D>`, motion_A\: :ref:`Vector2<class_Vector2>`, shape_B\: :ref:`RID<class_RID>`, xform_B\: :ref:`Transform2D<class_Transform2D>`, motion_B\: :ref:`Vector2<class_Vector2>`, results\: ``void*``, result_max\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shape_get_custom_solver_bias<class_PhysicsServer2DExtension_private_method__shape_get_custom_solver_bias>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_shape_get_data<class_PhysicsServer2DExtension_private_method__shape_get_data>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`_shape_get_type<class_PhysicsServer2DExtension_private_method__shape_get_type>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shape_set_custom_solver_bias<class_PhysicsServer2DExtension_private_method__shape_set_custom_solver_bias>`\ (\ shape\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shape_set_data<class_PhysicsServer2DExtension_private_method__shape_set_data>`\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_space_create<class_PhysicsServer2DExtension_private_method__space_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_space_get_contact_count<class_PhysicsServer2DExtension_private_method__space_get_contact_count>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_space_get_contacts<class_PhysicsServer2DExtension_private_method__space_get_contacts>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`_space_get_direct_state<class_PhysicsServer2DExtension_private_method__space_get_direct_state>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_space_get_param<class_PhysicsServer2DExtension_private_method__space_get_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_space_is_active<class_PhysicsServer2DExtension_private_method__space_is_active>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_active<class_PhysicsServer2DExtension_private_method__space_set_active>`\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_debug_contacts<class_PhysicsServer2DExtension_private_method__space_set_debug_contacts>`\ (\ space\: :ref:`RID<class_RID>`, max_contacts\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_param<class_PhysicsServer2DExtension_private_method__space_set_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_step<class_PhysicsServer2DExtension_private_method__step>`\ (\ step\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_sync<class_PhysicsServer2DExtension_private_method__sync>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_world_boundary_shape_create<class_PhysicsServer2DExtension_private_method__world_boundary_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_body<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_body>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_object<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_object>`\ (\ object\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -318,1905 +322,1697 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsServer2DExtension_method__area_add_shape: +.. _class_PhysicsServer2DExtension_private_method__area_add_shape: .. rst-class:: classref-method -void **_area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_area_add_shape**\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_add_shape>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_add_shape<class_PhysicsServer2D_method_area_add_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_attach_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_attach_canvas_instance_id: .. rst-class:: classref-method -void **_area_attach_canvas_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| - -.. container:: contribute +|void| **_area_attach_canvas_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_attach_canvas_instance_id>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_attach_canvas_instance_id<class_PhysicsServer2D_method_area_attach_canvas_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_attach_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_attach_object_instance_id: .. rst-class:: classref-method -void **_area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| - -.. container:: contribute +|void| **_area_attach_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_attach_object_instance_id>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_attach_object_instance_id<class_PhysicsServer2D_method_area_attach_object_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_clear_shapes: +.. _class_PhysicsServer2DExtension_private_method__area_clear_shapes: .. rst-class:: classref-method -void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| +|void| **_area_clear_shapes**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_clear_shapes>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_clear_shapes<class_PhysicsServer2D_method_area_clear_shapes>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_create: +.. _class_PhysicsServer2DExtension_private_method__area_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_create** **(** **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_area_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_create<class_PhysicsServer2D_method_area_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_get_canvas_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_canvas_instance_id** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_canvas_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_canvas_instance_id>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_canvas_instance_id<class_PhysicsServer2D_method_area_get_canvas_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__area_get_collision_layer: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_collision_layer** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_area_get_collision_layer**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_collision_layer>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_collision_layer<class_PhysicsServer2D_method_area_get_collision_layer>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__area_get_collision_mask: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_collision_mask** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_collision_mask**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_collision_mask>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_collision_mask<class_PhysicsServer2D_method_area_get_collision_mask>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_get_object_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_object_instance_id** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_area_get_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_object_instance_id>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_object_instance_id<class_PhysicsServer2D_method_area_get_object_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_param: +.. _class_PhysicsServer2DExtension_private_method__area_get_param: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_area_get_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_area_get_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_param<class_PhysicsServer2D_method_area_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_get_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`RID<class_RID>` **_area_get_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_shape>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_shape<class_PhysicsServer2D_method_area_get_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape_count: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_shape_count** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_shape_count**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_shape_count>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_shape_count<class_PhysicsServer2D_method_area_get_shape_count>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape_transform: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **_area_get_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| - -.. container:: contribute +:ref:`Transform2D<class_Transform2D>` **_area_get_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_shape_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_shape_transform<class_PhysicsServer2D_method_area_get_shape_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_space: +.. _class_PhysicsServer2DExtension_private_method__area_get_space: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_get_space** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`RID<class_RID>` **_area_get_space**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_space>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_space<class_PhysicsServer2D_method_area_get_space>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_transform: +.. _class_PhysicsServer2DExtension_private_method__area_get_transform: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **_area_get_transform** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| - -.. container:: contribute +:ref:`Transform2D<class_Transform2D>` **_area_get_transform**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_get_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_get_transform<class_PhysicsServer2D_method_area_get_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_remove_shape: +.. _class_PhysicsServer2DExtension_private_method__area_remove_shape: .. rst-class:: classref-method -void **_area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| +|void| **_area_remove_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_remove_shape>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_remove_shape<class_PhysicsServer2D_method_area_remove_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_area_monitor_callback: +.. _class_PhysicsServer2DExtension_private_method__area_set_area_monitor_callback: .. rst-class:: classref-method -void **_area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| - -.. container:: contribute +|void| **_area_set_area_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_area_monitor_callback>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_area_monitor_callback<class_PhysicsServer2D_method_area_set_area_monitor_callback>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__area_set_collision_layer: .. rst-class:: classref-method -void **_area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |virtual| +|void| **_area_set_collision_layer**\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_collision_layer>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_collision_layer<class_PhysicsServer2D_method_area_set_collision_layer>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__area_set_collision_mask: .. rst-class:: classref-method -void **_area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |virtual| - -.. container:: contribute +|void| **_area_set_collision_mask**\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_collision_mask>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_collision_mask<class_PhysicsServer2D_method_area_set_collision_mask>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_monitor_callback: +.. _class_PhysicsServer2DExtension_private_method__area_set_monitor_callback: .. rst-class:: classref-method -void **_area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| +|void| **_area_set_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_monitor_callback>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_monitor_callback<class_PhysicsServer2D_method_area_set_monitor_callback>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_monitorable: +.. _class_PhysicsServer2DExtension_private_method__area_set_monitorable: .. rst-class:: classref-method -void **_area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |virtual| - -.. container:: contribute +|void| **_area_set_monitorable**\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_monitorable>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_param: +.. _class_PhysicsServer2DExtension_private_method__area_set_param: .. rst-class:: classref-method -void **_area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_area_set_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_param<class_PhysicsServer2D_method_area_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_pickable: +.. _class_PhysicsServer2DExtension_private_method__area_set_pickable: .. rst-class:: classref-method -void **_area_set_pickable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` pickable **)** |virtual| +|void| **_area_set_pickable**\ (\ area\: :ref:`RID<class_RID>`, pickable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_pickable>` -.. container:: contribute +If set to ``true``, allows the area with the given :ref:`RID<class_RID>` to detect mouse inputs when the mouse cursor is hovering on it. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``area_set_pickable`` method. Corresponds to :ref:`CollisionObject2D.input_pickable<class_CollisionObject2D_property_input_pickable>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape: .. rst-class:: classref-method -void **_area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| - -.. container:: contribute +|void| **_area_set_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_shape>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_shape<class_PhysicsServer2D_method_area_set_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape_disabled: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape_disabled: .. rst-class:: classref-method -void **_area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_area_set_shape_disabled**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_shape_disabled>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_shape_disabled<class_PhysicsServer2D_method_area_set_shape_disabled>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape_transform: .. rst-class:: classref-method -void **_area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| - -.. container:: contribute +|void| **_area_set_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_shape_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_shape_transform<class_PhysicsServer2D_method_area_set_shape_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_space: +.. _class_PhysicsServer2DExtension_private_method__area_set_space: .. rst-class:: classref-method -void **_area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |virtual| +|void| **_area_set_space**\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_space>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_space<class_PhysicsServer2D_method_area_set_space>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_transform: +.. _class_PhysicsServer2DExtension_private_method__area_set_transform: .. rst-class:: classref-method -void **_area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| - -.. container:: contribute +|void| **_area_set_transform**\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__area_set_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.area_set_transform<class_PhysicsServer2D_method_area_set_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_collision_exception: +.. _class_PhysicsServer2DExtension_private_method__body_add_collision_exception: .. rst-class:: classref-method -void **_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| +|void| **_body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_add_collision_exception>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_add_collision_exception<class_PhysicsServer2D_method_body_add_collision_exception>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_central_force: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_central_force: .. rst-class:: classref-method -void **_body_add_constant_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| - -.. container:: contribute +|void| **_body_add_constant_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_add_constant_central_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_central_force<class_PhysicsServer2D_method_body_add_constant_central_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_force: .. rst-class:: classref-method -void **_body_add_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| +|void| **_body_add_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_add_constant_force>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_force<class_PhysicsServer2D_method_body_add_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_torque: .. rst-class:: classref-method -void **_body_add_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| - -.. container:: contribute +|void| **_body_add_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_add_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_add_constant_torque<class_PhysicsServer2D_method_body_add_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_shape: +.. _class_PhysicsServer2DExtension_private_method__body_add_shape: .. rst-class:: classref-method -void **_body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_body_add_shape**\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_add_shape>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_add_shape<class_PhysicsServer2D_method_body_add_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_central_force: +.. _class_PhysicsServer2DExtension_private_method__body_apply_central_force: .. rst-class:: classref-method -void **_body_apply_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| - -.. container:: contribute +|void| **_body_apply_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_central_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_central_force<class_PhysicsServer2D_method_body_apply_central_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_central_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_central_impulse: .. rst-class:: classref-method -void **_body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** |virtual| +|void| **_body_apply_central_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_central_impulse>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_central_impulse<class_PhysicsServer2D_method_body_apply_central_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_force: +.. _class_PhysicsServer2DExtension_private_method__body_apply_force: .. rst-class:: classref-method -void **_body_apply_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| - -.. container:: contribute +|void| **_body_apply_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_force<class_PhysicsServer2D_method_body_apply_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_impulse: .. rst-class:: classref-method -void **_body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual| - -.. container:: contribute +|void| **_body_apply_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_impulse>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_impulse<class_PhysicsServer2D_method_body_apply_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_torque: +.. _class_PhysicsServer2DExtension_private_method__body_apply_torque: .. rst-class:: classref-method -void **_body_apply_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| +|void| **_body_apply_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_torque>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_torque<class_PhysicsServer2D_method_body_apply_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_torque_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_torque_impulse: .. rst-class:: classref-method -void **_body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** |virtual| - -.. container:: contribute +|void| **_body_apply_torque_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_apply_torque_impulse>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_apply_torque_impulse<class_PhysicsServer2D_method_body_apply_torque_impulse>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_attach_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_attach_canvas_instance_id: .. rst-class:: classref-method -void **_body_attach_canvas_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| +|void| **_body_attach_canvas_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_attach_canvas_instance_id>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_attach_canvas_instance_id<class_PhysicsServer2D_method_body_attach_canvas_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_attach_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_attach_object_instance_id: .. rst-class:: classref-method -void **_body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| - -.. container:: contribute +|void| **_body_attach_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_attach_object_instance_id>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_attach_object_instance_id<class_PhysicsServer2D_method_body_attach_object_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_clear_shapes: +.. _class_PhysicsServer2DExtension_private_method__body_clear_shapes: .. rst-class:: classref-method -void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| +|void| **_body_clear_shapes**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_clear_shapes>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_clear_shapes<class_PhysicsServer2D_method_body_clear_shapes>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_collide_shape: +.. _class_PhysicsServer2DExtension_private_method__body_collide_shape: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_collide_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` body_shape, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` motion, void* results, :ref:`int<class_int>` result_max, int32_t* result_count **)** |virtual| +:ref:`bool<class_bool>` **_body_collide_shape**\ (\ body\: :ref:`RID<class_RID>`, body_shape\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, results\: ``void*``, result_max\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_collide_shape>` -.. container:: contribute +Given a ``body``, a ``shape``, and their respective parameters, this method should return ``true`` if a collision between the two would occur, with additional details passed in ``results``. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape<class_PhysicsDirectSpaceState2D_method_collide_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_create: +.. _class_PhysicsServer2DExtension_private_method__body_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_create** **(** **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_body_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_create<class_PhysicsServer2D_method_body_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_get_canvas_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_canvas_instance_id** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_canvas_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_canvas_instance_id>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_canvas_instance_id<class_PhysicsServer2D_method_body_get_canvas_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_exceptions: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_exceptions: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **_body_get_collision_exceptions** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **_body_get_collision_exceptions**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_collision_exceptions>` -.. container:: contribute +Returns the :ref:`RID<class_RID>`\ s of all bodies added as collision exceptions for the given ``body``. See also :ref:`_body_add_collision_exception<class_PhysicsServer2DExtension_private_method__body_add_collision_exception>` and :ref:`_body_remove_collision_exception<class_PhysicsServer2DExtension_private_method__body_remove_collision_exception>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``body_get_collision_exceptions`` method. Corresponds to :ref:`PhysicsBody2D.get_collision_exceptions<class_PhysicsBody2D_method_get_collision_exceptions>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_layer: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_collision_layer>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_layer<class_PhysicsServer2D_method_body_get_collision_layer>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_mask: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_collision_mask>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_mask<class_PhysicsServer2D_method_body_get_collision_mask>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_priority: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_priority: .. rst-class:: classref-method -:ref:`float<class_float>` **_body_get_collision_priority** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_body_get_collision_priority**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_collision_priority>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_collision_priority<class_PhysicsServer2D_method_body_get_collision_priority>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_get_constant_force: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_body_get_constant_force** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_body_get_constant_force**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_constant_force>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_constant_force<class_PhysicsServer2D_method_body_get_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_get_constant_torque: .. rst-class:: classref-method -:ref:`float<class_float>` **_body_get_constant_torque** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_body_get_constant_torque**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_constant_torque<class_PhysicsServer2D_method_body_get_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_contacts_reported_depth_threshold: +.. _class_PhysicsServer2DExtension_private_method__body_get_contacts_reported_depth_threshold: .. rst-class:: classref-method -:ref:`float<class_float>` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_body_get_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_contacts_reported_depth_threshold>` -.. container:: contribute +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``body_get_contacts_reported_depth_threshold`` method. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This method is currently unused by Godot's default physics implementation. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_continuous_collision_detection_mode: +.. _class_PhysicsServer2DExtension_private_method__body_get_continuous_collision_detection_mode: .. rst-class:: classref-method -:ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` **_body_get_continuous_collision_detection_mode** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` **_body_get_continuous_collision_detection_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_continuous_collision_detection_mode>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_direct_state: +.. _class_PhysicsServer2DExtension_private_method__body_get_direct_state: .. rst-class:: classref-method -:ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **_body_get_direct_state** **(** :ref:`RID<class_RID>` body **)** |virtual| - -.. container:: contribute +:ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **_body_get_direct_state**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_direct_state>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_direct_state<class_PhysicsServer2D_method_body_get_direct_state>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_max_contacts_reported: +.. _class_PhysicsServer2DExtension_private_method__body_get_max_contacts_reported: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_max_contacts_reported** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_max_contacts_reported>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_max_contacts_reported<class_PhysicsServer2D_method_body_get_max_contacts_reported>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_mode: +.. _class_PhysicsServer2DExtension_private_method__body_get_mode: .. rst-class:: classref-method -:ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` **_body_get_mode** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` **_body_get_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_mode>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_mode<class_PhysicsServer2D_method_body_get_mode>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_get_object_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_object_instance_id** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_object_instance_id>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_object_instance_id<class_PhysicsServer2D_method_body_get_object_instance_id>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_param: +.. _class_PhysicsServer2DExtension_private_method__body_get_param: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_body_get_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |virtual| |const| - -.. container:: contribute +:ref:`Variant<class_Variant>` **_body_get_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_param<class_PhysicsServer2D_method_body_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_get_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`RID<class_RID>` **_body_get_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_shape>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_shape<class_PhysicsServer2D_method_body_get_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape_count: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_shape_count** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`int<class_int>` **_body_get_shape_count**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_shape_count>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_shape_count<class_PhysicsServer2D_method_body_get_shape_count>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape_transform: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **_body_get_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`Transform2D<class_Transform2D>` **_body_get_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_shape_transform>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_shape_transform<class_PhysicsServer2D_method_body_get_shape_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_space: +.. _class_PhysicsServer2DExtension_private_method__body_get_space: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_get_space** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`RID<class_RID>` **_body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_space>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_space<class_PhysicsServer2D_method_body_get_space>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_state: +.. _class_PhysicsServer2DExtension_private_method__body_get_state: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_get_state>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_get_state<class_PhysicsServer2D_method_body_get_state>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_is_omitting_force_integration: +.. _class_PhysicsServer2DExtension_private_method__body_is_omitting_force_integration: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_is_omitting_force_integration** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| - -.. container:: contribute +:ref:`bool<class_bool>` **_body_is_omitting_force_integration**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_is_omitting_force_integration>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_is_omitting_force_integration<class_PhysicsServer2D_method_body_is_omitting_force_integration>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_remove_collision_exception: +.. _class_PhysicsServer2DExtension_private_method__body_remove_collision_exception: .. rst-class:: classref-method -void **_body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| +|void| **_body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_remove_collision_exception>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_remove_collision_exception<class_PhysicsServer2D_method_body_remove_collision_exception>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_remove_shape: +.. _class_PhysicsServer2DExtension_private_method__body_remove_shape: .. rst-class:: classref-method -void **_body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| - -.. container:: contribute +|void| **_body_remove_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_remove_shape>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_remove_shape<class_PhysicsServer2D_method_body_remove_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_reset_mass_properties: +.. _class_PhysicsServer2DExtension_private_method__body_reset_mass_properties: .. rst-class:: classref-method -void **_body_reset_mass_properties** **(** :ref:`RID<class_RID>` body **)** |virtual| +|void| **_body_reset_mass_properties**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_reset_mass_properties>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_reset_mass_properties<class_PhysicsServer2D_method_body_reset_mass_properties>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_axis_velocity: +.. _class_PhysicsServer2DExtension_private_method__body_set_axis_velocity: .. rst-class:: classref-method -void **_body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** |virtual| - -.. container:: contribute +|void| **_body_set_axis_velocity**\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_axis_velocity>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_axis_velocity<class_PhysicsServer2D_method_body_set_axis_velocity>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_layer: .. rst-class:: classref-method -void **_body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| +|void| **_body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_collision_layer>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_layer<class_PhysicsServer2D_method_body_set_collision_layer>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_mask: .. rst-class:: classref-method -void **_body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| - -.. container:: contribute +|void| **_body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_collision_mask>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_mask<class_PhysicsServer2D_method_body_set_collision_mask>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_priority: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_priority: .. rst-class:: classref-method -void **_body_set_collision_priority** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** |virtual| +|void| **_body_set_collision_priority**\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_collision_priority>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_collision_priority<class_PhysicsServer2D_method_body_set_collision_priority>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_set_constant_force: .. rst-class:: classref-method -void **_body_set_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |virtual| - -.. container:: contribute +|void| **_body_set_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_constant_force>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_constant_force<class_PhysicsServer2D_method_body_set_constant_force>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_set_constant_torque: .. rst-class:: classref-method -void **_body_set_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |virtual| - -.. container:: contribute +|void| **_body_set_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_constant_torque>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_constant_torque<class_PhysicsServer2D_method_body_set_constant_torque>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_contacts_reported_depth_threshold: +.. _class_PhysicsServer2DExtension_private_method__body_set_contacts_reported_depth_threshold: .. rst-class:: classref-method -void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` threshold **)** |virtual| +|void| **_body_set_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID<class_RID>`, threshold\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_contacts_reported_depth_threshold>` -.. container:: contribute +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``body_set_contacts_reported_depth_threshold`` method. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This method is currently unused by Godot's default physics implementation. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_continuous_collision_detection_mode: +.. _class_PhysicsServer2DExtension_private_method__body_set_continuous_collision_detection_mode: .. rst-class:: classref-method -void **_body_set_continuous_collision_detection_mode** **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** |virtual| +|void| **_body_set_continuous_collision_detection_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_continuous_collision_detection_mode>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_force_integration_callback: +.. _class_PhysicsServer2DExtension_private_method__body_set_force_integration_callback: .. rst-class:: classref-method -void **_body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata **)** |virtual| - -.. container:: contribute +|void| **_body_set_force_integration_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_force_integration_callback>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_max_contacts_reported: +.. _class_PhysicsServer2DExtension_private_method__body_set_max_contacts_reported: .. rst-class:: classref-method -void **_body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |virtual| +|void| **_body_set_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_max_contacts_reported>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_mode: +.. _class_PhysicsServer2DExtension_private_method__body_set_mode: .. rst-class:: classref-method -void **_body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** |virtual| - -.. container:: contribute +|void| **_body_set_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_mode>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_mode<class_PhysicsServer2D_method_body_set_mode>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_omit_force_integration: +.. _class_PhysicsServer2DExtension_private_method__body_set_omit_force_integration: .. rst-class:: classref-method -void **_body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_body_set_omit_force_integration**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_omit_force_integration>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_param: +.. _class_PhysicsServer2DExtension_private_method__body_set_param: .. rst-class:: classref-method -void **_body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| - -.. container:: contribute +|void| **_body_set_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_param<class_PhysicsServer2D_method_body_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_pickable: +.. _class_PhysicsServer2DExtension_private_method__body_set_pickable: .. rst-class:: classref-method -void **_body_set_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` pickable **)** |virtual| +|void| **_body_set_pickable**\ (\ body\: :ref:`RID<class_RID>`, pickable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_pickable>` -.. container:: contribute +If set to ``true``, allows the body with the given :ref:`RID<class_RID>` to detect mouse inputs when the mouse cursor is hovering on it. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``body_set_pickable`` method. Corresponds to :ref:`CollisionObject2D.input_pickable<class_CollisionObject2D_property_input_pickable>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape: .. rst-class:: classref-method -void **_body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| +|void| **_body_set_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_shape>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_shape<class_PhysicsServer2D_method_body_set_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_as_one_way_collision: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_as_one_way_collision: .. rst-class:: classref-method -void **_body_set_shape_as_one_way_collision** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** |virtual| - -.. container:: contribute +|void| **_body_set_shape_as_one_way_collision**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`, margin\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_shape_as_one_way_collision>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_as_one_way_collision<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_disabled: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_disabled: .. rst-class:: classref-method -void **_body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_body_set_shape_disabled**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_shape_disabled>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_disabled<class_PhysicsServer2D_method_body_set_shape_disabled>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_transform: .. rst-class:: classref-method -void **_body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| - -.. container:: contribute +|void| **_body_set_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_shape_transform>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_shape_transform<class_PhysicsServer2D_method_body_set_shape_transform>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_space: +.. _class_PhysicsServer2DExtension_private_method__body_set_space: .. rst-class:: classref-method -void **_body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| +|void| **_body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_space>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_space<class_PhysicsServer2D_method_body_set_space>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_state: +.. _class_PhysicsServer2DExtension_private_method__body_set_state: .. rst-class:: classref-method -void **_body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |virtual| - -.. container:: contribute +|void| **_body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer2D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_state>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_set_state<class_PhysicsServer2D_method_body_set_state>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_state_sync_callback: +.. _class_PhysicsServer2DExtension_private_method__body_set_state_sync_callback: .. rst-class:: classref-method -void **_body_set_state_sync_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable **)** |virtual| +|void| **_body_set_state_sync_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_set_state_sync_callback>` -.. container:: contribute +Assigns the ``body`` to call the given ``callable`` during the synchronization phase of the loop, before :ref:`_step<class_PhysicsServer2DExtension_private_method__step>` is called. See also :ref:`_sync<class_PhysicsServer2DExtension_private_method__sync>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``body_set_state_sync_callback`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_test_motion: +.. _class_PhysicsServer2DExtension_private_method__body_test_motion: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_test_motion** **(** :ref:`RID<class_RID>` body, :ref:`Transform2D<class_Transform2D>` from, :ref:`Vector2<class_Vector2>` motion, :ref:`float<class_float>` margin, :ref:`bool<class_bool>` collide_separation_ray, :ref:`bool<class_bool>` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| +:ref:`bool<class_bool>` **_body_test_motion**\ (\ body\: :ref:`RID<class_RID>`, from\: :ref:`Transform2D<class_Transform2D>`, motion\: :ref:`Vector2<class_Vector2>`, margin\: :ref:`float<class_float>`, collide_separation_ray\: :ref:`bool<class_bool>`, recovery_as_collision\: :ref:`bool<class_bool>`, result\: ``PhysicsServer2DExtensionMotionResult*``\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__body_test_motion>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.body_test_motion<class_PhysicsServer2D_method_body_test_motion>`. Unlike the exposed implementation, this method does not receive all of the arguments inside a :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__capsule_shape_create: +.. _class_PhysicsServer2DExtension_private_method__capsule_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_capsule_shape_create** **(** **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_capsule_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__capsule_shape_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.capsule_shape_create<class_PhysicsServer2D_method_capsule_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__circle_shape_create: +.. _class_PhysicsServer2DExtension_private_method__circle_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_circle_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_circle_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__circle_shape_create>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.circle_shape_create<class_PhysicsServer2D_method_circle_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__concave_polygon_shape_create: +.. _class_PhysicsServer2DExtension_private_method__concave_polygon_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_concave_polygon_shape_create** **(** **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_concave_polygon_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__concave_polygon_shape_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.concave_polygon_shape_create<class_PhysicsServer2D_method_concave_polygon_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__convex_polygon_shape_create: +.. _class_PhysicsServer2DExtension_private_method__convex_polygon_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_convex_polygon_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_convex_polygon_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__convex_polygon_shape_create>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.convex_polygon_shape_create<class_PhysicsServer2D_method_convex_polygon_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__damped_spring_joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__damped_spring_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_damped_spring_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |virtual| |const| - -.. container:: contribute +:ref:`float<class_float>` **_damped_spring_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__damped_spring_joint_get_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_get_param<class_PhysicsServer2D_method_damped_spring_joint_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__damped_spring_joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__damped_spring_joint_set_param: .. rst-class:: classref-method -void **_damped_spring_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_damped_spring_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__damped_spring_joint_set_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__end_sync: +.. _class_PhysicsServer2DExtension_private_method__end_sync: .. rst-class:: classref-method -void **_end_sync** **(** **)** |virtual| +|void| **_end_sync**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__end_sync>` -.. container:: contribute +Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also :ref:`_sync<class_PhysicsServer2DExtension_private_method__sync>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``end_sync`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__finish: +.. _class_PhysicsServer2DExtension_private_method__finish: .. rst-class:: classref-method -void **_finish** **(** **)** |virtual| +|void| **_finish**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__finish>` -.. container:: contribute +Called when the main loop finalizes to shut down the physics server. See also :ref:`MainLoop._finalize<class_MainLoop_private_method__finalize>` and :ref:`_init<class_PhysicsServer2DExtension_private_method__init>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``finish`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__flush_queries: +.. _class_PhysicsServer2DExtension_private_method__flush_queries: .. rst-class:: classref-method -void **_flush_queries** **(** **)** |virtual| +|void| **_flush_queries**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__flush_queries>` -.. container:: contribute +Called every physics step before :ref:`_step<class_PhysicsServer2DExtension_private_method__step>` to process all remaining queries. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``flush_queries`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__free_rid: +.. _class_PhysicsServer2DExtension_private_method__free_rid: .. rst-class:: classref-method -void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| - -.. container:: contribute +|void| **_free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__free_rid>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.free_rid<class_PhysicsServer2D_method_free_rid>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__get_process_info: +.. _class_PhysicsServer2DExtension_private_method__get_process_info: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_process_info** **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** |virtual| +:ref:`int<class_int>` **_get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__get_process_info>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.get_process_info<class_PhysicsServer2D_method_get_process_info>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__init: +.. _class_PhysicsServer2DExtension_private_method__init: .. rst-class:: classref-method -void **_init** **(** **)** |virtual| +|void| **_init**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__init>` -.. container:: contribute +Called when the main loop is initialized and creates a new instance of this physics server. See also :ref:`MainLoop._initialize<class_MainLoop_private_method__initialize>` and :ref:`_finish<class_PhysicsServer2DExtension_private_method__finish>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``init`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__is_flushing_queries: +.. _class_PhysicsServer2DExtension_private_method__is_flushing_queries: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_flushing_queries** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_flushing_queries**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__is_flushing_queries>` -.. container:: contribute +Overridable method that should return ``true`` when the physics server is processing queries. See also :ref:`_flush_queries<class_PhysicsServer2DExtension_private_method__flush_queries>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``is_flushing_queries`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_clear: +.. _class_PhysicsServer2DExtension_private_method__joint_clear: .. rst-class:: classref-method -void **_joint_clear** **(** :ref:`RID<class_RID>` joint **)** |virtual| - -.. container:: contribute +|void| **_joint_clear**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_clear>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_clear<class_PhysicsServer2D_method_joint_clear>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_create: +.. _class_PhysicsServer2DExtension_private_method__joint_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_joint_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_joint_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_create>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_create<class_PhysicsServer2D_method_joint_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_disable_collisions_between_bodies: +.. _class_PhysicsServer2DExtension_private_method__joint_disable_collisions_between_bodies: .. rst-class:: classref-method -void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** |virtual| - -.. container:: contribute +|void| **_joint_disable_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_disable_collisions_between_bodies>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_disable_collisions_between_bodies<class_PhysicsServer2D_method_joint_disable_collisions_between_bodies>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_get_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_get_param<class_PhysicsServer2D_method_joint_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_get_type: +.. _class_PhysicsServer2DExtension_private_method__joint_get_type: .. rst-class:: classref-method -:ref:`JointType<enum_PhysicsServer2D_JointType>` **_joint_get_type** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| - -.. container:: contribute +:ref:`JointType<enum_PhysicsServer2D_JointType>` **_joint_get_type**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_get_type>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_get_type<class_PhysicsServer2D_method_joint_get_type>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_is_disabled_collisions_between_bodies: +.. _class_PhysicsServer2DExtension_private_method__joint_is_disabled_collisions_between_bodies: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_joint_is_disabled_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`bool<class_bool>` **_joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_is_disabled_collisions_between_bodies>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_is_disabled_collisions_between_bodies<class_PhysicsServer2D_method_joint_is_disabled_collisions_between_bodies>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_damped_spring: +.. _class_PhysicsServer2DExtension_private_method__joint_make_damped_spring: .. rst-class:: classref-method -void **_joint_make_damped_spring** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| - -.. container:: contribute +|void| **_joint_make_damped_spring**\ (\ joint\: :ref:`RID<class_RID>`, anchor_a\: :ref:`Vector2<class_Vector2>`, anchor_b\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_make_damped_spring>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_groove: +.. _class_PhysicsServer2DExtension_private_method__joint_make_groove: .. rst-class:: classref-method -void **_joint_make_groove** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` a_groove1, :ref:`Vector2<class_Vector2>` a_groove2, :ref:`Vector2<class_Vector2>` b_anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| +|void| **_joint_make_groove**\ (\ joint\: :ref:`RID<class_RID>`, a_groove1\: :ref:`Vector2<class_Vector2>`, a_groove2\: :ref:`Vector2<class_Vector2>`, b_anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_make_groove>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_pin: +.. _class_PhysicsServer2DExtension_private_method__joint_make_pin: .. rst-class:: classref-method -void **_joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |virtual| - -.. container:: contribute +|void| **_joint_make_pin**\ (\ joint\: :ref:`RID<class_RID>`, anchor\: :ref:`Vector2<class_Vector2>`, body_a\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_make_pin>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__joint_set_param: .. rst-class:: classref-method -void **_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`JointParam<enum_PhysicsServer2D_JointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__joint_set_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.joint_set_param<class_PhysicsServer2D_method_joint_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__pin_joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_get_flag: .. rst-class:: classref-method -:ref:`float<class_float>` **_pin_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param **)** |virtual| |const| - -.. container:: contribute +:ref:`bool<class_bool>` **_pin_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__pin_joint_get_flag>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_flag<class_PhysicsServer2D_method_pin_joint_get_flag>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__pin_joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_get_param: .. rst-class:: classref-method -void **_pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>` param, :ref:`float<class_float>` value **)** |virtual| - -.. container:: contribute +:ref:`float<class_float>` **_pin_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__pin_joint_get_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.pin_joint_get_param<class_PhysicsServer2D_method_pin_joint_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__rectangle_shape_create: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_set_flag: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_rectangle_shape_create** **(** **)** |virtual| +|void| **_pin_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`PinJointFlag<enum_PhysicsServer2D_PinJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__pin_joint_set_flag>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_flag<class_PhysicsServer2D_method_pin_joint_set_flag>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__segment_shape_create: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_set_param: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_segment_shape_create** **(** **)** |virtual| - -.. container:: contribute +|void| **_pin_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer2D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__pin_joint_set_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.pin_joint_set_param<class_PhysicsServer2D_method_pin_joint_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__separation_ray_shape_create: +.. _class_PhysicsServer2DExtension_private_method__rectangle_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_separation_ray_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_rectangle_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__rectangle_shape_create>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.rectangle_shape_create<class_PhysicsServer2D_method_rectangle_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__set_active: +.. _class_PhysicsServer2DExtension_private_method__segment_shape_create: .. rst-class:: classref-method -void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_segment_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__segment_shape_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.segment_shape_create<class_PhysicsServer2D_method_segment_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_collide: +.. _class_PhysicsServer2DExtension_private_method__separation_ray_shape_create: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shape_collide** **(** :ref:`RID<class_RID>` shape_A, :ref:`Transform2D<class_Transform2D>` xform_A, :ref:`Vector2<class_Vector2>` motion_A, :ref:`RID<class_RID>` shape_B, :ref:`Transform2D<class_Transform2D>` xform_B, :ref:`Vector2<class_Vector2>` motion_B, void* results, :ref:`int<class_int>` result_max, int32_t* result_count **)** |virtual| +:ref:`RID<class_RID>` **_separation_ray_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__separation_ray_shape_create>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.separation_ray_shape_create<class_PhysicsServer2D_method_separation_ray_shape_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_custom_solver_bias: +.. _class_PhysicsServer2DExtension_private_method__set_active: .. rst-class:: classref-method -:ref:`float<class_float>` **_shape_get_custom_solver_bias** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| - -.. container:: contribute +|void| **_set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__set_active>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.set_active<class_PhysicsServer2D_method_set_active>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_data: +.. _class_PhysicsServer2DExtension_private_method__shape_collide: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_shape_get_data** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`bool<class_bool>` **_shape_collide**\ (\ shape_A\: :ref:`RID<class_RID>`, xform_A\: :ref:`Transform2D<class_Transform2D>`, motion_A\: :ref:`Vector2<class_Vector2>`, shape_B\: :ref:`RID<class_RID>`, xform_B\: :ref:`Transform2D<class_Transform2D>`, motion_B\: :ref:`Vector2<class_Vector2>`, results\: ``void*``, result_max\: :ref:`int<class_int>`, result_count\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_collide>` -.. container:: contribute +Given two shapes and their parameters, should return ``true`` if a collision between the two would occur, with additional details passed in ``results``. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``shape_collide`` method. Corresponds to :ref:`PhysicsDirectSpaceState2D.collide_shape<class_PhysicsDirectSpaceState2D_method_collide_shape>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_type: +.. _class_PhysicsServer2DExtension_private_method__shape_get_custom_solver_bias: .. rst-class:: classref-method -:ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` **_shape_get_type** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`float<class_float>` **_shape_get_custom_solver_bias**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_get_custom_solver_bias>` -.. container:: contribute +Should return the custom solver bias of the given ``shape``, which defines how much bodies are forced to separate on contact when this shape is involved. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``shape_get_custom_solver_bias`` method. Corresponds to :ref:`Shape2D.custom_solver_bias<class_Shape2D_property_custom_solver_bias>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_set_custom_solver_bias: +.. _class_PhysicsServer2DExtension_private_method__shape_get_data: .. rst-class:: classref-method -void **_shape_set_custom_solver_bias** **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` bias **)** |virtual| +:ref:`Variant<class_Variant>` **_shape_get_data**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_get_data>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.shape_get_data<class_PhysicsServer2D_method_shape_get_data>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_set_data: +.. _class_PhysicsServer2DExtension_private_method__shape_get_type: .. rst-class:: classref-method -void **_shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |virtual| - -.. container:: contribute +:ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` **_shape_get_type**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_get_type>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.shape_get_type<class_PhysicsServer2D_method_shape_get_type>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_create: +.. _class_PhysicsServer2DExtension_private_method__shape_set_custom_solver_bias: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_space_create** **(** **)** |virtual| +|void| **_shape_set_custom_solver_bias**\ (\ shape\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_set_custom_solver_bias>` -.. container:: contribute +Should set the custom solver bias for the given ``shape``. It defines how much bodies are forced to separate on contact. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``shape_get_custom_solver_bias`` method. Corresponds to :ref:`Shape2D.custom_solver_bias<class_Shape2D_property_custom_solver_bias>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_contact_count: +.. _class_PhysicsServer2DExtension_private_method__shape_set_data: .. rst-class:: classref-method -:ref:`int<class_int>` **_space_get_contact_count** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| +|void| **_shape_set_data**\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__shape_set_data>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.shape_set_data<class_PhysicsServer2D_method_shape_set_data>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_contacts: +.. _class_PhysicsServer2DExtension_private_method__space_create: .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **_space_get_contacts** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| - -.. container:: contribute +:ref:`RID<class_RID>` **_space_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.space_create<class_PhysicsServer2D_method_space_create>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_direct_state: +.. _class_PhysicsServer2DExtension_private_method__space_get_contact_count: .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **_space_get_direct_state** **(** :ref:`RID<class_RID>` space **)** |virtual| +:ref:`int<class_int>` **_space_get_contact_count**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_get_contact_count>` -.. container:: contribute +Should return how many contacts have occurred during the last physics step in the given ``space``. See also :ref:`_space_get_contacts<class_PhysicsServer2DExtension_private_method__space_get_contacts>` and :ref:`_space_set_debug_contacts<class_PhysicsServer2DExtension_private_method__space_set_debug_contacts>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``space_get_contact_count`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_param: +.. _class_PhysicsServer2DExtension_private_method__space_get_contacts: .. rst-class:: classref-method -:ref:`float<class_float>` **_space_get_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |virtual| |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **_space_get_contacts**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_get_contacts>` -.. container:: contribute +Should return the positions of all contacts that have occurred during the last physics step in the given ``space``. See also :ref:`_space_get_contact_count<class_PhysicsServer2DExtension_private_method__space_get_contact_count>` and :ref:`_space_set_debug_contacts<class_PhysicsServer2DExtension_private_method__space_set_debug_contacts>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``space_get_contacts`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_is_active: +.. _class_PhysicsServer2DExtension_private_method__space_get_direct_state: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_space_is_active** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| +:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **_space_get_direct_state**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_get_direct_state>` -.. container:: contribute +Overridable version of :ref:`PhysicsServer2D.space_get_direct_state<class_PhysicsServer2D_method_space_get_direct_state>`. + +.. rst-class:: classref-item-separator + +---- - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. _class_PhysicsServer2DExtension_private_method__space_get_param: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **_space_get_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_get_param>` + +Overridable version of :ref:`PhysicsServer2D.space_get_param<class_PhysicsServer2D_method_space_get_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_active: +.. _class_PhysicsServer2DExtension_private_method__space_is_active: .. rst-class:: classref-method -void **_space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |virtual| +:ref:`bool<class_bool>` **_space_is_active**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_is_active>` + +Overridable version of :ref:`PhysicsServer2D.space_is_active<class_PhysicsServer2D_method_space_is_active>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer2DExtension_private_method__space_set_active: + +.. rst-class:: classref-method -.. container:: contribute +|void| **_space_set_active**\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_set_active>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.space_set_active<class_PhysicsServer2D_method_space_set_active>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_debug_contacts: +.. _class_PhysicsServer2DExtension_private_method__space_set_debug_contacts: .. rst-class:: classref-method -void **_space_set_debug_contacts** **(** :ref:`RID<class_RID>` space, :ref:`int<class_int>` max_contacts **)** |virtual| +|void| **_space_set_debug_contacts**\ (\ space\: :ref:`RID<class_RID>`, max_contacts\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_set_debug_contacts>` -.. container:: contribute +Used internally to allow the given ``space`` to store contact points, up to ``max_contacts``. This is automatically set for the main :ref:`World2D<class_World2D>`'s space when :ref:`SceneTree.debug_collisions_hint<class_SceneTree_property_debug_collisions_hint>` is ``true``, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``space_set_debug_contacts`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_param: +.. _class_PhysicsServer2DExtension_private_method__space_set_param: .. rst-class:: classref-method -void **_space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_space_set_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__space_set_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.space_set_param<class_PhysicsServer2D_method_space_set_param>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__step: +.. _class_PhysicsServer2DExtension_private_method__step: .. rst-class:: classref-method -void **_step** **(** :ref:`float<class_float>` step **)** |virtual| +|void| **_step**\ (\ step\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__step>` -.. container:: contribute +Called every physics step to process the physics simulation. ``step`` is the time elapsed since the last physics step, in seconds. It is usually the same as :ref:`Node.get_physics_process_delta_time<class_Node_method_get_physics_process_delta_time>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``step`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__sync: +.. _class_PhysicsServer2DExtension_private_method__sync: .. rst-class:: classref-method -void **_sync** **(** **)** |virtual| +|void| **_sync**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__sync>` -.. container:: contribute +Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also :ref:`_end_sync<class_PhysicsServer2DExtension_private_method__end_sync>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D<class_PhysicsServer2D>`'s internal ``sync`` method. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__world_boundary_shape_create: +.. _class_PhysicsServer2DExtension_private_method__world_boundary_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_world_boundary_shape_create** **(** **)** |virtual| - -.. container:: contribute +:ref:`RID<class_RID>` **_world_boundary_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer2DExtension_private_method__world_boundary_shape_create>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overridable version of :ref:`PhysicsServer2D.world_boundary_shape_create<class_PhysicsServer2D_method_world_boundary_shape_create>`. .. rst-class:: classref-item-separator @@ -2226,11 +2022,9 @@ void **_sync** **(** **)** |virtual| .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion_is_excluding_body** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **body_test_motion_is_excluding_body**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_body>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if the body with the given :ref:`RID<class_RID>` is being excluded from :ref:`_body_test_motion<class_PhysicsServer2DExtension_private_method__body_test_motion>`. See also :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. .. rst-class:: classref-item-separator @@ -2240,11 +2034,9 @@ void **_sync** **(** **)** |virtual| .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion_is_excluding_object** **(** :ref:`int<class_int>` object **)** |const| - -.. container:: contribute +:ref:`bool<class_bool>` **body_test_motion_is_excluding_object**\ (\ object\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer2DExtension_method_body_test_motion_is_excluding_object>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if the object with the given instance ID is being excluded from :ref:`_body_test_motion<class_PhysicsServer2DExtension_private_method__body_test_motion>`. See also :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -2253,3 +2045,4 @@ void **_sync** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver2dmanager.rst b/classes/class_physicsserver2dmanager.rst index 2e640ef9e28..68e12e909f8 100644 --- a/classes/class_physicsserver2dmanager.rst +++ b/classes/class_physicsserver2dmanager.rst @@ -31,11 +31,11 @@ Methods .. table:: :widths: auto - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_server<class_PhysicsServer2DManager_method_register_server>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** | - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_server<class_PhysicsServer2DManager_method_set_default_server>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** | - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_server<class_PhysicsServer2DManager_method_register_server>`\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_server<class_PhysicsServer2DManager_method_set_default_server>`\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -void **register_server** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** +|void| **register_server**\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer2DManager_method_register_server>` Register a :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation by passing a ``name`` and a :ref:`Callable<class_Callable>` that returns a :ref:`PhysicsServer2D<class_PhysicsServer2D>` object. @@ -62,7 +62,7 @@ Register a :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation by passi .. rst-class:: classref-method -void **set_default_server** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** +|void| **set_default_server**\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer2DManager_method_set_default_server>` Set the default :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation. @@ -73,3 +73,4 @@ Set the default :ref:`PhysicsServer2D<class_PhysicsServer2D>` implementation to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver3d.rst b/classes/class_physicsserver3d.rst index 5d1ea15698a..bb6015042b8 100644 --- a/classes/class_physicsserver3d.rst +++ b/classes/class_physicsserver3d.rst @@ -21,7 +21,7 @@ A server interface for low-level 3D physics access. Description ----------- -PhysicsServer2D is the server responsible for all 2D physics. It can directly create and manipulate all physics objects: +PhysicsServer3D is the server responsible for all 3D physics. It can directly create and manipulate all physics objects: - A *space* is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. @@ -45,275 +45,343 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_add_shape<class_PhysicsServer3D_method_area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool<class_bool>` disabled=false **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_attach_object_instance_id<class_PhysicsServer3D_method_area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_clear_shapes<class_PhysicsServer3D_method_area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer3D_method_area_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_collision_layer<class_PhysicsServer3D_method_area_get_collision_layer>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_collision_mask<class_PhysicsServer3D_method_area_get_collision_mask>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer3D_method_area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer3D_method_area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer3D_method_area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer3D_method_area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`area_get_shape_transform<class_PhysicsServer3D_method_area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer3D_method_area_get_space>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`area_get_transform<class_PhysicsServer3D_method_area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_remove_shape<class_PhysicsServer3D_method_area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_area_monitor_callback<class_PhysicsServer3D_method_area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_collision_layer<class_PhysicsServer3D_method_area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_collision_mask<class_PhysicsServer3D_method_area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_monitor_callback<class_PhysicsServer3D_method_area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_monitorable<class_PhysicsServer3D_method_area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_param<class_PhysicsServer3D_method_area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_ray_pickable<class_PhysicsServer3D_method_area_set_ray_pickable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape<class_PhysicsServer3D_method_area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape_disabled<class_PhysicsServer3D_method_area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_shape_transform<class_PhysicsServer3D_method_area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_space<class_PhysicsServer3D_method_area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`area_set_transform<class_PhysicsServer3D_method_area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform3D<class_Transform3D>` transform **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_collision_exception<class_PhysicsServer3D_method_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_central_force<class_PhysicsServer3D_method_body_add_constant_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_force<class_PhysicsServer3D_method_body_add_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_constant_torque<class_PhysicsServer3D_method_body_add_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_add_shape<class_PhysicsServer3D_method_body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool<class_bool>` disabled=false **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_central_force<class_PhysicsServer3D_method_body_apply_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_central_impulse<class_PhysicsServer3D_method_body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_force<class_PhysicsServer3D_method_body_apply_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_impulse<class_PhysicsServer3D_method_body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_torque<class_PhysicsServer3D_method_body_apply_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_apply_torque_impulse<class_PhysicsServer3D_method_body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_attach_object_instance_id<class_PhysicsServer3D_method_body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_clear_shapes<class_PhysicsServer3D_method_body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer3D_method_body_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer3D_method_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer3D_method_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`body_get_collision_priority<class_PhysicsServer3D_method_body_get_collision_priority>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`body_get_constant_force<class_PhysicsServer3D_method_body_get_constant_force>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`body_get_constant_torque<class_PhysicsServer3D_method_body_get_constant_torque>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` | :ref:`body_get_direct_state<class_PhysicsServer3D_method_body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer3D_method_body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer3D_method_body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer3D_method_body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer3D_method_body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer3D_method_body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer3D_method_body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`body_get_shape_transform<class_PhysicsServer3D_method_body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer3D_method_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer3D_method_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_is_axis_locked<class_PhysicsServer3D_method_body_is_axis_locked>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_is_continuous_collision_detection_enabled<class_PhysicsServer3D_method_body_is_continuous_collision_detection_enabled>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer3D_method_body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_remove_collision_exception<class_PhysicsServer3D_method_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_remove_shape<class_PhysicsServer3D_method_body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_reset_mass_properties<class_PhysicsServer3D_method_body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_axis_lock<class_PhysicsServer3D_method_body_set_axis_lock>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_axis_velocity<class_PhysicsServer3D_method_body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_layer<class_PhysicsServer3D_method_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_mask<class_PhysicsServer3D_method_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_collision_priority<class_PhysicsServer3D_method_body_set_collision_priority>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_constant_force<class_PhysicsServer3D_method_body_set_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_constant_torque<class_PhysicsServer3D_method_body_set_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_enable_continuous_collision_detection<class_PhysicsServer3D_method_body_set_enable_continuous_collision_detection>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_force_integration_callback<class_PhysicsServer3D_method_body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_max_contacts_reported<class_PhysicsServer3D_method_body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_mode<class_PhysicsServer3D_method_body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` mode **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_param<class_PhysicsServer3D_method_body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_ray_pickable<class_PhysicsServer3D_method_body_set_ray_pickable>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape<class_PhysicsServer3D_method_body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape_disabled<class_PhysicsServer3D_method_body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_shape_transform<class_PhysicsServer3D_method_body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_space<class_PhysicsServer3D_method_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`body_set_state<class_PhysicsServer3D_method_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer3D_method_body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>` parameters, :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>` result=null **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`box_shape_create<class_PhysicsServer3D_method_box_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer3D_method_capsule_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer3D_method_concave_polygon_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`cone_twist_joint_get_param<class_PhysicsServer3D_method_cone_twist_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cone_twist_joint_set_param<class_PhysicsServer3D_method_cone_twist_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer3D_method_convex_polygon_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`custom_shape_create<class_PhysicsServer3D_method_custom_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`cylinder_shape_create<class_PhysicsServer3D_method_cylinder_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_PhysicsServer3D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`generic_6dof_joint_get_flag<class_PhysicsServer3D_method_generic_6dof_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`generic_6dof_joint_get_param<class_PhysicsServer3D_method_generic_6dof_joint_get_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generic_6dof_joint_set_flag<class_PhysicsServer3D_method_generic_6dof_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generic_6dof_joint_set_param<class_PhysicsServer3D_method_generic_6dof_joint_set_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer3D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>` process_info **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`heightmap_shape_create<class_PhysicsServer3D_method_heightmap_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`hinge_joint_get_flag<class_PhysicsServer3D_method_hinge_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`hinge_joint_get_param<class_PhysicsServer3D_method_hinge_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hinge_joint_set_flag<class_PhysicsServer3D_method_hinge_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hinge_joint_set_param<class_PhysicsServer3D_method_hinge_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_clear<class_PhysicsServer3D_method_joint_clear>` **(** :ref:`RID<class_RID>` joint **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer3D_method_joint_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_disable_collisions_between_bodies<class_PhysicsServer3D_method_joint_disable_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`joint_get_solver_priority<class_PhysicsServer3D_method_joint_get_solver_priority>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType<enum_PhysicsServer3D_JointType>` | :ref:`joint_get_type<class_PhysicsServer3D_method_joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`joint_is_disabled_collisions_between_bodies<class_PhysicsServer3D_method_joint_is_disabled_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_cone_twist<class_PhysicsServer3D_method_joint_make_cone_twist>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_generic_6dof<class_PhysicsServer3D_method_joint_make_generic_6dof>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_hinge<class_PhysicsServer3D_method_joint_make_hinge>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` hinge_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_pin<class_PhysicsServer3D_method_joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_make_slider<class_PhysicsServer3D_method_joint_make_slider>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`joint_set_solver_priority<class_PhysicsServer3D_method_joint_set_solver_priority>` **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_a<class_PhysicsServer3D_method_pin_joint_get_local_a>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_b<class_PhysicsServer3D_method_pin_joint_get_local_b>` **(** :ref:`RID<class_RID>` joint **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`pin_joint_get_param<class_PhysicsServer3D_method_pin_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pin_joint_set_local_a<class_PhysicsServer3D_method_pin_joint_set_local_a>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pin_joint_set_local_b<class_PhysicsServer3D_method_pin_joint_set_local_b>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pin_joint_set_param<class_PhysicsServer3D_method_pin_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer3D_method_separation_ray_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_active<class_PhysicsServer3D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer3D_method_shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer3D_method_shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_set_data<class_PhysicsServer3D_method_shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`slider_joint_get_param<class_PhysicsServer3D_method_slider_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`slider_joint_set_param<class_PhysicsServer3D_method_slider_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`soft_body_get_bounds<class_PhysicsServer3D_method_soft_body_get_bounds>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer3D_method_space_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`space_get_direct_state<class_PhysicsServer3D_method_space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer3D_method_space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer3D_method_space_is_active>` **(** :ref:`RID<class_RID>` space **)** |const| | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`space_set_active<class_PhysicsServer3D_method_space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`space_set_param<class_PhysicsServer3D_method_space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`sphere_shape_create<class_PhysicsServer3D_method_sphere_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer3D_method_world_boundary_shape_create>` **(** **)** | - +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_add_shape<class_PhysicsServer3D_method_area_add_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_attach_object_instance_id<class_PhysicsServer3D_method_area_attach_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_clear_shapes<class_PhysicsServer3D_method_area_clear_shapes>`\ (\ area\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer3D_method_area_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_collision_layer<class_PhysicsServer3D_method_area_get_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_collision_mask<class_PhysicsServer3D_method_area_get_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer3D_method_area_get_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer3D_method_area_get_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer3D_method_area_get_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer3D_method_area_get_shape_count>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`area_get_shape_transform<class_PhysicsServer3D_method_area_get_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer3D_method_area_get_space>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`area_get_transform<class_PhysicsServer3D_method_area_get_transform>`\ (\ area\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_remove_shape<class_PhysicsServer3D_method_area_remove_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_area_monitor_callback<class_PhysicsServer3D_method_area_set_area_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_collision_layer<class_PhysicsServer3D_method_area_set_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_collision_mask<class_PhysicsServer3D_method_area_set_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_monitor_callback<class_PhysicsServer3D_method_area_set_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_monitorable<class_PhysicsServer3D_method_area_set_monitorable>`\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_param<class_PhysicsServer3D_method_area_set_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_ray_pickable<class_PhysicsServer3D_method_area_set_ray_pickable>`\ (\ area\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape<class_PhysicsServer3D_method_area_set_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape_disabled<class_PhysicsServer3D_method_area_set_shape_disabled>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_shape_transform<class_PhysicsServer3D_method_area_set_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_space<class_PhysicsServer3D_method_area_set_space>`\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`area_set_transform<class_PhysicsServer3D_method_area_set_transform>`\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_collision_exception<class_PhysicsServer3D_method_body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_central_force<class_PhysicsServer3D_method_body_add_constant_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_force<class_PhysicsServer3D_method_body_add_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_constant_torque<class_PhysicsServer3D_method_body_add_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_add_shape<class_PhysicsServer3D_method_body_add_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_central_force<class_PhysicsServer3D_method_body_apply_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_central_impulse<class_PhysicsServer3D_method_body_apply_central_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_force<class_PhysicsServer3D_method_body_apply_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_impulse<class_PhysicsServer3D_method_body_apply_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_torque<class_PhysicsServer3D_method_body_apply_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_apply_torque_impulse<class_PhysicsServer3D_method_body_apply_torque_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_attach_object_instance_id<class_PhysicsServer3D_method_body_attach_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_clear_shapes<class_PhysicsServer3D_method_body_clear_shapes>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer3D_method_body_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer3D_method_body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer3D_method_body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`body_get_collision_priority<class_PhysicsServer3D_method_body_get_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`body_get_constant_force<class_PhysicsServer3D_method_body_get_constant_force>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`body_get_constant_torque<class_PhysicsServer3D_method_body_get_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` | :ref:`body_get_direct_state<class_PhysicsServer3D_method_body_get_direct_state>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer3D_method_body_get_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer3D_method_body_get_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer3D_method_body_get_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer3D_method_body_get_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer3D_method_body_get_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer3D_method_body_get_shape_count>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`body_get_shape_transform<class_PhysicsServer3D_method_body_get_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer3D_method_body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer3D_method_body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_is_axis_locked<class_PhysicsServer3D_method_body_is_axis_locked>`\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_is_continuous_collision_detection_enabled<class_PhysicsServer3D_method_body_is_continuous_collision_detection_enabled>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer3D_method_body_is_omitting_force_integration>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_remove_collision_exception<class_PhysicsServer3D_method_body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_remove_shape<class_PhysicsServer3D_method_body_remove_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_reset_mass_properties<class_PhysicsServer3D_method_body_reset_mass_properties>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_axis_lock<class_PhysicsServer3D_method_body_set_axis_lock>`\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_axis_velocity<class_PhysicsServer3D_method_body_set_axis_velocity>`\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_layer<class_PhysicsServer3D_method_body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_mask<class_PhysicsServer3D_method_body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_collision_priority<class_PhysicsServer3D_method_body_set_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_constant_force<class_PhysicsServer3D_method_body_set_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_constant_torque<class_PhysicsServer3D_method_body_set_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_enable_continuous_collision_detection<class_PhysicsServer3D_method_body_set_enable_continuous_collision_detection>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_force_integration_callback<class_PhysicsServer3D_method_body_set_force_integration_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>` = null\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_max_contacts_reported<class_PhysicsServer3D_method_body_set_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_mode<class_PhysicsServer3D_method_body_set_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_param<class_PhysicsServer3D_method_body_set_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_ray_pickable<class_PhysicsServer3D_method_body_set_ray_pickable>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape<class_PhysicsServer3D_method_body_set_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape_disabled<class_PhysicsServer3D_method_body_set_shape_disabled>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_shape_transform<class_PhysicsServer3D_method_body_set_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_space<class_PhysicsServer3D_method_body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`body_set_state<class_PhysicsServer3D_method_body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer3D_method_body_test_motion>`\ (\ body\: :ref:`RID<class_RID>`, parameters\: :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>`, result\: :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>` = null\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`box_shape_create<class_PhysicsServer3D_method_box_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer3D_method_capsule_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer3D_method_concave_polygon_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`cone_twist_joint_get_param<class_PhysicsServer3D_method_cone_twist_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cone_twist_joint_set_param<class_PhysicsServer3D_method_cone_twist_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer3D_method_convex_polygon_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`custom_shape_create<class_PhysicsServer3D_method_custom_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`cylinder_shape_create<class_PhysicsServer3D_method_cylinder_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_PhysicsServer3D_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`generic_6dof_joint_get_flag<class_PhysicsServer3D_method_generic_6dof_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`generic_6dof_joint_get_param<class_PhysicsServer3D_method_generic_6dof_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generic_6dof_joint_set_flag<class_PhysicsServer3D_method_generic_6dof_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generic_6dof_joint_set_param<class_PhysicsServer3D_method_generic_6dof_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer3D_method_get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`heightmap_shape_create<class_PhysicsServer3D_method_heightmap_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`hinge_joint_get_flag<class_PhysicsServer3D_method_hinge_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`hinge_joint_get_param<class_PhysicsServer3D_method_hinge_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hinge_joint_set_flag<class_PhysicsServer3D_method_hinge_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hinge_joint_set_param<class_PhysicsServer3D_method_hinge_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_clear<class_PhysicsServer3D_method_joint_clear>`\ (\ joint\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer3D_method_joint_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_disable_collisions_between_bodies<class_PhysicsServer3D_method_joint_disable_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`joint_get_solver_priority<class_PhysicsServer3D_method_joint_get_solver_priority>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType<enum_PhysicsServer3D_JointType>` | :ref:`joint_get_type<class_PhysicsServer3D_method_joint_get_type>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`joint_is_disabled_collisions_between_bodies<class_PhysicsServer3D_method_joint_is_disabled_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_cone_twist<class_PhysicsServer3D_method_joint_make_cone_twist>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_generic_6dof<class_PhysicsServer3D_method_joint_make_generic_6dof>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_hinge<class_PhysicsServer3D_method_joint_make_hinge>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, hinge_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, hinge_B\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_pin<class_PhysicsServer3D_method_joint_make_pin>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_make_slider<class_PhysicsServer3D_method_joint_make_slider>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`joint_set_solver_priority<class_PhysicsServer3D_method_joint_set_solver_priority>`\ (\ joint\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_a<class_PhysicsServer3D_method_pin_joint_get_local_a>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`pin_joint_get_local_b<class_PhysicsServer3D_method_pin_joint_get_local_b>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`pin_joint_get_param<class_PhysicsServer3D_method_pin_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pin_joint_set_local_a<class_PhysicsServer3D_method_pin_joint_set_local_a>`\ (\ joint\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pin_joint_set_local_b<class_PhysicsServer3D_method_pin_joint_set_local_b>`\ (\ joint\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pin_joint_set_param<class_PhysicsServer3D_method_pin_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer3D_method_separation_ray_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_active<class_PhysicsServer3D_method_set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer3D_method_shape_get_data>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shape_get_margin<class_PhysicsServer3D_method_shape_get_margin>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer3D_method_shape_get_type>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_set_data<class_PhysicsServer3D_method_shape_set_data>`\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shape_set_margin<class_PhysicsServer3D_method_shape_set_margin>`\ (\ shape\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`slider_joint_get_param<class_PhysicsServer3D_method_slider_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`slider_joint_set_param<class_PhysicsServer3D_method_slider_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_add_collision_exception<class_PhysicsServer3D_method_soft_body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`soft_body_create<class_PhysicsServer3D_method_soft_body_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`soft_body_get_bounds<class_PhysicsServer3D_method_soft_body_get_bounds>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`soft_body_get_collision_layer<class_PhysicsServer3D_method_soft_body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`soft_body_get_collision_mask<class_PhysicsServer3D_method_soft_body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`soft_body_get_damping_coefficient<class_PhysicsServer3D_method_soft_body_get_damping_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`soft_body_get_drag_coefficient<class_PhysicsServer3D_method_soft_body_get_drag_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`soft_body_get_linear_stiffness<class_PhysicsServer3D_method_soft_body_get_linear_stiffness>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`soft_body_get_point_global_position<class_PhysicsServer3D_method_soft_body_get_point_global_position>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`soft_body_get_pressure_coefficient<class_PhysicsServer3D_method_soft_body_get_pressure_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`soft_body_get_simulation_precision<class_PhysicsServer3D_method_soft_body_get_simulation_precision>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`soft_body_get_space<class_PhysicsServer3D_method_soft_body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`soft_body_get_state<class_PhysicsServer3D_method_soft_body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`soft_body_get_total_mass<class_PhysicsServer3D_method_soft_body_get_total_mass>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`soft_body_is_point_pinned<class_PhysicsServer3D_method_soft_body_is_point_pinned>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_move_point<class_PhysicsServer3D_method_soft_body_move_point>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, global_position\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_pin_point<class_PhysicsServer3D_method_soft_body_pin_point>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, pin\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_remove_all_pinned_points<class_PhysicsServer3D_method_soft_body_remove_all_pinned_points>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_remove_collision_exception<class_PhysicsServer3D_method_soft_body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_collision_layer<class_PhysicsServer3D_method_soft_body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_collision_mask<class_PhysicsServer3D_method_soft_body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_damping_coefficient<class_PhysicsServer3D_method_soft_body_set_damping_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, damping_coefficient\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_drag_coefficient<class_PhysicsServer3D_method_soft_body_set_drag_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, drag_coefficient\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_linear_stiffness<class_PhysicsServer3D_method_soft_body_set_linear_stiffness>`\ (\ body\: :ref:`RID<class_RID>`, stiffness\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_mesh<class_PhysicsServer3D_method_soft_body_set_mesh>`\ (\ body\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_pressure_coefficient<class_PhysicsServer3D_method_soft_body_set_pressure_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, pressure_coefficient\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_ray_pickable<class_PhysicsServer3D_method_soft_body_set_ray_pickable>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_simulation_precision<class_PhysicsServer3D_method_soft_body_set_simulation_precision>`\ (\ body\: :ref:`RID<class_RID>`, simulation_precision\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_space<class_PhysicsServer3D_method_soft_body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_state<class_PhysicsServer3D_method_soft_body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, variant\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_total_mass<class_PhysicsServer3D_method_soft_body_set_total_mass>`\ (\ body\: :ref:`RID<class_RID>`, total_mass\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_set_transform<class_PhysicsServer3D_method_soft_body_set_transform>`\ (\ body\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`soft_body_update_rendering_server<class_PhysicsServer3D_method_soft_body_update_rendering_server>`\ (\ body\: :ref:`RID<class_RID>`, rendering_server_handler\: :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer3D_method_space_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`space_get_direct_state<class_PhysicsServer3D_method_space_get_direct_state>`\ (\ space\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer3D_method_space_get_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer3D_method_space_is_active>`\ (\ space\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`space_set_active<class_PhysicsServer3D_method_space_set_active>`\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`space_set_param<class_PhysicsServer3D_method_space_set_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`sphere_shape_create<class_PhysicsServer3D_method_sphere_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer3D_method_world_boundary_shape_create>`\ (\ ) | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -328,7 +396,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **JointType**: +enum **JointType**: :ref:`🔗<enum_PhysicsServer3D_JointType>` .. _class_PhysicsServer3D_constant_JOINT_TYPE_PIN: @@ -386,7 +454,7 @@ Represents the size of the :ref:`JointType<enum_PhysicsServer3D_JointType>` enum .. rst-class:: classref-enumeration -enum **PinJointParam**: +enum **PinJointParam**: :ref:`🔗<enum_PhysicsServer3D_PinJointParam>` .. _class_PhysicsServer3D_constant_PIN_JOINT_BIAS: @@ -424,7 +492,7 @@ If above 0, this value is the maximum value for an impulse that this Joint3D put .. rst-class:: classref-enumeration -enum **HingeJointParam**: +enum **HingeJointParam**: :ref:`🔗<enum_PhysicsServer3D_HingeJointParam>` .. _class_PhysicsServer3D_constant_HINGE_JOINT_BIAS: @@ -464,6 +532,10 @@ The speed with which the rotation across the axis perpendicular to the hinge get :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` **HINGE_JOINT_LIMIT_SOFTNESS** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_HINGE_JOINT_LIMIT_RELAXATION: @@ -498,7 +570,7 @@ Maximum acceleration for the motor. .. rst-class:: classref-enumeration -enum **HingeJointFlag**: +enum **HingeJointFlag**: :ref:`🔗<enum_PhysicsServer3D_HingeJointFlag>` .. _class_PhysicsServer3D_constant_HINGE_JOINT_FLAG_USE_LIMIT: @@ -524,7 +596,7 @@ If ``true``, a motor turns the Hinge. .. rst-class:: classref-enumeration -enum **SliderJointParam**: +enum **SliderJointParam**: :ref:`🔗<enum_PhysicsServer3D_SliderJointParam>` .. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_UPPER: @@ -556,7 +628,7 @@ A factor applied to the movement across the slider axis once the limits get surp :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` **SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION** = ``3`` -The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. .. _class_PhysicsServer3D_constant_SLIDER_JOINT_LINEAR_LIMIT_DAMPING: @@ -718,7 +790,7 @@ Represents the size of the :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJoi .. rst-class:: classref-enumeration -enum **ConeTwistJointParam**: +enum **ConeTwistJointParam**: :ref:`🔗<enum_PhysicsServer3D_ConeTwistJointParam>` .. _class_PhysicsServer3D_constant_CONE_TWIST_JOINT_SWING_SPAN: @@ -778,7 +850,7 @@ Defines, how fast the swing- and twist-speed-difference on both sides gets synce .. rst-class:: classref-enumeration -enum **G6DOFJointAxisParam**: +enum **G6DOFJointAxisParam**: :ref:`🔗<enum_PhysicsServer3D_G6DOFJointAxisParam>` .. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_LOWER_LIMIT: @@ -836,6 +908,42 @@ The velocity that the joint's linear motor will attempt to reach. The maximum force that the linear motor can apply while trying to reach the target velocity. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_SPRING_STIFFNESS** = ``7`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_SPRING_DAMPING** = ``8`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT** = ``9`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + .. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_LOWER_LIMIT: .. rst-class:: classref-enumeration-constant @@ -908,6 +1016,50 @@ Target speed for the motor at the axes. Maximum acceleration for the motor at the axes. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS** = ``19`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_DAMPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_SPRING_DAMPING** = ``20`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT** = ``21`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` **G6DOF_JOINT_MAX** = ``22`` + +Represents the size of the :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` enum. + .. rst-class:: classref-item-separator ---- @@ -916,7 +1068,7 @@ Maximum acceleration for the motor at the axes. .. rst-class:: classref-enumeration -enum **G6DOFJointAxisFlag**: +enum **G6DOFJointAxisFlag**: :ref:`🔗<enum_PhysicsServer3D_G6DOFJointAxisFlag>` .. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT: @@ -934,6 +1086,30 @@ If set, linear motion is possible within the given limits. If set, rotational motion is possible. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + .. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_ENABLE_MOTOR: .. rst-class:: classref-enumeration-constant @@ -950,6 +1126,14 @@ If set, there is a rotational motor across these axes. If set, there is a linear motor on this axis that targets a specific velocity. +.. _class_PhysicsServer3D_constant_G6DOF_JOINT_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` **G6DOF_JOINT_FLAG_MAX** = ``6`` + +Represents the size of the :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` enum. + .. rst-class:: classref-item-separator ---- @@ -958,7 +1142,7 @@ If set, there is a linear motor on this axis that targets a specific velocity. .. rst-class:: classref-enumeration -enum **ShapeType**: +enum **ShapeType**: :ref:`🔗<enum_PhysicsServer3D_ShapeType>` .. _class_PhysicsServer3D_constant_SHAPE_WORLD_BOUNDARY: @@ -1056,7 +1240,7 @@ This constant is used internally by the engine. Any attempt to create this kind .. rst-class:: classref-enumeration -enum **AreaParameter**: +enum **AreaParameter**: :ref:`🔗<enum_PhysicsServer3D_AreaParameter>` .. _class_PhysicsServer3D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE: @@ -1146,7 +1330,7 @@ Constant to set/get the priority (order of processing) of an area. :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` **AREA_PARAM_WIND_FORCE_MAGNITUDE** = ``10`` -Constant to set/get the magnitude of area-specific wind force. +Constant to set/get the magnitude of area-specific wind force. This wind force only applies to :ref:`SoftBody3D<class_SoftBody3D>` nodes. Other physics bodies are currently not affected by wind. .. _class_PhysicsServer3D_constant_AREA_PARAM_WIND_SOURCE: @@ -1180,7 +1364,7 @@ Constant to set/get the exponential rate at which wind force decreases with dist .. rst-class:: classref-enumeration -enum **AreaSpaceOverrideMode**: +enum **AreaSpaceOverrideMode**: :ref:`🔗<enum_PhysicsServer3D_AreaSpaceOverrideMode>` .. _class_PhysicsServer3D_constant_AREA_SPACE_OVERRIDE_DISABLED: @@ -1230,7 +1414,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the .. rst-class:: classref-enumeration -enum **BodyMode**: +enum **BodyMode**: :ref:`🔗<enum_PhysicsServer3D_BodyMode>` .. _class_PhysicsServer3D_constant_BODY_MODE_STATIC: @@ -1272,7 +1456,7 @@ Constant for linear rigid bodies. In this mode, a body can not rotate, and only .. rst-class:: classref-enumeration -enum **BodyParameter**: +enum **BodyParameter**: :ref:`🔗<enum_PhysicsServer3D_BodyParameter>` .. _class_PhysicsServer3D_constant_BODY_PARAM_BOUNCE: @@ -1370,7 +1554,7 @@ Represents the size of the :ref:`BodyParameter<enum_PhysicsServer3D_BodyParamete .. rst-class:: classref-enumeration -enum **BodyDampMode**: +enum **BodyDampMode**: :ref:`🔗<enum_PhysicsServer3D_BodyDampMode>` .. _class_PhysicsServer3D_constant_BODY_DAMP_MODE_COMBINE: @@ -1396,7 +1580,7 @@ The body's damping value replaces any value set in areas or the default value. .. rst-class:: classref-enumeration -enum **BodyState**: +enum **BodyState**: :ref:`🔗<enum_PhysicsServer3D_BodyState>` .. _class_PhysicsServer3D_constant_BODY_STATE_TRANSFORM: @@ -1446,7 +1630,7 @@ Constant to set/get whether the body can sleep. .. rst-class:: classref-enumeration -enum **AreaBodyStatus**: +enum **AreaBodyStatus**: :ref:`🔗<enum_PhysicsServer3D_AreaBodyStatus>` .. _class_PhysicsServer3D_constant_AREA_BODY_ADDED: @@ -1472,7 +1656,7 @@ The value of the first parameter and area callback function receives, when an ob .. rst-class:: classref-enumeration -enum **ProcessInfo**: +enum **ProcessInfo**: :ref:`🔗<enum_PhysicsServer3D_ProcessInfo>` .. _class_PhysicsServer3D_constant_INFO_ACTIVE_OBJECTS: @@ -1506,7 +1690,7 @@ Constant to get the number of space regions where a collision could occur. .. rst-class:: classref-enumeration -enum **SpaceParameter**: +enum **SpaceParameter**: :ref:`🔗<enum_PhysicsServer3D_SpaceParameter>` .. _class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS: @@ -1580,7 +1764,7 @@ Constant to set/get the number of solver iterations for contacts and constraints .. rst-class:: classref-enumeration -enum **BodyAxis**: +enum **BodyAxis**: :ref:`🔗<enum_PhysicsServer3D_BodyAxis>` .. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_X: @@ -1588,6 +1772,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_LINEAR_X** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Y: @@ -1596,6 +1784,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_LINEAR_Y** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_BODY_AXIS_LINEAR_Z: @@ -1604,6 +1796,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_LINEAR_Z** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_X: @@ -1612,6 +1808,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_ANGULAR_X** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Y: @@ -1620,6 +1820,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_ANGULAR_Y** = ``16`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PhysicsServer3D_constant_BODY_AXIS_ANGULAR_Z: @@ -1628,6 +1832,10 @@ enum **BodyAxis**: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` **BODY_AXIS_ANGULAR_Z** = ``32`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -1643,7 +1851,7 @@ Method Descriptions .. rst-class:: classref-method -void **area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool<class_bool>` disabled=false **)** +|void| **area_add_shape**\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsServer3D_method_area_add_shape>` Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -1655,7 +1863,7 @@ Adds a shape to the area, along with a transform matrix. Shapes are usually refe .. rst-class:: classref-method -void **area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** +|void| **area_attach_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_attach_object_instance_id>` Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist in the node tree. @@ -1667,7 +1875,7 @@ Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist .. rst-class:: classref-method -void **area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** +|void| **area_clear_shapes**\ (\ area\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_clear_shapes>` Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. @@ -1679,9 +1887,11 @@ Removes all shapes from an area. It does not delete the shapes, so they can be r .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_create** **(** **)** +:ref:`RID<class_RID>` **area_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_area_create>` + +Creates a 3D area object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and ``monitorable`` set to ``false``. -Creates an :ref:`Area3D<class_Area3D>`. +Use :ref:`area_add_shape<class_PhysicsServer3D_method_area_add_shape>` to add shapes to it, use :ref:`area_set_transform<class_PhysicsServer3D_method_area_set_transform>` to set its transform, and use :ref:`area_set_space<class_PhysicsServer3D_method_area_set_space>` to add the area to a space. If you want the area to be detectable use :ref:`area_set_monitorable<class_PhysicsServer3D_method_area_set_monitorable>`. .. rst-class:: classref-item-separator @@ -1691,7 +1901,7 @@ Creates an :ref:`Area3D<class_Area3D>`. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_collision_layer** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_collision_layer**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_collision_layer>` Returns the physics layer or layers an area belongs to. @@ -1703,7 +1913,7 @@ Returns the physics layer or layers an area belongs to. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_collision_mask** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_collision_mask**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_collision_mask>` Returns the physics layer or layers an area can contact with. @@ -1715,7 +1925,7 @@ Returns the physics layer or layers an area can contact with. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_object_instance_id** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_object_instance_id>` Gets the instance ID of the object the area is assigned to. @@ -1727,7 +1937,7 @@ Gets the instance ID of the object the area is assigned to. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **area_get_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param **)** |const| +:ref:`Variant<class_Variant>` **area_get_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_param>` Returns an area parameter value. A list of available parameters is on the :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` constants. @@ -1739,7 +1949,7 @@ Returns an area parameter value. A list of available parameters is on the :ref:` .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_get_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`RID<class_RID>` **area_get_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_shape>` Returns the :ref:`RID<class_RID>` of the nth shape of an area. @@ -1751,7 +1961,7 @@ Returns the :ref:`RID<class_RID>` of the nth shape of an area. .. rst-class:: classref-method -:ref:`int<class_int>` **area_get_shape_count** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`int<class_int>` **area_get_shape_count**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_shape_count>` Returns the number of shapes assigned to an area. @@ -1763,7 +1973,7 @@ Returns the number of shapes assigned to an area. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **area_get_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **area_get_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_shape_transform>` Returns the transform matrix of a shape within an area. @@ -1775,7 +1985,7 @@ Returns the transform matrix of a shape within an area. .. rst-class:: classref-method -:ref:`RID<class_RID>` **area_get_space** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`RID<class_RID>` **area_get_space**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_space>` Returns the space assigned to the area. @@ -1787,7 +1997,7 @@ Returns the space assigned to the area. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **area_get_transform** **(** :ref:`RID<class_RID>` area **)** |const| +:ref:`Transform3D<class_Transform3D>` **area_get_transform**\ (\ area\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_area_get_transform>` Returns the transform matrix for an area. @@ -1799,7 +2009,7 @@ Returns the transform matrix for an area. .. rst-class:: classref-method -void **area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** +|void| **area_remove_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_remove_shape>` Removes a shape from an area. It does not delete the shape, so it can be reassigned later. @@ -1811,7 +2021,7 @@ Removes a shape from an area. It does not delete the shape, so it can be reassig .. rst-class:: classref-method -void **area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** +|void| **area_set_area_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_area_monitor_callback>` Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: @@ -1835,7 +2045,7 @@ By counting (or keeping track of) the shapes that enter and exit, it can be dete .. rst-class:: classref-method -void **area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** +|void| **area_set_collision_layer**\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_collision_layer>` Assigns the area to one or many physics layers. @@ -1847,7 +2057,7 @@ Assigns the area to one or many physics layers. .. rst-class:: classref-method -void **area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** +|void| **area_set_collision_mask**\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_collision_mask>` Sets which physics layers the area will monitor. @@ -1859,7 +2069,7 @@ Sets which physics layers the area will monitor. .. rst-class:: classref-method -void **area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** +|void| **area_set_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_monitor_callback>` Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: @@ -1883,7 +2093,7 @@ By counting (or keeping track of) the shapes that enter and exit, it can be dete .. rst-class:: classref-method -void **area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** +|void| **area_set_monitorable**\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_monitorable>` .. container:: contribute @@ -1897,7 +2107,7 @@ void **area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class .. rst-class:: classref-method -void **area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** +|void| **area_set_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_param>` Sets the value for an area parameter. A list of available parameters is on the :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` constants. @@ -1909,7 +2119,7 @@ Sets the value for an area parameter. A list of available parameters is on the : .. rst-class:: classref-method -void **area_set_ray_pickable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)** +|void| **area_set_ray_pickable**\ (\ area\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_ray_pickable>` Sets object pickable with rays. @@ -1921,7 +2131,7 @@ Sets object pickable with rays. .. rst-class:: classref-method -void **area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** +|void| **area_set_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_shape>` Substitutes a given area shape by another. The old shape is selected by its index, the new one by its :ref:`RID<class_RID>`. @@ -1933,7 +2143,7 @@ Substitutes a given area shape by another. The old shape is selected by its inde .. rst-class:: classref-method -void **area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** +|void| **area_set_shape_disabled**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_shape_disabled>` .. container:: contribute @@ -1947,7 +2157,7 @@ void **area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<cla .. rst-class:: classref-method -void **area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **area_set_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_shape_transform>` Sets the transform matrix for an area shape. @@ -1959,7 +2169,7 @@ Sets the transform matrix for an area shape. .. rst-class:: classref-method -void **area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** +|void| **area_set_space**\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_space>` Assigns a space to the area. @@ -1971,7 +2181,7 @@ Assigns a space to the area. .. rst-class:: classref-method -void **area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **area_set_transform**\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_area_set_transform>` Sets the transform matrix for an area. @@ -1983,7 +2193,7 @@ Sets the transform matrix for an area. .. rst-class:: classref-method -void **body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** +|void| **body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_add_collision_exception>` Adds a body to the list of bodies exempt from collisions. @@ -1995,7 +2205,7 @@ Adds a body to the list of bodies exempt from collisions. .. rst-class:: classref-method -void **body_add_constant_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** +|void| **body_add_constant_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_add_constant_central_force>` Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``body_set_constant_force(body, Vector3(0, 0, 0))``. @@ -2009,7 +2219,7 @@ This is equivalent to using :ref:`body_add_constant_force<class_PhysicsServer3D_ .. rst-class:: classref-method -void **body_add_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **body_add_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsServer3D_method_body_add_constant_force>` Adds a constant positioned force to the body that keeps being applied over time until cleared with ``body_set_constant_force(body, Vector3(0, 0, 0))``. @@ -2023,7 +2233,7 @@ Adds a constant positioned force to the body that keeps being applied over time .. rst-class:: classref-method -void **body_add_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** +|void| **body_add_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_add_constant_torque>` Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``body_set_constant_torque(body, Vector3(0, 0, 0))``. @@ -2035,7 +2245,7 @@ Adds a constant rotational force without affecting position that keeps being app .. rst-class:: classref-method -void **body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`bool<class_bool>` disabled=false **)** +|void| **body_add_shape**\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), disabled\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PhysicsServer3D_method_body_add_shape>` Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -2047,7 +2257,7 @@ Adds a shape to the body, along with a transform matrix. Shapes are usually refe .. rst-class:: classref-method -void **body_apply_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** +|void| **body_apply_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_central_force>` Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. @@ -2061,7 +2271,7 @@ This is equivalent to using :ref:`body_apply_force<class_PhysicsServer3D_method_ .. rst-class:: classref-method -void **body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** +|void| **body_apply_central_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_central_impulse>` Applies a directional impulse without affecting rotation. @@ -2077,7 +2287,7 @@ This is equivalent to using :ref:`body_apply_impulse<class_PhysicsServer3D_metho .. rst-class:: classref-method -void **body_apply_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **body_apply_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_force>` Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. @@ -2091,7 +2301,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b .. rst-class:: classref-method -void **body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **body_apply_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_impulse>` Applies a positioned impulse to the body. @@ -2107,7 +2317,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **body_apply_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** +|void| **body_apply_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_torque>` Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. @@ -2119,7 +2329,7 @@ Applies a rotational force without affecting position. A force is time dependent .. rst-class:: classref-method -void **body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** +|void| **body_apply_torque_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_apply_torque_impulse>` Applies a rotational impulse to the body without affecting the position. @@ -2133,7 +2343,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** +|void| **body_attach_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_attach_object_instance_id>` Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist in the node tree. @@ -2145,7 +2355,7 @@ Assigns the area to a descendant of :ref:`Object<class_Object>`, so it can exist .. rst-class:: classref-method -void **body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** +|void| **body_clear_shapes**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_clear_shapes>` Removes all shapes from a body. @@ -2157,11 +2367,11 @@ Removes all shapes from a body. .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_create** **(** **)** +:ref:`RID<class_RID>` **body_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_body_create>` -.. container:: contribute +Creates a 3D body object in the physics server, and returns the :ref:`RID<class_RID>` that identifies it. The default settings for the created area include a collision layer and mask set to ``1``, and body mode set to :ref:`BODY_MODE_RIGID<class_PhysicsServer3D_constant_BODY_MODE_RIGID>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Use :ref:`body_add_shape<class_PhysicsServer3D_method_body_add_shape>` to add shapes to it, use :ref:`body_set_state<class_PhysicsServer3D_method_body_set_state>` to set its transform, and use :ref:`body_set_space<class_PhysicsServer3D_method_body_set_space>` to add the body to a space. .. rst-class:: classref-item-separator @@ -2171,7 +2381,7 @@ Removes all shapes from a body. .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_collision_layer>` Returns the physics layer or layers a body belongs to. @@ -2183,7 +2393,7 @@ Returns the physics layer or layers a body belongs to. .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_collision_mask>` Returns the physics layer or layers a body can collide with. @@ -2195,7 +2405,7 @@ Returns the physics layer or layers a body can collide with. .. rst-class:: classref-method -:ref:`float<class_float>` **body_get_collision_priority** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`float<class_float>` **body_get_collision_priority**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_collision_priority>` Returns the body's collision priority. @@ -2207,7 +2417,7 @@ Returns the body's collision priority. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **body_get_constant_force** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`Vector3<class_Vector3>` **body_get_constant_force**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_constant_force>` Returns the body's total constant positional forces applied during each physics update. @@ -2221,7 +2431,7 @@ See :ref:`body_add_constant_force<class_PhysicsServer3D_method_body_add_constant .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **body_get_constant_torque** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`Vector3<class_Vector3>` **body_get_constant_torque**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_constant_torque>` Returns the body's total constant rotational forces applied during each physics update. @@ -2235,7 +2445,7 @@ See :ref:`body_add_constant_torque<class_PhysicsServer3D_method_body_add_constan .. rst-class:: classref-method -:ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` **body_get_direct_state** **(** :ref:`RID<class_RID>` body **)** +:ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` **body_get_direct_state**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_get_direct_state>` Returns the :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` of the body. Returns ``null`` if the body is destroyed or removed from the physics space. @@ -2247,7 +2457,7 @@ Returns the :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` of t .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_max_contacts_reported** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_max_contacts_reported>` Returns the maximum contacts that can be reported. See :ref:`body_set_max_contacts_reported<class_PhysicsServer3D_method_body_set_max_contacts_reported>`. @@ -2259,7 +2469,7 @@ Returns the maximum contacts that can be reported. See :ref:`body_set_max_contac .. rst-class:: classref-method -:ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` **body_get_mode** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` **body_get_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_mode>` Returns the body mode. @@ -2271,7 +2481,7 @@ Returns the body mode. .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_object_instance_id** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_object_instance_id>` Gets the instance ID of the object the area is assigned to. @@ -2283,7 +2493,7 @@ Gets the instance ID of the object the area is assigned to. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **body_get_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param **)** |const| +:ref:`Variant<class_Variant>` **body_get_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_param>` Returns the value of a body parameter. A list of available parameters is on the :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` constants. @@ -2295,7 +2505,7 @@ Returns the value of a body parameter. A list of available parameters is on the .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_get_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`RID<class_RID>` **body_get_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_shape>` Returns the :ref:`RID<class_RID>` of the nth shape of a body. @@ -2307,7 +2517,7 @@ Returns the :ref:`RID<class_RID>` of the nth shape of a body. .. rst-class:: classref-method -:ref:`int<class_int>` **body_get_shape_count** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`int<class_int>` **body_get_shape_count**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_shape_count>` Returns the number of shapes assigned to a body. @@ -2319,7 +2529,7 @@ Returns the number of shapes assigned to a body. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **body_get_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **body_get_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_shape_transform>` Returns the transform matrix of a body shape. @@ -2331,7 +2541,7 @@ Returns the transform matrix of a body shape. .. rst-class:: classref-method -:ref:`RID<class_RID>` **body_get_space** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`RID<class_RID>` **body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_space>` Returns the :ref:`RID<class_RID>` of the space assigned to a body. @@ -2343,7 +2553,7 @@ Returns the :ref:`RID<class_RID>` of the space assigned to a body. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |const| +:ref:`Variant<class_Variant>` **body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_get_state>` Returns a body state. @@ -2355,7 +2565,7 @@ Returns a body state. .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_is_axis_locked** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |const| +:ref:`bool<class_bool>` **body_is_axis_locked**\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_is_axis_locked>` .. container:: contribute @@ -2369,7 +2579,7 @@ Returns a body state. .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_is_continuous_collision_detection_enabled** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **body_is_continuous_collision_detection_enabled**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_is_continuous_collision_detection_enabled>` If ``true``, the continuous collision detection mode is enabled. @@ -2381,9 +2591,9 @@ If ``true``, the continuous collision detection mode is enabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_is_omitting_force_integration** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **body_is_omitting_force_integration**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_body_is_omitting_force_integration>` -Returns whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer3D_method_body_set_force_integration_callback>`). +Returns ``true`` if the body is omitting the standard force integration. See :ref:`body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>`. .. rst-class:: classref-item-separator @@ -2393,7 +2603,7 @@ Returns whether a body uses a callback function to calculate its own physics (se .. rst-class:: classref-method -void **body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** +|void| **body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_remove_collision_exception>` Removes a body from the list of bodies exempt from collisions. @@ -2407,7 +2617,7 @@ Continuous collision detection tries to predict where a moving body will collide .. rst-class:: classref-method -void **body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** +|void| **body_remove_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_remove_shape>` Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. @@ -2419,7 +2629,7 @@ Removes a shape from a body. The shape is not deleted, so it can be reused after .. rst-class:: classref-method -void **body_reset_mass_properties** **(** :ref:`RID<class_RID>` body **)** +|void| **body_reset_mass_properties**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_reset_mass_properties>` Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using :ref:`body_set_param<class_PhysicsServer3D_method_body_set_param>`. @@ -2431,7 +2641,7 @@ Restores the default inertia and center of mass based on shapes to cancel any cu .. rst-class:: classref-method -void **body_set_axis_lock** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** +|void| **body_set_axis_lock**\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_axis_lock>` .. container:: contribute @@ -2445,7 +2655,7 @@ void **body_set_axis_lock** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enu .. rst-class:: classref-method -void **body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)** +|void| **body_set_axis_velocity**\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_axis_velocity>` Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. @@ -2457,7 +2667,7 @@ Sets an axis velocity. The velocity in the given vector axis will be set as the .. rst-class:: classref-method -void **body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** +|void| **body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_collision_layer>` Sets the physics layer or layers a body belongs to. @@ -2469,7 +2679,7 @@ Sets the physics layer or layers a body belongs to. .. rst-class:: classref-method -void **body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** +|void| **body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_collision_mask>` Sets the physics layer or layers a body can collide with. @@ -2481,7 +2691,7 @@ Sets the physics layer or layers a body can collide with. .. rst-class:: classref-method -void **body_set_collision_priority** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** +|void| **body_set_collision_priority**\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_collision_priority>` Sets the body's collision priority. @@ -2493,7 +2703,7 @@ Sets the body's collision priority. .. rst-class:: classref-method -void **body_set_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** +|void| **body_set_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_constant_force>` Sets the body's total constant positional forces applied during each physics update. @@ -2507,7 +2717,7 @@ See :ref:`body_add_constant_force<class_PhysicsServer3D_method_body_add_constant .. rst-class:: classref-method -void **body_set_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** +|void| **body_set_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_constant_torque>` Sets the body's total constant rotational forces applied during each physics update. @@ -2521,7 +2731,7 @@ See :ref:`body_add_constant_torque<class_PhysicsServer3D_method_body_add_constan .. rst-class:: classref-method -void **body_set_enable_continuous_collision_detection** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** +|void| **body_set_enable_continuous_collision_detection**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_enable_continuous_collision_detection>` If ``true``, the continuous collision detection mode is enabled. @@ -2535,15 +2745,19 @@ Continuous collision detection tries to predict where a moving body will collide .. rst-class:: classref-method -void **body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** +|void| **body_set_force_integration_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_force_integration_callback>` + +Sets the body's custom force integration callback function to ``callable``. Use an empty :ref:`Callable<class_Callable>` (``Callable()``) to clear the custom callback. -Sets the function used to calculate physics for an object, if that object allows it (see :ref:`body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>`). +The function ``callable`` will be called every physics tick, before the standard force integration (see :ref:`body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>`). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. -The force integration function takes 2 arguments: +If ``userdata`` is not ``null``, the function ``callable`` must take the following two parameters: -\ ``state:`` :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` used to retrieve and modify the body's state. +1. ``state``: a :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`, used to retrieve and modify the body's state, -\ ``userdata:`` Optional user data, if it was passed when calling ``body_set_force_integration_callback``. +2. ``userdata``: a :ref:`Variant<class_Variant>`; its value will be the ``userdata`` passed into this method. + +If ``userdata`` is ``null``, then ``callable`` must take only the ``state`` parameter. .. rst-class:: classref-item-separator @@ -2553,7 +2767,7 @@ The force integration function takes 2 arguments: .. rst-class:: classref-method -void **body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** +|void| **body_set_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_max_contacts_reported>` Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. @@ -2565,7 +2779,7 @@ Sets the maximum contacts to report. Bodies can keep a log of the contacts with .. rst-class:: classref-method -void **body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` mode **)** +|void| **body_set_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_mode>` Sets the body mode, from one of the :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` constants. @@ -2577,9 +2791,11 @@ Sets the body mode, from one of the :ref:`BodyMode<enum_PhysicsServer3D_BodyMode .. rst-class:: classref-method -void **body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** +|void| **body_set_omit_force_integration**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_omit_force_integration>` + +Sets whether the body omits the standard force integration. If ``enable`` is ``true``, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, :ref:`body_set_force_integration_callback<class_PhysicsServer3D_method_body_set_force_integration_callback>` can be used to manually update the linear and angular velocity instead. -Sets whether a body uses a callback function to calculate its own physics (see :ref:`body_set_force_integration_callback<class_PhysicsServer3D_method_body_set_force_integration_callback>`). +This method is called when the property :ref:`RigidBody3D.custom_integrator<class_RigidBody3D_property_custom_integrator>` is set. .. rst-class:: classref-item-separator @@ -2589,7 +2805,7 @@ Sets whether a body uses a callback function to calculate its own physics (see : .. rst-class:: classref-method -void **body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** +|void| **body_set_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_param>` Sets a body parameter. A list of available parameters is on the :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` constants. @@ -2601,7 +2817,7 @@ Sets a body parameter. A list of available parameters is on the :ref:`BodyParame .. rst-class:: classref-method -void **body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** +|void| **body_set_ray_pickable**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_ray_pickable>` Sets the body pickable with rays if ``enable`` is set. @@ -2613,7 +2829,7 @@ Sets the body pickable with rays if ``enable`` is set. .. rst-class:: classref-method -void **body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** +|void| **body_set_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_shape>` Substitutes a given body shape by another. The old shape is selected by its index, the new one by its :ref:`RID<class_RID>`. @@ -2625,7 +2841,7 @@ Substitutes a given body shape by another. The old shape is selected by its inde .. rst-class:: classref-method -void **body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** +|void| **body_set_shape_disabled**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_shape_disabled>` .. container:: contribute @@ -2639,7 +2855,7 @@ void **body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<cla .. rst-class:: classref-method -void **body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **body_set_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_shape_transform>` Sets the transform matrix for a body shape. @@ -2651,7 +2867,7 @@ Sets the transform matrix for a body shape. .. rst-class:: classref-method -void **body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** +|void| **body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_space>` Assigns a space to the body (see :ref:`space_create<class_PhysicsServer3D_method_space_create>`). @@ -2663,7 +2879,7 @@ Assigns a space to the body (see :ref:`space_create<class_PhysicsServer3D_method .. rst-class:: classref-method -void **body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** +|void| **body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer3D_method_body_set_state>` Sets a body state (see :ref:`BodyState<enum_PhysicsServer3D_BodyState>` constants). @@ -2675,7 +2891,7 @@ Sets a body state (see :ref:`BodyState<enum_PhysicsServer3D_BodyState>` constant .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion** **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>` parameters, :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>` result=null **)** +:ref:`bool<class_bool>` **body_test_motion**\ (\ body\: :ref:`RID<class_RID>`, parameters\: :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>`, result\: :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>` = null\ ) :ref:`🔗<class_PhysicsServer3D_method_body_test_motion>` Returns ``true`` if a collision would result from moving along a motion vector from a given point in space. :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>` is passed to set motion parameters. :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>` can be passed to return additional information. @@ -2687,7 +2903,7 @@ Returns ``true`` if a collision would result from moving along a motion vector f .. rst-class:: classref-method -:ref:`RID<class_RID>` **box_shape_create** **(** **)** +:ref:`RID<class_RID>` **box_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_box_shape_create>` .. container:: contribute @@ -2701,7 +2917,7 @@ Returns ``true`` if a collision would result from moving along a motion vector f .. rst-class:: classref-method -:ref:`RID<class_RID>` **capsule_shape_create** **(** **)** +:ref:`RID<class_RID>` **capsule_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_capsule_shape_create>` .. container:: contribute @@ -2715,7 +2931,7 @@ Returns ``true`` if a collision would result from moving along a motion vector f .. rst-class:: classref-method -:ref:`RID<class_RID>` **concave_polygon_shape_create** **(** **)** +:ref:`RID<class_RID>` **concave_polygon_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_concave_polygon_shape_create>` .. container:: contribute @@ -2729,7 +2945,7 @@ Returns ``true`` if a collision would result from moving along a motion vector f .. rst-class:: classref-method -:ref:`float<class_float>` **cone_twist_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param **)** |const| +:ref:`float<class_float>` **cone_twist_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_cone_twist_joint_get_param>` Gets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` constants). @@ -2741,7 +2957,7 @@ Gets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsSer .. rst-class:: classref-method -void **cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)** +|void| **cone_twist_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_cone_twist_joint_set_param>` Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` constants). @@ -2753,7 +2969,7 @@ Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsSer .. rst-class:: classref-method -:ref:`RID<class_RID>` **convex_polygon_shape_create** **(** **)** +:ref:`RID<class_RID>` **convex_polygon_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_convex_polygon_shape_create>` .. container:: contribute @@ -2767,7 +2983,7 @@ Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsSer .. rst-class:: classref-method -:ref:`RID<class_RID>` **custom_shape_create** **(** **)** +:ref:`RID<class_RID>` **custom_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_custom_shape_create>` .. container:: contribute @@ -2781,7 +2997,7 @@ Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsSer .. rst-class:: classref-method -:ref:`RID<class_RID>` **cylinder_shape_create** **(** **)** +:ref:`RID<class_RID>` **cylinder_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_cylinder_shape_create>` .. container:: contribute @@ -2795,7 +3011,7 @@ Sets a cone_twist_joint parameter (see :ref:`ConeTwistJointParam<enum_PhysicsSer .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_free_rid>` Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID<class_RID>` passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. @@ -2807,9 +3023,9 @@ Destroys any of the objects created by PhysicsServer3D. If the :ref:`RID<class_R .. rst-class:: classref-method -:ref:`bool<class_bool>` **generic_6dof_joint_get_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag **)** |const| +:ref:`bool<class_bool>` **generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_generic_6dof_joint_get_flag>` -Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` constants). +Returns the value of a generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` for the list of available flags. .. rst-class:: classref-item-separator @@ -2819,9 +3035,9 @@ Gets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer .. rst-class:: classref-method -:ref:`float<class_float>` **generic_6dof_joint_get_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param **)** |const| +:ref:`float<class_float>` **generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_generic_6dof_joint_get_param>` -Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` constants). +Returns the value of a generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` for the list of available parameters. .. rst-class:: classref-item-separator @@ -2831,9 +3047,9 @@ Gets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_Physics .. rst-class:: classref-method -void **generic_6dof_joint_set_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)** +|void| **generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_generic_6dof_joint_set_flag>` -Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` constants). +Sets the value of a given generic 6DOF joint flag. See :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` for the list of available flags. .. rst-class:: classref-item-separator @@ -2843,9 +3059,9 @@ Sets a generic_6_DOF_joint flag (see :ref:`G6DOFJointAxisFlag<enum_PhysicsServer .. rst-class:: classref-method -void **generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)** +|void| **generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_generic_6dof_joint_set_param>` -Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` constants). +Sets the value of a given generic 6DOF joint parameter. See :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` for the list of available parameters. .. rst-class:: classref-item-separator @@ -2855,7 +3071,7 @@ Sets a generic_6_DOF_joint parameter (see :ref:`G6DOFJointAxisParam<enum_Physics .. rst-class:: classref-method -:ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>` process_info **)** +:ref:`int<class_int>` **get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>`\ ) :ref:`🔗<class_PhysicsServer3D_method_get_process_info>` Returns information about the current state of the 3D physics engine. See :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>` for a list of available states. @@ -2867,7 +3083,7 @@ Returns information about the current state of the 3D physics engine. See :ref:` .. rst-class:: classref-method -:ref:`RID<class_RID>` **heightmap_shape_create** **(** **)** +:ref:`RID<class_RID>` **heightmap_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_heightmap_shape_create>` .. container:: contribute @@ -2881,7 +3097,7 @@ Returns information about the current state of the 3D physics engine. See :ref:` .. rst-class:: classref-method -:ref:`bool<class_bool>` **hinge_joint_get_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag **)** |const| +:ref:`bool<class_bool>` **hinge_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_hinge_joint_get_flag>` Gets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` constants). @@ -2893,7 +3109,7 @@ Gets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJoin .. rst-class:: classref-method -:ref:`float<class_float>` **hinge_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param **)** |const| +:ref:`float<class_float>` **hinge_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_hinge_joint_get_param>` Gets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`). @@ -2905,7 +3121,7 @@ Gets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer3D_Hin .. rst-class:: classref-method -void **hinge_joint_set_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **hinge_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_hinge_joint_set_flag>` Sets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` constants). @@ -2917,7 +3133,7 @@ Sets a hinge_joint flag (see :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJoin .. rst-class:: classref-method -void **hinge_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param, :ref:`float<class_float>` value **)** +|void| **hinge_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_hinge_joint_set_param>` Sets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` constants). @@ -2929,7 +3145,7 @@ Sets a hinge_joint parameter (see :ref:`HingeJointParam<enum_PhysicsServer3D_Hin .. rst-class:: classref-method -void **joint_clear** **(** :ref:`RID<class_RID>` joint **)** +|void| **joint_clear**\ (\ joint\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_clear>` .. container:: contribute @@ -2943,7 +3159,7 @@ void **joint_clear** **(** :ref:`RID<class_RID>` joint **)** .. rst-class:: classref-method -:ref:`RID<class_RID>` **joint_create** **(** **)** +:ref:`RID<class_RID>` **joint_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_create>` .. container:: contribute @@ -2957,7 +3173,7 @@ void **joint_clear** **(** :ref:`RID<class_RID>` joint **)** .. rst-class:: classref-method -void **joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** +|void| **joint_disable_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_disable_collisions_between_bodies>` Sets whether the bodies attached to the :ref:`Joint3D<class_Joint3D>` will collide with each other. @@ -2969,7 +3185,7 @@ Sets whether the bodies attached to the :ref:`Joint3D<class_Joint3D>` will colli .. rst-class:: classref-method -:ref:`int<class_int>` **joint_get_solver_priority** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`int<class_int>` **joint_get_solver_priority**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_joint_get_solver_priority>` Gets the priority value of the Joint3D. @@ -2981,7 +3197,7 @@ Gets the priority value of the Joint3D. .. rst-class:: classref-method -:ref:`JointType<enum_PhysicsServer3D_JointType>` **joint_get_type** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`JointType<enum_PhysicsServer3D_JointType>` **joint_get_type**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_joint_get_type>` Returns the type of the Joint3D. @@ -2993,7 +3209,7 @@ Returns the type of the Joint3D. .. rst-class:: classref-method -:ref:`bool<class_bool>` **joint_is_disabled_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`bool<class_bool>` **joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_joint_is_disabled_collisions_between_bodies>` Returns whether the bodies attached to the :ref:`Joint3D<class_Joint3D>` will collide with each other. @@ -3005,7 +3221,7 @@ Returns whether the bodies attached to the :ref:`Joint3D<class_Joint3D>` will co .. rst-class:: classref-method -void **joint_make_cone_twist** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** +|void| **joint_make_cone_twist**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_make_cone_twist>` .. container:: contribute @@ -3019,11 +3235,9 @@ void **joint_make_cone_twist** **(** :ref:`RID<class_RID>` joint, :ref:`RID<clas .. rst-class:: classref-method -void **joint_make_generic_6dof** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** +|void| **joint_make_generic_6dof**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_make_generic_6dof>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Make the joint a generic six degrees of freedom (6DOF) joint. Use :ref:`generic_6dof_joint_set_flag<class_PhysicsServer3D_method_generic_6dof_joint_set_flag>` and :ref:`generic_6dof_joint_set_param<class_PhysicsServer3D_method_generic_6dof_joint_set_param>` to set the joint's flags and parameters respectively. .. rst-class:: classref-item-separator @@ -3033,7 +3247,7 @@ void **joint_make_generic_6dof** **(** :ref:`RID<class_RID>` joint, :ref:`RID<cl .. rst-class:: classref-method -void **joint_make_hinge** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` hinge_B **)** +|void| **joint_make_hinge**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, hinge_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, hinge_B\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_make_hinge>` .. container:: contribute @@ -3047,7 +3261,7 @@ void **joint_make_hinge** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID .. rst-class:: classref-method -void **joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)** +|void| **joint_make_pin**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_make_pin>` .. container:: contribute @@ -3061,7 +3275,7 @@ void **joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` .. rst-class:: classref-method -void **joint_make_slider** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** +|void| **joint_make_slider**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_make_slider>` .. container:: contribute @@ -3075,7 +3289,7 @@ void **joint_make_slider** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RI .. rst-class:: classref-method -void **joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)** +|void| **joint_set_solver_priority**\ (\ joint\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_joint_set_solver_priority>` Sets the priority value of the Joint3D. @@ -3087,7 +3301,7 @@ Sets the priority value of the Joint3D. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **pin_joint_get_local_a** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`Vector3<class_Vector3>` **pin_joint_get_local_a**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_pin_joint_get_local_a>` Returns position of the joint in the local space of body a of the joint. @@ -3099,7 +3313,7 @@ Returns position of the joint in the local space of body a of the joint. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **pin_joint_get_local_b** **(** :ref:`RID<class_RID>` joint **)** |const| +:ref:`Vector3<class_Vector3>` **pin_joint_get_local_b**\ (\ joint\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_pin_joint_get_local_b>` Returns position of the joint in the local space of body b of the joint. @@ -3111,7 +3325,7 @@ Returns position of the joint in the local space of body b of the joint. .. rst-class:: classref-method -:ref:`float<class_float>` **pin_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param **)** |const| +:ref:`float<class_float>` **pin_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_pin_joint_get_param>` Gets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` constants). @@ -3123,7 +3337,7 @@ Gets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer3D_PinJoin .. rst-class:: classref-method -void **pin_joint_set_local_a** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)** +|void| **pin_joint_set_local_a**\ (\ joint\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_pin_joint_set_local_a>` Sets position of the joint in the local space of body a of the joint. @@ -3135,7 +3349,7 @@ Sets position of the joint in the local space of body a of the joint. .. rst-class:: classref-method -void **pin_joint_set_local_b** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)** +|void| **pin_joint_set_local_b**\ (\ joint\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_pin_joint_set_local_b>` Sets position of the joint in the local space of body b of the joint. @@ -3147,7 +3361,7 @@ Sets position of the joint in the local space of body b of the joint. .. rst-class:: classref-method -void **pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param, :ref:`float<class_float>` value **)** +|void| **pin_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_pin_joint_set_param>` Sets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` constants). @@ -3159,7 +3373,7 @@ Sets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer3D_PinJoin .. rst-class:: classref-method -:ref:`RID<class_RID>` **separation_ray_shape_create** **(** **)** +:ref:`RID<class_RID>` **separation_ray_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_separation_ray_shape_create>` .. container:: contribute @@ -3173,7 +3387,7 @@ Sets a pin_joint parameter (see :ref:`PinJointParam<enum_PhysicsServer3D_PinJoin .. rst-class:: classref-method -void **set_active** **(** :ref:`bool<class_bool>` active **)** +|void| **set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_set_active>` Activates or deactivates the 3D physics engine. @@ -3185,7 +3399,7 @@ Activates or deactivates the 3D physics engine. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **shape_get_data** **(** :ref:`RID<class_RID>` shape **)** |const| +:ref:`Variant<class_Variant>` **shape_get_data**\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_shape_get_data>` Returns the shape data. @@ -3193,11 +3407,25 @@ Returns the shape data. ---- +.. _class_PhysicsServer3D_method_shape_get_margin: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **shape_get_margin**\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_shape_get_margin>` + +Returns the collision margin for the shape. + +\ **Note:** This is not used in Godot Physics, so will always return ``0``. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_shape_get_type: .. rst-class:: classref-method -:ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` **shape_get_type** **(** :ref:`RID<class_RID>` shape **)** |const| +:ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` **shape_get_type**\ (\ shape\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_shape_get_type>` Returns the type of shape (see :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` constants). @@ -3209,7 +3437,7 @@ Returns the type of shape (see :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` .. rst-class:: classref-method -void **shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** +|void| **shape_set_data**\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer3D_method_shape_set_data>` Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created :ref:`shape_get_type<class_PhysicsServer3D_method_shape_get_type>`. @@ -3217,11 +3445,25 @@ Sets the shape data that defines its shape and size. The data to be passed depen ---- +.. _class_PhysicsServer3D_method_shape_set_margin: + +.. rst-class:: classref-method + +|void| **shape_set_margin**\ (\ shape\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_shape_set_margin>` + +Sets the collision margin for the shape. + +\ **Note:** This is not used in Godot Physics. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_slider_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **slider_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param **)** |const| +:ref:`float<class_float>` **slider_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_slider_joint_get_param>` Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` constants). @@ -3233,7 +3475,7 @@ Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer3D_S .. rst-class:: classref-method -void **slider_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param, :ref:`float<class_float>` value **)** +|void| **slider_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_slider_joint_set_param>` Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` constants). @@ -3241,15 +3483,405 @@ Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer3D_S ---- +.. _class_PhysicsServer3D_method_soft_body_add_collision_exception: + +.. rst-class:: classref-method + +|void| **soft_body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_add_collision_exception>` + +Adds the given body to the list of bodies exempt from collisions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **soft_body_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_create>` + +Creates a new soft body and returns its internal :ref:`RID<class_RID>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer3D_method_soft_body_get_bounds: .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **soft_body_get_bounds** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`AABB<class_AABB>` **soft_body_get_bounds**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_bounds>` -.. container:: contribute +Returns the bounds of the given soft body in global coordinates. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_collision_layer: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **soft_body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_collision_layer>` + +Returns the physics layer or layers that the given soft body belongs to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_collision_mask: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **soft_body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_collision_mask>` + +Returns the physics layer or layers that the given soft body can collide with. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_damping_coefficient: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **soft_body_get_damping_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_damping_coefficient>` + +Returns the damping coefficient of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_drag_coefficient: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **soft_body_get_drag_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_drag_coefficient>` + +Returns the drag coefficient of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_linear_stiffness: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **soft_body_get_linear_stiffness**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_linear_stiffness>` + +Returns the linear stiffness of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_point_global_position: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **soft_body_get_point_global_position**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_point_global_position>` + +Returns the current position of the given soft body point in global coordinates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_pressure_coefficient: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **soft_body_get_pressure_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_pressure_coefficient>` + +Returns the pressure coefficient of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_simulation_precision: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **soft_body_get_simulation_precision**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_simulation_precision>` + +Returns the simulation precision of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_space: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **soft_body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_space>` + +Returns the :ref:`RID<class_RID>` of the space assigned to the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_state: + +.. rst-class:: classref-method + +:ref:`Variant<class_Variant>` **soft_body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_state>` + +Returns the given soft body state (see :ref:`BodyState<enum_PhysicsServer3D_BodyState>` constants). + +\ **Note:** Godot's default physics implementation does not support :ref:`BODY_STATE_LINEAR_VELOCITY<class_PhysicsServer3D_constant_BODY_STATE_LINEAR_VELOCITY>`, :ref:`BODY_STATE_ANGULAR_VELOCITY<class_PhysicsServer3D_constant_BODY_STATE_ANGULAR_VELOCITY>`, :ref:`BODY_STATE_SLEEPING<class_PhysicsServer3D_constant_BODY_STATE_SLEEPING>`, or :ref:`BODY_STATE_CAN_SLEEP<class_PhysicsServer3D_constant_BODY_STATE_CAN_SLEEP>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_get_total_mass: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **soft_body_get_total_mass**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_get_total_mass>` + +Returns the total mass assigned to the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_is_point_pinned: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **soft_body_is_point_pinned**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_soft_body_is_point_pinned>` + +Returns whether the given soft body point is pinned. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_move_point: + +.. rst-class:: classref-method + +|void| **soft_body_move_point**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, global_position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_move_point>` + +Moves the given soft body point to a position in global coordinates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_pin_point: + +.. rst-class:: classref-method + +|void| **soft_body_pin_point**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, pin\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_pin_point>` + +Pins or unpins the given soft body point based on the value of ``pin``. + +\ **Note:** Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using :ref:`soft_body_move_point<class_PhysicsServer3D_method_soft_body_move_point>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_remove_all_pinned_points: + +.. rst-class:: classref-method + +|void| **soft_body_remove_all_pinned_points**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_remove_all_pinned_points>` + +Unpins all points of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_remove_collision_exception: + +.. rst-class:: classref-method + +|void| **soft_body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_remove_collision_exception>` + +Removes the given body from the list of bodies exempt from collisions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_collision_layer: + +.. rst-class:: classref-method + +|void| **soft_body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_collision_layer>` + +Sets the physics layer or layers the given soft body belongs to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_collision_mask: + +.. rst-class:: classref-method + +|void| **soft_body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_collision_mask>` + +Sets the physics layer or layers the given soft body can collide with. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_damping_coefficient: + +.. rst-class:: classref-method + +|void| **soft_body_set_damping_coefficient**\ (\ body\: :ref:`RID<class_RID>`, damping_coefficient\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_damping_coefficient>` + +Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_drag_coefficient: + +.. rst-class:: classref-method + +|void| **soft_body_set_drag_coefficient**\ (\ body\: :ref:`RID<class_RID>`, drag_coefficient\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_drag_coefficient>` + +Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance. + +\ **Note:** This value is currently unused by Godot's default physics implementation. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_linear_stiffness: + +.. rst-class:: classref-method + +|void| **soft_body_set_linear_stiffness**\ (\ body\: :ref:`RID<class_RID>`, stiffness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_linear_stiffness>` + +Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between ``0.0`` and ``1.0`` (inclusive). + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_mesh: + +.. rst-class:: classref-method + +|void| **soft_body_set_mesh**\ (\ body\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_mesh>` + +Sets the mesh of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_pressure_coefficient: + +.. rst-class:: classref-method + +|void| **soft_body_set_pressure_coefficient**\ (\ body\: :ref:`RID<class_RID>`, pressure_coefficient\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_pressure_coefficient>` + +Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_ray_pickable: + +.. rst-class:: classref-method + +|void| **soft_body_set_ray_pickable**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_ray_pickable>` + +Sets whether the given soft body will be pickable when using object picking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_simulation_precision: + +.. rst-class:: classref-method + +|void| **soft_body_set_simulation_precision**\ (\ body\: :ref:`RID<class_RID>`, simulation_precision\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_simulation_precision>` + +Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_space: + +.. rst-class:: classref-method + +|void| **soft_body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_space>` + +Assigns a space to the given soft body (see :ref:`space_create<class_PhysicsServer3D_method_space_create>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_state: + +.. rst-class:: classref-method + +|void| **soft_body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, variant\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_state>` + +Sets the given body state for the given body (see :ref:`BodyState<enum_PhysicsServer3D_BodyState>` constants). + +\ **Note:** Godot's default physics implementation does not support :ref:`BODY_STATE_LINEAR_VELOCITY<class_PhysicsServer3D_constant_BODY_STATE_LINEAR_VELOCITY>`, :ref:`BODY_STATE_ANGULAR_VELOCITY<class_PhysicsServer3D_constant_BODY_STATE_ANGULAR_VELOCITY>`, :ref:`BODY_STATE_SLEEPING<class_PhysicsServer3D_constant_BODY_STATE_SLEEPING>`, or :ref:`BODY_STATE_CAN_SLEEP<class_PhysicsServer3D_constant_BODY_STATE_CAN_SLEEP>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_total_mass: + +.. rst-class:: classref-method + +|void| **soft_body_set_total_mass**\ (\ body\: :ref:`RID<class_RID>`, total_mass\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_total_mass>` + +Sets the total mass for the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_set_transform: + +.. rst-class:: classref-method + +|void| **soft_body_set_transform**\ (\ body\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_set_transform>` + +Sets the global transform of the given soft body. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3D_method_soft_body_update_rendering_server: + +.. rst-class:: classref-method + +|void| **soft_body_update_rendering_server**\ (\ body\: :ref:`RID<class_RID>`, rendering_server_handler\: :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`\ ) :ref:`🔗<class_PhysicsServer3D_method_soft_body_update_rendering_server>` + +Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the ``rendering_server_handler`` interface. .. rst-class:: classref-item-separator @@ -3259,7 +3891,7 @@ Gets a slider_joint parameter (see :ref:`SliderJointParam<enum_PhysicsServer3D_S .. rst-class:: classref-method -:ref:`RID<class_RID>` **space_create** **(** **)** +:ref:`RID<class_RID>` **space_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_space_create>` Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with :ref:`area_set_space<class_PhysicsServer3D_method_area_set_space>`, or to a body with :ref:`body_set_space<class_PhysicsServer3D_method_body_set_space>`. @@ -3271,7 +3903,7 @@ Creates a space. A space is a collection of parameters for the physics engine th .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **space_get_direct_state** **(** :ref:`RID<class_RID>` space **)** +:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **space_get_direct_state**\ (\ space\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_PhysicsServer3D_method_space_get_direct_state>` Returns the state of a space, a :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>`. This object can be used to make collision/intersection queries. @@ -3283,7 +3915,7 @@ Returns the state of a space, a :ref:`PhysicsDirectSpaceState3D<class_PhysicsDir .. rst-class:: classref-method -:ref:`float<class_float>` **space_get_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param **)** |const| +:ref:`float<class_float>` **space_get_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_space_get_param>` Returns the value of a space parameter. @@ -3295,7 +3927,7 @@ Returns the value of a space parameter. .. rst-class:: classref-method -:ref:`bool<class_bool>` **space_is_active** **(** :ref:`RID<class_RID>` space **)** |const| +:ref:`bool<class_bool>` **space_is_active**\ (\ space\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3D_method_space_is_active>` Returns whether the space is active. @@ -3307,7 +3939,7 @@ Returns whether the space is active. .. rst-class:: classref-method -void **space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** +|void| **space_set_active**\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PhysicsServer3D_method_space_set_active>` Marks a space as active. It will not have an effect, unless it is assigned to an area or body. @@ -3319,7 +3951,7 @@ Marks a space as active. It will not have an effect, unless it is assigned to an .. rst-class:: classref-method -void **space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param, :ref:`float<class_float>` value **)** +|void| **space_set_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PhysicsServer3D_method_space_set_param>` Sets the value for a space parameter. A list of available parameters is on the :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` constants. @@ -3331,7 +3963,7 @@ Sets the value for a space parameter. A list of available parameters is on the : .. rst-class:: classref-method -:ref:`RID<class_RID>` **sphere_shape_create** **(** **)** +:ref:`RID<class_RID>` **sphere_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_sphere_shape_create>` .. container:: contribute @@ -3345,7 +3977,7 @@ Sets the value for a space parameter. A list of available parameters is on the : .. rst-class:: classref-method -:ref:`RID<class_RID>` **world_boundary_shape_create** **(** **)** +:ref:`RID<class_RID>` **world_boundary_shape_create**\ (\ ) :ref:`🔗<class_PhysicsServer3D_method_world_boundary_shape_create>` .. container:: contribute @@ -3358,3 +3990,4 @@ Sets the value for a space parameter. A list of available parameters is on the : .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver3dextension.rst b/classes/class_physicsserver3dextension.rst index 7327a8a70f0..91e6c462e0b 100644 --- a/classes/class_physicsserver3dextension.rst +++ b/classes/class_physicsserver3dextension.rst @@ -31,387 +31,387 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape<class_PhysicsServer3DExtension_method__area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id<class_PhysicsServer3DExtension_method__area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes<class_PhysicsServer3DExtension_method__area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_create<class_PhysicsServer3DExtension_method__area_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_collision_layer<class_PhysicsServer3DExtension_method__area_get_collision_layer>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_collision_mask<class_PhysicsServer3DExtension_method__area_get_collision_mask>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_object_instance_id<class_PhysicsServer3DExtension_method__area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_area_get_param<class_PhysicsServer3DExtension_method__area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_get_shape<class_PhysicsServer3DExtension_method__area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_area_get_shape_count<class_PhysicsServer3DExtension_method__area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_area_get_shape_transform<class_PhysicsServer3DExtension_method__area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_area_get_space<class_PhysicsServer3DExtension_method__area_get_space>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_area_get_transform<class_PhysicsServer3DExtension_method__area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape<class_PhysicsServer3DExtension_method__area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback<class_PhysicsServer3DExtension_method__area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer<class_PhysicsServer3DExtension_method__area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask<class_PhysicsServer3DExtension_method__area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback<class_PhysicsServer3DExtension_method__area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable<class_PhysicsServer3DExtension_method__area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param<class_PhysicsServer3DExtension_method__area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_ray_pickable<class_PhysicsServer3DExtension_method__area_set_ray_pickable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape<class_PhysicsServer3DExtension_method__area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled<class_PhysicsServer3DExtension_method__area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform<class_PhysicsServer3DExtension_method__area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space<class_PhysicsServer3DExtension_method__area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform<class_PhysicsServer3DExtension_method__area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception<class_PhysicsServer3DExtension_method__body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force<class_PhysicsServer3DExtension_method__body_add_constant_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force<class_PhysicsServer3DExtension_method__body_add_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque<class_PhysicsServer3DExtension_method__body_add_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape<class_PhysicsServer3DExtension_method__body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force<class_PhysicsServer3DExtension_method__body_apply_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse<class_PhysicsServer3DExtension_method__body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force<class_PhysicsServer3DExtension_method__body_apply_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse<class_PhysicsServer3DExtension_method__body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque<class_PhysicsServer3DExtension_method__body_apply_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse<class_PhysicsServer3DExtension_method__body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id<class_PhysicsServer3DExtension_method__body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes<class_PhysicsServer3DExtension_method__body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_create<class_PhysicsServer3DExtension_method__body_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`_body_get_collision_exceptions<class_PhysicsServer3DExtension_method__body_get_collision_exceptions>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_collision_layer<class_PhysicsServer3DExtension_method__body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_collision_mask<class_PhysicsServer3DExtension_method__body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_body_get_collision_priority<class_PhysicsServer3DExtension_method__body_get_collision_priority>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_body_get_constant_force<class_PhysicsServer3DExtension_method__body_get_constant_force>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_body_get_constant_torque<class_PhysicsServer3DExtension_method__body_get_constant_torque>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_body_get_contacts_reported_depth_threshold<class_PhysicsServer3DExtension_method__body_get_contacts_reported_depth_threshold>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` | :ref:`_body_get_direct_state<class_PhysicsServer3DExtension_method__body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_max_contacts_reported<class_PhysicsServer3DExtension_method__body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` | :ref:`_body_get_mode<class_PhysicsServer3DExtension_method__body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_object_instance_id<class_PhysicsServer3DExtension_method__body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_body_get_param<class_PhysicsServer3DExtension_method__body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_get_shape<class_PhysicsServer3DExtension_method__body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_shape_count<class_PhysicsServer3DExtension_method__body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`_body_get_shape_transform<class_PhysicsServer3DExtension_method__body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_body_get_space<class_PhysicsServer3DExtension_method__body_get_space>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_body_get_state<class_PhysicsServer3DExtension_method__body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_body_get_user_flags<class_PhysicsServer3DExtension_method__body_get_user_flags>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_is_axis_locked<class_PhysicsServer3DExtension_method__body_is_axis_locked>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_is_continuous_collision_detection_enabled<class_PhysicsServer3DExtension_method__body_is_continuous_collision_detection_enabled>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_is_omitting_force_integration<class_PhysicsServer3DExtension_method__body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception<class_PhysicsServer3DExtension_method__body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape<class_PhysicsServer3DExtension_method__body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties<class_PhysicsServer3DExtension_method__body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_lock<class_PhysicsServer3DExtension_method__body_set_axis_lock>` **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity<class_PhysicsServer3DExtension_method__body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer<class_PhysicsServer3DExtension_method__body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask<class_PhysicsServer3DExtension_method__body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority<class_PhysicsServer3DExtension_method__body_set_collision_priority>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force<class_PhysicsServer3DExtension_method__body_set_constant_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque<class_PhysicsServer3DExtension_method__body_set_constant_torque>` **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold<class_PhysicsServer3DExtension_method__body_set_contacts_reported_depth_threshold>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` threshold **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_enable_continuous_collision_detection<class_PhysicsServer3DExtension_method__body_set_enable_continuous_collision_detection>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback<class_PhysicsServer3DExtension_method__body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported<class_PhysicsServer3DExtension_method__body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode<class_PhysicsServer3DExtension_method__body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` mode **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration<class_PhysicsServer3DExtension_method__body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param<class_PhysicsServer3DExtension_method__body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_ray_pickable<class_PhysicsServer3DExtension_method__body_set_ray_pickable>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape<class_PhysicsServer3DExtension_method__body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled<class_PhysicsServer3DExtension_method__body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform<class_PhysicsServer3DExtension_method__body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space<class_PhysicsServer3DExtension_method__body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state<class_PhysicsServer3DExtension_method__body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback<class_PhysicsServer3DExtension_method__body_set_state_sync_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_user_flags<class_PhysicsServer3DExtension_method__body_set_user_flags>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` flags **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_body_test_motion<class_PhysicsServer3DExtension_method__body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`Transform3D<class_Transform3D>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` max_collisions, :ref:`bool<class_bool>` collide_separation_ray, :ref:`bool<class_bool>` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_box_shape_create<class_PhysicsServer3DExtension_method__box_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_capsule_shape_create<class_PhysicsServer3DExtension_method__capsule_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_concave_polygon_shape_create<class_PhysicsServer3DExtension_method__concave_polygon_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_cone_twist_joint_get_param<class_PhysicsServer3DExtension_method__cone_twist_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cone_twist_joint_set_param<class_PhysicsServer3DExtension_method__cone_twist_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_convex_polygon_shape_create<class_PhysicsServer3DExtension_method__convex_polygon_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_custom_shape_create<class_PhysicsServer3DExtension_method__custom_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_cylinder_shape_create<class_PhysicsServer3DExtension_method__cylinder_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync<class_PhysicsServer3DExtension_method__end_sync>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish<class_PhysicsServer3DExtension_method__finish>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries<class_PhysicsServer3DExtension_method__flush_queries>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid<class_PhysicsServer3DExtension_method__free_rid>` **(** :ref:`RID<class_RID>` rid **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_generic_6dof_joint_get_flag<class_PhysicsServer3DExtension_method__generic_6dof_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_generic_6dof_joint_get_param<class_PhysicsServer3DExtension_method__generic_6dof_joint_get_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_flag<class_PhysicsServer3DExtension_method__generic_6dof_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_param<class_PhysicsServer3DExtension_method__generic_6dof_joint_set_param>` **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_process_info<class_PhysicsServer3DExtension_method__get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>` process_info **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_heightmap_shape_create<class_PhysicsServer3DExtension_method__heightmap_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_hinge_joint_get_flag<class_PhysicsServer3DExtension_method__hinge_joint_get_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_hinge_joint_get_param<class_PhysicsServer3DExtension_method__hinge_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_flag<class_PhysicsServer3DExtension_method__hinge_joint_set_flag>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_param<class_PhysicsServer3DExtension_method__hinge_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init<class_PhysicsServer3DExtension_method__init>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_flushing_queries<class_PhysicsServer3DExtension_method__is_flushing_queries>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear<class_PhysicsServer3DExtension_method__joint_clear>` **(** :ref:`RID<class_RID>` joint **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_joint_create<class_PhysicsServer3DExtension_method__joint_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies<class_PhysicsServer3DExtension_method__joint_disable_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_joint_get_solver_priority<class_PhysicsServer3DExtension_method__joint_get_solver_priority>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType<enum_PhysicsServer3D_JointType>` | :ref:`_joint_get_type<class_PhysicsServer3DExtension_method__joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_joint_is_disabled_collisions_between_bodies<class_PhysicsServer3DExtension_method__joint_is_disabled_collisions_between_bodies>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_cone_twist<class_PhysicsServer3DExtension_method__joint_make_cone_twist>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_generic_6dof<class_PhysicsServer3DExtension_method__joint_make_generic_6dof>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge<class_PhysicsServer3DExtension_method__joint_make_hinge>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` hinge_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge_simple<class_PhysicsServer3DExtension_method__joint_make_hinge_simple>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` pivot_A, :ref:`Vector3<class_Vector3>` axis_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` pivot_B, :ref:`Vector3<class_Vector3>` axis_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin<class_PhysicsServer3DExtension_method__joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_slider<class_PhysicsServer3DExtension_method__joint_make_slider>` **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_solver_priority<class_PhysicsServer3DExtension_method__joint_set_solver_priority>` **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_pin_joint_get_local_a<class_PhysicsServer3DExtension_method__pin_joint_get_local_a>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_pin_joint_get_local_b<class_PhysicsServer3DExtension_method__pin_joint_get_local_b>` **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_pin_joint_get_param<class_PhysicsServer3DExtension_method__pin_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_a<class_PhysicsServer3DExtension_method__pin_joint_set_local_a>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_b<class_PhysicsServer3DExtension_method__pin_joint_set_local_b>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param<class_PhysicsServer3DExtension_method__pin_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_separation_ray_shape_create<class_PhysicsServer3DExtension_method__separation_ray_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active<class_PhysicsServer3DExtension_method__set_active>` **(** :ref:`bool<class_bool>` active **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shape_get_custom_solver_bias<class_PhysicsServer3DExtension_method__shape_get_custom_solver_bias>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_shape_get_data<class_PhysicsServer3DExtension_method__shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shape_get_margin<class_PhysicsServer3DExtension_method__shape_get_margin>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` | :ref:`_shape_get_type<class_PhysicsServer3DExtension_method__shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias<class_PhysicsServer3DExtension_method__shape_set_custom_solver_bias>` **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` bias **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data<class_PhysicsServer3DExtension_method__shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_margin<class_PhysicsServer3DExtension_method__shape_set_margin>` **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` margin **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_slider_joint_get_param<class_PhysicsServer3DExtension_method__slider_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_slider_joint_set_param<class_PhysicsServer3DExtension_method__slider_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_add_collision_exception<class_PhysicsServer3DExtension_method__soft_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` body_b **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_soft_body_create<class_PhysicsServer3DExtension_method__soft_body_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`_soft_body_get_bounds<class_PhysicsServer3DExtension_method__soft_body_get_bounds>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`_soft_body_get_collision_exceptions<class_PhysicsServer3DExtension_method__soft_body_get_collision_exceptions>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_soft_body_get_collision_layer<class_PhysicsServer3DExtension_method__soft_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_soft_body_get_collision_mask<class_PhysicsServer3DExtension_method__soft_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_soft_body_get_damping_coefficient<class_PhysicsServer3DExtension_method__soft_body_get_damping_coefficient>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_soft_body_get_drag_coefficient<class_PhysicsServer3DExtension_method__soft_body_get_drag_coefficient>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_soft_body_get_linear_stiffness<class_PhysicsServer3DExtension_method__soft_body_get_linear_stiffness>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`_soft_body_get_point_global_position<class_PhysicsServer3DExtension_method__soft_body_get_point_global_position>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_soft_body_get_pressure_coefficient<class_PhysicsServer3DExtension_method__soft_body_get_pressure_coefficient>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_soft_body_get_simulation_precision<class_PhysicsServer3DExtension_method__soft_body_get_simulation_precision>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_soft_body_get_space<class_PhysicsServer3DExtension_method__soft_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_soft_body_get_state<class_PhysicsServer3DExtension_method__soft_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_soft_body_get_total_mass<class_PhysicsServer3DExtension_method__soft_body_get_total_mass>` **(** :ref:`RID<class_RID>` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_soft_body_is_point_pinned<class_PhysicsServer3DExtension_method__soft_body_is_point_pinned>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_move_point<class_PhysicsServer3DExtension_method__soft_body_move_point>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index, :ref:`Vector3<class_Vector3>` global_position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_pin_point<class_PhysicsServer3DExtension_method__soft_body_pin_point>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index, :ref:`bool<class_bool>` pin **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_all_pinned_points<class_PhysicsServer3DExtension_method__soft_body_remove_all_pinned_points>` **(** :ref:`RID<class_RID>` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_collision_exception<class_PhysicsServer3DExtension_method__soft_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` body_b **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_layer<class_PhysicsServer3DExtension_method__soft_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_mask<class_PhysicsServer3DExtension_method__soft_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_damping_coefficient<class_PhysicsServer3DExtension_method__soft_body_set_damping_coefficient>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` damping_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_drag_coefficient<class_PhysicsServer3DExtension_method__soft_body_set_drag_coefficient>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` drag_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_linear_stiffness<class_PhysicsServer3DExtension_method__soft_body_set_linear_stiffness>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` linear_stiffness **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_mesh<class_PhysicsServer3DExtension_method__soft_body_set_mesh>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` mesh **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_pressure_coefficient<class_PhysicsServer3DExtension_method__soft_body_set_pressure_coefficient>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` pressure_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_ray_pickable<class_PhysicsServer3DExtension_method__soft_body_set_ray_pickable>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_simulation_precision<class_PhysicsServer3DExtension_method__soft_body_set_simulation_precision>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` simulation_precision **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_space<class_PhysicsServer3DExtension_method__soft_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_state<class_PhysicsServer3DExtension_method__soft_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` variant **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_total_mass<class_PhysicsServer3DExtension_method__soft_body_set_total_mass>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` total_mass **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_transform<class_PhysicsServer3DExtension_method__soft_body_set_transform>` **(** :ref:`RID<class_RID>` body, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_update_rendering_server<class_PhysicsServer3DExtension_method__soft_body_update_rendering_server>` **(** :ref:`RID<class_RID>` body, :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>` rendering_server_handler **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_space_create<class_PhysicsServer3DExtension_method__space_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_space_get_contact_count<class_PhysicsServer3DExtension_method__space_get_contact_count>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`_space_get_contacts<class_PhysicsServer3DExtension_method__space_get_contacts>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`_space_get_direct_state<class_PhysicsServer3DExtension_method__space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_space_get_param<class_PhysicsServer3DExtension_method__space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_space_is_active<class_PhysicsServer3DExtension_method__space_is_active>` **(** :ref:`RID<class_RID>` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active<class_PhysicsServer3DExtension_method__space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts<class_PhysicsServer3DExtension_method__space_set_debug_contacts>` **(** :ref:`RID<class_RID>` space, :ref:`int<class_int>` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param<class_PhysicsServer3DExtension_method__space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_sphere_shape_create<class_PhysicsServer3DExtension_method__sphere_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step<class_PhysicsServer3DExtension_method__step>` **(** :ref:`float<class_float>` step **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync<class_PhysicsServer3DExtension_method__sync>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_world_boundary_shape_create<class_PhysicsServer3DExtension_method__world_boundary_shape_create>` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_body<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_body>` **(** :ref:`RID<class_RID>` body **)** |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_object<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_object>` **(** :ref:`int<class_int>` object **)** |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_add_shape<class_PhysicsServer3DExtension_private_method__area_add_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_attach_object_instance_id<class_PhysicsServer3DExtension_private_method__area_attach_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_clear_shapes<class_PhysicsServer3DExtension_private_method__area_clear_shapes>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_create<class_PhysicsServer3DExtension_private_method__area_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_collision_layer<class_PhysicsServer3DExtension_private_method__area_get_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_collision_mask<class_PhysicsServer3DExtension_private_method__area_get_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_object_instance_id<class_PhysicsServer3DExtension_private_method__area_get_object_instance_id>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_area_get_param<class_PhysicsServer3DExtension_private_method__area_get_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_get_shape<class_PhysicsServer3DExtension_private_method__area_get_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_area_get_shape_count<class_PhysicsServer3DExtension_private_method__area_get_shape_count>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_area_get_shape_transform<class_PhysicsServer3DExtension_private_method__area_get_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_area_get_space<class_PhysicsServer3DExtension_private_method__area_get_space>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_area_get_transform<class_PhysicsServer3DExtension_private_method__area_get_transform>`\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_remove_shape<class_PhysicsServer3DExtension_private_method__area_remove_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_area_monitor_callback<class_PhysicsServer3DExtension_private_method__area_set_area_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_collision_layer<class_PhysicsServer3DExtension_private_method__area_set_collision_layer>`\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_collision_mask<class_PhysicsServer3DExtension_private_method__area_set_collision_mask>`\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_monitor_callback<class_PhysicsServer3DExtension_private_method__area_set_monitor_callback>`\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_monitorable<class_PhysicsServer3DExtension_private_method__area_set_monitorable>`\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_param<class_PhysicsServer3DExtension_private_method__area_set_param>`\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_ray_pickable<class_PhysicsServer3DExtension_private_method__area_set_ray_pickable>`\ (\ area\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape<class_PhysicsServer3DExtension_private_method__area_set_shape>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape_disabled<class_PhysicsServer3DExtension_private_method__area_set_shape_disabled>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_shape_transform<class_PhysicsServer3DExtension_private_method__area_set_shape_transform>`\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_space<class_PhysicsServer3DExtension_private_method__area_set_space>`\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_area_set_transform<class_PhysicsServer3DExtension_private_method__area_set_transform>`\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_collision_exception<class_PhysicsServer3DExtension_private_method__body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_central_force<class_PhysicsServer3DExtension_private_method__body_add_constant_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_force<class_PhysicsServer3DExtension_private_method__body_add_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_constant_torque<class_PhysicsServer3DExtension_private_method__body_add_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_add_shape<class_PhysicsServer3DExtension_private_method__body_add_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_central_force<class_PhysicsServer3DExtension_private_method__body_apply_central_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_central_impulse<class_PhysicsServer3DExtension_private_method__body_apply_central_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_force<class_PhysicsServer3DExtension_private_method__body_apply_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_impulse<class_PhysicsServer3DExtension_private_method__body_apply_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_torque<class_PhysicsServer3DExtension_private_method__body_apply_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_apply_torque_impulse<class_PhysicsServer3DExtension_private_method__body_apply_torque_impulse>`\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_attach_object_instance_id<class_PhysicsServer3DExtension_private_method__body_attach_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_clear_shapes<class_PhysicsServer3DExtension_private_method__body_clear_shapes>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_create<class_PhysicsServer3DExtension_private_method__body_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`_body_get_collision_exceptions<class_PhysicsServer3DExtension_private_method__body_get_collision_exceptions>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_collision_layer<class_PhysicsServer3DExtension_private_method__body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_collision_mask<class_PhysicsServer3DExtension_private_method__body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_body_get_collision_priority<class_PhysicsServer3DExtension_private_method__body_get_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_body_get_constant_force<class_PhysicsServer3DExtension_private_method__body_get_constant_force>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_body_get_constant_torque<class_PhysicsServer3DExtension_private_method__body_get_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_body_get_contacts_reported_depth_threshold<class_PhysicsServer3DExtension_private_method__body_get_contacts_reported_depth_threshold>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` | :ref:`_body_get_direct_state<class_PhysicsServer3DExtension_private_method__body_get_direct_state>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_max_contacts_reported<class_PhysicsServer3DExtension_private_method__body_get_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` | :ref:`_body_get_mode<class_PhysicsServer3DExtension_private_method__body_get_mode>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_object_instance_id<class_PhysicsServer3DExtension_private_method__body_get_object_instance_id>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_body_get_param<class_PhysicsServer3DExtension_private_method__body_get_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_get_shape<class_PhysicsServer3DExtension_private_method__body_get_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_shape_count<class_PhysicsServer3DExtension_private_method__body_get_shape_count>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_body_get_shape_transform<class_PhysicsServer3DExtension_private_method__body_get_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_body_get_space<class_PhysicsServer3DExtension_private_method__body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_body_get_state<class_PhysicsServer3DExtension_private_method__body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_body_get_user_flags<class_PhysicsServer3DExtension_private_method__body_get_user_flags>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_is_axis_locked<class_PhysicsServer3DExtension_private_method__body_is_axis_locked>`\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_is_continuous_collision_detection_enabled<class_PhysicsServer3DExtension_private_method__body_is_continuous_collision_detection_enabled>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_is_omitting_force_integration<class_PhysicsServer3DExtension_private_method__body_is_omitting_force_integration>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_remove_collision_exception<class_PhysicsServer3DExtension_private_method__body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_remove_shape<class_PhysicsServer3DExtension_private_method__body_remove_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_reset_mass_properties<class_PhysicsServer3DExtension_private_method__body_reset_mass_properties>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_axis_lock<class_PhysicsServer3DExtension_private_method__body_set_axis_lock>`\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_axis_velocity<class_PhysicsServer3DExtension_private_method__body_set_axis_velocity>`\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_layer<class_PhysicsServer3DExtension_private_method__body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_mask<class_PhysicsServer3DExtension_private_method__body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_collision_priority<class_PhysicsServer3DExtension_private_method__body_set_collision_priority>`\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_constant_force<class_PhysicsServer3DExtension_private_method__body_set_constant_force>`\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_constant_torque<class_PhysicsServer3DExtension_private_method__body_set_constant_torque>`\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_contacts_reported_depth_threshold<class_PhysicsServer3DExtension_private_method__body_set_contacts_reported_depth_threshold>`\ (\ body\: :ref:`RID<class_RID>`, threshold\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_enable_continuous_collision_detection<class_PhysicsServer3DExtension_private_method__body_set_enable_continuous_collision_detection>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_force_integration_callback<class_PhysicsServer3DExtension_private_method__body_set_force_integration_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_max_contacts_reported<class_PhysicsServer3DExtension_private_method__body_set_max_contacts_reported>`\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_mode<class_PhysicsServer3DExtension_private_method__body_set_mode>`\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_omit_force_integration<class_PhysicsServer3DExtension_private_method__body_set_omit_force_integration>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_param<class_PhysicsServer3DExtension_private_method__body_set_param>`\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_ray_pickable<class_PhysicsServer3DExtension_private_method__body_set_ray_pickable>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape<class_PhysicsServer3DExtension_private_method__body_set_shape>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape_disabled<class_PhysicsServer3DExtension_private_method__body_set_shape_disabled>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_shape_transform<class_PhysicsServer3DExtension_private_method__body_set_shape_transform>`\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_space<class_PhysicsServer3DExtension_private_method__body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_state<class_PhysicsServer3DExtension_private_method__body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_state_sync_callback<class_PhysicsServer3DExtension_private_method__body_set_state_sync_callback>`\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_body_set_user_flags<class_PhysicsServer3DExtension_private_method__body_set_user_flags>`\ (\ body\: :ref:`RID<class_RID>`, flags\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_body_test_motion<class_PhysicsServer3DExtension_private_method__body_test_motion>`\ (\ body\: :ref:`RID<class_RID>`, from\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, max_collisions\: :ref:`int<class_int>`, collide_separation_ray\: :ref:`bool<class_bool>`, recovery_as_collision\: :ref:`bool<class_bool>`, result\: ``PhysicsServer3DExtensionMotionResult*``\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_box_shape_create<class_PhysicsServer3DExtension_private_method__box_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_capsule_shape_create<class_PhysicsServer3DExtension_private_method__capsule_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_concave_polygon_shape_create<class_PhysicsServer3DExtension_private_method__concave_polygon_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_cone_twist_joint_get_param<class_PhysicsServer3DExtension_private_method__cone_twist_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_cone_twist_joint_set_param<class_PhysicsServer3DExtension_private_method__cone_twist_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_convex_polygon_shape_create<class_PhysicsServer3DExtension_private_method__convex_polygon_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_custom_shape_create<class_PhysicsServer3DExtension_private_method__custom_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_cylinder_shape_create<class_PhysicsServer3DExtension_private_method__cylinder_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_end_sync<class_PhysicsServer3DExtension_private_method__end_sync>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_finish<class_PhysicsServer3DExtension_private_method__finish>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_flush_queries<class_PhysicsServer3DExtension_private_method__flush_queries>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_free_rid<class_PhysicsServer3DExtension_private_method__free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_generic_6dof_joint_get_flag<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_generic_6dof_joint_get_param<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_generic_6dof_joint_set_flag<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_generic_6dof_joint_set_param<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_process_info<class_PhysicsServer3DExtension_private_method__get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_heightmap_shape_create<class_PhysicsServer3DExtension_private_method__heightmap_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_hinge_joint_get_flag<class_PhysicsServer3DExtension_private_method__hinge_joint_get_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_hinge_joint_get_param<class_PhysicsServer3DExtension_private_method__hinge_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_hinge_joint_set_flag<class_PhysicsServer3DExtension_private_method__hinge_joint_set_flag>`\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_hinge_joint_set_param<class_PhysicsServer3DExtension_private_method__hinge_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_init<class_PhysicsServer3DExtension_private_method__init>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_flushing_queries<class_PhysicsServer3DExtension_private_method__is_flushing_queries>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_clear<class_PhysicsServer3DExtension_private_method__joint_clear>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_joint_create<class_PhysicsServer3DExtension_private_method__joint_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_disable_collisions_between_bodies<class_PhysicsServer3DExtension_private_method__joint_disable_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_joint_get_solver_priority<class_PhysicsServer3DExtension_private_method__joint_get_solver_priority>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType<enum_PhysicsServer3D_JointType>` | :ref:`_joint_get_type<class_PhysicsServer3DExtension_private_method__joint_get_type>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_joint_is_disabled_collisions_between_bodies<class_PhysicsServer3DExtension_private_method__joint_is_disabled_collisions_between_bodies>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_cone_twist<class_PhysicsServer3DExtension_private_method__joint_make_cone_twist>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_generic_6dof<class_PhysicsServer3DExtension_private_method__joint_make_generic_6dof>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_hinge<class_PhysicsServer3DExtension_private_method__joint_make_hinge>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, hinge_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, hinge_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_hinge_simple<class_PhysicsServer3DExtension_private_method__joint_make_hinge_simple>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, pivot_A\: :ref:`Vector3<class_Vector3>`, axis_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, pivot_B\: :ref:`Vector3<class_Vector3>`, axis_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_pin<class_PhysicsServer3DExtension_private_method__joint_make_pin>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_make_slider<class_PhysicsServer3DExtension_private_method__joint_make_slider>`\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_joint_set_solver_priority<class_PhysicsServer3DExtension_private_method__joint_set_solver_priority>`\ (\ joint\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_pin_joint_get_local_a<class_PhysicsServer3DExtension_private_method__pin_joint_get_local_a>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_pin_joint_get_local_b<class_PhysicsServer3DExtension_private_method__pin_joint_get_local_b>`\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_pin_joint_get_param<class_PhysicsServer3DExtension_private_method__pin_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pin_joint_set_local_a<class_PhysicsServer3DExtension_private_method__pin_joint_set_local_a>`\ (\ joint\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pin_joint_set_local_b<class_PhysicsServer3DExtension_private_method__pin_joint_set_local_b>`\ (\ joint\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pin_joint_set_param<class_PhysicsServer3DExtension_private_method__pin_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_separation_ray_shape_create<class_PhysicsServer3DExtension_private_method__separation_ray_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_active<class_PhysicsServer3DExtension_private_method__set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shape_get_custom_solver_bias<class_PhysicsServer3DExtension_private_method__shape_get_custom_solver_bias>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_shape_get_data<class_PhysicsServer3DExtension_private_method__shape_get_data>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shape_get_margin<class_PhysicsServer3DExtension_private_method__shape_get_margin>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` | :ref:`_shape_get_type<class_PhysicsServer3DExtension_private_method__shape_get_type>`\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shape_set_custom_solver_bias<class_PhysicsServer3DExtension_private_method__shape_set_custom_solver_bias>`\ (\ shape\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shape_set_data<class_PhysicsServer3DExtension_private_method__shape_set_data>`\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shape_set_margin<class_PhysicsServer3DExtension_private_method__shape_set_margin>`\ (\ shape\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_slider_joint_get_param<class_PhysicsServer3DExtension_private_method__slider_joint_get_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_slider_joint_set_param<class_PhysicsServer3DExtension_private_method__slider_joint_set_param>`\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_add_collision_exception<class_PhysicsServer3DExtension_private_method__soft_body_add_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_soft_body_create<class_PhysicsServer3DExtension_private_method__soft_body_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`_soft_body_get_bounds<class_PhysicsServer3DExtension_private_method__soft_body_get_bounds>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`_soft_body_get_collision_exceptions<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_exceptions>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_soft_body_get_collision_layer<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_soft_body_get_collision_mask<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_soft_body_get_damping_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_get_damping_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_soft_body_get_drag_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_get_drag_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_soft_body_get_linear_stiffness<class_PhysicsServer3DExtension_private_method__soft_body_get_linear_stiffness>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_soft_body_get_point_global_position<class_PhysicsServer3DExtension_private_method__soft_body_get_point_global_position>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_soft_body_get_pressure_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_get_pressure_coefficient>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_soft_body_get_simulation_precision<class_PhysicsServer3DExtension_private_method__soft_body_get_simulation_precision>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_soft_body_get_space<class_PhysicsServer3DExtension_private_method__soft_body_get_space>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_soft_body_get_state<class_PhysicsServer3DExtension_private_method__soft_body_get_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_soft_body_get_total_mass<class_PhysicsServer3DExtension_private_method__soft_body_get_total_mass>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_soft_body_is_point_pinned<class_PhysicsServer3DExtension_private_method__soft_body_is_point_pinned>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_move_point<class_PhysicsServer3DExtension_private_method__soft_body_move_point>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, global_position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_pin_point<class_PhysicsServer3DExtension_private_method__soft_body_pin_point>`\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, pin\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_remove_all_pinned_points<class_PhysicsServer3DExtension_private_method__soft_body_remove_all_pinned_points>`\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_remove_collision_exception<class_PhysicsServer3DExtension_private_method__soft_body_remove_collision_exception>`\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_collision_layer<class_PhysicsServer3DExtension_private_method__soft_body_set_collision_layer>`\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_collision_mask<class_PhysicsServer3DExtension_private_method__soft_body_set_collision_mask>`\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_damping_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_set_damping_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, damping_coefficient\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_drag_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_set_drag_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, drag_coefficient\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_linear_stiffness<class_PhysicsServer3DExtension_private_method__soft_body_set_linear_stiffness>`\ (\ body\: :ref:`RID<class_RID>`, linear_stiffness\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_mesh<class_PhysicsServer3DExtension_private_method__soft_body_set_mesh>`\ (\ body\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_pressure_coefficient<class_PhysicsServer3DExtension_private_method__soft_body_set_pressure_coefficient>`\ (\ body\: :ref:`RID<class_RID>`, pressure_coefficient\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_ray_pickable<class_PhysicsServer3DExtension_private_method__soft_body_set_ray_pickable>`\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_simulation_precision<class_PhysicsServer3DExtension_private_method__soft_body_set_simulation_precision>`\ (\ body\: :ref:`RID<class_RID>`, simulation_precision\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_space<class_PhysicsServer3DExtension_private_method__soft_body_set_space>`\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_state<class_PhysicsServer3DExtension_private_method__soft_body_set_state>`\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, variant\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_total_mass<class_PhysicsServer3DExtension_private_method__soft_body_set_total_mass>`\ (\ body\: :ref:`RID<class_RID>`, total_mass\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_set_transform<class_PhysicsServer3DExtension_private_method__soft_body_set_transform>`\ (\ body\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_soft_body_update_rendering_server<class_PhysicsServer3DExtension_private_method__soft_body_update_rendering_server>`\ (\ body\: :ref:`RID<class_RID>`, rendering_server_handler\: :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_space_create<class_PhysicsServer3DExtension_private_method__space_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_space_get_contact_count<class_PhysicsServer3DExtension_private_method__space_get_contact_count>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`_space_get_contacts<class_PhysicsServer3DExtension_private_method__space_get_contacts>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` | :ref:`_space_get_direct_state<class_PhysicsServer3DExtension_private_method__space_get_direct_state>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_space_get_param<class_PhysicsServer3DExtension_private_method__space_get_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_space_is_active<class_PhysicsServer3DExtension_private_method__space_is_active>`\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_active<class_PhysicsServer3DExtension_private_method__space_set_active>`\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_debug_contacts<class_PhysicsServer3DExtension_private_method__space_set_debug_contacts>`\ (\ space\: :ref:`RID<class_RID>`, max_contacts\: :ref:`int<class_int>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_space_set_param<class_PhysicsServer3DExtension_private_method__space_set_param>`\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_sphere_shape_create<class_PhysicsServer3DExtension_private_method__sphere_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_step<class_PhysicsServer3DExtension_private_method__step>`\ (\ step\: :ref:`float<class_float>`\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_sync<class_PhysicsServer3DExtension_private_method__sync>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_world_boundary_shape_create<class_PhysicsServer3DExtension_private_method__world_boundary_shape_create>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_body<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_body>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`body_test_motion_is_excluding_object<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_object>`\ (\ object\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -422,11 +422,11 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsServer3DExtension_method__area_add_shape: +.. _class_PhysicsServer3DExtension_private_method__area_add_shape: .. rst-class:: classref-method -void **_area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_area_add_shape**\ (\ area\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_add_shape>` .. container:: contribute @@ -436,11 +436,11 @@ void **_area_add_shape** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` ---- -.. _class_PhysicsServer3DExtension_method__area_attach_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__area_attach_object_instance_id: .. rst-class:: classref-method -void **_area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |virtual| +|void| **_area_attach_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_attach_object_instance_id>` .. container:: contribute @@ -450,11 +450,11 @@ void **_area_attach_object_instance_id** **(** :ref:`RID<class_RID>` area, :ref: ---- -.. _class_PhysicsServer3DExtension_method__area_clear_shapes: +.. _class_PhysicsServer3DExtension_private_method__area_clear_shapes: .. rst-class:: classref-method -void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| +|void| **_area_clear_shapes**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_clear_shapes>` .. container:: contribute @@ -464,11 +464,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_create: +.. _class_PhysicsServer3DExtension_private_method__area_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_area_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_create>` .. container:: contribute @@ -478,11 +478,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__area_get_collision_layer: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_collision_layer** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_collision_layer**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_collision_layer>` .. container:: contribute @@ -492,11 +492,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__area_get_collision_mask: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_collision_mask** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_collision_mask**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_collision_mask>` .. container:: contribute @@ -506,11 +506,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__area_get_object_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_object_instance_id** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_object_instance_id**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_object_instance_id>` .. container:: contribute @@ -520,11 +520,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_param: +.. _class_PhysicsServer3DExtension_private_method__area_get_param: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_area_get_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_area_get_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_param>` .. container:: contribute @@ -534,11 +534,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_get_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`RID<class_RID>` **_area_get_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_shape>` .. container:: contribute @@ -548,11 +548,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape_count: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_area_get_shape_count** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`int<class_int>` **_area_get_shape_count**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_shape_count>` .. container:: contribute @@ -562,11 +562,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_area_get_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_area_get_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_shape_transform>` .. container:: contribute @@ -576,11 +576,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_space: +.. _class_PhysicsServer3DExtension_private_method__area_get_space: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_area_get_space** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`RID<class_RID>` **_area_get_space**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_space>` .. container:: contribute @@ -590,11 +590,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_get_transform: +.. _class_PhysicsServer3DExtension_private_method__area_get_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_area_get_transform** **(** :ref:`RID<class_RID>` area **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_area_get_transform**\ (\ area\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_get_transform>` .. container:: contribute @@ -604,11 +604,11 @@ void **_area_clear_shapes** **(** :ref:`RID<class_RID>` area **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__area_remove_shape: +.. _class_PhysicsServer3DExtension_private_method__area_remove_shape: .. rst-class:: classref-method -void **_area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |virtual| +|void| **_area_remove_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_remove_shape>` .. container:: contribute @@ -618,11 +618,11 @@ void **_area_remove_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_in ---- -.. _class_PhysicsServer3DExtension_method__area_set_area_monitor_callback: +.. _class_PhysicsServer3DExtension_private_method__area_set_area_monitor_callback: .. rst-class:: classref-method -void **_area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| +|void| **_area_set_area_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_area_monitor_callback>` .. container:: contribute @@ -632,11 +632,11 @@ void **_area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref: ---- -.. _class_PhysicsServer3DExtension_method__area_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__area_set_collision_layer: .. rst-class:: classref-method -void **_area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |virtual| +|void| **_area_set_collision_layer**\ (\ area\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_collision_layer>` .. container:: contribute @@ -646,11 +646,11 @@ void **_area_set_collision_layer** **(** :ref:`RID<class_RID>` area, :ref:`int<c ---- -.. _class_PhysicsServer3DExtension_method__area_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__area_set_collision_mask: .. rst-class:: classref-method -void **_area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |virtual| +|void| **_area_set_collision_mask**\ (\ area\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_collision_mask>` .. container:: contribute @@ -660,11 +660,11 @@ void **_area_set_collision_mask** **(** :ref:`RID<class_RID>` area, :ref:`int<cl ---- -.. _class_PhysicsServer3DExtension_method__area_set_monitor_callback: +.. _class_PhysicsServer3DExtension_private_method__area_set_monitor_callback: .. rst-class:: classref-method -void **_area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |virtual| +|void| **_area_set_monitor_callback**\ (\ area\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_monitor_callback>` .. container:: contribute @@ -674,11 +674,11 @@ void **_area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Call ---- -.. _class_PhysicsServer3DExtension_method__area_set_monitorable: +.. _class_PhysicsServer3DExtension_private_method__area_set_monitorable: .. rst-class:: classref-method -void **_area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |virtual| +|void| **_area_set_monitorable**\ (\ area\: :ref:`RID<class_RID>`, monitorable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_monitorable>` .. container:: contribute @@ -688,11 +688,11 @@ void **_area_set_monitorable** **(** :ref:`RID<class_RID>` area, :ref:`bool<clas ---- -.. _class_PhysicsServer3DExtension_method__area_set_param: +.. _class_PhysicsServer3DExtension_private_method__area_set_param: .. rst-class:: classref-method -void **_area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_area_set_param**\ (\ area\: :ref:`RID<class_RID>`, param\: :ref:`AreaParameter<enum_PhysicsServer3D_AreaParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_param>` .. container:: contribute @@ -702,11 +702,11 @@ void **_area_set_param** **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<e ---- -.. _class_PhysicsServer3DExtension_method__area_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__area_set_ray_pickable: .. rst-class:: classref-method -void **_area_set_ray_pickable** **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_area_set_ray_pickable**\ (\ area\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_ray_pickable>` .. container:: contribute @@ -716,11 +716,11 @@ void **_area_set_ray_pickable** **(** :ref:`RID<class_RID>` area, :ref:`bool<cla ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape: .. rst-class:: classref-method -void **_area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| +|void| **_area_set_shape**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_shape>` .. container:: contribute @@ -730,11 +730,11 @@ void **_area_set_shape** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape_disabled: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape_disabled: .. rst-class:: classref-method -void **_area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_area_set_shape_disabled**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_shape_disabled>` .. container:: contribute @@ -744,11 +744,11 @@ void **_area_set_shape_disabled** **(** :ref:`RID<class_RID>` area, :ref:`int<cl ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape_transform: .. rst-class:: classref-method -void **_area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_area_set_shape_transform**\ (\ area\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_shape_transform>` .. container:: contribute @@ -758,11 +758,11 @@ void **_area_set_shape_transform** **(** :ref:`RID<class_RID>` area, :ref:`int<c ---- -.. _class_PhysicsServer3DExtension_method__area_set_space: +.. _class_PhysicsServer3DExtension_private_method__area_set_space: .. rst-class:: classref-method -void **_area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |virtual| +|void| **_area_set_space**\ (\ area\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_space>` .. container:: contribute @@ -772,11 +772,11 @@ void **_area_set_space** **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` ---- -.. _class_PhysicsServer3DExtension_method__area_set_transform: +.. _class_PhysicsServer3DExtension_private_method__area_set_transform: .. rst-class:: classref-method -void **_area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_area_set_transform**\ (\ area\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__area_set_transform>` .. container:: contribute @@ -786,11 +786,11 @@ void **_area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform3D ---- -.. _class_PhysicsServer3DExtension_method__body_add_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__body_add_collision_exception: .. rst-class:: classref-method -void **_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| +|void| **_body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_add_collision_exception>` .. container:: contribute @@ -800,11 +800,11 @@ void **_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`R ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_central_force: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_central_force: .. rst-class:: classref-method -void **_body_add_constant_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_body_add_constant_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_add_constant_central_force>` .. container:: contribute @@ -814,11 +814,11 @@ void **_body_add_constant_central_force** **(** :ref:`RID<class_RID>` body, :ref ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_force: .. rst-class:: classref-method -void **_body_add_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_body_add_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_add_constant_force>` .. container:: contribute @@ -828,11 +828,11 @@ void **_body_add_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_torque: .. rst-class:: classref-method -void **_body_add_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_body_add_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_add_constant_torque>` .. container:: contribute @@ -842,11 +842,11 @@ void **_body_add_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vecto ---- -.. _class_PhysicsServer3DExtension_method__body_add_shape: +.. _class_PhysicsServer3DExtension_private_method__body_add_shape: .. rst-class:: classref-method -void **_body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform3D<class_Transform3D>` transform, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_body_add_shape**\ (\ body\: :ref:`RID<class_RID>`, shape\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_add_shape>` .. container:: contribute @@ -856,11 +856,11 @@ void **_body_add_shape** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` ---- -.. _class_PhysicsServer3DExtension_method__body_apply_central_force: +.. _class_PhysicsServer3DExtension_private_method__body_apply_central_force: .. rst-class:: classref-method -void **_body_apply_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_body_apply_central_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_central_force>` .. container:: contribute @@ -870,11 +870,11 @@ void **_body_apply_central_force** **(** :ref:`RID<class_RID>` body, :ref:`Vecto ---- -.. _class_PhysicsServer3DExtension_method__body_apply_central_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_central_impulse: .. rst-class:: classref-method -void **_body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |virtual| +|void| **_body_apply_central_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_central_impulse>` .. container:: contribute @@ -884,11 +884,11 @@ void **_body_apply_central_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vec ---- -.. _class_PhysicsServer3DExtension_method__body_apply_force: +.. _class_PhysicsServer3DExtension_private_method__body_apply_force: .. rst-class:: classref-method -void **_body_apply_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_body_apply_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_force>` .. container:: contribute @@ -898,11 +898,11 @@ void **_body_apply_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class ---- -.. _class_PhysicsServer3DExtension_method__body_apply_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_impulse: .. rst-class:: classref-method -void **_body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position **)** |virtual| +|void| **_body_apply_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_impulse>` .. container:: contribute @@ -912,11 +912,11 @@ void **_body_apply_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<cla ---- -.. _class_PhysicsServer3DExtension_method__body_apply_torque: +.. _class_PhysicsServer3DExtension_private_method__body_apply_torque: .. rst-class:: classref-method -void **_body_apply_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_body_apply_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_torque>` .. container:: contribute @@ -926,11 +926,11 @@ void **_body_apply_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<clas ---- -.. _class_PhysicsServer3DExtension_method__body_apply_torque_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_torque_impulse: .. rst-class:: classref-method -void **_body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` impulse **)** |virtual| +|void| **_body_apply_torque_impulse**\ (\ body\: :ref:`RID<class_RID>`, impulse\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_apply_torque_impulse>` .. container:: contribute @@ -940,11 +940,11 @@ void **_body_apply_torque_impulse** **(** :ref:`RID<class_RID>` body, :ref:`Vect ---- -.. _class_PhysicsServer3DExtension_method__body_attach_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__body_attach_object_instance_id: .. rst-class:: classref-method -void **_body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |virtual| +|void| **_body_attach_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_attach_object_instance_id>` .. container:: contribute @@ -954,11 +954,11 @@ void **_body_attach_object_instance_id** **(** :ref:`RID<class_RID>` body, :ref: ---- -.. _class_PhysicsServer3DExtension_method__body_clear_shapes: +.. _class_PhysicsServer3DExtension_private_method__body_clear_shapes: .. rst-class:: classref-method -void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| +|void| **_body_clear_shapes**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_clear_shapes>` .. container:: contribute @@ -968,11 +968,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_create: +.. _class_PhysicsServer3DExtension_private_method__body_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_body_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_create>` .. container:: contribute @@ -982,11 +982,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_exceptions: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_exceptions: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **_body_get_collision_exceptions** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **_body_get_collision_exceptions**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_collision_exceptions>` .. container:: contribute @@ -996,11 +996,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_layer: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_collision_layer>` .. container:: contribute @@ -1010,11 +1010,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_mask: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_collision_mask>` .. container:: contribute @@ -1024,11 +1024,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_priority: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_priority: .. rst-class:: classref-method -:ref:`float<class_float>` **_body_get_collision_priority** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_body_get_collision_priority**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_collision_priority>` .. container:: contribute @@ -1038,11 +1038,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_get_constant_force: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_body_get_constant_force** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_body_get_constant_force**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_constant_force>` .. container:: contribute @@ -1052,11 +1052,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_get_constant_torque: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_body_get_constant_torque** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_body_get_constant_torque**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_constant_torque>` .. container:: contribute @@ -1066,11 +1066,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_contacts_reported_depth_threshold: +.. _class_PhysicsServer3DExtension_private_method__body_get_contacts_reported_depth_threshold: .. rst-class:: classref-method -:ref:`float<class_float>` **_body_get_contacts_reported_depth_threshold** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_body_get_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_contacts_reported_depth_threshold>` .. container:: contribute @@ -1080,11 +1080,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_direct_state: +.. _class_PhysicsServer3DExtension_private_method__body_get_direct_state: .. rst-class:: classref-method -:ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` **_body_get_direct_state** **(** :ref:`RID<class_RID>` body **)** |virtual| +:ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` **_body_get_direct_state**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_direct_state>` .. container:: contribute @@ -1094,11 +1094,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_max_contacts_reported: +.. _class_PhysicsServer3DExtension_private_method__body_get_max_contacts_reported: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_max_contacts_reported** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_max_contacts_reported>` .. container:: contribute @@ -1108,11 +1108,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_mode: +.. _class_PhysicsServer3DExtension_private_method__body_get_mode: .. rst-class:: classref-method -:ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` **_body_get_mode** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` **_body_get_mode**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_mode>` .. container:: contribute @@ -1122,11 +1122,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__body_get_object_instance_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_object_instance_id** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_object_instance_id**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_object_instance_id>` .. container:: contribute @@ -1136,11 +1136,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_param: +.. _class_PhysicsServer3DExtension_private_method__body_get_param: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_body_get_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_body_get_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_param>` .. container:: contribute @@ -1150,11 +1150,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_get_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`RID<class_RID>` **_body_get_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_shape>` .. container:: contribute @@ -1164,11 +1164,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape_count: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_shape_count** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_shape_count**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_shape_count>` .. container:: contribute @@ -1178,11 +1178,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape_transform: .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **_body_get_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| |const| +:ref:`Transform3D<class_Transform3D>` **_body_get_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_shape_transform>` .. container:: contribute @@ -1192,11 +1192,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_space: +.. _class_PhysicsServer3DExtension_private_method__body_get_space: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_body_get_space** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`RID<class_RID>` **_body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_space>` .. container:: contribute @@ -1206,11 +1206,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_state: +.. _class_PhysicsServer3DExtension_private_method__body_get_state: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_state>` .. container:: contribute @@ -1220,11 +1220,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_get_user_flags: +.. _class_PhysicsServer3DExtension_private_method__body_get_user_flags: .. rst-class:: classref-method -:ref:`int<class_int>` **_body_get_user_flags** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_body_get_user_flags**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_get_user_flags>` .. container:: contribute @@ -1234,11 +1234,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_is_axis_locked: +.. _class_PhysicsServer3DExtension_private_method__body_is_axis_locked: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_is_axis_locked** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis **)** |virtual| |const| +:ref:`bool<class_bool>` **_body_is_axis_locked**\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_is_axis_locked>` .. container:: contribute @@ -1248,11 +1248,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_is_continuous_collision_detection_enabled: +.. _class_PhysicsServer3DExtension_private_method__body_is_continuous_collision_detection_enabled: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_is_continuous_collision_detection_enabled** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`bool<class_bool>` **_body_is_continuous_collision_detection_enabled**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_is_continuous_collision_detection_enabled>` .. container:: contribute @@ -1262,11 +1262,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_is_omitting_force_integration: +.. _class_PhysicsServer3DExtension_private_method__body_is_omitting_force_integration: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_is_omitting_force_integration** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`bool<class_bool>` **_body_is_omitting_force_integration**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_is_omitting_force_integration>` .. container:: contribute @@ -1276,11 +1276,11 @@ void **_body_clear_shapes** **(** :ref:`RID<class_RID>` body **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__body_remove_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__body_remove_collision_exception: .. rst-class:: classref-method -void **_body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |virtual| +|void| **_body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, excepted_body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_remove_collision_exception>` .. container:: contribute @@ -1290,11 +1290,11 @@ void **_body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref ---- -.. _class_PhysicsServer3DExtension_method__body_remove_shape: +.. _class_PhysicsServer3DExtension_private_method__body_remove_shape: .. rst-class:: classref-method -void **_body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |virtual| +|void| **_body_remove_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_remove_shape>` .. container:: contribute @@ -1304,11 +1304,11 @@ void **_body_remove_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_in ---- -.. _class_PhysicsServer3DExtension_method__body_reset_mass_properties: +.. _class_PhysicsServer3DExtension_private_method__body_reset_mass_properties: .. rst-class:: classref-method -void **_body_reset_mass_properties** **(** :ref:`RID<class_RID>` body **)** |virtual| +|void| **_body_reset_mass_properties**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_reset_mass_properties>` .. container:: contribute @@ -1318,11 +1318,11 @@ void **_body_reset_mass_properties** **(** :ref:`RID<class_RID>` body **)** |vir ---- -.. _class_PhysicsServer3DExtension_method__body_set_axis_lock: +.. _class_PhysicsServer3DExtension_private_method__body_set_axis_lock: .. rst-class:: classref-method -void **_body_set_axis_lock** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>` axis, :ref:`bool<class_bool>` lock **)** |virtual| +|void| **_body_set_axis_lock**\ (\ body\: :ref:`RID<class_RID>`, axis\: :ref:`BodyAxis<enum_PhysicsServer3D_BodyAxis>`, lock\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_axis_lock>` .. container:: contribute @@ -1332,11 +1332,11 @@ void **_body_set_axis_lock** **(** :ref:`RID<class_RID>` body, :ref:`BodyAxis<en ---- -.. _class_PhysicsServer3DExtension_method__body_set_axis_velocity: +.. _class_PhysicsServer3DExtension_private_method__body_set_axis_velocity: .. rst-class:: classref-method -void **_body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` axis_velocity **)** |virtual| +|void| **_body_set_axis_velocity**\ (\ body\: :ref:`RID<class_RID>`, axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_axis_velocity>` .. container:: contribute @@ -1346,11 +1346,11 @@ void **_body_set_axis_velocity** **(** :ref:`RID<class_RID>` body, :ref:`Vector3 ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_layer: .. rst-class:: classref-method -void **_body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| +|void| **_body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_collision_layer>` .. container:: contribute @@ -1360,11 +1360,11 @@ void **_body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<c ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_mask: .. rst-class:: classref-method -void **_body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| +|void| **_body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_collision_mask>` .. container:: contribute @@ -1374,11 +1374,11 @@ void **_body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<cl ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_priority: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_priority: .. rst-class:: classref-method -void **_body_set_collision_priority** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` priority **)** |virtual| +|void| **_body_set_collision_priority**\ (\ body\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_collision_priority>` .. container:: contribute @@ -1388,11 +1388,11 @@ void **_body_set_collision_priority** **(** :ref:`RID<class_RID>` body, :ref:`fl ---- -.. _class_PhysicsServer3DExtension_method__body_set_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_set_constant_force: .. rst-class:: classref-method -void **_body_set_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` force **)** |virtual| +|void| **_body_set_constant_force**\ (\ body\: :ref:`RID<class_RID>`, force\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_constant_force>` .. container:: contribute @@ -1402,11 +1402,11 @@ void **_body_set_constant_force** **(** :ref:`RID<class_RID>` body, :ref:`Vector ---- -.. _class_PhysicsServer3DExtension_method__body_set_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_set_constant_torque: .. rst-class:: classref-method -void **_body_set_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vector3<class_Vector3>` torque **)** |virtual| +|void| **_body_set_constant_torque**\ (\ body\: :ref:`RID<class_RID>`, torque\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_constant_torque>` .. container:: contribute @@ -1416,11 +1416,11 @@ void **_body_set_constant_torque** **(** :ref:`RID<class_RID>` body, :ref:`Vecto ---- -.. _class_PhysicsServer3DExtension_method__body_set_contacts_reported_depth_threshold: +.. _class_PhysicsServer3DExtension_private_method__body_set_contacts_reported_depth_threshold: .. rst-class:: classref-method -void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` threshold **)** |virtual| +|void| **_body_set_contacts_reported_depth_threshold**\ (\ body\: :ref:`RID<class_RID>`, threshold\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_contacts_reported_depth_threshold>` .. container:: contribute @@ -1430,11 +1430,11 @@ void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID<class_RID>` ---- -.. _class_PhysicsServer3DExtension_method__body_set_enable_continuous_collision_detection: +.. _class_PhysicsServer3DExtension_private_method__body_set_enable_continuous_collision_detection: .. rst-class:: classref-method -void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_body_set_enable_continuous_collision_detection**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_enable_continuous_collision_detection>` .. container:: contribute @@ -1444,11 +1444,11 @@ void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID<class_R ---- -.. _class_PhysicsServer3DExtension_method__body_set_force_integration_callback: +.. _class_PhysicsServer3DExtension_private_method__body_set_force_integration_callback: .. rst-class:: classref-method -void **_body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata **)** |virtual| +|void| **_body_set_force_integration_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`, userdata\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_force_integration_callback>` .. container:: contribute @@ -1458,11 +1458,11 @@ void **_body_set_force_integration_callback** **(** :ref:`RID<class_RID>` body, ---- -.. _class_PhysicsServer3DExtension_method__body_set_max_contacts_reported: +.. _class_PhysicsServer3DExtension_private_method__body_set_max_contacts_reported: .. rst-class:: classref-method -void **_body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |virtual| +|void| **_body_set_max_contacts_reported**\ (\ body\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_max_contacts_reported>` .. container:: contribute @@ -1472,11 +1472,11 @@ void **_body_set_max_contacts_reported** **(** :ref:`RID<class_RID>` body, :ref: ---- -.. _class_PhysicsServer3DExtension_method__body_set_mode: +.. _class_PhysicsServer3DExtension_private_method__body_set_mode: .. rst-class:: classref-method -void **_body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>` mode **)** |virtual| +|void| **_body_set_mode**\ (\ body\: :ref:`RID<class_RID>`, mode\: :ref:`BodyMode<enum_PhysicsServer3D_BodyMode>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_mode>` .. container:: contribute @@ -1486,11 +1486,11 @@ void **_body_set_mode** **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_Ph ---- -.. _class_PhysicsServer3DExtension_method__body_set_omit_force_integration: +.. _class_PhysicsServer3DExtension_private_method__body_set_omit_force_integration: .. rst-class:: classref-method -void **_body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_body_set_omit_force_integration**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_omit_force_integration>` .. container:: contribute @@ -1500,11 +1500,11 @@ void **_body_set_omit_force_integration** **(** :ref:`RID<class_RID>` body, :ref ---- -.. _class_PhysicsServer3DExtension_method__body_set_param: +.. _class_PhysicsServer3DExtension_private_method__body_set_param: .. rst-class:: classref-method -void **_body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_body_set_param**\ (\ body\: :ref:`RID<class_RID>`, param\: :ref:`BodyParameter<enum_PhysicsServer3D_BodyParameter>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_param>` .. container:: contribute @@ -1514,11 +1514,11 @@ void **_body_set_param** **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<e ---- -.. _class_PhysicsServer3DExtension_method__body_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__body_set_ray_pickable: .. rst-class:: classref-method -void **_body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_body_set_ray_pickable**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_ray_pickable>` .. container:: contribute @@ -1528,11 +1528,11 @@ void **_body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<cla ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape: .. rst-class:: classref-method -void **_body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |virtual| +|void| **_body_set_shape**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, shape\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_shape>` .. container:: contribute @@ -1542,11 +1542,11 @@ void **_body_set_shape** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape_disabled: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape_disabled: .. rst-class:: classref-method -void **_body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |virtual| +|void| **_body_set_shape_disabled**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_shape_disabled>` .. container:: contribute @@ -1556,11 +1556,11 @@ void **_body_set_shape_disabled** **(** :ref:`RID<class_RID>` body, :ref:`int<cl ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape_transform: .. rst-class:: classref-method -void **_body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_body_set_shape_transform**\ (\ body\: :ref:`RID<class_RID>`, shape_idx\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_shape_transform>` .. container:: contribute @@ -1570,11 +1570,11 @@ void **_body_set_shape_transform** **(** :ref:`RID<class_RID>` body, :ref:`int<c ---- -.. _class_PhysicsServer3DExtension_method__body_set_space: +.. _class_PhysicsServer3DExtension_private_method__body_set_space: .. rst-class:: classref-method -void **_body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| +|void| **_body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_space>` .. container:: contribute @@ -1584,11 +1584,11 @@ void **_body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` ---- -.. _class_PhysicsServer3DExtension_method__body_set_state: +.. _class_PhysicsServer3DExtension_private_method__body_set_state: .. rst-class:: classref-method -void **_body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_state>` .. container:: contribute @@ -1598,11 +1598,11 @@ void **_body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_ ---- -.. _class_PhysicsServer3DExtension_method__body_set_state_sync_callback: +.. _class_PhysicsServer3DExtension_private_method__body_set_state_sync_callback: .. rst-class:: classref-method -void **_body_set_state_sync_callback** **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable **)** |virtual| +|void| **_body_set_state_sync_callback**\ (\ body\: :ref:`RID<class_RID>`, callable\: :ref:`Callable<class_Callable>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_state_sync_callback>` .. container:: contribute @@ -1612,11 +1612,11 @@ void **_body_set_state_sync_callback** **(** :ref:`RID<class_RID>` body, :ref:`C ---- -.. _class_PhysicsServer3DExtension_method__body_set_user_flags: +.. _class_PhysicsServer3DExtension_private_method__body_set_user_flags: .. rst-class:: classref-method -void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` flags **)** |virtual| +|void| **_body_set_user_flags**\ (\ body\: :ref:`RID<class_RID>`, flags\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_set_user_flags>` .. container:: contribute @@ -1626,11 +1626,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__body_test_motion: +.. _class_PhysicsServer3DExtension_private_method__body_test_motion: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_body_test_motion** **(** :ref:`RID<class_RID>` body, :ref:`Transform3D<class_Transform3D>` from, :ref:`Vector3<class_Vector3>` motion, :ref:`float<class_float>` margin, :ref:`int<class_int>` max_collisions, :ref:`bool<class_bool>` collide_separation_ray, :ref:`bool<class_bool>` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| +:ref:`bool<class_bool>` **_body_test_motion**\ (\ body\: :ref:`RID<class_RID>`, from\: :ref:`Transform3D<class_Transform3D>`, motion\: :ref:`Vector3<class_Vector3>`, margin\: :ref:`float<class_float>`, max_collisions\: :ref:`int<class_int>`, collide_separation_ray\: :ref:`bool<class_bool>`, recovery_as_collision\: :ref:`bool<class_bool>`, result\: ``PhysicsServer3DExtensionMotionResult*``\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__body_test_motion>` .. container:: contribute @@ -1640,11 +1640,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__box_shape_create: +.. _class_PhysicsServer3DExtension_private_method__box_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_box_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_box_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__box_shape_create>` .. container:: contribute @@ -1654,11 +1654,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__capsule_shape_create: +.. _class_PhysicsServer3DExtension_private_method__capsule_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_capsule_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_capsule_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__capsule_shape_create>` .. container:: contribute @@ -1668,11 +1668,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__concave_polygon_shape_create: +.. _class_PhysicsServer3DExtension_private_method__concave_polygon_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_concave_polygon_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_concave_polygon_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__concave_polygon_shape_create>` .. container:: contribute @@ -1682,11 +1682,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__cone_twist_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__cone_twist_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_cone_twist_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_cone_twist_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__cone_twist_joint_get_param>` .. container:: contribute @@ -1696,11 +1696,11 @@ void **_body_set_user_flags** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__cone_twist_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__cone_twist_joint_set_param: .. rst-class:: classref-method -void **_cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_cone_twist_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`ConeTwistJointParam<enum_PhysicsServer3D_ConeTwistJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__cone_twist_joint_set_param>` .. container:: contribute @@ -1710,11 +1710,11 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`Co ---- -.. _class_PhysicsServer3DExtension_method__convex_polygon_shape_create: +.. _class_PhysicsServer3DExtension_private_method__convex_polygon_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_convex_polygon_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_convex_polygon_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__convex_polygon_shape_create>` .. container:: contribute @@ -1724,11 +1724,11 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`Co ---- -.. _class_PhysicsServer3DExtension_method__custom_shape_create: +.. _class_PhysicsServer3DExtension_private_method__custom_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_custom_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_custom_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__custom_shape_create>` .. container:: contribute @@ -1738,11 +1738,11 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`Co ---- -.. _class_PhysicsServer3DExtension_method__cylinder_shape_create: +.. _class_PhysicsServer3DExtension_private_method__cylinder_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_cylinder_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_cylinder_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__cylinder_shape_create>` .. container:: contribute @@ -1752,11 +1752,11 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`Co ---- -.. _class_PhysicsServer3DExtension_method__end_sync: +.. _class_PhysicsServer3DExtension_private_method__end_sync: .. rst-class:: classref-method -void **_end_sync** **(** **)** |virtual| +|void| **_end_sync**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__end_sync>` .. container:: contribute @@ -1766,11 +1766,11 @@ void **_end_sync** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__finish: +.. _class_PhysicsServer3DExtension_private_method__finish: .. rst-class:: classref-method -void **_finish** **(** **)** |virtual| +|void| **_finish**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__finish>` .. container:: contribute @@ -1780,11 +1780,11 @@ void **_finish** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__flush_queries: +.. _class_PhysicsServer3DExtension_private_method__flush_queries: .. rst-class:: classref-method -void **_flush_queries** **(** **)** |virtual| +|void| **_flush_queries**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__flush_queries>` .. container:: contribute @@ -1794,11 +1794,11 @@ void **_flush_queries** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__free_rid: +.. _class_PhysicsServer3DExtension_private_method__free_rid: .. rst-class:: classref-method -void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| +|void| **_free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__free_rid>` .. container:: contribute @@ -1808,11 +1808,11 @@ void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_flag: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_flag: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_generic_6dof_joint_get_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag **)** |virtual| |const| +:ref:`bool<class_bool>` **_generic_6dof_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_flag>` .. container:: contribute @@ -1822,11 +1822,11 @@ void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_generic_6dof_joint_get_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_generic_6dof_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_param>` .. container:: contribute @@ -1836,11 +1836,11 @@ void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_flag: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_flag: .. rst-class:: classref-method -void **_generic_6dof_joint_set_flag** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>` flag, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_generic_6dof_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, flag\: :ref:`G6DOFJointAxisFlag<enum_PhysicsServer3D_G6DOFJointAxisFlag>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_flag>` .. container:: contribute @@ -1850,11 +1850,11 @@ void **_generic_6dof_joint_set_flag** **(** :ref:`RID<class_RID>` joint, Vector3 ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_param: .. rst-class:: classref-method -void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_generic_6dof_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, axis\: Vector3.Axis, param\: :ref:`G6DOFJointAxisParam<enum_PhysicsServer3D_G6DOFJointAxisParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_param>` .. container:: contribute @@ -1864,11 +1864,11 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector ---- -.. _class_PhysicsServer3DExtension_method__get_process_info: +.. _class_PhysicsServer3DExtension_private_method__get_process_info: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_process_info** **(** :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>` process_info **)** |virtual| +:ref:`int<class_int>` **_get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_PhysicsServer3D_ProcessInfo>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__get_process_info>` .. container:: contribute @@ -1878,11 +1878,11 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector ---- -.. _class_PhysicsServer3DExtension_method__heightmap_shape_create: +.. _class_PhysicsServer3DExtension_private_method__heightmap_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_heightmap_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_heightmap_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__heightmap_shape_create>` .. container:: contribute @@ -1892,11 +1892,11 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_get_flag: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_get_flag: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_hinge_joint_get_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag **)** |virtual| |const| +:ref:`bool<class_bool>` **_hinge_joint_get_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__hinge_joint_get_flag>` .. container:: contribute @@ -1906,11 +1906,11 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_hinge_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_hinge_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__hinge_joint_get_param>` .. container:: contribute @@ -1920,11 +1920,11 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID<class_RID>` joint, Vector ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_set_flag: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_set_flag: .. rst-class:: classref-method -void **_hinge_joint_set_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>` flag, :ref:`bool<class_bool>` enabled **)** |virtual| +|void| **_hinge_joint_set_flag**\ (\ joint\: :ref:`RID<class_RID>`, flag\: :ref:`HingeJointFlag<enum_PhysicsServer3D_HingeJointFlag>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__hinge_joint_set_flag>` .. container:: contribute @@ -1934,11 +1934,11 @@ void **_hinge_joint_set_flag** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJoi ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_set_param: .. rst-class:: classref-method -void **_hinge_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_hinge_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`HingeJointParam<enum_PhysicsServer3D_HingeJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__hinge_joint_set_param>` .. container:: contribute @@ -1948,11 +1948,11 @@ void **_hinge_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`HingeJo ---- -.. _class_PhysicsServer3DExtension_method__init: +.. _class_PhysicsServer3DExtension_private_method__init: .. rst-class:: classref-method -void **_init** **(** **)** |virtual| +|void| **_init**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__init>` .. container:: contribute @@ -1962,11 +1962,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__is_flushing_queries: +.. _class_PhysicsServer3DExtension_private_method__is_flushing_queries: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_flushing_queries** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_flushing_queries**\ (\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__is_flushing_queries>` .. container:: contribute @@ -1976,11 +1976,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__joint_clear: +.. _class_PhysicsServer3DExtension_private_method__joint_clear: .. rst-class:: classref-method -void **_joint_clear** **(** :ref:`RID<class_RID>` joint **)** |virtual| +|void| **_joint_clear**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_clear>` .. container:: contribute @@ -1990,11 +1990,11 @@ void **_joint_clear** **(** :ref:`RID<class_RID>` joint **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__joint_create: +.. _class_PhysicsServer3DExtension_private_method__joint_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_joint_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_joint_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_create>` .. container:: contribute @@ -2004,11 +2004,11 @@ void **_joint_clear** **(** :ref:`RID<class_RID>` joint **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__joint_disable_collisions_between_bodies: +.. _class_PhysicsServer3DExtension_private_method__joint_disable_collisions_between_bodies: .. rst-class:: classref-method -void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint, :ref:`bool<class_bool>` disable **)** |virtual| +|void| **_joint_disable_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_disable_collisions_between_bodies>` .. container:: contribute @@ -2018,11 +2018,11 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` jo ---- -.. _class_PhysicsServer3DExtension_method__joint_get_solver_priority: +.. _class_PhysicsServer3DExtension_private_method__joint_get_solver_priority: .. rst-class:: classref-method -:ref:`int<class_int>` **_joint_get_solver_priority** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`int<class_int>` **_joint_get_solver_priority**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_get_solver_priority>` .. container:: contribute @@ -2032,11 +2032,11 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` jo ---- -.. _class_PhysicsServer3DExtension_method__joint_get_type: +.. _class_PhysicsServer3DExtension_private_method__joint_get_type: .. rst-class:: classref-method -:ref:`JointType<enum_PhysicsServer3D_JointType>` **_joint_get_type** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`JointType<enum_PhysicsServer3D_JointType>` **_joint_get_type**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_get_type>` .. container:: contribute @@ -2046,11 +2046,11 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` jo ---- -.. _class_PhysicsServer3DExtension_method__joint_is_disabled_collisions_between_bodies: +.. _class_PhysicsServer3DExtension_private_method__joint_is_disabled_collisions_between_bodies: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_joint_is_disabled_collisions_between_bodies** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`bool<class_bool>` **_joint_is_disabled_collisions_between_bodies**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_is_disabled_collisions_between_bodies>` .. container:: contribute @@ -2060,11 +2060,11 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID<class_RID>` jo ---- -.. _class_PhysicsServer3DExtension_method__joint_make_cone_twist: +.. _class_PhysicsServer3DExtension_private_method__joint_make_cone_twist: .. rst-class:: classref-method -void **_joint_make_cone_twist** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| +|void| **_joint_make_cone_twist**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_cone_twist>` .. container:: contribute @@ -2074,11 +2074,11 @@ void **_joint_make_cone_twist** **(** :ref:`RID<class_RID>` joint, :ref:`RID<cla ---- -.. _class_PhysicsServer3DExtension_method__joint_make_generic_6dof: +.. _class_PhysicsServer3DExtension_private_method__joint_make_generic_6dof: .. rst-class:: classref-method -void **_joint_make_generic_6dof** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| +|void| **_joint_make_generic_6dof**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_generic_6dof>` .. container:: contribute @@ -2088,11 +2088,11 @@ void **_joint_make_generic_6dof** **(** :ref:`RID<class_RID>` joint, :ref:`RID<c ---- -.. _class_PhysicsServer3DExtension_method__joint_make_hinge: +.. _class_PhysicsServer3DExtension_private_method__joint_make_hinge: .. rst-class:: classref-method -void **_joint_make_hinge** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` hinge_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` hinge_B **)** |virtual| +|void| **_joint_make_hinge**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, hinge_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, hinge_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_hinge>` .. container:: contribute @@ -2102,11 +2102,11 @@ void **_joint_make_hinge** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RI ---- -.. _class_PhysicsServer3DExtension_method__joint_make_hinge_simple: +.. _class_PhysicsServer3DExtension_private_method__joint_make_hinge_simple: .. rst-class:: classref-method -void **_joint_make_hinge_simple** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` pivot_A, :ref:`Vector3<class_Vector3>` axis_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` pivot_B, :ref:`Vector3<class_Vector3>` axis_B **)** |virtual| +|void| **_joint_make_hinge_simple**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, pivot_A\: :ref:`Vector3<class_Vector3>`, axis_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, pivot_B\: :ref:`Vector3<class_Vector3>`, axis_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_hinge_simple>` .. container:: contribute @@ -2116,11 +2116,11 @@ void **_joint_make_hinge_simple** **(** :ref:`RID<class_RID>` joint, :ref:`RID<c ---- -.. _class_PhysicsServer3DExtension_method__joint_make_pin: +.. _class_PhysicsServer3DExtension_private_method__joint_make_pin: .. rst-class:: classref-method -void **_joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Vector3<class_Vector3>` local_A, :ref:`RID<class_RID>` body_B, :ref:`Vector3<class_Vector3>` local_B **)** |virtual| +|void| **_joint_make_pin**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`, body_B\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_pin>` .. container:: contribute @@ -2130,11 +2130,11 @@ void **_joint_make_pin** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID> ---- -.. _class_PhysicsServer3DExtension_method__joint_make_slider: +.. _class_PhysicsServer3DExtension_private_method__joint_make_slider: .. rst-class:: classref-method -void **_joint_make_slider** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_RID>` body_A, :ref:`Transform3D<class_Transform3D>` local_ref_A, :ref:`RID<class_RID>` body_B, :ref:`Transform3D<class_Transform3D>` local_ref_B **)** |virtual| +|void| **_joint_make_slider**\ (\ joint\: :ref:`RID<class_RID>`, body_A\: :ref:`RID<class_RID>`, local_ref_A\: :ref:`Transform3D<class_Transform3D>`, body_B\: :ref:`RID<class_RID>`, local_ref_B\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_make_slider>` .. container:: contribute @@ -2144,11 +2144,11 @@ void **_joint_make_slider** **(** :ref:`RID<class_RID>` joint, :ref:`RID<class_R ---- -.. _class_PhysicsServer3DExtension_method__joint_set_solver_priority: +.. _class_PhysicsServer3DExtension_private_method__joint_set_solver_priority: .. rst-class:: classref-method -void **_joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int<class_int>` priority **)** |virtual| +|void| **_joint_set_solver_priority**\ (\ joint\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__joint_set_solver_priority>` .. container:: contribute @@ -2158,11 +2158,11 @@ void **_joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_a: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_local_a: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_pin_joint_get_local_a** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_pin_joint_get_local_a**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_get_local_a>` .. container:: contribute @@ -2172,11 +2172,11 @@ void **_joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_b: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_local_b: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_pin_joint_get_local_b** **(** :ref:`RID<class_RID>` joint **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_pin_joint_get_local_b**\ (\ joint\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_get_local_b>` .. container:: contribute @@ -2186,11 +2186,11 @@ void **_joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_pin_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_pin_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_get_param>` .. container:: contribute @@ -2200,11 +2200,11 @@ void **_joint_set_solver_priority** **(** :ref:`RID<class_RID>` joint, :ref:`int ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_a: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_local_a: .. rst-class:: classref-method -void **_pin_joint_set_local_a** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_A **)** |virtual| +|void| **_pin_joint_set_local_a**\ (\ joint\: :ref:`RID<class_RID>`, local_A\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_set_local_a>` .. container:: contribute @@ -2214,11 +2214,11 @@ void **_pin_joint_set_local_a** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3 ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_b: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_local_b: .. rst-class:: classref-method -void **_pin_joint_set_local_b** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3<class_Vector3>` local_B **)** |virtual| +|void| **_pin_joint_set_local_b**\ (\ joint\: :ref:`RID<class_RID>`, local_B\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_set_local_b>` .. container:: contribute @@ -2228,11 +2228,11 @@ void **_pin_joint_set_local_b** **(** :ref:`RID<class_RID>` joint, :ref:`Vector3 ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_param: .. rst-class:: classref-method -void **_pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_pin_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`PinJointParam<enum_PhysicsServer3D_PinJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__pin_joint_set_param>` .. container:: contribute @@ -2242,11 +2242,11 @@ void **_pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointP ---- -.. _class_PhysicsServer3DExtension_method__separation_ray_shape_create: +.. _class_PhysicsServer3DExtension_private_method__separation_ray_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_separation_ray_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_separation_ray_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__separation_ray_shape_create>` .. container:: contribute @@ -2256,11 +2256,11 @@ void **_pin_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`PinJointP ---- -.. _class_PhysicsServer3DExtension_method__set_active: +.. _class_PhysicsServer3DExtension_private_method__set_active: .. rst-class:: classref-method -void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| +|void| **_set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__set_active>` .. container:: contribute @@ -2270,11 +2270,11 @@ void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__shape_get_custom_solver_bias: +.. _class_PhysicsServer3DExtension_private_method__shape_get_custom_solver_bias: .. rst-class:: classref-method -:ref:`float<class_float>` **_shape_get_custom_solver_bias** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`float<class_float>` **_shape_get_custom_solver_bias**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_get_custom_solver_bias>` .. container:: contribute @@ -2284,11 +2284,11 @@ void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__shape_get_data: +.. _class_PhysicsServer3DExtension_private_method__shape_get_data: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_shape_get_data** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_shape_get_data**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_get_data>` .. container:: contribute @@ -2298,11 +2298,11 @@ void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__shape_get_margin: +.. _class_PhysicsServer3DExtension_private_method__shape_get_margin: .. rst-class:: classref-method -:ref:`float<class_float>` **_shape_get_margin** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`float<class_float>` **_shape_get_margin**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_get_margin>` .. container:: contribute @@ -2312,11 +2312,11 @@ void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__shape_get_type: +.. _class_PhysicsServer3DExtension_private_method__shape_get_type: .. rst-class:: classref-method -:ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` **_shape_get_type** **(** :ref:`RID<class_RID>` shape **)** |virtual| |const| +:ref:`ShapeType<enum_PhysicsServer3D_ShapeType>` **_shape_get_type**\ (\ shape\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_get_type>` .. container:: contribute @@ -2326,11 +2326,11 @@ void **_set_active** **(** :ref:`bool<class_bool>` active **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__shape_set_custom_solver_bias: +.. _class_PhysicsServer3DExtension_private_method__shape_set_custom_solver_bias: .. rst-class:: classref-method -void **_shape_set_custom_solver_bias** **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` bias **)** |virtual| +|void| **_shape_set_custom_solver_bias**\ (\ shape\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_set_custom_solver_bias>` .. container:: contribute @@ -2340,11 +2340,11 @@ void **_shape_set_custom_solver_bias** **(** :ref:`RID<class_RID>` shape, :ref:` ---- -.. _class_PhysicsServer3DExtension_method__shape_set_data: +.. _class_PhysicsServer3DExtension_private_method__shape_set_data: .. rst-class:: classref-method -void **_shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |virtual| +|void| **_shape_set_data**\ (\ shape\: :ref:`RID<class_RID>`, data\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_set_data>` .. container:: contribute @@ -2354,11 +2354,11 @@ void **_shape_set_data** **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_ ---- -.. _class_PhysicsServer3DExtension_method__shape_set_margin: +.. _class_PhysicsServer3DExtension_private_method__shape_set_margin: .. rst-class:: classref-method -void **_shape_set_margin** **(** :ref:`RID<class_RID>` shape, :ref:`float<class_float>` margin **)** |virtual| +|void| **_shape_set_margin**\ (\ shape\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__shape_set_margin>` .. container:: contribute @@ -2368,11 +2368,11 @@ void **_shape_set_margin** **(** :ref:`RID<class_RID>` shape, :ref:`float<class_ ---- -.. _class_PhysicsServer3DExtension_method__slider_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__slider_joint_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_slider_joint_get_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param **)** |virtual| |const| +:ref:`float<class_float>` **_slider_joint_get_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__slider_joint_get_param>` .. container:: contribute @@ -2382,11 +2382,11 @@ void **_shape_set_margin** **(** :ref:`RID<class_RID>` shape, :ref:`float<class_ ---- -.. _class_PhysicsServer3DExtension_method__slider_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__slider_joint_set_param: .. rst-class:: classref-method -void **_slider_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_slider_joint_set_param**\ (\ joint\: :ref:`RID<class_RID>`, param\: :ref:`SliderJointParam<enum_PhysicsServer3D_SliderJointParam>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__slider_joint_set_param>` .. container:: contribute @@ -2396,11 +2396,11 @@ void **_slider_joint_set_param** **(** :ref:`RID<class_RID>` joint, :ref:`Slider ---- -.. _class_PhysicsServer3DExtension_method__soft_body_add_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__soft_body_add_collision_exception: .. rst-class:: classref-method -void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` body_b **)** |virtual| +|void| **_soft_body_add_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_add_collision_exception>` .. container:: contribute @@ -2410,11 +2410,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_create: +.. _class_PhysicsServer3DExtension_private_method__soft_body_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_soft_body_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_soft_body_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_create>` .. container:: contribute @@ -2424,11 +2424,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_bounds: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_bounds: .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **_soft_body_get_bounds** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`AABB<class_AABB>` **_soft_body_get_bounds**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_bounds>` .. container:: contribute @@ -2438,11 +2438,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_exceptions: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_exceptions: .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **_soft_body_get_collision_exceptions** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **_soft_body_get_collision_exceptions**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_exceptions>` .. container:: contribute @@ -2452,11 +2452,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_layer: .. rst-class:: classref-method -:ref:`int<class_int>` **_soft_body_get_collision_layer** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_soft_body_get_collision_layer**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_layer>` .. container:: contribute @@ -2466,11 +2466,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_mask: .. rst-class:: classref-method -:ref:`int<class_int>` **_soft_body_get_collision_mask** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_soft_body_get_collision_mask**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_collision_mask>` .. container:: contribute @@ -2480,11 +2480,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_damping_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_damping_coefficient: .. rst-class:: classref-method -:ref:`float<class_float>` **_soft_body_get_damping_coefficient** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_soft_body_get_damping_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_damping_coefficient>` .. container:: contribute @@ -2494,11 +2494,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_drag_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_drag_coefficient: .. rst-class:: classref-method -:ref:`float<class_float>` **_soft_body_get_drag_coefficient** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_soft_body_get_drag_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_drag_coefficient>` .. container:: contribute @@ -2508,11 +2508,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_linear_stiffness: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_linear_stiffness: .. rst-class:: classref-method -:ref:`float<class_float>` **_soft_body_get_linear_stiffness** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_soft_body_get_linear_stiffness**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_linear_stiffness>` .. container:: contribute @@ -2522,11 +2522,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_point_global_position: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_point_global_position: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **_soft_body_get_point_global_position** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index **)** |virtual| |const| +:ref:`Vector3<class_Vector3>` **_soft_body_get_point_global_position**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_point_global_position>` .. container:: contribute @@ -2536,11 +2536,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_pressure_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_pressure_coefficient: .. rst-class:: classref-method -:ref:`float<class_float>` **_soft_body_get_pressure_coefficient** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_soft_body_get_pressure_coefficient**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_pressure_coefficient>` .. container:: contribute @@ -2550,11 +2550,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_simulation_precision: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_simulation_precision: .. rst-class:: classref-method -:ref:`int<class_int>` **_soft_body_get_simulation_precision** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`int<class_int>` **_soft_body_get_simulation_precision**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_simulation_precision>` .. container:: contribute @@ -2564,11 +2564,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_space: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_space: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_soft_body_get_space** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`RID<class_RID>` **_soft_body_get_space**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_space>` .. container:: contribute @@ -2578,11 +2578,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_state: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_state: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_soft_body_get_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_soft_body_get_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_state>` .. container:: contribute @@ -2592,11 +2592,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_total_mass: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_total_mass: .. rst-class:: classref-method -:ref:`float<class_float>` **_soft_body_get_total_mass** **(** :ref:`RID<class_RID>` body **)** |virtual| |const| +:ref:`float<class_float>` **_soft_body_get_total_mass**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_get_total_mass>` .. container:: contribute @@ -2606,11 +2606,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_is_point_pinned: +.. _class_PhysicsServer3DExtension_private_method__soft_body_is_point_pinned: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_soft_body_is_point_pinned** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index **)** |virtual| |const| +:ref:`bool<class_bool>` **_soft_body_is_point_pinned**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_is_point_pinned>` .. container:: contribute @@ -2620,11 +2620,11 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_move_point: +.. _class_PhysicsServer3DExtension_private_method__soft_body_move_point: .. rst-class:: classref-method -void **_soft_body_move_point** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index, :ref:`Vector3<class_Vector3>` global_position **)** |virtual| +|void| **_soft_body_move_point**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, global_position\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_move_point>` .. container:: contribute @@ -2634,11 +2634,11 @@ void **_soft_body_move_point** **(** :ref:`RID<class_RID>` body, :ref:`int<class ---- -.. _class_PhysicsServer3DExtension_method__soft_body_pin_point: +.. _class_PhysicsServer3DExtension_private_method__soft_body_pin_point: .. rst-class:: classref-method -void **_soft_body_pin_point** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` point_index, :ref:`bool<class_bool>` pin **)** |virtual| +|void| **_soft_body_pin_point**\ (\ body\: :ref:`RID<class_RID>`, point_index\: :ref:`int<class_int>`, pin\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_pin_point>` .. container:: contribute @@ -2648,11 +2648,11 @@ void **_soft_body_pin_point** **(** :ref:`RID<class_RID>` body, :ref:`int<class_ ---- -.. _class_PhysicsServer3DExtension_method__soft_body_remove_all_pinned_points: +.. _class_PhysicsServer3DExtension_private_method__soft_body_remove_all_pinned_points: .. rst-class:: classref-method -void **_soft_body_remove_all_pinned_points** **(** :ref:`RID<class_RID>` body **)** |virtual| +|void| **_soft_body_remove_all_pinned_points**\ (\ body\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_remove_all_pinned_points>` .. container:: contribute @@ -2662,11 +2662,11 @@ void **_soft_body_remove_all_pinned_points** **(** :ref:`RID<class_RID>` body ** ---- -.. _class_PhysicsServer3DExtension_method__soft_body_remove_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__soft_body_remove_collision_exception: .. rst-class:: classref-method -void **_soft_body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` body_b **)** |virtual| +|void| **_soft_body_remove_collision_exception**\ (\ body\: :ref:`RID<class_RID>`, body_b\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_remove_collision_exception>` .. container:: contribute @@ -2676,11 +2676,11 @@ void **_soft_body_remove_collision_exception** **(** :ref:`RID<class_RID>` body, ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_collision_layer: .. rst-class:: classref-method -void **_soft_body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |virtual| +|void| **_soft_body_set_collision_layer**\ (\ body\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_collision_layer>` .. container:: contribute @@ -2690,11 +2690,11 @@ void **_soft_body_set_collision_layer** **(** :ref:`RID<class_RID>` body, :ref:` ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_collision_mask: .. rst-class:: classref-method -void **_soft_body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |virtual| +|void| **_soft_body_set_collision_mask**\ (\ body\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_collision_mask>` .. container:: contribute @@ -2704,11 +2704,11 @@ void **_soft_body_set_collision_mask** **(** :ref:`RID<class_RID>` body, :ref:`i ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_damping_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_damping_coefficient: .. rst-class:: classref-method -void **_soft_body_set_damping_coefficient** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` damping_coefficient **)** |virtual| +|void| **_soft_body_set_damping_coefficient**\ (\ body\: :ref:`RID<class_RID>`, damping_coefficient\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_damping_coefficient>` .. container:: contribute @@ -2718,11 +2718,11 @@ void **_soft_body_set_damping_coefficient** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_drag_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_drag_coefficient: .. rst-class:: classref-method -void **_soft_body_set_drag_coefficient** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` drag_coefficient **)** |virtual| +|void| **_soft_body_set_drag_coefficient**\ (\ body\: :ref:`RID<class_RID>`, drag_coefficient\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_drag_coefficient>` .. container:: contribute @@ -2732,11 +2732,11 @@ void **_soft_body_set_drag_coefficient** **(** :ref:`RID<class_RID>` body, :ref: ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_linear_stiffness: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_linear_stiffness: .. rst-class:: classref-method -void **_soft_body_set_linear_stiffness** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` linear_stiffness **)** |virtual| +|void| **_soft_body_set_linear_stiffness**\ (\ body\: :ref:`RID<class_RID>`, linear_stiffness\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_linear_stiffness>` .. container:: contribute @@ -2746,11 +2746,11 @@ void **_soft_body_set_linear_stiffness** **(** :ref:`RID<class_RID>` body, :ref: ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_mesh: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_mesh: .. rst-class:: classref-method -void **_soft_body_set_mesh** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` mesh **)** |virtual| +|void| **_soft_body_set_mesh**\ (\ body\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_mesh>` .. container:: contribute @@ -2760,11 +2760,11 @@ void **_soft_body_set_mesh** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_R ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_pressure_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_pressure_coefficient: .. rst-class:: classref-method -void **_soft_body_set_pressure_coefficient** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` pressure_coefficient **)** |virtual| +|void| **_soft_body_set_pressure_coefficient**\ (\ body\: :ref:`RID<class_RID>`, pressure_coefficient\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_pressure_coefficient>` .. container:: contribute @@ -2774,11 +2774,11 @@ void **_soft_body_set_pressure_coefficient** **(** :ref:`RID<class_RID>` body, : ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_ray_pickable: .. rst-class:: classref-method -void **_soft_body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |virtual| +|void| **_soft_body_set_ray_pickable**\ (\ body\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_ray_pickable>` .. container:: contribute @@ -2788,11 +2788,11 @@ void **_soft_body_set_ray_pickable** **(** :ref:`RID<class_RID>` body, :ref:`boo ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_simulation_precision: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_simulation_precision: .. rst-class:: classref-method -void **_soft_body_set_simulation_precision** **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` simulation_precision **)** |virtual| +|void| **_soft_body_set_simulation_precision**\ (\ body\: :ref:`RID<class_RID>`, simulation_precision\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_simulation_precision>` .. container:: contribute @@ -2802,11 +2802,11 @@ void **_soft_body_set_simulation_precision** **(** :ref:`RID<class_RID>` body, : ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_space: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_space: .. rst-class:: classref-method -void **_soft_body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |virtual| +|void| **_soft_body_set_space**\ (\ body\: :ref:`RID<class_RID>`, space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_space>` .. container:: contribute @@ -2816,11 +2816,11 @@ void **_soft_body_set_space** **(** :ref:`RID<class_RID>` body, :ref:`RID<class_ ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_state: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_state: .. rst-class:: classref-method -void **_soft_body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer3D_BodyState>` state, :ref:`Variant<class_Variant>` variant **)** |virtual| +|void| **_soft_body_set_state**\ (\ body\: :ref:`RID<class_RID>`, state\: :ref:`BodyState<enum_PhysicsServer3D_BodyState>`, variant\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_state>` .. container:: contribute @@ -2830,11 +2830,11 @@ void **_soft_body_set_state** **(** :ref:`RID<class_RID>` body, :ref:`BodyState< ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_total_mass: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_total_mass: .. rst-class:: classref-method -void **_soft_body_set_total_mass** **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` total_mass **)** |virtual| +|void| **_soft_body_set_total_mass**\ (\ body\: :ref:`RID<class_RID>`, total_mass\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_total_mass>` .. container:: contribute @@ -2844,11 +2844,11 @@ void **_soft_body_set_total_mass** **(** :ref:`RID<class_RID>` body, :ref:`float ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_transform: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_transform: .. rst-class:: classref-method -void **_soft_body_set_transform** **(** :ref:`RID<class_RID>` body, :ref:`Transform3D<class_Transform3D>` transform **)** |virtual| +|void| **_soft_body_set_transform**\ (\ body\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_set_transform>` .. container:: contribute @@ -2858,11 +2858,11 @@ void **_soft_body_set_transform** **(** :ref:`RID<class_RID>` body, :ref:`Transf ---- -.. _class_PhysicsServer3DExtension_method__soft_body_update_rendering_server: +.. _class_PhysicsServer3DExtension_private_method__soft_body_update_rendering_server: .. rst-class:: classref-method -void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>` rendering_server_handler **)** |virtual| +|void| **_soft_body_update_rendering_server**\ (\ body\: :ref:`RID<class_RID>`, rendering_server_handler\: :ref:`PhysicsServer3DRenderingServerHandler<class_PhysicsServer3DRenderingServerHandler>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__soft_body_update_rendering_server>` .. container:: contribute @@ -2872,11 +2872,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_create: +.. _class_PhysicsServer3DExtension_private_method__space_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_space_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_space_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_create>` .. container:: contribute @@ -2886,11 +2886,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_get_contact_count: +.. _class_PhysicsServer3DExtension_private_method__space_get_contact_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_space_get_contact_count** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| +:ref:`int<class_int>` **_space_get_contact_count**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_get_contact_count>` .. container:: contribute @@ -2900,11 +2900,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_get_contacts: +.. _class_PhysicsServer3DExtension_private_method__space_get_contacts: .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **_space_get_contacts** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **_space_get_contacts**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_get_contacts>` .. container:: contribute @@ -2914,11 +2914,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_get_direct_state: +.. _class_PhysicsServer3DExtension_private_method__space_get_direct_state: .. rst-class:: classref-method -:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **_space_get_direct_state** **(** :ref:`RID<class_RID>` space **)** |virtual| +:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **_space_get_direct_state**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_get_direct_state>` .. container:: contribute @@ -2928,11 +2928,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_get_param: +.. _class_PhysicsServer3DExtension_private_method__space_get_param: .. rst-class:: classref-method -:ref:`float<class_float>` **_space_get_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param **)** |virtual| |const| +:ref:`float<class_float>` **_space_get_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_get_param>` .. container:: contribute @@ -2942,11 +2942,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_is_active: +.. _class_PhysicsServer3DExtension_private_method__space_is_active: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_space_is_active** **(** :ref:`RID<class_RID>` space **)** |virtual| |const| +:ref:`bool<class_bool>` **_space_is_active**\ (\ space\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_is_active>` .. container:: contribute @@ -2956,11 +2956,11 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID<class_RID>` body, :r ---- -.. _class_PhysicsServer3DExtension_method__space_set_active: +.. _class_PhysicsServer3DExtension_private_method__space_set_active: .. rst-class:: classref-method -void **_space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |virtual| +|void| **_space_set_active**\ (\ space\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_set_active>` .. container:: contribute @@ -2970,11 +2970,11 @@ void **_space_set_active** **(** :ref:`RID<class_RID>` space, :ref:`bool<class_b ---- -.. _class_PhysicsServer3DExtension_method__space_set_debug_contacts: +.. _class_PhysicsServer3DExtension_private_method__space_set_debug_contacts: .. rst-class:: classref-method -void **_space_set_debug_contacts** **(** :ref:`RID<class_RID>` space, :ref:`int<class_int>` max_contacts **)** |virtual| +|void| **_space_set_debug_contacts**\ (\ space\: :ref:`RID<class_RID>`, max_contacts\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_set_debug_contacts>` .. container:: contribute @@ -2984,11 +2984,11 @@ void **_space_set_debug_contacts** **(** :ref:`RID<class_RID>` space, :ref:`int< ---- -.. _class_PhysicsServer3DExtension_method__space_set_param: +.. _class_PhysicsServer3DExtension_private_method__space_set_param: .. rst-class:: classref-method -void **_space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |virtual| +|void| **_space_set_param**\ (\ space\: :ref:`RID<class_RID>`, param\: :ref:`SpaceParameter<enum_PhysicsServer3D_SpaceParameter>`, value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__space_set_param>` .. container:: contribute @@ -2998,11 +2998,11 @@ void **_space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParamete ---- -.. _class_PhysicsServer3DExtension_method__sphere_shape_create: +.. _class_PhysicsServer3DExtension_private_method__sphere_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_sphere_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_sphere_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__sphere_shape_create>` .. container:: contribute @@ -3012,11 +3012,11 @@ void **_space_set_param** **(** :ref:`RID<class_RID>` space, :ref:`SpaceParamete ---- -.. _class_PhysicsServer3DExtension_method__step: +.. _class_PhysicsServer3DExtension_private_method__step: .. rst-class:: classref-method -void **_step** **(** :ref:`float<class_float>` step **)** |virtual| +|void| **_step**\ (\ step\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__step>` .. container:: contribute @@ -3026,11 +3026,11 @@ void **_step** **(** :ref:`float<class_float>` step **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__sync: +.. _class_PhysicsServer3DExtension_private_method__sync: .. rst-class:: classref-method -void **_sync** **(** **)** |virtual| +|void| **_sync**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__sync>` .. container:: contribute @@ -3040,11 +3040,11 @@ void **_sync** **(** **)** |virtual| ---- -.. _class_PhysicsServer3DExtension_method__world_boundary_shape_create: +.. _class_PhysicsServer3DExtension_private_method__world_boundary_shape_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_world_boundary_shape_create** **(** **)** |virtual| +:ref:`RID<class_RID>` **_world_boundary_shape_create**\ (\ ) |virtual| :ref:`🔗<class_PhysicsServer3DExtension_private_method__world_boundary_shape_create>` .. container:: contribute @@ -3058,7 +3058,7 @@ void **_sync** **(** **)** |virtual| .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion_is_excluding_body** **(** :ref:`RID<class_RID>` body **)** |const| +:ref:`bool<class_bool>` **body_test_motion_is_excluding_body**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_body>` .. container:: contribute @@ -3072,7 +3072,7 @@ void **_sync** **(** **)** |virtual| .. rst-class:: classref-method -:ref:`bool<class_bool>` **body_test_motion_is_excluding_object** **(** :ref:`int<class_int>` object **)** |const| +:ref:`bool<class_bool>` **body_test_motion_is_excluding_object**\ (\ object\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PhysicsServer3DExtension_method_body_test_motion_is_excluding_object>` .. container:: contribute @@ -3085,3 +3085,4 @@ void **_sync** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver3dmanager.rst b/classes/class_physicsserver3dmanager.rst index 5f8e76585b2..79f40c2aeda 100644 --- a/classes/class_physicsserver3dmanager.rst +++ b/classes/class_physicsserver3dmanager.rst @@ -31,11 +31,11 @@ Methods .. table:: :widths: auto - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_server<class_PhysicsServer3DManager_method_register_server>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** | - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_server<class_PhysicsServer3DManager_method_set_default_server>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** | - +------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_server<class_PhysicsServer3DManager_method_register_server>`\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_server<class_PhysicsServer3DManager_method_set_default_server>`\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -void **register_server** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` create_callback **)** +|void| **register_server**\ (\ name\: :ref:`String<class_String>`, create_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PhysicsServer3DManager_method_register_server>` Register a :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation by passing a ``name`` and a :ref:`Callable<class_Callable>` that returns a :ref:`PhysicsServer3D<class_PhysicsServer3D>` object. @@ -62,7 +62,7 @@ Register a :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation by passi .. rst-class:: classref-method -void **set_default_server** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` priority **)** +|void| **set_default_server**\ (\ name\: :ref:`String<class_String>`, priority\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PhysicsServer3DManager_method_set_default_server>` Set the default :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation to the one identified by ``name``, if ``priority`` is greater than the priority of the current default implementation. @@ -73,3 +73,4 @@ Set the default :ref:`PhysicsServer3D<class_PhysicsServer3D>` implementation to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsserver3drenderingserverhandler.rst b/classes/class_physicsserver3drenderingserverhandler.rst index 2dd0506ee4e..19046b42b30 100644 --- a/classes/class_physicsserver3drenderingserverhandler.rst +++ b/classes/class_physicsserver3drenderingserverhandler.rst @@ -12,7 +12,7 @@ PhysicsServer3DRenderingServerHandler **Inherits:** :ref:`Object<class_Object>` -A class used to provide :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server<class_PhysicsServer3DExtension_method__soft_body_update_rendering_server>` with a rendering handler for soft bodies. +A class used to provide :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server<class_PhysicsServer3DExtension_private_method__soft_body_update_rendering_server>` with a rendering handler for soft bodies. .. rst-class:: classref-reftable-group @@ -22,13 +22,19 @@ Methods .. table:: :widths: auto - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_aabb<class_PhysicsServer3DRenderingServerHandler_method__set_aabb>` **(** :ref:`AABB<class_AABB>` aabb **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_normal<class_PhysicsServer3DRenderingServerHandler_method__set_normal>` **(** :ref:`int<class_int>` vertex_id, const void* normals **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_vertex<class_PhysicsServer3DRenderingServerHandler_method__set_vertex>` **(** :ref:`int<class_int>` vertex_id, const void* vertices **)** |virtual| | - +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_aabb<class_PhysicsServer3DRenderingServerHandler_private_method__set_aabb>`\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) |virtual| | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_normal<class_PhysicsServer3DRenderingServerHandler_private_method__set_normal>`\ (\ vertex_id\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_vertex<class_PhysicsServer3DRenderingServerHandler_private_method__set_vertex>`\ (\ vertex_id\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) |virtual| | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_aabb<class_PhysicsServer3DRenderingServerHandler_method_set_aabb>`\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_normal<class_PhysicsServer3DRenderingServerHandler_method_set_normal>`\ (\ vertex_id\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_vertex<class_PhysicsServer3DRenderingServerHandler_method_set_vertex>`\ (\ vertex_id\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -39,43 +45,77 @@ Methods Method Descriptions ------------------- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_aabb: +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_aabb: .. rst-class:: classref-method -void **_set_aabb** **(** :ref:`AABB<class_AABB>` aabb **)** |virtual| +|void| **_set_aabb**\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_private_method__set_aabb>` -.. container:: contribute +Called by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` to set the bounding box for the :ref:`SoftBody3D<class_SoftBody3D>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_normal: + +.. rst-class:: classref-method + +|void| **_set_normal**\ (\ vertex_id\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_private_method__set_normal>` + +Called by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` to set the normal for the :ref:`SoftBody3D<class_SoftBody3D>` vertex at the index specified by ``vertex_id``. + +\ **Note:** The ``normal`` parameter used to be of type ``const void*`` prior to Godot 4.2. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_normal: +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_vertex: .. rst-class:: classref-method -void **_set_normal** **(** :ref:`int<class_int>` vertex_id, const void* normals **)** |virtual| +|void| **_set_vertex**\ (\ vertex_id\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) |virtual| :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_private_method__set_vertex>` + +Called by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` to set the position for the :ref:`SoftBody3D<class_SoftBody3D>` vertex at the index specified by ``vertex_id``. + +\ **Note:** The ``vertex`` parameter used to be of type ``const void*`` prior to Godot 4.2. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method_set_aabb: -.. container:: contribute +.. rst-class:: classref-method - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +|void| **set_aabb**\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_method_set_aabb>` + +Sets the bounding box for the :ref:`SoftBody3D<class_SoftBody3D>`. .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_vertex: +.. _class_PhysicsServer3DRenderingServerHandler_method_set_normal: .. rst-class:: classref-method -void **_set_vertex** **(** :ref:`int<class_int>` vertex_id, const void* vertices **)** |virtual| +|void| **set_normal**\ (\ vertex_id\: :ref:`int<class_int>`, normal\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_method_set_normal>` + +Sets the normal for the :ref:`SoftBody3D<class_SoftBody3D>` vertex at the index specified by ``vertex_id``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer3DRenderingServerHandler_method_set_vertex: + +.. rst-class:: classref-method -.. container:: contribute +|void| **set_vertex**\ (\ vertex_id\: :ref:`int<class_int>`, vertex\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_PhysicsServer3DRenderingServerHandler_method_set_vertex>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the position for the :ref:`SoftBody3D<class_SoftBody3D>` vertex at the index specified by ``vertex_id``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -84,3 +124,4 @@ void **_set_vertex** **(** :ref:`int<class_int>` vertex_id, const void* vertices .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsshapequeryparameters2d.rst b/classes/class_physicsshapequeryparameters2d.rst index 1b146102c78..d374905b937 100644 --- a/classes/class_physicsshapequeryparameters2d.rst +++ b/classes/class_physicsshapequeryparameters2d.rst @@ -29,25 +29,25 @@ Properties .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsShapeQueryParameters2D_property_collide_with_areas>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsShapeQueryParameters2D_property_collide_with_bodies>` | ``true`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsShapeQueryParameters2D_property_collision_mask>` | ``4294967295`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsShapeQueryParameters2D_property_exclude>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`float<class_float>` | :ref:`margin<class_PhysicsShapeQueryParameters2D_property_margin>` | ``0.0`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`motion<class_PhysicsShapeQueryParameters2D_property_motion>` | ``Vector2(0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`shape<class_PhysicsShapeQueryParameters2D_property_shape>` | | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shape_rid<class_PhysicsShapeQueryParameters2D_property_shape_rid>` | ``RID()`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`transform<class_PhysicsShapeQueryParameters2D_property_transform>` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsShapeQueryParameters2D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsShapeQueryParameters2D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsShapeQueryParameters2D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsShapeQueryParameters2D_property_exclude>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float<class_float>` | :ref:`margin<class_PhysicsShapeQueryParameters2D_property_margin>` | ``0.0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`motion<class_PhysicsShapeQueryParameters2D_property_motion>` | ``Vector2(0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`shape<class_PhysicsShapeQueryParameters2D_property_shape>` | | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shape_rid<class_PhysicsShapeQueryParameters2D_property_shape_rid>` | ``RID()`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`transform<class_PhysicsShapeQueryParameters2D_property_transform>` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -62,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. @@ -79,12 +79,12 @@ If ``true``, the query will take :ref:`Area2D<class_Area2D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s into account. @@ -96,12 +96,12 @@ If ``true``, the query will take :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -113,12 +113,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject2D.get_rid<class_CollisionObject2D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject2D<class_CollisionObject2D>`-derived node. @@ -130,12 +130,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.0`` +:ref:`float<class_float>` **margin** = ``0.0`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) The collision margin for the shape. @@ -147,12 +147,12 @@ The collision margin for the shape. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **motion** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **motion** = ``Vector2(0, 0)`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_motion>` .. rst-class:: classref-property-setget -- void **set_motion** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_motion** **(** **)** +- |void| **set_motion**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_motion**\ (\ ) The motion of the shape being queried for. @@ -164,12 +164,12 @@ The motion of the shape being queried for. .. rst-class:: classref-property -:ref:`Resource<class_Resource>` **shape** +:ref:`Resource<class_Resource>` **shape** :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Resource<class_Resource>` value **)** -- :ref:`Resource<class_Resource>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Resource<class_Resource>`\ ) +- :ref:`Resource<class_Resource>` **get_shape**\ (\ ) The :ref:`Shape2D<class_Shape2D>` that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over :ref:`shape_rid<class_PhysicsShapeQueryParameters2D_property_shape_rid>`. @@ -181,12 +181,12 @@ The :ref:`Shape2D<class_Shape2D>` that will be used for collision/intersection q .. rst-class:: classref-property -:ref:`RID<class_RID>` **shape_rid** = ``RID()`` +:ref:`RID<class_RID>` **shape_rid** = ``RID()`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_shape_rid>` .. rst-class:: classref-property-setget -- void **set_shape_rid** **(** :ref:`RID<class_RID>` value **)** -- :ref:`RID<class_RID>` **get_shape_rid** **(** **)** +- |void| **set_shape_rid**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_shape_rid**\ (\ ) The queried shape's :ref:`RID<class_RID>` that will be used for collision/intersection queries. Use this over :ref:`shape<class_PhysicsShapeQueryParameters2D_property_shape>` if you want to optimize for performance using the Servers API: @@ -231,12 +231,12 @@ The queried shape's :ref:`RID<class_RID>` that will be used for collision/inters .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` +:ref:`Transform2D<class_Transform2D>` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗<class_PhysicsShapeQueryParameters2D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_transform**\ (\ ) The queried shape's transform matrix. @@ -247,3 +247,4 @@ The queried shape's transform matrix. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicsshapequeryparameters3d.rst b/classes/class_physicsshapequeryparameters3d.rst index e78180dc995..67ae0a513c6 100644 --- a/classes/class_physicsshapequeryparameters3d.rst +++ b/classes/class_physicsshapequeryparameters3d.rst @@ -29,25 +29,25 @@ Properties .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsShapeQueryParameters3D_property_collide_with_areas>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsShapeQueryParameters3D_property_collide_with_bodies>` | ``true`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsShapeQueryParameters3D_property_collision_mask>` | ``4294967295`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude<class_PhysicsShapeQueryParameters3D_property_exclude>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`margin<class_PhysicsShapeQueryParameters3D_property_margin>` | ``0.0`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsShapeQueryParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`shape<class_PhysicsShapeQueryParameters3D_property_shape>` | | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shape_rid<class_PhysicsShapeQueryParameters3D_property_shape_rid>` | ``RID()`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_PhysicsShapeQueryParameters3D_property_transform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_areas<class_PhysicsShapeQueryParameters3D_property_collide_with_areas>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_bodies<class_PhysicsShapeQueryParameters3D_property_collide_with_bodies>` | ``true`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`collision_mask<class_PhysicsShapeQueryParameters3D_property_collision_mask>` | ``4294967295`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude<class_PhysicsShapeQueryParameters3D_property_exclude>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`margin<class_PhysicsShapeQueryParameters3D_property_margin>` | ``0.0`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsShapeQueryParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`shape<class_PhysicsShapeQueryParameters3D_property_shape>` | | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shape_rid<class_PhysicsShapeQueryParameters3D_property_shape_rid>` | ``RID()`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`transform<class_PhysicsShapeQueryParameters3D_property_transform>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. @@ -79,12 +79,12 @@ If ``true``, the query will take :ref:`Area3D<class_Area3D>`\ s into account. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s into account. @@ -96,12 +96,12 @@ If ``true``, the query will take :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s in .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``4294967295`` +:ref:`int<class_int>` **collision_mask** = ``4294967295`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -113,12 +113,12 @@ The physics layers the query will detect (as a bitmask). By default, all collisi .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude** = ``[]`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_exclude>` .. rst-class:: classref-property-setget -- void **set_exclude** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude** **(** **)** +- |void| **set_exclude**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude**\ (\ ) The list of object :ref:`RID<class_RID>`\ s that will be excluded from collisions. Use :ref:`CollisionObject3D.get_rid<class_CollisionObject3D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject3D<class_CollisionObject3D>`-derived node. @@ -130,12 +130,12 @@ The list of object :ref:`RID<class_RID>`\ s that will be excluded from collision .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.0`` +:ref:`float<class_float>` **margin** = ``0.0`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) The collision margin for the shape. @@ -147,12 +147,12 @@ The collision margin for the shape. .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **motion** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **motion** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_motion>` .. rst-class:: classref-property-setget -- void **set_motion** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_motion** **(** **)** +- |void| **set_motion**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_motion**\ (\ ) The motion of the shape being queried for. @@ -164,12 +164,12 @@ The motion of the shape being queried for. .. rst-class:: classref-property -:ref:`Resource<class_Resource>` **shape** +:ref:`Resource<class_Resource>` **shape** :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Resource<class_Resource>` value **)** -- :ref:`Resource<class_Resource>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Resource<class_Resource>`\ ) +- :ref:`Resource<class_Resource>` **get_shape**\ (\ ) The :ref:`Shape3D<class_Shape3D>` that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over :ref:`shape_rid<class_PhysicsShapeQueryParameters3D_property_shape_rid>`. @@ -181,12 +181,12 @@ The :ref:`Shape3D<class_Shape3D>` that will be used for collision/intersection q .. rst-class:: classref-property -:ref:`RID<class_RID>` **shape_rid** = ``RID()`` +:ref:`RID<class_RID>` **shape_rid** = ``RID()`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_shape_rid>` .. rst-class:: classref-property-setget -- void **set_shape_rid** **(** :ref:`RID<class_RID>` value **)** -- :ref:`RID<class_RID>` **get_shape_rid** **(** **)** +- |void| **set_shape_rid**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_shape_rid**\ (\ ) The queried shape's :ref:`RID<class_RID>` that will be used for collision/intersection queries. Use this over :ref:`shape<class_PhysicsShapeQueryParameters3D_property_shape>` if you want to optimize for performance using the Servers API: @@ -231,12 +231,12 @@ The queried shape's :ref:`RID<class_RID>` that will be used for collision/inters .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicsShapeQueryParameters3D_property_transform>` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_transform**\ (\ ) The queried shape's transform matrix. @@ -247,3 +247,4 @@ The queried shape's transform matrix. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicstestmotionparameters2d.rst b/classes/class_physicstestmotionparameters2d.rst index be979a5cc98..7c57d1d9620 100644 --- a/classes/class_physicstestmotionparameters2d.rst +++ b/classes/class_physicstestmotionparameters2d.rst @@ -29,21 +29,21 @@ Properties .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters2D_property_collide_separation_ray>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude_bodies<class_PhysicsTestMotionParameters2D_property_exclude_bodies>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int[]<class_int>` | :ref:`exclude_objects<class_PhysicsTestMotionParameters2D_property_exclude_objects>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`from<class_PhysicsTestMotionParameters2D_property_from>` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters2D_property_margin>` | ``0.08`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`motion<class_PhysicsTestMotionParameters2D_property_motion>` | ``Vector2(0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`bool<class_bool>` | :ref:`recovery_as_collision<class_PhysicsTestMotionParameters2D_property_recovery_as_collision>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters2D_property_collide_separation_ray>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude_bodies<class_PhysicsTestMotionParameters2D_property_exclude_bodies>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] | :ref:`exclude_objects<class_PhysicsTestMotionParameters2D_property_exclude_objects>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`from<class_PhysicsTestMotionParameters2D_property_from>` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters2D_property_margin>` | ``0.08`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`motion<class_PhysicsTestMotionParameters2D_property_motion>` | ``Vector2(0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool<class_bool>` | :ref:`recovery_as_collision<class_PhysicsTestMotionParameters2D_property_recovery_as_collision>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -58,12 +58,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_separation_ray** = ``false`` +:ref:`bool<class_bool>` **collide_separation_ray** = ``false`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_collide_separation_ray>` .. rst-class:: classref-property-setget -- void **set_collide_separation_ray_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_separation_ray_enabled** **(** **)** +- |void| **set_collide_separation_ray_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_separation_ray_enabled**\ (\ ) If set to ``true``, shapes of type :ref:`PhysicsServer2D.SHAPE_SEPARATION_RAY<class_PhysicsServer2D_constant_SHAPE_SEPARATION_RAY>` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. @@ -77,12 +77,12 @@ If set to ``false``, shapes of type :ref:`PhysicsServer2D.SHAPE_SEPARATION_RAY<c .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude_bodies** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude_bodies** = ``[]`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_exclude_bodies>` .. rst-class:: classref-property-setget -- void **set_exclude_bodies** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude_bodies** **(** **)** +- |void| **set_exclude_bodies**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude_bodies**\ (\ ) Optional array of body :ref:`RID<class_RID>` to exclude from collision. Use :ref:`CollisionObject2D.get_rid<class_CollisionObject2D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject2D<class_CollisionObject2D>`-derived node. @@ -94,12 +94,12 @@ Optional array of body :ref:`RID<class_RID>` to exclude from collision. Use :ref .. rst-class:: classref-property -:ref:`int[]<class_int>` **exclude_objects** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **exclude_objects** = ``[]`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_exclude_objects>` .. rst-class:: classref-property-setget -- void **set_exclude_objects** **(** :ref:`int[]<class_int>` value **)** -- :ref:`int[]<class_int>` **get_exclude_objects** **(** **)** +- |void| **set_exclude_objects**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`int<class_int>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_exclude_objects**\ (\ ) Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -111,12 +111,12 @@ Optional array of object unique instance ID to exclude from collision. See :ref: .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **from** = ``Transform2D(1, 0, 0, 1, 0, 0)`` +:ref:`Transform2D<class_Transform2D>` **from** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_from>` .. rst-class:: classref-property-setget -- void **set_from** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_from** **(** **)** +- |void| **set_from**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_from**\ (\ ) Transform in global space where the motion should start. Usually set to :ref:`Node2D.global_transform<class_Node2D_property_global_transform>` for the current body's transform. @@ -128,12 +128,12 @@ Transform in global space where the motion should start. Usually set to :ref:`No .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.08`` +:ref:`float<class_float>` **margin** = ``0.08`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) Increases the size of the shapes involved in the collision detection. @@ -145,12 +145,12 @@ Increases the size of the shapes involved in the collision detection. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **motion** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **motion** = ``Vector2(0, 0)`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_motion>` .. rst-class:: classref-property-setget -- void **set_motion** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_motion** **(** **)** +- |void| **set_motion**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_motion**\ (\ ) Motion vector to define the length and direction of the motion to test. @@ -162,12 +162,12 @@ Motion vector to define the length and direction of the motion to test. .. rst-class:: classref-property -:ref:`bool<class_bool>` **recovery_as_collision** = ``false`` +:ref:`bool<class_bool>` **recovery_as_collision** = ``false`` :ref:`🔗<class_PhysicsTestMotionParameters2D_property_recovery_as_collision>` .. rst-class:: classref-property-setget -- void **set_recovery_as_collision_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_recovery_as_collision_enabled** **(** **)** +- |void| **set_recovery_as_collision_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_recovery_as_collision_enabled**\ (\ ) If set to ``true``, any depenetration from the recovery phase is reported as a collision; this is used e.g. by :ref:`CharacterBody2D<class_CharacterBody2D>` for improving floor detection during floor snapping. @@ -180,3 +180,4 @@ If set to ``false``, only collisions resulting from the motion are reported, whi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicstestmotionparameters3d.rst b/classes/class_physicstestmotionparameters3d.rst index f3387458df8..e9325fa676b 100644 --- a/classes/class_physicstestmotionparameters3d.rst +++ b/classes/class_physicstestmotionparameters3d.rst @@ -29,23 +29,23 @@ Properties .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters3D_property_collide_separation_ray>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`exclude_bodies<class_PhysicsTestMotionParameters3D_property_exclude_bodies>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`int[]<class_int>` | :ref:`exclude_objects<class_PhysicsTestMotionParameters3D_property_exclude_objects>` | ``[]`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`from<class_PhysicsTestMotionParameters3D_property_from>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters3D_property_margin>` | ``0.001`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_collisions<class_PhysicsTestMotionParameters3D_property_max_collisions>` | ``1`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsTestMotionParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`recovery_as_collision<class_PhysicsTestMotionParameters3D_property_recovery_as_collision>` | ``false`` | - +---------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_separation_ray<class_PhysicsTestMotionParameters3D_property_collide_separation_ray>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`exclude_bodies<class_PhysicsTestMotionParameters3D_property_exclude_bodies>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] | :ref:`exclude_objects<class_PhysicsTestMotionParameters3D_property_exclude_objects>` | ``[]`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`from<class_PhysicsTestMotionParameters3D_property_from>` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`margin<class_PhysicsTestMotionParameters3D_property_margin>` | ``0.001`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_collisions<class_PhysicsTestMotionParameters3D_property_max_collisions>` | ``1`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`motion<class_PhysicsTestMotionParameters3D_property_motion>` | ``Vector3(0, 0, 0)`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`recovery_as_collision<class_PhysicsTestMotionParameters3D_property_recovery_as_collision>` | ``false`` | + +----------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,12 +60,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_separation_ray** = ``false`` +:ref:`bool<class_bool>` **collide_separation_ray** = ``false`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_collide_separation_ray>` .. rst-class:: classref-property-setget -- void **set_collide_separation_ray_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_separation_ray_enabled** **(** **)** +- |void| **set_collide_separation_ray_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_separation_ray_enabled**\ (\ ) If set to ``true``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY<class_PhysicsServer3D_constant_SHAPE_SEPARATION_RAY>` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. @@ -79,12 +79,12 @@ If set to ``false``, shapes of type :ref:`PhysicsServer3D.SHAPE_SEPARATION_RAY<c .. rst-class:: classref-property -:ref:`RID[]<class_RID>` **exclude_bodies** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **exclude_bodies** = ``[]`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_exclude_bodies>` .. rst-class:: classref-property-setget -- void **set_exclude_bodies** **(** :ref:`RID[]<class_RID>` value **)** -- :ref:`RID[]<class_RID>` **get_exclude_bodies** **(** **)** +- |void| **set_exclude_bodies**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_exclude_bodies**\ (\ ) Optional array of body :ref:`RID<class_RID>` to exclude from collision. Use :ref:`CollisionObject3D.get_rid<class_CollisionObject3D_method_get_rid>` to get the :ref:`RID<class_RID>` associated with a :ref:`CollisionObject3D<class_CollisionObject3D>`-derived node. @@ -96,12 +96,12 @@ Optional array of body :ref:`RID<class_RID>` to exclude from collision. Use :ref .. rst-class:: classref-property -:ref:`int[]<class_int>` **exclude_objects** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **exclude_objects** = ``[]`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_exclude_objects>` .. rst-class:: classref-property-setget -- void **set_exclude_objects** **(** :ref:`int[]<class_int>` value **)** -- :ref:`int[]<class_int>` **get_exclude_objects** **(** **)** +- |void| **set_exclude_objects**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`int<class_int>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_exclude_objects**\ (\ ) Optional array of object unique instance ID to exclude from collision. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -113,12 +113,12 @@ Optional array of object unique instance ID to exclude from collision. See :ref: .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **from** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **from** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_from>` .. rst-class:: classref-property-setget -- void **set_from** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_from** **(** **)** +- |void| **set_from**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_from**\ (\ ) Transform in global space where the motion should start. Usually set to :ref:`Node3D.global_transform<class_Node3D_property_global_transform>` for the current body's transform. @@ -130,12 +130,12 @@ Transform in global space where the motion should start. Usually set to :ref:`No .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.001`` +:ref:`float<class_float>` **margin** = ``0.001`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) Increases the size of the shapes involved in the collision detection. @@ -147,12 +147,12 @@ Increases the size of the shapes involved in the collision detection. .. rst-class:: classref-property -:ref:`int<class_int>` **max_collisions** = ``1`` +:ref:`int<class_int>` **max_collisions** = ``1`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_max_collisions>` .. rst-class:: classref-property-setget -- void **set_max_collisions** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_collisions** **(** **)** +- |void| **set_max_collisions**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_collisions**\ (\ ) Maximum number of returned collisions, between ``1`` and ``32``. Always returns the deepest detected collisions. @@ -164,12 +164,12 @@ Maximum number of returned collisions, between ``1`` and ``32``. Always returns .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **motion** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **motion** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_motion>` .. rst-class:: classref-property-setget -- void **set_motion** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_motion** **(** **)** +- |void| **set_motion**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_motion**\ (\ ) Motion vector to define the length and direction of the motion to test. @@ -181,12 +181,12 @@ Motion vector to define the length and direction of the motion to test. .. rst-class:: classref-property -:ref:`bool<class_bool>` **recovery_as_collision** = ``false`` +:ref:`bool<class_bool>` **recovery_as_collision** = ``false`` :ref:`🔗<class_PhysicsTestMotionParameters3D_property_recovery_as_collision>` .. rst-class:: classref-property-setget -- void **set_recovery_as_collision_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_recovery_as_collision_enabled** **(** **)** +- |void| **set_recovery_as_collision_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_recovery_as_collision_enabled**\ (\ ) If set to ``true``, any depenetration from the recovery phase is reported as a collision; this is used e.g. by :ref:`CharacterBody3D<class_CharacterBody3D>` for improving floor detection during floor snapping. @@ -199,3 +199,4 @@ If set to ``false``, only collisions resulting from the motion are reported, whi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicstestmotionresult2d.rst b/classes/class_physicstestmotionresult2d.rst index aa08bf5e5df..7d141717112 100644 --- a/classes/class_physicstestmotionresult2d.rst +++ b/classes/class_physicstestmotionresult2d.rst @@ -29,33 +29,33 @@ Methods .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult2D_method_get_collider>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult2D_method_get_collider_id>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult2D_method_get_collider_rid>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult2D_method_get_collider_shape>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult2D_method_get_collider_velocity>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult2D_method_get_collision_depth>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult2D_method_get_collision_local_shape>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult2D_method_get_collision_normal>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_PhysicsTestMotionResult2D_method_get_collision_point>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult2D_method_get_collision_safe_fraction>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult2D_method_get_collision_unsafe_fraction>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_remainder<class_PhysicsTestMotionResult2D_method_get_remainder>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_travel<class_PhysicsTestMotionResult2D_method_get_travel>` **(** **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult2D_method_get_collider>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult2D_method_get_collider_id>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult2D_method_get_collider_rid>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult2D_method_get_collider_shape>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult2D_method_get_collider_velocity>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult2D_method_get_collision_depth>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult2D_method_get_collision_local_shape>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult2D_method_get_collision_normal>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_PhysicsTestMotionResult2D_method_get_collision_point>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult2D_method_get_collision_safe_fraction>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult2D_method_get_collision_unsafe_fraction>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_remainder<class_PhysicsTestMotionResult2D_method_get_remainder>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_travel<class_PhysicsTestMotionResult2D_method_get_travel>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +70,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collider>` Returns the colliding body's attached :ref:`Object<class_Object>`, if a collision occurred. @@ -82,7 +82,7 @@ Returns the colliding body's attached :ref:`Object<class_Object>`, if a collisio .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_id** **(** **)** |const| +:ref:`int<class_int>` **get_collider_id**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collider_id>` Returns the unique instance ID of the colliding body's attached :ref:`Object<class_Object>`, if a collision occurred. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -94,7 +94,7 @@ Returns the unique instance ID of the colliding body's attached :ref:`Object<cla .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collider_rid>` Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>`, if a collision occurred. @@ -106,7 +106,7 @@ Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServ .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collider_shape>` Returns the colliding body's shape index, if a collision occurred. See :ref:`CollisionObject2D<class_CollisionObject2D>`. @@ -118,7 +118,7 @@ Returns the colliding body's shape index, if a collision occurred. See :ref:`Col .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collider_velocity** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collider_velocity**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collider_velocity>` Returns the colliding body's velocity, if a collision occurred. @@ -130,7 +130,7 @@ Returns the colliding body's velocity, if a collision occurred. .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_depth** **(** **)** |const| +:ref:`float<class_float>` **get_collision_depth**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_depth>` Returns the length of overlap along the collision normal, if a collision occurred. @@ -142,7 +142,7 @@ Returns the length of overlap along the collision normal, if a collision occurre .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_local_shape** **(** **)** |const| +:ref:`int<class_int>` **get_collision_local_shape**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_local_shape>` Returns the moving object's colliding shape, if a collision occurred. @@ -154,7 +154,7 @@ Returns the moving object's colliding shape, if a collision occurred. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_normal** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_normal**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_normal>` Returns the colliding body's shape's normal at the point of collision, if a collision occurred. @@ -166,7 +166,7 @@ Returns the colliding body's shape's normal at the point of collision, if a coll .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_point** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_point**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_point>` Returns the point of collision in global coordinates, if a collision occurred. @@ -178,7 +178,7 @@ Returns the point of collision in global coordinates, if a collision occurred. .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_safe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_safe_fraction>` Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``. @@ -190,7 +190,7 @@ Returns the maximum fraction of the motion that can occur without a collision, b .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_unsafe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_collision_unsafe_fraction>` Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``. @@ -202,7 +202,7 @@ Returns the minimum fraction of the motion needed to collide, if a collision occ .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_remainder** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_remainder**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_remainder>` Returns the moving object's remaining movement vector. @@ -214,7 +214,7 @@ Returns the moving object's remaining movement vector. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_travel** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_travel**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult2D_method_get_travel>` Returns the moving object's travel before collision. @@ -225,3 +225,4 @@ Returns the moving object's travel before collision. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_physicstestmotionresult3d.rst b/classes/class_physicstestmotionresult3d.rst index ff85e51dfa6..2608eb0eac2 100644 --- a/classes/class_physicstestmotionresult3d.rst +++ b/classes/class_physicstestmotionresult3d.rst @@ -29,35 +29,35 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult3D_method_get_collider>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult3D_method_get_collider_id>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult3D_method_get_collider_rid>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult3D_method_get_collider_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult3D_method_get_collider_velocity>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_count<class_PhysicsTestMotionResult3D_method_get_collision_count>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult3D_method_get_collision_depth>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult3D_method_get_collision_normal>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_PhysicsTestMotionResult3D_method_get_collision_point>` **(** :ref:`int<class_int>` collision_index=0 **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_PhysicsTestMotionResult3D_method_get_remainder>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_PhysicsTestMotionResult3D_method_get_travel>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_PhysicsTestMotionResult3D_method_get_collider>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_id<class_PhysicsTestMotionResult3D_method_get_collider_id>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_PhysicsTestMotionResult3D_method_get_collider_rid>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_PhysicsTestMotionResult3D_method_get_collider_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collider_velocity<class_PhysicsTestMotionResult3D_method_get_collider_velocity>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_count<class_PhysicsTestMotionResult3D_method_get_collision_count>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_depth<class_PhysicsTestMotionResult3D_method_get_collision_depth>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_local_shape<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_PhysicsTestMotionResult3D_method_get_collision_normal>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_PhysicsTestMotionResult3D_method_get_collision_point>`\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_safe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_unsafe_fraction<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_remainder<class_PhysicsTestMotionResult3D_method_get_remainder>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_travel<class_PhysicsTestMotionResult3D_method_get_travel>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,7 +72,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider>` Returns the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default), if a collision occurred. @@ -84,7 +84,7 @@ Returns the colliding body's attached :ref:`Object<class_Object>` given a collis .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_id** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`int<class_int>` **get_collider_id**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_id>` Returns the unique instance ID of the colliding body's attached :ref:`Object<class_Object>` given a collision index (the deepest collision by default), if a collision occurred. See :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`. @@ -96,7 +96,7 @@ Returns the unique instance ID of the colliding body's attached :ref:`Object<cla .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_rid>` Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` given a collision index (the deepest collision by default), if a collision occurred. @@ -108,7 +108,7 @@ Returns the colliding body's :ref:`RID<class_RID>` used by the :ref:`PhysicsServ .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_shape>` Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See :ref:`CollisionObject3D<class_CollisionObject3D>`. @@ -120,7 +120,7 @@ Returns the colliding body's shape index given a collision index (the deepest co .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collider_velocity** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_collider_velocity**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collider_velocity>` Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. @@ -132,7 +132,7 @@ Returns the colliding body's velocity given a collision index (the deepest colli .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_count** **(** **)** |const| +:ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_count>` Returns the number of detected collisions. @@ -144,7 +144,7 @@ Returns the number of detected collisions. .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_depth** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`float<class_float>` **get_collision_depth**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_depth>` Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. @@ -156,7 +156,7 @@ Returns the length of overlap along the collision normal given a collision index .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_local_shape** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`int<class_int>` **get_collision_local_shape**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_local_shape>` Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. @@ -168,7 +168,7 @@ Returns the moving object's colliding shape given a collision index (the deepest .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_normal** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_normal**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_normal>` Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred. @@ -180,7 +180,7 @@ Returns the colliding body's shape's normal at the point of collision given a co .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_point** **(** :ref:`int<class_int>` collision_index=0 **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ collision_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_point>` Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. @@ -192,7 +192,7 @@ Returns the point of collision in global coordinates given a collision index (th .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_safe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_safe_fraction>` Returns the maximum fraction of the motion that can occur without a collision, between ``0`` and ``1``. @@ -204,7 +204,7 @@ Returns the maximum fraction of the motion that can occur without a collision, b .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_unsafe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_collision_unsafe_fraction>` Returns the minimum fraction of the motion needed to collide, if a collision occurred, between ``0`` and ``1``. @@ -216,7 +216,7 @@ Returns the minimum fraction of the motion needed to collide, if a collision occ .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_remainder** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_remainder**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_remainder>` Returns the moving object's remaining movement vector. @@ -228,7 +228,7 @@ Returns the moving object's remaining movement vector. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_travel** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_travel**\ (\ ) |const| :ref:`🔗<class_PhysicsTestMotionResult3D_method_get_travel>` Returns the moving object's travel before collision. @@ -239,3 +239,4 @@ Returns the moving object's travel before collision. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pinjoint2d.rst b/classes/class_pinjoint2d.rst index 33406a916ab..c24843ce26f 100644 --- a/classes/class_pinjoint2d.rst +++ b/classes/class_pinjoint2d.rst @@ -29,9 +29,19 @@ Properties .. table:: :widths: auto - +---------------------------+-----------------------------------------------------+---------+ - | :ref:`float<class_float>` | :ref:`softness<class_PinJoint2D_property_softness>` | ``0.0`` | - +---------------------------+-----------------------------------------------------+---------+ + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`angular_limit_lower<class_PinJoint2D_property_angular_limit_lower>` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`angular_limit_upper<class_PinJoint2D_property_angular_limit_upper>` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`motor_enabled<class_PinJoint2D_property_motor_enabled>` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`motor_target_velocity<class_PinJoint2D_property_motor_target_velocity>` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`softness<class_PinJoint2D_property_softness>` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -42,16 +52,101 @@ Properties Property Descriptions --------------------- +.. _class_PinJoint2D_property_angular_limit_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **angular_limit_enabled** = ``false`` :ref:`🔗<class_PinJoint2D_property_angular_limit_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_angular_limit_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_angular_limit_enabled**\ (\ ) + +If ``true``, the pin maximum and minimum rotation, defined by :ref:`angular_limit_lower<class_PinJoint2D_property_angular_limit_lower>` and :ref:`angular_limit_upper<class_PinJoint2D_property_angular_limit_upper>` are applied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_angular_limit_lower: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **angular_limit_lower** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_angular_limit_lower>` + +.. rst-class:: classref-property-setget + +- |void| **set_angular_limit_lower**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_limit_lower**\ (\ ) + +The minimum rotation. Only active if :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_angular_limit_upper: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **angular_limit_upper** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_angular_limit_upper>` + +.. rst-class:: classref-property-setget + +- |void| **set_angular_limit_upper**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_limit_upper**\ (\ ) + +The maximum rotation. Only active if :ref:`angular_limit_enabled<class_PinJoint2D_property_angular_limit_enabled>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_motor_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **motor_enabled** = ``false`` :ref:`🔗<class_PinJoint2D_property_motor_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_motor_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_motor_enabled**\ (\ ) + +When activated, a motor turns the pin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_motor_target_velocity: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **motor_target_velocity** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_motor_target_velocity>` + +.. rst-class:: classref-property-setget + +- |void| **set_motor_target_velocity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_motor_target_velocity**\ (\ ) + +Target speed for the motor. In radians per second. + +.. rst-class:: classref-item-separator + +---- + .. _class_PinJoint2D_property_softness: .. rst-class:: classref-property -:ref:`float<class_float>` **softness** = ``0.0`` +:ref:`float<class_float>` **softness** = ``0.0`` :ref:`🔗<class_PinJoint2D_property_softness>` .. rst-class:: classref-property-setget -- void **set_softness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_softness** **(** **)** +- |void| **set_softness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_softness**\ (\ ) The higher this value, the more the bond to the pinned partner can flex. @@ -62,3 +157,4 @@ The higher this value, the more the bond to the pinned partner can flex. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pinjoint3d.rst b/classes/class_pinjoint3d.rst index 2dd6ced3659..d181620efa7 100644 --- a/classes/class_pinjoint3d.rst +++ b/classes/class_pinjoint3d.rst @@ -19,7 +19,7 @@ A physics joint that attaches two 3D physics bodies at a single point, allowing Description ----------- -A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. For example, a :ref:`RigidBody3D<class_RigidBody3D>` can be attached to a :ref:`StaticBody3D<class_StaticBody3D>` to create a pendulum or a seesaw. +A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. For example, a :ref:`RigidBody3D<class_RigidBody3D>` can be attached to a :ref:`StaticBody3D<class_StaticBody3D>` to create a pendulum or a seesaw. .. rst-class:: classref-reftable-group @@ -45,11 +45,11 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param<class_PinJoint3D_method_get_param>` **(** :ref:`Param<enum_PinJoint3D_Param>` param **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param<class_PinJoint3D_method_set_param>` **(** :ref:`Param<enum_PinJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param<class_PinJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param<class_PinJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,7 +64,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗<enum_PinJoint3D_Param>` .. _class_PinJoint3D_constant_PARAM_BIAS: @@ -103,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **params/bias** = ``0.3`` +:ref:`float<class_float>` **params/bias** = ``0.3`` :ref:`🔗<class_PinJoint3D_property_params/bias>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. @@ -120,12 +120,12 @@ The force with which the pinned objects stay in positional relation to each othe .. rst-class:: classref-property -:ref:`float<class_float>` **params/damping** = ``1.0`` +:ref:`float<class_float>` **params/damping** = ``1.0`` :ref:`🔗<class_PinJoint3D_property_params/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. @@ -137,12 +137,12 @@ The force with which the pinned objects stay in velocity relation to each other. .. rst-class:: classref-property -:ref:`float<class_float>` **params/impulse_clamp** = ``0.0`` +:ref:`float<class_float>` **params/impulse_clamp** = ``0.0`` :ref:`🔗<class_PinJoint3D_property_params/impulse_clamp>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| If above 0, this value is the maximum value for an impulse that this Joint3D produces. @@ -159,7 +159,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`\ ) |const| :ref:`🔗<class_PinJoint3D_method_get_param>` Returns the value of the specified parameter. @@ -171,7 +171,7 @@ Returns the value of the specified parameter. .. rst-class:: classref-method -void **set_param** **(** :ref:`Param<enum_PinJoint3D_Param>` param, :ref:`float<class_float>` value **)** +|void| **set_param**\ (\ param\: :ref:`Param<enum_PinJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PinJoint3D_method_set_param>` Sets the value of the specified parameter. @@ -182,3 +182,4 @@ Sets the value of the specified parameter. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdercubemap.rst b/classes/class_placeholdercubemap.rst index 676ca21d6cd..7ef72439ee3 100644 --- a/classes/class_placeholdercubemap.rst +++ b/classes/class_placeholdercubemap.rst @@ -12,20 +12,20 @@ PlaceholderCubemap **Inherits:** :ref:`PlaceholderTextureLayered<class_PlaceholderTextureLayered>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Placeholder class for a cubemap texture. +A :ref:`Cubemap<class_Cubemap>` without image data. .. rst-class:: classref-introduction-group Description ----------- -This class is used when loading a project that uses a :ref:`Cubemap<class_Cubemap>` subclass in 2 conditions: +This class replaces a :ref:`Cubemap<class_Cubemap>` or a :ref:`Cubemap<class_Cubemap>`-derived class in 2 conditions: -- When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +- In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. -- When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +- When the :ref:`Cubemap<class_Cubemap>`-derived class is missing, for example when using a different engine version. -\ **Note:** This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +\ **Note:** This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -34,3 +34,4 @@ This class is used when loading a project that uses a :ref:`Cubemap<class_Cubema .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdercubemaparray.rst b/classes/class_placeholdercubemaparray.rst index ff480e9b3b5..ecb54db1fd6 100644 --- a/classes/class_placeholdercubemaparray.rst +++ b/classes/class_placeholdercubemaparray.rst @@ -12,20 +12,20 @@ PlaceholderCubemapArray **Inherits:** :ref:`PlaceholderTextureLayered<class_PlaceholderTextureLayered>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Placeholder class for a cubemap texture array. +A :ref:`CubemapArray<class_CubemapArray>` without image data. .. rst-class:: classref-introduction-group Description ----------- -This class is used when loading a project that uses a :ref:`CubemapArray<class_CubemapArray>` subclass in 2 conditions: +This class replaces a :ref:`CubemapArray<class_CubemapArray>` or a :ref:`CubemapArray<class_CubemapArray>`-derived class in 2 conditions: -- When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +- In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. -- When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +- When the :ref:`CubemapArray<class_CubemapArray>`-derived class is missing, for example when using a different engine version. -\ **Note:** This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +\ **Note:** This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -34,3 +34,4 @@ This class is used when loading a project that uses a :ref:`CubemapArray<class_C .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdermaterial.rst b/classes/class_placeholdermaterial.rst index fa650d40940..f81701e0801 100644 --- a/classes/class_placeholdermaterial.rst +++ b/classes/class_placeholdermaterial.rst @@ -32,3 +32,4 @@ This class is used when loading a project that uses a :ref:`Material<class_Mater .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdermesh.rst b/classes/class_placeholdermesh.rst index c79e3e3668e..1e0c294abac 100644 --- a/classes/class_placeholdermesh.rst +++ b/classes/class_placeholdermesh.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` +:ref:`AABB<class_AABB>` **aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_PlaceholderMesh_property_aabb>` .. rst-class:: classref-property-setget -- void **set_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_aabb** **(** **)** +- |void| **set_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_aabb**\ (\ ) The smallest :ref:`AABB<class_AABB>` enclosing this mesh in local space. @@ -66,3 +66,4 @@ The smallest :ref:`AABB<class_AABB>` enclosing this mesh in local space. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdertexture2d.rst b/classes/class_placeholdertexture2d.rst index 0a6200b5eb5..8a2f2e534a6 100644 --- a/classes/class_placeholdertexture2d.rst +++ b/classes/class_placeholdertexture2d.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(1, 1)`` :ref:`🔗<class_PlaceholderTexture2D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size**\ (\ ) The texture's size (in pixels). @@ -70,3 +70,4 @@ The texture's size (in pixels). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdertexture2darray.rst b/classes/class_placeholdertexture2darray.rst index b4a2089227b..a4ccfb4f28d 100644 --- a/classes/class_placeholdertexture2darray.rst +++ b/classes/class_placeholdertexture2darray.rst @@ -34,3 +34,4 @@ This class is used when loading a project that uses a :ref:`Texture2D<class_Text .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdertexture3d.rst b/classes/class_placeholdertexture3d.rst index 84ca5baaec6..35545d95ced 100644 --- a/classes/class_placeholdertexture3d.rst +++ b/classes/class_placeholdertexture3d.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3i<class_Vector3i>` **size** = ``Vector3i(1, 1, 1)`` +:ref:`Vector3i<class_Vector3i>` **size** = ``Vector3i(1, 1, 1)`` :ref:`🔗<class_PlaceholderTexture3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3i<class_Vector3i>` value **)** -- :ref:`Vector3i<class_Vector3i>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3i<class_Vector3i>`\ ) +- :ref:`Vector3i<class_Vector3i>` **get_size**\ (\ ) The texture's size (in pixels). @@ -68,3 +68,4 @@ The texture's size (in pixels). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_placeholdertexturelayered.rst b/classes/class_placeholdertexturelayered.rst index af4141b6084..46e594af1fa 100644 --- a/classes/class_placeholdertexturelayered.rst +++ b/classes/class_placeholdertexturelayered.rst @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **layers** = ``1`` +:ref:`int<class_int>` **layers** = ``1`` :ref:`🔗<class_PlaceholderTextureLayered_property_layers>` .. rst-class:: classref-property-setget -- void **set_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_layers** **(** **)** +- |void| **set_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_layers**\ (\ ) The number of layers in the texture array. @@ -73,12 +73,12 @@ The number of layers in the texture array. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(1, 1)`` +:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(1, 1)`` :ref:`🔗<class_PlaceholderTextureLayered_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_size**\ (\ ) The size of each texture layer (in pixels). @@ -89,3 +89,4 @@ The size of each texture layer (in pixels). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_plane.rst b/classes/class_plane.rst index 170d3ec128a..cd689fd05f4 100644 --- a/classes/class_plane.rst +++ b/classes/class_plane.rst @@ -54,21 +54,21 @@ Constructors .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`Plane<class_Plane>` from **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b, :ref:`float<class_float>` c, :ref:`float<class_float>` d **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`Vector3<class_Vector3>` normal **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`Vector3<class_Vector3>` normal, :ref:`float<class_float>` d **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`Vector3<class_Vector3>` normal, :ref:`Vector3<class_Vector3>` point **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>` **(** :ref:`Vector3<class_Vector3>` point1, :ref:`Vector3<class_Vector3>` point2, :ref:`Vector3<class_Vector3>` point3 **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ from\: :ref:`Plane<class_Plane>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ a\: :ref:`float<class_float>`, b\: :ref:`float<class_float>`, c\: :ref:`float<class_float>`, d\: :ref:`float<class_float>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ normal\: :ref:`Vector3<class_Vector3>`, d\: :ref:`float<class_float>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ normal\: :ref:`Vector3<class_Vector3>`, point\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`Plane<class_Plane_constructor_Plane>`\ (\ point1\: :ref:`Vector3<class_Vector3>`, point2\: :ref:`Vector3<class_Vector3>`, point3\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -78,29 +78,29 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to<class_Plane_method_distance_to>` **(** :ref:`Vector3<class_Vector3>` point **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_center<class_Plane_method_get_center>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_point<class_Plane_method_has_point>` **(** :ref:`Vector3<class_Vector3>` point, :ref:`float<class_float>` tolerance=1e-05 **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`intersect_3<class_Plane_method_intersect_3>` **(** :ref:`Plane<class_Plane>` b, :ref:`Plane<class_Plane>` c **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`intersects_ray<class_Plane_method_intersects_ray>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`intersects_segment<class_Plane_method_intersects_segment>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Plane_method_is_equal_approx>` **(** :ref:`Plane<class_Plane>` to_plane **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Plane_method_is_finite>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_point_over<class_Plane_method_is_point_over>` **(** :ref:`Vector3<class_Vector3>` point **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`normalized<class_Plane_method_normalized>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`project<class_Plane_method_project>` **(** :ref:`Vector3<class_Vector3>` point **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Plane_method_distance_to>`\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_center<class_Plane_method_get_center>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_point<class_Plane_method_has_point>`\ (\ point\: :ref:`Vector3<class_Vector3>`, tolerance\: :ref:`float<class_float>` = 1e-05\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`intersect_3<class_Plane_method_intersect_3>`\ (\ b\: :ref:`Plane<class_Plane>`, c\: :ref:`Plane<class_Plane>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`intersects_ray<class_Plane_method_intersects_ray>`\ (\ from\: :ref:`Vector3<class_Vector3>`, dir\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`intersects_segment<class_Plane_method_intersects_segment>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Plane_method_is_equal_approx>`\ (\ to_plane\: :ref:`Plane<class_Plane>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Plane_method_is_finite>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_point_over<class_Plane_method_is_point_over>`\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`normalized<class_Plane_method_normalized>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`project<class_Plane_method_project>`\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -110,17 +110,17 @@ Operators .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Plane_operator_neq_Plane>` **(** :ref:`Plane<class_Plane>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`operator *<class_Plane_operator_mul_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Plane_operator_eq_Plane>` **(** :ref:`Plane<class_Plane>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`operator unary+<class_Plane_operator_unplus>` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`operator unary-<class_Plane_operator_unminus>` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Plane_operator_neq_Plane>`\ (\ right\: :ref:`Plane<class_Plane>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`operator *<class_Plane_operator_mul_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Plane_operator_eq_Plane>`\ (\ right\: :ref:`Plane<class_Plane>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`operator unary+<class_Plane_operator_unplus>`\ (\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`operator unary-<class_Plane_operator_unminus>`\ (\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -135,7 +135,7 @@ Constants .. rst-class:: classref-constant -**PLANE_YZ** = ``Plane(1, 0, 0, 0)`` +**PLANE_YZ** = ``Plane(1, 0, 0, 0)`` :ref:`🔗<class_Plane_constant_PLANE_YZ>` A plane that extends in the Y and Z axes (normal vector points +X). @@ -143,7 +143,7 @@ A plane that extends in the Y and Z axes (normal vector points +X). .. rst-class:: classref-constant -**PLANE_XZ** = ``Plane(0, 1, 0, 0)`` +**PLANE_XZ** = ``Plane(0, 1, 0, 0)`` :ref:`🔗<class_Plane_constant_PLANE_XZ>` A plane that extends in the X and Z axes (normal vector points +Y). @@ -151,7 +151,7 @@ A plane that extends in the X and Z axes (normal vector points +Y). .. rst-class:: classref-constant -**PLANE_XY** = ``Plane(0, 0, 1, 0)`` +**PLANE_XY** = ``Plane(0, 0, 1, 0)`` :ref:`🔗<class_Plane_constant_PLANE_XY>` A plane that extends in the X and Y axes (normal vector points +Z). @@ -168,7 +168,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **d** = ``0.0`` +:ref:`float<class_float>` **d** = ``0.0`` :ref:`🔗<class_Plane_property_d>` The distance from the origin to the plane, expressed in terms of :ref:`normal<class_Plane_property_normal>` (according to its direction and magnitude). Actual absolute distance from the origin to the plane can be calculated as ``abs(d) / normal.length()`` (if :ref:`normal<class_Plane_property_normal>` has zero length then this **Plane** does not represent a valid plane). @@ -182,7 +182,7 @@ In the scalar equation of the plane ``ax + by + cz = d``, this is ``d``, while t .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **normal** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **normal** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Plane_property_normal>` The normal of the plane, typically a unit vector. Shouldn't be a zero vector as **Plane** with such :ref:`normal<class_Plane_property_normal>` does not represent a valid plane. @@ -196,7 +196,7 @@ In the scalar equation of the plane ``ax + by + cz = d``, this is the vector ``( .. rst-class:: classref-property -:ref:`float<class_float>` **x** = ``0.0`` +:ref:`float<class_float>` **x** = ``0.0`` :ref:`🔗<class_Plane_property_x>` The X component of the plane's :ref:`normal<class_Plane_property_normal>` vector. @@ -208,7 +208,7 @@ The X component of the plane's :ref:`normal<class_Plane_property_normal>` vector .. rst-class:: classref-property -:ref:`float<class_float>` **y** = ``0.0`` +:ref:`float<class_float>` **y** = ``0.0`` :ref:`🔗<class_Plane_property_y>` The Y component of the plane's :ref:`normal<class_Plane_property_normal>` vector. @@ -220,7 +220,7 @@ The Y component of the plane's :ref:`normal<class_Plane_property_normal>` vector .. rst-class:: classref-property -:ref:`float<class_float>` **z** = ``0.0`` +:ref:`float<class_float>` **z** = ``0.0`` :ref:`🔗<class_Plane_property_z>` The Z component of the plane's :ref:`normal<class_Plane_property_normal>` vector. @@ -237,7 +237,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ ) :ref:`🔗<class_Plane_constructor_Plane>` Constructs a default-initialized **Plane** with all components set to ``0``. @@ -247,7 +247,7 @@ Constructs a default-initialized **Plane** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`Plane<class_Plane>` from **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ from\: :ref:`Plane<class_Plane>`\ ) Constructs a **Plane** as a copy of the given **Plane**. @@ -257,7 +257,7 @@ Constructs a **Plane** as a copy of the given **Plane**. .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b, :ref:`float<class_float>` c, :ref:`float<class_float>` d **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ a\: :ref:`float<class_float>`, b\: :ref:`float<class_float>`, c\: :ref:`float<class_float>`, d\: :ref:`float<class_float>`\ ) Creates a plane from the four parameters. The three components of the resulting plane's :ref:`normal<class_Plane_property_normal>` are ``a``, ``b`` and ``c``, and the plane has a distance of ``d`` from the origin. @@ -267,7 +267,7 @@ Creates a plane from the four parameters. The three components of the resulting .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` normal **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) Creates a plane from the normal vector. The plane will intersect the origin. @@ -279,7 +279,7 @@ The ``normal`` of the plane must be a unit vector. .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` normal, :ref:`float<class_float>` d **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ normal\: :ref:`Vector3<class_Vector3>`, d\: :ref:`float<class_float>`\ ) Creates a plane from the normal vector and the plane's distance from the origin. @@ -291,7 +291,7 @@ The ``normal`` of the plane must be a unit vector. .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` normal, :ref:`Vector3<class_Vector3>` point **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ normal\: :ref:`Vector3<class_Vector3>`, point\: :ref:`Vector3<class_Vector3>`\ ) Creates a plane from the normal vector and a point on the plane. @@ -303,7 +303,7 @@ The ``normal`` of the plane must be a unit vector. .. rst-class:: classref-constructor -:ref:`Plane<class_Plane>` **Plane** **(** :ref:`Vector3<class_Vector3>` point1, :ref:`Vector3<class_Vector3>` point2, :ref:`Vector3<class_Vector3>` point3 **)** +:ref:`Plane<class_Plane>` **Plane**\ (\ point1\: :ref:`Vector3<class_Vector3>`, point2\: :ref:`Vector3<class_Vector3>`, point3\: :ref:`Vector3<class_Vector3>`\ ) Creates a plane from the three points, given in clockwise order. @@ -320,7 +320,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to** **(** :ref:`Vector3<class_Vector3>` point **)** |const| +:ref:`float<class_float>` **distance_to**\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Plane_method_distance_to>` Returns the shortest distance from the plane to the position ``point``. If the point is above the plane, the distance will be positive. If below, the distance will be negative. @@ -332,7 +332,7 @@ Returns the shortest distance from the plane to the position ``point``. If the p .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_center** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_center**\ (\ ) |const| :ref:`🔗<class_Plane_method_get_center>` Returns the center of the plane. @@ -344,7 +344,7 @@ Returns the center of the plane. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_point** **(** :ref:`Vector3<class_Vector3>` point, :ref:`float<class_float>` tolerance=1e-05 **)** |const| +:ref:`bool<class_bool>` **has_point**\ (\ point\: :ref:`Vector3<class_Vector3>`, tolerance\: :ref:`float<class_float>` = 1e-05\ ) |const| :ref:`🔗<class_Plane_method_has_point>` Returns ``true`` if ``point`` is inside the plane. Comparison uses a custom minimum ``tolerance`` threshold. @@ -356,7 +356,7 @@ Returns ``true`` if ``point`` is inside the plane. Comparison uses a custom mini .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **intersect_3** **(** :ref:`Plane<class_Plane>` b, :ref:`Plane<class_Plane>` c **)** |const| +:ref:`Variant<class_Variant>` **intersect_3**\ (\ b\: :ref:`Plane<class_Plane>`, c\: :ref:`Plane<class_Plane>`\ ) |const| :ref:`🔗<class_Plane_method_intersect_3>` Returns the intersection point of the three planes ``b``, ``c`` and this plane. If no intersection is found, ``null`` is returned. @@ -368,7 +368,7 @@ Returns the intersection point of the three planes ``b``, ``c`` and this plane. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **intersects_ray** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` dir **)** |const| +:ref:`Variant<class_Variant>` **intersects_ray**\ (\ from\: :ref:`Vector3<class_Vector3>`, dir\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Plane_method_intersects_ray>` Returns the intersection point of a ray consisting of the position ``from`` and the direction normal ``dir`` with this plane. If no intersection is found, ``null`` is returned. @@ -380,7 +380,7 @@ Returns the intersection point of a ray consisting of the position ``from`` and .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **intersects_segment** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`Variant<class_Variant>` **intersects_segment**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Plane_method_intersects_segment>` Returns the intersection point of a segment from position ``from`` to position ``to`` with this plane. If no intersection is found, ``null`` is returned. @@ -392,7 +392,7 @@ Returns the intersection point of a segment from position ``from`` to position ` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Plane<class_Plane>` to_plane **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ to_plane\: :ref:`Plane<class_Plane>`\ ) |const| :ref:`🔗<class_Plane_method_is_equal_approx>` Returns ``true`` if this plane and ``to_plane`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. @@ -404,7 +404,7 @@ Returns ``true`` if this plane and ``to_plane`` are approximately equal, by runn .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Plane_method_is_finite>` Returns ``true`` if this plane is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -416,7 +416,7 @@ Returns ``true`` if this plane is finite, by calling :ref:`@GlobalScope.is_finit .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_point_over** **(** :ref:`Vector3<class_Vector3>` point **)** |const| +:ref:`bool<class_bool>` **is_point_over**\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Plane_method_is_point_over>` Returns ``true`` if ``point`` is located above the plane. @@ -428,7 +428,7 @@ Returns ``true`` if ``point`` is located above the plane. .. rst-class:: classref-method -:ref:`Plane<class_Plane>` **normalized** **(** **)** |const| +:ref:`Plane<class_Plane>` **normalized**\ (\ ) |const| :ref:`🔗<class_Plane_method_normalized>` Returns a copy of the plane, with normalized :ref:`normal<class_Plane_property_normal>` (so it's a unit vector). Returns ``Plane(0, 0, 0, 0)`` if :ref:`normal<class_Plane_property_normal>` can't be normalized (it has zero length). @@ -440,7 +440,7 @@ Returns a copy of the plane, with normalized :ref:`normal<class_Plane_property_n .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **project** **(** :ref:`Vector3<class_Vector3>` point **)** |const| +:ref:`Vector3<class_Vector3>` **project**\ (\ point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Plane_method_project>` Returns the orthogonal projection of ``point`` into a point in the plane. @@ -457,7 +457,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Plane<class_Plane>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_Plane_operator_neq_Plane>` Returns ``true`` if the planes are not equal. @@ -471,10 +471,12 @@ Returns ``true`` if the planes are not equal. .. rst-class:: classref-operator -:ref:`Plane<class_Plane>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`Plane<class_Plane>` **operator ***\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Plane_operator_mul_Transform3D>` Inversely transforms (multiplies) the **Plane** by the given :ref:`Transform3D<class_Transform3D>` transformation matrix. +\ ``plane * transform`` is equivalent to ``transform.affine_inverse() * plane``. See :ref:`Transform3D.affine_inverse<class_Transform3D_method_affine_inverse>`. + .. rst-class:: classref-item-separator ---- @@ -483,7 +485,7 @@ Inversely transforms (multiplies) the **Plane** by the given :ref:`Transform3D<c .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Plane<class_Plane>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_Plane_operator_eq_Plane>` Returns ``true`` if the planes are exactly equal. @@ -497,7 +499,7 @@ Returns ``true`` if the planes are exactly equal. .. rst-class:: classref-operator -:ref:`Plane<class_Plane>` **operator unary+** **(** **)** +:ref:`Plane<class_Plane>` **operator unary+**\ (\ ) :ref:`🔗<class_Plane_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -509,7 +511,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Plane<class_Plane>` **operator unary-** **(** **)** +:ref:`Plane<class_Plane>` **operator unary-**\ (\ ) :ref:`🔗<class_Plane_operator_unminus>` Returns the negative value of the **Plane**. This is the same as writing ``Plane(-p.normal, -p.d)``. This operation flips the direction of the normal vector and also flips the distance value, resulting in a Plane that is in the same place, but facing the opposite direction. @@ -520,3 +522,4 @@ Returns the negative value of the **Plane**. This is the same as writing ``Plane .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_planemesh.rst b/classes/class_planemesh.rst index d03789737a1..7291f9a132d 100644 --- a/classes/class_planemesh.rst +++ b/classes/class_planemesh.rst @@ -58,7 +58,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Orientation**: +enum **Orientation**: :ref:`🔗<enum_PlaneMesh_Orientation>` .. _class_PlaneMesh_constant_FACE_X: @@ -97,12 +97,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **center_offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **center_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_PlaneMesh_property_center_offset>` .. rst-class:: classref-property-setget -- void **set_center_offset** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_center_offset** **(** **)** +- |void| **set_center_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_center_offset**\ (\ ) Offset of the generated plane. Useful for particles. @@ -114,12 +114,12 @@ Offset of the generated plane. Useful for particles. .. rst-class:: classref-property -:ref:`Orientation<enum_PlaneMesh_Orientation>` **orientation** = ``1`` +:ref:`Orientation<enum_PlaneMesh_Orientation>` **orientation** = ``1`` :ref:`🔗<class_PlaneMesh_property_orientation>` .. rst-class:: classref-property-setget -- void **set_orientation** **(** :ref:`Orientation<enum_PlaneMesh_Orientation>` value **)** -- :ref:`Orientation<enum_PlaneMesh_Orientation>` **get_orientation** **(** **)** +- |void| **set_orientation**\ (\ value\: :ref:`Orientation<enum_PlaneMesh_Orientation>`\ ) +- :ref:`Orientation<enum_PlaneMesh_Orientation>` **get_orientation**\ (\ ) Direction that the **PlaneMesh** is facing. See :ref:`Orientation<enum_PlaneMesh_Orientation>` for options. @@ -131,12 +131,12 @@ Direction that the **PlaneMesh** is facing. See :ref:`Orientation<enum_PlaneMesh .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(2, 2)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(2, 2)`` :ref:`🔗<class_PlaneMesh_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size**\ (\ ) Size of the generated plane. @@ -148,12 +148,12 @@ Size of the generated plane. .. rst-class:: classref-property -:ref:`int<class_int>` **subdivide_depth** = ``0`` +:ref:`int<class_int>` **subdivide_depth** = ``0`` :ref:`🔗<class_PlaneMesh_property_subdivide_depth>` .. rst-class:: classref-property-setget -- void **set_subdivide_depth** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_subdivide_depth** **(** **)** +- |void| **set_subdivide_depth**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_subdivide_depth**\ (\ ) Number of subdivision along the Z axis. @@ -165,12 +165,12 @@ Number of subdivision along the Z axis. .. rst-class:: classref-property -:ref:`int<class_int>` **subdivide_width** = ``0`` +:ref:`int<class_int>` **subdivide_width** = ``0`` :ref:`🔗<class_PlaneMesh_property_subdivide_width>` .. rst-class:: classref-property-setget -- void **set_subdivide_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_subdivide_width** **(** **)** +- |void| **set_subdivide_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_subdivide_width**\ (\ ) Number of subdivision along the X axis. @@ -181,3 +181,4 @@ Number of subdivision along the X axis. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pointlight2d.rst b/classes/class_pointlight2d.rst index 02376873015..d80a2c49736 100644 --- a/classes/class_pointlight2d.rst +++ b/classes/class_pointlight2d.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: omni, spot + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -59,12 +62,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **height** = ``0.0`` +:ref:`float<class_float>` **height** = ``0.0`` :ref:`🔗<class_PointLight2D_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height**\ (\ ) The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane. @@ -76,12 +79,12 @@ The height of the light. Used with 2D normal mapping. The units are in pixels, e .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_PointLight2D_property_offset>` .. rst-class:: classref-property-setget -- void **set_texture_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_texture_offset** **(** **)** +- |void| **set_texture_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_texture_offset**\ (\ ) The offset of the light's :ref:`texture<class_PointLight2D_property_texture>`. @@ -93,12 +96,12 @@ The offset of the light's :ref:`texture<class_PointLight2D_property_texture>`. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_PointLight2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` used for the light's appearance. @@ -110,12 +113,12 @@ The offset of the light's :ref:`texture<class_PointLight2D_property_texture>`. .. rst-class:: classref-property -:ref:`float<class_float>` **texture_scale** = ``1.0`` +:ref:`float<class_float>` **texture_scale** = ``1.0`` :ref:`🔗<class_PointLight2D_property_texture_scale>` .. rst-class:: classref-property-setget -- void **set_texture_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_texture_scale** **(** **)** +- |void| **set_texture_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_scale**\ (\ ) The :ref:`texture<class_PointLight2D_property_texture>`'s scale factor. @@ -126,3 +129,4 @@ The :ref:`texture<class_PointLight2D_property_texture>`'s scale factor. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_pointmesh.rst b/classes/class_pointmesh.rst index c49ce21d134..f8db8f2a2ba 100644 --- a/classes/class_pointmesh.rst +++ b/classes/class_pointmesh.rst @@ -32,3 +32,4 @@ When using PointMeshes, properties that normally alter vertices will be ignored, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_polygon2d.rst b/classes/class_polygon2d.rst index 1344c10f94d..3ccc0cef189 100644 --- a/classes/class_polygon2d.rst +++ b/classes/class_polygon2d.rst @@ -71,23 +71,23 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_bone<class_Polygon2D_method_add_bone>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_bones<class_Polygon2D_method_clear_bones>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_bone<class_Polygon2D_method_erase_bone>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_count<class_Polygon2D_method_get_bone_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_bone_path<class_Polygon2D_method_get_bone_path>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_bone_weights<class_Polygon2D_method_get_bone_weights>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_path<class_Polygon2D_method_set_bone_path>` **(** :ref:`int<class_int>` index, :ref:`NodePath<class_NodePath>` path **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_weights<class_Polygon2D_method_set_bone_weights>` **(** :ref:`int<class_int>` index, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_bone<class_Polygon2D_method_add_bone>`\ (\ path\: :ref:`NodePath<class_NodePath>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bones<class_Polygon2D_method_clear_bones>`\ (\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_bone<class_Polygon2D_method_erase_bone>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_count<class_Polygon2D_method_get_bone_count>`\ (\ ) |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_bone_path<class_Polygon2D_method_get_bone_path>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`get_bone_weights<class_Polygon2D_method_get_bone_weights>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_path<class_Polygon2D_method_set_bone_path>`\ (\ index\: :ref:`int<class_int>`, path\: :ref:`NodePath<class_NodePath>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_weights<class_Polygon2D_method_set_bone_weights>`\ (\ index\: :ref:`int<class_int>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -102,12 +102,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **antialiased** = ``false`` +:ref:`bool<class_bool>` **antialiased** = ``false`` :ref:`🔗<class_Polygon2D_property_antialiased>` .. rst-class:: classref-property-setget -- void **set_antialiased** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_antialiased** **(** **)** +- |void| **set_antialiased**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_antialiased**\ (\ ) If ``true``, polygon edges will be anti-aliased. @@ -119,7 +119,7 @@ If ``true``, polygon edges will be anti-aliased. .. rst-class:: classref-property -:ref:`Array<class_Array>` **bones** = ``[]`` +:ref:`Array<class_Array>` **bones** = ``[]`` :ref:`🔗<class_Polygon2D_property_bones>` Internal list of :ref:`Bone2D<class_Bone2D>` nodes used by the assigned :ref:`skeleton<class_Polygon2D_property_skeleton>`. Edited using the Polygon2D editor ("UV" button on the top toolbar). @@ -131,14 +131,14 @@ Internal list of :ref:`Bone2D<class_Bone2D>` nodes used by the assigned :ref:`sk .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Polygon2D_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) -The polygon's fill color. If ``texture`` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in ``vertex_colors``. +The polygon's fill color. If :ref:`texture<class_Polygon2D_property_texture>` is set, it will be multiplied by this color. It will also be the default color for vertices not set in :ref:`vertex_colors<class_Polygon2D_property_vertex_colors>`. .. rst-class:: classref-item-separator @@ -148,12 +148,12 @@ The polygon's fill color. If ``texture`` is defined, it will be multiplied by th .. rst-class:: classref-property -:ref:`int<class_int>` **internal_vertex_count** = ``0`` +:ref:`int<class_int>` **internal_vertex_count** = ``0`` :ref:`🔗<class_Polygon2D_property_internal_vertex_count>` .. rst-class:: classref-property-setget -- void **set_internal_vertex_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_internal_vertex_count** **(** **)** +- |void| **set_internal_vertex_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_internal_vertex_count**\ (\ ) Number of internal vertices, used for UV mapping. @@ -165,12 +165,12 @@ Number of internal vertices, used for UV mapping. .. rst-class:: classref-property -:ref:`float<class_float>` **invert_border** = ``100.0`` +:ref:`float<class_float>` **invert_border** = ``100.0`` :ref:`🔗<class_Polygon2D_property_invert_border>` .. rst-class:: classref-property-setget -- void **set_invert_border** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_invert_border** **(** **)** +- |void| **set_invert_border**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_invert_border**\ (\ ) Added padding applied to the bounding box when :ref:`invert_enabled<class_Polygon2D_property_invert_enabled>` is set to ``true``. Setting this value too small may result in a "Bad Polygon" error. @@ -182,12 +182,12 @@ Added padding applied to the bounding box when :ref:`invert_enabled<class_Polygo .. rst-class:: classref-property -:ref:`bool<class_bool>` **invert_enabled** = ``false`` +:ref:`bool<class_bool>` **invert_enabled** = ``false`` :ref:`🔗<class_Polygon2D_property_invert_enabled>` .. rst-class:: classref-property-setget -- void **set_invert_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_invert_enabled** **(** **)** +- |void| **set_invert_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_invert_enabled**\ (\ ) If ``true``, the polygon will be inverted, containing the area outside the defined points and extending to the :ref:`invert_border<class_Polygon2D_property_invert_border>`. @@ -199,12 +199,12 @@ If ``true``, the polygon will be inverted, containing the area outside the defin .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Polygon2D_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) The offset applied to each vertex. @@ -216,16 +216,16 @@ The offset applied to each vertex. .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_Polygon2D_property_polygon>` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ ) The polygon's list of vertices. The final point will be connected to the first. -\ **Note:** This returns a copy of the :ref:`PackedVector2Array<class_PackedVector2Array>` rather than a reference. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. .. rst-class:: classref-item-separator @@ -235,12 +235,12 @@ The polygon's list of vertices. The final point will be connected to the first. .. rst-class:: classref-property -:ref:`Array<class_Array>` **polygons** = ``[]`` +:ref:`Array<class_Array>` **polygons** = ``[]`` :ref:`🔗<class_Polygon2D_property_polygons>` .. rst-class:: classref-property-setget -- void **set_polygons** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_polygons** **(** **)** +- |void| **set_polygons**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_polygons**\ (\ ) The list of polygons, in case more than one is being represented. Every individual polygon is stored as a :ref:`PackedInt32Array<class_PackedInt32Array>` where each :ref:`int<class_int>` is an index to a point in :ref:`polygon<class_Polygon2D_property_polygon>`. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in :ref:`polygon<class_Polygon2D_property_polygon>`, using the order they are stored in. @@ -252,12 +252,12 @@ The list of polygons, in case more than one is being represented. Every individu .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **skeleton** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **skeleton** = ``NodePath("")`` :ref:`🔗<class_Polygon2D_property_skeleton>` .. rst-class:: classref-property-setget -- void **set_skeleton** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_skeleton** **(** **)** +- |void| **set_skeleton**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_skeleton**\ (\ ) Path to a :ref:`Skeleton2D<class_Skeleton2D>` node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. @@ -269,14 +269,14 @@ Path to a :ref:`Skeleton2D<class_Skeleton2D>` node used for skeleton-based defor .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_Polygon2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) -The polygon's fill texture. Use ``uv`` to set texture coordinates. +The polygon's fill texture. Use :ref:`uv<class_Polygon2D_property_uv>` to set texture coordinates. .. rst-class:: classref-item-separator @@ -286,14 +286,14 @@ The polygon's fill texture. Use ``uv`` to set texture coordinates. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **texture_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **texture_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Polygon2D_property_texture_offset>` .. rst-class:: classref-property-setget -- void **set_texture_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_texture_offset** **(** **)** +- |void| **set_texture_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_texture_offset**\ (\ ) -Amount to offset the polygon's ``texture``. If ``(0, 0)`` the texture's origin (its top-left corner) will be placed at the polygon's ``position``. +Amount to offset the polygon's :ref:`texture<class_Polygon2D_property_texture>`. If set to ``Vector2(0, 0)``, the texture's origin (its top-left corner) will be placed at the polygon's position. .. rst-class:: classref-item-separator @@ -303,12 +303,12 @@ Amount to offset the polygon's ``texture``. If ``(0, 0)`` the texture's origin ( .. rst-class:: classref-property -:ref:`float<class_float>` **texture_rotation** = ``0.0`` +:ref:`float<class_float>` **texture_rotation** = ``0.0`` :ref:`🔗<class_Polygon2D_property_texture_rotation>` .. rst-class:: classref-property-setget -- void **set_texture_rotation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_texture_rotation** **(** **)** +- |void| **set_texture_rotation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_rotation**\ (\ ) The texture's rotation in radians. @@ -320,14 +320,14 @@ The texture's rotation in radians. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **texture_scale** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **texture_scale** = ``Vector2(1, 1)`` :ref:`🔗<class_Polygon2D_property_texture_scale>` .. rst-class:: classref-property-setget -- void **set_texture_scale** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_texture_scale** **(** **)** +- |void| **set_texture_scale**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_texture_scale**\ (\ ) -Amount to multiply the ``uv`` coordinates when using a ``texture``. Larger values make the texture smaller, and vice versa. +Amount to multiply the :ref:`uv<class_Polygon2D_property_uv>` coordinates when using :ref:`texture<class_Polygon2D_property_texture>`. Larger values make the texture smaller, and vice versa. .. rst-class:: classref-item-separator @@ -337,14 +337,16 @@ Amount to multiply the ``uv`` coordinates when using a ``texture``. Larger value .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **uv** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **uv** = ``PackedVector2Array()`` :ref:`🔗<class_Polygon2D_property_uv>` .. rst-class:: classref-property-setget -- void **set_uv** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_uv** **(** **)** +- |void| **set_uv**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_uv**\ (\ ) -Texture coordinates for each vertex of the polygon. There should be one ``uv`` per polygon vertex. If there are fewer, undefined vertices will use ``(0, 0)``. +Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use ``Vector2(0, 0)``. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. .. rst-class:: classref-item-separator @@ -354,14 +356,16 @@ Texture coordinates for each vertex of the polygon. There should be one ``uv`` p .. rst-class:: classref-property -:ref:`PackedColorArray<class_PackedColorArray>` **vertex_colors** = ``PackedColorArray()`` +:ref:`PackedColorArray<class_PackedColorArray>` **vertex_colors** = ``PackedColorArray()`` :ref:`🔗<class_Polygon2D_property_vertex_colors>` .. rst-class:: classref-property-setget -- void **set_vertex_colors** **(** :ref:`PackedColorArray<class_PackedColorArray>` value **)** -- :ref:`PackedColorArray<class_PackedColorArray>` **get_vertex_colors** **(** **)** +- |void| **set_vertex_colors**\ (\ value\: :ref:`PackedColorArray<class_PackedColorArray>`\ ) +- :ref:`PackedColorArray<class_PackedColorArray>` **get_vertex_colors**\ (\ ) + +Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use :ref:`color<class_Polygon2D_property_color>`. -Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use ``color``. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray<class_PackedColorArray>` for more details. .. rst-class:: classref-section-separator @@ -376,7 +380,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_bone** **(** :ref:`NodePath<class_NodePath>` path, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** +|void| **add_bone**\ (\ path\: :ref:`NodePath<class_NodePath>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_Polygon2D_method_add_bone>` Adds a bone with the specified ``path`` and ``weights``. @@ -388,7 +392,7 @@ Adds a bone with the specified ``path`` and ``weights``. .. rst-class:: classref-method -void **clear_bones** **(** **)** +|void| **clear_bones**\ (\ ) :ref:`🔗<class_Polygon2D_method_clear_bones>` Removes all bones from this **Polygon2D**. @@ -400,7 +404,7 @@ Removes all bones from this **Polygon2D**. .. rst-class:: classref-method -void **erase_bone** **(** :ref:`int<class_int>` index **)** +|void| **erase_bone**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Polygon2D_method_erase_bone>` Removes the specified bone from this **Polygon2D**. @@ -412,7 +416,7 @@ Removes the specified bone from this **Polygon2D**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_count** **(** **)** |const| +:ref:`int<class_int>` **get_bone_count**\ (\ ) |const| :ref:`🔗<class_Polygon2D_method_get_bone_count>` Returns the number of bones in this **Polygon2D**. @@ -424,7 +428,7 @@ Returns the number of bones in this **Polygon2D**. .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_bone_path** **(** :ref:`int<class_int>` index **)** |const| +:ref:`NodePath<class_NodePath>` **get_bone_path**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Polygon2D_method_get_bone_path>` Returns the path to the node associated with the specified bone. @@ -436,7 +440,7 @@ Returns the path to the node associated with the specified bone. .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_bone_weights** **(** :ref:`int<class_int>` index **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **get_bone_weights**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Polygon2D_method_get_bone_weights>` Returns the weight values of the specified bone. @@ -448,7 +452,7 @@ Returns the weight values of the specified bone. .. rst-class:: classref-method -void **set_bone_path** **(** :ref:`int<class_int>` index, :ref:`NodePath<class_NodePath>` path **)** +|void| **set_bone_path**\ (\ index\: :ref:`int<class_int>`, path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_Polygon2D_method_set_bone_path>` Sets the path to the node associated with the specified bone. @@ -460,7 +464,7 @@ Sets the path to the node associated with the specified bone. .. rst-class:: classref-method -void **set_bone_weights** **(** :ref:`int<class_int>` index, :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** +|void| **set_bone_weights**\ (\ index\: :ref:`int<class_int>`, weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_Polygon2D_method_set_bone_weights>` Sets the weight values for the specified bone. @@ -471,3 +475,4 @@ Sets the weight values for the specified bone. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_polygonoccluder3d.rst b/classes/class_polygonoccluder3d.rst index d414744609f..493c7753668 100644 --- a/classes/class_polygonoccluder3d.rst +++ b/classes/class_polygonoccluder3d.rst @@ -23,6 +23,13 @@ Description See :ref:`OccluderInstance3D<class_OccluderInstance3D>`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -48,17 +55,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_PolygonOccluder3D_property_polygon>` .. rst-class:: classref-property-setget -- void **set_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon** **(** **)** +- |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ ) The polygon to use for occlusion culling. The polygon can be convex or concave, but it should have as few points as possible to maximize performance. The polygon must *not* have intersecting lines. Otherwise, triangulation will fail (with an error message printed). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -66,3 +75,4 @@ The polygon must *not* have intersecting lines. Otherwise, triangulation will fa .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_polygonpathfinder.rst b/classes/class_polygonpathfinder.rst index 950989059cc..cf7319af0f3 100644 --- a/classes/class_polygonpathfinder.rst +++ b/classes/class_polygonpathfinder.rst @@ -24,23 +24,23 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`find_path<class_PolygonPathFinder_method_find_path>` **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_bounds<class_PolygonPathFinder_method_get_bounds>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point<class_PolygonPathFinder_method_get_closest_point>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_intersections<class_PolygonPathFinder_method_get_intersections>` **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_point_penalty<class_PolygonPathFinder_method_get_point_penalty>` **(** :ref:`int<class_int>` idx **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_point_inside<class_PolygonPathFinder_method_is_point_inside>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_penalty<class_PolygonPathFinder_method_set_point_penalty>` **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` penalty **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`setup<class_PolygonPathFinder_method_setup>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedInt32Array<class_PackedInt32Array>` connections **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`find_path<class_PolygonPathFinder_method_find_path>`\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_bounds<class_PolygonPathFinder_method_get_bounds>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_closest_point<class_PolygonPathFinder_method_get_closest_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_intersections<class_PolygonPathFinder_method_get_intersections>`\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_point_penalty<class_PolygonPathFinder_method_get_point_penalty>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_point_inside<class_PolygonPathFinder_method_is_point_inside>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_penalty<class_PolygonPathFinder_method_set_point_penalty>`\ (\ idx\: :ref:`int<class_int>`, penalty\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup<class_PolygonPathFinder_method_setup>`\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, connections\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -55,7 +55,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **find_path** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **find_path**\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_PolygonPathFinder_method_find_path>` .. container:: contribute @@ -69,7 +69,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_bounds** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_bounds**\ (\ ) |const| :ref:`🔗<class_PolygonPathFinder_method_get_bounds>` .. container:: contribute @@ -83,7 +83,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_closest_point** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`Vector2<class_Vector2>` **get_closest_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PolygonPathFinder_method_get_closest_point>` .. container:: contribute @@ -97,7 +97,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_intersections** **(** :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_intersections**\ (\ from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PolygonPathFinder_method_get_intersections>` .. container:: contribute @@ -111,7 +111,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_point_penalty** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`float<class_float>` **get_point_penalty**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PolygonPathFinder_method_get_point_penalty>` .. container:: contribute @@ -125,7 +125,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_point_inside** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`bool<class_bool>` **is_point_inside**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_PolygonPathFinder_method_is_point_inside>` .. container:: contribute @@ -139,7 +139,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_point_penalty** **(** :ref:`int<class_int>` idx, :ref:`float<class_float>` penalty **)** +|void| **set_point_penalty**\ (\ idx\: :ref:`int<class_int>`, penalty\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PolygonPathFinder_method_set_point_penalty>` .. container:: contribute @@ -153,7 +153,7 @@ void **set_point_penalty** **(** :ref:`int<class_int>` idx, :ref:`float<class_fl .. rst-class:: classref-method -void **setup** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedInt32Array<class_PackedInt32Array>` connections **)** +|void| **setup**\ (\ points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, connections\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_PolygonPathFinder_method_setup>` .. container:: contribute @@ -166,3 +166,4 @@ void **setup** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` points, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_popup.rst b/classes/class_popup.rst index 3861192d018..912e6e85b29 100644 --- a/classes/class_popup.rst +++ b/classes/class_popup.rst @@ -58,7 +58,7 @@ Signals .. rst-class:: classref-signal -**popup_hide** **(** **)** +**popup_hide**\ (\ ) :ref:`🔗<class_Popup_signal_popup_hide>` Emitted when the popup is hidden. @@ -69,3 +69,4 @@ Emitted when the popup is hidden. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 40dea72c773..07e5d0822ef 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -37,19 +37,23 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`allow_search<class_PopupMenu_property_allow_search>` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`hide_on_checkable_item_selection<class_PopupMenu_property_hide_on_checkable_item_selection>` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`hide_on_item_selection<class_PopupMenu_property_hide_on_item_selection>` | ``true`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`hide_on_state_item_selection<class_PopupMenu_property_hide_on_state_item_selection>` | ``false`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`item_count<class_PopupMenu_property_item_count>` | ``0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`float<class_float>` | :ref:`submenu_popup_delay<class_PopupMenu_property_submenu_popup_delay>` | ``0.3`` | - +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`allow_search<class_PopupMenu_property_allow_search>` | ``true`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`hide_on_checkable_item_selection<class_PopupMenu_property_hide_on_checkable_item_selection>` | ``true`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`hide_on_item_selection<class_PopupMenu_property_hide_on_item_selection>` | ``true`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`hide_on_state_item_selection<class_PopupMenu_property_hide_on_state_item_selection>` | ``false`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`item_count<class_PopupMenu_property_item_count>` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`prefer_native_menu<class_PopupMenu_property_prefer_native_menu>` | ``false`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`submenu_popup_delay<class_PopupMenu_property_submenu_popup_delay>` | ``0.3`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`SystemMenus<enum_NativeMenu_SystemMenus>` | :ref:`system_menu_id<class_PopupMenu_property_system_menu_id>` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -59,131 +63,147 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_check_item<class_PopupMenu_method_add_check_item>` **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_check_shortcut<class_PopupMenu_method_add_check_shortcut>` **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_check_item<class_PopupMenu_method_add_icon_check_item>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_check_shortcut<class_PopupMenu_method_add_icon_check_shortcut>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_item<class_PopupMenu_method_add_icon_item>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_radio_check_item<class_PopupMenu_method_add_icon_radio_check_item>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_radio_check_shortcut<class_PopupMenu_method_add_icon_radio_check_shortcut>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_icon_shortcut<class_PopupMenu_method_add_icon_shortcut>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_item<class_PopupMenu_method_add_item>` **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_multistate_item<class_PopupMenu_method_add_multistate_item>` **(** :ref:`String<class_String>` label, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state=0, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_radio_check_item<class_PopupMenu_method_add_radio_check_item>` **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_radio_check_shortcut<class_PopupMenu_method_add_radio_check_shortcut>` **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_separator<class_PopupMenu_method_add_separator>` **(** :ref:`String<class_String>` label="", :ref:`int<class_int>` id=-1 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_shortcut<class_PopupMenu_method_add_shortcut>` **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_submenu_item<class_PopupMenu_method_add_submenu_item>` **(** :ref:`String<class_String>` label, :ref:`String<class_String>` submenu, :ref:`int<class_int>` id=-1 **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_PopupMenu_method_clear>` **(** **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_focused_item<class_PopupMenu_method_get_focused_item>` **(** **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_item_accelerator<class_PopupMenu_method_get_item_accelerator>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_PopupMenu_method_get_item_icon>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_icon_max_width<class_PopupMenu_method_get_item_icon_max_width>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_PopupMenu_method_get_item_icon_modulate>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_id<class_PopupMenu_method_get_item_id>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_indent<class_PopupMenu_method_get_item_indent>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_item_index<class_PopupMenu_method_get_item_index>` **(** :ref:`int<class_int>` id **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_language<class_PopupMenu_method_get_item_language>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_PopupMenu_method_get_item_metadata>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shortcut<class_Shortcut>` | :ref:`get_item_shortcut<class_PopupMenu_method_get_item_shortcut>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_submenu<class_PopupMenu_method_get_item_submenu>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_text<class_PopupMenu_method_get_item_text>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_PopupMenu_method_get_item_text_direction>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_PopupMenu_method_get_item_tooltip>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_checkable<class_PopupMenu_method_is_item_checkable>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_checked<class_PopupMenu_method_is_item_checked>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_PopupMenu_method_is_item_disabled>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_radio_checkable<class_PopupMenu_method_is_item_radio_checkable>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_separator<class_PopupMenu_method_is_item_separator>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_item_shortcut_disabled<class_PopupMenu_method_is_item_shortcut_disabled>` **(** :ref:`int<class_int>` index **)** |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_item<class_PopupMenu_method_remove_item>` **(** :ref:`int<class_int>` index **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_item<class_PopupMenu_method_scroll_to_item>` **(** :ref:`int<class_int>` index **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_focused_item<class_PopupMenu_method_set_focused_item>` **(** :ref:`int<class_int>` index **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_accelerator<class_PopupMenu_method_set_item_accelerator>` **(** :ref:`int<class_int>` index, :ref:`Key<enum_@GlobalScope_Key>` accel **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_as_checkable<class_PopupMenu_method_set_item_as_checkable>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_as_radio_checkable<class_PopupMenu_method_set_item_as_radio_checkable>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_as_separator<class_PopupMenu_method_set_item_as_separator>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_checked<class_PopupMenu_method_set_item_checked>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` checked **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_disabled<class_PopupMenu_method_set_item_disabled>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` disabled **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon<class_PopupMenu_method_set_item_icon>` **(** :ref:`int<class_int>` index, :ref:`Texture2D<class_Texture2D>` icon **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon_max_width<class_PopupMenu_method_set_item_icon_max_width>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` width **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_icon_modulate<class_PopupMenu_method_set_item_icon_modulate>` **(** :ref:`int<class_int>` index, :ref:`Color<class_Color>` modulate **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_id<class_PopupMenu_method_set_item_id>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` id **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_indent<class_PopupMenu_method_set_item_indent>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` indent **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_language<class_PopupMenu_method_set_item_language>` **(** :ref:`int<class_int>` index, :ref:`String<class_String>` language **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_metadata<class_PopupMenu_method_set_item_metadata>` **(** :ref:`int<class_int>` index, :ref:`Variant<class_Variant>` metadata **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_multistate<class_PopupMenu_method_set_item_multistate>` **(** :ref:`int<class_int>` index, :ref:`int<class_int>` state **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_shortcut<class_PopupMenu_method_set_item_shortcut>` **(** :ref:`int<class_int>` index, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`bool<class_bool>` global=false **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_shortcut_disabled<class_PopupMenu_method_set_item_shortcut_disabled>` **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` disabled **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_submenu<class_PopupMenu_method_set_item_submenu>` **(** :ref:`int<class_int>` index, :ref:`String<class_String>` submenu **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_text<class_PopupMenu_method_set_item_text>` **(** :ref:`int<class_int>` index, :ref:`String<class_String>` text **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_text_direction<class_PopupMenu_method_set_item_text_direction>` **(** :ref:`int<class_int>` index, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_item_tooltip<class_PopupMenu_method_set_item_tooltip>` **(** :ref:`int<class_int>` index, :ref:`String<class_String>` tooltip **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`toggle_item_checked<class_PopupMenu_method_toggle_item_checked>` **(** :ref:`int<class_int>` index **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`toggle_item_multistate<class_PopupMenu_method_toggle_item_multistate>` **(** :ref:`int<class_int>` index **)** | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`activate_item_by_event<class_PopupMenu_method_activate_item_by_event>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`, for_global_only\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_check_item<class_PopupMenu_method_add_check_item>`\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_check_shortcut<class_PopupMenu_method_add_check_shortcut>`\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_check_item<class_PopupMenu_method_add_icon_check_item>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_check_shortcut<class_PopupMenu_method_add_icon_check_shortcut>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_item<class_PopupMenu_method_add_icon_item>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_radio_check_item<class_PopupMenu_method_add_icon_radio_check_item>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_radio_check_shortcut<class_PopupMenu_method_add_icon_radio_check_shortcut>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_icon_shortcut<class_PopupMenu_method_add_icon_shortcut>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false, allow_echo\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_item<class_PopupMenu_method_add_item>`\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_multistate_item<class_PopupMenu_method_add_multistate_item>`\ (\ label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>` = 0, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_radio_check_item<class_PopupMenu_method_add_radio_check_item>`\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_radio_check_shortcut<class_PopupMenu_method_add_radio_check_shortcut>`\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_separator<class_PopupMenu_method_add_separator>`\ (\ label\: :ref:`String<class_String>` = "", id\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_shortcut<class_PopupMenu_method_add_shortcut>`\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false, allow_echo\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_submenu_item<class_PopupMenu_method_add_submenu_item>`\ (\ label\: :ref:`String<class_String>`, submenu\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_submenu_node_item<class_PopupMenu_method_add_submenu_node_item>`\ (\ label\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`, id\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_PopupMenu_method_clear>`\ (\ free_submenus\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_focused_item<class_PopupMenu_method_get_focused_item>`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key<enum_@GlobalScope_Key>` | :ref:`get_item_accelerator<class_PopupMenu_method_get_item_accelerator>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_item_icon<class_PopupMenu_method_get_item_icon>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_icon_max_width<class_PopupMenu_method_get_item_icon_max_width>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_item_icon_modulate<class_PopupMenu_method_get_item_icon_modulate>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_id<class_PopupMenu_method_get_item_id>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_indent<class_PopupMenu_method_get_item_indent>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_index<class_PopupMenu_method_get_item_index>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_language<class_PopupMenu_method_get_item_language>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_item_metadata<class_PopupMenu_method_get_item_metadata>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_multistate<class_PopupMenu_method_get_item_multistate>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_item_multistate_max<class_PopupMenu_method_get_item_multistate_max>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shortcut<class_Shortcut>` | :ref:`get_item_shortcut<class_PopupMenu_method_get_item_shortcut>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_submenu<class_PopupMenu_method_get_item_submenu>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_item_submenu_node<class_PopupMenu_method_get_item_submenu_node>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_text<class_PopupMenu_method_get_item_text>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_item_text_direction<class_PopupMenu_method_get_item_text_direction>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_item_tooltip<class_PopupMenu_method_get_item_tooltip>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_checkable<class_PopupMenu_method_is_item_checkable>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_checked<class_PopupMenu_method_is_item_checked>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_disabled<class_PopupMenu_method_is_item_disabled>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_radio_checkable<class_PopupMenu_method_is_item_radio_checkable>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_separator<class_PopupMenu_method_is_item_separator>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_item_shortcut_disabled<class_PopupMenu_method_is_item_shortcut_disabled>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_system_menu<class_PopupMenu_method_is_system_menu>`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_item<class_PopupMenu_method_remove_item>`\ (\ index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scroll_to_item<class_PopupMenu_method_scroll_to_item>`\ (\ index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_focused_item<class_PopupMenu_method_set_focused_item>`\ (\ index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_accelerator<class_PopupMenu_method_set_item_accelerator>`\ (\ index\: :ref:`int<class_int>`, accel\: :ref:`Key<enum_@GlobalScope_Key>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_as_checkable<class_PopupMenu_method_set_item_as_checkable>`\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_as_radio_checkable<class_PopupMenu_method_set_item_as_radio_checkable>`\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_as_separator<class_PopupMenu_method_set_item_as_separator>`\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_checked<class_PopupMenu_method_set_item_checked>`\ (\ index\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_disabled<class_PopupMenu_method_set_item_disabled>`\ (\ index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon<class_PopupMenu_method_set_item_icon>`\ (\ index\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_max_width<class_PopupMenu_method_set_item_icon_max_width>`\ (\ index\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_icon_modulate<class_PopupMenu_method_set_item_icon_modulate>`\ (\ index\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_id<class_PopupMenu_method_set_item_id>`\ (\ index\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_indent<class_PopupMenu_method_set_item_indent>`\ (\ index\: :ref:`int<class_int>`, indent\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_language<class_PopupMenu_method_set_item_language>`\ (\ index\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_metadata<class_PopupMenu_method_set_item_metadata>`\ (\ index\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_multistate<class_PopupMenu_method_set_item_multistate>`\ (\ index\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_multistate_max<class_PopupMenu_method_set_item_multistate_max>`\ (\ index\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_shortcut<class_PopupMenu_method_set_item_shortcut>`\ (\ index\: :ref:`int<class_int>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, global\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_shortcut_disabled<class_PopupMenu_method_set_item_shortcut_disabled>`\ (\ index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_submenu<class_PopupMenu_method_set_item_submenu>`\ (\ index\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_submenu_node<class_PopupMenu_method_set_item_submenu_node>`\ (\ index\: :ref:`int<class_int>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text<class_PopupMenu_method_set_item_text>`\ (\ index\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_text_direction<class_PopupMenu_method_set_item_text_direction>`\ (\ index\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_item_tooltip<class_PopupMenu_method_set_item_tooltip>`\ (\ index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`toggle_item_checked<class_PopupMenu_method_toggle_item_checked>`\ (\ index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`toggle_item_multistate<class_PopupMenu_method_toggle_item_multistate>`\ (\ index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -202,11 +222,11 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_PopupMenu_theme_color_font_hover_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_PopupMenu_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_PopupMenu_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_separator_color<class_PopupMenu_theme_color_font_separator_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_separator_outline_color<class_PopupMenu_theme_color_font_separator_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_separator_outline_color<class_PopupMenu_theme_color_font_separator_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int<class_int>` | :ref:`h_separation<class_PopupMenu_theme_constant_h_separation>` | ``4`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ @@ -260,8 +280,6 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_PopupMenu_theme_style_panel>` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`panel_disabled<class_PopupMenu_theme_style_panel_disabled>` | | - +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`separator<class_PopupMenu_theme_style_separator>` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ @@ -278,7 +296,7 @@ Signals .. rst-class:: classref-signal -**id_focused** **(** :ref:`int<class_int>` id **)** +**id_focused**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_signal_id_focused>` Emitted when the user navigated to an item of some ``id`` using the :ref:`ProjectSettings.input/ui_up<class_ProjectSettings_property_input/ui_up>` or :ref:`ProjectSettings.input/ui_down<class_ProjectSettings_property_input/ui_down>` input action. @@ -290,7 +308,7 @@ Emitted when the user navigated to an item of some ``id`` using the :ref:`Projec .. rst-class:: classref-signal -**id_pressed** **(** :ref:`int<class_int>` id **)** +**id_pressed**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_signal_id_pressed>` Emitted when an item of some ``id`` is pressed or its accelerator is activated. @@ -304,7 +322,7 @@ Emitted when an item of some ``id`` is pressed or its accelerator is activated. .. rst-class:: classref-signal -**index_pressed** **(** :ref:`int<class_int>` index **)** +**index_pressed**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_signal_index_pressed>` Emitted when an item of some ``index`` is pressed or its accelerator is activated. @@ -316,7 +334,7 @@ Emitted when an item of some ``index`` is pressed or its accelerator is activate .. rst-class:: classref-signal -**menu_changed** **(** **)** +**menu_changed**\ (\ ) :ref:`🔗<class_PopupMenu_signal_menu_changed>` Emitted when any item is added, modified or removed. @@ -333,12 +351,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_search** = ``true`` +:ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_PopupMenu_property_allow_search>` .. rst-class:: classref-property-setget -- void **set_allow_search** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_search** **(** **)** +- |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_search**\ (\ ) If ``true``, allows navigating **PopupMenu** with letter keys. @@ -350,12 +368,12 @@ If ``true``, allows navigating **PopupMenu** with letter keys. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_on_checkable_item_selection** = ``true`` +:ref:`bool<class_bool>` **hide_on_checkable_item_selection** = ``true`` :ref:`🔗<class_PopupMenu_property_hide_on_checkable_item_selection>` .. rst-class:: classref-property-setget -- void **set_hide_on_checkable_item_selection** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hide_on_checkable_item_selection** **(** **)** +- |void| **set_hide_on_checkable_item_selection**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hide_on_checkable_item_selection**\ (\ ) If ``true``, hides the **PopupMenu** when a checkbox or radio button is selected. @@ -367,12 +385,12 @@ If ``true``, hides the **PopupMenu** when a checkbox or radio button is selected .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_on_item_selection** = ``true`` +:ref:`bool<class_bool>` **hide_on_item_selection** = ``true`` :ref:`🔗<class_PopupMenu_property_hide_on_item_selection>` .. rst-class:: classref-property-setget -- void **set_hide_on_item_selection** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hide_on_item_selection** **(** **)** +- |void| **set_hide_on_item_selection**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hide_on_item_selection**\ (\ ) If ``true``, hides the **PopupMenu** when an item is selected. @@ -384,12 +402,12 @@ If ``true``, hides the **PopupMenu** when an item is selected. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_on_state_item_selection** = ``false`` +:ref:`bool<class_bool>` **hide_on_state_item_selection** = ``false`` :ref:`🔗<class_PopupMenu_property_hide_on_state_item_selection>` .. rst-class:: classref-property-setget -- void **set_hide_on_state_item_selection** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hide_on_state_item_selection** **(** **)** +- |void| **set_hide_on_state_item_selection**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hide_on_state_item_selection**\ (\ ) If ``true``, hides the **PopupMenu** when a state item is selected. @@ -401,12 +419,12 @@ If ``true``, hides the **PopupMenu** when a state item is selected. .. rst-class:: classref-property -:ref:`int<class_int>` **item_count** = ``0`` +:ref:`int<class_int>` **item_count** = ``0`` :ref:`🔗<class_PopupMenu_property_item_count>` .. rst-class:: classref-property-setget -- void **set_item_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_item_count** **(** **)** +- |void| **set_item_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_item_count**\ (\ ) The number of items currently in the list. @@ -414,19 +432,53 @@ The number of items currently in the list. ---- +.. _class_PopupMenu_property_prefer_native_menu: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **prefer_native_menu** = ``false`` :ref:`🔗<class_PopupMenu_property_prefer_native_menu>` + +.. rst-class:: classref-property-setget + +- |void| **set_prefer_native_menu**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_prefer_native_menu**\ (\ ) + +If ``true``, :ref:`MenuBar<class_MenuBar>` will use native menu when supported. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_property_submenu_popup_delay: .. rst-class:: classref-property -:ref:`float<class_float>` **submenu_popup_delay** = ``0.3`` +:ref:`float<class_float>` **submenu_popup_delay** = ``0.3`` :ref:`🔗<class_PopupMenu_property_submenu_popup_delay>` .. rst-class:: classref-property-setget -- void **set_submenu_popup_delay** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_submenu_popup_delay** **(** **)** +- |void| **set_submenu_popup_delay**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_submenu_popup_delay**\ (\ ) Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_property_system_menu_id: + +.. rst-class:: classref-property + +:ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **system_menu_id** = ``0`` :ref:`🔗<class_PopupMenu_property_system_menu_id>` + +.. rst-class:: classref-property-setget + +- |void| **set_system_menu**\ (\ value\: :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`\ ) +- :ref:`SystemMenus<enum_NativeMenu_SystemMenus>` **get_system_menu**\ (\ ) + +If set to one of the values of :ref:`SystemMenus<enum_NativeMenu_SystemMenus>`, this **PopupMenu** is bound to the special system menu. Only one **PopupMenu** can be bound to each special menu at a time. + .. rst-class:: classref-section-separator ---- @@ -436,11 +488,27 @@ Sets the delay time in seconds for the submenu item to popup on mouse hovering. Method Descriptions ------------------- +.. _class_PopupMenu_method_activate_item_by_event: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **activate_item_by_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`, for_global_only\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_activate_item_by_event>` + +Checks the provided ``event`` against the **PopupMenu**'s shortcuts and accelerators, and activates the first item with matching events. If ``for_global_only`` is ``true``, only shortcuts and accelerators with ``global`` set to ``true`` will be called. + +Returns ``true`` if an item was successfully activated. + +\ **Note:** Certain :ref:`Control<class_Control>`\ s, such as :ref:`MenuButton<class_MenuButton>`, will call this method automatically. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_add_check_item: .. rst-class:: classref-method -void **add_check_item** **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_check_item**\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_check_item>` Adds a new checkable item with text ``label``. @@ -456,7 +524,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_check_shortcut** **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_check_shortcut**\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_check_shortcut>` Adds a new checkable item and assigns the specified :ref:`Shortcut<class_Shortcut>` to it. Sets the label of the checkbox to the :ref:`Shortcut<class_Shortcut>`'s name. @@ -472,7 +540,7 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **add_icon_check_item** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_icon_check_item**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_icon_check_item>` Adds a new checkable item with text ``label`` and icon ``texture``. @@ -488,7 +556,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_icon_check_shortcut** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_icon_check_shortcut**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_icon_check_shortcut>` Adds a new checkable item and assigns the specified :ref:`Shortcut<class_Shortcut>` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`Shortcut<class_Shortcut>`'s name. @@ -504,7 +572,7 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **add_icon_item** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_icon_item**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_icon_item>` Adds a new item with text ``label`` and icon ``texture``. @@ -518,7 +586,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_icon_radio_check_item** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_icon_radio_check_item**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_icon_radio_check_item>` Same as :ref:`add_icon_check_item<class_PopupMenu_method_add_icon_check_item>`, but uses a radio check button. @@ -530,7 +598,7 @@ Same as :ref:`add_icon_check_item<class_PopupMenu_method_add_icon_check_item>`, .. rst-class:: classref-method -void **add_icon_radio_check_shortcut** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_icon_radio_check_shortcut**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_icon_radio_check_shortcut>` Same as :ref:`add_icon_check_shortcut<class_PopupMenu_method_add_icon_check_shortcut>`, but uses a radio check button. @@ -542,12 +610,14 @@ Same as :ref:`add_icon_check_shortcut<class_PopupMenu_method_add_icon_check_shor .. rst-class:: classref-method -void **add_icon_shortcut** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_icon_shortcut**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false, allow_echo\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_icon_shortcut>` Adds a new item and assigns the specified :ref:`Shortcut<class_Shortcut>` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`Shortcut<class_Shortcut>`'s name. An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. +If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. + .. rst-class:: classref-item-separator ---- @@ -556,7 +626,7 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **add_item** **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_item**\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_item>` Adds a new item with text ``label``. @@ -572,14 +642,34 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_multistate_item** **(** :ref:`String<class_String>` label, :ref:`int<class_int>` max_states, :ref:`int<class_int>` default_state=0, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_multistate_item**\ (\ label\: :ref:`String<class_String>`, max_states\: :ref:`int<class_int>`, default_state\: :ref:`int<class_int>` = 0, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_multistate_item>` Adds a new multistate item with text ``label``. -Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. Each press or activate of the item will increase the state by one. The default value is defined by ``default_state``. +Contrarily to normal binary items, multistate items can have more than two states, as defined by ``max_states``. The default value is defined by ``default_state``. An ``id`` can optionally be provided, as well as an accelerator (``accel``). If no ``id`` is provided, one will be created from the index. If no ``accel`` is provided, then the default value of 0 (corresponding to :ref:`@GlobalScope.KEY_NONE<class_@GlobalScope_constant_KEY_NONE>`) will be assigned to the item (which means it won't have any accelerator). See :ref:`get_item_accelerator<class_PopupMenu_method_get_item_accelerator>` for more info on accelerators. +\ **Note:** Multistate items don't update their state automatically and must be done manually. See :ref:`toggle_item_multistate<class_PopupMenu_method_toggle_item_multistate>`, :ref:`set_item_multistate<class_PopupMenu_method_set_item_multistate>` and :ref:`get_item_multistate<class_PopupMenu_method_get_item_multistate>` for more info on how to control it. + +Example usage: + +:: + + func _ready(): + add_multistate_item("Item", 3, 0) + + index_pressed.connect(func(index: int): + toggle_item_multistate(index) + match get_item_multistate(index): + 0: + print("First state") + 1: + print("Second state") + 2: + print("Third state") + ) + .. rst-class:: classref-item-separator ---- @@ -588,7 +678,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_radio_check_item** **(** :ref:`String<class_String>` label, :ref:`int<class_int>` id=-1, :ref:`Key<enum_@GlobalScope_Key>` accel=0 **)** +|void| **add_radio_check_item**\ (\ label\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1, accel\: :ref:`Key<enum_@GlobalScope_Key>` = 0\ ) :ref:`🔗<class_PopupMenu_method_add_radio_check_item>` Adds a new radio check button with text ``label``. @@ -604,7 +694,7 @@ An ``id`` can optionally be provided, as well as an accelerator (``accel``). If .. rst-class:: classref-method -void **add_radio_check_shortcut** **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_radio_check_shortcut**\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_radio_check_shortcut>` Adds a new radio check button and assigns a :ref:`Shortcut<class_Shortcut>` to it. Sets the label of the checkbox to the :ref:`Shortcut<class_Shortcut>`'s name. @@ -620,7 +710,7 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **add_separator** **(** :ref:`String<class_String>` label="", :ref:`int<class_int>` id=-1 **)** +|void| **add_separator**\ (\ label\: :ref:`String<class_String>` = "", id\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PopupMenu_method_add_separator>` Adds a separator between items. Separators also occupy an index, which you can set by using the ``id`` parameter. @@ -634,12 +724,14 @@ A ``label`` can optionally be provided, which will appear at the center of the s .. rst-class:: classref-method -void **add_shortcut** **(** :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` global=false **)** +|void| **add_shortcut**\ (\ shortcut\: :ref:`Shortcut<class_Shortcut>`, id\: :ref:`int<class_int>` = -1, global\: :ref:`bool<class_bool>` = false, allow_echo\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_add_shortcut>` Adds a :ref:`Shortcut<class_Shortcut>`. An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. +If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. + .. rst-class:: classref-item-separator ---- @@ -648,9 +740,27 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **add_submenu_item** **(** :ref:`String<class_String>` label, :ref:`String<class_String>` submenu, :ref:`int<class_int>` id=-1 **)** +|void| **add_submenu_item**\ (\ label\: :ref:`String<class_String>`, submenu\: :ref:`String<class_String>`, id\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PopupMenu_method_add_submenu_item>` + +**Deprecated:** Prefer using :ref:`add_submenu_node_item<class_PopupMenu_method_add_submenu_node_item>` instead. + +Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. The ``submenu`` argument must be the name of an existing **PopupMenu** that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ``ui_select`` or ``ui_right`` input actions. + +An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_method_add_submenu_node_item: + +.. rst-class:: classref-method + +|void| **add_submenu_node_item**\ (\ label\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`, id\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_PopupMenu_method_add_submenu_node_item>` + +Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the ``ui_select`` or ``ui_right`` input actions. -Adds an item that will act as a submenu of the parent **PopupMenu** node when clicked. The ``submenu`` argument is the name of the child **PopupMenu** node that will be shown when the item is clicked. +\ ``submenu`` must be either child of this **PopupMenu** or has no parent node (in which case it will be automatically added as a child). If the ``submenu`` popup has another parent, this method will fail. An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. @@ -662,9 +772,9 @@ An ``id`` can optionally be provided. If no ``id`` is provided, one will be crea .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ free_submenus\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_clear>` -Removes all items from the **PopupMenu**. +Removes all items from the **PopupMenu**. If ``free_submenus`` is ``true``, the submenu nodes are automatically freed. .. rst-class:: classref-item-separator @@ -674,7 +784,7 @@ Removes all items from the **PopupMenu**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_focused_item** **(** **)** |const| +:ref:`int<class_int>` **get_focused_item**\ (\ ) |const| :ref:`🔗<class_PopupMenu_method_get_focused_item>` Returns the index of the currently focused item. Returns ``-1`` if no item is focused. @@ -686,7 +796,7 @@ Returns the index of the currently focused item. Returns ``-1`` if no item is fo .. rst-class:: classref-method -:ref:`Key<enum_@GlobalScope_Key>` **get_item_accelerator** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Key<enum_@GlobalScope_Key>` **get_item_accelerator**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_accelerator>` Returns the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). If no accelerator is defined for the specified ``index``, :ref:`get_item_accelerator<class_PopupMenu_method_get_item_accelerator>` returns ``0`` (corresponding to :ref:`@GlobalScope.KEY_NONE<class_@GlobalScope_constant_KEY_NONE>`). @@ -698,7 +808,7 @@ Returns the accelerator of the item at the given ``index``. An accelerator is a .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_item_icon** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_item_icon**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_icon>` Returns the icon of the item at the given ``index``. @@ -710,7 +820,7 @@ Returns the icon of the item at the given ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_icon_max_width** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_item_icon_max_width**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_icon_max_width>` Returns the maximum allowed width of the icon for the item at the given ``index``. @@ -722,7 +832,7 @@ Returns the maximum allowed width of the icon for the item at the given ``index` .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_item_icon_modulate** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Color<class_Color>` **get_item_icon_modulate**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_icon_modulate>` Returns a :ref:`Color<class_Color>` modulating the item's icon at the given ``index``. @@ -734,7 +844,7 @@ Returns a :ref:`Color<class_Color>` modulating the item's icon at the given ``in .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_id** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_item_id**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_id>` Returns the ID of the item at the given ``index``. ``id`` can be manually assigned, while index can not. @@ -746,7 +856,7 @@ Returns the ID of the item at the given ``index``. ``id`` can be manually assign .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_indent** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_item_indent**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_indent>` Returns the horizontal offset of the item at the given ``index``. @@ -758,7 +868,7 @@ Returns the horizontal offset of the item at the given ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_item_index** **(** :ref:`int<class_int>` id **)** |const| +:ref:`int<class_int>` **get_item_index**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_index>` Returns the index of the item containing the specified ``id``. Index is automatically assigned to each item by the engine and can not be set manually. @@ -770,7 +880,7 @@ Returns the index of the item containing the specified ``id``. Index is automati .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_language** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_item_language**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_language>` Returns item's text language code. @@ -782,7 +892,7 @@ Returns item's text language code. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_item_metadata** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Variant<class_Variant>` **get_item_metadata**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_metadata>` Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`set_item_metadata<class_PopupMenu_method_set_item_metadata>`, which provides a simple way of assigning context data to items. @@ -790,11 +900,35 @@ Returns the metadata of the specified item, which might be of any type. You can ---- +.. _class_PopupMenu_method_get_item_multistate: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_multistate**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_multistate>` + +Returns the state of the item at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_PopupMenu_method_get_item_multistate_max: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_item_multistate_max**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_multistate_max>` + +Returns the max states of the item at the given ``index``. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_get_item_shortcut: .. rst-class:: classref-method -:ref:`Shortcut<class_Shortcut>` **get_item_shortcut** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Shortcut<class_Shortcut>` **get_item_shortcut**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_shortcut>` Returns the :ref:`Shortcut<class_Shortcut>` associated with the item at the given ``index``. @@ -806,7 +940,9 @@ Returns the :ref:`Shortcut<class_Shortcut>` associated with the item at the give .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_submenu** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_item_submenu**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_submenu>` + +**Deprecated:** Prefer using :ref:`get_item_submenu_node<class_PopupMenu_method_get_item_submenu_node>` instead. Returns the submenu name of the item at the given ``index``. See :ref:`add_submenu_item<class_PopupMenu_method_add_submenu_item>` for more info on how to add a submenu. @@ -814,11 +950,23 @@ Returns the submenu name of the item at the given ``index``. See :ref:`add_subme ---- +.. _class_PopupMenu_method_get_item_submenu_node: + +.. rst-class:: classref-method + +:ref:`PopupMenu<class_PopupMenu>` **get_item_submenu_node**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_submenu_node>` + +Returns the submenu of the item at the given ``index``, or ``null`` if no submenu was added. See :ref:`add_submenu_node_item<class_PopupMenu_method_add_submenu_node_item>` for more info on how to add a submenu. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_get_item_text: .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_text** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_item_text**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_text>` Returns the text of the item at the given ``index``. @@ -830,7 +978,7 @@ Returns the text of the item at the given ``index``. .. rst-class:: classref-method -:ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction** **(** :ref:`int<class_int>` index **)** |const| +:ref:`TextDirection<enum_Control_TextDirection>` **get_item_text_direction**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_text_direction>` Returns item's text base writing direction. @@ -842,7 +990,7 @@ Returns item's text base writing direction. .. rst-class:: classref-method -:ref:`String<class_String>` **get_item_tooltip** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_item_tooltip**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_get_item_tooltip>` Returns the tooltip associated with the item at the given ``index``. @@ -854,7 +1002,7 @@ Returns the tooltip associated with the item at the given ``index``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_checkable** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_checkable**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_checkable>` Returns ``true`` if the item at the given ``index`` is checkable in some way, i.e. if it has a checkbox or radio button. @@ -868,7 +1016,7 @@ Returns ``true`` if the item at the given ``index`` is checkable in some way, i. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_checked** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_checked**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_checked>` Returns ``true`` if the item at the given ``index`` is checked. @@ -880,7 +1028,7 @@ Returns ``true`` if the item at the given ``index`` is checked. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_disabled** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_disabled**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_disabled>` Returns ``true`` if the item at the given ``index`` is disabled. When it is disabled it can't be selected, or its action invoked. @@ -894,7 +1042,7 @@ See :ref:`set_item_disabled<class_PopupMenu_method_set_item_disabled>` for more .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_radio_checkable** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_radio_checkable**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_radio_checkable>` Returns ``true`` if the item at the given ``index`` has radio button-style checkability. @@ -908,7 +1056,7 @@ Returns ``true`` if the item at the given ``index`` has radio button-style check .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_separator** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_separator**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_separator>` Returns ``true`` if the item is a separator. If it is, it will be displayed as a line. See :ref:`add_separator<class_PopupMenu_method_add_separator>` for more info on how to add a separator. @@ -920,7 +1068,7 @@ Returns ``true`` if the item is a separator. If it is, it will be displayed as a .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_item_shortcut_disabled** **(** :ref:`int<class_int>` index **)** |const| +:ref:`bool<class_bool>` **is_item_shortcut_disabled**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_PopupMenu_method_is_item_shortcut_disabled>` Returns ``true`` if the specified item's shortcut is disabled. @@ -928,11 +1076,23 @@ Returns ``true`` if the specified item's shortcut is disabled. ---- +.. _class_PopupMenu_method_is_system_menu: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_system_menu**\ (\ ) |const| :ref:`🔗<class_PopupMenu_method_is_system_menu>` + +Returns ``true`` if the menu is bound to the special system menu. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_remove_item: .. rst-class:: classref-method -void **remove_item** **(** :ref:`int<class_int>` index **)** +|void| **remove_item**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_remove_item>` Removes the item at the given ``index`` from the menu. @@ -946,7 +1106,7 @@ Removes the item at the given ``index`` from the menu. .. rst-class:: classref-method -void **scroll_to_item** **(** :ref:`int<class_int>` index **)** +|void| **scroll_to_item**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_scroll_to_item>` Moves the scroll view to make the item at the given ``index`` visible. @@ -958,7 +1118,7 @@ Moves the scroll view to make the item at the given ``index`` visible. .. rst-class:: classref-method -void **set_focused_item** **(** :ref:`int<class_int>` index **)** +|void| **set_focused_item**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_focused_item>` Sets the currently focused item as the given ``index``. @@ -972,7 +1132,7 @@ Passing ``-1`` as the index makes so that no item is focused. .. rst-class:: classref-method -void **set_item_accelerator** **(** :ref:`int<class_int>` index, :ref:`Key<enum_@GlobalScope_Key>` accel **)** +|void| **set_item_accelerator**\ (\ index\: :ref:`int<class_int>`, accel\: :ref:`Key<enum_@GlobalScope_Key>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_accelerator>` Sets the accelerator of the item at the given ``index``. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. ``accel`` is generally a combination of :ref:`KeyModifierMask<enum_@GlobalScope_KeyModifierMask>`\ s and :ref:`Key<enum_@GlobalScope_Key>`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). @@ -984,7 +1144,7 @@ Sets the accelerator of the item at the given ``index``. An accelerator is a key .. rst-class:: classref-method -void **set_item_as_checkable** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** +|void| **set_item_as_checkable**\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_as_checkable>` Sets whether the item at the given ``index`` has a checkbox. If ``false``, sets the type of the item to plain text. @@ -998,7 +1158,7 @@ Sets whether the item at the given ``index`` has a checkbox. If ``false``, sets .. rst-class:: classref-method -void **set_item_as_radio_checkable** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** +|void| **set_item_as_radio_checkable**\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_as_radio_checkable>` Sets the type of the item at the given ``index`` to radio button. If ``false``, sets the type of the item to plain text. @@ -1010,7 +1170,7 @@ Sets the type of the item at the given ``index`` to radio button. If ``false``, .. rst-class:: classref-method -void **set_item_as_separator** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` enable **)** +|void| **set_item_as_separator**\ (\ index\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_as_separator>` Mark the item at the given ``index`` as a separator, which means that it would be displayed as a line. If ``false``, sets the type of the item to plain text. @@ -1022,7 +1182,7 @@ Mark the item at the given ``index`` as a separator, which means that it would b .. rst-class:: classref-method -void **set_item_checked** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` checked **)** +|void| **set_item_checked**\ (\ index\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_checked>` Sets the checkstate status of the item at the given ``index``. @@ -1034,7 +1194,7 @@ Sets the checkstate status of the item at the given ``index``. .. rst-class:: classref-method -void **set_item_disabled** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` disabled **)** +|void| **set_item_disabled**\ (\ index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_disabled>` Enables/disables the item at the given ``index``. When it is disabled, it can't be selected and its action can't be invoked. @@ -1046,7 +1206,7 @@ Enables/disables the item at the given ``index``. When it is disabled, it can't .. rst-class:: classref-method -void **set_item_icon** **(** :ref:`int<class_int>` index, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_item_icon**\ (\ index\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_icon>` Replaces the :ref:`Texture2D<class_Texture2D>` icon of the item at the given ``index``. @@ -1058,7 +1218,7 @@ Replaces the :ref:`Texture2D<class_Texture2D>` icon of the item at the given ``i .. rst-class:: classref-method -void **set_item_icon_max_width** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` width **)** +|void| **set_item_icon_max_width**\ (\ index\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_icon_max_width>` Sets the maximum allowed width of the icon for the item at the given ``index``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width<class_PopupMenu_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -1070,7 +1230,7 @@ Sets the maximum allowed width of the icon for the item at the given ``index``. .. rst-class:: classref-method -void **set_item_icon_modulate** **(** :ref:`int<class_int>` index, :ref:`Color<class_Color>` modulate **)** +|void| **set_item_icon_modulate**\ (\ index\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_icon_modulate>` Sets a modulating :ref:`Color<class_Color>` of the item's icon at the given ``index``. @@ -1082,7 +1242,7 @@ Sets a modulating :ref:`Color<class_Color>` of the item's icon at the given ``in .. rst-class:: classref-method -void **set_item_id** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` id **)** +|void| **set_item_id**\ (\ index\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_id>` Sets the ``id`` of the item at the given ``index``. @@ -1096,7 +1256,7 @@ The ``id`` is used in :ref:`id_pressed<class_PopupMenu_signal_id_pressed>` and : .. rst-class:: classref-method -void **set_item_indent** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` indent **)** +|void| **set_item_indent**\ (\ index\: :ref:`int<class_int>`, indent\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_indent>` Sets the horizontal offset of the item at the given ``index``. @@ -1108,7 +1268,7 @@ Sets the horizontal offset of the item at the given ``index``. .. rst-class:: classref-method -void **set_item_language** **(** :ref:`int<class_int>` index, :ref:`String<class_String>` language **)** +|void| **set_item_language**\ (\ index\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_language>` Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -1120,7 +1280,7 @@ Sets language code of item's text used for line-breaking and text shaping algori .. rst-class:: classref-method -void **set_item_metadata** **(** :ref:`int<class_int>` index, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_item_metadata**\ (\ index\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_metadata>` Sets the metadata of an item, which may be of any type. You can later get it with :ref:`get_item_metadata<class_PopupMenu_method_get_item_metadata>`, which provides a simple way of assigning context data to items. @@ -1132,7 +1292,7 @@ Sets the metadata of an item, which may be of any type. You can later get it wit .. rst-class:: classref-method -void **set_item_multistate** **(** :ref:`int<class_int>` index, :ref:`int<class_int>` state **)** +|void| **set_item_multistate**\ (\ index\: :ref:`int<class_int>`, state\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_multistate>` Sets the state of a multistate item. See :ref:`add_multistate_item<class_PopupMenu_method_add_multistate_item>` for details. @@ -1140,11 +1300,23 @@ Sets the state of a multistate item. See :ref:`add_multistate_item<class_PopupMe ---- +.. _class_PopupMenu_method_set_item_multistate_max: + +.. rst-class:: classref-method + +|void| **set_item_multistate_max**\ (\ index\: :ref:`int<class_int>`, max_states\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_multistate_max>` + +Sets the max states of a multistate item. See :ref:`add_multistate_item<class_PopupMenu_method_add_multistate_item>` for details. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_set_item_shortcut: .. rst-class:: classref-method -void **set_item_shortcut** **(** :ref:`int<class_int>` index, :ref:`Shortcut<class_Shortcut>` shortcut, :ref:`bool<class_bool>` global=false **)** +|void| **set_item_shortcut**\ (\ index\: :ref:`int<class_int>`, shortcut\: :ref:`Shortcut<class_Shortcut>`, global\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_PopupMenu_method_set_item_shortcut>` Sets a :ref:`Shortcut<class_Shortcut>` for the item at the given ``index``. @@ -1156,7 +1328,7 @@ Sets a :ref:`Shortcut<class_Shortcut>` for the item at the given ``index``. .. rst-class:: classref-method -void **set_item_shortcut_disabled** **(** :ref:`int<class_int>` index, :ref:`bool<class_bool>` disabled **)** +|void| **set_item_shortcut_disabled**\ (\ index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_shortcut_disabled>` Disables the :ref:`Shortcut<class_Shortcut>` of the item at the given ``index``. @@ -1168,7 +1340,9 @@ Disables the :ref:`Shortcut<class_Shortcut>` of the item at the given ``index``. .. rst-class:: classref-method -void **set_item_submenu** **(** :ref:`int<class_int>` index, :ref:`String<class_String>` submenu **)** +|void| **set_item_submenu**\ (\ index\: :ref:`int<class_int>`, submenu\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_submenu>` + +**Deprecated:** Prefer using :ref:`set_item_submenu_node<class_PopupMenu_method_set_item_submenu_node>` instead. Sets the submenu of the item at the given ``index``. The submenu is the name of a child **PopupMenu** node that would be shown when the item is clicked. @@ -1176,11 +1350,23 @@ Sets the submenu of the item at the given ``index``. The submenu is the name of ---- +.. _class_PopupMenu_method_set_item_submenu_node: + +.. rst-class:: classref-method + +|void| **set_item_submenu_node**\ (\ index\: :ref:`int<class_int>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_submenu_node>` + +Sets the submenu of the item at the given ``index``. The submenu is a **PopupMenu** node that would be shown when the item is clicked. It must either be a child of this **PopupMenu** or has no parent (in which case it will be automatically added as a child). If the ``submenu`` popup has another parent, this method will fail. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_method_set_item_text: .. rst-class:: classref-method -void **set_item_text** **(** :ref:`int<class_int>` index, :ref:`String<class_String>` text **)** +|void| **set_item_text**\ (\ index\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_text>` Sets the text of the item at the given ``index``. @@ -1192,7 +1378,7 @@ Sets the text of the item at the given ``index``. .. rst-class:: classref-method -void **set_item_text_direction** **(** :ref:`int<class_int>` index, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** +|void| **set_item_text_direction**\ (\ index\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_text_direction>` Sets item's text base writing direction. @@ -1204,7 +1390,7 @@ Sets item's text base writing direction. .. rst-class:: classref-method -void **set_item_tooltip** **(** :ref:`int<class_int>` index, :ref:`String<class_String>` tooltip **)** +|void| **set_item_tooltip**\ (\ index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_PopupMenu_method_set_item_tooltip>` Sets the :ref:`String<class_String>` tooltip of the item at the given ``index``. @@ -1216,7 +1402,7 @@ Sets the :ref:`String<class_String>` tooltip of the item at the given ``index``. .. rst-class:: classref-method -void **toggle_item_checked** **(** :ref:`int<class_int>` index **)** +|void| **toggle_item_checked**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_toggle_item_checked>` Toggles the check state of the item at the given ``index``. @@ -1228,7 +1414,7 @@ Toggles the check state of the item at the given ``index``. .. rst-class:: classref-method -void **toggle_item_multistate** **(** :ref:`int<class_int>` index **)** +|void| **toggle_item_multistate**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_PopupMenu_method_toggle_item_multistate>` Cycle to the next state of a multistate item. See :ref:`add_multistate_item<class_PopupMenu_method_add_multistate_item>` for details. @@ -1245,7 +1431,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_accelerator_color** = ``Color(0.7, 0.7, 0.7, 0.8)`` +:ref:`Color<class_Color>` **font_accelerator_color** = ``Color(0.7, 0.7, 0.7, 0.8)`` :ref:`🔗<class_PopupMenu_theme_color_font_accelerator_color>` The text :ref:`Color<class_Color>` used for shortcuts and accelerators that show next to the menu item name when defined. See :ref:`get_item_accelerator<class_PopupMenu_method_get_item_accelerator>` for more info on accelerators. @@ -1257,7 +1443,7 @@ The text :ref:`Color<class_Color>` used for shortcuts and accelerators that show .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_PopupMenu_theme_color_font_color>` The default text :ref:`Color<class_Color>` for menu items' names. @@ -1269,7 +1455,7 @@ The default text :ref:`Color<class_Color>` for menu items' names. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.4, 0.4, 0.4, 0.8)`` +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.4, 0.4, 0.4, 0.8)`` :ref:`🔗<class_PopupMenu_theme_color_font_disabled_color>` :ref:`Color<class_Color>` used for disabled menu items' text. @@ -1281,7 +1467,7 @@ The default text :ref:`Color<class_Color>` for menu items' names. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_hover_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_PopupMenu_theme_color_font_hover_color>` :ref:`Color<class_Color>` used for the hovered text. @@ -1293,7 +1479,7 @@ The default text :ref:`Color<class_Color>` for menu items' names. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_PopupMenu_theme_color_font_outline_color>` The tint of text outline of the menu item. @@ -1305,7 +1491,7 @@ The tint of text outline of the menu item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_separator_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_separator_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_PopupMenu_theme_color_font_separator_color>` :ref:`Color<class_Color>` used for labeled separators' text. See :ref:`add_separator<class_PopupMenu_method_add_separator>`. @@ -1317,7 +1503,7 @@ The tint of text outline of the menu item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_separator_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_separator_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_PopupMenu_theme_color_font_separator_outline_color>` The tint of text outline of the labeled separator. @@ -1329,7 +1515,7 @@ The tint of text outline of the labeled separator. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_PopupMenu_theme_constant_h_separation>` The horizontal space between the item's elements. @@ -1341,7 +1527,7 @@ The horizontal space between the item's elements. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_max_width** = ``0`` +:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_PopupMenu_theme_constant_icon_max_width>` The maximum allowed width of the item's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_item_icon_max_width<class_PopupMenu_method_set_item_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -1353,7 +1539,7 @@ The maximum allowed width of the item's icon. This limit is applied on top of th .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **indent** = ``10`` +:ref:`int<class_int>` **indent** = ``10`` :ref:`🔗<class_PopupMenu_theme_constant_indent>` Width of the single indentation level. @@ -1365,7 +1551,7 @@ Width of the single indentation level. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **item_end_padding** = ``2`` +:ref:`int<class_int>` **item_end_padding** = ``2`` :ref:`🔗<class_PopupMenu_theme_constant_item_end_padding>` Horizontal padding to the right of the items (or left, in RTL layout). @@ -1377,7 +1563,7 @@ Horizontal padding to the right of the items (or left, in RTL layout). .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **item_start_padding** = ``2`` +:ref:`int<class_int>` **item_start_padding** = ``2`` :ref:`🔗<class_PopupMenu_theme_constant_item_start_padding>` Horizontal padding to the left of the items (or right, in RTL layout). @@ -1389,7 +1575,7 @@ Horizontal padding to the left of the items (or right, in RTL layout). .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_PopupMenu_theme_constant_outline_size>` The size of the item text outline. @@ -1403,7 +1589,7 @@ The size of the item text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **separator_outline_size** = ``0`` +:ref:`int<class_int>` **separator_outline_size** = ``0`` :ref:`🔗<class_PopupMenu_theme_constant_separator_outline_size>` The size of the labeled separator text outline. @@ -1415,7 +1601,7 @@ The size of the labeled separator text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **v_separation** = ``4`` +:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_PopupMenu_theme_constant_v_separation>` The vertical space between each menu item. @@ -1427,7 +1613,7 @@ The vertical space between each menu item. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_PopupMenu_theme_font_font>` :ref:`Font<class_Font>` used for the menu items. @@ -1439,7 +1625,7 @@ The vertical space between each menu item. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font_separator** +:ref:`Font<class_Font>` **font_separator** :ref:`🔗<class_PopupMenu_theme_font_font_separator>` :ref:`Font<class_Font>` used for the labeled separator. @@ -1451,7 +1637,7 @@ The vertical space between each menu item. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_separator_size** +:ref:`int<class_int>` **font_separator_size** :ref:`🔗<class_PopupMenu_theme_font_size_font_separator_size>` Font size of the labeled separator. @@ -1463,7 +1649,7 @@ Font size of the labeled separator. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_PopupMenu_theme_font_size_font_size>` Font size of the menu items. @@ -1475,7 +1661,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **checked** +:ref:`Texture2D<class_Texture2D>` **checked** :ref:`🔗<class_PopupMenu_theme_icon_checked>` :ref:`Texture2D<class_Texture2D>` icon for the checked checkbox items. @@ -1487,7 +1673,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **checked_disabled** +:ref:`Texture2D<class_Texture2D>` **checked_disabled** :ref:`🔗<class_PopupMenu_theme_icon_checked_disabled>` :ref:`Texture2D<class_Texture2D>` icon for the checked checkbox items when they are disabled. @@ -1499,7 +1685,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **radio_checked** +:ref:`Texture2D<class_Texture2D>` **radio_checked** :ref:`🔗<class_PopupMenu_theme_icon_radio_checked>` :ref:`Texture2D<class_Texture2D>` icon for the checked radio button items. @@ -1511,7 +1697,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **radio_checked_disabled** +:ref:`Texture2D<class_Texture2D>` **radio_checked_disabled** :ref:`🔗<class_PopupMenu_theme_icon_radio_checked_disabled>` :ref:`Texture2D<class_Texture2D>` icon for the checked radio button items when they are disabled. @@ -1523,7 +1709,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **radio_unchecked** +:ref:`Texture2D<class_Texture2D>` **radio_unchecked** :ref:`🔗<class_PopupMenu_theme_icon_radio_unchecked>` :ref:`Texture2D<class_Texture2D>` icon for the unchecked radio button items. @@ -1535,7 +1721,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **radio_unchecked_disabled** +:ref:`Texture2D<class_Texture2D>` **radio_unchecked_disabled** :ref:`🔗<class_PopupMenu_theme_icon_radio_unchecked_disabled>` :ref:`Texture2D<class_Texture2D>` icon for the unchecked radio button items when they are disabled. @@ -1547,7 +1733,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **submenu** +:ref:`Texture2D<class_Texture2D>` **submenu** :ref:`🔗<class_PopupMenu_theme_icon_submenu>` :ref:`Texture2D<class_Texture2D>` icon for the submenu arrow (for left-to-right layouts). @@ -1559,7 +1745,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **submenu_mirrored** +:ref:`Texture2D<class_Texture2D>` **submenu_mirrored** :ref:`🔗<class_PopupMenu_theme_icon_submenu_mirrored>` :ref:`Texture2D<class_Texture2D>` icon for the submenu arrow (for right-to-left layouts). @@ -1571,7 +1757,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **unchecked** +:ref:`Texture2D<class_Texture2D>` **unchecked** :ref:`🔗<class_PopupMenu_theme_icon_unchecked>` :ref:`Texture2D<class_Texture2D>` icon for the unchecked checkbox items. @@ -1583,7 +1769,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **unchecked_disabled** +:ref:`Texture2D<class_Texture2D>` **unchecked_disabled** :ref:`🔗<class_PopupMenu_theme_icon_unchecked_disabled>` :ref:`Texture2D<class_Texture2D>` icon for the unchecked checkbox items when they are disabled. @@ -1595,7 +1781,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **hover** +:ref:`StyleBox<class_StyleBox>` **hover** :ref:`🔗<class_PopupMenu_theme_style_hover>` :ref:`StyleBox<class_StyleBox>` displayed when the **PopupMenu** item is hovered. @@ -1607,7 +1793,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **labeled_separator_left** +:ref:`StyleBox<class_StyleBox>` **labeled_separator_left** :ref:`🔗<class_PopupMenu_theme_style_labeled_separator_left>` :ref:`StyleBox<class_StyleBox>` for the left side of labeled separator. See :ref:`add_separator<class_PopupMenu_method_add_separator>`. @@ -1619,7 +1805,7 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **labeled_separator_right** +:ref:`StyleBox<class_StyleBox>` **labeled_separator_right** :ref:`🔗<class_PopupMenu_theme_style_labeled_separator_right>` :ref:`StyleBox<class_StyleBox>` for the right side of labeled separator. See :ref:`add_separator<class_PopupMenu_method_add_separator>`. @@ -1631,21 +1817,9 @@ Font size of the menu items. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** - -Default :ref:`StyleBox<class_StyleBox>` of the **PopupMenu** items. - -.. rst-class:: classref-item-separator - ----- - -.. _class_PopupMenu_theme_style_panel_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **panel_disabled** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_PopupMenu_theme_style_panel>` -:ref:`StyleBox<class_StyleBox>` used when the **PopupMenu** item is disabled. +:ref:`StyleBox<class_StyleBox>` for the the background panel. .. rst-class:: classref-item-separator @@ -1655,7 +1829,7 @@ Default :ref:`StyleBox<class_StyleBox>` of the **PopupMenu** items. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **separator** +:ref:`StyleBox<class_StyleBox>` **separator** :ref:`🔗<class_PopupMenu_theme_style_separator>` :ref:`StyleBox<class_StyleBox>` used for the separators. See :ref:`add_separator<class_PopupMenu_method_add_separator>`. @@ -1666,3 +1840,4 @@ Default :ref:`StyleBox<class_StyleBox>` of the **PopupMenu** items. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_popuppanel.rst b/classes/class_popuppanel.rst index 1b8147deaa4..c72c9c55a66 100644 --- a/classes/class_popuppanel.rst +++ b/classes/class_popuppanel.rst @@ -46,9 +46,9 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_PopupPanel_theme_style_panel>` -The background panel style of this **PopupPanel**. +:ref:`StyleBox<class_StyleBox>` for the the background panel. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -57,3 +57,4 @@ The background panel style of this **PopupPanel**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_portablecompressedtexture2d.rst b/classes/class_portablecompressedtexture2d.rst index 95c9b903c23..5ccb0fd9995 100644 --- a/classes/class_portablecompressedtexture2d.rst +++ b/classes/class_portablecompressedtexture2d.rst @@ -55,17 +55,17 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from_image<class_PortableCompressedTexture2D_method_create_from_image>` **(** :ref:`Image<class_Image>` image, :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` compression_mode, :ref:`bool<class_bool>` normal_map=false, :ref:`float<class_float>` lossy_quality=0.8 **)** | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` | :ref:`get_compression_mode<class_PortableCompressedTexture2D_method_get_compression_mode>` **(** **)** |const| | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_PortableCompressedTexture2D_method_get_format>` **(** **)** |const| | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_keeping_all_compressed_buffers<class_PortableCompressedTexture2D_method_is_keeping_all_compressed_buffers>` **(** **)** |static| | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_keep_all_compressed_buffers<class_PortableCompressedTexture2D_method_set_keep_all_compressed_buffers>` **(** :ref:`bool<class_bool>` keep **)** |static| | - +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from_image<class_PortableCompressedTexture2D_method_create_from_image>`\ (\ image\: :ref:`Image<class_Image>`, compression_mode\: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>`, normal_map\: :ref:`bool<class_bool>` = false, lossy_quality\: :ref:`float<class_float>` = 0.8\ ) | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` | :ref:`get_compression_mode<class_PortableCompressedTexture2D_method_get_compression_mode>`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_PortableCompressedTexture2D_method_get_format>`\ (\ ) |const| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_keeping_all_compressed_buffers<class_PortableCompressedTexture2D_method_is_keeping_all_compressed_buffers>`\ (\ ) |static| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_keep_all_compressed_buffers<class_PortableCompressedTexture2D_method_set_keep_all_compressed_buffers>`\ (\ keep\: :ref:`bool<class_bool>`\ ) |static| | + +--------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,7 +80,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CompressionMode**: +enum **CompressionMode**: :ref:`🔗<enum_PortableCompressedTexture2D_CompressionMode>` .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSLESS: @@ -88,6 +88,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_LOSSLESS** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_LOSSY: @@ -96,6 +100,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_LOSSY** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BASIS_UNIVERSAL: @@ -104,6 +112,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_BASIS_UNIVERSAL** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_S3TC: @@ -112,6 +124,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_S3TC** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_ETC2: @@ -120,6 +136,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_ETC2** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_PortableCompressedTexture2D_constant_COMPRESSION_MODE_BPTC: @@ -128,6 +148,10 @@ enum **CompressionMode**: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **COMPRESSION_MODE_BPTC** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -143,7 +167,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **_data** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **_data** = ``PackedByteArray()`` :ref:`🔗<class_PortableCompressedTexture2D_property__data>` .. container:: contribute @@ -157,12 +181,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **keep_compressed_buffer** = ``false`` +:ref:`bool<class_bool>` **keep_compressed_buffer** = ``false`` :ref:`🔗<class_PortableCompressedTexture2D_property_keep_compressed_buffer>` .. rst-class:: classref-property-setget -- void **set_keep_compressed_buffer** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_keeping_compressed_buffer** **(** **)** +- |void| **set_keep_compressed_buffer**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_keeping_compressed_buffer**\ (\ ) When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved. @@ -176,12 +200,12 @@ This flag allows to keep the compressed data in memory if you intend it to persi .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size_override** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **size_override** = ``Vector2(0, 0)`` :ref:`🔗<class_PortableCompressedTexture2D_property_size_override>` .. rst-class:: classref-property-setget -- void **set_size_override** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size_override** **(** **)** +- |void| **set_size_override**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size_override**\ (\ ) Allow overriding the texture size (for 2D only). @@ -198,7 +222,7 @@ Method Descriptions .. rst-class:: classref-method -void **create_from_image** **(** :ref:`Image<class_Image>` image, :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` compression_mode, :ref:`bool<class_bool>` normal_map=false, :ref:`float<class_float>` lossy_quality=0.8 **)** +|void| **create_from_image**\ (\ image\: :ref:`Image<class_Image>`, compression_mode\: :ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>`, normal_map\: :ref:`bool<class_bool>` = false, lossy_quality\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_PortableCompressedTexture2D_method_create_from_image>` Initializes the compressed texture from a base image. The compression mode must be provided. @@ -214,7 +238,7 @@ If lossy compression is requested, the quality setting can optionally be provide .. rst-class:: classref-method -:ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **get_compression_mode** **(** **)** |const| +:ref:`CompressionMode<enum_PortableCompressedTexture2D_CompressionMode>` **get_compression_mode**\ (\ ) |const| :ref:`🔗<class_PortableCompressedTexture2D_method_get_compression_mode>` Return the compression mode used (valid after initialized). @@ -226,7 +250,7 @@ Return the compression mode used (valid after initialized). .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const| +:ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_PortableCompressedTexture2D_method_get_format>` Return the image format used (valid after initialized). @@ -238,7 +262,7 @@ Return the image format used (valid after initialized). .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_keeping_all_compressed_buffers** **(** **)** |static| +:ref:`bool<class_bool>` **is_keeping_all_compressed_buffers**\ (\ ) |static| :ref:`🔗<class_PortableCompressedTexture2D_method_is_keeping_all_compressed_buffers>` Return whether the flag is overridden for all textures of this type. @@ -250,7 +274,7 @@ Return whether the flag is overridden for all textures of this type. .. rst-class:: classref-method -void **set_keep_all_compressed_buffers** **(** :ref:`bool<class_bool>` keep **)** |static| +|void| **set_keep_all_compressed_buffers**\ (\ keep\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_PortableCompressedTexture2D_method_set_keep_all_compressed_buffers>` Overrides the flag globally for all textures of this type. This is used primarily by the editor. @@ -261,3 +285,4 @@ Overrides the flag globally for all textures of this type. This is used primaril .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_primitivemesh.rst b/classes/class_primitivemesh.rst index e509ba18541..7bfc97eb325 100644 --- a/classes/class_primitivemesh.rst +++ b/classes/class_primitivemesh.rst @@ -51,11 +51,13 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`_create_mesh_array<class_PrimitiveMesh_method__create_mesh_array>` **(** **)** |virtual| |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_mesh_arrays<class_PrimitiveMesh_method_get_mesh_arrays>` **(** **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`_create_mesh_array<class_PrimitiveMesh_private_method__create_mesh_array>`\ (\ ) |virtual| |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_mesh_arrays<class_PrimitiveMesh_method_get_mesh_arrays>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_update<class_PrimitiveMesh_method_request_update>`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,12 +72,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **add_uv2** = ``false`` +:ref:`bool<class_bool>` **add_uv2** = ``false`` :ref:`🔗<class_PrimitiveMesh_property_add_uv2>` .. rst-class:: classref-property-setget -- void **set_add_uv2** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_add_uv2** **(** **)** +- |void| **set_add_uv2**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_add_uv2**\ (\ ) If set, generates UV2 UV coordinates applying a padding using the :ref:`uv2_padding<class_PrimitiveMesh_property_uv2_padding>` setting. UV2 is needed for lightmapping. @@ -87,12 +89,12 @@ If set, generates UV2 UV coordinates applying a padding using the :ref:`uv2_padd .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` +:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_PrimitiveMesh_property_custom_aabb>` .. rst-class:: classref-property-setget -- void **set_custom_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_custom_aabb** **(** **)** +- |void| **set_custom_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_custom_aabb**\ (\ ) Overrides the :ref:`AABB<class_AABB>` with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. @@ -104,12 +106,12 @@ Overrides the :ref:`AABB<class_AABB>` with one defined by user for use with frus .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_faces** = ``false`` +:ref:`bool<class_bool>` **flip_faces** = ``false`` :ref:`🔗<class_PrimitiveMesh_property_flip_faces>` .. rst-class:: classref-property-setget -- void **set_flip_faces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flip_faces** **(** **)** +- |void| **set_flip_faces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flip_faces**\ (\ ) If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. @@ -123,12 +125,12 @@ This gives the same result as using :ref:`BaseMaterial3D.CULL_FRONT<class_BaseMa .. rst-class:: classref-property -:ref:`Material<class_Material>` **material** +:ref:`Material<class_Material>` **material** :ref:`🔗<class_PrimitiveMesh_property_material>` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material**\ (\ ) The current :ref:`Material<class_Material>` of the primitive mesh. @@ -140,12 +142,12 @@ The current :ref:`Material<class_Material>` of the primitive mesh. .. rst-class:: classref-property -:ref:`float<class_float>` **uv2_padding** = ``2.0`` +:ref:`float<class_float>` **uv2_padding** = ``2.0`` :ref:`🔗<class_PrimitiveMesh_property_uv2_padding>` .. rst-class:: classref-property-setget -- void **set_uv2_padding** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_uv2_padding** **(** **)** +- |void| **set_uv2_padding**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_uv2_padding**\ (\ ) If :ref:`add_uv2<class_PrimitiveMesh_property_add_uv2>` is set, specifies the padding in pixels applied along seams of the mesh. Lower padding values allow making better use of the lightmap texture (resulting in higher texel density), but may introduce visible lightmap bleeding along edges. @@ -160,15 +162,13 @@ If the size of the lightmap texture can't be determined when generating the mesh Method Descriptions ------------------- -.. _class_PrimitiveMesh_method__create_mesh_array: +.. _class_PrimitiveMesh_private_method__create_mesh_array: .. rst-class:: classref-method -:ref:`Array<class_Array>` **_create_mesh_array** **(** **)** |virtual| |const| +:ref:`Array<class_Array>` **_create_mesh_array**\ (\ ) |virtual| |const| :ref:`🔗<class_PrimitiveMesh_private_method__create_mesh_array>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Override this method to customize how this primitive mesh should be generated. Should return an :ref:`Array<class_Array>` where each element is another Array of values required for the mesh (see the :ref:`ArrayType<enum_Mesh_ArrayType>` constants). .. rst-class:: classref-item-separator @@ -178,7 +178,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_mesh_arrays** **(** **)** |const| +:ref:`Array<class_Array>` **get_mesh_arrays**\ (\ ) |const| :ref:`🔗<class_PrimitiveMesh_method_get_mesh_arrays>` Returns mesh arrays used to constitute surface of :ref:`Mesh<class_Mesh>`. The result can be passed to :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>` to create a new surface. For example: @@ -199,6 +199,18 @@ Returns mesh arrays used to constitute surface of :ref:`Mesh<class_Mesh>`. The r +.. rst-class:: classref-item-separator + +---- + +.. _class_PrimitiveMesh_method_request_update: + +.. rst-class:: classref-method + +|void| **request_update**\ (\ ) :ref:`🔗<class_PrimitiveMesh_method_request_update>` + +Request an update of this primitive mesh based on its properties. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -206,3 +218,4 @@ Returns mesh arrays used to constitute surface of :ref:`Mesh<class_Mesh>`. The r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_prismmesh.rst b/classes/class_prismmesh.rst index c1a8f2f276a..0ea4f8e725f 100644 --- a/classes/class_prismmesh.rst +++ b/classes/class_prismmesh.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **left_to_right** = ``0.5`` +:ref:`float<class_float>` **left_to_right** = ``0.5`` :ref:`🔗<class_PrismMesh_property_left_to_right>` .. rst-class:: classref-property-setget -- void **set_left_to_right** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_left_to_right** **(** **)** +- |void| **set_left_to_right**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_left_to_right**\ (\ ) Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. @@ -71,12 +71,12 @@ Displacement of the upper edge along the X axis. 0.0 positions edge straight abo .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(1, 1, 1)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_PrismMesh_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) Size of the prism. @@ -88,12 +88,12 @@ Size of the prism. .. rst-class:: classref-property -:ref:`int<class_int>` **subdivide_depth** = ``0`` +:ref:`int<class_int>` **subdivide_depth** = ``0`` :ref:`🔗<class_PrismMesh_property_subdivide_depth>` .. rst-class:: classref-property-setget -- void **set_subdivide_depth** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_subdivide_depth** **(** **)** +- |void| **set_subdivide_depth**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_subdivide_depth**\ (\ ) Number of added edge loops along the Z axis. @@ -105,12 +105,12 @@ Number of added edge loops along the Z axis. .. rst-class:: classref-property -:ref:`int<class_int>` **subdivide_height** = ``0`` +:ref:`int<class_int>` **subdivide_height** = ``0`` :ref:`🔗<class_PrismMesh_property_subdivide_height>` .. rst-class:: classref-property-setget -- void **set_subdivide_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_subdivide_height** **(** **)** +- |void| **set_subdivide_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_subdivide_height**\ (\ ) Number of added edge loops along the Y axis. @@ -122,12 +122,12 @@ Number of added edge loops along the Y axis. .. rst-class:: classref-property -:ref:`int<class_int>` **subdivide_width** = ``0`` +:ref:`int<class_int>` **subdivide_width** = ``0`` :ref:`🔗<class_PrismMesh_property_subdivide_width>` .. rst-class:: classref-property-setget -- void **set_subdivide_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_subdivide_width** **(** **)** +- |void| **set_subdivide_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_subdivide_width**\ (\ ) Number of added edge loops along the X axis. @@ -138,3 +138,4 @@ Number of added edge loops along the X axis. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_proceduralskymaterial.rst b/classes/class_proceduralskymaterial.rst index 567f9576f26..6c49f70d94b 100644 --- a/classes/class_proceduralskymaterial.rst +++ b/classes/class_proceduralskymaterial.rst @@ -12,18 +12,18 @@ ProceduralSkyMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A :ref:`Material<class_Material>` used with :ref:`Sky<class_Sky>` to generate a background based on user input parameters. +A material that defines a simple sky for a :ref:`Sky<class_Sky>` resource. .. rst-class:: classref-introduction-group Description ----------- -ProceduralSkyMaterial provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. +**ProceduralSkyMaterial** provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are defined by a main color, a color at the horizon, and an easing curve to interpolate between them. Suns are described by a position in the sky, a color, and a max angle from the sun at which the easing curve ends. The max angle therefore defines the size of the sun in the sky. -The **ProceduralSkyMaterial** uses a lightweight shader to draw the sky and is thus suited for real time updates. When you do not need a quick sky that is not realistic, this is a good option. If you need a more realistic option, try using :ref:`PhysicalSkyMaterial<class_PhysicalSkyMaterial>` instead. +\ **ProceduralSkyMaterial** supports up to 4 suns, using the color, and energy, direction, and angular distance of the first four :ref:`DirectionalLight3D<class_DirectionalLight3D>` nodes in the scene. This means that the suns are defined individually by the properties of their corresponding :ref:`DirectionalLight3D<class_DirectionalLight3D>`\ s and globally by :ref:`sun_angle_max<class_ProceduralSkyMaterial_property_sun_angle_max>` and :ref:`sun_curve<class_ProceduralSkyMaterial_property_sun_curve>`. -The **ProceduralSkyMaterial** supports up to 4 suns. Each sun takes its color, energy, and direction from the corresponding :ref:`DirectionalLight3D<class_DirectionalLight3D>` in the scene. +\ **ProceduralSkyMaterial** uses a lightweight shader to draw the sky and is therefore suited for real-time updates. This makes it a great option for a sky that is simple and computationally cheap, but unrealistic. If you need a more realistic procedural option, use :ref:`PhysicalSkyMaterial<class_PhysicalSkyMaterial>`. .. rst-class:: classref-reftable-group @@ -33,6 +33,8 @@ Properties .. table:: :widths: auto + +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ + | :ref:`float<class_float>` | :ref:`energy_multiplier<class_ProceduralSkyMaterial_property_energy_multiplier>` | ``1.0`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ | :ref:`Color<class_Color>` | :ref:`ground_bottom_color<class_ProceduralSkyMaterial_property_ground_bottom_color>` | ``Color(0.2, 0.169, 0.133, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------------+--------------------------------------+ @@ -70,16 +72,33 @@ Properties Property Descriptions --------------------- +.. _class_ProceduralSkyMaterial_property_energy_multiplier: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **energy_multiplier** = ``1.0`` :ref:`🔗<class_ProceduralSkyMaterial_property_energy_multiplier>` + +.. rst-class:: classref-property-setget + +- |void| **set_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_energy_multiplier**\ (\ ) + +The sky's overall brightness multiplier. Higher values result in a brighter sky. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProceduralSkyMaterial_property_ground_bottom_color: .. rst-class:: classref-property -:ref:`Color<class_Color>` **ground_bottom_color** = ``Color(0.2, 0.169, 0.133, 1)`` +:ref:`Color<class_Color>` **ground_bottom_color** = ``Color(0.2, 0.169, 0.133, 1)`` :ref:`🔗<class_ProceduralSkyMaterial_property_ground_bottom_color>` .. rst-class:: classref-property-setget -- void **set_ground_bottom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_ground_bottom_color** **(** **)** +- |void| **set_ground_bottom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_ground_bottom_color**\ (\ ) Color of the ground at the bottom. Blends with :ref:`ground_horizon_color<class_ProceduralSkyMaterial_property_ground_horizon_color>`. @@ -91,12 +110,12 @@ Color of the ground at the bottom. Blends with :ref:`ground_horizon_color<class_ .. rst-class:: classref-property -:ref:`float<class_float>` **ground_curve** = ``0.02`` +:ref:`float<class_float>` **ground_curve** = ``0.02`` :ref:`🔗<class_ProceduralSkyMaterial_property_ground_curve>` .. rst-class:: classref-property-setget -- void **set_ground_curve** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ground_curve** **(** **)** +- |void| **set_ground_curve**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ground_curve**\ (\ ) How quickly the :ref:`ground_horizon_color<class_ProceduralSkyMaterial_property_ground_horizon_color>` fades into the :ref:`ground_bottom_color<class_ProceduralSkyMaterial_property_ground_bottom_color>`. @@ -108,12 +127,12 @@ How quickly the :ref:`ground_horizon_color<class_ProceduralSkyMaterial_property_ .. rst-class:: classref-property -:ref:`float<class_float>` **ground_energy_multiplier** = ``1.0`` +:ref:`float<class_float>` **ground_energy_multiplier** = ``1.0`` :ref:`🔗<class_ProceduralSkyMaterial_property_ground_energy_multiplier>` .. rst-class:: classref-property-setget -- void **set_ground_energy_multiplier** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ground_energy_multiplier** **(** **)** +- |void| **set_ground_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ground_energy_multiplier**\ (\ ) Multiplier for ground color. A higher value will make the ground brighter. @@ -125,12 +144,12 @@ Multiplier for ground color. A higher value will make the ground brighter. .. rst-class:: classref-property -:ref:`Color<class_Color>` **ground_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` +:ref:`Color<class_Color>` **ground_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` :ref:`🔗<class_ProceduralSkyMaterial_property_ground_horizon_color>` .. rst-class:: classref-property-setget -- void **set_ground_horizon_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_ground_horizon_color** **(** **)** +- |void| **set_ground_horizon_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_ground_horizon_color**\ (\ ) Color of the ground at the horizon. Blends with :ref:`ground_bottom_color<class_ProceduralSkyMaterial_property_ground_bottom_color>`. @@ -142,12 +161,12 @@ Color of the ground at the horizon. Blends with :ref:`ground_bottom_color<class_ .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **sky_cover** +:ref:`Texture2D<class_Texture2D>` **sky_cover** :ref:`🔗<class_ProceduralSkyMaterial_property_sky_cover>` .. rst-class:: classref-property-setget -- void **set_sky_cover** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_sky_cover** **(** **)** +- |void| **set_sky_cover**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_sky_cover**\ (\ ) The sky cover texture to use. This texture must use an equirectangular projection (similar to :ref:`PanoramaSkyMaterial<class_PanoramaSkyMaterial>`). The texture's colors will be *added* to the existing sky color, and will be multiplied by :ref:`sky_energy_multiplier<class_ProceduralSkyMaterial_property_sky_energy_multiplier>` and :ref:`sky_cover_modulate<class_ProceduralSkyMaterial_property_sky_cover_modulate>`. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). @@ -159,12 +178,12 @@ The sky cover texture to use. This texture must use an equirectangular projectio .. rst-class:: classref-property -:ref:`Color<class_Color>` **sky_cover_modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **sky_cover_modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_ProceduralSkyMaterial_property_sky_cover_modulate>` .. rst-class:: classref-property-setget -- void **set_sky_cover_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_sky_cover_modulate** **(** **)** +- |void| **set_sky_cover_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_sky_cover_modulate**\ (\ ) The tint to apply to the :ref:`sky_cover<class_ProceduralSkyMaterial_property_sky_cover>` texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in :ref:`sky_cover<class_ProceduralSkyMaterial_property_sky_cover>`. @@ -176,12 +195,12 @@ The tint to apply to the :ref:`sky_cover<class_ProceduralSkyMaterial_property_sk .. rst-class:: classref-property -:ref:`float<class_float>` **sky_curve** = ``0.15`` +:ref:`float<class_float>` **sky_curve** = ``0.15`` :ref:`🔗<class_ProceduralSkyMaterial_property_sky_curve>` .. rst-class:: classref-property-setget -- void **set_sky_curve** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sky_curve** **(** **)** +- |void| **set_sky_curve**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sky_curve**\ (\ ) How quickly the :ref:`sky_horizon_color<class_ProceduralSkyMaterial_property_sky_horizon_color>` fades into the :ref:`sky_top_color<class_ProceduralSkyMaterial_property_sky_top_color>`. @@ -193,12 +212,12 @@ How quickly the :ref:`sky_horizon_color<class_ProceduralSkyMaterial_property_sky .. rst-class:: classref-property -:ref:`float<class_float>` **sky_energy_multiplier** = ``1.0`` +:ref:`float<class_float>` **sky_energy_multiplier** = ``1.0`` :ref:`🔗<class_ProceduralSkyMaterial_property_sky_energy_multiplier>` .. rst-class:: classref-property-setget -- void **set_sky_energy_multiplier** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sky_energy_multiplier** **(** **)** +- |void| **set_sky_energy_multiplier**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sky_energy_multiplier**\ (\ ) Multiplier for sky color. A higher value will make the sky brighter. @@ -210,12 +229,12 @@ Multiplier for sky color. A higher value will make the sky brighter. .. rst-class:: classref-property -:ref:`Color<class_Color>` **sky_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` +:ref:`Color<class_Color>` **sky_horizon_color** = ``Color(0.6463, 0.6558, 0.6708, 1)`` :ref:`🔗<class_ProceduralSkyMaterial_property_sky_horizon_color>` .. rst-class:: classref-property-setget -- void **set_sky_horizon_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_sky_horizon_color** **(** **)** +- |void| **set_sky_horizon_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_sky_horizon_color**\ (\ ) Color of the sky at the horizon. Blends with :ref:`sky_top_color<class_ProceduralSkyMaterial_property_sky_top_color>`. @@ -227,12 +246,12 @@ Color of the sky at the horizon. Blends with :ref:`sky_top_color<class_Procedura .. rst-class:: classref-property -:ref:`Color<class_Color>` **sky_top_color** = ``Color(0.385, 0.454, 0.55, 1)`` +:ref:`Color<class_Color>` **sky_top_color** = ``Color(0.385, 0.454, 0.55, 1)`` :ref:`🔗<class_ProceduralSkyMaterial_property_sky_top_color>` .. rst-class:: classref-property-setget -- void **set_sky_top_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_sky_top_color** **(** **)** +- |void| **set_sky_top_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_sky_top_color**\ (\ ) Color of the sky at the top. Blends with :ref:`sky_horizon_color<class_ProceduralSkyMaterial_property_sky_horizon_color>`. @@ -244,12 +263,12 @@ Color of the sky at the top. Blends with :ref:`sky_horizon_color<class_Procedura .. rst-class:: classref-property -:ref:`float<class_float>` **sun_angle_max** = ``30.0`` +:ref:`float<class_float>` **sun_angle_max** = ``30.0`` :ref:`🔗<class_ProceduralSkyMaterial_property_sun_angle_max>` .. rst-class:: classref-property-setget -- void **set_sun_angle_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sun_angle_max** **(** **)** +- |void| **set_sun_angle_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sun_angle_max**\ (\ ) Distance from center of sun where it fades out completely. @@ -261,12 +280,12 @@ Distance from center of sun where it fades out completely. .. rst-class:: classref-property -:ref:`float<class_float>` **sun_curve** = ``0.15`` +:ref:`float<class_float>` **sun_curve** = ``0.15`` :ref:`🔗<class_ProceduralSkyMaterial_property_sun_curve>` .. rst-class:: classref-property-setget -- void **set_sun_curve** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sun_curve** **(** **)** +- |void| **set_sun_curve**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sun_curve**\ (\ ) How quickly the sun fades away between the edge of the sun disk and :ref:`sun_angle_max<class_ProceduralSkyMaterial_property_sun_angle_max>`. @@ -278,12 +297,12 @@ How quickly the sun fades away between the edge of the sun disk and :ref:`sun_an .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_debanding** = ``true`` +:ref:`bool<class_bool>` **use_debanding** = ``true`` :ref:`🔗<class_ProceduralSkyMaterial_property_use_debanding>` .. rst-class:: classref-property-setget -- void **set_use_debanding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_debanding** **(** **)** +- |void| **set_use_debanding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_debanding**\ (\ ) If ``true``, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. @@ -294,3 +313,4 @@ If ``true``, enables debanding. Debanding adds a small amount of noise which hel .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_progressbar.rst b/classes/class_progressbar.rst index 0ae4e9b1903..d0b82a3b012 100644 --- a/classes/class_progressbar.rst +++ b/classes/class_progressbar.rst @@ -29,11 +29,15 @@ Properties .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------+----------+ - | :ref:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` | - +-------------------------+--------------------------------------------------------------------+----------+ - | :ref:`bool<class_bool>` | :ref:`show_percentage<class_ProgressBar_property_show_percentage>` | ``true`` | - +-------------------------+--------------------------------------------------------------------+----------+ + +-------------------------+----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`editor_preview_indeterminate<class_ProgressBar_property_editor_preview_indeterminate>` | | + +-------------------------+----------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`fill_mode<class_ProgressBar_property_fill_mode>` | ``0`` | + +-------------------------+----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`indeterminate<class_ProgressBar_property_indeterminate>` | ``false`` | + +-------------------------+----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`show_percentage<class_ProgressBar_property_show_percentage>` | ``true`` | + +-------------------------+----------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -46,9 +50,7 @@ Theme Properties +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_color<class_ProgressBar_theme_color_font_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_shadow_color<class_ProgressBar_theme_color_font_shadow_color>` | ``Color(0, 0, 0, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_ProgressBar_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`int<class_int>` | :ref:`outline_size<class_ProgressBar_theme_constant_outline_size>` | ``0`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ @@ -74,7 +76,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FillMode**: +enum **FillMode**: :ref:`🔗<enum_ProgressBar_FillMode>` .. _class_ProgressBar_constant_FILL_BEGIN_TO_END: @@ -117,16 +119,33 @@ The progress fills from bottom to top. Property Descriptions --------------------- +.. _class_ProgressBar_property_editor_preview_indeterminate: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **editor_preview_indeterminate** :ref:`🔗<class_ProgressBar_property_editor_preview_indeterminate>` + +.. rst-class:: classref-property-setget + +- |void| **set_editor_preview_indeterminate**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editor_preview_indeterminate_enabled**\ (\ ) + +If ``false``, the :ref:`indeterminate<class_ProgressBar_property_indeterminate>` animation will be paused in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProgressBar_property_fill_mode: .. rst-class:: classref-property -:ref:`int<class_int>` **fill_mode** = ``0`` +:ref:`int<class_int>` **fill_mode** = ``0`` :ref:`🔗<class_ProgressBar_property_fill_mode>` .. rst-class:: classref-property-setget -- void **set_fill_mode** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fill_mode** **(** **)** +- |void| **set_fill_mode**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fill_mode**\ (\ ) The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible values. @@ -134,16 +153,33 @@ The fill direction. See :ref:`FillMode<enum_ProgressBar_FillMode>` for possible ---- +.. _class_ProgressBar_property_indeterminate: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **indeterminate** = ``false`` :ref:`🔗<class_ProgressBar_property_indeterminate>` + +.. rst-class:: classref-property-setget + +- |void| **set_indeterminate**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_indeterminate**\ (\ ) + +When set to ``true``, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProgressBar_property_show_percentage: .. rst-class:: classref-property -:ref:`bool<class_bool>` **show_percentage** = ``true`` +:ref:`bool<class_bool>` **show_percentage** = ``true`` :ref:`🔗<class_ProgressBar_property_show_percentage>` .. rst-class:: classref-property-setget -- void **set_show_percentage** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_percentage_shown** **(** **)** +- |void| **set_show_percentage**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_percentage_shown**\ (\ ) If ``true``, the fill percentage is displayed on the bar. @@ -160,7 +196,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_ProgressBar_theme_color_font_color>` The color of the text. @@ -172,7 +208,7 @@ The color of the text. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ProgressBar_theme_color_font_outline_color>` The tint of text outline of the **ProgressBar**. @@ -180,23 +216,11 @@ The tint of text outline of the **ProgressBar**. ---- -.. _class_ProgressBar_theme_color_font_shadow_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 1)`` - -The color of the text's shadow. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProgressBar_theme_constant_outline_size: .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_ProgressBar_theme_constant_outline_size>` The size of the text outline. @@ -210,7 +234,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_ProgressBar_theme_font_font>` Font used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``. @@ -222,7 +246,7 @@ Font used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_ProgressBar_theme_font_size_font_size>` Font size used to draw the fill percentage if :ref:`show_percentage<class_ProgressBar_property_show_percentage>` is ``true``. @@ -234,7 +258,7 @@ Font size used to draw the fill percentage if :ref:`show_percentage<class_Progre .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **background** +:ref:`StyleBox<class_StyleBox>` **background** :ref:`🔗<class_ProgressBar_theme_style_background>` The style of the background. @@ -246,7 +270,7 @@ The style of the background. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **fill** +:ref:`StyleBox<class_StyleBox>` **fill** :ref:`🔗<class_ProgressBar_theme_style_fill>` The style of the progress (i.e. the part that fills the bar). @@ -257,3 +281,4 @@ The style of the progress (i.e. the part that fills the bar). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_projection.rst b/classes/class_projection.rst index 95077427a24..f9cd5d58242 100644 --- a/classes/class_projection.rst +++ b/classes/class_projection.rst @@ -17,7 +17,7 @@ A 4×4 matrix for 3D projective transformations. Description ----------- -A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four :ref:`Vector4<class_Vector4>` columns. +A 4×4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four :ref:`Vector4<class_Vector4>` columns. For purely linear transformations (translation, rotation, and scale), it is recommended to use :ref:`Transform3D<class_Transform3D>`, as it is more performant and requires less memory. @@ -53,15 +53,15 @@ Constructors .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>` **(** :ref:`Projection<class_Projection>` from **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>` **(** :ref:`Transform3D<class_Transform3D>` from **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>` **(** :ref:`Vector4<class_Vector4>` x_axis, :ref:`Vector4<class_Vector4>` y_axis, :ref:`Vector4<class_Vector4>` z_axis, :ref:`Vector4<class_Vector4>` w_axis **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>`\ (\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>`\ (\ from\: :ref:`Projection<class_Projection>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>`\ (\ from\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`Projection<class_Projection_constructor_Projection>`\ (\ x_axis\: :ref:`Vector4<class_Vector4>`, y_axis\: :ref:`Vector4<class_Vector4>`, z_axis\: :ref:`Vector4<class_Vector4>`, w_axis\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -71,59 +71,59 @@ Methods .. table:: :widths: auto - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_depth_correction<class_Projection_method_create_depth_correction>` **(** :ref:`bool<class_bool>` flip_y **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_fit_aabb<class_Projection_method_create_fit_aabb>` **(** :ref:`AABB<class_AABB>` aabb **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_for_hmd<class_Projection_method_create_for_hmd>` **(** :ref:`int<class_int>` eye, :ref:`float<class_float>` aspect, :ref:`float<class_float>` intraocular_dist, :ref:`float<class_float>` display_width, :ref:`float<class_float>` display_to_lens, :ref:`float<class_float>` oversample, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_frustum<class_Projection_method_create_frustum>` **(** :ref:`float<class_float>` left, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom, :ref:`float<class_float>` top, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_frustum_aspect<class_Projection_method_create_frustum_aspect>` **(** :ref:`float<class_float>` size, :ref:`float<class_float>` aspect, :ref:`Vector2<class_Vector2>` offset, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_light_atlas_rect<class_Projection_method_create_light_atlas_rect>` **(** :ref:`Rect2<class_Rect2>` rect **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_orthogonal<class_Projection_method_create_orthogonal>` **(** :ref:`float<class_float>` left, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom, :ref:`float<class_float>` top, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_orthogonal_aspect<class_Projection_method_create_orthogonal_aspect>` **(** :ref:`float<class_float>` size, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_perspective<class_Projection_method_create_perspective>` **(** :ref:`float<class_float>` fovy, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`create_perspective_hmd<class_Projection_method_create_perspective_hmd>` **(** :ref:`float<class_float>` fovy, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov, :ref:`int<class_int>` eye, :ref:`float<class_float>` intraocular_dist, :ref:`float<class_float>` convergence_dist **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`determinant<class_Projection_method_determinant>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`flipped_y<class_Projection_method_flipped_y>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_aspect<class_Projection_method_get_aspect>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_far_plane_half_extents<class_Projection_method_get_far_plane_half_extents>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_fov<class_Projection_method_get_fov>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_fovy<class_Projection_method_get_fovy>` **(** :ref:`float<class_float>` fovx, :ref:`float<class_float>` aspect **)** |static| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_lod_multiplier<class_Projection_method_get_lod_multiplier>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_pixels_per_meter<class_Projection_method_get_pixels_per_meter>` **(** :ref:`int<class_int>` for_pixel_width **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`get_projection_plane<class_Projection_method_get_projection_plane>` **(** :ref:`int<class_int>` plane **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_viewport_half_extents<class_Projection_method_get_viewport_half_extents>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_z_far<class_Projection_method_get_z_far>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_z_near<class_Projection_method_get_z_near>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`inverse<class_Projection_method_inverse>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_orthogonal<class_Projection_method_is_orthogonal>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`jitter_offseted<class_Projection_method_jitter_offseted>` **(** :ref:`Vector2<class_Vector2>` offset **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`perspective_znear_adjusted<class_Projection_method_perspective_znear_adjusted>` **(** :ref:`float<class_float>` new_znear **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_depth_correction<class_Projection_method_create_depth_correction>`\ (\ flip_y\: :ref:`bool<class_bool>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_fit_aabb<class_Projection_method_create_fit_aabb>`\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_for_hmd<class_Projection_method_create_for_hmd>`\ (\ eye\: :ref:`int<class_int>`, aspect\: :ref:`float<class_float>`, intraocular_dist\: :ref:`float<class_float>`, display_width\: :ref:`float<class_float>`, display_to_lens\: :ref:`float<class_float>`, oversample\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_frustum<class_Projection_method_create_frustum>`\ (\ left\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_frustum_aspect<class_Projection_method_create_frustum_aspect>`\ (\ size\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, offset\: :ref:`Vector2<class_Vector2>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_light_atlas_rect<class_Projection_method_create_light_atlas_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_orthogonal<class_Projection_method_create_orthogonal>`\ (\ left\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_orthogonal_aspect<class_Projection_method_create_orthogonal_aspect>`\ (\ size\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_perspective<class_Projection_method_create_perspective>`\ (\ fovy\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`create_perspective_hmd<class_Projection_method_create_perspective_hmd>`\ (\ fovy\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>`, eye\: :ref:`int<class_int>`, intraocular_dist\: :ref:`float<class_float>`, convergence_dist\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`determinant<class_Projection_method_determinant>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`flipped_y<class_Projection_method_flipped_y>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_aspect<class_Projection_method_get_aspect>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_far_plane_half_extents<class_Projection_method_get_far_plane_half_extents>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_fov<class_Projection_method_get_fov>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_fovy<class_Projection_method_get_fovy>`\ (\ fovx\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_lod_multiplier<class_Projection_method_get_lod_multiplier>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_pixels_per_meter<class_Projection_method_get_pixels_per_meter>`\ (\ for_pixel_width\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`get_projection_plane<class_Projection_method_get_projection_plane>`\ (\ plane\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_viewport_half_extents<class_Projection_method_get_viewport_half_extents>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_z_far<class_Projection_method_get_z_far>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_z_near<class_Projection_method_get_z_near>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`inverse<class_Projection_method_inverse>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_orthogonal<class_Projection_method_is_orthogonal>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`jitter_offseted<class_Projection_method_jitter_offseted>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`perspective_znear_adjusted<class_Projection_method_perspective_znear_adjusted>`\ (\ new_znear\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -133,17 +133,17 @@ Operators .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Projection_operator_neq_Projection>` **(** :ref:`Projection<class_Projection>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection<class_Projection>` | :ref:`operator *<class_Projection_operator_mul_Projection>` **(** :ref:`Projection<class_Projection>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Projection_operator_mul_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Projection_operator_eq_Projection>` **(** :ref:`Projection<class_Projection>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator []<class_Projection_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Projection_operator_neq_Projection>`\ (\ right\: :ref:`Projection<class_Projection>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`operator *<class_Projection_operator_mul_Projection>`\ (\ right\: :ref:`Projection<class_Projection>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Projection_operator_mul_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Projection_operator_eq_Projection>`\ (\ right\: :ref:`Projection<class_Projection>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator []<class_Projection_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -158,7 +158,7 @@ Constants .. rst-class:: classref-constant -**PLANE_NEAR** = ``0`` +**PLANE_NEAR** = ``0`` :ref:`🔗<class_Projection_constant_PLANE_NEAR>` The index value of the projection's near clipping plane. @@ -166,7 +166,7 @@ The index value of the projection's near clipping plane. .. rst-class:: classref-constant -**PLANE_FAR** = ``1`` +**PLANE_FAR** = ``1`` :ref:`🔗<class_Projection_constant_PLANE_FAR>` The index value of the projection's far clipping plane. @@ -174,7 +174,7 @@ The index value of the projection's far clipping plane. .. rst-class:: classref-constant -**PLANE_LEFT** = ``2`` +**PLANE_LEFT** = ``2`` :ref:`🔗<class_Projection_constant_PLANE_LEFT>` The index value of the projection's left clipping plane. @@ -182,7 +182,7 @@ The index value of the projection's left clipping plane. .. rst-class:: classref-constant -**PLANE_TOP** = ``3`` +**PLANE_TOP** = ``3`` :ref:`🔗<class_Projection_constant_PLANE_TOP>` The index value of the projection's top clipping plane. @@ -190,7 +190,7 @@ The index value of the projection's top clipping plane. .. rst-class:: classref-constant -**PLANE_RIGHT** = ``4`` +**PLANE_RIGHT** = ``4`` :ref:`🔗<class_Projection_constant_PLANE_RIGHT>` The index value of the projection's right clipping plane. @@ -198,7 +198,7 @@ The index value of the projection's right clipping plane. .. rst-class:: classref-constant -**PLANE_BOTTOM** = ``5`` +**PLANE_BOTTOM** = ``5`` :ref:`🔗<class_Projection_constant_PLANE_BOTTOM>` The index value of the projection bottom clipping plane. @@ -206,7 +206,7 @@ The index value of the projection bottom clipping plane. .. rst-class:: classref-constant -**IDENTITY** = ``Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)`` +**IDENTITY** = ``Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)`` :ref:`🔗<class_Projection_constant_IDENTITY>` A **Projection** with no transformation defined. When applied to other data structures, no transformation is performed. @@ -214,7 +214,7 @@ A **Projection** with no transformation defined. When applied to other data stru .. rst-class:: classref-constant -**ZERO** = ``Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)`` +**ZERO** = ``Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_Projection_constant_ZERO>` A **Projection** with all values initialized to 0. When applied to other data structures, they will be zeroed. @@ -231,7 +231,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector4<class_Vector4>` **w** = ``Vector4(0, 0, 0, 1)`` +:ref:`Vector4<class_Vector4>` **w** = ``Vector4(0, 0, 0, 1)`` :ref:`🔗<class_Projection_property_w>` The projection matrix's W vector (column 3). Equivalent to array index ``3``. @@ -243,7 +243,7 @@ The projection matrix's W vector (column 3). Equivalent to array index ``3``. .. rst-class:: classref-property -:ref:`Vector4<class_Vector4>` **x** = ``Vector4(1, 0, 0, 0)`` +:ref:`Vector4<class_Vector4>` **x** = ``Vector4(1, 0, 0, 0)`` :ref:`🔗<class_Projection_property_x>` The projection matrix's X vector (column 0). Equivalent to array index ``0``. @@ -255,7 +255,7 @@ The projection matrix's X vector (column 0). Equivalent to array index ``0``. .. rst-class:: classref-property -:ref:`Vector4<class_Vector4>` **y** = ``Vector4(0, 1, 0, 0)`` +:ref:`Vector4<class_Vector4>` **y** = ``Vector4(0, 1, 0, 0)`` :ref:`🔗<class_Projection_property_y>` The projection matrix's Y vector (column 1). Equivalent to array index ``1``. @@ -267,7 +267,7 @@ The projection matrix's Y vector (column 1). Equivalent to array index ``1``. .. rst-class:: classref-property -:ref:`Vector4<class_Vector4>` **z** = ``Vector4(0, 0, 1, 0)`` +:ref:`Vector4<class_Vector4>` **z** = ``Vector4(0, 0, 1, 0)`` :ref:`🔗<class_Projection_property_z>` The projection matrix's Z vector (column 2). Equivalent to array index ``2``. @@ -284,7 +284,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Projection<class_Projection>` **Projection** **(** **)** +:ref:`Projection<class_Projection>` **Projection**\ (\ ) :ref:`🔗<class_Projection_constructor_Projection>` Constructs a default-initialized **Projection** set to :ref:`IDENTITY<class_Projection_constant_IDENTITY>`. @@ -294,7 +294,7 @@ Constructs a default-initialized **Projection** set to :ref:`IDENTITY<class_Proj .. rst-class:: classref-constructor -:ref:`Projection<class_Projection>` **Projection** **(** :ref:`Projection<class_Projection>` from **)** +:ref:`Projection<class_Projection>` **Projection**\ (\ from\: :ref:`Projection<class_Projection>`\ ) Constructs a **Projection** as a copy of the given **Projection**. @@ -304,7 +304,7 @@ Constructs a **Projection** as a copy of the given **Projection**. .. rst-class:: classref-constructor -:ref:`Projection<class_Projection>` **Projection** **(** :ref:`Transform3D<class_Transform3D>` from **)** +:ref:`Projection<class_Projection>` **Projection**\ (\ from\: :ref:`Transform3D<class_Transform3D>`\ ) Constructs a Projection as a copy of the given :ref:`Transform3D<class_Transform3D>`. @@ -314,7 +314,7 @@ Constructs a Projection as a copy of the given :ref:`Transform3D<class_Transform .. rst-class:: classref-constructor -:ref:`Projection<class_Projection>` **Projection** **(** :ref:`Vector4<class_Vector4>` x_axis, :ref:`Vector4<class_Vector4>` y_axis, :ref:`Vector4<class_Vector4>` z_axis, :ref:`Vector4<class_Vector4>` w_axis **)** +:ref:`Projection<class_Projection>` **Projection**\ (\ x_axis\: :ref:`Vector4<class_Vector4>`, y_axis\: :ref:`Vector4<class_Vector4>`, z_axis\: :ref:`Vector4<class_Vector4>`, w_axis\: :ref:`Vector4<class_Vector4>`\ ) Constructs a Projection from four :ref:`Vector4<class_Vector4>` values (matrix columns). @@ -331,7 +331,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_depth_correction** **(** :ref:`bool<class_bool>` flip_y **)** |static| +:ref:`Projection<class_Projection>` **create_depth_correction**\ (\ flip_y\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_Projection_method_create_depth_correction>` Creates a new **Projection** that projects positions from a depth range of ``-1`` to ``1`` to one that ranges from ``0`` to ``1``, and flips the projected positions vertically, according to ``flip_y``. @@ -343,7 +343,7 @@ Creates a new **Projection** that projects positions from a depth range of ``-1` .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_fit_aabb** **(** :ref:`AABB<class_AABB>` aabb **)** |static| +:ref:`Projection<class_Projection>` **create_fit_aabb**\ (\ aabb\: :ref:`AABB<class_AABB>`\ ) |static| :ref:`🔗<class_Projection_method_create_fit_aabb>` Creates a new **Projection** that scales a given projection to fit around a given :ref:`AABB<class_AABB>` in projection space. @@ -355,7 +355,7 @@ Creates a new **Projection** that scales a given projection to fit around a give .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_for_hmd** **(** :ref:`int<class_int>` eye, :ref:`float<class_float>` aspect, :ref:`float<class_float>` intraocular_dist, :ref:`float<class_float>` display_width, :ref:`float<class_float>` display_to_lens, :ref:`float<class_float>` oversample, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| +:ref:`Projection<class_Projection>` **create_for_hmd**\ (\ eye\: :ref:`int<class_int>`, aspect\: :ref:`float<class_float>`, intraocular_dist\: :ref:`float<class_float>`, display_width\: :ref:`float<class_float>`, display_to_lens\: :ref:`float<class_float>`, oversample\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Projection_method_create_for_hmd>` Creates a new **Projection** for projecting positions onto a head-mounted display with the given X:Y aspect ratio, distance between eyes, display width, distance to lens, oversampling factor, and depth clipping planes. @@ -369,7 +369,7 @@ Creates a new **Projection** for projecting positions onto a head-mounted displa .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_frustum** **(** :ref:`float<class_float>` left, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom, :ref:`float<class_float>` top, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| +:ref:`Projection<class_Projection>` **create_frustum**\ (\ left\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Projection_method_create_frustum>` Creates a new **Projection** that projects positions in a frustum with the given clipping planes. @@ -381,7 +381,7 @@ Creates a new **Projection** that projects positions in a frustum with the given .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_frustum_aspect** **(** :ref:`float<class_float>` size, :ref:`float<class_float>` aspect, :ref:`Vector2<class_Vector2>` offset, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| +:ref:`Projection<class_Projection>` **create_frustum_aspect**\ (\ size\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, offset\: :ref:`Vector2<class_Vector2>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_Projection_method_create_frustum_aspect>` Creates a new **Projection** that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes. @@ -395,7 +395,7 @@ Creates a new **Projection** that projects positions in a frustum with the given .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_light_atlas_rect** **(** :ref:`Rect2<class_Rect2>` rect **)** |static| +:ref:`Projection<class_Projection>` **create_light_atlas_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |static| :ref:`🔗<class_Projection_method_create_light_atlas_rect>` Creates a new **Projection** that projects positions into the given :ref:`Rect2<class_Rect2>`. @@ -407,7 +407,7 @@ Creates a new **Projection** that projects positions into the given :ref:`Rect2< .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_orthogonal** **(** :ref:`float<class_float>` left, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom, :ref:`float<class_float>` top, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |static| +:ref:`Projection<class_Projection>` **create_orthogonal**\ (\ left\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Projection_method_create_orthogonal>` Creates a new **Projection** that projects positions using an orthogonal projection with the given clipping planes. @@ -419,7 +419,7 @@ Creates a new **Projection** that projects positions using an orthogonal project .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_orthogonal_aspect** **(** :ref:`float<class_float>` size, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| +:ref:`Projection<class_Projection>` **create_orthogonal_aspect**\ (\ size\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_Projection_method_create_orthogonal_aspect>` Creates a new **Projection** that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes. @@ -433,7 +433,7 @@ Creates a new **Projection** that projects positions using an orthogonal project .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_perspective** **(** :ref:`float<class_float>` fovy, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov=false **)** |static| +:ref:`Projection<class_Projection>` **create_perspective**\ (\ fovy\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_Projection_method_create_perspective>` Creates a new **Projection** that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping planes. @@ -447,7 +447,7 @@ Creates a new **Projection** that projects positions using a perspective project .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **create_perspective_hmd** **(** :ref:`float<class_float>` fovy, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far, :ref:`bool<class_bool>` flip_fov, :ref:`int<class_int>` eye, :ref:`float<class_float>` intraocular_dist, :ref:`float<class_float>` convergence_dist **)** |static| +:ref:`Projection<class_Projection>` **create_perspective_hmd**\ (\ fovy\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`, flip_fov\: :ref:`bool<class_bool>`, eye\: :ref:`int<class_int>`, intraocular_dist\: :ref:`float<class_float>`, convergence_dist\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Projection_method_create_perspective_hmd>` Creates a new **Projection** that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping distances. The projection is adjusted for a head-mounted display with the given distance between eyes and distance to a point that can be focused on. @@ -463,7 +463,7 @@ Creates a new **Projection** that projects positions using a perspective project .. rst-class:: classref-method -:ref:`float<class_float>` **determinant** **(** **)** |const| +:ref:`float<class_float>` **determinant**\ (\ ) |const| :ref:`🔗<class_Projection_method_determinant>` Returns a scalar value that is the signed factor by which areas are scaled by this matrix. If the sign is negative, the matrix flips the orientation of the area. @@ -477,7 +477,7 @@ The determinant can be used to calculate the invertibility of a matrix or solve .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **flipped_y** **(** **)** |const| +:ref:`Projection<class_Projection>` **flipped_y**\ (\ ) |const| :ref:`🔗<class_Projection_method_flipped_y>` Returns a copy of this **Projection** with the signs of the values of the Y column flipped. @@ -489,7 +489,7 @@ Returns a copy of this **Projection** with the signs of the values of the Y colu .. rst-class:: classref-method -:ref:`float<class_float>` **get_aspect** **(** **)** |const| +:ref:`float<class_float>` **get_aspect**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_aspect>` Returns the X:Y aspect ratio of this **Projection**'s viewport. @@ -501,7 +501,7 @@ Returns the X:Y aspect ratio of this **Projection**'s viewport. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_far_plane_half_extents** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_far_plane_half_extents**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_far_plane_half_extents>` Returns the dimensions of the far clipping plane of the projection, divided by two. @@ -513,7 +513,7 @@ Returns the dimensions of the far clipping plane of the projection, divided by t .. rst-class:: classref-method -:ref:`float<class_float>` **get_fov** **(** **)** |const| +:ref:`float<class_float>` **get_fov**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_fov>` Returns the horizontal field of view of the projection (in degrees). @@ -525,7 +525,7 @@ Returns the horizontal field of view of the projection (in degrees). .. rst-class:: classref-method -:ref:`float<class_float>` **get_fovy** **(** :ref:`float<class_float>` fovx, :ref:`float<class_float>` aspect **)** |static| +:ref:`float<class_float>` **get_fovy**\ (\ fovx\: :ref:`float<class_float>`, aspect\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Projection_method_get_fovy>` Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio. @@ -537,7 +537,7 @@ Returns the vertical field of view of the projection (in degrees) associated wit .. rst-class:: classref-method -:ref:`float<class_float>` **get_lod_multiplier** **(** **)** |const| +:ref:`float<class_float>` **get_lod_multiplier**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_lod_multiplier>` Returns the factor by which the visible level of detail is scaled by this **Projection**. @@ -549,7 +549,7 @@ Returns the factor by which the visible level of detail is scaled by this **Proj .. rst-class:: classref-method -:ref:`int<class_int>` **get_pixels_per_meter** **(** :ref:`int<class_int>` for_pixel_width **)** |const| +:ref:`int<class_int>` **get_pixels_per_meter**\ (\ for_pixel_width\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Projection_method_get_pixels_per_meter>` Returns the number of pixels with the given pixel width displayed per meter, after this **Projection** is applied. @@ -561,7 +561,7 @@ Returns the number of pixels with the given pixel width displayed per meter, aft .. rst-class:: classref-method -:ref:`Plane<class_Plane>` **get_projection_plane** **(** :ref:`int<class_int>` plane **)** |const| +:ref:`Plane<class_Plane>` **get_projection_plane**\ (\ plane\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Projection_method_get_projection_plane>` Returns the clipping plane of this **Projection** whose index is given by ``plane``. @@ -575,7 +575,7 @@ Returns the clipping plane of this **Projection** whose index is given by ``plan .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_viewport_half_extents** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_viewport_half_extents**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_viewport_half_extents>` Returns the dimensions of the viewport plane that this **Projection** projects positions onto, divided by two. @@ -587,7 +587,7 @@ Returns the dimensions of the viewport plane that this **Projection** projects p .. rst-class:: classref-method -:ref:`float<class_float>` **get_z_far** **(** **)** |const| +:ref:`float<class_float>` **get_z_far**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_z_far>` Returns the distance for this **Projection** beyond which positions are clipped. @@ -599,7 +599,7 @@ Returns the distance for this **Projection** beyond which positions are clipped. .. rst-class:: classref-method -:ref:`float<class_float>` **get_z_near** **(** **)** |const| +:ref:`float<class_float>` **get_z_near**\ (\ ) |const| :ref:`🔗<class_Projection_method_get_z_near>` Returns the distance for this **Projection** before which positions are clipped. @@ -611,7 +611,7 @@ Returns the distance for this **Projection** before which positions are clipped. .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **inverse** **(** **)** |const| +:ref:`Projection<class_Projection>` **inverse**\ (\ ) |const| :ref:`🔗<class_Projection_method_inverse>` Returns a **Projection** that performs the inverse of this **Projection**'s projective transformation. @@ -623,7 +623,7 @@ Returns a **Projection** that performs the inverse of this **Projection**'s proj .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_orthogonal** **(** **)** |const| +:ref:`bool<class_bool>` **is_orthogonal**\ (\ ) |const| :ref:`🔗<class_Projection_method_is_orthogonal>` Returns ``true`` if this **Projection** performs an orthogonal projection. @@ -635,7 +635,7 @@ Returns ``true`` if this **Projection** performs an orthogonal projection. .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **jitter_offseted** **(** :ref:`Vector2<class_Vector2>` offset **)** |const| +:ref:`Projection<class_Projection>` **jitter_offseted**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Projection_method_jitter_offseted>` Returns a **Projection** with the X and Y values from the given :ref:`Vector2<class_Vector2>` added to the first and second values of the final column respectively. @@ -647,7 +647,7 @@ Returns a **Projection** with the X and Y values from the given :ref:`Vector2<cl .. rst-class:: classref-method -:ref:`Projection<class_Projection>` **perspective_znear_adjusted** **(** :ref:`float<class_float>` new_znear **)** |const| +:ref:`Projection<class_Projection>` **perspective_znear_adjusted**\ (\ new_znear\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Projection_method_perspective_znear_adjusted>` Returns a **Projection** with the near clipping distance adjusted to be ``new_znear``. @@ -666,7 +666,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Projection<class_Projection>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Projection<class_Projection>`\ ) :ref:`🔗<class_Projection_operator_neq_Projection>` Returns ``true`` if the projections are not equal. @@ -680,7 +680,7 @@ Returns ``true`` if the projections are not equal. .. rst-class:: classref-operator -:ref:`Projection<class_Projection>` **operator *** **(** :ref:`Projection<class_Projection>` right **)** +:ref:`Projection<class_Projection>` **operator ***\ (\ right\: :ref:`Projection<class_Projection>`\ ) :ref:`🔗<class_Projection_operator_mul_Projection>` Returns a **Projection** that applies the combined transformations of this **Projection** and ``right``. @@ -692,7 +692,7 @@ Returns a **Projection** that applies the combined transformations of this **Pro .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Projection_operator_mul_Vector4>` Projects (multiplies) the given :ref:`Vector4<class_Vector4>` by this **Projection** matrix. @@ -704,7 +704,7 @@ Projects (multiplies) the given :ref:`Vector4<class_Vector4>` by this **Projecti .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Projection<class_Projection>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Projection<class_Projection>`\ ) :ref:`🔗<class_Projection_operator_eq_Projection>` Returns ``true`` if the projections are equal. @@ -718,7 +718,7 @@ Returns ``true`` if the projections are equal. .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`Vector4<class_Vector4>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Projection_operator_idx_int>` Returns the column of the **Projection** with the given index. @@ -731,3 +731,4 @@ Indices are in the following order: x, y, z, w. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index f5ade681efa..0fbdc6a155a 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -32,11 +32,11 @@ When naming a Project Settings property, use the full path to the setting includ Tutorials --------- -- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/675>`__ +- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/2747>`__ -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -46,6 +46,10 @@ Properties .. table:: :widths: auto + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`animation/warnings/check_angle_interpolation_type_conflicting<class_ProjectSettings_property_animation/warnings/check_angle_interpolation_type_conflicting>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`animation/warnings/check_invalid_track_paths<class_ProjectSettings_property_animation/warnings/check_invalid_track_paths>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Color<class_Color>` | :ref:`application/boot_splash/bg_color<class_ProjectSettings_property_application/boot_splash/bg_color>` | ``Color(0.14, 0.14, 0.14, 1)`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -81,6 +85,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`application/config/use_hidden_project_data_directory<class_ProjectSettings_property_application/config/use_hidden_project_data_directory>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`application/config/version<class_ProjectSettings_property_application/config/version>` | ``""`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`application/config/windows_native_icon<class_ProjectSettings_property_application/config/windows_native_icon>` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`application/run/delta_smoothing<class_ProjectSettings_property_application/run/delta_smoothing>` | ``true`` | @@ -89,6 +95,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`application/run/disable_stdout<class_ProjectSettings_property_application/run/disable_stdout>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`application/run/enable_alt_space_menu<class_ProjectSettings_property_application/run/enable_alt_space_menu>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`application/run/flush_stdout_on_print<class_ProjectSettings_property_application/run/flush_stdout_on_print>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`application/run/flush_stdout_on_print.debug<class_ProjectSettings_property_application/run/flush_stdout_on_print.debug>` | ``true`` | @@ -105,6 +113,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`application/run/print_header<class_ProjectSettings_property_application/run/print_header>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`audio/buses/channel_disable_threshold_db<class_ProjectSettings_property_audio/buses/channel_disable_threshold_db>` | ``-60.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`audio/buses/channel_disable_time<class_ProjectSettings_property_audio/buses/channel_disable_time>` | ``2.0`` | @@ -127,10 +137,20 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`audio/general/3d_panning_strength<class_ProjectSettings_property_audio/general/3d_panning_strength>` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`audio/general/default_playback_type<class_ProjectSettings_property_audio/general/default_playback_type>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`audio/general/default_playback_type.web<class_ProjectSettings_property_audio/general/default_playback_type.web>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`audio/general/ios/mix_with_others<class_ProjectSettings_property_audio/general/ios/mix_with_others>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`audio/general/ios/session_category<class_ProjectSettings_property_audio/general/ios/session_category>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`audio/general/text_to_speech<class_ProjectSettings_property_audio/general/text_to_speech>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`audio/video/video_delay_compensation_ms<class_ProjectSettings_property_audio/video/video_delay_compensation_ms>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collada/use_ambient<class_ProjectSettings_property_collada/use_ambient>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`compression/formats/gzip/compression_level<class_ProjectSettings_property_compression/formats/gzip/compression_level>` | ``-1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`compression/formats/zlib/compression_level<class_ProjectSettings_property_compression/formats/zlib/compression_level>` | ``-1`` | @@ -141,6 +161,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`compression/formats/zstd/window_log_size<class_ProjectSettings_property_compression/formats/zstd/window_log_size>` | ``27`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`debug/canvas_items/debug_redraw_color<class_ProjectSettings_property_debug/canvas_items/debug_redraw_color>` | ``Color(1, 0.2, 0.2, 0.5)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`debug/canvas_items/debug_redraw_time<class_ProjectSettings_property_debug/canvas_items/debug_redraw_time>` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/file_logging/enable_file_logging<class_ProjectSettings_property_debug/file_logging/enable_file_logging>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/file_logging/enable_file_logging.pc<class_ProjectSettings_property_debug/file_logging/enable_file_logging.pc>` | ``true`` | @@ -153,8 +177,14 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/assert_always_true<class_ProjectSettings_property_debug/gdscript/warnings/assert_always_true>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/confusable_capture_reassignment<class_ProjectSettings_property_debug/gdscript/warnings/confusable_capture_reassignment>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/confusable_identifier<class_ProjectSettings_property_debug/gdscript/warnings/confusable_identifier>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/confusable_local_declaration<class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_declaration>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/confusable_local_usage<class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_usage>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/constant_used_as_function<class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/deprecated_keyword<class_ProjectSettings_property_debug/gdscript/warnings/deprecated_keyword>` | ``1`` | @@ -163,6 +193,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/gdscript/warnings/enable<class_ProjectSettings_property_debug/gdscript/warnings/enable>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/enum_variable_without_default<class_ProjectSettings_property_debug/gdscript/warnings/enum_variable_without_default>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/gdscript/warnings/exclude_addons<class_ProjectSettings_property_debug/gdscript/warnings/exclude_addons>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/function_used_as_property<class_ProjectSettings_property_debug/gdscript/warnings/function_used_as_property>` | ``1`` | @@ -173,6 +205,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/inference_on_variant<class_ProjectSettings_property_debug/gdscript/warnings/inference_on_variant>` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/inferred_declaration<class_ProjectSettings_property_debug/gdscript/warnings/inferred_declaration>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/int_as_enum_without_cast<class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_cast>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/int_as_enum_without_match<class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_match>` | ``1`` | @@ -225,6 +259,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/unsafe_void_return<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_void_return>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/untyped_declaration<class_ProjectSettings_property_debug/gdscript/warnings/untyped_declaration>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/unused_local_constant<class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`debug/gdscript/warnings/unused_parameter<class_ProjectSettings_property_debug/gdscript/warnings/unused_parameter>` | ``1`` | @@ -257,6 +293,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/shader_language/warnings/formatting_error<class_ProjectSettings_property_debug/shader_language/warnings/formatting_error>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`debug/shader_language/warnings/magic_position_write<class_ProjectSettings_property_debug/shader_language/warnings/magic_position_write>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/shader_language/warnings/treat_warnings_as_errors<class_ProjectSettings_property_debug/shader_language/warnings/treat_warnings_as_errors>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`debug/shader_language/warnings/unused_constant<class_ProjectSettings_property_debug/shader_language/warnings/unused_constant>` | ``true`` | @@ -337,6 +375,18 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`debug/shapes/paths/geometry_width<class_ProjectSettings_property_debug/shapes/paths/geometry_width>` | ``2.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver.android<class_ProjectSettings_property_display/display_server/driver.android>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver.ios<class_ProjectSettings_property_display/display_server/driver.ios>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver.linuxbsd<class_ProjectSettings_property_display/display_server/driver.linuxbsd>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver.macos<class_ProjectSettings_property_display/display_server/driver.macos>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/display_server/driver.windows<class_ProjectSettings_property_display/display_server/driver.windows>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`display/mouse_cursor/custom_image<class_ProjectSettings_property_display/mouse_cursor/custom_image>` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Vector2<class_Vector2>` | :ref:`display/mouse_cursor/custom_image_hotspot<class_ProjectSettings_property_display/mouse_cursor/custom_image_hotspot>` | ``Vector2(0, 0)`` | @@ -347,7 +397,7 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`display/window/energy_saving/keep_screen_on<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`display/window/energy_saving/keep_screen_on.editor<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor>` | ``false`` | + | :ref:`bool<class_bool>` | :ref:`display/window/energy_saving/keep_screen_on.editor_hint<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor_hint>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`display/window/handheld/orientation<class_ProjectSettings_property_display/window/handheld/orientation>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -395,6 +445,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`display/window/stretch/scale<class_ProjectSettings_property_display/window/stretch/scale>` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`display/window/stretch/scale_mode<class_ProjectSettings_property_display/window/stretch/scale_mode>` | ``"fractional"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`display/window/subwindows/embed_subwindows<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` | ``1`` | @@ -407,6 +459,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`editor/export/convert_text_resources_to_binary<class_ProjectSettings_property_editor/export/convert_text_resources_to_binary>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editor/import/atlas_max_width<class_ProjectSettings_property_editor/import/atlas_max_width>` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`editor/import/reimport_missing_imported_files<class_ProjectSettings_property_editor/import/reimport_missing_imported_files>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`editor/import/use_multiple_threads<class_ProjectSettings_property_editor/import/use_multiple_threads>` | ``true`` | @@ -433,6 +487,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`editor/naming/scene_name_casing<class_ProjectSettings_property_editor/naming/scene_name_casing>` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`editor/naming/script_name_casing<class_ProjectSettings_property_editor/naming/script_name_casing>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`editor/run/main_run_args<class_ProjectSettings_property_editor/run/main_run_args>` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`editor/script/search_in_file_extensions<class_ProjectSettings_property_editor/script/search_in_file_extensions>` | ``PackedStringArray("gd", "gdshader")`` | @@ -449,11 +505,11 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`filesystem/import/blender/enabled.web<class_ProjectSettings_property_filesystem/import/blender/enabled.web>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx/enabled<class_ProjectSettings_property_filesystem/import/fbx/enabled>` | ``true`` | + | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx2gltf/enabled<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx/enabled.android<class_ProjectSettings_property_filesystem/import/fbx/enabled.android>` | ``false`` | + | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx2gltf/enabled.android<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.android>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx/enabled.web<class_ProjectSettings_property_filesystem/import/fbx/enabled.web>` | ``false`` | + | :ref:`bool<class_bool>` | :ref:`filesystem/import/fbx2gltf/enabled.web<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.web>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`gui/common/default_scroll_deadzone<class_ProjectSettings_property_gui/common/default_scroll_deadzone>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -491,6 +547,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`gui/timers/tooltip_delay_sec<class_ProjectSettings_property_gui/timers/tooltip_delay_sec>` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`gui/timers/tooltip_delay_sec.editor_hint<class_ProjectSettings_property_gui/timers/tooltip_delay_sec.editor_hint>` | ``0.5`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_accept<class_ProjectSettings_property_input/ui_accept>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_cancel<class_ProjectSettings_property_input/ui_cancel>` | | @@ -635,6 +693,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_text_select_word_under_caret.macos<class_ProjectSettings_property_input/ui_text_select_word_under_caret.macos>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_text_skip_selection_for_next_occurrence<class_ProjectSettings_property_input/ui_text_skip_selection_for_next_occurrence>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_text_submit<class_ProjectSettings_property_input/ui_text_submit>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Dictionary<class_Dictionary>` | :ref:`input/ui_text_toggle_insert_mode<class_ProjectSettings_property_input/ui_text_toggle_insert_mode>` | | @@ -651,6 +711,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`input_devices/pen_tablet/driver.windows<class_ProjectSettings_property_input_devices/pen_tablet/driver.windows>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`input_devices/pointing/android/enable_long_press_as_right_click<class_ProjectSettings_property_input_devices/pointing/android/enable_long_press_as_right_click>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`input_devices/pointing/android/enable_pan_and_scale_gestures<class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`input_devices/pointing/android/rotary_input_scroll_axis<class_ProjectSettings_property_input_devices/pointing/android/rotary_input_scroll_axis>` | ``1`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`input_devices/pointing/emulate_mouse_from_touch<class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` | ``false`` | @@ -681,6 +747,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`internationalization/rendering/force_right_to_left_layout_direction<class_ProjectSettings_property_internationalization/rendering/force_right_to_left_layout_direction>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`internationalization/rendering/root_node_auto_translate<class_ProjectSettings_property_internationalization/rendering/root_node_auto_translate>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`internationalization/rendering/root_node_layout_direction<class_ProjectSettings_property_internationalization/rendering/root_node_layout_direction>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`internationalization/rendering/text_driver<class_ProjectSettings_property_internationalization/rendering/text_driver>` | ``""`` | @@ -1087,13 +1155,11 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`memory/limits/message_queue/max_size_mb<class_ProjectSettings_property_memory/limits/message_queue/max_size_mb>` | ``32`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`memory/limits/multithreaded_server/rid_pool_prealloc<class_ProjectSettings_property_memory/limits/multithreaded_server/rid_pool_prealloc>` | ``60`` | + | :ref:`float<class_float>` | :ref:`navigation/2d/default_cell_size<class_ProjectSettings_property_navigation/2d/default_cell_size>` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`navigation/2d/default_cell_size<class_ProjectSettings_property_navigation/2d/default_cell_size>` | ``1`` | + | :ref:`float<class_float>` | :ref:`navigation/2d/default_edge_connection_margin<class_ProjectSettings_property_navigation/2d/default_edge_connection_margin>` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`navigation/2d/default_edge_connection_margin<class_ProjectSettings_property_navigation/2d/default_edge_connection_margin>` | ``1`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`navigation/2d/default_link_connection_radius<class_ProjectSettings_property_navigation/2d/default_link_connection_radius>` | ``4`` | + | :ref:`float<class_float>` | :ref:`navigation/2d/default_link_connection_radius<class_ProjectSettings_property_navigation/2d/default_link_connection_radius>` | ``4.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`navigation/2d/use_edge_connections<class_ProjectSettings_property_navigation/2d/use_edge_connections>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1105,12 +1171,22 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`navigation/3d/default_link_connection_radius<class_ProjectSettings_property_navigation/3d/default_link_connection_radius>` | ``1.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`navigation/3d/default_up<class_ProjectSettings_property_navigation/3d/default_up>` | ``Vector3(0, 1, 0)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`navigation/3d/merge_rasterizer_cell_scale<class_ProjectSettings_property_navigation/3d/merge_rasterizer_cell_scale>` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`navigation/3d/use_edge_connections<class_ProjectSettings_property_navigation/3d/use_edge_connections>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`navigation/avoidance/thread_model/avoidance_use_high_priority_threads<class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_high_priority_threads>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`navigation/avoidance/thread_model/avoidance_use_multiple_threads<class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_multiple_threads>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`navigation/baking/thread_model/baking_use_high_priority_threads<class_ProjectSettings_property_navigation/baking/thread_model/baking_use_high_priority_threads>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`navigation/baking/thread_model/baking_use_multiple_threads<class_ProjectSettings_property_navigation/baking/thread_model/baking_use_multiple_threads>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`navigation/baking/use_crash_prevention_checks<class_ProjectSettings_property_navigation/baking/use_crash_prevention_checks>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`network/limits/debugger/max_chars_per_second<class_ProjectSettings_property_network/limits/debugger/max_chars_per_second>` | ``32768`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`network/limits/debugger/max_errors_per_second<class_ProjectSettings_property_network/limits/debugger/max_errors_per_second>` | ``400`` | @@ -1189,6 +1265,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`physics/common/max_physics_steps_per_frame<class_ProjectSettings_property_physics/common/max_physics_steps_per_frame>` | ``8`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`physics/common/physics_jitter_fix<class_ProjectSettings_property_physics/common/physics_jitter_fix>` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` | ``60`` | @@ -1277,19 +1355,27 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/environment/volumetric_fog/volume_size<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_size>` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>` | ``"opengl3"`` | + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.android<class_ProjectSettings_property_rendering/gl_compatibility/driver.android>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.ios<class_ProjectSettings_property_rendering/gl_compatibility/driver.ios>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.linuxbsd<class_ProjectSettings_property_rendering/gl_compatibility/driver.linuxbsd>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.android<class_ProjectSettings_property_rendering/gl_compatibility/driver.android>` | ``"opengl3"`` | + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.macos<class_ProjectSettings_property_rendering/gl_compatibility/driver.macos>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.ios<class_ProjectSettings_property_rendering/gl_compatibility/driver.ios>` | ``"opengl3"`` | + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.web<class_ProjectSettings_property_rendering/gl_compatibility/driver.web>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.linuxbsd<class_ProjectSettings_property_rendering/gl_compatibility/driver.linuxbsd>` | ``"opengl3"`` | + | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.windows<class_ProjectSettings_property_rendering/gl_compatibility/driver.windows>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.macos<class_ProjectSettings_property_rendering/gl_compatibility/driver.macos>` | ``"opengl3"`` | + | :ref:`bool<class_bool>` | :ref:`rendering/gl_compatibility/fallback_to_angle<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_angle>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.web<class_ProjectSettings_property_rendering/gl_compatibility/driver.web>` | ``"opengl3"`` | + | :ref:`bool<class_bool>` | :ref:`rendering/gl_compatibility/fallback_to_gles<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_gles>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/gl_compatibility/driver.windows<class_ProjectSettings_property_rendering/gl_compatibility/driver.windows>` | ``"opengl3"`` | + | :ref:`bool<class_bool>` | :ref:`rendering/gl_compatibility/fallback_to_native<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_native>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`rendering/gl_compatibility/force_angle_on_devices<class_ProjectSettings_property_rendering/gl_compatibility/force_angle_on_devices>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/gl_compatibility/item_buffer_size<class_ProjectSettings_property_rendering/gl_compatibility/item_buffer_size>` | ``16384`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1313,19 +1399,21 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/high_quality_probe_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_probe_ray_count>` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_ray_count>` | ``256`` | + | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_ray_count>` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/low_quality_probe_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_probe_ray_count>` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_ray_count>` | ``16`` | + | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_ray_count>` | ``32`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/medium_quality_probe_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_probe_ray_count>` | ``256`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_ray_count>` | ``64`` | + | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_ray_count>` | ``128`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count>` | ``2048`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_ray_count>` | ``1024`` | + | :ref:`int<class_int>` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count<class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_ray_count>` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/lightmapping/denoising/denoiser<class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`rendering/lightmapping/primitive_meshes/texel_size<class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size>` | ``0.2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1359,12 +1447,12 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`rendering/lights_and_shadows/tighter_shadow_caster_culling<class_ProjectSettings_property_rendering/lights_and_shadows/tighter_shadow_caster_culling>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`rendering/limits/cluster_builder/max_clustered_elements<class_ProjectSettings_property_rendering/limits/cluster_builder/max_clustered_elements>` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rendering/limits/forward_renderer/threaded_render_minimum_instances<class_ProjectSettings_property_rendering/limits/forward_renderer/threaded_render_minimum_instances>` | ``500`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/limits/global_shader_variables/buffer_size<class_ProjectSettings_property_rendering/limits/global_shader_variables/buffer_size>` | ``65536`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/limits/opengl/max_lights_per_object<class_ProjectSettings_property_rendering/limits/opengl/max_lights_per_object>` | ``8`` | @@ -1383,6 +1471,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/occlusion_culling/bvh_build_quality<class_ProjectSettings_property_rendering/occlusion_culling/bvh_build_quality>` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`rendering/occlusion_culling/jitter_projection<class_ProjectSettings_property_rendering/occlusion_culling/jitter_projection>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/occlusion_culling/occlusion_rays_per_thread<class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread>` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`rendering/occlusion_culling/use_occlusion_culling<class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling>` | ``false`` | @@ -1411,17 +1501,27 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`rendering/renderer/rendering_method.web<class_ProjectSettings_property_rendering/renderer/rendering_method.web>` | ``"gl_compatibility"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>` | ``"vulkan"`` | + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/d3d12/agility_sdk_version<class_ProjectSettings_property_rendering/rendering_device/d3d12/agility_sdk_version>` | ``613`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/d3d12/max_misc_descriptors_per_frame<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_misc_descriptors_per_frame>` | ``512`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/d3d12/max_resource_descriptors_per_frame<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_resource_descriptors_per_frame>` | ``16384`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame>` | ``1024`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.android<class_ProjectSettings_property_rendering/rendering_device/driver.android>` | ``"vulkan"`` | + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.ios<class_ProjectSettings_property_rendering/rendering_device/driver.ios>` | ``"vulkan"`` | + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.android<class_ProjectSettings_property_rendering/rendering_device/driver.android>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.linuxbsd<class_ProjectSettings_property_rendering/rendering_device/driver.linuxbsd>` | ``"vulkan"`` | + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.ios<class_ProjectSettings_property_rendering/rendering_device/driver.ios>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.macos<class_ProjectSettings_property_rendering/rendering_device/driver.macos>` | ``"vulkan"`` | + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.linuxbsd<class_ProjectSettings_property_rendering/rendering_device/driver.linuxbsd>` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.windows<class_ProjectSettings_property_rendering/rendering_device/driver.windows>` | ``"vulkan"`` | + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.macos<class_ProjectSettings_property_rendering/rendering_device/driver.macos>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rendering/rendering_device/driver.windows<class_ProjectSettings_property_rendering/rendering_device/driver.windows>` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`rendering/rendering_device/pipeline_cache/enable<class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/enable>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`rendering/rendering_device/pipeline_cache/save_chunk_size_mb<class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/save_chunk_size_mb>` | ``3.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1431,6 +1531,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/rendering_device/staging_buffer/texture_upload_region_size_px<class_ProjectSettings_property_rendering/rendering_device/staging_buffer/texture_upload_region_size_px>` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/vsync/frame_queue_size<class_ProjectSettings_property_rendering/rendering_device/vsync/frame_queue_size>` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rendering/rendering_device/vsync/swapchain_image_count<class_ProjectSettings_property_rendering/rendering_device/vsync/swapchain_image_count>` | ``3`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/rendering_device/vulkan/max_descriptors_per_pool<class_ProjectSettings_property_rendering/rendering_device/vulkan/max_descriptors_per_pool>` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`rendering/scaling_3d/fsr_sharpness<class_ProjectSettings_property_rendering/scaling_3d/fsr_sharpness>` | ``0.2`` | @@ -1481,6 +1585,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`rendering/textures/webp_compression/lossless_compression_factor<class_ProjectSettings_property_rendering/textures/webp_compression/lossless_compression_factor>` | ``25`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`rendering/viewport/hdr_2d<class_ProjectSettings_property_rendering/viewport/hdr_2d>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`rendering/viewport/transparent_background<class_ProjectSettings_property_rendering/viewport/transparent_background>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`rendering/vrs/mode<class_ProjectSettings_property_rendering/vrs/mode>` | ``0`` | @@ -1491,14 +1597,24 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`threading/worker_pool/max_threads<class_ProjectSettings_property_threading/worker_pool/max_threads>` | ``-1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`threading/worker_pool/use_system_threads_for_low_priority_tasks<class_ProjectSettings_property_threading/worker_pool/use_system_threads_for_low_priority_tasks>` | ``true`` | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`xr/openxr/default_action_map<class_ProjectSettings_property_xr/openxr/default_action_map>` | ``"res://openxr_action_map.tres"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`xr/openxr/enabled<class_ProjectSettings_property_xr/openxr/enabled>` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`xr/openxr/environment_blend_mode<class_ProjectSettings_property_xr/openxr/environment_blend_mode>` | ``"0"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`xr/openxr/extensions/eye_gaze_interaction<class_ProjectSettings_property_xr/openxr/extensions/eye_gaze_interaction>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`xr/openxr/extensions/hand_interaction_profile<class_ProjectSettings_property_xr/openxr/extensions/hand_interaction_profile>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`xr/openxr/extensions/hand_tracking<class_ProjectSettings_property_xr/openxr/extensions/hand_tracking>` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`xr/openxr/form_factor<class_ProjectSettings_property_xr/openxr/form_factor>` | ``"0"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`xr/openxr/foveation_dynamic<class_ProjectSettings_property_xr/openxr/foveation_dynamic>` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`xr/openxr/foveation_level<class_ProjectSettings_property_xr/openxr/foveation_level>` | ``"0"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int<class_int>` | :ref:`xr/openxr/reference_space<class_ProjectSettings_property_xr/openxr/reference_space>` | ``"1"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`xr/openxr/startup_alert<class_ProjectSettings_property_xr/openxr/startup_alert>` | ``true`` | @@ -1518,43 +1634,60 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_info<class_ProjectSettings_method_add_property_info>` **(** :ref:`Dictionary<class_Dictionary>` hint **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_ProjectSettings_method_clear>` **(** :ref:`String<class_String>` name **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_global_class_list<class_ProjectSettings_method_get_global_class_list>` **(** **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_order<class_ProjectSettings_method_get_order>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_setting<class_ProjectSettings_method_get_setting>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value=null **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_setting_with_override<class_ProjectSettings_method_get_setting_with_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`globalize_path<class_ProjectSettings_method_globalize_path>` **(** :ref:`String<class_String>` path **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_setting<class_ProjectSettings_method_has_setting>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`load_resource_pack<class_ProjectSettings_method_load_resource_pack>` **(** :ref:`String<class_String>` pack, :ref:`bool<class_bool>` replace_files=true, :ref:`int<class_int>` offset=0 **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`localize_path<class_ProjectSettings_method_localize_path>` **(** :ref:`String<class_String>` path **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_ProjectSettings_method_save>` **(** **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_custom<class_ProjectSettings_method_save_custom>` **(** :ref:`String<class_String>` file **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_as_basic<class_ProjectSettings_method_set_as_basic>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` basic **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_as_internal<class_ProjectSettings_method_set_as_internal>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` internal **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_initial_value<class_ProjectSettings_method_set_initial_value>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_order<class_ProjectSettings_method_set_order>` **(** :ref:`String<class_String>` name, :ref:`int<class_int>` position **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_restart_if_changed<class_ProjectSettings_method_set_restart_if_changed>` **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` restart **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_setting<class_ProjectSettings_method_set_setting>` **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property_info<class_ProjectSettings_method_add_property_info>`\ (\ hint\: :ref:`Dictionary<class_Dictionary>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_ProjectSettings_method_clear>`\ (\ name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_global_class_list<class_ProjectSettings_method_get_global_class_list>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_order<class_ProjectSettings_method_get_order>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_setting<class_ProjectSettings_method_get_setting>`\ (\ name\: :ref:`String<class_String>`, default_value\: :ref:`Variant<class_Variant>` = null\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_setting_with_override<class_ProjectSettings_method_get_setting_with_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`globalize_path<class_ProjectSettings_method_globalize_path>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_setting<class_ProjectSettings_method_has_setting>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`load_resource_pack<class_ProjectSettings_method_load_resource_pack>`\ (\ pack\: :ref:`String<class_String>`, replace_files\: :ref:`bool<class_bool>` = true, offset\: :ref:`int<class_int>` = 0\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`localize_path<class_ProjectSettings_method_localize_path>`\ (\ path\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_ProjectSettings_method_save>`\ (\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_custom<class_ProjectSettings_method_save_custom>`\ (\ file\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_as_basic<class_ProjectSettings_method_set_as_basic>`\ (\ name\: :ref:`String<class_String>`, basic\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_as_internal<class_ProjectSettings_method_set_as_internal>`\ (\ name\: :ref:`String<class_String>`, internal\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_initial_value<class_ProjectSettings_method_set_initial_value>`\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_order<class_ProjectSettings_method_set_order>`\ (\ name\: :ref:`String<class_String>`, position\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_restart_if_changed<class_ProjectSettings_method_set_restart_if_changed>`\ (\ name\: :ref:`String<class_String>`, restart\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting<class_ProjectSettings_method_set_setting>`\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_ProjectSettings_signal_settings_changed: + +.. rst-class:: classref-signal + +**settings_changed**\ (\ ) :ref:`🔗<class_ProjectSettings_signal_settings_changed>` + +Emitted when any setting is changed, up to once per process frame. .. rst-class:: classref-section-separator @@ -1565,11 +1698,35 @@ Methods Property Descriptions --------------------- +.. _class_ProjectSettings_property_animation/warnings/check_angle_interpolation_type_conflicting: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **animation/warnings/check_angle_interpolation_type_conflicting** = ``true`` :ref:`🔗<class_ProjectSettings_property_animation/warnings/check_angle_interpolation_type_conflicting>` + +If ``true``, :ref:`AnimationMixer<class_AnimationMixer>` prints the warning of interpolation being forced to choose the shortest rotation path due to multiple angle interpolation types being mixed in the :ref:`AnimationMixer<class_AnimationMixer>` cache. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_animation/warnings/check_invalid_track_paths: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **animation/warnings/check_invalid_track_paths** = ``true`` :ref:`🔗<class_ProjectSettings_property_animation/warnings/check_invalid_track_paths>` + +If ``true``, :ref:`AnimationMixer<class_AnimationMixer>` prints the warning of no matching object of the track path in the scene. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/boot_splash/bg_color: .. rst-class:: classref-property -:ref:`Color<class_Color>` **application/boot_splash/bg_color** = ``Color(0.14, 0.14, 0.14, 1)`` +:ref:`Color<class_Color>` **application/boot_splash/bg_color** = ``Color(0.14, 0.14, 0.14, 1)`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/bg_color>` Background color for the boot splash. @@ -1581,7 +1738,7 @@ Background color for the boot splash. .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/boot_splash/fullsize** = ``true`` +:ref:`bool<class_bool>` **application/boot_splash/fullsize** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/fullsize>` If ``true``, scale the boot splash image to the full window size (preserving the aspect ratio) when the engine starts. If ``false``, the engine will leave it at the default pixel size. @@ -1593,12 +1750,16 @@ If ``true``, scale the boot splash image to the full window size (preserving the .. rst-class:: classref-property -:ref:`String<class_String>` **application/boot_splash/image** = ``""`` +:ref:`String<class_String>` **application/boot_splash/image** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/image>` Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead. \ **Note:** Only effective if :ref:`application/boot_splash/show_image<class_ProjectSettings_property_application/boot_splash/show_image>` is ``true``. +\ **Note:** The only supported format is PNG. Using another image format will result in an error. + +\ **Note:** The image will also show when opening the project in the editor. If you want to display the default splash image in the editor, add an empty override for ``editor_hint`` feature. + .. rst-class:: classref-item-separator ---- @@ -1607,7 +1768,7 @@ Path to an image used as the boot splash. If left empty, the default Godot Engin .. rst-class:: classref-property -:ref:`int<class_int>` **application/boot_splash/minimum_display_time** = ``0`` +:ref:`int<class_int>` **application/boot_splash/minimum_display_time** = ``0`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/minimum_display_time>` Minimum boot splash display time (in milliseconds). It is not recommended to set too high values for this setting. @@ -1619,7 +1780,7 @@ Minimum boot splash display time (in milliseconds). It is not recommended to set .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/boot_splash/show_image** = ``true`` +:ref:`bool<class_bool>` **application/boot_splash/show_image** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/show_image>` If ``true``, displays the image specified in :ref:`application/boot_splash/image<class_ProjectSettings_property_application/boot_splash/image>` when the engine starts. If ``false``, only displays the plain color specified in :ref:`application/boot_splash/bg_color<class_ProjectSettings_property_application/boot_splash/bg_color>`. @@ -1631,7 +1792,7 @@ If ``true``, displays the image specified in :ref:`application/boot_splash/image .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/boot_splash/use_filter** = ``true`` +:ref:`bool<class_bool>` **application/boot_splash/use_filter** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/boot_splash/use_filter>` If ``true``, applies linear filtering when scaling the image (recommended for high-resolution artwork). If ``false``, uses nearest-neighbor interpolation (recommended for pixel art). @@ -1643,7 +1804,7 @@ If ``true``, applies linear filtering when scaling the image (recommended for hi .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/config/auto_accept_quit** = ``true`` +:ref:`bool<class_bool>` **application/config/auto_accept_quit** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/config/auto_accept_quit>` If ``true``, the application automatically accepts quitting requests. @@ -1655,12 +1816,14 @@ If ``true``, the application automatically accepts quitting requests. .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/custom_user_dir_name** = ``""`` +:ref:`String<class_String>` **application/config/custom_user_dir_name** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/custom_user_dir_name>` This user directory is used for storing persistent data (``user://`` filesystem). If a custom directory name is defined, this name will be appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in :ref:`OS.get_user_data_dir<class_OS_method_get_user_data_dir>`). The :ref:`application/config/use_custom_user_dir<class_ProjectSettings_property_application/config/use_custom_user_dir>` setting must be enabled for this to take effect. +\ **Note:** If :ref:`application/config/custom_user_dir_name<class_ProjectSettings_property_application/config/custom_user_dir_name>` contains trailing periods, they will be stripped as folder names ending with a period are not allowed on Windows. + .. rst-class:: classref-item-separator ---- @@ -1669,7 +1832,7 @@ The :ref:`application/config/use_custom_user_dir<class_ProjectSettings_property_ .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/description** = ``""`` +:ref:`String<class_String>` **application/config/description** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/description>` The project's description, displayed as a tooltip in the Project Manager when hovering the project. @@ -1681,7 +1844,7 @@ The project's description, displayed as a tooltip in the Project Manager when ho .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/icon** = ``""`` +:ref:`String<class_String>` **application/config/icon** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/icon>` Icon used for the project, set when project loads. Exporters will also use this icon as a fallback if necessary. @@ -1693,7 +1856,7 @@ Icon used for the project, set when project loads. Exporters will also use this .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/macos_native_icon** = ``""`` +:ref:`String<class_String>` **application/config/macos_native_icon** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/macos_native_icon>` Icon set in ``.icns`` format used on macOS to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon<class_DisplayServer_method_set_native_icon>`. @@ -1705,7 +1868,7 @@ Icon set in ``.icns`` format used on macOS to set the game's icon. This is done .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/name** = ``""`` +:ref:`String<class_String>` **application/config/name** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/name>` The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. The window title will be set to match the project name automatically on startup. @@ -1719,7 +1882,7 @@ The project's name. It is used both by the Project Manager and by exporters. The .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **application/config/name_localized** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **application/config/name_localized** = ``{}`` :ref:`🔗<class_ProjectSettings_property_application/config/name_localized>` Translations of the project's name. This setting is used by OS tools to translate application name on Android, iOS and macOS. @@ -1731,7 +1894,7 @@ Translations of the project's name. This setting is used by OS tools to translat .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/project_settings_override** = ``""`` +:ref:`String<class_String>` **application/config/project_settings_override** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/project_settings_override>` Specifies a file to override project settings. For example: ``user://custom_settings.cfg``. See "Overriding" in the **ProjectSettings** class description at the top for more information. @@ -1745,7 +1908,7 @@ Specifies a file to override project settings. For example: ``user://custom_sett .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/config/quit_on_go_back** = ``true`` +:ref:`bool<class_bool>` **application/config/quit_on_go_back** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/config/quit_on_go_back>` If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). @@ -1757,7 +1920,7 @@ If ``true``, the application quits automatically when navigating back (e.g. usin .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/config/use_custom_user_dir** = ``false`` +:ref:`bool<class_bool>` **application/config/use_custom_user_dir** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/config/use_custom_user_dir>` If ``true``, the project will save user data to its own user directory. If :ref:`application/config/custom_user_dir_name<class_ProjectSettings_property_application/config/custom_user_dir_name>` is empty, ``<OS user data directory>/<project name>`` directory will be used. If ``false``, the project will save user data to ``<OS user data directory>/Godot/app_userdata/<project name>``. @@ -1771,7 +1934,7 @@ See also `File paths in Godot projects <../tutorials/io/data_paths.html#accessin .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/config/use_hidden_project_data_directory** = ``true`` +:ref:`bool<class_bool>` **application/config/use_hidden_project_data_directory** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/config/use_hidden_project_data_directory>` If ``true``, the project will use a hidden directory (``.godot``) for storing project-specific data (metadata, shader cache, etc.). @@ -1785,11 +1948,23 @@ If ``false``, a non-hidden directory (``godot``) will be used instead. ---- +.. _class_ProjectSettings_property_application/config/version: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **application/config/version** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/version>` + +The project's human-readable version identifier. This is used by exporters if the version identifier isn't overridden there. If :ref:`application/config/version<class_ProjectSettings_property_application/config/version>` is an empty string and the version identifier isn't overridden in an exporter, the exporter will use ``1.0.0`` as a version identifier. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/config/windows_native_icon: .. rst-class:: classref-property -:ref:`String<class_String>` **application/config/windows_native_icon** = ``""`` +:ref:`String<class_String>` **application/config/windows_native_icon** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/config/windows_native_icon>` Icon set in ``.ico`` format used on Windows to set the game's icon. This is done automatically on start by calling :ref:`DisplayServer.set_native_icon<class_DisplayServer_method_set_native_icon>`. @@ -1801,7 +1976,7 @@ Icon set in ``.ico`` format used on Windows to set the game's icon. This is done .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/delta_smoothing** = ``true`` +:ref:`bool<class_bool>` **application/run/delta_smoothing** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/run/delta_smoothing>` Time samples for frame deltas are subject to random variation introduced by the platform, even when frames are displayed at regular intervals thanks to V-Sync. This can lead to jitter. Delta smoothing can often give a better result by filtering the input deltas to correct for minor fluctuations from the refresh rate. @@ -1817,7 +1992,7 @@ It may take several seconds at a stable frame rate before the smoothing is initi .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/disable_stderr** = ``false`` +:ref:`bool<class_bool>` **application/run/disable_stderr** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/run/disable_stderr>` If ``true``, disables printing to standard error. If ``true``, this also hides error and warning messages printed by :ref:`@GlobalScope.push_error<class_@GlobalScope_method_push_error>` and :ref:`@GlobalScope.push_warning<class_@GlobalScope_method_push_warning>`. See also :ref:`application/run/disable_stdout<class_ProjectSettings_property_application/run/disable_stdout>`. @@ -1831,7 +2006,7 @@ Changes to this setting will only be applied upon restarting the application. .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/disable_stdout** = ``false`` +:ref:`bool<class_bool>` **application/run/disable_stdout** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/run/disable_stdout>` If ``true``, disables printing to standard output. This is equivalent to starting the editor or project with the ``--quiet`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. See also :ref:`application/run/disable_stderr<class_ProjectSettings_property_application/run/disable_stderr>`. @@ -1841,11 +2016,27 @@ Changes to this setting will only be applied upon restarting the application. ---- +.. _class_ProjectSettings_property_application/run/enable_alt_space_menu: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **application/run/enable_alt_space_menu** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/run/enable_alt_space_menu>` + +If ``true``, allows the :kbd:`Alt + Space` keys to display the window menu. This menu allows the user to perform various window management operations such as moving, resizing, or minimizing the window. + +\ **Note:** When the menu is displayed, project execution will pause until the menu is *fully* closed due to Windows behavior. Consider this when enabling this setting in a networked multiplayer game. The menu is only considered fully closed when an option is selected, when the user clicks outside, or when :kbd:`Escape` is pressed after bringing up the window menu *and* another key is pressed afterwards. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/run/flush_stdout_on_print: .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/flush_stdout_on_print** = ``false`` +:ref:`bool<class_bool>` **application/run/flush_stdout_on_print** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/run/flush_stdout_on_print>` If ``true``, flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging. @@ -1863,7 +2054,7 @@ Changes to this setting will only be applied upon restarting the application. .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/flush_stdout_on_print.debug** = ``true`` +:ref:`bool<class_bool>` **application/run/flush_stdout_on_print.debug** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/run/flush_stdout_on_print.debug>` Debug build override for :ref:`application/run/flush_stdout_on_print<class_ProjectSettings_property_application/run/flush_stdout_on_print>`, as performance is less important during debugging. @@ -1877,9 +2068,11 @@ Changes to this setting will only be applied upon restarting the application. .. rst-class:: classref-property -:ref:`int<class_int>` **application/run/frame_delay_msec** = ``0`` +:ref:`int<class_int>` **application/run/frame_delay_msec** = ``0`` :ref:`🔗<class_ProjectSettings_property_application/run/frame_delay_msec>` + +Forces a *constant* delay between frames in the main loop (in milliseconds). In most situations, :ref:`application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>` should be preferred as an FPS limiter as it's more precise. -Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization. +This setting can be overridden using the ``--frame-delay <ms;>`` command line argument. .. rst-class:: classref-item-separator @@ -1889,9 +2082,9 @@ Forces a delay between frames in the main loop (in milliseconds). This may be us .. rst-class:: classref-property -:ref:`bool<class_bool>` **application/run/low_processor_mode** = ``false`` +:ref:`bool<class_bool>` **application/run/low_processor_mode** = ``false`` :ref:`🔗<class_ProjectSettings_property_application/run/low_processor_mode>` -If ``true``, enables low-processor usage mode. This setting only works on desktop platforms. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games. +If ``true``, enables low-processor usage mode. When enabled, the engine takes longer to redraw, but only redraws the screen if necessary. This may lower power consumption, and is intended for editors or mobile applications. For most games, because the screen needs to be redrawn every frame, it is recommended to keep this setting disabled. .. rst-class:: classref-item-separator @@ -1901,7 +2094,7 @@ If ``true``, enables low-processor usage mode. This setting only works on deskto .. rst-class:: classref-property -:ref:`int<class_int>` **application/run/low_processor_mode_sleep_usec** = ``6900`` +:ref:`int<class_int>` **application/run/low_processor_mode_sleep_usec** = ``6900`` :ref:`🔗<class_ProjectSettings_property_application/run/low_processor_mode_sleep_usec>` Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. @@ -1913,7 +2106,7 @@ Amount of sleeping between frames when the low-processor usage mode is enabled ( .. rst-class:: classref-property -:ref:`String<class_String>` **application/run/main_loop_type** = ``"SceneTree"`` +:ref:`String<class_String>` **application/run/main_loop_type** = ``"SceneTree"`` :ref:`🔗<class_ProjectSettings_property_application/run/main_loop_type>` The name of the type implementing the engine's main loop. @@ -1925,7 +2118,7 @@ The name of the type implementing the engine's main loop. .. rst-class:: classref-property -:ref:`String<class_String>` **application/run/main_scene** = ``""`` +:ref:`String<class_String>` **application/run/main_scene** = ``""`` :ref:`🔗<class_ProjectSettings_property_application/run/main_scene>` Path to the main scene file that will be loaded when the project runs. @@ -1937,7 +2130,7 @@ Path to the main scene file that will be loaded when the project runs. .. rst-class:: classref-property -:ref:`int<class_int>` **application/run/max_fps** = ``0`` +:ref:`int<class_int>` **application/run/max_fps** = ``0`` :ref:`🔗<class_ProjectSettings_property_application/run/max_fps>` Maximum number of frames per second allowed. A value of ``0`` means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. @@ -1945,23 +2138,37 @@ Limiting the FPS can be useful to reduce system power consumption, which reduces If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is set to ``Enabled`` or ``Adaptive``, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. -If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__. +If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing <https://blurbusters.com/howto-low-lag-vsync-on/>`__. If :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` is ``Disabled``, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. See also :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`. +This setting can be overridden using the ``--max-fps <fps>`` command line argument (including with a value of ``0`` for unlimited framerate). + \ **Note:** This property is only read when the project starts. To change the rendering FPS cap at runtime, set :ref:`Engine.max_fps<class_Engine_property_max_fps>` instead. .. rst-class:: classref-item-separator ---- +.. _class_ProjectSettings_property_application/run/print_header: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **application/run/print_header** = ``true`` :ref:`🔗<class_ProjectSettings_property_application/run/print_header>` + +If ``true``, the engine header is printed in the console on startup. This header describes the current version of the engine, as well as the renderer being used. This behavior can also be disabled on the command line with the ``--no-header`` option. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_audio/buses/channel_disable_threshold_db: .. rst-class:: classref-property -:ref:`float<class_float>` **audio/buses/channel_disable_threshold_db** = ``-60.0`` +:ref:`float<class_float>` **audio/buses/channel_disable_threshold_db** = ``-60.0`` :ref:`🔗<class_ProjectSettings_property_audio/buses/channel_disable_threshold_db>` Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. @@ -1973,7 +2180,7 @@ Audio buses will disable automatically when sound goes below a given dB threshol .. rst-class:: classref-property -:ref:`float<class_float>` **audio/buses/channel_disable_time** = ``2.0`` +:ref:`float<class_float>` **audio/buses/channel_disable_time** = ``2.0`` :ref:`🔗<class_ProjectSettings_property_audio/buses/channel_disable_time>` Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. @@ -1985,7 +2192,7 @@ Audio buses will disable automatically when sound goes below a given dB threshol .. rst-class:: classref-property -:ref:`String<class_String>` **audio/buses/default_bus_layout** = ``"res://default_bus_layout.tres"`` +:ref:`String<class_String>` **audio/buses/default_bus_layout** = ``"res://default_bus_layout.tres"`` :ref:`🔗<class_ProjectSettings_property_audio/buses/default_bus_layout>` Default :ref:`AudioBusLayout<class_AudioBusLayout>` resource file to use in the project, unless overridden by the scene. @@ -1997,7 +2204,7 @@ Default :ref:`AudioBusLayout<class_AudioBusLayout>` resource file to use in the .. rst-class:: classref-property -:ref:`String<class_String>` **audio/driver/driver** +:ref:`String<class_String>` **audio/driver/driver** :ref:`🔗<class_ProjectSettings_property_audio/driver/driver>` Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. @@ -2013,7 +2220,7 @@ The ``Dummy`` audio driver disables all audio playback and recording, which is u .. rst-class:: classref-property -:ref:`bool<class_bool>` **audio/driver/enable_input** = ``false`` +:ref:`bool<class_bool>` **audio/driver/enable_input** = ``false`` :ref:`🔗<class_ProjectSettings_property_audio/driver/enable_input>` If ``true``, microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. @@ -2027,7 +2234,7 @@ If ``true``, microphone input will be allowed. This requires appropriate permiss .. rst-class:: classref-property -:ref:`int<class_int>` **audio/driver/mix_rate** = ``44100`` +:ref:`int<class_int>` **audio/driver/mix_rate** = ``44100`` :ref:`🔗<class_ProjectSettings_property_audio/driver/mix_rate>` The mixing rate used for audio (in Hz). In general, it's better to not touch this and leave it to the host operating system. @@ -2039,7 +2246,7 @@ The mixing rate used for audio (in Hz). In general, it's better to not touch thi .. rst-class:: classref-property -:ref:`int<class_int>` **audio/driver/mix_rate.web** = ``0`` +:ref:`int<class_int>` **audio/driver/mix_rate.web** = ``0`` :ref:`🔗<class_ProjectSettings_property_audio/driver/mix_rate.web>` Safer override for :ref:`audio/driver/mix_rate<class_ProjectSettings_property_audio/driver/mix_rate>` in the Web platform. Here ``0`` means "let the browser choose" (since some browsers do not like forcing the mix rate). @@ -2051,13 +2258,15 @@ Safer override for :ref:`audio/driver/mix_rate<class_ProjectSettings_property_au .. rst-class:: classref-property -:ref:`int<class_int>` **audio/driver/output_latency** = ``15`` +:ref:`int<class_int>` **audio/driver/output_latency** = ``15`` :ref:`🔗<class_ProjectSettings_property_audio/driver/output_latency>` -Specifies the preferred output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. +Specifies the preferred output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible crackling on slower hardware. Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use :ref:`AudioServer.get_output_latency<class_AudioServer_method_get_output_latency>` to determine the actual audio output latency. -\ **Note:** This setting is ignored on all versions of Windows prior to Windows 10. +Audio output latency can be overridden using the ``--audio-output-latency <ms>`` command line argument. + +\ **Note:** This setting is ignored on Android, and on all versions of Windows prior to Windows 10. .. rst-class:: classref-item-separator @@ -2067,7 +2276,7 @@ Audio output latency may be constrained by the host operating system and audio h .. rst-class:: classref-property -:ref:`int<class_int>` **audio/driver/output_latency.web** = ``50`` +:ref:`int<class_int>` **audio/driver/output_latency.web** = ``50`` :ref:`🔗<class_ProjectSettings_property_audio/driver/output_latency.web>` Safer override for :ref:`audio/driver/output_latency<class_ProjectSettings_property_audio/driver/output_latency>` in the Web platform, to avoid audio issues especially on mobile devices. @@ -2079,7 +2288,7 @@ Safer override for :ref:`audio/driver/output_latency<class_ProjectSettings_prope .. rst-class:: classref-property -:ref:`float<class_float>` **audio/general/2d_panning_strength** = ``0.5`` +:ref:`float<class_float>` **audio/general/2d_panning_strength** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_audio/general/2d_panning_strength>` The base strength of the panning effect for all :ref:`AudioStreamPlayer2D<class_AudioStreamPlayer2D>` nodes. The panning strength can be further scaled on each Node using :ref:`AudioStreamPlayer2D.panning_strength<class_AudioStreamPlayer2D_property_panning_strength>`. A value of ``0.0`` disables stereo panning entirely, leaving only volume attenuation in place. A value of ``1.0`` completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener. @@ -2093,7 +2302,7 @@ The default value of ``0.5`` is tuned for headphones. When using speakers, you m .. rst-class:: classref-property -:ref:`float<class_float>` **audio/general/3d_panning_strength** = ``0.5`` +:ref:`float<class_float>` **audio/general/3d_panning_strength** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_audio/general/3d_panning_strength>` The base strength of the panning effect for all :ref:`AudioStreamPlayer3D<class_AudioStreamPlayer3D>` nodes. The panning strength can be further scaled on each Node using :ref:`AudioStreamPlayer3D.panning_strength<class_AudioStreamPlayer3D_property_panning_strength>`. A value of ``0.0`` disables stereo panning entirely, leaving only volume attenuation in place. A value of ``1.0`` completely mutes one of the channels if the sound is located exactly to the left (or right) of the listener. @@ -2103,11 +2312,71 @@ The default value of ``0.5`` is tuned for headphones. When using speakers, you m ---- +.. _class_ProjectSettings_property_audio/general/default_playback_type: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **audio/general/default_playback_type** = ``0`` :ref:`🔗<class_ProjectSettings_property_audio/general/default_playback_type>` + +**Experimental:** This property may be changed or removed in future versions. + +Specifies the default playback type of the platform. + +The default value is set to **Stream**, as most platforms have no issues mixing streams. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_audio/general/default_playback_type.web: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **audio/general/default_playback_type.web** = ``1`` :ref:`🔗<class_ProjectSettings_property_audio/general/default_playback_type.web>` + +**Experimental:** This property may be changed or removed in future versions. + +Specifies the default playback type of the Web platform. + +The default value is set to **Sample** as the Web platform is not suited to mix audio streams outside of the Web Audio API, especially when exporting a single-threaded game. **Sample** allows for lower latency on the web platform at the cost of flexibility (:ref:`AudioEffect<class_AudioEffect>`\ s are not supported). + +\ **Warning:** Forcing **Stream** on the Web platform may cause high audio latency and crackling, especially when exporting a multi-threaded game. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_audio/general/ios/mix_with_others: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **audio/general/ios/mix_with_others** = ``false`` :ref:`🔗<class_ProjectSettings_property_audio/general/ios/mix_with_others>` + +Sets the `mixWithOthers <https://developer.apple.com/documentation/avfaudio/avaudiosession/categoryoptions/1616611-mixwithothers>`__ option for the AVAudioSession on iOS. This will override the mix behavior, if the category is set to ``Play and Record``, ``Playback``, or ``Multi Route``. + +\ ``Ambient`` always has this set per default. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_audio/general/ios/session_category: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **audio/general/ios/session_category** = ``0`` :ref:`🔗<class_ProjectSettings_property_audio/general/ios/session_category>` + +Sets the `AVAudioSessionCategory <https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory>`__ on iOS. Use the ``Playback`` category to get sound output, even if the phone is in silent mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_audio/general/text_to_speech: .. rst-class:: classref-property -:ref:`bool<class_bool>` **audio/general/text_to_speech** = ``false`` +:ref:`bool<class_bool>` **audio/general/text_to_speech** = ``false`` :ref:`🔗<class_ProjectSettings_property_audio/general/text_to_speech>` If ``true``, text-to-speech support is enabled, see :ref:`DisplayServer.tts_get_voices<class_DisplayServer_method_tts_get_voices>` and :ref:`DisplayServer.tts_speak<class_DisplayServer_method_tts_speak>`. @@ -2121,9 +2390,21 @@ If ``true``, text-to-speech support is enabled, see :ref:`DisplayServer.tts_get_ .. rst-class:: classref-property -:ref:`int<class_int>` **audio/video/video_delay_compensation_ms** = ``0`` +:ref:`int<class_int>` **audio/video/video_delay_compensation_ms** = ``0`` :ref:`🔗<class_ProjectSettings_property_audio/video/video_delay_compensation_ms>` + +Setting to hardcode audio delay when playing video. Best to leave this unchanged unless you know what you are doing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_collada/use_ambient: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **collada/use_ambient** = ``false`` :ref:`🔗<class_ProjectSettings_property_collada/use_ambient>` -Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. +If ``true``, ambient lights will be imported from COLLADA models as :ref:`DirectionalLight3D<class_DirectionalLight3D>`. If ``false``, ambient lights will be ignored. .. rst-class:: classref-item-separator @@ -2133,7 +2414,7 @@ Setting to hardcode audio delay when playing video. Best to leave this untouched .. rst-class:: classref-property -:ref:`int<class_int>` **compression/formats/gzip/compression_level** = ``-1`` +:ref:`int<class_int>` **compression/formats/gzip/compression_level** = ``-1`` :ref:`🔗<class_ProjectSettings_property_compression/formats/gzip/compression_level>` The default compression level for gzip. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. ``-1`` uses the default gzip compression level, which is identical to ``6`` but could change in the future due to underlying zlib updates. @@ -2145,7 +2426,7 @@ The default compression level for gzip. Affects compressed scenes and resources. .. rst-class:: classref-property -:ref:`int<class_int>` **compression/formats/zlib/compression_level** = ``-1`` +:ref:`int<class_int>` **compression/formats/zlib/compression_level** = ``-1`` :ref:`🔗<class_ProjectSettings_property_compression/formats/zlib/compression_level>` The default compression level for Zlib. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. ``-1`` uses the default gzip compression level, which is identical to ``6`` but could change in the future due to underlying zlib updates. @@ -2157,7 +2438,7 @@ The default compression level for Zlib. Affects compressed scenes and resources. .. rst-class:: classref-property -:ref:`int<class_int>` **compression/formats/zstd/compression_level** = ``3`` +:ref:`int<class_int>` **compression/formats/zstd/compression_level** = ``3`` :ref:`🔗<class_ProjectSettings_property_compression/formats/zstd/compression_level>` The default compression level for Zstandard. Affects compressed scenes and resources. Higher levels result in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression level. @@ -2169,7 +2450,7 @@ The default compression level for Zstandard. Affects compressed scenes and resou .. rst-class:: classref-property -:ref:`bool<class_bool>` **compression/formats/zstd/long_distance_matching** = ``false`` +:ref:`bool<class_bool>` **compression/formats/zstd/long_distance_matching** = ``false`` :ref:`🔗<class_ProjectSettings_property_compression/formats/zstd/long_distance_matching>` Enables `long-distance matching <https://github.com/facebook/zstd/releases/tag/v1.3.2>`__ in Zstandard. @@ -2181,7 +2462,7 @@ Enables `long-distance matching <https://github.com/facebook/zstd/releases/tag/v .. rst-class:: classref-property -:ref:`int<class_int>` **compression/formats/zstd/window_log_size** = ``27`` +:ref:`int<class_int>` **compression/formats/zstd/window_log_size** = ``27`` :ref:`🔗<class_ProjectSettings_property_compression/formats/zstd/window_log_size>` Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing. @@ -2189,13 +2470,37 @@ Largest size limit (in power of 2) allowed when compressing using long-distance ---- +.. _class_ProjectSettings_property_debug/canvas_items/debug_redraw_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **debug/canvas_items/debug_redraw_color** = ``Color(1, 0.2, 0.2, 0.5)`` :ref:`🔗<class_ProjectSettings_property_debug/canvas_items/debug_redraw_color>` + +If canvas item redraw debugging is active, this color will be flashed on canvas items when they redraw. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/canvas_items/debug_redraw_time: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **debug/canvas_items/debug_redraw_time** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_debug/canvas_items/debug_redraw_time>` + +If canvas item redraw debugging is active, this will be the time the flash will last each time they redraw. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/file_logging/enable_file_logging: .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/file_logging/enable_file_logging** = ``false`` +:ref:`bool<class_bool>` **debug/file_logging/enable_file_logging** = ``false`` :ref:`🔗<class_ProjectSettings_property_debug/file_logging/enable_file_logging>` -If ``true``, logs all output to files. +If ``true``, logs all output and error messages to files. See also :ref:`debug/file_logging/log_path<class_ProjectSettings_property_debug/file_logging/log_path>`, :ref:`debug/file_logging/max_log_files<class_ProjectSettings_property_debug/file_logging/max_log_files>`, and :ref:`application/run/flush_stdout_on_print<class_ProjectSettings_property_application/run/flush_stdout_on_print>`. .. rst-class:: classref-item-separator @@ -2205,7 +2510,7 @@ If ``true``, logs all output to files. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/file_logging/enable_file_logging.pc** = ``true`` +:ref:`bool<class_bool>` **debug/file_logging/enable_file_logging.pc** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/file_logging/enable_file_logging.pc>` Desktop override for :ref:`debug/file_logging/enable_file_logging<class_ProjectSettings_property_debug/file_logging/enable_file_logging>`, as log files are not readily accessible on mobile/Web platforms. @@ -2217,10 +2522,12 @@ Desktop override for :ref:`debug/file_logging/enable_file_logging<class_ProjectS .. rst-class:: classref-property -:ref:`String<class_String>` **debug/file_logging/log_path** = ``"user://logs/godot.log"`` +:ref:`String<class_String>` **debug/file_logging/log_path** = ``"user://logs/godot.log"`` :ref:`🔗<class_ProjectSettings_property_debug/file_logging/log_path>` Path at which to store log files for the project. Using a path under ``user://`` is recommended. +This can be specified manually on the command line using the ``--log-file <file>`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. If this command line argument is specified, log rotation is automatically disabled (see :ref:`debug/file_logging/max_log_files<class_ProjectSettings_property_debug/file_logging/max_log_files>`). + .. rst-class:: classref-item-separator ---- @@ -2229,9 +2536,11 @@ Path at which to store log files for the project. Using a path under ``user://`` .. rst-class:: classref-property -:ref:`int<class_int>` **debug/file_logging/max_log_files** = ``5`` +:ref:`int<class_int>` **debug/file_logging/max_log_files** = ``5`` :ref:`🔗<class_ProjectSettings_property_debug/file_logging/max_log_files>` + +Specifies the maximum number of log files allowed (used for rotation). Set to ``1`` to disable log file rotation. -Specifies the maximum number of log files allowed (used for rotation). +If the ``--log-file <file>`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` is used, log rotation is always disabled. .. rst-class:: classref-item-separator @@ -2241,7 +2550,7 @@ Specifies the maximum number of log files allowed (used for rotation). .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/assert_always_false** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/assert_always_false** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/assert_always_false>` When set to ``warn`` or ``error``, produces a warning or an error respectively when an ``assert`` call always evaluates to false. @@ -2253,7 +2562,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/assert_always_true** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/assert_always_true** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/assert_always_true>` When set to ``warn`` or ``error``, produces a warning or an error respectively when an ``assert`` call always evaluates to true. @@ -2261,11 +2570,23 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_capture_reassignment: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/confusable_capture_reassignment** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/confusable_capture_reassignment>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable captured by a lambda is reassigned, since this does not modify the outer local variable. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_identifier: .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/confusable_identifier** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/confusable_identifier** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/confusable_identifier>` When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier contains characters that can be confused with something else, like when mixing different alphabets. @@ -2273,11 +2594,37 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_declaration: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/confusable_local_declaration** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_declaration>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier declared in the nested block has the same name as an identifier declared below in the parent block. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_usage: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/confusable_local_usage** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/confusable_local_usage>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier that will be shadowed below in the block is used. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function: .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/constant_used_as_function** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/constant_used_as_function** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/constant_used_as_function>` + +**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time. When set to ``warn`` or ``error``, produces a warning or an error respectively when a constant is used as a function. @@ -2289,10 +2636,12 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/deprecated_keyword** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/deprecated_keyword** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/deprecated_keyword>` When set to ``warn`` or ``error``, produces a warning or an error respectively when deprecated keywords are used. +\ **Note:** There are currently no deprecated keywords, so this warning is never produced. + .. rst-class:: classref-item-separator ---- @@ -2301,7 +2650,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/empty_file** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/empty_file** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/empty_file>` When set to ``warn`` or ``error``, produces a warning or an error respectively when an empty file is parsed. @@ -2313,7 +2662,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/gdscript/warnings/enable** = ``true`` +:ref:`bool<class_bool>` **debug/gdscript/warnings/enable** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/enable>` If ``true``, enables specific GDScript warnings (see ``debug/gdscript/warnings/*`` settings). If ``false``, disables all GDScript warnings. @@ -2321,11 +2670,23 @@ If ``true``, enables specific GDScript warnings (see ``debug/gdscript/warnings/* ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/enum_variable_without_default: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/enum_variable_without_default** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/enum_variable_without_default>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a variable has an enum type but no explicit default value, but only if the enum does not contain ``0`` as a valid value. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/exclude_addons: .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/gdscript/warnings/exclude_addons** = ``true`` +:ref:`bool<class_bool>` **debug/gdscript/warnings/exclude_addons** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/exclude_addons>` If ``true``, scripts in the ``res://addons`` folder will not generate warnings. @@ -2337,7 +2698,9 @@ If ``true``, scripts in the ``res://addons`` folder will not generate warnings. .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/function_used_as_property** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/function_used_as_property** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/function_used_as_property>` + +**Deprecated:** This warning is never produced. When a function is used as a property, a :ref:`Callable<class_Callable>` is returned. When set to ``warn`` or ``error``, produces a warning or an error respectively when using a function as if it is a property. @@ -2349,7 +2712,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/get_node_default_without_onready** = ``2`` +:ref:`int<class_int>` **debug/gdscript/warnings/get_node_default_without_onready** = ``2`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/get_node_default_without_onready>` When set to ``warn`` or ``error``, produces a warning or an error respectively when :ref:`Node.get_node<class_Node_method_get_node>` (or the shorthand ``$``) is used as default value of a class variable without the ``@onready`` annotation. @@ -2361,7 +2724,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/incompatible_ternary** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/incompatible_ternary** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/incompatible_ternary>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a ternary operator may emit values with incompatible types. @@ -2373,7 +2736,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/inference_on_variant** = ``2`` +:ref:`int<class_int>` **debug/gdscript/warnings/inference_on_variant** = ``2`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/inference_on_variant>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a static inferred type uses a :ref:`Variant<class_Variant>` as initial value, which makes the static type to also be Variant. @@ -2381,11 +2744,25 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/inferred_declaration: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/inferred_declaration** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/inferred_declaration>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a variable, constant, or parameter has an implicitly inferred static type. + +\ **Note:** This warning is recommended *in addition* to :ref:`debug/gdscript/warnings/untyped_declaration<class_ProjectSettings_property_debug/gdscript/warnings/untyped_declaration>` if you want to always specify the type explicitly. Having ``INFERRED_DECLARATION`` warning level higher than ``UNTYPED_DECLARATION`` warning level makes little sense and is not recommended. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_cast: .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/int_as_enum_without_cast** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/int_as_enum_without_cast** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_cast>` When set to ``warn`` or ``error``, produces a warning or an error respectively when trying to use an integer as an enum without an explicit cast. @@ -2397,7 +2774,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/int_as_enum_without_match** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/int_as_enum_without_match** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_match>` When set to ``warn`` or ``error``, produces a warning or an error respectively when trying to use an integer as an enum when there is no matching enum member for that numeric value. @@ -2409,7 +2786,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/integer_division** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/integer_division** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/integer_division>` When set to ``warn`` or ``error``, produces a warning or an error respectively when dividing an integer by another integer (the decimal part will be discarded). @@ -2421,7 +2798,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/narrowing_conversion** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/narrowing_conversion** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/narrowing_conversion>` When set to ``warn`` or ``error``, produces a warning or an error respectively when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). @@ -2433,7 +2810,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/native_method_override** = ``2`` +:ref:`int<class_int>` **debug/gdscript/warnings/native_method_override** = ``2`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/native_method_override>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a method in the script overrides a native method, because it may not behave as expected. @@ -2445,7 +2822,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/onready_with_export** = ``2`` +:ref:`int<class_int>` **debug/gdscript/warnings/onready_with_export** = ``2`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/onready_with_export>` When set to ``warn`` or ``error``, produces a warning or an error respectively when the ``@onready`` annotation is used together with the ``@export`` annotation, since it may not behave as expected. @@ -2457,7 +2834,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/property_used_as_function** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/property_used_as_function** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/property_used_as_function>` + +**Deprecated:** This warning is never produced. Instead, an error is generated if the expression type is known at compile time. When set to ``warn`` or ``error``, produces a warning or an error respectively when using a property as if it is a function. @@ -2469,7 +2848,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/redundant_await** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/redundant_await** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/redundant_await>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a function that is not a coroutine is called with await. @@ -2481,7 +2860,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/redundant_static_unload** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/redundant_static_unload** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/redundant_static_unload>` When set to ``warn`` or ``error``, produces a warning or an error respectively when the ``@static_unload`` annotation is used in a script without any static variables. @@ -2493,7 +2872,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/gdscript/warnings/renamed_in_godot_4_hint** = ``1`` +:ref:`bool<class_bool>` **debug/gdscript/warnings/renamed_in_godot_4_hint** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/renamed_in_godot_4_hint>` When enabled, using a property, enum, or function that was renamed since Godot 3 will produce a hint if an error occurs. @@ -2505,9 +2884,9 @@ When enabled, using a property, enum, or function that was renamed since Godot 3 .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/return_value_discarded** = ``0`` +:ref:`int<class_int>` **debug/gdscript/warnings/return_value_discarded** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/return_value_discarded>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the :ref:`Error<enum_@GlobalScope_Error>` enum. +When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a function without using its return value (by assigning it to a variable or using it as a function argument). These return values are sometimes used to indicate possible errors using the :ref:`Error<enum_@GlobalScope_Error>` enum. .. rst-class:: classref-item-separator @@ -2517,7 +2896,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_global_identifier** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_global_identifier** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/shadowed_global_identifier>` When set to ``warn`` or ``error``, produces a warning or an error respectively when defining a local or member variable, signal, or enum that would have the same name as a built-in function or global class name, thus shadowing it. @@ -2529,7 +2908,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_variable** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_variable** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable>` When set to ``warn`` or ``error``, produces a warning or an error respectively when defining a local or member variable that would shadow a member variable that the class defines. @@ -2541,7 +2920,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_variable_base_class** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/shadowed_variable_base_class** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/shadowed_variable_base_class>` When set to ``warn`` or ``error``, produces a warning or an error respectively when defining a local or subclass member variable that would shadow a variable that is inherited from a parent class. @@ -2553,9 +2932,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/standalone_expression** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/standalone_expression** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/standalone_expression>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when calling an expression that has no effect on the surrounding code, such as writing ``2 + 2`` as a statement. +When set to ``warn`` or ``error``, produces a warning or an error respectively when calling an expression that may have no effect on the surrounding code, such as writing ``2 + 2`` as a statement. .. rst-class:: classref-item-separator @@ -2565,9 +2944,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/standalone_ternary** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/standalone_ternary** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/standalone_ternary>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a ternary expression that has no effect on the surrounding code, such as writing ``42 if active else 0`` as a statement. +When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a ternary expression that may have no effect on the surrounding code, such as writing ``42 if active else 0`` as a statement. .. rst-class:: classref-item-separator @@ -2577,7 +2956,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/static_called_on_instance** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/static_called_on_instance** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/static_called_on_instance>` When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly. @@ -2589,7 +2968,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unassigned_variable** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unassigned_variable** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable>` When set to ``warn`` or ``error``, produces a warning or an error respectively when using a variable that wasn't previously assigned. @@ -2601,7 +2980,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unassigned_variable_op_assign** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unassigned_variable_op_assign** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unassigned_variable_op_assign>` When set to ``warn`` or ``error``, produces a warning or an error respectively when assigning a variable using an assignment operator like ``+=`` if the variable wasn't previously assigned. @@ -2613,7 +2992,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unreachable_code** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unreachable_code** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unreachable_code>` When set to ``warn`` or ``error``, produces a warning or an error respectively when unreachable code is detected (such as after a ``return`` statement that will always be executed). @@ -2625,7 +3004,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unreachable_pattern** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unreachable_pattern** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unreachable_pattern>` When set to ``warn`` or ``error``, produces a warning or an error respectively when an unreachable ``match`` pattern is detected. @@ -2637,7 +3016,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_call_argument** = ``0`` +:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_call_argument** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_call_argument>` When set to ``warn`` or ``error``, produces a warning or an error respectively when using an expression whose type may not be compatible with the function parameter expected. @@ -2649,9 +3028,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_cast** = ``0`` +:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_cast** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_cast>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when performing an unsafe cast. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a :ref:`Variant<class_Variant>` value is cast to a non-Variant. .. rst-class:: classref-item-separator @@ -2661,7 +3040,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_method_access** = ``0`` +:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_method_access** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_method_access>` When set to ``warn`` or ``error``, produces a warning or an error respectively when calling a method whose presence is not guaranteed at compile-time in the class. @@ -2673,7 +3052,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_property_access** = ``0`` +:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_property_access** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_property_access>` When set to ``warn`` or ``error``, produces a warning or an error respectively when accessing a property whose presence is not guaranteed at compile-time in the class. @@ -2685,7 +3064,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_void_return** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unsafe_void_return** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unsafe_void_return>` When set to ``warn`` or ``error``, produces a warning or an error respectively when returning a call from a ``void`` function when such call cannot be guaranteed to be also ``void``. @@ -2693,25 +3072,39 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- -.. _class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant: +.. _class_ProjectSettings_property_debug/gdscript/warnings/untyped_declaration: .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unused_local_constant** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/untyped_declaration** = ``0`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/untyped_declaration>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when a local constant is never used. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a variable or parameter has no static type, or if a function has no static return type. + +\ **Note:** This warning is recommended together with :ref:`EditorSettings.text_editor/completion/add_type_hints<class_EditorSettings_property_text_editor/completion/add_type_hints>` to help achieve type safety. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_debug/gdscript/warnings/unused_parameter: +.. _class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant: .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unused_parameter** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unused_local_constant** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unused_local_constant>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when a function parameter is never used. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a local constant is never used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/gdscript/warnings/unused_parameter: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **debug/gdscript/warnings/unused_parameter** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unused_parameter>` + +When set to ``warn`` or ``error``, produces a warning or an error respectively when a function parameter is never used. .. rst-class:: classref-item-separator @@ -2721,7 +3114,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unused_private_class_variable** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unused_private_class_variable** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unused_private_class_variable>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a private member variable is never used. @@ -2733,9 +3126,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unused_signal** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unused_signal** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unused_signal>` -When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never emitted. +When set to ``warn`` or ``error``, produces a warning or an error respectively when a signal is declared but never explicitly used in the class. .. rst-class:: classref-item-separator @@ -2745,7 +3138,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`int<class_int>` **debug/gdscript/warnings/unused_variable** = ``1`` +:ref:`int<class_int>` **debug/gdscript/warnings/unused_variable** = ``1`` :ref:`🔗<class_ProjectSettings_property_debug/gdscript/warnings/unused_variable>` When set to ``warn`` or ``error``, produces a warning or an error respectively when a local variable is unused. @@ -2757,7 +3150,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. rst-class:: classref-property -:ref:`String<class_String>` **debug/settings/crash_handler/message** = ``"Please include this when reporting the bug to the project developer."`` +:ref:`String<class_String>` **debug/settings/crash_handler/message** = ``"Please include this when reporting the bug to the project developer."`` :ref:`🔗<class_ProjectSettings_property_debug/settings/crash_handler/message>` Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting. @@ -2769,7 +3162,7 @@ Message to be displayed before the backtrace when the engine crashes. By default .. rst-class:: classref-property -:ref:`String<class_String>` **debug/settings/crash_handler/message.editor** = ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` +:ref:`String<class_String>` **debug/settings/crash_handler/message.editor** = ``"Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"`` :ref:`🔗<class_ProjectSettings_property_debug/settings/crash_handler/message.editor>` Editor-only override for :ref:`debug/settings/crash_handler/message<class_ProjectSettings_property_debug/settings/crash_handler/message>`. Does not affect exported projects in debug or release mode. @@ -2781,7 +3174,7 @@ Editor-only override for :ref:`debug/settings/crash_handler/message<class_Projec .. rst-class:: classref-property -:ref:`int<class_int>` **debug/settings/gdscript/max_call_stack** = ``1024`` +:ref:`int<class_int>` **debug/settings/gdscript/max_call_stack** = ``1024`` :ref:`🔗<class_ProjectSettings_property_debug/settings/gdscript/max_call_stack>` Maximum call stack allowed for debugging GDScript. @@ -2793,7 +3186,7 @@ Maximum call stack allowed for debugging GDScript. .. rst-class:: classref-property -:ref:`int<class_int>` **debug/settings/profiler/max_functions** = ``16384`` +:ref:`int<class_int>` **debug/settings/profiler/max_functions** = ``16384`` :ref:`🔗<class_ProjectSettings_property_debug/settings/profiler/max_functions>` Maximum number of functions per frame allowed when profiling. @@ -2805,7 +3198,7 @@ Maximum number of functions per frame allowed when profiling. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/settings/stdout/print_fps** = ``false`` +:ref:`bool<class_bool>` **debug/settings/stdout/print_fps** = ``false`` :ref:`🔗<class_ProjectSettings_property_debug/settings/stdout/print_fps>` Print frames per second to standard output every second. @@ -2817,7 +3210,7 @@ Print frames per second to standard output every second. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/settings/stdout/print_gpu_profile** = ``false`` +:ref:`bool<class_bool>` **debug/settings/stdout/print_gpu_profile** = ``false`` :ref:`🔗<class_ProjectSettings_property_debug/settings/stdout/print_gpu_profile>` Print GPU profile information to standard output every second. This includes how long each frame takes the GPU to render on average, broken down into different steps of the render pipeline, such as CanvasItems, shadows, glow, etc. @@ -2829,7 +3222,7 @@ Print GPU profile information to standard output every second. This includes how .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/settings/stdout/verbose_stdout** = ``false`` +:ref:`bool<class_bool>` **debug/settings/stdout/verbose_stdout** = ``false`` :ref:`🔗<class_ProjectSettings_property_debug/settings/stdout/verbose_stdout>` Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the ``--verbose`` or ``-v`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`, even on an exported project. See also :ref:`OS.is_stdout_verbose<class_OS_method_is_stdout_verbose>` and :ref:`@GlobalScope.print_verbose<class_@GlobalScope_method_print_verbose>`. @@ -2841,7 +3234,7 @@ Print more information to standard output when running. It displays information .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/device_limit_exceeded** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/device_limit_exceeded** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/device_limit_exceeded>` When set to ``true``, produces a warning when the shader exceeds certain device limits. Currently, the only device limit checked is the limit on uniform buffer size. More device limits will be added in the future. @@ -2853,7 +3246,7 @@ When set to ``true``, produces a warning when the shader exceeds certain device .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/enable** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/enable** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/enable>` If ``true``, enables specific shader warnings (see ``debug/shader_language/warnings/*`` settings). If ``false``, disables all shader warnings. @@ -2865,9 +3258,9 @@ If ``true``, enables specific shader warnings (see ``debug/shader_language/warni .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/float_comparison** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/float_comparison** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/float_comparison>` -When set to ``true``, produces a warning when two floating point numbers are compared directly with the ``==`` operator or the ``!=`` operator. +When set to ``true``, produces a warning when two floating-point numbers are compared directly with the ``==`` operator or the ``!=`` operator. .. rst-class:: classref-item-separator @@ -2877,7 +3270,7 @@ When set to ``true``, produces a warning when two floating point numbers are com .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/formatting_error** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/formatting_error** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/formatting_error>` When set to ``true``, produces a warning upon encountering certain formatting errors. Currently this only checks for empty statements. More formatting errors may be added over time. @@ -2885,11 +3278,23 @@ When set to ``true``, produces a warning upon encountering certain formatting er ---- +.. _class_ProjectSettings_property_debug/shader_language/warnings/magic_position_write: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **debug/shader_language/warnings/magic_position_write** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/magic_position_write>` + +When set to ``true``, produces a warning when the shader contains ``POSITION = vec4(vertex,`` as this was very common code written in Godot 4.2 and earlier that was paired with a QuadMesh to produce a full screen post processes pass. With the switch to reversed z in 4.3, this trick no longer works, as it implicitly relied on the ``VERTEX.z`` being 0. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/shader_language/warnings/treat_warnings_as_errors: .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/treat_warnings_as_errors** = ``false`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/treat_warnings_as_errors** = ``false`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/treat_warnings_as_errors>` When set to ``true``, warnings are treated as errors. @@ -2901,7 +3306,7 @@ When set to ``true``, warnings are treated as errors. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_constant** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_constant** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_constant>` When set to ``true``, produces a warning when a constant is never used. @@ -2913,7 +3318,7 @@ When set to ``true``, produces a warning when a constant is never used. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_function** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_function** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_function>` When set to ``true``, produces a warning when a function is never used. @@ -2925,7 +3330,7 @@ When set to ``true``, produces a warning when a function is never used. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_local_variable** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_local_variable** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_local_variable>` When set to ``true``, produces a warning when a local variable is never used. @@ -2937,7 +3342,7 @@ When set to ``true``, produces a warning when a local variable is never used. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_struct** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_struct** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_struct>` When set to ``true``, produces a warning when a struct is never used. @@ -2949,7 +3354,7 @@ When set to ``true``, produces a warning when a struct is never used. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_uniform** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_uniform** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_uniform>` When set to ``true``, produces a warning when a uniform is never used. @@ -2961,7 +3366,7 @@ When set to ``true``, produces a warning when a uniform is never used. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_varying** = ``true`` +:ref:`bool<class_bool>` **debug/shader_language/warnings/unused_varying** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shader_language/warnings/unused_varying>` When set to ``true``, produces a warning when a varying is never used. @@ -2973,7 +3378,7 @@ When set to ``true``, produces a warning when a varying is never used. .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/agents_radius_color** = ``Color(1, 1, 0, 0.25)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/agents_radius_color** = ``Color(1, 1, 0, 0.25)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/agents_radius_color>` Color of the avoidance agents radius, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -2985,7 +3390,7 @@ Color of the avoidance agents radius, visible when "Visible Avoidance" is enable .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_agents_radius** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_agents_radius** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/enable_agents_radius>` If enabled, displays avoidance agents radius when "Visible Avoidance" is enabled in the Debug menu. @@ -2997,7 +3402,7 @@ If enabled, displays avoidance agents radius when "Visible Avoidance" is enabled .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_obstacles_radius** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_obstacles_radius** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/enable_obstacles_radius>` If enabled, displays avoidance obstacles radius when "Visible Avoidance" is enabled in the Debug menu. @@ -3009,7 +3414,7 @@ If enabled, displays avoidance obstacles radius when "Visible Avoidance" is enab .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_obstacles_static** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/avoidance/enable_obstacles_static** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/enable_obstacles_static>` If enabled, displays static avoidance obstacles when "Visible Avoidance" is enabled in the Debug menu. @@ -3021,7 +3426,7 @@ If enabled, displays static avoidance obstacles when "Visible Avoidance" is enab .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_radius_color** = ``Color(1, 0.5, 0, 0.25)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_radius_color** = ``Color(1, 0.5, 0, 0.25)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/obstacles_radius_color>` Color of the avoidance obstacles radius, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -3033,7 +3438,7 @@ Color of the avoidance obstacles radius, visible when "Visible Avoidance" is ena .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_edge_pushin_color** = ``Color(1, 0, 0, 1)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_edge_pushin_color** = ``Color(1, 0, 0, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_edge_pushin_color>` Color of the static avoidance obstacles edges when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -3045,7 +3450,7 @@ Color of the static avoidance obstacles edges when their vertices are winded in .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_edge_pushout_color** = ``Color(1, 1, 0, 1)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_edge_pushout_color** = ``Color(1, 1, 0, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_edge_pushout_color>` Color of the static avoidance obstacles edges when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -3057,7 +3462,7 @@ Color of the static avoidance obstacles edges when their vertices are winded in .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_face_pushin_color** = ``Color(1, 0, 0, 0)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_face_pushin_color** = ``Color(1, 0, 0, 0)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_face_pushin_color>` Color of the static avoidance obstacles faces when their vertices are winded in order to push agents in, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -3069,7 +3474,7 @@ Color of the static avoidance obstacles faces when their vertices are winded in .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_face_pushout_color** = ``Color(1, 1, 0, 0.5)`` +:ref:`Color<class_Color>` **debug/shapes/avoidance/obstacles_static_face_pushout_color** = ``Color(1, 1, 0, 0.5)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/avoidance/obstacles_static_face_pushout_color>` Color of the static avoidance obstacles faces when their vertices are winded in order to push agents out, visible when "Visible Avoidance" is enabled in the Debug menu. @@ -3081,7 +3486,7 @@ Color of the static avoidance obstacles faces when their vertices are winded in .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/collision/contact_color** = ``Color(1, 0.2, 0.1, 0.8)`` +:ref:`Color<class_Color>` **debug/shapes/collision/contact_color** = ``Color(1, 0.2, 0.1, 0.8)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/collision/contact_color>` Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. @@ -3093,7 +3498,7 @@ Color of the contact points between collision shapes, visible when "Visible Coll .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/collision/draw_2d_outlines** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/collision/draw_2d_outlines** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/collision/draw_2d_outlines>` Sets whether 2D physics will display collision outlines in game when "Visible Collision Shapes" is enabled in the Debug menu. @@ -3105,7 +3510,7 @@ Sets whether 2D physics will display collision outlines in game when "Visible Co .. rst-class:: classref-property -:ref:`int<class_int>` **debug/shapes/collision/max_contacts_displayed** = ``10000`` +:ref:`int<class_int>` **debug/shapes/collision/max_contacts_displayed** = ``10000`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/collision/max_contacts_displayed>` Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. @@ -3117,7 +3522,7 @@ Maximum number of contact points between collision shapes to display when "Visib .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/collision/shape_color** = ``Color(0, 0.6, 0.7, 0.42)`` +:ref:`Color<class_Color>` **debug/shapes/collision/shape_color** = ``Color(0, 0.6, 0.7, 0.42)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/collision/shape_color>` Color of the collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. @@ -3129,7 +3534,7 @@ Color of the collision shapes, visible when "Visible Collision Shapes" is enable .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/agent_path_color** = ``Color(1, 0, 0, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/agent_path_color** = ``Color(1, 0, 0, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/agent_path_color>` Color to display enabled navigation agent paths when an agent has debug enabled. @@ -3141,7 +3546,7 @@ Color to display enabled navigation agent paths when an agent has debug enabled. .. rst-class:: classref-property -:ref:`float<class_float>` **debug/shapes/navigation/agent_path_point_size** = ``4.0`` +:ref:`float<class_float>` **debug/shapes/navigation/agent_path_point_size** = ``4.0`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/agent_path_point_size>` Rasterized size (pixel) used to render navigation agent path points when an agent has debug enabled. @@ -3153,7 +3558,7 @@ Rasterized size (pixel) used to render navigation agent path points when an agen .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/edge_connection_color** = ``Color(1, 0, 1, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/edge_connection_color** = ``Color(1, 0, 1, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/edge_connection_color>` Color to display edge connections between navigation regions, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3165,7 +3570,7 @@ Color to display edge connections between navigation regions, visible when "Visi .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_agent_paths** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_agent_paths** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_agent_paths>` If enabled, displays navigation agent paths when an agent has debug enabled. @@ -3177,7 +3582,7 @@ If enabled, displays navigation agent paths when an agent has debug enabled. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_agent_paths_xray** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_agent_paths_xray** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_agent_paths_xray>` If enabled, displays navigation agent paths through geometry when an agent has debug enabled. @@ -3189,7 +3594,7 @@ If enabled, displays navigation agent paths through geometry when an agent has d .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_connections** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_connections** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections>` If enabled, displays edge connections between navigation regions when "Visible Navigation" is enabled in the Debug menu. @@ -3201,7 +3606,7 @@ If enabled, displays edge connections between navigation regions when "Visible N .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_connections_xray** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_connections_xray** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_edge_connections_xray>` If enabled, displays edge connections between navigation regions through geometry when "Visible Navigation" is enabled in the Debug menu. @@ -3213,7 +3618,7 @@ If enabled, displays edge connections between navigation regions through geometr .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_lines** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_lines** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines>` If enabled, displays navigation mesh polygon edges when "Visible Navigation" is enabled in the Debug menu. @@ -3225,7 +3630,7 @@ If enabled, displays navigation mesh polygon edges when "Visible Navigation" is .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_lines_xray** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_edge_lines_xray** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_edge_lines_xray>` If enabled, displays navigation mesh polygon edges through geometry when "Visible Navigation" is enabled in the Debug menu. @@ -3237,7 +3642,7 @@ If enabled, displays navigation mesh polygon edges through geometry when "Visibl .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_geometry_face_random_color** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_geometry_face_random_color** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_geometry_face_random_color>` If enabled, colorizes each navigation mesh polygon face with a random color when "Visible Navigation" is enabled in the Debug menu. @@ -3249,7 +3654,7 @@ If enabled, colorizes each navigation mesh polygon face with a random color when .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_link_connections** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_link_connections** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_link_connections>` If enabled, displays navigation link connections when "Visible Navigation" is enabled in the Debug menu. @@ -3261,7 +3666,7 @@ If enabled, displays navigation link connections when "Visible Navigation" is en .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug/shapes/navigation/enable_link_connections_xray** = ``true`` +:ref:`bool<class_bool>` **debug/shapes/navigation/enable_link_connections_xray** = ``true`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/enable_link_connections_xray>` If enabled, displays navigation link connections through geometry when "Visible Navigation" is enabled in the Debug menu. @@ -3273,7 +3678,7 @@ If enabled, displays navigation link connections through geometry when "Visible .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_edge_color** = ``Color(0.5, 1, 1, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_edge_color** = ``Color(0.5, 1, 1, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_color>` Color to display enabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3285,7 +3690,7 @@ Color to display enabled navigation mesh polygon edges, visible when "Visible Na .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_edge_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_edge_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/geometry_edge_disabled_color>` Color to display disabled navigation mesh polygon edges, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3297,7 +3702,7 @@ Color to display disabled navigation mesh polygon edges, visible when "Visible N .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_face_color** = ``Color(0.5, 1, 1, 0.4)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_face_color** = ``Color(0.5, 1, 1, 0.4)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/geometry_face_color>` Color to display enabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3309,7 +3714,7 @@ Color to display enabled navigation mesh polygon faces, visible when "Visible Na .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_face_disabled_color** = ``Color(0.5, 0.5, 0.5, 0.4)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/geometry_face_disabled_color** = ``Color(0.5, 0.5, 0.5, 0.4)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/geometry_face_disabled_color>` Color to display disabled navigation mesh polygon faces, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3321,7 +3726,7 @@ Color to display disabled navigation mesh polygon faces, visible when "Visible N .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/link_connection_color** = ``Color(1, 0.5, 1, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/link_connection_color** = ``Color(1, 0.5, 1, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/link_connection_color>` Color to use to display navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3333,7 +3738,7 @@ Color to use to display navigation link connections, visible when "Visible Navig .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/navigation/link_connection_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` +:ref:`Color<class_Color>` **debug/shapes/navigation/link_connection_disabled_color** = ``Color(0.5, 0.5, 0.5, 1)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/navigation/link_connection_disabled_color>` Color to use to display disabled navigation link connections, visible when "Visible Navigation" is enabled in the Debug menu. @@ -3345,7 +3750,7 @@ Color to use to display disabled navigation link connections, visible when "Visi .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug/shapes/paths/geometry_color** = ``Color(0.1, 1, 0.7, 0.4)`` +:ref:`Color<class_Color>` **debug/shapes/paths/geometry_color** = ``Color(0.1, 1, 0.7, 0.4)`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/paths/geometry_color>` Color of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu. @@ -3357,7 +3762,7 @@ Color of the curve path geometry, visible when "Visible Paths" is enabled in the .. rst-class:: classref-property -:ref:`float<class_float>` **debug/shapes/paths/geometry_width** = ``2.0`` +:ref:`float<class_float>` **debug/shapes/paths/geometry_width** = ``2.0`` :ref:`🔗<class_ProjectSettings_property_debug/shapes/paths/geometry_width>` Line width of the curve path geometry, visible when "Visible Paths" is enabled in the Debug menu. @@ -3365,11 +3770,83 @@ Line width of the curve path geometry, visible when "Visible Paths" is enabled i ---- +.. _class_ProjectSettings_property_display/display_server/driver: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver>` + +Sets the driver to be used by the display server. This property can not be edited directly, instead, set the driver using the platform-specific overrides. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/display_server/driver.android: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver.android** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver.android>` + +Android override for :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/display_server/driver.ios: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver.ios** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver.ios>` + +iOS override for :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/display_server/driver.linuxbsd: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver.linuxbsd** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver.linuxbsd>` + +LinuxBSD override for :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/display_server/driver.macos: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver.macos** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver.macos>` + +MacOS override for :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/display_server/driver.windows: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/display_server/driver.windows** :ref:`🔗<class_ProjectSettings_property_display/display_server/driver.windows>` + +Windows override for :ref:`display/display_server/driver<class_ProjectSettings_property_display/display_server/driver>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_display/mouse_cursor/custom_image: .. rst-class:: classref-property -:ref:`String<class_String>` **display/mouse_cursor/custom_image** = ``""`` +:ref:`String<class_String>` **display/mouse_cursor/custom_image** = ``""`` :ref:`🔗<class_ProjectSettings_property_display/mouse_cursor/custom_image>` Custom image for the mouse cursor (limited to 256×256). @@ -3381,7 +3858,7 @@ Custom image for the mouse cursor (limited to 256×256). .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **display/mouse_cursor/custom_image_hotspot** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **display/mouse_cursor/custom_image_hotspot** = ``Vector2(0, 0)`` :ref:`🔗<class_ProjectSettings_property_display/mouse_cursor/custom_image_hotspot>` Hotspot for the custom mouse cursor image. @@ -3393,7 +3870,7 @@ Hotspot for the custom mouse cursor image. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **display/mouse_cursor/tooltip_position_offset** = ``Vector2(10, 10)`` +:ref:`Vector2<class_Vector2>` **display/mouse_cursor/tooltip_position_offset** = ``Vector2(10, 10)`` :ref:`🔗<class_ProjectSettings_property_display/mouse_cursor/tooltip_position_offset>` Position offset for tooltips, relative to the mouse cursor's hotspot. @@ -3405,7 +3882,7 @@ Position offset for tooltips, relative to the mouse cursor's hotspot. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/dpi/allow_hidpi** = ``true`` +:ref:`bool<class_bool>` **display/window/dpi/allow_hidpi** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/dpi/allow_hidpi>` If ``true``, allows HiDPI display on Windows, macOS, Android, iOS and Web. If ``false``, the platform's low-DPI fallback will be used on HiDPI displays, which causes the window to be displayed in a blurry or pixelated manner (and can cause various window management bugs). Therefore, it is recommended to make your project scale to :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` instead of disabling this setting. @@ -3419,7 +3896,7 @@ If ``true``, allows HiDPI display on Windows, macOS, Android, iOS and Web. If `` .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/energy_saving/keep_screen_on** = ``true`` +:ref:`bool<class_bool>` **display/window/energy_saving/keep_screen_on** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on>` If ``true``, keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. @@ -3427,13 +3904,13 @@ If ``true``, keeps the screen on (even in case of inactivity), so the screensave ---- -.. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor: +.. _class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor_hint: .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/energy_saving/keep_screen_on.editor** = ``false`` +:ref:`bool<class_bool>` **display/window/energy_saving/keep_screen_on.editor_hint** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on.editor_hint>` -Editor-only override for :ref:`display/window/energy_saving/keep_screen_on<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on>`. Does not affect exported projects in debug or release mode. +Editor-only override for :ref:`display/window/energy_saving/keep_screen_on<class_ProjectSettings_property_display/window/energy_saving/keep_screen_on>`. Does not affect running project. .. rst-class:: classref-item-separator @@ -3443,7 +3920,7 @@ Editor-only override for :ref:`display/window/energy_saving/keep_screen_on<class .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/handheld/orientation** = ``0`` +:ref:`int<class_int>` **display/window/handheld/orientation** = ``0`` :ref:`🔗<class_ProjectSettings_property_display/window/handheld/orientation>` The default screen orientation to use on mobile devices. See :ref:`ScreenOrientation<enum_DisplayServer_ScreenOrientation>` for possible values. @@ -3457,7 +3934,7 @@ The default screen orientation to use on mobile devices. See :ref:`ScreenOrienta .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/ios/allow_high_refresh_rate** = ``true`` +:ref:`bool<class_bool>` **display/window/ios/allow_high_refresh_rate** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/ios/allow_high_refresh_rate>` If ``true``, iOS devices that support high refresh rate/"ProMotion" will be allowed to render at up to 120 frames per second. @@ -3469,7 +3946,7 @@ If ``true``, iOS devices that support high refresh rate/"ProMotion" will be allo .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/ios/hide_home_indicator** = ``true`` +:ref:`bool<class_bool>` **display/window/ios/hide_home_indicator** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/ios/hide_home_indicator>` If ``true``, the home indicator is hidden automatically. This only affects iOS devices without a physical home button. @@ -3481,7 +3958,7 @@ If ``true``, the home indicator is hidden automatically. This only affects iOS d .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/ios/hide_status_bar** = ``true`` +:ref:`bool<class_bool>` **display/window/ios/hide_status_bar** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/ios/hide_status_bar>` If ``true``, the status bar is hidden while the app is running. @@ -3493,7 +3970,7 @@ If ``true``, the status bar is hidden while the app is running. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/ios/suppress_ui_gesture** = ``true`` +:ref:`bool<class_bool>` **display/window/ios/suppress_ui_gesture** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/ios/suppress_ui_gesture>` If ``true``, it will require two swipes to access iOS UI that uses gestures. @@ -3507,7 +3984,7 @@ If ``true``, it will require two swipes to access iOS UI that uses gestures. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/per_pixel_transparency/allowed** = ``false`` +:ref:`bool<class_bool>` **display/window/per_pixel_transparency/allowed** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` If ``true``, allows per-pixel transparency for the window background. This affects performance, so leave it on ``false`` unless you need it. See also :ref:`display/window/size/transparent<class_ProjectSettings_property_display/window/size/transparent>` and :ref:`rendering/viewport/transparent_background<class_ProjectSettings_property_rendering/viewport/transparent_background>`. @@ -3519,7 +3996,7 @@ If ``true``, allows per-pixel transparency for the window background. This affec .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/always_on_top** = ``false`` +:ref:`bool<class_bool>` **display/window/size/always_on_top** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/size/always_on_top>` Forces the main window to be always on top. @@ -3533,7 +4010,7 @@ Forces the main window to be always on top. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/borderless** = ``false`` +:ref:`bool<class_bool>` **display/window/size/borderless** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/size/borderless>` Forces the main window to be borderless. @@ -3547,7 +4024,7 @@ Forces the main window to be borderless. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/extend_to_title** = ``false`` +:ref:`bool<class_bool>` **display/window/size/extend_to_title** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/size/extend_to_title>` Main window content is expanded to the full size of the window. Unlike a borderless window, the frame is left intact and can be used to resize the window, and the title bar is transparent, but has minimize/maximize/close buttons. @@ -3561,10 +4038,12 @@ Main window content is expanded to the full size of the window. Unlike a borderl .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **display/window/size/initial_position** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **display/window/size/initial_position** = ``Vector2i(0, 0)`` :ref:`🔗<class_ProjectSettings_property_display/window/size/initial_position>` Main window initial position (in virtual desktop coordinates), this setting is used only if :ref:`display/window/size/initial_position_type<class_ProjectSettings_property_display/window/size/initial_position_type>` is set to "Absolute" (``0``). +\ **Note:** This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of :ref:`EditorSettings.run/window_placement/rect_custom_position<class_EditorSettings_property_run/window_placement/rect_custom_position>` is used instead. + .. rst-class:: classref-item-separator ---- @@ -3573,7 +4052,7 @@ Main window initial position (in virtual desktop coordinates), this setting is u .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/initial_position_type** = ``1`` +:ref:`int<class_int>` **display/window/size/initial_position_type** = ``1`` :ref:`🔗<class_ProjectSettings_property_display/window/size/initial_position_type>` Main window initial position. @@ -3583,6 +4062,8 @@ Main window initial position. \ ``2`` - "Other Screen Center", :ref:`display/window/size/initial_screen<class_ProjectSettings_property_display/window/size/initial_screen>` is used to set the screen. +\ **Note:** This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of :ref:`EditorSettings.run/window_placement/rect<class_EditorSettings_property_run/window_placement/rect>` is used instead. + .. rst-class:: classref-item-separator ---- @@ -3591,10 +4072,12 @@ Main window initial position. .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/initial_screen** = ``0`` +:ref:`int<class_int>` **display/window/size/initial_screen** = ``0`` :ref:`🔗<class_ProjectSettings_property_display/window/size/initial_screen>` Main window initial screen, this setting is used only if :ref:`display/window/size/initial_position_type<class_ProjectSettings_property_display/window/size/initial_position_type>` is set to "Other Screen Center" (``2``). +\ **Note:** This setting only affects the exported project, or when the project is run from the command line. In the editor, the value of :ref:`EditorSettings.run/window_placement/screen<class_EditorSettings_property_run/window_placement/screen>` is used instead. + .. rst-class:: classref-item-separator ---- @@ -3603,7 +4086,7 @@ Main window initial screen, this setting is used only if :ref:`display/window/si .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/mode** = ``0`` +:ref:`int<class_int>` **display/window/size/mode** = ``0`` :ref:`🔗<class_ProjectSettings_property_display/window/size/mode>` Main window mode. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possible values and how each mode behaves. @@ -3615,7 +4098,7 @@ Main window mode. See :ref:`WindowMode<enum_DisplayServer_WindowMode>` for possi .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/no_focus** = ``false`` +:ref:`bool<class_bool>` **display/window/size/no_focus** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/size/no_focus>` Main window can't be focused. No-focus window will ignore all input, except mouse clicks. @@ -3627,9 +4110,13 @@ Main window can't be focused. No-focus window will ignore all input, except mous .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/resizable** = ``true`` +:ref:`bool<class_bool>` **display/window/size/resizable** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/size/resizable>` -Allows the window to be resizable by default. +If ``true``, allows the window to be resizable by default. + +\ **Note:** This property is only read when the project starts. To change whether the window is resizable at runtime, set :ref:`Window.unresizable<class_Window_property_unresizable>` instead on the root Window, which can be retrieved using ``get_viewport().get_window()``. :ref:`Window.unresizable<class_Window_property_unresizable>` takes the opposite value of this setting. + +\ **Note:** Certain window managers can be configured to ignore the non-resizable status of a window. Do not rely on this setting as a guarantee that the window will *never* be resizable. \ **Note:** This setting is ignored on iOS. @@ -3641,7 +4128,7 @@ Allows the window to be resizable by default. .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/size/transparent** = ``false`` +:ref:`bool<class_bool>` **display/window/size/transparent** = ``false`` :ref:`🔗<class_ProjectSettings_property_display/window/size/transparent>` If ``true``, enables a window manager hint that the main window background *can* be transparent. This does not make the background actually transparent. For the background to be transparent, the root viewport must also be made transparent by enabling :ref:`rendering/viewport/transparent_background<class_ProjectSettings_property_rendering/viewport/transparent_background>`. @@ -3657,7 +4144,7 @@ If ``true``, enables a window manager hint that the main window background *can* .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/viewport_height** = ``648`` +:ref:`int<class_int>` **display/window/size/viewport_height** = ``648`` :ref:`🔗<class_ProjectSettings_property_display/window/size/viewport_height>` Sets the game's main viewport height. On desktop platforms, this is also the initial window height, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the ``canvas_items`` or ``viewport`` stretch modes. See also :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>`, :ref:`display/window/size/window_width_override<class_ProjectSettings_property_display/window/size/window_width_override>` and :ref:`display/window/size/window_height_override<class_ProjectSettings_property_display/window/size/window_height_override>`. @@ -3669,7 +4156,7 @@ Sets the game's main viewport height. On desktop platforms, this is also the ini .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/viewport_width** = ``1152`` +:ref:`int<class_int>` **display/window/size/viewport_width** = ``1152`` :ref:`🔗<class_ProjectSettings_property_display/window/size/viewport_width>` Sets the game's main viewport width. On desktop platforms, this is also the initial window width, represented by an indigo-colored rectangle in the 2D editor. Stretch mode settings also use this as a reference when using the ``canvas_items`` or ``viewport`` stretch modes. See also :ref:`display/window/size/viewport_height<class_ProjectSettings_property_display/window/size/viewport_height>`, :ref:`display/window/size/window_width_override<class_ProjectSettings_property_display/window/size/window_width_override>` and :ref:`display/window/size/window_height_override<class_ProjectSettings_property_display/window/size/window_height_override>`. @@ -3681,7 +4168,7 @@ Sets the game's main viewport width. On desktop platforms, this is also the init .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/window_height_override** = ``0`` +:ref:`int<class_int>` **display/window/size/window_height_override** = ``0`` :ref:`🔗<class_ProjectSettings_property_display/window/size/window_height_override>` On desktop platforms, overrides the game's initial window height. See also :ref:`display/window/size/window_width_override<class_ProjectSettings_property_display/window/size/window_width_override>`, :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>` and :ref:`display/window/size/viewport_height<class_ProjectSettings_property_display/window/size/viewport_height>`. @@ -3695,11 +4182,11 @@ On desktop platforms, overrides the game's initial window height. See also :ref: .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/size/window_width_override** = ``0`` +:ref:`int<class_int>` **display/window/size/window_width_override** = ``0`` :ref:`🔗<class_ProjectSettings_property_display/window/size/window_width_override>` On desktop platforms, overrides the game's initial window width. See also :ref:`display/window/size/window_height_override<class_ProjectSettings_property_display/window/size/window_height_override>`, :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>` and :ref:`display/window/size/viewport_height<class_ProjectSettings_property_display/window/size/viewport_height>`. -\ **Note:** By default, or when set to ``0``, the initial window width is the viewport :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>`. This setting is ignored on iOS, Android, and Web. +\ **Note:** By default, or when set to ``0``, the initial window width is the :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>`. This setting is ignored on iOS, Android, and Web. .. rst-class:: classref-item-separator @@ -3709,7 +4196,7 @@ On desktop platforms, overrides the game's initial window width. See also :ref:` .. rst-class:: classref-property -:ref:`String<class_String>` **display/window/stretch/aspect** = ``"keep"`` +:ref:`String<class_String>` **display/window/stretch/aspect** = ``"keep"`` :ref:`🔗<class_ProjectSettings_property_display/window/stretch/aspect>` .. container:: contribute @@ -3723,15 +4210,15 @@ On desktop platforms, overrides the game's initial window width. See also :ref:` .. rst-class:: classref-property -:ref:`String<class_String>` **display/window/stretch/mode** = ``"disabled"`` +:ref:`String<class_String>` **display/window/stretch/mode** = ``"disabled"`` :ref:`🔗<class_ProjectSettings_property_display/window/stretch/mode>` Defines how the base size is stretched to fit the resolution of the window or screen. \ **"disabled"**: No stretching happens. One unit in the scene corresponds to one pixel on the screen. In this mode, :ref:`display/window/stretch/aspect<class_ProjectSettings_property_display/window/stretch/aspect>` has no effect. Recommended for non-game applications. -\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect<class_ProjectSettings_property_display/window/stretch/aspect>` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art aesthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). +\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect<class_ProjectSettings_property_display/window/stretch/aspect>` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art esthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). -\ **"viewport"**: The size of the root :ref:`Viewport<class_Viewport>` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect<class_ProjectSettings_property_display/window/stretch/aspect>` into account). Recommended for games that use a pixel art aesthetic. +\ **"viewport"**: The size of the root :ref:`Viewport<class_Viewport>` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect<class_ProjectSettings_property_display/window/stretch/aspect>` into account). Recommended for games that use a pixel art esthetic. .. rst-class:: classref-item-separator @@ -3741,11 +4228,27 @@ Defines how the base size is stretched to fit the resolution of the window or sc .. rst-class:: classref-property -:ref:`float<class_float>` **display/window/stretch/scale** = ``1.0`` +:ref:`float<class_float>` **display/window/stretch/scale** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_display/window/stretch/scale>` -.. container:: contribute +The scale factor multiplier to use for 2D elements. This multiplies the final scale factor determined by :ref:`display/window/stretch/mode<class_ProjectSettings_property_display/window/stretch/mode>`. If using the **Disabled** stretch mode, this scale factor is applied as-is. This can be adjusted to make the UI easier to read on certain displays. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/stretch/scale_mode: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **display/window/stretch/scale_mode** = ``"fractional"`` :ref:`🔗<class_ProjectSettings_property_display/window/stretch/scale_mode>` + +The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`display/window/stretch/scale<class_ProjectSettings_property_display/window/stretch/scale>` is applied, in addition to the automatic scale factor determined by :ref:`display/window/stretch/mode<class_ProjectSettings_property_display/window/stretch/mode>`. + +\ **"fractional"**: The scale factor will not be modified. + +\ **"integer"**: The scale factor will be floored to an integer value, which means that the screen size will always be an integer multiple of the base viewport size. This provides a crisp pixel art appearance. + +\ **Note:** When using integer scaling with a stretch mode, resizing the window to be smaller than the base viewport size will clip the contents. Consider preventing that by setting :ref:`Window.min_size<class_Window_property_min_size>` to the same value as the base viewport size defined in :ref:`display/window/size/viewport_width<class_ProjectSettings_property_display/window/size/viewport_width>` and :ref:`display/window/size/viewport_height<class_ProjectSettings_property_display/window/size/viewport_height>`. .. rst-class:: classref-item-separator @@ -3755,7 +4258,7 @@ Defines how the base size is stretched to fit the resolution of the window or sc .. rst-class:: classref-property -:ref:`bool<class_bool>` **display/window/subwindows/embed_subwindows** = ``true`` +:ref:`bool<class_bool>` **display/window/subwindows/embed_subwindows** = ``true`` :ref:`🔗<class_ProjectSettings_property_display/window/subwindows/embed_subwindows>` If ``true`` subwindows are embedded in the main window. @@ -3767,15 +4270,17 @@ If ``true`` subwindows are embedded in the main window. .. rst-class:: classref-property -:ref:`int<class_int>` **display/window/vsync/vsync_mode** = ``1`` +:ref:`int<class_int>` **display/window/vsync/vsync_mode** = ``1`` :ref:`🔗<class_ProjectSettings_property_display/window/vsync/vsync_mode>` -Sets the V-Sync mode for the main game window. +Sets the V-Sync mode for the main game window. The editor's own V-Sync mode can be set using :ref:`EditorSettings.interface/editor/vsync_mode<class_EditorSettings_property_interface/editor/vsync_mode>`. See :ref:`VSyncMode<enum_DisplayServer_VSyncMode>` for possible values and how they affect the behavior of your application. -Depending on the platform and used renderer, the engine will fall back to **Enabled** if the desired mode is not supported. +Depending on the platform and rendering method, the engine will fall back to **Enabled** if the desired mode is not supported. -\ **Note:** V-Sync modes other than **Enabled** are only supported in the Forward+ and Mobile rendering methods, not Compatibility. +V-Sync can be disabled on the command line using the ``--disable-vsync`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. + +\ **Note:** The **Adaptive** and **Mailbox** V-Sync modes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. \ **Note:** This property is only read when the project starts. To change the V-Sync mode at runtime, call :ref:`DisplayServer.window_set_vsync_mode<class_DisplayServer_method_window_set_vsync_mode>` instead. @@ -3787,7 +4292,7 @@ Depending on the platform and used renderer, the engine will fall back to **Enab .. rst-class:: classref-property -:ref:`String<class_String>` **dotnet/project/assembly_name** = ``""`` +:ref:`String<class_String>` **dotnet/project/assembly_name** = ``""`` :ref:`🔗<class_ProjectSettings_property_dotnet/project/assembly_name>` Name of the .NET assembly. This name is used as the name of the ``.csproj`` and ``.sln`` files. By default, it's set to the name of the project (:ref:`application/config/name<class_ProjectSettings_property_application/config/name>`) allowing to change it in the future without affecting the .NET assembly. @@ -3799,9 +4304,9 @@ Name of the .NET assembly. This name is used as the name of the ``.csproj`` and .. rst-class:: classref-property -:ref:`int<class_int>` **dotnet/project/assembly_reload_attempts** = ``3`` +:ref:`int<class_int>` **dotnet/project/assembly_reload_attempts** = ``3`` :ref:`🔗<class_ProjectSettings_property_dotnet/project/assembly_reload_attempts>` -Number of times to attempt assembly reloading after rebuilding .NET assembies. Effectively also the timeout in seconds to wait for unloading of script assemblies to finish. +Number of times to attempt assembly reloading after rebuilding .NET assemblies. Effectively also the timeout in seconds to wait for unloading of script assemblies to finish. .. rst-class:: classref-item-separator @@ -3811,7 +4316,7 @@ Number of times to attempt assembly reloading after rebuilding .NET assembies. E .. rst-class:: classref-property -:ref:`String<class_String>` **dotnet/project/solution_directory** = ``""`` +:ref:`String<class_String>` **dotnet/project/solution_directory** = ``""`` :ref:`🔗<class_ProjectSettings_property_dotnet/project/solution_directory>` Directory that contains the ``.sln`` file. By default, the ``.sln`` files is in the root of the project directory, next to the ``project.godot`` and ``.csproj`` files. @@ -3825,7 +4330,7 @@ Changing this value allows setting up a multi-project scenario where there are m .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/export/convert_text_resources_to_binary** = ``true`` +:ref:`bool<class_bool>` **editor/export/convert_text_resources_to_binary** = ``true`` :ref:`🔗<class_ProjectSettings_property_editor/export/convert_text_resources_to_binary>` If ``true``, text resources are converted to a binary format on export. This decreases file sizes and speeds up loading slightly. @@ -3835,11 +4340,23 @@ If ``true``, text resources are converted to a binary format on export. This dec ---- +.. _class_ProjectSettings_property_editor/import/atlas_max_width: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **editor/import/atlas_max_width** = ``2048`` :ref:`🔗<class_ProjectSettings_property_editor/import/atlas_max_width>` + +The maximum width to use when importing textures as an atlas. The value will be rounded to the nearest power of two when used. Use this to prevent imported textures from growing too large in the other direction. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_editor/import/reimport_missing_imported_files: .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/import/reimport_missing_imported_files** = ``true`` +:ref:`bool<class_bool>` **editor/import/reimport_missing_imported_files** = ``true`` :ref:`🔗<class_ProjectSettings_property_editor/import/reimport_missing_imported_files>` .. container:: contribute @@ -3853,7 +4370,7 @@ If ``true``, text resources are converted to a binary format on export. This dec .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/import/use_multiple_threads** = ``true`` +:ref:`bool<class_bool>` **editor/import/use_multiple_threads** = ``true`` :ref:`🔗<class_ProjectSettings_property_editor/import/use_multiple_threads>` If ``true`` importing of resources is run on multiple threads. @@ -3865,7 +4382,7 @@ If ``true`` importing of resources is run on multiple threads. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/movie_writer/disable_vsync** = ``false`` +:ref:`bool<class_bool>` **editor/movie_writer/disable_vsync** = ``false`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/disable_vsync>` If ``true``, requests V-Sync to be disabled when writing a movie (similar to setting :ref:`display/window/vsync/vsync_mode<class_ProjectSettings_property_display/window/vsync/vsync_mode>` to **Disabled**). This can speed up video writing if the hardware is fast enough to render, encode and save the video at a framerate higher than the monitor's refresh rate. @@ -3879,7 +4396,7 @@ If ``true``, requests V-Sync to be disabled when writing a movie (similar to set .. rst-class:: classref-property -:ref:`int<class_int>` **editor/movie_writer/fps** = ``60`` +:ref:`int<class_int>` **editor/movie_writer/fps** = ``60`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/fps>` The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher :ref:`editor/movie_writer/fps<class_ProjectSettings_property_editor/movie_writer/fps>` values. Certain FPS values will require you to adjust :ref:`editor/movie_writer/mix_rate<class_ProjectSettings_property_editor/movie_writer/mix_rate>` to prevent audio from desynchronizing over time. @@ -3893,7 +4410,7 @@ This can be specified manually on the command line using the ``--fixed-fps <fps> .. rst-class:: classref-property -:ref:`int<class_int>` **editor/movie_writer/mix_rate** = ``48000`` +:ref:`int<class_int>` **editor/movie_writer/mix_rate** = ``48000`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/mix_rate>` The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from :ref:`audio/driver/mix_rate<class_ProjectSettings_property_audio/driver/mix_rate>`, but this value must be divisible by :ref:`editor/movie_writer/fps<class_ProjectSettings_property_editor/movie_writer/fps>` to prevent audio from desynchronizing over time. @@ -3905,7 +4422,7 @@ The audio mix rate to use in the recorded audio when writing a movie (in Hz). Th .. rst-class:: classref-property -:ref:`float<class_float>` **editor/movie_writer/mjpeg_quality** = ``0.75`` +:ref:`float<class_float>` **editor/movie_writer/mjpeg_quality** = ``0.75`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/mjpeg_quality>` The JPEG quality to use when writing a video to an AVI file, between ``0.01`` and ``1.0`` (inclusive). Higher ``quality`` values result in better-looking output at the cost of larger file sizes. Recommended ``quality`` values are between ``0.75`` and ``0.9``. Even at quality ``1.0``, JPEG compression remains lossy. @@ -3919,7 +4436,7 @@ The JPEG quality to use when writing a video to an AVI file, between ``0.01`` an .. rst-class:: classref-property -:ref:`String<class_String>` **editor/movie_writer/movie_file** = ``""`` +:ref:`String<class_String>` **editor/movie_writer/movie_file** = ``""`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/movie_file>` The output path for the movie. The file extension determines the :ref:`MovieWriter<class_MovieWriter>` that will be used. @@ -3941,7 +4458,7 @@ When using PNG output, the frame number will be appended at the end of the file .. rst-class:: classref-property -:ref:`int<class_int>` **editor/movie_writer/speaker_mode** = ``0`` +:ref:`int<class_int>` **editor/movie_writer/speaker_mode** = ``0`` :ref:`🔗<class_ProjectSettings_property_editor/movie_writer/speaker_mode>` The speaker mode to use in the recorded audio when writing a movie. See :ref:`SpeakerMode<enum_AudioServer_SpeakerMode>` for possible values. @@ -3953,7 +4470,7 @@ The speaker mode to use in the recorded audio when writing a movie. See :ref:`Sp .. rst-class:: classref-property -:ref:`String<class_String>` **editor/naming/default_signal_callback_name** = ``"_on_{node_name}_{signal_name}"`` +:ref:`String<class_String>` **editor/naming/default_signal_callback_name** = ``"_on_{node_name}_{signal_name}"`` :ref:`🔗<class_ProjectSettings_property_editor/naming/default_signal_callback_name>` The format of the default signal callback name (in the Signal Connection Dialog). The following substitutions are available: ``{NodeName}``, ``{nodeName}``, ``{node_name}``, ``{SignalName}``, ``{signalName}``, and ``{signal_name}``. @@ -3965,7 +4482,7 @@ The format of the default signal callback name (in the Signal Connection Dialog) .. rst-class:: classref-property -:ref:`String<class_String>` **editor/naming/default_signal_callback_to_self_name** = ``"_on_{signal_name}"`` +:ref:`String<class_String>` **editor/naming/default_signal_callback_to_self_name** = ``"_on_{signal_name}"`` :ref:`🔗<class_ProjectSettings_property_editor/naming/default_signal_callback_to_self_name>` The format of the default signal callback name when a signal connects to the same node that emits it (in the Signal Connection Dialog). The following substitutions are available: ``{NodeName}``, ``{nodeName}``, ``{node_name}``, ``{SignalName}``, ``{signalName}``, and ``{signal_name}``. @@ -3977,9 +4494,9 @@ The format of the default signal callback name when a signal connects to the sam .. rst-class:: classref-property -:ref:`int<class_int>` **editor/naming/node_name_casing** = ``0`` +:ref:`int<class_int>` **editor/naming/node_name_casing** = ``0`` :ref:`🔗<class_ProjectSettings_property_editor/naming/node_name_casing>` -When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. +When creating node names automatically, set the type of casing to use in this project. This is mostly an editor setting. .. rst-class:: classref-item-separator @@ -3989,7 +4506,7 @@ When creating node names automatically, set the type of casing in this project. .. rst-class:: classref-property -:ref:`int<class_int>` **editor/naming/node_name_num_separator** = ``0`` +:ref:`int<class_int>` **editor/naming/node_name_num_separator** = ``0`` :ref:`🔗<class_ProjectSettings_property_editor/naming/node_name_num_separator>` What to use to separate node name from number. This is mostly an editor setting. @@ -4001,9 +4518,21 @@ What to use to separate node name from number. This is mostly an editor setting. .. rst-class:: classref-property -:ref:`int<class_int>` **editor/naming/scene_name_casing** = ``2`` +:ref:`int<class_int>` **editor/naming/scene_name_casing** = ``2`` :ref:`🔗<class_ProjectSettings_property_editor/naming/scene_name_casing>` -When generating file names from scene root node, set the type of casing in this project. This is mostly an editor setting. +When generating scene file names from scene root node, set the type of casing to use in this project. This is mostly an editor setting. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_editor/naming/script_name_casing: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **editor/naming/script_name_casing** = ``0`` :ref:`🔗<class_ProjectSettings_property_editor/naming/script_name_casing>` + +When generating script file names from the selected node, set the type of casing to use in this project. This is mostly an editor setting. .. rst-class:: classref-item-separator @@ -4013,15 +4542,15 @@ When generating file names from scene root node, set the type of casing in this .. rst-class:: classref-property -:ref:`String<class_String>` **editor/run/main_run_args** = ``""`` +:ref:`String<class_String>` **editor/run/main_run_args** = ``""`` :ref:`🔗<class_ProjectSettings_property_editor/run/main_run_args>` The command-line arguments to append to Godot's own command line when running the project. This doesn't affect the editor itself. It is possible to make another executable run Godot by using the ``%command%`` placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed *before* the placeholder, whereas Godot-specific arguments should be placed *after* the placeholder. -For example, this can be used to force the project to run on the dedicated GPU in a NVIDIA Optimus system on Linux: +For example, this can be used to force the project to run on the dedicated GPU in an NVIDIA Optimus system on Linux: -:: +.. code:: text prime-run %command% @@ -4033,10 +4562,12 @@ For example, this can be used to force the project to run on the dedicated GPU i .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **editor/script/search_in_file_extensions** = ``PackedStringArray("gd", "gdshader")`` +:ref:`PackedStringArray<class_PackedStringArray>` **editor/script/search_in_file_extensions** = ``PackedStringArray("gd", "gdshader")`` :ref:`🔗<class_ProjectSettings_property_editor/script/search_in_file_extensions>` Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. ``tscn`` if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -4045,7 +4576,7 @@ Text-based file extensions to include in the script editor's "Find in Files" fea .. rst-class:: classref-property -:ref:`String<class_String>` **editor/script/templates_search_path** = ``"res://script_templates"`` +:ref:`String<class_String>` **editor/script/templates_search_path** = ``"res://script_templates"`` :ref:`🔗<class_ProjectSettings_property_editor/script/templates_search_path>` Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path. @@ -4057,7 +4588,7 @@ Search path for project-specific script templates. Godot will search for script .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/version_control/autoload_on_startup** = ``false`` +:ref:`bool<class_bool>` **editor/version_control/autoload_on_startup** = ``false`` :ref:`🔗<class_ProjectSettings_property_editor/version_control/autoload_on_startup>` .. container:: contribute @@ -4071,7 +4602,7 @@ Search path for project-specific script templates. Godot will search for script .. rst-class:: classref-property -:ref:`String<class_String>` **editor/version_control/plugin_name** = ``""`` +:ref:`String<class_String>` **editor/version_control/plugin_name** = ``""`` :ref:`🔗<class_ProjectSettings_property_editor/version_control/plugin_name>` .. container:: contribute @@ -4085,11 +4616,11 @@ Search path for project-specific script templates. Godot will search for script .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/blender/enabled** = ``true`` +:ref:`bool<class_bool>` **filesystem/import/blender/enabled** = ``true`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/blender/enabled>` If ``true``, Blender 3D scene files with the ``.blend`` extension will be imported by converting them to glTF 2.0. -This requires configuring a path to a Blender executable in the editor settings at ``filesystem/import/blender/blender3_path``. Blender 3.0 or later is required. +This requires configuring a path to a Blender executable in the editor settings at ``filesystem/import/blender/blender_path``. Blender 3.0 or later is required. .. rst-class:: classref-item-separator @@ -4099,7 +4630,7 @@ This requires configuring a path to a Blender executable in the editor settings .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/blender/enabled.android** = ``false`` +:ref:`bool<class_bool>` **filesystem/import/blender/enabled.android** = ``false`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/blender/enabled.android>` Override for :ref:`filesystem/import/blender/enabled<class_ProjectSettings_property_filesystem/import/blender/enabled>` on Android where Blender can't easily be accessed from Godot. @@ -4111,7 +4642,7 @@ Override for :ref:`filesystem/import/blender/enabled<class_ProjectSettings_prope .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/blender/enabled.web** = ``false`` +:ref:`bool<class_bool>` **filesystem/import/blender/enabled.web** = ``false`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/blender/enabled.web>` Override for :ref:`filesystem/import/blender/enabled<class_ProjectSettings_property_filesystem/import/blender/enabled>` on the Web where Blender can't easily be accessed from Godot. @@ -4119,39 +4650,39 @@ Override for :ref:`filesystem/import/blender/enabled<class_ProjectSettings_prope ---- -.. _class_ProjectSettings_property_filesystem/import/fbx/enabled: +.. _class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/fbx/enabled** = ``true`` +:ref:`bool<class_bool>` **filesystem/import/fbx2gltf/enabled** = ``true`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>` If ``true``, Autodesk FBX 3D scene files with the ``.fbx`` extension will be imported by converting them to glTF 2.0. -This requires configuring a path to a FBX2glTF executable in the editor settings at ``filesystem/import/fbx/fbx2gltf_path``. +This requires configuring a path to an FBX2glTF executable in the editor settings at :ref:`EditorSettings.filesystem/import/fbx/fbx2gltf_path<class_EditorSettings_property_filesystem/import/fbx/fbx2gltf_path>`. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_filesystem/import/fbx/enabled.android: +.. _class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.android: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/fbx/enabled.android** = ``false`` +:ref:`bool<class_bool>` **filesystem/import/fbx2gltf/enabled.android** = ``false`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.android>` -Override for :ref:`filesystem/import/fbx/enabled<class_ProjectSettings_property_filesystem/import/fbx/enabled>` on Android where FBX2glTF can't easily be accessed from Godot. +Override for :ref:`filesystem/import/fbx2gltf/enabled<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>` on Android where FBX2glTF can't easily be accessed from Godot. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_filesystem/import/fbx/enabled.web: +.. _class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.web: .. rst-class:: classref-property -:ref:`bool<class_bool>` **filesystem/import/fbx/enabled.web** = ``false`` +:ref:`bool<class_bool>` **filesystem/import/fbx2gltf/enabled.web** = ``false`` :ref:`🔗<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled.web>` -Override for :ref:`filesystem/import/fbx/enabled<class_ProjectSettings_property_filesystem/import/fbx/enabled>` on the Web where FBX2glTF can't easily be accessed from Godot. +Override for :ref:`filesystem/import/fbx2gltf/enabled<class_ProjectSettings_property_filesystem/import/fbx2gltf/enabled>` on the Web where FBX2glTF can't easily be accessed from Godot. .. rst-class:: classref-item-separator @@ -4161,7 +4692,7 @@ Override for :ref:`filesystem/import/fbx/enabled<class_ProjectSettings_property_ .. rst-class:: classref-property -:ref:`int<class_int>` **gui/common/default_scroll_deadzone** = ``0`` +:ref:`int<class_int>` **gui/common/default_scroll_deadzone** = ``0`` :ref:`🔗<class_ProjectSettings_property_gui/common/default_scroll_deadzone>` Default value for :ref:`ScrollContainer.scroll_deadzone<class_ScrollContainer_property_scroll_deadzone>`, which will be used for all :ref:`ScrollContainer<class_ScrollContainer>`\ s unless overridden. @@ -4173,7 +4704,7 @@ Default value for :ref:`ScrollContainer.scroll_deadzone<class_ScrollContainer_pr .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui/common/snap_controls_to_pixels** = ``true`` +:ref:`bool<class_bool>` **gui/common/snap_controls_to_pixels** = ``true`` :ref:`🔗<class_ProjectSettings_property_gui/common/snap_controls_to_pixels>` If ``true``, snaps :ref:`Control<class_Control>` node vertices to the nearest pixel to ensure they remain crisp even when the camera moves or zooms. @@ -4185,9 +4716,9 @@ If ``true``, snaps :ref:`Control<class_Control>` node vertices to the nearest pi .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui/common/swap_cancel_ok** +:ref:`bool<class_bool>` **gui/common/swap_cancel_ok** :ref:`🔗<class_ProjectSettings_property_gui/common/swap_cancel_ok>` -If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows and UWP to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>` can be used to query whether buttons are swapped at run-time. +If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok<class_DisplayServer_method_get_swap_cancel_ok>` can be used to query whether buttons are swapped at run-time. \ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`DisplayServer.dialog_show<class_DisplayServer_method_dialog_show>`. @@ -4199,7 +4730,7 @@ If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows and UWP t .. rst-class:: classref-property -:ref:`int<class_int>` **gui/common/text_edit_undo_stack_max_size** = ``1024`` +:ref:`int<class_int>` **gui/common/text_edit_undo_stack_max_size** = ``1024`` :ref:`🔗<class_ProjectSettings_property_gui/common/text_edit_undo_stack_max_size>` Maximum undo/redo history size for :ref:`TextEdit<class_TextEdit>` fields. @@ -4211,7 +4742,7 @@ Maximum undo/redo history size for :ref:`TextEdit<class_TextEdit>` fields. .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` +:ref:`bool<class_bool>` **gui/fonts/dynamic_fonts/use_oversampling** = ``true`` :ref:`🔗<class_ProjectSettings_property_gui/fonts/dynamic_fonts/use_oversampling>` .. container:: contribute @@ -4225,7 +4756,7 @@ Maximum undo/redo history size for :ref:`TextEdit<class_TextEdit>` fields. .. rst-class:: classref-property -:ref:`String<class_String>` **gui/theme/custom** = ``""`` +:ref:`String<class_String>` **gui/theme/custom** = ``""`` :ref:`🔗<class_ProjectSettings_property_gui/theme/custom>` Path to a custom :ref:`Theme<class_Theme>` resource file to use for the project (``.theme`` or generic ``.tres``/``.res`` extension). @@ -4237,7 +4768,7 @@ Path to a custom :ref:`Theme<class_Theme>` resource file to use for the project .. rst-class:: classref-property -:ref:`String<class_String>` **gui/theme/custom_font** = ``""`` +:ref:`String<class_String>` **gui/theme/custom_font** = ``""`` :ref:`🔗<class_ProjectSettings_property_gui/theme/custom_font>` Path to a custom :ref:`Font<class_Font>` resource to use as default for all GUI elements of the project. @@ -4249,9 +4780,11 @@ Path to a custom :ref:`Font<class_Font>` resource to use as default for all GUI .. rst-class:: classref-property -:ref:`int<class_int>` **gui/theme/default_font_antialiasing** = ``1`` +:ref:`int<class_int>` **gui/theme/default_font_antialiasing** = ``1`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_font_antialiasing>` + +Font anti-aliasing mode for the default project font. See :ref:`FontFile.antialiasing<class_FontFile_property_antialiasing>`. -Font anti-aliasing mode. See :ref:`FontFile.antialiasing<class_FontFile_property_antialiasing>`. +\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.antialiasing<class_ResourceImporterDynamicFont_property_antialiasing>`). .. rst-class:: classref-item-separator @@ -4261,13 +4794,13 @@ Font anti-aliasing mode. See :ref:`FontFile.antialiasing<class_FontFile_property .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui/theme/default_font_generate_mipmaps** = ``false`` +:ref:`bool<class_bool>` **gui/theme/default_font_generate_mipmaps** = ``false`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_font_generate_mipmaps>` If set to ``true``, the default font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control<class_Control>` is scaled down, or when a :ref:`Label3D<class_Label3D>` is viewed from a long distance (if :ref:`Label3D.texture_filter<class_Label3D_property_texture_filter>` is set to a mode that displays mipmaps). Enabling :ref:`gui/theme/default_font_generate_mipmaps<class_ProjectSettings_property_gui/theme/default_font_generate_mipmaps>` increases font generation time and memory usage. Only enable this setting if you actually need it. -\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. +\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.generate_mipmaps<class_ResourceImporterDynamicFont_property_generate_mipmaps>`). .. rst-class:: classref-item-separator @@ -4277,9 +4810,11 @@ Enabling :ref:`gui/theme/default_font_generate_mipmaps<class_ProjectSettings_pro .. rst-class:: classref-property -:ref:`int<class_int>` **gui/theme/default_font_hinting** = ``1`` +:ref:`int<class_int>` **gui/theme/default_font_hinting** = ``1`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_font_hinting>` -Default font hinting mode. See :ref:`FontFile.hinting<class_FontFile_property_hinting>`. +Font hinting mode for the default project font. See :ref:`FontFile.hinting<class_FontFile_property_hinting>`. + +\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.hinting<class_ResourceImporterDynamicFont_property_hinting>`). .. rst-class:: classref-item-separator @@ -4289,13 +4824,13 @@ Default font hinting mode. See :ref:`FontFile.hinting<class_FontFile_property_hi .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui/theme/default_font_multichannel_signed_distance_field** = ``false`` +:ref:`bool<class_bool>` **gui/theme/default_font_multichannel_signed_distance_field** = ``false`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_font_multichannel_signed_distance_field>` If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control<class_Control>`\ s that are scaled down (or for :ref:`Label3D<class_Label3D>`\ s viewed from a long distance). MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_mipmaps<class_ProjectSettings_property_gui/theme/default_font_generate_mipmaps>` to further improve font rendering quality when scaled down. -\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. +\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.multichannel_signed_distance_field<class_ResourceImporterDynamicFont_property_multichannel_signed_distance_field>`). .. rst-class:: classref-item-separator @@ -4305,9 +4840,11 @@ MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_m .. rst-class:: classref-property -:ref:`int<class_int>` **gui/theme/default_font_subpixel_positioning** = ``1`` +:ref:`int<class_int>` **gui/theme/default_font_subpixel_positioning** = ``1`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_font_subpixel_positioning>` + +Font glyph subpixel positioning mode for the default project font. See :ref:`FontFile.subpixel_positioning<class_FontFile_property_subpixel_positioning>`. -Default font glyph subpixel positioning mode. See :ref:`FontFile.subpixel_positioning<class_FontFile_property_subpixel_positioning>`. +\ **Note:** This setting does not affect custom :ref:`Font<class_Font>`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.subpixel_positioning<class_ResourceImporterDynamicFont_property_subpixel_positioning>`). .. rst-class:: classref-item-separator @@ -4317,7 +4854,7 @@ Default font glyph subpixel positioning mode. See :ref:`FontFile.subpixel_positi .. rst-class:: classref-property -:ref:`float<class_float>` **gui/theme/default_theme_scale** = ``1.0`` +:ref:`float<class_float>` **gui/theme/default_theme_scale** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_gui/theme/default_theme_scale>` The default scale factor for :ref:`Control<class_Control>`\ s, when not overridden by a :ref:`Theme<class_Theme>`. @@ -4331,7 +4868,7 @@ The default scale factor for :ref:`Control<class_Control>`\ s, when not overridd .. rst-class:: classref-property -:ref:`int<class_int>` **gui/theme/lcd_subpixel_layout** = ``1`` +:ref:`int<class_int>` **gui/theme/lcd_subpixel_layout** = ``1`` :ref:`🔗<class_ProjectSettings_property_gui/theme/lcd_subpixel_layout>` LCD subpixel layout used for font anti-aliasing. See :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>`. @@ -4343,7 +4880,7 @@ LCD subpixel layout used for font anti-aliasing. See :ref:`FontLCDSubpixelLayout .. rst-class:: classref-property -:ref:`float<class_float>` **gui/timers/button_shortcut_feedback_highlight_time** = ``0.2`` +:ref:`float<class_float>` **gui/timers/button_shortcut_feedback_highlight_time** = ``0.2`` :ref:`🔗<class_ProjectSettings_property_gui/timers/button_shortcut_feedback_highlight_time>` When :ref:`BaseButton.shortcut_feedback<class_BaseButton_property_shortcut_feedback>` is enabled, this is the time the :ref:`BaseButton<class_BaseButton>` will remain highlighted after a shortcut. @@ -4355,7 +4892,7 @@ When :ref:`BaseButton.shortcut_feedback<class_BaseButton_property_shortcut_feedb .. rst-class:: classref-property -:ref:`int<class_int>` **gui/timers/incremental_search_max_interval_msec** = ``2000`` +:ref:`int<class_int>` **gui/timers/incremental_search_max_interval_msec** = ``2000`` :ref:`🔗<class_ProjectSettings_property_gui/timers/incremental_search_max_interval_msec>` Timer setting for incremental search in :ref:`Tree<class_Tree>`, :ref:`ItemList<class_ItemList>`, etc. controls (in milliseconds). @@ -4367,7 +4904,7 @@ Timer setting for incremental search in :ref:`Tree<class_Tree>`, :ref:`ItemList< .. rst-class:: classref-property -:ref:`float<class_float>` **gui/timers/text_edit_idle_detect_sec** = ``3`` +:ref:`float<class_float>` **gui/timers/text_edit_idle_detect_sec** = ``3`` :ref:`🔗<class_ProjectSettings_property_gui/timers/text_edit_idle_detect_sec>` Timer for detecting idle in :ref:`TextEdit<class_TextEdit>` (in seconds). @@ -4379,7 +4916,7 @@ Timer for detecting idle in :ref:`TextEdit<class_TextEdit>` (in seconds). .. rst-class:: classref-property -:ref:`float<class_float>` **gui/timers/tooltip_delay_sec** = ``0.5`` +:ref:`float<class_float>` **gui/timers/tooltip_delay_sec** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_gui/timers/tooltip_delay_sec>` Default delay for tooltips (in seconds). @@ -4387,11 +4924,23 @@ Default delay for tooltips (in seconds). ---- +.. _class_ProjectSettings_property_gui/timers/tooltip_delay_sec.editor_hint: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **gui/timers/tooltip_delay_sec.editor_hint** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_gui/timers/tooltip_delay_sec.editor_hint>` + +Delay for tooltips in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input/ui_accept: .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_accept** +:ref:`Dictionary<class_Dictionary>` **input/ui_accept** :ref:`🔗<class_ProjectSettings_property_input/ui_accept>` Default :ref:`InputEventAction<class_InputEventAction>` to confirm a focused button, menu or list item, or validate input. @@ -4405,7 +4954,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to confirm a focused but .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_cancel** +:ref:`Dictionary<class_Dictionary>` **input/ui_cancel** :ref:`🔗<class_ProjectSettings_property_input/ui_cancel>` Default :ref:`InputEventAction<class_InputEventAction>` to discard a modal or pending input. @@ -4419,7 +4968,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to discard a modal or pe .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_copy** +:ref:`Dictionary<class_Dictionary>` **input/ui_copy** :ref:`🔗<class_ProjectSettings_property_input/ui_copy>` Default :ref:`InputEventAction<class_InputEventAction>` to copy a selection to the clipboard. @@ -4433,7 +4982,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to copy a selection to t .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_cut** +:ref:`Dictionary<class_Dictionary>` **input/ui_cut** :ref:`🔗<class_ProjectSettings_property_input/ui_cut>` Default :ref:`InputEventAction<class_InputEventAction>` to cut a selection to the clipboard. @@ -4447,7 +4996,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to cut a selection to th .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_down** +:ref:`Dictionary<class_Dictionary>` **input/ui_down** :ref:`🔗<class_ProjectSettings_property_input/ui_down>` Default :ref:`InputEventAction<class_InputEventAction>` to move down in the UI. @@ -4461,7 +5010,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move down in the UI. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_end** +:ref:`Dictionary<class_Dictionary>` **input/ui_end** :ref:`🔗<class_ProjectSettings_property_input/ui_end>` Default :ref:`InputEventAction<class_InputEventAction>` to go to the end position of a :ref:`Control<class_Control>` (e.g. last item in an :ref:`ItemList<class_ItemList>` or a :ref:`Tree<class_Tree>`), matching the behavior of :ref:`@GlobalScope.KEY_END<class_@GlobalScope_constant_KEY_END>` on typical desktop UI systems. @@ -4475,7 +5024,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to go to the end positio .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_refresh** +:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_refresh** :ref:`🔗<class_ProjectSettings_property_input/ui_filedialog_refresh>` Default :ref:`InputEventAction<class_InputEventAction>` to refresh the contents of the current directory of a :ref:`FileDialog<class_FileDialog>`. @@ -4489,7 +5038,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to refresh the contents .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_show_hidden** +:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_show_hidden** :ref:`🔗<class_ProjectSettings_property_input/ui_filedialog_show_hidden>` Default :ref:`InputEventAction<class_InputEventAction>` to toggle showing hidden files and directories in a :ref:`FileDialog<class_FileDialog>`. @@ -4503,7 +5052,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to toggle showing hidden .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_up_one_level** +:ref:`Dictionary<class_Dictionary>` **input/ui_filedialog_up_one_level** :ref:`🔗<class_ProjectSettings_property_input/ui_filedialog_up_one_level>` Default :ref:`InputEventAction<class_InputEventAction>` to go up one directory in a :ref:`FileDialog<class_FileDialog>`. @@ -4517,7 +5066,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to go up one directory i .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_focus_next** +:ref:`Dictionary<class_Dictionary>` **input/ui_focus_next** :ref:`🔗<class_ProjectSettings_property_input/ui_focus_next>` Default :ref:`InputEventAction<class_InputEventAction>` to focus the next :ref:`Control<class_Control>` in the scene. The focus behavior can be configured via :ref:`Control.focus_next<class_Control_property_focus_next>`. @@ -4531,7 +5080,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to focus the next :ref:` .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_focus_prev** +:ref:`Dictionary<class_Dictionary>` **input/ui_focus_prev** :ref:`🔗<class_ProjectSettings_property_input/ui_focus_prev>` Default :ref:`InputEventAction<class_InputEventAction>` to focus the previous :ref:`Control<class_Control>` in the scene. The focus behavior can be configured via :ref:`Control.focus_previous<class_Control_property_focus_previous>`. @@ -4545,7 +5094,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to focus the previous :r .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_graph_delete** +:ref:`Dictionary<class_Dictionary>` **input/ui_graph_delete** :ref:`🔗<class_ProjectSettings_property_input/ui_graph_delete>` Default :ref:`InputEventAction<class_InputEventAction>` to delete a :ref:`GraphNode<class_GraphNode>` in a :ref:`GraphEdit<class_GraphEdit>`. @@ -4559,7 +5108,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete a :ref:`GraphN .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_graph_duplicate** +:ref:`Dictionary<class_Dictionary>` **input/ui_graph_duplicate** :ref:`🔗<class_ProjectSettings_property_input/ui_graph_duplicate>` Default :ref:`InputEventAction<class_InputEventAction>` to duplicate a :ref:`GraphNode<class_GraphNode>` in a :ref:`GraphEdit<class_GraphEdit>`. @@ -4573,7 +5122,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to duplicate a :ref:`Gra .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_home** +:ref:`Dictionary<class_Dictionary>` **input/ui_home** :ref:`🔗<class_ProjectSettings_property_input/ui_home>` Default :ref:`InputEventAction<class_InputEventAction>` to go to the start position of a :ref:`Control<class_Control>` (e.g. first item in an :ref:`ItemList<class_ItemList>` or a :ref:`Tree<class_Tree>`), matching the behavior of :ref:`@GlobalScope.KEY_HOME<class_@GlobalScope_constant_KEY_HOME>` on typical desktop UI systems. @@ -4587,7 +5136,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to go to the start posit .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_left** +:ref:`Dictionary<class_Dictionary>` **input/ui_left** :ref:`🔗<class_ProjectSettings_property_input/ui_left>` Default :ref:`InputEventAction<class_InputEventAction>` to move left in the UI. @@ -4601,7 +5150,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move left in the UI. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_menu** +:ref:`Dictionary<class_Dictionary>` **input/ui_menu** :ref:`🔗<class_ProjectSettings_property_input/ui_menu>` Default :ref:`InputEventAction<class_InputEventAction>` to open a context menu in a text field. @@ -4615,7 +5164,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to open a context menu i .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_page_down** +:ref:`Dictionary<class_Dictionary>` **input/ui_page_down** :ref:`🔗<class_ProjectSettings_property_input/ui_page_down>` Default :ref:`InputEventAction<class_InputEventAction>` to go down a page in a :ref:`Control<class_Control>` (e.g. in an :ref:`ItemList<class_ItemList>` or a :ref:`Tree<class_Tree>`), matching the behavior of :ref:`@GlobalScope.KEY_PAGEDOWN<class_@GlobalScope_constant_KEY_PAGEDOWN>` on typical desktop UI systems. @@ -4629,7 +5178,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to go down a page in a : .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_page_up** +:ref:`Dictionary<class_Dictionary>` **input/ui_page_up** :ref:`🔗<class_ProjectSettings_property_input/ui_page_up>` Default :ref:`InputEventAction<class_InputEventAction>` to go up a page in a :ref:`Control<class_Control>` (e.g. in an :ref:`ItemList<class_ItemList>` or a :ref:`Tree<class_Tree>`), matching the behavior of :ref:`@GlobalScope.KEY_PAGEUP<class_@GlobalScope_constant_KEY_PAGEUP>` on typical desktop UI systems. @@ -4643,7 +5192,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to go up a page in a :re .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_paste** +:ref:`Dictionary<class_Dictionary>` **input/ui_paste** :ref:`🔗<class_ProjectSettings_property_input/ui_paste>` Default :ref:`InputEventAction<class_InputEventAction>` to paste from the clipboard. @@ -4657,7 +5206,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to paste from the clipbo .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_redo** +:ref:`Dictionary<class_Dictionary>` **input/ui_redo** :ref:`🔗<class_ProjectSettings_property_input/ui_redo>` Default :ref:`InputEventAction<class_InputEventAction>` to redo an undone action. @@ -4671,7 +5220,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to redo an undone action .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_right** +:ref:`Dictionary<class_Dictionary>` **input/ui_right** :ref:`🔗<class_ProjectSettings_property_input/ui_right>` Default :ref:`InputEventAction<class_InputEventAction>` to move right in the UI. @@ -4685,7 +5234,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move right in the UI. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_select** +:ref:`Dictionary<class_Dictionary>` **input/ui_select** :ref:`🔗<class_ProjectSettings_property_input/ui_select>` Default :ref:`InputEventAction<class_InputEventAction>` to select an item in a :ref:`Control<class_Control>` (e.g. in an :ref:`ItemList<class_ItemList>` or a :ref:`Tree<class_Tree>`). @@ -4699,9 +5248,9 @@ Default :ref:`InputEventAction<class_InputEventAction>` to select an item in a : .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_swap_input_direction** +:ref:`Dictionary<class_Dictionary>` **input/ui_swap_input_direction** :ref:`🔗<class_ProjectSettings_property_input/ui_swap_input_direction>` -Default :ref:`InputEventAction<class_InputEventAction>` to swap input direction, i.e. change between left-to-right to right-to-left modes. Affects text-editting controls (:ref:`LineEdit<class_LineEdit>`, :ref:`TextEdit<class_TextEdit>`). +Default :ref:`InputEventAction<class_InputEventAction>` to swap input direction, i.e. change between left-to-right to right-to-left modes. Affects text-editing controls (:ref:`LineEdit<class_LineEdit>`, :ref:`TextEdit<class_TextEdit>`). .. rst-class:: classref-item-separator @@ -4711,7 +5260,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to swap input direction, .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_add_selection_for_next_occurrence** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_add_selection_for_next_occurrence** :ref:`🔗<class_ProjectSettings_property_input/ui_text_add_selection_for_next_occurrence>` If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret and selects the next occurrence. @@ -4731,7 +5280,7 @@ The viewport is adjusted to the latest newly added caret. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace** :ref:`🔗<class_ProjectSettings_property_input/ui_text_backspace>` Default :ref:`InputEventAction<class_InputEventAction>` to delete the character before the text cursor. @@ -4745,7 +5294,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete the character .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_all_to_left** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_all_to_left** :ref:`🔗<class_ProjectSettings_property_input/ui_text_backspace_all_to_left>` Default :ref:`InputEventAction<class_InputEventAction>` to delete **all** text before the text cursor. @@ -4759,7 +5308,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete **all** text b .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_all_to_left.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_all_to_left.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_backspace_all_to_left.macos>` macOS specific override for the shortcut to delete all text before the text cursor. @@ -4771,7 +5320,7 @@ macOS specific override for the shortcut to delete all text before the text curs .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_word** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_word** :ref:`🔗<class_ProjectSettings_property_input/ui_text_backspace_word>` Default :ref:`InputEventAction<class_InputEventAction>` to delete all characters before the cursor up until a whitespace or punctuation character. @@ -4785,7 +5334,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete all characters .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_word.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_backspace_word.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_backspace_word.macos>` macOS specific override for the shortcut to delete a word. @@ -4797,7 +5346,7 @@ macOS specific override for the shortcut to delete a word. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_above** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_above** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_add_above>` Default :ref:`InputEventAction<class_InputEventAction>` to add an additional caret above every caret of a text. @@ -4809,7 +5358,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to add an additional car .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_above.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_above.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_add_above.macos>` macOS specific override for the shortcut to add a caret above every caret. @@ -4821,7 +5370,7 @@ macOS specific override for the shortcut to add a caret above every caret. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_below** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_below** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_add_below>` Default :ref:`InputEventAction<class_InputEventAction>` to add an additional caret below every caret of a text. @@ -4833,7 +5382,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to add an additional car .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_below.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_add_below.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_add_below.macos>` macOS specific override for the shortcut to add a caret below every caret. @@ -4845,7 +5394,7 @@ macOS specific override for the shortcut to add a caret below every caret. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_end** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_end** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_document_end>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor to the end of the text. @@ -4859,7 +5408,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_end.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_end.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_document_end.macos>` macOS specific override for the shortcut to move the text cursor to the end of the text. @@ -4871,7 +5420,7 @@ macOS specific override for the shortcut to move the text cursor to the end of t .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_start** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_start** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_document_start>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor to the start of the text. @@ -4885,7 +5434,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_start.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_document_start.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_document_start.macos>` macOS specific override for the shortcut to move the text cursor to the start of the text. @@ -4897,7 +5446,7 @@ macOS specific override for the shortcut to move the text cursor to the start of .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_down** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_down** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_down>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor down. @@ -4911,7 +5460,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_left** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_left** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_left>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor left. @@ -4925,7 +5474,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_end** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_end** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_line_end>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor to the end of the line. @@ -4939,7 +5488,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_end.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_end.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_line_end.macos>` macOS specific override for the shortcut to move the text cursor to the end of the line. @@ -4951,7 +5500,7 @@ macOS specific override for the shortcut to move the text cursor to the end of t .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_start** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_start** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_line_start>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor to the start of the line. @@ -4965,7 +5514,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_start.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_line_start.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_line_start.macos>` macOS specific override for the shortcut to move the text cursor to the start of the line. @@ -4977,7 +5526,7 @@ macOS specific override for the shortcut to move the text cursor to the start of .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_page_down** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_page_down** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_page_down>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor down one page. @@ -4991,7 +5540,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_page_up** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_page_up** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_page_up>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor up one page. @@ -5005,7 +5554,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_right** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_right** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_right>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor right. @@ -5019,7 +5568,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_up** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_up** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_up>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor up. @@ -5033,7 +5582,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_left** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_left** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_word_left>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor left to the next whitespace or punctuation. @@ -5047,7 +5596,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_left.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_left.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_word_left.macos>` macOS specific override for the shortcut to move the text cursor back one word. @@ -5059,7 +5608,7 @@ macOS specific override for the shortcut to move the text cursor back one word. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_right** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_right** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_word_right>` Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor right to the next whitespace or punctuation. @@ -5073,7 +5622,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move the text cursor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_right.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_caret_word_right.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_caret_word_right.macos>` macOS specific override for the shortcut to move the text cursor forward one word. @@ -5085,7 +5634,7 @@ macOS specific override for the shortcut to move the text cursor forward one wor .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_clear_carets_and_selection** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_clear_carets_and_selection** :ref:`🔗<class_ProjectSettings_property_input/ui_text_clear_carets_and_selection>` If there's only one caret active and with a selection, clears the selection. @@ -5101,9 +5650,9 @@ In case there's more than one caret active, removes the secondary carets and cle .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_accept** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_accept** :ref:`🔗<class_ProjectSettings_property_input/ui_text_completion_accept>` -Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompetion hint. +Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompletion hint. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control<class_Control>`\ s. The events assigned to the action can however be modified. @@ -5115,9 +5664,9 @@ Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompeti .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_query** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_query** :ref:`🔗<class_ProjectSettings_property_input/ui_text_completion_query>` -Default :ref:`InputEventAction<class_InputEventAction>` to request autocompetion. +Default :ref:`InputEventAction<class_InputEventAction>` to request autocompletion. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control<class_Control>`\ s. The events assigned to the action can however be modified. @@ -5129,9 +5678,9 @@ Default :ref:`InputEventAction<class_InputEventAction>` to request autocompetion .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_replace** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_completion_replace** :ref:`🔗<class_ProjectSettings_property_input/ui_text_completion_replace>` -Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompetion hint, replacing existing text. +Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompletion hint, replacing existing text. \ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control<class_Control>`\ s. The events assigned to the action can however be modified. @@ -5143,7 +5692,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to accept an autocompeti .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_dedent** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_dedent** :ref:`🔗<class_ProjectSettings_property_input/ui_text_dedent>` Default :ref:`InputEventAction<class_InputEventAction>` to unindent text. @@ -5157,7 +5706,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to unindent text. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete** :ref:`🔗<class_ProjectSettings_property_input/ui_text_delete>` Default :ref:`InputEventAction<class_InputEventAction>` to delete the character after the text cursor. @@ -5171,7 +5720,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete the character .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_all_to_right** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_all_to_right** :ref:`🔗<class_ProjectSettings_property_input/ui_text_delete_all_to_right>` Default :ref:`InputEventAction<class_InputEventAction>` to delete **all** text after the text cursor. @@ -5185,7 +5734,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete **all** text a .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_all_to_right.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_all_to_right.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_delete_all_to_right.macos>` macOS specific override for the shortcut to delete all text after the text cursor. @@ -5197,7 +5746,7 @@ macOS specific override for the shortcut to delete all text after the text curso .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_word** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_word** :ref:`🔗<class_ProjectSettings_property_input/ui_text_delete_word>` Default :ref:`InputEventAction<class_InputEventAction>` to delete all characters after the cursor up until a whitespace or punctuation character. @@ -5211,7 +5760,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to delete all characters .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_word.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_delete_word.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_delete_word.macos>` macOS specific override for the shortcut to delete a word after the text cursor. @@ -5223,7 +5772,7 @@ macOS specific override for the shortcut to delete a word after the text cursor. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_indent** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_indent** :ref:`🔗<class_ProjectSettings_property_input/ui_text_indent>` Default :ref:`InputEventAction<class_InputEventAction>` to indent the current line. @@ -5237,7 +5786,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to indent the current li .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline** :ref:`🔗<class_ProjectSettings_property_input/ui_text_newline>` Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line at the position of the text cursor. @@ -5251,7 +5800,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line at .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline_above** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline_above** :ref:`🔗<class_ProjectSettings_property_input/ui_text_newline_above>` Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line before the current one. @@ -5265,7 +5814,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line bef .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline_blank** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_newline_blank** :ref:`🔗<class_ProjectSettings_property_input/ui_text_newline_blank>` Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line after the current one. @@ -5279,7 +5828,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to insert a new line aft .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_down** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_down** :ref:`🔗<class_ProjectSettings_property_input/ui_text_scroll_down>` Default :ref:`InputEventAction<class_InputEventAction>` to scroll down one line of text. @@ -5293,7 +5842,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to scroll down one line .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_down.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_down.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_scroll_down.macos>` macOS specific override for the shortcut to scroll down one line. @@ -5305,7 +5854,7 @@ macOS specific override for the shortcut to scroll down one line. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_up** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_up** :ref:`🔗<class_ProjectSettings_property_input/ui_text_scroll_up>` Default :ref:`InputEventAction<class_InputEventAction>` to scroll up one line of text. @@ -5319,7 +5868,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to scroll up one line of .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_up.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_scroll_up.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_scroll_up.macos>` macOS specific override for the shortcut to scroll up one line. @@ -5331,7 +5880,7 @@ macOS specific override for the shortcut to scroll up one line. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_all** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_all** :ref:`🔗<class_ProjectSettings_property_input/ui_text_select_all>` Default :ref:`InputEventAction<class_InputEventAction>` to select all text. @@ -5345,7 +5894,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to select all text. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_word_under_caret** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_word_under_caret** :ref:`🔗<class_ProjectSettings_property_input/ui_text_select_word_under_caret>` If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection. @@ -5359,7 +5908,7 @@ If no selection is currently active, selects the word currently under the caret .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_word_under_caret.macos** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_select_word_under_caret.macos** :ref:`🔗<class_ProjectSettings_property_input/ui_text_select_word_under_caret.macos>` macOS specific override for the shortcut to select the word currently under the caret. @@ -5367,11 +5916,29 @@ macOS specific override for the shortcut to select the word currently under the ---- +.. _class_ProjectSettings_property_input/ui_text_skip_selection_for_next_occurrence: + +.. rst-class:: classref-property + +:ref:`Dictionary<class_Dictionary>` **input/ui_text_skip_selection_for_next_occurrence** :ref:`🔗<class_ProjectSettings_property_input/ui_text_skip_selection_for_next_occurrence>` + +If no selection is currently active with the last caret in text fields, searches for the next occurrence of the the word currently under the caret and moves the caret to the next occurrence. The action can be performed sequentially for other occurrences of the word under the last caret. + +If a selection is currently active with the last caret in text fields, searches for the next occurrence of the selection, adds a caret, selects the next occurrence then deselects the previous selection and its associated caret. The action can be performed sequentially for other occurrences of the selection of the last caret. + +The viewport is adjusted to the latest newly added caret. + +\ **Note:** Default ``ui_*`` actions cannot be removed as they are necessary for the internal logic of several :ref:`Control<class_Control>`\ s. The events assigned to the action can however be modified. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input/ui_text_submit: .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_submit** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_submit** :ref:`🔗<class_ProjectSettings_property_input/ui_text_submit>` Default :ref:`InputEventAction<class_InputEventAction>` to submit a text field. @@ -5385,7 +5952,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to submit a text field. .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_text_toggle_insert_mode** +:ref:`Dictionary<class_Dictionary>` **input/ui_text_toggle_insert_mode** :ref:`🔗<class_ProjectSettings_property_input/ui_text_toggle_insert_mode>` Default :ref:`InputEventAction<class_InputEventAction>` to toggle *insert mode* in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line. @@ -5399,7 +5966,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to toggle *insert mode* .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_undo** +:ref:`Dictionary<class_Dictionary>` **input/ui_undo** :ref:`🔗<class_ProjectSettings_property_input/ui_undo>` Default :ref:`InputEventAction<class_InputEventAction>` to undo the most recent action. @@ -5413,7 +5980,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to undo the most recent .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **input/ui_up** +:ref:`Dictionary<class_Dictionary>` **input/ui_up** :ref:`🔗<class_ProjectSettings_property_input/ui_up>` Default :ref:`InputEventAction<class_InputEventAction>` to move up in the UI. @@ -5427,7 +5994,7 @@ Default :ref:`InputEventAction<class_InputEventAction>` to move up in the UI. .. rst-class:: classref-property -:ref:`bool<class_bool>` **input_devices/buffering/agile_event_flushing** = ``false`` +:ref:`bool<class_bool>` **input_devices/buffering/agile_event_flushing** = ``false`` :ref:`🔗<class_ProjectSettings_property_input_devices/buffering/agile_event_flushing>` If ``true``, key/touch/joystick events will be flushed just before every idle and physics frame. @@ -5445,7 +6012,7 @@ Enabling this can greatly improve the responsiveness to input, specially in devi .. rst-class:: classref-property -:ref:`bool<class_bool>` **input_devices/compatibility/legacy_just_pressed_behavior** = ``false`` +:ref:`bool<class_bool>` **input_devices/compatibility/legacy_just_pressed_behavior** = ``false`` :ref:`🔗<class_ProjectSettings_property_input_devices/compatibility/legacy_just_pressed_behavior>` If ``true``, :ref:`Input.is_action_just_pressed<class_Input_method_is_action_just_pressed>` and :ref:`Input.is_action_just_released<class_Input_method_is_action_just_released>` will only return ``true`` if the action is still in the respective state, i.e. an action that is pressed *and* released on the same frame will be missed. @@ -5461,7 +6028,7 @@ If ``false``, no input will be lost. .. rst-class:: classref-property -:ref:`String<class_String>` **input_devices/pen_tablet/driver** +:ref:`String<class_String>` **input_devices/pen_tablet/driver** :ref:`🔗<class_ProjectSettings_property_input_devices/pen_tablet/driver>` Specifies the tablet driver to use. If left empty, the default driver will be used. @@ -5475,7 +6042,7 @@ Specifies the tablet driver to use. If left empty, the default driver will be us .. rst-class:: classref-property -:ref:`String<class_String>` **input_devices/pen_tablet/driver.windows** +:ref:`String<class_String>` **input_devices/pen_tablet/driver.windows** :ref:`🔗<class_ProjectSettings_property_input_devices/pen_tablet/driver.windows>` Override for :ref:`input_devices/pen_tablet/driver<class_ProjectSettings_property_input_devices/pen_tablet/driver>` on Windows. @@ -5483,11 +6050,47 @@ Override for :ref:`input_devices/pen_tablet/driver<class_ProjectSettings_propert ---- +.. _class_ProjectSettings_property_input_devices/pointing/android/enable_long_press_as_right_click: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **input_devices/pointing/android/enable_long_press_as_right_click** = ``false`` :ref:`🔗<class_ProjectSettings_property_input_devices/pointing/android/enable_long_press_as_right_click>` + +If ``true``, long press events on an Android touchscreen are transformed into right click events. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **input_devices/pointing/android/enable_pan_and_scale_gestures** = ``false`` :ref:`🔗<class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures>` + +If ``true``, multi-touch pan and scale gestures are enabled on Android devices. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/pointing/android/rotary_input_scroll_axis: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **input_devices/pointing/android/rotary_input_scroll_axis** = ``1`` :ref:`🔗<class_ProjectSettings_property_input_devices/pointing/android/rotary_input_scroll_axis>` + +On Wear OS devices, defines which axis of the mouse wheel rotary input is mapped to. This rotary input is usually performed by rotating the physical or virtual (touch-based) bezel on a smartwatch. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch: .. rst-class:: classref-property -:ref:`bool<class_bool>` **input_devices/pointing/emulate_mouse_from_touch** = ``true`` +:ref:`bool<class_bool>` **input_devices/pointing/emulate_mouse_from_touch** = ``true`` :ref:`🔗<class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch>` If ``true``, sends mouse input events when tapping or swiping on the touchscreen. @@ -5499,7 +6102,7 @@ If ``true``, sends mouse input events when tapping or swiping on the touchscreen .. rst-class:: classref-property -:ref:`bool<class_bool>` **input_devices/pointing/emulate_touch_from_mouse** = ``false`` +:ref:`bool<class_bool>` **input_devices/pointing/emulate_touch_from_mouse** = ``false`` :ref:`🔗<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` If ``true``, sends touch input events when clicking or dragging the mouse. @@ -5511,7 +6114,7 @@ If ``true``, sends touch input events when clicking or dragging the mouse. .. rst-class:: classref-property -:ref:`String<class_String>` **internationalization/locale/fallback** = ``"en"`` +:ref:`String<class_String>` **internationalization/locale/fallback** = ``"en"`` :ref:`🔗<class_ProjectSettings_property_internationalization/locale/fallback>` The locale to fall back to if a translation isn't available in a given language. If left empty, ``en`` (English) will be used. @@ -5523,7 +6126,7 @@ The locale to fall back to if a translation isn't available in a given language. .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/locale/include_text_server_data** = ``false`` +:ref:`bool<class_bool>` **internationalization/locale/include_text_server_data** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/locale/include_text_server_data>` If ``true``, text server break iteration rule sets, dictionaries and other optional data are included in the exported project. @@ -5539,7 +6142,7 @@ If ``true``, text server break iteration rule sets, dictionaries and other optio .. rst-class:: classref-property -:ref:`String<class_String>` **internationalization/locale/test** = ``""`` +:ref:`String<class_String>` **internationalization/locale/test** = ``""`` :ref:`🔗<class_ProjectSettings_property_internationalization/locale/test>` If non-empty, this locale will be used when running the project from the editor. @@ -5551,7 +6154,7 @@ If non-empty, this locale will be used when running the project from the editor. .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/double_vowels** = ``false`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/double_vowels** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/double_vowels>` Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. @@ -5563,7 +6166,7 @@ Double vowels in strings during pseudolocalization to simulate the lengthening o .. rst-class:: classref-property -:ref:`float<class_float>` **internationalization/pseudolocalization/expansion_ratio** = ``0.0`` +:ref:`float<class_float>` **internationalization/pseudolocalization/expansion_ratio** = ``0.0`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/expansion_ratio>` The expansion ratio to use during pseudolocalization. A value of ``0.3`` is sufficient for most practical purposes, and will increase the length of each string by 30%. @@ -5575,7 +6178,7 @@ The expansion ratio to use during pseudolocalization. A value of ``0.3`` is suff .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/fake_bidi** = ``false`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/fake_bidi** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/fake_bidi>` If ``true``, emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. @@ -5587,7 +6190,7 @@ If ``true``, emulate bidirectional (right-to-left) text when pseudolocalization .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/override** = ``false`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/override** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/override>` Replace all characters in the string with ``*``. Useful for finding non-localizable strings. @@ -5599,7 +6202,7 @@ Replace all characters in the string with ``*``. Useful for finding non-localiza .. rst-class:: classref-property -:ref:`String<class_String>` **internationalization/pseudolocalization/prefix** = ``"["`` +:ref:`String<class_String>` **internationalization/pseudolocalization/prefix** = ``"["`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/prefix>` Prefix that will be prepended to the pseudolocalized string. @@ -5611,7 +6214,7 @@ Prefix that will be prepended to the pseudolocalized string. .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/replace_with_accents** = ``true`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/replace_with_accents** = ``true`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/replace_with_accents>` Replace all characters with their accented variants during pseudolocalization. @@ -5623,7 +6226,7 @@ Replace all characters with their accented variants during pseudolocalization. .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/skip_placeholders** = ``true`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/skip_placeholders** = ``true`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/skip_placeholders>` Skip placeholders for string formatting like ``%s`` or ``%f`` during pseudolocalization. Useful to identify strings which need additional control characters to display correctly. @@ -5635,7 +6238,7 @@ Skip placeholders for string formatting like ``%s`` or ``%f`` during pseudolocal .. rst-class:: classref-property -:ref:`String<class_String>` **internationalization/pseudolocalization/suffix** = ``"]"`` +:ref:`String<class_String>` **internationalization/pseudolocalization/suffix** = ``"]"`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/suffix>` Suffix that will be appended to the pseudolocalized string. @@ -5647,7 +6250,7 @@ Suffix that will be appended to the pseudolocalized string. .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/pseudolocalization/use_pseudolocalization** = ``false`` +:ref:`bool<class_bool>` **internationalization/pseudolocalization/use_pseudolocalization** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/pseudolocalization/use_pseudolocalization>` If ``true``, enables pseudolocalization for the project. This can be used to spot untranslatable strings or layout issues that may occur once the project is localized to languages that have longer strings than the source language. @@ -5661,7 +6264,7 @@ If ``true``, enables pseudolocalization for the project. This can be used to spo .. rst-class:: classref-property -:ref:`bool<class_bool>` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` +:ref:`bool<class_bool>` **internationalization/rendering/force_right_to_left_layout_direction** = ``false`` :ref:`🔗<class_ProjectSettings_property_internationalization/rendering/force_right_to_left_layout_direction>` Force layout direction and text writing direction to RTL for all controls. @@ -5669,11 +6272,25 @@ Force layout direction and text writing direction to RTL for all controls. ---- +.. _class_ProjectSettings_property_internationalization/rendering/root_node_auto_translate: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **internationalization/rendering/root_node_auto_translate** = ``true`` :ref:`🔗<class_ProjectSettings_property_internationalization/rendering/root_node_auto_translate>` + +If ``true``, root node will use :ref:`Node.AUTO_TRANSLATE_MODE_ALWAYS<class_Node_constant_AUTO_TRANSLATE_MODE_ALWAYS>`, otherwise :ref:`Node.AUTO_TRANSLATE_MODE_DISABLED<class_Node_constant_AUTO_TRANSLATE_MODE_DISABLED>` will be used. + +\ **Note:** This property is only read when the project starts. To change the auto translate mode at runtime, set :ref:`Node.auto_translate_mode<class_Node_property_auto_translate_mode>` of :ref:`SceneTree.root<class_SceneTree_property_root>` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_internationalization/rendering/root_node_layout_direction: .. rst-class:: classref-property -:ref:`int<class_int>` **internationalization/rendering/root_node_layout_direction** = ``0`` +:ref:`int<class_int>` **internationalization/rendering/root_node_layout_direction** = ``0`` :ref:`🔗<class_ProjectSettings_property_internationalization/rendering/root_node_layout_direction>` Root node default layout direction. @@ -5685,11 +6302,11 @@ Root node default layout direction. .. rst-class:: classref-property -:ref:`String<class_String>` **internationalization/rendering/text_driver** = ``""`` +:ref:`String<class_String>` **internationalization/rendering/text_driver** = ``""`` :ref:`🔗<class_ProjectSettings_property_internationalization/rendering/text_driver>` Specifies the :ref:`TextServer<class_TextServer>` to use. If left empty, the default will be used. -"ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. +"ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc.). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. \ **Note:** The driver in use can be overridden at runtime via the ``--text-driver`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>`. @@ -5703,7 +6320,7 @@ Specifies the :ref:`TextServer<class_TextServer>` to use. If left empty, the def .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_1>` Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -5715,7 +6332,7 @@ Optional name for the 2D navigation layer 1. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_2>` Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". @@ -5727,7 +6344,7 @@ Optional name for the 2D navigation layer 2. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_3>` Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". @@ -5739,7 +6356,7 @@ Optional name for the 2D navigation layer 3. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_4>` Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". @@ -5751,7 +6368,7 @@ Optional name for the 2D navigation layer 4. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_5>` Optional name for the 2D navigation layer 5. If left empty, the layer will display as "Layer 5". @@ -5763,7 +6380,7 @@ Optional name for the 2D navigation layer 5. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_6>` Optional name for the 2D navigation layer 6. If left empty, the layer will display as "Layer 6". @@ -5775,7 +6392,7 @@ Optional name for the 2D navigation layer 6. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_7>` Optional name for the 2D navigation layer 7. If left empty, the layer will display as "Layer 7". @@ -5787,7 +6404,7 @@ Optional name for the 2D navigation layer 7. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_8>` Optional name for the 2D navigation layer 8. If left empty, the layer will display as "Layer 8". @@ -5799,7 +6416,7 @@ Optional name for the 2D navigation layer 8. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_9>` Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". @@ -5811,7 +6428,7 @@ Optional name for the 2D navigation layer 9. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_10>` Optional name for the 2D navigation layer 10. If left empty, the layer will display as "Layer 10". @@ -5823,7 +6440,7 @@ Optional name for the 2D navigation layer 10. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_11>` Optional name for the 2D navigation layer 11. If left empty, the layer will display as "Layer 11". @@ -5835,7 +6452,7 @@ Optional name for the 2D navigation layer 11. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_12>` Optional name for the 2D navigation layer 12. If left empty, the layer will display as "Layer 12". @@ -5847,7 +6464,7 @@ Optional name for the 2D navigation layer 12. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_13>` Optional name for the 2D navigation layer 13. If left empty, the layer will display as "Layer 13". @@ -5859,7 +6476,7 @@ Optional name for the 2D navigation layer 13. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_14>` Optional name for the 2D navigation layer 14. If left empty, the layer will display as "Layer 14". @@ -5871,7 +6488,7 @@ Optional name for the 2D navigation layer 14. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_15>` Optional name for the 2D navigation layer 15. If left empty, the layer will display as "Layer 15". @@ -5883,7 +6500,7 @@ Optional name for the 2D navigation layer 15. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_16>` Optional name for the 2D navigation layer 16. If left empty, the layer will display as "Layer 16". @@ -5895,7 +6512,7 @@ Optional name for the 2D navigation layer 16. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_17>` Optional name for the 2D navigation layer 17. If left empty, the layer will display as "Layer 17". @@ -5907,7 +6524,7 @@ Optional name for the 2D navigation layer 17. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_18>` Optional name for the 2D navigation layer 18. If left empty, the layer will display as "Layer 18". @@ -5919,7 +6536,7 @@ Optional name for the 2D navigation layer 18. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_19>` Optional name for the 2D navigation layer 19. If left empty, the layer will display as "Layer 19". @@ -5931,7 +6548,7 @@ Optional name for the 2D navigation layer 19. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_20>` Optional name for the 2D navigation layer 20. If left empty, the layer will display as "Layer 20". @@ -5943,7 +6560,7 @@ Optional name for the 2D navigation layer 20. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_21** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_21** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_21>` Optional name for the 2D navigation layer 21. If left empty, the layer will display as "Layer 21". @@ -5955,7 +6572,7 @@ Optional name for the 2D navigation layer 21. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_22** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_22** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_22>` Optional name for the 2D navigation layer 22. If left empty, the layer will display as "Layer 22". @@ -5967,7 +6584,7 @@ Optional name for the 2D navigation layer 22. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_23** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_23** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_23>` Optional name for the 2D navigation layer 23. If left empty, the layer will display as "Layer 23". @@ -5979,7 +6596,7 @@ Optional name for the 2D navigation layer 23. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_24** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_24** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_24>` Optional name for the 2D navigation layer 24. If left empty, the layer will display as "Layer 24". @@ -5991,7 +6608,7 @@ Optional name for the 2D navigation layer 24. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_25** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_25** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_25>` Optional name for the 2D navigation layer 25. If left empty, the layer will display as "Layer 25". @@ -6003,7 +6620,7 @@ Optional name for the 2D navigation layer 25. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_26** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_26** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_26>` Optional name for the 2D navigation layer 26. If left empty, the layer will display as "Layer 26". @@ -6015,7 +6632,7 @@ Optional name for the 2D navigation layer 26. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_27** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_27** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_27>` Optional name for the 2D navigation layer 27. If left empty, the layer will display as "Layer 27". @@ -6027,7 +6644,7 @@ Optional name for the 2D navigation layer 27. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_28** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_28** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_28>` Optional name for the 2D navigation layer 28. If left empty, the layer will display as "Layer 28". @@ -6039,7 +6656,7 @@ Optional name for the 2D navigation layer 28. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_29** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_29** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_29>` Optional name for the 2D navigation layer 29. If left empty, the layer will display as "Layer 29". @@ -6051,7 +6668,7 @@ Optional name for the 2D navigation layer 29. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_30** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_30** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_30>` Optional name for the 2D navigation layer 30. If left empty, the layer will display as "Layer 30". @@ -6063,7 +6680,7 @@ Optional name for the 2D navigation layer 30. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_31** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_31** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_31>` Optional name for the 2D navigation layer 31. If left empty, the layer will display as "Layer 31". @@ -6075,7 +6692,7 @@ Optional name for the 2D navigation layer 31. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_navigation/layer_32** = ``""`` +:ref:`String<class_String>` **layer_names/2d_navigation/layer_32** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_navigation/layer_32>` Optional name for the 2D navigation layer 32. If left empty, the layer will display as "Layer 32". @@ -6087,7 +6704,7 @@ Optional name for the 2D navigation layer 32. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_1>` Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". @@ -6099,7 +6716,7 @@ Optional name for the 2D physics layer 1. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_2>` Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". @@ -6111,7 +6728,7 @@ Optional name for the 2D physics layer 2. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_3>` Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". @@ -6123,7 +6740,7 @@ Optional name for the 2D physics layer 3. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_4>` Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". @@ -6135,7 +6752,7 @@ Optional name for the 2D physics layer 4. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_5>` Optional name for the 2D physics layer 5. If left empty, the layer will display as "Layer 5". @@ -6147,7 +6764,7 @@ Optional name for the 2D physics layer 5. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_6>` Optional name for the 2D physics layer 6. If left empty, the layer will display as "Layer 6". @@ -6159,7 +6776,7 @@ Optional name for the 2D physics layer 6. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_7>` Optional name for the 2D physics layer 7. If left empty, the layer will display as "Layer 7". @@ -6171,7 +6788,7 @@ Optional name for the 2D physics layer 7. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_8>` Optional name for the 2D physics layer 8. If left empty, the layer will display as "Layer 8". @@ -6183,7 +6800,7 @@ Optional name for the 2D physics layer 8. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_9>` Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". @@ -6195,7 +6812,7 @@ Optional name for the 2D physics layer 9. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_10>` Optional name for the 2D physics layer 10. If left empty, the layer will display as "Layer 10". @@ -6207,7 +6824,7 @@ Optional name for the 2D physics layer 10. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_11>` Optional name for the 2D physics layer 11. If left empty, the layer will display as "Layer 11". @@ -6219,7 +6836,7 @@ Optional name for the 2D physics layer 11. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_12>` Optional name for the 2D physics layer 12. If left empty, the layer will display as "Layer 12". @@ -6231,7 +6848,7 @@ Optional name for the 2D physics layer 12. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_13>` Optional name for the 2D physics layer 13. If left empty, the layer will display as "Layer 13". @@ -6243,7 +6860,7 @@ Optional name for the 2D physics layer 13. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_14>` Optional name for the 2D physics layer 14. If left empty, the layer will display as "Layer 14". @@ -6255,7 +6872,7 @@ Optional name for the 2D physics layer 14. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_15>` Optional name for the 2D physics layer 15. If left empty, the layer will display as "Layer 15". @@ -6267,7 +6884,7 @@ Optional name for the 2D physics layer 15. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_16>` Optional name for the 2D physics layer 16. If left empty, the layer will display as "Layer 16". @@ -6279,7 +6896,7 @@ Optional name for the 2D physics layer 16. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_17>` Optional name for the 2D physics layer 17. If left empty, the layer will display as "Layer 17". @@ -6291,7 +6908,7 @@ Optional name for the 2D physics layer 17. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_18>` Optional name for the 2D physics layer 18. If left empty, the layer will display as "Layer 18". @@ -6303,7 +6920,7 @@ Optional name for the 2D physics layer 18. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_19>` Optional name for the 2D physics layer 19. If left empty, the layer will display as "Layer 19". @@ -6315,7 +6932,7 @@ Optional name for the 2D physics layer 19. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_20>` Optional name for the 2D physics layer 20. If left empty, the layer will display as "Layer 20". @@ -6327,7 +6944,7 @@ Optional name for the 2D physics layer 20. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_21** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_21** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_21>` Optional name for the 2D physics layer 21. If left empty, the layer will display as "Layer 21". @@ -6339,7 +6956,7 @@ Optional name for the 2D physics layer 21. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_22** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_22** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_22>` Optional name for the 2D physics layer 22. If left empty, the layer will display as "Layer 22". @@ -6351,7 +6968,7 @@ Optional name for the 2D physics layer 22. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_23** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_23** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_23>` Optional name for the 2D physics layer 23. If left empty, the layer will display as "Layer 23". @@ -6363,7 +6980,7 @@ Optional name for the 2D physics layer 23. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_24** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_24** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_24>` Optional name for the 2D physics layer 24. If left empty, the layer will display as "Layer 24". @@ -6375,7 +6992,7 @@ Optional name for the 2D physics layer 24. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_25** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_25** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_25>` Optional name for the 2D physics layer 25. If left empty, the layer will display as "Layer 25". @@ -6387,7 +7004,7 @@ Optional name for the 2D physics layer 25. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_26** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_26** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_26>` Optional name for the 2D physics layer 26. If left empty, the layer will display as "Layer 26". @@ -6399,7 +7016,7 @@ Optional name for the 2D physics layer 26. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_27** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_27** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_27>` Optional name for the 2D physics layer 27. If left empty, the layer will display as "Layer 27". @@ -6411,7 +7028,7 @@ Optional name for the 2D physics layer 27. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_28** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_28** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_28>` Optional name for the 2D physics layer 28. If left empty, the layer will display as "Layer 28". @@ -6423,7 +7040,7 @@ Optional name for the 2D physics layer 28. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_29** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_29** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_29>` Optional name for the 2D physics layer 29. If left empty, the layer will display as "Layer 29". @@ -6435,7 +7052,7 @@ Optional name for the 2D physics layer 29. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_30** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_30** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_30>` Optional name for the 2D physics layer 30. If left empty, the layer will display as "Layer 30". @@ -6447,7 +7064,7 @@ Optional name for the 2D physics layer 30. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_31** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_31** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_31>` Optional name for the 2D physics layer 31. If left empty, the layer will display as "Layer 31". @@ -6459,7 +7076,7 @@ Optional name for the 2D physics layer 31. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_physics/layer_32** = ``""`` +:ref:`String<class_String>` **layer_names/2d_physics/layer_32** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_physics/layer_32>` Optional name for the 2D physics layer 32. If left empty, the layer will display as "Layer 32". @@ -6471,7 +7088,7 @@ Optional name for the 2D physics layer 32. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_1>` Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". @@ -6483,7 +7100,7 @@ Optional name for the 2D render layer 1. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_2>` Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". @@ -6495,7 +7112,7 @@ Optional name for the 2D render layer 2. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_3>` Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". @@ -6507,7 +7124,7 @@ Optional name for the 2D render layer 3. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_4>` Optional name for the 2D render layer 4. If left empty, the layer will display as "Layer 4". @@ -6519,7 +7136,7 @@ Optional name for the 2D render layer 4. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_5>` Optional name for the 2D render layer 5. If left empty, the layer will display as "Layer 5". @@ -6531,7 +7148,7 @@ Optional name for the 2D render layer 5. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_6>` Optional name for the 2D render layer 6. If left empty, the layer will display as "Layer 6". @@ -6543,7 +7160,7 @@ Optional name for the 2D render layer 6. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_7>` Optional name for the 2D render layer 7. If left empty, the layer will display as "Layer 7". @@ -6555,7 +7172,7 @@ Optional name for the 2D render layer 7. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_8>` Optional name for the 2D render layer 8. If left empty, the layer will display as "Layer 8". @@ -6567,7 +7184,7 @@ Optional name for the 2D render layer 8. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_9>` Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". @@ -6579,7 +7196,7 @@ Optional name for the 2D render layer 9. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_10>` Optional name for the 2D render layer 10. If left empty, the layer will display as "Layer 10". @@ -6591,7 +7208,7 @@ Optional name for the 2D render layer 10. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_11>` Optional name for the 2D render layer 11. If left empty, the layer will display as "Layer 11". @@ -6603,7 +7220,7 @@ Optional name for the 2D render layer 11. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_12>` Optional name for the 2D render layer 12. If left empty, the layer will display as "Layer 12". @@ -6615,7 +7232,7 @@ Optional name for the 2D render layer 12. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_13>` Optional name for the 2D render layer 13. If left empty, the layer will display as "Layer 13". @@ -6627,7 +7244,7 @@ Optional name for the 2D render layer 13. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_14>` Optional name for the 2D render layer 14. If left empty, the layer will display as "Layer 14". @@ -6639,7 +7256,7 @@ Optional name for the 2D render layer 14. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_15>` Optional name for the 2D render layer 15. If left empty, the layer will display as "Layer 15". @@ -6651,7 +7268,7 @@ Optional name for the 2D render layer 15. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_16>` Optional name for the 2D render layer 16. If left empty, the layer will display as "Layer 16". @@ -6663,7 +7280,7 @@ Optional name for the 2D render layer 16. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_17>` Optional name for the 2D render layer 17. If left empty, the layer will display as "Layer 17". @@ -6675,7 +7292,7 @@ Optional name for the 2D render layer 17. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_18>` Optional name for the 2D render layer 18. If left empty, the layer will display as "Layer 18". @@ -6687,7 +7304,7 @@ Optional name for the 2D render layer 18. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_19>` Optional name for the 2D render layer 19. If left empty, the layer will display as "Layer 19". @@ -6699,7 +7316,7 @@ Optional name for the 2D render layer 19. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/2d_render/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/2d_render/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/2d_render/layer_20>` Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". @@ -6711,7 +7328,7 @@ Optional name for the 2D render layer 20. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_1>` Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -6723,7 +7340,7 @@ Optional name for the 3D navigation layer 1. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_2>` Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". @@ -6735,7 +7352,7 @@ Optional name for the 3D navigation layer 2. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_3>` Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". @@ -6747,7 +7364,7 @@ Optional name for the 3D navigation layer 3. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_4>` Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". @@ -6759,7 +7376,7 @@ Optional name for the 3D navigation layer 4. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_5>` Optional name for the 3D navigation layer 5. If left empty, the layer will display as "Layer 5". @@ -6771,7 +7388,7 @@ Optional name for the 3D navigation layer 5. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_6>` Optional name for the 3D navigation layer 6. If left empty, the layer will display as "Layer 6". @@ -6783,7 +7400,7 @@ Optional name for the 3D navigation layer 6. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_7>` Optional name for the 3D navigation layer 7. If left empty, the layer will display as "Layer 7". @@ -6795,7 +7412,7 @@ Optional name for the 3D navigation layer 7. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_8>` Optional name for the 3D navigation layer 8. If left empty, the layer will display as "Layer 8". @@ -6807,7 +7424,7 @@ Optional name for the 3D navigation layer 8. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_9>` Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". @@ -6819,7 +7436,7 @@ Optional name for the 3D navigation layer 9. If left empty, the layer will displ .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_10>` Optional name for the 3D navigation layer 10. If left empty, the layer will display as "Layer 10". @@ -6831,7 +7448,7 @@ Optional name for the 3D navigation layer 10. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_11>` Optional name for the 3D navigation layer 11. If left empty, the layer will display as "Layer 11". @@ -6843,7 +7460,7 @@ Optional name for the 3D navigation layer 11. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_12>` Optional name for the 3D navigation layer 12. If left empty, the layer will display as "Layer 12". @@ -6855,7 +7472,7 @@ Optional name for the 3D navigation layer 12. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_13>` Optional name for the 3D navigation layer 13. If left empty, the layer will display as "Layer 13". @@ -6867,7 +7484,7 @@ Optional name for the 3D navigation layer 13. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_14>` Optional name for the 3D navigation layer 14. If left empty, the layer will display as "Layer 14". @@ -6879,7 +7496,7 @@ Optional name for the 3D navigation layer 14. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_15>` Optional name for the 3D navigation layer 15. If left empty, the layer will display as "Layer 15". @@ -6891,7 +7508,7 @@ Optional name for the 3D navigation layer 15. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_16>` Optional name for the 3D navigation layer 16. If left empty, the layer will display as "Layer 16". @@ -6903,7 +7520,7 @@ Optional name for the 3D navigation layer 16. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_17>` Optional name for the 3D navigation layer 17. If left empty, the layer will display as "Layer 17". @@ -6915,7 +7532,7 @@ Optional name for the 3D navigation layer 17. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_18>` Optional name for the 3D navigation layer 18. If left empty, the layer will display as "Layer 18". @@ -6927,7 +7544,7 @@ Optional name for the 3D navigation layer 18. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_19>` Optional name for the 3D navigation layer 19. If left empty, the layer will display as "Layer 19". @@ -6939,7 +7556,7 @@ Optional name for the 3D navigation layer 19. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_20>` Optional name for the 3D navigation layer 20. If left empty, the layer will display as "Layer 20". @@ -6951,7 +7568,7 @@ Optional name for the 3D navigation layer 20. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_21** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_21** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_21>` Optional name for the 3D navigation layer 21. If left empty, the layer will display as "Layer 21". @@ -6963,7 +7580,7 @@ Optional name for the 3D navigation layer 21. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_22** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_22** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_22>` Optional name for the 3D navigation layer 22. If left empty, the layer will display as "Layer 22". @@ -6975,7 +7592,7 @@ Optional name for the 3D navigation layer 22. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_23** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_23** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_23>` Optional name for the 3D navigation layer 23. If left empty, the layer will display as "Layer 23". @@ -6987,7 +7604,7 @@ Optional name for the 3D navigation layer 23. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_24** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_24** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_24>` Optional name for the 3D navigation layer 24. If left empty, the layer will display as "Layer 24". @@ -6999,7 +7616,7 @@ Optional name for the 3D navigation layer 24. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_25** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_25** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_25>` Optional name for the 3D navigation layer 25. If left empty, the layer will display as "Layer 25". @@ -7011,7 +7628,7 @@ Optional name for the 3D navigation layer 25. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_26** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_26** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_26>` Optional name for the 3D navigation layer 26. If left empty, the layer will display as "Layer 26". @@ -7023,7 +7640,7 @@ Optional name for the 3D navigation layer 26. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_27** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_27** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_27>` Optional name for the 3D navigation layer 27. If left empty, the layer will display as "Layer 27". @@ -7035,7 +7652,7 @@ Optional name for the 3D navigation layer 27. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_28** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_28** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_28>` Optional name for the 3D navigation layer 28. If left empty, the layer will display as "Layer 28". @@ -7047,7 +7664,7 @@ Optional name for the 3D navigation layer 28. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_29** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_29** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_29>` Optional name for the 3D navigation layer 29. If left empty, the layer will display as "Layer 29". @@ -7059,7 +7676,7 @@ Optional name for the 3D navigation layer 29. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_30** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_30** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_30>` Optional name for the 3D navigation layer 30. If left empty, the layer will display as "Layer 30". @@ -7071,7 +7688,7 @@ Optional name for the 3D navigation layer 30. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_31** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_31** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_31>` Optional name for the 3D navigation layer 31. If left empty, the layer will display as "Layer 31". @@ -7083,7 +7700,7 @@ Optional name for the 3D navigation layer 31. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_navigation/layer_32** = ``""`` +:ref:`String<class_String>` **layer_names/3d_navigation/layer_32** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_navigation/layer_32>` Optional name for the 3D navigation layer 32. If left empty, the layer will display as "Layer 32". @@ -7095,7 +7712,7 @@ Optional name for the 3D navigation layer 32. If left empty, the layer will disp .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_1>` Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". @@ -7107,7 +7724,7 @@ Optional name for the 3D physics layer 1. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_2>` Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". @@ -7119,7 +7736,7 @@ Optional name for the 3D physics layer 2. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_3>` Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". @@ -7131,7 +7748,7 @@ Optional name for the 3D physics layer 3. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_4>` Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". @@ -7143,7 +7760,7 @@ Optional name for the 3D physics layer 4. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_5>` Optional name for the 3D physics layer 5. If left empty, the layer will display as "Layer 5". @@ -7155,7 +7772,7 @@ Optional name for the 3D physics layer 5. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_6>` Optional name for the 3D physics layer 6. If left empty, the layer will display as "Layer 6". @@ -7167,7 +7784,7 @@ Optional name for the 3D physics layer 6. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_7>` Optional name for the 3D physics layer 7. If left empty, the layer will display as "Layer 7". @@ -7179,7 +7796,7 @@ Optional name for the 3D physics layer 7. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_8>` Optional name for the 3D physics layer 8. If left empty, the layer will display as "Layer 8". @@ -7191,7 +7808,7 @@ Optional name for the 3D physics layer 8. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_9>` Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". @@ -7203,7 +7820,7 @@ Optional name for the 3D physics layer 9. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_10>` Optional name for the 3D physics layer 10. If left empty, the layer will display as "Layer 10". @@ -7215,7 +7832,7 @@ Optional name for the 3D physics layer 10. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_11>` Optional name for the 3D physics layer 11. If left empty, the layer will display as "Layer 11". @@ -7227,7 +7844,7 @@ Optional name for the 3D physics layer 11. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_12>` Optional name for the 3D physics layer 12. If left empty, the layer will display as "Layer 12". @@ -7239,7 +7856,7 @@ Optional name for the 3D physics layer 12. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_13>` Optional name for the 3D physics layer 13. If left empty, the layer will display as "Layer 13". @@ -7251,7 +7868,7 @@ Optional name for the 3D physics layer 13. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_14>` Optional name for the 3D physics layer 14. If left empty, the layer will display as "Layer 14". @@ -7263,7 +7880,7 @@ Optional name for the 3D physics layer 14. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_15>` Optional name for the 3D physics layer 15. If left empty, the layer will display as "Layer 15". @@ -7275,7 +7892,7 @@ Optional name for the 3D physics layer 15. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_16>` Optional name for the 3D physics layer 16. If left empty, the layer will display as "Layer 16". @@ -7287,7 +7904,7 @@ Optional name for the 3D physics layer 16. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_17>` Optional name for the 3D physics layer 17. If left empty, the layer will display as "Layer 17". @@ -7299,7 +7916,7 @@ Optional name for the 3D physics layer 17. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_18>` Optional name for the 3D physics layer 18. If left empty, the layer will display as "Layer 18". @@ -7311,7 +7928,7 @@ Optional name for the 3D physics layer 18. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_19>` Optional name for the 3D physics layer 19. If left empty, the layer will display as "Layer 19". @@ -7323,7 +7940,7 @@ Optional name for the 3D physics layer 19. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_20>` Optional name for the 3D physics layer 20. If left empty, the layer will display as "Layer 20". @@ -7335,7 +7952,7 @@ Optional name for the 3D physics layer 20. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_21** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_21** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_21>` Optional name for the 3D physics layer 21. If left empty, the layer will display as "Layer 21". @@ -7347,7 +7964,7 @@ Optional name for the 3D physics layer 21. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_22** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_22** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_22>` Optional name for the 3D physics layer 22. If left empty, the layer will display as "Layer 22". @@ -7359,7 +7976,7 @@ Optional name for the 3D physics layer 22. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_23** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_23** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_23>` Optional name for the 3D physics layer 23. If left empty, the layer will display as "Layer 23". @@ -7371,7 +7988,7 @@ Optional name for the 3D physics layer 23. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_24** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_24** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_24>` Optional name for the 3D physics layer 24. If left empty, the layer will display as "Layer 24". @@ -7383,7 +8000,7 @@ Optional name for the 3D physics layer 24. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_25** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_25** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_25>` Optional name for the 3D physics layer 25. If left empty, the layer will display as "Layer 25". @@ -7395,7 +8012,7 @@ Optional name for the 3D physics layer 25. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_26** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_26** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_26>` Optional name for the 3D physics layer 26. If left empty, the layer will display as "Layer 26". @@ -7407,7 +8024,7 @@ Optional name for the 3D physics layer 26. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_27** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_27** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_27>` Optional name for the 3D physics layer 27. If left empty, the layer will display as "Layer 27". @@ -7419,7 +8036,7 @@ Optional name for the 3D physics layer 27. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_28** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_28** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_28>` Optional name for the 3D physics layer 28. If left empty, the layer will display as "Layer 28". @@ -7431,7 +8048,7 @@ Optional name for the 3D physics layer 28. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_29** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_29** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_29>` Optional name for the 3D physics layer 29. If left empty, the layer will display as "Layer 29". @@ -7443,7 +8060,7 @@ Optional name for the 3D physics layer 29. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_30** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_30** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_30>` Optional name for the 3D physics layer 30. If left empty, the layer will display as "Layer 30". @@ -7455,7 +8072,7 @@ Optional name for the 3D physics layer 30. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_31** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_31** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_31>` Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". @@ -7467,7 +8084,7 @@ Optional name for the 3D physics layer 31. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_physics/layer_32** = ``""`` +:ref:`String<class_String>` **layer_names/3d_physics/layer_32** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_physics/layer_32>` Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". @@ -7479,7 +8096,7 @@ Optional name for the 3D physics layer 32. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_1>` Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". @@ -7491,7 +8108,7 @@ Optional name for the 3D render layer 1. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_2>` Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". @@ -7503,7 +8120,7 @@ Optional name for the 3D render layer 2. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_3>` Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". @@ -7515,7 +8132,7 @@ Optional name for the 3D render layer 3. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_4>` Optional name for the 3D render layer 4. If left empty, the layer will display as "Layer 4". @@ -7527,7 +8144,7 @@ Optional name for the 3D render layer 4. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_5>` Optional name for the 3D render layer 5. If left empty, the layer will display as "Layer 5". @@ -7539,7 +8156,7 @@ Optional name for the 3D render layer 5. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_6>` Optional name for the 3D render layer 6. If left empty, the layer will display as "Layer 6". @@ -7551,7 +8168,7 @@ Optional name for the 3D render layer 6. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_7>` Optional name for the 3D render layer 7. If left empty, the layer will display as "Layer 7". @@ -7563,7 +8180,7 @@ Optional name for the 3D render layer 7. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_8>` Optional name for the 3D render layer 8. If left empty, the layer will display as "Layer 8". @@ -7575,7 +8192,7 @@ Optional name for the 3D render layer 8. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_9>` Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". @@ -7587,7 +8204,7 @@ Optional name for the 3D render layer 9. If left empty, the layer will display a .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_10>` Optional name for the 3D render layer 10. If left empty, the layer will display as "Layer 10". @@ -7599,7 +8216,7 @@ Optional name for the 3D render layer 10. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_11>` Optional name for the 3D render layer 11. If left empty, the layer will display as "Layer 11". @@ -7611,7 +8228,7 @@ Optional name for the 3D render layer 11. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_12>` Optional name for the 3D render layer 12. If left empty, the layer will display as "Layer 12". @@ -7623,7 +8240,7 @@ Optional name for the 3D render layer 12. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_13>` Optional name for the 3D render layer 13. If left empty, the layer will display as "Layer 13". @@ -7635,7 +8252,7 @@ Optional name for the 3D render layer 13. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_14>` Optional name for the 3D render layer 14. If left empty, the layer will display as "Layer 14". @@ -7647,7 +8264,7 @@ Optional name for the 3D render layer 14. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_15>` Optional name for the 3D render layer 15. If left empty, the layer will display as "Layer 15". @@ -7659,7 +8276,7 @@ Optional name for the 3D render layer 15. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_16>` Optional name for the 3D render layer 16. If left empty, the layer will display as "Layer 16". @@ -7671,7 +8288,7 @@ Optional name for the 3D render layer 16. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_17>` Optional name for the 3D render layer 17. If left empty, the layer will display as "Layer 17". @@ -7683,7 +8300,7 @@ Optional name for the 3D render layer 17. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_18>` Optional name for the 3D render layer 18. If left empty, the layer will display as "Layer 18". @@ -7695,7 +8312,7 @@ Optional name for the 3D render layer 18. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_19>` Optional name for the 3D render layer 19. If left empty, the layer will display as "Layer 19". @@ -7707,7 +8324,7 @@ Optional name for the 3D render layer 19. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/3d_render/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/3d_render/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/3d_render/layer_20>` Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". @@ -7719,7 +8336,7 @@ Optional name for the 3D render layer 20. If left empty, the layer will display .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_1** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_1** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_1>` Optional name for the navigation avoidance layer 1. If left empty, the layer will display as "Layer 1". @@ -7731,7 +8348,7 @@ Optional name for the navigation avoidance layer 1. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_2** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_2** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_2>` Optional name for the navigation avoidance layer 2. If left empty, the layer will display as "Layer 2". @@ -7743,7 +8360,7 @@ Optional name for the navigation avoidance layer 2. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_3** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_3** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_3>` Optional name for the navigation avoidance layer 3. If left empty, the layer will display as "Layer 3". @@ -7755,7 +8372,7 @@ Optional name for the navigation avoidance layer 3. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_4** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_4** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_4>` Optional name for the navigation avoidance layer 4. If left empty, the layer will display as "Layer 4". @@ -7767,7 +8384,7 @@ Optional name for the navigation avoidance layer 4. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_5** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_5** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_5>` Optional name for the navigation avoidance layer 5. If left empty, the layer will display as "Layer 5". @@ -7779,7 +8396,7 @@ Optional name for the navigation avoidance layer 5. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_6** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_6** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_6>` Optional name for the navigation avoidance layer 6. If left empty, the layer will display as "Layer 6". @@ -7791,7 +8408,7 @@ Optional name for the navigation avoidance layer 6. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_7** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_7** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_7>` Optional name for the navigation avoidance layer 7. If left empty, the layer will display as "Layer 7". @@ -7803,7 +8420,7 @@ Optional name for the navigation avoidance layer 7. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_8** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_8** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_8>` Optional name for the navigation avoidance layer 8. If left empty, the layer will display as "Layer 8". @@ -7815,7 +8432,7 @@ Optional name for the navigation avoidance layer 8. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_9** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_9** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_9>` Optional name for the navigation avoidance layer 9. If left empty, the layer will display as "Layer 9". @@ -7827,7 +8444,7 @@ Optional name for the navigation avoidance layer 9. If left empty, the layer wil .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_10** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_10** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_10>` Optional name for the navigation avoidance layer 10. If left empty, the layer will display as "Layer 10". @@ -7839,7 +8456,7 @@ Optional name for the navigation avoidance layer 10. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_11** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_11** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_11>` Optional name for the navigation avoidance layer 11. If left empty, the layer will display as "Layer 11". @@ -7851,7 +8468,7 @@ Optional name for the navigation avoidance layer 11. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_12** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_12** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_12>` Optional name for the navigation avoidance layer 12. If left empty, the layer will display as "Layer 12". @@ -7863,7 +8480,7 @@ Optional name for the navigation avoidance layer 12. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_13** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_13** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_13>` Optional name for the navigation avoidance layer 13. If left empty, the layer will display as "Layer 13". @@ -7875,7 +8492,7 @@ Optional name for the navigation avoidance layer 13. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_14** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_14** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_14>` Optional name for the navigation avoidance layer 14. If left empty, the layer will display as "Layer 14". @@ -7887,7 +8504,7 @@ Optional name for the navigation avoidance layer 14. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_15** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_15** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_15>` Optional name for the navigation avoidance layer 15. If left empty, the layer will display as "Layer 15". @@ -7899,7 +8516,7 @@ Optional name for the navigation avoidance layer 15. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_16** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_16** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_16>` Optional name for the navigation avoidance layer 16. If left empty, the layer will display as "Layer 16". @@ -7911,7 +8528,7 @@ Optional name for the navigation avoidance layer 16. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_17** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_17** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_17>` Optional name for the navigation avoidance layer 17. If left empty, the layer will display as "Layer 17". @@ -7923,7 +8540,7 @@ Optional name for the navigation avoidance layer 17. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_18** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_18** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_18>` Optional name for the navigation avoidance layer 18. If left empty, the layer will display as "Layer 18". @@ -7935,7 +8552,7 @@ Optional name for the navigation avoidance layer 18. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_19** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_19** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_19>` Optional name for the navigation avoidance layer 19. If left empty, the layer will display as "Layer 19". @@ -7947,7 +8564,7 @@ Optional name for the navigation avoidance layer 19. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_20** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_20** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_20>` Optional name for the navigation avoidance layer 20. If left empty, the layer will display as "Layer 20". @@ -7959,7 +8576,7 @@ Optional name for the navigation avoidance layer 20. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_21** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_21** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_21>` Optional name for the navigation avoidance layer 21. If left empty, the layer will display as "Layer 21". @@ -7971,7 +8588,7 @@ Optional name for the navigation avoidance layer 21. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_22** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_22** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_22>` Optional name for the navigation avoidance layer 22. If left empty, the layer will display as "Layer 22". @@ -7983,7 +8600,7 @@ Optional name for the navigation avoidance layer 22. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_23** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_23** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_23>` Optional name for the navigation avoidance layer 23. If left empty, the layer will display as "Layer 23". @@ -7995,7 +8612,7 @@ Optional name for the navigation avoidance layer 23. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_24** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_24** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_24>` Optional name for the navigation avoidance layer 24. If left empty, the layer will display as "Layer 24". @@ -8007,7 +8624,7 @@ Optional name for the navigation avoidance layer 24. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_25** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_25** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_25>` Optional name for the navigation avoidance layer 25. If left empty, the layer will display as "Layer 25". @@ -8019,7 +8636,7 @@ Optional name for the navigation avoidance layer 25. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_26** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_26** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_26>` Optional name for the navigation avoidance layer 26. If left empty, the layer will display as "Layer 26". @@ -8031,7 +8648,7 @@ Optional name for the navigation avoidance layer 26. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_27** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_27** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_27>` Optional name for the navigation avoidance layer 27. If left empty, the layer will display as "Layer 27". @@ -8043,7 +8660,7 @@ Optional name for the navigation avoidance layer 27. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_28** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_28** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_28>` Optional name for the navigation avoidance layer 28. If left empty, the layer will display as "Layer 28". @@ -8055,7 +8672,7 @@ Optional name for the navigation avoidance layer 28. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_29** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_29** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_29>` Optional name for the navigation avoidance layer 29. If left empty, the layer will display as "Layer 29". @@ -8067,7 +8684,7 @@ Optional name for the navigation avoidance layer 29. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_30** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_30** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_30>` Optional name for the navigation avoidance layer 30. If left empty, the layer will display as "Layer 30". @@ -8079,7 +8696,7 @@ Optional name for the navigation avoidance layer 30. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_31** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_31** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_31>` Optional name for the navigation avoidance layer 31. If left empty, the layer will display as "Layer 31". @@ -8091,7 +8708,7 @@ Optional name for the navigation avoidance layer 31. If left empty, the layer wi .. rst-class:: classref-property -:ref:`String<class_String>` **layer_names/avoidance/layer_32** = ``""`` +:ref:`String<class_String>` **layer_names/avoidance/layer_32** = ``""`` :ref:`🔗<class_ProjectSettings_property_layer_names/avoidance/layer_32>` Optional name for the navigation avoidance layer 32. If left empty, the layer will display as "Layer 32". @@ -8103,7 +8720,7 @@ Optional name for the navigation avoidance layer 32. If left empty, the layer wi .. rst-class:: classref-property -:ref:`int<class_int>` **memory/limits/message_queue/max_size_mb** = ``32`` +:ref:`int<class_int>` **memory/limits/message_queue/max_size_mb** = ``32`` :ref:`🔗<class_ProjectSettings_property_memory/limits/message_queue/max_size_mb>` 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. @@ -8111,23 +8728,11 @@ Godot uses a message queue to defer some function calls. If you run out of space ---- -.. _class_ProjectSettings_property_memory/limits/multithreaded_server/rid_pool_prealloc: - -.. rst-class:: classref-property - -:ref:`int<class_int>` **memory/limits/multithreaded_server/rid_pool_prealloc** = ``60`` - -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. - -.. rst-class:: classref-item-separator - ----- - .. _class_ProjectSettings_property_navigation/2d/default_cell_size: .. rst-class:: classref-property -:ref:`int<class_int>` **navigation/2d/default_cell_size** = ``1`` +:ref:`float<class_float>` **navigation/2d/default_cell_size** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_navigation/2d/default_cell_size>` Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_cell_size<class_NavigationServer2D_method_map_set_cell_size>`. @@ -8139,7 +8744,7 @@ Default cell size for 2D navigation maps. See :ref:`NavigationServer2D.map_set_c .. rst-class:: classref-property -:ref:`int<class_int>` **navigation/2d/default_edge_connection_margin** = ``1`` +:ref:`float<class_float>` **navigation/2d/default_edge_connection_margin** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_navigation/2d/default_edge_connection_margin>` Default edge connection margin for 2D navigation maps. See :ref:`NavigationServer2D.map_set_edge_connection_margin<class_NavigationServer2D_method_map_set_edge_connection_margin>`. @@ -8151,7 +8756,7 @@ Default edge connection margin for 2D navigation maps. See :ref:`NavigationServe .. rst-class:: classref-property -:ref:`int<class_int>` **navigation/2d/default_link_connection_radius** = ``4`` +:ref:`float<class_float>` **navigation/2d/default_link_connection_radius** = ``4.0`` :ref:`🔗<class_ProjectSettings_property_navigation/2d/default_link_connection_radius>` Default link connection radius for 2D navigation maps. See :ref:`NavigationServer2D.map_set_link_connection_radius<class_NavigationServer2D_method_map_set_link_connection_radius>`. @@ -8163,7 +8768,7 @@ Default link connection radius for 2D navigation maps. See :ref:`NavigationServe .. rst-class:: classref-property -:ref:`bool<class_bool>` **navigation/2d/use_edge_connections** = ``true`` +:ref:`bool<class_bool>` **navigation/2d/use_edge_connections** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/2d/use_edge_connections>` If enabled 2D navigation regions will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. This setting only affects World2D default navigation maps. @@ -8175,7 +8780,7 @@ If enabled 2D navigation regions will use edge connections to connect with other .. rst-class:: classref-property -:ref:`float<class_float>` **navigation/3d/default_cell_height** = ``0.25`` +:ref:`float<class_float>` **navigation/3d/default_cell_height** = ``0.25`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/default_cell_height>` Default cell height for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>`. @@ -8187,7 +8792,7 @@ Default cell height for 3D navigation maps. See :ref:`NavigationServer3D.map_set .. rst-class:: classref-property -:ref:`float<class_float>` **navigation/3d/default_cell_size** = ``0.25`` +:ref:`float<class_float>` **navigation/3d/default_cell_size** = ``0.25`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/default_cell_size>` Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>`. @@ -8199,7 +8804,7 @@ Default cell size for 3D navigation maps. See :ref:`NavigationServer3D.map_set_c .. rst-class:: classref-property -:ref:`float<class_float>` **navigation/3d/default_edge_connection_margin** = ``0.25`` +:ref:`float<class_float>` **navigation/3d/default_edge_connection_margin** = ``0.25`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/default_edge_connection_margin>` Default edge connection margin for 3D navigation maps. See :ref:`NavigationServer3D.map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>`. @@ -8211,7 +8816,7 @@ Default edge connection margin for 3D navigation maps. See :ref:`NavigationServe .. rst-class:: classref-property -:ref:`float<class_float>` **navigation/3d/default_link_connection_radius** = ``1.0`` +:ref:`float<class_float>` **navigation/3d/default_link_connection_radius** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/default_link_connection_radius>` Default link connection radius for 3D navigation maps. See :ref:`NavigationServer3D.map_set_link_connection_radius<class_NavigationServer3D_method_map_set_link_connection_radius>`. @@ -8219,11 +8824,35 @@ Default link connection radius for 3D navigation maps. See :ref:`NavigationServe ---- +.. _class_ProjectSettings_property_navigation/3d/default_up: + +.. rst-class:: classref-property + +:ref:`Vector3<class_Vector3>` **navigation/3d/default_up** = ``Vector3(0, 1, 0)`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/default_up>` + +Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_set_up<class_NavigationServer3D_method_map_set_up>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_navigation/3d/merge_rasterizer_cell_scale: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **navigation/3d/merge_rasterizer_cell_scale** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/merge_rasterizer_cell_scale>` + +Default merge rasterizer cell scale for 3D navigation maps. See :ref:`NavigationServer3D.map_set_merge_rasterizer_cell_scale<class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_navigation/3d/use_edge_connections: .. rst-class:: classref-property -:ref:`bool<class_bool>` **navigation/3d/use_edge_connections** = ``true`` +:ref:`bool<class_bool>` **navigation/3d/use_edge_connections** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/3d/use_edge_connections>` If enabled 3D navigation regions will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. This setting only affects World3D default navigation maps. @@ -8235,7 +8864,7 @@ If enabled 3D navigation regions will use edge connections to connect with other .. rst-class:: classref-property -:ref:`bool<class_bool>` **navigation/avoidance/thread_model/avoidance_use_high_priority_threads** = ``true`` +:ref:`bool<class_bool>` **navigation/avoidance/thread_model/avoidance_use_high_priority_threads** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_high_priority_threads>` If enabled and avoidance calculations use multiple threads the threads run with high priority. @@ -8247,7 +8876,7 @@ If enabled and avoidance calculations use multiple threads the threads run with .. rst-class:: classref-property -:ref:`bool<class_bool>` **navigation/avoidance/thread_model/avoidance_use_multiple_threads** = ``true`` +:ref:`bool<class_bool>` **navigation/avoidance/thread_model/avoidance_use_multiple_threads** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/avoidance/thread_model/avoidance_use_multiple_threads>` If enabled the avoidance calculations use multiple threads. @@ -8255,11 +8884,47 @@ If enabled the avoidance calculations use multiple threads. ---- +.. _class_ProjectSettings_property_navigation/baking/thread_model/baking_use_high_priority_threads: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **navigation/baking/thread_model/baking_use_high_priority_threads** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/baking/thread_model/baking_use_high_priority_threads>` + +If enabled and async navmesh baking uses multiple threads the threads run with high priority. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_navigation/baking/thread_model/baking_use_multiple_threads: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **navigation/baking/thread_model/baking_use_multiple_threads** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/baking/thread_model/baking_use_multiple_threads>` + +If enabled the async navmesh baking uses multiple threads. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_navigation/baking/use_crash_prevention_checks: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **navigation/baking/use_crash_prevention_checks** = ``true`` :ref:`🔗<class_ProjectSettings_property_navigation/baking/use_crash_prevention_checks>` + +If enabled, and baking would potentially lead to an engine crash, the baking will be interrupted and an error message with explanation will be raised. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_network/limits/debugger/max_chars_per_second: .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/debugger/max_chars_per_second** = ``32768`` +:ref:`int<class_int>` **network/limits/debugger/max_chars_per_second** = ``32768`` :ref:`🔗<class_ProjectSettings_property_network/limits/debugger/max_chars_per_second>` Maximum number of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. @@ -8271,7 +8936,7 @@ Maximum number of characters allowed to send as output from the debugger. Over t .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/debugger/max_errors_per_second** = ``400`` +:ref:`int<class_int>` **network/limits/debugger/max_errors_per_second** = ``400`` :ref:`🔗<class_ProjectSettings_property_network/limits/debugger/max_errors_per_second>` Maximum number of errors allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. @@ -8283,7 +8948,7 @@ Maximum number of errors allowed to be sent from the debugger. Over this value, .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/debugger/max_queued_messages** = ``2048`` +:ref:`int<class_int>` **network/limits/debugger/max_queued_messages** = ``2048`` :ref:`🔗<class_ProjectSettings_property_network/limits/debugger/max_queued_messages>` Maximum number of messages in the debugger queue. Over this value, content is dropped. This helps to limit the debugger memory usage. @@ -8295,7 +8960,7 @@ Maximum number of messages in the debugger queue. Over this value, content is dr .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/debugger/max_warnings_per_second** = ``400`` +:ref:`int<class_int>` **network/limits/debugger/max_warnings_per_second** = ``400`` :ref:`🔗<class_ProjectSettings_property_network/limits/debugger/max_warnings_per_second>` Maximum number of warnings allowed to be sent from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. @@ -8307,7 +8972,7 @@ Maximum number of warnings allowed to be sent from the debugger. Over this value .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/packet_peer_stream/max_buffer_po2** = ``16`` +:ref:`int<class_int>` **network/limits/packet_peer_stream/max_buffer_po2** = ``16`` :ref:`🔗<class_ProjectSettings_property_network/limits/packet_peer_stream/max_buffer_po2>` Default size of packet peer stream for deserializing Godot data (in bytes, specified as a power of two). The default value ``16`` is equal to 65,536 bytes. Over this size, data is dropped. @@ -8319,7 +8984,7 @@ Default size of packet peer stream for deserializing Godot data (in bytes, speci .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/tcp/connect_timeout_seconds** = ``30`` +:ref:`int<class_int>` **network/limits/tcp/connect_timeout_seconds** = ``30`` :ref:`🔗<class_ProjectSettings_property_network/limits/tcp/connect_timeout_seconds>` Timeout (in seconds) for connection attempts using TCP. @@ -8331,7 +8996,7 @@ Timeout (in seconds) for connection attempts using TCP. .. rst-class:: classref-property -:ref:`int<class_int>` **network/limits/webrtc/max_channel_in_buffer_kb** = ``64`` +:ref:`int<class_int>` **network/limits/webrtc/max_channel_in_buffer_kb** = ``64`` :ref:`🔗<class_ProjectSettings_property_network/limits/webrtc/max_channel_in_buffer_kb>` Maximum size (in kiB) for the :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` input buffer. @@ -8343,7 +9008,7 @@ Maximum size (in kiB) for the :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` .. rst-class:: classref-property -:ref:`String<class_String>` **network/tls/certificate_bundle_override** = ``""`` +:ref:`String<class_String>` **network/tls/certificate_bundle_override** = ``""`` :ref:`🔗<class_ProjectSettings_property_network/tls/certificate_bundle_override>` The CA certificates bundle to use for TLS connections. If this is set to a non-empty value, this will *override* Godot's default `Mozilla certificate bundle <https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt>`__. If left empty, the default certificate bundle will be used. @@ -8357,11 +9022,17 @@ If in doubt, leave this setting empty. .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/default_angular_damp** = ``1.0`` +:ref:`float<class_float>` **physics/2d/default_angular_damp** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_physics/2d/default_angular_damp>` + +The default rotational motion damping in 2D. Damping is used to gradually slow down physical objects over time. RigidBodies will fall back to this value when combining their own damping values and no area damping value is present. -The default angular damp in 2D. +Suggested values are in the range ``0`` to ``30``. At value ``0`` objects will keep moving with the same velocity. Greater values will stop the object faster. A value equal to or greater than the physics tick rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`) will bring the object to a stop in one iteration. -\ **Note:** Good values are in the range ``0`` to ``1``. At value ``0`` objects will keep moving with the same velocity. Values greater than ``1`` will aim to reduce the velocity to ``0`` in less than a second e.g. a value of ``2`` will aim to reduce the velocity to ``0`` in half a second. A value equal to or greater than the physics frame rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`, ``60`` by default) will bring the object to a stop in one iteration. +\ **Note:** Godot damping calculations are velocity-dependent, meaning bodies moving faster will take a longer time to come to rest. They do not simulate inertia, friction, or air resistance. Therefore heavier or larger bodies will lose speed at the same proportional rate as lighter or smaller bodies. + +During each physics tick, Godot will multiply the linear velocity of RigidBodies by ``1.0 - combined_damp / physics_ticks_per_second``. By default, bodies combine damp factors: ``combined_damp`` is the sum of the damp value of the body and this value or the area's value the body is in. See :ref:`DampMode<enum_RigidBody2D_DampMode>`. + +\ **Warning:** Godot's damping calculations are simulation tick rate dependent. Changing :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` may significantly change the outcomes and feel of your simulation. This is true for the entire range of damping values greater than 0. To get back to a similar feel, you also need to change your damp values. This needed change is not proportional and differs from case to case. .. rst-class:: classref-item-separator @@ -8371,7 +9042,7 @@ The default angular damp in 2D. .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/default_gravity** = ``980.0`` +:ref:`float<class_float>` **physics/2d/default_gravity** = ``980.0`` :ref:`🔗<class_ProjectSettings_property_physics/2d/default_gravity>` The default gravity strength in 2D (in pixels per second squared). @@ -8400,7 +9071,7 @@ The default gravity strength in 2D (in pixels per second squared). .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **physics/2d/default_gravity_vector** = ``Vector2(0, 1)`` +:ref:`Vector2<class_Vector2>` **physics/2d/default_gravity_vector** = ``Vector2(0, 1)`` :ref:`🔗<class_ProjectSettings_property_physics/2d/default_gravity_vector>` The default gravity direction in 2D. @@ -8429,11 +9100,17 @@ The default gravity direction in 2D. .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/default_linear_damp** = ``0.1`` +:ref:`float<class_float>` **physics/2d/default_linear_damp** = ``0.1`` :ref:`🔗<class_ProjectSettings_property_physics/2d/default_linear_damp>` + +The default linear motion damping in 2D. Damping is used to gradually slow down physical objects over time. RigidBodies will fall back to this value when combining their own damping values and no area damping value is present. + +Suggested values are in the range ``0`` to ``30``. At value ``0`` objects will keep moving with the same velocity. Greater values will stop the object faster. A value equal to or greater than the physics tick rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`) will bring the object to a stop in one iteration. -The default linear damp in 2D. +\ **Note:** Godot damping calculations are velocity-dependent, meaning bodies moving faster will take a longer time to come to rest. They do not simulate inertia, friction, or air resistance. Therefore heavier or larger bodies will lose speed at the same proportional rate as lighter or smaller bodies. -\ **Note:** Good values are in the range ``0`` to ``1``. At value ``0`` objects will keep moving with the same velocity. Values greater than ``1`` will aim to reduce the velocity to ``0`` in less than a second e.g. a value of ``2`` will aim to reduce the velocity to ``0`` in half a second. A value equal to or greater than the physics frame rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`, ``60`` by default) will bring the object to a stop in one iteration. +During each physics tick, Godot will multiply the linear velocity of RigidBodies by ``1.0 - combined_damp / physics_ticks_per_second``, where ``combined_damp`` is the sum of the linear damp of the body and this value, or the area's value the body is in, assuming the body defaults to combine damp values. See :ref:`DampMode<enum_RigidBody2D_DampMode>`. + +\ **Warning:** Godot's damping calculations are simulation tick rate dependent. Changing :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` may significantly change the outcomes and feel of your simulation. This is true for the entire range of damping values greater than 0. To get back to a similar feel, you also need to change your damp values. This needed change is not proportional and differs from case to case. .. rst-class:: classref-item-separator @@ -8443,7 +9120,7 @@ The default linear damp in 2D. .. rst-class:: classref-property -:ref:`String<class_String>` **physics/2d/physics_engine** = ``"DEFAULT"`` +:ref:`String<class_String>` **physics/2d/physics_engine** = ``"DEFAULT"`` :ref:`🔗<class_ProjectSettings_property_physics/2d/physics_engine>` Sets which physics engine to use for 2D physics. @@ -8457,7 +9134,7 @@ Sets which physics engine to use for 2D physics. .. rst-class:: classref-property -:ref:`bool<class_bool>` **physics/2d/run_on_separate_thread** = ``false`` +:ref:`bool<class_bool>` **physics/2d/run_on_separate_thread** = ``false`` :ref:`🔗<class_ProjectSettings_property_physics/2d/run_on_separate_thread>` If ``true``, the 2D physics server runs on a separate thread, making better use of multi-core CPUs. If ``false``, the 2D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process. @@ -8469,7 +9146,7 @@ If ``true``, the 2D physics server runs on a separate thread, making better use .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/sleep_threshold_angular** = ``0.139626`` +:ref:`float<class_float>` **physics/2d/sleep_threshold_angular** = ``0.139626`` :ref:`🔗<class_ProjectSettings_property_physics/2d/sleep_threshold_angular>` Threshold angular velocity under which a 2D physics body will be considered inactive. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD<class_PhysicsServer2D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD>`. @@ -8481,7 +9158,7 @@ Threshold angular velocity under which a 2D physics body will be considered inac .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/sleep_threshold_linear** = ``2.0`` +:ref:`float<class_float>` **physics/2d/sleep_threshold_linear** = ``2.0`` :ref:`🔗<class_ProjectSettings_property_physics/2d/sleep_threshold_linear>` Threshold linear velocity under which a 2D physics body will be considered inactive. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD<class_PhysicsServer2D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD>`. @@ -8493,7 +9170,7 @@ Threshold linear velocity under which a 2D physics body will be considered inact .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/solver/contact_max_allowed_penetration** = ``0.3`` +:ref:`float<class_float>` **physics/2d/solver/contact_max_allowed_penetration** = ``0.3`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/contact_max_allowed_penetration>` Maximum distance a shape can penetrate another shape before it is considered a collision. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION<class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION>`. @@ -8505,7 +9182,7 @@ Maximum distance a shape can penetrate another shape before it is considered a c .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/solver/contact_max_separation** = ``1.5`` +:ref:`float<class_float>` **physics/2d/solver/contact_max_separation** = ``1.5`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/contact_max_separation>` Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_MAX_SEPARATION<class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION>`. @@ -8517,7 +9194,7 @@ Maximum distance a shape can be from another before they are considered separate .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/solver/contact_recycle_radius** = ``1.0`` +:ref:`float<class_float>` **physics/2d/solver/contact_recycle_radius** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/contact_recycle_radius>` Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS<class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS>`. @@ -8529,7 +9206,7 @@ Maximum distance a pair of bodies has to move before their collision status has .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/solver/default_constraint_bias** = ``0.2`` +:ref:`float<class_float>` **physics/2d/solver/default_constraint_bias** = ``0.2`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/default_constraint_bias>` Default solver bias for all physics constraints. Defines how much bodies react to enforce constraints. See :ref:`PhysicsServer2D.SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS<class_PhysicsServer2D_constant_SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS>`. @@ -8543,7 +9220,7 @@ Individual constraints can have a specific bias value (see :ref:`Joint2D.bias<cl .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/solver/default_contact_bias** = ``0.8`` +:ref:`float<class_float>` **physics/2d/solver/default_contact_bias** = ``0.8`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/default_contact_bias>` Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See :ref:`PhysicsServer2D.SPACE_PARAM_CONTACT_DEFAULT_BIAS<class_PhysicsServer2D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS>`. @@ -8557,7 +9234,7 @@ Individual shapes can have a specific bias value (see :ref:`Shape2D.custom_solve .. rst-class:: classref-property -:ref:`int<class_int>` **physics/2d/solver/solver_iterations** = ``16`` +:ref:`int<class_int>` **physics/2d/solver/solver_iterations** = ``16`` :ref:`🔗<class_ProjectSettings_property_physics/2d/solver/solver_iterations>` Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer2D.SPACE_PARAM_SOLVER_ITERATIONS<class_PhysicsServer2D_constant_SPACE_PARAM_SOLVER_ITERATIONS>`. @@ -8569,7 +9246,7 @@ Number of solver iterations for all contacts and constraints. The greater the nu .. rst-class:: classref-property -:ref:`float<class_float>` **physics/2d/time_before_sleep** = ``0.5`` +:ref:`float<class_float>` **physics/2d/time_before_sleep** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_physics/2d/time_before_sleep>` Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See :ref:`PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP<class_PhysicsServer2D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP>`. @@ -8581,11 +9258,17 @@ Time (in seconds) of inactivity before which a 2D physics body will put to sleep .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/default_angular_damp** = ``0.1`` +:ref:`float<class_float>` **physics/3d/default_angular_damp** = ``0.1`` :ref:`🔗<class_ProjectSettings_property_physics/3d/default_angular_damp>` + +The default rotational motion damping in 3D. Damping is used to gradually slow down physical objects over time. RigidBodies will fall back to this value when combining their own damping values and no area damping value is present. + +Suggested values are in the range ``0`` to ``30``. At value ``0`` objects will keep moving with the same velocity. Greater values will stop the object faster. A value equal to or greater than the physics tick rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`) will bring the object to a stop in one iteration. + +\ **Note:** Godot damping calculations are velocity-dependent, meaning bodies moving faster will take a longer time to come to rest. They do not simulate inertia, friction, or air resistance. Therefore heavier or larger bodies will lose speed at the same proportional rate as lighter or smaller bodies. -The default angular damp in 3D. +During each physics tick, Godot will multiply the angular velocity of RigidBodies by ``1.0 - combined_damp / physics_ticks_per_second``. By default, bodies combine damp factors: ``combined_damp`` is the sum of the damp value of the body and this value or the area's value the body is in. See :ref:`DampMode<enum_RigidBody3D_DampMode>`. -\ **Note:** Good values are in the range ``0`` to ``1``. At value ``0`` objects will keep moving with the same velocity. Values greater than ``1`` will aim to reduce the velocity to ``0`` in less than a second e.g. a value of ``2`` will aim to reduce the velocity to ``0`` in half a second. A value equal to or greater than the physics frame rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`, ``60`` by default) will bring the object to a stop in one iteration. +\ **Warning:** Godot's damping calculations are simulation tick rate dependent. Changing :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` may significantly change the outcomes and feel of your simulation. This is true for the entire range of damping values greater than 0. To get back to a similar feel, you also need to change your damp values. This needed change is not proportional and differs from case to case. .. rst-class:: classref-item-separator @@ -8595,7 +9278,7 @@ The default angular damp in 3D. .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/default_gravity** = ``9.8`` +:ref:`float<class_float>` **physics/3d/default_gravity** = ``9.8`` :ref:`🔗<class_ProjectSettings_property_physics/3d/default_gravity>` The default gravity strength in 3D (in meters per second squared). @@ -8607,12 +9290,12 @@ The default gravity strength in 3D (in meters per second squared). .. code-tab:: gdscript # Set the default gravity strength to 9.8. - PhysicsServer3D.area_set_param(get_viewport().find_world().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) + PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) .. code-tab:: csharp // Set the default gravity strength to 9.8. - PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); @@ -8624,7 +9307,7 @@ The default gravity strength in 3D (in meters per second squared). .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **physics/3d/default_gravity_vector** = ``Vector3(0, -1, 0)`` +:ref:`Vector3<class_Vector3>` **physics/3d/default_gravity_vector** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_ProjectSettings_property_physics/3d/default_gravity_vector>` The default gravity direction in 3D. @@ -8636,12 +9319,12 @@ The default gravity direction in 3D. .. code-tab:: gdscript # Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.area_set_param(get_viewport().find_world().get_space(), PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) + PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) .. code-tab:: csharp // Set the default gravity direction to `Vector3(0, -1, 0)`. - PhysicsServer3D.AreaSetParam(GetViewport().FindWorld().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) + PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) @@ -8653,11 +9336,17 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/default_linear_damp** = ``0.1`` +:ref:`float<class_float>` **physics/3d/default_linear_damp** = ``0.1`` :ref:`🔗<class_ProjectSettings_property_physics/3d/default_linear_damp>` -The default linear damp in 3D. +The default linear motion damping in 3D. Damping is used to gradually slow down physical objects over time. RigidBodies will fall back to this value when combining their own damping values and no area damping value is present. -\ **Note:** Good values are in the range ``0`` to ``1``. At value ``0`` objects will keep moving with the same velocity. Values greater than ``1`` will aim to reduce the velocity to ``0`` in less than a second e.g. a value of ``2`` will aim to reduce the velocity to ``0`` in half a second. A value equal to or greater than the physics frame rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`, ``60`` by default) will bring the object to a stop in one iteration. +Suggested values are in the range ``0`` to ``30``. At value ``0`` objects will keep moving with the same velocity. Greater values will stop the object faster. A value equal to or greater than the physics tick rate (:ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`) will bring the object to a stop in one iteration. + +\ **Note:** Godot damping calculations are velocity-dependent, meaning bodies moving faster will take a longer time to come to rest. They do not simulate inertia, friction, or air resistance. Therefore heavier or larger bodies will lose speed at the same proportional rate as lighter or smaller bodies. + +During each physics tick, Godot will multiply the linear velocity of RigidBodies by ``1.0 - combined_damp / physics_ticks_per_second``. By default, bodies combine damp factors: ``combined_damp`` is the sum of the damp value of the body and this value or the area's value the body is in. See :ref:`DampMode<enum_RigidBody3D_DampMode>`. + +\ **Warning:** Godot's damping calculations are simulation tick rate dependent. Changing :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` may significantly change the outcomes and feel of your simulation. This is true for the entire range of damping values greater than 0. To get back to a similar feel, you also need to change your damp values. This needed change is not proportional and differs from case to case. .. rst-class:: classref-item-separator @@ -8667,7 +9356,7 @@ The default linear damp in 3D. .. rst-class:: classref-property -:ref:`String<class_String>` **physics/3d/physics_engine** = ``"DEFAULT"`` +:ref:`String<class_String>` **physics/3d/physics_engine** = ``"DEFAULT"`` :ref:`🔗<class_ProjectSettings_property_physics/3d/physics_engine>` Sets which physics engine to use for 3D physics. @@ -8681,7 +9370,7 @@ Sets which physics engine to use for 3D physics. .. rst-class:: classref-property -:ref:`bool<class_bool>` **physics/3d/run_on_separate_thread** = ``false`` +:ref:`bool<class_bool>` **physics/3d/run_on_separate_thread** = ``false`` :ref:`🔗<class_ProjectSettings_property_physics/3d/run_on_separate_thread>` If ``true``, the 3D physics server runs on a separate thread, making better use of multi-core CPUs. If ``false``, the 3D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process. @@ -8693,7 +9382,7 @@ If ``true``, the 3D physics server runs on a separate thread, making better use .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/sleep_threshold_angular** = ``0.139626`` +:ref:`float<class_float>` **physics/3d/sleep_threshold_angular** = ``0.139626`` :ref:`🔗<class_ProjectSettings_property_physics/3d/sleep_threshold_angular>` Threshold angular velocity under which a 3D physics body will be considered inactive. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD<class_PhysicsServer3D_constant_SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD>`. @@ -8705,7 +9394,7 @@ Threshold angular velocity under which a 3D physics body will be considered inac .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/sleep_threshold_linear** = ``0.1`` +:ref:`float<class_float>` **physics/3d/sleep_threshold_linear** = ``0.1`` :ref:`🔗<class_ProjectSettings_property_physics/3d/sleep_threshold_linear>` Threshold linear velocity under which a 3D physics body will be considered inactive. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD<class_PhysicsServer3D_constant_SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD>`. @@ -8717,7 +9406,7 @@ Threshold linear velocity under which a 3D physics body will be considered inact .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/solver/contact_max_allowed_penetration** = ``0.01`` +:ref:`float<class_float>` **physics/3d/solver/contact_max_allowed_penetration** = ``0.01`` :ref:`🔗<class_ProjectSettings_property_physics/3d/solver/contact_max_allowed_penetration>` Maximum distance a shape can penetrate another shape before it is considered a collision. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION<class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION>`. @@ -8729,7 +9418,7 @@ Maximum distance a shape can penetrate another shape before it is considered a c .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/solver/contact_max_separation** = ``0.05`` +:ref:`float<class_float>` **physics/3d/solver/contact_max_separation** = ``0.05`` :ref:`🔗<class_ProjectSettings_property_physics/3d/solver/contact_max_separation>` Maximum distance a shape can be from another before they are considered separated and the contact is discarded. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_MAX_SEPARATION<class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_MAX_SEPARATION>`. @@ -8741,7 +9430,7 @@ Maximum distance a shape can be from another before they are considered separate .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/solver/contact_recycle_radius** = ``0.01`` +:ref:`float<class_float>` **physics/3d/solver/contact_recycle_radius** = ``0.01`` :ref:`🔗<class_ProjectSettings_property_physics/3d/solver/contact_recycle_radius>` Maximum distance a pair of bodies has to move before their collision status has to be recalculated. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_RECYCLE_RADIUS<class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_RECYCLE_RADIUS>`. @@ -8753,7 +9442,7 @@ Maximum distance a pair of bodies has to move before their collision status has .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/solver/default_contact_bias** = ``0.8`` +:ref:`float<class_float>` **physics/3d/solver/default_contact_bias** = ``0.8`` :ref:`🔗<class_ProjectSettings_property_physics/3d/solver/default_contact_bias>` Default solver bias for all physics contacts. Defines how much bodies react to enforce contact separation. See :ref:`PhysicsServer3D.SPACE_PARAM_CONTACT_DEFAULT_BIAS<class_PhysicsServer3D_constant_SPACE_PARAM_CONTACT_DEFAULT_BIAS>`. @@ -8767,7 +9456,7 @@ Individual shapes can have a specific bias value (see :ref:`Shape3D.custom_solve .. rst-class:: classref-property -:ref:`int<class_int>` **physics/3d/solver/solver_iterations** = ``16`` +:ref:`int<class_int>` **physics/3d/solver/solver_iterations** = ``16`` :ref:`🔗<class_ProjectSettings_property_physics/3d/solver/solver_iterations>` Number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. See :ref:`PhysicsServer3D.SPACE_PARAM_SOLVER_ITERATIONS<class_PhysicsServer3D_constant_SPACE_PARAM_SOLVER_ITERATIONS>`. @@ -8779,7 +9468,7 @@ Number of solver iterations for all contacts and constraints. The greater the nu .. rst-class:: classref-property -:ref:`float<class_float>` **physics/3d/time_before_sleep** = ``0.5`` +:ref:`float<class_float>` **physics/3d/time_before_sleep** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_physics/3d/time_before_sleep>` Time (in seconds) of inactivity before which a 3D physics body will put to sleep. See :ref:`PhysicsServer3D.SPACE_PARAM_BODY_TIME_TO_SLEEP<class_PhysicsServer3D_constant_SPACE_PARAM_BODY_TIME_TO_SLEEP>`. @@ -8791,7 +9480,7 @@ Time (in seconds) of inactivity before which a 3D physics body will put to sleep .. rst-class:: classref-property -:ref:`bool<class_bool>` **physics/common/enable_object_picking** = ``true`` +:ref:`bool<class_bool>` **physics/common/enable_object_picking** = ``true`` :ref:`🔗<class_ProjectSettings_property_physics/common/enable_object_picking>` Enables :ref:`Viewport.physics_object_picking<class_Viewport_property_physics_object_picking>` on the root viewport. @@ -8803,7 +9492,7 @@ Enables :ref:`Viewport.physics_object_picking<class_Viewport_property_physics_ob .. rst-class:: classref-property -:ref:`int<class_int>` **physics/common/max_physics_steps_per_frame** = ``8`` +:ref:`int<class_int>` **physics/common/max_physics_steps_per_frame** = ``8`` :ref:`🔗<class_ProjectSettings_property_physics/common/max_physics_steps_per_frame>` Controls the maximum number of physics steps that can be simulated each rendered frame. The default value is tuned to avoid "spiral of death" situations where expensive physics simulations trigger more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than ``1 / max_physics_steps_per_frame`` of :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>`. This occurs even if ``delta`` is consistently used in physics calculations. To avoid this, increase :ref:`physics/common/max_physics_steps_per_frame<class_ProjectSettings_property_physics/common/max_physics_steps_per_frame>` if you have increased :ref:`physics/common/physics_ticks_per_second<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` significantly above its default value. @@ -8813,17 +9502,35 @@ Controls the maximum number of physics steps that can be simulated each rendered ---- +.. _class_ProjectSettings_property_physics/common/physics_interpolation: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **physics/common/physics_interpolation** = ``false`` :ref:`🔗<class_ProjectSettings_property_physics/common/physics_interpolation>` + +If ``true``, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. See also :ref:`Node.physics_interpolation_mode<class_Node_property_physics_interpolation_mode>` and :ref:`Node.reset_physics_interpolation<class_Node_method_reset_physics_interpolation>`. + +\ **Note:** If ``true``, the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix<class_ProjectSettings_property_physics/common/physics_jitter_fix>` to ``0.0``. + +\ **Note:** This property is only read when the project starts. To toggle physics interpolation at runtime, set :ref:`SceneTree.physics_interpolation<class_SceneTree_property_physics_interpolation>` instead. + +\ **Note:** This feature is currently only implemented in the 2D renderer. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_physics/common/physics_jitter_fix: .. rst-class:: classref-property -:ref:`float<class_float>` **physics/common/physics_jitter_fix** = ``0.5`` +:ref:`float<class_float>` **physics/common/physics_jitter_fix** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_physics/common/physics_jitter_fix>` -Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. +Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be good enough for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. -\ **Note:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix<class_ProjectSettings_property_physics/common/physics_jitter_fix>` to ``0``. +\ **Note:** When using a physics interpolation solution (such as enabling :ref:`physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>` or using a custom solution), the physics jitter fix should be disabled by setting :ref:`physics/common/physics_jitter_fix<class_ProjectSettings_property_physics/common/physics_jitter_fix>` to ``0.0``. -\ **Note:** This property is only read when the project starts. To change the physics FPS at runtime, set :ref:`Engine.physics_jitter_fix<class_Engine_property_physics_jitter_fix>` instead. +\ **Note:** This property is only read when the project starts. To change the physics jitter fix at runtime, set :ref:`Engine.physics_jitter_fix<class_Engine_property_physics_jitter_fix>` instead. .. rst-class:: classref-item-separator @@ -8833,9 +9540,9 @@ Controls how much physics ticks are synchronized with real time. For 0 or less, .. rst-class:: classref-property -:ref:`int<class_int>` **physics/common/physics_ticks_per_second** = ``60`` +:ref:`int<class_int>` **physics/common/physics_ticks_per_second** = ``60`` :ref:`🔗<class_ProjectSettings_property_physics/common/physics_ticks_per_second>` -The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process<class_Node_method__physics_process>` methods are run. See also :ref:`application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>`. +The number of fixed iterations per second. This controls how often physics simulation and :ref:`Node._physics_process<class_Node_private_method__physics_process>` methods are run. See also :ref:`application/run/max_fps<class_ProjectSettings_property_application/run/max_fps>`. \ **Note:** This property is only read when the project starts. To change the physics FPS at runtime, set :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>` instead. @@ -8849,7 +9556,7 @@ The number of fixed iterations per second. This controls how often physics simul .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/2d/sdf/oversize** = ``1`` +:ref:`int<class_int>` **rendering/2d/sdf/oversize** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/2d/sdf/oversize>` Controls how much of the original viewport size should be covered by the 2D signed distance field. This SDF can be sampled in :ref:`CanvasItem<class_CanvasItem>` shaders and is used for :ref:`GPUParticles2D<class_GPUParticles2D>` collision. Higher values allow portions of occluders located outside the viewport to still be taken into account in the generated signed distance field, at the cost of performance. If you notice particles falling through :ref:`LightOccluder2D<class_LightOccluder2D>`\ s as the occluders leave the viewport, increase this setting. @@ -8865,7 +9572,7 @@ The percentage specified is added on each axis and on both sides. For example, w .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/2d/sdf/scale** = ``1`` +:ref:`int<class_int>` **rendering/2d/sdf/scale** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/2d/sdf/scale>` The resolution scale to use for the 2D signed distance field. Higher values lead to a more precise and more stable signed distance field as the camera moves, at the cost of performance. The default value (50%) renders at half the resolution of the viewport size on each axis, which means the SDF is generated with 25% of the viewport's pixel count. @@ -8879,7 +9586,7 @@ The resolution scale to use for the 2D signed distance field. Higher values lead .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/2d/shadow_atlas/size** = ``2048`` +:ref:`int<class_int>` **rendering/2d/shadow_atlas/size** = ``2048`` :ref:`🔗<class_ProjectSettings_property_rendering/2d/shadow_atlas/size>` The size of the 2D shadow atlas in pixels. Higher values result in more precise :ref:`Light2D<class_Light2D>` shadows, at the cost of performance and video memory usage. The specified value is rounded up to the nearest power of 2. @@ -8893,14 +9600,16 @@ The size of the 2D shadow atlas in pixels. Higher values result in more precise .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/2d/snap/snap_2d_transforms_to_pixel** = ``false`` +:ref:`bool<class_bool>` **rendering/2d/snap/snap_2d_transforms_to_pixel** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel>` -If ``true``, :ref:`CanvasItem<class_CanvasItem>` nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. +If ``true``, :ref:`CanvasItem<class_CanvasItem>` nodes will internally snap to full pixels. Useful for low-resolution pixel art games. Their position can still be sub-pixel, but the decimals will not have effect as the position is rounded. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. \ **Note:** This property is only read when the project starts. To toggle 2D transform snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_transforms_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_transforms_to_pixel>` on the root :ref:`Viewport<class_Viewport>` instead. \ **Note:** :ref:`Control<class_Control>` nodes are snapped to the nearest pixel by default. This is controlled by :ref:`gui/common/snap_controls_to_pixels<class_ProjectSettings_property_gui/common/snap_controls_to_pixels>`. +\ **Note:** It is not recommended to use this setting together with :ref:`rendering/2d/snap/snap_2d_vertices_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel>`, as movement may appear even less smooth. Prefer only enabling this setting instead. + .. rst-class:: classref-item-separator ---- @@ -8909,14 +9618,16 @@ If ``true``, :ref:`CanvasItem<class_CanvasItem>` nodes will internally snap to f .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/2d/snap/snap_2d_vertices_to_pixel** = ``false`` +:ref:`bool<class_bool>` **rendering/2d/snap/snap_2d_vertices_to_pixel** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel>` -If ``true``, vertices of :ref:`CanvasItem<class_CanvasItem>` nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. +If ``true``, vertices of :ref:`CanvasItem<class_CanvasItem>` nodes will snap to full pixels. Useful for low-resolution pixel art games. Only affects the final vertex positions, not the transforms. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. \ **Note:** This property is only read when the project starts. To toggle 2D vertex snapping at runtime, use :ref:`RenderingServer.viewport_set_snap_2d_vertices_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_vertices_to_pixel>` on the root :ref:`Viewport<class_Viewport>` instead. \ **Note:** :ref:`Control<class_Control>` nodes are snapped to the nearest pixel by default. This is controlled by :ref:`gui/common/snap_controls_to_pixels<class_ProjectSettings_property_gui/common/snap_controls_to_pixels>`. +\ **Note:** It is not recommended to use this setting together with :ref:`rendering/2d/snap/snap_2d_transforms_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel>`, as movement may appear even less smooth. Prefer only enabling that setting instead. + .. rst-class:: classref-item-separator ---- @@ -8925,7 +9636,7 @@ If ``true``, vertices of :ref:`CanvasItem<class_CanvasItem>` nodes will snap to .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/anti_aliasing/quality/msaa_2d** = ``0`` +:ref:`int<class_int>` **rendering/anti_aliasing/quality/msaa_2d** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_2d>` Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. This has no effect on shader-induced aliasing or texture aliasing. @@ -8939,7 +9650,7 @@ Sets the number of MSAA samples to use for 2D/Canvas rendering (as a power of tw .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` +:ref:`int<class_int>` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_3d>` Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware, especially integrated graphics due to their limited memory bandwidth. See also :ref:`rendering/scaling_3d/mode<class_ProjectSettings_property_rendering/scaling_3d/mode>` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. @@ -8953,7 +9664,7 @@ Sets the number of MSAA samples to use for 3D rendering (as a power of two). MSA .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/anti_aliasing/quality/screen_space_aa** = ``0`` +:ref:`int<class_int>` **rendering/anti_aliasing/quality/screen_space_aa** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/quality/screen_space_aa>` Sets the screen-space antialiasing mode for the default screen :ref:`Viewport<class_Viewport>`. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. The blurriness is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias<class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias>`). @@ -8969,7 +9680,7 @@ Another way to combat specular aliasing is to enable :ref:`rendering/anti_aliasi .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/anti_aliasing/quality/use_debanding** = ``false`` +:ref:`bool<class_bool>` **rendering/anti_aliasing/quality/use_debanding** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_debanding>` If ``true``, uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is *not* affected by debanding unless the :ref:`Environment.background_mode<class_Environment_property_background_mode>` is :ref:`Environment.BG_CANVAS<class_Environment_constant_BG_CANVAS>`. @@ -8985,7 +9696,7 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/anti_aliasing/quality/use_taa** = ``false`` +:ref:`bool<class_bool>` **rendering/anti_aliasing/quality/use_taa** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>` Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport<class_Viewport>`. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. Enabling TAA can make the image blurrier, which is partially counteracted by automatically using a negative mipmap LOD bias (see :ref:`rendering/textures/default_filters/texture_mipmap_bias<class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias>`). @@ -9001,7 +9712,7 @@ Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport<class_Viewp .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** = ``0.25`` +:ref:`float<class_float>` **rendering/anti_aliasing/screen_space_roughness_limiter/amount** = ``0.25`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/amount>` **Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active<class_RenderingServer_method_screen_space_roughness_limiter_set_active>` instead. @@ -9013,7 +9724,7 @@ Enables Temporal Anti-Aliasing for the default screen :ref:`Viewport<class_Viewp .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/anti_aliasing/screen_space_roughness_limiter/enabled** = ``true`` +:ref:`bool<class_bool>` **rendering/anti_aliasing/screen_space_roughness_limiter/enabled** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/enabled>` If ``true``, enables a spatial filter to limit roughness in areas with high-frequency detail. This can help reduce specular aliasing to an extent, though not as much as enabling :ref:`rendering/anti_aliasing/quality/use_taa<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>`. This filter has a small performance cost, so consider disabling it if it doesn't benefit your scene noticeably. @@ -9029,7 +9740,7 @@ If ``true``, enables a spatial filter to limit roughness in areas with high-freq .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/anti_aliasing/screen_space_roughness_limiter/limit** = ``0.18`` +:ref:`float<class_float>` **rendering/anti_aliasing/screen_space_roughness_limiter/limit** = ``0.18`` :ref:`🔗<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/limit>` **Note:** This property is only read when the project starts. To control the screen-space roughness limiter at runtime, call :ref:`RenderingServer.screen_space_roughness_limiter_set_active<class_RenderingServer_method_screen_space_roughness_limiter_set_active>` instead. @@ -9041,7 +9752,7 @@ If ``true``, enables a spatial filter to limit roughness in areas with high-freq .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/camera/depth_of_field/depth_of_field_bokeh_quality** = ``1`` +:ref:`int<class_int>` **rendering/camera/depth_of_field/depth_of_field_bokeh_quality** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_bokeh_quality>` Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. @@ -9053,7 +9764,7 @@ Sets the quality of the depth of field effect. Higher quality takes more samples .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/camera/depth_of_field/depth_of_field_bokeh_shape** = ``1`` +:ref:`int<class_int>` **rendering/camera/depth_of_field/depth_of_field_bokeh_shape** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_bokeh_shape>` Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute. @@ -9065,7 +9776,7 @@ Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastes .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/camera/depth_of_field/depth_of_field_use_jitter** = ``false`` +:ref:`bool<class_bool>` **rendering/camera/depth_of_field/depth_of_field_use_jitter** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/camera/depth_of_field/depth_of_field_use_jitter>` If ``true``, jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples. @@ -9077,7 +9788,7 @@ If ``true``, jitters DOF samples to make effect slightly blurrier and hide lines .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/driver/depth_prepass/disable_for_vendors** = ``"PowerVR,Mali,Adreno,Apple"`` +:ref:`String<class_String>` **rendering/driver/depth_prepass/disable_for_vendors** = ``"PowerVR,Mali,Adreno,Apple"`` :ref:`🔗<class_ProjectSettings_property_rendering/driver/depth_prepass/disable_for_vendors>` Disables :ref:`rendering/driver/depth_prepass/enable<class_ProjectSettings_property_rendering/driver/depth_prepass/enable>` conditionally for certain vendors. By default, disables the depth prepass for mobile devices as mobile devices do not benefit from the depth prepass due to their unique architecture. @@ -9089,7 +9800,7 @@ Disables :ref:`rendering/driver/depth_prepass/enable<class_ProjectSettings_prope .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/driver/depth_prepass/enable** = ``true`` +:ref:`bool<class_bool>` **rendering/driver/depth_prepass/enable** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/driver/depth_prepass/enable>` If ``true``, performs a previous depth pass before rendering 3D materials. This increases performance significantly in scenes with high overdraw, when complex materials and lighting are used. However, in scenes with few occluded surfaces, the depth prepass may reduce performance. If your game is viewed from a fixed angle that makes it easy to avoid overdraw (such as top-down or side-scrolling perspective), consider disabling the depth prepass to improve performance. This setting can be changed at run-time to optimize performance depending on the scene currently being viewed. @@ -9103,11 +9814,11 @@ If ``true``, performs a previous depth pass before rendering 3D materials. This .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/driver/threads/thread_model** = ``1`` +:ref:`int<class_int>` **rendering/driver/threads/thread_model** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/driver/threads/thread_model>` -The thread model to use for rendering. Rendering on a thread may improve performance, but synchronizing to the main thread can cause a bit more jitter. +**Experimental:** This setting has several known bugs which can lead to crashing, especially when using particles or resizing the window. Not recommended for use in production at this stage. -\ **Note:** The **Multi-Threaded** option is experimental, and has several known bugs which can lead to crashing, especially when using particles or resizing the window. Not recommended for use in production at this stage. +The thread model to use for rendering. Rendering on a thread may improve performance, but synchronizing to the main thread can cause a bit more jitter. .. rst-class:: classref-item-separator @@ -9117,7 +9828,7 @@ The thread model to use for rendering. Rendering on a thread may improve perform .. rst-class:: classref-property -:ref:`Color<class_Color>` **rendering/environment/defaults/default_clear_color** = ``Color(0.3, 0.3, 0.3, 1)`` +:ref:`Color<class_Color>` **rendering/environment/defaults/default_clear_color** = ``Color(0.3, 0.3, 0.3, 1)`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>` Default background clear color. Overridable per :ref:`Viewport<class_Viewport>` using its :ref:`Environment<class_Environment>`. See :ref:`Environment.background_mode<class_Environment_property_background_mode>` and :ref:`Environment.background_color<class_Environment_property_background_color>` in particular. To change this default color programmatically, use :ref:`RenderingServer.set_default_clear_color<class_RenderingServer_method_set_default_clear_color>`. @@ -9129,7 +9840,7 @@ Default background clear color. Overridable per :ref:`Viewport<class_Viewport>` .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/environment/defaults/default_environment** = ``""`` +:ref:`String<class_String>` **rendering/environment/defaults/default_environment** = ``""`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/defaults/default_environment>` :ref:`Environment<class_Environment>` that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, you do not need to set this property. @@ -9141,7 +9852,7 @@ Default background clear color. Overridable per :ref:`Viewport<class_Viewport>` .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/glow/upscale_mode** = ``1`` +:ref:`int<class_int>` **rendering/environment/glow/upscale_mode** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/glow/upscale_mode>` Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth. @@ -9153,7 +9864,7 @@ Sets how the glow effect is upscaled before being copied onto the screen. Linear .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/glow/upscale_mode.mobile** = ``0`` +:ref:`int<class_int>` **rendering/environment/glow/upscale_mode.mobile** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/glow/upscale_mode.mobile>` Lower-end override for :ref:`rendering/environment/glow/upscale_mode<class_ProjectSettings_property_rendering/environment/glow/upscale_mode>` on mobile devices, due to performance concerns or driver support. @@ -9165,7 +9876,7 @@ Lower-end override for :ref:`rendering/environment/glow/upscale_mode<class_Proje .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/screen_space_reflection/roughness_quality** = ``1`` +:ref:`int<class_int>` **rendering/environment/screen_space_reflection/roughness_quality** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/screen_space_reflection/roughness_quality>` Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. @@ -9177,7 +9888,7 @@ Sets the quality for rough screen-space reflections. Turning off will make all s .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssao/adaptive_target** = ``0.5`` +:ref:`float<class_float>` **rendering/environment/ssao/adaptive_target** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/adaptive_target>` Quality target to use when :ref:`rendering/environment/ssao/quality<class_ProjectSettings_property_rendering/environment/ssao/quality>` is set to ``Ultra``. A value of ``0.0`` provides a quality and speed similar to ``Medium`` while a value of ``1.0`` provides much higher quality than any of the other settings at the cost of performance. @@ -9189,7 +9900,7 @@ Quality target to use when :ref:`rendering/environment/ssao/quality<class_Projec .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/ssao/blur_passes** = ``2`` +:ref:`int<class_int>` **rendering/environment/ssao/blur_passes** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/blur_passes>` Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. @@ -9201,7 +9912,7 @@ Number of blur passes to use when computing screen-space ambient occlusion. A hi .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssao/fadeout_from** = ``50.0`` +:ref:`float<class_float>` **rendering/environment/ssao/fadeout_from** = ``50.0`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/fadeout_from>` Distance at which the screen-space ambient occlusion effect starts to fade out. Use this hide ambient occlusion at great distances. @@ -9213,7 +9924,7 @@ Distance at which the screen-space ambient occlusion effect starts to fade out. .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssao/fadeout_to** = ``300.0`` +:ref:`float<class_float>` **rendering/environment/ssao/fadeout_to** = ``300.0`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/fadeout_to>` Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances. @@ -9225,7 +9936,7 @@ Distance at which the screen-space ambient occlusion is fully faded out. Use thi .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/environment/ssao/half_size** = ``true`` +:ref:`bool<class_bool>` **rendering/environment/ssao/half_size** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/half_size>` If ``true``, screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. If ``false``, screen-space ambient occlusion will be rendered at full size. @@ -9237,7 +9948,7 @@ If ``true``, screen-space ambient occlusion will be rendered at half size and th .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/ssao/quality** = ``2`` +:ref:`int<class_int>` **rendering/environment/ssao/quality** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssao/quality>` Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to ``Ultra`` will use the :ref:`rendering/environment/ssao/adaptive_target<class_ProjectSettings_property_rendering/environment/ssao/adaptive_target>` setting. @@ -9249,7 +9960,7 @@ Sets the quality of the screen-space ambient occlusion effect. Higher values tak .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssil/adaptive_target** = ``0.5`` +:ref:`float<class_float>` **rendering/environment/ssil/adaptive_target** = ``0.5`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/adaptive_target>` Quality target to use when :ref:`rendering/environment/ssil/quality<class_ProjectSettings_property_rendering/environment/ssil/quality>` is set to ``Ultra``. A value of ``0.0`` provides a quality and speed similar to ``Medium`` while a value of ``1.0`` provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene. @@ -9261,7 +9972,7 @@ Quality target to use when :ref:`rendering/environment/ssil/quality<class_Projec .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/ssil/blur_passes** = ``4`` +:ref:`int<class_int>` **rendering/environment/ssil/blur_passes** = ``4`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/blur_passes>` Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. @@ -9273,7 +9984,7 @@ Number of blur passes to use when computing screen-space indirect lighting. A hi .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssil/fadeout_from** = ``50.0`` +:ref:`float<class_float>` **rendering/environment/ssil/fadeout_from** = ``50.0`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/fadeout_from>` Distance at which the screen-space indirect lighting effect starts to fade out. Use this hide screen-space indirect lighting at great distances. @@ -9285,7 +9996,7 @@ Distance at which the screen-space indirect lighting effect starts to fade out. .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/ssil/fadeout_to** = ``300.0`` +:ref:`float<class_float>` **rendering/environment/ssil/fadeout_to** = ``300.0`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/fadeout_to>` Distance at which the screen-space indirect lighting is fully faded out. Use this hide screen-space indirect lighting at great distances. @@ -9297,7 +10008,7 @@ Distance at which the screen-space indirect lighting is fully faded out. Use thi .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/environment/ssil/half_size** = ``true`` +:ref:`bool<class_bool>` **rendering/environment/ssil/half_size** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/half_size>` If ``true``, screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges. @@ -9309,7 +10020,7 @@ If ``true``, screen-space indirect lighting will be rendered at half size and th .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/ssil/quality** = ``2`` +:ref:`int<class_int>` **rendering/environment/ssil/quality** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/ssil/quality>` Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to ``Ultra`` will use the :ref:`rendering/environment/ssil/adaptive_target<class_ProjectSettings_property_rendering/environment/ssil/adaptive_target>` setting. @@ -9321,7 +10032,7 @@ Sets the quality of the screen-space indirect lighting effect. Higher values tak .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale** = ``0.01`` +:ref:`float<class_float>` **rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale** = ``0.01`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale>` Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth. See also :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_scale<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_scale>`. @@ -9335,7 +10046,7 @@ Scales the depth over which the subsurface scattering effect is applied. A high .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/subsurface_scattering/subsurface_scattering_quality** = ``1`` +:ref:`int<class_int>` **rendering/environment/subsurface_scattering/subsurface_scattering_quality** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_quality>` Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. This affects the rendering of materials that have :ref:`BaseMaterial3D.subsurf_scatter_enabled<class_BaseMaterial3D_property_subsurf_scatter_enabled>` set to ``true``, along with :ref:`ShaderMaterial<class_ShaderMaterial>`\ s that set ``SSS_STRENGTH``. @@ -9349,7 +10060,7 @@ Sets the quality of the subsurface scattering effect. Higher values are slower b .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/environment/subsurface_scattering/subsurface_scattering_scale** = ``0.05`` +:ref:`float<class_float>` **rendering/environment/subsurface_scattering/subsurface_scattering_scale** = ``0.05`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_scale>` Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light. See also :ref:`rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale>`. @@ -9363,7 +10074,7 @@ Scales the distance over which samples are taken for subsurface scattering effec .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/volumetric_fog/use_filter** = ``1`` +:ref:`int<class_int>` **rendering/environment/volumetric_fog/use_filter** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/volumetric_fog/use_filter>` Enables filtering of the volumetric fog effect prior to integration. This substantially blurs the fog which reduces fine details but also smooths out harsh edges and aliasing artifacts. Disable when more detail is required. @@ -9375,7 +10086,7 @@ Enables filtering of the volumetric fog effect prior to integration. This substa .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/volumetric_fog/volume_depth** = ``64`` +:ref:`int<class_int>` **rendering/environment/volumetric_fog/volume_depth** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>` Number of slices to use along the depth of the froxel buffer for volumetric fog. A lower number will be more efficient but may result in artifacts appearing during camera movement. See also :ref:`Environment.volumetric_fog_length<class_Environment_property_volumetric_fog_length>`. @@ -9387,7 +10098,7 @@ Number of slices to use along the depth of the froxel buffer for volumetric fog. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/environment/volumetric_fog/volume_size** = ``64`` +:ref:`int<class_int>` **rendering/environment/volumetric_fog/volume_size** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_size>` Base size used to determine size of froxel buffer in the camera X-axis and Y-axis. The final size is scaled by the aspect ratio of the screen, so actual values may differ from what is set. Set a larger size for more detailed fog, set a smaller size for better performance. @@ -9399,7 +10110,7 @@ Base size used to determine size of froxel buffer in the camera X-axis and Y-axi .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver>` Sets the driver to be used by the renderer when using the Compatibility renderer. This property can not be edited directly, instead, set the driver using the platform-specific overrides. @@ -9411,7 +10122,7 @@ Sets the driver to be used by the renderer when using the Compatibility renderer .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.android** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.android** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.android>` Android override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9423,7 +10134,7 @@ Android override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettin .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.ios** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.ios** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.ios>` iOS override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9435,7 +10146,7 @@ iOS override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.linuxbsd** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.linuxbsd** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.linuxbsd>` LinuxBSD override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9447,7 +10158,7 @@ LinuxBSD override for :ref:`rendering/gl_compatibility/driver<class_ProjectSetti .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.macos** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.macos** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.macos>` macOS override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9459,7 +10170,7 @@ macOS override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.web** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.web** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.web>` Web override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9471,7 +10182,7 @@ Web override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/gl_compatibility/driver.windows** = ``"opengl3"`` +:ref:`String<class_String>` **rendering/gl_compatibility/driver.windows** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/driver.windows>` Windows override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`. @@ -9479,11 +10190,69 @@ Windows override for :ref:`rendering/gl_compatibility/driver<class_ProjectSettin ---- +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_angle: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/gl_compatibility/fallback_to_angle** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_angle>` + +If ``true``, the compatibility renderer will fall back to ANGLE if native OpenGL is not supported or the device is listed in :ref:`rendering/gl_compatibility/force_angle_on_devices<class_ProjectSettings_property_rendering/gl_compatibility/force_angle_on_devices>`. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_gles: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/gl_compatibility/fallback_to_gles** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_gles>` + +If ``true``, the compatibility renderer will fall back to OpenGLES if desktop OpenGL is not supported. + +\ **Note:** This setting is implemented only on Linux/X11. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_native: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/gl_compatibility/fallback_to_native** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_native>` + +If ``true``, the compatibility renderer will fall back to native OpenGL if ANGLE over Metal is not supported. + +\ **Note:** This setting is implemented only on macOS. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/force_angle_on_devices: + +.. rst-class:: classref-property + +:ref:`Array<class_Array>` **rendering/gl_compatibility/force_angle_on_devices** :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/force_angle_on_devices>` + +An :ref:`Array<class_Array>` of devices which should always use the ANGLE renderer. + +Each entry is a :ref:`Dictionary<class_Dictionary>` with the following keys: ``vendor`` and ``name``. ``name`` can be set to ``*`` to add all devices with the specified ``vendor``. + +\ **Note:** This setting is implemented only on Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/gl_compatibility/item_buffer_size: .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/gl_compatibility/item_buffer_size** = ``16384`` +:ref:`int<class_int>` **rendering/gl_compatibility/item_buffer_size** = ``16384`` :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/item_buffer_size>` Maximum number of canvas items commands that can be drawn in a single viewport update. If more render commands are issued they will be ignored. Decreasing this limit may improve performance on bandwidth limited devices. Increase this limit if you find that not all objects are being drawn in a frame. @@ -9495,7 +10264,7 @@ Maximum number of canvas items commands that can be drawn in a single viewport u .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/gl_compatibility/nvidia_disable_threaded_optimization** = ``true`` +:ref:`bool<class_bool>` **rendering/gl_compatibility/nvidia_disable_threaded_optimization** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/gl_compatibility/nvidia_disable_threaded_optimization>` If ``true``, disables the threaded optimization feature from the NVIDIA drivers, which are known to cause stuttering in most OpenGL applications. @@ -9509,7 +10278,7 @@ If ``true``, disables the threaded optimization feature from the NVIDIA drivers, .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/global_illumination/gi/use_half_resolution** = ``false`` +:ref:`bool<class_bool>` **rendering/global_illumination/gi/use_half_resolution** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution>` If ``true``, renders :ref:`VoxelGI<class_VoxelGI>` and SDFGI (:ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`) buffers at halved resolution (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. :ref:`LightmapGI<class_LightmapGI>` rendering is not affected by this setting. @@ -9523,7 +10292,7 @@ If ``true``, renders :ref:`VoxelGI<class_VoxelGI>` and SDFGI (:ref:`Environment. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/global_illumination/sdfgi/frames_to_converge** = ``5`` +:ref:`int<class_int>` **rendering/global_illumination/sdfgi/frames_to_converge** = ``5`` :ref:`🔗<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_converge>` The number of frames to use for converging signed distance field global illumination. Higher values lead to a less noisy result, at the cost of taking a longer time to fully converge. This means the scene's global illumination will be too dark for a longer period of time, especially when the camera moves fast. The actual convergence speed depends on rendered framerate. For example, with the default setting of 30 frames, rendering at 60 FPS will make SDFGI fully converge after 0.5 seconds. See also :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_update_lights>` and :ref:`rendering/global_illumination/sdfgi/probe_ray_count<class_ProjectSettings_property_rendering/global_illumination/sdfgi/probe_ray_count>`. @@ -9537,7 +10306,7 @@ The number of frames to use for converging signed distance field global illumina .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/global_illumination/sdfgi/frames_to_update_lights** = ``2`` +:ref:`int<class_int>` **rendering/global_illumination/sdfgi/frames_to_update_lights** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_update_lights>` The number of frames over which dynamic lights should be updated in signed distance field global illumination. Higher values take more time to update indirect lighting coming from dynamic lights, but result in better performance when many dynamic lights are present. See also :ref:`rendering/global_illumination/sdfgi/frames_to_converge<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_converge>` and :ref:`rendering/global_illumination/sdfgi/probe_ray_count<class_ProjectSettings_property_rendering/global_illumination/sdfgi/probe_ray_count>`. @@ -9553,7 +10322,7 @@ The number of frames over which dynamic lights should be updated in signed dista .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/global_illumination/sdfgi/probe_ray_count** = ``1`` +:ref:`int<class_int>` **rendering/global_illumination/sdfgi/probe_ray_count** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/global_illumination/sdfgi/probe_ray_count>` The number of rays to throw per frame when computing signed distance field global illumination. Higher values lead to a less noisy result, at the cost of performance. See also :ref:`rendering/global_illumination/sdfgi/frames_to_converge<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_converge>` and :ref:`rendering/global_illumination/sdfgi/frames_to_update_lights<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_update_lights>`. @@ -9567,7 +10336,7 @@ The number of rays to throw per frame when computing signed distance field globa .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/global_illumination/voxel_gi/quality** = ``0`` +:ref:`int<class_int>` **rendering/global_illumination/voxel_gi/quality** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/global_illumination/voxel_gi/quality>` The VoxelGI quality to use. High quality leads to more precise lighting and better reflections, but is slower to render. This setting does not affect the baked data and doesn't require baking the :ref:`VoxelGI<class_VoxelGI>` again to apply. @@ -9581,7 +10350,7 @@ The VoxelGI quality to use. High quality leads to more precise lighting and bett .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_performance/max_rays_per_pass** = ``32`` +:ref:`int<class_int>` **rendering/lightmapping/bake_performance/max_rays_per_pass** = ``32`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_performance/max_rays_per_pass>` The maximum number of rays that can be thrown per pass when baking lightmaps with :ref:`LightmapGI<class_LightmapGI>`. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times. @@ -9593,7 +10362,7 @@ The maximum number of rays that can be thrown per pass when baking lightmaps wit .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_performance/max_rays_per_probe_pass** = ``64`` +:ref:`int<class_int>` **rendering/lightmapping/bake_performance/max_rays_per_probe_pass** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_performance/max_rays_per_probe_pass>` The maximum number of rays that can be thrown per pass when baking dynamic object lighting in :ref:`LightmapProbe<class_LightmapProbe>`\ s with :ref:`LightmapGI<class_LightmapGI>`. Depending on the scene, adjusting this value may result in higher GPU utilization when baking lightmaps, leading to faster bake times. @@ -9605,7 +10374,7 @@ The maximum number of rays that can be thrown per pass when baking dynamic objec .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_performance/region_size** = ``512`` +:ref:`int<class_int>` **rendering/lightmapping/bake_performance/region_size** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_performance/region_size>` The region size to use when baking lightmaps with :ref:`LightmapGI<class_LightmapGI>`. @@ -9617,7 +10386,7 @@ The region size to use when baking lightmaps with :ref:`LightmapGI<class_Lightma .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/high_quality_probe_ray_count** = ``512`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/high_quality_probe_ray_count** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_probe_ray_count>` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe<class_LightmapProbe>`\ s when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_HIGH<class_LightmapGI_constant_BAKE_QUALITY_HIGH>`. @@ -9629,7 +10398,7 @@ The number of rays to use for baking dynamic object lighting in :ref:`LightmapPr .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/high_quality_ray_count** = ``256`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/high_quality_ray_count** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/high_quality_ray_count>` The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_LightmapGI>` when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_HIGH<class_LightmapGI_constant_BAKE_QUALITY_HIGH>`. @@ -9641,7 +10410,7 @@ The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_Light .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/low_quality_probe_ray_count** = ``64`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/low_quality_probe_ray_count** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_probe_ray_count>` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe<class_LightmapProbe>`\ s when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_LOW<class_LightmapGI_constant_BAKE_QUALITY_LOW>`. @@ -9653,7 +10422,7 @@ The number of rays to use for baking dynamic object lighting in :ref:`LightmapPr .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/low_quality_ray_count** = ``16`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/low_quality_ray_count** = ``32`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/low_quality_ray_count>` The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_LightmapGI>` when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_LOW<class_LightmapGI_constant_BAKE_QUALITY_LOW>`. @@ -9665,7 +10434,7 @@ The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_Light .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/medium_quality_probe_ray_count** = ``256`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/medium_quality_probe_ray_count** = ``256`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_probe_ray_count>` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe<class_LightmapProbe>`\ s when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_MEDIUM<class_LightmapGI_constant_BAKE_QUALITY_MEDIUM>`. @@ -9677,7 +10446,7 @@ The number of rays to use for baking dynamic object lighting in :ref:`LightmapPr .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/medium_quality_ray_count** = ``64`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/medium_quality_ray_count** = ``128`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/medium_quality_ray_count>` The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_LightmapGI>` when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_MEDIUM<class_LightmapGI_constant_BAKE_QUALITY_MEDIUM>`. @@ -9689,7 +10458,7 @@ The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_Light .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count** = ``2048`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count** = ``2048`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count>` The number of rays to use for baking dynamic object lighting in :ref:`LightmapProbe<class_LightmapProbe>`\ s when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_ULTRA<class_LightmapGI_constant_BAKE_QUALITY_ULTRA>`. @@ -9701,7 +10470,7 @@ The number of rays to use for baking dynamic object lighting in :ref:`LightmapPr .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** = ``1024`` +:ref:`int<class_int>` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** = ``2048`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/bake_quality/ultra_quality_ray_count>` The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_LightmapGI>` when :ref:`LightmapGI.quality<class_LightmapGI_property_quality>` is :ref:`LightmapGI.BAKE_QUALITY_ULTRA<class_LightmapGI_constant_BAKE_QUALITY_ULTRA>`. @@ -9709,11 +10478,35 @@ The number of rays to use for baking lightmaps with :ref:`LightmapGI<class_Light ---- +.. _class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/lightmapping/denoising/denoiser** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser>` + +Denoiser tool used for denoising lightmaps. + +Using `OpenImageDenoise <https://www.openimagedenoise.org/>`__ (OIDN) requires configuring a path to an OIDN executable in the editor settings at :ref:`EditorSettings.filesystem/tools/oidn/oidn_denoise_path<class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path>`. OIDN can be downloaded from `OpenImageDenoise's downloads page <https://www.openimagedenoise.org/downloads.html>`__. + +OIDN will use GPU acceleration when available. Unlike JNLM which uses compute shaders for acceleration, OIDN uses vendor-specific acceleration methods. For GPU acceleration to be available, the following libraries must be installed on the system depending on your GPU: + +- NVIDIA GPUs: CUDA libraries + +- AMD GPUs: HIP libraries + +- Intel GPUs: SYCL libraries + +If no GPU acceleration is configured on the system, multi-threaded CPU-based denoising will be performed instead. This CPU-based denoising is significantly slower than the JNLM denoiser in most cases. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size: .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/lightmapping/primitive_meshes/texel_size** = ``0.2`` +:ref:`float<class_float>` **rendering/lightmapping/primitive_meshes/texel_size** = ``0.2`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size>` The texel_size that is used to calculate the :ref:`Mesh.lightmap_size_hint<class_Mesh_property_lightmap_size_hint>` on :ref:`PrimitiveMesh<class_PrimitiveMesh>` resources if :ref:`PrimitiveMesh.add_uv2<class_PrimitiveMesh_property_add_uv2>` is enabled. @@ -9725,7 +10518,7 @@ The texel_size that is used to calculate the :ref:`Mesh.lightmap_size_hint<class .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/lightmapping/probe_capture/update_speed** = ``15`` +:ref:`float<class_float>` **rendering/lightmapping/probe_capture/update_speed** = ``15`` :ref:`🔗<class_ProjectSettings_property_rendering/lightmapping/probe_capture/update_speed>` The framerate-independent update speed when representing dynamic object lighting from :ref:`LightmapProbe<class_LightmapProbe>`\ s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. @@ -9737,7 +10530,7 @@ The framerate-independent update speed when representing dynamic object lighting .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/lights_and_shadows/directional_shadow/16_bits** = ``true`` +:ref:`bool<class_bool>` **rendering/lights_and_shadows/directional_shadow/16_bits** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/16_bits>` Use 16 bits for the directional shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. @@ -9749,7 +10542,7 @@ Use 16 bits for the directional shadow depth map. Enabling this results in shado .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/size** = ``4096`` +:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/size** = ``4096`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size>` The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value is rounded up to the nearest power of 2. @@ -9761,7 +10554,7 @@ The directional shadow's size in pixels. Higher values will result in sharper sh .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/size.mobile** = ``2048`` +:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/size.mobile** = ``2048`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size.mobile>` Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/size<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size>` on mobile devices, due to performance concerns or driver support. @@ -9773,7 +10566,7 @@ Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/siz .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality** = ``2`` +:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality>` Quality setting for shadows cast by :ref:`DirectionalLight3D<class_DirectionalLight3D>`\ s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. @@ -9789,7 +10582,7 @@ Quality setting for shadows cast by :ref:`DirectionalLight3D<class_DirectionalLi .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile** = ``0`` +:ref:`int<class_int>` **rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality.mobile>` Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality>` on mobile devices, due to performance concerns or driver support. @@ -9801,7 +10594,7 @@ Lower-end override for :ref:`rendering/lights_and_shadows/directional_shadow/sof .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/lights_and_shadows/positional_shadow/atlas_16_bits** = ``true`` +:ref:`bool<class_bool>` **rendering/lights_and_shadows/positional_shadow/atlas_16_bits** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_16_bits>` Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. @@ -9813,7 +10606,7 @@ Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv** = ``2`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_0_subdiv>` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. @@ -9825,7 +10618,7 @@ Subdivision quadrant size for shadow mapping. See shadow mapping documentation. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv** = ``2`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_1_subdiv>` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. @@ -9837,7 +10630,7 @@ Subdivision quadrant size for shadow mapping. See shadow mapping documentation. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv** = ``3`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv** = ``3`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_2_subdiv>` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. @@ -9849,7 +10642,7 @@ Subdivision quadrant size for shadow mapping. See shadow mapping documentation. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv** = ``4`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv** = ``4`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_quadrant_3_subdiv>` Subdivision quadrant size for shadow mapping. See shadow mapping documentation. @@ -9861,7 +10654,7 @@ Subdivision quadrant size for shadow mapping. See shadow mapping documentation. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_size** = ``4096`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_size** = ``4096`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_size>` Size for shadow atlas (used for OmniLights and SpotLights). See documentation. @@ -9873,7 +10666,7 @@ Size for shadow atlas (used for OmniLights and SpotLights). See documentation. .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_size.mobile** = ``2048`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/atlas_size.mobile** = ``2048`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_size.mobile>` Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/atlas_size<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/atlas_size>` on mobile devices, due to performance concerns or driver support. @@ -9885,7 +10678,7 @@ Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/atla .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality** = ``2`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality>` Quality setting for shadows cast by :ref:`OmniLight3D<class_OmniLight3D>`\ s and :ref:`SpotLight3D<class_SpotLight3D>`\ s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. @@ -9901,7 +10694,7 @@ Quality setting for shadows cast by :ref:`OmniLight3D<class_OmniLight3D>`\ s and .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile** = ``0`` +:ref:`int<class_int>` **rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality.mobile>` Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality>` on mobile devices, due to performance concerns or driver support. @@ -9909,43 +10702,43 @@ Lower-end override for :ref:`rendering/lights_and_shadows/positional_shadow/soft ---- -.. _class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units: +.. _class_ProjectSettings_property_rendering/lights_and_shadows/tighter_shadow_caster_culling: .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/lights_and_shadows/use_physical_light_units** = ``false`` +:ref:`bool<class_bool>` **rendering/lights_and_shadows/tighter_shadow_caster_culling** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/tighter_shadow_caster_culling>` -Enables the use of physically based units for light sources. Physically based units tend to be much larger than the arbitrary units used by Godot, but they can be used to match lighting within Godot to real-world lighting. Due to the large dynamic range of lighting conditions present in nature, Godot bakes exposure into the various lighting quantities before rendering. Most light sources bake exposure automatically at run time based on the active :ref:`CameraAttributes<class_CameraAttributes>` resource, but :ref:`LightmapGI<class_LightmapGI>` and :ref:`VoxelGI<class_VoxelGI>` require a :ref:`CameraAttributes<class_CameraAttributes>` resource to be set at bake time to reduce the dynamic range. At run time, Godot will automatically reconcile the baked exposure with the active exposure to ensure lighting remains consistent. +If ``true``, items that cannot cast shadows into the view frustum will not be rendered into shadow maps. + +This can increase performance. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_rendering/limits/cluster_builder/max_clustered_elements: +.. _class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units: .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/limits/cluster_builder/max_clustered_elements** = ``512`` - -The maximum number of clustered elements (:ref:`OmniLight3D<class_OmniLight3D>` + :ref:`SpotLight3D<class_SpotLight3D>` + :ref:`Decal<class_Decal>` + :ref:`ReflectionProbe<class_ReflectionProbe>`) that can be rendered at once in the camera view. If there are more clustered elements present in the camera view, some of them will not be rendered (leading to pop-in during camera movement). Enabling distance fade on lights and decals (:ref:`Light3D.distance_fade_enabled<class_Light3D_property_distance_fade_enabled>`, :ref:`Decal.distance_fade_enabled<class_Decal_property_distance_fade_enabled>`) can help avoid reaching this limit. - -Decreasing this value may improve GPU performance on certain setups, even if the maximum number of clustered elements is never reached in the project. +:ref:`bool<class_bool>` **rendering/lights_and_shadows/use_physical_light_units** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` -\ **Note:** This setting is only effective when using the Forward+ rendering method, not Mobile and Compatibility. +Enables the use of physically based units for light sources. Physically based units tend to be much larger than the arbitrary units used by Godot, but they can be used to match lighting within Godot to real-world lighting. Due to the large dynamic range of lighting conditions present in nature, Godot bakes exposure into the various lighting quantities before rendering. Most light sources bake exposure automatically at run time based on the active :ref:`CameraAttributes<class_CameraAttributes>` resource, but :ref:`LightmapGI<class_LightmapGI>` and :ref:`VoxelGI<class_VoxelGI>` require a :ref:`CameraAttributes<class_CameraAttributes>` resource to be set at bake time to reduce the dynamic range. At run time, Godot will automatically reconcile the baked exposure with the active exposure to ensure lighting remains consistent. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_rendering/limits/forward_renderer/threaded_render_minimum_instances: +.. _class_ProjectSettings_property_rendering/limits/cluster_builder/max_clustered_elements: .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/forward_renderer/threaded_render_minimum_instances** = ``500`` +:ref:`float<class_float>` **rendering/limits/cluster_builder/max_clustered_elements** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/cluster_builder/max_clustered_elements>` -.. container:: contribute +The maximum number of clustered elements (:ref:`OmniLight3D<class_OmniLight3D>` + :ref:`SpotLight3D<class_SpotLight3D>` + :ref:`Decal<class_Decal>` + :ref:`ReflectionProbe<class_ReflectionProbe>`) that can be rendered at once in the camera view. If there are more clustered elements present in the camera view, some of them will not be rendered (leading to pop-in during camera movement). Enabling distance fade on lights and decals (:ref:`Light3D.distance_fade_enabled<class_Light3D_property_distance_fade_enabled>`, :ref:`Decal.distance_fade_enabled<class_Decal_property_distance_fade_enabled>`) can help avoid reaching this limit. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Decreasing this value may improve GPU performance on certain setups, even if the maximum number of clustered elements is never reached in the project. + +\ **Note:** This setting is only effective when using the Forward+ rendering method, not Mobile and Compatibility. .. rst-class:: classref-item-separator @@ -9955,11 +10748,11 @@ Decreasing this value may improve GPU performance on certain setups, even if the .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/global_shader_variables/buffer_size** = ``65536`` +:ref:`int<class_int>` **rendering/limits/global_shader_variables/buffer_size** = ``65536`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/global_shader_variables/buffer_size>` -.. container:: contribute +The maximum number of uniforms that can be used by the global shader uniform buffer. Each item takes up one slot. In other words, a single uniform float and a uniform vec4 will take the same amount of space in the buffer. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** When using the Compatibility backend, most mobile devices (and all web exports) will be limited to a maximum size of 1024 due to hardware constraints. .. rst-class:: classref-item-separator @@ -9969,7 +10762,7 @@ Decreasing this value may improve GPU performance on certain setups, even if the .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/opengl/max_lights_per_object** = ``8`` +:ref:`int<class_int>` **rendering/limits/opengl/max_lights_per_object** = ``8`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/opengl/max_lights_per_object>` Max number of omnilights and spotlights renderable per object. At the default value of 8, this means that each surface can be affected by up to 8 omnilights and 8 spotlights. This is further limited by hardware support and :ref:`rendering/limits/opengl/max_renderable_lights<class_ProjectSettings_property_rendering/limits/opengl/max_renderable_lights>`. Setting this low will slightly reduce memory usage, may decrease shader compile times, and may result in faster rendering on low-end, mobile, or web devices. @@ -9983,7 +10776,7 @@ Max number of omnilights and spotlights renderable per object. At the default va .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/opengl/max_renderable_elements** = ``65536`` +:ref:`int<class_int>` **rendering/limits/opengl/max_renderable_elements** = ``65536`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/opengl/max_renderable_elements>` Max number of elements renderable in a frame. If more elements than this are visible per frame, they will not be drawn. Keep in mind elements refer to mesh surfaces and not meshes themselves. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. @@ -9997,7 +10790,7 @@ Max number of elements renderable in a frame. If more elements than this are vis .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/opengl/max_renderable_lights** = ``32`` +:ref:`int<class_int>` **rendering/limits/opengl/max_renderable_lights** = ``32`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/opengl/max_renderable_lights>` Max number of positional lights renderable in a frame. If more lights than this number are used, they will be ignored. Setting this low will slightly reduce memory usage and may decrease shader compile times, particularly on web. For most uses, the default value is suitable, but consider lowering as much as possible on web export. @@ -10011,11 +10804,9 @@ Max number of positional lights renderable in a frame. If more lights than this .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/spatial_indexer/threaded_cull_minimum_instances** = ``1000`` +:ref:`int<class_int>` **rendering/limits/spatial_indexer/threaded_cull_minimum_instances** = ``1000`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/spatial_indexer/threaded_cull_minimum_instances>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The minimum number of instances that must be present in a scene to enable culling computations on multiple threads. If a scene has fewer instances than this number, culling is done on a single thread. .. rst-class:: classref-item-separator @@ -10025,7 +10816,7 @@ Max number of positional lights renderable in a frame. If more lights than this .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/limits/spatial_indexer/update_iterations_per_frame** = ``10`` +:ref:`int<class_int>` **rendering/limits/spatial_indexer/update_iterations_per_frame** = ``10`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/spatial_indexer/update_iterations_per_frame>` .. container:: contribute @@ -10039,7 +10830,7 @@ Max number of positional lights renderable in a frame. If more lights than this .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/limits/time/time_rollover_secs** = ``3600`` +:ref:`float<class_float>` **rendering/limits/time/time_rollover_secs** = ``3600`` :ref:`🔗<class_ProjectSettings_property_rendering/limits/time/time_rollover_secs>` .. container:: contribute @@ -10053,7 +10844,7 @@ Max number of positional lights renderable in a frame. If more lights than this .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/mesh_lod/lod_change/threshold_pixels** = ``1.0`` +:ref:`float<class_float>` **rendering/mesh_lod/lod_change/threshold_pixels** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_rendering/mesh_lod/lod_change/threshold_pixels>` The automatic LOD bias to use for meshes rendered within the :ref:`ReflectionProbe<class_ReflectionProbe>`. Higher values will use less detailed versions of meshes that have LOD variations generated. If set to ``0.0``, automatic LOD is disabled. Increase :ref:`rendering/mesh_lod/lod_change/threshold_pixels<class_ProjectSettings_property_rendering/mesh_lod/lod_change/threshold_pixels>` to improve performance at the cost of geometry detail. @@ -10069,7 +10860,7 @@ The automatic LOD bias to use for meshes rendered within the :ref:`ReflectionPro .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/occlusion_culling/bvh_build_quality** = ``2`` +:ref:`int<class_int>` **rendering/occlusion_culling/bvh_build_quality** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/occlusion_culling/bvh_build_quality>` The `Bounding Volume Hierarchy <https://en.wikipedia.org/wiki/Bounding_volume_hierarchy>`__ quality to use when rendering the occlusion culling buffer. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. See also :ref:`rendering/occlusion_culling/occlusion_rays_per_thread<class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread>`. @@ -10079,11 +10870,23 @@ The `Bounding Volume Hierarchy <https://en.wikipedia.org/wiki/Bounding_volume_hi ---- +.. _class_ProjectSettings_property_rendering/occlusion_culling/jitter_projection: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/occlusion_culling/jitter_projection** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/occlusion_culling/jitter_projection>` + +If ``true``, the projection used for rendering the occlusion buffer will be jittered. This can help prevent objects being incorrectly culled when visible through small gaps. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread: .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/occlusion_culling/occlusion_rays_per_thread** = ``512`` +:ref:`int<class_int>` **rendering/occlusion_culling/occlusion_rays_per_thread** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread>` The number of occlusion rays traced per CPU thread. Higher values will result in more accurate occlusion culling, at the cost of higher CPU usage. The occlusion culling buffer's pixel count is roughly equal to ``occlusion_rays_per_thread * number_of_logical_cpu_cores``, so it will depend on the system's CPU. Therefore, CPUs with fewer cores will use a lower resolution to attempt keeping performance costs even across devices. See also :ref:`rendering/occlusion_culling/bvh_build_quality<class_ProjectSettings_property_rendering/occlusion_culling/bvh_build_quality>`. @@ -10097,12 +10900,14 @@ The number of occlusion rays traced per CPU thread. Higher values will result in .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/occlusion_culling/use_occlusion_culling** = ``false`` +:ref:`bool<class_bool>` **rendering/occlusion_culling/use_occlusion_culling** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling>` If ``true``, :ref:`OccluderInstance3D<class_OccluderInstance3D>` nodes will be usable for occlusion culling in 3D in the root viewport. In custom viewports, :ref:`Viewport.use_occlusion_culling<class_Viewport_property_use_occlusion_culling>` must be set to ``true`` instead. \ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` and :ref:`GeometryInstance3D.visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + .. rst-class:: classref-item-separator ---- @@ -10111,7 +10916,7 @@ If ``true``, :ref:`OccluderInstance3D<class_OccluderInstance3D>` nodes will be u .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_count** = ``64`` +:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_count** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_count>` Number of cubemaps to store in the reflection atlas. The number of :ref:`ReflectionProbe<class_ReflectionProbe>`\ s in a scene will be limited by this amount. A higher number requires more VRAM. @@ -10123,7 +10928,7 @@ Number of cubemaps to store in the reflection atlas. The number of :ref:`Reflect .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_size** = ``256`` +:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_size** = ``256`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_size>` Size of cubemap faces for :ref:`ReflectionProbe<class_ReflectionProbe>`\ s. A higher number requires more VRAM and may make reflection probe updating slower. @@ -10135,7 +10940,7 @@ Size of cubemap faces for :ref:`ReflectionProbe<class_ReflectionProbe>`\ s. A hi .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_size.mobile** = ``128`` +:ref:`int<class_int>` **rendering/reflections/reflection_atlas/reflection_size.mobile** = ``128`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_size.mobile>` Lower-end override for :ref:`rendering/reflections/reflection_atlas/reflection_size<class_ProjectSettings_property_rendering/reflections/reflection_atlas/reflection_size>` on mobile devices, due to performance concerns or driver support. @@ -10147,7 +10952,7 @@ Lower-end override for :ref:`rendering/reflections/reflection_atlas/reflection_s .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/fast_filter_high_quality** = ``false`` +:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/fast_filter_high_quality** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/fast_filter_high_quality>` Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed. @@ -10159,7 +10964,7 @@ Use a higher quality variant of the fast filtering algorithm. Significantly slow .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/sky_reflections/ggx_samples** = ``32`` +:ref:`int<class_int>` **rendering/reflections/sky_reflections/ggx_samples** = ``32`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/ggx_samples>` Sets the number of samples to take when using importance sampling for :ref:`Sky<class_Sky>`\ s and :ref:`ReflectionProbe<class_ReflectionProbe>`\ s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail. @@ -10171,7 +10976,7 @@ Sets the number of samples to take when using importance sampling for :ref:`Sky< .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/sky_reflections/ggx_samples.mobile** = ``16`` +:ref:`int<class_int>` **rendering/reflections/sky_reflections/ggx_samples.mobile** = ``16`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/ggx_samples.mobile>` Lower-end override for :ref:`rendering/reflections/sky_reflections/ggx_samples<class_ProjectSettings_property_rendering/reflections/sky_reflections/ggx_samples>` on mobile devices, due to performance concerns or driver support. @@ -10183,7 +10988,7 @@ Lower-end override for :ref:`rendering/reflections/sky_reflections/ggx_samples<c .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/reflections/sky_reflections/roughness_layers** = ``8`` +:ref:`int<class_int>` **rendering/reflections/sky_reflections/roughness_layers** = ``8`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/roughness_layers>` Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM. @@ -10195,7 +11000,7 @@ Limits the number of layers to use in radiance maps when using importance sampli .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/texture_array_reflections** = ``true`` +:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/texture_array_reflections** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` If ``true``, uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses :ref:`rendering/reflections/sky_reflections/roughness_layers<class_ProjectSettings_property_rendering/reflections/sky_reflections/roughness_layers>` times more memory. @@ -10207,7 +11012,7 @@ If ``true``, uses texture arrays instead of mipmaps for reflection probes and pa .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/texture_array_reflections.mobile** = ``false`` +:ref:`bool<class_bool>` **rendering/reflections/sky_reflections/texture_array_reflections.mobile** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections.mobile>` Lower-end override for :ref:`rendering/reflections/sky_reflections/texture_array_reflections<class_ProjectSettings_property_rendering/reflections/sky_reflections/texture_array_reflections>` on mobile devices, due to performance concerns or driver support. @@ -10219,7 +11024,7 @@ Lower-end override for :ref:`rendering/reflections/sky_reflections/texture_array .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/renderer/rendering_method** = ``"forward_plus"`` +:ref:`String<class_String>` **rendering/renderer/rendering_method** = ``"forward_plus"`` :ref:`🔗<class_ProjectSettings_property_rendering/renderer/rendering_method>` Sets the renderer that will be used by the project. Options are: @@ -10237,7 +11042,7 @@ Sets the renderer that will be used by the project. Options are: .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/renderer/rendering_method.mobile** = ``"mobile"`` +:ref:`String<class_String>` **rendering/renderer/rendering_method.mobile** = ``"mobile"`` :ref:`🔗<class_ProjectSettings_property_rendering/renderer/rendering_method.mobile>` Override for :ref:`rendering/renderer/rendering_method<class_ProjectSettings_property_rendering/renderer/rendering_method>` on mobile devices. @@ -10249,7 +11054,7 @@ Override for :ref:`rendering/renderer/rendering_method<class_ProjectSettings_pro .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/renderer/rendering_method.web** = ``"gl_compatibility"`` +:ref:`String<class_String>` **rendering/renderer/rendering_method.web** = ``"gl_compatibility"`` :ref:`🔗<class_ProjectSettings_property_rendering/renderer/rendering_method.web>` Override for :ref:`rendering/renderer/rendering_method<class_ProjectSettings_property_rendering/renderer/rendering_method>` on web. @@ -10257,11 +11062,65 @@ Override for :ref:`rendering/renderer/rendering_method<class_ProjectSettings_pro ---- +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/agility_sdk_version: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/d3d12/agility_sdk_version** = ``613`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/d3d12/agility_sdk_version>` + +Version code of the `Direct3D 12 Agility SDK <https://devblogs.microsoft.com/directx/directx12agility/>`__ to use (``D3D12SDKVersion``). This must match the *minor* version that is installed next to the editor binary and in the export templates directory for the current editor version. For example, if you have ``1.613.3`` installed, you need to input ``613`` here. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_misc_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/d3d12/max_misc_descriptors_per_frame** = ``512`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_misc_descriptors_per_frame>` + +The number of entries in the miscellaneous descriptors heap the Direct3D 12 rendering driver uses each frame, used for various operations like clearing a texture. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_resource_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/d3d12/max_resource_descriptors_per_frame** = ``16384`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_resource_descriptors_per_frame>` + +The number of entries in the resource descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame** = ``1024`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/d3d12/max_sampler_descriptors_per_frame>` + +The number of entries in the sampler descriptors heap the Direct3D 12 rendering driver uses each frame, used for most rendering operations. + +Depending on the complexity of scenes, this value may be lowered or may need to be raised. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/driver: .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver>` Sets the driver to be used by the renderer when using a RenderingDevice-based renderer like the clustered renderer or the mobile renderer. This property can not be edited directly, instead, set the driver using the platform-specific overrides. @@ -10273,7 +11132,7 @@ Sets the driver to be used by the renderer when using a RenderingDevice-based re .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver.android** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver.android** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver.android>` Android override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`. @@ -10285,7 +11144,7 @@ Android override for :ref:`rendering/rendering_device/driver<class_ProjectSettin .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver.ios** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver.ios** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver.ios>` iOS override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`. @@ -10297,7 +11156,7 @@ iOS override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver.linuxbsd** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver.linuxbsd** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver.linuxbsd>` LinuxBSD override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`. @@ -10309,7 +11168,7 @@ LinuxBSD override for :ref:`rendering/rendering_device/driver<class_ProjectSetti .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver.macos** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver.macos** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver.macos>` macOS override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`. @@ -10321,7 +11180,7 @@ macOS override for :ref:`rendering/rendering_device/driver<class_ProjectSettings .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/rendering_device/driver.windows** = ``"vulkan"`` +:ref:`String<class_String>` **rendering/rendering_device/driver.windows** :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/driver.windows>` Windows override for :ref:`rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`. @@ -10329,11 +11188,25 @@ Windows override for :ref:`rendering/rendering_device/driver<class_ProjectSettin ---- +.. _class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/enable: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/rendering_device/pipeline_cache/enable** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/enable>` + +Enable the pipeline cache that is saved to disk if the graphics API supports it. + +\ **Note:** This property is unable to control the pipeline caching the GPU driver itself does. Only turn this off along with deleting the contents of the driver's cache if you wish to simulate the experience a user will get when starting the game for the first time. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/save_chunk_size_mb: .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/rendering_device/pipeline_cache/save_chunk_size_mb** = ``3.0`` +:ref:`float<class_float>` **rendering/rendering_device/pipeline_cache/save_chunk_size_mb** = ``3.0`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/pipeline_cache/save_chunk_size_mb>` Determines at which interval pipeline cache is saved to disk. The lower the value, the more often it is saved. @@ -10345,7 +11218,7 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/block_size_kb** = ``256`` +:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/block_size_kb** = ``256`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/staging_buffer/block_size_kb>` .. container:: contribute @@ -10359,7 +11232,7 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/max_size_mb** = ``128`` +:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/max_size_mb** = ``128`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/staging_buffer/max_size_mb>` .. container:: contribute @@ -10373,7 +11246,7 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** = ``64`` +:ref:`int<class_int>` **rendering/rendering_device/staging_buffer/texture_upload_region_size_px** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/staging_buffer/texture_upload_region_size_px>` .. container:: contribute @@ -10383,11 +11256,51 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu ---- +.. _class_ProjectSettings_property_rendering/rendering_device/vsync/frame_queue_size: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/vsync/frame_queue_size** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/vsync/frame_queue_size>` + +The number of frames to track on the CPU side before stalling to wait for the GPU. + +Try the `V-Sync Simulator <https://darksylinc.github.io/vsync_simulator/>`__, an interactive interface that simulates presentation to better understand how it is affected by different variables under various conditions. + +\ **Note:** This property is only read when the project starts. There is currently no way to change this value at run-time. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/rendering_device/vsync/swapchain_image_count: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering/rendering_device/vsync/swapchain_image_count** = ``3`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/vsync/swapchain_image_count>` + +The number of images the swapchain will consist of (back buffers + front buffer). + +\ ``2`` corresponds to double-buffering and ``3`` to triple-buffering. + +Double-buffering may give you the lowest lag/latency but if V-Sync is on and the system can't render at 60 fps, the framerate will go down in multiples of it (e.g. 30 fps, 15, 7.5, etc.). Triple buffering gives you higher framerate (specially if the system can't reach a constant 60 fps) at the cost of up to 1 frame of latency, with :ref:`DisplayServer.VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>` (FIFO). + +Use double-buffering with :ref:`DisplayServer.VSYNC_ENABLED<class_DisplayServer_constant_VSYNC_ENABLED>`. Triple-buffering is a must if you plan on using :ref:`DisplayServer.VSYNC_MAILBOX<class_DisplayServer_constant_VSYNC_MAILBOX>` mode. + +Try the `V-Sync Simulator <https://darksylinc.github.io/vsync_simulator/>`__, an interactive interface that simulates presentation to better understand how it is affected by different variables under various conditions. + +\ **Note:** This property is only read when the project starts. There is currently no way to change this value at run-time. + +\ **Note:** Some platforms may restrict the actual value. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/rendering_device/vulkan/max_descriptors_per_pool: .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/rendering_device/vulkan/max_descriptors_per_pool** = ``64`` +:ref:`int<class_int>` **rendering/rendering_device/vulkan/max_descriptors_per_pool** = ``64`` :ref:`🔗<class_ProjectSettings_property_rendering/rendering_device/vulkan/max_descriptors_per_pool>` .. container:: contribute @@ -10401,7 +11314,7 @@ Determines at which interval pipeline cache is saved to disk. The lower the valu .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/scaling_3d/fsr_sharpness** = ``0.2`` +:ref:`float<class_float>` **rendering/scaling_3d/fsr_sharpness** = ``0.2`` :ref:`🔗<class_ProjectSettings_property_rendering/scaling_3d/fsr_sharpness>` Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference. @@ -10413,7 +11326,7 @@ Determines how sharp the upscaled image will be when using the FSR upscaling mod .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/scaling_3d/mode** = ``0`` +:ref:`int<class_int>` **rendering/scaling_3d/mode** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/scaling_3d/mode>` Sets the scaling 3D mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially-aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. On particularly low-end GPUs, the added cost of FSR may not be worth it (compared to using bilinear scaling with a slightly higher resolution scale to match performance). @@ -10427,7 +11340,7 @@ Sets the scaling 3D mode. Bilinear scaling renders at different resolution to ei .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/scaling_3d/scale** = ``1.0`` +:ref:`float<class_float>` **rendering/scaling_3d/scale** = ``1.0`` :ref:`🔗<class_ProjectSettings_property_rendering/scaling_3d/scale>` Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`rendering/scaling_3d/mode<class_ProjectSettings_property_rendering/scaling_3d/mode>` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`rendering/anti_aliasing/quality/msaa_3d<class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_3d>` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. @@ -10439,7 +11352,7 @@ Scales the 3D render buffer based on the viewport size uses an image filter spec .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/compress** = ``true`` +:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/compress** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shader_compiler/shader_cache/compress>` .. container:: contribute @@ -10453,7 +11366,7 @@ Scales the 3D render buffer based on the viewport size uses an image filter spec .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/enabled** = ``true`` +:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/enabled** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shader_compiler/shader_cache/enabled>` Enable the shader cache, which stores compiled shaders to disk to prevent stuttering from shader compilation the next time the shader is needed. @@ -10465,7 +11378,7 @@ Enable the shader cache, which stores compiled shaders to disk to prevent stutte .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/strip_debug** = ``false`` +:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/strip_debug** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/shader_compiler/shader_cache/strip_debug>` .. container:: contribute @@ -10479,7 +11392,7 @@ Enable the shader cache, which stores compiled shaders to disk to prevent stutte .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/strip_debug.release** = ``true`` +:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/strip_debug.release** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shader_compiler/shader_cache/strip_debug.release>` .. container:: contribute @@ -10493,7 +11406,7 @@ Enable the shader cache, which stores compiled shaders to disk to prevent stutte .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/use_zstd_compression** = ``true`` +:ref:`bool<class_bool>` **rendering/shader_compiler/shader_cache/use_zstd_compression** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shader_compiler/shader_cache/use_zstd_compression>` .. container:: contribute @@ -10507,7 +11420,7 @@ Enable the shader cache, which stores compiled shaders to disk to prevent stutte .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shading/overrides/force_lambert_over_burley** = ``false`` +:ref:`bool<class_bool>` **rendering/shading/overrides/force_lambert_over_burley** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley>` If ``true``, uses faster but lower-quality Lambert material lighting model instead of Burley. @@ -10519,7 +11432,7 @@ If ``true``, uses faster but lower-quality Lambert material lighting model inste .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shading/overrides/force_lambert_over_burley.mobile** = ``true`` +:ref:`bool<class_bool>` **rendering/shading/overrides/force_lambert_over_burley.mobile** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley.mobile>` Lower-end override for :ref:`rendering/shading/overrides/force_lambert_over_burley<class_ProjectSettings_property_rendering/shading/overrides/force_lambert_over_burley>` on mobile devices, due to performance concerns or driver support. @@ -10531,7 +11444,7 @@ Lower-end override for :ref:`rendering/shading/overrides/force_lambert_over_burl .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shading/overrides/force_vertex_shading** = ``false`` +:ref:`bool<class_bool>` **rendering/shading/overrides/force_vertex_shading** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading>` If ``true``, forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. @@ -10545,7 +11458,7 @@ If ``true``, forces vertex shading for all rendering. This can increase performa .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/shading/overrides/force_vertex_shading.mobile** = ``true`` +:ref:`bool<class_bool>` **rendering/shading/overrides/force_vertex_shading.mobile** = ``true`` :ref:`🔗<class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading.mobile>` Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading<class_ProjectSettings_property_rendering/shading/overrides/force_vertex_shading>` on mobile devices, due to performance concerns or driver support. @@ -10559,10 +11472,12 @@ Lower-end override for :ref:`rendering/shading/overrides/force_vertex_shading<cl .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/canvas_textures/default_texture_filter** = ``1`` +:ref:`int<class_int>` **rendering/textures/canvas_textures/default_texture_filter** = ``1`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/canvas_textures/default_texture_filter>` The default texture filtering mode to use on :ref:`CanvasItem<class_CanvasItem>`\ s. +\ **Note:** For pixel art aesthetics, see also :ref:`rendering/2d/snap/snap_2d_vertices_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel>` and :ref:`rendering/2d/snap/snap_2d_transforms_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel>`. + .. rst-class:: classref-item-separator ---- @@ -10571,7 +11486,7 @@ The default texture filtering mode to use on :ref:`CanvasItem<class_CanvasItem>` .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/canvas_textures/default_texture_repeat** = ``0`` +:ref:`int<class_int>` **rendering/textures/canvas_textures/default_texture_repeat** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/canvas_textures/default_texture_repeat>` The default texture repeating mode to use on :ref:`CanvasItem<class_CanvasItem>`\ s. @@ -10583,7 +11498,7 @@ The default texture repeating mode to use on :ref:`CanvasItem<class_CanvasItem>` .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/decals/filter** = ``3`` +:ref:`int<class_int>` **rendering/textures/decals/filter** = ``3`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/decals/filter>` The filtering quality to use for :ref:`Decal<class_Decal>` nodes. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by :ref:`rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. @@ -10595,7 +11510,7 @@ The filtering quality to use for :ref:`Decal<class_Decal>` nodes. When using one .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/default_filters/anisotropic_filtering_level** = ``2`` +:ref:`int<class_int>` **rendering/textures/default_filters/anisotropic_filtering_level** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>` Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of ``0`` forcibly disables anisotropic filtering, even on materials where it is enabled. @@ -10613,16 +11528,14 @@ The anisotropic filtering level also affects decals and light projectors if they .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/textures/default_filters/texture_mipmap_bias** = ``0.0`` +:ref:`float<class_float>` **rendering/textures/default_filters/texture_mipmap_bias** = ``0.0`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias>` Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). -Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa<class_ProjectSettings_property_rendering/anti_aliasing/quality/screen_space_aa>`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. +Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa<class_ProjectSettings_property_rendering/anti_aliasing/quality/screen_space_aa>`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. \ **Note:** If :ref:`rendering/scaling_3d/scale<class_ProjectSettings_property_rendering/scaling_3d/scale>` is lower than ``1.0`` (exclusive), :ref:`rendering/textures/default_filters/texture_mipmap_bias<class_ProjectSettings_property_rendering/textures/default_filters/texture_mipmap_bias>` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. -\ **Note:** This property is only read when the project starts. To change the mipmap LOD bias at run-time, set :ref:`Viewport.texture_mipmap_bias<class_Viewport_property_texture_mipmap_bias>` instead. - .. rst-class:: classref-item-separator ---- @@ -10631,7 +11544,7 @@ Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa<cl .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/textures/default_filters/use_nearest_mipmap_filter** = ``false`` +:ref:`bool<class_bool>` **rendering/textures/default_filters/use_nearest_mipmap_filter** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` If ``true``, uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If ``false``, linear mipmap filtering (also called "trilinear filtering") is used. @@ -10645,7 +11558,7 @@ If ``true``, uses nearest-neighbor mipmap filtering when using mipmaps (also cal .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/light_projectors/filter** = ``3`` +:ref:`int<class_int>` **rendering/textures/light_projectors/filter** = ``3`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/light_projectors/filter>` The filtering quality to use for :ref:`OmniLight3D<class_OmniLight3D>` and :ref:`SpotLight3D<class_SpotLight3D>` projectors. When using one of the anisotropic filtering modes, the anisotropic filtering level is controlled by :ref:`rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. @@ -10657,7 +11570,7 @@ The filtering quality to use for :ref:`OmniLight3D<class_OmniLight3D>` and :ref: .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/textures/lossless_compression/force_png** = ``false`` +:ref:`bool<class_bool>` **rendering/textures/lossless_compression/force_png** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/lossless_compression/force_png>` If ``true``, the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. @@ -10669,9 +11582,9 @@ If ``true``, the texture importer will import lossless textures using the PNG fo .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/textures/vram_compression/import_etc2_astc** = ``false`` +:ref:`bool<class_bool>` **rendering/textures/vram_compression/import_etc2_astc** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/vram_compression/import_etc2_astc>` -If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normal maps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4x4 block size). +If ``true``, the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normal maps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4×4 block size). \ **Note:** This setting is an override. The texture importer will always import the format the host platform needs, even if this is set to ``false``. @@ -10685,7 +11598,7 @@ If ``true``, the texture importer will import VRAM-compressed textures using the .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/textures/vram_compression/import_s3tc_bptc** = ``false`` +:ref:`bool<class_bool>` **rendering/textures/vram_compression/import_s3tc_bptc** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/vram_compression/import_s3tc_bptc>` If ``true``, the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles. @@ -10701,7 +11614,7 @@ If ``true``, the texture importer will import VRAM-compressed textures using the .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/textures/webp_compression/compression_method** = ``2`` +:ref:`int<class_int>` **rendering/textures/webp_compression/compression_method** = ``2`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/webp_compression/compression_method>` The default compression method for WebP. Affects both lossy and lossless WebP. A higher value results in smaller files at the cost of compression speed. Decompression speed is mostly unaffected by the compression method. Supported values are 0 to 6. Note that compression methods above 4 are very slow and offer very little savings. @@ -10713,7 +11626,7 @@ The default compression method for WebP. Affects both lossy and lossless WebP. A .. rst-class:: classref-property -:ref:`float<class_float>` **rendering/textures/webp_compression/lossless_compression_factor** = ``25`` +:ref:`float<class_float>` **rendering/textures/webp_compression/lossless_compression_factor** = ``25`` :ref:`🔗<class_ProjectSettings_property_rendering/textures/webp_compression/lossless_compression_factor>` The default compression factor for lossless WebP. Decompression speed is mostly unaffected by the compression factor. Supported values are 0 to 100. @@ -10721,11 +11634,23 @@ The default compression factor for lossless WebP. Decompression speed is mostly ---- +.. _class_ProjectSettings_property_rendering/viewport/hdr_2d: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **rendering/viewport/hdr_2d** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/viewport/hdr_2d>` + +If ``true``, enables :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>` on the root viewport. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/viewport/transparent_background: .. rst-class:: classref-property -:ref:`bool<class_bool>` **rendering/viewport/transparent_background** = ``false`` +:ref:`bool<class_bool>` **rendering/viewport/transparent_background** = ``false`` :ref:`🔗<class_ProjectSettings_property_rendering/viewport/transparent_background>` If ``true``, enables :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` on the root viewport. This allows per-pixel transparency to be effective after also enabling :ref:`display/window/size/transparent<class_ProjectSettings_property_display/window/size/transparent>` and :ref:`display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`. @@ -10737,7 +11662,7 @@ If ``true``, enables :ref:`Viewport.transparent_bg<class_Viewport_property_trans .. rst-class:: classref-property -:ref:`int<class_int>` **rendering/vrs/mode** = ``0`` +:ref:`int<class_int>` **rendering/vrs/mode** = ``0`` :ref:`🔗<class_ProjectSettings_property_rendering/vrs/mode>` Set the default Variable Rate Shading (VRS) mode for the main viewport. See :ref:`Viewport.vrs_mode<class_Viewport_property_vrs_mode>` to change this at runtime, and :ref:`VRSMode<enum_Viewport_VRSMode>` for possible values. @@ -10749,24 +11674,24 @@ Set the default Variable Rate Shading (VRS) mode for the main viewport. See :ref .. rst-class:: classref-property -:ref:`String<class_String>` **rendering/vrs/texture** = ``""`` +:ref:`String<class_String>` **rendering/vrs/texture** = ``""`` :ref:`🔗<class_ProjectSettings_property_rendering/vrs/texture>` If :ref:`rendering/vrs/mode<class_ProjectSettings_property_rendering/vrs/mode>` is set to **Texture**, this is the path to default texture loaded as the VRS image. The texture *must* use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision: -:: +.. code:: text - - 1x1 = rgb(0, 0, 0) - #000000 - - 1x2 = rgb(0, 85, 0) - #005500 - - 2x1 = rgb(85, 0, 0) - #550000 - - 2x2 = rgb(85, 85, 0) - #555500 - - 2x4 = rgb(85, 170, 0) - #55aa00 - - 4x2 = rgb(170, 85, 0) - #aa5500 - - 4x4 = rgb(170, 170, 0) - #aaaa00 - - 4x8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware - - 8x4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware - - 8x8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware + - 1×1 = rgb(0, 0, 0) - #000000 + - 1×2 = rgb(0, 85, 0) - #005500 + - 2×1 = rgb(85, 0, 0) - #550000 + - 2×2 = rgb(85, 85, 0) - #555500 + - 2×4 = rgb(85, 170, 0) - #55aa00 + - 4×2 = rgb(170, 85, 0) - #aa5500 + - 4×4 = rgb(170, 170, 0) - #aaaa00 + - 4×8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware + - 8×4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware + - 8×8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware .. rst-class:: classref-item-separator @@ -10776,11 +11701,9 @@ The texture *must* use a lossless compression format so that colors can be match .. rst-class:: classref-property -:ref:`float<class_float>` **threading/worker_pool/low_priority_thread_ratio** = ``0.3`` +:ref:`float<class_float>` **threading/worker_pool/low_priority_thread_ratio** = ``0.3`` :ref:`🔗<class_ProjectSettings_property_threading/worker_pool/low_priority_thread_ratio>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The ratio of :ref:`WorkerThreadPool<class_WorkerThreadPool>`'s threads that will be reserved for low-priority tasks. For example, if 10 threads are available and this value is set to ``0.3``, 3 of the worker threads will be reserved for low-priority tasks. The actual value won't exceed the number of CPU cores minus one, and if possible, at least one worker thread will be dedicated to low-priority tasks. .. rst-class:: classref-item-separator @@ -10790,7 +11713,7 @@ The texture *must* use a lossless compression format so that colors can be match .. rst-class:: classref-property -:ref:`int<class_int>` **threading/worker_pool/max_threads** = ``-1`` +:ref:`int<class_int>` **threading/worker_pool/max_threads** = ``-1`` :ref:`🔗<class_ProjectSettings_property_threading/worker_pool/max_threads>` Maximum number of threads to be used by :ref:`WorkerThreadPool<class_WorkerThreadPool>`. Value of ``-1`` means no limit. @@ -10798,39 +11721,73 @@ Maximum number of threads to be used by :ref:`WorkerThreadPool<class_WorkerThrea ---- -.. _class_ProjectSettings_property_threading/worker_pool/use_system_threads_for_low_priority_tasks: +.. _class_ProjectSettings_property_xr/openxr/default_action_map: .. rst-class:: classref-property -:ref:`bool<class_bool>` **threading/worker_pool/use_system_threads_for_low_priority_tasks** = ``true`` +:ref:`String<class_String>` **xr/openxr/default_action_map** = ``"res://openxr_action_map.tres"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/default_action_map>` -.. container:: contribute +Action map configuration to load by default. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **xr/openxr/enabled** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/enabled>` + +If ``true``, Godot will setup and initialize OpenXR on startup. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_xr/openxr/default_action_map: +.. _class_ProjectSettings_property_xr/openxr/environment_blend_mode: .. rst-class:: classref-property -:ref:`String<class_String>` **xr/openxr/default_action_map** = ``"res://openxr_action_map.tres"`` +:ref:`int<class_int>` **xr/openxr/environment_blend_mode** = ``"0"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/environment_blend_mode>` -Action map configuration to load by default. +Specify how OpenXR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor. .. rst-class:: classref-item-separator ---- -.. _class_ProjectSettings_property_xr/openxr/enabled: +.. _class_ProjectSettings_property_xr/openxr/extensions/eye_gaze_interaction: .. rst-class:: classref-property -:ref:`bool<class_bool>` **xr/openxr/enabled** = ``false`` +:ref:`bool<class_bool>` **xr/openxr/extensions/eye_gaze_interaction** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/extensions/eye_gaze_interaction>` -If ``true`` Godot will setup and initialize OpenXR on startup. +Specify whether to enable eye tracking for this project. Depending on the platform, additional export configuration may be needed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/hand_interaction_profile: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **xr/openxr/extensions/hand_interaction_profile** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/extensions/hand_interaction_profile>` + +If true the hand interaction profile extension will be activated if supported by the platform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/hand_tracking: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **xr/openxr/extensions/hand_tracking** = ``true`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/extensions/hand_tracking>` + +If true we enable the hand tracking extension if available. .. rst-class:: classref-item-separator @@ -10840,7 +11797,7 @@ If ``true`` Godot will setup and initialize OpenXR on startup. .. rst-class:: classref-property -:ref:`int<class_int>` **xr/openxr/form_factor** = ``"0"`` +:ref:`int<class_int>` **xr/openxr/form_factor** = ``"0"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/form_factor>` Specify whether OpenXR should be configured for an HMD or a hand held device. @@ -10848,11 +11805,39 @@ Specify whether OpenXR should be configured for an HMD or a hand held device. ---- +.. _class_ProjectSettings_property_xr/openxr/foveation_dynamic: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **xr/openxr/foveation_dynamic** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/foveation_dynamic>` + +If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on :ref:`xr/openxr/foveation_level<class_ProjectSettings_property_xr/openxr/foveation_level>`. + +\ **Note:** Only works on compatibility renderer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/foveation_level: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **xr/openxr/foveation_level** = ``"0"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/foveation_level>` + +Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high. + +\ **Note:** Only works on compatibility renderer. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/reference_space: .. rst-class:: classref-property -:ref:`int<class_int>` **xr/openxr/reference_space** = ``"1"`` +:ref:`int<class_int>` **xr/openxr/reference_space** = ``"1"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/reference_space>` Specify the default reference space. @@ -10864,7 +11849,7 @@ Specify the default reference space. .. rst-class:: classref-property -:ref:`bool<class_bool>` **xr/openxr/startup_alert** = ``true`` +:ref:`bool<class_bool>` **xr/openxr/startup_alert** = ``true`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/startup_alert>` If ``true``, Godot will display an alert modal when OpenXR initialization fails on startup. @@ -10876,7 +11861,7 @@ If ``true``, Godot will display an alert modal when OpenXR initialization fails .. rst-class:: classref-property -:ref:`bool<class_bool>` **xr/openxr/submit_depth_buffer** = ``false`` +:ref:`bool<class_bool>` **xr/openxr/submit_depth_buffer** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/submit_depth_buffer>` If ``true``, OpenXR will manage the depth buffer and use the depth buffer for advanced reprojection provided this is supported by the XR runtime. Note that some rendering features in Godot can't be used with this feature. @@ -10888,7 +11873,7 @@ If ``true``, OpenXR will manage the depth buffer and use the depth buffer for ad .. rst-class:: classref-property -:ref:`int<class_int>` **xr/openxr/view_configuration** = ``"1"`` +:ref:`int<class_int>` **xr/openxr/view_configuration** = ``"1"`` :ref:`🔗<class_ProjectSettings_property_xr/openxr/view_configuration>` Specify the view configuration with which to configure OpenXR setting up either Mono or Stereo rendering. @@ -10900,7 +11885,7 @@ Specify the view configuration with which to configure OpenXR setting up either .. rst-class:: classref-property -:ref:`bool<class_bool>` **xr/shaders/enabled** = ``false`` +:ref:`bool<class_bool>` **xr/shaders/enabled** = ``false`` :ref:`🔗<class_ProjectSettings_property_xr/shaders/enabled>` If ``true``, Godot will compile shaders required for XR. @@ -10917,7 +11902,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_property_info** **(** :ref:`Dictionary<class_Dictionary>` hint **)** +|void| **add_property_info**\ (\ hint\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_ProjectSettings_method_add_property_info>` Adds a custom property info to a property. The dictionary must contain: @@ -10952,8 +11937,8 @@ Adds a custom property info to a property. The dictionary must contain: var propertyInfo = new Godot.Collections.Dictionary { {"name", "category/propertyName"}, - {"type", Variant.Type.Int}, - {"hint", PropertyHint.Enum}, + {"type", (int)Variant.Type.Int}, + {"hint", (int)PropertyHint.Enum}, {"hint_string", "one,two,three"}, }; @@ -10969,7 +11954,7 @@ Adds a custom property info to a property. The dictionary must contain: .. rst-class:: classref-method -void **clear** **(** :ref:`String<class_String>` name **)** +|void| **clear**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ProjectSettings_method_clear>` Clears the whole configuration (not recommended, may break things). @@ -10981,7 +11966,7 @@ Clears the whole configuration (not recommended, may break things). .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_global_class_list** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_global_class_list**\ (\ ) :ref:`🔗<class_ProjectSettings_method_get_global_class_list>` Returns an :ref:`Array<class_Array>` of registered global classes. Each global class is represented as a :ref:`Dictionary<class_Dictionary>` that contains the following entries: @@ -11005,7 +11990,7 @@ Returns an :ref:`Array<class_Array>` of registered global classes. Each global c .. rst-class:: classref-method -:ref:`int<class_int>` **get_order** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **get_order**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_ProjectSettings_method_get_order>` Returns the order of a configuration value (influences when saved to the config file). @@ -11017,7 +12002,7 @@ Returns the order of a configuration value (influences when saved to the config .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_setting** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` default_value=null **)** |const| +:ref:`Variant<class_Variant>` **get_setting**\ (\ name\: :ref:`String<class_String>`, default_value\: :ref:`Variant<class_Variant>` = null\ ) |const| :ref:`🔗<class_ProjectSettings_method_get_setting>` Returns the value of the setting identified by ``name``. If the setting doesn't exist and ``default_value`` is specified, the value of ``default_value`` is returned. Otherwise, ``null`` is returned. @@ -11048,7 +12033,7 @@ Returns the value of the setting identified by ``name``. If the setting doesn't .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_setting_with_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **get_setting_with_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_ProjectSettings_method_get_setting_with_override>` Similar to :ref:`get_setting<class_ProjectSettings_method_get_setting>`, but applies feature tag overrides if any exists and is valid. @@ -11079,7 +12064,7 @@ Then the overridden setting will be returned instead if the project is running o .. rst-class:: classref-method -:ref:`String<class_String>` **globalize_path** **(** :ref:`String<class_String>` path **)** |const| +:ref:`String<class_String>` **globalize_path**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_ProjectSettings_method_globalize_path>` Returns the absolute, native OS path corresponding to the localized ``path`` (starting with ``res://`` or ``user://``). The returned path will vary depending on the operating system and user preferences. See :doc:`File paths in Godot projects <../tutorials/io/data_paths>` to see what those paths convert to. See also :ref:`localize_path<class_ProjectSettings_method_localize_path>`. @@ -11107,7 +12092,7 @@ Returns the absolute, native OS path corresponding to the localized ``path`` (st .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_setting** **(** :ref:`String<class_String>` name **)** |const| +:ref:`bool<class_bool>` **has_setting**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_ProjectSettings_method_has_setting>` Returns ``true`` if a configuration value is present. @@ -11119,7 +12104,7 @@ Returns ``true`` if a configuration value is present. .. rst-class:: classref-method -:ref:`bool<class_bool>` **load_resource_pack** **(** :ref:`String<class_String>` pack, :ref:`bool<class_bool>` replace_files=true, :ref:`int<class_int>` offset=0 **)** +:ref:`bool<class_bool>` **load_resource_pack**\ (\ pack\: :ref:`String<class_String>`, replace_files\: :ref:`bool<class_bool>` = true, offset\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_ProjectSettings_method_load_resource_pack>` Loads the contents of the .pck or .zip file specified by ``pack`` into the resource filesystem (``res://``). Returns ``true`` on success. @@ -11135,7 +12120,7 @@ Loads the contents of the .pck or .zip file specified by ``pack`` into the resou .. rst-class:: classref-method -:ref:`String<class_String>` **localize_path** **(** :ref:`String<class_String>` path **)** |const| +:ref:`String<class_String>` **localize_path**\ (\ path\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_ProjectSettings_method_localize_path>` Returns the localized path (starting with ``res://``) corresponding to the absolute, native OS ``path``. See also :ref:`globalize_path<class_ProjectSettings_method_globalize_path>`. @@ -11147,7 +12132,7 @@ Returns the localized path (starting with ``res://``) corresponding to the absol .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **save**\ (\ ) :ref:`🔗<class_ProjectSettings_method_save>` Saves the configuration to the ``project.godot`` file. @@ -11161,7 +12146,7 @@ Saves the configuration to the ``project.godot`` file. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save_custom** **(** :ref:`String<class_String>` file **)** +:ref:`Error<enum_@GlobalScope_Error>` **save_custom**\ (\ file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ProjectSettings_method_save_custom>` Saves the configuration to a custom file. The file extension must be ``.godot`` (to save in text-based :ref:`ConfigFile<class_ConfigFile>` format) or ``.binary`` (to save in binary format). You can also save ``override.cfg`` file, which is also text, but can be used in exported projects unlike other formats. @@ -11173,7 +12158,7 @@ Saves the configuration to a custom file. The file extension must be ``.godot`` .. rst-class:: classref-method -void **set_as_basic** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` basic **)** +|void| **set_as_basic**\ (\ name\: :ref:`String<class_String>`, basic\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ProjectSettings_method_set_as_basic>` Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option. @@ -11185,7 +12170,7 @@ Defines if the specified setting is considered basic or advanced. Basic settings .. rst-class:: classref-method -void **set_as_internal** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` internal **)** +|void| **set_as_internal**\ (\ name\: :ref:`String<class_String>`, internal\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ProjectSettings_method_set_as_internal>` Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user. @@ -11197,7 +12182,7 @@ Defines if the specified setting is considered internal. An internal setting won .. rst-class:: classref-method -void **set_initial_value** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** +|void| **set_initial_value**\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ProjectSettings_method_set_initial_value>` Sets the specified setting's initial value. This is the value the setting reverts to. @@ -11209,7 +12194,7 @@ Sets the specified setting's initial value. This is the value the setting revert .. rst-class:: classref-method -void **set_order** **(** :ref:`String<class_String>` name, :ref:`int<class_int>` position **)** +|void| **set_order**\ (\ name\: :ref:`String<class_String>`, position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ProjectSettings_method_set_order>` Sets the order of a configuration value (influences when saved to the config file). @@ -11221,7 +12206,7 @@ Sets the order of a configuration value (influences when saved to the config fil .. rst-class:: classref-method -void **set_restart_if_changed** **(** :ref:`String<class_String>` name, :ref:`bool<class_bool>` restart **)** +|void| **set_restart_if_changed**\ (\ name\: :ref:`String<class_String>`, restart\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ProjectSettings_method_set_restart_if_changed>` Sets whether a setting requires restarting the editor to properly take effect. @@ -11235,7 +12220,7 @@ Sets whether a setting requires restarting the editor to properly take effect. .. rst-class:: classref-method -void **set_setting** **(** :ref:`String<class_String>` name, :ref:`Variant<class_Variant>` value **)** +|void| **set_setting**\ (\ name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ProjectSettings_method_set_setting>` Sets the value of a setting. @@ -11263,3 +12248,4 @@ This can also be used to erase custom project settings. To do this change the se .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_propertytweener.rst b/classes/class_propertytweener.rst index 6c81c07ce64..966125b95f8 100644 --- a/classes/class_propertytweener.rst +++ b/classes/class_propertytweener.rst @@ -31,19 +31,21 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`as_relative<class_PropertyTweener_method_as_relative>` **(** **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from<class_PropertyTweener_method_from>` **(** :ref:`Variant<class_Variant>` value **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from_current<class_PropertyTweener_method_from_current>` **(** **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_delay<class_PropertyTweener_method_set_delay>` **(** :ref:`float<class_float>` delay **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_ease<class_PropertyTweener_method_set_ease>` **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_trans<class_PropertyTweener_method_set_trans>` **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** | - +-----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`as_relative<class_PropertyTweener_method_as_relative>`\ (\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from<class_PropertyTweener_method_from>`\ (\ value\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`from_current<class_PropertyTweener_method_from_current>`\ (\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_custom_interpolator<class_PropertyTweener_method_set_custom_interpolator>`\ (\ interpolator_method\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_delay<class_PropertyTweener_method_set_delay>`\ (\ delay\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_ease<class_PropertyTweener_method_set_ease>`\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`set_trans<class_PropertyTweener_method_set_trans>`\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +60,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **as_relative** **(** **)** +:ref:`PropertyTweener<class_PropertyTweener>` **as_relative**\ (\ ) :ref:`🔗<class_PropertyTweener_method_as_relative>` When called, the final value will be used as a relative value instead. @@ -77,7 +79,7 @@ When called, the final value will be used as a relative value instead. .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **from** **(** :ref:`Variant<class_Variant>` value **)** +:ref:`PropertyTweener<class_PropertyTweener>` **from**\ (\ value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_PropertyTweener_method_from>` Sets a custom initial value to the **PropertyTweener**. @@ -96,7 +98,7 @@ Sets a custom initial value to the **PropertyTweener**. .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **from_current** **(** **)** +:ref:`PropertyTweener<class_PropertyTweener>` **from_current**\ (\ ) :ref:`🔗<class_PropertyTweener_method_from_current>` Makes the **PropertyTweener** use the current property value (i.e. at the time of creating this **PropertyTweener**) as a starting point. This is equivalent of using :ref:`from<class_PropertyTweener_method_from>` with the current value. These two calls will do the same: @@ -109,11 +111,37 @@ Makes the **PropertyTweener** use the current property value (i.e. at the time o ---- +.. _class_PropertyTweener_method_set_custom_interpolator: + +.. rst-class:: classref-method + +:ref:`PropertyTweener<class_PropertyTweener>` **set_custom_interpolator**\ (\ interpolator_method\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_PropertyTweener_method_set_custom_interpolator>` + +Allows interpolating the value with a custom easing function. The provided ``interpolator_method`` will be called with a value ranging from ``0.0`` to ``1.0`` and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. + +\ **Example:**\ + +:: + + @export var curve: Curve + + func _ready(): + var tween = create_tween() + # Interpolate the value using a custom curve. + tween.tween_property(self, "position:x", 300, 1).as_relative().set_custom_interpolator(tween_curve) + + func tween_curve(v): + return curve.sample_baked(v) + +.. rst-class:: classref-item-separator + +---- + .. _class_PropertyTweener_method_set_delay: .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **set_delay** **(** :ref:`float<class_float>` delay **)** +:ref:`PropertyTweener<class_PropertyTweener>` **set_delay**\ (\ delay\: :ref:`float<class_float>`\ ) :ref:`🔗<class_PropertyTweener_method_set_delay>` Sets the time in seconds after which the **PropertyTweener** will start interpolating. By default there's no delay. @@ -125,7 +153,7 @@ Sets the time in seconds after which the **PropertyTweener** will start interpol .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **set_ease** **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** +:ref:`PropertyTweener<class_PropertyTweener>` **set_ease**\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) :ref:`🔗<class_PropertyTweener_method_set_ease>` Sets the type of used easing from :ref:`EaseType<enum_Tween_EaseType>`. If not set, the default easing is used from the :ref:`Tween<class_Tween>` that contains this Tweener. @@ -137,7 +165,7 @@ Sets the type of used easing from :ref:`EaseType<enum_Tween_EaseType>`. If not s .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **set_trans** **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** +:ref:`PropertyTweener<class_PropertyTweener>` **set_trans**\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) :ref:`🔗<class_PropertyTweener_method_set_trans>` Sets the type of used transition from :ref:`TransitionType<enum_Tween_TransitionType>`. If not set, the default transition is used from the :ref:`Tween<class_Tween>` that contains this Tweener. @@ -148,3 +176,4 @@ Sets the type of used transition from :ref:`TransitionType<enum_Tween_Transition .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_quadmesh.rst b/classes/class_quadmesh.rst index 54b88aec668..e2046e1fea3 100644 --- a/classes/class_quadmesh.rst +++ b/classes/class_quadmesh.rst @@ -26,9 +26,9 @@ Class representing a square :ref:`PrimitiveMesh<class_PrimitiveMesh>`. This flat Tutorials --------- -- `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__ +- `GUI in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2807>`__ -- `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__ +- `2D in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2803>`__ .. rst-class:: classref-reftable-group @@ -51,3 +51,4 @@ Properties .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_quadoccluder3d.rst b/classes/class_quadoccluder3d.rst index d43590b9d9e..d9dfed4fb9f 100644 --- a/classes/class_quadoccluder3d.rst +++ b/classes/class_quadoccluder3d.rst @@ -23,6 +23,13 @@ Description See :ref:`OccluderInstance3D<class_OccluderInstance3D>`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -48,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(1, 1)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(1, 1)`` :ref:`🔗<class_QuadOccluder3D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size**\ (\ ) The quad's size in 3D units. @@ -64,3 +71,4 @@ The quad's size in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_quaternion.rst b/classes/class_quaternion.rst index 91f939171a2..74064a5d598 100644 --- a/classes/class_quaternion.rst +++ b/classes/class_quaternion.rst @@ -17,11 +17,15 @@ A unit quaternion used for representing 3D rotations. Description ----------- -Quaternions are similar to :ref:`Basis<class_Basis>`, which implements the matrix representation of rotations. Unlike :ref:`Basis<class_Basis>`, which stores rotation, scale, and shearing, quaternions only store rotation. +The **Quaternion** built-in :ref:`Variant<class_Variant>` type is a 4D data structure that represents rotation in the form of a `Hamilton convention quaternion <https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation>`__. Compared to the :ref:`Basis<class_Basis>` type which can store both rotation and scale, quaternions can *only* store rotation. -Quaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. +A **Quaternion** is composed by 4 floating-point components: :ref:`w<class_Quaternion_property_w>`, :ref:`x<class_Quaternion_property_x>`, :ref:`y<class_Quaternion_property_y>`, and :ref:`z<class_Quaternion_property_z>`. These components are very compact in memory, and because of this some operations are more efficient and less likely to cause floating-point errors. Methods such as :ref:`get_angle<class_Quaternion_method_get_angle>`, :ref:`get_axis<class_Quaternion_method_get_axis>`, and :ref:`slerp<class_Quaternion_method_slerp>` are faster than their :ref:`Basis<class_Basis>` counterparts. -\ **Note:** Quaternions need to be normalized before being used for rotation. +For a great introduction to quaternions, see `this video by 3Blue1Brown <https://www.youtube.com/watch?v=d4EgbgTm0Bg>`__. You do not need to know the math behind quaternions, as Godot provides several helper methods that handle it for you. These include :ref:`slerp<class_Quaternion_method_slerp>` and :ref:`spherical_cubic_interpolate<class_Quaternion_method_spherical_cubic_interpolate>`, as well as the ``*`` operator. + +\ **Note:** Quaternions must be normalized before being used for rotation (see :ref:`normalized<class_Quaternion_method_normalized>`). + +\ **Note:** Similarly to :ref:`Vector2<class_Vector2>` and :ref:`Vector3<class_Vector3>`, the components of a quaternion use 32-bit precision by default, unlike :ref:`float<class_float>` which is always 64-bit. If double precision is needed, compile the engine with the option ``precision=double``. .. note:: @@ -32,9 +36,15 @@ Quaternions can be parametrized using both an axis-angle pair or Euler angles. D Tutorials --------- +- `3Blue1Brown's video on Quaternions <https://www.youtube.com/watch?v=d4EgbgTm0Bg>`__ + +- `Online Quaternion Visualization <https://quaternions.online/>`__ + - `Using 3D transforms <../tutorials/3d/using_transforms.html#interpolating-with-quaternions>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ + +- `Advanced Quaternion Visualization <https://iwatake2222.github.io/rotation_master/rotation_master.html>`__ .. rst-class:: classref-reftable-group @@ -62,19 +72,19 @@ Constructors .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` from **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** :ref:`Vector3<class_Vector3>` arc_from, :ref:`Vector3<class_Vector3>` arc_to **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** :ref:`Basis<class_Basis>` from **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z, :ref:`float<class_float>` w **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ from\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ arc_from\: :ref:`Vector3<class_Vector3>`, arc_to\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ from\: :ref:`Basis<class_Basis>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`Quaternion<class_Quaternion_constructor_Quaternion>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`, w\: :ref:`float<class_float>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -84,45 +94,45 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`angle_to<class_Quaternion_method_angle_to>` **(** :ref:`Quaternion<class_Quaternion>` to **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`dot<class_Quaternion_method_dot>` **(** :ref:`Quaternion<class_Quaternion>` with **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`exp<class_Quaternion_method_exp>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`from_euler<class_Quaternion_method_from_euler>` **(** :ref:`Vector3<class_Vector3>` euler **)** |static| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_angle<class_Quaternion_method_get_angle>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_axis<class_Quaternion_method_get_axis>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_euler<class_Quaternion_method_get_euler>` **(** :ref:`int<class_int>` order=2 **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`inverse<class_Quaternion_method_inverse>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Quaternion_method_is_equal_approx>` **(** :ref:`Quaternion<class_Quaternion>` to **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Quaternion_method_is_finite>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Quaternion_method_is_normalized>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Quaternion_method_length>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length_squared<class_Quaternion_method_length_squared>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`log<class_Quaternion_method_log>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`normalized<class_Quaternion_method_normalized>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`slerp<class_Quaternion_method_slerp>` **(** :ref:`Quaternion<class_Quaternion>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`slerpni<class_Quaternion_method_slerpni>` **(** :ref:`Quaternion<class_Quaternion>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`spherical_cubic_interpolate<class_Quaternion_method_spherical_cubic_interpolate>` **(** :ref:`Quaternion<class_Quaternion>` b, :ref:`Quaternion<class_Quaternion>` pre_a, :ref:`Quaternion<class_Quaternion>` post_b, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`spherical_cubic_interpolate_in_time<class_Quaternion_method_spherical_cubic_interpolate_in_time>` **(** :ref:`Quaternion<class_Quaternion>` b, :ref:`Quaternion<class_Quaternion>` pre_a, :ref:`Quaternion<class_Quaternion>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`angle_to<class_Quaternion_method_angle_to>`\ (\ to\: :ref:`Quaternion<class_Quaternion>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`dot<class_Quaternion_method_dot>`\ (\ with\: :ref:`Quaternion<class_Quaternion>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`exp<class_Quaternion_method_exp>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`from_euler<class_Quaternion_method_from_euler>`\ (\ euler\: :ref:`Vector3<class_Vector3>`\ ) |static| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_angle<class_Quaternion_method_get_angle>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_axis<class_Quaternion_method_get_axis>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_euler<class_Quaternion_method_get_euler>`\ (\ order\: :ref:`int<class_int>` = 2\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`inverse<class_Quaternion_method_inverse>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Quaternion_method_is_equal_approx>`\ (\ to\: :ref:`Quaternion<class_Quaternion>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Quaternion_method_is_finite>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Quaternion_method_is_normalized>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Quaternion_method_length>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length_squared<class_Quaternion_method_length_squared>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`log<class_Quaternion_method_log>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`normalized<class_Quaternion_method_normalized>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`slerp<class_Quaternion_method_slerp>`\ (\ to\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`slerpni<class_Quaternion_method_slerpni>`\ (\ to\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`spherical_cubic_interpolate<class_Quaternion_method_spherical_cubic_interpolate>`\ (\ b\: :ref:`Quaternion<class_Quaternion>`, pre_a\: :ref:`Quaternion<class_Quaternion>`, post_b\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`spherical_cubic_interpolate_in_time<class_Quaternion_method_spherical_cubic_interpolate_in_time>`\ (\ b\: :ref:`Quaternion<class_Quaternion>`, pre_a\: :ref:`Quaternion<class_Quaternion>`, post_b\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -132,33 +142,33 @@ Operators .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Quaternion_operator_neq_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Quaternion_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator +<class_Quaternion_operator_sum_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator -<class_Quaternion_operator_dif_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator /<class_Quaternion_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator /<class_Quaternion_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Quaternion_operator_eq_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_Quaternion_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator unary+<class_Quaternion_operator_unplus>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`operator unary-<class_Quaternion_operator_unminus>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Quaternion_operator_neq_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Quaternion_operator_mul_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator *<class_Quaternion_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator +<class_Quaternion_operator_sum_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator -<class_Quaternion_operator_dif_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator /<class_Quaternion_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator /<class_Quaternion_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Quaternion_operator_eq_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_Quaternion_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator unary+<class_Quaternion_operator_unplus>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`operator unary-<class_Quaternion_operator_unminus>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -173,9 +183,11 @@ Constants .. rst-class:: classref-constant -**IDENTITY** = ``Quaternion(0, 0, 0, 1)`` +**IDENTITY** = ``Quaternion(0, 0, 0, 1)`` :ref:`🔗<class_Quaternion_constant_IDENTITY>` + +The identity quaternion, representing no rotation. This has the same rotation as :ref:`Basis.IDENTITY<class_Basis_constant_IDENTITY>`. -The identity quaternion, representing no rotation. Equivalent to an identity :ref:`Basis<class_Basis>` matrix. If a vector is transformed by an identity quaternion, it will not change. +If a :ref:`Vector3<class_Vector3>` is rotated (multiplied) by this quaternion, it does not change. .. rst-class:: classref-section-separator @@ -190,11 +202,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **w** = ``1.0`` +:ref:`float<class_float>` **w** = ``1.0`` :ref:`🔗<class_Quaternion_property_w>` -W component of the quaternion (real part). +W component of the quaternion. This is the "real" part. -Quaternion components should usually not be manipulated directly. +\ **Note:** Quaternion components should usually not be manipulated directly. .. rst-class:: classref-item-separator @@ -204,11 +216,11 @@ Quaternion components should usually not be manipulated directly. .. rst-class:: classref-property -:ref:`float<class_float>` **x** = ``0.0`` +:ref:`float<class_float>` **x** = ``0.0`` :ref:`🔗<class_Quaternion_property_x>` -X component of the quaternion (imaginary ``i`` axis part). +X component of the quaternion. This is the value along the "imaginary" ``i`` axis. -Quaternion components should usually not be manipulated directly. +\ **Note:** Quaternion components should usually not be manipulated directly. .. rst-class:: classref-item-separator @@ -218,11 +230,11 @@ Quaternion components should usually not be manipulated directly. .. rst-class:: classref-property -:ref:`float<class_float>` **y** = ``0.0`` +:ref:`float<class_float>` **y** = ``0.0`` :ref:`🔗<class_Quaternion_property_y>` -Y component of the quaternion (imaginary ``j`` axis part). +Y component of the quaternion. This is the value along the "imaginary" ``j`` axis. -Quaternion components should usually not be manipulated directly. +\ **Note:** Quaternion components should usually not be manipulated directly. .. rst-class:: classref-item-separator @@ -232,11 +244,11 @@ Quaternion components should usually not be manipulated directly. .. rst-class:: classref-property -:ref:`float<class_float>` **z** = ``0.0`` +:ref:`float<class_float>` **z** = ``0.0`` :ref:`🔗<class_Quaternion_property_z>` -Z component of the quaternion (imaginary ``k`` axis part). +Z component of the quaternion. This is the value along the "imaginary" ``k`` axis. -Quaternion components should usually not be manipulated directly. +\ **Note:** Quaternion components should usually not be manipulated directly. .. rst-class:: classref-section-separator @@ -251,9 +263,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ ) :ref:`🔗<class_Quaternion_constructor_Quaternion>` -Constructs a default-initialized quaternion with all components set to ``0``. +Constructs a **Quaternion** identical to the :ref:`IDENTITY<class_Quaternion_constant_IDENTITY>`. .. rst-class:: classref-item-separator @@ -261,7 +273,7 @@ Constructs a default-initialized quaternion with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** :ref:`Quaternion<class_Quaternion>` from **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ from\: :ref:`Quaternion<class_Quaternion>`\ ) Constructs a **Quaternion** as a copy of the given **Quaternion**. @@ -271,9 +283,9 @@ Constructs a **Quaternion** as a copy of the given **Quaternion**. .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** :ref:`Vector3<class_Vector3>` arc_from, :ref:`Vector3<class_Vector3>` arc_to **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ arc_from\: :ref:`Vector3<class_Vector3>`, arc_to\: :ref:`Vector3<class_Vector3>`\ ) -Constructs a quaternion representing the shortest arc between two points on the surface of a sphere with a radius of ``1.0``. +Constructs a **Quaternion** representing the shortest arc between ``arc_from`` and ``arc_to``. These can be imagined as two points intersecting a sphere's surface, with a radius of ``1.0``. .. rst-class:: classref-item-separator @@ -281,9 +293,9 @@ Constructs a quaternion representing the shortest arc between two points on the .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) -Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. +Constructs a **Quaternion** representing rotation around the ``axis`` by the given ``angle``, in radians. The axis must be a normalized vector. .. rst-class:: classref-item-separator @@ -291,9 +303,11 @@ Constructs a quaternion that will rotate around the given axis by the specified .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** :ref:`Basis<class_Basis>` from **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ from\: :ref:`Basis<class_Basis>`\ ) -Constructs a quaternion from the given :ref:`Basis<class_Basis>`. +Constructs a **Quaternion** from the given rotation :ref:`Basis<class_Basis>`. + +This constructor is faster than :ref:`Basis.get_rotation_quaternion<class_Basis_method_get_rotation_quaternion>`, but the given basis must be *orthonormalized* (see :ref:`Basis.orthonormalized<class_Basis_method_orthonormalized>`). Otherwise, the constructor fails and returns :ref:`IDENTITY<class_Quaternion_constant_IDENTITY>`. .. rst-class:: classref-item-separator @@ -301,9 +315,11 @@ Constructs a quaternion from the given :ref:`Basis<class_Basis>`. .. rst-class:: classref-constructor -:ref:`Quaternion<class_Quaternion>` **Quaternion** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z, :ref:`float<class_float>` w **)** +:ref:`Quaternion<class_Quaternion>` **Quaternion**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`, w\: :ref:`float<class_float>`\ ) + +Constructs a **Quaternion** defined by the given values. -Constructs a quaternion defined by the given values. +\ **Note:** Only normalized quaternions represent rotation; if these values are not normalized, the new **Quaternion** will not be a valid rotation. .. rst-class:: classref-section-separator @@ -318,7 +334,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **angle_to** **(** :ref:`Quaternion<class_Quaternion>` to **)** |const| +:ref:`float<class_float>` **angle_to**\ (\ to\: :ref:`Quaternion<class_Quaternion>`\ ) |const| :ref:`🔗<class_Quaternion_method_angle_to>` Returns the angle between this quaternion and ``to``. This is the magnitude of the angle you would need to rotate by to get from one to the other. @@ -332,9 +348,11 @@ Returns the angle between this quaternion and ``to``. This is the magnitude of t .. rst-class:: classref-method -:ref:`float<class_float>` **dot** **(** :ref:`Quaternion<class_Quaternion>` with **)** |const| +:ref:`float<class_float>` **dot**\ (\ with\: :ref:`Quaternion<class_Quaternion>`\ ) |const| :ref:`🔗<class_Quaternion_method_dot>` + +Returns the dot product between this quaternion and ``with``. -Returns the dot product of two quaternions. +This is equivalent to ``(quat.x * with.x) + (quat.y * with.y) + (quat.z * with.z) + (quat.w * with.w)``. .. rst-class:: classref-item-separator @@ -344,11 +362,9 @@ Returns the dot product of two quaternions. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **exp** **(** **)** |const| +:ref:`Quaternion<class_Quaternion>` **exp**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_exp>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the exponential of this quaternion. The rotation axis of the result is the normalized rotation axis of this quaternion, the angle of the result is the length of the vector part of this quaternion. .. rst-class:: classref-item-separator @@ -358,9 +374,9 @@ Returns the dot product of two quaternions. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **from_euler** **(** :ref:`Vector3<class_Vector3>` euler **)** |static| +:ref:`Quaternion<class_Quaternion>` **from_euler**\ (\ euler\: :ref:`Vector3<class_Vector3>`\ ) |static| :ref:`🔗<class_Quaternion_method_from_euler>` -Constructs a Quaternion from Euler angles in YXZ rotation order. +Constructs a new **Quaternion** from the given :ref:`Vector3<class_Vector3>` of `Euler angles <https://en.wikipedia.org/wiki/Euler_angles>`__, in radians. This method always uses the YXZ convention (:ref:`@GlobalScope.EULER_ORDER_YXZ<class_@GlobalScope_constant_EULER_ORDER_YXZ>`). .. rst-class:: classref-item-separator @@ -370,11 +386,11 @@ Constructs a Quaternion from Euler angles in YXZ rotation order. .. rst-class:: classref-method -:ref:`float<class_float>` **get_angle** **(** **)** |const| +:ref:`float<class_float>` **get_angle**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_get_angle>` -.. container:: contribute +Returns the angle of the rotation represented by this quaternion. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** The quaternion must be normalized. .. rst-class:: classref-item-separator @@ -384,11 +400,9 @@ Constructs a Quaternion from Euler angles in YXZ rotation order. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_axis** **(** **)** |const| - -.. container:: contribute +:ref:`Vector3<class_Vector3>` **get_axis**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_get_axis>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the rotation axis of the rotation represented by this quaternion. .. rst-class:: classref-item-separator @@ -398,9 +412,11 @@ Constructs a Quaternion from Euler angles in YXZ rotation order. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_euler** **(** :ref:`int<class_int>` order=2 **)** |const| +:ref:`Vector3<class_Vector3>` **get_euler**\ (\ order\: :ref:`int<class_int>` = 2\ ) |const| :ref:`🔗<class_Quaternion_method_get_euler>` -Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the ``order`` parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). +Returns this quaternion's rotation as a :ref:`Vector3<class_Vector3>` of `Euler angles <https://en.wikipedia.org/wiki/Euler_angles>`__, in radians. + +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder<enum_@GlobalScope_EulerOrder>` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ<class_@GlobalScope_constant_EULER_ORDER_YXZ>`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler<class_Quaternion_method_from_euler>`, this order is reversed. .. rst-class:: classref-item-separator @@ -410,9 +426,9 @@ Returns the quaternion's rotation in the form of Euler angles. The Euler order d .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **inverse** **(** **)** |const| +:ref:`Quaternion<class_Quaternion>` **inverse**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_inverse>` -Returns the inverse of the quaternion. +Returns the inverse version of this quaternion, inverting the sign of every component except :ref:`w<class_Quaternion_property_w>`. .. rst-class:: classref-item-separator @@ -422,7 +438,7 @@ Returns the inverse of the quaternion. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Quaternion<class_Quaternion>` to **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ to\: :ref:`Quaternion<class_Quaternion>`\ ) |const| :ref:`🔗<class_Quaternion_method_is_equal_approx>` Returns ``true`` if this quaternion and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. @@ -434,7 +450,7 @@ Returns ``true`` if this quaternion and ``to`` are approximately equal, by runni .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_is_finite>` Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -446,9 +462,9 @@ Returns ``true`` if this quaternion is finite, by calling :ref:`@GlobalScope.is_ .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_normalized** **(** **)** |const| +:ref:`bool<class_bool>` **is_normalized**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_is_normalized>` -Returns whether the quaternion is normalized or not. +Returns ``true`` if this quaternion is normalized. See also :ref:`normalized<class_Quaternion_method_normalized>`. .. rst-class:: classref-item-separator @@ -458,9 +474,9 @@ Returns whether the quaternion is normalized or not. .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_length>` -Returns the length of the quaternion. +Returns this quaternion's length, also called magnitude. .. rst-class:: classref-item-separator @@ -470,9 +486,11 @@ Returns the length of the quaternion. .. rst-class:: classref-method -:ref:`float<class_float>` **length_squared** **(** **)** |const| +:ref:`float<class_float>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_length_squared>` + +Returns this quaternion's length, squared. -Returns the length of the quaternion, squared. +\ **Note:** This method is faster than :ref:`length<class_Quaternion_method_length>`, so prefer it if you only need to compare quaternion lengths. .. rst-class:: classref-item-separator @@ -482,11 +500,9 @@ Returns the length of the quaternion, squared. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **log** **(** **)** |const| - -.. container:: contribute +:ref:`Quaternion<class_Quaternion>` **log**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_log>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the logarithm of this quaternion. Multiplies this quaternion's rotation axis by its rotation angle, and stores the result in the returned quaternion's vector part (:ref:`x<class_Quaternion_property_x>`, :ref:`y<class_Quaternion_property_y>`, and :ref:`z<class_Quaternion_property_z>`). The returned quaternion's real part (:ref:`w<class_Quaternion_property_w>`) is always ``0.0``. .. rst-class:: classref-item-separator @@ -496,9 +512,9 @@ Returns the length of the quaternion, squared. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **normalized** **(** **)** |const| +:ref:`Quaternion<class_Quaternion>` **normalized**\ (\ ) |const| :ref:`🔗<class_Quaternion_method_normalized>` -Returns a copy of the quaternion, normalized to unit length. +Returns a copy of this quaternion, normalized so that its length is ``1.0``. See also :ref:`is_normalized<class_Quaternion_method_is_normalized>`. .. rst-class:: classref-item-separator @@ -508,11 +524,9 @@ Returns a copy of the quaternion, normalized to unit length. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **slerp** **(** :ref:`Quaternion<class_Quaternion>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Quaternion<class_Quaternion>` **slerp**\ (\ to\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Quaternion_method_slerp>` -Returns the result of the spherical linear interpolation between this quaternion and ``to`` by amount ``weight``. - -\ **Note:** Both quaternions must be normalized. +Performs a spherical-linear interpolation with the ``to`` quaternion, given a ``weight`` and returns the result. Both this quaternion and ``to`` must be normalized. .. rst-class:: classref-item-separator @@ -522,9 +536,9 @@ Returns the result of the spherical linear interpolation between this quaternion .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **slerpni** **(** :ref:`Quaternion<class_Quaternion>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Quaternion<class_Quaternion>` **slerpni**\ (\ to\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Quaternion_method_slerpni>` -Returns the result of the spherical linear interpolation between this quaternion and ``to`` by amount ``weight``, but without checking if the rotation path is not bigger than 90 degrees. +Performs a spherical-linear interpolation with the ``to`` quaternion, given a ``weight`` and returns the result. Unlike :ref:`slerp<class_Quaternion_method_slerp>`, this method does not check if the rotation path is smaller than 90 degrees. Both this quaternion and ``to`` must be normalized. .. rst-class:: classref-item-separator @@ -534,7 +548,7 @@ Returns the result of the spherical linear interpolation between this quaternion .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **spherical_cubic_interpolate** **(** :ref:`Quaternion<class_Quaternion>` b, :ref:`Quaternion<class_Quaternion>` pre_a, :ref:`Quaternion<class_Quaternion>` post_b, :ref:`float<class_float>` weight **)** |const| +:ref:`Quaternion<class_Quaternion>` **spherical_cubic_interpolate**\ (\ b\: :ref:`Quaternion<class_Quaternion>`, pre_a\: :ref:`Quaternion<class_Quaternion>`, post_b\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Quaternion_method_spherical_cubic_interpolate>` Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. @@ -546,11 +560,11 @@ Performs a spherical cubic interpolation between quaternions ``pre_a``, this vec .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **spherical_cubic_interpolate_in_time** **(** :ref:`Quaternion<class_Quaternion>` b, :ref:`Quaternion<class_Quaternion>` pre_a, :ref:`Quaternion<class_Quaternion>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| +:ref:`Quaternion<class_Quaternion>` **spherical_cubic_interpolate_in_time**\ (\ b\: :ref:`Quaternion<class_Quaternion>`, pre_a\: :ref:`Quaternion<class_Quaternion>`, post_b\: :ref:`Quaternion<class_Quaternion>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Quaternion_method_spherical_cubic_interpolate_in_time>` Performs a spherical cubic interpolation between quaternions ``pre_a``, this vector, ``b``, and ``post_b``, by the given amount ``weight``. -It can perform smoother interpolation than ``spherical_cubic_interpolate()`` by the time values. +It can perform smoother interpolation than :ref:`spherical_cubic_interpolate<class_Quaternion_method_spherical_cubic_interpolate>` by the time values. .. rst-class:: classref-section-separator @@ -565,9 +579,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Quaternion_operator_neq_Quaternion>` -Returns ``true`` if the quaternions are not equal. +Returns ``true`` if the components of both quaternions are not exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Quaternion_method_is_equal_approx>` instead, which is more reliable. @@ -579,9 +593,9 @@ Returns ``true`` if the quaternions are not equal. .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator *** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator ***\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Quaternion_operator_mul_Quaternion>` -Composes these two quaternions by multiplying them together. This has the effect of rotating the second quaternion (the child) by the first quaternion (the parent). +Composes (multiplies) two quaternions. This rotates the ``right`` quaternion (the child) by this quaternion (the parent). .. rst-class:: classref-item-separator @@ -591,9 +605,9 @@ Composes these two quaternions by multiplying them together. This has the effect .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Quaternion_operator_mul_Vector3>` -Rotates (multiplies) the :ref:`Vector3<class_Vector3>` by the given **Quaternion**. +Rotates (multiplies) the ``right`` vector by this quaternion, returning a :ref:`Vector3<class_Vector3>`. .. rst-class:: classref-item-separator @@ -603,9 +617,11 @@ Rotates (multiplies) the :ref:`Vector3<class_Vector3>` by the given **Quaternion .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Quaternion_operator_mul_float>` + +Multiplies each component of the **Quaternion** by the right :ref:`float<class_float>` value. -Multiplies each component of the **Quaternion** by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -615,9 +631,11 @@ Multiplies each component of the **Quaternion** by the given value. This operati .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Quaternion_operator_mul_int>` + +Multiplies each component of the **Quaternion** by the right :ref:`int<class_int>` value. -Multiplies each component of the **Quaternion** by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -627,9 +645,11 @@ Multiplies each component of the **Quaternion** by the given value. This operati .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator +** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator +**\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Quaternion_operator_sum_Quaternion>` -Adds each component of the left **Quaternion** to the right **Quaternion**. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations. +Adds each component of the left **Quaternion** to the right **Quaternion**. + +This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations. .. rst-class:: classref-item-separator @@ -639,9 +659,11 @@ Adds each component of the left **Quaternion** to the right **Quaternion**. This .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator -** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator -**\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Quaternion_operator_dif_Quaternion>` + +Subtracts each component of the left **Quaternion** by the right **Quaternion**. -Subtracts each component of the left **Quaternion** by the right **Quaternion**. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -651,9 +673,11 @@ Subtracts each component of the left **Quaternion** by the right **Quaternion**. .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Quaternion_operator_div_float>` + +Divides each component of the **Quaternion** by the right :ref:`float<class_float>` value. -Divides each component of the **Quaternion** by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -663,9 +687,11 @@ Divides each component of the **Quaternion** by the given value. This operation .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Quaternion<class_Quaternion>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Quaternion_operator_div_int>` -Divides each component of the **Quaternion** by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression. +Divides each component of the **Quaternion** by the right :ref:`int<class_int>` value. + +This operation is not meaningful on its own, but it can be used as a part of a larger expression. .. rst-class:: classref-item-separator @@ -675,9 +701,9 @@ Divides each component of the **Quaternion** by the given value. This operation .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Quaternion_operator_eq_Quaternion>` -Returns ``true`` if the quaternions are exactly equal. +Returns ``true`` if the components of both quaternions are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Quaternion_method_is_equal_approx>` instead, which is more reliable. @@ -689,9 +715,11 @@ Returns ``true`` if the quaternions are exactly equal. .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Quaternion_operator_idx_int>` + +Accesses each component of this quaternion by their index. -Access quaternion components using their index. ``q[0]`` is equivalent to ``q.x``, ``q[1]`` is equivalent to ``q.y``, ``q[2]`` is equivalent to ``q.z``, and ``q[3]`` is equivalent to ``q.w``. +Index ``0`` is the same as :ref:`x<class_Quaternion_property_x>`, index ``1`` is the same as :ref:`y<class_Quaternion_property_y>`, index ``2`` is the same as :ref:`z<class_Quaternion_property_z>`, and index ``3`` is the same as :ref:`w<class_Quaternion_property_w>`. .. rst-class:: classref-item-separator @@ -701,7 +729,7 @@ Access quaternion components using their index. ``q[0]`` is equivalent to ``q.x` .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator unary+** **(** **)** +:ref:`Quaternion<class_Quaternion>` **operator unary+**\ (\ ) :ref:`🔗<class_Quaternion_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -713,9 +741,9 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Quaternion<class_Quaternion>` **operator unary-** **(** **)** +:ref:`Quaternion<class_Quaternion>` **operator unary-**\ (\ ) :ref:`🔗<class_Quaternion_operator_unminus>` -Returns the negative value of the **Quaternion**. This is the same as writing ``Quaternion(-q.x, -q.y, -q.z, -q.w)``. This operation results in a quaternion that represents the same rotation. +Returns the negative value of the **Quaternion**. This is the same as multiplying all components by ``-1``. This operation results in a quaternion that represents the same rotation. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -724,3 +752,4 @@ Returns the negative value of the **Quaternion**. This is the same as writing `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_randomnumbergenerator.rst b/classes/class_randomnumbergenerator.rst index b68edd4d749..00a050eddfa 100644 --- a/classes/class_randomnumbergenerator.rst +++ b/classes/class_randomnumbergenerator.rst @@ -23,7 +23,7 @@ RandomNumberGenerator is a class for generating pseudo-random numbers. It curren \ **Note:** The underlying algorithm is an implementation detail and should not be depended upon. -To generate a random float number (within a given range) based on a time-dependant seed: +To generate a random float number (within a given range) based on a time-dependent seed: :: @@ -60,19 +60,21 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`randf<class_RandomNumberGenerator_method_randf>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`randf_range<class_RandomNumberGenerator_method_randf_range>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`randfn<class_RandomNumberGenerator_method_randfn>` **(** :ref:`float<class_float>` mean=0.0, :ref:`float<class_float>` deviation=1.0 **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`randi<class_RandomNumberGenerator_method_randi>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`randi_range<class_RandomNumberGenerator_method_randi_range>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`randomize<class_RandomNumberGenerator_method_randomize>` **(** **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rand_weighted<class_RandomNumberGenerator_method_rand_weighted>`\ (\ weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`randf<class_RandomNumberGenerator_method_randf>`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`randf_range<class_RandomNumberGenerator_method_randf_range>`\ (\ from\: :ref:`float<class_float>`, to\: :ref:`float<class_float>`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`randfn<class_RandomNumberGenerator_method_randfn>`\ (\ mean\: :ref:`float<class_float>` = 0.0, deviation\: :ref:`float<class_float>` = 1.0\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`randi<class_RandomNumberGenerator_method_randi>`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`randi_range<class_RandomNumberGenerator_method_randi_range>`\ (\ from\: :ref:`int<class_int>`, to\: :ref:`int<class_int>`\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`randomize<class_RandomNumberGenerator_method_randomize>`\ (\ ) | + +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,12 +89,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **seed** = ``0`` +:ref:`int<class_int>` **seed** = ``0`` :ref:`🔗<class_RandomNumberGenerator_property_seed>` .. rst-class:: classref-property-setget -- void **set_seed** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_seed** **(** **)** +- |void| **set_seed**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_seed**\ (\ ) Initializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers. @@ -116,12 +118,12 @@ Initializes the random number generator state based on the given seed value. A g .. rst-class:: classref-property -:ref:`int<class_int>` **state** = ``0`` +:ref:`int<class_int>` **state** = ``0`` :ref:`🔗<class_RandomNumberGenerator_property_state>` .. rst-class:: classref-property-setget -- void **set_state** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_state** **(** **)** +- |void| **set_state**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_state**\ (\ ) The current state of the random number generator. Save and restore this property to restore the generator to a previous state: @@ -147,11 +149,39 @@ The current state of the random number generator. Save and restore this property Method Descriptions ------------------- +.. _class_RandomNumberGenerator_method_rand_weighted: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **rand_weighted**\ (\ weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_RandomNumberGenerator_method_rand_weighted>` + +Returns a random index with non-uniform weights. Prints an error and returns ``-1`` if the array is empty. + + +.. tabs:: + + .. code-tab:: gdscript + + var rng = RandomNumberGenerator.new() + + var my_array = ["one", "two", "three", "four"] + var weights = PackedFloat32Array([0.5, 1, 1, 2]) + + # Prints one of the four elements in `my_array`. + # It is more likely to print "four", and less likely to print "one". + print(my_array[rng.rand_weighted(weights)]) + + + +.. rst-class:: classref-item-separator + +---- + .. _class_RandomNumberGenerator_method_randf: .. rst-class:: classref-method -:ref:`float<class_float>` **randf** **(** **)** +:ref:`float<class_float>` **randf**\ (\ ) :ref:`🔗<class_RandomNumberGenerator_method_randf>` Returns a pseudo-random float between ``0.0`` and ``1.0`` (inclusive). @@ -163,7 +193,7 @@ Returns a pseudo-random float between ``0.0`` and ``1.0`` (inclusive). .. rst-class:: classref-method -:ref:`float<class_float>` **randf_range** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to **)** +:ref:`float<class_float>` **randf_range**\ (\ from\: :ref:`float<class_float>`, to\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RandomNumberGenerator_method_randf_range>` Returns a pseudo-random float between ``from`` and ``to`` (inclusive). @@ -175,9 +205,11 @@ Returns a pseudo-random float between ``from`` and ``to`` (inclusive). .. rst-class:: classref-method -:ref:`float<class_float>` **randfn** **(** :ref:`float<class_float>` mean=0.0, :ref:`float<class_float>` deviation=1.0 **)** +:ref:`float<class_float>` **randfn**\ (\ mean\: :ref:`float<class_float>` = 0.0, deviation\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_RandomNumberGenerator_method_randfn>` + +Returns a `normally-distributed <https://en.wikipedia.org/wiki/Normal_distribution>`__, pseudo-random floating-point number from the specified ``mean`` and a standard ``deviation``. This is also known as a Gaussian distribution. -Returns a `normally-distributed <https://en.wikipedia.org/wiki/Normal_distribution>`__ pseudo-random number, using Box-Muller transform with the specified ``mean`` and a standard ``deviation``. This is also called Gaussian distribution. +\ **Note:** This method uses the `Box-Muller transform <https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform>`__ algorithm. .. rst-class:: classref-item-separator @@ -187,7 +219,7 @@ Returns a `normally-distributed <https://en.wikipedia.org/wiki/Normal_distributi .. rst-class:: classref-method -:ref:`int<class_int>` **randi** **(** **)** +:ref:`int<class_int>` **randi**\ (\ ) :ref:`🔗<class_RandomNumberGenerator_method_randi>` Returns a pseudo-random 32-bit unsigned integer between ``0`` and ``4294967295`` (inclusive). @@ -199,7 +231,7 @@ Returns a pseudo-random 32-bit unsigned integer between ``0`` and ``4294967295`` .. rst-class:: classref-method -:ref:`int<class_int>` **randi_range** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** +:ref:`int<class_int>` **randi_range**\ (\ from\: :ref:`int<class_int>`, to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RandomNumberGenerator_method_randi_range>` Returns a pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclusive). @@ -211,9 +243,9 @@ Returns a pseudo-random 32-bit signed integer between ``from`` and ``to`` (inclu .. rst-class:: classref-method -void **randomize** **(** **)** +|void| **randomize**\ (\ ) :ref:`🔗<class_RandomNumberGenerator_method_randomize>` -Setups a time-based seed to for this **RandomNumberGenerator** instance. Unlike the :ref:`@GlobalScope<class_@GlobalScope>` random number generation functions, different **RandomNumberGenerator** instances can use different seeds. +Sets up a time-based seed for this **RandomNumberGenerator** instance. Unlike the :ref:`@GlobalScope<class_@GlobalScope>` random number generation functions, different **RandomNumberGenerator** instances can use different seeds. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -222,3 +254,4 @@ Setups a time-based seed to for this **RandomNumberGenerator** instance. Unlike .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_range.rst b/classes/class_range.rst index 8fd7f9ad842..bd6d50ae582 100644 --- a/classes/class_range.rst +++ b/classes/class_range.rst @@ -48,7 +48,7 @@ Properties +--------------------------------------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`rounded<class_Range_property_rounded>` | ``false`` | +--------------------------------------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +--------------------------------------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`step<class_Range_property_step>` | ``0.01`` | +--------------------------------------------------------+----------------------------------------------------------+------------------------------------------------------------------------------+ @@ -63,15 +63,15 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_value_changed<class_Range_method__value_changed>` **(** :ref:`float<class_float>` new_value **)** |virtual| | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_value_no_signal<class_Range_method_set_value_no_signal>` **(** :ref:`float<class_float>` value **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`share<class_Range_method_share>` **(** :ref:`Node<class_Node>` with **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unshare<class_Range_method_unshare>` **(** **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ + +--------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_value_changed<class_Range_private_method__value_changed>`\ (\ new_value\: :ref:`float<class_float>`\ ) |virtual| | + +--------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_value_no_signal<class_Range_method_set_value_no_signal>`\ (\ value\: :ref:`float<class_float>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`share<class_Range_method_share>`\ (\ with\: :ref:`Node<class_Node>`\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unshare<class_Range_method_unshare>`\ (\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -86,7 +86,7 @@ Signals .. rst-class:: classref-signal -**changed** **(** **)** +**changed**\ (\ ) :ref:`🔗<class_Range_signal_changed>` Emitted when :ref:`min_value<class_Range_property_min_value>`, :ref:`max_value<class_Range_property_max_value>`, :ref:`page<class_Range_property_page>`, or :ref:`step<class_Range_property_step>` change. @@ -98,7 +98,7 @@ Emitted when :ref:`min_value<class_Range_property_min_value>`, :ref:`max_value<c .. rst-class:: classref-signal -**value_changed** **(** :ref:`float<class_float>` value **)** +**value_changed**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Range_signal_value_changed>` Emitted when :ref:`value<class_Range_property_value>` changes. When used on a :ref:`Slider<class_Slider>`, this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to :ref:`value_changed<class_Range_signal_value_changed>`, consider using a *debouncing* :ref:`Timer<class_Timer>` to call the function less often. @@ -117,12 +117,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_greater** = ``false`` +:ref:`bool<class_bool>` **allow_greater** = ``false`` :ref:`🔗<class_Range_property_allow_greater>` .. rst-class:: classref-property-setget -- void **set_allow_greater** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_greater_allowed** **(** **)** +- |void| **set_allow_greater**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_greater_allowed**\ (\ ) If ``true``, :ref:`value<class_Range_property_value>` may be greater than :ref:`max_value<class_Range_property_max_value>`. @@ -134,12 +134,12 @@ If ``true``, :ref:`value<class_Range_property_value>` may be greater than :ref:` .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_lesser** = ``false`` +:ref:`bool<class_bool>` **allow_lesser** = ``false`` :ref:`🔗<class_Range_property_allow_lesser>` .. rst-class:: classref-property-setget -- void **set_allow_lesser** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_lesser_allowed** **(** **)** +- |void| **set_allow_lesser**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_lesser_allowed**\ (\ ) If ``true``, :ref:`value<class_Range_property_value>` may be less than :ref:`min_value<class_Range_property_min_value>`. @@ -151,12 +151,12 @@ If ``true``, :ref:`value<class_Range_property_value>` may be less than :ref:`min .. rst-class:: classref-property -:ref:`bool<class_bool>` **exp_edit** = ``false`` +:ref:`bool<class_bool>` **exp_edit** = ``false`` :ref:`🔗<class_Range_property_exp_edit>` .. rst-class:: classref-property-setget -- void **set_exp_ratio** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ratio_exp** **(** **)** +- |void| **set_exp_ratio**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ratio_exp**\ (\ ) If ``true``, and :ref:`min_value<class_Range_property_min_value>` is greater than 0, :ref:`value<class_Range_property_value>` will be represented exponentially rather than linearly. @@ -168,12 +168,12 @@ If ``true``, and :ref:`min_value<class_Range_property_min_value>` is greater tha .. rst-class:: classref-property -:ref:`float<class_float>` **max_value** = ``100.0`` +:ref:`float<class_float>` **max_value** = ``100.0`` :ref:`🔗<class_Range_property_max_value>` .. rst-class:: classref-property-setget -- void **set_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max** **(** **)** +- |void| **set_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max**\ (\ ) Maximum value. Range is clamped if :ref:`value<class_Range_property_value>` is greater than :ref:`max_value<class_Range_property_max_value>`. @@ -185,12 +185,12 @@ Maximum value. Range is clamped if :ref:`value<class_Range_property_value>` is g .. rst-class:: classref-property -:ref:`float<class_float>` **min_value** = ``0.0`` +:ref:`float<class_float>` **min_value** = ``0.0`` :ref:`🔗<class_Range_property_min_value>` .. rst-class:: classref-property-setget -- void **set_min** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min** **(** **)** +- |void| **set_min**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min**\ (\ ) Minimum value. Range is clamped if :ref:`value<class_Range_property_value>` is less than :ref:`min_value<class_Range_property_min_value>`. @@ -202,12 +202,12 @@ Minimum value. Range is clamped if :ref:`value<class_Range_property_value>` is l .. rst-class:: classref-property -:ref:`float<class_float>` **page** = ``0.0`` +:ref:`float<class_float>` **page** = ``0.0`` :ref:`🔗<class_Range_property_page>` .. rst-class:: classref-property-setget -- void **set_page** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_page** **(** **)** +- |void| **set_page**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_page**\ (\ ) Page size. Used mainly for :ref:`ScrollBar<class_ScrollBar>`. ScrollBar's length is its size multiplied by :ref:`page<class_Range_property_page>` over the difference between :ref:`min_value<class_Range_property_min_value>` and :ref:`max_value<class_Range_property_max_value>`. @@ -219,12 +219,12 @@ Page size. Used mainly for :ref:`ScrollBar<class_ScrollBar>`. ScrollBar's length .. rst-class:: classref-property -:ref:`float<class_float>` **ratio** +:ref:`float<class_float>` **ratio** :ref:`🔗<class_Range_property_ratio>` .. rst-class:: classref-property-setget -- void **set_as_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_as_ratio** **(** **)** +- |void| **set_as_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_as_ratio**\ (\ ) The value mapped between 0 and 1. @@ -236,12 +236,12 @@ The value mapped between 0 and 1. .. rst-class:: classref-property -:ref:`bool<class_bool>` **rounded** = ``false`` +:ref:`bool<class_bool>` **rounded** = ``false`` :ref:`🔗<class_Range_property_rounded>` .. rst-class:: classref-property-setget -- void **set_use_rounded_values** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_rounded_values** **(** **)** +- |void| **set_use_rounded_values**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_rounded_values**\ (\ ) If ``true``, :ref:`value<class_Range_property_value>` will always be rounded to the nearest integer. @@ -253,12 +253,12 @@ If ``true``, :ref:`value<class_Range_property_value>` will always be rounded to .. rst-class:: classref-property -:ref:`float<class_float>` **step** = ``0.01`` +:ref:`float<class_float>` **step** = ``0.01`` :ref:`🔗<class_Range_property_step>` .. rst-class:: classref-property-setget -- void **set_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_step** **(** **)** +- |void| **set_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_step**\ (\ ) If greater than 0, :ref:`value<class_Range_property_value>` will always be rounded to a multiple of this property's value. If :ref:`rounded<class_Range_property_rounded>` is also ``true``, :ref:`value<class_Range_property_value>` will first be rounded to a multiple of this property's value, then rounded to the nearest integer. @@ -270,12 +270,12 @@ If greater than 0, :ref:`value<class_Range_property_value>` will always be round .. rst-class:: classref-property -:ref:`float<class_float>` **value** = ``0.0`` +:ref:`float<class_float>` **value** = ``0.0`` :ref:`🔗<class_Range_property_value>` .. rst-class:: classref-property-setget -- void **set_value** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_value** **(** **)** +- |void| **set_value**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_value**\ (\ ) Range's current value. Changing this property (even via code) will trigger :ref:`value_changed<class_Range_signal_value_changed>` signal. Use :ref:`set_value_no_signal<class_Range_method_set_value_no_signal>` if you want to avoid it. @@ -288,11 +288,11 @@ Range's current value. Changing this property (even via code) will trigger :ref: Method Descriptions ------------------- -.. _class_Range_method__value_changed: +.. _class_Range_private_method__value_changed: .. rst-class:: classref-method -void **_value_changed** **(** :ref:`float<class_float>` new_value **)** |virtual| +|void| **_value_changed**\ (\ new_value\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_Range_private_method__value_changed>` Called when the **Range**'s value is changed (following the same conditions as :ref:`value_changed<class_Range_signal_value_changed>`). @@ -304,7 +304,7 @@ Called when the **Range**'s value is changed (following the same conditions as : .. rst-class:: classref-method -void **set_value_no_signal** **(** :ref:`float<class_float>` value **)** +|void| **set_value_no_signal**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Range_method_set_value_no_signal>` Sets the **Range**'s current value to the specified ``value``, without emitting the :ref:`value_changed<class_Range_signal_value_changed>` signal. @@ -316,7 +316,7 @@ Sets the **Range**'s current value to the specified ``value``, without emitting .. rst-class:: classref-method -void **share** **(** :ref:`Node<class_Node>` with **)** +|void| **share**\ (\ with\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Range_method_share>` Binds two **Range**\ s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. @@ -328,7 +328,7 @@ Binds two **Range**\ s together along with any ranges previously grouped with ei .. rst-class:: classref-method -void **unshare** **(** **)** +|void| **unshare**\ (\ ) :ref:`🔗<class_Range_method_unshare>` Stops the **Range** from sharing its member variables with any other. @@ -339,3 +339,4 @@ Stops the **Range** from sharing its member variables with any other. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_raycast2d.rst b/classes/class_raycast2d.rst index 878bd1d1823..6d770a5bfb1 100644 --- a/classes/class_raycast2d.rst +++ b/classes/class_raycast2d.rst @@ -19,7 +19,7 @@ A ray in 2D space, used to find the first :ref:`CollisionObject2D<class_Collisio Description ----------- -A raycast represents a ray from its origin to its :ref:`target_position<class_RayCast2D_property_target_position>` that finds the closest :ref:`CollisionObject2D<class_CollisionObject2D>` along its path, if it intersects any. This is useful for a lot of things, such as +A raycast represents a ray from its origin to its :ref:`target_position<class_RayCast2D_property_target_position>` that finds the closest :ref:`CollisionObject2D<class_CollisionObject2D>` along its path, if it intersects any. \ **RayCast2D** can ignore some objects by adding them to an exception list, by making its detection reporting ignore :ref:`Area2D<class_Area2D>`\ s (:ref:`collide_with_areas<class_RayCast2D_property_collide_with_areas>`) or :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s (:ref:`collide_with_bodies<class_RayCast2D_property_collide_with_bodies>`), or by configuring physics layers. @@ -66,35 +66,35 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception<class_RayCast2D_method_add_exception>` **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception_rid<class_RayCast2D_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_exceptions<class_RayCast2D_method_clear_exceptions>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_raycast_update<class_RayCast2D_method_force_raycast_update>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_RayCast2D_method_get_collider>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_RayCast2D_method_get_collider_rid>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_RayCast2D_method_get_collider_shape>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_RayCast2D_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_RayCast2D_method_get_collision_normal>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_RayCast2D_method_get_collision_point>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_colliding<class_RayCast2D_method_is_colliding>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception<class_RayCast2D_method_remove_exception>` **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception_rid<class_RayCast2D_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_RayCast2D_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception<class_RayCast2D_method_add_exception>`\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception_rid<class_RayCast2D_method_add_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_exceptions<class_RayCast2D_method_clear_exceptions>`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_raycast_update<class_RayCast2D_method_force_raycast_update>`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_RayCast2D_method_get_collider>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_RayCast2D_method_get_collider_rid>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_RayCast2D_method_get_collider_shape>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_RayCast2D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_RayCast2D_method_get_collision_normal>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_RayCast2D_method_get_collision_point>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_colliding<class_RayCast2D_method_is_colliding>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception<class_RayCast2D_method_remove_exception>`\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception_rid<class_RayCast2D_method_remove_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_RayCast2D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -109,14 +109,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_RayCast2D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) -If ``true``, collision with :ref:`Area2D<class_Area2D>`\ s will be reported. +If ``true``, collisions with :ref:`Area2D<class_Area2D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -126,14 +126,14 @@ If ``true``, collision with :ref:`Area2D<class_Area2D>`\ s will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_RayCast2D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) -If ``true``, collision with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be reported. +If ``true``, collisions with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -143,12 +143,12 @@ If ``true``, collision with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_RayCast2D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -160,12 +160,12 @@ The ray's collision mask. Only objects in at least one collision layer enabled i .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_RayCast2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) If ``true``, collisions will be reported. @@ -177,12 +177,12 @@ If ``true``, collisions will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclude_parent** = ``true`` +:ref:`bool<class_bool>` **exclude_parent** = ``true`` :ref:`🔗<class_RayCast2D_property_exclude_parent>` .. rst-class:: classref-property-setget -- void **set_exclude_parent_body** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_parent_body** **(** **)** +- |void| **set_exclude_parent_body**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_parent_body**\ (\ ) If ``true``, the parent node will be excluded from collision detection. @@ -194,12 +194,12 @@ If ``true``, the parent node will be excluded from collision detection. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_from_inside** = ``false`` +:ref:`bool<class_bool>` **hit_from_inside** = ``false`` :ref:`🔗<class_RayCast2D_property_hit_from_inside>` .. rst-class:: classref-property-setget -- void **set_hit_from_inside** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_from_inside_enabled** **(** **)** +- |void| **set_hit_from_inside**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_from_inside_enabled**\ (\ ) If ``true``, the ray will detect a hit when starting inside shapes. In this case the collision normal will be ``Vector2(0, 0)``. Does not affect concave polygon shapes. @@ -211,12 +211,12 @@ If ``true``, the ray will detect a hit when starting inside shapes. In this case .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 50)`` +:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 50)`` :ref:`🔗<class_RayCast2D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_target_position**\ (\ ) The ray's destination point, relative to the RayCast's ``position``. @@ -233,7 +233,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_exception** **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** +|void| **add_exception**\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) :ref:`🔗<class_RayCast2D_method_add_exception>` Adds a collision exception so the ray does not report collisions with the specified :ref:`CollisionObject2D<class_CollisionObject2D>` node. @@ -245,7 +245,7 @@ Adds a collision exception so the ray does not report collisions with the specif .. rst-class:: classref-method -void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **add_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RayCast2D_method_add_exception_rid>` Adds a collision exception so the ray does not report collisions with the specified :ref:`RID<class_RID>`. @@ -257,7 +257,7 @@ Adds a collision exception so the ray does not report collisions with the specif .. rst-class:: classref-method -void **clear_exceptions** **(** **)** +|void| **clear_exceptions**\ (\ ) :ref:`🔗<class_RayCast2D_method_clear_exceptions>` Removes all collision exceptions for this ray. @@ -269,9 +269,9 @@ Removes all collision exceptions for this ray. .. rst-class:: classref-method -void **force_raycast_update** **(** **)** +|void| **force_raycast_update**\ (\ ) :ref:`🔗<class_RayCast2D_method_force_raycast_update>` -Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. +Updates the collision information for the ray immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the ray or its parent has changed state. \ **Note:** :ref:`enabled<class_RayCast2D_property_enabled>` does not need to be ``true`` for this to work. @@ -283,7 +283,7 @@ Updates the collision information for the ray. Use this method to update the col .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collider>` Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``false``). @@ -295,7 +295,7 @@ Returns the first object that the ray intersects, or ``null`` if no object is in .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collider_rid>` Returns the :ref:`RID<class_RID>` of the first object that the ray intersects, or an empty :ref:`RID<class_RID>` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``false``). @@ -307,10 +307,31 @@ Returns the :ref:`RID<class_RID>` of the first object that the ray intersects, o .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collider_shape>` Returns the shape ID of the first object that the ray intersects, or ``0`` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``false``). +To get the intersected shape node, for a :ref:`CollisionObject2D<class_CollisionObject2D>` target, use: + + +.. tabs:: + + .. code-tab:: gdscript + + var target = get_collider() # A CollisionObject2D. + var shape_id = get_collider_shape() # The shape index in the collider. + var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. + var shape = target.shape_owner_get_owner(owner_id) + + .. code-tab:: csharp + + var target = (CollisionObject2D)GetCollider(); // A CollisionObject2D. + var shapeId = GetColliderShape(); // The shape index in the collider. + var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. + var shape = target.ShapeOwnerGetOwner(ownerId); + + + .. rst-class:: classref-item-separator ---- @@ -319,7 +340,7 @@ Returns the shape ID of the first object that the ray intersects, or ``0`` if no .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_RayCast2D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -331,10 +352,12 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Ray .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_normal** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_normal**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collision_normal>` Returns the normal of the intersecting object's shape at the collision point, or ``Vector2(0, 0)`` if the ray starts inside the shape and :ref:`hit_from_inside<class_RayCast2D_property_hit_from_inside>` is ``true``. +\ **Note:** Check that :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date. + .. rst-class:: classref-item-separator ---- @@ -343,11 +366,11 @@ Returns the normal of the intersecting object's shape at the collision point, or .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_point** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_point**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_get_collision_point>` -Returns the collision point at which the ray intersects the closest object. +Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside<class_RayCast2D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. -\ **Note:** This point is in the **global** coordinate system. +\ **Note:** Check that :ref:`is_colliding<class_RayCast2D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. .. rst-class:: classref-item-separator @@ -357,7 +380,7 @@ Returns the collision point at which the ray intersects the closest object. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_colliding** **(** **)** |const| +:ref:`bool<class_bool>` **is_colliding**\ (\ ) |const| :ref:`🔗<class_RayCast2D_method_is_colliding>` Returns whether any object is intersecting with the ray's vector (considering the vector length). @@ -369,7 +392,7 @@ Returns whether any object is intersecting with the ray's vector (considering th .. rst-class:: classref-method -void **remove_exception** **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** +|void| **remove_exception**\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) :ref:`🔗<class_RayCast2D_method_remove_exception>` Removes a collision exception so the ray does report collisions with the specified :ref:`CollisionObject2D<class_CollisionObject2D>` node. @@ -381,7 +404,7 @@ Removes a collision exception so the ray does report collisions with the specifi .. rst-class:: classref-method -void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **remove_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RayCast2D_method_remove_exception_rid>` Removes a collision exception so the ray does report collisions with the specified :ref:`RID<class_RID>`. @@ -393,7 +416,7 @@ Removes a collision exception so the ray does report collisions with the specifi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RayCast2D_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_RayCast2D_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -404,3 +427,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_raycast3d.rst b/classes/class_raycast3d.rst index 008b91e94e2..4ce605303f0 100644 --- a/classes/class_raycast3d.rst +++ b/classes/class_raycast3d.rst @@ -19,7 +19,7 @@ A ray in 3D space, used to find the first :ref:`CollisionObject3D<class_Collisio Description ----------- -A raycast represents a ray from its origin to its :ref:`target_position<class_RayCast3D_property_target_position>` that finds the closest :ref:`CollisionObject3D<class_CollisionObject3D>` along its path, if it intersects any. This is useful for a lot of things, such as +A raycast represents a ray from its origin to its :ref:`target_position<class_RayCast3D_property_target_position>` that finds the closest :ref:`CollisionObject3D<class_CollisionObject3D>` along its path, if it intersects any. \ **RayCast3D** can ignore some objects by adding them to an exception list, by making its detection reporting ignore :ref:`Area3D<class_Area3D>`\ s (:ref:`collide_with_areas<class_RayCast3D_property_collide_with_areas>`) or :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s (:ref:`collide_with_bodies<class_RayCast3D_property_collide_with_bodies>`), or by configuring physics layers. @@ -34,7 +34,7 @@ Tutorials - :doc:`Ray-casting <../tutorials/physics/ray-casting>` -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -74,35 +74,37 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception<class_RayCast3D_method_add_exception>` **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception_rid<class_RayCast3D_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_exceptions<class_RayCast3D_method_clear_exceptions>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_raycast_update<class_RayCast3D_method_force_raycast_update>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_RayCast3D_method_get_collider>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_RayCast3D_method_get_collider_rid>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_RayCast3D_method_get_collider_shape>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_RayCast3D_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_RayCast3D_method_get_collision_normal>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_RayCast3D_method_get_collision_point>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_colliding<class_RayCast3D_method_is_colliding>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception<class_RayCast3D_method_remove_exception>` **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception_rid<class_RayCast3D_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_RayCast3D_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception<class_RayCast3D_method_add_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception_rid<class_RayCast3D_method_add_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_exceptions<class_RayCast3D_method_clear_exceptions>`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_raycast_update<class_RayCast3D_method_force_raycast_update>`\ (\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_RayCast3D_method_get_collider>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_RayCast3D_method_get_collider_rid>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_RayCast3D_method_get_collider_shape>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_face_index<class_RayCast3D_method_get_collision_face_index>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_RayCast3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_RayCast3D_method_get_collision_normal>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_RayCast3D_method_get_collision_point>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_colliding<class_RayCast3D_method_is_colliding>`\ (\ ) |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception<class_RayCast3D_method_remove_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception_rid<class_RayCast3D_method_remove_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_RayCast3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -117,14 +119,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_RayCast3D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) -If ``true``, collision with :ref:`Area3D<class_Area3D>`\ s will be reported. +If ``true``, collisions with :ref:`Area3D<class_Area3D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -134,14 +136,14 @@ If ``true``, collision with :ref:`Area3D<class_Area3D>`\ s will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_RayCast3D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) -If ``true``, collision with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be reported. +If ``true``, collisions with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -151,12 +153,12 @@ If ``true``, collision with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_RayCast3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -168,12 +170,12 @@ The ray's collision mask. Only objects in at least one collision layer enabled i .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_RayCast3D_property_debug_shape_custom_color>` .. rst-class:: classref-property-setget -- void **set_debug_shape_custom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_debug_shape_custom_color** **(** **)** +- |void| **set_debug_shape_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_debug_shape_custom_color**\ (\ ) The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the **RayCast3D** is colliding with something. @@ -187,12 +189,12 @@ If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectS .. rst-class:: classref-property -:ref:`int<class_int>` **debug_shape_thickness** = ``2`` +:ref:`int<class_int>` **debug_shape_thickness** = ``2`` :ref:`🔗<class_RayCast3D_property_debug_shape_thickness>` .. rst-class:: classref-property-setget -- void **set_debug_shape_thickness** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_debug_shape_thickness** **(** **)** +- |void| **set_debug_shape_thickness**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_debug_shape_thickness**\ (\ ) If set to ``1``, a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the **RayCast3D**. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for the debug shape to be visible at run-time. @@ -204,12 +206,12 @@ If set to ``1``, a line is used as the debug shape. Otherwise, a truncated pyram .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_RayCast3D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) If ``true``, collisions will be reported. @@ -221,12 +223,12 @@ If ``true``, collisions will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclude_parent** = ``true`` +:ref:`bool<class_bool>` **exclude_parent** = ``true`` :ref:`🔗<class_RayCast3D_property_exclude_parent>` .. rst-class:: classref-property-setget -- void **set_exclude_parent_body** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_parent_body** **(** **)** +- |void| **set_exclude_parent_body**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_parent_body**\ (\ ) If ``true``, collisions will be ignored for this RayCast3D's immediate parent. @@ -238,12 +240,12 @@ If ``true``, collisions will be ignored for this RayCast3D's immediate parent. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_back_faces** = ``true`` +:ref:`bool<class_bool>` **hit_back_faces** = ``true`` :ref:`🔗<class_RayCast3D_property_hit_back_faces>` .. rst-class:: classref-property-setget -- void **set_hit_back_faces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_back_faces_enabled** **(** **)** +- |void| **set_hit_back_faces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_back_faces_enabled**\ (\ ) If ``true``, the ray will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. @@ -255,12 +257,12 @@ If ``true``, the ray will hit back faces with concave polygon shapes with back f .. rst-class:: classref-property -:ref:`bool<class_bool>` **hit_from_inside** = ``false`` +:ref:`bool<class_bool>` **hit_from_inside** = ``false`` :ref:`🔗<class_RayCast3D_property_hit_from_inside>` .. rst-class:: classref-property-setget -- void **set_hit_from_inside** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hit_from_inside_enabled** **(** **)** +- |void| **set_hit_from_inside**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hit_from_inside_enabled**\ (\ ) If ``true``, the ray will detect a hit when starting inside shapes. In this case the collision normal will be ``Vector3(0, 0, 0)``. Does not affect shapes with no volume like concave polygon or heightmap. @@ -272,12 +274,12 @@ If ``true``, the ray will detect a hit when starting inside shapes. In this case .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, -1, 0)`` +:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_RayCast3D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_target_position**\ (\ ) The ray's destination point, relative to the RayCast's ``position``. @@ -294,7 +296,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_exception** **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** +|void| **add_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_RayCast3D_method_add_exception>` Adds a collision exception so the ray does not report collisions with the specified :ref:`CollisionObject3D<class_CollisionObject3D>` node. @@ -306,7 +308,7 @@ Adds a collision exception so the ray does not report collisions with the specif .. rst-class:: classref-method -void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **add_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RayCast3D_method_add_exception_rid>` Adds a collision exception so the ray does not report collisions with the specified :ref:`RID<class_RID>`. @@ -318,7 +320,7 @@ Adds a collision exception so the ray does not report collisions with the specif .. rst-class:: classref-method -void **clear_exceptions** **(** **)** +|void| **clear_exceptions**\ (\ ) :ref:`🔗<class_RayCast3D_method_clear_exceptions>` Removes all collision exceptions for this ray. @@ -330,9 +332,9 @@ Removes all collision exceptions for this ray. .. rst-class:: classref-method -void **force_raycast_update** **(** **)** +|void| **force_raycast_update**\ (\ ) :ref:`🔗<class_RayCast3D_method_force_raycast_update>` -Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the ray or its parent has changed state. +Updates the collision information for the ray immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the ray or its parent has changed state. \ **Note:** :ref:`enabled<class_RayCast3D_property_enabled>` does not need to be ``true`` for this to work. @@ -344,7 +346,7 @@ Updates the collision information for the ray. Use this method to update the col .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collider>` Returns the first object that the ray intersects, or ``null`` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``false``). @@ -356,7 +358,7 @@ Returns the first object that the ray intersects, or ``null`` if no object is in .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collider_rid>` Returns the :ref:`RID<class_RID>` of the first object that the ray intersects, or an empty :ref:`RID<class_RID>` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``false``). @@ -368,10 +370,43 @@ Returns the :ref:`RID<class_RID>` of the first object that the ray intersects, o .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collider_shape>` Returns the shape ID of the first object that the ray intersects, or ``0`` if no object is intersecting the ray (i.e. :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``false``). +To get the intersected shape node, for a :ref:`CollisionObject3D<class_CollisionObject3D>` target, use: + + +.. tabs:: + + .. code-tab:: gdscript + + var target = get_collider() # A CollisionObject3D. + var shape_id = get_collider_shape() # The shape index in the collider. + var owner_id = target.shape_find_owner(shape_id) # The owner ID in the collider. + var shape = target.shape_owner_get_owner(owner_id) + + .. code-tab:: csharp + + var target = (CollisionObject3D)GetCollider(); // A CollisionObject3D. + var shapeId = GetColliderShape(); // The shape index in the collider. + var ownerId = target.ShapeFindOwner(shapeId); // The owner ID in the collider. + var shape = target.ShapeOwnerGetOwner(ownerId); + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_RayCast3D_method_get_collision_face_index: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_collision_face_index**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collision_face_index>` + +Returns the collision object's face index at the collision point, or ``-1`` if the shape intersecting the ray is not a :ref:`ConcavePolygonShape3D<class_ConcavePolygonShape3D>`. + .. rst-class:: classref-item-separator ---- @@ -380,7 +415,7 @@ Returns the shape ID of the first object that the ray intersects, or ``0`` if no .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_RayCast3D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -392,10 +427,12 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Ray .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_normal** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_normal**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collision_normal>` Returns the normal of the intersecting object's shape at the collision point, or ``Vector3(0, 0, 0)`` if the ray starts inside the shape and :ref:`hit_from_inside<class_RayCast3D_property_hit_from_inside>` is ``true``. +\ **Note:** Check that :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned normal is valid and up-to-date. + .. rst-class:: classref-item-separator ---- @@ -404,11 +441,11 @@ Returns the normal of the intersecting object's shape at the collision point, or .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_point** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_get_collision_point>` -Returns the collision point at which the ray intersects the closest object. +Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If :ref:`hit_from_inside<class_RayCast3D_property_hit_from_inside>` is ``true`` and the ray starts inside of a collision shape, this function will return the origin point of the ray. -\ **Note:** This point is in the **global** coordinate system. +\ **Note:** Check that :ref:`is_colliding<class_RayCast3D_method_is_colliding>` returns ``true`` before calling this method to ensure the returned point is valid and up-to-date. .. rst-class:: classref-item-separator @@ -418,7 +455,7 @@ Returns the collision point at which the ray intersects the closest object. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_colliding** **(** **)** |const| +:ref:`bool<class_bool>` **is_colliding**\ (\ ) |const| :ref:`🔗<class_RayCast3D_method_is_colliding>` Returns whether any object is intersecting with the ray's vector (considering the vector length). @@ -430,7 +467,7 @@ Returns whether any object is intersecting with the ray's vector (considering th .. rst-class:: classref-method -void **remove_exception** **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** +|void| **remove_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_RayCast3D_method_remove_exception>` Removes a collision exception so the ray does report collisions with the specified :ref:`CollisionObject3D<class_CollisionObject3D>` node. @@ -442,7 +479,7 @@ Removes a collision exception so the ray does report collisions with the specifi .. rst-class:: classref-method -void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **remove_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RayCast3D_method_remove_exception_rid>` Removes a collision exception so the ray does report collisions with the specified :ref:`RID<class_RID>`. @@ -454,7 +491,7 @@ Removes a collision exception so the ray does report collisions with the specifi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RayCast3D_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_RayCast3D_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -465,3 +502,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdattachmentformat.rst b/classes/class_rdattachmentformat.rst index 6b734ce01fc..60636ddeb11 100644 --- a/classes/class_rdattachmentformat.rst +++ b/classes/class_rdattachmentformat.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``36`` +:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``36`` :ref:`🔗<class_RDAttachmentFormat_property_format>` .. rst-class:: classref-property-setget -- void **set_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` value **)** -- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format** **(** **)** +- |void| **set_format**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) +- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format**\ (\ ) The attachment's data format. @@ -67,12 +67,12 @@ The attachment's data format. .. rst-class:: classref-property -:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0`` +:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0`` :ref:`🔗<class_RDAttachmentFormat_property_samples>` .. rst-class:: classref-property-setget -- void **set_samples** **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` value **)** -- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples** **(** **)** +- |void| **set_samples**\ (\ value\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`\ ) +- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples**\ (\ ) The number of samples used when sampling the attachment. @@ -84,12 +84,12 @@ The number of samples used when sampling the attachment. .. rst-class:: classref-property -:ref:`int<class_int>` **usage_flags** = ``0`` +:ref:`int<class_int>` **usage_flags** = ``0`` :ref:`🔗<class_RDAttachmentFormat_property_usage_flags>` .. rst-class:: classref-property-setget -- void **set_usage_flags** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_usage_flags** **(** **)** +- |void| **set_usage_flags**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_usage_flags**\ (\ ) The attachment's usage flags, which determine what can be done with it. @@ -100,3 +100,4 @@ The attachment's usage flags, which determine what can be done with it. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdframebufferpass.rst b/classes/class_rdframebufferpass.rst index 0ee84fb3747..44b9d828ae6 100644 --- a/classes/class_rdframebufferpass.rst +++ b/classes/class_rdframebufferpass.rst @@ -58,7 +58,7 @@ Constants .. rst-class:: classref-constant -**ATTACHMENT_UNUSED** = ``-1`` +**ATTACHMENT_UNUSED** = ``-1`` :ref:`🔗<class_RDFramebufferPass_constant_ATTACHMENT_UNUSED>` Attachment is unused. @@ -75,15 +75,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **color_attachments** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **color_attachments** = ``PackedInt32Array()`` :ref:`🔗<class_RDFramebufferPass_property_color_attachments>` .. rst-class:: classref-property-setget -- void **set_color_attachments** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_color_attachments** **(** **)** +- |void| **set_color_attachments**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_color_attachments**\ (\ ) Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -92,12 +94,12 @@ Color attachments in order starting from 0. If this attachment is not used by th .. rst-class:: classref-property -:ref:`int<class_int>` **depth_attachment** = ``-1`` +:ref:`int<class_int>` **depth_attachment** = ``-1`` :ref:`🔗<class_RDFramebufferPass_property_depth_attachment>` .. rst-class:: classref-property-setget -- void **set_depth_attachment** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_depth_attachment** **(** **)** +- |void| **set_depth_attachment**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_depth_attachment**\ (\ ) Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass. @@ -109,15 +111,17 @@ Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is require .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **input_attachments** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **input_attachments** = ``PackedInt32Array()`` :ref:`🔗<class_RDFramebufferPass_property_input_attachments>` .. rst-class:: classref-property-setget -- void **set_input_attachments** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_input_attachments** **(** **)** +- |void| **set_input_attachments**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_input_attachments**\ (\ ) Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the :ref:`RDUniform<class_RDUniform>` for the uniform set. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -126,15 +130,17 @@ Used for multipass framebuffers (more than one render pass). Converts an attachm .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **preserve_attachments** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **preserve_attachments** = ``PackedInt32Array()`` :ref:`🔗<class_RDFramebufferPass_property_preserve_attachments>` .. rst-class:: classref-property-setget -- void **set_preserve_attachments** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_preserve_attachments** **(** **)** +- |void| **set_preserve_attachments**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_preserve_attachments**\ (\ ) Attachments to preserve in this pass (otherwise they are erased). +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -143,15 +149,17 @@ Attachments to preserve in this pass (otherwise they are erased). .. rst-class:: classref-property -:ref:`PackedInt32Array<class_PackedInt32Array>` **resolve_attachments** = ``PackedInt32Array()`` +:ref:`PackedInt32Array<class_PackedInt32Array>` **resolve_attachments** = ``PackedInt32Array()`` :ref:`🔗<class_RDFramebufferPass_property_resolve_attachments>` .. rst-class:: classref-property-setget -- void **set_resolve_attachments** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` value **)** -- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_resolve_attachments** **(** **)** +- |void| **set_resolve_attachments**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_resolve_attachments**\ (\ ) If the color attachments are multisampled, non-multisampled resolve attachments can be provided. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -159,3 +167,4 @@ If the color attachments are multisampled, non-multisampled resolve attachments .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinecolorblendstate.rst b/classes/class_rdpipelinecolorblendstate.rst index eba406bedbc..681b7128dff 100644 --- a/classes/class_rdpipelinecolorblendstate.rst +++ b/classes/class_rdpipelinecolorblendstate.rst @@ -29,15 +29,15 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ - | :ref:`RDPipelineColorBlendStateAttachment[]<class_RDPipelineColorBlendStateAttachment>` | :ref:`attachments<class_RDPipelineColorBlendState_property_attachments>` | ``[]`` | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color<class_Color>` | :ref:`blend_constant<class_RDPipelineColorBlendState_property_blend_constant>` | ``Color(0, 0, 0, 1)`` | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool<class_bool>` | :ref:`enable_logic_op<class_RDPipelineColorBlendState_property_enable_logic_op>` | ``false`` | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ - | :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` | :ref:`logic_op<class_RDPipelineColorBlendState_property_logic_op>` | ``0`` | - +-----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + +--------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`Array<class_Array>`\[:ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`\] | :ref:`attachments<class_RDPipelineColorBlendState_property_attachments>` | ``[]`` | + +--------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color<class_Color>` | :ref:`blend_constant<class_RDPipelineColorBlendState_property_blend_constant>` | ``Color(0, 0, 0, 1)`` | + +--------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`enable_logic_op<class_RDPipelineColorBlendState_property_enable_logic_op>` | ``false`` | + +--------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ + | :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` | :ref:`logic_op<class_RDPipelineColorBlendState_property_logic_op>` | ``0`` | + +--------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-section-separator @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`RDPipelineColorBlendStateAttachment[]<class_RDPipelineColorBlendStateAttachment>` **attachments** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`\] **attachments** = ``[]`` :ref:`🔗<class_RDPipelineColorBlendState_property_attachments>` .. rst-class:: classref-property-setget -- void **set_attachments** **(** :ref:`RDPipelineColorBlendStateAttachment[]<class_RDPipelineColorBlendStateAttachment>` value **)** -- :ref:`RDPipelineColorBlendStateAttachment[]<class_RDPipelineColorBlendStateAttachment>` **get_attachments** **(** **)** +- |void| **set_attachments**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`\] **get_attachments**\ (\ ) The attachments that are blended together. @@ -69,12 +69,12 @@ The attachments that are blended together. .. rst-class:: classref-property -:ref:`Color<class_Color>` **blend_constant** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **blend_constant** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_RDPipelineColorBlendState_property_blend_constant>` .. rst-class:: classref-property-setget -- void **set_blend_constant** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_blend_constant** **(** **)** +- |void| **set_blend_constant**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_blend_constant**\ (\ ) The constant color to blend with. See also :ref:`RenderingDevice.draw_list_set_blend_constants<class_RenderingDevice_method_draw_list_set_blend_constants>`. @@ -86,12 +86,12 @@ The constant color to blend with. See also :ref:`RenderingDevice.draw_list_set_b .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_logic_op** = ``false`` +:ref:`bool<class_bool>` **enable_logic_op** = ``false`` :ref:`🔗<class_RDPipelineColorBlendState_property_enable_logic_op>` .. rst-class:: classref-property-setget -- void **set_enable_logic_op** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_logic_op** **(** **)** +- |void| **set_enable_logic_op**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_logic_op**\ (\ ) If ``true``, performs the logic operation defined in :ref:`logic_op<class_RDPipelineColorBlendState_property_logic_op>`. @@ -103,12 +103,12 @@ If ``true``, performs the logic operation defined in :ref:`logic_op<class_RDPipe .. rst-class:: classref-property -:ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` **logic_op** = ``0`` +:ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` **logic_op** = ``0`` :ref:`🔗<class_RDPipelineColorBlendState_property_logic_op>` .. rst-class:: classref-property-setget -- void **set_logic_op** **(** :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` value **)** -- :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` **get_logic_op** **(** **)** +- |void| **set_logic_op**\ (\ value\: :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>`\ ) +- :ref:`LogicOperation<enum_RenderingDevice_LogicOperation>` **get_logic_op**\ (\ ) The logic operation to perform for blending. Only effective if :ref:`enable_logic_op<class_RDPipelineColorBlendState_property_enable_logic_op>` is ``true``. @@ -119,3 +119,4 @@ The logic operation to perform for blending. Only effective if :ref:`enable_logi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinecolorblendstateattachment.rst b/classes/class_rdpipelinecolorblendstateattachment.rst index 7bcda5d0d44..43bde5d4272 100644 --- a/classes/class_rdpipelinecolorblendstateattachment.rst +++ b/classes/class_rdpipelinecolorblendstateattachment.rst @@ -128,9 +128,9 @@ Methods .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------+ - | void | :ref:`set_as_mix<class_RDPipelineColorBlendStateAttachment_method_set_as_mix>` **(** **)** | - +------+--------------------------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------------------------+ + | |void| | :ref:`set_as_mix<class_RDPipelineColorBlendStateAttachment_method_set_as_mix>`\ (\ ) | + +--------+--------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -145,12 +145,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **alpha_blend_op** = ``0`` +:ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **alpha_blend_op** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_alpha_blend_op>` .. rst-class:: classref-property-setget -- void **set_alpha_blend_op** **(** :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` value **)** -- :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **get_alpha_blend_op** **(** **)** +- |void| **set_alpha_blend_op**\ (\ value\: :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>`\ ) +- :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **get_alpha_blend_op**\ (\ ) The blend mode to use for the alpha channel. @@ -162,12 +162,12 @@ The blend mode to use for the alpha channel. .. rst-class:: classref-property -:ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **color_blend_op** = ``0`` +:ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **color_blend_op** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_color_blend_op>` .. rst-class:: classref-property-setget -- void **set_color_blend_op** **(** :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` value **)** -- :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **get_color_blend_op** **(** **)** +- |void| **set_color_blend_op**\ (\ value\: :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>`\ ) +- :ref:`BlendOperation<enum_RenderingDevice_BlendOperation>` **get_color_blend_op**\ (\ ) The blend mode to use for the red/green/blue color channels. @@ -179,12 +179,12 @@ The blend mode to use for the red/green/blue color channels. .. rst-class:: classref-property -:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **dst_alpha_blend_factor** = ``0`` +:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **dst_alpha_blend_factor** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_dst_alpha_blend_factor>` .. rst-class:: classref-property-setget -- void **set_dst_alpha_blend_factor** **(** :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` value **)** -- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_dst_alpha_blend_factor** **(** **)** +- |void| **set_dst_alpha_blend_factor**\ (\ value\: :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>`\ ) +- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_dst_alpha_blend_factor**\ (\ ) Controls how the blend factor for the alpha channel is determined based on the destination's fragments. @@ -196,12 +196,12 @@ Controls how the blend factor for the alpha channel is determined based on the d .. rst-class:: classref-property -:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **dst_color_blend_factor** = ``0`` +:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **dst_color_blend_factor** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_dst_color_blend_factor>` .. rst-class:: classref-property-setget -- void **set_dst_color_blend_factor** **(** :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` value **)** -- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_dst_color_blend_factor** **(** **)** +- |void| **set_dst_color_blend_factor**\ (\ value\: :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>`\ ) +- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_dst_color_blend_factor**\ (\ ) Controls how the blend factor for the color channels is determined based on the destination's fragments. @@ -213,12 +213,12 @@ Controls how the blend factor for the color channels is determined based on the .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_blend** = ``false`` +:ref:`bool<class_bool>` **enable_blend** = ``false`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_enable_blend>` .. rst-class:: classref-property-setget -- void **set_enable_blend** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_blend** **(** **)** +- |void| **set_enable_blend**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_blend**\ (\ ) If ``true``, performs blending between the source and destination according to the factors defined in :ref:`src_color_blend_factor<class_RDPipelineColorBlendStateAttachment_property_src_color_blend_factor>`, :ref:`dst_color_blend_factor<class_RDPipelineColorBlendStateAttachment_property_dst_color_blend_factor>`, :ref:`src_alpha_blend_factor<class_RDPipelineColorBlendStateAttachment_property_src_alpha_blend_factor>` and :ref:`dst_alpha_blend_factor<class_RDPipelineColorBlendStateAttachment_property_dst_alpha_blend_factor>`. The blend modes :ref:`color_blend_op<class_RDPipelineColorBlendStateAttachment_property_color_blend_op>` and :ref:`alpha_blend_op<class_RDPipelineColorBlendStateAttachment_property_alpha_blend_op>` are also taken into account, with :ref:`write_r<class_RDPipelineColorBlendStateAttachment_property_write_r>`, :ref:`write_g<class_RDPipelineColorBlendStateAttachment_property_write_g>`, :ref:`write_b<class_RDPipelineColorBlendStateAttachment_property_write_b>` and :ref:`write_a<class_RDPipelineColorBlendStateAttachment_property_write_a>` controlling the output. @@ -230,12 +230,12 @@ If ``true``, performs blending between the source and destination according to t .. rst-class:: classref-property -:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **src_alpha_blend_factor** = ``0`` +:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **src_alpha_blend_factor** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_src_alpha_blend_factor>` .. rst-class:: classref-property-setget -- void **set_src_alpha_blend_factor** **(** :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` value **)** -- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_src_alpha_blend_factor** **(** **)** +- |void| **set_src_alpha_blend_factor**\ (\ value\: :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>`\ ) +- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_src_alpha_blend_factor**\ (\ ) Controls how the blend factor for the alpha channel is determined based on the source's fragments. @@ -247,12 +247,12 @@ Controls how the blend factor for the alpha channel is determined based on the s .. rst-class:: classref-property -:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **src_color_blend_factor** = ``0`` +:ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **src_color_blend_factor** = ``0`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_src_color_blend_factor>` .. rst-class:: classref-property-setget -- void **set_src_color_blend_factor** **(** :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` value **)** -- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_src_color_blend_factor** **(** **)** +- |void| **set_src_color_blend_factor**\ (\ value\: :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>`\ ) +- :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` **get_src_color_blend_factor**\ (\ ) Controls how the blend factor for the color channels is determined based on the source's fragments. @@ -264,12 +264,12 @@ Controls how the blend factor for the color channels is determined based on the .. rst-class:: classref-property -:ref:`bool<class_bool>` **write_a** = ``true`` +:ref:`bool<class_bool>` **write_a** = ``true`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_write_a>` .. rst-class:: classref-property-setget -- void **set_write_a** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_write_a** **(** **)** +- |void| **set_write_a**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_write_a**\ (\ ) If ``true``, writes the new alpha channel to the final result. @@ -281,12 +281,12 @@ If ``true``, writes the new alpha channel to the final result. .. rst-class:: classref-property -:ref:`bool<class_bool>` **write_b** = ``true`` +:ref:`bool<class_bool>` **write_b** = ``true`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_write_b>` .. rst-class:: classref-property-setget -- void **set_write_b** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_write_b** **(** **)** +- |void| **set_write_b**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_write_b**\ (\ ) If ``true``, writes the new blue color channel to the final result. @@ -298,12 +298,12 @@ If ``true``, writes the new blue color channel to the final result. .. rst-class:: classref-property -:ref:`bool<class_bool>` **write_g** = ``true`` +:ref:`bool<class_bool>` **write_g** = ``true`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_write_g>` .. rst-class:: classref-property-setget -- void **set_write_g** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_write_g** **(** **)** +- |void| **set_write_g**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_write_g**\ (\ ) If ``true``, writes the new green color channel to the final result. @@ -315,12 +315,12 @@ If ``true``, writes the new green color channel to the final result. .. rst-class:: classref-property -:ref:`bool<class_bool>` **write_r** = ``true`` +:ref:`bool<class_bool>` **write_r** = ``true`` :ref:`🔗<class_RDPipelineColorBlendStateAttachment_property_write_r>` .. rst-class:: classref-property-setget -- void **set_write_r** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_write_r** **(** **)** +- |void| **set_write_r**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_write_r**\ (\ ) If ``true``, writes the new red color channel to the final result. @@ -337,7 +337,7 @@ Method Descriptions .. rst-class:: classref-method -void **set_as_mix** **(** **)** +|void| **set_as_mix**\ (\ ) :ref:`🔗<class_RDPipelineColorBlendStateAttachment_method_set_as_mix>` Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets :ref:`enable_blend<class_RDPipelineColorBlendStateAttachment_property_enable_blend>` to ``true``, :ref:`src_color_blend_factor<class_RDPipelineColorBlendStateAttachment_property_src_color_blend_factor>` to :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA<class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA>`, :ref:`dst_color_blend_factor<class_RDPipelineColorBlendStateAttachment_property_dst_color_blend_factor>` to :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA<class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA>`, :ref:`src_alpha_blend_factor<class_RDPipelineColorBlendStateAttachment_property_src_alpha_blend_factor>` to :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA<class_RenderingDevice_constant_BLEND_FACTOR_SRC_ALPHA>` and :ref:`dst_alpha_blend_factor<class_RDPipelineColorBlendStateAttachment_property_dst_alpha_blend_factor>` to :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA<class_RenderingDevice_constant_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA>`. @@ -348,3 +348,4 @@ Convenience method to perform standard mix blending with straight (non-premultip .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinedepthstencilstate.rst b/classes/class_rdpipelinedepthstencilstate.rst index 1a4aa01071f..cdbac617152 100644 --- a/classes/class_rdpipelinedepthstencilstate.rst +++ b/classes/class_rdpipelinedepthstencilstate.rst @@ -86,16 +86,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **back_op_compare** = ``7`` +:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **back_op_compare** = ``7`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_compare>` .. rst-class:: classref-property-setget -- void **set_back_op_compare** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)** -- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_back_op_compare** **(** **)** +- |void| **set_back_op_compare**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ ) +- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_back_op_compare**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The method used for comparing the previous back stencil value and :ref:`back_op_reference<class_RDPipelineDepthStencilState_property_back_op_reference>`. .. rst-class:: classref-item-separator @@ -105,16 +103,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **back_op_compare_mask** = ``0`` +:ref:`int<class_int>` **back_op_compare_mask** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_compare_mask>` .. rst-class:: classref-property-setget -- void **set_back_op_compare_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_back_op_compare_mask** **(** **)** - -.. container:: contribute +- |void| **set_back_op_compare_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_back_op_compare_mask**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Selects which bits from the back stencil value will be compared. .. rst-class:: classref-item-separator @@ -124,16 +120,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_depth_fail** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_depth_fail** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_depth_fail>` .. rst-class:: classref-property-setget -- void **set_back_op_depth_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_depth_fail** **(** **)** - -.. container:: contribute +- |void| **set_back_op_depth_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_depth_fail**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for back pixels that pass the stencil test but fail the depth test. .. rst-class:: classref-item-separator @@ -143,16 +137,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_fail** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_fail** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_fail>` .. rst-class:: classref-property-setget -- void **set_back_op_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_fail** **(** **)** +- |void| **set_back_op_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_fail**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for back pixels that fail the stencil test .. rst-class:: classref-item-separator @@ -162,16 +154,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_pass** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_pass** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_pass>` .. rst-class:: classref-property-setget -- void **set_back_op_pass** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_pass** **(** **)** - -.. container:: contribute +- |void| **set_back_op_pass**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_pass**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for back pixels that pass the stencil test. .. rst-class:: classref-item-separator @@ -181,16 +171,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **back_op_reference** = ``0`` +:ref:`int<class_int>` **back_op_reference** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_reference>` .. rst-class:: classref-property-setget -- void **set_back_op_reference** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_back_op_reference** **(** **)** +- |void| **set_back_op_reference**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_back_op_reference**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The value the previous back stencil value will be compared to. .. rst-class:: classref-item-separator @@ -200,16 +188,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **back_op_write_mask** = ``0`` +:ref:`int<class_int>` **back_op_write_mask** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_write_mask>` .. rst-class:: classref-property-setget -- void **set_back_op_write_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_back_op_write_mask** **(** **)** - -.. container:: contribute +- |void| **set_back_op_write_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_back_op_write_mask**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Selects which bits from the back stencil value will be changed. .. rst-class:: classref-item-separator @@ -219,16 +205,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **depth_compare_operator** = ``7`` +:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **depth_compare_operator** = ``7`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_compare_operator>` .. rst-class:: classref-property-setget -- void **set_depth_compare_operator** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)** -- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_depth_compare_operator** **(** **)** - -.. container:: contribute +- |void| **set_depth_compare_operator**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ ) +- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_depth_compare_operator**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The method used for comparing the previous and current depth values. .. rst-class:: classref-item-separator @@ -238,16 +222,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **depth_range_max** = ``0.0`` +:ref:`float<class_float>` **depth_range_max** = ``0.0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_range_max>` .. rst-class:: classref-property-setget -- void **set_depth_range_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_range_max** **(** **)** +- |void| **set_depth_range_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_range_max**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The maximum depth that returns true for :ref:`enable_depth_range<class_RDPipelineDepthStencilState_property_enable_depth_range>`. .. rst-class:: classref-item-separator @@ -257,16 +239,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **depth_range_min** = ``0.0`` +:ref:`float<class_float>` **depth_range_min** = ``0.0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_range_min>` .. rst-class:: classref-property-setget -- void **set_depth_range_min** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_range_min** **(** **)** - -.. container:: contribute +- |void| **set_depth_range_min**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_range_min**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The minimum depth that returns true for :ref:`enable_depth_range<class_RDPipelineDepthStencilState_property_enable_depth_range>`. .. rst-class:: classref-item-separator @@ -276,16 +256,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_depth_range** = ``false`` +:ref:`bool<class_bool>` **enable_depth_range** = ``false`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_range>` .. rst-class:: classref-property-setget -- void **set_enable_depth_range** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_depth_range** **(** **)** +- |void| **set_enable_depth_range**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_depth_range**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, each depth value will be tested to see if it is between :ref:`depth_range_min<class_RDPipelineDepthStencilState_property_depth_range_min>` and :ref:`depth_range_max<class_RDPipelineDepthStencilState_property_depth_range_max>`. If it is outside of these values, it is discarded. .. rst-class:: classref-item-separator @@ -295,12 +273,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_depth_test** = ``false`` +:ref:`bool<class_bool>` **enable_depth_test** = ``false`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_test>` .. rst-class:: classref-property-setget -- void **set_enable_depth_test** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_depth_test** **(** **)** +- |void| **set_enable_depth_test**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_depth_test**\ (\ ) If ``true``, enables depth testing which allows objects to be automatically occluded by other objects based on their depth. This also allows objects to be partially occluded by other objects. If ``false``, objects will appear in the order they were drawn (like in Godot's 2D renderer). @@ -312,16 +290,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_depth_write** = ``false`` +:ref:`bool<class_bool>` **enable_depth_write** = ``false`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_write>` .. rst-class:: classref-property-setget -- void **set_enable_depth_write** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_depth_write** **(** **)** - -.. container:: contribute +- |void| **set_enable_depth_write**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_depth_write**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, writes to the depth buffer whenever the depth test returns true. Only works when enable_depth_test is also true. .. rst-class:: classref-item-separator @@ -331,16 +307,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_stencil** = ``false`` +:ref:`bool<class_bool>` **enable_stencil** = ``false`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_stencil>` .. rst-class:: classref-property-setget -- void **set_enable_stencil** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_stencil** **(** **)** - -.. container:: contribute +- |void| **set_enable_stencil**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_stencil**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, enables stencil testing. There are separate stencil buffers for front-facing triangles and back-facing triangles. See properties that begin with "front_op" and properties with "back_op" for each. .. rst-class:: classref-item-separator @@ -350,16 +324,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **front_op_compare** = ``7`` +:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **front_op_compare** = ``7`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_compare>` .. rst-class:: classref-property-setget -- void **set_front_op_compare** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)** -- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_front_op_compare** **(** **)** +- |void| **set_front_op_compare**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ ) +- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_front_op_compare**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The method used for comparing the previous front stencil value and :ref:`front_op_reference<class_RDPipelineDepthStencilState_property_front_op_reference>`. .. rst-class:: classref-item-separator @@ -369,16 +341,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`int<class_int>` **front_op_compare_mask** = ``0`` +:ref:`int<class_int>` **front_op_compare_mask** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_compare_mask>` .. rst-class:: classref-property-setget -- void **set_front_op_compare_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_front_op_compare_mask** **(** **)** - -.. container:: contribute +- |void| **set_front_op_compare_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_front_op_compare_mask**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Selects which bits from the front stencil value will be compared. .. rst-class:: classref-item-separator @@ -388,16 +358,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_depth_fail** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_depth_fail** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_depth_fail>` .. rst-class:: classref-property-setget -- void **set_front_op_depth_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_depth_fail** **(** **)** +- |void| **set_front_op_depth_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_depth_fail**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for front pixels that pass the stencil test but fail the depth test. .. rst-class:: classref-item-separator @@ -407,16 +375,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_fail** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_fail** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_fail>` .. rst-class:: classref-property-setget -- void **set_front_op_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_fail** **(** **)** - -.. container:: contribute +- |void| **set_front_op_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_fail**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for front pixels that fail the stencil test. .. rst-class:: classref-item-separator @@ -426,16 +392,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_pass** = ``1`` +:ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_pass** = ``1`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_pass>` .. rst-class:: classref-property-setget -- void **set_front_op_pass** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)** -- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_pass** **(** **)** - -.. container:: contribute +- |void| **set_front_op_pass**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ ) +- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_pass**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The operation to perform on the stencil buffer for front pixels that pass the stencil test. .. rst-class:: classref-item-separator @@ -445,16 +409,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`int<class_int>` **front_op_reference** = ``0`` +:ref:`int<class_int>` **front_op_reference** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_reference>` .. rst-class:: classref-property-setget -- void **set_front_op_reference** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_front_op_reference** **(** **)** +- |void| **set_front_op_reference**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_front_op_reference**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The value the previous front stencil value will be compared to. .. rst-class:: classref-item-separator @@ -464,16 +426,14 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. rst-class:: classref-property -:ref:`int<class_int>` **front_op_write_mask** = ``0`` +:ref:`int<class_int>` **front_op_write_mask** = ``0`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_write_mask>` .. rst-class:: classref-property-setget -- void **set_front_op_write_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_front_op_write_mask** **(** **)** - -.. container:: contribute +- |void| **set_front_op_write_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_front_op_write_mask**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Selects which bits from the front stencil value will be changed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -482,3 +442,4 @@ If ``true``, enables depth testing which allows objects to be automatically occl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinemultisamplestate.rst b/classes/class_rdpipelinemultisamplestate.rst index 52e33120ec8..6dc1add8512 100644 --- a/classes/class_rdpipelinemultisamplestate.rst +++ b/classes/class_rdpipelinemultisamplestate.rst @@ -40,7 +40,7 @@ Properties +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ | :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` | :ref:`sample_count<class_RDPipelineMultisampleState_property_sample_count>` | ``0`` | +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ - | :ref:`int[]<class_int>` | :ref:`sample_masks<class_RDPipelineMultisampleState_property_sample_masks>` | ``[]`` | + | :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] | :ref:`sample_masks<class_RDPipelineMultisampleState_property_sample_masks>` | ``[]`` | +------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_alpha_to_coverage** = ``false`` +:ref:`bool<class_bool>` **enable_alpha_to_coverage** = ``false`` :ref:`🔗<class_RDPipelineMultisampleState_property_enable_alpha_to_coverage>` .. rst-class:: classref-property-setget -- void **set_enable_alpha_to_coverage** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_alpha_to_coverage** **(** **)** +- |void| **set_enable_alpha_to_coverage**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_alpha_to_coverage**\ (\ ) If ``true``, alpha to coverage is enabled. This generates a temporary coverage value based on the alpha component of the fragment's first color output. This allows alpha transparency to make use of multisample antialiasing. @@ -73,12 +73,12 @@ If ``true``, alpha to coverage is enabled. This generates a temporary coverage v .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_alpha_to_one** = ``false`` +:ref:`bool<class_bool>` **enable_alpha_to_one** = ``false`` :ref:`🔗<class_RDPipelineMultisampleState_property_enable_alpha_to_one>` .. rst-class:: classref-property-setget -- void **set_enable_alpha_to_one** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_alpha_to_one** **(** **)** +- |void| **set_enable_alpha_to_one**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_alpha_to_one**\ (\ ) If ``true``, alpha is forced to either ``0.0`` or ``1.0``. This allows hardening the edges of antialiased alpha transparencies. Only relevant if :ref:`enable_alpha_to_coverage<class_RDPipelineMultisampleState_property_enable_alpha_to_coverage>` is ``true``. @@ -90,12 +90,12 @@ If ``true``, alpha is forced to either ``0.0`` or ``1.0``. This allows hardening .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_sample_shading** = ``false`` +:ref:`bool<class_bool>` **enable_sample_shading** = ``false`` :ref:`🔗<class_RDPipelineMultisampleState_property_enable_sample_shading>` .. rst-class:: classref-property-setget -- void **set_enable_sample_shading** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_sample_shading** **(** **)** +- |void| **set_enable_sample_shading**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_sample_shading**\ (\ ) If ``true``, enables per-sample shading which replaces MSAA by SSAA. This provides higher quality antialiasing that works with transparent (alpha scissor) edges. This has a very high performance cost. See also :ref:`min_sample_shading<class_RDPipelineMultisampleState_property_min_sample_shading>`. See the `per-sample shading Vulkan documentation <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading>`__ for more details. @@ -107,12 +107,12 @@ If ``true``, enables per-sample shading which replaces MSAA by SSAA. This provid .. rst-class:: classref-property -:ref:`float<class_float>` **min_sample_shading** = ``0.0`` +:ref:`float<class_float>` **min_sample_shading** = ``0.0`` :ref:`🔗<class_RDPipelineMultisampleState_property_min_sample_shading>` .. rst-class:: classref-property-setget -- void **set_min_sample_shading** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min_sample_shading** **(** **)** +- |void| **set_min_sample_shading**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min_sample_shading**\ (\ ) The multiplier of :ref:`sample_count<class_RDPipelineMultisampleState_property_sample_count>` that determines how many samples are performed for each fragment. Must be between ``0.0`` and ``1.0`` (inclusive). Only effective if :ref:`enable_sample_shading<class_RDPipelineMultisampleState_property_enable_sample_shading>` is ``true``. If :ref:`min_sample_shading<class_RDPipelineMultisampleState_property_min_sample_shading>` is ``1.0``, fragment invocation must only read from the coverage index sample. Tile image access must not be used if :ref:`enable_sample_shading<class_RDPipelineMultisampleState_property_enable_sample_shading>` is *not* ``1.0``. @@ -124,12 +124,12 @@ The multiplier of :ref:`sample_count<class_RDPipelineMultisampleState_property_s .. rst-class:: classref-property -:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **sample_count** = ``0`` +:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **sample_count** = ``0`` :ref:`🔗<class_RDPipelineMultisampleState_property_sample_count>` .. rst-class:: classref-property-setget -- void **set_sample_count** **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` value **)** -- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_sample_count** **(** **)** +- |void| **set_sample_count**\ (\ value\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`\ ) +- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_sample_count**\ (\ ) The number of MSAA samples (or SSAA samples if :ref:`enable_sample_shading<class_RDPipelineMultisampleState_property_enable_sample_shading>` is ``true``) to perform. Higher values result in better antialiasing, at the cost of performance. @@ -141,14 +141,14 @@ The number of MSAA samples (or SSAA samples if :ref:`enable_sample_shading<class .. rst-class:: classref-property -:ref:`int[]<class_int>` **sample_masks** = ``[]`` +:ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **sample_masks** = ``[]`` :ref:`🔗<class_RDPipelineMultisampleState_property_sample_masks>` .. rst-class:: classref-property-setget -- void **set_sample_masks** **(** :ref:`int[]<class_int>` value **)** -- :ref:`int[]<class_int>` **get_sample_masks** **(** **)** +- |void| **set_sample_masks**\ (\ value\: :ref:`Array<class_Array>`\[:ref:`int<class_int>`\]\ ) +- :ref:`Array<class_Array>`\[:ref:`int<class_int>`\] **get_sample_masks**\ (\ ) -The sampleSee the `sample mask Vulkan documentation <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-samplemask>`__ for more details. +The sample mask array. See the `sample mask Vulkan documentation <https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-samplemask>`__ for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -157,3 +157,4 @@ The sampleSee the `sample mask Vulkan documentation <https://registry.khronos.or .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinerasterizationstate.rst b/classes/class_rdpipelinerasterizationstate.rst index 653da746959..415ab1e7d7c 100644 --- a/classes/class_rdpipelinerasterizationstate.rst +++ b/classes/class_rdpipelinerasterizationstate.rst @@ -66,12 +66,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>` **cull_mode** = ``0`` +:ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>` **cull_mode** = ``0`` :ref:`🔗<class_RDPipelineRasterizationState_property_cull_mode>` .. rst-class:: classref-property-setget -- void **set_cull_mode** **(** :ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>` value **)** -- :ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>` **get_cull_mode** **(** **)** +- |void| **set_cull_mode**\ (\ value\: :ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>`\ ) +- :ref:`PolygonCullMode<enum_RenderingDevice_PolygonCullMode>` **get_cull_mode**\ (\ ) The cull mode to use when drawing polygons, which determines whether front faces or backfaces are hidden. @@ -83,16 +83,14 @@ The cull mode to use when drawing polygons, which determines whether front faces .. rst-class:: classref-property -:ref:`float<class_float>` **depth_bias_clamp** = ``0.0`` +:ref:`float<class_float>` **depth_bias_clamp** = ``0.0`` :ref:`🔗<class_RDPipelineRasterizationState_property_depth_bias_clamp>` .. rst-class:: classref-property-setget -- void **set_depth_bias_clamp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_bias_clamp** **(** **)** +- |void| **set_depth_bias_clamp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_bias_clamp**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A limit for how much each depth value can be offset. If negative, it serves as a minimum value, but if positive, it serves as a maximum value. .. rst-class:: classref-item-separator @@ -102,16 +100,14 @@ The cull mode to use when drawing polygons, which determines whether front faces .. rst-class:: classref-property -:ref:`float<class_float>` **depth_bias_constant_factor** = ``0.0`` +:ref:`float<class_float>` **depth_bias_constant_factor** = ``0.0`` :ref:`🔗<class_RDPipelineRasterizationState_property_depth_bias_constant_factor>` .. rst-class:: classref-property-setget -- void **set_depth_bias_constant_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_bias_constant_factor** **(** **)** - -.. container:: contribute +- |void| **set_depth_bias_constant_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_bias_constant_factor**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A constant offset added to each depth value. Applied after :ref:`depth_bias_slope_factor<class_RDPipelineRasterizationState_property_depth_bias_slope_factor>`. .. rst-class:: classref-item-separator @@ -121,16 +117,14 @@ The cull mode to use when drawing polygons, which determines whether front faces .. rst-class:: classref-property -:ref:`bool<class_bool>` **depth_bias_enabled** = ``false`` +:ref:`bool<class_bool>` **depth_bias_enabled** = ``false`` :ref:`🔗<class_RDPipelineRasterizationState_property_depth_bias_enabled>` .. rst-class:: classref-property-setget -- void **set_depth_bias_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_depth_bias_enabled** **(** **)** - -.. container:: contribute +- |void| **set_depth_bias_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_depth_bias_enabled**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, each generated depth value will by offset by some amount. The specific amount is generated per polygon based on the values of :ref:`depth_bias_slope_factor<class_RDPipelineRasterizationState_property_depth_bias_slope_factor>` and :ref:`depth_bias_constant_factor<class_RDPipelineRasterizationState_property_depth_bias_constant_factor>`. .. rst-class:: classref-item-separator @@ -140,16 +134,14 @@ The cull mode to use when drawing polygons, which determines whether front faces .. rst-class:: classref-property -:ref:`float<class_float>` **depth_bias_slope_factor** = ``0.0`` +:ref:`float<class_float>` **depth_bias_slope_factor** = ``0.0`` :ref:`🔗<class_RDPipelineRasterizationState_property_depth_bias_slope_factor>` .. rst-class:: classref-property-setget -- void **set_depth_bias_slope_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth_bias_slope_factor** **(** **)** +- |void| **set_depth_bias_slope_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth_bias_slope_factor**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A constant scale applied to the slope of each polygons' depth. Applied before :ref:`depth_bias_constant_factor<class_RDPipelineRasterizationState_property_depth_bias_constant_factor>`. .. rst-class:: classref-item-separator @@ -159,12 +151,12 @@ The cull mode to use when drawing polygons, which determines whether front faces .. rst-class:: classref-property -:ref:`bool<class_bool>` **discard_primitives** = ``false`` +:ref:`bool<class_bool>` **discard_primitives** = ``false`` :ref:`🔗<class_RDPipelineRasterizationState_property_discard_primitives>` .. rst-class:: classref-property-setget -- void **set_discard_primitives** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_discard_primitives** **(** **)** +- |void| **set_discard_primitives**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_discard_primitives**\ (\ ) If ``true``, primitives are discarded immediately before the rasterization stage. @@ -176,16 +168,14 @@ If ``true``, primitives are discarded immediately before the rasterization stage .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_depth_clamp** = ``false`` +:ref:`bool<class_bool>` **enable_depth_clamp** = ``false`` :ref:`🔗<class_RDPipelineRasterizationState_property_enable_depth_clamp>` .. rst-class:: classref-property-setget -- void **set_enable_depth_clamp** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_depth_clamp** **(** **)** - -.. container:: contribute +- |void| **set_enable_depth_clamp**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_depth_clamp**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, clamps depth values according to the minimum and maximum depth of the associated viewport. .. rst-class:: classref-item-separator @@ -195,12 +185,12 @@ If ``true``, primitives are discarded immediately before the rasterization stage .. rst-class:: classref-property -:ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>` **front_face** = ``0`` +:ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>` **front_face** = ``0`` :ref:`🔗<class_RDPipelineRasterizationState_property_front_face>` .. rst-class:: classref-property-setget -- void **set_front_face** **(** :ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>` value **)** -- :ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>` **get_front_face** **(** **)** +- |void| **set_front_face**\ (\ value\: :ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>`\ ) +- :ref:`PolygonFrontFace<enum_RenderingDevice_PolygonFrontFace>` **get_front_face**\ (\ ) The winding order to use to determine which face of a triangle is considered its front face. @@ -212,14 +202,14 @@ The winding order to use to determine which face of a triangle is considered its .. rst-class:: classref-property -:ref:`float<class_float>` **line_width** = ``1.0`` +:ref:`float<class_float>` **line_width** = ``1.0`` :ref:`🔗<class_RDPipelineRasterizationState_property_line_width>` .. rst-class:: classref-property-setget -- void **set_line_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_line_width** **(** **)** +- |void| **set_line_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_line_width**\ (\ ) -THe line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. +The line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. .. rst-class:: classref-item-separator @@ -229,12 +219,12 @@ THe line width to use when drawing lines (in pixels). Thick lines may not be sup .. rst-class:: classref-property -:ref:`int<class_int>` **patch_control_points** = ``1`` +:ref:`int<class_int>` **patch_control_points** = ``1`` :ref:`🔗<class_RDPipelineRasterizationState_property_patch_control_points>` .. rst-class:: classref-property-setget -- void **set_patch_control_points** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_patch_control_points** **(** **)** +- |void| **set_patch_control_points**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_patch_control_points**\ (\ ) The number of control points to use when drawing a patch with tessellation enabled. Higher values result in higher quality at the cost of performance. @@ -246,12 +236,12 @@ The number of control points to use when drawing a patch with tessellation enabl .. rst-class:: classref-property -:ref:`bool<class_bool>` **wireframe** = ``false`` +:ref:`bool<class_bool>` **wireframe** = ``false`` :ref:`🔗<class_RDPipelineRasterizationState_property_wireframe>` .. rst-class:: classref-property-setget -- void **set_wireframe** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_wireframe** **(** **)** +- |void| **set_wireframe**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_wireframe**\ (\ ) If ``true``, performs wireframe rendering for triangles instead of flat or textured rendering. @@ -262,3 +252,4 @@ If ``true``, performs wireframe rendering for triangles instead of flat or textu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdpipelinespecializationconstant.rst b/classes/class_rdpipelinespecializationconstant.rst index ad23de80888..fc39ef45335 100644 --- a/classes/class_rdpipelinespecializationconstant.rst +++ b/classes/class_rdpipelinespecializationconstant.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **constant_id** = ``0`` +:ref:`int<class_int>` **constant_id** = ``0`` :ref:`🔗<class_RDPipelineSpecializationConstant_property_constant_id>` .. rst-class:: classref-property-setget -- void **set_constant_id** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_constant_id** **(** **)** +- |void| **set_constant_id**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_constant_id**\ (\ ) The identifier of the specialization constant. This is a value starting from ``0`` and that increments for every different specialization constant for a given shader. @@ -67,12 +67,12 @@ The identifier of the specialization constant. This is a value starting from ``0 .. rst-class:: classref-property -:ref:`Variant<class_Variant>` **value** +:ref:`Variant<class_Variant>` **value** :ref:`🔗<class_RDPipelineSpecializationConstant_property_value>` .. rst-class:: classref-property-setget -- void **set_value** **(** :ref:`Variant<class_Variant>` value **)** -- :ref:`Variant<class_Variant>` **get_value** **(** **)** +- |void| **set_value**\ (\ value\: :ref:`Variant<class_Variant>`\ ) +- :ref:`Variant<class_Variant>` **get_value**\ (\ ) The specialization constant's value. Only :ref:`bool<class_bool>`, :ref:`int<class_int>` and :ref:`float<class_float>` types are valid for specialization constants. @@ -83,3 +83,4 @@ The specialization constant's value. Only :ref:`bool<class_bool>`, :ref:`int<cla .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdsamplerstate.rst b/classes/class_rdsamplerstate.rst index 859590e02c3..b27506a0360 100644 --- a/classes/class_rdsamplerstate.rst +++ b/classes/class_rdsamplerstate.rst @@ -74,12 +74,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **anisotropy_max** = ``1.0`` +:ref:`float<class_float>` **anisotropy_max** = ``1.0`` :ref:`🔗<class_RDSamplerState_property_anisotropy_max>` .. rst-class:: classref-property-setget -- void **set_anisotropy_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_anisotropy_max** **(** **)** +- |void| **set_anisotropy_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_anisotropy_max**\ (\ ) Maximum anisotropy that can be used when sampling. Only effective if :ref:`use_anisotropy<class_RDSamplerState_property_use_anisotropy>` is ``true``. Higher values result in a sharper sampler at oblique angles, at the cost of performance (due to memory bandwidth). This value may be limited by the graphics hardware in use. Most graphics hardware only supports values up to ``16.0``. @@ -93,12 +93,12 @@ If :ref:`anisotropy_max<class_RDSamplerState_property_anisotropy_max>` is ``1.0` .. rst-class:: classref-property -:ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **border_color** = ``2`` +:ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **border_color** = ``2`` :ref:`🔗<class_RDSamplerState_property_border_color>` .. rst-class:: classref-property-setget -- void **set_border_color** **(** :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` value **)** -- :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **get_border_color** **(** **)** +- |void| **set_border_color**\ (\ value\: :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>`\ ) +- :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **get_border_color**\ (\ ) The border color that will be returned when sampling outside the sampler's bounds and the :ref:`repeat_u<class_RDSamplerState_property_repeat_u>`, :ref:`repeat_v<class_RDSamplerState_property_repeat_v>` or :ref:`repeat_w<class_RDSamplerState_property_repeat_w>` modes have repeating disabled. @@ -110,12 +110,12 @@ The border color that will be returned when sampling outside the sampler's bound .. rst-class:: classref-property -:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **compare_op** = ``7`` +:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **compare_op** = ``7`` :ref:`🔗<class_RDSamplerState_property_compare_op>` .. rst-class:: classref-property-setget -- void **set_compare_op** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)** -- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_compare_op** **(** **)** +- |void| **set_compare_op**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ ) +- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_compare_op**\ (\ ) The compare operation to use. Only effective if :ref:`enable_compare<class_RDSamplerState_property_enable_compare>` is ``true``. @@ -127,12 +127,12 @@ The compare operation to use. Only effective if :ref:`enable_compare<class_RDSam .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_compare** = ``false`` +:ref:`bool<class_bool>` **enable_compare** = ``false`` :ref:`🔗<class_RDSamplerState_property_enable_compare>` .. rst-class:: classref-property-setget -- void **set_enable_compare** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enable_compare** **(** **)** +- |void| **set_enable_compare**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enable_compare**\ (\ ) If ``true``, returned values will be based on the comparison operation defined in :ref:`compare_op<class_RDSamplerState_property_compare_op>`. This is a hardware-based approach and is therefore faster than performing this manually in a shader. For example, compare operations are used for shadow map rendering by comparing depth values from a shadow sampler. @@ -144,12 +144,12 @@ If ``true``, returned values will be based on the comparison operation defined i .. rst-class:: classref-property -:ref:`float<class_float>` **lod_bias** = ``0.0`` +:ref:`float<class_float>` **lod_bias** = ``0.0`` :ref:`🔗<class_RDSamplerState_property_lod_bias>` .. rst-class:: classref-property-setget -- void **set_lod_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_lod_bias** **(** **)** +- |void| **set_lod_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_lod_bias**\ (\ ) The mipmap LOD bias to use. Positive values will make the sampler blurrier at a given distance, while negative values will make the sampler sharper at a given distance (at the risk of looking grainy). Recommended values are between ``-0.5`` and ``0.0``. Only effective if the sampler has mipmaps available. @@ -161,14 +161,14 @@ The mipmap LOD bias to use. Positive values will make the sampler blurrier at a .. rst-class:: classref-property -:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mag_filter** = ``0`` +:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mag_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_mag_filter>` .. rst-class:: classref-property-setget -- void **set_mag_filter** **(** :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` value **)** -- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mag_filter** **(** **)** +- |void| **set_mag_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ ) +- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mag_filter**\ (\ ) -The sampler's magnification filter. +The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels. .. rst-class:: classref-item-separator @@ -178,12 +178,12 @@ The sampler's magnification filter. .. rst-class:: classref-property -:ref:`float<class_float>` **max_lod** = ``1e+20`` +:ref:`float<class_float>` **max_lod** = ``1e+20`` :ref:`🔗<class_RDSamplerState_property_max_lod>` .. rst-class:: classref-property-setget -- void **set_max_lod** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max_lod** **(** **)** +- |void| **set_max_lod**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max_lod**\ (\ ) The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available. @@ -195,16 +195,14 @@ The maximum mipmap LOD bias to display (lowest resolution). Only effective if th .. rst-class:: classref-property -:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **min_filter** = ``0`` +:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **min_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_min_filter>` .. rst-class:: classref-property-setget -- void **set_min_filter** **(** :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` value **)** -- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_min_filter** **(** **)** +- |void| **set_min_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ ) +- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_min_filter**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels. .. rst-class:: classref-item-separator @@ -214,12 +212,12 @@ The maximum mipmap LOD bias to display (lowest resolution). Only effective if th .. rst-class:: classref-property -:ref:`float<class_float>` **min_lod** = ``0.0`` +:ref:`float<class_float>` **min_lod** = ``0.0`` :ref:`🔗<class_RDSamplerState_property_min_lod>` .. rst-class:: classref-property-setget -- void **set_min_lod** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min_lod** **(** **)** +- |void| **set_min_lod**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min_lod**\ (\ ) The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available. @@ -231,12 +229,12 @@ The minimum mipmap LOD bias to display (highest resolution). Only effective if t .. rst-class:: classref-property -:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mip_filter** = ``0`` +:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mip_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_mip_filter>` .. rst-class:: classref-property-setget -- void **set_mip_filter** **(** :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` value **)** -- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mip_filter** **(** **)** +- |void| **set_mip_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ ) +- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mip_filter**\ (\ ) The filtering method to use for mipmaps. @@ -248,12 +246,12 @@ The filtering method to use for mipmaps. .. rst-class:: classref-property -:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_u** = ``2`` +:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_u** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_u>` .. rst-class:: classref-property-setget -- void **set_repeat_u** **(** :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` value **)** -- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_u** **(** **)** +- |void| **set_repeat_u**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ ) +- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_u**\ (\ ) The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. @@ -265,12 +263,12 @@ The repeat mode to use along the U axis of UV coordinates. This affects the retu .. rst-class:: classref-property -:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_v** = ``2`` +:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_v** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_v>` .. rst-class:: classref-property-setget -- void **set_repeat_v** **(** :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` value **)** -- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_v** **(** **)** +- |void| **set_repeat_v**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ ) +- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_v**\ (\ ) The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. @@ -282,12 +280,12 @@ The repeat mode to use along the V axis of UV coordinates. This affects the retu .. rst-class:: classref-property -:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_w** = ``2`` +:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_w** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_w>` .. rst-class:: classref-property-setget -- void **set_repeat_w** **(** :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` value **)** -- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_w** **(** **)** +- |void| **set_repeat_w**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ ) +- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_w**\ (\ ) The repeat mode to use along the W axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. Only effective for 3D samplers. @@ -299,16 +297,14 @@ The repeat mode to use along the W axis of UV coordinates. This affects the retu .. rst-class:: classref-property -:ref:`bool<class_bool>` **unnormalized_uvw** = ``false`` +:ref:`bool<class_bool>` **unnormalized_uvw** = ``false`` :ref:`🔗<class_RDSamplerState_property_unnormalized_uvw>` .. rst-class:: classref-property-setget -- void **set_unnormalized_uvw** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_unnormalized_uvw** **(** **)** - -.. container:: contribute +- |void| **set_unnormalized_uvw**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_unnormalized_uvw**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, the texture will be sampled with coordinates ranging from 0 to the texture's resolution. Otherwise, the coordinates will be normalized and range from 0 to 1. .. rst-class:: classref-item-separator @@ -318,12 +314,12 @@ The repeat mode to use along the W axis of UV coordinates. This affects the retu .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_anisotropy** = ``false`` +:ref:`bool<class_bool>` **use_anisotropy** = ``false`` :ref:`🔗<class_RDSamplerState_property_use_anisotropy>` .. rst-class:: classref-property-setget -- void **set_use_anisotropy** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_anisotropy** **(** **)** +- |void| **set_use_anisotropy**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_anisotropy**\ (\ ) If ``true``, perform anisotropic sampling. See :ref:`anisotropy_max<class_RDSamplerState_property_anisotropy_max>`. @@ -334,3 +330,4 @@ If ``true``, perform anisotropic sampling. See :ref:`anisotropy_max<class_RDSamp .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdshaderfile.rst b/classes/class_rdshaderfile.rst index c486c0b74c3..1ae5bbc8c26 100644 --- a/classes/class_rdshaderfile.rst +++ b/classes/class_rdshaderfile.rst @@ -43,13 +43,13 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` | :ref:`get_spirv<class_RDShaderFile_method_get_spirv>` **(** :ref:`StringName<class_StringName>` version=&"" **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`get_version_list<class_RDShaderFile_method_get_version_list>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bytecode<class_RDShaderFile_method_set_bytecode>` **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` bytecode, :ref:`StringName<class_StringName>` version=&"" **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` | :ref:`get_spirv<class_RDShaderFile_method_get_spirv>`\ (\ version\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_version_list<class_RDShaderFile_method_get_version_list>`\ (\ ) |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bytecode<class_RDShaderFile_method_set_bytecode>`\ (\ bytecode\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, version\: :ref:`StringName<class_StringName>` = &""\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,12 +64,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **base_error** = ``""`` +:ref:`String<class_String>` **base_error** = ``""`` :ref:`🔗<class_RDShaderFile_property_base_error>` .. rst-class:: classref-property-setget -- void **set_base_error** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_base_error** **(** **)** +- |void| **set_base_error**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_base_error**\ (\ ) The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`'s error message members). @@ -86,7 +86,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RDShaderSPIRV<class_RDShaderSPIRV>` **get_spirv** **(** :ref:`StringName<class_StringName>` version=&"" **)** |const| +:ref:`RDShaderSPIRV<class_RDShaderSPIRV>` **get_spirv**\ (\ version\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_RDShaderFile_method_get_spirv>` Returns the SPIR-V intermediate representation for the specified shader ``version``. @@ -98,7 +98,7 @@ Returns the SPIR-V intermediate representation for the specified shader ``versio .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **get_version_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_version_list**\ (\ ) |const| :ref:`🔗<class_RDShaderFile_method_get_version_list>` Returns the list of compiled versions for this shader. @@ -110,7 +110,7 @@ Returns the list of compiled versions for this shader. .. rst-class:: classref-method -void **set_bytecode** **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` bytecode, :ref:`StringName<class_StringName>` version=&"" **)** +|void| **set_bytecode**\ (\ bytecode\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, version\: :ref:`StringName<class_StringName>` = &""\ ) :ref:`🔗<class_RDShaderFile_method_set_bytecode>` Sets the SPIR-V ``bytecode`` that will be compiled for the specified ``version``. @@ -121,3 +121,4 @@ Sets the SPIR-V ``bytecode`` that will be compiled for the specified ``version`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdshadersource.rst b/classes/class_rdshadersource.rst index 49fb66a881a..a0110a34cce 100644 --- a/classes/class_rdshadersource.rst +++ b/classes/class_rdshadersource.rst @@ -53,11 +53,11 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_stage_source<class_RDShaderSource_method_get_stage_source>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stage_source<class_RDShaderSource_method_set_stage_source>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_stage_source<class_RDShaderSource_method_get_stage_source>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stage_source<class_RDShaderSource_method_set_stage_source>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,12 +72,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>` **language** = ``0`` +:ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>` **language** = ``0`` :ref:`🔗<class_RDShaderSource_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>` value **)** -- :ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>`\ ) +- :ref:`ShaderLanguage<enum_RenderingDevice_ShaderLanguage>` **get_language**\ (\ ) The language the shader is written in. @@ -89,12 +89,12 @@ The language the shader is written in. .. rst-class:: classref-property -:ref:`String<class_String>` **source_compute** = ``""`` +:ref:`String<class_String>` **source_compute** = ``""`` :ref:`🔗<class_RDShaderSource_property_source_compute>` .. rst-class:: classref-property-setget -- void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** -- :ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| Source code for the shader's compute stage. @@ -106,12 +106,12 @@ Source code for the shader's compute stage. .. rst-class:: classref-property -:ref:`String<class_String>` **source_fragment** = ``""`` +:ref:`String<class_String>` **source_fragment** = ``""`` :ref:`🔗<class_RDShaderSource_property_source_fragment>` .. rst-class:: classref-property-setget -- void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** -- :ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| Source code for the shader's fragment stage. @@ -123,12 +123,12 @@ Source code for the shader's fragment stage. .. rst-class:: classref-property -:ref:`String<class_String>` **source_tesselation_control** = ``""`` +:ref:`String<class_String>` **source_tesselation_control** = ``""`` :ref:`🔗<class_RDShaderSource_property_source_tesselation_control>` .. rst-class:: classref-property-setget -- void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** -- :ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| Source code for the shader's tessellation control stage. @@ -140,12 +140,12 @@ Source code for the shader's tessellation control stage. .. rst-class:: classref-property -:ref:`String<class_String>` **source_tesselation_evaluation** = ``""`` +:ref:`String<class_String>` **source_tesselation_evaluation** = ``""`` :ref:`🔗<class_RDShaderSource_property_source_tesselation_evaluation>` .. rst-class:: classref-property-setget -- void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** -- :ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| Source code for the shader's tessellation evaluation stage. @@ -157,12 +157,12 @@ Source code for the shader's tessellation evaluation stage. .. rst-class:: classref-property -:ref:`String<class_String>` **source_vertex** = ``""`` +:ref:`String<class_String>` **source_vertex** = ``""`` :ref:`🔗<class_RDShaderSource_property_source_vertex>` .. rst-class:: classref-property-setget -- void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** -- :ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| Source code for the shader's vertex stage. @@ -179,7 +179,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +:ref:`String<class_String>` **get_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| :ref:`🔗<class_RDShaderSource_method_get_stage_source>` Returns source code for the specified shader ``stage``. Equivalent to getting one of :ref:`source_compute<class_RDShaderSource_property_source_compute>`, :ref:`source_fragment<class_RDShaderSource_property_source_fragment>`, :ref:`source_tesselation_control<class_RDShaderSource_property_source_tesselation_control>`, :ref:`source_tesselation_evaluation<class_RDShaderSource_property_source_tesselation_evaluation>` or :ref:`source_vertex<class_RDShaderSource_property_source_vertex>`. @@ -191,7 +191,7 @@ Returns source code for the specified shader ``stage``. Equivalent to getting on .. rst-class:: classref-method -void **set_stage_source** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` source **)** +|void| **set_stage_source**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, source\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RDShaderSource_method_set_stage_source>` Sets ``source`` code for the specified shader ``stage``. Equivalent to setting one of :ref:`source_compute<class_RDShaderSource_property_source_compute>`, :ref:`source_fragment<class_RDShaderSource_property_source_fragment>`, :ref:`source_tesselation_control<class_RDShaderSource_property_source_tesselation_control>`, :ref:`source_tesselation_evaluation<class_RDShaderSource_property_source_tesselation_evaluation>` or :ref:`source_vertex<class_RDShaderSource_property_source_vertex>`. @@ -202,3 +202,4 @@ Sets ``source`` code for the specified shader ``stage``. Equivalent to setting o .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdshaderspirv.rst b/classes/class_rdshaderspirv.rst index 07555fb6ebf..a5039f778f7 100644 --- a/classes/class_rdshaderspirv.rst +++ b/classes/class_rdshaderspirv.rst @@ -19,7 +19,7 @@ SPIR-V intermediate representation as part of a :ref:`RDShaderFile<class_RDShade Description ----------- -**RDShaderSPIRV** represents a :ref:`RDShaderFile<class_RDShaderFile>`'s `SPIR-V <https://www.khronos.org/spir/>`__ code for various shader stages, as well as possible compilation error messages. SPIR-V a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions. +**RDShaderSPIRV** represents a :ref:`RDShaderFile<class_RDShaderFile>`'s `SPIR-V <https://www.khronos.org/spir/>`__ code for various shader stages, as well as possible compilation error messages. SPIR-V is a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions. This object is used by :ref:`RenderingDevice<class_RenderingDevice>`. @@ -61,15 +61,15 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_stage_bytecode<class_RDShaderSPIRV_method_get_stage_bytecode>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_stage_compile_error<class_RDShaderSPIRV_method_get_stage_compile_error>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stage_bytecode<class_RDShaderSPIRV_method_set_stage_bytecode>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stage_compile_error<class_RDShaderSPIRV_method_set_stage_compile_error>` **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_stage_bytecode<class_RDShaderSPIRV_method_get_stage_bytecode>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_stage_compile_error<class_RDShaderSPIRV_method_get_stage_compile_error>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stage_bytecode<class_RDShaderSPIRV_method_set_stage_bytecode>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stage_compile_error<class_RDShaderSPIRV_method_set_stage_compile_error>`\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,15 +84,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_compute** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_compute** = ``PackedByteArray()`` :ref:`🔗<class_RDShaderSPIRV_property_bytecode_compute>` .. rst-class:: classref-property-setget -- void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The SPIR-V bytecode for the compute shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -101,15 +103,17 @@ The SPIR-V bytecode for the compute shader stage. .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_fragment** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_fragment** = ``PackedByteArray()`` :ref:`🔗<class_RDShaderSPIRV_property_bytecode_fragment>` .. rst-class:: classref-property-setget -- void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The SPIR-V bytecode for the fragment shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -118,15 +122,17 @@ The SPIR-V bytecode for the fragment shader stage. .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_tesselation_control** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_tesselation_control** = ``PackedByteArray()`` :ref:`🔗<class_RDShaderSPIRV_property_bytecode_tesselation_control>` .. rst-class:: classref-property-setget -- void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The SPIR-V bytecode for the tessellation control shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -135,15 +141,17 @@ The SPIR-V bytecode for the tessellation control shader stage. .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_tesselation_evaluation** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_tesselation_evaluation** = ``PackedByteArray()`` :ref:`🔗<class_RDShaderSPIRV_property_bytecode_tesselation_evaluation>` .. rst-class:: classref-property-setget -- void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The SPIR-V bytecode for the tessellation evaluation shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -152,15 +160,17 @@ The SPIR-V bytecode for the tessellation evaluation shader stage. .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_vertex** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **bytecode_vertex** = ``PackedByteArray()`` :ref:`🔗<class_RDShaderSPIRV_property_bytecode_vertex>` .. rst-class:: classref-property-setget -- void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The SPIR-V bytecode for the vertex shader stage. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -169,12 +179,12 @@ The SPIR-V bytecode for the vertex shader stage. .. rst-class:: classref-property -:ref:`String<class_String>` **compile_error_compute** = ``""`` +:ref:`String<class_String>` **compile_error_compute** = ``""`` :ref:`🔗<class_RDShaderSPIRV_property_compile_error_compute>` .. rst-class:: classref-property-setget -- void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** -- :ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. @@ -186,12 +196,12 @@ The compilation error message for the compute shader stage (set by the SPIR-V co .. rst-class:: classref-property -:ref:`String<class_String>` **compile_error_fragment** = ``""`` +:ref:`String<class_String>` **compile_error_fragment** = ``""`` :ref:`🔗<class_RDShaderSPIRV_property_compile_error_fragment>` .. rst-class:: classref-property-setget -- void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** -- :ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. @@ -203,12 +213,12 @@ The compilation error message for the fragment shader stage (set by the SPIR-V c .. rst-class:: classref-property -:ref:`String<class_String>` **compile_error_tesselation_control** = ``""`` +:ref:`String<class_String>` **compile_error_tesselation_control** = ``""`` :ref:`🔗<class_RDShaderSPIRV_property_compile_error_tesselation_control>` .. rst-class:: classref-property-setget -- void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** -- :ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. @@ -220,12 +230,12 @@ The compilation error message for the tessellation control shader stage (set by .. rst-class:: classref-property -:ref:`String<class_String>` **compile_error_tesselation_evaluation** = ``""`` +:ref:`String<class_String>` **compile_error_tesselation_evaluation** = ``""`` :ref:`🔗<class_RDShaderSPIRV_property_compile_error_tesselation_evaluation>` .. rst-class:: classref-property-setget -- void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** -- :ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. @@ -237,12 +247,12 @@ The compilation error message for the tessellation evaluation shader stage (set .. rst-class:: classref-property -:ref:`String<class_String>` **compile_error_vertex** = ``""`` +:ref:`String<class_String>` **compile_error_vertex** = ``""`` :ref:`🔗<class_RDShaderSPIRV_property_compile_error_vertex>` .. rst-class:: classref-property-setget -- void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** -- :ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +- |void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. @@ -259,7 +269,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **get_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| :ref:`🔗<class_RDShaderSPIRV_method_get_stage_bytecode>` Equivalent to getting one of :ref:`bytecode_compute<class_RDShaderSPIRV_property_bytecode_compute>`, :ref:`bytecode_fragment<class_RDShaderSPIRV_property_bytecode_fragment>`, :ref:`bytecode_tesselation_control<class_RDShaderSPIRV_property_bytecode_tesselation_control>`, :ref:`bytecode_tesselation_evaluation<class_RDShaderSPIRV_property_bytecode_tesselation_evaluation>`, :ref:`bytecode_vertex<class_RDShaderSPIRV_property_bytecode_vertex>`. @@ -271,7 +281,7 @@ Equivalent to getting one of :ref:`bytecode_compute<class_RDShaderSPIRV_property .. rst-class:: classref-method -:ref:`String<class_String>` **get_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage **)** |const| +:ref:`String<class_String>` **get_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`\ ) |const| :ref:`🔗<class_RDShaderSPIRV_method_get_stage_compile_error>` Returns the compilation error message for the given shader ``stage``. Equivalent to getting one of :ref:`compile_error_compute<class_RDShaderSPIRV_property_compile_error_compute>`, :ref:`compile_error_fragment<class_RDShaderSPIRV_property_compile_error_fragment>`, :ref:`compile_error_tesselation_control<class_RDShaderSPIRV_property_compile_error_tesselation_control>`, :ref:`compile_error_tesselation_evaluation<class_RDShaderSPIRV_property_compile_error_tesselation_evaluation>`, :ref:`compile_error_vertex<class_RDShaderSPIRV_property_compile_error_vertex>`. @@ -283,7 +293,7 @@ Returns the compilation error message for the given shader ``stage``. Equivalent .. rst-class:: classref-method -void **set_stage_bytecode** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`PackedByteArray<class_PackedByteArray>` bytecode **)** +|void| **set_stage_bytecode**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, bytecode\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RDShaderSPIRV_method_set_stage_bytecode>` Sets the SPIR-V ``bytecode`` for the given shader ``stage``. Equivalent to setting one of :ref:`bytecode_compute<class_RDShaderSPIRV_property_bytecode_compute>`, :ref:`bytecode_fragment<class_RDShaderSPIRV_property_bytecode_fragment>`, :ref:`bytecode_tesselation_control<class_RDShaderSPIRV_property_bytecode_tesselation_control>`, :ref:`bytecode_tesselation_evaluation<class_RDShaderSPIRV_property_bytecode_tesselation_evaluation>`, :ref:`bytecode_vertex<class_RDShaderSPIRV_property_bytecode_vertex>`. @@ -295,7 +305,7 @@ Sets the SPIR-V ``bytecode`` for the given shader ``stage``. Equivalent to setti .. rst-class:: classref-method -void **set_stage_compile_error** **(** :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>` stage, :ref:`String<class_String>` compile_error **)** +|void| **set_stage_compile_error**\ (\ stage\: :ref:`ShaderStage<enum_RenderingDevice_ShaderStage>`, compile_error\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RDShaderSPIRV_method_set_stage_compile_error>` Sets the compilation error message for the given shader ``stage`` to ``compile_error``. Equivalent to setting one of :ref:`compile_error_compute<class_RDShaderSPIRV_property_compile_error_compute>`, :ref:`compile_error_fragment<class_RDShaderSPIRV_property_compile_error_fragment>`, :ref:`compile_error_tesselation_control<class_RDShaderSPIRV_property_compile_error_tesselation_control>`, :ref:`compile_error_tesselation_evaluation<class_RDShaderSPIRV_property_compile_error_tesselation_evaluation>`, :ref:`compile_error_vertex<class_RDShaderSPIRV_property_compile_error_vertex>`. @@ -306,3 +316,4 @@ Sets the compilation error message for the given shader ``stage`` to ``compile_e .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdtextureformat.rst b/classes/class_rdtextureformat.rst index 7ded5665a4f..622f9d21305 100644 --- a/classes/class_rdtextureformat.rst +++ b/classes/class_rdtextureformat.rst @@ -44,7 +44,7 @@ Properties +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ | :ref:`TextureType<enum_RenderingDevice_TextureType>` | :ref:`texture_type<class_RDTextureFormat_property_texture_type>` | ``1`` | +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ - | |bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> | :ref:`usage_bits<class_RDTextureFormat_property_usage_bits>` | ``0`` | + | |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] | :ref:`usage_bits<class_RDTextureFormat_property_usage_bits>` | ``0`` | +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ | :ref:`int<class_int>` | :ref:`width<class_RDTextureFormat_property_width>` | ``1`` | +------------------------------------------------------------------------------+------------------------------------------------------------------+-------+ @@ -57,11 +57,11 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_shareable_format<class_RDTextureFormat_method_add_shareable_format>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_shareable_format<class_RDTextureFormat_method_remove_shareable_format>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_shareable_format<class_RDTextureFormat_method_add_shareable_format>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_shareable_format<class_RDTextureFormat_method_remove_shareable_format>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) | + +--------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -76,12 +76,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **array_layers** = ``1`` +:ref:`int<class_int>` **array_layers** = ``1`` :ref:`🔗<class_RDTextureFormat_property_array_layers>` .. rst-class:: classref-property-setget -- void **set_array_layers** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_array_layers** **(** **)** +- |void| **set_array_layers**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_array_layers**\ (\ ) The number of layers in the texture. Only relevant for 2D texture arrays. @@ -93,12 +93,12 @@ The number of layers in the texture. Only relevant for 2D texture arrays. .. rst-class:: classref-property -:ref:`int<class_int>` **depth** = ``1`` +:ref:`int<class_int>` **depth** = ``1`` :ref:`🔗<class_RDTextureFormat_property_depth>` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_depth**\ (\ ) The texture's depth (in pixels). This is always ``1`` for 2D textures. @@ -110,12 +110,12 @@ The texture's depth (in pixels). This is always ``1`` for 2D textures. .. rst-class:: classref-property -:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``8`` +:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``8`` :ref:`🔗<class_RDTextureFormat_property_format>` .. rst-class:: classref-property-setget -- void **set_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` value **)** -- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format** **(** **)** +- |void| **set_format**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) +- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format**\ (\ ) The texture's pixel data format. @@ -127,12 +127,12 @@ The texture's pixel data format. .. rst-class:: classref-property -:ref:`int<class_int>` **height** = ``1`` +:ref:`int<class_int>` **height** = ``1`` :ref:`🔗<class_RDTextureFormat_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_height**\ (\ ) The texture's height (in pixels). @@ -144,12 +144,12 @@ The texture's height (in pixels). .. rst-class:: classref-property -:ref:`int<class_int>` **mipmaps** = ``1`` +:ref:`int<class_int>` **mipmaps** = ``1`` :ref:`🔗<class_RDTextureFormat_property_mipmaps>` .. rst-class:: classref-property-setget -- void **set_mipmaps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_mipmaps** **(** **)** +- |void| **set_mipmaps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_mipmaps**\ (\ ) The number of mipmaps available in the texture. @@ -161,12 +161,12 @@ The number of mipmaps available in the texture. .. rst-class:: classref-property -:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0`` +:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **samples** = ``0`` :ref:`🔗<class_RDTextureFormat_property_samples>` .. rst-class:: classref-property-setget -- void **set_samples** **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` value **)** -- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples** **(** **)** +- |void| **set_samples**\ (\ value\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`\ ) +- :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **get_samples**\ (\ ) The number of samples used when sampling the texture. @@ -178,12 +178,12 @@ The number of samples used when sampling the texture. .. rst-class:: classref-property -:ref:`TextureType<enum_RenderingDevice_TextureType>` **texture_type** = ``1`` +:ref:`TextureType<enum_RenderingDevice_TextureType>` **texture_type** = ``1`` :ref:`🔗<class_RDTextureFormat_property_texture_type>` .. rst-class:: classref-property-setget -- void **set_texture_type** **(** :ref:`TextureType<enum_RenderingDevice_TextureType>` value **)** -- :ref:`TextureType<enum_RenderingDevice_TextureType>` **get_texture_type** **(** **)** +- |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_RenderingDevice_TextureType>`\ ) +- :ref:`TextureType<enum_RenderingDevice_TextureType>` **get_texture_type**\ (\ ) The texture type. @@ -195,12 +195,12 @@ The texture type. .. rst-class:: classref-property -|bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> **usage_bits** = ``0`` +|bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] **usage_bits** = ``0`` :ref:`🔗<class_RDTextureFormat_property_usage_bits>` .. rst-class:: classref-property-setget -- void **set_usage_bits** **(** |bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> value **)** -- |bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> **get_usage_bits** **(** **)** +- |void| **set_usage_bits**\ (\ value\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\]\ ) +- |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\] **get_usage_bits**\ (\ ) The texture's usage bits, which determine what can be done using the texture. @@ -212,12 +212,12 @@ The texture's usage bits, which determine what can be done using the texture. .. rst-class:: classref-property -:ref:`int<class_int>` **width** = ``1`` +:ref:`int<class_int>` **width** = ``1`` :ref:`🔗<class_RDTextureFormat_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_width**\ (\ ) The texture's width (in pixels). @@ -234,7 +234,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** +|void| **add_shareable_format**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_add_shareable_format>` .. container:: contribute @@ -248,7 +248,7 @@ void **add_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFo .. rst-class:: classref-method -void **remove_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format **)** +|void| **remove_shareable_format**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) :ref:`🔗<class_RDTextureFormat_method_remove_shareable_format>` .. container:: contribute @@ -261,3 +261,4 @@ void **remove_shareable_format** **(** :ref:`DataFormat<enum_RenderingDevice_Dat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdtextureview.rst b/classes/class_rdtextureview.rst index 0f7bda35718..9b20f88cf5f 100644 --- a/classes/class_rdtextureview.rst +++ b/classes/class_rdtextureview.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format_override** = ``218`` +:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format_override** = ``218`` :ref:`🔗<class_RDTextureView_property_format_override>` .. rst-class:: classref-property-setget -- void **set_format_override** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` value **)** -- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format_override** **(** **)** +- |void| **set_format_override**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) +- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format_override**\ (\ ) Optional override for the data format to return sampled values in. The default value of :ref:`RenderingDevice.DATA_FORMAT_MAX<class_RenderingDevice_constant_DATA_FORMAT_MAX>` does not override the format. @@ -71,12 +71,12 @@ Optional override for the data format to return sampled values in. The default v .. rst-class:: classref-property -:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_a** = ``6`` +:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_a** = ``6`` :ref:`🔗<class_RDTextureView_property_swizzle_a>` .. rst-class:: classref-property-setget -- void **set_swizzle_a** **(** :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` value **)** -- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_a** **(** **)** +- |void| **set_swizzle_a**\ (\ value\: :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>`\ ) +- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_a**\ (\ ) The channel to sample when sampling the alpha channel. @@ -88,12 +88,12 @@ The channel to sample when sampling the alpha channel. .. rst-class:: classref-property -:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_b** = ``5`` +:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_b** = ``5`` :ref:`🔗<class_RDTextureView_property_swizzle_b>` .. rst-class:: classref-property-setget -- void **set_swizzle_b** **(** :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` value **)** -- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_b** **(** **)** +- |void| **set_swizzle_b**\ (\ value\: :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>`\ ) +- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_b**\ (\ ) The channel to sample when sampling the blue color channel. @@ -105,12 +105,12 @@ The channel to sample when sampling the blue color channel. .. rst-class:: classref-property -:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_g** = ``4`` +:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_g** = ``4`` :ref:`🔗<class_RDTextureView_property_swizzle_g>` .. rst-class:: classref-property-setget -- void **set_swizzle_g** **(** :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` value **)** -- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_g** **(** **)** +- |void| **set_swizzle_g**\ (\ value\: :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>`\ ) +- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_g**\ (\ ) The channel to sample when sampling the green color channel. @@ -122,12 +122,12 @@ The channel to sample when sampling the green color channel. .. rst-class:: classref-property -:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_r** = ``3`` +:ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **swizzle_r** = ``3`` :ref:`🔗<class_RDTextureView_property_swizzle_r>` .. rst-class:: classref-property-setget -- void **set_swizzle_r** **(** :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` value **)** -- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_r** **(** **)** +- |void| **set_swizzle_r**\ (\ value\: :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>`\ ) +- :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwizzle>` **get_swizzle_r**\ (\ ) The channel to sample when sampling the red color channel. @@ -138,3 +138,4 @@ The channel to sample when sampling the red color channel. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rduniform.rst b/classes/class_rduniform.rst index 8d55f14a34e..e9f8c6f7cd9 100644 --- a/classes/class_rduniform.rst +++ b/classes/class_rduniform.rst @@ -43,13 +43,13 @@ Methods .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------+ - | void | :ref:`add_id<class_RDUniform_method_add_id>` **(** :ref:`RID<class_RID>` id **)** | - +-------------------------+-----------------------------------------------------------------------------------+ - | void | :ref:`clear_ids<class_RDUniform_method_clear_ids>` **(** **)** | - +-------------------------+-----------------------------------------------------------------------------------+ - | :ref:`RID[]<class_RID>` | :ref:`get_ids<class_RDUniform_method_get_ids>` **(** **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------+ + +----------------------------------------------------+--------------------------------------------------------------------------------+ + | |void| | :ref:`add_id<class_RDUniform_method_add_id>`\ (\ id\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------+--------------------------------------------------------------------------------+ + | |void| | :ref:`clear_ids<class_RDUniform_method_clear_ids>`\ (\ ) | + +----------------------------------------------------+--------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`get_ids<class_RDUniform_method_get_ids>`\ (\ ) |const| | + +----------------------------------------------------+--------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,12 +64,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **binding** = ``0`` +:ref:`int<class_int>` **binding** = ``0`` :ref:`🔗<class_RDUniform_property_binding>` .. rst-class:: classref-property-setget -- void **set_binding** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_binding** **(** **)** +- |void| **set_binding**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_binding**\ (\ ) The uniform's binding. @@ -81,12 +81,12 @@ The uniform's binding. .. rst-class:: classref-property -:ref:`UniformType<enum_RenderingDevice_UniformType>` **uniform_type** = ``3`` +:ref:`UniformType<enum_RenderingDevice_UniformType>` **uniform_type** = ``3`` :ref:`🔗<class_RDUniform_property_uniform_type>` .. rst-class:: classref-property-setget -- void **set_uniform_type** **(** :ref:`UniformType<enum_RenderingDevice_UniformType>` value **)** -- :ref:`UniformType<enum_RenderingDevice_UniformType>` **get_uniform_type** **(** **)** +- |void| **set_uniform_type**\ (\ value\: :ref:`UniformType<enum_RenderingDevice_UniformType>`\ ) +- :ref:`UniformType<enum_RenderingDevice_UniformType>` **get_uniform_type**\ (\ ) The uniform's data type. @@ -103,11 +103,9 @@ Method Descriptions .. rst-class:: classref-method -void **add_id** **(** :ref:`RID<class_RID>` id **)** +|void| **add_id**\ (\ id\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RDUniform_method_add_id>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Binds the given id to the uniform. The data associated with the id is then used when the uniform is passed to a shader. .. rst-class:: classref-item-separator @@ -117,11 +115,9 @@ void **add_id** **(** :ref:`RID<class_RID>` id **)** .. rst-class:: classref-method -void **clear_ids** **(** **)** - -.. container:: contribute +|void| **clear_ids**\ (\ ) :ref:`🔗<class_RDUniform_method_clear_ids>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Unbinds all ids currently bound to the uniform. .. rst-class:: classref-item-separator @@ -131,11 +127,9 @@ void **clear_ids** **(** **)** .. rst-class:: classref-method -:ref:`RID[]<class_RID>` **get_ids** **(** **)** |const| - -.. container:: contribute +:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_ids**\ (\ ) |const| :ref:`🔗<class_RDUniform_method_get_ids>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns an array of all ids currently bound to the uniform. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -144,3 +138,4 @@ void **clear_ids** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rdvertexattribute.rst b/classes/class_rdvertexattribute.rst index ec5f895ee2a..40e7d5b67f6 100644 --- a/classes/class_rdvertexattribute.rst +++ b/classes/class_rdvertexattribute.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``218`` +:ref:`DataFormat<enum_RenderingDevice_DataFormat>` **format** = ``218`` :ref:`🔗<class_RDVertexAttribute_property_format>` .. rst-class:: classref-property-setget -- void **set_format** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` value **)** -- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format** **(** **)** +- |void| **set_format**\ (\ value\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`\ ) +- :ref:`DataFormat<enum_RenderingDevice_DataFormat>` **get_format**\ (\ ) .. container:: contribute @@ -73,12 +73,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>` **frequency** = ``0`` +:ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>` **frequency** = ``0`` :ref:`🔗<class_RDVertexAttribute_property_frequency>` .. rst-class:: classref-property-setget -- void **set_frequency** **(** :ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>` value **)** -- :ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>` **get_frequency** **(** **)** +- |void| **set_frequency**\ (\ value\: :ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>`\ ) +- :ref:`VertexFrequency<enum_RenderingDevice_VertexFrequency>` **get_frequency**\ (\ ) .. container:: contribute @@ -92,12 +92,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **location** = ``0`` +:ref:`int<class_int>` **location** = ``0`` :ref:`🔗<class_RDVertexAttribute_property_location>` .. rst-class:: classref-property-setget -- void **set_location** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_location** **(** **)** +- |void| **set_location**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_location**\ (\ ) .. container:: contribute @@ -111,12 +111,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **offset** = ``0`` +:ref:`int<class_int>` **offset** = ``0`` :ref:`🔗<class_RDVertexAttribute_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_offset**\ (\ ) .. container:: contribute @@ -130,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **stride** = ``0`` +:ref:`int<class_int>` **stride** = ``0`` :ref:`🔗<class_RDVertexAttribute_property_stride>` .. rst-class:: classref-property-setget -- void **set_stride** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stride** **(** **)** +- |void| **set_stride**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stride**\ (\ ) .. container:: contribute @@ -148,3 +148,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rect2.rst b/classes/class_rect2.rst index 4a9f10bae1b..65d11ae327c 100644 --- a/classes/class_rect2.rst +++ b/classes/class_rect2.rst @@ -17,13 +17,13 @@ A 2D axis-aligned bounding box using floating-point coordinates. Description ----------- -**Rect2** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +The **Rect2** built-in :ref:`Variant<class_Variant>` type represents an axis-aligned rectangle in a 2D space. It is defined by its :ref:`position<class_Rect2_property_position>` and :ref:`size<class_Rect2_property_size>`, which are :ref:`Vector2<class_Vector2>`. It is frequently used for fast overlap tests (see :ref:`intersects<class_Rect2_method_intersects>`). Although **Rect2** itself is axis-aligned, it can be combined with :ref:`Transform2D<class_Transform2D>` to represent a rotated or skewed rectangle. -It uses floating-point coordinates. If you need integer coordinates, use :ref:`Rect2i<class_Rect2i>` instead. +For integer coordinates, use :ref:`Rect2i<class_Rect2i>`. The 3D equivalent to **Rect2** is :ref:`AABB<class_AABB>`. -The 3D counterpart to **Rect2** is :ref:`AABB<class_AABB>`. +\ **Note:** Negative values for :ref:`size<class_Rect2_property_size>` are not supported. With negative size, most **Rect2** methods do not work correctly. Use :ref:`abs<class_Rect2_method_abs>` to get an equivalent **Rect2** with a non-negative size. -Negative values for :ref:`size<class_Rect2_property_size>` are not supported and will not work for most methods. Use :ref:`abs<class_Rect2_method_abs>` to get a Rect2 with a positive size. +\ **Note:** In a boolean context, a **Rect2** evaluates to ``false`` if both :ref:`position<class_Rect2_property_position>` and :ref:`size<class_Rect2_property_size>` are zero (equal to :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`). Otherwise, it always evaluates to ``true``. .. note:: @@ -64,17 +64,17 @@ Constructors .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>` **(** **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>` **(** :ref:`Rect2<class_Rect2>` from **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>` **(** :ref:`Rect2i<class_Rect2i>` from **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>` **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` width, :ref:`float<class_float>` height **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>`\ (\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>`\ (\ from\: :ref:`Rect2<class_Rect2>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>`\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>`\ (\ position\: :ref:`Vector2<class_Vector2>`, size\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`Rect2<class_Rect2_constructor_Rect2>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, width\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -84,37 +84,37 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`abs<class_Rect2_method_abs>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`encloses<class_Rect2_method_encloses>` **(** :ref:`Rect2<class_Rect2>` b **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`expand<class_Rect2_method_expand>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_area<class_Rect2_method_get_area>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_center<class_Rect2_method_get_center>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`grow<class_Rect2_method_grow>` **(** :ref:`float<class_float>` amount **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`grow_individual<class_Rect2_method_grow_individual>` **(** :ref:`float<class_float>` left, :ref:`float<class_float>` top, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`grow_side<class_Rect2_method_grow_side>` **(** :ref:`int<class_int>` side, :ref:`float<class_float>` amount **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_area<class_Rect2_method_has_area>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_point<class_Rect2_method_has_point>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`intersection<class_Rect2_method_intersection>` **(** :ref:`Rect2<class_Rect2>` b **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`intersects<class_Rect2_method_intersects>` **(** :ref:`Rect2<class_Rect2>` b, :ref:`bool<class_bool>` include_borders=false **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Rect2_method_is_equal_approx>` **(** :ref:`Rect2<class_Rect2>` rect **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Rect2_method_is_finite>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`merge<class_Rect2_method_merge>` **(** :ref:`Rect2<class_Rect2>` b **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`abs<class_Rect2_method_abs>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`encloses<class_Rect2_method_encloses>`\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`expand<class_Rect2_method_expand>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_area<class_Rect2_method_get_area>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_center<class_Rect2_method_get_center>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`grow<class_Rect2_method_grow>`\ (\ amount\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`grow_individual<class_Rect2_method_grow_individual>`\ (\ left\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`grow_side<class_Rect2_method_grow_side>`\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_area<class_Rect2_method_has_area>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_point<class_Rect2_method_has_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`intersection<class_Rect2_method_intersection>`\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`intersects<class_Rect2_method_intersects>`\ (\ b\: :ref:`Rect2<class_Rect2>`, include_borders\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Rect2_method_is_equal_approx>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Rect2_method_is_finite>`\ (\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`merge<class_Rect2_method_merge>`\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| | + +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -124,13 +124,13 @@ Operators .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Rect2_operator_neq_Rect2>` **(** :ref:`Rect2<class_Rect2>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`operator *<class_Rect2_operator_mul_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Rect2_operator_eq_Rect2>` **(** :ref:`Rect2<class_Rect2>` right **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------+ + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Rect2_operator_neq_Rect2>`\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`operator *<class_Rect2_operator_mul_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Rect2_operator_eq_Rect2>`\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) | + +---------------------------+--------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -145,9 +145,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **end** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **end** = ``Vector2(0, 0)`` :ref:`🔗<class_Rect2_property_end>` -Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size<class_Rect2_property_size>`. .. rst-class:: classref-item-separator @@ -157,9 +157,9 @@ Ending corner. This is calculated as ``position + size``. Setting this value wil .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **position** = ``Vector2(0, 0)`` :ref:`🔗<class_Rect2_property_position>` -Beginning corner. Typically has values lower than :ref:`end<class_Rect2_property_end>`. +The origin point. This is usually the top-left corner of the rectangle. .. rst-class:: classref-item-separator @@ -169,11 +169,11 @@ Beginning corner. Typically has values lower than :ref:`end<class_Rect2_property .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(0, 0)`` :ref:`🔗<class_Rect2_property_size>` -Size from :ref:`position<class_Rect2_property_position>` to :ref:`end<class_Rect2_property_end>`. Typically, all components are positive. +The rectangle's width and height, starting from :ref:`position<class_Rect2_property_position>`. Setting this value also affects the :ref:`end<class_Rect2_property_end>` point. -If the size is negative, you can use :ref:`abs<class_Rect2_method_abs>` to fix it. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position<class_Rect2_property_position>` is the top-left corner, and the :ref:`end<class_Rect2_property_end>` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs<class_Rect2_method_abs>`. .. rst-class:: classref-section-separator @@ -188,9 +188,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Rect2<class_Rect2>` **Rect2** **(** **)** +:ref:`Rect2<class_Rect2>` **Rect2**\ (\ ) :ref:`🔗<class_Rect2_constructor_Rect2>` -Constructs a default-initialized **Rect2** with default (zero) values of :ref:`position<class_Rect2_property_position>` and :ref:`size<class_Rect2_property_size>`. +Constructs a **Rect2** with its :ref:`position<class_Rect2_property_position>` and :ref:`size<class_Rect2_property_size>` set to :ref:`Vector2.ZERO<class_Vector2_constant_ZERO>`. .. rst-class:: classref-item-separator @@ -198,7 +198,7 @@ Constructs a default-initialized **Rect2** with default (zero) values of :ref:`p .. rst-class:: classref-constructor -:ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`Rect2<class_Rect2>` from **)** +:ref:`Rect2<class_Rect2>` **Rect2**\ (\ from\: :ref:`Rect2<class_Rect2>`\ ) Constructs a **Rect2** as a copy of the given **Rect2**. @@ -208,7 +208,7 @@ Constructs a **Rect2** as a copy of the given **Rect2**. .. rst-class:: classref-constructor -:ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`Rect2i<class_Rect2i>` from **)** +:ref:`Rect2<class_Rect2>` **Rect2**\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ ) Constructs a **Rect2** from a :ref:`Rect2i<class_Rect2i>`. @@ -218,9 +218,9 @@ Constructs a **Rect2** from a :ref:`Rect2i<class_Rect2i>`. .. rst-class:: classref-constructor -:ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`Vector2<class_Vector2>` position, :ref:`Vector2<class_Vector2>` size **)** +:ref:`Rect2<class_Rect2>` **Rect2**\ (\ position\: :ref:`Vector2<class_Vector2>`, size\: :ref:`Vector2<class_Vector2>`\ ) -Constructs a **Rect2** by position and size. +Constructs a **Rect2** by ``position`` and ``size``. .. rst-class:: classref-item-separator @@ -228,9 +228,9 @@ Constructs a **Rect2** by position and size. .. rst-class:: classref-constructor -:ref:`Rect2<class_Rect2>` **Rect2** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` width, :ref:`float<class_float>` height **)** +:ref:`Rect2<class_Rect2>` **Rect2**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, width\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`\ ) -Constructs a **Rect2** by x, y, width, and height. +Constructs a **Rect2** by setting its :ref:`position<class_Rect2_property_position>` to (``x``, ``y``), and its :ref:`size<class_Rect2_property_size>` to (``width``, ``height``). .. rst-class:: classref-section-separator @@ -245,9 +245,26 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **abs** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **abs**\ (\ ) |const| :ref:`🔗<class_Rect2_method_abs>` -Returns a **Rect2** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. +Returns a **Rect2** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position<class_Rect2_property_position>` being the top-left corner of the rectangle. + + +.. tabs:: + + .. code-tab:: gdscript + + var rect = Rect2(25, 25, -100, -50) + var absolute = rect.abs() # absolute is Rect2(-75, -25, 100, 50) + + .. code-tab:: csharp + + var rect = new Rect2(25, 25, -100, -50); + var absolute = rect.Abs(); // absolute is Rect2(-75, -25, 100, 50) + + + +\ **Note:** It's recommended to use this method when :ref:`size<class_Rect2_property_size>` is negative, as most other methods in Godot assume that the :ref:`position<class_Rect2_property_position>` is the top-left corner, and the :ref:`end<class_Rect2_property_end>` is the bottom-right corner. .. rst-class:: classref-item-separator @@ -257,9 +274,9 @@ Returns a **Rect2** with equivalent position and area, modified so that the top- .. rst-class:: classref-method -:ref:`bool<class_bool>` **encloses** **(** :ref:`Rect2<class_Rect2>` b **)** |const| +:ref:`bool<class_bool>` **encloses**\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_Rect2_method_encloses>` -Returns ``true`` if this **Rect2** completely encloses another one. +Returns ``true`` if this rectangle *completely* encloses the ``b`` rectangle. .. rst-class:: classref-item-separator @@ -269,28 +286,26 @@ Returns ``true`` if this **Rect2** completely encloses another one. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **expand** **(** :ref:`Vector2<class_Vector2>` to **)** |const| - -Returns a copy of this **Rect2** expanded to include a given point. +:ref:`Rect2<class_Rect2>` **expand**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Rect2_method_expand>` -\ **Example:**\ +Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. .. tabs:: .. code-tab:: gdscript - # position (-3, 2), size (1, 1) - var rect = Rect2(Vector2(-3, 2), Vector2(1, 1)) - # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) - var rect2 = rect.expand(Vector2(0, -1)) + var rect = Rect2(0, 0, 5, 2) + + rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2) + rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5) .. code-tab:: csharp - // position (-3, 2), size (1, 1) - var rect = new Rect2(new Vector2(-3, 2), new Vector2(1, 1)); - // position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) - var rect2 = rect.Expand(new Vector2(0, -1)); + var rect = new Rect2(0, 0, 5, 2); + + rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2) + rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5) @@ -302,9 +317,9 @@ Returns a copy of this **Rect2** expanded to include a given point. .. rst-class:: classref-method -:ref:`float<class_float>` **get_area** **(** **)** |const| +:ref:`float<class_float>` **get_area**\ (\ ) |const| :ref:`🔗<class_Rect2_method_get_area>` -Returns the area of the **Rect2**. See also :ref:`has_area<class_Rect2_method_has_area>`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area<class_Rect2_method_has_area>`. .. rst-class:: classref-item-separator @@ -314,9 +329,9 @@ Returns the area of the **Rect2**. See also :ref:`has_area<class_Rect2_method_ha .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_center** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_center**\ (\ ) |const| :ref:`🔗<class_Rect2_method_get_center>` -Returns the center of the **Rect2**, which is equal to :ref:`position<class_Rect2_property_position>` + (:ref:`size<class_Rect2_property_size>` / 2). +Returns the center point of the rectangle. This is the same as ``position + (size / 2.0)``. .. rst-class:: classref-item-separator @@ -326,9 +341,24 @@ Returns the center of the **Rect2**, which is equal to :ref:`position<class_Rect .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **grow** **(** :ref:`float<class_float>` amount **)** |const| +:ref:`Rect2<class_Rect2>` **grow**\ (\ amount\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Rect2_method_grow>` + +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual<class_Rect2_method_grow_individual>` and :ref:`grow_side<class_Rect2_method_grow_side>`. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2(4, 4, 8, 8).grow(4) # a is Rect2(0, 0, 16, 16) + var b = Rect2(0, 0, 8, 4).grow(2) # b is Rect2(-2, -2, 12, 8) + + .. code-tab:: csharp + + var a = new Rect2(4, 4, 8, 8).Grow(4); // a is Rect2(0, 0, 16, 16) + var b = new Rect2(0, 0, 8, 4).Grow(2); // b is Rect2(-2, -2, 12, 8) + -Returns a copy of the **Rect2** grown by the specified ``amount`` on all sides. .. rst-class:: classref-item-separator @@ -338,9 +368,9 @@ Returns a copy of the **Rect2** grown by the specified ``amount`` on all sides. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **grow_individual** **(** :ref:`float<class_float>` left, :ref:`float<class_float>` top, :ref:`float<class_float>` right, :ref:`float<class_float>` bottom **)** |const| +:ref:`Rect2<class_Rect2>` **grow_individual**\ (\ left\: :ref:`float<class_float>`, top\: :ref:`float<class_float>`, right\: :ref:`float<class_float>`, bottom\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Rect2_method_grow_individual>` -Returns a copy of the **Rect2** grown by the specified amount on each side individually. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow<class_Rect2_method_grow>` and :ref:`grow_side<class_Rect2_method_grow_side>`. .. rst-class:: classref-item-separator @@ -350,9 +380,9 @@ Returns a copy of the **Rect2** grown by the specified amount on each side indiv .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **grow_side** **(** :ref:`int<class_int>` side, :ref:`float<class_float>` amount **)** |const| +:ref:`Rect2<class_Rect2>` **grow_side**\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Rect2_method_grow_side>` -Returns a copy of the **Rect2** grown by the specified ``amount`` on the specified :ref:`Side<enum_@GlobalScope_Side>`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side<enum_@GlobalScope_Side>` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow<class_Rect2_method_grow>` and :ref:`grow_individual<class_Rect2_method_grow_individual>`. .. rst-class:: classref-item-separator @@ -362,9 +392,9 @@ Returns a copy of the **Rect2** grown by the specified ``amount`` on the specifi .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_area** **(** **)** |const| +:ref:`bool<class_bool>` **has_area**\ (\ ) |const| :ref:`🔗<class_Rect2_method_has_area>` -Returns ``true`` if the **Rect2** has area, and ``false`` if the **Rect2** is linear, empty, or has a negative :ref:`size<class_Rect2_property_size>`. See also :ref:`get_area<class_Rect2_method_get_area>`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area<class_Rect2_method_get_area>`. .. rst-class:: classref-item-separator @@ -374,11 +404,11 @@ Returns ``true`` if the **Rect2** has area, and ``false`` if the **Rect2** is li .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_point** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`bool<class_bool>` **has_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Rect2_method_has_point>` -Returns ``true`` if the **Rect2** contains a point. By convention, the right and bottom edges of the **Rect2** are considered exclusive, so points on these edges are **not** included. +Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2** with a *negative size*. Use :ref:`abs<class_Rect2_method_abs>` to get a positive sized equivalent rectangle to check for contained points. +\ **Note:** This method is not reliable for **Rect2** with a *negative* :ref:`size<class_Rect2_property_size>`. Use :ref:`abs<class_Rect2_method_abs>` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -388,11 +418,30 @@ Returns ``true`` if the **Rect2** contains a point. By convention, the right and .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **intersection** **(** :ref:`Rect2<class_Rect2>` b **)** |const| +:ref:`Rect2<class_Rect2>` **intersection**\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_Rect2_method_intersection>` -Returns the intersection of this **Rect2** and ``b``. +Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2**. + + +.. tabs:: + + .. code-tab:: gdscript -If the rectangles do not intersect, an empty **Rect2** is returned. + var rect1 = Rect2(0, 0, 5, 10) + var rect2 = Rect2(2, 0, 8, 4) + + var a = rect1.intersection(rect2) # a is Rect2(2, 0, 3, 4) + + .. code-tab:: csharp + + var rect1 = new Rect2(0, 0, 5, 10); + var rect2 = new Rect2(2, 0, 8, 4); + + var a = rect1.Intersection(rect2); // a is Rect2(2, 0, 3, 4) + + + +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects<class_Rect2_method_intersects>`, instead. .. rst-class:: classref-item-separator @@ -402,11 +451,9 @@ If the rectangles do not intersect, an empty **Rect2** is returned. .. rst-class:: classref-method -:ref:`bool<class_bool>` **intersects** **(** :ref:`Rect2<class_Rect2>` b, :ref:`bool<class_bool>` include_borders=false **)** |const| - -Returns ``true`` if the **Rect2** overlaps with ``b`` (i.e. they have at least one point in common). +:ref:`bool<class_bool>` **intersects**\ (\ b\: :ref:`Rect2<class_Rect2>`, include_borders\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Rect2_method_intersects>` -If ``include_borders`` is ``true``, they will also be considered overlapping if their borders touch, even without intersection. +Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded, unless ``include_borders`` is ``true``. .. rst-class:: classref-item-separator @@ -416,9 +463,9 @@ If ``include_borders`` is ``true``, they will also be considered overlapping if .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Rect2<class_Rect2>` rect **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_Rect2_method_is_equal_approx>` -Returns ``true`` if this **Rect2** and ``rect`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this rectangle and ``rect`` are approximately equal, by calling :ref:`Vector2.is_equal_approx<class_Vector2_method_is_equal_approx>` on the :ref:`position<class_Rect2_property_position>` and the :ref:`size<class_Rect2_property_size>`. .. rst-class:: classref-item-separator @@ -428,9 +475,9 @@ Returns ``true`` if this **Rect2** and ``rect`` are approximately equal, by call .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Rect2_method_is_finite>` -Returns ``true`` if this **Rect2** is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. +Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2.is_finite<class_Vector2_method_is_finite>` on the :ref:`position<class_Rect2_property_position>` and the :ref:`size<class_Rect2_property_size>`. .. rst-class:: classref-item-separator @@ -440,9 +487,9 @@ Returns ``true`` if this **Rect2** is finite, by calling :ref:`@GlobalScope.is_f .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **merge** **(** :ref:`Rect2<class_Rect2>` b **)** |const| +:ref:`Rect2<class_Rect2>` **merge**\ (\ b\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_Rect2_method_merge>` -Returns a larger **Rect2** that contains this **Rect2** and ``b``. +Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses<class_Rect2_method_encloses>`. .. rst-class:: classref-section-separator @@ -457,9 +504,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Rect2<class_Rect2>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_Rect2_operator_neq_Rect2>` -Returns ``true`` if the rectangles are not equal. +Returns ``true`` if the :ref:`position<class_Rect2_property_position>` or :ref:`size<class_Rect2_property_size>` of both rectangles are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Rect2_method_is_equal_approx>` instead, which is more reliable. @@ -471,9 +518,13 @@ Returns ``true`` if the rectangles are not equal. .. rst-class:: classref-operator -:ref:`Rect2<class_Rect2>` **operator *** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`Rect2<class_Rect2>` **operator ***\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Rect2_operator_mul_Transform2D>` + +Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D<class_Transform2D>` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``rect * transform`` is equivalent to ``transform.inverse() * rect``. See :ref:`Transform2D.inverse<class_Transform2D_method_inverse>`. -Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D<class_Transform2D>` transformation matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * rect`` can be used instead. See :ref:`Transform2D.affine_inverse<class_Transform2D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -483,9 +534,9 @@ Inversely transforms (multiplies) the **Rect2** by the given :ref:`Transform2D<c .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Rect2<class_Rect2>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_Rect2_operator_eq_Rect2>` -Returns ``true`` if the rectangles are exactly equal. +Returns ``true`` if both :ref:`position<class_Rect2_property_position>` and :ref:`size<class_Rect2_property_size>` of the rectangles are exactly equal, respectively. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Rect2_method_is_equal_approx>` instead, which is more reliable. @@ -496,3 +547,4 @@ Returns ``true`` if the rectangles are exactly equal. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rect2i.rst b/classes/class_rect2i.rst index e161e72bac8..16e8d465649 100644 --- a/classes/class_rect2i.rst +++ b/classes/class_rect2i.rst @@ -17,11 +17,13 @@ A 2D axis-aligned bounding box using integer coordinates. Description ----------- -**Rect2i** consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. +The **Rect2i** built-in :ref:`Variant<class_Variant>` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>`, which are :ref:`Vector2i<class_Vector2i>`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects<class_Rect2i_method_intersects>`). -It uses integer coordinates. If you need floating-point coordinates, use :ref:`Rect2<class_Rect2>` instead. +For floating-point coordinates, see :ref:`Rect2<class_Rect2>`. -Negative values for :ref:`size<class_Rect2i_property_size>` are not supported and will not work for most methods. Use :ref:`abs<class_Rect2i_method_abs>` to get a Rect2i with a positive size. +\ **Note:** Negative values for :ref:`size<class_Rect2i_property_size>` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs<class_Rect2i_method_abs>` to get an equivalent **Rect2i** with a non-negative size. + +\ **Note:** In a boolean context, a **Rect2i** evaluates to ``false`` if both :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` are zero (equal to :ref:`Vector2i.ZERO<class_Vector2i_constant_ZERO>`). Otherwise, it always evaluates to ``true``. .. note:: @@ -60,17 +62,17 @@ Constructors .. table:: :widths: auto - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>` **(** **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>` **(** :ref:`Rect2i<class_Rect2i>` from **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>` **(** :ref:`Rect2<class_Rect2>` from **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ from\: :ref:`Rect2<class_Rect2>`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`Rect2i<class_Rect2i_constructor_Rect2i>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -80,33 +82,33 @@ Methods .. table:: :widths: auto - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`abs<class_Rect2i_method_abs>` **(** **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`encloses<class_Rect2i_method_encloses>` **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`expand<class_Rect2i_method_expand>` **(** :ref:`Vector2i<class_Vector2i>` to **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_area<class_Rect2i_method_get_area>` **(** **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_center<class_Rect2i_method_get_center>` **(** **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`grow<class_Rect2i_method_grow>` **(** :ref:`int<class_int>` amount **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_individual<class_Rect2i_method_grow_individual>` **(** :ref:`int<class_int>` left, :ref:`int<class_int>` top, :ref:`int<class_int>` right, :ref:`int<class_int>` bottom **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_side<class_Rect2i_method_grow_side>` **(** :ref:`int<class_int>` side, :ref:`int<class_int>` amount **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_area<class_Rect2i_method_has_area>` **(** **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_point<class_Rect2i_method_has_point>` **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`intersection<class_Rect2i_method_intersection>` **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`intersects<class_Rect2i_method_intersects>` **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`merge<class_Rect2i_method_merge>` **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`abs<class_Rect2i_method_abs>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`encloses<class_Rect2i_method_encloses>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`expand<class_Rect2i_method_expand>`\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_area<class_Rect2i_method_get_area>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_center<class_Rect2i_method_get_center>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`grow<class_Rect2i_method_grow>`\ (\ amount\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_individual<class_Rect2i_method_grow_individual>`\ (\ left\: :ref:`int<class_int>`, top\: :ref:`int<class_int>`, right\: :ref:`int<class_int>`, bottom\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`grow_side<class_Rect2i_method_grow_side>`\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_area<class_Rect2i_method_has_area>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_point<class_Rect2i_method_has_point>`\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`intersection<class_Rect2i_method_intersection>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`intersects<class_Rect2i_method_intersects>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`merge<class_Rect2i_method_merge>`\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -116,11 +118,11 @@ Operators .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Rect2i_operator_neq_Rect2i>` **(** :ref:`Rect2i<class_Rect2i>` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Rect2i_operator_eq_Rect2i>` **(** :ref:`Rect2i<class_Rect2i>` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Rect2i_operator_neq_Rect2i>`\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Rect2i_operator_eq_Rect2i>`\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -135,9 +137,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **end** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **end** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_end>` -Ending corner. This is calculated as ``position + size``. Setting this value will change the size. +The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size<class_Rect2i_property_size>`. .. rst-class:: classref-item-separator @@ -147,9 +149,9 @@ Ending corner. This is calculated as ``position + size``. Setting this value wil .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_position>` -Beginning corner. Typically has values lower than :ref:`end<class_Rect2i_property_end>`. +The origin point. This is usually the top-left corner of the rectangle. .. rst-class:: classref-item-separator @@ -159,11 +161,11 @@ Beginning corner. Typically has values lower than :ref:`end<class_Rect2i_propert .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Rect2i_property_size>` -Size from :ref:`position<class_Rect2i_property_position>` to :ref:`end<class_Rect2i_property_end>`. Typically, all components are positive. +The rectangle's width and height, starting from :ref:`position<class_Rect2i_property_position>`. Setting this value also affects the :ref:`end<class_Rect2i_property_end>` point. -If the size is negative, you can use :ref:`abs<class_Rect2i_method_abs>` to fix it. +\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position<class_Rect2i_property_position>` is the top-left corner, and the :ref:`end<class_Rect2i_property_end>` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs<class_Rect2i_method_abs>`. .. rst-class:: classref-section-separator @@ -178,9 +180,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Rect2i<class_Rect2i>` **Rect2i** **(** **)** +:ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ ) :ref:`🔗<class_Rect2i_constructor_Rect2i>` -Constructs a default-initialized **Rect2i** with default (zero) values of :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>`. +Constructs a **Rect2i** with its :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` set to :ref:`Vector2i.ZERO<class_Vector2i_constant_ZERO>`. .. rst-class:: classref-item-separator @@ -188,7 +190,7 @@ Constructs a default-initialized **Rect2i** with default (zero) values of :ref:` .. rst-class:: classref-constructor -:ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Rect2i<class_Rect2i>` from **)** +:ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ from\: :ref:`Rect2i<class_Rect2i>`\ ) Constructs a **Rect2i** as a copy of the given **Rect2i**. @@ -198,9 +200,9 @@ Constructs a **Rect2i** as a copy of the given **Rect2i**. .. rst-class:: classref-constructor -:ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Rect2<class_Rect2>` from **)** +:ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ from\: :ref:`Rect2<class_Rect2>`\ ) -Constructs a new **Rect2i** from :ref:`Rect2<class_Rect2>`. The floating point coordinates will be truncated. +Constructs a **Rect2i** from a :ref:`Rect2<class_Rect2>`. The floating-point coordinates are truncated. .. rst-class:: classref-item-separator @@ -208,9 +210,9 @@ Constructs a new **Rect2i** from :ref:`Rect2<class_Rect2>`. The floating point c .. rst-class:: classref-constructor -:ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`Vector2i<class_Vector2i>` size **)** +:ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) -Constructs a **Rect2i** by position and size. +Constructs a **Rect2i** by ``position`` and ``size``. .. rst-class:: classref-item-separator @@ -218,9 +220,9 @@ Constructs a **Rect2i** by position and size. .. rst-class:: classref-constructor -:ref:`Rect2i<class_Rect2i>` **Rect2i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** +:ref:`Rect2i<class_Rect2i>` **Rect2i**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) -Constructs a **Rect2i** by x, y, width, and height. +Constructs a **Rect2i** by setting its :ref:`position<class_Rect2i_property_position>` to (``x``, ``y``), and its :ref:`size<class_Rect2i_property_size>` to (``width``, ``height``). .. rst-class:: classref-section-separator @@ -235,9 +237,26 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **abs** **(** **)** |const| +:ref:`Rect2i<class_Rect2i>` **abs**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_abs>` + +Returns a **Rect2i** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position<class_Rect2i_property_position>` being the top-left corner of the rectangle. + + +.. tabs:: + + .. code-tab:: gdscript + + var rect = Rect2i(25, 25, -100, -50) + var absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50) + + .. code-tab:: csharp + + var rect = new Rect2I(25, 25, -100, -50); + var absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50) + -Returns a **Rect2i** with equivalent position and area, modified so that the top-left corner is the origin and ``width`` and ``height`` are positive. + +\ **Note:** It's recommended to use this method when :ref:`size<class_Rect2i_property_size>` is negative, as most other methods in Godot assume that the :ref:`position<class_Rect2i_property_position>` is the top-left corner, and the :ref:`end<class_Rect2i_property_end>` is the bottom-right corner. .. rst-class:: classref-item-separator @@ -247,7 +266,7 @@ Returns a **Rect2i** with equivalent position and area, modified so that the top .. rst-class:: classref-method -:ref:`bool<class_bool>` **encloses** **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| +:ref:`bool<class_bool>` **encloses**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_encloses>` Returns ``true`` if this **Rect2i** completely encloses another one. @@ -259,26 +278,26 @@ Returns ``true`` if this **Rect2i** completely encloses another one. .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **expand** **(** :ref:`Vector2i<class_Vector2i>` to **)** |const| +:ref:`Rect2i<class_Rect2i>` **expand**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_expand>` -Returns a copy of this **Rect2i** expanded so that the borders align with the given point. +Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. .. tabs:: .. code-tab:: gdscript - # position (-3, 2), size (1, 1) - var rect = Rect2i(Vector2i(-3, 2), Vector2i(1, 1)) - # position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1) - var rect2 = rect.expand(Vector2i(0, -1)) + var rect = Rect2i(0, 0, 5, 2) + + rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2) + rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5) .. code-tab:: csharp - // position (-3, 2), size (1, 1) - var rect = new Rect2I(new Vector2I(-3, 2), new Vector2I(1, 1)); - // position (-3, -1), size (3, 4), so we fit both rect and Vector2I(0, -1) - var rect2 = rect.Expand(new Vector2I(0, -1)); + var rect = new Rect2I(0, 0, 5, 2); + + rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2) + rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5) @@ -290,9 +309,9 @@ Returns a copy of this **Rect2i** expanded so that the borders align with the gi .. rst-class:: classref-method -:ref:`int<class_int>` **get_area** **(** **)** |const| +:ref:`int<class_int>` **get_area**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_get_area>` -Returns the area of the **Rect2i**. See also :ref:`has_area<class_Rect2i_method_has_area>`. +Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area<class_Rect2i_method_has_area>`. .. rst-class:: classref-item-separator @@ -302,11 +321,11 @@ Returns the area of the **Rect2i**. See also :ref:`has_area<class_Rect2i_method_ .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_center** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_center**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_get_center>` -Returns the center of the **Rect2i**, which is equal to :ref:`position<class_Rect2i_property_position>` + (:ref:`size<class_Rect2i_property_size>` / 2). +Returns the center point of the rectangle. This is the same as ``position + (size / 2)``. -If :ref:`size<class_Rect2i_property_size>` is an odd number, the returned center value will be rounded towards :ref:`position<class_Rect2i_property_position>`. +\ **Note:** If the :ref:`size<class_Rect2i_property_size>` is odd, the result will be rounded towards :ref:`position<class_Rect2i_property_position>`. .. rst-class:: classref-item-separator @@ -316,9 +335,24 @@ If :ref:`size<class_Rect2i_property_size>` is an odd number, the returned center .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **grow** **(** :ref:`int<class_int>` amount **)** |const| +:ref:`Rect2i<class_Rect2i>` **grow**\ (\ amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow>` + +Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual<class_Rect2i_method_grow_individual>` and :ref:`grow_side<class_Rect2i_method_grow_side>`. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16) + var b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8) + + .. code-tab:: csharp + + var a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16) + var b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8) + -Returns a copy of the **Rect2i** grown by the specified ``amount`` on all sides. .. rst-class:: classref-item-separator @@ -328,9 +362,9 @@ Returns a copy of the **Rect2i** grown by the specified ``amount`` on all sides. .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **grow_individual** **(** :ref:`int<class_int>` left, :ref:`int<class_int>` top, :ref:`int<class_int>` right, :ref:`int<class_int>` bottom **)** |const| +:ref:`Rect2i<class_Rect2i>` **grow_individual**\ (\ left\: :ref:`int<class_int>`, top\: :ref:`int<class_int>`, right\: :ref:`int<class_int>`, bottom\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow_individual>` -Returns a copy of the **Rect2i** grown by the specified amount on each side individually. +Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow<class_Rect2i_method_grow>` and :ref:`grow_side<class_Rect2i_method_grow_side>`. .. rst-class:: classref-item-separator @@ -340,9 +374,9 @@ Returns a copy of the **Rect2i** grown by the specified amount on each side indi .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **grow_side** **(** :ref:`int<class_int>` side, :ref:`int<class_int>` amount **)** |const| +:ref:`Rect2i<class_Rect2i>` **grow_side**\ (\ side\: :ref:`int<class_int>`, amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Rect2i_method_grow_side>` -Returns a copy of the **Rect2i** grown by the specified ``amount`` on the specified :ref:`Side<enum_@GlobalScope_Side>`. +Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side<enum_@GlobalScope_Side>` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow<class_Rect2i_method_grow>` and :ref:`grow_individual<class_Rect2i_method_grow_individual>`. .. rst-class:: classref-item-separator @@ -352,9 +386,9 @@ Returns a copy of the **Rect2i** grown by the specified ``amount`` on the specif .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_area** **(** **)** |const| +:ref:`bool<class_bool>` **has_area**\ (\ ) |const| :ref:`🔗<class_Rect2i_method_has_area>` -Returns ``true`` if the **Rect2i** has area, and ``false`` if the **Rect2i** is linear, empty, or has a negative :ref:`size<class_Rect2i_property_size>`. See also :ref:`get_area<class_Rect2i_method_get_area>`. +Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area<class_Rect2i_method_get_area>`. .. rst-class:: classref-item-separator @@ -364,11 +398,11 @@ Returns ``true`` if the **Rect2i** has area, and ``false`` if the **Rect2i** is .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_point** **(** :ref:`Vector2i<class_Vector2i>` point **)** |const| +:ref:`bool<class_bool>` **has_point**\ (\ point\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_has_point>` -Returns ``true`` if the **Rect2i** contains a point. By convention, the right and bottom edges of the **Rect2i** are considered exclusive, so points on these edges are **not** included. +Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. -\ **Note:** This method is not reliable for **Rect2i** with a *negative size*. Use :ref:`abs<class_Rect2i_method_abs>` to get a positive sized equivalent rectangle to check for contained points. +\ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size<class_Rect2i_property_size>`. Use :ref:`abs<class_Rect2i_method_abs>` first to get a valid rectangle. .. rst-class:: classref-item-separator @@ -378,11 +412,30 @@ Returns ``true`` if the **Rect2i** contains a point. By convention, the right an .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **intersection** **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| +:ref:`Rect2i<class_Rect2i>` **intersection**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_intersection>` + +Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2i**. + + +.. tabs:: + + .. code-tab:: gdscript + + var a = Rect2i(0, 0, 5, 10) + var b = Rect2i(2, 0, 8, 4) + + var c = a.intersection(b) # c is Rect2i(2, 0, 3, 4) + + .. code-tab:: csharp + + var a = new Rect2I(0, 0, 5, 10); + var b = new Rect2I(2, 0, 8, 4); + + var c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4) + -Returns the intersection of this **Rect2i** and ``b``. -If the rectangles do not intersect, an empty **Rect2i** is returned. +\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects<class_Rect2i_method_intersects>`, instead. .. rst-class:: classref-item-separator @@ -392,9 +445,9 @@ If the rectangles do not intersect, an empty **Rect2i** is returned. .. rst-class:: classref-method -:ref:`bool<class_bool>` **intersects** **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| +:ref:`bool<class_bool>` **intersects**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_intersects>` -Returns ``true`` if the **Rect2i** overlaps with ``b`` (i.e. they have at least one point in common). +Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded. .. rst-class:: classref-item-separator @@ -404,9 +457,9 @@ Returns ``true`` if the **Rect2i** overlaps with ``b`` (i.e. they have at least .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **merge** **(** :ref:`Rect2i<class_Rect2i>` b **)** |const| +:ref:`Rect2i<class_Rect2i>` **merge**\ (\ b\: :ref:`Rect2i<class_Rect2i>`\ ) |const| :ref:`🔗<class_Rect2i_method_merge>` -Returns a larger **Rect2i** that contains this **Rect2i** and ``b``. +Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses<class_Rect2i_method_encloses>`. .. rst-class:: classref-section-separator @@ -421,9 +474,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Rect2i<class_Rect2i>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Rect2i_operator_neq_Rect2i>` -Returns ``true`` if the rectangles are not equal. +Returns ``true`` if the :ref:`position<class_Rect2i_property_position>` or :ref:`size<class_Rect2i_property_size>` of both rectangles are not equal. .. rst-class:: classref-item-separator @@ -433,9 +486,9 @@ Returns ``true`` if the rectangles are not equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Rect2i<class_Rect2i>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Rect2i_operator_eq_Rect2i>` -Returns ``true`` if the rectangles are equal. +Returns ``true`` if both :ref:`position<class_Rect2i_property_position>` and :ref:`size<class_Rect2i_property_size>` of the rectangles are equal, respectively. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -444,3 +497,4 @@ Returns ``true`` if the rectangles are equal. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rectangleshape2d.rst b/classes/class_rectangleshape2d.rst index 0cd2a575b5a..941b35d5a54 100644 --- a/classes/class_rectangleshape2d.rst +++ b/classes/class_rectangleshape2d.rst @@ -28,9 +28,9 @@ A 2D rectangle shape, intended for use in physics. Usually used to provide a sha Tutorials --------- -- `2D Pong Demo <https://godotengine.org/asset-library/asset/121>`__ +- `2D Pong Demo <https://godotengine.org/asset-library/asset/2728>`__ -- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__ +- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2719>`__ .. rst-class:: classref-reftable-group @@ -57,12 +57,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(20, 20)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(20, 20)`` :ref:`🔗<class_RectangleShape2D_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size**\ (\ ) The rectangle's width and height. @@ -73,3 +73,4 @@ The rectangle's width and height. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_refcounted.rst b/classes/class_refcounted.rst index 26e68eca81b..fefdffe9bce 100644 --- a/classes/class_refcounted.rst +++ b/classes/class_refcounted.rst @@ -12,7 +12,7 @@ RefCounted **Inherits:** :ref:`Object<class_Object>` -**Inherited By:** :ref:`AESContext<class_AESContext>`, :ref:`AStar2D<class_AStar2D>`, :ref:`AStar3D<class_AStar3D>`, :ref:`AStarGrid2D<class_AStarGrid2D>`, :ref:`AudioEffectInstance<class_AudioEffectInstance>`, :ref:`AudioStreamPlayback<class_AudioStreamPlayback>`, :ref:`CameraFeed<class_CameraFeed>`, :ref:`CharFXTransform<class_CharFXTransform>`, :ref:`ConfigFile<class_ConfigFile>`, :ref:`Crypto<class_Crypto>`, :ref:`DirAccess<class_DirAccess>`, :ref:`DTLSServer<class_DTLSServer>`, :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`, :ref:`EditorDebuggerSession<class_EditorDebuggerSession>`, :ref:`EditorExportPlatform<class_EditorExportPlatform>`, :ref:`EditorExportPlugin<class_EditorExportPlugin>`, :ref:`EditorFeatureProfile<class_EditorFeatureProfile>`, :ref:`EditorFileSystemImportFormatSupportQuery<class_EditorFileSystemImportFormatSupportQuery>`, :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`, :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`, :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`, :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`, :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, :ref:`EditorScenePostImport<class_EditorScenePostImport>`, :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, :ref:`EditorScript<class_EditorScript>`, :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`, :ref:`EncodedObjectAsID<class_EncodedObjectAsID>`, :ref:`ENetConnection<class_ENetConnection>`, :ref:`EngineProfiler<class_EngineProfiler>`, :ref:`Expression<class_Expression>`, :ref:`FileAccess<class_FileAccess>`, :ref:`HashingContext<class_HashingContext>`, :ref:`HMACContext<class_HMACContext>`, :ref:`HTTPClient<class_HTTPClient>`, :ref:`ImageFormatLoader<class_ImageFormatLoader>`, :ref:`JavaClass<class_JavaClass>`, :ref:`JavaScriptObject<class_JavaScriptObject>`, :ref:`KinematicCollision2D<class_KinematicCollision2D>`, :ref:`KinematicCollision3D<class_KinematicCollision3D>`, :ref:`Lightmapper<class_Lightmapper>`, :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>`, :ref:`MeshDataTool<class_MeshDataTool>`, :ref:`MultiplayerAPI<class_MultiplayerAPI>`, :ref:`Mutex<class_Mutex>`, :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>`, :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>`, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`, :ref:`Node3DGizmo<class_Node3DGizmo>`, :ref:`OggPacketSequencePlayback<class_OggPacketSequencePlayback>`, :ref:`PackedDataContainerRef<class_PackedDataContainerRef>`, :ref:`PacketPeer<class_PacketPeer>`, :ref:`PCKPacker<class_PCKPacker>`, :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>`, :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>`, :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>`, :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>`, :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>`, :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>`, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>`, :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>`, :ref:`RandomNumberGenerator<class_RandomNumberGenerator>`, :ref:`RDAttachmentFormat<class_RDAttachmentFormat>`, :ref:`RDFramebufferPass<class_RDFramebufferPass>`, :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>`, :ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`, :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>`, :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>`, :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>`, :ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`, :ref:`RDSamplerState<class_RDSamplerState>`, :ref:`RDShaderSource<class_RDShaderSource>`, :ref:`RDTextureFormat<class_RDTextureFormat>`, :ref:`RDTextureView<class_RDTextureView>`, :ref:`RDUniform<class_RDUniform>`, :ref:`RDVertexAttribute<class_RDVertexAttribute>`, :ref:`RegEx<class_RegEx>`, :ref:`RegExMatch<class_RegExMatch>`, :ref:`Resource<class_Resource>`, :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`, :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`, :ref:`ResourceImporter<class_ResourceImporter>`, :ref:`SceneState<class_SceneState>`, :ref:`SceneTreeTimer<class_SceneTreeTimer>`, :ref:`Semaphore<class_Semaphore>`, :ref:`SkinReference<class_SkinReference>`, :ref:`StreamPeer<class_StreamPeer>`, :ref:`SurfaceTool<class_SurfaceTool>`, :ref:`TCPServer<class_TCPServer>`, :ref:`TextLine<class_TextLine>`, :ref:`TextParagraph<class_TextParagraph>`, :ref:`TextServer<class_TextServer>`, :ref:`Thread<class_Thread>`, :ref:`TLSOptions<class_TLSOptions>`, :ref:`TriangleMesh<class_TriangleMesh>`, :ref:`Tween<class_Tween>`, :ref:`Tweener<class_Tweener>`, :ref:`UDPServer<class_UDPServer>`, :ref:`UPNP<class_UPNP>`, :ref:`UPNPDevice<class_UPNPDevice>`, :ref:`WeakRef<class_WeakRef>`, :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>`, :ref:`XMLParser<class_XMLParser>`, :ref:`XRInterface<class_XRInterface>`, :ref:`XRPose<class_XRPose>`, :ref:`XRPositionalTracker<class_XRPositionalTracker>`, :ref:`ZIPPacker<class_ZIPPacker>`, :ref:`ZIPReader<class_ZIPReader>` +**Inherited By:** :ref:`AESContext<class_AESContext>`, :ref:`AStar2D<class_AStar2D>`, :ref:`AStar3D<class_AStar3D>`, :ref:`AStarGrid2D<class_AStarGrid2D>`, :ref:`AudioEffectInstance<class_AudioEffectInstance>`, :ref:`AudioSample<class_AudioSample>`, :ref:`AudioSamplePlayback<class_AudioSamplePlayback>`, :ref:`AudioStreamPlayback<class_AudioStreamPlayback>`, :ref:`CameraFeed<class_CameraFeed>`, :ref:`CharFXTransform<class_CharFXTransform>`, :ref:`ConfigFile<class_ConfigFile>`, :ref:`Crypto<class_Crypto>`, :ref:`DirAccess<class_DirAccess>`, :ref:`DTLSServer<class_DTLSServer>`, :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`, :ref:`EditorDebuggerSession<class_EditorDebuggerSession>`, :ref:`EditorExportPlatform<class_EditorExportPlatform>`, :ref:`EditorExportPlugin<class_EditorExportPlugin>`, :ref:`EditorFeatureProfile<class_EditorFeatureProfile>`, :ref:`EditorFileSystemImportFormatSupportQuery<class_EditorFileSystemImportFormatSupportQuery>`, :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`, :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`, :ref:`EditorResourcePreviewGenerator<class_EditorResourcePreviewGenerator>`, :ref:`EditorResourceTooltipPlugin<class_EditorResourceTooltipPlugin>`, :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, :ref:`EditorScenePostImport<class_EditorScenePostImport>`, :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, :ref:`EditorScript<class_EditorScript>`, :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`, :ref:`EncodedObjectAsID<class_EncodedObjectAsID>`, :ref:`ENetConnection<class_ENetConnection>`, :ref:`EngineProfiler<class_EngineProfiler>`, :ref:`Expression<class_Expression>`, :ref:`FileAccess<class_FileAccess>`, :ref:`HashingContext<class_HashingContext>`, :ref:`HMACContext<class_HMACContext>`, :ref:`HTTPClient<class_HTTPClient>`, :ref:`ImageFormatLoader<class_ImageFormatLoader>`, :ref:`JavaClass<class_JavaClass>`, :ref:`JavaScriptObject<class_JavaScriptObject>`, :ref:`KinematicCollision2D<class_KinematicCollision2D>`, :ref:`KinematicCollision3D<class_KinematicCollision3D>`, :ref:`Lightmapper<class_Lightmapper>`, :ref:`MeshConvexDecompositionSettings<class_MeshConvexDecompositionSettings>`, :ref:`MeshDataTool<class_MeshDataTool>`, :ref:`MultiplayerAPI<class_MultiplayerAPI>`, :ref:`Mutex<class_Mutex>`, :ref:`NavigationPathQueryParameters2D<class_NavigationPathQueryParameters2D>`, :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>`, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`, :ref:`Node3DGizmo<class_Node3DGizmo>`, :ref:`OggPacketSequencePlayback<class_OggPacketSequencePlayback>`, :ref:`OpenXRAPIExtension<class_OpenXRAPIExtension>`, :ref:`PackedDataContainerRef<class_PackedDataContainerRef>`, :ref:`PacketPeer<class_PacketPeer>`, :ref:`PCKPacker<class_PCKPacker>`, :ref:`PhysicsPointQueryParameters2D<class_PhysicsPointQueryParameters2D>`, :ref:`PhysicsPointQueryParameters3D<class_PhysicsPointQueryParameters3D>`, :ref:`PhysicsRayQueryParameters2D<class_PhysicsRayQueryParameters2D>`, :ref:`PhysicsRayQueryParameters3D<class_PhysicsRayQueryParameters3D>`, :ref:`PhysicsShapeQueryParameters2D<class_PhysicsShapeQueryParameters2D>`, :ref:`PhysicsShapeQueryParameters3D<class_PhysicsShapeQueryParameters3D>`, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>`, :ref:`PhysicsTestMotionParameters3D<class_PhysicsTestMotionParameters3D>`, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>`, :ref:`PhysicsTestMotionResult3D<class_PhysicsTestMotionResult3D>`, :ref:`RandomNumberGenerator<class_RandomNumberGenerator>`, :ref:`RDAttachmentFormat<class_RDAttachmentFormat>`, :ref:`RDFramebufferPass<class_RDFramebufferPass>`, :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>`, :ref:`RDPipelineColorBlendStateAttachment<class_RDPipelineColorBlendStateAttachment>`, :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>`, :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>`, :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>`, :ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`, :ref:`RDSamplerState<class_RDSamplerState>`, :ref:`RDShaderSource<class_RDShaderSource>`, :ref:`RDTextureFormat<class_RDTextureFormat>`, :ref:`RDTextureView<class_RDTextureView>`, :ref:`RDUniform<class_RDUniform>`, :ref:`RDVertexAttribute<class_RDVertexAttribute>`, :ref:`RegEx<class_RegEx>`, :ref:`RegExMatch<class_RegExMatch>`, :ref:`RenderSceneBuffers<class_RenderSceneBuffers>`, :ref:`RenderSceneBuffersConfiguration<class_RenderSceneBuffersConfiguration>`, :ref:`Resource<class_Resource>`, :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`, :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`, :ref:`ResourceImporter<class_ResourceImporter>`, :ref:`SceneState<class_SceneState>`, :ref:`SceneTreeTimer<class_SceneTreeTimer>`, :ref:`Semaphore<class_Semaphore>`, :ref:`SkinReference<class_SkinReference>`, :ref:`StreamPeer<class_StreamPeer>`, :ref:`SurfaceTool<class_SurfaceTool>`, :ref:`TCPServer<class_TCPServer>`, :ref:`TextLine<class_TextLine>`, :ref:`TextParagraph<class_TextParagraph>`, :ref:`TextServer<class_TextServer>`, :ref:`Thread<class_Thread>`, :ref:`TLSOptions<class_TLSOptions>`, :ref:`TriangleMesh<class_TriangleMesh>`, :ref:`Tween<class_Tween>`, :ref:`Tweener<class_Tweener>`, :ref:`UDPServer<class_UDPServer>`, :ref:`UPNP<class_UPNP>`, :ref:`UPNPDevice<class_UPNPDevice>`, :ref:`WeakRef<class_WeakRef>`, :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>`, :ref:`XMLParser<class_XMLParser>`, :ref:`XRInterface<class_XRInterface>`, :ref:`XRPose<class_XRPose>`, :ref:`XRTracker<class_XRTracker>`, :ref:`ZIPPacker<class_ZIPPacker>`, :ref:`ZIPReader<class_ZIPReader>` Base class for reference-counted objects. @@ -25,9 +25,11 @@ Base class for any object that keeps a reference count. :ref:`Resource<class_Res Unlike other :ref:`Object<class_Object>` types, **RefCounted**\ s keep an internal reference counter so that they are automatically released when no longer in use, and only then. **RefCounted**\ s therefore do not need to be freed manually with :ref:`Object.free<class_Object_method_free>`. +\ **RefCounted** instances caught in a cyclic reference will **not** be freed automatically. For example, if a node holds a reference to instance ``A``, which directly or indirectly holds a reference back to ``A``, ``A``'s reference count will be 2. Destruction of the node will leave ``A`` dangling with a reference count of 1, and there will be a memory leak. To prevent this, one of the references in the cycle can be made weak with :ref:`@GlobalScope.weakref<class_@GlobalScope_method_weakref>`. + In the vast majority of use cases, instantiating and using **RefCounted**-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. -\ **Note:** In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will linger on for a while before being removed. +\ **Note:** In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will remain in memory for a while before being removed. .. rst-class:: classref-introduction-group @@ -44,15 +46,15 @@ Methods .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_reference_count<class_RefCounted_method_get_reference_count>` **(** **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`init_ref<class_RefCounted_method_init_ref>` **(** **)** | - +-------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`reference<class_RefCounted_method_reference>` **(** **)** | - +-------------------------+---------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`unreference<class_RefCounted_method_unreference>` **(** **)** | - +-------------------------+---------------------------------------------------------------------------------------------+ + +-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_reference_count<class_RefCounted_method_get_reference_count>`\ (\ ) |const| | + +-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`init_ref<class_RefCounted_method_init_ref>`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`reference<class_RefCounted_method_reference>`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`unreference<class_RefCounted_method_unreference>`\ (\ ) | + +-------------------------+---------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,7 +69,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_reference_count** **(** **)** |const| +:ref:`int<class_int>` **get_reference_count**\ (\ ) |const| :ref:`🔗<class_RefCounted_method_get_reference_count>` Returns the current reference count. @@ -79,7 +81,7 @@ Returns the current reference count. .. rst-class:: classref-method -:ref:`bool<class_bool>` **init_ref** **(** **)** +:ref:`bool<class_bool>` **init_ref**\ (\ ) :ref:`🔗<class_RefCounted_method_init_ref>` Initializes the internal reference counter. Use this only if you really know what you are doing. @@ -93,7 +95,7 @@ Returns whether the initialization was successful. .. rst-class:: classref-method -:ref:`bool<class_bool>` **reference** **(** **)** +:ref:`bool<class_bool>` **reference**\ (\ ) :ref:`🔗<class_RefCounted_method_reference>` Increments the internal reference counter. Use this only if you really know what you are doing. @@ -107,11 +109,11 @@ Returns ``true`` if the increment was successful, ``false`` otherwise. .. rst-class:: classref-method -:ref:`bool<class_bool>` **unreference** **(** **)** +:ref:`bool<class_bool>` **unreference**\ (\ ) :ref:`🔗<class_RefCounted_method_unreference>` Decrements the internal reference counter. Use this only if you really know what you are doing. -Returns ``true`` if the decrement was successful, ``false`` otherwise. +Returns ``true`` if the object should be freed after the decrement, ``false`` otherwise. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -120,3 +122,4 @@ Returns ``true`` if the decrement was successful, ``false`` otherwise. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_referencerect.rst b/classes/class_referencerect.rst index 87391532a05..7f0adfa020f 100644 --- a/classes/class_referencerect.rst +++ b/classes/class_referencerect.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **border_color** = ``Color(1, 0, 0, 1)`` +:ref:`Color<class_Color>` **border_color** = ``Color(1, 0, 0, 1)`` :ref:`🔗<class_ReferenceRect_property_border_color>` .. rst-class:: classref-property-setget -- void **set_border_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_border_color** **(** **)** +- |void| **set_border_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_border_color**\ (\ ) Sets the border color of the **ReferenceRect**. @@ -67,12 +67,12 @@ Sets the border color of the **ReferenceRect**. .. rst-class:: classref-property -:ref:`float<class_float>` **border_width** = ``1.0`` +:ref:`float<class_float>` **border_width** = ``1.0`` :ref:`🔗<class_ReferenceRect_property_border_width>` .. rst-class:: classref-property-setget -- void **set_border_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_border_width** **(** **)** +- |void| **set_border_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_border_width**\ (\ ) Sets the border width of the **ReferenceRect**. The border grows both inwards and outwards with respect to the rectangle box. @@ -84,12 +84,12 @@ Sets the border width of the **ReferenceRect**. The border grows both inwards an .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor_only** = ``true`` +:ref:`bool<class_bool>` **editor_only** = ``true`` :ref:`🔗<class_ReferenceRect_property_editor_only>` .. rst-class:: classref-property-setget -- void **set_editor_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_editor_only** **(** **)** +- |void| **set_editor_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_editor_only**\ (\ ) If ``true``, the **ReferenceRect** will only be visible while in editor. Otherwise, **ReferenceRect** will be visible in the running project. @@ -100,3 +100,4 @@ If ``true``, the **ReferenceRect** will only be visible while in editor. Otherwi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_reflectionprobe.rst b/classes/class_reflectionprobe.rst index 78e9391ca9c..237adc3ec81 100644 --- a/classes/class_reflectionprobe.rst +++ b/classes/class_reflectionprobe.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: environment, envmap + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -67,6 +70,8 @@ Properties +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`origin_offset<class_ReflectionProbe_property_origin_offset>` | ``Vector3(0, 0, 0)`` | +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ + | :ref:`int<class_int>` | :ref:`reflection_mask<class_ReflectionProbe_property_reflection_mask>` | ``1048575`` | + +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`size<class_ReflectionProbe_property_size>` | ``Vector3(20, 20, 20)`` | +------------------------------------------------------+----------------------------------------------------------------------------------+-------------------------+ | :ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` | :ref:`update_mode<class_ReflectionProbe_property_update_mode>` | ``0`` | @@ -85,7 +90,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **UpdateMode**: +enum **UpdateMode**: :ref:`🔗<enum_ReflectionProbe_UpdateMode>` .. _class_ReflectionProbe_constant_UPDATE_ONCE: @@ -111,7 +116,7 @@ Update the probe every frame. This provides better results for fast-moving dynam .. rst-class:: classref-enumeration -enum **AmbientMode**: +enum **AmbientMode**: :ref:`🔗<enum_ReflectionProbe_AmbientMode>` .. _class_ReflectionProbe_constant_AMBIENT_DISABLED: @@ -150,12 +155,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **ambient_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **ambient_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ReflectionProbe_property_ambient_color>` .. rst-class:: classref-property-setget -- void **set_ambient_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_ambient_color** **(** **)** +- |void| **set_ambient_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_ambient_color**\ (\ ) The custom ambient color to use within the **ReflectionProbe**'s box defined by its :ref:`size<class_ReflectionProbe_property_size>`. Only effective if :ref:`ambient_mode<class_ReflectionProbe_property_ambient_mode>` is :ref:`AMBIENT_COLOR<class_ReflectionProbe_constant_AMBIENT_COLOR>`. @@ -167,12 +172,12 @@ The custom ambient color to use within the **ReflectionProbe**'s box defined by .. rst-class:: classref-property -:ref:`float<class_float>` **ambient_color_energy** = ``1.0`` +:ref:`float<class_float>` **ambient_color_energy** = ``1.0`` :ref:`🔗<class_ReflectionProbe_property_ambient_color_energy>` .. rst-class:: classref-property-setget -- void **set_ambient_color_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_ambient_color_energy** **(** **)** +- |void| **set_ambient_color_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_ambient_color_energy**\ (\ ) The custom ambient color energy to use within the **ReflectionProbe**'s box defined by its :ref:`size<class_ReflectionProbe_property_size>`. Only effective if :ref:`ambient_mode<class_ReflectionProbe_property_ambient_mode>` is :ref:`AMBIENT_COLOR<class_ReflectionProbe_constant_AMBIENT_COLOR>`. @@ -184,12 +189,12 @@ The custom ambient color energy to use within the **ReflectionProbe**'s box defi .. rst-class:: classref-property -:ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>` **ambient_mode** = ``1`` +:ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>` **ambient_mode** = ``1`` :ref:`🔗<class_ReflectionProbe_property_ambient_mode>` .. rst-class:: classref-property-setget -- void **set_ambient_mode** **(** :ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>` value **)** -- :ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>` **get_ambient_mode** **(** **)** +- |void| **set_ambient_mode**\ (\ value\: :ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>`\ ) +- :ref:`AmbientMode<enum_ReflectionProbe_AmbientMode>` **get_ambient_mode**\ (\ ) The ambient color to use within the **ReflectionProbe**'s box defined by its :ref:`size<class_ReflectionProbe_property_size>`. The ambient color will smoothly blend with other **ReflectionProbe**\ s and the rest of the scene (outside the **ReflectionProbe**'s box defined by its :ref:`size<class_ReflectionProbe_property_size>`). @@ -201,12 +206,12 @@ The ambient color to use within the **ReflectionProbe**'s box defined by its :re .. rst-class:: classref-property -:ref:`bool<class_bool>` **box_projection** = ``false`` +:ref:`bool<class_bool>` **box_projection** = ``false`` :ref:`🔗<class_ReflectionProbe_property_box_projection>` .. rst-class:: classref-property-setget -- void **set_enable_box_projection** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_box_projection_enabled** **(** **)** +- |void| **set_enable_box_projection**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_box_projection_enabled**\ (\ ) If ``true``, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. @@ -220,14 +225,16 @@ If ``true``, enables box projection. This makes reflections look more correct in .. rst-class:: classref-property -:ref:`int<class_int>` **cull_mask** = ``1048575`` +:ref:`int<class_int>` **cull_mask** = ``1048575`` :ref:`🔗<class_ReflectionProbe_property_cull_mask>` .. rst-class:: classref-property-setget -- void **set_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_cull_mask** **(** **)** +- |void| **set_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_cull_mask**\ (\ ) -Sets the cull mask which determines what objects are drawn by this probe. Every :ref:`VisualInstance3D<class_VisualInstance3D>` with a layer included in this cull mask will be rendered by the probe. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection. +Sets the cull mask which determines what objects are drawn by this probe. Every :ref:`VisualInstance3D<class_VisualInstance3D>` with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. + +This can also be used to prevent an object from reflecting upon itself (for instance, a **ReflectionProbe** centered on a vehicle). .. rst-class:: classref-item-separator @@ -237,12 +244,12 @@ Sets the cull mask which determines what objects are drawn by this probe. Every .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_shadows** = ``false`` +:ref:`bool<class_bool>` **enable_shadows** = ``false`` :ref:`🔗<class_ReflectionProbe_property_enable_shadows>` .. rst-class:: classref-property-setget -- void **set_enable_shadows** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **are_shadows_enabled** **(** **)** +- |void| **set_enable_shadows**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **are_shadows_enabled**\ (\ ) If ``true``, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the :ref:`UPDATE_ALWAYS<class_ReflectionProbe_constant_UPDATE_ALWAYS>` :ref:`update_mode<class_ReflectionProbe_property_update_mode>`. @@ -254,12 +261,12 @@ If ``true``, computes shadows in the reflection probe. This makes the reflection .. rst-class:: classref-property -:ref:`float<class_float>` **intensity** = ``1.0`` +:ref:`float<class_float>` **intensity** = ``1.0`` :ref:`🔗<class_ReflectionProbe_property_intensity>` .. rst-class:: classref-property-setget -- void **set_intensity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_intensity** **(** **)** +- |void| **set_intensity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_intensity**\ (\ ) Defines the reflection intensity. Intensity modulates the strength of the reflection. @@ -271,12 +278,12 @@ Defines the reflection intensity. Intensity modulates the strength of the reflec .. rst-class:: classref-property -:ref:`bool<class_bool>` **interior** = ``false`` +:ref:`bool<class_bool>` **interior** = ``false`` :ref:`🔗<class_ReflectionProbe_property_interior>` .. rst-class:: classref-property-setget -- void **set_as_interior** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_set_as_interior** **(** **)** +- |void| **set_as_interior**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_set_as_interior**\ (\ ) If ``true``, reflections will ignore sky contribution. @@ -288,12 +295,12 @@ If ``true``, reflections will ignore sky contribution. .. rst-class:: classref-property -:ref:`float<class_float>` **max_distance** = ``0.0`` +:ref:`float<class_float>` **max_distance** = ``0.0`` :ref:`🔗<class_ReflectionProbe_property_max_distance>` .. rst-class:: classref-property-setget -- void **set_max_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max_distance** **(** **)** +- |void| **set_max_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max_distance**\ (\ ) The maximum distance away from the **ReflectionProbe** an object can be before it is culled. Decrease this to improve performance, especially when using the :ref:`UPDATE_ALWAYS<class_ReflectionProbe_constant_UPDATE_ALWAYS>` :ref:`update_mode<class_ReflectionProbe_property_update_mode>`. @@ -307,12 +314,12 @@ The maximum distance away from the **ReflectionProbe** an object can be before i .. rst-class:: classref-property -:ref:`float<class_float>` **mesh_lod_threshold** = ``1.0`` +:ref:`float<class_float>` **mesh_lod_threshold** = ``1.0`` :ref:`🔗<class_ReflectionProbe_property_mesh_lod_threshold>` .. rst-class:: classref-property-setget -- void **set_mesh_lod_threshold** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mesh_lod_threshold** **(** **)** +- |void| **set_mesh_lod_threshold**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mesh_lod_threshold**\ (\ ) The automatic LOD bias to use for meshes rendered within the **ReflectionProbe** (this is analog to :ref:`Viewport.mesh_lod_threshold<class_Viewport_property_mesh_lod_threshold>`). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to ``0.0``, automatic LOD is disabled. Increase :ref:`mesh_lod_threshold<class_ReflectionProbe_property_mesh_lod_threshold>` to improve performance at the cost of geometry detail, especially when using the :ref:`UPDATE_ALWAYS<class_ReflectionProbe_constant_UPDATE_ALWAYS>` :ref:`update_mode<class_ReflectionProbe_property_update_mode>`. @@ -326,12 +333,12 @@ The automatic LOD bias to use for meshes rendered within the **ReflectionProbe** .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **origin_offset** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **origin_offset** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ReflectionProbe_property_origin_offset>` .. rst-class:: classref-property-setget -- void **set_origin_offset** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_origin_offset** **(** **)** +- |void| **set_origin_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_origin_offset**\ (\ ) Sets the origin offset to be used when this **ReflectionProbe** is in :ref:`box_projection<class_ReflectionProbe_property_box_projection>` mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection. @@ -339,16 +346,33 @@ Sets the origin offset to be used when this **ReflectionProbe** is in :ref:`box_ ---- +.. _class_ReflectionProbe_property_reflection_mask: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **reflection_mask** = ``1048575`` :ref:`🔗<class_ReflectionProbe_property_reflection_mask>` + +.. rst-class:: classref-property-setget + +- |void| **set_reflection_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_reflection_mask**\ (\ ) + +Sets the reflection mask which determines what objects have reflections applied from this probe. Every :ref:`VisualInstance3D<class_VisualInstance3D>` with a layer included in this reflection mask will have reflections applied from this probe. See also :ref:`cull_mask<class_ReflectionProbe_property_cull_mask>`, which can be used to exclude objects from appearing in the reflection while still making them affected by the **ReflectionProbe**. + +.. rst-class:: classref-item-separator + +---- + .. _class_ReflectionProbe_property_size: .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(20, 20, 20)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(20, 20, 20)`` :ref:`🔗<class_ReflectionProbe_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The size of the reflection probe. The larger the size, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the size only as large as you need it. @@ -362,12 +386,12 @@ The size of the reflection probe. The larger the size, the more space covered by .. rst-class:: classref-property -:ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` **update_mode** = ``0`` +:ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` **update_mode** = ``0`` :ref:`🔗<class_ReflectionProbe_property_update_mode>` .. rst-class:: classref-property-setget -- void **set_update_mode** **(** :ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` value **)** -- :ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` **get_update_mode** **(** **)** +- |void| **set_update_mode**\ (\ value\: :ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>`\ ) +- :ref:`UpdateMode<enum_ReflectionProbe_UpdateMode>` **get_update_mode**\ (\ ) Sets how frequently the **ReflectionProbe** is updated. Can be :ref:`UPDATE_ONCE<class_ReflectionProbe_constant_UPDATE_ONCE>` or :ref:`UPDATE_ALWAYS<class_ReflectionProbe_constant_UPDATE_ALWAYS>`. @@ -378,3 +402,4 @@ Sets how frequently the **ReflectionProbe** is updated. Can be :ref:`UPDATE_ONCE .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_regex.rst b/classes/class_regex.rst index 19574c3c12e..57368a09e3c 100644 --- a/classes/class_regex.rst +++ b/classes/class_regex.rst @@ -28,7 +28,7 @@ To begin, the RegEx object needs to be compiled with the search pattern using :r var regex = RegEx.new() regex.compile("\\w-(\\d+)") -The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. +The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. In GDScript, you can also use raw string literals (r-strings). For example, ``compile(r'"(?:\\.|[^"])*"')`` would be read the same. Using :ref:`search<class_RegEx_method_search>`, you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch<class_RegExMatch>` is returned and you can retrieve details of the results using methods such as :ref:`RegExMatch.get_string<class_RegExMatch_method_get_string>` and :ref:`RegExMatch.get_start<class_RegExMatch_method_get_start>`. @@ -83,27 +83,27 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_RegEx_method_clear>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compile<class_RegEx_method_compile>` **(** :ref:`String<class_String>` pattern **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RegEx<class_RegEx>` | :ref:`create_from_string<class_RegEx_method_create_from_string>` **(** :ref:`String<class_String>` pattern **)** |static| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_group_count<class_RegEx_method_get_group_count>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_names<class_RegEx_method_get_names>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_pattern<class_RegEx_method_get_pattern>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid<class_RegEx_method_is_valid>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RegExMatch<class_RegExMatch>` | :ref:`search<class_RegEx_method_search>` **(** :ref:`String<class_String>` subject, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RegExMatch[]<class_RegExMatch>` | :ref:`search_all<class_RegEx_method_search_all>` **(** :ref:`String<class_String>` subject, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`sub<class_RegEx_method_sub>` **(** :ref:`String<class_String>` subject, :ref:`String<class_String>` replacement, :ref:`bool<class_bool>` all=false, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_RegEx_method_clear>`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`compile<class_RegEx_method_compile>`\ (\ pattern\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RegEx<class_RegEx>` | :ref:`create_from_string<class_RegEx_method_create_from_string>`\ (\ pattern\: :ref:`String<class_String>`\ ) |static| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_group_count<class_RegEx_method_get_group_count>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_names<class_RegEx_method_get_names>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_pattern<class_RegEx_method_get_pattern>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid<class_RegEx_method_is_valid>`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RegExMatch<class_RegExMatch>` | :ref:`search<class_RegEx_method_search>`\ (\ subject\: :ref:`String<class_String>`, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`RegExMatch<class_RegExMatch>`\] | :ref:`search_all<class_RegEx_method_search_all>`\ (\ subject\: :ref:`String<class_String>`, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`sub<class_RegEx_method_sub>`\ (\ subject\: :ref:`String<class_String>`, replacement\: :ref:`String<class_String>`, all\: :ref:`bool<class_bool>` = false, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -118,7 +118,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_RegEx_method_clear>` This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. @@ -130,7 +130,7 @@ This method resets the state of the object, as if it was freshly created. Namely .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **compile** **(** :ref:`String<class_String>` pattern **)** +:ref:`Error<enum_@GlobalScope_Error>` **compile**\ (\ pattern\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RegEx_method_compile>` Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. @@ -142,7 +142,7 @@ Compiles and assign the search pattern to use. Returns :ref:`@GlobalScope.OK<cla .. rst-class:: classref-method -:ref:`RegEx<class_RegEx>` **create_from_string** **(** :ref:`String<class_String>` pattern **)** |static| +:ref:`RegEx<class_RegEx>` **create_from_string**\ (\ pattern\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_RegEx_method_create_from_string>` Creates and compiles a new **RegEx** object. @@ -154,7 +154,7 @@ Creates and compiles a new **RegEx** object. .. rst-class:: classref-method -:ref:`int<class_int>` **get_group_count** **(** **)** |const| +:ref:`int<class_int>` **get_group_count**\ (\ ) |const| :ref:`🔗<class_RegEx_method_get_group_count>` Returns the number of capturing groups in compiled pattern. @@ -166,7 +166,7 @@ Returns the number of capturing groups in compiled pattern. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_names** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_names**\ (\ ) |const| :ref:`🔗<class_RegEx_method_get_names>` Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. @@ -178,7 +178,7 @@ Returns an array of names of named capturing groups in the compiled pattern. The .. rst-class:: classref-method -:ref:`String<class_String>` **get_pattern** **(** **)** |const| +:ref:`String<class_String>` **get_pattern**\ (\ ) |const| :ref:`🔗<class_RegEx_method_get_pattern>` Returns the original search pattern that was compiled. @@ -190,7 +190,7 @@ Returns the original search pattern that was compiled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid**\ (\ ) |const| :ref:`🔗<class_RegEx_method_is_valid>` Returns whether this object has a valid search pattern assigned. @@ -202,7 +202,7 @@ Returns whether this object has a valid search pattern assigned. .. rst-class:: classref-method -:ref:`RegExMatch<class_RegExMatch>` **search** **(** :ref:`String<class_String>` subject, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| +:ref:`RegExMatch<class_RegExMatch>` **search**\ (\ subject\: :ref:`String<class_String>`, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_RegEx_method_search>` Searches the text for the compiled pattern. Returns a :ref:`RegExMatch<class_RegExMatch>` container of the first matching result if found, otherwise ``null``. @@ -216,7 +216,7 @@ The region to search within can be specified with ``offset`` and ``end``. This i .. rst-class:: classref-method -:ref:`RegExMatch[]<class_RegExMatch>` **search_all** **(** :ref:`String<class_String>` subject, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| +:ref:`Array<class_Array>`\[:ref:`RegExMatch<class_RegExMatch>`\] **search_all**\ (\ subject\: :ref:`String<class_String>`, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_RegEx_method_search_all>` Searches the text for the compiled pattern. Returns an array of :ref:`RegExMatch<class_RegExMatch>` containers for each non-overlapping result. If no results were found, an empty array is returned instead. @@ -230,7 +230,7 @@ The region to search within can be specified with ``offset`` and ``end``. This i .. rst-class:: classref-method -:ref:`String<class_String>` **sub** **(** :ref:`String<class_String>` subject, :ref:`String<class_String>` replacement, :ref:`bool<class_bool>` all=false, :ref:`int<class_int>` offset=0, :ref:`int<class_int>` end=-1 **)** |const| +:ref:`String<class_String>` **sub**\ (\ subject\: :ref:`String<class_String>`, replacement\: :ref:`String<class_String>`, all\: :ref:`bool<class_bool>` = false, offset\: :ref:`int<class_int>` = 0, end\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_RegEx_method_sub>` Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as ``$1`` and ``$name`` are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). @@ -243,3 +243,4 @@ The region to search within can be specified with ``offset`` and ``end``. This i .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_regexmatch.rst b/classes/class_regexmatch.rst index 50ac6471aa7..9237e156b30 100644 --- a/classes/class_regexmatch.rst +++ b/classes/class_regexmatch.rst @@ -45,15 +45,15 @@ Methods .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_end<class_RegExMatch_method_get_end>` **(** :ref:`Variant<class_Variant>` name=0 **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_group_count<class_RegExMatch_method_get_group_count>` **(** **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_start<class_RegExMatch_method_get_start>` **(** :ref:`Variant<class_Variant>` name=0 **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string<class_RegExMatch_method_get_string>` **(** :ref:`Variant<class_Variant>` name=0 **)** |const| | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + +-----------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_end<class_RegExMatch_method_get_end>`\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_group_count<class_RegExMatch_method_get_group_count>`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_start<class_RegExMatch_method_get_start>`\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string<class_RegExMatch_method_get_string>`\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,11 +68,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **names** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **names** = ``{}`` :ref:`🔗<class_RegExMatch_property_names>` .. rst-class:: classref-property-setget -- :ref:`Dictionary<class_Dictionary>` **get_names** **(** **)** +- :ref:`Dictionary<class_Dictionary>` **get_names**\ (\ ) A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. @@ -84,14 +84,16 @@ A dictionary of named groups and its corresponding group number. Only groups tha .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **strings** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **strings** = ``PackedStringArray()`` :ref:`🔗<class_RegExMatch_property_strings>` .. rst-class:: classref-property-setget -- :ref:`PackedStringArray<class_PackedStringArray>` **get_strings** **(** **)** +- :ref:`PackedStringArray<class_PackedStringArray>` **get_strings**\ (\ ) An :ref:`Array<class_Array>` of the match and its capturing groups. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -100,11 +102,11 @@ An :ref:`Array<class_Array>` of the match and its capturing groups. .. rst-class:: classref-property -:ref:`String<class_String>` **subject** = ``""`` +:ref:`String<class_String>` **subject** = ``""`` :ref:`🔗<class_RegExMatch_property_subject>` .. rst-class:: classref-property-setget -- :ref:`String<class_String>` **get_subject** **(** **)** +- :ref:`String<class_String>` **get_subject**\ (\ ) The source string used with the search pattern to find this matching result. @@ -121,7 +123,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_end** **(** :ref:`Variant<class_Variant>` name=0 **)** |const| +:ref:`int<class_int>` **get_end**\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| :ref:`🔗<class_RegExMatch_method_get_end>` Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. @@ -135,7 +137,7 @@ Returns -1 if the group did not match or doesn't exist. .. rst-class:: classref-method -:ref:`int<class_int>` **get_group_count** **(** **)** |const| +:ref:`int<class_int>` **get_group_count**\ (\ ) |const| :ref:`🔗<class_RegExMatch_method_get_group_count>` Returns the number of capturing groups. @@ -147,7 +149,7 @@ Returns the number of capturing groups. .. rst-class:: classref-method -:ref:`int<class_int>` **get_start** **(** :ref:`Variant<class_Variant>` name=0 **)** |const| +:ref:`int<class_int>` **get_start**\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| :ref:`🔗<class_RegExMatch_method_get_start>` Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. @@ -161,7 +163,7 @@ Returns -1 if the group did not match or doesn't exist. .. rst-class:: classref-method -:ref:`String<class_String>` **get_string** **(** :ref:`Variant<class_Variant>` name=0 **)** |const| +:ref:`String<class_String>` **get_string**\ (\ name\: :ref:`Variant<class_Variant>` = 0\ ) |const| :ref:`🔗<class_RegExMatch_method_get_string>` Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. @@ -174,3 +176,4 @@ Returns an empty string if the group did not match or doesn't exist. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_remotetransform2d.rst b/classes/class_remotetransform2d.rst index 447d030177f..7ffe32e0a97 100644 --- a/classes/class_remotetransform2d.rst +++ b/classes/class_remotetransform2d.rst @@ -51,9 +51,9 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_cache<class_RemoteTransform2D_method_force_update_cache>` **(** **)** | - +------+------------------------------------------------------------------------------------------+ + +--------+------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_cache<class_RemoteTransform2D_method_force_update_cache>`\ (\ ) | + +--------+------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **remote_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **remote_path** = ``NodePath("")`` :ref:`🔗<class_RemoteTransform2D_property_remote_path>` .. rst-class:: classref-property-setget -- void **set_remote_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_remote_node** **(** **)** +- |void| **set_remote_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_remote_node**\ (\ ) The :ref:`NodePath<class_NodePath>` to the remote node, relative to the RemoteTransform2D's position in the scene. @@ -85,12 +85,12 @@ The :ref:`NodePath<class_NodePath>` to the remote node, relative to the RemoteTr .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_position** = ``true`` +:ref:`bool<class_bool>` **update_position** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_position>` .. rst-class:: classref-property-setget -- void **set_update_position** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_position** **(** **)** +- |void| **set_update_position**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_position**\ (\ ) If ``true``, the remote node's position is updated. @@ -102,12 +102,12 @@ If ``true``, the remote node's position is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_rotation** = ``true`` +:ref:`bool<class_bool>` **update_rotation** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_rotation>` .. rst-class:: classref-property-setget -- void **set_update_rotation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_rotation** **(** **)** +- |void| **set_update_rotation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_rotation**\ (\ ) If ``true``, the remote node's rotation is updated. @@ -119,12 +119,12 @@ If ``true``, the remote node's rotation is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_scale** = ``true`` +:ref:`bool<class_bool>` **update_scale** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_update_scale>` .. rst-class:: classref-property-setget -- void **set_update_scale** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_scale** **(** **)** +- |void| **set_update_scale**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_scale**\ (\ ) If ``true``, the remote node's scale is updated. @@ -136,12 +136,12 @@ If ``true``, the remote node's scale is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_global_coordinates** = ``true`` +:ref:`bool<class_bool>` **use_global_coordinates** = ``true`` :ref:`🔗<class_RemoteTransform2D_property_use_global_coordinates>` .. rst-class:: classref-property-setget -- void **set_use_global_coordinates** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_global_coordinates** **(** **)** +- |void| **set_use_global_coordinates**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_global_coordinates**\ (\ ) If ``true``, global coordinates are used. If ``false``, local coordinates are used. @@ -158,7 +158,7 @@ Method Descriptions .. rst-class:: classref-method -void **force_update_cache** **(** **)** +|void| **force_update_cache**\ (\ ) :ref:`🔗<class_RemoteTransform2D_method_force_update_cache>` **RemoteTransform2D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache<class_RemoteTransform2D_method_force_update_cache>` forces it to update the cache again. @@ -169,3 +169,4 @@ void **force_update_cache** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_remotetransform3d.rst b/classes/class_remotetransform3d.rst index 99e84d52e17..552885263f9 100644 --- a/classes/class_remotetransform3d.rst +++ b/classes/class_remotetransform3d.rst @@ -51,9 +51,9 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_cache<class_RemoteTransform3D_method_force_update_cache>` **(** **)** | - +------+------------------------------------------------------------------------------------------+ + +--------+------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_cache<class_RemoteTransform3D_method_force_update_cache>`\ (\ ) | + +--------+------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **remote_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **remote_path** = ``NodePath("")`` :ref:`🔗<class_RemoteTransform3D_property_remote_path>` .. rst-class:: classref-property-setget -- void **set_remote_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_remote_node** **(** **)** +- |void| **set_remote_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_remote_node**\ (\ ) The :ref:`NodePath<class_NodePath>` to the remote node, relative to the RemoteTransform3D's position in the scene. @@ -85,12 +85,12 @@ The :ref:`NodePath<class_NodePath>` to the remote node, relative to the RemoteTr .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_position** = ``true`` +:ref:`bool<class_bool>` **update_position** = ``true`` :ref:`🔗<class_RemoteTransform3D_property_update_position>` .. rst-class:: classref-property-setget -- void **set_update_position** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_position** **(** **)** +- |void| **set_update_position**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_position**\ (\ ) If ``true``, the remote node's position is updated. @@ -102,12 +102,12 @@ If ``true``, the remote node's position is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_rotation** = ``true`` +:ref:`bool<class_bool>` **update_rotation** = ``true`` :ref:`🔗<class_RemoteTransform3D_property_update_rotation>` .. rst-class:: classref-property-setget -- void **set_update_rotation** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_rotation** **(** **)** +- |void| **set_update_rotation**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_rotation**\ (\ ) If ``true``, the remote node's rotation is updated. @@ -119,12 +119,12 @@ If ``true``, the remote node's rotation is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_scale** = ``true`` +:ref:`bool<class_bool>` **update_scale** = ``true`` :ref:`🔗<class_RemoteTransform3D_property_update_scale>` .. rst-class:: classref-property-setget -- void **set_update_scale** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_scale** **(** **)** +- |void| **set_update_scale**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_scale**\ (\ ) If ``true``, the remote node's scale is updated. @@ -136,12 +136,12 @@ If ``true``, the remote node's scale is updated. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_global_coordinates** = ``true`` +:ref:`bool<class_bool>` **use_global_coordinates** = ``true`` :ref:`🔗<class_RemoteTransform3D_property_use_global_coordinates>` .. rst-class:: classref-property-setget -- void **set_use_global_coordinates** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_global_coordinates** **(** **)** +- |void| **set_use_global_coordinates**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_global_coordinates**\ (\ ) If ``true``, global coordinates are used. If ``false``, local coordinates are used. @@ -158,7 +158,7 @@ Method Descriptions .. rst-class:: classref-method -void **force_update_cache** **(** **)** +|void| **force_update_cache**\ (\ ) :ref:`🔗<class_RemoteTransform3D_method_force_update_cache>` **RemoteTransform3D** caches the remote node. It may not notice if the remote node disappears; :ref:`force_update_cache<class_RemoteTransform3D_method_force_update_cache>` forces it to update the cache again. @@ -169,3 +169,4 @@ void **force_update_cache** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderdata.rst b/classes/class_renderdata.rst new file mode 100644 index 00000000000..93637848228 --- /dev/null +++ b/classes/class_renderdata.rst @@ -0,0 +1,106 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderData.xml. + +.. _class_RenderData: + +RenderData +========== + +**Inherits:** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`RenderDataExtension<class_RenderDataExtension>`, :ref:`RenderDataRD<class_RenderDataRD>` + +Abstract render data object, holds frame data related to rendering a single frame of a viewport. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Abstract render data object, exists for the duration of rendering a single viewport. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_camera_attributes<class_RenderData_method_get_camera_attributes>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_environment<class_RenderData_method_get_environment>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` | :ref:`get_render_scene_buffers<class_RenderData_method_get_render_scene_buffers>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`RenderSceneData<class_RenderSceneData>` | :ref:`get_render_scene_data<class_RenderData_method_get_render_scene_data>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderData_method_get_camera_attributes: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_camera_attributes**\ (\ ) |const| :ref:`🔗<class_RenderData_method_get_camera_attributes>` + +Returns the :ref:`RID<class_RID>` of the camera attributes object in the :ref:`RenderingServer<class_RenderingServer>` being used to render this viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderData_method_get_environment: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_environment**\ (\ ) |const| :ref:`🔗<class_RenderData_method_get_environment>` + +Returns the :ref:`RID<class_RID>` of the environments object in the :ref:`RenderingServer<class_RenderingServer>` being used to render this viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderData_method_get_render_scene_buffers: + +.. rst-class:: classref-method + +:ref:`RenderSceneBuffers<class_RenderSceneBuffers>` **get_render_scene_buffers**\ (\ ) |const| :ref:`🔗<class_RenderData_method_get_render_scene_buffers>` + +Returns the :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` object managing the scene buffers for rendering this viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderData_method_get_render_scene_data: + +.. rst-class:: classref-method + +:ref:`RenderSceneData<class_RenderSceneData>` **get_render_scene_data**\ (\ ) |const| :ref:`🔗<class_RenderData_method_get_render_scene_data>` + +Returns the :ref:`RenderSceneData<class_RenderSceneData>` object managing this frames scene data. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderdataextension.rst b/classes/class_renderdataextension.rst new file mode 100644 index 00000000000..c90e048a60a --- /dev/null +++ b/classes/class_renderdataextension.rst @@ -0,0 +1,104 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderDataExtension.xml. + +.. _class_RenderDataExtension: + +RenderDataExtension +=================== + +**Inherits:** :ref:`RenderData<class_RenderData>` **<** :ref:`Object<class_Object>` + +This class allows for a RenderData implementation to be made in GDExtension. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class allows for a RenderData implementation to be made in GDExtension. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_camera_attributes<class_RenderDataExtension_private_method__get_camera_attributes>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_environment<class_RenderDataExtension_private_method__get_environment>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` | :ref:`_get_render_scene_buffers<class_RenderDataExtension_private_method__get_render_scene_buffers>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderSceneData<class_RenderSceneData>` | :ref:`_get_render_scene_data<class_RenderDataExtension_private_method__get_render_scene_data>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderDataExtension_private_method__get_camera_attributes: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **_get_camera_attributes**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderDataExtension_private_method__get_camera_attributes>` + +Implement this in GDExtension to return the :ref:`RID<class_RID>` for the implementations camera attributes object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderDataExtension_private_method__get_environment: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **_get_environment**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderDataExtension_private_method__get_environment>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderDataExtension_private_method__get_render_scene_buffers: + +.. rst-class:: classref-method + +:ref:`RenderSceneBuffers<class_RenderSceneBuffers>` **_get_render_scene_buffers**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderDataExtension_private_method__get_render_scene_buffers>` + +Implement this in GDExtension to return the :ref:`RID<class_RID>` of the implementations environment object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderDataExtension_private_method__get_render_scene_data: + +.. rst-class:: classref-method + +:ref:`RenderSceneData<class_RenderSceneData>` **_get_render_scene_data**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderDataExtension_private_method__get_render_scene_data>` + +Implement this in GDExtension to return the implementations :ref:`RenderSceneDataExtension<class_RenderSceneDataExtension>` object. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderdatard.rst b/classes/class_renderdatard.rst new file mode 100644 index 00000000000..02f36a9d959 --- /dev/null +++ b/classes/class_renderdatard.rst @@ -0,0 +1,35 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderDataRD.xml. + +.. _class_RenderDataRD: + +RenderDataRD +============ + +**Inherits:** :ref:`RenderData<class_RenderData>` **<** :ref:`Object<class_Object>` + +Render data implementation for the RenderingDevice based renderers. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This object manages all render data for the rendering device based renderers. + +\ **Note:** This is an internal rendering server object only exposed for GDExtension plugins. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 8d259ad543e..bb7434a72d5 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -34,7 +34,7 @@ On startup, Godot creates a global **RenderingDevice** which can be retrieved us Tutorials --------- -- `Using compute shaders <https://docs.godotengine.org/en/latest/tutorials/shaders/compute_shaders.html>`__ +- :doc:`Using compute shaders <../tutorials/shaders/compute_shaders>` .. rst-class:: classref-reftable-group @@ -44,193 +44,203 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`barrier<class_RenderingDevice_method_barrier>` **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> from=7, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> to=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`buffer_clear<class_RenderingDevice_method_buffer_clear>` **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset, :ref:`int<class_int>` size_bytes, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`buffer_get_data<class_RenderingDevice_method_buffer_get_data>` **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset_bytes=0, :ref:`int<class_int>` size_bytes=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`buffer_update<class_RenderingDevice_method_buffer_update>` **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset, :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`capture_timestamp<class_RenderingDevice_method_capture_timestamp>` **(** :ref:`String<class_String>` name **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_add_barrier<class_RenderingDevice_method_compute_list_add_barrier>` **(** :ref:`int<class_int>` compute_list **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`compute_list_begin<class_RenderingDevice_method_compute_list_begin>` **(** :ref:`bool<class_bool>` allow_draw_overlap=false **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_bind_compute_pipeline<class_RenderingDevice_method_compute_list_bind_compute_pipeline>` **(** :ref:`int<class_int>` compute_list, :ref:`RID<class_RID>` compute_pipeline **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_bind_uniform_set<class_RenderingDevice_method_compute_list_bind_uniform_set>` **(** :ref:`int<class_int>` compute_list, :ref:`RID<class_RID>` uniform_set, :ref:`int<class_int>` set_index **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_dispatch<class_RenderingDevice_method_compute_list_dispatch>` **(** :ref:`int<class_int>` compute_list, :ref:`int<class_int>` x_groups, :ref:`int<class_int>` y_groups, :ref:`int<class_int>` z_groups **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_end<class_RenderingDevice_method_compute_list_end>` **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`compute_list_set_push_constant<class_RenderingDevice_method_compute_list_set_push_constant>` **(** :ref:`int<class_int>` compute_list, :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`int<class_int>` size_bytes **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`compute_pipeline_create<class_RenderingDevice_method_compute_pipeline_create>` **(** :ref:`RID<class_RID>` shader, :ref:`RDPipelineSpecializationConstant[]<class_RDPipelineSpecializationConstant>` specialization_constants=[] **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`compute_pipeline_is_valid<class_RenderingDevice_method_compute_pipeline_is_valid>` **(** :ref:`RID<class_RID>` compute_pipeline **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`create_local_device<class_RenderingDevice_method_create_local_device>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_command_begin_label<class_RenderingDevice_method_draw_command_begin_label>` **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_command_insert_label<class_RenderingDevice_method_draw_command_insert_label>` **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>` **(** :ref:`RID<class_RID>` framebuffer, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_color_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_color_action, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_depth_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_depth_action, :ref:`PackedColorArray<class_PackedColorArray>` clear_color_values=PackedColorArray(), :ref:`float<class_float>` clear_depth=1.0, :ref:`int<class_int>` clear_stencil=0, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0), :ref:`RID[]<class_RID>` storage_textures=[] **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`draw_list_begin_for_screen<class_RenderingDevice_method_draw_list_begin_for_screen>` **(** :ref:`int<class_int>` screen=0, :ref:`Color<class_Color>` clear_color=Color(0, 0, 0, 1) **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`draw_list_begin_split<class_RenderingDevice_method_draw_list_begin_split>` **(** :ref:`RID<class_RID>` framebuffer, :ref:`int<class_int>` splits, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_color_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_color_action, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_depth_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_depth_action, :ref:`PackedColorArray<class_PackedColorArray>` clear_color_values=PackedColorArray(), :ref:`float<class_float>` clear_depth=1.0, :ref:`int<class_int>` clear_stencil=0, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0), :ref:`RID[]<class_RID>` storage_textures=[] **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_bind_index_array<class_RenderingDevice_method_draw_list_bind_index_array>` **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` index_array **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_bind_render_pipeline<class_RenderingDevice_method_draw_list_bind_render_pipeline>` **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` render_pipeline **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_bind_uniform_set<class_RenderingDevice_method_draw_list_bind_uniform_set>` **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` uniform_set, :ref:`int<class_int>` set_index **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_bind_vertex_array<class_RenderingDevice_method_draw_list_bind_vertex_array>` **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` vertex_array **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_disable_scissor<class_RenderingDevice_method_draw_list_disable_scissor>` **(** :ref:`int<class_int>` draw_list **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_draw<class_RenderingDevice_method_draw_list_draw>` **(** :ref:`int<class_int>` draw_list, :ref:`bool<class_bool>` use_indices, :ref:`int<class_int>` instances, :ref:`int<class_int>` procedural_vertex_count=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_enable_scissor<class_RenderingDevice_method_draw_list_enable_scissor>` **(** :ref:`int<class_int>` draw_list, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0) **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_end<class_RenderingDevice_method_draw_list_end>` **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_set_blend_constants<class_RenderingDevice_method_draw_list_set_blend_constants>` **(** :ref:`int<class_int>` draw_list, :ref:`Color<class_Color>` color **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_list_set_push_constant<class_RenderingDevice_method_draw_list_set_push_constant>` **(** :ref:`int<class_int>` draw_list, :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`int<class_int>` size_bytes **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`draw_list_switch_to_next_pass<class_RenderingDevice_method_draw_list_switch_to_next_pass>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`draw_list_switch_to_next_pass_split<class_RenderingDevice_method_draw_list_switch_to_next_pass_split>` **(** :ref:`int<class_int>` splits **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`framebuffer_create<class_RenderingDevice_method_framebuffer_create>` **(** :ref:`RID[]<class_RID>` textures, :ref:`int<class_int>` validate_with_format=-1, :ref:`int<class_int>` view_count=1 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`framebuffer_create_empty<class_RenderingDevice_method_framebuffer_create_empty>` **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` samples=0, :ref:`int<class_int>` validate_with_format=-1 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`framebuffer_create_multipass<class_RenderingDevice_method_framebuffer_create_multipass>` **(** :ref:`RID[]<class_RID>` textures, :ref:`RDFramebufferPass[]<class_RDFramebufferPass>` passes, :ref:`int<class_int>` validate_with_format=-1, :ref:`int<class_int>` view_count=1 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`framebuffer_format_create<class_RenderingDevice_method_framebuffer_format_create>` **(** :ref:`RDAttachmentFormat[]<class_RDAttachmentFormat>` attachments, :ref:`int<class_int>` view_count=1 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`framebuffer_format_create_empty<class_RenderingDevice_method_framebuffer_format_create_empty>` **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` samples=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`framebuffer_format_create_multipass<class_RenderingDevice_method_framebuffer_format_create_multipass>` **(** :ref:`RDAttachmentFormat[]<class_RDAttachmentFormat>` attachments, :ref:`RDFramebufferPass[]<class_RDFramebufferPass>` passes, :ref:`int<class_int>` view_count=1 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` | :ref:`framebuffer_format_get_texture_samples<class_RenderingDevice_method_framebuffer_format_get_texture_samples>` **(** :ref:`int<class_int>` format, :ref:`int<class_int>` render_pass=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`framebuffer_get_format<class_RenderingDevice_method_framebuffer_get_format>` **(** :ref:`RID<class_RID>` framebuffer **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`framebuffer_is_valid<class_RenderingDevice_method_framebuffer_is_valid>` **(** :ref:`RID<class_RID>` framebuffer **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_RenderingDevice_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`full_barrier<class_RenderingDevice_method_full_barrier>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_captured_timestamp_cpu_time<class_RenderingDevice_method_get_captured_timestamp_cpu_time>` **(** :ref:`int<class_int>` index **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_captured_timestamp_gpu_time<class_RenderingDevice_method_get_captured_timestamp_gpu_time>` **(** :ref:`int<class_int>` index **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_captured_timestamp_name<class_RenderingDevice_method_get_captured_timestamp_name>` **(** :ref:`int<class_int>` index **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_captured_timestamps_count<class_RenderingDevice_method_get_captured_timestamps_count>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_captured_timestamps_frame<class_RenderingDevice_method_get_captured_timestamps_frame>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_device_name<class_RenderingDevice_method_get_device_name>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_device_pipeline_cache_uuid<class_RenderingDevice_method_get_device_pipeline_cache_uuid>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_device_vendor_name<class_RenderingDevice_method_get_device_vendor_name>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_driver_resource<class_RenderingDevice_method_get_driver_resource>` **(** :ref:`DriverResource<enum_RenderingDevice_DriverResource>` resource, :ref:`RID<class_RID>` rid, :ref:`int<class_int>` index **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_frame_delay<class_RenderingDevice_method_get_frame_delay>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_memory_usage<class_RenderingDevice_method_get_memory_usage>` **(** :ref:`MemoryType<enum_RenderingDevice_MemoryType>` type **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`index_array_create<class_RenderingDevice_method_index_array_create>` **(** :ref:`RID<class_RID>` index_buffer, :ref:`int<class_int>` index_offset, :ref:`int<class_int>` index_count **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`index_buffer_create<class_RenderingDevice_method_index_buffer_create>` **(** :ref:`int<class_int>` size_indices, :ref:`IndexBufferFormat<enum_RenderingDevice_IndexBufferFormat>` format, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), :ref:`bool<class_bool>` use_restart_indices=false **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`limit_get<class_RenderingDevice_method_limit_get>` **(** :ref:`Limit<enum_RenderingDevice_Limit>` limit **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`render_pipeline_create<class_RenderingDevice_method_render_pipeline_create>` **(** :ref:`RID<class_RID>` shader, :ref:`int<class_int>` framebuffer_format, :ref:`int<class_int>` vertex_format, :ref:`RenderPrimitive<enum_RenderingDevice_RenderPrimitive>` primitive, :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>` rasterization_state, :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>` multisample_state, :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>` stencil_state, :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>` color_blend_state, |bitfield|\<:ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>`\> dynamic_state_flags=0, :ref:`int<class_int>` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]<class_RDPipelineSpecializationConstant>` specialization_constants=[] **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`render_pipeline_is_valid<class_RenderingDevice_method_render_pipeline_is_valid>` **(** :ref:`RID<class_RID>` render_pipeline **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`sampler_create<class_RenderingDevice_method_sampler_create>` **(** :ref:`RDSamplerState<class_RDSamplerState>` state **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`sampler_is_format_supported_for_filter<class_RenderingDevice_method_sampler_is_format_supported_for_filter>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` sampler_filter **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`screen_get_framebuffer_format<class_RenderingDevice_method_screen_get_framebuffer_format>` **(** **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`screen_get_height<class_RenderingDevice_method_screen_get_height>` **(** :ref:`int<class_int>` screen=0 **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`screen_get_width<class_RenderingDevice_method_screen_get_width>` **(** :ref:`int<class_int>` screen=0 **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_resource_name<class_RenderingDevice_method_set_resource_name>` **(** :ref:`RID<class_RID>` id, :ref:`String<class_String>` name **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`shader_compile_binary_from_spirv<class_RenderingDevice_method_shader_compile_binary_from_spirv>` **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` spirv_data, :ref:`String<class_String>` name="" **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` | :ref:`shader_compile_spirv_from_source<class_RenderingDevice_method_shader_compile_spirv_from_source>` **(** :ref:`RDShaderSource<class_RDShaderSource>` shader_source, :ref:`bool<class_bool>` allow_cache=true **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shader_create_from_bytecode<class_RenderingDevice_method_shader_create_from_bytecode>` **(** :ref:`PackedByteArray<class_PackedByteArray>` binary_data **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shader_create_from_spirv<class_RenderingDevice_method_shader_create_from_spirv>` **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` spirv_data, :ref:`String<class_String>` name="" **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shader_get_vertex_input_attribute_mask<class_RenderingDevice_method_shader_get_vertex_input_attribute_mask>` **(** :ref:`RID<class_RID>` shader **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`storage_buffer_create<class_RenderingDevice_method_storage_buffer_create>` **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), |bitfield|\<:ref:`StorageBufferUsage<enum_RenderingDevice_StorageBufferUsage>`\> usage=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`submit<class_RenderingDevice_method_submit>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sync<class_RenderingDevice_method_sync>` **(** **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_buffer_create<class_RenderingDevice_method_texture_buffer_create>` **(** :ref:`int<class_int>` size_bytes, :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray() **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_clear<class_RenderingDevice_method_texture_clear>` **(** :ref:`RID<class_RID>` texture, :ref:`Color<class_Color>` color, :ref:`int<class_int>` base_mipmap, :ref:`int<class_int>` mipmap_count, :ref:`int<class_int>` base_layer, :ref:`int<class_int>` layer_count, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_copy<class_RenderingDevice_method_texture_copy>` **(** :ref:`RID<class_RID>` from_texture, :ref:`RID<class_RID>` to_texture, :ref:`Vector3<class_Vector3>` from_pos, :ref:`Vector3<class_Vector3>` to_pos, :ref:`Vector3<class_Vector3>` size, :ref:`int<class_int>` src_mipmap, :ref:`int<class_int>` dst_mipmap, :ref:`int<class_int>` src_layer, :ref:`int<class_int>` dst_layer, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_create<class_RenderingDevice_method_texture_create>` **(** :ref:`RDTextureFormat<class_RDTextureFormat>` format, :ref:`RDTextureView<class_RDTextureView>` view, :ref:`PackedByteArray[]<class_PackedByteArray>` data=[] **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_create_shared<class_RenderingDevice_method_texture_create_shared>` **(** :ref:`RDTextureView<class_RDTextureView>` view, :ref:`RID<class_RID>` with_texture **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_create_shared_from_slice<class_RenderingDevice_method_texture_create_shared_from_slice>` **(** :ref:`RDTextureView<class_RDTextureView>` view, :ref:`RID<class_RID>` with_texture, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` mipmaps=1, :ref:`TextureSliceType<enum_RenderingDevice_TextureSliceType>` slice_type=0 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`texture_get_data<class_RenderingDevice_method_texture_get_data>` **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`texture_get_native_handle<class_RenderingDevice_method_texture_get_native_handle>` **(** :ref:`RID<class_RID>` texture **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_is_format_supported_for_usage<class_RenderingDevice_method_texture_is_format_supported_for_usage>` **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, |bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> usage_flags **)** |const| | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_is_shared<class_RenderingDevice_method_texture_is_shared>` **(** :ref:`RID<class_RID>` texture **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`texture_is_valid<class_RenderingDevice_method_texture_is_valid>` **(** :ref:`RID<class_RID>` texture **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_resolve_multisample<class_RenderingDevice_method_texture_resolve_multisample>` **(** :ref:`RID<class_RID>` from_texture, :ref:`RID<class_RID>` to_texture, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_update<class_RenderingDevice_method_texture_update>` **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer, :ref:`PackedByteArray<class_PackedByteArray>` data, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`uniform_buffer_create<class_RenderingDevice_method_uniform_buffer_create>` **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray() **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`uniform_set_create<class_RenderingDevice_method_uniform_set_create>` **(** :ref:`RDUniform[]<class_RDUniform>` uniforms, :ref:`RID<class_RID>` shader, :ref:`int<class_int>` shader_set **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`uniform_set_is_valid<class_RenderingDevice_method_uniform_set_is_valid>` **(** :ref:`RID<class_RID>` uniform_set **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`vertex_array_create<class_RenderingDevice_method_vertex_array_create>` **(** :ref:`int<class_int>` vertex_count, :ref:`int<class_int>` vertex_format, :ref:`RID[]<class_RID>` src_buffers, :ref:`PackedInt64Array<class_PackedInt64Array>` offsets=PackedInt64Array() **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`vertex_buffer_create<class_RenderingDevice_method_vertex_buffer_create>` **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), :ref:`bool<class_bool>` use_as_storage=false **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`vertex_format_create<class_RenderingDevice_method_vertex_format_create>` **(** :ref:`RDVertexAttribute[]<class_RDVertexAttribute>` vertex_descriptions **)** | - +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`barrier<class_RenderingDevice_method_barrier>`\ (\ from\: |bitfield|\[:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\] = 32767, to\: |bitfield|\[:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\] = 32767\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`buffer_clear<class_RenderingDevice_method_buffer_clear>`\ (\ buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`, size_bytes\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`buffer_copy<class_RenderingDevice_method_buffer_copy>`\ (\ src_buffer\: :ref:`RID<class_RID>`, dst_buffer\: :ref:`RID<class_RID>`, src_offset\: :ref:`int<class_int>`, dst_offset\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`buffer_get_data<class_RenderingDevice_method_buffer_get_data>`\ (\ buffer\: :ref:`RID<class_RID>`, offset_bytes\: :ref:`int<class_int>` = 0, size_bytes\: :ref:`int<class_int>` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`buffer_update<class_RenderingDevice_method_buffer_update>`\ (\ buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`, size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`capture_timestamp<class_RenderingDevice_method_capture_timestamp>`\ (\ name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_add_barrier<class_RenderingDevice_method_compute_list_add_barrier>`\ (\ compute_list\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`compute_list_begin<class_RenderingDevice_method_compute_list_begin>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_bind_compute_pipeline<class_RenderingDevice_method_compute_list_bind_compute_pipeline>`\ (\ compute_list\: :ref:`int<class_int>`, compute_pipeline\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_bind_uniform_set<class_RenderingDevice_method_compute_list_bind_uniform_set>`\ (\ compute_list\: :ref:`int<class_int>`, uniform_set\: :ref:`RID<class_RID>`, set_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_dispatch<class_RenderingDevice_method_compute_list_dispatch>`\ (\ compute_list\: :ref:`int<class_int>`, x_groups\: :ref:`int<class_int>`, y_groups\: :ref:`int<class_int>`, z_groups\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_dispatch_indirect<class_RenderingDevice_method_compute_list_dispatch_indirect>`\ (\ compute_list\: :ref:`int<class_int>`, buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_end<class_RenderingDevice_method_compute_list_end>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compute_list_set_push_constant<class_RenderingDevice_method_compute_list_set_push_constant>`\ (\ compute_list\: :ref:`int<class_int>`, buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, size_bytes\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`compute_pipeline_create<class_RenderingDevice_method_compute_pipeline_create>`\ (\ shader\: :ref:`RID<class_RID>`, specialization_constants\: :ref:`Array<class_Array>`\[:ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`\] = []\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`compute_pipeline_is_valid<class_RenderingDevice_method_compute_pipeline_is_valid>`\ (\ compute_pipeline\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`create_local_device<class_RenderingDevice_method_create_local_device>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_command_begin_label<class_RenderingDevice_method_draw_command_begin_label>`\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_command_insert_label<class_RenderingDevice_method_draw_command_insert_label>`\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`\ (\ framebuffer\: :ref:`RID<class_RID>`, initial_color_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_color_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, initial_depth_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_depth_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, clear_color_values\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), clear_depth\: :ref:`float<class_float>` = 1.0, clear_stencil\: :ref:`int<class_int>` = 0, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`draw_list_begin_for_screen<class_RenderingDevice_method_draw_list_begin_for_screen>`\ (\ screen\: :ref:`int<class_int>` = 0, clear_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 1)\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`draw_list_begin_split<class_RenderingDevice_method_draw_list_begin_split>`\ (\ framebuffer\: :ref:`RID<class_RID>`, splits\: :ref:`int<class_int>`, initial_color_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_color_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, initial_depth_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_depth_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, clear_color_values\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), clear_depth\: :ref:`float<class_float>` = 1.0, clear_stencil\: :ref:`int<class_int>` = 0, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), storage_textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_bind_index_array<class_RenderingDevice_method_draw_list_bind_index_array>`\ (\ draw_list\: :ref:`int<class_int>`, index_array\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_bind_render_pipeline<class_RenderingDevice_method_draw_list_bind_render_pipeline>`\ (\ draw_list\: :ref:`int<class_int>`, render_pipeline\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_bind_uniform_set<class_RenderingDevice_method_draw_list_bind_uniform_set>`\ (\ draw_list\: :ref:`int<class_int>`, uniform_set\: :ref:`RID<class_RID>`, set_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_bind_vertex_array<class_RenderingDevice_method_draw_list_bind_vertex_array>`\ (\ draw_list\: :ref:`int<class_int>`, vertex_array\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_disable_scissor<class_RenderingDevice_method_draw_list_disable_scissor>`\ (\ draw_list\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_draw<class_RenderingDevice_method_draw_list_draw>`\ (\ draw_list\: :ref:`int<class_int>`, use_indices\: :ref:`bool<class_bool>`, instances\: :ref:`int<class_int>`, procedural_vertex_count\: :ref:`int<class_int>` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_enable_scissor<class_RenderingDevice_method_draw_list_enable_scissor>`\ (\ draw_list\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_end<class_RenderingDevice_method_draw_list_end>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_set_blend_constants<class_RenderingDevice_method_draw_list_set_blend_constants>`\ (\ draw_list\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_set_push_constant<class_RenderingDevice_method_draw_list_set_push_constant>`\ (\ draw_list\: :ref:`int<class_int>`, buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, size_bytes\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`draw_list_switch_to_next_pass<class_RenderingDevice_method_draw_list_switch_to_next_pass>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`draw_list_switch_to_next_pass_split<class_RenderingDevice_method_draw_list_switch_to_next_pass_split>`\ (\ splits\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`framebuffer_create<class_RenderingDevice_method_framebuffer_create>`\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], validate_with_format\: :ref:`int<class_int>` = -1, view_count\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`framebuffer_create_empty<class_RenderingDevice_method_framebuffer_create_empty>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`, samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` = 0, validate_with_format\: :ref:`int<class_int>` = -1\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`framebuffer_create_multipass<class_RenderingDevice_method_framebuffer_create_multipass>`\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], validate_with_format\: :ref:`int<class_int>` = -1, view_count\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`framebuffer_format_create<class_RenderingDevice_method_framebuffer_format_create>`\ (\ attachments\: :ref:`Array<class_Array>`\[:ref:`RDAttachmentFormat<class_RDAttachmentFormat>`\], view_count\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`framebuffer_format_create_empty<class_RenderingDevice_method_framebuffer_format_create_empty>`\ (\ samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`framebuffer_format_create_multipass<class_RenderingDevice_method_framebuffer_format_create_multipass>`\ (\ attachments\: :ref:`Array<class_Array>`\[:ref:`RDAttachmentFormat<class_RDAttachmentFormat>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], view_count\: :ref:`int<class_int>` = 1\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` | :ref:`framebuffer_format_get_texture_samples<class_RenderingDevice_method_framebuffer_format_get_texture_samples>`\ (\ format\: :ref:`int<class_int>`, render_pass\: :ref:`int<class_int>` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`framebuffer_get_format<class_RenderingDevice_method_framebuffer_get_format>`\ (\ framebuffer\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`framebuffer_is_valid<class_RenderingDevice_method_framebuffer_is_valid>`\ (\ framebuffer\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_RenderingDevice_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`full_barrier<class_RenderingDevice_method_full_barrier>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_captured_timestamp_cpu_time<class_RenderingDevice_method_get_captured_timestamp_cpu_time>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_captured_timestamp_gpu_time<class_RenderingDevice_method_get_captured_timestamp_gpu_time>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_captured_timestamp_name<class_RenderingDevice_method_get_captured_timestamp_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_captured_timestamps_count<class_RenderingDevice_method_get_captured_timestamps_count>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_captured_timestamps_frame<class_RenderingDevice_method_get_captured_timestamps_frame>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_device_name<class_RenderingDevice_method_get_device_name>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_device_pipeline_cache_uuid<class_RenderingDevice_method_get_device_pipeline_cache_uuid>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_device_vendor_name<class_RenderingDevice_method_get_device_vendor_name>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_driver_resource<class_RenderingDevice_method_get_driver_resource>`\ (\ resource\: :ref:`DriverResource<enum_RenderingDevice_DriverResource>`, rid\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_frame_delay<class_RenderingDevice_method_get_frame_delay>`\ (\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_memory_usage<class_RenderingDevice_method_get_memory_usage>`\ (\ type\: :ref:`MemoryType<enum_RenderingDevice_MemoryType>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`index_array_create<class_RenderingDevice_method_index_array_create>`\ (\ index_buffer\: :ref:`RID<class_RID>`, index_offset\: :ref:`int<class_int>`, index_count\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`index_buffer_create<class_RenderingDevice_method_index_buffer_create>`\ (\ size_indices\: :ref:`int<class_int>`, format\: :ref:`IndexBufferFormat<enum_RenderingDevice_IndexBufferFormat>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), use_restart_indices\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`limit_get<class_RenderingDevice_method_limit_get>`\ (\ limit\: :ref:`Limit<enum_RenderingDevice_Limit>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`render_pipeline_create<class_RenderingDevice_method_render_pipeline_create>`\ (\ shader\: :ref:`RID<class_RID>`, framebuffer_format\: :ref:`int<class_int>`, vertex_format\: :ref:`int<class_int>`, primitive\: :ref:`RenderPrimitive<enum_RenderingDevice_RenderPrimitive>`, rasterization_state\: :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>`, multisample_state\: :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>`, stencil_state\: :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>`, color_blend_state\: :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>`, dynamic_state_flags\: |bitfield|\[:ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>`\] = 0, for_render_pass\: :ref:`int<class_int>` = 0, specialization_constants\: :ref:`Array<class_Array>`\[:ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`\] = []\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`render_pipeline_is_valid<class_RenderingDevice_method_render_pipeline_is_valid>`\ (\ render_pipeline\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`sampler_create<class_RenderingDevice_method_sampler_create>`\ (\ state\: :ref:`RDSamplerState<class_RDSamplerState>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`sampler_is_format_supported_for_filter<class_RenderingDevice_method_sampler_is_format_supported_for_filter>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, sampler_filter\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`screen_get_framebuffer_format<class_RenderingDevice_method_screen_get_framebuffer_format>`\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`screen_get_height<class_RenderingDevice_method_screen_get_height>`\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`screen_get_width<class_RenderingDevice_method_screen_get_width>`\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_resource_name<class_RenderingDevice_method_set_resource_name>`\ (\ id\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`shader_compile_binary_from_spirv<class_RenderingDevice_method_shader_compile_binary_from_spirv>`\ (\ spirv_data\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, name\: :ref:`String<class_String>` = ""\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` | :ref:`shader_compile_spirv_from_source<class_RenderingDevice_method_shader_compile_spirv_from_source>`\ (\ shader_source\: :ref:`RDShaderSource<class_RDShaderSource>`, allow_cache\: :ref:`bool<class_bool>` = true\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shader_create_from_bytecode<class_RenderingDevice_method_shader_create_from_bytecode>`\ (\ binary_data\: :ref:`PackedByteArray<class_PackedByteArray>`, placeholder_rid\: :ref:`RID<class_RID>` = RID()\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shader_create_from_spirv<class_RenderingDevice_method_shader_create_from_spirv>`\ (\ spirv_data\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, name\: :ref:`String<class_String>` = ""\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shader_create_placeholder<class_RenderingDevice_method_shader_create_placeholder>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shader_get_vertex_input_attribute_mask<class_RenderingDevice_method_shader_get_vertex_input_attribute_mask>`\ (\ shader\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`storage_buffer_create<class_RenderingDevice_method_storage_buffer_create>`\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage<enum_RenderingDevice_StorageBufferUsage>`\] = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`submit<class_RenderingDevice_method_submit>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sync<class_RenderingDevice_method_sync>`\ (\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_buffer_create<class_RenderingDevice_method_texture_buffer_create>`\ (\ size_bytes\: :ref:`int<class_int>`, format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_clear<class_RenderingDevice_method_texture_clear>`\ (\ texture\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`, base_mipmap\: :ref:`int<class_int>`, mipmap_count\: :ref:`int<class_int>`, base_layer\: :ref:`int<class_int>`, layer_count\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_copy<class_RenderingDevice_method_texture_copy>`\ (\ from_texture\: :ref:`RID<class_RID>`, to_texture\: :ref:`RID<class_RID>`, from_pos\: :ref:`Vector3<class_Vector3>`, to_pos\: :ref:`Vector3<class_Vector3>`, size\: :ref:`Vector3<class_Vector3>`, src_mipmap\: :ref:`int<class_int>`, dst_mipmap\: :ref:`int<class_int>`, src_layer\: :ref:`int<class_int>`, dst_layer\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_create<class_RenderingDevice_method_texture_create>`\ (\ format\: :ref:`RDTextureFormat<class_RDTextureFormat>`, view\: :ref:`RDTextureView<class_RDTextureView>`, data\: :ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\] = []\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_create_from_extension<class_RenderingDevice_method_texture_create_from_extension>`\ (\ type\: :ref:`TextureType<enum_RenderingDevice_TextureType>`, format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`, usage_flags\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\], image\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_create_shared<class_RenderingDevice_method_texture_create_shared>`\ (\ view\: :ref:`RDTextureView<class_RDTextureView>`, with_texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_create_shared_from_slice<class_RenderingDevice_method_texture_create_shared_from_slice>`\ (\ view\: :ref:`RDTextureView<class_RDTextureView>`, with_texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>` = 1, slice_type\: :ref:`TextureSliceType<enum_RenderingDevice_TextureSliceType>` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`texture_get_data<class_RenderingDevice_method_texture_get_data>`\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDTextureFormat<class_RDTextureFormat>` | :ref:`texture_get_format<class_RenderingDevice_method_texture_get_format>`\ (\ texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`texture_get_native_handle<class_RenderingDevice_method_texture_get_native_handle>`\ (\ texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`texture_is_format_supported_for_usage<class_RenderingDevice_method_texture_is_format_supported_for_usage>`\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, usage_flags\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\]\ ) |const| | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`texture_is_shared<class_RenderingDevice_method_texture_is_shared>`\ (\ texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`texture_is_valid<class_RenderingDevice_method_texture_is_valid>`\ (\ texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_resolve_multisample<class_RenderingDevice_method_texture_resolve_multisample>`\ (\ from_texture\: :ref:`RID<class_RID>`, to_texture\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`texture_update<class_RenderingDevice_method_texture_update>`\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`uniform_buffer_create<class_RenderingDevice_method_uniform_buffer_create>`\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`uniform_set_create<class_RenderingDevice_method_uniform_set_create>`\ (\ uniforms\: :ref:`Array<class_Array>`\[:ref:`RDUniform<class_RDUniform>`\], shader\: :ref:`RID<class_RID>`, shader_set\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`uniform_set_is_valid<class_RenderingDevice_method_uniform_set_is_valid>`\ (\ uniform_set\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`vertex_array_create<class_RenderingDevice_method_vertex_array_create>`\ (\ vertex_count\: :ref:`int<class_int>`, vertex_format\: :ref:`int<class_int>`, src_buffers\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], offsets\: :ref:`PackedInt64Array<class_PackedInt64Array>` = PackedInt64Array()\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`vertex_buffer_create<class_RenderingDevice_method_vertex_buffer_create>`\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), use_as_storage\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`vertex_format_create<class_RenderingDevice_method_vertex_format_create>`\ (\ vertex_descriptions\: :ref:`Array<class_Array>`\[:ref:`RDVertexAttribute<class_RDVertexAttribute>`\]\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -245,7 +255,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DeviceType**: +enum **DeviceType**: :ref:`🔗<enum_RenderingDevice_DeviceType>` .. _class_RenderingDevice_constant_DEVICE_TYPE_OTHER: @@ -303,7 +313,127 @@ Represents the size of the :ref:`DeviceType<enum_RenderingDevice_DeviceType>` en .. rst-class:: classref-enumeration -enum **DriverResource**: +enum **DriverResource**: :ref:`🔗<enum_RenderingDevice_DriverResource>` + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_LOGICAL_DEVICE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_LOGICAL_DEVICE** = ``0`` + +Specific device object based on a physical device. + +- Vulkan: Vulkan device driver resource (``VkDevice``). (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_PHYSICAL_DEVICE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_PHYSICAL_DEVICE** = ``1`` + +Physical device the specific logical device is based on. + +- Vulkan: ``VkDevice``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TOPMOST_OBJECT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_TOPMOST_OBJECT** = ``2`` + +Top-most graphics API entry object. + +- Vulkan: ``VkInstance``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_COMMAND_QUEUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_COMMAND_QUEUE** = ``3`` + +The main graphics-compute command queue. + +- Vulkan: ``VkQueue``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_QUEUE_FAMILY: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_QUEUE_FAMILY** = ``4`` + +The specific family the main queue belongs to. + +- Vulkan: the queue family index, an ``uint32_t``. (``rid`` argument doesn't apply.) + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_TEXTURE** = ``5`` + +- Vulkan: ``VkImage``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_VIEW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_TEXTURE_VIEW** = ``6`` + +The view of an owned or shared texture. + +- Vulkan: ``VkImageView``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_DATA_FORMAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_TEXTURE_DATA_FORMAT** = ``7`` + +The native id of the data format of the texture. + +- Vulkan: ``VkFormat``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_SAMPLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_SAMPLER** = ``8`` + +- Vulkan: ``VkSampler``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_UNIFORM_SET: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_UNIFORM_SET** = ``9`` + +- Vulkan: ``VkDescriptorSet``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_BUFFER** = ``10`` + +Buffer of any kind of (storage, vertex, etc.). + +- Vulkan: ``VkBuffer``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_COMPUTE_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_COMPUTE_PIPELINE** = ``11`` + +- Vulkan: ``VkPipeline``. + +.. _class_RenderingDevice_constant_DRIVER_RESOURCE_RENDER_PIPELINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_RENDER_PIPELINE** = ``12`` + +- Vulkan: ``VkPipeline``. .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DEVICE: @@ -311,7 +441,9 @@ enum **DriverResource**: :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_DEVICE** = ``0`` -Vulkan device driver resource. This is a "global" resource and ignores the RID passed in +**Deprecated:** Use :ref:`DRIVER_RESOURCE_LOGICAL_DEVICE<class_RenderingDevice_constant_DRIVER_RESOURCE_LOGICAL_DEVICE>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE: @@ -319,7 +451,9 @@ Vulkan device driver resource. This is a "global" resource and ignores the RID p :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE** = ``1`` -Physical device (graphics card) driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_PHYSICAL_DEVICE<class_RenderingDevice_constant_DRIVER_RESOURCE_PHYSICAL_DEVICE>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_INSTANCE: @@ -327,7 +461,9 @@ Physical device (graphics card) driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_INSTANCE** = ``2`` -Vulkan instance driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_TOPMOST_OBJECT<class_RenderingDevice_constant_DRIVER_RESOURCE_TOPMOST_OBJECT>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE: @@ -335,7 +471,9 @@ Vulkan instance driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_QUEUE** = ``3`` -Vulkan queue driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_COMMAND_QUEUE<class_RenderingDevice_constant_DRIVER_RESOURCE_COMMAND_QUEUE>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX: @@ -343,7 +481,9 @@ Vulkan queue driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX** = ``4`` -Vulkan queue family index driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_QUEUE_FAMILY<class_RenderingDevice_constant_DRIVER_RESOURCE_QUEUE_FAMILY>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE: @@ -351,7 +491,9 @@ Vulkan queue family index driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_IMAGE** = ``5`` -Vulkan image driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_TEXTURE<class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_VIEW: @@ -359,7 +501,9 @@ Vulkan image driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_IMAGE_VIEW** = ``6`` -Vulkan image view driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_TEXTURE_VIEW<class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_VIEW>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT: @@ -367,7 +511,9 @@ Vulkan image view driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT** = ``7`` -Vulkan image native texture format driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_TEXTURE_DATA_FORMAT<class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE_DATA_FORMAT>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_SAMPLER: @@ -375,7 +521,9 @@ Vulkan image native texture format driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_SAMPLER** = ``8`` -Vulkan sampler driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_SAMPLER<class_RenderingDevice_constant_DRIVER_RESOURCE_SAMPLER>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET: @@ -383,7 +531,9 @@ Vulkan sampler driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET** = ``9`` -Vulkan `descriptor set <https://vkguide.dev/docs/chapter-4/descriptors/>`__ driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_UNIFORM_SET<class_RenderingDevice_constant_DRIVER_RESOURCE_UNIFORM_SET>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_BUFFER: @@ -391,7 +541,9 @@ Vulkan `descriptor set <https://vkguide.dev/docs/chapter-4/descriptors/>`__ driv :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_BUFFER** = ``10`` -Vulkan buffer driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_BUFFER<class_RenderingDevice_constant_DRIVER_RESOURCE_BUFFER>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE: @@ -399,7 +551,9 @@ Vulkan buffer driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE** = ``11`` -Vulkan compute pipeline driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_COMPUTE_PIPELINE<class_RenderingDevice_constant_DRIVER_RESOURCE_COMPUTE_PIPELINE>` instead. + + .. _class_RenderingDevice_constant_DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE: @@ -407,7 +561,9 @@ Vulkan compute pipeline driver resource. :ref:`DriverResource<enum_RenderingDevice_DriverResource>` **DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE** = ``12`` -Vulkan render pipeline driver resource. +**Deprecated:** Use :ref:`DRIVER_RESOURCE_RENDER_PIPELINE<class_RenderingDevice_constant_DRIVER_RESOURCE_RENDER_PIPELINE>` instead. + + .. rst-class:: classref-item-separator @@ -417,7 +573,7 @@ Vulkan render pipeline driver resource. .. rst-class:: classref-enumeration -enum **DataFormat**: +enum **DataFormat**: :ref:`🔗<enum_RenderingDevice_DataFormat>` .. _class_RenderingDevice_constant_DATA_FORMAT_R4G4_UNORM_PACK8: @@ -2181,15 +2337,23 @@ Represents the size of the :ref:`DataFormat<enum_RenderingDevice_DataFormat>` en .. rst-class:: classref-enumeration -flags **BarrierMask**: +flags **BarrierMask**: :ref:`🔗<enum_RenderingDevice_BarrierMask>` -.. _class_RenderingDevice_constant_BARRIER_MASK_RASTER: +.. _class_RenderingDevice_constant_BARRIER_MASK_VERTEX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_VERTEX** = ``1`` + +Vertex shader barrier mask. + +.. _class_RenderingDevice_constant_BARRIER_MASK_FRAGMENT: .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_RASTER** = ``1`` +:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_FRAGMENT** = ``8`` -Raster barrier mask. +Fragment shader barrier mask. .. _class_RenderingDevice_constant_BARRIER_MASK_COMPUTE: @@ -2207,19 +2371,27 @@ Compute barrier mask. Transfer barrier mask. +.. _class_RenderingDevice_constant_BARRIER_MASK_RASTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_RASTER** = ``9`` + +Raster barrier mask (vertex and fragment). Equivalent to ``BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT``. + .. _class_RenderingDevice_constant_BARRIER_MASK_ALL_BARRIERS: .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_ALL_BARRIERS** = ``7`` +:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_ALL_BARRIERS** = ``32767`` -Barrier mask for all types (raster, compute, transfer). Equivalent to ``BARRIER_MASK_RASTER | BARRIER_MASK_COMPUTE | BARRIER_MASK_TRANSFER``. +Barrier mask for all types (vertex, fragment, compute, transfer). .. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: .. rst-class:: classref-enumeration-constant -:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_NO_BARRIER** = ``8`` +:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>` **BARRIER_MASK_NO_BARRIER** = ``32768`` No barrier for any type. @@ -2231,7 +2403,7 @@ No barrier for any type. .. rst-class:: classref-enumeration -enum **TextureType**: +enum **TextureType**: :ref:`🔗<enum_RenderingDevice_TextureType>` .. _class_RenderingDevice_constant_TEXTURE_TYPE_1D: @@ -2305,7 +2477,7 @@ Represents the size of the :ref:`TextureType<enum_RenderingDevice_TextureType>` .. rst-class:: classref-enumeration -enum **TextureSamples**: +enum **TextureSamples**: :ref:`🔗<enum_RenderingDevice_TextureSamples>` .. _class_RenderingDevice_constant_TEXTURE_SAMPLES_1: @@ -2379,7 +2551,7 @@ Represents the size of the :ref:`TextureSamples<enum_RenderingDevice_TextureSamp .. rst-class:: classref-enumeration -flags **TextureUsageBits**: +flags **TextureUsageBits**: :ref:`🔗<enum_RenderingDevice_TextureUsageBits>` .. _class_RenderingDevice_constant_TEXTURE_USAGE_SAMPLING_BIT: @@ -2469,7 +2641,7 @@ Texture can be used as a `input attachment <https://registry.khronos.org/vulkan/ .. rst-class:: classref-enumeration -enum **TextureSwizzle**: +enum **TextureSwizzle**: :ref:`🔗<enum_RenderingDevice_TextureSwizzle>` .. _class_RenderingDevice_constant_TEXTURE_SWIZZLE_IDENTITY: @@ -2543,7 +2715,7 @@ Represents the size of the :ref:`TextureSwizzle<enum_RenderingDevice_TextureSwiz .. rst-class:: classref-enumeration -enum **TextureSliceType**: +enum **TextureSliceType**: :ref:`🔗<enum_RenderingDevice_TextureSliceType>` .. _class_RenderingDevice_constant_TEXTURE_SLICE_2D: @@ -2577,7 +2749,7 @@ Cubemap texture slice. .. rst-class:: classref-enumeration -enum **SamplerFilter**: +enum **SamplerFilter**: :ref:`🔗<enum_RenderingDevice_SamplerFilter>` .. _class_RenderingDevice_constant_SAMPLER_FILTER_NEAREST: @@ -2603,7 +2775,7 @@ Bilinear sampler filtering. Sampling at higher resolutions than the source will .. rst-class:: classref-enumeration -enum **SamplerRepeatMode**: +enum **SamplerRepeatMode**: :ref:`🔗<enum_RenderingDevice_SamplerRepeatMode>` .. _class_RenderingDevice_constant_SAMPLER_REPEAT_MODE_REPEAT: @@ -2661,7 +2833,7 @@ Represents the size of the :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerR .. rst-class:: classref-enumeration -enum **SamplerBorderColor**: +enum **SamplerBorderColor**: :ref:`🔗<enum_RenderingDevice_SamplerBorderColor>` .. _class_RenderingDevice_constant_SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK: @@ -2727,7 +2899,7 @@ Represents the size of the :ref:`SamplerBorderColor<enum_RenderingDevice_Sampler .. rst-class:: classref-enumeration -enum **VertexFrequency**: +enum **VertexFrequency**: :ref:`🔗<enum_RenderingDevice_VertexFrequency>` .. _class_RenderingDevice_constant_VERTEX_FREQUENCY_VERTEX: @@ -2753,7 +2925,7 @@ Vertex attribute addressing is a function of the instance index. This is used to .. rst-class:: classref-enumeration -enum **IndexBufferFormat**: +enum **IndexBufferFormat**: :ref:`🔗<enum_RenderingDevice_IndexBufferFormat>` .. _class_RenderingDevice_constant_INDEX_BUFFER_FORMAT_UINT16: @@ -2779,7 +2951,7 @@ Index buffer in 32-bit unsigned integer format. This limits the maximum index th .. rst-class:: classref-enumeration -flags **StorageBufferUsage**: +flags **StorageBufferUsage**: :ref:`🔗<enum_RenderingDevice_StorageBufferUsage>` .. _class_RenderingDevice_constant_STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT: @@ -2787,6 +2959,10 @@ flags **StorageBufferUsage**: :ref:`StorageBufferUsage<enum_RenderingDevice_StorageBufferUsage>` **STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -2797,7 +2973,7 @@ flags **StorageBufferUsage**: .. rst-class:: classref-enumeration -enum **UniformType**: +enum **UniformType**: :ref:`🔗<enum_RenderingDevice_UniformType>` .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER: @@ -2805,7 +2981,7 @@ enum **UniformType**: :ref:`UniformType<enum_RenderingDevice_UniformType>` **UNIFORM_TYPE_SAMPLER** = ``0`` -Sampler uniform. TODO: Difference between sampler and texture uniform +Sampler uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: @@ -2829,7 +3005,7 @@ Texture uniform. :ref:`UniformType<enum_RenderingDevice_UniformType>` **UNIFORM_TYPE_IMAGE** = ``3`` -Image uniform. TODO: Difference between texture and image uniform +Image uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: @@ -2837,7 +3013,7 @@ Image uniform. TODO: Difference between texture and image uniform :ref:`UniformType<enum_RenderingDevice_UniformType>` **UNIFORM_TYPE_TEXTURE_BUFFER** = ``4`` -Texture buffer uniform. TODO: Difference between texture and texture buffe uniformr +Texture buffer uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: @@ -2845,7 +3021,7 @@ Texture buffer uniform. TODO: Difference between texture and texture buffe unifo :ref:`UniformType<enum_RenderingDevice_UniformType>` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = ``5`` -Sampler uniform with a texture buffer. TODO: Difference between texture and texture buffer uniform +Sampler uniform with a texture buffer. .. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: @@ -2853,7 +3029,7 @@ Sampler uniform with a texture buffer. TODO: Difference between texture and text :ref:`UniformType<enum_RenderingDevice_UniformType>` **UNIFORM_TYPE_IMAGE_BUFFER** = ``6`` -Image buffer uniform. TODO: Difference between texture and image uniforms +Image buffer uniform. .. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: @@ -2895,7 +3071,7 @@ Represents the size of the :ref:`UniformType<enum_RenderingDevice_UniformType>` .. rst-class:: classref-enumeration -enum **RenderPrimitive**: +enum **RenderPrimitive**: :ref:`🔗<enum_RenderingDevice_RenderPrimitive>` .. _class_RenderingDevice_constant_RENDER_PRIMITIVE_POINTS: @@ -3011,7 +3187,7 @@ Represents the size of the :ref:`RenderPrimitive<enum_RenderingDevice_RenderPrim .. rst-class:: classref-enumeration -enum **PolygonCullMode**: +enum **PolygonCullMode**: :ref:`🔗<enum_RenderingDevice_PolygonCullMode>` .. _class_RenderingDevice_constant_POLYGON_CULL_DISABLED: @@ -3045,7 +3221,7 @@ Use polygon backface culling (faces pointing away from the camera are hidden). .. rst-class:: classref-enumeration -enum **PolygonFrontFace**: +enum **PolygonFrontFace**: :ref:`🔗<enum_RenderingDevice_PolygonFrontFace>` .. _class_RenderingDevice_constant_POLYGON_FRONT_FACE_CLOCKWISE: @@ -3071,7 +3247,7 @@ Counter-clockwise winding order to determine which face of a polygon is its fron .. rst-class:: classref-enumeration -enum **StencilOperation**: +enum **StencilOperation**: :ref:`🔗<enum_RenderingDevice_StencilOperation>` .. _class_RenderingDevice_constant_STENCIL_OP_KEEP: @@ -3153,7 +3329,7 @@ Represents the size of the :ref:`StencilOperation<enum_RenderingDevice_StencilOp .. rst-class:: classref-enumeration -enum **CompareOperator**: +enum **CompareOperator**: :ref:`🔗<enum_RenderingDevice_CompareOperator>` .. _class_RenderingDevice_constant_COMPARE_OP_NEVER: @@ -3235,7 +3411,7 @@ Represents the size of the :ref:`CompareOperator<enum_RenderingDevice_CompareOpe .. rst-class:: classref-enumeration -enum **LogicOperation**: +enum **LogicOperation**: :ref:`🔗<enum_RenderingDevice_LogicOperation>` .. _class_RenderingDevice_constant_LOGIC_OP_CLEAR: @@ -3381,7 +3557,7 @@ Represents the size of the :ref:`LogicOperation<enum_RenderingDevice_LogicOperat .. rst-class:: classref-enumeration -enum **BlendFactor**: +enum **BlendFactor**: :ref:`🔗<enum_RenderingDevice_BlendFactor>` .. _class_RenderingDevice_constant_BLEND_FACTOR_ZERO: @@ -3551,7 +3727,7 @@ Represents the size of the :ref:`BlendFactor<enum_RenderingDevice_BlendFactor>` .. rst-class:: classref-enumeration -enum **BlendOperation**: +enum **BlendOperation**: :ref:`🔗<enum_RenderingDevice_BlendOperation>` .. _class_RenderingDevice_constant_BLEND_OP_ADD: @@ -3609,7 +3785,7 @@ Represents the size of the :ref:`BlendOperation<enum_RenderingDevice_BlendOperat .. rst-class:: classref-enumeration -flags **PipelineDynamicStateFlags**: +flags **PipelineDynamicStateFlags**: :ref:`🔗<enum_RenderingDevice_PipelineDynamicStateFlags>` .. _class_RenderingDevice_constant_DYNAMIC_STATE_LINE_WIDTH: @@ -3617,7 +3793,7 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_LINE_WIDTH** = ``1`` - +Allows dynamically changing the width of rendering lines. .. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BIAS: @@ -3625,7 +3801,7 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_DEPTH_BIAS** = ``2`` - +Allows dynamically changing the depth bias. .. _class_RenderingDevice_constant_DYNAMIC_STATE_BLEND_CONSTANTS: @@ -3633,6 +3809,10 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_BLEND_CONSTANTS** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingDevice_constant_DYNAMIC_STATE_DEPTH_BOUNDS: @@ -3641,6 +3821,10 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_DEPTH_BOUNDS** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_COMPARE_MASK: @@ -3649,6 +3833,10 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_STENCIL_COMPARE_MASK** = ``16`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_WRITE_MASK: @@ -3657,6 +3845,10 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_STENCIL_WRITE_MASK** = ``32`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingDevice_constant_DYNAMIC_STATE_STENCIL_REFERENCE: @@ -3665,6 +3857,10 @@ flags **PipelineDynamicStateFlags**: :ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>` **DYNAMIC_STATE_STENCIL_REFERENCE** = ``64`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -3675,15 +3871,39 @@ flags **PipelineDynamicStateFlags**: .. rst-class:: classref-enumeration -enum **InitialAction**: +enum **InitialAction**: :ref:`🔗<enum_RenderingDevice_InitialAction>` + +.. _class_RenderingDevice_constant_INITIAL_ACTION_LOAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_LOAD** = ``0`` + +Load the previous contents of the framebuffer. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR: .. rst-class:: classref-enumeration-constant -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CLEAR** = ``0`` +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CLEAR** = ``1`` + +Clear the whole framebuffer or its specified region. + +.. _class_RenderingDevice_constant_INITIAL_ACTION_DISCARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_DISCARD** = ``2`` + +Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them. + +.. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_MAX** = ``3`` -Start rendering and clear the whole framebuffer. +Represents the size of the :ref:`InitialAction<enum_RenderingDevice_InitialAction>` enum. .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION: @@ -3691,47 +3911,49 @@ Start rendering and clear the whole framebuffer. :ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CLEAR_REGION** = ``1`` -Start rendering and clear the framebuffer in the specified region. +**Deprecated:** Use :ref:`INITIAL_ACTION_CLEAR<class_RenderingDevice_constant_INITIAL_ACTION_CLEAR>` instead. + + .. _class_RenderingDevice_constant_INITIAL_ACTION_CLEAR_REGION_CONTINUE: .. rst-class:: classref-enumeration-constant -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = ``2`` +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CLEAR_REGION_CONTINUE** = ``1`` + +**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD<class_RenderingDevice_constant_INITIAL_ACTION_LOAD>` instead. + -Continue rendering and clear the framebuffer in the specified region. Framebuffer must have been left in :ref:`FINAL_ACTION_CONTINUE<class_RenderingDevice_constant_FINAL_ACTION_CONTINUE>` state as the final action previously. .. _class_RenderingDevice_constant_INITIAL_ACTION_KEEP: .. rst-class:: classref-enumeration-constant -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_KEEP** = ``3`` +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_KEEP** = ``0`` + +**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD<class_RenderingDevice_constant_INITIAL_ACTION_LOAD>` instead. + -Start rendering, but keep attached color texture contents. If the framebuffer was previously used to read in a shader, this will automatically insert a layout transition. .. _class_RenderingDevice_constant_INITIAL_ACTION_DROP: .. rst-class:: classref-enumeration-constant -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_DROP** = ``4`` +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_DROP** = ``2`` -Start rendering, ignore what is there; write above it. In general, this is the fastest option when you will be writing every single pixel and you don't need a clear color. +**Deprecated:** Use :ref:`INITIAL_ACTION_DISCARD<class_RenderingDevice_constant_INITIAL_ACTION_DISCARD>` instead. -.. _class_RenderingDevice_constant_INITIAL_ACTION_CONTINUE: -.. rst-class:: classref-enumeration-constant -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CONTINUE** = ``5`` +.. _class_RenderingDevice_constant_INITIAL_ACTION_CONTINUE: -Continue rendering. Framebuffer must have been left in :ref:`FINAL_ACTION_CONTINUE<class_RenderingDevice_constant_FINAL_ACTION_CONTINUE>` state as the final action previously. +.. rst-class:: classref-enumeration-constant -.. _class_RenderingDevice_constant_INITIAL_ACTION_MAX: +:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_CONTINUE** = ``0`` -.. rst-class:: classref-enumeration-constant +**Deprecated:** Use :ref:`INITIAL_ACTION_LOAD<class_RenderingDevice_constant_INITIAL_ACTION_LOAD>` instead. -:ref:`InitialAction<enum_RenderingDevice_InitialAction>` **INITIAL_ACTION_MAX** = ``6`` -Represents the size of the :ref:`InitialAction<enum_RenderingDevice_InitialAction>` enum. .. rst-class:: classref-item-separator @@ -3741,15 +3963,15 @@ Represents the size of the :ref:`InitialAction<enum_RenderingDevice_InitialActio .. rst-class:: classref-enumeration -enum **FinalAction**: +enum **FinalAction**: :ref:`🔗<enum_RenderingDevice_FinalAction>` -.. _class_RenderingDevice_constant_FINAL_ACTION_READ: +.. _class_RenderingDevice_constant_FINAL_ACTION_STORE: .. rst-class:: classref-enumeration-constant -:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_READ** = ``0`` +:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_STORE** = ``0`` -Store the texture for reading and make it read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT<class_RenderingDevice_constant_TEXTURE_USAGE_SAMPLING_BIT>` bit (only applies to color, depth and stencil attachments). +Store the result of the draw list in the framebuffer. This is generally what you want to do. .. _class_RenderingDevice_constant_FINAL_ACTION_DISCARD: @@ -3757,23 +3979,35 @@ Store the texture for reading and make it read-only if it has the :ref:`TEXTURE_ :ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_DISCARD** = ``1`` -Discard the texture data and make it read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT<class_RenderingDevice_constant_TEXTURE_USAGE_SAMPLING_BIT>` bit (only applies to color, depth and stencil attachments). +Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list. -.. _class_RenderingDevice_constant_FINAL_ACTION_CONTINUE: +.. _class_RenderingDevice_constant_FINAL_ACTION_MAX: .. rst-class:: classref-enumeration-constant -:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_CONTINUE** = ``2`` +:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_MAX** = ``2`` -Store the texture and continue for further processing. Similar to :ref:`FINAL_ACTION_READ<class_RenderingDevice_constant_FINAL_ACTION_READ>`, but does not make the texture read-only if it has the :ref:`TEXTURE_USAGE_SAMPLING_BIT<class_RenderingDevice_constant_TEXTURE_USAGE_SAMPLING_BIT>` bit. +Represents the size of the :ref:`FinalAction<enum_RenderingDevice_FinalAction>` enum. -.. _class_RenderingDevice_constant_FINAL_ACTION_MAX: +.. _class_RenderingDevice_constant_FINAL_ACTION_READ: .. rst-class:: classref-enumeration-constant -:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_MAX** = ``3`` +:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_READ** = ``0`` + +**Deprecated:** Use :ref:`FINAL_ACTION_STORE<class_RenderingDevice_constant_FINAL_ACTION_STORE>` instead. + + + +.. _class_RenderingDevice_constant_FINAL_ACTION_CONTINUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FinalAction<enum_RenderingDevice_FinalAction>` **FINAL_ACTION_CONTINUE** = ``0`` + +**Deprecated:** Use :ref:`FINAL_ACTION_STORE<class_RenderingDevice_constant_FINAL_ACTION_STORE>` instead. + -Represents the size of the :ref:`FinalAction<enum_RenderingDevice_FinalAction>` enum. .. rst-class:: classref-item-separator @@ -3783,7 +4017,7 @@ Represents the size of the :ref:`FinalAction<enum_RenderingDevice_FinalAction>` .. rst-class:: classref-enumeration -enum **ShaderStage**: +enum **ShaderStage**: :ref:`🔗<enum_RenderingDevice_ShaderStage>` .. _class_RenderingDevice_constant_SHADER_STAGE_VERTEX: @@ -3881,7 +4115,7 @@ Compute shader stage bit (see also :ref:`SHADER_STAGE_COMPUTE<class_RenderingDev .. rst-class:: classref-enumeration -enum **ShaderLanguage**: +enum **ShaderLanguage**: :ref:`🔗<enum_RenderingDevice_ShaderLanguage>` .. _class_RenderingDevice_constant_SHADER_LANGUAGE_GLSL: @@ -3907,7 +4141,7 @@ Microsoft's High-Level Shading Language (used natively by Direct3D, but can also .. rst-class:: classref-enumeration -enum **PipelineSpecializationConstantType**: +enum **PipelineSpecializationConstantType**: :ref:`🔗<enum_RenderingDevice_PipelineSpecializationConstantType>` .. _class_RenderingDevice_constant_PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL: @@ -3941,7 +4175,7 @@ Floating-point specialization constant. .. rst-class:: classref-enumeration -enum **Limit**: +enum **Limit**: :ref:`🔗<enum_RenderingDevice_Limit>` .. _class_RenderingDevice_constant_LIMIT_MAX_BOUND_UNIFORM_SETS: @@ -4247,7 +4481,7 @@ Maximum viewport height (in pixels). .. rst-class:: classref-enumeration -enum **MemoryType**: +enum **MemoryType**: :ref:`🔗<enum_RenderingDevice_MemoryType>` .. _class_RenderingDevice_constant_MEMORY_TEXTURES: @@ -4286,7 +4520,7 @@ Constants .. rst-class:: classref-constant -**INVALID_ID** = ``-1`` +**INVALID_ID** = ``-1`` :ref:`🔗<class_RenderingDevice_constant_INVALID_ID>` Returned by functions that return an ID if a value is invalid. @@ -4294,7 +4528,7 @@ Returned by functions that return an ID if a value is invalid. .. rst-class:: classref-constant -**INVALID_FORMAT_ID** = ``-1`` +**INVALID_FORMAT_ID** = ``-1`` :ref:`🔗<class_RenderingDevice_constant_INVALID_FORMAT_ID>` Returned by functions that return a format ID if a value is invalid. @@ -4311,9 +4545,11 @@ Method Descriptions .. rst-class:: classref-method -void **barrier** **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> from=7, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> to=7 **)** +|void| **barrier**\ (\ from\: |bitfield|\[:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\] = 32767, to\: |bitfield|\[:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\] = 32767\ ) :ref:`🔗<class_RenderingDevice_method_barrier>` -Puts a memory barrier in place. This is used for synchronization to avoid data races. See also :ref:`full_barrier<class_RenderingDevice_method_full_barrier>`, which may be useful for debugging. +**Deprecated:** Barriers are automatically inserted by RenderingDevice. + +This method does nothing. .. rst-class:: classref-item-separator @@ -4323,11 +4559,39 @@ Puts a memory barrier in place. This is used for synchronization to avoid data r .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **buffer_clear** **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset, :ref:`int<class_int>` size_bytes, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **buffer_clear**\ (\ buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`, size_bytes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_buffer_clear>` -.. container:: contribute +Clears the contents of the ``buffer``, clearing ``size_bytes`` bytes, starting at ``offset``. + +Prints an error if: + +- the size isn't a multiple of four + +- the region specified by ``offset`` + ``size_bytes`` exceeds the buffer + +- a draw list is currently active (created by :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`) + +- a compute list is currently active (created by :ref:`compute_list_begin<class_RenderingDevice_method_compute_list_begin>`) + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_buffer_copy: - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-method + +:ref:`Error<enum_@GlobalScope_Error>` **buffer_copy**\ (\ src_buffer\: :ref:`RID<class_RID>`, dst_buffer\: :ref:`RID<class_RID>`, src_offset\: :ref:`int<class_int>`, dst_offset\: :ref:`int<class_int>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_buffer_copy>` + +Copies ``size`` bytes from the ``src_buffer`` at ``src_offset`` into ``dst_buffer`` at ``dst_offset``. + +Prints an error if: + +- ``size`` exceeds the size of either ``src_buffer`` or ``dst_buffer`` at their corresponding offsets + +- a draw list is currently active (created by :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`) + +- a compute list is currently active (created by :ref:`compute_list_begin<class_RenderingDevice_method_compute_list_begin>`) .. rst-class:: classref-item-separator @@ -4337,7 +4601,7 @@ Puts a memory barrier in place. This is used for synchronization to avoid data r .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **buffer_get_data** **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset_bytes=0, :ref:`int<class_int>` size_bytes=0 **)** +:ref:`PackedByteArray<class_PackedByteArray>` **buffer_get_data**\ (\ buffer\: :ref:`RID<class_RID>`, offset_bytes\: :ref:`int<class_int>` = 0, size_bytes\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingDevice_method_buffer_get_data>` Returns a copy of the data of the specified ``buffer``, optionally ``offset_bytes`` and ``size_bytes`` can be set to copy only a portion of the buffer. @@ -4349,11 +4613,17 @@ Returns a copy of the data of the specified ``buffer``, optionally ``offset_byte .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **buffer_update** **(** :ref:`RID<class_RID>` buffer, :ref:`int<class_int>` offset, :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **buffer_update**\ (\ buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`, size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RenderingDevice_method_buffer_update>` -.. container:: contribute +Updates a region of ``size_bytes`` bytes, starting at ``offset``, in the buffer, with the specified ``data``. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Prints an error if: + +- the region specified by ``offset`` + ``size_bytes`` exceeds the buffer + +- a draw list is currently active (created by :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`) + +- a compute list is currently active (created by :ref:`compute_list_begin<class_RenderingDevice_method_compute_list_begin>`) .. rst-class:: classref-item-separator @@ -4363,7 +4633,7 @@ Returns a copy of the data of the specified ``buffer``, optionally ``offset_byte .. rst-class:: classref-method -void **capture_timestamp** **(** :ref:`String<class_String>` name **)** +|void| **capture_timestamp**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RenderingDevice_method_capture_timestamp>` Creates a timestamp marker with the specified ``name``. This is used for performance reporting with the :ref:`get_captured_timestamp_cpu_time<class_RenderingDevice_method_get_captured_timestamp_cpu_time>`, :ref:`get_captured_timestamp_gpu_time<class_RenderingDevice_method_get_captured_timestamp_gpu_time>` and :ref:`get_captured_timestamp_name<class_RenderingDevice_method_get_captured_timestamp_name>` methods. @@ -4375,11 +4645,9 @@ Creates a timestamp marker with the specified ``name``. This is used for perform .. rst-class:: classref-method -void **compute_list_add_barrier** **(** :ref:`int<class_int>` compute_list **)** - -.. container:: contribute +|void| **compute_list_add_barrier**\ (\ compute_list\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_add_barrier>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Raises a Vulkan compute barrier in the specified ``compute_list``. .. rst-class:: classref-item-separator @@ -4389,11 +4657,11 @@ void **compute_list_add_barrier** **(** :ref:`int<class_int>` compute_list **)** .. rst-class:: classref-method -:ref:`int<class_int>` **compute_list_begin** **(** :ref:`bool<class_bool>` allow_draw_overlap=false **)** +:ref:`int<class_int>` **compute_list_begin**\ (\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_begin>` Starts a list of compute commands created with the ``compute_*`` methods. The returned value should be passed to other ``compute_list_*`` functions. -If ``allow_draw_overlap`` is ``true``, you may have one draw list running at the same time as one compute list. Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using :ref:`compute_list_end<class_RenderingDevice_method_compute_list_end>`. +Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using :ref:`compute_list_end<class_RenderingDevice_method_compute_list_end>`. A simple compute operation might look like this (code is not a complete example): @@ -4421,11 +4689,9 @@ A simple compute operation might look like this (code is not a complete example) .. rst-class:: classref-method -void **compute_list_bind_compute_pipeline** **(** :ref:`int<class_int>` compute_list, :ref:`RID<class_RID>` compute_pipeline **)** - -.. container:: contribute +|void| **compute_list_bind_compute_pipeline**\ (\ compute_list\: :ref:`int<class_int>`, compute_pipeline\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_bind_compute_pipeline>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside :ref:`compute_list_dispatch<class_RenderingDevice_method_compute_list_dispatch>`. .. rst-class:: classref-item-separator @@ -4435,11 +4701,9 @@ void **compute_list_bind_compute_pipeline** **(** :ref:`int<class_int>` compute_ .. rst-class:: classref-method -void **compute_list_bind_uniform_set** **(** :ref:`int<class_int>` compute_list, :ref:`RID<class_RID>` uniform_set, :ref:`int<class_int>` set_index **)** - -.. container:: contribute +|void| **compute_list_bind_uniform_set**\ (\ compute_list\: :ref:`int<class_int>`, uniform_set\: :ref:`RID<class_RID>`, set_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_bind_uniform_set>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Binds the ``uniform_set`` to this ``compute_list``. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier. .. rst-class:: classref-item-separator @@ -4449,7 +4713,7 @@ void **compute_list_bind_uniform_set** **(** :ref:`int<class_int>` compute_list, .. rst-class:: classref-method -void **compute_list_dispatch** **(** :ref:`int<class_int>` compute_list, :ref:`int<class_int>` x_groups, :ref:`int<class_int>` y_groups, :ref:`int<class_int>` z_groups **)** +|void| **compute_list_dispatch**\ (\ compute_list\: :ref:`int<class_int>`, x_groups\: :ref:`int<class_int>`, y_groups\: :ref:`int<class_int>`, z_groups\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_dispatch>` Submits the compute list for processing on the GPU. This is the compute equivalent to :ref:`draw_list_draw<class_RenderingDevice_method_draw_list_draw>`. @@ -4457,11 +4721,23 @@ Submits the compute list for processing on the GPU. This is the compute equivale ---- +.. _class_RenderingDevice_method_compute_list_dispatch_indirect: + +.. rst-class:: classref-method + +|void| **compute_list_dispatch_indirect**\ (\ compute_list\: :ref:`int<class_int>`, buffer\: :ref:`RID<class_RID>`, offset\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_dispatch_indirect>` + +Submits the compute list for processing on the GPU with the given group counts stored in the ``buffer`` at ``offset``. Buffer must have been created with :ref:`STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT<class_RenderingDevice_constant_STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT>` flag. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_compute_list_end: .. rst-class:: classref-method -void **compute_list_end** **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +|void| **compute_list_end**\ (\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_end>` Finishes a list of compute commands created with the ``compute_*`` methods. @@ -4473,7 +4749,7 @@ Finishes a list of compute commands created with the ``compute_*`` methods. .. rst-class:: classref-method -void **compute_list_set_push_constant** **(** :ref:`int<class_int>` compute_list, :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`int<class_int>` size_bytes **)** +|void| **compute_list_set_push_constant**\ (\ compute_list\: :ref:`int<class_int>`, buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, size_bytes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_list_set_push_constant>` Sets the push constant data to ``buffer`` for the specified ``compute_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size<class_PackedByteArray_method_size>` method on the passed ``buffer``). @@ -4485,7 +4761,7 @@ Sets the push constant data to ``buffer`` for the specified ``compute_list``. Th .. rst-class:: classref-method -:ref:`RID<class_RID>` **compute_pipeline_create** **(** :ref:`RID<class_RID>` shader, :ref:`RDPipelineSpecializationConstant[]<class_RDPipelineSpecializationConstant>` specialization_constants=[] **)** +:ref:`RID<class_RID>` **compute_pipeline_create**\ (\ shader\: :ref:`RID<class_RID>`, specialization_constants\: :ref:`Array<class_Array>`\[:ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`\] = []\ ) :ref:`🔗<class_RenderingDevice_method_compute_pipeline_create>` Creates a new compute pipeline. It can be accessed with the RID that is returned. @@ -4499,7 +4775,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`bool<class_bool>` **compute_pipeline_is_valid** **(** :ref:`RID<class_RID>` compute_pipeline **)** +:ref:`bool<class_bool>` **compute_pipeline_is_valid**\ (\ compute_pipeline\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_compute_pipeline_is_valid>` Returns ``true`` if the compute pipeline specified by the ``compute_pipeline`` RID is valid, ``false`` otherwise. @@ -4511,7 +4787,7 @@ Returns ``true`` if the compute pipeline specified by the ``compute_pipeline`` R .. rst-class:: classref-method -:ref:`RenderingDevice<class_RenderingDevice>` **create_local_device** **(** **)** +:ref:`RenderingDevice<class_RenderingDevice>` **create_local_device**\ (\ ) :ref:`🔗<class_RenderingDevice_method_create_local_device>` Create a new local **RenderingDevice**. This is most useful for performing compute operations on the GPU independently from the rest of the engine. @@ -4523,11 +4799,11 @@ Create a new local **RenderingDevice**. This is most useful for performing compu .. rst-class:: classref-method -void **draw_command_begin_label** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)** +|void| **draw_command_begin_label**\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_command_begin_label>` Create a command buffer debug label region that can be displayed in third-party tools such as `RenderDoc <https://renderdoc.org/>`__. All regions must be ended with a :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>` call. When viewed from the linear series of submissions to a single queue, calls to :ref:`draw_command_begin_label<class_RenderingDevice_method_draw_command_begin_label>` and :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>` must be matched and balanced. -The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and enabled for command buffer debug label region to work. See also :ref:`draw_command_insert_label<class_RenderingDevice_method_draw_command_insert_label>` and :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>`. +The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and enabled for command buffer debug label region to work. See also :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>`. .. rst-class:: classref-item-separator @@ -4537,7 +4813,7 @@ The ``VK_EXT_DEBUG_UTILS_EXTENSION_NAME`` Vulkan extension must be available and .. rst-class:: classref-method -void **draw_command_end_label** **(** **)** +|void| **draw_command_end_label**\ (\ ) :ref:`🔗<class_RenderingDevice_method_draw_command_end_label>` Ends the command buffer debug label region started by a :ref:`draw_command_begin_label<class_RenderingDevice_method_draw_command_begin_label>` call. @@ -4549,9 +4825,11 @@ Ends the command buffer debug label region started by a :ref:`draw_command_begin .. rst-class:: classref-method -void **draw_command_insert_label** **(** :ref:`String<class_String>` name, :ref:`Color<class_Color>` color **)** +|void| **draw_command_insert_label**\ (\ name\: :ref:`String<class_String>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_command_insert_label>` -Inserts a command buffer debug label region in the current command buffer. Unlike :ref:`draw_command_begin_label<class_RenderingDevice_method_draw_command_begin_label>`, this region should not be ended with a :ref:`draw_command_end_label<class_RenderingDevice_method_draw_command_end_label>` call. +**Deprecated:** Inserting labels no longer applies due to command reordering. + +This method does nothing. .. rst-class:: classref-item-separator @@ -4561,7 +4839,7 @@ Inserts a command buffer debug label region in the current command buffer. Unlik .. rst-class:: classref-method -:ref:`int<class_int>` **draw_list_begin** **(** :ref:`RID<class_RID>` framebuffer, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_color_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_color_action, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_depth_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_depth_action, :ref:`PackedColorArray<class_PackedColorArray>` clear_color_values=PackedColorArray(), :ref:`float<class_float>` clear_depth=1.0, :ref:`int<class_int>` clear_stencil=0, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0), :ref:`RID[]<class_RID>` storage_textures=[] **)** +:ref:`int<class_int>` **draw_list_begin**\ (\ framebuffer\: :ref:`RID<class_RID>`, initial_color_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_color_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, initial_depth_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_depth_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, clear_color_values\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), clear_depth\: :ref:`float<class_float>` = 1.0, clear_stencil\: :ref:`int<class_int>` = 0, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_begin>` Starts a list of raster drawing commands created with the ``draw_*`` methods. The returned value should be passed to other ``draw_list_*`` functions. @@ -4572,7 +4850,7 @@ A simple drawing operation might look like this (code is not a complete example) :: var rd = RenderingDevice.new() - var clear_colors = PackedColorArray([Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 0)] + var clear_colors = PackedColorArray([Color(0, 0, 0, 0), Color(0, 0, 0, 0), Color(0, 0, 0, 0)]) var draw_list = rd.draw_list_begin(framebuffers[i], RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_READ, RenderingDevice.INITIAL_ACTION_CLEAR, RenderingDevice.FINAL_ACTION_DISCARD, clear_colors) # Draw opaque. @@ -4596,9 +4874,9 @@ A simple drawing operation might look like this (code is not a complete example) .. rst-class:: classref-method -:ref:`int<class_int>` **draw_list_begin_for_screen** **(** :ref:`int<class_int>` screen=0, :ref:`Color<class_Color>` clear_color=Color(0, 0, 0, 1) **)** +:ref:`int<class_int>` **draw_list_begin_for_screen**\ (\ screen\: :ref:`int<class_int>` = 0, clear_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 1)\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_begin_for_screen>` -High-level variant of :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`, with the parameters automtaically being adjusted for drawing onto the window specified by the ``screen`` ID. +High-level variant of :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>`, with the parameters automatically being adjusted for drawing onto the window specified by the ``screen`` ID. \ **Note:** Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, :ref:`draw_list_begin_for_screen<class_RenderingDevice_method_draw_list_begin_for_screen>` returns :ref:`INVALID_ID<class_RenderingDevice_constant_INVALID_ID>`. @@ -4610,9 +4888,11 @@ High-level variant of :ref:`draw_list_begin<class_RenderingDevice_method_draw_li .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **draw_list_begin_split** **(** :ref:`RID<class_RID>` framebuffer, :ref:`int<class_int>` splits, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_color_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_color_action, :ref:`InitialAction<enum_RenderingDevice_InitialAction>` initial_depth_action, :ref:`FinalAction<enum_RenderingDevice_FinalAction>` final_depth_action, :ref:`PackedColorArray<class_PackedColorArray>` clear_color_values=PackedColorArray(), :ref:`float<class_float>` clear_depth=1.0, :ref:`int<class_int>` clear_stencil=0, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0), :ref:`RID[]<class_RID>` storage_textures=[] **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **draw_list_begin_split**\ (\ framebuffer\: :ref:`RID<class_RID>`, splits\: :ref:`int<class_int>`, initial_color_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_color_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, initial_depth_action\: :ref:`InitialAction<enum_RenderingDevice_InitialAction>`, final_depth_action\: :ref:`FinalAction<enum_RenderingDevice_FinalAction>`, clear_color_values\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), clear_depth\: :ref:`float<class_float>` = 1.0, clear_stencil\: :ref:`int<class_int>` = 0, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), storage_textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] = []\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_begin_split>` + +**Deprecated:** Split draw lists are used automatically by RenderingDevice. -Variant of :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>` with support for multiple splits. The ``splits`` parameter determines how many splits are created. +This method does nothing and always returns an empty :ref:`PackedInt64Array<class_PackedInt64Array>`. .. rst-class:: classref-item-separator @@ -4622,7 +4902,7 @@ Variant of :ref:`draw_list_begin<class_RenderingDevice_method_draw_list_begin>` .. rst-class:: classref-method -void **draw_list_bind_index_array** **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` index_array **)** +|void| **draw_list_bind_index_array**\ (\ draw_list\: :ref:`int<class_int>`, index_array\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_bind_index_array>` Binds ``index_array`` to the specified ``draw_list``. @@ -4634,7 +4914,7 @@ Binds ``index_array`` to the specified ``draw_list``. .. rst-class:: classref-method -void **draw_list_bind_render_pipeline** **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` render_pipeline **)** +|void| **draw_list_bind_render_pipeline**\ (\ draw_list\: :ref:`int<class_int>`, render_pipeline\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_bind_render_pipeline>` Binds ``render_pipeline`` to the specified ``draw_list``. @@ -4646,7 +4926,7 @@ Binds ``render_pipeline`` to the specified ``draw_list``. .. rst-class:: classref-method -void **draw_list_bind_uniform_set** **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` uniform_set, :ref:`int<class_int>` set_index **)** +|void| **draw_list_bind_uniform_set**\ (\ draw_list\: :ref:`int<class_int>`, uniform_set\: :ref:`RID<class_RID>`, set_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_bind_uniform_set>` Binds ``uniform_set`` to the specified ``draw_list``. A ``set_index`` must also be specified, which is an identifier starting from ``0`` that must match the one expected by the draw list. @@ -4658,7 +4938,7 @@ Binds ``uniform_set`` to the specified ``draw_list``. A ``set_index`` must also .. rst-class:: classref-method -void **draw_list_bind_vertex_array** **(** :ref:`int<class_int>` draw_list, :ref:`RID<class_RID>` vertex_array **)** +|void| **draw_list_bind_vertex_array**\ (\ draw_list\: :ref:`int<class_int>`, vertex_array\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_bind_vertex_array>` Binds ``vertex_array`` to the specified ``draw_list``. @@ -4670,7 +4950,7 @@ Binds ``vertex_array`` to the specified ``draw_list``. .. rst-class:: classref-method -void **draw_list_disable_scissor** **(** :ref:`int<class_int>` draw_list **)** +|void| **draw_list_disable_scissor**\ (\ draw_list\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_disable_scissor>` Removes and disables the scissor rectangle for the specified ``draw_list``. See also :ref:`draw_list_enable_scissor<class_RenderingDevice_method_draw_list_enable_scissor>`. @@ -4682,7 +4962,7 @@ Removes and disables the scissor rectangle for the specified ``draw_list``. See .. rst-class:: classref-method -void **draw_list_draw** **(** :ref:`int<class_int>` draw_list, :ref:`bool<class_bool>` use_indices, :ref:`int<class_int>` instances, :ref:`int<class_int>` procedural_vertex_count=0 **)** +|void| **draw_list_draw**\ (\ draw_list\: :ref:`int<class_int>`, use_indices\: :ref:`bool<class_bool>`, instances\: :ref:`int<class_int>`, procedural_vertex_count\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_draw>` Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to :ref:`compute_list_dispatch<class_RenderingDevice_method_compute_list_dispatch>`. @@ -4694,7 +4974,7 @@ Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to .. rst-class:: classref-method -void **draw_list_enable_scissor** **(** :ref:`int<class_int>` draw_list, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0) **)** +|void| **draw_list_enable_scissor**\ (\ draw_list\: :ref:`int<class_int>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_enable_scissor>` Creates a scissor rectangle and enables it for the specified ``draw_list``. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also :ref:`draw_list_disable_scissor<class_RenderingDevice_method_draw_list_disable_scissor>`. @@ -4708,7 +4988,7 @@ Creates a scissor rectangle and enables it for the specified ``draw_list``. Scis .. rst-class:: classref-method -void **draw_list_end** **(** |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +|void| **draw_list_end**\ (\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_end>` Finishes a list of raster drawing commands created with the ``draw_*`` methods. @@ -4720,7 +5000,7 @@ Finishes a list of raster drawing commands created with the ``draw_*`` methods. .. rst-class:: classref-method -void **draw_list_set_blend_constants** **(** :ref:`int<class_int>` draw_list, :ref:`Color<class_Color>` color **)** +|void| **draw_list_set_blend_constants**\ (\ draw_list\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_set_blend_constants>` Sets blend constants for the specified ``draw_list`` to ``color``. Blend constants are used only if the graphics pipeline is created with :ref:`DYNAMIC_STATE_BLEND_CONSTANTS<class_RenderingDevice_constant_DYNAMIC_STATE_BLEND_CONSTANTS>` flag set. @@ -4732,7 +5012,7 @@ Sets blend constants for the specified ``draw_list`` to ``color``. Blend constan .. rst-class:: classref-method -void **draw_list_set_push_constant** **(** :ref:`int<class_int>` draw_list, :ref:`PackedByteArray<class_PackedByteArray>` buffer, :ref:`int<class_int>` size_bytes **)** +|void| **draw_list_set_push_constant**\ (\ draw_list\: :ref:`int<class_int>`, buffer\: :ref:`PackedByteArray<class_PackedByteArray>`, size_bytes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_set_push_constant>` Sets the push constant data to ``buffer`` for the specified ``draw_list``. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in ``size_bytes`` (this can be obtained by calling the :ref:`PackedByteArray.size<class_PackedByteArray_method_size>` method on the passed ``buffer``). @@ -4744,9 +5024,9 @@ Sets the push constant data to ``buffer`` for the specified ``draw_list``. The s .. rst-class:: classref-method -:ref:`int<class_int>` **draw_list_switch_to_next_pass** **(** **)** +:ref:`int<class_int>` **draw_list_switch_to_next_pass**\ (\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_switch_to_next_pass>` -Switches to the next draw pass and returns the split's ID. Equivalent to :ref:`draw_list_switch_to_next_pass_split<class_RenderingDevice_method_draw_list_switch_to_next_pass_split>` with ``splits`` set to ``1``. +Switches to the next draw pass. .. rst-class:: classref-item-separator @@ -4756,9 +5036,11 @@ Switches to the next draw pass and returns the split's ID. Equivalent to :ref:`d .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **draw_list_switch_to_next_pass_split** **(** :ref:`int<class_int>` splits **)** +:ref:`PackedInt64Array<class_PackedInt64Array>` **draw_list_switch_to_next_pass_split**\ (\ splits\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_draw_list_switch_to_next_pass_split>` -Switches to the next draw pass, with the number of splits allocated specified in ``splits``. The return value is an array containing the ID of each split. For single-split usage, see :ref:`draw_list_switch_to_next_pass<class_RenderingDevice_method_draw_list_switch_to_next_pass>`. +**Deprecated:** Split draw lists are used automatically by RenderingDevice. + +This method does nothing and always returns an empty :ref:`PackedInt64Array<class_PackedInt64Array>`. .. rst-class:: classref-item-separator @@ -4768,7 +5050,7 @@ Switches to the next draw pass, with the number of splits allocated specified in .. rst-class:: classref-method -:ref:`RID<class_RID>` **framebuffer_create** **(** :ref:`RID[]<class_RID>` textures, :ref:`int<class_int>` validate_with_format=-1, :ref:`int<class_int>` view_count=1 **)** +:ref:`RID<class_RID>` **framebuffer_create**\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], validate_with_format\: :ref:`int<class_int>` = -1, view_count\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_create>` Creates a new framebuffer. It can be accessed with the RID that is returned. @@ -4782,7 +5064,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **framebuffer_create_empty** **(** :ref:`Vector2i<class_Vector2i>` size, :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` samples=0, :ref:`int<class_int>` validate_with_format=-1 **)** +:ref:`RID<class_RID>` **framebuffer_create_empty**\ (\ size\: :ref:`Vector2i<class_Vector2i>`, samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` = 0, validate_with_format\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_create_empty>` Creates a new empty framebuffer. It can be accessed with the RID that is returned. @@ -4796,7 +5078,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **framebuffer_create_multipass** **(** :ref:`RID[]<class_RID>` textures, :ref:`RDFramebufferPass[]<class_RDFramebufferPass>` passes, :ref:`int<class_int>` validate_with_format=-1, :ref:`int<class_int>` view_count=1 **)** +:ref:`RID<class_RID>` **framebuffer_create_multipass**\ (\ textures\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], validate_with_format\: :ref:`int<class_int>` = -1, view_count\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_create_multipass>` Creates a new multipass framebuffer. It can be accessed with the RID that is returned. @@ -4810,7 +5092,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`int<class_int>` **framebuffer_format_create** **(** :ref:`RDAttachmentFormat[]<class_RDAttachmentFormat>` attachments, :ref:`int<class_int>` view_count=1 **)** +:ref:`int<class_int>` **framebuffer_format_create**\ (\ attachments\: :ref:`Array<class_Array>`\[:ref:`RDAttachmentFormat<class_RDAttachmentFormat>`\], view_count\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_format_create>` Creates a new framebuffer format with the specified ``attachments`` and ``view_count``. Returns the new framebuffer's unique framebuffer format ID. @@ -4824,7 +5106,7 @@ If ``view_count`` is greater than or equal to ``2``, enables multiview which is .. rst-class:: classref-method -:ref:`int<class_int>` **framebuffer_format_create_empty** **(** :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` samples=0 **)** +:ref:`int<class_int>` **framebuffer_format_create_empty**\ (\ samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` = 0\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_format_create_empty>` Creates a new empty framebuffer format with the specified number of ``samples`` and returns its ID. @@ -4836,7 +5118,7 @@ Creates a new empty framebuffer format with the specified number of ``samples`` .. rst-class:: classref-method -:ref:`int<class_int>` **framebuffer_format_create_multipass** **(** :ref:`RDAttachmentFormat[]<class_RDAttachmentFormat>` attachments, :ref:`RDFramebufferPass[]<class_RDFramebufferPass>` passes, :ref:`int<class_int>` view_count=1 **)** +:ref:`int<class_int>` **framebuffer_format_create_multipass**\ (\ attachments\: :ref:`Array<class_Array>`\[:ref:`RDAttachmentFormat<class_RDAttachmentFormat>`\], passes\: :ref:`Array<class_Array>`\[:ref:`RDFramebufferPass<class_RDFramebufferPass>`\], view_count\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_format_create_multipass>` Creates a multipass framebuffer format with the specified ``attachments``, ``passes`` and ``view_count`` and returns its ID. If ``view_count`` is greater than or equal to ``2``, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. @@ -4848,7 +5130,7 @@ Creates a multipass framebuffer format with the specified ``attachments``, ``pas .. rst-class:: classref-method -:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **framebuffer_format_get_texture_samples** **(** :ref:`int<class_int>` format, :ref:`int<class_int>` render_pass=0 **)** +:ref:`TextureSamples<enum_RenderingDevice_TextureSamples>` **framebuffer_format_get_texture_samples**\ (\ format\: :ref:`int<class_int>`, render_pass\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_format_get_texture_samples>` Returns the number of texture samples used for the given framebuffer ``format`` ID (returned by :ref:`framebuffer_get_format<class_RenderingDevice_method_framebuffer_get_format>`). @@ -4860,7 +5142,7 @@ Returns the number of texture samples used for the given framebuffer ``format`` .. rst-class:: classref-method -:ref:`int<class_int>` **framebuffer_get_format** **(** :ref:`RID<class_RID>` framebuffer **)** +:ref:`int<class_int>` **framebuffer_get_format**\ (\ framebuffer\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_framebuffer_get_format>` Returns the format ID of the framebuffer specified by the ``framebuffer`` RID. This ID is guaranteed to be unique for the same formats and does not need to be freed. @@ -4872,7 +5154,7 @@ Returns the format ID of the framebuffer specified by the ``framebuffer`` RID. T .. rst-class:: classref-method -:ref:`bool<class_bool>` **framebuffer_is_valid** **(** :ref:`RID<class_RID>` framebuffer **)** |const| +:ref:`bool<class_bool>` **framebuffer_is_valid**\ (\ framebuffer\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_framebuffer_is_valid>` Returns ``true`` if the framebuffer specified by the ``framebuffer`` RID is valid, ``false`` otherwise. @@ -4884,7 +5166,7 @@ Returns ``true`` if the framebuffer specified by the ``framebuffer`` RID is vali .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_free_rid>` Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly. @@ -4896,9 +5178,11 @@ Tries to free an object in the RenderingDevice. To avoid memory leaks, this shou .. rst-class:: classref-method -void **full_barrier** **(** **)** +|void| **full_barrier**\ (\ ) :ref:`🔗<class_RenderingDevice_method_full_barrier>` + +**Deprecated:** Barriers are automatically inserted by RenderingDevice. -Puts a *full* memory barrier in place. This is a memory :ref:`barrier<class_RenderingDevice_method_barrier>` with all flags enabled. :ref:`full_barrier<class_RenderingDevice_method_full_barrier>` it should only be used for debugging as it can severely impact performance. +This method does nothing. .. rst-class:: classref-item-separator @@ -4908,7 +5192,7 @@ Puts a *full* memory barrier in place. This is a memory :ref:`barrier<class_Rend .. rst-class:: classref-method -:ref:`int<class_int>` **get_captured_timestamp_cpu_time** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_captured_timestamp_cpu_time**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_captured_timestamp_cpu_time>` Returns the timestamp in CPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_gpu_time<class_RenderingDevice_method_get_captured_timestamp_gpu_time>` and :ref:`capture_timestamp<class_RenderingDevice_method_capture_timestamp>`. @@ -4920,7 +5204,7 @@ Returns the timestamp in CPU time for the rendering step specified by ``index`` .. rst-class:: classref-method -:ref:`int<class_int>` **get_captured_timestamp_gpu_time** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_captured_timestamp_gpu_time**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_captured_timestamp_gpu_time>` Returns the timestamp in GPU time for the rendering step specified by ``index`` (in microseconds since the engine started). See also :ref:`get_captured_timestamp_cpu_time<class_RenderingDevice_method_get_captured_timestamp_cpu_time>` and :ref:`capture_timestamp<class_RenderingDevice_method_capture_timestamp>`. @@ -4932,7 +5216,7 @@ Returns the timestamp in GPU time for the rendering step specified by ``index`` .. rst-class:: classref-method -:ref:`String<class_String>` **get_captured_timestamp_name** **(** :ref:`int<class_int>` index **)** |const| +:ref:`String<class_String>` **get_captured_timestamp_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_captured_timestamp_name>` Returns the timestamp's name for the rendering step specified by ``index``. See also :ref:`capture_timestamp<class_RenderingDevice_method_capture_timestamp>`. @@ -4944,7 +5228,7 @@ Returns the timestamp's name for the rendering step specified by ``index``. See .. rst-class:: classref-method -:ref:`int<class_int>` **get_captured_timestamps_count** **(** **)** |const| +:ref:`int<class_int>` **get_captured_timestamps_count**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_captured_timestamps_count>` Returns the total number of timestamps (rendering steps) available for profiling. @@ -4956,7 +5240,7 @@ Returns the total number of timestamps (rendering steps) available for profiling .. rst-class:: classref-method -:ref:`int<class_int>` **get_captured_timestamps_frame** **(** **)** |const| +:ref:`int<class_int>` **get_captured_timestamps_frame**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_captured_timestamps_frame>` Returns the index of the last frame rendered that has rendering timestamps available for querying. @@ -4968,7 +5252,7 @@ Returns the index of the last frame rendered that has rendering timestamps avail .. rst-class:: classref-method -:ref:`String<class_String>` **get_device_name** **(** **)** |const| +:ref:`String<class_String>` **get_device_name**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_device_name>` Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to :ref:`RenderingServer.get_video_adapter_name<class_RenderingServer_method_get_video_adapter_name>`. See also :ref:`get_device_vendor_name<class_RenderingDevice_method_get_device_vendor_name>`. @@ -4980,7 +5264,7 @@ Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equiv .. rst-class:: classref-method -:ref:`String<class_String>` **get_device_pipeline_cache_uuid** **(** **)** |const| +:ref:`String<class_String>` **get_device_pipeline_cache_uuid**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_device_pipeline_cache_uuid>` Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache. @@ -4992,7 +5276,7 @@ Returns the universally unique identifier for the pipeline cache. This is used t .. rst-class:: classref-method -:ref:`String<class_String>` **get_device_vendor_name** **(** **)** |const| +:ref:`String<class_String>` **get_device_vendor_name**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_device_vendor_name>` Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to :ref:`RenderingServer.get_video_adapter_vendor<class_RenderingServer_method_get_video_adapter_vendor>`. See also :ref:`get_device_name<class_RenderingDevice_method_get_device_name>`. @@ -5004,7 +5288,7 @@ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent .. rst-class:: classref-method -:ref:`int<class_int>` **get_driver_resource** **(** :ref:`DriverResource<enum_RenderingDevice_DriverResource>` resource, :ref:`RID<class_RID>` rid, :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **get_driver_resource**\ (\ resource\: :ref:`DriverResource<enum_RenderingDevice_DriverResource>`, rid\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_get_driver_resource>` Returns the unique identifier of the driver ``resource`` for the specified ``rid``. Some driver resource types ignore the specified ``rid`` (see :ref:`DriverResource<enum_RenderingDevice_DriverResource>` descriptions). ``index`` is always ignored but must be specified anyway. @@ -5016,7 +5300,7 @@ Returns the unique identifier of the driver ``resource`` for the specified ``rid .. rst-class:: classref-method -:ref:`int<class_int>` **get_frame_delay** **(** **)** |const| +:ref:`int<class_int>` **get_frame_delay**\ (\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_frame_delay>` Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main **RenderingDevice**, frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local **RenderingDevice**\ s only have 1 frame. @@ -5028,7 +5312,7 @@ Returns the frame count kept by the graphics API. Higher values result in higher .. rst-class:: classref-method -:ref:`int<class_int>` **get_memory_usage** **(** :ref:`MemoryType<enum_RenderingDevice_MemoryType>` type **)** |const| +:ref:`int<class_int>` **get_memory_usage**\ (\ type\: :ref:`MemoryType<enum_RenderingDevice_MemoryType>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_get_memory_usage>` Returns the memory usage in bytes corresponding to the given ``type``. When using Vulkan, these statistics are calculated by `Vulkan Memory Allocator <https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator>`__. @@ -5040,7 +5324,7 @@ Returns the memory usage in bytes corresponding to the given ``type``. When usin .. rst-class:: classref-method -:ref:`RID<class_RID>` **index_array_create** **(** :ref:`RID<class_RID>` index_buffer, :ref:`int<class_int>` index_offset, :ref:`int<class_int>` index_count **)** +:ref:`RID<class_RID>` **index_array_create**\ (\ index_buffer\: :ref:`RID<class_RID>`, index_offset\: :ref:`int<class_int>`, index_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_index_array_create>` Creates a new index array. It can be accessed with the RID that is returned. @@ -5054,7 +5338,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **index_buffer_create** **(** :ref:`int<class_int>` size_indices, :ref:`IndexBufferFormat<enum_RenderingDevice_IndexBufferFormat>` format, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), :ref:`bool<class_bool>` use_restart_indices=false **)** +:ref:`RID<class_RID>` **index_buffer_create**\ (\ size_indices\: :ref:`int<class_int>`, format\: :ref:`IndexBufferFormat<enum_RenderingDevice_IndexBufferFormat>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), use_restart_indices\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingDevice_method_index_buffer_create>` Creates a new index buffer. It can be accessed with the RID that is returned. @@ -5068,7 +5352,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`int<class_int>` **limit_get** **(** :ref:`Limit<enum_RenderingDevice_Limit>` limit **)** |const| +:ref:`int<class_int>` **limit_get**\ (\ limit\: :ref:`Limit<enum_RenderingDevice_Limit>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_limit_get>` Returns the value of the specified ``limit``. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur. @@ -5082,7 +5366,7 @@ Limits for various graphics hardware can be found in the `Vulkan Hardware Databa .. rst-class:: classref-method -:ref:`RID<class_RID>` **render_pipeline_create** **(** :ref:`RID<class_RID>` shader, :ref:`int<class_int>` framebuffer_format, :ref:`int<class_int>` vertex_format, :ref:`RenderPrimitive<enum_RenderingDevice_RenderPrimitive>` primitive, :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>` rasterization_state, :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>` multisample_state, :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>` stencil_state, :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>` color_blend_state, |bitfield|\<:ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>`\> dynamic_state_flags=0, :ref:`int<class_int>` for_render_pass=0, :ref:`RDPipelineSpecializationConstant[]<class_RDPipelineSpecializationConstant>` specialization_constants=[] **)** +:ref:`RID<class_RID>` **render_pipeline_create**\ (\ shader\: :ref:`RID<class_RID>`, framebuffer_format\: :ref:`int<class_int>`, vertex_format\: :ref:`int<class_int>`, primitive\: :ref:`RenderPrimitive<enum_RenderingDevice_RenderPrimitive>`, rasterization_state\: :ref:`RDPipelineRasterizationState<class_RDPipelineRasterizationState>`, multisample_state\: :ref:`RDPipelineMultisampleState<class_RDPipelineMultisampleState>`, stencil_state\: :ref:`RDPipelineDepthStencilState<class_RDPipelineDepthStencilState>`, color_blend_state\: :ref:`RDPipelineColorBlendState<class_RDPipelineColorBlendState>`, dynamic_state_flags\: |bitfield|\[:ref:`PipelineDynamicStateFlags<enum_RenderingDevice_PipelineDynamicStateFlags>`\] = 0, for_render_pass\: :ref:`int<class_int>` = 0, specialization_constants\: :ref:`Array<class_Array>`\[:ref:`RDPipelineSpecializationConstant<class_RDPipelineSpecializationConstant>`\] = []\ ) :ref:`🔗<class_RenderingDevice_method_render_pipeline_create>` Creates a new render pipeline. It can be accessed with the RID that is returned. @@ -5096,7 +5380,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`bool<class_bool>` **render_pipeline_is_valid** **(** :ref:`RID<class_RID>` render_pipeline **)** +:ref:`bool<class_bool>` **render_pipeline_is_valid**\ (\ render_pipeline\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_render_pipeline_is_valid>` Returns ``true`` if the render pipeline specified by the ``render_pipeline`` RID is valid, ``false`` otherwise. @@ -5108,7 +5392,7 @@ Returns ``true`` if the render pipeline specified by the ``render_pipeline`` RID .. rst-class:: classref-method -:ref:`RID<class_RID>` **sampler_create** **(** :ref:`RDSamplerState<class_RDSamplerState>` state **)** +:ref:`RID<class_RID>` **sampler_create**\ (\ state\: :ref:`RDSamplerState<class_RDSamplerState>`\ ) :ref:`🔗<class_RenderingDevice_method_sampler_create>` Creates a new sampler. It can be accessed with the RID that is returned. @@ -5122,7 +5406,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`bool<class_bool>` **sampler_is_format_supported_for_filter** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` sampler_filter **)** |const| +:ref:`bool<class_bool>` **sampler_is_format_supported_for_filter**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, sampler_filter\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ ) |const| :ref:`🔗<class_RenderingDevice_method_sampler_is_format_supported_for_filter>` Returns ``true`` if implementation supports using a texture of ``format`` with the given ``sampler_filter``. @@ -5134,9 +5418,9 @@ Returns ``true`` if implementation supports using a texture of ``format`` with t .. rst-class:: classref-method -:ref:`int<class_int>` **screen_get_framebuffer_format** **(** **)** |const| +:ref:`int<class_int>` **screen_get_framebuffer_format**\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_RenderingDevice_method_screen_get_framebuffer_format>` -Returns the screen's framebuffer format. +Returns the framebuffer format of the given screen. \ **Note:** Only the main **RenderingDevice** returned by :ref:`RenderingServer.get_rendering_device<class_RenderingServer_method_get_rendering_device>` has a format. If called on a local **RenderingDevice**, this method prints an error and returns :ref:`INVALID_ID<class_RenderingDevice_constant_INVALID_ID>`. @@ -5148,7 +5432,7 @@ Returns the screen's framebuffer format. .. rst-class:: classref-method -:ref:`int<class_int>` **screen_get_height** **(** :ref:`int<class_int>` screen=0 **)** |const| +:ref:`int<class_int>` **screen_get_height**\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_RenderingDevice_method_screen_get_height>` Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_width<class_RenderingDevice_method_screen_get_width>`. @@ -5162,7 +5446,7 @@ Returns the window height matching the graphics API context for the given window .. rst-class:: classref-method -:ref:`int<class_int>` **screen_get_width** **(** :ref:`int<class_int>` screen=0 **)** |const| +:ref:`int<class_int>` **screen_get_width**\ (\ screen\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_RenderingDevice_method_screen_get_width>` Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named ``screen``, this returns the *window* size. See also :ref:`screen_get_height<class_RenderingDevice_method_screen_get_height>`. @@ -5176,7 +5460,7 @@ Returns the window width matching the graphics API context for the given window .. rst-class:: classref-method -void **set_resource_name** **(** :ref:`RID<class_RID>` id, :ref:`String<class_String>` name **)** +|void| **set_resource_name**\ (\ id\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RenderingDevice_method_set_resource_name>` Sets the resource name for ``id`` to ``name``. This is used for debugging with third-party tools such as `RenderDoc <https://renderdoc.org/>`__. @@ -5192,7 +5476,7 @@ The following types of resources can be named: texture, sampler, vertex buffer, .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **shader_compile_binary_from_spirv** **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` spirv_data, :ref:`String<class_String>` name="" **)** +:ref:`PackedByteArray<class_PackedByteArray>` **shader_compile_binary_from_spirv**\ (\ spirv_data\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, name\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_RenderingDevice_method_shader_compile_binary_from_spirv>` Compiles a binary shader from ``spirv_data`` and returns the compiled binary data as a :ref:`PackedByteArray<class_PackedByteArray>`. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also :ref:`shader_compile_spirv_from_source<class_RenderingDevice_method_shader_compile_spirv_from_source>`. @@ -5206,7 +5490,7 @@ Compiles a binary shader from ``spirv_data`` and returns the compiled binary dat .. rst-class:: classref-method -:ref:`RDShaderSPIRV<class_RDShaderSPIRV>` **shader_compile_spirv_from_source** **(** :ref:`RDShaderSource<class_RDShaderSource>` shader_source, :ref:`bool<class_bool>` allow_cache=true **)** +:ref:`RDShaderSPIRV<class_RDShaderSPIRV>` **shader_compile_spirv_from_source**\ (\ shader_source\: :ref:`RDShaderSource<class_RDShaderSource>`, allow_cache\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_RenderingDevice_method_shader_compile_spirv_from_source>` Compiles a SPIR-V from the shader source code in ``shader_source`` and returns the SPIR-V as a :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using :ref:`shader_compile_binary_from_spirv<class_RenderingDevice_method_shader_compile_binary_from_spirv>`. @@ -5220,7 +5504,7 @@ If ``allow_cache`` is ``true``, make use of the shader cache generated by Godot. .. rst-class:: classref-method -:ref:`RID<class_RID>` **shader_create_from_bytecode** **(** :ref:`PackedByteArray<class_PackedByteArray>` binary_data **)** +:ref:`RID<class_RID>` **shader_create_from_bytecode**\ (\ binary_data\: :ref:`PackedByteArray<class_PackedByteArray>`, placeholder_rid\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_RenderingDevice_method_shader_create_from_bytecode>` Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. @@ -5234,7 +5518,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **shader_create_from_spirv** **(** :ref:`RDShaderSPIRV<class_RDShaderSPIRV>` spirv_data, :ref:`String<class_String>` name="" **)** +:ref:`RID<class_RID>` **shader_create_from_spirv**\ (\ spirv_data\: :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, name\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_RenderingDevice_method_shader_create_from_spirv>` Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. @@ -5244,15 +5528,25 @@ Once finished with your RID, you will want to free the RID using the RenderingDe ---- -.. _class_RenderingDevice_method_shader_get_vertex_input_attribute_mask: +.. _class_RenderingDevice_method_shader_create_placeholder: .. rst-class:: classref-method -:ref:`int<class_int>` **shader_get_vertex_input_attribute_mask** **(** :ref:`RID<class_RID>` shader **)** +:ref:`RID<class_RID>` **shader_create_placeholder**\ (\ ) :ref:`🔗<class_RenderingDevice_method_shader_create_placeholder>` -.. container:: contribute +Create a placeholder RID by allocating an RID without initializing it for use in :ref:`shader_create_from_bytecode<class_RenderingDevice_method_shader_create_from_bytecode>`. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingDevice_method_shader_get_vertex_input_attribute_mask: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shader_get_vertex_input_attribute_mask**\ (\ shader\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_shader_get_vertex_input_attribute_mask>` + +Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. ``layout(location = ...)``) of the input variables (specified in GLSL by the ``in`` keyword). .. rst-class:: classref-item-separator @@ -5262,7 +5556,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **storage_buffer_create** **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), |bitfield|\<:ref:`StorageBufferUsage<enum_RenderingDevice_StorageBufferUsage>`\> usage=0 **)** +:ref:`RID<class_RID>` **storage_buffer_create**\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), usage\: |bitfield|\[:ref:`StorageBufferUsage<enum_RenderingDevice_StorageBufferUsage>`\] = 0\ ) :ref:`🔗<class_RenderingDevice_method_storage_buffer_create>` Creates a `storage buffer <https://vkguide.dev/docs/chapter-4/storage_buffers/>`__ with the specified ``data`` and ``usage``. It can be accessed with the RID that is returned. @@ -5276,7 +5570,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -void **submit** **(** **)** +|void| **submit**\ (\ ) :ref:`🔗<class_RenderingDevice_method_submit>` Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling :ref:`sync<class_RenderingDevice_method_sync>`). @@ -5290,7 +5584,7 @@ Pushes the frame setup and draw command buffers then marks the local device as c .. rst-class:: classref-method -void **sync** **(** **)** +|void| **sync**\ (\ ) :ref:`🔗<class_RenderingDevice_method_sync>` Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. @@ -5306,7 +5600,7 @@ Forces a synchronization between the CPU and GPU, which may be required in certa .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_buffer_create** **(** :ref:`int<class_int>` size_bytes, :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray() **)** +:ref:`RID<class_RID>` **texture_buffer_create**\ (\ size_bytes\: :ref:`int<class_int>`, format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) :ref:`🔗<class_RenderingDevice_method_texture_buffer_create>` Creates a new texture buffer. It can be accessed with the RID that is returned. @@ -5320,9 +5614,9 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **texture_clear** **(** :ref:`RID<class_RID>` texture, :ref:`Color<class_Color>` color, :ref:`int<class_int>` base_mipmap, :ref:`int<class_int>` mipmap_count, :ref:`int<class_int>` base_layer, :ref:`int<class_int>` layer_count, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **texture_clear**\ (\ texture\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`, base_mipmap\: :ref:`int<class_int>`, mipmap_count\: :ref:`int<class_int>`, base_layer\: :ref:`int<class_int>`, layer_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_clear>` -Clears the specified ``texture`` by replacing all of its pixels with the specified ``color``. ``base_mipmap`` and ``mipmap_count`` determine which mipmaps of the texture are affected by this clear operation, while ``base_layer`` and ``layer_count`` determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), ``base_layer`` and ``layer_count`` must both be ``0``. +Clears the specified ``texture`` by replacing all of its pixels with the specified ``color``. ``base_mipmap`` and ``mipmap_count`` determine which mipmaps of the texture are affected by this clear operation, while ``base_layer`` and ``layer_count`` determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), ``base_layer`` must be ``0`` and ``layer_count`` must be ``1``. \ **Note:** ``texture`` can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to :ref:`FINAL_ACTION_CONTINUE<class_RenderingDevice_constant_FINAL_ACTION_CONTINUE>`) to clear this texture. @@ -5334,7 +5628,7 @@ Clears the specified ``texture`` by replacing all of its pixels with the specifi .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **texture_copy** **(** :ref:`RID<class_RID>` from_texture, :ref:`RID<class_RID>` to_texture, :ref:`Vector3<class_Vector3>` from_pos, :ref:`Vector3<class_Vector3>` to_pos, :ref:`Vector3<class_Vector3>` size, :ref:`int<class_int>` src_mipmap, :ref:`int<class_int>` dst_mipmap, :ref:`int<class_int>` src_layer, :ref:`int<class_int>` dst_layer, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **texture_copy**\ (\ from_texture\: :ref:`RID<class_RID>`, to_texture\: :ref:`RID<class_RID>`, from_pos\: :ref:`Vector3<class_Vector3>`, to_pos\: :ref:`Vector3<class_Vector3>`, size\: :ref:`Vector3<class_Vector3>`, src_mipmap\: :ref:`int<class_int>`, dst_mipmap\: :ref:`int<class_int>`, src_layer\: :ref:`int<class_int>`, dst_layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_copy>` Copies the ``from_texture`` to ``to_texture`` with the specified ``from_pos``, ``to_pos`` and ``size`` coordinates. The Z axis of the ``from_pos``, ``to_pos`` and ``size`` must be ``0`` for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being ``0`` for textures without mipmaps or single-layer textures. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the texture copy was successful or :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` otherwise. @@ -5356,7 +5650,7 @@ Copies the ``from_texture`` to ``to_texture`` with the specified ``from_pos``, ` .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_create** **(** :ref:`RDTextureFormat<class_RDTextureFormat>` format, :ref:`RDTextureView<class_RDTextureView>` view, :ref:`PackedByteArray[]<class_PackedByteArray>` data=[] **)** +:ref:`RID<class_RID>` **texture_create**\ (\ format\: :ref:`RDTextureFormat<class_RDTextureFormat>`, view\: :ref:`RDTextureView<class_RDTextureView>`, data\: :ref:`Array<class_Array>`\[:ref:`PackedByteArray<class_PackedByteArray>`\] = []\ ) :ref:`🔗<class_RenderingDevice_method_texture_create>` Creates a new texture. It can be accessed with the RID that is returned. @@ -5368,11 +5662,23 @@ Once finished with your RID, you will want to free the RID using the RenderingDe ---- +.. _class_RenderingDevice_method_texture_create_from_extension: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **texture_create_from_extension**\ (\ type\: :ref:`TextureType<enum_RenderingDevice_TextureType>`, format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`, usage_flags\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\], image\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_create_from_extension>` + +Returns an RID for an existing ``image`` (``VkImage``) with the given ``type``, ``format``, ``samples``, ``usage_flags``, ``width``, ``height``, ``depth``, and ``layers``. This can be used to allow Godot to render onto foreign images. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_texture_create_shared: .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_create_shared** **(** :ref:`RDTextureView<class_RDTextureView>` view, :ref:`RID<class_RID>` with_texture **)** +:ref:`RID<class_RID>` **texture_create_shared**\ (\ view\: :ref:`RDTextureView<class_RDTextureView>`, with_texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_create_shared>` Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``. @@ -5384,7 +5690,7 @@ Creates a shared texture using the specified ``view`` and the texture informatio .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_create_shared_from_slice** **(** :ref:`RDTextureView<class_RDTextureView>` view, :ref:`RID<class_RID>` with_texture, :ref:`int<class_int>` layer, :ref:`int<class_int>` mipmap, :ref:`int<class_int>` mipmaps=1, :ref:`TextureSliceType<enum_RenderingDevice_TextureSliceType>` slice_type=0 **)** +:ref:`RID<class_RID>` **texture_create_shared_from_slice**\ (\ view\: :ref:`RDTextureView<class_RDTextureView>`, with_texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>` = 1, slice_type\: :ref:`TextureSliceType<enum_RenderingDevice_TextureSliceType>` = 0\ ) :ref:`🔗<class_RenderingDevice_method_texture_create_shared_from_slice>` Creates a shared texture using the specified ``view`` and the texture information from ``with_texture``'s ``layer`` and ``mipmap``. The number of included mipmaps from the original texture can be controlled using the ``mipmaps`` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use :ref:`texture_create_shared<class_RenderingDevice_method_texture_create_shared>`\ @@ -5400,7 +5706,7 @@ For 2D textures (which only have one layer), ``layer`` must be ``0``. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **texture_get_data** **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer **)** +:ref:`PackedByteArray<class_PackedByteArray>` **texture_get_data**\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_get_data>` Returns the ``texture`` data for the specified ``layer`` as raw binary data. For 2D textures (which only have one layer), ``layer`` must be ``0``. @@ -5412,11 +5718,25 @@ Returns the ``texture`` data for the specified ``layer`` as raw binary data. For ---- +.. _class_RenderingDevice_method_texture_get_format: + +.. rst-class:: classref-method + +:ref:`RDTextureFormat<class_RDTextureFormat>` **texture_get_format**\ (\ texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_get_format>` + +Returns the data format used to create this texture. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_texture_get_native_handle: .. rst-class:: classref-method -:ref:`int<class_int>` **texture_get_native_handle** **(** :ref:`RID<class_RID>` texture **)** +:ref:`int<class_int>` **texture_get_native_handle**\ (\ texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_get_native_handle>` + +**Deprecated:** Use :ref:`get_driver_resource<class_RenderingDevice_method_get_driver_resource>` with :ref:`DRIVER_RESOURCE_TEXTURE<class_RenderingDevice_constant_DRIVER_RESOURCE_TEXTURE>` instead. Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. @@ -5430,7 +5750,7 @@ Returns the internal graphics handle for this texture object. For use when commu .. rst-class:: classref-method -:ref:`bool<class_bool>` **texture_is_format_supported_for_usage** **(** :ref:`DataFormat<enum_RenderingDevice_DataFormat>` format, |bitfield|\<:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\> usage_flags **)** |const| +:ref:`bool<class_bool>` **texture_is_format_supported_for_usage**\ (\ format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, usage_flags\: |bitfield|\[:ref:`TextureUsageBits<enum_RenderingDevice_TextureUsageBits>`\]\ ) |const| :ref:`🔗<class_RenderingDevice_method_texture_is_format_supported_for_usage>` Returns ``true`` if the specified ``format`` is supported for the given ``usage_flags``, ``false`` otherwise. @@ -5442,7 +5762,7 @@ Returns ``true`` if the specified ``format`` is supported for the given ``usage_ .. rst-class:: classref-method -:ref:`bool<class_bool>` **texture_is_shared** **(** :ref:`RID<class_RID>` texture **)** +:ref:`bool<class_bool>` **texture_is_shared**\ (\ texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_is_shared>` Returns ``true`` if the ``texture`` is shared, ``false`` otherwise. See :ref:`RDTextureView<class_RDTextureView>`. @@ -5454,7 +5774,7 @@ Returns ``true`` if the ``texture`` is shared, ``false`` otherwise. See :ref:`RD .. rst-class:: classref-method -:ref:`bool<class_bool>` **texture_is_valid** **(** :ref:`RID<class_RID>` texture **)** +:ref:`bool<class_bool>` **texture_is_valid**\ (\ texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_is_valid>` Returns ``true`` if the ``texture`` is valid, ``false`` otherwise. @@ -5466,7 +5786,7 @@ Returns ``true`` if the ``texture`` is valid, ``false`` otherwise. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **texture_resolve_multisample** **(** :ref:`RID<class_RID>` from_texture, :ref:`RID<class_RID>` to_texture, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **texture_resolve_multisample**\ (\ from_texture\: :ref:`RID<class_RID>`, to_texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_resolve_multisample>` Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` otherwise. @@ -5492,7 +5812,7 @@ Resolves the ``from_texture`` texture onto ``to_texture`` with multisample antia .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **texture_update** **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer, :ref:`PackedByteArray<class_PackedByteArray>` data, |bitfield|\<:ref:`BarrierMask<enum_RenderingDevice_BarrierMask>`\> post_barrier=7 **)** +:ref:`Error<enum_@GlobalScope_Error>` **texture_update**\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RenderingDevice_method_texture_update>` Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), ``layer`` must be ``0``. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the update was successful, :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` otherwise. @@ -5510,9 +5830,9 @@ Updates texture data with new data, replacing the previous data in place. The up .. rst-class:: classref-method -:ref:`RID<class_RID>` **uniform_buffer_create** **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray() **)** +:ref:`RID<class_RID>` **uniform_buffer_create**\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray()\ ) :ref:`🔗<class_RenderingDevice_method_uniform_buffer_create>` -It can be accessed with the RID that is returned. +Creates a new uniform buffer. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid<class_RenderingDevice_method_free_rid>` method. @@ -5524,9 +5844,9 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **uniform_set_create** **(** :ref:`RDUniform[]<class_RDUniform>` uniforms, :ref:`RID<class_RID>` shader, :ref:`int<class_int>` shader_set **)** +:ref:`RID<class_RID>` **uniform_set_create**\ (\ uniforms\: :ref:`Array<class_Array>`\[:ref:`RDUniform<class_RDUniform>`\], shader\: :ref:`RID<class_RID>`, shader_set\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingDevice_method_uniform_set_create>` -It can be accessed with the RID that is returned. +Creates a new uniform set. It can be accessed with the RID that is returned. Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid<class_RenderingDevice_method_free_rid>` method. @@ -5538,11 +5858,9 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`bool<class_bool>` **uniform_set_is_valid** **(** :ref:`RID<class_RID>` uniform_set **)** - -.. container:: contribute +:ref:`bool<class_bool>` **uniform_set_is_valid**\ (\ uniform_set\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingDevice_method_uniform_set_is_valid>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Checks if the ``uniform_set`` is valid, i.e. is owned. .. rst-class:: classref-item-separator @@ -5552,7 +5870,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`RID<class_RID>` **vertex_array_create** **(** :ref:`int<class_int>` vertex_count, :ref:`int<class_int>` vertex_format, :ref:`RID[]<class_RID>` src_buffers, :ref:`PackedInt64Array<class_PackedInt64Array>` offsets=PackedInt64Array() **)** +:ref:`RID<class_RID>` **vertex_array_create**\ (\ vertex_count\: :ref:`int<class_int>`, vertex_format\: :ref:`int<class_int>`, src_buffers\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], offsets\: :ref:`PackedInt64Array<class_PackedInt64Array>` = PackedInt64Array()\ ) :ref:`🔗<class_RenderingDevice_method_vertex_array_create>` Creates a vertex array based on the specified buffers. Optionally, ``offsets`` (in bytes) may be defined for each buffer. @@ -5564,7 +5882,7 @@ Creates a vertex array based on the specified buffers. Optionally, ``offsets`` ( .. rst-class:: classref-method -:ref:`RID<class_RID>` **vertex_buffer_create** **(** :ref:`int<class_int>` size_bytes, :ref:`PackedByteArray<class_PackedByteArray>` data=PackedByteArray(), :ref:`bool<class_bool>` use_as_storage=false **)** +:ref:`RID<class_RID>` **vertex_buffer_create**\ (\ size_bytes\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>` = PackedByteArray(), use_as_storage\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingDevice_method_vertex_buffer_create>` It can be accessed with the RID that is returned. @@ -5578,7 +5896,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe .. rst-class:: classref-method -:ref:`int<class_int>` **vertex_format_create** **(** :ref:`RDVertexAttribute[]<class_RDVertexAttribute>` vertex_descriptions **)** +:ref:`int<class_int>` **vertex_format_create**\ (\ vertex_descriptions\: :ref:`Array<class_Array>`\[:ref:`RDVertexAttribute<class_RDVertexAttribute>`\]\ ) :ref:`🔗<class_RenderingDevice_method_vertex_format_create>` Creates a new vertex format with the specified ``vertex_descriptions``. Returns a unique vertex format ID corresponding to the newly created vertex format. @@ -5589,3 +5907,4 @@ Creates a new vertex format with the specified ``vertex_descriptions``. Returns .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderingserver.rst b/classes/class_renderingserver.rst index ead2d81bc68..21fd6d7b8fc 100644 --- a/classes/class_renderingserver.rst +++ b/classes/class_renderingserver.rst @@ -64,925 +64,991 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`bake_render_uv2<class_RenderingServer_method_bake_render_uv2>` **(** :ref:`RID<class_RID>` base, :ref:`RID[]<class_RID>` material_overrides, :ref:`Vector2i<class_Vector2i>` image_size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`camera_attributes_create<class_RenderingServer_method_camera_attributes_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_attributes_set_auto_exposure<class_RenderingServer_method_camera_attributes_set_auto_exposure>` **(** :ref:`RID<class_RID>` camera_attributes, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` min_sensitivity, :ref:`float<class_float>` max_sensitivity, :ref:`float<class_float>` speed, :ref:`float<class_float>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_attributes_set_dof_blur<class_RenderingServer_method_camera_attributes_set_dof_blur>` **(** :ref:`RID<class_RID>` camera_attributes, :ref:`bool<class_bool>` far_enable, :ref:`float<class_float>` far_distance, :ref:`float<class_float>` far_transition, :ref:`bool<class_bool>` near_enable, :ref:`float<class_float>` near_distance, :ref:`float<class_float>` near_transition, :ref:`float<class_float>` amount **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_attributes_set_dof_blur_bokeh_shape<class_RenderingServer_method_camera_attributes_set_dof_blur_bokeh_shape>` **(** :ref:`DOFBokehShape<enum_RenderingServer_DOFBokehShape>` shape **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_attributes_set_dof_blur_quality<class_RenderingServer_method_camera_attributes_set_dof_blur_quality>` **(** :ref:`DOFBlurQuality<enum_RenderingServer_DOFBlurQuality>` quality, :ref:`bool<class_bool>` use_jitter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_attributes_set_exposure<class_RenderingServer_method_camera_attributes_set_exposure>` **(** :ref:`RID<class_RID>` camera_attributes, :ref:`float<class_float>` multiplier, :ref:`float<class_float>` normalization **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`camera_create<class_RenderingServer_method_camera_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_camera_attributes<class_RenderingServer_method_camera_set_camera_attributes>` **(** :ref:`RID<class_RID>` camera, :ref:`RID<class_RID>` effects **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_cull_mask<class_RenderingServer_method_camera_set_cull_mask>` **(** :ref:`RID<class_RID>` camera, :ref:`int<class_int>` layers **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_environment<class_RenderingServer_method_camera_set_environment>` **(** :ref:`RID<class_RID>` camera, :ref:`RID<class_RID>` env **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_frustum<class_RenderingServer_method_camera_set_frustum>` **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` size, :ref:`Vector2<class_Vector2>` offset, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_orthogonal<class_RenderingServer_method_camera_set_orthogonal>` **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` size, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_perspective<class_RenderingServer_method_camera_set_perspective>` **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` fovy_degrees, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_transform<class_RenderingServer_method_camera_set_transform>` **(** :ref:`RID<class_RID>` camera, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`camera_set_use_vertical_aspect<class_RenderingServer_method_camera_set_use_vertical_aspect>` **(** :ref:`RID<class_RID>` camera, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_create<class_RenderingServer_method_canvas_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_animation_slice<class_RenderingServer_method_canvas_item_add_animation_slice>` **(** :ref:`RID<class_RID>` item, :ref:`float<class_float>` animation_length, :ref:`float<class_float>` slice_begin, :ref:`float<class_float>` slice_end, :ref:`float<class_float>` offset=0.0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_circle<class_RenderingServer_method_canvas_item_add_circle>` **(** :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_clip_ignore<class_RenderingServer_method_canvas_item_add_clip_ignore>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` ignore **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_lcd_texture_rect_region<class_RenderingServer_method_canvas_item_add_lcd_texture_rect_region>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_line<class_RenderingServer_method_canvas_item_add_line>` **(** :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`Color<class_Color>` color, :ref:`float<class_float>` width=-1.0, :ref:`bool<class_bool>` antialiased=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_mesh<class_RenderingServer_method_canvas_item_add_mesh>` **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` mesh, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`RID<class_RID>` texture=RID() **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_msdf_texture_rect_region<class_RenderingServer_method_canvas_item_add_msdf_texture_rect_region>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`float<class_float>` px_range=1.0, :ref:`float<class_float>` scale=1.0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_multiline<class_RenderingServer_method_canvas_item_add_multiline>` **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`float<class_float>` width=-1.0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_multimesh<class_RenderingServer_method_canvas_item_add_multimesh>` **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` mesh, :ref:`RID<class_RID>` texture=RID() **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_nine_patch<class_RenderingServer_method_canvas_item_add_nine_patch>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` source, :ref:`RID<class_RID>` texture, :ref:`Vector2<class_Vector2>` topleft, :ref:`Vector2<class_Vector2>` bottomright, :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` x_axis_mode=0, :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` y_axis_mode=0, :ref:`bool<class_bool>` draw_center=true, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_particles<class_RenderingServer_method_canvas_item_add_particles>` **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_polygon<class_RenderingServer_method_canvas_item_add_polygon>` **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`RID<class_RID>` texture=RID() **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_polyline<class_RenderingServer_method_canvas_item_add_polyline>` **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`float<class_float>` width=-1.0, :ref:`bool<class_bool>` antialiased=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_primitive<class_RenderingServer_method_canvas_item_add_primitive>` **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_rect<class_RenderingServer_method_canvas_item_add_rect>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_set_transform<class_RenderingServer_method_canvas_item_add_set_transform>` **(** :ref:`RID<class_RID>` item, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_texture_rect<class_RenderingServer_method_canvas_item_add_texture_rect>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` tile=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_texture_rect_region<class_RenderingServer_method_canvas_item_add_texture_rect_region>` **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false, :ref:`bool<class_bool>` clip_uv=true **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_add_triangle_array<class_RenderingServer_method_canvas_item_add_triangle_array>` **(** :ref:`RID<class_RID>` item, :ref:`PackedInt32Array<class_PackedInt32Array>` indices, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`PackedInt32Array<class_PackedInt32Array>` bones=PackedInt32Array(), :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights=PackedFloat32Array(), :ref:`RID<class_RID>` texture=RID(), :ref:`int<class_int>` count=-1 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_clear<class_RenderingServer_method_canvas_item_clear>` **(** :ref:`RID<class_RID>` item **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_item_create<class_RenderingServer_method_canvas_item_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_canvas_group_mode<class_RenderingServer_method_canvas_item_set_canvas_group_mode>` **(** :ref:`RID<class_RID>` item, :ref:`CanvasGroupMode<enum_RenderingServer_CanvasGroupMode>` mode, :ref:`float<class_float>` clear_margin=5.0, :ref:`bool<class_bool>` fit_empty=false, :ref:`float<class_float>` fit_margin=0.0, :ref:`bool<class_bool>` blur_mipmaps=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_clip<class_RenderingServer_method_canvas_item_set_clip>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` clip **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_copy_to_backbuffer<class_RenderingServer_method_canvas_item_set_copy_to_backbuffer>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled, :ref:`Rect2<class_Rect2>` rect **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_custom_rect<class_RenderingServer_method_canvas_item_set_custom_rect>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` use_custom_rect, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0) **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_default_texture_filter<class_RenderingServer_method_canvas_item_set_default_texture_filter>` **(** :ref:`RID<class_RID>` item, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_default_texture_repeat<class_RenderingServer_method_canvas_item_set_default_texture_repeat>` **(** :ref:`RID<class_RID>` item, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_distance_field_mode<class_RenderingServer_method_canvas_item_set_distance_field_mode>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_draw_behind_parent<class_RenderingServer_method_canvas_item_set_draw_behind_parent>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_draw_index<class_RenderingServer_method_canvas_item_set_draw_index>` **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` index **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_light_mask<class_RenderingServer_method_canvas_item_set_light_mask>` **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_material<class_RenderingServer_method_canvas_item_set_material>` **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_modulate<class_RenderingServer_method_canvas_item_set_modulate>` **(** :ref:`RID<class_RID>` item, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_parent<class_RenderingServer_method_canvas_item_set_parent>` **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` parent **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_self_modulate<class_RenderingServer_method_canvas_item_set_self_modulate>` **(** :ref:`RID<class_RID>` item, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_sort_children_by_y<class_RenderingServer_method_canvas_item_set_sort_children_by_y>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_transform<class_RenderingServer_method_canvas_item_set_transform>` **(** :ref:`RID<class_RID>` item, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_use_parent_material<class_RenderingServer_method_canvas_item_set_use_parent_material>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_visibility_layer<class_RenderingServer_method_canvas_item_set_visibility_layer>` **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` visibility_layer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_visibility_notifier<class_RenderingServer_method_canvas_item_set_visibility_notifier>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enable, :ref:`Rect2<class_Rect2>` area, :ref:`Callable<class_Callable>` enter_callable, :ref:`Callable<class_Callable>` exit_callable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_visible<class_RenderingServer_method_canvas_item_set_visible>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` visible **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_z_as_relative_to_parent<class_RenderingServer_method_canvas_item_set_z_as_relative_to_parent>` **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_item_set_z_index<class_RenderingServer_method_canvas_item_set_z_index>` **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` z_index **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_attach_to_canvas<class_RenderingServer_method_canvas_light_attach_to_canvas>` **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` canvas **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_light_create<class_RenderingServer_method_canvas_light_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_attach_to_canvas<class_RenderingServer_method_canvas_light_occluder_attach_to_canvas>` **(** :ref:`RID<class_RID>` occluder, :ref:`RID<class_RID>` canvas **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_light_occluder_create<class_RenderingServer_method_canvas_light_occluder_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_set_as_sdf_collision<class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision>` **(** :ref:`RID<class_RID>` occluder, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_set_enabled<class_RenderingServer_method_canvas_light_occluder_set_enabled>` **(** :ref:`RID<class_RID>` occluder, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_set_light_mask<class_RenderingServer_method_canvas_light_occluder_set_light_mask>` **(** :ref:`RID<class_RID>` occluder, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_set_polygon<class_RenderingServer_method_canvas_light_occluder_set_polygon>` **(** :ref:`RID<class_RID>` occluder, :ref:`RID<class_RID>` polygon **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_occluder_set_transform<class_RenderingServer_method_canvas_light_occluder_set_transform>` **(** :ref:`RID<class_RID>` occluder, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_blend_mode<class_RenderingServer_method_canvas_light_set_blend_mode>` **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightBlendMode<enum_RenderingServer_CanvasLightBlendMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_color<class_RenderingServer_method_canvas_light_set_color>` **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_enabled<class_RenderingServer_method_canvas_light_set_enabled>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_energy<class_RenderingServer_method_canvas_light_set_energy>` **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` energy **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_height<class_RenderingServer_method_canvas_light_set_height>` **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` height **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_item_cull_mask<class_RenderingServer_method_canvas_light_set_item_cull_mask>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_item_shadow_cull_mask<class_RenderingServer_method_canvas_light_set_item_shadow_cull_mask>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_layer_range<class_RenderingServer_method_canvas_light_set_layer_range>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` min_layer, :ref:`int<class_int>` max_layer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_mode<class_RenderingServer_method_canvas_light_set_mode>` **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightMode<enum_RenderingServer_CanvasLightMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_shadow_color<class_RenderingServer_method_canvas_light_set_shadow_color>` **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_shadow_enabled<class_RenderingServer_method_canvas_light_set_shadow_enabled>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_shadow_filter<class_RenderingServer_method_canvas_light_set_shadow_filter>` **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightShadowFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_shadow_smooth<class_RenderingServer_method_canvas_light_set_shadow_smooth>` **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` smooth **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_texture<class_RenderingServer_method_canvas_light_set_texture>` **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_texture_offset<class_RenderingServer_method_canvas_light_set_texture_offset>` **(** :ref:`RID<class_RID>` light, :ref:`Vector2<class_Vector2>` offset **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_texture_scale<class_RenderingServer_method_canvas_light_set_texture_scale>` **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_transform<class_RenderingServer_method_canvas_light_set_transform>` **(** :ref:`RID<class_RID>` light, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_light_set_z_range<class_RenderingServer_method_canvas_light_set_z_range>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` min_z, :ref:`int<class_int>` max_z **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_occluder_polygon_create<class_RenderingServer_method_canvas_occluder_polygon_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_occluder_polygon_set_cull_mode<class_RenderingServer_method_canvas_occluder_polygon_set_cull_mode>` **(** :ref:`RID<class_RID>` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode<enum_RenderingServer_CanvasOccluderPolygonCullMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_occluder_polygon_set_shape<class_RenderingServer_method_canvas_occluder_polygon_set_shape>` **(** :ref:`RID<class_RID>` occluder_polygon, :ref:`PackedVector2Array<class_PackedVector2Array>` shape, :ref:`bool<class_bool>` closed **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_set_disable_scale<class_RenderingServer_method_canvas_set_disable_scale>` **(** :ref:`bool<class_bool>` disable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_set_item_mirroring<class_RenderingServer_method_canvas_set_item_mirroring>` **(** :ref:`RID<class_RID>` canvas, :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` mirroring **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_set_modulate<class_RenderingServer_method_canvas_set_modulate>` **(** :ref:`RID<class_RID>` canvas, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_set_shadow_texture_size<class_RenderingServer_method_canvas_set_shadow_texture_size>` **(** :ref:`int<class_int>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`canvas_texture_create<class_RenderingServer_method_canvas_texture_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_texture_set_channel<class_RenderingServer_method_canvas_texture_set_channel>` **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasTextureChannel<enum_RenderingServer_CanvasTextureChannel>` channel, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_texture_set_shading_parameters<class_RenderingServer_method_canvas_texture_set_shading_parameters>` **(** :ref:`RID<class_RID>` canvas_texture, :ref:`Color<class_Color>` base_color, :ref:`float<class_float>` shininess **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_texture_set_texture_filter<class_RenderingServer_method_canvas_texture_set_texture_filter>` **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`canvas_texture_set_texture_repeat<class_RenderingServer_method_canvas_texture_set_texture_repeat>` **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`create_local_rendering_device<class_RenderingServer_method_create_local_rendering_device>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`decal_create<class_RenderingServer_method_decal_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_albedo_mix<class_RenderingServer_method_decal_set_albedo_mix>` **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` albedo_mix **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_cull_mask<class_RenderingServer_method_decal_set_cull_mask>` **(** :ref:`RID<class_RID>` decal, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_distance_fade<class_RenderingServer_method_decal_set_distance_fade>` **(** :ref:`RID<class_RID>` decal, :ref:`bool<class_bool>` enabled, :ref:`float<class_float>` begin, :ref:`float<class_float>` length **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_emission_energy<class_RenderingServer_method_decal_set_emission_energy>` **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` energy **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_fade<class_RenderingServer_method_decal_set_fade>` **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` above, :ref:`float<class_float>` below **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_modulate<class_RenderingServer_method_decal_set_modulate>` **(** :ref:`RID<class_RID>` decal, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_normal_fade<class_RenderingServer_method_decal_set_normal_fade>` **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` fade **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_size<class_RenderingServer_method_decal_set_size>` **(** :ref:`RID<class_RID>` decal, :ref:`Vector3<class_Vector3>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decal_set_texture<class_RenderingServer_method_decal_set_texture>` **(** :ref:`RID<class_RID>` decal, :ref:`DecalTexture<enum_RenderingServer_DecalTexture>` type, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`decals_set_filter<class_RenderingServer_method_decals_set_filter>` **(** :ref:`DecalFilter<enum_RenderingServer_DecalFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`directional_light_create<class_RenderingServer_method_directional_light_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`directional_shadow_atlas_set_size<class_RenderingServer_method_directional_shadow_atlas_set_size>` **(** :ref:`int<class_int>` size, :ref:`bool<class_bool>` is_16bits **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`directional_soft_shadow_filter_set_quality<class_RenderingServer_method_directional_soft_shadow_filter_set_quality>` **(** :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`environment_bake_panorama<class_RenderingServer_method_environment_bake_panorama>` **(** :ref:`RID<class_RID>` environment, :ref:`bool<class_bool>` bake_irradiance, :ref:`Vector2i<class_Vector2i>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`environment_create<class_RenderingServer_method_environment_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_glow_set_use_bicubic_upscale<class_RenderingServer_method_environment_glow_set_use_bicubic_upscale>` **(** :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_adjustment<class_RenderingServer_method_environment_set_adjustment>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation, :ref:`bool<class_bool>` use_1d_color_correction, :ref:`RID<class_RID>` color_correction **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ambient_light<class_RenderingServer_method_environment_set_ambient_light>` **(** :ref:`RID<class_RID>` env, :ref:`Color<class_Color>` color, :ref:`EnvironmentAmbientSource<enum_RenderingServer_EnvironmentAmbientSource>` ambient=0, :ref:`float<class_float>` energy=1.0, :ref:`float<class_float>` sky_contibution=0.0, :ref:`EnvironmentReflectionSource<enum_RenderingServer_EnvironmentReflectionSource>` reflection_source=0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_background<class_RenderingServer_method_environment_set_background>` **(** :ref:`RID<class_RID>` env, :ref:`EnvironmentBG<enum_RenderingServer_EnvironmentBG>` bg **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_bg_color<class_RenderingServer_method_environment_set_bg_color>` **(** :ref:`RID<class_RID>` env, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_bg_energy<class_RenderingServer_method_environment_set_bg_energy>` **(** :ref:`RID<class_RID>` env, :ref:`float<class_float>` multiplier, :ref:`float<class_float>` exposure_value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_canvas_max_layer<class_RenderingServer_method_environment_set_canvas_max_layer>` **(** :ref:`RID<class_RID>` env, :ref:`int<class_int>` max_layer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_fog<class_RenderingServer_method_environment_set_fog>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`Color<class_Color>` light_color, :ref:`float<class_float>` light_energy, :ref:`float<class_float>` sun_scatter, :ref:`float<class_float>` density, :ref:`float<class_float>` height, :ref:`float<class_float>` height_density, :ref:`float<class_float>` aerial_perspective, :ref:`float<class_float>` sky_affect **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_glow<class_RenderingServer_method_environment_set_glow>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`PackedFloat32Array<class_PackedFloat32Array>` levels, :ref:`float<class_float>` intensity, :ref:`float<class_float>` strength, :ref:`float<class_float>` mix, :ref:`float<class_float>` bloom_threshold, :ref:`EnvironmentGlowBlendMode<enum_RenderingServer_EnvironmentGlowBlendMode>` blend_mode, :ref:`float<class_float>` hdr_bleed_threshold, :ref:`float<class_float>` hdr_bleed_scale, :ref:`float<class_float>` hdr_luminance_cap, :ref:`float<class_float>` glow_map_strength, :ref:`RID<class_RID>` glow_map **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sdfgi<class_RenderingServer_method_environment_set_sdfgi>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`int<class_int>` cascades, :ref:`float<class_float>` min_cell_size, :ref:`EnvironmentSDFGIYScale<enum_RenderingServer_EnvironmentSDFGIYScale>` y_scale, :ref:`bool<class_bool>` use_occlusion, :ref:`float<class_float>` bounce_feedback, :ref:`bool<class_bool>` read_sky, :ref:`float<class_float>` energy, :ref:`float<class_float>` normal_bias, :ref:`float<class_float>` probe_bias **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sdfgi_frames_to_converge<class_RenderingServer_method_environment_set_sdfgi_frames_to_converge>` **(** :ref:`EnvironmentSDFGIFramesToConverge<enum_RenderingServer_EnvironmentSDFGIFramesToConverge>` frames **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sdfgi_frames_to_update_light<class_RenderingServer_method_environment_set_sdfgi_frames_to_update_light>` **(** :ref:`EnvironmentSDFGIFramesToUpdateLight<enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight>` frames **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sdfgi_ray_count<class_RenderingServer_method_environment_set_sdfgi_ray_count>` **(** :ref:`EnvironmentSDFGIRayCount<enum_RenderingServer_EnvironmentSDFGIRayCount>` ray_count **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sky<class_RenderingServer_method_environment_set_sky>` **(** :ref:`RID<class_RID>` env, :ref:`RID<class_RID>` sky **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sky_custom_fov<class_RenderingServer_method_environment_set_sky_custom_fov>` **(** :ref:`RID<class_RID>` env, :ref:`float<class_float>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_sky_orientation<class_RenderingServer_method_environment_set_sky_orientation>` **(** :ref:`RID<class_RID>` env, :ref:`Basis<class_Basis>` orientation **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ssao<class_RenderingServer_method_environment_set_ssao>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` radius, :ref:`float<class_float>` intensity, :ref:`float<class_float>` power, :ref:`float<class_float>` detail, :ref:`float<class_float>` horizon, :ref:`float<class_float>` sharpness, :ref:`float<class_float>` light_affect, :ref:`float<class_float>` ao_channel_affect **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ssao_quality<class_RenderingServer_method_environment_set_ssao_quality>` **(** :ref:`EnvironmentSSAOQuality<enum_RenderingServer_EnvironmentSSAOQuality>` quality, :ref:`bool<class_bool>` half_size, :ref:`float<class_float>` adaptive_target, :ref:`int<class_int>` blur_passes, :ref:`float<class_float>` fadeout_from, :ref:`float<class_float>` fadeout_to **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ssil_quality<class_RenderingServer_method_environment_set_ssil_quality>` **(** :ref:`EnvironmentSSILQuality<enum_RenderingServer_EnvironmentSSILQuality>` quality, :ref:`bool<class_bool>` half_size, :ref:`float<class_float>` adaptive_target, :ref:`int<class_int>` blur_passes, :ref:`float<class_float>` fadeout_from, :ref:`float<class_float>` fadeout_to **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ssr<class_RenderingServer_method_environment_set_ssr>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`int<class_int>` max_steps, :ref:`float<class_float>` fade_in, :ref:`float<class_float>` fade_out, :ref:`float<class_float>` depth_tolerance **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_ssr_roughness_quality<class_RenderingServer_method_environment_set_ssr_roughness_quality>` **(** :ref:`EnvironmentSSRRoughnessQuality<enum_RenderingServer_EnvironmentSSRRoughnessQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_tonemap<class_RenderingServer_method_environment_set_tonemap>` **(** :ref:`RID<class_RID>` env, :ref:`EnvironmentToneMapper<enum_RenderingServer_EnvironmentToneMapper>` tone_mapper, :ref:`float<class_float>` exposure, :ref:`float<class_float>` white **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_volumetric_fog<class_RenderingServer_method_environment_set_volumetric_fog>` **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` density, :ref:`Color<class_Color>` albedo, :ref:`Color<class_Color>` emission, :ref:`float<class_float>` emission_energy, :ref:`float<class_float>` anisotropy, :ref:`float<class_float>` length, :ref:`float<class_float>` p_detail_spread, :ref:`float<class_float>` gi_inject, :ref:`bool<class_bool>` temporal_reprojection, :ref:`float<class_float>` temporal_reprojection_amount, :ref:`float<class_float>` ambient_inject, :ref:`float<class_float>` sky_affect **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_volumetric_fog_filter_active<class_RenderingServer_method_environment_set_volumetric_fog_filter_active>` **(** :ref:`bool<class_bool>` active **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`environment_set_volumetric_fog_volume_size<class_RenderingServer_method_environment_set_volumetric_fog_volume_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` depth **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`fog_volume_create<class_RenderingServer_method_fog_volume_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fog_volume_set_material<class_RenderingServer_method_fog_volume_set_material>` **(** :ref:`RID<class_RID>` fog_volume, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fog_volume_set_shape<class_RenderingServer_method_fog_volume_set_shape>` **(** :ref:`RID<class_RID>` fog_volume, :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` shape **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fog_volume_set_size<class_RenderingServer_method_fog_volume_set_size>` **(** :ref:`RID<class_RID>` fog_volume, :ref:`Vector3<class_Vector3>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_draw<class_RenderingServer_method_force_draw>` **(** :ref:`bool<class_bool>` swap_buffers=true, :ref:`float<class_float>` frame_step=0.0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_sync<class_RenderingServer_method_force_sync>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_RenderingServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_default_clear_color<class_RenderingServer_method_get_default_clear_color>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_frame_setup_time_cpu<class_RenderingServer_method_get_frame_setup_time_cpu>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`get_rendering_device<class_RenderingServer_method_get_rendering_device>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_rendering_info<class_RenderingServer_method_get_rendering_info>` **(** :ref:`RenderingInfo<enum_RenderingServer_RenderingInfo>` info **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_shader_parameter_list<class_RenderingServer_method_get_shader_parameter_list>` **(** :ref:`RID<class_RID>` shader **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_test_cube<class_RenderingServer_method_get_test_cube>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_test_texture<class_RenderingServer_method_get_test_texture>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_video_adapter_api_version<class_RenderingServer_method_get_video_adapter_api_version>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_video_adapter_name<class_RenderingServer_method_get_video_adapter_name>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`DeviceType<enum_RenderingDevice_DeviceType>` | :ref:`get_video_adapter_type<class_RenderingServer_method_get_video_adapter_type>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_video_adapter_vendor<class_RenderingServer_method_get_video_adapter_vendor>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_white_texture<class_RenderingServer_method_get_white_texture>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`gi_set_use_half_resolution<class_RenderingServer_method_gi_set_use_half_resolution>` **(** :ref:`bool<class_bool>` half_resolution **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_shader_parameter_add<class_RenderingServer_method_global_shader_parameter_add>` **(** :ref:`StringName<class_StringName>` name, :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` type, :ref:`Variant<class_Variant>` default_value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`global_shader_parameter_get<class_RenderingServer_method_global_shader_parameter_get>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`global_shader_parameter_get_list<class_RenderingServer_method_global_shader_parameter_get_list>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` | :ref:`global_shader_parameter_get_type<class_RenderingServer_method_global_shader_parameter_get_type>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_shader_parameter_remove<class_RenderingServer_method_global_shader_parameter_remove>` **(** :ref:`StringName<class_StringName>` name **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_shader_parameter_set<class_RenderingServer_method_global_shader_parameter_set>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`global_shader_parameter_set_override<class_RenderingServer_method_global_shader_parameter_set_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_changed<class_RenderingServer_method_has_changed>` **(** **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_feature<class_RenderingServer_method_has_feature>` **(** :ref:`Features<enum_RenderingServer_Features>` feature **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_os_feature<class_RenderingServer_method_has_os_feature>` **(** :ref:`String<class_String>` feature **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_attach_object_instance_id<class_RenderingServer_method_instance_attach_object_instance_id>` **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` id **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_attach_skeleton<class_RenderingServer_method_instance_attach_skeleton>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` skeleton **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`instance_create<class_RenderingServer_method_instance_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`instance_create2<class_RenderingServer_method_instance_create2>` **(** :ref:`RID<class_RID>` base, :ref:`RID<class_RID>` scenario **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`instance_geometry_get_shader_parameter<class_RenderingServer_method_instance_geometry_get_shader_parameter>` **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`instance_geometry_get_shader_parameter_default_value<class_RenderingServer_method_instance_geometry_get_shader_parameter_default_value>` **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`instance_geometry_get_shader_parameter_list<class_RenderingServer_method_instance_geometry_get_shader_parameter_list>` **(** :ref:`RID<class_RID>` instance **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_cast_shadows_setting<class_RenderingServer_method_instance_geometry_set_cast_shadows_setting>` **(** :ref:`RID<class_RID>` instance, :ref:`ShadowCastingSetting<enum_RenderingServer_ShadowCastingSetting>` shadow_casting_setting **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_flag<class_RenderingServer_method_instance_geometry_set_flag>` **(** :ref:`RID<class_RID>` instance, :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>` flag, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_lightmap<class_RenderingServer_method_instance_geometry_set_lightmap>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` lightmap, :ref:`Rect2<class_Rect2>` lightmap_uv_scale, :ref:`int<class_int>` lightmap_slice **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_lod_bias<class_RenderingServer_method_instance_geometry_set_lod_bias>` **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` lod_bias **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_material_overlay<class_RenderingServer_method_instance_geometry_set_material_overlay>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_material_override<class_RenderingServer_method_instance_geometry_set_material_override>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_shader_parameter<class_RenderingServer_method_instance_geometry_set_shader_parameter>` **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter, :ref:`Variant<class_Variant>` value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_transparency<class_RenderingServer_method_instance_geometry_set_transparency>` **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` transparency **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_geometry_set_visibility_range<class_RenderingServer_method_instance_geometry_set_visibility_range>` **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`float<class_float>` min_margin, :ref:`float<class_float>` max_margin, :ref:`VisibilityRangeFadeMode<enum_RenderingServer_VisibilityRangeFadeMode>` fade_mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_base<class_RenderingServer_method_instance_set_base>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` base **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_blend_shape_weight<class_RenderingServer_method_instance_set_blend_shape_weight>` **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` shape, :ref:`float<class_float>` weight **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_custom_aabb<class_RenderingServer_method_instance_set_custom_aabb>` **(** :ref:`RID<class_RID>` instance, :ref:`AABB<class_AABB>` aabb **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_extra_visibility_margin<class_RenderingServer_method_instance_set_extra_visibility_margin>` **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` margin **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_ignore_culling<class_RenderingServer_method_instance_set_ignore_culling>` **(** :ref:`RID<class_RID>` instance, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_layer_mask<class_RenderingServer_method_instance_set_layer_mask>` **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_pivot_data<class_RenderingServer_method_instance_set_pivot_data>` **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` sorting_offset, :ref:`bool<class_bool>` use_aabb_center **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_scenario<class_RenderingServer_method_instance_set_scenario>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` scenario **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_surface_override_material<class_RenderingServer_method_instance_set_surface_override_material>` **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` surface, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_transform<class_RenderingServer_method_instance_set_transform>` **(** :ref:`RID<class_RID>` instance, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_visibility_parent<class_RenderingServer_method_instance_set_visibility_parent>` **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` parent **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`instance_set_visible<class_RenderingServer_method_instance_set_visible>` **(** :ref:`RID<class_RID>` instance, :ref:`bool<class_bool>` visible **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_aabb<class_RenderingServer_method_instances_cull_aabb>` **(** :ref:`AABB<class_AABB>` aabb, :ref:`RID<class_RID>` scenario=RID() **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_convex<class_RenderingServer_method_instances_cull_convex>` **(** :ref:`Plane[]<class_Plane>` convex, :ref:`RID<class_RID>` scenario=RID() **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_ray<class_RenderingServer_method_instances_cull_ray>` **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`RID<class_RID>` scenario=RID() **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_directional_set_blend_splits<class_RenderingServer_method_light_directional_set_blend_splits>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_directional_set_shadow_mode<class_RenderingServer_method_light_directional_set_shadow_mode>` **(** :ref:`RID<class_RID>` light, :ref:`LightDirectionalShadowMode<enum_RenderingServer_LightDirectionalShadowMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_directional_set_sky_mode<class_RenderingServer_method_light_directional_set_sky_mode>` **(** :ref:`RID<class_RID>` light, :ref:`LightDirectionalSkyMode<enum_RenderingServer_LightDirectionalSkyMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_omni_set_shadow_mode<class_RenderingServer_method_light_omni_set_shadow_mode>` **(** :ref:`RID<class_RID>` light, :ref:`LightOmniShadowMode<enum_RenderingServer_LightOmniShadowMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_projectors_set_filter<class_RenderingServer_method_light_projectors_set_filter>` **(** :ref:`LightProjectorFilter<enum_RenderingServer_LightProjectorFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_bake_mode<class_RenderingServer_method_light_set_bake_mode>` **(** :ref:`RID<class_RID>` light, :ref:`LightBakeMode<enum_RenderingServer_LightBakeMode>` bake_mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_color<class_RenderingServer_method_light_set_color>` **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_cull_mask<class_RenderingServer_method_light_set_cull_mask>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_distance_fade<class_RenderingServer_method_light_set_distance_fade>` **(** :ref:`RID<class_RID>` decal, :ref:`bool<class_bool>` enabled, :ref:`float<class_float>` begin, :ref:`float<class_float>` shadow, :ref:`float<class_float>` length **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_max_sdfgi_cascade<class_RenderingServer_method_light_set_max_sdfgi_cascade>` **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` cascade **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_negative<class_RenderingServer_method_light_set_negative>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_param<class_RenderingServer_method_light_set_param>` **(** :ref:`RID<class_RID>` light, :ref:`LightParam<enum_RenderingServer_LightParam>` param, :ref:`float<class_float>` value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_projector<class_RenderingServer_method_light_set_projector>` **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_reverse_cull_face_mode<class_RenderingServer_method_light_set_reverse_cull_face_mode>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`light_set_shadow<class_RenderingServer_method_light_set_shadow>` **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`lightmap_create<class_RenderingServer_method_lightmap_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`lightmap_get_probe_capture_bsp_tree<class_RenderingServer_method_lightmap_get_probe_capture_bsp_tree>` **(** :ref:`RID<class_RID>` lightmap **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`lightmap_get_probe_capture_points<class_RenderingServer_method_lightmap_get_probe_capture_points>` **(** :ref:`RID<class_RID>` lightmap **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`lightmap_get_probe_capture_sh<class_RenderingServer_method_lightmap_get_probe_capture_sh>` **(** :ref:`RID<class_RID>` lightmap **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`lightmap_get_probe_capture_tetrahedra<class_RenderingServer_method_lightmap_get_probe_capture_tetrahedra>` **(** :ref:`RID<class_RID>` lightmap **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_baked_exposure_normalization<class_RenderingServer_method_lightmap_set_baked_exposure_normalization>` **(** :ref:`RID<class_RID>` lightmap, :ref:`float<class_float>` baked_exposure **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_probe_bounds<class_RenderingServer_method_lightmap_set_probe_bounds>` **(** :ref:`RID<class_RID>` lightmap, :ref:`AABB<class_AABB>` bounds **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_probe_capture_data<class_RenderingServer_method_lightmap_set_probe_capture_data>` **(** :ref:`RID<class_RID>` lightmap, :ref:`PackedVector3Array<class_PackedVector3Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` point_sh, :ref:`PackedInt32Array<class_PackedInt32Array>` tetrahedra, :ref:`PackedInt32Array<class_PackedInt32Array>` bsp_tree **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_probe_capture_update_speed<class_RenderingServer_method_lightmap_set_probe_capture_update_speed>` **(** :ref:`float<class_float>` speed **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_probe_interior<class_RenderingServer_method_lightmap_set_probe_interior>` **(** :ref:`RID<class_RID>` lightmap, :ref:`bool<class_bool>` interior **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`lightmap_set_textures<class_RenderingServer_method_lightmap_set_textures>` **(** :ref:`RID<class_RID>` lightmap, :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` uses_sh **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`make_sphere_mesh<class_RenderingServer_method_make_sphere_mesh>` **(** :ref:`int<class_int>` latitudes, :ref:`int<class_int>` longitudes, :ref:`float<class_float>` radius **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`material_create<class_RenderingServer_method_material_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`material_get_param<class_RenderingServer_method_material_get_param>` **(** :ref:`RID<class_RID>` material, :ref:`StringName<class_StringName>` parameter **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`material_set_next_pass<class_RenderingServer_method_material_set_next_pass>` **(** :ref:`RID<class_RID>` material, :ref:`RID<class_RID>` next_material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`material_set_param<class_RenderingServer_method_material_set_param>` **(** :ref:`RID<class_RID>` material, :ref:`StringName<class_StringName>` parameter, :ref:`Variant<class_Variant>` value **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`material_set_render_priority<class_RenderingServer_method_material_set_render_priority>` **(** :ref:`RID<class_RID>` material, :ref:`int<class_int>` priority **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`material_set_shader<class_RenderingServer_method_material_set_shader>` **(** :ref:`RID<class_RID>` shader_material, :ref:`RID<class_RID>` shader **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_add_surface<class_RenderingServer_method_mesh_add_surface>` **(** :ref:`RID<class_RID>` mesh, :ref:`Dictionary<class_Dictionary>` surface **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_add_surface_from_arrays<class_RenderingServer_method_mesh_add_surface_from_arrays>` **(** :ref:`RID<class_RID>` mesh, :ref:`PrimitiveType<enum_RenderingServer_PrimitiveType>` primitive, :ref:`Array<class_Array>` arrays, :ref:`Array<class_Array>` blend_shapes=[], :ref:`Dictionary<class_Dictionary>` lods={}, |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> compress_format=0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_clear<class_RenderingServer_method_mesh_clear>` **(** :ref:`RID<class_RID>` mesh **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`mesh_create<class_RenderingServer_method_mesh_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`mesh_create_from_surfaces<class_RenderingServer_method_mesh_create_from_surfaces>` **(** :ref:`Dictionary[]<class_Dictionary>` surfaces, :ref:`int<class_int>` blend_shape_count=0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_get_blend_shape_count<class_RenderingServer_method_mesh_get_blend_shape_count>` **(** :ref:`RID<class_RID>` mesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` | :ref:`mesh_get_blend_shape_mode<class_RenderingServer_method_mesh_get_blend_shape_mode>` **(** :ref:`RID<class_RID>` mesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`mesh_get_custom_aabb<class_RenderingServer_method_mesh_get_custom_aabb>` **(** :ref:`RID<class_RID>` mesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`mesh_get_surface<class_RenderingServer_method_mesh_get_surface>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_get_surface_count<class_RenderingServer_method_mesh_get_surface_count>` **(** :ref:`RID<class_RID>` mesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_set_blend_shape_mode<class_RenderingServer_method_mesh_set_blend_shape_mode>` **(** :ref:`RID<class_RID>` mesh, :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_set_custom_aabb<class_RenderingServer_method_mesh_set_custom_aabb>` **(** :ref:`RID<class_RID>` mesh, :ref:`AABB<class_AABB>` aabb **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_set_shadow_mesh<class_RenderingServer_method_mesh_set_shadow_mesh>` **(** :ref:`RID<class_RID>` mesh, :ref:`RID<class_RID>` shadow_mesh **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`mesh_surface_get_arrays<class_RenderingServer_method_mesh_surface_get_arrays>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array[]<class_Array>` | :ref:`mesh_surface_get_blend_shape_arrays<class_RenderingServer_method_mesh_surface_get_blend_shape_arrays>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_attribute_stride<class_RenderingServer_method_mesh_surface_get_format_attribute_stride>` **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_offset<class_RenderingServer_method_mesh_surface_get_format_offset>` **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count, :ref:`int<class_int>` array_index **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_skin_stride<class_RenderingServer_method_mesh_surface_get_format_skin_stride>` **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_vertex_stride<class_RenderingServer_method_mesh_surface_get_format_vertex_stride>` **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`mesh_surface_get_material<class_RenderingServer_method_mesh_surface_get_material>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_surface_set_material<class_RenderingServer_method_mesh_surface_set_material>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_surface_update_attribute_region<class_RenderingServer_method_mesh_surface_update_attribute_region>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_surface_update_skin_region<class_RenderingServer_method_mesh_surface_update_skin_region>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`mesh_surface_update_vertex_region<class_RenderingServer_method_mesh_surface_update_vertex_region>` **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_allocate_data<class_RenderingServer_method_multimesh_allocate_data>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` instances, :ref:`MultimeshTransformFormat<enum_RenderingServer_MultimeshTransformFormat>` transform_format, :ref:`bool<class_bool>` color_format=false, :ref:`bool<class_bool>` custom_data_format=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`multimesh_create<class_RenderingServer_method_multimesh_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`multimesh_get_aabb<class_RenderingServer_method_multimesh_get_aabb>` **(** :ref:`RID<class_RID>` multimesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`multimesh_get_buffer<class_RenderingServer_method_multimesh_get_buffer>` **(** :ref:`RID<class_RID>` multimesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`multimesh_get_instance_count<class_RenderingServer_method_multimesh_get_instance_count>` **(** :ref:`RID<class_RID>` multimesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`multimesh_get_mesh<class_RenderingServer_method_multimesh_get_mesh>` **(** :ref:`RID<class_RID>` multimesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`multimesh_get_visible_instances<class_RenderingServer_method_multimesh_get_visible_instances>` **(** :ref:`RID<class_RID>` multimesh **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`multimesh_instance_get_color<class_RenderingServer_method_multimesh_instance_get_color>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`multimesh_instance_get_custom_data<class_RenderingServer_method_multimesh_instance_get_custom_data>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`multimesh_instance_get_transform<class_RenderingServer_method_multimesh_instance_get_transform>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`multimesh_instance_get_transform_2d<class_RenderingServer_method_multimesh_instance_get_transform_2d>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_instance_set_color<class_RenderingServer_method_multimesh_instance_set_color>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_instance_set_custom_data<class_RenderingServer_method_multimesh_instance_set_custom_data>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Color<class_Color>` custom_data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_instance_set_transform<class_RenderingServer_method_multimesh_instance_set_transform>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_instance_set_transform_2d<class_RenderingServer_method_multimesh_instance_set_transform_2d>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_set_buffer<class_RenderingServer_method_multimesh_set_buffer>` **(** :ref:`RID<class_RID>` multimesh, :ref:`PackedFloat32Array<class_PackedFloat32Array>` buffer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_set_mesh<class_RenderingServer_method_multimesh_set_mesh>` **(** :ref:`RID<class_RID>` multimesh, :ref:`RID<class_RID>` mesh **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`multimesh_set_visible_instances<class_RenderingServer_method_multimesh_set_visible_instances>` **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` visible **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`occluder_create<class_RenderingServer_method_occluder_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`occluder_set_mesh<class_RenderingServer_method_occluder_set_mesh>` **(** :ref:`RID<class_RID>` occluder, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices, :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`omni_light_create<class_RenderingServer_method_omni_light_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`particles_collision_create<class_RenderingServer_method_particles_collision_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_height_field_update<class_RenderingServer_method_particles_collision_height_field_update>` **(** :ref:`RID<class_RID>` particles_collision **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_attractor_attenuation<class_RenderingServer_method_particles_collision_set_attractor_attenuation>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` curve **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_attractor_directionality<class_RenderingServer_method_particles_collision_set_attractor_directionality>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` amount **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_attractor_strength<class_RenderingServer_method_particles_collision_set_attractor_strength>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` strength **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_box_extents<class_RenderingServer_method_particles_collision_set_box_extents>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`Vector3<class_Vector3>` extents **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_collision_type<class_RenderingServer_method_particles_collision_set_collision_type>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` type **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_cull_mask<class_RenderingServer_method_particles_collision_set_cull_mask>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`int<class_int>` mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_field_texture<class_RenderingServer_method_particles_collision_set_field_texture>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_height_field_resolution<class_RenderingServer_method_particles_collision_set_height_field_resolution>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` resolution **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_collision_set_sphere_radius<class_RenderingServer_method_particles_collision_set_sphere_radius>` **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` radius **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`particles_create<class_RenderingServer_method_particles_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_emit<class_RenderingServer_method_particles_emit>` **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` emit_flags **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`particles_get_current_aabb<class_RenderingServer_method_particles_get_current_aabb>` **(** :ref:`RID<class_RID>` particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`particles_get_emitting<class_RenderingServer_method_particles_get_emitting>` **(** :ref:`RID<class_RID>` particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`particles_is_inactive<class_RenderingServer_method_particles_is_inactive>` **(** :ref:`RID<class_RID>` particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_request_process<class_RenderingServer_method_particles_request_process>` **(** :ref:`RID<class_RID>` particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_restart<class_RenderingServer_method_particles_restart>` **(** :ref:`RID<class_RID>` particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_amount<class_RenderingServer_method_particles_set_amount>` **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` amount **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_collision_base_size<class_RenderingServer_method_particles_set_collision_base_size>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_custom_aabb<class_RenderingServer_method_particles_set_custom_aabb>` **(** :ref:`RID<class_RID>` particles, :ref:`AABB<class_AABB>` aabb **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_draw_order<class_RenderingServer_method_particles_set_draw_order>` **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>` order **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_draw_pass_mesh<class_RenderingServer_method_particles_set_draw_pass_mesh>` **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` pass, :ref:`RID<class_RID>` mesh **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_draw_passes<class_RenderingServer_method_particles_set_draw_passes>` **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` count **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_emission_transform<class_RenderingServer_method_particles_set_emission_transform>` **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_emitting<class_RenderingServer_method_particles_set_emitting>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` emitting **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_explosiveness_ratio<class_RenderingServer_method_particles_set_explosiveness_ratio>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` ratio **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_fixed_fps<class_RenderingServer_method_particles_set_fixed_fps>` **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` fps **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_fractional_delta<class_RenderingServer_method_particles_set_fractional_delta>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_interpolate<class_RenderingServer_method_particles_set_interpolate>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_lifetime<class_RenderingServer_method_particles_set_lifetime>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` lifetime **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_mode<class_RenderingServer_method_particles_set_mode>` **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesMode<enum_RenderingServer_ParticlesMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_one_shot<class_RenderingServer_method_particles_set_one_shot>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` one_shot **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_pre_process_time<class_RenderingServer_method_particles_set_pre_process_time>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` time **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_process_material<class_RenderingServer_method_particles_set_process_material>` **(** :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_randomness_ratio<class_RenderingServer_method_particles_set_randomness_ratio>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` ratio **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_speed_scale<class_RenderingServer_method_particles_set_speed_scale>` **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_subemitter<class_RenderingServer_method_particles_set_subemitter>` **(** :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` subemitter_particles **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_trail_bind_poses<class_RenderingServer_method_particles_set_trail_bind_poses>` **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D[]<class_Transform3D>` bind_poses **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_trails<class_RenderingServer_method_particles_set_trails>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` length_sec **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_transform_align<class_RenderingServer_method_particles_set_transform_align>` **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` align **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`particles_set_use_local_coordinates<class_RenderingServer_method_particles_set_use_local_coordinates>` **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`positional_soft_shadow_filter_set_quality<class_RenderingServer_method_positional_soft_shadow_filter_set_quality>` **(** :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`reflection_probe_create<class_RenderingServer_method_reflection_probe_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_ambient_color<class_RenderingServer_method_reflection_probe_set_ambient_color>` **(** :ref:`RID<class_RID>` probe, :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_ambient_energy<class_RenderingServer_method_reflection_probe_set_ambient_energy>` **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` energy **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_ambient_mode<class_RenderingServer_method_reflection_probe_set_ambient_mode>` **(** :ref:`RID<class_RID>` probe, :ref:`ReflectionProbeAmbientMode<enum_RenderingServer_ReflectionProbeAmbientMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_as_interior<class_RenderingServer_method_reflection_probe_set_as_interior>` **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_cull_mask<class_RenderingServer_method_reflection_probe_set_cull_mask>` **(** :ref:`RID<class_RID>` probe, :ref:`int<class_int>` layers **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_enable_box_projection<class_RenderingServer_method_reflection_probe_set_enable_box_projection>` **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_enable_shadows<class_RenderingServer_method_reflection_probe_set_enable_shadows>` **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_intensity<class_RenderingServer_method_reflection_probe_set_intensity>` **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` intensity **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_max_distance<class_RenderingServer_method_reflection_probe_set_max_distance>` **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` distance **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_mesh_lod_threshold<class_RenderingServer_method_reflection_probe_set_mesh_lod_threshold>` **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` pixels **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_origin_offset<class_RenderingServer_method_reflection_probe_set_origin_offset>` **(** :ref:`RID<class_RID>` probe, :ref:`Vector3<class_Vector3>` offset **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_resolution<class_RenderingServer_method_reflection_probe_set_resolution>` **(** :ref:`RID<class_RID>` probe, :ref:`int<class_int>` resolution **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_size<class_RenderingServer_method_reflection_probe_set_size>` **(** :ref:`RID<class_RID>` probe, :ref:`Vector3<class_Vector3>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reflection_probe_set_update_mode<class_RenderingServer_method_reflection_probe_set_update_mode>` **(** :ref:`RID<class_RID>` probe, :ref:`ReflectionProbeUpdateMode<enum_RenderingServer_ReflectionProbeUpdateMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_frame_drawn_callback<class_RenderingServer_method_request_frame_drawn_callback>` **(** :ref:`Callable<class_Callable>` callable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`scenario_create<class_RenderingServer_method_scenario_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scenario_set_camera_attributes<class_RenderingServer_method_scenario_set_camera_attributes>` **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` effects **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scenario_set_environment<class_RenderingServer_method_scenario_set_environment>` **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` environment **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scenario_set_fallback_environment<class_RenderingServer_method_scenario_set_fallback_environment>` **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` environment **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`screen_space_roughness_limiter_set_active<class_RenderingServer_method_screen_space_roughness_limiter_set_active>` **(** :ref:`bool<class_bool>` enable, :ref:`float<class_float>` amount, :ref:`float<class_float>` limit **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_boot_image<class_RenderingServer_method_set_boot_image>` **(** :ref:`Image<class_Image>` image, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` scale, :ref:`bool<class_bool>` use_filter=true **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_debug_generate_wireframes<class_RenderingServer_method_set_debug_generate_wireframes>` **(** :ref:`bool<class_bool>` generate **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_clear_color<class_RenderingServer_method_set_default_clear_color>` **(** :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shader_create<class_RenderingServer_method_shader_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`shader_get_code<class_RenderingServer_method_shader_get_code>` **(** :ref:`RID<class_RID>` shader **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shader_get_default_texture_parameter<class_RenderingServer_method_shader_get_default_texture_parameter>` **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` index=0 **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`shader_get_parameter_default<class_RenderingServer_method_shader_get_parameter_default>` **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shader_set_code<class_RenderingServer_method_shader_set_code>` **(** :ref:`RID<class_RID>` shader, :ref:`String<class_String>` code **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shader_set_default_texture_parameter<class_RenderingServer_method_shader_set_default_texture_parameter>` **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name, :ref:`RID<class_RID>` texture, :ref:`int<class_int>` index=0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shader_set_path_hint<class_RenderingServer_method_shader_set_path_hint>` **(** :ref:`RID<class_RID>` shader, :ref:`String<class_String>` path **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skeleton_allocate_data<class_RenderingServer_method_skeleton_allocate_data>` **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bones, :ref:`bool<class_bool>` is_2d_skeleton=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`skeleton_bone_get_transform<class_RenderingServer_method_skeleton_bone_get_transform>` **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`skeleton_bone_get_transform_2d<class_RenderingServer_method_skeleton_bone_get_transform_2d>` **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skeleton_bone_set_transform<class_RenderingServer_method_skeleton_bone_set_transform>` **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skeleton_bone_set_transform_2d<class_RenderingServer_method_skeleton_bone_set_transform_2d>` **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`skeleton_create<class_RenderingServer_method_skeleton_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`skeleton_get_bone_count<class_RenderingServer_method_skeleton_get_bone_count>` **(** :ref:`RID<class_RID>` skeleton **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skeleton_set_base_transform_2d<class_RenderingServer_method_skeleton_set_base_transform_2d>` **(** :ref:`RID<class_RID>` skeleton, :ref:`Transform2D<class_Transform2D>` base_transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`sky_bake_panorama<class_RenderingServer_method_sky_bake_panorama>` **(** :ref:`RID<class_RID>` sky, :ref:`float<class_float>` energy, :ref:`bool<class_bool>` bake_irradiance, :ref:`Vector2i<class_Vector2i>` size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`sky_create<class_RenderingServer_method_sky_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sky_set_material<class_RenderingServer_method_sky_set_material>` **(** :ref:`RID<class_RID>` sky, :ref:`RID<class_RID>` material **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sky_set_mode<class_RenderingServer_method_sky_set_mode>` **(** :ref:`RID<class_RID>` sky, :ref:`SkyMode<enum_RenderingServer_SkyMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sky_set_radiance_size<class_RenderingServer_method_sky_set_radiance_size>` **(** :ref:`RID<class_RID>` sky, :ref:`int<class_int>` radiance_size **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`spot_light_create<class_RenderingServer_method_spot_light_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sub_surface_scattering_set_quality<class_RenderingServer_method_sub_surface_scattering_set_quality>` **(** :ref:`SubSurfaceScatteringQuality<enum_RenderingServer_SubSurfaceScatteringQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`sub_surface_scattering_set_scale<class_RenderingServer_method_sub_surface_scattering_set_scale>` **(** :ref:`float<class_float>` scale, :ref:`float<class_float>` depth_scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_2d_create<class_RenderingServer_method_texture_2d_create>` **(** :ref:`Image<class_Image>` image **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`texture_2d_get<class_RenderingServer_method_texture_2d_get>` **(** :ref:`RID<class_RID>` texture **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`texture_2d_layer_get<class_RenderingServer_method_texture_2d_layer_get>` **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_2d_layered_create<class_RenderingServer_method_texture_2d_layered_create>` **(** :ref:`Image[]<class_Image>` layers, :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` layered_type **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_2d_layered_placeholder_create<class_RenderingServer_method_texture_2d_layered_placeholder_create>` **(** :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` layered_type **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_2d_placeholder_create<class_RenderingServer_method_texture_2d_placeholder_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_2d_update<class_RenderingServer_method_texture_2d_update>` **(** :ref:`RID<class_RID>` texture, :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_3d_create<class_RenderingServer_method_texture_3d_create>` **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` mipmaps, :ref:`Image[]<class_Image>` data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`texture_3d_get<class_RenderingServer_method_texture_3d_get>` **(** :ref:`RID<class_RID>` texture **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_3d_placeholder_create<class_RenderingServer_method_texture_3d_placeholder_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_3d_update<class_RenderingServer_method_texture_3d_update>` **(** :ref:`RID<class_RID>` texture, :ref:`Image[]<class_Image>` data **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`texture_get_native_handle<class_RenderingServer_method_texture_get_native_handle>` **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` srgb=false **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`texture_get_path<class_RenderingServer_method_texture_get_path>` **(** :ref:`RID<class_RID>` texture **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_get_rd_texture<class_RenderingServer_method_texture_get_rd_texture>` **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` srgb=false **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`texture_proxy_create<class_RenderingServer_method_texture_proxy_create>` **(** :ref:`RID<class_RID>` base **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_proxy_update<class_RenderingServer_method_texture_proxy_update>` **(** :ref:`RID<class_RID>` texture, :ref:`RID<class_RID>` proxy_to **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_replace<class_RenderingServer_method_texture_replace>` **(** :ref:`RID<class_RID>` texture, :ref:`RID<class_RID>` by_texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_set_force_redraw_if_visible<class_RenderingServer_method_texture_set_force_redraw_if_visible>` **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_set_path<class_RenderingServer_method_texture_set_path>` **(** :ref:`RID<class_RID>` texture, :ref:`String<class_String>` path **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`texture_set_size_override<class_RenderingServer_method_texture_set_size_override>` **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_attach_camera<class_RenderingServer_method_viewport_attach_camera>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` camera **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_attach_canvas<class_RenderingServer_method_viewport_attach_canvas>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_attach_to_screen<class_RenderingServer_method_viewport_attach_to_screen>` **(** :ref:`RID<class_RID>` viewport, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0), :ref:`int<class_int>` screen=0 **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`viewport_create<class_RenderingServer_method_viewport_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`viewport_get_measured_render_time_cpu<class_RenderingServer_method_viewport_get_measured_render_time_cpu>` **(** :ref:`RID<class_RID>` viewport **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`viewport_get_measured_render_time_gpu<class_RenderingServer_method_viewport_get_measured_render_time_gpu>` **(** :ref:`RID<class_RID>` viewport **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`viewport_get_render_info<class_RenderingServer_method_viewport_get_render_info>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` type, :ref:`ViewportRenderInfo<enum_RenderingServer_ViewportRenderInfo>` info **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`viewport_get_render_target<class_RenderingServer_method_viewport_get_render_target>` **(** :ref:`RID<class_RID>` viewport **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`viewport_get_texture<class_RenderingServer_method_viewport_get_texture>` **(** :ref:`RID<class_RID>` viewport **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_remove_canvas<class_RenderingServer_method_viewport_remove_canvas>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_active<class_RenderingServer_method_viewport_set_active>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` active **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_canvas_cull_mask<class_RenderingServer_method_viewport_set_canvas_cull_mask>` **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` canvas_cull_mask **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_canvas_stacking<class_RenderingServer_method_viewport_set_canvas_stacking>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` layer, :ref:`int<class_int>` sublayer **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_canvas_transform<class_RenderingServer_method_viewport_set_canvas_transform>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas, :ref:`Transform2D<class_Transform2D>` offset **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_clear_mode<class_RenderingServer_method_viewport_set_clear_mode>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportClearMode<enum_RenderingServer_ViewportClearMode>` clear_mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_debug_draw<class_RenderingServer_method_viewport_set_debug_draw>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>` draw **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_default_canvas_item_texture_filter<class_RenderingServer_method_viewport_set_default_canvas_item_texture_filter>` **(** :ref:`RID<class_RID>` viewport, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_default_canvas_item_texture_repeat<class_RenderingServer_method_viewport_set_default_canvas_item_texture_repeat>` **(** :ref:`RID<class_RID>` viewport, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_disable_2d<class_RenderingServer_method_viewport_set_disable_2d>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` disable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_disable_3d<class_RenderingServer_method_viewport_set_disable_3d>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` disable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_environment_mode<class_RenderingServer_method_viewport_set_environment_mode>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportEnvironmentMode<enum_RenderingServer_ViewportEnvironmentMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_fsr_sharpness<class_RenderingServer_method_viewport_set_fsr_sharpness>` **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` sharpness **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_global_canvas_transform<class_RenderingServer_method_viewport_set_global_canvas_transform>` **(** :ref:`RID<class_RID>` viewport, :ref:`Transform2D<class_Transform2D>` transform **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_measure_render_time<class_RenderingServer_method_viewport_set_measure_render_time>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_msaa_2d<class_RenderingServer_method_viewport_set_msaa_2d>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` msaa **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_msaa_3d<class_RenderingServer_method_viewport_set_msaa_3d>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` msaa **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_occlusion_culling_build_quality<class_RenderingServer_method_viewport_set_occlusion_culling_build_quality>` **(** :ref:`ViewportOcclusionCullingBuildQuality<enum_RenderingServer_ViewportOcclusionCullingBuildQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_occlusion_rays_per_thread<class_RenderingServer_method_viewport_set_occlusion_rays_per_thread>` **(** :ref:`int<class_int>` rays_per_thread **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_parent_viewport<class_RenderingServer_method_viewport_set_parent_viewport>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` parent_viewport **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision<class_RenderingServer_method_viewport_set_positional_shadow_atlas_quadrant_subdivision>` **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` quadrant, :ref:`int<class_int>` subdivision **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_positional_shadow_atlas_size<class_RenderingServer_method_viewport_set_positional_shadow_atlas_size>` **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` size, :ref:`bool<class_bool>` use_16_bits=false **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_render_direct_to_screen<class_RenderingServer_method_viewport_set_render_direct_to_screen>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_scaling_3d_mode<class_RenderingServer_method_viewport_set_scaling_3d_mode>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` scaling_3d_mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_scaling_3d_scale<class_RenderingServer_method_viewport_set_scaling_3d_scale>` **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_scenario<class_RenderingServer_method_viewport_set_scenario>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` scenario **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_screen_space_aa<class_RenderingServer_method_viewport_set_screen_space_aa>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_sdf_oversize_and_scale<class_RenderingServer_method_viewport_set_sdf_oversize_and_scale>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportSDFOversize<enum_RenderingServer_ViewportSDFOversize>` oversize, :ref:`ViewportSDFScale<enum_RenderingServer_ViewportSDFScale>` scale **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_size<class_RenderingServer_method_viewport_set_size>` **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_snap_2d_transforms_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_transforms_to_pixel>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_snap_2d_vertices_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_vertices_to_pixel>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_texture_mipmap_bias<class_RenderingServer_method_viewport_set_texture_mipmap_bias>` **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` mipmap_bias **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_transparent_background<class_RenderingServer_method_viewport_set_transparent_background>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_update_mode<class_RenderingServer_method_viewport_set_update_mode>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` update_mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_use_debanding<class_RenderingServer_method_viewport_set_use_debanding>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_use_occlusion_culling<class_RenderingServer_method_viewport_set_use_occlusion_culling>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_use_taa<class_RenderingServer_method_viewport_set_use_taa>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_use_xr<class_RenderingServer_method_viewport_set_use_xr>` **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` use_xr **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_vrs_mode<class_RenderingServer_method_viewport_set_vrs_mode>` **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVRSMode>` mode **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`viewport_set_vrs_texture<class_RenderingServer_method_viewport_set_vrs_texture>` **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` texture **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`visibility_notifier_create<class_RenderingServer_method_visibility_notifier_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`visibility_notifier_set_aabb<class_RenderingServer_method_visibility_notifier_set_aabb>` **(** :ref:`RID<class_RID>` notifier, :ref:`AABB<class_AABB>` aabb **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`visibility_notifier_set_callbacks<class_RenderingServer_method_visibility_notifier_set_callbacks>` **(** :ref:`RID<class_RID>` notifier, :ref:`Callable<class_Callable>` enter_callable, :ref:`Callable<class_Callable>` exit_callable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_allocate_data<class_RenderingServer_method_voxel_gi_allocate_data>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`Transform3D<class_Transform3D>` to_cell_xform, :ref:`AABB<class_AABB>` aabb, :ref:`Vector3i<class_Vector3i>` octree_size, :ref:`PackedByteArray<class_PackedByteArray>` octree_cells, :ref:`PackedByteArray<class_PackedByteArray>` data_cells, :ref:`PackedByteArray<class_PackedByteArray>` distance_field, :ref:`PackedInt32Array<class_PackedInt32Array>` level_counts **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`voxel_gi_create<class_RenderingServer_method_voxel_gi_create>` **(** **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_data_cells<class_RenderingServer_method_voxel_gi_get_data_cells>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_distance_field<class_RenderingServer_method_voxel_gi_get_distance_field>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`voxel_gi_get_level_counts<class_RenderingServer_method_voxel_gi_get_level_counts>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_octree_cells<class_RenderingServer_method_voxel_gi_get_octree_cells>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`voxel_gi_get_octree_size<class_RenderingServer_method_voxel_gi_get_octree_size>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`voxel_gi_get_to_cell_xform<class_RenderingServer_method_voxel_gi_get_to_cell_xform>` **(** :ref:`RID<class_RID>` voxel_gi **)** |const| | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_baked_exposure_normalization<class_RenderingServer_method_voxel_gi_set_baked_exposure_normalization>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` baked_exposure **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_bias<class_RenderingServer_method_voxel_gi_set_bias>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` bias **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_dynamic_range<class_RenderingServer_method_voxel_gi_set_dynamic_range>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` range **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_energy<class_RenderingServer_method_voxel_gi_set_energy>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` energy **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_interior<class_RenderingServer_method_voxel_gi_set_interior>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_normal_bias<class_RenderingServer_method_voxel_gi_set_normal_bias>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` bias **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_propagation<class_RenderingServer_method_voxel_gi_set_propagation>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` amount **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_quality<class_RenderingServer_method_voxel_gi_set_quality>` **(** :ref:`VoxelGIQuality<enum_RenderingServer_VoxelGIQuality>` quality **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`voxel_gi_set_use_two_bounces<class_RenderingServer_method_voxel_gi_set_use_two_bounces>` **(** :ref:`RID<class_RID>` voxel_gi, :ref:`bool<class_bool>` enable **)** | - +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`bake_render_uv2<class_RenderingServer_method_bake_render_uv2>`\ (\ base\: :ref:`RID<class_RID>`, material_overrides\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], image_size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`call_on_render_thread<class_RenderingServer_method_call_on_render_thread>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`camera_attributes_create<class_RenderingServer_method_camera_attributes_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_attributes_set_auto_exposure<class_RenderingServer_method_camera_attributes_set_auto_exposure>`\ (\ camera_attributes\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, min_sensitivity\: :ref:`float<class_float>`, max_sensitivity\: :ref:`float<class_float>`, speed\: :ref:`float<class_float>`, scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_attributes_set_dof_blur<class_RenderingServer_method_camera_attributes_set_dof_blur>`\ (\ camera_attributes\: :ref:`RID<class_RID>`, far_enable\: :ref:`bool<class_bool>`, far_distance\: :ref:`float<class_float>`, far_transition\: :ref:`float<class_float>`, near_enable\: :ref:`bool<class_bool>`, near_distance\: :ref:`float<class_float>`, near_transition\: :ref:`float<class_float>`, amount\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_attributes_set_dof_blur_bokeh_shape<class_RenderingServer_method_camera_attributes_set_dof_blur_bokeh_shape>`\ (\ shape\: :ref:`DOFBokehShape<enum_RenderingServer_DOFBokehShape>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_attributes_set_dof_blur_quality<class_RenderingServer_method_camera_attributes_set_dof_blur_quality>`\ (\ quality\: :ref:`DOFBlurQuality<enum_RenderingServer_DOFBlurQuality>`, use_jitter\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_attributes_set_exposure<class_RenderingServer_method_camera_attributes_set_exposure>`\ (\ camera_attributes\: :ref:`RID<class_RID>`, multiplier\: :ref:`float<class_float>`, normalization\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`camera_create<class_RenderingServer_method_camera_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_camera_attributes<class_RenderingServer_method_camera_set_camera_attributes>`\ (\ camera\: :ref:`RID<class_RID>`, effects\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_compositor<class_RenderingServer_method_camera_set_compositor>`\ (\ camera\: :ref:`RID<class_RID>`, compositor\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_cull_mask<class_RenderingServer_method_camera_set_cull_mask>`\ (\ camera\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_environment<class_RenderingServer_method_camera_set_environment>`\ (\ camera\: :ref:`RID<class_RID>`, env\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_frustum<class_RenderingServer_method_camera_set_frustum>`\ (\ camera\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`, offset\: :ref:`Vector2<class_Vector2>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_orthogonal<class_RenderingServer_method_camera_set_orthogonal>`\ (\ camera\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_perspective<class_RenderingServer_method_camera_set_perspective>`\ (\ camera\: :ref:`RID<class_RID>`, fovy_degrees\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_transform<class_RenderingServer_method_camera_set_transform>`\ (\ camera\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`camera_set_use_vertical_aspect<class_RenderingServer_method_camera_set_use_vertical_aspect>`\ (\ camera\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_create<class_RenderingServer_method_canvas_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_animation_slice<class_RenderingServer_method_canvas_item_add_animation_slice>`\ (\ item\: :ref:`RID<class_RID>`, animation_length\: :ref:`float<class_float>`, slice_begin\: :ref:`float<class_float>`, slice_end\: :ref:`float<class_float>`, offset\: :ref:`float<class_float>` = 0.0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_circle<class_RenderingServer_method_canvas_item_add_circle>`\ (\ item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, radius\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`, antialiased\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_clip_ignore<class_RenderingServer_method_canvas_item_add_clip_ignore>`\ (\ item\: :ref:`RID<class_RID>`, ignore\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_lcd_texture_rect_region<class_RenderingServer_method_canvas_item_add_lcd_texture_rect_region>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_line<class_RenderingServer_method_canvas_item_add_line>`\ (\ item\: :ref:`RID<class_RID>`, from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_mesh<class_RenderingServer_method_canvas_item_add_mesh>`\ (\ item\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), texture\: :ref:`RID<class_RID>` = RID()\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_msdf_texture_rect_region<class_RenderingServer_method_canvas_item_add_msdf_texture_rect_region>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, px_range\: :ref:`float<class_float>` = 1.0, scale\: :ref:`float<class_float>` = 1.0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_multiline<class_RenderingServer_method_canvas_item_add_multiline>`\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_multimesh<class_RenderingServer_method_canvas_item_add_multimesh>`\ (\ item\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>` = RID()\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_nine_patch<class_RenderingServer_method_canvas_item_add_nine_patch>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, source\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, topleft\: :ref:`Vector2<class_Vector2>`, bottomright\: :ref:`Vector2<class_Vector2>`, x_axis_mode\: :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` = 0, y_axis_mode\: :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` = 0, draw_center\: :ref:`bool<class_bool>` = true, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_particles<class_RenderingServer_method_canvas_item_add_particles>`\ (\ item\: :ref:`RID<class_RID>`, particles\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_polygon<class_RenderingServer_method_canvas_item_add_polygon>`\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), texture\: :ref:`RID<class_RID>` = RID()\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_polyline<class_RenderingServer_method_canvas_item_add_polyline>`\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_primitive<class_RenderingServer_method_canvas_item_add_primitive>`\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_rect<class_RenderingServer_method_canvas_item_add_rect>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, color\: :ref:`Color<class_Color>`, antialiased\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_set_transform<class_RenderingServer_method_canvas_item_add_set_transform>`\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_texture_rect<class_RenderingServer_method_canvas_item_add_texture_rect>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, tile\: :ref:`bool<class_bool>` = false, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_texture_rect_region<class_RenderingServer_method_canvas_item_add_texture_rect_region>`\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false, clip_uv\: :ref:`bool<class_bool>` = true\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_add_triangle_array<class_RenderingServer_method_canvas_item_add_triangle_array>`\ (\ item\: :ref:`RID<class_RID>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), bones\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), texture\: :ref:`RID<class_RID>` = RID(), count\: :ref:`int<class_int>` = -1\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_clear<class_RenderingServer_method_canvas_item_clear>`\ (\ item\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_item_create<class_RenderingServer_method_canvas_item_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_reset_physics_interpolation<class_RenderingServer_method_canvas_item_reset_physics_interpolation>`\ (\ item\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_canvas_group_mode<class_RenderingServer_method_canvas_item_set_canvas_group_mode>`\ (\ item\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasGroupMode<enum_RenderingServer_CanvasGroupMode>`, clear_margin\: :ref:`float<class_float>` = 5.0, fit_empty\: :ref:`bool<class_bool>` = false, fit_margin\: :ref:`float<class_float>` = 0.0, blur_mipmaps\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_clip<class_RenderingServer_method_canvas_item_set_clip>`\ (\ item\: :ref:`RID<class_RID>`, clip\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_copy_to_backbuffer<class_RenderingServer_method_canvas_item_set_copy_to_backbuffer>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, rect\: :ref:`Rect2<class_Rect2>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_custom_rect<class_RenderingServer_method_canvas_item_set_custom_rect>`\ (\ item\: :ref:`RID<class_RID>`, use_custom_rect\: :ref:`bool<class_bool>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_default_texture_filter<class_RenderingServer_method_canvas_item_set_default_texture_filter>`\ (\ item\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_default_texture_repeat<class_RenderingServer_method_canvas_item_set_default_texture_repeat>`\ (\ item\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_distance_field_mode<class_RenderingServer_method_canvas_item_set_distance_field_mode>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_draw_behind_parent<class_RenderingServer_method_canvas_item_set_draw_behind_parent>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_draw_index<class_RenderingServer_method_canvas_item_set_draw_index>`\ (\ item\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_interpolated<class_RenderingServer_method_canvas_item_set_interpolated>`\ (\ item\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_light_mask<class_RenderingServer_method_canvas_item_set_light_mask>`\ (\ item\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_material<class_RenderingServer_method_canvas_item_set_material>`\ (\ item\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_modulate<class_RenderingServer_method_canvas_item_set_modulate>`\ (\ item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_parent<class_RenderingServer_method_canvas_item_set_parent>`\ (\ item\: :ref:`RID<class_RID>`, parent\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_self_modulate<class_RenderingServer_method_canvas_item_set_self_modulate>`\ (\ item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_sort_children_by_y<class_RenderingServer_method_canvas_item_set_sort_children_by_y>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_transform<class_RenderingServer_method_canvas_item_set_transform>`\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_use_parent_material<class_RenderingServer_method_canvas_item_set_use_parent_material>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_visibility_layer<class_RenderingServer_method_canvas_item_set_visibility_layer>`\ (\ item\: :ref:`RID<class_RID>`, visibility_layer\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_visibility_notifier<class_RenderingServer_method_canvas_item_set_visibility_notifier>`\ (\ item\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, area\: :ref:`Rect2<class_Rect2>`, enter_callable\: :ref:`Callable<class_Callable>`, exit_callable\: :ref:`Callable<class_Callable>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_visible<class_RenderingServer_method_canvas_item_set_visible>`\ (\ item\: :ref:`RID<class_RID>`, visible\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_z_as_relative_to_parent<class_RenderingServer_method_canvas_item_set_z_as_relative_to_parent>`\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_set_z_index<class_RenderingServer_method_canvas_item_set_z_index>`\ (\ item\: :ref:`RID<class_RID>`, z_index\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_item_transform_physics_interpolation<class_RenderingServer_method_canvas_item_transform_physics_interpolation>`\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_attach_to_canvas<class_RenderingServer_method_canvas_light_attach_to_canvas>`\ (\ light\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_light_create<class_RenderingServer_method_canvas_light_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_attach_to_canvas<class_RenderingServer_method_canvas_light_occluder_attach_to_canvas>`\ (\ occluder\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_light_occluder_create<class_RenderingServer_method_canvas_light_occluder_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_reset_physics_interpolation<class_RenderingServer_method_canvas_light_occluder_reset_physics_interpolation>`\ (\ occluder\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_as_sdf_collision<class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision>`\ (\ occluder\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_enabled<class_RenderingServer_method_canvas_light_occluder_set_enabled>`\ (\ occluder\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_interpolated<class_RenderingServer_method_canvas_light_occluder_set_interpolated>`\ (\ occluder\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_light_mask<class_RenderingServer_method_canvas_light_occluder_set_light_mask>`\ (\ occluder\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_polygon<class_RenderingServer_method_canvas_light_occluder_set_polygon>`\ (\ occluder\: :ref:`RID<class_RID>`, polygon\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_set_transform<class_RenderingServer_method_canvas_light_occluder_set_transform>`\ (\ occluder\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_occluder_transform_physics_interpolation<class_RenderingServer_method_canvas_light_occluder_transform_physics_interpolation>`\ (\ occluder\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_reset_physics_interpolation<class_RenderingServer_method_canvas_light_reset_physics_interpolation>`\ (\ light\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_blend_mode<class_RenderingServer_method_canvas_light_set_blend_mode>`\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasLightBlendMode<enum_RenderingServer_CanvasLightBlendMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_color<class_RenderingServer_method_canvas_light_set_color>`\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_enabled<class_RenderingServer_method_canvas_light_set_enabled>`\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_energy<class_RenderingServer_method_canvas_light_set_energy>`\ (\ light\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_height<class_RenderingServer_method_canvas_light_set_height>`\ (\ light\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_interpolated<class_RenderingServer_method_canvas_light_set_interpolated>`\ (\ light\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_item_cull_mask<class_RenderingServer_method_canvas_light_set_item_cull_mask>`\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_item_shadow_cull_mask<class_RenderingServer_method_canvas_light_set_item_shadow_cull_mask>`\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_layer_range<class_RenderingServer_method_canvas_light_set_layer_range>`\ (\ light\: :ref:`RID<class_RID>`, min_layer\: :ref:`int<class_int>`, max_layer\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_mode<class_RenderingServer_method_canvas_light_set_mode>`\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasLightMode<enum_RenderingServer_CanvasLightMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_shadow_color<class_RenderingServer_method_canvas_light_set_shadow_color>`\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_shadow_enabled<class_RenderingServer_method_canvas_light_set_shadow_enabled>`\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_shadow_filter<class_RenderingServer_method_canvas_light_set_shadow_filter>`\ (\ light\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightShadowFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_shadow_smooth<class_RenderingServer_method_canvas_light_set_shadow_smooth>`\ (\ light\: :ref:`RID<class_RID>`, smooth\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_texture<class_RenderingServer_method_canvas_light_set_texture>`\ (\ light\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_texture_offset<class_RenderingServer_method_canvas_light_set_texture_offset>`\ (\ light\: :ref:`RID<class_RID>`, offset\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_texture_scale<class_RenderingServer_method_canvas_light_set_texture_scale>`\ (\ light\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_transform<class_RenderingServer_method_canvas_light_set_transform>`\ (\ light\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_set_z_range<class_RenderingServer_method_canvas_light_set_z_range>`\ (\ light\: :ref:`RID<class_RID>`, min_z\: :ref:`int<class_int>`, max_z\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_light_transform_physics_interpolation<class_RenderingServer_method_canvas_light_transform_physics_interpolation>`\ (\ light\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_occluder_polygon_create<class_RenderingServer_method_canvas_occluder_polygon_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_occluder_polygon_set_cull_mode<class_RenderingServer_method_canvas_occluder_polygon_set_cull_mode>`\ (\ occluder_polygon\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasOccluderPolygonCullMode<enum_RenderingServer_CanvasOccluderPolygonCullMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_occluder_polygon_set_shape<class_RenderingServer_method_canvas_occluder_polygon_set_shape>`\ (\ occluder_polygon\: :ref:`RID<class_RID>`, shape\: :ref:`PackedVector2Array<class_PackedVector2Array>`, closed\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_set_disable_scale<class_RenderingServer_method_canvas_set_disable_scale>`\ (\ disable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_set_item_mirroring<class_RenderingServer_method_canvas_set_item_mirroring>`\ (\ canvas\: :ref:`RID<class_RID>`, item\: :ref:`RID<class_RID>`, mirroring\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_set_item_repeat<class_RenderingServer_method_canvas_set_item_repeat>`\ (\ item\: :ref:`RID<class_RID>`, repeat_size\: :ref:`Vector2<class_Vector2>`, repeat_times\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_set_modulate<class_RenderingServer_method_canvas_set_modulate>`\ (\ canvas\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_set_shadow_texture_size<class_RenderingServer_method_canvas_set_shadow_texture_size>`\ (\ size\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`canvas_texture_create<class_RenderingServer_method_canvas_texture_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_texture_set_channel<class_RenderingServer_method_canvas_texture_set_channel>`\ (\ canvas_texture\: :ref:`RID<class_RID>`, channel\: :ref:`CanvasTextureChannel<enum_RenderingServer_CanvasTextureChannel>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_texture_set_shading_parameters<class_RenderingServer_method_canvas_texture_set_shading_parameters>`\ (\ canvas_texture\: :ref:`RID<class_RID>`, base_color\: :ref:`Color<class_Color>`, shininess\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_texture_set_texture_filter<class_RenderingServer_method_canvas_texture_set_texture_filter>`\ (\ canvas_texture\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`canvas_texture_set_texture_repeat<class_RenderingServer_method_canvas_texture_set_texture_repeat>`\ (\ canvas_texture\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`compositor_create<class_RenderingServer_method_compositor_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`compositor_effect_create<class_RenderingServer_method_compositor_effect_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compositor_effect_set_callback<class_RenderingServer_method_compositor_effect_set_callback>`\ (\ effect\: :ref:`RID<class_RID>`, callback_type\: :ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compositor_effect_set_enabled<class_RenderingServer_method_compositor_effect_set_enabled>`\ (\ effect\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compositor_effect_set_flag<class_RenderingServer_method_compositor_effect_set_flag>`\ (\ effect\: :ref:`RID<class_RID>`, flag\: :ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>`, set\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`compositor_set_compositor_effects<class_RenderingServer_method_compositor_set_compositor_effects>`\ (\ compositor\: :ref:`RID<class_RID>`, effects\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`create_local_rendering_device<class_RenderingServer_method_create_local_rendering_device>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`debug_canvas_item_get_rect<class_RenderingServer_method_debug_canvas_item_get_rect>`\ (\ item\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`decal_create<class_RenderingServer_method_decal_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_albedo_mix<class_RenderingServer_method_decal_set_albedo_mix>`\ (\ decal\: :ref:`RID<class_RID>`, albedo_mix\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_cull_mask<class_RenderingServer_method_decal_set_cull_mask>`\ (\ decal\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_distance_fade<class_RenderingServer_method_decal_set_distance_fade>`\ (\ decal\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, begin\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_emission_energy<class_RenderingServer_method_decal_set_emission_energy>`\ (\ decal\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_fade<class_RenderingServer_method_decal_set_fade>`\ (\ decal\: :ref:`RID<class_RID>`, above\: :ref:`float<class_float>`, below\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_modulate<class_RenderingServer_method_decal_set_modulate>`\ (\ decal\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_normal_fade<class_RenderingServer_method_decal_set_normal_fade>`\ (\ decal\: :ref:`RID<class_RID>`, fade\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_size<class_RenderingServer_method_decal_set_size>`\ (\ decal\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decal_set_texture<class_RenderingServer_method_decal_set_texture>`\ (\ decal\: :ref:`RID<class_RID>`, type\: :ref:`DecalTexture<enum_RenderingServer_DecalTexture>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`decals_set_filter<class_RenderingServer_method_decals_set_filter>`\ (\ filter\: :ref:`DecalFilter<enum_RenderingServer_DecalFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`directional_light_create<class_RenderingServer_method_directional_light_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`directional_shadow_atlas_set_size<class_RenderingServer_method_directional_shadow_atlas_set_size>`\ (\ size\: :ref:`int<class_int>`, is_16bits\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`directional_soft_shadow_filter_set_quality<class_RenderingServer_method_directional_soft_shadow_filter_set_quality>`\ (\ quality\: :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`environment_bake_panorama<class_RenderingServer_method_environment_bake_panorama>`\ (\ environment\: :ref:`RID<class_RID>`, bake_irradiance\: :ref:`bool<class_bool>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`environment_create<class_RenderingServer_method_environment_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_glow_set_use_bicubic_upscale<class_RenderingServer_method_environment_glow_set_use_bicubic_upscale>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_adjustment<class_RenderingServer_method_environment_set_adjustment>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, brightness\: :ref:`float<class_float>`, contrast\: :ref:`float<class_float>`, saturation\: :ref:`float<class_float>`, use_1d_color_correction\: :ref:`bool<class_bool>`, color_correction\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ambient_light<class_RenderingServer_method_environment_set_ambient_light>`\ (\ env\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`, ambient\: :ref:`EnvironmentAmbientSource<enum_RenderingServer_EnvironmentAmbientSource>` = 0, energy\: :ref:`float<class_float>` = 1.0, sky_contibution\: :ref:`float<class_float>` = 0.0, reflection_source\: :ref:`EnvironmentReflectionSource<enum_RenderingServer_EnvironmentReflectionSource>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_background<class_RenderingServer_method_environment_set_background>`\ (\ env\: :ref:`RID<class_RID>`, bg\: :ref:`EnvironmentBG<enum_RenderingServer_EnvironmentBG>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_bg_color<class_RenderingServer_method_environment_set_bg_color>`\ (\ env\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_bg_energy<class_RenderingServer_method_environment_set_bg_energy>`\ (\ env\: :ref:`RID<class_RID>`, multiplier\: :ref:`float<class_float>`, exposure_value\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_canvas_max_layer<class_RenderingServer_method_environment_set_canvas_max_layer>`\ (\ env\: :ref:`RID<class_RID>`, max_layer\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_fog<class_RenderingServer_method_environment_set_fog>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, light_color\: :ref:`Color<class_Color>`, light_energy\: :ref:`float<class_float>`, sun_scatter\: :ref:`float<class_float>`, density\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, height_density\: :ref:`float<class_float>`, aerial_perspective\: :ref:`float<class_float>`, sky_affect\: :ref:`float<class_float>`, fog_mode\: :ref:`EnvironmentFogMode<enum_RenderingServer_EnvironmentFogMode>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_glow<class_RenderingServer_method_environment_set_glow>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, levels\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, intensity\: :ref:`float<class_float>`, strength\: :ref:`float<class_float>`, mix\: :ref:`float<class_float>`, bloom_threshold\: :ref:`float<class_float>`, blend_mode\: :ref:`EnvironmentGlowBlendMode<enum_RenderingServer_EnvironmentGlowBlendMode>`, hdr_bleed_threshold\: :ref:`float<class_float>`, hdr_bleed_scale\: :ref:`float<class_float>`, hdr_luminance_cap\: :ref:`float<class_float>`, glow_map_strength\: :ref:`float<class_float>`, glow_map\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sdfgi<class_RenderingServer_method_environment_set_sdfgi>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, cascades\: :ref:`int<class_int>`, min_cell_size\: :ref:`float<class_float>`, y_scale\: :ref:`EnvironmentSDFGIYScale<enum_RenderingServer_EnvironmentSDFGIYScale>`, use_occlusion\: :ref:`bool<class_bool>`, bounce_feedback\: :ref:`float<class_float>`, read_sky\: :ref:`bool<class_bool>`, energy\: :ref:`float<class_float>`, normal_bias\: :ref:`float<class_float>`, probe_bias\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sdfgi_frames_to_converge<class_RenderingServer_method_environment_set_sdfgi_frames_to_converge>`\ (\ frames\: :ref:`EnvironmentSDFGIFramesToConverge<enum_RenderingServer_EnvironmentSDFGIFramesToConverge>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sdfgi_frames_to_update_light<class_RenderingServer_method_environment_set_sdfgi_frames_to_update_light>`\ (\ frames\: :ref:`EnvironmentSDFGIFramesToUpdateLight<enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sdfgi_ray_count<class_RenderingServer_method_environment_set_sdfgi_ray_count>`\ (\ ray_count\: :ref:`EnvironmentSDFGIRayCount<enum_RenderingServer_EnvironmentSDFGIRayCount>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sky<class_RenderingServer_method_environment_set_sky>`\ (\ env\: :ref:`RID<class_RID>`, sky\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sky_custom_fov<class_RenderingServer_method_environment_set_sky_custom_fov>`\ (\ env\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_sky_orientation<class_RenderingServer_method_environment_set_sky_orientation>`\ (\ env\: :ref:`RID<class_RID>`, orientation\: :ref:`Basis<class_Basis>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ssao<class_RenderingServer_method_environment_set_ssao>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, radius\: :ref:`float<class_float>`, intensity\: :ref:`float<class_float>`, power\: :ref:`float<class_float>`, detail\: :ref:`float<class_float>`, horizon\: :ref:`float<class_float>`, sharpness\: :ref:`float<class_float>`, light_affect\: :ref:`float<class_float>`, ao_channel_affect\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ssao_quality<class_RenderingServer_method_environment_set_ssao_quality>`\ (\ quality\: :ref:`EnvironmentSSAOQuality<enum_RenderingServer_EnvironmentSSAOQuality>`, half_size\: :ref:`bool<class_bool>`, adaptive_target\: :ref:`float<class_float>`, blur_passes\: :ref:`int<class_int>`, fadeout_from\: :ref:`float<class_float>`, fadeout_to\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ssil_quality<class_RenderingServer_method_environment_set_ssil_quality>`\ (\ quality\: :ref:`EnvironmentSSILQuality<enum_RenderingServer_EnvironmentSSILQuality>`, half_size\: :ref:`bool<class_bool>`, adaptive_target\: :ref:`float<class_float>`, blur_passes\: :ref:`int<class_int>`, fadeout_from\: :ref:`float<class_float>`, fadeout_to\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ssr<class_RenderingServer_method_environment_set_ssr>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, max_steps\: :ref:`int<class_int>`, fade_in\: :ref:`float<class_float>`, fade_out\: :ref:`float<class_float>`, depth_tolerance\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_ssr_roughness_quality<class_RenderingServer_method_environment_set_ssr_roughness_quality>`\ (\ quality\: :ref:`EnvironmentSSRRoughnessQuality<enum_RenderingServer_EnvironmentSSRRoughnessQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_tonemap<class_RenderingServer_method_environment_set_tonemap>`\ (\ env\: :ref:`RID<class_RID>`, tone_mapper\: :ref:`EnvironmentToneMapper<enum_RenderingServer_EnvironmentToneMapper>`, exposure\: :ref:`float<class_float>`, white\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_volumetric_fog<class_RenderingServer_method_environment_set_volumetric_fog>`\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, density\: :ref:`float<class_float>`, albedo\: :ref:`Color<class_Color>`, emission\: :ref:`Color<class_Color>`, emission_energy\: :ref:`float<class_float>`, anisotropy\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`, p_detail_spread\: :ref:`float<class_float>`, gi_inject\: :ref:`float<class_float>`, temporal_reprojection\: :ref:`bool<class_bool>`, temporal_reprojection_amount\: :ref:`float<class_float>`, ambient_inject\: :ref:`float<class_float>`, sky_affect\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_volumetric_fog_filter_active<class_RenderingServer_method_environment_set_volumetric_fog_filter_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`environment_set_volumetric_fog_volume_size<class_RenderingServer_method_environment_set_volumetric_fog_volume_size>`\ (\ size\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`fog_volume_create<class_RenderingServer_method_fog_volume_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fog_volume_set_material<class_RenderingServer_method_fog_volume_set_material>`\ (\ fog_volume\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fog_volume_set_shape<class_RenderingServer_method_fog_volume_set_shape>`\ (\ fog_volume\: :ref:`RID<class_RID>`, shape\: :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fog_volume_set_size<class_RenderingServer_method_fog_volume_set_size>`\ (\ fog_volume\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_draw<class_RenderingServer_method_force_draw>`\ (\ swap_buffers\: :ref:`bool<class_bool>` = true, frame_step\: :ref:`float<class_float>` = 0.0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_sync<class_RenderingServer_method_force_sync>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_RenderingServer_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_default_clear_color<class_RenderingServer_method_get_default_clear_color>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_frame_setup_time_cpu<class_RenderingServer_method_get_frame_setup_time_cpu>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RenderingDevice<class_RenderingDevice>` | :ref:`get_rendering_device<class_RenderingServer_method_get_rendering_device>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_rendering_info<class_RenderingServer_method_get_rendering_info>`\ (\ info\: :ref:`RenderingInfo<enum_RenderingServer_RenderingInfo>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_shader_parameter_list<class_RenderingServer_method_get_shader_parameter_list>`\ (\ shader\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_test_cube<class_RenderingServer_method_get_test_cube>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_test_texture<class_RenderingServer_method_get_test_texture>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_video_adapter_api_version<class_RenderingServer_method_get_video_adapter_api_version>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_video_adapter_name<class_RenderingServer_method_get_video_adapter_name>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`DeviceType<enum_RenderingDevice_DeviceType>` | :ref:`get_video_adapter_type<class_RenderingServer_method_get_video_adapter_type>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_video_adapter_vendor<class_RenderingServer_method_get_video_adapter_vendor>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_white_texture<class_RenderingServer_method_get_white_texture>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`gi_set_use_half_resolution<class_RenderingServer_method_gi_set_use_half_resolution>`\ (\ half_resolution\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_shader_parameter_add<class_RenderingServer_method_global_shader_parameter_add>`\ (\ name\: :ref:`StringName<class_StringName>`, type\: :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>`, default_value\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`global_shader_parameter_get<class_RenderingServer_method_global_shader_parameter_get>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`global_shader_parameter_get_list<class_RenderingServer_method_global_shader_parameter_get_list>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` | :ref:`global_shader_parameter_get_type<class_RenderingServer_method_global_shader_parameter_get_type>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_shader_parameter_remove<class_RenderingServer_method_global_shader_parameter_remove>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_shader_parameter_set<class_RenderingServer_method_global_shader_parameter_set>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_shader_parameter_set_override<class_RenderingServer_method_global_shader_parameter_set_override>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_changed<class_RenderingServer_method_has_changed>`\ (\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_feature<class_RenderingServer_method_has_feature>`\ (\ feature\: :ref:`Features<enum_RenderingServer_Features>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_os_feature<class_RenderingServer_method_has_os_feature>`\ (\ feature\: :ref:`String<class_String>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_attach_object_instance_id<class_RenderingServer_method_instance_attach_object_instance_id>`\ (\ instance\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_attach_skeleton<class_RenderingServer_method_instance_attach_skeleton>`\ (\ instance\: :ref:`RID<class_RID>`, skeleton\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`instance_create<class_RenderingServer_method_instance_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`instance_create2<class_RenderingServer_method_instance_create2>`\ (\ base\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`instance_geometry_get_shader_parameter<class_RenderingServer_method_instance_geometry_get_shader_parameter>`\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`instance_geometry_get_shader_parameter_default_value<class_RenderingServer_method_instance_geometry_get_shader_parameter_default_value>`\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`instance_geometry_get_shader_parameter_list<class_RenderingServer_method_instance_geometry_get_shader_parameter_list>`\ (\ instance\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_cast_shadows_setting<class_RenderingServer_method_instance_geometry_set_cast_shadows_setting>`\ (\ instance\: :ref:`RID<class_RID>`, shadow_casting_setting\: :ref:`ShadowCastingSetting<enum_RenderingServer_ShadowCastingSetting>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_flag<class_RenderingServer_method_instance_geometry_set_flag>`\ (\ instance\: :ref:`RID<class_RID>`, flag\: :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_lightmap<class_RenderingServer_method_instance_geometry_set_lightmap>`\ (\ instance\: :ref:`RID<class_RID>`, lightmap\: :ref:`RID<class_RID>`, lightmap_uv_scale\: :ref:`Rect2<class_Rect2>`, lightmap_slice\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_lod_bias<class_RenderingServer_method_instance_geometry_set_lod_bias>`\ (\ instance\: :ref:`RID<class_RID>`, lod_bias\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_material_overlay<class_RenderingServer_method_instance_geometry_set_material_overlay>`\ (\ instance\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_material_override<class_RenderingServer_method_instance_geometry_set_material_override>`\ (\ instance\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_shader_parameter<class_RenderingServer_method_instance_geometry_set_shader_parameter>`\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_transparency<class_RenderingServer_method_instance_geometry_set_transparency>`\ (\ instance\: :ref:`RID<class_RID>`, transparency\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_geometry_set_visibility_range<class_RenderingServer_method_instance_geometry_set_visibility_range>`\ (\ instance\: :ref:`RID<class_RID>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, min_margin\: :ref:`float<class_float>`, max_margin\: :ref:`float<class_float>`, fade_mode\: :ref:`VisibilityRangeFadeMode<enum_RenderingServer_VisibilityRangeFadeMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_base<class_RenderingServer_method_instance_set_base>`\ (\ instance\: :ref:`RID<class_RID>`, base\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_blend_shape_weight<class_RenderingServer_method_instance_set_blend_shape_weight>`\ (\ instance\: :ref:`RID<class_RID>`, shape\: :ref:`int<class_int>`, weight\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_custom_aabb<class_RenderingServer_method_instance_set_custom_aabb>`\ (\ instance\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_extra_visibility_margin<class_RenderingServer_method_instance_set_extra_visibility_margin>`\ (\ instance\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_ignore_culling<class_RenderingServer_method_instance_set_ignore_culling>`\ (\ instance\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_layer_mask<class_RenderingServer_method_instance_set_layer_mask>`\ (\ instance\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_pivot_data<class_RenderingServer_method_instance_set_pivot_data>`\ (\ instance\: :ref:`RID<class_RID>`, sorting_offset\: :ref:`float<class_float>`, use_aabb_center\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_scenario<class_RenderingServer_method_instance_set_scenario>`\ (\ instance\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_surface_override_material<class_RenderingServer_method_instance_set_surface_override_material>`\ (\ instance\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_transform<class_RenderingServer_method_instance_set_transform>`\ (\ instance\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_visibility_parent<class_RenderingServer_method_instance_set_visibility_parent>`\ (\ instance\: :ref:`RID<class_RID>`, parent\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`instance_set_visible<class_RenderingServer_method_instance_set_visible>`\ (\ instance\: :ref:`RID<class_RID>`, visible\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_aabb<class_RenderingServer_method_instances_cull_aabb>`\ (\ aabb\: :ref:`AABB<class_AABB>`, scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_convex<class_RenderingServer_method_instances_cull_convex>`\ (\ convex\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\], scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt64Array<class_PackedInt64Array>` | :ref:`instances_cull_ray<class_RenderingServer_method_instances_cull_ray>`\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_on_render_thread<class_RenderingServer_method_is_on_render_thread>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_directional_set_blend_splits<class_RenderingServer_method_light_directional_set_blend_splits>`\ (\ light\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_directional_set_shadow_mode<class_RenderingServer_method_light_directional_set_shadow_mode>`\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightDirectionalShadowMode<enum_RenderingServer_LightDirectionalShadowMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_directional_set_sky_mode<class_RenderingServer_method_light_directional_set_sky_mode>`\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightDirectionalSkyMode<enum_RenderingServer_LightDirectionalSkyMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_omni_set_shadow_mode<class_RenderingServer_method_light_omni_set_shadow_mode>`\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightOmniShadowMode<enum_RenderingServer_LightOmniShadowMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_projectors_set_filter<class_RenderingServer_method_light_projectors_set_filter>`\ (\ filter\: :ref:`LightProjectorFilter<enum_RenderingServer_LightProjectorFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_bake_mode<class_RenderingServer_method_light_set_bake_mode>`\ (\ light\: :ref:`RID<class_RID>`, bake_mode\: :ref:`LightBakeMode<enum_RenderingServer_LightBakeMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_color<class_RenderingServer_method_light_set_color>`\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_cull_mask<class_RenderingServer_method_light_set_cull_mask>`\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_distance_fade<class_RenderingServer_method_light_set_distance_fade>`\ (\ decal\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, begin\: :ref:`float<class_float>`, shadow\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_max_sdfgi_cascade<class_RenderingServer_method_light_set_max_sdfgi_cascade>`\ (\ light\: :ref:`RID<class_RID>`, cascade\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_negative<class_RenderingServer_method_light_set_negative>`\ (\ light\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_param<class_RenderingServer_method_light_set_param>`\ (\ light\: :ref:`RID<class_RID>`, param\: :ref:`LightParam<enum_RenderingServer_LightParam>`, value\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_projector<class_RenderingServer_method_light_set_projector>`\ (\ light\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_reverse_cull_face_mode<class_RenderingServer_method_light_set_reverse_cull_face_mode>`\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`light_set_shadow<class_RenderingServer_method_light_set_shadow>`\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`lightmap_create<class_RenderingServer_method_lightmap_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`lightmap_get_probe_capture_bsp_tree<class_RenderingServer_method_lightmap_get_probe_capture_bsp_tree>`\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`lightmap_get_probe_capture_points<class_RenderingServer_method_lightmap_get_probe_capture_points>`\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray<class_PackedColorArray>` | :ref:`lightmap_get_probe_capture_sh<class_RenderingServer_method_lightmap_get_probe_capture_sh>`\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`lightmap_get_probe_capture_tetrahedra<class_RenderingServer_method_lightmap_get_probe_capture_tetrahedra>`\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_baked_exposure_normalization<class_RenderingServer_method_lightmap_set_baked_exposure_normalization>`\ (\ lightmap\: :ref:`RID<class_RID>`, baked_exposure\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_probe_bounds<class_RenderingServer_method_lightmap_set_probe_bounds>`\ (\ lightmap\: :ref:`RID<class_RID>`, bounds\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_probe_capture_data<class_RenderingServer_method_lightmap_set_probe_capture_data>`\ (\ lightmap\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector3Array<class_PackedVector3Array>`, point_sh\: :ref:`PackedColorArray<class_PackedColorArray>`, tetrahedra\: :ref:`PackedInt32Array<class_PackedInt32Array>`, bsp_tree\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_probe_capture_update_speed<class_RenderingServer_method_lightmap_set_probe_capture_update_speed>`\ (\ speed\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_probe_interior<class_RenderingServer_method_lightmap_set_probe_interior>`\ (\ lightmap\: :ref:`RID<class_RID>`, interior\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`lightmap_set_textures<class_RenderingServer_method_lightmap_set_textures>`\ (\ lightmap\: :ref:`RID<class_RID>`, light\: :ref:`RID<class_RID>`, uses_sh\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`make_sphere_mesh<class_RenderingServer_method_make_sphere_mesh>`\ (\ latitudes\: :ref:`int<class_int>`, longitudes\: :ref:`int<class_int>`, radius\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`material_create<class_RenderingServer_method_material_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`material_get_param<class_RenderingServer_method_material_get_param>`\ (\ material\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`material_set_next_pass<class_RenderingServer_method_material_set_next_pass>`\ (\ material\: :ref:`RID<class_RID>`, next_material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`material_set_param<class_RenderingServer_method_material_set_param>`\ (\ material\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`material_set_render_priority<class_RenderingServer_method_material_set_render_priority>`\ (\ material\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`material_set_shader<class_RenderingServer_method_material_set_shader>`\ (\ shader_material\: :ref:`RID<class_RID>`, shader\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_add_surface<class_RenderingServer_method_mesh_add_surface>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`Dictionary<class_Dictionary>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_add_surface_from_arrays<class_RenderingServer_method_mesh_add_surface_from_arrays>`\ (\ mesh\: :ref:`RID<class_RID>`, primitive\: :ref:`PrimitiveType<enum_RenderingServer_PrimitiveType>`, arrays\: :ref:`Array<class_Array>`, blend_shapes\: :ref:`Array<class_Array>` = [], lods\: :ref:`Dictionary<class_Dictionary>` = {}, compress_format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\] = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_clear<class_RenderingServer_method_mesh_clear>`\ (\ mesh\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`mesh_create<class_RenderingServer_method_mesh_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`mesh_create_from_surfaces<class_RenderingServer_method_mesh_create_from_surfaces>`\ (\ surfaces\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\], blend_shape_count\: :ref:`int<class_int>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_get_blend_shape_count<class_RenderingServer_method_mesh_get_blend_shape_count>`\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` | :ref:`mesh_get_blend_shape_mode<class_RenderingServer_method_mesh_get_blend_shape_mode>`\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`mesh_get_custom_aabb<class_RenderingServer_method_mesh_get_custom_aabb>`\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`mesh_get_surface<class_RenderingServer_method_mesh_get_surface>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_get_surface_count<class_RenderingServer_method_mesh_get_surface_count>`\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_set_blend_shape_mode<class_RenderingServer_method_mesh_set_blend_shape_mode>`\ (\ mesh\: :ref:`RID<class_RID>`, mode\: :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_set_custom_aabb<class_RenderingServer_method_mesh_set_custom_aabb>`\ (\ mesh\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_set_shadow_mesh<class_RenderingServer_method_mesh_set_shadow_mesh>`\ (\ mesh\: :ref:`RID<class_RID>`, shadow_mesh\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`mesh_surface_get_arrays<class_RenderingServer_method_mesh_surface_get_arrays>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] | :ref:`mesh_surface_get_blend_shape_arrays<class_RenderingServer_method_mesh_surface_get_blend_shape_arrays>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_attribute_stride<class_RenderingServer_method_mesh_surface_get_format_attribute_stride>`\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_normal_tangent_stride<class_RenderingServer_method_mesh_surface_get_format_normal_tangent_stride>`\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_offset<class_RenderingServer_method_mesh_surface_get_format_offset>`\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`, array_index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_skin_stride<class_RenderingServer_method_mesh_surface_get_format_skin_stride>`\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mesh_surface_get_format_vertex_stride<class_RenderingServer_method_mesh_surface_get_format_vertex_stride>`\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`mesh_surface_get_material<class_RenderingServer_method_mesh_surface_get_material>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_surface_set_material<class_RenderingServer_method_mesh_surface_set_material>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_surface_update_attribute_region<class_RenderingServer_method_mesh_surface_update_attribute_region>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_surface_update_skin_region<class_RenderingServer_method_mesh_surface_update_skin_region>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mesh_surface_update_vertex_region<class_RenderingServer_method_mesh_surface_update_vertex_region>`\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_allocate_data<class_RenderingServer_method_multimesh_allocate_data>`\ (\ multimesh\: :ref:`RID<class_RID>`, instances\: :ref:`int<class_int>`, transform_format\: :ref:`MultimeshTransformFormat<enum_RenderingServer_MultimeshTransformFormat>`, color_format\: :ref:`bool<class_bool>` = false, custom_data_format\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`multimesh_create<class_RenderingServer_method_multimesh_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`multimesh_get_aabb<class_RenderingServer_method_multimesh_get_aabb>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`multimesh_get_buffer<class_RenderingServer_method_multimesh_get_buffer>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`multimesh_get_custom_aabb<class_RenderingServer_method_multimesh_get_custom_aabb>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`multimesh_get_instance_count<class_RenderingServer_method_multimesh_get_instance_count>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`multimesh_get_mesh<class_RenderingServer_method_multimesh_get_mesh>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`multimesh_get_visible_instances<class_RenderingServer_method_multimesh_get_visible_instances>`\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`multimesh_instance_get_color<class_RenderingServer_method_multimesh_instance_get_color>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`multimesh_instance_get_custom_data<class_RenderingServer_method_multimesh_instance_get_custom_data>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`multimesh_instance_get_transform<class_RenderingServer_method_multimesh_instance_get_transform>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`multimesh_instance_get_transform_2d<class_RenderingServer_method_multimesh_instance_get_transform_2d>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_instance_set_color<class_RenderingServer_method_multimesh_instance_set_color>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_instance_set_custom_data<class_RenderingServer_method_multimesh_instance_set_custom_data>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, custom_data\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_instance_set_transform<class_RenderingServer_method_multimesh_instance_set_transform>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_instance_set_transform_2d<class_RenderingServer_method_multimesh_instance_set_transform_2d>`\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_buffer<class_RenderingServer_method_multimesh_set_buffer>`\ (\ multimesh\: :ref:`RID<class_RID>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_custom_aabb<class_RenderingServer_method_multimesh_set_custom_aabb>`\ (\ multimesh\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_mesh<class_RenderingServer_method_multimesh_set_mesh>`\ (\ multimesh\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`multimesh_set_visible_instances<class_RenderingServer_method_multimesh_set_visible_instances>`\ (\ multimesh\: :ref:`RID<class_RID>`, visible\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`occluder_create<class_RenderingServer_method_occluder_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`occluder_set_mesh<class_RenderingServer_method_occluder_set_mesh>`\ (\ occluder\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`omni_light_create<class_RenderingServer_method_omni_light_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`particles_collision_create<class_RenderingServer_method_particles_collision_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_height_field_update<class_RenderingServer_method_particles_collision_height_field_update>`\ (\ particles_collision\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_attractor_attenuation<class_RenderingServer_method_particles_collision_set_attractor_attenuation>`\ (\ particles_collision\: :ref:`RID<class_RID>`, curve\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_attractor_directionality<class_RenderingServer_method_particles_collision_set_attractor_directionality>`\ (\ particles_collision\: :ref:`RID<class_RID>`, amount\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_attractor_strength<class_RenderingServer_method_particles_collision_set_attractor_strength>`\ (\ particles_collision\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_box_extents<class_RenderingServer_method_particles_collision_set_box_extents>`\ (\ particles_collision\: :ref:`RID<class_RID>`, extents\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_collision_type<class_RenderingServer_method_particles_collision_set_collision_type>`\ (\ particles_collision\: :ref:`RID<class_RID>`, type\: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_cull_mask<class_RenderingServer_method_particles_collision_set_cull_mask>`\ (\ particles_collision\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_field_texture<class_RenderingServer_method_particles_collision_set_field_texture>`\ (\ particles_collision\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_height_field_resolution<class_RenderingServer_method_particles_collision_set_height_field_resolution>`\ (\ particles_collision\: :ref:`RID<class_RID>`, resolution\: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_collision_set_sphere_radius<class_RenderingServer_method_particles_collision_set_sphere_radius>`\ (\ particles_collision\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`particles_create<class_RenderingServer_method_particles_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_emit<class_RenderingServer_method_particles_emit>`\ (\ particles\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, velocity\: :ref:`Vector3<class_Vector3>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, emit_flags\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`particles_get_current_aabb<class_RenderingServer_method_particles_get_current_aabb>`\ (\ particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`particles_get_emitting<class_RenderingServer_method_particles_get_emitting>`\ (\ particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`particles_is_inactive<class_RenderingServer_method_particles_is_inactive>`\ (\ particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_request_process<class_RenderingServer_method_particles_request_process>`\ (\ particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_restart<class_RenderingServer_method_particles_restart>`\ (\ particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_amount<class_RenderingServer_method_particles_set_amount>`\ (\ particles\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_amount_ratio<class_RenderingServer_method_particles_set_amount_ratio>`\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_collision_base_size<class_RenderingServer_method_particles_set_collision_base_size>`\ (\ particles\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_custom_aabb<class_RenderingServer_method_particles_set_custom_aabb>`\ (\ particles\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_draw_order<class_RenderingServer_method_particles_set_draw_order>`\ (\ particles\: :ref:`RID<class_RID>`, order\: :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_draw_pass_mesh<class_RenderingServer_method_particles_set_draw_pass_mesh>`\ (\ particles\: :ref:`RID<class_RID>`, pass\: :ref:`int<class_int>`, mesh\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_draw_passes<class_RenderingServer_method_particles_set_draw_passes>`\ (\ particles\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_emission_transform<class_RenderingServer_method_particles_set_emission_transform>`\ (\ particles\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_emitter_velocity<class_RenderingServer_method_particles_set_emitter_velocity>`\ (\ particles\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_emitting<class_RenderingServer_method_particles_set_emitting>`\ (\ particles\: :ref:`RID<class_RID>`, emitting\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_explosiveness_ratio<class_RenderingServer_method_particles_set_explosiveness_ratio>`\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_fixed_fps<class_RenderingServer_method_particles_set_fixed_fps>`\ (\ particles\: :ref:`RID<class_RID>`, fps\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_fractional_delta<class_RenderingServer_method_particles_set_fractional_delta>`\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_interp_to_end<class_RenderingServer_method_particles_set_interp_to_end>`\ (\ particles\: :ref:`RID<class_RID>`, factor\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_interpolate<class_RenderingServer_method_particles_set_interpolate>`\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_lifetime<class_RenderingServer_method_particles_set_lifetime>`\ (\ particles\: :ref:`RID<class_RID>`, lifetime\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_mode<class_RenderingServer_method_particles_set_mode>`\ (\ particles\: :ref:`RID<class_RID>`, mode\: :ref:`ParticlesMode<enum_RenderingServer_ParticlesMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_one_shot<class_RenderingServer_method_particles_set_one_shot>`\ (\ particles\: :ref:`RID<class_RID>`, one_shot\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_pre_process_time<class_RenderingServer_method_particles_set_pre_process_time>`\ (\ particles\: :ref:`RID<class_RID>`, time\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_process_material<class_RenderingServer_method_particles_set_process_material>`\ (\ particles\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_randomness_ratio<class_RenderingServer_method_particles_set_randomness_ratio>`\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_speed_scale<class_RenderingServer_method_particles_set_speed_scale>`\ (\ particles\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_subemitter<class_RenderingServer_method_particles_set_subemitter>`\ (\ particles\: :ref:`RID<class_RID>`, subemitter_particles\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_trail_bind_poses<class_RenderingServer_method_particles_set_trail_bind_poses>`\ (\ particles\: :ref:`RID<class_RID>`, bind_poses\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\]\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_trails<class_RenderingServer_method_particles_set_trails>`\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, length_sec\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_transform_align<class_RenderingServer_method_particles_set_transform_align>`\ (\ particles\: :ref:`RID<class_RID>`, align\: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`particles_set_use_local_coordinates<class_RenderingServer_method_particles_set_use_local_coordinates>`\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`positional_soft_shadow_filter_set_quality<class_RenderingServer_method_positional_soft_shadow_filter_set_quality>`\ (\ quality\: :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`reflection_probe_create<class_RenderingServer_method_reflection_probe_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_ambient_color<class_RenderingServer_method_reflection_probe_set_ambient_color>`\ (\ probe\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_ambient_energy<class_RenderingServer_method_reflection_probe_set_ambient_energy>`\ (\ probe\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_ambient_mode<class_RenderingServer_method_reflection_probe_set_ambient_mode>`\ (\ probe\: :ref:`RID<class_RID>`, mode\: :ref:`ReflectionProbeAmbientMode<enum_RenderingServer_ReflectionProbeAmbientMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_as_interior<class_RenderingServer_method_reflection_probe_set_as_interior>`\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_cull_mask<class_RenderingServer_method_reflection_probe_set_cull_mask>`\ (\ probe\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_enable_box_projection<class_RenderingServer_method_reflection_probe_set_enable_box_projection>`\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_enable_shadows<class_RenderingServer_method_reflection_probe_set_enable_shadows>`\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_intensity<class_RenderingServer_method_reflection_probe_set_intensity>`\ (\ probe\: :ref:`RID<class_RID>`, intensity\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_max_distance<class_RenderingServer_method_reflection_probe_set_max_distance>`\ (\ probe\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_mesh_lod_threshold<class_RenderingServer_method_reflection_probe_set_mesh_lod_threshold>`\ (\ probe\: :ref:`RID<class_RID>`, pixels\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_origin_offset<class_RenderingServer_method_reflection_probe_set_origin_offset>`\ (\ probe\: :ref:`RID<class_RID>`, offset\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_reflection_mask<class_RenderingServer_method_reflection_probe_set_reflection_mask>`\ (\ probe\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_resolution<class_RenderingServer_method_reflection_probe_set_resolution>`\ (\ probe\: :ref:`RID<class_RID>`, resolution\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_size<class_RenderingServer_method_reflection_probe_set_size>`\ (\ probe\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reflection_probe_set_update_mode<class_RenderingServer_method_reflection_probe_set_update_mode>`\ (\ probe\: :ref:`RID<class_RID>`, mode\: :ref:`ReflectionProbeUpdateMode<enum_RenderingServer_ReflectionProbeUpdateMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_frame_drawn_callback<class_RenderingServer_method_request_frame_drawn_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`scenario_create<class_RenderingServer_method_scenario_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scenario_set_camera_attributes<class_RenderingServer_method_scenario_set_camera_attributes>`\ (\ scenario\: :ref:`RID<class_RID>`, effects\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scenario_set_compositor<class_RenderingServer_method_scenario_set_compositor>`\ (\ scenario\: :ref:`RID<class_RID>`, compositor\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scenario_set_environment<class_RenderingServer_method_scenario_set_environment>`\ (\ scenario\: :ref:`RID<class_RID>`, environment\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scenario_set_fallback_environment<class_RenderingServer_method_scenario_set_fallback_environment>`\ (\ scenario\: :ref:`RID<class_RID>`, environment\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`screen_space_roughness_limiter_set_active<class_RenderingServer_method_screen_space_roughness_limiter_set_active>`\ (\ enable\: :ref:`bool<class_bool>`, amount\: :ref:`float<class_float>`, limit\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_boot_image<class_RenderingServer_method_set_boot_image>`\ (\ image\: :ref:`Image<class_Image>`, color\: :ref:`Color<class_Color>`, scale\: :ref:`bool<class_bool>`, use_filter\: :ref:`bool<class_bool>` = true\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_debug_generate_wireframes<class_RenderingServer_method_set_debug_generate_wireframes>`\ (\ generate\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_clear_color<class_RenderingServer_method_set_default_clear_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shader_create<class_RenderingServer_method_shader_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`shader_get_code<class_RenderingServer_method_shader_get_code>`\ (\ shader\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shader_get_default_texture_parameter<class_RenderingServer_method_shader_get_default_texture_parameter>`\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`, index\: :ref:`int<class_int>` = 0\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`shader_get_parameter_default<class_RenderingServer_method_shader_get_parameter_default>`\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shader_set_code<class_RenderingServer_method_shader_set_code>`\ (\ shader\: :ref:`RID<class_RID>`, code\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shader_set_default_texture_parameter<class_RenderingServer_method_shader_set_default_texture_parameter>`\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`, texture\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shader_set_path_hint<class_RenderingServer_method_shader_set_path_hint>`\ (\ shader\: :ref:`RID<class_RID>`, path\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skeleton_allocate_data<class_RenderingServer_method_skeleton_allocate_data>`\ (\ skeleton\: :ref:`RID<class_RID>`, bones\: :ref:`int<class_int>`, is_2d_skeleton\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`skeleton_bone_get_transform<class_RenderingServer_method_skeleton_bone_get_transform>`\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`skeleton_bone_get_transform_2d<class_RenderingServer_method_skeleton_bone_get_transform_2d>`\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skeleton_bone_set_transform<class_RenderingServer_method_skeleton_bone_set_transform>`\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skeleton_bone_set_transform_2d<class_RenderingServer_method_skeleton_bone_set_transform_2d>`\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`skeleton_create<class_RenderingServer_method_skeleton_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`skeleton_get_bone_count<class_RenderingServer_method_skeleton_get_bone_count>`\ (\ skeleton\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skeleton_set_base_transform_2d<class_RenderingServer_method_skeleton_set_base_transform_2d>`\ (\ skeleton\: :ref:`RID<class_RID>`, base_transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`sky_bake_panorama<class_RenderingServer_method_sky_bake_panorama>`\ (\ sky\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`, bake_irradiance\: :ref:`bool<class_bool>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`sky_create<class_RenderingServer_method_sky_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sky_set_material<class_RenderingServer_method_sky_set_material>`\ (\ sky\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sky_set_mode<class_RenderingServer_method_sky_set_mode>`\ (\ sky\: :ref:`RID<class_RID>`, mode\: :ref:`SkyMode<enum_RenderingServer_SkyMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sky_set_radiance_size<class_RenderingServer_method_sky_set_radiance_size>`\ (\ sky\: :ref:`RID<class_RID>`, radiance_size\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`spot_light_create<class_RenderingServer_method_spot_light_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sub_surface_scattering_set_quality<class_RenderingServer_method_sub_surface_scattering_set_quality>`\ (\ quality\: :ref:`SubSurfaceScatteringQuality<enum_RenderingServer_SubSurfaceScatteringQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sub_surface_scattering_set_scale<class_RenderingServer_method_sub_surface_scattering_set_scale>`\ (\ scale\: :ref:`float<class_float>`, depth_scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_2d_create<class_RenderingServer_method_texture_2d_create>`\ (\ image\: :ref:`Image<class_Image>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`texture_2d_get<class_RenderingServer_method_texture_2d_get>`\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`texture_2d_layer_get<class_RenderingServer_method_texture_2d_layer_get>`\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_2d_layered_create<class_RenderingServer_method_texture_2d_layered_create>`\ (\ layers\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\], layered_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_2d_layered_placeholder_create<class_RenderingServer_method_texture_2d_layered_placeholder_create>`\ (\ layered_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_2d_placeholder_create<class_RenderingServer_method_texture_2d_placeholder_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_2d_update<class_RenderingServer_method_texture_2d_update>`\ (\ texture\: :ref:`RID<class_RID>`, image\: :ref:`Image<class_Image>`, layer\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_3d_create<class_RenderingServer_method_texture_3d_create>`\ (\ format\: :ref:`Format<enum_Image_Format>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, mipmaps\: :ref:`bool<class_bool>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`texture_3d_get<class_RenderingServer_method_texture_3d_get>`\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_3d_placeholder_create<class_RenderingServer_method_texture_3d_placeholder_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_3d_update<class_RenderingServer_method_texture_3d_update>`\ (\ texture\: :ref:`RID<class_RID>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`texture_get_format<class_RenderingServer_method_texture_get_format>`\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`texture_get_native_handle<class_RenderingServer_method_texture_get_native_handle>`\ (\ texture\: :ref:`RID<class_RID>`, srgb\: :ref:`bool<class_bool>` = false\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`texture_get_path<class_RenderingServer_method_texture_get_path>`\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_get_rd_texture<class_RenderingServer_method_texture_get_rd_texture>`\ (\ texture\: :ref:`RID<class_RID>`, srgb\: :ref:`bool<class_bool>` = false\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_proxy_create<class_RenderingServer_method_texture_proxy_create>`\ (\ base\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_proxy_update<class_RenderingServer_method_texture_proxy_update>`\ (\ texture\: :ref:`RID<class_RID>`, proxy_to\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_rd_create<class_RenderingServer_method_texture_rd_create>`\ (\ rd_texture\: :ref:`RID<class_RID>`, layer_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_replace<class_RenderingServer_method_texture_replace>`\ (\ texture\: :ref:`RID<class_RID>`, by_texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_set_force_redraw_if_visible<class_RenderingServer_method_texture_set_force_redraw_if_visible>`\ (\ texture\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_set_path<class_RenderingServer_method_texture_set_path>`\ (\ texture\: :ref:`RID<class_RID>`, path\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`texture_set_size_override<class_RenderingServer_method_texture_set_size_override>`\ (\ texture\: :ref:`RID<class_RID>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_attach_camera<class_RenderingServer_method_viewport_attach_camera>`\ (\ viewport\: :ref:`RID<class_RID>`, camera\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_attach_canvas<class_RenderingServer_method_viewport_attach_canvas>`\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_attach_to_screen<class_RenderingServer_method_viewport_attach_to_screen>`\ (\ viewport\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), screen\: :ref:`int<class_int>` = 0\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`viewport_create<class_RenderingServer_method_viewport_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`viewport_get_measured_render_time_cpu<class_RenderingServer_method_viewport_get_measured_render_time_cpu>`\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`viewport_get_measured_render_time_gpu<class_RenderingServer_method_viewport_get_measured_render_time_gpu>`\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`viewport_get_render_info<class_RenderingServer_method_viewport_get_render_info>`\ (\ viewport\: :ref:`RID<class_RID>`, type\: :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>`, info\: :ref:`ViewportRenderInfo<enum_RenderingServer_ViewportRenderInfo>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`viewport_get_render_target<class_RenderingServer_method_viewport_get_render_target>`\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`viewport_get_texture<class_RenderingServer_method_viewport_get_texture>`\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` | :ref:`viewport_get_update_mode<class_RenderingServer_method_viewport_get_update_mode>`\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_remove_canvas<class_RenderingServer_method_viewport_remove_canvas>`\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_active<class_RenderingServer_method_viewport_set_active>`\ (\ viewport\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_canvas_cull_mask<class_RenderingServer_method_viewport_set_canvas_cull_mask>`\ (\ viewport\: :ref:`RID<class_RID>`, canvas_cull_mask\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_canvas_stacking<class_RenderingServer_method_viewport_set_canvas_stacking>`\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, sublayer\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_canvas_transform<class_RenderingServer_method_viewport_set_canvas_transform>`\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, offset\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_clear_mode<class_RenderingServer_method_viewport_set_clear_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, clear_mode\: :ref:`ViewportClearMode<enum_RenderingServer_ViewportClearMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_debug_draw<class_RenderingServer_method_viewport_set_debug_draw>`\ (\ viewport\: :ref:`RID<class_RID>`, draw\: :ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_default_canvas_item_texture_filter<class_RenderingServer_method_viewport_set_default_canvas_item_texture_filter>`\ (\ viewport\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_default_canvas_item_texture_repeat<class_RenderingServer_method_viewport_set_default_canvas_item_texture_repeat>`\ (\ viewport\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_disable_2d<class_RenderingServer_method_viewport_set_disable_2d>`\ (\ viewport\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_disable_3d<class_RenderingServer_method_viewport_set_disable_3d>`\ (\ viewport\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_environment_mode<class_RenderingServer_method_viewport_set_environment_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportEnvironmentMode<enum_RenderingServer_ViewportEnvironmentMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_fsr_sharpness<class_RenderingServer_method_viewport_set_fsr_sharpness>`\ (\ viewport\: :ref:`RID<class_RID>`, sharpness\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_global_canvas_transform<class_RenderingServer_method_viewport_set_global_canvas_transform>`\ (\ viewport\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_measure_render_time<class_RenderingServer_method_viewport_set_measure_render_time>`\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_msaa_2d<class_RenderingServer_method_viewport_set_msaa_2d>`\ (\ viewport\: :ref:`RID<class_RID>`, msaa\: :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_msaa_3d<class_RenderingServer_method_viewport_set_msaa_3d>`\ (\ viewport\: :ref:`RID<class_RID>`, msaa\: :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_occlusion_culling_build_quality<class_RenderingServer_method_viewport_set_occlusion_culling_build_quality>`\ (\ quality\: :ref:`ViewportOcclusionCullingBuildQuality<enum_RenderingServer_ViewportOcclusionCullingBuildQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_occlusion_rays_per_thread<class_RenderingServer_method_viewport_set_occlusion_rays_per_thread>`\ (\ rays_per_thread\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_parent_viewport<class_RenderingServer_method_viewport_set_parent_viewport>`\ (\ viewport\: :ref:`RID<class_RID>`, parent_viewport\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_positional_shadow_atlas_quadrant_subdivision<class_RenderingServer_method_viewport_set_positional_shadow_atlas_quadrant_subdivision>`\ (\ viewport\: :ref:`RID<class_RID>`, quadrant\: :ref:`int<class_int>`, subdivision\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_positional_shadow_atlas_size<class_RenderingServer_method_viewport_set_positional_shadow_atlas_size>`\ (\ viewport\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, use_16_bits\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_render_direct_to_screen<class_RenderingServer_method_viewport_set_render_direct_to_screen>`\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_scaling_3d_mode<class_RenderingServer_method_viewport_set_scaling_3d_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, scaling_3d_mode\: :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_scaling_3d_scale<class_RenderingServer_method_viewport_set_scaling_3d_scale>`\ (\ viewport\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_scenario<class_RenderingServer_method_viewport_set_scenario>`\ (\ viewport\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_screen_space_aa<class_RenderingServer_method_viewport_set_screen_space_aa>`\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_sdf_oversize_and_scale<class_RenderingServer_method_viewport_set_sdf_oversize_and_scale>`\ (\ viewport\: :ref:`RID<class_RID>`, oversize\: :ref:`ViewportSDFOversize<enum_RenderingServer_ViewportSDFOversize>`, scale\: :ref:`ViewportSDFScale<enum_RenderingServer_ViewportSDFScale>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_size<class_RenderingServer_method_viewport_set_size>`\ (\ viewport\: :ref:`RID<class_RID>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_snap_2d_transforms_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_transforms_to_pixel>`\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_snap_2d_vertices_to_pixel<class_RenderingServer_method_viewport_set_snap_2d_vertices_to_pixel>`\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_texture_mipmap_bias<class_RenderingServer_method_viewport_set_texture_mipmap_bias>`\ (\ viewport\: :ref:`RID<class_RID>`, mipmap_bias\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_transparent_background<class_RenderingServer_method_viewport_set_transparent_background>`\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_update_mode<class_RenderingServer_method_viewport_set_update_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, update_mode\: :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_use_debanding<class_RenderingServer_method_viewport_set_use_debanding>`\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_use_hdr_2d<class_RenderingServer_method_viewport_set_use_hdr_2d>`\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_use_occlusion_culling<class_RenderingServer_method_viewport_set_use_occlusion_culling>`\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_use_taa<class_RenderingServer_method_viewport_set_use_taa>`\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_use_xr<class_RenderingServer_method_viewport_set_use_xr>`\ (\ viewport\: :ref:`RID<class_RID>`, use_xr\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_vrs_mode<class_RenderingServer_method_viewport_set_vrs_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVRSMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_vrs_texture<class_RenderingServer_method_viewport_set_vrs_texture>`\ (\ viewport\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`viewport_set_vrs_update_mode<class_RenderingServer_method_viewport_set_vrs_update_mode>`\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`visibility_notifier_create<class_RenderingServer_method_visibility_notifier_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`visibility_notifier_set_aabb<class_RenderingServer_method_visibility_notifier_set_aabb>`\ (\ notifier\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`visibility_notifier_set_callbacks<class_RenderingServer_method_visibility_notifier_set_callbacks>`\ (\ notifier\: :ref:`RID<class_RID>`, enter_callable\: :ref:`Callable<class_Callable>`, exit_callable\: :ref:`Callable<class_Callable>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_allocate_data<class_RenderingServer_method_voxel_gi_allocate_data>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3i<class_Vector3i>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`voxel_gi_create<class_RenderingServer_method_voxel_gi_create>`\ (\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_data_cells<class_RenderingServer_method_voxel_gi_get_data_cells>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_distance_field<class_RenderingServer_method_voxel_gi_get_distance_field>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`voxel_gi_get_level_counts<class_RenderingServer_method_voxel_gi_get_level_counts>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`voxel_gi_get_octree_cells<class_RenderingServer_method_voxel_gi_get_octree_cells>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`voxel_gi_get_octree_size<class_RenderingServer_method_voxel_gi_get_octree_size>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`voxel_gi_get_to_cell_xform<class_RenderingServer_method_voxel_gi_get_to_cell_xform>`\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_baked_exposure_normalization<class_RenderingServer_method_voxel_gi_set_baked_exposure_normalization>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, baked_exposure\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_bias<class_RenderingServer_method_voxel_gi_set_bias>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_dynamic_range<class_RenderingServer_method_voxel_gi_set_dynamic_range>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, range\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_energy<class_RenderingServer_method_voxel_gi_set_energy>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_interior<class_RenderingServer_method_voxel_gi_set_interior>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_normal_bias<class_RenderingServer_method_voxel_gi_set_normal_bias>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_propagation<class_RenderingServer_method_voxel_gi_set_propagation>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, amount\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_quality<class_RenderingServer_method_voxel_gi_set_quality>`\ (\ quality\: :ref:`VoxelGIQuality<enum_RenderingServer_VoxelGIQuality>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`voxel_gi_set_use_two_bounces<class_RenderingServer_method_voxel_gi_set_use_two_bounces>`\ (\ voxel_gi\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -997,7 +1063,7 @@ Signals .. rst-class:: classref-signal -**frame_post_draw** **(** **)** +**frame_post_draw**\ (\ ) :ref:`🔗<class_RenderingServer_signal_frame_post_draw>` Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports. @@ -1009,7 +1075,7 @@ Emitted at the end of the frame, after the RenderingServer has finished updating .. rst-class:: classref-signal -**frame_pre_draw** **(** **)** +**frame_pre_draw**\ (\ ) :ref:`🔗<class_RenderingServer_signal_frame_pre_draw>` Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports. @@ -1026,7 +1092,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TextureLayeredType**: +enum **TextureLayeredType**: :ref:`🔗<enum_RenderingServer_TextureLayeredType>` .. _class_RenderingServer_constant_TEXTURE_LAYERED_2D_ARRAY: @@ -1060,7 +1126,7 @@ Array of cubemap textures (see :ref:`CubemapArray<class_CubemapArray>`). .. rst-class:: classref-enumeration -enum **CubeMapLayer**: +enum **CubeMapLayer**: :ref:`🔗<enum_RenderingServer_CubeMapLayer>` .. _class_RenderingServer_constant_CUBEMAP_LAYER_LEFT: @@ -1118,7 +1184,7 @@ Back face of a :ref:`Cubemap<class_Cubemap>`. .. rst-class:: classref-enumeration -enum **ShaderMode**: +enum **ShaderMode**: :ref:`🔗<enum_RenderingServer_ShaderMode>` .. _class_RenderingServer_constant_SHADER_SPATIAL: @@ -1176,7 +1242,7 @@ Represents the size of the :ref:`ShaderMode<enum_RenderingServer_ShaderMode>` en .. rst-class:: classref-enumeration -enum **ArrayType**: +enum **ArrayType**: :ref:`🔗<enum_RenderingServer_ArrayType>` .. _class_RenderingServer_constant_ARRAY_VERTEX: @@ -1298,7 +1364,7 @@ Represents the size of the :ref:`ArrayType<enum_RenderingServer_ArrayType>` enum .. rst-class:: classref-enumeration -enum **ArrayCustomFormat**: +enum **ArrayCustomFormat**: :ref:`🔗<enum_RenderingServer_ArrayCustomFormat>` .. _class_RenderingServer_constant_ARRAY_CUSTOM_RGBA8_UNORM: @@ -1380,7 +1446,7 @@ Represents the size of the :ref:`ArrayCustomFormat<enum_RenderingServer_ArrayCus .. rst-class:: classref-enumeration -flags **ArrayFormat**: +flags **ArrayFormat**: :ref:`🔗<enum_RenderingServer_ArrayFormat>` .. _class_RenderingServer_constant_ARRAY_FORMAT_VERTEX: @@ -1492,6 +1558,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_BLEND_SHAPE_MASK** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BASE: @@ -1500,6 +1570,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_BASE** = ``13`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_BITS: @@ -1508,6 +1582,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_BITS** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM0_SHIFT: @@ -1516,6 +1594,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM0_SHIFT** = ``13`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM1_SHIFT: @@ -1524,6 +1606,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM1_SHIFT** = ``16`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM2_SHIFT: @@ -1532,6 +1618,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM2_SHIFT** = ``19`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM3_SHIFT: @@ -1540,6 +1630,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM3_SHIFT** = ``22`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FORMAT_CUSTOM_MASK: @@ -1548,6 +1642,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FORMAT_CUSTOM_MASK** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_COMPRESS_FLAGS_BASE: @@ -1556,6 +1654,10 @@ Flag used to mark an index array. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_COMPRESS_FLAGS_BASE** = ``25`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FLAG_USE_2D_VERTICES: @@ -1572,6 +1674,10 @@ Flag used to mark that the array contains 2D vertices. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_USE_DYNAMIC_UPDATE** = ``67108864`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_ARRAY_FLAG_USE_8_BONE_WEIGHTS: @@ -1580,7 +1686,7 @@ Flag used to mark that the array contains 2D vertices. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = ``134217728`` -Flag used to mark that the array uses 8 bone weighs instead of 4. +Flag used to mark that the array uses 8 bone weights instead of 4. .. _class_RenderingServer_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY: @@ -1588,7 +1694,63 @@ Flag used to mark that the array uses 8 bone weighs instead of 4. :ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY** = ``268435456`` +Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information. + +.. _class_RenderingServer_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912`` + +Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_VERSION_BASE** = ``35`` + +Flag used to mark the start of the bits used to store the mesh version. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_VERSION_SHIFT** = ``35`` + +Flag used to shift a mesh format int to bring the version into the lowest digits. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_VERSION_1** = ``0`` + +Flag used to record the format used by prior mesh versions before the introduction of a version. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_VERSION_2** = ``34359738368`` + +Flag used to record the second iteration of the mesh version flag. The primary difference between this and :ref:`ARRAY_FLAG_FORMAT_VERSION_1<class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_1>` is that this version supports :ref:`ARRAY_FLAG_COMPRESS_ATTRIBUTES<class_RenderingServer_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES>` and in this version vertex positions are de-interleaved from normals and tangents. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_CURRENT_VERSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_CURRENT_VERSION** = ``34359738368`` +Flag used to record the current version that the engine expects. Currently this is the same as :ref:`ARRAY_FLAG_FORMAT_VERSION_2<class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_2>`. + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>` **ARRAY_FLAG_FORMAT_VERSION_MASK** = ``255`` + +Flag used to isolate the bits used for mesh version after using :ref:`ARRAY_FLAG_FORMAT_VERSION_SHIFT<class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_SHIFT>` to shift them into place. .. rst-class:: classref-item-separator @@ -1598,7 +1760,7 @@ Flag used to mark that the array uses 8 bone weighs instead of 4. .. rst-class:: classref-enumeration -enum **PrimitiveType**: +enum **PrimitiveType**: :ref:`🔗<enum_RenderingServer_PrimitiveType>` .. _class_RenderingServer_constant_PRIMITIVE_POINTS: @@ -1656,7 +1818,7 @@ Represents the size of the :ref:`PrimitiveType<enum_RenderingServer_PrimitiveTyp .. rst-class:: classref-enumeration -enum **BlendShapeMode**: +enum **BlendShapeMode**: :ref:`🔗<enum_RenderingServer_BlendShapeMode>` .. _class_RenderingServer_constant_BLEND_SHAPE_MODE_NORMALIZED: @@ -1682,7 +1844,7 @@ Blend shapes are relative to base weight. .. rst-class:: classref-enumeration -enum **MultimeshTransformFormat**: +enum **MultimeshTransformFormat**: :ref:`🔗<enum_RenderingServer_MultimeshTransformFormat>` .. _class_RenderingServer_constant_MULTIMESH_TRANSFORM_2D: @@ -1708,7 +1870,7 @@ Use :ref:`Transform3D<class_Transform3D>` to store MultiMesh transform. .. rst-class:: classref-enumeration -enum **LightProjectorFilter**: +enum **LightProjectorFilter**: :ref:`🔗<enum_RenderingServer_LightProjectorFilter>` .. _class_RenderingServer_constant_LIGHT_PROJECTOR_FILTER_NEAREST: @@ -1766,7 +1928,7 @@ Linear filter for light projectors (use for non-pixel art light projectors). Ani .. rst-class:: classref-enumeration -enum **LightType**: +enum **LightType**: :ref:`🔗<enum_RenderingServer_LightType>` .. _class_RenderingServer_constant_LIGHT_DIRECTIONAL: @@ -1800,7 +1962,7 @@ Spot light (see :ref:`SpotLight3D<class_SpotLight3D>`). .. rst-class:: classref-enumeration -enum **LightParam**: +enum **LightParam**: :ref:`🔗<enum_RenderingServer_LightParam>` .. _class_RenderingServer_constant_LIGHT_PARAM_ENERGY: @@ -1960,6 +2122,10 @@ Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolu :ref:`LightParam<enum_RenderingServer_LightParam>` **LIGHT_PARAM_TRANSMITTANCE_BIAS** = ``19`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_LIGHT_PARAM_INTENSITY: @@ -1986,7 +2152,7 @@ Represents the size of the :ref:`LightParam<enum_RenderingServer_LightParam>` en .. rst-class:: classref-enumeration -enum **LightBakeMode**: +enum **LightBakeMode**: :ref:`🔗<enum_RenderingServer_LightBakeMode>` .. _class_RenderingServer_constant_LIGHT_BAKE_DISABLED: @@ -2020,7 +2186,7 @@ Light is taken into account in dynamic baking (:ref:`VoxelGI<class_VoxelGI>` and .. rst-class:: classref-enumeration -enum **LightOmniShadowMode**: +enum **LightOmniShadowMode**: :ref:`🔗<enum_RenderingServer_LightOmniShadowMode>` .. _class_RenderingServer_constant_LIGHT_OMNI_SHADOW_DUAL_PARABOLOID: @@ -2046,7 +2212,7 @@ Use a cubemap shadow map for omni lights. Slower but better quality than dual pa .. rst-class:: classref-enumeration -enum **LightDirectionalShadowMode**: +enum **LightDirectionalShadowMode**: :ref:`🔗<enum_RenderingServer_LightDirectionalShadowMode>` .. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL: @@ -2080,7 +2246,7 @@ Use 4 splits for shadow projection when using directional light. .. rst-class:: classref-enumeration -enum **LightDirectionalSkyMode**: +enum **LightDirectionalSkyMode**: :ref:`🔗<enum_RenderingServer_LightDirectionalSkyMode>` .. _class_RenderingServer_constant_LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY: @@ -2114,7 +2280,7 @@ Only use DirectionalLight3D in sky rendering. .. rst-class:: classref-enumeration -enum **ShadowQuality**: +enum **ShadowQuality**: :ref:`🔗<enum_RenderingServer_ShadowQuality>` .. _class_RenderingServer_constant_SHADOW_QUALITY_HARD: @@ -2182,7 +2348,7 @@ Represents the size of the :ref:`ShadowQuality<enum_RenderingServer_ShadowQualit .. rst-class:: classref-enumeration -enum **ReflectionProbeUpdateMode**: +enum **ReflectionProbeUpdateMode**: :ref:`🔗<enum_RenderingServer_ReflectionProbeUpdateMode>` .. _class_RenderingServer_constant_REFLECTION_PROBE_UPDATE_ONCE: @@ -2208,7 +2374,7 @@ Reflection probe will update each frame. This mode is necessary to capture movin .. rst-class:: classref-enumeration -enum **ReflectionProbeAmbientMode**: +enum **ReflectionProbeAmbientMode**: :ref:`🔗<enum_RenderingServer_ReflectionProbeAmbientMode>` .. _class_RenderingServer_constant_REFLECTION_PROBE_AMBIENT_DISABLED: @@ -2242,7 +2408,7 @@ Apply custom ambient lighting inside the reflection probe's box defined by its s .. rst-class:: classref-enumeration -enum **DecalTexture**: +enum **DecalTexture**: :ref:`🔗<enum_RenderingServer_DecalTexture>` .. _class_RenderingServer_constant_DECAL_TEXTURE_ALBEDO: @@ -2292,7 +2458,7 @@ Represents the size of the :ref:`DecalTexture<enum_RenderingServer_DecalTexture> .. rst-class:: classref-enumeration -enum **DecalFilter**: +enum **DecalFilter**: :ref:`🔗<enum_RenderingServer_DecalFilter>` .. _class_RenderingServer_constant_DECAL_FILTER_NEAREST: @@ -2350,7 +2516,7 @@ Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are .. rst-class:: classref-enumeration -enum **VoxelGIQuality**: +enum **VoxelGIQuality**: :ref:`🔗<enum_RenderingServer_VoxelGIQuality>` .. _class_RenderingServer_constant_VOXEL_GI_QUALITY_LOW: @@ -2376,7 +2542,7 @@ High :ref:`VoxelGI<class_VoxelGI>` rendering quality using 6 cones. .. rst-class:: classref-enumeration -enum **ParticlesMode**: +enum **ParticlesMode**: :ref:`🔗<enum_RenderingServer_ParticlesMode>` .. _class_RenderingServer_constant_PARTICLES_MODE_2D: @@ -2402,7 +2568,7 @@ enum **ParticlesMode**: .. rst-class:: classref-enumeration -enum **ParticlesTransformAlign**: +enum **ParticlesTransformAlign**: :ref:`🔗<enum_RenderingServer_ParticlesTransformAlign>` .. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_DISABLED: @@ -2410,6 +2576,10 @@ enum **ParticlesTransformAlign**: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` **PARTICLES_TRANSFORM_ALIGN_DISABLED** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD: @@ -2418,6 +2588,10 @@ enum **ParticlesTransformAlign**: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY: @@ -2426,6 +2600,10 @@ enum **ParticlesTransformAlign**: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` **PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: @@ -2434,6 +2612,10 @@ enum **ParticlesTransformAlign**: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` **PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -2444,7 +2626,7 @@ enum **ParticlesTransformAlign**: .. rst-class:: classref-enumeration -enum **ParticlesDrawOrder**: +enum **ParticlesDrawOrder**: :ref:`🔗<enum_RenderingServer_ParticlesDrawOrder>` .. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_INDEX: @@ -2460,7 +2642,7 @@ Draw particles in the order that they appear in the particles array. :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>` **PARTICLES_DRAW_ORDER_LIFETIME** = ``1`` -Sort particles based on their lifetime. +Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front. .. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_REVERSE_LIFETIME: @@ -2468,7 +2650,7 @@ Sort particles based on their lifetime. :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>` **PARTICLES_DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front. .. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_VIEW_DEPTH: @@ -2486,7 +2668,7 @@ Sort particles based on their distance to the camera. .. rst-class:: classref-enumeration -enum **ParticlesCollisionType**: +enum **ParticlesCollisionType**: :ref:`🔗<enum_RenderingServer_ParticlesCollisionType>` .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT: @@ -2494,6 +2676,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_ATTRACT: @@ -2502,6 +2688,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_BOX_ATTRACT** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT: @@ -2510,6 +2700,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE: @@ -2518,6 +2712,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_BOX_COLLIDE: @@ -2526,6 +2724,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_BOX_COLLIDE** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_SDF_COLLIDE: @@ -2534,6 +2736,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_SDF_COLLIDE** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE: @@ -2542,6 +2748,10 @@ enum **ParticlesCollisionType**: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` **PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE** = ``6`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -2552,7 +2762,7 @@ enum **ParticlesCollisionType**: .. rst-class:: classref-enumeration -enum **ParticlesCollisionHeightfieldResolution**: +enum **ParticlesCollisionHeightfieldResolution**: :ref:`🔗<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256: @@ -2560,6 +2770,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512: @@ -2568,6 +2782,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024: @@ -2576,6 +2794,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048: @@ -2584,6 +2806,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096: @@ -2592,6 +2818,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192: @@ -2600,6 +2830,10 @@ enum **ParticlesCollisionHeightfieldResolution**: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` **PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_RenderingServer_constant_PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX: @@ -2618,7 +2852,7 @@ Represents the size of the :ref:`ParticlesCollisionHeightfieldResolution<enum_Re .. rst-class:: classref-enumeration -enum **FogVolumeShape**: +enum **FogVolumeShape**: :ref:`🔗<enum_RenderingServer_FogVolumeShape>` .. _class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID: @@ -2676,7 +2910,7 @@ Represents the size of the :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeSh .. rst-class:: classref-enumeration -enum **ViewportScaling3DMode**: +enum **ViewportScaling3DMode**: :ref:`🔗<enum_RenderingServer_ViewportScaling3DMode>` .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_BILINEAR: @@ -2694,11 +2928,19 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale<class_Viewport_property_scaling_3d_scale>`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` **VIEWPORT_SCALING_3D_MODE_FSR2** = ``2`` + +Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`Viewport.scaling_3d_scale<class_Viewport_property_scaling_3d_scale>`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR2. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` will use FSR2 at native resolution as a TAA solution. + .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` **VIEWPORT_SCALING_3D_MODE_MAX** = ``2`` +:ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` **VIEWPORT_SCALING_3D_MODE_MAX** = ``3`` Represents the size of the :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` enum. @@ -2710,7 +2952,7 @@ Represents the size of the :ref:`ViewportScaling3DMode<enum_RenderingServer_View .. rst-class:: classref-enumeration -enum **ViewportUpdateMode**: +enum **ViewportUpdateMode**: :ref:`🔗<enum_RenderingServer_ViewportUpdateMode>` .. _class_RenderingServer_constant_VIEWPORT_UPDATE_DISABLED: @@ -2760,7 +3002,7 @@ Always update the viewport's render target. .. rst-class:: classref-enumeration -enum **ViewportClearMode**: +enum **ViewportClearMode**: :ref:`🔗<enum_RenderingServer_ViewportClearMode>` .. _class_RenderingServer_constant_VIEWPORT_CLEAR_ALWAYS: @@ -2794,7 +3036,7 @@ Clear the viewport's render target on the next frame, then switch to :ref:`VIEWP .. rst-class:: classref-enumeration -enum **ViewportEnvironmentMode**: +enum **ViewportEnvironmentMode**: :ref:`🔗<enum_RenderingServer_ViewportEnvironmentMode>` .. _class_RenderingServer_constant_VIEWPORT_ENVIRONMENT_DISABLED: @@ -2836,7 +3078,7 @@ Represents the size of the :ref:`ViewportEnvironmentMode<enum_RenderingServer_Vi .. rst-class:: classref-enumeration -enum **ViewportSDFOversize**: +enum **ViewportSDFOversize**: :ref:`🔗<enum_RenderingServer_ViewportSDFOversize>` .. _class_RenderingServer_constant_VIEWPORT_SDF_OVERSIZE_100_PERCENT: @@ -2886,7 +3128,7 @@ Represents the size of the :ref:`ViewportSDFOversize<enum_RenderingServer_Viewpo .. rst-class:: classref-enumeration -enum **ViewportSDFScale**: +enum **ViewportSDFScale**: :ref:`🔗<enum_RenderingServer_ViewportSDFScale>` .. _class_RenderingServer_constant_VIEWPORT_SDF_SCALE_100_PERCENT: @@ -2928,7 +3170,7 @@ Represents the size of the :ref:`ViewportSDFScale<enum_RenderingServer_ViewportS .. rst-class:: classref-enumeration -enum **ViewportMSAA**: +enum **ViewportMSAA**: :ref:`🔗<enum_RenderingServer_ViewportMSAA>` .. _class_RenderingServer_constant_VIEWPORT_MSAA_DISABLED: @@ -2978,7 +3220,7 @@ Represents the size of the :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA> .. rst-class:: classref-enumeration -enum **ViewportScreenSpaceAA**: +enum **ViewportScreenSpaceAA**: :ref:`🔗<enum_RenderingServer_ViewportScreenSpaceAA>` .. _class_RenderingServer_constant_VIEWPORT_SCREEN_SPACE_AA_DISABLED: @@ -3012,7 +3254,7 @@ Represents the size of the :ref:`ViewportScreenSpaceAA<enum_RenderingServer_View .. rst-class:: classref-enumeration -enum **ViewportOcclusionCullingBuildQuality**: +enum **ViewportOcclusionCullingBuildQuality**: :ref:`🔗<enum_RenderingServer_ViewportOcclusionCullingBuildQuality>` .. _class_RenderingServer_constant_VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW: @@ -3046,7 +3288,7 @@ High occlusion culling BVH build quality (as defined by Embree). Results in the .. rst-class:: classref-enumeration -enum **ViewportRenderInfo**: +enum **ViewportRenderInfo**: :ref:`🔗<enum_RenderingServer_ViewportRenderInfo>` .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME: @@ -3088,7 +3330,7 @@ Represents the size of the :ref:`ViewportRenderInfo<enum_RenderingServer_Viewpor .. rst-class:: classref-enumeration -enum **ViewportRenderInfoType**: +enum **ViewportRenderInfoType**: :ref:`🔗<enum_RenderingServer_ViewportRenderInfoType>` .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_VISIBLE: @@ -3106,11 +3348,19 @@ Visible render pass (excluding shadows). Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. +.. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` **VIEWPORT_RENDER_INFO_TYPE_CANVAS** = ``2`` + +Canvas item rendering. This includes all 2D rendering. + .. _class_RenderingServer_constant_VIEWPORT_RENDER_INFO_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``2`` +:ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` **VIEWPORT_RENDER_INFO_TYPE_MAX** = ``3`` Represents the size of the :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` enum. @@ -3122,7 +3372,7 @@ Represents the size of the :ref:`ViewportRenderInfoType<enum_RenderingServer_Vie .. rst-class:: classref-enumeration -enum **ViewportDebugDraw**: +enum **ViewportDebugDraw**: :ref:`🔗<enum_RenderingServer_ViewportDebugDraw>` .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_DISABLED: @@ -3338,6 +3588,14 @@ Draws the occlusion culling buffer. This low-resolution occlusion culling buffer Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay. +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>` **VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER** = ``26`` + +Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects. + .. rst-class:: classref-item-separator ---- @@ -3346,7 +3604,7 @@ Draws the motion vectors buffer. This is used by temporal antialiasing to correc .. rst-class:: classref-enumeration -enum **ViewportVRSMode**: +enum **ViewportVRSMode**: :ref:`🔗<enum_RenderingServer_ViewportVRSMode>` .. _class_RenderingServer_constant_VIEWPORT_VRS_DISABLED: @@ -3370,7 +3628,7 @@ Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVRSMode>` **VIEWPORT_VRS_XR** = ``2`` -Variable rate shading texture is supplied by the primary :ref:`XRInterface<class_XRInterface>`. +Variable rate shading texture is supplied by the primary :ref:`XRInterface<class_XRInterface>`. Note that this may override the update mode. .. _class_RenderingServer_constant_VIEWPORT_VRS_MAX: @@ -3384,11 +3642,53 @@ Represents the size of the :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVR ---- +.. _enum_RenderingServer_ViewportVRSUpdateMode: + +.. rst-class:: classref-enumeration + +enum **ViewportVRSUpdateMode**: :ref:`🔗<enum_RenderingServer_ViewportVRSUpdateMode>` + +.. _class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>` **VIEWPORT_VRS_UPDATE_DISABLED** = ``0`` + +The input texture for variable rate shading will not be processed. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_ONCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>` **VIEWPORT_VRS_UPDATE_ONCE** = ``1`` + +The input texture for variable rate shading will be processed once. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>` **VIEWPORT_VRS_UPDATE_ALWAYS** = ``2`` + +The input texture for variable rate shading will be processed each frame. + +.. _class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>` **VIEWPORT_VRS_UPDATE_MAX** = ``3`` + +Represents the size of the :ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>` enum. + +.. rst-class:: classref-item-separator + +---- + .. _enum_RenderingServer_SkyMode: .. rst-class:: classref-enumeration -enum **SkyMode**: +enum **SkyMode**: :ref:`🔗<enum_RenderingServer_SkyMode>` .. _class_RenderingServer_constant_SKY_MODE_AUTOMATIC: @@ -3424,6 +3724,118 @@ Uses the fast filtering algorithm to process the radiance map. In general this r \ **Note:** The fast filtering algorithm is limited to 256×256 cubemaps, so :ref:`sky_set_radiance_size<class_RenderingServer_method_sky_set_radiance_size>` must be set to ``256``. Otherwise, a warning is printed and the overridden radiance size is ignored. +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingServer_CompositorEffectFlags: + +.. rst-class:: classref-enumeration + +enum **CompositorEffectFlags**: :ref:`🔗<enum_RenderingServer_CompositorEffectFlags>` + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>` **COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR** = ``1`` + +The rendering effect requires the color buffer to be resolved if MSAA is enabled. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>` **COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH** = ``2`` + +The rendering effect requires the depth buffer to be resolved if MSAA is enabled. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>` **COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS** = ``4`` + +The rendering effect requires motion vectors to be produced. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>` **COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS** = ``8`` + +The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only). + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>` **COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR** = ``16`` + +The rendering effect requires specular data to be separated out (Forward+ only). + +.. rst-class:: classref-item-separator + +---- + +.. _enum_RenderingServer_CompositorEffectCallbackType: + +.. rst-class:: classref-enumeration + +enum **CompositorEffectCallbackType**: :ref:`🔗<enum_RenderingServer_CompositorEffectCallbackType>` + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE** = ``0`` + +The callback is called before our opaque rendering pass, but after depth prepass (if applicable). + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE** = ``1`` + +The callback is called after our opaque rendering pass, but before our sky is rendered. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY** = ``2`` + +The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT** = ``3`` + +The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT** = ``4`` + +The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. + +.. _class_RenderingServer_constant_COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>` **COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY** = ``-1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + .. rst-class:: classref-item-separator ---- @@ -3432,7 +3844,7 @@ Uses the fast filtering algorithm to process the radiance map. In general this r .. rst-class:: classref-enumeration -enum **EnvironmentBG**: +enum **EnvironmentBG**: :ref:`🔗<enum_RenderingServer_EnvironmentBG>` .. _class_RenderingServer_constant_ENV_BG_CLEAR_COLOR: @@ -3498,7 +3910,7 @@ Represents the size of the :ref:`EnvironmentBG<enum_RenderingServer_EnvironmentB .. rst-class:: classref-enumeration -enum **EnvironmentAmbientSource**: +enum **EnvironmentAmbientSource**: :ref:`🔗<enum_RenderingServer_EnvironmentAmbientSource>` .. _class_RenderingServer_constant_ENV_AMBIENT_SOURCE_BG: @@ -3540,7 +3952,7 @@ Gather ambient light from the :ref:`Sky<class_Sky>` regardless of what the backg .. rst-class:: classref-enumeration -enum **EnvironmentReflectionSource**: +enum **EnvironmentReflectionSource**: :ref:`🔗<enum_RenderingServer_EnvironmentReflectionSource>` .. _class_RenderingServer_constant_ENV_REFLECTION_SOURCE_BG: @@ -3574,7 +3986,7 @@ Use the :ref:`Sky<class_Sky>` for reflections regardless of what the background .. rst-class:: classref-enumeration -enum **EnvironmentGlowBlendMode**: +enum **EnvironmentGlowBlendMode**: :ref:`🔗<enum_RenderingServer_EnvironmentGlowBlendMode>` .. _class_RenderingServer_constant_ENV_GLOW_BLEND_MODE_ADDITIVE: @@ -3620,11 +4032,37 @@ Mixes the glow with the underlying color to avoid increasing brightness as much ---- +.. _enum_RenderingServer_EnvironmentFogMode: + +.. rst-class:: classref-enumeration + +enum **EnvironmentFogMode**: :ref:`🔗<enum_RenderingServer_EnvironmentFogMode>` + +.. _class_RenderingServer_constant_ENV_FOG_MODE_EXPONENTIAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentFogMode<enum_RenderingServer_EnvironmentFogMode>` **ENV_FOG_MODE_EXPONENTIAL** = ``0`` + +Use a physically-based fog model defined primarily by fog density. + +.. _class_RenderingServer_constant_ENV_FOG_MODE_DEPTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`EnvironmentFogMode<enum_RenderingServer_EnvironmentFogMode>` **ENV_FOG_MODE_DEPTH** = ``1`` + +Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. + +.. rst-class:: classref-item-separator + +---- + .. _enum_RenderingServer_EnvironmentToneMapper: .. rst-class:: classref-enumeration -enum **EnvironmentToneMapper**: +enum **EnvironmentToneMapper**: :ref:`🔗<enum_RenderingServer_EnvironmentToneMapper>` .. _class_RenderingServer_constant_ENV_TONE_MAPPER_LINEAR: @@ -3668,7 +4106,7 @@ Use the Academy Color Encoding System tonemapper. ACES is slightly more expensiv .. rst-class:: classref-enumeration -enum **EnvironmentSSRRoughnessQuality**: +enum **EnvironmentSSRRoughnessQuality**: :ref:`🔗<enum_RenderingServer_EnvironmentSSRRoughnessQuality>` .. _class_RenderingServer_constant_ENV_SSR_ROUGHNESS_QUALITY_DISABLED: @@ -3710,7 +4148,7 @@ High quality of roughness filter for screen-space reflections. This is the slowe .. rst-class:: classref-enumeration -enum **EnvironmentSSAOQuality**: +enum **EnvironmentSSAOQuality**: :ref:`🔗<enum_RenderingServer_EnvironmentSSAOQuality>` .. _class_RenderingServer_constant_ENV_SSAO_QUALITY_VERY_LOW: @@ -3760,7 +4198,7 @@ Highest quality screen-space ambient occlusion. Uses the adaptive target setting .. rst-class:: classref-enumeration -enum **EnvironmentSSILQuality**: +enum **EnvironmentSSILQuality**: :ref:`🔗<enum_RenderingServer_EnvironmentSSILQuality>` .. _class_RenderingServer_constant_ENV_SSIL_QUALITY_VERY_LOW: @@ -3810,7 +4248,7 @@ Highest quality screen-space indirect lighting. Uses the adaptive target setting .. rst-class:: classref-enumeration -enum **EnvironmentSDFGIYScale**: +enum **EnvironmentSDFGIYScale**: :ref:`🔗<enum_RenderingServer_EnvironmentSDFGIYScale>` .. _class_RenderingServer_constant_ENV_SDFGI_Y_SCALE_50_PERCENT: @@ -3844,7 +4282,7 @@ Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall a .. rst-class:: classref-enumeration -enum **EnvironmentSDFGIRayCount**: +enum **EnvironmentSDFGIRayCount**: :ref:`🔗<enum_RenderingServer_EnvironmentSDFGIRayCount>` .. _class_RenderingServer_constant_ENV_SDFGI_RAY_COUNT_4: @@ -3918,7 +4356,7 @@ Represents the size of the :ref:`EnvironmentSDFGIRayCount<enum_RenderingServer_E .. rst-class:: classref-enumeration -enum **EnvironmentSDFGIFramesToConverge**: +enum **EnvironmentSDFGIFramesToConverge**: :ref:`🔗<enum_RenderingServer_EnvironmentSDFGIFramesToConverge>` .. _class_RenderingServer_constant_ENV_SDFGI_CONVERGE_IN_5_FRAMES: @@ -3984,7 +4422,7 @@ Represents the size of the :ref:`EnvironmentSDFGIFramesToConverge<enum_Rendering .. rst-class:: classref-enumeration -enum **EnvironmentSDFGIFramesToUpdateLight**: +enum **EnvironmentSDFGIFramesToUpdateLight**: :ref:`🔗<enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight>` .. _class_RenderingServer_constant_ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME: @@ -4042,7 +4480,7 @@ Represents the size of the :ref:`EnvironmentSDFGIFramesToUpdateLight<enum_Render .. rst-class:: classref-enumeration -enum **SubSurfaceScatteringQuality**: +enum **SubSurfaceScatteringQuality**: :ref:`🔗<enum_RenderingServer_SubSurfaceScatteringQuality>` .. _class_RenderingServer_constant_SUB_SURFACE_SCATTERING_QUALITY_DISABLED: @@ -4084,7 +4522,7 @@ High subsurface scattering quality. This has the highest GPU requirements. .. rst-class:: classref-enumeration -enum **DOFBokehShape**: +enum **DOFBokehShape**: :ref:`🔗<enum_RenderingServer_DOFBokehShape>` .. _class_RenderingServer_constant_DOF_BOKEH_BOX: @@ -4118,7 +4556,7 @@ Calculates DOF blur using a circle shaped filter. Best quality and most realisti .. rst-class:: classref-enumeration -enum **DOFBlurQuality**: +enum **DOFBlurQuality**: :ref:`🔗<enum_RenderingServer_DOFBlurQuality>` .. _class_RenderingServer_constant_DOF_BLUR_QUALITY_VERY_LOW: @@ -4160,7 +4598,7 @@ Highest quality DOF blur. Results in the smoothest looking blur by taking the mo .. rst-class:: classref-enumeration -enum **InstanceType**: +enum **InstanceType**: :ref:`🔗<enum_RenderingServer_InstanceType>` .. _class_RenderingServer_constant_INSTANCE_NONE: @@ -4290,7 +4728,7 @@ A combination of the flags of geometry instances (mesh, multimesh, immediate and .. rst-class:: classref-enumeration -enum **InstanceFlags**: +enum **InstanceFlags**: :ref:`🔗<enum_RenderingServer_InstanceFlags>` .. _class_RenderingServer_constant_INSTANCE_FLAG_USE_BAKED_LIGHT: @@ -4340,7 +4778,7 @@ Represents the size of the :ref:`InstanceFlags<enum_RenderingServer_InstanceFlag .. rst-class:: classref-enumeration -enum **ShadowCastingSetting**: +enum **ShadowCastingSetting**: :ref:`🔗<enum_RenderingServer_ShadowCastingSetting>` .. _class_RenderingServer_constant_SHADOW_CASTING_SETTING_OFF: @@ -4382,7 +4820,7 @@ Only render the shadows from the object. The object itself will not be drawn. .. rst-class:: classref-enumeration -enum **VisibilityRangeFadeMode**: +enum **VisibilityRangeFadeMode**: :ref:`🔗<enum_RenderingServer_VisibilityRangeFadeMode>` .. _class_RenderingServer_constant_VISIBILITY_RANGE_FADE_DISABLED: @@ -4416,7 +4854,7 @@ Fade-in the given instance's dependencies when reaching its visibility range lim .. rst-class:: classref-enumeration -enum **BakeChannels**: +enum **BakeChannels**: :ref:`🔗<enum_RenderingServer_BakeChannels>` .. _class_RenderingServer_constant_BAKE_CHANNEL_ALBEDO_ALPHA: @@ -4458,7 +4896,7 @@ Index of :ref:`Image<class_Image>` in array of :ref:`Image<class_Image>`\ s retu .. rst-class:: classref-enumeration -enum **CanvasTextureChannel**: +enum **CanvasTextureChannel**: :ref:`🔗<enum_RenderingServer_CanvasTextureChannel>` .. _class_RenderingServer_constant_CANVAS_TEXTURE_CHANNEL_DIFFUSE: @@ -4492,7 +4930,7 @@ Specular map canvas texture (:ref:`CanvasTexture.specular_texture<class_CanvasTe .. rst-class:: classref-enumeration -enum **NinePatchAxisMode**: +enum **NinePatchAxisMode**: :ref:`🔗<enum_RenderingServer_NinePatchAxisMode>` .. _class_RenderingServer_constant_NINE_PATCH_STRETCH: @@ -4526,7 +4964,7 @@ The nine patch gets filled with tiles where needed and stretches them a bit if n .. rst-class:: classref-enumeration -enum **CanvasItemTextureFilter**: +enum **CanvasItemTextureFilter**: :ref:`🔗<enum_RenderingServer_CanvasItemTextureFilter>` .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_DEFAULT: @@ -4542,7 +4980,7 @@ Uses the default filter mode for this :ref:`Viewport<class_Viewport>`. :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -4550,7 +4988,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -4558,7 +4996,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -4566,7 +5006,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC: @@ -4574,7 +5016,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS<class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS>` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: @@ -4582,7 +5026,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` **CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. + +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS<class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS>` is usually more appropriate in this case. .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_FILTER_MAX: @@ -4600,7 +5046,7 @@ Max value for :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextu .. rst-class:: classref-enumeration -enum **CanvasItemTextureRepeat**: +enum **CanvasItemTextureRepeat**: :ref:`🔗<enum_RenderingServer_CanvasItemTextureRepeat>` .. _class_RenderingServer_constant_CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT: @@ -4650,7 +5096,7 @@ Max value for :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextu .. rst-class:: classref-enumeration -enum **CanvasGroupMode**: +enum **CanvasGroupMode**: :ref:`🔗<enum_RenderingServer_CanvasGroupMode>` .. _class_RenderingServer_constant_CANVAS_GROUP_MODE_DISABLED: @@ -4682,6 +5128,10 @@ Parent is used for clipping child, but parent is also drawn underneath child as :ref:`CanvasGroupMode<enum_RenderingServer_CanvasGroupMode>` **CANVAS_GROUP_MODE_TRANSPARENT** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -4692,7 +5142,7 @@ Parent is used for clipping child, but parent is also drawn underneath child as .. rst-class:: classref-enumeration -enum **CanvasLightMode**: +enum **CanvasLightMode**: :ref:`🔗<enum_RenderingServer_CanvasLightMode>` .. _class_RenderingServer_constant_CANVAS_LIGHT_MODE_POINT: @@ -4718,7 +5168,7 @@ enum **CanvasLightMode**: .. rst-class:: classref-enumeration -enum **CanvasLightBlendMode**: +enum **CanvasLightBlendMode**: :ref:`🔗<enum_RenderingServer_CanvasLightBlendMode>` .. _class_RenderingServer_constant_CANVAS_LIGHT_BLEND_MODE_ADD: @@ -4752,7 +5202,7 @@ The light adds color depending on transparency. .. rst-class:: classref-enumeration -enum **CanvasLightShadowFilter**: +enum **CanvasLightShadowFilter**: :ref:`🔗<enum_RenderingServer_CanvasLightShadowFilter>` .. _class_RenderingServer_constant_CANVAS_LIGHT_FILTER_NONE: @@ -4794,7 +5244,7 @@ Max value of the :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightS .. rst-class:: classref-enumeration -enum **CanvasOccluderPolygonCullMode**: +enum **CanvasOccluderPolygonCullMode**: :ref:`🔗<enum_RenderingServer_CanvasOccluderPolygonCullMode>` .. _class_RenderingServer_constant_CANVAS_OCCLUDER_POLYGON_CULL_DISABLED: @@ -4828,7 +5278,7 @@ Culling of the canvas occluder is counterclockwise. .. rst-class:: classref-enumeration -enum **GlobalShaderParameterType**: +enum **GlobalShaderParameterType**: :ref:`🔗<enum_RenderingServer_GlobalShaderParameterType>` .. _class_RenderingServer_constant_GLOBAL_VAR_TYPE_BOOL: @@ -5070,7 +5520,7 @@ Represents the size of the :ref:`GlobalShaderParameterType<enum_RenderingServer_ .. rst-class:: classref-enumeration -enum **RenderingInfo**: +enum **RenderingInfo**: :ref:`🔗<enum_RenderingServer_RenderingInfo>` .. _class_RenderingServer_constant_RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME: @@ -5128,7 +5578,7 @@ Video memory used (in bytes). When using the Forward+ or mobile rendering backen .. rst-class:: classref-enumeration -enum **Features**: +enum **Features**: :ref:`🔗<enum_RenderingServer_Features>` .. _class_RenderingServer_constant_FEATURE_SHADERS: @@ -5136,7 +5586,9 @@ enum **Features**: :ref:`Features<enum_RenderingServer_Features>` **FEATURE_SHADERS** = ``0`` -Hardware supports shaders. This enum is currently unused in Godot 3.x. +**Deprecated:** This constant has not been used since Godot 3.0. + + .. _class_RenderingServer_constant_FEATURE_MULTITHREADED: @@ -5144,7 +5596,9 @@ Hardware supports shaders. This enum is currently unused in Godot 3.x. :ref:`Features<enum_RenderingServer_Features>` **FEATURE_MULTITHREADED** = ``1`` -Hardware supports multithreading. This enum is currently unused in Godot 3.x. +**Deprecated:** This constant has not been used since Godot 3.0. + + .. rst-class:: classref-section-separator @@ -5159,7 +5613,7 @@ Constants .. rst-class:: classref-constant -**NO_INDEX_ARRAY** = ``-1`` +**NO_INDEX_ARRAY** = ``-1`` :ref:`🔗<class_RenderingServer_constant_NO_INDEX_ARRAY>` Marks an error that shows that the index array is empty. @@ -5167,7 +5621,7 @@ Marks an error that shows that the index array is empty. .. rst-class:: classref-constant -**ARRAY_WEIGHTS_SIZE** = ``4`` +**ARRAY_WEIGHTS_SIZE** = ``4`` :ref:`🔗<class_RenderingServer_constant_ARRAY_WEIGHTS_SIZE>` Number of weights/bones per vertex. @@ -5175,7 +5629,7 @@ Number of weights/bones per vertex. .. rst-class:: classref-constant -**CANVAS_ITEM_Z_MIN** = ``-4096`` +**CANVAS_ITEM_Z_MIN** = ``-4096`` :ref:`🔗<class_RenderingServer_constant_CANVAS_ITEM_Z_MIN>` The minimum Z-layer for canvas items. @@ -5183,7 +5637,7 @@ The minimum Z-layer for canvas items. .. rst-class:: classref-constant -**CANVAS_ITEM_Z_MAX** = ``4096`` +**CANVAS_ITEM_Z_MAX** = ``4096`` :ref:`🔗<class_RenderingServer_constant_CANVAS_ITEM_Z_MAX>` The maximum Z-layer for canvas items. @@ -5191,7 +5645,7 @@ The maximum Z-layer for canvas items. .. rst-class:: classref-constant -**MAX_GLOW_LEVELS** = ``7`` +**MAX_GLOW_LEVELS** = ``7`` :ref:`🔗<class_RenderingServer_constant_MAX_GLOW_LEVELS>` The maximum number of glow levels that can be used with the glow post-processing effect. @@ -5199,23 +5653,33 @@ The maximum number of glow levels that can be used with the glow post-processing .. rst-class:: classref-constant -**MAX_CURSORS** = ``8`` +**MAX_CURSORS** = ``8`` :ref:`🔗<class_RenderingServer_constant_MAX_CURSORS>` + +**Deprecated:** This constant is not used by the engine. + -*Deprecated.* This constant is unused internally. .. _class_RenderingServer_constant_MAX_2D_DIRECTIONAL_LIGHTS: .. rst-class:: classref-constant -**MAX_2D_DIRECTIONAL_LIGHTS** = ``8`` +**MAX_2D_DIRECTIONAL_LIGHTS** = ``8`` :ref:`🔗<class_RenderingServer_constant_MAX_2D_DIRECTIONAL_LIGHTS>` The maximum number of directional lights that can be rendered at a given time in 2D. +.. _class_RenderingServer_constant_MAX_MESH_SURFACES: + +.. rst-class:: classref-constant + +**MAX_MESH_SURFACES** = ``256`` :ref:`🔗<class_RenderingServer_constant_MAX_MESH_SURFACES>` + +The maximum number of surfaces a mesh can have. + .. _class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MIN: .. rst-class:: classref-constant -**MATERIAL_RENDER_PRIORITY_MIN** = ``-128`` +**MATERIAL_RENDER_PRIORITY_MIN** = ``-128`` :ref:`🔗<class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MIN>` The minimum renderpriority of all materials. @@ -5223,7 +5687,7 @@ The minimum renderpriority of all materials. .. rst-class:: classref-constant -**MATERIAL_RENDER_PRIORITY_MAX** = ``127`` +**MATERIAL_RENDER_PRIORITY_MAX** = ``127`` :ref:`🔗<class_RenderingServer_constant_MATERIAL_RENDER_PRIORITY_MAX>` The maximum renderpriority of all materials. @@ -5231,7 +5695,7 @@ The maximum renderpriority of all materials. .. rst-class:: classref-constant -**ARRAY_CUSTOM_COUNT** = ``4`` +**ARRAY_CUSTOM_COUNT** = ``4`` :ref:`🔗<class_RenderingServer_constant_ARRAY_CUSTOM_COUNT>` The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingServer_constant_ARRAY_CUSTOM0>`, :ref:`ARRAY_CUSTOM1<class_RenderingServer_constant_ARRAY_CUSTOM1>`, :ref:`ARRAY_CUSTOM2<class_RenderingServer_constant_ARRAY_CUSTOM2>`, :ref:`ARRAY_CUSTOM3<class_RenderingServer_constant_ARRAY_CUSTOM3>`). @@ -5239,7 +5703,11 @@ The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingS .. rst-class:: classref-constant -**PARTICLES_EMIT_FLAG_POSITION** = ``1`` +**PARTICLES_EMIT_FLAG_POSITION** = ``1`` :ref:`🔗<class_RenderingServer_constant_PARTICLES_EMIT_FLAG_POSITION>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -5247,7 +5715,11 @@ The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingS .. rst-class:: classref-constant -**PARTICLES_EMIT_FLAG_ROTATION_SCALE** = ``2`` +**PARTICLES_EMIT_FLAG_ROTATION_SCALE** = ``2`` :ref:`🔗<class_RenderingServer_constant_PARTICLES_EMIT_FLAG_ROTATION_SCALE>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -5255,7 +5727,11 @@ The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingS .. rst-class:: classref-constant -**PARTICLES_EMIT_FLAG_VELOCITY** = ``4`` +**PARTICLES_EMIT_FLAG_VELOCITY** = ``4`` :ref:`🔗<class_RenderingServer_constant_PARTICLES_EMIT_FLAG_VELOCITY>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -5263,7 +5739,11 @@ The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingS .. rst-class:: classref-constant -**PARTICLES_EMIT_FLAG_COLOR** = ``8`` +**PARTICLES_EMIT_FLAG_COLOR** = ``8`` :ref:`🔗<class_RenderingServer_constant_PARTICLES_EMIT_FLAG_COLOR>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -5271,7 +5751,11 @@ The number of custom data arrays available (:ref:`ARRAY_CUSTOM0<class_RenderingS .. rst-class:: classref-constant -**PARTICLES_EMIT_FLAG_CUSTOM** = ``16`` +**PARTICLES_EMIT_FLAG_CUSTOM** = ``16`` :ref:`🔗<class_RenderingServer_constant_PARTICLES_EMIT_FLAG_CUSTOM>` + +.. container:: contribute + + There is currently no description for this constant. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! @@ -5288,12 +5772,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **render_loop_enabled** +:ref:`bool<class_bool>` **render_loop_enabled** :ref:`🔗<class_RenderingServer_property_render_loop_enabled>` .. rst-class:: classref-property-setget -- void **set_render_loop_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_render_loop_enabled** **(** **)** +- |void| **set_render_loop_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_render_loop_enabled**\ (\ ) If ``false``, disables rendering completely, but the engine logic is still being processed. You can call :ref:`force_draw<class_RenderingServer_method_force_draw>` to draw a frame even with rendering disabled. @@ -5310,7 +5794,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **bake_render_uv2** **(** :ref:`RID<class_RID>` base, :ref:`RID[]<class_RID>` material_overrides, :ref:`Vector2i<class_Vector2i>` image_size **)** +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **bake_render_uv2**\ (\ base\: :ref:`RID<class_RID>`, material_overrides\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], image_size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_RenderingServer_method_bake_render_uv2>` Bakes the material data of the Mesh passed in the ``base`` parameter with optional ``material_overrides`` to a set of :ref:`Image<class_Image>`\ s of size ``image_size``. Returns an array of :ref:`Image<class_Image>`\ s containing material properties as specified in :ref:`BakeChannels<enum_RenderingServer_BakeChannels>`. @@ -5318,11 +5802,23 @@ Bakes the material data of the Mesh passed in the ``base`` parameter with option ---- +.. _class_RenderingServer_method_call_on_render_thread: + +.. rst-class:: classref-method + +|void| **call_on_render_thread**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_RenderingServer_method_call_on_render_thread>` + +As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as :ref:`RenderingDevice<class_RenderingDevice>` and similar RD classes), push a callable via this function so it will be executed on the render thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_camera_attributes_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **camera_attributes_create** **(** **)** +:ref:`RID<class_RID>` **camera_attributes_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_create>` Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``camera_attributes_`` RenderingServer functions. @@ -5338,7 +5834,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **camera_attributes_set_auto_exposure** **(** :ref:`RID<class_RID>` camera_attributes, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` min_sensitivity, :ref:`float<class_float>` max_sensitivity, :ref:`float<class_float>` speed, :ref:`float<class_float>` scale **)** +|void| **camera_attributes_set_auto_exposure**\ (\ camera_attributes\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, min_sensitivity\: :ref:`float<class_float>`, max_sensitivity\: :ref:`float<class_float>`, speed\: :ref:`float<class_float>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_set_auto_exposure>` Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in :ref:`CameraAttributes<class_CameraAttributes>` and :ref:`CameraAttributesPractical<class_CameraAttributesPractical>`. @@ -5350,7 +5846,7 @@ Sets the parameters to use with the auto-exposure effect. These parameters take .. rst-class:: classref-method -void **camera_attributes_set_dof_blur** **(** :ref:`RID<class_RID>` camera_attributes, :ref:`bool<class_bool>` far_enable, :ref:`float<class_float>` far_distance, :ref:`float<class_float>` far_transition, :ref:`bool<class_bool>` near_enable, :ref:`float<class_float>` near_distance, :ref:`float<class_float>` near_transition, :ref:`float<class_float>` amount **)** +|void| **camera_attributes_set_dof_blur**\ (\ camera_attributes\: :ref:`RID<class_RID>`, far_enable\: :ref:`bool<class_bool>`, far_distance\: :ref:`float<class_float>`, far_transition\: :ref:`float<class_float>`, near_enable\: :ref:`bool<class_bool>`, near_distance\: :ref:`float<class_float>`, near_transition\: :ref:`float<class_float>`, amount\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_set_dof_blur>` Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in :ref:`CameraAttributesPractical<class_CameraAttributesPractical>`. @@ -5362,7 +5858,7 @@ Sets the parameters to use with the DOF blur effect. These parameters take on th .. rst-class:: classref-method -void **camera_attributes_set_dof_blur_bokeh_shape** **(** :ref:`DOFBokehShape<enum_RenderingServer_DOFBokehShape>` shape **)** +|void| **camera_attributes_set_dof_blur_bokeh_shape**\ (\ shape\: :ref:`DOFBokehShape<enum_RenderingServer_DOFBokehShape>`\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_set_dof_blur_bokeh_shape>` Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve artistic effect, or to meet performance targets. For more detail on available options see :ref:`DOFBokehShape<enum_RenderingServer_DOFBokehShape>`. @@ -5374,7 +5870,7 @@ Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve .. rst-class:: classref-method -void **camera_attributes_set_dof_blur_quality** **(** :ref:`DOFBlurQuality<enum_RenderingServer_DOFBlurQuality>` quality, :ref:`bool<class_bool>` use_jitter **)** +|void| **camera_attributes_set_dof_blur_quality**\ (\ quality\: :ref:`DOFBlurQuality<enum_RenderingServer_DOFBlurQuality>`, use_jitter\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_set_dof_blur_quality>` Sets the quality level of the DOF blur effect to one of the options in :ref:`DOFBlurQuality<enum_RenderingServer_DOFBlurQuality>`. ``use_jitter`` can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy. @@ -5386,7 +5882,7 @@ Sets the quality level of the DOF blur effect to one of the options in :ref:`DOF .. rst-class:: classref-method -void **camera_attributes_set_exposure** **(** :ref:`RID<class_RID>` camera_attributes, :ref:`float<class_float>` multiplier, :ref:`float<class_float>` normalization **)** +|void| **camera_attributes_set_exposure**\ (\ camera_attributes\: :ref:`RID<class_RID>`, multiplier\: :ref:`float<class_float>`, normalization\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_attributes_set_exposure>` Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. @@ -5394,15 +5890,15 @@ The normalization factor can be calculated from exposure value (EV100) as follow :: - func get_exposure_normalization(float ev100): - return 1.0 / (pow(2.0, ev100) * 1.2) + func get_exposure_normalization(ev100: float): + return 1.0 / (pow(2.0, ev100) * 1.2) The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: :: - func get_exposure(float aperture, float shutter_speed, float sensitivity): - return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity)) + func get_exposure(aperture: float, shutter_speed: float, sensitivity: float): + return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2) .. rst-class:: classref-item-separator @@ -5412,7 +5908,7 @@ The exposure value can be calculated from aperture (in f-stops), shutter speed ( .. rst-class:: classref-method -:ref:`RID<class_RID>` **camera_create** **(** **)** +:ref:`RID<class_RID>` **camera_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_camera_create>` Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``camera_*`` RenderingServer functions. @@ -5428,7 +5924,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **camera_set_camera_attributes** **(** :ref:`RID<class_RID>` camera, :ref:`RID<class_RID>` effects **)** +|void| **camera_set_camera_attributes**\ (\ camera\: :ref:`RID<class_RID>`, effects\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_camera_attributes>` Sets the camera_attributes created with :ref:`camera_attributes_create<class_RenderingServer_method_camera_attributes_create>` to the given camera. @@ -5436,11 +5932,23 @@ Sets the camera_attributes created with :ref:`camera_attributes_create<class_Ren ---- +.. _class_RenderingServer_method_camera_set_compositor: + +.. rst-class:: classref-method + +|void| **camera_set_compositor**\ (\ camera\: :ref:`RID<class_RID>`, compositor\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_compositor>` + +Sets the compositor used by this camera. Equivalent to :ref:`Camera3D.compositor<class_Camera3D_property_compositor>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_camera_set_cull_mask: .. rst-class:: classref-method -void **camera_set_cull_mask** **(** :ref:`RID<class_RID>` camera, :ref:`int<class_int>` layers **)** +|void| **camera_set_cull_mask**\ (\ camera\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_cull_mask>` Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to :ref:`Camera3D.cull_mask<class_Camera3D_property_cull_mask>`. @@ -5452,7 +5960,7 @@ Sets the cull mask associated with this camera. The cull mask describes which 3D .. rst-class:: classref-method -void **camera_set_environment** **(** :ref:`RID<class_RID>` camera, :ref:`RID<class_RID>` env **)** +|void| **camera_set_environment**\ (\ camera\: :ref:`RID<class_RID>`, env\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_environment>` Sets the environment used by this camera. Equivalent to :ref:`Camera3D.environment<class_Camera3D_property_environment>`. @@ -5464,7 +5972,7 @@ Sets the environment used by this camera. Equivalent to :ref:`Camera3D.environme .. rst-class:: classref-method -void **camera_set_frustum** **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` size, :ref:`Vector2<class_Vector2>` offset, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** +|void| **camera_set_frustum**\ (\ camera\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`, offset\: :ref:`Vector2<class_Vector2>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_frustum>` Sets camera to use frustum projection. This mode allows adjusting the ``offset`` argument to create "tilted frustum" effects. @@ -5476,7 +5984,7 @@ Sets camera to use frustum projection. This mode allows adjusting the ``offset`` .. rst-class:: classref-method -void **camera_set_orthogonal** **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` size, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** +|void| **camera_set_orthogonal**\ (\ camera\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_orthogonal>` Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. @@ -5488,7 +5996,7 @@ Sets camera to use orthogonal projection, also known as orthographic projection. .. rst-class:: classref-method -void **camera_set_perspective** **(** :ref:`RID<class_RID>` camera, :ref:`float<class_float>` fovy_degrees, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** +|void| **camera_set_perspective**\ (\ camera\: :ref:`RID<class_RID>`, fovy_degrees\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_perspective>` Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. @@ -5500,7 +6008,7 @@ Sets camera to use perspective projection. Objects on the screen becomes smaller .. rst-class:: classref-method -void **camera_set_transform** **(** :ref:`RID<class_RID>` camera, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **camera_set_transform**\ (\ camera\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_transform>` Sets :ref:`Transform3D<class_Transform3D>` of camera. @@ -5512,7 +6020,7 @@ Sets :ref:`Transform3D<class_Transform3D>` of camera. .. rst-class:: classref-method -void **camera_set_use_vertical_aspect** **(** :ref:`RID<class_RID>` camera, :ref:`bool<class_bool>` enable **)** +|void| **camera_set_use_vertical_aspect**\ (\ camera\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_camera_set_use_vertical_aspect>` If ``true``, preserves the horizontal aspect ratio which is equivalent to :ref:`Camera3D.KEEP_WIDTH<class_Camera3D_constant_KEEP_WIDTH>`. If ``false``, preserves the vertical aspect ratio which is equivalent to :ref:`Camera3D.KEEP_HEIGHT<class_Camera3D_constant_KEEP_HEIGHT>`. @@ -5524,7 +6032,7 @@ If ``true``, preserves the horizontal aspect ratio which is equivalent to :ref:` .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_create** **(** **)** +:ref:`RID<class_RID>` **canvas_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_create>` Creates a canvas and returns the assigned :ref:`RID<class_RID>`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_*`` RenderingServer functions. @@ -5540,7 +6048,7 @@ Canvas has no :ref:`Resource<class_Resource>` or :ref:`Node<class_Node>` equival .. rst-class:: classref-method -void **canvas_item_add_animation_slice** **(** :ref:`RID<class_RID>` item, :ref:`float<class_float>` animation_length, :ref:`float<class_float>` slice_begin, :ref:`float<class_float>` slice_end, :ref:`float<class_float>` offset=0.0 **)** +|void| **canvas_item_add_animation_slice**\ (\ item\: :ref:`RID<class_RID>`, animation_length\: :ref:`float<class_float>`, slice_begin\: :ref:`float<class_float>`, slice_end\: :ref:`float<class_float>`, offset\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_animation_slice>` Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. @@ -5552,7 +6060,7 @@ Subsequent drawing commands will be ignored unless they fall within the specifie .. rst-class:: classref-method -void **canvas_item_add_circle** **(** :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` radius, :ref:`Color<class_Color>` color **)** +|void| **canvas_item_add_circle**\ (\ item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, radius\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`, antialiased\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_circle>` Draws a circle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_circle<class_CanvasItem_method_draw_circle>`. @@ -5564,7 +6072,7 @@ Draws a circle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``it .. rst-class:: classref-method -void **canvas_item_add_clip_ignore** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` ignore **)** +|void| **canvas_item_add_clip_ignore**\ (\ item\: :ref:`RID<class_RID>`, ignore\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_clip_ignore>` If ``ignore`` is ``true``, ignore clipping on items drawn with this canvas item until this is called again with ``ignore`` set to false. @@ -5576,7 +6084,7 @@ If ``ignore`` is ``true``, ignore clipping on items drawn with this canvas item .. rst-class:: classref-method -void **canvas_item_add_lcd_texture_rect_region** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate **)** +|void| **canvas_item_add_lcd_texture_rect_region**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_lcd_texture_rect_region>` See also :ref:`CanvasItem.draw_lcd_texture_rect_region<class_CanvasItem_method_draw_lcd_texture_rect_region>`. @@ -5588,7 +6096,7 @@ See also :ref:`CanvasItem.draw_lcd_texture_rect_region<class_CanvasItem_method_d .. rst-class:: classref-method -void **canvas_item_add_line** **(** :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` from, :ref:`Vector2<class_Vector2>` to, :ref:`Color<class_Color>` color, :ref:`float<class_float>` width=-1.0, :ref:`bool<class_bool>` antialiased=false **)** +|void| **canvas_item_add_line**\ (\ item\: :ref:`RID<class_RID>`, from\: :ref:`Vector2<class_Vector2>`, to\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_line>` Draws a line on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_line<class_CanvasItem_method_draw_line>`. @@ -5600,7 +6108,7 @@ Draws a line on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item .. rst-class:: classref-method -void **canvas_item_add_mesh** **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` mesh, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`RID<class_RID>` texture=RID() **)** +|void| **canvas_item_add_mesh**\ (\ item\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), texture\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_mesh>` Draws a mesh created with :ref:`mesh_create<class_RenderingServer_method_mesh_create>` with given ``transform``, ``modulate`` color, and ``texture``. This is used internally by :ref:`MeshInstance2D<class_MeshInstance2D>`. @@ -5612,7 +6120,7 @@ Draws a mesh created with :ref:`mesh_create<class_RenderingServer_method_mesh_cr .. rst-class:: classref-method -void **canvas_item_add_msdf_texture_rect_region** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`float<class_float>` px_range=1.0, :ref:`float<class_float>` scale=1.0 **)** +|void| **canvas_item_add_msdf_texture_rect_region**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, px_range\: :ref:`float<class_float>` = 1.0, scale\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_msdf_texture_rect_region>` See also :ref:`CanvasItem.draw_msdf_texture_rect_region<class_CanvasItem_method_draw_msdf_texture_rect_region>`. @@ -5624,7 +6132,7 @@ See also :ref:`CanvasItem.draw_msdf_texture_rect_region<class_CanvasItem_method_ .. rst-class:: classref-method -void **canvas_item_add_multiline** **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`float<class_float>` width=-1.0 **)** +|void| **canvas_item_add_multiline**\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_multiline>` Draws a 2D multiline on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_multiline<class_CanvasItem_method_draw_multiline>` and :ref:`CanvasItem.draw_multiline_colors<class_CanvasItem_method_draw_multiline_colors>`. @@ -5636,7 +6144,7 @@ Draws a 2D multiline on the :ref:`CanvasItem<class_CanvasItem>` pointed to by th .. rst-class:: classref-method -void **canvas_item_add_multimesh** **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` mesh, :ref:`RID<class_RID>` texture=RID() **)** +|void| **canvas_item_add_multimesh**\ (\ item\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_multimesh>` Draws a 2D :ref:`MultiMesh<class_MultiMesh>` on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_multimesh<class_CanvasItem_method_draw_multimesh>`. @@ -5648,7 +6156,7 @@ Draws a 2D :ref:`MultiMesh<class_MultiMesh>` on the :ref:`CanvasItem<class_Canva .. rst-class:: classref-method -void **canvas_item_add_nine_patch** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` source, :ref:`RID<class_RID>` texture, :ref:`Vector2<class_Vector2>` topleft, :ref:`Vector2<class_Vector2>` bottomright, :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` x_axis_mode=0, :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` y_axis_mode=0, :ref:`bool<class_bool>` draw_center=true, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1) **)** +|void| **canvas_item_add_nine_patch**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, source\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, topleft\: :ref:`Vector2<class_Vector2>`, bottomright\: :ref:`Vector2<class_Vector2>`, x_axis_mode\: :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` = 0, y_axis_mode\: :ref:`NinePatchAxisMode<enum_RenderingServer_NinePatchAxisMode>` = 0, draw_center\: :ref:`bool<class_bool>` = true, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_nine_patch>` Draws a nine-patch rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. @@ -5660,7 +6168,7 @@ Draws a nine-patch rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed .. rst-class:: classref-method -void **canvas_item_add_particles** **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` texture **)** +|void| **canvas_item_add_particles**\ (\ item\: :ref:`RID<class_RID>`, particles\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_particles>` Draws particles on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. @@ -5672,7 +6180,7 @@ Draws particles on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``i .. rst-class:: classref-method -void **canvas_item_add_polygon** **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`RID<class_RID>` texture=RID() **)** +|void| **canvas_item_add_polygon**\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), texture\: :ref:`RID<class_RID>` = RID()\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_polygon>` Draws a 2D polygon on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. If you need more flexibility (such as being able to use bones), use :ref:`canvas_item_add_triangle_array<class_RenderingServer_method_canvas_item_add_triangle_array>` instead. See also :ref:`CanvasItem.draw_polygon<class_CanvasItem_method_draw_polygon>`. @@ -5684,7 +6192,7 @@ Draws a 2D polygon on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the .. rst-class:: classref-method -void **canvas_item_add_polyline** **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`float<class_float>` width=-1.0, :ref:`bool<class_bool>` antialiased=false **)** +|void| **canvas_item_add_polyline**\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, width\: :ref:`float<class_float>` = -1.0, antialiased\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_polyline>` Draws a 2D polyline on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_polyline<class_CanvasItem_method_draw_polyline>` and :ref:`CanvasItem.draw_polyline_colors<class_CanvasItem_method_draw_polyline_colors>`. @@ -5696,7 +6204,7 @@ Draws a 2D polyline on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the .. rst-class:: classref-method -void **canvas_item_add_primitive** **(** :ref:`RID<class_RID>` item, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs, :ref:`RID<class_RID>` texture **)** +|void| **canvas_item_add_primitive**\ (\ item\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_primitive>` Draws a 2D primitive on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_primitive<class_CanvasItem_method_draw_primitive>`. @@ -5708,7 +6216,7 @@ Draws a 2D primitive on the :ref:`CanvasItem<class_CanvasItem>` pointed to by th .. rst-class:: classref-method -void **canvas_item_add_rect** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`Color<class_Color>` color **)** +|void| **canvas_item_add_rect**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, color\: :ref:`Color<class_Color>`, antialiased\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_rect>` Draws a rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_rect<class_CanvasItem_method_draw_rect>`. @@ -5720,7 +6228,7 @@ Draws a rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ` .. rst-class:: classref-method -void **canvas_item_add_set_transform** **(** :ref:`RID<class_RID>` item, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **canvas_item_add_set_transform**\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_set_transform>` Sets a :ref:`Transform2D<class_Transform2D>` that will be used to transform subsequent canvas item commands. @@ -5732,7 +6240,7 @@ Sets a :ref:`Transform2D<class_Transform2D>` that will be used to transform subs .. rst-class:: classref-method -void **canvas_item_add_texture_rect** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` tile=false, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** +|void| **canvas_item_add_texture_rect**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, tile\: :ref:`bool<class_bool>` = false, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_texture_rect>` Draws a 2D textured rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_texture_rect<class_CanvasItem_method_draw_texture_rect>` and :ref:`Texture2D.draw_rect<class_Texture2D_method_draw_rect>`. @@ -5744,7 +6252,7 @@ Draws a 2D textured rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed .. rst-class:: classref-method -void **canvas_item_add_texture_rect_region** **(** :ref:`RID<class_RID>` item, :ref:`Rect2<class_Rect2>` rect, :ref:`RID<class_RID>` texture, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false, :ref:`bool<class_bool>` clip_uv=true **)** +|void| **canvas_item_add_texture_rect_region**\ (\ item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, texture\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false, clip_uv\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_texture_rect_region>` Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. See also :ref:`CanvasItem.draw_texture_rect_region<class_CanvasItem_method_draw_texture_rect_region>` and :ref:`Texture2D.draw_rect_region<class_Texture2D_method_draw_rect_region>`. @@ -5756,7 +6264,7 @@ Draws the specified region of a 2D textured rectangle on the :ref:`CanvasItem<cl .. rst-class:: classref-method -void **canvas_item_add_triangle_array** **(** :ref:`RID<class_RID>` item, :ref:`PackedInt32Array<class_PackedInt32Array>` indices, :ref:`PackedVector2Array<class_PackedVector2Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` colors, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`PackedInt32Array<class_PackedInt32Array>` bones=PackedInt32Array(), :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights=PackedFloat32Array(), :ref:`RID<class_RID>` texture=RID(), :ref:`int<class_int>` count=-1 **)** +|void| **canvas_item_add_triangle_array**\ (\ item\: :ref:`RID<class_RID>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`, points\: :ref:`PackedVector2Array<class_PackedVector2Array>`, colors\: :ref:`PackedColorArray<class_PackedColorArray>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), bones\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), texture\: :ref:`RID<class_RID>` = RID(), count\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_add_triangle_array>` Draws a triangle array on the :ref:`CanvasItem<class_CanvasItem>` pointed to by the ``item`` :ref:`RID<class_RID>`. This is internally used by :ref:`Line2D<class_Line2D>` and :ref:`StyleBoxFlat<class_StyleBoxFlat>` for rendering. :ref:`canvas_item_add_triangle_array<class_RenderingServer_method_canvas_item_add_triangle_array>` is highly flexible, but more complex to use than :ref:`canvas_item_add_polygon<class_RenderingServer_method_canvas_item_add_polygon>`. @@ -5770,7 +6278,7 @@ Draws a triangle array on the :ref:`CanvasItem<class_CanvasItem>` pointed to by .. rst-class:: classref-method -void **canvas_item_clear** **(** :ref:`RID<class_RID>` item **)** +|void| **canvas_item_clear**\ (\ item\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_clear>` Clears the :ref:`CanvasItem<class_CanvasItem>` and removes all commands in it. @@ -5782,7 +6290,7 @@ Clears the :ref:`CanvasItem<class_CanvasItem>` and removes all commands in it. .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_item_create** **(** **)** +:ref:`RID<class_RID>` **canvas_item_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_create>` Creates a new CanvasItem instance and returns its :ref:`RID<class_RID>`. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_item_*`` RenderingServer functions. @@ -5794,11 +6302,25 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_item_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_item_reset_physics_interpolation**\ (\ item\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_reset_physics_interpolation>` + +Prevents physics interpolation for the current physics tick. + +This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_set_canvas_group_mode: .. rst-class:: classref-method -void **canvas_item_set_canvas_group_mode** **(** :ref:`RID<class_RID>` item, :ref:`CanvasGroupMode<enum_RenderingServer_CanvasGroupMode>` mode, :ref:`float<class_float>` clear_margin=5.0, :ref:`bool<class_bool>` fit_empty=false, :ref:`float<class_float>` fit_margin=0.0, :ref:`bool<class_bool>` blur_mipmaps=false **)** +|void| **canvas_item_set_canvas_group_mode**\ (\ item\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasGroupMode<enum_RenderingServer_CanvasGroupMode>`, clear_margin\: :ref:`float<class_float>` = 5.0, fit_empty\: :ref:`bool<class_bool>` = false, fit_margin\: :ref:`float<class_float>` = 0.0, blur_mipmaps\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_canvas_group_mode>` Sets the canvas group mode used during 2D rendering for the canvas item specified by the ``item`` RID. For faster but more limited clipping, use :ref:`canvas_item_set_clip<class_RenderingServer_method_canvas_item_set_clip>` instead. @@ -5812,7 +6334,7 @@ Sets the canvas group mode used during 2D rendering for the canvas item specifie .. rst-class:: classref-method -void **canvas_item_set_clip** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` clip **)** +|void| **canvas_item_set_clip**\ (\ item\: :ref:`RID<class_RID>`, clip\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_clip>` If ``clip`` is ``true``, makes the canvas item specified by the ``item`` RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use :ref:`canvas_item_set_canvas_group_mode<class_RenderingServer_method_canvas_item_set_canvas_group_mode>` instead. @@ -5826,7 +6348,7 @@ If ``clip`` is ``true``, makes the canvas item specified by the ``item`` RID not .. rst-class:: classref-method -void **canvas_item_set_copy_to_backbuffer** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled, :ref:`Rect2<class_Rect2>` rect **)** +|void| **canvas_item_set_copy_to_backbuffer**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_copy_to_backbuffer>` Sets the :ref:`CanvasItem<class_CanvasItem>` to copy a rect to the backbuffer. @@ -5838,7 +6360,7 @@ Sets the :ref:`CanvasItem<class_CanvasItem>` to copy a rect to the backbuffer. .. rst-class:: classref-method -void **canvas_item_set_custom_rect** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` use_custom_rect, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0) **)** +|void| **canvas_item_set_custom_rect**\ (\ item\: :ref:`RID<class_RID>`, use_custom_rect\: :ref:`bool<class_bool>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0)\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_custom_rect>` If ``use_custom_rect`` is ``true``, sets the custom visibility rectangle (used for culling) to ``rect`` for the canvas item specified by ``item``. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If ``use_custom_rect`` is ``false``, automatically computes a visibility rectangle based on the canvas item's draw commands. @@ -5850,7 +6372,7 @@ If ``use_custom_rect`` is ``true``, sets the custom visibility rectangle (used f .. rst-class:: classref-method -void **canvas_item_set_default_texture_filter** **(** :ref:`RID<class_RID>` item, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** +|void| **canvas_item_set_default_texture_filter**\ (\ item\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_default_texture_filter>` Sets the default texture filter mode for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.texture_filter<class_CanvasItem_property_texture_filter>`. @@ -5862,7 +6384,7 @@ Sets the default texture filter mode for the canvas item specified by the ``item .. rst-class:: classref-method -void **canvas_item_set_default_texture_repeat** **(** :ref:`RID<class_RID>` item, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** +|void| **canvas_item_set_default_texture_repeat**\ (\ item\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_default_texture_repeat>` Sets the default texture repeat mode for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>`. @@ -5874,7 +6396,7 @@ Sets the default texture repeat mode for the canvas item specified by the ``item .. rst-class:: classref-method -void **canvas_item_set_distance_field_mode** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_item_set_distance_field_mode**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_distance_field_mode>` If ``enabled`` is ``true``, enables multichannel signed distance field rendering mode for the canvas item specified by the ``item`` RID. This is meant to be used for font rendering, or with specially generated images using `msdfgen <https://github.com/Chlumsky/msdfgen>`__. @@ -5886,7 +6408,7 @@ If ``enabled`` is ``true``, enables multichannel signed distance field rendering .. rst-class:: classref-method -void **canvas_item_set_draw_behind_parent** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_item_set_draw_behind_parent**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_draw_behind_parent>` If ``enabled`` is ``true``, draws the canvas item specified by the ``item`` RID behind its parent. Equivalent to :ref:`CanvasItem.show_behind_parent<class_CanvasItem_property_show_behind_parent>`. @@ -5898,7 +6420,7 @@ If ``enabled`` is ``true``, draws the canvas item specified by the ``item`` RID .. rst-class:: classref-method -void **canvas_item_set_draw_index** **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` index **)** +|void| **canvas_item_set_draw_index**\ (\ item\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_draw_index>` Sets the index for the :ref:`CanvasItem<class_CanvasItem>`. @@ -5906,11 +6428,23 @@ Sets the index for the :ref:`CanvasItem<class_CanvasItem>`. ---- +.. _class_RenderingServer_method_canvas_item_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_item_set_interpolated**\ (\ item\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_interpolated>` + +If ``interpolated`` is ``true``, turns on physics interpolation for the canvas item. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_item_set_light_mask: .. rst-class:: classref-method -void **canvas_item_set_light_mask** **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` mask **)** +|void| **canvas_item_set_light_mask**\ (\ item\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_light_mask>` Sets the light ``mask`` for the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.light_mask<class_CanvasItem_property_light_mask>`. @@ -5922,7 +6456,7 @@ Sets the light ``mask`` for the canvas item specified by the ``item`` RID. Equiv .. rst-class:: classref-method -void **canvas_item_set_material** **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` material **)** +|void| **canvas_item_set_material**\ (\ item\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_material>` Sets a new ``material`` to the canvas item specified by the ``item`` RID. Equivalent to :ref:`CanvasItem.material<class_CanvasItem_property_material>`. @@ -5934,7 +6468,7 @@ Sets a new ``material`` to the canvas item specified by the ``item`` RID. Equiva .. rst-class:: classref-method -void **canvas_item_set_modulate** **(** :ref:`RID<class_RID>` item, :ref:`Color<class_Color>` color **)** +|void| **canvas_item_set_modulate**\ (\ item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_modulate>` Multiplies the color of the canvas item specified by the ``item`` RID, while affecting its children. See also :ref:`canvas_item_set_self_modulate<class_RenderingServer_method_canvas_item_set_self_modulate>`. Equivalent to :ref:`CanvasItem.modulate<class_CanvasItem_property_modulate>`. @@ -5946,7 +6480,7 @@ Multiplies the color of the canvas item specified by the ``item`` RID, while aff .. rst-class:: classref-method -void **canvas_item_set_parent** **(** :ref:`RID<class_RID>` item, :ref:`RID<class_RID>` parent **)** +|void| **canvas_item_set_parent**\ (\ item\: :ref:`RID<class_RID>`, parent\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_parent>` Sets a parent :ref:`CanvasItem<class_CanvasItem>` to the :ref:`CanvasItem<class_CanvasItem>`. The item will inherit transform, modulation and visibility from its parent, like :ref:`CanvasItem<class_CanvasItem>` nodes in the scene tree. @@ -5958,7 +6492,7 @@ Sets a parent :ref:`CanvasItem<class_CanvasItem>` to the :ref:`CanvasItem<class_ .. rst-class:: classref-method -void **canvas_item_set_self_modulate** **(** :ref:`RID<class_RID>` item, :ref:`Color<class_Color>` color **)** +|void| **canvas_item_set_self_modulate**\ (\ item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_self_modulate>` Multiplies the color of the canvas item specified by the ``item`` RID, without affecting its children. See also :ref:`canvas_item_set_modulate<class_RenderingServer_method_canvas_item_set_modulate>`. Equivalent to :ref:`CanvasItem.self_modulate<class_CanvasItem_property_self_modulate>`. @@ -5970,7 +6504,7 @@ Multiplies the color of the canvas item specified by the ``item`` RID, without a .. rst-class:: classref-method -void **canvas_item_set_sort_children_by_y** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_item_set_sort_children_by_y**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_sort_children_by_y>` If ``enabled`` is ``true``, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the ``item`` RID, not the canvas item itself. Equivalent to :ref:`CanvasItem.y_sort_enabled<class_CanvasItem_property_y_sort_enabled>`. @@ -5982,7 +6516,7 @@ If ``enabled`` is ``true``, child nodes with the lowest Y position are drawn bef .. rst-class:: classref-method -void **canvas_item_set_transform** **(** :ref:`RID<class_RID>` item, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **canvas_item_set_transform**\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_transform>` Sets the ``transform`` of the canvas item specified by the ``item`` RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to :ref:`Node2D.transform<class_Node2D_property_transform>`. @@ -5994,7 +6528,7 @@ Sets the ``transform`` of the canvas item specified by the ``item`` RID. This af .. rst-class:: classref-method -void **canvas_item_set_use_parent_material** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_item_set_use_parent_material**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_use_parent_material>` Sets if the :ref:`CanvasItem<class_CanvasItem>` uses its parent's material. @@ -6006,7 +6540,7 @@ Sets if the :ref:`CanvasItem<class_CanvasItem>` uses its parent's material. .. rst-class:: classref-method -void **canvas_item_set_visibility_layer** **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` visibility_layer **)** +|void| **canvas_item_set_visibility_layer**\ (\ item\: :ref:`RID<class_RID>`, visibility_layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_visibility_layer>` Sets the rendering visibility layer associated with this :ref:`CanvasItem<class_CanvasItem>`. Only :ref:`Viewport<class_Viewport>` nodes with a matching rendering mask will render this :ref:`CanvasItem<class_CanvasItem>`. @@ -6018,7 +6552,7 @@ Sets the rendering visibility layer associated with this :ref:`CanvasItem<class_ .. rst-class:: classref-method -void **canvas_item_set_visibility_notifier** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enable, :ref:`Rect2<class_Rect2>` area, :ref:`Callable<class_Callable>` enter_callable, :ref:`Callable<class_Callable>` exit_callable **)** +|void| **canvas_item_set_visibility_notifier**\ (\ item\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, area\: :ref:`Rect2<class_Rect2>`, enter_callable\: :ref:`Callable<class_Callable>`, exit_callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_visibility_notifier>` Sets the given :ref:`CanvasItem<class_CanvasItem>` as visibility notifier. ``area`` defines the area of detecting visibility. ``enter_callable`` is called when the :ref:`CanvasItem<class_CanvasItem>` enters the screen, ``exit_callable`` is called when the :ref:`CanvasItem<class_CanvasItem>` exits the screen. If ``enable`` is ``false``, the item will no longer function as notifier. @@ -6032,7 +6566,7 @@ This method can be used to manually mimic :ref:`VisibleOnScreenNotifier2D<class_ .. rst-class:: classref-method -void **canvas_item_set_visible** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` visible **)** +|void| **canvas_item_set_visible**\ (\ item\: :ref:`RID<class_RID>`, visible\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_visible>` Sets the visibility of the :ref:`CanvasItem<class_CanvasItem>`. @@ -6044,7 +6578,7 @@ Sets the visibility of the :ref:`CanvasItem<class_CanvasItem>`. .. rst-class:: classref-method -void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID<class_RID>` item, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_item_set_z_as_relative_to_parent**\ (\ item\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_z_as_relative_to_parent>` If this is enabled, the Z index of the parent will be added to the children's Z index. @@ -6056,7 +6590,7 @@ If this is enabled, the Z index of the parent will be added to the children's Z .. rst-class:: classref-method -void **canvas_item_set_z_index** **(** :ref:`RID<class_RID>` item, :ref:`int<class_int>` z_index **)** +|void| **canvas_item_set_z_index**\ (\ item\: :ref:`RID<class_RID>`, z_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_set_z_index>` Sets the :ref:`CanvasItem<class_CanvasItem>`'s Z index, i.e. its draw order (lower indexes are drawn first). @@ -6064,11 +6598,25 @@ Sets the :ref:`CanvasItem<class_CanvasItem>`'s Z index, i.e. its draw order (low ---- +.. _class_RenderingServer_method_canvas_item_transform_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_item_transform_physics_interpolation**\ (\ item\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_item_transform_physics_interpolation>` + +Transforms both the current and previous stored transform for a canvas item. + +This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_attach_to_canvas: .. rst-class:: classref-method -void **canvas_light_attach_to_canvas** **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` canvas **)** +|void| **canvas_light_attach_to_canvas**\ (\ light\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_attach_to_canvas>` Attaches the canvas light to the canvas. Removes it from its previous canvas. @@ -6080,7 +6628,7 @@ Attaches the canvas light to the canvas. Removes it from its previous canvas. .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_light_create** **(** **)** +:ref:`RID<class_RID>` **canvas_light_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_create>` Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_*`` RenderingServer functions. @@ -6096,7 +6644,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **canvas_light_occluder_attach_to_canvas** **(** :ref:`RID<class_RID>` occluder, :ref:`RID<class_RID>` canvas **)** +|void| **canvas_light_occluder_attach_to_canvas**\ (\ occluder\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_attach_to_canvas>` Attaches a light occluder to the canvas. Removes it from its previous canvas. @@ -6108,7 +6656,7 @@ Attaches a light occluder to the canvas. Removes it from its previous canvas. .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_light_occluder_create** **(** **)** +:ref:`RID<class_RID>` **canvas_light_occluder_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_create>` Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_light_occluder_*`` RenderingServer functions. @@ -6120,63 +6668,117 @@ Once finished with your RID, you will want to free the RID using the RenderingSe ---- +.. _class_RenderingServer_method_canvas_light_occluder_reset_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_reset_physics_interpolation**\ (\ occluder\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_reset_physics_interpolation>` + +Prevents physics interpolation for the current physics tick. + +This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision: .. rst-class:: classref-method -void **canvas_light_occluder_set_as_sdf_collision** **(** :ref:`RID<class_RID>` occluder, :ref:`bool<class_bool>` enable **)** +|void| **canvas_light_occluder_set_as_sdf_collision**\ (\ occluder\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_as_sdf_collision>` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_light_occluder_set_enabled: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_set_enabled**\ (\ occluder\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_enabled>` + +Enables or disables light occluder. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_light_occluder_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_set_interpolated**\ (\ occluder\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_interpolated>` + +If ``interpolated`` is ``true``, turns on physics interpolation for the light occluder. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_canvas_light_occluder_set_light_mask: + +.. rst-class:: classref-method + +|void| **canvas_light_occluder_set_light_mask**\ (\ occluder\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_light_mask>` + +The light mask. See :ref:`LightOccluder2D<class_LightOccluder2D>` for more information on light masks. .. rst-class:: classref-item-separator ---- -.. _class_RenderingServer_method_canvas_light_occluder_set_enabled: +.. _class_RenderingServer_method_canvas_light_occluder_set_polygon: .. rst-class:: classref-method -void **canvas_light_occluder_set_enabled** **(** :ref:`RID<class_RID>` occluder, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_light_occluder_set_polygon**\ (\ occluder\: :ref:`RID<class_RID>`, polygon\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_polygon>` -Enables or disables light occluder. +Sets a light occluder's polygon. .. rst-class:: classref-item-separator ---- -.. _class_RenderingServer_method_canvas_light_occluder_set_light_mask: +.. _class_RenderingServer_method_canvas_light_occluder_set_transform: .. rst-class:: classref-method -void **canvas_light_occluder_set_light_mask** **(** :ref:`RID<class_RID>` occluder, :ref:`int<class_int>` mask **)** +|void| **canvas_light_occluder_set_transform**\ (\ occluder\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_set_transform>` -The light mask. See :ref:`LightOccluder2D<class_LightOccluder2D>` for more information on light masks. +Sets a light occluder's :ref:`Transform2D<class_Transform2D>`. .. rst-class:: classref-item-separator ---- -.. _class_RenderingServer_method_canvas_light_occluder_set_polygon: +.. _class_RenderingServer_method_canvas_light_occluder_transform_physics_interpolation: .. rst-class:: classref-method -void **canvas_light_occluder_set_polygon** **(** :ref:`RID<class_RID>` occluder, :ref:`RID<class_RID>` polygon **)** +|void| **canvas_light_occluder_transform_physics_interpolation**\ (\ occluder\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_occluder_transform_physics_interpolation>` -Sets a light occluder's polygon. +Transforms both the current and previous stored transform for a light occluder. + +This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. .. rst-class:: classref-item-separator ---- -.. _class_RenderingServer_method_canvas_light_occluder_set_transform: +.. _class_RenderingServer_method_canvas_light_reset_physics_interpolation: .. rst-class:: classref-method -void **canvas_light_occluder_set_transform** **(** :ref:`RID<class_RID>` occluder, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **canvas_light_reset_physics_interpolation**\ (\ light\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_reset_physics_interpolation>` -Sets a light occluder's :ref:`Transform2D<class_Transform2D>`. +Prevents physics interpolation for the current physics tick. + +This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. .. rst-class:: classref-item-separator @@ -6186,7 +6788,7 @@ Sets a light occluder's :ref:`Transform2D<class_Transform2D>`. .. rst-class:: classref-method -void **canvas_light_set_blend_mode** **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightBlendMode<enum_RenderingServer_CanvasLightBlendMode>` mode **)** +|void| **canvas_light_set_blend_mode**\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasLightBlendMode<enum_RenderingServer_CanvasLightBlendMode>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_blend_mode>` Sets the blend mode for the given canvas light. See :ref:`CanvasLightBlendMode<enum_RenderingServer_CanvasLightBlendMode>` for options. Equivalent to :ref:`Light2D.blend_mode<class_Light2D_property_blend_mode>`. @@ -6198,7 +6800,7 @@ Sets the blend mode for the given canvas light. See :ref:`CanvasLightBlendMode<e .. rst-class:: classref-method -void **canvas_light_set_color** **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** +|void| **canvas_light_set_color**\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_color>` Sets the color for a light. @@ -6210,7 +6812,7 @@ Sets the color for a light. .. rst-class:: classref-method -void **canvas_light_set_enabled** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_light_set_enabled**\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_enabled>` Enables or disables a canvas light. @@ -6222,7 +6824,7 @@ Enables or disables a canvas light. .. rst-class:: classref-method -void **canvas_light_set_energy** **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` energy **)** +|void| **canvas_light_set_energy**\ (\ light\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_energy>` Sets a canvas light's energy. @@ -6234,7 +6836,7 @@ Sets a canvas light's energy. .. rst-class:: classref-method -void **canvas_light_set_height** **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` height **)** +|void| **canvas_light_set_height**\ (\ light\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_height>` Sets a canvas light's height. @@ -6242,11 +6844,23 @@ Sets a canvas light's height. ---- +.. _class_RenderingServer_method_canvas_light_set_interpolated: + +.. rst-class:: classref-method + +|void| **canvas_light_set_interpolated**\ (\ light\: :ref:`RID<class_RID>`, interpolated\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_interpolated>` + +If ``interpolated`` is ``true``, turns on physics interpolation for the canvas light. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_light_set_item_cull_mask: .. rst-class:: classref-method -void **canvas_light_set_item_cull_mask** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** +|void| **canvas_light_set_item_cull_mask**\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_item_cull_mask>` The light mask. See :ref:`LightOccluder2D<class_LightOccluder2D>` for more information on light masks. @@ -6258,7 +6872,7 @@ The light mask. See :ref:`LightOccluder2D<class_LightOccluder2D>` for more infor .. rst-class:: classref-method -void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** +|void| **canvas_light_set_item_shadow_cull_mask**\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_item_shadow_cull_mask>` The binary mask used to determine which layers this canvas light's shadows affects. See :ref:`LightOccluder2D<class_LightOccluder2D>` for more information on light masks. @@ -6270,7 +6884,7 @@ The binary mask used to determine which layers this canvas light's shadows affec .. rst-class:: classref-method -void **canvas_light_set_layer_range** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` min_layer, :ref:`int<class_int>` max_layer **)** +|void| **canvas_light_set_layer_range**\ (\ light\: :ref:`RID<class_RID>`, min_layer\: :ref:`int<class_int>`, max_layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_layer_range>` The layer range that gets rendered with this light. @@ -6282,7 +6896,7 @@ The layer range that gets rendered with this light. .. rst-class:: classref-method -void **canvas_light_set_mode** **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightMode<enum_RenderingServer_CanvasLightMode>` mode **)** +|void| **canvas_light_set_mode**\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasLightMode<enum_RenderingServer_CanvasLightMode>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_mode>` The mode of the light, see :ref:`CanvasLightMode<enum_RenderingServer_CanvasLightMode>` constants. @@ -6294,7 +6908,7 @@ The mode of the light, see :ref:`CanvasLightMode<enum_RenderingServer_CanvasLigh .. rst-class:: classref-method -void **canvas_light_set_shadow_color** **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** +|void| **canvas_light_set_shadow_color**\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_shadow_color>` Sets the color of the canvas light's shadow. @@ -6306,7 +6920,7 @@ Sets the color of the canvas light's shadow. .. rst-class:: classref-method -void **canvas_light_set_shadow_enabled** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** +|void| **canvas_light_set_shadow_enabled**\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_shadow_enabled>` Enables or disables the canvas light's shadow. @@ -6318,7 +6932,7 @@ Enables or disables the canvas light's shadow. .. rst-class:: classref-method -void **canvas_light_set_shadow_filter** **(** :ref:`RID<class_RID>` light, :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightShadowFilter>` filter **)** +|void| **canvas_light_set_shadow_filter**\ (\ light\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightShadowFilter>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_shadow_filter>` Sets the canvas light's shadow's filter, see :ref:`CanvasLightShadowFilter<enum_RenderingServer_CanvasLightShadowFilter>` constants. @@ -6330,7 +6944,7 @@ Sets the canvas light's shadow's filter, see :ref:`CanvasLightShadowFilter<enum_ .. rst-class:: classref-method -void **canvas_light_set_shadow_smooth** **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` smooth **)** +|void| **canvas_light_set_shadow_smooth**\ (\ light\: :ref:`RID<class_RID>`, smooth\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_shadow_smooth>` Smoothens the shadow. The lower, the smoother. @@ -6342,7 +6956,7 @@ Smoothens the shadow. The lower, the smoother. .. rst-class:: classref-method -void **canvas_light_set_texture** **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` texture **)** +|void| **canvas_light_set_texture**\ (\ light\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_texture>` Sets the texture to be used by a :ref:`PointLight2D<class_PointLight2D>`. Equivalent to :ref:`PointLight2D.texture<class_PointLight2D_property_texture>`. @@ -6354,7 +6968,7 @@ Sets the texture to be used by a :ref:`PointLight2D<class_PointLight2D>`. Equiva .. rst-class:: classref-method -void **canvas_light_set_texture_offset** **(** :ref:`RID<class_RID>` light, :ref:`Vector2<class_Vector2>` offset **)** +|void| **canvas_light_set_texture_offset**\ (\ light\: :ref:`RID<class_RID>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_texture_offset>` Sets the offset of a :ref:`PointLight2D<class_PointLight2D>`'s texture. Equivalent to :ref:`PointLight2D.offset<class_PointLight2D_property_offset>`. @@ -6366,7 +6980,7 @@ Sets the offset of a :ref:`PointLight2D<class_PointLight2D>`'s texture. Equivale .. rst-class:: classref-method -void **canvas_light_set_texture_scale** **(** :ref:`RID<class_RID>` light, :ref:`float<class_float>` scale **)** +|void| **canvas_light_set_texture_scale**\ (\ light\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_texture_scale>` Sets the scale factor of a :ref:`PointLight2D<class_PointLight2D>`'s texture. Equivalent to :ref:`PointLight2D.texture_scale<class_PointLight2D_property_texture_scale>`. @@ -6378,7 +6992,7 @@ Sets the scale factor of a :ref:`PointLight2D<class_PointLight2D>`'s texture. Eq .. rst-class:: classref-method -void **canvas_light_set_transform** **(** :ref:`RID<class_RID>` light, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **canvas_light_set_transform**\ (\ light\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_transform>` Sets the canvas light's :ref:`Transform2D<class_Transform2D>`. @@ -6390,7 +7004,7 @@ Sets the canvas light's :ref:`Transform2D<class_Transform2D>`. .. rst-class:: classref-method -void **canvas_light_set_z_range** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` min_z, :ref:`int<class_int>` max_z **)** +|void| **canvas_light_set_z_range**\ (\ light\: :ref:`RID<class_RID>`, min_z\: :ref:`int<class_int>`, max_z\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_set_z_range>` Sets the Z range of objects that will be affected by this light. Equivalent to :ref:`Light2D.range_z_min<class_Light2D_property_range_z_min>` and :ref:`Light2D.range_z_max<class_Light2D_property_range_z_max>`. @@ -6398,11 +7012,25 @@ Sets the Z range of objects that will be affected by this light. Equivalent to : ---- +.. _class_RenderingServer_method_canvas_light_transform_physics_interpolation: + +.. rst-class:: classref-method + +|void| **canvas_light_transform_physics_interpolation**\ (\ light\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_light_transform_physics_interpolation>` + +Transforms both the current and previous stored transform for a canvas light. + +This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_occluder_polygon_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_occluder_polygon_create** **(** **)** +:ref:`RID<class_RID>` **canvas_occluder_polygon_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_occluder_polygon_create>` Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_occluder_polygon_*`` RenderingServer functions. @@ -6418,7 +7046,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID<class_RID>` occluder_polygon, :ref:`CanvasOccluderPolygonCullMode<enum_RenderingServer_CanvasOccluderPolygonCullMode>` mode **)** +|void| **canvas_occluder_polygon_set_cull_mode**\ (\ occluder_polygon\: :ref:`RID<class_RID>`, mode\: :ref:`CanvasOccluderPolygonCullMode<enum_RenderingServer_CanvasOccluderPolygonCullMode>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_occluder_polygon_set_cull_mode>` Sets an occluder polygons cull mode. See :ref:`CanvasOccluderPolygonCullMode<enum_RenderingServer_CanvasOccluderPolygonCullMode>` constants. @@ -6430,7 +7058,7 @@ Sets an occluder polygons cull mode. See :ref:`CanvasOccluderPolygonCullMode<enu .. rst-class:: classref-method -void **canvas_occluder_polygon_set_shape** **(** :ref:`RID<class_RID>` occluder_polygon, :ref:`PackedVector2Array<class_PackedVector2Array>` shape, :ref:`bool<class_bool>` closed **)** +|void| **canvas_occluder_polygon_set_shape**\ (\ occluder_polygon\: :ref:`RID<class_RID>`, shape\: :ref:`PackedVector2Array<class_PackedVector2Array>`, closed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_occluder_polygon_set_shape>` Sets the shape of the occluder polygon. @@ -6442,7 +7070,7 @@ Sets the shape of the occluder polygon. .. rst-class:: classref-method -void **canvas_set_disable_scale** **(** :ref:`bool<class_bool>` disable **)** +|void| **canvas_set_disable_scale**\ (\ disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_set_disable_scale>` .. container:: contribute @@ -6456,7 +7084,7 @@ void **canvas_set_disable_scale** **(** :ref:`bool<class_bool>` disable **)** .. rst-class:: classref-method -void **canvas_set_item_mirroring** **(** :ref:`RID<class_RID>` canvas, :ref:`RID<class_RID>` item, :ref:`Vector2<class_Vector2>` mirroring **)** +|void| **canvas_set_item_mirroring**\ (\ canvas\: :ref:`RID<class_RID>`, item\: :ref:`RID<class_RID>`, mirroring\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_set_item_mirroring>` A copy of the canvas item will be drawn with a local offset of the mirroring :ref:`Vector2<class_Vector2>`. @@ -6464,11 +7092,23 @@ A copy of the canvas item will be drawn with a local offset of the mirroring :re ---- +.. _class_RenderingServer_method_canvas_set_item_repeat: + +.. rst-class:: classref-method + +|void| **canvas_set_item_repeat**\ (\ item\: :ref:`RID<class_RID>`, repeat_size\: :ref:`Vector2<class_Vector2>`, repeat_times\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_set_item_repeat>` + +A copy of the canvas item will be drawn with a local offset of the ``repeat_size`` by the number of times of the ``repeat_times``. As the ``repeat_times`` increases, the copies will spread away from the origin texture. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_canvas_set_modulate: .. rst-class:: classref-method -void **canvas_set_modulate** **(** :ref:`RID<class_RID>` canvas, :ref:`Color<class_Color>` color **)** +|void| **canvas_set_modulate**\ (\ canvas\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_set_modulate>` Modulates all colors in the given canvas. @@ -6480,7 +7120,7 @@ Modulates all colors in the given canvas. .. rst-class:: classref-method -void **canvas_set_shadow_texture_size** **(** :ref:`int<class_int>` size **)** +|void| **canvas_set_shadow_texture_size**\ (\ size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_set_shadow_texture_size>` Sets the :ref:`ProjectSettings.rendering/2d/shadow_atlas/size<class_ProjectSettings_property_rendering/2d/shadow_atlas/size>` to use for :ref:`Light2D<class_Light2D>` shadow rendering (in pixels). The value is rounded up to the nearest power of 2. @@ -6492,7 +7132,7 @@ Sets the :ref:`ProjectSettings.rendering/2d/shadow_atlas/size<class_ProjectSetti .. rst-class:: classref-method -:ref:`RID<class_RID>` **canvas_texture_create** **(** **)** +:ref:`RID<class_RID>` **canvas_texture_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_canvas_texture_create>` Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``canvas_texture_*`` RenderingServer functions. @@ -6508,7 +7148,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **canvas_texture_set_channel** **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasTextureChannel<enum_RenderingServer_CanvasTextureChannel>` channel, :ref:`RID<class_RID>` texture **)** +|void| **canvas_texture_set_channel**\ (\ canvas_texture\: :ref:`RID<class_RID>`, channel\: :ref:`CanvasTextureChannel<enum_RenderingServer_CanvasTextureChannel>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_texture_set_channel>` Sets the ``channel``'s ``texture`` for the canvas texture specified by the ``canvas_texture`` RID. Equivalent to :ref:`CanvasTexture.diffuse_texture<class_CanvasTexture_property_diffuse_texture>`, :ref:`CanvasTexture.normal_texture<class_CanvasTexture_property_normal_texture>` and :ref:`CanvasTexture.specular_texture<class_CanvasTexture_property_specular_texture>`. @@ -6520,7 +7160,7 @@ Sets the ``channel``'s ``texture`` for the canvas texture specified by the ``can .. rst-class:: classref-method -void **canvas_texture_set_shading_parameters** **(** :ref:`RID<class_RID>` canvas_texture, :ref:`Color<class_Color>` base_color, :ref:`float<class_float>` shininess **)** +|void| **canvas_texture_set_shading_parameters**\ (\ canvas_texture\: :ref:`RID<class_RID>`, base_color\: :ref:`Color<class_Color>`, shininess\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_texture_set_shading_parameters>` Sets the ``base_color`` and ``shininess`` to use for the canvas texture specified by the ``canvas_texture`` RID. Equivalent to :ref:`CanvasTexture.specular_color<class_CanvasTexture_property_specular_color>` and :ref:`CanvasTexture.specular_shininess<class_CanvasTexture_property_specular_shininess>`. @@ -6532,7 +7172,7 @@ Sets the ``base_color`` and ``shininess`` to use for the canvas texture specifie .. rst-class:: classref-method -void **canvas_texture_set_texture_filter** **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** +|void| **canvas_texture_set_texture_filter**\ (\ canvas_texture\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_texture_set_texture_filter>` Sets the texture ``filter`` mode to use for the canvas texture specified by the ``canvas_texture`` RID. @@ -6544,7 +7184,7 @@ Sets the texture ``filter`` mode to use for the canvas texture specified by the .. rst-class:: classref-method -void **canvas_texture_set_texture_repeat** **(** :ref:`RID<class_RID>` canvas_texture, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** +|void| **canvas_texture_set_texture_repeat**\ (\ canvas_texture\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) :ref:`🔗<class_RenderingServer_method_canvas_texture_set_texture_repeat>` Sets the texture ``repeat`` mode to use for the canvas texture specified by the ``canvas_texture`` RID. @@ -6552,11 +7192,87 @@ Sets the texture ``repeat`` mode to use for the canvas texture specified by the ---- +.. _class_RenderingServer_method_compositor_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **compositor_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_compositor_create>` + +Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. + +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid<class_RenderingServer_method_free_rid>` method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_compositor_effect_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **compositor_effect_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_compositor_effect_create>` + +Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. + +Once finished with your RID, you will want to free the RID using the RenderingServer's :ref:`free_rid<class_RenderingServer_method_free_rid>` method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_compositor_effect_set_callback: + +.. rst-class:: classref-method + +|void| **compositor_effect_set_callback**\ (\ effect\: :ref:`RID<class_RID>`, callback_type\: :ref:`CompositorEffectCallbackType<enum_RenderingServer_CompositorEffectCallbackType>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_RenderingServer_method_compositor_effect_set_callback>` + +Sets the callback type (``callback_type``) and callback method(``callback``) for this rendering effect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_compositor_effect_set_enabled: + +.. rst-class:: classref-method + +|void| **compositor_effect_set_enabled**\ (\ effect\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_compositor_effect_set_enabled>` + +Enables/disables this rendering effect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_compositor_effect_set_flag: + +.. rst-class:: classref-method + +|void| **compositor_effect_set_flag**\ (\ effect\: :ref:`RID<class_RID>`, flag\: :ref:`CompositorEffectFlags<enum_RenderingServer_CompositorEffectFlags>`, set\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_compositor_effect_set_flag>` + +Sets the flag (``flag``) for this rendering effect to ``true`` or ``false`` (``set``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_compositor_set_compositor_effects: + +.. rst-class:: classref-method + +|void| **compositor_set_compositor_effects**\ (\ compositor\: :ref:`RID<class_RID>`, effects\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\]\ ) :ref:`🔗<class_RenderingServer_method_compositor_set_compositor_effects>` + +Sets the compositor effects for the specified compositor RID. ``effects`` should be an array containing RIDs created with :ref:`compositor_effect_create<class_RenderingServer_method_compositor_effect_create>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_create_local_rendering_device: .. rst-class:: classref-method -:ref:`RenderingDevice<class_RenderingDevice>` **create_local_rendering_device** **(** **)** |const| +:ref:`RenderingDevice<class_RenderingDevice>` **create_local_rendering_device**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_create_local_rendering_device>` Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. @@ -6566,11 +7282,25 @@ Creates a RenderingDevice that can be used to do draw and compute operations on ---- +.. _class_RenderingServer_method_debug_canvas_item_get_rect: + +.. rst-class:: classref-method + +:ref:`Rect2<class_Rect2>` **debug_canvas_item_get_rect**\ (\ item\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_debug_canvas_item_get_rect>` + +Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. + +\ **Warning:** This function is intended for debugging in the editor, and will pass through and return a zero :ref:`Rect2<class_Rect2>` in exported projects. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_decal_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **decal_create** **(** **)** +:ref:`RID<class_RID>` **decal_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_decal_create>` Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``decal_*`` RenderingServer functions. @@ -6588,7 +7318,7 @@ To place in a scene, attach this decal to an instance using :ref:`instance_set_b .. rst-class:: classref-method -void **decal_set_albedo_mix** **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` albedo_mix **)** +|void| **decal_set_albedo_mix**\ (\ decal\: :ref:`RID<class_RID>`, albedo_mix\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_albedo_mix>` Sets the ``albedo_mix`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.albedo_mix<class_Decal_property_albedo_mix>`. @@ -6600,7 +7330,7 @@ Sets the ``albedo_mix`` in the decal specified by the ``decal`` RID. Equivalent .. rst-class:: classref-method -void **decal_set_cull_mask** **(** :ref:`RID<class_RID>` decal, :ref:`int<class_int>` mask **)** +|void| **decal_set_cull_mask**\ (\ decal\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_cull_mask>` Sets the cull ``mask`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.cull_mask<class_Decal_property_cull_mask>`. @@ -6612,7 +7342,7 @@ Sets the cull ``mask`` in the decal specified by the ``decal`` RID. Equivalent t .. rst-class:: classref-method -void **decal_set_distance_fade** **(** :ref:`RID<class_RID>` decal, :ref:`bool<class_bool>` enabled, :ref:`float<class_float>` begin, :ref:`float<class_float>` length **)** +|void| **decal_set_distance_fade**\ (\ decal\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, begin\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_distance_fade>` Sets the distance fade parameters in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.distance_fade_enabled<class_Decal_property_distance_fade_enabled>`, :ref:`Decal.distance_fade_begin<class_Decal_property_distance_fade_begin>` and :ref:`Decal.distance_fade_length<class_Decal_property_distance_fade_length>`. @@ -6624,7 +7354,7 @@ Sets the distance fade parameters in the decal specified by the ``decal`` RID. E .. rst-class:: classref-method -void **decal_set_emission_energy** **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` energy **)** +|void| **decal_set_emission_energy**\ (\ decal\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_emission_energy>` Sets the emission ``energy`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.emission_energy<class_Decal_property_emission_energy>`. @@ -6636,7 +7366,7 @@ Sets the emission ``energy`` in the decal specified by the ``decal`` RID. Equiva .. rst-class:: classref-method -void **decal_set_fade** **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` above, :ref:`float<class_float>` below **)** +|void| **decal_set_fade**\ (\ decal\: :ref:`RID<class_RID>`, above\: :ref:`float<class_float>`, below\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_fade>` Sets the upper fade (``above``) and lower fade (``below``) in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.upper_fade<class_Decal_property_upper_fade>` and :ref:`Decal.lower_fade<class_Decal_property_lower_fade>`. @@ -6648,7 +7378,7 @@ Sets the upper fade (``above``) and lower fade (``below``) in the decal specifie .. rst-class:: classref-method -void **decal_set_modulate** **(** :ref:`RID<class_RID>` decal, :ref:`Color<class_Color>` color **)** +|void| **decal_set_modulate**\ (\ decal\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_modulate>` Sets the color multiplier in the decal specified by the ``decal`` RID to ``color``. Equivalent to :ref:`Decal.modulate<class_Decal_property_modulate>`. @@ -6660,7 +7390,7 @@ Sets the color multiplier in the decal specified by the ``decal`` RID to ``color .. rst-class:: classref-method -void **decal_set_normal_fade** **(** :ref:`RID<class_RID>` decal, :ref:`float<class_float>` fade **)** +|void| **decal_set_normal_fade**\ (\ decal\: :ref:`RID<class_RID>`, fade\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_normal_fade>` Sets the normal ``fade`` in the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.normal_fade<class_Decal_property_normal_fade>`. @@ -6672,7 +7402,7 @@ Sets the normal ``fade`` in the decal specified by the ``decal`` RID. Equivalent .. rst-class:: classref-method -void **decal_set_size** **(** :ref:`RID<class_RID>` decal, :ref:`Vector3<class_Vector3>` size **)** +|void| **decal_set_size**\ (\ decal\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_size>` Sets the ``size`` of the decal specified by the ``decal`` RID. Equivalent to :ref:`Decal.size<class_Decal_property_size>`. @@ -6684,7 +7414,7 @@ Sets the ``size`` of the decal specified by the ``decal`` RID. Equivalent to :re .. rst-class:: classref-method -void **decal_set_texture** **(** :ref:`RID<class_RID>` decal, :ref:`DecalTexture<enum_RenderingServer_DecalTexture>` type, :ref:`RID<class_RID>` texture **)** +|void| **decal_set_texture**\ (\ decal\: :ref:`RID<class_RID>`, type\: :ref:`DecalTexture<enum_RenderingServer_DecalTexture>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_decal_set_texture>` Sets the ``texture`` in the given texture ``type`` slot for the specified decal. Equivalent to :ref:`Decal.set_texture<class_Decal_method_set_texture>`. @@ -6696,7 +7426,7 @@ Sets the ``texture`` in the given texture ``type`` slot for the specified decal. .. rst-class:: classref-method -void **decals_set_filter** **(** :ref:`DecalFilter<enum_RenderingServer_DecalFilter>` filter **)** +|void| **decals_set_filter**\ (\ filter\: :ref:`DecalFilter<enum_RenderingServer_DecalFilter>`\ ) :ref:`🔗<class_RenderingServer_method_decals_set_filter>` Sets the texture ``filter`` mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis. @@ -6708,7 +7438,7 @@ Sets the texture ``filter`` mode to use when rendering decals. This parameter is .. rst-class:: classref-method -:ref:`RID<class_RID>` **directional_light_create** **(** **)** +:ref:`RID<class_RID>` **directional_light_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_directional_light_create>` Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. @@ -6726,7 +7456,7 @@ To place in a scene, attach this directional light to an instance using :ref:`in .. rst-class:: classref-method -void **directional_shadow_atlas_set_size** **(** :ref:`int<class_int>` size, :ref:`bool<class_bool>` is_16bits **)** +|void| **directional_shadow_atlas_set_size**\ (\ size\: :ref:`int<class_int>`, is_16bits\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_directional_shadow_atlas_set_size>` Sets the ``size`` of the directional light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/directional_shadow/size<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/size>`. This parameter is global and cannot be set on a per-viewport basis. @@ -6738,7 +7468,7 @@ Sets the ``size`` of the directional light shadows in 3D. See also :ref:`Project .. rst-class:: classref-method -void **directional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>` quality **)** +|void| **directional_soft_shadow_filter_set_quality**\ (\ quality\: :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>`\ ) :ref:`🔗<class_RenderingServer_method_directional_soft_shadow_filter_set_quality>` Sets the filter ``quality`` for directional light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality<class_ProjectSettings_property_rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality>`. This parameter is global and cannot be set on a per-viewport basis. @@ -6750,7 +7480,7 @@ Sets the filter ``quality`` for directional light shadows in 3D. See also :ref:` .. rst-class:: classref-method -:ref:`Image<class_Image>` **environment_bake_panorama** **(** :ref:`RID<class_RID>` environment, :ref:`bool<class_bool>` bake_irradiance, :ref:`Vector2i<class_Vector2i>` size **)** +:ref:`Image<class_Image>` **environment_bake_panorama**\ (\ environment\: :ref:`RID<class_RID>`, bake_irradiance\: :ref:`bool<class_bool>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_RenderingServer_method_environment_bake_panorama>` Generates and returns an :ref:`Image<class_Image>` containing the radiance map for the specified ``environment`` RID's sky. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`sky_bake_panorama<class_RenderingServer_method_sky_bake_panorama>`. @@ -6766,7 +7496,7 @@ Generates and returns an :ref:`Image<class_Image>` containing the radiance map f .. rst-class:: classref-method -:ref:`RID<class_RID>` **environment_create** **(** **)** +:ref:`RID<class_RID>` **environment_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_environment_create>` Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``environment_*`` RenderingServer functions. @@ -6782,7 +7512,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **environment_glow_set_use_bicubic_upscale** **(** :ref:`bool<class_bool>` enable **)** +|void| **environment_glow_set_use_bicubic_upscale**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_environment_glow_set_use_bicubic_upscale>` If ``enable`` is ``true``, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to :ref:`ProjectSettings.rendering/environment/glow/upscale_mode<class_ProjectSettings_property_rendering/environment/glow/upscale_mode>`. @@ -6794,7 +7524,7 @@ If ``enable`` is ``true``, enables bicubic upscaling for glow which improves qua .. rst-class:: classref-method -void **environment_set_adjustment** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` brightness, :ref:`float<class_float>` contrast, :ref:`float<class_float>` saturation, :ref:`bool<class_bool>` use_1d_color_correction, :ref:`RID<class_RID>` color_correction **)** +|void| **environment_set_adjustment**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, brightness\: :ref:`float<class_float>`, contrast\: :ref:`float<class_float>`, saturation\: :ref:`float<class_float>`, use_1d_color_correction\: :ref:`bool<class_bool>`, color_correction\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_adjustment>` Sets the values to be used with the "adjustments" post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -6806,7 +7536,7 @@ Sets the values to be used with the "adjustments" post-process effect. See :ref: .. rst-class:: classref-method -void **environment_set_ambient_light** **(** :ref:`RID<class_RID>` env, :ref:`Color<class_Color>` color, :ref:`EnvironmentAmbientSource<enum_RenderingServer_EnvironmentAmbientSource>` ambient=0, :ref:`float<class_float>` energy=1.0, :ref:`float<class_float>` sky_contibution=0.0, :ref:`EnvironmentReflectionSource<enum_RenderingServer_EnvironmentReflectionSource>` reflection_source=0 **)** +|void| **environment_set_ambient_light**\ (\ env\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`, ambient\: :ref:`EnvironmentAmbientSource<enum_RenderingServer_EnvironmentAmbientSource>` = 0, energy\: :ref:`float<class_float>` = 1.0, sky_contibution\: :ref:`float<class_float>` = 0.0, reflection_source\: :ref:`EnvironmentReflectionSource<enum_RenderingServer_EnvironmentReflectionSource>` = 0\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ambient_light>` Sets the values to be used for ambient light rendering. See :ref:`Environment<class_Environment>` for more details. @@ -6818,7 +7548,7 @@ Sets the values to be used for ambient light rendering. See :ref:`Environment<cl .. rst-class:: classref-method -void **environment_set_background** **(** :ref:`RID<class_RID>` env, :ref:`EnvironmentBG<enum_RenderingServer_EnvironmentBG>` bg **)** +|void| **environment_set_background**\ (\ env\: :ref:`RID<class_RID>`, bg\: :ref:`EnvironmentBG<enum_RenderingServer_EnvironmentBG>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_background>` Sets the environment's background mode. Equivalent to :ref:`Environment.background_mode<class_Environment_property_background_mode>`. @@ -6830,7 +7560,7 @@ Sets the environment's background mode. Equivalent to :ref:`Environment.backgrou .. rst-class:: classref-method -void **environment_set_bg_color** **(** :ref:`RID<class_RID>` env, :ref:`Color<class_Color>` color **)** +|void| **environment_set_bg_color**\ (\ env\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_bg_color>` Color displayed for clear areas of the scene. Only effective if using the :ref:`ENV_BG_COLOR<class_RenderingServer_constant_ENV_BG_COLOR>` background mode. @@ -6842,7 +7572,7 @@ Color displayed for clear areas of the scene. Only effective if using the :ref:` .. rst-class:: classref-method -void **environment_set_bg_energy** **(** :ref:`RID<class_RID>` env, :ref:`float<class_float>` multiplier, :ref:`float<class_float>` exposure_value **)** +|void| **environment_set_bg_energy**\ (\ env\: :ref:`RID<class_RID>`, multiplier\: :ref:`float<class_float>`, exposure_value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_bg_energy>` Sets the intensity of the background color. @@ -6854,7 +7584,7 @@ Sets the intensity of the background color. .. rst-class:: classref-method -void **environment_set_canvas_max_layer** **(** :ref:`RID<class_RID>` env, :ref:`int<class_int>` max_layer **)** +|void| **environment_set_canvas_max_layer**\ (\ env\: :ref:`RID<class_RID>`, max_layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_canvas_max_layer>` Sets the maximum layer to use if using Canvas background mode. @@ -6866,7 +7596,7 @@ Sets the maximum layer to use if using Canvas background mode. .. rst-class:: classref-method -void **environment_set_fog** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`Color<class_Color>` light_color, :ref:`float<class_float>` light_energy, :ref:`float<class_float>` sun_scatter, :ref:`float<class_float>` density, :ref:`float<class_float>` height, :ref:`float<class_float>` height_density, :ref:`float<class_float>` aerial_perspective, :ref:`float<class_float>` sky_affect **)** +|void| **environment_set_fog**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, light_color\: :ref:`Color<class_Color>`, light_energy\: :ref:`float<class_float>`, sun_scatter\: :ref:`float<class_float>`, density\: :ref:`float<class_float>`, height\: :ref:`float<class_float>`, height_density\: :ref:`float<class_float>`, aerial_perspective\: :ref:`float<class_float>`, sky_affect\: :ref:`float<class_float>`, fog_mode\: :ref:`EnvironmentFogMode<enum_RenderingServer_EnvironmentFogMode>` = 0\ ) :ref:`🔗<class_RenderingServer_method_environment_set_fog>` Configures fog for the specified environment RID. See ``fog_*`` properties in :ref:`Environment<class_Environment>` for more information. @@ -6878,7 +7608,7 @@ Configures fog for the specified environment RID. See ``fog_*`` properties in :r .. rst-class:: classref-method -void **environment_set_glow** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`PackedFloat32Array<class_PackedFloat32Array>` levels, :ref:`float<class_float>` intensity, :ref:`float<class_float>` strength, :ref:`float<class_float>` mix, :ref:`float<class_float>` bloom_threshold, :ref:`EnvironmentGlowBlendMode<enum_RenderingServer_EnvironmentGlowBlendMode>` blend_mode, :ref:`float<class_float>` hdr_bleed_threshold, :ref:`float<class_float>` hdr_bleed_scale, :ref:`float<class_float>` hdr_luminance_cap, :ref:`float<class_float>` glow_map_strength, :ref:`RID<class_RID>` glow_map **)** +|void| **environment_set_glow**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, levels\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, intensity\: :ref:`float<class_float>`, strength\: :ref:`float<class_float>`, mix\: :ref:`float<class_float>`, bloom_threshold\: :ref:`float<class_float>`, blend_mode\: :ref:`EnvironmentGlowBlendMode<enum_RenderingServer_EnvironmentGlowBlendMode>`, hdr_bleed_threshold\: :ref:`float<class_float>`, hdr_bleed_scale\: :ref:`float<class_float>`, hdr_luminance_cap\: :ref:`float<class_float>`, glow_map_strength\: :ref:`float<class_float>`, glow_map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_glow>` Configures glow for the specified environment RID. See ``glow_*`` properties in :ref:`Environment<class_Environment>` for more information. @@ -6890,7 +7620,7 @@ Configures glow for the specified environment RID. See ``glow_*`` properties in .. rst-class:: classref-method -void **environment_set_sdfgi** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`int<class_int>` cascades, :ref:`float<class_float>` min_cell_size, :ref:`EnvironmentSDFGIYScale<enum_RenderingServer_EnvironmentSDFGIYScale>` y_scale, :ref:`bool<class_bool>` use_occlusion, :ref:`float<class_float>` bounce_feedback, :ref:`bool<class_bool>` read_sky, :ref:`float<class_float>` energy, :ref:`float<class_float>` normal_bias, :ref:`float<class_float>` probe_bias **)** +|void| **environment_set_sdfgi**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, cascades\: :ref:`int<class_int>`, min_cell_size\: :ref:`float<class_float>`, y_scale\: :ref:`EnvironmentSDFGIYScale<enum_RenderingServer_EnvironmentSDFGIYScale>`, use_occlusion\: :ref:`bool<class_bool>`, bounce_feedback\: :ref:`float<class_float>`, read_sky\: :ref:`bool<class_bool>`, energy\: :ref:`float<class_float>`, normal_bias\: :ref:`float<class_float>`, probe_bias\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sdfgi>` Configures signed distance field global illumination for the specified environment RID. See ``sdfgi_*`` properties in :ref:`Environment<class_Environment>` for more information. @@ -6902,7 +7632,7 @@ Configures signed distance field global illumination for the specified environme .. rst-class:: classref-method -void **environment_set_sdfgi_frames_to_converge** **(** :ref:`EnvironmentSDFGIFramesToConverge<enum_RenderingServer_EnvironmentSDFGIFramesToConverge>` frames **)** +|void| **environment_set_sdfgi_frames_to_converge**\ (\ frames\: :ref:`EnvironmentSDFGIFramesToConverge<enum_RenderingServer_EnvironmentSDFGIFramesToConverge>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sdfgi_frames_to_converge>` Sets the number of frames to use for converging signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_converge>`. @@ -6914,7 +7644,7 @@ Sets the number of frames to use for converging signed distance field global ill .. rst-class:: classref-method -void **environment_set_sdfgi_frames_to_update_light** **(** :ref:`EnvironmentSDFGIFramesToUpdateLight<enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight>` frames **)** +|void| **environment_set_sdfgi_frames_to_update_light**\ (\ frames\: :ref:`EnvironmentSDFGIFramesToUpdateLight<enum_RenderingServer_EnvironmentSDFGIFramesToUpdateLight>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sdfgi_frames_to_update_light>` Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights<class_ProjectSettings_property_rendering/global_illumination/sdfgi/frames_to_update_lights>`. @@ -6926,7 +7656,7 @@ Sets the update speed for dynamic lights' indirect lighting when computing signe .. rst-class:: classref-method -void **environment_set_sdfgi_ray_count** **(** :ref:`EnvironmentSDFGIRayCount<enum_RenderingServer_EnvironmentSDFGIRayCount>` ray_count **)** +|void| **environment_set_sdfgi_ray_count**\ (\ ray_count\: :ref:`EnvironmentSDFGIRayCount<enum_RenderingServer_EnvironmentSDFGIRayCount>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sdfgi_ray_count>` Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count<class_ProjectSettings_property_rendering/global_illumination/sdfgi/probe_ray_count>`. @@ -6938,7 +7668,7 @@ Sets the number of rays to throw per frame when computing signed distance field .. rst-class:: classref-method -void **environment_set_sky** **(** :ref:`RID<class_RID>` env, :ref:`RID<class_RID>` sky **)** +|void| **environment_set_sky**\ (\ env\: :ref:`RID<class_RID>`, sky\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sky>` Sets the :ref:`Sky<class_Sky>` to be used as the environment's background when using *BGMode* sky. Equivalent to :ref:`Environment.sky<class_Environment_property_sky>`. @@ -6950,7 +7680,7 @@ Sets the :ref:`Sky<class_Sky>` to be used as the environment's background when u .. rst-class:: classref-method -void **environment_set_sky_custom_fov** **(** :ref:`RID<class_RID>` env, :ref:`float<class_float>` scale **)** +|void| **environment_set_sky_custom_fov**\ (\ env\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sky_custom_fov>` Sets a custom field of view for the background :ref:`Sky<class_Sky>`. Equivalent to :ref:`Environment.sky_custom_fov<class_Environment_property_sky_custom_fov>`. @@ -6962,7 +7692,7 @@ Sets a custom field of view for the background :ref:`Sky<class_Sky>`. Equivalent .. rst-class:: classref-method -void **environment_set_sky_orientation** **(** :ref:`RID<class_RID>` env, :ref:`Basis<class_Basis>` orientation **)** +|void| **environment_set_sky_orientation**\ (\ env\: :ref:`RID<class_RID>`, orientation\: :ref:`Basis<class_Basis>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_sky_orientation>` Sets the rotation of the background :ref:`Sky<class_Sky>` expressed as a :ref:`Basis<class_Basis>`. Equivalent to :ref:`Environment.sky_rotation<class_Environment_property_sky_rotation>`, where the rotation vector is used to construct the :ref:`Basis<class_Basis>`. @@ -6974,7 +7704,7 @@ Sets the rotation of the background :ref:`Sky<class_Sky>` expressed as a :ref:`B .. rst-class:: classref-method -void **environment_set_ssao** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` radius, :ref:`float<class_float>` intensity, :ref:`float<class_float>` power, :ref:`float<class_float>` detail, :ref:`float<class_float>` horizon, :ref:`float<class_float>` sharpness, :ref:`float<class_float>` light_affect, :ref:`float<class_float>` ao_channel_affect **)** +|void| **environment_set_ssao**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, radius\: :ref:`float<class_float>`, intensity\: :ref:`float<class_float>`, power\: :ref:`float<class_float>`, detail\: :ref:`float<class_float>`, horizon\: :ref:`float<class_float>`, sharpness\: :ref:`float<class_float>`, light_affect\: :ref:`float<class_float>`, ao_channel_affect\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ssao>` Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -6986,7 +7716,7 @@ Sets the variables to be used with the screen-space ambient occlusion (SSAO) pos .. rst-class:: classref-method -void **environment_set_ssao_quality** **(** :ref:`EnvironmentSSAOQuality<enum_RenderingServer_EnvironmentSSAOQuality>` quality, :ref:`bool<class_bool>` half_size, :ref:`float<class_float>` adaptive_target, :ref:`int<class_int>` blur_passes, :ref:`float<class_float>` fadeout_from, :ref:`float<class_float>` fadeout_to **)** +|void| **environment_set_ssao_quality**\ (\ quality\: :ref:`EnvironmentSSAOQuality<enum_RenderingServer_EnvironmentSSAOQuality>`, half_size\: :ref:`bool<class_bool>`, adaptive_target\: :ref:`float<class_float>`, blur_passes\: :ref:`int<class_int>`, fadeout_from\: :ref:`float<class_float>`, fadeout_to\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ssao_quality>` Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -6998,7 +7728,7 @@ Sets the quality level of the screen-space ambient occlusion (SSAO) post-process .. rst-class:: classref-method -void **environment_set_ssil_quality** **(** :ref:`EnvironmentSSILQuality<enum_RenderingServer_EnvironmentSSILQuality>` quality, :ref:`bool<class_bool>` half_size, :ref:`float<class_float>` adaptive_target, :ref:`int<class_int>` blur_passes, :ref:`float<class_float>` fadeout_from, :ref:`float<class_float>` fadeout_to **)** +|void| **environment_set_ssil_quality**\ (\ quality\: :ref:`EnvironmentSSILQuality<enum_RenderingServer_EnvironmentSSILQuality>`, half_size\: :ref:`bool<class_bool>`, adaptive_target\: :ref:`float<class_float>`, blur_passes\: :ref:`int<class_int>`, fadeout_from\: :ref:`float<class_float>`, fadeout_to\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ssil_quality>` Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -7010,7 +7740,7 @@ Sets the quality level of the screen-space indirect lighting (SSIL) post-process .. rst-class:: classref-method -void **environment_set_ssr** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`int<class_int>` max_steps, :ref:`float<class_float>` fade_in, :ref:`float<class_float>` fade_out, :ref:`float<class_float>` depth_tolerance **)** +|void| **environment_set_ssr**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, max_steps\: :ref:`int<class_int>`, fade_in\: :ref:`float<class_float>`, fade_out\: :ref:`float<class_float>`, depth_tolerance\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ssr>` Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -7022,7 +7752,7 @@ Sets the variables to be used with the screen-space reflections (SSR) post-proce .. rst-class:: classref-method -void **environment_set_ssr_roughness_quality** **(** :ref:`EnvironmentSSRRoughnessQuality<enum_RenderingServer_EnvironmentSSRRoughnessQuality>` quality **)** +|void| **environment_set_ssr_roughness_quality**\ (\ quality\: :ref:`EnvironmentSSRRoughnessQuality<enum_RenderingServer_EnvironmentSSRRoughnessQuality>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_ssr_roughness_quality>` .. container:: contribute @@ -7036,7 +7766,7 @@ void **environment_set_ssr_roughness_quality** **(** :ref:`EnvironmentSSRRoughne .. rst-class:: classref-method -void **environment_set_tonemap** **(** :ref:`RID<class_RID>` env, :ref:`EnvironmentToneMapper<enum_RenderingServer_EnvironmentToneMapper>` tone_mapper, :ref:`float<class_float>` exposure, :ref:`float<class_float>` white **)** +|void| **environment_set_tonemap**\ (\ env\: :ref:`RID<class_RID>`, tone_mapper\: :ref:`EnvironmentToneMapper<enum_RenderingServer_EnvironmentToneMapper>`, exposure\: :ref:`float<class_float>`, white\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_tonemap>` Sets the variables to be used with the "tonemap" post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -7048,7 +7778,7 @@ Sets the variables to be used with the "tonemap" post-process effect. See :ref:` .. rst-class:: classref-method -void **environment_set_volumetric_fog** **(** :ref:`RID<class_RID>` env, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` density, :ref:`Color<class_Color>` albedo, :ref:`Color<class_Color>` emission, :ref:`float<class_float>` emission_energy, :ref:`float<class_float>` anisotropy, :ref:`float<class_float>` length, :ref:`float<class_float>` p_detail_spread, :ref:`float<class_float>` gi_inject, :ref:`bool<class_bool>` temporal_reprojection, :ref:`float<class_float>` temporal_reprojection_amount, :ref:`float<class_float>` ambient_inject, :ref:`float<class_float>` sky_affect **)** +|void| **environment_set_volumetric_fog**\ (\ env\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, density\: :ref:`float<class_float>`, albedo\: :ref:`Color<class_Color>`, emission\: :ref:`Color<class_Color>`, emission_energy\: :ref:`float<class_float>`, anisotropy\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`, p_detail_spread\: :ref:`float<class_float>`, gi_inject\: :ref:`float<class_float>`, temporal_reprojection\: :ref:`bool<class_bool>`, temporal_reprojection_amount\: :ref:`float<class_float>`, ambient_inject\: :ref:`float<class_float>`, sky_affect\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_volumetric_fog>` Sets the variables to be used with the volumetric fog post-process effect. See :ref:`Environment<class_Environment>` for more details. @@ -7060,7 +7790,7 @@ Sets the variables to be used with the volumetric fog post-process effect. See : .. rst-class:: classref-method -void **environment_set_volumetric_fog_filter_active** **(** :ref:`bool<class_bool>` active **)** +|void| **environment_set_volumetric_fog_filter_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_volumetric_fog_filter_active>` Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts. @@ -7072,7 +7802,7 @@ Enables filtering of the volumetric fog scattering buffer. This results in much .. rst-class:: classref-method -void **environment_set_volumetric_fog_volume_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` depth **)** +|void| **environment_set_volumetric_fog_volume_size**\ (\ size\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_environment_set_volumetric_fog_volume_size>` Sets the resolution of the volumetric fog's froxel buffer. ``size`` is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While ``depth`` is directly used to set the depth of the buffer. @@ -7084,7 +7814,7 @@ Sets the resolution of the volumetric fog's froxel buffer. ``size`` is modified .. rst-class:: classref-method -:ref:`RID<class_RID>` **fog_volume_create** **(** **)** +:ref:`RID<class_RID>` **fog_volume_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_fog_volume_create>` Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``fog_volume_*`` RenderingServer functions. @@ -7100,7 +7830,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **fog_volume_set_material** **(** :ref:`RID<class_RID>` fog_volume, :ref:`RID<class_RID>` material **)** +|void| **fog_volume_set_material**\ (\ fog_volume\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_fog_volume_set_material>` Sets the :ref:`Material<class_Material>` of the fog volume. Can be either a :ref:`FogMaterial<class_FogMaterial>` or a custom :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -7112,7 +7842,7 @@ Sets the :ref:`Material<class_Material>` of the fog volume. Can be either a :ref .. rst-class:: classref-method -void **fog_volume_set_shape** **(** :ref:`RID<class_RID>` fog_volume, :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` shape **)** +|void| **fog_volume_set_shape**\ (\ fog_volume\: :ref:`RID<class_RID>`, shape\: :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>`\ ) :ref:`🔗<class_RenderingServer_method_fog_volume_set_shape>` Sets the shape of the fog volume to either :ref:`FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>`, :ref:`FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>` or :ref:`FOG_VOLUME_SHAPE_WORLD<class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD>`. @@ -7124,7 +7854,7 @@ Sets the shape of the fog volume to either :ref:`FOG_VOLUME_SHAPE_ELLIPSOID<clas .. rst-class:: classref-method -void **fog_volume_set_size** **(** :ref:`RID<class_RID>` fog_volume, :ref:`Vector3<class_Vector3>` size **)** +|void| **fog_volume_set_size**\ (\ fog_volume\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_fog_volume_set_size>` Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>` or :ref:`FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>`. @@ -7136,9 +7866,9 @@ Sets the size of the fog volume when shape is :ref:`FOG_VOLUME_SHAPE_ELLIPSOID<c .. rst-class:: classref-method -void **force_draw** **(** :ref:`bool<class_bool>` swap_buffers=true, :ref:`float<class_float>` frame_step=0.0 **)** +|void| **force_draw**\ (\ swap_buffers\: :ref:`bool<class_bool>` = true, frame_step\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_RenderingServer_method_force_draw>` -Forces redrawing of all viewports at once. +Forces redrawing of all viewports at once. Must be called from the main thread. .. rst-class:: classref-item-separator @@ -7148,7 +7878,7 @@ Forces redrawing of all viewports at once. .. rst-class:: classref-method -void **force_sync** **(** **)** +|void| **force_sync**\ (\ ) :ref:`🔗<class_RenderingServer_method_force_sync>` Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. @@ -7160,9 +7890,9 @@ Forces a synchronization between the CPU and GPU, which may be required in certa .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_free_rid>` -Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RendeeringServer directly. +Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly. .. rst-class:: classref-item-separator @@ -7172,7 +7902,7 @@ Tries to free an object in the RenderingServer. To avoid memory leaks, this shou .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_default_clear_color** **(** **)** +:ref:`Color<class_Color>` **get_default_clear_color**\ (\ ) :ref:`🔗<class_RenderingServer_method_get_default_clear_color>` Returns the default clear color which is used when a specific clear color has not been selected. See also :ref:`set_default_clear_color<class_RenderingServer_method_set_default_clear_color>`. @@ -7184,7 +7914,7 @@ Returns the default clear color which is used when a specific clear color has no .. rst-class:: classref-method -:ref:`float<class_float>` **get_frame_setup_time_cpu** **(** **)** |const| +:ref:`float<class_float>` **get_frame_setup_time_cpu**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_frame_setup_time_cpu>` Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does *not* require :ref:`viewport_set_measure_render_time<class_RenderingServer_method_viewport_set_measure_render_time>` to be enabled on a viewport to be queried. See also :ref:`viewport_get_measured_render_time_cpu<class_RenderingServer_method_viewport_get_measured_render_time_cpu>`. @@ -7196,7 +7926,7 @@ Returns the time taken to setup rendering on the CPU in milliseconds. This value .. rst-class:: classref-method -:ref:`RenderingDevice<class_RenderingDevice>` **get_rendering_device** **(** **)** |const| +:ref:`RenderingDevice<class_RenderingDevice>` **get_rendering_device**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_rendering_device>` Returns the global RenderingDevice. @@ -7210,7 +7940,7 @@ Returns the global RenderingDevice. .. rst-class:: classref-method -:ref:`int<class_int>` **get_rendering_info** **(** :ref:`RenderingInfo<enum_RenderingServer_RenderingInfo>` info **)** +:ref:`int<class_int>` **get_rendering_info**\ (\ info\: :ref:`RenderingInfo<enum_RenderingServer_RenderingInfo>`\ ) :ref:`🔗<class_RenderingServer_method_get_rendering_info>` Returns a statistic about the rendering engine which can be used for performance profiling. See :ref:`RenderingInfo<enum_RenderingServer_RenderingInfo>` for a list of values that can be queried. See also :ref:`viewport_get_render_info<class_RenderingServer_method_viewport_get_render_info>`, which returns information specific to a viewport. @@ -7234,7 +7964,7 @@ Returns a statistic about the rendering engine which can be used for performance .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_shader_parameter_list** **(** :ref:`RID<class_RID>` shader **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_shader_parameter_list**\ (\ shader\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_get_shader_parameter_list>` Returns the parameters of a shader. @@ -7246,7 +7976,7 @@ Returns the parameters of a shader. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_test_cube** **(** **)** +:ref:`RID<class_RID>` **get_test_cube**\ (\ ) :ref:`🔗<class_RenderingServer_method_get_test_cube>` Returns the RID of the test cube. This mesh will be created and returned on the first call to :ref:`get_test_cube<class_RenderingServer_method_get_test_cube>`, then it will be cached for subsequent calls. See also :ref:`make_sphere_mesh<class_RenderingServer_method_make_sphere_mesh>`. @@ -7258,7 +7988,7 @@ Returns the RID of the test cube. This mesh will be created and returned on the .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_test_texture** **(** **)** +:ref:`RID<class_RID>` **get_test_texture**\ (\ ) :ref:`🔗<class_RenderingServer_method_get_test_texture>` Returns the RID of a 256×256 texture with a testing pattern on it (in :ref:`Image.FORMAT_RGB8<class_Image_constant_FORMAT_RGB8>` format). This texture will be created and returned on the first call to :ref:`get_test_texture<class_RenderingServer_method_get_test_texture>`, then it will be cached for subsequent calls. See also :ref:`get_white_texture<class_RenderingServer_method_get_white_texture>`. @@ -7278,7 +8008,7 @@ Example of getting the test texture and applying it to a :ref:`Sprite2D<class_Sp .. rst-class:: classref-method -:ref:`String<class_String>` **get_video_adapter_api_version** **(** **)** |const| +:ref:`String<class_String>` **get_video_adapter_api_version**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_video_adapter_api_version>` Returns the version of the graphics video adapter *currently in use* (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also :ref:`OS.get_video_adapter_driver_info<class_OS_method_get_video_adapter_driver_info>`. @@ -7292,12 +8022,14 @@ Returns the version of the graphics video adapter *currently in use* (e.g. "1.2. .. rst-class:: classref-method -:ref:`String<class_String>` **get_video_adapter_name** **(** **)** |const| +:ref:`String<class_String>` **get_video_adapter_name**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_video_adapter_name>` Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). \ **Note:** When running a headless or server binary, this function returns an empty string. +\ **Note:** On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult. + .. rst-class:: classref-item-separator ---- @@ -7306,7 +8038,7 @@ Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). .. rst-class:: classref-method -:ref:`DeviceType<enum_RenderingDevice_DeviceType>` **get_video_adapter_type** **(** **)** |const| +:ref:`DeviceType<enum_RenderingDevice_DeviceType>` **get_video_adapter_type**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_video_adapter_type>` Returns the type of the video adapter. Since dedicated graphics cards from a given generation will *usually* be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. @@ -7320,7 +8052,7 @@ Returns the type of the video adapter. Since dedicated graphics cards from a giv .. rst-class:: classref-method -:ref:`String<class_String>` **get_video_adapter_vendor** **(** **)** |const| +:ref:`String<class_String>` **get_video_adapter_vendor**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_get_video_adapter_vendor>` Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). @@ -7334,7 +8066,7 @@ Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_white_texture** **(** **)** +:ref:`RID<class_RID>` **get_white_texture**\ (\ ) :ref:`🔗<class_RenderingServer_method_get_white_texture>` Returns the ID of a 4×4 white texture (in :ref:`Image.FORMAT_RGB8<class_Image_constant_FORMAT_RGB8>` format). This texture will be created and returned on the first call to :ref:`get_white_texture<class_RenderingServer_method_get_white_texture>`, then it will be cached for subsequent calls. See also :ref:`get_test_texture<class_RenderingServer_method_get_test_texture>`. @@ -7354,7 +8086,7 @@ Example of getting the white texture and applying it to a :ref:`Sprite2D<class_S .. rst-class:: classref-method -void **gi_set_use_half_resolution** **(** :ref:`bool<class_bool>` half_resolution **)** +|void| **gi_set_use_half_resolution**\ (\ half_resolution\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_gi_set_use_half_resolution>` If ``half_resolution`` is ``true``, renders :ref:`VoxelGI<class_VoxelGI>` and SDFGI (:ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>`) buffers at halved resolution on each axis (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. :ref:`LightmapGI<class_LightmapGI>` rendering is not affected by this setting. Equivalent to :ref:`ProjectSettings.rendering/global_illumination/gi/use_half_resolution<class_ProjectSettings_property_rendering/global_illumination/gi/use_half_resolution>`. @@ -7366,7 +8098,7 @@ If ``half_resolution`` is ``true``, renders :ref:`VoxelGI<class_VoxelGI>` and SD .. rst-class:: classref-method -void **global_shader_parameter_add** **(** :ref:`StringName<class_StringName>` name, :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` type, :ref:`Variant<class_Variant>` default_value **)** +|void| **global_shader_parameter_add**\ (\ name\: :ref:`StringName<class_StringName>`, type\: :ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>`, default_value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RenderingServer_method_global_shader_parameter_add>` Creates a new global shader uniform. @@ -7380,7 +8112,7 @@ Creates a new global shader uniform. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **global_shader_parameter_get** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **global_shader_parameter_get**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_global_shader_parameter_get>` Returns the value of the global shader uniform specified by ``name``. @@ -7394,7 +8126,7 @@ Returns the value of the global shader uniform specified by ``name``. .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **global_shader_parameter_get_list** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **global_shader_parameter_get_list**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_global_shader_parameter_get_list>` Returns the list of global shader uniform names. @@ -7408,7 +8140,7 @@ Returns the list of global shader uniform names. .. rst-class:: classref-method -:ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` **global_shader_parameter_get_type** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`GlobalShaderParameterType<enum_RenderingServer_GlobalShaderParameterType>` **global_shader_parameter_get_type**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_global_shader_parameter_get_type>` Returns the type associated to the global shader uniform specified by ``name``. @@ -7422,7 +8154,7 @@ Returns the type associated to the global shader uniform specified by ``name``. .. rst-class:: classref-method -void **global_shader_parameter_remove** **(** :ref:`StringName<class_StringName>` name **)** +|void| **global_shader_parameter_remove**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_RenderingServer_method_global_shader_parameter_remove>` Removes the global shader uniform specified by ``name``. @@ -7434,7 +8166,7 @@ Removes the global shader uniform specified by ``name``. .. rst-class:: classref-method -void **global_shader_parameter_set** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** +|void| **global_shader_parameter_set**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RenderingServer_method_global_shader_parameter_set>` Sets the global shader uniform ``name`` to ``value``. @@ -7446,7 +8178,7 @@ Sets the global shader uniform ``name`` to ``value``. .. rst-class:: classref-method -void **global_shader_parameter_set_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** +|void| **global_shader_parameter_set_override**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RenderingServer_method_global_shader_parameter_set_override>` Overrides the global shader uniform ``name`` with ``value``. Equivalent to the :ref:`ShaderGlobalsOverride<class_ShaderGlobalsOverride>` node. @@ -7458,7 +8190,7 @@ Overrides the global shader uniform ``name`` with ``value``. Equivalent to the : .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_changed** **(** **)** |const| +:ref:`bool<class_bool>` **has_changed**\ (\ ) |const| :ref:`🔗<class_RenderingServer_method_has_changed>` Returns ``true`` if changes have been made to the RenderingServer's data. :ref:`force_draw<class_RenderingServer_method_force_draw>` is usually called if this happens. @@ -7470,9 +8202,11 @@ Returns ``true`` if changes have been made to the RenderingServer's data. :ref:` .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_feature** **(** :ref:`Features<enum_RenderingServer_Features>` feature **)** |const| +:ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Features<enum_RenderingServer_Features>`\ ) |const| :ref:`🔗<class_RenderingServer_method_has_feature>` + +**Deprecated:** This method has not been used since Godot 3.0. -Not yet implemented. Always returns ``false``. +This method does nothing and always returns ``false``. .. rst-class:: classref-item-separator @@ -7482,7 +8216,7 @@ Not yet implemented. Always returns ``false``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_os_feature** **(** :ref:`String<class_String>` feature **)** |const| +:ref:`bool<class_bool>` **has_os_feature**\ (\ feature\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_RenderingServer_method_has_os_feature>` Returns ``true`` if the OS supports a certain ``feature``. Features might be ``s3tc``, ``etc``, and ``etc2``. @@ -7494,7 +8228,7 @@ Returns ``true`` if the OS supports a certain ``feature``. Features might be ``s .. rst-class:: classref-method -void **instance_attach_object_instance_id** **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` id **)** +|void| **instance_attach_object_instance_id**\ (\ instance\: :ref:`RID<class_RID>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_instance_attach_object_instance_id>` Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with :ref:`instances_cull_aabb<class_RenderingServer_method_instances_cull_aabb>`, :ref:`instances_cull_convex<class_RenderingServer_method_instances_cull_convex>`, and :ref:`instances_cull_ray<class_RenderingServer_method_instances_cull_ray>`. @@ -7506,7 +8240,7 @@ Attaches a unique Object ID to instance. Object ID must be attached to instance .. rst-class:: classref-method -void **instance_attach_skeleton** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` skeleton **)** +|void| **instance_attach_skeleton**\ (\ instance\: :ref:`RID<class_RID>`, skeleton\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_attach_skeleton>` Attaches a skeleton to an instance. Removes the previous skeleton from the instance. @@ -7518,7 +8252,7 @@ Attaches a skeleton to an instance. Removes the previous skeleton from the insta .. rst-class:: classref-method -:ref:`RID<class_RID>` **instance_create** **(** **)** +:ref:`RID<class_RID>` **instance_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_instance_create>` Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``instance_*`` RenderingServer functions. @@ -7536,7 +8270,7 @@ An instance is a way of placing a 3D object in the scenario. Objects like partic .. rst-class:: classref-method -:ref:`RID<class_RID>` **instance_create2** **(** :ref:`RID<class_RID>` base, :ref:`RID<class_RID>` scenario **)** +:ref:`RID<class_RID>` **instance_create2**\ (\ base\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_create2>` Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all ``instance_*`` RenderingServer functions. @@ -7550,7 +8284,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **instance_geometry_get_shader_parameter** **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter **)** |const| +:ref:`Variant<class_Variant>` **instance_geometry_get_shader_parameter**\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_instance_geometry_get_shader_parameter>` Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`. @@ -7564,7 +8298,7 @@ Returns the value of the per-instance shader uniform from the specified 3D geome .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **instance_geometry_get_shader_parameter_default_value** **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter **)** |const| +:ref:`Variant<class_Variant>` **instance_geometry_get_shader_parameter_default_value**\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_instance_geometry_get_shader_parameter_default_value>` Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`. @@ -7576,7 +8310,7 @@ Returns the default value of the per-instance shader uniform from the specified .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **instance_geometry_get_shader_parameter_list** **(** :ref:`RID<class_RID>` instance **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **instance_geometry_get_shader_parameter_list**\ (\ instance\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_instance_geometry_get_shader_parameter_list>` Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys ``name``, ``class_name``, ``type``, ``hint``, ``hint_string`` and ``usage``. Equivalent to :ref:`GeometryInstance3D.get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`. @@ -7588,7 +8322,7 @@ Returns a dictionary of per-instance shader uniform names of the per-instance sh .. rst-class:: classref-method -void **instance_geometry_set_cast_shadows_setting** **(** :ref:`RID<class_RID>` instance, :ref:`ShadowCastingSetting<enum_RenderingServer_ShadowCastingSetting>` shadow_casting_setting **)** +|void| **instance_geometry_set_cast_shadows_setting**\ (\ instance\: :ref:`RID<class_RID>`, shadow_casting_setting\: :ref:`ShadowCastingSetting<enum_RenderingServer_ShadowCastingSetting>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_cast_shadows_setting>` Sets the shadow casting setting to one of :ref:`ShadowCastingSetting<enum_RenderingServer_ShadowCastingSetting>`. Equivalent to :ref:`GeometryInstance3D.cast_shadow<class_GeometryInstance3D_property_cast_shadow>`. @@ -7600,7 +8334,7 @@ Sets the shadow casting setting to one of :ref:`ShadowCastingSetting<enum_Render .. rst-class:: classref-method -void **instance_geometry_set_flag** **(** :ref:`RID<class_RID>` instance, :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **instance_geometry_set_flag**\ (\ instance\: :ref:`RID<class_RID>`, flag\: :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_flag>` Sets the flag for a given :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>`. See :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags>` for more details. @@ -7612,7 +8346,7 @@ Sets the flag for a given :ref:`InstanceFlags<enum_RenderingServer_InstanceFlags .. rst-class:: classref-method -void **instance_geometry_set_lightmap** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` lightmap, :ref:`Rect2<class_Rect2>` lightmap_uv_scale, :ref:`int<class_int>` lightmap_slice **)** +|void| **instance_geometry_set_lightmap**\ (\ instance\: :ref:`RID<class_RID>`, lightmap\: :ref:`RID<class_RID>`, lightmap_uv_scale\: :ref:`Rect2<class_Rect2>`, lightmap_slice\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_lightmap>` Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to :ref:`GeometryInstance3D.gi_lightmap_scale<class_GeometryInstance3D_property_gi_lightmap_scale>`) and lightmap atlas slice must also be specified. @@ -7624,7 +8358,7 @@ Sets the lightmap GI instance to use for the specified 3D geometry instance. The .. rst-class:: classref-method -void **instance_geometry_set_lod_bias** **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` lod_bias **)** +|void| **instance_geometry_set_lod_bias**\ (\ instance\: :ref:`RID<class_RID>`, lod_bias\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_lod_bias>` Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to :ref:`GeometryInstance3D.lod_bias<class_GeometryInstance3D_property_lod_bias>`. @@ -7636,7 +8370,7 @@ Sets the level of detail bias to use when rendering the specified 3D geometry in .. rst-class:: classref-method -void **instance_geometry_set_material_overlay** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` material **)** +|void| **instance_geometry_set_material_overlay**\ (\ instance\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_material_overlay>` Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to :ref:`GeometryInstance3D.material_overlay<class_GeometryInstance3D_property_material_overlay>`. @@ -7648,7 +8382,7 @@ Sets a material that will be rendered for all surfaces on top of active material .. rst-class:: classref-method -void **instance_geometry_set_material_override** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` material **)** +|void| **instance_geometry_set_material_override**\ (\ instance\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_material_override>` Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to :ref:`GeometryInstance3D.material_override<class_GeometryInstance3D_property_material_override>`. @@ -7660,7 +8394,7 @@ Sets a material that will override the material for all surfaces on the mesh ass .. rst-class:: classref-method -void **instance_geometry_set_shader_parameter** **(** :ref:`RID<class_RID>` instance, :ref:`StringName<class_StringName>` parameter, :ref:`Variant<class_Variant>` value **)** +|void| **instance_geometry_set_shader_parameter**\ (\ instance\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_shader_parameter>` Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to :ref:`GeometryInstance3D.set_instance_shader_parameter<class_GeometryInstance3D_method_set_instance_shader_parameter>`. @@ -7672,7 +8406,7 @@ Sets the per-instance shader uniform on the specified 3D geometry instance. Equi .. rst-class:: classref-method -void **instance_geometry_set_transparency** **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` transparency **)** +|void| **instance_geometry_set_transparency**\ (\ instance\: :ref:`RID<class_RID>`, transparency\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_transparency>` Sets the transparency for the given geometry instance. Equivalent to :ref:`GeometryInstance3D.transparency<class_GeometryInstance3D_property_transparency>`. @@ -7690,7 +8424,7 @@ In spatial shaders, ``1.0 - transparency`` is set as the default value of the `` .. rst-class:: classref-method -void **instance_geometry_set_visibility_range** **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`float<class_float>` min_margin, :ref:`float<class_float>` max_margin, :ref:`VisibilityRangeFadeMode<enum_RenderingServer_VisibilityRangeFadeMode>` fade_mode **)** +|void| **instance_geometry_set_visibility_range**\ (\ instance\: :ref:`RID<class_RID>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, min_margin\: :ref:`float<class_float>`, max_margin\: :ref:`float<class_float>`, fade_mode\: :ref:`VisibilityRangeFadeMode<enum_RenderingServer_VisibilityRangeFadeMode>`\ ) :ref:`🔗<class_RenderingServer_method_instance_geometry_set_visibility_range>` Sets the visibility range values for the given geometry instance. Equivalent to :ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` and related properties. @@ -7702,7 +8436,7 @@ Sets the visibility range values for the given geometry instance. Equivalent to .. rst-class:: classref-method -void **instance_set_base** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` base **)** +|void| **instance_set_base**\ (\ instance\: :ref:`RID<class_RID>`, base\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_base>` Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario. @@ -7714,7 +8448,7 @@ Sets the base of the instance. A base can be any of the 3D objects that are crea .. rst-class:: classref-method -void **instance_set_blend_shape_weight** **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` shape, :ref:`float<class_float>` weight **)** +|void| **instance_set_blend_shape_weight**\ (\ instance\: :ref:`RID<class_RID>`, shape\: :ref:`int<class_int>`, weight\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_blend_shape_weight>` Sets the weight for a given blend shape associated with this instance. @@ -7726,7 +8460,7 @@ Sets the weight for a given blend shape associated with this instance. .. rst-class:: classref-method -void **instance_set_custom_aabb** **(** :ref:`RID<class_RID>` instance, :ref:`AABB<class_AABB>` aabb **)** +|void| **instance_set_custom_aabb**\ (\ instance\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_custom_aabb>` Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting :ref:`GeometryInstance3D.custom_aabb<class_GeometryInstance3D_property_custom_aabb>`. @@ -7738,7 +8472,7 @@ Sets a custom AABB to use when culling objects from the view frustum. Equivalent .. rst-class:: classref-method -void **instance_set_extra_visibility_margin** **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` margin **)** +|void| **instance_set_extra_visibility_margin**\ (\ instance\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_extra_visibility_margin>` Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to :ref:`GeometryInstance3D.extra_cull_margin<class_GeometryInstance3D_property_extra_cull_margin>`. @@ -7750,7 +8484,7 @@ Sets a margin to increase the size of the AABB when culling objects from the vie .. rst-class:: classref-method -void **instance_set_ignore_culling** **(** :ref:`RID<class_RID>` instance, :ref:`bool<class_bool>` enabled **)** +|void| **instance_set_ignore_culling**\ (\ instance\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_ignore_culling>` If ``true``, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as :ref:`GeometryInstance3D.ignore_occlusion_culling<class_GeometryInstance3D_property_ignore_occlusion_culling>`, which only ignores occlusion culling and leaves frustum culling intact. @@ -7762,7 +8496,7 @@ If ``true``, ignores both frustum and occlusion culling on the specified 3D geom .. rst-class:: classref-method -void **instance_set_layer_mask** **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` mask **)** +|void| **instance_set_layer_mask**\ (\ instance\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_layer_mask>` Sets the render layers that this instance will be drawn to. Equivalent to :ref:`VisualInstance3D.layers<class_VisualInstance3D_property_layers>`. @@ -7774,7 +8508,7 @@ Sets the render layers that this instance will be drawn to. Equivalent to :ref:` .. rst-class:: classref-method -void **instance_set_pivot_data** **(** :ref:`RID<class_RID>` instance, :ref:`float<class_float>` sorting_offset, :ref:`bool<class_bool>` use_aabb_center **)** +|void| **instance_set_pivot_data**\ (\ instance\: :ref:`RID<class_RID>`, sorting_offset\: :ref:`float<class_float>`, use_aabb_center\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_pivot_data>` Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. @@ -7786,7 +8520,7 @@ Sets the sorting offset and switches between using the bounding box or instance .. rst-class:: classref-method -void **instance_set_scenario** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` scenario **)** +|void| **instance_set_scenario**\ (\ instance\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_scenario>` Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. @@ -7798,7 +8532,7 @@ Sets the scenario that the instance is in. The scenario is the 3D world that the .. rst-class:: classref-method -void **instance_set_surface_override_material** **(** :ref:`RID<class_RID>` instance, :ref:`int<class_int>` surface, :ref:`RID<class_RID>` material **)** +|void| **instance_set_surface_override_material**\ (\ instance\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_surface_override_material>` Sets the override material of a specific surface. Equivalent to :ref:`MeshInstance3D.set_surface_override_material<class_MeshInstance3D_method_set_surface_override_material>`. @@ -7810,9 +8544,9 @@ Sets the override material of a specific surface. Equivalent to :ref:`MeshInstan .. rst-class:: classref-method -void **instance_set_transform** **(** :ref:`RID<class_RID>` instance, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **instance_set_transform**\ (\ instance\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_transform>` -Sets the world space transform of the instance. Equivalent to :ref:`Node3D.transform<class_Node3D_property_transform>`. +Sets the world space transform of the instance. Equivalent to :ref:`Node3D.global_transform<class_Node3D_property_global_transform>`. .. rst-class:: classref-item-separator @@ -7822,7 +8556,7 @@ Sets the world space transform of the instance. Equivalent to :ref:`Node3D.trans .. rst-class:: classref-method -void **instance_set_visibility_parent** **(** :ref:`RID<class_RID>` instance, :ref:`RID<class_RID>` parent **)** +|void| **instance_set_visibility_parent**\ (\ instance\: :ref:`RID<class_RID>`, parent\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_visibility_parent>` Sets the visibility parent for the given instance. Equivalent to :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>`. @@ -7834,7 +8568,7 @@ Sets the visibility parent for the given instance. Equivalent to :ref:`Node3D.vi .. rst-class:: classref-method -void **instance_set_visible** **(** :ref:`RID<class_RID>` instance, :ref:`bool<class_bool>` visible **)** +|void| **instance_set_visible**\ (\ instance\: :ref:`RID<class_RID>`, visible\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_instance_set_visible>` Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible<class_Node3D_property_visible>`. @@ -7846,7 +8580,7 @@ Sets whether an instance is drawn or not. Equivalent to :ref:`Node3D.visible<cla .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_aabb** **(** :ref:`AABB<class_AABB>` aabb, :ref:`RID<class_RID>` scenario=RID() **)** |const| +:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_aabb**\ (\ aabb\: :ref:`AABB<class_AABB>`, scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| :ref:`🔗<class_RenderingServer_method_instances_cull_aabb>` Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from :ref:`VisualInstance3D<class_VisualInstance3D>` are considered, such as :ref:`MeshInstance3D<class_MeshInstance3D>` or :ref:`DirectionalLight3D<class_DirectionalLight3D>`. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D<class_World3D>` you want to query. This forces an update for all resources queued to update. @@ -7860,7 +8594,7 @@ Returns an array of object IDs intersecting with the provided AABB. Only 3D node .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_convex** **(** :ref:`Plane[]<class_Plane>` convex, :ref:`RID<class_RID>` scenario=RID() **)** |const| +:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_convex**\ (\ convex\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\], scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| :ref:`🔗<class_RenderingServer_method_instances_cull_convex>` Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from :ref:`VisualInstance3D<class_VisualInstance3D>` are considered, such as :ref:`MeshInstance3D<class_MeshInstance3D>` or :ref:`DirectionalLight3D<class_DirectionalLight3D>`. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D<class_World3D>` you want to query. This forces an update for all resources queued to update. @@ -7874,7 +8608,7 @@ Returns an array of object IDs intersecting with the provided convex shape. Only .. rst-class:: classref-method -:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_ray** **(** :ref:`Vector3<class_Vector3>` from, :ref:`Vector3<class_Vector3>` to, :ref:`RID<class_RID>` scenario=RID() **)** |const| +:ref:`PackedInt64Array<class_PackedInt64Array>` **instances_cull_ray**\ (\ from\: :ref:`Vector3<class_Vector3>`, to\: :ref:`Vector3<class_Vector3>`, scenario\: :ref:`RID<class_RID>` = RID()\ ) |const| :ref:`🔗<class_RenderingServer_method_instances_cull_ray>` Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from :ref:`VisualInstance3D<class_VisualInstance3D>` are considered, such as :ref:`MeshInstance3D<class_MeshInstance3D>` or :ref:`DirectionalLight3D<class_DirectionalLight3D>`. Use :ref:`@GlobalScope.instance_from_id<class_@GlobalScope_method_instance_from_id>` to obtain the actual nodes. A scenario RID must be provided, which is available in the :ref:`World3D<class_World3D>` you want to query. This forces an update for all resources queued to update. @@ -7884,11 +8618,23 @@ Returns an array of object IDs intersecting with the provided 3D ray. Only 3D no ---- +.. _class_RenderingServer_method_is_on_render_thread: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_on_render_thread**\ (\ ) :ref:`🔗<class_RenderingServer_method_is_on_render_thread>` + +Returns ``true`` if our code is currently executing on the rendering thread. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_light_directional_set_blend_splits: .. rst-class:: classref-method -void **light_directional_set_blend_splits** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enable **)** +|void| **light_directional_set_blend_splits**\ (\ light\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_light_directional_set_blend_splits>` If ``true``, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to :ref:`DirectionalLight3D.directional_shadow_blend_splits<class_DirectionalLight3D_property_directional_shadow_blend_splits>`. @@ -7900,7 +8646,7 @@ If ``true``, this directional light will blend between shadow map splits resulti .. rst-class:: classref-method -void **light_directional_set_shadow_mode** **(** :ref:`RID<class_RID>` light, :ref:`LightDirectionalShadowMode<enum_RenderingServer_LightDirectionalShadowMode>` mode **)** +|void| **light_directional_set_shadow_mode**\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightDirectionalShadowMode<enum_RenderingServer_LightDirectionalShadowMode>`\ ) :ref:`🔗<class_RenderingServer_method_light_directional_set_shadow_mode>` Sets the shadow mode for this directional light. Equivalent to :ref:`DirectionalLight3D.directional_shadow_mode<class_DirectionalLight3D_property_directional_shadow_mode>`. See :ref:`LightDirectionalShadowMode<enum_RenderingServer_LightDirectionalShadowMode>` for options. @@ -7912,7 +8658,7 @@ Sets the shadow mode for this directional light. Equivalent to :ref:`Directional .. rst-class:: classref-method -void **light_directional_set_sky_mode** **(** :ref:`RID<class_RID>` light, :ref:`LightDirectionalSkyMode<enum_RenderingServer_LightDirectionalSkyMode>` mode **)** +|void| **light_directional_set_sky_mode**\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightDirectionalSkyMode<enum_RenderingServer_LightDirectionalSkyMode>`\ ) :ref:`🔗<class_RenderingServer_method_light_directional_set_sky_mode>` If ``true``, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. @@ -7924,7 +8670,7 @@ If ``true``, this light will not be used for anything except sky shaders. Use th .. rst-class:: classref-method -void **light_omni_set_shadow_mode** **(** :ref:`RID<class_RID>` light, :ref:`LightOmniShadowMode<enum_RenderingServer_LightOmniShadowMode>` mode **)** +|void| **light_omni_set_shadow_mode**\ (\ light\: :ref:`RID<class_RID>`, mode\: :ref:`LightOmniShadowMode<enum_RenderingServer_LightOmniShadowMode>`\ ) :ref:`🔗<class_RenderingServer_method_light_omni_set_shadow_mode>` Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to :ref:`OmniLight3D.omni_shadow_mode<class_OmniLight3D_property_omni_shadow_mode>`. @@ -7936,7 +8682,7 @@ Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual para .. rst-class:: classref-method -void **light_projectors_set_filter** **(** :ref:`LightProjectorFilter<enum_RenderingServer_LightProjectorFilter>` filter **)** +|void| **light_projectors_set_filter**\ (\ filter\: :ref:`LightProjectorFilter<enum_RenderingServer_LightProjectorFilter>`\ ) :ref:`🔗<class_RenderingServer_method_light_projectors_set_filter>` Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis. @@ -7948,7 +8694,7 @@ Sets the texture filter mode to use when rendering light projectors. This parame .. rst-class:: classref-method -void **light_set_bake_mode** **(** :ref:`RID<class_RID>` light, :ref:`LightBakeMode<enum_RenderingServer_LightBakeMode>` bake_mode **)** +|void| **light_set_bake_mode**\ (\ light\: :ref:`RID<class_RID>`, bake_mode\: :ref:`LightBakeMode<enum_RenderingServer_LightBakeMode>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_bake_mode>` Sets the bake mode to use for the specified 3D light. Equivalent to :ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>`. @@ -7960,7 +8706,7 @@ Sets the bake mode to use for the specified 3D light. Equivalent to :ref:`Light3 .. rst-class:: classref-method -void **light_set_color** **(** :ref:`RID<class_RID>` light, :ref:`Color<class_Color>` color **)** +|void| **light_set_color**\ (\ light\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_color>` Sets the color of the light. Equivalent to :ref:`Light3D.light_color<class_Light3D_property_light_color>`. @@ -7972,7 +8718,7 @@ Sets the color of the light. Equivalent to :ref:`Light3D.light_color<class_Light .. rst-class:: classref-method -void **light_set_cull_mask** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` mask **)** +|void| **light_set_cull_mask**\ (\ light\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_cull_mask>` Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to :ref:`Light3D.light_cull_mask<class_Light3D_property_light_cull_mask>`. @@ -7984,7 +8730,7 @@ Sets the cull mask for this 3D light. Lights only affect objects in the selected .. rst-class:: classref-method -void **light_set_distance_fade** **(** :ref:`RID<class_RID>` decal, :ref:`bool<class_bool>` enabled, :ref:`float<class_float>` begin, :ref:`float<class_float>` shadow, :ref:`float<class_float>` length **)** +|void| **light_set_distance_fade**\ (\ decal\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`, begin\: :ref:`float<class_float>`, shadow\: :ref:`float<class_float>`, length\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_distance_fade>` Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to :ref:`Light3D.distance_fade_enabled<class_Light3D_property_distance_fade_enabled>`, :ref:`Light3D.distance_fade_begin<class_Light3D_property_distance_fade_begin>`, :ref:`Light3D.distance_fade_shadow<class_Light3D_property_distance_fade_shadow>`, and :ref:`Light3D.distance_fade_length<class_Light3D_property_distance_fade_length>`. @@ -7996,7 +8742,7 @@ Sets the distance fade for this 3D light. This acts as a form of level of detail .. rst-class:: classref-method -void **light_set_max_sdfgi_cascade** **(** :ref:`RID<class_RID>` light, :ref:`int<class_int>` cascade **)** +|void| **light_set_max_sdfgi_cascade**\ (\ light\: :ref:`RID<class_RID>`, cascade\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_max_sdfgi_cascade>` Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera. @@ -8008,7 +8754,7 @@ Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rend .. rst-class:: classref-method -void **light_set_negative** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enable **)** +|void| **light_set_negative**\ (\ light\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_negative>` If ``true``, the 3D light will subtract light instead of adding light. Equivalent to :ref:`Light3D.light_negative<class_Light3D_property_light_negative>`. @@ -8020,7 +8766,7 @@ If ``true``, the 3D light will subtract light instead of adding light. Equivalen .. rst-class:: classref-method -void **light_set_param** **(** :ref:`RID<class_RID>` light, :ref:`LightParam<enum_RenderingServer_LightParam>` param, :ref:`float<class_float>` value **)** +|void| **light_set_param**\ (\ light\: :ref:`RID<class_RID>`, param\: :ref:`LightParam<enum_RenderingServer_LightParam>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_param>` Sets the specified 3D light parameter. See :ref:`LightParam<enum_RenderingServer_LightParam>` for options. Equivalent to :ref:`Light3D.set_param<class_Light3D_method_set_param>`. @@ -8032,7 +8778,7 @@ Sets the specified 3D light parameter. See :ref:`LightParam<enum_RenderingServer .. rst-class:: classref-method -void **light_set_projector** **(** :ref:`RID<class_RID>` light, :ref:`RID<class_RID>` texture **)** +|void| **light_set_projector**\ (\ light\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_projector>` Sets the projector texture to use for the specified 3D light. Equivalent to :ref:`Light3D.light_projector<class_Light3D_property_light_projector>`. @@ -8044,7 +8790,7 @@ Sets the projector texture to use for the specified 3D light. Equivalent to :ref .. rst-class:: classref-method -void **light_set_reverse_cull_face_mode** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** +|void| **light_set_reverse_cull_face_mode**\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_reverse_cull_face_mode>` If ``true``, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with :ref:`instance_geometry_set_cast_shadows_setting<class_RenderingServer_method_instance_geometry_set_cast_shadows_setting>`. Equivalent to :ref:`Light3D.shadow_reverse_cull_face<class_Light3D_property_shadow_reverse_cull_face>`. @@ -8056,7 +8802,7 @@ If ``true``, reverses the backface culling of the mesh. This can be useful when .. rst-class:: classref-method -void **light_set_shadow** **(** :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` enabled **)** +|void| **light_set_shadow**\ (\ light\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_light_set_shadow>` If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled<class_Light3D_property_shadow_enabled>`. @@ -8068,7 +8814,7 @@ If ``true``, light will cast shadows. Equivalent to :ref:`Light3D.shadow_enabled .. rst-class:: classref-method -:ref:`RID<class_RID>` **lightmap_create** **(** **)** +:ref:`RID<class_RID>` **lightmap_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_lightmap_create>` Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``lightmap_*`` RenderingServer functions. @@ -8084,7 +8830,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **lightmap_get_probe_capture_bsp_tree** **(** :ref:`RID<class_RID>` lightmap **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **lightmap_get_probe_capture_bsp_tree**\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_lightmap_get_probe_capture_bsp_tree>` .. container:: contribute @@ -8098,7 +8844,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedVector3Array<class_PackedVector3Array>` **lightmap_get_probe_capture_points** **(** :ref:`RID<class_RID>` lightmap **)** |const| +:ref:`PackedVector3Array<class_PackedVector3Array>` **lightmap_get_probe_capture_points**\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_lightmap_get_probe_capture_points>` .. container:: contribute @@ -8112,7 +8858,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedColorArray<class_PackedColorArray>` **lightmap_get_probe_capture_sh** **(** :ref:`RID<class_RID>` lightmap **)** |const| +:ref:`PackedColorArray<class_PackedColorArray>` **lightmap_get_probe_capture_sh**\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_lightmap_get_probe_capture_sh>` .. container:: contribute @@ -8126,7 +8872,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **lightmap_get_probe_capture_tetrahedra** **(** :ref:`RID<class_RID>` lightmap **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **lightmap_get_probe_capture_tetrahedra**\ (\ lightmap\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_lightmap_get_probe_capture_tetrahedra>` .. container:: contribute @@ -8140,7 +8886,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **lightmap_set_baked_exposure_normalization** **(** :ref:`RID<class_RID>` lightmap, :ref:`float<class_float>` baked_exposure **)** +|void| **lightmap_set_baked_exposure_normalization**\ (\ lightmap\: :ref:`RID<class_RID>`, baked_exposure\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_baked_exposure_normalization>` Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure<class_RenderingServer_method_camera_attributes_set_exposure>`. @@ -8152,7 +8898,7 @@ Used to inform the renderer what exposure normalization value was used while bak .. rst-class:: classref-method -void **lightmap_set_probe_bounds** **(** :ref:`RID<class_RID>` lightmap, :ref:`AABB<class_AABB>` bounds **)** +|void| **lightmap_set_probe_bounds**\ (\ lightmap\: :ref:`RID<class_RID>`, bounds\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_probe_bounds>` .. container:: contribute @@ -8166,7 +8912,7 @@ void **lightmap_set_probe_bounds** **(** :ref:`RID<class_RID>` lightmap, :ref:`A .. rst-class:: classref-method -void **lightmap_set_probe_capture_data** **(** :ref:`RID<class_RID>` lightmap, :ref:`PackedVector3Array<class_PackedVector3Array>` points, :ref:`PackedColorArray<class_PackedColorArray>` point_sh, :ref:`PackedInt32Array<class_PackedInt32Array>` tetrahedra, :ref:`PackedInt32Array<class_PackedInt32Array>` bsp_tree **)** +|void| **lightmap_set_probe_capture_data**\ (\ lightmap\: :ref:`RID<class_RID>`, points\: :ref:`PackedVector3Array<class_PackedVector3Array>`, point_sh\: :ref:`PackedColorArray<class_PackedColorArray>`, tetrahedra\: :ref:`PackedInt32Array<class_PackedInt32Array>`, bsp_tree\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_probe_capture_data>` .. container:: contribute @@ -8180,7 +8926,7 @@ void **lightmap_set_probe_capture_data** **(** :ref:`RID<class_RID>` lightmap, : .. rst-class:: classref-method -void **lightmap_set_probe_capture_update_speed** **(** :ref:`float<class_float>` speed **)** +|void| **lightmap_set_probe_capture_update_speed**\ (\ speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_probe_capture_update_speed>` .. container:: contribute @@ -8194,7 +8940,7 @@ void **lightmap_set_probe_capture_update_speed** **(** :ref:`float<class_float>` .. rst-class:: classref-method -void **lightmap_set_probe_interior** **(** :ref:`RID<class_RID>` lightmap, :ref:`bool<class_bool>` interior **)** +|void| **lightmap_set_probe_interior**\ (\ lightmap\: :ref:`RID<class_RID>`, interior\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_probe_interior>` .. container:: contribute @@ -8208,7 +8954,7 @@ void **lightmap_set_probe_interior** **(** :ref:`RID<class_RID>` lightmap, :ref: .. rst-class:: classref-method -void **lightmap_set_textures** **(** :ref:`RID<class_RID>` lightmap, :ref:`RID<class_RID>` light, :ref:`bool<class_bool>` uses_sh **)** +|void| **lightmap_set_textures**\ (\ lightmap\: :ref:`RID<class_RID>`, light\: :ref:`RID<class_RID>`, uses_sh\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_lightmap_set_textures>` Set the textures on the given ``lightmap`` GI instance to the texture array pointed to by the ``light`` RID. If the lightmap texture was baked with :ref:`LightmapGI.directional<class_LightmapGI_property_directional>` set to ``true``, then ``uses_sh`` must also be ``true``. @@ -8220,7 +8966,7 @@ Set the textures on the given ``lightmap`` GI instance to the texture array poin .. rst-class:: classref-method -:ref:`RID<class_RID>` **make_sphere_mesh** **(** :ref:`int<class_int>` latitudes, :ref:`int<class_int>` longitudes, :ref:`float<class_float>` radius **)** +:ref:`RID<class_RID>` **make_sphere_mesh**\ (\ latitudes\: :ref:`int<class_int>`, longitudes\: :ref:`int<class_int>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_make_sphere_mesh>` Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also :ref:`get_test_cube<class_RenderingServer_method_get_test_cube>`. @@ -8232,7 +8978,7 @@ Returns a mesh of a sphere with the given number of horizontal subdivisions, ver .. rst-class:: classref-method -:ref:`RID<class_RID>` **material_create** **(** **)** +:ref:`RID<class_RID>` **material_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_material_create>` Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``material_*`` RenderingServer functions. @@ -8248,7 +8994,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **material_get_param** **(** :ref:`RID<class_RID>` material, :ref:`StringName<class_StringName>` parameter **)** |const| +:ref:`Variant<class_Variant>` **material_get_param**\ (\ material\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_material_get_param>` Returns the value of a certain material's parameter. @@ -8260,7 +9006,7 @@ Returns the value of a certain material's parameter. .. rst-class:: classref-method -void **material_set_next_pass** **(** :ref:`RID<class_RID>` material, :ref:`RID<class_RID>` next_material **)** +|void| **material_set_next_pass**\ (\ material\: :ref:`RID<class_RID>`, next_material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_material_set_next_pass>` Sets an object's next material. @@ -8272,7 +9018,7 @@ Sets an object's next material. .. rst-class:: classref-method -void **material_set_param** **(** :ref:`RID<class_RID>` material, :ref:`StringName<class_StringName>` parameter, :ref:`Variant<class_Variant>` value **)** +|void| **material_set_param**\ (\ material\: :ref:`RID<class_RID>`, parameter\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RenderingServer_method_material_set_param>` Sets a material's parameter. @@ -8284,7 +9030,7 @@ Sets a material's parameter. .. rst-class:: classref-method -void **material_set_render_priority** **(** :ref:`RID<class_RID>` material, :ref:`int<class_int>` priority **)** +|void| **material_set_render_priority**\ (\ material\: :ref:`RID<class_RID>`, priority\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_material_set_render_priority>` Sets a material's render priority. @@ -8296,7 +9042,7 @@ Sets a material's render priority. .. rst-class:: classref-method -void **material_set_shader** **(** :ref:`RID<class_RID>` shader_material, :ref:`RID<class_RID>` shader **)** +|void| **material_set_shader**\ (\ shader_material\: :ref:`RID<class_RID>`, shader\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_material_set_shader>` Sets a shader material's shader. @@ -8308,7 +9054,7 @@ Sets a shader material's shader. .. rst-class:: classref-method -void **mesh_add_surface** **(** :ref:`RID<class_RID>` mesh, :ref:`Dictionary<class_Dictionary>` surface **)** +|void| **mesh_add_surface**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_add_surface>` .. container:: contribute @@ -8322,7 +9068,7 @@ void **mesh_add_surface** **(** :ref:`RID<class_RID>` mesh, :ref:`Dictionary<cla .. rst-class:: classref-method -void **mesh_add_surface_from_arrays** **(** :ref:`RID<class_RID>` mesh, :ref:`PrimitiveType<enum_RenderingServer_PrimitiveType>` primitive, :ref:`Array<class_Array>` arrays, :ref:`Array<class_Array>` blend_shapes=[], :ref:`Dictionary<class_Dictionary>` lods={}, |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> compress_format=0 **)** +|void| **mesh_add_surface_from_arrays**\ (\ mesh\: :ref:`RID<class_RID>`, primitive\: :ref:`PrimitiveType<enum_RenderingServer_PrimitiveType>`, arrays\: :ref:`Array<class_Array>`, blend_shapes\: :ref:`Array<class_Array>` = [], lods\: :ref:`Dictionary<class_Dictionary>` = {}, compress_format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\] = 0\ ) :ref:`🔗<class_RenderingServer_method_mesh_add_surface_from_arrays>` .. container:: contribute @@ -8336,7 +9082,7 @@ void **mesh_add_surface_from_arrays** **(** :ref:`RID<class_RID>` mesh, :ref:`Pr .. rst-class:: classref-method -void **mesh_clear** **(** :ref:`RID<class_RID>` mesh **)** +|void| **mesh_clear**\ (\ mesh\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_clear>` Removes all surfaces from a mesh. @@ -8348,7 +9094,7 @@ Removes all surfaces from a mesh. .. rst-class:: classref-method -:ref:`RID<class_RID>` **mesh_create** **(** **)** +:ref:`RID<class_RID>` **mesh_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_mesh_create>` Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``mesh_*`` RenderingServer functions. @@ -8366,7 +9112,7 @@ To place in a scene, attach this mesh to an instance using :ref:`instance_set_ba .. rst-class:: classref-method -:ref:`RID<class_RID>` **mesh_create_from_surfaces** **(** :ref:`Dictionary[]<class_Dictionary>` surfaces, :ref:`int<class_int>` blend_shape_count=0 **)** +:ref:`RID<class_RID>` **mesh_create_from_surfaces**\ (\ surfaces\: :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\], blend_shape_count\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingServer_method_mesh_create_from_surfaces>` .. container:: contribute @@ -8380,7 +9126,7 @@ To place in a scene, attach this mesh to an instance using :ref:`instance_set_ba .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_get_blend_shape_count** **(** :ref:`RID<class_RID>` mesh **)** |const| +:ref:`int<class_int>` **mesh_get_blend_shape_count**\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_get_blend_shape_count>` Returns a mesh's blend shape count. @@ -8392,7 +9138,7 @@ Returns a mesh's blend shape count. .. rst-class:: classref-method -:ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` **mesh_get_blend_shape_mode** **(** :ref:`RID<class_RID>` mesh **)** |const| +:ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` **mesh_get_blend_shape_mode**\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_get_blend_shape_mode>` Returns a mesh's blend shape mode. @@ -8404,7 +9150,7 @@ Returns a mesh's blend shape mode. .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **mesh_get_custom_aabb** **(** :ref:`RID<class_RID>` mesh **)** |const| +:ref:`AABB<class_AABB>` **mesh_get_custom_aabb**\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_get_custom_aabb>` Returns a mesh's custom aabb. @@ -8416,7 +9162,7 @@ Returns a mesh's custom aabb. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **mesh_get_surface** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** +:ref:`Dictionary<class_Dictionary>` **mesh_get_surface**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_get_surface>` .. container:: contribute @@ -8430,7 +9176,7 @@ Returns a mesh's custom aabb. .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_get_surface_count** **(** :ref:`RID<class_RID>` mesh **)** |const| +:ref:`int<class_int>` **mesh_get_surface_count**\ (\ mesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_get_surface_count>` Returns a mesh's number of surfaces. @@ -8442,7 +9188,7 @@ Returns a mesh's number of surfaces. .. rst-class:: classref-method -void **mesh_set_blend_shape_mode** **(** :ref:`RID<class_RID>` mesh, :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>` mode **)** +|void| **mesh_set_blend_shape_mode**\ (\ mesh\: :ref:`RID<class_RID>`, mode\: :ref:`BlendShapeMode<enum_RenderingServer_BlendShapeMode>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_set_blend_shape_mode>` Sets a mesh's blend shape mode. @@ -8454,7 +9200,7 @@ Sets a mesh's blend shape mode. .. rst-class:: classref-method -void **mesh_set_custom_aabb** **(** :ref:`RID<class_RID>` mesh, :ref:`AABB<class_AABB>` aabb **)** +|void| **mesh_set_custom_aabb**\ (\ mesh\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_set_custom_aabb>` Sets a mesh's custom aabb. @@ -8466,7 +9212,7 @@ Sets a mesh's custom aabb. .. rst-class:: classref-method -void **mesh_set_shadow_mesh** **(** :ref:`RID<class_RID>` mesh, :ref:`RID<class_RID>` shadow_mesh **)** +|void| **mesh_set_shadow_mesh**\ (\ mesh\: :ref:`RID<class_RID>`, shadow_mesh\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_set_shadow_mesh>` .. container:: contribute @@ -8480,7 +9226,7 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID<class_RID>` mesh, :ref:`RID<class_ .. rst-class:: classref-method -:ref:`Array<class_Array>` **mesh_surface_get_arrays** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| +:ref:`Array<class_Array>` **mesh_surface_get_arrays**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_arrays>` Returns a mesh's surface's buffer arrays. @@ -8492,7 +9238,7 @@ Returns a mesh's surface's buffer arrays. .. rst-class:: classref-method -:ref:`Array[]<class_Array>` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| +:ref:`Array<class_Array>`\[:ref:`Array<class_Array>`\] **mesh_surface_get_blend_shape_arrays**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_blend_shape_arrays>` Returns a mesh's surface's arrays for blend shapes. @@ -8504,11 +9250,21 @@ Returns a mesh's surface's arrays for blend shapes. .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_surface_get_format_attribute_stride** **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| +:ref:`int<class_int>` **mesh_surface_get_format_attribute_stride**\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_format_attribute_stride>` -.. container:: contribute +Returns the stride of the attribute buffer for a mesh with given ``format``. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_mesh_surface_get_format_normal_tangent_stride: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **mesh_surface_get_format_normal_tangent_stride**\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_format_normal_tangent_stride>` + +Returns the stride of the combined normals and tangents for a mesh with given ``format``. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions. .. rst-class:: classref-item-separator @@ -8518,11 +9274,9 @@ Returns a mesh's surface's arrays for blend shapes. .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_surface_get_format_offset** **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count, :ref:`int<class_int>` array_index **)** |const| - -.. container:: contribute +:ref:`int<class_int>` **mesh_surface_get_format_offset**\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`, array_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_format_offset>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the offset of a given attribute by ``array_index`` in the start of its respective buffer. .. rst-class:: classref-item-separator @@ -8532,11 +9286,9 @@ Returns a mesh's surface's arrays for blend shapes. .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_surface_get_format_skin_stride** **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| +:ref:`int<class_int>` **mesh_surface_get_format_skin_stride**\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_format_skin_stride>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the stride of the skin buffer for a mesh with given ``format``. .. rst-class:: classref-item-separator @@ -8546,11 +9298,9 @@ Returns a mesh's surface's arrays for blend shapes. .. rst-class:: classref-method -:ref:`int<class_int>` **mesh_surface_get_format_vertex_stride** **(** |bitfield|\<:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\> format, :ref:`int<class_int>` vertex_count **)** |const| - -.. container:: contribute +:ref:`int<class_int>` **mesh_surface_get_format_vertex_stride**\ (\ format\: |bitfield|\[:ref:`ArrayFormat<enum_RenderingServer_ArrayFormat>`\], vertex_count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_format_vertex_stride>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the stride of the vertex positions for a mesh with given ``format``. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents). .. rst-class:: classref-item-separator @@ -8560,7 +9310,7 @@ Returns a mesh's surface's arrays for blend shapes. .. rst-class:: classref-method -:ref:`RID<class_RID>` **mesh_surface_get_material** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface **)** |const| +:ref:`RID<class_RID>` **mesh_surface_get_material**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_mesh_surface_get_material>` Returns a mesh's surface's material. @@ -8572,7 +9322,7 @@ Returns a mesh's surface's material. .. rst-class:: classref-method -void **mesh_surface_set_material** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`RID<class_RID>` material **)** +|void| **mesh_surface_set_material**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_surface_set_material>` Sets a mesh's surface's material. @@ -8584,7 +9334,7 @@ Sets a mesh's surface's material. .. rst-class:: classref-method -void **mesh_surface_update_attribute_region** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +|void| **mesh_surface_update_attribute_region**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_surface_update_attribute_region>` .. container:: contribute @@ -8598,7 +9348,7 @@ void **mesh_surface_update_attribute_region** **(** :ref:`RID<class_RID>` mesh, .. rst-class:: classref-method -void **mesh_surface_update_skin_region** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +|void| **mesh_surface_update_skin_region**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_surface_update_skin_region>` .. container:: contribute @@ -8612,7 +9362,7 @@ void **mesh_surface_update_skin_region** **(** :ref:`RID<class_RID>` mesh, :ref: .. rst-class:: classref-method -void **mesh_surface_update_vertex_region** **(** :ref:`RID<class_RID>` mesh, :ref:`int<class_int>` surface, :ref:`int<class_int>` offset, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +|void| **mesh_surface_update_vertex_region**\ (\ mesh\: :ref:`RID<class_RID>`, surface\: :ref:`int<class_int>`, offset\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_RenderingServer_method_mesh_surface_update_vertex_region>` .. container:: contribute @@ -8626,7 +9376,7 @@ void **mesh_surface_update_vertex_region** **(** :ref:`RID<class_RID>` mesh, :re .. rst-class:: classref-method -void **multimesh_allocate_data** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` instances, :ref:`MultimeshTransformFormat<enum_RenderingServer_MultimeshTransformFormat>` transform_format, :ref:`bool<class_bool>` color_format=false, :ref:`bool<class_bool>` custom_data_format=false **)** +|void| **multimesh_allocate_data**\ (\ multimesh\: :ref:`RID<class_RID>`, instances\: :ref:`int<class_int>`, transform_format\: :ref:`MultimeshTransformFormat<enum_RenderingServer_MultimeshTransformFormat>`, color_format\: :ref:`bool<class_bool>` = false, custom_data_format\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_multimesh_allocate_data>` .. container:: contribute @@ -8640,7 +9390,7 @@ void **multimesh_allocate_data** **(** :ref:`RID<class_RID>` multimesh, :ref:`in .. rst-class:: classref-method -:ref:`RID<class_RID>` **multimesh_create** **(** **)** +:ref:`RID<class_RID>` **multimesh_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_multimesh_create>` Creates a new multimesh on the RenderingServer and returns an :ref:`RID<class_RID>` handle. This RID will be used in all ``multimesh_*`` RenderingServer functions. @@ -8658,7 +9408,7 @@ To place in a scene, attach this multimesh to an instance using :ref:`instance_s .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **multimesh_get_aabb** **(** :ref:`RID<class_RID>` multimesh **)** |const| +:ref:`AABB<class_AABB>` **multimesh_get_aabb**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_aabb>` Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. @@ -8670,9 +9420,9 @@ Calculates and returns the axis-aligned bounding box that encloses all instances .. rst-class:: classref-method -:ref:`PackedFloat32Array<class_PackedFloat32Array>` **multimesh_get_buffer** **(** :ref:`RID<class_RID>` multimesh **)** |const| +:ref:`PackedFloat32Array<class_PackedFloat32Array>` **multimesh_get_buffer**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_buffer>` -Returns the MultiMesh data (such as instance transforms, colors, etc). See :ref:`multimesh_set_buffer<class_RenderingServer_method_multimesh_set_buffer>` for a description of the returned data. +Returns the MultiMesh data (such as instance transforms, colors, etc.). See :ref:`multimesh_set_buffer<class_RenderingServer_method_multimesh_set_buffer>` for details on the returned data. \ **Note:** If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means :ref:`multimesh_get_buffer<class_RenderingServer_method_multimesh_get_buffer>` is potentially a slow operation and should be avoided whenever possible. @@ -8680,11 +9430,23 @@ Returns the MultiMesh data (such as instance transforms, colors, etc). See :ref: ---- +.. _class_RenderingServer_method_multimesh_get_custom_aabb: + +.. rst-class:: classref-method + +:ref:`AABB<class_AABB>` **multimesh_get_custom_aabb**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_custom_aabb>` + +Returns the custom AABB defined for this MultiMesh resource. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_get_instance_count: .. rst-class:: classref-method -:ref:`int<class_int>` **multimesh_get_instance_count** **(** :ref:`RID<class_RID>` multimesh **)** |const| +:ref:`int<class_int>` **multimesh_get_instance_count**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_instance_count>` Returns the number of instances allocated for this multimesh. @@ -8696,7 +9458,7 @@ Returns the number of instances allocated for this multimesh. .. rst-class:: classref-method -:ref:`RID<class_RID>` **multimesh_get_mesh** **(** :ref:`RID<class_RID>` multimesh **)** |const| +:ref:`RID<class_RID>` **multimesh_get_mesh**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_mesh>` Returns the RID of the mesh that will be used in drawing this multimesh. @@ -8708,7 +9470,7 @@ Returns the RID of the mesh that will be used in drawing this multimesh. .. rst-class:: classref-method -:ref:`int<class_int>` **multimesh_get_visible_instances** **(** :ref:`RID<class_RID>` multimesh **)** |const| +:ref:`int<class_int>` **multimesh_get_visible_instances**\ (\ multimesh\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_get_visible_instances>` Returns the number of visible instances for this multimesh. @@ -8720,7 +9482,7 @@ Returns the number of visible instances for this multimesh. .. rst-class:: classref-method -:ref:`Color<class_Color>` **multimesh_instance_get_color** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| +:ref:`Color<class_Color>` **multimesh_instance_get_color**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_instance_get_color>` Returns the color by which the specified instance will be modulated. @@ -8732,7 +9494,7 @@ Returns the color by which the specified instance will be modulated. .. rst-class:: classref-method -:ref:`Color<class_Color>` **multimesh_instance_get_custom_data** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| +:ref:`Color<class_Color>` **multimesh_instance_get_custom_data**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_instance_get_custom_data>` Returns the custom data associated with the specified instance. @@ -8744,7 +9506,7 @@ Returns the custom data associated with the specified instance. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **multimesh_instance_get_transform** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| +:ref:`Transform3D<class_Transform3D>` **multimesh_instance_get_transform**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_instance_get_transform>` Returns the :ref:`Transform3D<class_Transform3D>` of the specified instance. @@ -8756,7 +9518,7 @@ Returns the :ref:`Transform3D<class_Transform3D>` of the specified instance. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **multimesh_instance_get_transform_2d** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index **)** |const| +:ref:`Transform2D<class_Transform2D>` **multimesh_instance_get_transform_2d**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_multimesh_instance_get_transform_2d>` Returns the :ref:`Transform2D<class_Transform2D>` of the specified instance. For use when the multimesh is set to use 2D transforms. @@ -8768,7 +9530,7 @@ Returns the :ref:`Transform2D<class_Transform2D>` of the specified instance. For .. rst-class:: classref-method -void **multimesh_instance_set_color** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** +|void| **multimesh_instance_set_color**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_instance_set_color>` Sets the color by which this instance will be modulated. Equivalent to :ref:`MultiMesh.set_instance_color<class_MultiMesh_method_set_instance_color>`. @@ -8780,7 +9542,7 @@ Sets the color by which this instance will be modulated. Equivalent to :ref:`Mul .. rst-class:: classref-method -void **multimesh_instance_set_custom_data** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Color<class_Color>` custom_data **)** +|void| **multimesh_instance_set_custom_data**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, custom_data\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_instance_set_custom_data>` Sets the custom data for this instance. Custom data is passed as a :ref:`Color<class_Color>`, but is interpreted as a ``vec4`` in the shader. Equivalent to :ref:`MultiMesh.set_instance_custom_data<class_MultiMesh_method_set_instance_custom_data>`. @@ -8792,7 +9554,7 @@ Sets the custom data for this instance. Custom data is passed as a :ref:`Color<c .. rst-class:: classref-method -void **multimesh_instance_set_transform** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **multimesh_instance_set_transform**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_instance_set_transform>` Sets the :ref:`Transform3D<class_Transform3D>` for this instance. Equivalent to :ref:`MultiMesh.set_instance_transform<class_MultiMesh_method_set_instance_transform>`. @@ -8804,7 +9566,7 @@ Sets the :ref:`Transform3D<class_Transform3D>` for this instance. Equivalent to .. rst-class:: classref-method -void **multimesh_instance_set_transform_2d** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` index, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **multimesh_instance_set_transform_2d**\ (\ multimesh\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_instance_set_transform_2d>` Sets the :ref:`Transform2D<class_Transform2D>` for this instance. For use when multimesh is used in 2D. Equivalent to :ref:`MultiMesh.set_instance_transform_2d<class_MultiMesh_method_set_instance_transform_2d>`. @@ -8816,13 +9578,13 @@ Sets the :ref:`Transform2D<class_Transform2D>` for this instance. For use when m .. rst-class:: classref-method -void **multimesh_set_buffer** **(** :ref:`RID<class_RID>` multimesh, :ref:`PackedFloat32Array<class_PackedFloat32Array>` buffer **)** +|void| **multimesh_set_buffer**\ (\ multimesh\: :ref:`RID<class_RID>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_set_buffer>` Set the entire data to use for drawing the ``multimesh`` at once to ``buffer`` (such as instance transforms and colors). ``buffer``'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also :ref:`multimesh_get_buffer<class_RenderingServer_method_multimesh_get_buffer>`. The per-instance data size and expected data order is: -:: +.. code:: text 2D: - Position: 8 floats (8 floats for Transform2D) @@ -8839,11 +9601,23 @@ The per-instance data size and expected data order is: ---- +.. _class_RenderingServer_method_multimesh_set_custom_aabb: + +.. rst-class:: classref-method + +|void| **multimesh_set_custom_aabb**\ (\ multimesh\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_set_custom_aabb>` + +Sets the custom AABB for this MultiMesh resource. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_multimesh_set_mesh: .. rst-class:: classref-method -void **multimesh_set_mesh** **(** :ref:`RID<class_RID>` multimesh, :ref:`RID<class_RID>` mesh **)** +|void| **multimesh_set_mesh**\ (\ multimesh\: :ref:`RID<class_RID>`, mesh\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_set_mesh>` Sets the mesh to be drawn by the multimesh. Equivalent to :ref:`MultiMesh.mesh<class_MultiMesh_property_mesh>`. @@ -8855,7 +9629,7 @@ Sets the mesh to be drawn by the multimesh. Equivalent to :ref:`MultiMesh.mesh<c .. rst-class:: classref-method -void **multimesh_set_visible_instances** **(** :ref:`RID<class_RID>` multimesh, :ref:`int<class_int>` visible **)** +|void| **multimesh_set_visible_instances**\ (\ multimesh\: :ref:`RID<class_RID>`, visible\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_multimesh_set_visible_instances>` Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to :ref:`MultiMesh.visible_instance_count<class_MultiMesh_property_visible_instance_count>`. @@ -8867,7 +9641,7 @@ Sets the number of instances visible at a given time. If -1, all instances that .. rst-class:: classref-method -:ref:`RID<class_RID>` **occluder_create** **(** **)** +:ref:`RID<class_RID>` **occluder_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_occluder_create>` Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``occluder_*`` RenderingServer functions. @@ -8883,7 +9657,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **occluder_set_mesh** **(** :ref:`RID<class_RID>` occluder, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices, :ref:`PackedInt32Array<class_PackedInt32Array>` indices **)** +|void| **occluder_set_mesh**\ (\ occluder\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, indices\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_RenderingServer_method_occluder_set_mesh>` Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed. @@ -8895,7 +9669,7 @@ Sets the mesh data for the given occluder RID, which controls the shape of the o .. rst-class:: classref-method -:ref:`RID<class_RID>` **omni_light_create** **(** **)** +:ref:`RID<class_RID>` **omni_light_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_omni_light_create>` Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. @@ -8913,7 +9687,7 @@ To place in a scene, attach this omni light to an instance using :ref:`instance_ .. rst-class:: classref-method -:ref:`RID<class_RID>` **particles_collision_create** **(** **)** +:ref:`RID<class_RID>` **particles_collision_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_create>` Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``particles_collision_*`` RenderingServer functions. @@ -8927,7 +9701,7 @@ Creates a new 3D GPU particle collision or attractor and adds it to the Renderin .. rst-class:: classref-method -void **particles_collision_height_field_update** **(** :ref:`RID<class_RID>` particles_collision **)** +|void| **particles_collision_height_field_update**\ (\ particles_collision\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_height_field_update>` Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its :ref:`GPUParticlesCollisionHeightField3D.update_mode<class_GPUParticlesCollisionHeightField3D_property_update_mode>`. @@ -8939,7 +9713,7 @@ Requests an update for the 3D GPU particle collision heightfield. This may be au .. rst-class:: classref-method -void **particles_collision_set_attractor_attenuation** **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` curve **)** +|void| **particles_collision_set_attractor_attenuation**\ (\ particles_collision\: :ref:`RID<class_RID>`, curve\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_attractor_attenuation>` Sets the attenuation ``curve`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.attenuation<class_GPUParticlesAttractor3D_property_attenuation>`. @@ -8951,7 +9725,7 @@ Sets the attenuation ``curve`` for the 3D GPU particles attractor specified by t .. rst-class:: classref-method -void **particles_collision_set_attractor_directionality** **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` amount **)** +|void| **particles_collision_set_attractor_directionality**\ (\ particles_collision\: :ref:`RID<class_RID>`, amount\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_attractor_directionality>` Sets the directionality ``amount`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.directionality<class_GPUParticlesAttractor3D_property_directionality>`. @@ -8963,7 +9737,7 @@ Sets the directionality ``amount`` for the 3D GPU particles attractor specified .. rst-class:: classref-method -void **particles_collision_set_attractor_strength** **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` strength **)** +|void| **particles_collision_set_attractor_strength**\ (\ particles_collision\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_attractor_strength>` Sets the ``strength`` for the 3D GPU particles attractor specified by the ``particles_collision`` RID. Only used for attractors, not colliders. Equivalent to :ref:`GPUParticlesAttractor3D.strength<class_GPUParticlesAttractor3D_property_strength>`. @@ -8975,7 +9749,7 @@ Sets the ``strength`` for the 3D GPU particles attractor specified by the ``part .. rst-class:: classref-method -void **particles_collision_set_box_extents** **(** :ref:`RID<class_RID>` particles_collision, :ref:`Vector3<class_Vector3>` extents **)** +|void| **particles_collision_set_box_extents**\ (\ particles_collision\: :ref:`RID<class_RID>`, extents\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_box_extents>` Sets the ``extents`` for the 3D GPU particles collision by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionBox3D.size<class_GPUParticlesCollisionBox3D_property_size>`, :ref:`GPUParticlesCollisionSDF3D.size<class_GPUParticlesCollisionSDF3D_property_size>`, :ref:`GPUParticlesCollisionHeightField3D.size<class_GPUParticlesCollisionHeightField3D_property_size>`, :ref:`GPUParticlesAttractorBox3D.size<class_GPUParticlesAttractorBox3D_property_size>` or :ref:`GPUParticlesAttractorVectorField3D.size<class_GPUParticlesAttractorVectorField3D_property_size>` depending on the ``particles_collision`` type. @@ -8987,7 +9761,7 @@ Sets the ``extents`` for the 3D GPU particles collision by the ``particles_colli .. rst-class:: classref-method -void **particles_collision_set_collision_type** **(** :ref:`RID<class_RID>` particles_collision, :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>` type **)** +|void| **particles_collision_set_collision_type**\ (\ particles_collision\: :ref:`RID<class_RID>`, type\: :ref:`ParticlesCollisionType<enum_RenderingServer_ParticlesCollisionType>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_collision_type>` Sets the collision or attractor shape ``type`` for the 3D GPU particles collision or attractor specified by the ``particles_collision`` RID. @@ -8999,7 +9773,7 @@ Sets the collision or attractor shape ``type`` for the 3D GPU particles collisio .. rst-class:: classref-method -void **particles_collision_set_cull_mask** **(** :ref:`RID<class_RID>` particles_collision, :ref:`int<class_int>` mask **)** +|void| **particles_collision_set_cull_mask**\ (\ particles_collision\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_cull_mask>` Sets the cull ``mask`` for the 3D GPU particles collision or attractor specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollision3D.cull_mask<class_GPUParticlesCollision3D_property_cull_mask>` or :ref:`GPUParticlesAttractor3D.cull_mask<class_GPUParticlesAttractor3D_property_cull_mask>` depending on the ``particles_collision`` type. @@ -9011,7 +9785,7 @@ Sets the cull ``mask`` for the 3D GPU particles collision or attractor specified .. rst-class:: classref-method -void **particles_collision_set_field_texture** **(** :ref:`RID<class_RID>` particles_collision, :ref:`RID<class_RID>` texture **)** +|void| **particles_collision_set_field_texture**\ (\ particles_collision\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_field_texture>` Sets the signed distance field ``texture`` for the 3D GPU particles collision specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionSDF3D.texture<class_GPUParticlesCollisionSDF3D_property_texture>` or :ref:`GPUParticlesAttractorVectorField3D.texture<class_GPUParticlesAttractorVectorField3D_property_texture>` depending on the ``particles_collision`` type. @@ -9023,7 +9797,7 @@ Sets the signed distance field ``texture`` for the 3D GPU particles collision sp .. rst-class:: classref-method -void **particles_collision_set_height_field_resolution** **(** :ref:`RID<class_RID>` particles_collision, :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>` resolution **)** +|void| **particles_collision_set_height_field_resolution**\ (\ particles_collision\: :ref:`RID<class_RID>`, resolution\: :ref:`ParticlesCollisionHeightfieldResolution<enum_RenderingServer_ParticlesCollisionHeightfieldResolution>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_height_field_resolution>` Sets the heightmap ``resolution`` for the 3D GPU particles heightfield collision specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionHeightField3D.resolution<class_GPUParticlesCollisionHeightField3D_property_resolution>`. @@ -9035,7 +9809,7 @@ Sets the heightmap ``resolution`` for the 3D GPU particles heightfield collision .. rst-class:: classref-method -void **particles_collision_set_sphere_radius** **(** :ref:`RID<class_RID>` particles_collision, :ref:`float<class_float>` radius **)** +|void| **particles_collision_set_sphere_radius**\ (\ particles_collision\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_collision_set_sphere_radius>` Sets the ``radius`` for the 3D GPU particles sphere collision or attractor specified by the ``particles_collision`` RID. Equivalent to :ref:`GPUParticlesCollisionSphere3D.radius<class_GPUParticlesCollisionSphere3D_property_radius>` or :ref:`GPUParticlesAttractorSphere3D.radius<class_GPUParticlesAttractorSphere3D_property_radius>` depending on the ``particles_collision`` type. @@ -9047,7 +9821,7 @@ Sets the ``radius`` for the 3D GPU particles sphere collision or attractor speci .. rst-class:: classref-method -:ref:`RID<class_RID>` **particles_create** **(** **)** +:ref:`RID<class_RID>` **particles_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_particles_create>` Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``particles_*`` RenderingServer functions. @@ -9067,7 +9841,7 @@ To place in a scene, attach these particles to an instance using :ref:`instance_ .. rst-class:: classref-method -void **particles_emit** **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D<class_Transform3D>` transform, :ref:`Vector3<class_Vector3>` velocity, :ref:`Color<class_Color>` color, :ref:`Color<class_Color>` custom, :ref:`int<class_int>` emit_flags **)** +|void| **particles_emit**\ (\ particles\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`, velocity\: :ref:`Vector3<class_Vector3>`, color\: :ref:`Color<class_Color>`, custom\: :ref:`Color<class_Color>`, emit_flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_particles_emit>` Manually emits particles from the ``particles`` instance. @@ -9079,7 +9853,7 @@ Manually emits particles from the ``particles`` instance. .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **particles_get_current_aabb** **(** :ref:`RID<class_RID>` particles **)** +:ref:`AABB<class_AABB>` **particles_get_current_aabb**\ (\ particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_get_current_aabb>` Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to :ref:`GPUParticles3D.capture_aabb<class_GPUParticles3D_method_capture_aabb>`. @@ -9091,7 +9865,7 @@ Calculates and returns the axis-aligned bounding box that contains all the parti .. rst-class:: classref-method -:ref:`bool<class_bool>` **particles_get_emitting** **(** :ref:`RID<class_RID>` particles **)** +:ref:`bool<class_bool>` **particles_get_emitting**\ (\ particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_get_emitting>` Returns ``true`` if particles are currently set to emitting. @@ -9103,7 +9877,7 @@ Returns ``true`` if particles are currently set to emitting. .. rst-class:: classref-method -:ref:`bool<class_bool>` **particles_is_inactive** **(** :ref:`RID<class_RID>` particles **)** +:ref:`bool<class_bool>` **particles_is_inactive**\ (\ particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_is_inactive>` Returns ``true`` if particles are not emitting and particles are set to inactive. @@ -9115,7 +9889,7 @@ Returns ``true`` if particles are not emitting and particles are set to inactive .. rst-class:: classref-method -void **particles_request_process** **(** :ref:`RID<class_RID>` particles **)** +|void| **particles_request_process**\ (\ particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_request_process>` Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to :ref:`instances_cull_aabb<class_RenderingServer_method_instances_cull_aabb>`, :ref:`instances_cull_convex<class_RenderingServer_method_instances_cull_convex>`, or :ref:`instances_cull_ray<class_RenderingServer_method_instances_cull_ray>`. @@ -9127,7 +9901,7 @@ Add particle system to list of particle systems that need to be updated. Update .. rst-class:: classref-method -void **particles_restart** **(** :ref:`RID<class_RID>` particles **)** +|void| **particles_restart**\ (\ particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_restart>` Reset the particles on the next update. Equivalent to :ref:`GPUParticles3D.restart<class_GPUParticles3D_method_restart>`. @@ -9139,7 +9913,7 @@ Reset the particles on the next update. Equivalent to :ref:`GPUParticles3D.resta .. rst-class:: classref-method -void **particles_set_amount** **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` amount **)** +|void| **particles_set_amount**\ (\ particles\: :ref:`RID<class_RID>`, amount\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_amount>` Sets the number of particles to be drawn and allocates the memory for them. Equivalent to :ref:`GPUParticles3D.amount<class_GPUParticles3D_property_amount>`. @@ -9147,11 +9921,23 @@ Sets the number of particles to be drawn and allocates the memory for them. Equi ---- +.. _class_RenderingServer_method_particles_set_amount_ratio: + +.. rst-class:: classref-method + +|void| **particles_set_amount_ratio**\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_amount_ratio>` + +Sets the amount ratio for particles to be emitted. Equivalent to :ref:`GPUParticles3D.amount_ratio<class_GPUParticles3D_property_amount_ratio>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_collision_base_size: .. rst-class:: classref-method -void **particles_set_collision_base_size** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` size **)** +|void| **particles_set_collision_base_size**\ (\ particles\: :ref:`RID<class_RID>`, size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_collision_base_size>` .. container:: contribute @@ -9165,7 +9951,7 @@ void **particles_set_collision_base_size** **(** :ref:`RID<class_RID>` particles .. rst-class:: classref-method -void **particles_set_custom_aabb** **(** :ref:`RID<class_RID>` particles, :ref:`AABB<class_AABB>` aabb **)** +|void| **particles_set_custom_aabb**\ (\ particles\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_custom_aabb>` Sets a custom axis-aligned bounding box for the particle system. Equivalent to :ref:`GPUParticles3D.visibility_aabb<class_GPUParticles3D_property_visibility_aabb>`. @@ -9177,7 +9963,7 @@ Sets a custom axis-aligned bounding box for the particle system. Equivalent to : .. rst-class:: classref-method -void **particles_set_draw_order** **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>` order **)** +|void| **particles_set_draw_order**\ (\ particles\: :ref:`RID<class_RID>`, order\: :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_draw_order>` Sets the draw order of the particles to one of the named enums from :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>`. See :ref:`ParticlesDrawOrder<enum_RenderingServer_ParticlesDrawOrder>` for options. Equivalent to :ref:`GPUParticles3D.draw_order<class_GPUParticles3D_property_draw_order>`. @@ -9189,7 +9975,7 @@ Sets the draw order of the particles to one of the named enums from :ref:`Partic .. rst-class:: classref-method -void **particles_set_draw_pass_mesh** **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` pass, :ref:`RID<class_RID>` mesh **)** +|void| **particles_set_draw_pass_mesh**\ (\ particles\: :ref:`RID<class_RID>`, pass\: :ref:`int<class_int>`, mesh\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_draw_pass_mesh>` Sets the mesh to be used for the specified draw pass. Equivalent to :ref:`GPUParticles3D.draw_pass_1<class_GPUParticles3D_property_draw_pass_1>`, :ref:`GPUParticles3D.draw_pass_2<class_GPUParticles3D_property_draw_pass_2>`, :ref:`GPUParticles3D.draw_pass_3<class_GPUParticles3D_property_draw_pass_3>`, and :ref:`GPUParticles3D.draw_pass_4<class_GPUParticles3D_property_draw_pass_4>`. @@ -9201,7 +9987,7 @@ Sets the mesh to be used for the specified draw pass. Equivalent to :ref:`GPUPar .. rst-class:: classref-method -void **particles_set_draw_passes** **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` count **)** +|void| **particles_set_draw_passes**\ (\ particles\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_draw_passes>` Sets the number of draw passes to use. Equivalent to :ref:`GPUParticles3D.draw_passes<class_GPUParticles3D_property_draw_passes>`. @@ -9213,7 +9999,7 @@ Sets the number of draw passes to use. Equivalent to :ref:`GPUParticles3D.draw_p .. rst-class:: classref-method -void **particles_set_emission_transform** **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **particles_set_emission_transform**\ (\ particles\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_emission_transform>` Sets the :ref:`Transform3D<class_Transform3D>` that will be used by the particles when they first emit. @@ -9221,11 +10007,23 @@ Sets the :ref:`Transform3D<class_Transform3D>` that will be used by the particle ---- +.. _class_RenderingServer_method_particles_set_emitter_velocity: + +.. rst-class:: classref-method + +|void| **particles_set_emitter_velocity**\ (\ particles\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_emitter_velocity>` + +Sets the velocity of a particle node, that will be used by :ref:`ParticleProcessMaterial.inherit_velocity_ratio<class_ParticleProcessMaterial_property_inherit_velocity_ratio>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_emitting: .. rst-class:: classref-method -void **particles_set_emitting** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` emitting **)** +|void| **particles_set_emitting**\ (\ particles\: :ref:`RID<class_RID>`, emitting\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_emitting>` If ``true``, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to :ref:`GPUParticles3D.emitting<class_GPUParticles3D_property_emitting>`. @@ -9237,7 +10035,7 @@ If ``true``, particles will emit over time. Setting to false does not reset the .. rst-class:: classref-method -void **particles_set_explosiveness_ratio** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` ratio **)** +|void| **particles_set_explosiveness_ratio**\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_explosiveness_ratio>` Sets the explosiveness ratio. Equivalent to :ref:`GPUParticles3D.explosiveness<class_GPUParticles3D_property_explosiveness>`. @@ -9249,7 +10047,7 @@ Sets the explosiveness ratio. Equivalent to :ref:`GPUParticles3D.explosiveness<c .. rst-class:: classref-method -void **particles_set_fixed_fps** **(** :ref:`RID<class_RID>` particles, :ref:`int<class_int>` fps **)** +|void| **particles_set_fixed_fps**\ (\ particles\: :ref:`RID<class_RID>`, fps\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_fixed_fps>` Sets the frame rate that the particle system rendering will be fixed to. Equivalent to :ref:`GPUParticles3D.fixed_fps<class_GPUParticles3D_property_fixed_fps>`. @@ -9261,7 +10059,7 @@ Sets the frame rate that the particle system rendering will be fixed to. Equival .. rst-class:: classref-method -void **particles_set_fractional_delta** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** +|void| **particles_set_fractional_delta**\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_fractional_delta>` If ``true``, uses fractional delta which smooths the movement of the particles. Equivalent to :ref:`GPUParticles3D.fract_delta<class_GPUParticles3D_property_fract_delta>`. @@ -9269,11 +10067,23 @@ If ``true``, uses fractional delta which smooths the movement of the particles. ---- +.. _class_RenderingServer_method_particles_set_interp_to_end: + +.. rst-class:: classref-method + +|void| **particles_set_interp_to_end**\ (\ particles\: :ref:`RID<class_RID>`, factor\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_interp_to_end>` + +Sets the value that informs a :ref:`ParticleProcessMaterial<class_ParticleProcessMaterial>` to rush all particles towards the end of their lifetime. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_interpolate: .. rst-class:: classref-method -void **particles_set_interpolate** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** +|void| **particles_set_interpolate**\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_interpolate>` .. container:: contribute @@ -9287,7 +10097,7 @@ void **particles_set_interpolate** **(** :ref:`RID<class_RID>` particles, :ref:` .. rst-class:: classref-method -void **particles_set_lifetime** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` lifetime **)** +|void| **particles_set_lifetime**\ (\ particles\: :ref:`RID<class_RID>`, lifetime\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_lifetime>` Sets the lifetime of each particle in the system. Equivalent to :ref:`GPUParticles3D.lifetime<class_GPUParticles3D_property_lifetime>`. @@ -9299,7 +10109,7 @@ Sets the lifetime of each particle in the system. Equivalent to :ref:`GPUParticl .. rst-class:: classref-method -void **particles_set_mode** **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesMode<enum_RenderingServer_ParticlesMode>` mode **)** +|void| **particles_set_mode**\ (\ particles\: :ref:`RID<class_RID>`, mode\: :ref:`ParticlesMode<enum_RenderingServer_ParticlesMode>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_mode>` Sets whether the GPU particles specified by the ``particles`` RID should be rendered in 2D or 3D according to ``mode``. @@ -9311,7 +10121,7 @@ Sets whether the GPU particles specified by the ``particles`` RID should be rend .. rst-class:: classref-method -void **particles_set_one_shot** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` one_shot **)** +|void| **particles_set_one_shot**\ (\ particles\: :ref:`RID<class_RID>`, one_shot\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_one_shot>` If ``true``, particles will emit once and then stop. Equivalent to :ref:`GPUParticles3D.one_shot<class_GPUParticles3D_property_one_shot>`. @@ -9323,7 +10133,7 @@ If ``true``, particles will emit once and then stop. Equivalent to :ref:`GPUPart .. rst-class:: classref-method -void **particles_set_pre_process_time** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` time **)** +|void| **particles_set_pre_process_time**\ (\ particles\: :ref:`RID<class_RID>`, time\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_pre_process_time>` Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to :ref:`GPUParticles3D.preprocess<class_GPUParticles3D_property_preprocess>`. @@ -9335,7 +10145,7 @@ Sets the preprocess time for the particles' animation. This lets you delay start .. rst-class:: classref-method -void **particles_set_process_material** **(** :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` material **)** +|void| **particles_set_process_material**\ (\ particles\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_process_material>` Sets the material for processing the particles. @@ -9349,7 +10159,7 @@ Sets the material for processing the particles. .. rst-class:: classref-method -void **particles_set_randomness_ratio** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` ratio **)** +|void| **particles_set_randomness_ratio**\ (\ particles\: :ref:`RID<class_RID>`, ratio\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_randomness_ratio>` Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to :ref:`GPUParticles3D.randomness<class_GPUParticles3D_property_randomness>`. @@ -9361,7 +10171,7 @@ Sets the emission randomness ratio. This randomizes the emission of particles wi .. rst-class:: classref-method -void **particles_set_speed_scale** **(** :ref:`RID<class_RID>` particles, :ref:`float<class_float>` scale **)** +|void| **particles_set_speed_scale**\ (\ particles\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_speed_scale>` Sets the speed scale of the particle system. Equivalent to :ref:`GPUParticles3D.speed_scale<class_GPUParticles3D_property_speed_scale>`. @@ -9373,7 +10183,7 @@ Sets the speed scale of the particle system. Equivalent to :ref:`GPUParticles3D. .. rst-class:: classref-method -void **particles_set_subemitter** **(** :ref:`RID<class_RID>` particles, :ref:`RID<class_RID>` subemitter_particles **)** +|void| **particles_set_subemitter**\ (\ particles\: :ref:`RID<class_RID>`, subemitter_particles\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_subemitter>` .. container:: contribute @@ -9387,7 +10197,7 @@ void **particles_set_subemitter** **(** :ref:`RID<class_RID>` particles, :ref:`R .. rst-class:: classref-method -void **particles_set_trail_bind_poses** **(** :ref:`RID<class_RID>` particles, :ref:`Transform3D[]<class_Transform3D>` bind_poses **)** +|void| **particles_set_trail_bind_poses**\ (\ particles\: :ref:`RID<class_RID>`, bind_poses\: :ref:`Array<class_Array>`\[:ref:`Transform3D<class_Transform3D>`\]\ ) :ref:`🔗<class_RenderingServer_method_particles_set_trail_bind_poses>` .. container:: contribute @@ -9401,7 +10211,7 @@ void **particles_set_trail_bind_poses** **(** :ref:`RID<class_RID>` particles, : .. rst-class:: classref-method -void **particles_set_trails** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` length_sec **)** +|void| **particles_set_trails**\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`, length_sec\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_trails>` If ``enable`` is ``true``, enables trails for the ``particles`` with the specified ``length_sec`` in seconds. Equivalent to :ref:`GPUParticles3D.trail_enabled<class_GPUParticles3D_property_trail_enabled>` and :ref:`GPUParticles3D.trail_lifetime<class_GPUParticles3D_property_trail_lifetime>`. @@ -9413,7 +10223,7 @@ If ``enable`` is ``true``, enables trails for the ``particles`` with the specifi .. rst-class:: classref-method -void **particles_set_transform_align** **(** :ref:`RID<class_RID>` particles, :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>` align **)** +|void| **particles_set_transform_align**\ (\ particles\: :ref:`RID<class_RID>`, align\: :ref:`ParticlesTransformAlign<enum_RenderingServer_ParticlesTransformAlign>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_transform_align>` .. container:: contribute @@ -9427,7 +10237,7 @@ void **particles_set_transform_align** **(** :ref:`RID<class_RID>` particles, :r .. rst-class:: classref-method -void **particles_set_use_local_coordinates** **(** :ref:`RID<class_RID>` particles, :ref:`bool<class_bool>` enable **)** +|void| **particles_set_use_local_coordinates**\ (\ particles\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_particles_set_use_local_coordinates>` If ``true``, particles use local coordinates. If ``false`` they use global coordinates. Equivalent to :ref:`GPUParticles3D.local_coords<class_GPUParticles3D_property_local_coords>`. @@ -9439,7 +10249,7 @@ If ``true``, particles use local coordinates. If ``false`` they use global coord .. rst-class:: classref-method -void **positional_soft_shadow_filter_set_quality** **(** :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>` quality **)** +|void| **positional_soft_shadow_filter_set_quality**\ (\ quality\: :ref:`ShadowQuality<enum_RenderingServer_ShadowQuality>`\ ) :ref:`🔗<class_RenderingServer_method_positional_soft_shadow_filter_set_quality>` Sets the filter quality for omni and spot light shadows in 3D. See also :ref:`ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality<class_ProjectSettings_property_rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality>`. This parameter is global and cannot be set on a per-viewport basis. @@ -9451,7 +10261,7 @@ Sets the filter quality for omni and spot light shadows in 3D. See also :ref:`Pr .. rst-class:: classref-method -:ref:`RID<class_RID>` **reflection_probe_create** **(** **)** +:ref:`RID<class_RID>` **reflection_probe_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_create>` Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``reflection_probe_*`` RenderingServer functions. @@ -9469,7 +10279,7 @@ To place in a scene, attach this reflection probe to an instance using :ref:`ins .. rst-class:: classref-method -void **reflection_probe_set_ambient_color** **(** :ref:`RID<class_RID>` probe, :ref:`Color<class_Color>` color **)** +|void| **reflection_probe_set_ambient_color**\ (\ probe\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_ambient_color>` Sets the reflection probe's custom ambient light color. Equivalent to :ref:`ReflectionProbe.ambient_color<class_ReflectionProbe_property_ambient_color>`. @@ -9481,7 +10291,7 @@ Sets the reflection probe's custom ambient light color. Equivalent to :ref:`Refl .. rst-class:: classref-method -void **reflection_probe_set_ambient_energy** **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` energy **)** +|void| **reflection_probe_set_ambient_energy**\ (\ probe\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_ambient_energy>` Sets the reflection probe's custom ambient light energy. Equivalent to :ref:`ReflectionProbe.ambient_color_energy<class_ReflectionProbe_property_ambient_color_energy>`. @@ -9493,7 +10303,7 @@ Sets the reflection probe's custom ambient light energy. Equivalent to :ref:`Ref .. rst-class:: classref-method -void **reflection_probe_set_ambient_mode** **(** :ref:`RID<class_RID>` probe, :ref:`ReflectionProbeAmbientMode<enum_RenderingServer_ReflectionProbeAmbientMode>` mode **)** +|void| **reflection_probe_set_ambient_mode**\ (\ probe\: :ref:`RID<class_RID>`, mode\: :ref:`ReflectionProbeAmbientMode<enum_RenderingServer_ReflectionProbeAmbientMode>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_ambient_mode>` Sets the reflection probe's ambient light mode. Equivalent to :ref:`ReflectionProbe.ambient_mode<class_ReflectionProbe_property_ambient_mode>`. @@ -9505,7 +10315,7 @@ Sets the reflection probe's ambient light mode. Equivalent to :ref:`ReflectionPr .. rst-class:: classref-method -void **reflection_probe_set_as_interior** **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** +|void| **reflection_probe_set_as_interior**\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_as_interior>` If ``true``, reflections will ignore sky contribution. Equivalent to :ref:`ReflectionProbe.interior<class_ReflectionProbe_property_interior>`. @@ -9517,9 +10327,9 @@ If ``true``, reflections will ignore sky contribution. Equivalent to :ref:`Refle .. rst-class:: classref-method -void **reflection_probe_set_cull_mask** **(** :ref:`RID<class_RID>` probe, :ref:`int<class_int>` layers **)** +|void| **reflection_probe_set_cull_mask**\ (\ probe\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_cull_mask>` -Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to :ref:`ReflectionProbe.cull_mask<class_ReflectionProbe_property_cull_mask>`. +Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to :ref:`ReflectionProbe.cull_mask<class_ReflectionProbe_property_cull_mask>`. .. rst-class:: classref-item-separator @@ -9529,7 +10339,7 @@ Sets the render cull mask for this reflection probe. Only instances with a match .. rst-class:: classref-method -void **reflection_probe_set_enable_box_projection** **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** +|void| **reflection_probe_set_enable_box_projection**\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_enable_box_projection>` If ``true``, uses box projection. This can make reflections look more correct in certain situations. Equivalent to :ref:`ReflectionProbe.box_projection<class_ReflectionProbe_property_box_projection>`. @@ -9541,7 +10351,7 @@ If ``true``, uses box projection. This can make reflections look more correct in .. rst-class:: classref-method -void **reflection_probe_set_enable_shadows** **(** :ref:`RID<class_RID>` probe, :ref:`bool<class_bool>` enable **)** +|void| **reflection_probe_set_enable_shadows**\ (\ probe\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_enable_shadows>` If ``true``, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to :ref:`ReflectionProbe.enable_shadows<class_ReflectionProbe_property_enable_shadows>`. @@ -9553,7 +10363,7 @@ If ``true``, computes shadows in the reflection probe. This makes the reflection .. rst-class:: classref-method -void **reflection_probe_set_intensity** **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` intensity **)** +|void| **reflection_probe_set_intensity**\ (\ probe\: :ref:`RID<class_RID>`, intensity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_intensity>` Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to :ref:`ReflectionProbe.intensity<class_ReflectionProbe_property_intensity>`. @@ -9565,7 +10375,7 @@ Sets the intensity of the reflection probe. Intensity modulates the strength of .. rst-class:: classref-method -void **reflection_probe_set_max_distance** **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` distance **)** +|void| **reflection_probe_set_max_distance**\ (\ probe\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_max_distance>` Sets the max distance away from the probe an object can be before it is culled. Equivalent to :ref:`ReflectionProbe.max_distance<class_ReflectionProbe_property_max_distance>`. @@ -9577,7 +10387,7 @@ Sets the max distance away from the probe an object can be before it is culled. .. rst-class:: classref-method -void **reflection_probe_set_mesh_lod_threshold** **(** :ref:`RID<class_RID>` probe, :ref:`float<class_float>` pixels **)** +|void| **reflection_probe_set_mesh_lod_threshold**\ (\ probe\: :ref:`RID<class_RID>`, pixels\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_mesh_lod_threshold>` Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to :ref:`ReflectionProbe.mesh_lod_threshold<class_ReflectionProbe_property_mesh_lod_threshold>`. @@ -9589,7 +10399,7 @@ Sets the mesh level of detail to use in the reflection probe rendering. Higher v .. rst-class:: classref-method -void **reflection_probe_set_origin_offset** **(** :ref:`RID<class_RID>` probe, :ref:`Vector3<class_Vector3>` offset **)** +|void| **reflection_probe_set_origin_offset**\ (\ probe\: :ref:`RID<class_RID>`, offset\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_origin_offset>` Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to :ref:`ReflectionProbe.origin_offset<class_ReflectionProbe_property_origin_offset>`. @@ -9597,11 +10407,23 @@ Sets the origin offset to be used when this reflection probe is in box project m ---- +.. _class_RenderingServer_method_reflection_probe_set_reflection_mask: + +.. rst-class:: classref-method + +|void| **reflection_probe_set_reflection_mask**\ (\ probe\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_reflection_mask>` + +Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to :ref:`ReflectionProbe.reflection_mask<class_ReflectionProbe_property_reflection_mask>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_reflection_probe_set_resolution: .. rst-class:: classref-method -void **reflection_probe_set_resolution** **(** :ref:`RID<class_RID>` probe, :ref:`int<class_int>` resolution **)** +|void| **reflection_probe_set_resolution**\ (\ probe\: :ref:`RID<class_RID>`, resolution\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_resolution>` Sets the resolution to use when rendering the specified reflection probe. The ``resolution`` is specified for each cubemap face: for instance, specifying ``512`` will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels). @@ -9613,7 +10435,7 @@ Sets the resolution to use when rendering the specified reflection probe. The `` .. rst-class:: classref-method -void **reflection_probe_set_size** **(** :ref:`RID<class_RID>` probe, :ref:`Vector3<class_Vector3>` size **)** +|void| **reflection_probe_set_size**\ (\ probe\: :ref:`RID<class_RID>`, size\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_size>` Sets the size of the area that the reflection probe will capture. Equivalent to :ref:`ReflectionProbe.size<class_ReflectionProbe_property_size>`. @@ -9625,7 +10447,7 @@ Sets the size of the area that the reflection probe will capture. Equivalent to .. rst-class:: classref-method -void **reflection_probe_set_update_mode** **(** :ref:`RID<class_RID>` probe, :ref:`ReflectionProbeUpdateMode<enum_RenderingServer_ReflectionProbeUpdateMode>` mode **)** +|void| **reflection_probe_set_update_mode**\ (\ probe\: :ref:`RID<class_RID>`, mode\: :ref:`ReflectionProbeUpdateMode<enum_RenderingServer_ReflectionProbeUpdateMode>`\ ) :ref:`🔗<class_RenderingServer_method_reflection_probe_set_update_mode>` Sets how often the reflection probe updates. Can either be once or every frame. See :ref:`ReflectionProbeUpdateMode<enum_RenderingServer_ReflectionProbeUpdateMode>` for options. @@ -9637,7 +10459,7 @@ Sets how often the reflection probe updates. Can either be once or every frame. .. rst-class:: classref-method -void **request_frame_drawn_callback** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **request_frame_drawn_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_RenderingServer_method_request_frame_drawn_callback>` Schedules a callback to the given callable after a frame has been drawn. @@ -9649,7 +10471,7 @@ Schedules a callback to the given callable after a frame has been drawn. .. rst-class:: classref-method -:ref:`RID<class_RID>` **scenario_create** **(** **)** +:ref:`RID<class_RID>` **scenario_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_scenario_create>` Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``scenario_*`` RenderingServer functions. @@ -9665,7 +10487,7 @@ The scenario is the 3D world that all the visual instances exist in. .. rst-class:: classref-method -void **scenario_set_camera_attributes** **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` effects **)** +|void| **scenario_set_camera_attributes**\ (\ scenario\: :ref:`RID<class_RID>`, effects\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_scenario_set_camera_attributes>` Sets the camera attributes (``effects``) that will be used with this scenario. See also :ref:`CameraAttributes<class_CameraAttributes>`. @@ -9673,11 +10495,23 @@ Sets the camera attributes (``effects``) that will be used with this scenario. S ---- +.. _class_RenderingServer_method_scenario_set_compositor: + +.. rst-class:: classref-method + +|void| **scenario_set_compositor**\ (\ scenario\: :ref:`RID<class_RID>`, compositor\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_scenario_set_compositor>` + +Sets the compositor (``compositor``) that will be used with this scenario. See also :ref:`Compositor<class_Compositor>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_scenario_set_environment: .. rst-class:: classref-method -void **scenario_set_environment** **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` environment **)** +|void| **scenario_set_environment**\ (\ scenario\: :ref:`RID<class_RID>`, environment\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_scenario_set_environment>` Sets the environment that will be used with this scenario. See also :ref:`Environment<class_Environment>`. @@ -9689,7 +10523,7 @@ Sets the environment that will be used with this scenario. See also :ref:`Enviro .. rst-class:: classref-method -void **scenario_set_fallback_environment** **(** :ref:`RID<class_RID>` scenario, :ref:`RID<class_RID>` environment **)** +|void| **scenario_set_fallback_environment**\ (\ scenario\: :ref:`RID<class_RID>`, environment\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_scenario_set_fallback_environment>` Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. @@ -9701,7 +10535,7 @@ Sets the fallback environment to be used by this scenario. The fallback environm .. rst-class:: classref-method -void **screen_space_roughness_limiter_set_active** **(** :ref:`bool<class_bool>` enable, :ref:`float<class_float>` amount, :ref:`float<class_float>` limit **)** +|void| **screen_space_roughness_limiter_set_active**\ (\ enable\: :ref:`bool<class_bool>`, amount\: :ref:`float<class_float>`, limit\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_screen_space_roughness_limiter_set_active>` Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/enabled>`, :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/amount>` and :ref:`ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit<class_ProjectSettings_property_rendering/anti_aliasing/screen_space_roughness_limiter/limit>`. @@ -9713,7 +10547,7 @@ Sets the screen-space roughness limiter parameters, such as whether it should be .. rst-class:: classref-method -void **set_boot_image** **(** :ref:`Image<class_Image>` image, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` scale, :ref:`bool<class_bool>` use_filter=true **)** +|void| **set_boot_image**\ (\ image\: :ref:`Image<class_Image>`, color\: :ref:`Color<class_Color>`, scale\: :ref:`bool<class_bool>`, use_filter\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_RenderingServer_method_set_boot_image>` Sets a boot image. The color defines the background color. If ``scale`` is ``true``, the image will be scaled to fit the screen size. If ``use_filter`` is ``true``, the image will be scaled with linear interpolation. If ``use_filter`` is ``false``, the image will be scaled with nearest-neighbor interpolation. @@ -9725,7 +10559,7 @@ Sets a boot image. The color defines the background color. If ``scale`` is ``tru .. rst-class:: classref-method -void **set_debug_generate_wireframes** **(** :ref:`bool<class_bool>` generate **)** +|void| **set_debug_generate_wireframes**\ (\ generate\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_set_debug_generate_wireframes>` This method is currently unimplemented and does nothing if called with ``generate`` set to ``true``. @@ -9737,7 +10571,7 @@ This method is currently unimplemented and does nothing if called with ``generat .. rst-class:: classref-method -void **set_default_clear_color** **(** :ref:`Color<class_Color>` color **)** +|void| **set_default_clear_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RenderingServer_method_set_default_clear_color>` Sets the default clear color which is used when a specific clear color has not been selected. See also :ref:`get_default_clear_color<class_RenderingServer_method_get_default_clear_color>`. @@ -9749,7 +10583,7 @@ Sets the default clear color which is used when a specific clear color has not b .. rst-class:: classref-method -:ref:`RID<class_RID>` **shader_create** **(** **)** +:ref:`RID<class_RID>` **shader_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_shader_create>` Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``shader_*`` RenderingServer functions. @@ -9765,7 +10599,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`String<class_String>` **shader_get_code** **(** :ref:`RID<class_RID>` shader **)** |const| +:ref:`String<class_String>` **shader_get_code**\ (\ shader\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_shader_get_code>` Returns a shader's source code as a string. @@ -9777,7 +10611,7 @@ Returns a shader's source code as a string. .. rst-class:: classref-method -:ref:`RID<class_RID>` **shader_get_default_texture_parameter** **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` index=0 **)** |const| +:ref:`RID<class_RID>` **shader_get_default_texture_parameter**\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`, index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_RenderingServer_method_shader_get_default_texture_parameter>` Returns a default texture from a shader searched by name. @@ -9791,7 +10625,7 @@ Returns a default texture from a shader searched by name. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **shader_get_parameter_default** **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Variant<class_Variant>` **shader_get_parameter_default**\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderingServer_method_shader_get_parameter_default>` Returns the default value for the specified shader uniform. This is usually the value written in the shader source code. @@ -9803,7 +10637,7 @@ Returns the default value for the specified shader uniform. This is usually the .. rst-class:: classref-method -void **shader_set_code** **(** :ref:`RID<class_RID>` shader, :ref:`String<class_String>` code **)** +|void| **shader_set_code**\ (\ shader\: :ref:`RID<class_RID>`, code\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RenderingServer_method_shader_set_code>` Sets the shader's source code (which triggers recompilation after being changed). @@ -9815,7 +10649,7 @@ Sets the shader's source code (which triggers recompilation after being changed) .. rst-class:: classref-method -void **shader_set_default_texture_parameter** **(** :ref:`RID<class_RID>` shader, :ref:`StringName<class_StringName>` name, :ref:`RID<class_RID>` texture, :ref:`int<class_int>` index=0 **)** +|void| **shader_set_default_texture_parameter**\ (\ shader\: :ref:`RID<class_RID>`, name\: :ref:`StringName<class_StringName>`, texture\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingServer_method_shader_set_default_texture_parameter>` Sets a shader's default texture. Overwrites the texture given by name. @@ -9829,7 +10663,7 @@ Sets a shader's default texture. Overwrites the texture given by name. .. rst-class:: classref-method -void **shader_set_path_hint** **(** :ref:`RID<class_RID>` shader, :ref:`String<class_String>` path **)** +|void| **shader_set_path_hint**\ (\ shader\: :ref:`RID<class_RID>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RenderingServer_method_shader_set_path_hint>` Sets the path hint for the specified shader. This should generally match the :ref:`Shader<class_Shader>` resource's :ref:`Resource.resource_path<class_Resource_property_resource_path>`. @@ -9841,7 +10675,7 @@ Sets the path hint for the specified shader. This should generally match the :re .. rst-class:: classref-method -void **skeleton_allocate_data** **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bones, :ref:`bool<class_bool>` is_2d_skeleton=false **)** +|void| **skeleton_allocate_data**\ (\ skeleton\: :ref:`RID<class_RID>`, bones\: :ref:`int<class_int>`, is_2d_skeleton\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_skeleton_allocate_data>` .. container:: contribute @@ -9855,7 +10689,7 @@ void **skeleton_allocate_data** **(** :ref:`RID<class_RID>` skeleton, :ref:`int< .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **skeleton_bone_get_transform** **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone **)** |const| +:ref:`Transform3D<class_Transform3D>` **skeleton_bone_get_transform**\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_skeleton_bone_get_transform>` Returns the :ref:`Transform3D<class_Transform3D>` set for a specific bone of this skeleton. @@ -9867,7 +10701,7 @@ Returns the :ref:`Transform3D<class_Transform3D>` set for a specific bone of thi .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **skeleton_bone_get_transform_2d** **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone **)** |const| +:ref:`Transform2D<class_Transform2D>` **skeleton_bone_get_transform_2d**\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_skeleton_bone_get_transform_2d>` Returns the :ref:`Transform2D<class_Transform2D>` set for a specific bone of this skeleton. @@ -9879,7 +10713,7 @@ Returns the :ref:`Transform2D<class_Transform2D>` set for a specific bone of thi .. rst-class:: classref-method -void **skeleton_bone_set_transform** **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **skeleton_bone_set_transform**\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_RenderingServer_method_skeleton_bone_set_transform>` Sets the :ref:`Transform3D<class_Transform3D>` for a specific bone of this skeleton. @@ -9891,7 +10725,7 @@ Sets the :ref:`Transform3D<class_Transform3D>` for a specific bone of this skele .. rst-class:: classref-method -void **skeleton_bone_set_transform_2d** **(** :ref:`RID<class_RID>` skeleton, :ref:`int<class_int>` bone, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **skeleton_bone_set_transform_2d**\ (\ skeleton\: :ref:`RID<class_RID>`, bone\: :ref:`int<class_int>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_skeleton_bone_set_transform_2d>` Sets the :ref:`Transform2D<class_Transform2D>` for a specific bone of this skeleton. @@ -9903,7 +10737,7 @@ Sets the :ref:`Transform2D<class_Transform2D>` for a specific bone of this skele .. rst-class:: classref-method -:ref:`RID<class_RID>` **skeleton_create** **(** **)** +:ref:`RID<class_RID>` **skeleton_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_skeleton_create>` Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``skeleton_*`` RenderingServer functions. @@ -9917,7 +10751,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`int<class_int>` **skeleton_get_bone_count** **(** :ref:`RID<class_RID>` skeleton **)** |const| +:ref:`int<class_int>` **skeleton_get_bone_count**\ (\ skeleton\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_skeleton_get_bone_count>` Returns the number of bones allocated for this skeleton. @@ -9929,7 +10763,7 @@ Returns the number of bones allocated for this skeleton. .. rst-class:: classref-method -void **skeleton_set_base_transform_2d** **(** :ref:`RID<class_RID>` skeleton, :ref:`Transform2D<class_Transform2D>` base_transform **)** +|void| **skeleton_set_base_transform_2d**\ (\ skeleton\: :ref:`RID<class_RID>`, base_transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_skeleton_set_base_transform_2d>` .. container:: contribute @@ -9943,7 +10777,7 @@ void **skeleton_set_base_transform_2d** **(** :ref:`RID<class_RID>` skeleton, :r .. rst-class:: classref-method -:ref:`Image<class_Image>` **sky_bake_panorama** **(** :ref:`RID<class_RID>` sky, :ref:`float<class_float>` energy, :ref:`bool<class_bool>` bake_irradiance, :ref:`Vector2i<class_Vector2i>` size **)** +:ref:`Image<class_Image>` **sky_bake_panorama**\ (\ sky\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`, bake_irradiance\: :ref:`bool<class_bool>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_RenderingServer_method_sky_bake_panorama>` Generates and returns an :ref:`Image<class_Image>` containing the radiance map for the specified ``sky`` RID. This supports built-in sky material and custom sky shaders. If ``bake_irradiance`` is ``true``, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also :ref:`environment_bake_panorama<class_RenderingServer_method_environment_bake_panorama>`. @@ -9959,7 +10793,7 @@ Generates and returns an :ref:`Image<class_Image>` containing the radiance map f .. rst-class:: classref-method -:ref:`RID<class_RID>` **sky_create** **(** **)** +:ref:`RID<class_RID>` **sky_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_sky_create>` Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``sky_*`` RenderingServer functions. @@ -9973,7 +10807,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **sky_set_material** **(** :ref:`RID<class_RID>` sky, :ref:`RID<class_RID>` material **)** +|void| **sky_set_material**\ (\ sky\: :ref:`RID<class_RID>`, material\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_sky_set_material>` Sets the material that the sky uses to render the background, ambient and reflection maps. @@ -9985,7 +10819,7 @@ Sets the material that the sky uses to render the background, ambient and reflec .. rst-class:: classref-method -void **sky_set_mode** **(** :ref:`RID<class_RID>` sky, :ref:`SkyMode<enum_RenderingServer_SkyMode>` mode **)** +|void| **sky_set_mode**\ (\ sky\: :ref:`RID<class_RID>`, mode\: :ref:`SkyMode<enum_RenderingServer_SkyMode>`\ ) :ref:`🔗<class_RenderingServer_method_sky_set_mode>` Sets the process ``mode`` of the sky specified by the ``sky`` RID. Equivalent to :ref:`Sky.process_mode<class_Sky_property_process_mode>`. @@ -9997,7 +10831,7 @@ Sets the process ``mode`` of the sky specified by the ``sky`` RID. Equivalent to .. rst-class:: classref-method -void **sky_set_radiance_size** **(** :ref:`RID<class_RID>` sky, :ref:`int<class_int>` radiance_size **)** +|void| **sky_set_radiance_size**\ (\ sky\: :ref:`RID<class_RID>`, radiance_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_sky_set_radiance_size>` Sets the ``radiance_size`` of the sky specified by the ``sky`` RID (in pixels). Equivalent to :ref:`Sky.radiance_size<class_Sky_property_radiance_size>`. @@ -10009,7 +10843,7 @@ Sets the ``radiance_size`` of the sky specified by the ``sky`` RID (in pixels). .. rst-class:: classref-method -:ref:`RID<class_RID>` **spot_light_create** **(** **)** +:ref:`RID<class_RID>` **spot_light_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_spot_light_create>` Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most ``light_*`` RenderingServer functions. @@ -10025,7 +10859,7 @@ To place in a scene, attach this spot light to an instance using :ref:`instance_ .. rst-class:: classref-method -void **sub_surface_scattering_set_quality** **(** :ref:`SubSurfaceScatteringQuality<enum_RenderingServer_SubSurfaceScatteringQuality>` quality **)** +|void| **sub_surface_scattering_set_quality**\ (\ quality\: :ref:`SubSurfaceScatteringQuality<enum_RenderingServer_SubSurfaceScatteringQuality>`\ ) :ref:`🔗<class_RenderingServer_method_sub_surface_scattering_set_quality>` Sets :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_quality>` to use when rendering materials that have subsurface scattering enabled. @@ -10037,7 +10871,7 @@ Sets :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurfac .. rst-class:: classref-method -void **sub_surface_scattering_set_scale** **(** :ref:`float<class_float>` scale, :ref:`float<class_float>` depth_scale **)** +|void| **sub_surface_scattering_set_scale**\ (\ scale\: :ref:`float<class_float>`, depth_scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_sub_surface_scattering_set_scale>` Sets the :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_scale>` and :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale<class_ProjectSettings_property_rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale>` to use when rendering materials that have subsurface scattering enabled. @@ -10049,7 +10883,7 @@ Sets the :ref:`ProjectSettings.rendering/environment/subsurface_scattering/subsu .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_2d_create** **(** :ref:`Image<class_Image>` image **)** +:ref:`RID<class_RID>` **texture_2d_create**\ (\ image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_RenderingServer_method_texture_2d_create>` Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_*`` RenderingServer functions. @@ -10067,7 +10901,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`Image<class_Image>` **texture_2d_get** **(** :ref:`RID<class_RID>` texture **)** |const| +:ref:`Image<class_Image>` **texture_2d_get**\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_2d_get>` Returns an :ref:`Image<class_Image>` instance from the given ``texture`` :ref:`RID<class_RID>`. @@ -10087,7 +10921,7 @@ Example of getting the test texture from :ref:`get_test_texture<class_RenderingS .. rst-class:: classref-method -:ref:`Image<class_Image>` **texture_2d_layer_get** **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` layer **)** |const| +:ref:`Image<class_Image>` **texture_2d_layer_get**\ (\ texture\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_2d_layer_get>` Returns an :ref:`Image<class_Image>` instance from the given ``texture`` :ref:`RID<class_RID>` and ``layer``. @@ -10099,7 +10933,7 @@ Returns an :ref:`Image<class_Image>` instance from the given ``texture`` :ref:`R .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_2d_layered_create** **(** :ref:`Image[]<class_Image>` layers, :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` layered_type **)** +:ref:`RID<class_RID>` **texture_2d_layered_create**\ (\ layers\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\], layered_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>`\ ) :ref:`🔗<class_RenderingServer_method_texture_2d_layered_create>` Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions. @@ -10115,7 +10949,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_2d_layered_placeholder_create** **(** :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` layered_type **)** +:ref:`RID<class_RID>` **texture_2d_layered_placeholder_create**\ (\ layered_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>`\ ) :ref:`🔗<class_RenderingServer_method_texture_2d_layered_placeholder_create>` Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_placeholder_create<class_RenderingServer_method_texture_2d_placeholder_create>`. @@ -10129,7 +10963,7 @@ Creates a placeholder for a 2-dimensional layered texture and adds it to the Ren .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_2d_placeholder_create** **(** **)** +:ref:`RID<class_RID>` **texture_2d_placeholder_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_texture_2d_placeholder_create>` Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_2d_layered_*`` RenderingServer functions, although it does nothing when used. See also :ref:`texture_2d_layered_placeholder_create<class_RenderingServer_method_texture_2d_layered_placeholder_create>`\ @@ -10145,7 +10979,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **texture_2d_update** **(** :ref:`RID<class_RID>` texture, :ref:`Image<class_Image>` image, :ref:`int<class_int>` layer **)** +|void| **texture_2d_update**\ (\ texture\: :ref:`RID<class_RID>`, image\: :ref:`Image<class_Image>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_texture_2d_update>` Updates the texture specified by the ``texture`` :ref:`RID<class_RID>` with the data in ``image``. A ``layer`` must also be specified, which should be ``0`` when updating a single-layer texture (:ref:`Texture2D<class_Texture2D>`). @@ -10159,7 +10993,7 @@ Updates the texture specified by the ``texture`` :ref:`RID<class_RID>` with the .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_3d_create** **(** :ref:`Format<enum_Image_Format>` format, :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`int<class_int>` depth, :ref:`bool<class_bool>` mipmaps, :ref:`Image[]<class_Image>` data **)** +:ref:`RID<class_RID>` **texture_3d_create**\ (\ format\: :ref:`Format<enum_Image_Format>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`, depth\: :ref:`int<class_int>`, mipmaps\: :ref:`bool<class_bool>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) :ref:`🔗<class_RenderingServer_method_texture_3d_create>` **Note:** The equivalent resource is :ref:`Texture3D<class_Texture3D>`. @@ -10171,7 +11005,7 @@ Updates the texture specified by the ``texture`` :ref:`RID<class_RID>` with the .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **texture_3d_get** **(** :ref:`RID<class_RID>` texture **)** |const| +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **texture_3d_get**\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_3d_get>` Returns 3D texture data as an array of :ref:`Image<class_Image>`\ s for the specified texture :ref:`RID<class_RID>`. @@ -10183,7 +11017,7 @@ Returns 3D texture data as an array of :ref:`Image<class_Image>`\ s for the spec .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_3d_placeholder_create** **(** **)** +:ref:`RID<class_RID>` **texture_3d_placeholder_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_texture_3d_placeholder_create>` Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``texture_3d_*`` RenderingServer functions, although it does nothing when used. @@ -10199,7 +11033,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **texture_3d_update** **(** :ref:`RID<class_RID>` texture, :ref:`Image[]<class_Image>` data **)** +|void| **texture_3d_update**\ (\ texture\: :ref:`RID<class_RID>`, data\: :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\]\ ) :ref:`🔗<class_RenderingServer_method_texture_3d_update>` Updates the texture specified by the ``texture`` :ref:`RID<class_RID>`'s data with the data in ``data``. All the texture's layers must be replaced at once. @@ -10209,11 +11043,23 @@ Updates the texture specified by the ``texture`` :ref:`RID<class_RID>`'s data wi ---- +.. _class_RenderingServer_method_texture_get_format: + +.. rst-class:: classref-method + +:ref:`Format<enum_Image_Format>` **texture_get_format**\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_get_format>` + +Returns the format for the texture. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_texture_get_native_handle: .. rst-class:: classref-method -:ref:`int<class_int>` **texture_get_native_handle** **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` srgb=false **)** |const| +:ref:`int<class_int>` **texture_get_native_handle**\ (\ texture\: :ref:`RID<class_RID>`, srgb\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_get_native_handle>` Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. @@ -10227,7 +11073,7 @@ Returns the internal graphics handle for this texture object. For use when commu .. rst-class:: classref-method -:ref:`String<class_String>` **texture_get_path** **(** :ref:`RID<class_RID>` texture **)** |const| +:ref:`String<class_String>` **texture_get_path**\ (\ texture\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_get_path>` .. container:: contribute @@ -10241,7 +11087,7 @@ Returns the internal graphics handle for this texture object. For use when commu .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_get_rd_texture** **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` srgb=false **)** |const| +:ref:`RID<class_RID>` **texture_get_rd_texture**\ (\ texture\: :ref:`RID<class_RID>`, srgb\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_RenderingServer_method_texture_get_rd_texture>` Returns a texture :ref:`RID<class_RID>` that can be used with :ref:`RenderingDevice<class_RenderingDevice>`. @@ -10253,9 +11099,11 @@ Returns a texture :ref:`RID<class_RID>` that can be used with :ref:`RenderingDev .. rst-class:: classref-method -:ref:`RID<class_RID>` **texture_proxy_create** **(** :ref:`RID<class_RID>` base **)** +:ref:`RID<class_RID>` **texture_proxy_create**\ (\ base\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_texture_proxy_create>` + +**Deprecated:** ProxyTexture was removed in Godot 4. -*Deprecated.* ProxyTexture was removed in Godot 4, so this method does nothing when called and always returns a null :ref:`RID<class_RID>`. +This method does nothing and always returns an invalid :ref:`RID<class_RID>`. .. rst-class:: classref-item-separator @@ -10265,9 +11113,23 @@ Returns a texture :ref:`RID<class_RID>` that can be used with :ref:`RenderingDev .. rst-class:: classref-method -void **texture_proxy_update** **(** :ref:`RID<class_RID>` texture, :ref:`RID<class_RID>` proxy_to **)** +|void| **texture_proxy_update**\ (\ texture\: :ref:`RID<class_RID>`, proxy_to\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_texture_proxy_update>` + +**Deprecated:** ProxyTexture was removed in Godot 4. + +This method does nothing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_texture_rd_create: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **texture_rd_create**\ (\ rd_texture\: :ref:`RID<class_RID>`, layer_type\: :ref:`TextureLayeredType<enum_RenderingServer_TextureLayeredType>` = 0\ ) :ref:`🔗<class_RenderingServer_method_texture_rd_create>` -*Deprecated.* ProxyTexture was removed in Godot 4, so this method cannot be used anymore. +Creates a new texture object based on a texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>`. If the texture contains layers, ``layer_type`` is used to define the layer type. .. rst-class:: classref-item-separator @@ -10277,7 +11139,7 @@ void **texture_proxy_update** **(** :ref:`RID<class_RID>` texture, :ref:`RID<cla .. rst-class:: classref-method -void **texture_replace** **(** :ref:`RID<class_RID>` texture, :ref:`RID<class_RID>` by_texture **)** +|void| **texture_replace**\ (\ texture\: :ref:`RID<class_RID>`, by_texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_texture_replace>` Replaces ``texture``'s texture data by the texture specified by the ``by_texture`` RID, without changing ``texture``'s RID. @@ -10289,7 +11151,7 @@ Replaces ``texture``'s texture data by the texture specified by the ``by_texture .. rst-class:: classref-method -void **texture_set_force_redraw_if_visible** **(** :ref:`RID<class_RID>` texture, :ref:`bool<class_bool>` enable **)** +|void| **texture_set_force_redraw_if_visible**\ (\ texture\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_texture_set_force_redraw_if_visible>` .. container:: contribute @@ -10303,7 +11165,7 @@ void **texture_set_force_redraw_if_visible** **(** :ref:`RID<class_RID>` texture .. rst-class:: classref-method -void **texture_set_path** **(** :ref:`RID<class_RID>` texture, :ref:`String<class_String>` path **)** +|void| **texture_set_path**\ (\ texture\: :ref:`RID<class_RID>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RenderingServer_method_texture_set_path>` .. container:: contribute @@ -10317,7 +11179,7 @@ void **texture_set_path** **(** :ref:`RID<class_RID>` texture, :ref:`String<clas .. rst-class:: classref-method -void **texture_set_size_override** **(** :ref:`RID<class_RID>` texture, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** +|void| **texture_set_size_override**\ (\ texture\: :ref:`RID<class_RID>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_texture_set_size_override>` .. container:: contribute @@ -10331,7 +11193,7 @@ void **texture_set_size_override** **(** :ref:`RID<class_RID>` texture, :ref:`in .. rst-class:: classref-method -void **viewport_attach_camera** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` camera **)** +|void| **viewport_attach_camera**\ (\ viewport\: :ref:`RID<class_RID>`, camera\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_attach_camera>` Sets a viewport's camera. @@ -10343,7 +11205,7 @@ Sets a viewport's camera. .. rst-class:: classref-method -void **viewport_attach_canvas** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas **)** +|void| **viewport_attach_canvas**\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_attach_canvas>` Sets a viewport's canvas. @@ -10355,7 +11217,7 @@ Sets a viewport's canvas. .. rst-class:: classref-method -void **viewport_attach_to_screen** **(** :ref:`RID<class_RID>` viewport, :ref:`Rect2<class_Rect2>` rect=Rect2(0, 0, 0, 0), :ref:`int<class_int>` screen=0 **)** +|void| **viewport_attach_to_screen**\ (\ viewport\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), screen\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RenderingServer_method_viewport_attach_to_screen>` Copies the viewport to a region of the screen specified by ``rect``. If :ref:`viewport_set_render_direct_to_screen<class_RenderingServer_method_viewport_set_render_direct_to_screen>` is ``true``, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. @@ -10384,7 +11246,7 @@ Using this can result in significant optimization, especially on lower-end devic .. rst-class:: classref-method -:ref:`RID<class_RID>` **viewport_create** **(** **)** +:ref:`RID<class_RID>` **viewport_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_viewport_create>` Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``viewport_*`` RenderingServer functions. @@ -10400,7 +11262,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`float<class_float>` **viewport_get_measured_render_time_cpu** **(** :ref:`RID<class_RID>` viewport **)** |const| +:ref:`float<class_float>` **viewport_get_measured_render_time_cpu**\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_viewport_get_measured_render_time_cpu>` Returns the CPU time taken to render the last frame in milliseconds. This *only* includes time spent in rendering-related operations; scripts' ``_process`` functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus :ref:`get_frame_setup_time_cpu<class_RenderingServer_method_get_frame_setup_time_cpu>`. Unlike :ref:`Engine.get_frames_per_second<class_Engine_method_get_frames_per_second>`, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps<class_Engine_property_max_fps>`. See also :ref:`viewport_get_measured_render_time_gpu<class_RenderingServer_method_viewport_get_measured_render_time_gpu>`. @@ -10414,7 +11276,7 @@ Returns the CPU time taken to render the last frame in milliseconds. This *only* .. rst-class:: classref-method -:ref:`float<class_float>` **viewport_get_measured_render_time_gpu** **(** :ref:`RID<class_RID>` viewport **)** |const| +:ref:`float<class_float>` **viewport_get_measured_render_time_gpu**\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_viewport_get_measured_render_time_gpu>` Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike :ref:`Engine.get_frames_per_second<class_Engine_method_get_frames_per_second>`, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or :ref:`Engine.max_fps<class_Engine_property_max_fps>`. See also :ref:`viewport_get_measured_render_time_gpu<class_RenderingServer_method_viewport_get_measured_render_time_gpu>`. @@ -10430,7 +11292,7 @@ Returns the GPU time taken to render the last frame in milliseconds. To get a co .. rst-class:: classref-method -:ref:`int<class_int>` **viewport_get_render_info** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` type, :ref:`ViewportRenderInfo<enum_RenderingServer_ViewportRenderInfo>` info **)** +:ref:`int<class_int>` **viewport_get_render_info**\ (\ viewport\: :ref:`RID<class_RID>`, type\: :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>`, info\: :ref:`ViewportRenderInfo<enum_RenderingServer_ViewportRenderInfo>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_get_render_info>` Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass ``type``\ s, each of them having the same ``info``\ s you can query (different passes will return different values). See :ref:`ViewportRenderInfoType<enum_RenderingServer_ViewportRenderInfoType>` for a list of render pass types and :ref:`ViewportRenderInfo<enum_RenderingServer_ViewportRenderInfo>` for a list of information that can be queried. @@ -10458,7 +11320,7 @@ See also :ref:`get_rendering_info<class_RenderingServer_method_get_rendering_inf .. rst-class:: classref-method -:ref:`RID<class_RID>` **viewport_get_render_target** **(** :ref:`RID<class_RID>` viewport **)** |const| +:ref:`RID<class_RID>` **viewport_get_render_target**\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_viewport_get_render_target>` Returns the render target for the viewport. @@ -10470,7 +11332,7 @@ Returns the render target for the viewport. .. rst-class:: classref-method -:ref:`RID<class_RID>` **viewport_get_texture** **(** :ref:`RID<class_RID>` viewport **)** |const| +:ref:`RID<class_RID>` **viewport_get_texture**\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_viewport_get_texture>` Returns the viewport's last rendered frame. @@ -10478,13 +11340,27 @@ Returns the viewport's last rendered frame. ---- +.. _class_RenderingServer_method_viewport_get_update_mode: + +.. rst-class:: classref-method + +:ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` **viewport_get_update_mode**\ (\ viewport\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_viewport_get_update_mode>` + +Returns the viewport's update mode. See :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` constants for options. + +\ **Warning:** Calling this from any thread other than the rendering thread will be detrimental to performance. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_viewport_remove_canvas: .. rst-class:: classref-method -void **viewport_remove_canvas** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas **)** +|void| **viewport_remove_canvas**\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_remove_canvas>` -Detaches a viewport from a canvas and vice versa. +Detaches a viewport from a canvas. .. rst-class:: classref-item-separator @@ -10494,7 +11370,7 @@ Detaches a viewport from a canvas and vice versa. .. rst-class:: classref-method -void **viewport_set_active** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` active **)** +|void| **viewport_set_active**\ (\ viewport\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_active>` If ``true``, sets the viewport active, else sets it inactive. @@ -10506,7 +11382,7 @@ If ``true``, sets the viewport active, else sets it inactive. .. rst-class:: classref-method -void **viewport_set_canvas_cull_mask** **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` canvas_cull_mask **)** +|void| **viewport_set_canvas_cull_mask**\ (\ viewport\: :ref:`RID<class_RID>`, canvas_cull_mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_canvas_cull_mask>` Sets the rendering mask associated with this :ref:`Viewport<class_Viewport>`. Only :ref:`CanvasItem<class_CanvasItem>` nodes with a matching rendering visibility layer will be rendered by this :ref:`Viewport<class_Viewport>`. @@ -10518,7 +11394,7 @@ Sets the rendering mask associated with this :ref:`Viewport<class_Viewport>`. On .. rst-class:: classref-method -void **viewport_set_canvas_stacking** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` layer, :ref:`int<class_int>` sublayer **)** +|void| **viewport_set_canvas_stacking**\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, layer\: :ref:`int<class_int>`, sublayer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_canvas_stacking>` Sets the stacking order for a viewport's canvas. @@ -10532,7 +11408,7 @@ Sets the stacking order for a viewport's canvas. .. rst-class:: classref-method -void **viewport_set_canvas_transform** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` canvas, :ref:`Transform2D<class_Transform2D>` offset **)** +|void| **viewport_set_canvas_transform**\ (\ viewport\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, offset\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_canvas_transform>` Sets the transformation of a viewport's canvas. @@ -10544,7 +11420,7 @@ Sets the transformation of a viewport's canvas. .. rst-class:: classref-method -void **viewport_set_clear_mode** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportClearMode<enum_RenderingServer_ViewportClearMode>` clear_mode **)** +|void| **viewport_set_clear_mode**\ (\ viewport\: :ref:`RID<class_RID>`, clear_mode\: :ref:`ViewportClearMode<enum_RenderingServer_ViewportClearMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_clear_mode>` Sets the clear mode of a viewport. See :ref:`ViewportClearMode<enum_RenderingServer_ViewportClearMode>` for options. @@ -10556,7 +11432,7 @@ Sets the clear mode of a viewport. See :ref:`ViewportClearMode<enum_RenderingSer .. rst-class:: classref-method -void **viewport_set_debug_draw** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>` draw **)** +|void| **viewport_set_debug_draw**\ (\ viewport\: :ref:`RID<class_RID>`, draw\: :ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_debug_draw>` Sets the debug draw mode of a viewport. See :ref:`ViewportDebugDraw<enum_RenderingServer_ViewportDebugDraw>` for options. @@ -10568,7 +11444,7 @@ Sets the debug draw mode of a viewport. See :ref:`ViewportDebugDraw<enum_Renderi .. rst-class:: classref-method -void **viewport_set_default_canvas_item_texture_filter** **(** :ref:`RID<class_RID>` viewport, :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` filter **)** +|void| **viewport_set_default_canvas_item_texture_filter**\ (\ viewport\: :ref:`RID<class_RID>`, filter\: :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_default_canvas_item_texture_filter>` Sets the default texture filtering mode for the specified ``viewport`` RID. See :ref:`CanvasItemTextureFilter<enum_RenderingServer_CanvasItemTextureFilter>` for options. @@ -10580,7 +11456,7 @@ Sets the default texture filtering mode for the specified ``viewport`` RID. See .. rst-class:: classref-method -void **viewport_set_default_canvas_item_texture_repeat** **(** :ref:`RID<class_RID>` viewport, :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` repeat **)** +|void| **viewport_set_default_canvas_item_texture_repeat**\ (\ viewport\: :ref:`RID<class_RID>`, repeat\: :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_default_canvas_item_texture_repeat>` Sets the default texture repeat mode for the specified ``viewport`` RID. See :ref:`CanvasItemTextureRepeat<enum_RenderingServer_CanvasItemTextureRepeat>` for options. @@ -10592,7 +11468,7 @@ Sets the default texture repeat mode for the specified ``viewport`` RID. See :re .. rst-class:: classref-method -void **viewport_set_disable_2d** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` disable **)** +|void| **viewport_set_disable_2d**\ (\ viewport\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_disable_2d>` If ``true``, the viewport's canvas (i.e. 2D and GUI elements) is not rendered. @@ -10604,7 +11480,7 @@ If ``true``, the viewport's canvas (i.e. 2D and GUI elements) is not rendered. .. rst-class:: classref-method -void **viewport_set_disable_3d** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` disable **)** +|void| **viewport_set_disable_3d**\ (\ viewport\: :ref:`RID<class_RID>`, disable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_disable_3d>` If ``true``, the viewport's 3D elements are not rendered. @@ -10616,7 +11492,7 @@ If ``true``, the viewport's 3D elements are not rendered. .. rst-class:: classref-method -void **viewport_set_environment_mode** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportEnvironmentMode<enum_RenderingServer_ViewportEnvironmentMode>` mode **)** +|void| **viewport_set_environment_mode**\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportEnvironmentMode<enum_RenderingServer_ViewportEnvironmentMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_environment_mode>` Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is :ref:`ENV_BG_CANVAS<class_RenderingServer_constant_ENV_BG_CANVAS>`. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to :ref:`VIEWPORT_ENVIRONMENT_INHERIT<class_RenderingServer_constant_VIEWPORT_ENVIRONMENT_INHERIT>`, then the behavior will be the same as if it was set to :ref:`VIEWPORT_ENVIRONMENT_ENABLED<class_RenderingServer_constant_VIEWPORT_ENVIRONMENT_ENABLED>`. @@ -10628,7 +11504,7 @@ Sets the viewport's environment mode which allows enabling or disabling renderin .. rst-class:: classref-method -void **viewport_set_fsr_sharpness** **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` sharpness **)** +|void| **viewport_set_fsr_sharpness**\ (\ viewport\: :ref:`RID<class_RID>`, sharpness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_fsr_sharpness>` Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference. @@ -10640,7 +11516,7 @@ Determines how sharp the upscaled image will be when using the FSR upscaling mod .. rst-class:: classref-method -void **viewport_set_global_canvas_transform** **(** :ref:`RID<class_RID>` viewport, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **viewport_set_global_canvas_transform**\ (\ viewport\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_global_canvas_transform>` Sets the viewport's global transformation matrix. @@ -10652,7 +11528,7 @@ Sets the viewport's global transformation matrix. .. rst-class:: classref-method -void **viewport_set_measure_render_time** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** +|void| **viewport_set_measure_render_time**\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_measure_render_time>` Sets the measurement for the given ``viewport`` RID (obtained using :ref:`Viewport.get_viewport_rid<class_Viewport_method_get_viewport_rid>`). Once enabled, :ref:`viewport_get_measured_render_time_cpu<class_RenderingServer_method_viewport_get_measured_render_time_cpu>` and :ref:`viewport_get_measured_render_time_gpu<class_RenderingServer_method_viewport_get_measured_render_time_gpu>` will return values greater than ``0.0`` when queried with the given ``viewport``. @@ -10664,7 +11540,7 @@ Sets the measurement for the given ``viewport`` RID (obtained using :ref:`Viewpo .. rst-class:: classref-method -void **viewport_set_msaa_2d** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` msaa **)** +|void| **viewport_set_msaa_2d**\ (\ viewport\: :ref:`RID<class_RID>`, msaa\: :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_msaa_2d>` Sets the multisample anti-aliasing mode for 2D/Canvas on the specified ``viewport`` RID. See :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` for options. @@ -10676,7 +11552,7 @@ Sets the multisample anti-aliasing mode for 2D/Canvas on the specified ``viewpor .. rst-class:: classref-method -void **viewport_set_msaa_3d** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` msaa **)** +|void| **viewport_set_msaa_3d**\ (\ viewport\: :ref:`RID<class_RID>`, msaa\: :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_msaa_3d>` Sets the multisample anti-aliasing mode for 3D on the specified ``viewport`` RID. See :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` for options. @@ -10688,7 +11564,7 @@ Sets the multisample anti-aliasing mode for 3D on the specified ``viewport`` RID .. rst-class:: classref-method -void **viewport_set_occlusion_culling_build_quality** **(** :ref:`ViewportOcclusionCullingBuildQuality<enum_RenderingServer_ViewportOcclusionCullingBuildQuality>` quality **)** +|void| **viewport_set_occlusion_culling_build_quality**\ (\ quality\: :ref:`ViewportOcclusionCullingBuildQuality<enum_RenderingServer_ViewportOcclusionCullingBuildQuality>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_occlusion_culling_build_quality>` Sets the :ref:`ProjectSettings.rendering/occlusion_culling/bvh_build_quality<class_ProjectSettings_property_rendering/occlusion_culling/bvh_build_quality>` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. @@ -10700,7 +11576,7 @@ Sets the :ref:`ProjectSettings.rendering/occlusion_culling/bvh_build_quality<cla .. rst-class:: classref-method -void **viewport_set_occlusion_rays_per_thread** **(** :ref:`int<class_int>` rays_per_thread **)** +|void| **viewport_set_occlusion_rays_per_thread**\ (\ rays_per_thread\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_occlusion_rays_per_thread>` Sets the :ref:`ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread<class_ProjectSettings_property_rendering/occlusion_culling/occlusion_rays_per_thread>` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. @@ -10712,7 +11588,7 @@ Sets the :ref:`ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_th .. rst-class:: classref-method -void **viewport_set_parent_viewport** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` parent_viewport **)** +|void| **viewport_set_parent_viewport**\ (\ viewport\: :ref:`RID<class_RID>`, parent_viewport\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_parent_viewport>` Sets the viewport's parent to the viewport specified by the ``parent_viewport`` RID. @@ -10724,7 +11600,7 @@ Sets the viewport's parent to the viewport specified by the ``parent_viewport`` .. rst-class:: classref-method -void **viewport_set_positional_shadow_atlas_quadrant_subdivision** **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` quadrant, :ref:`int<class_int>` subdivision **)** +|void| **viewport_set_positional_shadow_atlas_quadrant_subdivision**\ (\ viewport\: :ref:`RID<class_RID>`, quadrant\: :ref:`int<class_int>`, subdivision\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_positional_shadow_atlas_quadrant_subdivision>` Sets the number of subdivisions to use in the specified shadow atlas ``quadrant`` for omni and spot shadows. See also :ref:`Viewport.set_positional_shadow_atlas_quadrant_subdiv<class_Viewport_method_set_positional_shadow_atlas_quadrant_subdiv>`. @@ -10736,7 +11612,7 @@ Sets the number of subdivisions to use in the specified shadow atlas ``quadrant` .. rst-class:: classref-method -void **viewport_set_positional_shadow_atlas_size** **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` size, :ref:`bool<class_bool>` use_16_bits=false **)** +|void| **viewport_set_positional_shadow_atlas_size**\ (\ viewport\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, use_16_bits\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_positional_shadow_atlas_size>` Sets the ``size`` of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the ``viewport`` RID. The value is rounded up to the nearest power of 2. If ``use_16_bits`` is ``true``, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. @@ -10750,7 +11626,7 @@ Sets the ``size`` of the shadow atlas's images (used for omni and spot lights) o .. rst-class:: classref-method -void **viewport_set_render_direct_to_screen** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** +|void| **viewport_set_render_direct_to_screen**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_render_direct_to_screen>` If ``true``, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. @@ -10762,7 +11638,7 @@ If ``true``, render the contents of the viewport directly to screen. This allows .. rst-class:: classref-method -void **viewport_set_scaling_3d_mode** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` scaling_3d_mode **)** +|void| **viewport_set_scaling_3d_mode**\ (\ viewport\: :ref:`RID<class_RID>`, scaling_3d_mode\: :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_scaling_3d_mode>` Sets the 3D resolution scaling mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. @@ -10774,7 +11650,7 @@ Sets the 3D resolution scaling mode. Bilinear scaling renders at different resol .. rst-class:: classref-method -void **viewport_set_scaling_3d_scale** **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` scale **)** +|void| **viewport_set_scaling_3d_scale**\ (\ viewport\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_scaling_3d_scale>` Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. @@ -10788,7 +11664,7 @@ When using FSR upscaling, AMD recommends exposing the following values as preset .. rst-class:: classref-method -void **viewport_set_scenario** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` scenario **)** +|void| **viewport_set_scenario**\ (\ viewport\: :ref:`RID<class_RID>`, scenario\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_scenario>` Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc. @@ -10800,7 +11676,7 @@ Sets a viewport's scenario. The scenario contains information about environment .. rst-class:: classref-method -void **viewport_set_screen_space_aa** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>` mode **)** +|void| **viewport_set_screen_space_aa**\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_screen_space_aa>` Sets the viewport's screen-space antialiasing mode. @@ -10812,7 +11688,7 @@ Sets the viewport's screen-space antialiasing mode. .. rst-class:: classref-method -void **viewport_set_sdf_oversize_and_scale** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportSDFOversize<enum_RenderingServer_ViewportSDFOversize>` oversize, :ref:`ViewportSDFScale<enum_RenderingServer_ViewportSDFScale>` scale **)** +|void| **viewport_set_sdf_oversize_and_scale**\ (\ viewport\: :ref:`RID<class_RID>`, oversize\: :ref:`ViewportSDFOversize<enum_RenderingServer_ViewportSDFOversize>`, scale\: :ref:`ViewportSDFScale<enum_RenderingServer_ViewportSDFScale>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_sdf_oversize_and_scale>` Sets the viewport's 2D signed distance field :ref:`ProjectSettings.rendering/2d/sdf/oversize<class_ProjectSettings_property_rendering/2d/sdf/oversize>` and :ref:`ProjectSettings.rendering/2d/sdf/scale<class_ProjectSettings_property_rendering/2d/sdf/scale>`. This is used when sampling the signed distance field in :ref:`CanvasItem<class_CanvasItem>` shaders as well as :ref:`GPUParticles2D<class_GPUParticles2D>` collision. This is *not* used by SDFGI in 3D rendering. @@ -10824,7 +11700,7 @@ Sets the viewport's 2D signed distance field :ref:`ProjectSettings.rendering/2d/ .. rst-class:: classref-method -void **viewport_set_size** **(** :ref:`RID<class_RID>` viewport, :ref:`int<class_int>` width, :ref:`int<class_int>` height **)** +|void| **viewport_set_size**\ (\ viewport\: :ref:`RID<class_RID>`, width\: :ref:`int<class_int>`, height\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_size>` Sets the viewport's width and height in pixels. @@ -10836,7 +11712,7 @@ Sets the viewport's width and height in pixels. .. rst-class:: classref-method -void **viewport_set_snap_2d_transforms_to_pixel** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** +|void| **viewport_set_snap_2d_transforms_to_pixel**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_snap_2d_transforms_to_pixel>` If ``true``, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. Equivalent to :ref:`ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel>`. @@ -10848,7 +11724,7 @@ If ``true``, canvas item transforms (i.e. origin position) are snapped to the ne .. rst-class:: classref-method -void **viewport_set_snap_2d_vertices_to_pixel** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** +|void| **viewport_set_snap_2d_vertices_to_pixel**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_snap_2d_vertices_to_pixel>` If ``true``, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. Equivalent to :ref:`ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel>`. @@ -10860,7 +11736,7 @@ If ``true``, canvas item vertices (i.e. polygon points) are snapped to the neare .. rst-class:: classref-method -void **viewport_set_texture_mipmap_bias** **(** :ref:`RID<class_RID>` viewport, :ref:`float<class_float>` mipmap_bias **)** +|void| **viewport_set_texture_mipmap_bias**\ (\ viewport\: :ref:`RID<class_RID>`, mipmap_bias\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_texture_mipmap_bias>` Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between ``-0.75`` and ``0.0``. Enabling temporal antialiasing (:ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>`) can help reduce the graininess visible when using negative mipmap bias. @@ -10874,7 +11750,7 @@ Affects the final texture sharpness by reading from a lower or higher mipmap (al .. rst-class:: classref-method -void **viewport_set_transparent_background** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enabled **)** +|void| **viewport_set_transparent_background**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_transparent_background>` If ``true``, the viewport renders its background as transparent. @@ -10886,7 +11762,7 @@ If ``true``, the viewport renders its background as transparent. .. rst-class:: classref-method -void **viewport_set_update_mode** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` update_mode **)** +|void| **viewport_set_update_mode**\ (\ viewport\: :ref:`RID<class_RID>`, update_mode\: :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_update_mode>` Sets when the viewport should be updated. See :ref:`ViewportUpdateMode<enum_RenderingServer_ViewportUpdateMode>` constants for options. @@ -10898,7 +11774,7 @@ Sets when the viewport should be updated. See :ref:`ViewportUpdateMode<enum_Rend .. rst-class:: classref-method -void **viewport_set_use_debanding** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** +|void| **viewport_set_use_debanding**\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_debanding>` If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_debanding>`. @@ -10906,11 +11782,25 @@ If ``true``, enables debanding on the specified viewport. Equivalent to :ref:`Pr ---- +.. _class_RenderingServer_method_viewport_set_use_hdr_2d: + +.. rst-class:: classref-method + +|void| **viewport_set_use_hdr_2d**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_hdr_2d>` + +If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>`. + +\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_viewport_set_use_occlusion_culling: .. rst-class:: classref-method -void **viewport_set_use_occlusion_culling** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** +|void| **viewport_set_use_occlusion_culling**\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_occlusion_culling>` If ``true``, enables occlusion culling on the specified viewport. Equivalent to :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling<class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling>`. @@ -10922,7 +11812,7 @@ If ``true``, enables occlusion culling on the specified viewport. Equivalent to .. rst-class:: classref-method -void **viewport_set_use_taa** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` enable **)** +|void| **viewport_set_use_taa**\ (\ viewport\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_taa>` If ``true``, use Temporal Anti-Aliasing. Equivalent to :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_taa<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_taa>`. @@ -10934,7 +11824,7 @@ If ``true``, use Temporal Anti-Aliasing. Equivalent to :ref:`ProjectSettings.ren .. rst-class:: classref-method -void **viewport_set_use_xr** **(** :ref:`RID<class_RID>` viewport, :ref:`bool<class_bool>` use_xr **)** +|void| **viewport_set_use_xr**\ (\ viewport\: :ref:`RID<class_RID>`, use_xr\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_xr>` If ``true``, the viewport uses augmented or virtual reality technologies. See :ref:`XRInterface<class_XRInterface>`. @@ -10946,7 +11836,7 @@ If ``true``, the viewport uses augmented or virtual reality technologies. See :r .. rst-class:: classref-method -void **viewport_set_vrs_mode** **(** :ref:`RID<class_RID>` viewport, :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVRSMode>` mode **)** +|void| **viewport_set_vrs_mode**\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportVRSMode<enum_RenderingServer_ViewportVRSMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_vrs_mode>` Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to :ref:`ProjectSettings.rendering/vrs/mode<class_ProjectSettings_property_rendering/vrs/mode>`. @@ -10958,7 +11848,7 @@ Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not .. rst-class:: classref-method -void **viewport_set_vrs_texture** **(** :ref:`RID<class_RID>` viewport, :ref:`RID<class_RID>` texture **)** +|void| **viewport_set_vrs_texture**\ (\ viewport\: :ref:`RID<class_RID>`, texture\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_vrs_texture>` The texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE<class_RenderingServer_constant_VIEWPORT_VRS_TEXTURE>`. Equivalent to :ref:`ProjectSettings.rendering/vrs/texture<class_ProjectSettings_property_rendering/vrs/texture>`. @@ -10966,11 +11856,25 @@ The texture to use when the VRS mode is set to :ref:`VIEWPORT_VRS_TEXTURE<class_ ---- +.. _class_RenderingServer_method_viewport_set_vrs_update_mode: + +.. rst-class:: classref-method + +|void| **viewport_set_vrs_update_mode**\ (\ viewport\: :ref:`RID<class_RID>`, mode\: :ref:`ViewportVRSUpdateMode<enum_RenderingServer_ViewportVRSUpdateMode>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_vrs_update_mode>` + +Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. + +If set to :ref:`VIEWPORT_VRS_UPDATE_ONCE<class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_ONCE>`, the input texture is copied once and the mode is changed to :ref:`VIEWPORT_VRS_UPDATE_DISABLED<class_RenderingServer_constant_VIEWPORT_VRS_UPDATE_DISABLED>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_visibility_notifier_create: .. rst-class:: classref-method -:ref:`RID<class_RID>` **visibility_notifier_create** **(** **)** +:ref:`RID<class_RID>` **visibility_notifier_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_visibility_notifier_create>` Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``visibility_notifier_*`` RenderingServer functions. @@ -10988,7 +11892,7 @@ To place in a scene, attach this mesh to an instance using :ref:`instance_set_ba .. rst-class:: classref-method -void **visibility_notifier_set_aabb** **(** :ref:`RID<class_RID>` notifier, :ref:`AABB<class_AABB>` aabb **)** +|void| **visibility_notifier_set_aabb**\ (\ notifier\: :ref:`RID<class_RID>`, aabb\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_RenderingServer_method_visibility_notifier_set_aabb>` .. container:: contribute @@ -11002,7 +11906,7 @@ void **visibility_notifier_set_aabb** **(** :ref:`RID<class_RID>` notifier, :ref .. rst-class:: classref-method -void **visibility_notifier_set_callbacks** **(** :ref:`RID<class_RID>` notifier, :ref:`Callable<class_Callable>` enter_callable, :ref:`Callable<class_Callable>` exit_callable **)** +|void| **visibility_notifier_set_callbacks**\ (\ notifier\: :ref:`RID<class_RID>`, enter_callable\: :ref:`Callable<class_Callable>`, exit_callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_RenderingServer_method_visibility_notifier_set_callbacks>` .. container:: contribute @@ -11016,7 +11920,7 @@ void **visibility_notifier_set_callbacks** **(** :ref:`RID<class_RID>` notifier, .. rst-class:: classref-method -void **voxel_gi_allocate_data** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`Transform3D<class_Transform3D>` to_cell_xform, :ref:`AABB<class_AABB>` aabb, :ref:`Vector3i<class_Vector3i>` octree_size, :ref:`PackedByteArray<class_PackedByteArray>` octree_cells, :ref:`PackedByteArray<class_PackedByteArray>` data_cells, :ref:`PackedByteArray<class_PackedByteArray>` distance_field, :ref:`PackedInt32Array<class_PackedInt32Array>` level_counts **)** +|void| **voxel_gi_allocate_data**\ (\ voxel_gi\: :ref:`RID<class_RID>`, to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3i<class_Vector3i>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_allocate_data>` .. container:: contribute @@ -11030,7 +11934,7 @@ void **voxel_gi_allocate_data** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`Tran .. rst-class:: classref-method -:ref:`RID<class_RID>` **voxel_gi_create** **(** **)** +:ref:`RID<class_RID>` **voxel_gi_create**\ (\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_create>` Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all ``voxel_gi_*`` RenderingServer functions. @@ -11046,7 +11950,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_data_cells** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_data_cells**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_data_cells>` .. container:: contribute @@ -11060,7 +11964,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_distance_field** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_distance_field**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_distance_field>` .. container:: contribute @@ -11074,7 +11978,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **voxel_gi_get_level_counts** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **voxel_gi_get_level_counts**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_level_counts>` .. container:: contribute @@ -11088,7 +11992,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_octree_cells** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **voxel_gi_get_octree_cells**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_octree_cells>` .. container:: contribute @@ -11102,7 +12006,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **voxel_gi_get_octree_size** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`Vector3i<class_Vector3i>` **voxel_gi_get_octree_size**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_octree_size>` .. container:: contribute @@ -11116,7 +12020,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **voxel_gi_get_to_cell_xform** **(** :ref:`RID<class_RID>` voxel_gi **)** |const| +:ref:`Transform3D<class_Transform3D>` **voxel_gi_get_to_cell_xform**\ (\ voxel_gi\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_RenderingServer_method_voxel_gi_get_to_cell_xform>` .. container:: contribute @@ -11130,7 +12034,7 @@ Once finished with your RID, you will want to free the RID using the RenderingSe .. rst-class:: classref-method -void **voxel_gi_set_baked_exposure_normalization** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` baked_exposure **)** +|void| **voxel_gi_set_baked_exposure_normalization**\ (\ voxel_gi\: :ref:`RID<class_RID>`, baked_exposure\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_baked_exposure_normalization>` Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see :ref:`camera_attributes_set_exposure<class_RenderingServer_method_camera_attributes_set_exposure>`. @@ -11142,7 +12046,7 @@ Used to inform the renderer what exposure normalization value was used while bak .. rst-class:: classref-method -void **voxel_gi_set_bias** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` bias **)** +|void| **voxel_gi_set_bias**\ (\ voxel_gi\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_bias>` Sets the :ref:`VoxelGIData.bias<class_VoxelGIData_property_bias>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11154,7 +12058,7 @@ Sets the :ref:`VoxelGIData.bias<class_VoxelGIData_property_bias>` value to use o .. rst-class:: classref-method -void **voxel_gi_set_dynamic_range** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` range **)** +|void| **voxel_gi_set_dynamic_range**\ (\ voxel_gi\: :ref:`RID<class_RID>`, range\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_dynamic_range>` Sets the :ref:`VoxelGIData.dynamic_range<class_VoxelGIData_property_dynamic_range>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11166,7 +12070,7 @@ Sets the :ref:`VoxelGIData.dynamic_range<class_VoxelGIData_property_dynamic_rang .. rst-class:: classref-method -void **voxel_gi_set_energy** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` energy **)** +|void| **voxel_gi_set_energy**\ (\ voxel_gi\: :ref:`RID<class_RID>`, energy\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_energy>` Sets the :ref:`VoxelGIData.energy<class_VoxelGIData_property_energy>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11178,7 +12082,7 @@ Sets the :ref:`VoxelGIData.energy<class_VoxelGIData_property_energy>` value to u .. rst-class:: classref-method -void **voxel_gi_set_interior** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`bool<class_bool>` enable **)** +|void| **voxel_gi_set_interior**\ (\ voxel_gi\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_interior>` Sets the :ref:`VoxelGIData.interior<class_VoxelGIData_property_interior>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11190,7 +12094,7 @@ Sets the :ref:`VoxelGIData.interior<class_VoxelGIData_property_interior>` value .. rst-class:: classref-method -void **voxel_gi_set_normal_bias** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` bias **)** +|void| **voxel_gi_set_normal_bias**\ (\ voxel_gi\: :ref:`RID<class_RID>`, bias\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_normal_bias>` Sets the :ref:`VoxelGIData.normal_bias<class_VoxelGIData_property_normal_bias>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11202,7 +12106,7 @@ Sets the :ref:`VoxelGIData.normal_bias<class_VoxelGIData_property_normal_bias>` .. rst-class:: classref-method -void **voxel_gi_set_propagation** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`float<class_float>` amount **)** +|void| **voxel_gi_set_propagation**\ (\ voxel_gi\: :ref:`RID<class_RID>`, amount\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_propagation>` Sets the :ref:`VoxelGIData.propagation<class_VoxelGIData_property_propagation>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11214,7 +12118,7 @@ Sets the :ref:`VoxelGIData.propagation<class_VoxelGIData_property_propagation>` .. rst-class:: classref-method -void **voxel_gi_set_quality** **(** :ref:`VoxelGIQuality<enum_RenderingServer_VoxelGIQuality>` quality **)** +|void| **voxel_gi_set_quality**\ (\ quality\: :ref:`VoxelGIQuality<enum_RenderingServer_VoxelGIQuality>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_quality>` Sets the :ref:`ProjectSettings.rendering/global_illumination/voxel_gi/quality<class_ProjectSettings_property_rendering/global_illumination/voxel_gi/quality>` value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis. @@ -11226,7 +12130,7 @@ Sets the :ref:`ProjectSettings.rendering/global_illumination/voxel_gi/quality<cl .. rst-class:: classref-method -void **voxel_gi_set_use_two_bounces** **(** :ref:`RID<class_RID>` voxel_gi, :ref:`bool<class_bool>` enable **)** +|void| **voxel_gi_set_use_two_bounces**\ (\ voxel_gi\: :ref:`RID<class_RID>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_voxel_gi_set_use_two_bounces>` Sets the :ref:`VoxelGIData.use_two_bounces<class_VoxelGIData_property_use_two_bounces>` value to use on the specified ``voxel_gi``'s :ref:`RID<class_RID>`. @@ -11237,3 +12141,4 @@ Sets the :ref:`VoxelGIData.use_two_bounces<class_VoxelGIData_property_use_two_bo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenebuffers.rst b/classes/class_renderscenebuffers.rst new file mode 100644 index 00000000000..f6a5b3ef58b --- /dev/null +++ b/classes/class_renderscenebuffers.rst @@ -0,0 +1,64 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneBuffers.xml. + +.. _class_RenderSceneBuffers: + +RenderSceneBuffers +================== + +**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`RenderSceneBuffersExtension<class_RenderSceneBuffersExtension>`, :ref:`RenderSceneBuffersRD<class_RenderSceneBuffersRD>` + +Abstract scene buffers object, created for each viewport for which 3D rendering is done. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Abstract scene buffers object, created for each viewport for which 3D rendering is done. It manages any additional buffers used during rendering and will discard buffers when the viewport is resized. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`configure<class_RenderSceneBuffers_method_configure>`\ (\ config\: :ref:`RenderSceneBuffersConfiguration<class_RenderSceneBuffersConfiguration>`\ ) | + +--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderSceneBuffers_method_configure: + +.. rst-class:: classref-method + +|void| **configure**\ (\ config\: :ref:`RenderSceneBuffersConfiguration<class_RenderSceneBuffersConfiguration>`\ ) :ref:`🔗<class_RenderSceneBuffers_method_configure>` + +This method is called by the rendering server when the associated viewports configuration is changed. It will discard the old buffers and recreate the internal buffers used. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenebuffersconfiguration.rst b/classes/class_renderscenebuffersconfiguration.rst new file mode 100644 index 00000000000..848f7adaf2d --- /dev/null +++ b/classes/class_renderscenebuffersconfiguration.rst @@ -0,0 +1,217 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneBuffersConfiguration.xml. + +.. _class_RenderSceneBuffersConfiguration: + +RenderSceneBuffersConfiguration +=============================== + +**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Configuration object used to setup a :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` object. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This configuration object is created and populated by the render engine on a viewport change and used to (re)configure a :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` object. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float<class_float>` | :ref:`fsr_sharpness<class_RenderSceneBuffersConfiguration_property_fsr_sharpness>` | ``0.0`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`internal_size<class_RenderSceneBuffersConfiguration_property_internal_size>` | ``Vector2i(0, 0)`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` | :ref:`msaa_3d<class_RenderSceneBuffersConfiguration_property_msaa_3d>` | ``0`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`RID<class_RID>` | :ref:`render_target<class_RenderSceneBuffersConfiguration_property_render_target>` | ``RID()`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` | :ref:`scaling_3d_mode<class_RenderSceneBuffersConfiguration_property_scaling_3d_mode>` | ``255`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>` | :ref:`screen_space_aa<class_RenderSceneBuffersConfiguration_property_screen_space_aa>` | ``0`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`target_size<class_RenderSceneBuffersConfiguration_property_target_size>` | ``Vector2i(0, 0)`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`float<class_float>` | :ref:`texture_mipmap_bias<class_RenderSceneBuffersConfiguration_property_texture_mipmap_bias>` | ``0.0`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + | :ref:`int<class_int>` | :ref:`view_count<class_RenderSceneBuffersConfiguration_property_view_count>` | ``1`` | + +--------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_RenderSceneBuffersConfiguration_property_fsr_sharpness: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **fsr_sharpness** = ``0.0`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_fsr_sharpness>` + +.. rst-class:: classref-property-setget + +- |void| **set_fsr_sharpness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fsr_sharpness**\ (\ ) + +FSR Sharpness applicable if FSR upscaling is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_internal_size: + +.. rst-class:: classref-property + +:ref:`Vector2i<class_Vector2i>` **internal_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_internal_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_internal_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_internal_size**\ (\ ) + +The size of the 3D render buffer used for rendering. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_msaa_3d: + +.. rst-class:: classref-property + +:ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` **msaa_3d** = ``0`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_msaa_3d>` + +.. rst-class:: classref-property-setget + +- |void| **set_msaa_3d**\ (\ value\: :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>`\ ) +- :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` **get_msaa_3d**\ (\ ) + +The MSAA mode we're using for 3D rendering. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_render_target: + +.. rst-class:: classref-property + +:ref:`RID<class_RID>` **render_target** = ``RID()`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_render_target>` + +.. rst-class:: classref-property-setget + +- |void| **set_render_target**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_render_target**\ (\ ) + +The render target associated with these buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_scaling_3d_mode: + +.. rst-class:: classref-property + +:ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` **scaling_3d_mode** = ``255`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_scaling_3d_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_scaling_3d_mode**\ (\ value\: :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>`\ ) +- :ref:`ViewportScaling3DMode<enum_RenderingServer_ViewportScaling3DMode>` **get_scaling_3d_mode**\ (\ ) + +The requested scaling mode with which we upscale/downscale if :ref:`internal_size<class_RenderSceneBuffersConfiguration_property_internal_size>` and :ref:`target_size<class_RenderSceneBuffersConfiguration_property_target_size>` are not equal. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_screen_space_aa: + +.. rst-class:: classref-property + +:ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>` **screen_space_aa** = ``0`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_screen_space_aa>` + +.. rst-class:: classref-property-setget + +- |void| **set_screen_space_aa**\ (\ value\: :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>`\ ) +- :ref:`ViewportScreenSpaceAA<enum_RenderingServer_ViewportScreenSpaceAA>` **get_screen_space_aa**\ (\ ) + +The requested screen space AA applied in post processing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_target_size: + +.. rst-class:: classref-property + +:ref:`Vector2i<class_Vector2i>` **target_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_target_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_target_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_target_size**\ (\ ) + +The target (upscale) size if scaling is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_texture_mipmap_bias: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **texture_mipmap_bias** = ``0.0`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_texture_mipmap_bias>` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_mipmap_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_mipmap_bias**\ (\ ) + +Bias applied to mipmaps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersConfiguration_property_view_count: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **view_count** = ``1`` :ref:`🔗<class_RenderSceneBuffersConfiguration_property_view_count>` + +.. rst-class:: classref-property-setget + +- |void| **set_view_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_view_count**\ (\ ) + +The number of views we're rendering. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenebuffersextension.rst b/classes/class_renderscenebuffersextension.rst new file mode 100644 index 00000000000..0fe292eb0bc --- /dev/null +++ b/classes/class_renderscenebuffersextension.rst @@ -0,0 +1,102 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneBuffersExtension.xml. + +.. _class_RenderSceneBuffersExtension: + +RenderSceneBuffersExtension +=========================== + +**Inherits:** :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +This class allows for a RenderSceneBuffer implementation to be made in GDExtension. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class allows for a RenderSceneBuffer implementation to be made in GDExtension. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_configure<class_RenderSceneBuffersExtension_private_method__configure>`\ (\ config\: :ref:`RenderSceneBuffersConfiguration<class_RenderSceneBuffersConfiguration>`\ ) |virtual| | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_fsr_sharpness<class_RenderSceneBuffersExtension_private_method__set_fsr_sharpness>`\ (\ fsr_sharpness\: :ref:`float<class_float>`\ ) |virtual| | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_texture_mipmap_bias<class_RenderSceneBuffersExtension_private_method__set_texture_mipmap_bias>`\ (\ texture_mipmap_bias\: :ref:`float<class_float>`\ ) |virtual| | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_use_debanding<class_RenderSceneBuffersExtension_private_method__set_use_debanding>`\ (\ use_debanding\: :ref:`bool<class_bool>`\ ) |virtual| | + +--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderSceneBuffersExtension_private_method__configure: + +.. rst-class:: classref-method + +|void| **_configure**\ (\ config\: :ref:`RenderSceneBuffersConfiguration<class_RenderSceneBuffersConfiguration>`\ ) |virtual| :ref:`🔗<class_RenderSceneBuffersExtension_private_method__configure>` + +Implement this in GDExtension to handle the (re)sizing of a viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersExtension_private_method__set_fsr_sharpness: + +.. rst-class:: classref-method + +|void| **_set_fsr_sharpness**\ (\ fsr_sharpness\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_RenderSceneBuffersExtension_private_method__set_fsr_sharpness>` + +Implement this in GDExtension to record a new FSR sharpness value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersExtension_private_method__set_texture_mipmap_bias: + +.. rst-class:: classref-method + +|void| **_set_texture_mipmap_bias**\ (\ texture_mipmap_bias\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_RenderSceneBuffersExtension_private_method__set_texture_mipmap_bias>` + +Implement this in GDExtension to change the texture mipmap bias. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersExtension_private_method__set_use_debanding: + +.. rst-class:: classref-method + +|void| **_set_use_debanding**\ (\ use_debanding\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_RenderSceneBuffersExtension_private_method__set_use_debanding>` + +Implement this in GDExtension to react to the debanding flag changing. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenebuffersrd.rst b/classes/class_renderscenebuffersrd.rst new file mode 100644 index 00000000000..44cf432275c --- /dev/null +++ b/classes/class_renderscenebuffersrd.rst @@ -0,0 +1,356 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneBuffersRD.xml. + +.. _class_RenderSceneBuffersRD: + +RenderSceneBuffersRD +==================== + +**Inherits:** :ref:`RenderSceneBuffers<class_RenderSceneBuffers>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Render scene buffer implementation for the RenderingDevice based renderers. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This object manages all 3D rendering buffers for the rendering device based renderers. An instance of this object is created for every viewport that has 3D rendering enabled. + +All buffers are organized in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers. + +Buffers are only guaranteed to exist during rendering of the viewport. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_context<class_RenderSceneBuffersRD_method_clear_context>`\ (\ context\: :ref:`StringName<class_StringName>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_texture<class_RenderSceneBuffersRD_method_create_texture>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, data_format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, usage_bits\: :ref:`int<class_int>`, texture_samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`, size\: :ref:`Vector2i<class_Vector2i>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`, unique\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_texture_from_format<class_RenderSceneBuffersRD_method_create_texture_from_format>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, format\: :ref:`RDTextureFormat<class_RDTextureFormat>`, view\: :ref:`RDTextureView<class_RDTextureView>`, unique\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_texture_view<class_RenderSceneBuffersRD_method_create_texture_view>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, view_name\: :ref:`StringName<class_StringName>`, view\: :ref:`RDTextureView<class_RDTextureView>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_color_layer<class_RenderSceneBuffersRD_method_get_color_layer>`\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_color_texture<class_RenderSceneBuffersRD_method_get_color_texture>`\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_depth_layer<class_RenderSceneBuffersRD_method_get_depth_layer>`\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_depth_texture<class_RenderSceneBuffersRD_method_get_depth_texture>`\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_internal_size<class_RenderSceneBuffersRD_method_get_internal_size>`\ (\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` | :ref:`get_msaa_3d<class_RenderSceneBuffersRD_method_get_msaa_3d>`\ (\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_render_target<class_RenderSceneBuffersRD_method_get_render_target>`\ (\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_texture<class_RenderSceneBuffersRD_method_get_texture>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RDTextureFormat<class_RDTextureFormat>` | :ref:`get_texture_format<class_RenderSceneBuffersRD_method_get_texture_format>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_texture_slice<class_RenderSceneBuffersRD_method_get_texture_slice>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_texture_slice_size<class_RenderSceneBuffersRD_method_get_texture_slice_size>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, mipmap\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_texture_slice_view<class_RenderSceneBuffersRD_method_get_texture_slice_view>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`, view\: :ref:`RDTextureView<class_RDTextureView>`\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_use_taa<class_RenderSceneBuffersRD_method_get_use_taa>`\ (\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_velocity_layer<class_RenderSceneBuffersRD_method_get_velocity_layer>`\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_velocity_texture<class_RenderSceneBuffersRD_method_get_velocity_texture>`\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_view_count<class_RenderSceneBuffersRD_method_get_view_count>`\ (\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_texture<class_RenderSceneBuffersRD_method_has_texture>`\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| | + +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderSceneBuffersRD_method_clear_context: + +.. rst-class:: classref-method + +|void| **clear_context**\ (\ context\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_clear_context>` + +Frees all buffers related to this context. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_create_texture: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **create_texture**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, data_format\: :ref:`DataFormat<enum_RenderingDevice_DataFormat>`, usage_bits\: :ref:`int<class_int>`, texture_samples\: :ref:`TextureSamples<enum_RenderingDevice_TextureSamples>`, size\: :ref:`Vector2i<class_Vector2i>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`, unique\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_create_texture>` + +Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_create_texture_from_format: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **create_texture_from_format**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, format\: :ref:`RDTextureFormat<class_RDTextureFormat>`, view\: :ref:`RDTextureView<class_RDTextureView>`, unique\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_create_texture_from_format>` + +Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_create_texture_view: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **create_texture_view**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, view_name\: :ref:`StringName<class_StringName>`, view\: :ref:`RDTextureView<class_RDTextureView>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_create_texture_view>` + +Create a new texture view for an existing texture and cache this under the given view_name. Will return the existing teture view if it already exists. Will error if the source texture doesn't exist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_color_layer: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_color_layer**\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_color_layer>` + +Returns the specified layer from the color texture we are rendering 3D content to. + +If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_color_texture: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_color_texture**\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_color_texture>` + +Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + +If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_depth_layer: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_depth_layer**\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_depth_layer>` + +Returns the specified layer from the depth texture we are rendering 3D content to. + +If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_depth_texture: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_depth_texture**\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_depth_texture>` + +Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + +If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_internal_size: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **get_internal_size**\ (\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_internal_size>` + +Returns the internal size of the render buffer (size before upscaling) with which textures are created by default. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_msaa_3d: + +.. rst-class:: classref-method + +:ref:`ViewportMSAA<enum_RenderingServer_ViewportMSAA>` **get_msaa_3d**\ (\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_msaa_3d>` + +Returns the applied 3D MSAA mode for this viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_render_target: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_render_target**\ (\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_render_target>` + +Returns the render target associated with this buffers object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_texture**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_texture>` + +Returns a cached texture with this name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture_format: + +.. rst-class:: classref-method + +:ref:`RDTextureFormat<class_RDTextureFormat>` **get_texture_format**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_texture_format>` + +Returns the texture format information with which a cached texture was created. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture_slice: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_texture_slice**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_texture_slice>` + +Returns a specific slice (layer or mipmap) for a cached texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture_slice_size: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **get_texture_slice_size**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, mipmap\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_texture_slice_size>` + +Returns the texture size of a given slice of a cached texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture_slice_view: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_texture_slice_view**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, layer\: :ref:`int<class_int>`, mipmap\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`, mipmaps\: :ref:`int<class_int>`, view\: :ref:`RDTextureView<class_RDTextureView>`\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_texture_slice_view>` + +Returns a specific view of a slice (layer or mipmap) for a cached texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_use_taa: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **get_use_taa**\ (\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_use_taa>` + +Returns ``true`` if TAA is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_velocity_layer: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_velocity_layer**\ (\ layer\: :ref:`int<class_int>`, msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_velocity_layer>` + +Returns the specified layer from the velocity texture we are rendering 3D content to. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_velocity_texture: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_velocity_texture**\ (\ msaa\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RenderSceneBuffersRD_method_get_velocity_texture>` + +Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + +If ``msaa`` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_view_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_view_count**\ (\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_get_view_count>` + +Returns the view count for the associated viewport. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_has_texture: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_texture**\ (\ context\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_RenderSceneBuffersRD_method_has_texture>` + +Returns ``true`` if a cached texture exists for this name. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenedata.rst b/classes/class_renderscenedata.rst new file mode 100644 index 00000000000..3391d9f10ed --- /dev/null +++ b/classes/class_renderscenedata.rst @@ -0,0 +1,140 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneData.xml. + +.. _class_RenderSceneData: + +RenderSceneData +=============== + +**Inherits:** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`RenderSceneDataExtension<class_RenderSceneDataExtension>`, :ref:`RenderSceneDataRD<class_RenderSceneDataRD>` + +Abstract render data object, holds scene data related to rendering a single frame of a viewport. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Abstract scene data object, exists for the duration of rendering a single viewport. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`get_cam_projection<class_RenderSceneData_method_get_cam_projection>`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_cam_transform<class_RenderSceneData_method_get_cam_transform>`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_uniform_buffer<class_RenderSceneData_method_get_uniform_buffer>`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_view_count<class_RenderSceneData_method_get_view_count>`\ (\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_view_eye_offset<class_RenderSceneData_method_get_view_eye_offset>`\ (\ view\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`get_view_projection<class_RenderSceneData_method_get_view_projection>`\ (\ view\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderSceneData_method_get_cam_projection: + +.. rst-class:: classref-method + +:ref:`Projection<class_Projection>` **get_cam_projection**\ (\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_cam_projection>` + +Returns the camera projection used to render this frame. + +\ **Note:** If more than one view is rendered, this will return a combined projection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneData_method_get_cam_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D<class_Transform3D>` **get_cam_transform**\ (\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_cam_transform>` + +Returns the camera transform used to render this frame. + +\ **Note:** If more than one view is rendered, this will return a centered transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneData_method_get_uniform_buffer: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_uniform_buffer**\ (\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_uniform_buffer>` + +Return the :ref:`RID<class_RID>` of the uniform buffer containing the scene data as a UBO. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneData_method_get_view_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_view_count**\ (\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_view_count>` + +Returns the number of views being rendered. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneData_method_get_view_eye_offset: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **get_view_eye_offset**\ (\ view\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_view_eye_offset>` + +Returns the eye offset per view used to render this frame. This is the offset between our camera transform and the eye transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneData_method_get_view_projection: + +.. rst-class:: classref-method + +:ref:`Projection<class_Projection>` **get_view_projection**\ (\ view\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_RenderSceneData_method_get_view_projection>` + +Returns the view projection per view used to render this frame. + +\ **Note:** If a single view is rendered, this returns the camera projection. If more than one view is rendered, this will return a projection for the given view including the eye offset. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenedataextension.rst b/classes/class_renderscenedataextension.rst new file mode 100644 index 00000000000..9054b1cdb9e --- /dev/null +++ b/classes/class_renderscenedataextension.rst @@ -0,0 +1,130 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneDataExtension.xml. + +.. _class_RenderSceneDataExtension: + +RenderSceneDataExtension +======================== + +**Inherits:** :ref:`RenderSceneData<class_RenderSceneData>` **<** :ref:`Object<class_Object>` + +This class allows for a RenderSceneData implementation to be made in GDExtension. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class allows for a RenderSceneData implementation to be made in GDExtension. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`_get_cam_projection<class_RenderSceneDataExtension_private_method__get_cam_projection>`\ (\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_cam_transform<class_RenderSceneDataExtension_private_method__get_cam_transform>`\ (\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_uniform_buffer<class_RenderSceneDataExtension_private_method__get_uniform_buffer>`\ (\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_view_count<class_RenderSceneDataExtension_private_method__get_view_count>`\ (\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`_get_view_eye_offset<class_RenderSceneDataExtension_private_method__get_view_eye_offset>`\ (\ view\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection<class_Projection>` | :ref:`_get_view_projection<class_RenderSceneDataExtension_private_method__get_view_projection>`\ (\ view\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_RenderSceneDataExtension_private_method__get_cam_projection: + +.. rst-class:: classref-method + +:ref:`Projection<class_Projection>` **_get_cam_projection**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_cam_projection>` + +Implement this in GDExtension to return the camera :ref:`Projection<class_Projection>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneDataExtension_private_method__get_cam_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D<class_Transform3D>` **_get_cam_transform**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_cam_transform>` + +Implement this in GDExtension to return the camera :ref:`Transform3D<class_Transform3D>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneDataExtension_private_method__get_uniform_buffer: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **_get_uniform_buffer**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_uniform_buffer>` + +Implement this in GDExtension to return the :ref:`RID<class_RID>` of the uniform buffer containing the scene data as a UBO. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneDataExtension_private_method__get_view_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_view_count**\ (\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_view_count>` + +Implement this in GDExtension to return the view count. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneDataExtension_private_method__get_view_eye_offset: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **_get_view_eye_offset**\ (\ view\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_view_eye_offset>` + +Implement this in GDExtension to return the eye offset for the given ``view``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneDataExtension_private_method__get_view_projection: + +.. rst-class:: classref-method + +:ref:`Projection<class_Projection>` **_get_view_projection**\ (\ view\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_RenderSceneDataExtension_private_method__get_view_projection>` + +Implement this in GDExtension to return the view :ref:`Projection<class_Projection>` for the given ``view``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_renderscenedatard.rst b/classes/class_renderscenedatard.rst new file mode 100644 index 00000000000..c95cc7b3023 --- /dev/null +++ b/classes/class_renderscenedatard.rst @@ -0,0 +1,33 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/RenderSceneDataRD.xml. + +.. _class_RenderSceneDataRD: + +RenderSceneDataRD +================= + +**Inherits:** :ref:`RenderSceneData<class_RenderSceneData>` **<** :ref:`Object<class_Object>` + +Render scene data implementation for the RenderingDevice based renderers. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Object holds scene data related to rendering a single frame of a viewport. + +\ **Note:** This is an internal rendering server object, do not instantiate this from script. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resource.rst b/classes/class_resource.rst index 98e55ffd2a1..14f3dd0285e 100644 --- a/classes/class_resource.rst +++ b/classes/class_resource.rst @@ -12,7 +12,7 @@ Resource **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`Animation<class_Animation>`, :ref:`AnimationLibrary<class_AnimationLibrary>`, :ref:`AnimationNode<class_AnimationNode>`, :ref:`AnimationNodeStateMachinePlayback<class_AnimationNodeStateMachinePlayback>`, :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>`, :ref:`AudioBusLayout<class_AudioBusLayout>`, :ref:`AudioEffect<class_AudioEffect>`, :ref:`AudioStream<class_AudioStream>`, :ref:`BitMap<class_BitMap>`, :ref:`BoneMap<class_BoneMap>`, :ref:`ButtonGroup<class_ButtonGroup>`, :ref:`CameraAttributes<class_CameraAttributes>`, :ref:`CryptoKey<class_CryptoKey>`, :ref:`Curve<class_Curve>`, :ref:`Curve2D<class_Curve2D>`, :ref:`Curve3D<class_Curve3D>`, :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`, :ref:`EditorSettings<class_EditorSettings>`, :ref:`Environment<class_Environment>`, :ref:`Font<class_Font>`, :ref:`GDExtension<class_GDExtension>`, :ref:`GLTFAccessor<class_GLTFAccessor>`, :ref:`GLTFAnimation<class_GLTFAnimation>`, :ref:`GLTFBufferView<class_GLTFBufferView>`, :ref:`GLTFCamera<class_GLTFCamera>`, :ref:`GLTFDocument<class_GLTFDocument>`, :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, :ref:`GLTFLight<class_GLTFLight>`, :ref:`GLTFMesh<class_GLTFMesh>`, :ref:`GLTFNode<class_GLTFNode>`, :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>`, :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>`, :ref:`GLTFSkeleton<class_GLTFSkeleton>`, :ref:`GLTFSkin<class_GLTFSkin>`, :ref:`GLTFSpecGloss<class_GLTFSpecGloss>`, :ref:`GLTFState<class_GLTFState>`, :ref:`GLTFTexture<class_GLTFTexture>`, :ref:`GLTFTextureSampler<class_GLTFTextureSampler>`, :ref:`Gradient<class_Gradient>`, :ref:`Image<class_Image>`, :ref:`ImporterMesh<class_ImporterMesh>`, :ref:`InputEvent<class_InputEvent>`, :ref:`JSON<class_JSON>`, :ref:`LabelSettings<class_LabelSettings>`, :ref:`LightmapGIData<class_LightmapGIData>`, :ref:`Material<class_Material>`, :ref:`Mesh<class_Mesh>`, :ref:`MeshLibrary<class_MeshLibrary>`, :ref:`MissingResource<class_MissingResource>`, :ref:`MultiMesh<class_MultiMesh>`, :ref:`NavigationMesh<class_NavigationMesh>`, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, :ref:`NavigationPolygon<class_NavigationPolygon>`, :ref:`Noise<class_Noise>`, :ref:`Occluder3D<class_Occluder3D>`, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>`, :ref:`OggPacketSequence<class_OggPacketSequence>`, :ref:`OpenXRAction<class_OpenXRAction>`, :ref:`OpenXRActionMap<class_OpenXRActionMap>`, :ref:`OpenXRActionSet<class_OpenXRActionSet>`, :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`, :ref:`OpenXRIPBinding<class_OpenXRIPBinding>`, :ref:`PackedDataContainer<class_PackedDataContainer>`, :ref:`PackedScene<class_PackedScene>`, :ref:`PhysicsMaterial<class_PhysicsMaterial>`, :ref:`PolygonPathFinder<class_PolygonPathFinder>`, :ref:`RDShaderFile<class_RDShaderFile>`, :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, :ref:`RichTextEffect<class_RichTextEffect>`, :ref:`SceneReplicationConfig<class_SceneReplicationConfig>`, :ref:`Script<class_Script>`, :ref:`Shader<class_Shader>`, :ref:`ShaderInclude<class_ShaderInclude>`, :ref:`Shape2D<class_Shape2D>`, :ref:`Shape3D<class_Shape3D>`, :ref:`Shortcut<class_Shortcut>`, :ref:`SkeletonModification2D<class_SkeletonModification2D>`, :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`, :ref:`SkeletonProfile<class_SkeletonProfile>`, :ref:`Skin<class_Skin>`, :ref:`Sky<class_Sky>`, :ref:`SpriteFrames<class_SpriteFrames>`, :ref:`StyleBox<class_StyleBox>`, :ref:`SyntaxHighlighter<class_SyntaxHighlighter>`, :ref:`Texture<class_Texture>`, :ref:`Theme<class_Theme>`, :ref:`TileMapPattern<class_TileMapPattern>`, :ref:`TileSet<class_TileSet>`, :ref:`TileSetSource<class_TileSetSource>`, :ref:`Translation<class_Translation>`, :ref:`VideoStream<class_VideoStream>`, :ref:`VideoStreamPlayback<class_VideoStreamPlayback>`, :ref:`VisualShaderNode<class_VisualShaderNode>`, :ref:`VoxelGIData<class_VoxelGIData>`, :ref:`World2D<class_World2D>`, :ref:`World3D<class_World3D>`, :ref:`X509Certificate<class_X509Certificate>` +**Inherited By:** :ref:`Animation<class_Animation>`, :ref:`AnimationLibrary<class_AnimationLibrary>`, :ref:`AnimationNode<class_AnimationNode>`, :ref:`AnimationNodeStateMachinePlayback<class_AnimationNodeStateMachinePlayback>`, :ref:`AnimationNodeStateMachineTransition<class_AnimationNodeStateMachineTransition>`, :ref:`AudioBusLayout<class_AudioBusLayout>`, :ref:`AudioEffect<class_AudioEffect>`, :ref:`AudioStream<class_AudioStream>`, :ref:`BitMap<class_BitMap>`, :ref:`BoneMap<class_BoneMap>`, :ref:`ButtonGroup<class_ButtonGroup>`, :ref:`CameraAttributes<class_CameraAttributes>`, :ref:`Compositor<class_Compositor>`, :ref:`CompositorEffect<class_CompositorEffect>`, :ref:`CryptoKey<class_CryptoKey>`, :ref:`Curve<class_Curve>`, :ref:`Curve2D<class_Curve2D>`, :ref:`Curve3D<class_Curve3D>`, :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`, :ref:`EditorSettings<class_EditorSettings>`, :ref:`Environment<class_Environment>`, :ref:`Font<class_Font>`, :ref:`GDExtension<class_GDExtension>`, :ref:`GLTFAccessor<class_GLTFAccessor>`, :ref:`GLTFAnimation<class_GLTFAnimation>`, :ref:`GLTFBufferView<class_GLTFBufferView>`, :ref:`GLTFCamera<class_GLTFCamera>`, :ref:`GLTFDocument<class_GLTFDocument>`, :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>`, :ref:`GLTFLight<class_GLTFLight>`, :ref:`GLTFMesh<class_GLTFMesh>`, :ref:`GLTFNode<class_GLTFNode>`, :ref:`GLTFPhysicsBody<class_GLTFPhysicsBody>`, :ref:`GLTFPhysicsShape<class_GLTFPhysicsShape>`, :ref:`GLTFSkeleton<class_GLTFSkeleton>`, :ref:`GLTFSkin<class_GLTFSkin>`, :ref:`GLTFSpecGloss<class_GLTFSpecGloss>`, :ref:`GLTFState<class_GLTFState>`, :ref:`GLTFTexture<class_GLTFTexture>`, :ref:`GLTFTextureSampler<class_GLTFTextureSampler>`, :ref:`Gradient<class_Gradient>`, :ref:`Image<class_Image>`, :ref:`ImporterMesh<class_ImporterMesh>`, :ref:`InputEvent<class_InputEvent>`, :ref:`JSON<class_JSON>`, :ref:`LabelSettings<class_LabelSettings>`, :ref:`LightmapGIData<class_LightmapGIData>`, :ref:`Material<class_Material>`, :ref:`Mesh<class_Mesh>`, :ref:`MeshLibrary<class_MeshLibrary>`, :ref:`MissingResource<class_MissingResource>`, :ref:`MultiMesh<class_MultiMesh>`, :ref:`NavigationMesh<class_NavigationMesh>`, :ref:`NavigationMeshSourceGeometryData2D<class_NavigationMeshSourceGeometryData2D>`, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, :ref:`NavigationPolygon<class_NavigationPolygon>`, :ref:`Noise<class_Noise>`, :ref:`Occluder3D<class_Occluder3D>`, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>`, :ref:`OggPacketSequence<class_OggPacketSequence>`, :ref:`OpenXRAction<class_OpenXRAction>`, :ref:`OpenXRActionMap<class_OpenXRActionMap>`, :ref:`OpenXRActionSet<class_OpenXRActionSet>`, :ref:`OpenXRInteractionProfile<class_OpenXRInteractionProfile>`, :ref:`OpenXRIPBinding<class_OpenXRIPBinding>`, :ref:`PackedDataContainer<class_PackedDataContainer>`, :ref:`PackedScene<class_PackedScene>`, :ref:`PhysicsMaterial<class_PhysicsMaterial>`, :ref:`PolygonPathFinder<class_PolygonPathFinder>`, :ref:`RDShaderFile<class_RDShaderFile>`, :ref:`RDShaderSPIRV<class_RDShaderSPIRV>`, :ref:`RichTextEffect<class_RichTextEffect>`, :ref:`SceneReplicationConfig<class_SceneReplicationConfig>`, :ref:`Script<class_Script>`, :ref:`Shader<class_Shader>`, :ref:`ShaderInclude<class_ShaderInclude>`, :ref:`Shape2D<class_Shape2D>`, :ref:`Shape3D<class_Shape3D>`, :ref:`Shortcut<class_Shortcut>`, :ref:`SkeletonModification2D<class_SkeletonModification2D>`, :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`, :ref:`SkeletonProfile<class_SkeletonProfile>`, :ref:`Skin<class_Skin>`, :ref:`Sky<class_Sky>`, :ref:`SpriteFrames<class_SpriteFrames>`, :ref:`StyleBox<class_StyleBox>`, :ref:`SyntaxHighlighter<class_SyntaxHighlighter>`, :ref:`Texture<class_Texture>`, :ref:`Theme<class_Theme>`, :ref:`TileMapPattern<class_TileMapPattern>`, :ref:`TileSet<class_TileSet>`, :ref:`TileSetSource<class_TileSetSource>`, :ref:`Translation<class_Translation>`, :ref:`VideoStream<class_VideoStream>`, :ref:`VideoStreamPlayback<class_VideoStreamPlayback>`, :ref:`VisualShaderNode<class_VisualShaderNode>`, :ref:`VoxelGIData<class_VoxelGIData>`, :ref:`World2D<class_World2D>`, :ref:`World3D<class_World3D>`, :ref:`X509Certificate<class_X509Certificate>` Base class for serializable objects. @@ -21,11 +21,13 @@ Base class for serializable objects. Description ----------- -Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from :ref:`RefCounted<class_RefCounted>`, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. Once loaded from disk, further attempts to load a resource by :ref:`resource_path<class_Resource_property_resource_path>` returns the same reference. :ref:`PackedScene<class_PackedScene>`, one of the most common :ref:`Object<class_Object>`\ s in a Godot project, is also a resource, uniquely capable of storing and instantiating the :ref:`Node<class_Node>`\ s it contains as many times as desired. +Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from :ref:`RefCounted<class_RefCounted>`, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. :ref:`PackedScene<class_PackedScene>`, one of the most common :ref:`Object<class_Object>`\ s in a Godot project, is also a resource, uniquely capable of storing and instantiating the :ref:`Node<class_Node>`\ s it contains as many times as desired. In GDScript, resources can loaded from disk by their :ref:`resource_path<class_Resource_property_resource_path>` using :ref:`@GDScript.load<class_@GDScript_method_load>` or :ref:`@GDScript.preload<class_@GDScript_method_preload>`. -\ **Note:** In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. +The engine keeps a global cache of all loaded resources, referenced by paths (see :ref:`ResourceLoader.has_cached<class_ResourceLoader_method_has_cached>`). A resource will be cached when loaded for the first time and removed from cache once all references are released. When a resource is cached, subsequent loads using its path will return the cached reference. + +\ **Note:** In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will remain in memory for a while before being removed. .. rst-class:: classref-introduction-group @@ -44,13 +46,15 @@ Properties .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` | ``false`` | - +-----------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`String<class_String>` | :ref:`resource_name<class_Resource_property_resource_name>` | ``""`` | - +-----------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`String<class_String>` | :ref:`resource_path<class_Resource_property_resource_path>` | ``""`` | - +-----------------------------+---------------------------------------------------------------------------------+-----------+ + +-----------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` | ``false`` | + +-----------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`resource_name<class_Resource_property_resource_name>` | ``""`` | + +-----------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`resource_path<class_Resource_property_resource_path>` | ``""`` | + +-----------------------------+-----------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`resource_scene_unique_id<class_Resource_property_resource_scene_unique_id>` | | + +-----------------------------+-----------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -60,21 +64,25 @@ Methods .. table:: :widths: auto - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_get_rid<class_Resource_method__get_rid>` **(** **)** |virtual| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`duplicate<class_Resource_method_duplicate>` **(** :ref:`bool<class_bool>` subresources=false **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`emit_changed<class_Resource_method_emit_changed>` **(** **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_local_scene<class_Resource_method_get_local_scene>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_Resource_method_get_rid>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`setup_local_to_scene<class_Resource_method_setup_local_to_scene>` **(** **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`take_over_path<class_Resource_method_take_over_path>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_get_rid<class_Resource_private_method__get_rid>`\ (\ ) |virtual| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_setup_local_to_scene<class_Resource_private_method__setup_local_to_scene>`\ (\ ) |virtual| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`duplicate<class_Resource_method_duplicate>`\ (\ subresources\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit_changed<class_Resource_method_emit_changed>`\ (\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`generate_scene_unique_id<class_Resource_method_generate_scene_unique_id>`\ (\ ) |static| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_local_scene<class_Resource_method_get_local_scene>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_Resource_method_get_rid>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup_local_to_scene<class_Resource_method_setup_local_to_scene>`\ (\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`take_over_path<class_Resource_method_take_over_path>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -89,7 +97,7 @@ Signals .. rst-class:: classref-signal -**changed** **(** **)** +**changed**\ (\ ) :ref:`🔗<class_Resource_signal_changed>` Emitted when the resource changes, usually when one of its properties is modified. See also :ref:`emit_changed<class_Resource_method_emit_changed>`. @@ -103,9 +111,11 @@ Emitted when the resource changes, usually when one of its properties is modifie .. rst-class:: classref-signal -**setup_local_to_scene_requested** **(** **)** +**setup_local_to_scene_requested**\ (\ ) :ref:`🔗<class_Resource_signal_setup_local_to_scene_requested>` + +**Deprecated:** This signal is only emitted when the resource is created. Override :ref:`_setup_local_to_scene<class_Resource_private_method__setup_local_to_scene>` instead. -Emitted when :ref:`setup_local_to_scene<class_Resource_method_setup_local_to_scene>` is called, usually by a newly duplicated resource with :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` set to ``true``. Custom behavior can be defined by connecting this signal. +Emitted by a newly duplicated resource with :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` set to ``true``. .. rst-class:: classref-section-separator @@ -120,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **resource_local_to_scene** = ``false`` +:ref:`bool<class_bool>` **resource_local_to_scene** = ``false`` :ref:`🔗<class_Resource_property_resource_local_to_scene>` .. rst-class:: classref-property-setget -- void **set_local_to_scene** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_local_to_scene** **(** **)** +- |void| **set_local_to_scene**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_local_to_scene**\ (\ ) If ``true``, the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>`). @@ -139,15 +149,17 @@ If ``true``, the resource is duplicated for each instance of all scenes using it .. rst-class:: classref-property -:ref:`String<class_String>` **resource_name** = ``""`` +:ref:`String<class_String>` **resource_name** = ``""`` :ref:`🔗<class_Resource_property_resource_name>` .. rst-class:: classref-property-setget -- void **set_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_name** **(** **)** +- |void| **set_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_name**\ (\ ) An optional name for this resource. When defined, its value is displayed to represent the resource in the Inspector dock. For built-in scripts, the name is displayed as part of the tab name in the script editor. +\ **Note:** Some resource formats do not support resource names. You can still set the name in the editor or via code, but it will be lost when the resource is reloaded. For example, only built-in scripts can have a resource name, while scripts stored in separate files cannot. + .. rst-class:: classref-item-separator ---- @@ -156,17 +168,40 @@ An optional name for this resource. When defined, its value is displayed to repr .. rst-class:: classref-property -:ref:`String<class_String>` **resource_path** = ``""`` +:ref:`String<class_String>` **resource_path** = ``""`` :ref:`🔗<class_Resource_property_resource_path>` .. rst-class:: classref-property-setget -- void **set_path** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_path** **(** **)** +- |void| **set_path**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_path**\ (\ ) The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the :ref:`PackedScene<class_PackedScene>`'s filepath, followed by a unique identifier. \ **Note:** Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use :ref:`take_over_path<class_Resource_method_take_over_path>`. +.. rst-class:: classref-item-separator + +---- + +.. _class_Resource_property_resource_scene_unique_id: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **resource_scene_unique_id** :ref:`🔗<class_Resource_property_resource_scene_unique_id>` + +.. rst-class:: classref-property-setget + +- |void| **set_scene_unique_id**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_scene_unique_id**\ (\ ) + +An unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a :ref:`PackedScene<class_PackedScene>`. If the resource is not inside a scene, this property is empty by default. + +\ **Note:** When the :ref:`PackedScene<class_PackedScene>` is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from :ref:`generate_scene_unique_id<class_Resource_method_generate_scene_unique_id>`. + +\ **Note:** Setting this property does not emit the :ref:`changed<class_Resource_signal_changed>` signal. + +\ **Warning:** When setting, the ID must only consist of letters, numbers, and underscores. Otherwise, it will fail and default to a randomly generated ID. + .. rst-class:: classref-section-separator ---- @@ -176,11 +211,11 @@ The unique path to this resource. If it has been saved to disk, the value will b Method Descriptions ------------------- -.. _class_Resource_method__get_rid: +.. _class_Resource_private_method__get_rid: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_get_rid** **(** **)** |virtual| +:ref:`RID<class_RID>` **_get_rid**\ (\ ) |virtual| :ref:`🔗<class_Resource_private_method__get_rid>` Override this method to return a custom :ref:`RID<class_RID>` when :ref:`get_rid<class_Resource_method_get_rid>` is called. @@ -188,11 +223,34 @@ Override this method to return a custom :ref:`RID<class_RID>` when :ref:`get_rid ---- +.. _class_Resource_private_method__setup_local_to_scene: + +.. rst-class:: classref-method + +|void| **_setup_local_to_scene**\ (\ ) |virtual| :ref:`🔗<class_Resource_private_method__setup_local_to_scene>` + +Override this method to customize the newly duplicated resource created from :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>`, if the original's :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` is set to ``true``. + +\ **Example:** Set a random ``damage`` value to every local resource from an instantiated scene. + +:: + + extends Resource + + var damage = 0 + + func _setup_local_to_scene(): + damage = randi_range(10, 40) + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_method_duplicate: .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **duplicate** **(** :ref:`bool<class_bool>` subresources=false **)** |const| +:ref:`Resource<class_Resource>` **duplicate**\ (\ subresources\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Resource_method_duplicate>` Duplicates this resource, returning a new resource with its ``export``\ ed or :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE<class_@GlobalScope_constant_PROPERTY_USAGE_STORAGE>` properties copied from the original. @@ -200,7 +258,7 @@ If ``subresources`` is ``false``, a shallow copy is returned; nested resources w Subresource properties with the :ref:`@GlobalScope.PROPERTY_USAGE_ALWAYS_DUPLICATE<class_@GlobalScope_constant_PROPERTY_USAGE_ALWAYS_DUPLICATE>` flag are always duplicated even with ``subresources`` set to ``false``, and properties with the :ref:`@GlobalScope.PROPERTY_USAGE_NEVER_DUPLICATE<class_@GlobalScope_constant_PROPERTY_USAGE_NEVER_DUPLICATE>` flag are never duplicated even with ``subresources`` set to ``true``. -\ **Note:** For custom resources, this method will fail if :ref:`Object._init<class_Object_method__init>` has been defined with required parameters. +\ **Note:** For custom resources, this method will fail if :ref:`Object._init<class_Object_private_method__init>` has been defined with required parameters. .. rst-class:: classref-item-separator @@ -210,9 +268,9 @@ Subresource properties with the :ref:`@GlobalScope.PROPERTY_USAGE_ALWAYS_DUPLICA .. rst-class:: classref-method -void **emit_changed** **(** **)** +|void| **emit_changed**\ (\ ) :ref:`🔗<class_Resource_method_emit_changed>` -Emits the :ref:`changed<class_Resource_signal_changed>` signal. This method is called automatically for built-in resources. +Emits the :ref:`changed<class_Resource_signal_changed>` signal. This method is called automatically for some built-in resources. \ **Note:** For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom :ref:`Object<class_Object>`\ s depending on the resource are properly updated. @@ -228,11 +286,23 @@ Emits the :ref:`changed<class_Resource_signal_changed>` signal. This method is c ---- +.. _class_Resource_method_generate_scene_unique_id: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **generate_scene_unique_id**\ (\ ) |static| :ref:`🔗<class_Resource_method_generate_scene_unique_id>` + +Generates a unique identifier for a resource to be contained inside a :ref:`PackedScene<class_PackedScene>`, based on the current date, time, and a random value. The returned string is only composed of letters (``a`` to ``y``) and numbers (``0`` to ``8``). See also :ref:`resource_scene_unique_id<class_Resource_property_resource_scene_unique_id>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_method_get_local_scene: .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_local_scene** **(** **)** |const| +:ref:`Node<class_Node>` **get_local_scene**\ (\ ) |const| :ref:`🔗<class_Resource_method_get_local_scene>` If :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` is set to ``true`` and the resource has been loaded from a :ref:`PackedScene<class_PackedScene>` instantiation, returns the root :ref:`Node<class_Node>` of the scene where this resource is used. Otherwise, returns ``null``. @@ -244,7 +314,7 @@ If :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_Resource_method_get_rid>` Returns the :ref:`RID<class_RID>` of this resource (or an empty RID). Many resources (such as :ref:`Texture2D<class_Texture2D>`, :ref:`Mesh<class_Mesh>`, and so on) are high-level abstractions of resources stored in a specialized server (:ref:`DisplayServer<class_DisplayServer>`, :ref:`RenderingServer<class_RenderingServer>`, etc.), so this function will return the original :ref:`RID<class_RID>`. @@ -256,25 +326,11 @@ Returns the :ref:`RID<class_RID>` of this resource (or an empty RID). Many resou .. rst-class:: classref-method -void **setup_local_to_scene** **(** **)** - -Emits the :ref:`setup_local_to_scene_requested<class_Resource_signal_setup_local_to_scene_requested>` signal. If :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` is set to ``true``, this method is called from :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` by the newly duplicated resource within the scene instance. - -For most resources, this method performs no logic of its own. Custom behavior can be defined by connecting :ref:`setup_local_to_scene_requested<class_Resource_signal_setup_local_to_scene_requested>` from a script, **not** by overriding this method. +|void| **setup_local_to_scene**\ (\ ) :ref:`🔗<class_Resource_method_setup_local_to_scene>` -\ **Example:** Assign a random value to ``health`` for every duplicated Resource from an instantiated scene, excluding the original. +**Deprecated:** This method should only be called internally. -:: - - extends Resource - - var health = 0 - - func _init(): - setup_local_to_scene_requested.connect(randomize_health) - - func randomize_health(): - health = randi_range(10, 40) +Calls :ref:`_setup_local_to_scene<class_Resource_private_method__setup_local_to_scene>`. If :ref:`resource_local_to_scene<class_Resource_property_resource_local_to_scene>` is set to ``true``, this method is automatically called from :ref:`PackedScene.instantiate<class_PackedScene_method_instantiate>` by the newly duplicated resource within the scene instance. .. rst-class:: classref-item-separator @@ -284,7 +340,7 @@ For most resources, this method performs no logic of its own. Custom behavior ca .. rst-class:: classref-method -void **take_over_path** **(** :ref:`String<class_String>` path **)** +|void| **take_over_path**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Resource_method_take_over_path>` Sets the :ref:`resource_path<class_Resource_property_resource_path>` to ``path``, potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource. @@ -295,3 +351,4 @@ Sets the :ref:`resource_path<class_Resource_property_resource_path>` to ``path`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceformatloader.rst b/classes/class_resourceformatloader.rst index 25ba5342c9a..669503db9be 100644 --- a/classes/class_resourceformatloader.rst +++ b/classes/class_resourceformatloader.rst @@ -33,29 +33,29 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_exists<class_ResourceFormatLoader_method__exists>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_classes_used<class_ResourceFormatLoader_method__get_classes_used>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_dependencies<class_ResourceFormatLoader_method__get_dependencies>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` add_types **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ResourceFormatLoader_method__get_recognized_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_resource_script_class<class_ResourceFormatLoader_method__get_resource_script_class>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_resource_type<class_ResourceFormatLoader_method__get_resource_type>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_resource_uid<class_ResourceFormatLoader_method__get_resource_uid>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles_type<class_ResourceFormatLoader_method__handles_type>` **(** :ref:`StringName<class_StringName>` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_load<class_ResourceFormatLoader_method__load>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` original_path, :ref:`bool<class_bool>` use_sub_threads, :ref:`int<class_int>` cache_mode **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_recognize_path<class_ResourceFormatLoader_method__recognize_path>` **(** :ref:`String<class_String>` path, :ref:`StringName<class_StringName>` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_rename_dependencies<class_ResourceFormatLoader_method__rename_dependencies>` **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` renames **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_exists<class_ResourceFormatLoader_private_method__exists>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_classes_used<class_ResourceFormatLoader_private_method__get_classes_used>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_dependencies<class_ResourceFormatLoader_private_method__get_dependencies>`\ (\ path\: :ref:`String<class_String>`, add_types\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ResourceFormatLoader_private_method__get_recognized_extensions>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_resource_script_class<class_ResourceFormatLoader_private_method__get_resource_script_class>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_resource_type<class_ResourceFormatLoader_private_method__get_resource_type>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_resource_uid<class_ResourceFormatLoader_private_method__get_resource_uid>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles_type<class_ResourceFormatLoader_private_method__handles_type>`\ (\ type\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_load<class_ResourceFormatLoader_private_method__load>`\ (\ path\: :ref:`String<class_String>`, original_path\: :ref:`String<class_String>`, use_sub_threads\: :ref:`bool<class_bool>`, cache_mode\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_recognize_path<class_ResourceFormatLoader_private_method__recognize_path>`\ (\ path\: :ref:`String<class_String>`, type\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_rename_dependencies<class_ResourceFormatLoader_private_method__rename_dependencies>`\ (\ path\: :ref:`String<class_String>`, renames\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +70,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CacheMode**: +enum **CacheMode**: :ref:`🔗<enum_ResourceFormatLoader_CacheMode>` .. _class_ResourceFormatLoader_constant_CACHE_MODE_IGNORE: @@ -78,7 +78,7 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceFormatLoader_CacheMode>` **CACHE_MODE_IGNORE** = ``0`` - +Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with :ref:`CACHE_MODE_REUSE<class_ResourceFormatLoader_constant_CACHE_MODE_REUSE>`. .. _class_ResourceFormatLoader_constant_CACHE_MODE_REUSE: @@ -86,7 +86,7 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceFormatLoader_CacheMode>` **CACHE_MODE_REUSE** = ``1`` - +The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). .. _class_ResourceFormatLoader_constant_CACHE_MODE_REPLACE: @@ -94,7 +94,23 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceFormatLoader_CacheMode>` **CACHE_MODE_REPLACE** = ``2`` +Like :ref:`CACHE_MODE_REUSE<class_ResourceFormatLoader_constant_CACHE_MODE_REUSE>`, but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. + +.. _class_ResourceFormatLoader_constant_CACHE_MODE_IGNORE_DEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode<enum_ResourceFormatLoader_CacheMode>` **CACHE_MODE_IGNORE_DEEP** = ``3`` + +Like :ref:`CACHE_MODE_IGNORE<class_ResourceFormatLoader_constant_CACHE_MODE_IGNORE>`, but propagated recursively down the tree of dependencies (external resources). + +.. _class_ResourceFormatLoader_constant_CACHE_MODE_REPLACE_DEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode<enum_ResourceFormatLoader_CacheMode>` **CACHE_MODE_REPLACE_DEEP** = ``4`` +Like :ref:`CACHE_MODE_REPLACE<class_ResourceFormatLoader_constant_CACHE_MODE_REPLACE>`, but propagated recursively down the tree of dependencies (external resources). .. rst-class:: classref-section-separator @@ -105,11 +121,11 @@ enum **CacheMode**: Method Descriptions ------------------- -.. _class_ResourceFormatLoader_method__exists: +.. _class_ResourceFormatLoader_private_method__exists: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_exists** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`bool<class_bool>` **_exists**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__exists>` .. container:: contribute @@ -119,11 +135,11 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_classes_used: +.. _class_ResourceFormatLoader_private_method__get_classes_used: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_classes_used** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_classes_used**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_classes_used>` .. container:: contribute @@ -133,11 +149,11 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_dependencies: +.. _class_ResourceFormatLoader_private_method__get_dependencies: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_dependencies** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` add_types **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_dependencies**\ (\ path\: :ref:`String<class_String>`, add_types\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_dependencies>` If implemented, gets the dependencies of a given resource. If ``add_types`` is ``true``, paths should be appended ``::TypeName``, where ``TypeName`` is the class name of the dependency. @@ -147,11 +163,11 @@ If implemented, gets the dependencies of a given resource. If ``add_types`` is ` ---- -.. _class_ResourceFormatLoader_method__get_recognized_extensions: +.. _class_ResourceFormatLoader_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_recognized_extensions>` Gets the list of extensions for files this loader is able to read. @@ -159,11 +175,11 @@ Gets the list of extensions for files this loader is able to read. ---- -.. _class_ResourceFormatLoader_method__get_resource_script_class: +.. _class_ResourceFormatLoader_private_method__get_resource_script_class: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_resource_script_class** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`String<class_String>` **_get_resource_script_class**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_resource_script_class>` Returns the script class name associated with the :ref:`Resource<class_Resource>` under the given ``path``. If the resource has no script or the script isn't a named class, it should return ``""``. @@ -171,11 +187,11 @@ Returns the script class name associated with the :ref:`Resource<class_Resource> ---- -.. _class_ResourceFormatLoader_method__get_resource_type: +.. _class_ResourceFormatLoader_private_method__get_resource_type: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_resource_type** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`String<class_String>` **_get_resource_type**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_resource_type>` Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return ``""``. @@ -185,11 +201,11 @@ Gets the class name of the resource associated with the given path. If the loade ---- -.. _class_ResourceFormatLoader_method__get_resource_uid: +.. _class_ResourceFormatLoader_private_method__get_resource_uid: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_resource_uid** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`int<class_int>` **_get_resource_uid**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__get_resource_uid>` .. container:: contribute @@ -199,11 +215,11 @@ Gets the class name of the resource associated with the given path. If the loade ---- -.. _class_ResourceFormatLoader_method__handles_type: +.. _class_ResourceFormatLoader_private_method__handles_type: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles_type** **(** :ref:`StringName<class_StringName>` type **)** |virtual| |const| +:ref:`bool<class_bool>` **_handles_type**\ (\ type\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__handles_type>` Tells which resource class this loader can load. @@ -213,11 +229,11 @@ Tells which resource class this loader can load. ---- -.. _class_ResourceFormatLoader_method__load: +.. _class_ResourceFormatLoader_private_method__load: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_load** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` original_path, :ref:`bool<class_bool>` use_sub_threads, :ref:`int<class_int>` cache_mode **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_load**\ (\ path\: :ref:`String<class_String>`, original_path\: :ref:`String<class_String>`, use_sub_threads\: :ref:`bool<class_bool>`, cache_mode\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__load>` Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, ``original_path`` will target the source file. Returns a :ref:`Resource<class_Resource>` object on success, or an :ref:`Error<enum_@GlobalScope_Error>` constant in case of failure. @@ -227,25 +243,25 @@ The ``cache_mode`` property defines whether and how the cache should be used or ---- -.. _class_ResourceFormatLoader_method__recognize_path: +.. _class_ResourceFormatLoader_private_method__recognize_path: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_recognize_path** **(** :ref:`String<class_String>` path, :ref:`StringName<class_StringName>` type **)** |virtual| |const| +:ref:`bool<class_bool>` **_recognize_path**\ (\ path\: :ref:`String<class_String>`, type\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__recognize_path>` Tells whether or not this loader should load a resource from its resource path for a given type. -If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions<class_ResourceFormatLoader_method__get_recognized_extensions>`, and if the type is within the ones provided by :ref:`_get_resource_type<class_ResourceFormatLoader_method__get_resource_type>`. +If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions<class_ResourceFormatLoader_private_method__get_recognized_extensions>`, and if the type is within the ones provided by :ref:`_get_resource_type<class_ResourceFormatLoader_private_method__get_resource_type>`. .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatLoader_method__rename_dependencies: +.. _class_ResourceFormatLoader_private_method__rename_dependencies: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_rename_dependencies** **(** :ref:`String<class_String>` path, :ref:`Dictionary<class_Dictionary>` renames **)** |virtual| |const| +:ref:`Error<enum_@GlobalScope_Error>` **_rename_dependencies**\ (\ path\: :ref:`String<class_String>`, renames\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatLoader_private_method__rename_dependencies>` If implemented, renames dependencies within the given resource and saves it. ``renames`` is a dictionary ``{ String => String }`` mapping old dependency paths to new paths. @@ -258,3 +274,4 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or an .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceformatsaver.rst b/classes/class_resourceformatsaver.rst index e27850607dd..c78825a92db 100644 --- a/classes/class_resourceformatsaver.rst +++ b/classes/class_resourceformatsaver.rst @@ -31,17 +31,17 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ResourceFormatSaver_method__get_recognized_extensions>` **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_recognize<class_ResourceFormatSaver_method__recognize>` **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_recognize_path<class_ResourceFormatSaver_method__recognize_path>` **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_save<class_ResourceFormatSaver_method__save>` **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_uid<class_ResourceFormatSaver_method__set_uid>` **(** :ref:`String<class_String>` path, :ref:`int<class_int>` uid **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ResourceFormatSaver_private_method__get_recognized_extensions>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_recognize<class_ResourceFormatSaver_private_method__recognize>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_recognize_path<class_ResourceFormatSaver_private_method__recognize_path>`\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_save<class_ResourceFormatSaver_private_method__save>`\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`\ ) |virtual| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_uid<class_ResourceFormatSaver_private_method__set_uid>`\ (\ path\: :ref:`String<class_String>`, uid\: :ref:`int<class_int>`\ ) |virtual| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,23 +52,23 @@ Methods Method Descriptions ------------------- -.. _class_ResourceFormatSaver_method__get_recognized_extensions: +.. _class_ResourceFormatSaver_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatSaver_private_method__get_recognized_extensions>` -Returns the list of extensions available for saving the resource object, provided it is recognized (see :ref:`_recognize<class_ResourceFormatSaver_method__recognize>`). +Returns the list of extensions available for saving the resource object, provided it is recognized (see :ref:`_recognize<class_ResourceFormatSaver_private_method__recognize>`). .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatSaver_method__recognize: +.. _class_ResourceFormatSaver_private_method__recognize: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_recognize** **(** :ref:`Resource<class_Resource>` resource **)** |virtual| |const| +:ref:`bool<class_bool>` **_recognize**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatSaver_private_method__recognize>` Returns whether the given resource object can be saved by this saver. @@ -76,25 +76,25 @@ Returns whether the given resource object can be saved by this saver. ---- -.. _class_ResourceFormatSaver_method__recognize_path: +.. _class_ResourceFormatSaver_private_method__recognize_path: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_recognize_path** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`bool<class_bool>` **_recognize_path**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ResourceFormatSaver_private_method__recognize_path>` Returns ``true`` if this saver handles a given save path and ``false`` otherwise. -If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions<class_ResourceFormatSaver_method__get_recognized_extensions>`. +If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by :ref:`_get_recognized_extensions<class_ResourceFormatSaver_private_method__get_recognized_extensions>`. .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatSaver_method__save: +.. _class_ResourceFormatSaver_private_method__save: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_save** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path, :ref:`int<class_int>` flags **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_save**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ResourceFormatSaver_private_method__save>` Saves the given resource object to a file at the target ``path``. ``flags`` is a bitmask composed with :ref:`SaverFlags<enum_ResourceSaver_SaverFlags>` constants. @@ -104,11 +104,11 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or an ---- -.. _class_ResourceFormatSaver_method__set_uid: +.. _class_ResourceFormatSaver_private_method__set_uid: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_set_uid** **(** :ref:`String<class_String>` path, :ref:`int<class_int>` uid **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_set_uid**\ (\ path\: :ref:`String<class_String>`, uid\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ResourceFormatSaver_private_method__set_uid>` Sets a new UID for the resource at the given ``path``. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or an :ref:`Error<enum_@GlobalScope_Error>` constant in case of failure. @@ -119,3 +119,4 @@ Sets a new UID for the resource at the given ``path``. Returns :ref:`@GlobalScop .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporter.rst b/classes/class_resourceimporter.rst index f896ace5797..0e46655f0b9 100644 --- a/classes/class_resourceimporter.rst +++ b/classes/class_resourceimporter.rst @@ -43,7 +43,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ImportOrder**: +enum **ImportOrder**: :ref:`🔗<enum_ResourceImporter_ImportOrder>` .. _class_ResourceImporter_constant_IMPORT_ORDER_DEFAULT: @@ -68,3 +68,4 @@ The import order for scenes, which ensures scenes are imported *after* all other .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterbitmap.rst b/classes/class_resourceimporterbitmap.rst index 17dbf6c7c49..1afbe2f852e 100644 --- a/classes/class_resourceimporterbitmap.rst +++ b/classes/class_resourceimporterbitmap.rst @@ -12,9 +12,21 @@ ResourceImporterBitMap **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a :ref:`BitMap<class_BitMap>` resource (2D array of boolean values). - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +:ref:`BitMap<class_BitMap>` resources are typically used as click masks in :ref:`TextureButton<class_TextureButton>` and :ref:`TouchScreenButton<class_TouchScreenButton>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group @@ -43,11 +55,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **create_from** = ``0`` +:ref:`int<class_int>` **create_from** = ``0`` :ref:`🔗<class_ResourceImporterBitMap_property_create_from>` + +The data source to use for generating the bitmap. -.. container:: contribute +\ **Black & White:** Pixels whose HSV value is greater than the :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` will be considered as "enabled" (bit is ``true``). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is ``false``). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Alpha:** Pixels whose alpha value is greater than the :ref:`threshold<class_ResourceImporterBitMap_property_threshold>` will be considered as "enabled" (bit is ``true``). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is ``false``). .. rst-class:: classref-item-separator @@ -57,11 +71,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **threshold** = ``0.5`` - -.. container:: contribute +:ref:`float<class_float>` **threshold** = ``0.5`` :ref:`🔗<class_ResourceImporterBitMap_property_threshold>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The threshold to use to determine which bits should be considered enabled or disabled. See also :ref:`create_from<class_ResourceImporterBitMap_property_create_from>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -70,3 +82,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterbmfont.rst b/classes/class_resourceimporterbmfont.rst index 9bd03dc2065..1a7f55c59f1 100644 --- a/classes/class_resourceimporterbmfont.rst +++ b/classes/class_resourceimporterbmfont.rst @@ -12,9 +12,25 @@ ResourceImporterBMFont **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a bitmap font in the BMFont (``.fnt``) format. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +The BMFont format is a format created by the `BMFont <https://www.angelcode.com/products/bmfont/>`__ program. Many BMFont-compatible programs also exist, like `BMGlyph <https://www.bmglyph.com/>`__. + +Compared to :ref:`ResourceImporterImageFont<class_ResourceImporterImageFont>`, **ResourceImporterBMFont** supports bitmap fonts with varying glyph widths/heights. + +See also :ref:`ResourceImporterDynamicFont<class_ResourceImporterDynamicFont>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Bitmap fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ .. rst-class:: classref-reftable-group @@ -24,11 +40,13 @@ Properties .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------+----------+ - | :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterBMFont_property_compress>` | ``true`` | - +---------------------------+-------------------------------------------------------------------+----------+ - | :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterBMFont_property_fallbacks>` | ``[]`` | - +---------------------------+-------------------------------------------------------------------+----------+ + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterBMFont_property_compress>` | ``true`` | + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterBMFont_property_fallbacks>` | ``[]`` | + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`int<class_int>` | :ref:`scaling_mode<class_ResourceImporterBMFont_property_scaling_mode>` | ``2`` | + +---------------------------+-------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -43,11 +61,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress** = ``true`` - -.. container:: contribute +:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterBMFont_property_compress>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, uses lossless compression for the resulting font. .. rst-class:: classref-item-separator @@ -57,11 +73,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **fallbacks** = ``[]`` +:ref:`Array<class_Array>` **fallbacks** = ``[]`` :ref:`🔗<class_ResourceImporterBMFont_property_fallbacks>` + +List of font fallbacks to use if a glyph isn't found in this bitmap font. Fonts at the beginning of the array are attempted first. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterBMFont_property_scaling_mode: + +.. rst-class:: classref-property -.. container:: contribute +:ref:`int<class_int>` **scaling_mode** = ``2`` :ref:`🔗<class_ResourceImporterBMFont_property_scaling_mode>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Font scaling mode. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -70,3 +96,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimportercsvtranslation.rst b/classes/class_resourceimportercsvtranslation.rst index ecdeff021ff..0a2b76a6a91 100644 --- a/classes/class_resourceimportercsvtranslation.rst +++ b/classes/class_resourceimportercsvtranslation.rst @@ -12,9 +12,31 @@ ResourceImporterCSVTranslation **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports comma-separated values - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +Comma-separated values are a plain text table storage format. The format's simplicity makes it easy to edit in any text editor or spreadsheet software. This makes it a common choice for game localization. + +\ **Example CSV file:**\ + +.. code:: text + + keys,en,es,ja + GREET,"Hello, friend!","Hola, amigo!",こんにちは + ASK,How are you?,Cómo está?,元気ですか + BYE,Goodbye,Adiós,さようなら + QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing translations <../tutorials/assets_pipeline/importing_translations>` .. rst-class:: classref-reftable-group @@ -43,11 +65,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress** = ``true`` +:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterCSVTranslation_property_compress>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, creates an :ref:`OptimizedTranslation<class_OptimizedTranslation>` instead of a :ref:`Translation<class_Translation>`. This makes the resulting file smaller at the cost of a small CPU overhead. .. rst-class:: classref-item-separator @@ -57,11 +77,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **delimiter** = ``0`` - -.. container:: contribute +:ref:`int<class_int>` **delimiter** = ``0`` :ref:`🔗<class_ResourceImporterCSVTranslation_property_delimiter>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The delimiter to use in the CSV file. The default value matches the common CSV convention. Tab-separated values are sometimes called TSV files. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -70,3 +88,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterdynamicfont.rst b/classes/class_resourceimporterdynamicfont.rst index 1a6a4eb7788..c0388887f2e 100644 --- a/classes/class_resourceimporterdynamicfont.rst +++ b/classes/class_resourceimporterdynamicfont.rst @@ -12,9 +12,25 @@ ResourceImporterDynamicFont **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a TTF, TTC, OTF, OTC, WOFF or WOFF2 font file for font rendering that adapts to any size. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +Unlike bitmap fonts, dynamic fonts can be resized to any size and still look crisp. Dynamic fonts also optionally support MSDF font rendering, which allows for run-time scale changes with no re-rasterization cost. + +While WOFF and especially WOFF2 tend to result in smaller file sizes, there is no universally "better" font format. In most situations, it's recommended to use the font format that was shipped on the font developer's website. + +See also :ref:`ResourceImporterBMFont<class_ResourceImporterBMFont>` and :ref:`ResourceImporterImageFont<class_ResourceImporterImageFont>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Dynamic fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#dynamic-fonts>`__ .. rst-class:: classref-reftable-group @@ -31,6 +47,8 @@ Properties +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterDynamicFont_property_compress>` | ``true`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps>` | ``true`` | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterDynamicFont_property_fallbacks>` | ``[]`` | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool<class_bool>` | :ref:`force_autohinter<class_ResourceImporterDynamicFont_property_force_autohinter>` | ``false`` | @@ -71,11 +89,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` +:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` :ref:`🔗<class_ResourceImporterDynamicFont_property_allow_system_fallback>` -.. container:: contribute +If ``true``, automatically use system fonts as a fallback if a glyph isn't found in this dynamic font. This makes supporting CJK characters or emoji more straightforward, as you don't need to include a CJK/emoji font in your project. See also :ref:`fallbacks<class_ResourceImporterDynamicFont_property_fallbacks>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** The appearance of system fonts varies across platforms. Loading system fonts is only supported on Windows, macOS, Linux, Android and iOS. .. rst-class:: classref-item-separator @@ -85,11 +103,15 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **antialiasing** = ``1`` +:ref:`int<class_int>` **antialiasing** = ``1`` :ref:`🔗<class_ResourceImporterDynamicFont_property_antialiasing>` -.. container:: contribute +The font antialiasing method to use. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Disabled:** Most suited for pixel art fonts, although you do not *have* to change the antialiasing from the default **Grayscale** if the font file was well-created and the font is used at an integer multiple of its intended size. If pixel art fonts have a bad appearance at their intended size, try setting :ref:`subpixel_positioning<class_ResourceImporterDynamicFont_property_subpixel_positioning>` to **Disabled** instead. + +\ **Grayscale:** Use grayscale antialiasing. This is the approach used by the operating system on macOS, Android and iOS. + +\ **LCD Subpixel:** Use antialiasing with subpixel patterns to make fonts sharper on LCD displays. This is the approach used by the operating system on Windows and most Linux distributions. The downside is that this can introduce "fringing" on edges, especially on display technologies that don't use standard RGB subpixels (such as OLED displays). The LCD subpixel layout is globally controlled by :ref:`ProjectSettings.gui/theme/lcd_subpixel_layout<class_ProjectSettings_property_gui/theme/lcd_subpixel_layout>`, which also allows falling back to grayscale antialiasing. .. rst-class:: classref-item-separator @@ -99,11 +121,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress** = ``true`` +:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterDynamicFont_property_compress>` + +If ``true``, uses lossless compression for the resulting font. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps: -.. container:: contribute +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true`` :ref:`🔗<class_ResourceImporterDynamicFont_property_disable_embedded_bitmaps>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). .. rst-class:: classref-item-separator @@ -113,11 +145,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **fallbacks** = ``[]`` +:ref:`Array<class_Array>` **fallbacks** = ``[]`` :ref:`🔗<class_ResourceImporterDynamicFont_property_fallbacks>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +List of font fallbacks to use if a glyph isn't found in this dynamic font. Fonts at the beginning of the array are attempted first, but fallback fonts that don't support the glyph's language and script are attempted last (see :ref:`language_support<class_ResourceImporterDynamicFont_property_language_support>` and :ref:`script_support<class_ResourceImporterDynamicFont_property_script_support>`). See also :ref:`allow_system_fallback<class_ResourceImporterDynamicFont_property_allow_system_fallback>`. .. rst-class:: classref-item-separator @@ -127,11 +157,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **force_autohinter** = ``false`` - -.. container:: contribute +:ref:`bool<class_bool>` **force_autohinter** = ``false`` :ref:`🔗<class_ResourceImporterDynamicFont_property_force_autohinter>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, forces generation of hinting data for the font using `FreeType <https://freetype.org/>`__'s autohinter. This will make :ref:`hinting<class_ResourceImporterDynamicFont_property_hinting>` effective with fonts that don't include hinting data. .. rst-class:: classref-item-separator @@ -141,11 +169,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` +:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` :ref:`🔗<class_ResourceImporterDynamicFont_property_generate_mipmaps>` -.. container:: contribute +If ``true``, this font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control<class_Control>` is scaled down, or when a :ref:`Label3D<class_Label3D>` is viewed from a long distance (if :ref:`Label3D.texture_filter<class_Label3D_property_texture_filter>` is set to a mode that displays mipmaps). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Enabling :ref:`generate_mipmaps<class_ResourceImporterDynamicFont_property_generate_mipmaps>` increases font generation time and memory usage. Only enable this setting if you actually need it. .. rst-class:: classref-item-separator @@ -155,11 +183,15 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **hinting** = ``1`` +:ref:`int<class_int>` **hinting** = ``1`` :ref:`🔗<class_ResourceImporterDynamicFont_property_hinting>` -.. container:: contribute +The hinting mode to use. This controls how aggressively glyph edges should be snapped to pixels when rasterizing the font. Depending on personal preference, you may prefer using one hinting mode over the other. Hinting modes other than **None** are only effective if the font contains hinting data (see :ref:`force_autohinter<class_ResourceImporterDynamicFont_property_force_autohinter>`). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **None:** Smoothest appearance, which can make the font look blurry at small sizes. + +\ **Light:** Sharp result by snapping glyph edges to pixels on the Y axis only. + +\ **Full:** Sharpest by snapping glyph edges to pixels on both X and Y axes. .. rst-class:: classref-item-separator @@ -169,11 +201,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **language_support** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **language_support** = ``{}`` :ref:`🔗<class_ResourceImporterDynamicFont_property_language_support>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Override the list of languages supported by this font. If left empty, this is supplied by the font metadata. There is usually no need to change this. See also :ref:`script_support<class_ResourceImporterDynamicFont_property_script_support>`. .. rst-class:: classref-item-separator @@ -183,11 +213,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_pixel_range** = ``8`` - -.. container:: contribute +:ref:`int<class_int>` **msdf_pixel_range** = ``8`` :ref:`🔗<class_ResourceImporterDynamicFont_property_msdf_pixel_range>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range<class_ResourceImporterDynamicFont_property_msdf_pixel_range>` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range<class_ResourceImporterDynamicFont_property_msdf_pixel_range>` value of ``8`` allows outline sizes up to ``4`` to look correct. .. rst-class:: classref-item-separator @@ -197,11 +225,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_size** = ``48`` +:ref:`int<class_int>` **msdf_size** = ``48`` :ref:`🔗<class_ResourceImporterDynamicFont_property_msdf_size>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. Only effective if :ref:`multichannel_signed_distance_field<class_ResourceImporterDynamicFont_property_multichannel_signed_distance_field>` is ``true``. .. rst-class:: classref-item-separator @@ -211,11 +237,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` +:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` :ref:`🔗<class_ResourceImporterDynamicFont_property_multichannel_signed_distance_field>` -.. container:: contribute +If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control<class_Control>`\ s that are scaled down (or for :ref:`Label3D<class_Label3D>`\ s viewed from a long distance). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +MSDF font rendering can be combined with :ref:`generate_mipmaps<class_ResourceImporterDynamicFont_property_generate_mipmaps>` to further improve font rendering quality when scaled down. .. rst-class:: classref-item-separator @@ -225,11 +251,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **opentype_features** = ``{}`` - -.. container:: contribute +:ref:`Dictionary<class_Dictionary>` **opentype_features** = ``{}`` :ref:`🔗<class_ResourceImporterDynamicFont_property_opentype_features>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The OpenType features to enable, disable or set a value for this font. This can be used to enable optional features provided by the font, such as ligatures or alternative glyphs. The list of supported OpenType features varies on a per-font basis. .. rst-class:: classref-item-separator @@ -239,11 +263,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **oversampling** = ``0.0`` +:ref:`float<class_float>` **oversampling** = ``0.0`` :ref:`🔗<class_ResourceImporterDynamicFont_property_oversampling>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to a value greater than ``0.0``, overrides the oversampling factor for the font. This can be used to render the font at a higher or lower resolution than intended without affecting its physical size. In most cases, this should be left at ``0.0``. .. rst-class:: classref-item-separator @@ -253,11 +275,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **preload** = ``[]`` - -.. container:: contribute +:ref:`Array<class_Array>` **preload** = ``[]`` :ref:`🔗<class_ResourceImporterDynamicFont_property_preload>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The glyph ranges to prerender. This can avoid stuttering during gameplay when new characters need to be rendered, especially if :ref:`subpixel_positioning<class_ResourceImporterDynamicFont_property_subpixel_positioning>` is enabled. The downside of using preloading is that initial project load times will increase, as well as memory usage. .. rst-class:: classref-item-separator @@ -267,11 +287,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **script_support** = ``{}`` +:ref:`Dictionary<class_Dictionary>` **script_support** = ``{}`` :ref:`🔗<class_ResourceImporterDynamicFont_property_script_support>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Override the list of language scripts supported by this font. If left empty, this is supplied by the font metadata. There is usually no need to change this. See also :ref:`language_support<class_ResourceImporterDynamicFont_property_language_support>`. .. rst-class:: classref-item-separator @@ -281,11 +299,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **subpixel_positioning** = ``1`` +:ref:`int<class_int>` **subpixel_positioning** = ``1`` :ref:`🔗<class_ResourceImporterDynamicFont_property_subpixel_positioning>` + +Subpixel positioning improves font rendering appearance, especially at smaller font sizes. The downside is that it takes more time to initially render the font, which can cause stuttering during gameplay, especially if used with large font sizes. This should be set to **Disabled** for fonts with a pixel art appearance. + +\ **Disabled:** No subpixel positioning. Lowest quality, fastest rendering. + +\ **Auto:** Use subpixel positioning at small font sizes (the chosen quality varies depending on font size). Large fonts will not use subpixel positioning. This is a good tradeoff between performance and quality. -.. container:: contribute +\ **One Half of a Pixel:** Always perform intermediate subpixel positioning regardless of font size. High quality, slow rendering. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **One Quarter of a Pixel:** Always perform precise subpixel positioning regardless of font size. Highest quality, slowest rendering. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -294,3 +318,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterimage.rst b/classes/class_resourceimporterimage.rst index 3e341059a91..c0d25502145 100644 --- a/classes/class_resourceimporterimage.rst +++ b/classes/class_resourceimporterimage.rst @@ -12,9 +12,21 @@ ResourceImporterImage **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a image for use in scripting, with no rendering capabilities. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This importer imports :ref:`Image<class_Image>` resources, as opposed to :ref:`CompressedTexture2D<class_CompressedTexture2D>`. If you need to render the image in 2D or 3D, use :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` instead. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -23,3 +35,4 @@ ResourceImporterImage .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterimagefont.rst b/classes/class_resourceimporterimagefont.rst index 60cfd80ceb7..989f5f61ffb 100644 --- a/classes/class_resourceimporterimagefont.rst +++ b/classes/class_resourceimporterimagefont.rst @@ -12,9 +12,23 @@ ResourceImporterImageFont **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a bitmap font where all glyphs have the same width and height. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This image-based workflow can be easier to use than :ref:`ResourceImporterBMFont<class_ResourceImporterBMFont>`, but it requires all glyphs to have the same width and height, glyph advances and drawing offsets can be customized. This makes **ResourceImporterImageFont** most suited to fixed-width fonts. + +See also :ref:`ResourceImporterDynamicFont<class_ResourceImporterDynamicFont>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Bitmap fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ .. rst-class:: classref-reftable-group @@ -24,6 +38,8 @@ Properties .. table:: :widths: auto + +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int<class_int>` | :ref:`ascent<class_ResourceImporterImageFont_property_ascent>` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`Rect2i<class_Rect2i>` | :ref:`character_margin<class_ResourceImporterImageFont_property_character_margin>` | ``Rect2i(0, 0, 0, 0)`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ @@ -33,12 +49,18 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool<class_bool>` | :ref:`compress<class_ResourceImporterImageFont_property_compress>` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int<class_int>` | :ref:`descent<class_ResourceImporterImageFont_property_descent>` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`Array<class_Array>` | :ref:`fallbacks<class_ResourceImporterImageFont_property_fallbacks>` | ``[]`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`Rect2i<class_Rect2i>` | :ref:`image_margin<class_ResourceImporterImageFont_property_image_margin>` | ``Rect2i(0, 0, 0, 0)`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`kerning_pairs<class_ResourceImporterImageFont_property_kerning_pairs>` | ``PackedStringArray()`` | + +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`int<class_int>` | :ref:`rows<class_ResourceImporterImageFont_property_rows>` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int<class_int>` | :ref:`scaling_mode<class_ResourceImporterImageFont_property_scaling_mode>` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-section-separator @@ -49,15 +71,25 @@ Properties Property Descriptions --------------------- -.. _class_ResourceImporterImageFont_property_character_margin: +.. _class_ResourceImporterImageFont_property_ascent: .. rst-class:: classref-property -:ref:`Rect2i<class_Rect2i>` **character_margin** = ``Rect2i(0, 0, 0, 0)`` +:ref:`int<class_int>` **ascent** = ``0`` :ref:`🔗<class_ResourceImporterImageFont_property_ascent>` + +Font ascent (number of pixels above the baseline). If set to ``0``, half of the character height is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterImageFont_property_character_margin: + +.. rst-class:: classref-property -.. container:: contribute +:ref:`Rect2i<class_Rect2i>` **character_margin** = ``Rect2i(0, 0, 0, 0)`` :ref:`🔗<class_ResourceImporterImageFont_property_character_margin>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Margin applied around every imported glyph. If your font image contains guides (in the form of lines between glyphs) or if spacing between characters appears incorrect, try adjusting :ref:`character_margin<class_ResourceImporterImageFont_property_character_margin>`. .. rst-class:: classref-item-separator @@ -67,11 +99,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **character_ranges** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **character_ranges** = ``PackedStringArray()`` :ref:`🔗<class_ResourceImporterImageFont_property_character_ranges>` -.. container:: contribute +The character ranges to import from the font image. This is an array that maps each position on the image (in tile coordinates, not pixels). The font atlas is traversed from left to right and top to bottom. Characters can be specified with decimal numbers (127), hexadecimal numbers (``0x007f``, or ``U+007f``) or between single quotes (``'~'``). Ranges can be specified with a hyphen between characters. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +For example, ``0-127`` represents the full ASCII range. It can also be written as ``0x0000-0x007f`` (or ``U+0000-U+007f``). As another example, ``' '-'~'`` is equivalent to ``32-127`` and represents the range of printable (visible) ASCII characters. + +For any range, the character advance and offset can be customized by appending three space-separated integer values (additional advance, x offset, y offset) to the end. For example ``'a'-'b' 4 5 2`` sets the advance to ``char_width + 4`` and offset to ``Vector2(5, 2)`` for both `a` and `b` characters. + +Make sure :ref:`character_ranges<class_ResourceImporterImageFont_property_character_ranges>` doesn't exceed the number of :ref:`columns<class_ResourceImporterImageFont_property_columns>` \* :ref:`rows<class_ResourceImporterImageFont_property_rows>` defined. Otherwise, the font will fail to import. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. .. rst-class:: classref-item-separator @@ -81,11 +119,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **columns** = ``1`` +:ref:`int<class_int>` **columns** = ``1`` :ref:`🔗<class_ResourceImporterImageFont_property_columns>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Number of columns in the font image. See also :ref:`rows<class_ResourceImporterImageFont_property_rows>`. .. rst-class:: classref-item-separator @@ -95,11 +131,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress** = ``true`` +:ref:`bool<class_bool>` **compress** = ``true`` :ref:`🔗<class_ResourceImporterImageFont_property_compress>` -.. container:: contribute +If ``true``, uses lossless compression for the resulting font. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterImageFont_property_descent: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **descent** = ``0`` :ref:`🔗<class_ResourceImporterImageFont_property_descent>` + +Font descent (number of pixels below the baseline). If set to ``0``, half of the character height is used. .. rst-class:: classref-item-separator @@ -109,11 +155,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **fallbacks** = ``[]`` - -.. container:: contribute +:ref:`Array<class_Array>` **fallbacks** = ``[]`` :ref:`🔗<class_ResourceImporterImageFont_property_fallbacks>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +List of font fallbacks to use if a glyph isn't found in this bitmap font. Fonts at the beginning of the array are attempted first. .. rst-class:: classref-item-separator @@ -123,11 +167,25 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Rect2i<class_Rect2i>` **image_margin** = ``Rect2i(0, 0, 0, 0)`` +:ref:`Rect2i<class_Rect2i>` **image_margin** = ``Rect2i(0, 0, 0, 0)`` :ref:`🔗<class_ResourceImporterImageFont_property_image_margin>` -.. container:: contribute +Margin to cut on the sides of the entire image. This can be used to cut parts of the image that contain attribution information or similar. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterImageFont_property_kerning_pairs: + +.. rst-class:: classref-property + +:ref:`PackedStringArray<class_PackedStringArray>` **kerning_pairs** = ``PackedStringArray()`` :ref:`🔗<class_ResourceImporterImageFont_property_kerning_pairs>` + +Kerning pairs for the font. Kerning pair adjust the spacing between two characters. + +Each string consist of three space separated values: "from" string, "to" string and integer offset. Each combination form the two string for a kerning pair, e.g, ``ab cd -3`` will create kerning pairs ``ac``, ``ad``, ``bc``, and ``bd`` with offset ``-3``. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. .. rst-class:: classref-item-separator @@ -137,11 +195,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **rows** = ``1`` +:ref:`int<class_int>` **rows** = ``1`` :ref:`🔗<class_ResourceImporterImageFont_property_rows>` + +Number of rows in the font image. See also :ref:`columns<class_ResourceImporterImageFont_property_columns>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterImageFont_property_scaling_mode: + +.. rst-class:: classref-property -.. container:: contribute +:ref:`int<class_int>` **scaling_mode** = ``2`` :ref:`🔗<class_ResourceImporterImageFont_property_scaling_mode>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Font scaling mode. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -150,3 +218,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterlayeredtexture.rst b/classes/class_resourceimporterlayeredtexture.rst index 84f02c3a4cf..dca1439ec64 100644 --- a/classes/class_resourceimporterlayeredtexture.rst +++ b/classes/class_resourceimporterlayeredtexture.rst @@ -12,9 +12,21 @@ ResourceImporterLayeredTexture **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a 3-dimensional texture (:ref:`Texture3D<class_Texture3D>`), a :ref:`Texture2DArray<class_Texture2DArray>`, a :ref:`Cubemap<class_Cubemap>` or a :ref:`CubemapArray<class_CubemapArray>`. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This imports a 3-dimensional texture, which can then be used in custom shaders, as a :ref:`FogMaterial<class_FogMaterial>` density map or as a :ref:`GPUParticlesAttractorVectorField3D<class_GPUParticlesAttractorVectorField3D>`. See also :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` and :ref:`ResourceImporterTextureAtlas<class_ResourceImporterTextureAtlas>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group @@ -55,11 +67,15 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/channel_pack** = ``0`` +:ref:`int<class_int>` **compress/channel_pack** = ``0`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_compress/channel_pack>` + +Controls how color channels should be used in the imported texture. -.. container:: contribute +\ **sRGB Friendly:**, prevents the RG color format from being used, as it does not support sRGB color. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Optimized:**, allows the RG color format to be used if the texture does not use the blue channel. This reduces memory usage if the texture's blue channel can be discarded (all pixels must have a blue value of ``0``). + +\ **Normal Map (RG Channels):** This forces all layers from the texture to be imported with the RG color format to reduce memory usage, with only the red and green channels preserved. This only has an effect on textures with the VRAM Compressed or Basis Universal compression modes. This mode is only available in layered textures (:ref:`Cubemap<class_Cubemap>`, :ref:`CubemapArray<class_CubemapArray>`, :ref:`Texture2DArray<class_Texture2DArray>` and :ref:`Texture3D<class_Texture3D>`). .. rst-class:: classref-item-separator @@ -69,11 +85,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/hdr_compression** = ``1`` +:ref:`int<class_int>` **compress/hdr_compression** = ``1`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_compress/hdr_compression>` + +Controls how VRAM compression should be performed for HDR images. + +\ **Disabled:** Never use VRAM compression for HDR textures, regardless of whether they're opaque or transparent. Instead, the texture is converted to RGBE9995 (9-bits per channel + 5-bit exponent = 32 bits per pixel) to reduce memory usage compared to a half-float or single-precision float image format. -.. container:: contribute +\ **Opaque Only:** Only uses VRAM compression for opaque HDR textures. This is due to a limitation of HDR formats, as there is no VRAM-compressed HDR format that supports transparency at the same time. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Always:** Force VRAM compression even for HDR textures with an alpha channel. To perform this, the alpha channel is discarded on import. + +\ **Note:** Only effective on Radiance HDR (``.hdr``) and OpenEXR (``.exr``) images. .. rst-class:: classref-item-separator @@ -83,11 +105,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress/high_quality** = ``false`` +:ref:`bool<class_bool>` **compress/high_quality** = ``false`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_compress/high_quality>` + +If ``true``, uses BPTC compression on desktop platforms and ASTC compression on mobile platforms. When using BPTC, BC7 is used for SDR textures and BC6H is used for HDR textures. -.. container:: contribute +If ``false``, uses the faster but lower-quality S3TC compression on desktop platforms and ETC2 on mobile/web platforms. When using S3TC, DXT1 (BC1) is used for opaque textures and DXT5 (BC3) is used for transparent or normal map (RGTC) textures. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do not (see :ref:`compress/hdr_compression<class_ResourceImporterLayeredTexture_property_compress/hdr_compression>`). .. rst-class:: classref-item-separator @@ -97,11 +121,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **compress/lossy_quality** = ``0.7`` +:ref:`float<class_float>` **compress/lossy_quality** = ``0.7`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_compress/lossy_quality>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The quality to use when using the **Lossy** compression mode. Higher values result in better quality, at the cost of larger file sizes. Lossy quality does not affect memory usage of the imported texture, only its file size on disk. .. rst-class:: classref-item-separator @@ -111,11 +133,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/mode** = ``1`` +:ref:`int<class_int>` **compress/mode** = ``1`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_compress/mode>` + +The compression mode to use. Each compression mode provides a different tradeoff: + +\ **Lossless**: Original quality, high memory usage, high size on disk, fast import. + +\ **Lossy:** Reduced quality, high memory usage, low size on disk, fast import. + +\ **VRAM Compressed:** Reduced quality, low memory usage, low size on disk, slowest import. Only use for textures in 3D scenes, not for 2D elements. + +\ **VRAM Uncompressed:** Original quality, high memory usage, highest size on disk, fastest import. -.. container:: contribute +\ **Basis Universal:** Reduced quality, low memory usage, lowest size on disk, slow import. Only use for textures in 3D scenes, not for 2D elements. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__ in the manual for more details. .. rst-class:: classref-item-separator @@ -125,11 +157,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **mipmaps/generate** = ``true`` +:ref:`bool<class_bool>` **mipmaps/generate** = ``true`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_mipmaps/generate>` -.. container:: contribute +If ``true``, smaller versions of the texture are generated on import. For example, a 64×64 texture will generate 6 mipmaps (32×32, 16×16, 8×8, 4×4, 2×2, 1×1). This has several benefits: - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +- Textures will not become grainy in the distance (in 3D), or if scaled down due to :ref:`Camera2D<class_Camera2D>` zoom or :ref:`CanvasItem<class_CanvasItem>` scale (in 2D). + +- Performance will improve if the texture is displayed in the distance, since sampling smaller versions of the original texture is faster and requires less memory bandwidth. + +The downside of mipmaps is that they increase memory usage by roughly 33% (for :ref:`Texture2DArray<class_Texture2DArray>`, :ref:`Cubemap<class_Cubemap>` and :ref:`CubemapArray<class_CubemapArray>`) or 14% (for :ref:`Texture3D<class_Texture3D>`). + +It's recommended to enable mipmaps in 3D. However, in 2D, this should only be enabled if your project visibly benefits from having mipmaps enabled. If the camera never zooms out significantly, there won't be a benefit to enabling mipmaps but memory usage will increase. .. rst-class:: classref-item-separator @@ -139,11 +177,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **mipmaps/limit** = ``-1`` +:ref:`int<class_int>` **mipmaps/limit** = ``-1`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_mipmaps/limit>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Unimplemented. This currently has no effect when changed. .. rst-class:: classref-item-separator @@ -153,11 +189,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **slices/arrangement** = ``1`` - -.. container:: contribute +:ref:`int<class_int>` **slices/arrangement** = ``1`` :ref:`🔗<class_ResourceImporterLayeredTexture_property_slices/arrangement>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Controls how the cubemap's texture is internally laid out. When using high-resolution cubemaps, **2×3** and **3×2** are less prone to exceeding hardware texture size limits compared to **1×6** and **6×1**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -166,3 +200,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimportermp3.rst b/classes/class_resourceimportermp3.rst index 8215ef03e3d..981ba3b2dac 100644 --- a/classes/class_resourceimportermp3.rst +++ b/classes/class_resourceimportermp3.rst @@ -12,9 +12,25 @@ ResourceImporterMP3 **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports an MP3 audio file for playback. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +MP3 is a lossy audio format, with worse audio quality compared to :ref:`ResourceImporterOggVorbis<class_ResourceImporterOggVorbis>` at a given bitrate. + +In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. + +MP3 requires more CPU to decode than :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group @@ -49,11 +65,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **bar_beats** = ``4`` +:ref:`int<class_int>` **bar_beats** = ``4`` :ref:`🔗<class_ResourceImporterMP3_property_bar_beats>` -.. container:: contribute +The number of bars within a single beat in the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`bar_beats<class_ResourceImporterMP3_property_bar_beats>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -63,11 +79,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **beat_count** = ``0`` +:ref:`int<class_int>` **beat_count** = ``0`` :ref:`🔗<class_ResourceImporterMP3_property_beat_count>` -.. container:: contribute +The beat count of the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`beat_count<class_ResourceImporterMP3_property_beat_count>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -77,11 +93,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **bpm** = ``0`` +:ref:`float<class_float>` **bpm** = ``0`` :ref:`🔗<class_ResourceImporterMP3_property_bpm>` -.. container:: contribute +The Beats Per Minute of the audio track. This should match the BPM measure that was used to compose the track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`bpm<class_ResourceImporterMP3_property_bpm>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -91,9 +107,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``false`` +:ref:`bool<class_bool>` **loop** = ``false`` :ref:`🔗<class_ResourceImporterMP3_property_loop>` -If ``true``, the audio will play again from the specified :ref:`loop_offset<class_ResourceImporterMP3_property_loop_offset>` once it is done playing. Useful for ambient sounds and background music. +If enabled, the audio will begin playing at the beginning after playback ends by reaching the end of the audio. + +\ **Note:** In :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, the :ref:`AudioStreamPlayer.finished<class_AudioStreamPlayer_signal_finished>` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. .. rst-class:: classref-item-separator @@ -103,11 +121,13 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset<clas .. rst-class:: classref-property -:ref:`float<class_float>` **loop_offset** = ``0`` +:ref:`float<class_float>` **loop_offset** = ``0`` :ref:`🔗<class_ResourceImporterMP3_property_loop_offset>` + +Determines where audio will start to loop after playback reaches the end of the audio. This can be used to only loop a part of the audio file, which is useful for some ambient sounds or music. The value is determined in seconds relative to the beginning of the audio. A value of ``0.0`` will loop the entire audio file. -.. container:: contribute +Only has an effect if :ref:`loop<class_ResourceImporterMP3_property_loop>` is ``true``. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`loop_offset<class_ResourceImporterMP3_property_loop_offset>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -116,3 +136,4 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset<clas .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterobj.rst b/classes/class_resourceimporterobj.rst index ca092db4e24..db0de9ba1fd 100644 --- a/classes/class_resourceimporterobj.rst +++ b/classes/class_resourceimporterobj.rst @@ -12,9 +12,23 @@ ResourceImporterOBJ **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports an OBJ 3D model as an independent :ref:`Mesh<class_Mesh>` or scene. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +Unlike :ref:`ResourceImporterScene<class_ResourceImporterScene>`, **ResourceImporterOBJ** will import a single :ref:`Mesh<class_Mesh>` resource by default instead of importing a :ref:`PackedScene<class_PackedScene>`. This makes it easier to use the :ref:`Mesh<class_Mesh>` resource in nodes that expect direct :ref:`Mesh<class_Mesh>` resources, such as :ref:`GridMap<class_GridMap>`, :ref:`GPUParticles3D<class_GPUParticles3D>` or :ref:`CPUParticles3D<class_CPUParticles3D>`. Note that it is still possible to save mesh resources from 3D scenes using the **Advanced Import Settings** dialog, regardless of the source format. + +See also :ref:`ResourceImporterScene<class_ResourceImporterScene>`, which is used for more advanced 3D formats such as glTF. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_3d_scenes/index>` .. rst-class:: classref-reftable-group @@ -24,15 +38,17 @@ Properties .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`generate_tangents<class_ResourceImporterOBJ_property_generate_tangents>` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`offset_mesh<class_ResourceImporterOBJ_property_offset_mesh>` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`bool<class_bool>` | :ref:`optimize_mesh<class_ResourceImporterOBJ_property_optimize_mesh>` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`scale_mesh<class_ResourceImporterOBJ_property_scale_mesh>` | ``Vector3(1, 1, 1)`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`force_disable_mesh_compression<class_ResourceImporterOBJ_property_force_disable_mesh_compression>` | ``false`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`generate_tangents<class_ResourceImporterOBJ_property_generate_tangents>` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`offset_mesh<class_ResourceImporterOBJ_property_offset_mesh>` | ``Vector3(0, 0, 0)`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool<class_bool>` | :ref:`optimize_mesh<class_ResourceImporterOBJ_property_optimize_mesh>` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`scale_mesh<class_ResourceImporterOBJ_property_scale_mesh>` | ``Vector3(1, 1, 1)`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-section-separator @@ -43,15 +59,27 @@ Properties Property Descriptions --------------------- +.. _class_ResourceImporterOBJ_property_force_disable_mesh_compression: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **force_disable_mesh_compression** = ``false`` :ref:`🔗<class_ResourceImporterOBJ_property_force_disable_mesh_compression>` + +If ``true``, mesh compression will not be used. Consider enabling if you notice blocky artifacts in your mesh normals or UVs, or if you have meshes that are larger than a few thousand meters in each direction. + +.. rst-class:: classref-item-separator + +---- + .. _class_ResourceImporterOBJ_property_generate_tangents: .. rst-class:: classref-property -:ref:`bool<class_bool>` **generate_tangents** = ``true`` +:ref:`bool<class_bool>` **generate_tangents** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_generate_tangents>` -.. container:: contribute +If ``true``, generate vertex tangents using `Mikktspace <http://www.mikktspace.com/>`__ if the source mesh doesn't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead on relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents. .. rst-class:: classref-item-separator @@ -61,11 +89,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **offset_mesh** = ``Vector3(0, 0, 0)`` - -.. container:: contribute +:ref:`Vector3<class_Vector3>` **offset_mesh** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_ResourceImporterOBJ_property_offset_mesh>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Offsets the mesh's data by the specified value. This can be used to work around misaligned meshes without having to modify the source file. .. rst-class:: classref-item-separator @@ -75,11 +101,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **optimize_mesh** = ``true`` +:ref:`bool<class_bool>` **optimize_mesh** = ``true`` :ref:`🔗<class_ResourceImporterOBJ_property_optimize_mesh>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Unused parameter. This currently has no effect. .. rst-class:: classref-item-separator @@ -89,11 +113,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **scale_mesh** = ``Vector3(1, 1, 1)`` - -.. container:: contribute +:ref:`Vector3<class_Vector3>` **scale_mesh** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_ResourceImporterOBJ_property_scale_mesh>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Scales the mesh's data by the specified value. This can be used to work around misscaled meshes without having to modify the source file. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -102,3 +124,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporteroggvorbis.rst b/classes/class_resourceimporteroggvorbis.rst index 9b0057c6af9..4ee02791d74 100644 --- a/classes/class_resourceimporteroggvorbis.rst +++ b/classes/class_resourceimporteroggvorbis.rst @@ -12,9 +12,25 @@ ResourceImporterOggVorbis **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports an Ogg Vorbis audio file for playback. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +Ogg Vorbis is a lossy audio format, with better audio quality compared to :ref:`ResourceImporterMP3<class_ResourceImporterMP3>` at a given bitrate. + +In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. + +Ogg Vorbis requires more CPU to decode than :ref:`ResourceImporterWAV<class_ResourceImporterWAV>`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group @@ -36,6 +52,20 @@ Properties | :ref:`float<class_float>` | :ref:`loop_offset<class_ResourceImporterOggVorbis_property_loop_offset>` | ``0`` | +---------------------------+--------------------------------------------------------------------------+-----------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_buffer<class_ResourceImporterOggVorbis_method_load_from_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` | :ref:`load_from_file<class_ResourceImporterOggVorbis_method_load_from_file>`\ (\ path\: :ref:`String<class_String>`\ ) |static| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -49,11 +79,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **bar_beats** = ``4`` +:ref:`int<class_int>` **bar_beats** = ``4`` :ref:`🔗<class_ResourceImporterOggVorbis_property_bar_beats>` -.. container:: contribute +The number of bars within a single beat in the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`bar_beats<class_ResourceImporterOggVorbis_property_bar_beats>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -63,11 +93,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **beat_count** = ``0`` +:ref:`int<class_int>` **beat_count** = ``0`` :ref:`🔗<class_ResourceImporterOggVorbis_property_beat_count>` -.. container:: contribute +The beat count of the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`beat_count<class_ResourceImporterOggVorbis_property_beat_count>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -77,11 +107,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **bpm** = ``0`` +:ref:`float<class_float>` **bpm** = ``0`` :ref:`🔗<class_ResourceImporterOggVorbis_property_bpm>` -.. container:: contribute +The Beats Per Minute of the audio track. This should match the BPM measure that was used to compose the track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +A more convenient editor for :ref:`bpm<class_ResourceImporterOggVorbis_property_bpm>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. .. rst-class:: classref-item-separator @@ -91,9 +121,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``false`` +:ref:`bool<class_bool>` **loop** = ``false`` :ref:`🔗<class_ResourceImporterOggVorbis_property_loop>` -If ``true``, the audio will play again from the specified :ref:`loop_offset<class_ResourceImporterOggVorbis_property_loop_offset>` once it is done playing. Useful for ambient sounds and background music. +If enabled, the audio will begin playing at the beginning after playback ends by reaching the end of the audio. + +\ **Note:** In :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, the :ref:`AudioStreamPlayer.finished<class_AudioStreamPlayer_signal_finished>` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. .. rst-class:: classref-item-separator @@ -103,11 +135,42 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset<clas .. rst-class:: classref-property -:ref:`float<class_float>` **loop_offset** = ``0`` +:ref:`float<class_float>` **loop_offset** = ``0`` :ref:`🔗<class_ResourceImporterOggVorbis_property_loop_offset>` + +Determines where audio will start to loop after playback reaches the end of the audio. This can be used to only loop a part of the audio file, which is useful for some ambient sounds or music. The value is determined in seconds relative to the beginning of the audio. A value of ``0.0`` will loop the entire audio file. + +Only has an effect if :ref:`loop<class_ResourceImporterOggVorbis_property_loop>` is ``true``. + +A more convenient editor for :ref:`loop_offset<class_ResourceImporterOggVorbis_property_loop_offset>` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ResourceImporterOggVorbis_method_load_from_buffer: + +.. rst-class:: classref-method + +:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |static| :ref:`🔗<class_ResourceImporterOggVorbis_method_load_from_buffer>` + +This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterOggVorbis_method_load_from_file: + +.. rst-class:: classref-method -.. container:: contribute +:ref:`AudioStreamOggVorbis<class_AudioStreamOggVorbis>` **load_from_file**\ (\ path\: :ref:`String<class_String>`\ ) |static| :ref:`🔗<class_ResourceImporterOggVorbis_method_load_from_file>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -116,3 +179,4 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset<clas .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterscene.rst b/classes/class_resourceimporterscene.rst index 98a4f973746..f7414151688 100644 --- a/classes/class_resourceimporterscene.rst +++ b/classes/class_resourceimporterscene.rst @@ -12,9 +12,25 @@ ResourceImporterScene **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a glTF, FBX, Collada or Blender 3D scene. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +See also :ref:`ResourceImporterOBJ<class_ResourceImporterOBJ>`, which is used for OBJ models that can be imported as an independent :ref:`Mesh<class_Mesh>` or a scene. + +Additional options (such as extracting individual meshes or materials to files) are available in the **Advanced Import Settings** dialog. This dialog can be accessed by double-clicking a 3D scene in the FileSystem dock or by selecting a 3D scene in the FileSystem dock, going to the Import dock and choosing **Advanced**. + +\ **Note:** **ResourceImporterScene** is *not* used for :ref:`PackedScene<class_PackedScene>`\ s, such as ``.tscn`` and ``.scn`` files. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_3d_scenes/index>` .. rst-class:: classref-reftable-group @@ -24,39 +40,45 @@ Properties .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_subresources<class_ResourceImporterScene_property__subresources>` | ``{}`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float<class_float>` | :ref:`animation/fps<class_ResourceImporterScene_property_animation/fps>` | ``30`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`animation/import<class_ResourceImporterScene_property_animation/import>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`animation/remove_immutable_tracks<class_ResourceImporterScene_property_animation/remove_immutable_tracks>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`animation/trimming<class_ResourceImporterScene_property_animation/trimming>` | ``false`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String<class_String>` | :ref:`import_script/path<class_ResourceImporterScene_property_import_script/path>` | ``""`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`meshes/create_shadow_meshes<class_ResourceImporterScene_property_meshes/create_shadow_meshes>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`meshes/ensure_tangents<class_ResourceImporterScene_property_meshes/ensure_tangents>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`meshes/generate_lods<class_ResourceImporterScene_property_meshes/generate_lods>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`int<class_int>` | :ref:`meshes/light_baking<class_ResourceImporterScene_property_meshes/light_baking>` | ``1`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float<class_float>` | :ref:`meshes/lightmap_texel_size<class_ResourceImporterScene_property_meshes/lightmap_texel_size>` | ``0.2`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`nodes/apply_root_scale<class_ResourceImporterScene_property_nodes/apply_root_scale>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String<class_String>` | :ref:`nodes/root_name<class_ResourceImporterScene_property_nodes/root_name>` | ``"Scene Root"`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`float<class_float>` | :ref:`nodes/root_scale<class_ResourceImporterScene_property_nodes/root_scale>` | ``1.0`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`String<class_String>` | :ref:`nodes/root_type<class_ResourceImporterScene_property_nodes/root_type>` | ``"Node3D"`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ - | :ref:`bool<class_bool>` | :ref:`skins/use_named_skins<class_ResourceImporterScene_property_skins/use_named_skins>` | ``true`` | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------+------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_subresources<class_ResourceImporterScene_property__subresources>` | ``{}`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`animation/fps<class_ResourceImporterScene_property_animation/fps>` | ``30`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`animation/import<class_ResourceImporterScene_property_animation/import>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`animation/import_rest_as_RESET<class_ResourceImporterScene_property_animation/import_rest_as_RESET>` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`animation/remove_immutable_tracks<class_ResourceImporterScene_property_animation/remove_immutable_tracks>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`animation/trimming<class_ResourceImporterScene_property_animation/trimming>` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`import_script/path<class_ResourceImporterScene_property_import_script/path>` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`meshes/create_shadow_meshes<class_ResourceImporterScene_property_meshes/create_shadow_meshes>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`meshes/ensure_tangents<class_ResourceImporterScene_property_meshes/ensure_tangents>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`meshes/force_disable_compression<class_ResourceImporterScene_property_meshes/force_disable_compression>` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`meshes/generate_lods<class_ResourceImporterScene_property_meshes/generate_lods>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`meshes/light_baking<class_ResourceImporterScene_property_meshes/light_baking>` | ``1`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`meshes/lightmap_texel_size<class_ResourceImporterScene_property_meshes/lightmap_texel_size>` | ``0.2`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`nodes/apply_root_scale<class_ResourceImporterScene_property_nodes/apply_root_scale>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`nodes/import_as_skeleton_bones<class_ResourceImporterScene_property_nodes/import_as_skeleton_bones>` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`nodes/root_name<class_ResourceImporterScene_property_nodes/root_name>` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`nodes/root_scale<class_ResourceImporterScene_property_nodes/root_scale>` | ``1.0`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String<class_String>` | :ref:`nodes/root_type<class_ResourceImporterScene_property_nodes/root_type>` | ``""`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`skins/use_named_skins<class_ResourceImporterScene_property_skins/use_named_skins>` | ``true`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -71,11 +93,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary<class_Dictionary>` **_subresources** = ``{}`` - -.. container:: contribute +:ref:`Dictionary<class_Dictionary>` **_subresources** = ``{}`` :ref:`🔗<class_ResourceImporterScene_property__subresources>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Contains properties for the scene's subresources. This is an internal option which is not visible in the Import dock. .. rst-class:: classref-item-separator @@ -85,11 +105,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **animation/fps** = ``30`` - -.. container:: contribute +:ref:`float<class_float>` **animation/fps** = ``30`` :ref:`🔗<class_ResourceImporterScene_property_animation/fps>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The number of frames per second to use for baking animation curves to a series of points with linear interpolation. It's recommended to configure this value to match the value you're using as a baseline in your 3D modeling software. Higher values result in more precise animation with fast movement changes, at the cost of higher file sizes and memory usage. Thanks to interpolation, there is usually not much benefit in going above 30 FPS (as the animation will still appear smooth at higher rendering framerates). .. rst-class:: classref-item-separator @@ -99,11 +117,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **animation/import** = ``true`` +:ref:`bool<class_bool>` **animation/import** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_animation/import>` -.. container:: contribute +If ``true``, import animations from the 3D scene. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterScene_property_animation/import_rest_as_RESET: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **animation/import_rest_as_RESET** = ``false`` :ref:`🔗<class_ResourceImporterScene_property_animation/import_rest_as_RESET>` + +If ``true``, adds an :ref:`Animation<class_Animation>` named ``RESET``, containing the :ref:`Skeleton3D.get_bone_rest<class_Skeleton3D_method_get_bone_rest>` from :ref:`Skeleton3D<class_Skeleton3D>` nodes. This can be useful to extract an animation in the reference pose. .. rst-class:: classref-item-separator @@ -113,11 +141,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **animation/remove_immutable_tracks** = ``true`` - -.. container:: contribute +:ref:`bool<class_bool>` **animation/remove_immutable_tracks** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_animation/remove_immutable_tracks>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, remove animation tracks that only contain default values. This can reduce output file size and memory usage with certain 3D scenes, depending on the contents of their animation tracks. .. rst-class:: classref-item-separator @@ -127,11 +153,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **animation/trimming** = ``false`` +:ref:`bool<class_bool>` **animation/trimming** = ``false`` :ref:`🔗<class_ResourceImporterScene_property_animation/trimming>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, trim the beginning and end of animations if there are no keyframe changes. This can reduce output file size and memory usage with certain 3D scenes, depending on the contents of their animation tracks. .. rst-class:: classref-item-separator @@ -141,11 +165,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **import_script/path** = ``""`` - -.. container:: contribute +:ref:`String<class_String>` **import_script/path** = ``""`` :ref:`🔗<class_ResourceImporterScene_property_import_script/path>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Path to an import script, which can run code after the import process has completed for custom processing. See `Using import scripts for automation <../tutorials/assets_pipeline/importing_3d_scenes/import_configuration.html#using-import-scripts-for-automation>`__ for more information. .. rst-class:: classref-item-separator @@ -155,11 +177,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **meshes/create_shadow_meshes** = ``true`` - -.. container:: contribute +:ref:`bool<class_bool>` **meshes/create_shadow_meshes** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_meshes/create_shadow_meshes>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, enables the generation of shadow meshes on import. This optimizes shadow rendering without reducing quality by welding vertices together when possible. This in turn reduces the memory bandwidth required to render shadows. Shadow mesh generation currently doesn't support using a lower detail level than the source mesh (but shadow rendering will make use of LODs when relevant). .. rst-class:: classref-item-separator @@ -169,25 +189,35 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **meshes/ensure_tangents** = ``true`` +:ref:`bool<class_bool>` **meshes/ensure_tangents** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_meshes/ensure_tangents>` -.. container:: contribute +If ``true``, generate vertex tangents using `Mikktspace <http://www.mikktspace.com/>`__ if the input meshes don't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead on relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents. .. rst-class:: classref-item-separator ---- -.. _class_ResourceImporterScene_property_meshes/generate_lods: +.. _class_ResourceImporterScene_property_meshes/force_disable_compression: .. rst-class:: classref-property -:ref:`bool<class_bool>` **meshes/generate_lods** = ``true`` +:ref:`bool<class_bool>` **meshes/force_disable_compression** = ``false`` :ref:`🔗<class_ResourceImporterScene_property_meshes/force_disable_compression>` + +If ``true``, mesh compression will not be used. Consider enabling if you notice blocky artifacts in your mesh normals or UVs, or if you have meshes that are larger than a few thousand meters in each direction. -.. container:: contribute +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterScene_property_meshes/generate_lods: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **meshes/generate_lods** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_meshes/generate_lods>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, generates lower detail variants of the mesh which will be displayed in the distance to improve rendering performance. Not all meshes benefit from LOD, especially if they are never rendered from far away. Disabling this can reduce output file size and speed up importing. See `Mesh level of detail (LOD) <../tutorials/3d/mesh_lod.html#doc-mesh-lod>`__ for more information. .. rst-class:: classref-item-separator @@ -197,11 +227,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **meshes/light_baking** = ``1`` - -.. container:: contribute +:ref:`int<class_int>` **meshes/light_baking** = ``1`` :ref:`🔗<class_ResourceImporterScene_property_meshes/light_baking>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Configures the meshes' :ref:`GeometryInstance3D.gi_mode<class_GeometryInstance3D_property_gi_mode>` in the 3D scene. If set to **Static Lightmaps**, sets the meshes' GI mode to Static and generates UV2 on import for :ref:`LightmapGI<class_LightmapGI>` baking. .. rst-class:: classref-item-separator @@ -211,11 +239,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **meshes/lightmap_texel_size** = ``0.2`` +:ref:`float<class_float>` **meshes/lightmap_texel_size** = ``0.2`` :ref:`🔗<class_ResourceImporterScene_property_meshes/lightmap_texel_size>` -.. container:: contribute +Controls the size of each texel on the baked lightmap. A smaller value results in more precise lightmaps, at the cost of larger lightmap sizes and longer bake times. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only effective if :ref:`meshes/light_baking<class_ResourceImporterScene_property_meshes/light_baking>` is set to **Static Lightmaps**. .. rst-class:: classref-item-separator @@ -225,11 +253,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **nodes/apply_root_scale** = ``true`` +:ref:`bool<class_bool>` **nodes/apply_root_scale** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_nodes/apply_root_scale>` -.. container:: contribute +If ``true``, :ref:`nodes/root_scale<class_ResourceImporterScene_property_nodes/root_scale>` will be applied to the descendant nodes, meshes, animations, bones, etc. This means that if you add a child node later on within the imported scene, it won't be scaled. If ``false``, :ref:`nodes/root_scale<class_ResourceImporterScene_property_nodes/root_scale>` will multiply the scale of the root node instead. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterScene_property_nodes/import_as_skeleton_bones: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **nodes/import_as_skeleton_bones** = ``false`` :ref:`🔗<class_ResourceImporterScene_property_nodes/import_as_skeleton_bones>` + +Treat all nodes in the imported scene as if they are bones within a single :ref:`Skeleton3D<class_Skeleton3D>`. Can be used to guarantee that imported animations target skeleton bones rather than nodes. May also be used to assign the ``"Root"`` bone in a :ref:`BoneMap<class_BoneMap>`. See :doc:`Retargeting 3D Skeletons <../tutorials/assets_pipeline/retargeting_3d_skeletons>` for more information. .. rst-class:: classref-item-separator @@ -239,11 +277,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **nodes/root_name** = ``"Scene Root"`` - -.. container:: contribute +:ref:`String<class_String>` **nodes/root_name** = ``""`` :ref:`🔗<class_ResourceImporterScene_property_nodes/root_name>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Override for the root node name. If empty, the root node will use what the scene specifies, or the file name if the scene does not specify a root name. .. rst-class:: classref-item-separator @@ -253,11 +289,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **nodes/root_scale** = ``1.0`` +:ref:`float<class_float>` **nodes/root_scale** = ``1.0`` :ref:`🔗<class_ResourceImporterScene_property_nodes/root_scale>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The uniform scale to use for the scene root. The default value of ``1.0`` will not perform any rescaling. See :ref:`nodes/apply_root_scale<class_ResourceImporterScene_property_nodes/apply_root_scale>` for details of how this scale is applied. .. rst-class:: classref-item-separator @@ -267,11 +301,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **nodes/root_type** = ``"Node3D"`` - -.. container:: contribute +:ref:`String<class_String>` **nodes/root_type** = ``""`` :ref:`🔗<class_ResourceImporterScene_property_nodes/root_type>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Override for the root node type. If empty, the root node will use what the scene specifies, or :ref:`Node3D<class_Node3D>` if the scene does not specify a root type. Using a node type that inherits from :ref:`Node3D<class_Node3D>` is recommended. Otherwise, you'll lose the ability to position the node directly in the 3D editor. .. rst-class:: classref-item-separator @@ -281,11 +313,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **skins/use_named_skins** = ``true`` +:ref:`bool<class_bool>` **skins/use_named_skins** = ``true`` :ref:`🔗<class_ResourceImporterScene_property_skins/use_named_skins>` + +If checked, use named :ref:`Skin<class_Skin>`\ s for animation. The :ref:`MeshInstance3D<class_MeshInstance3D>` node contains 3 properties of relevance here: a skeleton :ref:`NodePath<class_NodePath>` pointing to the :ref:`Skeleton3D<class_Skeleton3D>` node (usually ``..``), a mesh, and a skin: + +- The :ref:`Skeleton3D<class_Skeleton3D>` node contains a list of bones with names, their pose and rest, a name and a parent bone. + +- The mesh is all of the raw vertex data needed to display a mesh. In terms of the mesh, it knows how vertices are weight-painted and uses some internal numbering often imported from 3D modeling software. -.. container:: contribute +- The skin contains the information necessary to bind this mesh onto this Skeleton3D. For every one of the internal bone IDs chosen by the 3D modeling software, it contains two things. Firstly, a matrix known as the Bind Pose Matrix, Inverse Bind Matrix, or IBM for short. Secondly, the :ref:`Skin<class_Skin>` contains each bone's name (if :ref:`skins/use_named_skins<class_ResourceImporterScene_property_skins/use_named_skins>` is ``true``), or the bone's index within the :ref:`Skeleton3D<class_Skeleton3D>` list (if :ref:`skins/use_named_skins<class_ResourceImporterScene_property_skins/use_named_skins>` is ``false``). - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Together, this information is enough to tell Godot how to use the bone poses in the :ref:`Skeleton3D<class_Skeleton3D>` node to render the mesh from each :ref:`MeshInstance3D<class_MeshInstance3D>`. Note that each :ref:`MeshInstance3D<class_MeshInstance3D>` may share binds, as is common in models exported from Blender, or each :ref:`MeshInstance3D<class_MeshInstance3D>` may use a separate :ref:`Skin<class_Skin>` object, as is common in models exported from other tools such as Maya. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -294,3 +332,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimportershaderfile.rst b/classes/class_resourceimportershaderfile.rst index fb3d2a09baa..c3f6a01a456 100644 --- a/classes/class_resourceimportershaderfile.rst +++ b/classes/class_resourceimportershaderfile.rst @@ -12,9 +12,14 @@ ResourceImporterShaderFile **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports native GLSL shaders (not Godot shaders) as a :ref:`RDShaderFile<class_RDShaderFile>`. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This imports native GLSL shaders as :ref:`RDShaderFile<class_RDShaderFile>` resources, for use with low-level :ref:`RenderingDevice<class_RenderingDevice>` operations. This importer does *not* handle ``.gdshader`` files. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -23,3 +28,4 @@ ResourceImporterShaderFile .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimportertexture.rst b/classes/class_resourceimportertexture.rst index 21821771244..5be053430fd 100644 --- a/classes/class_resourceimportertexture.rst +++ b/classes/class_resourceimportertexture.rst @@ -12,9 +12,21 @@ ResourceImporterTexture **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports an image for use in 2D or 3D rendering. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This importer imports :ref:`CompressedTexture2D<class_CompressedTexture2D>` resources. If you need to process the image in scripts in a more convenient way, use :ref:`ResourceImporterImage<class_ResourceImporterImage>` instead. See also :ref:`ResourceImporterLayeredTexture<class_ResourceImporterLayeredTexture>`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing images <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group @@ -79,11 +91,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/channel_pack** = ``0`` +:ref:`int<class_int>` **compress/channel_pack** = ``0`` :ref:`🔗<class_ResourceImporterTexture_property_compress/channel_pack>` + +Controls how color channels should be used in the imported texture. -.. container:: contribute +\ **sRGB Friendly:** Prevents the RG color format from being used, as it does not support sRGB color. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Optimized:** Allows the RG color format to be used if the texture does not use the blue channel. This reduces memory usage if the texture's blue channel can be discarded (all pixels must have a blue value of ``0``). .. rst-class:: classref-item-separator @@ -93,11 +107,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/hdr_compression** = ``1`` +:ref:`int<class_int>` **compress/hdr_compression** = ``1`` :ref:`🔗<class_ResourceImporterTexture_property_compress/hdr_compression>` -.. container:: contribute +Controls how VRAM compression should be performed for HDR images. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Disabled:** Never use VRAM compression for HDR textures, regardless of whether they're opaque or transparent. Instead, the texture is converted to RGBE9995 (9-bits per channel + 5-bit exponent = 32 bits per pixel) to reduce memory usage compared to a half-float or single-precision float image format. + +\ **Opaque Only:** Only uses VRAM compression for opaque HDR textures. This is due to a limitation of HDR formats, as there is no VRAM-compressed HDR format that supports transparency at the same time. + +\ **Always:** Force VRAM compression even for HDR textures with an alpha channel. To perform this, the alpha channel is discarded on import. + +\ **Note:** Only effective on Radiance HDR (``.hdr``) and OpenEXR (``.exr``) images. .. rst-class:: classref-item-separator @@ -107,11 +127,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **compress/high_quality** = ``false`` +:ref:`bool<class_bool>` **compress/high_quality** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_compress/high_quality>` -.. container:: contribute +If ``true``, uses BPTC compression on desktop platforms and ASTC compression on mobile platforms. When using BPTC, BC7 is used for SDR textures and BC6H is used for HDR textures. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``false``, uses the faster but lower-quality S3TC compression on desktop platforms and ETC2 on mobile/web platforms. When using S3TC, DXT1 (BC1) is used for opaque textures and DXT5 (BC3) is used for transparent or normal map (RGTC) textures. + +BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do not (see :ref:`compress/hdr_compression<class_ResourceImporterTexture_property_compress/hdr_compression>`). .. rst-class:: classref-item-separator @@ -121,11 +143,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **compress/lossy_quality** = ``0.7`` - -.. container:: contribute +:ref:`float<class_float>` **compress/lossy_quality** = ``0.7`` :ref:`🔗<class_ResourceImporterTexture_property_compress/lossy_quality>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The quality to use when using the **Lossy** compression mode. Higher values result in better quality, at the cost of larger file sizes. Lossy quality does not affect memory usage of the imported texture, only its file size on disk. .. rst-class:: classref-item-separator @@ -135,11 +155,21 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/mode** = ``0`` +:ref:`int<class_int>` **compress/mode** = ``0`` :ref:`🔗<class_ResourceImporterTexture_property_compress/mode>` + +The compression mode to use. Each compression mode provides a different tradeoff: -.. container:: contribute +\ **Lossless**: Original quality, high memory usage, high size on disk, fast import. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Lossy:** Reduced quality, high memory usage, low size on disk, fast import. + +\ **VRAM Compressed:** Reduced quality, low memory usage, low size on disk, slowest import. Only use for textures in 3D scenes, not for 2D elements. + +\ **VRAM Uncompressed:** Original quality, high memory usage, highest size on disk, fastest import. + +\ **Basis Universal:** Reduced quality, low memory usage, lowest size on disk, slow import. Only use for textures in 3D scenes, not for 2D elements. + +See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__ in the manual for more details. .. rst-class:: classref-item-separator @@ -149,11 +179,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/normal_map** = ``0`` +:ref:`int<class_int>` **compress/normal_map** = ``0`` :ref:`🔗<class_ResourceImporterTexture_property_compress/normal_map>` -.. container:: contribute +When using a texture as normal map, only the red and green channels are required. Given regular texture compression algorithms produce artifacts that don't look that nice in normal maps, the RGTC compression format is the best fit for this data. Forcing this option to Enable will make Godot import the image as RGTC compressed. By default, it's set to Detect. This means that if the texture is ever detected to be used as a normal map, it will be changed to Enable and reimported automatically. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Note that RGTC compression affects the resulting normal map image. You will have to adjust custom shaders that use the normal map's blue channel to take this into account. Built-in material shaders already ignore the blue channel in a normal map (regardless of the actual normal map's contents). .. rst-class:: classref-item-separator @@ -163,11 +193,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **detect_3d/compress_to** = ``1`` +:ref:`int<class_int>` **detect_3d/compress_to** = ``1`` :ref:`🔗<class_ResourceImporterTexture_property_detect_3d/compress_to>` -.. container:: contribute +This changes the :ref:`compress/mode<class_ResourceImporterTexture_property_compress/mode>` option that is used when a texture is detected as being used in 3D. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Changing this import option only has an effect if a texture is detected as being used in 3D. Changing this to **Disabled** then reimporting will not change the existing compress mode on a texture (if it's detected to be used in 3D), but choosing **VRAM Compressed** or **Basis Universal** will. .. rst-class:: classref-item-separator @@ -177,11 +207,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/convert_colors_with_editor_theme** = ``false`` +:ref:`bool<class_bool>` **editor/convert_colors_with_editor_theme** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_editor/convert_colors_with_editor_theme>` -.. container:: contribute +If ``true``, converts the imported image's colors to match :ref:`EditorSettings.interface/theme/icon_and_font_color<class_EditorSettings_property_interface/theme/icon_and_font_color>`. This assumes the image uses the exact same colors as :doc:`Godot's own color palette for editor icons <../contributing/development/editor/creating_icons>`, with the source file designed for a dark editor theme. This should be enabled for editor plugin icons and custom class icons, but should be left disabled otherwise. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only available for SVG images. .. rst-class:: classref-item-separator @@ -191,11 +221,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **editor/scale_with_editor_scale** = ``false`` +:ref:`bool<class_bool>` **editor/scale_with_editor_scale** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_editor/scale_with_editor_scale>` -.. container:: contribute +If ``true``, scales the imported image to match :ref:`EditorSettings.interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>`. This should be enabled for editor plugin icons and custom class icons, but should be left disabled otherwise. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only available for SVG images. .. rst-class:: classref-item-separator @@ -205,11 +235,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **mipmaps/generate** = ``false`` +:ref:`bool<class_bool>` **mipmaps/generate** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_mipmaps/generate>` + +If ``true``, smaller versions of the texture are generated on import. For example, a 64×64 texture will generate 6 mipmaps (32×32, 16×16, 8×8, 4×4, 2×2, 1×1). This has several benefits: + +- Textures will not become grainy in the distance (in 3D), or if scaled down due to :ref:`Camera2D<class_Camera2D>` zoom or :ref:`CanvasItem<class_CanvasItem>` scale (in 2D). -.. container:: contribute +- Performance will improve if the texture is displayed in the distance, since sampling smaller versions of the original texture is faster and requires less memory bandwidth. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The downside of mipmaps is that they increase memory usage by roughly 33%. + +It's recommended to enable mipmaps in 3D. However, in 2D, this should only be enabled if your project visibly benefits from having mipmaps enabled. If the camera never zooms out significantly, there won't be a benefit to enabling mipmaps but memory usage will increase. .. rst-class:: classref-item-separator @@ -219,11 +255,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **mipmaps/limit** = ``-1`` - -.. container:: contribute +:ref:`int<class_int>` **mipmaps/limit** = ``-1`` :ref:`🔗<class_ResourceImporterTexture_property_mipmaps/limit>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Unimplemented. This currently has no effect when changed. .. rst-class:: classref-item-separator @@ -233,11 +267,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **process/fix_alpha_border** = ``true`` +:ref:`bool<class_bool>` **process/fix_alpha_border** = ``true`` :ref:`🔗<class_ResourceImporterTexture_property_process/fix_alpha_border>` -.. container:: contribute +If ``true``, puts pixels of the same surrounding color in transition from transparent to opaque areas. For textures displayed with bilinear filtering, this helps to reduce the outline effect when exporting images from an image editor. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +It's recommended to leave this enabled (as it is by default), unless this causes issues for a particular image. .. rst-class:: classref-item-separator @@ -247,11 +281,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **process/hdr_as_srgb** = ``false`` +:ref:`bool<class_bool>` **process/hdr_as_srgb** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_process/hdr_as_srgb>` -.. container:: contribute +Some HDR images you can find online may be broken and contain sRGB color data (instead of linear color data). It is advised not to use those files. If you absolutely have to, enabling :ref:`process/hdr_as_srgb<class_ResourceImporterTexture_property_process/hdr_as_srgb>` will make them look correct. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Warning:** Enabling :ref:`process/hdr_as_srgb<class_ResourceImporterTexture_property_process/hdr_as_srgb>` on well-formatted HDR images will cause the resulting image to look too dark, so leave this on ``false`` if unsure. .. rst-class:: classref-item-separator @@ -261,11 +295,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **process/hdr_clamp_exposure** = ``false`` +:ref:`bool<class_bool>` **process/hdr_clamp_exposure** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_process/hdr_clamp_exposure>` + +If ``true``, clamps exposure in the imported high dynamic range images using a smart clamping formula (without introducing *visible* clipping). -.. container:: contribute +Some HDR panorama images you can find online may contain extremely bright pixels, due to being taken from real life sources without any clipping. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +While these HDR panorama images are accurate to real life, this can cause the radiance map generated by Godot to contain sparkles when used as a background sky. This can be seen in material reflections (even on rough materials in extreme cases). Enabling :ref:`process/hdr_clamp_exposure<class_ResourceImporterTexture_property_process/hdr_clamp_exposure>` can resolve this. .. rst-class:: classref-item-separator @@ -275,11 +311,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **process/normal_map_invert_y** = ``false`` +:ref:`bool<class_bool>` **process/normal_map_invert_y** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_process/normal_map_invert_y>` -.. container:: contribute +If ``true``, convert the normal map from Y- (DirectX-style) to Y+ (OpenGL-style) by inverting its green color channel. This is the normal map convention expected by Godot. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +More information about normal maps (including a coordinate order table for popular engines) can be found `here <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details>`__. .. rst-class:: classref-item-separator @@ -289,11 +325,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **process/premult_alpha** = ``false`` +:ref:`bool<class_bool>` **process/premult_alpha** = ``false`` :ref:`🔗<class_ResourceImporterTexture_property_process/premult_alpha>` -.. container:: contribute +An alternative to fixing darkened borders with :ref:`process/fix_alpha_border<class_ResourceImporterTexture_property_process/fix_alpha_border>` is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly: - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +- In 2D, a :ref:`CanvasItemMaterial<class_CanvasItemMaterial>` will need to be created and configured to use the :ref:`CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA<class_CanvasItemMaterial_constant_BLEND_MODE_PREMULT_ALPHA>` blend mode on :ref:`CanvasItem<class_CanvasItem>`\ s that use this texture. + +- In 3D, there is no support for premultiplied alpha blend mode yet, so this option is only suited for 2D. .. rst-class:: classref-item-separator @@ -303,11 +341,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **process/size_limit** = ``0`` +:ref:`int<class_int>` **process/size_limit** = ``0`` :ref:`🔗<class_ResourceImporterTexture_property_process/size_limit>` -.. container:: contribute +If set to a value greater than ``0``, the size of the texture is limited on import to a value smaller than or equal to the value specified here. For non-square textures, the size limit affects the longer dimension, with the shorter dimension scaled to preserve aspect ratio. Resizing is performed using cubic interpolation. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +This can be used to reduce memory usage without affecting the source images, or avoid issues with textures not displaying on mobile/web platforms (as these usually can't display textures larger than 4096×4096). .. rst-class:: classref-item-separator @@ -317,11 +355,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **roughness/mode** = ``0`` - -.. container:: contribute +:ref:`int<class_int>` **roughness/mode** = ``0`` :ref:`🔗<class_ResourceImporterTexture_property_roughness/mode>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The color channel to consider as a roughness map in this texture. Only effective if Roughness > Src Normal is not empty. .. rst-class:: classref-item-separator @@ -331,11 +367,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **roughness/src_normal** = ``""`` +:ref:`String<class_String>` **roughness/src_normal** = ``""`` :ref:`🔗<class_ResourceImporterTexture_property_roughness/src_normal>` -.. container:: contribute +The path to the texture to consider as a normal map for roughness filtering on import. Specifying this can help decrease specular aliasing slightly in 3D. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Roughness filtering on import is only used in 3D rendering, not 2D. .. rst-class:: classref-item-separator @@ -345,11 +381,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **svg/scale** = ``1.0`` +:ref:`float<class_float>` **svg/scale** = ``1.0`` :ref:`🔗<class_ResourceImporterTexture_property_svg/scale>` -.. container:: contribute +The scale the SVG should be rendered at, with ``1.0`` being the original design size. Higher values result in a larger image. Note that unlike font oversampling, this affects the size the SVG is rendered at in 2D. See also :ref:`editor/scale_with_editor_scale<class_ResourceImporterTexture_property_editor/scale_with_editor_scale>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only available for SVG images. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -358,3 +394,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimportertextureatlas.rst b/classes/class_resourceimportertextureatlas.rst index bd13154f678..4be1188b380 100644 --- a/classes/class_resourceimportertextureatlas.rst +++ b/classes/class_resourceimportertextureatlas.rst @@ -12,9 +12,16 @@ ResourceImporterTextureAtlas **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a collection of textures from a PNG image into an optimized :ref:`AtlasTexture<class_AtlasTexture>` for 2D rendering. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +This imports a collection of textures from a PNG image into an :ref:`AtlasTexture<class_AtlasTexture>` or 2D :ref:`ArrayMesh<class_ArrayMesh>`. This can be used to save memory when importing 2D animations from spritesheets. Texture atlases are only supported in 2D rendering, not 3D. See also :ref:`ResourceImporterTexture<class_ResourceImporterTexture>` and :ref:`ResourceImporterLayeredTexture<class_ResourceImporterLayeredTexture>`. + +\ **Note:** **ResourceImporterTextureAtlas** does not handle importing :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`, which is created using the :ref:`TileSet<class_TileSet>` editor instead. .. rst-class:: classref-reftable-group @@ -47,11 +54,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **atlas_file** = ``""`` - -.. container:: contribute +:ref:`String<class_String>` **atlas_file** = ``""`` :ref:`🔗<class_ResourceImporterTextureAtlas_property_atlas_file>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Path to the atlas spritesheet. This *must* be set to valid path to a PNG image. Otherwise, the atlas will fail to import. .. rst-class:: classref-item-separator @@ -61,11 +66,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **crop_to_region** = ``false`` +:ref:`bool<class_bool>` **crop_to_region** = ``false`` :ref:`🔗<class_ResourceImporterTextureAtlas_property_crop_to_region>` -.. container:: contribute +If ``true``, discards empty areas from the atlas. This only affects final sprite positioning, not storage. See also :ref:`trim_alpha_border_from_region<class_ResourceImporterTextureAtlas_property_trim_alpha_border_from_region>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only effective if :ref:`import_mode<class_ResourceImporterTextureAtlas_property_import_mode>` is **Region**. .. rst-class:: classref-item-separator @@ -75,11 +80,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **import_mode** = ``0`` +:ref:`int<class_int>` **import_mode** = ``0`` :ref:`🔗<class_ResourceImporterTextureAtlas_property_import_mode>` -.. container:: contribute +**Region:** Imports the atlas in an :ref:`AtlasTexture<class_AtlasTexture>` resource, which is rendered as a rectangle. This is fast to render, but transparent areas still have to be rendered if they can't be trimmed effectively by :ref:`trim_alpha_border_from_region<class_ResourceImporterTextureAtlas_property_trim_alpha_border_from_region>`. This can reduce performance when rendering large sprites on screen. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Mesh:** Imports the atlas as an :ref:`ArrayMesh<class_ArrayMesh>` resource, keeping the original bitmap visible (but rendered as a polygon). This can be used to reduce fill rate when rendering large transparent sprites, at the cost of slower rendering if there are little to no transparent areas in the sprite. .. rst-class:: classref-item-separator @@ -89,11 +94,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **trim_alpha_border_from_region** = ``true`` +:ref:`bool<class_bool>` **trim_alpha_border_from_region** = ``true`` :ref:`🔗<class_ResourceImporterTextureAtlas_property_trim_alpha_border_from_region>` -.. container:: contribute +If ``true``, trims the region to exclude fully transparent pixels using a clipping rectangle (which is never rotated). This can be used to save memory. See also :ref:`crop_to_region<class_ResourceImporterTextureAtlas_property_crop_to_region>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** Only effective if :ref:`import_mode<class_ResourceImporterTextureAtlas_property_import_mode>` is **Region**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -102,3 +107,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceimporterwav.rst b/classes/class_resourceimporterwav.rst index 53daddad618..6cbf8292c99 100644 --- a/classes/class_resourceimporterwav.rst +++ b/classes/class_resourceimporterwav.rst @@ -12,9 +12,21 @@ ResourceImporterWAV **Inherits:** :ref:`ResourceImporter<class_ResourceImporter>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +Imports a WAV audio file for playback. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +WAV is an uncompressed format, which can provide higher quality compared to Ogg Vorbis and MP3. It also has the lowest CPU cost to decode. This means high numbers of WAV sounds can be played at the same time, even on low-end deviceS. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group @@ -59,11 +71,15 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **compress/mode** = ``0`` +:ref:`int<class_int>` **compress/mode** = ``0`` :ref:`🔗<class_ResourceImporterWAV_property_compress/mode>` -.. container:: contribute +The compression mode to use on import. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Disabled:** Imports audio data without any compression. This results in the highest possible quality. + +\ **RAM (Ima-ADPCM):** Performs fast lossy compression on import. Low CPU cost, but quality is noticeably decreased compared to Ogg Vorbis or even MP3. + +\ **QOA (`Quite OK Audio <https://qoaformat.org/>`__):** Performs lossy compression on import. CPU cost is slightly higher than IMA-ADPCM, but quality is much higher. .. rst-class:: classref-item-separator @@ -73,11 +89,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **edit/loop_begin** = ``0`` +:ref:`int<class_int>` **edit/loop_begin** = ``0`` :ref:`🔗<class_ResourceImporterWAV_property_edit/loop_begin>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The begin loop point to use when :ref:`edit/loop_mode<class_ResourceImporterWAV_property_edit/loop_mode>` is **Forward**, **Ping-Pong**, or **Backward**. This is set in samples after the beginning of the audio file. .. rst-class:: classref-item-separator @@ -87,11 +101,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **edit/loop_end** = ``-1`` - -.. container:: contribute +:ref:`int<class_int>` **edit/loop_end** = ``-1`` :ref:`🔗<class_ResourceImporterWAV_property_edit/loop_end>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The end loop point to use when :ref:`edit/loop_mode<class_ResourceImporterWAV_property_edit/loop_mode>` is **Forward**, **Ping-Pong**, or **Backward**. This is set in samples after the beginning of the audio file. A value of ``-1`` uses the end of the audio file as the end loop point. .. rst-class:: classref-item-separator @@ -101,11 +113,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **edit/loop_mode** = ``0`` +:ref:`int<class_int>` **edit/loop_mode** = ``0`` :ref:`🔗<class_ResourceImporterWAV_property_edit/loop_mode>` -.. container:: contribute +Controls how audio should loop. This is automatically read from the WAV metadata on import. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Disabled:** Don't loop audio, even if metadata indicates the file should be played back looping. + +\ **Forward:** Standard audio looping. + +\ **Ping-Pong:** Play audio forward until it's done playing, then play it backward and repeat. This is similar to mirrored texture repeat, but for audio. + +\ **Backward:** Play audio in reverse and loop back to the end when done playing. + +\ **Note:** In :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`, the :ref:`AudioStreamPlayer.finished<class_AudioStreamPlayer_signal_finished>` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. .. rst-class:: classref-item-separator @@ -115,11 +135,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **edit/normalize** = ``false`` +:ref:`bool<class_bool>` **edit/normalize** = ``false`` :ref:`🔗<class_ResourceImporterWAV_property_edit/normalize>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, normalize the audio volume so that its peak volume is equal to 0 dB. When enabled, normalization will make audio sound louder depending on its original peak volume. .. rst-class:: classref-item-separator @@ -129,11 +147,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **edit/trim** = ``false`` - -.. container:: contribute +:ref:`bool<class_bool>` **edit/trim** = ``false`` :ref:`🔗<class_ResourceImporterWAV_property_edit/trim>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, automatically trim the beginning and end of the audio if it's lower than -50 dB after normalization (see :ref:`edit/normalize<class_ResourceImporterWAV_property_edit/normalize>`). This prevents having files with silence at the beginning or end, which increases their size unnecessarily and adds latency to the moment they are played back. A fade-in/fade-out period of 500 samples is also used during trimming to avoid audible pops. .. rst-class:: classref-item-separator @@ -143,11 +159,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **force/8_bit** = ``false`` +:ref:`bool<class_bool>` **force/8_bit** = ``false`` :ref:`🔗<class_ResourceImporterWAV_property_force/8_bit>` -.. container:: contribute +If ``true``, forces the imported audio to use 8-bit quantization if the source file is 16-bit or higher. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Enabling this is generally not recommended, as 8-bit quantization decreases audio quality significantly. If you need smaller file sizes, consider using Ogg Vorbis or MP3 audio instead. .. rst-class:: classref-item-separator @@ -157,11 +173,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **force/max_rate** = ``false`` +:ref:`bool<class_bool>` **force/max_rate** = ``false`` :ref:`🔗<class_ResourceImporterWAV_property_force/max_rate>` -.. container:: contribute +If set to a value greater than ``0``, forces the audio's sample rate to be reduced to a value lower than or equal to the value specified in :ref:`force/max_rate_hz<class_ResourceImporterWAV_property_force/max_rate_hz>`. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +This can decrease file size noticeably on certain sounds, without impacting quality depending on the actual sound's contents. See `Best practices <../tutorials/assets_pipeline/importing_audio_samples.html#doc-importing-audio-samples-best-practices>`__ for more information. .. rst-class:: classref-item-separator @@ -171,11 +187,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **force/max_rate_hz** = ``44100`` +:ref:`float<class_float>` **force/max_rate_hz** = ``44100`` :ref:`🔗<class_ResourceImporterWAV_property_force/max_rate_hz>` -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The frequency to limit the imported audio sample to (in Hz). Only effective if :ref:`force/max_rate<class_ResourceImporterWAV_property_force/max_rate>` is ``true``. .. rst-class:: classref-item-separator @@ -185,11 +199,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **force/mono** = ``false`` - -.. container:: contribute +:ref:`bool<class_bool>` **force/mono** = ``false`` :ref:`🔗<class_ResourceImporterWAV_property_force/mono>` - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, forces the imported audio to be mono if the source file is stereo. This decreases the file size by 50% by merging the two channels into one. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -198,3 +210,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceloader.rst b/classes/class_resourceloader.rst index 10f8ffba7e9..845ce3d19e0 100644 --- a/classes/class_resourceloader.rst +++ b/classes/class_resourceloader.rst @@ -30,7 +30,7 @@ It uses the many :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` classes Tutorials --------- -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -40,31 +40,31 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_resource_format_loader<class_ResourceLoader_method_add_resource_format_loader>` **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader, :ref:`bool<class_bool>` at_front=false **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`exists<class_ResourceLoader_method_exists>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="" **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_dependencies<class_ResourceLoader_method_get_dependencies>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recognized_extensions_for_type<class_ResourceLoader_method_get_recognized_extensions_for_type>` **(** :ref:`String<class_String>` type **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_resource_uid<class_ResourceLoader_method_get_resource_uid>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_cached<class_ResourceLoader_method_has_cached>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`load<class_ResourceLoader_method_load>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="", :ref:`CacheMode<enum_ResourceLoader_CacheMode>` cache_mode=1 **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`load_threaded_get<class_ResourceLoader_method_load_threaded_get>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ThreadLoadStatus<enum_ResourceLoader_ThreadLoadStatus>` | :ref:`load_threaded_get_status<class_ResourceLoader_method_load_threaded_get_status>` **(** :ref:`String<class_String>` path, :ref:`Array<class_Array>` progress=[] **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_threaded_request<class_ResourceLoader_method_load_threaded_request>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="", :ref:`bool<class_bool>` use_sub_threads=false, :ref:`CacheMode<enum_ResourceLoader_CacheMode>` cache_mode=1 **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_resource_format_loader<class_ResourceLoader_method_remove_resource_format_loader>` **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_abort_on_missing_resources<class_ResourceLoader_method_set_abort_on_missing_resources>` **(** :ref:`bool<class_bool>` abort **)** | - +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_resource_format_loader<class_ResourceLoader_method_add_resource_format_loader>`\ (\ format_loader\: :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`, at_front\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`exists<class_ResourceLoader_method_exists>`\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_dependencies<class_ResourceLoader_method_get_dependencies>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recognized_extensions_for_type<class_ResourceLoader_method_get_recognized_extensions_for_type>`\ (\ type\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_resource_uid<class_ResourceLoader_method_get_resource_uid>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_cached<class_ResourceLoader_method_has_cached>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`load<class_ResourceLoader_method_load>`\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = "", cache_mode\: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` = 1\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`load_threaded_get<class_ResourceLoader_method_load_threaded_get>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ThreadLoadStatus<enum_ResourceLoader_ThreadLoadStatus>` | :ref:`load_threaded_get_status<class_ResourceLoader_method_load_threaded_get_status>`\ (\ path\: :ref:`String<class_String>`, progress\: :ref:`Array<class_Array>` = []\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_threaded_request<class_ResourceLoader_method_load_threaded_request>`\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = "", use_sub_threads\: :ref:`bool<class_bool>` = false, cache_mode\: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` = 1\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_resource_format_loader<class_ResourceLoader_method_remove_resource_format_loader>`\ (\ format_loader\: :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_abort_on_missing_resources<class_ResourceLoader_method_set_abort_on_missing_resources>`\ (\ abort\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,7 +79,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ThreadLoadStatus**: +enum **ThreadLoadStatus**: :ref:`🔗<enum_ResourceLoader_ThreadLoadStatus>` .. _class_ResourceLoader_constant_THREAD_LOAD_INVALID_RESOURCE: @@ -121,7 +121,7 @@ The resource was loaded successfully and can be accessed via :ref:`load_threaded .. rst-class:: classref-enumeration -enum **CacheMode**: +enum **CacheMode**: :ref:`🔗<enum_ResourceLoader_CacheMode>` .. _class_ResourceLoader_constant_CACHE_MODE_IGNORE: @@ -129,7 +129,7 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` **CACHE_MODE_IGNORE** = ``0`` - +Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with :ref:`CACHE_MODE_REUSE<class_ResourceLoader_constant_CACHE_MODE_REUSE>`. .. _class_ResourceLoader_constant_CACHE_MODE_REUSE: @@ -137,7 +137,7 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` **CACHE_MODE_REUSE** = ``1`` - +The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). .. _class_ResourceLoader_constant_CACHE_MODE_REPLACE: @@ -145,7 +145,23 @@ enum **CacheMode**: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` **CACHE_MODE_REPLACE** = ``2`` +Like :ref:`CACHE_MODE_REUSE<class_ResourceLoader_constant_CACHE_MODE_REUSE>`, but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. + +.. _class_ResourceLoader_constant_CACHE_MODE_IGNORE_DEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode<enum_ResourceLoader_CacheMode>` **CACHE_MODE_IGNORE_DEEP** = ``3`` + +Like :ref:`CACHE_MODE_IGNORE<class_ResourceLoader_constant_CACHE_MODE_IGNORE>`, but propagated recursively down the tree of dependencies (external resources). +.. _class_ResourceLoader_constant_CACHE_MODE_REPLACE_DEEP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CacheMode<enum_ResourceLoader_CacheMode>` **CACHE_MODE_REPLACE_DEEP** = ``4`` + +Like :ref:`CACHE_MODE_REPLACE<class_ResourceLoader_constant_CACHE_MODE_REPLACE>`, but propagated recursively down the tree of dependencies (external resources). .. rst-class:: classref-section-separator @@ -160,7 +176,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader, :ref:`bool<class_bool>` at_front=false **)** +|void| **add_resource_format_loader**\ (\ format_loader\: :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`, at_front\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_ResourceLoader_method_add_resource_format_loader>` Registers a new :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`. The ResourceLoader will use the ResourceFormatLoader as described in :ref:`load<class_ResourceLoader_method_load>`. @@ -174,12 +190,14 @@ This method is performed implicitly for ResourceFormatLoaders written in GDScrip .. rst-class:: classref-method -:ref:`bool<class_bool>` **exists** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="" **)** +:ref:`bool<class_bool>` **exists**\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_ResourceLoader_method_exists>` Returns whether a recognized resource exists for the given ``path``. An optional ``type_hint`` can be used to further specify the :ref:`Resource<class_Resource>` type that should be handled by the :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`. Anything that inherits from :ref:`Resource<class_Resource>` can be used as a type hint, for example :ref:`Image<class_Image>`. +\ **Note:** If you use :ref:`Resource.take_over_path<class_Resource_method_take_over_path>`, this method will return ``true`` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). + .. rst-class:: classref-item-separator ---- @@ -188,7 +206,7 @@ An optional ``type_hint`` can be used to further specify the :ref:`Resource<clas .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_dependencies** **(** :ref:`String<class_String>` path **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_dependencies**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceLoader_method_get_dependencies>` Returns the dependencies for the resource at the given ``path``. @@ -208,7 +226,7 @@ Returns the dependencies for the resource at the given ``path``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_recognized_extensions_for_type** **(** :ref:`String<class_String>` type **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_recognized_extensions_for_type**\ (\ type\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceLoader_method_get_recognized_extensions_for_type>` Returns the list of recognized extensions for a resource type. @@ -220,7 +238,7 @@ Returns the list of recognized extensions for a resource type. .. rst-class:: classref-method -:ref:`int<class_int>` **get_resource_uid** **(** :ref:`String<class_String>` path **)** +:ref:`int<class_int>` **get_resource_uid**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceLoader_method_get_resource_uid>` Returns the ID associated with a given resource path, or ``-1`` when no such ID exists. @@ -232,7 +250,7 @@ Returns the ID associated with a given resource path, or ``-1`` when no such ID .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_cached** **(** :ref:`String<class_String>` path **)** +:ref:`bool<class_bool>` **has_cached**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceLoader_method_has_cached>` Returns whether a cached resource is available for the given ``path``. @@ -246,7 +264,7 @@ Once a resource has been loaded by the engine, it is cached in memory for faster .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **load** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="", :ref:`CacheMode<enum_ResourceLoader_CacheMode>` cache_mode=1 **)** +:ref:`Resource<class_Resource>` **load**\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = "", cache_mode\: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` = 1\ ) :ref:`🔗<class_ResourceLoader_method_load>` Loads a resource at the given ``path``, caching the result for further access. @@ -256,12 +274,14 @@ An optional ``type_hint`` can be used to further specify the :ref:`Resource<clas The ``cache_mode`` property defines whether and how the cache should be used or updated when loading the resource. See :ref:`CacheMode<enum_ResourceLoader_CacheMode>` for details. -Returns an empty resource if no :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` could handle the file. +Returns an empty resource if no :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` could handle the file, and prints an error if no file is found at the specified path. GDScript has a simplified :ref:`@GDScript.load<class_@GDScript_method_load>` built-in method which can be used in most situations, leaving the use of **ResourceLoader** for more advanced scenarios. \ **Note:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary<class_ProjectSettings_property_editor/export/convert_text_resources_to_binary>` is ``true``, :ref:`@GDScript.load<class_@GDScript_method_load>` will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary<class_ProjectSettings_property_editor/export/convert_text_resources_to_binary>` to ``false``. +\ **Note:** Relative paths will be prefixed with ``"res://"`` before loading, to avoid unexpected results make sure your paths are absolute. + .. rst-class:: classref-item-separator ---- @@ -270,11 +290,11 @@ GDScript has a simplified :ref:`@GDScript.load<class_@GDScript_method_load>` bui .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **load_threaded_get** **(** :ref:`String<class_String>` path **)** +:ref:`Resource<class_Resource>` **load_threaded_get**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceLoader_method_load_threaded_get>` Returns the resource loaded by :ref:`load_threaded_request<class_ResourceLoader_method_load_threaded_request>`. -If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status<class_ResourceLoader_method_load_threaded_get_status>` is not :ref:`THREAD_LOAD_LOADED<class_ResourceLoader_constant_THREAD_LOAD_LOADED>`), the calling thread will be blocked until the resource has finished loading. +If this is called before the loading thread is done (i.e. :ref:`load_threaded_get_status<class_ResourceLoader_method_load_threaded_get_status>` is not :ref:`THREAD_LOAD_LOADED<class_ResourceLoader_constant_THREAD_LOAD_LOADED>`), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use :ref:`load_threaded_get_status<class_ResourceLoader_method_load_threaded_get_status>` to known when the load has actually completed. .. rst-class:: classref-item-separator @@ -284,12 +304,14 @@ If this is called before the loading thread is done (i.e. :ref:`load_threaded_ge .. rst-class:: classref-method -:ref:`ThreadLoadStatus<enum_ResourceLoader_ThreadLoadStatus>` **load_threaded_get_status** **(** :ref:`String<class_String>` path, :ref:`Array<class_Array>` progress=[] **)** +:ref:`ThreadLoadStatus<enum_ResourceLoader_ThreadLoadStatus>` **load_threaded_get_status**\ (\ path\: :ref:`String<class_String>`, progress\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_ResourceLoader_method_load_threaded_get_status>` Returns the status of a threaded loading operation started with :ref:`load_threaded_request<class_ResourceLoader_method_load_threaded_request>` for the resource at ``path``. See :ref:`ThreadLoadStatus<enum_ResourceLoader_ThreadLoadStatus>` for possible return values. An array variable can optionally be passed via ``progress``, and will return a one-element array containing the percentage of completion of the threaded loading. +\ **Note:** The recommended way of using this method is to call it during different frames (e.g., in :ref:`Node._process<class_Node_private_method__process>`, instead of a loop). + .. rst-class:: classref-item-separator ---- @@ -298,7 +320,7 @@ An array variable can optionally be passed via ``progress``, and will return a o .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_threaded_request** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="", :ref:`bool<class_bool>` use_sub_threads=false, :ref:`CacheMode<enum_ResourceLoader_CacheMode>` cache_mode=1 **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_threaded_request**\ (\ path\: :ref:`String<class_String>`, type_hint\: :ref:`String<class_String>` = "", use_sub_threads\: :ref:`bool<class_bool>` = false, cache_mode\: :ref:`CacheMode<enum_ResourceLoader_CacheMode>` = 1\ ) :ref:`🔗<class_ResourceLoader_method_load_threaded_request>` Loads the resource using threads. If ``use_sub_threads`` is ``true``, multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). @@ -312,7 +334,7 @@ The ``cache_mode`` property defines whether and how the cache should be used or .. rst-class:: classref-method -void **remove_resource_format_loader** **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader **)** +|void| **remove_resource_format_loader**\ (\ format_loader\: :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`\ ) :ref:`🔗<class_ResourceLoader_method_remove_resource_format_loader>` Unregisters the given :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`. @@ -324,7 +346,7 @@ Unregisters the given :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`. .. rst-class:: classref-method -void **set_abort_on_missing_resources** **(** :ref:`bool<class_bool>` abort **)** +|void| **set_abort_on_missing_resources**\ (\ abort\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ResourceLoader_method_set_abort_on_missing_resources>` Changes the behavior on missing sub-resources. The default behavior is to abort loading. @@ -335,3 +357,4 @@ Changes the behavior on missing sub-resources. The default behavior is to abort .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourcepreloader.rst b/classes/class_resourcepreloader.rst index f815155376a..ea1aad522c4 100644 --- a/classes/class_resourcepreloader.rst +++ b/classes/class_resourcepreloader.rst @@ -31,19 +31,19 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_resource<class_ResourcePreloader_method_add_resource>` **(** :ref:`StringName<class_StringName>` name, :ref:`Resource<class_Resource>` resource **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`get_resource<class_ResourcePreloader_method_get_resource>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_resource_list<class_ResourcePreloader_method_get_resource_list>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_resource<class_ResourcePreloader_method_has_resource>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_resource<class_ResourcePreloader_method_remove_resource>` **(** :ref:`StringName<class_StringName>` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_resource<class_ResourcePreloader_method_rename_resource>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_resource<class_ResourcePreloader_method_add_resource>`\ (\ name\: :ref:`StringName<class_StringName>`, resource\: :ref:`Resource<class_Resource>`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`get_resource<class_ResourcePreloader_method_get_resource>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_resource_list<class_ResourcePreloader_method_get_resource_list>`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_resource<class_ResourcePreloader_method_has_resource>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_resource<class_ResourcePreloader_method_remove_resource>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_resource<class_ResourcePreloader_method_rename_resource>`\ (\ name\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_resource** **(** :ref:`StringName<class_StringName>` name, :ref:`Resource<class_Resource>` resource **)** +|void| **add_resource**\ (\ name\: :ref:`StringName<class_StringName>`, resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_ResourcePreloader_method_add_resource>` Adds a resource to the preloader with the given ``name``. If a resource with the given ``name`` already exists, the new resource will be renamed to "``name`` N" where N is an incrementing number starting from 2. @@ -70,7 +70,7 @@ Adds a resource to the preloader with the given ``name``. If a resource with the .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **get_resource** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`Resource<class_Resource>` **get_resource**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_ResourcePreloader_method_get_resource>` Returns the resource associated to ``name``. @@ -82,7 +82,7 @@ Returns the resource associated to ``name``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_resource_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_resource_list**\ (\ ) |const| :ref:`🔗<class_ResourcePreloader_method_get_resource_list>` Returns the list of resources inside the preloader. @@ -94,7 +94,7 @@ Returns the list of resources inside the preloader. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_resource** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_resource**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_ResourcePreloader_method_has_resource>` Returns ``true`` if the preloader contains a resource associated to ``name``. @@ -106,7 +106,7 @@ Returns ``true`` if the preloader contains a resource associated to ``name``. .. rst-class:: classref-method -void **remove_resource** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_resource**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_ResourcePreloader_method_remove_resource>` Removes the resource associated to ``name`` from the preloader. @@ -118,7 +118,7 @@ Removes the resource associated to ``name`` from the preloader. .. rst-class:: classref-method -void **rename_resource** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** +|void| **rename_resource**\ (\ name\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_ResourcePreloader_method_rename_resource>` Renames a resource inside the preloader from ``name`` to ``newname``. @@ -129,3 +129,4 @@ Renames a resource inside the preloader from ``name`` to ``newname``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourcesaver.rst b/classes/class_resourcesaver.rst index 9e1992a05bf..9a132f8b9c2 100644 --- a/classes/class_resourcesaver.rst +++ b/classes/class_resourcesaver.rst @@ -31,15 +31,15 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_resource_format_saver<class_ResourceSaver_method_add_resource_format_saver>` **(** :ref:`ResourceFormatSaver<class_ResourceFormatSaver>` format_saver, :ref:`bool<class_bool>` at_front=false **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recognized_extensions<class_ResourceSaver_method_get_recognized_extensions>` **(** :ref:`Resource<class_Resource>` type **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_resource_format_saver<class_ResourceSaver_method_remove_resource_format_saver>` **(** :ref:`ResourceFormatSaver<class_ResourceFormatSaver>` format_saver **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_ResourceSaver_method_save>` **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path="", |bitfield|\<:ref:`SaverFlags<enum_ResourceSaver_SaverFlags>`\> flags=0 **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_resource_format_saver<class_ResourceSaver_method_add_resource_format_saver>`\ (\ format_saver\: :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`, at_front\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_recognized_extensions<class_ResourceSaver_method_get_recognized_extensions>`\ (\ type\: :ref:`Resource<class_Resource>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_resource_format_saver<class_ResourceSaver_method_remove_resource_format_saver>`\ (\ format_saver\: :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_ResourceSaver_method_save>`\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>` = "", flags\: |bitfield|\[:ref:`SaverFlags<enum_ResourceSaver_SaverFlags>`\] = 0\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,7 +54,7 @@ Enumerations .. rst-class:: classref-enumeration -flags **SaverFlags**: +flags **SaverFlags**: :ref:`🔗<enum_ResourceSaver_SaverFlags>` .. _class_ResourceSaver_constant_FLAG_NONE: @@ -133,7 +133,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_resource_format_saver** **(** :ref:`ResourceFormatSaver<class_ResourceFormatSaver>` format_saver, :ref:`bool<class_bool>` at_front=false **)** +|void| **add_resource_format_saver**\ (\ format_saver\: :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`, at_front\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_ResourceSaver_method_add_resource_format_saver>` Registers a new :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`. The ResourceSaver will use the ResourceFormatSaver as described in :ref:`save<class_ResourceSaver_method_save>`. @@ -147,7 +147,7 @@ This method is performed implicitly for ResourceFormatSavers written in GDScript .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_recognized_extensions** **(** :ref:`Resource<class_Resource>` type **)** +:ref:`PackedStringArray<class_PackedStringArray>` **get_recognized_extensions**\ (\ type\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_ResourceSaver_method_get_recognized_extensions>` Returns the list of extensions available for saving a resource of a given type. @@ -159,7 +159,7 @@ Returns the list of extensions available for saving a resource of a given type. .. rst-class:: classref-method -void **remove_resource_format_saver** **(** :ref:`ResourceFormatSaver<class_ResourceFormatSaver>` format_saver **)** +|void| **remove_resource_format_saver**\ (\ format_saver\: :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`\ ) :ref:`🔗<class_ResourceSaver_method_remove_resource_format_saver>` Unregisters the given :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`. @@ -171,7 +171,7 @@ Unregisters the given :ref:`ResourceFormatSaver<class_ResourceFormatSaver>`. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save** **(** :ref:`Resource<class_Resource>` resource, :ref:`String<class_String>` path="", |bitfield|\<:ref:`SaverFlags<enum_ResourceSaver_SaverFlags>`\> flags=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **save**\ (\ resource\: :ref:`Resource<class_Resource>`, path\: :ref:`String<class_String>` = "", flags\: |bitfield|\[:ref:`SaverFlags<enum_ResourceSaver_SaverFlags>`\] = 0\ ) :ref:`🔗<class_ResourceSaver_method_save>` Saves a resource to disk to the given path, using a :ref:`ResourceFormatSaver<class_ResourceFormatSaver>` that recognizes the resource object. If ``path`` is empty, **ResourceSaver** will try to use :ref:`Resource.resource_path<class_Resource_property_resource_path>`. @@ -179,6 +179,8 @@ The ``flags`` bitmask can be specified to customize the save behavior using :ref Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success. +\ **Note:** When the project is running, any generated UID associated with the resource will not be saved as the required code is only executed in editor mode. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -186,3 +188,4 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_resourceuid.rst b/classes/class_resourceuid.rst index 992407c106d..cc39a4191b4 100644 --- a/classes/class_resourceuid.rst +++ b/classes/class_resourceuid.rst @@ -31,23 +31,23 @@ Methods .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_id<class_ResourceUID_method_add_id>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` path **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`create_id<class_ResourceUID_method_create_id>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_id_path<class_ResourceUID_method_get_id_path>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_id<class_ResourceUID_method_has_id>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`id_to_text<class_ResourceUID_method_id_to_text>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_id<class_ResourceUID_method_remove_id>` **(** :ref:`int<class_int>` id **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_id<class_ResourceUID_method_set_id>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` path **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`text_to_id<class_ResourceUID_method_text_to_id>` **(** :ref:`String<class_String>` text_id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_id<class_ResourceUID_method_add_id>`\ (\ id\: :ref:`int<class_int>`, path\: :ref:`String<class_String>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`create_id<class_ResourceUID_method_create_id>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_id_path<class_ResourceUID_method_get_id_path>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_id<class_ResourceUID_method_has_id>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`id_to_text<class_ResourceUID_method_id_to_text>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_id<class_ResourceUID_method_remove_id>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_id<class_ResourceUID_method_set_id>`\ (\ id\: :ref:`int<class_int>`, path\: :ref:`String<class_String>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`text_to_id<class_ResourceUID_method_text_to_id>`\ (\ text_id\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,7 +62,7 @@ Constants .. rst-class:: classref-constant -**INVALID_ID** = ``-1`` +**INVALID_ID** = ``-1`` :ref:`🔗<class_ResourceUID_constant_INVALID_ID>` The value to use for an invalid UID, for example if the resource could not be loaded. @@ -81,7 +81,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_id** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` path **)** +|void| **add_id**\ (\ id\: :ref:`int<class_int>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceUID_method_add_id>` Adds a new UID value which is mapped to the given resource path. @@ -95,7 +95,7 @@ Fails with an error if the UID already exists, so be sure to check :ref:`has_id< .. rst-class:: classref-method -:ref:`int<class_int>` **create_id** **(** **)** +:ref:`int<class_int>` **create_id**\ (\ ) :ref:`🔗<class_ResourceUID_method_create_id>` Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. @@ -109,7 +109,7 @@ In order for this UID to be registered, you must call :ref:`add_id<class_Resourc .. rst-class:: classref-method -:ref:`String<class_String>` **get_id_path** **(** :ref:`int<class_int>` id **)** |const| +:ref:`String<class_String>` **get_id_path**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ResourceUID_method_get_id_path>` Returns the path that the given UID value refers to. @@ -123,7 +123,7 @@ Fails with an error if the UID does not exist, so be sure to check :ref:`has_id< .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_id** **(** :ref:`int<class_int>` id **)** |const| +:ref:`bool<class_bool>` **has_id**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ResourceUID_method_has_id>` Returns whether the given UID value is known to the cache. @@ -135,7 +135,7 @@ Returns whether the given UID value is known to the cache. .. rst-class:: classref-method -:ref:`String<class_String>` **id_to_text** **(** :ref:`int<class_int>` id **)** |const| +:ref:`String<class_String>` **id_to_text**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ResourceUID_method_id_to_text>` Converts the given UID to a ``uid://`` string value. @@ -147,7 +147,7 @@ Converts the given UID to a ``uid://`` string value. .. rst-class:: classref-method -void **remove_id** **(** :ref:`int<class_int>` id **)** +|void| **remove_id**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ResourceUID_method_remove_id>` Removes a loaded UID value from the cache. @@ -161,7 +161,7 @@ Fails with an error if the UID does not exist, so be sure to check :ref:`has_id< .. rst-class:: classref-method -void **set_id** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` path **)** +|void| **set_id**\ (\ id\: :ref:`int<class_int>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ResourceUID_method_set_id>` Updates the resource path of an existing UID. @@ -175,7 +175,7 @@ Fails with an error if the UID does not exist, so be sure to check :ref:`has_id< .. rst-class:: classref-method -:ref:`int<class_int>` **text_to_id** **(** :ref:`String<class_String>` text_id **)** |const| +:ref:`int<class_int>` **text_to_id**\ (\ text_id\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_ResourceUID_method_text_to_id>` Extracts the UID value from the given ``uid://`` string. @@ -186,3 +186,4 @@ Extracts the UID value from the given ``uid://`` string. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_ribbontrailmesh.rst b/classes/class_ribbontrailmesh.rst index f4a37517994..69b779435fb 100644 --- a/classes/class_ribbontrailmesh.rst +++ b/classes/class_ribbontrailmesh.rst @@ -67,7 +67,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Shape**: +enum **Shape**: :ref:`🔗<enum_RibbonTrailMesh_Shape>` .. _class_RibbonTrailMesh_constant_SHAPE_FLAT: @@ -98,12 +98,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Curve<class_Curve>` **curve** +:ref:`Curve<class_Curve>` **curve** :ref:`🔗<class_RibbonTrailMesh_property_curve>` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve<class_Curve>` value **)** -- :ref:`Curve<class_Curve>` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ ) +- :ref:`Curve<class_Curve>` **get_curve**\ (\ ) Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline :ref:`size<class_RibbonTrailMesh_property_size>` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. @@ -115,12 +115,12 @@ Determines the size of the ribbon along its length. The size of a particular sec .. rst-class:: classref-property -:ref:`float<class_float>` **section_length** = ``0.2`` +:ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_RibbonTrailMesh_property_section_length>` .. rst-class:: classref-property-setget -- void **set_section_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_section_length** **(** **)** +- |void| **set_section_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_section_length**\ (\ ) The length of a section of the ribbon. @@ -132,12 +132,12 @@ The length of a section of the ribbon. .. rst-class:: classref-property -:ref:`int<class_int>` **section_segments** = ``3`` +:ref:`int<class_int>` **section_segments** = ``3`` :ref:`🔗<class_RibbonTrailMesh_property_section_segments>` .. rst-class:: classref-property-setget -- void **set_section_segments** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_section_segments** **(** **)** +- |void| **set_section_segments**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_section_segments**\ (\ ) The number of segments in a section. The :ref:`curve<class_RibbonTrailMesh_property_curve>` is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance. @@ -149,12 +149,12 @@ The number of segments in a section. The :ref:`curve<class_RibbonTrailMesh_prope .. rst-class:: classref-property -:ref:`int<class_int>` **sections** = ``5`` +:ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_RibbonTrailMesh_property_sections>` .. rst-class:: classref-property-setget -- void **set_sections** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sections** **(** **)** +- |void| **set_sections**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sections**\ (\ ) The total number of sections on the ribbon. @@ -166,12 +166,12 @@ The total number of sections on the ribbon. .. rst-class:: classref-property -:ref:`Shape<enum_RibbonTrailMesh_Shape>` **shape** = ``1`` +:ref:`Shape<enum_RibbonTrailMesh_Shape>` **shape** = ``1`` :ref:`🔗<class_RibbonTrailMesh_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape<enum_RibbonTrailMesh_Shape>` value **)** -- :ref:`Shape<enum_RibbonTrailMesh_Shape>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape<enum_RibbonTrailMesh_Shape>`\ ) +- :ref:`Shape<enum_RibbonTrailMesh_Shape>` **get_shape**\ (\ ) Determines the shape of the ribbon. @@ -183,12 +183,12 @@ Determines the shape of the ribbon. .. rst-class:: classref-property -:ref:`float<class_float>` **size** = ``1.0`` +:ref:`float<class_float>` **size** = ``1.0`` :ref:`🔗<class_RibbonTrailMesh_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_size**\ (\ ) The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the :ref:`curve<class_RibbonTrailMesh_property_curve>` at the given distance. @@ -199,3 +199,4 @@ The baseline size of the ribbon. The size of a particular section segment is obt .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_richtexteffect.rst b/classes/class_richtexteffect.rst index 632b2690357..10be3363c3e 100644 --- a/classes/class_richtexteffect.rst +++ b/classes/class_richtexteffect.rst @@ -19,7 +19,7 @@ A custom effect for a :ref:`RichTextLabel<class_RichTextLabel>`. Description ----------- -A custom effect for a :ref:`RichTextLabel<class_RichTextLabel>`. +A custom effect for a :ref:`RichTextLabel<class_RichTextLabel>`, which can be loaded in the :ref:`RichTextLabel<class_RichTextLabel>` inspector or using :ref:`RichTextLabel.install_effect<class_RichTextLabel_method_install_effect>`. \ **Note:** For a **RichTextEffect** to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script. @@ -57,9 +57,9 @@ Methods .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_process_custom_fx<class_RichTextEffect_method__process_custom_fx>` **(** :ref:`CharFXTransform<class_CharFXTransform>` char_fx **)** |virtual| |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_process_custom_fx<class_RichTextEffect_private_method__process_custom_fx>`\ (\ char_fx\: :ref:`CharFXTransform<class_CharFXTransform>`\ ) |virtual| |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,11 +70,11 @@ Methods Method Descriptions ------------------- -.. _class_RichTextEffect_method__process_custom_fx: +.. _class_RichTextEffect_private_method__process_custom_fx: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_process_custom_fx** **(** :ref:`CharFXTransform<class_CharFXTransform>` char_fx **)** |virtual| |const| +:ref:`bool<class_bool>` **_process_custom_fx**\ (\ char_fx\: :ref:`CharFXTransform<class_CharFXTransform>`\ ) |virtual| |const| :ref:`🔗<class_RichTextEffect_private_method__process_custom_fx>` Override this method to modify properties in ``char_fx``. The method must return ``true`` if the character could be transformed successfully. If the method returns ``false``, it will skip transformation to avoid displaying broken text. @@ -85,3 +85,4 @@ Override this method to modify properties in ``char_fx``. The method must return .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index 200093674c4..f1a0d6a2b4e 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -36,9 +36,9 @@ Tutorials - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>` -- `GUI Rich Text/BBcode Demo <https://godotengine.org/asset-library/asset/132>`__ +- `Rich Text Label with BBCode Demo <https://godotengine.org/asset-library/asset/2774>`__ -- `OS Test Demo <https://godotengine.org/asset-library/asset/677>`__ +- `Operating System Testing Demo <https://godotengine.org/asset-library/asset/2789>`__ .. rst-class:: classref-reftable-group @@ -61,6 +61,8 @@ Properties +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_RichTextLabel_property_deselect_on_focus_loss_enabled>` | ``true`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_RichTextLabel_property_drag_and_drop_selection_enabled>` | ``true`` | + +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`fit_content<class_RichTextLabel_property_fit_content>` | ``false`` | +-----------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`hint_underlined<class_RichTextLabel_property_hint_underlined>` | ``true`` | @@ -106,139 +108,145 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_image<class_RichTextLabel_method_add_image>` **(** :ref:`Texture2D<class_Texture2D>` image, :ref:`int<class_int>` width=0, :ref:`int<class_int>` height=0, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0) **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_text<class_RichTextLabel_method_add_text>` **(** :ref:`String<class_String>` text **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_text<class_RichTextLabel_method_append_text>` **(** :ref:`String<class_String>` bbcode **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_RichTextLabel_method_clear>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect<class_RichTextLabel_method_deselect>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_character_line<class_RichTextLabel_method_get_character_line>` **(** :ref:`int<class_int>` character **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_character_paragraph<class_RichTextLabel_method_get_character_paragraph>` **(** :ref:`int<class_int>` character **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_content_height<class_RichTextLabel_method_get_content_height>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_content_width<class_RichTextLabel_method_get_content_width>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_count<class_RichTextLabel_method_get_line_count>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_offset<class_RichTextLabel_method_get_line_offset>` **(** :ref:`int<class_int>` line **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_RichTextLabel_method_get_menu>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_paragraph_count<class_RichTextLabel_method_get_paragraph_count>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_paragraph_offset<class_RichTextLabel_method_get_paragraph_offset>` **(** :ref:`int<class_int>` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_parsed_text<class_RichTextLabel_method_get_parsed_text>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_selected_text<class_RichTextLabel_method_get_selected_text>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_from<class_RichTextLabel_method_get_selection_from>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_to<class_RichTextLabel_method_get_selection_to>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_RichTextLabel_method_get_v_scroll_bar>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_RichTextLabel_method_get_visible_line_count>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_visible_paragraph_count<class_RichTextLabel_method_get_visible_paragraph_count>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`install_effect<class_RichTextLabel_method_install_effect>` **(** :ref:`Variant<class_Variant>` effect **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_RichTextLabel_method_is_menu_visible>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_ready<class_RichTextLabel_method_is_ready>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option<class_RichTextLabel_method_menu_option>` **(** :ref:`int<class_int>` option **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`newline<class_RichTextLabel_method_newline>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_bbcode<class_RichTextLabel_method_parse_bbcode>` **(** :ref:`String<class_String>` bbcode **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`parse_expressions_for_values<class_RichTextLabel_method_parse_expressions_for_values>` **(** :ref:`PackedStringArray<class_PackedStringArray>` expressions **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop<class_RichTextLabel_method_pop>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop_all<class_RichTextLabel_method_pop_all>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop_context<class_RichTextLabel_method_pop_context>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bgcolor<class_RichTextLabel_method_push_bgcolor>` **(** :ref:`Color<class_Color>` bgcolor **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold<class_RichTextLabel_method_push_bold>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold_italics<class_RichTextLabel_method_push_bold_italics>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_cell<class_RichTextLabel_method_push_cell>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_color<class_RichTextLabel_method_push_color>` **(** :ref:`Color<class_Color>` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_context<class_RichTextLabel_method_push_context>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_customfx<class_RichTextLabel_method_push_customfx>` **(** :ref:`RichTextEffect<class_RichTextEffect>` effect, :ref:`Dictionary<class_Dictionary>` env **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_dropcap<class_RichTextLabel_method_push_dropcap>` **(** :ref:`String<class_String>` string, :ref:`Font<class_Font>` font, :ref:`int<class_int>` size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`Color<class_Color>` outline_color=Color(0, 0, 0, 0) **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_fgcolor<class_RichTextLabel_method_push_fgcolor>` **(** :ref:`Color<class_Color>` fgcolor **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font<class_RichTextLabel_method_push_font>` **(** :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size=0 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font_size<class_RichTextLabel_method_push_font_size>` **(** :ref:`int<class_int>` font_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_hint<class_RichTextLabel_method_push_hint>` **(** :ref:`String<class_String>` description **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_indent<class_RichTextLabel_method_push_indent>` **(** :ref:`int<class_int>` level **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_italics<class_RichTextLabel_method_push_italics>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_list<class_RichTextLabel_method_push_list>` **(** :ref:`int<class_int>` level, :ref:`ListType<enum_RichTextLabel_ListType>` type, :ref:`bool<class_bool>` capitalize, :ref:`String<class_String>` bullet="•" **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_meta<class_RichTextLabel_method_push_meta>` **(** :ref:`Variant<class_Variant>` data **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_mono<class_RichTextLabel_method_push_mono>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_normal<class_RichTextLabel_method_push_normal>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_color<class_RichTextLabel_method_push_outline_color>` **(** :ref:`Color<class_Color>` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_size<class_RichTextLabel_method_push_outline_size>` **(** :ref:`int<class_int>` outline_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_paragraph<class_RichTextLabel_method_push_paragraph>` **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment, :ref:`TextDirection<enum_Control_TextDirection>` base_direction=0, :ref:`String<class_String>` language="", :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` st_parser=0, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=163, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops=PackedFloat32Array() **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_strikethrough<class_RichTextLabel_method_push_strikethrough>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_table<class_RichTextLabel_method_push_table>` **(** :ref:`int<class_int>` columns, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=0, :ref:`int<class_int>` align_to_row=-1 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_underline<class_RichTextLabel_method_push_underline>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`remove_paragraph<class_RichTextLabel_method_remove_paragraph>` **(** :ref:`int<class_int>` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>` **(** :ref:`int<class_int>` line **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_paragraph<class_RichTextLabel_method_scroll_to_paragraph>` **(** :ref:`int<class_int>` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_selection<class_RichTextLabel_method_scroll_to_selection>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all<class_RichTextLabel_method_select_all>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>` **(** :ref:`Color<class_Color>` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>` **(** :ref:`Rect2<class_Rect2>` padding **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>` **(** :ref:`Color<class_Color>` odd_row_bg, :ref:`Color<class_Color>` even_row_bg **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>` **(** :ref:`Vector2<class_Vector2>` min_size, :ref:`Vector2<class_Vector2>` max_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio=1 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_image<class_RichTextLabel_method_add_image>`\ (\ image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), key\: :ref:`Variant<class_Variant>` = null, pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_text<class_RichTextLabel_method_add_text>`\ (\ text\: :ref:`String<class_String>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_text<class_RichTextLabel_method_append_text>`\ (\ bbcode\: :ref:`String<class_String>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_RichTextLabel_method_clear>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect<class_RichTextLabel_method_deselect>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_character_line<class_RichTextLabel_method_get_character_line>`\ (\ character\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_character_paragraph<class_RichTextLabel_method_get_character_paragraph>`\ (\ character\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_content_height<class_RichTextLabel_method_get_content_height>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_content_width<class_RichTextLabel_method_get_content_width>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_count<class_RichTextLabel_method_get_line_count>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_offset<class_RichTextLabel_method_get_line_offset>`\ (\ line\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_RichTextLabel_method_get_menu>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_paragraph_count<class_RichTextLabel_method_get_paragraph_count>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_paragraph_offset<class_RichTextLabel_method_get_paragraph_offset>`\ (\ paragraph\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_parsed_text<class_RichTextLabel_method_get_parsed_text>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_selected_text<class_RichTextLabel_method_get_selected_text>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_from<class_RichTextLabel_method_get_selection_from>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_to<class_RichTextLabel_method_get_selection_to>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_RichTextLabel_method_get_v_scroll_bar>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_RichTextLabel_method_get_visible_line_count>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_visible_paragraph_count<class_RichTextLabel_method_get_visible_paragraph_count>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`install_effect<class_RichTextLabel_method_install_effect>`\ (\ effect\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`invalidate_paragraph<class_RichTextLabel_method_invalidate_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_RichTextLabel_method_is_menu_visible>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_ready<class_RichTextLabel_method_is_ready>`\ (\ ) |const| | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`menu_option<class_RichTextLabel_method_menu_option>`\ (\ option\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`newline<class_RichTextLabel_method_newline>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`parse_bbcode<class_RichTextLabel_method_parse_bbcode>`\ (\ bbcode\: :ref:`String<class_String>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`parse_expressions_for_values<class_RichTextLabel_method_parse_expressions_for_values>`\ (\ expressions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pop<class_RichTextLabel_method_pop>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pop_all<class_RichTextLabel_method_pop_all>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pop_context<class_RichTextLabel_method_pop_context>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_bgcolor<class_RichTextLabel_method_push_bgcolor>`\ (\ bgcolor\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_bold<class_RichTextLabel_method_push_bold>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_bold_italics<class_RichTextLabel_method_push_bold_italics>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_cell<class_RichTextLabel_method_push_cell>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_color<class_RichTextLabel_method_push_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_context<class_RichTextLabel_method_push_context>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_customfx<class_RichTextLabel_method_push_customfx>`\ (\ effect\: :ref:`RichTextEffect<class_RichTextEffect>`, env\: :ref:`Dictionary<class_Dictionary>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_dropcap<class_RichTextLabel_method_push_dropcap>`\ (\ string\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, outline_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 0)\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_fgcolor<class_RichTextLabel_method_push_fgcolor>`\ (\ fgcolor\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_font<class_RichTextLabel_method_push_font>`\ (\ font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_font_size<class_RichTextLabel_method_push_font_size>`\ (\ font_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_hint<class_RichTextLabel_method_push_hint>`\ (\ description\: :ref:`String<class_String>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_indent<class_RichTextLabel_method_push_indent>`\ (\ level\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_italics<class_RichTextLabel_method_push_italics>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_language<class_RichTextLabel_method_push_language>`\ (\ language\: :ref:`String<class_String>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_list<class_RichTextLabel_method_push_list>`\ (\ level\: :ref:`int<class_int>`, type\: :ref:`ListType<enum_RichTextLabel_ListType>`, capitalize\: :ref:`bool<class_bool>`, bullet\: :ref:`String<class_String>` = "•"\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_meta<class_RichTextLabel_method_push_meta>`\ (\ data\: :ref:`Variant<class_Variant>`, underline_mode\: :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` = 1\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_mono<class_RichTextLabel_method_push_mono>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_normal<class_RichTextLabel_method_push_normal>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_outline_color<class_RichTextLabel_method_push_outline_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_outline_size<class_RichTextLabel_method_push_outline_size>`\ (\ outline_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_paragraph<class_RichTextLabel_method_push_paragraph>`\ (\ alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`, base_direction\: :ref:`TextDirection<enum_Control_TextDirection>` = 0, language\: :ref:`String<class_String>` = "", st_parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` = 0, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 163, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array()\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_strikethrough<class_RichTextLabel_method_push_strikethrough>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_table<class_RichTextLabel_method_push_table>`\ (\ columns\: :ref:`int<class_int>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 0, align_to_row\: :ref:`int<class_int>` = -1\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_underline<class_RichTextLabel_method_push_underline>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`remove_paragraph<class_RichTextLabel_method_remove_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`, no_invalidate\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>`\ (\ line\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scroll_to_paragraph<class_RichTextLabel_method_scroll_to_paragraph>`\ (\ paragraph\: :ref:`int<class_int>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scroll_to_selection<class_RichTextLabel_method_scroll_to_selection>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_all<class_RichTextLabel_method_select_all>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>`\ (\ padding\: :ref:`Rect2<class_Rect2>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>`\ (\ odd_row_bg\: :ref:`Color<class_Color>`, even_row_bg\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>`\ (\ min_size\: :ref:`Vector2<class_Vector2>`, max_size\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>`\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`, ratio\: :ref:`int<class_int>` = 1\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_image<class_RichTextLabel_method_update_image>`\ (\ key\: :ref:`Variant<class_Variant>`, mask\: |bitfield|\[:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>`\], image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -251,7 +259,7 @@ Theme Properties +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Color<class_Color>` | :ref:`default_color<class_RichTextLabel_theme_color_default_color>` | ``Color(1, 1, 1, 1)`` | +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_RichTextLabel_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_RichTextLabel_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_RichTextLabel_theme_color_font_selected_color>` | ``Color(0, 0, 0, 0)`` | +---------------------------------+----------------------------------------------------------------------------------------------+-----------------------------+ @@ -321,7 +329,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_RichTextLabel_signal_finished>` Triggered when the document is fully loaded. @@ -333,9 +341,24 @@ Triggered when the document is fully loaded. .. rst-class:: classref-signal -**meta_clicked** **(** :ref:`Variant<class_Variant>` meta **)** +**meta_clicked**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_clicked>` + +Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. ``[url={"key": "value"}]Text[/url]``, then the parameter for this signal will always be a :ref:`String<class_String>` type. If a particular type or an object is desired, the :ref:`push_meta<class_RichTextLabel_method_push_meta>` method must be used to manually insert the data into the tag stack. Alternatively, you can convert the :ref:`String<class_String>` input to the desired type based on its contents (such as calling :ref:`JSON.parse<class_JSON_method_parse>` on it). + +For example, the following method can be connected to :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` to open clicked URLs using the user's default web browser: + + +.. tabs:: + + .. code-tab:: gdscript + + # This assumes RichTextLabel's `meta_clicked` signal was connected to + # the function below using the signal connection dialog. + func _richtextlabel_on_meta_clicked(meta): + # `meta` is of Variant type, so convert it to a String to avoid script errors at run-time. + OS.shell_open(str(meta)) + -Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. ``[url={"data"="hi"}]hi[/url]``, then the parameter for this signal will be a :ref:`String<class_String>` type. If a particular type or an object is desired, the :ref:`push_meta<class_RichTextLabel_method_push_meta>` method must be used to manually insert the data into the tag stack. .. rst-class:: classref-item-separator @@ -345,7 +368,7 @@ Triggered when the user clicks on content between meta tags. If the meta is defi .. rst-class:: classref-signal -**meta_hover_ended** **(** :ref:`Variant<class_Variant>` meta **)** +**meta_hover_ended**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_hover_ended>` Triggers when the mouse exits a meta tag. @@ -357,7 +380,7 @@ Triggers when the mouse exits a meta tag. .. rst-class:: classref-signal -**meta_hover_started** **(** :ref:`Variant<class_Variant>` meta **)** +**meta_hover_started**\ (\ meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_signal_meta_hover_started>` Triggers when the mouse enters a meta tag. @@ -374,7 +397,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ListType**: +enum **ListType**: :ref:`🔗<enum_RichTextLabel_ListType>` .. _class_RichTextLabel_constant_LIST_NUMBERS: @@ -416,7 +439,7 @@ Each list item has a filled circle marker. .. rst-class:: classref-enumeration -enum **MenuItems**: +enum **MenuItems**: :ref:`🔗<enum_RichTextLabel_MenuItems>` .. _class_RichTextLabel_constant_MENU_COPY: @@ -442,6 +465,114 @@ Selects the whole **RichTextLabel** text. Represents the size of the :ref:`MenuItems<enum_RichTextLabel_MenuItems>` enum. +.. rst-class:: classref-item-separator + +---- + +.. _enum_RichTextLabel_MetaUnderline: + +.. rst-class:: classref-enumeration + +enum **MetaUnderline**: :ref:`🔗<enum_RichTextLabel_MetaUnderline>` + +.. _class_RichTextLabel_constant_META_UNDERLINE_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_NEVER** = ``0`` + +Meta tag does not display an underline, even if :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``. + +.. _class_RichTextLabel_constant_META_UNDERLINE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_ALWAYS** = ``1`` + +If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tag always display an underline. + +.. _class_RichTextLabel_constant_META_UNDERLINE_ON_HOVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` **META_UNDERLINE_ON_HOVER** = ``2`` + +If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tag display an underline when the mouse cursor is over it. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_RichTextLabel_ImageUpdateMask: + +.. rst-class:: classref-enumeration + +flags **ImageUpdateMask**: :ref:`🔗<enum_RichTextLabel_ImageUpdateMask>` + +.. _class_RichTextLabel_constant_UPDATE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_TEXTURE** = ``1`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image texture. + +.. _class_RichTextLabel_constant_UPDATE_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_SIZE** = ``2`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image size. + +.. _class_RichTextLabel_constant_UPDATE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_COLOR** = ``4`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image color. + +.. _class_RichTextLabel_constant_UPDATE_ALIGNMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_ALIGNMENT** = ``8`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image inline alignment. + +.. _class_RichTextLabel_constant_UPDATE_REGION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_REGION** = ``16`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image texture region. + +.. _class_RichTextLabel_constant_UPDATE_PAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_PAD** = ``32`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image padding. + +.. _class_RichTextLabel_constant_UPDATE_TOOLTIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_TOOLTIP** = ``64`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image tooltip. + +.. _class_RichTextLabel_constant_UPDATE_WIDTH_IN_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>` **UPDATE_WIDTH_IN_PERCENT** = ``128`` + +If this bit is set, :ref:`update_image<class_RichTextLabel_method_update_image>` changes image width from/to percents. + .. rst-class:: classref-section-separator ---- @@ -455,12 +586,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3`` +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3`` :ref:`🔗<class_RichTextLabel_property_autowrap_mode>` .. rst-class:: classref-property-setget -- void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)** -- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)** +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) +- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ ) If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -472,15 +603,17 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_co .. rst-class:: classref-property -:ref:`bool<class_bool>` **bbcode_enabled** = ``false`` +:ref:`bool<class_bool>` **bbcode_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_bbcode_enabled>` .. rst-class:: classref-property-setget -- void **set_use_bbcode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_bbcode** **(** **)** +- |void| **set_use_bbcode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_bbcode**\ (\ ) If ``true``, the label uses BBCode formatting. +\ **Note:** This only affects the contents of :ref:`text<class_RichTextLabel_property_text>`, not the tag stack. + .. rst-class:: classref-item-separator ---- @@ -489,12 +622,12 @@ If ``true``, the label uses BBCode formatting. .. rst-class:: classref-property -:ref:`bool<class_bool>` **context_menu_enabled** = ``false`` +:ref:`bool<class_bool>` **context_menu_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_context_menu_enabled>` .. rst-class:: classref-property-setget -- void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)** +- |void| **set_context_menu_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_context_menu_enabled**\ (\ ) If ``true``, a right-click displays the context menu. @@ -506,12 +639,12 @@ If ``true``, a right-click displays the context menu. .. rst-class:: classref-property -:ref:`Array<class_Array>` **custom_effects** = ``[]`` +:ref:`Array<class_Array>` **custom_effects** = ``[]`` :ref:`🔗<class_RichTextLabel_property_custom_effects>` .. rst-class:: classref-property-setget -- void **set_effects** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_effects** **(** **)** +- |void| **set_effects**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_effects**\ (\ ) The currently installed custom effects. This is an array of :ref:`RichTextEffect<class_RichTextEffect>`\ s. @@ -525,12 +658,12 @@ To add a custom effect, it's more convenient to use :ref:`install_effect<class_R .. rst-class:: classref-property -:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` +:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_deselect_on_focus_loss_enabled>` .. rst-class:: classref-property-setget -- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)** +- |void| **set_deselect_on_focus_loss_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled**\ (\ ) If ``true``, the selected text will be deselected when focus is lost. @@ -538,16 +671,33 @@ If ``true``, the selected text will be deselected when focus is lost. ---- +.. _class_RichTextLabel_property_drag_and_drop_selection_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_drag_and_drop_selection_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_drag_and_drop_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled**\ (\ ) + +If ``true``, allow drag and drop of selected text. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_property_fit_content: .. rst-class:: classref-property -:ref:`bool<class_bool>` **fit_content** = ``false`` +:ref:`bool<class_bool>` **fit_content** = ``false`` :ref:`🔗<class_RichTextLabel_property_fit_content>` .. rst-class:: classref-property-setget -- void **set_fit_content** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_fit_content_enabled** **(** **)** +- |void| **set_fit_content**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_fit_content_enabled**\ (\ ) If ``true``, the label's minimum size will be automatically updated to fit its content, matching the behavior of :ref:`Label<class_Label>`. @@ -559,12 +709,12 @@ If ``true``, the label's minimum size will be automatically updated to fit its c .. rst-class:: classref-property -:ref:`bool<class_bool>` **hint_underlined** = ``true`` +:ref:`bool<class_bool>` **hint_underlined** = ``true`` :ref:`🔗<class_RichTextLabel_property_hint_underlined>` .. rst-class:: classref-property-setget -- void **set_hint_underline** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_hint_underlined** **(** **)** +- |void| **set_hint_underline**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_hint_underlined**\ (\ ) If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/hint]``. @@ -576,12 +726,12 @@ If ``true``, the label underlines hint tags such as ``[hint=description]{text}[/ .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_RichTextLabel_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -593,14 +743,14 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`bool<class_bool>` **meta_underlined** = ``true`` +:ref:`bool<class_bool>` **meta_underlined** = ``true`` :ref:`🔗<class_RichTextLabel_property_meta_underlined>` .. rst-class:: classref-property-setget -- void **set_meta_underline** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_meta_underlined** **(** **)** +- |void| **set_meta_underline**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_meta_underlined**\ (\ ) -If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. +If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. These tags can call a function when clicked if :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` is connected to a function. .. rst-class:: classref-item-separator @@ -610,12 +760,12 @@ If ``true``, the label underlines meta tags such as ``[url]{text}[/url]``. .. rst-class:: classref-property -:ref:`int<class_int>` **progress_bar_delay** = ``1000`` +:ref:`int<class_int>` **progress_bar_delay** = ``1000`` :ref:`🔗<class_RichTextLabel_property_progress_bar_delay>` .. rst-class:: classref-property-setget -- void **set_progress_bar_delay** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_progress_bar_delay** **(** **)** +- |void| **set_progress_bar_delay**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_progress_bar_delay**\ (\ ) The delay after which the loading progress bar is displayed, in milliseconds. Set to ``-1`` to disable progress bar entirely. @@ -629,12 +779,12 @@ The delay after which the loading progress bar is displayed, in milliseconds. Se .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_active** = ``true`` +:ref:`bool<class_bool>` **scroll_active** = ``true`` :ref:`🔗<class_RichTextLabel_property_scroll_active>` .. rst-class:: classref-property-setget -- void **set_scroll_active** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_scroll_active** **(** **)** +- |void| **set_scroll_active**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_scroll_active**\ (\ ) If ``true``, the scrollbar is visible. Setting this to ``false`` does not block scrolling completely. See :ref:`scroll_to_line<class_RichTextLabel_method_scroll_to_line>`. @@ -646,12 +796,12 @@ If ``true``, the scrollbar is visible. Setting this to ``false`` does not block .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_following** = ``false`` +:ref:`bool<class_bool>` **scroll_following** = ``false`` :ref:`🔗<class_RichTextLabel_property_scroll_following>` .. rst-class:: classref-property-setget -- void **set_scroll_follow** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_scroll_following** **(** **)** +- |void| **set_scroll_follow**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_scroll_following**\ (\ ) If ``true``, the window scrolls down to display new content automatically. @@ -663,12 +813,12 @@ If ``true``, the window scrolls down to display new content automatically. .. rst-class:: classref-property -:ref:`bool<class_bool>` **selection_enabled** = ``false`` +:ref:`bool<class_bool>` **selection_enabled** = ``false`` :ref:`🔗<class_RichTextLabel_property_selection_enabled>` .. rst-class:: classref-property-setget -- void **set_selection_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_selection_enabled** **(** **)** +- |void| **set_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_selection_enabled**\ (\ ) If ``true``, the label allows text selection. @@ -680,12 +830,12 @@ If ``true``, the label allows text selection. .. rst-class:: classref-property -:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` +:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` :ref:`🔗<class_RichTextLabel_property_shortcut_keys_enabled>` .. rst-class:: classref-property-setget -- void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)** +- |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shortcut_keys_enabled**\ (\ ) If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. @@ -697,12 +847,12 @@ If ``true``, shortcut keys for context menu items are enabled, even if the conte .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_RichTextLabel_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -714,12 +864,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_RichTextLabel_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -731,12 +881,12 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`int<class_int>` **tab_size** = ``4`` +:ref:`int<class_int>` **tab_size** = ``4`` :ref:`🔗<class_RichTextLabel_property_tab_size>` .. rst-class:: classref-property-setget -- void **set_tab_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_tab_size** **(** **)** +- |void| **set_tab_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_tab_size**\ (\ ) The number of spaces associated with a single tab length. Does not affect ``\t`` in text tags, only indent tags. @@ -748,16 +898,16 @@ The number of spaces associated with a single tab length. Does not affect ``\t`` .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_RichTextLabel_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) 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. -\ **Note:** If :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` is ``true``, it is unadvised to use the ``+=`` operator with ``text`` (e.g. ``text += "some string"``) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using ``push_*`` methods. Use :ref:`append_text<class_RichTextLabel_method_append_text>` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. +\ **Note:** If :ref:`bbcode_enabled<class_RichTextLabel_property_bbcode_enabled>` is ``true``, it is unadvised to use the ``+=`` operator with :ref:`text<class_RichTextLabel_property_text>` (e.g. ``text += "some string"``) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using ``push_*`` methods. Use :ref:`append_text<class_RichTextLabel_method_append_text>` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. .. rst-class:: classref-item-separator @@ -767,12 +917,12 @@ The label's text in BBCode format. Is not representative of manual modifications .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_RichTextLabel_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -784,12 +934,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`bool<class_bool>` **threaded** = ``false`` +:ref:`bool<class_bool>` **threaded** = ``false`` :ref:`🔗<class_RichTextLabel_property_threaded>` .. rst-class:: classref-property-setget -- void **set_threaded** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_threaded** **(** **)** +- |void| **set_threaded**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_threaded**\ (\ ) If ``true``, text processing is done in a background thread. @@ -801,12 +951,12 @@ If ``true``, text processing is done in a background thread. .. rst-class:: classref-property -:ref:`int<class_int>` **visible_characters** = ``-1`` +:ref:`int<class_int>` **visible_characters** = ``-1`` :ref:`🔗<class_RichTextLabel_property_visible_characters>` .. rst-class:: classref-property-setget -- void **set_visible_characters** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_visible_characters** **(** **)** +- |void| **set_visible_characters**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_visible_characters**\ (\ ) The number of characters to display. If set to ``-1``, all characters are displayed. This can be useful when animating the text appearing in a dialog box. @@ -820,12 +970,12 @@ The number of characters to display. If set to ``-1``, all characters are displa .. rst-class:: classref-property -:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0`` +:ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **visible_characters_behavior** = ``0`` :ref:`🔗<class_RichTextLabel_property_visible_characters_behavior>` .. rst-class:: classref-property-setget -- void **set_visible_characters_behavior** **(** :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` value **)** -- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior** **(** **)** +- |void| **set_visible_characters_behavior**\ (\ value\: :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>`\ ) +- :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` **get_visible_characters_behavior**\ (\ ) Sets the clipping behavior when :ref:`visible_characters<class_RichTextLabel_property_visible_characters>` or :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` is set. See :ref:`VisibleCharactersBehavior<enum_TextServer_VisibleCharactersBehavior>` for more info. @@ -837,12 +987,12 @@ Sets the clipping behavior when :ref:`visible_characters<class_RichTextLabel_pro .. rst-class:: classref-property -:ref:`float<class_float>` **visible_ratio** = ``1.0`` +:ref:`float<class_float>` **visible_ratio** = ``1.0`` :ref:`🔗<class_RichTextLabel_property_visible_ratio>` .. rst-class:: classref-property-setget -- void **set_visible_ratio** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_visible_ratio** **(** **)** +- |void| **set_visible_ratio**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_visible_ratio**\ (\ ) The fraction of characters to display, relative to the total number of characters (see :ref:`get_total_character_count<class_RichTextLabel_method_get_total_character_count>`). If set to ``1.0``, all characters are displayed. If set to ``0.5``, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. @@ -861,7 +1011,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_image** **(** :ref:`Texture2D<class_Texture2D>` image, :ref:`int<class_int>` width=0, :ref:`int<class_int>` height=0, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`Rect2<class_Rect2>` region=Rect2(0, 0, 0, 0) **)** +|void| **add_image**\ (\ image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), key\: :ref:`Variant<class_Variant>` = null, pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_add_image>` Adds an image's opening and closing tags to the tag stack, optionally providing a ``width`` and ``height`` to resize the image, a ``color`` to tint the image and a ``region`` to only use parts of the image. @@ -869,6 +1019,12 @@ If ``width`` or ``height`` is set to 0, the image size will be adjusted in order If ``width`` and ``height`` are not set, but ``region`` is, the region's rect will be used. +\ ``key`` is an optional identifier, that can be used to modify the image via :ref:`update_image<class_RichTextLabel_method_update_image>`. + +If ``pad`` is set, and the image is smaller than the size specified by ``width`` and ``height``, the image padding is added to match the size instead of upscaling. + +If ``size_in_percent`` is set, ``width`` and ``height`` values are percentages of the control width instead of pixels. + .. rst-class:: classref-item-separator ---- @@ -877,7 +1033,7 @@ If ``width`` and ``height`` are not set, but ``region`` is, the region's rect wi .. rst-class:: classref-method -void **add_text** **(** :ref:`String<class_String>` text **)** +|void| **add_text**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_add_text>` Adds raw non-BBCode-parsed text to the tag stack. @@ -889,7 +1045,7 @@ Adds raw non-BBCode-parsed text to the tag stack. .. rst-class:: classref-method -void **append_text** **(** :ref:`String<class_String>` bbcode **)** +|void| **append_text**\ (\ bbcode\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_append_text>` Parses ``bbcode`` and adds tags to the tag stack as needed. @@ -903,11 +1059,11 @@ Parses ``bbcode`` and adds tags to the tag stack as needed. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_RichTextLabel_method_clear>` -Clears the tag stack. +Clears the tag stack, causing the label to display nothing. -\ **Note:** This method will not modify :ref:`text<class_RichTextLabel_property_text>`, but setting :ref:`text<class_RichTextLabel_property_text>` to an empty string also clears the stack. +\ **Note:** This method does not affect :ref:`text<class_RichTextLabel_property_text>`, and its contents will show again if the label is redrawn. However, setting :ref:`text<class_RichTextLabel_property_text>` to an empty :ref:`String<class_String>` also clears the stack. .. rst-class:: classref-item-separator @@ -917,7 +1073,7 @@ Clears the tag stack. .. rst-class:: classref-method -void **deselect** **(** **)** +|void| **deselect**\ (\ ) :ref:`🔗<class_RichTextLabel_method_deselect>` Clears the current selection. @@ -929,9 +1085,9 @@ Clears the current selection. .. rst-class:: classref-method -:ref:`int<class_int>` **get_character_line** **(** :ref:`int<class_int>` character **)** +:ref:`int<class_int>` **get_character_line**\ (\ character\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_character_line>` -Returns the line number of the character position provided. +Returns the line number of the character position provided. Line and character numbers are both zero-indexed. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded. @@ -943,9 +1099,9 @@ Returns the line number of the character position provided. .. rst-class:: classref-method -:ref:`int<class_int>` **get_character_paragraph** **(** :ref:`int<class_int>` character **)** +:ref:`int<class_int>` **get_character_paragraph**\ (\ character\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_character_paragraph>` -Returns the paragraph number of the character position provided. +Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. \ **Note:** If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, this method returns a value for the loaded part of the document. Use :ref:`is_ready<class_RichTextLabel_method_is_ready>` or :ref:`finished<class_RichTextLabel_signal_finished>` to determine whether document is fully loaded. @@ -957,7 +1113,7 @@ Returns the paragraph number of the character position provided. .. rst-class:: classref-method -:ref:`int<class_int>` **get_content_height** **(** **)** |const| +:ref:`int<class_int>` **get_content_height**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_content_height>` Returns the height of the content. @@ -971,7 +1127,7 @@ Returns the height of the content. .. rst-class:: classref-method -:ref:`int<class_int>` **get_content_width** **(** **)** |const| +:ref:`int<class_int>` **get_content_width**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_content_width>` Returns the width of the content. @@ -985,7 +1141,7 @@ Returns the width of the content. .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_line_count>` Returns the total number of lines in the text. Wrapped text is counted as multiple lines. @@ -999,7 +1155,7 @@ Returns the total number of lines in the text. Wrapped text is counted as multip .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_offset** **(** :ref:`int<class_int>` line **)** +:ref:`float<class_float>` **get_line_offset**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_line_offset>` Returns the vertical offset of the line found at the provided index. @@ -1013,7 +1169,7 @@ Returns the vertical offset of the line found at the provided index. .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_menu**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_menu>` Returns the :ref:`PopupMenu<class_PopupMenu>` of this **RichTextLabel**. By default, this menu is displayed when right-clicking on the **RichTextLabel**. @@ -1072,7 +1228,7 @@ You can add custom menu items or remove standard ones. Make sure your IDs don't .. rst-class:: classref-method -:ref:`int<class_int>` **get_paragraph_count** **(** **)** |const| +:ref:`int<class_int>` **get_paragraph_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_paragraph_count>` Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack's text tags). Considers wrapped text as one paragraph. @@ -1084,7 +1240,7 @@ Returns the total number of paragraphs (newlines or ``p`` tags in the tag stack' .. rst-class:: classref-method -:ref:`float<class_float>` **get_paragraph_offset** **(** :ref:`int<class_int>` paragraph **)** +:ref:`float<class_float>` **get_paragraph_offset**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_get_paragraph_offset>` Returns the vertical offset of the paragraph found at the provided index. @@ -1098,7 +1254,7 @@ Returns the vertical offset of the paragraph found at the provided index. .. rst-class:: classref-method -:ref:`String<class_String>` **get_parsed_text** **(** **)** |const| +:ref:`String<class_String>` **get_parsed_text**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_parsed_text>` Returns the text without BBCode mark-up. @@ -1110,7 +1266,7 @@ Returns the text without BBCode mark-up. .. rst-class:: classref-method -:ref:`String<class_String>` **get_selected_text** **(** **)** |const| +:ref:`String<class_String>` **get_selected_text**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selected_text>` Returns the current selection text. Does not include BBCodes. @@ -1122,7 +1278,7 @@ Returns the current selection text. Does not include BBCodes. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_from** **(** **)** |const| +:ref:`int<class_int>` **get_selection_from**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selection_from>` Returns the current selection first character index if a selection is active, ``-1`` otherwise. Does not include BBCodes. @@ -1134,7 +1290,7 @@ Returns the current selection first character index if a selection is active, `` .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_to** **(** **)** |const| +:ref:`int<class_int>` **get_selection_to**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_selection_to>` Returns the current selection last character index if a selection is active, ``-1`` otherwise. Does not include BBCodes. @@ -1146,7 +1302,7 @@ Returns the current selection last character index if a selection is active, ``- .. rst-class:: classref-method -:ref:`int<class_int>` **get_total_character_count** **(** **)** |const| +:ref:`int<class_int>` **get_total_character_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_total_character_count>` Returns the total number of characters from text tags. Does not include BBCodes. @@ -1158,7 +1314,7 @@ Returns the total number of characters from text tags. Does not include BBCodes. .. rst-class:: classref-method -:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)** +:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_RichTextLabel_method_get_v_scroll_bar>` Returns the vertical scrollbar. @@ -1172,7 +1328,7 @@ Returns the vertical scrollbar. .. rst-class:: classref-method -:ref:`int<class_int>` **get_visible_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_visible_line_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_visible_line_count>` Returns the number of visible lines. @@ -1186,7 +1342,7 @@ Returns the number of visible lines. .. rst-class:: classref-method -:ref:`int<class_int>` **get_visible_paragraph_count** **(** **)** |const| +:ref:`int<class_int>` **get_visible_paragraph_count**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_get_visible_paragraph_count>` Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. @@ -1200,9 +1356,46 @@ Returns the number of visible paragraphs. A paragraph is considered visible if a .. rst-class:: classref-method -void **install_effect** **(** :ref:`Variant<class_Variant>` effect **)** +|void| **install_effect**\ (\ effect\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_RichTextLabel_method_install_effect>` + +Installs a custom effect. This can also be done in the RichTextLabel inspector using the :ref:`custom_effects<class_RichTextLabel_property_custom_effects>` property. ``effect`` should be a valid :ref:`RichTextEffect<class_RichTextEffect>`. + +Example RichTextEffect: + +:: + + # effect.gd + class_name MyCustomEffect + extends RichTextEffect + + var bbcode = "my_custom_effect" + + # ... + +Registering the above effect in RichTextLabel from script: -Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect<class_RichTextEffect>`. +:: + + # rich_text_label.gd + extends RichTextLabel + + func _ready(): + install_effect(MyCustomEffect.new()) + + # Alternatively, if not using `class_name` in the script that extends RichTextEffect: + install_effect(preload("res://effect.gd").new()) + +.. rst-class:: classref-item-separator + +---- + +.. _class_RichTextLabel_method_invalidate_paragraph: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **invalidate_paragraph**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_invalidate_paragraph>` + +Invalidates ``paragraph`` and all subsequent paragraphs cache. .. rst-class:: classref-item-separator @@ -1212,7 +1405,7 @@ Installs a custom effect. ``effect`` should be a valid :ref:`RichTextEffect<clas .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const| +:ref:`bool<class_bool>` **is_menu_visible**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_is_menu_visible>` Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). @@ -1224,7 +1417,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_ready** **(** **)** |const| +:ref:`bool<class_bool>` **is_ready**\ (\ ) |const| :ref:`🔗<class_RichTextLabel_method_is_ready>` If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, returns ``true`` if the background thread has finished text processing, otherwise always return ``true``. @@ -1236,7 +1429,7 @@ If :ref:`threaded<class_RichTextLabel_property_threaded>` is enabled, returns `` .. rst-class:: classref-method -void **menu_option** **(** :ref:`int<class_int>` option **)** +|void| **menu_option**\ (\ option\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_menu_option>` Executes a given action as defined in the :ref:`MenuItems<enum_RichTextLabel_MenuItems>` enum. @@ -1248,7 +1441,7 @@ Executes a given action as defined in the :ref:`MenuItems<enum_RichTextLabel_Men .. rst-class:: classref-method -void **newline** **(** **)** +|void| **newline**\ (\ ) :ref:`🔗<class_RichTextLabel_method_newline>` Adds a newline tag to the tag stack. @@ -1260,7 +1453,7 @@ Adds a newline tag to the tag stack. .. rst-class:: classref-method -void **parse_bbcode** **(** :ref:`String<class_String>` bbcode **)** +|void| **parse_bbcode**\ (\ bbcode\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_parse_bbcode>` The assignment version of :ref:`append_text<class_RichTextLabel_method_append_text>`. Clears the tag stack and inserts the new content. @@ -1272,7 +1465,7 @@ The assignment version of :ref:`append_text<class_RichTextLabel_method_append_te .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **parse_expressions_for_values** **(** :ref:`PackedStringArray<class_PackedStringArray>` expressions **)** +:ref:`Dictionary<class_Dictionary>` **parse_expressions_for_values**\ (\ expressions\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_RichTextLabel_method_parse_expressions_for_values>` Parses BBCode parameter ``expressions`` into a dictionary. @@ -1284,7 +1477,7 @@ Parses BBCode parameter ``expressions`` into a dictionary. .. rst-class:: classref-method -void **pop** **(** **)** +|void| **pop**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop>` Terminates the current tag. Use after ``push_*`` methods to close BBCodes manually. Does not need to follow ``add_*`` methods. @@ -1296,7 +1489,7 @@ Terminates the current tag. Use after ``push_*`` methods to close BBCodes manual .. rst-class:: classref-method -void **pop_all** **(** **)** +|void| **pop_all**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop_all>` Terminates all tags opened by ``push_*`` methods. @@ -1308,7 +1501,7 @@ Terminates all tags opened by ``push_*`` methods. .. rst-class:: classref-method -void **pop_context** **(** **)** +|void| **pop_context**\ (\ ) :ref:`🔗<class_RichTextLabel_method_pop_context>` Terminates tags opened after the last :ref:`push_context<class_RichTextLabel_method_push_context>` call (including context marker), or all tags if there's no context marker on the stack. @@ -1320,7 +1513,7 @@ Terminates tags opened after the last :ref:`push_context<class_RichTextLabel_met .. rst-class:: classref-method -void **push_bgcolor** **(** :ref:`Color<class_Color>` bgcolor **)** +|void| **push_bgcolor**\ (\ bgcolor\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_bgcolor>` Adds a ``[bgcolor]`` tag to the tag stack. @@ -1332,7 +1525,7 @@ Adds a ``[bgcolor]`` tag to the tag stack. .. rst-class:: classref-method -void **push_bold** **(** **)** +|void| **push_bold**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_bold>` Adds a ``[font]`` tag with a bold font to the tag stack. This is the same as adding a ``[b]`` tag if not currently in a ``[i]`` tag. @@ -1344,7 +1537,7 @@ Adds a ``[font]`` tag with a bold font to the tag stack. This is the same as add .. rst-class:: classref-method -void **push_bold_italics** **(** **)** +|void| **push_bold_italics**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_bold_italics>` Adds a ``[font]`` tag with a bold italics font to the tag stack. @@ -1356,9 +1549,9 @@ Adds a ``[font]`` tag with a bold italics font to the tag stack. .. rst-class:: classref-method -void **push_cell** **(** **)** +|void| **push_cell**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_cell>` -Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table<class_RichTextLabel_method_push_table>` for details. +Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :ref:`push_table<class_RichTextLabel_method_push_table>` for details. Use :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` to set column expansion ratio, :ref:`set_cell_border_color<class_RichTextLabel_method_set_cell_border_color>` to set cell border, :ref:`set_cell_row_background_color<class_RichTextLabel_method_set_cell_row_background_color>` to set cell background, :ref:`set_cell_size_override<class_RichTextLabel_method_set_cell_size_override>` to override cell size, and :ref:`set_cell_padding<class_RichTextLabel_method_set_cell_padding>` to set padding. .. rst-class:: classref-item-separator @@ -1368,7 +1561,7 @@ Adds a ``[cell]`` tag to the tag stack. Must be inside a ``[table]`` tag. See :r .. rst-class:: classref-method -void **push_color** **(** :ref:`Color<class_Color>` color **)** +|void| **push_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_color>` Adds a ``[color]`` tag to the tag stack. @@ -1380,7 +1573,7 @@ Adds a ``[color]`` tag to the tag stack. .. rst-class:: classref-method -void **push_context** **(** **)** +|void| **push_context**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_context>` Adds a context marker to the tag stack. See :ref:`pop_context<class_RichTextLabel_method_pop_context>`. @@ -1392,7 +1585,7 @@ Adds a context marker to the tag stack. See :ref:`pop_context<class_RichTextLabe .. rst-class:: classref-method -void **push_customfx** **(** :ref:`RichTextEffect<class_RichTextEffect>` effect, :ref:`Dictionary<class_Dictionary>` env **)** +|void| **push_customfx**\ (\ effect\: :ref:`RichTextEffect<class_RichTextEffect>`, env\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_RichTextLabel_method_push_customfx>` Adds a custom effect tag to the tag stack. The effect does not need to be in :ref:`custom_effects<class_RichTextLabel_property_custom_effects>`. The environment is directly passed to the effect. @@ -1404,7 +1597,7 @@ Adds a custom effect tag to the tag stack. The effect does not need to be in :re .. rst-class:: classref-method -void **push_dropcap** **(** :ref:`String<class_String>` string, :ref:`Font<class_Font>` font, :ref:`int<class_int>` size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`int<class_int>` outline_size=0, :ref:`Color<class_Color>` outline_color=Color(0, 0, 0, 0) **)** +|void| **push_dropcap**\ (\ string\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), outline_size\: :ref:`int<class_int>` = 0, outline_color\: :ref:`Color<class_Color>` = Color(0, 0, 0, 0)\ ) :ref:`🔗<class_RichTextLabel_method_push_dropcap>` Adds a ``[dropcap]`` tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. @@ -1416,7 +1609,7 @@ Adds a ``[dropcap]`` tag to the tag stack. Drop cap (dropped capital) is a decor .. rst-class:: classref-method -void **push_fgcolor** **(** :ref:`Color<class_Color>` fgcolor **)** +|void| **push_fgcolor**\ (\ fgcolor\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_fgcolor>` Adds a ``[fgcolor]`` tag to the tag stack. @@ -1428,7 +1621,7 @@ Adds a ``[fgcolor]`` tag to the tag stack. .. rst-class:: classref-method -void **push_font** **(** :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size=0 **)** +|void| **push_font**\ (\ font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_RichTextLabel_method_push_font>` Adds a ``[font]`` tag to the tag stack. Overrides default fonts for its duration. @@ -1442,7 +1635,7 @@ Passing ``0`` to ``font_size`` will use the existing default font size. .. rst-class:: classref-method -void **push_font_size** **(** :ref:`int<class_int>` font_size **)** +|void| **push_font_size**\ (\ font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_font_size>` Adds a ``[font_size]`` tag to the tag stack. Overrides default font size for its duration. @@ -1454,7 +1647,7 @@ Adds a ``[font_size]`` tag to the tag stack. Overrides default font size for its .. rst-class:: classref-method -void **push_hint** **(** :ref:`String<class_String>` description **)** +|void| **push_hint**\ (\ description\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_push_hint>` Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[/hint]``. @@ -1466,7 +1659,7 @@ Adds a ``[hint]`` tag to the tag stack. Same as BBCode ``[hint=something]{text}[ .. rst-class:: classref-method -void **push_indent** **(** :ref:`int<class_int>` level **)** +|void| **push_indent**\ (\ level\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_indent>` Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size<class_RichTextLabel_property_tab_size>` to determine new margin length. @@ -1478,7 +1671,7 @@ Adds an ``[indent]`` tag to the tag stack. Multiplies ``level`` by current :ref: .. rst-class:: classref-method -void **push_italics** **(** **)** +|void| **push_italics**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_italics>` Adds a ``[font]`` tag with an italics font to the tag stack. This is the same as adding an ``[i]`` tag if not currently in a ``[b]`` tag. @@ -1486,11 +1679,23 @@ Adds a ``[font]`` tag with an italics font to the tag stack. This is the same as ---- +.. _class_RichTextLabel_method_push_language: + +.. rst-class:: classref-method + +|void| **push_language**\ (\ language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_RichTextLabel_method_push_language>` + +Adds language code used for text shaping algorithm and Open-Type font features. + +.. rst-class:: classref-item-separator + +---- + .. _class_RichTextLabel_method_push_list: .. rst-class:: classref-method -void **push_list** **(** :ref:`int<class_int>` level, :ref:`ListType<enum_RichTextLabel_ListType>` type, :ref:`bool<class_bool>` capitalize, :ref:`String<class_String>` bullet="•" **)** +|void| **push_list**\ (\ level\: :ref:`int<class_int>`, type\: :ref:`ListType<enum_RichTextLabel_ListType>`, capitalize\: :ref:`bool<class_bool>`, bullet\: :ref:`String<class_String>` = "•"\ ) :ref:`🔗<class_RichTextLabel_method_push_list>` Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current :ref:`tab_size<class_RichTextLabel_property_tab_size>` to determine new margin length. @@ -1502,10 +1707,14 @@ Adds ``[ol]`` or ``[ul]`` tag to the tag stack. Multiplies ``level`` by current .. rst-class:: classref-method -void **push_meta** **(** :ref:`Variant<class_Variant>` data **)** +|void| **push_meta**\ (\ data\: :ref:`Variant<class_Variant>`, underline_mode\: :ref:`MetaUnderline<enum_RichTextLabel_MetaUnderline>` = 1\ ) :ref:`🔗<class_RichTextLabel_method_push_meta>` Adds a meta tag to the tag stack. Similar to the BBCode ``[url=something]{text}[/url]``, but supports non-:ref:`String<class_String>` metadata types. +If :ref:`meta_underlined<class_RichTextLabel_property_meta_underlined>` is ``true``, meta tags display an underline. This behavior can be customized with ``underline_mode``. + +\ **Note:** Meta tags do nothing by default when clicked. To assign behavior when clicked, connect :ref:`meta_clicked<class_RichTextLabel_signal_meta_clicked>` to a function that is called when the meta tag is clicked. + .. rst-class:: classref-item-separator ---- @@ -1514,7 +1723,7 @@ Adds a meta tag to the tag stack. Similar to the BBCode ``[url=something]{text}[ .. rst-class:: classref-method -void **push_mono** **(** **)** +|void| **push_mono**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_mono>` Adds a ``[font]`` tag with a monospace font to the tag stack. @@ -1526,7 +1735,7 @@ Adds a ``[font]`` tag with a monospace font to the tag stack. .. rst-class:: classref-method -void **push_normal** **(** **)** +|void| **push_normal**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_normal>` Adds a ``[font]`` tag with a normal font to the tag stack. @@ -1538,7 +1747,7 @@ Adds a ``[font]`` tag with a normal font to the tag stack. .. rst-class:: classref-method -void **push_outline_color** **(** :ref:`Color<class_Color>` color **)** +|void| **push_outline_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_push_outline_color>` Adds a ``[outline_color]`` tag to the tag stack. Adds text outline for its duration. @@ -1550,7 +1759,7 @@ Adds a ``[outline_color]`` tag to the tag stack. Adds text outline for its durat .. rst-class:: classref-method -void **push_outline_size** **(** :ref:`int<class_int>` outline_size **)** +|void| **push_outline_size**\ (\ outline_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_push_outline_size>` Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline size for its duration. @@ -1562,7 +1771,7 @@ Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline s .. rst-class:: classref-method -void **push_paragraph** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` alignment, :ref:`TextDirection<enum_Control_TextDirection>` base_direction=0, :ref:`String<class_String>` language="", :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` st_parser=0, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=163, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops=PackedFloat32Array() **)** +|void| **push_paragraph**\ (\ alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`, base_direction\: :ref:`TextDirection<enum_Control_TextDirection>` = 0, language\: :ref:`String<class_String>` = "", st_parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` = 0, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 163, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array()\ ) :ref:`🔗<class_RichTextLabel_method_push_paragraph>` Adds a ``[p]`` tag to the tag stack. @@ -1574,7 +1783,7 @@ Adds a ``[p]`` tag to the tag stack. .. rst-class:: classref-method -void **push_strikethrough** **(** **)** +|void| **push_strikethrough**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_strikethrough>` Adds a ``[s]`` tag to the tag stack. @@ -1586,9 +1795,9 @@ Adds a ``[s]`` tag to the tag stack. .. rst-class:: classref-method -void **push_table** **(** :ref:`int<class_int>` columns, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=0, :ref:`int<class_int>` align_to_row=-1 **)** +|void| **push_table**\ (\ columns\: :ref:`int<class_int>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 0, align_to_row\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_RichTextLabel_method_push_table>` -Adds a ``[table=columns,inline_align]`` tag to the tag stack. +Adds a ``[table=columns,inline_align]`` tag to the tag stack. Use :ref:`set_table_column_expand<class_RichTextLabel_method_set_table_column_expand>` to set column expansion ratio. Use :ref:`push_cell<class_RichTextLabel_method_push_cell>` to add cells. .. rst-class:: classref-item-separator @@ -1598,7 +1807,7 @@ Adds a ``[table=columns,inline_align]`` tag to the tag stack. .. rst-class:: classref-method -void **push_underline** **(** **)** +|void| **push_underline**\ (\ ) :ref:`🔗<class_RichTextLabel_method_push_underline>` Adds a ``[u]`` tag to the tag stack. @@ -1610,12 +1819,14 @@ Adds a ``[u]`` tag to the tag stack. .. rst-class:: classref-method -:ref:`bool<class_bool>` **remove_paragraph** **(** :ref:`int<class_int>` paragraph **)** +:ref:`bool<class_bool>` **remove_paragraph**\ (\ paragraph\: :ref:`int<class_int>`, no_invalidate\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_remove_paragraph>` Removes a paragraph of content from the label. Returns ``true`` if the paragraph exists. The ``paragraph`` argument is the index of the paragraph to remove, it can take values in the interval ``[0, get_paragraph_count() - 1]``. +If ``no_invalidate`` is set to ``true``, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and :ref:`invalidate_paragraph<class_RichTextLabel_method_invalidate_paragraph>` will be called at the end of operation. + .. rst-class:: classref-item-separator ---- @@ -1624,7 +1835,7 @@ The ``paragraph`` argument is the index of the paragraph to remove, it can take .. rst-class:: classref-method -void **scroll_to_line** **(** :ref:`int<class_int>` line **)** +|void| **scroll_to_line**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_line>` Scrolls the window's top line to match ``line``. @@ -1636,7 +1847,7 @@ Scrolls the window's top line to match ``line``. .. rst-class:: classref-method -void **scroll_to_paragraph** **(** :ref:`int<class_int>` paragraph **)** +|void| **scroll_to_paragraph**\ (\ paragraph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_paragraph>` Scrolls the window's top line to match first line of the ``paragraph``. @@ -1648,7 +1859,7 @@ Scrolls the window's top line to match first line of the ``paragraph``. .. rst-class:: classref-method -void **scroll_to_selection** **(** **)** +|void| **scroll_to_selection**\ (\ ) :ref:`🔗<class_RichTextLabel_method_scroll_to_selection>` Scrolls to the beginning of the current selection. @@ -1660,7 +1871,7 @@ Scrolls to the beginning of the current selection. .. rst-class:: classref-method -void **select_all** **(** **)** +|void| **select_all**\ (\ ) :ref:`🔗<class_RichTextLabel_method_select_all>` Select all the text. @@ -1674,7 +1885,7 @@ If :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` is ` .. rst-class:: classref-method -void **set_cell_border_color** **(** :ref:`Color<class_Color>` color **)** +|void| **set_cell_border_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_border_color>` Sets color of a table cell border. @@ -1686,7 +1897,7 @@ Sets color of a table cell border. .. rst-class:: classref-method -void **set_cell_padding** **(** :ref:`Rect2<class_Rect2>` padding **)** +|void| **set_cell_padding**\ (\ padding\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_padding>` Sets inner padding of a table cell. @@ -1698,7 +1909,7 @@ Sets inner padding of a table cell. .. rst-class:: classref-method -void **set_cell_row_background_color** **(** :ref:`Color<class_Color>` odd_row_bg, :ref:`Color<class_Color>` even_row_bg **)** +|void| **set_cell_row_background_color**\ (\ odd_row_bg\: :ref:`Color<class_Color>`, even_row_bg\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_row_background_color>` Sets color of a table cell. Separate colors for alternating rows can be specified. @@ -1710,7 +1921,7 @@ Sets color of a table cell. Separate colors for alternating rows can be specifie .. rst-class:: classref-method -void **set_cell_size_override** **(** :ref:`Vector2<class_Vector2>` min_size, :ref:`Vector2<class_Vector2>` max_size **)** +|void| **set_cell_size_override**\ (\ min_size\: :ref:`Vector2<class_Vector2>`, max_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RichTextLabel_method_set_cell_size_override>` Sets minimum and maximum size overrides for a table cell. @@ -1722,7 +1933,7 @@ Sets minimum and maximum size overrides for a table cell. .. rst-class:: classref-method -void **set_table_column_expand** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand, :ref:`int<class_int>` ratio=1 **)** +|void| **set_table_column_expand**\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`, ratio\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_RichTextLabel_method_set_table_column_expand>` Edits the selected column's expansion options. If ``expand`` is ``true``, the column expands in proportion to its expansion ratio versus the other columns' ratios. @@ -1730,6 +1941,18 @@ For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width wou If ``expand`` is ``false``, the column will not contribute to the total ratio. +.. rst-class:: classref-item-separator + +---- + +.. _class_RichTextLabel_method_update_image: + +.. rst-class:: classref-method + +|void| **update_image**\ (\ key\: :ref:`Variant<class_Variant>`, mask\: |bitfield|\[:ref:`ImageUpdateMask<enum_RichTextLabel_ImageUpdateMask>`\], image\: :ref:`Texture2D<class_Texture2D>`, width\: :ref:`int<class_int>` = 0, height\: :ref:`int<class_int>` = 0, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, region\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), pad\: :ref:`bool<class_bool>` = false, tooltip\: :ref:`String<class_String>` = "", size_in_percent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_RichTextLabel_method_update_image>` + +Updates the existing images with the key ``key``. Only properties specified by ``mask`` bits are updated. See :ref:`add_image<class_RichTextLabel_method_add_image>`. + .. rst-class:: classref-section-separator ---- @@ -1743,7 +1966,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_RichTextLabel_theme_color_default_color>` The default text color. @@ -1755,7 +1978,7 @@ The default text color. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_RichTextLabel_theme_color_font_outline_color>` The default tint of text outline. @@ -1767,7 +1990,7 @@ The default tint of text outline. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_font_selected_color>` The color of selected text, used when :ref:`selection_enabled<class_RichTextLabel_property_selection_enabled>` is ``true``. If equal to ``Color(0, 0, 0, 0)``, it will be ignored. @@ -1779,7 +2002,7 @@ The color of selected text, used when :ref:`selection_enabled<class_RichTextLabe .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **font_shadow_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_font_shadow_color>` The color of the font's shadow. @@ -1791,7 +2014,7 @@ The color of the font's shadow. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **selection_color** = ``Color(0.1, 0.1, 1, 0.8)`` +:ref:`Color<class_Color>` **selection_color** = ``Color(0.1, 0.1, 1, 0.8)`` :ref:`🔗<class_RichTextLabel_theme_color_selection_color>` The color of the selection box. @@ -1803,7 +2026,7 @@ The color of the selection box. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **table_border** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **table_border** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_border>` The default cell border color. @@ -1815,7 +2038,7 @@ The default cell border color. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **table_even_row_bg** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **table_even_row_bg** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_even_row_bg>` The default background color for even rows. @@ -1827,7 +2050,7 @@ The default background color for even rows. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **table_odd_row_bg** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **table_odd_row_bg** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_RichTextLabel_theme_color_table_odd_row_bg>` The default background color for odd rows. @@ -1839,7 +2062,7 @@ The default background color for odd rows. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **line_separation** = ``0`` +:ref:`int<class_int>` **line_separation** = ``0`` :ref:`🔗<class_RichTextLabel_theme_constant_line_separation>` The vertical space between lines. @@ -1851,7 +2074,7 @@ The vertical space between lines. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_RichTextLabel_theme_constant_outline_size>` The size of the text outline. @@ -1865,7 +2088,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_offset_x** = ``1`` +:ref:`int<class_int>` **shadow_offset_x** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_offset_x>` The horizontal offset of the font's shadow. @@ -1877,7 +2100,7 @@ The horizontal offset of the font's shadow. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_offset_y** = ``1`` +:ref:`int<class_int>` **shadow_offset_y** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_offset_y>` The vertical offset of the font's shadow. @@ -1889,7 +2112,7 @@ The vertical offset of the font's shadow. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **shadow_outline_size** = ``1`` +:ref:`int<class_int>` **shadow_outline_size** = ``1`` :ref:`🔗<class_RichTextLabel_theme_constant_shadow_outline_size>` The size of the shadow outline. @@ -1901,7 +2124,7 @@ The size of the shadow outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **table_h_separation** = ``3`` +:ref:`int<class_int>` **table_h_separation** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_table_h_separation>` The horizontal separation of elements in a table. @@ -1913,7 +2136,7 @@ The horizontal separation of elements in a table. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **table_v_separation** = ``3`` +:ref:`int<class_int>` **table_v_separation** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_table_v_separation>` The vertical separation of elements in a table. @@ -1925,9 +2148,9 @@ The vertical separation of elements in a table. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **text_highlight_h_padding** = ``3`` +:ref:`int<class_int>` **text_highlight_h_padding** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_text_highlight_h_padding>` -The horizontal padding around a highlighting and background color box. +The horizontal padding around boxes drawn by the ``[fgcolor]`` and ``[bgcolor]`` tags. This does not affect the appearance of text selection. .. rst-class:: classref-item-separator @@ -1937,9 +2160,9 @@ The horizontal padding around a highlighting and background color box. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **text_highlight_v_padding** = ``3`` +:ref:`int<class_int>` **text_highlight_v_padding** = ``3`` :ref:`🔗<class_RichTextLabel_theme_constant_text_highlight_v_padding>` -The vertical padding around a highlighting and background color box. +The vertical padding around boxes drawn by the ``[fgcolor]`` and ``[bgcolor]`` tags. This does not affect the appearance of text selection. .. rst-class:: classref-item-separator @@ -1949,7 +2172,7 @@ The vertical padding around a highlighting and background color box. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **bold_font** +:ref:`Font<class_Font>` **bold_font** :ref:`🔗<class_RichTextLabel_theme_font_bold_font>` The font used for bold text. @@ -1961,7 +2184,7 @@ The font used for bold text. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **bold_italics_font** +:ref:`Font<class_Font>` **bold_italics_font** :ref:`🔗<class_RichTextLabel_theme_font_bold_italics_font>` The font used for bold italics text. @@ -1973,7 +2196,7 @@ The font used for bold italics text. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **italics_font** +:ref:`Font<class_Font>` **italics_font** :ref:`🔗<class_RichTextLabel_theme_font_italics_font>` The font used for italics text. @@ -1985,7 +2208,7 @@ The font used for italics text. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **mono_font** +:ref:`Font<class_Font>` **mono_font** :ref:`🔗<class_RichTextLabel_theme_font_mono_font>` The font used for monospace text. @@ -1997,7 +2220,7 @@ The font used for monospace text. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **normal_font** +:ref:`Font<class_Font>` **normal_font** :ref:`🔗<class_RichTextLabel_theme_font_normal_font>` The default text font. @@ -2009,7 +2232,7 @@ The default text font. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **bold_font_size** +:ref:`int<class_int>` **bold_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_bold_font_size>` The font size used for bold text. @@ -2021,7 +2244,7 @@ The font size used for bold text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **bold_italics_font_size** +:ref:`int<class_int>` **bold_italics_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_bold_italics_font_size>` The font size used for bold italics text. @@ -2033,7 +2256,7 @@ The font size used for bold italics text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **italics_font_size** +:ref:`int<class_int>` **italics_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_italics_font_size>` The font size used for italics text. @@ -2045,7 +2268,7 @@ The font size used for italics text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **mono_font_size** +:ref:`int<class_int>` **mono_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_mono_font_size>` The font size used for monospace text. @@ -2057,7 +2280,7 @@ The font size used for monospace text. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **normal_font_size** +:ref:`int<class_int>` **normal_font_size** :ref:`🔗<class_RichTextLabel_theme_font_size_normal_font_size>` The default text font size. @@ -2069,9 +2292,9 @@ The default text font size. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_RichTextLabel_theme_style_focus>` -The background used when the **RichTextLabel** is focused. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +The background used when the **RichTextLabel** is focused. The :ref:`focus<class_RichTextLabel_theme_style_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. rst-class:: classref-item-separator @@ -2081,7 +2304,7 @@ The background used when the **RichTextLabel** is focused. The ``focus`` :ref:`S .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **normal** +:ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_RichTextLabel_theme_style_normal>` The normal background for the **RichTextLabel**. @@ -2092,3 +2315,4 @@ The normal background for the **RichTextLabel**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rid.rst b/classes/class_rid.rst index 070bc918c97..38c0f0141b0 100644 --- a/classes/class_rid.rst +++ b/classes/class_rid.rst @@ -21,6 +21,8 @@ The RID :ref:`Variant<class_Variant>` type is used to access a low-level resourc A low-level resource may correspond to a high-level :ref:`Resource<class_Resource>`, such as :ref:`Texture<class_Texture>` or :ref:`Mesh<class_Mesh>`. +\ **Note:** RIDs are only useful during the current session. It won't correspond to a similar resource if sent over a network, or loaded from a file at a later time. + .. note:: There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. @@ -33,11 +35,11 @@ Constructors .. table:: :widths: auto - +-----------------------+------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** **)** | - +-----------------------+------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>` **(** :ref:`RID<class_RID>` from **)** | - +-----------------------+------------------------------------------------------------------------------+ + +-----------------------+---------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>`\ (\ ) | + +-----------------------+---------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`RID<class_RID_constructor_RID>`\ (\ from\: :ref:`RID<class_RID>`\ ) | + +-----------------------+---------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -47,11 +49,11 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid<class_RID_method_is_valid>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_id<class_RID_method_get_id>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid<class_RID_method_is_valid>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -61,19 +63,19 @@ Operators .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_RID_operator_neq_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_RID_operator_lt_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_RID_operator_lte_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_RID_operator_eq_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_RID_operator_gt_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_RID_operator_gte_RID>` **(** :ref:`RID<class_RID>` right **)** | - +-------------------------+-----------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_RID_operator_neq_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_RID_operator_lt_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_RID_operator_lte_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_RID_operator_eq_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_RID_operator_gt_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_RID_operator_gte_RID>`\ (\ right\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,7 +90,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`RID<class_RID>` **RID** **(** **)** +:ref:`RID<class_RID>` **RID**\ (\ ) :ref:`🔗<class_RID_constructor_RID>` Constructs an empty **RID** with the invalid ID ``0``. @@ -98,7 +100,7 @@ Constructs an empty **RID** with the invalid ID ``0``. .. rst-class:: classref-constructor -:ref:`RID<class_RID>` **RID** **(** :ref:`RID<class_RID>` from **)** +:ref:`RID<class_RID>` **RID**\ (\ from\: :ref:`RID<class_RID>`\ ) Constructs a **RID** as a copy of the given **RID**. @@ -115,7 +117,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_id** **(** **)** |const| +:ref:`int<class_int>` **get_id**\ (\ ) |const| :ref:`🔗<class_RID_method_get_id>` Returns the ID of the referenced low-level resource. @@ -127,7 +129,7 @@ Returns the ID of the referenced low-level resource. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid**\ (\ ) |const| :ref:`🔗<class_RID_method_is_valid>` Returns ``true`` if the **RID** is not ``0``. @@ -144,7 +146,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_neq_RID>` Returns ``true`` if the **RID**\ s are not equal. @@ -156,7 +158,7 @@ Returns ``true`` if the **RID**\ s are not equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_lt_RID>` Returns ``true`` if the **RID**'s ID is less than ``right``'s ID. @@ -168,7 +170,7 @@ Returns ``true`` if the **RID**'s ID is less than ``right``'s ID. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_lte_RID>` Returns ``true`` if the **RID**'s ID is less than or equal to ``right``'s ID. @@ -180,7 +182,7 @@ Returns ``true`` if the **RID**'s ID is less than or equal to ``right``'s ID. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_eq_RID>` Returns ``true`` if both **RID**\ s are equal, which means they both refer to the same low-level resource. @@ -192,7 +194,7 @@ Returns ``true`` if both **RID**\ s are equal, which means they both refer to th .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_gt_RID>` Returns ``true`` if the **RID**'s ID is greater than ``right``'s ID. @@ -204,7 +206,7 @@ Returns ``true`` if the **RID**'s ID is greater than ``right``'s ID. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`RID<class_RID>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_RID_operator_gte_RID>` Returns ``true`` if the **RID**'s ID is greater than or equal to ``right``'s ID. @@ -215,3 +217,4 @@ Returns ``true`` if the **RID**'s ID is greater than or equal to ``right``'s ID. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rigidbody2d.rst b/classes/class_rigidbody2d.rst index fd040d4b40f..a91d5910b12 100644 --- a/classes/class_rigidbody2d.rst +++ b/classes/class_rigidbody2d.rst @@ -29,16 +29,16 @@ A rigid body will always maintain its shape and size, even when forces are appli If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator<class_RigidBody2D_property_custom_integrator>`. -\ **Note:** Changing the 2D transform or :ref:`linear_velocity<class_RigidBody2D_property_linear_velocity>` of a **RigidBody2D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces<class_RigidBody2D_method__integrate_forces>` as it allows you to directly access the physics state. +\ **Note:** Changing the 2D transform or :ref:`linear_velocity<class_RigidBody2D_property_linear_velocity>` of a **RigidBody2D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces<class_RigidBody2D_private_method__integrate_forces>` as it allows you to directly access the physics state. .. rst-class:: classref-introduction-group Tutorials --------- -- `2D Physics Platformer Demo <https://godotengine.org/asset-library/asset/119>`__ +- `2D Physics Platformer Demo <https://godotengine.org/asset-library/asset/2725>`__ -- `Instancing Demo <https://godotengine.org/asset-library/asset/148>`__ +- `Instancing Demo <https://godotengine.org/asset-library/asset/2716>`__ .. rst-class:: classref-reftable-group @@ -104,33 +104,33 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces<class_RigidBody2D_method__integrate_forces>` **(** :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` state **)** |virtual| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_central_force<class_RigidBody2D_method_add_constant_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_force<class_RigidBody2D_method_add_constant_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_torque<class_RigidBody2D_method_add_constant_torque>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_force<class_RigidBody2D_method_apply_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse<class_RigidBody2D_method_apply_central_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse=Vector2(0, 0) **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_force<class_RigidBody2D_method_apply_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse<class_RigidBody2D_method_apply_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque<class_RigidBody2D_method_apply_torque>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque_impulse<class_RigidBody2D_method_apply_torque_impulse>` **(** :ref:`float<class_float>` torque **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node2D[]<class_Node2D>` | :ref:`get_colliding_bodies<class_RigidBody2D_method_get_colliding_bodies>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody2D_method_get_contact_count>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_axis_velocity<class_RigidBody2D_method_set_axis_velocity>` **(** :ref:`Vector2<class_Vector2>` axis_velocity **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_integrate_forces<class_RigidBody2D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>`\ ) |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_central_force<class_RigidBody2D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_force<class_RigidBody2D_method_add_constant_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_torque<class_RigidBody2D_method_add_constant_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_force<class_RigidBody2D_method_apply_central_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_impulse<class_RigidBody2D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_force<class_RigidBody2D_method_apply_force>`\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_impulse<class_RigidBody2D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque<class_RigidBody2D_method_apply_torque>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque_impulse<class_RigidBody2D_method_apply_torque_impulse>`\ (\ torque\: :ref:`float<class_float>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node2D<class_Node2D>`\] | :ref:`get_colliding_bodies<class_RigidBody2D_method_get_colliding_bodies>`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody2D_method_get_contact_count>`\ (\ ) |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_velocity<class_RigidBody2D_method_set_axis_velocity>`\ (\ axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -145,7 +145,7 @@ Signals .. rst-class:: classref-signal -**body_entered** **(** :ref:`Node<class_Node>` body **)** +**body_entered**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_RigidBody2D_signal_body_entered>` Emitted when a collision with another :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` occurs. Requires :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody2D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s. @@ -159,7 +159,7 @@ Emitted when a collision with another :ref:`PhysicsBody2D<class_PhysicsBody2D>` .. rst-class:: classref-signal -**body_exited** **(** :ref:`Node<class_Node>` body **)** +**body_exited**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_RigidBody2D_signal_body_exited>` Emitted when the collision with another :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>` ends. Requires :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody2D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s. @@ -173,7 +173,7 @@ Emitted when the collision with another :ref:`PhysicsBody2D<class_PhysicsBody2D> .. rst-class:: classref-signal -**body_shape_entered** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)** +**body_shape_entered**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RigidBody2D_signal_body_shape_entered>` Emitted when one of this RigidBody2D's :ref:`Shape2D<class_Shape2D>`\ s collides with another :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`'s :ref:`Shape2D<class_Shape2D>`\ s. Requires :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody2D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s. @@ -193,7 +193,7 @@ Emitted when one of this RigidBody2D's :ref:`Shape2D<class_Shape2D>`\ s collides .. rst-class:: classref-signal -**body_shape_exited** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)** +**body_shape_exited**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RigidBody2D_signal_body_shape_exited>` Emitted when the collision between one of this RigidBody2D's :ref:`Shape2D<class_Shape2D>`\ s and another :ref:`PhysicsBody2D<class_PhysicsBody2D>` or :ref:`TileMap<class_TileMap>`'s :ref:`Shape2D<class_Shape2D>`\ s ends. Requires :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody2D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`TileMap<class_TileMap>`\ s are detected if the :ref:`TileSet<class_TileSet>` has Collision :ref:`Shape2D<class_Shape2D>`\ s. @@ -213,7 +213,7 @@ Emitted when the collision between one of this RigidBody2D's :ref:`Shape2D<class .. rst-class:: classref-signal -**sleeping_state_changed** **(** **)** +**sleeping_state_changed**\ (\ ) :ref:`🔗<class_RigidBody2D_signal_sleeping_state_changed>` Emitted when the physics engine changes the body's sleeping state. @@ -232,7 +232,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FreezeMode**: +enum **FreezeMode**: :ref:`🔗<enum_RigidBody2D_FreezeMode>` .. _class_RigidBody2D_constant_FREEZE_MODE_STATIC: @@ -258,7 +258,7 @@ Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC<class_RigidBody2 .. rst-class:: classref-enumeration -enum **CenterOfMassMode**: +enum **CenterOfMassMode**: :ref:`🔗<enum_RigidBody2D_CenterOfMassMode>` .. _class_RigidBody2D_constant_CENTER_OF_MASS_MODE_AUTO: @@ -284,7 +284,7 @@ In this mode, the body's center of mass is set through :ref:`center_of_mass<clas .. rst-class:: classref-enumeration -enum **DampMode**: +enum **DampMode**: :ref:`🔗<enum_RigidBody2D_DampMode>` .. _class_RigidBody2D_constant_DAMP_MODE_COMBINE: @@ -310,7 +310,7 @@ In this mode, the body's damping value replaces any value set in areas or the de .. rst-class:: classref-enumeration -enum **CCDMode**: +enum **CCDMode**: :ref:`🔗<enum_RigidBody2D_CCDMode>` .. _class_RigidBody2D_constant_CCD_MODE_DISABLED: @@ -349,12 +349,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_damp** = ``0.0`` +:ref:`float<class_float>` **angular_damp** = ``0.0`` :ref:`🔗<class_RigidBody2D_property_angular_damp>` .. rst-class:: classref-property-setget -- void **set_angular_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_angular_damp** **(** **)** +- |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_damp**\ (\ ) Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D<class_Area2D>` the body is in. Depending on :ref:`angular_damp_mode<class_RigidBody2D_property_angular_damp_mode>`, you can set :ref:`angular_damp<class_RigidBody2D_property_angular_damp>` to be added to or to replace the body's damping value. @@ -368,12 +368,12 @@ See :ref:`ProjectSettings.physics/2d/default_angular_damp<class_ProjectSettings_ .. rst-class:: classref-property -:ref:`DampMode<enum_RigidBody2D_DampMode>` **angular_damp_mode** = ``0`` +:ref:`DampMode<enum_RigidBody2D_DampMode>` **angular_damp_mode** = ``0`` :ref:`🔗<class_RigidBody2D_property_angular_damp_mode>` .. rst-class:: classref-property-setget -- void **set_angular_damp_mode** **(** :ref:`DampMode<enum_RigidBody2D_DampMode>` value **)** -- :ref:`DampMode<enum_RigidBody2D_DampMode>` **get_angular_damp_mode** **(** **)** +- |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody2D_DampMode>`\ ) +- :ref:`DampMode<enum_RigidBody2D_DampMode>` **get_angular_damp_mode**\ (\ ) Defines how :ref:`angular_damp<class_RigidBody2D_property_angular_damp>` is applied. See :ref:`DampMode<enum_RigidBody2D_DampMode>` for possible values. @@ -385,12 +385,12 @@ Defines how :ref:`angular_damp<class_RigidBody2D_property_angular_damp>` is appl .. rst-class:: classref-property -:ref:`float<class_float>` **angular_velocity** = ``0.0`` +:ref:`float<class_float>` **angular_velocity** = ``0.0`` :ref:`🔗<class_RigidBody2D_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_velocity**\ (\ ) The body's rotational velocity in *radians* per second. @@ -402,12 +402,12 @@ The body's rotational velocity in *radians* per second. .. rst-class:: classref-property -:ref:`bool<class_bool>` **can_sleep** = ``true`` +:ref:`bool<class_bool>` **can_sleep** = ``true`` :ref:`🔗<class_RigidBody2D_property_can_sleep>` .. rst-class:: classref-property-setget -- void **set_can_sleep** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_able_to_sleep** **(** **)** +- |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ ) If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping<class_RigidBody2D_property_sleeping>`. @@ -419,12 +419,12 @@ If ``true``, the body can enter sleep mode when there is no movement. See :ref:` .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **center_of_mass** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **center_of_mass** = ``Vector2(0, 0)`` :ref:`🔗<class_RigidBody2D_property_center_of_mass>` .. rst-class:: classref-property-setget -- void **set_center_of_mass** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_center_of_mass** **(** **)** +- |void| **set_center_of_mass**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_center_of_mass**\ (\ ) The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode<class_RigidBody2D_property_center_of_mass_mode>` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM<class_RigidBody2D_constant_CENTER_OF_MASS_MODE_CUSTOM>`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. @@ -438,12 +438,12 @@ When :ref:`center_of_mass_mode<class_RigidBody2D_property_center_of_mass_mode>` .. rst-class:: classref-property -:ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` **center_of_mass_mode** = ``0`` +:ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` **center_of_mass_mode** = ``0`` :ref:`🔗<class_RigidBody2D_property_center_of_mass_mode>` .. rst-class:: classref-property-setget -- void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` value **)** -- :ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` **get_center_of_mass_mode** **(** **)** +- |void| **set_center_of_mass_mode**\ (\ value\: :ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>`\ ) +- :ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` **get_center_of_mass_mode**\ (\ ) Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enum_RigidBody2D_CenterOfMassMode>` for possible values. @@ -455,12 +455,12 @@ Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enu .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **constant_force** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **constant_force** = ``Vector2(0, 0)`` :ref:`🔗<class_RigidBody2D_property_constant_force>` .. rst-class:: classref-property-setget -- void **set_constant_force** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_constant_force** **(** **)** +- |void| **set_constant_force**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_constant_force**\ (\ ) The body's total constant positional forces applied during each physics update. @@ -474,12 +474,12 @@ See :ref:`add_constant_force<class_RigidBody2D_method_add_constant_force>` and : .. rst-class:: classref-property -:ref:`float<class_float>` **constant_torque** = ``0.0`` +:ref:`float<class_float>` **constant_torque** = ``0.0`` :ref:`🔗<class_RigidBody2D_property_constant_torque>` .. rst-class:: classref-property-setget -- void **set_constant_torque** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_constant_torque** **(** **)** +- |void| **set_constant_torque**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_constant_torque**\ (\ ) The body's total constant rotational forces applied during each physics update. @@ -493,12 +493,12 @@ See :ref:`add_constant_torque<class_RigidBody2D_method_add_constant_torque>`. .. rst-class:: classref-property -:ref:`bool<class_bool>` **contact_monitor** = ``false`` +:ref:`bool<class_bool>` **contact_monitor** = ``false`` :ref:`🔗<class_RigidBody2D_property_contact_monitor>` .. rst-class:: classref-property-setget -- void **set_contact_monitor** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_contact_monitor_enabled** **(** **)** +- |void| **set_contact_monitor**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_contact_monitor_enabled**\ (\ ) If ``true``, the RigidBody2D will emit signals when it collides with another body. @@ -512,12 +512,12 @@ If ``true``, the RigidBody2D will emit signals when it collides with another bod .. rst-class:: classref-property -:ref:`CCDMode<enum_RigidBody2D_CCDMode>` **continuous_cd** = ``0`` +:ref:`CCDMode<enum_RigidBody2D_CCDMode>` **continuous_cd** = ``0`` :ref:`🔗<class_RigidBody2D_property_continuous_cd>` .. rst-class:: classref-property-setget -- void **set_continuous_collision_detection_mode** **(** :ref:`CCDMode<enum_RigidBody2D_CCDMode>` value **)** -- :ref:`CCDMode<enum_RigidBody2D_CCDMode>` **get_continuous_collision_detection_mode** **(** **)** +- |void| **set_continuous_collision_detection_mode**\ (\ value\: :ref:`CCDMode<enum_RigidBody2D_CCDMode>`\ ) +- :ref:`CCDMode<enum_RigidBody2D_CCDMode>` **get_continuous_collision_detection_mode**\ (\ ) Continuous collision detection mode. @@ -531,14 +531,16 @@ Continuous collision detection tries to predict where a moving body will collide .. rst-class:: classref-property -:ref:`bool<class_bool>` **custom_integrator** = ``false`` +:ref:`bool<class_bool>` **custom_integrator** = ``false`` :ref:`🔗<class_RigidBody2D_property_custom_integrator>` .. rst-class:: classref-property-setget -- void **set_use_custom_integrator** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_custom_integrator** **(** **)** +- |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ ) -If ``true``, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the :ref:`_integrate_forces<class_RigidBody2D_method__integrate_forces>` function. +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_RigidBody2D_private_method__integrate_forces>` method, if that virtual method is overridden. + +Setting this property will call the method :ref:`PhysicsServer2D.body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>` internally. .. rst-class:: classref-item-separator @@ -548,12 +550,12 @@ If ``true``, internal force integration is disabled for this body. Aside from co .. rst-class:: classref-property -:ref:`bool<class_bool>` **freeze** = ``false`` +:ref:`bool<class_bool>` **freeze** = ``false`` :ref:`🔗<class_RigidBody2D_property_freeze>` .. rst-class:: classref-property-setget -- void **set_freeze_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_freeze_enabled** **(** **)** +- |void| **set_freeze_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_freeze_enabled**\ (\ ) If ``true``, the body is frozen. Gravity and forces are not applied anymore. @@ -569,12 +571,12 @@ For a body that is always frozen, use :ref:`StaticBody2D<class_StaticBody2D>` or .. rst-class:: classref-property -:ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` **freeze_mode** = ``0`` +:ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` **freeze_mode** = ``0`` :ref:`🔗<class_RigidBody2D_property_freeze_mode>` .. rst-class:: classref-property-setget -- void **set_freeze_mode** **(** :ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` value **)** -- :ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` **get_freeze_mode** **(** **)** +- |void| **set_freeze_mode**\ (\ value\: :ref:`FreezeMode<enum_RigidBody2D_FreezeMode>`\ ) +- :ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` **get_freeze_mode**\ (\ ) The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze<class_RigidBody2D_property_freeze>` is enabled. See :ref:`FreezeMode<enum_RigidBody2D_FreezeMode>` for possible values. @@ -588,12 +590,12 @@ For a body that is always frozen, use :ref:`StaticBody2D<class_StaticBody2D>` or .. rst-class:: classref-property -:ref:`float<class_float>` **gravity_scale** = ``1.0`` +:ref:`float<class_float>` **gravity_scale** = ``1.0`` :ref:`🔗<class_RigidBody2D_property_gravity_scale>` .. rst-class:: classref-property-setget -- void **set_gravity_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gravity_scale** **(** **)** +- |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gravity_scale**\ (\ ) Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by :ref:`Area2D<class_Area2D>`\ s. @@ -605,12 +607,12 @@ Multiplies the gravity applied to the body. The body's gravity is calculated fro .. rst-class:: classref-property -:ref:`float<class_float>` **inertia** = ``0.0`` +:ref:`float<class_float>` **inertia** = ``0.0`` :ref:`🔗<class_RigidBody2D_property_inertia>` .. rst-class:: classref-property-setget -- void **set_inertia** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_inertia** **(** **)** +- |void| **set_inertia**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_inertia**\ (\ ) The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. @@ -652,12 +654,12 @@ If set to ``0``, inertia is automatically computed (default value). .. rst-class:: classref-property -:ref:`float<class_float>` **linear_damp** = ``0.0`` +:ref:`float<class_float>` **linear_damp** = ``0.0`` :ref:`🔗<class_RigidBody2D_property_linear_damp>` .. rst-class:: classref-property-setget -- void **set_linear_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_linear_damp** **(** **)** +- |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_linear_damp**\ (\ ) Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an :ref:`Area2D<class_Area2D>` the body is in. Depending on :ref:`linear_damp_mode<class_RigidBody2D_property_linear_damp_mode>`, you can set :ref:`linear_damp<class_RigidBody2D_property_linear_damp>` to be added to or to replace the body's damping value. @@ -671,12 +673,12 @@ See :ref:`ProjectSettings.physics/2d/default_linear_damp<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`DampMode<enum_RigidBody2D_DampMode>` **linear_damp_mode** = ``0`` +:ref:`DampMode<enum_RigidBody2D_DampMode>` **linear_damp_mode** = ``0`` :ref:`🔗<class_RigidBody2D_property_linear_damp_mode>` .. rst-class:: classref-property-setget -- void **set_linear_damp_mode** **(** :ref:`DampMode<enum_RigidBody2D_DampMode>` value **)** -- :ref:`DampMode<enum_RigidBody2D_DampMode>` **get_linear_damp_mode** **(** **)** +- |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody2D_DampMode>`\ ) +- :ref:`DampMode<enum_RigidBody2D_DampMode>` **get_linear_damp_mode**\ (\ ) Defines how :ref:`linear_damp<class_RigidBody2D_property_linear_damp>` is applied. See :ref:`DampMode<enum_RigidBody2D_DampMode>` for possible values. @@ -688,14 +690,14 @@ Defines how :ref:`linear_damp<class_RigidBody2D_property_linear_damp>` is applie .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **linear_velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **linear_velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_RigidBody2D_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_linear_velocity**\ (\ ) -The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_RigidBody2D_method__integrate_forces>` as your process loop for precise control of the body state. +The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_RigidBody2D_private_method__integrate_forces>` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -705,12 +707,12 @@ The body's linear velocity in pixels per second. Can be used sporadically, but * .. rst-class:: classref-property -:ref:`bool<class_bool>` **lock_rotation** = ``false`` +:ref:`bool<class_bool>` **lock_rotation** = ``false`` :ref:`🔗<class_RigidBody2D_property_lock_rotation>` .. rst-class:: classref-property-setget -- void **set_lock_rotation_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_lock_rotation_enabled** **(** **)** +- |void| **set_lock_rotation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_lock_rotation_enabled**\ (\ ) If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. @@ -722,12 +724,12 @@ If ``true``, the body cannot rotate. Gravity and forces only apply linear moveme .. rst-class:: classref-property -:ref:`float<class_float>` **mass** = ``1.0`` +:ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_RigidBody2D_property_mass>` .. rst-class:: classref-property-setget -- void **set_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mass** **(** **)** +- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mass**\ (\ ) The body's mass. @@ -739,12 +741,12 @@ The body's mass. .. rst-class:: classref-property -:ref:`int<class_int>` **max_contacts_reported** = ``0`` +:ref:`int<class_int>` **max_contacts_reported** = ``0`` :ref:`🔗<class_RigidBody2D_property_max_contacts_reported>` .. rst-class:: classref-property-setget -- void **set_max_contacts_reported** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_contacts_reported** **(** **)** +- |void| **set_max_contacts_reported**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_contacts_reported**\ (\ ) The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count<class_RigidBody2D_method_get_contact_count>` to retrieve the count or :ref:`get_colliding_bodies<class_RigidBody2D_method_get_colliding_bodies>` to retrieve bodies that have been collided with. @@ -758,12 +760,12 @@ The maximum number of contacts that will be recorded. Requires a value greater t .. rst-class:: classref-property -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** :ref:`🔗<class_RigidBody2D_property_physics_material_override>` .. rst-class:: classref-property-setget -- void **set_physics_material_override** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)** -- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override** **(** **)** +- |void| **set_physics_material_override**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) +- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override**\ (\ ) The physics material override for the body. @@ -777,12 +779,12 @@ If a material is assigned to this property, it will be used instead of any other .. rst-class:: classref-property -:ref:`bool<class_bool>` **sleeping** = ``false`` +:ref:`bool<class_bool>` **sleeping** = ``false`` :ref:`🔗<class_RigidBody2D_property_sleeping>` .. rst-class:: classref-property-setget -- void **set_sleeping** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sleeping** **(** **)** +- |void| **set_sleeping**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sleeping**\ (\ ) If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse<class_RigidBody2D_method_apply_impulse>` or :ref:`apply_force<class_RigidBody2D_method_apply_force>` methods. @@ -795,13 +797,13 @@ If ``true``, the body will not move and will not calculate forces until woken up Method Descriptions ------------------- -.. _class_RigidBody2D_method__integrate_forces: +.. _class_RigidBody2D_private_method__integrate_forces: .. rst-class:: classref-method -void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` state **)** |virtual| +|void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>`\ ) |virtual| :ref:`🔗<class_RigidBody2D_private_method__integrate_forces>` -Allows you to read and safely modify the simulation state for the object. Use this instead of :ref:`Node._physics_process<class_Node_method__physics_process>` if you need to directly change the body's ``position`` or other physics properties. By default, it works in addition to the usual physics behavior, but :ref:`custom_integrator<class_RigidBody2D_property_custom_integrator>` allows you to disable the default behavior and write 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 is called before the standard force integration, but the :ref:`custom_integrator<class_RigidBody2D_property_custom_integrator>` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator @@ -811,7 +813,7 @@ Allows you to read and safely modify the simulation state for the object. Use th .. rst-class:: classref-method -void **add_constant_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** +|void| **add_constant_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RigidBody2D_method_add_constant_central_force>` Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. @@ -825,7 +827,7 @@ This is equivalent to using :ref:`add_constant_force<class_RigidBody2D_method_ad .. rst-class:: classref-method -void **add_constant_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **add_constant_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_RigidBody2D_method_add_constant_force>` Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector2(0, 0)``. @@ -839,7 +841,7 @@ Adds a constant positioned force to the body that keeps being applied over time .. rst-class:: classref-method -void **add_constant_torque** **(** :ref:`float<class_float>` torque **)** +|void| **add_constant_torque**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RigidBody2D_method_add_constant_torque>` Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = 0``. @@ -851,7 +853,7 @@ Adds a constant rotational force without affecting position that keeps being app .. rst-class:: classref-method -void **apply_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** +|void| **apply_central_force**\ (\ force\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RigidBody2D_method_apply_central_force>` Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. @@ -865,7 +867,7 @@ This is equivalent to using :ref:`apply_force<class_RigidBody2D_method_apply_for .. rst-class:: classref-method -void **apply_central_impulse** **(** :ref:`Vector2<class_Vector2>` impulse=Vector2(0, 0) **)** +|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_RigidBody2D_method_apply_central_impulse>` Applies a directional impulse without affecting rotation. @@ -881,7 +883,7 @@ This is equivalent to using :ref:`apply_impulse<class_RigidBody2D_method_apply_i .. rst-class:: classref-method -void **apply_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **apply_force**\ (\ force\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_RigidBody2D_method_apply_force>` Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. @@ -895,7 +897,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b .. rst-class:: classref-method -void **apply_impulse** **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** +|void| **apply_impulse**\ (\ impulse\: :ref:`Vector2<class_Vector2>`, position\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) :ref:`🔗<class_RigidBody2D_method_apply_impulse>` Applies a positioned impulse to the body. @@ -911,7 +913,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **apply_torque** **(** :ref:`float<class_float>` torque **)** +|void| **apply_torque**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RigidBody2D_method_apply_torque>` Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. @@ -925,7 +927,7 @@ Applies a rotational force without affecting position. A force is time dependent .. rst-class:: classref-method -void **apply_torque_impulse** **(** :ref:`float<class_float>` torque **)** +|void| **apply_torque_impulse**\ (\ torque\: :ref:`float<class_float>`\ ) :ref:`🔗<class_RigidBody2D_method_apply_torque_impulse>` Applies a rotational impulse to the body without affecting the position. @@ -941,7 +943,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -:ref:`Node2D[]<class_Node2D>` **get_colliding_bodies** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Node2D<class_Node2D>`\] **get_colliding_bodies**\ (\ ) |const| :ref:`🔗<class_RigidBody2D_method_get_colliding_bodies>` Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody2D_property_max_contacts_reported>` to be set high enough to detect all the collisions. @@ -955,7 +957,7 @@ Returns a list of the bodies colliding with this one. Requires :ref:`contact_mon .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_count** **(** **)** |const| +:ref:`int<class_int>` **get_contact_count**\ (\ ) |const| :ref:`🔗<class_RigidBody2D_method_get_contact_count>` Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor<class_RigidBody2D_property_contact_monitor>`). @@ -969,7 +971,7 @@ Returns the number of contacts this body has with other bodies. By default, this .. rst-class:: classref-method -void **set_axis_velocity** **(** :ref:`Vector2<class_Vector2>` axis_velocity **)** +|void| **set_axis_velocity**\ (\ axis_velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_RigidBody2D_method_set_axis_velocity>` Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. @@ -980,3 +982,4 @@ Sets the body's velocity on the given axis. The velocity in the given vector axi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rigidbody3d.rst b/classes/class_rigidbody3d.rst index 74dccf6d74a..0c03ed9ba42 100644 --- a/classes/class_rigidbody3d.rst +++ b/classes/class_rigidbody3d.rst @@ -29,7 +29,7 @@ A rigid body will always maintain its shape and size, even when forces are appli If you need to override the default physics behavior, you can write a custom force integration function. See :ref:`custom_integrator<class_RigidBody3D_property_custom_integrator>`. -\ **Note:** Changing the 3D transform or :ref:`linear_velocity<class_RigidBody3D_property_linear_velocity>` of a **RigidBody3D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces<class_RigidBody3D_method__integrate_forces>` as it allows you to directly access the physics state. +\ **Note:** Changing the 3D transform or :ref:`linear_velocity<class_RigidBody3D_property_linear_velocity>` of a **RigidBody3D** very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` as it allows you to directly access the physics state. .. rst-class:: classref-introduction-group @@ -38,9 +38,9 @@ Tutorials - :doc:`Physics introduction <../tutorials/physics/physics_introduction>` -- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/524>`__ +- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/2752>`__ -- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/675>`__ +- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/2747>`__ .. rst-class:: classref-reftable-group @@ -106,35 +106,35 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces<class_RigidBody3D_method__integrate_forces>` **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_central_force<class_RigidBody3D_method_add_constant_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_force<class_RigidBody3D_method_apply_central_force>` **(** :ref:`Vector3<class_Vector3>` force **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse<class_RigidBody3D_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_force<class_RigidBody3D_method_apply_force>` **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque<class_RigidBody3D_method_apply_torque>` **(** :ref:`Vector3<class_Vector3>` torque **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_torque_impulse<class_RigidBody3D_method_apply_torque_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D[]<class_Node3D>` | :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`get_inverse_inertia_tensor<class_RigidBody3D_method_get_inverse_inertia_tensor>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_axis_velocity<class_RigidBody3D_method_set_axis_velocity>` **(** :ref:`Vector3<class_Vector3>` axis_velocity **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>`\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_central_force<class_RigidBody3D_method_add_constant_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_force<class_RigidBody3D_method_apply_central_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_central_impulse<class_RigidBody3D_method_apply_central_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_force<class_RigidBody3D_method_apply_force>`\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque<class_RigidBody3D_method_apply_torque>`\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_torque_impulse<class_RigidBody3D_method_apply_torque_impulse>`\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node3D<class_Node3D>`\] | :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>`\ (\ ) |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>`\ (\ ) |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`get_inverse_inertia_tensor<class_RigidBody3D_method_get_inverse_inertia_tensor>`\ (\ ) |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_velocity<class_RigidBody3D_method_set_axis_velocity>`\ (\ axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -149,7 +149,7 @@ Signals .. rst-class:: classref-signal -**body_entered** **(** :ref:`Node<class_Node>` body **)** +**body_entered**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_RigidBody3D_signal_body_entered>` Emitted when a collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>` occurs. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s. @@ -163,7 +163,7 @@ Emitted when a collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` .. rst-class:: classref-signal -**body_exited** **(** :ref:`Node<class_Node>` body **)** +**body_exited**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_RigidBody3D_signal_body_exited>` Emitted when the collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>` ends. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s. @@ -177,7 +177,7 @@ Emitted when the collision with another :ref:`PhysicsBody3D<class_PhysicsBody3D> .. rst-class:: classref-signal -**body_shape_entered** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)** +**body_shape_entered**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RigidBody3D_signal_body_shape_entered>` Emitted when one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s collides with another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>`'s :ref:`Shape3D<class_Shape3D>`\ s. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s. @@ -197,7 +197,7 @@ Emitted when one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s collides .. rst-class:: classref-signal -**body_shape_exited** **(** :ref:`RID<class_RID>` body_rid, :ref:`Node<class_Node>` body, :ref:`int<class_int>` body_shape_index, :ref:`int<class_int>` local_shape_index **)** +**body_shape_exited**\ (\ body_rid\: :ref:`RID<class_RID>`, body\: :ref:`Node<class_Node>`, body_shape_index\: :ref:`int<class_int>`, local_shape_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_RigidBody3D_signal_body_shape_exited>` Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D<class_Shape3D>`\ s and another :ref:`PhysicsBody3D<class_PhysicsBody3D>` or :ref:`GridMap<class_GridMap>`'s :ref:`Shape3D<class_Shape3D>`\ s ends. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. :ref:`GridMap<class_GridMap>`\ s are detected if the :ref:`MeshLibrary<class_MeshLibrary>` has Collision :ref:`Shape3D<class_Shape3D>`\ s. @@ -217,7 +217,7 @@ Emitted when the collision between one of this RigidBody3D's :ref:`Shape3D<class .. rst-class:: classref-signal -**sleeping_state_changed** **(** **)** +**sleeping_state_changed**\ (\ ) :ref:`🔗<class_RigidBody3D_signal_sleeping_state_changed>` Emitted when the physics engine changes the body's sleeping state. @@ -236,7 +236,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FreezeMode**: +enum **FreezeMode**: :ref:`🔗<enum_RigidBody3D_FreezeMode>` .. _class_RigidBody3D_constant_FREEZE_MODE_STATIC: @@ -262,7 +262,7 @@ Kinematic body freeze mode. Similar to :ref:`FREEZE_MODE_STATIC<class_RigidBody3 .. rst-class:: classref-enumeration -enum **CenterOfMassMode**: +enum **CenterOfMassMode**: :ref:`🔗<enum_RigidBody3D_CenterOfMassMode>` .. _class_RigidBody3D_constant_CENTER_OF_MASS_MODE_AUTO: @@ -288,7 +288,7 @@ In this mode, the body's center of mass is set through :ref:`center_of_mass<clas .. rst-class:: classref-enumeration -enum **DampMode**: +enum **DampMode**: :ref:`🔗<enum_RigidBody3D_DampMode>` .. _class_RigidBody3D_constant_DAMP_MODE_COMBINE: @@ -319,12 +319,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_damp** = ``0.0`` +:ref:`float<class_float>` **angular_damp** = ``0.0`` :ref:`🔗<class_RigidBody3D_property_angular_damp>` .. rst-class:: classref-property-setget -- void **set_angular_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_angular_damp** **(** **)** +- |void| **set_angular_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_angular_damp**\ (\ ) Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`angular_damp_mode<class_RigidBody3D_property_angular_damp_mode>`, you can set :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` to be added to or to replace the body's damping value. @@ -338,12 +338,12 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp<class_ProjectSettings_ .. rst-class:: classref-property -:ref:`DampMode<enum_RigidBody3D_DampMode>` **angular_damp_mode** = ``0`` +:ref:`DampMode<enum_RigidBody3D_DampMode>` **angular_damp_mode** = ``0`` :ref:`🔗<class_RigidBody3D_property_angular_damp_mode>` .. rst-class:: classref-property-setget -- void **set_angular_damp_mode** **(** :ref:`DampMode<enum_RigidBody3D_DampMode>` value **)** -- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_angular_damp_mode** **(** **)** +- |void| **set_angular_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody3D_DampMode>`\ ) +- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_angular_damp_mode**\ (\ ) Defines how :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` is applied. See :ref:`DampMode<enum_RigidBody3D_DampMode>` for possible values. @@ -355,12 +355,12 @@ Defines how :ref:`angular_damp<class_RigidBody3D_property_angular_damp>` is appl .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_angular_velocity**\ (\ ) The RigidBody3D's rotational velocity in *radians* per second. @@ -372,12 +372,12 @@ The RigidBody3D's rotational velocity in *radians* per second. .. rst-class:: classref-property -:ref:`bool<class_bool>` **can_sleep** = ``true`` +:ref:`bool<class_bool>` **can_sleep** = ``true`` :ref:`🔗<class_RigidBody3D_property_can_sleep>` .. rst-class:: classref-property-setget -- void **set_can_sleep** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_able_to_sleep** **(** **)** +- |void| **set_can_sleep**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_able_to_sleep**\ (\ ) If ``true``, the body can enter sleep mode when there is no movement. See :ref:`sleeping<class_RigidBody3D_property_sleeping>`. @@ -389,12 +389,12 @@ If ``true``, the body can enter sleep mode when there is no movement. See :ref:` .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **center_of_mass** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **center_of_mass** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_center_of_mass>` .. rst-class:: classref-property-setget -- void **set_center_of_mass** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_center_of_mass** **(** **)** +- |void| **set_center_of_mass**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_center_of_mass**\ (\ ) The body's custom center of mass, relative to the body's origin position, when :ref:`center_of_mass_mode<class_RigidBody3D_property_center_of_mass_mode>` is set to :ref:`CENTER_OF_MASS_MODE_CUSTOM<class_RigidBody3D_constant_CENTER_OF_MASS_MODE_CUSTOM>`. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. @@ -408,12 +408,12 @@ When :ref:`center_of_mass_mode<class_RigidBody3D_property_center_of_mass_mode>` .. rst-class:: classref-property -:ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **center_of_mass_mode** = ``0`` +:ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **center_of_mass_mode** = ``0`` :ref:`🔗<class_RigidBody3D_property_center_of_mass_mode>` .. rst-class:: classref-property-setget -- void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` value **)** -- :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **get_center_of_mass_mode** **(** **)** +- |void| **set_center_of_mass_mode**\ (\ value\: :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>`\ ) +- :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` **get_center_of_mass_mode**\ (\ ) Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enum_RigidBody3D_CenterOfMassMode>` for possible values. @@ -425,12 +425,12 @@ Defines the way the body's center of mass is set. See :ref:`CenterOfMassMode<enu .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **constant_force** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **constant_force** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_constant_force>` .. rst-class:: classref-property-setget -- void **set_constant_force** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_constant_force** **(** **)** +- |void| **set_constant_force**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_constant_force**\ (\ ) The body's total constant positional forces applied during each physics update. @@ -444,12 +444,12 @@ See :ref:`add_constant_force<class_RigidBody3D_method_add_constant_force>` and : .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **constant_torque** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **constant_torque** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_constant_torque>` .. rst-class:: classref-property-setget -- void **set_constant_torque** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_constant_torque** **(** **)** +- |void| **set_constant_torque**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_constant_torque**\ (\ ) The body's total constant rotational forces applied during each physics update. @@ -463,12 +463,12 @@ See :ref:`add_constant_torque<class_RigidBody3D_method_add_constant_torque>`. .. rst-class:: classref-property -:ref:`bool<class_bool>` **contact_monitor** = ``false`` +:ref:`bool<class_bool>` **contact_monitor** = ``false`` :ref:`🔗<class_RigidBody3D_property_contact_monitor>` .. rst-class:: classref-property-setget -- void **set_contact_monitor** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_contact_monitor_enabled** **(** **)** +- |void| **set_contact_monitor**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_contact_monitor_enabled**\ (\ ) If ``true``, the RigidBody3D will emit signals when it collides with another body. @@ -482,12 +482,12 @@ If ``true``, the RigidBody3D will emit signals when it collides with another bod .. rst-class:: classref-property -:ref:`bool<class_bool>` **continuous_cd** = ``false`` +:ref:`bool<class_bool>` **continuous_cd** = ``false`` :ref:`🔗<class_RigidBody3D_property_continuous_cd>` .. rst-class:: classref-property-setget -- void **set_use_continuous_collision_detection** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_continuous_collision_detection** **(** **)** +- |void| **set_use_continuous_collision_detection**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_continuous_collision_detection**\ (\ ) If ``true``, continuous collision detection is used. @@ -501,14 +501,16 @@ Continuous collision detection tries to predict where a moving body will collide .. rst-class:: classref-property -:ref:`bool<class_bool>` **custom_integrator** = ``false`` +:ref:`bool<class_bool>` **custom_integrator** = ``false`` :ref:`🔗<class_RigidBody3D_property_custom_integrator>` .. rst-class:: classref-property-setget -- void **set_use_custom_integrator** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_custom_integrator** **(** **)** +- |void| **set_use_custom_integrator**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_custom_integrator**\ (\ ) -If ``true``, 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 :ref:`_integrate_forces<class_RigidBody3D_method__integrate_forces>` function, if defined. +If ``true``, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` method, if that virtual method is overridden. + +Setting this property will call the method :ref:`PhysicsServer3D.body_set_omit_force_integration<class_PhysicsServer3D_method_body_set_omit_force_integration>` internally. .. rst-class:: classref-item-separator @@ -518,12 +520,12 @@ If ``true``, internal force integration will be disabled (like gravity or air fr .. rst-class:: classref-property -:ref:`bool<class_bool>` **freeze** = ``false`` +:ref:`bool<class_bool>` **freeze** = ``false`` :ref:`🔗<class_RigidBody3D_property_freeze>` .. rst-class:: classref-property-setget -- void **set_freeze_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_freeze_enabled** **(** **)** +- |void| **set_freeze_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_freeze_enabled**\ (\ ) If ``true``, the body is frozen. Gravity and forces are not applied anymore. @@ -539,12 +541,12 @@ For a body that is always frozen, use :ref:`StaticBody3D<class_StaticBody3D>` or .. rst-class:: classref-property -:ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **freeze_mode** = ``0`` +:ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **freeze_mode** = ``0`` :ref:`🔗<class_RigidBody3D_property_freeze_mode>` .. rst-class:: classref-property-setget -- void **set_freeze_mode** **(** :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` value **)** -- :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **get_freeze_mode** **(** **)** +- |void| **set_freeze_mode**\ (\ value\: :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>`\ ) +- :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` **get_freeze_mode**\ (\ ) The body's freeze mode. Can be used to set the body's behavior when :ref:`freeze<class_RigidBody3D_property_freeze>` is enabled. See :ref:`FreezeMode<enum_RigidBody3D_FreezeMode>` for possible values. @@ -558,12 +560,12 @@ For a body that is always frozen, use :ref:`StaticBody3D<class_StaticBody3D>` or .. rst-class:: classref-property -:ref:`float<class_float>` **gravity_scale** = ``1.0`` +:ref:`float<class_float>` **gravity_scale** = ``1.0`` :ref:`🔗<class_RigidBody3D_property_gravity_scale>` .. rst-class:: classref-property-setget -- void **set_gravity_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_gravity_scale** **(** **)** +- |void| **set_gravity_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_gravity_scale**\ (\ ) This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. @@ -575,16 +577,16 @@ This is multiplied by the global 3D gravity setting found in **Project > Project .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **inertia** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **inertia** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_inertia>` .. rst-class:: classref-property-setget -- void **set_inertia** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_inertia** **(** **)** +- |void| **set_inertia**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_inertia**\ (\ ) The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. -If set to ``Vector3.ZERO``, inertia is automatically computed (default value). +If set to :ref:`Vector3.ZERO<class_Vector3_constant_ZERO>`, inertia is automatically computed (default value). \ **Note:** This value does not change when inertia is automatically computed. Use :ref:`PhysicsServer3D<class_PhysicsServer3D>` to get the computed inertia. @@ -622,12 +624,12 @@ If set to ``Vector3.ZERO``, inertia is automatically computed (default value). .. rst-class:: classref-property -:ref:`float<class_float>` **linear_damp** = ``0.0`` +:ref:`float<class_float>` **linear_damp** = ``0.0`` :ref:`🔗<class_RigidBody3D_property_linear_damp>` .. rst-class:: classref-property-setget -- void **set_linear_damp** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_linear_damp** **(** **)** +- |void| **set_linear_damp**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_linear_damp**\ (\ ) Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an :ref:`Area3D<class_Area3D>` the body is in. Depending on :ref:`linear_damp_mode<class_RigidBody3D_property_linear_damp_mode>`, you can set :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` to be added to or to replace the body's damping value. @@ -641,12 +643,12 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp<class_ProjectSettings_p .. rst-class:: classref-property -:ref:`DampMode<enum_RigidBody3D_DampMode>` **linear_damp_mode** = ``0`` +:ref:`DampMode<enum_RigidBody3D_DampMode>` **linear_damp_mode** = ``0`` :ref:`🔗<class_RigidBody3D_property_linear_damp_mode>` .. rst-class:: classref-property-setget -- void **set_linear_damp_mode** **(** :ref:`DampMode<enum_RigidBody3D_DampMode>` value **)** -- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_linear_damp_mode** **(** **)** +- |void| **set_linear_damp_mode**\ (\ value\: :ref:`DampMode<enum_RigidBody3D_DampMode>`\ ) +- :ref:`DampMode<enum_RigidBody3D_DampMode>` **get_linear_damp_mode**\ (\ ) Defines how :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` is applied. See :ref:`DampMode<enum_RigidBody3D_DampMode>` for possible values. @@ -658,14 +660,14 @@ Defines how :ref:`linear_damp<class_RigidBody3D_property_linear_damp>` is applie .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_RigidBody3D_property_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_linear_velocity**\ (\ ) -The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_RigidBody3D_method__integrate_forces>` as your process loop for precise control of the body state. +The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use :ref:`_integrate_forces<class_RigidBody3D_private_method__integrate_forces>` as your process loop for precise control of the body state. .. rst-class:: classref-item-separator @@ -675,12 +677,12 @@ The body's linear velocity in units per second. Can be used sporadically, but ** .. rst-class:: classref-property -:ref:`bool<class_bool>` **lock_rotation** = ``false`` +:ref:`bool<class_bool>` **lock_rotation** = ``false`` :ref:`🔗<class_RigidBody3D_property_lock_rotation>` .. rst-class:: classref-property-setget -- void **set_lock_rotation_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_lock_rotation_enabled** **(** **)** +- |void| **set_lock_rotation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_lock_rotation_enabled**\ (\ ) If ``true``, the body cannot rotate. Gravity and forces only apply linear movement. @@ -692,12 +694,12 @@ If ``true``, the body cannot rotate. Gravity and forces only apply linear moveme .. rst-class:: classref-property -:ref:`float<class_float>` **mass** = ``1.0`` +:ref:`float<class_float>` **mass** = ``1.0`` :ref:`🔗<class_RigidBody3D_property_mass>` .. rst-class:: classref-property-setget -- void **set_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mass** **(** **)** +- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mass**\ (\ ) The body's mass. @@ -709,12 +711,12 @@ The body's mass. .. rst-class:: classref-property -:ref:`int<class_int>` **max_contacts_reported** = ``0`` +:ref:`int<class_int>` **max_contacts_reported** = ``0`` :ref:`🔗<class_RigidBody3D_property_max_contacts_reported>` .. rst-class:: classref-property-setget -- void **set_max_contacts_reported** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_contacts_reported** **(** **)** +- |void| **set_max_contacts_reported**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_contacts_reported**\ (\ ) The maximum number of contacts that will be recorded. Requires a value greater than 0 and :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` to start to register contacts. Use :ref:`get_contact_count<class_RigidBody3D_method_get_contact_count>` to retrieve the count or :ref:`get_colliding_bodies<class_RigidBody3D_method_get_colliding_bodies>` to retrieve bodies that have been collided with. @@ -728,12 +730,12 @@ The maximum number of contacts that will be recorded. Requires a value greater t .. rst-class:: classref-property -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** :ref:`🔗<class_RigidBody3D_property_physics_material_override>` .. rst-class:: classref-property-setget -- void **set_physics_material_override** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)** -- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override** **(** **)** +- |void| **set_physics_material_override**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) +- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override**\ (\ ) The physics material override for the body. @@ -747,12 +749,12 @@ If a material is assigned to this property, it will be used instead of any other .. rst-class:: classref-property -:ref:`bool<class_bool>` **sleeping** = ``false`` +:ref:`bool<class_bool>` **sleeping** = ``false`` :ref:`🔗<class_RigidBody3D_property_sleeping>` .. rst-class:: classref-property-setget -- void **set_sleeping** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sleeping** **(** **)** +- |void| **set_sleeping**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sleeping**\ (\ ) If ``true``, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the :ref:`apply_impulse<class_RigidBody3D_method_apply_impulse>` or :ref:`apply_force<class_RigidBody3D_method_apply_force>` methods. @@ -765,13 +767,13 @@ If ``true``, the body will not move and will not calculate forces until woken up Method Descriptions ------------------- -.. _class_RigidBody3D_method__integrate_forces: +.. _class_RigidBody3D_private_method__integrate_forces: .. rst-class:: classref-method -void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>` state **)** |virtual| +|void| **_integrate_forces**\ (\ state\: :ref:`PhysicsDirectBodyState3D<class_PhysicsDirectBodyState3D>`\ ) |virtual| :ref:`🔗<class_RigidBody3D_private_method__integrate_forces>` -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 :ref:`custom_integrator<class_RigidBody3D_property_custom_integrator>` property 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 is called before the standard force integration, but the :ref:`custom_integrator<class_RigidBody3D_property_custom_integrator>` property allows you to disable the standard force integration and do fully custom force integration for a body. .. rst-class:: classref-item-separator @@ -781,7 +783,7 @@ Called during physics processing, allowing you to read and safely modify the sim .. rst-class:: classref-method -void **add_constant_central_force** **(** :ref:`Vector3<class_Vector3>` force **)** +|void| **add_constant_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_add_constant_central_force>` Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. @@ -795,7 +797,7 @@ This is equivalent to using :ref:`add_constant_force<class_RigidBody3D_method_ad .. rst-class:: classref-method -void **add_constant_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **add_constant_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_RigidBody3D_method_add_constant_force>` Adds a constant positioned force to the body that keeps being applied over time until cleared with ``constant_force = Vector3(0, 0, 0)``. @@ -809,7 +811,7 @@ Adds a constant positioned force to the body that keeps being applied over time .. rst-class:: classref-method -void **add_constant_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** +|void| **add_constant_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_add_constant_torque>` Adds a constant rotational force without affecting position that keeps being applied over time until cleared with ``constant_torque = Vector3(0, 0, 0)``. @@ -821,7 +823,7 @@ Adds a constant rotational force without affecting position that keeps being app .. rst-class:: classref-method -void **apply_central_force** **(** :ref:`Vector3<class_Vector3>` force **)** +|void| **apply_central_force**\ (\ force\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_apply_central_force>` Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. @@ -835,7 +837,7 @@ This is equivalent to using :ref:`apply_force<class_RigidBody3D_method_apply_for .. rst-class:: classref-method -void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** +|void| **apply_central_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_apply_central_impulse>` Applies a directional impulse without affecting rotation. @@ -851,7 +853,7 @@ This is equivalent to using :ref:`apply_impulse<class_RigidBody3D_method_apply_i .. rst-class:: classref-method -void **apply_force** **(** :ref:`Vector3<class_Vector3>` force, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **apply_force**\ (\ force\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_RigidBody3D_method_apply_force>` Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. @@ -865,7 +867,7 @@ Applies a positioned force to the body. A force is time dependent and meant to b .. rst-class:: classref-method -void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` impulse, :ref:`Vector3<class_Vector3>` position=Vector3(0, 0, 0) **)** +|void| **apply_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`, position\: :ref:`Vector3<class_Vector3>` = Vector3(0, 0, 0)\ ) :ref:`🔗<class_RigidBody3D_method_apply_impulse>` Applies a positioned impulse to the body. @@ -881,7 +883,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -void **apply_torque** **(** :ref:`Vector3<class_Vector3>` torque **)** +|void| **apply_torque**\ (\ torque\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_apply_torque>` Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. @@ -895,7 +897,7 @@ Applies a rotational force without affecting position. A force is time dependent .. rst-class:: classref-method -void **apply_torque_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)** +|void| **apply_torque_impulse**\ (\ impulse\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_apply_torque_impulse>` Applies a rotational impulse to the body without affecting the position. @@ -911,7 +913,7 @@ An impulse is time-independent! Applying an impulse every frame would result in .. rst-class:: classref-method -:ref:`Node3D[]<class_Node3D>` **get_colliding_bodies** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Node3D<class_Node3D>`\] **get_colliding_bodies**\ (\ ) |const| :ref:`🔗<class_RigidBody3D_method_get_colliding_bodies>` Returns a list of the bodies colliding with this one. Requires :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>` to be set to ``true`` and :ref:`max_contacts_reported<class_RigidBody3D_property_max_contacts_reported>` to be set high enough to detect all the collisions. @@ -925,7 +927,7 @@ Returns a list of the bodies colliding with this one. Requires :ref:`contact_mon .. rst-class:: classref-method -:ref:`int<class_int>` **get_contact_count** **(** **)** |const| +:ref:`int<class_int>` **get_contact_count**\ (\ ) |const| :ref:`🔗<class_RigidBody3D_method_get_contact_count>` Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see :ref:`contact_monitor<class_RigidBody3D_property_contact_monitor>`). @@ -939,7 +941,7 @@ Returns the number of contacts this body has with other bodies. By default, this .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **get_inverse_inertia_tensor** **(** **)** |const| +:ref:`Basis<class_Basis>` **get_inverse_inertia_tensor**\ (\ ) |const| :ref:`🔗<class_RigidBody3D_method_get_inverse_inertia_tensor>` Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the **RigidBody3D**. @@ -951,7 +953,7 @@ Returns the inverse inertia tensor basis. This is used to calculate the angular .. rst-class:: classref-method -void **set_axis_velocity** **(** :ref:`Vector3<class_Vector3>` axis_velocity **)** +|void| **set_axis_velocity**\ (\ axis_velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_RigidBody3D_method_set_axis_velocity>` Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. @@ -962,3 +964,4 @@ Sets an axis velocity. The velocity in the given vector axis will be set as the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_rootmotionview.rst b/classes/class_rootmotionview.rst index edf76e763c6..142f7643c55 100644 --- a/classes/class_rootmotionview.rst +++ b/classes/class_rootmotionview.rst @@ -12,14 +12,14 @@ RootMotionView **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Editor-only helper for setting up root motion in :ref:`AnimationTree<class_AnimationTree>`. +Editor-only helper for setting up root motion in :ref:`AnimationMixer<class_AnimationMixer>`. .. rst-class:: classref-introduction-group Description ----------- -*Root motion* refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also :ref:`AnimationTree<class_AnimationTree>`. +*Root motion* refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also :ref:`AnimationMixer<class_AnimationMixer>`. \ **Note:** **RootMotionView** is only visible in the editor. It will be hidden automatically in the running project. @@ -63,14 +63,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **animation_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **animation_path** = ``NodePath("")`` :ref:`🔗<class_RootMotionView_property_animation_path>` .. rst-class:: classref-property-setget -- void **set_animation_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_animation_path** **(** **)** +- |void| **set_animation_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_animation_path**\ (\ ) -Path to an :ref:`AnimationTree<class_AnimationTree>` node to use as a basis for root motion. +Path to an :ref:`AnimationMixer<class_AnimationMixer>` node to use as a basis for root motion. .. rst-class:: classref-item-separator @@ -80,12 +80,12 @@ Path to an :ref:`AnimationTree<class_AnimationTree>` node to use as a basis for .. rst-class:: classref-property -:ref:`float<class_float>` **cell_size** = ``1.0`` +:ref:`float<class_float>` **cell_size** = ``1.0`` :ref:`🔗<class_RootMotionView_property_cell_size>` .. rst-class:: classref-property-setget -- void **set_cell_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_cell_size** **(** **)** +- |void| **set_cell_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_cell_size**\ (\ ) The grid's cell size in 3D units. @@ -97,12 +97,12 @@ The grid's cell size in 3D units. .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(0.5, 0.5, 1, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(0.5, 0.5, 1, 1)`` :ref:`🔗<class_RootMotionView_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) The grid's color. @@ -114,12 +114,12 @@ The grid's color. .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``10.0`` +:ref:`float<class_float>` **radius** = ``10.0`` :ref:`🔗<class_RootMotionView_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this :ref:`radius<class_RootMotionView_property_radius>` is reached. @@ -131,12 +131,12 @@ The grid's radius in 3D units. The grid's opacity will fade gradually as the dis .. rst-class:: classref-property -:ref:`bool<class_bool>` **zero_y** = ``true`` +:ref:`bool<class_bool>` **zero_y** = ``true`` :ref:`🔗<class_RootMotionView_property_zero_y>` .. rst-class:: classref-property-setget -- void **set_zero_y** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_zero_y** **(** **)** +- |void| **set_zero_y**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_zero_y**\ (\ ) If ``true``, the grid's points will all be on the same Y coordinate (*local* Y = 0). If ``false``, the points' original Y coordinate is preserved. @@ -147,3 +147,4 @@ If ``true``, the grid's points will all be on the same Y coordinate (*local* Y = .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scenemultiplayer.rst b/classes/class_scenemultiplayer.rst index 053fa59023c..385ea6b4d3f 100644 --- a/classes/class_scenemultiplayer.rst +++ b/classes/class_scenemultiplayer.rst @@ -63,19 +63,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_SceneMultiplayer_method_clear>` **(** **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`complete_auth<class_SceneMultiplayer_method_complete_auth>` **(** :ref:`int<class_int>` id **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_peer<class_SceneMultiplayer_method_disconnect_peer>` **(** :ref:`int<class_int>` id **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_authenticating_peers<class_SceneMultiplayer_method_get_authenticating_peers>` **(** **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_auth<class_SceneMultiplayer_method_send_auth>` **(** :ref:`int<class_int>` id, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_bytes<class_SceneMultiplayer_method_send_bytes>` **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes, :ref:`int<class_int>` id=0, :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` mode=2, :ref:`int<class_int>` channel=0 **)** | - +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_SceneMultiplayer_method_clear>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`complete_auth<class_SceneMultiplayer_method_complete_auth>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_peer<class_SceneMultiplayer_method_disconnect_peer>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_authenticating_peers<class_SceneMultiplayer_method_get_authenticating_peers>`\ (\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_auth<class_SceneMultiplayer_method_send_auth>`\ (\ id\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_bytes<class_SceneMultiplayer_method_send_bytes>`\ (\ bytes\: :ref:`PackedByteArray<class_PackedByteArray>`, id\: :ref:`int<class_int>` = 0, mode\: :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` = 2, channel\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,7 +90,7 @@ Signals .. rst-class:: classref-signal -**peer_authenticating** **(** :ref:`int<class_int>` id **)** +**peer_authenticating**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneMultiplayer_signal_peer_authenticating>` Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` connects to a new peer and a valid :ref:`auth_callback<class_SceneMultiplayer_property_auth_callback>` is set. In this case, the :ref:`MultiplayerAPI.peer_connected<class_MultiplayerAPI_signal_peer_connected>` will not be emitted until :ref:`complete_auth<class_SceneMultiplayer_method_complete_auth>` is called with given peer ``id``. While in this state, the peer will not be included in the list returned by :ref:`MultiplayerAPI.get_peers<class_MultiplayerAPI_method_get_peers>` (but in the one returned by :ref:`get_authenticating_peers<class_SceneMultiplayer_method_get_authenticating_peers>`), and only authentication data will be sent or received. See :ref:`send_auth<class_SceneMultiplayer_method_send_auth>` for sending authentication data. @@ -102,7 +102,7 @@ Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_M .. rst-class:: classref-signal -**peer_authentication_failed** **(** :ref:`int<class_int>` id **)** +**peer_authentication_failed**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneMultiplayer_signal_peer_authentication_failed>` Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` disconnects from a peer for which authentication had not yet completed. See :ref:`peer_authenticating<class_SceneMultiplayer_signal_peer_authenticating>`. @@ -114,7 +114,7 @@ Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_M .. rst-class:: classref-signal -**peer_packet** **(** :ref:`int<class_int>` id, :ref:`PackedByteArray<class_PackedByteArray>` packet **)** +**peer_packet**\ (\ id\: :ref:`int<class_int>`, packet\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_SceneMultiplayer_signal_peer_packet>` Emitted when this MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` receives a ``packet`` with custom data (see :ref:`send_bytes<class_SceneMultiplayer_method_send_bytes>`). ID is the peer ID of the peer that sent the packet. @@ -131,12 +131,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_object_decoding** = ``false`` +:ref:`bool<class_bool>` **allow_object_decoding** = ``false`` :ref:`🔗<class_SceneMultiplayer_property_allow_object_decoding>` .. rst-class:: classref-property-setget -- void **set_allow_object_decoding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_object_decoding_allowed** **(** **)** +- |void| **set_allow_object_decoding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_object_decoding_allowed**\ (\ ) If ``true``, the MultiplayerAPI will allow encoding and decoding of object during RPCs. @@ -150,12 +150,12 @@ If ``true``, the MultiplayerAPI will allow encoding and decoding of object durin .. rst-class:: classref-property -:ref:`Callable<class_Callable>` **auth_callback** = ``Callable()`` +:ref:`Callable<class_Callable>` **auth_callback** = ``Callable()`` :ref:`🔗<class_SceneMultiplayer_property_auth_callback>` .. rst-class:: classref-property-setget -- void **set_auth_callback** **(** :ref:`Callable<class_Callable>` value **)** -- :ref:`Callable<class_Callable>` **get_auth_callback** **(** **)** +- |void| **set_auth_callback**\ (\ value\: :ref:`Callable<class_Callable>`\ ) +- :ref:`Callable<class_Callable>` **get_auth_callback**\ (\ ) The callback to execute when when receiving authentication data sent via :ref:`send_auth<class_SceneMultiplayer_method_send_auth>`. If the :ref:`Callable<class_Callable>` is empty (default), peers will be automatically accepted as soon as they connect. @@ -167,12 +167,12 @@ The callback to execute when when receiving authentication data sent via :ref:`s .. rst-class:: classref-property -:ref:`float<class_float>` **auth_timeout** = ``3.0`` +:ref:`float<class_float>` **auth_timeout** = ``3.0`` :ref:`🔗<class_SceneMultiplayer_property_auth_timeout>` .. rst-class:: classref-property-setget -- void **set_auth_timeout** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_auth_timeout** **(** **)** +- |void| **set_auth_timeout**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_auth_timeout**\ (\ ) If set to a value greater than ``0.0``, the maximum amount of time peers can stay in the authenticating state, after which the authentication will automatically fail. See the :ref:`peer_authenticating<class_SceneMultiplayer_signal_peer_authenticating>` and :ref:`peer_authentication_failed<class_SceneMultiplayer_signal_peer_authentication_failed>` signals. @@ -184,12 +184,12 @@ If set to a value greater than ``0.0``, the maximum amount of time peers can sta .. rst-class:: classref-property -:ref:`int<class_int>` **max_delta_packet_size** = ``65535`` +:ref:`int<class_int>` **max_delta_packet_size** = ``65535`` :ref:`🔗<class_SceneMultiplayer_property_max_delta_packet_size>` .. rst-class:: classref-property-setget -- void **set_max_delta_packet_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_delta_packet_size** **(** **)** +- |void| **set_max_delta_packet_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_delta_packet_size**\ (\ ) Maximum size of each delta packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of causing networking congestion (higher latency, disconnections). See :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. @@ -201,12 +201,12 @@ Maximum size of each delta packet. Higher values increase the chance of receivin .. rst-class:: classref-property -:ref:`int<class_int>` **max_sync_packet_size** = ``1350`` +:ref:`int<class_int>` **max_sync_packet_size** = ``1350`` :ref:`🔗<class_SceneMultiplayer_property_max_sync_packet_size>` .. rst-class:: classref-property-setget -- void **set_max_sync_packet_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_sync_packet_size** **(** **)** +- |void| **set_max_sync_packet_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_sync_packet_size**\ (\ ) Maximum size of each synchronization packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of packet loss. See :ref:`MultiplayerSynchronizer<class_MultiplayerSynchronizer>`. @@ -218,12 +218,12 @@ Maximum size of each synchronization packet. Higher values increase the chance o .. rst-class:: classref-property -:ref:`bool<class_bool>` **refuse_new_connections** = ``false`` +:ref:`bool<class_bool>` **refuse_new_connections** = ``false`` :ref:`🔗<class_SceneMultiplayer_property_refuse_new_connections>` .. rst-class:: classref-property-setget -- void **set_refuse_new_connections** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_refusing_new_connections** **(** **)** +- |void| **set_refuse_new_connections**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_refusing_new_connections**\ (\ ) If ``true``, the MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_MultiplayerAPI_property_multiplayer_peer>` refuses new incoming connections. @@ -235,12 +235,12 @@ If ``true``, the MultiplayerAPI's :ref:`MultiplayerAPI.multiplayer_peer<class_Mu .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **root_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **root_path** = ``NodePath("")`` :ref:`🔗<class_SceneMultiplayer_property_root_path>` .. rst-class:: classref-property-setget -- void **set_root_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_root_path** **(** **)** +- |void| **set_root_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_root_path**\ (\ ) The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. @@ -254,12 +254,12 @@ This effectively allows to have different branches of the scene tree to be manag .. rst-class:: classref-property -:ref:`bool<class_bool>` **server_relay** = ``true`` +:ref:`bool<class_bool>` **server_relay** = ``true`` :ref:`🔗<class_SceneMultiplayer_property_server_relay>` .. rst-class:: classref-property-setget -- void **set_server_relay_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_server_relay_enabled** **(** **)** +- |void| **set_server_relay_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_server_relay_enabled**\ (\ ) Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is ``false``, clients won't be automatically notified of other peers and won't be able to send them packets through the server. @@ -280,7 +280,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_SceneMultiplayer_method_clear>` Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). @@ -292,7 +292,7 @@ Clears the current SceneMultiplayer network state (you shouldn't call this unles .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **complete_auth** **(** :ref:`int<class_int>` id **)** +:ref:`Error<enum_@GlobalScope_Error>` **complete_auth**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneMultiplayer_method_complete_auth>` Mark the authentication step as completed for the remote peer identified by ``id``. The :ref:`MultiplayerAPI.peer_connected<class_MultiplayerAPI_signal_peer_connected>` signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. @@ -306,7 +306,7 @@ If a peer disconnects before completing authentication, either due to a network .. rst-class:: classref-method -void **disconnect_peer** **(** :ref:`int<class_int>` id **)** +|void| **disconnect_peer**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneMultiplayer_method_disconnect_peer>` Disconnects the peer identified by ``id``, removing it from the list of connected peers, and closing the underlying connection with it. @@ -318,7 +318,7 @@ Disconnects the peer identified by ``id``, removing it from the list of connecte .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_authenticating_peers** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_authenticating_peers**\ (\ ) :ref:`🔗<class_SceneMultiplayer_method_get_authenticating_peers>` Returns the IDs of the peers currently trying to authenticate with this :ref:`MultiplayerAPI<class_MultiplayerAPI>`. @@ -330,7 +330,7 @@ Returns the IDs of the peers currently trying to authenticate with this :ref:`Mu .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **send_auth** **(** :ref:`int<class_int>` id, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +:ref:`Error<enum_@GlobalScope_Error>` **send_auth**\ (\ id\: :ref:`int<class_int>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_SceneMultiplayer_method_send_auth>` Sends the specified ``data`` to the remote peer identified by ``id`` as part of an authentication message. This can be used to authenticate peers, and control when :ref:`MultiplayerAPI.peer_connected<class_MultiplayerAPI_signal_peer_connected>` is emitted (and the remote peer accepted as one of the connected peers). @@ -342,7 +342,7 @@ Sends the specified ``data`` to the remote peer identified by ``id`` as part of .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **send_bytes** **(** :ref:`PackedByteArray<class_PackedByteArray>` bytes, :ref:`int<class_int>` id=0, :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` mode=2, :ref:`int<class_int>` channel=0 **)** +:ref:`Error<enum_@GlobalScope_Error>` **send_bytes**\ (\ bytes\: :ref:`PackedByteArray<class_PackedByteArray>`, id\: :ref:`int<class_int>` = 0, mode\: :ref:`TransferMode<enum_MultiplayerPeer_TransferMode>` = 2, channel\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_SceneMultiplayer_method_send_bytes>` Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref:`MultiplayerPeer.set_target_peer<class_MultiplayerPeer_method_set_target_peer>`). Default ID is ``0``, i.e. broadcast to all peers. @@ -353,3 +353,4 @@ Sends the given raw ``bytes`` to a specific peer identified by ``id`` (see :ref: .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scenereplicationconfig.rst b/classes/class_scenereplicationconfig.rst index ea7f3dc1976..d5ea1b029ad 100644 --- a/classes/class_scenereplicationconfig.rst +++ b/classes/class_scenereplicationconfig.rst @@ -22,29 +22,72 @@ Methods .. table:: :widths: auto - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property<class_SceneReplicationConfig_method_add_property>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`int<class_int>` index=-1 **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath[]<class_NodePath>` | :ref:`get_properties<class_SceneReplicationConfig_method_get_properties>` **(** **)** |const| | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_property<class_SceneReplicationConfig_method_has_property>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`property_get_index<class_SceneReplicationConfig_method_property_get_index>` **(** :ref:`NodePath<class_NodePath>` path **)** |const| | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`property_get_spawn<class_SceneReplicationConfig_method_property_get_spawn>` **(** :ref:`NodePath<class_NodePath>` path **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`property_get_sync<class_SceneReplicationConfig_method_property_get_sync>` **(** :ref:`NodePath<class_NodePath>` path **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`property_get_watch<class_SceneReplicationConfig_method_property_get_watch>` **(** :ref:`NodePath<class_NodePath>` path **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`property_set_spawn<class_SceneReplicationConfig_method_property_set_spawn>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`property_set_sync<class_SceneReplicationConfig_method_property_set_sync>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`property_set_watch<class_SceneReplicationConfig_method_property_set_watch>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_property<class_SceneReplicationConfig_method_remove_property>` **(** :ref:`NodePath<class_NodePath>` path **)** | - +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_property<class_SceneReplicationConfig_method_add_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`, index\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`NodePath<class_NodePath>`\] | :ref:`get_properties<class_SceneReplicationConfig_method_get_properties>`\ (\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_property<class_SceneReplicationConfig_method_has_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`property_get_index<class_SceneReplicationConfig_method_property_get_index>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` | :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`property_get_spawn<class_SceneReplicationConfig_method_property_get_spawn>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`property_get_sync<class_SceneReplicationConfig_method_property_get_sync>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`property_get_watch<class_SceneReplicationConfig_method_property_get_watch>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>`\ (\ path\: :ref:`NodePath<class_NodePath>`, mode\: :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_spawn<class_SceneReplicationConfig_method_property_set_spawn>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_sync<class_SceneReplicationConfig_method_property_set_sync>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`property_set_watch<class_SceneReplicationConfig_method_property_set_watch>`\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_property<class_SceneReplicationConfig_method_remove_property>`\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_SceneReplicationConfig_ReplicationMode: + +.. rst-class:: classref-enumeration + +enum **ReplicationMode**: :ref:`🔗<enum_SceneReplicationConfig_ReplicationMode>` + +.. _class_SceneReplicationConfig_constant_REPLICATION_MODE_NEVER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_NEVER** = ``0`` + +Do not keep the given property synchronized. + +.. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_ALWAYS** = ``1`` + +Replicate the given property on process by constantly sending updates using unreliable transfer mode. + +.. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **REPLICATION_MODE_ON_CHANGE** = ``2`` + +Replicate the given property on process by sending updates using reliable transfer mode when its value changes. .. rst-class:: classref-section-separator @@ -59,7 +102,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_property** **(** :ref:`NodePath<class_NodePath>` path, :ref:`int<class_int>` index=-1 **)** +|void| **add_property**\ (\ path\: :ref:`NodePath<class_NodePath>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_SceneReplicationConfig_method_add_property>` Adds the property identified by the given ``path`` to the list of the properties being synchronized, optionally passing an ``index``. @@ -73,7 +116,7 @@ Adds the property identified by the given ``path`` to the list of the properties .. rst-class:: classref-method -:ref:`NodePath[]<class_NodePath>` **get_properties** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`NodePath<class_NodePath>`\] **get_properties**\ (\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_get_properties>` Returns a list of synchronized property :ref:`NodePath<class_NodePath>`\ s. @@ -85,9 +128,9 @@ Returns a list of synchronized property :ref:`NodePath<class_NodePath>`\ s. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_property** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`bool<class_bool>` **has_property**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_has_property>` -Returns whether the given ``path`` is configured for synchronization. +Returns ``true`` if the given ``path`` is configured for synchronization. .. rst-class:: classref-item-separator @@ -97,7 +140,7 @@ Returns whether the given ``path`` is configured for synchronization. .. rst-class:: classref-method -:ref:`int<class_int>` **property_get_index** **(** :ref:`NodePath<class_NodePath>` path **)** |const| +:ref:`int<class_int>` **property_get_index**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) |const| :ref:`🔗<class_SceneReplicationConfig_method_property_get_index>` Finds the index of the given ``path``. @@ -105,13 +148,25 @@ Finds the index of the given ``path``. ---- +.. _class_SceneReplicationConfig_method_property_get_replication_mode: + +.. rst-class:: classref-method + +:ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>` **property_get_replication_mode**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_replication_mode>` + +Returns the replication mode for the property identified by the given ``path``. See :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_SceneReplicationConfig_method_property_get_spawn: .. rst-class:: classref-method -:ref:`bool<class_bool>` **property_get_spawn** **(** :ref:`NodePath<class_NodePath>` path **)** +:ref:`bool<class_bool>` **property_get_spawn**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_spawn>` -Returns whether the property identified by the given ``path`` is configured to be synchronized on spawn. +Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on spawn. .. rst-class:: classref-item-separator @@ -121,9 +176,11 @@ Returns whether the property identified by the given ``path`` is configured to b .. rst-class:: classref-method -:ref:`bool<class_bool>` **property_get_sync** **(** :ref:`NodePath<class_NodePath>` path **)** +:ref:`bool<class_bool>` **property_get_sync**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_sync>` -Returns whether the property identified by the given ``path`` is configured to be synchronized on process. +**Deprecated:** Use :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>` instead. + +Returns ``true`` if the property identified by the given ``path`` is configured to be synchronized on process. .. rst-class:: classref-item-separator @@ -133,9 +190,23 @@ Returns whether the property identified by the given ``path`` is configured to b .. rst-class:: classref-method -:ref:`bool<class_bool>` **property_get_watch** **(** :ref:`NodePath<class_NodePath>` path **)** +:ref:`bool<class_bool>` **property_get_watch**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_get_watch>` + +**Deprecated:** Use :ref:`property_get_replication_mode<class_SceneReplicationConfig_method_property_get_replication_mode>` instead. + +Returns ``true`` if the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SceneReplicationConfig_method_property_set_replication_mode: + +.. rst-class:: classref-method + +|void| **property_set_replication_mode**\ (\ path\: :ref:`NodePath<class_NodePath>`, mode\: :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_replication_mode>` -Returns whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. +Sets the synchronization mode for the property identified by the given ``path``. See :ref:`ReplicationMode<enum_SceneReplicationConfig_ReplicationMode>`. .. rst-class:: classref-item-separator @@ -145,7 +216,7 @@ Returns whether the property identified by the given ``path`` is configured to b .. rst-class:: classref-method -void **property_set_spawn** **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** +|void| **property_set_spawn**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_spawn>` Sets whether the property identified by the given ``path`` is configured to be synchronized on spawn. @@ -157,7 +228,9 @@ Sets whether the property identified by the given ``path`` is configured to be s .. rst-class:: classref-method -void **property_set_sync** **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** +|void| **property_set_sync**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_sync>` + +**Deprecated:** Use :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>` with :ref:`REPLICATION_MODE_ALWAYS<class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS>` instead. Sets whether the property identified by the given ``path`` is configured to be synchronized on process. @@ -169,7 +242,9 @@ Sets whether the property identified by the given ``path`` is configured to be s .. rst-class:: classref-method -void **property_set_watch** **(** :ref:`NodePath<class_NodePath>` path, :ref:`bool<class_bool>` enabled **)** +|void| **property_set_watch**\ (\ path\: :ref:`NodePath<class_NodePath>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_property_set_watch>` + +**Deprecated:** Use :ref:`property_set_replication_mode<class_SceneReplicationConfig_method_property_set_replication_mode>` with :ref:`REPLICATION_MODE_ON_CHANGE<class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE>` instead. Sets whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. @@ -181,7 +256,7 @@ Sets whether the property identified by the given ``path`` is configured to be r .. rst-class:: classref-method -void **remove_property** **(** :ref:`NodePath<class_NodePath>` path **)** +|void| **remove_property**\ (\ path\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SceneReplicationConfig_method_remove_property>` Removes the property identified by the given ``path`` from the configuration. @@ -192,3 +267,4 @@ Removes the property identified by the given ``path`` from the configuration. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scenestate.rst b/classes/class_scenestate.rst index ca2aa962285..469bee388f1 100644 --- a/classes/class_scenestate.rst +++ b/classes/class_scenestate.rst @@ -31,49 +31,49 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_connection_binds<class_SceneState_method_get_connection_binds>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_count<class_SceneState_method_get_connection_count>` **(** **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_flags<class_SceneState_method_get_connection_flags>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_connection_method<class_SceneState_method_get_connection_method>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_connection_signal<class_SceneState_method_get_connection_signal>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_connection_source<class_SceneState_method_get_connection_source>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_connection_target<class_SceneState_method_get_connection_target>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connection_unbinds<class_SceneState_method_get_connection_unbinds>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_count<class_SceneState_method_get_node_count>` **(** **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_node_groups<class_SceneState_method_get_node_groups>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_index<class_SceneState_method_get_node_index>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedScene<class_PackedScene>` | :ref:`get_node_instance<class_SceneState_method_get_node_instance>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_node_instance_placeholder<class_SceneState_method_get_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_node_name<class_SceneState_method_get_node_name>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_node_owner_path<class_SceneState_method_get_node_owner_path>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_node_path<class_SceneState_method_get_node_path>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` for_parent=false **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_property_count<class_SceneState_method_get_node_property_count>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_node_property_name<class_SceneState_method_get_node_property_name>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_node_property_value<class_SceneState_method_get_node_property_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_node_type<class_SceneState_method_get_node_type>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_node_instance_placeholder<class_SceneState_method_is_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_connection_binds<class_SceneState_method_get_connection_binds>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_connection_count<class_SceneState_method_get_connection_count>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_connection_flags<class_SceneState_method_get_connection_flags>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_connection_method<class_SceneState_method_get_connection_method>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_connection_signal<class_SceneState_method_get_connection_signal>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_connection_source<class_SceneState_method_get_connection_source>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_connection_target<class_SceneState_method_get_connection_target>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_connection_unbinds<class_SceneState_method_get_connection_unbinds>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_count<class_SceneState_method_get_node_count>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_node_groups<class_SceneState_method_get_node_groups>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_index<class_SceneState_method_get_node_index>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedScene<class_PackedScene>` | :ref:`get_node_instance<class_SceneState_method_get_node_instance>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_node_instance_placeholder<class_SceneState_method_get_node_instance_placeholder>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_node_name<class_SceneState_method_get_node_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_node_owner_path<class_SceneState_method_get_node_owner_path>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_node_path<class_SceneState_method_get_node_path>`\ (\ idx\: :ref:`int<class_int>`, for_parent\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_property_count<class_SceneState_method_get_node_property_count>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_node_property_name<class_SceneState_method_get_node_property_name>`\ (\ idx\: :ref:`int<class_int>`, prop_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_node_property_value<class_SceneState_method_get_node_property_value>`\ (\ idx\: :ref:`int<class_int>`, prop_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_node_type<class_SceneState_method_get_node_type>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_node_instance_placeholder<class_SceneState_method_is_node_instance_placeholder>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,7 +88,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **GenEditState**: +enum **GenEditState**: :ref:`🔗<enum_SceneState_GenEditState>` .. _class_SceneState_constant_GEN_EDIT_STATE_DISABLED: @@ -141,7 +141,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_connection_binds** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`Array<class_Array>` **get_connection_binds**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_binds>` Returns the list of bound parameters for the signal at ``idx``. @@ -153,7 +153,7 @@ Returns the list of bound parameters for the signal at ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_count** **(** **)** |const| +:ref:`int<class_int>` **get_connection_count**\ (\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_count>` Returns the number of signal connections in the scene. @@ -167,7 +167,7 @@ The ``idx`` argument used to query connection metadata in other ``get_connection .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_flags** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`int<class_int>` **get_connection_flags**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_flags>` Returns the connection flags for the signal at ``idx``. See :ref:`ConnectFlags<enum_Object_ConnectFlags>` constants. @@ -179,7 +179,7 @@ Returns the connection flags for the signal at ``idx``. See :ref:`ConnectFlags<e .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_connection_method** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_connection_method**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_method>` Returns the method connected to the signal at ``idx``. @@ -191,7 +191,7 @@ Returns the method connected to the signal at ``idx``. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_connection_signal** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_connection_signal**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_signal>` Returns the name of the signal at ``idx``. @@ -203,7 +203,7 @@ Returns the name of the signal at ``idx``. .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_connection_source** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_connection_source**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_source>` Returns the path to the node that owns the signal at ``idx``, relative to the root node. @@ -215,7 +215,7 @@ Returns the path to the node that owns the signal at ``idx``, relative to the ro .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_connection_target** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_connection_target**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_target>` Returns the path to the node that owns the method connected to the signal at ``idx``, relative to the root node. @@ -227,7 +227,7 @@ Returns the path to the node that owns the method connected to the signal at ``i .. rst-class:: classref-method -:ref:`int<class_int>` **get_connection_unbinds** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`int<class_int>` **get_connection_unbinds**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_connection_unbinds>` Returns the number of unbound parameters for the signal at ``idx``. @@ -239,7 +239,7 @@ Returns the number of unbound parameters for the signal at ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_node_count** **(** **)** |const| +:ref:`int<class_int>` **get_node_count**\ (\ ) |const| :ref:`🔗<class_SceneState_method_get_node_count>` Returns the number of nodes in the scene. @@ -253,7 +253,7 @@ The ``idx`` argument used to query node data in other ``get_node_*`` methods in .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_node_groups** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_node_groups**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_groups>` Returns the list of group names associated with the node at ``idx``. @@ -265,7 +265,7 @@ Returns the list of group names associated with the node at ``idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_node_index** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`int<class_int>` **get_node_index**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_index>` Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the ``idx`` argument used here and in other methods. @@ -277,7 +277,7 @@ Returns the node's index, which is its position relative to its siblings. This i .. rst-class:: classref-method -:ref:`PackedScene<class_PackedScene>` **get_node_instance** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`PackedScene<class_PackedScene>` **get_node_instance**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_instance>` Returns a :ref:`PackedScene<class_PackedScene>` for the node at ``idx`` (i.e. the whole branch starting at this node, with its child nodes and resources), or ``null`` if the node is not an instance. @@ -289,7 +289,7 @@ Returns a :ref:`PackedScene<class_PackedScene>` for the node at ``idx`` (i.e. th .. rst-class:: classref-method -:ref:`String<class_String>` **get_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`String<class_String>` **get_node_instance_placeholder**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_instance_placeholder>` Returns the path to the represented scene file if the node at ``idx`` is an :ref:`InstancePlaceholder<class_InstancePlaceholder>`. @@ -301,7 +301,7 @@ Returns the path to the represented scene file if the node at ``idx`` is an :ref .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_node_name** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_node_name**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_name>` Returns the name of the node at ``idx``. @@ -313,7 +313,7 @@ Returns the name of the node at ``idx``. .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_node_owner_path** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_node_owner_path**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_owner_path>` Returns the path to the owner of the node at ``idx``, relative to the root node. @@ -325,7 +325,7 @@ Returns the path to the owner of the node at ``idx``, relative to the root node. .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_node_path** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` for_parent=false **)** |const| +:ref:`NodePath<class_NodePath>` **get_node_path**\ (\ idx\: :ref:`int<class_int>`, for_parent\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_SceneState_method_get_node_path>` Returns the path to the node at ``idx``. @@ -339,7 +339,7 @@ If ``for_parent`` is ``true``, returns the path of the ``idx`` node's parent ins .. rst-class:: classref-method -:ref:`int<class_int>` **get_node_property_count** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`int<class_int>` **get_node_property_count**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_property_count>` Returns the number of exported or overridden properties for the node at ``idx``. @@ -353,7 +353,7 @@ The ``prop_idx`` argument used to query node property data in other ``get_node_p .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_node_property_name** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** |const| +:ref:`StringName<class_StringName>` **get_node_property_name**\ (\ idx\: :ref:`int<class_int>`, prop_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_property_name>` Returns the name of the property at ``prop_idx`` for the node at ``idx``. @@ -365,7 +365,7 @@ Returns the name of the property at ``prop_idx`` for the node at ``idx``. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_node_property_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** |const| +:ref:`Variant<class_Variant>` **get_node_property_value**\ (\ idx\: :ref:`int<class_int>`, prop_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_property_value>` Returns the value of the property at ``prop_idx`` for the node at ``idx``. @@ -377,7 +377,7 @@ Returns the value of the property at ``prop_idx`` for the node at ``idx``. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_node_type** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`StringName<class_StringName>` **get_node_type**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_get_node_type>` Returns the type of the node at ``idx``. @@ -389,7 +389,7 @@ Returns the type of the node at ``idx``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`bool<class_bool>` **is_node_instance_placeholder**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SceneState_method_is_node_instance_placeholder>` Returns ``true`` if the node at ``idx`` is an :ref:`InstancePlaceholder<class_InstancePlaceholder>`. @@ -400,3 +400,4 @@ Returns ``true`` if the node at ``idx`` is an :ref:`InstancePlaceholder<class_In .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scenetree.rst b/classes/class_scenetree.rst index 2f6428f6e65..82e2d63d69c 100644 --- a/classes/class_scenetree.rst +++ b/classes/class_scenetree.rst @@ -19,11 +19,11 @@ Manages the game loop via a hierarchy of nodes. Description ----------- -As one of the most important classes, the **SceneTree** manages the hierarchy of nodes in a scene as well as scenes themselves. Nodes can be added, retrieved and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. +As one of the most important classes, the **SceneTree** manages the hierarchy of nodes in a scene, as well as scenes themselves. Nodes can be added, fetched and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. -You can also use the **SceneTree** to organize your nodes into groups: every node can be assigned as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the group's members at once. +You can also use the **SceneTree** to organize your nodes into **groups**: every node can be added to as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the nodes belonging to any given group. -\ **SceneTree** is the default :ref:`MainLoop<class_MainLoop>` implementation used by scenes, and is thus in charge of the game loop. +\ **SceneTree** is the default :ref:`MainLoop<class_MainLoop>` implementation used by the engine, and is thus in charge of the game loop. .. rst-class:: classref-introduction-group @@ -59,6 +59,8 @@ Properties +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`bool<class_bool>` | :ref:`paused<class_SceneTree_property_paused>` | ``false`` | +-----------------------------+------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`physics_interpolation<class_SceneTree_property_physics_interpolation>` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`bool<class_bool>` | :ref:`quit_on_go_back<class_SceneTree_property_quit_on_go_back>` | ``true`` | +-----------------------------+------------------------------------------------------------------------------+-----------+ | :ref:`Window<class_Window>` | :ref:`root<class_SceneTree_property_root>` | | @@ -72,51 +74,53 @@ Methods .. table:: :widths: auto - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`call_group<class_SceneTree_method_call_group>` **(** :ref:`StringName<class_StringName>` group, :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`call_group_flags<class_SceneTree_method_call_group_flags>` **(** :ref:`int<class_int>` flags, :ref:`StringName<class_StringName>` group, :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`change_scene_to_file<class_SceneTree_method_change_scene_to_file>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>` **(** :ref:`PackedScene<class_PackedScene>` packed_scene **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SceneTreeTimer<class_SceneTreeTimer>` | :ref:`create_timer<class_SceneTree_method_create_timer>` **(** :ref:`float<class_float>` time_sec, :ref:`bool<class_bool>` process_always=true, :ref:`bool<class_bool>` process_in_physics=false, :ref:`bool<class_bool>` ignore_time_scale=false **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_SceneTree_method_create_tween>` **(** **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node<class_Node>` | :ref:`get_first_node_in_group<class_SceneTree_method_get_first_node_in_group>` **(** :ref:`StringName<class_StringName>` group **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_frame<class_SceneTree_method_get_frame>` **(** **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`get_multiplayer<class_SceneTree_method_get_multiplayer>` **(** :ref:`NodePath<class_NodePath>` for_path=NodePath("") **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_count<class_SceneTree_method_get_node_count>` **(** **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node[]<class_Node>` | :ref:`get_nodes_in_group<class_SceneTree_method_get_nodes_in_group>` **(** :ref:`StringName<class_StringName>` group **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween[]<class_Tween>` | :ref:`get_processed_tweens<class_SceneTree_method_get_processed_tweens>` **(** **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_group<class_SceneTree_method_has_group>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_group<class_SceneTree_method_notify_group>` **(** :ref:`StringName<class_StringName>` group, :ref:`int<class_int>` notification **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`notify_group_flags<class_SceneTree_method_notify_group_flags>` **(** :ref:`int<class_int>` call_flags, :ref:`StringName<class_StringName>` group, :ref:`int<class_int>` notification **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_delete<class_SceneTree_method_queue_delete>` **(** :ref:`Object<class_Object>` obj **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`quit<class_SceneTree_method_quit>` **(** :ref:`int<class_int>` exit_code=0 **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`reload_current_scene<class_SceneTree_method_reload_current_scene>` **(** **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_group<class_SceneTree_method_set_group>` **(** :ref:`StringName<class_StringName>` group, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_group_flags<class_SceneTree_method_set_group_flags>` **(** :ref:`int<class_int>` call_flags, :ref:`StringName<class_StringName>` group, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_multiplayer<class_SceneTree_method_set_multiplayer>` **(** :ref:`MultiplayerAPI<class_MultiplayerAPI>` multiplayer, :ref:`NodePath<class_NodePath>` root_path=NodePath("") **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unload_current_scene<class_SceneTree_method_unload_current_scene>` **(** **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`call_group<class_SceneTree_method_call_group>`\ (\ group\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`call_group_flags<class_SceneTree_method_call_group_flags>`\ (\ flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`change_scene_to_file<class_SceneTree_method_change_scene_to_file>`\ (\ path\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>`\ (\ packed_scene\: :ref:`PackedScene<class_PackedScene>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SceneTreeTimer<class_SceneTreeTimer>` | :ref:`create_timer<class_SceneTree_method_create_timer>`\ (\ time_sec\: :ref:`float<class_float>`, process_always\: :ref:`bool<class_bool>` = true, process_in_physics\: :ref:`bool<class_bool>` = false, ignore_time_scale\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`create_tween<class_SceneTree_method_create_tween>`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node<class_Node>` | :ref:`get_first_node_in_group<class_SceneTree_method_get_first_node_in_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_frame<class_SceneTree_method_get_frame>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerAPI<class_MultiplayerAPI>` | :ref:`get_multiplayer<class_SceneTree_method_get_multiplayer>`\ (\ for_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_count<class_SceneTree_method_get_node_count>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_count_in_group<class_SceneTree_method_get_node_count_in_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_nodes_in_group<class_SceneTree_method_get_nodes_in_group>`\ (\ group\: :ref:`StringName<class_StringName>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Tween<class_Tween>`\] | :ref:`get_processed_tweens<class_SceneTree_method_get_processed_tweens>`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_group<class_SceneTree_method_has_group>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_group<class_SceneTree_method_notify_group>`\ (\ group\: :ref:`StringName<class_StringName>`, notification\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_group_flags<class_SceneTree_method_notify_group_flags>`\ (\ call_flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, notification\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_delete<class_SceneTree_method_queue_delete>`\ (\ obj\: :ref:`Object<class_Object>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`quit<class_SceneTree_method_quit>`\ (\ exit_code\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`reload_current_scene<class_SceneTree_method_reload_current_scene>`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_group<class_SceneTree_method_set_group>`\ (\ group\: :ref:`StringName<class_StringName>`, property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_group_flags<class_SceneTree_method_set_group_flags>`\ (\ call_flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_multiplayer<class_SceneTree_method_set_multiplayer>`\ (\ multiplayer\: :ref:`MultiplayerAPI<class_MultiplayerAPI>`, root_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unload_current_scene<class_SceneTree_method_unload_current_scene>`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,9 +135,9 @@ Signals .. rst-class:: classref-signal -**node_added** **(** :ref:`Node<class_Node>` node **)** +**node_added**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SceneTree_signal_node_added>` -Emitted whenever a node is added to the **SceneTree**. +Emitted when the ``node`` enters this tree. .. rst-class:: classref-item-separator @@ -143,9 +147,9 @@ Emitted whenever a node is added to the **SceneTree**. .. rst-class:: classref-signal -**node_configuration_warning_changed** **(** :ref:`Node<class_Node>` node **)** +**node_configuration_warning_changed**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SceneTree_signal_node_configuration_warning_changed>` -Emitted when a node's configuration changed. Only emitted in ``tool`` mode. +Emitted when the ``node``'s :ref:`Node.update_configuration_warnings<class_Node_method_update_configuration_warnings>` is called. Only emitted in the editor. .. rst-class:: classref-item-separator @@ -155,9 +159,9 @@ Emitted when a node's configuration changed. Only emitted in ``tool`` mode. .. rst-class:: classref-signal -**node_removed** **(** :ref:`Node<class_Node>` node **)** +**node_removed**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SceneTree_signal_node_removed>` -Emitted whenever a node is removed from the **SceneTree**. +Emitted when the ``node`` exits this tree. .. rst-class:: classref-item-separator @@ -167,9 +171,9 @@ Emitted whenever a node is removed from the **SceneTree**. .. rst-class:: classref-signal -**node_renamed** **(** :ref:`Node<class_Node>` node **)** +**node_renamed**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SceneTree_signal_node_renamed>` -Emitted whenever a node is renamed. +Emitted when the ``node``'s :ref:`Node.name<class_Node_property_name>` is changed. .. rst-class:: classref-item-separator @@ -179,9 +183,9 @@ Emitted whenever a node is renamed. .. rst-class:: classref-signal -**physics_frame** **(** **)** +**physics_frame**\ (\ ) :ref:`🔗<class_SceneTree_signal_physics_frame>` -Emitted immediately before :ref:`Node._physics_process<class_Node_method__physics_process>` is called on every node in the **SceneTree**. +Emitted immediately before :ref:`Node._physics_process<class_Node_private_method__physics_process>` is called on every node in this tree. .. rst-class:: classref-item-separator @@ -191,9 +195,9 @@ Emitted immediately before :ref:`Node._physics_process<class_Node_method__physic .. rst-class:: classref-signal -**process_frame** **(** **)** +**process_frame**\ (\ ) :ref:`🔗<class_SceneTree_signal_process_frame>` -Emitted immediately before :ref:`Node._process<class_Node_method__process>` is called on every node in the **SceneTree**. +Emitted immediately before :ref:`Node._process<class_Node_private_method__process>` is called on every node in this tree. .. rst-class:: classref-item-separator @@ -203,9 +207,9 @@ Emitted immediately before :ref:`Node._process<class_Node_method__process>` is c .. rst-class:: classref-signal -**tree_changed** **(** **)** +**tree_changed**\ (\ ) :ref:`🔗<class_SceneTree_signal_tree_changed>` -Emitted whenever the **SceneTree** hierarchy changed (children being moved or renamed, etc.). +Emitted any time the tree's hierarchy changes (nodes being moved, renamed, etc.). .. rst-class:: classref-item-separator @@ -215,9 +219,9 @@ Emitted whenever the **SceneTree** hierarchy changed (children being moved or re .. rst-class:: classref-signal -**tree_process_mode_changed** **(** **)** +**tree_process_mode_changed**\ (\ ) :ref:`🔗<class_SceneTree_signal_tree_process_mode_changed>` -This signal is only emitted in the editor, it allows the editor to update the visibility of disabled nodes. Emitted whenever any node's :ref:`Node.process_mode<class_Node_property_process_mode>` is changed. +Emitted when the :ref:`Node.process_mode<class_Node_property_process_mode>` of any node inside the tree is changed. Only emitted in the editor, to update the visibility of disabled nodes. .. rst-class:: classref-section-separator @@ -232,7 +236,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **GroupCallFlags**: +enum **GroupCallFlags**: :ref:`🔗<enum_SceneTree_GroupCallFlags>` .. _class_SceneTree_constant_GROUP_CALL_DEFAULT: @@ -240,7 +244,7 @@ enum **GroupCallFlags**: :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>` **GROUP_CALL_DEFAULT** = ``0`` -Call a group with no flags (default). +Call nodes within a group with no special behavior (default). .. _class_SceneTree_constant_GROUP_CALL_REVERSE: @@ -248,7 +252,7 @@ Call a group with no flags (default). :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>` **GROUP_CALL_REVERSE** = ``1`` -Call a group in reverse scene order. +Call nodes within a group in reverse tree hierarchy order (all nested children are called before their respective parent nodes). .. _class_SceneTree_constant_GROUP_CALL_DEFERRED: @@ -256,7 +260,7 @@ Call a group in reverse scene order. :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>` **GROUP_CALL_DEFERRED** = ``2`` -Call a group at the end of the current frame (process or physics). +Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to :ref:`Object.call_deferred<class_Object_method_call_deferred>`. .. _class_SceneTree_constant_GROUP_CALL_UNIQUE: @@ -264,9 +268,9 @@ Call a group at the end of the current frame (process or physics). :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>` **GROUP_CALL_UNIQUE** = ``4`` -Call a group only once even if the call is executed many times. +Call nodes within a group only once, even if the call is executed many times in the same frame. Must be combined with :ref:`GROUP_CALL_DEFERRED<class_SceneTree_constant_GROUP_CALL_DEFERRED>` to work. -\ **Note:** Arguments are not taken into account when deciding whether the call is unique or not. Therefore when the same method is called with different arguments, only the first call will be performed. +\ **Note:** Different arguments are not taken into account. Therefore, when the same call is executed with different arguments, only the first call will be performed. .. rst-class:: classref-section-separator @@ -281,12 +285,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **auto_accept_quit** = ``true`` +:ref:`bool<class_bool>` **auto_accept_quit** = ``true`` :ref:`🔗<class_SceneTree_property_auto_accept_quit>` .. rst-class:: classref-property-setget -- void **set_auto_accept_quit** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_auto_accept_quit** **(** **)** +- |void| **set_auto_accept_quit**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_auto_accept_quit**\ (\ ) If ``true``, the application automatically accepts quitting requests. @@ -300,14 +304,16 @@ For mobile platforms, see :ref:`quit_on_go_back<class_SceneTree_property_quit_on .. rst-class:: classref-property -:ref:`Node<class_Node>` **current_scene** +:ref:`Node<class_Node>` **current_scene** :ref:`🔗<class_SceneTree_property_current_scene>` .. rst-class:: classref-property-setget -- void **set_current_scene** **(** :ref:`Node<class_Node>` value **)** -- :ref:`Node<class_Node>` **get_current_scene** **(** **)** +- |void| **set_current_scene**\ (\ value\: :ref:`Node<class_Node>`\ ) +- :ref:`Node<class_Node>` **get_current_scene**\ (\ ) + +The root node of the currently loaded main scene, usually as a direct child of :ref:`root<class_SceneTree_property_root>`. See also :ref:`change_scene_to_file<class_SceneTree_method_change_scene_to_file>`, :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>`, and :ref:`reload_current_scene<class_SceneTree_method_reload_current_scene>`. -The current scene. +\ **Warning:** Setting this property directly may not work as expected, as it does *not* add or remove any nodes from this tree. .. rst-class:: classref-item-separator @@ -317,12 +323,12 @@ The current scene. .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_collisions_hint** = ``false`` +:ref:`bool<class_bool>` **debug_collisions_hint** = ``false`` :ref:`🔗<class_SceneTree_property_debug_collisions_hint>` .. rst-class:: classref-property-setget -- void **set_debug_collisions_hint** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_debugging_collisions_hint** **(** **)** +- |void| **set_debug_collisions_hint**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_debugging_collisions_hint**\ (\ ) If ``true``, collision shapes will be visible when running the game from the editor for debugging purposes. @@ -336,12 +342,12 @@ If ``true``, collision shapes will be visible when running the game from the edi .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_navigation_hint** = ``false`` +:ref:`bool<class_bool>` **debug_navigation_hint** = ``false`` :ref:`🔗<class_SceneTree_property_debug_navigation_hint>` .. rst-class:: classref-property-setget -- void **set_debug_navigation_hint** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_debugging_navigation_hint** **(** **)** +- |void| **set_debug_navigation_hint**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_debugging_navigation_hint**\ (\ ) If ``true``, navigation polygons will be visible when running the game from the editor for debugging purposes. @@ -355,12 +361,12 @@ If ``true``, navigation polygons will be visible when running the game from the .. rst-class:: classref-property -:ref:`bool<class_bool>` **debug_paths_hint** = ``false`` +:ref:`bool<class_bool>` **debug_paths_hint** = ``false`` :ref:`🔗<class_SceneTree_property_debug_paths_hint>` .. rst-class:: classref-property-setget -- void **set_debug_paths_hint** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_debugging_paths_hint** **(** **)** +- |void| **set_debug_paths_hint**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_debugging_paths_hint**\ (\ ) If ``true``, curves from :ref:`Path2D<class_Path2D>` and :ref:`Path3D<class_Path3D>` nodes will be visible when running the game from the editor for debugging purposes. @@ -374,14 +380,16 @@ If ``true``, curves from :ref:`Path2D<class_Path2D>` and :ref:`Path3D<class_Path .. rst-class:: classref-property -:ref:`Node<class_Node>` **edited_scene_root** +:ref:`Node<class_Node>` **edited_scene_root** :ref:`🔗<class_SceneTree_property_edited_scene_root>` .. rst-class:: classref-property-setget -- void **set_edited_scene_root** **(** :ref:`Node<class_Node>` value **)** -- :ref:`Node<class_Node>` **get_edited_scene_root** **(** **)** +- |void| **set_edited_scene_root**\ (\ value\: :ref:`Node<class_Node>`\ ) +- :ref:`Node<class_Node>` **get_edited_scene_root**\ (\ ) + +The root of the scene currently being edited in the editor. This is usually a direct child of :ref:`root<class_SceneTree_property_root>`. -The root of the edited scene. +\ **Note:** This property does nothing in release builds. .. rst-class:: classref-item-separator @@ -391,12 +399,12 @@ The root of the edited scene. .. rst-class:: classref-property -:ref:`bool<class_bool>` **multiplayer_poll** = ``true`` +:ref:`bool<class_bool>` **multiplayer_poll** = ``true`` :ref:`🔗<class_SceneTree_property_multiplayer_poll>` .. rst-class:: classref-property-setget -- void **set_multiplayer_poll_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_multiplayer_poll_enabled** **(** **)** +- |void| **set_multiplayer_poll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_multiplayer_poll_enabled**\ (\ ) If ``true`` (default value), enables automatic polling of the :ref:`MultiplayerAPI<class_MultiplayerAPI>` for this SceneTree during :ref:`process_frame<class_SceneTree_signal_process_frame>`. @@ -410,18 +418,37 @@ If ``false``, you need to manually call :ref:`MultiplayerAPI.poll<class_Multipla .. rst-class:: classref-property -:ref:`bool<class_bool>` **paused** = ``false`` +:ref:`bool<class_bool>` **paused** = ``false`` :ref:`🔗<class_SceneTree_property_paused>` .. rst-class:: classref-property-setget -- void **set_pause** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_paused** **(** **)** +- |void| **set_pause**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_paused**\ (\ ) + +If ``true``, the scene tree is considered paused. This causes the following behavior: + +- 2D and 3D physics will be stopped, as well as collision detection and related signals. + +- Depending on each node's :ref:`Node.process_mode<class_Node_property_process_mode>`, their :ref:`Node._process<class_Node_private_method__process>`, :ref:`Node._physics_process<class_Node_private_method__physics_process>` and :ref:`Node._input<class_Node_private_method__input>` callback methods may not called anymore. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SceneTree_property_physics_interpolation: -If ``true``, the **SceneTree** is paused. Doing so will have the following behavior: +.. rst-class:: classref-property -- 2D and 3D physics will be stopped. This includes signals and collision detection. +:ref:`bool<class_bool>` **physics_interpolation** = ``false`` :ref:`🔗<class_SceneTree_property_physics_interpolation>` + +.. rst-class:: classref-property-setget -- :ref:`Node._process<class_Node_method__process>`, :ref:`Node._physics_process<class_Node_method__physics_process>` and :ref:`Node._input<class_Node_method__input>` will not be called anymore in nodes. +- |void| **set_physics_interpolation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_physics_interpolation_enabled**\ (\ ) + +If ``true``, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. + +The default value of this property is controlled by :ref:`ProjectSettings.physics/common/physics_interpolation<class_ProjectSettings_property_physics/common/physics_interpolation>`. .. rst-class:: classref-item-separator @@ -431,12 +458,12 @@ If ``true``, the **SceneTree** is paused. Doing so will have the following behav .. rst-class:: classref-property -:ref:`bool<class_bool>` **quit_on_go_back** = ``true`` +:ref:`bool<class_bool>` **quit_on_go_back** = ``true`` :ref:`🔗<class_SceneTree_property_quit_on_go_back>` .. rst-class:: classref-property-setget -- void **set_quit_on_go_back** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_quit_on_go_back** **(** **)** +- |void| **set_quit_on_go_back**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_quit_on_go_back**\ (\ ) If ``true``, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). @@ -450,13 +477,15 @@ To handle 'Go Back' button when this option is disabled, use :ref:`DisplayServer .. rst-class:: classref-property -:ref:`Window<class_Window>` **root** +:ref:`Window<class_Window>` **root** :ref:`🔗<class_SceneTree_property_root>` .. rst-class:: classref-property-setget -- :ref:`Window<class_Window>` **get_root** **(** **)** +- :ref:`Window<class_Window>` **get_root**\ (\ ) -The **SceneTree**'s root :ref:`Window<class_Window>`. +The tree's root :ref:`Window<class_Window>`. This is top-most :ref:`Node<class_Node>` of the scene tree, and is always present. An absolute :ref:`NodePath<class_NodePath>` always starts from this node. Children of the root node may include the loaded :ref:`current_scene<class_SceneTree_property_current_scene>`, as well as any :doc:`AutoLoad <../tutorials/scripting/singletons_autoload>` configured in the Project Settings. + +\ **Warning:** Do not delete this node. This will result in unstable behavior, followed by a crash. .. rst-class:: classref-section-separator @@ -471,11 +500,13 @@ Method Descriptions .. rst-class:: classref-method -void **call_group** **(** :ref:`StringName<class_StringName>` group, :ref:`StringName<class_StringName>` method, ... **)** |vararg| +|void| **call_group**\ (\ group\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_SceneTree_method_call_group>` + +Calls ``method`` on each node inside this tree added to the given ``group``. You can pass arguments to ``method`` by specifying them at the end of this method call. Nodes that cannot call ``method`` (either because the method doesn't exist or the arguments do not match) are ignored. See also :ref:`set_group<class_SceneTree_method_set_group>` and :ref:`notify_group<class_SceneTree_method_notify_group>`. -Calls ``method`` on each member of the given group. You can pass arguments to ``method`` by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. +\ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. -\ **Note:** :ref:`call_group<class_SceneTree_method_call_group>` will call methods immediately on all members at once, which can cause stuttering if an expensive method is called on lots of members. +\ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call. .. rst-class:: classref-item-separator @@ -485,16 +516,18 @@ Calls ``method`` on each member of the given group. You can pass arguments to `` .. rst-class:: classref-method -void **call_group_flags** **(** :ref:`int<class_int>` flags, :ref:`StringName<class_StringName>` group, :ref:`StringName<class_StringName>` method, ... **)** |vararg| +|void| **call_group_flags**\ (\ flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_SceneTree_method_call_group_flags>` -Calls ``method`` on each member of the given group, respecting the given :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`. You can pass arguments to ``method`` by specifying them at the end of the method call. If a node doesn't have the given method or the argument list does not match (either in count or in types), it will be skipped. +Calls the given ``method`` on each node inside this tree added to the given ``group``. Use ``flags`` to customize this method's behavior (see :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`). Additional arguments for ``method`` can be passed at the end of this method. Nodes that cannot call ``method`` (either because the method doesn't exist or the arguments do not match) are ignored. :: - # Call the method in a deferred manner and in reverse order. - get_tree().call_group_flags(SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE) + # Calls "hide" to all nodes of the "enemies" group, at the end of the frame and in reverse tree order. + get_tree().call_group_flags( + SceneTree.GROUP_CALL_DEFERRED | SceneTree.GROUP_CALL_REVERSE, + "enemies", "hide") -\ **Note:** Group call flags are used to control the method calling behavior. By default, methods will be called immediately in a way similar to :ref:`call_group<class_SceneTree_method_call_group>`. However, if the :ref:`GROUP_CALL_DEFERRED<class_SceneTree_constant_GROUP_CALL_DEFERRED>` flag is present in the ``flags`` argument, methods will be called at the end of the frame in a way similar to :ref:`Object.set_deferred<class_Object_method_set_deferred>`. +\ **Note:** In C#, ``method`` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the ``MethodName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call. .. rst-class:: classref-item-separator @@ -504,13 +537,13 @@ Calls ``method`` on each member of the given group, respecting the given :ref:`G .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **change_scene_to_file** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **change_scene_to_file**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_SceneTree_method_change_scene_to_file>` Changes the running scene to the one at the given ``path``, after loading it into a :ref:`PackedScene<class_PackedScene>` and creating a new instance. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref:`@GlobalScope.ERR_CANT_OPEN<class_@GlobalScope_constant_ERR_CANT_OPEN>` if the ``path`` cannot be loaded into a :ref:`PackedScene<class_PackedScene>`, or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if that scene cannot be instantiated. -\ **Note:** The scene change is deferred, which means that the new scene node is added to the tree at the end of the frame. This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free<class_Node_method_queue_free>`. As such, you won't be able to access the loaded scene immediately after the :ref:`change_scene_to_file<class_SceneTree_method_change_scene_to_file>` call. +\ **Note:** See :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>` for details on the order of operations. .. rst-class:: classref-item-separator @@ -520,13 +553,19 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **change_scene_to_packed** **(** :ref:`PackedScene<class_PackedScene>` packed_scene **)** +:ref:`Error<enum_@GlobalScope_Error>` **change_scene_to_packed**\ (\ packed_scene\: :ref:`PackedScene<class_PackedScene>`\ ) :ref:`🔗<class_SceneTree_method_change_scene_to_packed>` Changes the running scene to a new instance of the given :ref:`PackedScene<class_PackedScene>` (which must be valid). Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if the scene cannot be instantiated, or :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if the scene is invalid. -\ **Note:** The scene change is deferred, which means that the new scene node is added to the tree at the end of the frame. You won't be able to access it immediately after the :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>` call. +\ **Note:** Operations happen in the following order when :ref:`change_scene_to_packed<class_SceneTree_method_change_scene_to_packed>` is called: + +1. The current scene node is immediately removed from the tree. From that point, :ref:`Node.get_tree<class_Node_method_get_tree>` called on the current (outgoing) scene will return ``null``. :ref:`current_scene<class_SceneTree_property_current_scene>` will be ``null``, too, because the new scene is not available yet. + +2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. :ref:`Node.get_tree<class_Node_method_get_tree>` and :ref:`current_scene<class_SceneTree_property_current_scene>` will be back to working as usual. + +This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free<class_Node_method_queue_free>`. .. rst-class:: classref-item-separator @@ -536,17 +575,17 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref: .. rst-class:: classref-method -:ref:`SceneTreeTimer<class_SceneTreeTimer>` **create_timer** **(** :ref:`float<class_float>` time_sec, :ref:`bool<class_bool>` process_always=true, :ref:`bool<class_bool>` process_in_physics=false, :ref:`bool<class_bool>` ignore_time_scale=false **)** +:ref:`SceneTreeTimer<class_SceneTreeTimer>` **create_timer**\ (\ time_sec\: :ref:`float<class_float>`, process_always\: :ref:`bool<class_bool>` = true, process_in_physics\: :ref:`bool<class_bool>` = false, ignore_time_scale\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_SceneTree_method_create_timer>` -Returns a :ref:`SceneTreeTimer<class_SceneTreeTimer>` which will emit :ref:`SceneTreeTimer.timeout<class_SceneTreeTimer_signal_timeout>` after the given time in seconds elapsed in this **SceneTree**. +Returns a new :ref:`SceneTreeTimer<class_SceneTreeTimer>`. After ``time_sec`` in seconds have passed, the timer will emit :ref:`SceneTreeTimer.timeout<class_SceneTreeTimer_signal_timeout>` and will be automatically freed. -If ``process_always`` is set to ``false``, pausing the **SceneTree** will also pause the timer. +If ``process_always`` is ``false``, the timer will be paused when setting :ref:`paused<class_SceneTree_property_paused>` to ``true``. -If ``process_in_physics`` is set to ``true``, will update the :ref:`SceneTreeTimer<class_SceneTreeTimer>` during the physics frame instead of the process frame (fixed framerate processing). +If ``process_in_physics`` is ``true``, the timer will update at the end of the physics frame, instead of the process frame. -If ``ignore_time_scale`` is set to ``true``, will ignore :ref:`Engine.time_scale<class_Engine_property_time_scale>` and update the :ref:`SceneTreeTimer<class_SceneTreeTimer>` with the actual frame delta. +If ``ignore_time_scale`` is ``true``, the timer will ignore :ref:`Engine.time_scale<class_Engine_property_time_scale>` and update with the real, elapsed time. -Commonly used to create a one-shot delay timer as in the following example: +This method is commonly used to create a one-shot delay timer, as in the following example: .. tabs:: @@ -569,9 +608,7 @@ Commonly used to create a one-shot delay timer as in the following example: -The timer will be automatically freed after its time elapses. - -\ **Note:** The timer is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process<class_Node_method__process>` method would be called before the timer (or :ref:`Node._physics_process<class_Node_method__physics_process>` if ``process_in_physics`` is set to ``true``). +\ **Note:** The timer is always updated *after* all of the nodes in the tree. A node's :ref:`Node._process<class_Node_private_method__process>` method would be called before the timer updates (or :ref:`Node._physics_process<class_Node_private_method__physics_process>` if ``process_in_physics`` is set to ``true``). .. rst-class:: classref-item-separator @@ -581,9 +618,11 @@ The timer will be automatically freed after its time elapses. .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **create_tween** **(** **)** +:ref:`Tween<class_Tween>` **create_tween**\ (\ ) :ref:`🔗<class_SceneTree_method_create_tween>` + +Creates and returns a new :ref:`Tween<class_Tween>` processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`). -Creates and returns a new :ref:`Tween<class_Tween>`. The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`). +\ **Note:** A :ref:`Tween<class_Tween>` created using this method is not bound to any :ref:`Node<class_Node>`. It may keep working until there is nothing left to animate. If you want the :ref:`Tween<class_Tween>` to be automatically killed when the :ref:`Node<class_Node>` is freed, use :ref:`Node.create_tween<class_Node_method_create_tween>` or :ref:`Tween.bind_node<class_Tween_method_bind_node>`. .. rst-class:: classref-item-separator @@ -593,9 +632,9 @@ Creates and returns a new :ref:`Tween<class_Tween>`. The Tween will start automa .. rst-class:: classref-method -:ref:`Node<class_Node>` **get_first_node_in_group** **(** :ref:`StringName<class_StringName>` group **)** +:ref:`Node<class_Node>` **get_first_node_in_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SceneTree_method_get_first_node_in_group>` -Returns the first node in the specified group, or ``null`` if the group is empty or does not exist. +Returns the first :ref:`Node<class_Node>` found inside the tree, that has been added to the given ``group``, in scene hierarchy order. Returns ``null`` if no match is found. See also :ref:`get_nodes_in_group<class_SceneTree_method_get_nodes_in_group>`. .. rst-class:: classref-item-separator @@ -605,9 +644,9 @@ Returns the first node in the specified group, or ``null`` if the group is empty .. rst-class:: classref-method -:ref:`int<class_int>` **get_frame** **(** **)** |const| +:ref:`int<class_int>` **get_frame**\ (\ ) |const| :ref:`🔗<class_SceneTree_method_get_frame>` -Returns the current frame number, i.e. the total frame count since the application started. +Returns how many frames have been processed, since the application started. This is *not* a measurement of elapsed time. .. rst-class:: classref-item-separator @@ -617,11 +656,9 @@ Returns the current frame number, i.e. the total frame count since the applicati .. rst-class:: classref-method -:ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer** **(** :ref:`NodePath<class_NodePath>` for_path=NodePath("") **)** |const| +:ref:`MultiplayerAPI<class_MultiplayerAPI>` **get_multiplayer**\ (\ for_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) |const| :ref:`🔗<class_SceneTree_method_get_multiplayer>` -Return the :ref:`MultiplayerAPI<class_MultiplayerAPI>` configured for the given path, or the default one if ``for_path`` is empty. - -\ **Note:** Only one :ref:`MultiplayerAPI<class_MultiplayerAPI>` may be configured for any subpath. If one is configured for ``"/root/Foo"`` then calling this for ``"/root/Foo/Bar"`` will return the one configured for ``"/root/Foo"``, regardless if one is configured for that path. +Searches for the :ref:`MultiplayerAPI<class_MultiplayerAPI>` configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See :ref:`set_multiplayer<class_SceneTree_method_set_multiplayer>`. .. rst-class:: classref-item-separator @@ -631,9 +668,21 @@ Return the :ref:`MultiplayerAPI<class_MultiplayerAPI>` configured for the given .. rst-class:: classref-method -:ref:`int<class_int>` **get_node_count** **(** **)** |const| +:ref:`int<class_int>` **get_node_count**\ (\ ) |const| :ref:`🔗<class_SceneTree_method_get_node_count>` + +Returns the number of nodes inside this tree. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SceneTree_method_get_node_count_in_group: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_node_count_in_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SceneTree_method_get_node_count_in_group>` -Returns the number of nodes in this **SceneTree**. +Returns the number of nodes assigned to the given group. .. rst-class:: classref-item-separator @@ -643,9 +692,9 @@ Returns the number of nodes in this **SceneTree**. .. rst-class:: classref-method -:ref:`Node[]<class_Node>` **get_nodes_in_group** **(** :ref:`StringName<class_StringName>` group **)** +:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_nodes_in_group**\ (\ group\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SceneTree_method_get_nodes_in_group>` -Returns a list of all nodes assigned to the given group. +Returns an :ref:`Array<class_Array>` containing all nodes inside this tree, that have been added to the given ``group``, in scene hierarchy order. .. rst-class:: classref-item-separator @@ -655,9 +704,9 @@ Returns a list of all nodes assigned to the given group. .. rst-class:: classref-method -:ref:`Tween[]<class_Tween>` **get_processed_tweens** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Tween<class_Tween>`\] **get_processed_tweens**\ (\ ) :ref:`🔗<class_SceneTree_method_get_processed_tweens>` -Returns an array of currently existing :ref:`Tween<class_Tween>`\ s in the **SceneTree** (both running and paused). +Returns an :ref:`Array<class_Array>` of currently existing :ref:`Tween<class_Tween>`\ s in the tree, including paused tweens. .. rst-class:: classref-item-separator @@ -667,9 +716,9 @@ Returns an array of currently existing :ref:`Tween<class_Tween>`\ s in the **Sce .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_group** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_group**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SceneTree_method_has_group>` -Returns ``true`` if the given group exists. +Returns ``true`` if a node added to the given group ``name`` exists in the tree. .. rst-class:: classref-item-separator @@ -679,11 +728,11 @@ Returns ``true`` if the given group exists. .. rst-class:: classref-method -void **notify_group** **(** :ref:`StringName<class_StringName>` group, :ref:`int<class_int>` notification **)** +|void| **notify_group**\ (\ group\: :ref:`StringName<class_StringName>`, notification\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneTree_method_notify_group>` -Sends the given notification to all members of the ``group``. +Calls :ref:`Object.notification<class_Object_method_notification>` with the given ``notification`` to all nodes inside this tree added to the ``group``. See also :ref:`call_group<class_SceneTree_method_call_group>` and :ref:`set_group<class_SceneTree_method_set_group>`. -\ **Note:** :ref:`notify_group<class_SceneTree_method_notify_group>` will immediately notify all members at once, which can cause stuttering if an expensive method is called as a result of sending the notification to lots of members. +\ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. .. rst-class:: classref-item-separator @@ -693,11 +742,9 @@ Sends the given notification to all members of the ``group``. .. rst-class:: classref-method -void **notify_group_flags** **(** :ref:`int<class_int>` call_flags, :ref:`StringName<class_StringName>` group, :ref:`int<class_int>` notification **)** - -Sends the given notification to all members of the ``group``, respecting the given :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`. +|void| **notify_group_flags**\ (\ call_flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, notification\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SceneTree_method_notify_group_flags>` -\ **Note:** Group call flags are used to control the notification sending behavior. By default, notifications will be sent immediately in a way similar to :ref:`notify_group<class_SceneTree_method_notify_group>`. However, if the :ref:`GROUP_CALL_DEFERRED<class_SceneTree_constant_GROUP_CALL_DEFERRED>` flag is present in the ``call_flags`` argument, notifications will be sent at the end of the current frame in a way similar to using ``Object.call_deferred("notification", ...)``. +Calls :ref:`Object.notification<class_Object_method_notification>` with the given ``notification`` to all nodes inside this tree added to the ``group``. Use ``call_flags`` to customize this method's behavior (see :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`). .. rst-class:: classref-item-separator @@ -707,9 +754,9 @@ Sends the given notification to all members of the ``group``, respecting the giv .. rst-class:: classref-method -void **queue_delete** **(** :ref:`Object<class_Object>` obj **)** +|void| **queue_delete**\ (\ obj\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_SceneTree_method_queue_delete>` -Queues the given object for deletion, delaying the call to :ref:`Object.free<class_Object_method_free>` to the end of the current frame. +Queues the given ``obj`` to be deleted, calling its :ref:`Object.free<class_Object_method_free>` at the end of the current frame. This method is similar to :ref:`Node.queue_free<class_Node_method_queue_free>`. .. rst-class:: classref-item-separator @@ -719,15 +766,13 @@ Queues the given object for deletion, delaying the call to :ref:`Object.free<cla .. rst-class:: classref-method -void **quit** **(** :ref:`int<class_int>` exit_code=0 **)** +|void| **quit**\ (\ exit_code\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_SceneTree_method_quit>` -Quits the application at the end of the current iteration. Argument ``exit_code`` can optionally be given (defaulting to 0) to customize the exit status code. +Quits the application at the end of the current iteration, with the given ``exit_code``. -By convention, an exit code of ``0`` indicates success whereas a non-zero exit code indicates an error. +By convention, an exit code of ``0`` indicates success, whereas any other exit code indicates an error. For portability reasons, it should be between ``0`` and ``125`` (inclusive). -For portability reasons, the exit code should be set between 0 and 125 (inclusive). - -\ **Note:** On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button. +\ **Note:** On iOS this method doesn't work. Instead, as recommended by the `iOS Human Interface Guidelines <https://developer.apple.com/library/archive/qa/qa1561/_index.html>`__, the user is expected to close apps via the Home button. .. rst-class:: classref-item-separator @@ -737,11 +782,11 @@ For portability reasons, the exit code should be set between 0 and 125 (inclusiv .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **reload_current_scene** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **reload_current_scene**\ (\ ) :ref:`🔗<class_SceneTree_method_reload_current_scene>` -Reloads the currently active scene. +Reloads the currently active scene, replacing :ref:`current_scene<class_SceneTree_property_current_scene>` with a new instance of its original :ref:`PackedScene<class_PackedScene>`. -Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if no :ref:`current_scene<class_SceneTree_property_current_scene>` was defined yet, :ref:`@GlobalScope.ERR_CANT_OPEN<class_@GlobalScope_constant_ERR_CANT_OPEN>` if :ref:`current_scene<class_SceneTree_property_current_scene>` cannot be loaded into a :ref:`PackedScene<class_PackedScene>`, or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if the scene cannot be instantiated. +Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref:`@GlobalScope.ERR_UNCONFIGURED<class_@GlobalScope_constant_ERR_UNCONFIGURED>` if no :ref:`current_scene<class_SceneTree_property_current_scene>` is defined, :ref:`@GlobalScope.ERR_CANT_OPEN<class_@GlobalScope_constant_ERR_CANT_OPEN>` if :ref:`current_scene<class_SceneTree_property_current_scene>` cannot be loaded into a :ref:`PackedScene<class_PackedScene>`, or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>` if the scene cannot be instantiated. .. rst-class:: classref-item-separator @@ -751,11 +796,13 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, :ref: .. rst-class:: classref-method -void **set_group** **(** :ref:`StringName<class_StringName>` group, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set_group**\ (\ group\: :ref:`StringName<class_StringName>`, property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_SceneTree_method_set_group>` + +Sets the given ``property`` to ``value`` on all nodes inside this tree added to the given ``group``. Nodes that do not have the ``property`` are ignored. See also :ref:`call_group<class_SceneTree_method_call_group>` and :ref:`notify_group<class_SceneTree_method_notify_group>`. -Sets the given ``property`` to ``value`` on all members of the given group. +\ **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. -\ **Note:** :ref:`set_group<class_SceneTree_method_set_group>` will set the property immediately on all members at once, which can cause stuttering if a property with an expensive setter is set on lots of members. +\ **Note:** In C#, ``property`` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the ``PropertyName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call. .. rst-class:: classref-item-separator @@ -765,11 +812,11 @@ Sets the given ``property`` to ``value`` on all members of the given group. .. rst-class:: classref-method -void **set_group_flags** **(** :ref:`int<class_int>` call_flags, :ref:`StringName<class_StringName>` group, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)** +|void| **set_group_flags**\ (\ call_flags\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`, property\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_SceneTree_method_set_group_flags>` -Sets the given ``property`` to ``value`` on all members of the given group, respecting the given :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`. +Sets the given ``property`` to ``value`` on all nodes inside this tree added to the given ``group``. Nodes that do not have the ``property`` are ignored. Use ``call_flags`` to customize this method's behavior (see :ref:`GroupCallFlags<enum_SceneTree_GroupCallFlags>`). -\ **Note:** Group call flags are used to control the property setting behavior. By default, properties will be set immediately in a way similar to :ref:`set_group<class_SceneTree_method_set_group>`. However, if the :ref:`GROUP_CALL_DEFERRED<class_SceneTree_constant_GROUP_CALL_DEFERRED>` flag is present in the ``call_flags`` argument, properties will be set at the end of the frame in a way similar to :ref:`Object.call_deferred<class_Object_method_call_deferred>`. +\ **Note:** In C#, ``property`` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the ``PropertyName`` class to avoid allocating a new :ref:`StringName<class_StringName>` on each call. .. rst-class:: classref-item-separator @@ -779,11 +826,11 @@ Sets the given ``property`` to ``value`` on all members of the given group, resp .. rst-class:: classref-method -void **set_multiplayer** **(** :ref:`MultiplayerAPI<class_MultiplayerAPI>` multiplayer, :ref:`NodePath<class_NodePath>` root_path=NodePath("") **)** +|void| **set_multiplayer**\ (\ multiplayer\: :ref:`MultiplayerAPI<class_MultiplayerAPI>`, root_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) :ref:`🔗<class_SceneTree_method_set_multiplayer>` Sets a custom :ref:`MultiplayerAPI<class_MultiplayerAPI>` with the given ``root_path`` (controlling also the relative subpaths), or override the default one if ``root_path`` is empty. -\ **Note:** Only one :ref:`MultiplayerAPI<class_MultiplayerAPI>` may be configured for any subpath. If one is configured for ``"/root/Foo"`` setting one for ``"/root/Foo/Bar"`` will be ignored. See :ref:`get_multiplayer<class_SceneTree_method_get_multiplayer>`. +\ **Note:** No :ref:`MultiplayerAPI<class_MultiplayerAPI>` must be configured for the subpath containing ``root_path``, nested custom multiplayers are not allowed. I.e. if one is configured for ``"/root/Foo"`` setting one for ``"/root/Foo/Bar"`` will cause an error. .. rst-class:: classref-item-separator @@ -793,7 +840,7 @@ Sets a custom :ref:`MultiplayerAPI<class_MultiplayerAPI>` with the given ``root_ .. rst-class:: classref-method -void **unload_current_scene** **(** **)** +|void| **unload_current_scene**\ (\ ) :ref:`🔗<class_SceneTree_method_unload_current_scene>` If a current scene is loaded, calling this method will unload it. @@ -804,3 +851,4 @@ If a current scene is loaded, calling this method will unload it. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scenetreetimer.rst b/classes/class_scenetreetimer.rst index f0ad4101c19..356e38dc75a 100644 --- a/classes/class_scenetreetimer.rst +++ b/classes/class_scenetreetimer.rst @@ -46,7 +46,7 @@ As opposed to :ref:`Timer<class_Timer>`, it does not require the instantiation o The timer will be dereferenced after its time elapses. To preserve the timer, you can keep a reference to it. See :ref:`RefCounted<class_RefCounted>`. -\ **Note:** The timer is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process<class_Node_method__process>` method would be called before the timer (or :ref:`Node._physics_process<class_Node_method__physics_process>` if ``process_in_physics`` in :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` has been set to ``true``). +\ **Note:** The timer is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process<class_Node_private_method__process>` method would be called before the timer (or :ref:`Node._physics_process<class_Node_private_method__physics_process>` if ``process_in_physics`` in :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>` has been set to ``true``). .. rst-class:: classref-reftable-group @@ -73,7 +73,7 @@ Signals .. rst-class:: classref-signal -**timeout** **(** **)** +**timeout**\ (\ ) :ref:`🔗<class_SceneTreeTimer_signal_timeout>` Emitted when the timer reaches 0. @@ -90,12 +90,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **time_left** +:ref:`float<class_float>` **time_left** :ref:`🔗<class_SceneTreeTimer_property_time_left>` .. rst-class:: classref-property-setget -- void **set_time_left** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_time_left** **(** **)** +- |void| **set_time_left**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_time_left**\ (\ ) The time remaining (in seconds). @@ -106,3 +106,4 @@ The time remaining (in seconds). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_script.rst b/classes/class_script.rst index 86ed908e84d..e65cc33bc26 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -54,33 +54,37 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_instantiate<class_Script_method_can_instantiate>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script<class_Script>` | :ref:`get_base_script<class_Script_method_get_base_script>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_instance_base_type<class_Script_method_get_instance_base_type>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_property_default_value<class_Script_method_get_property_default_value>` **(** :ref:`StringName<class_StringName>` property **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_script_constant_map<class_Script_method_get_script_constant_map>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_script_method_list<class_Script_method_get_script_method_list>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_script_property_list<class_Script_method_get_script_property_list>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_script_signal_list<class_Script_method_get_script_signal_list>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_script_signal<class_Script_method_has_script_signal>` **(** :ref:`StringName<class_StringName>` signal_name **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_source_code<class_Script_method_has_source_code>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`instance_has<class_Script_method_instance_has>` **(** :ref:`Object<class_Object>` base_object **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_tool<class_Script_method_is_tool>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`reload<class_Script_method_reload>` **(** :ref:`bool<class_bool>` keep_state=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_instantiate<class_Script_method_can_instantiate>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script<class_Script>` | :ref:`get_base_script<class_Script_method_get_base_script>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_global_name<class_Script_method_get_global_name>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_instance_base_type<class_Script_method_get_instance_base_type>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_property_default_value<class_Script_method_get_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_script_constant_map<class_Script_method_get_script_constant_map>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_script_method_list<class_Script_method_get_script_method_list>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_script_property_list<class_Script_method_get_script_property_list>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_script_signal_list<class_Script_method_get_script_signal_list>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_script_signal<class_Script_method_has_script_signal>`\ (\ signal_name\: :ref:`StringName<class_StringName>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_source_code<class_Script_method_has_source_code>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`instance_has<class_Script_method_instance_has>`\ (\ base_object\: :ref:`Object<class_Object>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_abstract<class_Script_method_is_abstract>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_tool<class_Script_method_is_tool>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`reload<class_Script_method_reload>`\ (\ keep_state\: :ref:`bool<class_bool>` = false\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -95,12 +99,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **source_code** +:ref:`String<class_String>` **source_code** :ref:`🔗<class_Script_property_source_code>` .. rst-class:: classref-property-setget -- void **set_source_code** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_source_code** **(** **)** +- |void| **set_source_code**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_source_code**\ (\ ) The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically. @@ -117,7 +121,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_instantiate** **(** **)** |const| +:ref:`bool<class_bool>` **can_instantiate**\ (\ ) |const| :ref:`🔗<class_Script_method_can_instantiate>` Returns ``true`` if the script can be instantiated. @@ -129,10 +133,43 @@ Returns ``true`` if the script can be instantiated. .. rst-class:: classref-method -:ref:`Script<class_Script>` **get_base_script** **(** **)** |const| +:ref:`Script<class_Script>` **get_base_script**\ (\ ) |const| :ref:`🔗<class_Script_method_get_base_script>` Returns the script directly inherited by this script. +.. rst-class:: classref-item-separator + +---- + +.. _class_Script_method_get_global_name: + +.. rst-class:: classref-method + +:ref:`StringName<class_StringName>` **get_global_name**\ (\ ) |const| :ref:`🔗<class_Script_method_get_global_name>` + +Returns the class name associated with the script, if there is one. Returns an empty string otherwise. + +To give the script a global name, you can use the ``class_name`` keyword in GDScript and the ``[GlobalClass]`` attribute in C#. + + +.. tabs:: + + .. code-tab:: gdscript + + class_name MyNode + extends Node + + .. code-tab:: csharp + + using Godot; + + [GlobalClass] + public partial class MyNode : Node + { + } + + + .. rst-class:: classref-item-separator ---- @@ -141,7 +178,7 @@ Returns the script directly inherited by this script. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_instance_base_type** **(** **)** |const| +:ref:`StringName<class_StringName>` **get_instance_base_type**\ (\ ) |const| :ref:`🔗<class_Script_method_get_instance_base_type>` Returns the script's base type. @@ -153,7 +190,7 @@ Returns the script's base type. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_property_default_value** **(** :ref:`StringName<class_StringName>` property **)** +:ref:`Variant<class_Variant>` **get_property_default_value**\ (\ property\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Script_method_get_property_default_value>` Returns the default value of the specified property. @@ -165,7 +202,7 @@ Returns the default value of the specified property. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_script_constant_map** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_script_constant_map**\ (\ ) :ref:`🔗<class_Script_method_get_script_constant_map>` Returns a dictionary containing constant names and their values. @@ -177,7 +214,7 @@ Returns a dictionary containing constant names and their values. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_script_method_list** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_script_method_list**\ (\ ) :ref:`🔗<class_Script_method_get_script_method_list>` Returns the list of methods in this **Script**. @@ -189,7 +226,7 @@ Returns the list of methods in this **Script**. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_script_property_list** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_script_property_list**\ (\ ) :ref:`🔗<class_Script_method_get_script_property_list>` Returns the list of properties in this **Script**. @@ -201,7 +238,7 @@ Returns the list of properties in this **Script**. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_script_signal_list** **(** **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_script_signal_list**\ (\ ) :ref:`🔗<class_Script_method_get_script_signal_list>` Returns the list of user signals defined in this **Script**. @@ -213,7 +250,7 @@ Returns the list of user signals defined in this **Script**. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_script_signal** **(** :ref:`StringName<class_StringName>` signal_name **)** |const| +:ref:`bool<class_bool>` **has_script_signal**\ (\ signal_name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Script_method_has_script_signal>` Returns ``true`` if the script, or a base class, defines a signal with the given name. @@ -225,7 +262,7 @@ Returns ``true`` if the script, or a base class, defines a signal with the given .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_source_code** **(** **)** |const| +:ref:`bool<class_bool>` **has_source_code**\ (\ ) |const| :ref:`🔗<class_Script_method_has_source_code>` Returns ``true`` if the script contains non-empty source code. @@ -237,7 +274,7 @@ Returns ``true`` if the script contains non-empty source code. .. rst-class:: classref-method -:ref:`bool<class_bool>` **instance_has** **(** :ref:`Object<class_Object>` base_object **)** |const| +:ref:`bool<class_bool>` **instance_has**\ (\ base_object\: :ref:`Object<class_Object>`\ ) |const| :ref:`🔗<class_Script_method_instance_has>` Returns ``true`` if ``base_object`` is an instance of this script. @@ -245,11 +282,23 @@ Returns ``true`` if ``base_object`` is an instance of this script. ---- +.. _class_Script_method_is_abstract: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_abstract**\ (\ ) |const| :ref:`🔗<class_Script_method_is_abstract>` + +Returns ``true`` if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated. + +.. rst-class:: classref-item-separator + +---- + .. _class_Script_method_is_tool: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_tool** **(** **)** |const| +:ref:`bool<class_bool>` **is_tool**\ (\ ) |const| :ref:`🔗<class_Script_method_is_tool>` Returns ``true`` if the script is a tool script. A tool script can run in the editor. @@ -261,7 +310,7 @@ Returns ``true`` if the script is a tool script. A tool script can run in the ed .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **reload** **(** :ref:`bool<class_bool>` keep_state=false **)** +:ref:`Error<enum_@GlobalScope_Error>` **reload**\ (\ keep_state\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Script_method_reload>` Reloads the script's class implementation. Returns an error code. @@ -272,3 +321,4 @@ Reloads the script's class implementation. Returns an error code. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scriptcreatedialog.rst b/classes/class_scriptcreatedialog.rst index 68880c39dae..fb1a0e45e84 100644 --- a/classes/class_scriptcreatedialog.rst +++ b/classes/class_scriptcreatedialog.rst @@ -68,9 +68,9 @@ Methods .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`config<class_ScriptCreateDialog_method_config>` **(** :ref:`String<class_String>` inherits, :ref:`String<class_String>` path, :ref:`bool<class_bool>` built_in_enabled=true, :ref:`bool<class_bool>` load_enabled=true **)** | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`config<class_ScriptCreateDialog_method_config>`\ (\ inherits\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, built_in_enabled\: :ref:`bool<class_bool>` = true, load_enabled\: :ref:`bool<class_bool>` = true\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -85,7 +85,7 @@ Signals .. rst-class:: classref-signal -**script_created** **(** :ref:`Script<class_Script>` script **)** +**script_created**\ (\ script\: :ref:`Script<class_Script>`\ ) :ref:`🔗<class_ScriptCreateDialog_signal_script_created>` Emitted when the user clicks the OK button. @@ -102,7 +102,7 @@ Method Descriptions .. rst-class:: classref-method -void **config** **(** :ref:`String<class_String>` inherits, :ref:`String<class_String>` path, :ref:`bool<class_bool>` built_in_enabled=true, :ref:`bool<class_bool>` load_enabled=true **)** +|void| **config**\ (\ inherits\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, built_in_enabled\: :ref:`bool<class_bool>` = true, load_enabled\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_ScriptCreateDialog_method_config>` Prefills required fields to configure the ScriptCreateDialog for use. @@ -113,3 +113,4 @@ Prefills required fields to configure the ScriptCreateDialog for use. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scripteditor.rst b/classes/class_scripteditor.rst index 164f44009fa..f7963518b6d 100644 --- a/classes/class_scripteditor.rst +++ b/classes/class_scripteditor.rst @@ -31,23 +31,25 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditorBase<class_ScriptEditorBase>` | :ref:`get_current_editor<class_ScriptEditor_method_get_current_editor>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script<class_Script>` | :ref:`get_current_script<class_ScriptEditor_method_get_current_script>` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditorBase[]<class_ScriptEditorBase>` | :ref:`get_open_script_editors<class_ScriptEditor_method_get_open_script_editors>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script[]<class_Script>` | :ref:`get_open_scripts<class_ScriptEditor_method_get_open_scripts>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`goto_line<class_ScriptEditor_method_goto_line>` **(** :ref:`int<class_int>` line_number **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`open_script_create_dialog<class_ScriptEditor_method_open_script_create_dialog>` **(** :ref:`String<class_String>` base_name, :ref:`String<class_String>` base_path **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_syntax_highlighter<class_ScriptEditor_method_register_syntax_highlighter>` **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` syntax_highlighter **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unregister_syntax_highlighter<class_ScriptEditor_method_unregister_syntax_highlighter>` **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` syntax_highlighter **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditorBase<class_ScriptEditorBase>` | :ref:`get_current_editor<class_ScriptEditor_method_get_current_editor>`\ (\ ) |const| | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script<class_Script>` | :ref:`get_current_script<class_ScriptEditor_method_get_current_script>`\ (\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`ScriptEditorBase<class_ScriptEditorBase>`\] | :ref:`get_open_script_editors<class_ScriptEditor_method_get_open_script_editors>`\ (\ ) |const| | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Script<class_Script>`\] | :ref:`get_open_scripts<class_ScriptEditor_method_get_open_scripts>`\ (\ ) |const| | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`goto_help<class_ScriptEditor_method_goto_help>`\ (\ topic\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`goto_line<class_ScriptEditor_method_goto_line>`\ (\ line_number\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_script_create_dialog<class_ScriptEditor_method_open_script_create_dialog>`\ (\ base_name\: :ref:`String<class_String>`, base_path\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_syntax_highlighter<class_ScriptEditor_method_register_syntax_highlighter>`\ (\ syntax_highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_syntax_highlighter<class_ScriptEditor_method_unregister_syntax_highlighter>`\ (\ syntax_highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) | + +------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,7 +64,7 @@ Signals .. rst-class:: classref-signal -**editor_script_changed** **(** :ref:`Script<class_Script>` script **)** +**editor_script_changed**\ (\ script\: :ref:`Script<class_Script>`\ ) :ref:`🔗<class_ScriptEditor_signal_editor_script_changed>` Emitted when user changed active script. Argument is a freshly activated :ref:`Script<class_Script>`. @@ -74,7 +76,7 @@ Emitted when user changed active script. Argument is a freshly activated :ref:`S .. rst-class:: classref-signal -**script_close** **(** :ref:`Script<class_Script>` script **)** +**script_close**\ (\ script\: :ref:`Script<class_Script>`\ ) :ref:`🔗<class_ScriptEditor_signal_script_close>` Emitted when editor is about to close the active script. Argument is a :ref:`Script<class_Script>` that is going to be closed. @@ -91,7 +93,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`ScriptEditorBase<class_ScriptEditorBase>` **get_current_editor** **(** **)** |const| +:ref:`ScriptEditorBase<class_ScriptEditorBase>` **get_current_editor**\ (\ ) |const| :ref:`🔗<class_ScriptEditor_method_get_current_editor>` Returns the :ref:`ScriptEditorBase<class_ScriptEditorBase>` object that the user is currently editing. @@ -103,7 +105,7 @@ Returns the :ref:`ScriptEditorBase<class_ScriptEditorBase>` object that the user .. rst-class:: classref-method -:ref:`Script<class_Script>` **get_current_script** **(** **)** +:ref:`Script<class_Script>` **get_current_script**\ (\ ) :ref:`🔗<class_ScriptEditor_method_get_current_script>` Returns a :ref:`Script<class_Script>` that is currently active in editor. @@ -115,7 +117,7 @@ Returns a :ref:`Script<class_Script>` that is currently active in editor. .. rst-class:: classref-method -:ref:`ScriptEditorBase[]<class_ScriptEditorBase>` **get_open_script_editors** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`ScriptEditorBase<class_ScriptEditorBase>`\] **get_open_script_editors**\ (\ ) |const| :ref:`🔗<class_ScriptEditor_method_get_open_script_editors>` Returns an array with all :ref:`ScriptEditorBase<class_ScriptEditorBase>` objects which are currently open in editor. @@ -127,7 +129,7 @@ Returns an array with all :ref:`ScriptEditorBase<class_ScriptEditorBase>` object .. rst-class:: classref-method -:ref:`Script[]<class_Script>` **get_open_scripts** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Script<class_Script>`\] **get_open_scripts**\ (\ ) |const| :ref:`🔗<class_ScriptEditor_method_get_open_scripts>` Returns an array with all :ref:`Script<class_Script>` objects which are currently open in editor. @@ -135,11 +137,48 @@ Returns an array with all :ref:`Script<class_Script>` objects which are currentl ---- +.. _class_ScriptEditor_method_goto_help: + +.. rst-class:: classref-method + +|void| **goto_help**\ (\ topic\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditor_method_goto_help>` + +Opens help for the given topic. The ``topic`` is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused. + +The supported ``topic`` formats include ``class_name:class``, ``class_method:class:method``, ``class_constant:class:constant``, ``class_signal:class:signal``, ``class_annotation:class:@annotation``, ``class_property:class:property``, and ``class_theme_item:class:item``, where ``class`` is the class name, ``method`` is the method name, ``constant`` is the constant name, ``signal`` is the signal name, ``annotation`` is the annotation name, ``property`` is the property name, and ``item`` is the theme item. + +\ **Examples:**\ + +:: + + # Shows help for the Node class. + class_name:Node + # Shows help for the global min function. + # Global objects are accessible in the `@GlobalScope` namespace, shown here. + class_method:@GlobalScope:min + # Shows help for get_viewport in the Node class. + class_method:Node:get_viewport + # Shows help for the Input constant MOUSE_BUTTON_MIDDLE. + class_constant:Input:MOUSE_BUTTON_MIDDLE + # Shows help for the BaseButton signal pressed. + class_signal:BaseButton:pressed + # Shows help for the CanvasItem property visible. + class_property:CanvasItem:visible + # Shows help for the GDScript annotation export. + # Annotations should be prefixed with the `@` symbol in the descriptor, as shown here. + class_annotation:@GDScript:@export + # Shows help for the GraphNode theme item named panel_selected. + class_theme_item:GraphNode:panel_selected + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptEditor_method_goto_line: .. rst-class:: classref-method -void **goto_line** **(** :ref:`int<class_int>` line_number **)** +|void| **goto_line**\ (\ line_number\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ScriptEditor_method_goto_line>` Goes to the specified line in the current script. @@ -151,7 +190,7 @@ Goes to the specified line in the current script. .. rst-class:: classref-method -void **open_script_create_dialog** **(** :ref:`String<class_String>` base_name, :ref:`String<class_String>` base_path **)** +|void| **open_script_create_dialog**\ (\ base_name\: :ref:`String<class_String>`, base_path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditor_method_open_script_create_dialog>` Opens the script create dialog. The script will extend ``base_name``. The file extension can be omitted from ``base_path``. It will be added based on the selected scripting language. @@ -163,7 +202,7 @@ Opens the script create dialog. The script will extend ``base_name``. The file e .. rst-class:: classref-method -void **register_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` syntax_highlighter **)** +|void| **register_syntax_highlighter**\ (\ syntax_highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) :ref:`🔗<class_ScriptEditor_method_register_syntax_highlighter>` Registers the :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` to the editor, the :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` will be available on all open scripts. @@ -177,7 +216,7 @@ Registers the :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` to t .. rst-class:: classref-method -void **unregister_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` syntax_highlighter **)** +|void| **unregister_syntax_highlighter**\ (\ syntax_highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) :ref:`🔗<class_ScriptEditor_method_unregister_syntax_highlighter>` Unregisters the :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` from the editor. @@ -190,3 +229,4 @@ Unregisters the :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` fr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scripteditorbase.rst b/classes/class_scripteditorbase.rst index e9d2508ddd4..5dcd5fc9175 100644 --- a/classes/class_scripteditorbase.rst +++ b/classes/class_scripteditorbase.rst @@ -29,11 +29,11 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_syntax_highlighter<class_ScriptEditorBase_method_add_syntax_highlighter>` **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` highlighter **)** | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`get_base_editor<class_ScriptEditorBase_method_get_base_editor>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_syntax_highlighter<class_ScriptEditorBase_method_add_syntax_highlighter>`\ (\ highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`get_base_editor<class_ScriptEditorBase_method_get_base_editor>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,7 +48,7 @@ Signals .. rst-class:: classref-signal -**edited_script_changed** **(** **)** +**edited_script_changed**\ (\ ) :ref:`🔗<class_ScriptEditorBase_signal_edited_script_changed>` Emitted after script validation. @@ -60,7 +60,7 @@ Emitted after script validation. .. rst-class:: classref-signal -**go_to_help** **(** :ref:`String<class_String>` what **)** +**go_to_help**\ (\ what\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_go_to_help>` Emitted when the user requests a specific documentation page. @@ -72,7 +72,7 @@ Emitted when the user requests a specific documentation page. .. rst-class:: classref-signal -**go_to_method** **(** :ref:`Object<class_Object>` script, :ref:`String<class_String>` method **)** +**go_to_method**\ (\ script\: :ref:`Object<class_Object>`, method\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_go_to_method>` Emitted when the user requests to view a specific method of a script, similar to :ref:`request_open_script_at_line<class_ScriptEditorBase_signal_request_open_script_at_line>`. @@ -84,7 +84,7 @@ Emitted when the user requests to view a specific method of a script, similar to .. rst-class:: classref-signal -**name_changed** **(** **)** +**name_changed**\ (\ ) :ref:`🔗<class_ScriptEditorBase_signal_name_changed>` Emitted after script validation or when the edited resource has changed. @@ -96,7 +96,7 @@ Emitted after script validation or when the edited resource has changed. .. rst-class:: classref-signal -**replace_in_files_requested** **(** :ref:`String<class_String>` text **)** +**replace_in_files_requested**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_replace_in_files_requested>` Emitted when the user request to find and replace text in the file system. @@ -108,7 +108,7 @@ Emitted when the user request to find and replace text in the file system. .. rst-class:: classref-signal -**request_help** **(** :ref:`String<class_String>` topic **)** +**request_help**\ (\ topic\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_request_help>` Emitted when the user requests contextual help. @@ -120,7 +120,7 @@ Emitted when the user requests contextual help. .. rst-class:: classref-signal -**request_open_script_at_line** **(** :ref:`Object<class_Object>` script, :ref:`int<class_int>` line **)** +**request_open_script_at_line**\ (\ script\: :ref:`Object<class_Object>`, line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_request_open_script_at_line>` Emitted when the user requests to view a specific line of a script, similar to :ref:`go_to_method<class_ScriptEditorBase_signal_go_to_method>`. @@ -132,7 +132,7 @@ Emitted when the user requests to view a specific line of a script, similar to : .. rst-class:: classref-signal -**request_save_history** **(** **)** +**request_save_history**\ (\ ) :ref:`🔗<class_ScriptEditorBase_signal_request_save_history>` Emitted when the user contextual goto and the item is in the same script. @@ -140,11 +140,23 @@ Emitted when the user contextual goto and the item is in the same script. ---- +.. _class_ScriptEditorBase_signal_request_save_previous_state: + +.. rst-class:: classref-signal + +**request_save_previous_state**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_request_save_previous_state>` + +Emitted when the user changes current script or moves caret by 10 or more columns within the same script. + +.. rst-class:: classref-item-separator + +---- + .. _class_ScriptEditorBase_signal_search_in_files_requested: .. rst-class:: classref-signal -**search_in_files_requested** **(** :ref:`String<class_String>` text **)** +**search_in_files_requested**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ScriptEditorBase_signal_search_in_files_requested>` Emitted when the user request to search text in the file system. @@ -161,7 +173,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` highlighter **)** +|void| **add_syntax_highlighter**\ (\ highlighter\: :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>`\ ) :ref:`🔗<class_ScriptEditorBase_method_add_syntax_highlighter>` Adds a :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` to the open script. @@ -173,7 +185,7 @@ Adds a :ref:`EditorSyntaxHighlighter<class_EditorSyntaxHighlighter>` to the open .. rst-class:: classref-method -:ref:`Control<class_Control>` **get_base_editor** **(** **)** |const| +:ref:`Control<class_Control>` **get_base_editor**\ (\ ) |const| :ref:`🔗<class_ScriptEditorBase_method_get_base_editor>` Returns the underlying :ref:`Control<class_Control>` used for editing scripts. For text scripts, this is a :ref:`CodeEdit<class_CodeEdit>`. @@ -184,3 +196,4 @@ Returns the underlying :ref:`Control<class_Control>` used for editing scripts. F .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scriptextension.rst b/classes/class_scriptextension.rst index fd62ff59f44..f7ca6e7797f 100644 --- a/classes/class_scriptextension.rst +++ b/classes/class_scriptextension.rst @@ -24,71 +24,79 @@ Methods .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_instantiate<class_ScriptExtension_method__can_instantiate>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_editor_can_reload_from_file<class_ScriptExtension_method__editor_can_reload_from_file>` **(** **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script<class_Script>` | :ref:`_get_base_script<class_ScriptExtension_method__get_base_script>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_constants<class_ScriptExtension_method__get_constants>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_documentation<class_ScriptExtension_method__get_documentation>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`_get_global_name<class_ScriptExtension_method__get_global_name>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`_get_instance_base_type<class_ScriptExtension_method__get_instance_base_type>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`_get_language<class_ScriptExtension_method__get_language>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_member_line<class_ScriptExtension_method__get_member_line>` **(** :ref:`StringName<class_StringName>` member **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]<class_StringName>` | :ref:`_get_members<class_ScriptExtension_method__get_members>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_method_info<class_ScriptExtension_method__get_method_info>` **(** :ref:`StringName<class_StringName>` method **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_property_default_value<class_ScriptExtension_method__get_property_default_value>` **(** :ref:`StringName<class_StringName>` property **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_get_rpc_config<class_ScriptExtension_method__get_rpc_config>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_script_method_list<class_ScriptExtension_method__get_script_method_list>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_script_property_list<class_ScriptExtension_method__get_script_property_list>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_script_signal_list<class_ScriptExtension_method__get_script_signal_list>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_source_code<class_ScriptExtension_method__get_source_code>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_method<class_ScriptExtension_method__has_method>` **(** :ref:`StringName<class_StringName>` method **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_property_default_value<class_ScriptExtension_method__has_property_default_value>` **(** :ref:`StringName<class_StringName>` property **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_script_signal<class_ScriptExtension_method__has_script_signal>` **(** :ref:`StringName<class_StringName>` signal **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_source_code<class_ScriptExtension_method__has_source_code>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_inherits_script<class_ScriptExtension_method__inherits_script>` **(** :ref:`Script<class_Script>` script **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_instance_create<class_ScriptExtension_method__instance_create>` **(** :ref:`Object<class_Object>` for_object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_instance_has<class_ScriptExtension_method__instance_has>` **(** :ref:`Object<class_Object>` object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_placeholder_fallback_enabled<class_ScriptExtension_method__is_placeholder_fallback_enabled>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_tool<class_ScriptExtension_method__is_tool>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_valid<class_ScriptExtension_method__is_valid>` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_placeholder_erased<class_ScriptExtension_method__placeholder_erased>` **(** void* placeholder **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_placeholder_instance_create<class_ScriptExtension_method__placeholder_instance_create>` **(** :ref:`Object<class_Object>` for_object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_reload<class_ScriptExtension_method__reload>` **(** :ref:`bool<class_bool>` keep_state **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_source_code<class_ScriptExtension_method__set_source_code>` **(** :ref:`String<class_String>` code **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_exports<class_ScriptExtension_method__update_exports>` **(** **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_instantiate<class_ScriptExtension_private_method__can_instantiate>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_editor_can_reload_from_file<class_ScriptExtension_private_method__editor_can_reload_from_file>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script<class_Script>` | :ref:`_get_base_script<class_ScriptExtension_private_method__get_base_script>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_class_icon_path<class_ScriptExtension_private_method__get_class_icon_path>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_constants<class_ScriptExtension_private_method__get_constants>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_documentation<class_ScriptExtension_private_method__get_documentation>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`_get_global_name<class_ScriptExtension_private_method__get_global_name>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`_get_instance_base_type<class_ScriptExtension_private_method__get_instance_base_type>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage<class_ScriptLanguage>` | :ref:`_get_language<class_ScriptExtension_private_method__get_language>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_member_line<class_ScriptExtension_private_method__get_member_line>`\ (\ member\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`_get_members<class_ScriptExtension_private_method__get_members>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_method_info<class_ScriptExtension_private_method__get_method_info>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_property_default_value<class_ScriptExtension_private_method__get_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_rpc_config<class_ScriptExtension_private_method__get_rpc_config>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_script_method_argument_count<class_ScriptExtension_private_method__get_script_method_argument_count>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_method_list<class_ScriptExtension_private_method__get_script_method_list>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_property_list<class_ScriptExtension_private_method__get_script_property_list>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_script_signal_list<class_ScriptExtension_private_method__get_script_signal_list>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_source_code<class_ScriptExtension_private_method__get_source_code>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_method<class_ScriptExtension_private_method__has_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_property_default_value<class_ScriptExtension_private_method__has_property_default_value>`\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_script_signal<class_ScriptExtension_private_method__has_script_signal>`\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_source_code<class_ScriptExtension_private_method__has_source_code>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_static_method<class_ScriptExtension_private_method__has_static_method>`\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_inherits_script<class_ScriptExtension_private_method__inherits_script>`\ (\ script\: :ref:`Script<class_Script>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``void*`` | :ref:`_instance_create<class_ScriptExtension_private_method__instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_instance_has<class_ScriptExtension_private_method__instance_has>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_abstract<class_ScriptExtension_private_method__is_abstract>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_placeholder_fallback_enabled<class_ScriptExtension_private_method__is_placeholder_fallback_enabled>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_tool<class_ScriptExtension_private_method__is_tool>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_valid<class_ScriptExtension_private_method__is_valid>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_placeholder_erased<class_ScriptExtension_private_method__placeholder_erased>`\ (\ placeholder\: ``void*``\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``void*`` | :ref:`_placeholder_instance_create<class_ScriptExtension_private_method__placeholder_instance_create>`\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_reload<class_ScriptExtension_private_method__reload>`\ (\ keep_state\: :ref:`bool<class_bool>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_source_code<class_ScriptExtension_private_method__set_source_code>`\ (\ code\: :ref:`String<class_String>`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_update_exports<class_ScriptExtension_private_method__update_exports>`\ (\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -99,11 +107,11 @@ Methods Method Descriptions ------------------- -.. _class_ScriptExtension_method__can_instantiate: +.. _class_ScriptExtension_private_method__can_instantiate: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_instantiate** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_instantiate**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__can_instantiate>` .. container:: contribute @@ -113,11 +121,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__editor_can_reload_from_file: +.. _class_ScriptExtension_private_method__editor_can_reload_from_file: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_editor_can_reload_from_file** **(** **)** |virtual| +:ref:`bool<class_bool>` **_editor_can_reload_from_file**\ (\ ) |virtual| :ref:`🔗<class_ScriptExtension_private_method__editor_can_reload_from_file>` .. container:: contribute @@ -127,11 +135,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_base_script: +.. _class_ScriptExtension_private_method__get_base_script: .. rst-class:: classref-method -:ref:`Script<class_Script>` **_get_base_script** **(** **)** |virtual| |const| +:ref:`Script<class_Script>` **_get_base_script**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_base_script>` .. container:: contribute @@ -141,11 +149,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_constants: +.. _class_ScriptExtension_private_method__get_class_icon_path: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_constants** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_class_icon_path**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_class_icon_path>` .. container:: contribute @@ -155,11 +163,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_documentation: +.. _class_ScriptExtension_private_method__get_constants: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_documentation** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_constants**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_constants>` .. container:: contribute @@ -169,11 +177,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_global_name: +.. _class_ScriptExtension_private_method__get_documentation: .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **_get_global_name** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_documentation**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_documentation>` .. container:: contribute @@ -183,11 +191,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_instance_base_type: +.. _class_ScriptExtension_private_method__get_global_name: .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **_get_instance_base_type** **(** **)** |virtual| |const| +:ref:`StringName<class_StringName>` **_get_global_name**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_global_name>` .. container:: contribute @@ -197,11 +205,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_language: +.. _class_ScriptExtension_private_method__get_instance_base_type: .. rst-class:: classref-method -:ref:`ScriptLanguage<class_ScriptLanguage>` **_get_language** **(** **)** |virtual| |const| +:ref:`StringName<class_StringName>` **_get_instance_base_type**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_instance_base_type>` .. container:: contribute @@ -211,11 +219,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_member_line: +.. _class_ScriptExtension_private_method__get_language: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_member_line** **(** :ref:`StringName<class_StringName>` member **)** |virtual| |const| +:ref:`ScriptLanguage<class_ScriptLanguage>` **_get_language**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_language>` .. container:: contribute @@ -225,11 +233,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_members: +.. _class_ScriptExtension_private_method__get_member_line: .. rst-class:: classref-method -:ref:`StringName[]<class_StringName>` **_get_members** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_member_line**\ (\ member\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_member_line>` .. container:: contribute @@ -239,11 +247,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_method_info: +.. _class_ScriptExtension_private_method__get_members: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_method_info** **(** :ref:`StringName<class_StringName>` method **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **_get_members**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_members>` .. container:: contribute @@ -253,11 +261,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_property_default_value: +.. _class_ScriptExtension_private_method__get_method_info: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_property_default_value** **(** :ref:`StringName<class_StringName>` property **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_method_info**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_method_info>` .. container:: contribute @@ -267,11 +275,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_rpc_config: +.. _class_ScriptExtension_private_method__get_property_default_value: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_get_rpc_config** **(** **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_property_default_value**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_property_default_value>` .. container:: contribute @@ -281,11 +289,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_script_method_list: +.. _class_ScriptExtension_private_method__get_rpc_config: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_script_method_list** **(** **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_rpc_config**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_rpc_config>` .. container:: contribute @@ -295,11 +303,37 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_script_property_list: +.. _class_ScriptExtension_private_method__get_script_method_argument_count: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_script_property_list** **(** **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_script_method_argument_count**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_script_method_argument_count>` + +Return the expected argument count for the given ``method``, or ``null`` if it can't be determined (which will then fall back to the default behavior). + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__get_script_method_list: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_script_method_list**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_script_method_list>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__get_script_property_list: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_script_property_list**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_script_property_list>` .. container:: contribute @@ -309,11 +343,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_script_signal_list: +.. _class_ScriptExtension_private_method__get_script_signal_list: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_script_signal_list** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_script_signal_list**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_script_signal_list>` .. container:: contribute @@ -323,11 +357,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__get_source_code: +.. _class_ScriptExtension_private_method__get_source_code: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_source_code** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_source_code**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__get_source_code>` .. container:: contribute @@ -337,11 +371,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__has_method: +.. _class_ScriptExtension_private_method__has_method: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_method** **(** :ref:`StringName<class_StringName>` method **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_method**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__has_method>` .. container:: contribute @@ -351,11 +385,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__has_property_default_value: +.. _class_ScriptExtension_private_method__has_property_default_value: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_property_default_value** **(** :ref:`StringName<class_StringName>` property **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_property_default_value**\ (\ property\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__has_property_default_value>` .. container:: contribute @@ -365,11 +399,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__has_script_signal: +.. _class_ScriptExtension_private_method__has_script_signal: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_script_signal** **(** :ref:`StringName<class_StringName>` signal **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_script_signal**\ (\ signal\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__has_script_signal>` .. container:: contribute @@ -379,11 +413,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__has_source_code: +.. _class_ScriptExtension_private_method__has_source_code: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_source_code** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_source_code**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__has_source_code>` .. container:: contribute @@ -393,11 +427,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__inherits_script: +.. _class_ScriptExtension_private_method__has_static_method: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_inherits_script** **(** :ref:`Script<class_Script>` script **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_static_method**\ (\ method\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__has_static_method>` .. container:: contribute @@ -407,11 +441,11 @@ Method Descriptions ---- -.. _class_ScriptExtension_method__instance_create: +.. _class_ScriptExtension_private_method__inherits_script: .. rst-class:: classref-method -void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |virtual| |const| +:ref:`bool<class_bool>` **_inherits_script**\ (\ script\: :ref:`Script<class_Script>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__inherits_script>` .. container:: contribute @@ -421,11 +455,11 @@ void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |v ---- -.. _class_ScriptExtension_method__instance_has: +.. _class_ScriptExtension_private_method__instance_create: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_instance_has** **(** :ref:`Object<class_Object>` object **)** |virtual| |const| +``void*`` **_instance_create**\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__instance_create>` .. container:: contribute @@ -435,11 +469,37 @@ void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |v ---- -.. _class_ScriptExtension_method__is_placeholder_fallback_enabled: +.. _class_ScriptExtension_private_method__instance_has: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_instance_has**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__instance_has>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__is_abstract: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_is_abstract**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__is_abstract>` + +Returns ``true`` if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__is_placeholder_fallback_enabled: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_placeholder_fallback_enabled** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_placeholder_fallback_enabled**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__is_placeholder_fallback_enabled>` .. container:: contribute @@ -449,11 +509,11 @@ void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |v ---- -.. _class_ScriptExtension_method__is_tool: +.. _class_ScriptExtension_private_method__is_tool: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_tool** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_tool**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__is_tool>` .. container:: contribute @@ -463,11 +523,11 @@ void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |v ---- -.. _class_ScriptExtension_method__is_valid: +.. _class_ScriptExtension_private_method__is_valid: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_valid** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_valid**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__is_valid>` .. container:: contribute @@ -477,11 +537,11 @@ void* **_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |v ---- -.. _class_ScriptExtension_method__placeholder_erased: +.. _class_ScriptExtension_private_method__placeholder_erased: .. rst-class:: classref-method -void **_placeholder_erased** **(** void* placeholder **)** |virtual| +|void| **_placeholder_erased**\ (\ placeholder\: ``void*``\ ) |virtual| :ref:`🔗<class_ScriptExtension_private_method__placeholder_erased>` .. container:: contribute @@ -491,11 +551,11 @@ void **_placeholder_erased** **(** void* placeholder **)** |virtual| ---- -.. _class_ScriptExtension_method__placeholder_instance_create: +.. _class_ScriptExtension_private_method__placeholder_instance_create: .. rst-class:: classref-method -void* **_placeholder_instance_create** **(** :ref:`Object<class_Object>` for_object **)** |virtual| |const| +``void*`` **_placeholder_instance_create**\ (\ for_object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_ScriptExtension_private_method__placeholder_instance_create>` .. container:: contribute @@ -505,11 +565,11 @@ void* **_placeholder_instance_create** **(** :ref:`Object<class_Object>` for_obj ---- -.. _class_ScriptExtension_method__reload: +.. _class_ScriptExtension_private_method__reload: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_reload** **(** :ref:`bool<class_bool>` keep_state **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_reload**\ (\ keep_state\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_ScriptExtension_private_method__reload>` .. container:: contribute @@ -519,11 +579,11 @@ void* **_placeholder_instance_create** **(** :ref:`Object<class_Object>` for_obj ---- -.. _class_ScriptExtension_method__set_source_code: +.. _class_ScriptExtension_private_method__set_source_code: .. rst-class:: classref-method -void **_set_source_code** **(** :ref:`String<class_String>` code **)** |virtual| +|void| **_set_source_code**\ (\ code\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_ScriptExtension_private_method__set_source_code>` .. container:: contribute @@ -533,11 +593,11 @@ void **_set_source_code** **(** :ref:`String<class_String>` code **)** |virtual| ---- -.. _class_ScriptExtension_method__update_exports: +.. _class_ScriptExtension_private_method__update_exports: .. rst-class:: classref-method -void **_update_exports** **(** **)** |virtual| +|void| **_update_exports**\ (\ ) |virtual| :ref:`🔗<class_ScriptExtension_private_method__update_exports>` .. container:: contribute @@ -550,3 +610,4 @@ void **_update_exports** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scriptlanguage.rst b/classes/class_scriptlanguage.rst index ba55ef0bf34..89e83de30bd 100644 --- a/classes/class_scriptlanguage.rst +++ b/classes/class_scriptlanguage.rst @@ -18,6 +18,69 @@ ScriptLanguage There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_ScriptLanguage_ScriptNameCasing: + +.. rst-class:: classref-enumeration + +enum **ScriptNameCasing**: :ref:`🔗<enum_ScriptLanguage_ScriptNameCasing>` + +.. _class_ScriptLanguage_constant_SCRIPT_NAME_CASING_AUTO: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` **SCRIPT_NAME_CASING_AUTO** = ``0`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_ScriptLanguage_constant_SCRIPT_NAME_CASING_PASCAL_CASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` **SCRIPT_NAME_CASING_PASCAL_CASE** = ``1`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_ScriptLanguage_constant_SCRIPT_NAME_CASING_SNAKE_CASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` **SCRIPT_NAME_CASING_SNAKE_CASE** = ``2`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + +.. _class_ScriptLanguage_constant_SCRIPT_NAME_CASING_KEBAB_CASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` **SCRIPT_NAME_CASING_KEBAB_CASE** = ``3`` + +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + + + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -25,3 +88,4 @@ ScriptLanguage .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scriptlanguageextension.rst b/classes/class_scriptlanguageextension.rst index 4e948156ed1..5c3fde62ee9 100644 --- a/classes/class_scriptlanguageextension.rst +++ b/classes/class_scriptlanguageextension.rst @@ -24,115 +24,125 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_global_constant<class_ScriptLanguageExtension_method__add_global_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_named_global_constant<class_ScriptLanguageExtension_method__add_named_global_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_auto_indent_code<class_ScriptLanguageExtension_method__auto_indent_code>` **(** :ref:`String<class_String>` code, :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_can_inherit_from_file<class_ScriptLanguageExtension_method__can_inherit_from_file>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_complete_code<class_ScriptLanguageExtension_method__complete_code>` **(** :ref:`String<class_String>` code, :ref:`String<class_String>` path, :ref:`Object<class_Object>` owner **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`_create_script<class_ScriptLanguageExtension_method__create_script>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_debug_get_current_stack_info<class_ScriptLanguageExtension_method__debug_get_current_stack_info>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_debug_get_error<class_ScriptLanguageExtension_method__debug_get_error>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_globals<class_ScriptLanguageExtension_method__debug_get_globals>` **(** :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_debug_get_stack_level_count<class_ScriptLanguageExtension_method__debug_get_stack_level_count>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_debug_get_stack_level_function<class_ScriptLanguageExtension_method__debug_get_stack_level_function>` **(** :ref:`int<class_int>` level **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_debug_get_stack_level_instance<class_ScriptLanguageExtension_method__debug_get_stack_level_instance>` **(** :ref:`int<class_int>` level **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_debug_get_stack_level_line<class_ScriptLanguageExtension_method__debug_get_stack_level_line>` **(** :ref:`int<class_int>` level **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_stack_level_locals<class_ScriptLanguageExtension_method__debug_get_stack_level_locals>` **(** :ref:`int<class_int>` level, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_stack_level_members<class_ScriptLanguageExtension_method__debug_get_stack_level_members>` **(** :ref:`int<class_int>` level, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_debug_parse_stack_level_expression<class_ScriptLanguageExtension_method__debug_parse_stack_level_expression>` **(** :ref:`int<class_int>` level, :ref:`String<class_String>` expression, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_find_function<class_ScriptLanguageExtension_method__find_function>` **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` function_name **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish<class_ScriptLanguageExtension_method__finish>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_frame<class_ScriptLanguageExtension_method__frame>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_built_in_templates<class_ScriptLanguageExtension_method__get_built_in_templates>` **(** :ref:`StringName<class_StringName>` object **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_comment_delimiters<class_ScriptLanguageExtension_method__get_comment_delimiters>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_extension<class_ScriptLanguageExtension_method__get_extension>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_global_class_name<class_ScriptLanguageExtension_method__get_global_class_name>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_name<class_ScriptLanguageExtension_method__get_name>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_public_annotations<class_ScriptLanguageExtension_method__get_public_annotations>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_public_constants<class_ScriptLanguageExtension_method__get_public_constants>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`_get_public_functions<class_ScriptLanguageExtension_method__get_public_functions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ScriptLanguageExtension_method__get_recognized_extensions>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_reserved_words<class_ScriptLanguageExtension_method__get_reserved_words>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_string_delimiters<class_ScriptLanguageExtension_method__get_string_delimiters>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_type<class_ScriptLanguageExtension_method__get_type>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_handles_global_class_type<class_ScriptLanguageExtension_method__handles_global_class_type>` **(** :ref:`String<class_String>` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_named_classes<class_ScriptLanguageExtension_method__has_named_classes>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init<class_ScriptLanguageExtension_method__init>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_control_flow_keyword<class_ScriptLanguageExtension_method__is_control_flow_keyword>` **(** :ref:`String<class_String>` keyword **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_using_templates<class_ScriptLanguageExtension_method__is_using_templates>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_lookup_code<class_ScriptLanguageExtension_method__lookup_code>` **(** :ref:`String<class_String>` code, :ref:`String<class_String>` symbol, :ref:`String<class_String>` path, :ref:`Object<class_Object>` owner **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_make_function<class_ScriptLanguageExtension_method__make_function>` **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` function_name, :ref:`PackedStringArray<class_PackedStringArray>` function_args **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script<class_Script>` | :ref:`_make_template<class_ScriptLanguageExtension_method__make_template>` **(** :ref:`String<class_String>` template, :ref:`String<class_String>` class_name, :ref:`String<class_String>` base_class_name **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_open_in_external_editor<class_ScriptLanguageExtension_method__open_in_external_editor>` **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_overrides_external_editor<class_ScriptLanguageExtension_method__overrides_external_editor>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_profiling_get_accumulated_data<class_ScriptLanguageExtension_method__profiling_get_accumulated_data>` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int<class_int>` info_max **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_profiling_get_frame_data<class_ScriptLanguageExtension_method__profiling_get_frame_data>` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int<class_int>` info_max **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_profiling_start<class_ScriptLanguageExtension_method__profiling_start>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_profiling_stop<class_ScriptLanguageExtension_method__profiling_stop>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_reload_all_scripts<class_ScriptLanguageExtension_method__reload_all_scripts>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_reload_tool_script<class_ScriptLanguageExtension_method__reload_tool_script>` **(** :ref:`Script<class_Script>` script, :ref:`bool<class_bool>` soft_reload **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_named_global_constant<class_ScriptLanguageExtension_method__remove_named_global_constant>` **(** :ref:`StringName<class_StringName>` name **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_supports_builtin_mode<class_ScriptLanguageExtension_method__supports_builtin_mode>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_supports_documentation<class_ScriptLanguageExtension_method__supports_documentation>` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_thread_enter<class_ScriptLanguageExtension_method__thread_enter>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_thread_exit<class_ScriptLanguageExtension_method__thread_exit>` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_validate<class_ScriptLanguageExtension_method__validate>` **(** :ref:`String<class_String>` script, :ref:`String<class_String>` path, :ref:`bool<class_bool>` validate_functions, :ref:`bool<class_bool>` validate_errors, :ref:`bool<class_bool>` validate_warnings, :ref:`bool<class_bool>` validate_safe_lines **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_validate_path<class_ScriptLanguageExtension_method__validate_path>` **(** :ref:`String<class_String>` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_global_constant<class_ScriptLanguageExtension_private_method__add_global_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_add_named_global_constant<class_ScriptLanguageExtension_private_method__add_named_global_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_auto_indent_code<class_ScriptLanguageExtension_private_method__auto_indent_code>`\ (\ code\: :ref:`String<class_String>`, from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_inherit_from_file<class_ScriptLanguageExtension_private_method__can_inherit_from_file>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_can_make_function<class_ScriptLanguageExtension_private_method__can_make_function>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_complete_code<class_ScriptLanguageExtension_private_method__complete_code>`\ (\ code\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, owner\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`_create_script<class_ScriptLanguageExtension_private_method__create_script>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_debug_get_current_stack_info<class_ScriptLanguageExtension_private_method__debug_get_current_stack_info>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_debug_get_error<class_ScriptLanguageExtension_private_method__debug_get_error>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_globals<class_ScriptLanguageExtension_private_method__debug_get_globals>`\ (\ max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_debug_get_stack_level_count<class_ScriptLanguageExtension_private_method__debug_get_stack_level_count>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_debug_get_stack_level_function<class_ScriptLanguageExtension_private_method__debug_get_stack_level_function>`\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``void*`` | :ref:`_debug_get_stack_level_instance<class_ScriptLanguageExtension_private_method__debug_get_stack_level_instance>`\ (\ level\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_debug_get_stack_level_line<class_ScriptLanguageExtension_private_method__debug_get_stack_level_line>`\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_stack_level_locals<class_ScriptLanguageExtension_private_method__debug_get_stack_level_locals>`\ (\ level\: :ref:`int<class_int>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_debug_get_stack_level_members<class_ScriptLanguageExtension_private_method__debug_get_stack_level_members>`\ (\ level\: :ref:`int<class_int>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_debug_get_stack_level_source<class_ScriptLanguageExtension_private_method__debug_get_stack_level_source>`\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_debug_parse_stack_level_expression<class_ScriptLanguageExtension_private_method__debug_parse_stack_level_expression>`\ (\ level\: :ref:`int<class_int>`, expression\: :ref:`String<class_String>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_find_function<class_ScriptLanguageExtension_private_method__find_function>`\ (\ function\: :ref:`String<class_String>`, code\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_finish<class_ScriptLanguageExtension_private_method__finish>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_frame<class_ScriptLanguageExtension_private_method__frame>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_built_in_templates<class_ScriptLanguageExtension_private_method__get_built_in_templates>`\ (\ object\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_comment_delimiters<class_ScriptLanguageExtension_private_method__get_comment_delimiters>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_doc_comment_delimiters<class_ScriptLanguageExtension_private_method__get_doc_comment_delimiters>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_extension<class_ScriptLanguageExtension_private_method__get_extension>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_global_class_name<class_ScriptLanguageExtension_private_method__get_global_class_name>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_name<class_ScriptLanguageExtension_private_method__get_name>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_public_annotations<class_ScriptLanguageExtension_private_method__get_public_annotations>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_public_constants<class_ScriptLanguageExtension_private_method__get_public_constants>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`_get_public_functions<class_ScriptLanguageExtension_private_method__get_public_functions>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_recognized_extensions<class_ScriptLanguageExtension_private_method__get_recognized_extensions>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_reserved_words<class_ScriptLanguageExtension_private_method__get_reserved_words>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_string_delimiters<class_ScriptLanguageExtension_private_method__get_string_delimiters>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_type<class_ScriptLanguageExtension_private_method__get_type>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_handles_global_class_type<class_ScriptLanguageExtension_private_method__handles_global_class_type>`\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_named_classes<class_ScriptLanguageExtension_private_method__has_named_classes>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_init<class_ScriptLanguageExtension_private_method__init>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_control_flow_keyword<class_ScriptLanguageExtension_private_method__is_control_flow_keyword>`\ (\ keyword\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_using_templates<class_ScriptLanguageExtension_private_method__is_using_templates>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_lookup_code<class_ScriptLanguageExtension_private_method__lookup_code>`\ (\ code\: :ref:`String<class_String>`, symbol\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, owner\: :ref:`Object<class_Object>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_make_function<class_ScriptLanguageExtension_private_method__make_function>`\ (\ class_name\: :ref:`String<class_String>`, function_name\: :ref:`String<class_String>`, function_args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script<class_Script>` | :ref:`_make_template<class_ScriptLanguageExtension_private_method__make_template>`\ (\ template\: :ref:`String<class_String>`, class_name\: :ref:`String<class_String>`, base_class_name\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_open_in_external_editor<class_ScriptLanguageExtension_private_method__open_in_external_editor>`\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_overrides_external_editor<class_ScriptLanguageExtension_private_method__overrides_external_editor>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` | :ref:`_preferred_file_name_casing<class_ScriptLanguageExtension_private_method__preferred_file_name_casing>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_profiling_get_accumulated_data<class_ScriptLanguageExtension_private_method__profiling_get_accumulated_data>`\ (\ info_array\: ``ScriptLanguageExtensionProfilingInfo*``, info_max\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_profiling_get_frame_data<class_ScriptLanguageExtension_private_method__profiling_get_frame_data>`\ (\ info_array\: ``ScriptLanguageExtensionProfilingInfo*``, info_max\: :ref:`int<class_int>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_profiling_set_save_native_calls<class_ScriptLanguageExtension_private_method__profiling_set_save_native_calls>`\ (\ enable\: :ref:`bool<class_bool>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_profiling_start<class_ScriptLanguageExtension_private_method__profiling_start>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_profiling_stop<class_ScriptLanguageExtension_private_method__profiling_stop>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_reload_all_scripts<class_ScriptLanguageExtension_private_method__reload_all_scripts>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_reload_tool_script<class_ScriptLanguageExtension_private_method__reload_tool_script>`\ (\ script\: :ref:`Script<class_Script>`, soft_reload\: :ref:`bool<class_bool>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_remove_named_global_constant<class_ScriptLanguageExtension_private_method__remove_named_global_constant>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_supports_builtin_mode<class_ScriptLanguageExtension_private_method__supports_builtin_mode>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_supports_documentation<class_ScriptLanguageExtension_private_method__supports_documentation>`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_thread_enter<class_ScriptLanguageExtension_private_method__thread_enter>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_thread_exit<class_ScriptLanguageExtension_private_method__thread_exit>`\ (\ ) |virtual| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_validate<class_ScriptLanguageExtension_private_method__validate>`\ (\ script\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, validate_functions\: :ref:`bool<class_bool>`, validate_errors\: :ref:`bool<class_bool>`, validate_warnings\: :ref:`bool<class_bool>`, validate_safe_lines\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_validate_path<class_ScriptLanguageExtension_private_method__validate_path>`\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -147,7 +157,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **LookupResultType**: +enum **LookupResultType**: :ref:`🔗<enum_ScriptLanguageExtension_LookupResultType>` .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_SCRIPT_LOCATION: @@ -155,6 +165,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_SCRIPT_LOCATION** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS: @@ -163,6 +177,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_CONSTANT: @@ -171,6 +189,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_CONSTANT** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_PROPERTY: @@ -179,6 +201,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_PROPERTY** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_METHOD: @@ -187,6 +213,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_METHOD** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_SIGNAL: @@ -195,6 +225,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_SIGNAL** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ENUM: @@ -203,6 +237,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_ENUM** = ``6`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE: @@ -211,6 +249,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_CLASS_ANNOTATION: @@ -219,6 +261,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_CLASS_ANNOTATION** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_LOOKUP_RESULT_MAX: @@ -227,6 +273,10 @@ enum **LookupResultType**: :ref:`LookupResultType<enum_ScriptLanguageExtension_LookupResultType>` **LOOKUP_RESULT_MAX** = ``9`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-item-separator @@ -237,7 +287,7 @@ enum **LookupResultType**: .. rst-class:: classref-enumeration -enum **CodeCompletionLocation**: +enum **CodeCompletionLocation**: :ref:`🔗<enum_ScriptLanguageExtension_CodeCompletionLocation>` .. _class_ScriptLanguageExtension_constant_LOCATION_LOCAL: @@ -253,7 +303,7 @@ The option is local to the location of the code completion query - e.g. a local :ref:`CodeCompletionLocation<enum_ScriptLanguageExtension_CodeCompletionLocation>` **LOCATION_PARENT_MASK** = ``256`` -The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. 0 for the local class, 1 for the parent, 2 for the grandparent, etc) to store the depth of an option in the class or a parent class. +The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. ``0`` for the local class, ``1`` for the parent, ``2`` for the grandparent, etc.) to store the depth of an option in the class or a parent class. .. _class_ScriptLanguageExtension_constant_LOCATION_OTHER_USER_CODE: @@ -279,7 +329,7 @@ The option is from other engine code, not covered by the other enum constants - .. rst-class:: classref-enumeration -enum **CodeCompletionKind**: +enum **CodeCompletionKind**: :ref:`🔗<enum_ScriptLanguageExtension_CodeCompletionKind>` .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CLASS: @@ -287,6 +337,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_CLASS** = ``0`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FUNCTION: @@ -295,6 +349,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_FUNCTION** = ``1`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_SIGNAL: @@ -303,6 +361,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_SIGNAL** = ``2`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_VARIABLE: @@ -311,6 +373,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_VARIABLE** = ``3`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MEMBER: @@ -319,6 +385,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_MEMBER** = ``4`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_ENUM: @@ -327,6 +397,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_ENUM** = ``5`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_CONSTANT: @@ -335,6 +409,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_CONSTANT** = ``6`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_NODE_PATH: @@ -343,6 +421,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_NODE_PATH** = ``7`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_FILE_PATH: @@ -351,6 +433,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_FILE_PATH** = ``8`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_PLAIN_TEXT: @@ -359,6 +445,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_PLAIN_TEXT** = ``9`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. _class_ScriptLanguageExtension_constant_CODE_COMPLETION_KIND_MAX: @@ -367,6 +457,10 @@ enum **CodeCompletionKind**: :ref:`CodeCompletionKind<enum_ScriptLanguageExtension_CodeCompletionKind>` **CODE_COMPLETION_KIND_MAX** = ``10`` +.. container:: contribute + + There is currently no description for this enum. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + .. rst-class:: classref-section-separator @@ -378,11 +472,11 @@ enum **CodeCompletionKind**: Method Descriptions ------------------- -.. _class_ScriptLanguageExtension_method__add_global_constant: +.. _class_ScriptLanguageExtension_private_method__add_global_constant: .. rst-class:: classref-method -void **_add_global_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_add_global_constant**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__add_global_constant>` .. container:: contribute @@ -392,11 +486,11 @@ void **_add_global_constant** **(** :ref:`StringName<class_StringName>` name, :r ---- -.. _class_ScriptLanguageExtension_method__add_named_global_constant: +.. _class_ScriptLanguageExtension_private_method__add_named_global_constant: .. rst-class:: classref-method -void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`Variant<class_Variant>` value **)** |virtual| +|void| **_add_named_global_constant**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__add_named_global_constant>` .. container:: contribute @@ -406,11 +500,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__auto_indent_code: +.. _class_ScriptLanguageExtension_private_method__auto_indent_code: .. rst-class:: classref-method -:ref:`String<class_String>` **_auto_indent_code** **(** :ref:`String<class_String>` code, :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |virtual| |const| +:ref:`String<class_String>` **_auto_indent_code**\ (\ code\: :ref:`String<class_String>`, from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__auto_indent_code>` .. container:: contribute @@ -420,11 +514,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__can_inherit_from_file: +.. _class_ScriptLanguageExtension_private_method__can_inherit_from_file: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_can_inherit_from_file** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_inherit_from_file**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__can_inherit_from_file>` .. container:: contribute @@ -434,11 +528,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__complete_code: +.. _class_ScriptLanguageExtension_private_method__can_make_function: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_complete_code** **(** :ref:`String<class_String>` code, :ref:`String<class_String>` path, :ref:`Object<class_Object>` owner **)** |virtual| |const| +:ref:`bool<class_bool>` **_can_make_function**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__can_make_function>` .. container:: contribute @@ -448,11 +542,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__create_script: +.. _class_ScriptLanguageExtension_private_method__complete_code: .. rst-class:: classref-method -:ref:`Object<class_Object>` **_create_script** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_complete_code**\ (\ code\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, owner\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__complete_code>` .. container:: contribute @@ -462,11 +556,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_current_stack_info: +.. _class_ScriptLanguageExtension_private_method__create_script: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_debug_get_current_stack_info** **(** **)** |virtual| +:ref:`Object<class_Object>` **_create_script**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__create_script>` .. container:: contribute @@ -476,11 +570,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_error: +.. _class_ScriptLanguageExtension_private_method__debug_get_current_stack_info: .. rst-class:: classref-method -:ref:`String<class_String>` **_debug_get_error** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_debug_get_current_stack_info**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_current_stack_info>` .. container:: contribute @@ -490,11 +584,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_globals: +.. _class_ScriptLanguageExtension_private_method__debug_get_error: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_debug_get_globals** **(** :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| +:ref:`String<class_String>` **_debug_get_error**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_error>` .. container:: contribute @@ -504,11 +598,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_count: +.. _class_ScriptLanguageExtension_private_method__debug_get_globals: .. rst-class:: classref-method -:ref:`int<class_int>` **_debug_get_stack_level_count** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_debug_get_globals**\ (\ max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_globals>` .. container:: contribute @@ -518,11 +612,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_function: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_count: .. rst-class:: classref-method -:ref:`String<class_String>` **_debug_get_stack_level_function** **(** :ref:`int<class_int>` level **)** |virtual| |const| +:ref:`int<class_int>` **_debug_get_stack_level_count**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_count>` .. container:: contribute @@ -532,11 +626,11 @@ void **_add_named_global_constant** **(** :ref:`StringName<class_StringName>` na ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_instance: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_function: .. rst-class:: classref-method -void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)** |virtual| +:ref:`String<class_String>` **_debug_get_stack_level_function**\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_function>` .. container:: contribute @@ -546,11 +640,11 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_line: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_instance: .. rst-class:: classref-method -:ref:`int<class_int>` **_debug_get_stack_level_line** **(** :ref:`int<class_int>` level **)** |virtual| |const| +``void*`` **_debug_get_stack_level_instance**\ (\ level\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_instance>` .. container:: contribute @@ -560,11 +654,11 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_locals: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_line: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_debug_get_stack_level_locals** **(** :ref:`int<class_int>` level, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| +:ref:`int<class_int>` **_debug_get_stack_level_line**\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_line>` .. container:: contribute @@ -574,11 +668,11 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_members: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_locals: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_debug_get_stack_level_members** **(** :ref:`int<class_int>` level, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_debug_get_stack_level_locals**\ (\ level\: :ref:`int<class_int>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_locals>` .. container:: contribute @@ -588,11 +682,11 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__debug_parse_stack_level_expression: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_members: .. rst-class:: classref-method -:ref:`String<class_String>` **_debug_parse_stack_level_expression** **(** :ref:`int<class_int>` level, :ref:`String<class_String>` expression, :ref:`int<class_int>` max_subitems, :ref:`int<class_int>` max_depth **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_debug_get_stack_level_members**\ (\ level\: :ref:`int<class_int>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_members>` .. container:: contribute @@ -602,11 +696,23 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__find_function: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_source: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_debug_get_stack_level_source**\ (\ level\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_get_stack_level_source>` + +Returns the source associated with a given debug stack position. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__debug_parse_stack_level_expression: .. rst-class:: classref-method -:ref:`int<class_int>` **_find_function** **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` function_name **)** |virtual| |const| +:ref:`String<class_String>` **_debug_parse_stack_level_expression**\ (\ level\: :ref:`int<class_int>`, expression\: :ref:`String<class_String>`, max_subitems\: :ref:`int<class_int>`, max_depth\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__debug_parse_stack_level_expression>` .. container:: contribute @@ -616,11 +722,23 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int<class_int>` level **)* ---- -.. _class_ScriptLanguageExtension_method__finish: +.. _class_ScriptLanguageExtension_private_method__find_function: .. rst-class:: classref-method -void **_finish** **(** **)** |virtual| +:ref:`int<class_int>` **_find_function**\ (\ function\: :ref:`String<class_String>`, code\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__find_function>` + +Returns the line where the function is defined in the code, or ``-1`` if the function is not present. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__finish: + +.. rst-class:: classref-method + +|void| **_finish**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__finish>` .. container:: contribute @@ -630,11 +748,11 @@ void **_finish** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__frame: +.. _class_ScriptLanguageExtension_private_method__frame: .. rst-class:: classref-method -void **_frame** **(** **)** |virtual| +|void| **_frame**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__frame>` .. container:: contribute @@ -644,11 +762,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_built_in_templates: +.. _class_ScriptLanguageExtension_private_method__get_built_in_templates: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_built_in_templates** **(** :ref:`StringName<class_StringName>` object **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_built_in_templates**\ (\ object\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_built_in_templates>` .. container:: contribute @@ -658,11 +776,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_comment_delimiters: +.. _class_ScriptLanguageExtension_private_method__get_comment_delimiters: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_comment_delimiters** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_comment_delimiters**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_comment_delimiters>` .. container:: contribute @@ -672,11 +790,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_extension: +.. _class_ScriptLanguageExtension_private_method__get_doc_comment_delimiters: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_extension** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_doc_comment_delimiters**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_doc_comment_delimiters>` .. container:: contribute @@ -686,11 +804,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_global_class_name: +.. _class_ScriptLanguageExtension_private_method__get_extension: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_global_class_name** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`String<class_String>` **_get_extension**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_extension>` .. container:: contribute @@ -700,11 +818,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_name: +.. _class_ScriptLanguageExtension_private_method__get_global_class_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_global_class_name**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_global_class_name>` .. container:: contribute @@ -714,11 +832,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_public_annotations: +.. _class_ScriptLanguageExtension_private_method__get_name: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_public_annotations** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_name>` .. container:: contribute @@ -728,11 +846,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_public_constants: +.. _class_ScriptLanguageExtension_private_method__get_public_annotations: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_public_constants** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_public_annotations**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_public_annotations>` .. container:: contribute @@ -742,11 +860,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_public_functions: +.. _class_ScriptLanguageExtension_private_method__get_public_constants: .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **_get_public_functions** **(** **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_public_constants**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_public_constants>` .. container:: contribute @@ -756,11 +874,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_recognized_extensions: +.. _class_ScriptLanguageExtension_private_method__get_public_functions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **_get_public_functions**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_public_functions>` .. container:: contribute @@ -770,11 +888,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_reserved_words: +.. _class_ScriptLanguageExtension_private_method__get_recognized_extensions: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_reserved_words** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_recognized_extensions**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_recognized_extensions>` .. container:: contribute @@ -784,11 +902,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_string_delimiters: +.. _class_ScriptLanguageExtension_private_method__get_reserved_words: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_get_string_delimiters** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_reserved_words**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_reserved_words>` .. container:: contribute @@ -798,11 +916,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__get_type: +.. _class_ScriptLanguageExtension_private_method__get_string_delimiters: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_type** **(** **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_get_string_delimiters**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_string_delimiters>` .. container:: contribute @@ -812,11 +930,51 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__handles_global_class_type: +.. _class_ScriptLanguageExtension_private_method__get_type: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_get_type**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__get_type>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__handles_global_class_type: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_handles_global_class_type**\ (\ type\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__handles_global_class_type>` + +.. container:: contribute + + There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__has_named_classes: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_has_named_classes**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__has_named_classes>` + +**Deprecated:** This method is not called by the engine. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__init: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_handles_global_class_type** **(** :ref:`String<class_String>` type **)** |virtual| |const| +|void| **_init**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__init>` .. container:: contribute @@ -826,11 +984,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__has_named_classes: +.. _class_ScriptLanguageExtension_private_method__is_control_flow_keyword: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_named_classes** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_control_flow_keyword**\ (\ keyword\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__is_control_flow_keyword>` .. container:: contribute @@ -840,11 +998,11 @@ void **_frame** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__init: +.. _class_ScriptLanguageExtension_private_method__is_using_templates: .. rst-class:: classref-method -void **_init** **(** **)** |virtual| +:ref:`bool<class_bool>` **_is_using_templates**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__is_using_templates>` .. container:: contribute @@ -854,11 +1012,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__is_control_flow_keyword: +.. _class_ScriptLanguageExtension_private_method__lookup_code: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_control_flow_keyword** **(** :ref:`String<class_String>` keyword **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_lookup_code**\ (\ code\: :ref:`String<class_String>`, symbol\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, owner\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__lookup_code>` .. container:: contribute @@ -868,11 +1026,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__is_using_templates: +.. _class_ScriptLanguageExtension_private_method__make_function: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_using_templates** **(** **)** |virtual| +:ref:`String<class_String>` **_make_function**\ (\ class_name\: :ref:`String<class_String>`, function_name\: :ref:`String<class_String>`, function_args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__make_function>` .. container:: contribute @@ -882,11 +1040,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__lookup_code: +.. _class_ScriptLanguageExtension_private_method__make_template: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_lookup_code** **(** :ref:`String<class_String>` code, :ref:`String<class_String>` symbol, :ref:`String<class_String>` path, :ref:`Object<class_Object>` owner **)** |virtual| |const| +:ref:`Script<class_Script>` **_make_template**\ (\ template\: :ref:`String<class_String>`, class_name\: :ref:`String<class_String>`, base_class_name\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__make_template>` .. container:: contribute @@ -896,11 +1054,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__make_function: +.. _class_ScriptLanguageExtension_private_method__open_in_external_editor: .. rst-class:: classref-method -:ref:`String<class_String>` **_make_function** **(** :ref:`String<class_String>` class_name, :ref:`String<class_String>` function_name, :ref:`PackedStringArray<class_PackedStringArray>` function_args **)** |virtual| |const| +:ref:`Error<enum_@GlobalScope_Error>` **_open_in_external_editor**\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__open_in_external_editor>` .. container:: contribute @@ -910,11 +1068,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__make_template: +.. _class_ScriptLanguageExtension_private_method__overrides_external_editor: .. rst-class:: classref-method -:ref:`Script<class_Script>` **_make_template** **(** :ref:`String<class_String>` template, :ref:`String<class_String>` class_name, :ref:`String<class_String>` base_class_name **)** |virtual| |const| +:ref:`bool<class_bool>` **_overrides_external_editor**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__overrides_external_editor>` .. container:: contribute @@ -924,11 +1082,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__open_in_external_editor: +.. _class_ScriptLanguageExtension_private_method__preferred_file_name_casing: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_open_in_external_editor** **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |virtual| +:ref:`ScriptNameCasing<enum_ScriptLanguage_ScriptNameCasing>` **_preferred_file_name_casing**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__preferred_file_name_casing>` .. container:: contribute @@ -938,11 +1096,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__overrides_external_editor: +.. _class_ScriptLanguageExtension_private_method__profiling_get_accumulated_data: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_overrides_external_editor** **(** **)** |virtual| +:ref:`int<class_int>` **_profiling_get_accumulated_data**\ (\ info_array\: ``ScriptLanguageExtensionProfilingInfo*``, info_max\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__profiling_get_accumulated_data>` .. container:: contribute @@ -952,11 +1110,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__profiling_get_accumulated_data: +.. _class_ScriptLanguageExtension_private_method__profiling_get_frame_data: .. rst-class:: classref-method -:ref:`int<class_int>` **_profiling_get_accumulated_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int<class_int>` info_max **)** |virtual| +:ref:`int<class_int>` **_profiling_get_frame_data**\ (\ info_array\: ``ScriptLanguageExtensionProfilingInfo*``, info_max\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__profiling_get_frame_data>` .. container:: contribute @@ -966,11 +1124,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__profiling_get_frame_data: +.. _class_ScriptLanguageExtension_private_method__profiling_set_save_native_calls: .. rst-class:: classref-method -:ref:`int<class_int>` **_profiling_get_frame_data** **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int<class_int>` info_max **)** |virtual| +|void| **_profiling_set_save_native_calls**\ (\ enable\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__profiling_set_save_native_calls>` .. container:: contribute @@ -980,11 +1138,11 @@ void **_init** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__profiling_start: +.. _class_ScriptLanguageExtension_private_method__profiling_start: .. rst-class:: classref-method -void **_profiling_start** **(** **)** |virtual| +|void| **_profiling_start**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__profiling_start>` .. container:: contribute @@ -994,11 +1152,11 @@ void **_profiling_start** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__profiling_stop: +.. _class_ScriptLanguageExtension_private_method__profiling_stop: .. rst-class:: classref-method -void **_profiling_stop** **(** **)** |virtual| +|void| **_profiling_stop**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__profiling_stop>` .. container:: contribute @@ -1008,11 +1166,11 @@ void **_profiling_stop** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__reload_all_scripts: +.. _class_ScriptLanguageExtension_private_method__reload_all_scripts: .. rst-class:: classref-method -void **_reload_all_scripts** **(** **)** |virtual| +|void| **_reload_all_scripts**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__reload_all_scripts>` .. container:: contribute @@ -1022,11 +1180,11 @@ void **_reload_all_scripts** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__reload_tool_script: +.. _class_ScriptLanguageExtension_private_method__reload_tool_script: .. rst-class:: classref-method -void **_reload_tool_script** **(** :ref:`Script<class_Script>` script, :ref:`bool<class_bool>` soft_reload **)** |virtual| +|void| **_reload_tool_script**\ (\ script\: :ref:`Script<class_Script>`, soft_reload\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__reload_tool_script>` .. container:: contribute @@ -1036,11 +1194,11 @@ void **_reload_tool_script** **(** :ref:`Script<class_Script>` script, :ref:`boo ---- -.. _class_ScriptLanguageExtension_method__remove_named_global_constant: +.. _class_ScriptLanguageExtension_private_method__remove_named_global_constant: .. rst-class:: classref-method -void **_remove_named_global_constant** **(** :ref:`StringName<class_StringName>` name **)** |virtual| +|void| **_remove_named_global_constant**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__remove_named_global_constant>` .. container:: contribute @@ -1050,11 +1208,11 @@ void **_remove_named_global_constant** **(** :ref:`StringName<class_StringName>` ---- -.. _class_ScriptLanguageExtension_method__supports_builtin_mode: +.. _class_ScriptLanguageExtension_private_method__supports_builtin_mode: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_supports_builtin_mode** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_supports_builtin_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__supports_builtin_mode>` .. container:: contribute @@ -1064,11 +1222,11 @@ void **_remove_named_global_constant** **(** :ref:`StringName<class_StringName>` ---- -.. _class_ScriptLanguageExtension_method__supports_documentation: +.. _class_ScriptLanguageExtension_private_method__supports_documentation: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_supports_documentation** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_supports_documentation**\ (\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__supports_documentation>` .. container:: contribute @@ -1078,11 +1236,11 @@ void **_remove_named_global_constant** **(** :ref:`StringName<class_StringName>` ---- -.. _class_ScriptLanguageExtension_method__thread_enter: +.. _class_ScriptLanguageExtension_private_method__thread_enter: .. rst-class:: classref-method -void **_thread_enter** **(** **)** |virtual| +|void| **_thread_enter**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__thread_enter>` .. container:: contribute @@ -1092,11 +1250,11 @@ void **_thread_enter** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__thread_exit: +.. _class_ScriptLanguageExtension_private_method__thread_exit: .. rst-class:: classref-method -void **_thread_exit** **(** **)** |virtual| +|void| **_thread_exit**\ (\ ) |virtual| :ref:`🔗<class_ScriptLanguageExtension_private_method__thread_exit>` .. container:: contribute @@ -1106,11 +1264,11 @@ void **_thread_exit** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__validate: +.. _class_ScriptLanguageExtension_private_method__validate: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_validate** **(** :ref:`String<class_String>` script, :ref:`String<class_String>` path, :ref:`bool<class_bool>` validate_functions, :ref:`bool<class_bool>` validate_errors, :ref:`bool<class_bool>` validate_warnings, :ref:`bool<class_bool>` validate_safe_lines **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_validate**\ (\ script\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`, validate_functions\: :ref:`bool<class_bool>`, validate_errors\: :ref:`bool<class_bool>`, validate_warnings\: :ref:`bool<class_bool>`, validate_safe_lines\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__validate>` .. container:: contribute @@ -1120,11 +1278,11 @@ void **_thread_exit** **(** **)** |virtual| ---- -.. _class_ScriptLanguageExtension_method__validate_path: +.. _class_ScriptLanguageExtension_private_method__validate_path: .. rst-class:: classref-method -:ref:`String<class_String>` **_validate_path** **(** :ref:`String<class_String>` path **)** |virtual| |const| +:ref:`String<class_String>` **_validate_path**\ (\ path\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_ScriptLanguageExtension_private_method__validate_path>` .. container:: contribute @@ -1137,3 +1295,4 @@ void **_thread_exit** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scrollbar.rst b/classes/class_scrollbar.rst index a21a383fc36..5de397d0be2 100644 --- a/classes/class_scrollbar.rst +++ b/classes/class_scrollbar.rst @@ -37,6 +37,38 @@ Properties | :ref:`float<class_float>` | step | ``0.0`` (overrides :ref:`Range<class_Range_property_step>`) | +---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_ScrollBar_theme_icon_decrement>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_ScrollBar_theme_icon_decrement_highlight>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_pressed<class_ScrollBar_theme_icon_decrement_pressed>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_ScrollBar_theme_icon_increment>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_ScrollBar_theme_icon_increment_highlight>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_pressed<class_ScrollBar_theme_icon_increment_pressed>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber<class_ScrollBar_theme_style_grabber>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_highlight<class_ScrollBar_theme_style_grabber_highlight>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_pressed<class_ScrollBar_theme_style_grabber_pressed>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll<class_ScrollBar_theme_style_scroll>` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll_focus<class_ScrollBar_theme_style_scroll_focus>` | + +-----------------------------------+----------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -50,7 +82,7 @@ Signals .. rst-class:: classref-signal -**scrolling** **(** **)** +**scrolling**\ (\ ) :ref:`🔗<class_ScrollBar_signal_scrolling>` Emitted when the scrollbar is being scrolled. @@ -67,15 +99,152 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **custom_step** = ``-1.0`` +:ref:`float<class_float>` **custom_step** = ``-1.0`` :ref:`🔗<class_ScrollBar_property_custom_step>` .. rst-class:: classref-property-setget -- void **set_custom_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_custom_step** **(** **)** +- |void| **set_custom_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_custom_step**\ (\ ) Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the **ScrollBar** is focused. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_ScrollBar_theme_icon_decrement: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **decrement** :ref:`🔗<class_ScrollBar_theme_icon_decrement>` + +Icon used as a button to scroll the **ScrollBar** left/up. Supports custom step using the :ref:`custom_step<class_ScrollBar_property_custom_step>` property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_decrement_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`🔗<class_ScrollBar_theme_icon_decrement_highlight>` + +Displayed when the mouse cursor hovers over the decrement button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_decrement_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **decrement_pressed** :ref:`🔗<class_ScrollBar_theme_icon_decrement_pressed>` + +Displayed when the decrement button is being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **increment** :ref:`🔗<class_ScrollBar_theme_icon_increment>` + +Icon used as a button to scroll the **ScrollBar** right/down. Supports custom step using the :ref:`custom_step<class_ScrollBar_property_custom_step>` property. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`🔗<class_ScrollBar_theme_icon_increment_highlight>` + +Displayed when the mouse cursor hovers over the increment button. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **increment_pressed** :ref:`🔗<class_ScrollBar_theme_icon_increment_pressed>` + +Displayed when the increment button is being pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **grabber** :ref:`🔗<class_ScrollBar_theme_style_grabber>` + +Used as texture for the grabber, the draggable element representing current scroll. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **grabber_highlight** :ref:`🔗<class_ScrollBar_theme_style_grabber_highlight>` + +Used when the mouse hovers over the grabber. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **grabber_pressed** :ref:`🔗<class_ScrollBar_theme_style_grabber_pressed>` + +Used when the grabber is being dragged. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_scroll: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **scroll** :ref:`🔗<class_ScrollBar_theme_style_scroll>` + +Used as background of this **ScrollBar**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_scroll_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **scroll_focus** :ref:`🔗<class_ScrollBar_theme_style_scroll_focus>` + +Used as background when the **ScrollBar** has the GUI focus. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -83,3 +252,4 @@ Overrides the step used when clicking increment and decrement buttons or when us .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_scrollcontainer.rst b/classes/class_scrollcontainer.rst index 235a264b199..d5b548c9050 100644 --- a/classes/class_scrollcontainer.rst +++ b/classes/class_scrollcontainer.rst @@ -66,13 +66,13 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_control_visible<class_ScrollContainer_method_ensure_control_visible>` **(** :ref:`Control<class_Control>` control **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_ScrollContainer_method_get_h_scroll_bar>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ScrollContainer_method_get_v_scroll_bar>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ensure_control_visible<class_ScrollContainer_method_ensure_control_visible>`\ (\ control\: :ref:`Control<class_Control>`\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_ScrollContainer_method_get_h_scroll_bar>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_ScrollContainer_method_get_v_scroll_bar>`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -99,9 +99,11 @@ Signals .. rst-class:: classref-signal -**scroll_ended** **(** **)** +**scroll_ended**\ (\ ) :ref:`🔗<class_ScrollContainer_signal_scroll_ended>` -Emitted when scrolling stops. +Emitted when scrolling stops when dragging the scrollable area *with a touch event*. This signal is *not* emitted when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + +\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` is enabled. .. rst-class:: classref-item-separator @@ -111,9 +113,11 @@ Emitted when scrolling stops. .. rst-class:: classref-signal -**scroll_started** **(** **)** +**scroll_started**\ (\ ) :ref:`🔗<class_ScrollContainer_signal_scroll_started>` + +Emitted when scrolling starts when dragging the scrollable area w\ *ith a touch event*. This signal is *not* emitted when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. -Emitted when scrolling is started. +\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>` is enabled. .. rst-class:: classref-section-separator @@ -128,7 +132,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ScrollMode**: +enum **ScrollMode**: :ref:`🔗<enum_ScrollContainer_ScrollMode>` .. _class_ScrollContainer_constant_SCROLL_MODE_DISABLED: @@ -175,12 +179,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **follow_focus** = ``false`` +:ref:`bool<class_bool>` **follow_focus** = ``false`` :ref:`🔗<class_ScrollContainer_property_follow_focus>` .. rst-class:: classref-property-setget -- void **set_follow_focus** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_following_focus** **(** **)** +- |void| **set_follow_focus**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_following_focus**\ (\ ) If ``true``, the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. @@ -192,12 +196,12 @@ If ``true``, the ScrollContainer will automatically scroll to focused children ( .. rst-class:: classref-property -:ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **horizontal_scroll_mode** = ``1`` +:ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **horizontal_scroll_mode** = ``1`` :ref:`🔗<class_ScrollContainer_property_horizontal_scroll_mode>` .. rst-class:: classref-property-setget -- void **set_horizontal_scroll_mode** **(** :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` value **)** -- :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **get_horizontal_scroll_mode** **(** **)** +- |void| **set_horizontal_scroll_mode**\ (\ value\: :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>`\ ) +- :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **get_horizontal_scroll_mode**\ (\ ) Controls whether horizontal scrollbar can be used and when it should be visible. See :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` for options. @@ -209,12 +213,12 @@ Controls whether horizontal scrollbar can be used and when it should be visible. .. rst-class:: classref-property -:ref:`int<class_int>` **scroll_deadzone** = ``0`` +:ref:`int<class_int>` **scroll_deadzone** = ``0`` :ref:`🔗<class_ScrollContainer_property_scroll_deadzone>` .. rst-class:: classref-property-setget -- void **set_deadzone** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_deadzone** **(** **)** +- |void| **set_deadzone**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_deadzone**\ (\ ) Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive. @@ -226,16 +230,16 @@ Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive. .. rst-class:: classref-property -:ref:`int<class_int>` **scroll_horizontal** = ``0`` +:ref:`int<class_int>` **scroll_horizontal** = ``0`` :ref:`🔗<class_ScrollContainer_property_scroll_horizontal>` .. rst-class:: classref-property-setget -- void **set_h_scroll** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_h_scroll** **(** **)** +- |void| **set_h_scroll**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_h_scroll**\ (\ ) -The current horizontal scroll value. +The current horizontal scroll value. -\ **Note:** If you are setting this value in the :ref:`Node._ready<class_Node_method__ready>` function or earlier, it needs to be wrapped with :ref:`Object.set_deferred<class_Object_method_set_deferred>`, since scroll bar's :ref:`Range.max_value<class_Range_property_max_value>` is not initialized yet. +\ **Note:** If you are setting this value in the :ref:`Node._ready<class_Node_private_method__ready>` function or earlier, it needs to be wrapped with :ref:`Object.set_deferred<class_Object_method_set_deferred>`, since scroll bar's :ref:`Range.max_value<class_Range_property_max_value>` is not initialized yet. :: @@ -250,12 +254,12 @@ The current horizontal scroll value. .. rst-class:: classref-property -:ref:`float<class_float>` **scroll_horizontal_custom_step** = ``-1.0`` +:ref:`float<class_float>` **scroll_horizontal_custom_step** = ``-1.0`` :ref:`🔗<class_ScrollContainer_property_scroll_horizontal_custom_step>` .. rst-class:: classref-property-setget -- void **set_horizontal_custom_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_horizontal_custom_step** **(** **)** +- |void| **set_horizontal_custom_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_horizontal_custom_step**\ (\ ) Overrides the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` used when clicking the internal scroll bar's horizontal increment and decrement buttons or when using arrow keys when the :ref:`ScrollBar<class_ScrollBar>` is focused. @@ -267,12 +271,12 @@ Overrides the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` .. rst-class:: classref-property -:ref:`int<class_int>` **scroll_vertical** = ``0`` +:ref:`int<class_int>` **scroll_vertical** = ``0`` :ref:`🔗<class_ScrollContainer_property_scroll_vertical>` .. rst-class:: classref-property-setget -- void **set_v_scroll** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_v_scroll** **(** **)** +- |void| **set_v_scroll**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_v_scroll**\ (\ ) The current vertical scroll value. @@ -291,12 +295,12 @@ The current vertical scroll value. .. rst-class:: classref-property -:ref:`float<class_float>` **scroll_vertical_custom_step** = ``-1.0`` +:ref:`float<class_float>` **scroll_vertical_custom_step** = ``-1.0`` :ref:`🔗<class_ScrollContainer_property_scroll_vertical_custom_step>` .. rst-class:: classref-property-setget -- void **set_vertical_custom_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_vertical_custom_step** **(** **)** +- |void| **set_vertical_custom_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_vertical_custom_step**\ (\ ) Overrides the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` used when clicking the internal scroll bar's vertical increment and decrement buttons or when using arrow keys when the :ref:`ScrollBar<class_ScrollBar>` is focused. @@ -308,12 +312,12 @@ Overrides the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` .. rst-class:: classref-property -:ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **vertical_scroll_mode** = ``1`` +:ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **vertical_scroll_mode** = ``1`` :ref:`🔗<class_ScrollContainer_property_vertical_scroll_mode>` .. rst-class:: classref-property-setget -- void **set_vertical_scroll_mode** **(** :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` value **)** -- :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **get_vertical_scroll_mode** **(** **)** +- |void| **set_vertical_scroll_mode**\ (\ value\: :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>`\ ) +- :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` **get_vertical_scroll_mode**\ (\ ) Controls whether vertical scrollbar can be used and when it should be visible. See :ref:`ScrollMode<enum_ScrollContainer_ScrollMode>` for options. @@ -330,7 +334,7 @@ Method Descriptions .. rst-class:: classref-method -void **ensure_control_visible** **(** :ref:`Control<class_Control>` control **)** +|void| **ensure_control_visible**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_ScrollContainer_method_ensure_control_visible>` Ensures the given ``control`` is visible (must be a direct or indirect child of the ScrollContainer). Used by :ref:`follow_focus<class_ScrollContainer_property_follow_focus>`. @@ -350,7 +354,7 @@ Ensures the given ``control`` is visible (must be a direct or indirect child of .. rst-class:: classref-method -:ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar** **(** **)** +:ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar**\ (\ ) :ref:`🔗<class_ScrollContainer_method_get_h_scroll_bar>` Returns the horizontal scrollbar :ref:`HScrollBar<class_HScrollBar>` of this **ScrollContainer**. @@ -364,7 +368,7 @@ Returns the horizontal scrollbar :ref:`HScrollBar<class_HScrollBar>` of this **S .. rst-class:: classref-method -:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)** +:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) :ref:`🔗<class_ScrollContainer_method_get_v_scroll_bar>` Returns the vertical scrollbar :ref:`VScrollBar<class_VScrollBar>` of this **ScrollContainer**. @@ -383,7 +387,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_ScrollContainer_theme_style_panel>` The background :ref:`StyleBox<class_StyleBox>` of the **ScrollContainer**. @@ -394,3 +398,4 @@ The background :ref:`StyleBox<class_StyleBox>` of the **ScrollContainer**. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_segmentshape2d.rst b/classes/class_segmentshape2d.rst index 43f4f76a080..3fb405b5a02 100644 --- a/classes/class_segmentshape2d.rst +++ b/classes/class_segmentshape2d.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **a** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **a** = ``Vector2(0, 0)`` :ref:`🔗<class_SegmentShape2D_property_a>` .. rst-class:: classref-property-setget -- void **set_a** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_a** **(** **)** +- |void| **set_a**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_a**\ (\ ) The segment's first point position. @@ -65,12 +65,12 @@ The segment's first point position. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **b** = ``Vector2(0, 10)`` +:ref:`Vector2<class_Vector2>` **b** = ``Vector2(0, 10)`` :ref:`🔗<class_SegmentShape2D_property_b>` .. rst-class:: classref-property-setget -- void **set_b** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_b** **(** **)** +- |void| **set_b**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_b**\ (\ ) The segment's second point position. @@ -81,3 +81,4 @@ The segment's second point position. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index 58a7cd0f58a..dba9b2dc128 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -46,13 +46,13 @@ Methods .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------+ - | void | :ref:`post<class_Semaphore_method_post>` **(** **)** | - +-------------------------+--------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`try_wait<class_Semaphore_method_try_wait>` **(** **)** | - +-------------------------+--------------------------------------------------------------+ - | void | :ref:`wait<class_Semaphore_method_wait>` **(** **)** | - +-------------------------+--------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------+ + | |void| | :ref:`post<class_Semaphore_method_post>`\ (\ ) | + +-------------------------+--------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`try_wait<class_Semaphore_method_try_wait>`\ (\ ) | + +-------------------------+--------------------------------------------------------+ + | |void| | :ref:`wait<class_Semaphore_method_wait>`\ (\ ) | + +-------------------------+--------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,7 +67,7 @@ Method Descriptions .. rst-class:: classref-method -void **post** **(** **)** +|void| **post**\ (\ ) :ref:`🔗<class_Semaphore_method_post>` Lowers the **Semaphore**, allowing one more thread in. @@ -79,7 +79,7 @@ Lowers the **Semaphore**, allowing one more thread in. .. rst-class:: classref-method -:ref:`bool<class_bool>` **try_wait** **(** **)** +:ref:`bool<class_bool>` **try_wait**\ (\ ) :ref:`🔗<class_Semaphore_method_try_wait>` Like :ref:`wait<class_Semaphore_method_wait>`, but won't block, so if the value is zero, fails immediately and returns ``false``. If non-zero, it returns ``true`` to report success. @@ -91,7 +91,7 @@ Like :ref:`wait<class_Semaphore_method_wait>`, but won't block, so if the value .. rst-class:: classref-method -void **wait** **(** **)** +|void| **wait**\ (\ ) :ref:`🔗<class_Semaphore_method_wait>` Waits for the **Semaphore**, if its value is zero, blocks until non-zero. @@ -102,3 +102,4 @@ Waits for the **Semaphore**, if its value is zero, blocks until non-zero. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_separationrayshape2d.rst b/classes/class_separationrayshape2d.rst index d4c3763411a..3c2d581ad31 100644 --- a/classes/class_separationrayshape2d.rst +++ b/classes/class_separationrayshape2d.rst @@ -19,7 +19,7 @@ A 2D ray shape used for physics collision that tries to separate itself from any Description ----------- -A 2D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D<class_CollisionShape2D>`. When a **SeparationRayShape2D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. It can for example be used for spears falling from the sky. +A 2D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D<class_CollisionShape2D>`. When a **SeparationRayShape2D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. For example, a **SeparationRayShape2D** next to a character can allow it to instantly move up when touching stairs. .. rst-class:: classref-reftable-group @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **length** = ``20.0`` +:ref:`float<class_float>` **length** = ``20.0`` :ref:`🔗<class_SeparationRayShape2D_property_length>` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_length**\ (\ ) The ray's length. @@ -65,12 +65,12 @@ The ray's length. .. rst-class:: classref-property -:ref:`bool<class_bool>` **slide_on_slope** = ``false`` +:ref:`bool<class_bool>` **slide_on_slope** = ``false`` :ref:`🔗<class_SeparationRayShape2D_property_slide_on_slope>` .. rst-class:: classref-property-setget -- void **set_slide_on_slope** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_slide_on_slope** **(** **)** +- |void| **set_slide_on_slope**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_slide_on_slope**\ (\ ) If ``false`` (default), the shape always separates and returns a normal along its own direction. @@ -83,3 +83,4 @@ If ``true``, the shape can return the correct normal and separate in any directi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_separationrayshape3d.rst b/classes/class_separationrayshape3d.rst index 235fbe16981..a32a4be7086 100644 --- a/classes/class_separationrayshape3d.rst +++ b/classes/class_separationrayshape3d.rst @@ -19,7 +19,7 @@ A 3D ray shape used for physics collision that tries to separate itself from any Description ----------- -A 3D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape2D<class_CollisionShape2D>`. When a **SeparationRayShape3D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. It can for example be used for spears falling from the sky. +A 3D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D<class_CollisionShape3D>`. When a **SeparationRayShape3D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. For example, a **SeparationRayShape3D** next to a character can allow it to instantly move up when touching stairs. .. rst-class:: classref-reftable-group @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **length** = ``1.0`` +:ref:`float<class_float>` **length** = ``1.0`` :ref:`🔗<class_SeparationRayShape3D_property_length>` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_length**\ (\ ) The ray's length. @@ -65,12 +65,12 @@ The ray's length. .. rst-class:: classref-property -:ref:`bool<class_bool>` **slide_on_slope** = ``false`` +:ref:`bool<class_bool>` **slide_on_slope** = ``false`` :ref:`🔗<class_SeparationRayShape3D_property_slide_on_slope>` .. rst-class:: classref-property-setget -- void **set_slide_on_slope** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_slide_on_slope** **(** **)** +- |void| **set_slide_on_slope**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_slide_on_slope**\ (\ ) If ``false`` (default), the shape always separates and returns a normal along its own direction. @@ -83,3 +83,4 @@ If ``true``, the shape can return the correct normal and separate in any directi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_separator.rst b/classes/class_separator.rst index e9e785349b5..149e0a4e3aa 100644 --- a/classes/class_separator.rst +++ b/classes/class_separator.rst @@ -23,6 +23,49 @@ Description Abstract base class for separators, used for separating other controls. **Separator**\ s are purely visual and normally drawn as a :ref:`StyleBoxLine<class_StyleBoxLine>`. +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`separation<class_Separator_theme_constant_separation>` | ``0`` | + +---------------------------------+--------------------------------------------------------------+-------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`separator<class_Separator_theme_style_separator>` | | + +---------------------------------+--------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_Separator_theme_constant_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int<class_int>` **separation** = ``0`` :ref:`🔗<class_Separator_theme_constant_separation>` + +The size of the area covered by the separator. Effectively works like a minimum width/height. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Separator_theme_style_separator: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **separator** :ref:`🔗<class_Separator_theme_style_separator>` + +The style for the separator line. Works best with :ref:`StyleBoxLine<class_StyleBoxLine>` (remember to enable :ref:`StyleBoxLine.vertical<class_StyleBoxLine_property_vertical>` for :ref:`VSeparator<class_VSeparator>`). + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -30,3 +73,4 @@ Abstract base class for separators, used for separating other controls. **Separa .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shader.rst b/classes/class_shader.rst index 5fe28caff6e..00d4576142b 100644 --- a/classes/class_shader.rst +++ b/classes/class_shader.rst @@ -52,15 +52,15 @@ Methods .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_default_texture_parameter<class_Shader_method_get_default_texture_parameter>` **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` index=0 **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mode<enum_Shader_Mode>` | :ref:`get_mode<class_Shader_method_get_mode>` **(** **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_shader_uniform_list<class_Shader_method_get_shader_uniform_list>` **(** :ref:`bool<class_bool>` get_groups=false **)** | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_texture_parameter<class_Shader_method_set_default_texture_parameter>` **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`int<class_int>` index=0 **)** | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_default_texture_parameter<class_Shader_method_get_default_texture_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`, index\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode<enum_Shader_Mode>` | :ref:`get_mode<class_Shader_method_get_mode>`\ (\ ) |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_shader_uniform_list<class_Shader_method_get_shader_uniform_list>`\ (\ get_groups\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_texture_parameter<class_Shader_method_set_default_texture_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`, index\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,7 +75,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗<enum_Shader_Mode>` .. _class_Shader_constant_MODE_SPATIAL: @@ -130,12 +130,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **code** = ``""`` +:ref:`String<class_String>` **code** = ``""`` :ref:`🔗<class_Shader_property_code>` .. rst-class:: classref-property-setget -- void **set_code** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_code** **(** **)** +- |void| **set_code**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_code**\ (\ ) Returns the shader's code as the user has written it, not the full generated code used internally. @@ -152,7 +152,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_default_texture_parameter** **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` index=0 **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_default_texture_parameter**\ (\ name\: :ref:`StringName<class_StringName>`, index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_Shader_method_get_default_texture_parameter>` Returns the texture that is set as default for the specified parameter. @@ -168,7 +168,7 @@ Returns the texture that is set as default for the specified parameter. .. rst-class:: classref-method -:ref:`Mode<enum_Shader_Mode>` **get_mode** **(** **)** |const| +:ref:`Mode<enum_Shader_Mode>` **get_mode**\ (\ ) |const| :ref:`🔗<class_Shader_method_get_mode>` Returns the shader mode for the shader. @@ -180,7 +180,7 @@ Returns the shader mode for the shader. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_shader_uniform_list** **(** :ref:`bool<class_bool>` get_groups=false **)** +:ref:`Array<class_Array>` **get_shader_uniform_list**\ (\ get_groups\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Shader_method_get_shader_uniform_list>` Get the list of shader uniforms that can be assigned to a :ref:`ShaderMaterial<class_ShaderMaterial>`, for use with :ref:`ShaderMaterial.set_shader_parameter<class_ShaderMaterial_method_set_shader_parameter>` and :ref:`ShaderMaterial.get_shader_parameter<class_ShaderMaterial_method_get_shader_parameter>`. The parameters returned are contained in dictionaries in a similar format to the ones returned by :ref:`Object.get_property_list<class_Object_method_get_property_list>`. @@ -194,7 +194,7 @@ If argument ``get_groups`` is true, parameter grouping hints will be provided. .. rst-class:: classref-method -void **set_default_texture_parameter** **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture, :ref:`int<class_int>` index=0 **)** +|void| **set_default_texture_parameter**\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`, index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_Shader_method_set_default_texture_parameter>` Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the :ref:`ShaderMaterial<class_ShaderMaterial>`. @@ -209,3 +209,4 @@ Sets the default texture to be used with a texture uniform. The default is used .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shaderglobalsoverride.rst b/classes/class_shaderglobalsoverride.rst index 84032084e1b..055dad2b6ce 100644 --- a/classes/class_shaderglobalsoverride.rst +++ b/classes/class_shaderglobalsoverride.rst @@ -12,7 +12,7 @@ ShaderGlobalsOverride **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Overrides global shader parameters' values in a specific scene. +A node used to override global shader parameters' values in a scene. .. rst-class:: classref-introduction-group @@ -25,6 +25,13 @@ Similar to how a :ref:`WorldEnvironment<class_WorldEnvironment>` node can be use \ **Note:** All **ShaderGlobalsOverride** nodes are made part of a ``"shader_overrides_group"`` group when they are added to the scene tree. The currently active **ShaderGlobalsOverride** node also has a ``"shader_overrides_group_active"`` group added to it. You can use this to check which **ShaderGlobalsOverride** node is currently active. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Shading language <../tutorials/shaders/shader_reference/shading_language>` + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -32,3 +39,4 @@ Similar to how a :ref:`WorldEnvironment<class_WorldEnvironment>` node can be use .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shaderinclude.rst b/classes/class_shaderinclude.rst index 476aa7fbac9..e9b74ac9aea 100644 --- a/classes/class_shaderinclude.rst +++ b/classes/class_shaderinclude.rst @@ -53,12 +53,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **code** = ``""`` +:ref:`String<class_String>` **code** = ``""`` :ref:`🔗<class_ShaderInclude_property_code>` .. rst-class:: classref-property-setget -- void **set_code** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_code** **(** **)** +- |void| **set_code**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_code**\ (\ ) Returns the code of the shader include file. The returned text is what the user has written, not the full generated code used internally. @@ -69,3 +69,4 @@ Returns the code of the shader include file. The returned text is what the user .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shadermaterial.rst b/classes/class_shadermaterial.rst index d686fdeb9e2..7f8ad034ffb 100644 --- a/classes/class_shadermaterial.rst +++ b/classes/class_shadermaterial.rst @@ -12,14 +12,18 @@ ShaderMaterial **Inherits:** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -A material that uses a custom :ref:`Shader<class_Shader>` program. +A material defined by a custom :ref:`Shader<class_Shader>` program and the values of its shader parameters. .. rst-class:: classref-introduction-group Description ----------- -A material that uses a custom :ref:`Shader<class_Shader>` program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader. +A material that uses a custom :ref:`Shader<class_Shader>` program to render visual items (canvas items, meshes, skies, fog), or to process particles. Compared to other materials, **ShaderMaterial** gives deeper control over the generated shader code. For more information, see the shaders documentation index below. + +Multiple **ShaderMaterial**\ s can use the same shader and configure different values for the shader uniforms. + +\ **Note:** For performance reasons, the :ref:`Resource.changed<class_Resource_signal_changed>` signal is only emitted when the :ref:`Resource.resource_name<class_Resource_property_resource_name>` changes. Only in editor, it is also emitted for :ref:`shader<class_ShaderMaterial_property_shader>` changes. .. rst-class:: classref-introduction-group @@ -48,11 +52,11 @@ Methods .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_shader_parameter<class_ShaderMaterial_method_get_shader_parameter>` **(** :ref:`StringName<class_StringName>` param **)** |const| | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_shader_parameter<class_ShaderMaterial_method_set_shader_parameter>` **(** :ref:`StringName<class_StringName>` param, :ref:`Variant<class_Variant>` value **)** | - +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_shader_parameter<class_ShaderMaterial_method_get_shader_parameter>`\ (\ param\: :ref:`StringName<class_StringName>`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_shader_parameter<class_ShaderMaterial_method_set_shader_parameter>`\ (\ param\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Shader<class_Shader>` **shader** +:ref:`Shader<class_Shader>` **shader** :ref:`🔗<class_ShaderMaterial_property_shader>` .. rst-class:: classref-property-setget -- void **set_shader** **(** :ref:`Shader<class_Shader>` value **)** -- :ref:`Shader<class_Shader>` **get_shader** **(** **)** +- |void| **set_shader**\ (\ value\: :ref:`Shader<class_Shader>`\ ) +- :ref:`Shader<class_Shader>` **get_shader**\ (\ ) The :ref:`Shader<class_Shader>` program used to render this material. @@ -89,7 +93,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_shader_parameter** **(** :ref:`StringName<class_StringName>` param **)** |const| +:ref:`Variant<class_Variant>` **get_shader_parameter**\ (\ param\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_ShaderMaterial_method_get_shader_parameter>` Returns the current value set for this material of a uniform in the shader. @@ -101,7 +105,7 @@ Returns the current value set for this material of a uniform in the shader. .. rst-class:: classref-method -void **set_shader_parameter** **(** :ref:`StringName<class_StringName>` param, :ref:`Variant<class_Variant>` value **)** +|void| **set_shader_parameter**\ (\ param\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_ShaderMaterial_method_set_shader_parameter>` Changes the value set for this material of a uniform in the shader. @@ -116,3 +120,4 @@ Changes the value set for this material of a uniform in the shader. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shape2d.rst b/classes/class_shape2d.rst index c0c9c2c379a..2828c55fc0d 100644 --- a/classes/class_shape2d.rst +++ b/classes/class_shape2d.rst @@ -52,19 +52,19 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide<class_Shape2D_method_collide>` **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`collide_and_get_contacts<class_Shape2D_method_collide_and_get_contacts>` **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`collide_with_motion<class_Shape2D_method_collide_with_motion>` **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Vector2<class_Vector2>` local_motion, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` shape_motion **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`collide_with_motion_and_get_contacts<class_Shape2D_method_collide_with_motion_and_get_contacts>` **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Vector2<class_Vector2>` local_motion, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` shape_motion **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw<class_Shape2D_method_draw>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_Shape2D_method_get_rect>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide<class_Shape2D_method_collide>`\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`collide_and_get_contacts<class_Shape2D_method_collide_and_get_contacts>`\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`collide_with_motion<class_Shape2D_method_collide_with_motion>`\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, local_motion\: :ref:`Vector2<class_Vector2>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, shape_motion\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`collide_with_motion_and_get_contacts<class_Shape2D_method_collide_with_motion_and_get_contacts>`\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, local_motion\: :ref:`Vector2<class_Vector2>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, shape_motion\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw<class_Shape2D_method_draw>`\ (\ canvas_item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_Shape2D_method_get_rect>`\ (\ ) |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,12 +79,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **custom_solver_bias** = ``0.0`` +:ref:`float<class_float>` **custom_solver_bias** = ``0.0`` :ref:`🔗<class_Shape2D_property_custom_solver_bias>` .. rst-class:: classref-property-setget -- void **set_custom_solver_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_custom_solver_bias** **(** **)** +- |void| **set_custom_solver_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_custom_solver_bias**\ (\ ) The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved. @@ -103,7 +103,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **collide** **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform **)** +:ref:`bool<class_bool>` **collide**\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Shape2D_method_collide>` Returns ``true`` if this shape is colliding with another. @@ -117,7 +117,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **collide_and_get_contacts** **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **collide_and_get_contacts**\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Shape2D_method_collide_and_get_contacts>` Returns a list of contact point pairs where this shape touches another. @@ -135,7 +135,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. rst-class:: classref-method -:ref:`bool<class_bool>` **collide_with_motion** **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Vector2<class_Vector2>` local_motion, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` shape_motion **)** +:ref:`bool<class_bool>` **collide_with_motion**\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, local_motion\: :ref:`Vector2<class_Vector2>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, shape_motion\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Shape2D_method_collide_with_motion>` Returns whether this shape would collide with another, if a given movement was applied. @@ -149,7 +149,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **collide_with_motion_and_get_contacts** **(** :ref:`Transform2D<class_Transform2D>` local_xform, :ref:`Vector2<class_Vector2>` local_motion, :ref:`Shape2D<class_Shape2D>` with_shape, :ref:`Transform2D<class_Transform2D>` shape_xform, :ref:`Vector2<class_Vector2>` shape_motion **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **collide_with_motion_and_get_contacts**\ (\ local_xform\: :ref:`Transform2D<class_Transform2D>`, local_motion\: :ref:`Vector2<class_Vector2>`, with_shape\: :ref:`Shape2D<class_Shape2D>`, shape_xform\: :ref:`Transform2D<class_Transform2D>`, shape_motion\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Shape2D_method_collide_with_motion_and_get_contacts>` Returns a list of contact point pairs where this shape would touch another, if a given movement was applied. @@ -167,7 +167,7 @@ This method needs the transformation matrix for this shape (``local_xform``), th .. rst-class:: classref-method -void **draw** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Color<class_Color>` color **)** +|void| **draw**\ (\ canvas_item\: :ref:`RID<class_RID>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Shape2D_method_draw>` Draws a solid shape onto a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`RenderingServer<class_RenderingServer>` API filled with the specified ``color``. The exact drawing method is specific for each shape and cannot be configured. @@ -179,7 +179,7 @@ Draws a solid shape onto a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`Re .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_rect**\ (\ ) |const| :ref:`🔗<class_Shape2D_method_get_rect>` Returns a :ref:`Rect2<class_Rect2>` representing the shapes boundary. @@ -190,3 +190,4 @@ Returns a :ref:`Rect2<class_Rect2>` representing the shapes boundary. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shape3d.rst b/classes/class_shape3d.rst index eaad3974c95..66d7ea74d5d 100644 --- a/classes/class_shape3d.rst +++ b/classes/class_shape3d.rst @@ -54,9 +54,9 @@ Methods .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------+ - | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_debug_mesh<class_Shape3D_method_get_debug_mesh>` **(** **)** | - +-----------------------------------+------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------+ + | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`get_debug_mesh<class_Shape3D_method_get_debug_mesh>`\ (\ ) | + +-----------------------------------+------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **custom_solver_bias** = ``0.0`` +:ref:`float<class_float>` **custom_solver_bias** = ``0.0`` :ref:`🔗<class_Shape3D_property_custom_solver_bias>` .. rst-class:: classref-property-setget -- void **set_custom_solver_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_custom_solver_bias** **(** **)** +- |void| **set_custom_solver_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_custom_solver_bias**\ (\ ) The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved. @@ -90,12 +90,12 @@ When set to ``0``, the default value from :ref:`ProjectSettings.physics/3d/solve .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.04`` +:ref:`float<class_float>` **margin** = ``0.04`` :ref:`🔗<class_Shape3D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) The collision margin for the shape. This is not used in Godot Physics. @@ -114,7 +114,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`ArrayMesh<class_ArrayMesh>` **get_debug_mesh** **(** **)** +:ref:`ArrayMesh<class_ArrayMesh>` **get_debug_mesh**\ (\ ) :ref:`🔗<class_Shape3D_method_get_debug_mesh>` Returns the :ref:`ArrayMesh<class_ArrayMesh>` used to draw the debug collision for this **Shape3D**. @@ -125,3 +125,4 @@ Returns the :ref:`ArrayMesh<class_ArrayMesh>` used to draw the debug collision f .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shapecast2d.rst b/classes/class_shapecast2d.rst index 570813d2586..fefcbd4e2df 100644 --- a/classes/class_shapecast2d.rst +++ b/classes/class_shapecast2d.rst @@ -63,41 +63,41 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception<class_ShapeCast2D_method_add_exception>` **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception_rid<class_ShapeCast2D_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_exceptions<class_ShapeCast2D_method_clear_exceptions>` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_shapecast_update<class_ShapeCast2D_method_force_shapecast_update>` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_closest_collision_safe_fraction<class_ShapeCast2D_method_get_closest_collision_safe_fraction>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_closest_collision_unsafe_fraction<class_ShapeCast2D_method_get_closest_collision_unsafe_fraction>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_ShapeCast2D_method_get_collider>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_ShapeCast2D_method_get_collider_rid>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_ShapeCast2D_method_get_collider_shape>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_count<class_ShapeCast2D_method_get_collision_count>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_ShapeCast2D_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_ShapeCast2D_method_get_collision_normal>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_ShapeCast2D_method_get_collision_point>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_colliding<class_ShapeCast2D_method_is_colliding>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception<class_ShapeCast2D_method_remove_exception>` **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception_rid<class_ShapeCast2D_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_ShapeCast2D_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception<class_ShapeCast2D_method_add_exception>`\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception_rid<class_ShapeCast2D_method_add_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_exceptions<class_ShapeCast2D_method_clear_exceptions>`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_shapecast_update<class_ShapeCast2D_method_force_shapecast_update>`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_closest_collision_safe_fraction<class_ShapeCast2D_method_get_closest_collision_safe_fraction>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_closest_collision_unsafe_fraction<class_ShapeCast2D_method_get_closest_collision_unsafe_fraction>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_ShapeCast2D_method_get_collider>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_ShapeCast2D_method_get_collider_rid>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_ShapeCast2D_method_get_collider_shape>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_count<class_ShapeCast2D_method_get_collision_count>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_ShapeCast2D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_normal<class_ShapeCast2D_method_get_collision_normal>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_collision_point<class_ShapeCast2D_method_get_collision_point>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_colliding<class_ShapeCast2D_method_is_colliding>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception<class_ShapeCast2D_method_remove_exception>`\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception_rid<class_ShapeCast2D_method_remove_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_ShapeCast2D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,14 +112,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_ShapeCast2D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) -If ``true``, collision with :ref:`Area2D<class_Area2D>`\ s will be reported. +If ``true``, collisions with :ref:`Area2D<class_Area2D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -129,14 +129,14 @@ If ``true``, collision with :ref:`Area2D<class_Area2D>`\ s will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_ShapeCast2D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) -If ``true``, collision with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be reported. +If ``true``, collisions with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -146,12 +146,12 @@ If ``true``, collision with :ref:`PhysicsBody2D<class_PhysicsBody2D>`\ s will be .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_ShapeCast2D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. @@ -163,7 +163,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled .. rst-class:: classref-property -:ref:`Array<class_Array>` **collision_result** = ``[]`` +:ref:`Array<class_Array>` **collision_result** = ``[]`` :ref:`🔗<class_ShapeCast2D_property_collision_result>` Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState2D.get_rest_info<class_PhysicsDirectSpaceState2D_method_get_rest_info>` method. @@ -175,12 +175,12 @@ Returns the complete collision information from the collision sweep. The data re .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_ShapeCast2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) If ``true``, collisions will be reported. @@ -192,12 +192,12 @@ If ``true``, collisions will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclude_parent** = ``true`` +:ref:`bool<class_bool>` **exclude_parent** = ``true`` :ref:`🔗<class_ShapeCast2D_property_exclude_parent>` .. rst-class:: classref-property-setget -- void **set_exclude_parent_body** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_parent_body** **(** **)** +- |void| **set_exclude_parent_body**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_parent_body**\ (\ ) If ``true``, the parent node will be excluded from collision detection. @@ -209,12 +209,12 @@ If ``true``, the parent node will be excluded from collision detection. .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.0`` +:ref:`float<class_float>` **margin** = ``0.0`` :ref:`🔗<class_ShapeCast2D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision. @@ -226,12 +226,12 @@ The collision margin for the shape. A larger margin helps detecting collisions m .. rst-class:: classref-property -:ref:`int<class_int>` **max_results** = ``32`` +:ref:`int<class_int>` **max_results** = ``32`` :ref:`🔗<class_ShapeCast2D_property_max_results>` .. rst-class:: classref-property-setget -- void **set_max_results** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_results** **(** **)** +- |void| **set_max_results**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_results**\ (\ ) The number of intersections can be limited with this parameter, to reduce the processing time. @@ -243,12 +243,12 @@ The number of intersections can be limited with this parameter, to reduce the pr .. rst-class:: classref-property -:ref:`Shape2D<class_Shape2D>` **shape** +:ref:`Shape2D<class_Shape2D>` **shape** :ref:`🔗<class_ShapeCast2D_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape2D<class_Shape2D>` value **)** -- :ref:`Shape2D<class_Shape2D>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape2D<class_Shape2D>`\ ) +- :ref:`Shape2D<class_Shape2D>` **get_shape**\ (\ ) The :ref:`Shape2D<class_Shape2D>`-derived shape to be used for collision queries. @@ -260,12 +260,12 @@ The :ref:`Shape2D<class_Shape2D>`-derived shape to be used for collision queries .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 50)`` +:ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 50)`` :ref:`🔗<class_ShapeCast2D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_target_position**\ (\ ) The shape's destination point, relative to this node's ``position``. @@ -282,7 +282,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_exception** **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** +|void| **add_exception**\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) :ref:`🔗<class_ShapeCast2D_method_add_exception>` Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject2D<class_CollisionObject2D>` node. @@ -294,7 +294,7 @@ Adds a collision exception so the shape does not report collisions with the spec .. rst-class:: classref-method -void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **add_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast2D_method_add_exception_rid>` Adds a collision exception so the shape does not report collisions with the specified :ref:`RID<class_RID>`. @@ -306,7 +306,7 @@ Adds a collision exception so the shape does not report collisions with the spec .. rst-class:: classref-method -void **clear_exceptions** **(** **)** +|void| **clear_exceptions**\ (\ ) :ref:`🔗<class_ShapeCast2D_method_clear_exceptions>` Removes all collision exceptions for this shape. @@ -318,9 +318,9 @@ Removes all collision exceptions for this shape. .. rst-class:: classref-method -void **force_shapecast_update** **(** **)** +|void| **force_shapecast_update**\ (\ ) :ref:`🔗<class_ShapeCast2D_method_force_shapecast_update>` -Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the shape or its parent has changed state. +Updates the collision information for the shape immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the shape or its parent has changed state. \ **Note:** ``enabled == true`` is not required for this to work. @@ -332,7 +332,7 @@ Updates the collision information for the shape. Use this method to update the c .. rst-class:: classref-method -:ref:`float<class_float>` **get_closest_collision_safe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_closest_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_closest_collision_safe_fraction>` The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position<class_ShapeCast2D_property_target_position>` (between 0 and 1) of how far the shape can move without triggering a collision. @@ -344,10 +344,12 @@ The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position<clas .. rst-class:: classref-method -:ref:`float<class_float>` **get_closest_collision_unsafe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_closest_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_closest_collision_unsafe_fraction>` The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position<class_ShapeCast2D_property_target_position>` (between 0 and 1) of how far the shape must move to trigger a collision. +In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction<class_ShapeCast2D_method_get_closest_collision_safe_fraction>`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. + .. rst-class:: classref-item-separator ---- @@ -356,7 +358,7 @@ The fraction from the **ShapeCast2D**'s origin to its :ref:`target_position<clas .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collider>` Returns the collided :ref:`Object<class_Object>` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast2D_method_is_colliding>` returns ``false``). @@ -368,7 +370,7 @@ Returns the collided :ref:`Object<class_Object>` of one of the multiple collisio .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** :ref:`int<class_int>` index **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collider_rid>` Returns the :ref:`RID<class_RID>` of the collided object of one of the multiple collisions at ``index``. @@ -380,7 +382,7 @@ Returns the :ref:`RID<class_RID>` of the collided object of one of the multiple .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collider_shape>` Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast2D_method_is_colliding>` returns ``false``). @@ -392,7 +394,7 @@ Returns the shape ID of the colliding shape of one of the multiple collisions at .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_count** **(** **)** |const| +:ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collision_count>` The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider<class_ShapeCast2D_method_get_collider>`, :ref:`get_collider_shape<class_ShapeCast2D_method_get_collider_shape>`, :ref:`get_collision_point<class_ShapeCast2D_method_get_collision_point>`, and :ref:`get_collision_normal<class_ShapeCast2D_method_get_collision_normal>` methods. @@ -404,7 +406,7 @@ The number of collisions detected at the point of impact. Use this to iterate ov .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_ShapeCast2D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -416,7 +418,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Sha .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_normal** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_normal**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collision_normal>` Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. @@ -428,7 +430,7 @@ Returns the normal of one of the multiple collisions at ``index`` of the interse .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_collision_point** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector2<class_Vector2>` **get_collision_point**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast2D_method_get_collision_point>` Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. @@ -442,7 +444,7 @@ Returns the collision point of one of the multiple collisions at ``index`` where .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_colliding** **(** **)** |const| +:ref:`bool<class_bool>` **is_colliding**\ (\ ) |const| :ref:`🔗<class_ShapeCast2D_method_is_colliding>` Returns whether any object is intersecting with the shape's vector (considering the vector length). @@ -454,7 +456,7 @@ Returns whether any object is intersecting with the shape's vector (considering .. rst-class:: classref-method -void **remove_exception** **(** :ref:`CollisionObject2D<class_CollisionObject2D>` node **)** +|void| **remove_exception**\ (\ node\: :ref:`CollisionObject2D<class_CollisionObject2D>`\ ) :ref:`🔗<class_ShapeCast2D_method_remove_exception>` Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject2D<class_CollisionObject2D>` node. @@ -466,7 +468,7 @@ Removes a collision exception so the shape does report collisions with the speci .. rst-class:: classref-method -void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **remove_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast2D_method_remove_exception_rid>` Removes a collision exception so the shape does report collisions with the specified :ref:`RID<class_RID>`. @@ -478,7 +480,7 @@ Removes a collision exception so the shape does report collisions with the speci .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ShapeCast2D_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_ShapeCast2D_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -489,3 +491,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shapecast3d.rst b/classes/class_shapecast3d.rst index 1916538052a..09a71f904f8 100644 --- a/classes/class_shapecast3d.rst +++ b/classes/class_shapecast3d.rst @@ -65,43 +65,43 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception<class_ShapeCast3D_method_add_exception>` **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_exception_rid<class_ShapeCast3D_method_add_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_exceptions<class_ShapeCast3D_method_clear_exceptions>` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_shapecast_update<class_ShapeCast3D_method_force_shapecast_update>` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_closest_collision_safe_fraction<class_ShapeCast3D_method_get_closest_collision_safe_fraction>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_closest_collision_unsafe_fraction<class_ShapeCast3D_method_get_closest_collision_unsafe_fraction>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_collider<class_ShapeCast3D_method_get_collider>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_ShapeCast3D_method_get_collider_rid>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collider_shape<class_ShapeCast3D_method_get_collider_shape>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_count<class_ShapeCast3D_method_get_collision_count>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_ShapeCast3D_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_ShapeCast3D_method_get_collision_normal>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_ShapeCast3D_method_get_collision_point>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception<class_ShapeCast3D_method_remove_exception>` **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_exception_rid<class_ShapeCast3D_method_remove_exception_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`resource_changed<class_ShapeCast3D_method_resource_changed>` **(** :ref:`Resource<class_Resource>` resource **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_ShapeCast3D_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception<class_ShapeCast3D_method_add_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_exception_rid<class_ShapeCast3D_method_add_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_exceptions<class_ShapeCast3D_method_clear_exceptions>`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_shapecast_update<class_ShapeCast3D_method_force_shapecast_update>`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_closest_collision_safe_fraction<class_ShapeCast3D_method_get_closest_collision_safe_fraction>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_closest_collision_unsafe_fraction<class_ShapeCast3D_method_get_closest_collision_unsafe_fraction>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_collider<class_ShapeCast3D_method_get_collider>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_collider_rid<class_ShapeCast3D_method_get_collider_rid>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collider_shape<class_ShapeCast3D_method_get_collider_shape>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_count<class_ShapeCast3D_method_get_collision_count>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_ShapeCast3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_normal<class_ShapeCast3D_method_get_collision_normal>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_collision_point<class_ShapeCast3D_method_get_collision_point>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>`\ (\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception<class_ShapeCast3D_method_remove_exception>`\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_exception_rid<class_ShapeCast3D_method_remove_exception_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`resource_changed<class_ShapeCast3D_method_resource_changed>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_ShapeCast3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,14 +116,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_areas** = ``false`` +:ref:`bool<class_bool>` **collide_with_areas** = ``false`` :ref:`🔗<class_ShapeCast3D_property_collide_with_areas>` .. rst-class:: classref-property-setget -- void **set_collide_with_areas** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_areas_enabled** **(** **)** +- |void| **set_collide_with_areas**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_areas_enabled**\ (\ ) -If ``true``, collision with :ref:`Area3D<class_Area3D>`\ s will be reported. +If ``true``, collisions with :ref:`Area3D<class_Area3D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -133,14 +133,14 @@ If ``true``, collision with :ref:`Area3D<class_Area3D>`\ s will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` +:ref:`bool<class_bool>` **collide_with_bodies** = ``true`` :ref:`🔗<class_ShapeCast3D_property_collide_with_bodies>` .. rst-class:: classref-property-setget -- void **set_collide_with_bodies** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled** **(** **)** +- |void| **set_collide_with_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collide_with_bodies_enabled**\ (\ ) -If ``true``, collision with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be reported. +If ``true``, collisions with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be reported. .. rst-class:: classref-item-separator @@ -150,12 +150,12 @@ If ``true``, collision with :ref:`PhysicsBody3D<class_PhysicsBody3D>`\ s will be .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_ShapeCast3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -167,7 +167,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled .. rst-class:: classref-property -:ref:`Array<class_Array>` **collision_result** = ``[]`` +:ref:`Array<class_Array>` **collision_result** = ``[]`` :ref:`🔗<class_ShapeCast3D_property_collision_result>` Returns the complete collision information from the collision sweep. The data returned is the same as in the :ref:`PhysicsDirectSpaceState3D.get_rest_info<class_PhysicsDirectSpaceState3D_method_get_rest_info>` method. @@ -179,12 +179,12 @@ Returns the complete collision information from the collision sweep. The data re .. rst-class:: classref-property -:ref:`Color<class_Color>` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **debug_shape_custom_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_ShapeCast3D_property_debug_shape_custom_color>` .. rst-class:: classref-property-setget -- void **set_debug_shape_custom_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_debug_shape_custom_color** **(** **)** +- |void| **set_debug_shape_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_debug_shape_custom_color**\ (\ ) The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the **ShapeCast3D** is colliding with something. @@ -198,12 +198,12 @@ If set to ``Color(0.0, 0.0, 0.0)`` (by default), the color set in :ref:`ProjectS .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_ShapeCast3D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) If ``true``, collisions will be reported. @@ -215,12 +215,12 @@ If ``true``, collisions will be reported. .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclude_parent** = ``true`` +:ref:`bool<class_bool>` **exclude_parent** = ``true`` :ref:`🔗<class_ShapeCast3D_property_exclude_parent>` .. rst-class:: classref-property-setget -- void **set_exclude_parent_body** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_exclude_parent_body** **(** **)** +- |void| **set_exclude_parent_body**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_exclude_parent_body**\ (\ ) If ``true``, the parent node will be excluded from collision detection. @@ -232,12 +232,12 @@ If ``true``, the parent node will be excluded from collision detection. .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.0`` +:ref:`float<class_float>` **margin** = ``0.0`` :ref:`🔗<class_ShapeCast3D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) The collision margin for the shape. A larger margin helps detecting collisions more consistently, at the cost of precision. @@ -249,12 +249,12 @@ The collision margin for the shape. A larger margin helps detecting collisions m .. rst-class:: classref-property -:ref:`int<class_int>` **max_results** = ``32`` +:ref:`int<class_int>` **max_results** = ``32`` :ref:`🔗<class_ShapeCast3D_property_max_results>` .. rst-class:: classref-property-setget -- void **set_max_results** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_results** **(** **)** +- |void| **set_max_results**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_results**\ (\ ) The number of intersections can be limited with this parameter, to reduce the processing time. @@ -266,12 +266,12 @@ The number of intersections can be limited with this parameter, to reduce the pr .. rst-class:: classref-property -:ref:`Shape3D<class_Shape3D>` **shape** +:ref:`Shape3D<class_Shape3D>` **shape** :ref:`🔗<class_ShapeCast3D_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape3D<class_Shape3D>` value **)** -- :ref:`Shape3D<class_Shape3D>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape3D<class_Shape3D>`\ ) +- :ref:`Shape3D<class_Shape3D>` **get_shape**\ (\ ) The :ref:`Shape3D<class_Shape3D>`-derived shape to be used for collision queries. @@ -283,12 +283,12 @@ The :ref:`Shape3D<class_Shape3D>`-derived shape to be used for collision queries .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, -1, 0)`` +:ref:`Vector3<class_Vector3>` **target_position** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_ShapeCast3D_property_target_position>` .. rst-class:: classref-property-setget -- void **set_target_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_target_position** **(** **)** +- |void| **set_target_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_target_position**\ (\ ) The shape's destination point, relative to this node's ``position``. @@ -305,7 +305,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_exception** **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** +|void| **add_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_ShapeCast3D_method_add_exception>` Adds a collision exception so the shape does not report collisions with the specified :ref:`CollisionObject3D<class_CollisionObject3D>` node. @@ -317,7 +317,7 @@ Adds a collision exception so the shape does not report collisions with the spec .. rst-class:: classref-method -void **add_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **add_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast3D_method_add_exception_rid>` Adds a collision exception so the shape does not report collisions with the specified :ref:`RID<class_RID>`. @@ -329,7 +329,7 @@ Adds a collision exception so the shape does not report collisions with the spec .. rst-class:: classref-method -void **clear_exceptions** **(** **)** +|void| **clear_exceptions**\ (\ ) :ref:`🔗<class_ShapeCast3D_method_clear_exceptions>` Removes all collision exceptions for this **ShapeCast3D**. @@ -341,9 +341,9 @@ Removes all collision exceptions for this **ShapeCast3D**. .. rst-class:: classref-method -void **force_shapecast_update** **(** **)** +|void| **force_shapecast_update**\ (\ ) :ref:`🔗<class_ShapeCast3D_method_force_shapecast_update>` -Updates the collision information for the shape. Use this method to update the collision information immediately instead of waiting for the next ``_physics_process`` call, for example if the shape or its parent has changed state. +Updates the collision information for the shape immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the shape or its parent has changed state. \ **Note:** ``enabled == true`` is not required for this to work. @@ -355,7 +355,7 @@ Updates the collision information for the shape. Use this method to update the c .. rst-class:: classref-method -:ref:`float<class_float>` **get_closest_collision_safe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_closest_collision_safe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_closest_collision_safe_fraction>` The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position<class_ShapeCast3D_property_target_position>` (between 0 and 1) of how far the shape can move without triggering a collision. @@ -367,10 +367,12 @@ The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position<clas .. rst-class:: classref-method -:ref:`float<class_float>` **get_closest_collision_unsafe_fraction** **(** **)** |const| +:ref:`float<class_float>` **get_closest_collision_unsafe_fraction**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_closest_collision_unsafe_fraction>` The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position<class_ShapeCast3D_property_target_position>` (between 0 and 1) of how far the shape must move to trigger a collision. +In ideal conditions this would be the same as :ref:`get_closest_collision_safe_fraction<class_ShapeCast3D_method_get_closest_collision_safe_fraction>`, however shape casting is calculated in discrete steps, so the precise point of collision can occur between two calculated positions. + .. rst-class:: classref-item-separator ---- @@ -379,7 +381,7 @@ The fraction from the **ShapeCast3D**'s origin to its :ref:`target_position<clas .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_collider** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Object<class_Object>` **get_collider**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider>` Returns the collided :ref:`Object<class_Object>` of one of the multiple collisions at ``index``, or ``null`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>` returns ``false``). @@ -391,7 +393,7 @@ Returns the collided :ref:`Object<class_Object>` of one of the multiple collisio .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_collider_rid** **(** :ref:`int<class_int>` index **)** |const| +:ref:`RID<class_RID>` **get_collider_rid**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider_rid>` Returns the :ref:`RID<class_RID>` of the collided object of one of the multiple collisions at ``index``. @@ -403,7 +405,7 @@ Returns the :ref:`RID<class_RID>` of the collided object of one of the multiple .. rst-class:: classref-method -:ref:`int<class_int>` **get_collider_shape** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_collider_shape**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collider_shape>` Returns the shape ID of the colliding shape of one of the multiple collisions at ``index``, or ``0`` if no object is intersecting the shape (i.e. :ref:`is_colliding<class_ShapeCast3D_method_is_colliding>` returns ``false``). @@ -415,7 +417,7 @@ Returns the shape ID of the colliding shape of one of the multiple collisions at .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_count** **(** **)** |const| +:ref:`int<class_int>` **get_collision_count**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_count>` The number of collisions detected at the point of impact. Use this to iterate over multiple collisions as provided by :ref:`get_collider<class_ShapeCast3D_method_get_collider>`, :ref:`get_collider_shape<class_ShapeCast3D_method_get_collider_shape>`, :ref:`get_collision_point<class_ShapeCast3D_method_get_collision_point>`, and :ref:`get_collision_normal<class_ShapeCast3D_method_get_collision_normal>` methods. @@ -427,7 +429,7 @@ The number of collisions detected at the point of impact. Use this to iterate ov .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_ShapeCast3D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -439,7 +441,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Sha .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_normal** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_normal**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_normal>` Returns the normal of one of the multiple collisions at ``index`` of the intersecting object. @@ -451,7 +453,7 @@ Returns the normal of one of the multiple collisions at ``index`` of the interse .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_collision_point** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector3<class_Vector3>` **get_collision_point**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ShapeCast3D_method_get_collision_point>` Returns the collision point of one of the multiple collisions at ``index`` where the shape intersects the colliding object. @@ -465,7 +467,7 @@ Returns the collision point of one of the multiple collisions at ``index`` where .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_colliding** **(** **)** |const| +:ref:`bool<class_bool>` **is_colliding**\ (\ ) |const| :ref:`🔗<class_ShapeCast3D_method_is_colliding>` Returns whether any object is intersecting with the shape's vector (considering the vector length). @@ -477,7 +479,7 @@ Returns whether any object is intersecting with the shape's vector (considering .. rst-class:: classref-method -void **remove_exception** **(** :ref:`CollisionObject3D<class_CollisionObject3D>` node **)** +|void| **remove_exception**\ (\ node\: :ref:`CollisionObject3D<class_CollisionObject3D>`\ ) :ref:`🔗<class_ShapeCast3D_method_remove_exception>` Removes a collision exception so the shape does report collisions with the specified :ref:`CollisionObject3D<class_CollisionObject3D>` node. @@ -489,7 +491,7 @@ Removes a collision exception so the shape does report collisions with the speci .. rst-class:: classref-method -void **remove_exception_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **remove_exception_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_ShapeCast3D_method_remove_exception_rid>` Removes a collision exception so the shape does report collisions with the specified :ref:`RID<class_RID>`. @@ -501,9 +503,11 @@ Removes a collision exception so the shape does report collisions with the speci .. rst-class:: classref-method -void **resource_changed** **(** :ref:`Resource<class_Resource>` resource **)** +|void| **resource_changed**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_ShapeCast3D_method_resource_changed>` + +**Deprecated:** Use :ref:`Resource.changed<class_Resource_signal_changed>` instead. -This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the :ref:`shape<class_ShapeCast3D_property_shape>` resource is modified. +This method does nothing. .. rst-class:: classref-item-separator @@ -513,7 +517,7 @@ This method is used internally to update the debug gizmo in the editor. Any code .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ShapeCast3D_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_ShapeCast3D_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -524,3 +528,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index 2b6275b6b7b..d8fdc0723cf 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -43,13 +43,13 @@ Methods .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_as_text<class_Shortcut_method_get_as_text>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_valid_event<class_Shortcut_method_has_valid_event>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`matches_event<class_Shortcut_method_matches_event>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_as_text<class_Shortcut_method_get_as_text>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_valid_event<class_Shortcut_method_has_valid_event>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`matches_event<class_Shortcut_method_matches_event>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,12 +64,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array<class_Array>` **events** = ``[]`` +:ref:`Array<class_Array>` **events** = ``[]`` :ref:`🔗<class_Shortcut_property_events>` .. rst-class:: classref-property-setget -- void **set_events** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_events** **(** **)** +- |void| **set_events**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_events**\ (\ ) The shortcut's :ref:`InputEvent<class_InputEvent>` array. @@ -88,7 +88,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_as_text** **(** **)** |const| +:ref:`String<class_String>` **get_as_text**\ (\ ) |const| :ref:`🔗<class_Shortcut_method_get_as_text>` Returns the shortcut's first valid :ref:`InputEvent<class_InputEvent>` as a :ref:`String<class_String>`. @@ -100,7 +100,7 @@ Returns the shortcut's first valid :ref:`InputEvent<class_InputEvent>` as a :ref .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_valid_event** **(** **)** |const| +:ref:`bool<class_bool>` **has_valid_event**\ (\ ) |const| :ref:`🔗<class_Shortcut_method_has_valid_event>` Returns whether :ref:`events<class_Shortcut_property_events>` contains an :ref:`InputEvent<class_InputEvent>` which is valid. @@ -112,7 +112,7 @@ Returns whether :ref:`events<class_Shortcut_property_events>` contains an :ref:` .. rst-class:: classref-method -:ref:`bool<class_bool>` **matches_event** **(** :ref:`InputEvent<class_InputEvent>` event **)** |const| +:ref:`bool<class_bool>` **matches_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |const| :ref:`🔗<class_Shortcut_method_matches_event>` Returns whether any :ref:`InputEvent<class_InputEvent>` in :ref:`events<class_Shortcut_property_events>` equals ``event``. @@ -123,3 +123,4 @@ Returns whether any :ref:`InputEvent<class_InputEvent>` in :ref:`events<class_Sh .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_signal.rst b/classes/class_signal.rst index 8a9823cc454..de512669939 100644 --- a/classes/class_signal.rst +++ b/classes/class_signal.rst @@ -65,13 +65,13 @@ Constructors .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>` **(** **)** | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>` **(** :ref:`Signal<class_Signal>` from **)** | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` signal **)** | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>`\ (\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>`\ (\ from\: :ref:`Signal<class_Signal>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Signal<class_Signal>` | :ref:`Signal<class_Signal_constructor_Signal>`\ (\ object\: :ref:`Object<class_Object>`, signal\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -81,25 +81,25 @@ Methods .. table:: :widths: auto - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`connect<class_Signal_method_connect>` **(** :ref:`Callable<class_Callable>` callable, :ref:`int<class_int>` flags=0 **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect<class_Signal_method_disconnect>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`emit<class_Signal_method_emit>` **(** ... **)** |vararg| |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_connections<class_Signal_method_get_connections>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_name<class_Signal_method_get_name>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object<class_Object>` | :ref:`get_object<class_Signal_method_get_object>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_object_id<class_Signal_method_get_object_id>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_connected<class_Signal_method_is_connected>` **(** :ref:`Callable<class_Callable>` callable **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_null<class_Signal_method_is_null>` **(** **)** |const| | - +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`connect<class_Signal_method_connect>`\ (\ callable\: :ref:`Callable<class_Callable>`, flags\: :ref:`int<class_int>` = 0\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect<class_Signal_method_disconnect>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`emit<class_Signal_method_emit>`\ (\ ...\ ) |vararg| |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_connections<class_Signal_method_get_connections>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_name<class_Signal_method_get_name>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object<class_Object>` | :ref:`get_object<class_Signal_method_get_object>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_object_id<class_Signal_method_get_object_id>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_connected<class_Signal_method_is_connected>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_null<class_Signal_method_is_null>`\ (\ ) |const| | + +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -109,11 +109,11 @@ Operators .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Signal_operator_neq_Signal>` **(** :ref:`Signal<class_Signal>` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Signal_operator_eq_Signal>` **(** :ref:`Signal<class_Signal>` right **)** | - +-------------------------+----------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Signal_operator_neq_Signal>`\ (\ right\: :ref:`Signal<class_Signal>`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Signal_operator_eq_Signal>`\ (\ right\: :ref:`Signal<class_Signal>`\ ) | + +-------------------------+-------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -128,7 +128,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Signal<class_Signal>` **Signal** **(** **)** +:ref:`Signal<class_Signal>` **Signal**\ (\ ) :ref:`🔗<class_Signal_constructor_Signal>` Constructs an empty **Signal** with no object nor signal name bound. @@ -138,7 +138,7 @@ Constructs an empty **Signal** with no object nor signal name bound. .. rst-class:: classref-constructor -:ref:`Signal<class_Signal>` **Signal** **(** :ref:`Signal<class_Signal>` from **)** +:ref:`Signal<class_Signal>` **Signal**\ (\ from\: :ref:`Signal<class_Signal>`\ ) Constructs a **Signal** as a copy of the given **Signal**. @@ -148,7 +148,7 @@ Constructs a **Signal** as a copy of the given **Signal**. .. rst-class:: classref-constructor -:ref:`Signal<class_Signal>` **Signal** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` signal **)** +:ref:`Signal<class_Signal>` **Signal**\ (\ object\: :ref:`Object<class_Object>`, signal\: :ref:`StringName<class_StringName>`\ ) Creates a new **Signal** named ``signal`` in the specified ``object``. @@ -165,7 +165,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **connect** **(** :ref:`Callable<class_Callable>` callable, :ref:`int<class_int>` flags=0 **)** +:ref:`int<class_int>` **connect**\ (\ callable\: :ref:`Callable<class_Callable>`, flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_Signal_method_connect>` Connects this signal to the specified ``callable``. Optional ``flags`` can be also added to configure the connection's behavior (see :ref:`ConnectFlags<enum_Object_ConnectFlags>` constants). You can provide additional arguments to the connected ``callable`` by using :ref:`Callable.bind<class_Callable_method_bind>`. @@ -187,7 +187,7 @@ A signal can only be connected once to the same :ref:`Callable<class_Callable>`. .. rst-class:: classref-method -void **disconnect** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **disconnect**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_Signal_method_disconnect>` Disconnects this signal from the specified :ref:`Callable<class_Callable>`. If the connection does not exist, generates an error. Use :ref:`is_connected<class_Signal_method_is_connected>` to make sure that the connection exists. @@ -199,7 +199,7 @@ Disconnects this signal from the specified :ref:`Callable<class_Callable>`. If t .. rst-class:: classref-method -void **emit** **(** ... **)** |vararg| |const| +|void| **emit**\ (\ ...\ ) |vararg| |const| :ref:`🔗<class_Signal_method_emit>` Emits this signal. All :ref:`Callable<class_Callable>`\ s connected to this signal will be triggered. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. @@ -211,7 +211,7 @@ Emits this signal. All :ref:`Callable<class_Callable>`\ s connected to this sign .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_connections** **(** **)** |const| +:ref:`Array<class_Array>` **get_connections**\ (\ ) |const| :ref:`🔗<class_Signal_method_get_connections>` Returns an :ref:`Array<class_Array>` of connections for this signal. Each connection is represented as a :ref:`Dictionary<class_Dictionary>` that contains three entries: @@ -229,7 +229,7 @@ Returns an :ref:`Array<class_Array>` of connections for this signal. Each connec .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_name** **(** **)** |const| +:ref:`StringName<class_StringName>` **get_name**\ (\ ) |const| :ref:`🔗<class_Signal_method_get_name>` Returns the name of this signal. @@ -241,7 +241,7 @@ Returns the name of this signal. .. rst-class:: classref-method -:ref:`Object<class_Object>` **get_object** **(** **)** |const| +:ref:`Object<class_Object>` **get_object**\ (\ ) |const| :ref:`🔗<class_Signal_method_get_object>` Returns the object emitting this signal. @@ -253,7 +253,7 @@ Returns the object emitting this signal. .. rst-class:: classref-method -:ref:`int<class_int>` **get_object_id** **(** **)** |const| +:ref:`int<class_int>` **get_object_id**\ (\ ) |const| :ref:`🔗<class_Signal_method_get_object_id>` Returns the ID of the object emitting this signal (see :ref:`Object.get_instance_id<class_Object_method_get_instance_id>`). @@ -265,7 +265,7 @@ Returns the ID of the object emitting this signal (see :ref:`Object.get_instance .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_connected** **(** :ref:`Callable<class_Callable>` callable **)** |const| +:ref:`bool<class_bool>` **is_connected**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |const| :ref:`🔗<class_Signal_method_is_connected>` Returns ``true`` if the specified :ref:`Callable<class_Callable>` is connected to this signal. @@ -277,7 +277,7 @@ Returns ``true`` if the specified :ref:`Callable<class_Callable>` is connected t .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_null** **(** **)** |const| +:ref:`bool<class_bool>` **is_null**\ (\ ) |const| :ref:`🔗<class_Signal_method_is_null>` Returns ``true`` if the signal's name does not exist in its object, or the object is not valid. @@ -294,7 +294,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Signal<class_Signal>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Signal<class_Signal>`\ ) :ref:`🔗<class_Signal_operator_neq_Signal>` Returns ``true`` if the signals do not share the same object and name. @@ -306,7 +306,7 @@ Returns ``true`` if the signals do not share the same object and name. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Signal<class_Signal>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Signal<class_Signal>`\ ) :ref:`🔗<class_Signal_operator_eq_Signal>` Returns ``true`` if both signals share the same object and name. @@ -317,3 +317,4 @@ Returns ``true`` if both signals share the same object and name. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeleton2d.rst b/classes/class_skeleton2d.rst index 10ba21be770..72017ee1c55 100644 --- a/classes/class_skeleton2d.rst +++ b/classes/class_skeleton2d.rst @@ -38,23 +38,23 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`execute_modifications<class_Skeleton2D_method_execute_modifications>` **(** :ref:`float<class_float>` delta, :ref:`int<class_int>` execution_mode **)** | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Bone2D<class_Bone2D>` | :ref:`get_bone<class_Skeleton2D_method_get_bone>` **(** :ref:`int<class_int>` idx **)** | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton2D_method_get_bone_count>` **(** **)** |const| | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_bone_local_pose_override<class_Skeleton2D_method_get_bone_local_pose_override>` **(** :ref:`int<class_int>` bone_idx **)** | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_modification_stack<class_Skeleton2D_method_get_modification_stack>` **(** **)** |const| | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_skeleton<class_Skeleton2D_method_get_skeleton>` **(** **)** |const| | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_local_pose_override<class_Skeleton2D_method_set_bone_local_pose_override>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform2D<class_Transform2D>` override_pose, :ref:`float<class_float>` strength, :ref:`bool<class_bool>` persistent **)** | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_modification_stack<class_Skeleton2D_method_set_modification_stack>` **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` modification_stack **)** | - +-----------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`execute_modifications<class_Skeleton2D_method_execute_modifications>`\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Bone2D<class_Bone2D>` | :ref:`get_bone<class_Skeleton2D_method_get_bone>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton2D_method_get_bone_count>`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_bone_local_pose_override<class_Skeleton2D_method_get_bone_local_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_modification_stack<class_Skeleton2D_method_get_modification_stack>`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_skeleton<class_Skeleton2D_method_get_skeleton>`\ (\ ) |const| | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_local_pose_override<class_Skeleton2D_method_set_bone_local_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`, override_pose\: :ref:`Transform2D<class_Transform2D>`, strength\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_modification_stack<class_Skeleton2D_method_set_modification_stack>`\ (\ modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) | + +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,7 +69,7 @@ Signals .. rst-class:: classref-signal -**bone_setup_changed** **(** **)** +**bone_setup_changed**\ (\ ) :ref:`🔗<class_Skeleton2D_signal_bone_setup_changed>` Emitted when the :ref:`Bone2D<class_Bone2D>` setup attached to this skeletons changes. This is primarily used internally within the skeleton. @@ -86,7 +86,7 @@ Method Descriptions .. rst-class:: classref-method -void **execute_modifications** **(** :ref:`float<class_float>` delta, :ref:`int<class_int>` execution_mode **)** +|void| **execute_modifications**\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton2D_method_execute_modifications>` Executes all the modifications on the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`, if the Skeleton2D has one assigned. @@ -98,7 +98,7 @@ Executes all the modifications on the :ref:`SkeletonModificationStack2D<class_Sk .. rst-class:: classref-method -:ref:`Bone2D<class_Bone2D>` **get_bone** **(** :ref:`int<class_int>` idx **)** +:ref:`Bone2D<class_Bone2D>` **get_bone**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton2D_method_get_bone>` Returns a :ref:`Bone2D<class_Bone2D>` from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter ``idx``. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. @@ -110,7 +110,7 @@ Returns a :ref:`Bone2D<class_Bone2D>` from the node hierarchy parented by Skelet .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_count** **(** **)** |const| +:ref:`int<class_int>` **get_bone_count**\ (\ ) |const| :ref:`🔗<class_Skeleton2D_method_get_bone_count>` Returns the number of :ref:`Bone2D<class_Bone2D>` nodes in the node hierarchy parented by Skeleton2D. @@ -122,7 +122,7 @@ Returns the number of :ref:`Bone2D<class_Bone2D>` nodes in the node hierarchy pa .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_bone_local_pose_override** **(** :ref:`int<class_int>` bone_idx **)** +:ref:`Transform2D<class_Transform2D>` **get_bone_local_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton2D_method_get_bone_local_pose_override>` Returns the local pose override transform for ``bone_idx``. @@ -134,7 +134,7 @@ Returns the local pose override transform for ``bone_idx``. .. rst-class:: classref-method -:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_modification_stack** **(** **)** |const| +:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_modification_stack**\ (\ ) |const| :ref:`🔗<class_Skeleton2D_method_get_modification_stack>` Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` attached to this skeleton, if one exists. @@ -146,7 +146,7 @@ Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D> .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_skeleton** **(** **)** |const| +:ref:`RID<class_RID>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_Skeleton2D_method_get_skeleton>` Returns the :ref:`RID<class_RID>` of a Skeleton2D instance. @@ -158,7 +158,7 @@ Returns the :ref:`RID<class_RID>` of a Skeleton2D instance. .. rst-class:: classref-method -void **set_bone_local_pose_override** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform2D<class_Transform2D>` override_pose, :ref:`float<class_float>` strength, :ref:`bool<class_bool>` persistent **)** +|void| **set_bone_local_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`, override_pose\: :ref:`Transform2D<class_Transform2D>`, strength\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Skeleton2D_method_set_bone_local_pose_override>` Sets the local pose transform, ``override_pose``, for the bone at ``bone_idx``. @@ -174,7 +174,7 @@ Sets the local pose transform, ``override_pose``, for the bone at ``bone_idx``. .. rst-class:: classref-method -void **set_modification_stack** **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` modification_stack **)** +|void| **set_modification_stack**\ (\ modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) :ref:`🔗<class_Skeleton2D_method_set_modification_stack>` Sets the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` attached to this skeleton. @@ -185,3 +185,4 @@ Sets the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeleton3d.rst b/classes/class_skeleton3d.rst index adacecb9f18..841f6b1af75 100644 --- a/classes/class_skeleton3d.rst +++ b/classes/class_skeleton3d.rst @@ -25,16 +25,12 @@ The overall transform of a bone with respect to the skeleton is determined by bo Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it is not the actual global/world transform of the bone. -To setup different types of inverse kinematics, consider using :ref:`SkeletonIK3D<class_SkeletonIK3D>`, or add a custom IK implementation in :ref:`Node._process<class_Node_method__process>` as a child node. - .. rst-class:: classref-introduction-group Tutorials --------- -- `3D Inverse Kinematics Demo <https://godotengine.org/asset-library/asset/523>`__ - -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -44,13 +40,13 @@ Properties .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`animate_physical_bones<class_Skeleton3D_property_animate_physical_bones>` | ``true`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`float<class_float>` | :ref:`motion_scale<class_Skeleton3D_property_motion_scale>` | ``1.0`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` | ``false`` | - +---------------------------+---------------------------------------------------------------------------------+-----------+ + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` | :ref:`modifier_callback_mode_process<class_Skeleton3D_property_modifier_callback_mode_process>` | ``1`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float<class_float>` | :ref:`motion_scale<class_Skeleton3D_property_motion_scale>` | ``1.0`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` | ``false`` | + +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -60,87 +56,97 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_bone<class_Skeleton3D_method_add_bone>` **(** :ref:`String<class_String>` name **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_bones<class_Skeleton3D_method_clear_bones>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_bones_global_pose_override<class_Skeleton3D_method_clear_bones_global_pose_override>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skin<class_Skin>` | :ref:`create_skin_from_rest_transforms<class_Skeleton3D_method_create_skin_from_rest_transforms>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_bone<class_Skeleton3D_method_find_bone>` **(** :ref:`String<class_String>` name **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_all_bone_transforms<class_Skeleton3D_method_force_update_all_bone_transforms>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_bone_child_transform<class_Skeleton3D_method_force_update_bone_child_transform>` **(** :ref:`int<class_int>` bone_idx **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_bone_children<class_Skeleton3D_method_get_bone_children>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton3D_method_get_bone_count>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose<class_Skeleton3D_method_get_bone_global_pose>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_no_override<class_Skeleton3D_method_get_bone_global_pose_no_override>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_override<class_Skeleton3D_method_get_bone_global_pose_override>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_rest<class_Skeleton3D_method_get_bone_global_rest>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_bone_name<class_Skeleton3D_method_get_bone_name>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bone_parent<class_Skeleton3D_method_get_bone_parent>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_pose<class_Skeleton3D_method_get_bone_pose>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_position<class_Skeleton3D_method_get_bone_pose_position>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion<class_Quaternion>` | :ref:`get_bone_pose_rotation<class_Skeleton3D_method_get_bone_pose_rotation>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_scale<class_Skeleton3D_method_get_bone_pose_scale>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_rest<class_Skeleton3D_method_get_bone_rest>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_parentless_bones<class_Skeleton3D_method_get_parentless_bones>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_version<class_Skeleton3D_method_get_version>` **(** **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_bone_enabled<class_Skeleton3D_method_is_bone_enabled>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`localize_rests<class_Skeleton3D_method_localize_rests>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`physical_bones_add_collision_exception<class_Skeleton3D_method_physical_bones_add_collision_exception>` **(** :ref:`RID<class_RID>` exception **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`physical_bones_remove_collision_exception<class_Skeleton3D_method_physical_bones_remove_collision_exception>` **(** :ref:`RID<class_RID>` exception **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`physical_bones_start_simulation<class_Skeleton3D_method_physical_bones_start_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`physical_bones_stop_simulation<class_Skeleton3D_method_physical_bones_stop_simulation>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkinReference<class_SkinReference>` | :ref:`register_skin<class_Skeleton3D_method_register_skin>` **(** :ref:`Skin<class_Skin>` skin **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_bone_pose<class_Skeleton3D_method_reset_bone_pose>` **(** :ref:`int<class_int>` bone_idx **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_bone_poses<class_Skeleton3D_method_reset_bone_poses>` **(** **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_enabled<class_Skeleton3D_method_set_bone_enabled>` **(** :ref:`int<class_int>` bone_idx, :ref:`bool<class_bool>` enabled=true **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_global_pose_override<class_Skeleton3D_method_set_bone_global_pose_override>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` pose, :ref:`float<class_float>` amount, :ref:`bool<class_bool>` persistent=false **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_name<class_Skeleton3D_method_set_bone_name>` **(** :ref:`int<class_int>` bone_idx, :ref:`String<class_String>` name **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_parent<class_Skeleton3D_method_set_bone_parent>` **(** :ref:`int<class_int>` bone_idx, :ref:`int<class_int>` parent_idx **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_pose_position<class_Skeleton3D_method_set_bone_pose_position>` **(** :ref:`int<class_int>` bone_idx, :ref:`Vector3<class_Vector3>` position **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_pose_rotation<class_Skeleton3D_method_set_bone_pose_rotation>` **(** :ref:`int<class_int>` bone_idx, :ref:`Quaternion<class_Quaternion>` rotation **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_pose_scale<class_Skeleton3D_method_set_bone_pose_scale>` **(** :ref:`int<class_int>` bone_idx, :ref:`Vector3<class_Vector3>` scale **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_rest<class_Skeleton3D_method_set_bone_rest>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` rest **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unparent_bone_and_rest<class_Skeleton3D_method_unparent_bone_and_rest>` **(** :ref:`int<class_int>` bone_idx **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_bone<class_Skeleton3D_method_add_bone>`\ (\ name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bones<class_Skeleton3D_method_clear_bones>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_bones_global_pose_override<class_Skeleton3D_method_clear_bones_global_pose_override>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skin<class_Skin>` | :ref:`create_skin_from_rest_transforms<class_Skeleton3D_method_create_skin_from_rest_transforms>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_bone<class_Skeleton3D_method_find_bone>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_all_bone_transforms<class_Skeleton3D_method_force_update_all_bone_transforms>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_bone_child_transform<class_Skeleton3D_method_force_update_bone_child_transform>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_animate_physical_bones<class_Skeleton3D_method_get_animate_physical_bones>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_bone_children<class_Skeleton3D_method_get_bone_children>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_count<class_Skeleton3D_method_get_bone_count>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose<class_Skeleton3D_method_get_bone_global_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_no_override<class_Skeleton3D_method_get_bone_global_pose_no_override>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_pose_override<class_Skeleton3D_method_get_bone_global_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_global_rest<class_Skeleton3D_method_get_bone_global_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_bone_name<class_Skeleton3D_method_get_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bone_parent<class_Skeleton3D_method_get_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_pose<class_Skeleton3D_method_get_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_position<class_Skeleton3D_method_get_bone_pose_position>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion<class_Quaternion>` | :ref:`get_bone_pose_rotation<class_Skeleton3D_method_get_bone_pose_rotation>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_bone_pose_scale<class_Skeleton3D_method_get_bone_pose_scale>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bone_rest<class_Skeleton3D_method_get_bone_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_concatenated_bone_names<class_Skeleton3D_method_get_concatenated_bone_names>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_parentless_bones<class_Skeleton3D_method_get_parentless_bones>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_version<class_Skeleton3D_method_get_version>`\ (\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_bone_enabled<class_Skeleton3D_method_is_bone_enabled>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`localize_rests<class_Skeleton3D_method_localize_rests>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_add_collision_exception<class_Skeleton3D_method_physical_bones_add_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_remove_collision_exception<class_Skeleton3D_method_physical_bones_remove_collision_exception>`\ (\ exception\: :ref:`RID<class_RID>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_start_simulation<class_Skeleton3D_method_physical_bones_start_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`physical_bones_stop_simulation<class_Skeleton3D_method_physical_bones_stop_simulation>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinReference<class_SkinReference>` | :ref:`register_skin<class_Skeleton3D_method_register_skin>`\ (\ skin\: :ref:`Skin<class_Skin>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_bone_pose<class_Skeleton3D_method_reset_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_bone_poses<class_Skeleton3D_method_reset_bone_poses>`\ (\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animate_physical_bones<class_Skeleton3D_method_set_animate_physical_bones>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_enabled<class_Skeleton3D_method_set_bone_enabled>`\ (\ bone_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_global_pose<class_Skeleton3D_method_set_bone_global_pose>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_global_pose_override<class_Skeleton3D_method_set_bone_global_pose_override>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`, amount\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_name<class_Skeleton3D_method_set_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_parent<class_Skeleton3D_method_set_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`, parent_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose<class_Skeleton3D_method_set_bone_pose>`\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_position<class_Skeleton3D_method_set_bone_pose_position>`\ (\ bone_idx\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_rotation<class_Skeleton3D_method_set_bone_pose_rotation>`\ (\ bone_idx\: :ref:`int<class_int>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_pose_scale<class_Skeleton3D_method_set_bone_pose_scale>`\ (\ bone_idx\: :ref:`int<class_int>`, scale\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_rest<class_Skeleton3D_method_set_bone_rest>`\ (\ bone_idx\: :ref:`int<class_int>`, rest\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unparent_bone_and_rest<class_Skeleton3D_method_unparent_bone_and_rest>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,23 +161,23 @@ Signals .. rst-class:: classref-signal -**bone_enabled_changed** **(** :ref:`int<class_int>` bone_idx **)** - -.. container:: contribute +**bone_enabled_changed**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_signal_bone_enabled_changed>` - There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Emitted when the bone at ``bone_idx`` is toggled with :ref:`set_bone_enabled<class_Skeleton3D_method_set_bone_enabled>`. Use :ref:`is_bone_enabled<class_Skeleton3D_method_is_bone_enabled>` to check the new value. .. rst-class:: classref-item-separator ---- -.. _class_Skeleton3D_signal_bone_pose_changed: +.. _class_Skeleton3D_signal_bone_list_changed: .. rst-class:: classref-signal -**bone_pose_changed** **(** :ref:`int<class_int>` bone_idx **)** +**bone_list_changed**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_bone_list_changed>` + +.. container:: contribute -This signal is emitted when one of the bones in the Skeleton3D node have changed their pose. This is used to inform nodes that rely on bone positions that one of the bones in the Skeleton3D have changed their transform/pose. + There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! .. rst-class:: classref-item-separator @@ -181,11 +187,11 @@ This signal is emitted when one of the bones in the Skeleton3D node have changed .. rst-class:: classref-signal -**pose_updated** **(** **)** +**pose_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_pose_updated>` -.. container:: contribute +Emitted when the pose is updated. - There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** During the update process, this signal is not fired, so modification by :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` is not detected. .. rst-class:: classref-item-separator @@ -195,11 +201,54 @@ This signal is emitted when one of the bones in the Skeleton3D node have changed .. rst-class:: classref-signal -**show_rest_only_changed** **(** **)** +**show_rest_only_changed**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_show_rest_only_changed>` -.. container:: contribute +Emitted when the value of :ref:`show_rest_only<class_Skeleton3D_property_show_rest_only>` changes. - There is currently no description for this signal. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_Skeleton3D_signal_skeleton_updated: + +.. rst-class:: classref-signal + +**skeleton_updated**\ (\ ) :ref:`🔗<class_Skeleton3D_signal_skeleton_updated>` + +Emitted when the final pose has been calculated will be applied to the skin in the update process. + +This means that all :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` processing is complete. In order to detect the completion of the processing of each :ref:`SkeletonModifier3D<class_SkeletonModifier3D>`, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_Skeleton3D_ModifierCallbackModeProcess: + +.. rst-class:: classref-enumeration + +enum **ModifierCallbackModeProcess**: :ref:`🔗<enum_Skeleton3D_ModifierCallbackModeProcess>` + +.. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_PHYSICS** = ``0`` + +Set a flag to process modification during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`). + +.. _class_Skeleton3D_constant_MODIFIER_CALLBACK_MODE_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **MODIFIER_CALLBACK_MODE_PROCESS_IDLE** = ``1`` + +Set a flag to process modification during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`). .. rst-class:: classref-section-separator @@ -214,9 +263,9 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_UPDATE_SKELETON** = ``50`` - +**NOTIFICATION_UPDATE_SKELETON** = ``50`` :ref:`🔗<class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON>` +Notification received when this skeleton's pose needs to be updated. In that case, this is called only once per frame in a deferred process. .. rst-class:: classref-section-separator @@ -227,20 +276,18 @@ Constants Property Descriptions --------------------- -.. _class_Skeleton3D_property_animate_physical_bones: +.. _class_Skeleton3D_property_modifier_callback_mode_process: .. rst-class:: classref-property -:ref:`bool<class_bool>` **animate_physical_bones** = ``true`` +:ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **modifier_callback_mode_process** = ``1`` :ref:`🔗<class_Skeleton3D_property_modifier_callback_mode_process>` .. rst-class:: classref-property-setget -- void **set_animate_physical_bones** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_animate_physical_bones** **(** **)** +- |void| **set_modifier_callback_mode_process**\ (\ value\: :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>`\ ) +- :ref:`ModifierCallbackModeProcess<enum_Skeleton3D_ModifierCallbackModeProcess>` **get_modifier_callback_mode_process**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the processing timing for the Modifier. .. rst-class:: classref-item-separator @@ -250,12 +297,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **motion_scale** = ``1.0`` +:ref:`float<class_float>` **motion_scale** = ``1.0`` :ref:`🔗<class_Skeleton3D_property_motion_scale>` .. rst-class:: classref-property-setget -- void **set_motion_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_motion_scale** **(** **)** +- |void| **set_motion_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_motion_scale**\ (\ ) Multiplies the 3D position track animation. @@ -269,16 +316,14 @@ Multiplies the 3D position track animation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **show_rest_only** = ``false`` +:ref:`bool<class_bool>` **show_rest_only** = ``false`` :ref:`🔗<class_Skeleton3D_property_show_rest_only>` .. rst-class:: classref-property-setget -- void **set_show_rest_only** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_show_rest_only** **(** **)** - -.. container:: contribute +- |void| **set_show_rest_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_show_rest_only**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, forces the bones in their default rest pose, regardless of their values. In the editor, this also prevents the bones from being edited. .. rst-class:: classref-section-separator @@ -293,9 +338,11 @@ Method Descriptions .. rst-class:: classref-method -void **add_bone** **(** :ref:`String<class_String>` name **)** +:ref:`int<class_int>` **add_bone**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_add_bone>` -Adds a bone, with name ``name``. :ref:`get_bone_count<class_Skeleton3D_method_get_bone_count>` will become the bone index. +Adds a new bone with the given name. Returns the new bone's index, or ``-1`` if this method fails. + +\ **Note:** Bone names should be unique, non empty, and cannot include the ``:`` and ``/`` characters. .. rst-class:: classref-item-separator @@ -305,7 +352,7 @@ Adds a bone, with name ``name``. :ref:`get_bone_count<class_Skeleton3D_method_ge .. rst-class:: classref-method -void **clear_bones** **(** **)** +|void| **clear_bones**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones>` Clear all the bones in this skeleton. @@ -317,7 +364,9 @@ Clear all the bones in this skeleton. .. rst-class:: classref-method -void **clear_bones_global_pose_override** **(** **)** +|void| **clear_bones_global_pose_override**\ (\ ) :ref:`🔗<class_Skeleton3D_method_clear_bones_global_pose_override>` + +**Deprecated:** This method may be changed or removed in future versions. Removes the global pose override on all bones in the skeleton. @@ -329,7 +378,7 @@ Removes the global pose override on all bones in the skeleton. .. rst-class:: classref-method -:ref:`Skin<class_Skin>` **create_skin_from_rest_transforms** **(** **)** +:ref:`Skin<class_Skin>` **create_skin_from_rest_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_create_skin_from_rest_transforms>` .. container:: contribute @@ -343,9 +392,9 @@ Removes the global pose override on all bones in the skeleton. .. rst-class:: classref-method -:ref:`int<class_int>` **find_bone** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **find_bone**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_find_bone>` -Returns the bone index that matches ``name`` as its name. +Returns the bone index that matches ``name`` as its name. Returns ``-1`` if no bone with this name exists. .. rst-class:: classref-item-separator @@ -355,11 +404,11 @@ Returns the bone index that matches ``name`` as its name. .. rst-class:: classref-method -void **force_update_all_bone_transforms** **(** **)** +|void| **force_update_all_bone_transforms**\ (\ ) :ref:`🔗<class_Skeleton3D_method_force_update_all_bone_transforms>` -Force updates the bone transforms/poses for all bones in the skeleton. +**Deprecated:** This method should only be called internally. -\ *Deprecated.* Do not use. +Force updates the bone transforms/poses for all bones in the skeleton. .. rst-class:: classref-item-separator @@ -369,7 +418,7 @@ Force updates the bone transforms/poses for all bones in the skeleton. .. rst-class:: classref-method -void **force_update_bone_child_transform** **(** :ref:`int<class_int>` bone_idx **)** +|void| **force_update_bone_child_transform**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_force_update_bone_child_transform>` Force updates the bone transform for the bone at ``bone_idx`` and all of its children. @@ -377,13 +426,25 @@ Force updates the bone transform for the bone at ``bone_idx`` and all of its chi ---- +.. _class_Skeleton3D_method_get_animate_physical_bones: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **get_animate_physical_bones**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_animate_physical_bones>` + +**Deprecated:** This method may be changed or removed in future versions. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_get_bone_children: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_bone_children** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_bone_children**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_children>` -Returns an array containing the bone indexes of all the children node of the passed in bone, ``bone_idx``. +Returns an array containing the bone indexes of all the child node of the passed in bone, ``bone_idx``. .. rst-class:: classref-item-separator @@ -393,7 +454,7 @@ Returns an array containing the bone indexes of all the children node of the pas .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_count** **(** **)** |const| +:ref:`int<class_int>` **get_bone_count**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_count>` Returns the number of bones in the skeleton. @@ -405,10 +466,12 @@ Returns the number of bones in the skeleton. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose>` Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. +\ **Note:** This is the global pose you set to the skeleton in the process, the final global pose can get overridden by modifiers in the deferred process, if you want to access the final global pose, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`. + .. rst-class:: classref-item-separator ---- @@ -417,7 +480,9 @@ Returns the overall transform of the specified bone, with respect to the skeleto .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_no_override** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_no_override**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose_no_override>` + +**Deprecated:** This method may be changed or removed in future versions. Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. @@ -429,7 +494,9 @@ Returns the overall transform of the specified bone, with respect to the skeleto .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_override** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_global_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_pose_override>` + +**Deprecated:** This method may be changed or removed in future versions. Returns the global pose override transform for ``bone_idx``. @@ -441,7 +508,7 @@ Returns the global pose override transform for ``bone_idx``. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_global_rest** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_global_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_global_rest>` Returns the global rest transform for ``bone_idx``. @@ -453,7 +520,7 @@ Returns the global rest transform for ``bone_idx``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_bone_name** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`String<class_String>` **get_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_name>` Returns the name of the bone at index ``bone_idx``. @@ -465,7 +532,7 @@ Returns the name of the bone at index ``bone_idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_bone_parent** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`int<class_int>` **get_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_parent>` Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, then bone has no parent. @@ -479,10 +546,12 @@ Returns the bone index which is the parent of the bone at ``bone_idx``. If -1, t .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_pose** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose>` Returns the pose transform of the specified bone. +\ **Note:** This is the pose you set to the skeleton in the process, the final pose can get overridden by modifiers in the deferred process, if you want to access the final pose, use :ref:`SkeletonModifier3D.modification_processed<class_SkeletonModifier3D_signal_modification_processed>`. + .. rst-class:: classref-item-separator ---- @@ -491,11 +560,9 @@ Returns the pose transform of the specified bone. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_bone_pose_position** **(** :ref:`int<class_int>` bone_idx **)** |const| - -.. container:: contribute +:ref:`Vector3<class_Vector3>` **get_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_position>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the pose position of the bone at ``bone_idx``. The returned :ref:`Vector3<class_Vector3>` is in the local coordinate space of the **Skeleton3D** node. .. rst-class:: classref-item-separator @@ -505,11 +572,9 @@ Returns the pose transform of the specified bone. .. rst-class:: classref-method -:ref:`Quaternion<class_Quaternion>` **get_bone_pose_rotation** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Quaternion<class_Quaternion>` **get_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_rotation>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the pose rotation of the bone at ``bone_idx``. The returned :ref:`Quaternion<class_Quaternion>` is local to the bone with respect to the rotation of any parent bones. .. rst-class:: classref-item-separator @@ -519,11 +584,9 @@ Returns the pose transform of the specified bone. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_bone_pose_scale** **(** :ref:`int<class_int>` bone_idx **)** |const| - -.. container:: contribute +:ref:`Vector3<class_Vector3>` **get_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_pose_scale>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the pose scale of the bone at ``bone_idx``. .. rst-class:: classref-item-separator @@ -533,7 +596,7 @@ Returns the pose transform of the specified bone. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bone_rest** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_bone_rest>` Returns the rest transform for a bone ``bone_idx``. @@ -541,11 +604,25 @@ Returns the rest transform for a bone ``bone_idx``. ---- +.. _class_Skeleton3D_method_get_concatenated_bone_names: + +.. rst-class:: classref-method + +:ref:`StringName<class_StringName>` **get_concatenated_bone_names**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_concatenated_bone_names>` + +Returns all bone names concatenated with commas (``,``) as a single :ref:`StringName<class_StringName>`. + +It is useful to set it as a hint for the enum property. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_get_parentless_bones: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_parentless_bones** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_parentless_bones**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_parentless_bones>` Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton. @@ -557,7 +634,7 @@ Returns an array with all of the bones that are parentless. Another way to look .. rst-class:: classref-method -:ref:`int<class_int>` **get_version** **(** **)** |const| +:ref:`int<class_int>` **get_version**\ (\ ) |const| :ref:`🔗<class_Skeleton3D_method_get_version>` Returns the number of times the bone hierarchy has changed within this skeleton, including renames. @@ -573,7 +650,7 @@ Use for invalidating caches in IK solvers and other nodes which process bones. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_bone_enabled** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`bool<class_bool>` **is_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skeleton3D_method_is_bone_enabled>` Returns whether the bone pose for the bone at ``bone_idx`` is enabled. @@ -585,7 +662,7 @@ Returns whether the bone pose for the bone at ``bone_idx`` is enabled. .. rst-class:: classref-method -void **localize_rests** **(** **)** +|void| **localize_rests**\ (\ ) :ref:`🔗<class_Skeleton3D_method_localize_rests>` Returns all bones in the skeleton to their rest poses. @@ -597,7 +674,9 @@ Returns all bones in the skeleton to their rest poses. .. rst-class:: classref-method -void **physical_bones_add_collision_exception** **(** :ref:`RID<class_RID>` exception **)** +|void| **physical_bones_add_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_add_collision_exception>` + +**Deprecated:** This method may be changed or removed in future versions. Adds a collision exception to the physical bone. @@ -611,7 +690,9 @@ Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node. .. rst-class:: classref-method -void **physical_bones_remove_collision_exception** **(** :ref:`RID<class_RID>` exception **)** +|void| **physical_bones_remove_collision_exception**\ (\ exception\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_remove_collision_exception>` + +**Deprecated:** This method may be changed or removed in future versions. Removes a collision exception to the physical bone. @@ -625,7 +706,9 @@ Works just like the :ref:`RigidBody3D<class_RigidBody3D>` node. .. rst-class:: classref-method -void **physical_bones_start_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)** +|void| **physical_bones_start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_start_simulation>` + +**Deprecated:** This method may be changed or removed in future versions. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to start simulating and reacting to the physics world. @@ -639,7 +722,9 @@ Optionally, a list of bone names can be passed-in, allowing only the passed-in b .. rst-class:: classref-method -void **physical_bones_stop_simulation** **(** **)** +|void| **physical_bones_stop_simulation**\ (\ ) :ref:`🔗<class_Skeleton3D_method_physical_bones_stop_simulation>` + +**Deprecated:** This method may be changed or removed in future versions. Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to stop simulating. @@ -651,7 +736,7 @@ Tells the :ref:`PhysicalBone3D<class_PhysicalBone3D>` nodes in the Skeleton to s .. rst-class:: classref-method -:ref:`SkinReference<class_SkinReference>` **register_skin** **(** :ref:`Skin<class_Skin>` skin **)** +:ref:`SkinReference<class_SkinReference>` **register_skin**\ (\ skin\: :ref:`Skin<class_Skin>`\ ) :ref:`🔗<class_Skeleton3D_method_register_skin>` Binds the given Skin to the Skeleton. @@ -663,7 +748,7 @@ Binds the given Skin to the Skeleton. .. rst-class:: classref-method -void **reset_bone_pose** **(** :ref:`int<class_int>` bone_idx **)** +|void| **reset_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_pose>` Sets the bone pose to rest for ``bone_idx``. @@ -675,7 +760,7 @@ Sets the bone pose to rest for ``bone_idx``. .. rst-class:: classref-method -void **reset_bone_poses** **(** **)** +|void| **reset_bone_poses**\ (\ ) :ref:`🔗<class_Skeleton3D_method_reset_bone_poses>` Sets all bone poses to rests. @@ -683,11 +768,27 @@ Sets all bone poses to rests. ---- +.. _class_Skeleton3D_method_set_animate_physical_bones: + +.. rst-class:: classref-method + +|void| **set_animate_physical_bones**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Skeleton3D_method_set_animate_physical_bones>` + +**Deprecated:** This method may be changed or removed in future versions. + +This method exists for compatibility with old structures in which the **Skeleton3D** does not have a :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>` as a child, but directly has :ref:`PhysicalBone3D<class_PhysicalBone3D>`\ s as children. + +In case you need to raycast to it without running :ref:`physical_bones_start_simulation<class_Skeleton3D_method_physical_bones_start_simulation>`, call this method with ``enabled == true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_enabled: .. rst-class:: classref-method -void **set_bone_enabled** **(** :ref:`int<class_int>` bone_idx, :ref:`bool<class_bool>` enabled=true **)** +|void| **set_bone_enabled**\ (\ bone_idx\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_enabled>` Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone pose if ``true``. @@ -695,11 +796,27 @@ Disables the pose for the bone at ``bone_idx`` if ``false``, enables the bone po ---- +.. _class_Skeleton3D_method_set_bone_global_pose: + +.. rst-class:: classref-method + +|void| **set_bone_global_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_global_pose>` + +Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. + +\ **Note:** If other bone poses have been changed, this method executes a dirty poses recalculation and will cause performance to deteriorate. If you know that multiple global poses will be applied, consider using :ref:`set_bone_pose<class_Skeleton3D_method_set_bone_pose>` with precalculation. + +.. rst-class:: classref-item-separator + +---- + .. _class_Skeleton3D_method_set_bone_global_pose_override: .. rst-class:: classref-method -void **set_bone_global_pose_override** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` pose, :ref:`float<class_float>` amount, :ref:`bool<class_bool>` persistent=false **)** +|void| **set_bone_global_pose_override**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`, amount\: :ref:`float<class_float>`, persistent\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_global_pose_override>` + +**Deprecated:** This method may be changed or removed in future versions. Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. @@ -715,11 +832,9 @@ Sets the global pose transform, ``pose``, for the bone at ``bone_idx``. .. rst-class:: classref-method -void **set_bone_name** **(** :ref:`int<class_int>` bone_idx, :ref:`String<class_String>` name **)** - -.. container:: contribute +|void| **set_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_name>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the bone name, ``name``, for the bone at ``bone_idx``. .. rst-class:: classref-item-separator @@ -729,7 +844,7 @@ void **set_bone_name** **(** :ref:`int<class_int>` bone_idx, :ref:`String<class_ .. rst-class:: classref-method -void **set_bone_parent** **(** :ref:`int<class_int>` bone_idx, :ref:`int<class_int>` parent_idx **)** +|void| **set_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`, parent_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_parent>` Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If -1, then bone has no parent. @@ -739,15 +854,25 @@ Sets the bone index ``parent_idx`` as the parent of the bone at ``bone_idx``. If ---- -.. _class_Skeleton3D_method_set_bone_pose_position: +.. _class_Skeleton3D_method_set_bone_pose: .. rst-class:: classref-method -void **set_bone_pose_position** **(** :ref:`int<class_int>` bone_idx, :ref:`Vector3<class_Vector3>` position **)** +|void| **set_bone_pose**\ (\ bone_idx\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose>` -.. container:: contribute +Sets the pose transform, ``pose``, for the bone at ``bone_idx``. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-item-separator + +---- + +.. _class_Skeleton3D_method_set_bone_pose_position: + +.. rst-class:: classref-method + +|void| **set_bone_pose_position**\ (\ bone_idx\: :ref:`int<class_int>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_position>` + +Sets the pose position of the bone at ``bone_idx`` to ``position``. ``position`` is a :ref:`Vector3<class_Vector3>` describing a position local to the **Skeleton3D** node. .. rst-class:: classref-item-separator @@ -757,11 +882,9 @@ void **set_bone_pose_position** **(** :ref:`int<class_int>` bone_idx, :ref:`Vect .. rst-class:: classref-method -void **set_bone_pose_rotation** **(** :ref:`int<class_int>` bone_idx, :ref:`Quaternion<class_Quaternion>` rotation **)** - -.. container:: contribute +|void| **set_bone_pose_rotation**\ (\ bone_idx\: :ref:`int<class_int>`, rotation\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_rotation>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the pose rotation of the bone at ``bone_idx`` to ``rotation``. ``rotation`` is a :ref:`Quaternion<class_Quaternion>` describing a rotation in the bone's local coordinate space with respect to the rotation of any parent bones. .. rst-class:: classref-item-separator @@ -771,11 +894,9 @@ void **set_bone_pose_rotation** **(** :ref:`int<class_int>` bone_idx, :ref:`Quat .. rst-class:: classref-method -void **set_bone_pose_scale** **(** :ref:`int<class_int>` bone_idx, :ref:`Vector3<class_Vector3>` scale **)** - -.. container:: contribute +|void| **set_bone_pose_scale**\ (\ bone_idx\: :ref:`int<class_int>`, scale\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_pose_scale>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the pose scale of the bone at ``bone_idx`` to ``scale``. .. rst-class:: classref-item-separator @@ -785,7 +906,7 @@ void **set_bone_pose_scale** **(** :ref:`int<class_int>` bone_idx, :ref:`Vector3 .. rst-class:: classref-method -void **set_bone_rest** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` rest **)** +|void| **set_bone_rest**\ (\ bone_idx\: :ref:`int<class_int>`, rest\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skeleton3D_method_set_bone_rest>` Sets the rest transform for bone ``bone_idx``. @@ -797,7 +918,7 @@ Sets the rest transform for bone ``bone_idx``. .. rst-class:: classref-method -void **unparent_bone_and_rest** **(** :ref:`int<class_int>` bone_idx **)** +|void| **unparent_bone_and_rest**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skeleton3D_method_unparent_bone_and_rest>` Unparents the bone at ``bone_idx`` and sets its rest position to that of its parent prior to being reset. @@ -808,3 +929,4 @@ Unparents the bone at ``bone_idx`` and sets its rest position to that of its par .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonik3d.rst b/classes/class_skeletonik3d.rst index 1f4643383e8..0d219b7a9fc 100644 --- a/classes/class_skeletonik3d.rst +++ b/classes/class_skeletonik3d.rst @@ -10,7 +10,9 @@ SkeletonIK3D ============ -**Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` +**Deprecated:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` A node used to rotate all bones of a :ref:`Skeleton3D<class_Skeleton3D>` bone chain a way that places the end bone at a desired 3D position. @@ -19,7 +21,7 @@ A node used to rotate all bones of a :ref:`Skeleton3D<class_Skeleton3D>` bone ch Description ----------- -SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D<class_Skeleton3D>` bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D<class_Skeleton3D>` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied, this overwrites any bone transform from :ref:`Animation<class_Animation>`\ s or bone custom poses set by users. The applied amount can be controlled with the :ref:`interpolation<class_SkeletonIK3D_property_interpolation>` property. +SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D<class_Skeleton3D>` bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the :ref:`Skeleton3D<class_Skeleton3D>` ``bones_global_pose_override`` property for all affected bones in the chain. If fully applied, this overwrites any bone transform from :ref:`Animation<class_Animation>`\ s or bone custom poses set by users. The applied amount can be controlled with the :ref:`SkeletonModifier3D.influence<class_SkeletonModifier3D_property_influence>` property. :: @@ -33,22 +35,13 @@ SkeletonIK3D is used to rotate all bones of a :ref:`Skeleton3D<class_Skeleton3D> skeleton_ik_node.stop() # Apply full IK effect - skeleton_ik_node.set_interpolation(1.0) + skeleton_ik_node.set_influence(1.0) # Apply half IK effect - skeleton_ik_node.set_interpolation(0.5) + skeleton_ik_node.set_influence(0.5) # Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton) - skeleton_ik_node.set_interpolation(0.0) - -\ *Deprecated.* This class is deprecated, and might be removed in a future release. - -.. rst-class:: classref-introduction-group - -Tutorials ---------- - -- `3D Inverse Kinematics Demo <https://godotengine.org/asset-library/asset/523>`__ + skeleton_ik_node.set_influence(0.0) .. rst-class:: classref-reftable-group @@ -59,7 +52,7 @@ Properties :widths: auto +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`interpolation<class_SkeletonIK3D_property_interpolation>` | ``1.0`` | + | :ref:`float<class_float>` | :ref:`interpolation<class_SkeletonIK3D_property_interpolation>` | | +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Vector3<class_Vector3>` | :ref:`magnet<class_SkeletonIK3D_property_magnet>` | ``Vector3(0, 0, 0)`` | +---------------------------------------+---------------------------------------------------------------------------+-----------------------------------------------------+ @@ -88,15 +81,15 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_parent_skeleton<class_SkeletonIK3D_method_get_parent_skeleton>` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_running<class_SkeletonIK3D_method_is_running>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------+ - | void | :ref:`start<class_SkeletonIK3D_method_start>` **(** :ref:`bool<class_bool>` one_time=false **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_SkeletonIK3D_method_stop>` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------+ + +-------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_parent_skeleton<class_SkeletonIK3D_method_get_parent_skeleton>`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_running<class_SkeletonIK3D_method_is_running>`\ (\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start<class_SkeletonIK3D_method_start>`\ (\ one_time\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_SkeletonIK3D_method_stop>`\ (\ ) | + +-------------------------------------+-------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,14 +104,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **interpolation** = ``1.0`` +:ref:`float<class_float>` **interpolation** :ref:`🔗<class_SkeletonIK3D_property_interpolation>` .. rst-class:: classref-property-setget -- void **set_interpolation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_interpolation** **(** **)** +- |void| **set_interpolation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_interpolation**\ (\ ) + +**Deprecated:** Use :ref:`SkeletonModifier3D.influence<class_SkeletonModifier3D_property_influence>` instead. -Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of ``1.0`` will overwrite all skeleton bone transforms completely while a value of ``0.0`` will visually disable the SkeletonIK. A value at or below ``0.01`` also calls :ref:`Skeleton3D.clear_bones_global_pose_override<class_Skeleton3D_method_clear_bones_global_pose_override>`. +Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of ``1.0`` will overwrite all skeleton bone transforms completely while a value of ``0.0`` will visually disable the SkeletonIK. .. rst-class:: classref-item-separator @@ -128,12 +123,12 @@ Interpolation value for how much the IK results are applied to the current skele .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **magnet** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **magnet** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_SkeletonIK3D_property_magnet>` .. rst-class:: classref-property-setget -- void **set_magnet_position** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_magnet_position** **(** **)** +- |void| **set_magnet_position**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_magnet_position**\ (\ ) Secondary target position (first is :ref:`target<class_SkeletonIK3D_property_target>` property or :ref:`target_node<class_SkeletonIK3D_property_target_node>`) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position. @@ -145,12 +140,12 @@ Secondary target position (first is :ref:`target<class_SkeletonIK3D_property_tar .. rst-class:: classref-property -:ref:`int<class_int>` **max_iterations** = ``10`` +:ref:`int<class_int>` **max_iterations** = ``10`` :ref:`🔗<class_SkeletonIK3D_property_max_iterations>` .. rst-class:: classref-property-setget -- void **set_max_iterations** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_iterations** **(** **)** +- |void| **set_max_iterations**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_iterations**\ (\ ) Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results. @@ -162,12 +157,12 @@ Number of iteration loops used by the IK solver to produce more accurate (and el .. rst-class:: classref-property -:ref:`float<class_float>` **min_distance** = ``0.01`` +:ref:`float<class_float>` **min_distance** = ``0.01`` :ref:`🔗<class_SkeletonIK3D_property_min_distance>` .. rst-class:: classref-property-setget -- void **set_min_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min_distance** **(** **)** +- |void| **set_min_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min_distance**\ (\ ) The minimum distance between bone and goal target. If the distance is below this value, the IK solver stops further iterations. @@ -179,12 +174,12 @@ The minimum distance between bone and goal target. If the distance is below this .. rst-class:: classref-property -:ref:`bool<class_bool>` **override_tip_basis** = ``true`` +:ref:`bool<class_bool>` **override_tip_basis** = ``true`` :ref:`🔗<class_SkeletonIK3D_property_override_tip_basis>` .. rst-class:: classref-property-setget -- void **set_override_tip_basis** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_override_tip_basis** **(** **)** +- |void| **set_override_tip_basis**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_override_tip_basis**\ (\ ) If ``true`` overwrites the rotation of the tip bone with the rotation of the :ref:`target<class_SkeletonIK3D_property_target>` (or :ref:`target_node<class_SkeletonIK3D_property_target_node>` if defined). @@ -196,12 +191,12 @@ If ``true`` overwrites the rotation of the tip bone with the rotation of the :re .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **root_bone** = ``&""`` +:ref:`StringName<class_StringName>` **root_bone** = ``&""`` :ref:`🔗<class_SkeletonIK3D_property_root_bone>` .. rst-class:: classref-property-setget -- void **set_root_bone** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_root_bone** **(** **)** +- |void| **set_root_bone**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_root_bone**\ (\ ) The name of the current root bone, the first bone in the IK chain. @@ -213,12 +208,12 @@ The name of the current root bone, the first bone in the IK chain. .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **target** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **target** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_SkeletonIK3D_property_target>` .. rst-class:: classref-property-setget -- void **set_target_transform** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_target_transform** **(** **)** +- |void| **set_target_transform**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_target_transform**\ (\ ) First target of the IK chain where the tip bone is placed and, if :ref:`override_tip_basis<class_SkeletonIK3D_property_override_tip_basis>` is ``true``, how the tip bone is rotated. If a :ref:`target_node<class_SkeletonIK3D_property_target_node>` path is available the nodes transform is used instead and this property is ignored. @@ -230,12 +225,12 @@ First target of the IK chain where the tip bone is placed and, if :ref:`override .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_node** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_node** = ``NodePath("")`` :ref:`🔗<class_SkeletonIK3D_property_target_node>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) Target node :ref:`NodePath<class_NodePath>` for the IK chain. If available, the node's current :ref:`Transform3D<class_Transform3D>` is used instead of the :ref:`target<class_SkeletonIK3D_property_target>` property. @@ -247,12 +242,12 @@ Target node :ref:`NodePath<class_NodePath>` for the IK chain. If available, the .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **tip_bone** = ``&""`` +:ref:`StringName<class_StringName>` **tip_bone** = ``&""`` :ref:`🔗<class_SkeletonIK3D_property_tip_bone>` .. rst-class:: classref-property-setget -- void **set_tip_bone** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_tip_bone** **(** **)** +- |void| **set_tip_bone**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_tip_bone**\ (\ ) The name of the current tip bone, the last bone in the IK chain placed at the :ref:`target<class_SkeletonIK3D_property_target>` transform (or :ref:`target_node<class_SkeletonIK3D_property_target_node>` if defined). @@ -264,12 +259,12 @@ The name of the current tip bone, the last bone in the IK chain placed at the :r .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_magnet** = ``false`` +:ref:`bool<class_bool>` **use_magnet** = ``false`` :ref:`🔗<class_SkeletonIK3D_property_use_magnet>` .. rst-class:: classref-property-setget -- void **set_use_magnet** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_magnet** **(** **)** +- |void| **set_use_magnet**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_magnet**\ (\ ) If ``true``, instructs the IK solver to consider the secondary magnet target (pole target) when calculating the bone chain. Use the magnet position (pole target) to control the bending of the IK chain. @@ -286,7 +281,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Skeleton3D<class_Skeleton3D>` **get_parent_skeleton** **(** **)** |const| +:ref:`Skeleton3D<class_Skeleton3D>` **get_parent_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonIK3D_method_get_parent_skeleton>` Returns the parent :ref:`Skeleton3D<class_Skeleton3D>` Node that was present when SkeletonIK entered the :ref:`SceneTree<class_SceneTree>`. Returns null if the parent node was not a :ref:`Skeleton3D<class_Skeleton3D>` Node when SkeletonIK3D entered the :ref:`SceneTree<class_SceneTree>`. @@ -298,7 +293,7 @@ Returns the parent :ref:`Skeleton3D<class_Skeleton3D>` Node that was present whe .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_running** **(** **)** +:ref:`bool<class_bool>` **is_running**\ (\ ) :ref:`🔗<class_SkeletonIK3D_method_is_running>` Returns ``true`` if SkeletonIK is applying IK effects on continues frames to the :ref:`Skeleton3D<class_Skeleton3D>` bones. Returns ``false`` if SkeletonIK is stopped or :ref:`start<class_SkeletonIK3D_method_start>` was used with the ``one_time`` parameter set to ``true``. @@ -310,7 +305,7 @@ Returns ``true`` if SkeletonIK is applying IK effects on continues frames to the .. rst-class:: classref-method -void **start** **(** :ref:`bool<class_bool>` one_time=false **)** +|void| **start**\ (\ one_time\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_SkeletonIK3D_method_start>` Starts applying IK effects on each frame to the :ref:`Skeleton3D<class_Skeleton3D>` bones but will only take effect starting on the next frame. If ``one_time`` is ``true``, this will take effect immediately but also reset on the next frame. @@ -322,7 +317,7 @@ Starts applying IK effects on each frame to the :ref:`Skeleton3D<class_Skeleton3 .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_SkeletonIK3D_method_stop>` Stops applying IK effects on each frame to the :ref:`Skeleton3D<class_Skeleton3D>` bones and also calls :ref:`Skeleton3D.clear_bones_global_pose_override<class_Skeleton3D_method_clear_bones_global_pose_override>` to remove existing overrides on all bones. @@ -333,3 +328,4 @@ Stops applying IK effects on each frame to the :ref:`Skeleton3D<class_Skeleton3D .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2d.rst b/classes/class_skeletonmodification2d.rst index 3babd38f9f3..7475c8735e4 100644 --- a/classes/class_skeletonmodification2d.rst +++ b/classes/class_skeletonmodification2d.rst @@ -10,6 +10,8 @@ SkeletonModification2D ====================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` **Inherited By:** :ref:`SkeletonModification2DCCDIK<class_SkeletonModification2DCCDIK>`, :ref:`SkeletonModification2DFABRIK<class_SkeletonModification2DFABRIK>`, :ref:`SkeletonModification2DJiggle<class_SkeletonModification2DJiggle>`, :ref:`SkeletonModification2DLookAt<class_SkeletonModification2DLookAt>`, :ref:`SkeletonModification2DPhysicalBones<class_SkeletonModification2DPhysicalBones>`, :ref:`SkeletonModification2DStackHolder<class_SkeletonModification2DStackHolder>`, :ref:`SkeletonModification2DTwoBoneIK<class_SkeletonModification2DTwoBoneIK>` @@ -47,25 +49,25 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_editor_gizmo<class_SkeletonModification2D_method__draw_editor_gizmo>` **(** **)** |virtual| | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_execute<class_SkeletonModification2D_method__execute>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup_modification<class_SkeletonModification2D_method__setup_modification>` **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` modification_stack **)** |virtual| | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`clamp_angle<class_SkeletonModification2D_method_clamp_angle>` **(** :ref:`float<class_float>` angle, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`bool<class_bool>` invert **)** | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_editor_draw_gizmo<class_SkeletonModification2D_method_get_editor_draw_gizmo>` **(** **)** |const| | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModification2D_method_get_is_setup>` **(** **)** |const| | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_modification_stack<class_SkeletonModification2D_method_get_modification_stack>` **(** **)** | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_editor_draw_gizmo<class_SkeletonModification2D_method_set_editor_draw_gizmo>` **(** :ref:`bool<class_bool>` draw_gizmo **)** | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_is_setup<class_SkeletonModification2D_method_set_is_setup>` **(** :ref:`bool<class_bool>` is_setup **)** | - +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw_editor_gizmo<class_SkeletonModification2D_private_method__draw_editor_gizmo>`\ (\ ) |virtual| | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_execute<class_SkeletonModification2D_private_method__execute>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_setup_modification<class_SkeletonModification2D_private_method__setup_modification>`\ (\ modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) |virtual| | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`clamp_angle<class_SkeletonModification2D_method_clamp_angle>`\ (\ angle\: :ref:`float<class_float>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, invert\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_editor_draw_gizmo<class_SkeletonModification2D_method_get_editor_draw_gizmo>`\ (\ ) |const| | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModification2D_method_get_is_setup>`\ (\ ) |const| | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_modification_stack<class_SkeletonModification2D_method_get_modification_stack>`\ (\ ) | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_editor_draw_gizmo<class_SkeletonModification2D_method_set_editor_draw_gizmo>`\ (\ draw_gizmo\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_is_setup<class_SkeletonModification2D_method_set_is_setup>`\ (\ is_setup\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,14 +82,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``true`` +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_SkeletonModification2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enabled**\ (\ ) -If ``true``, the modification's :ref:`_execute<class_SkeletonModification2D_method__execute>` function will be called by the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`. +If ``true``, the modification's :ref:`_execute<class_SkeletonModification2D_private_method__execute>` function will be called by the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`. .. rst-class:: classref-item-separator @@ -97,12 +99,12 @@ If ``true``, the modification's :ref:`_execute<class_SkeletonModification2D_meth .. rst-class:: classref-property -:ref:`int<class_int>` **execution_mode** = ``0`` +:ref:`int<class_int>` **execution_mode** = ``0`` :ref:`🔗<class_SkeletonModification2D_property_execution_mode>` .. rst-class:: classref-property-setget -- void **set_execution_mode** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_execution_mode** **(** **)** +- |void| **set_execution_mode**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_execution_mode**\ (\ ) The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes. @@ -115,11 +117,11 @@ The execution mode for the modification. This tells the modification stack when Method Descriptions ------------------- -.. _class_SkeletonModification2D_method__draw_editor_gizmo: +.. _class_SkeletonModification2D_private_method__draw_editor_gizmo: .. rst-class:: classref-method -void **_draw_editor_gizmo** **(** **)** |virtual| +|void| **_draw_editor_gizmo**\ (\ ) |virtual| :ref:`🔗<class_SkeletonModification2D_private_method__draw_editor_gizmo>` Used for drawing **editor-only** modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos. @@ -129,11 +131,11 @@ Used for drawing **editor-only** modification gizmos. This function will only be ---- -.. _class_SkeletonModification2D_method__execute: +.. _class_SkeletonModification2D_private_method__execute: .. rst-class:: classref-method -void **_execute** **(** :ref:`float<class_float>` delta **)** |virtual| +|void| **_execute**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_SkeletonModification2D_private_method__execute>` Executes the given modification. This is where the modification performs whatever function it is designed to do. @@ -141,11 +143,11 @@ Executes the given modification. This is where the modification performs whateve ---- -.. _class_SkeletonModification2D_method__setup_modification: +.. _class_SkeletonModification2D_private_method__setup_modification: .. rst-class:: classref-method -void **_setup_modification** **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` modification_stack **)** |virtual| +|void| **_setup_modification**\ (\ modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) |virtual| :ref:`🔗<class_SkeletonModification2D_private_method__setup_modification>` Called when the modification is setup. This is where the modification performs initialization. @@ -157,7 +159,7 @@ Called when the modification is setup. This is where the modification performs i .. rst-class:: classref-method -:ref:`float<class_float>` **clamp_angle** **(** :ref:`float<class_float>` angle, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`bool<class_bool>` invert **)** +:ref:`float<class_float>` **clamp_angle**\ (\ angle\: :ref:`float<class_float>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, invert\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2D_method_clamp_angle>` Takes an angle and clamps it so it is within the passed-in ``min`` and ``max`` range. ``invert`` will inversely clamp the angle, clamping it to the range outside of the given bounds. @@ -169,9 +171,9 @@ Takes an angle and clamps it so it is within the passed-in ``min`` and ``max`` r .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_editor_draw_gizmo** **(** **)** |const| +:ref:`bool<class_bool>` **get_editor_draw_gizmo**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2D_method_get_editor_draw_gizmo>` -Returns whether this modification will call :ref:`_draw_editor_gizmo<class_SkeletonModification2D_method__draw_editor_gizmo>` in the Godot editor to draw modification-specific gizmos. +Returns whether this modification will call :ref:`_draw_editor_gizmo<class_SkeletonModification2D_private_method__draw_editor_gizmo>` in the Godot editor to draw modification-specific gizmos. .. rst-class:: classref-item-separator @@ -181,7 +183,7 @@ Returns whether this modification will call :ref:`_draw_editor_gizmo<class_Skele .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_is_setup** **(** **)** |const| +:ref:`bool<class_bool>` **get_is_setup**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2D_method_get_is_setup>` Returns whether this modification has been successfully setup or not. @@ -193,7 +195,7 @@ Returns whether this modification has been successfully setup or not. .. rst-class:: classref-method -:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_modification_stack** **(** **)** +:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_modification_stack**\ (\ ) :ref:`🔗<class_SkeletonModification2D_method_get_modification_stack>` Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` that this modification is bound to. Through the modification stack, you can access the Skeleton2D the modification is operating on. @@ -205,9 +207,9 @@ Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D> .. rst-class:: classref-method -void **set_editor_draw_gizmo** **(** :ref:`bool<class_bool>` draw_gizmo **)** +|void| **set_editor_draw_gizmo**\ (\ draw_gizmo\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2D_method_set_editor_draw_gizmo>` -Sets whether this modification will call :ref:`_draw_editor_gizmo<class_SkeletonModification2D_method__draw_editor_gizmo>` in the Godot editor to draw modification-specific gizmos. +Sets whether this modification will call :ref:`_draw_editor_gizmo<class_SkeletonModification2D_private_method__draw_editor_gizmo>` in the Godot editor to draw modification-specific gizmos. .. rst-class:: classref-item-separator @@ -217,7 +219,7 @@ Sets whether this modification will call :ref:`_draw_editor_gizmo<class_Skeleton .. rst-class:: classref-method -void **set_is_setup** **(** :ref:`bool<class_bool>` is_setup **)** +|void| **set_is_setup**\ (\ is_setup\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2D_method_set_is_setup>` Manually allows you to set the setup state of the modification. This function should only rarely be used, as the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` the modification is bound to should handle setting the modification up. @@ -228,3 +230,4 @@ Manually allows you to set the setup state of the modification. This function sh .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dccdik.rst b/classes/class_skeletonmodification2dccdik.rst index 4e1d3983a30..dce4267f46b 100644 --- a/classes/class_skeletonmodification2dccdik.rst +++ b/classes/class_skeletonmodification2dccdik.rst @@ -10,6 +10,8 @@ SkeletonModification2DCCDIK =========================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D. @@ -51,35 +53,35 @@ Methods .. table:: :widths: auto - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_ccdik_joint_bone2d_node<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_ccdik_joint_bone_index<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_constraint_angle_invert<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_invert>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_ccdik_joint_constraint_angle_max<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_max>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_ccdik_joint_constraint_angle_min<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_min>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_enable_constraint<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_enable_constraint>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_rotate_from_joint<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_rotate_from_joint>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_bone2d_node<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_nodepath **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_bone_index<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_constraint_angle_invert<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_invert>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` invert **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_constraint_angle_max<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_max>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` angle_max **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_constraint_angle_min<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_min>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` angle_min **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_enable_constraint<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_enable_constraint>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` enable_constraint **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ccdik_joint_rotate_from_joint<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_rotate_from_joint>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` rotate_from_joint **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_ccdik_joint_bone2d_node<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_ccdik_joint_bone_index<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_constraint_angle_invert<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_invert>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_ccdik_joint_constraint_angle_max<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_max>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_ccdik_joint_constraint_angle_min<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_min>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_enable_constraint<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_enable_constraint>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_ccdik_joint_rotate_from_joint<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_rotate_from_joint>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_bone2d_node<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_nodepath\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_bone_index<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_constraint_angle_invert<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_invert>`\ (\ joint_idx\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_constraint_angle_max<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_max>`\ (\ joint_idx\: :ref:`int<class_int>`, angle_max\: :ref:`float<class_float>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_constraint_angle_min<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_min>`\ (\ joint_idx\: :ref:`int<class_int>`, angle_min\: :ref:`float<class_float>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_enable_constraint<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_enable_constraint>`\ (\ joint_idx\: :ref:`int<class_int>`, enable_constraint\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ccdik_joint_rotate_from_joint<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_rotate_from_joint>`\ (\ joint_idx\: :ref:`int<class_int>`, rotate_from_joint\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,12 +96,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **ccdik_data_chain_length** = ``0`` +:ref:`int<class_int>` **ccdik_data_chain_length** = ``0`` :ref:`🔗<class_SkeletonModification2DCCDIK_property_ccdik_data_chain_length>` .. rst-class:: classref-property-setget -- void **set_ccdik_data_chain_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_ccdik_data_chain_length** **(** **)** +- |void| **set_ccdik_data_chain_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_ccdik_data_chain_length**\ (\ ) The number of CCDIK joints in the CCDIK modification. @@ -111,12 +113,12 @@ The number of CCDIK joints in the CCDIK modification. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DCCDIK_property_target_nodepath>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to. @@ -128,12 +130,12 @@ The NodePath to the node that is the target for the CCDIK modification. This nod .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **tip_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **tip_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DCCDIK_property_tip_nodepath>` .. rst-class:: classref-property-setget -- void **set_tip_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_tip_node** **(** **)** +- |void| **set_tip_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_tip_node**\ (\ ) The end position of the CCDIK chain. Typically, this should be a child of a :ref:`Bone2D<class_Bone2D>` node attached to the final :ref:`Bone2D<class_Bone2D>` in the CCDIK chain. @@ -150,7 +152,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_ccdik_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_ccdik_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone2d_node>` Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK joint at ``joint_idx``. @@ -162,7 +164,7 @@ Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK joint at ``jo .. rst-class:: classref-method -:ref:`int<class_int>` **get_ccdik_joint_bone_index** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`int<class_int>` **get_ccdik_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone_index>` Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK joint at ``joint_idx``. @@ -174,7 +176,7 @@ Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_ccdik_joint_constraint_angle_invert** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_ccdik_joint_constraint_angle_invert**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_invert>` Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. See :ref:`set_ccdik_joint_constraint_angle_invert<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_invert>` for details. @@ -186,7 +188,7 @@ Returns whether the CCDIK joint at ``joint_idx`` uses an inverted joint constrai .. rst-class:: classref-method -:ref:`float<class_float>` **get_ccdik_joint_constraint_angle_max** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`float<class_float>` **get_ccdik_joint_constraint_angle_max**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_max>` Returns the maximum angle constraint for the joint at ``joint_idx``. @@ -198,7 +200,7 @@ Returns the maximum angle constraint for the joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`float<class_float>` **get_ccdik_joint_constraint_angle_min** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`float<class_float>` **get_ccdik_joint_constraint_angle_min**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_constraint_angle_min>` Returns the minimum angle constraint for the joint at ``joint_idx``. @@ -210,7 +212,7 @@ Returns the minimum angle constraint for the joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_ccdik_joint_enable_constraint** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_ccdik_joint_enable_constraint**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_enable_constraint>` Returns whether angle constraints on the CCDIK joint at ``joint_idx`` are enabled. @@ -222,7 +224,7 @@ Returns whether angle constraints on the CCDIK joint at ``joint_idx`` are enable .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_ccdik_joint_rotate_from_joint** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_ccdik_joint_rotate_from_joint**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DCCDIK_method_get_ccdik_joint_rotate_from_joint>` Returns whether the joint at ``joint_idx`` is set to rotate from the joint, ``true``, or to rotate from the tip, ``false``. The default is to rotate from the tip. @@ -234,7 +236,7 @@ Returns whether the joint at ``joint_idx`` is set to rotate from the joint, ``tr .. rst-class:: classref-method -void **set_ccdik_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_nodepath **)** +|void| **set_ccdik_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_nodepath\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone2d_node>` Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK joint at ``joint_idx``. @@ -246,7 +248,7 @@ Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the CCDIK joint at ``joint .. rst-class:: classref-method -void **set_ccdik_joint_bone_index** **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** +|void| **set_ccdik_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_bone_index>` Sets the bone index, ``bone_idx``, of the CCDIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the CCDIK joint based on data provided by the linked skeleton. @@ -258,7 +260,7 @@ Sets the bone index, ``bone_idx``, of the CCDIK joint at ``joint_idx``. When pos .. rst-class:: classref-method -void **set_ccdik_joint_constraint_angle_invert** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` invert **)** +|void| **set_ccdik_joint_constraint_angle_invert**\ (\ joint_idx\: :ref:`int<class_int>`, invert\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_invert>` Sets whether the CCDIK joint at ``joint_idx`` uses an inverted joint constraint. @@ -272,7 +274,7 @@ An inverted joint constraint only constraints the CCDIK joint to the angles *out .. rst-class:: classref-method -void **set_ccdik_joint_constraint_angle_max** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` angle_max **)** +|void| **set_ccdik_joint_constraint_angle_max**\ (\ joint_idx\: :ref:`int<class_int>`, angle_max\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_max>` Sets the maximum angle constraint for the joint at ``joint_idx``. @@ -284,7 +286,7 @@ Sets the maximum angle constraint for the joint at ``joint_idx``. .. rst-class:: classref-method -void **set_ccdik_joint_constraint_angle_min** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` angle_min **)** +|void| **set_ccdik_joint_constraint_angle_min**\ (\ joint_idx\: :ref:`int<class_int>`, angle_min\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_constraint_angle_min>` Sets the minimum angle constraint for the joint at ``joint_idx``. @@ -296,7 +298,7 @@ Sets the minimum angle constraint for the joint at ``joint_idx``. .. rst-class:: classref-method -void **set_ccdik_joint_enable_constraint** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` enable_constraint **)** +|void| **set_ccdik_joint_enable_constraint**\ (\ joint_idx\: :ref:`int<class_int>`, enable_constraint\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_enable_constraint>` Determines whether angle constraints on the CCDIK joint at ``joint_idx`` are enabled. When ``true``, constraints will be enabled and taken into account when solving. @@ -308,7 +310,7 @@ Determines whether angle constraints on the CCDIK joint at ``joint_idx`` are ena .. rst-class:: classref-method -void **set_ccdik_joint_rotate_from_joint** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` rotate_from_joint **)** +|void| **set_ccdik_joint_rotate_from_joint**\ (\ joint_idx\: :ref:`int<class_int>`, rotate_from_joint\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DCCDIK_method_set_ccdik_joint_rotate_from_joint>` Sets whether the joint at ``joint_idx`` is set to rotate from the joint, ``true``, or to rotate from the tip, ``false``. @@ -319,3 +321,4 @@ Sets whether the joint at ``joint_idx`` is set to rotate from the joint, ``true` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dfabrik.rst b/classes/class_skeletonmodification2dfabrik.rst index 2279b8139d2..ff216f5e432 100644 --- a/classes/class_skeletonmodification2dfabrik.rst +++ b/classes/class_skeletonmodification2dfabrik.rst @@ -10,6 +10,8 @@ SkeletonModification2DFABRIK ============================ +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that uses FABRIK to manipulate a series of :ref:`Bone2D<class_Bone2D>` nodes to reach a target. @@ -51,23 +53,23 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_fabrik_joint_bone2d_node<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_fabrik_joint_bone_index<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_fabrik_joint_magnet_position<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_magnet_position>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_fabrik_joint_use_target_rotation<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_use_target_rotation>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fabrik_joint_bone2d_node<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_nodepath **)** | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fabrik_joint_bone_index<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fabrik_joint_magnet_position<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_magnet_position>` **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` magnet_position **)** | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fabrik_joint_use_target_rotation<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_use_target_rotation>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_target_rotation **)** | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_fabrik_joint_bone2d_node<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_fabrik_joint_bone_index<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_fabrik_joint_magnet_position<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_magnet_position>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_fabrik_joint_use_target_rotation<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_use_target_rotation>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_fabrik_joint_bone2d_node<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_nodepath\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_fabrik_joint_bone_index<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_fabrik_joint_magnet_position<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_magnet_position>`\ (\ joint_idx\: :ref:`int<class_int>`, magnet_position\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_fabrik_joint_use_target_rotation<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_use_target_rotation>`\ (\ joint_idx\: :ref:`int<class_int>`, use_target_rotation\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,12 +84,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **fabrik_data_chain_length** = ``0`` +:ref:`int<class_int>` **fabrik_data_chain_length** = ``0`` :ref:`🔗<class_SkeletonModification2DFABRIK_property_fabrik_data_chain_length>` .. rst-class:: classref-property-setget -- void **set_fabrik_data_chain_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fabrik_data_chain_length** **(** **)** +- |void| **set_fabrik_data_chain_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fabrik_data_chain_length**\ (\ ) The number of FABRIK joints in the FABRIK modification. @@ -99,12 +101,12 @@ The number of FABRIK joints in the FABRIK modification. .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DFABRIK_property_target_nodepath>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to. @@ -121,7 +123,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_fabrik_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_fabrik_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone2d_node>` Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK joint at ``joint_idx``. @@ -133,7 +135,7 @@ Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK joint at ``j .. rst-class:: classref-method -:ref:`int<class_int>` **get_fabrik_joint_bone_index** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`int<class_int>` **get_fabrik_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone_index>` Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK joint at ``joint_idx``. @@ -145,7 +147,7 @@ Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_fabrik_joint_magnet_position** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_fabrik_joint_magnet_position**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_magnet_position>` Returns the magnet position vector for the joint at ``joint_idx``. @@ -157,7 +159,7 @@ Returns the magnet position vector for the joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_fabrik_joint_use_target_rotation** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_fabrik_joint_use_target_rotation**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DFABRIK_method_get_fabrik_joint_use_target_rotation>` Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain. @@ -169,7 +171,7 @@ Returns whether the joint is using the target's rotation rather than allowing FA .. rst-class:: classref-method -void **set_fabrik_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_nodepath **)** +|void| **set_fabrik_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_nodepath\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone2d_node>` Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK joint at ``joint_idx``. @@ -181,7 +183,7 @@ Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the FABRIK joint at ``join .. rst-class:: classref-method -void **set_fabrik_joint_bone_index** **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** +|void| **set_fabrik_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_bone_index>` Sets the bone index, ``bone_idx``, of the FABRIK joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the FABRIK joint based on data provided by the linked skeleton. @@ -193,7 +195,7 @@ Sets the bone index, ``bone_idx``, of the FABRIK joint at ``joint_idx``. When po .. rst-class:: classref-method -void **set_fabrik_joint_magnet_position** **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` magnet_position **)** +|void| **set_fabrik_joint_magnet_position**\ (\ joint_idx\: :ref:`int<class_int>`, magnet_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_magnet_position>` Sets the magnet position vector for the joint at ``joint_idx``. @@ -205,7 +207,7 @@ Sets the magnet position vector for the joint at ``joint_idx``. .. rst-class:: classref-method -void **set_fabrik_joint_use_target_rotation** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_target_rotation **)** +|void| **set_fabrik_joint_use_target_rotation**\ (\ joint_idx\: :ref:`int<class_int>`, use_target_rotation\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DFABRIK_method_set_fabrik_joint_use_target_rotation>` Sets whether the joint at ``joint_idx`` will use the target node's rotation rather than letting FABRIK rotate the node. @@ -218,3 +220,4 @@ Sets whether the joint at ``joint_idx`` will use the target node's rotation rath .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2djiggle.rst b/classes/class_skeletonmodification2djiggle.rst index 3f999f4dcca..1accb67ef84 100644 --- a/classes/class_skeletonmodification2djiggle.rst +++ b/classes/class_skeletonmodification2djiggle.rst @@ -10,6 +10,8 @@ SkeletonModification2DJiggle ============================ +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that jiggles :ref:`Bone2D<class_Bone2D>` nodes as they move towards a target. @@ -57,47 +59,47 @@ Methods .. table:: :widths: auto - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_mask<class_SkeletonModification2DJiggle_method_get_collision_mask>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_override<class_SkeletonModification2DJiggle_method_get_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_use_colliders<class_SkeletonModification2DJiggle_method_get_use_colliders>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask<class_SkeletonModification2DJiggle_method_set_collision_mask>` **(** :ref:`int<class_int>` collision_mask **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index>` **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_override<class_SkeletonModification2DJiggle_method_set_jiggle_joint_override>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness>` **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity>` **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_colliders<class_SkeletonModification2DJiggle_method_set_use_colliders>` **(** :ref:`bool<class_bool>` use_colliders **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_mask<class_SkeletonModification2DJiggle_method_get_collision_mask>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_override<class_SkeletonModification2DJiggle_method_get_jiggle_joint_override>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_use_colliders<class_SkeletonModification2DJiggle_method_get_use_colliders>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask<class_SkeletonModification2DJiggle_method_set_collision_mask>`\ (\ collision_mask\: :ref:`int<class_int>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_bone2d_node<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node>`\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_bone_index<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index>`\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_damping<class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping>`\ (\ joint_idx\: :ref:`int<class_int>`, damping\: :ref:`float<class_float>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity>`\ (\ joint_idx\: :ref:`int<class_int>`, gravity\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_mass<class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass>`\ (\ joint_idx\: :ref:`int<class_int>`, mass\: :ref:`float<class_float>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_override<class_SkeletonModification2DJiggle_method_set_jiggle_joint_override>`\ (\ joint_idx\: :ref:`int<class_int>`, override\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_stiffness<class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness>`\ (\ joint_idx\: :ref:`int<class_int>`, stiffness\: :ref:`float<class_float>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_jiggle_joint_use_gravity<class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity>`\ (\ joint_idx\: :ref:`int<class_int>`, use_gravity\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_colliders<class_SkeletonModification2DJiggle_method_set_use_colliders>`\ (\ use_colliders\: :ref:`bool<class_bool>`\ ) | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,12 +114,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **damping** = ``0.75`` +:ref:`float<class_float>` **damping** = ``0.75`` :ref:`🔗<class_SkeletonModification2DJiggle_property_damping>` .. rst-class:: classref-property-setget -- void **set_damping** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_damping** **(** **)** +- |void| **set_damping**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_damping**\ (\ ) The default amount of damping applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. @@ -129,12 +131,12 @@ The default amount of damping applied to the Jiggle joints, if they are not over .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **gravity** = ``Vector2(0, 6)`` +:ref:`Vector2<class_Vector2>` **gravity** = ``Vector2(0, 6)`` :ref:`🔗<class_SkeletonModification2DJiggle_property_gravity>` .. rst-class:: classref-property-setget -- void **set_gravity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_gravity** **(** **)** +- |void| **set_gravity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_gravity**\ (\ ) The default amount of gravity applied to the Jiggle joints, if they are not overridden. @@ -146,12 +148,12 @@ The default amount of gravity applied to the Jiggle joints, if they are not over .. rst-class:: classref-property -:ref:`int<class_int>` **jiggle_data_chain_length** = ``0`` +:ref:`int<class_int>` **jiggle_data_chain_length** = ``0`` :ref:`🔗<class_SkeletonModification2DJiggle_property_jiggle_data_chain_length>` .. rst-class:: classref-property-setget -- void **set_jiggle_data_chain_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_jiggle_data_chain_length** **(** **)** +- |void| **set_jiggle_data_chain_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_jiggle_data_chain_length**\ (\ ) The amount of Jiggle joints in the Jiggle modification. @@ -163,12 +165,12 @@ The amount of Jiggle joints in the Jiggle modification. .. rst-class:: classref-property -:ref:`float<class_float>` **mass** = ``0.75`` +:ref:`float<class_float>` **mass** = ``0.75`` :ref:`🔗<class_SkeletonModification2DJiggle_property_mass>` .. rst-class:: classref-property-setget -- void **set_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mass** **(** **)** +- |void| **set_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mass**\ (\ ) The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting. @@ -180,12 +182,12 @@ The default amount of mass assigned to the Jiggle joints, if they are not overri .. rst-class:: classref-property -:ref:`float<class_float>` **stiffness** = ``3.0`` +:ref:`float<class_float>` **stiffness** = ``3.0`` :ref:`🔗<class_SkeletonModification2DJiggle_property_stiffness>` .. rst-class:: classref-property-setget -- void **set_stiffness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_stiffness** **(** **)** +- |void| **set_stiffness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_stiffness**\ (\ ) The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position. @@ -197,12 +199,12 @@ The default amount of stiffness assigned to the Jiggle joints, if they are not o .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DJiggle_property_target_nodepath>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to. @@ -214,12 +216,12 @@ The NodePath to the node that is the target for the Jiggle modification. This no .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_gravity** = ``false`` +:ref:`bool<class_bool>` **use_gravity** = ``false`` :ref:`🔗<class_SkeletonModification2DJiggle_property_use_gravity>` .. rst-class:: classref-property-setget -- void **set_use_gravity** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_gravity** **(** **)** +- |void| **set_use_gravity**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_gravity**\ (\ ) Whether the gravity vector, :ref:`gravity<class_SkeletonModification2DJiggle_property_gravity>`, should be applied to the Jiggle joints, assuming they are not overriding the default settings. @@ -236,7 +238,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_mask** **(** **)** |const| +:ref:`int<class_int>` **get_collision_mask**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_collision_mask>` Returns the collision mask used by the Jiggle modifier when collisions are enabled. @@ -248,7 +250,7 @@ Returns the collision mask used by the Jiggle modifier when collisions are enabl .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_jiggle_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone2d_node>` Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``. @@ -260,7 +262,7 @@ Returns the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``j .. rst-class:: classref-method -:ref:`int<class_int>` **get_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`int<class_int>` **get_jiggle_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_bone_index>` Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``. @@ -272,7 +274,7 @@ Returns the index of the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle .. rst-class:: classref-method -:ref:`float<class_float>` **get_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`float<class_float>` **get_jiggle_joint_damping**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_damping>` Returns the amount of damping of the Jiggle joint at ``joint_idx``. @@ -284,7 +286,7 @@ Returns the amount of damping of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_jiggle_joint_gravity**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_gravity>` Returns a :ref:`Vector2<class_Vector2>` representing the amount of gravity the Jiggle joint at ``joint_idx`` is influenced by. @@ -296,7 +298,7 @@ Returns a :ref:`Vector2<class_Vector2>` representing the amount of gravity the J .. rst-class:: classref-method -:ref:`float<class_float>` **get_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`float<class_float>` **get_jiggle_joint_mass**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_mass>` Returns the amount of mass of the jiggle joint at ``joint_idx``. @@ -308,7 +310,7 @@ Returns the amount of mass of the jiggle joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_jiggle_joint_override**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_override>` Returns a boolean that indicates whether the joint at ``joint_idx`` is overriding the default Jiggle joint data defined in the modification. @@ -320,7 +322,7 @@ Returns a boolean that indicates whether the joint at ``joint_idx`` is overridin .. rst-class:: classref-method -:ref:`float<class_float>` **get_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`float<class_float>` **get_jiggle_joint_stiffness**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_stiffness>` Returns the stiffness of the Jiggle joint at ``joint_idx``. @@ -332,7 +334,7 @@ Returns the stiffness of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`bool<class_bool>` **get_jiggle_joint_use_gravity**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_jiggle_joint_use_gravity>` Returns a boolean that indicates whether the joint at ``joint_idx`` is using gravity or not. @@ -344,7 +346,7 @@ Returns a boolean that indicates whether the joint at ``joint_idx`` is using gra .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_use_colliders** **(** **)** |const| +:ref:`bool<class_bool>` **get_use_colliders**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DJiggle_method_get_use_colliders>` Returns whether the jiggle modifier is taking physics colliders into account when solving. @@ -356,7 +358,7 @@ Returns whether the jiggle modifier is taking physics colliders into account whe .. rst-class:: classref-method -void **set_collision_mask** **(** :ref:`int<class_int>` collision_mask **)** +|void| **set_collision_mask**\ (\ collision_mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_collision_mask>` Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account. @@ -368,7 +370,7 @@ Sets the collision mask that the Jiggle modifier will use when reacting to colli .. rst-class:: classref-method -void **set_jiggle_joint_bone2d_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` bone2d_node **)** +|void| **set_jiggle_joint_bone2d_node**\ (\ joint_idx\: :ref:`int<class_int>`, bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone2d_node>` Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``joint_idx``. @@ -380,7 +382,7 @@ Sets the :ref:`Bone2D<class_Bone2D>` node assigned to the Jiggle joint at ``join .. rst-class:: classref-method -void **set_jiggle_joint_bone_index** **(** :ref:`int<class_int>` joint_idx, :ref:`int<class_int>` bone_idx **)** +|void| **set_jiggle_joint_bone_index**\ (\ joint_idx\: :ref:`int<class_int>`, bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_bone_index>` Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When possible, this will also update the ``bone2d_node`` of the Jiggle joint based on data provided by the linked skeleton. @@ -392,7 +394,7 @@ Sets the bone index, ``bone_idx``, of the Jiggle joint at ``joint_idx``. When po .. rst-class:: classref-method -void **set_jiggle_joint_damping** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` damping **)** +|void| **set_jiggle_joint_damping**\ (\ joint_idx\: :ref:`int<class_int>`, damping\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_damping>` Sets the amount of damping of the Jiggle joint at ``joint_idx``. @@ -404,7 +406,7 @@ Sets the amount of damping of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -void **set_jiggle_joint_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`Vector2<class_Vector2>` gravity **)** +|void| **set_jiggle_joint_gravity**\ (\ joint_idx\: :ref:`int<class_int>`, gravity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_gravity>` Sets the gravity vector of the Jiggle joint at ``joint_idx``. @@ -416,7 +418,7 @@ Sets the gravity vector of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -void **set_jiggle_joint_mass** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` mass **)** +|void| **set_jiggle_joint_mass**\ (\ joint_idx\: :ref:`int<class_int>`, mass\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_mass>` Sets the of mass of the Jiggle joint at ``joint_idx``. @@ -428,7 +430,7 @@ Sets the of mass of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -void **set_jiggle_joint_override** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` override **)** +|void| **set_jiggle_joint_override**\ (\ joint_idx\: :ref:`int<class_int>`, override\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_override>` Sets whether the Jiggle joint at ``joint_idx`` should override the default Jiggle joint settings. Setting this to ``true`` will make the joint use its own settings rather than the default ones attached to the modification. @@ -440,7 +442,7 @@ Sets whether the Jiggle joint at ``joint_idx`` should override the default Jiggl .. rst-class:: classref-method -void **set_jiggle_joint_stiffness** **(** :ref:`int<class_int>` joint_idx, :ref:`float<class_float>` stiffness **)** +|void| **set_jiggle_joint_stiffness**\ (\ joint_idx\: :ref:`int<class_int>`, stiffness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_stiffness>` Sets the of stiffness of the Jiggle joint at ``joint_idx``. @@ -452,7 +454,7 @@ Sets the of stiffness of the Jiggle joint at ``joint_idx``. .. rst-class:: classref-method -void **set_jiggle_joint_use_gravity** **(** :ref:`int<class_int>` joint_idx, :ref:`bool<class_bool>` use_gravity **)** +|void| **set_jiggle_joint_use_gravity**\ (\ joint_idx\: :ref:`int<class_int>`, use_gravity\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_jiggle_joint_use_gravity>` Sets whether the Jiggle joint at ``joint_idx`` should use gravity. @@ -464,7 +466,7 @@ Sets whether the Jiggle joint at ``joint_idx`` should use gravity. .. rst-class:: classref-method -void **set_use_colliders** **(** :ref:`bool<class_bool>` use_colliders **)** +|void| **set_use_colliders**\ (\ use_colliders\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DJiggle_method_set_use_colliders>` If ``true``, the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects. @@ -475,3 +477,4 @@ If ``true``, the Jiggle modifier will take colliders into account, keeping them .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dlookat.rst b/classes/class_skeletonmodification2dlookat.rst index ca2c20e3b1c..ba1d83982d3 100644 --- a/classes/class_skeletonmodification2dlookat.rst +++ b/classes/class_skeletonmodification2dlookat.rst @@ -10,6 +10,8 @@ SkeletonModification2DLookAt ============================ +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that rotates a :ref:`Bone2D<class_Bone2D>` node to look at a target. @@ -45,27 +47,27 @@ Methods .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_additional_rotation<class_SkeletonModification2DLookAt_method_get_additional_rotation>` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_constraint_angle_invert<class_SkeletonModification2DLookAt_method_get_constraint_angle_invert>` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_constraint_angle_max<class_SkeletonModification2DLookAt_method_get_constraint_angle_max>` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_constraint_angle_min<class_SkeletonModification2DLookAt_method_get_constraint_angle_min>` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_enable_constraint<class_SkeletonModification2DLookAt_method_get_enable_constraint>` **(** **)** |const| | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_additional_rotation<class_SkeletonModification2DLookAt_method_set_additional_rotation>` **(** :ref:`float<class_float>` rotation **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constraint_angle_invert<class_SkeletonModification2DLookAt_method_set_constraint_angle_invert>` **(** :ref:`bool<class_bool>` invert **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constraint_angle_max<class_SkeletonModification2DLookAt_method_set_constraint_angle_max>` **(** :ref:`float<class_float>` angle_max **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constraint_angle_min<class_SkeletonModification2DLookAt_method_set_constraint_angle_min>` **(** :ref:`float<class_float>` angle_min **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_enable_constraint<class_SkeletonModification2DLookAt_method_set_enable_constraint>` **(** :ref:`bool<class_bool>` enable_constraint **)** | - +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_additional_rotation<class_SkeletonModification2DLookAt_method_get_additional_rotation>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_constraint_angle_invert<class_SkeletonModification2DLookAt_method_get_constraint_angle_invert>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_constraint_angle_max<class_SkeletonModification2DLookAt_method_get_constraint_angle_max>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_constraint_angle_min<class_SkeletonModification2DLookAt_method_get_constraint_angle_min>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_enable_constraint<class_SkeletonModification2DLookAt_method_get_enable_constraint>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additional_rotation<class_SkeletonModification2DLookAt_method_set_additional_rotation>`\ (\ rotation\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constraint_angle_invert<class_SkeletonModification2DLookAt_method_set_constraint_angle_invert>`\ (\ invert\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constraint_angle_max<class_SkeletonModification2DLookAt_method_set_constraint_angle_max>`\ (\ angle_max\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constraint_angle_min<class_SkeletonModification2DLookAt_method_set_constraint_angle_min>`\ (\ angle_min\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_enable_constraint<class_SkeletonModification2DLookAt_method_set_enable_constraint>`\ (\ enable_constraint\: :ref:`bool<class_bool>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,12 +82,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **bone2d_node** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **bone2d_node** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DLookAt_property_bone2d_node>` .. rst-class:: classref-property-setget -- void **set_bone2d_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_bone2d_node** **(** **)** +- |void| **set_bone2d_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_bone2d_node**\ (\ ) The :ref:`Bone2D<class_Bone2D>` node that the modification will operate on. @@ -97,12 +99,12 @@ The :ref:`Bone2D<class_Bone2D>` node that the modification will operate on. .. rst-class:: classref-property -:ref:`int<class_int>` **bone_index** = ``-1`` +:ref:`int<class_int>` **bone_index** = ``-1`` :ref:`🔗<class_SkeletonModification2DLookAt_property_bone_index>` .. rst-class:: classref-property-setget -- void **set_bone_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bone_index** **(** **)** +- |void| **set_bone_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bone_index**\ (\ ) The index of the :ref:`Bone2D<class_Bone2D>` node that the modification will operate on. @@ -114,12 +116,12 @@ The index of the :ref:`Bone2D<class_Bone2D>` node that the modification will ope .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DLookAt_property_target_nodepath>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) The NodePath to the node that is the target for the LookAt modification. This node is what the modification will rotate the :ref:`Bone2D<class_Bone2D>` to. @@ -136,7 +138,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_additional_rotation** **(** **)** |const| +:ref:`float<class_float>` **get_additional_rotation**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_additional_rotation>` Returns the amount of additional rotation that is applied after the LookAt modification executes. @@ -148,7 +150,7 @@ Returns the amount of additional rotation that is applied after the LookAt modif .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_constraint_angle_invert** **(** **)** |const| +:ref:`bool<class_bool>` **get_constraint_angle_invert**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_invert>` Returns whether the constraints to this modification are inverted or not. @@ -160,7 +162,7 @@ Returns whether the constraints to this modification are inverted or not. .. rst-class:: classref-method -:ref:`float<class_float>` **get_constraint_angle_max** **(** **)** |const| +:ref:`float<class_float>` **get_constraint_angle_max**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_max>` Returns the constraint's maximum allowed angle. @@ -172,7 +174,7 @@ Returns the constraint's maximum allowed angle. .. rst-class:: classref-method -:ref:`float<class_float>` **get_constraint_angle_min** **(** **)** |const| +:ref:`float<class_float>` **get_constraint_angle_min**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_constraint_angle_min>` Returns the constraint's minimum allowed angle. @@ -184,7 +186,7 @@ Returns the constraint's minimum allowed angle. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_enable_constraint** **(** **)** |const| +:ref:`bool<class_bool>` **get_enable_constraint**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DLookAt_method_get_enable_constraint>` Returns ``true`` if the LookAt modification is using constraints. @@ -196,7 +198,7 @@ Returns ``true`` if the LookAt modification is using constraints. .. rst-class:: classref-method -void **set_additional_rotation** **(** :ref:`float<class_float>` rotation **)** +|void| **set_additional_rotation**\ (\ rotation\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_additional_rotation>` Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount. @@ -208,7 +210,7 @@ Sets the amount of additional rotation that is to be applied after executing the .. rst-class:: classref-method -void **set_constraint_angle_invert** **(** :ref:`bool<class_bool>` invert **)** +|void| **set_constraint_angle_invert**\ (\ invert\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_invert>` When ``true``, the modification will use an inverted joint constraint. @@ -222,7 +224,7 @@ An inverted joint constraint only constraints the :ref:`Bone2D<class_Bone2D>` to .. rst-class:: classref-method -void **set_constraint_angle_max** **(** :ref:`float<class_float>` angle_max **)** +|void| **set_constraint_angle_max**\ (\ angle_max\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_max>` Sets the constraint's maximum allowed angle. @@ -234,7 +236,7 @@ Sets the constraint's maximum allowed angle. .. rst-class:: classref-method -void **set_constraint_angle_min** **(** :ref:`float<class_float>` angle_min **)** +|void| **set_constraint_angle_min**\ (\ angle_min\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_constraint_angle_min>` Sets the constraint's minimum allowed angle. @@ -246,7 +248,7 @@ Sets the constraint's minimum allowed angle. .. rst-class:: classref-method -void **set_enable_constraint** **(** :ref:`bool<class_bool>` enable_constraint **)** +|void| **set_enable_constraint**\ (\ enable_constraint\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModification2DLookAt_method_set_enable_constraint>` Sets whether this modification will use constraints or not. When ``true``, constraints will be applied when solving the LookAt modification. @@ -257,3 +259,4 @@ Sets whether this modification will use constraints or not. When ``true``, const .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dphysicalbones.rst b/classes/class_skeletonmodification2dphysicalbones.rst index 107df698e97..6c51c8cde02 100644 --- a/classes/class_skeletonmodification2dphysicalbones.rst +++ b/classes/class_skeletonmodification2dphysicalbones.rst @@ -10,6 +10,8 @@ SkeletonModification2DPhysicalBones =================================== +**Experimental:** Physical bones may be changed in the future to perform the position update of :ref:`Bone2D<class_Bone2D>` on their own, without needing this resource. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that applies the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to :ref:`Bone2D<class_Bone2D>` nodes. @@ -21,8 +23,6 @@ Description This modification takes the transforms of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and applies them to :ref:`Bone2D<class_Bone2D>` nodes. This allows the :ref:`Bone2D<class_Bone2D>` nodes to react to physics thanks to the linked :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes. -Experimental. Physical bones may be changed in the future to perform the position update of :ref:`Bone2D<class_Bone2D>` on their own. - .. rst-class:: classref-reftable-group Properties @@ -43,17 +43,17 @@ Methods .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>` **(** **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>` **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>` **(** :ref:`StringName[]<class_StringName>` bones=[] **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fetch_physical_bones<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>`\ (\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>`\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physical_bone_node<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>`\ (\ joint_idx\: :ref:`int<class_int>`, physicalbone2d_node\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_simulation<class_SkeletonModification2DPhysicalBones_method_start_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_simulation<class_SkeletonModification2DPhysicalBones_method_stop_simulation>`\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **physical_bone_chain_length** = ``0`` +:ref:`int<class_int>` **physical_bone_chain_length** = ``0`` :ref:`🔗<class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length>` .. rst-class:: classref-property-setget -- void **set_physical_bone_chain_length** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_physical_bone_chain_length** **(** **)** +- |void| **set_physical_bone_chain_length**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_physical_bone_chain_length**\ (\ ) The number of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes linked in this modification. @@ -90,7 +90,7 @@ Method Descriptions .. rst-class:: classref-method -void **fetch_physical_bones** **(** **)** +|void| **fetch_physical_bones**\ (\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones>` Empties the list of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and populates it with all :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes that are children of the :ref:`Skeleton2D<class_Skeleton2D>`. @@ -102,7 +102,7 @@ Empties the list of :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes and popula .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_physical_bone_node** **(** :ref:`int<class_int>` joint_idx **)** |const| +:ref:`NodePath<class_NodePath>` **get_physical_bone_node**\ (\ joint_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_get_physical_bone_node>` Returns the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``. @@ -114,7 +114,7 @@ Returns the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``. .. rst-class:: classref-method -void **set_physical_bone_node** **(** :ref:`int<class_int>` joint_idx, :ref:`NodePath<class_NodePath>` physicalbone2d_node **)** +|void| **set_physical_bone_node**\ (\ joint_idx\: :ref:`int<class_int>`, physicalbone2d_node\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_set_physical_bone_node>` Sets the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``. @@ -128,7 +128,7 @@ Sets the :ref:`PhysicalBone2D<class_PhysicalBone2D>` node at ``joint_idx``. .. rst-class:: classref-method -void **start_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)** +|void| **start_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_start_simulation>` Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to start simulating and interacting with the physics world. @@ -142,7 +142,7 @@ Optionally, an array of bone names can be passed to this function, and that will .. rst-class:: classref-method -void **stop_simulation** **(** :ref:`StringName[]<class_StringName>` bones=[] **)** +|void| **stop_simulation**\ (\ bones\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_SkeletonModification2DPhysicalBones_method_stop_simulation>` Tell the :ref:`PhysicalBone2D<class_PhysicalBone2D>` nodes to stop simulating and interacting with the physics world. @@ -155,3 +155,4 @@ Optionally, an array of bone names can be passed to this function, and that will .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dstackholder.rst b/classes/class_skeletonmodification2dstackholder.rst index bdf13188264..a87735a9fb6 100644 --- a/classes/class_skeletonmodification2dstackholder.rst +++ b/classes/class_skeletonmodification2dstackholder.rst @@ -10,6 +10,8 @@ SkeletonModification2DStackHolder ================================= +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that holds and executes a :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`. @@ -31,11 +33,11 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_held_modification_stack<class_SkeletonModification2DStackHolder_method_get_held_modification_stack>` **(** **)** |const| | - +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_held_modification_stack<class_SkeletonModification2DStackHolder_method_set_held_modification_stack>` **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` held_modification_stack **)** | - +-----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` | :ref:`get_held_modification_stack<class_SkeletonModification2DStackHolder_method_get_held_modification_stack>`\ (\ ) |const| | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_held_modification_stack<class_SkeletonModification2DStackHolder_method_set_held_modification_stack>`\ (\ held_modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +52,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_held_modification_stack** **(** **)** |const| +:ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` **get_held_modification_stack**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DStackHolder_method_get_held_modification_stack>` Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` that this modification is holding. @@ -62,7 +64,7 @@ Returns the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D> .. rst-class:: classref-method -void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` held_modification_stack **)** +|void| **set_held_modification_stack**\ (\ held_modification_stack\: :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>`\ ) :ref:`🔗<class_SkeletonModification2DStackHolder_method_set_held_modification_stack>` Sets the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` that this modification is holding. This modification stack will then be executed when this modification is executed. @@ -73,3 +75,4 @@ Sets the :ref:`SkeletonModificationStack2D<class_SkeletonModificationStack2D>` t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodification2dtwoboneik.rst b/classes/class_skeletonmodification2dtwoboneik.rst index c9be46b684e..bee760edb01 100644 --- a/classes/class_skeletonmodification2dtwoboneik.rst +++ b/classes/class_skeletonmodification2dtwoboneik.rst @@ -10,6 +10,8 @@ SkeletonModification2DTwoBoneIK =============================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`SkeletonModification2D<class_SkeletonModification2D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A modification that rotates two bones using the law of cosines to reach the target. @@ -49,23 +51,23 @@ Methods .. table:: :widths: auto - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_joint_one_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone2d_node>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_joint_one_bone_idx<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone_idx>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath<class_NodePath>` | :ref:`get_joint_two_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone2d_node>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_joint_two_bone_idx<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone_idx>` **(** **)** |const| | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_one_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone2d_node>` **(** :ref:`NodePath<class_NodePath>` bone2d_node **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_one_bone_idx<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone_idx>` **(** :ref:`int<class_int>` bone_idx **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_two_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone2d_node>` **(** :ref:`NodePath<class_NodePath>` bone2d_node **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_joint_two_bone_idx<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone_idx>` **(** :ref:`int<class_int>` bone_idx **)** | - +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_joint_one_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone2d_node>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_joint_one_bone_idx<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone_idx>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`get_joint_two_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone2d_node>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_joint_two_bone_idx<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone_idx>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_one_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone2d_node>`\ (\ bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_one_bone_idx<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone_idx>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_two_bone2d_node<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone2d_node>`\ (\ bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_two_bone_idx<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone_idx>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,12 +82,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_bend_direction** = ``false`` +:ref:`bool<class_bool>` **flip_bend_direction** = ``false`` :ref:`🔗<class_SkeletonModification2DTwoBoneIK_property_flip_bend_direction>` .. rst-class:: classref-property-setget -- void **set_flip_bend_direction** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flip_bend_direction** **(** **)** +- |void| **set_flip_bend_direction**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flip_bend_direction**\ (\ ) If ``true``, the bones in the modification will blend outward as opposed to inwards when contracting. If ``false``, the bones will bend inwards when contracting. @@ -97,12 +99,12 @@ If ``true``, the bones in the modification will blend outward as opposed to inwa .. rst-class:: classref-property -:ref:`float<class_float>` **target_maximum_distance** = ``0.0`` +:ref:`float<class_float>` **target_maximum_distance** = ``0.0`` :ref:`🔗<class_SkeletonModification2DTwoBoneIK_property_target_maximum_distance>` .. rst-class:: classref-property-setget -- void **set_target_maximum_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_target_maximum_distance** **(** **)** +- |void| **set_target_maximum_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_target_maximum_distance**\ (\ ) The maximum distance the target can be at. If the target is farther than this distance, the modification will solve as if it's at this maximum distance. When set to ``0``, the modification will solve without distance constraints. @@ -114,12 +116,12 @@ The maximum distance the target can be at. If the target is farther than this di .. rst-class:: classref-property -:ref:`float<class_float>` **target_minimum_distance** = ``0.0`` +:ref:`float<class_float>` **target_minimum_distance** = ``0.0`` :ref:`🔗<class_SkeletonModification2DTwoBoneIK_property_target_minimum_distance>` .. rst-class:: classref-property-setget -- void **set_target_minimum_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_target_minimum_distance** **(** **)** +- |void| **set_target_minimum_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_target_minimum_distance**\ (\ ) The minimum distance the target can be at. If the target is closer than this distance, the modification will solve as if it's at this minimum distance. When set to ``0``, the modification will solve without distance constraints. @@ -131,12 +133,12 @@ The minimum distance the target can be at. If the target is closer than this dis .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **target_nodepath** = ``NodePath("")`` :ref:`🔗<class_SkeletonModification2DTwoBoneIK_property_target_nodepath>` .. rst-class:: classref-property-setget -- void **set_target_node** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_target_node** **(** **)** +- |void| **set_target_node**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_target_node**\ (\ ) The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will use when bending the :ref:`Bone2D<class_Bone2D>` nodes. @@ -153,7 +155,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_joint_one_bone2d_node** **(** **)** |const| +:ref:`NodePath<class_NodePath>` **get_joint_one_bone2d_node**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone2d_node>` Returns the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bone in the TwoBoneIK modification. @@ -165,7 +167,7 @@ Returns the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bon .. rst-class:: classref-method -:ref:`int<class_int>` **get_joint_one_bone_idx** **(** **)** |const| +:ref:`int<class_int>` **get_joint_one_bone_idx**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone_idx>` Returns the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bone in the TwoBoneIK modification. @@ -177,7 +179,7 @@ Returns the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as .. rst-class:: classref-method -:ref:`NodePath<class_NodePath>` **get_joint_two_bone2d_node** **(** **)** |const| +:ref:`NodePath<class_NodePath>` **get_joint_two_bone2d_node**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone2d_node>` Returns the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bone in the TwoBoneIK modification. @@ -189,7 +191,7 @@ Returns the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bo .. rst-class:: classref-method -:ref:`int<class_int>` **get_joint_two_bone_idx** **(** **)** |const| +:ref:`int<class_int>` **get_joint_two_bone_idx**\ (\ ) |const| :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_get_joint_two_bone_idx>` Returns the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bone in the TwoBoneIK modification. @@ -201,7 +203,7 @@ Returns the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as .. rst-class:: classref-method -void **set_joint_one_bone2d_node** **(** :ref:`NodePath<class_NodePath>` bone2d_node **)** +|void| **set_joint_one_bone2d_node**\ (\ bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone2d_node>` Sets the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bone in the TwoBoneIK modification. @@ -213,7 +215,7 @@ Sets the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bone i .. rst-class:: classref-method -void **set_joint_one_bone_idx** **(** :ref:`int<class_int>` bone_idx **)** +|void| **set_joint_one_bone_idx**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_set_joint_one_bone_idx>` Sets the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the first bone in the TwoBoneIK modification. @@ -225,7 +227,7 @@ Sets the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the .. rst-class:: classref-method -void **set_joint_two_bone2d_node** **(** :ref:`NodePath<class_NodePath>` bone2d_node **)** +|void| **set_joint_two_bone2d_node**\ (\ bone2d_node\: :ref:`NodePath<class_NodePath>`\ ) :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone2d_node>` Sets the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bone in the TwoBoneIK modification. @@ -237,7 +239,7 @@ Sets the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bone .. rst-class:: classref-method -void **set_joint_two_bone_idx** **(** :ref:`int<class_int>` bone_idx **)** +|void| **set_joint_two_bone_idx**\ (\ bone_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModification2DTwoBoneIK_method_set_joint_two_bone_idx>` Sets the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the second bone in the TwoBoneIK modification. @@ -248,3 +250,4 @@ Sets the index of the :ref:`Bone2D<class_Bone2D>` node that is being used as the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodificationstack2d.rst b/classes/class_skeletonmodificationstack2d.rst index 9c1d84d746c..a8f7f4382a1 100644 --- a/classes/class_skeletonmodificationstack2d.rst +++ b/classes/class_skeletonmodificationstack2d.rst @@ -10,6 +10,8 @@ SkeletonModificationStack2D =========================== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A resource that holds a stack of :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s. @@ -49,25 +51,25 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_modification<class_SkeletonModificationStack2D_method_add_modification>` **(** :ref:`SkeletonModification2D<class_SkeletonModification2D>` modification **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delete_modification<class_SkeletonModificationStack2D_method_delete_modification>` **(** :ref:`int<class_int>` mod_idx **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`enable_all_modifications<class_SkeletonModificationStack2D_method_enable_all_modifications>` **(** :ref:`bool<class_bool>` enabled **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`execute<class_SkeletonModificationStack2D_method_execute>` **(** :ref:`float<class_float>` delta, :ref:`int<class_int>` execution_mode **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModificationStack2D_method_get_is_setup>` **(** **)** |const| | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkeletonModification2D<class_SkeletonModification2D>` | :ref:`get_modification<class_SkeletonModificationStack2D_method_get_modification>` **(** :ref:`int<class_int>` mod_idx **)** |const| | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skeleton2D<class_Skeleton2D>` | :ref:`get_skeleton<class_SkeletonModificationStack2D_method_get_skeleton>` **(** **)** |const| | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_modification<class_SkeletonModificationStack2D_method_set_modification>` **(** :ref:`int<class_int>` mod_idx, :ref:`SkeletonModification2D<class_SkeletonModification2D>` modification **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`setup<class_SkeletonModificationStack2D_method_setup>` **(** **)** | - +-------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_modification<class_SkeletonModificationStack2D_method_add_modification>`\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_modification<class_SkeletonModificationStack2D_method_delete_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`enable_all_modifications<class_SkeletonModificationStack2D_method_enable_all_modifications>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`execute<class_SkeletonModificationStack2D_method_execute>`\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModificationStack2D_method_get_is_setup>`\ (\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkeletonModification2D<class_SkeletonModification2D>` | :ref:`get_modification<class_SkeletonModificationStack2D_method_get_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton2D<class_Skeleton2D>` | :ref:`get_skeleton<class_SkeletonModificationStack2D_method_get_skeleton>`\ (\ ) |const| | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_modification<class_SkeletonModificationStack2D_method_set_modification>`\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`setup<class_SkeletonModificationStack2D_method_setup>`\ (\ ) | + +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,12 +84,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **enabled** = ``false`` +:ref:`bool<class_bool>` **enabled** = ``false`` :ref:`🔗<class_SkeletonModificationStack2D_property_enabled>` .. rst-class:: classref-property-setget -- void **set_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_enabled** **(** **)** +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_enabled**\ (\ ) If ``true``, the modification's in the stack will be called. This is handled automatically through the :ref:`Skeleton2D<class_Skeleton2D>` node. @@ -99,12 +101,12 @@ If ``true``, the modification's in the stack will be called. This is handled aut .. rst-class:: classref-property -:ref:`int<class_int>` **modification_count** = ``0`` +:ref:`int<class_int>` **modification_count** = ``0`` :ref:`🔗<class_SkeletonModificationStack2D_property_modification_count>` .. rst-class:: classref-property-setget -- void **set_modification_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_modification_count** **(** **)** +- |void| **set_modification_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_modification_count**\ (\ ) The number of modifications in the stack. @@ -116,12 +118,12 @@ The number of modifications in the stack. .. rst-class:: classref-property -:ref:`float<class_float>` **strength** = ``1.0`` +:ref:`float<class_float>` **strength** = ``1.0`` :ref:`🔗<class_SkeletonModificationStack2D_property_strength>` .. rst-class:: classref-property-setget -- void **set_strength** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_strength** **(** **)** +- |void| **set_strength**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_strength**\ (\ ) The interpolation strength of the modifications in stack. A value of ``0`` will make it where the modifications are not applied, a strength of ``0.5`` will be half applied, and a strength of ``1`` will allow the modifications to be fully applied and override the :ref:`Skeleton2D<class_Skeleton2D>` :ref:`Bone2D<class_Bone2D>` poses. @@ -138,7 +140,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_modification** **(** :ref:`SkeletonModification2D<class_SkeletonModification2D>` modification **)** +|void| **add_modification**\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_add_modification>` Adds the passed-in :ref:`SkeletonModification2D<class_SkeletonModification2D>` to the stack. @@ -150,7 +152,7 @@ Adds the passed-in :ref:`SkeletonModification2D<class_SkeletonModification2D>` t .. rst-class:: classref-method -void **delete_modification** **(** :ref:`int<class_int>` mod_idx **)** +|void| **delete_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_delete_modification>` Deletes the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the index position ``mod_idx``, if it exists. @@ -162,7 +164,7 @@ Deletes the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the i .. rst-class:: classref-method -void **enable_all_modifications** **(** :ref:`bool<class_bool>` enabled **)** +|void| **enable_all_modifications**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_enable_all_modifications>` Enables all :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s in the stack. @@ -174,7 +176,7 @@ Enables all :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s in th .. rst-class:: classref-method -void **execute** **(** :ref:`float<class_float>` delta, :ref:`int<class_int>` execution_mode **)** +|void| **execute**\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_execute>` Executes all of the :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s in the stack that use the same execution mode as the passed-in ``execution_mode``, starting from index ``0`` to :ref:`modification_count<class_SkeletonModificationStack2D_property_modification_count>`. @@ -188,7 +190,7 @@ Executes all of the :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_is_setup** **(** **)** |const| +:ref:`bool<class_bool>` **get_is_setup**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_is_setup>` Returns a boolean that indicates whether the modification stack is setup and can execute. @@ -200,7 +202,7 @@ Returns a boolean that indicates whether the modification stack is setup and can .. rst-class:: classref-method -:ref:`SkeletonModification2D<class_SkeletonModification2D>` **get_modification** **(** :ref:`int<class_int>` mod_idx **)** |const| +:ref:`SkeletonModification2D<class_SkeletonModification2D>` **get_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_modification>` Returns the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the passed-in index, ``mod_idx``. @@ -212,7 +214,7 @@ Returns the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the p .. rst-class:: classref-method -:ref:`Skeleton2D<class_Skeleton2D>` **get_skeleton** **(** **)** |const| +:ref:`Skeleton2D<class_Skeleton2D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_skeleton>` Returns the :ref:`Skeleton2D<class_Skeleton2D>` node that the SkeletonModificationStack2D is bound to. @@ -224,7 +226,7 @@ Returns the :ref:`Skeleton2D<class_Skeleton2D>` node that the SkeletonModificati .. rst-class:: classref-method -void **set_modification** **(** :ref:`int<class_int>` mod_idx, :ref:`SkeletonModification2D<class_SkeletonModification2D>` modification **)** +|void| **set_modification**\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_set_modification>` Sets the modification at ``mod_idx`` to the passed-in modification, ``modification``. @@ -236,7 +238,7 @@ Sets the modification at ``mod_idx`` to the passed-in modification, ``modificati .. rst-class:: classref-method -void **setup** **(** **)** +|void| **setup**\ (\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_setup>` Sets up the modification stack so it can execute. This function should be called by :ref:`Skeleton2D<class_Skeleton2D>` and shouldn't be manually called unless you know what you are doing. @@ -247,3 +249,4 @@ Sets up the modification stack so it can execute. This function should be called .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonmodifier3d.rst b/classes/class_skeletonmodifier3d.rst new file mode 100644 index 00000000000..401d766dee5 --- /dev/null +++ b/classes/class_skeletonmodifier3d.rst @@ -0,0 +1,156 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SkeletonModifier3D.xml. + +.. _class_SkeletonModifier3D: + +SkeletonModifier3D +================== + +**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`PhysicalBoneSimulator3D<class_PhysicalBoneSimulator3D>`, :ref:`SkeletonIK3D<class_SkeletonIK3D>`, :ref:`XRBodyModifier3D<class_XRBodyModifier3D>`, :ref:`XRHandModifier3D<class_XRHandModifier3D>` + +A Node that may modify Skeleton3D's bone. + +.. rst-class:: classref-introduction-group + +Description +----------- + +**SkeletonModifier3D** retrieves a target :ref:`Skeleton3D<class_Skeleton3D>` by having a :ref:`Skeleton3D<class_Skeleton3D>` parent. + +If there is :ref:`AnimationMixer<class_AnimationMixer>`, modification always performs after playback process of the :ref:`AnimationMixer<class_AnimationMixer>`. + +This node should be used to implement custom IK solvers, constraints, or skeleton physics + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+---------------------------------------------------------------+----------+ + | :ref:`bool<class_bool>` | :ref:`active<class_SkeletonModifier3D_property_active>` | ``true`` | + +---------------------------+---------------------------------------------------------------+----------+ + | :ref:`float<class_float>` | :ref:`influence<class_SkeletonModifier3D_property_influence>` | ``1.0`` | + +---------------------------+---------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process_modification<class_SkeletonModifier3D_private_method__process_modification>`\ (\ ) |virtual| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_SkeletonModifier3D_method_get_skeleton>`\ (\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_SkeletonModifier3D_signal_modification_processed: + +.. rst-class:: classref-signal + +**modification_processed**\ (\ ) :ref:`🔗<class_SkeletonModifier3D_signal_modification_processed>` + +Notifies when the modification have been finished. + +\ **Note:** If you want to get the modified bone pose by the modifier, you must use :ref:`Skeleton3D.get_bone_pose<class_Skeleton3D_method_get_bone_pose>` or :ref:`Skeleton3D.get_bone_global_pose<class_Skeleton3D_method_get_bone_global_pose>` at the moment this signal is fired. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_SkeletonModifier3D_property_active: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **active** = ``true`` :ref:`🔗<class_SkeletonModifier3D_property_active>` + +.. rst-class:: classref-property-setget + +- |void| **set_active**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_active**\ (\ ) + +If ``true``, the **SkeletonModifier3D** will be processing. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SkeletonModifier3D_property_influence: + +.. rst-class:: classref-property + +:ref:`float<class_float>` **influence** = ``1.0`` :ref:`🔗<class_SkeletonModifier3D_property_influence>` + +.. rst-class:: classref-property-setget + +- |void| **set_influence**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_influence**\ (\ ) + +Sets the influence of the modification. + +\ **Note:** This value is used by :ref:`Skeleton3D<class_Skeleton3D>` to blend, so the **SkeletonModifier3D** should always apply only 100% of the result without interpolation. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_SkeletonModifier3D_private_method__process_modification: + +.. rst-class:: classref-method + +|void| **_process_modification**\ (\ ) |virtual| :ref:`🔗<class_SkeletonModifier3D_private_method__process_modification>` + +Override this virtual method to implement a custom skeleton modifier. You should do things like get the :ref:`Skeleton3D<class_Skeleton3D>`'s current pose and apply the pose here. + +\ :ref:`_process_modification<class_SkeletonModifier3D_private_method__process_modification>` must not apply :ref:`influence<class_SkeletonModifier3D_property_influence>` to bone poses because the :ref:`Skeleton3D<class_Skeleton3D>` automatically applies influence to all bone poses set by the modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_SkeletonModifier3D_method_get_skeleton: + +.. rst-class:: classref-method + +:ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModifier3D_method_get_skeleton>` + +Get parent :ref:`Skeleton3D<class_Skeleton3D>` node if found. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonprofile.rst b/classes/class_skeletonprofile.rst index 0080d0a1525..ae02036601e 100644 --- a/classes/class_skeletonprofile.rst +++ b/classes/class_skeletonprofile.rst @@ -58,45 +58,49 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find_bone<class_SkeletonProfile_method_find_bone>` **(** :ref:`StringName<class_StringName>` bone_name **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_bone_name<class_SkeletonProfile_method_get_bone_name>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_bone_parent<class_SkeletonProfile_method_get_bone_parent>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_bone_tail<class_SkeletonProfile_method_get_bone_tail>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_group<class_SkeletonProfile_method_get_group>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_group_name<class_SkeletonProfile_method_get_group_name>` **(** :ref:`int<class_int>` group_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_handle_offset<class_SkeletonProfile_method_get_handle_offset>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_reference_pose<class_SkeletonProfile_method_get_reference_pose>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TailDirection<enum_SkeletonProfile_TailDirection>` | :ref:`get_tail_direction<class_SkeletonProfile_method_get_tail_direction>` **(** :ref:`int<class_int>` bone_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_texture<class_SkeletonProfile_method_get_texture>` **(** :ref:`int<class_int>` group_idx **)** |const| | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_name<class_SkeletonProfile_method_set_bone_name>` **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_name **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_parent<class_SkeletonProfile_method_set_bone_parent>` **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_parent **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bone_tail<class_SkeletonProfile_method_set_bone_tail>` **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_tail **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_group<class_SkeletonProfile_method_set_group>` **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` group **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_group_name<class_SkeletonProfile_method_set_group_name>` **(** :ref:`int<class_int>` group_idx, :ref:`StringName<class_StringName>` group_name **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_handle_offset<class_SkeletonProfile_method_set_handle_offset>` **(** :ref:`int<class_int>` bone_idx, :ref:`Vector2<class_Vector2>` handle_offset **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_reference_pose<class_SkeletonProfile_method_set_reference_pose>` **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` bone_name **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tail_direction<class_SkeletonProfile_method_set_tail_direction>` **(** :ref:`int<class_int>` bone_idx, :ref:`TailDirection<enum_SkeletonProfile_TailDirection>` tail_direction **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture<class_SkeletonProfile_method_set_texture>` **(** :ref:`int<class_int>` group_idx, :ref:`Texture2D<class_Texture2D>` texture **)** | - +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find_bone<class_SkeletonProfile_method_find_bone>`\ (\ bone_name\: :ref:`StringName<class_StringName>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_bone_name<class_SkeletonProfile_method_get_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_bone_parent<class_SkeletonProfile_method_get_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_bone_tail<class_SkeletonProfile_method_get_bone_tail>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_group<class_SkeletonProfile_method_get_group>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_group_name<class_SkeletonProfile_method_get_group_name>`\ (\ group_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_handle_offset<class_SkeletonProfile_method_get_handle_offset>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_reference_pose<class_SkeletonProfile_method_get_reference_pose>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TailDirection<enum_SkeletonProfile_TailDirection>` | :ref:`get_tail_direction<class_SkeletonProfile_method_get_tail_direction>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_texture<class_SkeletonProfile_method_get_texture>`\ (\ group_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_required<class_SkeletonProfile_method_is_required>`\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_name<class_SkeletonProfile_method_set_bone_name>`\ (\ bone_idx\: :ref:`int<class_int>`, bone_name\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_parent<class_SkeletonProfile_method_set_bone_parent>`\ (\ bone_idx\: :ref:`int<class_int>`, bone_parent\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bone_tail<class_SkeletonProfile_method_set_bone_tail>`\ (\ bone_idx\: :ref:`int<class_int>`, bone_tail\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_group<class_SkeletonProfile_method_set_group>`\ (\ bone_idx\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_group_name<class_SkeletonProfile_method_set_group_name>`\ (\ group_idx\: :ref:`int<class_int>`, group_name\: :ref:`StringName<class_StringName>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_handle_offset<class_SkeletonProfile_method_set_handle_offset>`\ (\ bone_idx\: :ref:`int<class_int>`, handle_offset\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_pose<class_SkeletonProfile_method_set_reference_pose>`\ (\ bone_idx\: :ref:`int<class_int>`, bone_name\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_required<class_SkeletonProfile_method_set_required>`\ (\ bone_idx\: :ref:`int<class_int>`, required\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tail_direction<class_SkeletonProfile_method_set_tail_direction>`\ (\ bone_idx\: :ref:`int<class_int>`, tail_direction\: :ref:`TailDirection<enum_SkeletonProfile_TailDirection>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture<class_SkeletonProfile_method_set_texture>`\ (\ group_idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -111,7 +115,7 @@ Signals .. rst-class:: classref-signal -**profile_updated** **(** **)** +**profile_updated**\ (\ ) :ref:`🔗<class_SkeletonProfile_signal_profile_updated>` This signal is emitted when change the value in profile. This is used to update key name in the :ref:`BoneMap<class_BoneMap>` and to redraw the :ref:`BoneMap<class_BoneMap>` editor. @@ -130,7 +134,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TailDirection**: +enum **TailDirection**: :ref:`🔗<enum_SkeletonProfile_TailDirection>` .. _class_SkeletonProfile_constant_TAIL_DIRECTION_AVERAGE_CHILDREN: @@ -169,12 +173,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **bone_size** = ``0`` +:ref:`int<class_int>` **bone_size** = ``0`` :ref:`🔗<class_SkeletonProfile_property_bone_size>` .. rst-class:: classref-property-setget -- void **set_bone_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_bone_size** **(** **)** +- |void| **set_bone_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_bone_size**\ (\ ) The amount of bones in retargeting section's :ref:`BoneMap<class_BoneMap>` editor. For example, :ref:`SkeletonProfileHumanoid<class_SkeletonProfileHumanoid>` has 56 bones. @@ -188,12 +192,12 @@ The size of elements in :ref:`BoneMap<class_BoneMap>` updates when changing this .. rst-class:: classref-property -:ref:`int<class_int>` **group_size** = ``0`` +:ref:`int<class_int>` **group_size** = ``0`` :ref:`🔗<class_SkeletonProfile_property_group_size>` .. rst-class:: classref-property-setget -- void **set_group_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_group_size** **(** **)** +- |void| **set_group_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_group_size**\ (\ ) The amount of groups of bones in retargeting section's :ref:`BoneMap<class_BoneMap>` editor. For example, :ref:`SkeletonProfileHumanoid<class_SkeletonProfileHumanoid>` has 4 groups. @@ -207,12 +211,12 @@ This property exists to separate the bone list into several sections in the edit .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **root_bone** = ``&""`` +:ref:`StringName<class_StringName>` **root_bone** = ``&""`` :ref:`🔗<class_SkeletonProfile_property_root_bone>` .. rst-class:: classref-property-setget -- void **set_root_bone** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_root_bone** **(** **)** +- |void| **set_root_bone**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_root_bone**\ (\ ) A bone name that will be used as the root bone in :ref:`AnimationTree<class_AnimationTree>`. This should be the bone of the parent of hips that exists at the world origin. @@ -224,12 +228,12 @@ A bone name that will be used as the root bone in :ref:`AnimationTree<class_Anim .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **scale_base_bone** = ``&""`` +:ref:`StringName<class_StringName>` **scale_base_bone** = ``&""`` :ref:`🔗<class_SkeletonProfile_property_scale_base_bone>` .. rst-class:: classref-property-setget -- void **set_scale_base_bone** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_scale_base_bone** **(** **)** +- |void| **set_scale_base_bone**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_scale_base_bone**\ (\ ) A bone name which will use model's height as the coefficient for normalization. For example, :ref:`SkeletonProfileHumanoid<class_SkeletonProfileHumanoid>` defines it as ``Hips``. @@ -246,7 +250,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **find_bone** **(** :ref:`StringName<class_StringName>` bone_name **)** |const| +:ref:`int<class_int>` **find_bone**\ (\ bone_name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_find_bone>` Returns the bone index that matches ``bone_name`` as its name. @@ -258,7 +262,7 @@ Returns the bone index that matches ``bone_name`` as its name. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_bone_name** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`StringName<class_StringName>` **get_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_bone_name>` Returns the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap<class_BoneMap>`. @@ -272,7 +276,7 @@ In the retargeting process, the returned bone name is the bone name of the targe .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_bone_parent** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`StringName<class_StringName>` **get_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_bone_parent>` Returns the name of the bone which is the parent to the bone at ``bone_idx``. The result is empty if the bone has no parent. @@ -284,7 +288,7 @@ Returns the name of the bone which is the parent to the bone at ``bone_idx``. Th .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_bone_tail** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`StringName<class_StringName>` **get_bone_tail**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_bone_tail>` Returns the name of the bone which is the tail of the bone at ``bone_idx``. @@ -296,7 +300,7 @@ Returns the name of the bone which is the tail of the bone at ``bone_idx``. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_group** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`StringName<class_StringName>` **get_group**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_group>` Returns the group of the bone at ``bone_idx``. @@ -308,7 +312,7 @@ Returns the group of the bone at ``bone_idx``. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_group_name** **(** :ref:`int<class_int>` group_idx **)** |const| +:ref:`StringName<class_StringName>` **get_group_name**\ (\ group_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_group_name>` Returns the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap<class_BoneMap>` editor. @@ -320,7 +324,7 @@ Returns the name of the group at ``group_idx`` that will be the drawing group in .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_handle_offset** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Vector2<class_Vector2>` **get_handle_offset**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_handle_offset>` Returns the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap<class_BoneMap>` editor. @@ -334,7 +338,7 @@ This is the offset with origin at the top left corner of the square. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_reference_pose** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_reference_pose**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_reference_pose>` Returns the reference pose transform for bone ``bone_idx``. @@ -346,7 +350,7 @@ Returns the reference pose transform for bone ``bone_idx``. .. rst-class:: classref-method -:ref:`TailDirection<enum_SkeletonProfile_TailDirection>` **get_tail_direction** **(** :ref:`int<class_int>` bone_idx **)** |const| +:ref:`TailDirection<enum_SkeletonProfile_TailDirection>` **get_tail_direction**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_tail_direction>` Returns the tail direction of the bone at ``bone_idx``. @@ -358,7 +362,7 @@ Returns the tail direction of the bone at ``bone_idx``. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_texture** **(** :ref:`int<class_int>` group_idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ group_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_get_texture>` Returns the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap<class_BoneMap>` editor. @@ -366,11 +370,25 @@ Returns the texture of the group at ``group_idx`` that will be the drawing group ---- +.. _class_SkeletonProfile_method_is_required: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_required**\ (\ bone_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonProfile_method_is_required>` + +Returns whether the bone at ``bone_idx`` is required for retargeting. + +This value is used by the bone map editor. If this method returns ``true``, and no bone is assigned, the handle color will be red on the bone map editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_SkeletonProfile_method_set_bone_name: .. rst-class:: classref-method -void **set_bone_name** **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_name **)** +|void| **set_bone_name**\ (\ bone_idx\: :ref:`int<class_int>`, bone_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_bone_name>` Sets the name of the bone at ``bone_idx`` that will be the key name in the :ref:`BoneMap<class_BoneMap>`. @@ -384,7 +402,7 @@ In the retargeting process, the setting bone name is the bone name of the target .. rst-class:: classref-method -void **set_bone_parent** **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_parent **)** +|void| **set_bone_parent**\ (\ bone_idx\: :ref:`int<class_int>`, bone_parent\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_bone_parent>` Sets the bone with name ``bone_parent`` as the parent of the bone at ``bone_idx``. If an empty string is passed, then the bone has no parent. @@ -396,7 +414,7 @@ Sets the bone with name ``bone_parent`` as the parent of the bone at ``bone_idx` .. rst-class:: classref-method -void **set_bone_tail** **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` bone_tail **)** +|void| **set_bone_tail**\ (\ bone_idx\: :ref:`int<class_int>`, bone_tail\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_bone_tail>` Sets the bone with name ``bone_tail`` as the tail of the bone at ``bone_idx``. @@ -408,7 +426,7 @@ Sets the bone with name ``bone_tail`` as the tail of the bone at ``bone_idx``. .. rst-class:: classref-method -void **set_group** **(** :ref:`int<class_int>` bone_idx, :ref:`StringName<class_StringName>` group **)** +|void| **set_group**\ (\ bone_idx\: :ref:`int<class_int>`, group\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_group>` Sets the group of the bone at ``bone_idx``. @@ -420,7 +438,7 @@ Sets the group of the bone at ``bone_idx``. .. rst-class:: classref-method -void **set_group_name** **(** :ref:`int<class_int>` group_idx, :ref:`StringName<class_StringName>` group_name **)** +|void| **set_group_name**\ (\ group_idx\: :ref:`int<class_int>`, group_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_group_name>` Sets the name of the group at ``group_idx`` that will be the drawing group in the :ref:`BoneMap<class_BoneMap>` editor. @@ -432,7 +450,7 @@ Sets the name of the group at ``group_idx`` that will be the drawing group in th .. rst-class:: classref-method -void **set_handle_offset** **(** :ref:`int<class_int>` bone_idx, :ref:`Vector2<class_Vector2>` handle_offset **)** +|void| **set_handle_offset**\ (\ bone_idx\: :ref:`int<class_int>`, handle_offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_handle_offset>` Sets the offset of the bone at ``bone_idx`` that will be the button position in the :ref:`BoneMap<class_BoneMap>` editor. @@ -446,7 +464,7 @@ This is the offset with origin at the top left corner of the square. .. rst-class:: classref-method -void **set_reference_pose** **(** :ref:`int<class_int>` bone_idx, :ref:`Transform3D<class_Transform3D>` bone_name **)** +|void| **set_reference_pose**\ (\ bone_idx\: :ref:`int<class_int>`, bone_name\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_reference_pose>` Sets the reference pose transform for bone ``bone_idx``. @@ -454,11 +472,23 @@ Sets the reference pose transform for bone ``bone_idx``. ---- +.. _class_SkeletonProfile_method_set_required: + +.. rst-class:: classref-method + +|void| **set_required**\ (\ bone_idx\: :ref:`int<class_int>`, required\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_required>` + +Sets the required status for bone ``bone_idx`` to ``required``. + +.. rst-class:: classref-item-separator + +---- + .. _class_SkeletonProfile_method_set_tail_direction: .. rst-class:: classref-method -void **set_tail_direction** **(** :ref:`int<class_int>` bone_idx, :ref:`TailDirection<enum_SkeletonProfile_TailDirection>` tail_direction **)** +|void| **set_tail_direction**\ (\ bone_idx\: :ref:`int<class_int>`, tail_direction\: :ref:`TailDirection<enum_SkeletonProfile_TailDirection>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_tail_direction>` Sets the tail direction of the bone at ``bone_idx``. @@ -472,7 +502,7 @@ Sets the tail direction of the bone at ``bone_idx``. .. rst-class:: classref-method -void **set_texture** **(** :ref:`int<class_int>` group_idx, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_texture**\ (\ group_idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_SkeletonProfile_method_set_texture>` Sets the texture of the group at ``group_idx`` that will be the drawing group background image in the :ref:`BoneMap<class_BoneMap>` editor. @@ -483,3 +513,4 @@ Sets the texture of the group at ``group_idx`` that will be the drawing group ba .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skeletonprofilehumanoid.rst b/classes/class_skeletonprofilehumanoid.rst index eb65d0cc9b7..814d3d51ad2 100644 --- a/classes/class_skeletonprofilehumanoid.rst +++ b/classes/class_skeletonprofilehumanoid.rst @@ -21,6 +21,65 @@ Description A :ref:`SkeletonProfile<class_SkeletonProfile>` as a preset that is optimized for the human form. This exists for standardization, so all parameters are read-only. +A humanoid skeleton profile contains 54 bones divided in 4 groups: ``"Body"``, ``"Face"``, ``"LeftHand"``, and ``"RightHand"``. It is structured as follows: + +.. code:: text + + Root + └─ Hips + ├─ LeftUpperLeg + │ └─ LeftLowerLeg + │ └─ LeftFoot + │ └─ LeftToes + ├─ RightUpperLeg + │ └─ RightLowerLeg + │ └─ RightFoot + │ └─ RightToes + └─ Spine + └─ Chest + └─ UpperChest + ├─ Neck + │ └─ Head + │ ├─ Jaw + │ ├─ LeftEye + │ └─ RightEye + ├─ LeftShoulder + │ └─ LeftUpperArm + │ └─ LeftLowerArm + │ └─ LeftHand + │ ├─ LeftThumbMetacarpal + │ │ └─ LeftThumbProximal + │ ├─ LeftIndexProximal + │ │ └─ LeftIndexIntermediate + │ │ └─ LeftIndexDistal + │ ├─ LeftMiddleProximal + │ │ └─ LeftMiddleIntermediate + │ │ └─ LeftMiddleDistal + │ ├─ LeftRingProximal + │ │ └─ LeftRingIntermediate + │ │ └─ LeftRingDistal + │ └─ LeftLittleProximal + │ └─ LeftLittleIntermediate + │ └─ LeftLittleDistal + └─ RightShoulder + └─ RightUpperArm + └─ RightLowerArm + └─ RightHand + ├─ RightThumbMetacarpal + │ └─ RightThumbProximal + ├─ RightIndexProximal + │ └─ RightIndexIntermediate + │ └─ RightIndexDistal + ├─ RightMiddleProximal + │ └─ RightMiddleIntermediate + │ └─ RightMiddleDistal + ├─ RightRingProximal + │ └─ RightRingIntermediate + │ └─ RightRingDistal + └─ RightLittleProximal + └─ RightLittleIntermediate + └─ RightLittleDistal + .. rst-class:: classref-introduction-group Tutorials @@ -53,3 +112,4 @@ Properties .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skin.rst b/classes/class_skin.rst index 298fa7e6b07..9f128b34107 100644 --- a/classes/class_skin.rst +++ b/classes/class_skin.rst @@ -24,29 +24,29 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_bind<class_Skin_method_add_bind>` **(** :ref:`int<class_int>` bone, :ref:`Transform3D<class_Transform3D>` pose **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_named_bind<class_Skin_method_add_named_bind>` **(** :ref:`String<class_String>` name, :ref:`Transform3D<class_Transform3D>` pose **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_binds<class_Skin_method_clear_binds>` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bind_bone<class_Skin_method_get_bind_bone>` **(** :ref:`int<class_int>` bind_index **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_bind_count<class_Skin_method_get_bind_count>` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_bind_name<class_Skin_method_get_bind_name>` **(** :ref:`int<class_int>` bind_index **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bind_pose<class_Skin_method_get_bind_pose>` **(** :ref:`int<class_int>` bind_index **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bind_bone<class_Skin_method_set_bind_bone>` **(** :ref:`int<class_int>` bind_index, :ref:`int<class_int>` bone **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bind_count<class_Skin_method_set_bind_count>` **(** :ref:`int<class_int>` bind_count **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bind_name<class_Skin_method_set_bind_name>` **(** :ref:`int<class_int>` bind_index, :ref:`StringName<class_StringName>` name **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bind_pose<class_Skin_method_set_bind_pose>` **(** :ref:`int<class_int>` bind_index, :ref:`Transform3D<class_Transform3D>` pose **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_bind<class_Skin_method_add_bind>`\ (\ bone\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_named_bind<class_Skin_method_add_named_bind>`\ (\ name\: :ref:`String<class_String>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_binds<class_Skin_method_clear_binds>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bind_bone<class_Skin_method_get_bind_bone>`\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_bind_count<class_Skin_method_get_bind_count>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_bind_name<class_Skin_method_get_bind_name>`\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_bind_pose<class_Skin_method_get_bind_pose>`\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bind_bone<class_Skin_method_set_bind_bone>`\ (\ bind_index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bind_count<class_Skin_method_set_bind_count>`\ (\ bind_count\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bind_name<class_Skin_method_set_bind_name>`\ (\ bind_index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bind_pose<class_Skin_method_set_bind_pose>`\ (\ bind_index\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -61,7 +61,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_bind** **(** :ref:`int<class_int>` bone, :ref:`Transform3D<class_Transform3D>` pose **)** +|void| **add_bind**\ (\ bone\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skin_method_add_bind>` .. container:: contribute @@ -75,7 +75,7 @@ void **add_bind** **(** :ref:`int<class_int>` bone, :ref:`Transform3D<class_Tran .. rst-class:: classref-method -void **add_named_bind** **(** :ref:`String<class_String>` name, :ref:`Transform3D<class_Transform3D>` pose **)** +|void| **add_named_bind**\ (\ name\: :ref:`String<class_String>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skin_method_add_named_bind>` .. container:: contribute @@ -89,7 +89,7 @@ void **add_named_bind** **(** :ref:`String<class_String>` name, :ref:`Transform3 .. rst-class:: classref-method -void **clear_binds** **(** **)** +|void| **clear_binds**\ (\ ) :ref:`🔗<class_Skin_method_clear_binds>` .. container:: contribute @@ -103,7 +103,7 @@ void **clear_binds** **(** **)** .. rst-class:: classref-method -:ref:`int<class_int>` **get_bind_bone** **(** :ref:`int<class_int>` bind_index **)** |const| +:ref:`int<class_int>` **get_bind_bone**\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skin_method_get_bind_bone>` .. container:: contribute @@ -117,7 +117,7 @@ void **clear_binds** **(** **)** .. rst-class:: classref-method -:ref:`int<class_int>` **get_bind_count** **(** **)** |const| +:ref:`int<class_int>` **get_bind_count**\ (\ ) |const| :ref:`🔗<class_Skin_method_get_bind_count>` .. container:: contribute @@ -131,7 +131,7 @@ void **clear_binds** **(** **)** .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_bind_name** **(** :ref:`int<class_int>` bind_index **)** |const| +:ref:`StringName<class_StringName>` **get_bind_name**\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skin_method_get_bind_name>` .. container:: contribute @@ -145,7 +145,7 @@ void **clear_binds** **(** **)** .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_bind_pose** **(** :ref:`int<class_int>` bind_index **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_bind_pose**\ (\ bind_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Skin_method_get_bind_pose>` .. container:: contribute @@ -159,7 +159,7 @@ void **clear_binds** **(** **)** .. rst-class:: classref-method -void **set_bind_bone** **(** :ref:`int<class_int>` bind_index, :ref:`int<class_int>` bone **)** +|void| **set_bind_bone**\ (\ bind_index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skin_method_set_bind_bone>` .. container:: contribute @@ -173,7 +173,7 @@ void **set_bind_bone** **(** :ref:`int<class_int>` bind_index, :ref:`int<class_i .. rst-class:: classref-method -void **set_bind_count** **(** :ref:`int<class_int>` bind_count **)** +|void| **set_bind_count**\ (\ bind_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Skin_method_set_bind_count>` .. container:: contribute @@ -187,7 +187,7 @@ void **set_bind_count** **(** :ref:`int<class_int>` bind_count **)** .. rst-class:: classref-method -void **set_bind_name** **(** :ref:`int<class_int>` bind_index, :ref:`StringName<class_StringName>` name **)** +|void| **set_bind_name**\ (\ bind_index\: :ref:`int<class_int>`, name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Skin_method_set_bind_name>` .. container:: contribute @@ -201,7 +201,7 @@ void **set_bind_name** **(** :ref:`int<class_int>` bind_index, :ref:`StringName< .. rst-class:: classref-method -void **set_bind_pose** **(** :ref:`int<class_int>` bind_index, :ref:`Transform3D<class_Transform3D>` pose **)** +|void| **set_bind_pose**\ (\ bind_index\: :ref:`int<class_int>`, pose\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Skin_method_set_bind_pose>` .. container:: contribute @@ -214,3 +214,4 @@ void **set_bind_pose** **(** :ref:`int<class_int>` bind_index, :ref:`Transform3D .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_skinreference.rst b/classes/class_skinreference.rst index d6b8440abef..57379e5d441 100644 --- a/classes/class_skinreference.rst +++ b/classes/class_skinreference.rst @@ -12,9 +12,22 @@ SkinReference **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -.. container:: contribute +A reference-counted holder object for a skeleton RID used in the :ref:`RenderingServer<class_RenderingServer>`. - There is currently no description for this class. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +.. rst-class:: classref-introduction-group + +Description +----------- + +An internal object containing a mapping from a :ref:`Skin<class_Skin>` used within the context of a particular :ref:`MeshInstance3D<class_MeshInstance3D>` to refer to the skeleton's :ref:`RID<class_RID>` in the RenderingServer. + +See also :ref:`MeshInstance3D.get_skin_reference<class_MeshInstance3D_method_get_skin_reference>` and :ref:`RenderingServer.instance_attach_skeleton<class_RenderingServer_method_instance_attach_skeleton>`. + +Note that despite the similar naming, the skeleton RID used in the :ref:`RenderingServer<class_RenderingServer>` does not have a direct one-to-one correspondence to a :ref:`Skeleton3D<class_Skeleton3D>` node. + +In particular, a :ref:`Skeleton3D<class_Skeleton3D>` node with no :ref:`MeshInstance3D<class_MeshInstance3D>` children may be unknown to the :ref:`RenderingServer<class_RenderingServer>`. + +On the other hand, a :ref:`Skeleton3D<class_Skeleton3D>` with multiple :ref:`MeshInstance3D<class_MeshInstance3D>` nodes which each have different :ref:`MeshInstance3D.skin<class_MeshInstance3D_property_skin>` objects may have multiple SkinReference instances (and hence, multiple skeleton :ref:`RID<class_RID>`\ s). .. rst-class:: classref-reftable-group @@ -24,11 +37,11 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_skeleton<class_SkinReference_method_get_skeleton>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------+ - | :ref:`Skin<class_Skin>` | :ref:`get_skin<class_SkinReference_method_get_skin>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_skeleton<class_SkinReference_method_get_skeleton>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------+ + | :ref:`Skin<class_Skin>` | :ref:`get_skin<class_SkinReference_method_get_skin>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,11 +56,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_skeleton** **(** **)** |const| - -.. container:: contribute +:ref:`RID<class_RID>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkinReference_method_get_skeleton>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the :ref:`RID<class_RID>` owned by this SkinReference, as returned by :ref:`RenderingServer.skeleton_create<class_RenderingServer_method_skeleton_create>`. .. rst-class:: classref-item-separator @@ -57,11 +68,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Skin<class_Skin>` **get_skin** **(** **)** |const| +:ref:`Skin<class_Skin>` **get_skin**\ (\ ) |const| :ref:`🔗<class_SkinReference_method_get_skin>` -.. container:: contribute +Returns the :ref:`Skin<class_Skin>` connected to this SkinReference. In the case of :ref:`MeshInstance3D<class_MeshInstance3D>` with no :ref:`MeshInstance3D.skin<class_MeshInstance3D_property_skin>` assigned, this will reference an internal default :ref:`Skin<class_Skin>` owned by that :ref:`MeshInstance3D<class_MeshInstance3D>`. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Note that a single :ref:`Skin<class_Skin>` may have more than one **SkinReference** in the case that it is shared by meshes across multiple :ref:`Skeleton3D<class_Skeleton3D>` nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -70,3 +81,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sky.rst b/classes/class_sky.rst index 97eccda2b31..a4a1ceba2d8 100644 --- a/classes/class_sky.rst +++ b/classes/class_sky.rst @@ -12,14 +12,14 @@ Sky **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Background that uses a :ref:`Material<class_Material>` to draw a sky. +Defines a 3D environment's background by using a :ref:`Material<class_Material>`. .. rst-class:: classref-introduction-group Description ----------- -The **Sky** class uses a :ref:`Material<class_Material>` to draw the background and update the reflection/radiance cubemaps. +The **Sky** class uses a :ref:`Material<class_Material>` to render a 3D environment's background and the light it emits by updating the reflection/radiance cubemaps. .. rst-class:: classref-reftable-group @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **RadianceSize**: +enum **RadianceSize**: :ref:`🔗<enum_Sky_RadianceSize>` .. _class_Sky_constant_RADIANCE_SIZE_32: @@ -124,7 +124,7 @@ Represents the size of the :ref:`RadianceSize<enum_Sky_RadianceSize>` enum. .. rst-class:: classref-enumeration -enum **ProcessMode**: +enum **ProcessMode**: :ref:`🔗<enum_Sky_ProcessMode>` .. _class_Sky_constant_PROCESS_MODE_AUTOMATIC: @@ -173,12 +173,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ProcessMode<enum_Sky_ProcessMode>` **process_mode** = ``0`` +:ref:`ProcessMode<enum_Sky_ProcessMode>` **process_mode** = ``0`` :ref:`🔗<class_Sky_property_process_mode>` .. rst-class:: classref-property-setget -- void **set_process_mode** **(** :ref:`ProcessMode<enum_Sky_ProcessMode>` value **)** -- :ref:`ProcessMode<enum_Sky_ProcessMode>` **get_process_mode** **(** **)** +- |void| **set_process_mode**\ (\ value\: :ref:`ProcessMode<enum_Sky_ProcessMode>`\ ) +- :ref:`ProcessMode<enum_Sky_ProcessMode>` **get_process_mode**\ (\ ) Sets the method for generating the radiance map from the sky. The radiance map is a cubemap with increasingly blurry versions of the sky corresponding to different levels of roughness. Radiance maps can be expensive to calculate. See :ref:`ProcessMode<enum_Sky_ProcessMode>` for options. @@ -190,12 +190,12 @@ Sets the method for generating the radiance map from the sky. The radiance map i .. rst-class:: classref-property -:ref:`RadianceSize<enum_Sky_RadianceSize>` **radiance_size** = ``3`` +:ref:`RadianceSize<enum_Sky_RadianceSize>` **radiance_size** = ``3`` :ref:`🔗<class_Sky_property_radiance_size>` .. rst-class:: classref-property-setget -- void **set_radiance_size** **(** :ref:`RadianceSize<enum_Sky_RadianceSize>` value **)** -- :ref:`RadianceSize<enum_Sky_RadianceSize>` **get_radiance_size** **(** **)** +- |void| **set_radiance_size**\ (\ value\: :ref:`RadianceSize<enum_Sky_RadianceSize>`\ ) +- :ref:`RadianceSize<enum_Sky_RadianceSize>` **get_radiance_size**\ (\ ) The **Sky**'s radiance map size. The higher the radiance map size, the more detailed the lighting from the **Sky** will be. @@ -211,12 +211,12 @@ See :ref:`RadianceSize<enum_Sky_RadianceSize>` constants for values. .. rst-class:: classref-property -:ref:`Material<class_Material>` **sky_material** +:ref:`Material<class_Material>` **sky_material** :ref:`🔗<class_Sky_property_sky_material>` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material**\ (\ ) :ref:`Material<class_Material>` used to draw the background. Can be :ref:`PanoramaSkyMaterial<class_PanoramaSkyMaterial>`, :ref:`ProceduralSkyMaterial<class_ProceduralSkyMaterial>`, :ref:`PhysicalSkyMaterial<class_PhysicalSkyMaterial>`, or even a :ref:`ShaderMaterial<class_ShaderMaterial>` if you want to use your own custom shader. @@ -227,3 +227,4 @@ See :ref:`RadianceSize<enum_Sky_RadianceSize>` constants for values. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_slider.rst b/classes/class_slider.rst index 1496f3bad8a..89ae4594a2a 100644 --- a/classes/class_slider.rst +++ b/classes/class_slider.rst @@ -45,6 +45,34 @@ Properties | :ref:`bool<class_bool>` | :ref:`ticks_on_borders<class_Slider_property_ticks_on_borders>` | ``false`` | +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +Theme Properties +---------------- + +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`center_grabber<class_Slider_theme_constant_center_grabber>` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`grabber_offset<class_Slider_theme_constant_grabber_offset>` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_Slider_theme_icon_grabber>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_disabled<class_Slider_theme_icon_grabber_disabled>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_highlight<class_Slider_theme_icon_grabber_highlight>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`tick<class_Slider_theme_icon_tick>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area<class_Slider_theme_style_grabber_area>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area_highlight<class_Slider_theme_style_grabber_area_highlight>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`slider<class_Slider_theme_style_slider>` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + .. rst-class:: classref-section-separator ---- @@ -58,7 +86,7 @@ Signals .. rst-class:: classref-signal -**drag_ended** **(** :ref:`bool<class_bool>` value_changed **)** +**drag_ended**\ (\ value_changed\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Slider_signal_drag_ended>` Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value<class_Range_property_value>` is different from the value when you started the dragging. @@ -70,9 +98,9 @@ Emitted when dragging stops. If ``value_changed`` is true, :ref:`Range.value<cla .. rst-class:: classref-signal -**drag_started** **(** **)** +**drag_started**\ (\ ) :ref:`🔗<class_Slider_signal_drag_started>` -Emitted when dragging is started. +Emitted when dragging is started. This is emitted before the corresponding :ref:`Range.value_changed<class_Range_signal_value_changed>` signal. .. rst-class:: classref-section-separator @@ -87,12 +115,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **editable** = ``true`` +:ref:`bool<class_bool>` **editable** = ``true`` :ref:`🔗<class_Slider_property_editable>` .. rst-class:: classref-property-setget -- void **set_editable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editable** **(** **)** +- |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editable**\ (\ ) If ``true``, the slider can be interacted with. If ``false``, the value can be changed only by code. @@ -104,12 +132,12 @@ If ``true``, the slider can be interacted with. If ``false``, the value can be c .. rst-class:: classref-property -:ref:`bool<class_bool>` **scrollable** = ``true`` +:ref:`bool<class_bool>` **scrollable** = ``true`` :ref:`🔗<class_Slider_property_scrollable>` .. rst-class:: classref-property-setget -- void **set_scrollable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_scrollable** **(** **)** +- |void| **set_scrollable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_scrollable**\ (\ ) If ``true``, the value can be changed using the mouse wheel. @@ -121,12 +149,12 @@ If ``true``, the value can be changed using the mouse wheel. .. rst-class:: classref-property -:ref:`int<class_int>` **tick_count** = ``0`` +:ref:`int<class_int>` **tick_count** = ``0`` :ref:`🔗<class_Slider_property_tick_count>` .. rst-class:: classref-property-setget -- void **set_ticks** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_ticks** **(** **)** +- |void| **set_ticks**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_ticks**\ (\ ) Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers. @@ -138,15 +166,128 @@ Number of ticks displayed on the slider, including border ticks. Ticks are unifo .. rst-class:: classref-property -:ref:`bool<class_bool>` **ticks_on_borders** = ``false`` +:ref:`bool<class_bool>` **ticks_on_borders** = ``false`` :ref:`🔗<class_Slider_property_ticks_on_borders>` .. rst-class:: classref-property-setget -- void **set_ticks_on_borders** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_ticks_on_borders** **(** **)** +- |void| **set_ticks_on_borders**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_ticks_on_borders**\ (\ ) If ``true``, the slider will display ticks for minimum and maximum values. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Theme Property Descriptions +--------------------------- + +.. _class_Slider_theme_constant_center_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`int<class_int>` **center_grabber** = ``0`` :ref:`🔗<class_Slider_theme_constant_center_grabber>` + +Boolean constant. If ``1``, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_constant_grabber_offset: + +.. rst-class:: classref-themeproperty + +:ref:`int<class_int>` **grabber_offset** = ``0`` :ref:`🔗<class_Slider_theme_constant_grabber_offset>` + +Vertical or horizontal offset of the grabber. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **grabber** :ref:`🔗<class_Slider_theme_icon_grabber>` + +The texture for the grabber (the draggable element). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **grabber_disabled** :ref:`🔗<class_Slider_theme_icon_grabber_disabled>` + +The texture for the grabber when it's disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **grabber_highlight** :ref:`🔗<class_Slider_theme_icon_grabber_highlight>` + +The texture for the grabber when it's focused. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_tick: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **tick** :ref:`🔗<class_Slider_theme_icon_tick>` + +The texture for the ticks, visible when :ref:`tick_count<class_Slider_property_tick_count>` is greater than 0. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_grabber_area: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **grabber_area** :ref:`🔗<class_Slider_theme_style_grabber_area>` + +The background of the area to the left or bottom of the grabber. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_grabber_area_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **grabber_area_highlight** :ref:`🔗<class_Slider_theme_style_grabber_area_highlight>` + +The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_slider: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **slider** :ref:`🔗<class_Slider_theme_style_slider>` + +The background for the whole slider. Affects the height or width of the :ref:`grabber_area<class_Slider_theme_style_grabber_area>`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -154,3 +295,4 @@ If ``true``, the slider will display ticks for minimum and maximum values. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sliderjoint3d.rst b/classes/class_sliderjoint3d.rst index b1bb94c0b05..be0cfc2b0da 100644 --- a/classes/class_sliderjoint3d.rst +++ b/classes/class_sliderjoint3d.rst @@ -83,11 +83,11 @@ Methods .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_param<class_SliderJoint3D_method_get_param>` **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_param<class_SliderJoint3D_method_set_param>` **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** | - +---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_param<class_SliderJoint3D_method_get_param>`\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_param<class_SliderJoint3D_method_set_param>`\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -102,7 +102,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Param**: +enum **Param**: :ref:`🔗<enum_SliderJoint3D_Param>` .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_UPPER: @@ -110,7 +110,7 @@ enum **Param**: :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_LIMIT_UPPER** = ``0`` -The maximum difference between the pivot points on their X axis before damping happens. +Constant for accessing :ref:`linear_limit/upper_distance<class_SliderJoint3D_property_linear_limit/upper_distance>`. The maximum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_LOWER: @@ -118,7 +118,7 @@ The maximum difference between the pivot points on their X axis before damping h :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_LIMIT_LOWER** = ``1`` -The minimum difference between the pivot points on their X axis before damping happens. +Constant for accessing :ref:`linear_limit/lower_distance<class_SliderJoint3D_property_linear_limit/lower_distance>`. The minimum difference between the pivot points on their X axis before damping happens. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_SOFTNESS: @@ -126,7 +126,7 @@ The minimum difference between the pivot points on their X axis before damping h :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_LIMIT_SOFTNESS** = ``2`` -A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. +Constant for accessing :ref:`linear_limit/softness<class_SliderJoint3D_property_linear_limit/softness>`. A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_RESTITUTION: @@ -134,7 +134,7 @@ A factor applied to the movement across the slider axis once the limits get surp :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_LIMIT_RESTITUTION** = ``3`` -The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. +Constant for accessing :ref:`linear_limit/restitution<class_SliderJoint3D_property_linear_limit/restitution>`. The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. .. _class_SliderJoint3D_constant_PARAM_LINEAR_LIMIT_DAMPING: @@ -142,7 +142,7 @@ The amount of restitution once the limits are surpassed. The lower, the more vel :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_LIMIT_DAMPING** = ``4`` -The amount of damping once the slider limits are surpassed. +Constant for accessing :ref:`linear_limit/damping<class_SliderJoint3D_property_linear_limit/damping>`. The amount of damping once the slider limits are surpassed. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_SOFTNESS: @@ -150,7 +150,7 @@ The amount of damping once the slider limits are surpassed. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_MOTION_SOFTNESS** = ``5`` -A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. +Constant for accessing :ref:`linear_motion/softness<class_SliderJoint3D_property_linear_motion/softness>`. A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_RESTITUTION: @@ -158,7 +158,7 @@ A factor applied to the movement across the slider axis as long as the slider is :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_MOTION_RESTITUTION** = ``6`` -The amount of restitution inside the slider limits. +Constant for accessing :ref:`linear_motion/restitution<class_SliderJoint3D_property_linear_motion/restitution>`. The amount of restitution inside the slider limits. .. _class_SliderJoint3D_constant_PARAM_LINEAR_MOTION_DAMPING: @@ -166,7 +166,7 @@ The amount of restitution inside the slider limits. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_MOTION_DAMPING** = ``7`` -The amount of damping inside the slider limits. +Constant for accessing :ref:`linear_motion/damping<class_SliderJoint3D_property_linear_motion/damping>`. The amount of damping inside the slider limits. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_SOFTNESS: @@ -174,7 +174,7 @@ The amount of damping inside the slider limits. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_ORTHOGONAL_SOFTNESS** = ``8`` -A factor applied to the movement across axes orthogonal to the slider. +Constant for accessing :ref:`linear_ortho/softness<class_SliderJoint3D_property_linear_ortho/softness>`. A factor applied to the movement across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_RESTITUTION: @@ -182,7 +182,7 @@ A factor applied to the movement across axes orthogonal to the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_ORTHOGONAL_RESTITUTION** = ``9`` -The amount of restitution when movement is across axes orthogonal to the slider. +Constant for accessing :ref:`linear_motion/restitution<class_SliderJoint3D_property_linear_motion/restitution>`. The amount of restitution when movement is across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_LINEAR_ORTHOGONAL_DAMPING: @@ -190,7 +190,7 @@ The amount of restitution when movement is across axes orthogonal to the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_LINEAR_ORTHOGONAL_DAMPING** = ``10`` -The amount of damping when movement is across axes orthogonal to the slider. +Constant for accessing :ref:`linear_motion/damping<class_SliderJoint3D_property_linear_motion/damping>`. The amount of damping when movement is across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_UPPER: @@ -198,7 +198,7 @@ The amount of damping when movement is across axes orthogonal to the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_LIMIT_UPPER** = ``11`` -The upper limit of rotation in the slider. +Constant for accessing :ref:`angular_limit/upper_angle<class_SliderJoint3D_property_angular_limit/upper_angle>`. The upper limit of rotation in the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_LOWER: @@ -206,7 +206,7 @@ The upper limit of rotation in the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_LIMIT_LOWER** = ``12`` -The lower limit of rotation in the slider. +Constant for accessing :ref:`angular_limit/lower_angle<class_SliderJoint3D_property_angular_limit/lower_angle>`. The lower limit of rotation in the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_SOFTNESS: @@ -214,7 +214,7 @@ The lower limit of rotation in the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_LIMIT_SOFTNESS** = ``13`` -A factor applied to the all rotation once the limit is surpassed. +Constant for accessing :ref:`angular_limit/softness<class_SliderJoint3D_property_angular_limit/softness>`. A factor applied to the all rotation once the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_RESTITUTION: @@ -222,7 +222,7 @@ A factor applied to the all rotation once the limit is surpassed. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_LIMIT_RESTITUTION** = ``14`` -The amount of restitution of the rotation when the limit is surpassed. +Constant for accessing :ref:`angular_limit/restitution<class_SliderJoint3D_property_angular_limit/restitution>`. The amount of restitution of the rotation when the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_LIMIT_DAMPING: @@ -230,7 +230,7 @@ The amount of restitution of the rotation when the limit is surpassed. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_LIMIT_DAMPING** = ``15`` -The amount of damping of the rotation when the limit is surpassed. +Constant for accessing :ref:`angular_limit/damping<class_SliderJoint3D_property_angular_limit/damping>`. The amount of damping of the rotation when the limit is surpassed. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_SOFTNESS: @@ -238,7 +238,7 @@ The amount of damping of the rotation when the limit is surpassed. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_MOTION_SOFTNESS** = ``16`` -A factor applied to the all rotation in the limits. +Constant for accessing :ref:`angular_motion/softness<class_SliderJoint3D_property_angular_motion/softness>`. A factor applied to the all rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_RESTITUTION: @@ -246,7 +246,7 @@ A factor applied to the all rotation in the limits. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_MOTION_RESTITUTION** = ``17`` -The amount of restitution of the rotation in the limits. +Constant for accessing :ref:`angular_motion/restitution<class_SliderJoint3D_property_angular_motion/restitution>`. The amount of restitution of the rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_MOTION_DAMPING: @@ -254,7 +254,7 @@ The amount of restitution of the rotation in the limits. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_MOTION_DAMPING** = ``18`` -The amount of damping of the rotation in the limits. +Constant for accessing :ref:`angular_motion/damping<class_SliderJoint3D_property_angular_motion/damping>`. The amount of damping of the rotation in the limits. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_SOFTNESS: @@ -262,7 +262,7 @@ The amount of damping of the rotation in the limits. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_ORTHOGONAL_SOFTNESS** = ``19`` -A factor applied to the all rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/softness<class_SliderJoint3D_property_angular_ortho/softness>`. A factor applied to the all rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_RESTITUTION: @@ -270,7 +270,7 @@ A factor applied to the all rotation across axes orthogonal to the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_ORTHOGONAL_RESTITUTION** = ``20`` -The amount of restitution of the rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/restitution<class_SliderJoint3D_property_angular_ortho/restitution>`. The amount of restitution of the rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_ANGULAR_ORTHOGONAL_DAMPING: @@ -278,7 +278,7 @@ The amount of restitution of the rotation across axes orthogonal to the slider. :ref:`Param<enum_SliderJoint3D_Param>` **PARAM_ANGULAR_ORTHOGONAL_DAMPING** = ``21`` -The amount of damping of the rotation across axes orthogonal to the slider. +Constant for accessing :ref:`angular_ortho/damping<class_SliderJoint3D_property_angular_ortho/damping>`. The amount of damping of the rotation across axes orthogonal to the slider. .. _class_SliderJoint3D_constant_PARAM_MAX: @@ -301,12 +301,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/damping** = ``0.0`` +:ref:`float<class_float>` **angular_limit/damping** = ``0.0`` :ref:`🔗<class_SliderJoint3D_property_angular_limit/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping of the rotation when the limit is surpassed. @@ -320,12 +320,12 @@ A lower damping value allows a rotation initiated by body A to travel to body B .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/lower_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit/lower_angle** = ``0.0`` :ref:`🔗<class_SliderJoint3D_property_angular_limit/lower_angle>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The lower limit of rotation in the slider. @@ -337,12 +337,12 @@ The lower limit of rotation in the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/restitution** = ``0.7`` +:ref:`float<class_float>` **angular_limit/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_angular_limit/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution of the rotation when the limit is surpassed. @@ -356,12 +356,12 @@ Does not affect damping. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/softness** = ``1.0`` +:ref:`float<class_float>` **angular_limit/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_angular_limit/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the all rotation once the limit is surpassed. @@ -375,12 +375,12 @@ Makes all rotation slower when between 0 and 1. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_limit/upper_angle** = ``0.0`` +:ref:`float<class_float>` **angular_limit/upper_angle** = ``0.0`` :ref:`🔗<class_SliderJoint3D_property_angular_limit/upper_angle>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The upper limit of rotation in the slider. @@ -392,12 +392,12 @@ The upper limit of rotation in the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motion/damping** = ``1.0`` +:ref:`float<class_float>` **angular_motion/damping** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_angular_motion/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping of the rotation in the limits. @@ -409,12 +409,12 @@ The amount of damping of the rotation in the limits. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motion/restitution** = ``0.7`` +:ref:`float<class_float>` **angular_motion/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_angular_motion/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution of the rotation in the limits. @@ -426,12 +426,12 @@ The amount of restitution of the rotation in the limits. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_motion/softness** = ``1.0`` +:ref:`float<class_float>` **angular_motion/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_angular_motion/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the all rotation in the limits. @@ -443,12 +443,12 @@ A factor applied to the all rotation in the limits. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_ortho/damping** = ``1.0`` +:ref:`float<class_float>` **angular_ortho/damping** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_angular_ortho/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping of the rotation across axes orthogonal to the slider. @@ -460,12 +460,12 @@ The amount of damping of the rotation across axes orthogonal to the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_ortho/restitution** = ``0.7`` +:ref:`float<class_float>` **angular_ortho/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_angular_ortho/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution of the rotation across axes orthogonal to the slider. @@ -477,12 +477,12 @@ The amount of restitution of the rotation across axes orthogonal to the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **angular_ortho/softness** = ``1.0`` +:ref:`float<class_float>` **angular_ortho/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_angular_ortho/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the all rotation across axes orthogonal to the slider. @@ -494,12 +494,12 @@ A factor applied to the all rotation across axes orthogonal to the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit/damping** = ``1.0`` +:ref:`float<class_float>` **linear_limit/damping** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_limit/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping that happens once the limit defined by :ref:`linear_limit/lower_distance<class_SliderJoint3D_property_linear_limit/lower_distance>` and :ref:`linear_limit/upper_distance<class_SliderJoint3D_property_linear_limit/upper_distance>` is surpassed. @@ -511,12 +511,12 @@ The amount of damping that happens once the limit defined by :ref:`linear_limit/ .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit/lower_distance** = ``-1.0`` +:ref:`float<class_float>` **linear_limit/lower_distance** = ``-1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_limit/lower_distance>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The minimum difference between the pivot points on their X axis before damping happens. @@ -528,12 +528,12 @@ The minimum difference between the pivot points on their X axis before damping h .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit/restitution** = ``0.7`` +:ref:`float<class_float>` **linear_limit/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_linear_limit/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. @@ -545,12 +545,12 @@ The amount of restitution once the limits are surpassed. The lower, the more vel .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit/softness** = ``1.0`` +:ref:`float<class_float>` **linear_limit/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_limit/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. @@ -562,12 +562,12 @@ A factor applied to the movement across the slider axis once the limits get surp .. rst-class:: classref-property -:ref:`float<class_float>` **linear_limit/upper_distance** = ``1.0`` +:ref:`float<class_float>` **linear_limit/upper_distance** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_limit/upper_distance>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The maximum difference between the pivot points on their X axis before damping happens. @@ -579,12 +579,12 @@ The maximum difference between the pivot points on their X axis before damping h .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motion/damping** = ``0.0`` +:ref:`float<class_float>` **linear_motion/damping** = ``0.0`` :ref:`🔗<class_SliderJoint3D_property_linear_motion/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping inside the slider limits. @@ -596,12 +596,12 @@ The amount of damping inside the slider limits. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motion/restitution** = ``0.7`` +:ref:`float<class_float>` **linear_motion/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_linear_motion/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution inside the slider limits. @@ -613,12 +613,12 @@ The amount of restitution inside the slider limits. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_motion/softness** = ``1.0`` +:ref:`float<class_float>` **linear_motion/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_motion/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. @@ -630,12 +630,12 @@ A factor applied to the movement across the slider axis as long as the slider is .. rst-class:: classref-property -:ref:`float<class_float>` **linear_ortho/damping** = ``1.0`` +:ref:`float<class_float>` **linear_ortho/damping** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_ortho/damping>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of damping when movement is across axes orthogonal to the slider. @@ -647,12 +647,12 @@ The amount of damping when movement is across axes orthogonal to the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_ortho/restitution** = ``0.7`` +:ref:`float<class_float>` **linear_ortho/restitution** = ``0.7`` :ref:`🔗<class_SliderJoint3D_property_linear_ortho/restitution>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| The amount of restitution when movement is across axes orthogonal to the slider. @@ -664,12 +664,12 @@ The amount of restitution when movement is across axes orthogonal to the slider. .. rst-class:: classref-property -:ref:`float<class_float>` **linear_ortho/softness** = ``1.0`` +:ref:`float<class_float>` **linear_ortho/softness** = ``1.0`` :ref:`🔗<class_SliderJoint3D_property_linear_ortho/softness>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +- |void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| A factor applied to the movement across axes orthogonal to the slider. @@ -686,11 +686,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param **)** |const| +:ref:`float<class_float>` **get_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`\ ) |const| :ref:`🔗<class_SliderJoint3D_method_get_param>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the value of the given parameter (see :ref:`Param<enum_SliderJoint3D_Param>` constants). .. rst-class:: classref-item-separator @@ -700,11 +698,9 @@ Method Descriptions .. rst-class:: classref-method -void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`float<class_float>` value **)** - -.. container:: contribute +|void| **set_param**\ (\ param\: :ref:`Param<enum_SliderJoint3D_Param>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SliderJoint3D_method_set_param>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Assigns ``value`` to the given parameter (see :ref:`Param<enum_SliderJoint3D_Param>` constants). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -713,3 +709,4 @@ void **set_param** **(** :ref:`Param<enum_SliderJoint3D_Param>` param, :ref:`flo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_softbody3d.rst b/classes/class_softbody3d.rst index 12069bfcbb5..7c7125e2abd 100644 --- a/classes/class_softbody3d.rst +++ b/classes/class_softbody3d.rst @@ -21,6 +21,8 @@ Description A deformable 3D physics mesh. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. +Additionally, **SoftBody3D** is subject to wind forces defined in :ref:`Area3D<class_Area3D>` (see :ref:`Area3D.wind_source_path<class_Area3D_property_wind_source_path>`, :ref:`Area3D.wind_force_magnitude<class_Area3D_property_wind_force_magnitude>`, and :ref:`Area3D.wind_attenuation_factor<class_Area3D_property_wind_attenuation_factor>`). + \ **Note:** There are many known bugs in **SoftBody3D**. Therefore, it's not recommended to use them for things that can affect gameplay (such as trampolines). .. rst-class:: classref-introduction-group @@ -70,29 +72,29 @@ Methods .. table:: :widths: auto - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_exception_with<class_SoftBody3D_method_add_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsBody3D[]<class_PhysicsBody3D>` | :ref:`get_collision_exceptions<class_SoftBody3D_method_get_collision_exceptions>` **(** **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_SoftBody3D_method_get_collision_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_SoftBody3D_method_get_collision_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_physics_rid<class_SoftBody3D_method_get_physics_rid>` **(** **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_point_transform<class_SoftBody3D_method_get_point_transform>` **(** :ref:`int<class_int>` point_index **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_point_pinned<class_SoftBody3D_method_is_point_pinned>` **(** :ref:`int<class_int>` point_index **)** |const| | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_exception_with<class_SoftBody3D_method_remove_collision_exception_with>` **(** :ref:`Node<class_Node>` body **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value<class_SoftBody3D_method_set_collision_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value<class_SoftBody3D_method_set_collision_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_pinned<class_SoftBody3D_method_set_point_pinned>` **(** :ref:`int<class_int>` point_index, :ref:`bool<class_bool>` pinned, :ref:`NodePath<class_NodePath>` attachment_path=NodePath("") **)** | - +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_exception_with<class_SoftBody3D_method_add_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] | :ref:`get_collision_exceptions<class_SoftBody3D_method_get_collision_exceptions>`\ (\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_layer_value<class_SoftBody3D_method_get_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_collision_mask_value<class_SoftBody3D_method_get_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_physics_rid<class_SoftBody3D_method_get_physics_rid>`\ (\ ) |const| | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_point_transform<class_SoftBody3D_method_get_point_transform>`\ (\ point_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_point_pinned<class_SoftBody3D_method_is_point_pinned>`\ (\ point_index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_exception_with<class_SoftBody3D_method_remove_collision_exception_with>`\ (\ body\: :ref:`Node<class_Node>`\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_layer_value<class_SoftBody3D_method_set_collision_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_mask_value<class_SoftBody3D_method_set_collision_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_point_pinned<class_SoftBody3D_method_set_point_pinned>`\ (\ point_index\: :ref:`int<class_int>`, pinned\: :ref:`bool<class_bool>`, attachment_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) | + +------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -107,7 +109,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DisableMode**: +enum **DisableMode**: :ref:`🔗<enum_SoftBody3D_DisableMode>` .. _class_SoftBody3D_constant_DISABLE_MODE_REMOVE: @@ -140,12 +142,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **collision_layer** = ``1`` +:ref:`int<class_int>` **collision_layer** = ``1`` :ref:`🔗<class_SoftBody3D_property_collision_layer>` .. rst-class:: classref-property-setget -- void **set_collision_layer** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_layer** **(** **)** +- |void| **set_collision_layer**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_layer**\ (\ ) The physics layers this SoftBody3D **is in**. Collision objects can exist in one or more of 32 different layers. See also :ref:`collision_mask<class_SoftBody3D_property_collision_mask>`. @@ -159,12 +161,12 @@ The physics layers this SoftBody3D **is in**. Collision objects can exist in one .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_SoftBody3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The physics layers this SoftBody3D **scans**. Collision objects can scan one or more of 32 different layers. See also :ref:`collision_layer<class_SoftBody3D_property_collision_layer>`. @@ -178,16 +180,14 @@ The physics layers this SoftBody3D **scans**. Collision objects can scan one or .. rst-class:: classref-property -:ref:`float<class_float>` **damping_coefficient** = ``0.01`` +:ref:`float<class_float>` **damping_coefficient** = ``0.01`` :ref:`🔗<class_SoftBody3D_property_damping_coefficient>` .. rst-class:: classref-property-setget -- void **set_damping_coefficient** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_damping_coefficient** **(** **)** - -.. container:: contribute +- |void| **set_damping_coefficient**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_damping_coefficient**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The body's damping coefficient. Higher values will slow down the body more noticeably when forces are applied. .. rst-class:: classref-item-separator @@ -197,12 +197,12 @@ The physics layers this SoftBody3D **scans**. Collision objects can scan one or .. rst-class:: classref-property -:ref:`DisableMode<enum_SoftBody3D_DisableMode>` **disable_mode** = ``0`` +:ref:`DisableMode<enum_SoftBody3D_DisableMode>` **disable_mode** = ``0`` :ref:`🔗<class_SoftBody3D_property_disable_mode>` .. rst-class:: classref-property-setget -- void **set_disable_mode** **(** :ref:`DisableMode<enum_SoftBody3D_DisableMode>` value **)** -- :ref:`DisableMode<enum_SoftBody3D_DisableMode>` **get_disable_mode** **(** **)** +- |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode<enum_SoftBody3D_DisableMode>`\ ) +- :ref:`DisableMode<enum_SoftBody3D_DisableMode>` **get_disable_mode**\ (\ ) Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property_process_mode>` is set to :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. See :ref:`DisableMode<enum_SoftBody3D_DisableMode>` for more details about the different modes. @@ -214,16 +214,16 @@ Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property .. rst-class:: classref-property -:ref:`float<class_float>` **drag_coefficient** = ``0.0`` +:ref:`float<class_float>` **drag_coefficient** = ``0.0`` :ref:`🔗<class_SoftBody3D_property_drag_coefficient>` .. rst-class:: classref-property-setget -- void **set_drag_coefficient** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_drag_coefficient** **(** **)** +- |void| **set_drag_coefficient**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_drag_coefficient**\ (\ ) -.. container:: contribute +The body's drag coefficient. Higher values increase this body's air resistance. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +\ **Note:** This value is currently unused by Godot's default physics implementation. .. rst-class:: classref-item-separator @@ -233,16 +233,14 @@ Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property .. rst-class:: classref-property -:ref:`float<class_float>` **linear_stiffness** = ``0.5`` +:ref:`float<class_float>` **linear_stiffness** = ``0.5`` :ref:`🔗<class_SoftBody3D_property_linear_stiffness>` .. rst-class:: classref-property-setget -- void **set_linear_stiffness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_linear_stiffness** **(** **)** - -.. container:: contribute +- |void| **set_linear_stiffness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_linear_stiffness**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between ``0.0`` and ``1.0`` (inclusive). .. rst-class:: classref-item-separator @@ -252,12 +250,12 @@ Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **parent_collision_ignore** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **parent_collision_ignore** = ``NodePath("")`` :ref:`🔗<class_SoftBody3D_property_parent_collision_ignore>` .. rst-class:: classref-property-setget -- void **set_parent_collision_ignore** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_parent_collision_ignore** **(** **)** +- |void| **set_parent_collision_ignore**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_parent_collision_ignore**\ (\ ) :ref:`NodePath<class_NodePath>` to a :ref:`CollisionObject3D<class_CollisionObject3D>` this SoftBody3D should avoid clipping. @@ -269,16 +267,14 @@ Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property .. rst-class:: classref-property -:ref:`float<class_float>` **pressure_coefficient** = ``0.0`` +:ref:`float<class_float>` **pressure_coefficient** = ``0.0`` :ref:`🔗<class_SoftBody3D_property_pressure_coefficient>` .. rst-class:: classref-property-setget -- void **set_pressure_coefficient** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pressure_coefficient** **(** **)** +- |void| **set_pressure_coefficient**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pressure_coefficient**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The pressure coefficient of this soft body. Simulate pressure build-up from inside this body. Higher values increase the strength of this effect. .. rst-class:: classref-item-separator @@ -288,12 +284,12 @@ Defines the behavior in physics when :ref:`Node.process_mode<class_Node_property .. rst-class:: classref-property -:ref:`bool<class_bool>` **ray_pickable** = ``true`` +:ref:`bool<class_bool>` **ray_pickable** = ``true`` :ref:`🔗<class_SoftBody3D_property_ray_pickable>` .. rst-class:: classref-property-setget -- void **set_ray_pickable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_ray_pickable** **(** **)** +- |void| **set_ray_pickable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_ray_pickable**\ (\ ) If ``true``, the **SoftBody3D** will respond to :ref:`RayCast3D<class_RayCast3D>`\ s. @@ -305,12 +301,12 @@ If ``true``, the **SoftBody3D** will respond to :ref:`RayCast3D<class_RayCast3D> .. rst-class:: classref-property -:ref:`int<class_int>` **simulation_precision** = ``5`` +:ref:`int<class_int>` **simulation_precision** = ``5`` :ref:`🔗<class_SoftBody3D_property_simulation_precision>` .. rst-class:: classref-property-setget -- void **set_simulation_precision** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_simulation_precision** **(** **)** +- |void| **set_simulation_precision**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_simulation_precision**\ (\ ) Increasing this value will improve the resulting simulation, but can affect performance. Use with care. @@ -322,12 +318,12 @@ Increasing this value will improve the resulting simulation, but can affect perf .. rst-class:: classref-property -:ref:`float<class_float>` **total_mass** = ``1.0`` +:ref:`float<class_float>` **total_mass** = ``1.0`` :ref:`🔗<class_SoftBody3D_property_total_mass>` .. rst-class:: classref-property-setget -- void **set_total_mass** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_total_mass** **(** **)** +- |void| **set_total_mass**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_total_mass**\ (\ ) The SoftBody3D's mass. @@ -344,7 +340,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **add_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SoftBody3D_method_add_collision_exception_with>` Adds a body to the list of bodies that this body can't collide with. @@ -356,7 +352,7 @@ Adds a body to the list of bodies that this body can't collide with. .. rst-class:: classref-method -:ref:`PhysicsBody3D[]<class_PhysicsBody3D>` **get_collision_exceptions** **(** **)** +:ref:`Array<class_Array>`\[:ref:`PhysicsBody3D<class_PhysicsBody3D>`\] **get_collision_exceptions**\ (\ ) :ref:`🔗<class_SoftBody3D_method_get_collision_exceptions>` Returns an array of nodes that were added as collision exceptions for this body. @@ -368,7 +364,7 @@ Returns an array of nodes that were added as collision exceptions for this body. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_collision_layer_value>` Returns whether or not the specified layer of the :ref:`collision_layer<class_SoftBody3D_property_collision_layer>` is enabled, given a ``layer_number`` between 1 and 32. @@ -380,7 +376,7 @@ Returns whether or not the specified layer of the :ref:`collision_layer<class_So .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_collision_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_collision_mask_value>` Returns whether or not the specified layer of the :ref:`collision_mask<class_SoftBody3D_property_collision_mask>` is enabled, given a ``layer_number`` between 1 and 32. @@ -392,11 +388,9 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Sof .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_physics_rid** **(** **)** |const| - -.. container:: contribute +:ref:`RID<class_RID>` **get_physics_rid**\ (\ ) |const| :ref:`🔗<class_SoftBody3D_method_get_physics_rid>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the internal :ref:`RID<class_RID>` used by the :ref:`PhysicsServer3D<class_PhysicsServer3D>` for this body. .. rst-class:: classref-item-separator @@ -406,7 +400,7 @@ Returns whether or not the specified layer of the :ref:`collision_mask<class_Sof .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_point_transform** **(** :ref:`int<class_int>` point_index **)** +:ref:`Vector3<class_Vector3>` **get_point_transform**\ (\ point_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SoftBody3D_method_get_point_transform>` Returns local translation of a vertex in the surface array. @@ -418,7 +412,7 @@ Returns local translation of a vertex in the surface array. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_point_pinned** **(** :ref:`int<class_int>` point_index **)** |const| +:ref:`bool<class_bool>` **is_point_pinned**\ (\ point_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SoftBody3D_method_is_point_pinned>` Returns ``true`` if vertex is set to pinned. @@ -430,7 +424,7 @@ Returns ``true`` if vertex is set to pinned. .. rst-class:: classref-method -void **remove_collision_exception_with** **(** :ref:`Node<class_Node>` body **)** +|void| **remove_collision_exception_with**\ (\ body\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_SoftBody3D_method_remove_collision_exception_with>` Removes a body from the list of bodies that this body can't collide with. @@ -442,7 +436,7 @@ Removes a body from the list of bodies that this body can't collide with. .. rst-class:: classref-method -void **set_collision_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SoftBody3D_method_set_collision_layer_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_layer<class_SoftBody3D_property_collision_layer>`, given a ``layer_number`` between 1 and 32. @@ -454,7 +448,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_collision_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_collision_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SoftBody3D_method_set_collision_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask<class_SoftBody3D_property_collision_mask>`, given a ``layer_number`` between 1 and 32. @@ -466,7 +460,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi .. rst-class:: classref-method -void **set_point_pinned** **(** :ref:`int<class_int>` point_index, :ref:`bool<class_bool>` pinned, :ref:`NodePath<class_NodePath>` attachment_path=NodePath("") **)** +|void| **set_point_pinned**\ (\ point_index\: :ref:`int<class_int>`, pinned\: :ref:`bool<class_bool>`, attachment_path\: :ref:`NodePath<class_NodePath>` = NodePath("")\ ) :ref:`🔗<class_SoftBody3D_method_set_point_pinned>` Sets the pinned state of a surface vertex. When set to ``true``, the optional ``attachment_path`` can define a :ref:`Node3D<class_Node3D>` the pinned vertex will be attached to. @@ -477,3 +471,4 @@ Sets the pinned state of a surface vertex. When set to ``true``, the optional `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_spheremesh.rst b/classes/class_spheremesh.rst index c64636372d4..fd3e36f36a0 100644 --- a/classes/class_spheremesh.rst +++ b/classes/class_spheremesh.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **height** = ``1.0`` +:ref:`float<class_float>` **height** = ``1.0`` :ref:`🔗<class_SphereMesh_property_height>` .. rst-class:: classref-property-setget -- void **set_height** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_height** **(** **)** +- |void| **set_height**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_height**\ (\ ) Full height of the sphere. @@ -71,12 +71,12 @@ Full height of the sphere. .. rst-class:: classref-property -:ref:`bool<class_bool>` **is_hemisphere** = ``false`` +:ref:`bool<class_bool>` **is_hemisphere** = ``false`` :ref:`🔗<class_SphereMesh_property_is_hemisphere>` .. rst-class:: classref-property-setget -- void **set_is_hemisphere** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_is_hemisphere** **(** **)** +- |void| **set_is_hemisphere**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_is_hemisphere**\ (\ ) If ``true``, a hemisphere is created rather than a full sphere. @@ -90,12 +90,12 @@ If ``true``, a hemisphere is created rather than a full sphere. .. rst-class:: classref-property -:ref:`int<class_int>` **radial_segments** = ``64`` +:ref:`int<class_int>` **radial_segments** = ``64`` :ref:`🔗<class_SphereMesh_property_radial_segments>` .. rst-class:: classref-property-setget -- void **set_radial_segments** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_radial_segments** **(** **)** +- |void| **set_radial_segments**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_radial_segments**\ (\ ) Number of radial segments on the sphere. @@ -107,12 +107,12 @@ Number of radial segments on the sphere. .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.5`` +:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_SphereMesh_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) Radius of sphere. @@ -124,12 +124,12 @@ Radius of sphere. .. rst-class:: classref-property -:ref:`int<class_int>` **rings** = ``32`` +:ref:`int<class_int>` **rings** = ``32`` :ref:`🔗<class_SphereMesh_property_rings>` .. rst-class:: classref-property-setget -- void **set_rings** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_rings** **(** **)** +- |void| **set_rings**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_rings**\ (\ ) Number of segments along the height of the sphere. @@ -140,3 +140,4 @@ Number of segments along the height of the sphere. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sphereoccluder3d.rst b/classes/class_sphereoccluder3d.rst index a2548c81ca8..936936a944e 100644 --- a/classes/class_sphereoccluder3d.rst +++ b/classes/class_sphereoccluder3d.rst @@ -23,6 +23,13 @@ Description See :ref:`OccluderInstance3D<class_OccluderInstance3D>`'s documentation for instructions on setting up occlusion culling. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` + .. rst-class:: classref-reftable-group Properties @@ -48,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``1.0`` +:ref:`float<class_float>` **radius** = ``1.0`` :ref:`🔗<class_SphereOccluder3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The sphere's radius in 3D units. @@ -64,3 +71,4 @@ The sphere's radius in 3D units. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sphereshape3d.rst b/classes/class_sphereshape3d.rst index 4a1b4c87434..3c0fb86bd5a 100644 --- a/classes/class_sphereshape3d.rst +++ b/classes/class_sphereshape3d.rst @@ -28,7 +28,7 @@ A 3D sphere shape, intended for use in physics. Usually used to provide a shape Tutorials --------- -- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/675>`__ +- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/2747>`__ .. rst-class:: classref-reftable-group @@ -55,12 +55,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.5`` +:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_SphereShape3D_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The sphere's radius. The shape's diameter is double the radius. @@ -71,3 +71,4 @@ The sphere's radius. The shape's diameter is double the radius. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_spinbox.rst b/classes/class_spinbox.rst index 0537355a96b..fe44c94d495 100644 --- a/classes/class_spinbox.rst +++ b/classes/class_spinbox.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: number, numeric, input + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -19,7 +22,7 @@ An input field for numbers. Description ----------- -**SpinBox** is a numerical input text field. It allows entering integers and floating point numbers. +**SpinBox** is a numerical input text field. It allows entering integers and floating-point numbers. \ **Example:**\ @@ -48,6 +51,8 @@ The above code will create a **SpinBox**, disable context menu on it and set the See :ref:`Range<class_Range>` class for more options over the **SpinBox**. +\ **Note:** With the **SpinBox**'s context menu disabled, you can right-click the bottom half of the spinbox to set the value to its minimum, while right-clicking the top half sets the value to its maximum. + \ **Note:** **SpinBox** relies on an underlying :ref:`LineEdit<class_LineEdit>` node. To theme a **SpinBox**'s background, add theme items for :ref:`LineEdit<class_LineEdit>` and customize them. \ **Note:** If you want to implement drag and drop for the underlying :ref:`LineEdit<class_LineEdit>`, you can use :ref:`Control.set_drag_forwarding<class_Control_method_set_drag_forwarding>` on the node returned by :ref:`get_line_edit<class_SpinBox_method_get_line_edit>`. @@ -71,7 +76,7 @@ Properties +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`select_all_on_focus<class_SpinBox_property_select_all_on_focus>` | ``false`` | +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`float<class_float>` | step | ``1.0`` (overrides :ref:`Range<class_Range_property_step>`) | +-------------------------------------------------------------------+------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -88,11 +93,11 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------+ - | void | :ref:`apply<class_SpinBox_method_apply>` **(** **)** | - +---------------------------------+----------------------------------------------------------------------+ - | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_SpinBox_method_get_line_edit>` **(** **)** | - +---------------------------------+----------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------+ + | |void| | :ref:`apply<class_SpinBox_method_apply>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------+ + | :ref:`LineEdit<class_LineEdit>` | :ref:`get_line_edit<class_SpinBox_method_get_line_edit>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -119,12 +124,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` :ref:`🔗<class_SpinBox_property_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Changes the alignment of the underlying :ref:`LineEdit<class_LineEdit>`. @@ -136,14 +141,14 @@ Changes the alignment of the underlying :ref:`LineEdit<class_LineEdit>`. .. rst-class:: classref-property -:ref:`float<class_float>` **custom_arrow_step** = ``0.0`` +:ref:`float<class_float>` **custom_arrow_step** = ``0.0`` :ref:`🔗<class_SpinBox_property_custom_arrow_step>` .. rst-class:: classref-property-setget -- void **set_custom_arrow_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_custom_arrow_step** **(** **)** +- |void| **set_custom_arrow_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_custom_arrow_step**\ (\ ) -If not ``0``, ``value`` will always be rounded to a multiple of ``custom_arrow_step`` when interacting with the arrow buttons of the **SpinBox**. +If not ``0``, :ref:`Range.value<class_Range_property_value>` will always be rounded to a multiple of :ref:`custom_arrow_step<class_SpinBox_property_custom_arrow_step>` when interacting with the arrow buttons of the **SpinBox**. .. rst-class:: classref-item-separator @@ -153,12 +158,12 @@ If not ``0``, ``value`` will always be rounded to a multiple of ``custom_arrow_s .. rst-class:: classref-property -:ref:`bool<class_bool>` **editable** = ``true`` +:ref:`bool<class_bool>` **editable** = ``true`` :ref:`🔗<class_SpinBox_property_editable>` .. rst-class:: classref-property-setget -- void **set_editable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editable** **(** **)** +- |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editable**\ (\ ) If ``true``, the **SpinBox** will be editable. Otherwise, it will be read only. @@ -170,14 +175,14 @@ If ``true``, the **SpinBox** will be editable. Otherwise, it will be read only. .. rst-class:: classref-property -:ref:`String<class_String>` **prefix** = ``""`` +:ref:`String<class_String>` **prefix** = ``""`` :ref:`🔗<class_SpinBox_property_prefix>` .. rst-class:: classref-property-setget -- void **set_prefix** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_prefix** **(** **)** +- |void| **set_prefix**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_prefix**\ (\ ) -Adds the specified ``prefix`` string before the numerical value of the **SpinBox**. +Adds the specified prefix string before the numerical value of the **SpinBox**. .. rst-class:: classref-item-separator @@ -187,12 +192,12 @@ Adds the specified ``prefix`` string before the numerical value of the **SpinBox .. rst-class:: classref-property -:ref:`bool<class_bool>` **select_all_on_focus** = ``false`` +:ref:`bool<class_bool>` **select_all_on_focus** = ``false`` :ref:`🔗<class_SpinBox_property_select_all_on_focus>` .. rst-class:: classref-property-setget -- void **set_select_all_on_focus** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_select_all_on_focus** **(** **)** +- |void| **set_select_all_on_focus**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_select_all_on_focus**\ (\ ) If ``true``, the **SpinBox** will select the whole text when the :ref:`LineEdit<class_LineEdit>` gains focus. Clicking the up and down arrows won't trigger this behavior. @@ -204,14 +209,14 @@ If ``true``, the **SpinBox** will select the whole text when the :ref:`LineEdit< .. rst-class:: classref-property -:ref:`String<class_String>` **suffix** = ``""`` +:ref:`String<class_String>` **suffix** = ``""`` :ref:`🔗<class_SpinBox_property_suffix>` .. rst-class:: classref-property-setget -- void **set_suffix** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_suffix** **(** **)** +- |void| **set_suffix**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_suffix**\ (\ ) -Adds the specified ``suffix`` string after the numerical value of the **SpinBox**. +Adds the specified suffix string after the numerical value of the **SpinBox**. .. rst-class:: classref-item-separator @@ -221,12 +226,12 @@ Adds the specified ``suffix`` string after the numerical value of the **SpinBox* .. rst-class:: classref-property -:ref:`bool<class_bool>` **update_on_text_changed** = ``false`` +:ref:`bool<class_bool>` **update_on_text_changed** = ``false`` :ref:`🔗<class_SpinBox_property_update_on_text_changed>` .. rst-class:: classref-property-setget -- void **set_update_on_text_changed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_update_on_text_changed** **(** **)** +- |void| **set_update_on_text_changed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_update_on_text_changed**\ (\ ) Sets the value of the :ref:`Range<class_Range>` for this **SpinBox** when the :ref:`LineEdit<class_LineEdit>` text is *changed* instead of *submitted*. See :ref:`LineEdit.text_changed<class_LineEdit_signal_text_changed>` and :ref:`LineEdit.text_submitted<class_LineEdit_signal_text_submitted>`. @@ -243,7 +248,7 @@ Method Descriptions .. rst-class:: classref-method -void **apply** **(** **)** +|void| **apply**\ (\ ) :ref:`🔗<class_SpinBox_method_apply>` Applies the current value of this **SpinBox**. @@ -255,7 +260,7 @@ Applies the current value of this **SpinBox**. .. rst-class:: classref-method -:ref:`LineEdit<class_LineEdit>` **get_line_edit** **(** **)** +:ref:`LineEdit<class_LineEdit>` **get_line_edit**\ (\ ) :ref:`🔗<class_SpinBox_method_get_line_edit>` Returns the :ref:`LineEdit<class_LineEdit>` instance from this **SpinBox**. You can use it to access properties and methods of :ref:`LineEdit<class_LineEdit>`. @@ -274,7 +279,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **updown** +:ref:`Texture2D<class_Texture2D>` **updown** :ref:`🔗<class_SpinBox_theme_icon_updown>` Sets a custom :ref:`Texture2D<class_Texture2D>` for up and down arrows of the **SpinBox**. @@ -285,3 +290,4 @@ Sets a custom :ref:`Texture2D<class_Texture2D>` for up and down arrows of the ** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_splitcontainer.rst b/classes/class_splitcontainer.rst index fda75fd3d4c..1871031539d 100644 --- a/classes/class_splitcontainer.rst +++ b/classes/class_splitcontainer.rst @@ -56,9 +56,9 @@ Methods .. table:: :widths: auto - +------+---------------------------------------------------------------------------------------+ - | void | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>` **(** **)** | - +------+---------------------------------------------------------------------------------------+ + +--------+---------------------------------------------------------------------------------+ + | |void| | :ref:`clamp_split_offset<class_SplitContainer_method_clamp_split_offset>`\ (\ ) | + +--------+---------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -75,6 +75,8 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`int<class_int>` | :ref:`separation<class_SplitContainer_theme_constant_separation>` | ``12`` | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_SplitContainer_theme_icon_grabber>` | | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` | | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>` | | @@ -93,7 +95,7 @@ Signals .. rst-class:: classref-signal -**dragged** **(** :ref:`int<class_int>` offset **)** +**dragged**\ (\ offset\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SplitContainer_signal_dragged>` Emitted when the dragger is dragged by user. @@ -110,7 +112,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DraggerVisibility**: +enum **DraggerVisibility**: :ref:`🔗<enum_SplitContainer_DraggerVisibility>` .. _class_SplitContainer_constant_DRAGGER_VISIBLE: @@ -149,12 +151,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collapsed** = ``false`` +:ref:`bool<class_bool>` **collapsed** = ``false`` :ref:`🔗<class_SplitContainer_property_collapsed>` .. rst-class:: classref-property-setget -- void **set_collapsed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collapsed** **(** **)** +- |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collapsed**\ (\ ) If ``true``, the area of the first :ref:`Control<class_Control>` will be collapsed and the dragger will be disabled. @@ -166,12 +168,12 @@ If ``true``, the area of the first :ref:`Control<class_Control>` will be collaps .. rst-class:: classref-property -:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility** = ``0`` +:ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **dragger_visibility** = ``0`` :ref:`🔗<class_SplitContainer_property_dragger_visibility>` .. rst-class:: classref-property-setget -- void **set_dragger_visibility** **(** :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` value **)** -- :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **get_dragger_visibility** **(** **)** +- |void| **set_dragger_visibility**\ (\ value\: :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>`\ ) +- :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` **get_dragger_visibility**\ (\ ) Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitContainer_DraggerVisibility>` for details. @@ -183,12 +185,12 @@ Determines the dragger's visibility. See :ref:`DraggerVisibility<enum_SplitConta .. rst-class:: classref-property -:ref:`int<class_int>` **split_offset** = ``0`` +:ref:`int<class_int>` **split_offset** = ``0`` :ref:`🔗<class_SplitContainer_property_split_offset>` .. rst-class:: classref-property-setget -- void **set_split_offset** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_split_offset** **(** **)** +- |void| **set_split_offset**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_split_offset**\ (\ ) The initial offset of the splitting between the two :ref:`Control<class_Control>`\ s, with ``0`` being at the end of the first :ref:`Control<class_Control>`. @@ -200,12 +202,12 @@ The initial offset of the splitting between the two :ref:`Control<class_Control> .. rst-class:: classref-property -:ref:`bool<class_bool>` **vertical** = ``false`` +:ref:`bool<class_bool>` **vertical** = ``false`` :ref:`🔗<class_SplitContainer_property_vertical>` .. rst-class:: classref-property-setget -- void **set_vertical** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_vertical** **(** **)** +- |void| **set_vertical**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_vertical**\ (\ ) If ``true``, the **SplitContainer** will arrange its children vertically, rather than horizontally. @@ -224,7 +226,7 @@ Method Descriptions .. rst-class:: classref-method -void **clamp_split_offset** **(** **)** +|void| **clamp_split_offset**\ (\ ) :ref:`🔗<class_SplitContainer_method_clamp_split_offset>` Clamps the :ref:`split_offset<class_SplitContainer_property_split_offset>` value to not go outside the currently possible minimal and maximum values. @@ -241,7 +243,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **autohide** = ``1`` +:ref:`int<class_int>` **autohide** = ``1`` :ref:`🔗<class_SplitContainer_theme_constant_autohide>` Boolean value. If 1 (``true``), the grabber will hide automatically when it isn't under the cursor. If 0 (``false``), it's always visible. @@ -253,7 +255,7 @@ Boolean value. If 1 (``true``), the grabber will hide automatically when it isn' .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **minimum_grab_thickness** = ``6`` +:ref:`int<class_int>` **minimum_grab_thickness** = ``6`` :ref:`🔗<class_SplitContainer_theme_constant_minimum_grab_thickness>` The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation<class_SplitContainer_theme_constant_separation>` or :ref:`h_grabber<class_SplitContainer_theme_icon_h_grabber>` / :ref:`v_grabber<class_SplitContainer_theme_icon_v_grabber>`'s thickness are too small, this ensure that the splitting line can still be dragged. @@ -265,7 +267,7 @@ The minimum thickness of the area users can click on to grab the splitting line. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **separation** = ``12`` +:ref:`int<class_int>` **separation** = ``12`` :ref:`🔗<class_SplitContainer_theme_constant_separation>` The space between sides of the container. @@ -273,11 +275,23 @@ The space between sides of the container. ---- +.. _class_SplitContainer_theme_icon_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **grabber** :ref:`🔗<class_SplitContainer_theme_icon_grabber>` + +The icon used for the grabber drawn in the middle area. + +.. rst-class:: classref-item-separator + +---- + .. _class_SplitContainer_theme_icon_h_grabber: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **h_grabber** +:ref:`Texture2D<class_Texture2D>` **h_grabber** :ref:`🔗<class_SplitContainer_theme_icon_h_grabber>` The icon used for the grabber drawn in the middle area when :ref:`vertical<class_SplitContainer_property_vertical>` is ``false``. @@ -289,7 +303,7 @@ The icon used for the grabber drawn in the middle area when :ref:`vertical<class .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **v_grabber** +:ref:`Texture2D<class_Texture2D>` **v_grabber** :ref:`🔗<class_SplitContainer_theme_icon_v_grabber>` The icon used for the grabber drawn in the middle area when :ref:`vertical<class_SplitContainer_property_vertical>` is ``true``. @@ -300,3 +314,4 @@ The icon used for the grabber drawn in the middle area when :ref:`vertical<class .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_spotlight3d.rst b/classes/class_spotlight3d.rst index 39e33de1a5b..5331d216028 100644 --- a/classes/class_spotlight3d.rst +++ b/classes/class_spotlight3d.rst @@ -32,7 +32,9 @@ Tutorials - :doc:`3D lights and shadows <../tutorials/3d/lights_and_shadows>` -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` + +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -69,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **spot_angle** = ``45.0`` +:ref:`float<class_float>` **spot_angle** = ``45.0`` :ref:`🔗<class_SpotLight3D_property_spot_angle>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) The spotlight's angle in degrees. @@ -88,12 +90,12 @@ The spotlight's angle in degrees. .. rst-class:: classref-property -:ref:`float<class_float>` **spot_angle_attenuation** = ``1.0`` +:ref:`float<class_float>` **spot_angle_attenuation** = ``1.0`` :ref:`🔗<class_SpotLight3D_property_spot_angle_attenuation>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) The spotlight's *angular* attenuation curve. See also :ref:`spot_attenuation<class_SpotLight3D_property_spot_attenuation>`. @@ -105,16 +107,20 @@ The spotlight's *angular* attenuation curve. See also :ref:`spot_attenuation<cla .. rst-class:: classref-property -:ref:`float<class_float>` **spot_attenuation** = ``1.0`` +:ref:`float<class_float>` **spot_attenuation** = ``1.0`` :ref:`🔗<class_SpotLight3D_property_spot_attenuation>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) + +Controls the distance attenuation function for spotlights. + +A value of ``0.0`` will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of ``2.0`` for physically accurate lights as it results in the proper inverse square attenutation. -The spotlight's light energy (drop-off) attenuation curve. A number of presets are available in the **Inspector** by right-clicking the curve. Zero and negative values are allowed but can produce unusual effects. See also :ref:`spot_angle_attenuation<class_SpotLight3D_property_spot_angle_attenuation>`. +\ **Note:** Setting attenuation to ``2.0`` or higher may result in distant objects receiving minimal light, even within range. For example, with a range of ``4096``, an object at ``100`` units is attenuated by a factor of ``0.0001``. With a default brightness of ``1``, the light would not be visible at that distance. -\ **Note:** Very high :ref:`spot_attenuation<class_SpotLight3D_property_spot_attenuation>` values (typically above 10) can impact performance negatively if the light is made to use a larger :ref:`spot_range<class_SpotLight3D_property_spot_range>` to compensate. This is because culling opportunities will become less common and shading costs will be increased (as the light will cover more pixels on screen while resulting in the same amount of brightness). To improve performance, use the lowest :ref:`spot_attenuation<class_SpotLight3D_property_spot_attenuation>` value possible for the visuals you're trying to achieve. +\ **Note:** Using negative or values higher than ``10.0`` may lead to unexpected results. .. rst-class:: classref-item-separator @@ -124,12 +130,12 @@ The spotlight's light energy (drop-off) attenuation curve. A number of presets a .. rst-class:: classref-property -:ref:`float<class_float>` **spot_range** = ``5.0`` +:ref:`float<class_float>` **spot_range** = ``5.0`` :ref:`🔗<class_SpotLight3D_property_spot_range>` .. rst-class:: classref-property-setget -- void **set_param** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_param** **(** **)** +- |void| **set_param**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_param**\ (\ ) The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the :ref:`spot_attenuation<class_SpotLight3D_property_spot_attenuation>` in use. No matter the :ref:`spot_attenuation<class_SpotLight3D_property_spot_attenuation>` in use, the light will never reach anything outside this range. @@ -142,3 +148,4 @@ The maximal range that can be reached by the spotlight. Note that the effectivel .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_springarm3d.rst b/classes/class_springarm3d.rst index f18921578a2..1c204ee4b81 100644 --- a/classes/class_springarm3d.rst +++ b/classes/class_springarm3d.rst @@ -19,7 +19,7 @@ A 3D raycast that dynamically moves its children near the collision point. Description ----------- -**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check. +**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check). .. rst-class:: classref-reftable-group @@ -47,15 +47,15 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_excluded_object<class_SpringArm3D_method_add_excluded_object>` **(** :ref:`RID<class_RID>` RID **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_excluded_objects<class_SpringArm3D_method_clear_excluded_objects>` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_hit_length<class_SpringArm3D_method_get_hit_length>` **(** **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`remove_excluded_object<class_SpringArm3D_method_remove_excluded_object>` **(** :ref:`RID<class_RID>` RID **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_excluded_object<class_SpringArm3D_method_add_excluded_object>`\ (\ RID\: :ref:`RID<class_RID>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_excluded_objects<class_SpringArm3D_method_clear_excluded_objects>`\ (\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_hit_length<class_SpringArm3D_method_get_hit_length>`\ (\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`remove_excluded_object<class_SpringArm3D_method_remove_excluded_object>`\ (\ RID\: :ref:`RID<class_RID>`\ ) | + +---------------------------+-------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,12 +70,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **collision_mask** = ``1`` +:ref:`int<class_int>` **collision_mask** = ``1`` :ref:`🔗<class_SpringArm3D_property_collision_mask>` .. rst-class:: classref-property-setget -- void **set_collision_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_collision_mask** **(** **)** +- |void| **set_collision_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_collision_mask**\ (\ ) The layers against which the collision check shall be done. See `Collision layers and masks <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__ in the documentation for more information. @@ -87,12 +87,12 @@ The layers against which the collision check shall be done. See `Collision layer .. rst-class:: classref-property -:ref:`float<class_float>` **margin** = ``0.01`` +:ref:`float<class_float>` **margin** = ``0.01`` :ref:`🔗<class_SpringArm3D_property_margin>` .. rst-class:: classref-property-setget -- void **set_margin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_margin** **(** **)** +- |void| **set_margin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_margin**\ (\ ) When the collision check is made, a candidate length for the SpringArm3D is given. @@ -108,12 +108,12 @@ This margin is useful for when the SpringArm3D has a :ref:`Camera3D<class_Camera .. rst-class:: classref-property -:ref:`Shape3D<class_Shape3D>` **shape** +:ref:`Shape3D<class_Shape3D>` **shape** :ref:`🔗<class_SpringArm3D_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape3D<class_Shape3D>` value **)** -- :ref:`Shape3D<class_Shape3D>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape3D<class_Shape3D>`\ ) +- :ref:`Shape3D<class_Shape3D>` **get_shape**\ (\ ) The :ref:`Shape3D<class_Shape3D>` to use for the SpringArm3D. @@ -127,12 +127,12 @@ When the shape is set, the SpringArm3D will cast the :ref:`Shape3D<class_Shape3D .. rst-class:: classref-property -:ref:`float<class_float>` **spring_length** = ``1.0`` +:ref:`float<class_float>` **spring_length** = ``1.0`` :ref:`🔗<class_SpringArm3D_property_spring_length>` .. rst-class:: classref-property-setget -- void **set_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_length** **(** **)** +- |void| **set_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_length**\ (\ ) The maximum extent of the SpringArm3D. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm3D's child nodes. @@ -151,7 +151,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_excluded_object** **(** :ref:`RID<class_RID>` RID **)** +|void| **add_excluded_object**\ (\ RID\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_SpringArm3D_method_add_excluded_object>` Adds the :ref:`PhysicsBody3D<class_PhysicsBody3D>` object with the given :ref:`RID<class_RID>` to the list of :ref:`PhysicsBody3D<class_PhysicsBody3D>` objects excluded from the collision check. @@ -163,7 +163,7 @@ Adds the :ref:`PhysicsBody3D<class_PhysicsBody3D>` object with the given :ref:`R .. rst-class:: classref-method -void **clear_excluded_objects** **(** **)** +|void| **clear_excluded_objects**\ (\ ) :ref:`🔗<class_SpringArm3D_method_clear_excluded_objects>` Clears the list of :ref:`PhysicsBody3D<class_PhysicsBody3D>` objects excluded from the collision check. @@ -175,7 +175,7 @@ Clears the list of :ref:`PhysicsBody3D<class_PhysicsBody3D>` objects excluded fr .. rst-class:: classref-method -:ref:`float<class_float>` **get_hit_length** **(** **)** +:ref:`float<class_float>` **get_hit_length**\ (\ ) :ref:`🔗<class_SpringArm3D_method_get_hit_length>` Returns the spring arm's current length. @@ -187,7 +187,7 @@ Returns the spring arm's current length. .. rst-class:: classref-method -:ref:`bool<class_bool>` **remove_excluded_object** **(** :ref:`RID<class_RID>` RID **)** +:ref:`bool<class_bool>` **remove_excluded_object**\ (\ RID\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_SpringArm3D_method_remove_excluded_object>` Removes the given :ref:`RID<class_RID>` from the list of :ref:`PhysicsBody3D<class_PhysicsBody3D>` objects excluded from the collision check. @@ -198,3 +198,4 @@ Removes the given :ref:`RID<class_RID>` from the list of :ref:`PhysicsBody3D<cla .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sprite2d.rst b/classes/class_sprite2d.rst index 51bced63328..4040bce9faa 100644 --- a/classes/class_sprite2d.rst +++ b/classes/class_sprite2d.rst @@ -26,7 +26,7 @@ A node that displays a 2D texture. The texture displayed can be a region from a Tutorials --------- -- `Instancing Demo <https://godotengine.org/asset-library/asset/148>`__ +- `Instancing Demo <https://godotengine.org/asset-library/asset/2716>`__ .. rst-class:: classref-reftable-group @@ -70,11 +70,11 @@ Methods .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_Sprite2D_method_get_rect>` **(** **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_pixel_opaque<class_Sprite2D_method_is_pixel_opaque>` **(** :ref:`Vector2<class_Vector2>` pos **)** |const| | - +---------------------------+---------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_Sprite2D_method_get_rect>`\ (\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_pixel_opaque<class_Sprite2D_method_is_pixel_opaque>`\ (\ pos\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -89,7 +89,7 @@ Signals .. rst-class:: classref-signal -**frame_changed** **(** **)** +**frame_changed**\ (\ ) :ref:`🔗<class_Sprite2D_signal_frame_changed>` Emitted when the :ref:`frame<class_Sprite2D_property_frame>` changes. @@ -101,7 +101,7 @@ Emitted when the :ref:`frame<class_Sprite2D_property_frame>` changes. .. rst-class:: classref-signal -**texture_changed** **(** **)** +**texture_changed**\ (\ ) :ref:`🔗<class_Sprite2D_signal_texture_changed>` Emitted when the :ref:`texture<class_Sprite2D_property_texture>` changes. @@ -118,15 +118,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **centered** = ``true`` +:ref:`bool<class_bool>` **centered** = ``true`` :ref:`🔗<class_Sprite2D_property_centered>` .. rst-class:: classref-property-setget -- void **set_centered** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_centered** **(** **)** +- |void| **set_centered**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_centered**\ (\ ) If ``true``, texture is centered. +\ **Note:** For games with a pixel art aesthetic, textures may appear deformed when centered. This is caused by their position being between pixels. To prevent this, set this property to ``false``, or consider enabling :ref:`ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_vertices_to_pixel>` and :ref:`ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel<class_ProjectSettings_property_rendering/2d/snap/snap_2d_transforms_to_pixel>`. + .. rst-class:: classref-item-separator ---- @@ -135,12 +137,12 @@ If ``true``, texture is centered. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_h** = ``false`` +:ref:`bool<class_bool>` **flip_h** = ``false`` :ref:`🔗<class_Sprite2D_property_flip_h>` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_h**\ (\ ) If ``true``, texture is flipped horizontally. @@ -152,12 +154,12 @@ If ``true``, texture is flipped horizontally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_v** = ``false`` +:ref:`bool<class_bool>` **flip_v** = ``false`` :ref:`🔗<class_Sprite2D_property_flip_v>` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_v**\ (\ ) If ``true``, texture is flipped vertically. @@ -169,14 +171,14 @@ If ``true``, texture is flipped vertically. .. rst-class:: classref-property -:ref:`int<class_int>` **frame** = ``0`` +:ref:`int<class_int>` **frame** = ``0`` :ref:`🔗<class_Sprite2D_property_frame>` .. rst-class:: classref-property-setget -- void **set_frame** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_frame** **(** **)** +- |void| **set_frame**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_frame**\ (\ ) -Current frame to display from sprite sheet. :ref:`hframes<class_Sprite2D_property_hframes>` or :ref:`vframes<class_Sprite2D_property_vframes>` must be greater than 1. +Current frame to display from sprite sheet. :ref:`hframes<class_Sprite2D_property_hframes>` or :ref:`vframes<class_Sprite2D_property_vframes>` must be greater than 1. This property is automatically adjusted when :ref:`hframes<class_Sprite2D_property_hframes>` or :ref:`vframes<class_Sprite2D_property_vframes>` are changed to keep pointing to the same visual frame (same column and row). If that's impossible, this value is reset to ``0``. .. rst-class:: classref-item-separator @@ -186,12 +188,12 @@ Current frame to display from sprite sheet. :ref:`hframes<class_Sprite2D_propert .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **frame_coords** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **frame_coords** = ``Vector2i(0, 0)`` :ref:`🔗<class_Sprite2D_property_frame_coords>` .. rst-class:: classref-property-setget -- void **set_frame_coords** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_frame_coords** **(** **)** +- |void| **set_frame_coords**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_frame_coords**\ (\ ) Coordinates of the frame to display from sprite sheet. This is as an alias for the :ref:`frame<class_Sprite2D_property_frame>` property. :ref:`hframes<class_Sprite2D_property_hframes>` or :ref:`vframes<class_Sprite2D_property_vframes>` must be greater than 1. @@ -203,14 +205,14 @@ Coordinates of the frame to display from sprite sheet. This is as an alias for t .. rst-class:: classref-property -:ref:`int<class_int>` **hframes** = ``1`` +:ref:`int<class_int>` **hframes** = ``1`` :ref:`🔗<class_Sprite2D_property_hframes>` .. rst-class:: classref-property-setget -- void **set_hframes** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_hframes** **(** **)** +- |void| **set_hframes**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_hframes**\ (\ ) -The number of columns in the sprite sheet. +The number of columns in the sprite sheet. When this property is changed, :ref:`frame<class_Sprite2D_property_frame>` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame<class_Sprite2D_property_frame>` is reset to ``0``. .. rst-class:: classref-item-separator @@ -220,12 +222,12 @@ The number of columns in the sprite sheet. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_Sprite2D_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) The texture's drawing offset. @@ -237,12 +239,12 @@ The texture's drawing offset. .. rst-class:: classref-property -:ref:`bool<class_bool>` **region_enabled** = ``false`` +:ref:`bool<class_bool>` **region_enabled** = ``false`` :ref:`🔗<class_Sprite2D_property_region_enabled>` .. rst-class:: classref-property-setget -- void **set_region_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_region_enabled** **(** **)** +- |void| **set_region_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_region_enabled**\ (\ ) If ``true``, texture is cut from a larger atlas texture. See :ref:`region_rect<class_Sprite2D_property_region_rect>`. @@ -254,12 +256,12 @@ If ``true``, texture is cut from a larger atlas texture. See :ref:`region_rect<c .. rst-class:: classref-property -:ref:`bool<class_bool>` **region_filter_clip_enabled** = ``false`` +:ref:`bool<class_bool>` **region_filter_clip_enabled** = ``false`` :ref:`🔗<class_Sprite2D_property_region_filter_clip_enabled>` .. rst-class:: classref-property-setget -- void **set_region_filter_clip_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_region_filter_clip_enabled** **(** **)** +- |void| **set_region_filter_clip_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_region_filter_clip_enabled**\ (\ ) If ``true``, the outermost pixels get blurred out. :ref:`region_enabled<class_Sprite2D_property_region_enabled>` must be ``true``. @@ -271,12 +273,12 @@ If ``true``, the outermost pixels get blurred out. :ref:`region_enabled<class_Sp .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗<class_Sprite2D_property_region_rect>` .. rst-class:: classref-property-setget -- void **set_region_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_region_rect** **(** **)** +- |void| **set_region_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_region_rect**\ (\ ) The region of the atlas texture to display. :ref:`region_enabled<class_Sprite2D_property_region_enabled>` must be ``true``. @@ -288,12 +290,12 @@ The region of the atlas texture to display. :ref:`region_enabled<class_Sprite2D_ .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_Sprite2D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` object to draw. @@ -305,14 +307,14 @@ The region of the atlas texture to display. :ref:`region_enabled<class_Sprite2D_ .. rst-class:: classref-property -:ref:`int<class_int>` **vframes** = ``1`` +:ref:`int<class_int>` **vframes** = ``1`` :ref:`🔗<class_Sprite2D_property_vframes>` .. rst-class:: classref-property-setget -- void **set_vframes** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_vframes** **(** **)** +- |void| **set_vframes**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_vframes**\ (\ ) -The number of rows in the sprite sheet. +The number of rows in the sprite sheet. When this property is changed, :ref:`frame<class_Sprite2D_property_frame>` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame<class_Sprite2D_property_frame>` is reset to ``0``. .. rst-class:: classref-section-separator @@ -327,7 +329,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_rect**\ (\ ) |const| :ref:`🔗<class_Sprite2D_method_get_rect>` Returns a :ref:`Rect2<class_Rect2>` representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. @@ -369,9 +371,9 @@ Returns a :ref:`Rect2<class_Rect2>` representing the Sprite2D's boundary in loca .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_pixel_opaque** **(** :ref:`Vector2<class_Vector2>` pos **)** |const| +:ref:`bool<class_bool>` **is_pixel_opaque**\ (\ pos\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Sprite2D_method_is_pixel_opaque>` -Returns ``true``, if the pixel at the given position is opaque and ``false`` in other case. +Returns ``true``, if the pixel at the given position is opaque and ``false`` in other case. The position is in local coordinates. \ **Note:** It also returns ``false``, if the sprite's texture is ``null`` or if the given position is invalid. @@ -382,3 +384,4 @@ Returns ``true``, if the pixel at the given position is opaque and ``false`` in .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_sprite3d.rst b/classes/class_sprite3d.rst index 42adf56d105..30972f22d09 100644 --- a/classes/class_sprite3d.rst +++ b/classes/class_sprite3d.rst @@ -58,7 +58,7 @@ Signals .. rst-class:: classref-signal -**frame_changed** **(** **)** +**frame_changed**\ (\ ) :ref:`🔗<class_Sprite3D_signal_frame_changed>` Emitted when the :ref:`frame<class_Sprite3D_property_frame>` changes. @@ -70,7 +70,7 @@ Emitted when the :ref:`frame<class_Sprite3D_property_frame>` changes. .. rst-class:: classref-signal -**texture_changed** **(** **)** +**texture_changed**\ (\ ) :ref:`🔗<class_Sprite3D_signal_texture_changed>` Emitted when the :ref:`texture<class_Sprite3D_property_texture>` changes. @@ -87,14 +87,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **frame** = ``0`` +:ref:`int<class_int>` **frame** = ``0`` :ref:`🔗<class_Sprite3D_property_frame>` .. rst-class:: classref-property-setget -- void **set_frame** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_frame** **(** **)** +- |void| **set_frame**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_frame**\ (\ ) -Current frame to display from sprite sheet. :ref:`hframes<class_Sprite3D_property_hframes>` or :ref:`vframes<class_Sprite3D_property_vframes>` must be greater than 1. +Current frame to display from sprite sheet. :ref:`hframes<class_Sprite3D_property_hframes>` or :ref:`vframes<class_Sprite3D_property_vframes>` must be greater than 1. This property is automatically adjusted when :ref:`hframes<class_Sprite3D_property_hframes>` or :ref:`vframes<class_Sprite3D_property_vframes>` are changed to keep pointing to the same visual frame (same column and row). If that's impossible, this value is reset to ``0``. .. rst-class:: classref-item-separator @@ -104,12 +104,12 @@ Current frame to display from sprite sheet. :ref:`hframes<class_Sprite3D_propert .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **frame_coords** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **frame_coords** = ``Vector2i(0, 0)`` :ref:`🔗<class_Sprite3D_property_frame_coords>` .. rst-class:: classref-property-setget -- void **set_frame_coords** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_frame_coords** **(** **)** +- |void| **set_frame_coords**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_frame_coords**\ (\ ) Coordinates of the frame to display from sprite sheet. This is as an alias for the :ref:`frame<class_Sprite3D_property_frame>` property. :ref:`hframes<class_Sprite3D_property_hframes>` or :ref:`vframes<class_Sprite3D_property_vframes>` must be greater than 1. @@ -121,14 +121,14 @@ Coordinates of the frame to display from sprite sheet. This is as an alias for t .. rst-class:: classref-property -:ref:`int<class_int>` **hframes** = ``1`` +:ref:`int<class_int>` **hframes** = ``1`` :ref:`🔗<class_Sprite3D_property_hframes>` .. rst-class:: classref-property-setget -- void **set_hframes** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_hframes** **(** **)** +- |void| **set_hframes**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_hframes**\ (\ ) -The number of columns in the sprite sheet. +The number of columns in the sprite sheet. When this property is changed, :ref:`frame<class_Sprite3D_property_frame>` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame<class_Sprite3D_property_frame>` is reset to ``0``. .. rst-class:: classref-item-separator @@ -138,12 +138,12 @@ The number of columns in the sprite sheet. .. rst-class:: classref-property -:ref:`bool<class_bool>` **region_enabled** = ``false`` +:ref:`bool<class_bool>` **region_enabled** = ``false`` :ref:`🔗<class_Sprite3D_property_region_enabled>` .. rst-class:: classref-property-setget -- void **set_region_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_region_enabled** **(** **)** +- |void| **set_region_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_region_enabled**\ (\ ) If ``true``, the sprite will use :ref:`region_rect<class_Sprite3D_property_region_rect>` and display only the specified part of its texture. @@ -155,12 +155,12 @@ If ``true``, the sprite will use :ref:`region_rect<class_Sprite3D_property_regio .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗<class_Sprite3D_property_region_rect>` .. rst-class:: classref-property-setget -- void **set_region_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_region_rect** **(** **)** +- |void| **set_region_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_region_rect**\ (\ ) The region of the atlas texture to display. :ref:`region_enabled<class_Sprite3D_property_region_enabled>` must be ``true``. @@ -172,12 +172,12 @@ The region of the atlas texture to display. :ref:`region_enabled<class_Sprite3D_ .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_Sprite3D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` object to draw. If :ref:`GeometryInstance3D.material_override<class_GeometryInstance3D_property_material_override>` is used, this will be overridden. The size information is still used. @@ -189,14 +189,14 @@ The region of the atlas texture to display. :ref:`region_enabled<class_Sprite3D_ .. rst-class:: classref-property -:ref:`int<class_int>` **vframes** = ``1`` +:ref:`int<class_int>` **vframes** = ``1`` :ref:`🔗<class_Sprite3D_property_vframes>` .. rst-class:: classref-property-setget -- void **set_vframes** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_vframes** **(** **)** +- |void| **set_vframes**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_vframes**\ (\ ) -The number of rows in the sprite sheet. +The number of rows in the sprite sheet. When this property is changed, :ref:`frame<class_Sprite3D_property_frame>` is adjusted so that the same visual frame is maintained (same row and column). If that's impossible, :ref:`frame<class_Sprite3D_property_frame>` is reset to ``0``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -205,3 +205,4 @@ The number of rows in the sprite sheet. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_spritebase3d.rst b/classes/class_spritebase3d.rst index 459f08751c2..ff686ec8032 100644 --- a/classes/class_spritebase3d.rst +++ b/classes/class_spritebase3d.rst @@ -81,15 +81,15 @@ Methods .. table:: :widths: auto - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_SpriteBase3D_method_generate_triangle_mesh>` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_SpriteBase3D_method_get_draw_flag>` **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_SpriteBase3D_method_get_item_rect>` **(** **)** |const| | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_draw_flag<class_SpriteBase3D_method_set_draw_flag>` **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh<class_TriangleMesh>` | :ref:`generate_triangle_mesh<class_SpriteBase3D_method_generate_triangle_mesh>`\ (\ ) |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_draw_flag<class_SpriteBase3D_method_get_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_item_rect<class_SpriteBase3D_method_get_item_rect>`\ (\ ) |const| | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_draw_flag<class_SpriteBase3D_method_set_draw_flag>`\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -104,7 +104,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DrawFlags**: +enum **DrawFlags**: :ref:`🔗<enum_SpriteBase3D_DrawFlags>` .. _class_SpriteBase3D_constant_FLAG_TRANSPARENT: @@ -162,7 +162,7 @@ Represents the size of the :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` enum. .. rst-class:: classref-enumeration -enum **AlphaCutMode**: +enum **AlphaCutMode**: :ref:`🔗<enum_SpriteBase3D_AlphaCutMode>` .. _class_SpriteBase3D_constant_ALPHA_CUT_DISABLED: @@ -209,12 +209,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` +:ref:`float<class_float>` **alpha_antialiasing_edge** = ``0.0`` :ref:`🔗<class_SpriteBase3D_property_alpha_antialiasing_edge>` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing_edge** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_antialiasing_edge** **(** **)** +- |void| **set_alpha_antialiasing_edge**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_antialiasing_edge**\ (\ ) Threshold at which antialiasing will be applied on the alpha channel. @@ -226,12 +226,12 @@ Threshold at which antialiasing will be applied on the alpha channel. .. rst-class:: classref-property -:ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` +:ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **alpha_antialiasing_mode** = ``0`` :ref:`🔗<class_SpriteBase3D_property_alpha_antialiasing_mode>` .. rst-class:: classref-property-setget -- void **set_alpha_antialiasing** **(** :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` value **)** -- :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing** **(** **)** +- |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`\ ) +- :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>` **get_alpha_antialiasing**\ (\ ) The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMaterial3D_AlphaAntiAliasing>`. @@ -243,12 +243,12 @@ The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing<enum_BaseMa .. rst-class:: classref-property -:ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` **alpha_cut** = ``0`` +:ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` **alpha_cut** = ``0`` :ref:`🔗<class_SpriteBase3D_property_alpha_cut>` .. rst-class:: classref-property-setget -- void **set_alpha_cut_mode** **(** :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` value **)** -- :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` **get_alpha_cut_mode** **(** **)** +- |void| **set_alpha_cut_mode**\ (\ value\: :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>`\ ) +- :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` **get_alpha_cut_mode**\ (\ ) The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_SpriteBase3D_AlphaCutMode>` for possible values. @@ -260,12 +260,12 @@ The alpha cutting mode to use for the sprite. See :ref:`AlphaCutMode<enum_Sprite .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` +:ref:`float<class_float>` **alpha_hash_scale** = ``1.0`` :ref:`🔗<class_SpriteBase3D_property_alpha_hash_scale>` .. rst-class:: classref-property-setget -- void **set_alpha_hash_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_hash_scale** **(** **)** +- |void| **set_alpha_hash_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_hash_scale**\ (\ ) The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. @@ -277,12 +277,12 @@ The hashing scale for Alpha Hash. Recommended values between ``0`` and ``2``. .. rst-class:: classref-property -:ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` +:ref:`float<class_float>` **alpha_scissor_threshold** = ``0.5`` :ref:`🔗<class_SpriteBase3D_property_alpha_scissor_threshold>` .. rst-class:: classref-property-setget -- void **set_alpha_scissor_threshold** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_alpha_scissor_threshold** **(** **)** +- |void| **set_alpha_scissor_threshold**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_alpha_scissor_threshold**\ (\ ) Threshold at which the alpha scissor will discard values. @@ -294,12 +294,12 @@ Threshold at which the alpha scissor will discard values. .. rst-class:: classref-property -Vector3.Axis **axis** = ``2`` +Vector3.Axis **axis** = ``2`` :ref:`🔗<class_SpriteBase3D_property_axis>` .. rst-class:: classref-property-setget -- void **set_axis** **(** Vector3.Axis value **)** -- Vector3.Axis **get_axis** **(** **)** +- |void| **set_axis**\ (\ value\: Vector3.Axis\ ) +- Vector3.Axis **get_axis**\ (\ ) The direction in which the front of the texture faces. @@ -311,15 +311,17 @@ The direction in which the front of the texture faces. .. rst-class:: classref-property -:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` +:ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **billboard** = ``0`` :ref:`🔗<class_SpriteBase3D_property_billboard>` .. rst-class:: classref-property-setget -- void **set_billboard_mode** **(** :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` value **)** -- :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode** **(** **)** +- |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>`\ ) +- :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` **get_billboard_mode**\ (\ ) The billboard mode to use for the sprite. See :ref:`BillboardMode<enum_BaseMaterial3D_BillboardMode>` for possible values. +\ **Note:** When billboarding is enabled and the material also casts shadows, billboards will face **the** camera in the scene when rendering shadows. In scenes with multiple cameras, the intended shadow cannot be determined and this will result in undefined behavior. See `GitHub Pull Request #72638 <https://github.com/godotengine/godot/pull/72638>`__ for details. + .. rst-class:: classref-item-separator ---- @@ -328,12 +330,12 @@ The billboard mode to use for the sprite. See :ref:`BillboardMode<enum_BaseMater .. rst-class:: classref-property -:ref:`bool<class_bool>` **centered** = ``true`` +:ref:`bool<class_bool>` **centered** = ``true`` :ref:`🔗<class_SpriteBase3D_property_centered>` .. rst-class:: classref-property-setget -- void **set_centered** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_centered** **(** **)** +- |void| **set_centered**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_centered**\ (\ ) If ``true``, texture will be centered. @@ -345,12 +347,12 @@ If ``true``, texture will be centered. .. rst-class:: classref-property -:ref:`bool<class_bool>` **double_sided** = ``true`` +:ref:`bool<class_bool>` **double_sided** = ``true`` :ref:`🔗<class_SpriteBase3D_property_double_sided>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| If ``true``, texture can be seen from the back as well, if ``false``, it is invisible when looking at it from behind. @@ -362,12 +364,12 @@ If ``true``, texture can be seen from the back as well, if ``false``, it is invi .. rst-class:: classref-property -:ref:`bool<class_bool>` **fixed_size** = ``false`` +:ref:`bool<class_bool>` **fixed_size** = ``false`` :ref:`🔗<class_SpriteBase3D_property_fixed_size>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| If ``true``, the label is rendered at the same size regardless of distance. @@ -379,12 +381,12 @@ If ``true``, the label is rendered at the same size regardless of distance. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_h** = ``false`` +:ref:`bool<class_bool>` **flip_h** = ``false`` :ref:`🔗<class_SpriteBase3D_property_flip_h>` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_h**\ (\ ) If ``true``, texture is flipped horizontally. @@ -396,12 +398,12 @@ If ``true``, texture is flipped horizontally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_v** = ``false`` +:ref:`bool<class_bool>` **flip_v** = ``false`` :ref:`🔗<class_SpriteBase3D_property_flip_v>` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_v**\ (\ ) If ``true``, texture is flipped vertically. @@ -413,14 +415,16 @@ If ``true``, texture is flipped vertically. .. rst-class:: classref-property -:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_SpriteBase3D_property_modulate>` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_modulate**\ (\ ) + +A color value used to *multiply* the texture's colors. Can be used for mood-coloring or to simulate the color of ambient light. -A color value used to *multiply* the texture's colors. Can be used for mood-coloring or to simulate the color of light. +\ **Note:** Unlike :ref:`CanvasItem.modulate<class_CanvasItem_property_modulate>` for 2D, colors with values above ``1.0`` (overbright) are not supported. \ **Note:** If a :ref:`GeometryInstance3D.material_override<class_GeometryInstance3D_property_material_override>` is defined on the **SpriteBase3D**, the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in :ref:`modulate<class_SpriteBase3D_property_modulate>` will be ignored. For a :ref:`BaseMaterial3D<class_BaseMaterial3D>`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo<class_BaseMaterial3D_property_vertex_color_use_as_albedo>` must be ``true``. For a :ref:`ShaderMaterial<class_ShaderMaterial>`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. @@ -432,12 +436,12 @@ A color value used to *multiply* the texture's colors. Can be used for mood-colo .. rst-class:: classref-property -:ref:`bool<class_bool>` **no_depth_test** = ``false`` +:ref:`bool<class_bool>` **no_depth_test** = ``false`` :ref:`🔗<class_SpriteBase3D_property_no_depth_test>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| If ``true``, depth testing is disabled and the object will be drawn in render order. @@ -449,12 +453,12 @@ If ``true``, depth testing is disabled and the object will be drawn in render or .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_SpriteBase3D_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) The texture's drawing offset. @@ -466,12 +470,12 @@ The texture's drawing offset. .. rst-class:: classref-property -:ref:`float<class_float>` **pixel_size** = ``0.01`` +:ref:`float<class_float>` **pixel_size** = ``0.01`` :ref:`🔗<class_SpriteBase3D_property_pixel_size>` .. rst-class:: classref-property-setget -- void **set_pixel_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pixel_size** **(** **)** +- |void| **set_pixel_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pixel_size**\ (\ ) The size of one pixel's width on the sprite to scale it in 3D. @@ -483,12 +487,12 @@ The size of one pixel's width on the sprite to scale it in 3D. .. rst-class:: classref-property -:ref:`int<class_int>` **render_priority** = ``0`` +:ref:`int<class_int>` **render_priority** = ``0`` :ref:`🔗<class_SpriteBase3D_property_render_priority>` .. rst-class:: classref-property-setget -- void **set_render_priority** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_render_priority** **(** **)** +- |void| **set_render_priority**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_render_priority**\ (\ ) Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects. @@ -504,12 +508,12 @@ Sets the render priority for the sprite. Higher priority objects will be sorted .. rst-class:: classref-property -:ref:`bool<class_bool>` **shaded** = ``false`` +:ref:`bool<class_bool>` **shaded** = ``false`` :ref:`🔗<class_SpriteBase3D_property_shaded>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_Environment>` has effects on the sprite. @@ -521,15 +525,17 @@ If ``true``, the :ref:`Light3D<class_Light3D>` in the :ref:`Environment<class_En .. rst-class:: classref-property -:ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` +:ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **texture_filter** = ``3`` :ref:`🔗<class_SpriteBase3D_property_texture_filter>` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` value **)** -- :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>`\ ) +- :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` **get_texture_filter**\ (\ ) Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_TextureFilter>` for options. +\ **Note:** Linear filtering may cause artifacts around the edges, which are especially noticeable on opaque textures. To prevent this, use textures with transparent or identical colors around the edges. + .. rst-class:: classref-item-separator ---- @@ -538,12 +544,12 @@ Filter flags for the texture. See :ref:`TextureFilter<enum_BaseMaterial3D_Textur .. rst-class:: classref-property -:ref:`bool<class_bool>` **transparent** = ``true`` +:ref:`bool<class_bool>` **transparent** = ``true`` :ref:`🔗<class_SpriteBase3D_property_transparent>` .. rst-class:: classref-property-setget -- void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +- |void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| If ``true``, the texture's transparency and the opacity are used to make those parts of the sprite invisible. @@ -560,7 +566,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh** **(** **)** |const| +:ref:`TriangleMesh<class_TriangleMesh>` **generate_triangle_mesh**\ (\ ) |const| :ref:`🔗<class_SpriteBase3D_method_generate_triangle_mesh>` Returns a :ref:`TriangleMesh<class_TriangleMesh>` with the sprite's vertices following its current configuration (such as its :ref:`axis<class_SpriteBase3D_property_axis>` and :ref:`pixel_size<class_SpriteBase3D_property_pixel_size>`). @@ -572,7 +578,7 @@ Returns a :ref:`TriangleMesh<class_TriangleMesh>` with the sprite's vertices fol .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag **)** |const| +:ref:`bool<class_bool>` **get_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`\ ) |const| :ref:`🔗<class_SpriteBase3D_method_get_draw_flag>` Returns the value of the specified flag. @@ -584,7 +590,7 @@ Returns the value of the specified flag. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_item_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_item_rect**\ (\ ) |const| :ref:`🔗<class_SpriteBase3D_method_get_item_rect>` Returns the rectangle representing this sprite. @@ -596,7 +602,7 @@ Returns the rectangle representing this sprite. .. rst-class:: classref-method -void **set_draw_flag** **(** :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **set_draw_flag**\ (\ flag\: :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SpriteBase3D_method_set_draw_flag>` If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_SpriteBase3D_DrawFlags>` for a list of flags. @@ -607,3 +613,4 @@ If ``true``, the specified flag will be enabled. See :ref:`DrawFlags<enum_Sprite .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_spriteframes.rst b/classes/class_spriteframes.rst index a0c81ad686a..86e11ef0a13 100644 --- a/classes/class_spriteframes.rst +++ b/classes/class_spriteframes.rst @@ -29,41 +29,41 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_animation<class_SpriteFrames_method_add_animation>` **(** :ref:`StringName<class_StringName>` anim **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_frame<class_SpriteFrames_method_add_frame>` **(** :ref:`StringName<class_StringName>` anim, :ref:`Texture2D<class_Texture2D>` texture, :ref:`float<class_float>` duration=1.0, :ref:`int<class_int>` at_position=-1 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_SpriteFrames_method_clear>` **(** :ref:`StringName<class_StringName>` anim **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_all<class_SpriteFrames_method_clear_all>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_animation_loop<class_SpriteFrames_method_get_animation_loop>` **(** :ref:`StringName<class_StringName>` anim **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_names<class_SpriteFrames_method_get_animation_names>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_animation_speed<class_SpriteFrames_method_get_animation_speed>` **(** :ref:`StringName<class_StringName>` anim **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_frame_count<class_SpriteFrames_method_get_frame_count>` **(** :ref:`StringName<class_StringName>` anim **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_frame_duration<class_SpriteFrames_method_get_frame_duration>` **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_frame_texture<class_SpriteFrames_method_get_frame_texture>` **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_animation<class_SpriteFrames_method_has_animation>` **(** :ref:`StringName<class_StringName>` anim **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_animation<class_SpriteFrames_method_remove_animation>` **(** :ref:`StringName<class_StringName>` anim **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_frame<class_SpriteFrames_method_remove_frame>` **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_animation<class_SpriteFrames_method_rename_animation>` **(** :ref:`StringName<class_StringName>` anim, :ref:`StringName<class_StringName>` newname **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_animation_loop<class_SpriteFrames_method_set_animation_loop>` **(** :ref:`StringName<class_StringName>` anim, :ref:`bool<class_bool>` loop **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_animation_speed<class_SpriteFrames_method_set_animation_speed>` **(** :ref:`StringName<class_StringName>` anim, :ref:`float<class_float>` fps **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_frame<class_SpriteFrames_method_set_frame>` **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture, :ref:`float<class_float>` duration=1.0 **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_animation<class_SpriteFrames_method_add_animation>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_frame<class_SpriteFrames_method_add_frame>`\ (\ anim\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`, duration\: :ref:`float<class_float>` = 1.0, at_position\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_SpriteFrames_method_clear>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_all<class_SpriteFrames_method_clear_all>`\ (\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_animation_loop<class_SpriteFrames_method_get_animation_loop>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_names<class_SpriteFrames_method_get_animation_names>`\ (\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_animation_speed<class_SpriteFrames_method_get_animation_speed>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_frame_count<class_SpriteFrames_method_get_frame_count>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_frame_duration<class_SpriteFrames_method_get_frame_duration>`\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_frame_texture<class_SpriteFrames_method_get_frame_texture>`\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_animation<class_SpriteFrames_method_has_animation>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_animation<class_SpriteFrames_method_remove_animation>`\ (\ anim\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_frame<class_SpriteFrames_method_remove_frame>`\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_animation<class_SpriteFrames_method_rename_animation>`\ (\ anim\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animation_loop<class_SpriteFrames_method_set_animation_loop>`\ (\ anim\: :ref:`StringName<class_StringName>`, loop\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_animation_speed<class_SpriteFrames_method_set_animation_speed>`\ (\ anim\: :ref:`StringName<class_StringName>`, fps\: :ref:`float<class_float>`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame<class_SpriteFrames_method_set_frame>`\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`, duration\: :ref:`float<class_float>` = 1.0\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,7 +78,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_animation** **(** :ref:`StringName<class_StringName>` anim **)** +|void| **add_animation**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SpriteFrames_method_add_animation>` Adds a new ``anim`` animation to the library. @@ -90,9 +90,9 @@ Adds a new ``anim`` animation to the library. .. rst-class:: classref-method -void **add_frame** **(** :ref:`StringName<class_StringName>` anim, :ref:`Texture2D<class_Texture2D>` texture, :ref:`float<class_float>` duration=1.0, :ref:`int<class_int>` at_position=-1 **)** +|void| **add_frame**\ (\ anim\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`, duration\: :ref:`float<class_float>` = 1.0, at_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_SpriteFrames_method_add_frame>` -Adds a frame to the ``anim`` animation. If ``at_position`` is ``-1``, the frame will be added to the end of the animation. +Adds a frame to the ``anim`` animation. If ``at_position`` is ``-1``, the frame will be added to the end of the animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration<class_SpriteFrames_method_get_frame_duration>` for details. .. rst-class:: classref-item-separator @@ -102,7 +102,7 @@ Adds a frame to the ``anim`` animation. If ``at_position`` is ``-1``, the frame .. rst-class:: classref-method -void **clear** **(** :ref:`StringName<class_StringName>` anim **)** +|void| **clear**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SpriteFrames_method_clear>` Removes all frames from the ``anim`` animation. @@ -114,7 +114,7 @@ Removes all frames from the ``anim`` animation. .. rst-class:: classref-method -void **clear_all** **(** **)** +|void| **clear_all**\ (\ ) :ref:`🔗<class_SpriteFrames_method_clear_all>` Removes all animations. An empty ``default`` animation will be created. @@ -126,7 +126,7 @@ Removes all animations. An empty ``default`` animation will be created. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_animation_loop** **(** :ref:`StringName<class_StringName>` anim **)** |const| +:ref:`bool<class_bool>` **get_animation_loop**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_animation_loop>` Returns ``true`` if the given animation is configured to loop when it finishes playing. Otherwise, returns ``false``. @@ -138,7 +138,7 @@ Returns ``true`` if the given animation is configured to loop when it finishes p .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_animation_names** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_animation_names**\ (\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_animation_names>` Returns an array containing the names associated to each animation. Values are placed in alphabetical order. @@ -150,7 +150,7 @@ Returns an array containing the names associated to each animation. Values are p .. rst-class:: classref-method -:ref:`float<class_float>` **get_animation_speed** **(** :ref:`StringName<class_StringName>` anim **)** |const| +:ref:`float<class_float>` **get_animation_speed**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_animation_speed>` Returns the speed in frames per second for the ``anim`` animation. @@ -162,7 +162,7 @@ Returns the speed in frames per second for the ``anim`` animation. .. rst-class:: classref-method -:ref:`int<class_int>` **get_frame_count** **(** :ref:`StringName<class_StringName>` anim **)** |const| +:ref:`int<class_int>` **get_frame_count**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_frame_count>` Returns the number of frames for the ``anim`` animation. @@ -174,7 +174,7 @@ Returns the number of frames for the ``anim`` animation. .. rst-class:: classref-method -:ref:`float<class_float>` **get_frame_duration** **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** |const| +:ref:`float<class_float>` **get_frame_duration**\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_frame_duration>` Returns a relative duration of the frame ``idx`` in the ``anim`` animation (defaults to ``1.0``). For example, a frame with a duration of ``2.0`` is displayed twice as long as a frame with a duration of ``1.0``. You can calculate the absolute duration (in seconds) of a frame using the following formula: @@ -192,7 +192,7 @@ In this example, ``playing_speed`` refers to either :ref:`AnimatedSprite2D.get_p .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_frame_texture** **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_frame_texture**\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_get_frame_texture>` Returns the texture of the frame ``idx`` in the ``anim`` animation. @@ -204,7 +204,7 @@ Returns the texture of the frame ``idx`` in the ``anim`` animation. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_animation** **(** :ref:`StringName<class_StringName>` anim **)** |const| +:ref:`bool<class_bool>` **has_animation**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_SpriteFrames_method_has_animation>` Returns ``true`` if the ``anim`` animation exists. @@ -216,7 +216,7 @@ Returns ``true`` if the ``anim`` animation exists. .. rst-class:: classref-method -void **remove_animation** **(** :ref:`StringName<class_StringName>` anim **)** +|void| **remove_animation**\ (\ anim\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SpriteFrames_method_remove_animation>` Removes the ``anim`` animation. @@ -228,7 +228,7 @@ Removes the ``anim`` animation. .. rst-class:: classref-method -void **remove_frame** **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx **)** +|void| **remove_frame**\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SpriteFrames_method_remove_frame>` Removes the ``anim`` animation's frame ``idx``. @@ -240,7 +240,7 @@ Removes the ``anim`` animation's frame ``idx``. .. rst-class:: classref-method -void **rename_animation** **(** :ref:`StringName<class_StringName>` anim, :ref:`StringName<class_StringName>` newname **)** +|void| **rename_animation**\ (\ anim\: :ref:`StringName<class_StringName>`, newname\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_SpriteFrames_method_rename_animation>` Changes the ``anim`` animation's name to ``newname``. @@ -252,7 +252,7 @@ Changes the ``anim`` animation's name to ``newname``. .. rst-class:: classref-method -void **set_animation_loop** **(** :ref:`StringName<class_StringName>` anim, :ref:`bool<class_bool>` loop **)** +|void| **set_animation_loop**\ (\ anim\: :ref:`StringName<class_StringName>`, loop\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SpriteFrames_method_set_animation_loop>` If ``loop`` is ``true``, the ``anim`` animation will loop when it reaches the end, or the start if it is played in reverse. @@ -264,7 +264,7 @@ If ``loop`` is ``true``, the ``anim`` animation will loop when it reaches the en .. rst-class:: classref-method -void **set_animation_speed** **(** :ref:`StringName<class_StringName>` anim, :ref:`float<class_float>` fps **)** +|void| **set_animation_speed**\ (\ anim\: :ref:`StringName<class_StringName>`, fps\: :ref:`float<class_float>`\ ) :ref:`🔗<class_SpriteFrames_method_set_animation_speed>` Sets the speed for the ``anim`` animation in frames per second. @@ -276,9 +276,9 @@ Sets the speed for the ``anim`` animation in frames per second. .. rst-class:: classref-method -void **set_frame** **(** :ref:`StringName<class_StringName>` anim, :ref:`int<class_int>` idx, :ref:`Texture2D<class_Texture2D>` texture, :ref:`float<class_float>` duration=1.0 **)** +|void| **set_frame**\ (\ anim\: :ref:`StringName<class_StringName>`, idx\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`, duration\: :ref:`float<class_float>` = 1.0\ ) :ref:`🔗<class_SpriteFrames_method_set_frame>` -Sets the ``texture`` and the ``duration`` of the frame ``idx`` in the ``anim`` animation. +Sets the ``texture`` and the ``duration`` of the frame ``idx`` in the ``anim`` animation. ``duration`` specifies the relative duration, see :ref:`get_frame_duration<class_SpriteFrames_method_get_frame_duration>` for details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -287,3 +287,4 @@ Sets the ``texture`` and the ``duration`` of the frame ``idx`` in the ``anim`` a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_standardmaterial3d.rst b/classes/class_standardmaterial3d.rst index ec75bd7f541..e38a139b457 100644 --- a/classes/class_standardmaterial3d.rst +++ b/classes/class_standardmaterial3d.rst @@ -12,7 +12,7 @@ StandardMaterial3D **Inherits:** :ref:`BaseMaterial3D<class_BaseMaterial3D>` **<** :ref:`Material<class_Material>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Physically based rendering (PBR) material that can be applied to 3D objects. +A PBR (Physically Based Rendering) material to be used on 3D objects. .. rst-class:: classref-introduction-group @@ -35,3 +35,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_staticbody2d.rst b/classes/class_staticbody2d.rst index 0fc82368a11..0c82395dd64 100644 --- a/classes/class_staticbody2d.rst +++ b/classes/class_staticbody2d.rst @@ -21,7 +21,7 @@ A 2D physics body that can't be moved by external forces. When moved manually, i Description ----------- -A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer<class_AnimationPlayer>`\ s (with :ref:`AnimationPlayer.playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform2D<class_RemoteTransform2D>`. +A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationMixer<class_AnimationMixer>`\ s (with :ref:`AnimationMixer.callback_mode_process<class_AnimationMixer_property_callback_mode_process>` set to :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`), and :ref:`RemoteTransform2D<class_RemoteTransform2D>`. When **StaticBody2D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody2D<class_AnimatableBody2D>` instead. @@ -56,12 +56,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **constant_angular_velocity** = ``0.0`` +:ref:`float<class_float>` **constant_angular_velocity** = ``0.0`` :ref:`🔗<class_StaticBody2D_property_constant_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_constant_angular_velocity** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_constant_angular_velocity** **(** **)** +- |void| **set_constant_angular_velocity**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_constant_angular_velocity**\ (\ ) The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. @@ -73,12 +73,12 @@ The body's constant angular velocity. This does not rotate the body, but affects .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **constant_linear_velocity** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **constant_linear_velocity** = ``Vector2(0, 0)`` :ref:`🔗<class_StaticBody2D_property_constant_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_constant_linear_velocity** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_constant_linear_velocity** **(** **)** +- |void| **set_constant_linear_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_constant_linear_velocity**\ (\ ) The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. @@ -90,12 +90,12 @@ The body's constant linear velocity. This does not move the body, but affects to .. rst-class:: classref-property -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** :ref:`🔗<class_StaticBody2D_property_physics_material_override>` .. rst-class:: classref-property-setget -- void **set_physics_material_override** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)** -- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override** **(** **)** +- |void| **set_physics_material_override**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) +- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override**\ (\ ) The physics material override for the body. @@ -108,3 +108,4 @@ If a material is assigned to this property, it will be used instead of any other .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_staticbody3d.rst b/classes/class_staticbody3d.rst index 7a638e881ef..8bf936497ce 100644 --- a/classes/class_staticbody3d.rst +++ b/classes/class_staticbody3d.rst @@ -21,7 +21,7 @@ A 3D physics body that can't be moved by external forces. When moved manually, i Description ----------- -A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer<class_AnimationPlayer>`\ s (with :ref:`AnimationPlayer.playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` set to ``ANIMATION_PROCESS_PHYSICS``), and :ref:`RemoteTransform3D<class_RemoteTransform3D>`. +A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationMixer<class_AnimationMixer>`\ s (with :ref:`AnimationMixer.callback_mode_process<class_AnimationMixer_property_callback_mode_process>` set to :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS<class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS>`), and :ref:`RemoteTransform3D<class_RemoteTransform3D>`. When **StaticBody3D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody3D<class_AnimatableBody3D>` instead. @@ -32,11 +32,11 @@ When **StaticBody3D** is moved, it is teleported to its new position without aff Tutorials --------- -- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/675>`__ +- `3D Physics Tests Demo <https://godotengine.org/asset-library/asset/2747>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -67,12 +67,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **constant_angular_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **constant_angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_StaticBody3D_property_constant_angular_velocity>` .. rst-class:: classref-property-setget -- void **set_constant_angular_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_constant_angular_velocity** **(** **)** +- |void| **set_constant_angular_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_constant_angular_velocity**\ (\ ) The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. @@ -84,12 +84,12 @@ The body's constant angular velocity. This does not rotate the body, but affects .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **constant_linear_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **constant_linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_StaticBody3D_property_constant_linear_velocity>` .. rst-class:: classref-property-setget -- void **set_constant_linear_velocity** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_constant_linear_velocity** **(** **)** +- |void| **set_constant_linear_velocity**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_constant_linear_velocity**\ (\ ) The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. @@ -101,12 +101,12 @@ The body's constant linear velocity. This does not move the body, but affects to .. rst-class:: classref-property -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **physics_material_override** :ref:`🔗<class_StaticBody3D_property_physics_material_override>` .. rst-class:: classref-property-setget -- void **set_physics_material_override** **(** :ref:`PhysicsMaterial<class_PhysicsMaterial>` value **)** -- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override** **(** **)** +- |void| **set_physics_material_override**\ (\ value\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) +- :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_material_override**\ (\ ) The physics material override for the body. @@ -119,3 +119,4 @@ If a material is assigned to this property, it will be used instead of any other .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_statusindicator.rst b/classes/class_statusindicator.rst new file mode 100644 index 00000000000..b490a065ab7 --- /dev/null +++ b/classes/class_statusindicator.rst @@ -0,0 +1,168 @@ +:github_url: hide + +.. meta:: + :keywords: tray + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/StatusIndicator.xml. + +.. _class_StatusIndicator: + +StatusIndicator +=============== + +**Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +Application status indicator (aka notification area icon). + +\ **Note:** Status indicator is implemented on macOS and Windows. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------+------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`icon<class_StatusIndicator_property_icon>` | | + +-----------------------------------+--------------------------------------------------------+------------------+ + | :ref:`NodePath<class_NodePath>` | :ref:`menu<class_StatusIndicator_property_menu>` | ``NodePath("")`` | + +-----------------------------------+--------------------------------------------------------+------------------+ + | :ref:`String<class_String>` | :ref:`tooltip<class_StatusIndicator_property_tooltip>` | ``""`` | + +-----------------------------------+--------------------------------------------------------+------------------+ + | :ref:`bool<class_bool>` | :ref:`visible<class_StatusIndicator_property_visible>` | ``true`` | + +-----------------------------------+--------------------------------------------------------+------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_rect<class_StatusIndicator_method_get_rect>`\ (\ ) |const| | + +---------------------------+----------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_StatusIndicator_signal_pressed: + +.. rst-class:: classref-signal + +**pressed**\ (\ mouse_button\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_StatusIndicator_signal_pressed>` + +Emitted when the status indicator is pressed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_StatusIndicator_property_icon: + +.. rst-class:: classref-property + +:ref:`Texture2D<class_Texture2D>` **icon** :ref:`🔗<class_StatusIndicator_property_icon>` + +.. rst-class:: classref-property-setget + +- |void| **set_icon**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ ) + +Status indicator icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StatusIndicator_property_menu: + +.. rst-class:: classref-property + +:ref:`NodePath<class_NodePath>` **menu** = ``NodePath("")`` :ref:`🔗<class_StatusIndicator_property_menu>` + +.. rst-class:: classref-property-setget + +- |void| **set_menu**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_menu**\ (\ ) + +Status indicator native popup menu. If this is set, the :ref:`pressed<class_StatusIndicator_signal_pressed>` signal is not emitted. + +\ **Note:** Native popup is only supported if :ref:`NativeMenu<class_NativeMenu>` supports :ref:`NativeMenu.FEATURE_POPUP_MENU<class_NativeMenu_constant_FEATURE_POPUP_MENU>` feature. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StatusIndicator_property_tooltip: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **tooltip** = ``""`` :ref:`🔗<class_StatusIndicator_property_tooltip>` + +.. rst-class:: classref-property-setget + +- |void| **set_tooltip**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_tooltip**\ (\ ) + +Status indicator tooltip. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StatusIndicator_property_visible: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_StatusIndicator_property_visible>` + +.. rst-class:: classref-property-setget + +- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_visible**\ (\ ) + +If ``true``, the status indicator is visible. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_StatusIndicator_method_get_rect: + +.. rst-class:: classref-method + +:ref:`Rect2<class_Rect2>` **get_rect**\ (\ ) |const| :ref:`🔗<class_StatusIndicator_method_get_rect>` + +Returns the status indicator rectangle in screen coordinates. If this status indicator is not visible, returns an empty :ref:`Rect2<class_Rect2>`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeer.rst b/classes/class_streampeer.rst index 5f490f03107..6b11ffd7ab3 100644 --- a/classes/class_streampeer.rst +++ b/classes/class_streampeer.rst @@ -45,69 +45,69 @@ Methods .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_8<class_StreamPeer_method_get_8>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_16<class_StreamPeer_method_get_16>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_32<class_StreamPeer_method_get_32>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_64<class_StreamPeer_method_get_64>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_available_bytes<class_StreamPeer_method_get_available_bytes>` **(** **)** |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_data<class_StreamPeer_method_get_data>` **(** :ref:`int<class_int>` bytes **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_double<class_StreamPeer_method_get_double>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_float<class_StreamPeer_method_get_float>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_partial_data<class_StreamPeer_method_get_partial_data>` **(** :ref:`int<class_int>` bytes **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_string<class_StreamPeer_method_get_string>` **(** :ref:`int<class_int>` bytes=-1 **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_u8<class_StreamPeer_method_get_u8>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_u16<class_StreamPeer_method_get_u16>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_u32<class_StreamPeer_method_get_u32>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_u64<class_StreamPeer_method_get_u64>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_utf8_string<class_StreamPeer_method_get_utf8_string>` **(** :ref:`int<class_int>` bytes=-1 **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_var<class_StreamPeer_method_get_var>` **(** :ref:`bool<class_bool>` allow_objects=false **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_8<class_StreamPeer_method_put_8>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_16<class_StreamPeer_method_put_16>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_32<class_StreamPeer_method_put_32>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_64<class_StreamPeer_method_put_64>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_data<class_StreamPeer_method_put_data>` **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_double<class_StreamPeer_method_put_double>` **(** :ref:`float<class_float>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_float<class_StreamPeer_method_put_float>` **(** :ref:`float<class_float>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`put_partial_data<class_StreamPeer_method_put_partial_data>` **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_string<class_StreamPeer_method_put_string>` **(** :ref:`String<class_String>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_u8<class_StreamPeer_method_put_u8>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_u16<class_StreamPeer_method_put_u16>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_u32<class_StreamPeer_method_put_u32>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_u64<class_StreamPeer_method_put_u64>` **(** :ref:`int<class_int>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_utf8_string<class_StreamPeer_method_put_utf8_string>` **(** :ref:`String<class_String>` value **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`put_var<class_StreamPeer_method_put_var>` **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` full_objects=false **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_8<class_StreamPeer_method_get_8>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_16<class_StreamPeer_method_get_16>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_32<class_StreamPeer_method_get_32>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_64<class_StreamPeer_method_get_64>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_available_bytes<class_StreamPeer_method_get_available_bytes>`\ (\ ) |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_data<class_StreamPeer_method_get_data>`\ (\ bytes\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_double<class_StreamPeer_method_get_double>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_float<class_StreamPeer_method_get_float>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_partial_data<class_StreamPeer_method_get_partial_data>`\ (\ bytes\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_string<class_StreamPeer_method_get_string>`\ (\ bytes\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_u8<class_StreamPeer_method_get_u8>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_u16<class_StreamPeer_method_get_u16>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_u32<class_StreamPeer_method_get_u32>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_u64<class_StreamPeer_method_get_u64>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_utf8_string<class_StreamPeer_method_get_utf8_string>`\ (\ bytes\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_var<class_StreamPeer_method_get_var>`\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_8<class_StreamPeer_method_put_8>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_16<class_StreamPeer_method_put_16>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_32<class_StreamPeer_method_put_32>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_64<class_StreamPeer_method_put_64>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`put_data<class_StreamPeer_method_put_data>`\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_double<class_StreamPeer_method_put_double>`\ (\ value\: :ref:`float<class_float>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_float<class_StreamPeer_method_put_float>`\ (\ value\: :ref:`float<class_float>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`put_partial_data<class_StreamPeer_method_put_partial_data>`\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_string<class_StreamPeer_method_put_string>`\ (\ value\: :ref:`String<class_String>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_u8<class_StreamPeer_method_put_u8>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_u16<class_StreamPeer_method_put_u16>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_u32<class_StreamPeer_method_put_u32>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_u64<class_StreamPeer_method_put_u64>`\ (\ value\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_utf8_string<class_StreamPeer_method_put_utf8_string>`\ (\ value\: :ref:`String<class_String>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`put_var<class_StreamPeer_method_put_var>`\ (\ value\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -122,12 +122,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **big_endian** = ``false`` +:ref:`bool<class_bool>` **big_endian** = ``false`` :ref:`🔗<class_StreamPeer_property_big_endian>` .. rst-class:: classref-property-setget -- void **set_big_endian** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_big_endian_enabled** **(** **)** +- |void| **set_big_endian**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_big_endian_enabled**\ (\ ) If ``true``, this **StreamPeer** will using big-endian format for encoding and decoding. @@ -144,7 +144,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_8** **(** **)** +:ref:`int<class_int>` **get_8**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_8>` Gets a signed byte from the stream. @@ -156,7 +156,7 @@ Gets a signed byte from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_16** **(** **)** +:ref:`int<class_int>` **get_16**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_16>` Gets a signed 16-bit value from the stream. @@ -168,7 +168,7 @@ Gets a signed 16-bit value from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_32** **(** **)** +:ref:`int<class_int>` **get_32**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_32>` Gets a signed 32-bit value from the stream. @@ -180,7 +180,7 @@ Gets a signed 32-bit value from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_64** **(** **)** +:ref:`int<class_int>` **get_64**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_64>` Gets a signed 64-bit value from the stream. @@ -192,7 +192,7 @@ Gets a signed 64-bit value from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_available_bytes** **(** **)** |const| +:ref:`int<class_int>` **get_available_bytes**\ (\ ) |const| :ref:`🔗<class_StreamPeer_method_get_available_bytes>` Returns the number of bytes this **StreamPeer** has available. @@ -204,7 +204,7 @@ Returns the number of bytes this **StreamPeer** has available. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_data** **(** :ref:`int<class_int>` bytes **)** +:ref:`Array<class_Array>` **get_data**\ (\ bytes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_get_data>` Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the ``bytes`` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an :ref:`Error<enum_@GlobalScope_Error>` code and a data array. @@ -216,7 +216,7 @@ Returns a chunk data with the received bytes. The number of bytes to be received .. rst-class:: classref-method -:ref:`float<class_float>` **get_double** **(** **)** +:ref:`float<class_float>` **get_double**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_double>` Gets a double-precision float from the stream. @@ -228,7 +228,7 @@ Gets a double-precision float from the stream. .. rst-class:: classref-method -:ref:`float<class_float>` **get_float** **(** **)** +:ref:`float<class_float>` **get_float**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_float>` Gets a single-precision float from the stream. @@ -240,7 +240,7 @@ Gets a single-precision float from the stream. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_partial_data** **(** :ref:`int<class_int>` bytes **)** +:ref:`Array<class_Array>` **get_partial_data**\ (\ bytes\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_get_partial_data>` Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an :ref:`Error<enum_@GlobalScope_Error>` code, and a data array. @@ -252,7 +252,7 @@ Returns a chunk data with the received bytes. The number of bytes to be received .. rst-class:: classref-method -:ref:`String<class_String>` **get_string** **(** :ref:`int<class_int>` bytes=-1 **)** +:ref:`String<class_String>` **get_string**\ (\ bytes\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_StreamPeer_method_get_string>` Gets an ASCII string with byte-length ``bytes`` from the stream. If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_string<class_StreamPeer_method_put_string>`. @@ -264,7 +264,7 @@ Gets an ASCII string with byte-length ``bytes`` from the stream. If ``bytes`` is .. rst-class:: classref-method -:ref:`int<class_int>` **get_u8** **(** **)** +:ref:`int<class_int>` **get_u8**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_u8>` Gets an unsigned byte from the stream. @@ -276,7 +276,7 @@ Gets an unsigned byte from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_u16** **(** **)** +:ref:`int<class_int>` **get_u16**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_u16>` Gets an unsigned 16-bit value from the stream. @@ -288,7 +288,7 @@ Gets an unsigned 16-bit value from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_u32** **(** **)** +:ref:`int<class_int>` **get_u32**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_u32>` Gets an unsigned 32-bit value from the stream. @@ -300,7 +300,7 @@ Gets an unsigned 32-bit value from the stream. .. rst-class:: classref-method -:ref:`int<class_int>` **get_u64** **(** **)** +:ref:`int<class_int>` **get_u64**\ (\ ) :ref:`🔗<class_StreamPeer_method_get_u64>` Gets an unsigned 64-bit value from the stream. @@ -312,7 +312,7 @@ Gets an unsigned 64-bit value from the stream. .. rst-class:: classref-method -:ref:`String<class_String>` **get_utf8_string** **(** :ref:`int<class_int>` bytes=-1 **)** +:ref:`String<class_String>` **get_utf8_string**\ (\ bytes\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_StreamPeer_method_get_utf8_string>` Gets a UTF-8 string with byte-length ``bytes`` from the stream (this decodes the string sent as UTF-8). If ``bytes`` is negative (default) the length will be read from the stream using the reverse process of :ref:`put_utf8_string<class_StreamPeer_method_put_utf8_string>`. @@ -324,7 +324,7 @@ Gets a UTF-8 string with byte-length ``bytes`` from the stream (this decodes the .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_var** **(** :ref:`bool<class_bool>` allow_objects=false **)** +:ref:`Variant<class_Variant>` **get_var**\ (\ allow_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_StreamPeer_method_get_var>` Gets a Variant from the stream. If ``allow_objects`` is ``true``, decoding objects is allowed. @@ -340,7 +340,7 @@ Internally, this uses the same decoding mechanism as the :ref:`@GlobalScope.byte .. rst-class:: classref-method -void **put_8** **(** :ref:`int<class_int>` value **)** +|void| **put_8**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_8>` Puts a signed byte into the stream. @@ -352,7 +352,7 @@ Puts a signed byte into the stream. .. rst-class:: classref-method -void **put_16** **(** :ref:`int<class_int>` value **)** +|void| **put_16**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_16>` Puts a signed 16-bit value into the stream. @@ -364,7 +364,7 @@ Puts a signed 16-bit value into the stream. .. rst-class:: classref-method -void **put_32** **(** :ref:`int<class_int>` value **)** +|void| **put_32**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_32>` Puts a signed 32-bit value into the stream. @@ -376,7 +376,7 @@ Puts a signed 32-bit value into the stream. .. rst-class:: classref-method -void **put_64** **(** :ref:`int<class_int>` value **)** +|void| **put_64**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_64>` Puts a signed 64-bit value into the stream. @@ -388,7 +388,7 @@ Puts a signed 64-bit value into the stream. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **put_data** **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** +:ref:`Error<enum_@GlobalScope_Error>` **put_data**\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_StreamPeer_method_put_data>` Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an :ref:`Error<enum_@GlobalScope_Error>` code. @@ -400,7 +400,7 @@ Sends a chunk of data through the connection, blocking if necessary until the da .. rst-class:: classref-method -void **put_double** **(** :ref:`float<class_float>` value **)** +|void| **put_double**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StreamPeer_method_put_double>` Puts a double-precision float into the stream. @@ -412,7 +412,7 @@ Puts a double-precision float into the stream. .. rst-class:: classref-method -void **put_float** **(** :ref:`float<class_float>` value **)** +|void| **put_float**\ (\ value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StreamPeer_method_put_float>` Puts a single-precision float into the stream. @@ -424,7 +424,7 @@ Puts a single-precision float into the stream. .. rst-class:: classref-method -:ref:`Array<class_Array>` **put_partial_data** **(** :ref:`PackedByteArray<class_PackedByteArray>` data **)** +:ref:`Array<class_Array>` **put_partial_data**\ (\ data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_StreamPeer_method_put_partial_data>` Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an :ref:`Error<enum_@GlobalScope_Error>` code and an integer, describing how much data was actually sent. @@ -436,7 +436,7 @@ Sends a chunk of data through the connection. If all the data could not be sent .. rst-class:: classref-method -void **put_string** **(** :ref:`String<class_String>` value **)** +|void| **put_string**\ (\ value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_StreamPeer_method_put_string>` Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. @@ -463,7 +463,7 @@ Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsign .. rst-class:: classref-method -void **put_u8** **(** :ref:`int<class_int>` value **)** +|void| **put_u8**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_u8>` Puts an unsigned byte into the stream. @@ -475,7 +475,7 @@ Puts an unsigned byte into the stream. .. rst-class:: classref-method -void **put_u16** **(** :ref:`int<class_int>` value **)** +|void| **put_u16**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_u16>` Puts an unsigned 16-bit value into the stream. @@ -487,7 +487,7 @@ Puts an unsigned 16-bit value into the stream. .. rst-class:: classref-method -void **put_u32** **(** :ref:`int<class_int>` value **)** +|void| **put_u32**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_u32>` Puts an unsigned 32-bit value into the stream. @@ -499,7 +499,7 @@ Puts an unsigned 32-bit value into the stream. .. rst-class:: classref-method -void **put_u64** **(** :ref:`int<class_int>` value **)** +|void| **put_u64**\ (\ value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeer_method_put_u64>` Puts an unsigned 64-bit value into the stream. @@ -511,7 +511,7 @@ Puts an unsigned 64-bit value into the stream. .. rst-class:: classref-method -void **put_utf8_string** **(** :ref:`String<class_String>` value **)** +|void| **put_utf8_string**\ (\ value\: :ref:`String<class_String>`\ ) :ref:`🔗<class_StreamPeer_method_put_utf8_string>` Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. @@ -538,7 +538,7 @@ Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsig .. rst-class:: classref-method -void **put_var** **(** :ref:`Variant<class_Variant>` value, :ref:`bool<class_bool>` full_objects=false **)** +|void| **put_var**\ (\ value\: :ref:`Variant<class_Variant>`, full_objects\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_StreamPeer_method_put_var>` Puts a Variant into the stream. If ``full_objects`` is ``true`` encoding objects is allowed (and can potentially include code). @@ -551,3 +551,4 @@ Internally, this uses the same encoding mechanism as the :ref:`@GlobalScope.var_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeerbuffer.rst b/classes/class_streampeerbuffer.rst index 8390241dcaf..909083fa8a7 100644 --- a/classes/class_streampeerbuffer.rst +++ b/classes/class_streampeerbuffer.rst @@ -43,19 +43,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_StreamPeerBuffer_method_clear>` **(** **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`StreamPeerBuffer<class_StreamPeerBuffer>` | :ref:`duplicate<class_StreamPeerBuffer_method_duplicate>` **(** **)** |const| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_position<class_StreamPeerBuffer_method_get_position>` **(** **)** |const| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_size<class_StreamPeerBuffer_method_get_size>` **(** **)** |const| | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | void | :ref:`resize<class_StreamPeerBuffer_method_resize>` **(** :ref:`int<class_int>` size **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ - | void | :ref:`seek<class_StreamPeerBuffer_method_seek>` **(** :ref:`int<class_int>` position **)** | - +-------------------------------------------------+--------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_StreamPeerBuffer_method_clear>`\ (\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`StreamPeerBuffer<class_StreamPeerBuffer>` | :ref:`duplicate<class_StreamPeerBuffer_method_duplicate>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_position<class_StreamPeerBuffer_method_get_position>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_size<class_StreamPeerBuffer_method_get_size>`\ (\ ) |const| | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | |void| | :ref:`resize<class_StreamPeerBuffer_method_resize>`\ (\ size\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ + | |void| | :ref:`seek<class_StreamPeerBuffer_method_seek>`\ (\ position\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,15 +70,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedByteArray<class_PackedByteArray>` **data_array** = ``PackedByteArray()`` +:ref:`PackedByteArray<class_PackedByteArray>` **data_array** = ``PackedByteArray()`` :ref:`🔗<class_StreamPeerBuffer_property_data_array>` .. rst-class:: classref-property-setget -- void **set_data_array** **(** :ref:`PackedByteArray<class_PackedByteArray>` value **)** -- :ref:`PackedByteArray<class_PackedByteArray>` **get_data_array** **(** **)** +- |void| **set_data_array**\ (\ value\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_data_array**\ (\ ) The underlying data buffer. Setting this value resets the cursor. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + .. rst-class:: classref-section-separator ---- @@ -92,7 +94,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_StreamPeerBuffer_method_clear>` Clears the :ref:`data_array<class_StreamPeerBuffer_property_data_array>` and resets the cursor. @@ -104,7 +106,7 @@ Clears the :ref:`data_array<class_StreamPeerBuffer_property_data_array>` and res .. rst-class:: classref-method -:ref:`StreamPeerBuffer<class_StreamPeerBuffer>` **duplicate** **(** **)** |const| +:ref:`StreamPeerBuffer<class_StreamPeerBuffer>` **duplicate**\ (\ ) |const| :ref:`🔗<class_StreamPeerBuffer_method_duplicate>` Returns a new **StreamPeerBuffer** with the same :ref:`data_array<class_StreamPeerBuffer_property_data_array>` content. @@ -116,7 +118,7 @@ Returns a new **StreamPeerBuffer** with the same :ref:`data_array<class_StreamPe .. rst-class:: classref-method -:ref:`int<class_int>` **get_position** **(** **)** |const| +:ref:`int<class_int>` **get_position**\ (\ ) |const| :ref:`🔗<class_StreamPeerBuffer_method_get_position>` Returns the current cursor position. @@ -128,7 +130,7 @@ Returns the current cursor position. .. rst-class:: classref-method -:ref:`int<class_int>` **get_size** **(** **)** |const| +:ref:`int<class_int>` **get_size**\ (\ ) |const| :ref:`🔗<class_StreamPeerBuffer_method_get_size>` Returns the size of :ref:`data_array<class_StreamPeerBuffer_property_data_array>`. @@ -140,7 +142,7 @@ Returns the size of :ref:`data_array<class_StreamPeerBuffer_property_data_array> .. rst-class:: classref-method -void **resize** **(** :ref:`int<class_int>` size **)** +|void| **resize**\ (\ size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeerBuffer_method_resize>` Resizes the :ref:`data_array<class_StreamPeerBuffer_property_data_array>`. This *doesn't* update the cursor. @@ -152,7 +154,7 @@ Resizes the :ref:`data_array<class_StreamPeerBuffer_property_data_array>`. This .. rst-class:: classref-method -void **seek** **(** :ref:`int<class_int>` position **)** +|void| **seek**\ (\ position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeerBuffer_method_seek>` Moves the cursor to the specified position. ``position`` must be a valid index of :ref:`data_array<class_StreamPeerBuffer_property_data_array>`. @@ -163,3 +165,4 @@ Moves the cursor to the specified position. ``position`` must be a valid index o .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeerextension.rst b/classes/class_streampeerextension.rst index 615c113b65d..80012860d00 100644 --- a/classes/class_streampeerextension.rst +++ b/classes/class_streampeerextension.rst @@ -24,17 +24,17 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_available_bytes<class_StreamPeerExtension_method__get_available_bytes>` **(** **)** |virtual| |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_data<class_StreamPeerExtension_method__get_data>` **(** uint8_t* r_buffer, :ref:`int<class_int>` r_bytes, int32_t* r_received **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_partial_data<class_StreamPeerExtension_method__get_partial_data>` **(** uint8_t* r_buffer, :ref:`int<class_int>` r_bytes, int32_t* r_received **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_data<class_StreamPeerExtension_method__put_data>` **(** const uint8_t* p_data, :ref:`int<class_int>` p_bytes, int32_t* r_sent **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_partial_data<class_StreamPeerExtension_method__put_partial_data>` **(** const uint8_t* p_data, :ref:`int<class_int>` p_bytes, int32_t* r_sent **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_available_bytes<class_StreamPeerExtension_private_method__get_available_bytes>`\ (\ ) |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_data<class_StreamPeerExtension_private_method__get_data>`\ (\ r_buffer\: ``uint8_t*``, r_bytes\: :ref:`int<class_int>`, r_received\: ``int32_t*``\ ) |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_partial_data<class_StreamPeerExtension_private_method__get_partial_data>`\ (\ r_buffer\: ``uint8_t*``, r_bytes\: :ref:`int<class_int>`, r_received\: ``int32_t*``\ ) |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_data<class_StreamPeerExtension_private_method__put_data>`\ (\ p_data\: ``const uint8_t*``, p_bytes\: :ref:`int<class_int>`, r_sent\: ``int32_t*``\ ) |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_partial_data<class_StreamPeerExtension_private_method__put_partial_data>`\ (\ p_data\: ``const uint8_t*``, p_bytes\: :ref:`int<class_int>`, r_sent\: ``int32_t*``\ ) |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,11 +45,11 @@ Methods Method Descriptions ------------------- -.. _class_StreamPeerExtension_method__get_available_bytes: +.. _class_StreamPeerExtension_private_method__get_available_bytes: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_available_bytes** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_available_bytes**\ (\ ) |virtual| |const| :ref:`🔗<class_StreamPeerExtension_private_method__get_available_bytes>` .. container:: contribute @@ -59,11 +59,11 @@ Method Descriptions ---- -.. _class_StreamPeerExtension_method__get_data: +.. _class_StreamPeerExtension_private_method__get_data: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_get_data** **(** uint8_t* r_buffer, :ref:`int<class_int>` r_bytes, int32_t* r_received **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_get_data**\ (\ r_buffer\: ``uint8_t*``, r_bytes\: :ref:`int<class_int>`, r_received\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_StreamPeerExtension_private_method__get_data>` .. container:: contribute @@ -73,11 +73,11 @@ Method Descriptions ---- -.. _class_StreamPeerExtension_method__get_partial_data: +.. _class_StreamPeerExtension_private_method__get_partial_data: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_get_partial_data** **(** uint8_t* r_buffer, :ref:`int<class_int>` r_bytes, int32_t* r_received **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_get_partial_data**\ (\ r_buffer\: ``uint8_t*``, r_bytes\: :ref:`int<class_int>`, r_received\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_StreamPeerExtension_private_method__get_partial_data>` .. container:: contribute @@ -87,11 +87,11 @@ Method Descriptions ---- -.. _class_StreamPeerExtension_method__put_data: +.. _class_StreamPeerExtension_private_method__put_data: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_data** **(** const uint8_t* p_data, :ref:`int<class_int>` p_bytes, int32_t* r_sent **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_data**\ (\ p_data\: ``const uint8_t*``, p_bytes\: :ref:`int<class_int>`, r_sent\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_StreamPeerExtension_private_method__put_data>` .. container:: contribute @@ -101,11 +101,11 @@ Method Descriptions ---- -.. _class_StreamPeerExtension_method__put_partial_data: +.. _class_StreamPeerExtension_private_method__put_partial_data: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_partial_data** **(** const uint8_t* p_data, :ref:`int<class_int>` p_bytes, int32_t* r_sent **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_partial_data**\ (\ p_data\: ``const uint8_t*``, p_bytes\: :ref:`int<class_int>`, r_sent\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_StreamPeerExtension_private_method__put_partial_data>` .. container:: contribute @@ -118,3 +118,4 @@ Method Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeergzip.rst b/classes/class_streampeergzip.rst index 6418c70b9dd..853765553ea 100644 --- a/classes/class_streampeergzip.rst +++ b/classes/class_streampeergzip.rst @@ -10,6 +10,8 @@ StreamPeerGZIP ============== +**Experimental:** This class may be changed or removed in future versions. + **Inherits:** :ref:`StreamPeer<class_StreamPeer>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` A stream peer that handles GZIP and deflate compression/decompression. @@ -31,15 +33,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_StreamPeerGZIP_method_clear>` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`finish<class_StreamPeerGZIP_method_finish>` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start_compression<class_StreamPeerGZIP_method_start_compression>` **(** :ref:`bool<class_bool>` use_deflate=false, :ref:`int<class_int>` buffer_size=65535 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start_decompression<class_StreamPeerGZIP_method_start_decompression>` **(** :ref:`bool<class_bool>` use_deflate=false, :ref:`int<class_int>` buffer_size=65535 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_StreamPeerGZIP_method_clear>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`finish<class_StreamPeerGZIP_method_finish>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start_compression<class_StreamPeerGZIP_method_start_compression>`\ (\ use_deflate\: :ref:`bool<class_bool>` = false, buffer_size\: :ref:`int<class_int>` = 65535\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start_decompression<class_StreamPeerGZIP_method_start_decompression>`\ (\ use_deflate\: :ref:`bool<class_bool>` = false, buffer_size\: :ref:`int<class_int>` = 65535\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,7 +56,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_StreamPeerGZIP_method_clear>` Clears this stream, resetting the internal state. @@ -66,7 +68,7 @@ Clears this stream, resetting the internal state. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **finish** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **finish**\ (\ ) :ref:`🔗<class_StreamPeerGZIP_method_finish>` Finalizes the stream, compressing or decompressing any buffered chunk left. @@ -78,7 +80,7 @@ Finalizes the stream, compressing or decompressing any buffered chunk left. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **start_compression** **(** :ref:`bool<class_bool>` use_deflate=false, :ref:`int<class_int>` buffer_size=65535 **)** +:ref:`Error<enum_@GlobalScope_Error>` **start_compression**\ (\ use_deflate\: :ref:`bool<class_bool>` = false, buffer_size\: :ref:`int<class_int>` = 65535\ ) :ref:`🔗<class_StreamPeerGZIP_method_start_compression>` Start the stream in compression mode with the given ``buffer_size``, if ``use_deflate`` is ``true`` uses deflate instead of GZIP. @@ -90,7 +92,7 @@ Start the stream in compression mode with the given ``buffer_size``, if ``use_de .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **start_decompression** **(** :ref:`bool<class_bool>` use_deflate=false, :ref:`int<class_int>` buffer_size=65535 **)** +:ref:`Error<enum_@GlobalScope_Error>` **start_decompression**\ (\ use_deflate\: :ref:`bool<class_bool>` = false, buffer_size\: :ref:`int<class_int>` = 65535\ ) :ref:`🔗<class_StreamPeerGZIP_method_start_decompression>` Start the stream in decompression mode with the given ``buffer_size``, if ``use_deflate`` is ``true`` uses deflate instead of GZIP. @@ -101,3 +103,4 @@ Start the stream in decompression mode with the given ``buffer_size``, if ``use_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeertcp.rst b/classes/class_streampeertcp.rst index 4f7d6e3c006..eb67657b1b7 100644 --- a/classes/class_streampeertcp.rst +++ b/classes/class_streampeertcp.rst @@ -31,25 +31,25 @@ Methods .. table:: :widths: auto - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`bind<class_StreamPeerTCP_method_bind>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` host="*" **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_StreamPeerTCP_method_connect_to_host>` **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_from_host<class_StreamPeerTCP_method_disconnect_from_host>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_connected_host<class_StreamPeerTCP_method_get_connected_host>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connected_port<class_StreamPeerTCP_method_get_connected_port>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_local_port<class_StreamPeerTCP_method_get_local_port>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status<enum_StreamPeerTCP_Status>` | :ref:`get_status<class_StreamPeerTCP_method_get_status>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_StreamPeerTCP_method_poll>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_no_delay<class_StreamPeerTCP_method_set_no_delay>` **(** :ref:`bool<class_bool>` enabled **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`bind<class_StreamPeerTCP_method_bind>`\ (\ port\: :ref:`int<class_int>`, host\: :ref:`String<class_String>` = "*"\ ) | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_host<class_StreamPeerTCP_method_connect_to_host>`\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_from_host<class_StreamPeerTCP_method_disconnect_from_host>`\ (\ ) | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_connected_host<class_StreamPeerTCP_method_get_connected_host>`\ (\ ) |const| | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_connected_port<class_StreamPeerTCP_method_get_connected_port>`\ (\ ) |const| | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_local_port<class_StreamPeerTCP_method_get_local_port>`\ (\ ) |const| | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status<enum_StreamPeerTCP_Status>` | :ref:`get_status<class_StreamPeerTCP_method_get_status>`\ (\ ) |const| | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_StreamPeerTCP_method_poll>`\ (\ ) | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_no_delay<class_StreamPeerTCP_method_set_no_delay>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,7 +64,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Status**: +enum **Status**: :ref:`🔗<enum_StreamPeerTCP_Status>` .. _class_StreamPeerTCP_constant_STATUS_NONE: @@ -111,7 +111,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **bind** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` host="*" **)** +:ref:`Error<enum_@GlobalScope_Error>` **bind**\ (\ port\: :ref:`int<class_int>`, host\: :ref:`String<class_String>` = "*"\ ) :ref:`🔗<class_StreamPeerTCP_method_bind>` Opens the TCP socket, and binds it to the specified local address. @@ -125,7 +125,7 @@ This method is generally not needed, and only used to force the subsequent call .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host** **(** :ref:`String<class_String>` host, :ref:`int<class_int>` port **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_host**\ (\ host\: :ref:`String<class_String>`, port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StreamPeerTCP_method_connect_to_host>` Connects to the specified ``host:port`` pair. A hostname will be resolved if valid. Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success. @@ -137,7 +137,7 @@ Connects to the specified ``host:port`` pair. A hostname will be resolved if val .. rst-class:: classref-method -void **disconnect_from_host** **(** **)** +|void| **disconnect_from_host**\ (\ ) :ref:`🔗<class_StreamPeerTCP_method_disconnect_from_host>` Disconnects from host. @@ -149,7 +149,7 @@ Disconnects from host. .. rst-class:: classref-method -:ref:`String<class_String>` **get_connected_host** **(** **)** |const| +:ref:`String<class_String>` **get_connected_host**\ (\ ) |const| :ref:`🔗<class_StreamPeerTCP_method_get_connected_host>` Returns the IP of this peer. @@ -161,7 +161,7 @@ Returns the IP of this peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_connected_port** **(** **)** |const| +:ref:`int<class_int>` **get_connected_port**\ (\ ) |const| :ref:`🔗<class_StreamPeerTCP_method_get_connected_port>` Returns the port of this peer. @@ -173,7 +173,7 @@ Returns the port of this peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_local_port** **(** **)** |const| +:ref:`int<class_int>` **get_local_port**\ (\ ) |const| :ref:`🔗<class_StreamPeerTCP_method_get_local_port>` Returns the local port to which this peer is bound. @@ -185,7 +185,7 @@ Returns the local port to which this peer is bound. .. rst-class:: classref-method -:ref:`Status<enum_StreamPeerTCP_Status>` **get_status** **(** **)** |const| +:ref:`Status<enum_StreamPeerTCP_Status>` **get_status**\ (\ ) |const| :ref:`🔗<class_StreamPeerTCP_method_get_status>` Returns the status of the connection, see :ref:`Status<enum_StreamPeerTCP_Status>`. @@ -197,7 +197,7 @@ Returns the status of the connection, see :ref:`Status<enum_StreamPeerTCP_Status .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_StreamPeerTCP_method_poll>` Poll the socket, updating its state. See :ref:`get_status<class_StreamPeerTCP_method_get_status>`. @@ -209,7 +209,7 @@ Poll the socket, updating its state. See :ref:`get_status<class_StreamPeerTCP_me .. rst-class:: classref-method -void **set_no_delay** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_no_delay**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_StreamPeerTCP_method_set_no_delay>` If ``enabled`` is ``true``, packets will be sent immediately. If ``enabled`` is ``false`` (the default), packet transfers will be delayed and combined using `Nagle's algorithm <https://en.wikipedia.org/wiki/Nagle%27s_algorithm>`__. @@ -222,3 +222,4 @@ If ``enabled`` is ``true``, packets will be sent immediately. If ``enabled`` is .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_streampeertls.rst b/classes/class_streampeertls.rst index 9678facfceb..7d3b3f1a25c 100644 --- a/classes/class_streampeertls.rst +++ b/classes/class_streampeertls.rst @@ -38,19 +38,19 @@ Methods .. table:: :widths: auto - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`accept_stream<class_StreamPeerTLS_method_accept_stream>` **(** :ref:`StreamPeer<class_StreamPeer>` stream, :ref:`TLSOptions<class_TLSOptions>` server_options **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_stream<class_StreamPeerTLS_method_connect_to_stream>` **(** :ref:`StreamPeer<class_StreamPeer>` stream, :ref:`String<class_String>` common_name, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_from_stream<class_StreamPeerTLS_method_disconnect_from_stream>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Status<enum_StreamPeerTLS_Status>` | :ref:`get_status<class_StreamPeerTLS_method_get_status>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StreamPeer<class_StreamPeer>` | :ref:`get_stream<class_StreamPeerTLS_method_get_stream>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`poll<class_StreamPeerTLS_method_poll>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`accept_stream<class_StreamPeerTLS_method_accept_stream>`\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`, server_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_stream<class_StreamPeerTLS_method_connect_to_stream>`\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`, common_name\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_from_stream<class_StreamPeerTLS_method_disconnect_from_stream>`\ (\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Status<enum_StreamPeerTLS_Status>` | :ref:`get_status<class_StreamPeerTLS_method_get_status>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StreamPeer<class_StreamPeer>` | :ref:`get_stream<class_StreamPeerTLS_method_get_stream>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`poll<class_StreamPeerTLS_method_poll>`\ (\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -65,7 +65,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Status**: +enum **Status**: :ref:`🔗<enum_StreamPeerTLS_Status>` .. _class_StreamPeerTLS_constant_STATUS_DISCONNECTED: @@ -120,7 +120,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **accept_stream** **(** :ref:`StreamPeer<class_StreamPeer>` stream, :ref:`TLSOptions<class_TLSOptions>` server_options **)** +:ref:`Error<enum_@GlobalScope_Error>` **accept_stream**\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`, server_options\: :ref:`TLSOptions<class_TLSOptions>`\ ) :ref:`🔗<class_StreamPeerTLS_method_accept_stream>` Accepts a peer connection as a server using the given ``server_options``. See :ref:`TLSOptions.server<class_TLSOptions_method_server>`. @@ -132,7 +132,7 @@ Accepts a peer connection as a server using the given ``server_options``. See :r .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_stream** **(** :ref:`StreamPeer<class_StreamPeer>` stream, :ref:`String<class_String>` common_name, :ref:`TLSOptions<class_TLSOptions>` client_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_stream**\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`, common_name\: :ref:`String<class_String>`, client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_StreamPeerTLS_method_connect_to_stream>` Connects to a peer using an underlying :ref:`StreamPeer<class_StreamPeer>` ``stream`` and verifying the remote certificate is correctly signed for the given ``common_name``. You can pass the optional ``client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client<class_TLSOptions_method_client>` and :ref:`TLSOptions.client_unsafe<class_TLSOptions_method_client_unsafe>`. @@ -144,7 +144,7 @@ Connects to a peer using an underlying :ref:`StreamPeer<class_StreamPeer>` ``str .. rst-class:: classref-method -void **disconnect_from_stream** **(** **)** +|void| **disconnect_from_stream**\ (\ ) :ref:`🔗<class_StreamPeerTLS_method_disconnect_from_stream>` Disconnects from host. @@ -156,7 +156,7 @@ Disconnects from host. .. rst-class:: classref-method -:ref:`Status<enum_StreamPeerTLS_Status>` **get_status** **(** **)** |const| +:ref:`Status<enum_StreamPeerTLS_Status>` **get_status**\ (\ ) |const| :ref:`🔗<class_StreamPeerTLS_method_get_status>` Returns the status of the connection. See :ref:`Status<enum_StreamPeerTLS_Status>` for values. @@ -168,7 +168,7 @@ Returns the status of the connection. See :ref:`Status<enum_StreamPeerTLS_Status .. rst-class:: classref-method -:ref:`StreamPeer<class_StreamPeer>` **get_stream** **(** **)** |const| +:ref:`StreamPeer<class_StreamPeer>` **get_stream**\ (\ ) |const| :ref:`🔗<class_StreamPeerTLS_method_get_stream>` Returns the underlying :ref:`StreamPeer<class_StreamPeer>` connection, used in :ref:`accept_stream<class_StreamPeerTLS_method_accept_stream>` or :ref:`connect_to_stream<class_StreamPeerTLS_method_connect_to_stream>`. @@ -180,7 +180,7 @@ Returns the underlying :ref:`StreamPeer<class_StreamPeer>` connection, used in : .. rst-class:: classref-method -void **poll** **(** **)** +|void| **poll**\ (\ ) :ref:`🔗<class_StreamPeerTLS_method_poll>` Poll the connection to check for incoming bytes. Call this right before :ref:`StreamPeer.get_available_bytes<class_StreamPeer_method_get_available_bytes>` for it to work properly. @@ -191,3 +191,4 @@ Poll the connection to check for incoming bytes. Call this right before :ref:`St .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_string.rst b/classes/class_string.rst index a1cd1bfdf84..c9e175f5fc5 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -42,15 +42,15 @@ Constructors .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>` **(** :ref:`String<class_String>` from **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>` **(** :ref:`NodePath<class_NodePath>` from **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>` **(** :ref:`StringName<class_StringName>` from **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>`\ (\ ) | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>`\ (\ from\: :ref:`String<class_String>`\ ) | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>`\ (\ from\: :ref:`NodePath<class_NodePath>`\ ) | + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`String<class_String_constructor_String>`\ (\ from\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -60,213 +60,221 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`begins_with<class_String_method_begins_with>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`bigrams<class_String_method_bigrams>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bin_to_int<class_String_method_bin_to_int>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`c_escape<class_String_method_c_escape>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`c_unescape<class_String_method_c_unescape>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`capitalize<class_String_method_capitalize>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`casecmp_to<class_String_method_casecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`chr<class_String_method_chr>` **(** :ref:`int<class_int>` char **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`contains<class_String_method_contains>` **(** :ref:`String<class_String>` what **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_String_method_count>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`countn<class_String_method_countn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`dedent<class_String_method_dedent>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`ends_with<class_String_method_ends_with>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`erase<class_String_method_erase>` **(** :ref:`int<class_int>` position, :ref:`int<class_int>` chars=1 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_String_method_find>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`findn<class_String_method_findn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`format<class_String_method_format>` **(** :ref:`Variant<class_Variant>` values, :ref:`String<class_String>` placeholder="{_}" **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_base_dir<class_String_method_get_base_dir>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_basename<class_String_method_get_basename>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_extension<class_String_method_get_extension>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file<class_String_method_get_file>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_slice<class_String_method_get_slice>` **(** :ref:`String<class_String>` delimiter, :ref:`int<class_int>` slice **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_slice_count<class_String_method_get_slice_count>` **(** :ref:`String<class_String>` delimiter **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_slicec<class_String_method_get_slicec>` **(** :ref:`int<class_int>` delimiter, :ref:`int<class_int>` slice **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hash<class_String_method_hash>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`hex_decode<class_String_method_hex_decode>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hex_to_int<class_String_method_hex_to_int>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`humanize_size<class_String_method_humanize_size>` **(** :ref:`int<class_int>` size **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`indent<class_String_method_indent>` **(** :ref:`String<class_String>` prefix **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`insert<class_String_method_insert>` **(** :ref:`int<class_int>` position, :ref:`String<class_String>` what **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_absolute_path<class_String_method_is_absolute_path>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_String_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_relative_path<class_String_method_is_relative_path>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_subsequence_of<class_String_method_is_subsequence_of>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_subsequence_ofn<class_String_method_is_subsequence_ofn>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_filename<class_String_method_is_valid_filename>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_float<class_String_method_is_valid_float>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_hex_number<class_String_method_is_valid_hex_number>` **(** :ref:`bool<class_bool>` with_prefix=false **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_html_color<class_String_method_is_valid_html_color>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_String_method_is_valid_identifier>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_int<class_String_method_is_valid_int>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_ip_address<class_String_method_is_valid_ip_address>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`join<class_String_method_join>` **(** :ref:`PackedStringArray<class_PackedStringArray>` parts **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`json_escape<class_String_method_json_escape>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`left<class_String_method_left>` **(** :ref:`int<class_int>` length **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`length<class_String_method_length>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`lpad<class_String_method_lpad>` **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`lstrip<class_String_method_lstrip>` **(** :ref:`String<class_String>` chars **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`match<class_String_method_match>` **(** :ref:`String<class_String>` expr **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`matchn<class_String_method_matchn>` **(** :ref:`String<class_String>` expr **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`md5_buffer<class_String_method_md5_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`md5_text<class_String_method_md5_text>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`nocasecmp_to<class_String_method_nocasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`num<class_String_method_num>` **(** :ref:`float<class_float>` number, :ref:`int<class_int>` decimals=-1 **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`num_int64<class_String_method_num_int64>` **(** :ref:`int<class_int>` number, :ref:`int<class_int>` base=10, :ref:`bool<class_bool>` capitalize_hex=false **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`num_scientific<class_String_method_num_scientific>` **(** :ref:`float<class_float>` number **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`num_uint64<class_String_method_num_uint64>` **(** :ref:`int<class_int>` number, :ref:`int<class_int>` base=10, :ref:`bool<class_bool>` capitalize_hex=false **)** |static| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`pad_decimals<class_String_method_pad_decimals>` **(** :ref:`int<class_int>` digits **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`pad_zeros<class_String_method_pad_zeros>` **(** :ref:`int<class_int>` digits **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`path_join<class_String_method_path_join>` **(** :ref:`String<class_String>` file **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`repeat<class_String_method_repeat>` **(** :ref:`int<class_int>` count **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`replace<class_String_method_replace>` **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`replacen<class_String_method_replacen>` **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_String_method_rfind>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfindn<class_String_method_rfindn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`right<class_String_method_right>` **(** :ref:`int<class_int>` length **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rpad<class_String_method_rpad>` **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`rsplit<class_String_method_rsplit>` **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rstrip<class_String_method_rstrip>` **(** :ref:`String<class_String>` chars **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha1_buffer<class_String_method_sha1_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`sha1_text<class_String_method_sha1_text>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha256_buffer<class_String_method_sha256_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`sha256_text<class_String_method_sha256_text>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`similarity<class_String_method_similarity>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`simplify_path<class_String_method_simplify_path>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`split<class_String_method_split>` **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`split_floats<class_String_method_split_floats>` **(** :ref:`String<class_String>` delimiter, :ref:`bool<class_bool>` allow_empty=true **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`strip_edges<class_String_method_strip_edges>` **(** :ref:`bool<class_bool>` left=true, :ref:`bool<class_bool>` right=true **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`strip_escapes<class_String_method_strip_escapes>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`substr<class_String_method_substr>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` len=-1 **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_ascii_buffer<class_String_method_to_ascii_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_camel_case<class_String_method_to_camel_case>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`to_float<class_String_method_to_float>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`to_int<class_String_method_to_int>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_lower<class_String_method_to_lower>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_pascal_case<class_String_method_to_pascal_case>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_snake_case<class_String_method_to_snake_case>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_upper<class_String_method_to_upper>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf8_buffer<class_String_method_to_utf8_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf16_buffer<class_String_method_to_utf16_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf32_buffer<class_String_method_to_utf32_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_wchar_buffer<class_String_method_to_wchar_buffer>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`trim_prefix<class_String_method_trim_prefix>` **(** :ref:`String<class_String>` prefix **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`trim_suffix<class_String_method_trim_suffix>` **(** :ref:`String<class_String>` suffix **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`unicode_at<class_String_method_unicode_at>` **(** :ref:`int<class_int>` at **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`uri_decode<class_String_method_uri_decode>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`uri_encode<class_String_method_uri_encode>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`validate_filename<class_String_method_validate_filename>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`validate_node_name<class_String_method_validate_node_name>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`xml_escape<class_String_method_xml_escape>` **(** :ref:`bool<class_bool>` escape_quotes=false **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`xml_unescape<class_String_method_xml_unescape>` **(** **)** |const| | - +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`begins_with<class_String_method_begins_with>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`bigrams<class_String_method_bigrams>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bin_to_int<class_String_method_bin_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`c_escape<class_String_method_c_escape>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`c_unescape<class_String_method_c_unescape>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`capitalize<class_String_method_capitalize>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`casecmp_to<class_String_method_casecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`chr<class_String_method_chr>`\ (\ char\: :ref:`int<class_int>`\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`contains<class_String_method_contains>`\ (\ what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`containsn<class_String_method_containsn>`\ (\ what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_String_method_count>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`countn<class_String_method_countn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`dedent<class_String_method_dedent>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`ends_with<class_String_method_ends_with>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`erase<class_String_method_erase>`\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filecasecmp_to<class_String_method_filecasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filenocasecmp_to<class_String_method_filenocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_String_method_find>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`findn<class_String_method_findn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`format<class_String_method_format>`\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_base_dir<class_String_method_get_base_dir>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_basename<class_String_method_get_basename>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_extension<class_String_method_get_extension>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file<class_String_method_get_file>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_slice<class_String_method_get_slice>`\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_slice_count<class_String_method_get_slice_count>`\ (\ delimiter\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_slicec<class_String_method_get_slicec>`\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hash<class_String_method_hash>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`hex_decode<class_String_method_hex_decode>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hex_to_int<class_String_method_hex_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`humanize_size<class_String_method_humanize_size>`\ (\ size\: :ref:`int<class_int>`\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`indent<class_String_method_indent>`\ (\ prefix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`insert<class_String_method_insert>`\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_absolute_path<class_String_method_is_absolute_path>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_String_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_relative_path<class_String_method_is_relative_path>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_subsequence_of<class_String_method_is_subsequence_of>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_subsequence_ofn<class_String_method_is_subsequence_ofn>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_filename<class_String_method_is_valid_filename>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_float<class_String_method_is_valid_float>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_hex_number<class_String_method_is_valid_hex_number>`\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_html_color<class_String_method_is_valid_html_color>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_String_method_is_valid_identifier>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_int<class_String_method_is_valid_int>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_ip_address<class_String_method_is_valid_ip_address>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`join<class_String_method_join>`\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`json_escape<class_String_method_json_escape>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`left<class_String_method_left>`\ (\ length\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`length<class_String_method_length>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`lpad<class_String_method_lpad>`\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`lstrip<class_String_method_lstrip>`\ (\ chars\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`match<class_String_method_match>`\ (\ expr\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`matchn<class_String_method_matchn>`\ (\ expr\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`md5_buffer<class_String_method_md5_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`md5_text<class_String_method_md5_text>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`num<class_String_method_num>`\ (\ number\: :ref:`float<class_float>`, decimals\: :ref:`int<class_int>` = -1\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`num_int64<class_String_method_num_int64>`\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`num_scientific<class_String_method_num_scientific>`\ (\ number\: :ref:`float<class_float>`\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`num_uint64<class_String_method_num_uint64>`\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`pad_decimals<class_String_method_pad_decimals>`\ (\ digits\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`pad_zeros<class_String_method_pad_zeros>`\ (\ digits\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`path_join<class_String_method_path_join>`\ (\ file\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`repeat<class_String_method_repeat>`\ (\ count\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`replace<class_String_method_replace>`\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`replacen<class_String_method_replacen>`\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`reverse<class_String_method_reverse>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_String_method_rfind>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfindn<class_String_method_rfindn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`right<class_String_method_right>`\ (\ length\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rpad<class_String_method_rpad>`\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`rsplit<class_String_method_rsplit>`\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rstrip<class_String_method_rstrip>`\ (\ chars\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha1_buffer<class_String_method_sha1_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`sha1_text<class_String_method_sha1_text>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha256_buffer<class_String_method_sha256_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`sha256_text<class_String_method_sha256_text>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`similarity<class_String_method_similarity>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`simplify_path<class_String_method_simplify_path>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`split<class_String_method_split>`\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`split_floats<class_String_method_split_floats>`\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`strip_edges<class_String_method_strip_edges>`\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`strip_escapes<class_String_method_strip_escapes>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`substr<class_String_method_substr>`\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_ascii_buffer<class_String_method_to_ascii_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_camel_case<class_String_method_to_camel_case>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`to_float<class_String_method_to_float>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`to_int<class_String_method_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_lower<class_String_method_to_lower>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_pascal_case<class_String_method_to_pascal_case>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_snake_case<class_String_method_to_snake_case>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_upper<class_String_method_to_upper>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf8_buffer<class_String_method_to_utf8_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf16_buffer<class_String_method_to_utf16_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf32_buffer<class_String_method_to_utf32_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_wchar_buffer<class_String_method_to_wchar_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`trim_prefix<class_String_method_trim_prefix>`\ (\ prefix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`trim_suffix<class_String_method_trim_suffix>`\ (\ suffix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`unicode_at<class_String_method_unicode_at>`\ (\ at\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`uri_decode<class_String_method_uri_decode>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`uri_encode<class_String_method_uri_encode>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`validate_filename<class_String_method_validate_filename>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`validate_node_name<class_String_method_validate_node_name>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`xml_escape<class_String_method_xml_escape>`\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`xml_unescape<class_String_method_xml_unescape>`\ (\ ) |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -276,31 +284,31 @@ Operators .. table:: :widths: auto - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_String_operator_neq_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_String_operator_neq_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator %<class_String_operator_mod_Variant>` **(** :ref:`Variant<class_Variant>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator +<class_String_operator_sum_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator +<class_String_operator_sum_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_String_operator_lt_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_String_operator_lte_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_String_operator_eq_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_String_operator_eq_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_String_operator_gt_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_String_operator_gte_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator []<class_String_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------+----------------------------------------------------------------------------------------------------------------+ + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_String_operator_neq_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_String_operator_neq_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator %<class_String_operator_mod_Variant>`\ (\ right\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator +<class_String_operator_sum_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator +<class_String_operator_sum_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_String_operator_lt_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_String_operator_lte_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_String_operator_eq_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_String_operator_eq_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_String_operator_gt_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_String_operator_gte_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator []<class_String_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------+-------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -315,7 +323,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`String<class_String>` **String** **(** **)** +:ref:`String<class_String>` **String**\ (\ ) :ref:`🔗<class_String_constructor_String>` Constructs an empty **String** (``""``). @@ -325,7 +333,7 @@ Constructs an empty **String** (``""``). .. rst-class:: classref-constructor -:ref:`String<class_String>` **String** **(** :ref:`String<class_String>` from **)** +:ref:`String<class_String>` **String**\ (\ from\: :ref:`String<class_String>`\ ) Constructs a **String** as a copy of the given **String**. @@ -335,7 +343,7 @@ Constructs a **String** as a copy of the given **String**. .. rst-class:: classref-constructor -:ref:`String<class_String>` **String** **(** :ref:`NodePath<class_NodePath>` from **)** +:ref:`String<class_String>` **String**\ (\ from\: :ref:`NodePath<class_NodePath>`\ ) Constructs a new **String** from the given :ref:`NodePath<class_NodePath>`. @@ -345,7 +353,7 @@ Constructs a new **String** from the given :ref:`NodePath<class_NodePath>`. .. rst-class:: classref-constructor -:ref:`String<class_String>` **String** **(** :ref:`StringName<class_StringName>` from **)** +:ref:`String<class_String>` **String**\ (\ from\: :ref:`StringName<class_StringName>`\ ) Constructs a new **String** from the given :ref:`StringName<class_StringName>`. @@ -362,7 +370,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **begins_with** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **begins_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_begins_with>` Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with<class_String_method_ends_with>`. @@ -374,7 +382,7 @@ Returns ``true`` if the string begins with the given ``text``. See also :ref:`en .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **bigrams** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **bigrams**\ (\ ) |const| :ref:`🔗<class_String_method_bigrams>` Returns an array containing the bigrams (pairs of consecutive characters) of this string. @@ -390,7 +398,7 @@ Returns an array containing the bigrams (pairs of consecutive characters) of thi .. rst-class:: classref-method -:ref:`int<class_int>` **bin_to_int** **(** **)** |const| +:ref:`int<class_int>` **bin_to_int**\ (\ ) |const| :ref:`🔗<class_String_method_bin_to_int>` Converts the string representing a binary number into an :ref:`int<class_int>`. The string may optionally be prefixed with ``"0b"``, and an additional ``-`` prefix for negative numbers. @@ -419,7 +427,7 @@ Converts the string representing a binary number into an :ref:`int<class_int>`. .. rst-class:: classref-method -:ref:`String<class_String>` **c_escape** **(** **)** |const| +:ref:`String<class_String>` **c_escape**\ (\ ) |const| :ref:`🔗<class_String_method_c_escape>` Returns a copy of the string with special characters escaped using the C language standard. @@ -431,7 +439,7 @@ Returns a copy of the string with special characters escaped using the C languag .. rst-class:: classref-method -:ref:`String<class_String>` **c_unescape** **(** **)** |const| +:ref:`String<class_String>` **c_unescape**\ (\ ) |const| :ref:`🔗<class_String_method_c_unescape>` Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are ``\'``, ``\"``, ``\\``, ``\a``, ``\b``, ``\f``, ``\n``, ``\r``, ``\t``, ``\v``. @@ -445,7 +453,7 @@ Returns a copy of the string with escaped characters replaced by their meanings. .. rst-class:: classref-method -:ref:`String<class_String>` **capitalize** **(** **)** |const| +:ref:`String<class_String>` **capitalize**\ (\ ) |const| :ref:`🔗<class_String_method_capitalize>` Changes the appearance of the string: replaces underscores (``_``) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase. @@ -456,16 +464,16 @@ Changes the appearance of the string: replaces underscores (``_``) with spaces, "move_local_x".capitalize() # Returns "Move Local X" "sceneFile_path".capitalize() # Returns "Scene File Path" + "2D, FPS, PNG".capitalize() # Returns "2d, Fps, Png" .. code-tab:: csharp "move_local_x".Capitalize(); // Returns "Move Local X" "sceneFile_path".Capitalize(); // Returns "Scene File Path" + "2D, FPS, PNG".Capitalize(); // Returns "2d, Fps, Png" -\ **Note:** This method not the same as the default appearance of properties in the Inspector dock, as it does not capitalize acronyms (``"2D"``, ``"FPS"``, ``"PNG"``, etc.) as you may expect. - .. rst-class:: classref-item-separator ---- @@ -474,13 +482,13 @@ Changes the appearance of the string: replaces underscores (``_``) with spaces, .. rst-class:: classref-method -:ref:`int<class_int>` **casecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **casecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_casecmp_to>` Performs a case-sensitive comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" and "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`, :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`, and :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`, :ref:`filecasecmp_to<class_String_method_filecasecmp_to>`, and :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`. .. rst-class:: classref-item-separator @@ -490,7 +498,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`String<class_String>` **chr** **(** :ref:`int<class_int>` char **)** |static| +:ref:`String<class_String>` **chr**\ (\ char\: :ref:`int<class_int>`\ ) |static| :ref:`🔗<class_String_method_chr>` Returns a single Unicode character from the decimal ``char``. You may use `unicodelookup.com <https://unicodelookup.com/>`__ or `unicode.org <https://www.unicode.org/charts/>`__ as points of reference. @@ -507,7 +515,7 @@ Returns a single Unicode character from the decimal ``char``. You may use `unico .. rst-class:: classref-method -:ref:`bool<class_bool>` **contains** **(** :ref:`String<class_String>` what **)** |const| +:ref:`bool<class_bool>` **contains**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_contains>` Returns ``true`` if the string contains ``what``. In GDScript, this corresponds to the ``in`` operator. @@ -527,7 +535,21 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds -If you need to know where ``what`` is within the string, use :ref:`find<class_String_method_find>`. +If you need to know where ``what`` is within the string, use :ref:`find<class_String_method_find>`. See also :ref:`containsn<class_String_method_containsn>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_String_method_containsn: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **containsn**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_containsn>` + +Returns ``true`` if the string contains ``what``, **ignoring case**. + +If you need to know where ``what`` is within the string, use :ref:`findn<class_String_method_findn>`. See also :ref:`contains<class_String_method_contains>`. .. rst-class:: classref-item-separator @@ -537,7 +559,7 @@ If you need to know where ``what`` is within the string, use :ref:`find<class_St .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| +:ref:`int<class_int>` **count**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_count>` Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions. If ``to`` is 0, the search continues until the end of the string. @@ -549,7 +571,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and .. rst-class:: classref-method -:ref:`int<class_int>` **countn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| +:ref:`int<class_int>` **countn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_countn>` Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions, **ignoring case**. If ``to`` is 0, the search continues until the end of the string. @@ -561,7 +583,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and .. rst-class:: classref-method -:ref:`String<class_String>` **dedent** **(** **)** |const| +:ref:`String<class_String>` **dedent**\ (\ ) |const| :ref:`🔗<class_String_method_dedent>` Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent<class_String_method_indent>` to add indentation. @@ -573,7 +595,7 @@ Returns a copy of the string with indentation (leading tabs and spaces) removed. .. rst-class:: classref-method -:ref:`bool<class_bool>` **ends_with** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **ends_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_ends_with>` Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with<class_String_method_begins_with>`. @@ -585,7 +607,7 @@ Returns ``true`` if the string ends with the given ``text``. See also :ref:`begi .. rst-class:: classref-method -:ref:`String<class_String>` **erase** **(** :ref:`int<class_int>` position, :ref:`int<class_int>` chars=1 **)** |const| +:ref:`String<class_String>` **erase**\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_String_method_erase>` Returns a string with ``chars`` characters erased starting from ``position``. If ``chars`` goes beyond the string's length given the specified ``position``, fewer characters will be erased from the returned string. Returns an empty string if either ``position`` or ``chars`` is negative. Returns the original string unmodified if ``chars`` is ``0``. @@ -593,11 +615,39 @@ Returns a string with ``chars`` characters erased starting from ``position``. If ---- +.. _class_String_method_filecasecmp_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **filecasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_filecasecmp_to>` + +Like :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`filenocasecmp_to<class_String_method_filenocasecmp_to>`, :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`, and :ref:`casecmp_to<class_String_method_casecmp_to>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_String_method_filenocasecmp_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **filenocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_filenocasecmp_to>` + +Like :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`filecasecmp_to<class_String_method_filecasecmp_to>`, :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`, and :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_find: .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_find>` Returns the index of the **first** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the string. @@ -632,7 +682,7 @@ Returns the index of the **first** occurrence of ``what`` in this string, or ``- .. rst-class:: classref-method -:ref:`int<class_int>` **findn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **findn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_findn>` Returns the index of the **first** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the end of the string. @@ -644,7 +694,7 @@ Returns the index of the **first** **case-insensitive** occurrence of ``what`` i .. rst-class:: classref-method -:ref:`String<class_String>` **format** **(** :ref:`Variant<class_Variant>` values, :ref:`String<class_String>` placeholder="{_}" **)** |const| +:ref:`String<class_String>` **format**\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const| :ref:`🔗<class_String_method_format>` Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``. @@ -669,6 +719,15 @@ Some additional handling is performed when ``values`` is an :ref:`Array<class_Ar See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscript_format_string>` tutorial. +\ **Note:** The replacement of placeholders is not done all at once, instead each placeholder is replaced in the order they are passed, this means that if one of the replacement strings contains a key it will also be replaced. This can be very powerful, but can also cause unexpected results if you are not careful. If you do not need to perform replacement in the replacement strings, make sure your replacements do not contain placeholders to ensure reliable results. + +:: + + print("{0} {1}".format(["{1}", "x"])) # Prints "x x". + print("{0} {1}".format(["x", "{0}"])) # Prints "x {0}". + print("{foo} {bar}".format({"foo": "{bar}", "bar": "baz"})) # Prints "baz baz". + print("{foo} {bar}".format({"bar": "baz", "foo": "{bar}"})) # Prints "{bar} baz". + \ **Note:** In C#, it's recommended to `interpolate strings with "$" <https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated>`__, instead. .. rst-class:: classref-item-separator @@ -679,7 +738,7 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr .. rst-class:: classref-method -:ref:`String<class_String>` **get_base_dir** **(** **)** |const| +:ref:`String<class_String>` **get_base_dir**\ (\ ) |const| :ref:`🔗<class_String_method_get_base_dir>` If the string is a valid file path, returns the base directory name. @@ -695,7 +754,7 @@ If the string is a valid file path, returns the base directory name. .. rst-class:: classref-method -:ref:`String<class_String>` **get_basename** **(** **)** |const| +:ref:`String<class_String>` **get_basename**\ (\ ) |const| :ref:`🔗<class_String_method_get_basename>` If the string is a valid file path, returns the full file path, without the extension. @@ -711,7 +770,7 @@ If the string is a valid file path, returns the full file path, without the exte .. rst-class:: classref-method -:ref:`String<class_String>` **get_extension** **(** **)** |const| +:ref:`String<class_String>` **get_extension**\ (\ ) |const| :ref:`🔗<class_String_method_get_extension>` If the string is a valid file name or path, returns the file extension without the leading period (``.``). Otherwise, returns an empty string. @@ -735,7 +794,7 @@ If the string is a valid file name or path, returns the file extension without t .. rst-class:: classref-method -:ref:`String<class_String>` **get_file** **(** **)** |const| +:ref:`String<class_String>` **get_file**\ (\ ) |const| :ref:`🔗<class_String_method_get_file>` If the string is a valid file path, returns the file name, including the extension. @@ -751,7 +810,7 @@ If the string is a valid file path, returns the file name, including the extensi .. rst-class:: classref-method -:ref:`String<class_String>` **get_slice** **(** :ref:`String<class_String>` delimiter, :ref:`int<class_int>` slice **)** |const| +:ref:`String<class_String>` **get_slice**\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_get_slice>` Splits the string using a ``delimiter`` and returns the substring at index ``slice``. Returns the original string if ``delimiter`` does not occur in the string. Returns an empty string if the ``slice`` does not exist. @@ -771,7 +830,7 @@ This is faster than :ref:`split<class_String_method_split>`, if you only need on .. rst-class:: classref-method -:ref:`int<class_int>` **get_slice_count** **(** :ref:`String<class_String>` delimiter **)** |const| +:ref:`int<class_int>` **get_slice_count**\ (\ delimiter\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_get_slice_count>` Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split<class_String_method_split>`). @@ -783,7 +842,7 @@ Returns the total number of slices when the string is split with the given ``del .. rst-class:: classref-method -:ref:`String<class_String>` **get_slicec** **(** :ref:`int<class_int>` delimiter, :ref:`int<class_int>` slice **)** |const| +:ref:`String<class_String>` **get_slicec**\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_get_slicec>` Splits the string using a Unicode character with code ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist. @@ -797,11 +856,11 @@ This is faster than :ref:`split<class_String_method_split>`, if you only need on .. rst-class:: classref-method -:ref:`int<class_int>` **hash** **(** **)** |const| +:ref:`int<class_int>` **hash**\ (\ ) |const| :ref:`🔗<class_String_method_hash>` Returns the 32-bit hash value representing the string's contents. -\ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +\ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the contrary, strings with different hash values are guaranteed to be different. .. rst-class:: classref-item-separator @@ -811,7 +870,7 @@ Returns the 32-bit hash value representing the string's contents. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode**\ (\ ) |const| :ref:`🔗<class_String_method_hex_decode>` Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -840,7 +899,7 @@ Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`. .. rst-class:: classref-method -:ref:`int<class_int>` **hex_to_int** **(** **)** |const| +:ref:`int<class_int>` **hex_to_int**\ (\ ) |const| :ref:`🔗<class_String_method_hex_to_int>` Converts the string representing a hexadecimal number into an :ref:`int<class_int>`. The string may be optionally prefixed with ``"0x"``, and an additional ``-`` prefix for negative numbers. @@ -867,7 +926,7 @@ Converts the string representing a hexadecimal number into an :ref:`int<class_in .. rst-class:: classref-method -:ref:`String<class_String>` **humanize_size** **(** :ref:`int<class_int>` size **)** |static| +:ref:`String<class_String>` **humanize_size**\ (\ size\: :ref:`int<class_int>`\ ) |static| :ref:`🔗<class_String_method_humanize_size>` Converts ``size`` which represents a number of bytes into a human-readable form. @@ -881,7 +940,7 @@ The result is in `IEC prefix format <https://en.wikipedia.org/wiki/Binary_prefix .. rst-class:: classref-method -:ref:`String<class_String>` **indent** **(** :ref:`String<class_String>` prefix **)** |const| +:ref:`String<class_String>` **indent**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_indent>` Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent<class_String_method_dedent>` to remove indentation. @@ -895,7 +954,7 @@ For example, the string can be indented with two tabulations using ``"\t\t"``, o .. rst-class:: classref-method -:ref:`String<class_String>` **insert** **(** :ref:`int<class_int>` position, :ref:`String<class_String>` what **)** |const| +:ref:`String<class_String>` **insert**\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_insert>` Inserts ``what`` at the given ``position`` in the string. @@ -907,7 +966,7 @@ Inserts ``what`` at the given ``position`` in the string. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_absolute_path** **(** **)** |const| +:ref:`bool<class_bool>` **is_absolute_path**\ (\ ) |const| :ref:`🔗<class_String_method_is_absolute_path>` Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path<class_String_method_is_relative_path>`. @@ -921,7 +980,7 @@ This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, `` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_String_method_is_empty>` Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length<class_String_method_length>`. @@ -933,7 +992,7 @@ Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_relative_path** **(** **)** |const| +:ref:`bool<class_bool>` **is_relative_path**\ (\ ) |const| :ref:`🔗<class_String_method_is_relative_path>` Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node<class_Node>` (if the string is derived from a :ref:`NodePath<class_NodePath>`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path<class_String_method_is_absolute_path>`. @@ -945,7 +1004,7 @@ Returns ``true`` if the string is a path, and its starting point is dependent on .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_subsequence_of** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **is_subsequence_of**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_is_subsequence_of>` Returns ``true`` if all characters of this string can be found in ``text`` in their original order. @@ -966,7 +1025,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_subsequence_ofn** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **is_subsequence_ofn**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_is_subsequence_ofn>` Returns ``true`` if all characters of this string can be found in ``text`` in their original order, **ignoring case**. @@ -978,7 +1037,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_filename** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_filename**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_filename>` Returns ``true`` if this string does not contain characters that are not allowed in file names (``:`` ``/`` ``\`` ``?`` ``*`` ``"`` ``|`` ``%`` ``<`` ``>``). @@ -990,7 +1049,7 @@ Returns ``true`` if this string does not contain characters that are not allowed .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_float** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_float**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_float>` Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int<class_String_method_is_valid_int>`). See also :ref:`to_float<class_String_method_to_float>`. @@ -1009,7 +1068,7 @@ Returns ``true`` if this string represents a valid floating-point number. A vali .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_hex_number** **(** :ref:`bool<class_bool>` with_prefix=false **)** |const| +:ref:`bool<class_bool>` **is_valid_hex_number**\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_String_method_is_valid_hex_number>` Returns ``true`` if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters ``A`` to ``F`` (either uppercase or lowercase), and may be prefixed with a positive (``+``) or negative (``-``) sign. @@ -1031,7 +1090,7 @@ If ``with_prefix`` is ``true``, the hexadecimal number needs to prefixed by ``"0 .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_html_color** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_html_color**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_html_color>` Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number<class_String_method_is_valid_hex_number>`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html<class_Color_method_html>`. @@ -1043,7 +1102,7 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_identifier** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_identifier**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_identifier>` Returns ``true`` 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. @@ -1062,7 +1121,7 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_int** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_int**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_int>` Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int<class_String_method_to_int>`. @@ -1082,7 +1141,7 @@ Returns ``true`` if this string represents a valid integer. A valid integer only .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_ip_address** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_ip_address**\ (\ ) |const| :ref:`🔗<class_String_method_is_valid_ip_address>` Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address. This method considers `reserved IP addresses <https://en.wikipedia.org/wiki/Reserved_IP_addresses>`__ such as ``"0.0.0.0"`` and ``"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"`` as valid. @@ -1094,7 +1153,7 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address .. rst-class:: classref-method -:ref:`String<class_String>` **join** **(** :ref:`PackedStringArray<class_PackedStringArray>` parts **)** |const| +:ref:`String<class_String>` **join**\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| :ref:`🔗<class_String_method_join>` Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split<class_String_method_split>`. @@ -1128,7 +1187,7 @@ Returns the concatenation of ``parts``' elements, with each element separated by .. rst-class:: classref-method -:ref:`String<class_String>` **json_escape** **(** **)** |const| +:ref:`String<class_String>` **json_escape**\ (\ ) |const| :ref:`🔗<class_String_method_json_escape>` Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape<class_String_method_c_unescape>` to unescape the string, if necessary. @@ -1140,7 +1199,7 @@ Returns a copy of the string with special characters escaped using the JSON stan .. rst-class:: classref-method -:ref:`String<class_String>` **left** **(** :ref:`int<class_int>` length **)** |const| +:ref:`String<class_String>` **left**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_left>` Returns the first ``length`` characters from the beginning of the string. If ``length`` is negative, strips the last ``length`` characters from the string's end. @@ -1157,7 +1216,7 @@ Returns the first ``length`` characters from the beginning of the string. If ``l .. rst-class:: classref-method -:ref:`int<class_int>` **length** **(** **)** |const| +:ref:`int<class_int>` **length**\ (\ ) |const| :ref:`🔗<class_String_method_length>` Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty<class_String_method_is_empty>`. @@ -1169,7 +1228,7 @@ Returns the number of characters in the string. Empty strings (``""``) always re .. rst-class:: classref-method -:ref:`String<class_String>` **lpad** **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| +:ref:`String<class_String>` **lpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_String_method_lpad>` Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad<class_String_method_rpad>`. @@ -1181,7 +1240,7 @@ Formats the string to be at least ``min_length`` long by adding ``character``\ s .. rst-class:: classref-method -:ref:`String<class_String>` **lstrip** **(** :ref:`String<class_String>` chars **)** |const| +:ref:`String<class_String>` **lstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_lstrip>` Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip<class_String_method_rstrip>`. @@ -1195,7 +1254,7 @@ Removes a set of characters defined in ``chars`` from the string's beginning. Se .. rst-class:: classref-method -:ref:`bool<class_bool>` **match** **(** :ref:`String<class_String>` expr **)** |const| +:ref:`bool<class_bool>` **match**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_match>` Does a simple expression match (also called "glob" or "globbing"), where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``. @@ -1207,7 +1266,7 @@ Does a simple expression match (also called "glob" or "globbing"), where ``*`` m .. rst-class:: classref-method -:ref:`bool<class_bool>` **matchn** **(** :ref:`String<class_String>` expr **)** |const| +:ref:`bool<class_bool>` **matchn**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_matchn>` Does a simple **case-insensitive** expression match, where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``. @@ -1219,7 +1278,7 @@ Does a simple **case-insensitive** expression match, where ``*`` matches zero or .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_md5_buffer>` Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1231,7 +1290,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a .. rst-class:: classref-method -:ref:`String<class_String>` **md5_text** **(** **)** |const| +:ref:`String<class_String>` **md5_text**\ (\ ) |const| :ref:`🔗<class_String_method_md5_text>` Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as another **String**. @@ -1243,7 +1302,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as an .. rst-class:: classref-method -:ref:`int<class_int>` **naturalcasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **naturalcasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_naturalcasecmp_to>` Performs a **case-sensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. @@ -1251,7 +1310,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`, :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`, and :ref:`casecmp_to<class_String_method_casecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`, :ref:`filecasecmp_to<class_String_method_filecasecmp_to>`, and :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`. .. rst-class:: classref-item-separator @@ -1261,7 +1320,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`int<class_int>` **naturalnocasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **naturalnocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_naturalnocasecmp_to>` Performs a **case-insensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. @@ -1269,7 +1328,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`, :ref:`nocasecmp_to<class_String_method_nocasecmp_to>`, and :ref:`casecmp_to<class_String_method_casecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`, :ref:`filenocasecmp_to<class_String_method_filenocasecmp_to>`, and :ref:`casecmp_to<class_String_method_casecmp_to>`. .. rst-class:: classref-item-separator @@ -1279,13 +1338,13 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`int<class_int>` **nocasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **nocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_nocasecmp_to>` Performs a **case-insensitive** comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to<class_String_method_casecmp_to>`, :ref:`naturalcasecmp_to<class_String_method_naturalcasecmp_to>`, and :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to<class_String_method_casecmp_to>`, :ref:`filenocasecmp_to<class_String_method_filenocasecmp_to>`, and :ref:`naturalnocasecmp_to<class_String_method_naturalnocasecmp_to>`. .. rst-class:: classref-item-separator @@ -1295,7 +1354,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`String<class_String>` **num** **(** :ref:`float<class_float>` number, :ref:`int<class_int>` decimals=-1 **)** |static| +:ref:`String<class_String>` **num**\ (\ number\: :ref:`float<class_float>`, decimals\: :ref:`int<class_int>` = -1\ ) |static| :ref:`🔗<class_String_method_num>` Converts a :ref:`float<class_float>` to a string representation of a decimal number, with the number of decimal places specified in ``decimals``. @@ -1327,7 +1386,7 @@ Trailing zeros are not included in the string. The last digit is rounded, not tr .. rst-class:: classref-method -:ref:`String<class_String>` **num_int64** **(** :ref:`int<class_int>` number, :ref:`int<class_int>` base=10, :ref:`bool<class_bool>` capitalize_hex=false **)** |static| +:ref:`String<class_String>` **num_int64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_String_method_num_int64>` Converts the given ``number`` to a string representation, with the given ``base``. @@ -1343,7 +1402,7 @@ If ``capitalize_hex`` is ``true``, digits higher than 9 are represented in upper .. rst-class:: classref-method -:ref:`String<class_String>` **num_scientific** **(** :ref:`float<class_float>` number **)** |static| +:ref:`String<class_String>` **num_scientific**\ (\ number\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_String_method_num_scientific>` Converts the given ``number`` to a string representation, in scientific notation. @@ -1353,8 +1412,8 @@ Converts the given ``number`` to a string representation, in scientific notation .. code-tab:: gdscript var n = -5.2e8 - print(n) # Prints -520000000 - print(String.NumScientific(n)) # Prints -5.2e+08 + print(n) # Prints -520000000 + print(String.num_scientific(n)) # Prints -5.2e+08 .. code-tab:: csharp @@ -1376,7 +1435,7 @@ Converts the given ``number`` to a string representation, in scientific notation .. rst-class:: classref-method -:ref:`String<class_String>` **num_uint64** **(** :ref:`int<class_int>` number, :ref:`int<class_int>` base=10, :ref:`bool<class_bool>` capitalize_hex=false **)** |static| +:ref:`String<class_String>` **num_uint64**\ (\ number\: :ref:`int<class_int>`, base\: :ref:`int<class_int>` = 10, capitalize_hex\: :ref:`bool<class_bool>` = false\ ) |static| :ref:`🔗<class_String_method_num_uint64>` Converts the given unsigned :ref:`int<class_int>` to a string representation, with the given ``base``. @@ -1392,7 +1451,7 @@ If ``capitalize_hex`` is ``true``, digits higher than 9 are represented in upper .. rst-class:: classref-method -:ref:`String<class_String>` **pad_decimals** **(** :ref:`int<class_int>` digits **)** |const| +:ref:`String<class_String>` **pad_decimals**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_pad_decimals>` Formats the string representing a number to have an exact number of ``digits`` *after* the decimal point. @@ -1404,7 +1463,7 @@ Formats the string representing a number to have an exact number of ``digits`` * .. rst-class:: classref-method -:ref:`String<class_String>` **pad_zeros** **(** :ref:`int<class_int>` digits **)** |const| +:ref:`String<class_String>` **pad_zeros**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_pad_zeros>` Formats the string representing a number to have an exact number of ``digits`` *before* the decimal point. @@ -1416,7 +1475,7 @@ Formats the string representing a number to have an exact number of ``digits`` * .. rst-class:: classref-method -:ref:`String<class_String>` **path_join** **(** :ref:`String<class_String>` file **)** |const| +:ref:`String<class_String>` **path_join**\ (\ file\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_path_join>` Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if necessary. @@ -1430,7 +1489,7 @@ Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if nec .. rst-class:: classref-method -:ref:`String<class_String>` **repeat** **(** :ref:`int<class_int>` count **)** |const| +:ref:`String<class_String>` **repeat**\ (\ count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_repeat>` Repeats this string a number of times. ``count`` needs to be greater than ``0``. Otherwise, returns an empty string. @@ -1442,7 +1501,7 @@ Repeats this string a number of times. ``count`` needs to be greater than ``0``. .. rst-class:: classref-method -:ref:`String<class_String>` **replace** **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| +:ref:`String<class_String>` **replace**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_replace>` Replaces all occurrences of ``what`` inside the string with the given ``forwhat``. @@ -1454,7 +1513,7 @@ Replaces all occurrences of ``what`` inside the string with the given ``forwhat` .. rst-class:: classref-method -:ref:`String<class_String>` **replacen** **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| +:ref:`String<class_String>` **replacen**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_replacen>` Replaces all **case-insensitive** occurrences of ``what`` inside the string with the given ``forwhat``. @@ -1462,11 +1521,23 @@ Replaces all **case-insensitive** occurrences of ``what`` inside the string with ---- +.. _class_String_method_reverse: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **reverse**\ (\ ) |const| :ref:`🔗<class_String_method_reverse>` + +Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis. + +.. rst-class:: classref-item-separator + +---- + .. _class_String_method_rfind: .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_rfind>` Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find<class_String_method_find>`. @@ -1478,7 +1549,7 @@ Returns the index of the **last** occurrence of ``what`` in this string, or ``-1 .. rst-class:: classref-method -:ref:`int<class_int>` **rfindn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfindn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_rfindn>` Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn<class_String_method_findn>`. @@ -1490,7 +1561,7 @@ Returns the index of the **last** **case-insensitive** occurrence of ``what`` in .. rst-class:: classref-method -:ref:`String<class_String>` **right** **(** :ref:`int<class_int>` length **)** |const| +:ref:`String<class_String>` **right**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_right>` Returns the last ``length`` characters from the end of the string. If ``length`` is negative, strips the first ``length`` characters from the string's beginning. @@ -1507,7 +1578,7 @@ Returns the last ``length`` characters from the end of the string. If ``length`` .. rst-class:: classref-method -:ref:`String<class_String>` **rpad** **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| +:ref:`String<class_String>` **rpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_String_method_rpad>` Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad<class_String_method_lpad>`. @@ -1519,7 +1590,7 @@ Formats the string to be at least ``min_length`` long, by adding ``character``\ .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **rsplit** **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **rsplit**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_rsplit>` Splits the string using a ``delimiter`` and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If ``delimiter`` is an empty string, each substring will be a single character. @@ -1555,7 +1626,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max .. rst-class:: classref-method -:ref:`String<class_String>` **rstrip** **(** :ref:`String<class_String>` chars **)** |const| +:ref:`String<class_String>` **rstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_rstrip>` Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip<class_String_method_lstrip>`. @@ -1569,7 +1640,7 @@ Removes a set of characters defined in ``chars`` from the string's end. See also .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_sha1_buffer>` Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1581,7 +1652,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a .. rst-class:: classref-method -:ref:`String<class_String>` **sha1_text** **(** **)** |const| +:ref:`String<class_String>` **sha1_text**\ (\ ) |const| :ref:`🔗<class_String_method_sha1_text>` Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as another **String**. @@ -1593,7 +1664,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_sha256_buffer>` Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1605,7 +1676,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string .. rst-class:: classref-method -:ref:`String<class_String>` **sha256_text** **(** **)** |const| +:ref:`String<class_String>` **sha256_text**\ (\ ) |const| :ref:`🔗<class_String_method_sha256_text>` Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as another **String**. @@ -1617,7 +1688,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string .. rst-class:: classref-method -:ref:`float<class_float>` **similarity** **(** :ref:`String<class_String>` text **)** |const| +:ref:`float<class_float>` **similarity**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_similarity>` Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient>`__) of this string compared to another. A result of ``1.0`` means totally similar, while ``0.0`` means totally dissimilar. @@ -1636,7 +1707,7 @@ Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.o .. rst-class:: classref-method -:ref:`String<class_String>` **simplify_path** **(** **)** |const| +:ref:`String<class_String>` **simplify_path**\ (\ ) |const| :ref:`🔗<class_String_method_simplify_path>` If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without ``"./"``, and all the unnecessary ``".."`` and ``"/"``. @@ -1653,7 +1724,7 @@ If the string is a valid file path, converts the string into a canonical path. T .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **split** **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **split**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_String_method_split>` Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join<class_String_method_join>`. @@ -1696,7 +1767,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max .. rst-class:: classref-method -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats** **(** :ref:`String<class_String>` delimiter, :ref:`bool<class_bool>` allow_empty=true **)** |const| +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats**\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_String_method_split_floats>` Splits the string into floats by using a ``delimiter`` and returns a :ref:`PackedFloat64Array<class_PackedFloat64Array>`. @@ -1716,7 +1787,7 @@ If ``allow_empty`` is ``false``, empty or invalid :ref:`float<class_float>` conv .. rst-class:: classref-method -:ref:`String<class_String>` **strip_edges** **(** :ref:`bool<class_bool>` left=true, :ref:`bool<class_bool>` right=true **)** |const| +:ref:`String<class_String>` **strip_edges**\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_String_method_strip_edges>` Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations (``\t``), and newlines (``\n`` ``\r``). @@ -1730,7 +1801,7 @@ If ``left`` is ``false``, ignores the string's beginning. Likewise, if ``right`` .. rst-class:: classref-method -:ref:`String<class_String>` **strip_escapes** **(** **)** |const| +:ref:`String<class_String>` **strip_escapes**\ (\ ) |const| :ref:`🔗<class_String_method_strip_escapes>` Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation (``\t``) and newline (``\n``, ``\r``) characters, but *not* spaces. @@ -1742,7 +1813,7 @@ Strips all escape characters from the string. These include all non-printable co .. rst-class:: classref-method -:ref:`String<class_String>` **substr** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` len=-1 **)** |const| +:ref:`String<class_String>` **substr**\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_String_method_substr>` Returns part of the string from the position ``from`` with length ``len``. If ``len`` is ``-1`` (as by default), returns the rest of the string starting from the given position. @@ -1754,9 +1825,9 @@ Returns part of the string from the position ``from`` with length ``len``. If `` .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_ascii_buffer>` -Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin-1 encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly faster than :ref:`to_utf8_buffer<class_String_method_to_utf8_buffer>`, but replaces all unsupported characters with spaces. +Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin-1 encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly faster than :ref:`to_utf8_buffer<class_String_method_to_utf8_buffer>`, but replaces all unsupported characters with spaces. This is the inverse of :ref:`PackedByteArray.get_string_from_ascii<class_PackedByteArray_method_get_string_from_ascii>`. .. rst-class:: classref-item-separator @@ -1766,7 +1837,7 @@ Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin- .. rst-class:: classref-method -:ref:`String<class_String>` **to_camel_case** **(** **)** |const| +:ref:`String<class_String>` **to_camel_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_camel_case>` Returns the string converted to ``camelCase``. @@ -1778,7 +1849,7 @@ Returns the string converted to ``camelCase``. .. rst-class:: classref-method -:ref:`float<class_float>` **to_float** **(** **)** |const| +:ref:`float<class_float>` **to_float**\ (\ ) |const| :ref:`🔗<class_String_method_to_float>` Converts the string representing a decimal number into a :ref:`float<class_float>`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float<class_String_method_is_valid_float>`. @@ -1798,7 +1869,7 @@ Converts the string representing a decimal number into a :ref:`float<class_float .. rst-class:: classref-method -:ref:`int<class_int>` **to_int** **(** **)** |const| +:ref:`int<class_int>` **to_int**\ (\ ) |const| :ref:`🔗<class_String_method_to_int>` Converts the string representing an integer number into an :ref:`int<class_int>`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int<class_String_method_is_valid_int>`. @@ -1817,9 +1888,9 @@ Converts the string representing an integer number into an :ref:`int<class_int>` .. rst-class:: classref-method -:ref:`String<class_String>` **to_lower** **(** **)** |const| +:ref:`String<class_String>` **to_lower**\ (\ ) |const| :ref:`🔗<class_String_method_to_lower>` -Returns the string converted to lowercase. +Returns the string converted to ``lowercase``. .. rst-class:: classref-item-separator @@ -1829,7 +1900,7 @@ Returns the string converted to lowercase. .. rst-class:: classref-method -:ref:`String<class_String>` **to_pascal_case** **(** **)** |const| +:ref:`String<class_String>` **to_pascal_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_pascal_case>` Returns the string converted to ``PascalCase``. @@ -1841,10 +1912,29 @@ Returns the string converted to ``PascalCase``. .. rst-class:: classref-method -:ref:`String<class_String>` **to_snake_case** **(** **)** |const| +:ref:`String<class_String>` **to_snake_case**\ (\ ) |const| :ref:`🔗<class_String_method_to_snake_case>` Returns the string converted to ``snake_case``. +\ **Note:** Numbers followed by a *single* letter are not separated in the conversion to keep some words (such as "2D") together. + + +.. tabs:: + + .. code-tab:: gdscript + + "Node2D".to_snake_case() # Returns "node_2d" + "2nd place".to_snake_case() # Returns "2_nd_place" + "Texture3DAssetFolder".to_snake_case() # Returns "texture_3d_asset_folder" + + .. code-tab:: csharp + + "Node2D".ToSnakeCase(); // Returns "node_2d" + "2nd place".ToSnakeCase(); // Returns "2_nd_place" + "Texture3DAssetFolder".ToSnakeCase(); // Returns "texture_3d_asset_folder" + + + .. rst-class:: classref-item-separator ---- @@ -1853,9 +1943,9 @@ Returns the string converted to ``snake_case``. .. rst-class:: classref-method -:ref:`String<class_String>` **to_upper** **(** **)** |const| +:ref:`String<class_String>` **to_upper**\ (\ ) |const| :ref:`🔗<class_String_method_to_upper>` -Returns the string converted to uppercase. +Returns the string converted to ``UPPERCASE``. .. rst-class:: classref-item-separator @@ -1865,9 +1955,9 @@ Returns the string converted to uppercase. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf8_buffer>` -Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly slower than :ref:`to_ascii_buffer<class_String_method_to_ascii_buffer>`, but supports all UTF-8 characters. For most cases, prefer using this method. +Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly slower than :ref:`to_ascii_buffer<class_String_method_to_ascii_buffer>`, but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of :ref:`PackedByteArray.get_string_from_utf8<class_PackedByteArray_method_get_string_from_utf8>`. .. rst-class:: classref-item-separator @@ -1877,9 +1967,9 @@ Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf16_buffer>` -Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. +Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf16<class_PackedByteArray_method_get_string_from_utf16>`. .. rst-class:: classref-item-separator @@ -1889,9 +1979,9 @@ Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encod .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_utf32_buffer>` -Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. +Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_utf32<class_PackedByteArray_method_get_string_from_utf32>`. .. rst-class:: classref-item-separator @@ -1901,9 +1991,9 @@ Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encod .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer**\ (\ ) |const| :ref:`🔗<class_String_method_to_wchar_buffer>` -Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_character>`__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray<class_PackedByteArray>`. +Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_character>`__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray<class_PackedByteArray>`. This is the inverse of :ref:`PackedByteArray.get_string_from_wchar<class_PackedByteArray_method_get_string_from_wchar>`. .. rst-class:: classref-item-separator @@ -1913,7 +2003,7 @@ Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_cha .. rst-class:: classref-method -:ref:`String<class_String>` **trim_prefix** **(** :ref:`String<class_String>` prefix **)** |const| +:ref:`String<class_String>` **trim_prefix**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_trim_prefix>` Removes the given ``prefix`` from the start of the string, or returns the string unchanged. @@ -1925,7 +2015,7 @@ Removes the given ``prefix`` from the start of the string, or returns the string .. rst-class:: classref-method -:ref:`String<class_String>` **trim_suffix** **(** :ref:`String<class_String>` suffix **)** |const| +:ref:`String<class_String>` **trim_suffix**\ (\ suffix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_String_method_trim_suffix>` Removes the given ``suffix`` from the end of the string, or returns the string unchanged. @@ -1937,7 +2027,7 @@ Removes the given ``suffix`` from the end of the string, or returns the string u .. rst-class:: classref-method -:ref:`int<class_int>` **unicode_at** **(** :ref:`int<class_int>` at **)** |const| +:ref:`int<class_int>` **unicode_at**\ (\ at\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_String_method_unicode_at>` Returns the character code at position ``at``. @@ -1949,7 +2039,7 @@ Returns the character code at position ``at``. .. rst-class:: classref-method -:ref:`String<class_String>` **uri_decode** **(** **)** |const| +:ref:`String<class_String>` **uri_decode**\ (\ ) |const| :ref:`🔗<class_String_method_uri_decode>` Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also :ref:`uri_encode<class_String_method_uri_encode>`. @@ -1976,7 +2066,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly .. rst-class:: classref-method -:ref:`String<class_String>` **uri_encode** **(** **)** |const| +:ref:`String<class_String>` **uri_encode**\ (\ ) |const| :ref:`🔗<class_String_method_uri_encode>` Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also :ref:`uri_decode<class_String_method_uri_decode>`. @@ -2007,7 +2097,7 @@ Encodes the string to URL-friendly format. This method is meant to properly enco .. rst-class:: classref-method -:ref:`String<class_String>` **validate_filename** **(** **)** |const| +:ref:`String<class_String>` **validate_filename**\ (\ ) |const| :ref:`🔗<class_String_method_validate_filename>` Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename<class_String_method_is_valid_filename>` replaced with underscores. @@ -2019,7 +2109,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`i .. rst-class:: classref-method -:ref:`String<class_String>` **validate_node_name** **(** **)** |const| +:ref:`String<class_String>` **validate_node_name**\ (\ ) |const| :ref:`🔗<class_String_method_validate_node_name>` Returns a copy of the string with all characters that are not allowed in :ref:`Node.name<class_Node_property_name>` (``.`` ``:`` ``@`` ``/`` ``"`` ``%``) replaced with underscores. @@ -2031,7 +2121,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`N .. rst-class:: classref-method -:ref:`String<class_String>` **xml_escape** **(** :ref:`bool<class_bool>` escape_quotes=false **)** |const| +:ref:`String<class_String>` **xml_escape**\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_String_method_xml_escape>` Returns a copy of the string with special characters escaped using the XML standard. If ``escape_quotes`` is ``true``, the single quote (``'``) and double quote (``"``) characters are also escaped. @@ -2043,7 +2133,7 @@ Returns a copy of the string with special characters escaped using the XML stand .. rst-class:: classref-method -:ref:`String<class_String>` **xml_unescape** **(** **)** |const| +:ref:`String<class_String>` **xml_unescape**\ (\ ) |const| :ref:`🔗<class_String_method_xml_unescape>` Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard. @@ -2060,7 +2150,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_neq_String>` Returns ``true`` if both strings do not contain the same sequence of characters. @@ -2072,7 +2162,7 @@ Returns ``true`` if both strings do not contain the same sequence of characters. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_neq_StringName>` Returns ``true`` if this **String** is not equivalent to the given :ref:`StringName<class_StringName>`. @@ -2084,7 +2174,7 @@ Returns ``true`` if this **String** is not equivalent to the given :ref:`StringN .. rst-class:: classref-operator -:ref:`String<class_String>` **operator %** **(** :ref:`Variant<class_Variant>` right **)** +:ref:`String<class_String>` **operator %**\ (\ right\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_String_operator_mod_Variant>` Formats the **String**, replacing the placeholders with one or more parameters. To pass multiple parameters, ``right`` needs to be an :ref:`Array<class_Array>`. @@ -2109,7 +2199,7 @@ For more information, see the :doc:`GDScript format strings <../tutorials/script .. rst-class:: classref-operator -:ref:`String<class_String>` **operator +** **(** :ref:`String<class_String>` right **)** +:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_sum_String>` Appends ``right`` at the end of this **String**, also known as a string concatenation. @@ -2121,7 +2211,7 @@ Appends ``right`` at the end of this **String**, also known as a string concaten .. rst-class:: classref-operator -:ref:`String<class_String>` **operator +** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_sum_StringName>` Appends ``right`` at the end of this **String**, returning a **String**. This is also known as a string concatenation. @@ -2133,7 +2223,7 @@ Appends ``right`` at the end of this **String**, returning a **String**. This is .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_lt_String>` Returns ``true`` if the left **String** comes before ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order. Useful for sorting. @@ -2145,7 +2235,7 @@ Returns ``true`` if the left **String** comes before ``right`` in `Unicode order .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_lte_String>` Returns ``true`` if the left **String** comes before ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order, or if both are equal. @@ -2157,7 +2247,7 @@ Returns ``true`` if the left **String** comes before ``right`` in `Unicode order .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_eq_String>` Returns ``true`` if both strings contain the same sequence of characters. @@ -2169,7 +2259,7 @@ Returns ``true`` if both strings contain the same sequence of characters. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_String_operator_eq_StringName>` Returns ``true`` if this **String** is equivalent to the given :ref:`StringName<class_StringName>`. @@ -2181,7 +2271,7 @@ Returns ``true`` if this **String** is equivalent to the given :ref:`StringName< .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_gt_String>` Returns ``true`` if the left **String** comes after ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order. Useful for sorting. @@ -2193,7 +2283,7 @@ Returns ``true`` if the left **String** comes after ``right`` in `Unicode order .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_String_operator_gte_String>` Returns ``true`` if the left **String** comes after ``right`` in `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__, which roughly matches the alphabetical order, or if both are equal. @@ -2205,7 +2295,7 @@ Returns ``true`` if the left **String** comes after ``right`` in `Unicode order .. rst-class:: classref-operator -:ref:`String<class_String>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`String<class_String>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_String_operator_idx_int>` Returns a new **String** that only contains the character at ``index``. Indices start from ``0``. If ``index`` is greater or equal to ``0``, the character is fetched starting from the beginning of the string. If ``index`` is a negative value, it is fetched starting from the end. Accessing a string out-of-bounds will cause a run-time error, pausing the project execution if run from the editor. @@ -2216,3 +2306,4 @@ Returns a new **String** that only contains the character at ``index``. Indices .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 27d0d4bfc97..3355a4ee007 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -19,14 +19,20 @@ Description **StringName**\ s are immutable strings designed for general-purpose representation of unique names (also called "string interning"). Two **StringName**\ s with the same value are the same object. Comparing them is extremely fast compared to regular :ref:`String<class_String>`\ s. -You will usually just pass a :ref:`String<class_String>` to methods expecting a **StringName** and it will be automatically converted, but you may occasionally want to construct a **StringName** ahead of time with the **StringName** constructor or, in GDScript, the literal syntax ``&"example"``. +You will usually pass a :ref:`String<class_String>` to methods expecting a **StringName** and it will be automatically converted (often at compile time), but in rare cases you can construct a **StringName** ahead of time with the **StringName** constructor or, in GDScript, the literal syntax ``&"example"``. Manually constructing a **StringName** allows you to control when the conversion from :ref:`String<class_String>` occurs or to use the literal and prevent conversions entirely. See also :ref:`NodePath<class_NodePath>`, which is a similar concept specifically designed to store pre-parsed scene tree paths. All of :ref:`String<class_String>`'s methods are available in this class too. They convert the **StringName** into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired. +\ **Note:** In C#, an explicit conversion to ``System.String`` is required to use the methods listed on this page. Use the ``ToString()`` method to cast a **StringName** to a string, and then use the equivalent methods in ``System.String`` or ``StringExtensions``. + \ **Note:** In a boolean context, a **StringName** will evaluate to ``false`` if it is empty (``StringName("")``). Otherwise, a **StringName** will always evaluate to ``true``. The ``not`` operator cannot be used. Instead, :ref:`is_empty<class_StringName_method_is_empty>` should be used to check for empty **StringName**\ s. +.. note:: + + There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + .. rst-class:: classref-reftable-group Constructors @@ -35,13 +41,13 @@ Constructors .. table:: :widths: auto - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>` **(** **)** | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>` **(** :ref:`StringName<class_StringName>` from **)** | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>` **(** :ref:`String<class_String>` from **)** | - +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>`\ (\ from\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_constructor_StringName>`\ (\ from\: :ref:`String<class_String>`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -51,201 +57,209 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`begins_with<class_StringName_method_begins_with>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`bigrams<class_StringName_method_bigrams>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`bin_to_int<class_StringName_method_bin_to_int>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`c_escape<class_StringName_method_c_escape>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`c_unescape<class_StringName_method_c_unescape>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`capitalize<class_StringName_method_capitalize>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`casecmp_to<class_StringName_method_casecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`contains<class_StringName_method_contains>` **(** :ref:`String<class_String>` what **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`count<class_StringName_method_count>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`countn<class_StringName_method_countn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`dedent<class_StringName_method_dedent>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`ends_with<class_StringName_method_ends_with>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`erase<class_StringName_method_erase>` **(** :ref:`int<class_int>` position, :ref:`int<class_int>` chars=1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`find<class_StringName_method_find>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`findn<class_StringName_method_findn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`format<class_StringName_method_format>` **(** :ref:`Variant<class_Variant>` values, :ref:`String<class_String>` placeholder="{_}" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_base_dir<class_StringName_method_get_base_dir>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_basename<class_StringName_method_get_basename>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_extension<class_StringName_method_get_extension>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_file<class_StringName_method_get_file>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_slice<class_StringName_method_get_slice>` **(** :ref:`String<class_String>` delimiter, :ref:`int<class_int>` slice **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_slice_count<class_StringName_method_get_slice_count>` **(** :ref:`String<class_String>` delimiter **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_slicec<class_StringName_method_get_slicec>` **(** :ref:`int<class_int>` delimiter, :ref:`int<class_int>` slice **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hash<class_StringName_method_hash>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`hex_decode<class_StringName_method_hex_decode>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hex_to_int<class_StringName_method_hex_to_int>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`indent<class_StringName_method_indent>` **(** :ref:`String<class_String>` prefix **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`insert<class_StringName_method_insert>` **(** :ref:`int<class_int>` position, :ref:`String<class_String>` what **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_absolute_path<class_StringName_method_is_absolute_path>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_StringName_method_is_empty>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_relative_path<class_StringName_method_is_relative_path>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_subsequence_of<class_StringName_method_is_subsequence_of>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_subsequence_ofn<class_StringName_method_is_subsequence_ofn>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_filename<class_StringName_method_is_valid_filename>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_float<class_StringName_method_is_valid_float>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_hex_number<class_StringName_method_is_valid_hex_number>` **(** :ref:`bool<class_bool>` with_prefix=false **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_html_color<class_StringName_method_is_valid_html_color>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_StringName_method_is_valid_identifier>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_int<class_StringName_method_is_valid_int>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_ip_address<class_StringName_method_is_valid_ip_address>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`join<class_StringName_method_join>` **(** :ref:`PackedStringArray<class_PackedStringArray>` parts **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`json_escape<class_StringName_method_json_escape>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`left<class_StringName_method_left>` **(** :ref:`int<class_int>` length **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`length<class_StringName_method_length>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`lpad<class_StringName_method_lpad>` **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`lstrip<class_StringName_method_lstrip>` **(** :ref:`String<class_String>` chars **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`match<class_StringName_method_match>` **(** :ref:`String<class_String>` expr **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`matchn<class_StringName_method_matchn>` **(** :ref:`String<class_String>` expr **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`md5_buffer<class_StringName_method_md5_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`md5_text<class_StringName_method_md5_text>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>` **(** :ref:`String<class_String>` to **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`pad_decimals<class_StringName_method_pad_decimals>` **(** :ref:`int<class_int>` digits **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`pad_zeros<class_StringName_method_pad_zeros>` **(** :ref:`int<class_int>` digits **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`path_join<class_StringName_method_path_join>` **(** :ref:`String<class_String>` file **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`repeat<class_StringName_method_repeat>` **(** :ref:`int<class_int>` count **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`replace<class_StringName_method_replace>` **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`replacen<class_StringName_method_replacen>` **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfind<class_StringName_method_rfind>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`rfindn<class_StringName_method_rfindn>` **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`right<class_StringName_method_right>` **(** :ref:`int<class_int>` length **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rpad<class_StringName_method_rpad>` **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`rsplit<class_StringName_method_rsplit>` **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`rstrip<class_StringName_method_rstrip>` **(** :ref:`String<class_String>` chars **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha1_buffer<class_StringName_method_sha1_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`sha1_text<class_StringName_method_sha1_text>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha256_buffer<class_StringName_method_sha256_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`sha256_text<class_StringName_method_sha256_text>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`similarity<class_StringName_method_similarity>` **(** :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`simplify_path<class_StringName_method_simplify_path>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`split<class_StringName_method_split>` **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`split_floats<class_StringName_method_split_floats>` **(** :ref:`String<class_String>` delimiter, :ref:`bool<class_bool>` allow_empty=true **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`strip_edges<class_StringName_method_strip_edges>` **(** :ref:`bool<class_bool>` left=true, :ref:`bool<class_bool>` right=true **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`strip_escapes<class_StringName_method_strip_escapes>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`substr<class_StringName_method_substr>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` len=-1 **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_ascii_buffer<class_StringName_method_to_ascii_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_camel_case<class_StringName_method_to_camel_case>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`to_float<class_StringName_method_to_float>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`to_int<class_StringName_method_to_int>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_lower<class_StringName_method_to_lower>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_pascal_case<class_StringName_method_to_pascal_case>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_snake_case<class_StringName_method_to_snake_case>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`to_upper<class_StringName_method_to_upper>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf8_buffer<class_StringName_method_to_utf8_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf16_buffer<class_StringName_method_to_utf16_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf32_buffer<class_StringName_method_to_utf32_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_wchar_buffer<class_StringName_method_to_wchar_buffer>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`trim_prefix<class_StringName_method_trim_prefix>` **(** :ref:`String<class_String>` prefix **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`trim_suffix<class_StringName_method_trim_suffix>` **(** :ref:`String<class_String>` suffix **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`unicode_at<class_StringName_method_unicode_at>` **(** :ref:`int<class_int>` at **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`uri_decode<class_StringName_method_uri_decode>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`uri_encode<class_StringName_method_uri_encode>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`validate_filename<class_StringName_method_validate_filename>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`validate_node_name<class_StringName_method_validate_node_name>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`xml_escape<class_StringName_method_xml_escape>` **(** :ref:`bool<class_bool>` escape_quotes=false **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`xml_unescape<class_StringName_method_xml_unescape>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`begins_with<class_StringName_method_begins_with>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`bigrams<class_StringName_method_bigrams>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`bin_to_int<class_StringName_method_bin_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`c_escape<class_StringName_method_c_escape>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`c_unescape<class_StringName_method_c_unescape>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`capitalize<class_StringName_method_capitalize>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`casecmp_to<class_StringName_method_casecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`contains<class_StringName_method_contains>`\ (\ what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`containsn<class_StringName_method_containsn>`\ (\ what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`count<class_StringName_method_count>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`countn<class_StringName_method_countn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`dedent<class_StringName_method_dedent>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`ends_with<class_StringName_method_ends_with>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`erase<class_StringName_method_erase>`\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filecasecmp_to<class_StringName_method_filecasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`filenocasecmp_to<class_StringName_method_filenocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`find<class_StringName_method_find>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`findn<class_StringName_method_findn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`format<class_StringName_method_format>`\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_base_dir<class_StringName_method_get_base_dir>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_basename<class_StringName_method_get_basename>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_extension<class_StringName_method_get_extension>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_file<class_StringName_method_get_file>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_slice<class_StringName_method_get_slice>`\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_slice_count<class_StringName_method_get_slice_count>`\ (\ delimiter\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_slicec<class_StringName_method_get_slicec>`\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hash<class_StringName_method_hash>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`hex_decode<class_StringName_method_hex_decode>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hex_to_int<class_StringName_method_hex_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`indent<class_StringName_method_indent>`\ (\ prefix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`insert<class_StringName_method_insert>`\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_absolute_path<class_StringName_method_is_absolute_path>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_StringName_method_is_empty>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_relative_path<class_StringName_method_is_relative_path>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_subsequence_of<class_StringName_method_is_subsequence_of>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_subsequence_ofn<class_StringName_method_is_subsequence_ofn>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_filename<class_StringName_method_is_valid_filename>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_float<class_StringName_method_is_valid_float>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_hex_number<class_StringName_method_is_valid_hex_number>`\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_html_color<class_StringName_method_is_valid_html_color>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_StringName_method_is_valid_identifier>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_int<class_StringName_method_is_valid_int>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_ip_address<class_StringName_method_is_valid_ip_address>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`join<class_StringName_method_join>`\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`json_escape<class_StringName_method_json_escape>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`left<class_StringName_method_left>`\ (\ length\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`length<class_StringName_method_length>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`lpad<class_StringName_method_lpad>`\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`lstrip<class_StringName_method_lstrip>`\ (\ chars\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`match<class_StringName_method_match>`\ (\ expr\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`matchn<class_StringName_method_matchn>`\ (\ expr\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`md5_buffer<class_StringName_method_md5_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`md5_text<class_StringName_method_md5_text>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`\ (\ to\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`pad_decimals<class_StringName_method_pad_decimals>`\ (\ digits\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`pad_zeros<class_StringName_method_pad_zeros>`\ (\ digits\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`path_join<class_StringName_method_path_join>`\ (\ file\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`repeat<class_StringName_method_repeat>`\ (\ count\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`replace<class_StringName_method_replace>`\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`replacen<class_StringName_method_replacen>`\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`reverse<class_StringName_method_reverse>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfind<class_StringName_method_rfind>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`rfindn<class_StringName_method_rfindn>`\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`right<class_StringName_method_right>`\ (\ length\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rpad<class_StringName_method_rpad>`\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`rsplit<class_StringName_method_rsplit>`\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`rstrip<class_StringName_method_rstrip>`\ (\ chars\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha1_buffer<class_StringName_method_sha1_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`sha1_text<class_StringName_method_sha1_text>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`sha256_buffer<class_StringName_method_sha256_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`sha256_text<class_StringName_method_sha256_text>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`similarity<class_StringName_method_similarity>`\ (\ text\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`simplify_path<class_StringName_method_simplify_path>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`split<class_StringName_method_split>`\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`split_floats<class_StringName_method_split_floats>`\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`strip_edges<class_StringName_method_strip_edges>`\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`strip_escapes<class_StringName_method_strip_escapes>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`substr<class_StringName_method_substr>`\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_ascii_buffer<class_StringName_method_to_ascii_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_camel_case<class_StringName_method_to_camel_case>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`to_float<class_StringName_method_to_float>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`to_int<class_StringName_method_to_int>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_lower<class_StringName_method_to_lower>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_pascal_case<class_StringName_method_to_pascal_case>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_snake_case<class_StringName_method_to_snake_case>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`to_upper<class_StringName_method_to_upper>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf8_buffer<class_StringName_method_to_utf8_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf16_buffer<class_StringName_method_to_utf16_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_utf32_buffer<class_StringName_method_to_utf32_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`to_wchar_buffer<class_StringName_method_to_wchar_buffer>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`trim_prefix<class_StringName_method_trim_prefix>`\ (\ prefix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`trim_suffix<class_StringName_method_trim_suffix>`\ (\ suffix\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`unicode_at<class_StringName_method_unicode_at>`\ (\ at\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`uri_decode<class_StringName_method_uri_decode>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`uri_encode<class_StringName_method_uri_encode>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`validate_filename<class_StringName_method_validate_filename>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`validate_node_name<class_StringName_method_validate_node_name>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`xml_escape<class_StringName_method_xml_escape>`\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`xml_unescape<class_StringName_method_xml_unescape>`\ (\ ) |const| | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -255,29 +269,29 @@ Operators .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_StringName_operator_neq_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_StringName_operator_neq_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator %<class_StringName_operator_mod_Variant>` **(** :ref:`Variant<class_Variant>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator +<class_StringName_operator_sum_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`operator +<class_StringName_operator_sum_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_StringName_operator_lt_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_StringName_operator_lte_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_StringName_operator_eq_String>` **(** :ref:`String<class_String>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_StringName_operator_eq_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_StringName_operator_gt_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_StringName_operator_gte_StringName>` **(** :ref:`StringName<class_StringName>` right **)** | - +-----------------------------+---------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_StringName_operator_neq_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_StringName_operator_neq_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator %<class_StringName_operator_mod_Variant>`\ (\ right\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator +<class_StringName_operator_sum_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`operator +<class_StringName_operator_sum_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_StringName_operator_lt_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_StringName_operator_lte_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_StringName_operator_eq_String>`\ (\ right\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_StringName_operator_eq_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_StringName_operator_gt_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_StringName_operator_gte_StringName>`\ (\ right\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -292,7 +306,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`StringName<class_StringName>` **StringName** **(** **)** +:ref:`StringName<class_StringName>` **StringName**\ (\ ) :ref:`🔗<class_StringName_constructor_StringName>` Constructs an empty **StringName**. @@ -302,7 +316,7 @@ Constructs an empty **StringName**. .. rst-class:: classref-constructor -:ref:`StringName<class_StringName>` **StringName** **(** :ref:`StringName<class_StringName>` from **)** +:ref:`StringName<class_StringName>` **StringName**\ (\ from\: :ref:`StringName<class_StringName>`\ ) Constructs a **StringName** as a copy of the given **StringName**. @@ -312,7 +326,7 @@ Constructs a **StringName** as a copy of the given **StringName**. .. rst-class:: classref-constructor -:ref:`StringName<class_StringName>` **StringName** **(** :ref:`String<class_String>` from **)** +:ref:`StringName<class_StringName>` **StringName**\ (\ from\: :ref:`String<class_String>`\ ) Creates a new **StringName** from the given :ref:`String<class_String>`. In GDScript, ``StringName("example")`` is equivalent to ``&"example"``. @@ -329,7 +343,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **begins_with** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **begins_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_begins_with>` Returns ``true`` if the string begins with the given ``text``. See also :ref:`ends_with<class_StringName_method_ends_with>`. @@ -341,7 +355,7 @@ Returns ``true`` if the string begins with the given ``text``. See also :ref:`en .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **bigrams** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **bigrams**\ (\ ) |const| :ref:`🔗<class_StringName_method_bigrams>` Returns an array containing the bigrams (pairs of consecutive characters) of this string. @@ -357,7 +371,7 @@ Returns an array containing the bigrams (pairs of consecutive characters) of thi .. rst-class:: classref-method -:ref:`int<class_int>` **bin_to_int** **(** **)** |const| +:ref:`int<class_int>` **bin_to_int**\ (\ ) |const| :ref:`🔗<class_StringName_method_bin_to_int>` Converts the string representing a binary number into an :ref:`int<class_int>`. The string may optionally be prefixed with ``"0b"``, and an additional ``-`` prefix for negative numbers. @@ -386,7 +400,7 @@ Converts the string representing a binary number into an :ref:`int<class_int>`. .. rst-class:: classref-method -:ref:`String<class_String>` **c_escape** **(** **)** |const| +:ref:`String<class_String>` **c_escape**\ (\ ) |const| :ref:`🔗<class_StringName_method_c_escape>` Returns a copy of the string with special characters escaped using the C language standard. @@ -398,7 +412,7 @@ Returns a copy of the string with special characters escaped using the C languag .. rst-class:: classref-method -:ref:`String<class_String>` **c_unescape** **(** **)** |const| +:ref:`String<class_String>` **c_unescape**\ (\ ) |const| :ref:`🔗<class_StringName_method_c_unescape>` Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are ``\'``, ``\"``, ``\\``, ``\a``, ``\b``, ``\f``, ``\n``, ``\r``, ``\t``, ``\v``. @@ -412,7 +426,7 @@ Returns a copy of the string with escaped characters replaced by their meanings. .. rst-class:: classref-method -:ref:`String<class_String>` **capitalize** **(** **)** |const| +:ref:`String<class_String>` **capitalize**\ (\ ) |const| :ref:`🔗<class_StringName_method_capitalize>` Changes the appearance of the string: replaces underscores (``_``) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase. @@ -423,16 +437,16 @@ Changes the appearance of the string: replaces underscores (``_``) with spaces, "move_local_x".capitalize() # Returns "Move Local X" "sceneFile_path".capitalize() # Returns "Scene File Path" + "2D, FPS, PNG".capitalize() # Returns "2d, Fps, Png" .. code-tab:: csharp "move_local_x".Capitalize(); // Returns "Move Local X" "sceneFile_path".Capitalize(); // Returns "Scene File Path" + "2D, FPS, PNG".Capitalize(); // Returns "2d, Fps, Png" -\ **Note:** This method not the same as the default appearance of properties in the Inspector dock, as it does not capitalize acronyms (``"2D"``, ``"FPS"``, ``"PNG"``, etc.) as you may expect. - .. rst-class:: classref-item-separator ---- @@ -441,13 +455,13 @@ Changes the appearance of the string: replaces underscores (``_``) with spaces, .. rst-class:: classref-method -:ref:`int<class_int>` **casecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **casecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_casecmp_to>` Performs a case-sensitive comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" and "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`, :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`, and :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`, :ref:`filecasecmp_to<class_StringName_method_filecasecmp_to>`, and :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`. .. rst-class:: classref-item-separator @@ -457,7 +471,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`bool<class_bool>` **contains** **(** :ref:`String<class_String>` what **)** |const| +:ref:`bool<class_bool>` **contains**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_contains>` Returns ``true`` if the string contains ``what``. In GDScript, this corresponds to the ``in`` operator. @@ -477,7 +491,21 @@ Returns ``true`` if the string contains ``what``. In GDScript, this corresponds -If you need to know where ``what`` is within the string, use :ref:`find<class_StringName_method_find>`. +If you need to know where ``what`` is within the string, use :ref:`find<class_StringName_method_find>`. See also :ref:`containsn<class_StringName_method_containsn>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StringName_method_containsn: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **containsn**\ (\ what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_containsn>` + +Returns ``true`` if the string contains ``what``, **ignoring case**. + +If you need to know where ``what`` is within the string, use :ref:`findn<class_StringName_method_findn>`. See also :ref:`contains<class_StringName_method_contains>`. .. rst-class:: classref-item-separator @@ -487,7 +515,7 @@ If you need to know where ``what`` is within the string, use :ref:`find<class_St .. rst-class:: classref-method -:ref:`int<class_int>` **count** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| +:ref:`int<class_int>` **count**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_count>` Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions. If ``to`` is 0, the search continues until the end of the string. @@ -499,7 +527,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and .. rst-class:: classref-method -:ref:`int<class_int>` **countn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0, :ref:`int<class_int>` to=0 **)** |const| +:ref:`int<class_int>` **countn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0, to\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_countn>` Returns the number of occurrences of the substring ``what`` between ``from`` and ``to`` positions, **ignoring case**. If ``to`` is 0, the search continues until the end of the string. @@ -511,7 +539,7 @@ Returns the number of occurrences of the substring ``what`` between ``from`` and .. rst-class:: classref-method -:ref:`String<class_String>` **dedent** **(** **)** |const| +:ref:`String<class_String>` **dedent**\ (\ ) |const| :ref:`🔗<class_StringName_method_dedent>` Returns a copy of the string with indentation (leading tabs and spaces) removed. See also :ref:`indent<class_StringName_method_indent>` to add indentation. @@ -523,7 +551,7 @@ Returns a copy of the string with indentation (leading tabs and spaces) removed. .. rst-class:: classref-method -:ref:`bool<class_bool>` **ends_with** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **ends_with**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_ends_with>` Returns ``true`` if the string ends with the given ``text``. See also :ref:`begins_with<class_StringName_method_begins_with>`. @@ -535,7 +563,7 @@ Returns ``true`` if the string ends with the given ``text``. See also :ref:`begi .. rst-class:: classref-method -:ref:`String<class_String>` **erase** **(** :ref:`int<class_int>` position, :ref:`int<class_int>` chars=1 **)** |const| +:ref:`String<class_String>` **erase**\ (\ position\: :ref:`int<class_int>`, chars\: :ref:`int<class_int>` = 1\ ) |const| :ref:`🔗<class_StringName_method_erase>` Returns a string with ``chars`` characters erased starting from ``position``. If ``chars`` goes beyond the string's length given the specified ``position``, fewer characters will be erased from the returned string. Returns an empty string if either ``position`` or ``chars`` is negative. Returns the original string unmodified if ``chars`` is ``0``. @@ -543,11 +571,39 @@ Returns a string with ``chars`` characters erased starting from ``position``. If ---- +.. _class_StringName_method_filecasecmp_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **filecasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_filecasecmp_to>` + +Like :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`filenocasecmp_to<class_StringName_method_filenocasecmp_to>`, :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`, and :ref:`casecmp_to<class_StringName_method_casecmp_to>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_StringName_method_filenocasecmp_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **filenocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_filenocasecmp_to>` + +Like :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>` but prioritizes strings that begin with periods (``.``) and underscores (``_``) before any other character. Useful when sorting folders or file names. + +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`filecasecmp_to<class_StringName_method_filecasecmp_to>`, :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`, and :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_find: .. rst-class:: classref-method -:ref:`int<class_int>` **find** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **find**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_find>` Returns the index of the **first** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the string. @@ -582,7 +638,7 @@ Returns the index of the **first** occurrence of ``what`` in this string, or ``- .. rst-class:: classref-method -:ref:`int<class_int>` **findn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=0 **)** |const| +:ref:`int<class_int>` **findn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_findn>` Returns the index of the **first** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the end of the string. @@ -594,7 +650,7 @@ Returns the index of the **first** **case-insensitive** occurrence of ``what`` i .. rst-class:: classref-method -:ref:`String<class_String>` **format** **(** :ref:`Variant<class_Variant>` values, :ref:`String<class_String>` placeholder="{_}" **)** |const| +:ref:`String<class_String>` **format**\ (\ values\: :ref:`Variant<class_Variant>`, placeholder\: :ref:`String<class_String>` = "{_}"\ ) |const| :ref:`🔗<class_StringName_method_format>` Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``. @@ -629,7 +685,7 @@ See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscr .. rst-class:: classref-method -:ref:`String<class_String>` **get_base_dir** **(** **)** |const| +:ref:`String<class_String>` **get_base_dir**\ (\ ) |const| :ref:`🔗<class_StringName_method_get_base_dir>` If the string is a valid file path, returns the base directory name. @@ -645,7 +701,7 @@ If the string is a valid file path, returns the base directory name. .. rst-class:: classref-method -:ref:`String<class_String>` **get_basename** **(** **)** |const| +:ref:`String<class_String>` **get_basename**\ (\ ) |const| :ref:`🔗<class_StringName_method_get_basename>` If the string is a valid file path, returns the full file path, without the extension. @@ -661,7 +717,7 @@ If the string is a valid file path, returns the full file path, without the exte .. rst-class:: classref-method -:ref:`String<class_String>` **get_extension** **(** **)** |const| +:ref:`String<class_String>` **get_extension**\ (\ ) |const| :ref:`🔗<class_StringName_method_get_extension>` If the string is a valid file name or path, returns the file extension without the leading period (``.``). Otherwise, returns an empty string. @@ -685,7 +741,7 @@ If the string is a valid file name or path, returns the file extension without t .. rst-class:: classref-method -:ref:`String<class_String>` **get_file** **(** **)** |const| +:ref:`String<class_String>` **get_file**\ (\ ) |const| :ref:`🔗<class_StringName_method_get_file>` If the string is a valid file path, returns the file name, including the extension. @@ -701,7 +757,7 @@ If the string is a valid file path, returns the file name, including the extensi .. rst-class:: classref-method -:ref:`String<class_String>` **get_slice** **(** :ref:`String<class_String>` delimiter, :ref:`int<class_int>` slice **)** |const| +:ref:`String<class_String>` **get_slice**\ (\ delimiter\: :ref:`String<class_String>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_get_slice>` Splits the string using a ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist. @@ -721,7 +777,7 @@ This is faster than :ref:`split<class_StringName_method_split>`, if you only nee .. rst-class:: classref-method -:ref:`int<class_int>` **get_slice_count** **(** :ref:`String<class_String>` delimiter **)** |const| +:ref:`int<class_int>` **get_slice_count**\ (\ delimiter\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_get_slice_count>` Returns the total number of slices when the string is split with the given ``delimiter`` (see :ref:`split<class_StringName_method_split>`). @@ -733,7 +789,7 @@ Returns the total number of slices when the string is split with the given ``del .. rst-class:: classref-method -:ref:`String<class_String>` **get_slicec** **(** :ref:`int<class_int>` delimiter, :ref:`int<class_int>` slice **)** |const| +:ref:`String<class_String>` **get_slicec**\ (\ delimiter\: :ref:`int<class_int>`, slice\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_get_slicec>` Splits the string using a Unicode character with code ``delimiter`` and returns the substring at index ``slice``. Returns an empty string if the ``slice`` does not exist. @@ -747,11 +803,11 @@ This is faster than :ref:`split<class_StringName_method_split>`, if you only nee .. rst-class:: classref-method -:ref:`int<class_int>` **hash** **(** **)** |const| +:ref:`int<class_int>` **hash**\ (\ ) |const| :ref:`🔗<class_StringName_method_hash>` Returns the 32-bit hash value representing the string's contents. -\ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different. +\ **Note:** Strings with equal hash values are *not* guaranteed to be the same, as a result of hash collisions. On the contrary, strings with different hash values are guaranteed to be different. .. rst-class:: classref-item-separator @@ -761,7 +817,7 @@ Returns the 32-bit hash value representing the string's contents. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **hex_decode**\ (\ ) |const| :ref:`🔗<class_StringName_method_hex_decode>` Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -790,7 +846,7 @@ Decodes a hexadecimal string as a :ref:`PackedByteArray<class_PackedByteArray>`. .. rst-class:: classref-method -:ref:`int<class_int>` **hex_to_int** **(** **)** |const| +:ref:`int<class_int>` **hex_to_int**\ (\ ) |const| :ref:`🔗<class_StringName_method_hex_to_int>` Converts the string representing a hexadecimal number into an :ref:`int<class_int>`. The string may be optionally prefixed with ``"0x"``, and an additional ``-`` prefix for negative numbers. @@ -817,7 +873,7 @@ Converts the string representing a hexadecimal number into an :ref:`int<class_in .. rst-class:: classref-method -:ref:`String<class_String>` **indent** **(** :ref:`String<class_String>` prefix **)** |const| +:ref:`String<class_String>` **indent**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_indent>` Indents every line of the string with the given ``prefix``. Empty lines are not indented. See also :ref:`dedent<class_StringName_method_dedent>` to remove indentation. @@ -831,7 +887,7 @@ For example, the string can be indented with two tabulations using ``"\t\t"``, o .. rst-class:: classref-method -:ref:`String<class_String>` **insert** **(** :ref:`int<class_int>` position, :ref:`String<class_String>` what **)** |const| +:ref:`String<class_String>` **insert**\ (\ position\: :ref:`int<class_int>`, what\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_insert>` Inserts ``what`` at the given ``position`` in the string. @@ -843,7 +899,7 @@ Inserts ``what`` at the given ``position`` in the string. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_absolute_path** **(** **)** |const| +:ref:`bool<class_bool>` **is_absolute_path**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_absolute_path>` Returns ``true`` if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of :ref:`is_relative_path<class_StringName_method_is_relative_path>`. @@ -857,7 +913,7 @@ This includes all paths starting with ``"res://"``, ``"user://"``, ``"C:\"``, `` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_empty>` Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length<class_StringName_method_length>`. @@ -869,7 +925,7 @@ Returns ``true`` if the string's length is ``0`` (``""``). See also :ref:`length .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_relative_path** **(** **)** |const| +:ref:`bool<class_bool>` **is_relative_path**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_relative_path>` Returns ``true`` if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current :ref:`Node<class_Node>` (if the string is derived from a :ref:`NodePath<class_NodePath>`), and may sometimes be prefixed with ``"./"``. This method is the opposite of :ref:`is_absolute_path<class_StringName_method_is_absolute_path>`. @@ -881,7 +937,7 @@ Returns ``true`` if the string is a path, and its starting point is dependent on .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_subsequence_of** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **is_subsequence_of**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_is_subsequence_of>` Returns ``true`` if all characters of this string can be found in ``text`` in their original order. @@ -902,7 +958,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_subsequence_ofn** **(** :ref:`String<class_String>` text **)** |const| +:ref:`bool<class_bool>` **is_subsequence_ofn**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_is_subsequence_ofn>` Returns ``true`` if all characters of this string can be found in ``text`` in their original order, **ignoring case**. @@ -914,7 +970,7 @@ Returns ``true`` if all characters of this string can be found in ``text`` in th .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_filename** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_filename**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_filename>` Returns ``true`` if this string does not contain characters that are not allowed in file names (``:`` ``/`` ``\`` ``?`` ``*`` ``"`` ``|`` ``%`` ``<`` ``>``). @@ -926,7 +982,7 @@ Returns ``true`` if this string does not contain characters that are not allowed .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_float** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_float**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_float>` Returns ``true`` if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point (``.``), and the exponent letter (``e``). It may also be prefixed with a positive (``+``) or negative (``-``) sign. Any valid integer is also a valid float (see :ref:`is_valid_int<class_StringName_method_is_valid_int>`). See also :ref:`to_float<class_StringName_method_to_float>`. @@ -945,7 +1001,7 @@ Returns ``true`` if this string represents a valid floating-point number. A vali .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_hex_number** **(** :ref:`bool<class_bool>` with_prefix=false **)** |const| +:ref:`bool<class_bool>` **is_valid_hex_number**\ (\ with_prefix\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_StringName_method_is_valid_hex_number>` Returns ``true`` if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters ``A`` to ``F`` (either uppercase or lowercase), and may be prefixed with a positive (``+``) or negative (``-``) sign. @@ -967,7 +1023,7 @@ If ``with_prefix`` is ``true``, the hexadecimal number needs to prefixed by ``"0 .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_html_color** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_html_color**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_html_color>` Returns ``true`` if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see :ref:`is_valid_hex_number<class_StringName_method_is_valid_hex_number>`) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). Other HTML notations for colors, such as names or ``hsl()``, are not considered valid. See also :ref:`Color.html<class_Color_method_html>`. @@ -979,7 +1035,7 @@ Returns ``true`` if this string is a valid color in hexadecimal HTML notation. T .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_identifier** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_identifier**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_identifier>` Returns ``true`` 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. @@ -998,7 +1054,7 @@ Returns ``true`` if this string is a valid identifier. A valid identifier may co .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_int** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_int**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_int>` Returns ``true`` if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive (``+``) or negative (``-``) sign. See also :ref:`to_int<class_StringName_method_to_int>`. @@ -1018,7 +1074,7 @@ Returns ``true`` if this string represents a valid integer. A valid integer only .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_ip_address** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_ip_address**\ (\ ) |const| :ref:`🔗<class_StringName_method_is_valid_ip_address>` Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address. This method considers `reserved IP addresses <https://en.wikipedia.org/wiki/Reserved_IP_addresses>`__ such as ``"0.0.0.0"`` and ``"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"`` as valid. @@ -1030,7 +1086,7 @@ Returns ``true`` if this string represents a well-formatted IPv4 or IPv6 address .. rst-class:: classref-method -:ref:`String<class_String>` **join** **(** :ref:`PackedStringArray<class_PackedStringArray>` parts **)** |const| +:ref:`String<class_String>` **join**\ (\ parts\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| :ref:`🔗<class_StringName_method_join>` Returns the concatenation of ``parts``' elements, with each element separated by the string calling this method. This method is the opposite of :ref:`split<class_StringName_method_split>`. @@ -1064,7 +1120,7 @@ Returns the concatenation of ``parts``' elements, with each element separated by .. rst-class:: classref-method -:ref:`String<class_String>` **json_escape** **(** **)** |const| +:ref:`String<class_String>` **json_escape**\ (\ ) |const| :ref:`🔗<class_StringName_method_json_escape>` Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use :ref:`c_unescape<class_StringName_method_c_unescape>` to unescape the string, if necessary. @@ -1076,7 +1132,7 @@ Returns a copy of the string with special characters escaped using the JSON stan .. rst-class:: classref-method -:ref:`String<class_String>` **left** **(** :ref:`int<class_int>` length **)** |const| +:ref:`String<class_String>` **left**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_left>` Returns the first ``length`` characters from the beginning of the string. If ``length`` is negative, strips the last ``length`` characters from the string's end. @@ -1093,7 +1149,7 @@ Returns the first ``length`` characters from the beginning of the string. If ``l .. rst-class:: classref-method -:ref:`int<class_int>` **length** **(** **)** |const| +:ref:`int<class_int>` **length**\ (\ ) |const| :ref:`🔗<class_StringName_method_length>` Returns the number of characters in the string. Empty strings (``""``) always return ``0``. See also :ref:`is_empty<class_StringName_method_is_empty>`. @@ -1105,7 +1161,7 @@ Returns the number of characters in the string. Empty strings (``""``) always re .. rst-class:: classref-method -:ref:`String<class_String>` **lpad** **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| +:ref:`String<class_String>` **lpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_StringName_method_lpad>` Formats the string to be at least ``min_length`` long by adding ``character``\ s to the left of the string, if necessary. See also :ref:`rpad<class_StringName_method_rpad>`. @@ -1117,7 +1173,7 @@ Formats the string to be at least ``min_length`` long by adding ``character``\ s .. rst-class:: classref-method -:ref:`String<class_String>` **lstrip** **(** :ref:`String<class_String>` chars **)** |const| +:ref:`String<class_String>` **lstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_lstrip>` Removes a set of characters defined in ``chars`` from the string's beginning. See also :ref:`rstrip<class_StringName_method_rstrip>`. @@ -1131,7 +1187,7 @@ Removes a set of characters defined in ``chars`` from the string's beginning. Se .. rst-class:: classref-method -:ref:`bool<class_bool>` **match** **(** :ref:`String<class_String>` expr **)** |const| +:ref:`bool<class_bool>` **match**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_match>` Does a simple expression match (also called "glob" or "globbing"), where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``. @@ -1143,7 +1199,7 @@ Does a simple expression match (also called "glob" or "globbing"), where ``*`` m .. rst-class:: classref-method -:ref:`bool<class_bool>` **matchn** **(** :ref:`String<class_String>` expr **)** |const| +:ref:`bool<class_bool>` **matchn**\ (\ expr\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_matchn>` Does a simple **case-insensitive** expression match, where ``*`` matches zero or more arbitrary characters and ``?`` matches any single character except a period (``.``). An empty string or empty expression always evaluates to ``false``. @@ -1155,7 +1211,7 @@ Does a simple **case-insensitive** expression match, where ``*`` matches zero or .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **md5_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_md5_buffer>` Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1167,7 +1223,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as a .. rst-class:: classref-method -:ref:`String<class_String>` **md5_text** **(** **)** |const| +:ref:`String<class_String>` **md5_text**\ (\ ) |const| :ref:`🔗<class_StringName_method_md5_text>` Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as another :ref:`String<class_String>`. @@ -1179,7 +1235,7 @@ Returns the `MD5 hash <https://en.wikipedia.org/wiki/MD5>`__ of the string as an .. rst-class:: classref-method -:ref:`int<class_int>` **naturalcasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **naturalcasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_naturalcasecmp_to>` Performs a **case-sensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. @@ -1187,7 +1243,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`, :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`, and :ref:`casecmp_to<class_StringName_method_casecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`, :ref:`filecasecmp_to<class_StringName_method_filecasecmp_to>`, and :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`. .. rst-class:: classref-item-separator @@ -1197,7 +1253,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`int<class_int>` **naturalnocasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **naturalnocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_naturalnocasecmp_to>` Performs a **case-insensitive**, *natural order* comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. @@ -1205,7 +1261,7 @@ When used for sorting, natural order comparison orders sequences of numbers by t With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`, :ref:`nocasecmp_to<class_StringName_method_nocasecmp_to>`, and :ref:`casecmp_to<class_StringName_method_casecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`, :ref:`filenocasecmp_to<class_StringName_method_filenocasecmp_to>`, and :ref:`casecmp_to<class_StringName_method_casecmp_to>`. .. rst-class:: classref-item-separator @@ -1215,13 +1271,13 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`int<class_int>` **nocasecmp_to** **(** :ref:`String<class_String>` to **)** |const| +:ref:`int<class_int>` **nocasecmp_to**\ (\ to\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_nocasecmp_to>` Performs a **case-insensitive** comparison to another string. Returns ``-1`` if less than, ``1`` if greater than, or ``0`` if equal. "Less than" or "greater than" are determined by the `Unicode code points <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__ of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison. With different string lengths, returns ``1`` if this string is longer than the ``to`` string, or ``-1`` if shorter. Note that the length of empty strings is *always* ``0``. -To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to<class_StringName_method_casecmp_to>`, :ref:`naturalcasecmp_to<class_StringName_method_naturalcasecmp_to>`, and :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`. +To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` operator instead. See also :ref:`casecmp_to<class_StringName_method_casecmp_to>`, :ref:`filenocasecmp_to<class_StringName_method_filenocasecmp_to>`, and :ref:`naturalnocasecmp_to<class_StringName_method_naturalnocasecmp_to>`. .. rst-class:: classref-item-separator @@ -1231,7 +1287,7 @@ To get a :ref:`bool<class_bool>` result from a string comparison, use the ``==`` .. rst-class:: classref-method -:ref:`String<class_String>` **pad_decimals** **(** :ref:`int<class_int>` digits **)** |const| +:ref:`String<class_String>` **pad_decimals**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_pad_decimals>` Formats the string representing a number to have an exact number of ``digits`` *after* the decimal point. @@ -1243,7 +1299,7 @@ Formats the string representing a number to have an exact number of ``digits`` * .. rst-class:: classref-method -:ref:`String<class_String>` **pad_zeros** **(** :ref:`int<class_int>` digits **)** |const| +:ref:`String<class_String>` **pad_zeros**\ (\ digits\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_pad_zeros>` Formats the string representing a number to have an exact number of ``digits`` *before* the decimal point. @@ -1255,7 +1311,7 @@ Formats the string representing a number to have an exact number of ``digits`` * .. rst-class:: classref-method -:ref:`String<class_String>` **path_join** **(** :ref:`String<class_String>` file **)** |const| +:ref:`String<class_String>` **path_join**\ (\ file\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_path_join>` Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if necessary. @@ -1269,7 +1325,7 @@ Concatenates ``file`` at the end of the string as a subpath, adding ``/`` if nec .. rst-class:: classref-method -:ref:`String<class_String>` **repeat** **(** :ref:`int<class_int>` count **)** |const| +:ref:`String<class_String>` **repeat**\ (\ count\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_repeat>` Repeats this string a number of times. ``count`` needs to be greater than ``0``. Otherwise, returns an empty string. @@ -1281,7 +1337,7 @@ Repeats this string a number of times. ``count`` needs to be greater than ``0``. .. rst-class:: classref-method -:ref:`String<class_String>` **replace** **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| +:ref:`String<class_String>` **replace**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_replace>` Replaces all occurrences of ``what`` inside the string with the given ``forwhat``. @@ -1293,7 +1349,7 @@ Replaces all occurrences of ``what`` inside the string with the given ``forwhat` .. rst-class:: classref-method -:ref:`String<class_String>` **replacen** **(** :ref:`String<class_String>` what, :ref:`String<class_String>` forwhat **)** |const| +:ref:`String<class_String>` **replacen**\ (\ what\: :ref:`String<class_String>`, forwhat\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_replacen>` Replaces all **case-insensitive** occurrences of ``what`` inside the string with the given ``forwhat``. @@ -1301,11 +1357,23 @@ Replaces all **case-insensitive** occurrences of ``what`` inside the string with ---- +.. _class_StringName_method_reverse: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **reverse**\ (\ ) |const| :ref:`🔗<class_StringName_method_reverse>` + +Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis. + +.. rst-class:: classref-item-separator + +---- + .. _class_StringName_method_rfind: .. rst-class:: classref-method -:ref:`int<class_int>` **rfind** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfind**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_StringName_method_rfind>` Returns the index of the **last** occurrence of ``what`` in this string, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`find<class_StringName_method_find>`. @@ -1317,7 +1385,7 @@ Returns the index of the **last** occurrence of ``what`` in this string, or ``-1 .. rst-class:: classref-method -:ref:`int<class_int>` **rfindn** **(** :ref:`String<class_String>` what, :ref:`int<class_int>` from=-1 **)** |const| +:ref:`int<class_int>` **rfindn**\ (\ what\: :ref:`String<class_String>`, from\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_StringName_method_rfindn>` Returns the index of the **last** **case-insensitive** occurrence of ``what`` in this string, or ``-1`` if there are none. The starting search index can be specified with ``from``, continuing to the beginning of the string. This method is the reverse of :ref:`findn<class_StringName_method_findn>`. @@ -1329,7 +1397,7 @@ Returns the index of the **last** **case-insensitive** occurrence of ``what`` in .. rst-class:: classref-method -:ref:`String<class_String>` **right** **(** :ref:`int<class_int>` length **)** |const| +:ref:`String<class_String>` **right**\ (\ length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_right>` Returns the last ``length`` characters from the end of the string. If ``length`` is negative, strips the first ``length`` characters from the string's beginning. @@ -1346,7 +1414,7 @@ Returns the last ``length`` characters from the end of the string. If ``length`` .. rst-class:: classref-method -:ref:`String<class_String>` **rpad** **(** :ref:`int<class_int>` min_length, :ref:`String<class_String>` character=" " **)** |const| +:ref:`String<class_String>` **rpad**\ (\ min_length\: :ref:`int<class_int>`, character\: :ref:`String<class_String>` = " "\ ) |const| :ref:`🔗<class_StringName_method_rpad>` Formats the string to be at least ``min_length`` long, by adding ``character``\ s to the right of the string, if necessary. See also :ref:`lpad<class_StringName_method_lpad>`. @@ -1358,7 +1426,7 @@ Formats the string to be at least ``min_length`` long, by adding ``character``\ .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **rsplit** **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **rsplit**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_rsplit>` Splits the string using a ``delimiter`` and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If ``delimiter`` is an empty string, each substring will be a single character. @@ -1394,7 +1462,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max .. rst-class:: classref-method -:ref:`String<class_String>` **rstrip** **(** :ref:`String<class_String>` chars **)** |const| +:ref:`String<class_String>` **rstrip**\ (\ chars\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_rstrip>` Removes a set of characters defined in ``chars`` from the string's end. See also :ref:`lstrip<class_StringName_method_lstrip>`. @@ -1408,7 +1476,7 @@ Removes a set of characters defined in ``chars`` from the string's end. See also .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **sha1_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_sha1_buffer>` Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1420,7 +1488,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a .. rst-class:: classref-method -:ref:`String<class_String>` **sha1_text** **(** **)** |const| +:ref:`String<class_String>` **sha1_text**\ (\ ) |const| :ref:`🔗<class_StringName_method_sha1_text>` Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string as another :ref:`String<class_String>`. @@ -1432,7 +1500,7 @@ Returns the `SHA-1 <https://en.wikipedia.org/wiki/SHA-1>`__ hash of the string a .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **sha256_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_sha256_buffer>` Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as a :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1444,7 +1512,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string .. rst-class:: classref-method -:ref:`String<class_String>` **sha256_text** **(** **)** |const| +:ref:`String<class_String>` **sha256_text**\ (\ ) |const| :ref:`🔗<class_StringName_method_sha256_text>` Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string as another :ref:`String<class_String>`. @@ -1456,7 +1524,7 @@ Returns the `SHA-256 <https://en.wikipedia.org/wiki/SHA-2>`__ hash of the string .. rst-class:: classref-method -:ref:`float<class_float>` **similarity** **(** :ref:`String<class_String>` text **)** |const| +:ref:`float<class_float>` **similarity**\ (\ text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_similarity>` Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient>`__) of this string compared to another. A result of ``1.0`` means totally similar, while ``0.0`` means totally dissimilar. @@ -1475,7 +1543,7 @@ Returns the similarity index (`Sorensen-Dice coefficient <https://en.wikipedia.o .. rst-class:: classref-method -:ref:`String<class_String>` **simplify_path** **(** **)** |const| +:ref:`String<class_String>` **simplify_path**\ (\ ) |const| :ref:`🔗<class_StringName_method_simplify_path>` If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without ``"./"``, and all the unnecessary ``".."`` and ``"/"``. @@ -1492,7 +1560,7 @@ If the string is a valid file path, converts the string into a canonical path. T .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **split** **(** :ref:`String<class_String>` delimiter="", :ref:`bool<class_bool>` allow_empty=true, :ref:`int<class_int>` maxsplit=0 **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **split**\ (\ delimiter\: :ref:`String<class_String>` = "", allow_empty\: :ref:`bool<class_bool>` = true, maxsplit\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_StringName_method_split>` Splits the string using a ``delimiter`` and returns an array of the substrings. If ``delimiter`` is an empty string, each substring will be a single character. This method is the opposite of :ref:`join<class_StringName_method_join>`. @@ -1535,7 +1603,7 @@ If ``maxsplit`` is greater than ``0``, the number of splits may not exceed ``max .. rst-class:: classref-method -:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats** **(** :ref:`String<class_String>` delimiter, :ref:`bool<class_bool>` allow_empty=true **)** |const| +:ref:`PackedFloat64Array<class_PackedFloat64Array>` **split_floats**\ (\ delimiter\: :ref:`String<class_String>`, allow_empty\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_StringName_method_split_floats>` Splits the string into floats by using a ``delimiter`` and returns a :ref:`PackedFloat64Array<class_PackedFloat64Array>`. @@ -1555,7 +1623,7 @@ If ``allow_empty`` is ``false``, empty or invalid :ref:`float<class_float>` conv .. rst-class:: classref-method -:ref:`String<class_String>` **strip_edges** **(** :ref:`bool<class_bool>` left=true, :ref:`bool<class_bool>` right=true **)** |const| +:ref:`String<class_String>` **strip_edges**\ (\ left\: :ref:`bool<class_bool>` = true, right\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_StringName_method_strip_edges>` Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations (``\t``), and newlines (``\n`` ``\r``). @@ -1569,7 +1637,7 @@ If ``left`` is ``false``, ignores the string's beginning. Likewise, if ``right`` .. rst-class:: classref-method -:ref:`String<class_String>` **strip_escapes** **(** **)** |const| +:ref:`String<class_String>` **strip_escapes**\ (\ ) |const| :ref:`🔗<class_StringName_method_strip_escapes>` Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation (``\t``) and newline (``\n``, ``\r``) characters, but *not* spaces. @@ -1581,7 +1649,7 @@ Strips all escape characters from the string. These include all non-printable co .. rst-class:: classref-method -:ref:`String<class_String>` **substr** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` len=-1 **)** |const| +:ref:`String<class_String>` **substr**\ (\ from\: :ref:`int<class_int>`, len\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_StringName_method_substr>` Returns part of the string from the position ``from`` with length ``len``. If ``len`` is ``-1`` (as by default), returns the rest of the string starting from the given position. @@ -1593,7 +1661,7 @@ Returns part of the string from the position ``from`` with length ``len``. If `` .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_ascii_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_ascii_buffer>` Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin-1 encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly faster than :ref:`to_utf8_buffer<class_StringName_method_to_utf8_buffer>`, but replaces all unsupported characters with spaces. @@ -1605,7 +1673,7 @@ Converts the string to an `ASCII <https://en.wikipedia.org/wiki/ASCII>`__/Latin- .. rst-class:: classref-method -:ref:`String<class_String>` **to_camel_case** **(** **)** |const| +:ref:`String<class_String>` **to_camel_case**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_camel_case>` Returns the string converted to ``camelCase``. @@ -1617,7 +1685,7 @@ Returns the string converted to ``camelCase``. .. rst-class:: classref-method -:ref:`float<class_float>` **to_float** **(** **)** |const| +:ref:`float<class_float>` **to_float**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_float>` Converts the string representing a decimal number into a :ref:`float<class_float>`. This method stops on the first non-number character, except the first decimal point (``.``) and the exponent letter (``e``). See also :ref:`is_valid_float<class_StringName_method_is_valid_float>`. @@ -1637,7 +1705,7 @@ Converts the string representing a decimal number into a :ref:`float<class_float .. rst-class:: classref-method -:ref:`int<class_int>` **to_int** **(** **)** |const| +:ref:`int<class_int>` **to_int**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_int>` Converts the string representing an integer number into an :ref:`int<class_int>`. This method removes any non-number character and stops at the first decimal point (``.``). See also :ref:`is_valid_int<class_StringName_method_is_valid_int>`. @@ -1656,9 +1724,9 @@ Converts the string representing an integer number into an :ref:`int<class_int>` .. rst-class:: classref-method -:ref:`String<class_String>` **to_lower** **(** **)** |const| +:ref:`String<class_String>` **to_lower**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_lower>` -Returns the string converted to lowercase. +Returns the string converted to ``lowercase``. .. rst-class:: classref-item-separator @@ -1668,7 +1736,7 @@ Returns the string converted to lowercase. .. rst-class:: classref-method -:ref:`String<class_String>` **to_pascal_case** **(** **)** |const| +:ref:`String<class_String>` **to_pascal_case**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_pascal_case>` Returns the string converted to ``PascalCase``. @@ -1680,10 +1748,29 @@ Returns the string converted to ``PascalCase``. .. rst-class:: classref-method -:ref:`String<class_String>` **to_snake_case** **(** **)** |const| +:ref:`String<class_String>` **to_snake_case**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_snake_case>` Returns the string converted to ``snake_case``. +\ **Note:** Numbers followed by a *single* letter are not separated in the conversion to keep some words (such as "2D") together. + + +.. tabs:: + + .. code-tab:: gdscript + + "Node2D".to_snake_case() # Returns "node_2d" + "2nd place".to_snake_case() # Returns "2_nd_place" + "Texture3DAssetFolder".to_snake_case() # Returns "texture_3d_asset_folder" + + .. code-tab:: csharp + + "Node2D".ToSnakeCase(); // Returns "node_2d" + "2nd place".ToSnakeCase(); // Returns "2_nd_place" + "Texture3DAssetFolder".ToSnakeCase(); // Returns "texture_3d_asset_folder" + + + .. rst-class:: classref-item-separator ---- @@ -1692,9 +1779,9 @@ Returns the string converted to ``snake_case``. .. rst-class:: classref-method -:ref:`String<class_String>` **to_upper** **(** **)** |const| +:ref:`String<class_String>` **to_upper**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_upper>` -Returns the string converted to uppercase. +Returns the string converted to ``UPPERCASE``. .. rst-class:: classref-item-separator @@ -1704,7 +1791,7 @@ Returns the string converted to uppercase. .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf8_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_utf8_buffer>` Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. This method is slightly slower than :ref:`to_ascii_buffer<class_StringName_method_to_ascii_buffer>`, but supports all UTF-8 characters. For most cases, prefer using this method. @@ -1716,7 +1803,7 @@ Converts the string to a `UTF-8 <https://en.wikipedia.org/wiki/UTF-8>`__ encoded .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf16_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_utf16_buffer>` Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1728,7 +1815,7 @@ Converts the string to a `UTF-16 <https://en.wikipedia.org/wiki/UTF-16>`__ encod .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_utf32_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_utf32_buffer>` Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encoded :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1740,7 +1827,7 @@ Converts the string to a `UTF-32 <https://en.wikipedia.org/wiki/UTF-32>`__ encod .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **to_wchar_buffer**\ (\ ) |const| :ref:`🔗<class_StringName_method_to_wchar_buffer>` Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_character>`__ (``wchar_t``, UTF-16 on Windows, UTF-32 on other platforms) encoded :ref:`PackedByteArray<class_PackedByteArray>`. @@ -1752,7 +1839,7 @@ Converts the string to a `wide character <https://en.wikipedia.org/wiki/Wide_cha .. rst-class:: classref-method -:ref:`String<class_String>` **trim_prefix** **(** :ref:`String<class_String>` prefix **)** |const| +:ref:`String<class_String>` **trim_prefix**\ (\ prefix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_trim_prefix>` Removes the given ``prefix`` from the start of the string, or returns the string unchanged. @@ -1764,7 +1851,7 @@ Removes the given ``prefix`` from the start of the string, or returns the string .. rst-class:: classref-method -:ref:`String<class_String>` **trim_suffix** **(** :ref:`String<class_String>` suffix **)** |const| +:ref:`String<class_String>` **trim_suffix**\ (\ suffix\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_StringName_method_trim_suffix>` Removes the given ``suffix`` from the end of the string, or returns the string unchanged. @@ -1776,7 +1863,7 @@ Removes the given ``suffix`` from the end of the string, or returns the string u .. rst-class:: classref-method -:ref:`int<class_int>` **unicode_at** **(** :ref:`int<class_int>` at **)** |const| +:ref:`int<class_int>` **unicode_at**\ (\ at\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_StringName_method_unicode_at>` Returns the character code at position ``at``. @@ -1788,7 +1875,7 @@ Returns the character code at position ``at``. .. rst-class:: classref-method -:ref:`String<class_String>` **uri_decode** **(** **)** |const| +:ref:`String<class_String>` **uri_decode**\ (\ ) |const| :ref:`🔗<class_StringName_method_uri_decode>` Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. @@ -1815,7 +1902,7 @@ Decodes the string from its URL-encoded format. This method is meant to properly .. rst-class:: classref-method -:ref:`String<class_String>` **uri_encode** **(** **)** |const| +:ref:`String<class_String>` **uri_encode**\ (\ ) |const| :ref:`🔗<class_StringName_method_uri_encode>` Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. @@ -1846,7 +1933,7 @@ Encodes the string to URL-friendly format. This method is meant to properly enco .. rst-class:: classref-method -:ref:`String<class_String>` **validate_filename** **(** **)** |const| +:ref:`String<class_String>` **validate_filename**\ (\ ) |const| :ref:`🔗<class_StringName_method_validate_filename>` Returns a copy of the string with all characters that are not allowed in :ref:`is_valid_filename<class_StringName_method_is_valid_filename>` replaced with underscores. @@ -1858,7 +1945,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`i .. rst-class:: classref-method -:ref:`String<class_String>` **validate_node_name** **(** **)** |const| +:ref:`String<class_String>` **validate_node_name**\ (\ ) |const| :ref:`🔗<class_StringName_method_validate_node_name>` Returns a copy of the string with all characters that are not allowed in :ref:`Node.name<class_Node_property_name>` (``.`` ``:`` ``@`` ``/`` ``"`` ``%``) replaced with underscores. @@ -1870,7 +1957,7 @@ Returns a copy of the string with all characters that are not allowed in :ref:`N .. rst-class:: classref-method -:ref:`String<class_String>` **xml_escape** **(** :ref:`bool<class_bool>` escape_quotes=false **)** |const| +:ref:`String<class_String>` **xml_escape**\ (\ escape_quotes\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_StringName_method_xml_escape>` Returns a copy of the string with special characters escaped using the XML standard. If ``escape_quotes`` is ``true``, the single quote (``'``) and double quote (``"``) characters are also escaped. @@ -1882,7 +1969,7 @@ Returns a copy of the string with special characters escaped using the XML stand .. rst-class:: classref-method -:ref:`String<class_String>` **xml_unescape** **(** **)** |const| +:ref:`String<class_String>` **xml_unescape**\ (\ ) |const| :ref:`🔗<class_StringName_method_xml_unescape>` Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard. @@ -1899,7 +1986,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_StringName_operator_neq_String>` Returns ``true`` if this **StringName** is not equivalent to the given :ref:`String<class_String>`. @@ -1911,7 +1998,7 @@ Returns ``true`` if this **StringName** is not equivalent to the given :ref:`Str .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_neq_StringName>` Returns ``true`` if the **StringName** and ``right`` do not refer to the same name. Comparisons between **StringName**\ s are much faster than regular :ref:`String<class_String>` comparisons. @@ -1923,7 +2010,7 @@ Returns ``true`` if the **StringName** and ``right`` do not refer to the same na .. rst-class:: classref-operator -:ref:`String<class_String>` **operator %** **(** :ref:`Variant<class_Variant>` right **)** +:ref:`String<class_String>` **operator %**\ (\ right\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_StringName_operator_mod_Variant>` Formats the **StringName**, replacing the placeholders with one or more parameters, returning a :ref:`String<class_String>`. To pass multiple parameters, ``right`` needs to be an :ref:`Array<class_Array>`. @@ -1939,7 +2026,7 @@ For more information, see the :doc:`GDScript format strings <../tutorials/script .. rst-class:: classref-operator -:ref:`String<class_String>` **operator +** **(** :ref:`String<class_String>` right **)** +:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_StringName_operator_sum_String>` Appends ``right`` at the end of this **StringName**, returning a :ref:`String<class_String>`. This is also known as a string concatenation. @@ -1951,7 +2038,7 @@ Appends ``right`` at the end of this **StringName**, returning a :ref:`String<cl .. rst-class:: classref-operator -:ref:`String<class_String>` **operator +** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`String<class_String>` **operator +**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_sum_StringName>` Appends ``right`` at the end of this **StringName**, returning a :ref:`String<class_String>`. This is also known as a string concatenation. @@ -1963,7 +2050,7 @@ Appends ``right`` at the end of this **StringName**, returning a :ref:`String<cl .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_lt_StringName>` Returns ``true`` if the left **StringName**'s pointer comes before ``right``. Note that this will not match their `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__. @@ -1975,7 +2062,7 @@ Returns ``true`` if the left **StringName**'s pointer comes before ``right``. No .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_lte_StringName>` Returns ``true`` if the left **StringName**'s pointer comes before ``right`` or if they are the same. Note that this will not match their `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__. @@ -1987,7 +2074,7 @@ Returns ``true`` if the left **StringName**'s pointer comes before ``right`` or .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`String<class_String>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`String<class_String>`\ ) :ref:`🔗<class_StringName_operator_eq_String>` Returns ``true`` if this **StringName** is equivalent to the given :ref:`String<class_String>`. @@ -1999,7 +2086,7 @@ Returns ``true`` if this **StringName** is equivalent to the given :ref:`String< .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_eq_StringName>` Returns ``true`` if the **StringName** and ``right`` refer to the same name. Comparisons between **StringName**\ s are much faster than regular :ref:`String<class_String>` comparisons. @@ -2011,7 +2098,7 @@ Returns ``true`` if the **StringName** and ``right`` refer to the same name. Com .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_gt_StringName>` Returns ``true`` if the left **StringName**'s pointer comes after ``right``. Note that this will not match their `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__. @@ -2023,7 +2110,7 @@ Returns ``true`` if the left **StringName**'s pointer comes after ``right``. Not .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`StringName<class_StringName>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_StringName_operator_gte_StringName>` Returns ``true`` if the left **StringName**'s pointer comes after ``right`` or if they are the same. Note that this will not match their `Unicode order <https://en.wikipedia.org/wiki/List_of_Unicode_characters>`__. @@ -2034,3 +2121,4 @@ Returns ``true`` if the left **StringName**'s pointer comes after ``right`` or i .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_stylebox.rst b/classes/class_stylebox.rst index 093b43c1086..9f4c6290dad 100644 --- a/classes/class_stylebox.rst +++ b/classes/class_stylebox.rst @@ -52,31 +52,31 @@ Methods :widths: auto +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw<class_StyleBox_method__draw>` **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| | + | |void| | :ref:`_draw<class_StyleBox_private_method__draw>`\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`_get_draw_rect<class_StyleBox_method__get_draw_rect>` **(** :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| | + | :ref:`Rect2<class_Rect2>` | :ref:`_get_draw_rect<class_StyleBox_private_method__get_draw_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_minimum_size<class_StyleBox_method__get_minimum_size>` **(** **)** |virtual| |const| | + | :ref:`Vector2<class_Vector2>` | :ref:`_get_minimum_size<class_StyleBox_private_method__get_minimum_size>`\ (\ ) |virtual| |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_test_mask<class_StyleBox_method__test_mask>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| | + | :ref:`bool<class_bool>` | :ref:`_test_mask<class_StyleBox_private_method__test_mask>`\ (\ point\: :ref:`Vector2<class_Vector2>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw<class_StyleBox_method_draw>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect **)** |const| | + | |void| | :ref:`draw<class_StyleBox_method_draw>`\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_content_margin<class_StyleBox_method_get_content_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | + | :ref:`float<class_float>` | :ref:`get_content_margin<class_StyleBox_method_get_content_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CanvasItem<class_CanvasItem>` | :ref:`get_current_item_drawn<class_StyleBox_method_get_current_item_drawn>` **(** **)** |const| | + | :ref:`CanvasItem<class_CanvasItem>` | :ref:`get_current_item_drawn<class_StyleBox_method_get_current_item_drawn>`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_margin<class_StyleBox_method_get_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | + | :ref:`float<class_float>` | :ref:`get_margin<class_StyleBox_method_get_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_minimum_size<class_StyleBox_method_get_minimum_size>` **(** **)** |const| | + | :ref:`Vector2<class_Vector2>` | :ref:`get_minimum_size<class_StyleBox_method_get_minimum_size>`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_offset<class_StyleBox_method_get_offset>` **(** **)** |const| | + | :ref:`Vector2<class_Vector2>` | :ref:`get_offset<class_StyleBox_method_get_offset>`\ (\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_content_margin<class_StyleBox_method_set_content_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** | + | |void| | :ref:`set_content_margin<class_StyleBox_method_set_content_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_content_margin_all<class_StyleBox_method_set_content_margin_all>` **(** :ref:`float<class_float>` offset **)** | + | |void| | :ref:`set_content_margin_all<class_StyleBox_method_set_content_margin_all>`\ (\ offset\: :ref:`float<class_float>`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`test_mask<class_StyleBox_method_test_mask>` **(** :ref:`Vector2<class_Vector2>` point, :ref:`Rect2<class_Rect2>` rect **)** |const| | + | :ref:`bool<class_bool>` | :ref:`test_mask<class_StyleBox_method_test_mask>`\ (\ point\: :ref:`Vector2<class_Vector2>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -92,16 +92,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **content_margin_bottom** = ``-1.0`` +:ref:`float<class_float>` **content_margin_bottom** = ``-1.0`` :ref:`🔗<class_StyleBox_property_content_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** -- :ref:`float<class_float>` **get_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. -If this value is negative, it is ignored and a child-specific margin is used instead. For example for :ref:`StyleBoxFlat<class_StyleBoxFlat>` the border thickness (if any) is used instead. +If this value is negative, it is ignored and a child-specific margin is used instead. For example, for :ref:`StyleBoxFlat<class_StyleBoxFlat>`, the border thickness (if any) is used instead. It is up to the code using this style box to decide what these contents are: for example, a :ref:`Button<class_Button>` respects this content margin for the textual contents of the button. @@ -115,14 +115,14 @@ It is up to the code using this style box to decide what these contents are: for .. rst-class:: classref-property -:ref:`float<class_float>` **content_margin_left** = ``-1.0`` +:ref:`float<class_float>` **content_margin_left** = ``-1.0`` :ref:`🔗<class_StyleBox_property_content_margin_left>` .. rst-class:: classref-property-setget -- void **set_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** -- :ref:`float<class_float>` **get_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| -The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. +The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bottom>` for extra considerations. @@ -134,12 +134,12 @@ Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bott .. rst-class:: classref-property -:ref:`float<class_float>` **content_margin_right** = ``-1.0`` +:ref:`float<class_float>` **content_margin_right** = ``-1.0`` :ref:`🔗<class_StyleBox_property_content_margin_right>` .. rst-class:: classref-property-setget -- void **set_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** -- :ref:`float<class_float>` **get_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. @@ -153,12 +153,12 @@ Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bott .. rst-class:: classref-property -:ref:`float<class_float>` **content_margin_top** = ``-1.0`` +:ref:`float<class_float>` **content_margin_top** = ``-1.0`` :ref:`🔗<class_StyleBox_property_content_margin_top>` .. rst-class:: classref-property-setget -- void **set_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** -- :ref:`float<class_float>` **get_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. @@ -173,11 +173,11 @@ Refer to :ref:`content_margin_bottom<class_StyleBox_property_content_margin_bott Method Descriptions ------------------- -.. _class_StyleBox_method__draw: +.. _class_StyleBox_private_method__draw: .. rst-class:: classref-method -void **_draw** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| +|void| **_draw**\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| :ref:`🔗<class_StyleBox_private_method__draw>` .. container:: contribute @@ -187,11 +187,11 @@ void **_draw** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rec ---- -.. _class_StyleBox_method__get_draw_rect: +.. _class_StyleBox_private_method__get_draw_rect: .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **_get_draw_rect** **(** :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| +:ref:`Rect2<class_Rect2>` **_get_draw_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| :ref:`🔗<class_StyleBox_private_method__get_draw_rect>` .. container:: contribute @@ -201,11 +201,11 @@ void **_draw** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rec ---- -.. _class_StyleBox_method__get_minimum_size: +.. _class_StyleBox_private_method__get_minimum_size: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_minimum_size** **(** **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_get_minimum_size**\ (\ ) |virtual| |const| :ref:`🔗<class_StyleBox_private_method__get_minimum_size>` Virtual method to be implemented by the user. Returns a custom minimum size that the stylebox must respect when drawing. By default :ref:`get_minimum_size<class_StyleBox_method_get_minimum_size>` only takes content margins into account. This method can be overridden to add another size restriction. A combination of the default behavior and the output of this method will be used, to account for both sizes. @@ -213,11 +213,11 @@ Virtual method to be implemented by the user. Returns a custom minimum size that ---- -.. _class_StyleBox_method__test_mask: +.. _class_StyleBox_private_method__test_mask: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_test_mask** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Rect2<class_Rect2>` rect **)** |virtual| |const| +:ref:`bool<class_bool>` **_test_mask**\ (\ point\: :ref:`Vector2<class_Vector2>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |const| :ref:`🔗<class_StyleBox_private_method__test_mask>` .. container:: contribute @@ -231,7 +231,7 @@ Virtual method to be implemented by the user. Returns a custom minimum size that .. rst-class:: classref-method -void **draw** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect **)** |const| +|void| **draw**\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_StyleBox_method_draw>` Draws this stylebox using a canvas item identified by the given :ref:`RID<class_RID>`. @@ -245,7 +245,7 @@ The :ref:`RID<class_RID>` value can either be the result of :ref:`CanvasItem.get .. rst-class:: classref-method -:ref:`float<class_float>` **get_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`float<class_float>` **get_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBox_method_get_content_margin>` Returns the default margin of the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -257,9 +257,9 @@ Returns the default margin of the specified :ref:`Side<enum_@GlobalScope_Side>`. .. rst-class:: classref-method -:ref:`CanvasItem<class_CanvasItem>` **get_current_item_drawn** **(** **)** |const| +:ref:`CanvasItem<class_CanvasItem>` **get_current_item_drawn**\ (\ ) |const| :ref:`🔗<class_StyleBox_method_get_current_item_drawn>` -Returns the :ref:`CanvasItem<class_CanvasItem>` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW<class_CanvasItem_constant_NOTIFICATION_DRAW>` or :ref:`CanvasItem._draw<class_CanvasItem_method__draw>` callback at this moment. +Returns the :ref:`CanvasItem<class_CanvasItem>` that handles its :ref:`CanvasItem.NOTIFICATION_DRAW<class_CanvasItem_constant_NOTIFICATION_DRAW>` or :ref:`CanvasItem._draw<class_CanvasItem_private_method__draw>` callback at this moment. .. rst-class:: classref-item-separator @@ -269,7 +269,7 @@ Returns the :ref:`CanvasItem<class_CanvasItem>` that handles its :ref:`CanvasIte .. rst-class:: classref-method -:ref:`float<class_float>` **get_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`float<class_float>` **get_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBox_method_get_margin>` Returns the content margin offset for the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -283,7 +283,7 @@ Positive values reduce size inwards, unlike :ref:`Control<class_Control>`'s marg .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_minimum_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_minimum_size**\ (\ ) |const| :ref:`🔗<class_StyleBox_method_get_minimum_size>` Returns the minimum size that this stylebox can be shrunk to. @@ -295,7 +295,7 @@ Returns the minimum size that this stylebox can be shrunk to. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_offset** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) |const| :ref:`🔗<class_StyleBox_method_get_offset>` Returns the "offset" of a stylebox. This helper function returns a value equivalent to ``Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))``. @@ -307,7 +307,7 @@ Returns the "offset" of a stylebox. This helper function returns a value equival .. rst-class:: classref-method -void **set_content_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` offset **)** +|void| **set_content_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBox_method_set_content_margin>` Sets the default value of the specified :ref:`Side<enum_@GlobalScope_Side>` to ``offset`` pixels. @@ -319,7 +319,7 @@ Sets the default value of the specified :ref:`Side<enum_@GlobalScope_Side>` to ` .. rst-class:: classref-method -void **set_content_margin_all** **(** :ref:`float<class_float>` offset **)** +|void| **set_content_margin_all**\ (\ offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBox_method_set_content_margin_all>` Sets the default margin to ``offset`` pixels for all sides. @@ -331,7 +331,7 @@ Sets the default margin to ``offset`` pixels for all sides. .. rst-class:: classref-method -:ref:`bool<class_bool>` **test_mask** **(** :ref:`Vector2<class_Vector2>` point, :ref:`Rect2<class_Rect2>` rect **)** |const| +:ref:`bool<class_bool>` **test_mask**\ (\ point\: :ref:`Vector2<class_Vector2>`, rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`🔗<class_StyleBox_method_test_mask>` Test a position in a rectangle, return whether it passes the mask test. @@ -342,3 +342,4 @@ Test a position in a rectangle, return whether it passes the mask test. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_styleboxempty.rst b/classes/class_styleboxempty.rst index 3c0255d0ad2..d4bd63143bc 100644 --- a/classes/class_styleboxempty.rst +++ b/classes/class_styleboxempty.rst @@ -28,3 +28,4 @@ An empty :ref:`StyleBox<class_StyleBox>` that can be used to display nothing ins .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_styleboxflat.rst b/classes/class_styleboxflat.rst index 36a65dcb709..1b8f6d7b08a 100644 --- a/classes/class_styleboxflat.rst +++ b/classes/class_styleboxflat.rst @@ -25,7 +25,7 @@ Setting corner radius to high values is allowed. As soon as corners overlap, the \ **Example:**\ -:: +.. code:: text height = 30 corner_radius_top_left = 50 @@ -33,7 +33,7 @@ Setting corner radius to high values is allowed. As soon as corners overlap, the 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 **never** be more than the height. Result: -:: +.. code:: text corner_radius_top_left: 10 corner_radius_bottom_left: 20 @@ -102,27 +102,27 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_border_width<class_StyleBoxFlat_method_get_border_width>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_border_width_min<class_StyleBoxFlat_method_get_border_width_min>` **(** **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_corner_radius<class_StyleBoxFlat_method_get_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxFlat_method_get_expand_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_border_width<class_StyleBoxFlat_method_set_border_width>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_border_width_all<class_StyleBoxFlat_method_set_border_width_all>` **(** :ref:`int<class_int>` width **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_corner_radius<class_StyleBoxFlat_method_set_corner_radius>` **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>` **(** :ref:`int<class_int>` radius **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_expand_margin<class_StyleBoxFlat_method_set_expand_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_expand_margin_all<class_StyleBoxFlat_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_border_width<class_StyleBoxFlat_method_get_border_width>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_border_width_min<class_StyleBoxFlat_method_get_border_width_min>`\ (\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_corner_radius<class_StyleBoxFlat_method_get_corner_radius>`\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxFlat_method_get_expand_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_border_width<class_StyleBoxFlat_method_set_border_width>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_border_width_all<class_StyleBoxFlat_method_set_border_width_all>`\ (\ width\: :ref:`int<class_int>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_corner_radius<class_StyleBoxFlat_method_set_corner_radius>`\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>`\ (\ radius\: :ref:`int<class_int>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_expand_margin<class_StyleBoxFlat_method_set_expand_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_expand_margin_all<class_StyleBoxFlat_method_set_expand_margin_all>`\ (\ size\: :ref:`float<class_float>`\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -137,12 +137,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **anti_aliasing** = ``true`` +:ref:`bool<class_bool>` **anti_aliasing** = ``true`` :ref:`🔗<class_StyleBoxFlat_property_anti_aliasing>` .. rst-class:: classref-property-setget -- void **set_anti_aliased** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_anti_aliased** **(** **)** +- |void| **set_anti_aliased**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_anti_aliased**\ (\ ) Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or :ref:`skew<class_StyleBoxFlat_property_skew>`. @@ -156,12 +156,12 @@ Antialiasing draws a small ring around the edges, which fades to transparency. A .. rst-class:: classref-property -:ref:`float<class_float>` **anti_aliasing_size** = ``1.0`` +:ref:`float<class_float>` **anti_aliasing_size** = ``1.0`` :ref:`🔗<class_StyleBoxFlat_property_anti_aliasing_size>` .. rst-class:: classref-property-setget -- void **set_aa_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_aa_size** **(** **)** +- |void| **set_aa_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_aa_size**\ (\ ) This changes the size of the antialiasing effect. ``1.0`` is recommended for an optimal result at 100% scale, identical to how rounded rectangles are rendered in web browsers and most vector drawing software. @@ -175,12 +175,12 @@ This changes the size of the antialiasing effect. ``1.0`` is recommended for an .. rst-class:: classref-property -:ref:`Color<class_Color>` **bg_color** = ``Color(0.6, 0.6, 0.6, 1)`` +:ref:`Color<class_Color>` **bg_color** = ``Color(0.6, 0.6, 0.6, 1)`` :ref:`🔗<class_StyleBoxFlat_property_bg_color>` .. rst-class:: classref-property-setget -- void **set_bg_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_bg_color** **(** **)** +- |void| **set_bg_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_bg_color**\ (\ ) The background color of the stylebox. @@ -192,12 +192,12 @@ The background color of the stylebox. .. rst-class:: classref-property -:ref:`bool<class_bool>` **border_blend** = ``false`` +:ref:`bool<class_bool>` **border_blend** = ``false`` :ref:`🔗<class_StyleBoxFlat_property_border_blend>` .. rst-class:: classref-property-setget -- void **set_border_blend** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_border_blend** **(** **)** +- |void| **set_border_blend**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_border_blend**\ (\ ) If ``true``, the border will fade into the background color. @@ -209,12 +209,12 @@ If ``true``, the border will fade into the background color. .. rst-class:: classref-property -:ref:`Color<class_Color>` **border_color** = ``Color(0.8, 0.8, 0.8, 1)`` +:ref:`Color<class_Color>` **border_color** = ``Color(0.8, 0.8, 0.8, 1)`` :ref:`🔗<class_StyleBoxFlat_property_border_color>` .. rst-class:: classref-property-setget -- void **set_border_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_border_color** **(** **)** +- |void| **set_border_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_border_color**\ (\ ) Sets the color of the border. @@ -226,12 +226,12 @@ Sets the color of the border. .. rst-class:: classref-property -:ref:`int<class_int>` **border_width_bottom** = ``0`` +:ref:`int<class_int>` **border_width_bottom** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_border_width_bottom>` .. rst-class:: classref-property-setget -- void **set_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** -- :ref:`int<class_int>` **get_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Border width for the bottom border. @@ -243,12 +243,12 @@ Border width for the bottom border. .. rst-class:: classref-property -:ref:`int<class_int>` **border_width_left** = ``0`` +:ref:`int<class_int>` **border_width_left** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_border_width_left>` .. rst-class:: classref-property-setget -- void **set_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** -- :ref:`int<class_int>` **get_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Border width for the left border. @@ -260,12 +260,12 @@ Border width for the left border. .. rst-class:: classref-property -:ref:`int<class_int>` **border_width_right** = ``0`` +:ref:`int<class_int>` **border_width_right** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_border_width_right>` .. rst-class:: classref-property-setget -- void **set_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** -- :ref:`int<class_int>` **get_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Border width for the right border. @@ -277,12 +277,12 @@ Border width for the right border. .. rst-class:: classref-property -:ref:`int<class_int>` **border_width_top** = ``0`` +:ref:`int<class_int>` **border_width_top** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_border_width_top>` .. rst-class:: classref-property-setget -- void **set_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** -- :ref:`int<class_int>` **get_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Border width for the top border. @@ -294,12 +294,12 @@ Border width for the top border. .. rst-class:: classref-property -:ref:`int<class_int>` **corner_detail** = ``8`` +:ref:`int<class_int>` **corner_detail** = ``8`` :ref:`🔗<class_StyleBoxFlat_property_corner_detail>` .. rst-class:: classref-property-setget -- void **set_corner_detail** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_corner_detail** **(** **)** +- |void| **set_corner_detail**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_corner_detail**\ (\ ) This sets the number 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 (:ref:`set_corner_radius_all<class_StyleBoxFlat_method_set_corner_radius_all>`) into account. @@ -315,12 +315,12 @@ A corner detail of ``1`` will result in chamfered corners instead of rounded cor .. rst-class:: classref-property -:ref:`int<class_int>` **corner_radius_bottom_left** = ``0`` +:ref:`int<class_int>` **corner_radius_bottom_left** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_corner_radius_bottom_left>` .. rst-class:: classref-property-setget -- void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** -- :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| +- |void| **set_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| The bottom-left corner's radius. If ``0``, the corner is not rounded. @@ -332,12 +332,12 @@ The bottom-left corner's radius. If ``0``, the corner is not rounded. .. rst-class:: classref-property -:ref:`int<class_int>` **corner_radius_bottom_right** = ``0`` +:ref:`int<class_int>` **corner_radius_bottom_right** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_corner_radius_bottom_right>` .. rst-class:: classref-property-setget -- void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** -- :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| +- |void| **set_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| The bottom-right corner's radius. If ``0``, the corner is not rounded. @@ -349,12 +349,12 @@ The bottom-right corner's radius. If ``0``, the corner is not rounded. .. rst-class:: classref-property -:ref:`int<class_int>` **corner_radius_top_left** = ``0`` +:ref:`int<class_int>` **corner_radius_top_left** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_corner_radius_top_left>` .. rst-class:: classref-property-setget -- void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** -- :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| +- |void| **set_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| The top-left corner's radius. If ``0``, the corner is not rounded. @@ -366,12 +366,12 @@ The top-left corner's radius. If ``0``, the corner is not rounded. .. rst-class:: classref-property -:ref:`int<class_int>` **corner_radius_top_right** = ``0`` +:ref:`int<class_int>` **corner_radius_top_right** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_corner_radius_top_right>` .. rst-class:: classref-property-setget -- void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** -- :ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| +- |void| **set_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| The top-right corner's radius. If ``0``, the corner is not rounded. @@ -383,12 +383,12 @@ The top-right corner's radius. If ``0``, the corner is not rounded. .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_center** = ``true`` +:ref:`bool<class_bool>` **draw_center** = ``true`` :ref:`🔗<class_StyleBoxFlat_property_draw_center>` .. rst-class:: classref-property-setget -- void **set_draw_center** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_draw_center_enabled** **(** **)** +- |void| **set_draw_center**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_draw_center_enabled**\ (\ ) Toggles drawing of the inner part of the stylebox. @@ -400,12 +400,12 @@ Toggles drawing of the inner part of the stylebox. .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_bottom** = ``0.0`` +:ref:`float<class_float>` **expand_margin_bottom** = ``0.0`` :ref:`🔗<class_StyleBoxFlat_property_expand_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with :ref:`border_width_bottom<class_StyleBoxFlat_property_border_width_bottom>` to draw a border outside the control rect. @@ -419,12 +419,12 @@ Expands the stylebox outside of the control rect on the bottom edge. Useful in c .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_left** = ``0.0`` +:ref:`float<class_float>` **expand_margin_left** = ``0.0`` :ref:`🔗<class_StyleBoxFlat_property_expand_margin_left>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the stylebox outside of the control rect on the left edge. Useful in combination with :ref:`border_width_left<class_StyleBoxFlat_property_border_width_left>` to draw a border outside the control rect. @@ -438,12 +438,12 @@ Expands the stylebox outside of the control rect on the left edge. Useful in com .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_right** = ``0.0`` +:ref:`float<class_float>` **expand_margin_right** = ``0.0`` :ref:`🔗<class_StyleBoxFlat_property_expand_margin_right>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the stylebox outside of the control rect on the right edge. Useful in combination with :ref:`border_width_right<class_StyleBoxFlat_property_border_width_right>` to draw a border outside the control rect. @@ -457,12 +457,12 @@ Expands the stylebox outside of the control rect on the right edge. Useful in co .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_top** = ``0.0`` +:ref:`float<class_float>` **expand_margin_top** = ``0.0`` :ref:`🔗<class_StyleBoxFlat_property_expand_margin_top>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the stylebox outside of the control rect on the top edge. Useful in combination with :ref:`border_width_top<class_StyleBoxFlat_property_border_width_top>` to draw a border outside the control rect. @@ -476,12 +476,12 @@ Expands the stylebox outside of the control rect on the top edge. Useful in comb .. rst-class:: classref-property -:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0.6)`` +:ref:`Color<class_Color>` **shadow_color** = ``Color(0, 0, 0, 0.6)`` :ref:`🔗<class_StyleBoxFlat_property_shadow_color>` .. rst-class:: classref-property-setget -- void **set_shadow_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_shadow_color** **(** **)** +- |void| **set_shadow_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_shadow_color**\ (\ ) The color of the shadow. This has no effect if :ref:`shadow_size<class_StyleBoxFlat_property_shadow_size>` is lower than 1. @@ -493,12 +493,12 @@ The color of the shadow. This has no effect if :ref:`shadow_size<class_StyleBoxF .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **shadow_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **shadow_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_StyleBoxFlat_property_shadow_offset>` .. rst-class:: classref-property-setget -- void **set_shadow_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_shadow_offset** **(** **)** +- |void| **set_shadow_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_shadow_offset**\ (\ ) The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox. @@ -510,12 +510,12 @@ The shadow offset in pixels. Adjusts the position of the shadow relatively to th .. rst-class:: classref-property -:ref:`int<class_int>` **shadow_size** = ``0`` +:ref:`int<class_int>` **shadow_size** = ``0`` :ref:`🔗<class_StyleBoxFlat_property_shadow_size>` .. rst-class:: classref-property-setget -- void **set_shadow_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_shadow_size** **(** **)** +- |void| **set_shadow_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_shadow_size**\ (\ ) The shadow size in pixels. @@ -527,12 +527,12 @@ The shadow size in pixels. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **skew** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **skew** = ``Vector2(0, 0)`` :ref:`🔗<class_StyleBoxFlat_property_skew>` .. rst-class:: classref-property-setget -- void **set_skew** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_skew** **(** **)** +- |void| **set_skew**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_skew**\ (\ ) If set to a non-zero value on either axis, :ref:`skew<class_StyleBoxFlat_property_skew>` distorts the StyleBox horizontally and/or vertically. This can be used for "futuristic"-style UIs. Positive values skew the StyleBox towards the right (X axis) and upwards (Y axis), while negative values skew the StyleBox towards the left (X axis) and downwards (Y axis). @@ -551,7 +551,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`int<class_int>` **get_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBoxFlat_method_get_border_width>` Returns the specified :ref:`Side<enum_@GlobalScope_Side>`'s border width. @@ -563,7 +563,7 @@ Returns the specified :ref:`Side<enum_@GlobalScope_Side>`'s border width. .. rst-class:: classref-method -:ref:`int<class_int>` **get_border_width_min** **(** **)** |const| +:ref:`int<class_int>` **get_border_width_min**\ (\ ) |const| :ref:`🔗<class_StyleBoxFlat_method_get_border_width_min>` Returns the smallest border width out of all four borders. @@ -575,7 +575,7 @@ Returns the smallest border width out of all four borders. .. rst-class:: classref-method -:ref:`int<class_int>` **get_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner **)** |const| +:ref:`int<class_int>` **get_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`\ ) |const| :ref:`🔗<class_StyleBoxFlat_method_get_corner_radius>` Returns the given ``corner``'s radius. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values. @@ -587,7 +587,7 @@ Returns the given ``corner``'s radius. See :ref:`Corner<enum_@GlobalScope_Corner .. rst-class:: classref-method -:ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBoxFlat_method_get_expand_margin>` Returns the size of the specified :ref:`Side<enum_@GlobalScope_Side>`'s expand margin. @@ -599,7 +599,7 @@ Returns the size of the specified :ref:`Side<enum_@GlobalScope_Side>`'s expand m .. rst-class:: classref-method -void **set_border_width** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` width **)** +|void| **set_border_width**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_border_width>` Sets the specified :ref:`Side<enum_@GlobalScope_Side>`'s border width to ``width`` pixels. @@ -611,7 +611,7 @@ Sets the specified :ref:`Side<enum_@GlobalScope_Side>`'s border width to ``width .. rst-class:: classref-method -void **set_border_width_all** **(** :ref:`int<class_int>` width **)** +|void| **set_border_width_all**\ (\ width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_border_width_all>` Sets the border width to ``width`` pixels for all sides. @@ -623,7 +623,7 @@ Sets the border width to ``width`` pixels for all sides. .. rst-class:: classref-method -void **set_corner_radius** **(** :ref:`Corner<enum_@GlobalScope_Corner>` corner, :ref:`int<class_int>` radius **)** +|void| **set_corner_radius**\ (\ corner\: :ref:`Corner<enum_@GlobalScope_Corner>`, radius\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_corner_radius>` Sets the corner radius to ``radius`` pixels for the given ``corner``. See :ref:`Corner<enum_@GlobalScope_Corner>` for possible values. @@ -635,7 +635,7 @@ Sets the corner radius to ``radius`` pixels for the given ``corner``. See :ref:` .. rst-class:: classref-method -void **set_corner_radius_all** **(** :ref:`int<class_int>` radius **)** +|void| **set_corner_radius_all**\ (\ radius\: :ref:`int<class_int>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_corner_radius_all>` Sets the corner radius to ``radius`` pixels for all corners. @@ -647,7 +647,7 @@ Sets the corner radius to ``radius`` pixels for all corners. .. rst-class:: classref-method -void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** +|void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_expand_margin>` Sets the expand margin to ``size`` pixels for the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -659,7 +659,7 @@ Sets the expand margin to ``size`` pixels for the specified :ref:`Side<enum_@Glo .. rst-class:: classref-method -void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)** +|void| **set_expand_margin_all**\ (\ size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxFlat_method_set_expand_margin_all>` Sets the expand margin to ``size`` pixels for all sides. @@ -670,3 +670,4 @@ Sets the expand margin to ``size`` pixels for all sides. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_styleboxline.rst b/classes/class_styleboxline.rst index 6e39da7d8c9..17de6eb4853 100644 --- a/classes/class_styleboxline.rst +++ b/classes/class_styleboxline.rst @@ -54,12 +54,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_StyleBoxLine_property_color>` .. rst-class:: classref-property-setget -- void **set_color** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_color** **(** **)** +- |void| **set_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_color**\ (\ ) The line's color. @@ -71,12 +71,12 @@ The line's color. .. rst-class:: classref-property -:ref:`float<class_float>` **grow_begin** = ``1.0`` +:ref:`float<class_float>` **grow_begin** = ``1.0`` :ref:`🔗<class_StyleBoxLine_property_grow_begin>` .. rst-class:: classref-property-setget -- void **set_grow_begin** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_grow_begin** **(** **)** +- |void| **set_grow_begin**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_grow_begin**\ (\ ) The number of pixels the line will extend before the **StyleBoxLine**'s bounds. If set to a negative value, the line will begin inside the **StyleBoxLine**'s bounds. @@ -88,12 +88,12 @@ The number of pixels the line will extend before the **StyleBoxLine**'s bounds. .. rst-class:: classref-property -:ref:`float<class_float>` **grow_end** = ``1.0`` +:ref:`float<class_float>` **grow_end** = ``1.0`` :ref:`🔗<class_StyleBoxLine_property_grow_end>` .. rst-class:: classref-property-setget -- void **set_grow_end** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_grow_end** **(** **)** +- |void| **set_grow_end**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_grow_end**\ (\ ) The number of pixels the line will extend past the **StyleBoxLine**'s bounds. If set to a negative value, the line will end inside the **StyleBoxLine**'s bounds. @@ -105,12 +105,12 @@ The number of pixels the line will extend past the **StyleBoxLine**'s bounds. If .. rst-class:: classref-property -:ref:`int<class_int>` **thickness** = ``1`` +:ref:`int<class_int>` **thickness** = ``1`` :ref:`🔗<class_StyleBoxLine_property_thickness>` .. rst-class:: classref-property-setget -- void **set_thickness** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_thickness** **(** **)** +- |void| **set_thickness**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_thickness**\ (\ ) The line's thickness in pixels. @@ -122,12 +122,12 @@ The line's thickness in pixels. .. rst-class:: classref-property -:ref:`bool<class_bool>` **vertical** = ``false`` +:ref:`bool<class_bool>` **vertical** = ``false`` :ref:`🔗<class_StyleBoxLine_property_vertical>` .. rst-class:: classref-property-setget -- void **set_vertical** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_vertical** **(** **)** +- |void| **set_vertical**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_vertical**\ (\ ) If ``true``, the line will be vertical. If ``false``, the line will be horizontal. @@ -138,3 +138,4 @@ If ``true``, the line will be vertical. If ``false``, the line will be horizonta .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_styleboxtexture.rst b/classes/class_styleboxtexture.rst index 8e8749cedc2..a747551d5fd 100644 --- a/classes/class_styleboxtexture.rst +++ b/classes/class_styleboxtexture.rst @@ -67,19 +67,19 @@ Methods .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxTexture_method_get_expand_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_texture_margin<class_StyleBoxTexture_method_get_texture_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_expand_margin<class_StyleBoxTexture_method_set_expand_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_expand_margin_all<class_StyleBoxTexture_method_set_expand_margin_all>` **(** :ref:`float<class_float>` size **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture_margin<class_StyleBoxTexture_method_set_texture_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_texture_margin_all<class_StyleBoxTexture_method_set_texture_margin_all>` **(** :ref:`float<class_float>` size **)** | - +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_expand_margin<class_StyleBoxTexture_method_get_expand_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_texture_margin<class_StyleBoxTexture_method_get_texture_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_expand_margin<class_StyleBoxTexture_method_set_expand_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_expand_margin_all<class_StyleBoxTexture_method_set_expand_margin_all>`\ (\ size\: :ref:`float<class_float>`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_margin<class_StyleBoxTexture_method_set_texture_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture_margin_all<class_StyleBoxTexture_method_set_texture_margin_all>`\ (\ size\: :ref:`float<class_float>`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,7 +94,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AxisStretchMode**: +enum **AxisStretchMode**: :ref:`🔗<enum_StyleBoxTexture_AxisStretchMode>` .. _class_StyleBoxTexture_constant_AXIS_STRETCH_MODE_STRETCH: @@ -133,12 +133,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_horizontal** = ``0`` +:ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_horizontal** = ``0`` :ref:`🔗<class_StyleBoxTexture_property_axis_stretch_horizontal>` .. rst-class:: classref-property-setget -- void **set_h_axis_stretch_mode** **(** :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` value **)** -- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **get_h_axis_stretch_mode** **(** **)** +- |void| **set_h_axis_stretch_mode**\ (\ value\: :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>`\ ) +- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **get_h_axis_stretch_mode**\ (\ ) Controls how the stylebox's texture will be stretched or tiled horizontally. See :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` for possible values. @@ -150,12 +150,12 @@ Controls how the stylebox's texture will be stretched or tiled horizontally. See .. rst-class:: classref-property -:ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_vertical** = ``0`` +:ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **axis_stretch_vertical** = ``0`` :ref:`🔗<class_StyleBoxTexture_property_axis_stretch_vertical>` .. rst-class:: classref-property-setget -- void **set_v_axis_stretch_mode** **(** :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` value **)** -- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **get_v_axis_stretch_mode** **(** **)** +- |void| **set_v_axis_stretch_mode**\ (\ value\: :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>`\ ) +- :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` **get_v_axis_stretch_mode**\ (\ ) Controls how the stylebox's texture will be stretched or tiled vertically. See :ref:`AxisStretchMode<enum_StyleBoxTexture_AxisStretchMode>` for possible values. @@ -167,12 +167,12 @@ Controls how the stylebox's texture will be stretched or tiled vertically. See : .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_center** = ``true`` +:ref:`bool<class_bool>` **draw_center** = ``true`` :ref:`🔗<class_StyleBoxTexture_property_draw_center>` .. rst-class:: classref-property-setget -- void **set_draw_center** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_draw_center_enabled** **(** **)** +- |void| **set_draw_center**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_draw_center_enabled**\ (\ ) If ``true``, the nine-patch texture's center tile will be drawn. @@ -184,12 +184,12 @@ If ``true``, the nine-patch texture's center tile will be drawn. .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_bottom** = ``0.0`` +:ref:`float<class_float>` **expand_margin_bottom** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_expand_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. @@ -201,12 +201,12 @@ Expands the bottom margin of this style box when drawing, causing it to be drawn .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_left** = ``0.0`` +:ref:`float<class_float>` **expand_margin_left** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_expand_margin_left>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. @@ -218,12 +218,12 @@ Expands the left margin of this style box when drawing, causing it to be drawn l .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_right** = ``0.0`` +:ref:`float<class_float>` **expand_margin_right** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_expand_margin_right>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. @@ -235,12 +235,12 @@ Expands the right margin of this style box when drawing, causing it to be drawn .. rst-class:: classref-property -:ref:`float<class_float>` **expand_margin_top** = ``0.0`` +:ref:`float<class_float>` **expand_margin_top** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_expand_margin_top>` .. rst-class:: classref-property-setget -- void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. @@ -252,12 +252,12 @@ Expands the top margin of this style box when drawing, causing it to be drawn la .. rst-class:: classref-property -:ref:`Color<class_Color>` **modulate_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **modulate_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_StyleBoxTexture_property_modulate_color>` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_modulate**\ (\ ) Modulates the color of the texture when this style box is drawn. @@ -269,12 +269,12 @@ Modulates the color of the texture when this style box is drawn. .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` +:ref:`Rect2<class_Rect2>` **region_rect** = ``Rect2(0, 0, 0, 0)`` :ref:`🔗<class_StyleBoxTexture_property_region_rect>` .. rst-class:: classref-property-setget -- void **set_region_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_region_rect** **(** **)** +- |void| **set_region_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_region_rect**\ (\ ) Species a sub-region of the texture to use. @@ -290,12 +290,12 @@ If empty (``Rect2(0, 0, 0, 0)``), the whole texture will be used. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_StyleBoxTexture_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The texture to use when drawing this style box. @@ -307,12 +307,12 @@ The texture to use when drawing this style box. .. rst-class:: classref-property -:ref:`float<class_float>` **texture_margin_bottom** = ``0.0`` +:ref:`float<class_float>` **texture_margin_bottom** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_texture_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Increases the bottom margin of the 3×3 texture box. @@ -328,12 +328,12 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_bottom .. rst-class:: classref-property -:ref:`float<class_float>` **texture_margin_left** = ``0.0`` +:ref:`float<class_float>` **texture_margin_left** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_texture_margin_left>` .. rst-class:: classref-property-setget -- void **set_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Increases the left margin of the 3×3 texture box. @@ -349,12 +349,12 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_left<c .. rst-class:: classref-property -:ref:`float<class_float>` **texture_margin_right** = ``0.0`` +:ref:`float<class_float>` **texture_margin_right** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_texture_margin_right>` .. rst-class:: classref-property-setget -- void **set_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Increases the right margin of the 3×3 texture box. @@ -370,12 +370,12 @@ This is also the value used as fallback for :ref:`StyleBox.content_margin_right< .. rst-class:: classref-property -:ref:`float<class_float>` **texture_margin_top** = ``0.0`` +:ref:`float<class_float>` **texture_margin_top** = ``0.0`` :ref:`🔗<class_StyleBoxTexture_property_texture_margin_top>` .. rst-class:: classref-property-setget -- void **set_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** -- :ref:`float<class_float>` **get_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| Increases the top margin of the 3×3 texture box. @@ -396,7 +396,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`float<class_float>` **get_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBoxTexture_method_get_expand_margin>` Returns the expand margin size of the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -408,7 +408,7 @@ Returns the expand margin size of the specified :ref:`Side<enum_@GlobalScope_Sid .. rst-class:: classref-method -:ref:`float<class_float>` **get_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`float<class_float>` **get_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_StyleBoxTexture_method_get_texture_margin>` Returns the margin size of the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -420,7 +420,7 @@ Returns the margin size of the specified :ref:`Side<enum_@GlobalScope_Side>`. .. rst-class:: classref-method -void **set_expand_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** +|void| **set_expand_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxTexture_method_set_expand_margin>` Sets the expand margin to ``size`` pixels for the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -432,7 +432,7 @@ Sets the expand margin to ``size`` pixels for the specified :ref:`Side<enum_@Glo .. rst-class:: classref-method -void **set_expand_margin_all** **(** :ref:`float<class_float>` size **)** +|void| **set_expand_margin_all**\ (\ size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxTexture_method_set_expand_margin_all>` Sets the expand margin to ``size`` pixels for all sides. @@ -444,7 +444,7 @@ Sets the expand margin to ``size`` pixels for all sides. .. rst-class:: classref-method -void **set_texture_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`float<class_float>` size **)** +|void| **set_texture_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxTexture_method_set_texture_margin>` Sets the margin to ``size`` pixels for the specified :ref:`Side<enum_@GlobalScope_Side>`. @@ -456,7 +456,7 @@ Sets the margin to ``size`` pixels for the specified :ref:`Side<enum_@GlobalScop .. rst-class:: classref-method -void **set_texture_margin_all** **(** :ref:`float<class_float>` size **)** +|void| **set_texture_margin_all**\ (\ size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_StyleBoxTexture_method_set_texture_margin_all>` Sets the margin to ``size`` pixels for all sides. @@ -467,3 +467,4 @@ Sets the margin to ``size`` pixels for all sides. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_subviewport.rst b/classes/class_subviewport.rst index 890a7a73acb..d112fa6f1b8 100644 --- a/classes/class_subviewport.rst +++ b/classes/class_subviewport.rst @@ -32,17 +32,17 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__ +- `GUI in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2807>`__ -- `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__ +- `3D in 2D Viewport Demo <https://godotengine.org/asset-library/asset/2804>`__ -- `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__ +- `2D in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2803>`__ -- `Screen Capture Demo <https://godotengine.org/asset-library/asset/130>`__ +- `Screen Capture Demo <https://godotengine.org/asset-library/asset/2808>`__ -- `Dynamic Split Screen Demo <https://godotengine.org/asset-library/asset/541>`__ +- `Dynamic Split Screen Demo <https://godotengine.org/asset-library/asset/2806>`__ -- `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__ +- `3D Resolution Scaling Demo <https://godotengine.org/asset-library/asset/2805>`__ .. rst-class:: classref-reftable-group @@ -77,7 +77,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ClearMode**: +enum **ClearMode**: :ref:`🔗<enum_SubViewport_ClearMode>` .. _class_SubViewport_constant_CLEAR_MODE_ALWAYS: @@ -111,7 +111,7 @@ Clear the render target on the next frame, then switch to :ref:`CLEAR_MODE_NEVER .. rst-class:: classref-enumeration -enum **UpdateMode**: +enum **UpdateMode**: :ref:`🔗<enum_SubViewport_UpdateMode>` .. _class_SubViewport_constant_UPDATE_DISABLED: @@ -166,12 +166,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ClearMode<enum_SubViewport_ClearMode>` **render_target_clear_mode** = ``0`` +:ref:`ClearMode<enum_SubViewport_ClearMode>` **render_target_clear_mode** = ``0`` :ref:`🔗<class_SubViewport_property_render_target_clear_mode>` .. rst-class:: classref-property-setget -- void **set_clear_mode** **(** :ref:`ClearMode<enum_SubViewport_ClearMode>` value **)** -- :ref:`ClearMode<enum_SubViewport_ClearMode>` **get_clear_mode** **(** **)** +- |void| **set_clear_mode**\ (\ value\: :ref:`ClearMode<enum_SubViewport_ClearMode>`\ ) +- :ref:`ClearMode<enum_SubViewport_ClearMode>` **get_clear_mode**\ (\ ) The clear mode when the sub-viewport is used as a render target. @@ -185,12 +185,12 @@ The clear mode when the sub-viewport is used as a render target. .. rst-class:: classref-property -:ref:`UpdateMode<enum_SubViewport_UpdateMode>` **render_target_update_mode** = ``2`` +:ref:`UpdateMode<enum_SubViewport_UpdateMode>` **render_target_update_mode** = ``2`` :ref:`🔗<class_SubViewport_property_render_target_update_mode>` .. rst-class:: classref-property-setget -- void **set_update_mode** **(** :ref:`UpdateMode<enum_SubViewport_UpdateMode>` value **)** -- :ref:`UpdateMode<enum_SubViewport_UpdateMode>` **get_update_mode** **(** **)** +- |void| **set_update_mode**\ (\ value\: :ref:`UpdateMode<enum_SubViewport_UpdateMode>`\ ) +- :ref:`UpdateMode<enum_SubViewport_UpdateMode>` **get_update_mode**\ (\ ) The update mode when the sub-viewport is used as a render target. @@ -202,12 +202,12 @@ The update mode when the sub-viewport is used as a render target. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(512, 512)`` +:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(512, 512)`` :ref:`🔗<class_SubViewport_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_size**\ (\ ) The width and height of the sub-viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed. @@ -221,12 +221,12 @@ The width and height of the sub-viewport. Must be set to a value greater than or .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **size_2d_override** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **size_2d_override** = ``Vector2i(0, 0)`` :ref:`🔗<class_SubViewport_property_size_2d_override>` .. rst-class:: classref-property-setget -- void **set_size_2d_override** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_size_2d_override** **(** **)** +- |void| **set_size_2d_override**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_size_2d_override**\ (\ ) The 2D size override of the sub-viewport. If either the width or height is ``0``, the override is disabled. @@ -238,12 +238,12 @@ The 2D size override of the sub-viewport. If either the width or height is ``0`` .. rst-class:: classref-property -:ref:`bool<class_bool>` **size_2d_override_stretch** = ``false`` +:ref:`bool<class_bool>` **size_2d_override_stretch** = ``false`` :ref:`🔗<class_SubViewport_property_size_2d_override_stretch>` .. rst-class:: classref-property-setget -- void **set_size_2d_override_stretch** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_size_2d_override_stretch_enabled** **(** **)** +- |void| **set_size_2d_override_stretch**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_size_2d_override_stretch_enabled**\ (\ ) If ``true``, the 2D size override affects stretch as well. @@ -254,3 +254,4 @@ If ``true``, the 2D size override affects stretch as well. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_subviewportcontainer.rst b/classes/class_subviewportcontainer.rst index 3ef8a3d3c3f..687ec71e664 100644 --- a/classes/class_subviewportcontainer.rst +++ b/classes/class_subviewportcontainer.rst @@ -33,11 +33,25 @@ Properties .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`stretch<class_SubViewportContainer_property_stretch>` | ``false`` | - +-------------------------+---------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`stretch_shrink<class_SubViewportContainer_property_stretch_shrink>` | ``1`` | - +-------------------------+---------------------------------------------------------------------------+-----------+ + +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``1`` (overrides :ref:`Control<class_Control_property_focus_mode>`) | + +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`stretch<class_SubViewportContainer_property_stretch>` | ``false`` | + +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`stretch_shrink<class_SubViewportContainer_property_stretch_shrink>` | ``1`` | + +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_propagate_input_event<class_SubViewportContainer_private_method__propagate_input_event>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,12 +66,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **stretch** = ``false`` +:ref:`bool<class_bool>` **stretch** = ``false`` :ref:`🔗<class_SubViewportContainer_property_stretch>` .. rst-class:: classref-property-setget -- void **set_stretch** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_stretch_enabled** **(** **)** +- |void| **set_stretch**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_stretch_enabled**\ (\ ) If ``true``, the sub-viewport will be automatically resized to the control's size. @@ -71,12 +85,12 @@ If ``true``, the sub-viewport will be automatically resized to the control's siz .. rst-class:: classref-property -:ref:`int<class_int>` **stretch_shrink** = ``1`` +:ref:`int<class_int>` **stretch_shrink** = ``1`` :ref:`🔗<class_SubViewportContainer_property_stretch_shrink>` .. rst-class:: classref-property-setget -- void **set_stretch_shrink** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stretch_shrink** **(** **)** +- |void| **set_stretch_shrink**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stretch_shrink**\ (\ ) Divides the sub-viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering. @@ -84,6 +98,25 @@ For example, a 1280×720 sub-viewport with :ref:`stretch_shrink<class_SubViewpor \ **Note:** :ref:`stretch<class_SubViewportContainer_property_stretch>` must be ``true`` for this property to work. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_SubViewportContainer_private_method__propagate_input_event: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_propagate_input_event**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |const| :ref:`🔗<class_SubViewportContainer_private_method__propagate_input_event>` + +**Experimental:** This method may be changed or removed in future versions. + +Virtual method to be implemented by the user. If it returns ``true``, the ``event`` is propagated to :ref:`SubViewport<class_SubViewport>` children. Propagation doesn't happen if it returns ``false``. If the function is not implemented, all events are propagated to SubViewports. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -91,3 +124,4 @@ For example, a 1280×720 sub-viewport with :ref:`stretch_shrink<class_SubViewpor .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_surfacetool.rst b/classes/class_surfacetool.rst index dd062f67203..a75b5defb59 100644 --- a/classes/class_surfacetool.rst +++ b/classes/class_surfacetool.rst @@ -57,7 +57,9 @@ See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateMesh<class_ImmediateM Tutorials --------- -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- :doc:`Using the SurfaceTool <../tutorials/3d/procedural_geometry/surfacetool>` + +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -67,71 +69,73 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_index<class_SurfaceTool_method_add_index>` **(** :ref:`int<class_int>` index **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_triangle_fan<class_SurfaceTool_method_add_triangle_fan>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` vertices, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`PackedColorArray<class_PackedColorArray>` colors=PackedColorArray(), :ref:`PackedVector2Array<class_PackedVector2Array>` uv2s=PackedVector2Array(), :ref:`PackedVector3Array<class_PackedVector3Array>` normals=PackedVector3Array(), :ref:`Plane[]<class_Plane>` tangents=[] **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_vertex<class_SurfaceTool_method_add_vertex>` **(** :ref:`Vector3<class_Vector3>` vertex **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_from<class_SurfaceTool_method_append_from>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`Transform3D<class_Transform3D>` transform **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin<class_SurfaceTool_method_begin>` **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_SurfaceTool_method_clear>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`commit<class_SurfaceTool_method_commit>` **(** :ref:`ArrayMesh<class_ArrayMesh>` existing=null, :ref:`int<class_int>` flags=0 **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from<class_SurfaceTool_method_create_from>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_from_blend_shape<class_SurfaceTool_method_create_from_blend_shape>` **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`String<class_String>` blend_shape **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deindex<class_SurfaceTool_method_deindex>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`generate_lod<class_SurfaceTool_method_generate_lod>` **(** :ref:`float<class_float>` nd_threshold, :ref:`int<class_int>` target_index_count=3 **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate_normals<class_SurfaceTool_method_generate_normals>` **(** :ref:`bool<class_bool>` flip=false **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`generate_tangents<class_SurfaceTool_method_generate_tangents>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_SurfaceTool_method_get_aabb>` **(** **)** |const| | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` | :ref:`get_custom_format<class_SurfaceTool_method_get_custom_format>` **(** :ref:`int<class_int>` channel_index **)** |const| | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` | :ref:`get_primitive_type<class_SurfaceTool_method_get_primitive_type>` **(** **)** |const| | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` | :ref:`get_skin_weight_count<class_SurfaceTool_method_get_skin_weight_count>` **(** **)** |const| | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`index<class_SurfaceTool_method_index>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`optimize_indices_for_cache<class_SurfaceTool_method_optimize_indices_for_cache>` **(** **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bones<class_SurfaceTool_method_set_bones>` **(** :ref:`PackedInt32Array<class_PackedInt32Array>` bones **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_color<class_SurfaceTool_method_set_color>` **(** :ref:`Color<class_Color>` color **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom<class_SurfaceTool_method_set_custom>` **(** :ref:`int<class_int>` channel_index, :ref:`Color<class_Color>` custom_color **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_format<class_SurfaceTool_method_set_custom_format>` **(** :ref:`int<class_int>` channel_index, :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` format **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_material<class_SurfaceTool_method_set_material>` **(** :ref:`Material<class_Material>` material **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_normal<class_SurfaceTool_method_set_normal>` **(** :ref:`Vector3<class_Vector3>` normal **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_skin_weight_count<class_SurfaceTool_method_set_skin_weight_count>` **(** :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` count **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_smooth_group<class_SurfaceTool_method_set_smooth_group>` **(** :ref:`int<class_int>` index **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tangent<class_SurfaceTool_method_set_tangent>` **(** :ref:`Plane<class_Plane>` tangent **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_uv<class_SurfaceTool_method_set_uv>` **(** :ref:`Vector2<class_Vector2>` uv **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_uv2<class_SurfaceTool_method_set_uv2>` **(** :ref:`Vector2<class_Vector2>` uv2 **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_weights<class_SurfaceTool_method_set_weights>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** | - +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_index<class_SurfaceTool_method_add_index>`\ (\ index\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_triangle_fan<class_SurfaceTool_method_add_triangle_fan>`\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), colors\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), uv2s\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), normals\: :ref:`PackedVector3Array<class_PackedVector3Array>` = PackedVector3Array(), tangents\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] = []\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_vertex<class_SurfaceTool_method_add_vertex>`\ (\ vertex\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_from<class_SurfaceTool_method_append_from>`\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin<class_SurfaceTool_method_begin>`\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_SurfaceTool_method_clear>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ArrayMesh<class_ArrayMesh>` | :ref:`commit<class_SurfaceTool_method_commit>`\ (\ existing\: :ref:`ArrayMesh<class_ArrayMesh>` = null, flags\: :ref:`int<class_int>` = 0\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from<class_SurfaceTool_method_create_from>`\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from_arrays<class_SurfaceTool_method_create_from_arrays>`\ (\ arrays\: :ref:`Array<class_Array>`, primitive_type\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` = 3\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_from_blend_shape<class_SurfaceTool_method_create_from_blend_shape>`\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`, blend_shape\: :ref:`String<class_String>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deindex<class_SurfaceTool_method_deindex>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`generate_lod<class_SurfaceTool_method_generate_lod>`\ (\ nd_threshold\: :ref:`float<class_float>`, target_index_count\: :ref:`int<class_int>` = 3\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generate_normals<class_SurfaceTool_method_generate_normals>`\ (\ flip\: :ref:`bool<class_bool>` = false\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`generate_tangents<class_SurfaceTool_method_generate_tangents>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_SurfaceTool_method_get_aabb>`\ (\ ) |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` | :ref:`get_custom_format<class_SurfaceTool_method_get_custom_format>`\ (\ channel_index\: :ref:`int<class_int>`\ ) |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` | :ref:`get_primitive_type<class_SurfaceTool_method_get_primitive_type>`\ (\ ) |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` | :ref:`get_skin_weight_count<class_SurfaceTool_method_get_skin_weight_count>`\ (\ ) |const| | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`index<class_SurfaceTool_method_index>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`optimize_indices_for_cache<class_SurfaceTool_method_optimize_indices_for_cache>`\ (\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bones<class_SurfaceTool_method_set_bones>`\ (\ bones\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_color<class_SurfaceTool_method_set_color>`\ (\ color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom<class_SurfaceTool_method_set_custom>`\ (\ channel_index\: :ref:`int<class_int>`, custom_color\: :ref:`Color<class_Color>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_format<class_SurfaceTool_method_set_custom_format>`\ (\ channel_index\: :ref:`int<class_int>`, format\: :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_material<class_SurfaceTool_method_set_material>`\ (\ material\: :ref:`Material<class_Material>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_normal<class_SurfaceTool_method_set_normal>`\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_skin_weight_count<class_SurfaceTool_method_set_skin_weight_count>`\ (\ count\: :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_smooth_group<class_SurfaceTool_method_set_smooth_group>`\ (\ index\: :ref:`int<class_int>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tangent<class_SurfaceTool_method_set_tangent>`\ (\ tangent\: :ref:`Plane<class_Plane>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_uv<class_SurfaceTool_method_set_uv>`\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_uv2<class_SurfaceTool_method_set_uv2>`\ (\ uv2\: :ref:`Vector2<class_Vector2>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_weights<class_SurfaceTool_method_set_weights>`\ (\ weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +----------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -146,7 +150,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **CustomFormat**: +enum **CustomFormat**: :ref:`🔗<enum_SurfaceTool_CustomFormat>` .. _class_SurfaceTool_constant_CUSTOM_RGBA8_UNORM: @@ -228,7 +232,7 @@ Used to indicate a disabled custom channel. .. rst-class:: classref-enumeration -enum **SkinWeightCount**: +enum **SkinWeightCount**: :ref:`🔗<enum_SurfaceTool_SkinWeightCount>` .. _class_SurfaceTool_constant_SKIN_4_WEIGHTS: @@ -259,7 +263,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_index** **(** :ref:`int<class_int>` index **)** +|void| **add_index**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SurfaceTool_method_add_index>` Adds a vertex to index array if you are using indexed vertices. Does not need to be called before adding vertices. @@ -271,7 +275,7 @@ Adds a vertex to index array if you are using indexed vertices. Does not need to .. rst-class:: classref-method -void **add_triangle_fan** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` vertices, :ref:`PackedVector2Array<class_PackedVector2Array>` uvs=PackedVector2Array(), :ref:`PackedColorArray<class_PackedColorArray>` colors=PackedColorArray(), :ref:`PackedVector2Array<class_PackedVector2Array>` uv2s=PackedVector2Array(), :ref:`PackedVector3Array<class_PackedVector3Array>` normals=PackedVector3Array(), :ref:`Plane[]<class_Plane>` tangents=[] **)** +|void| **add_triangle_fan**\ (\ vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`, uvs\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), colors\: :ref:`PackedColorArray<class_PackedColorArray>` = PackedColorArray(), uv2s\: :ref:`PackedVector2Array<class_PackedVector2Array>` = PackedVector2Array(), normals\: :ref:`PackedVector3Array<class_PackedVector3Array>` = PackedVector3Array(), tangents\: :ref:`Array<class_Array>`\[:ref:`Plane<class_Plane>`\] = []\ ) :ref:`🔗<class_SurfaceTool_method_add_triangle_fan>` Inserts a triangle fan made of array data into :ref:`Mesh<class_Mesh>` being constructed. @@ -285,7 +289,7 @@ Requires the primitive type be set to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_ .. rst-class:: classref-method -void **add_vertex** **(** :ref:`Vector3<class_Vector3>` vertex **)** +|void| **add_vertex**\ (\ vertex\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SurfaceTool_method_add_vertex>` Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). @@ -297,7 +301,7 @@ Specifies the position of current vertex. Should be called after specifying othe .. rst-class:: classref-method -void **append_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`Transform3D<class_Transform3D>` transform **)** +|void| **append_from**\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_SurfaceTool_method_append_from>` Append vertices from a given :ref:`Mesh<class_Mesh>` surface onto the current vertex array with specified :ref:`Transform3D<class_Transform3D>`. @@ -309,7 +313,7 @@ Append vertices from a given :ref:`Mesh<class_Mesh>` surface onto the current ve .. rst-class:: classref-method -void **begin** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive **)** +|void| **begin**\ (\ primitive\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>`\ ) :ref:`🔗<class_SurfaceTool_method_begin>` Called before adding any vertices. Takes the primitive type as an argument (e.g. :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`). @@ -321,7 +325,7 @@ Called before adding any vertices. Takes the primitive type as an argument (e.g. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_SurfaceTool_method_clear>` Clear all information passed into the surface tool so far. @@ -333,7 +337,7 @@ Clear all information passed into the surface tool so far. .. rst-class:: classref-method -:ref:`ArrayMesh<class_ArrayMesh>` **commit** **(** :ref:`ArrayMesh<class_ArrayMesh>` existing=null, :ref:`int<class_int>` flags=0 **)** +:ref:`ArrayMesh<class_ArrayMesh>` **commit**\ (\ existing\: :ref:`ArrayMesh<class_ArrayMesh>` = null, flags\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_SurfaceTool_method_commit>` Returns a constructed :ref:`ArrayMesh<class_ArrayMesh>` from current information passed in. If an existing :ref:`ArrayMesh<class_ArrayMesh>` is passed in as an argument, will add an extra surface to the existing :ref:`ArrayMesh<class_ArrayMesh>`. @@ -347,9 +351,9 @@ Returns a constructed :ref:`ArrayMesh<class_ArrayMesh>` from current information .. rst-class:: classref-method -:ref:`Array<class_Array>` **commit_to_arrays** **(** **)** +:ref:`Array<class_Array>` **commit_to_arrays**\ (\ ) :ref:`🔗<class_SurfaceTool_method_commit_to_arrays>` -Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>`. This way you can further process the mesh data using the :ref:`ArrayMesh<class_ArrayMesh>` API. +Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arrays<class_ArrayMesh_method_add_surface_from_arrays>`, :ref:`ImporterMesh.add_surface<class_ImporterMesh_method_add_surface>`, and :ref:`create_from_arrays<class_SurfaceTool_method_create_from_arrays>`. This way you can further process the mesh data using the :ref:`ArrayMesh<class_ArrayMesh>` or :ref:`ImporterMesh<class_ImporterMesh>` APIs. .. rst-class:: classref-item-separator @@ -359,7 +363,7 @@ Commits the data to the same format used by :ref:`ArrayMesh.add_surface_from_arr .. rst-class:: classref-method -void **create_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface **)** +|void| **create_from**\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SurfaceTool_method_create_from>` Creates a vertex array from an existing :ref:`Mesh<class_Mesh>`. @@ -367,11 +371,23 @@ Creates a vertex array from an existing :ref:`Mesh<class_Mesh>`. ---- +.. _class_SurfaceTool_method_create_from_arrays: + +.. rst-class:: classref-method + +|void| **create_from_arrays**\ (\ arrays\: :ref:`Array<class_Array>`, primitive_type\: :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` = 3\ ) :ref:`🔗<class_SurfaceTool_method_create_from_arrays>` + +Creates this SurfaceTool from existing vertex arrays such as returned by :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>`, :ref:`Mesh.surface_get_arrays<class_Mesh_method_surface_get_arrays>`, :ref:`Mesh.surface_get_blend_shape_arrays<class_Mesh_method_surface_get_blend_shape_arrays>`, :ref:`ImporterMesh.get_surface_arrays<class_ImporterMesh_method_get_surface_arrays>`, and :ref:`ImporterMesh.get_surface_blend_shape_arrays<class_ImporterMesh_method_get_surface_blend_shape_arrays>`. ``primitive_type`` controls the type of mesh data, defaulting to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_SurfaceTool_method_create_from_blend_shape: .. rst-class:: classref-method -void **create_from_blend_shape** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`String<class_String>` blend_shape **)** +|void| **create_from_blend_shape**\ (\ existing\: :ref:`Mesh<class_Mesh>`, surface\: :ref:`int<class_int>`, blend_shape\: :ref:`String<class_String>`\ ) :ref:`🔗<class_SurfaceTool_method_create_from_blend_shape>` Creates a vertex array from the specified blend shape of an existing :ref:`Mesh<class_Mesh>`. This can be used to extract a specific pose from a blend shape. @@ -383,7 +399,7 @@ Creates a vertex array from the specified blend shape of an existing :ref:`Mesh< .. rst-class:: classref-method -void **deindex** **(** **)** +|void| **deindex**\ (\ ) :ref:`🔗<class_SurfaceTool_method_deindex>` Removes the index array by expanding the vertex array. @@ -395,11 +411,11 @@ Removes the index array by expanding the vertex array. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **generate_lod** **(** :ref:`float<class_float>` nd_threshold, :ref:`int<class_int>` target_index_count=3 **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **generate_lod**\ (\ nd_threshold\: :ref:`float<class_float>`, target_index_count\: :ref:`int<class_int>` = 3\ ) :ref:`🔗<class_SurfaceTool_method_generate_lod>` -Generates a LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. +**Deprecated:** This method is unused internally, as it does not preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods<class_ImporterMesh_method_generate_lods>` instead. -\ *Deprecated.* Unused internally and neglects to preserve normals or UVs. Consider using :ref:`ImporterMesh.generate_lods<class_ImporterMesh_method_generate_lods>` instead. +Generates an LOD for a given ``nd_threshold`` in linear units (square root of quadric error metric), using at most ``target_index_count`` indices. .. rst-class:: classref-item-separator @@ -409,7 +425,7 @@ Generates a LOD for a given ``nd_threshold`` in linear units (square root of qua .. rst-class:: classref-method -void **generate_normals** **(** :ref:`bool<class_bool>` flip=false **)** +|void| **generate_normals**\ (\ flip\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_SurfaceTool_method_generate_normals>` Generates normals from vertices so you do not have to do it manually. If ``flip`` is ``true``, the resulting normals will be inverted. :ref:`generate_normals<class_SurfaceTool_method_generate_normals>` should be called *after* generating geometry and *before* committing the mesh using :ref:`commit<class_SurfaceTool_method_commit>` or :ref:`commit_to_arrays<class_SurfaceTool_method_commit_to_arrays>`. For correct display of normal-mapped surfaces, you will also have to generate tangents using :ref:`generate_tangents<class_SurfaceTool_method_generate_tangents>`. @@ -425,7 +441,7 @@ Generates normals from vertices so you do not have to do it manually. If ``flip` .. rst-class:: classref-method -void **generate_tangents** **(** **)** +|void| **generate_tangents**\ (\ ) :ref:`🔗<class_SurfaceTool_method_generate_tangents>` Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see :ref:`generate_normals<class_SurfaceTool_method_generate_normals>`). @@ -437,7 +453,7 @@ Generates a tangent vector for each vertex. Requires that each vertex have UVs a .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **get_aabb** **(** **)** |const| +:ref:`AABB<class_AABB>` **get_aabb**\ (\ ) |const| :ref:`🔗<class_SurfaceTool_method_get_aabb>` Returns the axis-aligned bounding box of the vertex positions. @@ -449,7 +465,7 @@ Returns the axis-aligned bounding box of the vertex positions. .. rst-class:: classref-method -:ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` **get_custom_format** **(** :ref:`int<class_int>` channel_index **)** |const| +:ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` **get_custom_format**\ (\ channel_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SurfaceTool_method_get_custom_format>` Returns the format for custom ``channel_index`` (currently up to 4). Returns :ref:`CUSTOM_MAX<class_SurfaceTool_constant_CUSTOM_MAX>` if this custom channel is unused. @@ -461,7 +477,7 @@ Returns the format for custom ``channel_index`` (currently up to 4). Returns :re .. rst-class:: classref-method -:ref:`PrimitiveType<enum_Mesh_PrimitiveType>` **get_primitive_type** **(** **)** |const| +:ref:`PrimitiveType<enum_Mesh_PrimitiveType>` **get_primitive_type**\ (\ ) |const| :ref:`🔗<class_SurfaceTool_method_get_primitive_type>` Returns the type of mesh geometry, such as :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`. @@ -473,7 +489,7 @@ Returns the type of mesh geometry, such as :ref:`Mesh.PRIMITIVE_TRIANGLES<class_ .. rst-class:: classref-method -:ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` **get_skin_weight_count** **(** **)** |const| +:ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` **get_skin_weight_count**\ (\ ) |const| :ref:`🔗<class_SurfaceTool_method_get_skin_weight_count>` By default, returns :ref:`SKIN_4_WEIGHTS<class_SurfaceTool_constant_SKIN_4_WEIGHTS>` to indicate only 4 bone influences per vertex are used. @@ -489,7 +505,7 @@ Returns :ref:`SKIN_8_WEIGHTS<class_SurfaceTool_constant_SKIN_8_WEIGHTS>` if up t .. rst-class:: classref-method -void **index** **(** **)** +|void| **index**\ (\ ) :ref:`🔗<class_SurfaceTool_method_index>` Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse. @@ -501,7 +517,7 @@ Shrinks the vertex array by creating an index array. This can improve performanc .. rst-class:: classref-method -void **optimize_indices_for_cache** **(** **)** +|void| **optimize_indices_for_cache**\ (\ ) :ref:`🔗<class_SurfaceTool_method_optimize_indices_for_cache>` Optimizes triangle sorting for performance. Requires that :ref:`get_primitive_type<class_SurfaceTool_method_get_primitive_type>` is :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`. @@ -513,7 +529,7 @@ Optimizes triangle sorting for performance. Requires that :ref:`get_primitive_ty .. rst-class:: classref-method -void **set_bones** **(** :ref:`PackedInt32Array<class_PackedInt32Array>` bones **)** +|void| **set_bones**\ (\ bones\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_SurfaceTool_method_set_bones>` Specifies an array of bones to use for the *next* vertex. ``bones`` must contain 4 integers. @@ -525,7 +541,7 @@ Specifies an array of bones to use for the *next* vertex. ``bones`` must contain .. rst-class:: classref-method -void **set_color** **(** :ref:`Color<class_Color>` color **)** +|void| **set_color**\ (\ color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_SurfaceTool_method_set_color>` Specifies a :ref:`Color<class_Color>` to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -539,7 +555,7 @@ Specifies a :ref:`Color<class_Color>` to use for the *next* vertex. If every ver .. rst-class:: classref-method -void **set_custom** **(** :ref:`int<class_int>` channel_index, :ref:`Color<class_Color>` custom_color **)** +|void| **set_custom**\ (\ channel_index\: :ref:`int<class_int>`, custom_color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_SurfaceTool_method_set_custom>` Sets the custom value on this vertex for ``channel_index``. @@ -553,7 +569,7 @@ Sets the custom value on this vertex for ``channel_index``. .. rst-class:: classref-method -void **set_custom_format** **(** :ref:`int<class_int>` channel_index, :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>` format **)** +|void| **set_custom_format**\ (\ channel_index\: :ref:`int<class_int>`, format\: :ref:`CustomFormat<enum_SurfaceTool_CustomFormat>`\ ) :ref:`🔗<class_SurfaceTool_method_set_custom_format>` Sets the color format for this custom ``channel_index``. Use :ref:`CUSTOM_MAX<class_SurfaceTool_constant_CUSTOM_MAX>` to disable. @@ -567,7 +583,7 @@ Must be invoked after :ref:`begin<class_SurfaceTool_method_begin>` and should be .. rst-class:: classref-method -void **set_material** **(** :ref:`Material<class_Material>` material **)** +|void| **set_material**\ (\ material\: :ref:`Material<class_Material>`\ ) :ref:`🔗<class_SurfaceTool_method_set_material>` Sets :ref:`Material<class_Material>` to be used by the :ref:`Mesh<class_Mesh>` you are constructing. @@ -579,7 +595,7 @@ Sets :ref:`Material<class_Material>` to be used by the :ref:`Mesh<class_Mesh>` y .. rst-class:: classref-method -void **set_normal** **(** :ref:`Vector3<class_Vector3>` normal **)** +|void| **set_normal**\ (\ normal\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_SurfaceTool_method_set_normal>` Specifies a normal to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -591,7 +607,7 @@ Specifies a normal to use for the *next* vertex. If every vertex needs to have t .. rst-class:: classref-method -void **set_skin_weight_count** **(** :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>` count **)** +|void| **set_skin_weight_count**\ (\ count\: :ref:`SkinWeightCount<enum_SurfaceTool_SkinWeightCount>`\ ) :ref:`🔗<class_SurfaceTool_method_set_skin_weight_count>` Set to :ref:`SKIN_8_WEIGHTS<class_SurfaceTool_constant_SKIN_8_WEIGHTS>` to indicate that up to 8 bone influences per vertex may be used. @@ -607,7 +623,7 @@ By default, only 4 bone influences are used (:ref:`SKIN_4_WEIGHTS<class_SurfaceT .. rst-class:: classref-method -void **set_smooth_group** **(** :ref:`int<class_int>` index **)** +|void| **set_smooth_group**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SurfaceTool_method_set_smooth_group>` Specifies the smooth group to use for the *next* vertex. If this is never called, all vertices will have the default smooth group of ``0`` and will be smoothed with adjacent vertices of the same group. To produce a mesh with flat normals, set the smooth group to ``-1``. @@ -621,7 +637,7 @@ Specifies the smooth group to use for the *next* vertex. If this is never called .. rst-class:: classref-method -void **set_tangent** **(** :ref:`Plane<class_Plane>` tangent **)** +|void| **set_tangent**\ (\ tangent\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_SurfaceTool_method_set_tangent>` Specifies a tangent to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -633,7 +649,7 @@ Specifies a tangent to use for the *next* vertex. If every vertex needs to have .. rst-class:: classref-method -void **set_uv** **(** :ref:`Vector2<class_Vector2>` uv **)** +|void| **set_uv**\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_SurfaceTool_method_set_uv>` Specifies a set of UV coordinates to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -645,7 +661,7 @@ Specifies a set of UV coordinates to use for the *next* vertex. If every vertex .. rst-class:: classref-method -void **set_uv2** **(** :ref:`Vector2<class_Vector2>` uv2 **)** +|void| **set_uv2**\ (\ uv2\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_SurfaceTool_method_set_uv2>` Specifies an optional second set of UV coordinates to use for the *next* vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -657,7 +673,7 @@ Specifies an optional second set of UV coordinates to use for the *next* vertex. .. rst-class:: classref-method -void **set_weights** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` weights **)** +|void| **set_weights**\ (\ weights\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_SurfaceTool_method_set_weights>` Specifies weight values to use for the *next* vertex. ``weights`` must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. @@ -668,3 +684,4 @@ Specifies weight values to use for the *next* vertex. ``weights`` must contain 4 .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_syntaxhighlighter.rst b/classes/class_syntaxhighlighter.rst index e10c1fa1ba3..ae616f21cb8 100644 --- a/classes/class_syntaxhighlighter.rst +++ b/classes/class_syntaxhighlighter.rst @@ -33,21 +33,21 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_method__clear_highlighting_cache>` **(** **)** |virtual| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_method__get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** |virtual| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` **(** **)** |virtual| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_highlighting_cache<class_SyntaxHighlighter_method_clear_highlighting_cache>` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_syntax_highlighting>` **(** :ref:`int<class_int>` line **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextEdit<class_TextEdit>` | :ref:`get_text_edit<class_SyntaxHighlighter_method_get_text_edit>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_cache<class_SyntaxHighlighter_method_update_cache>` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_private_method__clear_highlighting_cache>`\ (\ ) |virtual| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_private_method__get_line_syntax_highlighting>`\ (\ line\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_update_cache<class_SyntaxHighlighter_private_method__update_cache>`\ (\ ) |virtual| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_highlighting_cache<class_SyntaxHighlighter_method_clear_highlighting_cache>`\ (\ ) | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_syntax_highlighting>`\ (\ line\: :ref:`int<class_int>`\ ) | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextEdit<class_TextEdit>` | :ref:`get_text_edit<class_SyntaxHighlighter_method_get_text_edit>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_cache<class_SyntaxHighlighter_method_update_cache>`\ (\ ) | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,11 +58,11 @@ Methods Method Descriptions ------------------- -.. _class_SyntaxHighlighter_method__clear_highlighting_cache: +.. _class_SyntaxHighlighter_private_method__clear_highlighting_cache: .. rst-class:: classref-method -void **_clear_highlighting_cache** **(** **)** |virtual| +|void| **_clear_highlighting_cache**\ (\ ) |virtual| :ref:`🔗<class_SyntaxHighlighter_private_method__clear_highlighting_cache>` Virtual method which can be overridden to clear any local caches. @@ -70,11 +70,11 @@ Virtual method which can be overridden to clear any local caches. ---- -.. _class_SyntaxHighlighter_method__get_line_syntax_highlighting: +.. _class_SyntaxHighlighter_private_method__get_line_syntax_highlighting: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_get_line_syntax_highlighting**\ (\ line\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_SyntaxHighlighter_private_method__get_line_syntax_highlighting>` Virtual method which can be overridden to return syntax highlighting data. @@ -84,11 +84,11 @@ See :ref:`get_line_syntax_highlighting<class_SyntaxHighlighter_method_get_line_s ---- -.. _class_SyntaxHighlighter_method__update_cache: +.. _class_SyntaxHighlighter_private_method__update_cache: .. rst-class:: classref-method -void **_update_cache** **(** **)** |virtual| +|void| **_update_cache**\ (\ ) |virtual| :ref:`🔗<class_SyntaxHighlighter_private_method__update_cache>` Virtual method which can be overridden to update any local caches. @@ -100,11 +100,11 @@ Virtual method which can be overridden to update any local caches. .. rst-class:: classref-method -void **clear_highlighting_cache** **(** **)** +|void| **clear_highlighting_cache**\ (\ ) :ref:`🔗<class_SyntaxHighlighter_method_clear_highlighting_cache>` Clears all cached syntax highlighting data. -Then calls overridable method :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_method__clear_highlighting_cache>`. +Then calls overridable method :ref:`_clear_highlighting_cache<class_SyntaxHighlighter_private_method__clear_highlighting_cache>`. .. rst-class:: classref-item-separator @@ -114,9 +114,9 @@ Then calls overridable method :ref:`_clear_highlighting_cache<class_SyntaxHighli .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_line_syntax_highlighting** **(** :ref:`int<class_int>` line **)** +:ref:`Dictionary<class_Dictionary>` **get_line_syntax_highlighting**\ (\ line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SyntaxHighlighter_method_get_line_syntax_highlighting>` -Returns syntax highlighting data for a single line. If the line is not cached, calls :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_method__get_line_syntax_highlighting>` to calculate the data. +Returns syntax highlighting data for a single line. If the line is not cached, calls :ref:`_get_line_syntax_highlighting<class_SyntaxHighlighter_private_method__get_line_syntax_highlighting>` to calculate the data. The return :ref:`Dictionary<class_Dictionary>` is column number to :ref:`Dictionary<class_Dictionary>`. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested :ref:`Dictionary<class_Dictionary>` contains the data for that region, currently only the key "color" is supported. @@ -143,7 +143,7 @@ This will color columns 0-4 red, and columns 5-eol in green. .. rst-class:: classref-method -:ref:`TextEdit<class_TextEdit>` **get_text_edit** **(** **)** |const| +:ref:`TextEdit<class_TextEdit>` **get_text_edit**\ (\ ) |const| :ref:`🔗<class_SyntaxHighlighter_method_get_text_edit>` Returns the associated :ref:`TextEdit<class_TextEdit>` node. @@ -155,9 +155,9 @@ Returns the associated :ref:`TextEdit<class_TextEdit>` node. .. rst-class:: classref-method -void **update_cache** **(** **)** +|void| **update_cache**\ (\ ) :ref:`🔗<class_SyntaxHighlighter_method_update_cache>` -Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache<class_SyntaxHighlighter_method__update_cache>` for a callback. +Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cache<class_SyntaxHighlighter_private_method__update_cache>` for a callback. \ **Note:** This is called automatically when the associated :ref:`TextEdit<class_TextEdit>` node, updates its own cache. @@ -168,3 +168,4 @@ Clears then updates the **SyntaxHighlighter** caches. Override :ref:`_update_cac .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_systemfont.rst b/classes/class_systemfont.rst index 3c075609dec..39fafa5c090 100644 --- a/classes/class_systemfont.rst +++ b/classes/class_systemfont.rst @@ -25,7 +25,7 @@ It will attempt to match font style, but it's not guaranteed. The returned font might be part of a font collection or be a variable font with OpenType "weight", "width" and/or "italic" features set. -You can create :ref:`FontVariation<class_FontVariation>` of the system font for fine control over its features. +You can create :ref:`FontVariation<class_FontVariation>` of the system font for precise control over its features. \ **Note:** This class is implemented on iOS, Linux, macOS and Windows, on other platforms it will fallback to default theme font. @@ -42,7 +42,7 @@ Properties +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`antialiasing<class_SystemFont_property_antialiasing>` | ``1`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`Font[]<class_Font>` | :ref:`fallbacks<class_SystemFont_property_fallbacks>` | ``[]`` | + | :ref:`bool<class_bool>` | :ref:`disable_embedded_bitmaps<class_SystemFont_property_disable_embedded_bitmaps>` | ``true`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool<class_bool>` | :ref:`font_italic<class_SystemFont_property_font_italic>` | ``false`` | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------+-------------------------+ @@ -82,12 +82,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` +:ref:`bool<class_bool>` **allow_system_fallback** = ``true`` :ref:`🔗<class_SystemFont_property_allow_system_fallback>` .. rst-class:: classref-property-setget -- void **set_allow_system_fallback** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_allow_system_fallback** **(** **)** +- |void| **set_allow_system_fallback**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_allow_system_fallback**\ (\ ) If set to ``true``, system fonts can be automatically used as fallbacks. @@ -99,12 +99,12 @@ If set to ``true``, system fonts can be automatically used as fallbacks. .. rst-class:: classref-property -:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1`` +:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **antialiasing** = ``1`` :ref:`🔗<class_SystemFont_property_antialiasing>` .. rst-class:: classref-property-setget -- void **set_antialiasing** **(** :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` value **)** -- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing** **(** **)** +- |void| **set_antialiasing**\ (\ value\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) +- :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **get_antialiasing**\ (\ ) Font anti-aliasing mode. @@ -112,18 +112,18 @@ Font anti-aliasing mode. ---- -.. _class_SystemFont_property_fallbacks: +.. _class_SystemFont_property_disable_embedded_bitmaps: .. rst-class:: classref-property -:ref:`Font[]<class_Font>` **fallbacks** = ``[]`` +:ref:`bool<class_bool>` **disable_embedded_bitmaps** = ``true`` :ref:`🔗<class_SystemFont_property_disable_embedded_bitmaps>` .. rst-class:: classref-property-setget -- void **set_fallbacks** **(** :ref:`Font[]<class_Font>` value **)** -- :ref:`Font[]<class_Font>` **get_fallbacks** **(** **)** +- |void| **set_disable_embedded_bitmaps**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_disable_embedded_bitmaps**\ (\ ) -Array of fallback :ref:`Font<class_Font>`\ s. +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). .. rst-class:: classref-item-separator @@ -133,12 +133,12 @@ Array of fallback :ref:`Font<class_Font>`\ s. .. rst-class:: classref-property -:ref:`bool<class_bool>` **font_italic** = ``false`` +:ref:`bool<class_bool>` **font_italic** = ``false`` :ref:`🔗<class_SystemFont_property_font_italic>` .. rst-class:: classref-property-setget -- void **set_font_italic** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_font_italic** **(** **)** +- |void| **set_font_italic**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_font_italic**\ (\ ) If set to ``true``, italic or oblique font is preferred. @@ -150,15 +150,17 @@ If set to ``true``, italic or oblique font is preferred. .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **font_names** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **font_names** = ``PackedStringArray()`` :ref:`🔗<class_SystemFont_property_font_names>` .. rst-class:: classref-property-setget -- void **set_font_names** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_font_names** **(** **)** +- |void| **set_font_names**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_font_names**\ (\ ) Array of font family names to search, first matching font found is used. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -167,12 +169,12 @@ Array of font family names to search, first matching font found is used. .. rst-class:: classref-property -:ref:`int<class_int>` **font_stretch** = ``100`` +:ref:`int<class_int>` **font_stretch** = ``100`` :ref:`🔗<class_SystemFont_property_font_stretch>` .. rst-class:: classref-property-setget -- void **set_font_stretch** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_stretch** **(** **)** +- |void| **set_font_stretch**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_stretch**\ (\ ) Preferred font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. @@ -184,12 +186,12 @@ Preferred font stretch amount, compared to a normal width. A percentage value be .. rst-class:: classref-property -:ref:`int<class_int>` **font_weight** = ``400`` +:ref:`int<class_int>` **font_weight** = ``400`` :ref:`🔗<class_SystemFont_property_font_weight>` .. rst-class:: classref-property-setget -- void **set_font_weight** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_weight** **(** **)** +- |void| **set_font_weight**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_weight**\ (\ ) Preferred weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. @@ -201,12 +203,12 @@ Preferred weight (boldness) of the font. A value in the ``100...999`` range, nor .. rst-class:: classref-property -:ref:`bool<class_bool>` **force_autohinter** = ``false`` +:ref:`bool<class_bool>` **force_autohinter** = ``false`` :ref:`🔗<class_SystemFont_property_force_autohinter>` .. rst-class:: classref-property-setget -- void **set_force_autohinter** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_force_autohinter** **(** **)** +- |void| **set_force_autohinter**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_force_autohinter**\ (\ ) If set to ``true``, auto-hinting is supported and preferred over font built-in hinting. @@ -218,12 +220,12 @@ If set to ``true``, auto-hinting is supported and preferred over font built-in h .. rst-class:: classref-property -:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` +:ref:`bool<class_bool>` **generate_mipmaps** = ``false`` :ref:`🔗<class_SystemFont_property_generate_mipmaps>` .. rst-class:: classref-property-setget -- void **set_generate_mipmaps** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_generate_mipmaps** **(** **)** +- |void| **set_generate_mipmaps**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_generate_mipmaps**\ (\ ) If set to ``true``, generate mipmaps for the font textures. @@ -235,12 +237,12 @@ If set to ``true``, generate mipmaps for the font textures. .. rst-class:: classref-property -:ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1`` +:ref:`Hinting<enum_TextServer_Hinting>` **hinting** = ``1`` :ref:`🔗<class_SystemFont_property_hinting>` .. rst-class:: classref-property-setget -- void **set_hinting** **(** :ref:`Hinting<enum_TextServer_Hinting>` value **)** -- :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting** **(** **)** +- |void| **set_hinting**\ (\ value\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) +- :ref:`Hinting<enum_TextServer_Hinting>` **get_hinting**\ (\ ) Font hinting mode. @@ -252,12 +254,12 @@ Font hinting mode. .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_pixel_range** = ``16`` +:ref:`int<class_int>` **msdf_pixel_range** = ``16`` :ref:`🔗<class_SystemFont_property_msdf_pixel_range>` .. rst-class:: classref-property-setget -- void **set_msdf_pixel_range** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_msdf_pixel_range** **(** **)** +- |void| **set_msdf_pixel_range**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_msdf_pixel_range**\ (\ ) The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range<class_SystemFont_property_msdf_pixel_range>` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range<class_SystemFont_property_msdf_pixel_range>` value of ``16`` allows outline sizes up to ``8`` to look correct. @@ -269,12 +271,12 @@ The width of the range around the shape between the minimum and maximum represen .. rst-class:: classref-property -:ref:`int<class_int>` **msdf_size** = ``48`` +:ref:`int<class_int>` **msdf_size** = ``48`` :ref:`🔗<class_SystemFont_property_msdf_size>` .. rst-class:: classref-property-setget -- void **set_msdf_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_msdf_size** **(** **)** +- |void| **set_msdf_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_msdf_size**\ (\ ) Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. @@ -286,12 +288,12 @@ Source font size used to generate MSDF textures. Higher values allow for more pr .. rst-class:: classref-property -:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` +:ref:`bool<class_bool>` **multichannel_signed_distance_field** = ``false`` :ref:`🔗<class_SystemFont_property_multichannel_signed_distance_field>` .. rst-class:: classref-property-setget -- void **set_multichannel_signed_distance_field** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_multichannel_signed_distance_field** **(** **)** +- |void| **set_multichannel_signed_distance_field**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_multichannel_signed_distance_field**\ (\ ) If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. @@ -303,12 +305,12 @@ If set to ``true``, glyphs of all sizes are rendered using single multichannel s .. rst-class:: classref-property -:ref:`float<class_float>` **oversampling** = ``0.0`` +:ref:`float<class_float>` **oversampling** = ``0.0`` :ref:`🔗<class_SystemFont_property_oversampling>` .. rst-class:: classref-property-setget -- void **set_oversampling** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_oversampling** **(** **)** +- |void| **set_oversampling**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_oversampling**\ (\ ) Font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. @@ -320,12 +322,12 @@ Font oversampling factor, if set to ``0.0`` global oversampling factor is used i .. rst-class:: classref-property -:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1`` +:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **subpixel_positioning** = ``1`` :ref:`🔗<class_SystemFont_property_subpixel_positioning>` .. rst-class:: classref-property-setget -- void **set_subpixel_positioning** **(** :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` value **)** -- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning** **(** **)** +- |void| **set_subpixel_positioning**\ (\ value\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) +- :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **get_subpixel_positioning**\ (\ ) Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO<class_TextServer_constant_SUBPIXEL_POSITIONING_AUTO>` to automatically enable it based on the font size. @@ -336,3 +338,4 @@ Font glyph subpixel positioning mode. Subpixel positioning provides shaper text .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tabbar.rst b/classes/class_tabbar.rst index eb76fd31b26..ec493b93766 100644 --- a/classes/class_tabbar.rst +++ b/classes/class_tabbar.rst @@ -29,29 +29,33 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabBar_property_clip_tabs>` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`current_tab<class_TabBar_property_current_tab>` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>` | ``false`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`max_tab_width<class_TabBar_property_max_tab_width>` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`scroll_to_selected<class_TabBar_property_scroll_to_selected>` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`scrolling_enabled<class_TabBar_property_scrolling_enabled>` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`select_with_rmb<class_TabBar_property_select_with_rmb>` | ``false`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabBar_property_tab_alignment>` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` | :ref:`tab_close_display_policy<class_TabBar_property_tab_close_display_policy>` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`tab_count<class_TabBar_property_tab_count>` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabBar_property_tabs_rearrange_group>` | ``-1`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabBar_property_clip_tabs>` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`current_tab<class_TabBar_property_current_tab>` | ``-1`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`deselect_enabled<class_TabBar_property_deselect_enabled>` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_tab_width<class_TabBar_property_max_tab_width>` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`scroll_to_selected<class_TabBar_property_scroll_to_selected>` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`scrolling_enabled<class_TabBar_property_scrolling_enabled>` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`select_with_rmb<class_TabBar_property_select_with_rmb>` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabBar_property_tab_alignment>` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` | :ref:`tab_close_display_policy<class_TabBar_property_tab_close_display_policy>` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`tab_count<class_TabBar_property_tab_count>` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabBar_property_tabs_rearrange_group>` | ``-1`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -61,63 +65,71 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_tab<class_TabBar_method_add_tab>` **(** :ref:`String<class_String>` title="", :ref:`Texture2D<class_Texture2D>` icon=null **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_tabs<class_TabBar_method_clear_tabs>` **(** **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_tab_visible<class_TabBar_method_ensure_tab_visible>` **(** :ref:`int<class_int>` idx **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_offset_buttons_visible<class_TabBar_method_get_offset_buttons_visible>` **(** **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabBar_method_get_previous_tab>` **(** **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabBar_method_get_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabBar_method_get_tab_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_icon_max_width<class_TabBar_method_get_tab_icon_max_width>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabBar_method_get_tab_idx_at_point>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_tab_language<class_TabBar_method_get_tab_language>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabBar_method_get_tab_metadata>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_offset<class_TabBar_method_get_tab_offset>` **(** **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_tab_rect<class_TabBar_method_get_tab_rect>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_tab_text_direction<class_TabBar_method_get_tab_text_direction>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabBar_method_get_tab_title>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabBar_method_is_tab_disabled>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabBar_method_is_tab_hidden>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_tab<class_TabBar_method_move_tab>` **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_tab<class_TabBar_method_remove_tab>` **(** :ref:`int<class_int>` tab_idx **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_button_icon<class_TabBar_method_set_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_disabled<class_TabBar_method_set_tab_disabled>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_hidden<class_TabBar_method_set_tab_hidden>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_icon<class_TabBar_method_set_tab_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>` **(** :ref:`int<class_int>` tab_idx, :ref:`int<class_int>` width **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_language<class_TabBar_method_set_tab_language>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` language **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_metadata<class_TabBar_method_set_tab_metadata>` **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_text_direction<class_TabBar_method_set_tab_text_direction>` **(** :ref:`int<class_int>` tab_idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_title<class_TabBar_method_set_tab_title>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)** | - +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_tab<class_TabBar_method_add_tab>`\ (\ title\: :ref:`String<class_String>` = "", icon\: :ref:`Texture2D<class_Texture2D>` = null\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_tabs<class_TabBar_method_clear_tabs>`\ (\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ensure_tab_visible<class_TabBar_method_ensure_tab_visible>`\ (\ idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_offset_buttons_visible<class_TabBar_method_get_offset_buttons_visible>`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabBar_method_get_previous_tab>`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabBar_method_get_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabBar_method_get_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_icon_max_width<class_TabBar_method_get_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabBar_method_get_tab_idx_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tab_language<class_TabBar_method_get_tab_language>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabBar_method_get_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_offset<class_TabBar_method_get_tab_offset>`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_tab_rect<class_TabBar_method_get_tab_rect>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_tab_text_direction<class_TabBar_method_get_tab_text_direction>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabBar_method_get_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tab_tooltip<class_TabBar_method_get_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabBar_method_is_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabBar_method_is_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_tab<class_TabBar_method_move_tab>`\ (\ from\: :ref:`int<class_int>`, to\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_tab<class_TabBar_method_remove_tab>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`select_next_available<class_TabBar_method_select_next_available>`\ (\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`select_previous_available<class_TabBar_method_select_previous_available>`\ (\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_button_icon<class_TabBar_method_set_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_disabled<class_TabBar_method_set_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_hidden<class_TabBar_method_set_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_icon<class_TabBar_method_set_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_language<class_TabBar_method_set_tab_language>`\ (\ tab_idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_metadata<class_TabBar_method_set_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_text_direction<class_TabBar_method_set_tab_text_direction>`\ (\ tab_idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_title<class_TabBar_method_set_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_tooltip<class_TabBar_method_set_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -134,7 +146,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabBar_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabBar_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabBar_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabBar_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ @@ -168,6 +180,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabBar_theme_style_tab_disabled>` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabBar_theme_style_tab_focus>` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabBar_theme_style_tab_hovered>` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabBar_theme_style_tab_selected>` | | @@ -188,7 +202,7 @@ Signals .. rst-class:: classref-signal -**active_tab_rearranged** **(** :ref:`int<class_int>` idx_to **)** +**active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_active_tab_rearranged>` Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`. @@ -200,7 +214,7 @@ Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rear .. rst-class:: classref-signal -**tab_button_pressed** **(** :ref:`int<class_int>` tab **)** +**tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_button_pressed>` Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon<class_TabBar_method_set_tab_button_icon>`. @@ -212,7 +226,7 @@ Emitted when a tab's right button is pressed. See :ref:`set_tab_button_icon<clas .. rst-class:: classref-signal -**tab_changed** **(** :ref:`int<class_int>` tab **)** +**tab_changed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_changed>` Emitted when switching to another tab. @@ -224,7 +238,7 @@ Emitted when switching to another tab. .. rst-class:: classref-signal -**tab_clicked** **(** :ref:`int<class_int>` tab **)** +**tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_clicked>` Emitted when a tab is clicked, even if it is the current tab. @@ -236,7 +250,7 @@ Emitted when a tab is clicked, even if it is the current tab. .. rst-class:: classref-signal -**tab_close_pressed** **(** :ref:`int<class_int>` tab **)** +**tab_close_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_close_pressed>` Emitted when a tab's close button is pressed. @@ -263,7 +277,7 @@ Emitted when a tab's close button is pressed. .. rst-class:: classref-signal -**tab_hovered** **(** :ref:`int<class_int>` tab **)** +**tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_hovered>` Emitted when a tab is hovered by the mouse. @@ -275,7 +289,7 @@ Emitted when a tab is hovered by the mouse. .. rst-class:: classref-signal -**tab_rmb_clicked** **(** :ref:`int<class_int>` tab **)** +**tab_rmb_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_rmb_clicked>` Emitted when a tab is right-clicked. :ref:`select_with_rmb<class_TabBar_property_select_with_rmb>` must be enabled. @@ -287,9 +301,9 @@ Emitted when a tab is right-clicked. :ref:`select_with_rmb<class_TabBar_property .. rst-class:: classref-signal -**tab_selected** **(** :ref:`int<class_int>` tab **)** +**tab_selected**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_signal_tab_selected>` -Emitted when a tab is selected via click or script, even if it is the current tab. +Emitted when a tab is selected via click, directional input, or script, even if it is the current tab. .. rst-class:: classref-section-separator @@ -304,7 +318,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **AlignmentMode**: +enum **AlignmentMode**: :ref:`🔗<enum_TabBar_AlignmentMode>` .. _class_TabBar_constant_ALIGNMENT_LEFT: @@ -346,7 +360,7 @@ Represents the size of the :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` enum. .. rst-class:: classref-enumeration -enum **CloseButtonDisplayPolicy**: +enum **CloseButtonDisplayPolicy**: :ref:`🔗<enum_TabBar_CloseButtonDisplayPolicy>` .. _class_TabBar_constant_CLOSE_BUTTON_SHOW_NEVER: @@ -393,12 +407,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **clip_tabs** = ``true`` +:ref:`bool<class_bool>` **clip_tabs** = ``true`` :ref:`🔗<class_TabBar_property_clip_tabs>` .. rst-class:: classref-property-setget -- void **set_clip_tabs** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_clip_tabs** **(** **)** +- |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_clip_tabs**\ (\ ) If ``true``, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible. @@ -410,14 +424,31 @@ If ``true``, tabs overflowing this node's width will be hidden, displaying two n .. rst-class:: classref-property -:ref:`int<class_int>` **current_tab** = ``0`` +:ref:`int<class_int>` **current_tab** = ``-1`` :ref:`🔗<class_TabBar_property_current_tab>` .. rst-class:: classref-property-setget -- void **set_current_tab** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_current_tab** **(** **)** +- |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_current_tab**\ (\ ) -Select tab at index ``tab_idx``. +The index of the current selected tab. A value of ``-1`` means that no tab is selected and can only be set when :ref:`deselect_enabled<class_TabBar_property_deselect_enabled>` is ``true`` or if all tabs are hidden or disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_property_deselect_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **deselect_enabled** = ``false`` :ref:`🔗<class_TabBar_property_deselect_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ ) + +If ``true``, all tabs can be deselected so that no tab is selected. Click on the current tab to deselect it. .. rst-class:: classref-item-separator @@ -427,12 +458,12 @@ Select tab at index ``tab_idx``. .. rst-class:: classref-property -:ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` +:ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` :ref:`🔗<class_TabBar_property_drag_to_rearrange_enabled>` .. rst-class:: classref-property-setget -- void **set_drag_to_rearrange_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled** **(** **)** +- |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ ) If ``true``, tabs can be rearranged with mouse drag. @@ -444,12 +475,12 @@ If ``true``, tabs can be rearranged with mouse drag. .. rst-class:: classref-property -:ref:`int<class_int>` **max_tab_width** = ``0`` +:ref:`int<class_int>` **max_tab_width** = ``0`` :ref:`🔗<class_TabBar_property_max_tab_width>` .. rst-class:: classref-property-setget -- void **set_max_tab_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_tab_width** **(** **)** +- |void| **set_max_tab_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_tab_width**\ (\ ) Sets the maximum width which all tabs should be limited to. Unlimited if set to ``0``. @@ -461,12 +492,12 @@ Sets the maximum width which all tabs should be limited to. Unlimited if set to .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_to_selected** = ``true`` +:ref:`bool<class_bool>` **scroll_to_selected** = ``true`` :ref:`🔗<class_TabBar_property_scroll_to_selected>` .. rst-class:: classref-property-setget -- void **set_scroll_to_selected** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_scroll_to_selected** **(** **)** +- |void| **set_scroll_to_selected**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_scroll_to_selected**\ (\ ) If ``true``, the tab offset will be changed to keep the currently selected tab visible. @@ -478,12 +509,12 @@ If ``true``, the tab offset will be changed to keep the currently selected tab v .. rst-class:: classref-property -:ref:`bool<class_bool>` **scrolling_enabled** = ``true`` +:ref:`bool<class_bool>` **scrolling_enabled** = ``true`` :ref:`🔗<class_TabBar_property_scrolling_enabled>` .. rst-class:: classref-property-setget -- void **set_scrolling_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_scrolling_enabled** **(** **)** +- |void| **set_scrolling_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_scrolling_enabled**\ (\ ) if ``true``, the mouse's scroll wheel can be used to navigate the scroll view. @@ -495,12 +526,12 @@ if ``true``, the mouse's scroll wheel can be used to navigate the scroll view. .. rst-class:: classref-property -:ref:`bool<class_bool>` **select_with_rmb** = ``false`` +:ref:`bool<class_bool>` **select_with_rmb** = ``false`` :ref:`🔗<class_TabBar_property_select_with_rmb>` .. rst-class:: classref-property-setget -- void **set_select_with_rmb** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_select_with_rmb** **(** **)** +- |void| **set_select_with_rmb**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_select_with_rmb**\ (\ ) If ``true``, enables selecting a tab with the right mouse button. @@ -512,12 +543,12 @@ If ``true``, enables selecting a tab with the right mouse button. .. rst-class:: classref-property -:ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` +:ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` :ref:`🔗<class_TabBar_property_tab_alignment>` .. rst-class:: classref-property-setget -- void **set_tab_alignment** **(** :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` value **)** -- :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment** **(** **)** +- |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ ) +- :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ ) Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` for details. @@ -529,12 +560,12 @@ Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_Tab .. rst-class:: classref-property -:ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **tab_close_display_policy** = ``0`` +:ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **tab_close_display_policy** = ``0`` :ref:`🔗<class_TabBar_property_tab_close_display_policy>` .. rst-class:: classref-property-setget -- void **set_tab_close_display_policy** **(** :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` value **)** -- :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **get_tab_close_display_policy** **(** **)** +- |void| **set_tab_close_display_policy**\ (\ value\: :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>`\ ) +- :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` **get_tab_close_display_policy**\ (\ ) Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplayPolicy<enum_TabBar_CloseButtonDisplayPolicy>` for details. @@ -546,12 +577,12 @@ Sets when the close button will appear on the tabs. See :ref:`CloseButtonDisplay .. rst-class:: classref-property -:ref:`int<class_int>` **tab_count** = ``0`` +:ref:`int<class_int>` **tab_count** = ``0`` :ref:`🔗<class_TabBar_property_tab_count>` .. rst-class:: classref-property-setget -- void **set_tab_count** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_tab_count** **(** **)** +- |void| **set_tab_count**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_tab_count**\ (\ ) The number of tabs currently in the bar. @@ -563,12 +594,12 @@ The number of tabs currently in the bar. .. rst-class:: classref-property -:ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` +:ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` :ref:`🔗<class_TabBar_property_tabs_rearrange_group>` .. rst-class:: classref-property-setget -- void **set_tabs_rearrange_group** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_tabs_rearrange_group** **(** **)** +- |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ ) **TabBar**\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`. @@ -587,7 +618,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_tab** **(** :ref:`String<class_String>` title="", :ref:`Texture2D<class_Texture2D>` icon=null **)** +|void| **add_tab**\ (\ title\: :ref:`String<class_String>` = "", icon\: :ref:`Texture2D<class_Texture2D>` = null\ ) :ref:`🔗<class_TabBar_method_add_tab>` Adds a new tab. @@ -599,7 +630,7 @@ Adds a new tab. .. rst-class:: classref-method -void **clear_tabs** **(** **)** +|void| **clear_tabs**\ (\ ) :ref:`🔗<class_TabBar_method_clear_tabs>` Clears all tabs. @@ -611,7 +642,7 @@ Clears all tabs. .. rst-class:: classref-method -void **ensure_tab_visible** **(** :ref:`int<class_int>` idx **)** +|void| **ensure_tab_visible**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_method_ensure_tab_visible>` Moves the scroll view to make the tab visible. @@ -623,7 +654,7 @@ Moves the scroll view to make the tab visible. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_offset_buttons_visible** **(** **)** |const| +:ref:`bool<class_bool>` **get_offset_buttons_visible**\ (\ ) |const| :ref:`🔗<class_TabBar_method_get_offset_buttons_visible>` Returns ``true`` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible. @@ -635,7 +666,7 @@ Returns ``true`` if the offset buttons (the ones that appear when there's not en .. rst-class:: classref-method -:ref:`int<class_int>` **get_previous_tab** **(** **)** |const| +:ref:`int<class_int>` **get_previous_tab**\ (\ ) |const| :ref:`🔗<class_TabBar_method_get_previous_tab>` Returns the previously active tab index. @@ -647,7 +678,7 @@ Returns the previously active tab index. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_tab_button_icon** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_button_icon>` Returns the icon for the right button of the tab at index ``tab_idx`` or ``null`` if the right button has no icon. @@ -659,7 +690,7 @@ Returns the icon for the right button of the tab at index ``tab_idx`` or ``null` .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_tab_icon** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_icon>` Returns the icon for the tab at index ``tab_idx`` or ``null`` if the tab has no icon. @@ -671,7 +702,7 @@ Returns the icon for the tab at index ``tab_idx`` or ``null`` if the tab has no .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_icon_max_width** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`int<class_int>` **get_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_icon_max_width>` Returns the maximum allowed width of the icon for the tab at index ``tab_idx``. @@ -683,7 +714,7 @@ Returns the maximum allowed width of the icon for the tab at index ``tab_idx``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_idx_at_point** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_idx_at_point>` Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if the point is outside the control boundaries or if there's no tab at the queried position. @@ -695,7 +726,7 @@ Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if t .. rst-class:: classref-method -:ref:`String<class_String>` **get_tab_language** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`String<class_String>` **get_tab_language**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_language>` Returns tab title language code. @@ -707,7 +738,7 @@ Returns tab title language code. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_tab_metadata** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_metadata>` Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata<class_TabBar_method_set_tab_metadata>`. If no metadata was previously set, returns ``null`` by default. @@ -719,7 +750,7 @@ Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_t .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_offset** **(** **)** |const| +:ref:`int<class_int>` **get_tab_offset**\ (\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_offset>` Returns the number of hidden tabs offsetted to the left. @@ -731,7 +762,7 @@ Returns the number of hidden tabs offsetted to the left. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_tab_rect** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Rect2<class_Rect2>` **get_tab_rect**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_rect>` Returns tab :ref:`Rect2<class_Rect2>` with local position and size. @@ -743,7 +774,7 @@ Returns tab :ref:`Rect2<class_Rect2>` with local position and size. .. rst-class:: classref-method -:ref:`TextDirection<enum_Control_TextDirection>` **get_tab_text_direction** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`TextDirection<enum_Control_TextDirection>` **get_tab_text_direction**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_text_direction>` Returns tab title text base writing direction. @@ -755,7 +786,7 @@ Returns tab title text base writing direction. .. rst-class:: classref-method -:ref:`String<class_String>` **get_tab_title** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_title>` Returns the title of the tab at index ``tab_idx``. @@ -763,11 +794,23 @@ Returns the title of the tab at index ``tab_idx``. ---- +.. _class_TabBar_method_get_tab_tooltip: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_get_tab_tooltip>` + +Returns the tooltip text of the tab at index ``tab_idx``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_method_is_tab_disabled: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_tab_disabled** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_is_tab_disabled>` Returns ``true`` if the tab at index ``tab_idx`` is disabled. @@ -779,7 +822,7 @@ Returns ``true`` if the tab at index ``tab_idx`` is disabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_tab_hidden** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabBar_method_is_tab_hidden>` Returns ``true`` if the tab at index ``tab_idx`` is hidden. @@ -791,7 +834,7 @@ Returns ``true`` if the tab at index ``tab_idx`` is hidden. .. rst-class:: classref-method -void **move_tab** **(** :ref:`int<class_int>` from, :ref:`int<class_int>` to **)** +|void| **move_tab**\ (\ from\: :ref:`int<class_int>`, to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_method_move_tab>` Moves a tab from ``from`` to ``to``. @@ -803,7 +846,7 @@ Moves a tab from ``from`` to ``to``. .. rst-class:: classref-method -void **remove_tab** **(** :ref:`int<class_int>` tab_idx **)** +|void| **remove_tab**\ (\ tab_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_method_remove_tab>` Removes the tab at index ``tab_idx``. @@ -811,11 +854,35 @@ Removes the tab at index ``tab_idx``. ---- +.. _class_TabBar_method_select_next_available: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **select_next_available**\ (\ ) :ref:`🔗<class_TabBar_method_select_next_available>` + +Selects the first available tab with greater index than the currently selected. Returns ``true`` if tab selection changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_method_select_previous_available: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **select_previous_available**\ (\ ) :ref:`🔗<class_TabBar_method_select_previous_available>` + +Selects the first available tab with lower index than the currently selected. Returns ``true`` if tab selection changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_method_set_tab_button_icon: .. rst-class:: classref-method -void **set_tab_button_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabBar_method_set_tab_button_icon>` Sets an ``icon`` for the button of the tab at index ``tab_idx`` (located to the right, before the close button), making it visible and clickable (See :ref:`tab_button_pressed<class_TabBar_signal_tab_button_pressed>`). Giving it a ``null`` value will hide the button. @@ -827,7 +894,7 @@ Sets an ``icon`` for the button of the tab at index ``tab_idx`` (located to the .. rst-class:: classref-method -void **set_tab_disabled** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** +|void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabBar_method_set_tab_disabled>` If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable. @@ -839,7 +906,7 @@ If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it no .. rst-class:: classref-method -void **set_tab_hidden** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)** +|void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabBar_method_set_tab_hidden>` If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area. @@ -851,7 +918,7 @@ If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappe .. rst-class:: classref-method -void **set_tab_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabBar_method_set_tab_icon>` Sets an ``icon`` for the tab at index ``tab_idx``. @@ -863,7 +930,7 @@ Sets an ``icon`` for the tab at index ``tab_idx``. .. rst-class:: classref-method -void **set_tab_icon_max_width** **(** :ref:`int<class_int>` tab_idx, :ref:`int<class_int>` width **)** +|void| **set_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabBar_method_set_tab_icon_max_width>` Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width<class_TabBar_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -875,7 +942,7 @@ Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. Thi .. rst-class:: classref-method -void **set_tab_language** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` language **)** +|void| **set_tab_language**\ (\ tab_idx\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabBar_method_set_tab_language>` Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -887,7 +954,7 @@ Sets language code of tab title used for line-breaking and text shaping algorith .. rst-class:: classref-method -void **set_tab_metadata** **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TabBar_method_set_tab_metadata>` Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata<class_TabBar_method_get_tab_metadata>`. @@ -899,7 +966,7 @@ Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved .. rst-class:: classref-method -void **set_tab_text_direction** **(** :ref:`int<class_int>` tab_idx, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** +|void| **set_tab_text_direction**\ (\ tab_idx\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_TabBar_method_set_tab_text_direction>` Sets tab title base writing direction. @@ -911,10 +978,24 @@ Sets tab title base writing direction. .. rst-class:: classref-method -void **set_tab_title** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)** +|void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabBar_method_set_tab_title>` Sets a ``title`` for the tab at index ``tab_idx``. +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_method_set_tab_tooltip: + +.. rst-class:: classref-method + +|void| **set_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabBar_method_set_tab_tooltip>` + +Sets a ``tooltip`` for tab at index ``tab_idx``. + +\ **Note:** By default, if the ``tooltip`` is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign ``" "`` as the ``tooltip`` text. + .. rst-class:: classref-section-separator ---- @@ -928,7 +1009,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TabBar_theme_color_drop_mark_color>` Modulation color for the :ref:`drop_mark<class_TabBar_theme_icon_drop_mark>` icon. @@ -940,7 +1021,7 @@ Modulation color for the :ref:`drop_mark<class_TabBar_theme_icon_drop_mark>` ico .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_TabBar_theme_color_font_disabled_color>` Font color of disabled tabs. @@ -952,7 +1033,7 @@ Font color of disabled tabs. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabBar_theme_color_font_hovered_color>` Font color of the currently hovered tab. Does not apply to the selected tab. @@ -964,7 +1045,7 @@ Font color of the currently hovered tab. Does not apply to the selected tab. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_TabBar_theme_color_font_outline_color>` The tint of text outline of the tab name. @@ -976,7 +1057,7 @@ The tint of text outline of the tab name. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabBar_theme_color_font_selected_color>` Font color of the currently selected tab. @@ -988,7 +1069,7 @@ Font color of the currently selected tab. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` +:ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_TabBar_theme_color_font_unselected_color>` Font color of the other, unselected tabs. @@ -1000,7 +1081,7 @@ Font color of the other, unselected tabs. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_TabBar_theme_constant_h_separation>` The horizontal separation between the elements inside tabs. @@ -1012,7 +1093,7 @@ The horizontal separation between the elements inside tabs. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_max_width** = ``0`` +:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_TabBar_theme_constant_icon_max_width>` The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -1024,7 +1105,7 @@ The maximum allowed width of the tab's icon. This limit is applied on top of the .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_TabBar_theme_constant_outline_size>` The size of the tab text outline. @@ -1038,7 +1119,7 @@ The size of the tab text outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_TabBar_theme_font_font>` The font used to draw tab names. @@ -1050,7 +1131,7 @@ The font used to draw tab names. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_TabBar_theme_font_size_font_size>` Font size of the tab names. @@ -1062,7 +1143,7 @@ Font size of the tab names. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **close** +:ref:`Texture2D<class_Texture2D>` **close** :ref:`🔗<class_TabBar_theme_icon_close>` The icon for the close button (see :ref:`tab_close_display_policy<class_TabBar_property_tab_close_display_policy>`). @@ -1074,7 +1155,7 @@ The icon for the close button (see :ref:`tab_close_display_policy<class_TabBar_p .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **decrement** +:ref:`Texture2D<class_Texture2D>` **decrement** :ref:`🔗<class_TabBar_theme_icon_decrement>` Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. @@ -1086,7 +1167,7 @@ Icon for the left arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **decrement_highlight** +:ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`🔗<class_TabBar_theme_icon_decrement_highlight>` Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. @@ -1098,7 +1179,7 @@ Icon for the left arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **drop_mark** +:ref:`Texture2D<class_Texture2D>` **drop_mark** :ref:`🔗<class_TabBar_theme_icon_drop_mark>` Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled<class_TabBar_property_drag_to_rearrange_enabled>`). @@ -1110,7 +1191,7 @@ Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_t .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **increment** +:ref:`Texture2D<class_Texture2D>` **increment** :ref:`🔗<class_TabBar_theme_icon_increment>` Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. @@ -1122,7 +1203,7 @@ Icon for the right arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **increment_highlight** +:ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`🔗<class_TabBar_theme_icon_increment_highlight>` Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. @@ -1134,7 +1215,7 @@ Icon for the right arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **button_highlight** +:ref:`StyleBox<class_StyleBox>` **button_highlight** :ref:`🔗<class_TabBar_theme_style_button_highlight>` Background of the tab and close buttons when they're being hovered with the cursor. @@ -1146,7 +1227,7 @@ Background of the tab and close buttons when they're being hovered with the curs .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **button_pressed** +:ref:`StyleBox<class_StyleBox>` **button_pressed** :ref:`🔗<class_TabBar_theme_style_button_pressed>` Background of the tab and close buttons when it's being pressed. @@ -1158,7 +1239,7 @@ Background of the tab and close buttons when it's being pressed. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_disabled** +:ref:`StyleBox<class_StyleBox>` **tab_disabled** :ref:`🔗<class_TabBar_theme_style_tab_disabled>` The style of disabled tabs. @@ -1166,14 +1247,28 @@ The style of disabled tabs. ---- +.. _class_TabBar_theme_style_tab_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **tab_focus** :ref:`🔗<class_TabBar_theme_style_tab_focus>` + +:ref:`StyleBox<class_StyleBox>` used when the **TabBar** is focused. The :ref:`tab_focus<class_TabBar_theme_style_tab_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>` of the selected tab, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_theme_style_tab_hovered: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_hovered** +:ref:`StyleBox<class_StyleBox>` **tab_hovered** :ref:`🔗<class_TabBar_theme_style_tab_hovered>` The style of the currently hovered tab. Does not apply to the selected tab. +\ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabBar_theme_style_tab_unselected>` at minimum. + .. rst-class:: classref-item-separator ---- @@ -1182,7 +1277,7 @@ The style of the currently hovered tab. Does not apply to the selected tab. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_selected** +:ref:`StyleBox<class_StyleBox>` **tab_selected** :ref:`🔗<class_TabBar_theme_style_tab_selected>` The style of the currently selected tab. @@ -1194,7 +1289,7 @@ The style of the currently selected tab. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_unselected** +:ref:`StyleBox<class_StyleBox>` **tab_unselected** :ref:`🔗<class_TabBar_theme_style_tab_unselected>` The style of the other, unselected tabs. @@ -1205,3 +1300,4 @@ The style of the other, unselected tabs. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tabcontainer.rst b/classes/class_tabcontainer.rst index 99ad5e9f345..51abbf5d438 100644 --- a/classes/class_tabcontainer.rst +++ b/classes/class_tabcontainer.rst @@ -38,23 +38,29 @@ Properties .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`all_tabs_in_front<class_TabContainer_property_all_tabs_in_front>` | ``false`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabContainer_property_clip_tabs>` | ``true`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`current_tab<class_TabContainer_property_current_tab>` | ``0`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>` | ``false`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabContainer_property_tab_alignment>` | ``0`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabContainer_property_tabs_rearrange_group>` | ``-1`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`tabs_visible<class_TabContainer_property_tabs_visible>` | ``true`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool<class_bool>` | :ref:`use_hidden_tabs_for_min_size<class_TabContainer_property_use_hidden_tabs_for_min_size>` | ``false`` | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`all_tabs_in_front<class_TabContainer_property_all_tabs_in_front>` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`clip_tabs<class_TabContainer_property_clip_tabs>` | ``true`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`current_tab<class_TabContainer_property_current_tab>` | ``-1`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`deselect_enabled<class_TabContainer_property_deselect_enabled>` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` | :ref:`tab_alignment<class_TabContainer_property_tab_alignment>` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`FocusMode<enum_Control_FocusMode>` | :ref:`tab_focus_mode<class_TabContainer_property_tab_focus_mode>` | ``2`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`TabPosition<enum_TabContainer_TabPosition>` | :ref:`tabs_position<class_TabContainer_property_tabs_position>` | ``0`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`tabs_rearrange_group<class_TabContainer_property_tabs_rearrange_group>` | ``-1`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`tabs_visible<class_TabContainer_property_tabs_visible>` | ``true`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool<class_bool>` | :ref:`use_hidden_tabs_for_min_size<class_TabContainer_property_use_hidden_tabs_for_min_size>` | ``false`` | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -64,47 +70,61 @@ Methods .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`get_current_tab_control<class_TabContainer_method_get_current_tab_control>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Popup<class_Popup>` | :ref:`get_popup<class_TabContainer_method_get_popup>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_method_get_previous_tab>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabContainer_method_get_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`get_tab_control<class_TabContainer_method_get_tab_control>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_method_get_tab_count>` **(** **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabContainer_method_get_tab_icon>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabContainer_method_get_tab_idx_at_point>` **(** :ref:`Vector2<class_Vector2>` point **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_idx_from_control<class_TabContainer_method_get_tab_idx_from_control>` **(** :ref:`Control<class_Control>` control **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabContainer_method_get_tab_title>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabContainer_method_is_tab_disabled>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabContainer_method_is_tab_hidden>` **(** :ref:`int<class_int>` tab_idx **)** |const| | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_popup<class_TabContainer_method_set_popup>` **(** :ref:`Node<class_Node>` popup **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_button_icon<class_TabContainer_method_set_tab_button_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_disabled<class_TabContainer_method_set_tab_disabled>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_hidden<class_TabContainer_method_set_tab_hidden>` **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_icon<class_TabContainer_method_set_tab_icon>` **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>` **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_title<class_TabContainer_method_set_tab_title>` **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)** | - +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`get_current_tab_control<class_TabContainer_method_get_current_tab_control>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Popup<class_Popup>` | :ref:`get_popup<class_TabContainer_method_get_popup>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_previous_tab<class_TabContainer_method_get_previous_tab>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TabBar<class_TabBar>` | :ref:`get_tab_bar<class_TabContainer_method_get_tab_bar>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_button_icon<class_TabContainer_method_get_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`get_tab_control<class_TabContainer_method_get_tab_control>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_count<class_TabContainer_method_get_tab_count>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_tab_icon<class_TabContainer_method_get_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_icon_max_width<class_TabContainer_method_get_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_idx_at_point<class_TabContainer_method_get_tab_idx_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_idx_from_control<class_TabContainer_method_get_tab_idx_from_control>`\ (\ control\: :ref:`Control<class_Control>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tab_title<class_TabContainer_method_get_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tab_tooltip<class_TabContainer_method_get_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_tab_disabled<class_TabContainer_method_is_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_tab_hidden<class_TabContainer_method_is_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`select_next_available<class_TabContainer_method_select_next_available>`\ (\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`select_previous_available<class_TabContainer_method_select_previous_available>`\ (\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_popup<class_TabContainer_method_set_popup>`\ (\ popup\: :ref:`Node<class_Node>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_button_icon<class_TabContainer_method_set_tab_button_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_disabled<class_TabContainer_method_set_tab_disabled>`\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_hidden<class_TabContainer_method_set_tab_hidden>`\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_icon<class_TabContainer_method_set_tab_icon>`\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_icon_max_width<class_TabContainer_method_set_tab_icon_max_width>`\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_tooltip<class_TabContainer_method_set_tab_tooltip>`\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -121,7 +141,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_hovered_color<class_TabContainer_theme_color_font_hovered_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabContainer_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TabContainer_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_TabContainer_theme_color_font_selected_color>` | ``Color(0.95, 0.95, 0.95, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ @@ -157,6 +177,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_disabled<class_TabContainer_theme_style_tab_disabled>` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_hovered<class_TabContainer_theme_style_tab_hovered>` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox<class_StyleBox>` | :ref:`tab_selected<class_TabContainer_theme_style_tab_selected>` | | @@ -179,7 +201,7 @@ Signals .. rst-class:: classref-signal -**active_tab_rearranged** **(** :ref:`int<class_int>` idx_to **)** +**active_tab_rearranged**\ (\ idx_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_active_tab_rearranged>` Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`. @@ -191,7 +213,7 @@ Emitted when the active tab is rearranged via mouse drag. See :ref:`drag_to_rear .. rst-class:: classref-signal -**pre_popup_pressed** **(** **)** +**pre_popup_pressed**\ (\ ) :ref:`🔗<class_TabContainer_signal_pre_popup_pressed>` Emitted when the **TabContainer**'s :ref:`Popup<class_Popup>` button is clicked. See :ref:`set_popup<class_TabContainer_method_set_popup>` for details. @@ -203,7 +225,7 @@ Emitted when the **TabContainer**'s :ref:`Popup<class_Popup>` button is clicked. .. rst-class:: classref-signal -**tab_button_pressed** **(** :ref:`int<class_int>` tab **)** +**tab_button_pressed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_button_pressed>` Emitted when the user clicks on the button icon on this tab. @@ -215,7 +237,7 @@ Emitted when the user clicks on the button icon on this tab. .. rst-class:: classref-signal -**tab_changed** **(** :ref:`int<class_int>` tab **)** +**tab_changed**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_changed>` Emitted when switching to another tab. @@ -227,7 +249,7 @@ Emitted when switching to another tab. .. rst-class:: classref-signal -**tab_clicked** **(** :ref:`int<class_int>` tab **)** +**tab_clicked**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_clicked>` Emitted when a tab is clicked, even if it is the current tab. @@ -239,7 +261,7 @@ Emitted when a tab is clicked, even if it is the current tab. .. rst-class:: classref-signal -**tab_hovered** **(** :ref:`int<class_int>` tab **)** +**tab_hovered**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_hovered>` Emitted when a tab is hovered by the mouse. @@ -251,9 +273,48 @@ Emitted when a tab is hovered by the mouse. .. rst-class:: classref-signal -**tab_selected** **(** :ref:`int<class_int>` tab **)** +**tab_selected**\ (\ tab\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_signal_tab_selected>` + +Emitted when a tab is selected via click, directional input, or script, even if it is the current tab. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_TabContainer_TabPosition: + +.. rst-class:: classref-enumeration + +enum **TabPosition**: :ref:`🔗<enum_TabContainer_TabPosition>` + +.. _class_TabContainer_constant_POSITION_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_TOP** = ``0`` + +Places the tab bar at the top. + +.. _class_TabContainer_constant_POSITION_BOTTOM: -Emitted when a tab is selected, even if it is the current tab. +.. rst-class:: classref-enumeration-constant + +:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_BOTTOM** = ``1`` + +Places the tab bar at the bottom. The tab bar's :ref:`StyleBox<class_StyleBox>` will be flipped vertically. + +.. _class_TabContainer_constant_POSITION_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TabPosition<enum_TabContainer_TabPosition>` **POSITION_MAX** = ``2`` + +Represents the size of the :ref:`TabPosition<enum_TabContainer_TabPosition>` enum. .. rst-class:: classref-section-separator @@ -268,12 +329,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **all_tabs_in_front** = ``false`` +:ref:`bool<class_bool>` **all_tabs_in_front** = ``false`` :ref:`🔗<class_TabContainer_property_all_tabs_in_front>` .. rst-class:: classref-property-setget -- void **set_all_tabs_in_front** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_all_tabs_in_front** **(** **)** +- |void| **set_all_tabs_in_front**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_all_tabs_in_front**\ (\ ) If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive tabs are drawn behind the panel. @@ -285,12 +346,12 @@ If ``true``, all tabs are drawn in front of the panel. If ``false``, inactive ta .. rst-class:: classref-property -:ref:`bool<class_bool>` **clip_tabs** = ``true`` +:ref:`bool<class_bool>` **clip_tabs** = ``true`` :ref:`🔗<class_TabContainer_property_clip_tabs>` .. rst-class:: classref-property-setget -- void **set_clip_tabs** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_clip_tabs** **(** **)** +- |void| **set_clip_tabs**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_clip_tabs**\ (\ ) If ``true``, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible. @@ -302,15 +363,36 @@ If ``true``, tabs overflowing this node's width will be hidden, displaying two n .. rst-class:: classref-property -:ref:`int<class_int>` **current_tab** = ``0`` +:ref:`int<class_int>` **current_tab** = ``-1`` :ref:`🔗<class_TabContainer_property_current_tab>` .. rst-class:: classref-property-setget -- void **set_current_tab** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_current_tab** **(** **)** +- |void| **set_current_tab**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_current_tab**\ (\ ) The current tab index. When set, this index's :ref:`Control<class_Control>` node's ``visible`` property is set to ``true`` and all others are set to ``false``. +A value of ``-1`` means that no tab is selected. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_property_deselect_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **deselect_enabled** = ``false`` :ref:`🔗<class_TabContainer_property_deselect_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_deselect_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_deselect_enabled**\ (\ ) + +If ``true``, all tabs can be deselected so that no tab is selected. Click on the :ref:`current_tab<class_TabContainer_property_current_tab>` to deselect it. + +Only the tab header will be shown if no tabs are selected. + .. rst-class:: classref-item-separator ---- @@ -319,12 +401,12 @@ The current tab index. When set, this index's :ref:`Control<class_Control>` node .. rst-class:: classref-property -:ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` +:ref:`bool<class_bool>` **drag_to_rearrange_enabled** = ``false`` :ref:`🔗<class_TabContainer_property_drag_to_rearrange_enabled>` .. rst-class:: classref-property-setget -- void **set_drag_to_rearrange_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled** **(** **)** +- |void| **set_drag_to_rearrange_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_drag_to_rearrange_enabled**\ (\ ) If ``true``, tabs can be rearranged with mouse drag. @@ -336,12 +418,12 @@ If ``true``, tabs can be rearranged with mouse drag. .. rst-class:: classref-property -:ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` +:ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **tab_alignment** = ``0`` :ref:`🔗<class_TabContainer_property_tab_alignment>` .. rst-class:: classref-property-setget -- void **set_tab_alignment** **(** :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` value **)** -- :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment** **(** **)** +- |void| **set_tab_alignment**\ (\ value\: :ref:`AlignmentMode<enum_TabBar_AlignmentMode>`\ ) +- :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` **get_tab_alignment**\ (\ ) Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_TabBar_AlignmentMode>` for details. @@ -349,16 +431,50 @@ Sets the position at which tabs will be placed. See :ref:`AlignmentMode<enum_Tab ---- +.. _class_TabContainer_property_tab_focus_mode: + +.. rst-class:: classref-property + +:ref:`FocusMode<enum_Control_FocusMode>` **tab_focus_mode** = ``2`` :ref:`🔗<class_TabContainer_property_tab_focus_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_tab_focus_mode**\ (\ value\: :ref:`FocusMode<enum_Control_FocusMode>`\ ) +- :ref:`FocusMode<enum_Control_FocusMode>` **get_tab_focus_mode**\ (\ ) + +The focus access mode for the internal :ref:`TabBar<class_TabBar>` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_property_tabs_position: + +.. rst-class:: classref-property + +:ref:`TabPosition<enum_TabContainer_TabPosition>` **tabs_position** = ``0`` :ref:`🔗<class_TabContainer_property_tabs_position>` + +.. rst-class:: classref-property-setget + +- |void| **set_tabs_position**\ (\ value\: :ref:`TabPosition<enum_TabContainer_TabPosition>`\ ) +- :ref:`TabPosition<enum_TabContainer_TabPosition>` **get_tabs_position**\ (\ ) + +Sets the position of the tab bar. See :ref:`TabPosition<enum_TabContainer_TabPosition>` for details. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_property_tabs_rearrange_group: .. rst-class:: classref-property -:ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` +:ref:`int<class_int>` **tabs_rearrange_group** = ``-1`` :ref:`🔗<class_TabContainer_property_tabs_rearrange_group>` .. rst-class:: classref-property-setget -- void **set_tabs_rearrange_group** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_tabs_rearrange_group** **(** **)** +- |void| **set_tabs_rearrange_group**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_tabs_rearrange_group**\ (\ ) **TabContainer**\ s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`. @@ -372,12 +488,12 @@ Setting this to ``-1`` will disable rearranging between **TabContainer**\ s. .. rst-class:: classref-property -:ref:`bool<class_bool>` **tabs_visible** = ``true`` +:ref:`bool<class_bool>` **tabs_visible** = ``true`` :ref:`🔗<class_TabContainer_property_tabs_visible>` .. rst-class:: classref-property-setget -- void **set_tabs_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **are_tabs_visible** **(** **)** +- |void| **set_tabs_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **are_tabs_visible**\ (\ ) If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden. @@ -389,14 +505,14 @@ If ``true``, tabs are visible. If ``false``, tabs' content and titles are hidden .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false`` +:ref:`bool<class_bool>` **use_hidden_tabs_for_min_size** = ``false`` :ref:`🔗<class_TabContainer_property_use_hidden_tabs_for_min_size>` .. rst-class:: classref-property-setget -- void **set_use_hidden_tabs_for_min_size** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size** **(** **)** +- |void| **set_use_hidden_tabs_for_min_size**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_hidden_tabs_for_min_size**\ (\ ) -If ``true``, children :ref:`Control<class_Control>` nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one. +If ``true``, child :ref:`Control<class_Control>` nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one. .. rst-class:: classref-section-separator @@ -411,7 +527,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Control<class_Control>` **get_current_tab_control** **(** **)** |const| +:ref:`Control<class_Control>` **get_current_tab_control**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_current_tab_control>` Returns the child :ref:`Control<class_Control>` node located at the active tab index. @@ -423,7 +539,7 @@ Returns the child :ref:`Control<class_Control>` node located at the active tab i .. rst-class:: classref-method -:ref:`Popup<class_Popup>` **get_popup** **(** **)** |const| +:ref:`Popup<class_Popup>` **get_popup**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_popup>` Returns the :ref:`Popup<class_Popup>` node instance if one has been set already with :ref:`set_popup<class_TabContainer_method_set_popup>`. @@ -437,7 +553,7 @@ Returns the :ref:`Popup<class_Popup>` node instance if one has been set already .. rst-class:: classref-method -:ref:`int<class_int>` **get_previous_tab** **(** **)** |const| +:ref:`int<class_int>` **get_previous_tab**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_previous_tab>` Returns the previously active tab index. @@ -445,11 +561,25 @@ Returns the previously active tab index. ---- +.. _class_TabContainer_method_get_tab_bar: + +.. rst-class:: classref-method + +:ref:`TabBar<class_TabBar>` **get_tab_bar**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_bar>` + +Returns the :ref:`TabBar<class_TabBar>` contained in this container. + +\ **Warning:** This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in **TabContainer**. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_get_tab_button_icon: .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_tab_button_icon** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_button_icon>` Returns the button icon from the tab at index ``tab_idx``. @@ -461,7 +591,7 @@ Returns the button icon from the tab at index ``tab_idx``. .. rst-class:: classref-method -:ref:`Control<class_Control>` **get_tab_control** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Control<class_Control>` **get_tab_control**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_control>` Returns the :ref:`Control<class_Control>` node from the tab at index ``tab_idx``. @@ -473,7 +603,7 @@ Returns the :ref:`Control<class_Control>` node from the tab at index ``tab_idx`` .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_count** **(** **)** |const| +:ref:`int<class_int>` **get_tab_count**\ (\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_count>` Returns the number of tabs. @@ -485,7 +615,7 @@ Returns the number of tabs. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_tab_icon** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_icon>` Returns the :ref:`Texture2D<class_Texture2D>` for the tab at index ``tab_idx`` or ``null`` if the tab has no :ref:`Texture2D<class_Texture2D>`. @@ -493,11 +623,23 @@ Returns the :ref:`Texture2D<class_Texture2D>` for the tab at index ``tab_idx`` o ---- +.. _class_TabContainer_method_get_tab_icon_max_width: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_icon_max_width>` + +Returns the maximum allowed width of the icon for the tab at index ``tab_idx``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_get_tab_idx_at_point: .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_idx_at_point** **(** :ref:`Vector2<class_Vector2>` point **)** |const| +:ref:`int<class_int>` **get_tab_idx_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_idx_at_point>` Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if the point is outside the control boundaries or if there's no tab at the queried position. @@ -509,7 +651,7 @@ Returns the index of the tab at local coordinates ``point``. Returns ``-1`` if t .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_idx_from_control** **(** :ref:`Control<class_Control>` control **)** |const| +:ref:`int<class_int>` **get_tab_idx_from_control**\ (\ control\: :ref:`Control<class_Control>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_idx_from_control>` Returns the index of the tab tied to the given ``control``. The control must be a child of the **TabContainer**. @@ -521,7 +663,7 @@ Returns the index of the tab tied to the given ``control``. The control must be .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_tab_metadata** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`Variant<class_Variant>` **get_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_metadata>` Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_tab_metadata<class_TabContainer_method_set_tab_metadata>`. If no metadata was previously set, returns ``null`` by default. @@ -533,7 +675,7 @@ Returns the metadata value set to the tab at index ``tab_idx`` using :ref:`set_t .. rst-class:: classref-method -:ref:`String<class_String>` **get_tab_title** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`String<class_String>` **get_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_title>` Returns the title of the tab at index ``tab_idx``. Tab titles default to the name of the indexed child node, but this can be overridden with :ref:`set_tab_title<class_TabContainer_method_set_tab_title>`. @@ -541,11 +683,23 @@ Returns the title of the tab at index ``tab_idx``. Tab titles default to the nam ---- +.. _class_TabContainer_method_get_tab_tooltip: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_get_tab_tooltip>` + +Returns the tooltip text of the tab at index ``tab_idx``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_is_tab_disabled: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_tab_disabled** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`bool<class_bool>` **is_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_is_tab_disabled>` Returns ``true`` if the tab at index ``tab_idx`` is disabled. @@ -557,7 +711,7 @@ Returns ``true`` if the tab at index ``tab_idx`` is disabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_tab_hidden** **(** :ref:`int<class_int>` tab_idx **)** |const| +:ref:`bool<class_bool>` **is_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TabContainer_method_is_tab_hidden>` Returns ``true`` if the tab at index ``tab_idx`` is hidden. @@ -565,11 +719,35 @@ Returns ``true`` if the tab at index ``tab_idx`` is hidden. ---- +.. _class_TabContainer_method_select_next_available: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **select_next_available**\ (\ ) :ref:`🔗<class_TabContainer_method_select_next_available>` + +Selects the first available tab with greater index than the currently selected. Returns ``true`` if tab selection changed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_method_select_previous_available: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **select_previous_available**\ (\ ) :ref:`🔗<class_TabContainer_method_select_previous_available>` + +Selects the first available tab with lower index than the currently selected. Returns ``true`` if tab selection changed. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_set_popup: .. rst-class:: classref-method -void **set_popup** **(** :ref:`Node<class_Node>` popup **)** +|void| **set_popup**\ (\ popup\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_TabContainer_method_set_popup>` If set on a :ref:`Popup<class_Popup>` node instance, a popup menu icon appears in the top-right corner of the **TabContainer** (setting it to ``null`` will make it go away). Clicking it will expand the :ref:`Popup<class_Popup>` node. @@ -581,7 +759,7 @@ If set on a :ref:`Popup<class_Popup>` node instance, a popup menu icon appears i .. rst-class:: classref-method -void **set_tab_button_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_tab_button_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_button_icon>` Sets the button icon from the tab at index ``tab_idx``. @@ -593,7 +771,7 @@ Sets the button icon from the tab at index ``tab_idx``. .. rst-class:: classref-method -void **set_tab_disabled** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` disabled **)** +|void| **set_tab_disabled**\ (\ tab_idx\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_disabled>` If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it non-interactable. @@ -605,7 +783,7 @@ If ``disabled`` is ``true``, disables the tab at index ``tab_idx``, making it no .. rst-class:: classref-method -void **set_tab_hidden** **(** :ref:`int<class_int>` tab_idx, :ref:`bool<class_bool>` hidden **)** +|void| **set_tab_hidden**\ (\ tab_idx\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_hidden>` If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappear from the tab area. @@ -617,7 +795,7 @@ If ``hidden`` is ``true``, hides the tab at index ``tab_idx``, making it disappe .. rst-class:: classref-method -void **set_tab_icon** **(** :ref:`int<class_int>` tab_idx, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_tab_icon**\ (\ tab_idx\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_icon>` Sets an icon for the tab at index ``tab_idx``. @@ -625,11 +803,23 @@ Sets an icon for the tab at index ``tab_idx``. ---- +.. _class_TabContainer_method_set_tab_icon_max_width: + +.. rst-class:: classref-method + +|void| **set_tab_icon_max_width**\ (\ tab_idx\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_icon_max_width>` + +Sets the maximum allowed width of the icon for the tab at index ``tab_idx``. This limit is applied on top of the default size of the icon and on top of :ref:`icon_max_width<class_TabContainer_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_set_tab_metadata: .. rst-class:: classref-method -void **set_tab_metadata** **(** :ref:`int<class_int>` tab_idx, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_tab_metadata**\ (\ tab_idx\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_metadata>` Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved later using :ref:`get_tab_metadata<class_TabContainer_method_get_tab_metadata>`. @@ -641,10 +831,24 @@ Sets the metadata value for the tab at index ``tab_idx``, which can be retrieved .. rst-class:: classref-method -void **set_tab_title** **(** :ref:`int<class_int>` tab_idx, :ref:`String<class_String>` title **)** +|void| **set_tab_title**\ (\ tab_idx\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_title>` Sets a custom title for the tab at index ``tab_idx`` (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again. +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_method_set_tab_tooltip: + +.. rst-class:: classref-method + +|void| **set_tab_tooltip**\ (\ tab_idx\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TabContainer_method_set_tab_tooltip>` + +Sets a custom tooltip text for tab at index ``tab_idx``. + +\ **Note:** By default, if the ``tooltip`` is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign ``" "`` as the ``tooltip`` text. + .. rst-class:: classref-section-separator ---- @@ -658,7 +862,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **drop_mark_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TabContainer_theme_color_drop_mark_color>` Modulation color for the :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark>` icon. @@ -670,7 +874,7 @@ Modulation color for the :ref:`drop_mark<class_TabContainer_theme_icon_drop_mark .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_TabContainer_theme_color_font_disabled_color>` Font color of disabled tabs. @@ -682,7 +886,7 @@ Font color of disabled tabs. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_hovered_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_hovered_color>` Font color of the currently hovered tab. @@ -694,7 +898,7 @@ Font color of the currently hovered tab. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_outline_color>` The tint of text outline of the tab name. @@ -706,7 +910,7 @@ The tint of text outline of the tab name. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_selected_color>` Font color of the currently selected tab. @@ -718,7 +922,7 @@ Font color of the currently selected tab. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` +:ref:`Color<class_Color>` **font_unselected_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_TabContainer_theme_color_font_unselected_color>` Font color of the other, unselected tabs. @@ -730,7 +934,7 @@ Font color of the other, unselected tabs. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_max_width** = ``0`` +:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_TabContainer_theme_constant_icon_max_width>` The maximum allowed width of the tab's icon. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TabBar.set_tab_icon_max_width<class_TabBar_method_set_tab_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -742,7 +946,7 @@ The maximum allowed width of the tab's icon. This limit is applied on top of the .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_separation** = ``4`` +:ref:`int<class_int>` **icon_separation** = ``4`` :ref:`🔗<class_TabContainer_theme_constant_icon_separation>` Space between tab's name and its icon. @@ -754,7 +958,7 @@ Space between tab's name and its icon. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_TabContainer_theme_constant_outline_size>` The size of the tab text outline. @@ -768,7 +972,7 @@ The size of the tab text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **side_margin** = ``8`` +:ref:`int<class_int>` **side_margin** = ``8`` :ref:`🔗<class_TabContainer_theme_constant_side_margin>` The space at the left or right edges of the tab bar, accordingly with the current :ref:`tab_alignment<class_TabContainer_property_tab_alignment>`. @@ -782,7 +986,7 @@ The margin is ignored with :ref:`TabBar.ALIGNMENT_RIGHT<class_TabBar_constant_AL .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_TabContainer_theme_font_font>` The font used to draw tab names. @@ -794,7 +998,7 @@ The font used to draw tab names. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_TabContainer_theme_font_size_font_size>` Font size of the tab names. @@ -806,7 +1010,7 @@ Font size of the tab names. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **decrement** +:ref:`Texture2D<class_Texture2D>` **decrement** :ref:`🔗<class_TabContainer_theme_icon_decrement>` Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. @@ -818,7 +1022,7 @@ Icon for the left arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **decrement_highlight** +:ref:`Texture2D<class_Texture2D>` **decrement_highlight** :ref:`🔗<class_TabContainer_theme_icon_decrement_highlight>` Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. @@ -830,7 +1034,7 @@ Icon for the left arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **drop_mark** +:ref:`Texture2D<class_Texture2D>` **drop_mark** :ref:`🔗<class_TabContainer_theme_icon_drop_mark>` Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_to_rearrange_enabled<class_TabContainer_property_drag_to_rearrange_enabled>`). @@ -842,7 +1046,7 @@ Icon shown to indicate where a dragged tab is gonna be dropped (see :ref:`drag_t .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **increment** +:ref:`Texture2D<class_Texture2D>` **increment** :ref:`🔗<class_TabContainer_theme_icon_increment>` Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. @@ -854,7 +1058,7 @@ Icon for the right arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **increment_highlight** +:ref:`Texture2D<class_Texture2D>` **increment_highlight** :ref:`🔗<class_TabContainer_theme_icon_increment_highlight>` Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. @@ -866,7 +1070,7 @@ Icon for the right arrow button that appears when there are too many tabs to fit .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **menu** +:ref:`Texture2D<class_Texture2D>` **menu** :ref:`🔗<class_TabContainer_theme_icon_menu>` The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`). @@ -878,7 +1082,7 @@ The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_ .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **menu_highlight** +:ref:`Texture2D<class_Texture2D>` **menu_highlight** :ref:`🔗<class_TabContainer_theme_icon_menu_highlight>` The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_popup>`) when it's being hovered with the cursor. @@ -890,7 +1094,7 @@ The icon for the menu button (see :ref:`set_popup<class_TabContainer_method_set_ .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_TabContainer_theme_style_panel>` The style for the background fill. @@ -902,7 +1106,7 @@ The style for the background fill. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_disabled** +:ref:`StyleBox<class_StyleBox>` **tab_disabled** :ref:`🔗<class_TabContainer_theme_style_tab_disabled>` The style of disabled tabs. @@ -910,14 +1114,28 @@ The style of disabled tabs. ---- +.. _class_TabContainer_theme_style_tab_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox<class_StyleBox>` **tab_focus** :ref:`🔗<class_TabContainer_theme_style_tab_focus>` + +:ref:`StyleBox<class_StyleBox>` used when the :ref:`TabBar<class_TabBar>` is focused. The :ref:`tab_focus<class_TabContainer_theme_style_tab_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>` of the selected tab, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_theme_style_tab_hovered: .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_hovered** +:ref:`StyleBox<class_StyleBox>` **tab_hovered** :ref:`🔗<class_TabContainer_theme_style_tab_hovered>` The style of the currently hovered tab. +\ **Note:** This style will be drawn with the same width as :ref:`tab_unselected<class_TabContainer_theme_style_tab_unselected>` at minimum. + .. rst-class:: classref-item-separator ---- @@ -926,7 +1144,7 @@ The style of the currently hovered tab. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_selected** +:ref:`StyleBox<class_StyleBox>` **tab_selected** :ref:`🔗<class_TabContainer_theme_style_tab_selected>` The style of the currently selected tab. @@ -938,7 +1156,7 @@ The style of the currently selected tab. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tab_unselected** +:ref:`StyleBox<class_StyleBox>` **tab_unselected** :ref:`🔗<class_TabContainer_theme_style_tab_unselected>` The style of the other, unselected tabs. @@ -950,7 +1168,7 @@ The style of the other, unselected tabs. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **tabbar_background** +:ref:`StyleBox<class_StyleBox>` **tabbar_background** :ref:`🔗<class_TabContainer_theme_style_tabbar_background>` The style for the background fill of the :ref:`TabBar<class_TabBar>` area. @@ -961,3 +1179,4 @@ The style for the background fill of the :ref:`TabBar<class_TabBar>` area. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tcpserver.rst b/classes/class_tcpserver.rst index 7f52bfe32a6..01e36c502e8 100644 --- a/classes/class_tcpserver.rst +++ b/classes/class_tcpserver.rst @@ -31,19 +31,19 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_local_port<class_TCPServer_method_get_local_port>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_connection_available<class_TCPServer_method_is_connection_available>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_listening<class_TCPServer_method_is_listening>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`listen<class_TCPServer_method_listen>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_TCPServer_method_stop>` **(** **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StreamPeerTCP<class_StreamPeerTCP>` | :ref:`take_connection<class_TCPServer_method_take_connection>` **(** **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_local_port<class_TCPServer_method_get_local_port>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_connection_available<class_TCPServer_method_is_connection_available>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_listening<class_TCPServer_method_is_listening>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`listen<class_TCPServer_method_listen>`\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*"\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_TCPServer_method_stop>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StreamPeerTCP<class_StreamPeerTCP>` | :ref:`take_connection<class_TCPServer_method_take_connection>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -58,7 +58,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_local_port** **(** **)** |const| +:ref:`int<class_int>` **get_local_port**\ (\ ) |const| :ref:`🔗<class_TCPServer_method_get_local_port>` Returns the local port this server is listening to. @@ -70,7 +70,7 @@ Returns the local port this server is listening to. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_connection_available** **(** **)** |const| +:ref:`bool<class_bool>` **is_connection_available**\ (\ ) |const| :ref:`🔗<class_TCPServer_method_is_connection_available>` Returns ``true`` if a connection is available for taking. @@ -82,7 +82,7 @@ Returns ``true`` if a connection is available for taking. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_listening** **(** **)** |const| +:ref:`bool<class_bool>` **is_listening**\ (\ ) |const| :ref:`🔗<class_TCPServer_method_is_listening>` Returns ``true`` if the server is currently listening for connections. @@ -94,7 +94,7 @@ Returns ``true`` if the server is currently listening for connections. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **listen** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)** +:ref:`Error<enum_@GlobalScope_Error>` **listen**\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*"\ ) :ref:`🔗<class_TCPServer_method_listen>` Listen on the ``port`` binding to ``bind_address``. @@ -102,7 +102,7 @@ If ``bind_address`` is set as ``"*"`` (default), the server will listen on all a If ``bind_address`` is set as ``"0.0.0.0"`` (for IPv4) or ``"::"`` (for IPv6), the server will listen on all available addresses matching that IP type. -If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). +If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``"::1"``, etc.), the server will only listen on the interface with that address (or fail if no interface with the given address exists). .. rst-class:: classref-item-separator @@ -112,7 +112,7 @@ If ``bind_address`` is set to any valid address (e.g. ``"192.168.1.101"``, ``":: .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_TCPServer_method_stop>` Stops listening. @@ -124,7 +124,7 @@ Stops listening. .. rst-class:: classref-method -:ref:`StreamPeerTCP<class_StreamPeerTCP>` **take_connection** **(** **)** +:ref:`StreamPeerTCP<class_StreamPeerTCP>` **take_connection**\ (\ ) :ref:`🔗<class_TCPServer_method_take_connection>` If a connection is available, returns a StreamPeerTCP with the connection. @@ -135,3 +135,4 @@ If a connection is available, returns a StreamPeerTCP with the connection. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 20f3b9b670b..f71171de46c 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: textarea + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -23,7 +26,7 @@ Description A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see :ref:`CodeEdit<class_CodeEdit>`. -\ **Note:** Most viewport, caret and edit methods contain a ``caret_index`` argument for :ref:`caret_multiple<class_TextEdit_property_caret_multiple>` support. The argument should be one of the following: ``-1`` for all carets, ``0`` for the main caret, or greater than ``0`` for secondary carets. +\ **Note:** Most viewport, caret, and edit methods contain a ``caret_index`` argument for :ref:`caret_multiple<class_TextEdit_property_caret_multiple>` support. The argument should be one of the following: ``-1`` for all carets, ``0`` for the main caret, or greater than ``0`` for secondary carets in the order they were created. \ **Note:** When holding down :kbd:`Alt`, the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor. @@ -44,7 +47,7 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`caret_draw_when_editable_disabled<class_TextEdit_property_caret_draw_when_editable_disabled>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_TextEdit_property_caret_mid_grapheme>` | ``true`` | + | :ref:`bool<class_bool>` | :ref:`caret_mid_grapheme<class_TextEdit_property_caret_mid_grapheme>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`caret_move_on_right_click<class_TextEdit_property_caret_move_on_right_click>` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ @@ -52,8 +55,12 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`CaretType<enum_TextEdit_CaretType>` | :ref:`caret_type<class_TextEdit_property_caret_type>` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`context_menu_enabled<class_TextEdit_property_context_menu_enabled>` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`custom_word_separators<class_TextEdit_property_custom_word_separators>` | ``""`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`deselect_on_focus_loss_enabled<class_TextEdit_property_deselect_on_focus_loss_enabled>` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`drag_and_drop_selection_enabled<class_TextEdit_property_drag_and_drop_selection_enabled>` | ``true`` | @@ -72,6 +79,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`highlight_current_line<class_TextEdit_property_highlight_current_line>` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`indent_wrapped_lines<class_TextEdit_property_indent_wrapped_lines>` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`language<class_TextEdit_property_language>` | ``""`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`middle_mouse_paste_enabled<class_TextEdit_property_middle_mouse_paste_enabled>` | ``true`` | @@ -110,6 +119,10 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_TextEdit_property_text_direction>` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_custom_word_separators<class_TextEdit_property_use_custom_word_separators>` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`use_default_word_separators<class_TextEdit_property_use_default_word_separators>` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`bool<class_bool>` | :ref:`virtual_keyboard_enabled<class_TextEdit_property_virtual_keyboard_enabled>` | ``true`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+ | :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` | :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` | ``0`` | @@ -123,285 +136,321 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_backspace<class_TextEdit_method__backspace>` **(** :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_copy<class_TextEdit_method__copy>` **(** :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cut<class_TextEdit_method__cut>` **(** :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_handle_unicode_input<class_TextEdit_method__handle_unicode_input>` **(** :ref:`int<class_int>` unicode_char, :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_paste<class_TextEdit_method__paste>` **(** :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_paste_primary_clipboard<class_TextEdit_method__paste_primary_clipboard>` **(** :ref:`int<class_int>` caret_index **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_caret<class_TextEdit_method_add_caret>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` col **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_caret_at_carets<class_TextEdit_method_add_caret_at_carets>` **(** :ref:`bool<class_bool>` below **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_gutter<class_TextEdit_method_add_gutter>` **(** :ref:`int<class_int>` at=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_selection_for_next_occurrence<class_TextEdit_method_add_selection_for_next_occurrence>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`adjust_carets_after_edit<class_TextEdit_method_adjust_carets_after_edit>` **(** :ref:`int<class_int>` caret, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_col, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_col **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`adjust_viewport_to_caret<class_TextEdit_method_adjust_viewport_to_caret>` **(** :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`backspace<class_TextEdit_method_backspace>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`center_viewport_to_caret<class_TextEdit_method_center_viewport_to_caret>` **(** :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_TextEdit_method_clear>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_undo_history<class_TextEdit_method_clear_undo_history>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`copy<class_TextEdit_method_copy>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cut<class_TextEdit_method_cut>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`delete_selection<class_TextEdit_method_delete_selection>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect<class_TextEdit_method_deselect>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_action<class_TextEdit_method_end_action>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_caret_column<class_TextEdit_method_get_caret_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_caret_count<class_TextEdit_method_get_caret_count>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_caret_draw_pos<class_TextEdit_method_get_caret_draw_pos>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_caret_index_edit_order<class_TextEdit_method_get_caret_index_edit_order>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_caret_line<class_TextEdit_method_get_caret_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_caret_wrap_index<class_TextEdit_method_get_caret_wrap_index>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_first_non_whitespace_column<class_TextEdit_method_get_first_non_whitespace_column>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_first_visible_line<class_TextEdit_method_get_first_visible_line>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_gutter_count<class_TextEdit_method_get_gutter_count>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_gutter_name<class_TextEdit_method_get_gutter_name>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GutterType<enum_TextEdit_GutterType>` | :ref:`get_gutter_type<class_TextEdit_method_get_gutter_type>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_gutter_width<class_TextEdit_method_get_gutter_width>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_TextEdit_method_get_h_scroll_bar>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_indent_level<class_TextEdit_method_get_indent_level>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_last_full_visible_line<class_TextEdit_method_get_last_full_visible_line>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_last_unhidden_line<class_TextEdit_method_get_last_unhidden_line>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_line<class_TextEdit_method_get_line>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_line_background_color<class_TextEdit_method_get_line_background_color>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_column_at_pos<class_TextEdit_method_get_line_column_at_pos>` **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<class_bool>` allow_out_of_bounds=true **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_method_get_line_count>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_line_gutter_icon<class_TextEdit_method_get_line_gutter_icon>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_line_gutter_item_color<class_TextEdit_method_get_line_gutter_item_color>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_line_gutter_metadata<class_TextEdit_method_get_line_gutter_metadata>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_line_gutter_text<class_TextEdit_method_get_line_gutter_text>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_height<class_TextEdit_method_get_line_height>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_width<class_TextEdit_method_get_line_width>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_wrap_count<class_TextEdit_method_get_line_wrap_count>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_wrap_index_at_column<class_TextEdit_method_get_line_wrap_index_at_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_line_wrapped_text<class_TextEdit_method_get_line_wrapped_text>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_local_mouse_pos<class_TextEdit_method_get_local_mouse_pos>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_TextEdit_method_get_menu>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_minimap_line_at_pos<class_TextEdit_method_get_minimap_line_at_pos>` **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_minimap_visible_lines<class_TextEdit_method_get_minimap_visible_lines>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_next_visible_line_index_offset_from<class_TextEdit_method_get_next_visible_line_index_offset_from>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index, :ref:`int<class_int>` visible_amount **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_next_visible_line_offset_from>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` visible_amount **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_saved_version<class_TextEdit_method_get_saved_version>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_scroll_pos_for_line<class_TextEdit_method_get_scroll_pos_for_line>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_selected_text<class_TextEdit_method_get_selected_text>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_column<class_TextEdit_method_get_selection_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_method_get_selection_from_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_method_get_selection_from_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_line<class_TextEdit_method_get_selection_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SelectionMode<enum_TextEdit_SelectionMode>` | :ref:`get_selection_mode<class_TextEdit_method_get_selection_mode>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_method_get_selection_to_line>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tab_size<class_TextEdit_method_get_tab_size>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_total_gutter_width<class_TextEdit_method_get_total_gutter_width>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_total_visible_line_count<class_TextEdit_method_get_total_visible_line_count>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_TextEdit_method_get_v_scroll_bar>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_version<class_TextEdit_method_get_version>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_TextEdit_method_get_visible_line_count>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_visible_line_count_in_range<class_TextEdit_method_get_visible_line_count_in_range>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_word_at_pos<class_TextEdit_method_get_word_at_pos>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_word_under_caret<class_TextEdit_method_get_word_under_caret>` **(** :ref:`int<class_int>` caret_index=-1 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_ime_text<class_TextEdit_method_has_ime_text>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_redo<class_TextEdit_method_has_redo>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_selection<class_TextEdit_method_has_selection>` **(** :ref:`int<class_int>` caret_index=-1 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_undo<class_TextEdit_method_has_undo>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`insert_line_at<class_TextEdit_method_insert_line_at>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>` **(** :ref:`String<class_String>` text, :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_caret_visible<class_TextEdit_method_is_caret_visible>` **(** :ref:`int<class_int>` caret_index=0 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_dragging_cursor<class_TextEdit_method_is_dragging_cursor>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_gutter_clickable<class_TextEdit_method_is_gutter_clickable>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_gutter_drawn<class_TextEdit_method_is_gutter_drawn>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_gutter_overwritable<class_TextEdit_method_is_gutter_overwritable>` **(** :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_line_gutter_clickable<class_TextEdit_method_is_line_gutter_clickable>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_line_wrapped<class_TextEdit_method_is_line_wrapped>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_TextEdit_method_is_menu_visible>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_mouse_over_selection<class_TextEdit_method_is_mouse_over_selection>` **(** :ref:`bool<class_bool>` edges, :ref:`int<class_int>` caret_index=-1 **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_overtype_mode_enabled<class_TextEdit_method_is_overtype_mode_enabled>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option<class_TextEdit_method_menu_option>` **(** :ref:`int<class_int>` option **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`merge_gutters<class_TextEdit_method_merge_gutters>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`paste<class_TextEdit_method_paste>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`paste_primary_clipboard<class_TextEdit_method_paste_primary_clipboard>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`redo<class_TextEdit_method_redo>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_caret<class_TextEdit_method_remove_caret>` **(** :ref:`int<class_int>` caret **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_gutter<class_TextEdit_method_remove_gutter>` **(** :ref:`int<class_int>` gutter **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_secondary_carets<class_TextEdit_method_remove_secondary_carets>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_text<class_TextEdit_method_remove_text>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`search<class_TextEdit_method_search>` **(** :ref:`String<class_String>` text, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_colum **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select<class_TextEdit_method_select>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column, :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all<class_TextEdit_method_select_all>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_word_under_caret<class_TextEdit_method_select_word_under_caret>` **(** :ref:`int<class_int>` caret_index=-1 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_caret_column<class_TextEdit_method_set_caret_column>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_caret_line<class_TextEdit_method_set_caret_line>` **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`bool<class_bool>` can_be_hidden=true, :ref:`int<class_int>` wrap_index=0, :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_clickable<class_TextEdit_method_set_gutter_clickable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_custom_draw<class_TextEdit_method_set_gutter_custom_draw>` **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` draw_callback **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_draw<class_TextEdit_method_set_gutter_draw>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_name<class_TextEdit_method_set_gutter_name>` **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_overwritable<class_TextEdit_method_set_gutter_overwritable>` **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>` **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_gutter_width<class_TextEdit_method_set_gutter_width>` **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line<class_TextEdit_method_set_line>` **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_center_visible<class_TextEdit_method_set_line_as_center_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_first_visible<class_TextEdit_method_set_line_as_first_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_as_last_visible<class_TextEdit_method_set_line_as_last_visible>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_background_color<class_TextEdit_method_set_line_background_color>` **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_gutter_clickable<class_TextEdit_method_set_line_gutter_clickable>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_gutter_icon<class_TextEdit_method_set_line_gutter_icon>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Texture2D<class_Texture2D>` icon **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_gutter_item_color<class_TextEdit_method_set_line_gutter_item_color>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Color<class_Color>` color **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_gutter_metadata<class_TextEdit_method_set_line_gutter_metadata>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Variant<class_Variant>` metadata **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_line_gutter_text<class_TextEdit_method_set_line_gutter_text>` **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`String<class_String>` text **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_overtype_mode_enabled<class_TextEdit_method_set_overtype_mode_enabled>` **(** :ref:`bool<class_bool>` enabled **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_search_flags<class_TextEdit_method_set_search_flags>` **(** :ref:`int<class_int>` flags **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_search_text<class_TextEdit_method_set_search_text>` **(** :ref:`String<class_String>` search_text **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selection_mode<class_TextEdit_method_set_selection_mode>` **(** :ref:`SelectionMode<enum_TextEdit_SelectionMode>` mode, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=-1, :ref:`int<class_int>` caret_index=0 **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tab_size<class_TextEdit_method_set_tab_size>` **(** :ref:`int<class_int>` size **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tooltip_request_func<class_TextEdit_method_set_tooltip_request_func>` **(** :ref:`Callable<class_Callable>` callback **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start_action<class_TextEdit_method_start_action>` **(** :ref:`EditAction<enum_TextEdit_EditAction>` action **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`swap_lines<class_TextEdit_method_swap_lines>` **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`undo<class_TextEdit_method_undo>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_backspace<class_TextEdit_private_method__backspace>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_copy<class_TextEdit_private_method__copy>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_cut<class_TextEdit_private_method__cut>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_handle_unicode_input<class_TextEdit_private_method__handle_unicode_input>`\ (\ unicode_char\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_paste<class_TextEdit_private_method__paste>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_paste_primary_clipboard<class_TextEdit_private_method__paste_primary_clipboard>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_caret<class_TextEdit_method_add_caret>`\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_caret_at_carets<class_TextEdit_method_add_caret_at_carets>`\ (\ below\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_gutter<class_TextEdit_method_add_gutter>`\ (\ at\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_selection_for_next_occurrence<class_TextEdit_method_add_selection_for_next_occurrence>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`adjust_carets_after_edit<class_TextEdit_method_adjust_carets_after_edit>`\ (\ caret\: :ref:`int<class_int>`, from_line\: :ref:`int<class_int>`, from_col\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_col\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`adjust_viewport_to_caret<class_TextEdit_method_adjust_viewport_to_caret>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_ime<class_TextEdit_method_apply_ime>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`backspace<class_TextEdit_method_backspace>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cancel_ime<class_TextEdit_method_cancel_ime>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`center_viewport_to_caret<class_TextEdit_method_center_viewport_to_caret>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TextEdit_method_clear>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_undo_history<class_TextEdit_method_clear_undo_history>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`collapse_carets<class_TextEdit_method_collapse_carets>`\ (\ from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`, inclusive\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`copy<class_TextEdit_method_copy>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cut<class_TextEdit_method_cut>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_selection<class_TextEdit_method_delete_selection>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect<class_TextEdit_method_deselect>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_action<class_TextEdit_method_end_action>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_caret_column<class_TextEdit_method_get_caret_column>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_caret_count<class_TextEdit_method_get_caret_count>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_caret_draw_pos<class_TextEdit_method_get_caret_draw_pos>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_caret_index_edit_order<class_TextEdit_method_get_caret_index_edit_order>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_caret_line<class_TextEdit_method_get_caret_line>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_caret_wrap_index<class_TextEdit_method_get_caret_wrap_index>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_first_non_whitespace_column<class_TextEdit_method_get_first_non_whitespace_column>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_first_visible_line<class_TextEdit_method_get_first_visible_line>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_gutter_count<class_TextEdit_method_get_gutter_count>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_gutter_name<class_TextEdit_method_get_gutter_name>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GutterType<enum_TextEdit_GutterType>` | :ref:`get_gutter_type<class_TextEdit_method_get_gutter_type>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_gutter_width<class_TextEdit_method_get_gutter_width>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HScrollBar<class_HScrollBar>` | :ref:`get_h_scroll_bar<class_TextEdit_method_get_h_scroll_bar>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_indent_level<class_TextEdit_method_get_indent_level>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_last_full_visible_line<class_TextEdit_method_get_last_full_visible_line>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_last_unhidden_line<class_TextEdit_method_get_last_unhidden_line>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_line<class_TextEdit_method_get_line>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_line_background_color<class_TextEdit_method_get_line_background_color>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_column_at_pos<class_TextEdit_method_get_line_column_at_pos>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, allow_out_of_bounds\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_count<class_TextEdit_method_get_line_count>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_line_gutter_icon<class_TextEdit_method_get_line_gutter_icon>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_line_gutter_item_color<class_TextEdit_method_get_line_gutter_item_color>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_line_gutter_metadata<class_TextEdit_method_get_line_gutter_metadata>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_line_gutter_text<class_TextEdit_method_get_line_gutter_text>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_height<class_TextEdit_method_get_line_height>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_line_ranges_from_carets<class_TextEdit_method_get_line_ranges_from_carets>`\ (\ only_selections\: :ref:`bool<class_bool>` = false, merge_adjacent\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_width<class_TextEdit_method_get_line_width>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_wrap_count<class_TextEdit_method_get_line_wrap_count>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_wrap_index_at_column<class_TextEdit_method_get_line_wrap_index_at_column>`\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_line_wrapped_text<class_TextEdit_method_get_line_wrapped_text>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_local_mouse_pos<class_TextEdit_method_get_local_mouse_pos>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu<class_TextEdit_method_get_menu>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_minimap_line_at_pos<class_TextEdit_method_get_minimap_line_at_pos>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_minimap_visible_lines<class_TextEdit_method_get_minimap_visible_lines>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_next_visible_line_index_offset_from<class_TextEdit_method_get_next_visible_line_index_offset_from>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>`, visible_amount\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_next_visible_line_offset_from>`\ (\ line\: :ref:`int<class_int>`, visible_amount\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_pos_at_line_column<class_TextEdit_method_get_pos_at_line_column>`\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_rect_at_line_column<class_TextEdit_method_get_rect_at_line_column>`\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_saved_version<class_TextEdit_method_get_saved_version>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_scroll_pos_for_line<class_TextEdit_method_get_scroll_pos_for_line>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_selected_text<class_TextEdit_method_get_selected_text>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_at_line_column<class_TextEdit_method_get_selection_at_line_column>`\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`, include_edges\: :ref:`bool<class_bool>` = true, only_selections\: :ref:`bool<class_bool>` = true\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_column<class_TextEdit_method_get_selection_column>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_from_column<class_TextEdit_method_get_selection_from_column>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_from_line<class_TextEdit_method_get_selection_from_line>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_line<class_TextEdit_method_get_selection_line>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SelectionMode<enum_TextEdit_SelectionMode>` | :ref:`get_selection_mode<class_TextEdit_method_get_selection_mode>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_origin_column<class_TextEdit_method_get_selection_origin_column>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_origin_line<class_TextEdit_method_get_selection_origin_line>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selection_to_line<class_TextEdit_method_get_selection_to_line>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_sorted_carets<class_TextEdit_method_get_sorted_carets>`\ (\ include_ignored_carets\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tab_size<class_TextEdit_method_get_tab_size>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_total_gutter_width<class_TextEdit_method_get_total_gutter_width>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_total_visible_line_count<class_TextEdit_method_get_total_visible_line_count>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar<class_VScrollBar>` | :ref:`get_v_scroll_bar<class_TextEdit_method_get_v_scroll_bar>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_version<class_TextEdit_method_get_version>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_visible_line_count<class_TextEdit_method_get_visible_line_count>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_visible_line_count_in_range<class_TextEdit_method_get_visible_line_count_in_range>`\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_word_at_pos<class_TextEdit_method_get_word_at_pos>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_word_under_caret<class_TextEdit_method_get_word_under_caret>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_ime_text<class_TextEdit_method_has_ime_text>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_redo<class_TextEdit_method_has_redo>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_selection<class_TextEdit_method_has_selection>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_undo<class_TextEdit_method_has_undo>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_line_at<class_TextEdit_method_insert_line_at>`\ (\ line\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_text<class_TextEdit_method_insert_text>`\ (\ text\: :ref:`String<class_String>`, line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`, before_selection_begin\: :ref:`bool<class_bool>` = true, before_selection_end\: :ref:`bool<class_bool>` = false\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>`\ (\ text\: :ref:`String<class_String>`, caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_caret_after_selection_origin<class_TextEdit_method_is_caret_after_selection_origin>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_caret_visible<class_TextEdit_method_is_caret_visible>`\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_dragging_cursor<class_TextEdit_method_is_dragging_cursor>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_gutter_clickable<class_TextEdit_method_is_gutter_clickable>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_gutter_drawn<class_TextEdit_method_is_gutter_drawn>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_gutter_overwritable<class_TextEdit_method_is_gutter_overwritable>`\ (\ gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_in_mulitcaret_edit<class_TextEdit_method_is_in_mulitcaret_edit>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_line_gutter_clickable<class_TextEdit_method_is_line_gutter_clickable>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_line_wrapped<class_TextEdit_method_is_line_wrapped>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_menu_visible<class_TextEdit_method_is_menu_visible>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_mouse_over_selection<class_TextEdit_method_is_mouse_over_selection>`\ (\ edges\: :ref:`bool<class_bool>`, caret_index\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_overtype_mode_enabled<class_TextEdit_method_is_overtype_mode_enabled>`\ (\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`menu_option<class_TextEdit_method_menu_option>`\ (\ option\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge_gutters<class_TextEdit_method_merge_gutters>`\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`multicaret_edit_ignore_caret<class_TextEdit_method_multicaret_edit_ignore_caret>`\ (\ caret_index\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`paste<class_TextEdit_method_paste>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`paste_primary_clipboard<class_TextEdit_method_paste_primary_clipboard>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`redo<class_TextEdit_method_redo>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_caret<class_TextEdit_method_remove_caret>`\ (\ caret\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_gutter<class_TextEdit_method_remove_gutter>`\ (\ gutter\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_line_at<class_TextEdit_method_remove_line_at>`\ (\ line\: :ref:`int<class_int>`, move_carets_down\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_secondary_carets<class_TextEdit_method_remove_secondary_carets>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_text<class_TextEdit_method_remove_text>`\ (\ from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`search<class_TextEdit_method_search>`\ (\ text\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`, from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select<class_TextEdit_method_select>`\ (\ origin_line\: :ref:`int<class_int>`, origin_column\: :ref:`int<class_int>`, caret_line\: :ref:`int<class_int>`, caret_column\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_all<class_TextEdit_method_select_all>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_word_under_caret<class_TextEdit_method_select_word_under_caret>`\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_caret_column<class_TextEdit_method_set_caret_column>`\ (\ column\: :ref:`int<class_int>`, adjust_viewport\: :ref:`bool<class_bool>` = true, caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_caret_line<class_TextEdit_method_set_caret_line>`\ (\ line\: :ref:`int<class_int>`, adjust_viewport\: :ref:`bool<class_bool>` = true, can_be_hidden\: :ref:`bool<class_bool>` = true, wrap_index\: :ref:`int<class_int>` = 0, caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_clickable<class_TextEdit_method_set_gutter_clickable>`\ (\ gutter\: :ref:`int<class_int>`, clickable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_custom_draw<class_TextEdit_method_set_gutter_custom_draw>`\ (\ column\: :ref:`int<class_int>`, draw_callback\: :ref:`Callable<class_Callable>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_draw<class_TextEdit_method_set_gutter_draw>`\ (\ gutter\: :ref:`int<class_int>`, draw\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_name<class_TextEdit_method_set_gutter_name>`\ (\ gutter\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_overwritable<class_TextEdit_method_set_gutter_overwritable>`\ (\ gutter\: :ref:`int<class_int>`, overwritable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`\ (\ gutter\: :ref:`int<class_int>`, type\: :ref:`GutterType<enum_TextEdit_GutterType>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_gutter_width<class_TextEdit_method_set_gutter_width>`\ (\ gutter\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line<class_TextEdit_method_set_line>`\ (\ line\: :ref:`int<class_int>`, new_text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_center_visible<class_TextEdit_method_set_line_as_center_visible>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_first_visible<class_TextEdit_method_set_line_as_first_visible>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_as_last_visible<class_TextEdit_method_set_line_as_last_visible>`\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_background_color<class_TextEdit_method_set_line_background_color>`\ (\ line\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_gutter_clickable<class_TextEdit_method_set_line_gutter_clickable>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, clickable\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_gutter_icon<class_TextEdit_method_set_line_gutter_icon>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_gutter_item_color<class_TextEdit_method_set_line_gutter_item_color>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_gutter_metadata<class_TextEdit_method_set_line_gutter_metadata>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_line_gutter_text<class_TextEdit_method_set_line_gutter_text>`\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_overtype_mode_enabled<class_TextEdit_method_set_overtype_mode_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_search_flags<class_TextEdit_method_set_search_flags>`\ (\ flags\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_search_text<class_TextEdit_method_set_search_text>`\ (\ search_text\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selection_mode<class_TextEdit_method_set_selection_mode>`\ (\ mode\: :ref:`SelectionMode<enum_TextEdit_SelectionMode>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selection_origin_column<class_TextEdit_method_set_selection_origin_column>`\ (\ column\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selection_origin_line<class_TextEdit_method_set_selection_origin_line>`\ (\ line\: :ref:`int<class_int>`, can_be_hidden\: :ref:`bool<class_bool>` = true, wrap_index\: :ref:`int<class_int>` = -1, caret_index\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tab_size<class_TextEdit_method_set_tab_size>`\ (\ size\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tooltip_request_func<class_TextEdit_method_set_tooltip_request_func>`\ (\ callback\: :ref:`Callable<class_Callable>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skip_selection_for_next_occurrence<class_TextEdit_method_skip_selection_for_next_occurrence>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_action<class_TextEdit_method_start_action>`\ (\ action\: :ref:`EditAction<enum_TextEdit_EditAction>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`swap_lines<class_TextEdit_method_swap_lines>`\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`undo<class_TextEdit_method_undo>`\ (\ ) | + +--------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -422,7 +471,7 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_color<class_TextEdit_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TextEdit_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_TextEdit_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Color<class_Color>` | :ref:`font_placeholder_color<class_TextEdit_theme_color_font_placeholder_color>` | ``Color(0.875, 0.875, 0.875, 0.6)`` | +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ @@ -472,9 +521,9 @@ Signals .. rst-class:: classref-signal -**caret_changed** **(** **)** +**caret_changed**\ (\ ) :ref:`🔗<class_TextEdit_signal_caret_changed>` -Emitted when the caret changes position. +Emitted when any caret changes position. .. rst-class:: classref-item-separator @@ -484,7 +533,7 @@ Emitted when the caret changes position. .. rst-class:: classref-signal -**gutter_added** **(** **)** +**gutter_added**\ (\ ) :ref:`🔗<class_TextEdit_signal_gutter_added>` Emitted when a gutter is added. @@ -496,7 +545,7 @@ Emitted when a gutter is added. .. rst-class:: classref-signal -**gutter_clicked** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** +**gutter_clicked**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_signal_gutter_clicked>` Emitted when a gutter is clicked. @@ -508,7 +557,7 @@ Emitted when a gutter is clicked. .. rst-class:: classref-signal -**gutter_removed** **(** **)** +**gutter_removed**\ (\ ) :ref:`🔗<class_TextEdit_signal_gutter_removed>` Emitted when a gutter is removed. @@ -520,11 +569,11 @@ Emitted when a gutter is removed. .. rst-class:: classref-signal -**lines_edited_from** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** +**lines_edited_from**\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_signal_lines_edited_from>` Emitted immediately when the text changes. -When text is added ``from_line`` will be less then ``to_line``. On a remove ``to_line`` will be less then ``from_line``. +When text is added ``from_line`` will be less than ``to_line``. On a remove ``to_line`` will be less than ``from_line``. .. rst-class:: classref-item-separator @@ -534,7 +583,7 @@ When text is added ``from_line`` will be less then ``to_line``. On a remove ``to .. rst-class:: classref-signal -**text_changed** **(** **)** +**text_changed**\ (\ ) :ref:`🔗<class_TextEdit_signal_text_changed>` Emitted when the text changes. @@ -546,7 +595,7 @@ Emitted when the text changes. .. rst-class:: classref-signal -**text_set** **(** **)** +**text_set**\ (\ ) :ref:`🔗<class_TextEdit_signal_text_set>` Emitted when :ref:`clear<class_TextEdit_method_clear>` is called or :ref:`text<class_TextEdit_property_text>` is set. @@ -563,7 +612,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MenuItems**: +enum **MenuItems**: :ref:`🔗<enum_TextEdit_MenuItems>` .. _class_TextEdit_constant_MENU_CUT: @@ -821,7 +870,7 @@ Represents the size of the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum. .. rst-class:: classref-enumeration -enum **EditAction**: +enum **EditAction**: :ref:`🔗<enum_TextEdit_EditAction>` .. _class_TextEdit_constant_ACTION_NONE: @@ -863,7 +912,7 @@ A forward delete action. .. rst-class:: classref-enumeration -enum **SearchFlags**: +enum **SearchFlags**: :ref:`🔗<enum_TextEdit_SearchFlags>` .. _class_TextEdit_constant_SEARCH_MATCH_CASE: @@ -897,7 +946,7 @@ Search from end to beginning. .. rst-class:: classref-enumeration -enum **CaretType**: +enum **CaretType**: :ref:`🔗<enum_TextEdit_CaretType>` .. _class_TextEdit_constant_CARET_TYPE_LINE: @@ -923,7 +972,7 @@ Block caret. .. rst-class:: classref-enumeration -enum **SelectionMode**: +enum **SelectionMode**: :ref:`🔗<enum_TextEdit_SelectionMode>` .. _class_TextEdit_constant_SELECTION_MODE_NONE: @@ -973,7 +1022,7 @@ Select whole lines as if the user triple clicked. .. rst-class:: classref-enumeration -enum **LineWrappingMode**: +enum **LineWrappingMode**: :ref:`🔗<enum_TextEdit_LineWrappingMode>` .. _class_TextEdit_constant_LINE_WRAPPING_NONE: @@ -999,7 +1048,7 @@ Line wrapping occurs at the control boundary, beyond what would normally be visi .. rst-class:: classref-enumeration -enum **GutterType**: +enum **GutterType**: :ref:`🔗<enum_TextEdit_GutterType>` .. _class_TextEdit_constant_GUTTER_TYPE_STRING: @@ -1007,7 +1056,7 @@ enum **GutterType**: :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_STRING** = ``0`` -Draw a string. +When a gutter is set to string using :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`, it is used to contain text set via the :ref:`set_line_gutter_text<class_TextEdit_method_set_line_gutter_text>` method. .. _class_TextEdit_constant_GUTTER_TYPE_ICON: @@ -1015,7 +1064,7 @@ Draw a string. :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_ICON** = ``1`` -Draw an icon. +When a gutter is set to icon using :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`, it is used to contain an icon set via the :ref:`set_line_gutter_icon<class_TextEdit_method_set_line_gutter_icon>` method. .. _class_TextEdit_constant_GUTTER_TYPE_CUSTOM: @@ -1023,7 +1072,7 @@ Draw an icon. :ref:`GutterType<enum_TextEdit_GutterType>` **GUTTER_TYPE_CUSTOM** = ``2`` -Custom draw. +When a gutter is set to custom using :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`, it is used to contain custom visuals controlled by a callback method set via the :ref:`set_gutter_custom_draw<class_TextEdit_method_set_gutter_custom_draw>` method. .. rst-class:: classref-section-separator @@ -1038,12 +1087,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3`` +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``3`` :ref:`🔗<class_TextEdit_property_autowrap_mode>` .. rst-class:: classref-property-setget -- void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)** -- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)** +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) +- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ ) If :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` is set to :ref:`LINE_WRAPPING_BOUNDARY<class_TextEdit_constant_LINE_WRAPPING_BOUNDARY>`, sets text wrapping mode. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -1055,12 +1104,12 @@ If :ref:`wrap_mode<class_TextEdit_property_wrap_mode>` is set to :ref:`LINE_WRAP .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_blink** = ``false`` +:ref:`bool<class_bool>` **caret_blink** = ``false`` :ref:`🔗<class_TextEdit_property_caret_blink>` .. rst-class:: classref-property-setget -- void **set_caret_blink_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_caret_blink_enabled** **(** **)** +- |void| **set_caret_blink_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_caret_blink_enabled**\ (\ ) If ``true``, makes the caret blink. @@ -1072,12 +1121,12 @@ If ``true``, makes the caret blink. .. rst-class:: classref-property -:ref:`float<class_float>` **caret_blink_interval** = ``0.65`` +:ref:`float<class_float>` **caret_blink_interval** = ``0.65`` :ref:`🔗<class_TextEdit_property_caret_blink_interval>` .. rst-class:: classref-property-setget -- void **set_caret_blink_interval** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_caret_blink_interval** **(** **)** +- |void| **set_caret_blink_interval**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_caret_blink_interval**\ (\ ) The interval at which the caret blinks (in seconds). @@ -1089,12 +1138,12 @@ The interval at which the caret blinks (in seconds). .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_draw_when_editable_disabled** = ``false`` +:ref:`bool<class_bool>` **caret_draw_when_editable_disabled** = ``false`` :ref:`🔗<class_TextEdit_property_caret_draw_when_editable_disabled>` .. rst-class:: classref-property-setget -- void **set_draw_caret_when_editable_disabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_drawing_caret_when_editable_disabled** **(** **)** +- |void| **set_draw_caret_when_editable_disabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drawing_caret_when_editable_disabled**\ (\ ) If ``true``, caret will be visible when :ref:`editable<class_TextEdit_property_editable>` is disabled. @@ -1106,12 +1155,12 @@ If ``true``, caret will be visible when :ref:`editable<class_TextEdit_property_e .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_mid_grapheme** = ``true`` +:ref:`bool<class_bool>` **caret_mid_grapheme** = ``false`` :ref:`🔗<class_TextEdit_property_caret_mid_grapheme>` .. rst-class:: classref-property-setget -- void **set_caret_mid_grapheme_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_caret_mid_grapheme_enabled** **(** **)** +- |void| **set_caret_mid_grapheme_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_caret_mid_grapheme_enabled**\ (\ ) Allow moving caret, selecting and removing the individual composite character components. @@ -1125,16 +1174,16 @@ Allow moving caret, selecting and removing the individual composite character co .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_move_on_right_click** = ``true`` +:ref:`bool<class_bool>` **caret_move_on_right_click** = ``true`` :ref:`🔗<class_TextEdit_property_caret_move_on_right_click>` .. rst-class:: classref-property-setget -- void **set_move_caret_on_right_click_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_move_caret_on_right_click_enabled** **(** **)** +- |void| **set_move_caret_on_right_click_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_move_caret_on_right_click_enabled**\ (\ ) If ``true``, a right-click moves the caret at the mouse position before displaying the context menu. -If ``false``, the context menu disregards mouse location. +If ``false``, the context menu ignores mouse location. .. rst-class:: classref-item-separator @@ -1144,12 +1193,12 @@ If ``false``, the context menu disregards mouse location. .. rst-class:: classref-property -:ref:`bool<class_bool>` **caret_multiple** = ``true`` +:ref:`bool<class_bool>` **caret_multiple** = ``true`` :ref:`🔗<class_TextEdit_property_caret_multiple>` .. rst-class:: classref-property-setget -- void **set_multiple_carets_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_multiple_carets_enabled** **(** **)** +- |void| **set_multiple_carets_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_multiple_carets_enabled**\ (\ ) Sets if multiple carets are allowed. @@ -1161,12 +1210,12 @@ Sets if multiple carets are allowed. .. rst-class:: classref-property -:ref:`CaretType<enum_TextEdit_CaretType>` **caret_type** = ``0`` +:ref:`CaretType<enum_TextEdit_CaretType>` **caret_type** = ``0`` :ref:`🔗<class_TextEdit_property_caret_type>` .. rst-class:: classref-property-setget -- void **set_caret_type** **(** :ref:`CaretType<enum_TextEdit_CaretType>` value **)** -- :ref:`CaretType<enum_TextEdit_CaretType>` **get_caret_type** **(** **)** +- |void| **set_caret_type**\ (\ value\: :ref:`CaretType<enum_TextEdit_CaretType>`\ ) +- :ref:`CaretType<enum_TextEdit_CaretType>` **get_caret_type**\ (\ ) Set the type of caret to draw. @@ -1178,12 +1227,12 @@ Set the type of caret to draw. .. rst-class:: classref-property -:ref:`bool<class_bool>` **context_menu_enabled** = ``true`` +:ref:`bool<class_bool>` **context_menu_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_context_menu_enabled>` .. rst-class:: classref-property-setget -- void **set_context_menu_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_context_menu_enabled** **(** **)** +- |void| **set_context_menu_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_context_menu_enabled**\ (\ ) If ``true``, a right-click displays the context menu. @@ -1191,16 +1240,33 @@ If ``true``, a right-click displays the context menu. ---- +.. _class_TextEdit_property_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **custom_word_separators** = ``""`` :ref:`🔗<class_TextEdit_property_custom_word_separators>` + +.. rst-class:: classref-property-setget + +- |void| **set_custom_word_separators**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_custom_word_separators**\ (\ ) + +The characters to consider as word delimiters if :ref:`use_custom_word_separators<class_TextEdit_property_use_custom_word_separators>` is ``true``. The characters should be defined without separation, for example ``#_!``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_deselect_on_focus_loss_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` +:ref:`bool<class_bool>` **deselect_on_focus_loss_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_deselect_on_focus_loss_enabled>` .. rst-class:: classref-property-setget -- void **set_deselect_on_focus_loss_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled** **(** **)** +- |void| **set_deselect_on_focus_loss_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_deselect_on_focus_loss_enabled**\ (\ ) If ``true``, the selected text will be deselected when focus is lost. @@ -1212,14 +1278,14 @@ If ``true``, the selected text will be deselected when focus is lost. .. rst-class:: classref-property -:ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` +:ref:`bool<class_bool>` **drag_and_drop_selection_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_drag_and_drop_selection_enabled>` .. rst-class:: classref-property-setget -- void **set_drag_and_drop_selection_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled** **(** **)** +- |void| **set_drag_and_drop_selection_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drag_and_drop_selection_enabled**\ (\ ) -If ``true``, allow drag and drop of selected text. +If ``true``, allow drag and drop of selected text. Text can still be dropped from other sources. .. rst-class:: classref-item-separator @@ -1229,12 +1295,12 @@ If ``true``, allow drag and drop of selected text. .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_control_chars** = ``false`` +:ref:`bool<class_bool>` **draw_control_chars** = ``false`` :ref:`🔗<class_TextEdit_property_draw_control_chars>` .. rst-class:: classref-property-setget -- void **set_draw_control_chars** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_draw_control_chars** **(** **)** +- |void| **set_draw_control_chars**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_draw_control_chars**\ (\ ) If ``true``, control characters are displayed. @@ -1246,12 +1312,12 @@ If ``true``, control characters are displayed. .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_spaces** = ``false`` +:ref:`bool<class_bool>` **draw_spaces** = ``false`` :ref:`🔗<class_TextEdit_property_draw_spaces>` .. rst-class:: classref-property-setget -- void **set_draw_spaces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_drawing_spaces** **(** **)** +- |void| **set_draw_spaces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drawing_spaces**\ (\ ) If ``true``, the "space" character will have a visible representation. @@ -1263,12 +1329,12 @@ If ``true``, the "space" character will have a visible representation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **draw_tabs** = ``false`` +:ref:`bool<class_bool>` **draw_tabs** = ``false`` :ref:`🔗<class_TextEdit_property_draw_tabs>` .. rst-class:: classref-property-setget -- void **set_draw_tabs** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_drawing_tabs** **(** **)** +- |void| **set_draw_tabs**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drawing_tabs**\ (\ ) If ``true``, the "tab" character will have a visible representation. @@ -1280,12 +1346,12 @@ If ``true``, the "tab" character will have a visible representation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **editable** = ``true`` +:ref:`bool<class_bool>` **editable** = ``true`` :ref:`🔗<class_TextEdit_property_editable>` .. rst-class:: classref-property-setget -- void **set_editable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_editable** **(** **)** +- |void| **set_editable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_editable**\ (\ ) If ``false``, existing text cannot be modified and new text cannot be added. @@ -1297,12 +1363,12 @@ If ``false``, existing text cannot be modified and new text cannot be added. .. rst-class:: classref-property -:ref:`bool<class_bool>` **highlight_all_occurrences** = ``false`` +:ref:`bool<class_bool>` **highlight_all_occurrences** = ``false`` :ref:`🔗<class_TextEdit_property_highlight_all_occurrences>` .. rst-class:: classref-property-setget -- void **set_highlight_all_occurrences** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_highlight_all_occurrences_enabled** **(** **)** +- |void| **set_highlight_all_occurrences**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_highlight_all_occurrences_enabled**\ (\ ) If ``true``, all occurrences of the selected text will be highlighted. @@ -1314,12 +1380,12 @@ If ``true``, all occurrences of the selected text will be highlighted. .. rst-class:: classref-property -:ref:`bool<class_bool>` **highlight_current_line** = ``false`` +:ref:`bool<class_bool>` **highlight_current_line** = ``false`` :ref:`🔗<class_TextEdit_property_highlight_current_line>` .. rst-class:: classref-property-setget -- void **set_highlight_current_line** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_highlight_current_line_enabled** **(** **)** +- |void| **set_highlight_current_line**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_highlight_current_line_enabled**\ (\ ) If ``true``, the line containing the cursor is highlighted. @@ -1327,16 +1393,33 @@ If ``true``, the line containing the cursor is highlighted. ---- +.. _class_TextEdit_property_indent_wrapped_lines: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **indent_wrapped_lines** = ``false`` :ref:`🔗<class_TextEdit_property_indent_wrapped_lines>` + +.. rst-class:: classref-property-setget + +- |void| **set_indent_wrapped_lines**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_indent_wrapped_lines**\ (\ ) + +If ``true``, all wrapped lines are indented to the same amount as the unwrapped line. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_language: .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_TextEdit_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -1348,12 +1431,12 @@ Language code used for line-breaking and text shaping algorithms, if left empty .. rst-class:: classref-property -:ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true`` +:ref:`bool<class_bool>` **middle_mouse_paste_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_middle_mouse_paste_enabled>` .. rst-class:: classref-property-setget -- void **set_middle_mouse_paste_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled** **(** **)** +- |void| **set_middle_mouse_paste_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_middle_mouse_paste_enabled**\ (\ ) If ``false``, using middle mouse button to paste clipboard will be disabled. @@ -1367,14 +1450,14 @@ If ``false``, using middle mouse button to paste clipboard will be disabled. .. rst-class:: classref-property -:ref:`bool<class_bool>` **minimap_draw** = ``false`` +:ref:`bool<class_bool>` **minimap_draw** = ``false`` :ref:`🔗<class_TextEdit_property_minimap_draw>` .. rst-class:: classref-property-setget -- void **set_draw_minimap** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_drawing_minimap** **(** **)** +- |void| **set_draw_minimap**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_drawing_minimap**\ (\ ) -If ``true``, a minimap is shown, providing an outline of your source code. +If ``true``, a minimap is shown, providing an outline of your source code. The minimap uses a fixed-width text size. .. rst-class:: classref-item-separator @@ -1384,12 +1467,12 @@ If ``true``, a minimap is shown, providing an outline of your source code. .. rst-class:: classref-property -:ref:`int<class_int>` **minimap_width** = ``80`` +:ref:`int<class_int>` **minimap_width** = ``80`` :ref:`🔗<class_TextEdit_property_minimap_width>` .. rst-class:: classref-property-setget -- void **set_minimap_width** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_minimap_width** **(** **)** +- |void| **set_minimap_width**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_minimap_width**\ (\ ) The width, in pixels, of the minimap. @@ -1401,12 +1484,12 @@ The width, in pixels, of the minimap. .. rst-class:: classref-property -:ref:`String<class_String>` **placeholder_text** = ``""`` +:ref:`String<class_String>` **placeholder_text** = ``""`` :ref:`🔗<class_TextEdit_property_placeholder_text>` .. rst-class:: classref-property-setget -- void **set_placeholder** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_placeholder** **(** **)** +- |void| **set_placeholder**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_placeholder**\ (\ ) Text shown when the **TextEdit** is empty. It is **not** the **TextEdit**'s default value (see :ref:`text<class_TextEdit_property_text>`). @@ -1418,12 +1501,12 @@ Text shown when the **TextEdit** is empty. It is **not** the **TextEdit**'s defa .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_fit_content_height** = ``false`` +:ref:`bool<class_bool>` **scroll_fit_content_height** = ``false`` :ref:`🔗<class_TextEdit_property_scroll_fit_content_height>` .. rst-class:: classref-property-setget -- void **set_fit_content_height_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_fit_content_height_enabled** **(** **)** +- |void| **set_fit_content_height_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_fit_content_height_enabled**\ (\ ) If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to the number of visible lines. @@ -1435,12 +1518,12 @@ If ``true``, **TextEdit** will disable vertical scroll and fit minimum height to .. rst-class:: classref-property -:ref:`int<class_int>` **scroll_horizontal** = ``0`` +:ref:`int<class_int>` **scroll_horizontal** = ``0`` :ref:`🔗<class_TextEdit_property_scroll_horizontal>` .. rst-class:: classref-property-setget -- void **set_h_scroll** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_h_scroll** **(** **)** +- |void| **set_h_scroll**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_h_scroll**\ (\ ) If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. @@ -1452,12 +1535,12 @@ If there is a horizontal scrollbar, this determines the current horizontal scrol .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_past_end_of_file** = ``false`` +:ref:`bool<class_bool>` **scroll_past_end_of_file** = ``false`` :ref:`🔗<class_TextEdit_property_scroll_past_end_of_file>` .. rst-class:: classref-property-setget -- void **set_scroll_past_end_of_file_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_scroll_past_end_of_file_enabled** **(** **)** +- |void| **set_scroll_past_end_of_file_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_scroll_past_end_of_file_enabled**\ (\ ) Allow scrolling past the last line into "virtual" space. @@ -1469,14 +1552,14 @@ Allow scrolling past the last line into "virtual" space. .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_smooth** = ``false`` +:ref:`bool<class_bool>` **scroll_smooth** = ``false`` :ref:`🔗<class_TextEdit_property_scroll_smooth>` .. rst-class:: classref-property-setget -- void **set_smooth_scroll_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_smooth_scroll_enabled** **(** **)** +- |void| **set_smooth_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_smooth_scroll_enabled**\ (\ ) -Scroll smoothly over the text rather then jumping to the next location. +Scroll smoothly over the text rather than jumping to the next location. .. rst-class:: classref-item-separator @@ -1486,12 +1569,12 @@ Scroll smoothly over the text rather then jumping to the next location. .. rst-class:: classref-property -:ref:`float<class_float>` **scroll_v_scroll_speed** = ``80.0`` +:ref:`float<class_float>` **scroll_v_scroll_speed** = ``80.0`` :ref:`🔗<class_TextEdit_property_scroll_v_scroll_speed>` .. rst-class:: classref-property-setget -- void **set_v_scroll_speed** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_v_scroll_speed** **(** **)** +- |void| **set_v_scroll_speed**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_v_scroll_speed**\ (\ ) Sets the scroll speed with the minimap or when :ref:`scroll_smooth<class_TextEdit_property_scroll_smooth>` is enabled. @@ -1503,12 +1586,12 @@ Sets the scroll speed with the minimap or when :ref:`scroll_smooth<class_TextEdi .. rst-class:: classref-property -:ref:`float<class_float>` **scroll_vertical** = ``0.0`` +:ref:`float<class_float>` **scroll_vertical** = ``0.0`` :ref:`🔗<class_TextEdit_property_scroll_vertical>` .. rst-class:: classref-property-setget -- void **set_v_scroll** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_v_scroll** **(** **)** +- |void| **set_v_scroll**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_v_scroll**\ (\ ) If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. @@ -1520,12 +1603,12 @@ If there is a vertical scrollbar, this determines the current vertical scroll va .. rst-class:: classref-property -:ref:`bool<class_bool>` **selecting_enabled** = ``true`` +:ref:`bool<class_bool>` **selecting_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_selecting_enabled>` .. rst-class:: classref-property-setget -- void **set_selecting_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_selecting_enabled** **(** **)** +- |void| **set_selecting_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_selecting_enabled**\ (\ ) If ``true``, text can be selected. @@ -1539,12 +1622,12 @@ If ``false``, text can not be selected by the user or by the :ref:`select<class_ .. rst-class:: classref-property -:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` +:ref:`bool<class_bool>` **shortcut_keys_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_shortcut_keys_enabled>` .. rst-class:: classref-property-setget -- void **set_shortcut_keys_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shortcut_keys_enabled** **(** **)** +- |void| **set_shortcut_keys_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shortcut_keys_enabled**\ (\ ) If ``true``, shortcut keys for context menu items are enabled, even if the context menu is disabled. @@ -1556,12 +1639,12 @@ If ``true``, shortcut keys for context menu items are enabled, even if the conte .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_TextEdit_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -1573,12 +1656,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_TextEdit_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -1590,12 +1673,12 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **syntax_highlighter** +:ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **syntax_highlighter** :ref:`🔗<class_TextEdit_property_syntax_highlighter>` .. rst-class:: classref-property-setget -- void **set_syntax_highlighter** **(** :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` value **)** -- :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **get_syntax_highlighter** **(** **)** +- |void| **set_syntax_highlighter**\ (\ value\: :ref:`SyntaxHighlighter<class_SyntaxHighlighter>`\ ) +- :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` **get_syntax_highlighter**\ (\ ) Sets the :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` to use. @@ -1607,12 +1690,12 @@ Sets the :ref:`SyntaxHighlighter<class_SyntaxHighlighter>` to use. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_TextEdit_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) String value of the **TextEdit**. @@ -1624,12 +1707,12 @@ String value of the **TextEdit**. .. rst-class:: classref-property -:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` +:ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_TextEdit_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`TextDirection<enum_Control_TextDirection>` value **)** -- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) +- :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ ) Base text writing direction. @@ -1637,16 +1720,50 @@ Base text writing direction. ---- +.. _class_TextEdit_property_use_custom_word_separators: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **use_custom_word_separators** = ``false`` :ref:`🔗<class_TextEdit_property_use_custom_word_separators>` + +.. rst-class:: classref-property-setget + +- |void| **set_use_custom_word_separators**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_custom_word_separators_enabled**\ (\ ) + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will use the behavior of :ref:`use_default_word_separators<class_TextEdit_property_use_default_word_separators>`. If ``true``, it will also stop the caret if a character within :ref:`custom_word_separators<class_TextEdit_property_custom_word_separators>` is detected. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_property_use_default_word_separators: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **use_default_word_separators** = ``true`` :ref:`🔗<class_TextEdit_property_use_default_word_separators>` + +.. rst-class:: classref-property-setget + +- |void| **set_use_default_word_separators**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_word_separators_enabled**\ (\ ) + +If ``false``, using :kbd:`Ctrl + Left` or :kbd:`Ctrl + Right` (:kbd:`Cmd + Left` or :kbd:`Cmd + Right` on macOS) bindings will stop moving caret only if a space or punctuation is detected. If ``true``, it will also stop the caret if a character is part of ``!"#$%&'()*+,-./:;<=>?@[\]^`{|}~``, the Unicode General Punctuation table, or the Unicode CJK Punctuation table. Useful for subword moving. This behavior also will be applied to the behavior of text selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_property_virtual_keyboard_enabled: .. rst-class:: classref-property -:ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true`` +:ref:`bool<class_bool>` **virtual_keyboard_enabled** = ``true`` :ref:`🔗<class_TextEdit_property_virtual_keyboard_enabled>` .. rst-class:: classref-property-setget -- void **set_virtual_keyboard_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_virtual_keyboard_enabled** **(** **)** +- |void| **set_virtual_keyboard_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_virtual_keyboard_enabled**\ (\ ) If ``true``, the native virtual keyboard is shown when focused on platforms that support it. @@ -1658,12 +1775,12 @@ If ``true``, the native virtual keyboard is shown when focused on platforms that .. rst-class:: classref-property -:ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **wrap_mode** = ``0`` +:ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **wrap_mode** = ``0`` :ref:`🔗<class_TextEdit_property_wrap_mode>` .. rst-class:: classref-property-setget -- void **set_line_wrapping_mode** **(** :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` value **)** -- :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **get_line_wrapping_mode** **(** **)** +- |void| **set_line_wrapping_mode**\ (\ value\: :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>`\ ) +- :ref:`LineWrappingMode<enum_TextEdit_LineWrappingMode>` **get_line_wrapping_mode**\ (\ ) Sets the line wrapping mode to use. @@ -1676,11 +1793,11 @@ Sets the line wrapping mode to use. Method Descriptions ------------------- -.. _class_TextEdit_method__backspace: +.. _class_TextEdit_private_method__backspace: .. rst-class:: classref-method -void **_backspace** **(** :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_backspace**\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__backspace>` Override this method to define what happens when the user presses the backspace key. @@ -1688,11 +1805,11 @@ Override this method to define what happens when the user presses the backspace ---- -.. _class_TextEdit_method__copy: +.. _class_TextEdit_private_method__copy: .. rst-class:: classref-method -void **_copy** **(** :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_copy**\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__copy>` Override this method to define what happens when the user performs a copy operation. @@ -1700,11 +1817,11 @@ Override this method to define what happens when the user performs a copy operat ---- -.. _class_TextEdit_method__cut: +.. _class_TextEdit_private_method__cut: .. rst-class:: classref-method -void **_cut** **(** :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_cut**\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__cut>` Override this method to define what happens when the user performs a cut operation. @@ -1712,11 +1829,11 @@ Override this method to define what happens when the user performs a cut operati ---- -.. _class_TextEdit_method__handle_unicode_input: +.. _class_TextEdit_private_method__handle_unicode_input: .. rst-class:: classref-method -void **_handle_unicode_input** **(** :ref:`int<class_int>` unicode_char, :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_handle_unicode_input**\ (\ unicode_char\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__handle_unicode_input>` Override this method to define what happens when the user types in the provided key ``unicode_char``. @@ -1724,11 +1841,11 @@ Override this method to define what happens when the user types in the provided ---- -.. _class_TextEdit_method__paste: +.. _class_TextEdit_private_method__paste: .. rst-class:: classref-method -void **_paste** **(** :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_paste**\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__paste>` Override this method to define what happens when the user performs a paste operation. @@ -1736,11 +1853,11 @@ Override this method to define what happens when the user performs a paste opera ---- -.. _class_TextEdit_method__paste_primary_clipboard: +.. _class_TextEdit_private_method__paste_primary_clipboard: .. rst-class:: classref-method -void **_paste_primary_clipboard** **(** :ref:`int<class_int>` caret_index **)** |virtual| +|void| **_paste_primary_clipboard**\ (\ caret_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextEdit_private_method__paste_primary_clipboard>` Override this method to define what happens when the user performs a paste operation with middle mouse button. @@ -1754,7 +1871,7 @@ Override this method to define what happens when the user performs a paste opera .. rst-class:: classref-method -:ref:`int<class_int>` **add_caret** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` col **)** +:ref:`int<class_int>` **add_caret**\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_add_caret>` Adds a new caret at the given location. Returns the index of the new caret, or ``-1`` if the location is invalid. @@ -1766,9 +1883,9 @@ Adds a new caret at the given location. Returns the index of the new caret, or ` .. rst-class:: classref-method -void **add_caret_at_carets** **(** :ref:`bool<class_bool>` below **)** +|void| **add_caret_at_carets**\ (\ below\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_add_caret_at_carets>` -Adds an additional caret above or below every caret. If ``below`` is true the new caret will be added below and above otherwise. +Adds an additional caret above or below every caret. If ``below`` is ``true`` the new caret will be added below and above otherwise. .. rst-class:: classref-item-separator @@ -1778,7 +1895,7 @@ Adds an additional caret above or below every caret. If ``below`` is true the ne .. rst-class:: classref-method -void **add_gutter** **(** :ref:`int<class_int>` at=-1 **)** +|void| **add_gutter**\ (\ at\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_add_gutter>` Register a new gutter to this **TextEdit**. Use ``at`` to have a specific gutter order. A value of ``-1`` appends the gutter to the right. @@ -1790,7 +1907,7 @@ Register a new gutter to this **TextEdit**. Use ``at`` to have a specific gutter .. rst-class:: classref-method -void **add_selection_for_next_occurrence** **(** **)** +|void| **add_selection_for_next_occurrence**\ (\ ) :ref:`🔗<class_TextEdit_method_add_selection_for_next_occurrence>` Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret. @@ -1802,9 +1919,11 @@ Adds a selection and a caret for the next occurrence of the current selection. I .. rst-class:: classref-method -void **adjust_carets_after_edit** **(** :ref:`int<class_int>` caret, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_col, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_col **)** +|void| **adjust_carets_after_edit**\ (\ caret\: :ref:`int<class_int>`, from_line\: :ref:`int<class_int>`, from_col\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_col\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_adjust_carets_after_edit>` -Reposition the carets affected by the edit. This assumes edits are applied in edit order, see :ref:`get_caret_index_edit_order<class_TextEdit_method_get_caret_index_edit_order>`. +**Deprecated:** No longer necessary since methods now adjust carets themselves. + +This method does nothing. .. rst-class:: classref-item-separator @@ -1814,7 +1933,7 @@ Reposition the carets affected by the edit. This assumes edits are applied in ed .. rst-class:: classref-method -void **adjust_viewport_to_caret** **(** :ref:`int<class_int>` caret_index=0 **)** +|void| **adjust_viewport_to_caret**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_adjust_viewport_to_caret>` Adjust the viewport so the caret is visible. @@ -1822,13 +1941,25 @@ Adjust the viewport so the caret is visible. ---- +.. _class_TextEdit_method_apply_ime: + +.. rst-class:: classref-method + +|void| **apply_ime**\ (\ ) :ref:`🔗<class_TextEdit_method_apply_ime>` + +Applies text from the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME) to each caret and closes the IME if it is open. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_backspace: .. rst-class:: classref-method -void **backspace** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **backspace**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_backspace>` -Called when the user presses the backspace key. Can be overridden with :ref:`_backspace<class_TextEdit_method__backspace>`. +Called when the user presses the backspace key. Can be overridden with :ref:`_backspace<class_TextEdit_private_method__backspace>`. .. rst-class:: classref-item-separator @@ -1838,7 +1969,7 @@ Called when the user presses the backspace key. Can be overridden with :ref:`_ba .. rst-class:: classref-method -void **begin_complex_operation** **(** **)** +|void| **begin_complex_operation**\ (\ ) :ref:`🔗<class_TextEdit_method_begin_complex_operation>` Starts a multipart edit. All edits will be treated as one action until :ref:`end_complex_operation<class_TextEdit_method_end_complex_operation>` is called. @@ -1846,11 +1977,48 @@ Starts a multipart edit. All edits will be treated as one action until :ref:`end ---- +.. _class_TextEdit_method_begin_multicaret_edit: + +.. rst-class:: classref-method + +|void| **begin_multicaret_edit**\ (\ ) :ref:`🔗<class_TextEdit_method_begin_multicaret_edit>` + +Starts an edit for multiple carets. The edit must be ended with :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>`. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>` and :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>` can be nested, and the merge will happen at the last :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>`. + +Example usage: + +:: + + begin_complex_operation() + begin_multicaret_edit() + for i in range(get_caret_count()): + if multicaret_edit_ignore_caret(i): + continue + # Logic here. + end_multicaret_edit() + end_complex_operation() + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_method_cancel_ime: + +.. rst-class:: classref-method + +|void| **cancel_ime**\ (\ ) :ref:`🔗<class_TextEdit_method_cancel_ime>` + +Closes the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME) if it is open. Any text in the IME will be lost. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_center_viewport_to_caret: .. rst-class:: classref-method -void **center_viewport_to_caret** **(** :ref:`int<class_int>` caret_index=0 **)** +|void| **center_viewport_to_caret**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_center_viewport_to_caret>` Centers the viewport on the line the editing caret is at. This also resets the :ref:`scroll_horizontal<class_TextEdit_property_scroll_horizontal>` value to ``0``. @@ -1862,7 +2030,7 @@ Centers the viewport on the line the editing caret is at. This also resets the : .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_TextEdit_method_clear>` Performs a full reset of **TextEdit**, including undo history. @@ -1874,7 +2042,7 @@ Performs a full reset of **TextEdit**, including undo history. .. rst-class:: classref-method -void **clear_undo_history** **(** **)** +|void| **clear_undo_history**\ (\ ) :ref:`🔗<class_TextEdit_method_clear_undo_history>` Clears the undo history. @@ -1882,13 +2050,31 @@ Clears the undo history. ---- +.. _class_TextEdit_method_collapse_carets: + +.. rst-class:: classref-method + +|void| **collapse_carets**\ (\ from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`, inclusive\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TextEdit_method_collapse_carets>` + +Collapse all carets in the given range to the ``from_line`` and ``from_column`` position. + +\ ``inclusive`` applies to both ends. + +If :ref:`is_in_mulitcaret_edit<class_TextEdit_method_is_in_mulitcaret_edit>` is ``true``, carets that are collapsed will be ``true`` for :ref:`multicaret_edit_ignore_caret<class_TextEdit_method_multicaret_edit_ignore_caret>`. + +\ :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>` will be called if any carets were collapsed. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_copy: .. rst-class:: classref-method -void **copy** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **copy**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_copy>` -Copies the current text selection. Can be overridden with :ref:`_copy<class_TextEdit_method__copy>`. +Copies the current text selection. Can be overridden with :ref:`_copy<class_TextEdit_private_method__copy>`. .. rst-class:: classref-item-separator @@ -1898,9 +2084,9 @@ Copies the current text selection. Can be overridden with :ref:`_copy<class_Text .. rst-class:: classref-method -void **cut** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **cut**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_cut>` -Cut's the current selection. Can be overridden with :ref:`_cut<class_TextEdit_method__cut>`. +Cut's the current selection. Can be overridden with :ref:`_cut<class_TextEdit_private_method__cut>`. .. rst-class:: classref-item-separator @@ -1910,7 +2096,7 @@ Cut's the current selection. Can be overridden with :ref:`_cut<class_TextEdit_me .. rst-class:: classref-method -void **delete_selection** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **delete_selection**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_delete_selection>` Deletes the selected text. @@ -1922,7 +2108,7 @@ Deletes the selected text. .. rst-class:: classref-method -void **deselect** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **deselect**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_deselect>` Deselects the current selection. @@ -1934,7 +2120,7 @@ Deselects the current selection. .. rst-class:: classref-method -void **end_action** **(** **)** +|void| **end_action**\ (\ ) :ref:`🔗<class_TextEdit_method_end_action>` Marks the end of steps in the current action started with :ref:`start_action<class_TextEdit_method_start_action>`. @@ -1946,7 +2132,7 @@ Marks the end of steps in the current action started with :ref:`start_action<cla .. rst-class:: classref-method -void **end_complex_operation** **(** **)** +|void| **end_complex_operation**\ (\ ) :ref:`🔗<class_TextEdit_method_end_complex_operation>` Ends a multipart edit, started with :ref:`begin_complex_operation<class_TextEdit_method_begin_complex_operation>`. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. @@ -1954,11 +2140,23 @@ Ends a multipart edit, started with :ref:`begin_complex_operation<class_TextEdit ---- +.. _class_TextEdit_method_end_multicaret_edit: + +.. rst-class:: classref-method + +|void| **end_multicaret_edit**\ (\ ) :ref:`🔗<class_TextEdit_method_end_multicaret_edit>` + +Ends an edit for multiple carets, that was started with :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>`. If this was the last :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>` and :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>` was called, carets will be merged. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_caret_column: .. rst-class:: classref-method -:ref:`int<class_int>` **get_caret_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_caret_column**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_caret_column>` Returns the column the editing caret is at. @@ -1970,7 +2168,7 @@ Returns the column the editing caret is at. .. rst-class:: classref-method -:ref:`int<class_int>` **get_caret_count** **(** **)** |const| +:ref:`int<class_int>` **get_caret_count**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_caret_count>` Returns the number of carets in this **TextEdit**. @@ -1982,7 +2180,7 @@ Returns the number of carets in this **TextEdit**. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_caret_draw_pos** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`Vector2<class_Vector2>` **get_caret_draw_pos**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_caret_draw_pos>` Returns the caret pixel draw position. @@ -1994,7 +2192,9 @@ Returns the caret pixel draw position. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_caret_index_edit_order** **(** **)** +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_caret_index_edit_order**\ (\ ) :ref:`🔗<class_TextEdit_method_get_caret_index_edit_order>` + +**Deprecated:** Carets no longer need to be edited in any specific order. If the carets need to be sorted, use :ref:`get_sorted_carets<class_TextEdit_method_get_sorted_carets>` instead. Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as :ref:`insert_text_at_caret<class_TextEdit_method_insert_text_at_caret>` are applied. @@ -2006,7 +2206,7 @@ Returns a list of caret indexes in their edit order, this done from bottom to to .. rst-class:: classref-method -:ref:`int<class_int>` **get_caret_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_caret_line**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_caret_line>` Returns the line the editing caret is on. @@ -2018,7 +2218,7 @@ Returns the line the editing caret is on. .. rst-class:: classref-method -:ref:`int<class_int>` **get_caret_wrap_index** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_caret_wrap_index**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_caret_wrap_index>` Returns the wrap index the editing caret is on. @@ -2030,7 +2230,7 @@ Returns the wrap index the editing caret is on. .. rst-class:: classref-method -:ref:`int<class_int>` **get_first_non_whitespace_column** **(** :ref:`int<class_int>` line **)** |const| +:ref:`int<class_int>` **get_first_non_whitespace_column**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_first_non_whitespace_column>` Returns the first column containing a non-whitespace character. @@ -2042,7 +2242,7 @@ Returns the first column containing a non-whitespace character. .. rst-class:: classref-method -:ref:`int<class_int>` **get_first_visible_line** **(** **)** |const| +:ref:`int<class_int>` **get_first_visible_line**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_first_visible_line>` Returns the first visible line. @@ -2054,7 +2254,7 @@ Returns the first visible line. .. rst-class:: classref-method -:ref:`int<class_int>` **get_gutter_count** **(** **)** |const| +:ref:`int<class_int>` **get_gutter_count**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_gutter_count>` Returns the number of gutters registered. @@ -2066,7 +2266,7 @@ Returns the number of gutters registered. .. rst-class:: classref-method -:ref:`String<class_String>` **get_gutter_name** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`String<class_String>` **get_gutter_name**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_gutter_name>` Returns the name of the gutter at the given index. @@ -2078,9 +2278,9 @@ Returns the name of the gutter at the given index. .. rst-class:: classref-method -:ref:`GutterType<enum_TextEdit_GutterType>` **get_gutter_type** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`GutterType<enum_TextEdit_GutterType>` **get_gutter_type**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_gutter_type>` -Returns the type of the gutter at the given index. +Returns the type of the gutter at the given index. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType<enum_TextEdit_GutterType>` for options. .. rst-class:: classref-item-separator @@ -2090,7 +2290,7 @@ Returns the type of the gutter at the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_gutter_width** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`int<class_int>` **get_gutter_width**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_gutter_width>` Returns the width of the gutter at the given index. @@ -2102,7 +2302,7 @@ Returns the width of the gutter at the given index. .. rst-class:: classref-method -:ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar** **(** **)** |const| +:ref:`HScrollBar<class_HScrollBar>` **get_h_scroll_bar**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_h_scroll_bar>` Returns the :ref:`HScrollBar<class_HScrollBar>` used by **TextEdit**. @@ -2114,7 +2314,7 @@ Returns the :ref:`HScrollBar<class_HScrollBar>` used by **TextEdit**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_indent_level** **(** :ref:`int<class_int>` line **)** |const| +:ref:`int<class_int>` **get_indent_level**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_indent_level>` Returns the number of spaces and ``tab * tab_size`` before the first char. @@ -2126,7 +2326,7 @@ Returns the number of spaces and ``tab * tab_size`` before the first char. .. rst-class:: classref-method -:ref:`int<class_int>` **get_last_full_visible_line** **(** **)** |const| +:ref:`int<class_int>` **get_last_full_visible_line**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_last_full_visible_line>` Returns the last visible line. Use :ref:`get_last_full_visible_line_wrap_index<class_TextEdit_method_get_last_full_visible_line_wrap_index>` for the wrap index. @@ -2138,7 +2338,7 @@ Returns the last visible line. Use :ref:`get_last_full_visible_line_wrap_index<c .. rst-class:: classref-method -:ref:`int<class_int>` **get_last_full_visible_line_wrap_index** **(** **)** |const| +:ref:`int<class_int>` **get_last_full_visible_line_wrap_index**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_last_full_visible_line_wrap_index>` Returns the last visible wrap index of the last visible line. @@ -2150,7 +2350,7 @@ Returns the last visible wrap index of the last visible line. .. rst-class:: classref-method -:ref:`int<class_int>` **get_last_unhidden_line** **(** **)** |const| +:ref:`int<class_int>` **get_last_unhidden_line**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_last_unhidden_line>` Returns the last unhidden line in the entire **TextEdit**. @@ -2162,7 +2362,7 @@ Returns the last unhidden line in the entire **TextEdit**. .. rst-class:: classref-method -:ref:`String<class_String>` **get_line** **(** :ref:`int<class_int>` line **)** |const| +:ref:`String<class_String>` **get_line**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line>` Returns the text of a specific line. @@ -2174,7 +2374,7 @@ Returns the text of a specific line. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_line_background_color** **(** :ref:`int<class_int>` line **)** |const| +:ref:`Color<class_Color>` **get_line_background_color**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_background_color>` Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is returned if no color is set. @@ -2186,7 +2386,7 @@ Returns the current background color of the line. ``Color(0, 0, 0, 0)`` is retur .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_line_column_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position, :ref:`bool<class_bool>` allow_out_of_bounds=true **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_line_column_at_pos**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, allow_out_of_bounds\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_column_at_pos>` Returns the line and column at the given position. In the returned vector, ``x`` is the column, ``y`` is the line. If ``allow_out_of_bounds`` is ``false`` and the position is not over the text, both vector values will be set to ``-1``. @@ -2198,7 +2398,7 @@ Returns the line and column at the given position. In the returned vector, ``x`` .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_count>` Returns the number of lines in the text. @@ -2210,9 +2410,9 @@ Returns the number of lines in the text. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_line_gutter_icon**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_gutter_icon>` -Returns the icon currently in ``gutter`` at ``line``. +Returns the icon currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON<class_TextEdit_constant_GUTTER_TYPE_ICON>` (see :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`). .. rst-class:: classref-item-separator @@ -2222,7 +2422,7 @@ Returns the icon currently in ``gutter`` at ``line``. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| +:ref:`Color<class_Color>` **get_line_gutter_item_color**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_gutter_item_color>` Returns the color currently in ``gutter`` at ``line``. @@ -2234,7 +2434,7 @@ Returns the color currently in ``gutter`` at ``line``. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| +:ref:`Variant<class_Variant>` **get_line_gutter_metadata**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_gutter_metadata>` Returns the metadata currently in ``gutter`` at ``line``. @@ -2246,9 +2446,9 @@ Returns the metadata currently in ``gutter`` at ``line``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| +:ref:`String<class_String>` **get_line_gutter_text**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_gutter_text>` -Returns the text currently in ``gutter`` at ``line``. +Returns the text currently in ``gutter`` at ``line``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING<class_TextEdit_constant_GUTTER_TYPE_STRING>` (see :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`). .. rst-class:: classref-item-separator @@ -2258,7 +2458,7 @@ Returns the text currently in ``gutter`` at ``line``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_height** **(** **)** |const| +:ref:`int<class_int>` **get_line_height**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_height>` Returns the maximum value of the line height among all lines. @@ -2268,11 +2468,25 @@ Returns the maximum value of the line height among all lines. ---- +.. _class_TextEdit_method_get_line_ranges_from_carets: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_line_ranges_from_carets**\ (\ only_selections\: :ref:`bool<class_bool>` = false, merge_adjacent\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_ranges_from_carets>` + +Returns an :ref:`Array<class_Array>` of line ranges where ``x`` is the first line and ``y`` is the last line. All lines within these ranges will have a caret on them or be part of a selection. Each line will only be part of one line range, even if it has multiple carets on it. + +If a selection's end column (:ref:`get_selection_to_column<class_TextEdit_method_get_selection_to_column>`) is at column ``0``, that line will not be included. If a selection begins on the line after another selection ends and ``merge_adjacent`` is ``true``, or they begin and end on the same line, one line range will include both selections. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_line_width: .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_width** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=-1 **)** |const| +:ref:`int<class_int>` **get_line_width**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_width>` Returns the width in pixels of the ``wrap_index`` on ``line``. @@ -2284,7 +2498,7 @@ Returns the width in pixels of the ``wrap_index`` on ``line``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_wrap_count** **(** :ref:`int<class_int>` line **)** |const| +:ref:`int<class_int>` **get_line_wrap_count**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_wrap_count>` Returns the number of times the given line is wrapped. @@ -2296,7 +2510,7 @@ Returns the number of times the given line is wrapped. .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_wrap_index_at_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_line_wrap_index_at_column**\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_wrap_index_at_column>` Returns the wrap index of the given line column. @@ -2308,7 +2522,7 @@ Returns the wrap index of the given line column. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_line_wrapped_text** **(** :ref:`int<class_int>` line **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_line_wrapped_text**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_line_wrapped_text>` Returns an array of :ref:`String<class_String>`\ s representing each wrapped index. @@ -2320,7 +2534,7 @@ Returns an array of :ref:`String<class_String>`\ s representing each wrapped ind .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_local_mouse_pos** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_local_mouse_pos**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_local_mouse_pos>` Returns the local mouse position adjusted for the text direction. @@ -2332,7 +2546,7 @@ Returns the local mouse position adjusted for the text direction. .. rst-class:: classref-method -:ref:`PopupMenu<class_PopupMenu>` **get_menu** **(** **)** |const| +:ref:`PopupMenu<class_PopupMenu>` **get_menu**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_menu>` Returns the :ref:`PopupMenu<class_PopupMenu>` of this **TextEdit**. By default, this menu is displayed when right-clicking on the **TextEdit**. @@ -2391,7 +2605,7 @@ You can add custom menu items or remove standard ones. Make sure your IDs don't .. rst-class:: classref-method -:ref:`int<class_int>` **get_minimap_line_at_pos** **(** :ref:`Vector2i<class_Vector2i>` position **)** |const| +:ref:`int<class_int>` **get_minimap_line_at_pos**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_minimap_line_at_pos>` Returns the equivalent minimap line at ``position``. @@ -2403,7 +2617,7 @@ Returns the equivalent minimap line at ``position``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_minimap_visible_lines** **(** **)** |const| +:ref:`int<class_int>` **get_minimap_visible_lines**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_minimap_visible_lines>` Returns the number of lines that may be drawn on the minimap. @@ -2415,7 +2629,7 @@ Returns the number of lines that may be drawn on the minimap. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_next_visible_line_index_offset_from** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index, :ref:`int<class_int>` visible_amount **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_next_visible_line_index_offset_from**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>`, visible_amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_next_visible_line_index_offset_from>` Similar to :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_next_visible_line_offset_from>`, but takes into account the line wrap indexes. In the returned vector, ``x`` is the line, ``y`` is the wrap index. @@ -2427,7 +2641,7 @@ Similar to :ref:`get_next_visible_line_offset_from<class_TextEdit_method_get_nex .. rst-class:: classref-method -:ref:`int<class_int>` **get_next_visible_line_offset_from** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` visible_amount **)** |const| +:ref:`int<class_int>` **get_next_visible_line_offset_from**\ (\ line\: :ref:`int<class_int>`, visible_amount\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_next_visible_line_offset_from>` Returns the count to the next visible line from ``line`` to ``line + visible_amount``. Can also count backwards. For example if a **TextEdit** has 5 lines with lines 2 and 3 hidden, calling this with ``line = 1, visible_amount = 1`` would return 3. @@ -2439,7 +2653,7 @@ Returns the count to the next visible line from ``line`` to ``line + visible_amo .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_pos_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_pos_at_line_column**\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_pos_at_line_column>` Returns the local position for the given ``line`` and ``column``. If ``x`` or ``y`` of the returned vector equal ``-1``, the position is outside of the viewable area of the control. @@ -2453,7 +2667,7 @@ Returns the local position for the given ``line`` and ``column``. If ``x`` or `` .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **get_rect_at_line_column** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` column **)** |const| +:ref:`Rect2i<class_Rect2i>` **get_rect_at_line_column**\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_rect_at_line_column>` Returns the local position and size for the grapheme at the given ``line`` and ``column``. If ``x`` or ``y`` position of the returned rect equal ``-1``, the position is outside of the viewable area of the control. @@ -2467,7 +2681,7 @@ Returns the local position and size for the grapheme at the given ``line`` and ` .. rst-class:: classref-method -:ref:`int<class_int>` **get_saved_version** **(** **)** |const| +:ref:`int<class_int>` **get_saved_version**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_saved_version>` Returns the last tagged saved version from :ref:`tag_saved_version<class_TextEdit_method_tag_saved_version>`. @@ -2479,7 +2693,7 @@ Returns the last tagged saved version from :ref:`tag_saved_version<class_TextEdi .. rst-class:: classref-method -:ref:`float<class_float>` **get_scroll_pos_for_line** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** |const| +:ref:`float<class_float>` **get_scroll_pos_for_line**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_scroll_pos_for_line>` Returns the scroll position for ``wrap_index`` of ``line``. @@ -2491,7 +2705,7 @@ Returns the scroll position for ``wrap_index`` of ``line``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_selected_text** **(** :ref:`int<class_int>` caret_index=-1 **)** +:ref:`String<class_String>` **get_selected_text**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_get_selected_text>` Returns the text inside the selection of a caret, or all the carets if ``caret_index`` is its default value ``-1``. @@ -2499,11 +2713,27 @@ Returns the text inside the selection of a caret, or all the carets if ``caret_i ---- +.. _class_TextEdit_method_get_selection_at_line_column: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_selection_at_line_column**\ (\ line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`, include_edges\: :ref:`bool<class_bool>` = true, only_selections\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_at_line_column>` + +Returns the caret index of the selection at the given ``line`` and ``column``, or ``-1`` if there is none. + +If ``include_edges`` is ``false``, the position must be inside the selection and not at either end. If ``only_selections`` is ``false``, carets without a selection will also be considered. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_selection_column: .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_column**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_column>` + +**Deprecated:** Use :ref:`get_selection_origin_column<class_TextEdit_method_get_selection_origin_column>` instead. Returns the original start column of the selection. @@ -2515,9 +2745,9 @@ Returns the original start column of the selection. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_from_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_from_column**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_from_column>` -Returns the selection begin column. +Returns the selection begin column. Returns the caret column if there is no selection. .. rst-class:: classref-item-separator @@ -2527,9 +2757,9 @@ Returns the selection begin column. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_from_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_from_line**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_from_line>` -Returns the selection begin line. +Returns the selection begin line. Returns the caret line if there is no selection. .. rst-class:: classref-item-separator @@ -2539,7 +2769,9 @@ Returns the selection begin line. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_line**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_line>` + +**Deprecated:** Use :ref:`get_selection_origin_line<class_TextEdit_method_get_selection_origin_line>` instead. Returns the original start line of the selection. @@ -2551,7 +2783,7 @@ Returns the original start line of the selection. .. rst-class:: classref-method -:ref:`SelectionMode<enum_TextEdit_SelectionMode>` **get_selection_mode** **(** **)** |const| +:ref:`SelectionMode<enum_TextEdit_SelectionMode>` **get_selection_mode**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_mode>` Returns the current selection mode. @@ -2559,13 +2791,37 @@ Returns the current selection mode. ---- +.. _class_TextEdit_method_get_selection_origin_column: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_selection_origin_column**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_origin_column>` + +Returns the origin column of the selection. This is the opposite end from the caret. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_method_get_selection_origin_line: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_selection_origin_line**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_origin_line>` + +Returns the origin line of the selection. This is the opposite end from the caret. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_get_selection_to_column: .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_to_column** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_to_column**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_to_column>` -Returns the selection end column. +Returns the selection end column. Returns the caret column if there is no selection. .. rst-class:: classref-item-separator @@ -2575,9 +2831,23 @@ Returns the selection end column. .. rst-class:: classref-method -:ref:`int<class_int>` **get_selection_to_line** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`int<class_int>` **get_selection_to_line**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_get_selection_to_line>` + +Returns the selection end line. Returns the caret line if there is no selection. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_method_get_sorted_carets: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_sorted_carets**\ (\ include_ignored_carets\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TextEdit_method_get_sorted_carets>` + +Returns the carets sorted by selection beginning from lowest line and column to highest (from top to bottom of text). -Returns the selection end line. +If ``include_ignored_carets`` is ``false``, carets from :ref:`multicaret_edit_ignore_caret<class_TextEdit_method_multicaret_edit_ignore_caret>` will be ignored. .. rst-class:: classref-item-separator @@ -2587,7 +2857,7 @@ Returns the selection end line. .. rst-class:: classref-method -:ref:`int<class_int>` **get_tab_size** **(** **)** |const| +:ref:`int<class_int>` **get_tab_size**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_tab_size>` Returns the **TextEdit**'s' tab size. @@ -2599,7 +2869,7 @@ Returns the **TextEdit**'s' tab size. .. rst-class:: classref-method -:ref:`int<class_int>` **get_total_gutter_width** **(** **)** |const| +:ref:`int<class_int>` **get_total_gutter_width**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_total_gutter_width>` Returns the total width of all gutters and internal padding. @@ -2611,7 +2881,7 @@ Returns the total width of all gutters and internal padding. .. rst-class:: classref-method -:ref:`int<class_int>` **get_total_visible_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_total_visible_line_count**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_total_visible_line_count>` Returns the number of lines that may be drawn. @@ -2623,7 +2893,7 @@ Returns the number of lines that may be drawn. .. rst-class:: classref-method -:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar** **(** **)** |const| +:ref:`VScrollBar<class_VScrollBar>` **get_v_scroll_bar**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_v_scroll_bar>` Returns the :ref:`VScrollBar<class_VScrollBar>` of the **TextEdit**. @@ -2635,7 +2905,7 @@ Returns the :ref:`VScrollBar<class_VScrollBar>` of the **TextEdit**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_version** **(** **)** |const| +:ref:`int<class_int>` **get_version**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_version>` Returns the current version of the **TextEdit**. The version is a count of recorded operations by the undo/redo history. @@ -2647,7 +2917,7 @@ Returns the current version of the **TextEdit**. The version is a count of recor .. rst-class:: classref-method -:ref:`int<class_int>` **get_visible_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_visible_line_count**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_get_visible_line_count>` Returns the number of visible lines, including wrapped text. @@ -2659,7 +2929,7 @@ Returns the number of visible lines, including wrapped text. .. rst-class:: classref-method -:ref:`int<class_int>` **get_visible_line_count_in_range** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** |const| +:ref:`int<class_int>` **get_visible_line_count_in_range**\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_visible_line_count_in_range>` Returns the total number of visible + wrapped lines between the two lines. @@ -2671,7 +2941,7 @@ Returns the total number of visible + wrapped lines between the two lines. .. rst-class:: classref-method -:ref:`String<class_String>` **get_word_at_pos** **(** :ref:`Vector2<class_Vector2>` position **)** |const| +:ref:`String<class_String>` **get_word_at_pos**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TextEdit_method_get_word_at_pos>` Returns the word at ``position``. @@ -2683,7 +2953,7 @@ Returns the word at ``position``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_word_under_caret** **(** :ref:`int<class_int>` caret_index=-1 **)** |const| +:ref:`String<class_String>` **get_word_under_caret**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TextEdit_method_get_word_under_caret>` Returns a :ref:`String<class_String>` text with the word under the caret's location. @@ -2695,9 +2965,9 @@ Returns a :ref:`String<class_String>` text with the word under the caret's locat .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_ime_text** **(** **)** |const| +:ref:`bool<class_bool>` **has_ime_text**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_has_ime_text>` -Returns if the user has IME text. +Returns ``true`` if the user has text in the `Input Method Editor <https://en.wikipedia.org/wiki/Input_method>`__ (IME). .. rst-class:: classref-item-separator @@ -2707,7 +2977,7 @@ Returns if the user has IME text. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_redo** **(** **)** |const| +:ref:`bool<class_bool>` **has_redo**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_has_redo>` Returns ``true`` if a "redo" action is available. @@ -2719,7 +2989,7 @@ Returns ``true`` if a "redo" action is available. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_selection** **(** :ref:`int<class_int>` caret_index=-1 **)** |const| +:ref:`bool<class_bool>` **has_selection**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TextEdit_method_has_selection>` Returns ``true`` if the user has selected text. @@ -2731,7 +3001,7 @@ Returns ``true`` if the user has selected text. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_undo** **(** **)** |const| +:ref:`bool<class_bool>` **has_undo**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_has_undo>` Returns ``true`` if an "undo" action is available. @@ -2743,7 +3013,7 @@ Returns ``true`` if an "undo" action is available. .. rst-class:: classref-method -void **insert_line_at** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` text **)** +|void| **insert_line_at**\ (\ line\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextEdit_method_insert_line_at>` Inserts a new line with ``text`` at ``line``. @@ -2751,11 +3021,27 @@ Inserts a new line with ``text`` at ``line``. ---- +.. _class_TextEdit_method_insert_text: + +.. rst-class:: classref-method + +|void| **insert_text**\ (\ text\: :ref:`String<class_String>`, line\: :ref:`int<class_int>`, column\: :ref:`int<class_int>`, before_selection_begin\: :ref:`bool<class_bool>` = true, before_selection_end\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TextEdit_method_insert_text>` + +Inserts the ``text`` at ``line`` and ``column``. + +If ``before_selection_begin`` is ``true``, carets and selections that begin at ``line`` and ``column`` will moved to the end of the inserted text, along with all carets after it. + +If ``before_selection_end`` is ``true``, selections that end at ``line`` and ``column`` will be extended to the end of the inserted text. These parameters can be used to insert text inside of or outside of selections. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_insert_text_at_caret: .. rst-class:: classref-method -void **insert_text_at_caret** **(** :ref:`String<class_String>` text, :ref:`int<class_int>` caret_index=-1 **)** +|void| **insert_text_at_caret**\ (\ text\: :ref:`String<class_String>`, caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_insert_text_at_caret>` Insert the specified text at the caret position. @@ -2763,11 +3049,23 @@ Insert the specified text at the caret position. ---- +.. _class_TextEdit_method_is_caret_after_selection_origin: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_caret_after_selection_origin**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_is_caret_after_selection_origin>` + +Returns ``true`` if the caret of the selection is after the selection origin. This can be used to determine the direction of the selection. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_is_caret_visible: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_caret_visible** **(** :ref:`int<class_int>` caret_index=0 **)** |const| +:ref:`bool<class_bool>` **is_caret_visible**\ (\ caret_index\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextEdit_method_is_caret_visible>` Returns ``true`` if the caret is visible on the screen. @@ -2779,9 +3077,9 @@ Returns ``true`` if the caret is visible on the screen. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_dragging_cursor** **(** **)** |const| +:ref:`bool<class_bool>` **is_dragging_cursor**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_is_dragging_cursor>` -Returns ``true`` if the user is dragging their mouse for scrolling or selecting. +Returns ``true`` if the user is dragging their mouse for scrolling, selecting, or text dragging. .. rst-class:: classref-item-separator @@ -2791,7 +3089,7 @@ Returns ``true`` if the user is dragging their mouse for scrolling or selecting. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_gutter_clickable** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`bool<class_bool>` **is_gutter_clickable**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_is_gutter_clickable>` Returns whether the gutter is clickable. @@ -2803,7 +3101,7 @@ Returns whether the gutter is clickable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_gutter_drawn** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`bool<class_bool>` **is_gutter_drawn**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_is_gutter_drawn>` Returns whether the gutter is currently drawn. @@ -2815,7 +3113,7 @@ Returns whether the gutter is currently drawn. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_gutter_overwritable** **(** :ref:`int<class_int>` gutter **)** |const| +:ref:`bool<class_bool>` **is_gutter_overwritable**\ (\ gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_is_gutter_overwritable>` Returns whether the gutter is overwritable. @@ -2823,11 +3121,23 @@ Returns whether the gutter is overwritable. ---- +.. _class_TextEdit_method_is_in_mulitcaret_edit: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_in_mulitcaret_edit**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_is_in_mulitcaret_edit>` + +Returns ``true`` if a :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>` has been called and :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>` has not yet been called. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_is_line_gutter_clickable: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter **)** |const| +:ref:`bool<class_bool>` **is_line_gutter_clickable**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_is_line_gutter_clickable>` Returns whether the gutter on the given line is clickable. @@ -2839,7 +3149,7 @@ Returns whether the gutter on the given line is clickable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_line_wrapped** **(** :ref:`int<class_int>` line **)** |const| +:ref:`bool<class_bool>` **is_line_wrapped**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_is_line_wrapped>` Returns if the given line is wrapped. @@ -2851,7 +3161,7 @@ Returns if the given line is wrapped. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_menu_visible** **(** **)** |const| +:ref:`bool<class_bool>` **is_menu_visible**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_is_menu_visible>` Returns whether the menu is visible. Use this instead of ``get_menu().visible`` to improve performance (so the creation of the menu is avoided). @@ -2863,7 +3173,7 @@ Returns whether the menu is visible. Use this instead of ``get_menu().visible`` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_mouse_over_selection** **(** :ref:`bool<class_bool>` edges, :ref:`int<class_int>` caret_index=-1 **)** |const| +:ref:`bool<class_bool>` **is_mouse_over_selection**\ (\ edges\: :ref:`bool<class_bool>`, caret_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TextEdit_method_is_mouse_over_selection>` Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges are considered part of the selection. @@ -2875,7 +3185,7 @@ Returns whether the mouse is over selection. If ``edges`` is ``true``, the edges .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_overtype_mode_enabled** **(** **)** |const| +:ref:`bool<class_bool>` **is_overtype_mode_enabled**\ (\ ) |const| :ref:`🔗<class_TextEdit_method_is_overtype_mode_enabled>` Returns whether the user is in overtype mode. @@ -2887,7 +3197,7 @@ Returns whether the user is in overtype mode. .. rst-class:: classref-method -void **menu_option** **(** :ref:`int<class_int>` option **)** +|void| **menu_option**\ (\ option\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_menu_option>` Executes a given action as defined in the :ref:`MenuItems<enum_TextEdit_MenuItems>` enum. @@ -2899,7 +3209,7 @@ Executes a given action as defined in the :ref:`MenuItems<enum_TextEdit_MenuItem .. rst-class:: classref-method -void **merge_gutters** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** +|void| **merge_gutters**\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_merge_gutters>` Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters will be copied. @@ -2911,23 +3221,39 @@ Merge the gutters from ``from_line`` into ``to_line``. Only overwritable gutters .. rst-class:: classref-method -void **merge_overlapping_carets** **(** **)** +|void| **merge_overlapping_carets**\ (\ ) :ref:`🔗<class_TextEdit_method_merge_overlapping_carets>` Merges any overlapping carets. Will favor the newest caret, or the caret with a selection. +If :ref:`is_in_mulitcaret_edit<class_TextEdit_method_is_in_mulitcaret_edit>` is ``true``, the merge will be queued to happen at the end of the multicaret edit. See :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>` and :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>`. + \ **Note:** This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap. .. rst-class:: classref-item-separator ---- +.. _class_TextEdit_method_multicaret_edit_ignore_caret: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **multicaret_edit_ignore_caret**\ (\ caret_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_multicaret_edit_ignore_caret>` + +Returns ``true`` if the given ``caret_index`` should be ignored as part of a multicaret edit. See :ref:`begin_multicaret_edit<class_TextEdit_method_begin_multicaret_edit>` and :ref:`end_multicaret_edit<class_TextEdit_method_end_multicaret_edit>`. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit. + +It is recommended to ``continue`` within a loop iterating on multiple carets if a caret should be ignored. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_paste: .. rst-class:: classref-method -void **paste** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **paste**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_paste>` -Paste at the current location. Can be overridden with :ref:`_paste<class_TextEdit_method__paste>`. +Paste at the current location. Can be overridden with :ref:`_paste<class_TextEdit_private_method__paste>`. .. rst-class:: classref-item-separator @@ -2937,7 +3263,7 @@ Paste at the current location. Can be overridden with :ref:`_paste<class_TextEdi .. rst-class:: classref-method -void **paste_primary_clipboard** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **paste_primary_clipboard**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_paste_primary_clipboard>` Pastes the primary clipboard. @@ -2949,7 +3275,7 @@ Pastes the primary clipboard. .. rst-class:: classref-method -void **redo** **(** **)** +|void| **redo**\ (\ ) :ref:`🔗<class_TextEdit_method_redo>` Perform redo operation. @@ -2961,7 +3287,7 @@ Perform redo operation. .. rst-class:: classref-method -void **remove_caret** **(** :ref:`int<class_int>` caret **)** +|void| **remove_caret**\ (\ caret\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_remove_caret>` Removes the given caret index. @@ -2975,7 +3301,7 @@ Removes the given caret index. .. rst-class:: classref-method -void **remove_gutter** **(** :ref:`int<class_int>` gutter **)** +|void| **remove_gutter**\ (\ gutter\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_remove_gutter>` Removes the gutter from this **TextEdit**. @@ -2983,11 +3309,25 @@ Removes the gutter from this **TextEdit**. ---- +.. _class_TextEdit_method_remove_line_at: + +.. rst-class:: classref-method + +|void| **remove_line_at**\ (\ line\: :ref:`int<class_int>`, move_carets_down\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TextEdit_method_remove_line_at>` + +Removes the line of text at ``line``. Carets on this line will attempt to match their previous visual x position. + +If ``move_carets_down`` is ``true`` carets will move to the next line down, otherwise carets will move up. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_remove_secondary_carets: .. rst-class:: classref-method -void **remove_secondary_carets** **(** **)** +|void| **remove_secondary_carets**\ (\ ) :ref:`🔗<class_TextEdit_method_remove_secondary_carets>` Removes all additional carets. @@ -2999,12 +3339,10 @@ Removes all additional carets. .. rst-class:: classref-method -void **remove_text** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column **)** +|void| **remove_text**\ (\ from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`, to_column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_remove_text>` Removes text between the given positions. -\ **Note:** This does not adjust the caret or selection, which as a result it can end up in an invalid position. - .. rst-class:: classref-item-separator ---- @@ -3013,7 +3351,7 @@ Removes text between the given positions. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **search** **(** :ref:`String<class_String>` text, :ref:`int<class_int>` flags, :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_colum **)** |const| +:ref:`Vector2i<class_Vector2i>` **search**\ (\ text\: :ref:`String<class_String>`, flags\: :ref:`int<class_int>`, from_line\: :ref:`int<class_int>`, from_column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextEdit_method_search>` Perform a search inside the text. Search flags can be specified in the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum. @@ -3050,12 +3388,14 @@ In the returned vector, ``x`` is the column, ``y`` is the line. If no results ar .. rst-class:: classref-method -void **select** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` from_column, :ref:`int<class_int>` to_line, :ref:`int<class_int>` to_column, :ref:`int<class_int>` caret_index=0 **)** +|void| **select**\ (\ origin_line\: :ref:`int<class_int>`, origin_column\: :ref:`int<class_int>`, caret_line\: :ref:`int<class_int>`, caret_column\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_select>` -Perform selection, from line/column to line/column. +Selects text from ``origin_line`` and ``origin_column`` to ``caret_line`` and ``caret_column`` for the given ``caret_index``. This moves the selection origin and the caret. If the positions are the same, the selection will be deselected. If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``false``, no selection will occur. +\ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>`. + .. rst-class:: classref-item-separator ---- @@ -3064,7 +3404,7 @@ If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``fals .. rst-class:: classref-method -void **select_all** **(** **)** +|void| **select_all**\ (\ ) :ref:`🔗<class_TextEdit_method_select_all>` Select all the text. @@ -3078,7 +3418,7 @@ If :ref:`selecting_enabled<class_TextEdit_property_selecting_enabled>` is ``fals .. rst-class:: classref-method -void **select_word_under_caret** **(** :ref:`int<class_int>` caret_index=-1 **)** +|void| **select_word_under_caret**\ (\ caret_index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TextEdit_method_select_word_under_caret>` Selects the word under the caret. @@ -3090,7 +3430,7 @@ Selects the word under the caret. .. rst-class:: classref-method -void **set_caret_column** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`int<class_int>` caret_index=0 **)** +|void| **set_caret_column**\ (\ column\: :ref:`int<class_int>`, adjust_viewport\: :ref:`bool<class_bool>` = true, caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_caret_column>` Moves the caret to the specified ``column`` index. @@ -3106,14 +3446,16 @@ If ``adjust_viewport`` is ``true``, the viewport will center at the caret positi .. rst-class:: classref-method -void **set_caret_line** **(** :ref:`int<class_int>` line, :ref:`bool<class_bool>` adjust_viewport=true, :ref:`bool<class_bool>` can_be_hidden=true, :ref:`int<class_int>` wrap_index=0, :ref:`int<class_int>` caret_index=0 **)** +|void| **set_caret_line**\ (\ line\: :ref:`int<class_int>`, adjust_viewport\: :ref:`bool<class_bool>` = true, can_be_hidden\: :ref:`bool<class_bool>` = true, wrap_index\: :ref:`int<class_int>` = 0, caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_caret_line>` -Moves the caret to the specified ``line`` index. +Moves the caret to the specified ``line`` index. The caret column will be moved to the same visual position it was at the last time :ref:`set_caret_column<class_TextEdit_method_set_caret_column>` was called, or clamped to the end of the line. If ``adjust_viewport`` is ``true``, the viewport will center at the caret position after the move occurs. If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden. +If ``wrap_index`` is ``-1``, the caret column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_caret_column<class_TextEdit_method_set_caret_column>` was called. + \ **Note:** If supporting multiple carets this will not check for any overlap. See :ref:`merge_overlapping_carets<class_TextEdit_method_merge_overlapping_carets>`. .. rst-class:: classref-item-separator @@ -3124,7 +3466,7 @@ If ``can_be_hidden`` is ``true``, the specified ``line`` can be hidden. .. rst-class:: classref-method -void **set_gutter_clickable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** +|void| **set_gutter_clickable**\ (\ gutter\: :ref:`int<class_int>`, clickable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_clickable>` Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. @@ -3136,9 +3478,9 @@ Sets the gutter as clickable. This will change the mouse cursor to a pointing ha .. rst-class:: classref-method -void **set_gutter_custom_draw** **(** :ref:`int<class_int>` column, :ref:`Callable<class_Callable>` draw_callback **)** +|void| **set_gutter_custom_draw**\ (\ column\: :ref:`int<class_int>`, draw_callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_custom_draw>` -Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``. +Set a custom draw method for the gutter. The callback method must take the following args: ``line: int, gutter: int, Area: Rect2``. This only works when the gutter type is :ref:`GUTTER_TYPE_CUSTOM<class_TextEdit_constant_GUTTER_TYPE_CUSTOM>` (see :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`). .. rst-class:: classref-item-separator @@ -3148,7 +3490,7 @@ Set a custom draw method for the gutter. The callback method must take the follo .. rst-class:: classref-method -void **set_gutter_draw** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` draw **)** +|void| **set_gutter_draw**\ (\ gutter\: :ref:`int<class_int>`, draw\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_draw>` Sets whether the gutter should be drawn. @@ -3160,7 +3502,7 @@ Sets whether the gutter should be drawn. .. rst-class:: classref-method -void **set_gutter_name** **(** :ref:`int<class_int>` gutter, :ref:`String<class_String>` name **)** +|void| **set_gutter_name**\ (\ gutter\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_name>` Sets the name of the gutter. @@ -3172,7 +3514,7 @@ Sets the name of the gutter. .. rst-class:: classref-method -void **set_gutter_overwritable** **(** :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` overwritable **)** +|void| **set_gutter_overwritable**\ (\ gutter\: :ref:`int<class_int>`, overwritable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_overwritable>` Sets the gutter to overwritable. See :ref:`merge_gutters<class_TextEdit_method_merge_gutters>`. @@ -3184,9 +3526,9 @@ Sets the gutter to overwritable. See :ref:`merge_gutters<class_TextEdit_method_m .. rst-class:: classref-method -void **set_gutter_type** **(** :ref:`int<class_int>` gutter, :ref:`GutterType<enum_TextEdit_GutterType>` type **)** +|void| **set_gutter_type**\ (\ gutter\: :ref:`int<class_int>`, type\: :ref:`GutterType<enum_TextEdit_GutterType>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_type>` -Sets the type of gutter. +Sets the type of gutter. Gutters can contain icons, text, or custom visuals. See :ref:`GutterType<enum_TextEdit_GutterType>` for options. .. rst-class:: classref-item-separator @@ -3196,7 +3538,7 @@ Sets the type of gutter. .. rst-class:: classref-method -void **set_gutter_width** **(** :ref:`int<class_int>` gutter, :ref:`int<class_int>` width **)** +|void| **set_gutter_width**\ (\ gutter\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_set_gutter_width>` Set the width of the gutter. @@ -3208,9 +3550,11 @@ Set the width of the gutter. .. rst-class:: classref-method -void **set_line** **(** :ref:`int<class_int>` line, :ref:`String<class_String>` new_text **)** +|void| **set_line**\ (\ line\: :ref:`int<class_int>`, new_text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextEdit_method_set_line>` -Sets the text for a specific line. +Sets the text for a specific ``line``. + +Carets on the line will attempt to keep their visual x position. .. rst-class:: classref-item-separator @@ -3220,7 +3564,7 @@ Sets the text for a specific line. .. rst-class:: classref-method -void **set_line_as_center_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** +|void| **set_line_as_center_visible**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_line_as_center_visible>` Positions the ``wrap_index`` of ``line`` at the center of the viewport. @@ -3232,7 +3576,7 @@ Positions the ``wrap_index`` of ``line`` at the center of the viewport. .. rst-class:: classref-method -void **set_line_as_first_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** +|void| **set_line_as_first_visible**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_line_as_first_visible>` Positions the ``wrap_index`` of ``line`` at the top of the viewport. @@ -3244,7 +3588,7 @@ Positions the ``wrap_index`` of ``line`` at the top of the viewport. .. rst-class:: classref-method -void **set_line_as_last_visible** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` wrap_index=0 **)** +|void| **set_line_as_last_visible**\ (\ line\: :ref:`int<class_int>`, wrap_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_line_as_last_visible>` Positions the ``wrap_index`` of ``line`` at the bottom of the viewport. @@ -3256,7 +3600,7 @@ Positions the ``wrap_index`` of ``line`` at the bottom of the viewport. .. rst-class:: classref-method -void **set_line_background_color** **(** :ref:`int<class_int>` line, :ref:`Color<class_Color>` color **)** +|void| **set_line_background_color**\ (\ line\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TextEdit_method_set_line_background_color>` Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for no color. @@ -3268,7 +3612,7 @@ Sets the current background color of the line. Set to ``Color(0, 0, 0, 0)`` for .. rst-class:: classref-method -void **set_line_gutter_clickable** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`bool<class_bool>` clickable **)** +|void| **set_line_gutter_clickable**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, clickable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_set_line_gutter_clickable>` If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :ref:`gutter_clicked<class_TextEdit_signal_gutter_clicked>`. @@ -3280,9 +3624,9 @@ If ``clickable`` is ``true``, makes the ``gutter`` on ``line`` clickable. See :r .. rst-class:: classref-method -void **set_line_gutter_icon** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Texture2D<class_Texture2D>` icon **)** +|void| **set_line_gutter_icon**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TextEdit_method_set_line_gutter_icon>` -Sets the icon for ``gutter`` on ``line`` to ``icon``. +Sets the icon for ``gutter`` on ``line`` to ``icon``. This only works when the gutter type is :ref:`GUTTER_TYPE_ICON<class_TextEdit_constant_GUTTER_TYPE_ICON>` (see :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`). .. rst-class:: classref-item-separator @@ -3292,7 +3636,7 @@ Sets the icon for ``gutter`` on ``line`` to ``icon``. .. rst-class:: classref-method -void **set_line_gutter_item_color** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Color<class_Color>` color **)** +|void| **set_line_gutter_item_color**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TextEdit_method_set_line_gutter_item_color>` Sets the color for ``gutter`` on ``line`` to ``color``. @@ -3304,7 +3648,7 @@ Sets the color for ``gutter`` on ``line`` to ``color``. .. rst-class:: classref-method -void **set_line_gutter_metadata** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`Variant<class_Variant>` metadata **)** +|void| **set_line_gutter_metadata**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, metadata\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TextEdit_method_set_line_gutter_metadata>` Sets the metadata for ``gutter`` on ``line`` to ``metadata``. @@ -3316,9 +3660,9 @@ Sets the metadata for ``gutter`` on ``line`` to ``metadata``. .. rst-class:: classref-method -void **set_line_gutter_text** **(** :ref:`int<class_int>` line, :ref:`int<class_int>` gutter, :ref:`String<class_String>` text **)** +|void| **set_line_gutter_text**\ (\ line\: :ref:`int<class_int>`, gutter\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextEdit_method_set_line_gutter_text>` -Sets the text for ``gutter`` on ``line`` to ``text``. +Sets the text for ``gutter`` on ``line`` to ``text``. This only works when the gutter type is :ref:`GUTTER_TYPE_STRING<class_TextEdit_constant_GUTTER_TYPE_STRING>` (see :ref:`set_gutter_type<class_TextEdit_method_set_gutter_type>`). .. rst-class:: classref-item-separator @@ -3328,7 +3672,7 @@ Sets the text for ``gutter`` on ``line`` to ``text``. .. rst-class:: classref-method -void **set_overtype_mode_enabled** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_overtype_mode_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextEdit_method_set_overtype_mode_enabled>` If ``true``, sets the user into overtype mode. When the user types in this mode, it will override existing text. @@ -3340,7 +3684,7 @@ If ``true``, sets the user into overtype mode. When the user types in this mode, .. rst-class:: classref-method -void **set_search_flags** **(** :ref:`int<class_int>` flags **)** +|void| **set_search_flags**\ (\ flags\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_set_search_flags>` Sets the search ``flags``. This is used with :ref:`set_search_text<class_TextEdit_method_set_search_text>` to highlight occurrences of the searched text. Search flags can be specified from the :ref:`SearchFlags<enum_TextEdit_SearchFlags>` enum. @@ -3352,7 +3696,7 @@ Sets the search ``flags``. This is used with :ref:`set_search_text<class_TextEdi .. rst-class:: classref-method -void **set_search_text** **(** :ref:`String<class_String>` search_text **)** +|void| **set_search_text**\ (\ search_text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextEdit_method_set_search_text>` Sets the search text. See :ref:`set_search_flags<class_TextEdit_method_set_search_flags>`. @@ -3364,7 +3708,7 @@ Sets the search text. See :ref:`set_search_flags<class_TextEdit_method_set_searc .. rst-class:: classref-method -void **set_selection_mode** **(** :ref:`SelectionMode<enum_TextEdit_SelectionMode>` mode, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=-1, :ref:`int<class_int>` caret_index=0 **)** +|void| **set_selection_mode**\ (\ mode\: :ref:`SelectionMode<enum_TextEdit_SelectionMode>`\ ) :ref:`🔗<class_TextEdit_method_set_selection_mode>` Sets the current selection mode. @@ -3372,11 +3716,39 @@ Sets the current selection mode. ---- +.. _class_TextEdit_method_set_selection_origin_column: + +.. rst-class:: classref-method + +|void| **set_selection_origin_column**\ (\ column\: :ref:`int<class_int>`, caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_selection_origin_column>` + +Sets the selection origin column to the ``column`` for the given ``caret_index``. If the selection origin is moved to the caret position, the selection will deselect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextEdit_method_set_selection_origin_line: + +.. rst-class:: classref-method + +|void| **set_selection_origin_line**\ (\ line\: :ref:`int<class_int>`, can_be_hidden\: :ref:`bool<class_bool>` = true, wrap_index\: :ref:`int<class_int>` = -1, caret_index\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TextEdit_method_set_selection_origin_line>` + +Sets the selection origin line to the ``line`` for the given ``caret_index``. If the selection origin is moved to the caret position, the selection will deselect. + +If ``can_be_hidden`` is ``false``, The line will be set to the nearest unhidden line below or above. + +If ``wrap_index`` is ``-1``, the selection origin column will be clamped to the ``line``'s length. If ``wrap_index`` is greater than ``-1``, the column will be moved to attempt to match the visual x position on the line's ``wrap_index`` to the position from the last time :ref:`set_selection_origin_column<class_TextEdit_method_set_selection_origin_column>` or :ref:`select<class_TextEdit_method_select>` was called. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_set_tab_size: .. rst-class:: classref-method -void **set_tab_size** **(** :ref:`int<class_int>` size **)** +|void| **set_tab_size**\ (\ size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_set_tab_size>` Sets the tab size for the **TextEdit** to use. @@ -3388,7 +3760,7 @@ Sets the tab size for the **TextEdit** to use. .. rst-class:: classref-method -void **set_tooltip_request_func** **(** :ref:`Callable<class_Callable>` callback **)** +|void| **set_tooltip_request_func**\ (\ callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_TextEdit_method_set_tooltip_request_func>` Provide custom tooltip text. The callback method must take the following args: ``hovered_word: String``. @@ -3396,11 +3768,23 @@ Provide custom tooltip text. The callback method must take the following args: ` ---- +.. _class_TextEdit_method_skip_selection_for_next_occurrence: + +.. rst-class:: classref-method + +|void| **skip_selection_for_next_occurrence**\ (\ ) :ref:`🔗<class_TextEdit_method_skip_selection_for_next_occurrence>` + +Moves a selection and a caret for the next occurrence of the current selection. If there is no active selection, moves to the next occurrence of the word under caret. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextEdit_method_start_action: .. rst-class:: classref-method -void **start_action** **(** :ref:`EditAction<enum_TextEdit_EditAction>` action **)** +|void| **start_action**\ (\ action\: :ref:`EditAction<enum_TextEdit_EditAction>`\ ) :ref:`🔗<class_TextEdit_method_start_action>` Starts an action, will end the current action if ``action`` is different. @@ -3414,9 +3798,9 @@ An action will also end after a call to :ref:`end_action<class_TextEdit_method_e .. rst-class:: classref-method -void **swap_lines** **(** :ref:`int<class_int>` from_line, :ref:`int<class_int>` to_line **)** +|void| **swap_lines**\ (\ from_line\: :ref:`int<class_int>`, to_line\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextEdit_method_swap_lines>` -Swaps the two lines. +Swaps the two lines. Carets will be swapped with the lines. .. rst-class:: classref-item-separator @@ -3426,7 +3810,7 @@ Swaps the two lines. .. rst-class:: classref-method -void **tag_saved_version** **(** **)** +|void| **tag_saved_version**\ (\ ) :ref:`🔗<class_TextEdit_method_tag_saved_version>` Tag the current version as saved. @@ -3438,7 +3822,7 @@ Tag the current version as saved. .. rst-class:: classref-method -void **undo** **(** **)** +|void| **undo**\ (\ ) :ref:`🔗<class_TextEdit_method_undo>` Perform undo operation. @@ -3455,7 +3839,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **background_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_TextEdit_theme_color_background_color>` Sets the background :ref:`Color<class_Color>` of this **TextEdit**. @@ -3467,7 +3851,7 @@ Sets the background :ref:`Color<class_Color>` of this **TextEdit**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **caret_background_color** = ``Color(0, 0, 0, 1)`` +:ref:`Color<class_Color>` **caret_background_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_TextEdit_theme_color_caret_background_color>` :ref:`Color<class_Color>` of the text behind the caret when using a block caret. @@ -3479,7 +3863,7 @@ Sets the background :ref:`Color<class_Color>` of this **TextEdit**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_TextEdit_theme_color_caret_color>` :ref:`Color<class_Color>` of the caret. This can be set to a fully transparent color to hide the caret entirely. @@ -3491,7 +3875,7 @@ Sets the background :ref:`Color<class_Color>` of this **TextEdit**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)`` +:ref:`Color<class_Color>` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)`` :ref:`🔗<class_TextEdit_theme_color_current_line_color>` Background :ref:`Color<class_Color>` of the line containing the caret. @@ -3503,7 +3887,7 @@ Background :ref:`Color<class_Color>` of the line containing the caret. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_TextEdit_theme_color_font_color>` Sets the font :ref:`Color<class_Color>`. @@ -3515,7 +3899,7 @@ Sets the font :ref:`Color<class_Color>`. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_TextEdit_theme_color_font_outline_color>` The tint of text outline of the **TextEdit**. @@ -3527,7 +3911,7 @@ The tint of text outline of the **TextEdit**. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` +:ref:`Color<class_Color>` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` :ref:`🔗<class_TextEdit_theme_color_font_placeholder_color>` Font color for :ref:`placeholder_text<class_TextEdit_property_placeholder_text>`. @@ -3539,7 +3923,7 @@ Font color for :ref:`placeholder_text<class_TextEdit_property_placeholder_text>` .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` +:ref:`Color<class_Color>` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_TextEdit_theme_color_font_readonly_color>` Sets the font :ref:`Color<class_Color>` when :ref:`editable<class_TextEdit_property_editable>` is disabled. @@ -3551,7 +3935,7 @@ Sets the font :ref:`Color<class_Color>` when :ref:`editable<class_TextEdit_prope .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_TextEdit_theme_color_font_selected_color>` Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, 0, 0, 0)``, it will be ignored. @@ -3563,7 +3947,7 @@ Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)`` +:ref:`Color<class_Color>` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)`` :ref:`🔗<class_TextEdit_theme_color_search_result_border_color>` :ref:`Color<class_Color>` of the border around text that matches the search query. @@ -3575,7 +3959,7 @@ Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)`` +:ref:`Color<class_Color>` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)`` :ref:`🔗<class_TextEdit_theme_color_search_result_color>` :ref:`Color<class_Color>` behind the text that matches the search query. @@ -3587,7 +3971,7 @@ Sets the :ref:`Color<class_Color>` of the selected text. If equal to ``Color(0, .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` +:ref:`Color<class_Color>` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` :ref:`🔗<class_TextEdit_theme_color_selection_color>` Sets the highlight :ref:`Color<class_Color>` of text selections. @@ -3599,7 +3983,7 @@ Sets the highlight :ref:`Color<class_Color>` of text selections. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **word_highlighted_color** = ``Color(0.5, 0.5, 0.5, 0.25)`` +:ref:`Color<class_Color>` **word_highlighted_color** = ``Color(0.5, 0.5, 0.5, 0.25)`` :ref:`🔗<class_TextEdit_theme_color_word_highlighted_color>` Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`highlight_all_occurrences<class_TextEdit_property_highlight_all_occurrences>` has to be enabled. @@ -3611,7 +3995,7 @@ Sets the highlight :ref:`Color<class_Color>` of multiple occurrences. :ref:`high .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **caret_width** = ``1`` +:ref:`int<class_int>` **caret_width** = ``1`` :ref:`🔗<class_TextEdit_theme_constant_caret_width>` The caret's width in pixels. Greater values can be used to improve accessibility by ensuring the caret is easily visible, or to ensure consistency with a large font size. If set to ``0`` or lower, the caret width is automatically set to 1 pixel and multiplied by the display scaling factor. @@ -3623,7 +4007,7 @@ The caret's width in pixels. Greater values can be used to improve accessibility .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **line_spacing** = ``4`` +:ref:`int<class_int>` **line_spacing** = ``4`` :ref:`🔗<class_TextEdit_theme_constant_line_spacing>` Sets the spacing between the lines. @@ -3635,7 +4019,7 @@ Sets the spacing between the lines. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_TextEdit_theme_constant_outline_size>` The size of the text outline. @@ -3649,7 +4033,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_TextEdit_theme_font_font>` Sets the default :ref:`Font<class_Font>`. @@ -3661,7 +4045,7 @@ Sets the default :ref:`Font<class_Font>`. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_TextEdit_theme_font_size_font_size>` Sets default font size. @@ -3673,7 +4057,7 @@ Sets default font size. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **space** +:ref:`Texture2D<class_Texture2D>` **space** :ref:`🔗<class_TextEdit_theme_icon_space>` Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters. @@ -3685,7 +4069,7 @@ Sets a custom :ref:`Texture2D<class_Texture2D>` for space text characters. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **tab** +:ref:`Texture2D<class_Texture2D>` **tab** :ref:`🔗<class_TextEdit_theme_icon_tab>` Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters. @@ -3697,9 +4081,9 @@ Sets a custom :ref:`Texture2D<class_Texture2D>` for tab text characters. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_TextEdit_theme_style_focus>` -Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The ``focus`` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. +Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The :ref:`focus<class_TextEdit_theme_style_focus>` :ref:`StyleBox<class_StyleBox>` is displayed *over* the base :ref:`StyleBox<class_StyleBox>`, so a partially transparent :ref:`StyleBox<class_StyleBox>` should be used to ensure the base :ref:`StyleBox<class_StyleBox>` remains visible. A :ref:`StyleBox<class_StyleBox>` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty<class_StyleBoxEmpty>` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. rst-class:: classref-item-separator @@ -3709,7 +4093,7 @@ Sets the :ref:`StyleBox<class_StyleBox>` when in focus. The ``focus`` :ref:`Styl .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **normal** +:ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_TextEdit_theme_style_normal>` Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit**. @@ -3721,7 +4105,7 @@ Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **read_only** +:ref:`StyleBox<class_StyleBox>` **read_only** :ref:`🔗<class_TextEdit_theme_style_read_only>` Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit** when :ref:`editable<class_TextEdit_property_editable>` is disabled. @@ -3732,3 +4116,4 @@ Sets the :ref:`StyleBox<class_StyleBox>` of this **TextEdit** when :ref:`editabl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textline.rst b/classes/class_textline.rst index f9c7092a718..b3b5896fea1 100644 --- a/classes/class_textline.rst +++ b/classes/class_textline.rst @@ -34,7 +34,9 @@ Properties +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Direction<enum_TextServer_Direction>` | :ref:`direction<class_TextLine_property_direction>` | ``0`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ - | |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`flags<class_TextLine_property_flags>` | ``3`` | + | :ref:`String<class_String>` | :ref:`ellipsis_char<class_TextLine_property_ellipsis_char>` | ``"…"`` | + +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`flags<class_TextLine_property_flags>` | ``3`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`orientation<class_TextLine_property_orientation>` | ``0`` | +---------------------------------------------------------------------------+-----------------------------------------------------------------------------+-----------+ @@ -55,43 +57,43 @@ Methods .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`add_object<class_TextLine_method_add_object>` **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`add_string<class_TextLine_method_add_string>` **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_TextLine_method_clear>` **(** **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw<class_TextLine_method_draw>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_outline<class_TextLine_method_draw_outline>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_ascent<class_TextLine_method_get_line_ascent>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_descent<class_TextLine_method_get_line_descent>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_underline_position<class_TextLine_method_get_line_underline_position>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_underline_thickness<class_TextLine_method_get_line_underline_thickness>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_width<class_TextLine_method_get_line_width>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_object_rect<class_TextLine_method_get_object_rect>` **(** :ref:`Variant<class_Variant>` key **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_objects<class_TextLine_method_get_objects>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_TextLine_method_get_rid>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_TextLine_method_get_size>` **(** **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hit_test<class_TextLine_method_hit_test>` **(** :ref:`float<class_float>` coords **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`resize_object<class_TextLine_method_resize_object>` **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bidi_override<class_TextLine_method_set_bidi_override>` **(** :ref:`Array<class_Array>` override **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tab_align<class_TextLine_method_tab_align>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`add_object<class_TextLine_method_add_object>`\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`add_string<class_TextLine_method_add_string>`\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TextLine_method_clear>`\ (\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw<class_TextLine_method_draw>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_outline<class_TextLine_method_draw_outline>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_ascent<class_TextLine_method_get_line_ascent>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_descent<class_TextLine_method_get_line_descent>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_underline_position<class_TextLine_method_get_line_underline_position>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_underline_thickness<class_TextLine_method_get_line_underline_thickness>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_width<class_TextLine_method_get_line_width>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_object_rect<class_TextLine_method_get_object_rect>`\ (\ key\: :ref:`Variant<class_Variant>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_objects<class_TextLine_method_get_objects>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_TextLine_method_get_rid>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_TextLine_method_get_size>`\ (\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hit_test<class_TextLine_method_hit_test>`\ (\ coords\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`resize_object<class_TextLine_method_resize_object>`\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bidi_override<class_TextLine_method_set_bidi_override>`\ (\ override\: :ref:`Array<class_Array>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tab_align<class_TextLine_method_tab_align>`\ (\ tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -106,12 +108,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` :ref:`🔗<class_TextLine_property_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Sets text alignment within the line as if the line was horizontal. @@ -123,12 +125,12 @@ Sets text alignment within the line as if the line was horizontal. .. rst-class:: classref-property -:ref:`Direction<enum_TextServer_Direction>` **direction** = ``0`` +:ref:`Direction<enum_TextServer_Direction>` **direction** = ``0`` :ref:`🔗<class_TextLine_property_direction>` .. rst-class:: classref-property-setget -- void **set_direction** **(** :ref:`Direction<enum_TextServer_Direction>` value **)** -- :ref:`Direction<enum_TextServer_Direction>` **get_direction** **(** **)** +- |void| **set_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ ) +- :ref:`Direction<enum_TextServer_Direction>` **get_direction**\ (\ ) Text writing direction. @@ -136,16 +138,33 @@ Text writing direction. ---- +.. _class_TextLine_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **ellipsis_char** = ``"…"`` :ref:`🔗<class_TextLine_property_ellipsis_char>` + +.. rst-class:: classref-property-setget + +- |void| **set_ellipsis_char**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_ellipsis_char**\ (\ ) + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextLine_property_flags: .. rst-class:: classref-property -|bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **flags** = ``3`` +|bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **flags** = ``3`` :ref:`🔗<class_TextLine_property_flags>` .. rst-class:: classref-property-setget -- void **set_flags** **(** |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> value **)** -- |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **get_flags** **(** **)** +- |void| **set_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) +- |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_flags**\ (\ ) Line alignment rules. For more info see :ref:`TextServer<class_TextServer>`. @@ -157,12 +176,12 @@ Line alignment rules. For more info see :ref:`TextServer<class_TextServer>`. .. rst-class:: classref-property -:ref:`Orientation<enum_TextServer_Orientation>` **orientation** = ``0`` +:ref:`Orientation<enum_TextServer_Orientation>` **orientation** = ``0`` :ref:`🔗<class_TextLine_property_orientation>` .. rst-class:: classref-property-setget -- void **set_orientation** **(** :ref:`Orientation<enum_TextServer_Orientation>` value **)** -- :ref:`Orientation<enum_TextServer_Orientation>` **get_orientation** **(** **)** +- |void| **set_orientation**\ (\ value\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) +- :ref:`Orientation<enum_TextServer_Orientation>` **get_orientation**\ (\ ) Text orientation. @@ -174,12 +193,12 @@ Text orientation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **preserve_control** = ``false`` +:ref:`bool<class_bool>` **preserve_control** = ``false`` :ref:`🔗<class_TextLine_property_preserve_control>` .. rst-class:: classref-property-setget -- void **set_preserve_control** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_preserve_control** **(** **)** +- |void| **set_preserve_control**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_preserve_control**\ (\ ) If set to ``true`` text will display control characters. @@ -191,12 +210,12 @@ If set to ``true`` text will display control characters. .. rst-class:: classref-property -:ref:`bool<class_bool>` **preserve_invalid** = ``true`` +:ref:`bool<class_bool>` **preserve_invalid** = ``true`` :ref:`🔗<class_TextLine_property_preserve_invalid>` .. rst-class:: classref-property-setget -- void **set_preserve_invalid** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_preserve_invalid** **(** **)** +- |void| **set_preserve_invalid**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_preserve_invalid**\ (\ ) If set to ``true`` text will display invalid characters. @@ -208,12 +227,12 @@ If set to ``true`` text will display invalid characters. .. rst-class:: classref-property -:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` +:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``3`` :ref:`🔗<class_TextLine_property_text_overrun_behavior>` .. rst-class:: classref-property-setget -- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` value **)** -- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior** **(** **)** +- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) +- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the text line's set width. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes. @@ -225,12 +244,12 @@ Sets the clipping behavior when the text exceeds the text line's set width. See .. rst-class:: classref-property -:ref:`float<class_float>` **width** = ``-1.0`` +:ref:`float<class_float>` **width** = ``-1.0`` :ref:`🔗<class_TextLine_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_width**\ (\ ) Text line width. @@ -247,7 +266,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **add_object** **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **add_object**\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextLine_method_add_object>` Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. @@ -259,7 +278,7 @@ Adds inline object to the text buffer, ``key`` must be unique. In the text, obje .. rst-class:: classref-method -:ref:`bool<class_bool>` **add_string** **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** +:ref:`bool<class_bool>` **add_string**\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_TextLine_method_add_string>` Adds text span and font to draw it. @@ -271,7 +290,7 @@ Adds text span and font to draw it. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_TextLine_method_clear>` Clears text line (removes text and inline objects). @@ -283,7 +302,7 @@ Clears text line (removes text and inline objects). .. rst-class:: classref-method -void **draw** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextLine_method_draw>` Draw text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -295,7 +314,7 @@ Draw text into a canvas item at a given position, with ``color``. ``pos`` specif .. rst-class:: classref-method -void **draw_outline** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_outline**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextLine_method_draw_outline>` Draw text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -307,7 +326,7 @@ Draw text into a canvas item at a given position, with ``color``. ``pos`` specif .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_ascent** **(** **)** |const| +:ref:`float<class_float>` **get_line_ascent**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_line_ascent>` Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). @@ -319,7 +338,7 @@ Returns the text ascent (number of pixels above the baseline for horizontal layo .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_descent** **(** **)** |const| +:ref:`float<class_float>` **get_line_descent**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_line_descent>` Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). @@ -331,7 +350,7 @@ Returns the text descent (number of pixels below the baseline for horizontal lay .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_underline_position** **(** **)** |const| +:ref:`float<class_float>` **get_line_underline_position**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_line_underline_position>` Returns pixel offset of the underline below the baseline. @@ -343,7 +362,7 @@ Returns pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_underline_thickness** **(** **)** |const| +:ref:`float<class_float>` **get_line_underline_thickness**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_line_underline_thickness>` Returns thickness of the underline. @@ -355,7 +374,7 @@ Returns thickness of the underline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_width** **(** **)** |const| +:ref:`float<class_float>` **get_line_width**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_line_width>` Returns width (for horizontal layout) or height (for vertical) of the text. @@ -367,7 +386,7 @@ Returns width (for horizontal layout) or height (for vertical) of the text. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_object_rect** **(** :ref:`Variant<class_Variant>` key **)** |const| +:ref:`Rect2<class_Rect2>` **get_object_rect**\ (\ key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextLine_method_get_object_rect>` Returns bounding rectangle of the inline object. @@ -379,7 +398,7 @@ Returns bounding rectangle of the inline object. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_objects** **(** **)** |const| +:ref:`Array<class_Array>` **get_objects**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_objects>` Returns array of inline objects. @@ -391,7 +410,7 @@ Returns array of inline objects. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_rid>` Returns TextServer buffer RID. @@ -403,7 +422,7 @@ Returns TextServer buffer RID. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_size**\ (\ ) |const| :ref:`🔗<class_TextLine_method_get_size>` Returns size of the bounding box of the text. @@ -415,7 +434,7 @@ Returns size of the bounding box of the text. .. rst-class:: classref-method -:ref:`int<class_int>` **hit_test** **(** :ref:`float<class_float>` coords **)** |const| +:ref:`int<class_int>` **hit_test**\ (\ coords\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_TextLine_method_hit_test>` Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. @@ -427,7 +446,7 @@ Returns caret character offset at the specified pixel offset at the baseline. Th .. rst-class:: classref-method -:ref:`bool<class_bool>` **resize_object** **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **resize_object**\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextLine_method_resize_object>` Sets new size and alignment of embedded object. @@ -439,7 +458,7 @@ Sets new size and alignment of embedded object. .. rst-class:: classref-method -void **set_bidi_override** **(** :ref:`Array<class_Array>` override **)** +|void| **set_bidi_override**\ (\ override\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TextLine_method_set_bidi_override>` Overrides BiDi for the structured text. @@ -453,7 +472,7 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w .. rst-class:: classref-method -void **tab_align** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** +|void| **tab_align**\ (\ tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_TextLine_method_tab_align>` Aligns text to the given tab-stops. @@ -464,3 +483,4 @@ Aligns text to the given tab-stops. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index 685512b9fea..5eb39463e92 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -25,6 +25,13 @@ TextMesh can be generated only when using dynamic fonts with vector glyph contou The UV layout is arranged in 4 horizontal strips, top to bottom: 40% of the height for the front face, 40% for the back face, 10% for the outer edges and 10% for the inner edges. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`3D text <../tutorials/3d/3d_text>` + .. rst-class:: classref-reftable-group Properties @@ -46,7 +53,7 @@ Properties +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`horizontal_alignment<class_TextMesh_property_horizontal_alignment>` | ``1`` | +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ - | |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`justification_flags<class_TextMesh_property_justification_flags>` | ``163`` | + | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_TextMesh_property_justification_flags>` | ``163`` | +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`String<class_String>` | :ref:`language<class_TextMesh_property_language>` | ``""`` | +---------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ @@ -84,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **autowrap_mode** = ``0`` :ref:`🔗<class_TextMesh_property_autowrap_mode>` .. rst-class:: classref-property-setget -- void **set_autowrap_mode** **(** :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` value **)** -- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** **)** +- |void| **set_autowrap_mode**\ (\ value\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) +- :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ ) If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`. @@ -101,12 +108,12 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_co .. rst-class:: classref-property -:ref:`float<class_float>` **curve_step** = ``0.5`` +:ref:`float<class_float>` **curve_step** = ``0.5`` :ref:`🔗<class_TextMesh_property_curve_step>` .. rst-class:: classref-property-setget -- void **set_curve_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_curve_step** **(** **)** +- |void| **set_curve_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_curve_step**\ (\ ) Step (in pixels) used to approximate Bézier curves. @@ -118,12 +125,12 @@ Step (in pixels) used to approximate Bézier curves. .. rst-class:: classref-property -:ref:`float<class_float>` **depth** = ``0.05`` +:ref:`float<class_float>` **depth** = ``0.05`` :ref:`🔗<class_TextMesh_property_depth>` .. rst-class:: classref-property-setget -- void **set_depth** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_depth** **(** **)** +- |void| **set_depth**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_depth**\ (\ ) Depths of the mesh, if set to ``0.0`` only front surface, is generated, and UV layout is changed to use full texture for the front face only. @@ -135,12 +142,12 @@ Depths of the mesh, if set to ``0.0`` only front surface, is generated, and UV l .. rst-class:: classref-property -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_TextMesh_property_font>` .. rst-class:: classref-property-setget -- void **set_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_font** **(** **)** +- |void| **set_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_font**\ (\ ) Font configuration used to display text. @@ -152,12 +159,12 @@ Font configuration used to display text. .. rst-class:: classref-property -:ref:`int<class_int>` **font_size** = ``16`` +:ref:`int<class_int>` **font_size** = ``16`` :ref:`🔗<class_TextMesh_property_font_size>` .. rst-class:: classref-property-setget -- void **set_font_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_font_size** **(** **)** +- |void| **set_font_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_font_size**\ (\ ) Font size of the **TextMesh**'s text. @@ -169,12 +176,12 @@ Font size of the **TextMesh**'s text. .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **horizontal_alignment** = ``1`` :ref:`🔗<class_TextMesh_property_horizontal_alignment>` .. rst-class:: classref-property-setget -- void **set_horizontal_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment** **(** **)** +- |void| **set_horizontal_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_horizontal_alignment**\ (\ ) Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` constants. @@ -186,12 +193,12 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill .. rst-class:: classref-property -|bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **justification_flags** = ``163`` +|bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_TextMesh_property_justification_flags>` .. rst-class:: classref-property-setget -- void **set_justification_flags** **(** |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> value **)** -- |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **get_justification_flags** **(** **)** +- |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) +- |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ ) Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`. @@ -203,12 +210,12 @@ Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextSe .. rst-class:: classref-property -:ref:`String<class_String>` **language** = ``""`` +:ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_TextMesh_property_language>` .. rst-class:: classref-property-setget -- void **set_language** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_language** **(** **)** +- |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_language**\ (\ ) Language code used for text shaping algorithms, if left empty current locale is used instead. @@ -220,12 +227,12 @@ Language code used for text shaping algorithms, if left empty current locale is .. rst-class:: classref-property -:ref:`float<class_float>` **line_spacing** = ``0.0`` +:ref:`float<class_float>` **line_spacing** = ``0.0`` :ref:`🔗<class_TextMesh_property_line_spacing>` .. rst-class:: classref-property-setget -- void **set_line_spacing** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_line_spacing** **(** **)** +- |void| **set_line_spacing**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_line_spacing**\ (\ ) Vertical space between lines in multiline **TextMesh**. @@ -237,12 +244,12 @@ Vertical space between lines in multiline **TextMesh**. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **offset** = ``Vector2(0, 0)`` :ref:`🔗<class_TextMesh_property_offset>` .. rst-class:: classref-property-setget -- void **set_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_offset** **(** **)** +- |void| **set_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_offset**\ (\ ) The text drawing offset (in pixels). @@ -254,12 +261,12 @@ The text drawing offset (in pixels). .. rst-class:: classref-property -:ref:`float<class_float>` **pixel_size** = ``0.01`` +:ref:`float<class_float>` **pixel_size** = ``0.01`` :ref:`🔗<class_TextMesh_property_pixel_size>` .. rst-class:: classref-property-setget -- void **set_pixel_size** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_pixel_size** **(** **)** +- |void| **set_pixel_size**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_pixel_size**\ (\ ) The size of one pixel's width on the text to scale it in 3D. @@ -271,12 +278,12 @@ The size of one pixel's width on the text to scale it in 3D. .. rst-class:: classref-property -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **structured_text_bidi_override** = ``0`` :ref:`🔗<class_TextMesh_property_structured_text_bidi_override>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` value **)** -- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** **)** +- |void| **set_structured_text_bidi_override**\ (\ value\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) +- :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ ) Set BiDi algorithm override for the structured text. @@ -288,12 +295,12 @@ Set BiDi algorithm override for the structured text. .. rst-class:: classref-property -:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` +:ref:`Array<class_Array>` **structured_text_bidi_override_options** = ``[]`` :ref:`🔗<class_TextMesh_property_structured_text_bidi_override_options>` .. rst-class:: classref-property-setget -- void **set_structured_text_bidi_override_options** **(** :ref:`Array<class_Array>` value **)** -- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** **)** +- |void| **set_structured_text_bidi_override_options**\ (\ value\: :ref:`Array<class_Array>`\ ) +- :ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ ) Set additional options for BiDi override. @@ -305,15 +312,17 @@ Set additional options for BiDi override. .. rst-class:: classref-property -:ref:`String<class_String>` **text** = ``""`` +:ref:`String<class_String>` **text** = ``""`` :ref:`🔗<class_TextMesh_property_text>` .. rst-class:: classref-property-setget -- void **set_text** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_text** **(** **)** +- |void| **set_text**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_text**\ (\ ) The text to generate mesh from. +\ **Note:** Due to being a :ref:`Resource<class_Resource>`, it doesn't follow the rules of :ref:`Node.auto_translate_mode<class_Node_property_auto_translate_mode>`. If disabling translation is desired, it should be done manually with :ref:`Object.set_message_translation<class_Object_method_set_message_translation>`. + .. rst-class:: classref-item-separator ---- @@ -322,12 +331,12 @@ The text to generate mesh from. .. rst-class:: classref-property -:ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` +:ref:`Direction<enum_TextServer_Direction>` **text_direction** = ``0`` :ref:`🔗<class_TextMesh_property_text_direction>` .. rst-class:: classref-property-setget -- void **set_text_direction** **(** :ref:`Direction<enum_TextServer_Direction>` value **)** -- :ref:`Direction<enum_TextServer_Direction>` **get_text_direction** **(** **)** +- |void| **set_text_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ ) +- :ref:`Direction<enum_TextServer_Direction>` **get_text_direction**\ (\ ) Base text writing direction. @@ -339,12 +348,12 @@ Base text writing direction. .. rst-class:: classref-property -:ref:`bool<class_bool>` **uppercase** = ``false`` +:ref:`bool<class_bool>` **uppercase** = ``false`` :ref:`🔗<class_TextMesh_property_uppercase>` .. rst-class:: classref-property-setget -- void **set_uppercase** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_uppercase** **(** **)** +- |void| **set_uppercase**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_uppercase**\ (\ ) If ``true``, all the text displays as UPPERCASE. @@ -356,12 +365,12 @@ If ``true``, all the text displays as UPPERCASE. .. rst-class:: classref-property -:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` +:ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **vertical_alignment** = ``1`` :ref:`🔗<class_TextMesh_property_vertical_alignment>` .. rst-class:: classref-property-setget -- void **set_vertical_alignment** **(** :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` value **)** -- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment** **(** **)** +- |void| **set_vertical_alignment**\ (\ value\: :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>`\ ) +- :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` **get_vertical_alignment**\ (\ ) Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the :ref:`VerticalAlignment<enum_@GlobalScope_VerticalAlignment>` constants. @@ -373,12 +382,12 @@ Controls the text's vertical alignment. Supports top, center, bottom. Set it to .. rst-class:: classref-property -:ref:`float<class_float>` **width** = ``500.0`` +:ref:`float<class_float>` **width** = ``500.0`` :ref:`🔗<class_TextMesh_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_width**\ (\ ) Text width (in pixels), used for fill alignment. @@ -389,3 +398,4 @@ Text width (in pixels), used for fill alignment. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index a549c5f1cf3..2309a3997fd 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -32,13 +32,15 @@ Properties +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`alignment<class_TextParagraph_property_alignment>` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ - | |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> | :ref:`break_flags<class_TextParagraph_property_break_flags>` | ``3`` | + | |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] | :ref:`break_flags<class_TextParagraph_property_break_flags>` | ``3`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`String<class_String>` | :ref:`custom_punctuation<class_TextParagraph_property_custom_punctuation>` | ``""`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction<enum_TextServer_Direction>` | :ref:`direction<class_TextParagraph_property_direction>` | ``0`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ - | |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> | :ref:`justification_flags<class_TextParagraph_property_justification_flags>` | ``163`` | + | :ref:`String<class_String>` | :ref:`ellipsis_char<class_TextParagraph_property_ellipsis_char>` | ``"…"`` | + +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ + | |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] | :ref:`justification_flags<class_TextParagraph_property_justification_flags>` | ``163`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int<class_int>` | :ref:`max_lines_visible<class_TextParagraph_property_max_lines_visible>` | ``-1`` | +---------------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ @@ -61,71 +63,71 @@ Methods .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`add_object<class_TextParagraph_method_add_object>` **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`add_string<class_TextParagraph_method_add_string>` **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_TextParagraph_method_clear>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_dropcap<class_TextParagraph_method_clear_dropcap>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw<class_TextParagraph_method_draw>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`Color<class_Color>` dc_color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_dropcap<class_TextParagraph_method_draw_dropcap>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_dropcap_outline<class_TextParagraph_method_draw_dropcap_outline>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_line<class_TextParagraph_method_draw_line>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` line, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_line_outline<class_TextParagraph_method_draw_line_outline>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` line, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_outline<class_TextParagraph_method_draw_outline>` **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`Color<class_Color>` dc_color=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_dropcap_lines<class_TextParagraph_method_get_dropcap_lines>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_dropcap_rid<class_TextParagraph_method_get_dropcap_rid>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_dropcap_size<class_TextParagraph_method_get_dropcap_size>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_ascent<class_TextParagraph_method_get_line_ascent>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_line_count<class_TextParagraph_method_get_line_count>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_descent<class_TextParagraph_method_get_line_descent>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_line_object_rect<class_TextParagraph_method_get_line_object_rect>` **(** :ref:`int<class_int>` line, :ref:`Variant<class_Variant>` key **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_line_objects<class_TextParagraph_method_get_line_objects>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_range<class_TextParagraph_method_get_line_range>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_line_rid<class_TextParagraph_method_get_line_rid>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_line_size<class_TextParagraph_method_get_line_size>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_underline_position<class_TextParagraph_method_get_line_underline_position>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_underline_thickness<class_TextParagraph_method_get_line_underline_thickness>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_line_width<class_TextParagraph_method_get_line_width>` **(** :ref:`int<class_int>` line **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_non_wrapped_size<class_TextParagraph_method_get_non_wrapped_size>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_rid<class_TextParagraph_method_get_rid>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_TextParagraph_method_get_size>` **(** **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`hit_test<class_TextParagraph_method_hit_test>` **(** :ref:`Vector2<class_Vector2>` coords **)** |const| | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`resize_object<class_TextParagraph_method_resize_object>` **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_bidi_override<class_TextParagraph_method_set_bidi_override>` **(** :ref:`Array<class_Array>` override **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`set_dropcap<class_TextParagraph_method_set_dropcap>` **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String<class_String>` language="" **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`tab_align<class_TextParagraph_method_tab_align>` **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`add_object<class_TextParagraph_method_add_object>`\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`add_string<class_TextParagraph_method_add_string>`\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TextParagraph_method_clear>`\ (\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_dropcap<class_TextParagraph_method_clear_dropcap>`\ (\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw<class_TextParagraph_method_draw>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), dc_color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_dropcap<class_TextParagraph_method_draw_dropcap>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_dropcap_outline<class_TextParagraph_method_draw_dropcap_outline>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_line<class_TextParagraph_method_draw_line>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, line\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_line_outline<class_TextParagraph_method_draw_line_outline>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, line\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_outline<class_TextParagraph_method_draw_outline>`\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), dc_color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_dropcap_lines<class_TextParagraph_method_get_dropcap_lines>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_dropcap_rid<class_TextParagraph_method_get_dropcap_rid>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_dropcap_size<class_TextParagraph_method_get_dropcap_size>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_ascent<class_TextParagraph_method_get_line_ascent>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_line_count<class_TextParagraph_method_get_line_count>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_descent<class_TextParagraph_method_get_line_descent>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_line_object_rect<class_TextParagraph_method_get_line_object_rect>`\ (\ line\: :ref:`int<class_int>`, key\: :ref:`Variant<class_Variant>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_line_objects<class_TextParagraph_method_get_line_objects>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_line_range<class_TextParagraph_method_get_line_range>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_line_rid<class_TextParagraph_method_get_line_rid>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_line_size<class_TextParagraph_method_get_line_size>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_underline_position<class_TextParagraph_method_get_line_underline_position>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_underline_thickness<class_TextParagraph_method_get_line_underline_thickness>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_line_width<class_TextParagraph_method_get_line_width>`\ (\ line\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_non_wrapped_size<class_TextParagraph_method_get_non_wrapped_size>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_rid<class_TextParagraph_method_get_rid>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_TextParagraph_method_get_size>`\ (\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`hit_test<class_TextParagraph_method_hit_test>`\ (\ coords\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`resize_object<class_TextParagraph_method_resize_object>`\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_bidi_override<class_TextParagraph_method_set_bidi_override>`\ (\ override\: :ref:`Array<class_Array>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`set_dropcap<class_TextParagraph_method_set_dropcap>`\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), language\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tab_align<class_TextParagraph_method_tab_align>`\ (\ tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -140,12 +142,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **alignment** = ``0`` :ref:`🔗<class_TextParagraph_property_alignment>` .. rst-class:: classref-property-setget -- void **set_alignment** **(** :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` value **)** -- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_alignment** **(** **)** +- |void| **set_alignment**\ (\ value\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) +- :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_alignment**\ (\ ) Paragraph horizontal alignment. @@ -157,12 +159,12 @@ Paragraph horizontal alignment. .. rst-class:: classref-property -|bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> **break_flags** = ``3`` +|bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] **break_flags** = ``3`` :ref:`🔗<class_TextParagraph_property_break_flags>` .. rst-class:: classref-property-setget -- void **set_break_flags** **(** |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> value **)** -- |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> **get_break_flags** **(** **)** +- |void| **set_break_flags**\ (\ value\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ ) +- |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] **get_break_flags**\ (\ ) Line breaking rules. For more info see :ref:`TextServer<class_TextServer>`. @@ -174,12 +176,12 @@ Line breaking rules. For more info see :ref:`TextServer<class_TextServer>`. .. rst-class:: classref-property -:ref:`String<class_String>` **custom_punctuation** = ``""`` +:ref:`String<class_String>` **custom_punctuation** = ``""`` :ref:`🔗<class_TextParagraph_property_custom_punctuation>` .. rst-class:: classref-property-setget -- void **set_custom_punctuation** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_custom_punctuation** **(** **)** +- |void| **set_custom_punctuation**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_custom_punctuation**\ (\ ) Custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. @@ -191,12 +193,12 @@ Custom punctuation character list, used for word breaking. If set to empty strin .. rst-class:: classref-property -:ref:`Direction<enum_TextServer_Direction>` **direction** = ``0`` +:ref:`Direction<enum_TextServer_Direction>` **direction** = ``0`` :ref:`🔗<class_TextParagraph_property_direction>` .. rst-class:: classref-property-setget -- void **set_direction** **(** :ref:`Direction<enum_TextServer_Direction>` value **)** -- :ref:`Direction<enum_TextServer_Direction>` **get_direction** **(** **)** +- |void| **set_direction**\ (\ value\: :ref:`Direction<enum_TextServer_Direction>`\ ) +- :ref:`Direction<enum_TextServer_Direction>` **get_direction**\ (\ ) Text writing direction. @@ -204,16 +206,33 @@ Text writing direction. ---- +.. _class_TextParagraph_property_ellipsis_char: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **ellipsis_char** = ``"…"`` :ref:`🔗<class_TextParagraph_property_ellipsis_char>` + +.. rst-class:: classref-property-setget + +- |void| **set_ellipsis_char**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_ellipsis_char**\ (\ ) + +Ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextParagraph_property_justification_flags: .. rst-class:: classref-property -|bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **justification_flags** = ``163`` +|bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **justification_flags** = ``163`` :ref:`🔗<class_TextParagraph_property_justification_flags>` .. rst-class:: classref-property-setget -- void **set_justification_flags** **(** |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> value **)** -- |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> **get_justification_flags** **(** **)** +- |void| **set_justification_flags**\ (\ value\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) +- |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] **get_justification_flags**\ (\ ) Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`. @@ -225,12 +244,12 @@ Line fill alignment rules. For more info see :ref:`JustificationFlag<enum_TextSe .. rst-class:: classref-property -:ref:`int<class_int>` **max_lines_visible** = ``-1`` +:ref:`int<class_int>` **max_lines_visible** = ``-1`` :ref:`🔗<class_TextParagraph_property_max_lines_visible>` .. rst-class:: classref-property-setget -- void **set_max_lines_visible** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_lines_visible** **(** **)** +- |void| **set_max_lines_visible**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_lines_visible**\ (\ ) Limits the lines of text shown. @@ -242,12 +261,12 @@ Limits the lines of text shown. .. rst-class:: classref-property -:ref:`Orientation<enum_TextServer_Orientation>` **orientation** = ``0`` +:ref:`Orientation<enum_TextServer_Orientation>` **orientation** = ``0`` :ref:`🔗<class_TextParagraph_property_orientation>` .. rst-class:: classref-property-setget -- void **set_orientation** **(** :ref:`Orientation<enum_TextServer_Orientation>` value **)** -- :ref:`Orientation<enum_TextServer_Orientation>` **get_orientation** **(** **)** +- |void| **set_orientation**\ (\ value\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) +- :ref:`Orientation<enum_TextServer_Orientation>` **get_orientation**\ (\ ) Text orientation. @@ -259,12 +278,12 @@ Text orientation. .. rst-class:: classref-property -:ref:`bool<class_bool>` **preserve_control** = ``false`` +:ref:`bool<class_bool>` **preserve_control** = ``false`` :ref:`🔗<class_TextParagraph_property_preserve_control>` .. rst-class:: classref-property-setget -- void **set_preserve_control** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_preserve_control** **(** **)** +- |void| **set_preserve_control**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_preserve_control**\ (\ ) If set to ``true`` text will display control characters. @@ -276,12 +295,12 @@ If set to ``true`` text will display control characters. .. rst-class:: classref-property -:ref:`bool<class_bool>` **preserve_invalid** = ``true`` +:ref:`bool<class_bool>` **preserve_invalid** = ``true`` :ref:`🔗<class_TextParagraph_property_preserve_invalid>` .. rst-class:: classref-property-setget -- void **set_preserve_invalid** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_preserve_invalid** **(** **)** +- |void| **set_preserve_invalid**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_preserve_invalid**\ (\ ) If set to ``true`` text will display invalid characters. @@ -293,12 +312,12 @@ If set to ``true`` text will display invalid characters. .. rst-class:: classref-property -:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``0`` +:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **text_overrun_behavior** = ``0`` :ref:`🔗<class_TextParagraph_property_text_overrun_behavior>` .. rst-class:: classref-property-setget -- void **set_text_overrun_behavior** **(** :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` value **)** -- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior** **(** **)** +- |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) +- :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ ) Sets the clipping behavior when the text exceeds the paragraph's set width. See :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` for a description of all modes. @@ -310,12 +329,12 @@ Sets the clipping behavior when the text exceeds the paragraph's set width. See .. rst-class:: classref-property -:ref:`float<class_float>` **width** = ``-1.0`` +:ref:`float<class_float>` **width** = ``-1.0`` :ref:`🔗<class_TextParagraph_property_width>` .. rst-class:: classref-property-setget -- void **set_width** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_width** **(** **)** +- |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_width**\ (\ ) Paragraph width. @@ -332,7 +351,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **add_object** **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **add_object**\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextParagraph_method_add_object>` Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. @@ -344,7 +363,7 @@ Adds inline object to the text buffer, ``key`` must be unique. In the text, obje .. rst-class:: classref-method -:ref:`bool<class_bool>` **add_string** **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** +:ref:`bool<class_bool>` **add_string**\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_TextParagraph_method_add_string>` Adds text span and font to draw it. @@ -356,7 +375,7 @@ Adds text span and font to draw it. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_TextParagraph_method_clear>` Clears text paragraph (removes text and inline objects). @@ -368,7 +387,7 @@ Clears text paragraph (removes text and inline objects). .. rst-class:: classref-method -void **clear_dropcap** **(** **)** +|void| **clear_dropcap**\ (\ ) :ref:`🔗<class_TextParagraph_method_clear_dropcap>` Removes dropcap. @@ -380,7 +399,7 @@ Removes dropcap. .. rst-class:: classref-method -void **draw** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`Color<class_Color>` dc_color=Color(1, 1, 1, 1) **)** |const| +|void| **draw**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), dc_color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw>` Draw all lines of the text and drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -392,7 +411,7 @@ Draw all lines of the text and drop cap into a canvas item at a given position, .. rst-class:: classref-method -void **draw_dropcap** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_dropcap**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw_dropcap>` Draw drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -404,7 +423,7 @@ Draw drop cap into a canvas item at a given position, with ``color``. ``pos`` sp .. rst-class:: classref-method -void **draw_dropcap_outline** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_dropcap_outline**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw_dropcap_outline>` Draw drop cap outline into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -416,7 +435,7 @@ Draw drop cap outline into a canvas item at a given position, with ``color``. `` .. rst-class:: classref-method -void **draw_line** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` line, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_line**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, line\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw_line>` Draw single line of text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -428,7 +447,7 @@ Draw single line of text into a canvas item at a given position, with ``color``. .. rst-class:: classref-method -void **draw_line_outline** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` line, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_line_outline**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, line\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw_line_outline>` Draw outline of the single line of text into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -440,7 +459,7 @@ Draw outline of the single line of text into a canvas item at a given position, .. rst-class:: classref-method -void **draw_outline** **(** :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1), :ref:`Color<class_Color>` dc_color=Color(1, 1, 1, 1) **)** |const| +|void| **draw_outline**\ (\ canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), dc_color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextParagraph_method_draw_outline>` Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with ``color``. ``pos`` specifies the top left corner of the bounding box. @@ -452,7 +471,7 @@ Draw outlines of all lines of the text and drop cap into a canvas item at a give .. rst-class:: classref-method -:ref:`int<class_int>` **get_dropcap_lines** **(** **)** |const| +:ref:`int<class_int>` **get_dropcap_lines**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_dropcap_lines>` Returns number of lines used by dropcap. @@ -464,7 +483,7 @@ Returns number of lines used by dropcap. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_dropcap_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_dropcap_rid**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_dropcap_rid>` Returns drop cap text buffer RID. @@ -476,7 +495,7 @@ Returns drop cap text buffer RID. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_dropcap_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_dropcap_size**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_dropcap_size>` Returns drop cap bounding box size. @@ -488,7 +507,7 @@ Returns drop cap bounding box size. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_ascent** **(** :ref:`int<class_int>` line **)** |const| +:ref:`float<class_float>` **get_line_ascent**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_ascent>` Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). @@ -500,7 +519,7 @@ Returns the text line ascent (number of pixels above the baseline for horizontal .. rst-class:: classref-method -:ref:`int<class_int>` **get_line_count** **(** **)** |const| +:ref:`int<class_int>` **get_line_count**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_count>` Returns number of lines in the paragraph. @@ -512,7 +531,7 @@ Returns number of lines in the paragraph. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_descent** **(** :ref:`int<class_int>` line **)** |const| +:ref:`float<class_float>` **get_line_descent**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_descent>` Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). @@ -524,7 +543,7 @@ Returns the text line descent (number of pixels below the baseline for horizonta .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_line_object_rect** **(** :ref:`int<class_int>` line, :ref:`Variant<class_Variant>` key **)** |const| +:ref:`Rect2<class_Rect2>` **get_line_object_rect**\ (\ line\: :ref:`int<class_int>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_object_rect>` Returns bounding rectangle of the inline object. @@ -536,7 +555,7 @@ Returns bounding rectangle of the inline object. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_line_objects** **(** :ref:`int<class_int>` line **)** |const| +:ref:`Array<class_Array>` **get_line_objects**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_objects>` Returns array of inline objects in the line. @@ -548,7 +567,7 @@ Returns array of inline objects in the line. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_line_range** **(** :ref:`int<class_int>` line **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_line_range**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_range>` Returns character range of the line. @@ -560,7 +579,7 @@ Returns character range of the line. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_line_rid** **(** :ref:`int<class_int>` line **)** |const| +:ref:`RID<class_RID>` **get_line_rid**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_rid>` Returns TextServer line buffer RID. @@ -572,7 +591,7 @@ Returns TextServer line buffer RID. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_line_size** **(** :ref:`int<class_int>` line **)** |const| +:ref:`Vector2<class_Vector2>` **get_line_size**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_size>` Returns size of the bounding box of the line of text. @@ -584,7 +603,7 @@ Returns size of the bounding box of the line of text. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_underline_position** **(** :ref:`int<class_int>` line **)** |const| +:ref:`float<class_float>` **get_line_underline_position**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_underline_position>` Returns pixel offset of the underline below the baseline. @@ -596,7 +615,7 @@ Returns pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_underline_thickness** **(** :ref:`int<class_int>` line **)** |const| +:ref:`float<class_float>` **get_line_underline_thickness**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_underline_thickness>` Returns thickness of the underline. @@ -608,7 +627,7 @@ Returns thickness of the underline. .. rst-class:: classref-method -:ref:`float<class_float>` **get_line_width** **(** :ref:`int<class_int>` line **)** |const| +:ref:`float<class_float>` **get_line_width**\ (\ line\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextParagraph_method_get_line_width>` Returns width (for horizontal layout) or height (for vertical) of the line of text. @@ -620,7 +639,7 @@ Returns width (for horizontal layout) or height (for vertical) of the line of te .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_non_wrapped_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_non_wrapped_size**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_non_wrapped_size>` Returns the size of the bounding box of the paragraph, without line breaks. @@ -632,7 +651,7 @@ Returns the size of the bounding box of the paragraph, without line breaks. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_rid**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_rid>` Returns TextServer full string buffer RID. @@ -644,7 +663,7 @@ Returns TextServer full string buffer RID. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_size**\ (\ ) |const| :ref:`🔗<class_TextParagraph_method_get_size>` Returns the size of the bounding box of the paragraph. @@ -656,7 +675,7 @@ Returns the size of the bounding box of the paragraph. .. rst-class:: classref-method -:ref:`int<class_int>` **hit_test** **(** :ref:`Vector2<class_Vector2>` coords **)** |const| +:ref:`int<class_int>` **hit_test**\ (\ coords\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TextParagraph_method_hit_test>` Returns caret character offset at the specified coordinates. This function always returns a valid position. @@ -668,7 +687,7 @@ Returns caret character offset at the specified coordinates. This function alway .. rst-class:: classref-method -:ref:`bool<class_bool>` **resize_object** **(** :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **resize_object**\ (\ key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextParagraph_method_resize_object>` Sets new size and alignment of embedded object. @@ -680,7 +699,7 @@ Sets new size and alignment of embedded object. .. rst-class:: classref-method -void **set_bidi_override** **(** :ref:`Array<class_Array>` override **)** +|void| **set_bidi_override**\ (\ override\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TextParagraph_method_set_bidi_override>` Overrides BiDi for the structured text. @@ -694,7 +713,7 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w .. rst-class:: classref-method -:ref:`bool<class_bool>` **set_dropcap** **(** :ref:`String<class_String>` text, :ref:`Font<class_Font>` font, :ref:`int<class_int>` font_size, :ref:`Rect2<class_Rect2>` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`String<class_String>` language="" **)** +:ref:`bool<class_bool>` **set_dropcap**\ (\ text\: :ref:`String<class_String>`, font\: :ref:`Font<class_Font>`, font_size\: :ref:`int<class_int>`, dropcap_margins\: :ref:`Rect2<class_Rect2>` = Rect2(0, 0, 0, 0), language\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_TextParagraph_method_set_dropcap>` Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. @@ -706,7 +725,7 @@ Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is .. rst-class:: classref-method -void **tab_align** **(** :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** +|void| **tab_align**\ (\ tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_TextParagraph_method_tab_align>` Aligns paragraph to the given tab-stops. @@ -717,3 +736,4 @@ Aligns paragraph to the given tab-stops. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 86f4c328f54..655d54c9d71 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -23,6 +23,23 @@ Description **TextServer** is the API backend for managing fonts and rendering text. +\ **Note:** This is a low-level API, consider using :ref:`TextLine<class_TextLine>`, :ref:`TextParagraph<class_TextParagraph>`, and :ref:`Font<class_Font>` classes instead. + +This is an abstract class, so to get the currently active **TextServer** instance, use the following code: + + +.. tabs:: + + .. code-tab:: gdscript + + var ts = TextServerManager.get_primary_interface() + + .. code-tab:: csharp + + var ts = TextServerManager.GetPrimaryInterface(); + + + .. rst-class:: classref-reftable-group Methods @@ -31,393 +48,433 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>` **(** **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>` **(** **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`font_get_style<class_TextServer_method_font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_render_range<class_TextServer_method_font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_data<class_TextServer_method_font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_descent<class_TextServer_method_font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_name<class_TextServer_method_font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_scale<class_TextServer_method_font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_style<class_TextServer_method_font_set_style>` **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_transform<class_TextServer_method_font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`font_set_weight<class_TextServer_method_font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid<class_TextServer_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>` **(** **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>` **(** **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>` **(** **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>` **(** **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>` **(** :ref:`RID<class_RID>` rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>` **(** :ref:`String<class_String>` filename **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>` **(** :ref:`String<class_String>` name **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>` **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]<class_Vector3i>` | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>` **(** :ref:`String<class_String>` language="" **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>` **(** :ref:`String<class_String>` filename **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>` **(** :ref:`RID<class_RID>` rid **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>` **(** :ref:`String<class_String>` string **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>` **(** :ref:`String<class_String>` string **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>` **(** :ref:`int<class_int>` tag **)** |const| | - +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_font<class_TextServer_method_create_font>`\ (\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_font_linked_variation<class_TextServer_method_create_font_linked_variation>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`create_shaped_text<class_TextServer_method_create_shaped_text>`\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_hex_code_box<class_TextServer_method_draw_hex_code_box>`\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_clear_glyphs<class_TextServer_method_font_clear_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_clear_kerning_map<class_TextServer_method_font_clear_kerning_map>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_clear_size_cache<class_TextServer_method_font_clear_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_clear_textures<class_TextServer_method_font_clear_textures>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_draw_glyph<class_TextServer_method_font_draw_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_draw_glyph_outline<class_TextServer_method_font_draw_glyph_outline>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`font_get_antialiasing<class_TextServer_method_font_get_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_ascent<class_TextServer_method_font_get_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_baseline_offset<class_TextServer_method_font_get_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_descent<class_TextServer_method_font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_get_disable_embedded_bitmaps<class_TextServer_method_font_get_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_embolden<class_TextServer_method_font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_face_count<class_TextServer_method_font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_face_index<class_TextServer_method_font_get_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_fixed_size<class_TextServer_method_font_get_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`font_get_fixed_size_scale_mode<class_TextServer_method_font_get_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_get_generate_mipmaps<class_TextServer_method_font_get_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_global_oversampling<class_TextServer_method_font_get_global_oversampling>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_advance<class_TextServer_method_font_get_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_glyph_contours<class_TextServer_method_font_get_glyph_contours>`\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_glyph_list<class_TextServer_method_font_get_glyph_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_offset<class_TextServer_method_font_get_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_size<class_TextServer_method_font_get_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_glyph_texture_idx<class_TextServer_method_font_get_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`font_get_glyph_texture_rid<class_TextServer_method_font_get_glyph_texture_rid>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`font_get_glyph_texture_size<class_TextServer_method_font_get_glyph_texture_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`font_get_glyph_uv_rect<class_TextServer_method_font_get_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`font_get_hinting<class_TextServer_method_font_get_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`font_get_kerning<class_TextServer_method_font_get_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_kerning_list<class_TextServer_method_font_get_kerning_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_get_language_support_override<class_TextServer_method_font_get_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_language_support_overrides<class_TextServer_method_font_get_language_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_msdf_pixel_range<class_TextServer_method_font_get_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_msdf_size<class_TextServer_method_font_get_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`font_get_name<class_TextServer_method_font_get_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_opentype_feature_overrides<class_TextServer_method_font_get_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_ot_name_strings<class_TextServer_method_font_get_ot_name_strings>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_oversampling<class_TextServer_method_font_get_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_scale<class_TextServer_method_font_get_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_get_script_support_override<class_TextServer_method_font_get_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`font_get_script_support_overrides<class_TextServer_method_font_get_script_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`font_get_size_cache_list<class_TextServer_method_font_get_size_cache_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_spacing<class_TextServer_method_font_get_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_stretch<class_TextServer_method_font_get_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`font_get_style<class_TextServer_method_font_get_style>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`font_get_style_name<class_TextServer_method_font_get_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`font_get_subpixel_positioning<class_TextServer_method_font_get_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`font_get_supported_chars<class_TextServer_method_font_get_supported_chars>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_texture_count<class_TextServer_method_font_get_texture_count>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`font_get_texture_image<class_TextServer_method_font_get_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`font_get_texture_offsets<class_TextServer_method_font_get_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`font_get_transform<class_TextServer_method_font_get_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_underline_position<class_TextServer_method_font_get_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`font_get_underline_thickness<class_TextServer_method_font_get_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_get_variation_coordinates<class_TextServer_method_font_get_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_get_weight<class_TextServer_method_font_get_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_has_char<class_TextServer_method_font_has_char>`\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_is_allow_system_fallback<class_TextServer_method_font_is_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_is_force_autohinter<class_TextServer_method_font_is_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_is_multichannel_signed_distance_field<class_TextServer_method_font_is_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_glyph<class_TextServer_method_font_remove_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_kerning<class_TextServer_method_font_remove_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_language_support_override<class_TextServer_method_font_remove_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_script_support_override<class_TextServer_method_font_remove_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_size_cache<class_TextServer_method_font_remove_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_render_glyph<class_TextServer_method_font_render_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_render_range<class_TextServer_method_font_render_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_allow_system_fallback<class_TextServer_method_font_set_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_antialiasing<class_TextServer_method_font_set_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_ascent<class_TextServer_method_font_set_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_baseline_offset<class_TextServer_method_font_set_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_data<class_TextServer_method_font_set_data>`\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_descent<class_TextServer_method_font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_disable_embedded_bitmaps<class_TextServer_method_font_set_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_embolden<class_TextServer_method_font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_face_index<class_TextServer_method_font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_fixed_size<class_TextServer_method_font_set_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_fixed_size_scale_mode<class_TextServer_method_font_set_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_force_autohinter<class_TextServer_method_font_set_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_generate_mipmaps<class_TextServer_method_font_set_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_global_oversampling<class_TextServer_method_font_set_global_oversampling>`\ (\ oversampling\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_glyph_advance<class_TextServer_method_font_set_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_glyph_offset<class_TextServer_method_font_set_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_glyph_size<class_TextServer_method_font_set_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_glyph_texture_idx<class_TextServer_method_font_set_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_glyph_uv_rect<class_TextServer_method_font_set_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_hinting<class_TextServer_method_font_set_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_kerning<class_TextServer_method_font_set_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_language_support_override<class_TextServer_method_font_set_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_msdf_pixel_range<class_TextServer_method_font_set_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_msdf_size<class_TextServer_method_font_set_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_multichannel_signed_distance_field<class_TextServer_method_font_set_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_name<class_TextServer_method_font_set_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_opentype_feature_overrides<class_TextServer_method_font_set_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_oversampling<class_TextServer_method_font_set_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_scale<class_TextServer_method_font_set_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_script_support_override<class_TextServer_method_font_set_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_spacing<class_TextServer_method_font_set_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_stretch<class_TextServer_method_font_set_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_style<class_TextServer_method_font_set_style>`\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_style_name<class_TextServer_method_font_set_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_subpixel_positioning<class_TextServer_method_font_set_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_texture_image<class_TextServer_method_font_set_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_texture_offsets<class_TextServer_method_font_set_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_transform<class_TextServer_method_font_set_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_underline_position<class_TextServer_method_font_set_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_underline_thickness<class_TextServer_method_font_set_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_variation_coordinates<class_TextServer_method_font_set_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_weight<class_TextServer_method_font_set_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_feature_list<class_TextServer_method_font_supported_feature_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`format_number<class_TextServer_method_format_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`free_rid<class_TextServer_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_features<class_TextServer_method_get_features>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_hex_code_box_size<class_TextServer_method_get_hex_code_box_size>`\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_name<class_TextServer_method_get_name>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_support_data_filename<class_TextServer_method_get_support_data_filename>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_support_data_info<class_TextServer_method_get_support_data_info>`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has<class_TextServer_method_has>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_feature<class_TextServer_method_has_feature>`\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`is_confusable<class_TextServer_method_is_confusable>`\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_locale_right_to_left<class_TextServer_method_is_locale_right_to_left>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_identifier<class_TextServer_method_is_valid_identifier>`\ (\ string\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_letter<class_TextServer_method_is_valid_letter>`\ (\ unicode\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`load_support_data<class_TextServer_method_load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`name_to_tag<class_TextServer_method_name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`parse_number<class_TextServer_method_parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`parse_structured_text<class_TextServer_method_parse_structured_text>`\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`percent_sign<class_TextServer_method_percent_sign>`\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`save_support_data<class_TextServer_method_save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_get_span_count<class_TextServer_method_shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`shaped_get_span_meta<class_TextServer_method_shaped_get_span_meta>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_set_span_update_font<class_TextServer_method_shaped_set_span_update_font>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>`\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_clear<class_TextServer_method_shaped_text_clear>`\ (\ rid\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_closest_character_pos<class_TextServer_method_shaped_text_closest_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_draw<class_TextServer_method_shaped_text_draw>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_draw_outline<class_TextServer_method_shaped_text_draw_outline>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_fit_to_width<class_TextServer_method_shaped_text_fit_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_get_ascent<class_TextServer_method_shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`shaped_text_get_carets<class_TextServer_method_shaped_text_get_carets>`\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_character_breaks<class_TextServer_method_shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_custom_ellipsis<class_TextServer_method_shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`shaped_text_get_custom_punctuation<class_TextServer_method_shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_get_descent<class_TextServer_method_shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_direction<class_TextServer_method_shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_dominant_direction_in_range<class_TextServer_method_shaped_text_get_dominant_direction_in_range>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_glyph_count<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_ellipsis_glyphs<class_TextServer_method_shaped_text_get_ellipsis_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_ellipsis_pos<class_TextServer_method_shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_glyph_count<class_TextServer_method_shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_get_glyphs<class_TextServer_method_shaped_text_get_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_grapheme_bounds<class_TextServer_method_shaped_text_get_grapheme_bounds>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction<enum_TextServer_Direction>` | :ref:`shaped_text_get_inferred_direction<class_TextServer_method_shaped_text_get_inferred_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks<class_TextServer_method_shaped_text_get_line_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_line_breaks_adv<class_TextServer_method_shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_object_glyph<class_TextServer_method_shaped_text_get_object_glyph>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_object_range<class_TextServer_method_shaped_text_get_object_range>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`shaped_text_get_object_rect<class_TextServer_method_shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`shaped_text_get_objects<class_TextServer_method_shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`shaped_text_get_orientation<class_TextServer_method_shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shaped_text_get_parent<class_TextServer_method_shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_control<class_TextServer_method_shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_get_preserve_invalid<class_TextServer_method_shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`shaped_text_get_range<class_TextServer_method_shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`shaped_text_get_selection<class_TextServer_method_shaped_text_get_selection>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`shaped_text_get_size<class_TextServer_method_shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_spacing<class_TextServer_method_shaped_text_get_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_get_trim_pos<class_TextServer_method_shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_position<class_TextServer_method_shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_get_underline_thickness<class_TextServer_method_shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_get_width<class_TextServer_method_shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`shaped_text_get_word_breaks<class_TextServer_method_shaped_text_get_word_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_has_visible_chars<class_TextServer_method_shaped_text_has_visible_chars>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_grapheme<class_TextServer_method_shaped_text_hit_test_grapheme>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_hit_test_position<class_TextServer_method_shaped_text_hit_test_position>`\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_is_ready<class_TextServer_method_shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_next_character_pos<class_TextServer_method_shaped_text_next_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_next_grapheme_pos<class_TextServer_method_shaped_text_next_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_overrun_trim_to_width<class_TextServer_method_shaped_text_overrun_trim_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_prev_character_pos<class_TextServer_method_shaped_text_prev_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`shaped_text_prev_grapheme_pos<class_TextServer_method_shaped_text_prev_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_resize_object<class_TextServer_method_shaped_text_resize_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_bidi_override<class_TextServer_method_shaped_text_set_bidi_override>`\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_custom_ellipsis<class_TextServer_method_shaped_text_set_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_custom_punctuation<class_TextServer_method_shaped_text_set_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_direction<class_TextServer_method_shaped_text_set_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_orientation<class_TextServer_method_shaped_text_set_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_preserve_control<class_TextServer_method_shaped_text_set_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_preserve_invalid<class_TextServer_method_shaped_text_set_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`shaped_text_set_spacing<class_TextServer_method_shaped_text_set_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`shaped_text_shape<class_TextServer_method_shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`shaped_text_sort_logical<class_TextServer_method_shaped_text_sort_logical>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`shaped_text_substr<class_TextServer_method_shaped_text_substr>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`shaped_text_tab_align<class_TextServer_method_shaped_text_tab_align>`\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`spoof_check<class_TextServer_method_spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_character_breaks<class_TextServer_method_string_get_character_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`string_get_word_breaks<class_TextServer_method_string_get_word_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`string_to_lower<class_TextServer_method_string_to_lower>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`string_to_title<class_TextServer_method_string_to_title>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`string_to_upper<class_TextServer_method_string_to_upper>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`strip_diacritics<class_TextServer_method_strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`tag_to_name<class_TextServer_method_tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -432,7 +489,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FontAntialiasing**: +enum **FontAntialiasing**: :ref:`🔗<enum_TextServer_FontAntialiasing>` .. _class_TextServer_constant_FONT_ANTIALIASING_NONE: @@ -470,7 +527,7 @@ LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unsca .. rst-class:: classref-enumeration -enum **FontLCDSubpixelLayout**: +enum **FontLCDSubpixelLayout**: :ref:`🔗<enum_TextServer_FontLCDSubpixelLayout>` .. _class_TextServer_constant_FONT_LCD_SUBPIXEL_LAYOUT_NONE: @@ -518,7 +575,7 @@ Vertical BGR subpixel layout. :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` **FONT_LCD_SUBPIXEL_LAYOUT_MAX** = ``5`` - +Represents the size of the :ref:`FontLCDSubpixelLayout<enum_TextServer_FontLCDSubpixelLayout>` enum. .. rst-class:: classref-item-separator @@ -528,7 +585,7 @@ Vertical BGR subpixel layout. .. rst-class:: classref-enumeration -enum **Direction**: +enum **Direction**: :ref:`🔗<enum_TextServer_Direction>` .. _class_TextServer_constant_DIRECTION_AUTO: @@ -570,7 +627,7 @@ Text writing direction is the same as base string writing direction. Used for Bi .. rst-class:: classref-enumeration -enum **Orientation**: +enum **Orientation**: :ref:`🔗<enum_TextServer_Orientation>` .. _class_TextServer_constant_ORIENTATION_HORIZONTAL: @@ -598,7 +655,7 @@ Right to left text is written vertically from bottom to top. .. rst-class:: classref-enumeration -flags **JustificationFlag**: +flags **JustificationFlag**: :ref:`🔗<enum_TextServer_JustificationFlag>` .. _class_TextServer_constant_JUSTIFICATION_NONE: @@ -680,7 +737,7 @@ Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICA .. rst-class:: classref-enumeration -enum **AutowrapMode**: +enum **AutowrapMode**: :ref:`🔗<enum_TextServer_AutowrapMode>` .. _class_TextServer_constant_AUTOWRAP_OFF: @@ -722,7 +779,7 @@ Behaves similarly to :ref:`AUTOWRAP_WORD<class_TextServer_constant_AUTOWRAP_WORD .. rst-class:: classref-enumeration -flags **LineBreakFlag**: +flags **LineBreakFlag**: :ref:`🔗<enum_TextServer_LineBreakFlag>` .. _class_TextServer_constant_BREAK_NONE: @@ -772,6 +829,14 @@ Should be used only in conjunction with :ref:`BREAK_WORD_BOUND<class_TextServer_ Remove edge spaces from the broken line segments. +.. _class_TextServer_constant_BREAK_TRIM_INDENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>` **BREAK_TRIM_INDENT** = ``32`` + +Subtract first line indentation width from all lines after the first one. + .. rst-class:: classref-item-separator ---- @@ -780,7 +845,7 @@ Remove edge spaces from the broken line segments. .. rst-class:: classref-enumeration -enum **VisibleCharactersBehavior**: +enum **VisibleCharactersBehavior**: :ref:`🔗<enum_TextServer_VisibleCharactersBehavior>` .. _class_TextServer_constant_VC_CHARS_BEFORE_SHAPING: @@ -830,7 +895,7 @@ Displays :ref:`Label.visible_ratio<class_Label_property_visible_ratio>` or :ref: .. rst-class:: classref-enumeration -enum **OverrunBehavior**: +enum **OverrunBehavior**: :ref:`🔗<enum_TextServer_OverrunBehavior>` .. _class_TextServer_constant_OVERRUN_NO_TRIMMING: @@ -880,7 +945,7 @@ Trims the text per word and adds an ellipsis to indicate that parts are hidden. .. rst-class:: classref-enumeration -flags **TextOverrunFlag**: +flags **TextOverrunFlag**: :ref:`🔗<enum_TextServer_TextOverrunFlag>` .. _class_TextServer_constant_OVERRUN_NO_TRIM: @@ -928,7 +993,7 @@ Determines whether the ellipsis at the end of the text is enforced and may not b :ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>` **OVERRUN_JUSTIFICATION_AWARE** = ``16`` - +Accounts for the text being justified before attempting to trim it (see :ref:`JustificationFlag<enum_TextServer_JustificationFlag>`). .. rst-class:: classref-item-separator @@ -938,7 +1003,7 @@ Determines whether the ellipsis at the end of the text is enforced and may not b .. rst-class:: classref-enumeration -flags **GraphemeFlag**: +flags **GraphemeFlag**: :ref:`🔗<enum_TextServer_GraphemeFlag>` .. _class_TextServer_constant_GRAPHEME_IS_VALID: @@ -1044,6 +1109,14 @@ It is safe to insert a U+0640 before this grapheme for elongation. Grapheme is an object replacement character for the embedded object. +.. _class_TextServer_constant_GRAPHEME_IS_SOFT_HYPHEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>` **GRAPHEME_IS_SOFT_HYPHEN** = ``8192`` + +Grapheme is a soft hyphen. + .. rst-class:: classref-item-separator ---- @@ -1052,7 +1125,7 @@ Grapheme is an object replacement character for the embedded object. .. rst-class:: classref-enumeration -enum **Hinting**: +enum **Hinting**: :ref:`🔗<enum_TextServer_Hinting>` .. _class_TextServer_constant_HINTING_NONE: @@ -1088,7 +1161,7 @@ Use the default font hinting mode (crisper but less smooth). .. rst-class:: classref-enumeration -enum **SubpixelPositioning**: +enum **SubpixelPositioning**: :ref:`🔗<enum_TextServer_SubpixelPositioning>` .. _class_TextServer_constant_SUBPIXEL_POSITIONING_DISABLED: @@ -1152,7 +1225,7 @@ Maximum font size which will use one quarter of the pixel subpixel positioning i .. rst-class:: classref-enumeration -enum **Feature**: +enum **Feature**: :ref:`🔗<enum_TextServer_Feature>` .. _class_TextServer_constant_FEATURE_SIMPLE_LAYOUT: @@ -1282,7 +1355,7 @@ TextServer supports `Unicode Technical Report #36 <https://unicode.org/reports/t .. rst-class:: classref-enumeration -enum **ContourPointTag**: +enum **ContourPointTag**: :ref:`🔗<enum_TextServer_ContourPointTag>` .. _class_TextServer_constant_CONTOUR_CURVE_TAG_ON: @@ -1316,7 +1389,7 @@ Contour point isn't on the curve, but serves as a control point for a cubic Béz .. rst-class:: classref-enumeration -enum **SpacingType**: +enum **SpacingType**: :ref:`🔗<enum_TextServer_SpacingType>` .. _class_TextServer_constant_SPACING_GLYPH: @@ -1356,7 +1429,7 @@ Spacing at the bottom of the line. :ref:`SpacingType<enum_TextServer_SpacingType>` **SPACING_MAX** = ``4`` - +Represents the size of the :ref:`SpacingType<enum_TextServer_SpacingType>` enum. .. rst-class:: classref-item-separator @@ -1366,7 +1439,7 @@ Spacing at the bottom of the line. .. rst-class:: classref-enumeration -flags **FontStyle**: +flags **FontStyle**: :ref:`🔗<enum_TextServer_FontStyle>` .. _class_TextServer_constant_FONT_BOLD: @@ -1400,7 +1473,7 @@ Font have fixed-width characters. .. rst-class:: classref-enumeration -enum **StructuredTextParser**: +enum **StructuredTextParser**: :ref:`🔗<enum_TextServer_StructuredTextParser>` .. _class_TextServer_constant_STRUCTURED_TEXT_DEFAULT: @@ -1440,9 +1513,7 @@ BiDi override for email. :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **STRUCTURED_TEXT_LIST** = ``4`` -BiDi override for lists. - -Structured text options: list separator ``String``. +BiDi override for lists. Structured text options: list separator :ref:`String<class_String>`. .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT: @@ -1460,6 +1531,40 @@ BiDi override for GDScript. User defined structured text BiDi override function. +.. rst-class:: classref-item-separator + +---- + +.. _enum_TextServer_FixedSizeScaleMode: + +.. rst-class:: classref-enumeration + +enum **FixedSizeScaleMode**: :ref:`🔗<enum_TextServer_FixedSizeScaleMode>` + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_DISABLE** = ``0`` + +Bitmap font is not scaled. + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1`` + +Bitmap font is scaled to the closest integer multiple of the font's fixed size. This is the recommended option for pixel art fonts. + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **FIXED_SIZE_SCALE_ENABLED** = ``2`` + +Bitmap font is scaled to an arbitrary (fractional) size. This is the recommended option for non-pixel art fonts. + .. rst-class:: classref-section-separator ---- @@ -1473,7 +1578,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID<class_RID>` **create_font** **(** **)** +:ref:`RID<class_RID>` **create_font**\ (\ ) :ref:`🔗<class_TextServer_method_create_font>` Creates a new, empty font cache entry resource. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method. @@ -1481,13 +1586,25 @@ Creates a new, empty font cache entry resource. To free the resulting resource, ---- +.. _class_TextServer_method_create_font_linked_variation: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_create_font_linked_variation>` + +Creates a new variation existing font which is reusing the same glyph cache and font data. To free the resulting resource, use the :ref:`free_rid<class_TextServer_method_free_rid>` method. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_create_shaped_text: .. rst-class:: classref-method -:ref:`RID<class_RID>` **create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction=0, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** +:ref:`RID<class_RID>` **create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>` = 0, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) :ref:`🔗<class_TextServer_method_create_shaped_text>` -Creates new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method. +Creates a new buffer for complex text layout, with the given ``direction`` and ``orientation``. To free the resulting buffer, use :ref:`free_rid<class_TextServer_method_free_rid>` method. \ **Note:** Direction is ignored if server does not support :ref:`FEATURE_BIDI_LAYOUT<class_TextServer_constant_FEATURE_BIDI_LAYOUT>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`). @@ -1501,7 +1618,7 @@ Creates new buffer for complex text layout, with the given ``direction`` and ``o .. rst-class:: classref-method -void **draw_hex_code_box** **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |const| +|void| **draw_hex_code_box**\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |const| :ref:`🔗<class_TextServer_method_draw_hex_code_box>` Draws box displaying character hexadecimal code. Used for replacing missing characters. @@ -1513,9 +1630,9 @@ Draws box displaying character hexadecimal code. Used for replacing missing char .. rst-class:: classref-method -void **font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_clear_glyphs>` -Removes all rendered glyphs information from the cache entry. +Removes all rendered glyph information from the cache entry. \ **Note:** This function will not remove textures associated with the glyphs, use :ref:`font_remove_texture<class_TextServer_method_font_remove_texture>` to remove them manually. @@ -1527,7 +1644,7 @@ Removes all rendered glyphs information from the cache entry. .. rst-class:: classref-method -void **font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** +|void| **font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_clear_kerning_map>` Removes all kerning overrides. @@ -1539,7 +1656,7 @@ Removes all kerning overrides. .. rst-class:: classref-method -void **font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)** +|void| **font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_clear_size_cache>` Removes all font sizes from the cache entry. @@ -1551,7 +1668,7 @@ Removes all font sizes from the cache entry. .. rst-class:: classref-method -void **font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_clear_textures>` Removes all textures from font cache entry. @@ -1565,7 +1682,7 @@ Removes all textures from font cache entry. .. rst-class:: classref-method -void **font_draw_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **font_draw_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextServer_method_font_draw_glyph>` Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. @@ -1581,7 +1698,7 @@ Draws single glyph into a canvas item at the position, using ``font_rid`` at the .. rst-class:: classref-method -void **font_draw_glyph_outline** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextServer_method_font_draw_glyph_outline>` Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. @@ -1597,7 +1714,7 @@ Draws single glyph outline of size ``outline_size`` into a canvas item at the po .. rst-class:: classref-method -:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_antialiasing>` Returns font anti-aliasing mode. @@ -1609,7 +1726,7 @@ Returns font anti-aliasing mode. .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_ascent>` Returns the font ascent (number of pixels above the baseline). @@ -1617,11 +1734,23 @@ Returns the font ascent (number of pixels above the baseline). ---- +.. _class_TextServer_method_font_get_baseline_offset: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_baseline_offset>` + +Returns extra baseline offset (as a fraction of font height). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_char_from_glyph_index: .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_char_from_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |const| +:ref:`int<class_int>` **font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_char_from_glyph_index>` Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. See :ref:`font_get_glyph_index<class_TextServer_method_font_get_glyph_index>`. @@ -1633,7 +1762,7 @@ Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_inde .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_descent>` Returns the font descent (number of pixels below the baseline). @@ -1641,11 +1770,23 @@ Returns the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_get_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_disable_embedded_bitmaps>` + +Returns whether the font's embedded bitmap loading is disabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_embolden: .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`float<class_float>` **font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_embolden>` Returns font embolden strength. @@ -1657,7 +1798,7 @@ Returns font embolden strength. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_face_count>` Returns number of faces in the TrueType / OpenType collection. @@ -1669,9 +1810,9 @@ Returns number of faces in the TrueType / OpenType collection. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_face_index>` -Recturns an active face index in the TrueType / OpenType collection. +Returns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator @@ -1681,7 +1822,7 @@ Recturns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_fixed_size>` Returns bitmap font fixed size. @@ -1689,11 +1830,23 @@ Returns bitmap font fixed size. ---- +.. _class_TextServer_method_font_get_fixed_size_scale_mode: + +.. rst-class:: classref-method + +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_fixed_size_scale_mode>` + +Returns bitmap font scaling mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_generate_mipmaps: .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`bool<class_bool>` **font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_generate_mipmaps>` Returns ``true`` if font texture mipmap generation is enabled. @@ -1705,7 +1858,7 @@ Returns ``true`` if font texture mipmap generation is enabled. .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_global_oversampling** **(** **)** |const| +:ref:`float<class_float>` **font_get_global_oversampling**\ (\ ) |const| :ref:`🔗<class_TextServer_method_font_get_global_oversampling>` Returns the font oversampling factor, shared by all fonts in the TextServer. @@ -1717,7 +1870,7 @@ Returns the font oversampling factor, shared by all fonts in the TextServer. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **font_get_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **font_get_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_advance>` Returns glyph advance (offset of the next glyph). @@ -1731,9 +1884,9 @@ Returns glyph advance (offset of the next glyph). .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours** **(** :ref:`RID<class_RID>` font, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_get_glyph_contours**\ (\ font\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_contours>` -Returns outline contours of the glyph as a ``Dictionary`` with the following contents: +Returns outline contours of the glyph as a :ref:`Dictionary<class_Dictionary>` with the following contents: \ ``points`` - :ref:`PackedVector3Array<class_PackedVector3Array>`, containing outline points. ``x`` and ``y`` are point coordinates. ``z`` is the type of the point, using the :ref:`ContourPointTag<enum_TextServer_ContourPointTag>` values. @@ -1749,9 +1902,9 @@ Returns outline contours of the glyph as a ``Dictionary`` with the following con .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |const| +:ref:`int<class_int>` **font_get_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_index>` -Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`. +Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index<class_TextServer_method_font_get_char_from_glyph_index>`. .. rst-class:: classref-item-separator @@ -1761,7 +1914,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_list>` Returns list of rendered glyphs in the cache entry. @@ -1773,7 +1926,7 @@ Returns list of rendered glyphs in the cache entry. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **font_get_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **font_get_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_offset>` Returns glyph offset from the baseline. @@ -1785,7 +1938,7 @@ Returns glyph offset from the baseline. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **font_get_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **font_get_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_size>` Returns size of the glyph. @@ -1797,7 +1950,7 @@ Returns size of the glyph. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`int<class_int>` **font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_idx>` Returns index of the cache texture containing the glyph. @@ -1809,7 +1962,7 @@ Returns index of the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`RID<class_RID>` **font_get_glyph_texture_rid** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`RID<class_RID>` **font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_rid>` Returns resource ID of the cache texture containing the glyph. @@ -1823,7 +1976,7 @@ Returns resource ID of the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Vector2<class_Vector2>` **font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_texture_size>` Returns size of the cache texture containing the glyph. @@ -1837,7 +1990,7 @@ Returns size of the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |const| +:ref:`Rect2<class_Rect2>` **font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_glyph_uv_rect>` Returns rectangle in the cache texture containing the glyph. @@ -1849,7 +2002,7 @@ Returns rectangle in the cache texture containing the glyph. .. rst-class:: classref-method -:ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Hinting<enum_TextServer_Hinting>` **font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_hinting>` Returns the font hinting mode. Used by dynamic fonts only. @@ -1861,7 +2014,7 @@ Returns the font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **font_get_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |const| +:ref:`Vector2<class_Vector2>` **font_get_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_kerning>` Returns kerning for the pair of glyphs. @@ -1873,7 +2026,7 @@ Returns kerning for the pair of glyphs. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_kerning_list>` Returns list of the kerning overrides. @@ -1885,7 +2038,7 @@ Returns list of the kerning overrides. .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** +:ref:`bool<class_bool>` **font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_get_language_support_override>` Returns ``true`` if support override is enabled for the ``language``. @@ -1897,7 +2050,7 @@ Returns ``true`` if support override is enabled for the ``language``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)** +:ref:`PackedStringArray<class_PackedStringArray>` **font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_get_language_support_overrides>` Returns list of language support overrides. @@ -1909,7 +2062,7 @@ Returns list of language support overrides. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_msdf_pixel_range>` Returns the width of the range around the shape between the minimum and maximum representable signed distance. @@ -1921,7 +2074,7 @@ Returns the width of the range around the shape between the minimum and maximum .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_msdf_size>` Returns source font size used to generate MSDF textures. @@ -1933,7 +2086,7 @@ Returns source font size used to generate MSDF textures. .. rst-class:: classref-method -:ref:`String<class_String>` **font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`String<class_String>` **font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_name>` Returns font family name. @@ -1945,7 +2098,7 @@ Returns font family name. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_opentype_feature_overrides>` Returns font OpenType feature set override. @@ -1957,7 +2110,7 @@ Returns font OpenType feature set override. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_ot_name_strings>` Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). @@ -1969,7 +2122,7 @@ Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (loc .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`float<class_float>` **font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_oversampling>` Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. @@ -1981,7 +2134,7 @@ Returns font oversampling factor, if set to ``0.0`` global oversampling factor i .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_scale>` Returns scaling factor of the color bitmap font. @@ -1993,7 +2146,7 @@ Returns scaling factor of the color bitmap font. .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** +:ref:`bool<class_bool>` **font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_get_script_support_override>` Returns ``true`` if support override is enabled for the ``script``. @@ -2005,7 +2158,7 @@ Returns ``true`` if support override is enabled for the ``script``. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)** +:ref:`PackedStringArray<class_PackedStringArray>` **font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_font_get_script_support_overrides>` Returns list of script support overrides. @@ -2017,9 +2170,21 @@ Returns list of script support overrides. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_size_cache_list>` + +Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_spacing: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_spacing>` -Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. +Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size). .. rst-class:: classref-item-separator @@ -2029,7 +2194,7 @@ Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_stretch>` Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. @@ -2041,7 +2206,7 @@ Returns font stretch amount, compared to a normal width. A percentage value betw .. rst-class:: classref-method -|bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |const| +|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_style>` Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. @@ -2053,7 +2218,7 @@ Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-method -:ref:`String<class_String>` **font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`String<class_String>` **font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_style_name>` Returns font style name. @@ -2065,7 +2230,7 @@ Returns font style name. .. rst-class:: classref-method -:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_subpixel_positioning>` Returns font subpixel glyph positioning mode. @@ -2077,7 +2242,7 @@ Returns font subpixel glyph positioning mode. .. rst-class:: classref-method -:ref:`String<class_String>` **font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`String<class_String>` **font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_supported_chars>` Returns a string containing all the characters available in the font. @@ -2089,7 +2254,7 @@ Returns a string containing all the characters available in the font. .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |const| +:ref:`int<class_int>` **font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_count>` Returns number of textures used by font cache entry. @@ -2101,7 +2266,7 @@ Returns number of textures used by font cache entry. .. rst-class:: classref-method -:ref:`Image<class_Image>` **font_get_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| +:ref:`Image<class_Image>` **font_get_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_image>` Returns font cache texture image data. @@ -2113,7 +2278,7 @@ Returns font cache texture image data. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **font_get_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_texture_offsets>` Returns array containing glyph packing data. @@ -2125,7 +2290,7 @@ Returns array containing glyph packing data. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Transform2D<class_Transform2D>` **font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_transform>` Returns 2D transform applied to the font outlines. @@ -2137,7 +2302,7 @@ Returns 2D transform applied to the font outlines. .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_underline_position>` Returns pixel offset of the underline below the baseline. @@ -2149,7 +2314,7 @@ Returns pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |const| +:ref:`float<class_float>` **font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_underline_thickness>` Returns thickness of the underline in pixels. @@ -2161,7 +2326,7 @@ Returns thickness of the underline in pixels. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_variation_coordinates>` Returns variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` for more info. @@ -2173,7 +2338,7 @@ Returns variation coordinates for the specified font cache entry. See :ref:`font .. rst-class:: classref-method -:ref:`int<class_int>` **font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`int<class_int>` **font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_get_weight>` Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. @@ -2185,7 +2350,7 @@ Returns weight (boldness) of the font. A value in the ``100...999`` range, norma .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |const| +:ref:`bool<class_bool>` **font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_font_has_char>` Returns ``true`` if a Unicode ``char`` is available in the font. @@ -2197,7 +2362,7 @@ Returns ``true`` if a Unicode ``char`` is available in the font. .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`bool<class_bool>` **font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_allow_system_fallback>` Returns ``true`` if system fonts can be automatically used as fallbacks. @@ -2209,7 +2374,7 @@ Returns ``true`` if system fonts can be automatically used as fallbacks. .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`bool<class_bool>` **font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_force_autohinter>` Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only. @@ -2221,7 +2386,7 @@ Returns ``true`` if auto-hinting is supported and preferred over font built-in h .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |const| +:ref:`bool<class_bool>` **font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_language_supported>` Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code). @@ -2233,7 +2398,7 @@ Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedi .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`bool<class_bool>` **font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_multichannel_signed_distance_field>` Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. @@ -2245,7 +2410,7 @@ Returns ``true`` if glyphs of all sizes are rendered using single multichannel s .. rst-class:: classref-method -:ref:`bool<class_bool>` **font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |const| +:ref:`bool<class_bool>` **font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_font_is_script_supported>` Returns ``true``, if font supports given script (ISO 15924 code). @@ -2257,7 +2422,7 @@ Returns ``true``, if font supports given script (ISO 15924 code). .. rst-class:: classref-method -void **font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** +|void| **font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_remove_glyph>` Removes specified rendered glyph information from the cache entry. @@ -2271,7 +2436,7 @@ Removes specified rendered glyph information from the cache entry. .. rst-class:: classref-method -void **font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** +|void| **font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_remove_kerning>` Removes kerning override for the pair of glyphs. @@ -2283,7 +2448,7 @@ Removes kerning override for the pair of glyphs. .. rst-class:: classref-method -void **font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** +|void| **font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_remove_language_support_override>` Remove language support override. @@ -2295,7 +2460,7 @@ Remove language support override. .. rst-class:: classref-method -void **font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** +|void| **font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_remove_script_support_override>` Removes script support override. @@ -2307,7 +2472,7 @@ Removes script support override. .. rst-class:: classref-method -void **font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** +|void| **font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TextServer_method_font_remove_size_cache>` Removes specified font size from the cache entry. @@ -2319,7 +2484,7 @@ Removes specified font size from the cache entry. .. rst-class:: classref-method -void **font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** +|void| **font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_remove_texture>` Removes specified texture from the cache entry. @@ -2333,7 +2498,7 @@ Removes specified texture from the cache entry. .. rst-class:: classref-method -void **font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** +|void| **font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_render_glyph>` Renders specified glyph to the font cache texture. @@ -2345,7 +2510,7 @@ Renders specified glyph to the font cache texture. .. rst-class:: classref-method -void **font_render_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** +|void| **font_render_range**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_render_range>` Renders the range of characters to the font cache texture. @@ -2357,7 +2522,7 @@ Renders the range of characters to the font cache texture. .. rst-class:: classref-method -void **font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** +|void| **font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_allow_system_fallback>` If set to ``true``, system fonts can be automatically used as fallbacks. @@ -2369,7 +2534,7 @@ If set to ``true``, system fonts can be automatically used as fallbacks. .. rst-class:: classref-method -void **font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** +|void| **font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) :ref:`🔗<class_TextServer_method_font_set_antialiasing>` Sets font anti-aliasing mode. @@ -2381,7 +2546,7 @@ Sets font anti-aliasing mode. .. rst-class:: classref-method -void **font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** +|void| **font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_ascent>` Sets the font ascent (number of pixels above the baseline). @@ -2389,11 +2554,23 @@ Sets the font ascent (number of pixels above the baseline). ---- +.. _class_TextServer_method_font_set_baseline_offset: + +.. rst-class:: classref-method + +|void| **font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_baseline_offset>` + +Sets extra baseline offset (as a fraction of font height). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_data: .. rst-class:: classref-method -void **font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** +|void| **font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) :ref:`🔗<class_TextServer_method_font_set_data>` Sets font source data, e.g contents of the dynamic font source file. @@ -2405,7 +2582,7 @@ Sets font source data, e.g contents of the dynamic font source file. .. rst-class:: classref-method -void **font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** +|void| **font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_descent>` Sets the font descent (number of pixels below the baseline). @@ -2413,11 +2590,23 @@ Sets the font descent (number of pixels below the baseline). ---- +.. _class_TextServer_method_font_set_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +|void| **font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_disable_embedded_bitmaps>` + +If set to ``true``, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_embolden: .. rst-class:: classref-method -void **font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** +|void| **font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_embolden>` Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. @@ -2429,7 +2618,7 @@ Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the .. rst-class:: classref-method -void **font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** +|void| **font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_face_index>` Sets an active face index in the TrueType / OpenType collection. @@ -2441,7 +2630,7 @@ Sets an active face index in the TrueType / OpenType collection. .. rst-class:: classref-method -void **font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** +|void| **font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_fixed_size>` Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. @@ -2449,11 +2638,23 @@ Sets bitmap font fixed size. If set to value greater than zero, same cache entry ---- +.. _class_TextServer_method_font_set_fixed_size_scale_mode: + +.. rst-class:: classref-method + +|void| **font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) :ref:`🔗<class_TextServer_method_font_set_fixed_size_scale_mode>` + +Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_force_autohinter: .. rst-class:: classref-method -void **font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** +|void| **font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_force_autohinter>` If set to ``true`` auto-hinting is preferred over font built-in hinting. @@ -2465,7 +2666,7 @@ If set to ``true`` auto-hinting is preferred over font built-in hinting. .. rst-class:: classref-method -void **font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** +|void| **font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_generate_mipmaps>` If set to ``true`` font texture mipmap generation is enabled. @@ -2477,7 +2678,7 @@ If set to ``true`` font texture mipmap generation is enabled. .. rst-class:: classref-method -void **font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)** +|void| **font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_global_oversampling>` Sets oversampling factor, shared by all font in the TextServer. @@ -2491,7 +2692,7 @@ Sets oversampling factor, shared by all font in the TextServer. .. rst-class:: classref-method -void **font_set_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** +|void| **font_set_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_advance>` Sets glyph advance (offset of the next glyph). @@ -2505,7 +2706,7 @@ Sets glyph advance (offset of the next glyph). .. rst-class:: classref-method -void **font_set_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** +|void| **font_set_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_offset>` Sets glyph offset from the baseline. @@ -2517,7 +2718,7 @@ Sets glyph offset from the baseline. .. rst-class:: classref-method -void **font_set_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** +|void| **font_set_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_size>` Sets size of the glyph. @@ -2529,7 +2730,7 @@ Sets size of the glyph. .. rst-class:: classref-method -void **font_set_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** +|void| **font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_texture_idx>` Sets index of the cache texture containing the glyph. @@ -2541,7 +2742,7 @@ Sets index of the cache texture containing the glyph. .. rst-class:: classref-method -void **font_set_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** +|void| **font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_TextServer_method_font_set_glyph_uv_rect>` Sets rectangle in the cache texture containing the glyph. @@ -2553,7 +2754,7 @@ Sets rectangle in the cache texture containing the glyph. .. rst-class:: classref-method -void **font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** +|void| **font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) :ref:`🔗<class_TextServer_method_font_set_hinting>` Sets font hinting mode. Used by dynamic fonts only. @@ -2565,7 +2766,7 @@ Sets font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-method -void **font_set_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** +|void| **font_set_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TextServer_method_font_set_kerning>` Sets kerning for the pair of glyphs. @@ -2577,7 +2778,7 @@ Sets kerning for the pair of glyphs. .. rst-class:: classref-method -void **font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** +|void| **font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_language_support_override>` Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_is_language_supported>`. @@ -2589,7 +2790,7 @@ Adds override for :ref:`font_is_language_supported<class_TextServer_method_font_ .. rst-class:: classref-method -void **font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** +|void| **font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_msdf_pixel_range>` Sets the width of the range around the shape between the minimum and maximum representable signed distance. @@ -2601,7 +2802,7 @@ Sets the width of the range around the shape between the minimum and maximum rep .. rst-class:: classref-method -void **font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** +|void| **font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_msdf_size>` Sets source font size used to generate MSDF textures. @@ -2613,7 +2814,7 @@ Sets source font size used to generate MSDF textures. .. rst-class:: classref-method -void **font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** +|void| **font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_multichannel_signed_distance_field>` If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. @@ -2627,7 +2828,7 @@ If set to ``true``, glyphs of all sizes are rendered using single multichannel s .. rst-class:: classref-method -void **font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** +|void| **font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_set_name>` Sets the font family name. @@ -2639,7 +2840,7 @@ Sets the font family name. .. rst-class:: classref-method -void **font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** +|void| **font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_TextServer_method_font_set_opentype_feature_overrides>` Sets font OpenType feature set override. @@ -2651,7 +2852,7 @@ Sets font OpenType feature set override. .. rst-class:: classref-method -void **font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** +|void| **font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_oversampling>` Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. @@ -2663,7 +2864,7 @@ Sets font oversampling factor, if set to ``0.0`` global oversampling factor is u .. rst-class:: classref-method -void **font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** +|void| **font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_scale>` Sets scaling factor of the color bitmap font. @@ -2675,7 +2876,7 @@ Sets scaling factor of the color bitmap font. .. rst-class:: classref-method -void **font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** +|void| **font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_font_set_script_support_override>` Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is_script_supported>`. @@ -2683,11 +2884,23 @@ Adds override for :ref:`font_is_script_supported<class_TextServer_method_font_is ---- +.. _class_TextServer_method_font_set_spacing: + +.. rst-class:: classref-method + +|void| **font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_spacing>` + +Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size). + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_stretch: .. rst-class:: classref-method -void **font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** +|void| **font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_stretch>` Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. @@ -2701,7 +2914,7 @@ Sets font stretch amount, compared to a normal width. A percentage value between .. rst-class:: classref-method -void **font_set_style** **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** +|void| **font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) :ref:`🔗<class_TextServer_method_font_set_style>` Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. @@ -2715,7 +2928,7 @@ Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-method -void **font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** +|void| **font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_font_set_style_name>` Sets the font style name. @@ -2727,7 +2940,7 @@ Sets the font style name. .. rst-class:: classref-method -void **font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** +|void| **font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) :ref:`🔗<class_TextServer_method_font_set_subpixel_positioning>` Sets font subpixel glyph positioning mode. @@ -2739,7 +2952,7 @@ Sets font subpixel glyph positioning mode. .. rst-class:: classref-method -void **font_set_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** +|void| **font_set_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) :ref:`🔗<class_TextServer_method_font_set_texture_image>` Sets font cache texture image data. @@ -2751,7 +2964,7 @@ Sets font cache texture image data. .. rst-class:: classref-method -void **font_set_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** +|void| **font_set_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_TextServer_method_font_set_texture_offsets>` Sets array containing glyph packing data. @@ -2763,9 +2976,9 @@ Sets array containing glyph packing data. .. rst-class:: classref-method -void **font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** +|void| **font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_TextServer_method_font_set_transform>` -Sets 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. For example, to simulate italic typeface by slanting, apply the following transform ``Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)``. @@ -2777,7 +2990,7 @@ For example, to simulate italic typeface by slanting, apply the following transf .. rst-class:: classref-method -void **font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** +|void| **font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_underline_position>` Sets pixel offset of the underline below the baseline. @@ -2789,7 +3002,7 @@ Sets pixel offset of the underline below the baseline. .. rst-class:: classref-method -void **font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** +|void| **font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TextServer_method_font_set_underline_thickness>` Sets thickness of the underline in pixels. @@ -2801,7 +3014,7 @@ Sets thickness of the underline in pixels. .. rst-class:: classref-method -void **font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** +|void| **font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_TextServer_method_font_set_variation_coordinates>` Sets variation coordinates for the specified font cache entry. See :ref:`font_supported_variation_list<class_TextServer_method_font_supported_variation_list>` for more info. @@ -2813,7 +3026,7 @@ Sets variation coordinates for the specified font cache entry. See :ref:`font_su .. rst-class:: classref-method -void **font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** +|void| **font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_font_set_weight>` Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. @@ -2827,7 +3040,7 @@ Sets weight (boldness) of the font. A value in the ``100...999`` range, normal f .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_supported_feature_list>` Returns the dictionary of the supported OpenType features. @@ -2839,7 +3052,7 @@ Returns the dictionary of the supported OpenType features. .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |const| +:ref:`Dictionary<class_Dictionary>` **font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_font_supported_variation_list>` Returns the dictionary of the supported OpenType variation coordinates. @@ -2851,7 +3064,7 @@ Returns the dictionary of the supported OpenType variation coordinates. .. rst-class:: classref-method -:ref:`String<class_String>` **format_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| +:ref:`String<class_String>` **format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_format_number>` Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``. @@ -2865,7 +3078,7 @@ If ``language`` is omitted, the active locale will be used. .. rst-class:: classref-method -void **free_rid** **(** :ref:`RID<class_RID>` rid **)** +|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_free_rid>` Frees an object created by this **TextServer**. @@ -2877,7 +3090,7 @@ Frees an object created by this **TextServer**. .. rst-class:: classref-method -:ref:`int<class_int>` **get_features** **(** **)** |const| +:ref:`int<class_int>` **get_features**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_features>` Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`. @@ -2889,7 +3102,7 @@ Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |const| +:ref:`Vector2<class_Vector2>` **get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_get_hex_code_box_size>` Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). @@ -2901,7 +3114,7 @@ Returns size of the replacement character (box with character hexadecimal code t .. rst-class:: classref-method -:ref:`String<class_String>` **get_name** **(** **)** |const| +:ref:`String<class_String>` **get_name**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_name>` Returns the name of the server interface. @@ -2913,7 +3126,7 @@ Returns the name of the server interface. .. rst-class:: classref-method -:ref:`String<class_String>` **get_support_data_filename** **(** **)** |const| +:ref:`String<class_String>` **get_support_data_filename**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_support_data_filename>` Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. @@ -2925,7 +3138,7 @@ Returns default TextServer database (e.g. ICU break iterators and dictionaries) .. rst-class:: classref-method -:ref:`String<class_String>` **get_support_data_info** **(** **)** |const| +:ref:`String<class_String>` **get_support_data_info**\ (\ ) |const| :ref:`🔗<class_TextServer_method_get_support_data_info>` Returns TextServer database (e.g. ICU break iterators and dictionaries) description. @@ -2937,7 +3150,7 @@ Returns TextServer database (e.g. ICU break iterators and dictionaries) descript .. rst-class:: classref-method -:ref:`bool<class_bool>` **has** **(** :ref:`RID<class_RID>` rid **)** +:ref:`bool<class_bool>` **has**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_has>` Returns ``true`` if ``rid`` is valid resource owned by this text server. @@ -2949,7 +3162,7 @@ Returns ``true`` if ``rid`` is valid resource owned by this text server. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |const| +:ref:`bool<class_bool>` **has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |const| :ref:`🔗<class_TextServer_method_has_feature>` Returns ``true`` if the server supports a feature. @@ -2961,7 +3174,7 @@ Returns ``true`` if the server supports a feature. .. rst-class:: classref-method -:ref:`int<class_int>` **is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |const| +:ref:`int<class_int>` **is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |const| :ref:`🔗<class_TextServer_method_is_confusable>` Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. @@ -2977,7 +3190,7 @@ Returns index of the first string in ``dict`` which is visually confusable with .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |const| +:ref:`bool<class_bool>` **is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_is_locale_right_to_left>` Returns ``true`` if locale is right-to-left. @@ -2989,7 +3202,7 @@ Returns ``true`` if locale is right-to-left. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_identifier** **(** :ref:`String<class_String>` string **)** |const| +:ref:`bool<class_bool>` **is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_is_valid_identifier>` Returns ``true`` if ``string`` is a valid identifier. @@ -3013,11 +3226,23 @@ If the :ref:`FEATURE_UNICODE_IDENTIFIERS<class_TextServer_constant_FEATURE_UNICO ---- +.. _class_TextServer_method_is_valid_letter: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_valid_letter**\ (\ unicode\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_is_valid_letter>` + +Returns ``true`` if the given code point is a valid letter, i.e. it belongs to the Unicode category "L". + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_load_support_data: .. rst-class:: classref-method -:ref:`bool<class_bool>` **load_support_data** **(** :ref:`String<class_String>` filename **)** +:ref:`bool<class_bool>` **load_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_load_support_data>` Loads optional TextServer database (e.g. ICU break iterators and dictionaries). @@ -3031,9 +3256,9 @@ Loads optional TextServer database (e.g. ICU break iterators and dictionaries). .. rst-class:: classref-method -:ref:`int<class_int>` **name_to_tag** **(** :ref:`String<class_String>` name **)** |const| +:ref:`int<class_int>` **name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_name_to_tag>` -Converts readable feature, variation, script or language name to OpenType tag. +Converts readable feature, variation, script, or language name to OpenType tag. .. rst-class:: classref-item-separator @@ -3043,7 +3268,7 @@ Converts readable feature, variation, script or language name to OpenType tag. .. rst-class:: classref-method -:ref:`String<class_String>` **parse_number** **(** :ref:`String<class_String>` number, :ref:`String<class_String>` language="" **)** |const| +:ref:`String<class_String>` **parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_parse_number>` Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9). @@ -3055,7 +3280,7 @@ Converts ``number`` from the numeral systems used in ``language`` to Western Ara .. rst-class:: classref-method -:ref:`Vector3i[]<class_Vector3i>` **parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_parse_structured_text>` Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info. @@ -3067,7 +3292,7 @@ Default implementation of the BiDi algorithm override function. See :ref:`Struct .. rst-class:: classref-method -:ref:`String<class_String>` **percent_sign** **(** :ref:`String<class_String>` language="" **)** |const| +:ref:`String<class_String>` **percent_sign**\ (\ language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_percent_sign>` Returns percent sign used in the ``language``. @@ -3079,7 +3304,7 @@ Returns percent sign used in the ``language``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **save_support_data** **(** :ref:`String<class_String>` filename **)** |const| +:ref:`bool<class_bool>` **save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_save_support_data>` Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. @@ -3093,7 +3318,7 @@ Saves optional TextServer database (e.g. ICU break iterators and dictionaries) t .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`int<class_int>` **shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_count>` Returns number of text spans added using :ref:`shaped_text_add_string<class_TextServer_method_shaped_text_add_string>` or :ref:`shaped_text_add_object<class_TextServer_method_shaped_text_add_object>`. @@ -3105,7 +3330,7 @@ Returns number of text spans added using :ref:`shaped_text_add_string<class_Text .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |const| +:ref:`Variant<class_Variant>` **shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_get_span_meta>` Returns text span metadata. @@ -3117,9 +3342,9 @@ Returns text span metadata. .. rst-class:: classref-method -void **shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={} **)** +|void| **shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}\ ) :ref:`🔗<class_TextServer_method_shaped_set_span_update_font>` -Changes text span font, font size and OpenType features, without changing the text. +Changes text span font, font size, and OpenType features, without changing the text. .. rst-class:: classref-item-separator @@ -3129,7 +3354,7 @@ Changes text span font, font size and OpenType features, without changing the te .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_add_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`int<class_int>` length=1, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **shaped_text_add_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, length\: :ref:`int<class_int>` = 1, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextServer_method_shaped_text_add_object>` Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. @@ -3141,7 +3366,7 @@ Adds inline object to the text buffer, ``key`` must be unique. In the text, obje .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features={}, :ref:`String<class_String>` language="", :ref:`Variant<class_Variant>` meta=null **)** +:ref:`bool<class_bool>` **shaped_text_add_string**\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>` = {}, language\: :ref:`String<class_String>` = "", meta\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_TextServer_method_shaped_text_add_string>` Adds text span and font to draw it to the text buffer. @@ -3153,7 +3378,7 @@ Adds text span and font to draw it to the text buffer. .. rst-class:: classref-method -void **shaped_text_clear** **(** :ref:`RID<class_RID>` rid **)** +|void| **shaped_text_clear**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_clear>` Clears text buffer (removes text and inline objects). @@ -3161,11 +3386,23 @@ Clears text buffer (removes text and inline objects). ---- +.. _class_TextServer_method_shaped_text_closest_character_pos: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_closest_character_pos>` + +Returns composite character position closest to the ``pos``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_draw: .. rst-class:: classref-method -void **shaped_text_draw** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **shaped_text_draw**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_draw>` Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). @@ -3177,7 +3414,7 @@ Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` .. rst-class:: classref-method -void **shaped_text_draw_outline** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l=-1, :ref:`float<class_float>` clip_r=-1, :ref:`int<class_int>` outline_size=1, :ref:`Color<class_Color>` color=Color(1, 1, 1, 1) **)** |const| +|void| **shaped_text_draw_outline**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>` = -1, clip_r\: :ref:`float<class_float>` = -1, outline_size\: :ref:`int<class_int>` = 1, color\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1)\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_draw_outline>` Draw the outline of the shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). @@ -3189,7 +3426,7 @@ Draw the outline of the shaped text into a canvas item at a given position, with .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags=3 **)** +:ref:`float<class_float>` **shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\] = 3\ ) :ref:`🔗<class_TextServer_method_shaped_text_fit_to_width>` Adjusts text width to fit to specified width, returns new text width. @@ -3201,7 +3438,7 @@ Adjusts text width to fit to specified width, returns new text width. .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`float<class_float>` **shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ascent>` Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). @@ -3215,7 +3452,7 @@ Returns the text ascent (number of pixels above the baseline for horizontal layo .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position **)** |const| +:ref:`Dictionary<class_Dictionary>` **shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_carets>` Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle. @@ -3223,11 +3460,35 @@ Returns shapes of the carets corresponding to the character offset ``position`` ---- +.. _class_TextServer_method_shaped_text_get_character_breaks: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_character_breaks>` + +Returns array of the composite character boundaries. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_shaped_text_get_custom_ellipsis: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_custom_ellipsis>` + +Returns ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_get_custom_punctuation: .. rst-class:: classref-method -:ref:`String<class_String>` **shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`String<class_String>` **shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_custom_punctuation>` Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. @@ -3239,7 +3500,7 @@ Returns custom punctuation character list, used for word breaking. If set to emp .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`float<class_float>` **shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_descent>` Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). @@ -3253,7 +3514,7 @@ Returns the text descent (number of pixels below the baseline for horizontal lay .. rst-class:: classref-method -:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_direction>` Returns direction of the text. @@ -3265,7 +3526,7 @@ Returns direction of the text. .. rst-class:: classref-method -:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| +:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_dominant_direction_in_range>` Returns dominant direction of in the range of text. @@ -3277,7 +3538,7 @@ Returns dominant direction of in the range of text. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`int<class_int>` **shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_glyph_count>` Returns number of glyphs in the ellipsis. @@ -3289,7 +3550,7 @@ Returns number of glyphs in the ellipsis. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_glyphs>` Returns array of the glyphs in the ellipsis. @@ -3301,7 +3562,7 @@ Returns array of the glyphs in the ellipsis. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`int<class_int>` **shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_ellipsis_pos>` Returns position of the ellipsis. @@ -3313,7 +3574,7 @@ Returns position of the ellipsis. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`int<class_int>` **shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_glyph_count>` Returns number of glyphs in the buffer. @@ -3325,7 +3586,7 @@ Returns number of glyphs in the buffer. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_glyphs>` Returns an array of glyphs in the visual order. @@ -3337,7 +3598,7 @@ Returns an array of glyphs in the visual order. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| +:ref:`Vector2<class_Vector2>` **shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_grapheme_bounds>` Returns composite character's bounds as offsets from the start of the line. @@ -3349,7 +3610,7 @@ Returns composite character's bounds as offsets from the start of the line. .. rst-class:: classref-method -:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Direction<enum_TextServer_Direction>` **shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_inferred_direction>` Returns direction of the text, inferred by the BiDi algorithm. @@ -3361,7 +3622,7 @@ Returns direction of the text, inferred by the BiDi algorithm. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start=0, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>` = 0, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_line_breaks>` Breaks text to the lines and returns character ranges for each line. @@ -3373,7 +3634,7 @@ Breaks text to the lines and returns character ranges for each line. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start=0, :ref:`bool<class_bool>` once=true, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags=3 **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>` = 0, once\: :ref:`bool<class_bool>` = true, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\] = 3\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_line_breaks_adv>` Breaks text to the lines and columns. Returns character ranges for each segment. @@ -3381,11 +3642,35 @@ Breaks text to the lines and columns. Returns character ranges for each segment. ---- +.. _class_TextServer_method_shaped_text_get_object_glyph: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_glyph>` + +Returns the glyph index of the inline object. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_shaped_text_get_object_range: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_range>` + +Returns the character range of the inline object. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_get_object_rect: .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |const| +:ref:`Rect2<class_Rect2>` **shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_object_rect>` Returns bounding rectangle of the inline object. @@ -3397,7 +3682,7 @@ Returns bounding rectangle of the inline object. .. rst-class:: classref-method -:ref:`Array<class_Array>` **shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Array<class_Array>` **shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_objects>` Returns array of inline objects. @@ -3409,7 +3694,7 @@ Returns array of inline objects. .. rst-class:: classref-method -:ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Orientation<enum_TextServer_Orientation>` **shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_orientation>` Returns text orientation. @@ -3421,7 +3706,7 @@ Returns text orientation. .. rst-class:: classref-method -:ref:`RID<class_RID>` **shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`RID<class_RID>` **shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_parent>` Returns the parent buffer from which the substring originates. @@ -3433,7 +3718,7 @@ Returns the parent buffer from which the substring originates. .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`bool<class_bool>` **shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_preserve_control>` Returns ``true`` if text buffer is configured to display control characters. @@ -3445,7 +3730,7 @@ Returns ``true`` if text buffer is configured to display control characters. .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`bool<class_bool>` **shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_preserve_invalid>` Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters. @@ -3459,7 +3744,7 @@ Returns ``true`` if text buffer is configured to display hexadecimal codes in pl .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Vector2i<class_Vector2i>` **shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_range>` Returns substring buffer character range in the parent buffer. @@ -3471,7 +3756,7 @@ Returns substring buffer character range in the parent buffer. .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_selection>` Returns selection rectangles for the specified character range. @@ -3483,7 +3768,7 @@ Returns selection rectangles for the specified character range. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`Vector2<class_Vector2>` **shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_size>` Returns size of the text. @@ -3495,7 +3780,7 @@ Returns size of the text. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |const| +:ref:`int<class_int>` **shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_spacing>` Returns extra spacing added between glyphs or lines in pixels. @@ -3507,7 +3792,7 @@ Returns extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`int<class_int>` **shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_trim_pos>` Returns the position of the overrun trim. @@ -3519,7 +3804,7 @@ Returns the position of the overrun trim. .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`float<class_float>` **shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_underline_position>` Returns pixel offset of the underline below the baseline. @@ -3531,7 +3816,7 @@ Returns pixel offset of the underline below the baseline. .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`float<class_float>` **shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_underline_thickness>` Returns thickness of the underline. @@ -3543,7 +3828,7 @@ Returns thickness of the underline. .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`float<class_float>` **shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_width>` Returns width (for horizontal layout) or height (for vertical) of the text. @@ -3555,7 +3840,7 @@ Returns width (for horizontal layout) or height (for vertical) of the text. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags=264 **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 264, skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\] = 4\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_get_word_breaks>` Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`). @@ -3567,9 +3852,9 @@ Breaks text into words and returns array of character ranges. Use ``grapheme_fla .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_has_visible_chars** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`bool<class_bool>` **shaped_text_has_visible_chars**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_has_visible_chars>` -Returns ``true``, if text buffer contents any visible characters. +Returns ``true`` if text buffer contains any visible characters. .. rst-class:: classref-item-separator @@ -3579,7 +3864,7 @@ Returns ``true``, if text buffer contents any visible characters. .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| +:ref:`int<class_int>` **shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_hit_test_grapheme>` Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found. @@ -3591,7 +3876,7 @@ Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coords **)** |const| +:ref:`int<class_int>` **shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coords\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_hit_test_position>` Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. @@ -3603,7 +3888,7 @@ Returns caret character offset at the specified pixel offset at the baseline. Th .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |const| +:ref:`bool<class_bool>` **shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_is_ready>` Returns ``true`` if buffer is successfully shaped. @@ -3611,11 +3896,11 @@ Returns ``true`` if buffer is successfully shaped. ---- -.. _class_TextServer_method_shaped_text_next_grapheme_pos: +.. _class_TextServer_method_shaped_text_next_character_pos: .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| +:ref:`int<class_int>` **shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_next_character_pos>` Returns composite character end position closest to the ``pos``. @@ -3623,11 +3908,23 @@ Returns composite character end position closest to the ``pos``. ---- +.. _class_TextServer_method_shaped_text_next_grapheme_pos: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_next_grapheme_pos>` + +Returns grapheme end position closest to the ``pos``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_overrun_trim_to_width: .. rst-class:: classref-method -void **shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width=0, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> overrun_trim_flags=0 **)** +|void| **shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>` = 0, overrun_trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\] = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_overrun_trim_to_width>` Trims text if it exceeds the given width. @@ -3635,11 +3932,11 @@ Trims text if it exceeds the given width. ---- -.. _class_TextServer_method_shaped_text_prev_grapheme_pos: +.. _class_TextServer_method_shaped_text_prev_character_pos: .. rst-class:: classref-method -:ref:`int<class_int>` **shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |const| +:ref:`int<class_int>` **shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_prev_character_pos>` Returns composite character start position closest to the ``pos``. @@ -3647,11 +3944,23 @@ Returns composite character start position closest to the ``pos``. ---- +.. _class_TextServer_method_shaped_text_prev_grapheme_pos: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_prev_grapheme_pos>` + +Returns grapheme start position closest to the ``pos``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_resize_object: .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_resize_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align=5, :ref:`float<class_float>` baseline=0.0 **)** +:ref:`bool<class_bool>` **shaped_text_resize_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` = 5, baseline\: :ref:`float<class_float>` = 0.0\ ) :ref:`🔗<class_TextServer_method_shaped_text_resize_object>` Sets new size and alignment of embedded object. @@ -3663,7 +3972,7 @@ Sets new size and alignment of embedded object. .. rst-class:: classref-method -void **shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** +|void| **shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_bidi_override>` Overrides BiDi for the structured text. @@ -3673,11 +3982,23 @@ Override ranges should cover full source text without overlaps. BiDi algorithm w ---- +.. _class_TextServer_method_shaped_text_set_custom_ellipsis: + +.. rst-class:: classref-method + +|void| **shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_custom_ellipsis>` + +Sets ellipsis character used for text clipping. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_set_custom_punctuation: .. rst-class:: classref-method -void **shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** +|void| **shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_custom_punctuation>` Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. @@ -3689,7 +4010,7 @@ Sets custom punctuation character list, used for word breaking. If set to empty .. rst-class:: classref-method -void **shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction=0 **)** +|void| **shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>` = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_direction>` Sets desired text direction. If set to :ref:`DIRECTION_AUTO<class_TextServer_constant_DIRECTION_AUTO>`, direction will be detected based on the buffer contents and current locale. @@ -3703,7 +4024,7 @@ Sets desired text direction. If set to :ref:`DIRECTION_AUTO<class_TextServer_con .. rst-class:: classref-method -void **shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation=0 **)** +|void| **shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>` = 0\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_orientation>` Sets desired text orientation. @@ -3717,7 +4038,7 @@ Sets desired text orientation. .. rst-class:: classref-method -void **shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** +|void| **shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_preserve_control>` If set to ``true`` text buffer will display control characters. @@ -3729,7 +4050,7 @@ If set to ``true`` text buffer will display control characters. .. rst-class:: classref-method -void **shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** +|void| **shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_preserve_invalid>` If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. @@ -3741,7 +4062,7 @@ If set to ``true`` text buffer will display invalid characters as hexadecimal co .. rst-class:: classref-method -void **shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** +|void| **shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_set_spacing>` Sets extra spacing added between glyphs or lines in pixels. @@ -3753,7 +4074,7 @@ Sets extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-method -:ref:`bool<class_bool>` **shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)** +:ref:`bool<class_bool>` **shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_shape>` Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully. @@ -3767,7 +4088,7 @@ Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped succe .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)** +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_sort_logical>` Returns text glyphs in the logical order. @@ -3779,7 +4100,7 @@ Returns text glyphs in the logical order. .. rst-class:: classref-method -:ref:`RID<class_RID>` **shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |const| +:ref:`RID<class_RID>` **shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_shaped_text_substr>` Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects). @@ -3791,7 +4112,7 @@ Returns text buffer for the substring of the text in the ``shaped`` text buffer .. rst-class:: classref-method -:ref:`float<class_float>` **shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** +:ref:`float<class_float>` **shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) :ref:`🔗<class_TextServer_method_shaped_text_tab_align>` Aligns shaped text to the given tab-stops. @@ -3803,7 +4124,7 @@ Aligns shaped text to the given tab-stops. .. rst-class:: classref-method -:ref:`bool<class_bool>` **spoof_check** **(** :ref:`String<class_String>` string **)** |const| +:ref:`bool<class_bool>` **spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_spoof_check>` Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. @@ -3813,11 +4134,28 @@ Returns ``true`` if ``string`` is likely to be an attempt at confusing the reade ---- +.. _class_TextServer_method_string_get_character_breaks: + +.. rst-class:: classref-method + +:ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_get_character_breaks>` + +Returns array of the composite character boundaries. + +:: + + var ts = TextServerManager.get_primary_interface() + print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_string_get_word_breaks: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="", :ref:`int<class_int>` chars_per_line=0 **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **string_get_word_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = "", chars_per_line\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TextServer_method_string_get_word_breaks>` Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. @@ -3826,8 +4164,9 @@ When ``chars_per_line`` is greater than zero, line break boundaries are returned :: var ts = TextServerManager.get_primary_interface() - print(ts.string_get_word_breaks("Godot Engine")) # Prints [0, 5, 6, 12] - print(ts.string_get_word_breaks("Godot Engine", "en", 5)) # Prints [0, 5, 6, 11, 11, 12] + print(ts.string_get_word_breaks("The Godot Engine, 4")) # Prints [0, 3, 4, 9, 10, 16, 18, 19], which corresponds to the following substrings: "The", "Godot", "Engine", "4" + print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 5)) # Prints [0, 3, 4, 9, 10, 15, 15, 19], which corresponds to the following substrings: "The", "Godot", "Engin", "e, 4" + print(ts.string_get_word_breaks("The Godot Engine, 4", "en", 10)) # Prints [0, 9, 10, 19], which corresponds to the following substrings: "The Godot", "Engine, 4" .. rst-class:: classref-item-separator @@ -3837,7 +4176,7 @@ When ``chars_per_line`` is greater than zero, line break boundaries are returned .. rst-class:: classref-method -:ref:`String<class_String>` **string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| +:ref:`String<class_String>` **string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_lower>` Returns the string converted to lowercase. @@ -3849,11 +4188,27 @@ Returns the string converted to lowercase. ---- +.. _class_TextServer_method_string_to_title: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **string_to_title**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_title>` + +Returns the string converted to title case. + +\ **Note:** Casing is locale dependent and context sensitive if server support :ref:`FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION<class_TextServer_constant_FEATURE_CONTEXT_SENSITIVE_CASE_CONVERSION>` feature (supported by :ref:`TextServerAdvanced<class_TextServerAdvanced>`). + +\ **Note:** The result may be longer or shorter than the original. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_string_to_upper: .. rst-class:: classref-method -:ref:`String<class_String>` **string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language="" **)** |const| +:ref:`String<class_String>` **string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>` = ""\ ) |const| :ref:`🔗<class_TextServer_method_string_to_upper>` Returns the string converted to uppercase. @@ -3869,7 +4224,7 @@ Returns the string converted to uppercase. .. rst-class:: classref-method -:ref:`String<class_String>` **strip_diacritics** **(** :ref:`String<class_String>` string **)** |const| +:ref:`String<class_String>` **strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServer_method_strip_diacritics>` Strips diacritics from the string. @@ -3883,9 +4238,9 @@ Strips diacritics from the string. .. rst-class:: classref-method -:ref:`String<class_String>` **tag_to_name** **(** :ref:`int<class_int>` tag **)** |const| +:ref:`String<class_String>` **tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServer_method_tag_to_name>` -Converts OpenType tag to readable feature, variation, script or language name. +Converts OpenType tag to readable feature, variation, script, or language name. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -3894,3 +4249,4 @@ Converts OpenType tag to readable feature, variation, script or language name. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textserveradvanced.rst b/classes/class_textserveradvanced.rst index 819fbea5f15..beed8294dd6 100644 --- a/classes/class_textserveradvanced.rst +++ b/classes/class_textserveradvanced.rst @@ -28,3 +28,4 @@ An implementation of :ref:`TextServer<class_TextServer>` that uses HarfBuzz, ICU .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textserverdummy.rst b/classes/class_textserverdummy.rst index 8e65c928b71..932e4df4fa5 100644 --- a/classes/class_textserverdummy.rst +++ b/classes/class_textserverdummy.rst @@ -43,3 +43,4 @@ The command line argument ``--text-driver Dummy`` (case-sensitive) can be used t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 3427cd3cc28..04c009aa4eb 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -31,399 +31,439 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cleanup<class_TextServerExtension_method__cleanup>` **(** **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_create_font<class_TextServerExtension_method__create_font>` **(** **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_create_shaped_text<class_TextServerExtension_method__create_shaped_text>` **(** :ref:`Direction<enum_TextServer_Direction>` direction, :ref:`Orientation<enum_TextServer_Orientation>` orientation **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_hex_code_box<class_TextServerExtension_method__draw_hex_code_box>` **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_glyphs<class_TextServerExtension_method__font_clear_glyphs>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_kerning_map<class_TextServerExtension_method__font_clear_kerning_map>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_size_cache<class_TextServerExtension_method__font_clear_size_cache>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_textures<class_TextServerExtension_method__font_clear_textures>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_draw_glyph<class_TextServerExtension_method__font_draw_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_draw_glyph_outline<class_TextServerExtension_method__font_draw_glyph_outline>` **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`_font_get_antialiasing<class_TextServerExtension_method__font_get_antialiasing>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_ascent<class_TextServerExtension_method__font_get_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_char_from_glyph_index<class_TextServerExtension_method__font_get_char_from_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_descent<class_TextServerExtension_method__font_get_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_embolden<class_TextServerExtension_method__font_get_embolden>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_face_count<class_TextServerExtension_method__font_get_face_count>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_face_index<class_TextServerExtension_method__font_get_face_index>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_fixed_size<class_TextServerExtension_method__font_get_fixed_size>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_get_generate_mipmaps<class_TextServerExtension_method__font_get_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_global_oversampling<class_TextServerExtension_method__font_get_global_oversampling>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_advance<class_TextServerExtension_method__font_get_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_glyph_contours<class_TextServerExtension_method__font_get_glyph_contours>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_glyph_index<class_TextServerExtension_method__font_get_glyph_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_font_get_glyph_list<class_TextServerExtension_method__font_get_glyph_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_offset<class_TextServerExtension_method__font_get_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_size<class_TextServerExtension_method__font_get_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_glyph_texture_idx<class_TextServerExtension_method__font_get_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_font_get_glyph_texture_rid<class_TextServerExtension_method__font_get_glyph_texture_rid>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_texture_size<class_TextServerExtension_method__font_get_glyph_texture_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`_font_get_glyph_uv_rect<class_TextServerExtension_method__font_get_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`_font_get_hinting<class_TextServerExtension_method__font_get_hinting>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_kerning<class_TextServerExtension_method__font_get_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`_font_get_kerning_list<class_TextServerExtension_method__font_get_kerning_list>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_get_language_support_override<class_TextServerExtension_method__font_get_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_font_get_language_support_overrides<class_TextServerExtension_method__font_get_language_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_msdf_pixel_range<class_TextServerExtension_method__font_get_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_msdf_size<class_TextServerExtension_method__font_get_msdf_size>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_font_get_name<class_TextServerExtension_method__font_get_name>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_opentype_feature_overrides<class_TextServerExtension_method__font_get_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_ot_name_strings<class_TextServerExtension_method__font_get_ot_name_strings>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_oversampling<class_TextServerExtension_method__font_get_oversampling>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_scale<class_TextServerExtension_method__font_get_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_get_script_support_override<class_TextServerExtension_method__font_get_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_font_get_script_support_overrides<class_TextServerExtension_method__font_get_script_support_overrides>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`_font_get_size_cache_list<class_TextServerExtension_method__font_get_size_cache_list>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_stretch<class_TextServerExtension_method__font_get_stretch>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> | :ref:`_font_get_style<class_TextServerExtension_method__font_get_style>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_font_get_style_name<class_TextServerExtension_method__font_get_style_name>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`_font_get_subpixel_positioning<class_TextServerExtension_method__font_get_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_font_get_supported_chars<class_TextServerExtension_method__font_get_supported_chars>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_texture_count<class_TextServerExtension_method__font_get_texture_count>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`_font_get_texture_image<class_TextServerExtension_method__font_get_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_font_get_texture_offsets<class_TextServerExtension_method__font_get_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`_font_get_transform<class_TextServerExtension_method__font_get_transform>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_underline_position<class_TextServerExtension_method__font_get_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_font_get_underline_thickness<class_TextServerExtension_method__font_get_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_variation_coordinates<class_TextServerExtension_method__font_get_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_font_get_weight<class_TextServerExtension_method__font_get_weight>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_has_char<class_TextServerExtension_method__font_has_char>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_is_allow_system_fallback<class_TextServerExtension_method__font_is_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_is_force_autohinter<class_TextServerExtension_method__font_is_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_is_language_supported<class_TextServerExtension_method__font_is_language_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_is_multichannel_signed_distance_field<class_TextServerExtension_method__font_is_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_font_is_script_supported<class_TextServerExtension_method__font_is_script_supported>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_glyph<class_TextServerExtension_method__font_remove_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_kerning<class_TextServerExtension_method__font_remove_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_language_support_override<class_TextServerExtension_method__font_remove_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_script_support_override<class_TextServerExtension_method__font_remove_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_size_cache<class_TextServerExtension_method__font_remove_size_cache>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_texture<class_TextServerExtension_method__font_remove_texture>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_render_glyph<class_TextServerExtension_method__font_render_glyph>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_render_range<class_TextServerExtension_method__font_render_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_allow_system_fallback<class_TextServerExtension_method__font_set_allow_system_fallback>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_antialiasing<class_TextServerExtension_method__font_set_antialiasing>` **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_ascent<class_TextServerExtension_method__font_set_ascent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_data<class_TextServerExtension_method__font_set_data>` **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_data_ptr<class_TextServerExtension_method__font_set_data_ptr>` **(** :ref:`RID<class_RID>` font_rid, const uint8_t* data_ptr, :ref:`int<class_int>` data_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_descent<class_TextServerExtension_method__font_set_descent>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_embolden<class_TextServerExtension_method__font_set_embolden>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_face_index<class_TextServerExtension_method__font_set_face_index>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_fixed_size<class_TextServerExtension_method__font_set_fixed_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_force_autohinter<class_TextServerExtension_method__font_set_force_autohinter>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_generate_mipmaps<class_TextServerExtension_method__font_set_generate_mipmaps>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_global_oversampling<class_TextServerExtension_method__font_set_global_oversampling>` **(** :ref:`float<class_float>` oversampling **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_advance<class_TextServerExtension_method__font_set_glyph_advance>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_offset<class_TextServerExtension_method__font_set_glyph_offset>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_size<class_TextServerExtension_method__font_set_glyph_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_texture_idx<class_TextServerExtension_method__font_set_glyph_texture_idx>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_uv_rect<class_TextServerExtension_method__font_set_glyph_uv_rect>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_hinting<class_TextServerExtension_method__font_set_hinting>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_kerning<class_TextServerExtension_method__font_set_kerning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_language_support_override<class_TextServerExtension_method__font_set_language_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_msdf_pixel_range<class_TextServerExtension_method__font_set_msdf_pixel_range>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_msdf_size<class_TextServerExtension_method__font_set_msdf_size>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_multichannel_signed_distance_field<class_TextServerExtension_method__font_set_multichannel_signed_distance_field>` **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_name<class_TextServerExtension_method__font_set_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_opentype_feature_overrides<class_TextServerExtension_method__font_set_opentype_feature_overrides>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_oversampling<class_TextServerExtension_method__font_set_oversampling>` **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_scale<class_TextServerExtension_method__font_set_scale>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_script_support_override<class_TextServerExtension_method__font_set_script_support_override>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_stretch<class_TextServerExtension_method__font_set_stretch>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` stretch **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_style<class_TextServerExtension_method__font_set_style>` **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_style_name<class_TextServerExtension_method__font_set_style_name>` **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name_style **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_subpixel_positioning<class_TextServerExtension_method__font_set_subpixel_positioning>` **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_texture_image<class_TextServerExtension_method__font_set_texture_image>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_texture_offsets<class_TextServerExtension_method__font_set_texture_offsets>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_transform<class_TextServerExtension_method__font_set_transform>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_underline_position<class_TextServerExtension_method__font_set_underline_position>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_underline_thickness<class_TextServerExtension_method__font_set_underline_thickness>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_variation_coordinates<class_TextServerExtension_method__font_set_variation_coordinates>` **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_weight<class_TextServerExtension_method__font_set_weight>` **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_supported_feature_list<class_TextServerExtension_method__font_supported_feature_list>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_supported_variation_list<class_TextServerExtension_method__font_supported_variation_list>` **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_format_number<class_TextServerExtension_method__format_number>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid<class_TextServerExtension_method__free_rid>` **(** :ref:`RID<class_RID>` rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_features<class_TextServerExtension_method__get_features>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_get_hex_code_box_size<class_TextServerExtension_method__get_hex_code_box_size>` **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_name<class_TextServerExtension_method__get_name>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_support_data_filename<class_TextServerExtension_method__get_support_data_filename>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_support_data_info<class_TextServerExtension_method__get_support_data_info>` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has<class_TextServerExtension_method__has>` **(** :ref:`RID<class_RID>` rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_feature<class_TextServerExtension_method__has_feature>` **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_is_confusable<class_TextServerExtension_method__is_confusable>` **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_locale_right_to_left<class_TextServerExtension_method__is_locale_right_to_left>` **(** :ref:`String<class_String>` locale **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_valid_identifier<class_TextServerExtension_method__is_valid_identifier>` **(** :ref:`String<class_String>` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_load_support_data<class_TextServerExtension_method__load_support_data>` **(** :ref:`String<class_String>` filename **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_name_to_tag<class_TextServerExtension_method__name_to_tag>` **(** :ref:`String<class_String>` name **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_parse_number<class_TextServerExtension_method__parse_number>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]<class_Vector3i>` | :ref:`_parse_structured_text<class_TextServerExtension_method__parse_structured_text>` **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_percent_sign<class_TextServerExtension_method__percent_sign>` **(** :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_save_support_data<class_TextServerExtension_method__save_support_data>` **(** :ref:`String<class_String>` filename **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_get_span_count<class_TextServerExtension_method__shaped_get_span_count>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`_shaped_get_span_meta<class_TextServerExtension_method__shaped_get_span_meta>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_set_span_update_font<class_TextServerExtension_method__shaped_set_span_update_font>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_add_object<class_TextServerExtension_method__shaped_text_add_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align, :ref:`int<class_int>` length, :ref:`float<class_float>` baseline **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_add_string<class_TextServerExtension_method__shaped_text_add_string>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features, :ref:`String<class_String>` language, :ref:`Variant<class_Variant>` meta **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_clear<class_TextServerExtension_method__shaped_text_clear>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_draw<class_TextServerExtension_method__shaped_text_draw>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l, :ref:`float<class_float>` clip_r, :ref:`Color<class_Color>` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_draw_outline<class_TextServerExtension_method__shaped_text_draw_outline>` **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l, :ref:`float<class_float>` clip_r, :ref:`int<class_int>` outline_size, :ref:`Color<class_Color>` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_fit_to_width<class_TextServerExtension_method__shaped_text_fit_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_get_ascent<class_TextServerExtension_method__shaped_text_get_ascent>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_get_carets<class_TextServerExtension_method__shaped_text_get_carets>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position, CaretInfo* caret **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_shaped_text_get_custom_punctuation<class_TextServerExtension_method__shaped_text_get_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_get_descent<class_TextServerExtension_method__shaped_text_get_descent>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction<enum_TextServer_Direction>` | :ref:`_shaped_text_get_direction<class_TextServerExtension_method__shaped_text_get_direction>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_dominant_direction_in_range<class_TextServerExtension_method__shaped_text_get_dominant_direction_in_range>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_ellipsis_glyph_count<class_TextServerExtension_method__shaped_text_get_ellipsis_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs<class_TextServerExtension_method__shaped_text_get_ellipsis_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_ellipsis_pos<class_TextServerExtension_method__shaped_text_get_ellipsis_pos>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_glyph_count<class_TextServerExtension_method__shaped_text_get_glyph_count>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_get_glyphs<class_TextServerExtension_method__shaped_text_get_glyphs>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_shaped_text_get_grapheme_bounds<class_TextServerExtension_method__shaped_text_get_grapheme_bounds>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction<enum_TextServer_Direction>` | :ref:`_shaped_text_get_inferred_direction<class_TextServerExtension_method__shaped_text_get_inferred_direction>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_line_breaks<class_TextServerExtension_method__shaped_text_get_line_breaks>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_line_breaks_adv<class_TextServerExtension_method__shaped_text_get_line_breaks_adv>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start, :ref:`bool<class_bool>` once, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`_shaped_text_get_object_rect<class_TextServerExtension_method__shaped_text_get_object_rect>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`_shaped_text_get_objects<class_TextServerExtension_method__shaped_text_get_objects>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`_shaped_text_get_orientation<class_TextServerExtension_method__shaped_text_get_orientation>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_shaped_text_get_parent<class_TextServerExtension_method__shaped_text_get_parent>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_get_preserve_control<class_TextServerExtension_method__shaped_text_get_preserve_control>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_get_preserve_invalid<class_TextServerExtension_method__shaped_text_get_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`_shaped_text_get_range<class_TextServerExtension_method__shaped_text_get_range>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_shaped_text_get_selection<class_TextServerExtension_method__shaped_text_get_selection>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`_shaped_text_get_size<class_TextServerExtension_method__shaped_text_get_size>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_spacing<class_TextServerExtension_method__shaped_text_get_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_get_trim_pos<class_TextServerExtension_method__shaped_text_get_trim_pos>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_get_underline_position<class_TextServerExtension_method__shaped_text_get_underline_position>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_get_underline_thickness<class_TextServerExtension_method__shaped_text_get_underline_thickness>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_get_width<class_TextServerExtension_method__shaped_text_get_width>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_word_breaks<class_TextServerExtension_method__shaped_text_get_word_breaks>` **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_hit_test_grapheme<class_TextServerExtension_method__shaped_text_hit_test_grapheme>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coord **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_hit_test_position<class_TextServerExtension_method__shaped_text_hit_test_position>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coord **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_is_ready<class_TextServerExtension_method__shaped_text_is_ready>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_next_grapheme_pos<class_TextServerExtension_method__shaped_text_next_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_overrun_trim_to_width<class_TextServerExtension_method__shaped_text_overrun_trim_to_width>` **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> trim_flags **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_shaped_text_prev_grapheme_pos<class_TextServerExtension_method__shaped_text_prev_grapheme_pos>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_resize_object<class_TextServerExtension_method__shaped_text_resize_object>` **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align, :ref:`float<class_float>` baseline **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_bidi_override<class_TextServerExtension_method__shaped_text_set_bidi_override>` **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_custom_punctuation<class_TextServerExtension_method__shaped_text_set_custom_punctuation>` **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_direction<class_TextServerExtension_method__shaped_text_set_direction>` **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_orientation<class_TextServerExtension_method__shaped_text_set_orientation>` **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_preserve_control<class_TextServerExtension_method__shaped_text_set_preserve_control>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_preserve_invalid<class_TextServerExtension_method__shaped_text_set_preserve_invalid>` **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_spacing<class_TextServerExtension_method__shaped_text_set_spacing>` **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_shape<class_TextServerExtension_method__shaped_text_shape>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_sort_logical<class_TextServerExtension_method__shaped_text_sort_logical>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`_shaped_text_substr<class_TextServerExtension_method__shaped_text_substr>` **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_shaped_text_tab_align<class_TextServerExtension_method__shaped_text_tab_align>` **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_update_breaks<class_TextServerExtension_method__shaped_text_update_breaks>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_shaped_text_update_justification_ops<class_TextServerExtension_method__shaped_text_update_justification_ops>` **(** :ref:`RID<class_RID>` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_spoof_check<class_TextServerExtension_method__spoof_check>` **(** :ref:`String<class_String>` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_string_get_word_breaks<class_TextServerExtension_method__string_get_word_breaks>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language, :ref:`int<class_int>` chars_per_line **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_string_to_lower<class_TextServerExtension_method__string_to_lower>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_string_to_upper<class_TextServerExtension_method__string_to_upper>` **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_strip_diacritics<class_TextServerExtension_method__strip_diacritics>` **(** :ref:`String<class_String>` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_tag_to_name<class_TextServerExtension_method__tag_to_name>` **(** :ref:`int<class_int>` tag **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_cleanup<class_TextServerExtension_private_method__cleanup>`\ (\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_create_font<class_TextServerExtension_private_method__create_font>`\ (\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_create_font_linked_variation<class_TextServerExtension_private_method__create_font_linked_variation>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_create_shaped_text<class_TextServerExtension_private_method__create_shaped_text>`\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw_hex_code_box<class_TextServerExtension_private_method__draw_hex_code_box>`\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_clear_glyphs<class_TextServerExtension_private_method__font_clear_glyphs>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_clear_kerning_map<class_TextServerExtension_private_method__font_clear_kerning_map>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_clear_size_cache<class_TextServerExtension_private_method__font_clear_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_clear_textures<class_TextServerExtension_private_method__font_clear_textures>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_draw_glyph<class_TextServerExtension_private_method__font_draw_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_draw_glyph_outline<class_TextServerExtension_private_method__font_draw_glyph_outline>`\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` | :ref:`_font_get_antialiasing<class_TextServerExtension_private_method__font_get_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_ascent<class_TextServerExtension_private_method__font_get_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_baseline_offset<class_TextServerExtension_private_method__font_get_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_char_from_glyph_index<class_TextServerExtension_private_method__font_get_char_from_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_descent<class_TextServerExtension_private_method__font_get_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_get_disable_embedded_bitmaps<class_TextServerExtension_private_method__font_get_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_embolden<class_TextServerExtension_private_method__font_get_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_face_count<class_TextServerExtension_private_method__font_get_face_count>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_face_index<class_TextServerExtension_private_method__font_get_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_fixed_size<class_TextServerExtension_private_method__font_get_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` | :ref:`_font_get_fixed_size_scale_mode<class_TextServerExtension_private_method__font_get_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_get_generate_mipmaps<class_TextServerExtension_private_method__font_get_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_global_oversampling<class_TextServerExtension_private_method__font_get_global_oversampling>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_advance<class_TextServerExtension_private_method__font_get_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_glyph_contours<class_TextServerExtension_private_method__font_get_glyph_contours>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_glyph_index<class_TextServerExtension_private_method__font_get_glyph_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_font_get_glyph_list<class_TextServerExtension_private_method__font_get_glyph_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_offset<class_TextServerExtension_private_method__font_get_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_size<class_TextServerExtension_private_method__font_get_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_glyph_texture_idx<class_TextServerExtension_private_method__font_get_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_font_get_glyph_texture_rid<class_TextServerExtension_private_method__font_get_glyph_texture_rid>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_glyph_texture_size<class_TextServerExtension_private_method__font_get_glyph_texture_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`_font_get_glyph_uv_rect<class_TextServerExtension_private_method__font_get_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Hinting<enum_TextServer_Hinting>` | :ref:`_font_get_hinting<class_TextServerExtension_private_method__font_get_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_font_get_kerning<class_TextServerExtension_private_method__font_get_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`_font_get_kerning_list<class_TextServerExtension_private_method__font_get_kerning_list>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_get_language_support_override<class_TextServerExtension_private_method__font_get_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_font_get_language_support_overrides<class_TextServerExtension_private_method__font_get_language_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_msdf_pixel_range<class_TextServerExtension_private_method__font_get_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_msdf_size<class_TextServerExtension_private_method__font_get_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_font_get_name<class_TextServerExtension_private_method__font_get_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_opentype_feature_overrides<class_TextServerExtension_private_method__font_get_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_ot_name_strings<class_TextServerExtension_private_method__font_get_ot_name_strings>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_oversampling<class_TextServerExtension_private_method__font_get_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_scale<class_TextServerExtension_private_method__font_get_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_get_script_support_override<class_TextServerExtension_private_method__font_get_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_font_get_script_support_overrides<class_TextServerExtension_private_method__font_get_script_support_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`_font_get_size_cache_list<class_TextServerExtension_private_method__font_get_size_cache_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_spacing<class_TextServerExtension_private_method__font_get_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_stretch<class_TextServerExtension_private_method__font_get_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] | :ref:`_font_get_style<class_TextServerExtension_private_method__font_get_style>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_font_get_style_name<class_TextServerExtension_private_method__font_get_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` | :ref:`_font_get_subpixel_positioning<class_TextServerExtension_private_method__font_get_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_font_get_supported_chars<class_TextServerExtension_private_method__font_get_supported_chars>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_texture_count<class_TextServerExtension_private_method__font_get_texture_count>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`_font_get_texture_image<class_TextServerExtension_private_method__font_get_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_font_get_texture_offsets<class_TextServerExtension_private_method__font_get_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`_font_get_transform<class_TextServerExtension_private_method__font_get_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_underline_position<class_TextServerExtension_private_method__font_get_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_font_get_underline_thickness<class_TextServerExtension_private_method__font_get_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_get_variation_coordinates<class_TextServerExtension_private_method__font_get_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_font_get_weight<class_TextServerExtension_private_method__font_get_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_has_char<class_TextServerExtension_private_method__font_has_char>`\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_is_allow_system_fallback<class_TextServerExtension_private_method__font_is_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_is_force_autohinter<class_TextServerExtension_private_method__font_is_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_is_language_supported<class_TextServerExtension_private_method__font_is_language_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_is_multichannel_signed_distance_field<class_TextServerExtension_private_method__font_is_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_font_is_script_supported<class_TextServerExtension_private_method__font_is_script_supported>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_glyph<class_TextServerExtension_private_method__font_remove_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_kerning<class_TextServerExtension_private_method__font_remove_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_language_support_override<class_TextServerExtension_private_method__font_remove_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_script_support_override<class_TextServerExtension_private_method__font_remove_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_size_cache<class_TextServerExtension_private_method__font_remove_size_cache>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_remove_texture<class_TextServerExtension_private_method__font_remove_texture>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_render_glyph<class_TextServerExtension_private_method__font_render_glyph>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_render_range<class_TextServerExtension_private_method__font_render_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_allow_system_fallback<class_TextServerExtension_private_method__font_set_allow_system_fallback>`\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_antialiasing<class_TextServerExtension_private_method__font_set_antialiasing>`\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_ascent<class_TextServerExtension_private_method__font_set_ascent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_baseline_offset<class_TextServerExtension_private_method__font_set_baseline_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_data<class_TextServerExtension_private_method__font_set_data>`\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_data_ptr<class_TextServerExtension_private_method__font_set_data_ptr>`\ (\ font_rid\: :ref:`RID<class_RID>`, data_ptr\: ``const uint8_t*``, data_size\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_descent<class_TextServerExtension_private_method__font_set_descent>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_disable_embedded_bitmaps<class_TextServerExtension_private_method__font_set_disable_embedded_bitmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_embolden<class_TextServerExtension_private_method__font_set_embolden>`\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_face_index<class_TextServerExtension_private_method__font_set_face_index>`\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_fixed_size<class_TextServerExtension_private_method__font_set_fixed_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_fixed_size_scale_mode<class_TextServerExtension_private_method__font_set_fixed_size_scale_mode>`\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_force_autohinter<class_TextServerExtension_private_method__font_set_force_autohinter>`\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_generate_mipmaps<class_TextServerExtension_private_method__font_set_generate_mipmaps>`\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_global_oversampling<class_TextServerExtension_private_method__font_set_global_oversampling>`\ (\ oversampling\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_glyph_advance<class_TextServerExtension_private_method__font_set_glyph_advance>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_glyph_offset<class_TextServerExtension_private_method__font_set_glyph_offset>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_glyph_size<class_TextServerExtension_private_method__font_set_glyph_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_glyph_texture_idx<class_TextServerExtension_private_method__font_set_glyph_texture_idx>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_glyph_uv_rect<class_TextServerExtension_private_method__font_set_glyph_uv_rect>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_hinting<class_TextServerExtension_private_method__font_set_hinting>`\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_kerning<class_TextServerExtension_private_method__font_set_kerning>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_language_support_override<class_TextServerExtension_private_method__font_set_language_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_msdf_pixel_range<class_TextServerExtension_private_method__font_set_msdf_pixel_range>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_msdf_size<class_TextServerExtension_private_method__font_set_msdf_size>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_multichannel_signed_distance_field<class_TextServerExtension_private_method__font_set_multichannel_signed_distance_field>`\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_name<class_TextServerExtension_private_method__font_set_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_opentype_feature_overrides<class_TextServerExtension_private_method__font_set_opentype_feature_overrides>`\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_oversampling<class_TextServerExtension_private_method__font_set_oversampling>`\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_scale<class_TextServerExtension_private_method__font_set_scale>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_script_support_override<class_TextServerExtension_private_method__font_set_script_support_override>`\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_spacing<class_TextServerExtension_private_method__font_set_spacing>`\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_stretch<class_TextServerExtension_private_method__font_set_stretch>`\ (\ font_rid\: :ref:`RID<class_RID>`, stretch\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_style<class_TextServerExtension_private_method__font_set_style>`\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_style_name<class_TextServerExtension_private_method__font_set_style_name>`\ (\ font_rid\: :ref:`RID<class_RID>`, name_style\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_subpixel_positioning<class_TextServerExtension_private_method__font_set_subpixel_positioning>`\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_texture_image<class_TextServerExtension_private_method__font_set_texture_image>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_texture_offsets<class_TextServerExtension_private_method__font_set_texture_offsets>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_transform<class_TextServerExtension_private_method__font_set_transform>`\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_underline_position<class_TextServerExtension_private_method__font_set_underline_position>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_underline_thickness<class_TextServerExtension_private_method__font_set_underline_thickness>`\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_variation_coordinates<class_TextServerExtension_private_method__font_set_variation_coordinates>`\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_weight<class_TextServerExtension_private_method__font_set_weight>`\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_supported_feature_list<class_TextServerExtension_private_method__font_supported_feature_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`_font_supported_variation_list<class_TextServerExtension_private_method__font_supported_variation_list>`\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_format_number<class_TextServerExtension_private_method__format_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_free_rid<class_TextServerExtension_private_method__free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_features<class_TextServerExtension_private_method__get_features>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_hex_code_box_size<class_TextServerExtension_private_method__get_hex_code_box_size>`\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_name<class_TextServerExtension_private_method__get_name>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_support_data_filename<class_TextServerExtension_private_method__get_support_data_filename>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_support_data_info<class_TextServerExtension_private_method__get_support_data_info>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has<class_TextServerExtension_private_method__has>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_feature<class_TextServerExtension_private_method__has_feature>`\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_is_confusable<class_TextServerExtension_private_method__is_confusable>`\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_locale_right_to_left<class_TextServerExtension_private_method__is_locale_right_to_left>`\ (\ locale\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_valid_identifier<class_TextServerExtension_private_method__is_valid_identifier>`\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_valid_letter<class_TextServerExtension_private_method__is_valid_letter>`\ (\ unicode\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_load_support_data<class_TextServerExtension_private_method__load_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_name_to_tag<class_TextServerExtension_private_method__name_to_tag>`\ (\ name\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_parse_number<class_TextServerExtension_private_method__parse_number>`\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] | :ref:`_parse_structured_text<class_TextServerExtension_private_method__parse_structured_text>`\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_percent_sign<class_TextServerExtension_private_method__percent_sign>`\ (\ language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_save_support_data<class_TextServerExtension_private_method__save_support_data>`\ (\ filename\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_get_span_count<class_TextServerExtension_private_method__shaped_get_span_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_shaped_get_span_meta<class_TextServerExtension_private_method__shaped_get_span_meta>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_set_span_update_font<class_TextServerExtension_private_method__shaped_set_span_update_font>`\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_add_object<class_TextServerExtension_private_method__shaped_text_add_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>`, length\: :ref:`int<class_int>`, baseline\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_add_string<class_TextServerExtension_private_method__shaped_text_add_string>`\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>`, language\: :ref:`String<class_String>`, meta\: :ref:`Variant<class_Variant>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_clear<class_TextServerExtension_private_method__shaped_text_clear>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_closest_character_pos<class_TextServerExtension_private_method__shaped_text_closest_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_draw<class_TextServerExtension_private_method__shaped_text_draw>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>`, clip_r\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_draw_outline<class_TextServerExtension_private_method__shaped_text_draw_outline>`\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>`, clip_r\: :ref:`float<class_float>`, outline_size\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_fit_to_width<class_TextServerExtension_private_method__shaped_text_fit_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_get_ascent<class_TextServerExtension_private_method__shaped_text_get_ascent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_get_carets<class_TextServerExtension_private_method__shaped_text_get_carets>`\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`, caret\: ``CaretInfo*``\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_character_breaks<class_TextServerExtension_private_method__shaped_text_get_character_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_custom_ellipsis<class_TextServerExtension_private_method__shaped_text_get_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_shaped_text_get_custom_punctuation<class_TextServerExtension_private_method__shaped_text_get_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_get_descent<class_TextServerExtension_private_method__shaped_text_get_descent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction<enum_TextServer_Direction>` | :ref:`_shaped_text_get_direction<class_TextServerExtension_private_method__shaped_text_get_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_dominant_direction_in_range<class_TextServerExtension_private_method__shaped_text_get_dominant_direction_in_range>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_ellipsis_glyph_count<class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``const Glyph*`` | :ref:`_shaped_text_get_ellipsis_glyphs<class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_ellipsis_pos<class_TextServerExtension_private_method__shaped_text_get_ellipsis_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_glyph_count<class_TextServerExtension_private_method__shaped_text_get_glyph_count>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``const Glyph*`` | :ref:`_shaped_text_get_glyphs<class_TextServerExtension_private_method__shaped_text_get_glyphs>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_shaped_text_get_grapheme_bounds<class_TextServerExtension_private_method__shaped_text_get_grapheme_bounds>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction<enum_TextServer_Direction>` | :ref:`_shaped_text_get_inferred_direction<class_TextServerExtension_private_method__shaped_text_get_inferred_direction>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_line_breaks<class_TextServerExtension_private_method__shaped_text_get_line_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>`, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_line_breaks_adv<class_TextServerExtension_private_method__shaped_text_get_line_breaks_adv>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>`, once\: :ref:`bool<class_bool>`, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_object_glyph<class_TextServerExtension_private_method__shaped_text_get_object_glyph>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`_shaped_text_get_object_range<class_TextServerExtension_private_method__shaped_text_get_object_range>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`_shaped_text_get_object_rect<class_TextServerExtension_private_method__shaped_text_get_object_rect>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`_shaped_text_get_objects<class_TextServerExtension_private_method__shaped_text_get_objects>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Orientation<enum_TextServer_Orientation>` | :ref:`_shaped_text_get_orientation<class_TextServerExtension_private_method__shaped_text_get_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_shaped_text_get_parent<class_TextServerExtension_private_method__shaped_text_get_parent>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_get_preserve_control<class_TextServerExtension_private_method__shaped_text_get_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_get_preserve_invalid<class_TextServerExtension_private_method__shaped_text_get_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`_shaped_text_get_range<class_TextServerExtension_private_method__shaped_text_get_range>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_shaped_text_get_selection<class_TextServerExtension_private_method__shaped_text_get_selection>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_shaped_text_get_size<class_TextServerExtension_private_method__shaped_text_get_size>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_spacing<class_TextServerExtension_private_method__shaped_text_get_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_get_trim_pos<class_TextServerExtension_private_method__shaped_text_get_trim_pos>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_get_underline_position<class_TextServerExtension_private_method__shaped_text_get_underline_position>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_get_underline_thickness<class_TextServerExtension_private_method__shaped_text_get_underline_thickness>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_get_width<class_TextServerExtension_private_method__shaped_text_get_width>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_shaped_text_get_word_breaks<class_TextServerExtension_private_method__shaped_text_get_word_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\], skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\]\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_hit_test_grapheme<class_TextServerExtension_private_method__shaped_text_hit_test_grapheme>`\ (\ shaped\: :ref:`RID<class_RID>`, coord\: :ref:`float<class_float>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_hit_test_position<class_TextServerExtension_private_method__shaped_text_hit_test_position>`\ (\ shaped\: :ref:`RID<class_RID>`, coord\: :ref:`float<class_float>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_is_ready<class_TextServerExtension_private_method__shaped_text_is_ready>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_next_character_pos<class_TextServerExtension_private_method__shaped_text_next_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_next_grapheme_pos<class_TextServerExtension_private_method__shaped_text_next_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_overrun_trim_to_width<class_TextServerExtension_private_method__shaped_text_overrun_trim_to_width>`\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\]\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_prev_character_pos<class_TextServerExtension_private_method__shaped_text_prev_character_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_shaped_text_prev_grapheme_pos<class_TextServerExtension_private_method__shaped_text_prev_grapheme_pos>`\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_resize_object<class_TextServerExtension_private_method__shaped_text_resize_object>`\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>`, baseline\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_bidi_override<class_TextServerExtension_private_method__shaped_text_set_bidi_override>`\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_custom_ellipsis<class_TextServerExtension_private_method__shaped_text_set_custom_ellipsis>`\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_custom_punctuation<class_TextServerExtension_private_method__shaped_text_set_custom_punctuation>`\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_direction<class_TextServerExtension_private_method__shaped_text_set_direction>`\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_orientation<class_TextServerExtension_private_method__shaped_text_set_orientation>`\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_preserve_control<class_TextServerExtension_private_method__shaped_text_set_preserve_control>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_preserve_invalid<class_TextServerExtension_private_method__shaped_text_set_preserve_invalid>`\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_shaped_text_set_spacing<class_TextServerExtension_private_method__shaped_text_set_spacing>`\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_shape<class_TextServerExtension_private_method__shaped_text_shape>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``const Glyph*`` | :ref:`_shaped_text_sort_logical<class_TextServerExtension_private_method__shaped_text_sort_logical>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`_shaped_text_substr<class_TextServerExtension_private_method__shaped_text_substr>`\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_shaped_text_tab_align<class_TextServerExtension_private_method__shaped_text_tab_align>`\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_update_breaks<class_TextServerExtension_private_method__shaped_text_update_breaks>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_shaped_text_update_justification_ops<class_TextServerExtension_private_method__shaped_text_update_justification_ops>`\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_spoof_check<class_TextServerExtension_private_method__spoof_check>`\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_string_get_character_breaks<class_TextServerExtension_private_method__string_get_character_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`_string_get_word_breaks<class_TextServerExtension_private_method__string_get_word_breaks>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`, chars_per_line\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_string_to_lower<class_TextServerExtension_private_method__string_to_lower>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_string_to_title<class_TextServerExtension_private_method__string_to_title>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_string_to_upper<class_TextServerExtension_private_method__string_to_upper>`\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_strip_diacritics<class_TextServerExtension_private_method__strip_diacritics>`\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_tag_to_name<class_TextServerExtension_private_method__tag_to_name>`\ (\ tag\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -434,1607 +474,1885 @@ Methods Method Descriptions ------------------- -.. _class_TextServerExtension_method__cleanup: +.. _class_TextServerExtension_private_method__cleanup: .. rst-class:: classref-method -void **_cleanup** **(** **)** |virtual| +|void| **_cleanup**\ (\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__cleanup>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +This method is called before text server is unregistered. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__create_font: +.. _class_TextServerExtension_private_method__create_font: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_create_font** **(** **)** |virtual| +:ref:`RID<class_RID>` **_create_font**\ (\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__create_font>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Creates a new, empty font cache entry resource. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__create_shaped_text: +.. _class_TextServerExtension_private_method__create_font_linked_variation: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_create_shaped_text** **(** :ref:`Direction<enum_TextServer_Direction>` direction, :ref:`Orientation<enum_TextServer_Orientation>` orientation **)** |virtual| +:ref:`RID<class_RID>` **_create_font_linked_variation**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__create_font_linked_variation>` -.. container:: contribute +Optional, implement if font supports extra spacing or baseline offset. - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Creates a new variation existing font which is reusing the same glyph cache and font data. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__draw_hex_code_box: +.. _class_TextServerExtension_private_method__create_shaped_text: .. rst-class:: classref-method -void **_draw_hex_code_box** **(** :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| +:ref:`RID<class_RID>` **_create_shaped_text**\ (\ direction\: :ref:`Direction<enum_TextServer_Direction>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__create_shaped_text>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Creates a new buffer for complex text layout, with the given ``direction`` and ``orientation``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_glyphs: +.. _class_TextServerExtension_private_method__draw_hex_code_box: .. rst-class:: classref-method -void **_font_clear_glyphs** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| +|void| **_draw_hex_code_box**\ (\ canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__draw_hex_code_box>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Draws box displaying character hexadecimal code. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_kerning_map: +.. _class_TextServerExtension_private_method__font_clear_glyphs: .. rst-class:: classref-method -void **_font_clear_kerning_map** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| +|void| **_font_clear_glyphs**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_clear_glyphs>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Removes all rendered glyph information from the cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_size_cache: +.. _class_TextServerExtension_private_method__font_clear_kerning_map: .. rst-class:: classref-method -void **_font_clear_size_cache** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| +|void| **_font_clear_kerning_map**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_clear_kerning_map>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Removes all kerning overrides. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_textures: +.. _class_TextServerExtension_private_method__font_clear_size_cache: .. rst-class:: classref-method -void **_font_clear_textures** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| +|void| **_font_clear_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_clear_size_cache>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Removes all font sizes from the cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_draw_glyph: +.. _class_TextServerExtension_private_method__font_clear_textures: .. rst-class:: classref-method -void **_font_draw_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| +|void| **_font_clear_textures**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_clear_textures>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Removes all textures from font cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_draw_glyph_outline: +.. _class_TextServerExtension_private_method__font_draw_glyph: .. rst-class:: classref-method -void **_font_draw_glyph_outline** **(** :ref:`RID<class_RID>` font_rid, :ref:`RID<class_RID>` canvas, :ref:`int<class_int>` size, :ref:`int<class_int>` outline_size, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` index, :ref:`Color<class_Color>` color **)** |virtual| |const| +|void| **_font_draw_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_draw_glyph>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Draws single glyph into a canvas item at the position, using ``font_rid`` at the size ``size``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_antialiasing: +.. _class_TextServerExtension_private_method__font_draw_glyph_outline: .. rst-class:: classref-method -:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **_font_get_antialiasing** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +|void| **_font_draw_glyph_outline**\ (\ font_rid\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, outline_size\: :ref:`int<class_int>`, pos\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_draw_glyph_outline>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Draws single glyph outline of size ``outline_size`` into a canvas item at the position, using ``font_rid`` at the size ``size``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_ascent: +.. _class_TextServerExtension_private_method__font_get_antialiasing: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` **_font_get_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_antialiasing>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font anti-aliasing mode. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_char_from_glyph_index: +.. _class_TextServerExtension_private_method__font_get_ascent: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_char_from_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph_index **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_ascent>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the font ascent (number of pixels above the baseline). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_descent: +.. _class_TextServerExtension_private_method__font_get_baseline_offset: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_baseline_offset>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns extra baseline offset (as a fraction of font height). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_embolden: +.. _class_TextServerExtension_private_method__font_get_char_from_glyph_index: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_embolden** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_char_from_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_char_from_glyph_index>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns character code associated with ``glyph_index``, or ``0`` if ``glyph_index`` is invalid. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_face_count: +.. _class_TextServerExtension_private_method__font_get_descent: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_face_count** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_descent>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the font descent (number of pixels below the baseline). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_face_index: +.. _class_TextServerExtension_private_method__font_get_disable_embedded_bitmaps: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_face_index** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`bool<class_bool>` **_font_get_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_disable_embedded_bitmaps>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns whether the font's embedded bitmap loading is disabled. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_fixed_size: +.. _class_TextServerExtension_private_method__font_get_embolden: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_fixed_size** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_embolden>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font embolden strength. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_generate_mipmaps: +.. _class_TextServerExtension_private_method__font_get_face_count: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_get_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_face_count**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_face_count>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns number of faces in the TrueType / OpenType collection. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_global_oversampling: +.. _class_TextServerExtension_private_method__font_get_face_index: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_global_oversampling** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_face_index>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_advance: +.. _class_TextServerExtension_private_method__font_get_fixed_size: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_font_get_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_fixed_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns bitmap font fixed size. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_contours: +.. _class_TextServerExtension_private_method__font_get_fixed_size_scale_mode: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_get_glyph_contours** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>` **_font_get_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_fixed_size_scale_mode>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns bitmap font scaling mode. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_index: +.. _class_TextServerExtension_private_method__font_get_generate_mipmaps: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_glyph_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` char, :ref:`int<class_int>` variation_selector **)** |virtual| |const| +:ref:`bool<class_bool>` **_font_get_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_generate_mipmaps>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if font texture mipmap generation is enabled. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_list: +.. _class_TextServerExtension_private_method__font_get_global_oversampling: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_font_get_glyph_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_global_oversampling**\ (\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_global_oversampling>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the font oversampling factor, shared by all fonts in the TextServer. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_offset: +.. _class_TextServerExtension_private_method__font_get_glyph_advance: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_font_get_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_font_get_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_advance>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns glyph advance (offset of the next glyph). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_size: +.. _class_TextServerExtension_private_method__font_get_glyph_contours: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_font_get_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_font_get_glyph_contours**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_contours>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns outline contours of the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_idx: +.. _class_TextServerExtension_private_method__font_get_glyph_index: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_glyph_index**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, char\: :ref:`int<class_int>`, variation_selector\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_index>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_rid: +.. _class_TextServerExtension_private_method__font_get_glyph_list: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_font_get_glyph_texture_rid** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_font_get_glyph_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_list>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns list of rendered glyphs in the cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_size: +.. _class_TextServerExtension_private_method__font_get_glyph_offset: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_font_get_glyph_texture_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_font_get_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_offset>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns glyph offset from the baseline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_uv_rect: +.. _class_TextServerExtension_private_method__font_get_glyph_size: .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **_font_get_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_font_get_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns size of the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_hinting: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_idx: .. rst-class:: classref-method -:ref:`Hinting<enum_TextServer_Hinting>` **_font_get_hinting** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_texture_idx>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns index of the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_kerning: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_rid: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_font_get_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |virtual| |const| +:ref:`RID<class_RID>` **_font_get_glyph_texture_rid**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_texture_rid>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns resource ID of the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_kerning_list: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_size: .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **_font_get_kerning_list** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_font_get_glyph_texture_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_texture_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns size of the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_language_support_override: +.. _class_TextServerExtension_private_method__font_get_glyph_uv_rect: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_get_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| +:ref:`Rect2<class_Rect2>` **_font_get_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_glyph_uv_rect>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns rectangle in the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_language_support_overrides: +.. _class_TextServerExtension_private_method__font_get_hinting: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_font_get_language_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| +:ref:`Hinting<enum_TextServer_Hinting>` **_font_get_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_hinting>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_msdf_pixel_range: +.. _class_TextServerExtension_private_method__font_get_kerning: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_font_get_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_kerning>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns kerning for the pair of glyphs. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_msdf_size: +.. _class_TextServerExtension_private_method__font_get_kerning_list: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_msdf_size** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **_font_get_kerning_list**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_kerning_list>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns list of the kerning overrides. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_name: +.. _class_TextServerExtension_private_method__font_get_language_support_override: .. rst-class:: classref-method -:ref:`String<class_String>` **_font_get_name** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`bool<class_bool>` **_font_get_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_get_language_support_override>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if support override is enabled for the ``language``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_opentype_feature_overrides: +.. _class_TextServerExtension_private_method__font_get_language_support_overrides: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_get_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_font_get_language_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_get_language_support_overrides>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns list of language support overrides. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_ot_name_strings: +.. _class_TextServerExtension_private_method__font_get_msdf_pixel_range: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_get_ot_name_strings** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_msdf_pixel_range>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the width of the range around the shape between the minimum and maximum representable signed distance. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_oversampling: +.. _class_TextServerExtension_private_method__font_get_msdf_size: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_oversampling** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_msdf_size>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns source font size used to generate MSDF textures. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_scale: +.. _class_TextServerExtension_private_method__font_get_name: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`String<class_String>` **_font_get_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_name>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font family name. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_script_support_override: +.. _class_TextServerExtension_private_method__font_get_opentype_feature_overrides: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_get_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_font_get_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_opentype_feature_overrides>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font OpenType feature set override. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_script_support_overrides: +.. _class_TextServerExtension_private_method__font_get_ot_name_strings: .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **_font_get_script_support_overrides** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_font_get_ot_name_strings**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_ot_name_strings>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns :ref:`Dictionary<class_Dictionary>` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_size_cache_list: +.. _class_TextServerExtension_private_method__font_get_oversampling: .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **_font_get_size_cache_list** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_oversampling>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_stretch: +.. _class_TextServerExtension_private_method__font_get_scale: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_stretch** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_scale>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns scaling factor of the color bitmap font. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_style: +.. _class_TextServerExtension_private_method__font_get_script_support_override: .. rst-class:: classref-method -|bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> **_font_get_style** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`bool<class_bool>` **_font_get_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_get_script_support_override>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if support override is enabled for the ``script``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_style_name: +.. _class_TextServerExtension_private_method__font_get_script_support_overrides: .. rst-class:: classref-method -:ref:`String<class_String>` **_font_get_style_name** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`PackedStringArray<class_PackedStringArray>` **_font_get_script_support_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_get_script_support_overrides>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns list of script support overrides. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_subpixel_positioning: +.. _class_TextServerExtension_private_method__font_get_size_cache_list: .. rst-class:: classref-method -:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **_font_get_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **_font_get_size_cache_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_size_cache_list>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns list of the font sizes in the cache. Each size is :ref:`Vector2i<class_Vector2i>` with font size and outline size. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_supported_chars: +.. _class_TextServerExtension_private_method__font_get_spacing: .. rst-class:: classref-method -:ref:`String<class_String>` **_font_get_supported_chars** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_spacing>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) in pixels (not relative to the font size). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_count: +.. _class_TextServerExtension_private_method__font_get_stretch: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_texture_count** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_stretch>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_image: +.. _class_TextServerExtension_private_method__font_get_style: .. rst-class:: classref-method -:ref:`Image<class_Image>` **_font_get_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| |const| +|bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\] **_font_get_style**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_style>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_offsets: +.. _class_TextServerExtension_private_method__font_get_style_name: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_font_get_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| |const| +:ref:`String<class_String>` **_font_get_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_style_name>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font style name. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_transform: +.. _class_TextServerExtension_private_method__font_get_subpixel_positioning: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **_font_get_transform** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` **_font_get_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_subpixel_positioning>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font subpixel glyph positioning mode. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_underline_position: +.. _class_TextServerExtension_private_method__font_get_supported_chars: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`String<class_String>` **_font_get_supported_chars**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_supported_chars>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns a string containing all the characters available in the font. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_underline_thickness: +.. _class_TextServerExtension_private_method__font_get_texture_count: .. rst-class:: classref-method -:ref:`float<class_float>` **_font_get_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_texture_count**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_texture_count>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns number of textures used by font cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_variation_coordinates: +.. _class_TextServerExtension_private_method__font_get_texture_image: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_get_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`Image<class_Image>` **_font_get_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_texture_image>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns font cache texture image data. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_weight: +.. _class_TextServerExtension_private_method__font_get_texture_offsets: .. rst-class:: classref-method -:ref:`int<class_int>` **_font_get_weight** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_font_get_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_texture_offsets>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns array containing glyph packing data. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_has_char: +.. _class_TextServerExtension_private_method__font_get_transform: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_has_char** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` char **)** |virtual| |const| +:ref:`Transform2D<class_Transform2D>` **_font_get_transform**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_transform>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns 2D transform applied to the font outlines. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_allow_system_fallback: +.. _class_TextServerExtension_private_method__font_get_underline_position: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_is_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_underline_position>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_force_autohinter: +.. _class_TextServerExtension_private_method__font_get_underline_thickness: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_is_force_autohinter** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`float<class_float>` **_font_get_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_underline_thickness>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns thickness of the underline in pixels. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_language_supported: +.. _class_TextServerExtension_private_method__font_get_variation_coordinates: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_is_language_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| |const| +:ref:`Dictionary<class_Dictionary>` **_font_get_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_variation_coordinates>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns variation coordinates for the specified font cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_multichannel_signed_distance_field: +.. _class_TextServerExtension_private_method__font_get_weight: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_is_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_font_get_weight**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_get_weight>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_script_supported: +.. _class_TextServerExtension_private_method__font_has_char: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_font_is_script_supported** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| |const| +:ref:`bool<class_bool>` **_font_has_char**\ (\ font_rid\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_has_char>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if a Unicode ``char`` is available in the font. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_glyph: +.. _class_TextServerExtension_private_method__font_is_allow_system_fallback: .. rst-class:: classref-method -void **_font_remove_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph **)** |virtual| +:ref:`bool<class_bool>` **_font_is_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_is_allow_system_fallback>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if system fonts can be automatically used as fallbacks. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_kerning: +.. _class_TextServerExtension_private_method__font_is_force_autohinter: .. rst-class:: classref-method -void **_font_remove_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair **)** |virtual| +:ref:`bool<class_bool>` **_font_is_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_is_force_autohinter>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if auto-hinting is supported and preferred over font built-in hinting. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_language_support_override: +.. _class_TextServerExtension_private_method__font_is_language_supported: .. rst-class:: classref-method -void **_font_remove_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language **)** |virtual| +:ref:`bool<class_bool>` **_font_is_language_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_is_language_supported>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true``, if font supports given language (`ISO 639 <https://en.wikipedia.org/wiki/ISO_639-1>`__ code). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_is_multichannel_signed_distance_field: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_font_is_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_is_multichannel_signed_distance_field>` + +**Optional.**\ + +Returns ``true`` if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_is_script_supported: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_font_is_script_supported**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_is_script_supported>` + +**Optional.**\ + +Returns ``true``, if font supports given script (ISO 15924 code). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_glyph: + +.. rst-class:: classref-method + +|void| **_font_remove_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_glyph>` + +**Required.**\ + +Removes specified rendered glyph information from the cache entry. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_kerning: + +.. rst-class:: classref-method + +|void| **_font_remove_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_kerning>` + +**Optional.**\ + +Removes kerning override for the pair of glyphs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_language_support_override: + +.. rst-class:: classref-method + +|void| **_font_remove_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_language_support_override>` + +**Optional.**\ + +Remove language support override. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_script_support_override: + +.. rst-class:: classref-method + +|void| **_font_remove_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_script_support_override>` + +**Optional.**\ + +Removes script support override. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_size_cache: + +.. rst-class:: classref-method + +|void| **_font_remove_size_cache**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_size_cache>` + +**Required.**\ + +Removes specified font size from the cache entry. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_remove_texture: + +.. rst-class:: classref-method + +|void| **_font_remove_texture**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_remove_texture>` + +**Required.**\ + +Removes specified texture from the cache entry. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_render_glyph: + +.. rst-class:: classref-method + +|void| **_font_render_glyph**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_render_glyph>` + +**Optional.**\ + +Renders specified glyph to the font cache texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_render_range: + +.. rst-class:: classref-method + +|void| **_font_render_range**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_render_range>` + +**Optional.**\ + +Renders the range of characters to the font cache texture. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_allow_system_fallback: + +.. rst-class:: classref-method + +|void| **_font_set_allow_system_fallback**\ (\ font_rid\: :ref:`RID<class_RID>`, allow_system_fallback\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_allow_system_fallback>` + +**Optional.**\ + +If set to ``true``, system fonts can be automatically used as fallbacks. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_antialiasing: + +.. rst-class:: classref-method + +|void| **_font_set_antialiasing**\ (\ font_rid\: :ref:`RID<class_RID>`, antialiasing\: :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_antialiasing>` + +**Optional.**\ + +Sets font anti-aliasing mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_ascent: + +.. rst-class:: classref-method + +|void| **_font_set_ascent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, ascent\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_ascent>` + +**Required.**\ + +Sets the font ascent (number of pixels above the baseline). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_baseline_offset: + +.. rst-class:: classref-method + +|void| **_font_set_baseline_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, baseline_offset\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_baseline_offset>` + +**Optional.**\ + +Sets extra baseline offset (as a fraction of font height). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_data: + +.. rst-class:: classref-method + +|void| **_font_set_data**\ (\ font_rid\: :ref:`RID<class_RID>`, data\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_data>` + +**Optional.**\ + +Sets font source data, e.g contents of the dynamic font source file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_data_ptr: + +.. rst-class:: classref-method + +|void| **_font_set_data_ptr**\ (\ font_rid\: :ref:`RID<class_RID>`, data_ptr\: ``const uint8_t*``, data_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_data_ptr>` + +**Optional.**\ + +Sets pointer to the font source data, e.g contents of the dynamic font source file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_descent: + +.. rst-class:: classref-method + +|void| **_font_set_descent**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, descent\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_descent>` + +**Required.**\ + +Sets the font descent (number of pixels below the baseline). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_disable_embedded_bitmaps: + +.. rst-class:: classref-method + +|void| **_font_set_disable_embedded_bitmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, disable_embedded_bitmaps\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_disable_embedded_bitmaps>` + +**Optional.**\ + +If set to ``true``, embedded font bitmap loading is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_embolden: + +.. rst-class:: classref-method + +|void| **_font_set_embolden**\ (\ font_rid\: :ref:`RID<class_RID>`, strength\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_embolden>` + +Sets font embolden strength. If ``strength`` is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_face_index: + +.. rst-class:: classref-method + +|void| **_font_set_face_index**\ (\ font_rid\: :ref:`RID<class_RID>`, face_index\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_face_index>` + +**Optional.**\ + +Sets an active face index in the TrueType / OpenType collection. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_script_support_override: +.. _class_TextServerExtension_private_method__font_set_fixed_size: .. rst-class:: classref-method -void **_font_remove_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script **)** |virtual| +|void| **_font_set_fixed_size**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_fixed_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_size_cache: +.. _class_TextServerExtension_private_method__font_set_fixed_size_scale_mode: .. rst-class:: classref-method -void **_font_remove_size_cache** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size **)** |virtual| +|void| **_font_set_fixed_size_scale_mode**\ (\ font_rid\: :ref:`RID<class_RID>`, fixed_size_scale_mode\: :ref:`FixedSizeScaleMode<enum_TextServer_FixedSizeScaleMode>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_fixed_size_scale_mode>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets bitmap font scaling mode. This property is used only if ``fixed_size`` is greater than zero. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_texture: +.. _class_TextServerExtension_private_method__font_set_force_autohinter: .. rst-class:: classref-method -void **_font_remove_texture** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index **)** |virtual| +|void| **_font_set_force_autohinter**\ (\ font_rid\: :ref:`RID<class_RID>`, force_autohinter\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_force_autohinter>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true`` auto-hinting is preferred over font built-in hinting. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_render_glyph: +.. _class_TextServerExtension_private_method__font_set_generate_mipmaps: .. rst-class:: classref-method -void **_font_render_glyph** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` index **)** |virtual| +|void| **_font_set_generate_mipmaps**\ (\ font_rid\: :ref:`RID<class_RID>`, generate_mipmaps\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_generate_mipmaps>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true`` font texture mipmap generation is enabled. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_render_range: +.. _class_TextServerExtension_private_method__font_set_global_oversampling: .. rst-class:: classref-method -void **_font_render_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| +|void| **_font_set_global_oversampling**\ (\ oversampling\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_global_oversampling>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets oversampling factor, shared by all font in the TextServer. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_allow_system_fallback: +.. _class_TextServerExtension_private_method__font_set_glyph_advance: .. rst-class:: classref-method -void **_font_set_allow_system_fallback** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` allow_system_fallback **)** |virtual| +|void| **_font_set_glyph_advance**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph\: :ref:`int<class_int>`, advance\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_glyph_advance>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets glyph advance (offset of the next glyph). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_antialiasing: +.. _class_TextServerExtension_private_method__font_set_glyph_offset: .. rst-class:: classref-method -void **_font_set_antialiasing** **(** :ref:`RID<class_RID>` font_rid, :ref:`FontAntialiasing<enum_TextServer_FontAntialiasing>` antialiasing **)** |virtual| +|void| **_font_set_glyph_offset**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, offset\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_glyph_offset>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets glyph offset from the baseline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_ascent: +.. _class_TextServerExtension_private_method__font_set_glyph_size: .. rst-class:: classref-method -void **_font_set_ascent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` ascent **)** |virtual| +|void| **_font_set_glyph_size**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, gl_size\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_glyph_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets size of the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_data: +.. _class_TextServerExtension_private_method__font_set_glyph_texture_idx: .. rst-class:: classref-method -void **_font_set_data** **(** :ref:`RID<class_RID>` font_rid, :ref:`PackedByteArray<class_PackedByteArray>` data **)** |virtual| +|void| **_font_set_glyph_texture_idx**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, texture_idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_glyph_texture_idx>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets index of the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_data_ptr: +.. _class_TextServerExtension_private_method__font_set_glyph_uv_rect: .. rst-class:: classref-method -void **_font_set_data_ptr** **(** :ref:`RID<class_RID>` font_rid, const uint8_t* data_ptr, :ref:`int<class_int>` data_size **)** |virtual| +|void| **_font_set_glyph_uv_rect**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, glyph\: :ref:`int<class_int>`, uv_rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_glyph_uv_rect>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets rectangle in the cache texture containing the glyph. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_descent: +.. _class_TextServerExtension_private_method__font_set_hinting: .. rst-class:: classref-method -void **_font_set_descent** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` descent **)** |virtual| +|void| **_font_set_hinting**\ (\ font_rid\: :ref:`RID<class_RID>`, hinting\: :ref:`Hinting<enum_TextServer_Hinting>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_hinting>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font hinting mode. Used by dynamic fonts only. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_embolden: +.. _class_TextServerExtension_private_method__font_set_kerning: .. rst-class:: classref-method -void **_font_set_embolden** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` strength **)** |virtual| +|void| **_font_set_kerning**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, glyph_pair\: :ref:`Vector2i<class_Vector2i>`, kerning\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_kerning>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets kerning for the pair of glyphs. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_face_index: +.. _class_TextServerExtension_private_method__font_set_language_support_override: .. rst-class:: classref-method -void **_font_set_face_index** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` face_index **)** |virtual| +|void| **_font_set_language_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, language\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_language_support_override>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adds override for :ref:`_font_is_language_supported<class_TextServerExtension_private_method__font_is_language_supported>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_fixed_size: +.. _class_TextServerExtension_private_method__font_set_msdf_pixel_range: .. rst-class:: classref-method -void **_font_set_fixed_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` fixed_size **)** |virtual| +|void| **_font_set_msdf_pixel_range**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_pixel_range\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_msdf_pixel_range>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the width of the range around the shape between the minimum and maximum representable signed distance. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_force_autohinter: +.. _class_TextServerExtension_private_method__font_set_msdf_size: .. rst-class:: classref-method -void **_font_set_force_autohinter** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` force_autohinter **)** |virtual| +|void| **_font_set_msdf_size**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_msdf_size>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets source font size used to generate MSDF textures. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_generate_mipmaps: +.. _class_TextServerExtension_private_method__font_set_multichannel_signed_distance_field: .. rst-class:: classref-method -void **_font_set_generate_mipmaps** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` generate_mipmaps **)** |virtual| +|void| **_font_set_multichannel_signed_distance_field**\ (\ font_rid\: :ref:`RID<class_RID>`, msdf\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_multichannel_signed_distance_field>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true``, glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. MSDF rendering allows displaying the font at any scaling factor without blurriness, and without incurring a CPU cost when the font size changes (since the font no longer needs to be rasterized on the CPU). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_global_oversampling: +.. _class_TextServerExtension_private_method__font_set_name: .. rst-class:: classref-method -void **_font_set_global_oversampling** **(** :ref:`float<class_float>` oversampling **)** |virtual| +|void| **_font_set_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_name>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the font family name. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_advance: +.. _class_TextServerExtension_private_method__font_set_opentype_feature_overrides: .. rst-class:: classref-method -void **_font_set_glyph_advance** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` advance **)** |virtual| +|void| **_font_set_opentype_feature_overrides**\ (\ font_rid\: :ref:`RID<class_RID>`, overrides\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_opentype_feature_overrides>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font OpenType feature set override. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_offset: +.. _class_TextServerExtension_private_method__font_set_oversampling: .. rst-class:: classref-method -void **_font_set_glyph_offset** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` offset **)** |virtual| +|void| **_font_set_oversampling**\ (\ font_rid\: :ref:`RID<class_RID>`, oversampling\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_oversampling>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font oversampling factor, if set to ``0.0`` global oversampling factor is used instead. Used by dynamic fonts only. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_size: +.. _class_TextServerExtension_private_method__font_set_scale: .. rst-class:: classref-method -void **_font_set_glyph_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Vector2<class_Vector2>` gl_size **)** |virtual| +|void| **_font_set_scale**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, scale\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_scale>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets scaling factor of the color bitmap font. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_texture_idx: +.. _class_TextServerExtension_private_method__font_set_script_support_override: .. rst-class:: classref-method -void **_font_set_glyph_texture_idx** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`int<class_int>` texture_idx **)** |virtual| +|void| **_font_set_script_support_override**\ (\ font_rid\: :ref:`RID<class_RID>`, script\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_script_support_override>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adds override for :ref:`_font_is_script_supported<class_TextServerExtension_private_method__font_is_script_supported>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_uv_rect: +.. _class_TextServerExtension_private_method__font_set_spacing: .. rst-class:: classref-method -void **_font_set_glyph_uv_rect** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` glyph, :ref:`Rect2<class_Rect2>` uv_rect **)** |virtual| +|void| **_font_set_spacing**\ (\ font_rid\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_spacing>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the spacing for ``spacing`` (see :ref:`SpacingType<enum_TextServer_SpacingType>`) to ``value`` in pixels (not relative to the font size). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_hinting: +.. _class_TextServerExtension_private_method__font_set_stretch: .. rst-class:: classref-method -void **_font_set_hinting** **(** :ref:`RID<class_RID>` font_rid, :ref:`Hinting<enum_TextServer_Hinting>` hinting **)** |virtual| +|void| **_font_set_stretch**\ (\ font_rid\: :ref:`RID<class_RID>`, stretch\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_stretch>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font stretch amount, compared to a normal width. A percentage value between ``50%`` and ``200%``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_kerning: +.. _class_TextServerExtension_private_method__font_set_style: .. rst-class:: classref-method -void **_font_set_kerning** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`Vector2i<class_Vector2i>` glyph_pair, :ref:`Vector2<class_Vector2>` kerning **)** |virtual| +|void| **_font_set_style**\ (\ font_rid\: :ref:`RID<class_RID>`, style\: |bitfield|\[:ref:`FontStyle<enum_TextServer_FontStyle>`\]\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_style>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the font style flags, see :ref:`FontStyle<enum_TextServer_FontStyle>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_language_support_override: +.. _class_TextServerExtension_private_method__font_set_style_name: .. rst-class:: classref-method -void **_font_set_language_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` language, :ref:`bool<class_bool>` supported **)** |virtual| +|void| **_font_set_style_name**\ (\ font_rid\: :ref:`RID<class_RID>`, name_style\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_style_name>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets the font style name. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_msdf_pixel_range: +.. _class_TextServerExtension_private_method__font_set_subpixel_positioning: .. rst-class:: classref-method -void **_font_set_msdf_pixel_range** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_pixel_range **)** |virtual| +|void| **_font_set_subpixel_positioning**\ (\ font_rid\: :ref:`RID<class_RID>`, subpixel_positioning\: :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_subpixel_positioning>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font subpixel glyph positioning mode. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_msdf_size: +.. _class_TextServerExtension_private_method__font_set_texture_image: .. rst-class:: classref-method -void **_font_set_msdf_size** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` msdf_size **)** |virtual| +|void| **_font_set_texture_image**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, image\: :ref:`Image<class_Image>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_texture_image>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets font cache texture image data. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_multichannel_signed_distance_field: +.. _class_TextServerExtension_private_method__font_set_texture_offsets: .. rst-class:: classref-method -void **_font_set_multichannel_signed_distance_field** **(** :ref:`RID<class_RID>` font_rid, :ref:`bool<class_bool>` msdf **)** |virtual| +|void| **_font_set_texture_offsets**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`Vector2i<class_Vector2i>`, texture_index\: :ref:`int<class_int>`, offset\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_texture_offsets>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets array containing glyph packing data. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_name: +.. _class_TextServerExtension_private_method__font_set_transform: .. rst-class:: classref-method -void **_font_set_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name **)** |virtual| +|void| **_font_set_transform**\ (\ font_rid\: :ref:`RID<class_RID>`, transform\: :ref:`Transform2D<class_Transform2D>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_transform>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_opentype_feature_overrides: +.. _class_TextServerExtension_private_method__font_set_underline_position: .. rst-class:: classref-method -void **_font_set_opentype_feature_overrides** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` overrides **)** |virtual| +|void| **_font_set_underline_position**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_position\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_underline_position>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_oversampling: +.. _class_TextServerExtension_private_method__font_set_underline_thickness: .. rst-class:: classref-method -void **_font_set_oversampling** **(** :ref:`RID<class_RID>` font_rid, :ref:`float<class_float>` oversampling **)** |virtual| +|void| **_font_set_underline_thickness**\ (\ font_rid\: :ref:`RID<class_RID>`, size\: :ref:`int<class_int>`, underline_thickness\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_underline_thickness>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets thickness of the underline in pixels. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_scale: +.. _class_TextServerExtension_private_method__font_set_variation_coordinates: .. rst-class:: classref-method -void **_font_set_scale** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` scale **)** |virtual| +|void| **_font_set_variation_coordinates**\ (\ font_rid\: :ref:`RID<class_RID>`, variation_coordinates\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_variation_coordinates>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets variation coordinates for the specified font cache entry. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_script_support_override: +.. _class_TextServerExtension_private_method__font_set_weight: .. rst-class:: classref-method -void **_font_set_script_support_override** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` script, :ref:`bool<class_bool>` supported **)** |virtual| +|void| **_font_set_weight**\ (\ font_rid\: :ref:`RID<class_RID>`, weight\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__font_set_weight>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets weight (boldness) of the font. A value in the ``100...999`` range, normal font weight is ``400``, bold font weight is ``700``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_stretch: +.. _class_TextServerExtension_private_method__font_supported_feature_list: .. rst-class:: classref-method -void **_font_set_stretch** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` stretch **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_font_supported_feature_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_supported_feature_list>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the dictionary of the supported OpenType features. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_style: +.. _class_TextServerExtension_private_method__font_supported_variation_list: .. rst-class:: classref-method -void **_font_set_style** **(** :ref:`RID<class_RID>` font_rid, |bitfield|\<:ref:`FontStyle<enum_TextServer_FontStyle>`\> style **)** |virtual| +:ref:`Dictionary<class_Dictionary>` **_font_supported_variation_list**\ (\ font_rid\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__font_supported_variation_list>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the dictionary of the supported OpenType variation coordinates. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_style_name: +.. _class_TextServerExtension_private_method__format_number: .. rst-class:: classref-method -void **_font_set_style_name** **(** :ref:`RID<class_RID>` font_rid, :ref:`String<class_String>` name_style **)** |virtual| +:ref:`String<class_String>` **_format_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__format_number>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Converts a number from the Western Arabic (0..9) to the numeral systems used in ``language``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_subpixel_positioning: +.. _class_TextServerExtension_private_method__free_rid: .. rst-class:: classref-method -void **_font_set_subpixel_positioning** **(** :ref:`RID<class_RID>` font_rid, :ref:`SubpixelPositioning<enum_TextServer_SubpixelPositioning>` subpixel_positioning **)** |virtual| +|void| **_free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__free_rid>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Frees an object created by this :ref:`TextServer<class_TextServer>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_texture_image: +.. _class_TextServerExtension_private_method__get_features: .. rst-class:: classref-method -void **_font_set_texture_image** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`Image<class_Image>` image **)** |virtual| +:ref:`int<class_int>` **_get_features**\ (\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__get_features>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns text server features, see :ref:`Feature<enum_TextServer_Feature>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_texture_offsets: +.. _class_TextServerExtension_private_method__get_hex_code_box_size: .. rst-class:: classref-method -void **_font_set_texture_offsets** **(** :ref:`RID<class_RID>` font_rid, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` texture_index, :ref:`PackedInt32Array<class_PackedInt32Array>` offset **)** |virtual| +:ref:`Vector2<class_Vector2>` **_get_hex_code_box_size**\ (\ size\: :ref:`int<class_int>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__get_hex_code_box_size>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_transform: +.. _class_TextServerExtension_private_method__get_name: .. rst-class:: classref-method -void **_font_set_transform** **(** :ref:`RID<class_RID>` font_rid, :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| +:ref:`String<class_String>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__get_name>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the name of the server interface. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_underline_position: +.. _class_TextServerExtension_private_method__get_support_data_filename: .. rst-class:: classref-method -void **_font_set_underline_position** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_position **)** |virtual| +:ref:`String<class_String>` **_get_support_data_filename**\ (\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__get_support_data_filename>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns default TextServer database (e.g. ICU break iterators and dictionaries) filename. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_underline_thickness: +.. _class_TextServerExtension_private_method__get_support_data_info: .. rst-class:: classref-method -void **_font_set_underline_thickness** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` size, :ref:`float<class_float>` underline_thickness **)** |virtual| +:ref:`String<class_String>` **_get_support_data_info**\ (\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__get_support_data_info>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns TextServer database (e.g. ICU break iterators and dictionaries) description. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_variation_coordinates: +.. _class_TextServerExtension_private_method__has: .. rst-class:: classref-method -void **_font_set_variation_coordinates** **(** :ref:`RID<class_RID>` font_rid, :ref:`Dictionary<class_Dictionary>` variation_coordinates **)** |virtual| +:ref:`bool<class_bool>` **_has**\ (\ rid\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__has>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if ``rid`` is valid resource owned by this text server. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_weight: +.. _class_TextServerExtension_private_method__has_feature: .. rst-class:: classref-method -void **_font_set_weight** **(** :ref:`RID<class_RID>` font_rid, :ref:`int<class_int>` weight **)** |virtual| +:ref:`bool<class_bool>` **_has_feature**\ (\ feature\: :ref:`Feature<enum_TextServer_Feature>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__has_feature>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if the server supports a feature. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_supported_feature_list: +.. _class_TextServerExtension_private_method__is_confusable: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_supported_feature_list** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`int<class_int>` **_is_confusable**\ (\ string\: :ref:`String<class_String>`, dict\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__is_confusable>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns index of the first string in ``dict`` which is visually confusable with the ``string``, or ``-1`` if none is found. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_supported_variation_list: +.. _class_TextServerExtension_private_method__is_locale_right_to_left: .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **_font_supported_variation_list** **(** :ref:`RID<class_RID>` font_rid **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_locale_right_to_left**\ (\ locale\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__is_locale_right_to_left>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if locale is right-to-left. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__format_number: +.. _class_TextServerExtension_private_method__is_valid_identifier: .. rst-class:: classref-method -:ref:`String<class_String>` **_format_number** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_valid_identifier**\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__is_valid_identifier>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if ``string`` is a valid identifier. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__free_rid: +.. _class_TextServerExtension_private_method__is_valid_letter: .. rst-class:: classref-method -void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| +:ref:`bool<class_bool>` **_is_valid_letter**\ (\ unicode\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__is_valid_letter>` .. container:: contribute @@ -2044,1135 +2362,1135 @@ void **_free_rid** **(** :ref:`RID<class_RID>` rid **)** |virtual| ---- -.. _class_TextServerExtension_method__get_features: +.. _class_TextServerExtension_private_method__load_support_data: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_features** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_load_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__load_support_data>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Loads optional TextServer database (e.g. ICU break iterators and dictionaries). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_hex_code_box_size: +.. _class_TextServerExtension_private_method__name_to_tag: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_get_hex_code_box_size** **(** :ref:`int<class_int>` size, :ref:`int<class_int>` index **)** |virtual| |const| +:ref:`int<class_int>` **_name_to_tag**\ (\ name\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__name_to_tag>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Converts readable feature, variation, script, or language name to OpenType tag. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_name: +.. _class_TextServerExtension_private_method__parse_number: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_parse_number**\ (\ number\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__parse_number>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Converts ``number`` from the numeral systems used in ``language`` to Western Arabic (0..9). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_support_data_filename: +.. _class_TextServerExtension_private_method__parse_structured_text: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_support_data_filename** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Vector3i<class_Vector3i>`\] **_parse_structured_text**\ (\ parser_type\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`, args\: :ref:`Array<class_Array>`, text\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__parse_structured_text>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Default implementation of the BiDi algorithm override function. See :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` for more info. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_support_data_info: +.. _class_TextServerExtension_private_method__percent_sign: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_support_data_info** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_percent_sign**\ (\ language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__percent_sign>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns percent sign used in the ``language``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__has: +.. _class_TextServerExtension_private_method__save_support_data: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has** **(** :ref:`RID<class_RID>` rid **)** |virtual| +:ref:`bool<class_bool>` **_save_support_data**\ (\ filename\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__save_support_data>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Saves optional TextServer database (e.g. ICU break iterators and dictionaries) to the file. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__has_feature: +.. _class_TextServerExtension_private_method__shaped_get_span_count: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_feature** **(** :ref:`Feature<enum_TextServer_Feature>` feature **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_get_span_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_get_span_count>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns number of text spans added using :ref:`_shaped_text_add_string<class_TextServerExtension_private_method__shaped_text_add_string>` or :ref:`_shaped_text_add_object<class_TextServerExtension_private_method__shaped_text_add_object>`. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_confusable: +.. _class_TextServerExtension_private_method__shaped_get_span_meta: .. rst-class:: classref-method -:ref:`int<class_int>` **_is_confusable** **(** :ref:`String<class_String>` string, :ref:`PackedStringArray<class_PackedStringArray>` dict **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_shaped_get_span_meta**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_get_span_meta>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns text span metadata. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_locale_right_to_left: +.. _class_TextServerExtension_private_method__shaped_set_span_update_font: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_locale_right_to_left** **(** :ref:`String<class_String>` locale **)** |virtual| |const| +|void| **_shaped_set_span_update_font**\ (\ shaped\: :ref:`RID<class_RID>`, index\: :ref:`int<class_int>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_set_span_update_font>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Changes text span font, font size, and OpenType features, without changing the text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_valid_identifier: +.. _class_TextServerExtension_private_method__shaped_text_add_object: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_valid_identifier** **(** :ref:`String<class_String>` string **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_add_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>`, length\: :ref:`int<class_int>`, baseline\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_add_object>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adds inline object to the text buffer, ``key`` must be unique. In the text, object is represented as ``length`` object replacement characters. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__load_support_data: +.. _class_TextServerExtension_private_method__shaped_text_add_string: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_load_support_data** **(** :ref:`String<class_String>` filename **)** |virtual| +:ref:`bool<class_bool>` **_shaped_text_add_string**\ (\ shaped\: :ref:`RID<class_RID>`, text\: :ref:`String<class_String>`, fonts\: :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\], size\: :ref:`int<class_int>`, opentype_features\: :ref:`Dictionary<class_Dictionary>`, language\: :ref:`String<class_String>`, meta\: :ref:`Variant<class_Variant>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_add_string>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adds text span and font to draw it to the text buffer. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__name_to_tag: +.. _class_TextServerExtension_private_method__shaped_text_clear: .. rst-class:: classref-method -:ref:`int<class_int>` **_name_to_tag** **(** :ref:`String<class_String>` name **)** |virtual| |const| +|void| **_shaped_text_clear**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_clear>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Clears text buffer (removes text and inline objects). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__parse_number: +.. _class_TextServerExtension_private_method__shaped_text_closest_character_pos: .. rst-class:: classref-method -:ref:`String<class_String>` **_parse_number** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_closest_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_closest_character_pos>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns composite character position closest to the ``pos``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__parse_structured_text: +.. _class_TextServerExtension_private_method__shaped_text_draw: .. rst-class:: classref-method -:ref:`Vector3i[]<class_Vector3i>` **_parse_structured_text** **(** :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser_type, :ref:`Array<class_Array>` args, :ref:`String<class_String>` text **)** |virtual| |const| +|void| **_shaped_text_draw**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>`, clip_r\: :ref:`float<class_float>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_draw>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Draw shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__percent_sign: +.. _class_TextServerExtension_private_method__shaped_text_draw_outline: .. rst-class:: classref-method -:ref:`String<class_String>` **_percent_sign** **(** :ref:`String<class_String>` language **)** |virtual| |const| +|void| **_shaped_text_draw_outline**\ (\ shaped\: :ref:`RID<class_RID>`, canvas\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, clip_l\: :ref:`float<class_float>`, clip_r\: :ref:`float<class_float>`, outline_size\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_draw_outline>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Draw the outline of the shaped text into a canvas item at a given position, with ``color``. ``pos`` specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__save_support_data: +.. _class_TextServerExtension_private_method__shaped_text_fit_to_width: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_save_support_data** **(** :ref:`String<class_String>` filename **)** |virtual| |const| +:ref:`float<class_float>` **_shaped_text_fit_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, justification_flags\: |bitfield|\[:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\]\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_fit_to_width>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Adjusts text width to fit to specified width, returns new text width. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_get_span_count: +.. _class_TextServerExtension_private_method__shaped_text_get_ascent: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_get_span_count** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`float<class_float>` **_shaped_text_get_ascent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_ascent>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_get_span_meta: +.. _class_TextServerExtension_private_method__shaped_text_get_carets: .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **_shaped_get_span_meta** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index **)** |virtual| |const| +|void| **_shaped_text_get_carets**\ (\ shaped\: :ref:`RID<class_RID>`, position\: :ref:`int<class_int>`, caret\: ``CaretInfo*``\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_carets>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns shapes of the carets corresponding to the character offset ``position`` in the text. Returned caret shape is 1 pixel wide rectangle. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_set_span_update_font: +.. _class_TextServerExtension_private_method__shaped_text_get_character_breaks: .. rst-class:: classref-method -void **_shaped_set_span_update_font** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` index, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features **)** |virtual| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_character_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_character_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns array of the composite character boundaries. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_add_object: +.. _class_TextServerExtension_private_method__shaped_text_get_custom_ellipsis: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_add_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align, :ref:`int<class_int>` length, :ref:`float<class_float>` baseline **)** |virtual| +:ref:`int<class_int>` **_shaped_text_get_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_custom_ellipsis>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ellipsis character used for text clipping. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_add_string: +.. _class_TextServerExtension_private_method__shaped_text_get_custom_punctuation: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_add_string** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` text, :ref:`RID[]<class_RID>` fonts, :ref:`int<class_int>` size, :ref:`Dictionary<class_Dictionary>` opentype_features, :ref:`String<class_String>` language, :ref:`Variant<class_Variant>` meta **)** |virtual| +:ref:`String<class_String>` **_shaped_text_get_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_custom_punctuation>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_clear: +.. _class_TextServerExtension_private_method__shaped_text_get_descent: .. rst-class:: classref-method -void **_shaped_text_clear** **(** :ref:`RID<class_RID>` shaped **)** |virtual| +:ref:`float<class_float>` **_shaped_text_get_descent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_descent>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_draw: +.. _class_TextServerExtension_private_method__shaped_text_get_direction: .. rst-class:: classref-method -void **_shaped_text_draw** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l, :ref:`float<class_float>` clip_r, :ref:`Color<class_Color>` color **)** |virtual| |const| +:ref:`Direction<enum_TextServer_Direction>` **_shaped_text_get_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_direction>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns direction of the text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_draw_outline: +.. _class_TextServerExtension_private_method__shaped_text_get_dominant_direction_in_range: .. rst-class:: classref-method -void **_shaped_text_draw_outline** **(** :ref:`RID<class_RID>` shaped, :ref:`RID<class_RID>` canvas, :ref:`Vector2<class_Vector2>` pos, :ref:`float<class_float>` clip_l, :ref:`float<class_float>` clip_r, :ref:`int<class_int>` outline_size, :ref:`Color<class_Color>` color **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_dominant_direction_in_range**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_dominant_direction_in_range>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns dominant direction of in the range of text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_fit_to_width: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyph_count: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_fit_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`JustificationFlag<enum_TextServer_JustificationFlag>`\> justification_flags **)** |virtual| +:ref:`int<class_int>` **_shaped_text_get_ellipsis_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyph_count>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns number of glyphs in the ellipsis. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ascent: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyphs: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_get_ascent** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +``const Glyph*`` **_shaped_text_get_ellipsis_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyphs>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns array of the glyphs in the ellipsis. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_carets: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_pos: .. rst-class:: classref-method -void **_shaped_text_get_carets** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` position, CaretInfo* caret **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_ellipsis_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_ellipsis_pos>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns position of the ellipsis. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_custom_punctuation: +.. _class_TextServerExtension_private_method__shaped_text_get_glyph_count: .. rst-class:: classref-method -:ref:`String<class_String>` **_shaped_text_get_custom_punctuation** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_glyph_count**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_glyph_count>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns number of glyphs in the buffer. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_descent: +.. _class_TextServerExtension_private_method__shaped_text_get_glyphs: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_get_descent** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +``const Glyph*`` **_shaped_text_get_glyphs**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_glyphs>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns an array of glyphs in the visual order. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_direction: +.. _class_TextServerExtension_private_method__shaped_text_get_grapheme_bounds: .. rst-class:: classref-method -:ref:`Direction<enum_TextServer_Direction>` **_shaped_text_get_direction** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_shaped_text_get_grapheme_bounds**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_grapheme_bounds>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns composite character's bounds as offsets from the start of the line. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_dominant_direction_in_range: +.. _class_TextServerExtension_private_method__shaped_text_get_inferred_direction: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_dominant_direction_in_range** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| |const| +:ref:`Direction<enum_TextServer_Direction>` **_shaped_text_get_inferred_direction**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_inferred_direction>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns direction of the text, inferred by the BiDi algorithm. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyph_count: +.. _class_TextServerExtension_private_method__shaped_text_get_line_breaks: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_ellipsis_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_line_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, start\: :ref:`int<class_int>`, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_line_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Breaks text to the lines and returns character ranges for each line. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyphs: +.. _class_TextServerExtension_private_method__shaped_text_get_line_breaks_adv: .. rst-class:: classref-method -const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_line_breaks_adv**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, start\: :ref:`int<class_int>`, once\: :ref:`bool<class_bool>`, break_flags\: |bitfield|\[:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\]\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_line_breaks_adv>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Breaks text to the lines and columns. Returns character ranges for each segment. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_pos: +.. _class_TextServerExtension_private_method__shaped_text_get_object_glyph: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_ellipsis_pos** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_object_glyph**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_object_glyph>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the glyph index of the inline object. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_glyph_count: +.. _class_TextServerExtension_private_method__shaped_text_get_object_range: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_glyph_count** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Vector2i<class_Vector2i>` **_shaped_text_get_object_range**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_object_range>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the character range of the inline object. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_glyphs: +.. _class_TextServerExtension_private_method__shaped_text_get_object_rect: .. rst-class:: classref-method -const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Rect2<class_Rect2>` **_shaped_text_get_object_rect**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_object_rect>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns bounding rectangle of the inline object. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_grapheme_bounds: +.. _class_TextServerExtension_private_method__shaped_text_get_objects: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_shaped_text_get_grapheme_bounds** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| +:ref:`Array<class_Array>` **_shaped_text_get_objects**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_objects>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns array of inline objects. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_inferred_direction: +.. _class_TextServerExtension_private_method__shaped_text_get_orientation: .. rst-class:: classref-method -:ref:`Direction<enum_TextServer_Direction>` **_shaped_text_get_inferred_direction** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Orientation<enum_TextServer_Orientation>` **_shaped_text_get_orientation**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_orientation>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns text orientation. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks: +.. _class_TextServerExtension_private_method__shaped_text_get_parent: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_line_breaks** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, :ref:`int<class_int>` start, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags **)** |virtual| |const| +:ref:`RID<class_RID>` **_shaped_text_get_parent**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_parent>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the parent buffer from which the substring originates. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks_adv: +.. _class_TextServerExtension_private_method__shaped_text_get_preserve_control: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_line_breaks_adv** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` width, :ref:`int<class_int>` start, :ref:`bool<class_bool>` once, |bitfield|\<:ref:`LineBreakFlag<enum_TextServer_LineBreakFlag>`\> break_flags **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_get_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_preserve_control>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if text buffer is configured to display control characters. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_object_rect: +.. _class_TextServerExtension_private_method__shaped_text_get_preserve_invalid: .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **_shaped_text_get_object_rect** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_get_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_preserve_invalid>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if text buffer is configured to display hexadecimal codes in place of invalid characters. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_objects: +.. _class_TextServerExtension_private_method__shaped_text_get_range: .. rst-class:: classref-method -:ref:`Array<class_Array>` **_shaped_text_get_objects** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Vector2i<class_Vector2i>` **_shaped_text_get_range**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_range>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns substring buffer character range in the parent buffer. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_orientation: +.. _class_TextServerExtension_private_method__shaped_text_get_selection: .. rst-class:: classref-method -:ref:`Orientation<enum_TextServer_Orientation>` **_shaped_text_get_orientation** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **_shaped_text_get_selection**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, end\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_selection>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns selection rectangles for the specified character range. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_parent: +.. _class_TextServerExtension_private_method__shaped_text_get_size: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_shaped_text_get_parent** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`Vector2<class_Vector2>` **_shaped_text_get_size**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_size>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns size of the text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_control: +.. _class_TextServerExtension_private_method__shaped_text_get_spacing: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_get_preserve_control** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_spacing>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_invalid: +.. _class_TextServerExtension_private_method__shaped_text_get_trim_pos: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_get_preserve_invalid** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_get_trim_pos**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_trim_pos>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the position of the overrun trim. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_range: +.. _class_TextServerExtension_private_method__shaped_text_get_underline_position: .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **_shaped_text_get_range** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`float<class_float>` **_shaped_text_get_underline_position**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_underline_position>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns pixel offset of the underline below the baseline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_selection: +.. _class_TextServerExtension_private_method__shaped_text_get_underline_thickness: .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **_shaped_text_get_selection** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` end **)** |virtual| |const| +:ref:`float<class_float>` **_shaped_text_get_underline_thickness**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_underline_thickness>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns thickness of the underline. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_size: +.. _class_TextServerExtension_private_method__shaped_text_get_width: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **_shaped_text_get_size** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`float<class_float>` **_shaped_text_get_width**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_width>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns width (for horizontal layout) or height (for vertical) of the text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_spacing: +.. _class_TextServerExtension_private_method__shaped_text_get_word_breaks: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_word_breaks**\ (\ shaped\: :ref:`RID<class_RID>`, grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\], skip_grapheme_flags\: |bitfield|\[:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\]\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_get_word_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Breaks text into words and returns array of character ranges. Use ``grapheme_flags`` to set what characters are used for breaking (see :ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_trim_pos: +.. _class_TextServerExtension_private_method__shaped_text_hit_test_grapheme: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_get_trim_pos** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_hit_test_grapheme**\ (\ shaped\: :ref:`RID<class_RID>`, coord\: :ref:`float<class_float>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_hit_test_grapheme>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns grapheme index at the specified pixel offset at the baseline, or ``-1`` if none is found. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_position: +.. _class_TextServerExtension_private_method__shaped_text_hit_test_position: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_get_underline_position** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_hit_test_position**\ (\ shaped\: :ref:`RID<class_RID>`, coord\: :ref:`float<class_float>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_hit_test_position>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_thickness: +.. _class_TextServerExtension_private_method__shaped_text_is_ready: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_get_underline_thickness** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_is_ready**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_is_ready>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if buffer is successfully shaped. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_width: +.. _class_TextServerExtension_private_method__shaped_text_next_character_pos: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_get_width** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_next_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_next_character_pos>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns composite character end position closest to the ``pos``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_word_breaks: +.. _class_TextServerExtension_private_method__shaped_text_next_grapheme_pos: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_shaped_text_get_word_breaks** **(** :ref:`RID<class_RID>` shaped, |bitfield|\<:ref:`GraphemeFlag<enum_TextServer_GraphemeFlag>`\> grapheme_flags **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_next_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_next_grapheme_pos>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns grapheme end position closest to the ``pos``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_grapheme: +.. _class_TextServerExtension_private_method__shaped_text_overrun_trim_to_width: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_hit_test_grapheme** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coord **)** |virtual| |const| +|void| **_shaped_text_overrun_trim_to_width**\ (\ shaped\: :ref:`RID<class_RID>`, width\: :ref:`float<class_float>`, trim_flags\: |bitfield|\[:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\]\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_overrun_trim_to_width>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Trims text if it exceeds the given width. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_position: +.. _class_TextServerExtension_private_method__shaped_text_prev_character_pos: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_hit_test_position** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` coord **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_prev_character_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_prev_character_pos>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns composite character start position closest to the ``pos``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_is_ready: +.. _class_TextServerExtension_private_method__shaped_text_prev_grapheme_pos: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_is_ready** **(** :ref:`RID<class_RID>` shaped **)** |virtual| |const| +:ref:`int<class_int>` **_shaped_text_prev_grapheme_pos**\ (\ shaped\: :ref:`RID<class_RID>`, pos\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_prev_grapheme_pos>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns grapheme start position closest to the ``pos``. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_next_grapheme_pos: +.. _class_TextServerExtension_private_method__shaped_text_resize_object: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_next_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_resize_object**\ (\ shaped\: :ref:`RID<class_RID>`, key\: :ref:`Variant<class_Variant>`, size\: :ref:`Vector2<class_Vector2>`, inline_align\: :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>`, baseline\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_resize_object>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets new size and alignment of embedded object. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_overrun_trim_to_width: +.. _class_TextServerExtension_private_method__shaped_text_set_bidi_override: .. rst-class:: classref-method -void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID<class_RID>` shaped, :ref:`float<class_float>` width, |bitfield|\<:ref:`TextOverrunFlag<enum_TextServer_TextOverrunFlag>`\> trim_flags **)** |virtual| +|void| **_shaped_text_set_bidi_override**\ (\ shaped\: :ref:`RID<class_RID>`, override\: :ref:`Array<class_Array>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_bidi_override>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Overrides BiDi for the structured text. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_prev_grapheme_pos: +.. _class_TextServerExtension_private_method__shaped_text_set_custom_ellipsis: .. rst-class:: classref-method -:ref:`int<class_int>` **_shaped_text_prev_grapheme_pos** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` pos **)** |virtual| |const| +|void| **_shaped_text_set_custom_ellipsis**\ (\ shaped\: :ref:`RID<class_RID>`, char\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_custom_ellipsis>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets ellipsis character used for text clipping. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_resize_object: +.. _class_TextServerExtension_private_method__shaped_text_set_custom_punctuation: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_resize_object** **(** :ref:`RID<class_RID>` shaped, :ref:`Variant<class_Variant>` key, :ref:`Vector2<class_Vector2>` size, :ref:`InlineAlignment<enum_@GlobalScope_InlineAlignment>` inline_align, :ref:`float<class_float>` baseline **)** |virtual| +|void| **_shaped_text_set_custom_punctuation**\ (\ shaped\: :ref:`RID<class_RID>`, punct\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_custom_punctuation>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets custom punctuation character list, used for word breaking. If set to empty string, server defaults are used. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_bidi_override: +.. _class_TextServerExtension_private_method__shaped_text_set_direction: .. rst-class:: classref-method -void **_shaped_text_set_bidi_override** **(** :ref:`RID<class_RID>` shaped, :ref:`Array<class_Array>` override **)** |virtual| +|void| **_shaped_text_set_direction**\ (\ shaped\: :ref:`RID<class_RID>`, direction\: :ref:`Direction<enum_TextServer_Direction>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_direction>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets desired text direction. If set to :ref:`TextServer.DIRECTION_AUTO<class_TextServer_constant_DIRECTION_AUTO>`, direction will be detected based on the buffer contents and current locale. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_custom_punctuation: +.. _class_TextServerExtension_private_method__shaped_text_set_orientation: .. rst-class:: classref-method -void **_shaped_text_set_custom_punctuation** **(** :ref:`RID<class_RID>` shaped, :ref:`String<class_String>` punct **)** |virtual| +|void| **_shaped_text_set_orientation**\ (\ shaped\: :ref:`RID<class_RID>`, orientation\: :ref:`Orientation<enum_TextServer_Orientation>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_orientation>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets desired text orientation. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_direction: +.. _class_TextServerExtension_private_method__shaped_text_set_preserve_control: .. rst-class:: classref-method -void **_shaped_text_set_direction** **(** :ref:`RID<class_RID>` shaped, :ref:`Direction<enum_TextServer_Direction>` direction **)** |virtual| +|void| **_shaped_text_set_preserve_control**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_preserve_control>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true`` text buffer will display control characters. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_orientation: +.. _class_TextServerExtension_private_method__shaped_text_set_preserve_invalid: .. rst-class:: classref-method -void **_shaped_text_set_orientation** **(** :ref:`RID<class_RID>` shaped, :ref:`Orientation<enum_TextServer_Orientation>` orientation **)** |virtual| +|void| **_shaped_text_set_preserve_invalid**\ (\ shaped\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_preserve_invalid>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If set to ``true`` text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_control: +.. _class_TextServerExtension_private_method__shaped_text_set_spacing: .. rst-class:: classref-method -void **_shaped_text_set_preserve_control** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |virtual| +|void| **_shaped_text_set_spacing**\ (\ shaped\: :ref:`RID<class_RID>`, spacing\: :ref:`SpacingType<enum_TextServer_SpacingType>`, value\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_set_spacing>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Sets extra spacing added between glyphs or lines in pixels. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_invalid: +.. _class_TextServerExtension_private_method__shaped_text_shape: .. rst-class:: classref-method -void **_shaped_text_set_preserve_invalid** **(** :ref:`RID<class_RID>` shaped, :ref:`bool<class_bool>` enabled **)** |virtual| +:ref:`bool<class_bool>` **_shaped_text_shape**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_shape>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Shapes buffer if it's not shaped. Returns ``true`` if the string is shaped successfully. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_spacing: +.. _class_TextServerExtension_private_method__shaped_text_sort_logical: .. rst-class:: classref-method -void **_shaped_text_set_spacing** **(** :ref:`RID<class_RID>` shaped, :ref:`SpacingType<enum_TextServer_SpacingType>` spacing, :ref:`int<class_int>` value **)** |virtual| +``const Glyph*`` **_shaped_text_sort_logical**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_sort_logical>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns text glyphs in the logical order. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_shape: +.. _class_TextServerExtension_private_method__shaped_text_substr: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_shape** **(** :ref:`RID<class_RID>` shaped **)** |virtual| +:ref:`RID<class_RID>` **_shaped_text_substr**\ (\ shaped\: :ref:`RID<class_RID>`, start\: :ref:`int<class_int>`, length\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_substr>` -.. container:: contribute +**Required.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns text buffer for the substring of the text in the ``shaped`` text buffer (including inline objects). .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_sort_logical: +.. _class_TextServerExtension_private_method__shaped_text_tab_align: .. rst-class:: classref-method -const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped **)** |virtual| +:ref:`float<class_float>` **_shaped_text_tab_align**\ (\ shaped\: :ref:`RID<class_RID>`, tab_stops\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_tab_align>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Aligns shaped text to the given tab-stops. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_substr: +.. _class_TextServerExtension_private_method__shaped_text_update_breaks: .. rst-class:: classref-method -:ref:`RID<class_RID>` **_shaped_text_substr** **(** :ref:`RID<class_RID>` shaped, :ref:`int<class_int>` start, :ref:`int<class_int>` length **)** |virtual| |const| +:ref:`bool<class_bool>` **_shaped_text_update_breaks**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_update_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Updates break points in the shaped text. This method is called by default implementation of text breaking functions. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_tab_align: +.. _class_TextServerExtension_private_method__shaped_text_update_justification_ops: .. rst-class:: classref-method -:ref:`float<class_float>` **_shaped_text_tab_align** **(** :ref:`RID<class_RID>` shaped, :ref:`PackedFloat32Array<class_PackedFloat32Array>` tab_stops **)** |virtual| +:ref:`bool<class_bool>` **_shaped_text_update_justification_ops**\ (\ shaped\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_TextServerExtension_private_method__shaped_text_update_justification_ops>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Updates justification points in the shaped text. This method is called by default implementation of text justification functions. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_update_breaks: +.. _class_TextServerExtension_private_method__spoof_check: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_update_breaks** **(** :ref:`RID<class_RID>` shaped **)** |virtual| +:ref:`bool<class_bool>` **_spoof_check**\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__spoof_check>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if ``string`` is likely to be an attempt at confusing the reader. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_update_justification_ops: +.. _class_TextServerExtension_private_method__string_get_character_breaks: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_shaped_text_update_justification_ops** **(** :ref:`RID<class_RID>` shaped **)** |virtual| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_string_get_character_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__string_get_character_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns array of the composite character boundaries. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__spoof_check: +.. _class_TextServerExtension_private_method__string_get_word_breaks: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_spoof_check** **(** :ref:`String<class_String>` string **)** |virtual| |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **_string_get_word_breaks**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`, chars_per_line\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__string_get_word_breaks>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns an array of the word break boundaries. Elements in the returned array are the offsets of the start and end of words. Therefore the length of the array is always even. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_get_word_breaks: +.. _class_TextServerExtension_private_method__string_to_lower: .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **_string_get_word_breaks** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language, :ref:`int<class_int>` chars_per_line **)** |virtual| |const| +:ref:`String<class_String>` **_string_to_lower**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__string_to_lower>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the string converted to lowercase. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_to_lower: +.. _class_TextServerExtension_private_method__string_to_title: .. rst-class:: classref-method -:ref:`String<class_String>` **_string_to_lower** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| +:ref:`String<class_String>` **_string_to_title**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__string_to_title>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the string converted to title case. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_to_upper: +.. _class_TextServerExtension_private_method__string_to_upper: .. rst-class:: classref-method -:ref:`String<class_String>` **_string_to_upper** **(** :ref:`String<class_String>` string, :ref:`String<class_String>` language **)** |virtual| |const| +:ref:`String<class_String>` **_string_to_upper**\ (\ string\: :ref:`String<class_String>`, language\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__string_to_upper>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the string converted to uppercase. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__strip_diacritics: +.. _class_TextServerExtension_private_method__strip_diacritics: .. rst-class:: classref-method -:ref:`String<class_String>` **_strip_diacritics** **(** :ref:`String<class_String>` string **)** |virtual| |const| +:ref:`String<class_String>` **_strip_diacritics**\ (\ string\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__strip_diacritics>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Strips diacritics from the string. .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__tag_to_name: +.. _class_TextServerExtension_private_method__tag_to_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_tag_to_name** **(** :ref:`int<class_int>` tag **)** |virtual| |const| +:ref:`String<class_String>` **_tag_to_name**\ (\ tag\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextServerExtension_private_method__tag_to_name>` -.. container:: contribute +**Optional.**\ - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Converts OpenType tag to readable feature, variation, script, or language name. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -3181,3 +3499,4 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID<class_RID>` shaped ** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textserverfallback.rst b/classes/class_textserverfallback.rst index 69a98d507e7..ff8fba457b0 100644 --- a/classes/class_textserverfallback.rst +++ b/classes/class_textserverfallback.rst @@ -30,3 +30,4 @@ A fallback implementation of Godot's text server. This fallback is faster than : .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textservermanager.rst b/classes/class_textservermanager.rst index 0932f6e0cad..95a3557ee80 100644 --- a/classes/class_textservermanager.rst +++ b/classes/class_textservermanager.rst @@ -31,23 +31,23 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_interface<class_TextServerManager_method_add_interface>` **(** :ref:`TextServer<class_TextServer>` interface **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextServer<class_TextServer>` | :ref:`find_interface<class_TextServerManager_method_find_interface>` **(** :ref:`String<class_String>` name **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextServer<class_TextServer>` | :ref:`get_interface<class_TextServerManager_method_get_interface>` **(** :ref:`int<class_int>` idx **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_interface_count<class_TextServerManager_method_get_interface_count>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_interfaces<class_TextServerManager_method_get_interfaces>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextServer<class_TextServer>` | :ref:`get_primary_interface<class_TextServerManager_method_get_primary_interface>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_interface<class_TextServerManager_method_remove_interface>` **(** :ref:`TextServer<class_TextServer>` interface **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_primary_interface<class_TextServerManager_method_set_primary_interface>` **(** :ref:`TextServer<class_TextServer>` index **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_interface<class_TextServerManager_method_add_interface>`\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer<class_TextServer>` | :ref:`find_interface<class_TextServerManager_method_find_interface>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer<class_TextServer>` | :ref:`get_interface<class_TextServerManager_method_get_interface>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_interface_count<class_TextServerManager_method_get_interface_count>`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_interfaces<class_TextServerManager_method_get_interfaces>`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextServer<class_TextServer>` | :ref:`get_primary_interface<class_TextServerManager_method_get_primary_interface>`\ (\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_interface<class_TextServerManager_method_remove_interface>`\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_primary_interface<class_TextServerManager_method_set_primary_interface>`\ (\ index\: :ref:`TextServer<class_TextServer>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,7 +62,7 @@ Signals .. rst-class:: classref-signal -**interface_added** **(** :ref:`StringName<class_StringName>` interface_name **)** +**interface_added**\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TextServerManager_signal_interface_added>` Emitted when a new interface has been added. @@ -74,7 +74,7 @@ Emitted when a new interface has been added. .. rst-class:: classref-signal -**interface_removed** **(** :ref:`StringName<class_StringName>` interface_name **)** +**interface_removed**\ (\ interface_name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TextServerManager_signal_interface_removed>` Emitted when an interface is removed. @@ -91,7 +91,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_interface** **(** :ref:`TextServer<class_TextServer>` interface **)** +|void| **add_interface**\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_add_interface>` Registers a :ref:`TextServer<class_TextServer>` interface. @@ -103,7 +103,7 @@ Registers a :ref:`TextServer<class_TextServer>` interface. .. rst-class:: classref-method -:ref:`TextServer<class_TextServer>` **find_interface** **(** :ref:`String<class_String>` name **)** |const| +:ref:`TextServer<class_TextServer>` **find_interface**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TextServerManager_method_find_interface>` Finds an interface by its ``name``. @@ -115,7 +115,7 @@ Finds an interface by its ``name``. .. rst-class:: classref-method -:ref:`TextServer<class_TextServer>` **get_interface** **(** :ref:`int<class_int>` idx **)** |const| +:ref:`TextServer<class_TextServer>` **get_interface**\ (\ idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interface>` Returns the interface registered at a given index. @@ -127,7 +127,7 @@ Returns the interface registered at a given index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_interface_count** **(** **)** |const| +:ref:`int<class_int>` **get_interface_count**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interface_count>` Returns the number of interfaces currently registered. @@ -139,7 +139,7 @@ Returns the number of interfaces currently registered. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_interfaces** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_interfaces**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_interfaces>` Returns a list of available interfaces, with the index and name of each interface. @@ -151,7 +151,7 @@ Returns a list of available interfaces, with the index and name of each interfac .. rst-class:: classref-method -:ref:`TextServer<class_TextServer>` **get_primary_interface** **(** **)** |const| +:ref:`TextServer<class_TextServer>` **get_primary_interface**\ (\ ) |const| :ref:`🔗<class_TextServerManager_method_get_primary_interface>` Returns the primary :ref:`TextServer<class_TextServer>` interface currently in use. @@ -163,7 +163,7 @@ Returns the primary :ref:`TextServer<class_TextServer>` interface currently in u .. rst-class:: classref-method -void **remove_interface** **(** :ref:`TextServer<class_TextServer>` interface **)** +|void| **remove_interface**\ (\ interface\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_remove_interface>` Removes an interface. All fonts and shaped text caches should be freed before removing an interface. @@ -175,7 +175,7 @@ Removes an interface. All fonts and shaped text caches should be freed before re .. rst-class:: classref-method -void **set_primary_interface** **(** :ref:`TextServer<class_TextServer>` index **)** +|void| **set_primary_interface**\ (\ index\: :ref:`TextServer<class_TextServer>`\ ) :ref:`🔗<class_TextServerManager_method_set_primary_interface>` Sets the primary :ref:`TextServer<class_TextServer>` interface. @@ -186,3 +186,4 @@ Sets the primary :ref:`TextServer<class_TextServer>` interface. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture.rst b/classes/class_texture.rst index 246ba9a41a9..afd74fd2f5e 100644 --- a/classes/class_texture.rst +++ b/classes/class_texture.rst @@ -30,3 +30,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture2d.rst b/classes/class_texture2d.rst index e32153efbdd..6f90d931f2a 100644 --- a/classes/class_texture2d.rst +++ b/classes/class_texture2d.rst @@ -12,7 +12,7 @@ Texture2D **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`AnimatedTexture<class_AnimatedTexture>`, :ref:`AtlasTexture<class_AtlasTexture>`, :ref:`CameraTexture<class_CameraTexture>`, :ref:`CanvasTexture<class_CanvasTexture>`, :ref:`CompressedTexture2D<class_CompressedTexture2D>`, :ref:`CurveTexture<class_CurveTexture>`, :ref:`CurveXYZTexture<class_CurveXYZTexture>`, :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`ImageTexture<class_ImageTexture>`, :ref:`MeshTexture<class_MeshTexture>`, :ref:`NoiseTexture2D<class_NoiseTexture2D>`, :ref:`PlaceholderTexture2D<class_PlaceholderTexture2D>`, :ref:`PortableCompressedTexture2D<class_PortableCompressedTexture2D>`, :ref:`ViewportTexture<class_ViewportTexture>` +**Inherited By:** :ref:`AnimatedTexture<class_AnimatedTexture>`, :ref:`AtlasTexture<class_AtlasTexture>`, :ref:`CameraTexture<class_CameraTexture>`, :ref:`CanvasTexture<class_CanvasTexture>`, :ref:`CompressedTexture2D<class_CompressedTexture2D>`, :ref:`CurveTexture<class_CurveTexture>`, :ref:`CurveXYZTexture<class_CurveXYZTexture>`, :ref:`GradientTexture1D<class_GradientTexture1D>`, :ref:`GradientTexture2D<class_GradientTexture2D>`, :ref:`ImageTexture<class_ImageTexture>`, :ref:`MeshTexture<class_MeshTexture>`, :ref:`NoiseTexture2D<class_NoiseTexture2D>`, :ref:`PlaceholderTexture2D<class_PlaceholderTexture2D>`, :ref:`PortableCompressedTexture2D<class_PortableCompressedTexture2D>`, :ref:`Texture2DRD<class_Texture2DRD>`, :ref:`ViewportTexture<class_ViewportTexture>` Texture for 2D and 3D. @@ -37,39 +37,39 @@ Methods .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw<class_Texture2D_method__draw>` **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_rect<class_Texture2D_method__draw_rect>` **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_rect_region<class_Texture2D_method__draw_rect_region>` **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose, :ref:`bool<class_bool>` clip_uv **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_height<class_Texture2D_method__get_height>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_width<class_Texture2D_method__get_width>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_alpha<class_Texture2D_method__has_alpha>` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_pixel_opaque<class_Texture2D_method__is_pixel_opaque>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture2D_method_create_placeholder>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw<class_Texture2D_method_draw>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` position, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_rect<class_Texture2D_method_draw_rect>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_rect_region<class_Texture2D_method_draw_rect_region>` **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false, :ref:`bool<class_bool>` clip_uv=true **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_height<class_Texture2D_method_get_height>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_image<class_Texture2D_method_get_image>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_Texture2D_method_get_size>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_width<class_Texture2D_method_get_width>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_alpha<class_Texture2D_method_has_alpha>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw<class_Texture2D_private_method__draw>`\ (\ to_canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw_rect<class_Texture2D_private_method__draw_rect>`\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, tile\: :ref:`bool<class_bool>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw_rect_region<class_Texture2D_private_method__draw_rect_region>`\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`, clip_uv\: :ref:`bool<class_bool>`\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_height<class_Texture2D_private_method__get_height>`\ (\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_width<class_Texture2D_private_method__get_width>`\ (\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_alpha<class_Texture2D_private_method__has_alpha>`\ (\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_pixel_opaque<class_Texture2D_private_method__is_pixel_opaque>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture2D_method_create_placeholder>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw<class_Texture2D_method_draw>`\ (\ canvas_item\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_rect<class_Texture2D_method_draw_rect>`\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, tile\: :ref:`bool<class_bool>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_rect_region<class_Texture2D_method_draw_rect_region>`\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false, clip_uv\: :ref:`bool<class_bool>` = true\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_height<class_Texture2D_method_get_height>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_image<class_Texture2D_method_get_image>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_size<class_Texture2D_method_get_size>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_width<class_Texture2D_method_get_width>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_alpha<class_Texture2D_method_has_alpha>`\ (\ ) |const| | + +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,11 +80,11 @@ Methods Method Descriptions ------------------- -.. _class_Texture2D_method__draw: +.. _class_Texture2D_private_method__draw: .. rst-class:: classref-method -void **_draw** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Vector2<class_Vector2>` pos, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose **)** |virtual| |const| +|void| **_draw**\ (\ to_canvas_item\: :ref:`RID<class_RID>`, pos\: :ref:`Vector2<class_Vector2>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__draw>` Called when the entire **Texture2D** is requested to be drawn over a :ref:`CanvasItem<class_CanvasItem>`, with the top-left offset specified in ``pos``. ``modulate`` specifies a multiplier for the colors being drawn, while ``transpose`` specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). @@ -94,11 +94,11 @@ Called when the entire **Texture2D** is requested to be drawn over a :ref:`Canva ---- -.. _class_Texture2D_method__draw_rect: +.. _class_Texture2D_private_method__draw_rect: .. rst-class:: classref-method -void **_draw_rect** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose **)** |virtual| |const| +|void| **_draw_rect**\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, tile\: :ref:`bool<class_bool>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__draw_rect>` Called when the **Texture2D** is requested to be drawn onto :ref:`CanvasItem<class_CanvasItem>`'s specified ``rect``. ``modulate`` specifies a multiplier for the colors being drawn, while ``transpose`` specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). @@ -108,11 +108,11 @@ Called when the **Texture2D** is requested to be drawn onto :ref:`CanvasItem<cla ---- -.. _class_Texture2D_method__draw_rect_region: +.. _class_Texture2D_private_method__draw_rect_region: .. rst-class:: classref-method -void **_draw_rect_region** **(** :ref:`RID<class_RID>` to_canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate, :ref:`bool<class_bool>` transpose, :ref:`bool<class_bool>` clip_uv **)** |virtual| |const| +|void| **_draw_rect_region**\ (\ to_canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>`, transpose\: :ref:`bool<class_bool>`, clip_uv\: :ref:`bool<class_bool>`\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__draw_rect_region>` Called when a part of the **Texture2D** specified by ``src_rect``'s coordinates is requested to be drawn onto :ref:`CanvasItem<class_CanvasItem>`'s specified ``rect``. ``modulate`` specifies a multiplier for the colors being drawn, while ``transpose`` specifies whether drawing should be performed in column-major order instead of row-major order (resulting in 90-degree clockwise rotation). @@ -122,11 +122,11 @@ Called when a part of the **Texture2D** specified by ``src_rect``'s coordinates ---- -.. _class_Texture2D_method__get_height: +.. _class_Texture2D_private_method__get_height: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_height** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_height**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__get_height>` Called when the **Texture2D**'s height is queried. @@ -134,11 +134,11 @@ Called when the **Texture2D**'s height is queried. ---- -.. _class_Texture2D_method__get_width: +.. _class_Texture2D_private_method__get_width: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_width** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_width**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__get_width>` Called when the **Texture2D**'s width is queried. @@ -146,11 +146,11 @@ Called when the **Texture2D**'s width is queried. ---- -.. _class_Texture2D_method__has_alpha: +.. _class_Texture2D_private_method__has_alpha: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_alpha** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_alpha**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__has_alpha>` Called when the presence of an alpha channel in the **Texture2D** is queried. @@ -158,11 +158,11 @@ Called when the presence of an alpha channel in the **Texture2D** is queried. ---- -.. _class_Texture2D_method__is_pixel_opaque: +.. _class_Texture2D_private_method__is_pixel_opaque: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_pixel_opaque** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_pixel_opaque**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_Texture2D_private_method__is_pixel_opaque>` Called when a pixel's opaque state in the **Texture2D** is queried at the specified ``(x, y)`` position. @@ -174,7 +174,7 @@ Called when a pixel's opaque state in the **Texture2D** is queried at the specif .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const| +:ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_create_placeholder>` Creates a placeholder version of this resource (:ref:`PlaceholderTexture2D<class_PlaceholderTexture2D>`). @@ -186,7 +186,7 @@ Creates a placeholder version of this resource (:ref:`PlaceholderTexture2D<class .. rst-class:: classref-method -void **draw** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Vector2<class_Vector2>` position, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** |const| +|void| **draw**\ (\ canvas_item\: :ref:`RID<class_RID>`, position\: :ref:`Vector2<class_Vector2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Texture2D_method_draw>` Draws the texture using a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`RenderingServer<class_RenderingServer>` API at the specified ``position``. @@ -198,7 +198,7 @@ Draws the texture using a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`Ren .. rst-class:: classref-method -void **draw_rect** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`bool<class_bool>` tile, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false **)** |const| +|void| **draw_rect**\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, tile\: :ref:`bool<class_bool>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Texture2D_method_draw_rect>` Draws the texture using a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`RenderingServer<class_RenderingServer>` API. @@ -210,7 +210,7 @@ Draws the texture using a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`Ren .. rst-class:: classref-method -void **draw_rect_region** **(** :ref:`RID<class_RID>` canvas_item, :ref:`Rect2<class_Rect2>` rect, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Color<class_Color>` modulate=Color(1, 1, 1, 1), :ref:`bool<class_bool>` transpose=false, :ref:`bool<class_bool>` clip_uv=true **)** |const| +|void| **draw_rect_region**\ (\ canvas_item\: :ref:`RID<class_RID>`, rect\: :ref:`Rect2<class_Rect2>`, src_rect\: :ref:`Rect2<class_Rect2>`, modulate\: :ref:`Color<class_Color>` = Color(1, 1, 1, 1), transpose\: :ref:`bool<class_bool>` = false, clip_uv\: :ref:`bool<class_bool>` = true\ ) |const| :ref:`🔗<class_Texture2D_method_draw_rect_region>` Draws a part of the texture using a :ref:`CanvasItem<class_CanvasItem>` with the :ref:`RenderingServer<class_RenderingServer>` API. @@ -222,7 +222,7 @@ Draws a part of the texture using a :ref:`CanvasItem<class_CanvasItem>` with the .. rst-class:: classref-method -:ref:`int<class_int>` **get_height** **(** **)** |const| +:ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_get_height>` Returns the texture height in pixels. @@ -234,10 +234,12 @@ Returns the texture height in pixels. .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_image** **(** **)** |const| +:ref:`Image<class_Image>` **get_image**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_get_image>` Returns an :ref:`Image<class_Image>` that is a copy of data from this **Texture2D** (a new :ref:`Image<class_Image>` is created each time). :ref:`Image<class_Image>`\ s can be accessed and manipulated directly. +\ **Note:** This will return ``null`` if this **Texture2D** is invalid. + \ **Note:** This will fetch the texture data from the GPU, which might cause performance problems when overused. .. rst-class:: classref-item-separator @@ -248,7 +250,7 @@ Returns an :ref:`Image<class_Image>` that is a copy of data from this **Texture2 .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_size**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_get_size>` Returns the texture size in pixels. @@ -260,7 +262,7 @@ Returns the texture size in pixels. .. rst-class:: classref-method -:ref:`int<class_int>` **get_width** **(** **)** |const| +:ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_get_width>` Returns the texture width in pixels. @@ -272,7 +274,7 @@ Returns the texture width in pixels. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_alpha** **(** **)** |const| +:ref:`bool<class_bool>` **has_alpha**\ (\ ) |const| :ref:`🔗<class_Texture2D_method_has_alpha>` Returns ``true`` if this **Texture2D** has an alpha channel. @@ -283,3 +285,4 @@ Returns ``true`` if this **Texture2D** has an alpha channel. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture2darray.rst b/classes/class_texture2darray.rst index c5684ef19f4..66e87af3296 100644 --- a/classes/class_texture2darray.rst +++ b/classes/class_texture2darray.rst @@ -33,9 +33,9 @@ Methods .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture2DArray_method_create_placeholder>` **(** **)** |const| | - +---------------------------------+-----------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture2DArray_method_create_placeholder>`\ (\ ) |const| | + +---------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const| +:ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Texture2DArray_method_create_placeholder>` Creates a placeholder version of this resource (:ref:`PlaceholderTexture2DArray<class_PlaceholderTexture2DArray>`). @@ -61,3 +61,4 @@ Creates a placeholder version of this resource (:ref:`PlaceholderTexture2DArray< .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture2darrayrd.rst b/classes/class_texture2darrayrd.rst new file mode 100644 index 00000000000..496e8d8d51f --- /dev/null +++ b/classes/class_texture2darrayrd.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Texture2DArrayRD.xml. + +.. _class_Texture2DArrayRD: + +Texture2DArrayRD +================ + +**Inherits:** :ref:`TextureLayeredRD<class_TextureLayeredRD>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Texture Array for 2D that is bound to a texture created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This texture array class allows you to use a 2D array texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>` as a texture for materials, meshes, etc. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture2drd.rst b/classes/class_texture2drd.rst new file mode 100644 index 00000000000..a008425b4c6 --- /dev/null +++ b/classes/class_texture2drd.rst @@ -0,0 +1,67 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Texture2DRD.xml. + +.. _class_Texture2DRD: + +Texture2DRD +=========== + +**Inherits:** :ref:`Texture2D<class_Texture2D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Texture for 2D that is bound to a texture created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This texture class allows you to use a 2D texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>` as a texture for materials, meshes, etc. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | resource_local_to_scene | ``false`` (overrides :ref:`Resource<class_Resource_property_resource_local_to_scene>`) | + +-------------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_rd_rid<class_Texture2DRD_property_texture_rd_rid>` | | + +-------------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Texture2DRD_property_texture_rd_rid: + +.. rst-class:: classref-property + +:ref:`RID<class_RID>` **texture_rd_rid** :ref:`🔗<class_Texture2DRD_property_texture_rd_rid>` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_rd_rid**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_texture_rd_rid**\ (\ ) + +The RID of the texture object created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture3d.rst b/classes/class_texture3d.rst index 3e59c8d087a..3b0e8579984 100644 --- a/classes/class_texture3d.rst +++ b/classes/class_texture3d.rst @@ -12,9 +12,9 @@ Texture3D **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`CompressedTexture3D<class_CompressedTexture3D>`, :ref:`ImageTexture3D<class_ImageTexture3D>`, :ref:`NoiseTexture3D<class_NoiseTexture3D>`, :ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>` +**Inherited By:** :ref:`CompressedTexture3D<class_CompressedTexture3D>`, :ref:`ImageTexture3D<class_ImageTexture3D>`, :ref:`NoiseTexture3D<class_NoiseTexture3D>`, :ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>`, :ref:`Texture3DRD<class_Texture3DRD>` -Base class for 3-dimensionnal textures. +Base class for 3-dimensional textures. .. rst-class:: classref-introduction-group @@ -35,33 +35,33 @@ Methods .. table:: :widths: auto - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`_get_data<class_Texture3D_method__get_data>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_depth<class_Texture3D_method__get_depth>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_Texture3D_method__get_format>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_height<class_Texture3D_method__get_height>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_width<class_Texture3D_method__get_width>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_Texture3D_method__has_mipmaps>` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture3D_method_create_placeholder>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Image[]<class_Image>` | :ref:`get_data<class_Texture3D_method_get_data>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_depth<class_Texture3D_method_get_depth>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Texture3D_method_get_format>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_height<class_Texture3D_method_get_height>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_width<class_Texture3D_method_get_width>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Texture3D_method_has_mipmaps>` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`_get_data<class_Texture3D_private_method__get_data>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_depth<class_Texture3D_private_method__get_depth>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_Texture3D_private_method__get_format>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_height<class_Texture3D_private_method__get_height>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_width<class_Texture3D_private_method__get_width>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_Texture3D_private_method__has_mipmaps>`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Resource<class_Resource>` | :ref:`create_placeholder<class_Texture3D_method_create_placeholder>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] | :ref:`get_data<class_Texture3D_method_get_data>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_depth<class_Texture3D_method_get_depth>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_Texture3D_method_get_format>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_height<class_Texture3D_method_get_height>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_width<class_Texture3D_method_get_width>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_Texture3D_method_has_mipmaps>`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -72,11 +72,11 @@ Methods Method Descriptions ------------------- -.. _class_Texture3D_method__get_data: +.. _class_Texture3D_private_method__get_data: .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **_get_data** **(** **)** |virtual| |const| +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **_get_data**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_data>` Called when the **Texture3D**'s data is queried. @@ -84,11 +84,11 @@ Called when the **Texture3D**'s data is queried. ---- -.. _class_Texture3D_method__get_depth: +.. _class_Texture3D_private_method__get_depth: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_depth** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_depth**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_depth>` Called when the **Texture3D**'s depth is queried. @@ -96,11 +96,11 @@ Called when the **Texture3D**'s depth is queried. ---- -.. _class_Texture3D_method__get_format: +.. _class_Texture3D_private_method__get_format: .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **_get_format** **(** **)** |virtual| |const| +:ref:`Format<enum_Image_Format>` **_get_format**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_format>` Called when the **Texture3D**'s format is queried. @@ -108,11 +108,11 @@ Called when the **Texture3D**'s format is queried. ---- -.. _class_Texture3D_method__get_height: +.. _class_Texture3D_private_method__get_height: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_height** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_height**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_height>` Called when the **Texture3D**'s height is queried. @@ -120,11 +120,11 @@ Called when the **Texture3D**'s height is queried. ---- -.. _class_Texture3D_method__get_width: +.. _class_Texture3D_private_method__get_width: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_width** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_width**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__get_width>` Called when the **Texture3D**'s width is queried. @@ -132,11 +132,11 @@ Called when the **Texture3D**'s width is queried. ---- -.. _class_Texture3D_method__has_mipmaps: +.. _class_Texture3D_private_method__has_mipmaps: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_mipmaps** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_mipmaps**\ (\ ) |virtual| |const| :ref:`🔗<class_Texture3D_private_method__has_mipmaps>` Called when the presence of mipmaps in the **Texture3D** is queried. @@ -148,7 +148,7 @@ Called when the presence of mipmaps in the **Texture3D** is queried. .. rst-class:: classref-method -:ref:`Resource<class_Resource>` **create_placeholder** **(** **)** |const| +:ref:`Resource<class_Resource>` **create_placeholder**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_create_placeholder>` Creates a placeholder version of this resource (:ref:`PlaceholderTexture3D<class_PlaceholderTexture3D>`). @@ -160,7 +160,7 @@ Creates a placeholder version of this resource (:ref:`PlaceholderTexture3D<class .. rst-class:: classref-method -:ref:`Image[]<class_Image>` **get_data** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Image<class_Image>`\] **get_data**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_data>` Returns the **Texture3D**'s data as an array of :ref:`Image<class_Image>`\ s. Each :ref:`Image<class_Image>` represents a *slice* of the **Texture3D**, with different slices mapping to different depth (Z axis) levels. @@ -172,7 +172,7 @@ Returns the **Texture3D**'s data as an array of :ref:`Image<class_Image>`\ s. Ea .. rst-class:: classref-method -:ref:`int<class_int>` **get_depth** **(** **)** |const| +:ref:`int<class_int>` **get_depth**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_depth>` Returns the **Texture3D**'s depth in pixels. Depth is typically represented by the Z axis (a dimension not present in :ref:`Texture2D<class_Texture2D>`). @@ -184,7 +184,7 @@ Returns the **Texture3D**'s depth in pixels. Depth is typically represented by t .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const| +:ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_format>` Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details. @@ -196,7 +196,7 @@ Returns the current format being used by this texture. See :ref:`Format<enum_Ima .. rst-class:: classref-method -:ref:`int<class_int>` **get_height** **(** **)** |const| +:ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_height>` Returns the **Texture3D**'s height in pixels. Width is typically represented by the Y axis. @@ -208,7 +208,7 @@ Returns the **Texture3D**'s height in pixels. Width is typically represented by .. rst-class:: classref-method -:ref:`int<class_int>` **get_width** **(** **)** |const| +:ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_get_width>` Returns the **Texture3D**'s width in pixels. Width is typically represented by the X axis. @@ -220,7 +220,7 @@ Returns the **Texture3D**'s width in pixels. Width is typically represented by t .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_mipmaps** **(** **)** |const| +:ref:`bool<class_bool>` **has_mipmaps**\ (\ ) |const| :ref:`🔗<class_Texture3D_method_has_mipmaps>` Returns ``true`` if the **Texture3D** has generated mipmaps. @@ -231,3 +231,4 @@ Returns ``true`` if the **Texture3D** has generated mipmaps. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texture3drd.rst b/classes/class_texture3drd.rst new file mode 100644 index 00000000000..9a9489d9d88 --- /dev/null +++ b/classes/class_texture3drd.rst @@ -0,0 +1,65 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Texture3DRD.xml. + +.. _class_Texture3DRD: + +Texture3DRD +=========== + +**Inherits:** :ref:`Texture3D<class_Texture3D>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Texture for 3D that is bound to a texture created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This texture class allows you to use a 3D texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>` as a texture for materials, meshes, etc. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_rd_rid<class_Texture3DRD_property_texture_rd_rid>` | + +-----------------------+------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_Texture3DRD_property_texture_rd_rid: + +.. rst-class:: classref-property + +:ref:`RID<class_RID>` **texture_rd_rid** :ref:`🔗<class_Texture3DRD_property_texture_rd_rid>` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_rd_rid**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_texture_rd_rid**\ (\ ) + +The RID of the texture object created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturebutton.rst b/classes/class_texturebutton.rst index a85310ec495..e870ee00eb6 100644 --- a/classes/class_texturebutton.rst +++ b/classes/class_texturebutton.rst @@ -30,7 +30,7 @@ See also :ref:`BaseButton<class_BaseButton>` which contains common properties an Tutorials --------- -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -75,7 +75,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **StretchMode**: +enum **StretchMode**: :ref:`🔗<enum_TextureButton_StretchMode>` .. _class_TextureButton_constant_STRETCH_SCALE: @@ -146,12 +146,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_h** = ``false`` +:ref:`bool<class_bool>` **flip_h** = ``false`` :ref:`🔗<class_TextureButton_property_flip_h>` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_h**\ (\ ) If ``true``, texture is flipped horizontally. @@ -163,12 +163,12 @@ If ``true``, texture is flipped horizontally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_v** = ``false`` +:ref:`bool<class_bool>` **flip_v** = ``false`` :ref:`🔗<class_TextureButton_property_flip_v>` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_v**\ (\ ) If ``true``, texture is flipped vertically. @@ -180,12 +180,12 @@ If ``true``, texture is flipped vertically. .. rst-class:: classref-property -:ref:`bool<class_bool>` **ignore_texture_size** = ``false`` +:ref:`bool<class_bool>` **ignore_texture_size** = ``false`` :ref:`🔗<class_TextureButton_property_ignore_texture_size>` .. rst-class:: classref-property-setget -- void **set_ignore_texture_size** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_ignore_texture_size** **(** **)** +- |void| **set_ignore_texture_size**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_ignore_texture_size**\ (\ ) If ``true``, the size of the texture won't be considered for minimum size calculation, so the **TextureButton** can be shrunk down past the texture size. @@ -197,12 +197,12 @@ If ``true``, the size of the texture won't be considered for minimum size calcul .. rst-class:: classref-property -:ref:`StretchMode<enum_TextureButton_StretchMode>` **stretch_mode** = ``2`` +:ref:`StretchMode<enum_TextureButton_StretchMode>` **stretch_mode** = ``2`` :ref:`🔗<class_TextureButton_property_stretch_mode>` .. rst-class:: classref-property-setget -- void **set_stretch_mode** **(** :ref:`StretchMode<enum_TextureButton_StretchMode>` value **)** -- :ref:`StretchMode<enum_TextureButton_StretchMode>` **get_stretch_mode** **(** **)** +- |void| **set_stretch_mode**\ (\ value\: :ref:`StretchMode<enum_TextureButton_StretchMode>`\ ) +- :ref:`StretchMode<enum_TextureButton_StretchMode>` **get_stretch_mode**\ (\ ) Controls the texture's behavior when you resize the node's bounding rectangle. See the :ref:`StretchMode<enum_TextureButton_StretchMode>` constants for available options. @@ -214,12 +214,12 @@ Controls the texture's behavior when you resize the node's bounding rectangle. S .. rst-class:: classref-property -:ref:`BitMap<class_BitMap>` **texture_click_mask** +:ref:`BitMap<class_BitMap>` **texture_click_mask** :ref:`🔗<class_TextureButton_property_texture_click_mask>` .. rst-class:: classref-property-setget -- void **set_click_mask** **(** :ref:`BitMap<class_BitMap>` value **)** -- :ref:`BitMap<class_BitMap>` **get_click_mask** **(** **)** +- |void| **set_click_mask**\ (\ value\: :ref:`BitMap<class_BitMap>`\ ) +- :ref:`BitMap<class_BitMap>` **get_click_mask**\ (\ ) Pure black and white :ref:`BitMap<class_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. @@ -231,12 +231,12 @@ Pure black and white :ref:`BitMap<class_BitMap>` image to use for click detectio .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_disabled** +:ref:`Texture2D<class_Texture2D>` **texture_disabled** :ref:`🔗<class_TextureButton_property_texture_disabled>` .. rst-class:: classref-property-setget -- void **set_texture_disabled** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_disabled** **(** **)** +- |void| **set_texture_disabled**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_disabled**\ (\ ) Texture to display when the node is disabled. See :ref:`BaseButton.disabled<class_BaseButton_property_disabled>`. @@ -248,12 +248,12 @@ Texture to display when the node is disabled. See :ref:`BaseButton.disabled<clas .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_focused** +:ref:`Texture2D<class_Texture2D>` **texture_focused** :ref:`🔗<class_TextureButton_property_texture_focused>` .. rst-class:: classref-property-setget -- void **set_texture_focused** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_focused** **(** **)** +- |void| **set_texture_focused**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_focused**\ (\ ) Texture to display when the node has mouse or keyboard focus. :ref:`texture_focused<class_TextureButton_property_texture_focused>` is displayed *over* the base texture, so a partially transparent texture should be used to ensure the base texture remains visible. A texture that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a fully transparent texture of any size. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. @@ -265,12 +265,12 @@ Texture to display when the node has mouse or keyboard focus. :ref:`texture_focu .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_hover** +:ref:`Texture2D<class_Texture2D>` **texture_hover** :ref:`🔗<class_TextureButton_property_texture_hover>` .. rst-class:: classref-property-setget -- void **set_texture_hover** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_hover** **(** **)** +- |void| **set_texture_hover**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_hover**\ (\ ) Texture to display when the mouse hovers the node. @@ -282,12 +282,12 @@ Texture to display when the mouse hovers the node. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_normal** +:ref:`Texture2D<class_Texture2D>` **texture_normal** :ref:`🔗<class_TextureButton_property_texture_normal>` .. rst-class:: classref-property-setget -- void **set_texture_normal** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_normal** **(** **)** +- |void| **set_texture_normal**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_normal**\ (\ ) Texture to display by default, when the node is **not** in the disabled, hover or pressed state. This texture is still displayed in the focused state, with :ref:`texture_focused<class_TextureButton_property_texture_focused>` drawn on top. @@ -299,12 +299,12 @@ Texture to display by default, when the node is **not** in the disabled, hover o .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_pressed** +:ref:`Texture2D<class_Texture2D>` **texture_pressed** :ref:`🔗<class_TextureButton_property_texture_pressed>` .. rst-class:: classref-property-setget -- void **set_texture_pressed** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_pressed** **(** **)** +- |void| **set_texture_pressed**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_pressed**\ (\ ) Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the :ref:`BaseButton.shortcut<class_BaseButton_property_shortcut>` key. @@ -315,3 +315,4 @@ Texture to display on mouse down over the node, if the node has keyboard focus a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturecubemaparrayrd.rst b/classes/class_texturecubemaparrayrd.rst new file mode 100644 index 00000000000..0ffa4901019 --- /dev/null +++ b/classes/class_texturecubemaparrayrd.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextureCubemapArrayRD.xml. + +.. _class_TextureCubemapArrayRD: + +TextureCubemapArrayRD +===================== + +**Inherits:** :ref:`TextureLayeredRD<class_TextureLayeredRD>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Texture Array for Cubemaps that is bound to a texture created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This texture class allows you to use a cubemap array texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>` as a texture for materials, meshes, etc. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturecubemaprd.rst b/classes/class_texturecubemaprd.rst new file mode 100644 index 00000000000..efe58952e85 --- /dev/null +++ b/classes/class_texturecubemaprd.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextureCubemapRD.xml. + +.. _class_TextureCubemapRD: + +TextureCubemapRD +================ + +**Inherits:** :ref:`TextureLayeredRD<class_TextureLayeredRD>` **<** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Texture for Cubemap that is bound to a texture created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This texture class allows you to use a cubemap texture created directly on the :ref:`RenderingDevice<class_RenderingDevice>` as a texture for materials, meshes, etc. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturelayered.rst b/classes/class_texturelayered.rst index 85d24a7c8a4..12846612420 100644 --- a/classes/class_texturelayered.rst +++ b/classes/class_texturelayered.rst @@ -12,7 +12,7 @@ TextureLayered **Inherits:** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`CompressedTextureLayered<class_CompressedTextureLayered>`, :ref:`ImageTextureLayered<class_ImageTextureLayered>`, :ref:`PlaceholderTextureLayered<class_PlaceholderTextureLayered>` +**Inherited By:** :ref:`CompressedTextureLayered<class_CompressedTextureLayered>`, :ref:`ImageTextureLayered<class_ImageTextureLayered>`, :ref:`PlaceholderTextureLayered<class_PlaceholderTextureLayered>`, :ref:`TextureLayeredRD<class_TextureLayeredRD>` Base class for texture types which contain the data of multiple :ref:`Image<class_Image>`\ s. Each image is of the same size and format. @@ -39,35 +39,35 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_TextureLayered_method__get_format>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_height<class_TextureLayered_method__get_height>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`_get_layer_data<class_TextureLayered_method__get_layer_data>` **(** :ref:`int<class_int>` layer_index **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_layered_type<class_TextureLayered_method__get_layered_type>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_layers<class_TextureLayered_method__get_layers>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_width<class_TextureLayered_method__get_width>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_TextureLayered_method__has_mipmaps>` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>` **(** :ref:`int<class_int>` layer **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LayeredType<enum_TextureLayered_LayeredType>` | :ref:`get_layered_type<class_TextureLayered_method_get_layered_type>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_layers<class_TextureLayered_method_get_layers>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_TextureLayered_method_has_mipmaps>` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`_get_format<class_TextureLayered_private_method__get_format>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_height<class_TextureLayered_private_method__get_height>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`_get_layer_data<class_TextureLayered_private_method__get_layer_data>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_layered_type<class_TextureLayered_private_method__get_layered_type>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_layers<class_TextureLayered_private_method__get_layers>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_width<class_TextureLayered_private_method__get_width>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_has_mipmaps<class_TextureLayered_private_method__has_mipmaps>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format<enum_Image_Format>` | :ref:`get_format<class_TextureLayered_method_get_format>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_height<class_TextureLayered_method_get_height>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image<class_Image>` | :ref:`get_layer_data<class_TextureLayered_method_get_layer_data>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayeredType<enum_TextureLayered_LayeredType>` | :ref:`get_layered_type<class_TextureLayered_method_get_layered_type>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_layers<class_TextureLayered_method_get_layers>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_width<class_TextureLayered_method_get_width>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_mipmaps<class_TextureLayered_method_has_mipmaps>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,7 +82,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **LayeredType**: +enum **LayeredType**: :ref:`🔗<enum_TextureLayered_LayeredType>` .. _class_TextureLayered_constant_LAYERED_TYPE_2D_ARRAY: @@ -117,11 +117,11 @@ Texture is a :ref:`CubemapArray<class_CubemapArray>`, with each cubemap being ma Method Descriptions ------------------- -.. _class_TextureLayered_method__get_format: +.. _class_TextureLayered_private_method__get_format: .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **_get_format** **(** **)** |virtual| |const| +:ref:`Format<enum_Image_Format>` **_get_format**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_format>` Called when the **TextureLayered**'s format is queried. @@ -129,11 +129,11 @@ Called when the **TextureLayered**'s format is queried. ---- -.. _class_TextureLayered_method__get_height: +.. _class_TextureLayered_private_method__get_height: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_height** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_height**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_height>` Called when the **TextureLayered**'s height is queried. @@ -141,11 +141,11 @@ Called when the **TextureLayered**'s height is queried. ---- -.. _class_TextureLayered_method__get_layer_data: +.. _class_TextureLayered_private_method__get_layer_data: .. rst-class:: classref-method -:ref:`Image<class_Image>` **_get_layer_data** **(** :ref:`int<class_int>` layer_index **)** |virtual| |const| +:ref:`Image<class_Image>` **_get_layer_data**\ (\ layer_index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layer_data>` Called when the data for a layer in the **TextureLayered** is queried. @@ -153,11 +153,11 @@ Called when the data for a layer in the **TextureLayered** is queried. ---- -.. _class_TextureLayered_method__get_layered_type: +.. _class_TextureLayered_private_method__get_layered_type: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_layered_type** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_layered_type**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layered_type>` Called when the layers' type in the **TextureLayered** is queried. @@ -165,11 +165,11 @@ Called when the layers' type in the **TextureLayered** is queried. ---- -.. _class_TextureLayered_method__get_layers: +.. _class_TextureLayered_private_method__get_layers: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_layers** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_layers**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_layers>` Called when the number of layers in the **TextureLayered** is queried. @@ -177,11 +177,11 @@ Called when the number of layers in the **TextureLayered** is queried. ---- -.. _class_TextureLayered_method__get_width: +.. _class_TextureLayered_private_method__get_width: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_width** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_width**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__get_width>` Called when the **TextureLayered**'s width queried. @@ -189,11 +189,11 @@ Called when the **TextureLayered**'s width queried. ---- -.. _class_TextureLayered_method__has_mipmaps: +.. _class_TextureLayered_private_method__has_mipmaps: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_has_mipmaps** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_has_mipmaps**\ (\ ) |virtual| |const| :ref:`🔗<class_TextureLayered_private_method__has_mipmaps>` Called when the presence of mipmaps in the **TextureLayered** is queried. @@ -205,7 +205,7 @@ Called when the presence of mipmaps in the **TextureLayered** is queried. .. rst-class:: classref-method -:ref:`Format<enum_Image_Format>` **get_format** **(** **)** |const| +:ref:`Format<enum_Image_Format>` **get_format**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_format>` Returns the current format being used by this texture. See :ref:`Format<enum_Image_Format>` for details. @@ -217,7 +217,7 @@ Returns the current format being used by this texture. See :ref:`Format<enum_Ima .. rst-class:: classref-method -:ref:`int<class_int>` **get_height** **(** **)** |const| +:ref:`int<class_int>` **get_height**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_height>` Returns the height of the texture in pixels. Height is typically represented by the Y axis. @@ -229,7 +229,7 @@ Returns the height of the texture in pixels. Height is typically represented by .. rst-class:: classref-method -:ref:`Image<class_Image>` **get_layer_data** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`Image<class_Image>` **get_layer_data**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layer_data>` Returns an :ref:`Image<class_Image>` resource with the data from specified ``layer``. @@ -241,7 +241,7 @@ Returns an :ref:`Image<class_Image>` resource with the data from specified ``lay .. rst-class:: classref-method -:ref:`LayeredType<enum_TextureLayered_LayeredType>` **get_layered_type** **(** **)** |const| +:ref:`LayeredType<enum_TextureLayered_LayeredType>` **get_layered_type**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layered_type>` Returns the **TextureLayered**'s type. The type determines how the data is accessed, with cubemaps having special types. @@ -253,7 +253,7 @@ Returns the **TextureLayered**'s type. The type determines how the data is acces .. rst-class:: classref-method -:ref:`int<class_int>` **get_layers** **(** **)** |const| +:ref:`int<class_int>` **get_layers**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_layers>` Returns the number of referenced :ref:`Image<class_Image>`\ s. @@ -265,7 +265,7 @@ Returns the number of referenced :ref:`Image<class_Image>`\ s. .. rst-class:: classref-method -:ref:`int<class_int>` **get_width** **(** **)** |const| +:ref:`int<class_int>` **get_width**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_get_width>` Returns the width of the texture in pixels. Width is typically represented by the X axis. @@ -277,7 +277,7 @@ Returns the width of the texture in pixels. Width is typically represented by th .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_mipmaps** **(** **)** |const| +:ref:`bool<class_bool>` **has_mipmaps**\ (\ ) |const| :ref:`🔗<class_TextureLayered_method_has_mipmaps>` Returns ``true`` if the layers have generated mipmaps. @@ -288,3 +288,4 @@ Returns ``true`` if the layers have generated mipmaps. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturelayeredrd.rst b/classes/class_texturelayeredrd.rst new file mode 100644 index 00000000000..e7945235a47 --- /dev/null +++ b/classes/class_texturelayeredrd.rst @@ -0,0 +1,67 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TextureLayeredRD.xml. + +.. _class_TextureLayeredRD: + +TextureLayeredRD +================ + +**Inherits:** :ref:`TextureLayered<class_TextureLayered>` **<** :ref:`Texture<class_Texture>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`Texture2DArrayRD<class_Texture2DArrayRD>`, :ref:`TextureCubemapArrayRD<class_TextureCubemapArrayRD>`, :ref:`TextureCubemapRD<class_TextureCubemapRD>` + +Abstract base class for layered texture RD types. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class for :ref:`Texture2DArrayRD<class_Texture2DArrayRD>`, :ref:`TextureCubemapRD<class_TextureCubemapRD>` and :ref:`TextureCubemapArrayRD<class_TextureCubemapArrayRD>`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`texture_rd_rid<class_TextureLayeredRD_property_texture_rd_rid>` | + +-----------------------+-----------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_TextureLayeredRD_property_texture_rd_rid: + +.. rst-class:: classref-property + +:ref:`RID<class_RID>` **texture_rd_rid** :ref:`🔗<class_TextureLayeredRD_property_texture_rd_rid>` + +.. rst-class:: classref-property-setget + +- |void| **set_texture_rd_rid**\ (\ value\: :ref:`RID<class_RID>`\ ) +- :ref:`RID<class_RID>` **get_texture_rd_rid**\ (\ ) + +The RID of the texture object created on the :ref:`RenderingDevice<class_RenderingDevice>`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_textureprogressbar.rst b/classes/class_textureprogressbar.rst index bc8a5515404..3313722734d 100644 --- a/classes/class_textureprogressbar.rst +++ b/classes/class_textureprogressbar.rst @@ -42,7 +42,7 @@ Properties +--------------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`float<class_float>` | :ref:`radial_initial_angle<class_TextureProgressBar_property_radial_initial_angle>` | ``0.0`` | +--------------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +--------------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`float<class_float>` | step | ``1.0`` (overrides :ref:`Range<class_Range_property_step>`) | +--------------------------------------------------------+-------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -77,11 +77,11 @@ Methods .. table:: :widths: auto - +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_stretch_margin<class_TextureProgressBar_method_get_stretch_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| | - +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stretch_margin<class_TextureProgressBar_method_set_stretch_margin>` **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** | - +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_stretch_margin<class_TextureProgressBar_method_get_stretch_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| | + +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stretch_margin<class_TextureProgressBar_method_set_stretch_margin>`\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) | + +-----------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -96,7 +96,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **FillMode**: +enum **FillMode**: :ref:`🔗<enum_TextureProgressBar_FillMode>` .. _class_TextureProgressBar_constant_FILL_LEFT_TO_RIGHT: @@ -183,12 +183,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **fill_mode** = ``0`` +:ref:`int<class_int>` **fill_mode** = ``0`` :ref:`🔗<class_TextureProgressBar_property_fill_mode>` .. rst-class:: classref-property-setget -- void **set_fill_mode** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fill_mode** **(** **)** +- |void| **set_fill_mode**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fill_mode**\ (\ ) The fill direction. See :ref:`FillMode<enum_TextureProgressBar_FillMode>` for possible values. @@ -200,12 +200,12 @@ The fill direction. See :ref:`FillMode<enum_TextureProgressBar_FillMode>` for po .. rst-class:: classref-property -:ref:`bool<class_bool>` **nine_patch_stretch** = ``false`` +:ref:`bool<class_bool>` **nine_patch_stretch** = ``false`` :ref:`🔗<class_TextureProgressBar_property_nine_patch_stretch>` .. rst-class:: classref-property-setget -- void **set_nine_patch_stretch** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_nine_patch_stretch** **(** **)** +- |void| **set_nine_patch_stretch**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_nine_patch_stretch**\ (\ ) If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect<class_NinePatchRect>`. Use the ``stretch_margin_*`` properties like :ref:`stretch_margin_bottom<class_TextureProgressBar_property_stretch_margin_bottom>` to set up the nine patch's 3×3 grid. When using a radial :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>`, this setting will enable stretching. @@ -217,14 +217,14 @@ If ``true``, Godot treats the bar's textures like in :ref:`NinePatchRect<class_N .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **radial_center_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **radial_center_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_TextureProgressBar_property_radial_center_offset>` .. rst-class:: classref-property-setget -- void **set_radial_center_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_radial_center_offset** **(** **)** +- |void| **set_radial_center_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_radial_center_offset**\ (\ ) -Offsets :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>` or :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`. +Offsets :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>`, :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE>`. .. rst-class:: classref-item-separator @@ -234,14 +234,14 @@ Offsets :ref:`texture_progress<class_TextureProgressBar_property_texture_progres .. rst-class:: classref-property -:ref:`float<class_float>` **radial_fill_degrees** = ``360.0`` +:ref:`float<class_float>` **radial_fill_degrees** = ``360.0`` :ref:`🔗<class_TextureProgressBar_property_radial_fill_degrees>` .. rst-class:: classref-property-setget -- void **set_fill_degrees** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fill_degrees** **(** **)** +- |void| **set_fill_degrees**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fill_degrees**\ (\ ) -Upper limit for the fill of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>` or :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. +Upper limit for the fill of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>`, :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE>`. When the node's ``value`` is equal to its ``max_value``, the texture fills up to this angle. See :ref:`Range.value<class_Range_property_value>`, :ref:`Range.max_value<class_Range_property_max_value>`. @@ -253,14 +253,14 @@ See :ref:`Range.value<class_Range_property_value>`, :ref:`Range.max_value<class_ .. rst-class:: classref-property -:ref:`float<class_float>` **radial_initial_angle** = ``0.0`` +:ref:`float<class_float>` **radial_initial_angle** = ``0.0`` :ref:`🔗<class_TextureProgressBar_property_radial_initial_angle>` .. rst-class:: classref-property-setget -- void **set_radial_initial_angle** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radial_initial_angle** **(** **)** +- |void| **set_radial_initial_angle**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radial_initial_angle**\ (\ ) -Starting angle for the fill of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>` or :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees<class_TextureProgressBar_property_radial_fill_degrees>`. +Starting angle for the fill of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` if :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>` is :ref:`FILL_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE>`, :ref:`FILL_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_COUNTER_CLOCKWISE>`, or :ref:`FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE<class_TextureProgressBar_constant_FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE>`. When the node's ``value`` is equal to its ``min_value``, the texture doesn't show up at all. When the ``value`` increases, the texture fills and tends towards :ref:`radial_fill_degrees<class_TextureProgressBar_property_radial_fill_degrees>`. .. rst-class:: classref-item-separator @@ -270,14 +270,14 @@ Starting angle for the fill of :ref:`texture_progress<class_TextureProgressBar_p .. rst-class:: classref-property -:ref:`int<class_int>` **stretch_margin_bottom** = ``0`` +:ref:`int<class_int>` **stretch_margin_bottom** = ``0`` :ref:`🔗<class_TextureProgressBar_property_stretch_margin_bottom>` .. rst-class:: classref-property-setget -- void **set_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| -The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. +The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. Only effective if :ref:`nine_patch_stretch<class_TextureProgressBar_property_nine_patch_stretch>` is ``true``. .. rst-class:: classref-item-separator @@ -287,14 +287,14 @@ The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's botto .. rst-class:: classref-property -:ref:`int<class_int>` **stretch_margin_left** = ``0`` +:ref:`int<class_int>` **stretch_margin_left** = ``0`` :ref:`🔗<class_TextureProgressBar_property_stretch_margin_left>` .. rst-class:: classref-property-setget -- void **set_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| -The width of the 9-patch's left column. +The width of the 9-patch's left column. Only effective if :ref:`nine_patch_stretch<class_TextureProgressBar_property_nine_patch_stretch>` is ``true``. .. rst-class:: classref-item-separator @@ -304,14 +304,14 @@ The width of the 9-patch's left column. .. rst-class:: classref-property -:ref:`int<class_int>` **stretch_margin_right** = ``0`` +:ref:`int<class_int>` **stretch_margin_right** = ``0`` :ref:`🔗<class_TextureProgressBar_property_stretch_margin_right>` .. rst-class:: classref-property-setget -- void **set_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| -The width of the 9-patch's right column. +The width of the 9-patch's right column. Only effective if :ref:`nine_patch_stretch<class_TextureProgressBar_property_nine_patch_stretch>` is ``true``. .. rst-class:: classref-item-separator @@ -321,14 +321,14 @@ The width of the 9-patch's right column. .. rst-class:: classref-property -:ref:`int<class_int>` **stretch_margin_top** = ``0`` +:ref:`int<class_int>` **stretch_margin_top** = ``0`` :ref:`🔗<class_TextureProgressBar_property_stretch_margin_top>` .. rst-class:: classref-property-setget -- void **set_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +- |void| **set_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| -The height of the 9-patch's top row. +The height of the 9-patch's top row. Only effective if :ref:`nine_patch_stretch<class_TextureProgressBar_property_nine_patch_stretch>` is ``true``. .. rst-class:: classref-item-separator @@ -338,12 +338,12 @@ The height of the 9-patch's top row. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_over** +:ref:`Texture2D<class_Texture2D>` **texture_over** :ref:`🔗<class_TextureProgressBar_property_texture_over>` .. rst-class:: classref-property-setget -- void **set_over_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_over_texture** **(** **)** +- |void| **set_over_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_over_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>`. @@ -355,12 +355,12 @@ The height of the 9-patch's top row. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_progress** +:ref:`Texture2D<class_Texture2D>` **texture_progress** :ref:`🔗<class_TextureProgressBar_property_texture_progress>` .. rst-class:: classref-property-setget -- void **set_progress_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_progress_texture** **(** **)** +- |void| **set_progress_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_progress_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` that clips based on the node's ``value`` and :ref:`fill_mode<class_TextureProgressBar_property_fill_mode>`. As ``value`` increased, the texture fills up. It shows entirely when ``value`` reaches ``max_value``. It doesn't show at all if ``value`` is equal to ``min_value``. @@ -374,12 +374,12 @@ The ``value`` property comes from :ref:`Range<class_Range>`. See :ref:`Range.val .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **texture_progress_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **texture_progress_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_TextureProgressBar_property_texture_progress_offset>` .. rst-class:: classref-property-setget -- void **set_texture_progress_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_texture_progress_offset** **(** **)** +- |void| **set_texture_progress_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_texture_progress_offset**\ (\ ) The offset of :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>`. Useful for :ref:`texture_over<class_TextureProgressBar_property_texture_over>` and :ref:`texture_under<class_TextureProgressBar_property_texture_under>` with fancy borders, to avoid transparent margins in your progress texture. @@ -391,12 +391,12 @@ The offset of :ref:`texture_progress<class_TextureProgressBar_property_texture_p .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_under** +:ref:`Texture2D<class_Texture2D>` **texture_under** :ref:`🔗<class_TextureProgressBar_property_texture_under>` .. rst-class:: classref-property-setget -- void **set_under_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_under_texture** **(** **)** +- |void| **set_under_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_under_texture**\ (\ ) :ref:`Texture2D<class_Texture2D>` that draws under the progress bar. The bar's background. @@ -408,14 +408,14 @@ The offset of :ref:`texture_progress<class_TextureProgressBar_property_texture_p .. rst-class:: classref-property -:ref:`Color<class_Color>` **tint_over** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **tint_over** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TextureProgressBar_property_tint_over>` .. rst-class:: classref-property-setget -- void **set_tint_over** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_tint_over** **(** **)** +- |void| **set_tint_over**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_tint_over**\ (\ ) -Multiplies the color of the bar's ``texture_over`` texture. The effect is similar to :ref:`CanvasItem.modulate<class_CanvasItem_property_modulate>`, except it only affects this specific texture instead of the entire node. +Multiplies the color of the bar's :ref:`texture_over<class_TextureProgressBar_property_texture_over>` texture. The effect is similar to :ref:`CanvasItem.modulate<class_CanvasItem_property_modulate>`, except it only affects this specific texture instead of the entire node. .. rst-class:: classref-item-separator @@ -425,14 +425,14 @@ Multiplies the color of the bar's ``texture_over`` texture. The effect is simila .. rst-class:: classref-property -:ref:`Color<class_Color>` **tint_progress** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **tint_progress** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TextureProgressBar_property_tint_progress>` .. rst-class:: classref-property-setget -- void **set_tint_progress** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_tint_progress** **(** **)** +- |void| **set_tint_progress**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_tint_progress**\ (\ ) -Multiplies the color of the bar's ``texture_progress`` texture. +Multiplies the color of the bar's :ref:`texture_progress<class_TextureProgressBar_property_texture_progress>` texture. .. rst-class:: classref-item-separator @@ -442,14 +442,14 @@ Multiplies the color of the bar's ``texture_progress`` texture. .. rst-class:: classref-property -:ref:`Color<class_Color>` **tint_under** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **tint_under** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TextureProgressBar_property_tint_under>` .. rst-class:: classref-property-setget -- void **set_tint_under** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_tint_under** **(** **)** +- |void| **set_tint_under**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_tint_under**\ (\ ) -Multiplies the color of the bar's ``texture_under`` texture. +Multiplies the color of the bar's :ref:`texture_under<class_TextureProgressBar_property_texture_under>` texture. .. rst-class:: classref-section-separator @@ -464,7 +464,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin **)** |const| +:ref:`int<class_int>` **get_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`\ ) |const| :ref:`🔗<class_TextureProgressBar_method_get_stretch_margin>` Returns the stretch margin with the specified index. See :ref:`stretch_margin_bottom<class_TextureProgressBar_property_stretch_margin_bottom>` and related properties. @@ -476,7 +476,7 @@ Returns the stretch margin with the specified index. See :ref:`stretch_margin_bo .. rst-class:: classref-method -void **set_stretch_margin** **(** :ref:`Side<enum_@GlobalScope_Side>` margin, :ref:`int<class_int>` value **)** +|void| **set_stretch_margin**\ (\ margin\: :ref:`Side<enum_@GlobalScope_Side>`, value\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TextureProgressBar_method_set_stretch_margin>` Sets the stretch margin with the specified index. See :ref:`stretch_margin_bottom<class_TextureProgressBar_property_stretch_margin_bottom>` and related properties. @@ -487,3 +487,4 @@ Sets the stretch margin with the specified index. See :ref:`stretch_margin_botto .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_texturerect.rst b/classes/class_texturerect.rst index cadc1baca85..c24ac8e245e 100644 --- a/classes/class_texturerect.rst +++ b/classes/class_texturerect.rst @@ -26,7 +26,7 @@ A control that displays a texture, for example an icon inside a GUI. The texture Tutorials --------- -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -63,7 +63,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ExpandMode**: +enum **ExpandMode**: :ref:`🔗<enum_TextureRect_ExpandMode>` .. _class_TextureRect_constant_EXPAND_KEEP_SIZE: @@ -121,7 +121,7 @@ Same as :ref:`EXPAND_FIT_HEIGHT<class_TextureRect_constant_EXPAND_FIT_HEIGHT>`, .. rst-class:: classref-enumeration -enum **StretchMode**: +enum **StretchMode**: :ref:`🔗<enum_TextureRect_StretchMode>` .. _class_TextureRect_constant_STRETCH_SCALE: @@ -192,16 +192,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ExpandMode<enum_TextureRect_ExpandMode>` **expand_mode** = ``0`` +:ref:`ExpandMode<enum_TextureRect_ExpandMode>` **expand_mode** = ``0`` :ref:`🔗<class_TextureRect_property_expand_mode>` .. rst-class:: classref-property-setget -- void **set_expand_mode** **(** :ref:`ExpandMode<enum_TextureRect_ExpandMode>` value **)** -- :ref:`ExpandMode<enum_TextureRect_ExpandMode>` **get_expand_mode** **(** **)** +- |void| **set_expand_mode**\ (\ value\: :ref:`ExpandMode<enum_TextureRect_ExpandMode>`\ ) +- :ref:`ExpandMode<enum_TextureRect_ExpandMode>` **get_expand_mode**\ (\ ) -Defines how minimum size is determined based on the texture's size. See :ref:`ExpandMode<enum_TextureRect_ExpandMode>` for options. +**Experimental:** Using :ref:`EXPAND_FIT_WIDTH<class_TextureRect_constant_EXPAND_FIT_WIDTH>`, :ref:`EXPAND_FIT_WIDTH_PROPORTIONAL<class_TextureRect_constant_EXPAND_FIT_WIDTH_PROPORTIONAL>`, :ref:`EXPAND_FIT_HEIGHT<class_TextureRect_constant_EXPAND_FIT_HEIGHT>`, or :ref:`EXPAND_FIT_HEIGHT_PROPORTIONAL<class_TextureRect_constant_EXPAND_FIT_HEIGHT_PROPORTIONAL>` may result in unstable behavior in some :ref:`Container<class_Container>` controls. This behavior may be re-evaluated and changed in the future. -\ **Note:** Using :ref:`EXPAND_FIT_WIDTH<class_TextureRect_constant_EXPAND_FIT_WIDTH>`, :ref:`EXPAND_FIT_WIDTH_PROPORTIONAL<class_TextureRect_constant_EXPAND_FIT_WIDTH_PROPORTIONAL>`, :ref:`EXPAND_FIT_HEIGHT<class_TextureRect_constant_EXPAND_FIT_HEIGHT>` or :ref:`EXPAND_FIT_HEIGHT_PROPORTIONAL<class_TextureRect_constant_EXPAND_FIT_HEIGHT_PROPORTIONAL>` may result in unstable behavior in some containers. This functionality is being re-evaluated and will change in the future. +Defines how minimum size is determined based on the texture's size. See :ref:`ExpandMode<enum_TextureRect_ExpandMode>` for options. .. rst-class:: classref-item-separator @@ -211,12 +211,12 @@ Defines how minimum size is determined based on the texture's size. See :ref:`Ex .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_h** = ``false`` +:ref:`bool<class_bool>` **flip_h** = ``false`` :ref:`🔗<class_TextureRect_property_flip_h>` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_h**\ (\ ) If ``true``, texture is flipped horizontally. @@ -228,12 +228,12 @@ If ``true``, texture is flipped horizontally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_v** = ``false`` +:ref:`bool<class_bool>` **flip_v** = ``false`` :ref:`🔗<class_TextureRect_property_flip_v>` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_flipped_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_flipped_v**\ (\ ) If ``true``, texture is flipped vertically. @@ -245,12 +245,12 @@ If ``true``, texture is flipped vertically. .. rst-class:: classref-property -:ref:`StretchMode<enum_TextureRect_StretchMode>` **stretch_mode** = ``0`` +:ref:`StretchMode<enum_TextureRect_StretchMode>` **stretch_mode** = ``0`` :ref:`🔗<class_TextureRect_property_stretch_mode>` .. rst-class:: classref-property-setget -- void **set_stretch_mode** **(** :ref:`StretchMode<enum_TextureRect_StretchMode>` value **)** -- :ref:`StretchMode<enum_TextureRect_StretchMode>` **get_stretch_mode** **(** **)** +- |void| **set_stretch_mode**\ (\ value\: :ref:`StretchMode<enum_TextureRect_StretchMode>`\ ) +- :ref:`StretchMode<enum_TextureRect_StretchMode>` **get_stretch_mode**\ (\ ) Controls the texture's behavior when resizing the node's bounding rectangle. See :ref:`StretchMode<enum_TextureRect_StretchMode>`. @@ -262,12 +262,12 @@ Controls the texture's behavior when resizing the node's bounding rectangle. See .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_TextureRect_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The node's :ref:`Texture2D<class_Texture2D>` resource. @@ -278,3 +278,4 @@ The node's :ref:`Texture2D<class_Texture2D>` resource. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_theme.rst b/classes/class_theme.rst index 591f06a84dd..12a38369b00 100644 --- a/classes/class_theme.rst +++ b/classes/class_theme.rst @@ -58,131 +58,131 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_type<class_Theme_method_add_type>` **(** :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_Theme_method_clear>` **(** **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_color<class_Theme_method_clear_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_constant<class_Theme_method_clear_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_font<class_Theme_method_clear_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_font_size<class_Theme_method_clear_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_icon<class_Theme_method_clear_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_type_variation<class_Theme_method_clear_type_variation>` **(** :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_color<class_Theme_method_get_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_list<class_Theme_method_get_color_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_type_list<class_Theme_method_get_color_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_constant<class_Theme_method_get_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_list<class_Theme_method_get_constant_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font<class_Font>` | :ref:`get_font<class_Theme_method_get_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_list<class_Theme_method_get_font_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_font_size<class_Theme_method_get_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_list<class_Theme_method_get_font_size_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_type_list<class_Theme_method_get_font_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_Theme_method_get_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_list<class_Theme_method_get_icon_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`get_stylebox<class_Theme_method_get_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>` **(** :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_theme_item<class_Theme_method_get_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>` **(** :ref:`DataType<enum_Theme_DataType>` data_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_list<class_Theme_method_get_type_list>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_type_variation_base<class_Theme_method_get_type_variation_base>` **(** :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_variation_list<class_Theme_method_get_type_variation_list>` **(** :ref:`StringName<class_StringName>` base_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_color<class_Theme_method_has_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_constant<class_Theme_method_has_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_default_font<class_Theme_method_has_default_font>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_default_font_size<class_Theme_method_has_default_font_size>` **(** **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_font<class_Theme_method_has_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_font_size<class_Theme_method_has_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_icon<class_Theme_method_has_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_stylebox<class_Theme_method_has_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_item<class_Theme_method_has_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_type_variation<class_Theme_method_is_type_variation>` **(** :ref:`StringName<class_StringName>` theme_type, :ref:`StringName<class_StringName>` base_type **)** |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`merge_with<class_Theme_method_merge_with>` **(** :ref:`Theme<class_Theme>` other **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_type<class_Theme_method_remove_type>` **(** :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_color<class_Theme_method_rename_color>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_constant<class_Theme_method_rename_constant>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_font<class_Theme_method_rename_font>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_font_size<class_Theme_method_rename_font_size>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_icon<class_Theme_method_rename_icon>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_stylebox<class_Theme_method_rename_stylebox>` **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_theme_item<class_Theme_method_rename_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_color<class_Theme_method_set_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Color<class_Color>` color **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant<class_Theme_method_set_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`int<class_int>` constant **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_font<class_Theme_method_set_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Font<class_Font>` font **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_font_size<class_Theme_method_set_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`int<class_int>` font_size **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon<class_Theme_method_set_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Texture2D<class_Texture2D>` texture **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_stylebox<class_Theme_method_set_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`StyleBox<class_StyleBox>` texture **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_theme_item<class_Theme_method_set_theme_item>` **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Variant<class_Variant>` value **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_type_variation<class_Theme_method_set_type_variation>` **(** :ref:`StringName<class_StringName>` theme_type, :ref:`StringName<class_StringName>` base_type **)** | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_type<class_Theme_method_add_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_Theme_method_clear>`\ (\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_color<class_Theme_method_clear_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_constant<class_Theme_method_clear_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_font<class_Theme_method_clear_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_font_size<class_Theme_method_clear_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_icon<class_Theme_method_clear_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_stylebox<class_Theme_method_clear_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_theme_item<class_Theme_method_clear_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_type_variation<class_Theme_method_clear_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_color<class_Theme_method_get_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_list<class_Theme_method_get_color_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_color_type_list<class_Theme_method_get_color_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_constant<class_Theme_method_get_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_list<class_Theme_method_get_constant_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`get_font<class_Theme_method_get_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_list<class_Theme_method_get_font_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_font_size<class_Theme_method_get_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_list<class_Theme_method_get_font_size_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_font_type_list<class_Theme_method_get_font_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_Theme_method_get_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_list<class_Theme_method_get_icon_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`get_stylebox<class_Theme_method_get_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_list<class_Theme_method_get_stylebox_list>`\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_theme_item<class_Theme_method_get_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_list<class_Theme_method_get_theme_item_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_list<class_Theme_method_get_type_list>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_type_variation_base<class_Theme_method_get_type_variation_base>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_type_variation_list<class_Theme_method_get_type_variation_list>`\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_color<class_Theme_method_has_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_constant<class_Theme_method_has_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_default_font<class_Theme_method_has_default_font>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`\ (\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_font<class_Theme_method_has_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_font_size<class_Theme_method_has_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_icon<class_Theme_method_has_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_stylebox<class_Theme_method_has_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_item<class_Theme_method_has_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_type_variation<class_Theme_method_is_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`merge_with<class_Theme_method_merge_with>`\ (\ other\: :ref:`Theme<class_Theme>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_type<class_Theme_method_remove_type>`\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_color<class_Theme_method_rename_color>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_constant<class_Theme_method_rename_constant>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_font<class_Theme_method_rename_font>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_font_size<class_Theme_method_rename_font_size>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_icon<class_Theme_method_rename_icon>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_stylebox<class_Theme_method_rename_stylebox>`\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_theme_item<class_Theme_method_rename_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_color<class_Theme_method_set_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant<class_Theme_method_set_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_font<class_Theme_method_set_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_font_size<class_Theme_method_set_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon<class_Theme_method_set_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_stylebox<class_Theme_method_set_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_theme_item<class_Theme_method_set_theme_item>`\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_type_variation<class_Theme_method_set_type_variation>`\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -197,7 +197,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **DataType**: +enum **DataType**: :ref:`🔗<enum_Theme_DataType>` .. _class_Theme_constant_DATA_TYPE_COLOR: @@ -268,12 +268,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **default_base_scale** = ``0.0`` +:ref:`float<class_float>` **default_base_scale** = ``0.0`` :ref:`🔗<class_Theme_property_default_base_scale>` .. rst-class:: classref-property-setget -- void **set_default_base_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_default_base_scale** **(** **)** +- |void| **set_default_base_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_default_base_scale**\ (\ ) The default base scale factor of this theme resource. Used by some controls to scale their visual properties based on the global scale factor. If this value is set to ``0.0``, the global scale factor is used (see :ref:`ThemeDB.fallback_base_scale<class_ThemeDB_property_fallback_base_scale>`). @@ -287,12 +287,12 @@ Use :ref:`has_default_base_scale<class_Theme_method_has_default_base_scale>` to .. rst-class:: classref-property -:ref:`Font<class_Font>` **default_font** +:ref:`Font<class_Font>` **default_font** :ref:`🔗<class_Theme_property_default_font>` .. rst-class:: classref-property-setget -- void **set_default_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_default_font** **(** **)** +- |void| **set_default_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_default_font**\ (\ ) The default font of this theme resource. Used as the default value when trying to fetch a font resource that doesn't exist in this theme or is in invalid state. If the default font is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font<class_ThemeDB_property_fallback_font>`). @@ -306,12 +306,12 @@ Use :ref:`has_default_font<class_Theme_method_has_default_font>` to check if thi .. rst-class:: classref-property -:ref:`int<class_int>` **default_font_size** = ``-1`` +:ref:`int<class_int>` **default_font_size** = ``-1`` :ref:`🔗<class_Theme_property_default_font_size>` .. rst-class:: classref-property-setget -- void **set_default_font_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_default_font_size** **(** **)** +- |void| **set_default_font_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_default_font_size**\ (\ ) The default font size of this theme resource. Used as the default value when trying to fetch a font size value that doesn't exist in this theme or is in invalid state. If the default font size is also missing or invalid, the engine fallback value is used (see :ref:`ThemeDB.fallback_font_size<class_ThemeDB_property_fallback_font_size>`). @@ -330,7 +330,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_type** **(** :ref:`StringName<class_StringName>` theme_type **)** +|void| **add_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_add_type>` Adds an empty theme type for every valid data type. @@ -344,7 +344,7 @@ Adds an empty theme type for every valid data type. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_Theme_method_clear>` Removes all the theme properties defined on the theme resource. @@ -356,7 +356,7 @@ Removes all the theme properties defined on the theme resource. .. rst-class:: classref-method -void **clear_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_color>` Removes the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists. @@ -370,7 +370,7 @@ Fails if it doesn't exist. Use :ref:`has_color<class_Theme_method_has_color>` to .. rst-class:: classref-method -void **clear_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_constant>` Removes the constant property defined by ``name`` and ``theme_type``, if it exists. @@ -384,7 +384,7 @@ Fails if it doesn't exist. Use :ref:`has_constant<class_Theme_method_has_constan .. rst-class:: classref-method -void **clear_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_font>` Removes the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists. @@ -398,7 +398,7 @@ Fails if it doesn't exist. Use :ref:`has_font<class_Theme_method_has_font>` to c .. rst-class:: classref-method -void **clear_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_font_size>` Removes the font size property defined by ``name`` and ``theme_type``, if it exists. @@ -412,7 +412,7 @@ Fails if it doesn't exist. Use :ref:`has_font_size<class_Theme_method_has_font_s .. rst-class:: classref-method -void **clear_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_icon>` Removes the icon property defined by ``name`` and ``theme_type``, if it exists. @@ -426,7 +426,7 @@ Fails if it doesn't exist. Use :ref:`has_icon<class_Theme_method_has_icon>` to c .. rst-class:: classref-method -void **clear_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_stylebox>` Removes the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists. @@ -440,7 +440,7 @@ Fails if it doesn't exist. Use :ref:`has_stylebox<class_Theme_method_has_stylebo .. rst-class:: classref-method -void **clear_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_theme_item>` Removes the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. @@ -456,7 +456,7 @@ Fails if it doesn't exist. Use :ref:`has_theme_item<class_Theme_method_has_theme .. rst-class:: classref-method -void **clear_type_variation** **(** :ref:`StringName<class_StringName>` theme_type **)** +|void| **clear_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_clear_type_variation>` Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set_type_variation<class_Theme_method_set_type_variation>`. @@ -468,7 +468,7 @@ Unmarks ``theme_type`` as being a variation of another theme type. See :ref:`set .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`Color<class_Color>` **get_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_color>` Returns the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``, if it exists. @@ -482,7 +482,7 @@ Returns the default color value if the property doesn't exist. Use :ref:`has_col .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_color_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_color_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_color_list>` Returns a list of names for :ref:`Color<class_Color>` properties defined with ``theme_type``. Use :ref:`get_color_type_list<class_Theme_method_get_color_type_list>` to get a list of possible theme type names. @@ -494,7 +494,7 @@ Returns a list of names for :ref:`Color<class_Color>` properties defined with `` .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_color_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_color_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_color_type_list>` Returns a list of all unique theme type names for :ref:`Color<class_Color>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -506,7 +506,7 @@ Returns a list of all unique theme type names for :ref:`Color<class_Color>` prop .. rst-class:: classref-method -:ref:`int<class_int>` **get_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`int<class_int>` **get_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_constant>` Returns the constant property defined by ``name`` and ``theme_type``, if it exists. @@ -520,7 +520,7 @@ Returns ``0`` if the property doesn't exist. Use :ref:`has_constant<class_Theme_ .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_constant_list>` Returns a list of names for constant properties defined with ``theme_type``. Use :ref:`get_constant_type_list<class_Theme_method_get_constant_type_list>` to get a list of possible theme type names. @@ -532,7 +532,7 @@ Returns a list of names for constant properties defined with ``theme_type``. Use .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_constant_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_constant_type_list>` Returns a list of all unique theme type names for constant properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -544,7 +544,7 @@ Returns a list of all unique theme type names for constant properties. Use :ref: .. rst-class:: classref-method -:ref:`Font<class_Font>` **get_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`Font<class_Font>` **get_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_font>` Returns the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``, if it exists. @@ -560,7 +560,7 @@ Returns the engine fallback font value, if neither exist (see :ref:`ThemeDB.fall .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_font_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_font_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_list>` Returns a list of names for :ref:`Font<class_Font>` properties defined with ``theme_type``. Use :ref:`get_font_type_list<class_Theme_method_get_font_type_list>` to get a list of possible theme type names. @@ -572,7 +572,7 @@ Returns a list of names for :ref:`Font<class_Font>` properties defined with ``th .. rst-class:: classref-method -:ref:`int<class_int>` **get_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`int<class_int>` **get_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_size>` Returns the font size property defined by ``name`` and ``theme_type``, if it exists. @@ -588,7 +588,7 @@ Returns the engine fallback font size value, if neither exist (see :ref:`ThemeDB .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_font_size_list>` Returns a list of names for font size properties defined with ``theme_type``. Use :ref:`get_font_size_type_list<class_Theme_method_get_font_size_type_list>` to get a list of possible theme type names. @@ -600,7 +600,7 @@ Returns a list of names for font size properties defined with ``theme_type``. Us .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_font_size_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_font_size_type_list>` Returns a list of all unique theme type names for font size properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -612,7 +612,7 @@ Returns a list of all unique theme type names for font size properties. Use :ref .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_font_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_font_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_font_type_list>` Returns a list of all unique theme type names for :ref:`Font<class_Font>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -624,7 +624,7 @@ Returns a list of all unique theme type names for :ref:`Font<class_Font>` proper .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_icon>` Returns the icon property defined by ``name`` and ``theme_type``, if it exists. @@ -638,7 +638,7 @@ Returns the engine fallback icon value if the property doesn't exist (see :ref:` .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_icon_list>` Returns a list of names for icon properties defined with ``theme_type``. Use :ref:`get_icon_type_list<class_Theme_method_get_icon_type_list>` to get a list of possible theme type names. @@ -650,7 +650,7 @@ Returns a list of names for icon properties defined with ``theme_type``. Use :re .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_icon_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_icon_type_list>` Returns a list of all unique theme type names for icon properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -662,7 +662,7 @@ Returns a list of all unique theme type names for icon properties. Use :ref:`get .. rst-class:: classref-method -:ref:`StyleBox<class_StyleBox>` **get_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`StyleBox<class_StyleBox>` **get_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox>` Returns the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``, if it exists. @@ -676,7 +676,7 @@ Returns the engine fallback stylebox value if the property doesn't exist (see :r .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_list** **(** :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_list**\ (\ theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox_list>` Returns a list of names for :ref:`StyleBox<class_StyleBox>` properties defined with ``theme_type``. Use :ref:`get_stylebox_type_list<class_Theme_method_get_stylebox_type_list>` to get a list of possible theme type names. @@ -688,7 +688,7 @@ Returns a list of names for :ref:`StyleBox<class_StyleBox>` properties defined w .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_stylebox_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_stylebox_type_list>` Returns a list of all unique theme type names for :ref:`StyleBox<class_StyleBox>` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -700,7 +700,7 @@ Returns a list of all unique theme type names for :ref:`StyleBox<class_StyleBox> .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`Variant<class_Variant>` **get_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item>` Returns the theme property of ``data_type`` defined by ``name`` and ``theme_type``, if it exists. @@ -716,7 +716,7 @@ Returns the engine fallback value if the property doesn't exist (see :ref:`Theme .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_list** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`String<class_String>` theme_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, theme_type\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item_list>` Returns a list of names for properties of ``data_type`` defined with ``theme_type``. Use :ref:`get_theme_item_type_list<class_Theme_method_get_theme_item_type_list>` to get a list of possible theme type names. @@ -730,7 +730,7 @@ Returns a list of names for properties of ``data_type`` defined with ``theme_typ .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_type_list** **(** :ref:`DataType<enum_Theme_DataType>` data_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_theme_item_type_list**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`\ ) |const| :ref:`🔗<class_Theme_method_get_theme_item_type_list>` Returns a list of all unique theme type names for ``data_type`` properties. Use :ref:`get_type_list<class_Theme_method_get_type_list>` to get a list of all unique theme types. @@ -744,7 +744,7 @@ Returns a list of all unique theme type names for ``data_type`` properties. Use .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_type_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_type_list**\ (\ ) |const| :ref:`🔗<class_Theme_method_get_type_list>` Returns a list of all unique theme type names. Use the appropriate ``get_*_type_list`` method to get a list of unique theme types for a single data type. @@ -756,7 +756,7 @@ Returns a list of all unique theme type names. Use the appropriate ``get_*_type_ .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_type_variation_base** **(** :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`StringName<class_StringName>` **get_type_variation_base**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_type_variation_base>` Returns the name of the base theme type if ``theme_type`` is a valid variation type. Returns an empty string otherwise. @@ -768,7 +768,7 @@ Returns the name of the base theme type if ``theme_type`` is a valid variation t .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_type_variation_list** **(** :ref:`StringName<class_StringName>` base_type **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_type_variation_list**\ (\ base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_get_type_variation_list>` Returns a list of all type variations for the given ``base_type``. @@ -780,7 +780,7 @@ Returns a list of all type variations for the given ``base_type``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_color>` Returns ``true`` if the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type`` exists. @@ -794,7 +794,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_color<class_Theme_method_se .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_constant>` Returns ``true`` if the constant property defined by ``name`` and ``theme_type`` exists. @@ -808,7 +808,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_constant<class_Theme_method .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_default_base_scale** **(** **)** |const| +:ref:`bool<class_bool>` **has_default_base_scale**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_base_scale>` Returns ``true`` if :ref:`default_base_scale<class_Theme_property_default_base_scale>` has a valid value. @@ -822,7 +822,7 @@ Returns ``false`` if it doesn't. The value must be greater than ``0.0`` to be co .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_default_font** **(** **)** |const| +:ref:`bool<class_bool>` **has_default_font**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_font>` Returns ``true`` if :ref:`default_font<class_Theme_property_default_font>` has a valid value. @@ -836,7 +836,7 @@ Returns ``false`` if it doesn't. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_default_font_size** **(** **)** |const| +:ref:`bool<class_bool>` **has_default_font_size**\ (\ ) |const| :ref:`🔗<class_Theme_method_has_default_font_size>` Returns ``true`` if :ref:`default_font_size<class_Theme_property_default_font_size>` has a valid value. @@ -850,7 +850,7 @@ Returns ``false`` if it doesn't. The value must be greater than ``0`` to be cons .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_font>` Returns ``true`` if the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type`` exists, or if the default theme font is set up (see :ref:`has_default_font<class_Theme_method_has_default_font>`). @@ -864,7 +864,7 @@ Returns ``false`` if neither exist. Use :ref:`set_font<class_Theme_method_set_fo .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_font_size>` Returns ``true`` if the font size property defined by ``name`` and ``theme_type`` exists, or if the default theme font size is set up (see :ref:`has_default_font_size<class_Theme_method_has_default_font_size>`). @@ -878,7 +878,7 @@ Returns ``false`` if neither exist. Use :ref:`set_font_size<class_Theme_method_s .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_icon>` Returns ``true`` if the icon property defined by ``name`` and ``theme_type`` exists. @@ -892,7 +892,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_icon<class_Theme_method_set .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_stylebox>` Returns ``true`` if the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type`` exists. @@ -906,7 +906,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_stylebox<class_Theme_method .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** |const| +:ref:`bool<class_bool>` **has_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_has_theme_item>` Returns ``true`` if the theme property of ``data_type`` defined by ``name`` and ``theme_type`` exists. @@ -922,7 +922,7 @@ Returns ``false`` if it doesn't exist. Use :ref:`set_theme_item<class_Theme_meth .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_type_variation** **(** :ref:`StringName<class_StringName>` theme_type, :ref:`StringName<class_StringName>` base_type **)** |const| +:ref:`bool<class_bool>` **is_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Theme_method_is_type_variation>` Returns ``true`` if ``theme_type`` is marked as a variation of ``base_type``. @@ -934,7 +934,7 @@ Returns ``true`` if ``theme_type`` is marked as a variation of ``base_type``. .. rst-class:: classref-method -void **merge_with** **(** :ref:`Theme<class_Theme>` other **)** +|void| **merge_with**\ (\ other\: :ref:`Theme<class_Theme>`\ ) :ref:`🔗<class_Theme_method_merge_with>` Adds missing and overrides existing definitions with values from the ``other`` theme resource. @@ -948,7 +948,7 @@ Adds missing and overrides existing definitions with values from the ``other`` t .. rst-class:: classref-method -void **remove_type** **(** :ref:`StringName<class_StringName>` theme_type **)** +|void| **remove_type**\ (\ theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_remove_type>` Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base. @@ -960,7 +960,7 @@ Removes the theme type, gracefully discarding defined theme items. If the type i .. rst-class:: classref-method -void **rename_color** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_color**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_color>` Renames the :ref:`Color<class_Color>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -974,7 +974,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_constant** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_constant**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_constant>` Renames the constant property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -988,7 +988,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_font** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_font**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_font>` Renames the :ref:`Font<class_Font>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -1002,7 +1002,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_font_size** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_font_size**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_font_size>` Renames the font size property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -1016,7 +1016,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_icon** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_icon**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_icon>` Renames the icon property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -1030,7 +1030,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_stylebox** **(** :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_stylebox**\ (\ old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_stylebox>` Renames the :ref:`StyleBox<class_StyleBox>` property defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -1044,7 +1044,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **rename_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` old_name, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type **)** +|void| **rename_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, old_name\: :ref:`StringName<class_StringName>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_rename_theme_item>` Renames the theme property of ``data_type`` defined by ``old_name`` and ``theme_type`` to ``name``, if it exists. @@ -1060,7 +1060,7 @@ Fails if it doesn't exist, or if a similar property with the new name already ex .. rst-class:: classref-method -void **set_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Color<class_Color>` color **)** +|void| **set_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Theme_method_set_color>` Creates or changes the value of the :ref:`Color<class_Color>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_color<class_Theme_method_clear_color>` to remove the property. @@ -1072,7 +1072,7 @@ Creates or changes the value of the :ref:`Color<class_Color>` property defined b .. rst-class:: classref-method -void **set_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`int<class_int>` constant **)** +|void| **set_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Theme_method_set_constant>` Creates or changes the value of the constant property defined by ``name`` and ``theme_type``. Use :ref:`clear_constant<class_Theme_method_clear_constant>` to remove the property. @@ -1084,7 +1084,7 @@ Creates or changes the value of the constant property defined by ``name`` and `` .. rst-class:: classref-method -void **set_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Font<class_Font>` font **)** +|void| **set_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_Theme_method_set_font>` Creates or changes the value of the :ref:`Font<class_Font>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_font<class_Theme_method_clear_font>` to remove the property. @@ -1096,7 +1096,7 @@ Creates or changes the value of the :ref:`Font<class_Font>` property defined by .. rst-class:: classref-method -void **set_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`int<class_int>` font_size **)** +|void| **set_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Theme_method_set_font_size>` Creates or changes the value of the font size property defined by ``name`` and ``theme_type``. Use :ref:`clear_font_size<class_Theme_method_clear_font_size>` to remove the property. @@ -1108,7 +1108,7 @@ Creates or changes the value of the font size property defined by ``name`` and ` .. rst-class:: classref-method -void **set_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_Theme_method_set_icon>` Creates or changes the value of the icon property defined by ``name`` and ``theme_type``. Use :ref:`clear_icon<class_Theme_method_clear_icon>` to remove the property. @@ -1120,7 +1120,7 @@ Creates or changes the value of the icon property defined by ``name`` and ``them .. rst-class:: classref-method -void **set_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`StyleBox<class_StyleBox>` texture **)** +|void| **set_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, texture\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_Theme_method_set_stylebox>` Creates or changes the value of the :ref:`StyleBox<class_StyleBox>` property defined by ``name`` and ``theme_type``. Use :ref:`clear_stylebox<class_Theme_method_clear_stylebox>` to remove the property. @@ -1132,7 +1132,7 @@ Creates or changes the value of the :ref:`StyleBox<class_StyleBox>` property def .. rst-class:: classref-method -void **set_theme_item** **(** :ref:`DataType<enum_Theme_DataType>` data_type, :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type, :ref:`Variant<class_Variant>` value **)** +|void| **set_theme_item**\ (\ data_type\: :ref:`DataType<enum_Theme_DataType>`, name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_Theme_method_set_theme_item>` Creates or changes the value of the theme property of ``data_type`` defined by ``name`` and ``theme_type``. Use :ref:`clear_theme_item<class_Theme_method_clear_theme_item>` to remove the property. @@ -1148,7 +1148,7 @@ Fails if the ``value`` type is not accepted by ``data_type``. .. rst-class:: classref-method -void **set_type_variation** **(** :ref:`StringName<class_StringName>` theme_type, :ref:`StringName<class_StringName>` base_type **)** +|void| **set_type_variation**\ (\ theme_type\: :ref:`StringName<class_StringName>`, base_type\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Theme_method_set_type_variation>` Marks ``theme_type`` as a variation of ``base_type``. @@ -1165,3 +1165,4 @@ Variations can also be nested, i.e. ``base_type`` can be another variation. If a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_themedb.rst b/classes/class_themedb.rst index 588be34fff3..6e7785380bc 100644 --- a/classes/class_themedb.rst +++ b/classes/class_themedb.rst @@ -51,11 +51,11 @@ Methods .. table:: :widths: auto - +---------------------------+------------------------------------------------------------------------------+ - | :ref:`Theme<class_Theme>` | :ref:`get_default_theme<class_ThemeDB_method_get_default_theme>` **(** **)** | - +---------------------------+------------------------------------------------------------------------------+ - | :ref:`Theme<class_Theme>` | :ref:`get_project_theme<class_ThemeDB_method_get_project_theme>` **(** **)** | - +---------------------------+------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------+ + | :ref:`Theme<class_Theme>` | :ref:`get_default_theme<class_ThemeDB_method_get_default_theme>`\ (\ ) | + +---------------------------+------------------------------------------------------------------------+ + | :ref:`Theme<class_Theme>` | :ref:`get_project_theme<class_ThemeDB_method_get_project_theme>`\ (\ ) | + +---------------------------+------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +70,7 @@ Signals .. rst-class:: classref-signal -**fallback_changed** **(** **)** +**fallback_changed**\ (\ ) :ref:`🔗<class_ThemeDB_signal_fallback_changed>` Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items. @@ -87,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **fallback_base_scale** = ``1.0`` +:ref:`float<class_float>` **fallback_base_scale** = ``1.0`` :ref:`🔗<class_ThemeDB_property_fallback_base_scale>` .. rst-class:: classref-property-setget -- void **set_fallback_base_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fallback_base_scale** **(** **)** +- |void| **set_fallback_base_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fallback_base_scale**\ (\ ) The fallback base scale factor of every :ref:`Control<class_Control>` node and :ref:`Theme<class_Theme>` resource. Used when no other value is available to the control. @@ -106,12 +106,12 @@ See also :ref:`Theme.default_base_scale<class_Theme_property_default_base_scale> .. rst-class:: classref-property -:ref:`Font<class_Font>` **fallback_font** +:ref:`Font<class_Font>` **fallback_font** :ref:`🔗<class_ThemeDB_property_fallback_font>` .. rst-class:: classref-property-setget -- void **set_fallback_font** **(** :ref:`Font<class_Font>` value **)** -- :ref:`Font<class_Font>` **get_fallback_font** **(** **)** +- |void| **set_fallback_font**\ (\ value\: :ref:`Font<class_Font>`\ ) +- :ref:`Font<class_Font>` **get_fallback_font**\ (\ ) The fallback font of every :ref:`Control<class_Control>` node and :ref:`Theme<class_Theme>` resource. Used when no other value is available to the control. @@ -125,12 +125,12 @@ See also :ref:`Theme.default_font<class_Theme_property_default_font>`. .. rst-class:: classref-property -:ref:`int<class_int>` **fallback_font_size** = ``16`` +:ref:`int<class_int>` **fallback_font_size** = ``16`` :ref:`🔗<class_ThemeDB_property_fallback_font_size>` .. rst-class:: classref-property-setget -- void **set_fallback_font_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_fallback_font_size** **(** **)** +- |void| **set_fallback_font_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_fallback_font_size**\ (\ ) The fallback font size of every :ref:`Control<class_Control>` node and :ref:`Theme<class_Theme>` resource. Used when no other value is available to the control. @@ -144,12 +144,12 @@ See also :ref:`Theme.default_font_size<class_Theme_property_default_font_size>`. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **fallback_icon** +:ref:`Texture2D<class_Texture2D>` **fallback_icon** :ref:`🔗<class_ThemeDB_property_fallback_icon>` .. rst-class:: classref-property-setget -- void **set_fallback_icon** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_fallback_icon** **(** **)** +- |void| **set_fallback_icon**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_fallback_icon**\ (\ ) The fallback icon of every :ref:`Control<class_Control>` node and :ref:`Theme<class_Theme>` resource. Used when no other value is available to the control. @@ -161,12 +161,12 @@ The fallback icon of every :ref:`Control<class_Control>` node and :ref:`Theme<cl .. rst-class:: classref-property -:ref:`StyleBox<class_StyleBox>` **fallback_stylebox** +:ref:`StyleBox<class_StyleBox>` **fallback_stylebox** :ref:`🔗<class_ThemeDB_property_fallback_stylebox>` .. rst-class:: classref-property-setget -- void **set_fallback_stylebox** **(** :ref:`StyleBox<class_StyleBox>` value **)** -- :ref:`StyleBox<class_StyleBox>` **get_fallback_stylebox** **(** **)** +- |void| **set_fallback_stylebox**\ (\ value\: :ref:`StyleBox<class_StyleBox>`\ ) +- :ref:`StyleBox<class_StyleBox>` **get_fallback_stylebox**\ (\ ) The fallback stylebox of every :ref:`Control<class_Control>` node and :ref:`Theme<class_Theme>` resource. Used when no other value is available to the control. @@ -183,7 +183,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Theme<class_Theme>` **get_default_theme** **(** **)** +:ref:`Theme<class_Theme>` **get_default_theme**\ (\ ) :ref:`🔗<class_ThemeDB_method_get_default_theme>` Returns a reference to the default engine :ref:`Theme<class_Theme>`. This theme resource is responsible for the out-of-the-box look of :ref:`Control<class_Control>` nodes and cannot be overridden. @@ -195,7 +195,7 @@ Returns a reference to the default engine :ref:`Theme<class_Theme>`. This theme .. rst-class:: classref-method -:ref:`Theme<class_Theme>` **get_project_theme** **(** **)** +:ref:`Theme<class_Theme>` **get_project_theme**\ (\ ) :ref:`🔗<class_ThemeDB_method_get_project_theme>` Returns a reference to the custom project :ref:`Theme<class_Theme>`. This theme resources allows to override the default engine theme for every control node in the project. @@ -208,3 +208,4 @@ To set the project theme, see :ref:`ProjectSettings.gui/theme/custom<class_Proje .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 70e6be76833..d8937d4689e 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -21,8 +21,6 @@ Description A unit of execution in a process. Can run methods on :ref:`Object<class_Object>`\ s simultaneously. The use of synchronization via :ref:`Mutex<class_Mutex>` or :ref:`Semaphore<class_Semaphore>` is advised if working with shared objects. -\ **Note:** Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. - \ **Warning:**\ To ensure proper cleanup without crashes or deadlocks, when a **Thread**'s reference count reaches zero and it is therefore destroyed, the following conditions must be met: @@ -42,7 +40,7 @@ Tutorials - :doc:`Thread-safe APIs <../tutorials/performance/thread_safe_apis>` -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. rst-class:: classref-reftable-group @@ -52,19 +50,19 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_id<class_Thread_method_get_id>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_alive<class_Thread_method_is_alive>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_started<class_Thread_method_is_started>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_thread_safety_checks_enabled<class_Thread_method_set_thread_safety_checks_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |static| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_Thread_method_start>` **(** :ref:`Callable<class_Callable>` callable, :ref:`Priority<enum_Thread_Priority>` priority=1 **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_id<class_Thread_method_get_id>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_alive<class_Thread_method_is_alive>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_started<class_Thread_method_is_started>`\ (\ ) |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_thread_safety_checks_enabled<class_Thread_method_set_thread_safety_checks_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |static| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`start<class_Thread_method_start>`\ (\ callable\: :ref:`Callable<class_Callable>`, priority\: :ref:`Priority<enum_Thread_Priority>` = 1\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`wait_to_finish<class_Thread_method_wait_to_finish>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,7 +77,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Priority**: +enum **Priority**: :ref:`🔗<enum_Thread_Priority>` .. _class_Thread_constant_PRIORITY_LOW: @@ -118,7 +116,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_id** **(** **)** |const| +:ref:`String<class_String>` **get_id**\ (\ ) |const| :ref:`🔗<class_Thread_method_get_id>` Returns the current **Thread**'s ID, uniquely identifying it among all threads. If the **Thread** has not started running or if :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` has been called, this returns an empty string. @@ -130,7 +128,7 @@ Returns the current **Thread**'s ID, uniquely identifying it among all threads. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_alive** **(** **)** |const| +:ref:`bool<class_bool>` **is_alive**\ (\ ) |const| :ref:`🔗<class_Thread_method_is_alive>` Returns ``true`` if this **Thread** is currently running the provided function. This is useful for determining if :ref:`wait_to_finish<class_Thread_method_wait_to_finish>` can be called without blocking the calling thread. @@ -144,7 +142,7 @@ To check if a **Thread** is joinable, use :ref:`is_started<class_Thread_method_i .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_started** **(** **)** |const| +:ref:`bool<class_bool>` **is_started**\ (\ ) |const| :ref:`🔗<class_Thread_method_is_started>` Returns ``true`` if this **Thread** has been started. Once started, this will return ``true`` until it is joined using :ref:`wait_to_finish<class_Thread_method_wait_to_finish>`. For checking if a **Thread** is still executing its task, use :ref:`is_alive<class_Thread_method_is_alive>`. @@ -156,7 +154,7 @@ Returns ``true`` if this **Thread** has been started. Once started, this will re .. rst-class:: classref-method -void **set_thread_safety_checks_enabled** **(** :ref:`bool<class_bool>` enabled **)** |static| +|void| **set_thread_safety_checks_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_Thread_method_set_thread_safety_checks_enabled>` Sets whether the thread safety checks the engine normally performs in methods of certain classes (e.g., :ref:`Node<class_Node>`) should happen **on the current thread**. @@ -180,7 +178,7 @@ Because of that, there may be cases where the user may want to disable them (``e .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **start** **(** :ref:`Callable<class_Callable>` callable, :ref:`Priority<enum_Thread_Priority>` priority=1 **)** +:ref:`Error<enum_@GlobalScope_Error>` **start**\ (\ callable\: :ref:`Callable<class_Callable>`, priority\: :ref:`Priority<enum_Thread_Priority>` = 1\ ) :ref:`🔗<class_Thread_method_start>` Starts a new **Thread** that calls ``callable``. @@ -198,7 +196,7 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` on success, or :r .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **wait_to_finish** **(** **)** +:ref:`Variant<class_Variant>` **wait_to_finish**\ (\ ) :ref:`🔗<class_Thread_method_wait_to_finish>` Joins the **Thread** and waits for it to finish. Returns the output of the :ref:`Callable<class_Callable>` passed to :ref:`start<class_Thread_method_start>`. @@ -213,3 +211,4 @@ To determine if this can be called without blocking the calling thread, check if .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tiledata.rst b/classes/class_tiledata.rst index f615a98e2ab..ff0db80faff 100644 --- a/classes/class_tiledata.rst +++ b/classes/class_tiledata.rst @@ -19,7 +19,7 @@ Settings for a single tile in a :ref:`TileSet<class_TileSet>`. Description ----------- -**TileData** object represents a single tile in a :ref:`TileSet<class_TileSet>`. It is usually edited using the tileset editor, but it can be modified at runtime using :ref:`TileMap._tile_data_runtime_update<class_TileMap_method__tile_data_runtime_update>`. +**TileData** object represents a single tile in a :ref:`TileSet<class_TileSet>`. It is usually edited using the tileset editor, but it can be modified at runtime using :ref:`TileMap._tile_data_runtime_update<class_TileMap_private_method__tile_data_runtime_update>`. .. rst-class:: classref-reftable-group @@ -61,55 +61,57 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_collision_polygon<class_TileData_method_add_collision_polygon>` **(** :ref:`int<class_int>` layer_id **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_collision_polygon_one_way_margin<class_TileData_method_get_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_collision_polygon_points<class_TileData_method_get_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_collision_polygons_count<class_TileData_method_get_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_constant_angular_velocity<class_TileData_method_get_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_linear_velocity<class_TileData_method_get_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_custom_data<class_TileData_method_get_custom_data>` **(** :ref:`String<class_String>` layer_name **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_custom_data_by_layer_id<class_TileData_method_get_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`get_navigation_polygon<class_TileData_method_get_navigation_polygon>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`get_occluder<class_TileData_method_get_occluder>` **(** :ref:`int<class_int>` layer_id **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_terrain_peering_bit<class_TileData_method_get_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_collision_polygon_one_way<class_TileData_method_is_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_collision_polygon<class_TileData_method_remove_collision_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way<class_TileData_method_set_collision_polygon_one_way>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_one_way_margin<class_TileData_method_set_collision_polygon_one_way_margin>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygon_points<class_TileData_method_set_collision_polygon_points>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_polygons_count<class_TileData_method_set_collision_polygons_count>` **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_angular_velocity<class_TileData_method_set_constant_angular_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_constant_linear_velocity<class_TileData_method_set_constant_linear_velocity>` **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data<class_TileData_method_set_custom_data>` **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data_by_layer_id<class_TileData_method_set_custom_data_by_layer_id>` **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_polygon<class_TileData_method_set_navigation_polygon>` **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_occluder<class_TileData_method_set_occluder>` **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_peering_bit<class_TileData_method_set_terrain_peering_bit>` **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_collision_polygon<class_TileData_method_add_collision_polygon>`\ (\ layer_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_collision_polygon_one_way_margin<class_TileData_method_get_collision_polygon_one_way_margin>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_collision_polygon_points<class_TileData_method_get_collision_polygon_points>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_collision_polygons_count<class_TileData_method_get_collision_polygons_count>`\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_constant_angular_velocity<class_TileData_method_get_constant_angular_velocity>`\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_constant_linear_velocity<class_TileData_method_get_constant_linear_velocity>`\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_custom_data<class_TileData_method_get_custom_data>`\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_custom_data_by_layer_id<class_TileData_method_get_custom_data_by_layer_id>`\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`get_navigation_polygon<class_TileData_method_get_navigation_polygon>`\ (\ layer_id\: :ref:`int<class_int>`, flip_h\: :ref:`bool<class_bool>` = false, flip_v\: :ref:`bool<class_bool>` = false, transpose\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`get_occluder<class_TileData_method_get_occluder>`\ (\ layer_id\: :ref:`int<class_int>`, flip_h\: :ref:`bool<class_bool>` = false, flip_v\: :ref:`bool<class_bool>` = false, transpose\: :ref:`bool<class_bool>` = false\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_terrain_peering_bit<class_TileData_method_get_terrain_peering_bit>`\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_collision_polygon_one_way<class_TileData_method_is_collision_polygon_one_way>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_terrain_peering_bit<class_TileData_method_is_valid_terrain_peering_bit>`\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_collision_polygon<class_TileData_method_remove_collision_polygon>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_one_way<class_TileData_method_set_collision_polygon_one_way>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, one_way\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_one_way_margin<class_TileData_method_set_collision_polygon_one_way_margin>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, one_way_margin\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygon_points<class_TileData_method_set_collision_polygon_points>`\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collision_polygons_count<class_TileData_method_set_collision_polygons_count>`\ (\ layer_id\: :ref:`int<class_int>`, polygons_count\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_angular_velocity<class_TileData_method_set_constant_angular_velocity>`\ (\ layer_id\: :ref:`int<class_int>`, velocity\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_constant_linear_velocity<class_TileData_method_set_constant_linear_velocity>`\ (\ layer_id\: :ref:`int<class_int>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data<class_TileData_method_set_custom_data>`\ (\ layer_name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data_by_layer_id<class_TileData_method_set_custom_data_by_layer_id>`\ (\ layer_id\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_polygon<class_TileData_method_set_navigation_polygon>`\ (\ layer_id\: :ref:`int<class_int>`, navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occluder<class_TileData_method_set_occluder>`\ (\ layer_id\: :ref:`int<class_int>`, occluder_polygon\: :ref:`OccluderPolygon2D<class_OccluderPolygon2D>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain_peering_bit<class_TileData_method_set_terrain_peering_bit>`\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`, terrain\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -124,7 +126,7 @@ Signals .. rst-class:: classref-signal -**changed** **(** **)** +**changed**\ (\ ) :ref:`🔗<class_TileData_signal_changed>` Emitted when any of the properties are changed. @@ -141,12 +143,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_h** = ``false`` +:ref:`bool<class_bool>` **flip_h** = ``false`` :ref:`🔗<class_TileData_property_flip_h>` .. rst-class:: classref-property-setget -- void **set_flip_h** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flip_h** **(** **)** +- |void| **set_flip_h**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flip_h**\ (\ ) If ``true``, the tile will have its texture flipped horizontally. @@ -158,12 +160,12 @@ If ``true``, the tile will have its texture flipped horizontally. .. rst-class:: classref-property -:ref:`bool<class_bool>` **flip_v** = ``false`` +:ref:`bool<class_bool>` **flip_v** = ``false`` :ref:`🔗<class_TileData_property_flip_v>` .. rst-class:: classref-property-setget -- void **set_flip_v** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_flip_v** **(** **)** +- |void| **set_flip_v**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flip_v**\ (\ ) If ``true``, the tile will have its texture flipped vertically. @@ -175,12 +177,12 @@ If ``true``, the tile will have its texture flipped vertically. .. rst-class:: classref-property -:ref:`Material<class_Material>` **material** +:ref:`Material<class_Material>` **material** :ref:`🔗<class_TileData_property_material>` .. rst-class:: classref-property-setget -- void **set_material** **(** :ref:`Material<class_Material>` value **)** -- :ref:`Material<class_Material>` **get_material** **(** **)** +- |void| **set_material**\ (\ value\: :ref:`Material<class_Material>`\ ) +- :ref:`Material<class_Material>` **get_material**\ (\ ) The :ref:`Material<class_Material>` to use for this **TileData**. This can be a :ref:`CanvasItemMaterial<class_CanvasItemMaterial>` to use the default shader, or a :ref:`ShaderMaterial<class_ShaderMaterial>` to use a custom shader. @@ -192,12 +194,12 @@ The :ref:`Material<class_Material>` to use for this **TileData**. This can be a .. rst-class:: classref-property -:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **modulate** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_TileData_property_modulate>` .. rst-class:: classref-property-setget -- void **set_modulate** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_modulate** **(** **)** +- |void| **set_modulate**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_modulate**\ (\ ) Color modulation of the tile. @@ -209,12 +211,12 @@ Color modulation of the tile. .. rst-class:: classref-property -:ref:`float<class_float>` **probability** = ``1.0`` +:ref:`float<class_float>` **probability** = ``1.0`` :ref:`🔗<class_TileData_property_probability>` .. rst-class:: classref-property-setget -- void **set_probability** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_probability** **(** **)** +- |void| **set_probability**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_probability**\ (\ ) Relative probability of this tile being selected when drawing a pattern of random tiles. @@ -226,12 +228,12 @@ Relative probability of this tile being selected when drawing a pattern of rando .. rst-class:: classref-property -:ref:`int<class_int>` **terrain** = ``-1`` +:ref:`int<class_int>` **terrain** = ``-1`` :ref:`🔗<class_TileData_property_terrain>` .. rst-class:: classref-property-setget -- void **set_terrain** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_terrain** **(** **)** +- |void| **set_terrain**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_terrain**\ (\ ) ID of the terrain from the terrain set that the tile uses. @@ -243,12 +245,12 @@ ID of the terrain from the terrain set that the tile uses. .. rst-class:: classref-property -:ref:`int<class_int>` **terrain_set** = ``-1`` +:ref:`int<class_int>` **terrain_set** = ``-1`` :ref:`🔗<class_TileData_property_terrain_set>` .. rst-class:: classref-property-setget -- void **set_terrain_set** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_terrain_set** **(** **)** +- |void| **set_terrain_set**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_terrain_set**\ (\ ) ID of the terrain set that the tile uses. @@ -260,12 +262,12 @@ ID of the terrain set that the tile uses. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **texture_origin** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **texture_origin** = ``Vector2i(0, 0)`` :ref:`🔗<class_TileData_property_texture_origin>` .. rst-class:: classref-property-setget -- void **set_texture_origin** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_texture_origin** **(** **)** +- |void| **set_texture_origin**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_texture_origin**\ (\ ) Offsets the position of where the tile is drawn. @@ -277,12 +279,12 @@ Offsets the position of where the tile is drawn. .. rst-class:: classref-property -:ref:`bool<class_bool>` **transpose** = ``false`` +:ref:`bool<class_bool>` **transpose** = ``false`` :ref:`🔗<class_TileData_property_transpose>` .. rst-class:: classref-property-setget -- void **set_transpose** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_transpose** **(** **)** +- |void| **set_transpose**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_transpose**\ (\ ) If ``true``, the tile will display transposed, i.e. with horizontal and vertical texture UVs swapped. @@ -294,12 +296,12 @@ If ``true``, the tile will display transposed, i.e. with horizontal and vertical .. rst-class:: classref-property -:ref:`int<class_int>` **y_sort_origin** = ``0`` +:ref:`int<class_int>` **y_sort_origin** = ``0`` :ref:`🔗<class_TileData_property_y_sort_origin>` .. rst-class:: classref-property-setget -- void **set_y_sort_origin** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_y_sort_origin** **(** **)** +- |void| **set_y_sort_origin**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_y_sort_origin**\ (\ ) Vertical point of the tile used for determining y-sorted order. @@ -311,12 +313,12 @@ Vertical point of the tile used for determining y-sorted order. .. rst-class:: classref-property -:ref:`int<class_int>` **z_index** = ``0`` +:ref:`int<class_int>` **z_index** = ``0`` :ref:`🔗<class_TileData_property_z_index>` .. rst-class:: classref-property-setget -- void **set_z_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_z_index** **(** **)** +- |void| **set_z_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_z_index**\ (\ ) Ordering index of this tile, relative to :ref:`TileMap<class_TileMap>`. @@ -333,7 +335,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_collision_polygon** **(** :ref:`int<class_int>` layer_id **)** +|void| **add_collision_polygon**\ (\ layer_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileData_method_add_collision_polygon>` Adds a collision polygon to the tile on the given TileSet physics layer. @@ -345,7 +347,7 @@ Adds a collision polygon to the tile on the given TileSet physics layer. .. rst-class:: classref-method -:ref:`float<class_float>` **get_collision_polygon_one_way_margin** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| +:ref:`float<class_float>` **get_collision_polygon_one_way_margin**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_collision_polygon_one_way_margin>` Returns the one-way margin (for one-way platforms) of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -357,7 +359,7 @@ Returns the one-way margin (for one-way platforms) of the polygon at index ``pol .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_collision_polygon_points** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_collision_polygon_points**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_collision_polygon_points>` Returns the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -369,7 +371,7 @@ Returns the points of the polygon at index ``polygon_index`` for TileSet physics .. rst-class:: classref-method -:ref:`int<class_int>` **get_collision_polygons_count** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`int<class_int>` **get_collision_polygons_count**\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_collision_polygons_count>` Returns how many polygons the tile has for TileSet physics layer with index ``layer_id``. @@ -381,7 +383,7 @@ Returns how many polygons the tile has for TileSet physics layer with index ``la .. rst-class:: classref-method -:ref:`float<class_float>` **get_constant_angular_velocity** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`float<class_float>` **get_constant_angular_velocity**\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_constant_angular_velocity>` Returns the constant angular velocity applied to objects colliding with this tile. @@ -393,7 +395,7 @@ Returns the constant angular velocity applied to objects colliding with this til .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_constant_linear_velocity** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`Vector2<class_Vector2>` **get_constant_linear_velocity**\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_constant_linear_velocity>` Returns the constant linear velocity applied to objects colliding with this tile. @@ -405,7 +407,7 @@ Returns the constant linear velocity applied to objects colliding with this tile .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_custom_data** **(** :ref:`String<class_String>` layer_name **)** |const| +:ref:`Variant<class_Variant>` **get_custom_data**\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TileData_method_get_custom_data>` Returns the custom data value for custom data layer named ``layer_name``. @@ -417,7 +419,7 @@ Returns the custom data value for custom data layer named ``layer_name``. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_custom_data_by_layer_id** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`Variant<class_Variant>` **get_custom_data_by_layer_id**\ (\ layer_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_get_custom_data_by_layer_id>` Returns the custom data value for custom data layer with index ``layer_id``. @@ -429,10 +431,12 @@ Returns the custom data value for custom data layer with index ``layer_id``. .. rst-class:: classref-method -:ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`NavigationPolygon<class_NavigationPolygon>` **get_navigation_polygon**\ (\ layer_id\: :ref:`int<class_int>`, flip_h\: :ref:`bool<class_bool>` = false, flip_v\: :ref:`bool<class_bool>` = false, transpose\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileData_method_get_navigation_polygon>` Returns the navigation polygon of the tile for the TileSet navigation layer with index ``layer_id``. +\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. + .. rst-class:: classref-item-separator ---- @@ -441,10 +445,12 @@ Returns the navigation polygon of the tile for the TileSet navigation layer with .. rst-class:: classref-method -:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder** **(** :ref:`int<class_int>` layer_id **)** |const| +:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder**\ (\ layer_id\: :ref:`int<class_int>`, flip_h\: :ref:`bool<class_bool>` = false, flip_v\: :ref:`bool<class_bool>` = false, transpose\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileData_method_get_occluder>` Returns the occluder polygon of the tile for the TileSet occlusion layer with index ``layer_id``. +\ ``flip_h``, ``flip_v``, and ``transpose`` allow transforming the returned polygon. + .. rst-class:: classref-item-separator ---- @@ -453,9 +459,9 @@ Returns the occluder polygon of the tile for the TileSet occlusion layer with in .. rst-class:: classref-method -:ref:`int<class_int>` **get_terrain_peering_bit** **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit **)** |const| +:ref:`int<class_int>` **get_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| :ref:`🔗<class_TileData_method_get_terrain_peering_bit>` -Returns the tile's terrain bit for the given ``peering_bit`` direction. +Returns the tile's terrain bit for the given ``peering_bit`` direction. To check that a direction is valid, use :ref:`is_valid_terrain_peering_bit<class_TileData_method_is_valid_terrain_peering_bit>`. .. rst-class:: classref-item-separator @@ -465,7 +471,7 @@ Returns the tile's terrain bit for the given ``peering_bit`` direction. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_collision_polygon_one_way** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** |const| +:ref:`bool<class_bool>` **is_collision_polygon_one_way**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileData_method_is_collision_polygon_one_way>` Returns whether one-way collisions are enabled for the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -473,11 +479,23 @@ Returns whether one-way collisions are enabled for the polygon at index ``polygo ---- +.. _class_TileData_method_is_valid_terrain_peering_bit: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_valid_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| :ref:`🔗<class_TileData_method_is_valid_terrain_peering_bit>` + +Returns whether the given ``peering_bit`` direction is valid for this tile. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileData_method_remove_collision_polygon: .. rst-class:: classref-method -void **remove_collision_polygon** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index **)** +|void| **remove_collision_polygon**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileData_method_remove_collision_polygon>` Removes the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -489,7 +507,7 @@ Removes the polygon at index ``polygon_index`` for TileSet physics layer with in .. rst-class:: classref-method -void **set_collision_polygon_one_way** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`bool<class_bool>` one_way **)** +|void| **set_collision_polygon_one_way**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, one_way\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileData_method_set_collision_polygon_one_way>` Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -501,7 +519,7 @@ Enables/disables one-way collisions on the polygon at index ``polygon_index`` fo .. rst-class:: classref-method -void **set_collision_polygon_one_way_margin** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`float<class_float>` one_way_margin **)** +|void| **set_collision_polygon_one_way_margin**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, one_way_margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TileData_method_set_collision_polygon_one_way_margin>` Enables/disables one-way collisions on the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -513,7 +531,7 @@ Enables/disables one-way collisions on the polygon at index ``polygon_index`` fo .. rst-class:: classref-method -void **set_collision_polygon_points** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygon_index, :ref:`PackedVector2Array<class_PackedVector2Array>` polygon **)** +|void| **set_collision_polygon_points**\ (\ layer_id\: :ref:`int<class_int>`, polygon_index\: :ref:`int<class_int>`, polygon\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_TileData_method_set_collision_polygon_points>` Sets the points of the polygon at index ``polygon_index`` for TileSet physics layer with index ``layer_id``. @@ -525,7 +543,7 @@ Sets the points of the polygon at index ``polygon_index`` for TileSet physics la .. rst-class:: classref-method -void **set_collision_polygons_count** **(** :ref:`int<class_int>` layer_id, :ref:`int<class_int>` polygons_count **)** +|void| **set_collision_polygons_count**\ (\ layer_id\: :ref:`int<class_int>`, polygons_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileData_method_set_collision_polygons_count>` Sets the polygons count for TileSet physics layer with index ``layer_id``. @@ -537,7 +555,7 @@ Sets the polygons count for TileSet physics layer with index ``layer_id``. .. rst-class:: classref-method -void **set_constant_angular_velocity** **(** :ref:`int<class_int>` layer_id, :ref:`float<class_float>` velocity **)** +|void| **set_constant_angular_velocity**\ (\ layer_id\: :ref:`int<class_int>`, velocity\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TileData_method_set_constant_angular_velocity>` Sets the constant angular velocity. This does not rotate the tile. This angular velocity is applied to objects colliding with this tile. @@ -549,7 +567,7 @@ Sets the constant angular velocity. This does not rotate the tile. This angular .. rst-class:: classref-method -void **set_constant_linear_velocity** **(** :ref:`int<class_int>` layer_id, :ref:`Vector2<class_Vector2>` velocity **)** +|void| **set_constant_linear_velocity**\ (\ layer_id\: :ref:`int<class_int>`, velocity\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_TileData_method_set_constant_linear_velocity>` Sets the constant linear velocity. This does not move the tile. This linear velocity is applied to objects colliding with this tile. This is useful to create conveyor belts. @@ -561,7 +579,7 @@ Sets the constant linear velocity. This does not move the tile. This linear velo .. rst-class:: classref-method -void **set_custom_data** **(** :ref:`String<class_String>` layer_name, :ref:`Variant<class_Variant>` value **)** +|void| **set_custom_data**\ (\ layer_name\: :ref:`String<class_String>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TileData_method_set_custom_data>` Sets the tile's custom data value for the TileSet custom data layer with name ``layer_name``. @@ -573,7 +591,7 @@ Sets the tile's custom data value for the TileSet custom data layer with name `` .. rst-class:: classref-method -void **set_custom_data_by_layer_id** **(** :ref:`int<class_int>` layer_id, :ref:`Variant<class_Variant>` value **)** +|void| **set_custom_data_by_layer_id**\ (\ layer_id\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TileData_method_set_custom_data_by_layer_id>` Sets the tile's custom data value for the TileSet custom data layer with index ``layer_id``. @@ -585,7 +603,7 @@ Sets the tile's custom data value for the TileSet custom data layer with index ` .. rst-class:: classref-method -void **set_navigation_polygon** **(** :ref:`int<class_int>` layer_id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** +|void| **set_navigation_polygon**\ (\ layer_id\: :ref:`int<class_int>`, navigation_polygon\: :ref:`NavigationPolygon<class_NavigationPolygon>`\ ) :ref:`🔗<class_TileData_method_set_navigation_polygon>` Sets the navigation polygon for the TileSet navigation layer with index ``layer_id``. @@ -597,7 +615,7 @@ Sets the navigation polygon for the TileSet navigation layer with index ``layer_ .. rst-class:: classref-method -void **set_occluder** **(** :ref:`int<class_int>` layer_id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` occluder_polygon **)** +|void| **set_occluder**\ (\ layer_id\: :ref:`int<class_int>`, occluder_polygon\: :ref:`OccluderPolygon2D<class_OccluderPolygon2D>`\ ) :ref:`🔗<class_TileData_method_set_occluder>` Sets the occluder for the TileSet occlusion layer with index ``layer_id``. @@ -609,9 +627,9 @@ Sets the occluder for the TileSet occlusion layer with index ``layer_id``. .. rst-class:: classref-method -void **set_terrain_peering_bit** **(** :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` peering_bit, :ref:`int<class_int>` terrain **)** +|void| **set_terrain_peering_bit**\ (\ peering_bit\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`, terrain\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileData_method_set_terrain_peering_bit>` -Sets the tile's terrain bit for the given ``peering_bit`` direction. +Sets the tile's terrain bit for the given ``peering_bit`` direction. To check that a direction is valid, use :ref:`is_valid_terrain_peering_bit<class_TileData_method_is_valid_terrain_peering_bit>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -620,3 +638,4 @@ Sets the tile's terrain bit for the given ``peering_bit`` direction. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilemap.rst b/classes/class_tilemap.rst index 2644707e31d..bc63e741979 100644 --- a/classes/class_tilemap.rst +++ b/classes/class_tilemap.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: gridmap + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -10,6 +13,8 @@ TileMap ======= +**Deprecated:** Use multiple :ref:`TileMapLayer<class_TileMapLayer>` nodes instead. + **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` Node for 2D tile-based maps. @@ -21,6 +26,10 @@ Description Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet<class_TileSet>` which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other. +For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>` may be initialized after their parent. This is only queued when inside the scene tree. + +To force an update earlier on, call :ref:`update_internals<class_TileMap_method_update_internals>`. + .. rst-class:: classref-introduction-group Tutorials @@ -28,17 +37,17 @@ Tutorials - :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>` -- `2D Platformer Demo <https://godotengine.org/asset-library/asset/120>`__ +- `2D Platformer Demo <https://godotengine.org/asset-library/asset/2727>`__ -- `2D Isometric Demo <https://godotengine.org/asset-library/asset/112>`__ +- `2D Isometric Demo <https://godotengine.org/asset-library/asset/2718>`__ -- `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/111>`__ +- `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/2717>`__ -- `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__ +- `2D Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__ -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ -- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__ +- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2719>`__ .. rst-class:: classref-reftable-group @@ -48,8 +57,6 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ - | :ref:`int<class_int>` | :ref:`cell_quadrant_size<class_TileMap_property_cell_quadrant_size>` | ``16`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`bool<class_bool>` | :ref:`collision_animatable<class_TileMap_property_collision_animatable>` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ @@ -57,6 +64,8 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` | :ref:`navigation_visibility_mode<class_TileMap_property_navigation_visibility_mode>` | ``0`` | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ + | :ref:`int<class_int>` | :ref:`rendering_quadrant_size<class_TileMap_property_rendering_quadrant_size>` | ``16`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ | :ref:`TileSet<class_TileSet>` | :ref:`tile_set<class_TileMap_property_tile_set>` | | +----------------------------------------------------+--------------------------------------------------------------------------------------+-----------+ @@ -68,95 +77,107 @@ Methods .. table:: :widths: auto - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tile_data_runtime_update<class_TileMap_method__tile_data_runtime_update>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`TileData<class_TileData>` tile_data **)** |virtual| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_use_tile_data_runtime_update<class_TileMap_method__use_tile_data_runtime_update>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords **)** |virtual| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_layer<class_TileMap_method_add_layer>` **(** :ref:`int<class_int>` to_position **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_TileMap_method_clear>` **(** **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_layer<class_TileMap_method_clear_layer>` **(** :ref:`int<class_int>` layer **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_cell<class_TileMap_method_erase_cell>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fix_invalid_tiles<class_TileMap_method_fix_invalid_tiles>` **(** **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update<class_TileMap_method_force_update>` **(** :ref:`int<class_int>` layer=-1 **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_alternative_tile<class_TileMap_method_get_cell_alternative_tile>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_cell_atlas_coords<class_TileMap_method_get_cell_atlas_coords>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_source_id<class_TileMap_method_get_cell_source_id>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileData<class_TileData>` | :ref:`get_cell_tile_data<class_TileMap_method_get_cell_tile_data>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_coords_for_body_rid<class_TileMap_method_get_coords_for_body_rid>` **(** :ref:`RID<class_RID>` body **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_layer_for_body_rid<class_TileMap_method_get_layer_for_body_rid>` **(** :ref:`RID<class_RID>` body **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_layer_modulate<class_TileMap_method_get_layer_modulate>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_layer_name<class_TileMap_method_get_layer_name>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_layer_y_sort_origin<class_TileMap_method_get_layer_y_sort_origin>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_layer_z_index<class_TileMap_method_get_layer_z_index>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_layers_count<class_TileMap_method_get_layers_count>` **(** **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_TileMap_method_get_navigation_map>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_neighbor_cell<class_TileMap_method_get_neighbor_cell>` **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` neighbor **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileMap_method_get_pattern>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` coords_array **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_surrounding_cells<class_TileMap_method_get_surrounding_cells>` **(** :ref:`Vector2i<class_Vector2i>` coords **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_used_cells<class_TileMap_method_get_used_cells>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_used_cells_by_id<class_TileMap_method_get_used_cells_by_id>` **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=-1 **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_TileMap_method_get_used_rect>` **(** **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_layer_enabled<class_TileMap_method_is_layer_enabled>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_layer_y_sort_enabled<class_TileMap_method_is_layer_y_sort_enabled>` **(** :ref:`int<class_int>` layer **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`local_to_map<class_TileMap_method_local_to_map>` **(** :ref:`Vector2<class_Vector2>` local_position **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`map_pattern<class_TileMap_method_map_pattern>` **(** :ref:`Vector2i<class_Vector2i>` position_in_tilemap, :ref:`Vector2i<class_Vector2i>` coords_in_pattern, :ref:`TileMapPattern<class_TileMapPattern>` pattern **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`map_to_local<class_TileMap_method_map_to_local>` **(** :ref:`Vector2i<class_Vector2i>` map_position **)** |const| | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_layer<class_TileMap_method_move_layer>` **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` to_position **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_layer<class_TileMap_method_remove_layer>` **(** :ref:`int<class_int>` layer **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell<class_TileMap_method_set_cell>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=0 **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cells_terrain_connect<class_TileMap_method_set_cells_terrain_connect>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` cells, :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain, :ref:`bool<class_bool>` ignore_empty_terrains=true **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cells_terrain_path<class_TileMap_method_set_cells_terrain_path>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` path, :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain, :ref:`bool<class_bool>` ignore_empty_terrains=true **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_enabled<class_TileMap_method_set_layer_enabled>` **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_modulate<class_TileMap_method_set_layer_modulate>` **(** :ref:`int<class_int>` layer, :ref:`Color<class_Color>` modulate **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_name<class_TileMap_method_set_layer_name>` **(** :ref:`int<class_int>` layer, :ref:`String<class_String>` name **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_y_sort_enabled<class_TileMap_method_set_layer_y_sort_enabled>` **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` y_sort_enabled **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_y_sort_origin<class_TileMap_method_set_layer_y_sort_origin>` **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` y_sort_origin **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_z_index<class_TileMap_method_set_layer_z_index>` **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` z_index **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_map<class_TileMap_method_set_navigation_map>` **(** :ref:`int<class_int>` layer, :ref:`RID<class_RID>` map **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pattern<class_TileMap_method_set_pattern>` **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` position, :ref:`TileMapPattern<class_TileMapPattern>` pattern **)** | - +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tile_data_runtime_update<class_TileMap_private_method__tile_data_runtime_update>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, tile_data\: :ref:`TileData<class_TileData>`\ ) |virtual| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_use_tile_data_runtime_update<class_TileMap_private_method__use_tile_data_runtime_update>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_layer<class_TileMap_method_add_layer>`\ (\ to_position\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TileMap_method_clear>`\ (\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_layer<class_TileMap_method_clear_layer>`\ (\ layer\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_cell<class_TileMap_method_erase_cell>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fix_invalid_tiles<class_TileMap_method_fix_invalid_tiles>`\ (\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update<class_TileMap_method_force_update>`\ (\ layer\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_alternative_tile<class_TileMap_method_get_cell_alternative_tile>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_cell_atlas_coords<class_TileMap_method_get_cell_atlas_coords>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_source_id<class_TileMap_method_get_cell_source_id>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData<class_TileData>` | :ref:`get_cell_tile_data<class_TileMap_method_get_cell_tile_data>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_coords_for_body_rid<class_TileMap_method_get_coords_for_body_rid>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_layer_for_body_rid<class_TileMap_method_get_layer_for_body_rid>`\ (\ body\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_layer_modulate<class_TileMap_method_get_layer_modulate>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_layer_name<class_TileMap_method_get_layer_name>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_layer_navigation_map<class_TileMap_method_get_layer_navigation_map>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_layer_y_sort_origin<class_TileMap_method_get_layer_y_sort_origin>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_layer_z_index<class_TileMap_method_get_layer_z_index>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_layers_count<class_TileMap_method_get_layers_count>`\ (\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_TileMap_method_get_navigation_map>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_neighbor_cell<class_TileMap_method_get_neighbor_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, neighbor\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileMap_method_get_pattern>`\ (\ layer\: :ref:`int<class_int>`, coords_array\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\]\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_surrounding_cells<class_TileMap_method_get_surrounding_cells>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_used_cells<class_TileMap_method_get_used_cells>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_used_cells_by_id<class_TileMap_method_get_used_cells_by_id>`\ (\ layer\: :ref:`int<class_int>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_TileMap_method_get_used_rect>`\ (\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_layer_enabled<class_TileMap_method_is_layer_enabled>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_layer_navigation_enabled<class_TileMap_method_is_layer_navigation_enabled>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_layer_y_sort_enabled<class_TileMap_method_is_layer_y_sort_enabled>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`local_to_map<class_TileMap_method_local_to_map>`\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`map_pattern<class_TileMap_method_map_pattern>`\ (\ position_in_tilemap\: :ref:`Vector2i<class_Vector2i>`, coords_in_pattern\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`map_to_local<class_TileMap_method_map_to_local>`\ (\ map_position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_layer<class_TileMap_method_move_layer>`\ (\ layer\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_runtime_tile_data_update<class_TileMap_method_notify_runtime_tile_data_update>`\ (\ layer\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_layer<class_TileMap_method_remove_layer>`\ (\ layer\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell<class_TileMap_method_set_cell>`\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_connect<class_TileMap_method_set_cells_terrain_connect>`\ (\ layer\: :ref:`int<class_int>`, cells\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_path<class_TileMap_method_set_cells_terrain_path>`\ (\ layer\: :ref:`int<class_int>`, path\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_enabled<class_TileMap_method_set_layer_enabled>`\ (\ layer\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_modulate<class_TileMap_method_set_layer_modulate>`\ (\ layer\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_name<class_TileMap_method_set_layer_name>`\ (\ layer\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_navigation_enabled<class_TileMap_method_set_layer_navigation_enabled>`\ (\ layer\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_navigation_map<class_TileMap_method_set_layer_navigation_map>`\ (\ layer\: :ref:`int<class_int>`, map\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_y_sort_enabled<class_TileMap_method_set_layer_y_sort_enabled>`\ (\ layer\: :ref:`int<class_int>`, y_sort_enabled\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_y_sort_origin<class_TileMap_method_set_layer_y_sort_origin>`\ (\ layer\: :ref:`int<class_int>`, y_sort_origin\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_z_index<class_TileMap_method_set_layer_z_index>`\ (\ layer\: :ref:`int<class_int>`, z_index\: :ref:`int<class_int>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_TileMap_method_set_navigation_map>`\ (\ layer\: :ref:`int<class_int>`, map\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pattern<class_TileMap_method_set_pattern>`\ (\ layer\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_internals<class_TileMap_method_update_internals>`\ (\ ) | + +--------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -171,7 +192,7 @@ Signals .. rst-class:: classref-signal -**changed** **(** **)** +**changed**\ (\ ) :ref:`🔗<class_TileMap_signal_changed>` Emitted when the :ref:`TileSet<class_TileSet>` of this TileMap changes. @@ -188,7 +209,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **VisibilityMode**: +enum **VisibilityMode**: :ref:`🔗<enum_TileMap_VisibilityMode>` .. _class_TileMap_constant_VISIBILITY_MODE_DEFAULT: @@ -223,71 +244,75 @@ Always show. Property Descriptions --------------------- -.. _class_TileMap_property_cell_quadrant_size: +.. _class_TileMap_property_collision_animatable: .. rst-class:: classref-property -:ref:`int<class_int>` **cell_quadrant_size** = ``16`` +:ref:`bool<class_bool>` **collision_animatable** = ``false`` :ref:`🔗<class_TileMap_property_collision_animatable>` .. rst-class:: classref-property-setget -- void **set_quadrant_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_quadrant_size** **(** **)** +- |void| **set_collision_animatable**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collision_animatable**\ (\ ) + +If enabled, the TileMap will see its collisions synced to the physics tick and change its collision type from static to kinematic. This is required to create TileMap-based moving platform. -The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. +\ **Note:** Enabling :ref:`collision_animatable<class_TileMap_property_collision_animatable>` may have a small performance impact, only do it if the TileMap is moving and has colliding tiles. .. rst-class:: classref-item-separator ---- -.. _class_TileMap_property_collision_animatable: +.. _class_TileMap_property_collision_visibility_mode: .. rst-class:: classref-property -:ref:`bool<class_bool>` **collision_animatable** = ``false`` +:ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **collision_visibility_mode** = ``0`` :ref:`🔗<class_TileMap_property_collision_visibility_mode>` .. rst-class:: classref-property-setget -- void **set_collision_animatable** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collision_animatable** **(** **)** - -If enabled, the TileMap will see its collisions synced to the physics tick and change its collision type from static to kinematic. This is required to create TileMap-based moving platform. +- |void| **set_collision_visibility_mode**\ (\ value\: :ref:`VisibilityMode<enum_TileMap_VisibilityMode>`\ ) +- :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **get_collision_visibility_mode**\ (\ ) -\ **Note:** Enabling :ref:`collision_animatable<class_TileMap_property_collision_animatable>` may have a small performance impact, only do it if the TileMap is moving and has colliding tiles. +Show or hide the TileMap's collision shapes. If set to :ref:`VISIBILITY_MODE_DEFAULT<class_TileMap_constant_VISIBILITY_MODE_DEFAULT>`, this depends on the show collision debug settings. .. rst-class:: classref-item-separator ---- -.. _class_TileMap_property_collision_visibility_mode: +.. _class_TileMap_property_navigation_visibility_mode: .. rst-class:: classref-property -:ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **collision_visibility_mode** = ``0`` +:ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **navigation_visibility_mode** = ``0`` :ref:`🔗<class_TileMap_property_navigation_visibility_mode>` .. rst-class:: classref-property-setget -- void **set_collision_visibility_mode** **(** :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` value **)** -- :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **get_collision_visibility_mode** **(** **)** +- |void| **set_navigation_visibility_mode**\ (\ value\: :ref:`VisibilityMode<enum_TileMap_VisibilityMode>`\ ) +- :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **get_navigation_visibility_mode**\ (\ ) -Show or hide the TileMap's collision shapes. If set to :ref:`VISIBILITY_MODE_DEFAULT<class_TileMap_constant_VISIBILITY_MODE_DEFAULT>`, this depends on the show collision debug settings. +Show or hide the TileMap's navigation meshes. If set to :ref:`VISIBILITY_MODE_DEFAULT<class_TileMap_constant_VISIBILITY_MODE_DEFAULT>`, this depends on the show navigation debug settings. .. rst-class:: classref-item-separator ---- -.. _class_TileMap_property_navigation_visibility_mode: +.. _class_TileMap_property_rendering_quadrant_size: .. rst-class:: classref-property -:ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **navigation_visibility_mode** = ``0`` +:ref:`int<class_int>` **rendering_quadrant_size** = ``16`` :ref:`🔗<class_TileMap_property_rendering_quadrant_size>` .. rst-class:: classref-property-setget -- void **set_navigation_visibility_mode** **(** :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` value **)** -- :ref:`VisibilityMode<enum_TileMap_VisibilityMode>` **get_navigation_visibility_mode** **(** **)** +- |void| **set_rendering_quadrant_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_rendering_quadrant_size**\ (\ ) -Show or hide the TileMap's navigation meshes. If set to :ref:`VISIBILITY_MODE_DEFAULT<class_TileMap_constant_VISIBILITY_MODE_DEFAULT>`, this depends on the show navigation debug settings. +The TileMap's quadrant size. A quadrant is a group of tiles to be drawn together on a single canvas item, for optimization purposes. :ref:`rendering_quadrant_size<class_TileMap_property_rendering_quadrant_size>` defines the length of a square's side, in the map's coordinate system, that forms the quadrant. Thus, the default quadrant size groups together ``16 * 16 = 256`` tiles. + +The quadrant size does not apply on Y-sorted layers, as tiles are grouped by Y position instead in that case. + +\ **Note:** As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the TileMap's local coordinate system. .. rst-class:: classref-item-separator @@ -297,14 +322,14 @@ Show or hide the TileMap's navigation meshes. If set to :ref:`VISIBILITY_MODE_DE .. rst-class:: classref-property -:ref:`TileSet<class_TileSet>` **tile_set** +:ref:`TileSet<class_TileSet>` **tile_set** :ref:`🔗<class_TileMap_property_tile_set>` .. rst-class:: classref-property-setget -- void **set_tileset** **(** :ref:`TileSet<class_TileSet>` value **)** -- :ref:`TileSet<class_TileSet>` **get_tileset** **(** **)** +- |void| **set_tileset**\ (\ value\: :ref:`TileSet<class_TileSet>`\ ) +- :ref:`TileSet<class_TileSet>` **get_tileset**\ (\ ) -The assigned :ref:`TileSet<class_TileSet>`. +The :ref:`TileSet<class_TileSet>` used by this **TileMap**. The textures, collisions, and additional behavior of all available tiles are stored here. .. rst-class:: classref-section-separator @@ -315,34 +340,36 @@ The assigned :ref:`TileSet<class_TileSet>`. Method Descriptions ------------------- -.. _class_TileMap_method__tile_data_runtime_update: +.. _class_TileMap_private_method__tile_data_runtime_update: .. rst-class:: classref-method -void **_tile_data_runtime_update** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`TileData<class_TileData>` tile_data **)** |virtual| +|void| **_tile_data_runtime_update**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, tile_data\: :ref:`TileData<class_TileData>`\ ) |virtual| :ref:`🔗<class_TileMap_private_method__tile_data_runtime_update>` Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime. -This method is only called if :ref:`_use_tile_data_runtime_update<class_TileMap_method__use_tile_data_runtime_update>` is implemented and returns ``true`` for the given tile ``coords`` and ``layer``. +This method is only called if :ref:`_use_tile_data_runtime_update<class_TileMap_private_method__use_tile_data_runtime_update>` is implemented and returns ``true`` for the given tile ``coords`` and ``layer``. \ **Warning:** The ``tile_data`` object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. -\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`force_update<class_TileMap_method_force_update>` to trigger a TileMap update. +\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update<class_TileMap_method_notify_runtime_tile_data_update>` to notify the TileMap it needs an update. .. rst-class:: classref-item-separator ---- -.. _class_TileMap_method__use_tile_data_runtime_update: +.. _class_TileMap_private_method__use_tile_data_runtime_update: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_use_tile_data_runtime_update** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords **)** |virtual| +:ref:`bool<class_bool>` **_use_tile_data_runtime_update**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TileMap_private_method__use_tile_data_runtime_update>` Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` requires a runtime update. \ **Warning:** Make sure this function only return ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. +\ **Note:** If the result of this function should changed, use :ref:`notify_runtime_tile_data_update<class_TileMap_method_notify_runtime_tile_data_update>` to notify the TileMap it needs an update. + .. rst-class:: classref-item-separator ---- @@ -351,7 +378,7 @@ Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` .. rst-class:: classref-method -void **add_layer** **(** :ref:`int<class_int>` to_position **)** +|void| **add_layer**\ (\ to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_add_layer>` Adds a layer at the given position ``to_position`` in the array. If ``to_position`` is negative, the position is counted from the end, with ``-1`` adding the layer at the end of the array. @@ -363,7 +390,7 @@ Adds a layer at the given position ``to_position`` in the array. If ``to_positio .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_TileMap_method_clear>` Clears all cells. @@ -375,10 +402,12 @@ Clears all cells. .. rst-class:: classref-method -void **clear_layer** **(** :ref:`int<class_int>` layer **)** +|void| **clear_layer**\ (\ layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_clear_layer>` Clears all cells on the given layer. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -387,10 +416,12 @@ Clears all cells on the given layer. .. rst-class:: classref-method -void **erase_cell** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords **)** +|void| **erase_cell**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileMap_method_erase_cell>` Erases the cell on layer ``layer`` at coordinates ``coords``. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -399,7 +430,7 @@ Erases the cell on layer ``layer`` at coordinates ``coords``. .. rst-class:: classref-method -void **fix_invalid_tiles** **(** **)** +|void| **fix_invalid_tiles**\ (\ ) :ref:`🔗<class_TileMap_method_fix_invalid_tiles>` Clears cells that do not exist in the tileset. @@ -411,13 +442,11 @@ Clears cells that do not exist in the tileset. .. rst-class:: classref-method -void **force_update** **(** :ref:`int<class_int>` layer=-1 **)** - -Triggers an update of the TileMap. If ``layer`` is provided, only updates the given layer. +|void| **force_update**\ (\ layer\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileMap_method_force_update>` -\ **Note:** The TileMap node updates automatically when one of its properties is modified. A manual update is only needed if runtime modifications (implemented in :ref:`_tile_data_runtime_update<class_TileMap_method__tile_data_runtime_update>`) need to be applied. +**Deprecated:** Use :ref:`notify_runtime_tile_data_update<class_TileMap_method_notify_runtime_tile_data_update>` and/or :ref:`update_internals<class_TileMap_method_update_internals>` instead. -\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and the tiles they impact (by placing frequently updated tiles in a dedicated layer for example). +Forces the TileMap and the layer ``layer`` to update. .. rst-class:: classref-item-separator @@ -427,9 +456,13 @@ Triggers an update of the TileMap. If ``layer`` is provided, only updates the gi .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_alternative_tile** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| +:ref:`int<class_int>` **get_cell_alternative_tile**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileMap_method_get_cell_alternative_tile>` -Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. +Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. + +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. + +If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-item-separator @@ -439,9 +472,13 @@ Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_cell_atlas_coords** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_cell_atlas_coords**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileMap_method_get_cell_atlas_coords>` -Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. +Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. Returns ``Vector2i(-1, -1)`` if the cell does not exist. + +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw atlas coordinate identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. + +If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-item-separator @@ -451,11 +488,13 @@ Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordina .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_source_id** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| +:ref:`int<class_int>` **get_cell_source_id**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileMap_method_get_cell_source_id>` Returns the tile source ID of the cell on layer ``layer`` at coordinates ``coords``. Returns ``-1`` if the cell does not exist. -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw source identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. + +If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-item-separator @@ -465,11 +504,11 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s til .. rst-class:: classref-method -:ref:`TileData<class_TileData>` **get_cell_tile_data** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` use_proxies=false **)** |const| +:ref:`TileData<class_TileData>` **get_cell_tile_data**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, use_proxies\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_TileMap_method_get_cell_tile_data>` Returns the :ref:`TileData<class_TileData>` object associated with the given cell, or ``null`` if the cell does not exist or is not a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`. -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. +If ``layer`` is negative, the layers are accessed from the last one. :: @@ -481,6 +520,8 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s til else: return 0 +If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s tile proxies. See :ref:`TileSet.map_tile_proxy<class_TileSet_method_map_tile_proxy>`. + .. rst-class:: classref-item-separator ---- @@ -489,7 +530,7 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet<class_TileSet>`'s til .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_coords_for_body_rid** **(** :ref:`RID<class_RID>` body **)** +:ref:`Vector2i<class_Vector2i>` **get_coords_for_body_rid**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TileMap_method_get_coords_for_body_rid>` Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid<class_KinematicCollision2D_method_get_collider_rid>`, when colliding with a tile. @@ -501,7 +542,7 @@ Returns the coordinates of the tile for given physics body RID. Such RID can be .. rst-class:: classref-method -:ref:`int<class_int>` **get_layer_for_body_rid** **(** :ref:`RID<class_RID>` body **)** +:ref:`int<class_int>` **get_layer_for_body_rid**\ (\ body\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TileMap_method_get_layer_for_body_rid>` Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from :ref:`KinematicCollision2D.get_collider_rid<class_KinematicCollision2D_method_get_collider_rid>`, when colliding with a tile. @@ -513,10 +554,12 @@ Returns the tilemap layer of the tile for given physics body RID. Such RID can b .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_layer_modulate** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`Color<class_Color>` **get_layer_modulate**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_layer_modulate>` Returns a TileMap layer's modulate. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -525,10 +568,30 @@ Returns a TileMap layer's modulate. .. rst-class:: classref-method -:ref:`String<class_String>` **get_layer_name** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`String<class_String>` **get_layer_name**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_layer_name>` Returns a TileMap layer's name. +If ``layer`` is negative, the layers are accessed from the last one. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_get_layer_navigation_map: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_layer_navigation_map**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_layer_navigation_map>` + +Returns the :ref:`RID<class_RID>` of the :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map assigned to the specified TileMap layer ``layer``. + +By default the TileMap uses the default :ref:`World2D<class_World2D>` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. + +In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` with the navigation map received from :ref:`get_layer_navigation_map<class_TileMap_method_get_layer_navigation_map>`. + +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -537,10 +600,12 @@ Returns a TileMap layer's name. .. rst-class:: classref-method -:ref:`int<class_int>` **get_layer_y_sort_origin** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`int<class_int>` **get_layer_y_sort_origin**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_layer_y_sort_origin>` Returns a TileMap layer's Y sort origin. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -549,10 +614,12 @@ Returns a TileMap layer's Y sort origin. .. rst-class:: classref-method -:ref:`int<class_int>` **get_layer_z_index** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`int<class_int>` **get_layer_z_index**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_layer_z_index>` Returns a TileMap layer's Z-index value. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -561,7 +628,7 @@ Returns a TileMap layer's Z-index value. .. rst-class:: classref-method -:ref:`int<class_int>` **get_layers_count** **(** **)** |const| +:ref:`int<class_int>` **get_layers_count**\ (\ ) |const| :ref:`🔗<class_TileMap_method_get_layers_count>` Returns the number of layers in the TileMap. @@ -573,13 +640,11 @@ Returns the number of layers in the TileMap. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_navigation_map** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`RID<class_RID>` **get_navigation_map**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_navigation_map>` -Returns the :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map :ref:`RID<class_RID>` currently assigned to the specified TileMap ``layer``. - -By default the TileMap uses the default :ref:`World2D<class_World2D>` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. +**Deprecated:** Use :ref:`get_layer_navigation_map<class_TileMap_method_get_layer_navigation_map>` instead. -In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` with the navigation map received from :ref:`get_navigation_map<class_TileMap_method_get_navigation_map>`. +Returns the :ref:`RID<class_RID>` of the :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map assigned to the specified TileMap layer ``layer``. .. rst-class:: classref-item-separator @@ -589,7 +654,7 @@ In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch betwee .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_neighbor_cell** **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` neighbor **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_neighbor_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, neighbor\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| :ref:`🔗<class_TileMap_method_get_neighbor_cell>` Returns the neighboring cell to the one at coordinates ``coords``, identified by the ``neighbor`` direction. This method takes into account the different layouts a TileMap can take. @@ -601,10 +666,12 @@ Returns the neighboring cell to the one at coordinates ``coords``, identified by .. rst-class:: classref-method -:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern** **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` coords_array **)** +:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern**\ (\ layer\: :ref:`int<class_int>`, coords_array\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\]\ ) :ref:`🔗<class_TileMap_method_get_pattern>` Creates a new :ref:`TileMapPattern<class_TileMapPattern>` from the given layer and set of cells. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -613,7 +680,7 @@ Creates a new :ref:`TileMapPattern<class_TileMapPattern>` from the given layer a .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_surrounding_cells** **(** :ref:`Vector2i<class_Vector2i>` coords **)** +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_surrounding_cells**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileMap_method_get_surrounding_cells>` Returns the list of all neighbourings cells to the one at ``coords``. @@ -625,10 +692,12 @@ Returns the list of all neighbourings cells to the one at ``coords``. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_used_cells** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_used_cells**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_get_used_cells>` Returns a :ref:`Vector2i<class_Vector2i>` array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -637,14 +706,16 @@ Returns a :ref:`Vector2i<class_Vector2i>` array with the positions of all cells .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_used_cells_by_id** **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=-1 **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_used_cells_by_id**\ (\ layer\: :ref:`int<class_int>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TileMap_method_get_used_cells_by_id>` Returns a :ref:`Vector2i<class_Vector2i>` array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source (``source_id``), their atlas coordinates (``atlas_coords``) or alternative id (``alternative_tile``). -If a parameter has it's value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as :ref:`get_used_cells<class_TileMap_method_get_used_cells>`. +If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as :ref:`get_used_cells<class_TileMap_method_get_used_cells>`. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -653,7 +724,7 @@ A cell is considered empty if its source identifier equals -1, its atlas coordin .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **get_used_rect** **(** **)** +:ref:`Rect2i<class_Rect2i>` **get_used_rect**\ (\ ) |const| :ref:`🔗<class_TileMap_method_get_used_rect>` Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers. @@ -665,10 +736,24 @@ Returns a rectangle enclosing the used (non-empty) tiles of the map, including a .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_layer_enabled** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`bool<class_bool>` **is_layer_enabled**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_is_layer_enabled>` Returns if a layer is enabled. +If ``layer`` is negative, the layers are accessed from the last one. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_is_layer_navigation_enabled: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_layer_navigation_enabled**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_is_layer_navigation_enabled>` + +Returns if a layer's built-in navigation regions generation is enabled. + .. rst-class:: classref-item-separator ---- @@ -677,10 +762,12 @@ Returns if a layer is enabled. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_layer_y_sort_enabled** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`bool<class_bool>` **is_layer_y_sort_enabled**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileMap_method_is_layer_y_sort_enabled>` Returns if a layer Y-sorts its tiles. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -689,7 +776,7 @@ Returns if a layer Y-sorts its tiles. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **local_to_map** **(** :ref:`Vector2<class_Vector2>` local_position **)** |const| +:ref:`Vector2i<class_Vector2i>` **local_to_map**\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TileMap_method_local_to_map>` Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node2D.to_local<class_Node2D_method_to_local>` before passing it to this method. See also :ref:`map_to_local<class_TileMap_method_map_to_local>`. @@ -701,7 +788,7 @@ Returns the map coordinates of the cell containing the given ``local_position``. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **map_pattern** **(** :ref:`Vector2i<class_Vector2i>` position_in_tilemap, :ref:`Vector2i<class_Vector2i>` coords_in_pattern, :ref:`TileMapPattern<class_TileMapPattern>` pattern **)** +:ref:`Vector2i<class_Vector2i>` **map_pattern**\ (\ position_in_tilemap\: :ref:`Vector2i<class_Vector2i>`, coords_in_pattern\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) :ref:`🔗<class_TileMap_method_map_pattern>` Returns for the given coordinate ``coords_in_pattern`` in a :ref:`TileMapPattern<class_TileMapPattern>` the corresponding cell coordinates if the pattern was pasted at the ``position_in_tilemap`` coordinates (see :ref:`set_pattern<class_TileMap_method_set_pattern>`). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating ``position_in_tile_map + coords_in_pattern``. @@ -713,7 +800,7 @@ Returns for the given coordinate ``coords_in_pattern`` in a :ref:`TileMapPattern .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **map_to_local** **(** :ref:`Vector2i<class_Vector2i>` map_position **)** |const| +:ref:`Vector2<class_Vector2>` **map_to_local**\ (\ map_position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMap_method_map_to_local>` Returns the centered position of a cell in the TileMap's local coordinate space. To convert the returned value into global coordinates, use :ref:`Node2D.to_global<class_Node2D_method_to_global>`. See also :ref:`local_to_map<class_TileMap_method_local_to_map>`. @@ -727,7 +814,7 @@ Returns the centered position of a cell in the TileMap's local coordinate space. .. rst-class:: classref-method -void **move_layer** **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` to_position **)** +|void| **move_layer**\ (\ layer\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_move_layer>` Moves the layer at index ``layer`` to the given position ``to_position`` in the array. @@ -735,11 +822,29 @@ Moves the layer at index ``layer`` to the given position ``to_position`` in the ---- +.. _class_TileMap_method_notify_runtime_tile_data_update: + +.. rst-class:: classref-method + +|void| **notify_runtime_tile_data_update**\ (\ layer\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileMap_method_notify_runtime_tile_data_update>` + +Notifies the TileMap node that calls to :ref:`_use_tile_data_runtime_update<class_TileMap_private_method__use_tile_data_runtime_update>` or :ref:`_tile_data_runtime_update<class_TileMap_private_method__tile_data_runtime_update>` will lead to different results. This will thus trigger a TileMap update. + +If ``layer`` is provided, only notifies changes for the given layer. Providing the ``layer`` argument (when applicable) is usually preferred for performance reasons. + +\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. + +\ **Note:** This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals<class_TileMap_method_update_internals>`). + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_method_remove_layer: .. rst-class:: classref-method -void **remove_layer** **(** :ref:`int<class_int>` layer **)** +|void| **remove_layer**\ (\ layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_remove_layer>` Removes the layer at index ``layer``. @@ -751,9 +856,9 @@ Removes the layer at index ``layer``. .. rst-class:: classref-method -void **set_cell** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` coords, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=0 **)** +|void| **set_cell**\ (\ layer\: :ref:`int<class_int>`, coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TileMap_method_set_cell>` -Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet<class_TileSet>` is identified using three parts: +Sets the tile identifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet<class_TileSet>` is identified using three parts: - The source identifier ``source_id`` identifies a :ref:`TileSetSource<class_TileSetSource>` identifier. See :ref:`TileSet.set_source_id<class_TileSet_method_set_source_id>`, @@ -763,6 +868,8 @@ Sets the tile indentifiers for the cell on layer ``layer`` at coordinates ``coor If ``source_id`` is set to ``-1``, ``atlas_coords`` to ``Vector2i(-1, -1)`` or ``alternative_tile`` to ``-1``, the cell will be erased. An erased cell gets **all** its identifiers automatically set to their respective invalid values, namely ``-1``, ``Vector2i(-1, -1)`` and ``-1``. +If ``layer`` is negative, the layers are accessed from the last one. + .. rst-class:: classref-item-separator ---- @@ -771,12 +878,14 @@ If ``source_id`` is set to ``-1``, ``atlas_coords`` to ``Vector2i(-1, -1)`` or ` .. rst-class:: classref-method -void **set_cells_terrain_connect** **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` cells, :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain, :ref:`bool<class_bool>` ignore_empty_terrains=true **)** +|void| **set_cells_terrain_connect**\ (\ layer\: :ref:`int<class_int>`, cells\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TileMap_method_set_cells_terrain_connect>` Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. +If ``layer`` is negative, the layers are accessed from the last one. + \ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. .. rst-class:: classref-item-separator @@ -787,12 +896,14 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying .. rst-class:: classref-method -void **set_cells_terrain_path** **(** :ref:`int<class_int>` layer, :ref:`Vector2i[]<class_Vector2i>` path, :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain, :ref:`bool<class_bool>` ignore_empty_terrains=true **)** +|void| **set_cells_terrain_path**\ (\ layer\: :ref:`int<class_int>`, path\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TileMap_method_set_cells_terrain_path>` Update all the cells in the ``path`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. +If ``layer`` is negative, the layers are accessed from the last one. + \ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. .. rst-class:: classref-item-separator @@ -803,9 +914,9 @@ If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying .. rst-class:: classref-method -void **set_layer_enabled** **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enabled **)** +|void| **set_layer_enabled**\ (\ layer\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileMap_method_set_layer_enabled>` -Enables or disables the layer ``layer``. A disabled layer is not processed at all (no rendering, no physics, etc...). +Enables or disables the layer ``layer``. A disabled layer is not processed at all (no rendering, no physics, etc.). If ``layer`` is negative, the layers are accessed from the last one. @@ -817,7 +928,7 @@ If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-method -void **set_layer_modulate** **(** :ref:`int<class_int>` layer, :ref:`Color<class_Color>` modulate **)** +|void| **set_layer_modulate**\ (\ layer\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TileMap_method_set_layer_modulate>` Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate. @@ -831,7 +942,7 @@ If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-method -void **set_layer_name** **(** :ref:`int<class_int>` layer, :ref:`String<class_String>` name **)** +|void| **set_layer_name**\ (\ layer\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TileMap_method_set_layer_name>` Sets a layer's name. This is mostly useful in the editor. @@ -841,11 +952,41 @@ If ``layer`` is negative, the layers are accessed from the last one. ---- +.. _class_TileMap_method_set_layer_navigation_enabled: + +.. rst-class:: classref-method + +|void| **set_layer_navigation_enabled**\ (\ layer\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileMap_method_set_layer_navigation_enabled>` + +Enables or disables a layer's built-in navigation regions generation. Disable this if you need to bake navigation regions from a TileMap using a :ref:`NavigationRegion2D<class_NavigationRegion2D>` node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_set_layer_navigation_map: + +.. rst-class:: classref-method + +|void| **set_layer_navigation_map**\ (\ layer\: :ref:`int<class_int>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TileMap_method_set_layer_navigation_map>` + +Assigns ``map`` as a :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map for the specified TileMap layer ``layer``. + +By default the TileMap uses the default :ref:`World2D<class_World2D>` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. + +In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` with the navigation map received from :ref:`get_layer_navigation_map<class_TileMap_method_get_layer_navigation_map>`. + +If ``layer`` is negative, the layers are accessed from the last one. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_method_set_layer_y_sort_enabled: .. rst-class:: classref-method -void **set_layer_y_sort_enabled** **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` y_sort_enabled **)** +|void| **set_layer_y_sort_enabled**\ (\ layer\: :ref:`int<class_int>`, y_sort_enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileMap_method_set_layer_y_sort_enabled>` Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted. @@ -861,7 +1002,7 @@ If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-method -void **set_layer_y_sort_origin** **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` y_sort_origin **)** +|void| **set_layer_y_sort_origin**\ (\ layer\: :ref:`int<class_int>`, y_sort_origin\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_set_layer_y_sort_origin>` Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value. @@ -877,7 +1018,7 @@ If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-method -void **set_layer_z_index** **(** :ref:`int<class_int>` layer, :ref:`int<class_int>` z_index **)** +|void| **set_layer_z_index**\ (\ layer\: :ref:`int<class_int>`, z_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileMap_method_set_layer_z_index>` Sets a layers Z-index value. This Z-index is added to each tile's Z-index value. @@ -891,13 +1032,11 @@ If ``layer`` is negative, the layers are accessed from the last one. .. rst-class:: classref-method -void **set_navigation_map** **(** :ref:`int<class_int>` layer, :ref:`RID<class_RID>` map **)** +|void| **set_navigation_map**\ (\ layer\: :ref:`int<class_int>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TileMap_method_set_navigation_map>` -Assigns a :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map :ref:`RID<class_RID>` to the specified TileMap ``layer``. +**Deprecated:** Use :ref:`set_layer_navigation_map<class_TileMap_method_set_layer_navigation_map>` instead. -By default the TileMap uses the default :ref:`World2D<class_World2D>` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. - -In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` with the navigation map received from :ref:`get_navigation_map<class_TileMap_method_get_navigation_map>`. +Assigns ``map`` as a :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map for the specified TileMap layer ``layer``. .. rst-class:: classref-item-separator @@ -907,10 +1046,28 @@ In order to make :ref:`NavigationAgent2D<class_NavigationAgent2D>` switch betwee .. rst-class:: classref-method -void **set_pattern** **(** :ref:`int<class_int>` layer, :ref:`Vector2i<class_Vector2i>` position, :ref:`TileMapPattern<class_TileMapPattern>` pattern **)** +|void| **set_pattern**\ (\ layer\: :ref:`int<class_int>`, position\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) :ref:`🔗<class_TileMap_method_set_pattern>` Paste the given :ref:`TileMapPattern<class_TileMapPattern>` at the given ``position`` and ``layer`` in the tile map. +If ``layer`` is negative, the layers are accessed from the last one. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_update_internals: + +.. rst-class:: classref-method + +|void| **update_internals**\ (\ ) :ref:`🔗<class_TileMap_method_update_internals>` + +Triggers a direct update of the TileMap. Usually, calling this function is not needed, as TileMap node updates automatically when one of its properties or cells is modified. + +However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the TileMap to update right away instead. + +\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -918,3 +1075,4 @@ Paste the given :ref:`TileMapPattern<class_TileMapPattern>` at the given ``posit .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilemaplayer.rst b/classes/class_tilemaplayer.rst new file mode 100644 index 00000000000..62145b9fa45 --- /dev/null +++ b/classes/class_tilemaplayer.rst @@ -0,0 +1,782 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/TileMapLayer.xml. + +.. _class_TileMapLayer: + +TileMapLayer +============ + +**Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` + +Node for 2D tile-based maps. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Node for 2D tile-based maps. A **TileMapLayer** uses a :ref:`TileSet<class_TileSet>` which contain a list of tiles which are used to create grid-based maps. Unlike the :ref:`TileMap<class_TileMap>` node, which is deprecated, **TileMapLayer** has only one layer of tiles. You can use several **TileMapLayer** to achieve the same result as a :ref:`TileMap<class_TileMap>` node. + +For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>` may be initialized after their parent. This is only queued when inside the scene tree. + +To force an update earlier on, call :ref:`update_internals<class_TileMapLayer_method_update_internals>`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`collision_enabled<class_TileMapLayer_property_collision_enabled>` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` | :ref:`collision_visibility_mode<class_TileMapLayer_property_collision_visibility_mode>` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`enabled<class_TileMapLayer_property_enabled>` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`navigation_enabled<class_TileMapLayer_property_navigation_enabled>` | ``true`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` | :ref:`navigation_visibility_mode<class_TileMapLayer_property_navigation_visibility_mode>` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int<class_int>` | :ref:`rendering_quadrant_size<class_TileMapLayer_property_rendering_quadrant_size>` | ``16`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`tile_map_data<class_TileMapLayer_property_tile_map_data>` | ``PackedByteArray()`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`TileSet<class_TileSet>` | :ref:`tile_set<class_TileMapLayer_property_tile_set>` | | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`use_kinematic_bodies<class_TileMapLayer_property_use_kinematic_bodies>` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool<class_bool>` | :ref:`x_draw_order_reversed<class_TileMapLayer_property_x_draw_order_reversed>` | ``false`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int<class_int>` | :ref:`y_sort_origin<class_TileMapLayer_property_y_sort_origin>` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------+-----------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tile_data_runtime_update<class_TileMapLayer_private_method__tile_data_runtime_update>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, tile_data\: :ref:`TileData<class_TileData>`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_use_tile_data_runtime_update<class_TileMapLayer_private_method__use_tile_data_runtime_update>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TileMapLayer_method_clear>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_cell<class_TileMapLayer_method_erase_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`fix_invalid_tiles<class_TileMapLayer_method_fix_invalid_tiles>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_alternative_tile<class_TileMapLayer_method_get_cell_alternative_tile>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_cell_atlas_coords<class_TileMapLayer_method_get_cell_atlas_coords>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_source_id<class_TileMapLayer_method_get_cell_source_id>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData<class_TileData>` | :ref:`get_cell_tile_data<class_TileMapLayer_method_get_cell_tile_data>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_coords_for_body_rid<class_TileMapLayer_method_get_coords_for_body_rid>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_TileMapLayer_method_get_navigation_map>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_neighbor_cell<class_TileMapLayer_method_get_neighbor_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, neighbor\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileMapLayer_method_get_pattern>`\ (\ coords_array\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\]\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_surrounding_cells<class_TileMapLayer_method_get_surrounding_cells>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_used_cells<class_TileMapLayer_method_get_used_cells>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_used_cells_by_id<class_TileMapLayer_method_get_used_cells_by_id>`\ (\ source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_used_rect<class_TileMapLayer_method_get_used_rect>`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_body_rid<class_TileMapLayer_method_has_body_rid>`\ (\ body\: :ref:`RID<class_RID>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`local_to_map<class_TileMapLayer_method_local_to_map>`\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`map_pattern<class_TileMapLayer_method_map_pattern>`\ (\ position_in_tilemap\: :ref:`Vector2i<class_Vector2i>`, coords_in_pattern\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`map_to_local<class_TileMapLayer_method_map_to_local>`\ (\ map_position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`notify_runtime_tile_data_update<class_TileMapLayer_method_notify_runtime_tile_data_update>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell<class_TileMapLayer_method_set_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = 0\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_connect<class_TileMapLayer_method_set_cells_terrain_connect>`\ (\ cells\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cells_terrain_path<class_TileMapLayer_method_set_cells_terrain_path>`\ (\ path\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_map<class_TileMapLayer_method_set_navigation_map>`\ (\ map\: :ref:`RID<class_RID>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pattern<class_TileMapLayer_method_set_pattern>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_internals<class_TileMapLayer_method_update_internals>`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_TileMapLayer_signal_changed: + +.. rst-class:: classref-signal + +**changed**\ (\ ) :ref:`🔗<class_TileMapLayer_signal_changed>` + +Emitted when this **TileMapLayer**'s properties changes. This includes modified cells, properties, or changes made to its assigned :ref:`TileSet<class_TileSet>`. + +\ **Note:** This signal may be emitted very often when batch-modifying a **TileMapLayer**. Avoid executing complex processing in a connected function, and consider delaying it to the end of the frame instead (i.e. calling :ref:`Object.call_deferred<class_Object_method_call_deferred>`). + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_TileMapLayer_DebugVisibilityMode: + +.. rst-class:: classref-enumeration + +enum **DebugVisibilityMode**: :ref:`🔗<enum_TileMapLayer_DebugVisibilityMode>` + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **DEBUG_VISIBILITY_MODE_DEFAULT** = ``0`` + +Hide the collisions or navigation debug shapes in the editor, and use the debug settings to determine their visibility in game (i.e. :ref:`SceneTree.debug_collisions_hint<class_SceneTree_property_debug_collisions_hint>` or :ref:`SceneTree.debug_navigation_hint<class_SceneTree_property_debug_navigation_hint>`). + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_FORCE_HIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **DEBUG_VISIBILITY_MODE_FORCE_HIDE** = ``2`` + +Always hide the collisions or navigation debug shapes. + +.. _class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_FORCE_SHOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **DEBUG_VISIBILITY_MODE_FORCE_SHOW** = ``1`` + +Always show the collisions or navigation debug shapes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_TileMapLayer_property_collision_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **collision_enabled** = ``true`` :ref:`🔗<class_TileMapLayer_property_collision_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collision_enabled**\ (\ ) + +Enable or disable collisions. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_collision_visibility_mode: + +.. rst-class:: classref-property + +:ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **collision_visibility_mode** = ``0`` :ref:`🔗<class_TileMapLayer_property_collision_visibility_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_collision_visibility_mode**\ (\ value\: :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>`\ ) +- :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **get_collision_visibility_mode**\ (\ ) + +Show or hide the **TileMapLayer**'s collision shapes. If set to :ref:`DEBUG_VISIBILITY_MODE_DEFAULT<class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_DEFAULT>`, this depends on the show collision debug settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **enabled** = ``true`` :ref:`🔗<class_TileMapLayer_property_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_enabled**\ (\ ) + +If ``false``, disables this **TileMapLayer** completely (rendering, collision, navigation, scene tiles, etc.) + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_navigation_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **navigation_enabled** = ``true`` :ref:`🔗<class_TileMapLayer_property_navigation_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_navigation_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_navigation_enabled**\ (\ ) + +If ``true``, navigation regions are enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_navigation_visibility_mode: + +.. rst-class:: classref-property + +:ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **navigation_visibility_mode** = ``0`` :ref:`🔗<class_TileMapLayer_property_navigation_visibility_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_navigation_visibility_mode**\ (\ value\: :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>`\ ) +- :ref:`DebugVisibilityMode<enum_TileMapLayer_DebugVisibilityMode>` **get_navigation_visibility_mode**\ (\ ) + +Show or hide the **TileMapLayer**'s navigation meshes. If set to :ref:`DEBUG_VISIBILITY_MODE_DEFAULT<class_TileMapLayer_constant_DEBUG_VISIBILITY_MODE_DEFAULT>`, this depends on the show navigation debug settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_rendering_quadrant_size: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **rendering_quadrant_size** = ``16`` :ref:`🔗<class_TileMapLayer_property_rendering_quadrant_size>` + +.. rst-class:: classref-property-setget + +- |void| **set_rendering_quadrant_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_rendering_quadrant_size**\ (\ ) + +The **TileMapLayer**'s quadrant size. A quadrant is a group of tiles to be drawn together on a single canvas item, for optimization purposes. :ref:`rendering_quadrant_size<class_TileMapLayer_property_rendering_quadrant_size>` defines the length of a square's side, in the map's coordinate system, that forms the quadrant. Thus, the default quadrant size groups together ``16 * 16 = 256`` tiles. + +The quadrant size does not apply on a Y-sorted **TileMapLayer**, as tiles are grouped by Y position instead in that case. + +\ **Note:** As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the **TileMapLayer**'s local coordinate system. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_tile_map_data: + +.. rst-class:: classref-property + +:ref:`PackedByteArray<class_PackedByteArray>` **tile_map_data** = ``PackedByteArray()`` :ref:`🔗<class_TileMapLayer_property_tile_map_data>` + +.. rst-class:: classref-property-setget + +- |void| **set_tile_map_data_from_array**\ (\ value\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) +- :ref:`PackedByteArray<class_PackedByteArray>` **get_tile_map_data_as_array**\ (\ ) + +The raw tile map data as a byte array. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedByteArray<class_PackedByteArray>` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_tile_set: + +.. rst-class:: classref-property + +:ref:`TileSet<class_TileSet>` **tile_set** :ref:`🔗<class_TileMapLayer_property_tile_set>` + +.. rst-class:: classref-property-setget + +- |void| **set_tile_set**\ (\ value\: :ref:`TileSet<class_TileSet>`\ ) +- :ref:`TileSet<class_TileSet>` **get_tile_set**\ (\ ) + +The :ref:`TileSet<class_TileSet>` used by this layer. The textures, collisions, and additional behavior of all available tiles are stored here. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_use_kinematic_bodies: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **use_kinematic_bodies** = ``false`` :ref:`🔗<class_TileMapLayer_property_use_kinematic_bodies>` + +.. rst-class:: classref-property-setget + +- |void| **set_use_kinematic_bodies**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_kinematic_bodies**\ (\ ) + +If ``true``, this **TileMapLayer** collision shapes will be instantiated as kinematic bodies. This can be needed for moving **TileMapLayer** nodes (i.e. moving platforms). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_x_draw_order_reversed: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **x_draw_order_reversed** = ``false`` :ref:`🔗<class_TileMapLayer_property_x_draw_order_reversed>` + +.. rst-class:: classref-property-setget + +- |void| **set_x_draw_order_reversed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_x_draw_order_reversed**\ (\ ) + +If :ref:`CanvasItem.y_sort_enabled<class_CanvasItem_property_y_sort_enabled>` is enabled, setting this to ``true`` will reverse the order the tiles are drawn on the X-axis. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_property_y_sort_origin: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **y_sort_origin** = ``0`` :ref:`🔗<class_TileMapLayer_property_y_sort_origin>` + +.. rst-class:: classref-property-setget + +- |void| **set_y_sort_origin**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_y_sort_origin**\ (\ ) + +This Y-sort origin value is added to each tile's Y-sort origin value. This allows, for example, to fake a different height level. This can be useful for top-down view games. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_TileMapLayer_private_method__tile_data_runtime_update: + +.. rst-class:: classref-method + +|void| **_tile_data_runtime_update**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, tile_data\: :ref:`TileData<class_TileData>`\ ) |virtual| :ref:`🔗<class_TileMapLayer_private_method__tile_data_runtime_update>` + +Called with a :ref:`TileData<class_TileData>` object about to be used internally by the **TileMapLayer**, allowing its modification at runtime. + +This method is only called if :ref:`_use_tile_data_runtime_update<class_TileMapLayer_private_method__use_tile_data_runtime_update>` is implemented and returns ``true`` for the given tile ``coords``. + +\ **Warning:** The ``tile_data`` object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. + +\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update<class_TileMapLayer_method_notify_runtime_tile_data_update>` to notify the **TileMapLayer** it needs an update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_private_method__use_tile_data_runtime_update: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **_use_tile_data_runtime_update**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |virtual| :ref:`🔗<class_TileMapLayer_private_method__use_tile_data_runtime_update>` + +Should return ``true`` if the tile at coordinates ``coords`` requires a runtime update. + +\ **Warning:** Make sure this function only returns ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. + +\ **Note:** If the result of this function should change, use :ref:`notify_runtime_tile_data_update<class_TileMapLayer_method_notify_runtime_tile_data_update>` to notify the **TileMapLayer** it needs an update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_clear: + +.. rst-class:: classref-method + +|void| **clear**\ (\ ) :ref:`🔗<class_TileMapLayer_method_clear>` + +Clears all cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_erase_cell: + +.. rst-class:: classref-method + +|void| **erase_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileMapLayer_method_erase_cell>` + +Erases the cell at coordinates ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_fix_invalid_tiles: + +.. rst-class:: classref-method + +|void| **fix_invalid_tiles**\ (\ ) :ref:`🔗<class_TileMapLayer_method_fix_invalid_tiles>` + +Clears cells containing tiles that do not exist in the :ref:`tile_set<class_TileMapLayer_property_tile_set>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_alternative_tile: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_cell_alternative_tile**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_cell_alternative_tile>` + +Returns the tile alternative ID of the cell at coordinates ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_atlas_coords: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **get_cell_atlas_coords**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_cell_atlas_coords>` + +Returns the tile atlas coordinates ID of the cell at coordinates ``coords``. Returns ``Vector2i(-1, -1)`` if the cell does not exist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_source_id: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_cell_source_id**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_cell_source_id>` + +Returns the tile source ID of the cell at coordinates ``coords``. Returns ``-1`` if the cell does not exist. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_cell_tile_data: + +.. rst-class:: classref-method + +:ref:`TileData<class_TileData>` **get_cell_tile_data**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_cell_tile_data>` + +Returns the :ref:`TileData<class_TileData>` object associated with the given cell, or ``null`` if the cell does not exist or is not a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`. + +:: + + func get_clicked_tile_power(): + var clicked_cell = tile_map_layer.local_to_map(tile_map_layer.get_local_mouse_position()) + var data = tile_map_layer.get_cell_tile_data(clicked_cell) + if data: + return data.get_custom_data("power") + else: + return 0 + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_coords_for_body_rid: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **get_coords_for_body_rid**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_coords_for_body_rid>` + +Returns the coordinates of the tile for given physics body :ref:`RID<class_RID>`. Such an :ref:`RID<class_RID>` can be retrieved from :ref:`KinematicCollision2D.get_collider_rid<class_KinematicCollision2D_method_get_collider_rid>`, when colliding with a tile. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_navigation_map: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_navigation_map>` + +Returns the :ref:`RID<class_RID>` of the :ref:`NavigationServer2D<class_NavigationServer2D>` navigation used by this **TileMapLayer**. + +By default this returns the default :ref:`World2D<class_World2D>` navigation map, unless a custom map was provided using :ref:`set_navigation_map<class_TileMapLayer_method_set_navigation_map>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_neighbor_cell: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **get_neighbor_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, neighbor\: :ref:`CellNeighbor<enum_TileSet_CellNeighbor>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_neighbor_cell>` + +Returns the neighboring cell to the one at coordinates ``coords``, identified by the ``neighbor`` direction. This method takes into account the different layouts a TileMap can take. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_pattern: + +.. rst-class:: classref-method + +:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern**\ (\ coords_array\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\]\ ) :ref:`🔗<class_TileMapLayer_method_get_pattern>` + +Creates and returns a new :ref:`TileMapPattern<class_TileMapPattern>` from the given array of cells. See also :ref:`set_pattern<class_TileMapLayer_method_set_pattern>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_surrounding_cells: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_surrounding_cells**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileMapLayer_method_get_surrounding_cells>` + +Returns the list of all neighboring cells to the one at ``coords``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_cells: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_used_cells**\ (\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_used_cells>` + +Returns a :ref:`Vector2i<class_Vector2i>` array with the positions of all cells containing a tile. A cell is considered empty if its source identifier equals ``-1``, its atlas coordinate identifier is ``Vector2(-1, -1)`` and its alternative identifier is ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_cells_by_id: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_used_cells_by_id**\ (\ source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_used_cells_by_id>` + +Returns a :ref:`Vector2i<class_Vector2i>` array with the positions of all cells containing a tile. Tiles may be filtered according to their source (``source_id``), their atlas coordinates (``atlas_coords``), or alternative id (``alternative_tile``). + +If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default values, this method returns the same result as :ref:`get_used_cells<class_TileMapLayer_method_get_used_cells>`. + +A cell is considered empty if its source identifier equals ``-1``, its atlas coordinate identifier is ``Vector2(-1, -1)`` and its alternative identifier is ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_get_used_rect: + +.. rst-class:: classref-method + +:ref:`Rect2i<class_Rect2i>` **get_used_rect**\ (\ ) |const| :ref:`🔗<class_TileMapLayer_method_get_used_rect>` + +Returns a rectangle enclosing the used (non-empty) tiles of the map. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_has_body_rid: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_body_rid**\ (\ body\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_has_body_rid>` + +Returns whether the provided ``body`` :ref:`RID<class_RID>` belongs to one of this **TileMapLayer**'s cells. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_local_to_map: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **local_to_map**\ (\ local_position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_local_to_map>` + +Returns the map coordinates of the cell containing the given ``local_position``. If ``local_position`` is in global coordinates, consider using :ref:`Node2D.to_local<class_Node2D_method_to_local>` before passing it to this method. See also :ref:`map_to_local<class_TileMapLayer_method_map_to_local>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_map_pattern: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **map_pattern**\ (\ position_in_tilemap\: :ref:`Vector2i<class_Vector2i>`, coords_in_pattern\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) :ref:`🔗<class_TileMapLayer_method_map_pattern>` + +Returns for the given coordinates ``coords_in_pattern`` in a :ref:`TileMapPattern<class_TileMapPattern>` the corresponding cell coordinates if the pattern was pasted at the ``position_in_tilemap`` coordinates (see :ref:`set_pattern<class_TileMapLayer_method_set_pattern>`). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating ``position_in_tile_map + coords_in_pattern``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_map_to_local: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **map_to_local**\ (\ map_position\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapLayer_method_map_to_local>` + +Returns the centered position of a cell in the **TileMapLayer**'s local coordinate space. To convert the returned value into global coordinates, use :ref:`Node2D.to_global<class_Node2D_method_to_global>`. See also :ref:`local_to_map<class_TileMapLayer_method_local_to_map>`. + +\ **Note:** This may not correspond to the visual position of the tile, i.e. it ignores the :ref:`TileData.texture_origin<class_TileData_property_texture_origin>` property of individual tiles. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_notify_runtime_tile_data_update: + +.. rst-class:: classref-method + +|void| **notify_runtime_tile_data_update**\ (\ ) :ref:`🔗<class_TileMapLayer_method_notify_runtime_tile_data_update>` + +Notifies the **TileMapLayer** node that calls to :ref:`_use_tile_data_runtime_update<class_TileMapLayer_private_method__use_tile_data_runtime_update>` or :ref:`_tile_data_runtime_update<class_TileMapLayer_private_method__tile_data_runtime_update>` will lead to different results. This will thus trigger a **TileMapLayer** update. + +\ **Warning:** Updating the **TileMapLayer** is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. + +\ **Note:** This does not trigger a direct update of the **TileMapLayer**, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals<class_TileMapLayer_method_update_internals>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cell: + +.. rst-class:: classref-method + +|void| **set_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_TileMapLayer_method_set_cell>` + +Sets the tile identifiers for the cell at coordinates ``coords``. Each tile of the :ref:`TileSet<class_TileSet>` is identified using three parts: + +- The source identifier ``source_id`` identifies a :ref:`TileSetSource<class_TileSetSource>` identifier. See :ref:`TileSet.set_source_id<class_TileSet_method_set_source_id>`, + +- The atlas coordinate identifier ``atlas_coords`` identifies a tile coordinates in the atlas (if the source is a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`). For :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>` it should always be ``Vector2i(0, 0)``, + +- The alternative tile identifier ``alternative_tile`` identifies a tile alternative in the atlas (if the source is a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`), and the scene for a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>`. + +If ``source_id`` is set to ``-1``, ``atlas_coords`` to ``Vector2i(-1, -1)``, or ``alternative_tile`` to ``-1``, the cell will be erased. An erased cell gets **all** its identifiers automatically set to their respective invalid values, namely ``-1``, ``Vector2i(-1, -1)`` and ``-1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cells_terrain_connect: + +.. rst-class:: classref-method + +|void| **set_cells_terrain_connect**\ (\ cells\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TileMapLayer_method_set_cells_terrain_connect>` + +Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. + +If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. + +\ **Note:** To work correctly, this method requires the **TileMapLayer**'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_cells_terrain_path: + +.. rst-class:: classref-method + +|void| **set_cells_terrain_path**\ (\ path\: :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\], terrain_set\: :ref:`int<class_int>`, terrain\: :ref:`int<class_int>`, ignore_empty_terrains\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TileMapLayer_method_set_cells_terrain_path>` + +Update all the cells in the ``path`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. + +If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. + +\ **Note:** To work correctly, this method requires the **TileMapLayer**'s TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_navigation_map: + +.. rst-class:: classref-method + +|void| **set_navigation_map**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_TileMapLayer_method_set_navigation_map>` + +Sets a custom ``map`` as a :ref:`NavigationServer2D<class_NavigationServer2D>` navigation map. If not set, uses the default :ref:`World2D<class_World2D>` navigation map instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_set_pattern: + +.. rst-class:: classref-method + +|void| **set_pattern**\ (\ position\: :ref:`Vector2i<class_Vector2i>`, pattern\: :ref:`TileMapPattern<class_TileMapPattern>`\ ) :ref:`🔗<class_TileMapLayer_method_set_pattern>` + +Pastes the :ref:`TileMapPattern<class_TileMapPattern>` at the given ``position`` in the tile map. See also :ref:`get_pattern<class_TileMapLayer_method_get_pattern>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMapLayer_method_update_internals: + +.. rst-class:: classref-method + +|void| **update_internals**\ (\ ) :ref:`🔗<class_TileMapLayer_method_update_internals>` + +Triggers a direct update of the **TileMapLayer**. Usually, calling this function is not needed, as **TileMapLayer** node updates automatically when one of its properties or cells is modified. + +However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the **TileMapLayer** to update right away instead. + +\ **Warning:** Updating the **TileMapLayer** is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilemappattern.rst b/classes/class_tilemappattern.rst index f0be66f1927..d168dab9e19 100644 --- a/classes/class_tilemappattern.rst +++ b/classes/class_tilemappattern.rst @@ -31,27 +31,27 @@ Methods .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_alternative_tile<class_TileMapPattern_method_get_cell_alternative_tile>` **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_cell_atlas_coords<class_TileMapPattern_method_get_cell_atlas_coords>` **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_cell_source_id<class_TileMapPattern_method_get_cell_source_id>` **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_TileMapPattern_method_get_size>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]<class_Vector2i>` | :ref:`get_used_cells<class_TileMapPattern_method_get_used_cells>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_cell<class_TileMapPattern_method_has_cell>` **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_TileMapPattern_method_is_empty>` **(** **)** |const| | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_cell<class_TileMapPattern_method_remove_cell>` **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` update_size **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell<class_TileMapPattern_method_set_cell>` **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=-1 **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_size<class_TileMapPattern_method_set_size>` **(** :ref:`Vector2i<class_Vector2i>` size **)** | - +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_alternative_tile<class_TileMapPattern_method_get_cell_alternative_tile>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_cell_atlas_coords<class_TileMapPattern_method_get_cell_atlas_coords>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_cell_source_id<class_TileMapPattern_method_get_cell_source_id>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size<class_TileMapPattern_method_get_size>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] | :ref:`get_used_cells<class_TileMapPattern_method_get_used_cells>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_cell<class_TileMapPattern_method_has_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_TileMapPattern_method_is_empty>`\ (\ ) |const| | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_cell<class_TileMapPattern_method_remove_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, update_size\: :ref:`bool<class_bool>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell<class_TileMapPattern_method_set_cell>`\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_size<class_TileMapPattern_method_set_size>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +--------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,7 +66,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_alternative_tile** **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| +:ref:`int<class_int>` **get_cell_alternative_tile**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapPattern_method_get_cell_alternative_tile>` Returns the tile alternative ID of the cell at ``coords``. @@ -78,7 +78,7 @@ Returns the tile alternative ID of the cell at ``coords``. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_cell_atlas_coords** **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_cell_atlas_coords**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapPattern_method_get_cell_atlas_coords>` Returns the tile atlas coordinates ID of the cell at ``coords``. @@ -90,7 +90,7 @@ Returns the tile atlas coordinates ID of the cell at ``coords``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_cell_source_id** **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| +:ref:`int<class_int>` **get_cell_source_id**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapPattern_method_get_cell_source_id>` Returns the tile source ID of the cell at ``coords``. @@ -102,7 +102,7 @@ Returns the tile source ID of the cell at ``coords``. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_size** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_size**\ (\ ) |const| :ref:`🔗<class_TileMapPattern_method_get_size>` Returns the size, in cells, of the pattern. @@ -114,7 +114,7 @@ Returns the size, in cells, of the pattern. .. rst-class:: classref-method -:ref:`Vector2i[]<class_Vector2i>` **get_used_cells** **(** **)** |const| +:ref:`Array<class_Array>`\[:ref:`Vector2i<class_Vector2i>`\] **get_used_cells**\ (\ ) |const| :ref:`🔗<class_TileMapPattern_method_get_used_cells>` Returns the list of used cell coordinates in the pattern. @@ -126,7 +126,7 @@ Returns the list of used cell coordinates in the pattern. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_cell** **(** :ref:`Vector2i<class_Vector2i>` coords **)** |const| +:ref:`bool<class_bool>` **has_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileMapPattern_method_has_cell>` Returns whether the pattern has a tile at the given coordinates. @@ -138,7 +138,7 @@ Returns whether the pattern has a tile at the given coordinates. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_empty** **(** **)** |const| +:ref:`bool<class_bool>` **is_empty**\ (\ ) |const| :ref:`🔗<class_TileMapPattern_method_is_empty>` Returns whether the pattern is empty or not. @@ -150,7 +150,7 @@ Returns whether the pattern is empty or not. .. rst-class:: classref-method -void **remove_cell** **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`bool<class_bool>` update_size **)** +|void| **remove_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, update_size\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileMapPattern_method_remove_cell>` Remove the cell at the given coordinates. @@ -162,9 +162,9 @@ Remove the cell at the given coordinates. .. rst-class:: classref-method -void **set_cell** **(** :ref:`Vector2i<class_Vector2i>` coords, :ref:`int<class_int>` source_id=-1, :ref:`Vector2i<class_Vector2i>` atlas_coords=Vector2i(-1, -1), :ref:`int<class_int>` alternative_tile=-1 **)** +|void| **set_cell**\ (\ coords\: :ref:`Vector2i<class_Vector2i>`, source_id\: :ref:`int<class_int>` = -1, atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), alternative_tile\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileMapPattern_method_set_cell>` -Sets the tile indentifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell<class_TileMap_method_set_cell>`. +Sets the tile identifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell<class_TileMap_method_set_cell>`. .. rst-class:: classref-item-separator @@ -174,7 +174,7 @@ Sets the tile indentifiers for the cell at coordinates ``coords``. See :ref:`Til .. rst-class:: classref-method -void **set_size** **(** :ref:`Vector2i<class_Vector2i>` size **)** +|void| **set_size**\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileMapPattern_method_set_size>` Sets the size of the pattern. @@ -185,3 +185,4 @@ Sets the size of the pattern. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tileset.rst b/classes/class_tileset.rst index dae87515527..4a8fe33b182 100644 --- a/classes/class_tileset.rst +++ b/classes/class_tileset.rst @@ -21,13 +21,13 @@ Description A TileSet is a library of tiles for a :ref:`TileMap<class_TileMap>`. A TileSet handles a list of :ref:`TileSetSource<class_TileSetSource>`, each of them storing a set of tiles. -Tiles can either be from a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`, that render tiles out of a texture with support for physics, navigation, etc... or from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>` which exposes scene-based tiles. +Tiles can either be from a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`, which renders tiles out of a texture with support for physics, navigation, etc., or from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>`, which exposes scene-based tiles. -Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID. +Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID. -A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs. +A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs. -For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer and mask), you may add several TileSet physics layers for each type of collision you need. +For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need. See the functions to add new layers for more information. @@ -38,17 +38,17 @@ Tutorials - :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>` -- `2D Platformer Demo <https://godotengine.org/asset-library/asset/120>`__ +- `2D Platformer Demo <https://godotengine.org/asset-library/asset/2727>`__ -- `2D Isometric Demo <https://godotengine.org/asset-library/asset/112>`__ +- `2D Isometric Demo <https://godotengine.org/asset-library/asset/2718>`__ -- `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/111>`__ +- `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/2717>`__ -- `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__ +- `2D Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__ -- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__ +- `2D Role Playing Game (RPG) Demo <https://godotengine.org/asset-library/asset/2729>`__ -- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__ +- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/2719>`__ .. rst-class:: classref-reftable-group @@ -78,159 +78,159 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_custom_data_layer<class_TileSet_method_add_custom_data_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_navigation_layer<class_TileSet_method_add_navigation_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_occlusion_layer<class_TileSet_method_add_occlusion_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_pattern<class_TileSet_method_add_pattern>` **(** :ref:`TileMapPattern<class_TileMapPattern>` pattern, :ref:`int<class_int>` index=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_physics_layer<class_TileSet_method_add_physics_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_source<class_TileSet_method_add_source>` **(** :ref:`TileSetSource<class_TileSetSource>` source, :ref:`int<class_int>` atlas_source_id_override=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_terrain<class_TileSet_method_add_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_terrain_set<class_TileSet_method_add_terrain_set>` **(** :ref:`int<class_int>` to_position=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`cleanup_invalid_tile_proxies<class_TileSet_method_cleanup_invalid_tile_proxies>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_tile_proxies<class_TileSet_method_clear_tile_proxies>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_alternative_level_tile_proxy<class_TileSet_method_get_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_coords_level_tile_proxy<class_TileSet_method_get_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_custom_data_layer_by_name<class_TileSet_method_get_custom_data_layer_by_name>` **(** :ref:`String<class_String>` layer_name **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_custom_data_layer_name<class_TileSet_method_get_custom_data_layer_name>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_custom_data_layer_type<class_TileSet_method_get_custom_data_layer_type>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_custom_data_layers_count<class_TileSet_method_get_custom_data_layers_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_layer_value<class_TileSet_method_get_navigation_layer_layer_value>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_navigation_layer_layers<class_TileSet_method_get_navigation_layer_layers>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_navigation_layers_count<class_TileSet_method_get_navigation_layers_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_next_source_id<class_TileSet_method_get_next_source_id>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_occlusion_layer_light_mask<class_TileSet_method_get_occlusion_layer_light_mask>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_occlusion_layer_sdf_collision<class_TileSet_method_get_occlusion_layer_sdf_collision>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_occlusion_layers_count<class_TileSet_method_get_occlusion_layers_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileSet_method_get_pattern>` **(** :ref:`int<class_int>` index=-1 **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_patterns_count<class_TileSet_method_get_patterns_count>` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_layer<class_TileSet_method_get_physics_layer_collision_layer>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_mask<class_TileSet_method_get_physics_layer_collision_mask>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsMaterial<class_PhysicsMaterial>` | :ref:`get_physics_layer_physics_material<class_TileSet_method_get_physics_layer_physics_material>` **(** :ref:`int<class_int>` layer_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_physics_layers_count<class_TileSet_method_get_physics_layers_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileSetSource<class_TileSetSource>` | :ref:`get_source<class_TileSet_method_get_source>` **(** :ref:`int<class_int>` source_id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_source_count<class_TileSet_method_get_source_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_source_id<class_TileSet_method_get_source_id>` **(** :ref:`int<class_int>` index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_source_level_tile_proxy<class_TileSet_method_get_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_terrain_color<class_TileSet_method_get_terrain_color>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_terrain_name<class_TileSet_method_get_terrain_name>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TerrainMode<enum_TileSet_TerrainMode>` | :ref:`get_terrain_set_mode<class_TileSet_method_get_terrain_set_mode>` **(** :ref:`int<class_int>` terrain_set **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_terrain_sets_count<class_TileSet_method_get_terrain_sets_count>` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_terrains_count<class_TileSet_method_get_terrains_count>` **(** :ref:`int<class_int>` terrain_set **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_alternative_level_tile_proxy<class_TileSet_method_has_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_coords_level_tile_proxy<class_TileSet_method_has_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_source<class_TileSet_method_has_source>` **(** :ref:`int<class_int>` source_id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_source_level_tile_proxy<class_TileSet_method_has_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`map_tile_proxy<class_TileSet_method_map_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_custom_data_layer<class_TileSet_method_move_custom_data_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_navigation_layer<class_TileSet_method_move_navigation_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_occlusion_layer<class_TileSet_method_move_occlusion_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_physics_layer<class_TileSet_method_move_physics_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_terrain<class_TileSet_method_move_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_terrain_set<class_TileSet_method_move_terrain_set>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_alternative_level_tile_proxy<class_TileSet_method_remove_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_coords_level_tile_proxy<class_TileSet_method_remove_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_custom_data_layer<class_TileSet_method_remove_custom_data_layer>` **(** :ref:`int<class_int>` layer_index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_navigation_layer<class_TileSet_method_remove_navigation_layer>` **(** :ref:`int<class_int>` layer_index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_occlusion_layer<class_TileSet_method_remove_occlusion_layer>` **(** :ref:`int<class_int>` layer_index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_pattern<class_TileSet_method_remove_pattern>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_physics_layer<class_TileSet_method_remove_physics_layer>` **(** :ref:`int<class_int>` layer_index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_source<class_TileSet_method_remove_source>` **(** :ref:`int<class_int>` source_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_source_level_tile_proxy<class_TileSet_method_remove_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_terrain<class_TileSet_method_remove_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_terrain_set<class_TileSet_method_remove_terrain_set>` **(** :ref:`int<class_int>` terrain_set **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_alternative_level_tile_proxy<class_TileSet_method_set_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to, :ref:`int<class_int>` alternative_to **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_coords_level_tile_proxy<class_TileSet_method_set_coords_level_tile_proxy>` **(** :ref:`int<class_int>` p_source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data_layer_name<class_TileSet_method_set_custom_data_layer_name>` **(** :ref:`int<class_int>` layer_index, :ref:`String<class_String>` layer_name **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_data_layer_type<class_TileSet_method_set_custom_data_layer_type>` **(** :ref:`int<class_int>` layer_index, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` layer_type **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_layer_value<class_TileSet_method_set_navigation_layer_layer_value>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_navigation_layer_layers<class_TileSet_method_set_navigation_layer_layers>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layers **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_occlusion_layer_light_mask<class_TileSet_method_set_occlusion_layer_light_mask>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` light_mask **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_occlusion_layer_sdf_collision<class_TileSet_method_set_occlusion_layer_sdf_collision>` **(** :ref:`int<class_int>` layer_index, :ref:`bool<class_bool>` sdf_collision **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physics_layer_collision_layer<class_TileSet_method_set_physics_layer_collision_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physics_layer_collision_mask<class_TileSet_method_set_physics_layer_collision_mask>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` mask **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_physics_layer_physics_material<class_TileSet_method_set_physics_layer_physics_material>` **(** :ref:`int<class_int>` layer_index, :ref:`PhysicsMaterial<class_PhysicsMaterial>` physics_material **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_source_id<class_TileSet_method_set_source_id>` **(** :ref:`int<class_int>` source_id, :ref:`int<class_int>` new_source_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_source_level_tile_proxy<class_TileSet_method_set_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`int<class_int>` source_to **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_color<class_TileSet_method_set_terrain_color>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_name<class_TileSet_method_set_terrain_name>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`String<class_String>` name **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_terrain_set_mode<class_TileSet_method_set_terrain_set_mode>` **(** :ref:`int<class_int>` terrain_set, :ref:`TerrainMode<enum_TileSet_TerrainMode>` mode **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_custom_data_layer<class_TileSet_method_add_custom_data_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_navigation_layer<class_TileSet_method_add_navigation_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_occlusion_layer<class_TileSet_method_add_occlusion_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_pattern<class_TileSet_method_add_pattern>`\ (\ pattern\: :ref:`TileMapPattern<class_TileMapPattern>`, index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_physics_layer<class_TileSet_method_add_physics_layer>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_source<class_TileSet_method_add_source>`\ (\ source\: :ref:`TileSetSource<class_TileSetSource>`, atlas_source_id_override\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_terrain<class_TileSet_method_add_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_terrain_set<class_TileSet_method_add_terrain_set>`\ (\ to_position\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cleanup_invalid_tile_proxies<class_TileSet_method_cleanup_invalid_tile_proxies>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_tile_proxies<class_TileSet_method_clear_tile_proxies>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_alternative_level_tile_proxy<class_TileSet_method_get_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_coords_level_tile_proxy<class_TileSet_method_get_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_custom_data_layer_by_name<class_TileSet_method_get_custom_data_layer_by_name>`\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_custom_data_layer_name<class_TileSet_method_get_custom_data_layer_name>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_custom_data_layer_type<class_TileSet_method_get_custom_data_layer_type>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_custom_data_layers_count<class_TileSet_method_get_custom_data_layers_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_layer_value<class_TileSet_method_get_navigation_layer_layer_value>`\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_navigation_layer_layers<class_TileSet_method_get_navigation_layer_layers>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_navigation_layers_count<class_TileSet_method_get_navigation_layers_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_next_source_id<class_TileSet_method_get_next_source_id>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_occlusion_layer_light_mask<class_TileSet_method_get_occlusion_layer_light_mask>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_occlusion_layer_sdf_collision<class_TileSet_method_get_occlusion_layer_sdf_collision>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_occlusion_layers_count<class_TileSet_method_get_occlusion_layers_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileSet_method_get_pattern>`\ (\ index\: :ref:`int<class_int>` = -1\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_patterns_count<class_TileSet_method_get_patterns_count>`\ (\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_layer<class_TileSet_method_get_physics_layer_collision_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_mask<class_TileSet_method_get_physics_layer_collision_mask>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsMaterial<class_PhysicsMaterial>` | :ref:`get_physics_layer_physics_material<class_TileSet_method_get_physics_layer_physics_material>`\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_physics_layers_count<class_TileSet_method_get_physics_layers_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileSetSource<class_TileSetSource>` | :ref:`get_source<class_TileSet_method_get_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_source_count<class_TileSet_method_get_source_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_source_id<class_TileSet_method_get_source_id>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_source_level_tile_proxy<class_TileSet_method_get_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_terrain_color<class_TileSet_method_get_terrain_color>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_terrain_name<class_TileSet_method_get_terrain_name>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TerrainMode<enum_TileSet_TerrainMode>` | :ref:`get_terrain_set_mode<class_TileSet_method_get_terrain_set_mode>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_terrain_sets_count<class_TileSet_method_get_terrain_sets_count>`\ (\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_terrains_count<class_TileSet_method_get_terrains_count>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_alternative_level_tile_proxy<class_TileSet_method_has_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_coords_level_tile_proxy<class_TileSet_method_has_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_source<class_TileSet_method_has_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_source_level_tile_proxy<class_TileSet_method_has_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`map_tile_proxy<class_TileSet_method_map_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_custom_data_layer<class_TileSet_method_move_custom_data_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_navigation_layer<class_TileSet_method_move_navigation_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_occlusion_layer<class_TileSet_method_move_occlusion_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_physics_layer<class_TileSet_method_move_physics_layer>`\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_terrain<class_TileSet_method_move_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_terrain_set<class_TileSet_method_move_terrain_set>`\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_alternative_level_tile_proxy<class_TileSet_method_remove_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_coords_level_tile_proxy<class_TileSet_method_remove_coords_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_custom_data_layer<class_TileSet_method_remove_custom_data_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_navigation_layer<class_TileSet_method_remove_navigation_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_occlusion_layer<class_TileSet_method_remove_occlusion_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_pattern<class_TileSet_method_remove_pattern>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_physics_layer<class_TileSet_method_remove_physics_layer>`\ (\ layer_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_source<class_TileSet_method_remove_source>`\ (\ source_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_source_level_tile_proxy<class_TileSet_method_remove_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_terrain<class_TileSet_method_remove_terrain>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_terrain_set<class_TileSet_method_remove_terrain_set>`\ (\ terrain_set\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_alternative_level_tile_proxy<class_TileSet_method_set_alternative_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`, alternative_to\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_coords_level_tile_proxy<class_TileSet_method_set_coords_level_tile_proxy>`\ (\ p_source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data_layer_name<class_TileSet_method_set_custom_data_layer_name>`\ (\ layer_index\: :ref:`int<class_int>`, layer_name\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_data_layer_type<class_TileSet_method_set_custom_data_layer_type>`\ (\ layer_index\: :ref:`int<class_int>`, layer_type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_layer_value<class_TileSet_method_set_navigation_layer_layer_value>`\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_navigation_layer_layers<class_TileSet_method_set_navigation_layer_layers>`\ (\ layer_index\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occlusion_layer_light_mask<class_TileSet_method_set_occlusion_layer_light_mask>`\ (\ layer_index\: :ref:`int<class_int>`, light_mask\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_occlusion_layer_sdf_collision<class_TileSet_method_set_occlusion_layer_sdf_collision>`\ (\ layer_index\: :ref:`int<class_int>`, sdf_collision\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physics_layer_collision_layer<class_TileSet_method_set_physics_layer_collision_layer>`\ (\ layer_index\: :ref:`int<class_int>`, layer\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physics_layer_collision_mask<class_TileSet_method_set_physics_layer_collision_mask>`\ (\ layer_index\: :ref:`int<class_int>`, mask\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_physics_layer_physics_material<class_TileSet_method_set_physics_layer_physics_material>`\ (\ layer_index\: :ref:`int<class_int>`, physics_material\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_source_id<class_TileSet_method_set_source_id>`\ (\ source_id\: :ref:`int<class_int>`, new_source_id\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_source_level_tile_proxy<class_TileSet_method_set_source_level_tile_proxy>`\ (\ source_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain_color<class_TileSet_method_set_terrain_color>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain_name<class_TileSet_method_set_terrain_name>`\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain_set_mode<class_TileSet_method_set_terrain_set_mode>`\ (\ terrain_set\: :ref:`int<class_int>`, mode\: :ref:`TerrainMode<enum_TileSet_TerrainMode>`\ ) | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -245,7 +245,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TileShape**: +enum **TileShape**: :ref:`🔗<enum_TileSet_TileShape>` .. _class_TileSet_constant_TILE_SHAPE_SQUARE: @@ -289,7 +289,7 @@ Hexagonal tile shape. .. rst-class:: classref-enumeration -enum **TileLayout**: +enum **TileLayout**: :ref:`🔗<enum_TileSet_TileLayout>` .. _class_TileSet_constant_TILE_LAYOUT_STACKED: @@ -347,7 +347,7 @@ Tile coordinates layout where the horizontal axis goes down-right, and the verti .. rst-class:: classref-enumeration -enum **TileOffsetAxis**: +enum **TileOffsetAxis**: :ref:`🔗<enum_TileSet_TileOffsetAxis>` .. _class_TileSet_constant_TILE_OFFSET_AXIS_HORIZONTAL: @@ -373,7 +373,7 @@ Vertical half-offset. .. rst-class:: classref-enumeration -enum **CellNeighbor**: +enum **CellNeighbor**: :ref:`🔗<enum_TileSet_CellNeighbor>` .. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_SIDE: @@ -511,7 +511,7 @@ Neighbor in the top right corner. .. rst-class:: classref-enumeration -enum **TerrainMode**: +enum **TerrainMode**: :ref:`🔗<enum_TileSet_TerrainMode>` .. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS_AND_SIDES: @@ -550,12 +550,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`TileLayout<enum_TileSet_TileLayout>` **tile_layout** = ``0`` +:ref:`TileLayout<enum_TileSet_TileLayout>` **tile_layout** = ``0`` :ref:`🔗<class_TileSet_property_tile_layout>` .. rst-class:: classref-property-setget -- void **set_tile_layout** **(** :ref:`TileLayout<enum_TileSet_TileLayout>` value **)** -- :ref:`TileLayout<enum_TileSet_TileLayout>` **get_tile_layout** **(** **)** +- |void| **set_tile_layout**\ (\ value\: :ref:`TileLayout<enum_TileSet_TileLayout>`\ ) +- :ref:`TileLayout<enum_TileSet_TileLayout>` **get_tile_layout**\ (\ ) For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMap grid. @@ -567,12 +567,12 @@ For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), change .. rst-class:: classref-property -:ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **tile_offset_axis** = ``0`` +:ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **tile_offset_axis** = ``0`` :ref:`🔗<class_TileSet_property_tile_offset_axis>` .. rst-class:: classref-property-setget -- void **set_tile_offset_axis** **(** :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` value **)** -- :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **get_tile_offset_axis** **(** **)** +- |void| **set_tile_offset_axis**\ (\ value\: :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>`\ ) +- :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **get_tile_offset_axis**\ (\ ) For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis. @@ -584,12 +584,12 @@ For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determ .. rst-class:: classref-property -:ref:`TileShape<enum_TileSet_TileShape>` **tile_shape** = ``0`` +:ref:`TileShape<enum_TileSet_TileShape>` **tile_shape** = ``0`` :ref:`🔗<class_TileSet_property_tile_shape>` .. rst-class:: classref-property-setget -- void **set_tile_shape** **(** :ref:`TileShape<enum_TileSet_TileShape>` value **)** -- :ref:`TileShape<enum_TileSet_TileShape>` **get_tile_shape** **(** **)** +- |void| **set_tile_shape**\ (\ value\: :ref:`TileShape<enum_TileSet_TileShape>`\ ) +- :ref:`TileShape<enum_TileSet_TileShape>` **get_tile_shape**\ (\ ) The tile shape. @@ -601,12 +601,12 @@ The tile shape. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **tile_size** = ``Vector2i(16, 16)`` +:ref:`Vector2i<class_Vector2i>` **tile_size** = ``Vector2i(16, 16)`` :ref:`🔗<class_TileSet_property_tile_size>` .. rst-class:: classref-property-setget -- void **set_tile_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_tile_size** **(** **)** +- |void| **set_tile_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_tile_size**\ (\ ) The tile size, in pixels. For all tile shapes, this size corresponds to the encompassing rectangle of the tile shape. This is thus the minimal cell size required in an atlas. @@ -618,12 +618,12 @@ The tile size, in pixels. For all tile shapes, this size corresponds to the enco .. rst-class:: classref-property -:ref:`bool<class_bool>` **uv_clipping** = ``false`` +:ref:`bool<class_bool>` **uv_clipping** = ``false`` :ref:`🔗<class_TileSet_property_uv_clipping>` .. rst-class:: classref-property-setget -- void **set_uv_clipping** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_uv_clipping** **(** **)** +- |void| **set_uv_clipping**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_uv_clipping**\ (\ ) Enables/Disable uv clipping when rendering the tiles. @@ -640,7 +640,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_custom_data_layer** **(** :ref:`int<class_int>` to_position=-1 **)** +|void| **add_custom_data_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_custom_data_layer>` Adds a custom data layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -654,7 +654,7 @@ Custom data layers allow assigning custom properties to atlas tiles. .. rst-class:: classref-method -void **add_navigation_layer** **(** :ref:`int<class_int>` to_position=-1 **)** +|void| **add_navigation_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_navigation_layer>` Adds a navigation layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -668,7 +668,7 @@ Navigation layers allow assigning a navigable area to atlas tiles. .. rst-class:: classref-method -void **add_occlusion_layer** **(** :ref:`int<class_int>` to_position=-1 **)** +|void| **add_occlusion_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_occlusion_layer>` Adds an occlusion layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -682,7 +682,7 @@ Occlusion layers allow assigning occlusion polygons to atlas tiles. .. rst-class:: classref-method -:ref:`int<class_int>` **add_pattern** **(** :ref:`TileMapPattern<class_TileMapPattern>` pattern, :ref:`int<class_int>` index=-1 **)** +:ref:`int<class_int>` **add_pattern**\ (\ pattern\: :ref:`TileMapPattern<class_TileMapPattern>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_pattern>` Adds a :ref:`TileMapPattern<class_TileMapPattern>` to be stored in the TileSet resource. If provided, insert it at the given ``index``. @@ -694,7 +694,7 @@ Adds a :ref:`TileMapPattern<class_TileMapPattern>` to be stored in the TileSet r .. rst-class:: classref-method -void **add_physics_layer** **(** :ref:`int<class_int>` to_position=-1 **)** +|void| **add_physics_layer**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_physics_layer>` Adds a physics layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -708,7 +708,7 @@ Physics layers allow assigning collision polygons to atlas tiles. .. rst-class:: classref-method -:ref:`int<class_int>` **add_source** **(** :ref:`TileSetSource<class_TileSetSource>` source, :ref:`int<class_int>` atlas_source_id_override=-1 **)** +:ref:`int<class_int>` **add_source**\ (\ source\: :ref:`TileSetSource<class_TileSetSource>`, atlas_source_id_override\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_source>` Adds a :ref:`TileSetSource<class_TileSetSource>` to the TileSet. If ``atlas_source_id_override`` is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated. @@ -724,7 +724,7 @@ The function returns the added source ID or -1 if the source could not be added. .. rst-class:: classref-method -void **add_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position=-1 **)** +|void| **add_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_terrain>` Adds a new terrain to the given terrain set ``terrain_set`` at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -736,7 +736,7 @@ Adds a new terrain to the given terrain set ``terrain_set`` at the given positio .. rst-class:: classref-method -void **add_terrain_set** **(** :ref:`int<class_int>` to_position=-1 **)** +|void| **add_terrain_set**\ (\ to_position\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_add_terrain_set>` Adds a new terrain set at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array. @@ -748,7 +748,7 @@ Adds a new terrain set at the given position ``to_position`` in the array. If `` .. rst-class:: classref-method -void **cleanup_invalid_tile_proxies** **(** **)** +|void| **cleanup_invalid_tile_proxies**\ (\ ) :ref:`🔗<class_TileSet_method_cleanup_invalid_tile_proxies>` Clears tile proxies pointing to invalid tiles. @@ -760,7 +760,7 @@ Clears tile proxies pointing to invalid tiles. .. rst-class:: classref-method -void **clear_tile_proxies** **(** **)** +|void| **clear_tile_proxies**\ (\ ) :ref:`🔗<class_TileSet_method_clear_tile_proxies>` Clears all tile proxies. @@ -772,7 +772,7 @@ Clears all tile proxies. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** +:ref:`Array<class_Array>` **get_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_get_alternative_level_tile_proxy>` Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID). @@ -786,7 +786,7 @@ If the TileSet has no proxy for the given identifiers, returns an empty Array. .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** +:ref:`Array<class_Array>` **get_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_get_coords_level_tile_proxy>` Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID). @@ -800,7 +800,7 @@ If the TileSet has no proxy for the given identifiers, returns an empty Array. .. rst-class:: classref-method -:ref:`int<class_int>` **get_custom_data_layer_by_name** **(** :ref:`String<class_String>` layer_name **)** |const| +:ref:`int<class_int>` **get_custom_data_layer_by_name**\ (\ layer_name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_by_name>` Returns the index of the custom data layer identified by the given name. @@ -812,7 +812,7 @@ Returns the index of the custom data layer identified by the given name. .. rst-class:: classref-method -:ref:`String<class_String>` **get_custom_data_layer_name** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`String<class_String>` **get_custom_data_layer_name**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_name>` Returns the name of the custom data layer identified by the given index. @@ -824,7 +824,7 @@ Returns the name of the custom data layer identified by the given index. .. rst-class:: classref-method -:ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_custom_data_layer_type** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_custom_data_layer_type**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layer_type>` Returns the type of the custom data layer identified by the given index. @@ -836,7 +836,7 @@ Returns the type of the custom data layer identified by the given index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_custom_data_layers_count** **(** **)** |const| +:ref:`int<class_int>` **get_custom_data_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_custom_data_layers_count>` Returns the custom data layers count. @@ -848,7 +848,7 @@ Returns the custom data layers count. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_navigation_layer_layer_value** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_navigation_layer_layer_value**\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layer_layer_value>` Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given ``layer_index`` is enabled, given a navigation_layers ``layer_number`` between 1 and 32. @@ -860,7 +860,7 @@ Returns whether or not the specified navigation layer of the TileSet navigation .. rst-class:: classref-method -:ref:`int<class_int>` **get_navigation_layer_layers** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`int<class_int>` **get_navigation_layer_layers**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layer_layers>` Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer. @@ -872,7 +872,7 @@ Returns the navigation layers (as in the Navigation server) of the given TileSet .. rst-class:: classref-method -:ref:`int<class_int>` **get_navigation_layers_count** **(** **)** |const| +:ref:`int<class_int>` **get_navigation_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_navigation_layers_count>` Returns the navigation layers count. @@ -884,9 +884,9 @@ Returns the navigation layers count. .. rst-class:: classref-method -:ref:`int<class_int>` **get_next_source_id** **(** **)** |const| +:ref:`int<class_int>` **get_next_source_id**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_next_source_id>` -Returns a new unused source ID. This generated ID is the same that a call to ``add_source`` would return. +Returns a new unused source ID. This generated ID is the same that a call to :ref:`add_source<class_TileSet_method_add_source>` would return. .. rst-class:: classref-item-separator @@ -896,7 +896,7 @@ Returns a new unused source ID. This generated ID is the same that a call to ``a .. rst-class:: classref-method -:ref:`int<class_int>` **get_occlusion_layer_light_mask** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`int<class_int>` **get_occlusion_layer_light_mask**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layer_light_mask>` Returns the light mask of the occlusion layer. @@ -908,7 +908,7 @@ Returns the light mask of the occlusion layer. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_occlusion_layer_sdf_collision** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`bool<class_bool>` **get_occlusion_layer_sdf_collision**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layer_sdf_collision>` Returns if the occluders from this layer use ``sdf_collision``. @@ -920,7 +920,7 @@ Returns if the occluders from this layer use ``sdf_collision``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_occlusion_layers_count** **(** **)** |const| +:ref:`int<class_int>` **get_occlusion_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_occlusion_layers_count>` Returns the occlusion layers count. @@ -932,7 +932,7 @@ Returns the occlusion layers count. .. rst-class:: classref-method -:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern** **(** :ref:`int<class_int>` index=-1 **)** +:ref:`TileMapPattern<class_TileMapPattern>` **get_pattern**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSet_method_get_pattern>` Returns the :ref:`TileMapPattern<class_TileMapPattern>` at the given ``index``. @@ -944,7 +944,7 @@ Returns the :ref:`TileMapPattern<class_TileMapPattern>` at the given ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_patterns_count** **(** **)** +:ref:`int<class_int>` **get_patterns_count**\ (\ ) :ref:`🔗<class_TileSet_method_get_patterns_count>` Returns the number of :ref:`TileMapPattern<class_TileMapPattern>` this tile set handles. @@ -956,7 +956,7 @@ Returns the number of :ref:`TileMapPattern<class_TileMapPattern>` this tile set .. rst-class:: classref-method -:ref:`int<class_int>` **get_physics_layer_collision_layer** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`int<class_int>` **get_physics_layer_collision_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_collision_layer>` Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in. @@ -968,7 +968,7 @@ Returns the collision layer (as in the physics server) bodies on the given TileS .. rst-class:: classref-method -:ref:`int<class_int>` **get_physics_layer_collision_mask** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`int<class_int>` **get_physics_layer_collision_mask**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_collision_mask>` Returns the collision mask of bodies on the given TileSet's physics layer. @@ -980,7 +980,7 @@ Returns the collision mask of bodies on the given TileSet's physics layer. .. rst-class:: classref-method -:ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_layer_physics_material** **(** :ref:`int<class_int>` layer_index **)** |const| +:ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_layer_physics_material**\ (\ layer_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layer_physics_material>` Returns the physics material of bodies on the given TileSet's physics layer. @@ -992,7 +992,7 @@ Returns the physics material of bodies on the given TileSet's physics layer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_physics_layers_count** **(** **)** |const| +:ref:`int<class_int>` **get_physics_layers_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_physics_layers_count>` Returns the physics layers count. @@ -1004,7 +1004,7 @@ Returns the physics layers count. .. rst-class:: classref-method -:ref:`TileSetSource<class_TileSetSource>` **get_source** **(** :ref:`int<class_int>` source_id **)** |const| +:ref:`TileSetSource<class_TileSetSource>` **get_source**\ (\ source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_source>` Returns the :ref:`TileSetSource<class_TileSetSource>` with ID ``source_id``. @@ -1016,7 +1016,7 @@ Returns the :ref:`TileSetSource<class_TileSetSource>` with ID ``source_id``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_source_count** **(** **)** |const| +:ref:`int<class_int>` **get_source_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_source_count>` Returns the number of :ref:`TileSetSource<class_TileSetSource>` in this TileSet. @@ -1028,7 +1028,7 @@ Returns the number of :ref:`TileSetSource<class_TileSetSource>` in this TileSet. .. rst-class:: classref-method -:ref:`int<class_int>` **get_source_id** **(** :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_source_id**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_source_id>` Returns the source ID for source with index ``index``. @@ -1040,7 +1040,7 @@ Returns the source ID for source with index ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)** +:ref:`int<class_int>` **get_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_get_source_level_tile_proxy>` Returns the source-level proxy for the given source identifier. @@ -1054,7 +1054,7 @@ If the TileSet has no proxy for the given identifier, returns -1. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_terrain_color** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| +:ref:`Color<class_Color>` **get_terrain_color**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_color>` Returns a terrain's color. @@ -1066,7 +1066,7 @@ Returns a terrain's color. .. rst-class:: classref-method -:ref:`String<class_String>` **get_terrain_name** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| +:ref:`String<class_String>` **get_terrain_name**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_name>` Returns a terrain's name. @@ -1078,7 +1078,7 @@ Returns a terrain's name. .. rst-class:: classref-method -:ref:`TerrainMode<enum_TileSet_TerrainMode>` **get_terrain_set_mode** **(** :ref:`int<class_int>` terrain_set **)** |const| +:ref:`TerrainMode<enum_TileSet_TerrainMode>` **get_terrain_set_mode**\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_set_mode>` Returns a terrain set mode. @@ -1090,7 +1090,7 @@ Returns a terrain set mode. .. rst-class:: classref-method -:ref:`int<class_int>` **get_terrain_sets_count** **(** **)** |const| +:ref:`int<class_int>` **get_terrain_sets_count**\ (\ ) |const| :ref:`🔗<class_TileSet_method_get_terrain_sets_count>` Returns the terrain sets count. @@ -1102,7 +1102,7 @@ Returns the terrain sets count. .. rst-class:: classref-method -:ref:`int<class_int>` **get_terrains_count** **(** :ref:`int<class_int>` terrain_set **)** |const| +:ref:`int<class_int>` **get_terrains_count**\ (\ terrain_set\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_get_terrains_count>` Returns the number of terrains in the given terrain set. @@ -1114,7 +1114,7 @@ Returns the number of terrains in the given terrain set. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** +:ref:`bool<class_bool>` **has_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_has_alternative_level_tile_proxy>` Returns if there is an alternative-level proxy for the given identifiers. @@ -1126,7 +1126,7 @@ Returns if there is an alternative-level proxy for the given identifiers. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** +:ref:`bool<class_bool>` **has_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_has_coords_level_tile_proxy>` Returns if there is a coodinates-level proxy for the given identifiers. @@ -1138,7 +1138,7 @@ Returns if there is a coodinates-level proxy for the given identifiers. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_source** **(** :ref:`int<class_int>` source_id **)** |const| +:ref:`bool<class_bool>` **has_source**\ (\ source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_has_source>` Returns if this TileSet has a source for the given source ID. @@ -1150,7 +1150,7 @@ Returns if this TileSet has a source for the given source ID. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)** +:ref:`bool<class_bool>` **has_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_has_source_level_tile_proxy>` Returns if there is a source-level proxy for the given source ID. @@ -1162,9 +1162,9 @@ Returns if there is a source-level proxy for the given source ID. .. rst-class:: classref-method -:ref:`Array<class_Array>` **map_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |const| +:ref:`Array<class_Array>` **map_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSet_method_map_tile_proxy>` -According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. +According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. @@ -1178,7 +1178,7 @@ If no proxy corresponding to provided identifiers are found, returns the same va .. rst-class:: classref-method -void **move_custom_data_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** +|void| **move_custom_data_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_custom_data_layer>` Moves the custom data layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1190,7 +1190,7 @@ Moves the custom data layer at index ``layer_index`` to the given position ``to_ .. rst-class:: classref-method -void **move_navigation_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** +|void| **move_navigation_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_navigation_layer>` Moves the navigation layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1202,7 +1202,7 @@ Moves the navigation layer at index ``layer_index`` to the given position ``to_p .. rst-class:: classref-method -void **move_occlusion_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** +|void| **move_occlusion_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_occlusion_layer>` Moves the occlusion layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1214,7 +1214,7 @@ Moves the occlusion layer at index ``layer_index`` to the given position ``to_po .. rst-class:: classref-method -void **move_physics_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** +|void| **move_physics_layer**\ (\ layer_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_physics_layer>` Moves the physics layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1226,7 +1226,7 @@ Moves the physics layer at index ``layer_index`` to the given position ``to_posi .. rst-class:: classref-method -void **move_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`int<class_int>` to_position **)** +|void| **move_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_terrain>` Moves the terrain at index ``terrain_index`` for terrain set ``terrain_set`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1238,7 +1238,7 @@ Moves the terrain at index ``terrain_index`` for terrain set ``terrain_set`` to .. rst-class:: classref-method -void **move_terrain_set** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position **)** +|void| **move_terrain_set**\ (\ terrain_set\: :ref:`int<class_int>`, to_position\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_move_terrain_set>` Moves the terrain set at index ``terrain_set`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly. @@ -1250,7 +1250,7 @@ Moves the terrain set at index ``terrain_set`` to the given position ``to_positi .. rst-class:: classref-method -void **remove_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** +|void| **remove_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_alternative_level_tile_proxy>` Removes an alternative-level proxy for the given identifiers. @@ -1262,7 +1262,7 @@ Removes an alternative-level proxy for the given identifiers. .. rst-class:: classref-method -void **remove_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** +|void| **remove_coords_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_remove_coords_level_tile_proxy>` Removes a coordinates-level proxy for the given identifiers. @@ -1274,7 +1274,7 @@ Removes a coordinates-level proxy for the given identifiers. .. rst-class:: classref-method -void **remove_custom_data_layer** **(** :ref:`int<class_int>` layer_index **)** +|void| **remove_custom_data_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_custom_data_layer>` Removes the custom data layer at index ``layer_index``. Also updates the atlas tiles accordingly. @@ -1286,7 +1286,7 @@ Removes the custom data layer at index ``layer_index``. Also updates the atlas t .. rst-class:: classref-method -void **remove_navigation_layer** **(** :ref:`int<class_int>` layer_index **)** +|void| **remove_navigation_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_navigation_layer>` Removes the navigation layer at index ``layer_index``. Also updates the atlas tiles accordingly. @@ -1298,7 +1298,7 @@ Removes the navigation layer at index ``layer_index``. Also updates the atlas ti .. rst-class:: classref-method -void **remove_occlusion_layer** **(** :ref:`int<class_int>` layer_index **)** +|void| **remove_occlusion_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_occlusion_layer>` Removes the occlusion layer at index ``layer_index``. Also updates the atlas tiles accordingly. @@ -1310,7 +1310,7 @@ Removes the occlusion layer at index ``layer_index``. Also updates the atlas til .. rst-class:: classref-method -void **remove_pattern** **(** :ref:`int<class_int>` index **)** +|void| **remove_pattern**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_pattern>` Remove the :ref:`TileMapPattern<class_TileMapPattern>` at the given index. @@ -1322,7 +1322,7 @@ Remove the :ref:`TileMapPattern<class_TileMapPattern>` at the given index. .. rst-class:: classref-method -void **remove_physics_layer** **(** :ref:`int<class_int>` layer_index **)** +|void| **remove_physics_layer**\ (\ layer_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_physics_layer>` Removes the physics layer at index ``layer_index``. Also updates the atlas tiles accordingly. @@ -1334,7 +1334,7 @@ Removes the physics layer at index ``layer_index``. Also updates the atlas tiles .. rst-class:: classref-method -void **remove_source** **(** :ref:`int<class_int>` source_id **)** +|void| **remove_source**\ (\ source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_source>` Removes the source with the given source ID. @@ -1346,7 +1346,7 @@ Removes the source with the given source ID. .. rst-class:: classref-method -void **remove_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)** +|void| **remove_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_source_level_tile_proxy>` Removes a source-level tile proxy. @@ -1358,7 +1358,7 @@ Removes a source-level tile proxy. .. rst-class:: classref-method -void **remove_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** +|void| **remove_terrain**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_terrain>` Removes the terrain at index ``terrain_index`` in the given terrain set ``terrain_set``. Also updates the atlas tiles accordingly. @@ -1370,7 +1370,7 @@ Removes the terrain at index ``terrain_index`` in the given terrain set ``terrai .. rst-class:: classref-method -void **remove_terrain_set** **(** :ref:`int<class_int>` terrain_set **)** +|void| **remove_terrain_set**\ (\ terrain_set\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_remove_terrain_set>` Removes the terrain set at index ``terrain_set``. Also updates the atlas tiles accordingly. @@ -1382,7 +1382,7 @@ Removes the terrain set at index ``terrain_set``. Also updates the atlas tiles a .. rst-class:: classref-method -void **set_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to, :ref:`int<class_int>` alternative_to **)** +|void| **set_alternative_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, alternative_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`, alternative_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_alternative_level_tile_proxy>` Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. @@ -1398,7 +1398,7 @@ Proxied tiles can be automatically replaced in TileMap nodes using the editor. .. rst-class:: classref-method -void **set_coords_level_tile_proxy** **(** :ref:`int<class_int>` p_source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to **)** +|void| **set_coords_level_tile_proxy**\ (\ p_source_from\: :ref:`int<class_int>`, coords_from\: :ref:`Vector2i<class_Vector2i>`, source_to\: :ref:`int<class_int>`, coords_to\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSet_method_set_coords_level_tile_proxy>` Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies. @@ -1414,7 +1414,7 @@ Proxied tiles can be automatically replaced in TileMap nodes using the editor. .. rst-class:: classref-method -void **set_custom_data_layer_name** **(** :ref:`int<class_int>` layer_index, :ref:`String<class_String>` layer_name **)** +|void| **set_custom_data_layer_name**\ (\ layer_index\: :ref:`int<class_int>`, layer_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TileSet_method_set_custom_data_layer_name>` Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error. @@ -1426,7 +1426,7 @@ Sets the name of the custom data layer identified by the given index. Names are .. rst-class:: classref-method -void **set_custom_data_layer_type** **(** :ref:`int<class_int>` layer_index, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` layer_type **)** +|void| **set_custom_data_layer_type**\ (\ layer_index\: :ref:`int<class_int>`, layer_type\: :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`\ ) :ref:`🔗<class_TileSet_method_set_custom_data_layer_type>` Sets the type of the custom data layer identified by the given index. @@ -1438,7 +1438,7 @@ Sets the type of the custom data layer identified by the given index. .. rst-class:: classref-method -void **set_navigation_layer_layer_value** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_navigation_layer_layer_value**\ (\ layer_index\: :ref:`int<class_int>`, layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileSet_method_set_navigation_layer_layer_value>` Based on ``value``, enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given ``layer_index``, given a navigation_layers ``layer_number`` between 1 and 32. @@ -1450,7 +1450,7 @@ Based on ``value``, enables or disables the specified navigation layer of the Ti .. rst-class:: classref-method -void **set_navigation_layer_layers** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layers **)** +|void| **set_navigation_layer_layers**\ (\ layer_index\: :ref:`int<class_int>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_navigation_layer_layers>` Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer. @@ -1462,7 +1462,7 @@ Sets the navigation layers (as in the navigation server) for navigation regions .. rst-class:: classref-method -void **set_occlusion_layer_light_mask** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` light_mask **)** +|void| **set_occlusion_layer_light_mask**\ (\ layer_index\: :ref:`int<class_int>`, light_mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_occlusion_layer_light_mask>` Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer. @@ -1474,7 +1474,7 @@ Sets the occlusion layer (as in the rendering server) for occluders in the given .. rst-class:: classref-method -void **set_occlusion_layer_sdf_collision** **(** :ref:`int<class_int>` layer_index, :ref:`bool<class_bool>` sdf_collision **)** +|void| **set_occlusion_layer_sdf_collision**\ (\ layer_index\: :ref:`int<class_int>`, sdf_collision\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileSet_method_set_occlusion_layer_sdf_collision>` Enables or disables SDF collision for occluders in the given TileSet occlusion layer. @@ -1486,7 +1486,7 @@ Enables or disables SDF collision for occluders in the given TileSet occlusion l .. rst-class:: classref-method -void **set_physics_layer_collision_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer **)** +|void| **set_physics_layer_collision_layer**\ (\ layer_index\: :ref:`int<class_int>`, layer\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_collision_layer>` Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. @@ -1498,7 +1498,7 @@ Sets the physics layer (as in the physics server) for bodies in the given TileSe .. rst-class:: classref-method -void **set_physics_layer_collision_mask** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` mask **)** +|void| **set_physics_layer_collision_mask**\ (\ layer_index\: :ref:`int<class_int>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_collision_mask>` Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer. @@ -1510,7 +1510,7 @@ Sets the physics layer (as in the physics server) for bodies in the given TileSe .. rst-class:: classref-method -void **set_physics_layer_physics_material** **(** :ref:`int<class_int>` layer_index, :ref:`PhysicsMaterial<class_PhysicsMaterial>` physics_material **)** +|void| **set_physics_layer_physics_material**\ (\ layer_index\: :ref:`int<class_int>`, physics_material\: :ref:`PhysicsMaterial<class_PhysicsMaterial>`\ ) :ref:`🔗<class_TileSet_method_set_physics_layer_physics_material>` Sets the physics material for bodies in the given TileSet physics layer. @@ -1522,7 +1522,7 @@ Sets the physics material for bodies in the given TileSet physics layer. .. rst-class:: classref-method -void **set_source_id** **(** :ref:`int<class_int>` source_id, :ref:`int<class_int>` new_source_id **)** +|void| **set_source_id**\ (\ source_id\: :ref:`int<class_int>`, new_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_source_id>` Changes a source's ID. @@ -1534,7 +1534,7 @@ Changes a source's ID. .. rst-class:: classref-method -void **set_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`int<class_int>` source_to **)** +|void| **set_source_level_tile_proxy**\ (\ source_from\: :ref:`int<class_int>`, source_to\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSet_method_set_source_level_tile_proxy>` Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies. @@ -1550,7 +1550,7 @@ Proxied tiles can be automatically replaced in TileMap nodes using the editor. .. rst-class:: classref-method -void **set_terrain_color** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`Color<class_Color>` color **)** +|void| **set_terrain_color**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_color>` Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor. @@ -1562,7 +1562,7 @@ Sets a terrain's color. This color is used for identifying the different terrain .. rst-class:: classref-method -void **set_terrain_name** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`String<class_String>` name **)** +|void| **set_terrain_name**\ (\ terrain_set\: :ref:`int<class_int>`, terrain_index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_name>` Sets a terrain's name. @@ -1574,7 +1574,7 @@ Sets a terrain's name. .. rst-class:: classref-method -void **set_terrain_set_mode** **(** :ref:`int<class_int>` terrain_set, :ref:`TerrainMode<enum_TileSet_TerrainMode>` mode **)** +|void| **set_terrain_set_mode**\ (\ terrain_set\: :ref:`int<class_int>`, mode\: :ref:`TerrainMode<enum_TileSet_TerrainMode>`\ ) :ref:`🔗<class_TileSet_method_set_terrain_set_mode>` Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains. @@ -1585,3 +1585,4 @@ Sets a terrain mode. Each mode determines which bits of a tile shape is used to .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilesetatlassource.rst b/classes/class_tilesetatlassource.rst index 5668d9a3945..57f8faa9250 100644 --- a/classes/class_tilesetatlassource.rst +++ b/classes/class_tilesetatlassource.rst @@ -57,65 +57,69 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`create_alternative_tile<class_TileSetAtlasSource_method_create_alternative_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_id_override=-1 **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_tile<class_TileSetAtlasSource_method_create_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` size=Vector2i(1, 1) **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_atlas_grid_size<class_TileSetAtlasSource_method_get_atlas_grid_size>` **(** **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_next_alternative_tile_id<class_TileSetAtlasSource_method_get_next_alternative_tile_id>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_runtime_texture<class_TileSetAtlasSource_method_get_runtime_texture>` **(** **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`get_runtime_tile_texture_region<class_TileSetAtlasSource_method_get_runtime_tile_texture_region>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tile_animation_columns<class_TileSetAtlasSource_method_get_tile_animation_columns>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_tile_animation_frame_duration<class_TileSetAtlasSource_method_get_tile_animation_frame_duration>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_index **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tile_animation_frames_count<class_TileSetAtlasSource_method_get_tile_animation_frames_count>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` | :ref:`get_tile_animation_mode<class_TileSetAtlasSource_method_get_tile_animation_mode>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_animation_separation<class_TileSetAtlasSource_method_get_tile_animation_separation>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_tile_animation_speed<class_TileSetAtlasSource_method_get_tile_animation_speed>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_tile_animation_total_duration<class_TileSetAtlasSource_method_get_tile_animation_total_duration>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_at_coords<class_TileSetAtlasSource_method_get_tile_at_coords>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TileData<class_TileData>` | :ref:`get_tile_data<class_TileSetAtlasSource_method_get_tile_data>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_size_in_atlas<class_TileSetAtlasSource_method_get_tile_size_in_atlas>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i<class_Rect2i>` | :ref:`get_tile_texture_region<class_TileSetAtlasSource_method_get_tile_texture_region>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame=0 **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_tiles_to_be_removed_on_change<class_TileSetAtlasSource_method_get_tiles_to_be_removed_on_change>` **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Vector2i<class_Vector2i>` margins, :ref:`Vector2i<class_Vector2i>` separation, :ref:`Vector2i<class_Vector2i>` texture_region_size **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_room_for_tile<class_TileSetAtlasSource_method_has_room_for_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` animation_columns, :ref:`Vector2i<class_Vector2i>` animation_separation, :ref:`int<class_int>` frames_count, :ref:`Vector2i<class_Vector2i>` ignored_tile=Vector2i(-1, -1) **)** |const| | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_tile_in_atlas<class_TileSetAtlasSource_method_move_tile_in_atlas>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i<class_Vector2i>` new_size=Vector2i(-1, -1) **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_alternative_tile<class_TileSetAtlasSource_method_remove_alternative_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_tile<class_TileSetAtlasSource_method_remove_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_alternative_tile_id<class_TileSetAtlasSource_method_set_alternative_tile_id>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile, :ref:`int<class_int>` new_id **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_columns<class_TileSetAtlasSource_method_set_tile_animation_columns>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_columns **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_frame_duration<class_TileSetAtlasSource_method_set_tile_animation_frame_duration>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_index, :ref:`float<class_float>` duration **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_frames_count<class_TileSetAtlasSource_method_set_tile_animation_frames_count>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frames_count **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_mode<class_TileSetAtlasSource_method_set_tile_animation_mode>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` mode **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_separation<class_TileSetAtlasSource_method_set_tile_animation_separation>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` separation **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tile_animation_speed<class_TileSetAtlasSource_method_set_tile_animation_speed>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`float<class_float>` speed **)** | - +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_tiles_outside_texture<class_TileSetAtlasSource_method_clear_tiles_outside_texture>`\ (\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`create_alternative_tile<class_TileSetAtlasSource_method_create_alternative_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_id_override\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_tile<class_TileSetAtlasSource_method_create_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>` = Vector2i(1, 1)\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_atlas_grid_size<class_TileSetAtlasSource_method_get_atlas_grid_size>`\ (\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_next_alternative_tile_id<class_TileSetAtlasSource_method_get_next_alternative_tile_id>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_runtime_texture<class_TileSetAtlasSource_method_get_runtime_texture>`\ (\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_runtime_tile_texture_region<class_TileSetAtlasSource_method_get_runtime_tile_texture_region>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tile_animation_columns<class_TileSetAtlasSource_method_get_tile_animation_columns>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_tile_animation_frame_duration<class_TileSetAtlasSource_method_get_tile_animation_frame_duration>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tile_animation_frames_count<class_TileSetAtlasSource_method_get_tile_animation_frames_count>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` | :ref:`get_tile_animation_mode<class_TileSetAtlasSource_method_get_tile_animation_mode>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_animation_separation<class_TileSetAtlasSource_method_get_tile_animation_separation>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_tile_animation_speed<class_TileSetAtlasSource_method_get_tile_animation_speed>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_tile_animation_total_duration<class_TileSetAtlasSource_method_get_tile_animation_total_duration>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_at_coords<class_TileSetAtlasSource_method_get_tile_at_coords>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TileData<class_TileData>` | :ref:`get_tile_data<class_TileSetAtlasSource_method_get_tile_data>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_size_in_atlas<class_TileSetAtlasSource_method_get_tile_size_in_atlas>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i<class_Rect2i>` | :ref:`get_tile_texture_region<class_TileSetAtlasSource_method_get_tile_texture_region>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame\: :ref:`int<class_int>` = 0\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_tiles_to_be_removed_on_change<class_TileSetAtlasSource_method_get_tiles_to_be_removed_on_change>`\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, margins\: :ref:`Vector2i<class_Vector2i>`, separation\: :ref:`Vector2i<class_Vector2i>`, texture_region_size\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_room_for_tile<class_TileSetAtlasSource_method_has_room_for_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`, animation_columns\: :ref:`int<class_int>`, animation_separation\: :ref:`Vector2i<class_Vector2i>`, frames_count\: :ref:`int<class_int>`, ignored_tile\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1)\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_tiles_outside_texture<class_TileSetAtlasSource_method_has_tiles_outside_texture>`\ (\ ) |const| | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_tile_in_atlas<class_TileSetAtlasSource_method_move_tile_in_atlas>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, new_atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), new_size\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1)\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_alternative_tile<class_TileSetAtlasSource_method_remove_alternative_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_tile<class_TileSetAtlasSource_method_remove_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_alternative_tile_id<class_TileSetAtlasSource_method_set_alternative_tile_id>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`, new_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_columns<class_TileSetAtlasSource_method_set_tile_animation_columns>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_columns\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_frame_duration<class_TileSetAtlasSource_method_set_tile_animation_frame_duration>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_index\: :ref:`int<class_int>`, duration\: :ref:`float<class_float>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_frames_count<class_TileSetAtlasSource_method_set_tile_animation_frames_count>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frames_count\: :ref:`int<class_int>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_mode<class_TileSetAtlasSource_method_set_tile_animation_mode>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, mode\: :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_separation<class_TileSetAtlasSource_method_set_tile_animation_separation>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, separation\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tile_animation_speed<class_TileSetAtlasSource_method_set_tile_animation_speed>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, speed\: :ref:`float<class_float>`\ ) | + +---------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -130,7 +134,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TileAnimationMode**: +enum **TileAnimationMode**: :ref:`🔗<enum_TileSetAtlasSource_TileAnimationMode>` .. _class_TileSetAtlasSource_constant_TILE_ANIMATION_MODE_DEFAULT: @@ -162,6 +166,57 @@ Represents the size of the :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileA .. rst-class:: classref-descriptions-group +Constants +--------- + +.. _class_TileSetAtlasSource_constant_TRANSFORM_FLIP_H: + +.. rst-class:: classref-constant + +**TRANSFORM_FLIP_H** = ``4096`` :ref:`🔗<class_TileSetAtlasSource_constant_TRANSFORM_FLIP_H>` + +Represents cell's horizontal flip flag. Should be used directly with :ref:`TileMap<class_TileMap>` to flip placed tiles by altering their alternative IDs. + +:: + + var alternate_id = $TileMap.get_cell_alternative_tile(0, Vector2i(2, 2)) + if not alternate_id & TileSetAtlasSource.TRANSFORM_FLIP_H: + # If tile is not already flipped, flip it. + $TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H) + +\ **Note:** These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below: + +:: + + enum TileTransform { + ROTATE_0 = 0, + ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H, + ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V, + ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V, + } + +.. _class_TileSetAtlasSource_constant_TRANSFORM_FLIP_V: + +.. rst-class:: classref-constant + +**TRANSFORM_FLIP_V** = ``8192`` :ref:`🔗<class_TileSetAtlasSource_constant_TRANSFORM_FLIP_V>` + +Represents cell's vertical flip flag. See :ref:`TRANSFORM_FLIP_H<class_TileSetAtlasSource_constant_TRANSFORM_FLIP_H>` for usage. + +.. _class_TileSetAtlasSource_constant_TRANSFORM_TRANSPOSE: + +.. rst-class:: classref-constant + +**TRANSFORM_TRANSPOSE** = ``16384`` :ref:`🔗<class_TileSetAtlasSource_constant_TRANSFORM_TRANSPOSE>` + +Represents cell's transposed flag. See :ref:`TRANSFORM_FLIP_H<class_TileSetAtlasSource_constant_TRANSFORM_FLIP_H>` for usage. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Property Descriptions --------------------- @@ -169,12 +224,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **margins** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **margins** = ``Vector2i(0, 0)`` :ref:`🔗<class_TileSetAtlasSource_property_margins>` .. rst-class:: classref-property-setget -- void **set_margins** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_margins** **(** **)** +- |void| **set_margins**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_margins**\ (\ ) Margins, in pixels, to offset the origin of the grid in the texture. @@ -186,12 +241,12 @@ Margins, in pixels, to offset the origin of the grid in the texture. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **separation** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **separation** = ``Vector2i(0, 0)`` :ref:`🔗<class_TileSetAtlasSource_property_separation>` .. rst-class:: classref-property-setget -- void **set_separation** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_separation** **(** **)** +- |void| **set_separation**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_separation**\ (\ ) Separation, in pixels, between each tile texture region of the grid. @@ -203,12 +258,12 @@ Separation, in pixels, between each tile texture region of the grid. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_TileSetAtlasSource_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The atlas texture. @@ -220,12 +275,12 @@ The atlas texture. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **texture_region_size** = ``Vector2i(16, 16)`` +:ref:`Vector2i<class_Vector2i>` **texture_region_size** = ``Vector2i(16, 16)`` :ref:`🔗<class_TileSetAtlasSource_property_texture_region_size>` .. rst-class:: classref-property-setget -- void **set_texture_region_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_texture_region_size** **(** **)** +- |void| **set_texture_region_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_texture_region_size**\ (\ ) The base tile size in the texture (in pixel). This size must be bigger than the TileSet's ``tile_size`` value. @@ -237,12 +292,12 @@ The base tile size in the texture (in pixel). This size must be bigger than the .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_texture_padding** = ``true`` +:ref:`bool<class_bool>` **use_texture_padding** = ``true`` :ref:`🔗<class_TileSetAtlasSource_property_use_texture_padding>` .. rst-class:: classref-property-setget -- void **set_use_texture_padding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_use_texture_padding** **(** **)** +- |void| **set_use_texture_padding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_use_texture_padding**\ (\ ) If ``true``, generates an internal texture with an additional one pixel padding around each tile. Texture padding avoids a common artifact where lines appear between tiles. @@ -257,11 +312,23 @@ Disabling this setting might lead a small performance improvement, as generating Method Descriptions ------------------- +.. _class_TileSetAtlasSource_method_clear_tiles_outside_texture: + +.. rst-class:: classref-method + +|void| **clear_tiles_outside_texture**\ (\ ) :ref:`🔗<class_TileSetAtlasSource_method_clear_tiles_outside_texture>` + +Removes all tiles that don't fit the available texture area. This method iterates over all the source's tiles, so it's advised to use :ref:`has_tiles_outside_texture<class_TileSetAtlasSource_method_has_tiles_outside_texture>` beforehand. + +.. rst-class:: classref-item-separator + +---- + .. _class_TileSetAtlasSource_method_create_alternative_tile: .. rst-class:: classref-method -:ref:`int<class_int>` **create_alternative_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_id_override=-1 **)** +:ref:`int<class_int>` **create_alternative_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_id_override\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSetAtlasSource_method_create_alternative_tile>` Creates an alternative tile for the tile at coordinates ``atlas_coords``. If ``alternative_id_override`` is -1, give it an automatically generated unique ID, or assigns it the given ID otherwise. @@ -275,7 +342,7 @@ Returns the new alternative identifier, or -1 if the alternative could not be cr .. rst-class:: classref-method -void **create_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` size=Vector2i(1, 1) **)** +|void| **create_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>` = Vector2i(1, 1)\ ) :ref:`🔗<class_TileSetAtlasSource_method_create_tile>` Creates a new tile at coordinates ``atlas_coords`` with the given ``size``. @@ -287,9 +354,9 @@ Creates a new tile at coordinates ``atlas_coords`` with the given ``size``. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_atlas_grid_size** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_atlas_grid_size**\ (\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_atlas_grid_size>` -Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the Texture's size, the atlas ``margins`` the tiles' ``texture_region_size``. +Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the :ref:`texture<class_TileSetAtlasSource_property_texture>`'s size, the atlas :ref:`margins<class_TileSetAtlasSource_property_margins>`, and the tiles' :ref:`texture_region_size<class_TileSetAtlasSource_property_texture_region_size>`. .. rst-class:: classref-item-separator @@ -299,7 +366,7 @@ Returns the atlas grid size, which depends on how many tiles can fit in the text .. rst-class:: classref-method -:ref:`int<class_int>` **get_next_alternative_tile_id** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`int<class_int>` **get_next_alternative_tile_id**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_next_alternative_tile_id>` Returns the alternative ID a following call to :ref:`create_alternative_tile<class_TileSetAtlasSource_method_create_alternative_tile>` would return. @@ -311,7 +378,7 @@ Returns the alternative ID a following call to :ref:`create_alternative_tile<cla .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_runtime_texture** **(** **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_runtime_texture**\ (\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_runtime_texture>` If :ref:`use_texture_padding<class_TileSetAtlasSource_property_use_texture_padding>` is ``false``, returns :ref:`texture<class_TileSetAtlasSource_property_texture>`. Otherwise, returns and internal :ref:`ImageTexture<class_ImageTexture>` created that includes the padding. @@ -323,7 +390,7 @@ If :ref:`use_texture_padding<class_TileSetAtlasSource_property_use_texture_paddi .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **get_runtime_tile_texture_region** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame **)** |const| +:ref:`Rect2i<class_Rect2i>` **get_runtime_tile_texture_region**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_runtime_tile_texture_region>` Returns the region of the tile at coordinates ``atlas_coords`` for the given ``frame`` inside the texture returned by :ref:`get_runtime_texture<class_TileSetAtlasSource_method_get_runtime_texture>`. @@ -337,7 +404,7 @@ Returns the region of the tile at coordinates ``atlas_coords`` for the given ``f .. rst-class:: classref-method -:ref:`int<class_int>` **get_tile_animation_columns** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`int<class_int>` **get_tile_animation_columns**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_columns>` Returns how many columns the tile at ``atlas_coords`` has in its animation layout. @@ -349,7 +416,7 @@ Returns how many columns the tile at ``atlas_coords`` has in its animation layou .. rst-class:: classref-method -:ref:`float<class_float>` **get_tile_animation_frame_duration** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_index **)** |const| +:ref:`float<class_float>` **get_tile_animation_frame_duration**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_frame_duration>` Returns the animation frame duration of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. @@ -361,7 +428,7 @@ Returns the animation frame duration of frame ``frame_index`` for the tile at co .. rst-class:: classref-method -:ref:`int<class_int>` **get_tile_animation_frames_count** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`int<class_int>` **get_tile_animation_frames_count**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_frames_count>` Returns how many animation frames has the tile at coordinates ``atlas_coords``. @@ -373,9 +440,9 @@ Returns how many animation frames has the tile at coordinates ``atlas_coords``. .. rst-class:: classref-method -:ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` **get_tile_animation_mode** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` **get_tile_animation_mode**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_mode>` -Returns the :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode<class_TileSetAtlasSource_method_set_tile_animation_mode>`. +Returns the tile animation mode of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode<class_TileSetAtlasSource_method_set_tile_animation_mode>`. .. rst-class:: classref-item-separator @@ -385,7 +452,7 @@ Returns the :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_tile_animation_separation** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_tile_animation_separation**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_separation>` Returns the separation (as in the atlas grid) between each frame of an animated tile at coordinates ``atlas_coords``. @@ -397,7 +464,7 @@ Returns the separation (as in the atlas grid) between each frame of an animated .. rst-class:: classref-method -:ref:`float<class_float>` **get_tile_animation_speed** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`float<class_float>` **get_tile_animation_speed**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_speed>` Returns the animation speed of the tile at coordinates ``atlas_coords``. @@ -409,7 +476,7 @@ Returns the animation speed of the tile at coordinates ``atlas_coords``. .. rst-class:: classref-method -:ref:`float<class_float>` **get_tile_animation_total_duration** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`float<class_float>` **get_tile_animation_total_duration**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_animation_total_duration>` Returns the sum of the sum of the frame durations of the tile at coordinates ``atlas_coords``. This value needs to be divided by the animation speed to get the actual animation loop duration. @@ -421,7 +488,7 @@ Returns the sum of the sum of the frame durations of the tile at coordinates ``a .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_tile_at_coords** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_tile_at_coords**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_at_coords>` If there is a tile covering the ``atlas_coords`` coordinates, returns the top-left coordinates of the tile (thus its coordinate ID). Returns ``Vector2i(-1, -1)`` otherwise. @@ -433,7 +500,7 @@ If there is a tile covering the ``atlas_coords`` coordinates, returns the top-le .. rst-class:: classref-method -:ref:`TileData<class_TileData>` **get_tile_data** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** |const| +:ref:`TileData<class_TileData>` **get_tile_data**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_data>` Returns the :ref:`TileData<class_TileData>` object for the given atlas coordinates and alternative ID. @@ -445,7 +512,7 @@ Returns the :ref:`TileData<class_TileData>` object for the given atlas coordinat .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_tile_size_in_atlas** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_tile_size_in_atlas**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_size_in_atlas>` Returns the size of the tile (in the grid coordinates system) at coordinates ``atlas_coords``. @@ -457,7 +524,7 @@ Returns the size of the tile (in the grid coordinates system) at coordinates ``a .. rst-class:: classref-method -:ref:`Rect2i<class_Rect2i>` **get_tile_texture_region** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame=0 **)** |const| +:ref:`Rect2i<class_Rect2i>` **get_tile_texture_region**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_get_tile_texture_region>` Returns a tile's texture region in the atlas texture. For animated tiles, a ``frame`` argument might be provided for the different frames of the animation. @@ -469,7 +536,7 @@ Returns a tile's texture region in the atlas texture. For animated tiles, a ``fr .. rst-class:: classref-method -:ref:`PackedVector2Array<class_PackedVector2Array>` **get_tiles_to_be_removed_on_change** **(** :ref:`Texture2D<class_Texture2D>` texture, :ref:`Vector2i<class_Vector2i>` margins, :ref:`Vector2i<class_Vector2i>` separation, :ref:`Vector2i<class_Vector2i>` texture_region_size **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **get_tiles_to_be_removed_on_change**\ (\ texture\: :ref:`Texture2D<class_Texture2D>`, margins\: :ref:`Vector2i<class_Vector2i>`, separation\: :ref:`Vector2i<class_Vector2i>`, texture_region_size\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_get_tiles_to_be_removed_on_change>` Returns an array of tiles coordinates ID that will be automatically removed when modifying one or several of those properties: ``texture``, ``margins``, ``separation`` or ``texture_region_size``. This can be used to undo changes that would have caused tiles data loss. @@ -481,7 +548,7 @@ Returns an array of tiles coordinates ID that will be automatically removed when .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_room_for_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` size, :ref:`int<class_int>` animation_columns, :ref:`Vector2i<class_Vector2i>` animation_separation, :ref:`int<class_int>` frames_count, :ref:`Vector2i<class_Vector2i>` ignored_tile=Vector2i(-1, -1) **)** |const| +:ref:`bool<class_bool>` **has_room_for_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, size\: :ref:`Vector2i<class_Vector2i>`, animation_columns\: :ref:`int<class_int>`, animation_separation\: :ref:`Vector2i<class_Vector2i>`, frames_count\: :ref:`int<class_int>`, ignored_tile\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1)\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_has_room_for_tile>` Returns whether there is enough room in an atlas to create/modify a tile with the given properties. If ``ignored_tile`` is provided, act as is the given tile was not present in the atlas. This may be used when you want to modify a tile's properties. @@ -489,11 +556,23 @@ Returns whether there is enough room in an atlas to create/modify a tile with th ---- +.. _class_TileSetAtlasSource_method_has_tiles_outside_texture: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **has_tiles_outside_texture**\ (\ ) |const| :ref:`🔗<class_TileSetAtlasSource_method_has_tiles_outside_texture>` + +Checks if the source has any tiles that don't fit the texture area (either partially or completely). + +.. rst-class:: classref-item-separator + +---- + .. _class_TileSetAtlasSource_method_move_tile_in_atlas: .. rst-class:: classref-method -void **move_tile_in_atlas** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` new_atlas_coords=Vector2i(-1, -1), :ref:`Vector2i<class_Vector2i>` new_size=Vector2i(-1, -1) **)** +|void| **move_tile_in_atlas**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, new_atlas_coords\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1), new_size\: :ref:`Vector2i<class_Vector2i>` = Vector2i(-1, -1)\ ) :ref:`🔗<class_TileSetAtlasSource_method_move_tile_in_atlas>` Move the tile and its alternatives at the ``atlas_coords`` coordinates to the ``new_atlas_coords`` coordinates with the ``new_size`` size. This functions will fail if a tile is already present in the given area. @@ -509,7 +588,7 @@ To avoid an error, first check if a move is possible using :ref:`has_room_for_ti .. rst-class:: classref-method -void **remove_alternative_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** +|void| **remove_alternative_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_remove_alternative_tile>` Remove a tile's alternative with alternative ID ``alternative_tile``. @@ -523,7 +602,7 @@ Calling this function with ``alternative_tile`` equals to 0 will fail, as the ba .. rst-class:: classref-method -void **remove_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** +|void| **remove_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_remove_tile>` Remove a tile and its alternative at coordinates ``atlas_coords``. @@ -535,7 +614,7 @@ Remove a tile and its alternative at coordinates ``atlas_coords``. .. rst-class:: classref-method -void **set_alternative_tile_id** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile, :ref:`int<class_int>` new_id **)** +|void| **set_alternative_tile_id**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`, new_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_alternative_tile_id>` Change a tile's alternative ID from ``alternative_tile`` to ``new_id``. @@ -549,7 +628,7 @@ Calling this function with ``new_id`` of 0 will fail, as the base tile alternati .. rst-class:: classref-method -void **set_tile_animation_columns** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_columns **)** +|void| **set_tile_animation_columns**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_columns\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_columns>` Sets the number of columns in the animation layout of the tile at coordinates ``atlas_coords``. If set to 0, then the different frames of the animation are laid out as a single horizontal line in the atlas. @@ -561,7 +640,7 @@ Sets the number of columns in the animation layout of the tile at coordinates `` .. rst-class:: classref-method -void **set_tile_animation_frame_duration** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frame_index, :ref:`float<class_float>` duration **)** +|void| **set_tile_animation_frame_duration**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frame_index\: :ref:`int<class_int>`, duration\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_frame_duration>` Sets the animation frame ``duration`` of frame ``frame_index`` for the tile at coordinates ``atlas_coords``. @@ -573,7 +652,7 @@ Sets the animation frame ``duration`` of frame ``frame_index`` for the tile at c .. rst-class:: classref-method -void **set_tile_animation_frames_count** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` frames_count **)** +|void| **set_tile_animation_frames_count**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, frames_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_frames_count>` Sets how many animation frames the tile at coordinates ``atlas_coords`` has. @@ -585,9 +664,9 @@ Sets how many animation frames the tile at coordinates ``atlas_coords`` has. .. rst-class:: classref-method -void **set_tile_animation_mode** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` mode **)** +|void| **set_tile_animation_mode**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, mode\: :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_mode>` -Sets the :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode<class_TileSetAtlasSource_method_get_tile_animation_mode>`. +Sets the tile animation mode of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode<class_TileSetAtlasSource_method_get_tile_animation_mode>`. .. rst-class:: classref-item-separator @@ -597,7 +676,7 @@ Sets the :ref:`TileAnimationMode<enum_TileSetAtlasSource_TileAnimationMode>` of .. rst-class:: classref-method -void **set_tile_animation_separation** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`Vector2i<class_Vector2i>` separation **)** +|void| **set_tile_animation_separation**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, separation\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_separation>` Sets the margin (in grid tiles) between each tile in the animation layout of the tile at coordinates ``atlas_coords`` has. @@ -609,7 +688,7 @@ Sets the margin (in grid tiles) between each tile in the animation layout of the .. rst-class:: classref-method -void **set_tile_animation_speed** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`float<class_float>` speed **)** +|void| **set_tile_animation_speed**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TileSetAtlasSource_method_set_tile_animation_speed>` Sets the animation speed of the tile at coordinates ``atlas_coords`` has. @@ -620,3 +699,4 @@ Sets the animation speed of the tile at coordinates ``atlas_coords`` has. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilesetscenescollectionsource.rst b/classes/class_tilesetscenescollectionsource.rst index 10e762131e9..797902b7a01 100644 --- a/classes/class_tilesetscenescollectionsource.rst +++ b/classes/class_tilesetscenescollectionsource.rst @@ -31,29 +31,29 @@ Methods .. table:: :widths: auto - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`create_scene_tile<class_TileSetScenesCollectionSource_method_create_scene_tile>` **(** :ref:`PackedScene<class_PackedScene>` packed_scene, :ref:`int<class_int>` id_override=-1 **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_next_scene_tile_id<class_TileSetScenesCollectionSource_method_get_next_scene_tile_id>` **(** **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_scene_tile_display_placeholder<class_TileSetScenesCollectionSource_method_get_scene_tile_display_placeholder>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_scene_tile_id<class_TileSetScenesCollectionSource_method_get_scene_tile_id>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedScene<class_PackedScene>` | :ref:`get_scene_tile_scene<class_TileSetScenesCollectionSource_method_get_scene_tile_scene>` **(** :ref:`int<class_int>` id **)** |const| | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_scene_tiles_count<class_TileSetScenesCollectionSource_method_get_scene_tiles_count>` **(** **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_scene_tile_id<class_TileSetScenesCollectionSource_method_has_scene_tile_id>` **(** :ref:`int<class_int>` id **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_scene_tile<class_TileSetScenesCollectionSource_method_remove_scene_tile>` **(** :ref:`int<class_int>` id **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_scene_tile_display_placeholder<class_TileSetScenesCollectionSource_method_set_scene_tile_display_placeholder>` **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` display_placeholder **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_scene_tile_id<class_TileSetScenesCollectionSource_method_set_scene_tile_id>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` new_id **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_scene_tile_scene<class_TileSetScenesCollectionSource_method_set_scene_tile_scene>` **(** :ref:`int<class_int>` id, :ref:`PackedScene<class_PackedScene>` packed_scene **)** | - +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`create_scene_tile<class_TileSetScenesCollectionSource_method_create_scene_tile>`\ (\ packed_scene\: :ref:`PackedScene<class_PackedScene>`, id_override\: :ref:`int<class_int>` = -1\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_next_scene_tile_id<class_TileSetScenesCollectionSource_method_get_next_scene_tile_id>`\ (\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_scene_tile_display_placeholder<class_TileSetScenesCollectionSource_method_get_scene_tile_display_placeholder>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_scene_tile_id<class_TileSetScenesCollectionSource_method_get_scene_tile_id>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedScene<class_PackedScene>` | :ref:`get_scene_tile_scene<class_TileSetScenesCollectionSource_method_get_scene_tile_scene>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_scene_tiles_count<class_TileSetScenesCollectionSource_method_get_scene_tiles_count>`\ (\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_scene_tile_id<class_TileSetScenesCollectionSource_method_has_scene_tile_id>`\ (\ id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_scene_tile<class_TileSetScenesCollectionSource_method_remove_scene_tile>`\ (\ id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_scene_tile_display_placeholder<class_TileSetScenesCollectionSource_method_set_scene_tile_display_placeholder>`\ (\ id\: :ref:`int<class_int>`, display_placeholder\: :ref:`bool<class_bool>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_scene_tile_id<class_TileSetScenesCollectionSource_method_set_scene_tile_id>`\ (\ id\: :ref:`int<class_int>`, new_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_scene_tile_scene<class_TileSetScenesCollectionSource_method_set_scene_tile_scene>`\ (\ id\: :ref:`int<class_int>`, packed_scene\: :ref:`PackedScene<class_PackedScene>`\ ) | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **create_scene_tile** **(** :ref:`PackedScene<class_PackedScene>` packed_scene, :ref:`int<class_int>` id_override=-1 **)** +:ref:`int<class_int>` **create_scene_tile**\ (\ packed_scene\: :ref:`PackedScene<class_PackedScene>`, id_override\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_create_scene_tile>` Creates a scene-based tile out of the given scene. @@ -82,7 +82,7 @@ Returns a newly generated unique ID. .. rst-class:: classref-method -:ref:`int<class_int>` **get_next_scene_tile_id** **(** **)** |const| +:ref:`int<class_int>` **get_next_scene_tile_id**\ (\ ) |const| :ref:`🔗<class_TileSetScenesCollectionSource_method_get_next_scene_tile_id>` Returns the scene ID a following call to :ref:`create_scene_tile<class_TileSetScenesCollectionSource_method_create_scene_tile>` would return. @@ -94,7 +94,7 @@ Returns the scene ID a following call to :ref:`create_scene_tile<class_TileSetSc .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_scene_tile_display_placeholder** **(** :ref:`int<class_int>` id **)** |const| +:ref:`bool<class_bool>` **get_scene_tile_display_placeholder**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetScenesCollectionSource_method_get_scene_tile_display_placeholder>` Returns whether the scene tile with ``id`` displays a placeholder in the editor. @@ -106,7 +106,7 @@ Returns whether the scene tile with ``id`` displays a placeholder in the editor. .. rst-class:: classref-method -:ref:`int<class_int>` **get_scene_tile_id** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **get_scene_tile_id**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_get_scene_tile_id>` Returns the scene tile ID of the scene tile at ``index``. @@ -118,7 +118,7 @@ Returns the scene tile ID of the scene tile at ``index``. .. rst-class:: classref-method -:ref:`PackedScene<class_PackedScene>` **get_scene_tile_scene** **(** :ref:`int<class_int>` id **)** |const| +:ref:`PackedScene<class_PackedScene>` **get_scene_tile_scene**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetScenesCollectionSource_method_get_scene_tile_scene>` Returns the :ref:`PackedScene<class_PackedScene>` resource of scene tile with ``id``. @@ -130,7 +130,7 @@ Returns the :ref:`PackedScene<class_PackedScene>` resource of scene tile with `` .. rst-class:: classref-method -:ref:`int<class_int>` **get_scene_tiles_count** **(** **)** +:ref:`int<class_int>` **get_scene_tiles_count**\ (\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_get_scene_tiles_count>` Returns the number or scene tiles this TileSet source has. @@ -142,7 +142,7 @@ Returns the number or scene tiles this TileSet source has. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_scene_tile_id** **(** :ref:`int<class_int>` id **)** +:ref:`bool<class_bool>` **has_scene_tile_id**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_has_scene_tile_id>` Returns whether this TileSet source has a scene tile with ``id``. @@ -154,7 +154,7 @@ Returns whether this TileSet source has a scene tile with ``id``. .. rst-class:: classref-method -void **remove_scene_tile** **(** :ref:`int<class_int>` id **)** +|void| **remove_scene_tile**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_remove_scene_tile>` Remove the scene tile with ``id``. @@ -166,7 +166,7 @@ Remove the scene tile with ``id``. .. rst-class:: classref-method -void **set_scene_tile_display_placeholder** **(** :ref:`int<class_int>` id, :ref:`bool<class_bool>` display_placeholder **)** +|void| **set_scene_tile_display_placeholder**\ (\ id\: :ref:`int<class_int>`, display_placeholder\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_set_scene_tile_display_placeholder>` Sets whether or not the scene tile with ``id`` should display a placeholder in the editor. This might be useful for scenes that are not visible. @@ -178,7 +178,7 @@ Sets whether or not the scene tile with ``id`` should display a placeholder in t .. rst-class:: classref-method -void **set_scene_tile_id** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` new_id **)** +|void| **set_scene_tile_id**\ (\ id\: :ref:`int<class_int>`, new_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_set_scene_tile_id>` Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is already a tile with an ID equal to ``new_id``. @@ -190,7 +190,7 @@ Changes a scene tile's ID from ``id`` to ``new_id``. This will fail if there is .. rst-class:: classref-method -void **set_scene_tile_scene** **(** :ref:`int<class_int>` id, :ref:`PackedScene<class_PackedScene>` packed_scene **)** +|void| **set_scene_tile_scene**\ (\ id\: :ref:`int<class_int>`, packed_scene\: :ref:`PackedScene<class_PackedScene>`\ ) :ref:`🔗<class_TileSetScenesCollectionSource_method_set_scene_tile_scene>` Assigns a :ref:`PackedScene<class_PackedScene>` resource to the scene tile with ``id``. This will fail if the scene does not extend CanvasItem, as positioning properties are needed to place the scene on the TileMap. @@ -201,3 +201,4 @@ Assigns a :ref:`PackedScene<class_PackedScene>` resource to the scene tile with .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tilesetsource.rst b/classes/class_tilesetsource.rst index 479f32b6730..25a1e4c36bd 100644 --- a/classes/class_tilesetsource.rst +++ b/classes/class_tilesetsource.rst @@ -39,19 +39,19 @@ Methods .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_alternative_tile_id<class_TileSetSource_method_get_alternative_tile_id>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` index **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_alternative_tiles_count<class_TileSetSource_method_get_alternative_tiles_count>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_id<class_TileSetSource_method_get_tile_id>` **(** :ref:`int<class_int>` index **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_tiles_count<class_TileSetSource_method_get_tiles_count>` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_alternative_tile<class_TileSetSource_method_has_alternative_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_tile<class_TileSetSource_method_has_tile>` **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_alternative_tile_id<class_TileSetSource_method_get_alternative_tile_id>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_alternative_tiles_count<class_TileSetSource_method_get_alternative_tiles_count>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_tile_id<class_TileSetSource_method_get_tile_id>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_tiles_count<class_TileSetSource_method_get_tiles_count>`\ (\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_alternative_tile<class_TileSetSource_method_has_alternative_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_tile<class_TileSetSource_method_has_tile>`\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,7 +66,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_alternative_tile_id** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` index **)** |const| +:ref:`int<class_int>` **get_alternative_tile_id**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetSource_method_get_alternative_tile_id>` Returns the alternative ID for the tile with coordinates ID ``atlas_coords`` at index ``index``. @@ -78,7 +78,7 @@ Returns the alternative ID for the tile with coordinates ID ``atlas_coords`` at .. rst-class:: classref-method -:ref:`int<class_int>` **get_alternative_tiles_count** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`int<class_int>` **get_alternative_tiles_count**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetSource_method_get_alternative_tiles_count>` Returns the number of alternatives tiles for the coordinates ID ``atlas_coords``. @@ -94,7 +94,7 @@ Returns -1 if there is not tile at the given coords. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_tile_id** **(** :ref:`int<class_int>` index **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_tile_id**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetSource_method_get_tile_id>` Returns the tile coordinates ID of the tile with index ``index``. @@ -106,7 +106,7 @@ Returns the tile coordinates ID of the tile with index ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_tiles_count** **(** **)** |const| +:ref:`int<class_int>` **get_tiles_count**\ (\ ) |const| :ref:`🔗<class_TileSetSource_method_get_tiles_count>` Returns how many tiles this atlas source defines (not including alternative tiles). @@ -118,7 +118,7 @@ Returns how many tiles this atlas source defines (not including alternative tile .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_alternative_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords, :ref:`int<class_int>` alternative_tile **)** |const| +:ref:`bool<class_bool>` **has_alternative_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`, alternative_tile\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TileSetSource_method_has_alternative_tile>` Returns if the base tile at coordinates ``atlas_coords`` has an alternative with ID ``alternative_tile``. @@ -130,7 +130,7 @@ Returns if the base tile at coordinates ``atlas_coords`` has an alternative with .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_tile** **(** :ref:`Vector2i<class_Vector2i>` atlas_coords **)** |const| +:ref:`bool<class_bool>` **has_tile**\ (\ atlas_coords\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_TileSetSource_method_has_tile>` Returns if this atlas has a tile with coordinates ID ``atlas_coords``. @@ -141,3 +141,4 @@ Returns if this atlas has a tile with coordinates ID ``atlas_coords``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_time.rst b/classes/class_time.rst index 377ead4f322..b5695a8d6b7 100644 --- a/classes/class_time.rst +++ b/classes/class_time.rst @@ -25,7 +25,7 @@ This class conforms with as many of the ISO 8601 standards as possible. All date Conversion methods assume "the same timezone", and do not handle timezone conversions or DST automatically. Leap seconds are also not handled, they must be done manually if desired. Suffixes such as "Z" are not handled, you need to strip them away manually. -When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>` method always returns the time in UTC. +When getting time information from the system, the time can either be in the local timezone or UTC depending on the ``utc`` parameter. However, the :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>` method always uses UTC as it returns the seconds passed since the `Unix epoch <https://en.wikipedia.org/wiki/Unix_time>`__. \ **Important:** The ``_from_system`` methods use the system clock that the user can manually set. **Never use** this method for precise time calculation since its results are subject to automatic adjustments by the user or the operating system. **Always use** :ref:`get_ticks_usec<class_Time_method_get_ticks_usec>` or :ref:`get_ticks_msec<class_Time_method_get_ticks_msec>` for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease). @@ -37,49 +37,49 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_date_dict_from_system<class_Time_method_get_date_dict_from_system>` **(** :ref:`bool<class_bool>` utc=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_date_dict_from_unix_time<class_Time_method_get_date_dict_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_date_string_from_system<class_Time_method_get_date_string_from_system>` **(** :ref:`bool<class_bool>` utc=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_date_string_from_unix_time<class_Time_method_get_date_string_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_datetime_string<class_Time_method_get_datetime_dict_from_datetime_string>` **(** :ref:`String<class_String>` datetime, :ref:`bool<class_bool>` weekday **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_system<class_Time_method_get_datetime_dict_from_system>` **(** :ref:`bool<class_bool>` utc=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_unix_time<class_Time_method_get_datetime_dict_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_datetime_string_from_datetime_dict<class_Time_method_get_datetime_string_from_datetime_dict>` **(** :ref:`Dictionary<class_Dictionary>` datetime, :ref:`bool<class_bool>` use_space **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_datetime_string_from_system<class_Time_method_get_datetime_string_from_system>` **(** :ref:`bool<class_bool>` utc=false, :ref:`bool<class_bool>` use_space=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_datetime_string_from_unix_time<class_Time_method_get_datetime_string_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val, :ref:`bool<class_bool>` use_space=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_offset_string_from_offset_minutes<class_Time_method_get_offset_string_from_offset_minutes>` **(** :ref:`int<class_int>` offset_minutes **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_ticks_msec<class_Time_method_get_ticks_msec>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_ticks_usec<class_Time_method_get_ticks_usec>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_dict_from_system<class_Time_method_get_time_dict_from_system>` **(** :ref:`bool<class_bool>` utc=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_dict_from_unix_time<class_Time_method_get_time_dict_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_time_string_from_system<class_Time_method_get_time_string_from_system>` **(** :ref:`bool<class_bool>` utc=false **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_time_string_from_unix_time<class_Time_method_get_time_string_from_unix_time>` **(** :ref:`int<class_int>` unix_time_val **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_zone_from_system<class_Time_method_get_time_zone_from_system>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_unix_time_from_datetime_dict<class_Time_method_get_unix_time_from_datetime_dict>` **(** :ref:`Dictionary<class_Dictionary>` datetime **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_unix_time_from_datetime_string<class_Time_method_get_unix_time_from_datetime_string>` **(** :ref:`String<class_String>` datetime **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_date_dict_from_system<class_Time_method_get_date_dict_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_date_dict_from_unix_time<class_Time_method_get_date_dict_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_date_string_from_system<class_Time_method_get_date_string_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_date_string_from_unix_time<class_Time_method_get_date_string_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_datetime_string<class_Time_method_get_datetime_dict_from_datetime_string>`\ (\ datetime\: :ref:`String<class_String>`, weekday\: :ref:`bool<class_bool>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_system<class_Time_method_get_datetime_dict_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_datetime_dict_from_unix_time<class_Time_method_get_datetime_dict_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_datetime_string_from_datetime_dict<class_Time_method_get_datetime_string_from_datetime_dict>`\ (\ datetime\: :ref:`Dictionary<class_Dictionary>`, use_space\: :ref:`bool<class_bool>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_datetime_string_from_system<class_Time_method_get_datetime_string_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false, use_space\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_datetime_string_from_unix_time<class_Time_method_get_datetime_string_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`, use_space\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_offset_string_from_offset_minutes<class_Time_method_get_offset_string_from_offset_minutes>`\ (\ offset_minutes\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_ticks_msec<class_Time_method_get_ticks_msec>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_ticks_usec<class_Time_method_get_ticks_usec>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_dict_from_system<class_Time_method_get_time_dict_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_dict_from_unix_time<class_Time_method_get_time_dict_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_time_string_from_system<class_Time_method_get_time_string_from_system>`\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_time_string_from_unix_time<class_Time_method_get_time_string_from_unix_time>`\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_time_zone_from_system<class_Time_method_get_time_zone_from_system>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_unix_time_from_datetime_dict<class_Time_method_get_unix_time_from_datetime_dict>`\ (\ datetime\: :ref:`Dictionary<class_Dictionary>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_unix_time_from_datetime_string<class_Time_method_get_unix_time_from_datetime_string>`\ (\ datetime\: :ref:`String<class_String>`\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_unix_time_from_system<class_Time_method_get_unix_time_from_system>`\ (\ ) |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,7 +94,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Month**: +enum **Month**: :ref:`🔗<enum_Time_Month>` .. _class_Time_constant_MONTH_JANUARY: @@ -200,7 +200,7 @@ The month of December, represented numerically as ``12``. .. rst-class:: classref-enumeration -enum **Weekday**: +enum **Weekday**: :ref:`🔗<enum_Time_Weekday>` .. _class_Time_constant_WEEKDAY_SUNDAY: @@ -271,7 +271,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_date_dict_from_system** **(** :ref:`bool<class_bool>` utc=false **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_date_dict_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_date_dict_from_system>` Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, and ``weekday``. @@ -285,7 +285,7 @@ The returned values are in the system's local time when ``utc`` is ``false``, ot .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_date_dict_from_unix_time** **(** :ref:`int<class_int>` unix_time_val **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_date_dict_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_date_dict_from_unix_time>` Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, ``day``, and ``weekday``. @@ -297,7 +297,7 @@ Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, .. rst-class:: classref-method -:ref:`String<class_String>` **get_date_string_from_system** **(** :ref:`bool<class_bool>` utc=false **)** |const| +:ref:`String<class_String>` **get_date_string_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_date_string_from_system>` Returns the current date as an ISO 8601 date string (YYYY-MM-DD). @@ -311,7 +311,7 @@ The returned values are in the system's local time when ``utc`` is ``false``, ot .. rst-class:: classref-method -:ref:`String<class_String>` **get_date_string_from_unix_time** **(** :ref:`int<class_int>` unix_time_val **)** |const| +:ref:`String<class_String>` **get_date_string_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_date_string_from_unix_time>` Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). @@ -323,7 +323,7 @@ Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_datetime_string** **(** :ref:`String<class_String>` datetime, :ref:`bool<class_bool>` weekday **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_datetime_string**\ (\ datetime\: :ref:`String<class_String>`, weekday\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_Time_method_get_datetime_dict_from_datetime_string>` Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, and ``second``. @@ -339,7 +339,7 @@ If ``weekday`` is ``false``, then the ``weekday`` entry is excluded (the calcula .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_system** **(** :ref:`bool<class_bool>` utc=false **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_datetime_dict_from_system>` Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, ``second``, and ``dst`` (Daylight Savings Time). @@ -351,7 +351,7 @@ Returns the current date as a dictionary of keys: ``year``, ``month``, ``day``, .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_unix_time** **(** :ref:`int<class_int>` unix_time_val **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_datetime_dict_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_datetime_dict_from_unix_time>` Converts the given Unix timestamp to a dictionary of keys: ``year``, ``month``, ``day``, ``weekday``, ``hour``, ``minute``, and ``second``. @@ -365,7 +365,7 @@ The returned Dictionary's values will be the same as the :ref:`get_datetime_dict .. rst-class:: classref-method -:ref:`String<class_String>` **get_datetime_string_from_datetime_dict** **(** :ref:`Dictionary<class_Dictionary>` datetime, :ref:`bool<class_bool>` use_space **)** |const| +:ref:`String<class_String>` **get_datetime_string_from_datetime_dict**\ (\ datetime\: :ref:`Dictionary<class_Dictionary>`, use_space\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_Time_method_get_datetime_string_from_datetime_dict>` Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -383,7 +383,7 @@ If ``use_space`` is ``true``, the date and time bits are separated by an empty s .. rst-class:: classref-method -:ref:`String<class_String>` **get_datetime_string_from_system** **(** :ref:`bool<class_bool>` utc=false, :ref:`bool<class_bool>` use_space=false **)** |const| +:ref:`String<class_String>` **get_datetime_string_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false, use_space\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_datetime_string_from_system>` Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -399,7 +399,7 @@ If ``use_space`` is ``true``, the date and time bits are separated by an empty s .. rst-class:: classref-method -:ref:`String<class_String>` **get_datetime_string_from_unix_time** **(** :ref:`int<class_int>` unix_time_val, :ref:`bool<class_bool>` use_space=false **)** |const| +:ref:`String<class_String>` **get_datetime_string_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`, use_space\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_datetime_string_from_unix_time>` Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). @@ -413,7 +413,7 @@ If ``use_space`` is ``true``, the date and time bits are separated by an empty s .. rst-class:: classref-method -:ref:`String<class_String>` **get_offset_string_from_offset_minutes** **(** :ref:`int<class_int>` offset_minutes **)** |const| +:ref:`String<class_String>` **get_offset_string_from_offset_minutes**\ (\ offset_minutes\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_offset_string_from_offset_minutes>` Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00". @@ -425,7 +425,7 @@ Converts the given timezone offset in minutes to a timezone offset string. For e .. rst-class:: classref-method -:ref:`int<class_int>` **get_ticks_msec** **(** **)** |const| +:ref:`int<class_int>` **get_ticks_msec**\ (\ ) |const| :ref:`🔗<class_Time_method_get_ticks_msec>` Returns the amount of time passed in milliseconds since the engine started. @@ -439,7 +439,7 @@ Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly .. rst-class:: classref-method -:ref:`int<class_int>` **get_ticks_usec** **(** **)** |const| +:ref:`int<class_int>` **get_ticks_usec**\ (\ ) |const| :ref:`🔗<class_Time_method_get_ticks_usec>` Returns the amount of time passed in microseconds since the engine started. @@ -453,7 +453,7 @@ Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_time_dict_from_system** **(** :ref:`bool<class_bool>` utc=false **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_time_dict_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_time_dict_from_system>` Returns the current time as a dictionary of keys: ``hour``, ``minute``, and ``second``. @@ -467,7 +467,7 @@ The returned values are in the system's local time when ``utc`` is ``false``, ot .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_time_dict_from_unix_time** **(** :ref:`int<class_int>` unix_time_val **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_time_dict_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_time_dict_from_unix_time>` Converts the given time to a dictionary of keys: ``hour``, ``minute``, and ``second``. @@ -479,7 +479,7 @@ Converts the given time to a dictionary of keys: ``hour``, ``minute``, and ``sec .. rst-class:: classref-method -:ref:`String<class_String>` **get_time_string_from_system** **(** :ref:`bool<class_bool>` utc=false **)** |const| +:ref:`String<class_String>` **get_time_string_from_system**\ (\ utc\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Time_method_get_time_string_from_system>` Returns the current time as an ISO 8601 time string (HH:MM:SS). @@ -493,7 +493,7 @@ The returned values are in the system's local time when ``utc`` is ``false``, ot .. rst-class:: classref-method -:ref:`String<class_String>` **get_time_string_from_unix_time** **(** :ref:`int<class_int>` unix_time_val **)** |const| +:ref:`String<class_String>` **get_time_string_from_unix_time**\ (\ unix_time_val\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Time_method_get_time_string_from_unix_time>` Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS). @@ -505,9 +505,13 @@ Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS). .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_time_zone_from_system** **(** **)** |const| +:ref:`Dictionary<class_Dictionary>` **get_time_zone_from_system**\ (\ ) |const| :ref:`🔗<class_Time_method_get_time_zone_from_system>` -Returns the current time zone as a dictionary of keys: ``bias`` and ``name``. The ``bias`` value is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC. +Returns the current time zone as a dictionary of keys: ``bias`` and ``name``. + +- ``bias`` is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC. + +- ``name`` is the localized name of the time zone, according to the OS locale settings of the current user. .. rst-class:: classref-item-separator @@ -517,7 +521,7 @@ Returns the current time zone as a dictionary of keys: ``bias`` and ``name``. Th .. rst-class:: classref-method -:ref:`int<class_int>` **get_unix_time_from_datetime_dict** **(** :ref:`Dictionary<class_Dictionary>` datetime **)** |const| +:ref:`int<class_int>` **get_unix_time_from_datetime_dict**\ (\ datetime\: :ref:`Dictionary<class_Dictionary>`\ ) |const| :ref:`🔗<class_Time_method_get_unix_time_from_datetime_dict>` Converts a dictionary of time values to a Unix timestamp. @@ -537,7 +541,7 @@ You can pass the output from :ref:`get_datetime_dict_from_unix_time<class_Time_m .. rst-class:: classref-method -:ref:`int<class_int>` **get_unix_time_from_datetime_string** **(** :ref:`String<class_String>` datetime **)** |const| +:ref:`int<class_int>` **get_unix_time_from_datetime_string**\ (\ datetime\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_Time_method_get_unix_time_from_datetime_string>` Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both. @@ -553,9 +557,9 @@ Converts the given ISO 8601 date and/or time string to a Unix timestamp. The str .. rst-class:: classref-method -:ref:`float<class_float>` **get_unix_time_from_system** **(** **)** |const| +:ref:`float<class_float>` **get_unix_time_from_system**\ (\ ) |const| :ref:`🔗<class_Time_method_get_unix_time_from_system>` -Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. +Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. The Unix timestamp is the number of seconds passed since 1970-01-01 at 00:00:00, the `Unix epoch <https://en.wikipedia.org/wiki/Unix_time>`__. \ **Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a :ref:`float<class_float>` for sub-second precision. @@ -566,3 +570,4 @@ Returns the current Unix timestamp in seconds based on the system time in UTC. T .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_timer.rst b/classes/class_timer.rst index e01b1559ed1..fee0bdb49e2 100644 --- a/classes/class_timer.rst +++ b/classes/class_timer.rst @@ -19,18 +19,27 @@ A countdown timer. Description ----------- -Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. +The **Timer** node is a countdown timer and is the simplest way to handle time-based logic in the engine. When a timer reaches the end of its :ref:`wait_time<class_Timer_property_wait_time>`, it will emit the :ref:`timeout<class_Timer_signal_timeout>` signal. -\ **Note:** Timers are affected by :ref:`Engine.time_scale<class_Engine_property_time_scale>`, a higher scale means quicker timeouts, and vice versa. +After a timer enters the tree, it can be manually started with :ref:`start<class_Timer_method_start>`. A timer node is also started automatically if :ref:`autostart<class_Timer_property_autostart>` is ``true``. + +Without requiring much code, a timer node can be added and configured in the editor. The :ref:`timeout<class_Timer_signal_timeout>` signal it emits can also be connected through the Node dock in the editor: + +:: + + func _on_timer_timeout(): + print("Time to attack!") \ **Note:** To create a one-shot timer without instantiating a node, use :ref:`SceneTree.create_timer<class_SceneTree_method_create_timer>`. +\ **Note:** Timers are affected by :ref:`Engine.time_scale<class_Engine_property_time_scale>`. The higher the time scale, the sooner timers will end. How often a timer processes may depend on the framerate or :ref:`Engine.physics_ticks_per_second<class_Engine_property_physics_ticks_per_second>`. + .. rst-class:: classref-introduction-group Tutorials --------- -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ .. rst-class:: classref-reftable-group @@ -62,13 +71,13 @@ Methods .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_stopped<class_Timer_method_is_stopped>` **(** **)** |const| | - +-------------------------+------------------------------------------------------------------------------------------+ - | void | :ref:`start<class_Timer_method_start>` **(** :ref:`float<class_float>` time_sec=-1 **)** | - +-------------------------+------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_Timer_method_stop>` **(** **)** | - +-------------------------+------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_stopped<class_Timer_method_is_stopped>`\ (\ ) |const| | + +-------------------------+-----------------------------------------------------------------------------------------+ + | |void| | :ref:`start<class_Timer_method_start>`\ (\ time_sec\: :ref:`float<class_float>` = -1\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_Timer_method_stop>`\ (\ ) | + +-------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,9 +92,9 @@ Signals .. rst-class:: classref-signal -**timeout** **(** **)** +**timeout**\ (\ ) :ref:`🔗<class_Timer_signal_timeout>` -Emitted when the timer reaches 0. +Emitted when the timer reaches the end. .. rst-class:: classref-section-separator @@ -100,7 +109,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TimerProcessCallback**: +enum **TimerProcessCallback**: :ref:`🔗<enum_Timer_TimerProcessCallback>` .. _class_Timer_constant_TIMER_PROCESS_PHYSICS: @@ -108,7 +117,7 @@ enum **TimerProcessCallback**: :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **TIMER_PROCESS_PHYSICS** = ``0`` -Update the timer during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`). +Update the timer every physics process frame (see :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PHYSICS_PROCESS>`). .. _class_Timer_constant_TIMER_PROCESS_IDLE: @@ -116,7 +125,7 @@ Update the timer during physics frames (see :ref:`Node.NOTIFICATION_INTERNAL_PHY :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **TIMER_PROCESS_IDLE** = ``1`` -Update the timer during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`). +Update the timer every process (rendered) frame (see :ref:`Node.NOTIFICATION_INTERNAL_PROCESS<class_Node_constant_NOTIFICATION_INTERNAL_PROCESS>`). .. rst-class:: classref-section-separator @@ -131,16 +140,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **autostart** = ``false`` +:ref:`bool<class_bool>` **autostart** = ``false`` :ref:`🔗<class_Timer_property_autostart>` .. rst-class:: classref-property-setget -- void **set_autostart** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_autostart** **(** **)** +- |void| **set_autostart**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_autostart**\ (\ ) -If ``true``, the timer will automatically start when entering the scene tree. +If ``true``, the timer will start immediately when it enters the scene tree. -\ **Note:** This property is automatically set to ``false`` after the timer enters the scene tree and starts. +\ **Note:** After the timer enters the tree, this property is automatically set to ``false``. .. rst-class:: classref-item-separator @@ -150,14 +159,14 @@ If ``true``, the timer will automatically start when entering the scene tree. .. rst-class:: classref-property -:ref:`bool<class_bool>` **one_shot** = ``false`` +:ref:`bool<class_bool>` **one_shot** = ``false`` :ref:`🔗<class_Timer_property_one_shot>` .. rst-class:: classref-property-setget -- void **set_one_shot** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_one_shot** **(** **)** +- |void| **set_one_shot**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_one_shot**\ (\ ) -If ``true``, the timer will stop when reaching 0. If ``false``, it will restart. +If ``true``, the timer will stop after reaching the end. Otherwise, as by default, the timer will automatically restart. .. rst-class:: classref-item-separator @@ -167,14 +176,14 @@ If ``true``, the timer will stop when reaching 0. If ``false``, it will restart. .. rst-class:: classref-property -:ref:`bool<class_bool>` **paused** +:ref:`bool<class_bool>` **paused** :ref:`🔗<class_Timer_property_paused>` .. rst-class:: classref-property-setget -- void **set_paused** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_paused** **(** **)** +- |void| **set_paused**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_paused**\ (\ ) -If ``true``, the timer is paused and will not process until it is unpaused again, even if :ref:`start<class_Timer_method_start>` is called. +If ``true``, the timer is paused. A paused timer does not process until this property is set back to ``false``, even when :ref:`start<class_Timer_method_start>` is called. .. rst-class:: classref-item-separator @@ -184,14 +193,14 @@ If ``true``, the timer is paused and will not process until it is unpaused again .. rst-class:: classref-property -:ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **process_callback** = ``1`` +:ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **process_callback** = ``1`` :ref:`🔗<class_Timer_property_process_callback>` .. rst-class:: classref-property-setget -- void **set_timer_process_callback** **(** :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` value **)** -- :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **get_timer_process_callback** **(** **)** +- |void| **set_timer_process_callback**\ (\ value\: :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>`\ ) +- :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>` **get_timer_process_callback**\ (\ ) -Processing callback. See :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>`. +Specifies when the timer is updated during the main loop (see :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallback>`). .. rst-class:: classref-item-separator @@ -201,15 +210,15 @@ Processing callback. See :ref:`TimerProcessCallback<enum_Timer_TimerProcessCallb .. rst-class:: classref-property -:ref:`float<class_float>` **time_left** +:ref:`float<class_float>` **time_left** :ref:`🔗<class_Timer_property_time_left>` .. rst-class:: classref-property-setget -- :ref:`float<class_float>` **get_time_left** **(** **)** +- :ref:`float<class_float>` **get_time_left**\ (\ ) -The timer's remaining time in seconds. Returns 0 if the timer is inactive. +The timer's remaining time in seconds. This is always ``0`` if the timer is stopped. -\ **Note:** This value is read-only and cannot be set. It is based on :ref:`wait_time<class_Timer_property_wait_time>`, which can be set using :ref:`start<class_Timer_method_start>`. +\ **Note:** This property is read-only and cannot be modified. It is based on :ref:`wait_time<class_Timer_property_wait_time>`. .. rst-class:: classref-item-separator @@ -219,16 +228,16 @@ The timer's remaining time in seconds. Returns 0 if the timer is inactive. .. rst-class:: classref-property -:ref:`float<class_float>` **wait_time** = ``1.0`` +:ref:`float<class_float>` **wait_time** = ``1.0`` :ref:`🔗<class_Timer_property_wait_time>` .. rst-class:: classref-property-setget -- void **set_wait_time** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_wait_time** **(** **)** +- |void| **set_wait_time**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_wait_time**\ (\ ) -The wait time in seconds. +The time required for the timer to end, in seconds. This property can also be set every time :ref:`start<class_Timer_method_start>` is called. -\ **Note:** Timers can only emit once per rendered frame at most (or once per physics frame if :ref:`process_callback<class_Timer_property_process_callback>` is :ref:`TIMER_PROCESS_PHYSICS<class_Timer_constant_TIMER_PROCESS_PHYSICS>`). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node. Timers are affected by :ref:`Engine.time_scale<class_Engine_property_time_scale>`, a higher scale means quicker timeouts, and vice versa. +\ **Note:** Timers can only process once per physics or process frame (depending on the :ref:`process_callback<class_Timer_property_process_callback>`). An unstable framerate may cause the timer to end inconsistently, which is especially noticeable if the wait time is lower than roughly ``0.05`` seconds. For very short timers, it is recommended to write your own code instead of using a **Timer** node. Timers are also affected by :ref:`Engine.time_scale<class_Engine_property_time_scale>`. .. rst-class:: classref-section-separator @@ -243,9 +252,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_stopped** **(** **)** |const| +:ref:`bool<class_bool>` **is_stopped**\ (\ ) |const| :ref:`🔗<class_Timer_method_is_stopped>` -Returns ``true`` if the timer is stopped. +Returns ``true`` if the timer is stopped or has not started. .. rst-class:: classref-item-separator @@ -255,11 +264,11 @@ Returns ``true`` if the timer is stopped. .. rst-class:: classref-method -void **start** **(** :ref:`float<class_float>` time_sec=-1 **)** +|void| **start**\ (\ time_sec\: :ref:`float<class_float>` = -1\ ) :ref:`🔗<class_Timer_method_start>` -Starts the timer. Sets :ref:`wait_time<class_Timer_property_wait_time>` to ``time_sec`` if ``time_sec > 0``. This also resets the remaining time to :ref:`wait_time<class_Timer_property_wait_time>`. +Starts the timer, if it was not started already. Fails if the timer is not inside the tree. If ``time_sec`` is greater than ``0``, this value is used for the :ref:`wait_time<class_Timer_property_wait_time>`. -\ **Note:** This method will not resume a paused timer. See :ref:`paused<class_Timer_property_paused>`. +\ **Note:** This method does not resume a paused timer. See :ref:`paused<class_Timer_property_paused>`. .. rst-class:: classref-item-separator @@ -269,7 +278,7 @@ Starts the timer. Sets :ref:`wait_time<class_Timer_property_wait_time>` to ``tim .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_Timer_method_stop>` Stops the timer. @@ -280,3 +289,4 @@ Stops the timer. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tlsoptions.rst b/classes/class_tlsoptions.rst index e544df1a038..c7f121a1ca6 100644 --- a/classes/class_tlsoptions.rst +++ b/classes/class_tlsoptions.rst @@ -47,13 +47,25 @@ Methods .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TLSOptions<class_TLSOptions>` | :ref:`client<class_TLSOptions_method_client>` **(** :ref:`X509Certificate<class_X509Certificate>` trusted_chain=null, :ref:`String<class_String>` common_name_override="" **)** |static| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TLSOptions<class_TLSOptions>` | :ref:`client_unsafe<class_TLSOptions_method_client_unsafe>` **(** :ref:`X509Certificate<class_X509Certificate>` trusted_chain=null **)** |static| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TLSOptions<class_TLSOptions>` | :ref:`server<class_TLSOptions_method_server>` **(** :ref:`CryptoKey<class_CryptoKey>` key, :ref:`X509Certificate<class_X509Certificate>` certificate **)** |static| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TLSOptions<class_TLSOptions>` | :ref:`client<class_TLSOptions_method_client>`\ (\ trusted_chain\: :ref:`X509Certificate<class_X509Certificate>` = null, common_name_override\: :ref:`String<class_String>` = ""\ ) |static| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TLSOptions<class_TLSOptions>` | :ref:`client_unsafe<class_TLSOptions_method_client_unsafe>`\ (\ trusted_chain\: :ref:`X509Certificate<class_X509Certificate>` = null\ ) |static| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_common_name_override<class_TLSOptions_method_get_common_name_override>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`X509Certificate<class_X509Certificate>` | :ref:`get_own_certificate<class_TLSOptions_method_get_own_certificate>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CryptoKey<class_CryptoKey>` | :ref:`get_private_key<class_TLSOptions_method_get_private_key>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`X509Certificate<class_X509Certificate>` | :ref:`get_trusted_ca_chain<class_TLSOptions_method_get_trusted_ca_chain>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_server<class_TLSOptions_method_is_server>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_unsafe_client<class_TLSOptions_method_is_unsafe_client>`\ (\ ) |const| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TLSOptions<class_TLSOptions>` | :ref:`server<class_TLSOptions_method_server>`\ (\ key\: :ref:`CryptoKey<class_CryptoKey>`, certificate\: :ref:`X509Certificate<class_X509Certificate>`\ ) |static| | + +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,11 +80,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`TLSOptions<class_TLSOptions>` **client** **(** :ref:`X509Certificate<class_X509Certificate>` trusted_chain=null, :ref:`String<class_String>` common_name_override="" **)** |static| +:ref:`TLSOptions<class_TLSOptions>` **client**\ (\ trusted_chain\: :ref:`X509Certificate<class_X509Certificate>` = null, common_name_override\: :ref:`String<class_String>` = ""\ ) |static| :ref:`🔗<class_TLSOptions_method_client>` Creates a TLS client configuration which validates certificates and their common names (fully qualified domain names). -You can specify a custom ``trusted_chain`` of certification authorities (the default CA list will be used if ``null``), and optionally provide a ``common_name_override`` if you expect the certificate to have a common name other then the server FQDN. +You can specify a custom ``trusted_chain`` of certification authorities (the default CA list will be used if ``null``), and optionally provide a ``common_name_override`` if you expect the certificate to have a common name other than the server FQDN. \ **Note:** On the Web platform, TLS verification is always enforced against the CA list of the web browser. This is considered a security feature. @@ -84,7 +96,7 @@ You can specify a custom ``trusted_chain`` of certification authorities (the def .. rst-class:: classref-method -:ref:`TLSOptions<class_TLSOptions>` **client_unsafe** **(** :ref:`X509Certificate<class_X509Certificate>` trusted_chain=null **)** |static| +:ref:`TLSOptions<class_TLSOptions>` **client_unsafe**\ (\ trusted_chain\: :ref:`X509Certificate<class_X509Certificate>` = null\ ) |static| :ref:`🔗<class_TLSOptions_method_client_unsafe>` Creates an **unsafe** TLS client configuration where certificate validation is optional. You can optionally provide a valid ``trusted_chain``, but the common name of the certificates will never be checked. Using this configuration for purposes other than testing **is not recommended**. @@ -94,11 +106,83 @@ Creates an **unsafe** TLS client configuration where certificate validation is o ---- +.. _class_TLSOptions_method_get_common_name_override: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **get_common_name_override**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_get_common_name_override>` + +Returns the common name (domain name) override specified when creating with :ref:`client<class_TLSOptions_method_client>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TLSOptions_method_get_own_certificate: + +.. rst-class:: classref-method + +:ref:`X509Certificate<class_X509Certificate>` **get_own_certificate**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_get_own_certificate>` + +Returns the :ref:`X509Certificate<class_X509Certificate>` specified when creating with :ref:`server<class_TLSOptions_method_server>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TLSOptions_method_get_private_key: + +.. rst-class:: classref-method + +:ref:`CryptoKey<class_CryptoKey>` **get_private_key**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_get_private_key>` + +Returns the :ref:`CryptoKey<class_CryptoKey>` specified when creating with :ref:`server<class_TLSOptions_method_server>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TLSOptions_method_get_trusted_ca_chain: + +.. rst-class:: classref-method + +:ref:`X509Certificate<class_X509Certificate>` **get_trusted_ca_chain**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_get_trusted_ca_chain>` + +Returns the CA :ref:`X509Certificate<class_X509Certificate>` chain specified when creating with :ref:`client<class_TLSOptions_method_client>` or :ref:`client_unsafe<class_TLSOptions_method_client_unsafe>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TLSOptions_method_is_server: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_server**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_is_server>` + +Returns ``true`` if created with :ref:`server<class_TLSOptions_method_server>`, ``false`` otherwise. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TLSOptions_method_is_unsafe_client: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_unsafe_client**\ (\ ) |const| :ref:`🔗<class_TLSOptions_method_is_unsafe_client>` + +Returns ``true`` if created with :ref:`client_unsafe<class_TLSOptions_method_client_unsafe>`, ``false`` otherwise. + +.. rst-class:: classref-item-separator + +---- + .. _class_TLSOptions_method_server: .. rst-class:: classref-method -:ref:`TLSOptions<class_TLSOptions>` **server** **(** :ref:`CryptoKey<class_CryptoKey>` key, :ref:`X509Certificate<class_X509Certificate>` certificate **)** |static| +:ref:`TLSOptions<class_TLSOptions>` **server**\ (\ key\: :ref:`CryptoKey<class_CryptoKey>`, certificate\: :ref:`X509Certificate<class_X509Certificate>`\ ) |static| :ref:`🔗<class_TLSOptions_method_server>` Creates a TLS server configuration using the provided ``key`` and ``certificate``. @@ -111,3 +195,4 @@ Creates a TLS server configuration using the provided ``key`` and ``certificate` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_torusmesh.rst b/classes/class_torusmesh.rst index c10730f1534..3989092e86d 100644 --- a/classes/class_torusmesh.rst +++ b/classes/class_torusmesh.rst @@ -52,12 +52,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **inner_radius** = ``0.5`` +:ref:`float<class_float>` **inner_radius** = ``0.5`` :ref:`🔗<class_TorusMesh_property_inner_radius>` .. rst-class:: classref-property-setget -- void **set_inner_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_inner_radius** **(** **)** +- |void| **set_inner_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_inner_radius**\ (\ ) The inner radius of the torus. @@ -69,12 +69,12 @@ The inner radius of the torus. .. rst-class:: classref-property -:ref:`float<class_float>` **outer_radius** = ``1.0`` +:ref:`float<class_float>` **outer_radius** = ``1.0`` :ref:`🔗<class_TorusMesh_property_outer_radius>` .. rst-class:: classref-property-setget -- void **set_outer_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_outer_radius** **(** **)** +- |void| **set_outer_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_outer_radius**\ (\ ) The outer radius of the torus. @@ -86,12 +86,12 @@ The outer radius of the torus. .. rst-class:: classref-property -:ref:`int<class_int>` **ring_segments** = ``32`` +:ref:`int<class_int>` **ring_segments** = ``32`` :ref:`🔗<class_TorusMesh_property_ring_segments>` .. rst-class:: classref-property-setget -- void **set_ring_segments** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_ring_segments** **(** **)** +- |void| **set_ring_segments**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_ring_segments**\ (\ ) The number of edges each ring of the torus is constructed of. @@ -103,12 +103,12 @@ The number of edges each ring of the torus is constructed of. .. rst-class:: classref-property -:ref:`int<class_int>` **rings** = ``64`` +:ref:`int<class_int>` **rings** = ``64`` :ref:`🔗<class_TorusMesh_property_rings>` .. rst-class:: classref-property-setget -- void **set_rings** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_rings** **(** **)** +- |void| **set_rings**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_rings**\ (\ ) The number of slices the torus is constructed of. @@ -119,3 +119,4 @@ The number of slices the torus is constructed of. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_touchscreenbutton.rst b/classes/class_touchscreenbutton.rst index 30d20a4a231..fd295be67b6 100644 --- a/classes/class_touchscreenbutton.rst +++ b/classes/class_touchscreenbutton.rst @@ -61,9 +61,9 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_pressed<class_TouchScreenButton_method_is_pressed>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_pressed<class_TouchScreenButton_method_is_pressed>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,7 +78,7 @@ Signals .. rst-class:: classref-signal -**pressed** **(** **)** +**pressed**\ (\ ) :ref:`🔗<class_TouchScreenButton_signal_pressed>` Emitted when the button is pressed (down). @@ -90,7 +90,7 @@ Emitted when the button is pressed (down). .. rst-class:: classref-signal -**released** **(** **)** +**released**\ (\ ) :ref:`🔗<class_TouchScreenButton_signal_released>` Emitted when the button is released (up). @@ -107,7 +107,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **VisibilityMode**: +enum **VisibilityMode**: :ref:`🔗<enum_TouchScreenButton_VisibilityMode>` .. _class_TouchScreenButton_constant_VISIBILITY_ALWAYS: @@ -138,12 +138,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **action** = ``""`` +:ref:`String<class_String>` **action** = ``""`` :ref:`🔗<class_TouchScreenButton_property_action>` .. rst-class:: classref-property-setget -- void **set_action** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_action** **(** **)** +- |void| **set_action**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_action**\ (\ ) The button's action. Actions can be handled with :ref:`InputEventAction<class_InputEventAction>`. @@ -155,12 +155,12 @@ The button's action. Actions can be handled with :ref:`InputEventAction<class_In .. rst-class:: classref-property -:ref:`BitMap<class_BitMap>` **bitmask** +:ref:`BitMap<class_BitMap>` **bitmask** :ref:`🔗<class_TouchScreenButton_property_bitmask>` .. rst-class:: classref-property-setget -- void **set_bitmask** **(** :ref:`BitMap<class_BitMap>` value **)** -- :ref:`BitMap<class_BitMap>` **get_bitmask** **(** **)** +- |void| **set_bitmask**\ (\ value\: :ref:`BitMap<class_BitMap>`\ ) +- :ref:`BitMap<class_BitMap>` **get_bitmask**\ (\ ) The button's bitmask. @@ -172,12 +172,12 @@ The button's bitmask. .. rst-class:: classref-property -:ref:`bool<class_bool>` **passby_press** = ``false`` +:ref:`bool<class_bool>` **passby_press** = ``false`` :ref:`🔗<class_TouchScreenButton_property_passby_press>` .. rst-class:: classref-property-setget -- void **set_passby_press** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_passby_press_enabled** **(** **)** +- |void| **set_passby_press**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_passby_press_enabled**\ (\ ) If ``true``, the :ref:`pressed<class_TouchScreenButton_signal_pressed>` and :ref:`released<class_TouchScreenButton_signal_released>` signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button. @@ -191,12 +191,12 @@ If ``true``, the :ref:`pressed<class_TouchScreenButton_signal_pressed>` and :ref .. rst-class:: classref-property -:ref:`Shape2D<class_Shape2D>` **shape** +:ref:`Shape2D<class_Shape2D>` **shape** :ref:`🔗<class_TouchScreenButton_property_shape>` .. rst-class:: classref-property-setget -- void **set_shape** **(** :ref:`Shape2D<class_Shape2D>` value **)** -- :ref:`Shape2D<class_Shape2D>` **get_shape** **(** **)** +- |void| **set_shape**\ (\ value\: :ref:`Shape2D<class_Shape2D>`\ ) +- :ref:`Shape2D<class_Shape2D>` **get_shape**\ (\ ) The button's shape. @@ -208,12 +208,12 @@ The button's shape. .. rst-class:: classref-property -:ref:`bool<class_bool>` **shape_centered** = ``true`` +:ref:`bool<class_bool>` **shape_centered** = ``true`` :ref:`🔗<class_TouchScreenButton_property_shape_centered>` .. rst-class:: classref-property-setget -- void **set_shape_centered** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shape_centered** **(** **)** +- |void| **set_shape_centered**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shape_centered**\ (\ ) If ``true``, the button's shape is centered in the provided texture. If no texture is used, this property has no effect. @@ -225,12 +225,12 @@ If ``true``, the button's shape is centered in the provided texture. If no textu .. rst-class:: classref-property -:ref:`bool<class_bool>` **shape_visible** = ``true`` +:ref:`bool<class_bool>` **shape_visible** = ``true`` :ref:`🔗<class_TouchScreenButton_property_shape_visible>` .. rst-class:: classref-property-setget -- void **set_shape_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_shape_visible** **(** **)** +- |void| **set_shape_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_shape_visible**\ (\ ) If ``true``, the button's shape is visible in the editor. @@ -242,12 +242,12 @@ If ``true``, the button's shape is visible in the editor. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_normal** +:ref:`Texture2D<class_Texture2D>` **texture_normal** :ref:`🔗<class_TouchScreenButton_property_texture_normal>` .. rst-class:: classref-property-setget -- void **set_texture_normal** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_normal** **(** **)** +- |void| **set_texture_normal**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_normal**\ (\ ) The button's texture for the normal state. @@ -259,12 +259,12 @@ The button's texture for the normal state. .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture_pressed** +:ref:`Texture2D<class_Texture2D>` **texture_pressed** :ref:`🔗<class_TouchScreenButton_property_texture_pressed>` .. rst-class:: classref-property-setget -- void **set_texture_pressed** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture_pressed** **(** **)** +- |void| **set_texture_pressed**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture_pressed**\ (\ ) The button's texture for the pressed state. @@ -276,12 +276,12 @@ The button's texture for the pressed state. .. rst-class:: classref-property -:ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` **visibility_mode** = ``0`` +:ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` **visibility_mode** = ``0`` :ref:`🔗<class_TouchScreenButton_property_visibility_mode>` .. rst-class:: classref-property-setget -- void **set_visibility_mode** **(** :ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` value **)** -- :ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` **get_visibility_mode** **(** **)** +- |void| **set_visibility_mode**\ (\ value\: :ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>`\ ) +- :ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` **get_visibility_mode**\ (\ ) The button's visibility mode. See :ref:`VisibilityMode<enum_TouchScreenButton_VisibilityMode>` for possible values. @@ -298,7 +298,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_pressed** **(** **)** |const| +:ref:`bool<class_bool>` **is_pressed**\ (\ ) |const| :ref:`🔗<class_TouchScreenButton_method_is_pressed>` Returns ``true`` if this button is currently pressed. @@ -309,3 +309,4 @@ Returns ``true`` if this button is currently pressed. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_transform2d.rst b/classes/class_transform2d.rst index 1ada96f7e39..ccf25f0fbbe 100644 --- a/classes/class_transform2d.rst +++ b/classes/class_transform2d.rst @@ -19,7 +19,7 @@ Description A 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of three :ref:`Vector2<class_Vector2>` values: :ref:`x<class_Transform2D_property_x>`, :ref:`y<class_Transform2D_property_y>`, and the :ref:`origin<class_Transform2D_property_origin>`. -For more information, read the "Matrices and transforms" documentation article. +For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. .. note:: @@ -34,9 +34,9 @@ Tutorials - :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` -- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__ +- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__ -- `2.5D Demo <https://godotengine.org/asset-library/asset/583>`__ +- `2.5D Game Demo <https://godotengine.org/asset-library/asset/2783>`__ .. rst-class:: classref-reftable-group @@ -62,17 +62,17 @@ Constructors .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>` **(** **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` from **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>` **(** :ref:`float<class_float>` rotation, :ref:`Vector2<class_Vector2>` position **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>` **(** :ref:`float<class_float>` rotation, :ref:`Vector2<class_Vector2>` scale, :ref:`float<class_float>` skew, :ref:`Vector2<class_Vector2>` position **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>` **(** :ref:`Vector2<class_Vector2>` x_axis, :ref:`Vector2<class_Vector2>` y_axis, :ref:`Vector2<class_Vector2>` origin **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>`\ (\ ) | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>`\ (\ from\: :ref:`Transform2D<class_Transform2D>`\ ) | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>`\ (\ rotation\: :ref:`float<class_float>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>`\ (\ rotation\: :ref:`float<class_float>`, scale\: :ref:`Vector2<class_Vector2>`, skew\: :ref:`float<class_float>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`Transform2D<class_Transform2D_constructor_Transform2D>`\ (\ x_axis\: :ref:`Vector2<class_Vector2>`, y_axis\: :ref:`Vector2<class_Vector2>`, origin\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -82,47 +82,49 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`affine_inverse<class_Transform2D_method_affine_inverse>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`basis_xform<class_Transform2D_method_basis_xform>` **(** :ref:`Vector2<class_Vector2>` v **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`basis_xform_inv<class_Transform2D_method_basis_xform_inv>` **(** :ref:`Vector2<class_Vector2>` v **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`determinant<class_Transform2D_method_determinant>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_origin<class_Transform2D_method_get_origin>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_rotation<class_Transform2D_method_get_rotation>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_scale<class_Transform2D_method_get_scale>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_skew<class_Transform2D_method_get_skew>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`interpolate_with<class_Transform2D_method_interpolate_with>` **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`float<class_float>` weight **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`inverse<class_Transform2D_method_inverse>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Transform2D_method_is_equal_approx>` **(** :ref:`Transform2D<class_Transform2D>` xform **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Transform2D_method_is_finite>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`looking_at<class_Transform2D_method_looking_at>` **(** :ref:`Vector2<class_Vector2>` target=Vector2(0, 0) **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`orthonormalized<class_Transform2D_method_orthonormalized>` **(** **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`rotated<class_Transform2D_method_rotated>` **(** :ref:`float<class_float>` angle **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`rotated_local<class_Transform2D_method_rotated_local>` **(** :ref:`float<class_float>` angle **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`scaled<class_Transform2D_method_scaled>` **(** :ref:`Vector2<class_Vector2>` scale **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`scaled_local<class_Transform2D_method_scaled_local>` **(** :ref:`Vector2<class_Vector2>` scale **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`translated<class_Transform2D_method_translated>` **(** :ref:`Vector2<class_Vector2>` offset **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`translated_local<class_Transform2D_method_translated_local>` **(** :ref:`Vector2<class_Vector2>` offset **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`affine_inverse<class_Transform2D_method_affine_inverse>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`basis_xform<class_Transform2D_method_basis_xform>`\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`basis_xform_inv<class_Transform2D_method_basis_xform_inv>`\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`determinant<class_Transform2D_method_determinant>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_origin<class_Transform2D_method_get_origin>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_rotation<class_Transform2D_method_get_rotation>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_scale<class_Transform2D_method_get_scale>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_skew<class_Transform2D_method_get_skew>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`interpolate_with<class_Transform2D_method_interpolate_with>`\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, weight\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`inverse<class_Transform2D_method_inverse>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_conformal<class_Transform2D_method_is_conformal>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Transform2D_method_is_equal_approx>`\ (\ xform\: :ref:`Transform2D<class_Transform2D>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Transform2D_method_is_finite>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`looking_at<class_Transform2D_method_looking_at>`\ (\ target\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`orthonormalized<class_Transform2D_method_orthonormalized>`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`rotated<class_Transform2D_method_rotated>`\ (\ angle\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`rotated_local<class_Transform2D_method_rotated_local>`\ (\ angle\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`scaled<class_Transform2D_method_scaled>`\ (\ scale\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`scaled_local<class_Transform2D_method_scaled_local>`\ (\ scale\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`translated<class_Transform2D_method_translated>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`translated_local<class_Transform2D_method_translated_local>`\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -132,25 +134,29 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Transform2D_operator_neq_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator *<class_Transform2D_operator_mul_PackedVector2Array>` **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`operator *<class_Transform2D_operator_mul_Rect2>` **(** :ref:`Rect2<class_Rect2>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Transform2D_operator_mul_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Transform2D_operator_eq_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator []<class_Transform2D_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Transform2D_operator_neq_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`operator *<class_Transform2D_operator_mul_PackedVector2Array>`\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`operator *<class_Transform2D_operator_mul_Rect2>`\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Transform2D_operator_mul_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`operator *<class_Transform2D_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`operator /<class_Transform2D_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`operator /<class_Transform2D_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Transform2D_operator_eq_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator []<class_Transform2D_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -165,7 +171,7 @@ Constants .. rst-class:: classref-constant -**IDENTITY** = ``Transform2D(1, 0, 0, 1, 0, 0)`` +**IDENTITY** = ``Transform2D(1, 0, 0, 1, 0, 0)`` :ref:`🔗<class_Transform2D_constant_IDENTITY>` The identity **Transform2D** with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY<class_Transform2D_constant_IDENTITY>` performs no transformation. @@ -173,7 +179,7 @@ The identity **Transform2D** with no translation, rotation or scaling applied. W .. rst-class:: classref-constant -**FLIP_X** = ``Transform2D(-1, 0, 0, 1, 0, 0)`` +**FLIP_X** = ``Transform2D(-1, 0, 0, 1, 0, 0)`` :ref:`🔗<class_Transform2D_constant_FLIP_X>` The **Transform2D** that will flip something along the X axis. @@ -181,7 +187,7 @@ The **Transform2D** that will flip something along the X axis. .. rst-class:: classref-constant -**FLIP_Y** = ``Transform2D(1, 0, 0, -1, 0, 0)`` +**FLIP_Y** = ``Transform2D(1, 0, 0, -1, 0, 0)`` :ref:`🔗<class_Transform2D_constant_FLIP_Y>` The **Transform2D** that will flip something along the Y axis. @@ -198,7 +204,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **origin** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **origin** = ``Vector2(0, 0)`` :ref:`🔗<class_Transform2D_property_origin>` The origin vector (column 2, the third column). Equivalent to array index ``2``. The origin vector represents translation. @@ -210,7 +216,7 @@ The origin vector (column 2, the third column). Equivalent to array index ``2``. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **x** = ``Vector2(1, 0)`` +:ref:`Vector2<class_Vector2>` **x** = ``Vector2(1, 0)`` :ref:`🔗<class_Transform2D_property_x>` The basis matrix's X vector (column 0). Equivalent to array index ``0``. @@ -222,7 +228,7 @@ The basis matrix's X vector (column 0). Equivalent to array index ``0``. .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **y** = ``Vector2(0, 1)`` +:ref:`Vector2<class_Vector2>` **y** = ``Vector2(0, 1)`` :ref:`🔗<class_Transform2D_property_y>` The basis matrix's Y vector (column 1). Equivalent to array index ``1``. @@ -239,7 +245,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Transform2D<class_Transform2D>` **Transform2D** **(** **)** +:ref:`Transform2D<class_Transform2D>` **Transform2D**\ (\ ) :ref:`🔗<class_Transform2D_constructor_Transform2D>` Constructs a default-initialized **Transform2D** set to :ref:`IDENTITY<class_Transform2D_constant_IDENTITY>`. @@ -249,7 +255,7 @@ Constructs a default-initialized **Transform2D** set to :ref:`IDENTITY<class_Tra .. rst-class:: classref-constructor -:ref:`Transform2D<class_Transform2D>` **Transform2D** **(** :ref:`Transform2D<class_Transform2D>` from **)** +:ref:`Transform2D<class_Transform2D>` **Transform2D**\ (\ from\: :ref:`Transform2D<class_Transform2D>`\ ) Constructs a **Transform2D** as a copy of the given **Transform2D**. @@ -259,7 +265,7 @@ Constructs a **Transform2D** as a copy of the given **Transform2D**. .. rst-class:: classref-constructor -:ref:`Transform2D<class_Transform2D>` **Transform2D** **(** :ref:`float<class_float>` rotation, :ref:`Vector2<class_Vector2>` position **)** +:ref:`Transform2D<class_Transform2D>` **Transform2D**\ (\ rotation\: :ref:`float<class_float>`, position\: :ref:`Vector2<class_Vector2>`\ ) Constructs the transform from a given angle (in radians) and position. @@ -269,7 +275,7 @@ Constructs the transform from a given angle (in radians) and position. .. rst-class:: classref-constructor -:ref:`Transform2D<class_Transform2D>` **Transform2D** **(** :ref:`float<class_float>` rotation, :ref:`Vector2<class_Vector2>` scale, :ref:`float<class_float>` skew, :ref:`Vector2<class_Vector2>` position **)** +:ref:`Transform2D<class_Transform2D>` **Transform2D**\ (\ rotation\: :ref:`float<class_float>`, scale\: :ref:`Vector2<class_Vector2>`, skew\: :ref:`float<class_float>`, position\: :ref:`Vector2<class_Vector2>`\ ) Constructs the transform from a given angle (in radians), scale, skew (in radians) and position. @@ -279,7 +285,7 @@ Constructs the transform from a given angle (in radians), scale, skew (in radian .. rst-class:: classref-constructor -:ref:`Transform2D<class_Transform2D>` **Transform2D** **(** :ref:`Vector2<class_Vector2>` x_axis, :ref:`Vector2<class_Vector2>` y_axis, :ref:`Vector2<class_Vector2>` origin **)** +:ref:`Transform2D<class_Transform2D>` **Transform2D**\ (\ x_axis\: :ref:`Vector2<class_Vector2>`, y_axis\: :ref:`Vector2<class_Vector2>`, origin\: :ref:`Vector2<class_Vector2>`\ ) Constructs the transform from 3 :ref:`Vector2<class_Vector2>` values representing :ref:`x<class_Transform2D_property_x>`, :ref:`y<class_Transform2D_property_y>`, and the :ref:`origin<class_Transform2D_property_origin>` (the three column vectors). @@ -296,9 +302,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **affine_inverse** **(** **)** |const| +:ref:`Transform2D<class_Transform2D>` **affine_inverse**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_affine_inverse>` -Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. +Returns the inverse of the transform, under the assumption that the basis is invertible (must have non-zero determinant). .. rst-class:: classref-item-separator @@ -308,11 +314,11 @@ Returns the inverse of the transform, under the assumption that the transformati .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **basis_xform** **(** :ref:`Vector2<class_Vector2>` v **)** |const| +:ref:`Vector2<class_Vector2>` **basis_xform**\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_basis_xform>` Returns a vector transformed (multiplied) by the basis matrix. -This method does not account for translation (the origin vector). +This method does not account for translation (the :ref:`origin<class_Transform2D_property_origin>` vector). .. rst-class:: classref-item-separator @@ -322,11 +328,15 @@ This method does not account for translation (the origin vector). .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **basis_xform_inv** **(** :ref:`Vector2<class_Vector2>` v **)** |const| +:ref:`Vector2<class_Vector2>` **basis_xform_inv**\ (\ v\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_basis_xform_inv>` -Returns a vector transformed (multiplied) by the inverse basis matrix. +Returns a vector transformed (multiplied) by the inverse basis matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -This method does not account for translation (the origin vector). +This method does not account for translation (the :ref:`origin<class_Transform2D_property_origin>` vector). + +\ ``transform.basis_xform_inv(vector)`` is equivalent to ``transform.inverse().basis_xform(vector)``. See :ref:`inverse<class_Transform2D_method_inverse>`. + +For non-orthonormal transforms (e.g. with scaling) ``transform.affine_inverse().basis_xform(vector)`` can be used instead. See :ref:`affine_inverse<class_Transform2D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -336,7 +346,7 @@ This method does not account for translation (the origin vector). .. rst-class:: classref-method -:ref:`float<class_float>` **determinant** **(** **)** |const| +:ref:`float<class_float>` **determinant**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_determinant>` Returns the determinant of the basis matrix. If the basis is uniformly scaled, then its determinant equals the square of the scale factor. @@ -350,7 +360,7 @@ A negative determinant means the basis was flipped, so one part of the scale is .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_origin** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_origin**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_get_origin>` Returns the transform's origin (translation). @@ -362,7 +372,7 @@ Returns the transform's origin (translation). .. rst-class:: classref-method -:ref:`float<class_float>` **get_rotation** **(** **)** |const| +:ref:`float<class_float>` **get_rotation**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_get_rotation>` Returns the transform's rotation (in radians). @@ -374,7 +384,7 @@ Returns the transform's rotation (in radians). .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_scale** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_scale**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_get_scale>` Returns the scale. @@ -386,7 +396,7 @@ Returns the scale. .. rst-class:: classref-method -:ref:`float<class_float>` **get_skew** **(** **)** |const| +:ref:`float<class_float>` **get_skew**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_get_skew>` Returns the transform's skew (in radians). @@ -398,7 +408,7 @@ Returns the transform's skew (in radians). .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **interpolate_with** **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`float<class_float>` weight **)** |const| +:ref:`Transform2D<class_Transform2D>` **interpolate_with**\ (\ xform\: :ref:`Transform2D<class_Transform2D>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform2D_method_interpolate_with>` Returns a transform interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0). @@ -410,9 +420,21 @@ Returns a transform interpolated between this transform and another by a given ` .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **inverse** **(** **)** |const| +:ref:`Transform2D<class_Transform2D>` **inverse**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_inverse>` -Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use :ref:`affine_inverse<class_Transform2D_method_affine_inverse>` for transforms with scaling). +Returns the inverse of the transform, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). Use :ref:`affine_inverse<class_Transform2D_method_affine_inverse>` for non-orthonormal transforms (e.g. with scaling). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform2D_method_is_conformal: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_conformal**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_is_conformal>` + +Returns ``true`` if the transform's basis is conformal, meaning it preserves angles and distance ratios, and may only be composed of rotation and uniform scale. Returns ``false`` if the transform's basis has non-uniform scale or shear/skew. This can be used to validate if the transform is non-distorted, which is important for physics and other use cases. .. rst-class:: classref-item-separator @@ -422,9 +444,9 @@ Returns the inverse of the transform, under the assumption that the transformati .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Transform2D<class_Transform2D>` xform **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ xform\: :ref:`Transform2D<class_Transform2D>`\ ) |const| :ref:`🔗<class_Transform2D_method_is_equal_approx>` -Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. .. rst-class:: classref-item-separator @@ -434,7 +456,7 @@ Returns ``true`` if this transform and ``xform`` are approximately equal, by cal .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_is_finite>` Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -446,7 +468,7 @@ Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_f .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **looking_at** **(** :ref:`Vector2<class_Vector2>` target=Vector2(0, 0) **)** |const| +:ref:`Transform2D<class_Transform2D>` **looking_at**\ (\ target\: :ref:`Vector2<class_Vector2>` = Vector2(0, 0)\ ) |const| :ref:`🔗<class_Transform2D_method_looking_at>` Returns a copy of the transform rotated such that the rotated X-axis points towards the ``target`` position. @@ -460,7 +482,7 @@ Operations take place in global space. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **orthonormalized** **(** **)** |const| +:ref:`Transform2D<class_Transform2D>` **orthonormalized**\ (\ ) |const| :ref:`🔗<class_Transform2D_method_orthonormalized>` Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). @@ -472,7 +494,7 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **rotated** **(** :ref:`float<class_float>` angle **)** |const| +:ref:`Transform2D<class_Transform2D>` **rotated**\ (\ angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform2D_method_rotated>` Returns a copy of the transform rotated by the given ``angle`` (in radians). @@ -488,7 +510,7 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **rotated_local** **(** :ref:`float<class_float>` angle **)** |const| +:ref:`Transform2D<class_Transform2D>` **rotated_local**\ (\ angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform2D_method_rotated_local>` Returns a copy of the transform rotated by the given ``angle`` (in radians). @@ -504,7 +526,7 @@ This can be seen as transforming with respect to the local frame. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **scaled** **(** :ref:`Vector2<class_Vector2>` scale **)** |const| +:ref:`Transform2D<class_Transform2D>` **scaled**\ (\ scale\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_scaled>` Returns a copy of the transform scaled by the given ``scale`` factor. @@ -520,7 +542,7 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **scaled_local** **(** :ref:`Vector2<class_Vector2>` scale **)** |const| +:ref:`Transform2D<class_Transform2D>` **scaled_local**\ (\ scale\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_scaled_local>` Returns a copy of the transform scaled by the given ``scale`` factor. @@ -536,7 +558,7 @@ This can be seen as transforming with respect to the local frame. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **translated** **(** :ref:`Vector2<class_Vector2>` offset **)** |const| +:ref:`Transform2D<class_Transform2D>` **translated**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_translated>` Returns a copy of the transform translated by the given ``offset``. @@ -552,7 +574,7 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **translated_local** **(** :ref:`Vector2<class_Vector2>` offset **)** |const| +:ref:`Transform2D<class_Transform2D>` **translated_local**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Transform2D_method_translated_local>` Returns a copy of the transform translated by the given ``offset``. @@ -573,7 +595,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Transform2D_operator_neq_Transform2D>` Returns ``true`` if the transforms are not equal. @@ -587,7 +609,7 @@ Returns ``true`` if the transforms are not equal. .. rst-class:: classref-operator -:ref:`PackedVector2Array<class_PackedVector2Array>` **operator *** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` right **)** +:ref:`PackedVector2Array<class_PackedVector2Array>` **operator ***\ (\ right\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) :ref:`🔗<class_Transform2D_operator_mul_PackedVector2Array>` Transforms (multiplies) each element of the :ref:`Vector2<class_Vector2>` array by the given **Transform2D** matrix. @@ -599,7 +621,7 @@ Transforms (multiplies) each element of the :ref:`Vector2<class_Vector2>` array .. rst-class:: classref-operator -:ref:`Rect2<class_Rect2>` **operator *** **(** :ref:`Rect2<class_Rect2>` right **)** +:ref:`Rect2<class_Rect2>` **operator ***\ (\ right\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_Transform2D_operator_mul_Rect2>` Transforms (multiplies) the :ref:`Rect2<class_Rect2>` by the given **Transform2D** matrix. @@ -611,7 +633,7 @@ Transforms (multiplies) the :ref:`Rect2<class_Rect2>` by the given **Transform2D .. rst-class:: classref-operator -:ref:`Transform2D<class_Transform2D>` **operator *** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`Transform2D<class_Transform2D>` **operator ***\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Transform2D_operator_mul_Transform2D>` Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). @@ -623,7 +645,7 @@ Composes these two transformation matrices by multiplying them together. This ha .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Transform2D_operator_mul_Vector2>` Transforms (multiplies) the :ref:`Vector2<class_Vector2>` by the given **Transform2D** matrix. @@ -635,9 +657,9 @@ Transforms (multiplies) the :ref:`Vector2<class_Vector2>` by the given **Transfo .. rst-class:: classref-operator -:ref:`Transform2D<class_Transform2D>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Transform2D<class_Transform2D>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Transform2D_operator_mul_float>` -This operator multiplies all components of the **Transform2D**, including the origin vector, which scales it uniformly. +This operator multiplies all components of the **Transform2D**, including the :ref:`origin<class_Transform2D_property_origin>` vector, which scales it uniformly. .. rst-class:: classref-item-separator @@ -647,9 +669,33 @@ This operator multiplies all components of the **Transform2D**, including the or .. rst-class:: classref-operator -:ref:`Transform2D<class_Transform2D>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Transform2D<class_Transform2D>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Transform2D_operator_mul_int>` + +This operator multiplies all components of the **Transform2D**, including the :ref:`origin<class_Transform2D_property_origin>` vector, which scales it uniformly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform2D_operator_div_float: + +.. rst-class:: classref-operator + +:ref:`Transform2D<class_Transform2D>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Transform2D_operator_div_float>` + +This operator divides all components of the **Transform2D**, including the :ref:`origin<class_Transform2D_property_origin>` vector, which inversely scales it uniformly. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform2D_operator_div_int: + +.. rst-class:: classref-operator + +:ref:`Transform2D<class_Transform2D>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Transform2D_operator_div_int>` -This operator multiplies all components of the **Transform2D**, including the origin vector, which scales it uniformly. +This operator divides all components of the **Transform2D**, including the :ref:`origin<class_Transform2D_property_origin>` vector, which inversely scales it uniformly. .. rst-class:: classref-item-separator @@ -659,7 +705,7 @@ This operator multiplies all components of the **Transform2D**, including the or .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Transform2D_operator_eq_Transform2D>` Returns ``true`` if the transforms are exactly equal. @@ -673,7 +719,7 @@ Returns ``true`` if the transforms are exactly equal. .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`Vector2<class_Vector2>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Transform2D_operator_idx_int>` Access transform components using their index. ``t[0]`` is equivalent to ``t.x``, ``t[1]`` is equivalent to ``t.y``, and ``t[2]`` is equivalent to ``t.origin``. @@ -684,3 +730,4 @@ Access transform components using their index. ``t[0]`` is equivalent to ``t.x`` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_transform3d.rst b/classes/class_transform3d.rst index 00d5abdd0ff..d5b7f62265d 100644 --- a/classes/class_transform3d.rst +++ b/classes/class_transform3d.rst @@ -17,9 +17,11 @@ A 3×4 matrix representing a 3D transformation. Description ----------- -A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a :ref:`basis<class_Transform3D_property_basis>` (first 3 columns) and a :ref:`Vector3<class_Vector3>` for the :ref:`origin<class_Transform3D_property_origin>` (last column). +The **Transform3D** built-in :ref:`Variant<class_Variant>` type is a 3×4 matrix representing a transformation in 3D space. It contains a :ref:`Basis<class_Basis>`, which on its own can represent rotation, scale, and shear. Additionally, combined with its own :ref:`origin<class_Transform3D_property_origin>`, the transform can also represent a translation. -For more information, read the "Matrices and transforms" documentation article. +For a general introduction, see the :doc:`Matrices and transforms <../tutorials/math/matrices_and_transforms>` tutorial. + +\ **Note:** Godot uses a `right-handed coordinate system <https://en.wikipedia.org/wiki/Right-hand_rule>`__, which is a common standard. For directions, the convention for built-in types like :ref:`Camera3D<class_Camera3D>` is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the `Importing 3D Scenes <../tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions>`__ tutorial. .. note:: @@ -36,11 +38,11 @@ Tutorials - :doc:`Using 3D transforms <../tutorials/3d/using_transforms>` -- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__ +- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__ -- `3D Platformer Demo <https://godotengine.org/asset-library/asset/125>`__ +- `3D Platformer Demo <https://godotengine.org/asset-library/asset/2748>`__ -- `2.5D Demo <https://godotengine.org/asset-library/asset/583>`__ +- `2.5D Game Demo <https://godotengine.org/asset-library/asset/2783>`__ .. rst-class:: classref-reftable-group @@ -64,17 +66,17 @@ Constructors .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` from **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Basis<class_Basis>` basis, :ref:`Vector3<class_Vector3>` origin **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Projection<class_Projection>` from **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>` **(** :ref:`Vector3<class_Vector3>` x_axis, :ref:`Vector3<class_Vector3>` y_axis, :ref:`Vector3<class_Vector3>` z_axis, :ref:`Vector3<class_Vector3>` origin **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>`\ (\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>`\ (\ from\: :ref:`Transform3D<class_Transform3D>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>`\ (\ basis\: :ref:`Basis<class_Basis>`, origin\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>`\ (\ from\: :ref:`Projection<class_Projection>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`Transform3D<class_Transform3D_constructor_Transform3D>`\ (\ x_axis\: :ref:`Vector3<class_Vector3>`, y_axis\: :ref:`Vector3<class_Vector3>`, z_axis\: :ref:`Vector3<class_Vector3>`, origin\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -84,33 +86,33 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`affine_inverse<class_Transform3D_method_affine_inverse>` **(** **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`interpolate_with<class_Transform3D_method_interpolate_with>` **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`float<class_float>` weight **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`inverse<class_Transform3D_method_inverse>` **(** **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` **(** :ref:`Transform3D<class_Transform3D>` xform **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Transform3D_method_is_finite>` **(** **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`looking_at<class_Transform3D_method_looking_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`orthonormalized<class_Transform3D_method_orthonormalized>` **(** **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`rotated<class_Transform3D_method_rotated>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`rotated_local<class_Transform3D_method_rotated_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`scaled<class_Transform3D_method_scaled>` **(** :ref:`Vector3<class_Vector3>` scale **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`scaled_local<class_Transform3D_method_scaled_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`translated<class_Transform3D_method_translated>` **(** :ref:`Vector3<class_Vector3>` offset **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`translated_local<class_Transform3D_method_translated_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`affine_inverse<class_Transform3D_method_affine_inverse>`\ (\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`interpolate_with<class_Transform3D_method_interpolate_with>`\ (\ xform\: :ref:`Transform3D<class_Transform3D>`, weight\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`inverse<class_Transform3D_method_inverse>`\ (\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>`\ (\ xform\: :ref:`Transform3D<class_Transform3D>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Transform3D_method_is_finite>`\ (\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`looking_at<class_Transform3D_method_looking_at>`\ (\ target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`orthonormalized<class_Transform3D_method_orthonormalized>`\ (\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`rotated<class_Transform3D_method_rotated>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`rotated_local<class_Transform3D_method_rotated_local>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`scaled<class_Transform3D_method_scaled>`\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`scaled_local<class_Transform3D_method_scaled_local>`\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`translated<class_Transform3D_method_translated>`\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`translated_local<class_Transform3D_method_translated_local>`\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -120,25 +122,29 @@ Operators .. table:: :widths: auto - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Transform3D_operator_neq_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`operator *<class_Transform3D_operator_mul_AABB>` **(** :ref:`AABB<class_AABB>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator *<class_Transform3D_operator_mul_PackedVector3Array>` **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Plane<class_Plane>` | :ref:`operator *<class_Transform3D_operator_mul_Plane>` **(** :ref:`Plane<class_Plane>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Transform3D_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Transform3D_operator_eq_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Transform3D_operator_neq_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`operator *<class_Transform3D_operator_mul_AABB>`\ (\ right\: :ref:`AABB<class_AABB>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`operator *<class_Transform3D_operator_mul_PackedVector3Array>`\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Plane<class_Plane>` | :ref:`operator *<class_Transform3D_operator_mul_Plane>`\ (\ right\: :ref:`Plane<class_Plane>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Transform3D_operator_mul_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`operator *<class_Transform3D_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`operator /<class_Transform3D_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`operator /<class_Transform3D_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Transform3D_operator_eq_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -153,33 +159,35 @@ Constants .. rst-class:: classref-constant -**IDENTITY** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +**IDENTITY** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_Transform3D_constant_IDENTITY>` + +A transform with no translation, no rotation, and its scale being ``1``. Its :ref:`basis<class_Transform3D_property_basis>` is equal to :ref:`Basis.IDENTITY<class_Basis_constant_IDENTITY>`. -**Transform3D** with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY<class_Transform3D_constant_IDENTITY>` performs no transformation. +When multiplied by another :ref:`Variant<class_Variant>` such as :ref:`AABB<class_AABB>` or another **Transform3D**, no transformation occurs. .. _class_Transform3D_constant_FLIP_X: .. rst-class:: classref-constant -**FLIP_X** = ``Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +**FLIP_X** = ``Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_Transform3D_constant_FLIP_X>` -**Transform3D** with mirroring applied perpendicular to the YZ plane. +**Transform3D** with mirroring applied perpendicular to the YZ plane. Its :ref:`basis<class_Transform3D_property_basis>` is equal to :ref:`Basis.FLIP_X<class_Basis_constant_FLIP_X>`. .. _class_Transform3D_constant_FLIP_Y: .. rst-class:: classref-constant -**FLIP_Y** = ``Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)`` +**FLIP_Y** = ``Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_Transform3D_constant_FLIP_Y>` -**Transform3D** with mirroring applied perpendicular to the XZ plane. +**Transform3D** with mirroring applied perpendicular to the XZ plane. Its :ref:`basis<class_Transform3D_property_basis>` is equal to :ref:`Basis.FLIP_Y<class_Basis_constant_FLIP_Y>`. .. _class_Transform3D_constant_FLIP_Z: .. rst-class:: classref-constant -**FLIP_Z** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)`` +**FLIP_Z** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)`` :ref:`🔗<class_Transform3D_constant_FLIP_Z>` -**Transform3D** with mirroring applied perpendicular to the XY plane. +**Transform3D** with mirroring applied perpendicular to the XY plane. Its :ref:`basis<class_Transform3D_property_basis>` is equal to :ref:`Basis.FLIP_Z<class_Basis_constant_FLIP_Z>`. .. rst-class:: classref-section-separator @@ -194,9 +202,9 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Basis<class_Basis>` **basis** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` +:ref:`Basis<class_Basis>` **basis** = ``Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)`` :ref:`🔗<class_Transform3D_property_basis>` -The basis is a matrix containing 3 :ref:`Vector3<class_Vector3>` as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. +The :ref:`Basis<class_Basis>` of this transform. It is composed by 3 axes (:ref:`Basis.x<class_Basis_property_x>`, :ref:`Basis.y<class_Basis_property_y>`, and :ref:`Basis.z<class_Basis_property_z>`). Together, these represent the transform's rotation, scale, and shear. .. rst-class:: classref-item-separator @@ -206,9 +214,9 @@ The basis is a matrix containing 3 :ref:`Vector3<class_Vector3>` as its columns: .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **origin** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **origin** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Transform3D_property_origin>` -The translation offset of the transform (column 3, the fourth column). Equivalent to array index ``3``. +The translation offset of this transform. In 3D space, this can be seen as the position. .. rst-class:: classref-section-separator @@ -223,9 +231,9 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** **)** +:ref:`Transform3D<class_Transform3D>` **Transform3D**\ (\ ) :ref:`🔗<class_Transform3D_constructor_Transform3D>` -Constructs a default-initialized **Transform3D** set to :ref:`IDENTITY<class_Transform3D_constant_IDENTITY>`. +Constructs a **Transform3D** identical to the :ref:`IDENTITY<class_Transform3D_constant_IDENTITY>`. .. rst-class:: classref-item-separator @@ -233,7 +241,7 @@ Constructs a default-initialized **Transform3D** set to :ref:`IDENTITY<class_Tra .. rst-class:: classref-constructor -:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Transform3D<class_Transform3D>` from **)** +:ref:`Transform3D<class_Transform3D>` **Transform3D**\ (\ from\: :ref:`Transform3D<class_Transform3D>`\ ) Constructs a **Transform3D** as a copy of the given **Transform3D**. @@ -243,9 +251,9 @@ Constructs a **Transform3D** as a copy of the given **Transform3D**. .. rst-class:: classref-constructor -:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Basis<class_Basis>` basis, :ref:`Vector3<class_Vector3>` origin **)** +:ref:`Transform3D<class_Transform3D>` **Transform3D**\ (\ basis\: :ref:`Basis<class_Basis>`, origin\: :ref:`Vector3<class_Vector3>`\ ) -Constructs a Transform3D from a :ref:`Basis<class_Basis>` and :ref:`Vector3<class_Vector3>`. +Constructs a **Transform3D** from a :ref:`Basis<class_Basis>` and :ref:`Vector3<class_Vector3>`. .. rst-class:: classref-item-separator @@ -253,9 +261,9 @@ Constructs a Transform3D from a :ref:`Basis<class_Basis>` and :ref:`Vector3<clas .. rst-class:: classref-constructor -:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Projection<class_Projection>` from **)** +:ref:`Transform3D<class_Transform3D>` **Transform3D**\ (\ from\: :ref:`Projection<class_Projection>`\ ) -Constructs a Transform3D from a :ref:`Projection<class_Projection>` by trimming the last row of the projection matrix (``from.x.w``, ``from.y.w``, ``from.z.w``, and ``from.w.w`` are not copied over). +Constructs a **Transform3D** from a :ref:`Projection<class_Projection>`. Because **Transform3D** is a 3×4 matrix and :ref:`Projection<class_Projection>` is a 4×4 matrix, this operation trims the last row of the projection matrix (``from.x.w``, ``from.y.w``, ``from.z.w``, and ``from.w.w`` are not included in the new transform). .. rst-class:: classref-item-separator @@ -263,9 +271,11 @@ Constructs a Transform3D from a :ref:`Projection<class_Projection>` by trimming .. rst-class:: classref-constructor -:ref:`Transform3D<class_Transform3D>` **Transform3D** **(** :ref:`Vector3<class_Vector3>` x_axis, :ref:`Vector3<class_Vector3>` y_axis, :ref:`Vector3<class_Vector3>` z_axis, :ref:`Vector3<class_Vector3>` origin **)** +:ref:`Transform3D<class_Transform3D>` **Transform3D**\ (\ x_axis\: :ref:`Vector3<class_Vector3>`, y_axis\: :ref:`Vector3<class_Vector3>`, z_axis\: :ref:`Vector3<class_Vector3>`, origin\: :ref:`Vector3<class_Vector3>`\ ) -Constructs a Transform3D from four :ref:`Vector3<class_Vector3>` values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). +Constructs a **Transform3D** from four :ref:`Vector3<class_Vector3>` values (also called matrix columns). + +The first three arguments are the :ref:`basis<class_Transform3D_property_basis>`'s axes (:ref:`Basis.x<class_Basis_property_x>`, :ref:`Basis.y<class_Basis_property_y>`, and :ref:`Basis.z<class_Basis_property_z>`). .. rst-class:: classref-section-separator @@ -280,9 +290,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **affine_inverse** **(** **)** |const| +:ref:`Transform3D<class_Transform3D>` **affine_inverse**\ (\ ) |const| :ref:`🔗<class_Transform3D_method_affine_inverse>` + +Returns the inverted version of this transform. Unlike :ref:`inverse<class_Transform3D_method_inverse>`, this method works with almost any :ref:`basis<class_Transform3D_property_basis>`, including non-uniform ones, but is slower. See also :ref:`Basis.inverse<class_Basis_method_inverse>`. -Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. +\ **Note:** For this method to return correctly, the transform's :ref:`basis<class_Transform3D_property_basis>` needs to have a determinant that is not exactly ``0`` (see :ref:`Basis.determinant<class_Basis_method_determinant>`). .. rst-class:: classref-item-separator @@ -292,9 +304,11 @@ Returns the inverse of the transform, under the assumption that the transformati .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **interpolate_with** **(** :ref:`Transform3D<class_Transform3D>` xform, :ref:`float<class_float>` weight **)** |const| +:ref:`Transform3D<class_Transform3D>` **interpolate_with**\ (\ xform\: :ref:`Transform3D<class_Transform3D>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform3D_method_interpolate_with>` -Returns a transform interpolated between this transform and another by a given ``weight`` (on the range of 0.0 to 1.0). +Returns the result of the linear interpolation between this transform and ``xform`` by the given ``weight``. + +The ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). Values outside this range are allowed and can be used to perform *extrapolation* instead. .. rst-class:: classref-item-separator @@ -304,9 +318,11 @@ Returns a transform interpolated between this transform and another by a given ` .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **inverse** **(** **)** |const| +:ref:`Transform3D<class_Transform3D>` **inverse**\ (\ ) |const| :ref:`🔗<class_Transform3D_method_inverse>` + +Returns the inverted version of this transform. See also :ref:`Basis.inverse<class_Basis_method_inverse>`. -Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use :ref:`affine_inverse<class_Transform3D_method_affine_inverse>` for transforms with scaling). +\ **Note:** For this method to return correctly, the transform's :ref:`basis<class_Transform3D_property_basis>` needs to be *orthonormal* (see :ref:`Basis.orthonormalized<class_Basis_method_orthonormalized>`). That means, the basis should only represent a rotation. If it does not, use :ref:`affine_inverse<class_Transform3D_method_affine_inverse>` instead. .. rst-class:: classref-item-separator @@ -316,9 +332,9 @@ Returns the inverse of the transform, under the assumption that the transformati .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Transform3D<class_Transform3D>` xform **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ xform\: :ref:`Transform3D<class_Transform3D>`\ ) |const| :ref:`🔗<class_Transform3D_method_is_equal_approx>` -Returns ``true`` if this transform and ``xform`` are approximately equal, by calling ``is_equal_approx`` on each component. +Returns ``true`` if this transform and ``xform`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. .. rst-class:: classref-item-separator @@ -328,7 +344,7 @@ Returns ``true`` if this transform and ``xform`` are approximately equal, by cal .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Transform3D_method_is_finite>` Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -340,9 +356,9 @@ Returns ``true`` if this transform is finite, by calling :ref:`@GlobalScope.is_f .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **looking_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** |const| +:ref:`Transform3D<class_Transform3D>` **looking_at**\ (\ target\: :ref:`Vector3<class_Vector3>`, up\: :ref:`Vector3<class_Vector3>` = Vector3(0, 1, 0), use_model_front\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_Transform3D_method_looking_at>` -Returns a copy of the transform rotated such that the forward axis (-Z) points towards the ``target`` position. +Returns a copy of this transform rotated so that the forward axis (-Z) points towards the ``target`` position. The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The ``target`` and ``up`` vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. @@ -356,9 +372,9 @@ If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forw .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **orthonormalized** **(** **)** |const| +:ref:`Transform3D<class_Transform3D>` **orthonormalized**\ (\ ) |const| :ref:`🔗<class_Transform3D_method_orthonormalized>` -Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). +Returns a copy of this transform with its :ref:`basis<class_Transform3D_property_basis>` orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of ``1``), which also means it can only represent rotation. See also :ref:`Basis.orthonormalized<class_Basis_method_orthonormalized>`. .. rst-class:: classref-item-separator @@ -368,9 +384,9 @@ Returns the transform with the basis orthogonal (90 degrees), and normalized axi .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **rotated** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| +:ref:`Transform3D<class_Transform3D>` **rotated**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform3D_method_rotated>` -Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). +Returns a copy of this transform rotated around the given ``axis`` by the given ``angle`` (in radians). The ``axis`` must be a normalized vector. @@ -386,9 +402,9 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **rotated_local** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| +:ref:`Transform3D<class_Transform3D>` **rotated_local**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Transform3D_method_rotated_local>` -Returns a copy of the transform rotated around the given ``axis`` by the given ``angle`` (in radians). +Returns a copy of this transform rotated around the given ``axis`` by the given ``angle`` (in radians). The ``axis`` must be a normalized vector. @@ -404,9 +420,9 @@ This can be seen as transforming with respect to the local frame. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **scaled** **(** :ref:`Vector3<class_Vector3>` scale **)** |const| +:ref:`Transform3D<class_Transform3D>` **scaled**\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Transform3D_method_scaled>` -Returns a copy of the transform scaled by the given ``scale`` factor. +Returns a copy of this transform scaled by the given ``scale`` factor. This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the left, i.e., ``S * X``. @@ -420,9 +436,9 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **scaled_local** **(** :ref:`Vector3<class_Vector3>` scale **)** |const| +:ref:`Transform3D<class_Transform3D>` **scaled_local**\ (\ scale\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Transform3D_method_scaled_local>` -Returns a copy of the transform scaled by the given ``scale`` factor. +Returns a copy of this transform scaled by the given ``scale`` factor. This method is an optimized version of multiplying the given transform ``X`` with a corresponding scaling transform ``S`` from the right, i.e., ``X * S``. @@ -436,9 +452,9 @@ This can be seen as transforming with respect to the local frame. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **translated** **(** :ref:`Vector3<class_Vector3>` offset **)** |const| +:ref:`Transform3D<class_Transform3D>` **translated**\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Transform3D_method_translated>` -Returns a copy of the transform translated by the given ``offset``. +Returns a copy of this transform translated by the given ``offset``. This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the left, i.e., ``T * X``. @@ -452,9 +468,9 @@ This can be seen as transforming with respect to the global/parent frame. .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **translated_local** **(** :ref:`Vector3<class_Vector3>` offset **)** |const| +:ref:`Transform3D<class_Transform3D>` **translated_local**\ (\ offset\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Transform3D_method_translated_local>` -Returns a copy of the transform translated by the given ``offset``. +Returns a copy of this transform translated by the given ``offset``. This method is an optimized version of multiplying the given transform ``X`` with a corresponding translation transform ``T`` from the right, i.e., ``X * T``. @@ -473,9 +489,9 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Transform3D_operator_neq_Transform3D>` -Returns ``true`` if the transforms are not equal. +Returns ``true`` if the components of both transforms are not equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` instead, which is more reliable. @@ -487,9 +503,9 @@ Returns ``true`` if the transforms are not equal. .. rst-class:: classref-operator -:ref:`AABB<class_AABB>` **operator *** **(** :ref:`AABB<class_AABB>` right **)** +:ref:`AABB<class_AABB>` **operator ***\ (\ right\: :ref:`AABB<class_AABB>`\ ) :ref:`🔗<class_Transform3D_operator_mul_AABB>` -Transforms (multiplies) the :ref:`AABB<class_AABB>` by the given **Transform3D** matrix. +Transforms (multiplies) the :ref:`AABB<class_AABB>` by this transformation matrix. .. rst-class:: classref-item-separator @@ -499,9 +515,11 @@ Transforms (multiplies) the :ref:`AABB<class_AABB>` by the given **Transform3D** .. rst-class:: classref-operator -:ref:`PackedVector3Array<class_PackedVector3Array>` **operator *** **(** :ref:`PackedVector3Array<class_PackedVector3Array>` right **)** +:ref:`PackedVector3Array<class_PackedVector3Array>` **operator ***\ (\ right\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_Transform3D_operator_mul_PackedVector3Array>` -Transforms (multiplies) each element of the :ref:`Vector3<class_Vector3>` array by the given **Transform3D** matrix. +Transforms (multiplies) every :ref:`Vector3<class_Vector3>` element of the given :ref:`PackedVector3Array<class_PackedVector3Array>` by this transformation matrix. + +On larger arrays, this operation is much faster than transforming each :ref:`Vector3<class_Vector3>` individually. .. rst-class:: classref-item-separator @@ -511,9 +529,9 @@ Transforms (multiplies) each element of the :ref:`Vector3<class_Vector3>` array .. rst-class:: classref-operator -:ref:`Plane<class_Plane>` **operator *** **(** :ref:`Plane<class_Plane>` right **)** +:ref:`Plane<class_Plane>` **operator ***\ (\ right\: :ref:`Plane<class_Plane>`\ ) :ref:`🔗<class_Transform3D_operator_mul_Plane>` -Transforms (multiplies) the :ref:`Plane<class_Plane>` by the given **Transform3D** transformation matrix. +Transforms (multiplies) the :ref:`Plane<class_Plane>` by this transformation matrix. .. rst-class:: classref-item-separator @@ -523,9 +541,19 @@ Transforms (multiplies) the :ref:`Plane<class_Plane>` by the given **Transform3D .. rst-class:: classref-operator -:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`Transform3D<class_Transform3D>` **operator ***\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Transform3D_operator_mul_Transform3D>` + +Transforms (multiplies) this transform by the ``right`` transform. -Composes these two transformation matrices by multiplying them together. This has the effect of transforming the second transform (the child) by the first transform (the parent). +This is the operation performed between parent and child :ref:`Node3D<class_Node3D>`\ s. + +\ **Note:** If you need to only modify one attribute of this transform, consider using one of the following methods, instead: + +- For translation, see :ref:`translated<class_Transform3D_method_translated>` or :ref:`translated_local<class_Transform3D_method_translated_local>`. + +- For rotation, see :ref:`rotated<class_Transform3D_method_rotated>` or :ref:`rotated_local<class_Transform3D_method_rotated_local>`. + +- For scale, see :ref:`scaled<class_Transform3D_method_scaled>` or :ref:`scaled_local<class_Transform3D_method_scaled_local>`. .. rst-class:: classref-item-separator @@ -535,9 +563,9 @@ Composes these two transformation matrices by multiplying them together. This ha .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Transform3D_operator_mul_Vector3>` -Transforms (multiplies) the :ref:`Vector3<class_Vector3>` by the given **Transform3D** matrix. +Transforms (multiplies) the :ref:`Vector3<class_Vector3>` by this transformation matrix. .. rst-class:: classref-item-separator @@ -547,9 +575,9 @@ Transforms (multiplies) the :ref:`Vector3<class_Vector3>` by the given **Transfo .. rst-class:: classref-operator -:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Transform3D<class_Transform3D>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Transform3D_operator_mul_float>` -This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly. +Multiplies all components of the **Transform3D** by the given :ref:`float<class_float>`, including the :ref:`origin<class_Transform3D_property_origin>`. This affects the transform's scale uniformly, scaling the :ref:`basis<class_Transform3D_property_basis>`. .. rst-class:: classref-item-separator @@ -559,9 +587,33 @@ This operator multiplies all components of the **Transform3D**, including the or .. rst-class:: classref-operator -:ref:`Transform3D<class_Transform3D>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Transform3D<class_Transform3D>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Transform3D_operator_mul_int>` + +Multiplies all components of the **Transform3D** by the given :ref:`int<class_int>`, including the :ref:`origin<class_Transform3D_property_origin>`. This affects the transform's scale uniformly, scaling the :ref:`basis<class_Transform3D_property_basis>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform3D_operator_div_float: + +.. rst-class:: classref-operator + +:ref:`Transform3D<class_Transform3D>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Transform3D_operator_div_float>` + +Divides all components of the **Transform3D** by the given :ref:`float<class_float>`, including the :ref:`origin<class_Transform3D_property_origin>`. This affects the transform's scale uniformly, scaling the :ref:`basis<class_Transform3D_property_basis>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform3D_operator_div_int: + +.. rst-class:: classref-operator + +:ref:`Transform3D<class_Transform3D>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Transform3D_operator_div_int>` -This operator multiplies all components of the **Transform3D**, including the origin vector, which scales it uniformly. +Divides all components of the **Transform3D** by the given :ref:`int<class_int>`, including the :ref:`origin<class_Transform3D_property_origin>`. This affects the transform's scale uniformly, scaling the :ref:`basis<class_Transform3D_property_basis>`. .. rst-class:: classref-item-separator @@ -571,9 +623,9 @@ This operator multiplies all components of the **Transform3D**, including the or .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Transform3D_operator_eq_Transform3D>` -Returns ``true`` if the transforms are exactly equal. +Returns ``true`` if the components of both transforms are exactly equal. \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx<class_Transform3D_method_is_equal_approx>` instead, which is more reliable. @@ -584,3 +636,4 @@ Returns ``true`` if the transforms are exactly equal. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_translation.rst b/classes/class_translation.rst index 370d0e82883..56e84a449ee 100644 --- a/classes/class_translation.rst +++ b/classes/class_translation.rst @@ -52,27 +52,27 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`_get_message<class_Translation_method__get_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`_get_plural_message<class_Translation_method__get_plural_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` src_plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_message<class_Translation_method_add_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` xlated_message, :ref:`StringName<class_StringName>` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_plural_message<class_Translation_method_add_plural_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`PackedStringArray<class_PackedStringArray>` xlated_messages, :ref:`StringName<class_StringName>` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_message<class_Translation_method_erase_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_message<class_Translation_method_get_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_message_count<class_Translation_method_get_message_count>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_message_list<class_Translation_method_get_message_list>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`get_plural_message<class_Translation_method_get_plural_message>` **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` src_plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_translated_message_list<class_Translation_method_get_translated_message_list>` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`_get_message<class_Translation_private_method__get_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`_get_plural_message<class_Translation_private_method__get_plural_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, src_plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_message<class_Translation_method_add_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, xlated_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_plural_message<class_Translation_method_add_plural_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, xlated_messages\: :ref:`PackedStringArray<class_PackedStringArray>`, context\: :ref:`StringName<class_StringName>` = &""\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_message<class_Translation_method_erase_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_message<class_Translation_method_get_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_message_count<class_Translation_method_get_message_count>`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_message_list<class_Translation_method_get_message_list>`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`get_plural_message<class_Translation_method_get_plural_message>`\ (\ src_message\: :ref:`StringName<class_StringName>`, src_plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_translated_message_list<class_Translation_method_get_translated_message_list>`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **locale** = ``"en"`` +:ref:`String<class_String>` **locale** = ``"en"`` :ref:`🔗<class_Translation_property_locale>` .. rst-class:: classref-property-setget -- void **set_locale** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_locale** **(** **)** +- |void| **set_locale**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_locale**\ (\ ) The locale of the translation. @@ -105,11 +105,11 @@ The locale of the translation. Method Descriptions ------------------- -.. _class_Translation_method__get_message: +.. _class_Translation_private_method__get_message: .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **_get_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context **)** |virtual| |const| +:ref:`StringName<class_StringName>` **_get_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_Translation_private_method__get_message>` Virtual method to override :ref:`get_message<class_Translation_method_get_message>`. @@ -117,11 +117,11 @@ Virtual method to override :ref:`get_message<class_Translation_method_get_messag ---- -.. _class_Translation_method__get_plural_message: +.. _class_Translation_private_method__get_plural_message: .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **_get_plural_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` src_plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context **)** |virtual| |const| +:ref:`StringName<class_StringName>` **_get_plural_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, src_plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_Translation_private_method__get_plural_message>` Virtual method to override :ref:`get_plural_message<class_Translation_method_get_plural_message>`. @@ -133,7 +133,7 @@ Virtual method to override :ref:`get_plural_message<class_Translation_method_get .. rst-class:: classref-method -void **add_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` xlated_message, :ref:`StringName<class_StringName>` context="" **)** +|void| **add_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, xlated_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) :ref:`🔗<class_Translation_method_add_message>` Adds a message if nonexistent, followed by its translation. @@ -147,7 +147,7 @@ An additional context could be used to specify the translation context or differ .. rst-class:: classref-method -void **add_plural_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`PackedStringArray<class_PackedStringArray>` xlated_messages, :ref:`StringName<class_StringName>` context="" **)** +|void| **add_plural_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, xlated_messages\: :ref:`PackedStringArray<class_PackedStringArray>`, context\: :ref:`StringName<class_StringName>` = &""\ ) :ref:`🔗<class_Translation_method_add_plural_message>` Adds a message involving plural translation if nonexistent, followed by its translation. @@ -161,7 +161,7 @@ An additional context could be used to specify the translation context or differ .. rst-class:: classref-method -void **erase_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context="" **)** +|void| **erase_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) :ref:`🔗<class_Translation_method_erase_message>` Erases a message. @@ -173,7 +173,7 @@ Erases a message. .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`StringName<class_StringName>` **get_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Translation_method_get_message>` Returns a message's translation. @@ -185,7 +185,7 @@ Returns a message's translation. .. rst-class:: classref-method -:ref:`int<class_int>` **get_message_count** **(** **)** |const| +:ref:`int<class_int>` **get_message_count**\ (\ ) |const| :ref:`🔗<class_Translation_method_get_message_count>` Returns the number of existing messages. @@ -197,7 +197,7 @@ Returns the number of existing messages. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_message_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_message_list**\ (\ ) |const| :ref:`🔗<class_Translation_method_get_message_list>` Returns all the messages (keys). @@ -209,7 +209,7 @@ Returns all the messages (keys). .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **get_plural_message** **(** :ref:`StringName<class_StringName>` src_message, :ref:`StringName<class_StringName>` src_plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`StringName<class_StringName>` **get_plural_message**\ (\ src_message\: :ref:`StringName<class_StringName>`, src_plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Translation_method_get_plural_message>` Returns a message's translation involving plurals. @@ -223,7 +223,7 @@ The number ``n`` is the number or quantity of the plural object. It will be used .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_translated_message_list** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_translated_message_list**\ (\ ) |const| :ref:`🔗<class_Translation_method_get_translated_message_list>` Returns all the messages (translated text). @@ -234,3 +234,4 @@ Returns all the messages (translated text). .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_translationserver.rst b/classes/class_translationserver.rst index f66b5e56703..e7fc35236ef 100644 --- a/classes/class_translationserver.rst +++ b/classes/class_translationserver.rst @@ -50,49 +50,49 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_translation<class_TranslationServer_method_add_translation>` **(** :ref:`Translation<class_Translation>` translation **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_TranslationServer_method_clear>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`compare_locales<class_TranslationServer_method_compare_locales>` **(** :ref:`String<class_String>` locale_a, :ref:`String<class_String>` locale_b **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_countries<class_TranslationServer_method_get_all_countries>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_languages<class_TranslationServer_method_get_all_languages>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_scripts<class_TranslationServer_method_get_all_scripts>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_country_name<class_TranslationServer_method_get_country_name>` **(** :ref:`String<class_String>` country **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_language_name<class_TranslationServer_method_get_language_name>` **(** :ref:`String<class_String>` language **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_loaded_locales<class_TranslationServer_method_get_loaded_locales>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_locale<class_TranslationServer_method_get_locale>` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_locale_name<class_TranslationServer_method_get_locale_name>` **(** :ref:`String<class_String>` locale **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_script_name<class_TranslationServer_method_get_script_name>` **(** :ref:`String<class_String>` script **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_tool_locale<class_TranslationServer_method_get_tool_locale>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Translation<class_Translation>` | :ref:`get_translation_object<class_TranslationServer_method_get_translation_object>` **(** :ref:`String<class_String>` locale **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`pseudolocalize<class_TranslationServer_method_pseudolocalize>` **(** :ref:`StringName<class_StringName>` message **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reload_pseudolocalization<class_TranslationServer_method_reload_pseudolocalization>` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_translation<class_TranslationServer_method_remove_translation>` **(** :ref:`Translation<class_Translation>` translation **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_locale<class_TranslationServer_method_set_locale>` **(** :ref:`String<class_String>` locale **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`standardize_locale<class_TranslationServer_method_standardize_locale>` **(** :ref:`String<class_String>` locale **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`translate<class_TranslationServer_method_translate>` **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName<class_StringName>` | :ref:`translate_plural<class_TranslationServer_method_translate_plural>` **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_translation<class_TranslationServer_method_add_translation>`\ (\ translation\: :ref:`Translation<class_Translation>`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_TranslationServer_method_clear>`\ (\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`compare_locales<class_TranslationServer_method_compare_locales>`\ (\ locale_a\: :ref:`String<class_String>`, locale_b\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_countries<class_TranslationServer_method_get_all_countries>`\ (\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_languages<class_TranslationServer_method_get_all_languages>`\ (\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_all_scripts<class_TranslationServer_method_get_all_scripts>`\ (\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_country_name<class_TranslationServer_method_get_country_name>`\ (\ country\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_language_name<class_TranslationServer_method_get_language_name>`\ (\ language\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_loaded_locales<class_TranslationServer_method_get_loaded_locales>`\ (\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_locale<class_TranslationServer_method_get_locale>`\ (\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_locale_name<class_TranslationServer_method_get_locale_name>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_script_name<class_TranslationServer_method_get_script_name>`\ (\ script\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tool_locale<class_TranslationServer_method_get_tool_locale>`\ (\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Translation<class_Translation>` | :ref:`get_translation_object<class_TranslationServer_method_get_translation_object>`\ (\ locale\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`pseudolocalize<class_TranslationServer_method_pseudolocalize>`\ (\ message\: :ref:`StringName<class_StringName>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reload_pseudolocalization<class_TranslationServer_method_reload_pseudolocalization>`\ (\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_translation<class_TranslationServer_method_remove_translation>`\ (\ translation\: :ref:`Translation<class_Translation>`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_locale<class_TranslationServer_method_set_locale>`\ (\ locale\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`standardize_locale<class_TranslationServer_method_standardize_locale>`\ (\ locale\: :ref:`String<class_String>`\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`translate<class_TranslationServer_method_translate>`\ (\ message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName<class_StringName>` | :ref:`translate_plural<class_TranslationServer_method_translate_plural>`\ (\ message\: :ref:`StringName<class_StringName>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -107,12 +107,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **pseudolocalization_enabled** = ``false`` +:ref:`bool<class_bool>` **pseudolocalization_enabled** = ``false`` :ref:`🔗<class_TranslationServer_property_pseudolocalization_enabled>` .. rst-class:: classref-property-setget -- void **set_pseudolocalization_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_pseudolocalization_enabled** **(** **)** +- |void| **set_pseudolocalization_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_pseudolocalization_enabled**\ (\ ) If ``true``, enables the use of pseudolocalization. See :ref:`ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization<class_ProjectSettings_property_internationalization/pseudolocalization/use_pseudolocalization>` for details. @@ -129,7 +129,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_translation** **(** :ref:`Translation<class_Translation>` translation **)** +|void| **add_translation**\ (\ translation\: :ref:`Translation<class_Translation>`\ ) :ref:`🔗<class_TranslationServer_method_add_translation>` Adds a :ref:`Translation<class_Translation>` resource. @@ -141,7 +141,7 @@ Adds a :ref:`Translation<class_Translation>` resource. .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_TranslationServer_method_clear>` Clears the server from all translations. @@ -153,7 +153,7 @@ Clears the server from all translations. .. rst-class:: classref-method -:ref:`int<class_int>` **compare_locales** **(** :ref:`String<class_String>` locale_a, :ref:`String<class_String>` locale_b **)** |const| +:ref:`int<class_int>` **compare_locales**\ (\ locale_a\: :ref:`String<class_String>`, locale_b\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_compare_locales>` Compares two locales and returns a similarity score between ``0`` (no match) and ``10`` (full match). @@ -165,7 +165,7 @@ Compares two locales and returns a similarity score between ``0`` (no match) and .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_all_countries** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_all_countries**\ (\ ) |const| :ref:`🔗<class_TranslationServer_method_get_all_countries>` Returns an array of known country codes. @@ -177,7 +177,7 @@ Returns an array of known country codes. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_all_languages** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_all_languages**\ (\ ) |const| :ref:`🔗<class_TranslationServer_method_get_all_languages>` Returns array of known language codes. @@ -189,7 +189,7 @@ Returns array of known language codes. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_all_scripts** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_all_scripts**\ (\ ) |const| :ref:`🔗<class_TranslationServer_method_get_all_scripts>` Returns an array of known script codes. @@ -201,7 +201,7 @@ Returns an array of known script codes. .. rst-class:: classref-method -:ref:`String<class_String>` **get_country_name** **(** :ref:`String<class_String>` country **)** |const| +:ref:`String<class_String>` **get_country_name**\ (\ country\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_get_country_name>` Returns a readable country name for the ``country`` code. @@ -213,7 +213,7 @@ Returns a readable country name for the ``country`` code. .. rst-class:: classref-method -:ref:`String<class_String>` **get_language_name** **(** :ref:`String<class_String>` language **)** |const| +:ref:`String<class_String>` **get_language_name**\ (\ language\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_get_language_name>` Returns a readable language name for the ``language`` code. @@ -225,7 +225,7 @@ Returns a readable language name for the ``language`` code. .. rst-class:: classref-method -:ref:`PackedStringArray<class_PackedStringArray>` **get_loaded_locales** **(** **)** |const| +:ref:`PackedStringArray<class_PackedStringArray>` **get_loaded_locales**\ (\ ) |const| :ref:`🔗<class_TranslationServer_method_get_loaded_locales>` Returns an array of all loaded locales of the project. @@ -237,7 +237,7 @@ Returns an array of all loaded locales of the project. .. rst-class:: classref-method -:ref:`String<class_String>` **get_locale** **(** **)** |const| +:ref:`String<class_String>` **get_locale**\ (\ ) |const| :ref:`🔗<class_TranslationServer_method_get_locale>` Returns the current locale of the project. @@ -251,7 +251,7 @@ See also :ref:`OS.get_locale<class_OS_method_get_locale>` and :ref:`OS.get_local .. rst-class:: classref-method -:ref:`String<class_String>` **get_locale_name** **(** :ref:`String<class_String>` locale **)** |const| +:ref:`String<class_String>` **get_locale_name**\ (\ locale\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_get_locale_name>` Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"English (United States)"``). @@ -263,7 +263,7 @@ Returns a locale's language and its variant (e.g. ``"en_US"`` would return ``"En .. rst-class:: classref-method -:ref:`String<class_String>` **get_script_name** **(** :ref:`String<class_String>` script **)** |const| +:ref:`String<class_String>` **get_script_name**\ (\ script\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_get_script_name>` Returns a readable script name for the ``script`` code. @@ -275,7 +275,7 @@ Returns a readable script name for the ``script`` code. .. rst-class:: classref-method -:ref:`String<class_String>` **get_tool_locale** **(** **)** +:ref:`String<class_String>` **get_tool_locale**\ (\ ) :ref:`🔗<class_TranslationServer_method_get_tool_locale>` Returns the current locale of the editor. @@ -289,7 +289,7 @@ Returns the current locale of the editor. .. rst-class:: classref-method -:ref:`Translation<class_Translation>` **get_translation_object** **(** :ref:`String<class_String>` locale **)** +:ref:`Translation<class_Translation>` **get_translation_object**\ (\ locale\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TranslationServer_method_get_translation_object>` Returns the :ref:`Translation<class_Translation>` instance based on the ``locale`` passed in. @@ -303,7 +303,7 @@ It will return ``null`` if there is no :ref:`Translation<class_Translation>` ins .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **pseudolocalize** **(** :ref:`StringName<class_StringName>` message **)** |const| +:ref:`StringName<class_StringName>` **pseudolocalize**\ (\ message\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_TranslationServer_method_pseudolocalize>` Returns the pseudolocalized string based on the ``message`` passed in. @@ -315,7 +315,7 @@ Returns the pseudolocalized string based on the ``message`` passed in. .. rst-class:: classref-method -void **reload_pseudolocalization** **(** **)** +|void| **reload_pseudolocalization**\ (\ ) :ref:`🔗<class_TranslationServer_method_reload_pseudolocalization>` Reparses the pseudolocalization options and reloads the translation. @@ -327,7 +327,7 @@ Reparses the pseudolocalization options and reloads the translation. .. rst-class:: classref-method -void **remove_translation** **(** :ref:`Translation<class_Translation>` translation **)** +|void| **remove_translation**\ (\ translation\: :ref:`Translation<class_Translation>`\ ) :ref:`🔗<class_TranslationServer_method_remove_translation>` Removes the given translation from the server. @@ -339,7 +339,7 @@ Removes the given translation from the server. .. rst-class:: classref-method -void **set_locale** **(** :ref:`String<class_String>` locale **)** +|void| **set_locale**\ (\ locale\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TranslationServer_method_set_locale>` Sets the locale of the project. The ``locale`` string will be standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). @@ -353,7 +353,7 @@ If translations have been loaded beforehand for the new locale, they will be app .. rst-class:: classref-method -:ref:`String<class_String>` **standardize_locale** **(** :ref:`String<class_String>` locale **)** |const| +:ref:`String<class_String>` **standardize_locale**\ (\ locale\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_TranslationServer_method_standardize_locale>` Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` would be matched to ``en_US``). @@ -365,7 +365,7 @@ Returns a ``locale`` string standardized to match known locales (e.g. ``en-US`` .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **translate** **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`StringName<class_StringName>` **translate**\ (\ message\: :ref:`StringName<class_StringName>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_TranslationServer_method_translate>` Returns the current locale's translation for the given message (key) and context. @@ -377,7 +377,7 @@ Returns the current locale's translation for the given message (key) and context .. rst-class:: classref-method -:ref:`StringName<class_StringName>` **translate_plural** **(** :ref:`StringName<class_StringName>` message, :ref:`StringName<class_StringName>` plural_message, :ref:`int<class_int>` n, :ref:`StringName<class_StringName>` context="" **)** |const| +:ref:`StringName<class_StringName>` **translate_plural**\ (\ message\: :ref:`StringName<class_StringName>`, plural_message\: :ref:`StringName<class_StringName>`, n\: :ref:`int<class_int>`, context\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_TranslationServer_method_translate_plural>` Returns the current locale's translation for the given message (key), plural message and context. @@ -390,3 +390,4 @@ The number ``n`` is the number or quantity of the plural object. It will be used .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tree.rst b/classes/class_tree.rst index fc6bc77318f..59e259da06a 100644 --- a/classes/class_tree.rst +++ b/classes/class_tree.rst @@ -102,81 +102,81 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear<class_Tree_method_clear>` **(** **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`create_item<class_Tree_method_create_item>` **(** :ref:`TreeItem<class_TreeItem>` parent=null, :ref:`int<class_int>` index=-1 **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect_all<class_Tree_method_deselect_all>` **(** **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`edit_selected<class_Tree_method_edit_selected>` **(** :ref:`bool<class_bool>` force_edit=false **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`ensure_cursor_is_visible<class_Tree_method_ensure_cursor_is_visible>` **(** **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_button_id_at_position<class_Tree_method_get_button_id_at_position>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_column_at_position<class_Tree_method_get_column_at_position>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_column_expand_ratio<class_Tree_method_get_column_expand_ratio>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_column_title<class_Tree_method_get_column_title>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_column_title_alignment<class_Tree_method_get_column_title_alignment>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_column_title_direction<class_Tree_method_get_column_title_direction>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_column_title_language<class_Tree_method_get_column_title_language>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_column_width<class_Tree_method_get_column_width>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_custom_popup_rect<class_Tree_method_get_custom_popup_rect>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_drop_section_at_position<class_Tree_method_get_drop_section_at_position>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_edited<class_Tree_method_get_edited>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_edited_column<class_Tree_method_get_edited_column>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_item_area_rect<class_Tree_method_get_item_area_rect>` **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column=-1, :ref:`int<class_int>` button_index=-1 **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_item_at_position<class_Tree_method_get_item_at_position>` **(** :ref:`Vector2<class_Vector2>` position **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_selected<class_Tree_method_get_next_selected>` **(** :ref:`TreeItem<class_TreeItem>` from **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_pressed_button<class_Tree_method_get_pressed_button>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_root<class_Tree_method_get_root>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_scroll<class_Tree_method_get_scroll>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_selected<class_Tree_method_get_selected>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_selected_column<class_Tree_method_get_selected_column>` **(** **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_column_clipping_content<class_Tree_method_is_column_clipping_content>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_column_expanding<class_Tree_method_is_column_expanding>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_item<class_Tree_method_scroll_to_item>` **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`bool<class_bool>` center_on_item=false **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_clip_content<class_Tree_method_set_column_clip_content>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_custom_minimum_width<class_Tree_method_set_column_custom_minimum_width>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` min_width **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand<class_Tree_method_set_column_expand>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_expand_ratio<class_Tree_method_set_column_expand_ratio>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` ratio **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title<class_Tree_method_set_column_title>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` title **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_alignment<class_Tree_method_set_column_title_alignment>` **(** :ref:`int<class_int>` column, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` title_alignment **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_direction<class_Tree_method_set_column_title_direction>` **(** :ref:`int<class_int>` column, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_column_title_language<class_Tree_method_set_column_title_language>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` language **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selected<class_Tree_method_set_selected>` **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear<class_Tree_method_clear>`\ (\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`create_item<class_Tree_method_create_item>`\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect_all<class_Tree_method_deselect_all>`\ (\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`edit_selected<class_Tree_method_edit_selected>`\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`ensure_cursor_is_visible<class_Tree_method_ensure_cursor_is_visible>`\ (\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_button_id_at_position<class_Tree_method_get_button_id_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_column_at_position<class_Tree_method_get_column_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_column_expand_ratio<class_Tree_method_get_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_column_title<class_Tree_method_get_column_title>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_column_title_alignment<class_Tree_method_get_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_column_title_direction<class_Tree_method_get_column_title_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_column_title_language<class_Tree_method_get_column_title_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_column_width<class_Tree_method_get_column_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_custom_popup_rect<class_Tree_method_get_custom_popup_rect>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_drop_section_at_position<class_Tree_method_get_drop_section_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_edited<class_Tree_method_get_edited>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_edited_column<class_Tree_method_get_edited_column>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_item_area_rect<class_Tree_method_get_item_area_rect>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_item_at_position<class_Tree_method_get_item_at_position>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_selected<class_Tree_method_get_next_selected>`\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_pressed_button<class_Tree_method_get_pressed_button>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_root<class_Tree_method_get_root>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_scroll<class_Tree_method_get_scroll>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_selected<class_Tree_method_get_selected>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_selected_column<class_Tree_method_get_selected_column>`\ (\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_column_clipping_content<class_Tree_method_is_column_clipping_content>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_column_expanding<class_Tree_method_is_column_expanding>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`scroll_to_item<class_Tree_method_scroll_to_item>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_clip_content<class_Tree_method_set_column_clip_content>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_custom_minimum_width<class_Tree_method_set_column_custom_minimum_width>`\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_expand<class_Tree_method_set_column_expand>`\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_expand_ratio<class_Tree_method_set_column_expand_ratio>`\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_title<class_Tree_method_set_column_title>`\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_title_alignment<class_Tree_method_set_column_title_alignment>`\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_title_direction<class_Tree_method_set_column_title_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_column_title_language<class_Tree_method_set_column_title_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selected<class_Tree_method_set_selected>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -186,123 +186,133 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`children_hl_line_color<class_Tree_theme_color_children_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`custom_button_font_highlight<class_Tree_theme_color_custom_button_font_highlight>` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`drop_position_color<class_Tree_theme_color_drop_position_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_color<class_Tree_theme_color_font_color>` | ``Color(0.7, 0.7, 0.7, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Tree_theme_color_font_outline_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_Tree_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`guide_color<class_Tree_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`parent_hl_line_color<class_Tree_theme_color_parent_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`relationship_line_color<class_Tree_theme_color_relationship_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`title_button_color<class_Tree_theme_color_title_button_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`button_margin<class_Tree_theme_constant_button_margin>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`children_hl_line_width<class_Tree_theme_constant_children_hl_line_width>` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`draw_guides<class_Tree_theme_constant_draw_guides>` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`draw_relationship_lines<class_Tree_theme_constant_draw_relationship_lines>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`h_separation<class_Tree_theme_constant_h_separation>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`icon_max_width<class_Tree_theme_constant_icon_max_width>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`inner_item_margin_bottom<class_Tree_theme_constant_inner_item_margin_bottom>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`inner_item_margin_left<class_Tree_theme_constant_inner_item_margin_left>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`inner_item_margin_right<class_Tree_theme_constant_inner_item_margin_right>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`inner_item_margin_top<class_Tree_theme_constant_inner_item_margin_top>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`item_margin<class_Tree_theme_constant_item_margin>` | ``16`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`outline_size<class_Tree_theme_constant_outline_size>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`parent_hl_line_margin<class_Tree_theme_constant_parent_hl_line_margin>` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`parent_hl_line_width<class_Tree_theme_constant_parent_hl_line_width>` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`relationship_line_width<class_Tree_theme_constant_relationship_line_width>` | ``1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scroll_border<class_Tree_theme_constant_scroll_border>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scroll_speed<class_Tree_theme_constant_scroll_speed>` | ``12`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_h_separation<class_Tree_theme_constant_scrollbar_h_separation>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_margin_bottom<class_Tree_theme_constant_scrollbar_margin_bottom>` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_margin_left<class_Tree_theme_constant_scrollbar_margin_left>` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_margin_right<class_Tree_theme_constant_scrollbar_margin_right>` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_margin_top<class_Tree_theme_constant_scrollbar_margin_top>` | ``-1`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`scrollbar_v_separation<class_Tree_theme_constant_scrollbar_v_separation>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`v_separation<class_Tree_theme_constant_v_separation>` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font<class_Font>` | :ref:`font<class_Tree_theme_font_font>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font<class_Font>` | :ref:`title_button_font<class_Tree_theme_font_title_button_font>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int<class_int>` | :ref:`font_size<class_Tree_theme_font_size_font_size>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_Tree_theme_icon_arrow>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed<class_Tree_theme_icon_arrow_collapsed>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed_mirrored<class_Tree_theme_icon_arrow_collapsed_mirrored>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`checked<class_Tree_theme_icon_checked>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate<class_Tree_theme_icon_indeterminate>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`select_arrow<class_Tree_theme_icon_select_arrow>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked<class_Tree_theme_icon_unchecked>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`updown<class_Tree_theme_icon_updown>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`button_pressed<class_Tree_theme_style_button_pressed>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_Tree_theme_style_cursor>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_Tree_theme_style_cursor_unfocused>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button<class_Tree_theme_style_custom_button>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_hover<class_Tree_theme_style_custom_button_hover>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_pressed<class_Tree_theme_style_custom_button_pressed>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Tree_theme_style_focus>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_Tree_theme_style_panel>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_Tree_theme_style_selected>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_Tree_theme_style_selected_focus>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_hover<class_Tree_theme_style_title_button_hover>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_normal<class_Tree_theme_style_title_button_normal>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_pressed<class_Tree_theme_style_title_button_pressed>` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-----------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`children_hl_line_color<class_Tree_theme_color_children_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`custom_button_font_highlight<class_Tree_theme_color_custom_button_font_highlight>` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`drop_position_color<class_Tree_theme_color_drop_position_color>` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_color<class_Tree_theme_color_font_color>` | ``Color(0.7, 0.7, 0.7, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_Tree_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_Tree_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`font_selected_color<class_Tree_theme_color_font_selected_color>` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`guide_color<class_Tree_theme_color_guide_color>` | ``Color(0.7, 0.7, 0.7, 0.25)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`parent_hl_line_color<class_Tree_theme_color_parent_hl_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`relationship_line_color<class_Tree_theme_color_relationship_line_color>` | ``Color(0.27, 0.27, 0.27, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`title_button_color<class_Tree_theme_color_title_button_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`button_margin<class_Tree_theme_constant_button_margin>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`children_hl_line_width<class_Tree_theme_constant_children_hl_line_width>` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`draw_guides<class_Tree_theme_constant_draw_guides>` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`draw_relationship_lines<class_Tree_theme_constant_draw_relationship_lines>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`h_separation<class_Tree_theme_constant_h_separation>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`icon_max_width<class_Tree_theme_constant_icon_max_width>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`inner_item_margin_bottom<class_Tree_theme_constant_inner_item_margin_bottom>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`inner_item_margin_left<class_Tree_theme_constant_inner_item_margin_left>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`inner_item_margin_right<class_Tree_theme_constant_inner_item_margin_right>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`inner_item_margin_top<class_Tree_theme_constant_inner_item_margin_top>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`item_margin<class_Tree_theme_constant_item_margin>` | ``16`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`outline_size<class_Tree_theme_constant_outline_size>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`parent_hl_line_margin<class_Tree_theme_constant_parent_hl_line_margin>` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`parent_hl_line_width<class_Tree_theme_constant_parent_hl_line_width>` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`relationship_line_width<class_Tree_theme_constant_relationship_line_width>` | ``1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scroll_border<class_Tree_theme_constant_scroll_border>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scroll_speed<class_Tree_theme_constant_scroll_speed>` | ``12`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_h_separation<class_Tree_theme_constant_scrollbar_h_separation>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_margin_bottom<class_Tree_theme_constant_scrollbar_margin_bottom>` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_margin_left<class_Tree_theme_constant_scrollbar_margin_left>` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_margin_right<class_Tree_theme_constant_scrollbar_margin_right>` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_margin_top<class_Tree_theme_constant_scrollbar_margin_top>` | ``-1`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`scrollbar_v_separation<class_Tree_theme_constant_scrollbar_v_separation>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`v_separation<class_Tree_theme_constant_v_separation>` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`font<class_Tree_theme_font_font>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`title_button_font<class_Tree_theme_font_title_button_font>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`font_size<class_Tree_theme_font_size_font_size>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int<class_int>` | :ref:`title_button_font_size<class_Tree_theme_font_size_title_button_font_size>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow<class_Tree_theme_icon_arrow>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed<class_Tree_theme_icon_arrow_collapsed>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`arrow_collapsed_mirrored<class_Tree_theme_icon_arrow_collapsed_mirrored>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`checked<class_Tree_theme_icon_checked>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`checked_disabled<class_Tree_theme_icon_checked_disabled>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate<class_Tree_theme_icon_indeterminate>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`indeterminate_disabled<class_Tree_theme_icon_indeterminate_disabled>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`select_arrow<class_Tree_theme_icon_select_arrow>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked<class_Tree_theme_icon_unchecked>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`unchecked_disabled<class_Tree_theme_icon_unchecked_disabled>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`updown<class_Tree_theme_icon_updown>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`button_pressed<class_Tree_theme_style_button_pressed>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor<class_Tree_theme_style_cursor>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`cursor_unfocused<class_Tree_theme_style_cursor_unfocused>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button<class_Tree_theme_style_custom_button>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_hover<class_Tree_theme_style_custom_button_hover>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`custom_button_pressed<class_Tree_theme_style_custom_button_pressed>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`focus<class_Tree_theme_style_focus>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_Tree_theme_style_panel>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`selected<class_Tree_theme_style_selected>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`selected_focus<class_Tree_theme_style_selected_focus>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_hover<class_Tree_theme_style_title_button_hover>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_normal<class_Tree_theme_style_title_button_normal>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`title_button_pressed<class_Tree_theme_style_title_button_pressed>` | | + +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -317,7 +327,7 @@ Signals .. rst-class:: classref-signal -**button_clicked** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column, :ref:`int<class_int>` id, :ref:`int<class_int>` mouse_button_index **)** +**button_clicked**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_button_clicked>` Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button<class_TreeItem_method_add_button>`). @@ -329,7 +339,7 @@ Emitted when a button on the tree was pressed (see :ref:`TreeItem.add_button<cla .. rst-class:: classref-signal -**cell_selected** **(** **)** +**cell_selected**\ (\ ) :ref:`🔗<class_Tree_signal_cell_selected>` Emitted when a cell is selected. @@ -341,7 +351,7 @@ Emitted when a cell is selected. .. rst-class:: classref-signal -**check_propagated_to_item** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column **)** +**check_propagated_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_check_propagated_to_item>` Emitted when :ref:`TreeItem.propagate_check<class_TreeItem_method_propagate_check>` is called. Connect to this signal to process the items that are affected when :ref:`TreeItem.propagate_check<class_TreeItem_method_propagate_check>` is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item. @@ -353,7 +363,7 @@ Emitted when :ref:`TreeItem.propagate_check<class_TreeItem_method_propagate_chec .. rst-class:: classref-signal -**column_title_clicked** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` mouse_button_index **)** +**column_title_clicked**\ (\ column\: :ref:`int<class_int>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_column_title_clicked>` Emitted when a column's title is clicked with either :ref:`@GlobalScope.MOUSE_BUTTON_LEFT<class_@GlobalScope_constant_MOUSE_BUTTON_LEFT>` or :ref:`@GlobalScope.MOUSE_BUTTON_RIGHT<class_@GlobalScope_constant_MOUSE_BUTTON_RIGHT>`. @@ -365,7 +375,7 @@ Emitted when a column's title is clicked with either :ref:`@GlobalScope.MOUSE_BU .. rst-class:: classref-signal -**custom_item_clicked** **(** :ref:`int<class_int>` mouse_button_index **)** +**custom_item_clicked**\ (\ mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_custom_item_clicked>` Emitted when an item with :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` is clicked with a mouse button. @@ -377,7 +387,7 @@ Emitted when an item with :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constan .. rst-class:: classref-signal -**custom_popup_edited** **(** :ref:`bool<class_bool>` arrow_clicked **)** +**custom_popup_edited**\ (\ arrow_clicked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_custom_popup_edited>` Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` is clicked to be edited. @@ -389,7 +399,7 @@ Emitted when a cell with the :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_cons .. rst-class:: classref-signal -**empty_clicked** **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` mouse_button_index **)** +**empty_clicked**\ (\ click_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_empty_clicked>` Emitted when a mouse button is clicked in the empty space of the tree. @@ -401,7 +411,7 @@ Emitted when a mouse button is clicked in the empty space of the tree. .. rst-class:: classref-signal -**item_activated** **(** **)** +**item_activated**\ (\ ) :ref:`🔗<class_Tree_signal_item_activated>` Emitted when an item is double-clicked, or selected with a ``ui_accept`` input event (e.g. using :kbd:`Enter` or :kbd:`Space` on the keyboard). @@ -413,7 +423,7 @@ Emitted when an item is double-clicked, or selected with a ``ui_accept`` input e .. rst-class:: classref-signal -**item_collapsed** **(** :ref:`TreeItem<class_TreeItem>` item **)** +**item_collapsed**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_signal_item_collapsed>` Emitted when an item is collapsed by a click on the folding arrow. @@ -425,7 +435,7 @@ Emitted when an item is collapsed by a click on the folding arrow. .. rst-class:: classref-signal -**item_edited** **(** **)** +**item_edited**\ (\ ) :ref:`🔗<class_Tree_signal_item_edited>` Emitted when an item is edited. @@ -437,7 +447,7 @@ Emitted when an item is edited. .. rst-class:: classref-signal -**item_icon_double_clicked** **(** **)** +**item_icon_double_clicked**\ (\ ) :ref:`🔗<class_Tree_signal_item_icon_double_clicked>` Emitted when an item's icon is double-clicked. For a signal that emits when any part of the item is double-clicked, see :ref:`item_activated<class_Tree_signal_item_activated>`. @@ -449,7 +459,7 @@ Emitted when an item's icon is double-clicked. For a signal that emits when any .. rst-class:: classref-signal -**item_mouse_selected** **(** :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` mouse_button_index **)** +**item_mouse_selected**\ (\ mouse_position\: :ref:`Vector2<class_Vector2>`, mouse_button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_signal_item_mouse_selected>` Emitted when an item is selected with a mouse button. @@ -461,7 +471,7 @@ Emitted when an item is selected with a mouse button. .. rst-class:: classref-signal -**item_selected** **(** **)** +**item_selected**\ (\ ) :ref:`🔗<class_Tree_signal_item_selected>` Emitted when an item is selected. @@ -473,9 +483,9 @@ Emitted when an item is selected. .. rst-class:: classref-signal -**multi_selected** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column, :ref:`bool<class_bool>` selected **)** +**multi_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`, selected\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_signal_multi_selected>` -Emitted instead of ``item_selected`` if ``select_mode`` is :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>`. +Emitted instead of :ref:`item_selected<class_Tree_signal_item_selected>` if :ref:`select_mode<class_Tree_property_select_mode>` is set to :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>`. .. rst-class:: classref-item-separator @@ -485,7 +495,7 @@ Emitted instead of ``item_selected`` if ``select_mode`` is :ref:`SELECT_MULTI<cl .. rst-class:: classref-signal -**nothing_selected** **(** **)** +**nothing_selected**\ (\ ) :ref:`🔗<class_Tree_signal_nothing_selected>` Emitted when a left mouse button click does not select any item. @@ -502,7 +512,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **SelectMode**: +enum **SelectMode**: :ref:`🔗<enum_Tree_SelectMode>` .. _class_Tree_constant_SELECT_SINGLE: @@ -542,7 +552,7 @@ The focus cursor is visible in this mode, the item or column under the cursor is .. rst-class:: classref-enumeration -enum **DropModeFlags**: +enum **DropModeFlags**: :ref:`🔗<enum_Tree_DropModeFlags>` .. _class_Tree_constant_DROP_MODE_DISABLED: @@ -587,12 +597,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_reselect** = ``false`` +:ref:`bool<class_bool>` **allow_reselect** = ``false`` :ref:`🔗<class_Tree_property_allow_reselect>` .. rst-class:: classref-property-setget -- void **set_allow_reselect** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_reselect** **(** **)** +- |void| **set_allow_reselect**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_reselect**\ (\ ) If ``true``, the currently selected cell may be selected again. @@ -604,12 +614,12 @@ If ``true``, the currently selected cell may be selected again. .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` +:ref:`bool<class_bool>` **allow_rmb_select** = ``false`` :ref:`🔗<class_Tree_property_allow_rmb_select>` .. rst-class:: classref-property-setget -- void **set_allow_rmb_select** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_rmb_select** **(** **)** +- |void| **set_allow_rmb_select**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_rmb_select**\ (\ ) If ``true``, a right mouse button click can select items. @@ -621,12 +631,12 @@ If ``true``, a right mouse button click can select items. .. rst-class:: classref-property -:ref:`bool<class_bool>` **allow_search** = ``true`` +:ref:`bool<class_bool>` **allow_search** = ``true`` :ref:`🔗<class_Tree_property_allow_search>` .. rst-class:: classref-property-setget -- void **set_allow_search** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_allow_search** **(** **)** +- |void| **set_allow_search**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_allow_search**\ (\ ) If ``true``, allows navigating the **Tree** with letter keys through incremental search. @@ -638,12 +648,12 @@ If ``true``, allows navigating the **Tree** with letter keys through incremental .. rst-class:: classref-property -:ref:`bool<class_bool>` **column_titles_visible** = ``false`` +:ref:`bool<class_bool>` **column_titles_visible** = ``false`` :ref:`🔗<class_Tree_property_column_titles_visible>` .. rst-class:: classref-property-setget -- void **set_column_titles_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **are_column_titles_visible** **(** **)** +- |void| **set_column_titles_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **are_column_titles_visible**\ (\ ) If ``true``, column titles are visible. @@ -655,12 +665,12 @@ If ``true``, column titles are visible. .. rst-class:: classref-property -:ref:`int<class_int>` **columns** = ``1`` +:ref:`int<class_int>` **columns** = ``1`` :ref:`🔗<class_Tree_property_columns>` .. rst-class:: classref-property-setget -- void **set_columns** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_columns** **(** **)** +- |void| **set_columns**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_columns**\ (\ ) The number of columns. @@ -672,14 +682,14 @@ The number of columns. .. rst-class:: classref-property -:ref:`int<class_int>` **drop_mode_flags** = ``0`` +:ref:`int<class_int>` **drop_mode_flags** = ``0`` :ref:`🔗<class_Tree_property_drop_mode_flags>` .. rst-class:: classref-property-setget -- void **set_drop_mode_flags** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_drop_mode_flags** **(** **)** +- |void| **set_drop_mode_flags**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_drop_mode_flags**\ (\ ) -The drop mode as an OR combination of flags. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED<class_Tree_constant_DROP_MODE_DISABLED>`. Setting this during :ref:`Control._can_drop_data<class_Control_method__can_drop_data>` is recommended. +The drop mode as an OR combination of flags. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` constants. Once dropping is done, reverts to :ref:`DROP_MODE_DISABLED<class_Tree_constant_DROP_MODE_DISABLED>`. Setting this during :ref:`Control._can_drop_data<class_Control_private_method__can_drop_data>` is recommended. This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position. @@ -691,14 +701,14 @@ This controls the drop sections, i.e. the decision and drawing of possible drop .. rst-class:: classref-property -:ref:`bool<class_bool>` **enable_recursive_folding** = ``true`` +:ref:`bool<class_bool>` **enable_recursive_folding** = ``true`` :ref:`🔗<class_Tree_property_enable_recursive_folding>` .. rst-class:: classref-property-setget -- void **set_enable_recursive_folding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_recursive_folding_enabled** **(** **)** +- |void| **set_enable_recursive_folding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_recursive_folding_enabled**\ (\ ) -If ``true``, recursive folding is enabled for this **Tree**. Holding down Shift while clicking the fold arrow collapses or uncollapses the :ref:`TreeItem<class_TreeItem>` and all its descendants. +If ``true``, recursive folding is enabled for this **Tree**. Holding down :kbd:`Shift` while clicking the fold arrow or using ``ui_right``/``ui_left`` shortcuts collapses or uncollapses the :ref:`TreeItem<class_TreeItem>` and all its descendants. .. rst-class:: classref-item-separator @@ -708,12 +718,12 @@ If ``true``, recursive folding is enabled for this **Tree**. Holding down Shift .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_folding** = ``false`` +:ref:`bool<class_bool>` **hide_folding** = ``false`` :ref:`🔗<class_Tree_property_hide_folding>` .. rst-class:: classref-property-setget -- void **set_hide_folding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_folding_hidden** **(** **)** +- |void| **set_hide_folding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_folding_hidden**\ (\ ) If ``true``, the folding arrow is hidden. @@ -725,12 +735,12 @@ If ``true``, the folding arrow is hidden. .. rst-class:: classref-property -:ref:`bool<class_bool>` **hide_root** = ``false`` +:ref:`bool<class_bool>` **hide_root** = ``false`` :ref:`🔗<class_Tree_property_hide_root>` .. rst-class:: classref-property-setget -- void **set_hide_root** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_root_hidden** **(** **)** +- |void| **set_hide_root**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_root_hidden**\ (\ ) If ``true``, the tree's root is hidden. @@ -742,12 +752,12 @@ If ``true``, the tree's root is hidden. .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_horizontal_enabled** = ``true`` +:ref:`bool<class_bool>` **scroll_horizontal_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_horizontal_enabled>` .. rst-class:: classref-property-setget -- void **set_h_scroll_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_h_scroll_enabled** **(** **)** +- |void| **set_h_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_h_scroll_enabled**\ (\ ) If ``true``, enables horizontal scrolling. @@ -759,12 +769,12 @@ If ``true``, enables horizontal scrolling. .. rst-class:: classref-property -:ref:`bool<class_bool>` **scroll_vertical_enabled** = ``true`` +:ref:`bool<class_bool>` **scroll_vertical_enabled** = ``true`` :ref:`🔗<class_Tree_property_scroll_vertical_enabled>` .. rst-class:: classref-property-setget -- void **set_v_scroll_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_v_scroll_enabled** **(** **)** +- |void| **set_v_scroll_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_v_scroll_enabled**\ (\ ) If ``true``, enables vertical scrolling. @@ -776,12 +786,12 @@ If ``true``, enables vertical scrolling. .. rst-class:: classref-property -:ref:`SelectMode<enum_Tree_SelectMode>` **select_mode** = ``0`` +:ref:`SelectMode<enum_Tree_SelectMode>` **select_mode** = ``0`` :ref:`🔗<class_Tree_property_select_mode>` .. rst-class:: classref-property-setget -- void **set_select_mode** **(** :ref:`SelectMode<enum_Tree_SelectMode>` value **)** -- :ref:`SelectMode<enum_Tree_SelectMode>` **get_select_mode** **(** **)** +- |void| **set_select_mode**\ (\ value\: :ref:`SelectMode<enum_Tree_SelectMode>`\ ) +- :ref:`SelectMode<enum_Tree_SelectMode>` **get_select_mode**\ (\ ) Allows single or multiple selection. See the :ref:`SelectMode<enum_Tree_SelectMode>` constants. @@ -798,7 +808,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear** **(** **)** +|void| **clear**\ (\ ) :ref:`🔗<class_Tree_method_clear>` Clears the tree. This removes all items. @@ -810,7 +820,7 @@ Clears the tree. This removes all items. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **create_item** **(** :ref:`TreeItem<class_TreeItem>` parent=null, :ref:`int<class_int>` index=-1 **)** +:ref:`TreeItem<class_TreeItem>` **create_item**\ (\ parent\: :ref:`TreeItem<class_TreeItem>` = null, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Tree_method_create_item>` Creates an item in the tree and adds it as a child of ``parent``, which can be either a valid :ref:`TreeItem<class_TreeItem>` or ``null``. @@ -826,7 +836,7 @@ The new item will be the ``index``-th child of parent, or it will be the last ch .. rst-class:: classref-method -void **deselect_all** **(** **)** +|void| **deselect_all**\ (\ ) :ref:`🔗<class_Tree_method_deselect_all>` Deselects all tree items (rows and columns). In :ref:`SELECT_MULTI<class_Tree_constant_SELECT_MULTI>` mode also removes selection cursor. @@ -838,7 +848,7 @@ Deselects all tree items (rows and columns). In :ref:`SELECT_MULTI<class_Tree_co .. rst-class:: classref-method -:ref:`bool<class_bool>` **edit_selected** **(** :ref:`bool<class_bool>` force_edit=false **)** +:ref:`bool<class_bool>` **edit_selected**\ (\ force_edit\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_edit_selected>` Edits the selected tree item as if it was clicked. @@ -854,7 +864,7 @@ Returns ``true`` if the item could be edited. Fails if no item is selected. .. rst-class:: classref-method -void **ensure_cursor_is_visible** **(** **)** +|void| **ensure_cursor_is_visible**\ (\ ) :ref:`🔗<class_Tree_method_ensure_cursor_is_visible>` Makes the currently focused cell visible. @@ -870,7 +880,7 @@ This will scroll the tree if necessary. In :ref:`SELECT_ROW<class_Tree_constant_ .. rst-class:: classref-method -:ref:`int<class_int>` **get_button_id_at_position** **(** :ref:`Vector2<class_Vector2>` position **)** |const| +:ref:`int<class_int>` **get_button_id_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_button_id_at_position>` Returns the button ID at ``position``, or -1 if no button is there. @@ -882,7 +892,7 @@ Returns the button ID at ``position``, or -1 if no button is there. .. rst-class:: classref-method -:ref:`int<class_int>` **get_column_at_position** **(** :ref:`Vector2<class_Vector2>` position **)** |const| +:ref:`int<class_int>` **get_column_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_at_position>` Returns the column index at ``position``, or -1 if no item is there. @@ -894,7 +904,7 @@ Returns the column index at ``position``, or -1 if no item is there. .. rst-class:: classref-method -:ref:`int<class_int>` **get_column_expand_ratio** **(** :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_expand_ratio>` Returns the expand ratio assigned to the column. @@ -906,7 +916,7 @@ Returns the expand ratio assigned to the column. .. rst-class:: classref-method -:ref:`String<class_String>` **get_column_title** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_column_title**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title>` Returns the column's title. @@ -918,7 +928,7 @@ Returns the column's title. .. rst-class:: classref-method -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_column_title_alignment** **(** :ref:`int<class_int>` column **)** |const| +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_column_title_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_alignment>` Returns the column title alignment. @@ -930,7 +940,7 @@ Returns the column title alignment. .. rst-class:: classref-method -:ref:`TextDirection<enum_Control_TextDirection>` **get_column_title_direction** **(** :ref:`int<class_int>` column **)** |const| +:ref:`TextDirection<enum_Control_TextDirection>` **get_column_title_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_direction>` Returns column title base writing direction. @@ -942,7 +952,7 @@ Returns column title base writing direction. .. rst-class:: classref-method -:ref:`String<class_String>` **get_column_title_language** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_column_title_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_title_language>` Returns column title language code. @@ -954,7 +964,7 @@ Returns column title language code. .. rst-class:: classref-method -:ref:`int<class_int>` **get_column_width** **(** :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_column_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_get_column_width>` Returns the column's width in pixels. @@ -966,7 +976,7 @@ Returns the column's width in pixels. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_custom_popup_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_custom_popup_rect**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_custom_popup_rect>` Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See :ref:`TreeItem.set_cell_mode<class_TreeItem_method_set_cell_mode>`. @@ -978,7 +988,7 @@ Returns the rectangle for custom popups. Helper to create custom cell controls t .. rst-class:: classref-method -:ref:`int<class_int>` **get_drop_section_at_position** **(** :ref:`Vector2<class_Vector2>` position **)** |const| +:ref:`int<class_int>` **get_drop_section_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_drop_section_at_position>` Returns the drop section at ``position``, or -100 if no item is there. @@ -994,7 +1004,7 @@ To get the item which the returned drop section is relative to, use :ref:`get_it .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_edited** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_edited**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited>` Returns the currently edited item. Can be used with :ref:`item_edited<class_Tree_signal_item_edited>` to get the item that was modified. @@ -1031,7 +1041,7 @@ Returns the currently edited item. Can be used with :ref:`item_edited<class_Tree .. rst-class:: classref-method -:ref:`int<class_int>` **get_edited_column** **(** **)** |const| +:ref:`int<class_int>` **get_edited_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_edited_column>` Returns the column for the currently edited item. @@ -1043,7 +1053,7 @@ Returns the column for the currently edited item. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_item_area_rect** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column=-1, :ref:`int<class_int>` button_index=-1 **)** |const| +:ref:`Rect2<class_Rect2>` **get_item_area_rect**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>` = -1, button_index\: :ref:`int<class_int>` = -1\ ) |const| :ref:`🔗<class_Tree_method_get_item_area_rect>` Returns the rectangle area for the specified :ref:`TreeItem<class_TreeItem>`. If ``column`` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned. @@ -1055,7 +1065,7 @@ Returns the rectangle area for the specified :ref:`TreeItem<class_TreeItem>`. If .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_item_at_position** **(** :ref:`Vector2<class_Vector2>` position **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_item_at_position**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Tree_method_get_item_at_position>` Returns the tree item at the specified position (relative to the tree origin position). @@ -1067,7 +1077,7 @@ Returns the tree item at the specified position (relative to the tree origin pos .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_next_selected** **(** :ref:`TreeItem<class_TreeItem>` from **)** +:ref:`TreeItem<class_TreeItem>` **get_next_selected**\ (\ from\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_method_get_next_selected>` Returns the next selected :ref:`TreeItem<class_TreeItem>` after the given one, or ``null`` if the end is reached. @@ -1081,7 +1091,7 @@ If ``from`` is ``null``, this returns the first selected item. .. rst-class:: classref-method -:ref:`int<class_int>` **get_pressed_button** **(** **)** |const| +:ref:`int<class_int>` **get_pressed_button**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_pressed_button>` Returns the last pressed button's index. @@ -1093,7 +1103,7 @@ Returns the last pressed button's index. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_root** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_root**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_root>` Returns the tree's root item, or ``null`` if the tree is empty. @@ -1105,7 +1115,7 @@ Returns the tree's root item, or ``null`` if the tree is empty. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_scroll** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_scroll**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_scroll>` Returns the current scrolling position. @@ -1117,7 +1127,7 @@ Returns the current scrolling position. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_selected** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_selected**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected>` Returns the currently focused item, or ``null`` if no item is focused. @@ -1133,7 +1143,7 @@ To get the currently selected item(s), use :ref:`get_next_selected<class_Tree_me .. rst-class:: classref-method -:ref:`int<class_int>` **get_selected_column** **(** **)** |const| +:ref:`int<class_int>` **get_selected_column**\ (\ ) |const| :ref:`🔗<class_Tree_method_get_selected_column>` Returns the currently focused column, or -1 if no column is focused. @@ -1149,7 +1159,7 @@ To tell whether a column of an item is selected, use :ref:`TreeItem.is_selected< .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_column_clipping_content** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_column_clipping_content**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_clipping_content>` Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_content<class_Tree_method_set_column_clip_content>`). @@ -1161,7 +1171,7 @@ Returns ``true`` if the column has enabled clipping (see :ref:`set_column_clip_c .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_column_expanding** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_column_expanding**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Tree_method_is_column_expanding>` Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expand<class_Tree_method_set_column_expand>`). @@ -1173,7 +1183,7 @@ Returns ``true`` if the column has enabled expanding (see :ref:`set_column_expan .. rst-class:: classref-method -void **scroll_to_item** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`bool<class_bool>` center_on_item=false **)** +|void| **scroll_to_item**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, center_on_item\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Tree_method_scroll_to_item>` Causes the **Tree** to jump to the specified :ref:`TreeItem<class_TreeItem>`. @@ -1185,7 +1195,7 @@ Causes the **Tree** to jump to the specified :ref:`TreeItem<class_TreeItem>`. .. rst-class:: classref-method -void **set_column_clip_content** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** +|void| **set_column_clip_content**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_clip_content>` Allows to enable clipping for column's content, making the content size ignored. @@ -1197,7 +1207,7 @@ Allows to enable clipping for column's content, making the content size ignored. .. rst-class:: classref-method -void **set_column_custom_minimum_width** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` min_width **)** +|void| **set_column_custom_minimum_width**\ (\ column\: :ref:`int<class_int>`, min_width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_custom_minimum_width>` Overrides the calculated minimum width of a column. It can be set to ``0`` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>`. @@ -1209,7 +1219,7 @@ Overrides the calculated minimum width of a column. It can be set to ``0`` to re .. rst-class:: classref-method -void **set_column_expand** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand **)** +|void| **set_column_expand**\ (\ column\: :ref:`int<class_int>`, expand\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Tree_method_set_column_expand>` If ``true``, the column will have the "Expand" flag of :ref:`Control<class_Control>`. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>` (see :ref:`set_column_expand_ratio<class_Tree_method_set_column_expand_ratio>`). @@ -1221,7 +1231,7 @@ If ``true``, the column will have the "Expand" flag of :ref:`Control<class_Contr .. rst-class:: classref-method -void **set_column_expand_ratio** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` ratio **)** +|void| **set_column_expand_ratio**\ (\ column\: :ref:`int<class_int>`, ratio\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_column_expand_ratio>` Sets the relative expand ratio for a column. See :ref:`set_column_expand<class_Tree_method_set_column_expand>`. @@ -1233,7 +1243,7 @@ Sets the relative expand ratio for a column. See :ref:`set_column_expand<class_T .. rst-class:: classref-method -void **set_column_title** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` title **)** +|void| **set_column_title**\ (\ column\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title>` Sets the title of a column. @@ -1245,7 +1255,7 @@ Sets the title of a column. .. rst-class:: classref-method -void **set_column_title_alignment** **(** :ref:`int<class_int>` column, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` title_alignment **)** +|void| **set_column_title_alignment**\ (\ column\: :ref:`int<class_int>`, title_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_Tree_method_set_column_title_alignment>` Sets the column title alignment. Note that :ref:`@GlobalScope.HORIZONTAL_ALIGNMENT_FILL<class_@GlobalScope_constant_HORIZONTAL_ALIGNMENT_FILL>` is not supported for column titles. @@ -1257,7 +1267,7 @@ Sets the column title alignment. Note that :ref:`@GlobalScope.HORIZONTAL_ALIGNME .. rst-class:: classref-method -void **set_column_title_direction** **(** :ref:`int<class_int>` column, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** +|void| **set_column_title_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_Tree_method_set_column_title_direction>` Sets column title base writing direction. @@ -1269,7 +1279,7 @@ Sets column title base writing direction. .. rst-class:: classref-method -void **set_column_title_language** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` language **)** +|void| **set_column_title_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Tree_method_set_column_title_language>` Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -1281,7 +1291,7 @@ Sets language code of column title used for line-breaking and text shaping algor .. rst-class:: classref-method -void **set_selected** **(** :ref:`TreeItem<class_TreeItem>` item, :ref:`int<class_int>` column **)** +|void| **set_selected**\ (\ item\: :ref:`TreeItem<class_TreeItem>`, column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tree_method_set_selected>` Selects the specified :ref:`TreeItem<class_TreeItem>` and column. @@ -1298,7 +1308,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **children_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` +:ref:`Color<class_Color>` **children_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_children_hl_line_color>` The :ref:`Color<class_Color>` of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its children. @@ -1310,7 +1320,7 @@ The :ref:`Color<class_Color>` of the relationship lines between the selected :re .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **custom_button_font_highlight** = ``Color(0.95, 0.95, 0.95, 1)`` +:ref:`Color<class_Color>` **custom_button_font_highlight** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_Tree_theme_color_custom_button_font_highlight>` Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when it's hovered. @@ -1322,7 +1332,7 @@ Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeI .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **drop_position_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **drop_position_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_drop_position_color>` :ref:`Color<class_Color>` used to draw possible drop locations. See :ref:`DropModeFlags<enum_Tree_DropModeFlags>` constants for further description of drop locations. @@ -1334,7 +1344,7 @@ Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeI .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_color** = ``Color(0.7, 0.7, 0.7, 1)`` +:ref:`Color<class_Color>` **font_color** = ``Color(0.7, 0.7, 0.7, 1)`` :ref:`🔗<class_Tree_theme_color_font_color>` Default text :ref:`Color<class_Color>` of the item. @@ -1342,11 +1352,23 @@ Default text :ref:`Color<class_Color>` of the item. ---- +.. _class_Tree_theme_color_font_disabled_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_Tree_theme_color_font_disabled_color>` + +Text :ref:`Color<class_Color>` for a :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell when it's non-editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_color_font_outline_color: .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_outline_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Tree_theme_color_font_outline_color>` The tint of text outline of the item. @@ -1358,7 +1380,7 @@ The tint of text outline of the item. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **font_selected_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Tree_theme_color_font_selected_color>` Text :ref:`Color<class_Color>` used when the item is selected. @@ -1370,7 +1392,7 @@ Text :ref:`Color<class_Color>` used when the item is selected. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` +:ref:`Color<class_Color>` **guide_color** = ``Color(0.7, 0.7, 0.7, 0.25)`` :ref:`🔗<class_Tree_theme_color_guide_color>` :ref:`Color<class_Color>` of the guideline. @@ -1382,7 +1404,7 @@ Text :ref:`Color<class_Color>` used when the item is selected. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **parent_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` +:ref:`Color<class_Color>` **parent_hl_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_parent_hl_line_color>` The :ref:`Color<class_Color>` of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its parents. @@ -1394,7 +1416,7 @@ The :ref:`Color<class_Color>` of the relationship lines between the selected :re .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **relationship_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` +:ref:`Color<class_Color>` **relationship_line_color** = ``Color(0.27, 0.27, 0.27, 1)`` :ref:`🔗<class_Tree_theme_color_relationship_line_color>` The default :ref:`Color<class_Color>` of the relationship lines. @@ -1406,7 +1428,7 @@ The default :ref:`Color<class_Color>` of the relationship lines. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **title_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **title_button_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Tree_theme_color_title_button_color>` Default text :ref:`Color<class_Color>` of the title button. @@ -1418,7 +1440,7 @@ Default text :ref:`Color<class_Color>` of the title button. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **button_margin** = ``4`` +:ref:`int<class_int>` **button_margin** = ``4`` :ref:`🔗<class_Tree_theme_constant_button_margin>` The horizontal space between each button in a cell. @@ -1430,7 +1452,7 @@ The horizontal space between each button in a cell. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **children_hl_line_width** = ``1`` +:ref:`int<class_int>` **children_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_children_hl_line_width>` The width of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its children. @@ -1442,7 +1464,7 @@ The width of the relationship lines between the selected :ref:`TreeItem<class_Tr .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **draw_guides** = ``1`` +:ref:`int<class_int>` **draw_guides** = ``1`` :ref:`🔗<class_Tree_theme_constant_draw_guides>` Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. @@ -1454,7 +1476,7 @@ Draws the guidelines if not zero, this acts as a boolean. The guideline is a hor .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **draw_relationship_lines** = ``0`` +:ref:`int<class_int>` **draw_relationship_lines** = ``0`` :ref:`🔗<class_Tree_theme_constant_draw_relationship_lines>` Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. @@ -1466,7 +1488,7 @@ Draws the relationship lines if not zero, this acts as a boolean. Relationship l .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **h_separation** = ``4`` +:ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_h_separation>` The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. @@ -1478,7 +1500,7 @@ The horizontal space between item cells. This is also used as the margin at the .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **icon_max_width** = ``0`` +:ref:`int<class_int>` **icon_max_width** = ``0`` :ref:`🔗<class_Tree_theme_constant_icon_max_width>` The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with :ref:`TreeItem.set_icon_max_width<class_TreeItem_method_set_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -1490,9 +1512,9 @@ The maximum allowed width of the icon in item's cells. This limit is applied on .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **inner_item_margin_bottom** = ``0`` +:ref:`int<class_int>` **inner_item_margin_bottom** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_bottom>` -The inner bottom margin of an item. +The inner bottom margin of a cell. .. rst-class:: classref-item-separator @@ -1502,9 +1524,9 @@ The inner bottom margin of an item. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **inner_item_margin_left** = ``0`` +:ref:`int<class_int>` **inner_item_margin_left** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_left>` -The inner left margin of an item. +The inner left margin of a cell. .. rst-class:: classref-item-separator @@ -1514,9 +1536,9 @@ The inner left margin of an item. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **inner_item_margin_right** = ``0`` +:ref:`int<class_int>` **inner_item_margin_right** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_right>` -The inner right margin of an item. +The inner right margin of a cell. .. rst-class:: classref-item-separator @@ -1526,9 +1548,9 @@ The inner right margin of an item. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **inner_item_margin_top** = ``0`` +:ref:`int<class_int>` **inner_item_margin_top** = ``0`` :ref:`🔗<class_Tree_theme_constant_inner_item_margin_top>` -The inner top margin of an item. +The inner top margin of a cell. .. rst-class:: classref-item-separator @@ -1538,7 +1560,7 @@ The inner top margin of an item. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **item_margin** = ``16`` +:ref:`int<class_int>` **item_margin** = ``16`` :ref:`🔗<class_Tree_theme_constant_item_margin>` The horizontal margin at the start of an item. This is used when folding is enabled for the item. @@ -1550,7 +1572,7 @@ The horizontal margin at the start of an item. This is used when folding is enab .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **outline_size** = ``0`` +:ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_Tree_theme_constant_outline_size>` The size of the text outline. @@ -1564,7 +1586,7 @@ The size of the text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **parent_hl_line_margin** = ``0`` +:ref:`int<class_int>` **parent_hl_line_margin** = ``0`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_margin>` The space between the parent relationship lines for the selected :ref:`TreeItem<class_TreeItem>` and the relationship lines to its siblings that are not selected. @@ -1576,7 +1598,7 @@ The space between the parent relationship lines for the selected :ref:`TreeItem< .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **parent_hl_line_width** = ``1`` +:ref:`int<class_int>` **parent_hl_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_parent_hl_line_width>` The width of the relationship lines between the selected :ref:`TreeItem<class_TreeItem>` and its parents. @@ -1588,7 +1610,7 @@ The width of the relationship lines between the selected :ref:`TreeItem<class_Tr .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **relationship_line_width** = ``1`` +:ref:`int<class_int>` **relationship_line_width** = ``1`` :ref:`🔗<class_Tree_theme_constant_relationship_line_width>` The default width of the relationship lines. @@ -1600,7 +1622,7 @@ The default width of the relationship lines. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scroll_border** = ``4`` +:ref:`int<class_int>` **scroll_border** = ``4`` :ref:`🔗<class_Tree_theme_constant_scroll_border>` The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. @@ -1612,7 +1634,7 @@ The maximum distance between the mouse cursor and the control's border to trigge .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scroll_speed** = ``12`` +:ref:`int<class_int>` **scroll_speed** = ``12`` :ref:`🔗<class_Tree_theme_constant_scroll_speed>` The speed of border scrolling. @@ -1624,7 +1646,7 @@ The speed of border scrolling. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_h_separation** = ``4`` +:ref:`int<class_int>` **scrollbar_h_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_h_separation>` The horizontal separation of tree content and scrollbar. @@ -1636,7 +1658,7 @@ The horizontal separation of tree content and scrollbar. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_margin_bottom** = ``-1`` +:ref:`int<class_int>` **scrollbar_margin_bottom** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_bottom>` The bottom margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` bottom margin. @@ -1648,7 +1670,7 @@ The bottom margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_ .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_margin_left** = ``-1`` +:ref:`int<class_int>` **scrollbar_margin_left** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_left>` The left margin of the horizontal scrollbar. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` left margin. @@ -1660,7 +1682,7 @@ The left margin of the horizontal scrollbar. When negative, uses :ref:`panel<cla .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_margin_right** = ``-1`` +:ref:`int<class_int>` **scrollbar_margin_right** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_right>` The right margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` right margin. @@ -1672,9 +1694,9 @@ The right margin of the scrollbars. When negative, uses :ref:`panel<class_Tree_t .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_margin_top** = ``-1`` +:ref:`int<class_int>` **scrollbar_margin_top** = ``-1`` :ref:`🔗<class_Tree_theme_constant_scrollbar_margin_top>` -The right margin of the vertical scrollbar. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` top margin. +The top margin of the vertical scrollbar. When negative, uses :ref:`panel<class_Tree_theme_style_panel>` top margin. .. rst-class:: classref-item-separator @@ -1684,7 +1706,7 @@ The right margin of the vertical scrollbar. When negative, uses :ref:`panel<clas .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **scrollbar_v_separation** = ``4`` +:ref:`int<class_int>` **scrollbar_v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_scrollbar_v_separation>` The vertical separation of tree content and scrollbar. @@ -1696,7 +1718,7 @@ The vertical separation of tree content and scrollbar. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **v_separation** = ``4`` +:ref:`int<class_int>` **v_separation** = ``4`` :ref:`🔗<class_Tree_theme_constant_v_separation>` The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. @@ -1708,7 +1730,7 @@ The vertical padding inside each item, i.e. the distance between the item's cont .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **font** +:ref:`Font<class_Font>` **font** :ref:`🔗<class_Tree_theme_font_font>` :ref:`Font<class_Font>` of the item's text. @@ -1720,7 +1742,7 @@ The vertical padding inside each item, i.e. the distance between the item's cont .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **title_button_font** +:ref:`Font<class_Font>` **title_button_font** :ref:`🔗<class_Tree_theme_font_title_button_font>` :ref:`Font<class_Font>` of the title button's text. @@ -1732,7 +1754,7 @@ The vertical padding inside each item, i.e. the distance between the item's cont .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **font_size** +:ref:`int<class_int>` **font_size** :ref:`🔗<class_Tree_theme_font_size_font_size>` Font size of the item's text. @@ -1740,11 +1762,23 @@ Font size of the item's text. ---- +.. _class_Tree_theme_font_size_title_button_font_size: + +.. rst-class:: classref-themeproperty + +:ref:`int<class_int>` **title_button_font_size** :ref:`🔗<class_Tree_theme_font_size_title_button_font_size>` + +Font size of the title button's text. + +.. rst-class:: classref-item-separator + +---- + .. _class_Tree_theme_icon_arrow: .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **arrow** +:ref:`Texture2D<class_Texture2D>` **arrow** :ref:`🔗<class_Tree_theme_icon_arrow>` The arrow icon used when a foldable item is not collapsed. @@ -1756,7 +1790,7 @@ The arrow icon used when a foldable item is not collapsed. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **arrow_collapsed** +:ref:`Texture2D<class_Texture2D>` **arrow_collapsed** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed>` The arrow icon used when a foldable item is collapsed (for left-to-right layouts). @@ -1768,7 +1802,7 @@ The arrow icon used when a foldable item is collapsed (for left-to-right layouts .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **arrow_collapsed_mirrored** +:ref:`Texture2D<class_Texture2D>` **arrow_collapsed_mirrored** :ref:`🔗<class_Tree_theme_icon_arrow_collapsed_mirrored>` The arrow icon used when a foldable item is collapsed (for right-to-left layouts). @@ -1780,9 +1814,21 @@ The arrow icon used when a foldable item is collapsed (for right-to-left layouts .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **checked** +:ref:`Texture2D<class_Texture2D>` **checked** :ref:`🔗<class_Tree_theme_icon_checked>` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_checked_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **checked_disabled** :ref:`🔗<class_Tree_theme_icon_checked_disabled>` + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is checked and non-editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). .. rst-class:: classref-item-separator @@ -1792,9 +1838,21 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **indeterminate** +:ref:`Texture2D<class_Texture2D>` **indeterminate** :ref:`🔗<class_Tree_theme_icon_indeterminate>` + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_indeterminate_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **indeterminate_disabled** :ref:`🔗<class_Tree_theme_icon_indeterminate_disabled>` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is indeterminate and non-editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). .. rst-class:: classref-item-separator @@ -1804,7 +1862,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **select_arrow** +:ref:`Texture2D<class_Texture2D>` **select_arrow** :ref:`🔗<class_Tree_theme_icon_select_arrow>` The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode cell. @@ -1816,9 +1874,21 @@ The arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_ .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **unchecked** +:ref:`Texture2D<class_Texture2D>` **unchecked** :ref:`🔗<class_Tree_theme_icon_unchecked>` + +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Tree_theme_icon_unchecked_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D<class_Texture2D>` **unchecked_disabled** :ref:`🔗<class_Tree_theme_icon_unchecked_disabled>` -The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked. +The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem_constant_CELL_MODE_CHECK>` mode cell is unchecked and non-editable (see :ref:`TreeItem.set_editable<class_TreeItem_method_set_editable>`). .. rst-class:: classref-item-separator @@ -1828,7 +1898,7 @@ The check icon to display when the :ref:`TreeItem.CELL_MODE_CHECK<class_TreeItem .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **updown** +:ref:`Texture2D<class_Texture2D>` **updown** :ref:`🔗<class_Tree_theme_icon_updown>` The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode cell. @@ -1840,7 +1910,7 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_Tr .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **button_pressed** +:ref:`StyleBox<class_StyleBox>` **button_pressed** :ref:`🔗<class_Tree_theme_style_button_pressed>` :ref:`StyleBox<class_StyleBox>` used when a button in the tree is pressed. @@ -1852,7 +1922,7 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_Tr .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **cursor** +:ref:`StyleBox<class_StyleBox>` **cursor** :ref:`🔗<class_Tree_theme_style_cursor>` :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **Tree** is being focused. @@ -1864,7 +1934,7 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_Tr .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** +:ref:`StyleBox<class_StyleBox>` **cursor_unfocused** :ref:`🔗<class_Tree_theme_style_cursor_unfocused>` :ref:`StyleBox<class_StyleBox>` used for the cursor, when the **Tree** is not being focused. @@ -1876,9 +1946,9 @@ The updown arrow icon to display for the :ref:`TreeItem.CELL_MODE_RANGE<class_Tr .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **custom_button** +:ref:`StyleBox<class_StyleBox>` **custom_button** :ref:`🔗<class_Tree_theme_style_custom_button>` -Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell. +Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when button is enabled with :ref:`TreeItem.set_custom_as_button<class_TreeItem_method_set_custom_as_button>`. .. rst-class:: classref-item-separator @@ -1888,9 +1958,9 @@ Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<cl .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **custom_button_hover** +:ref:`StyleBox<class_StyleBox>` **custom_button_hover** :ref:`🔗<class_Tree_theme_style_custom_button_hover>` -:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when it's hovered. +:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's hovered. .. rst-class:: classref-item-separator @@ -1900,9 +1970,9 @@ Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<cl .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **custom_button_pressed** +:ref:`StyleBox<class_StyleBox>` **custom_button_pressed** :ref:`🔗<class_Tree_theme_style_custom_button_pressed>` -:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode cell when it's pressed. +:ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` mode button cell when it's pressed. .. rst-class:: classref-item-separator @@ -1912,7 +1982,7 @@ Default :ref:`StyleBox<class_StyleBox>` for a :ref:`TreeItem.CELL_MODE_CUSTOM<cl .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **focus** +:ref:`StyleBox<class_StyleBox>` **focus** :ref:`🔗<class_Tree_theme_style_focus>` The focused style for the **Tree**, drawn on top of everything. @@ -1924,7 +1994,7 @@ The focused style for the **Tree**, drawn on top of everything. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **panel** +:ref:`StyleBox<class_StyleBox>` **panel** :ref:`🔗<class_Tree_theme_style_panel>` The background style for the **Tree**. @@ -1936,7 +2006,7 @@ The background style for the **Tree**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **selected** +:ref:`StyleBox<class_StyleBox>` **selected** :ref:`🔗<class_Tree_theme_style_selected>` :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **Tree** is not being focused. @@ -1948,7 +2018,7 @@ The background style for the **Tree**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **selected_focus** +:ref:`StyleBox<class_StyleBox>` **selected_focus** :ref:`🔗<class_Tree_theme_style_selected_focus>` :ref:`StyleBox<class_StyleBox>` for the selected items, used when the **Tree** is being focused. @@ -1960,7 +2030,7 @@ The background style for the **Tree**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **title_button_hover** +:ref:`StyleBox<class_StyleBox>` **title_button_hover** :ref:`🔗<class_Tree_theme_style_title_button_hover>` :ref:`StyleBox<class_StyleBox>` used when the title button is being hovered. @@ -1972,7 +2042,7 @@ The background style for the **Tree**. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **title_button_normal** +:ref:`StyleBox<class_StyleBox>` **title_button_normal** :ref:`🔗<class_Tree_theme_style_title_button_normal>` Default :ref:`StyleBox<class_StyleBox>` for the title button. @@ -1984,7 +2054,7 @@ Default :ref:`StyleBox<class_StyleBox>` for the title button. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **title_button_pressed** +:ref:`StyleBox<class_StyleBox>` **title_button_pressed** :ref:`🔗<class_Tree_theme_style_title_button_pressed>` :ref:`StyleBox<class_StyleBox>` used when the title button is being pressed. @@ -1995,3 +2065,4 @@ Default :ref:`StyleBox<class_StyleBox>` for the title button. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_treeitem.rst b/classes/class_treeitem.rst index c8d48b70ded..7fbbf384983 100644 --- a/classes/class_treeitem.rst +++ b/classes/class_treeitem.rst @@ -51,201 +51,213 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_button<class_TreeItem_method_add_button>` **(** :ref:`int<class_int>` column, :ref:`Texture2D<class_Texture2D>` button, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` disabled=false, :ref:`String<class_String>` tooltip_text="" **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_child<class_TreeItem_method_add_child>` **(** :ref:`TreeItem<class_TreeItem>` child **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`call_recursive<class_TreeItem_method_call_recursive>` **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_custom_bg_color<class_TreeItem_method_clear_custom_bg_color>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_custom_color<class_TreeItem_method_clear_custom_color>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`create_child<class_TreeItem_method_create_child>` **(** :ref:`int<class_int>` index=-1 **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect<class_TreeItem_method_deselect>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_button<class_TreeItem_method_erase_button>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`get_autowrap_mode<class_TreeItem_method_get_autowrap_mode>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_button<class_TreeItem_method_get_button>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_button_by_id<class_TreeItem_method_get_button_by_id>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_button_count<class_TreeItem_method_get_button_count>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_button_id<class_TreeItem_method_get_button_id>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_button_tooltip_text<class_TreeItem_method_get_button_tooltip_text>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` | :ref:`get_cell_mode<class_TreeItem_method_get_cell_mode>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_child<class_TreeItem_method_get_child>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_child_count<class_TreeItem_method_get_child_count>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem[]<class_TreeItem>` | :ref:`get_children<class_TreeItem_method_get_children>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_custom_bg_color<class_TreeItem_method_get_custom_bg_color>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_expand_right<class_TreeItem_method_get_expand_right>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_first_child<class_TreeItem_method_get_first_child>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_TreeItem_method_get_icon>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_icon_max_width<class_TreeItem_method_get_icon_max_width>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_icon_modulate<class_TreeItem_method_get_icon_modulate>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_icon_region<class_TreeItem_method_get_icon_region>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_index<class_TreeItem_method_get_index>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_language<class_TreeItem_method_get_language>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_metadata<class_TreeItem_method_get_metadata>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next<class_TreeItem_method_get_next>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_in_tree<class_TreeItem_method_get_next_in_tree>` **(** :ref:`bool<class_bool>` wrap=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_visible<class_TreeItem_method_get_next_visible>` **(** :ref:`bool<class_bool>` wrap=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_parent<class_TreeItem_method_get_parent>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev<class_TreeItem_method_get_prev>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_in_tree<class_TreeItem_method_get_prev_in_tree>` **(** :ref:`bool<class_bool>` wrap=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_visible<class_TreeItem_method_get_prev_visible>` **(** :ref:`bool<class_bool>` wrap=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_range<class_TreeItem_method_get_range>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_range_config<class_TreeItem_method_get_range_config>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`get_structured_text_bidi_override<class_TreeItem_method_get_structured_text_bidi_override>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_structured_text_bidi_override_options<class_TreeItem_method_get_structured_text_bidi_override_options>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_suffix<class_TreeItem_method_get_suffix>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_text<class_TreeItem_method_get_text>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_text_alignment<class_TreeItem_method_get_text_alignment>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_text_direction<class_TreeItem_method_get_text_direction>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_tooltip_text<class_TreeItem_method_get_tooltip_text>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tree<class_Tree>` | :ref:`get_tree<class_TreeItem_method_get_tree>` **(** **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_any_collapsed<class_TreeItem_method_is_any_collapsed>` **(** :ref:`bool<class_bool>` only_visible=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_button_disabled<class_TreeItem_method_is_button_disabled>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_checked<class_TreeItem_method_is_checked>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_custom_set_as_button<class_TreeItem_method_is_custom_set_as_button>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_edit_multiline<class_TreeItem_method_is_edit_multiline>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_editable<class_TreeItem_method_is_editable>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_indeterminate<class_TreeItem_method_is_indeterminate>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_selectable<class_TreeItem_method_is_selectable>` **(** :ref:`int<class_int>` column **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_selected<class_TreeItem_method_is_selected>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_after<class_TreeItem_method_move_after>` **(** :ref:`TreeItem<class_TreeItem>` item **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_before<class_TreeItem_method_move_before>` **(** :ref:`TreeItem<class_TreeItem>` item **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`propagate_check<class_TreeItem_method_propagate_check>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` emit_signal=true **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_child<class_TreeItem_method_remove_child>` **(** :ref:`TreeItem<class_TreeItem>` child **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select<class_TreeItem_method_select>` **(** :ref:`int<class_int>` column **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_autowrap_mode<class_TreeItem_method_set_autowrap_mode>` **(** :ref:`int<class_int>` column, :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` autowrap_mode **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_button<class_TreeItem_method_set_button>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`Texture2D<class_Texture2D>` button **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_button_color<class_TreeItem_method_set_button_color>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`Color<class_Color>` color **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_button_disabled<class_TreeItem_method_set_button_disabled>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`bool<class_bool>` disabled **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_button_tooltip_text<class_TreeItem_method_set_button_tooltip_text>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`String<class_String>` tooltip **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_mode<class_TreeItem_method_set_cell_mode>` **(** :ref:`int<class_int>` column, :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` mode **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_checked<class_TreeItem_method_set_checked>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` checked **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collapsed_recursive<class_TreeItem_method_set_collapsed_recursive>` **(** :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_bg_color<class_TreeItem_method_set_custom_bg_color>` **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` just_outline=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_color<class_TreeItem_method_set_custom_color>` **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` color **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_draw<class_TreeItem_method_set_custom_draw>` **(** :ref:`int<class_int>` column, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>` **(** :ref:`int<class_int>` column, :ref:`Font<class_Font>` font **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` font_size **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` multiline **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_editable<class_TreeItem_method_set_editable>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enabled **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_expand_right<class_TreeItem_method_set_expand_right>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon<class_TreeItem_method_set_icon>` **(** :ref:`int<class_int>` column, :ref:`Texture2D<class_Texture2D>` texture **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon_max_width<class_TreeItem_method_set_icon_max_width>` **(** :ref:`int<class_int>` column, :ref:`int<class_int>` width **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon_modulate<class_TreeItem_method_set_icon_modulate>` **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` modulate **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_icon_region<class_TreeItem_method_set_icon_region>` **(** :ref:`int<class_int>` column, :ref:`Rect2<class_Rect2>` region **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` indeterminate **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_language<class_TreeItem_method_set_language>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` language **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_metadata<class_TreeItem_method_set_metadata>` **(** :ref:`int<class_int>` column, :ref:`Variant<class_Variant>` meta **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_range<class_TreeItem_method_set_range>` **(** :ref:`int<class_int>` column, :ref:`float<class_float>` value **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_range_config<class_TreeItem_method_set_range_config>` **(** :ref:`int<class_int>` column, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`float<class_float>` step, :ref:`bool<class_bool>` expr=false **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_selectable<class_TreeItem_method_set_selectable>` **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` selectable **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_structured_text_bidi_override<class_TreeItem_method_set_structured_text_bidi_override>` **(** :ref:`int<class_int>` column, :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_structured_text_bidi_override_options<class_TreeItem_method_set_structured_text_bidi_override_options>` **(** :ref:`int<class_int>` column, :ref:`Array<class_Array>` args **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_suffix<class_TreeItem_method_set_suffix>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` text **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_text<class_TreeItem_method_set_text>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` text **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_text_alignment<class_TreeItem_method_set_text_alignment>` **(** :ref:`int<class_int>` column, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` text_alignment **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_text_direction<class_TreeItem_method_set_text_direction>` **(** :ref:`int<class_int>` column, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_tooltip_text<class_TreeItem_method_set_tooltip_text>` **(** :ref:`int<class_int>` column, :ref:`String<class_String>` tooltip **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`uncollapse_tree<class_TreeItem_method_uncollapse_tree>` **(** **)** | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_button<class_TreeItem_method_add_button>`\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = ""\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_child<class_TreeItem_method_add_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`call_recursive<class_TreeItem_method_call_recursive>`\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_custom_bg_color<class_TreeItem_method_clear_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_custom_color<class_TreeItem_method_clear_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`create_child<class_TreeItem_method_create_child>`\ (\ index\: :ref:`int<class_int>` = -1\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`deselect<class_TreeItem_method_deselect>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`erase_button<class_TreeItem_method_erase_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` | :ref:`get_autowrap_mode<class_TreeItem_method_get_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_button<class_TreeItem_method_get_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_button_by_id<class_TreeItem_method_get_button_by_id>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_button_color<class_TreeItem_method_get_button_color>`\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_button_count<class_TreeItem_method_get_button_count>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_button_id<class_TreeItem_method_get_button_id>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_button_tooltip_text<class_TreeItem_method_get_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` | :ref:`get_cell_mode<class_TreeItem_method_get_cell_mode>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_child<class_TreeItem_method_get_child>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_child_count<class_TreeItem_method_get_child_count>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] | :ref:`get_children<class_TreeItem_method_get_children>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_custom_bg_color<class_TreeItem_method_get_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_custom_color<class_TreeItem_method_get_custom_color>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable<class_Callable>` | :ref:`get_custom_draw_callback<class_TreeItem_method_get_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`get_custom_font<class_TreeItem_method_get_custom_font>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_custom_font_size<class_TreeItem_method_get_custom_font_size>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_expand_right<class_TreeItem_method_get_expand_right>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_first_child<class_TreeItem_method_get_first_child>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_icon<class_TreeItem_method_get_icon>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_icon_max_width<class_TreeItem_method_get_icon_max_width>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_icon_modulate<class_TreeItem_method_get_icon_modulate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_icon_region<class_TreeItem_method_get_icon_region>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_index<class_TreeItem_method_get_index>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_language<class_TreeItem_method_get_language>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_metadata<class_TreeItem_method_get_metadata>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next<class_TreeItem_method_get_next>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_in_tree<class_TreeItem_method_get_next_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_next_visible<class_TreeItem_method_get_next_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_parent<class_TreeItem_method_get_parent>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev<class_TreeItem_method_get_prev>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_in_tree<class_TreeItem_method_get_prev_in_tree>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TreeItem<class_TreeItem>` | :ref:`get_prev_visible<class_TreeItem_method_get_prev_visible>`\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_range<class_TreeItem_method_get_range>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_range_config<class_TreeItem_method_get_range_config>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` | :ref:`get_structured_text_bidi_override<class_TreeItem_method_get_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_structured_text_bidi_override_options<class_TreeItem_method_get_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_suffix<class_TreeItem_method_get_suffix>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_text<class_TreeItem_method_get_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` | :ref:`get_text_alignment<class_TreeItem_method_get_text_alignment>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`get_text_direction<class_TreeItem_method_get_text_direction>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` | :ref:`get_text_overrun_behavior<class_TreeItem_method_get_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_tooltip_text<class_TreeItem_method_get_tooltip_text>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tree<class_Tree>` | :ref:`get_tree<class_TreeItem_method_get_tree>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_any_collapsed<class_TreeItem_method_is_any_collapsed>`\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_button_disabled<class_TreeItem_method_is_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_checked<class_TreeItem_method_is_checked>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_custom_set_as_button<class_TreeItem_method_is_custom_set_as_button>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_edit_multiline<class_TreeItem_method_is_edit_multiline>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_editable<class_TreeItem_method_is_editable>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_indeterminate<class_TreeItem_method_is_indeterminate>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_selectable<class_TreeItem_method_is_selectable>`\ (\ column\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_selected<class_TreeItem_method_is_selected>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_TreeItem_method_is_visible_in_tree>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_after<class_TreeItem_method_move_after>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_before<class_TreeItem_method_move_before>`\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`propagate_check<class_TreeItem_method_propagate_check>`\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_child<class_TreeItem_method_remove_child>`\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select<class_TreeItem_method_select>`\ (\ column\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_autowrap_mode<class_TreeItem_method_set_autowrap_mode>`\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_button<class_TreeItem_method_set_button>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_button_color<class_TreeItem_method_set_button_color>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_button_disabled<class_TreeItem_method_set_button_disabled>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_button_tooltip_text<class_TreeItem_method_set_button_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_cell_mode<class_TreeItem_method_set_cell_mode>`\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_checked<class_TreeItem_method_set_checked>`\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_collapsed_recursive<class_TreeItem_method_set_collapsed_recursive>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_bg_color<class_TreeItem_method_set_custom_bg_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_color<class_TreeItem_method_set_custom_color>`\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_draw<class_TreeItem_method_set_custom_draw>`\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>`\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_font<class_TreeItem_method_set_custom_font>`\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_custom_font_size<class_TreeItem_method_set_custom_font_size>`\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>`\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_editable<class_TreeItem_method_set_editable>`\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_expand_right<class_TreeItem_method_set_expand_right>`\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon<class_TreeItem_method_set_icon>`\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon_max_width<class_TreeItem_method_set_icon_max_width>`\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon_modulate<class_TreeItem_method_set_icon_modulate>`\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon_region<class_TreeItem_method_set_icon_region>`\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>`\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_language<class_TreeItem_method_set_language>`\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_metadata<class_TreeItem_method_set_metadata>`\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_range<class_TreeItem_method_set_range>`\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_range_config<class_TreeItem_method_set_range_config>`\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_selectable<class_TreeItem_method_set_selectable>`\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_structured_text_bidi_override<class_TreeItem_method_set_structured_text_bidi_override>`\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_structured_text_bidi_override_options<class_TreeItem_method_set_structured_text_bidi_override_options>`\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_suffix<class_TreeItem_method_set_suffix>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_text<class_TreeItem_method_set_text>`\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_text_alignment<class_TreeItem_method_set_text_alignment>`\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_text_direction<class_TreeItem_method_set_text_direction>`\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_text_overrun_behavior<class_TreeItem_method_set_text_overrun_behavior>`\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tooltip_text<class_TreeItem_method_set_tooltip_text>`\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`uncollapse_tree<class_TreeItem_method_uncollapse_tree>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -260,7 +272,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TreeCellMode**: +enum **TreeCellMode**: :ref:`🔗<enum_TreeItem_TreeCellMode>` .. _class_TreeItem_constant_CELL_MODE_STRING: @@ -268,7 +280,7 @@ enum **TreeCellMode**: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_STRING** = ``0`` -Cell contains a string. +Cell shows a string label. When editable, the text can be edited using a :ref:`LineEdit<class_LineEdit>`, or a :ref:`TextEdit<class_TextEdit>` popup if :ref:`set_edit_multiline<class_TreeItem_method_set_edit_multiline>` is used. .. _class_TreeItem_constant_CELL_MODE_CHECK: @@ -276,7 +288,7 @@ Cell contains a string. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CHECK** = ``1`` -Cell contains a checkbox. +Cell shows a checkbox, optionally with text. The checkbox can be pressed, released, or indeterminate (via :ref:`set_indeterminate<class_TreeItem_method_set_indeterminate>`). The checkbox can't be clicked unless the cell is editable. .. _class_TreeItem_constant_CELL_MODE_RANGE: @@ -284,7 +296,9 @@ Cell contains a checkbox. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_RANGE** = ``2`` -Cell contains a range. +Cell shows a numeric range. When editable, it can be edited using a range slider. Use :ref:`set_range<class_TreeItem_method_set_range>` to set the value and :ref:`set_range_config<class_TreeItem_method_set_range_config>` to configure the range. + +This cell can also be used in a text dropdown mode when you assign a text with :ref:`set_text<class_TreeItem_method_set_text>`. Separate options with a comma, e.g. ``"Option1,Option2,Option3"``. .. _class_TreeItem_constant_CELL_MODE_ICON: @@ -292,7 +306,7 @@ Cell contains a range. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_ICON** = ``3`` -Cell contains an icon. +Cell shows an icon. It can't be edited nor display text. .. _class_TreeItem_constant_CELL_MODE_CUSTOM: @@ -300,7 +314,9 @@ Cell contains an icon. :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **CELL_MODE_CUSTOM** = ``4`` +Cell shows as a clickable button. It will display an arrow similar to :ref:`OptionButton<class_OptionButton>`, but doesn't feature a dropdown (for that you can use :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>`). Clicking the button emits the :ref:`Tree.item_edited<class_Tree_signal_item_edited>` signal. The button is flat by default, you can use :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>` to display it with a :ref:`StyleBox<class_StyleBox>`. +This mode also supports custom drawing using :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>`. .. rst-class:: classref-section-separator @@ -315,12 +331,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **collapsed** +:ref:`bool<class_bool>` **collapsed** :ref:`🔗<class_TreeItem_property_collapsed>` .. rst-class:: classref-property-setget -- void **set_collapsed** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_collapsed** **(** **)** +- |void| **set_collapsed**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_collapsed**\ (\ ) If ``true``, the TreeItem is collapsed. @@ -332,12 +348,12 @@ If ``true``, the TreeItem is collapsed. .. rst-class:: classref-property -:ref:`int<class_int>` **custom_minimum_height** +:ref:`int<class_int>` **custom_minimum_height** :ref:`🔗<class_TreeItem_property_custom_minimum_height>` .. rst-class:: classref-property-setget -- void **set_custom_minimum_height** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_custom_minimum_height** **(** **)** +- |void| **set_custom_minimum_height**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_custom_minimum_height**\ (\ ) The custom minimum height. @@ -349,12 +365,12 @@ The custom minimum height. .. rst-class:: classref-property -:ref:`bool<class_bool>` **disable_folding** +:ref:`bool<class_bool>` **disable_folding** :ref:`🔗<class_TreeItem_property_disable_folding>` .. rst-class:: classref-property-setget -- void **set_disable_folding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_folding_disabled** **(** **)** +- |void| **set_disable_folding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_folding_disabled**\ (\ ) If ``true``, folding is disabled for this TreeItem. @@ -366,12 +382,12 @@ If ``true``, folding is disabled for this TreeItem. .. rst-class:: classref-property -:ref:`bool<class_bool>` **visible** +:ref:`bool<class_bool>` **visible** :ref:`🔗<class_TreeItem_property_visible>` .. rst-class:: classref-property-setget -- void **set_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_visible** **(** **)** +- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_visible**\ (\ ) If ``true``, the **TreeItem** is visible (default). @@ -390,7 +406,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_button** **(** :ref:`int<class_int>` column, :ref:`Texture2D<class_Texture2D>` button, :ref:`int<class_int>` id=-1, :ref:`bool<class_bool>` disabled=false, :ref:`String<class_String>` tooltip_text="" **)** +|void| **add_button**\ (\ column\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`, id\: :ref:`int<class_int>` = -1, disabled\: :ref:`bool<class_bool>` = false, tooltip_text\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_TreeItem_method_add_button>` Adds a button with :ref:`Texture2D<class_Texture2D>` ``button`` at column ``column``. The ``id`` is used to identify the button in the according :ref:`Tree.button_clicked<class_Tree_signal_button_clicked>` signal and can be different from the buttons index. If not specified, the next available index is used, which may be retrieved by calling :ref:`get_button_count<class_TreeItem_method_get_button_count>` immediately before this method. Optionally, the button can be ``disabled`` and have a ``tooltip_text``. @@ -402,7 +418,7 @@ Adds a button with :ref:`Texture2D<class_Texture2D>` ``button`` at column ``colu .. rst-class:: classref-method -void **add_child** **(** :ref:`TreeItem<class_TreeItem>` child **)** +|void| **add_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_add_child>` Adds a previously unparented **TreeItem** as a direct child of this one. The ``child`` item must not be a part of any :ref:`Tree<class_Tree>` or parented to any **TreeItem**. See also :ref:`remove_child<class_TreeItem_method_remove_child>`. @@ -414,7 +430,7 @@ Adds a previously unparented **TreeItem** as a direct child of this one. The ``c .. rst-class:: classref-method -void **call_recursive** **(** :ref:`StringName<class_StringName>` method, ... **)** |vararg| +|void| **call_recursive**\ (\ method\: :ref:`StringName<class_StringName>`, ...\ ) |vararg| :ref:`🔗<class_TreeItem_method_call_recursive>` Calls the ``method`` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. @@ -426,7 +442,7 @@ Calls the ``method`` on the actual TreeItem and its children recursively. Pass p .. rst-class:: classref-method -void **clear_custom_bg_color** **(** :ref:`int<class_int>` column **)** +|void| **clear_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_bg_color>` Resets the background color for the given column to default. @@ -438,7 +454,7 @@ Resets the background color for the given column to default. .. rst-class:: classref-method -void **clear_custom_color** **(** :ref:`int<class_int>` column **)** +|void| **clear_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_clear_custom_color>` Resets the color for the given column to default. @@ -450,7 +466,7 @@ Resets the color for the given column to default. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **create_child** **(** :ref:`int<class_int>` index=-1 **)** +:ref:`TreeItem<class_TreeItem>` **create_child**\ (\ index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_TreeItem_method_create_child>` Creates an item and adds it as a child. @@ -464,7 +480,7 @@ The new item will be inserted as position ``index`` (the default value ``-1`` me .. rst-class:: classref-method -void **deselect** **(** :ref:`int<class_int>` column **)** +|void| **deselect**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_deselect>` Deselects the given column. @@ -476,7 +492,7 @@ Deselects the given column. .. rst-class:: classref-method -void **erase_button** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** +|void| **erase_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_erase_button>` Removes the button at index ``button_index`` in column ``column``. @@ -488,7 +504,7 @@ Removes the button at index ``button_index`` in column ``column``. .. rst-class:: classref-method -:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode** **(** :ref:`int<class_int>` column **)** |const| +:ref:`AutowrapMode<enum_TextServer_AutowrapMode>` **get_autowrap_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_autowrap_mode>` Returns the text autowrap mode in the given ``column``. By default it is :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`. @@ -500,7 +516,7 @@ Returns the text autowrap mode in the given ``column``. By default it is :ref:`T .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_button** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button>` Returns the :ref:`Texture2D<class_Texture2D>` of the button at index ``button_index`` in column ``column``. @@ -512,7 +528,7 @@ Returns the :ref:`Texture2D<class_Texture2D>` of the button at index ``button_in .. rst-class:: classref-method -:ref:`int<class_int>` **get_button_by_id** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` id **)** |const| +:ref:`int<class_int>` **get_button_by_id**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_by_id>` Returns the button index if there is a button with ID ``id`` in column ``column``, otherwise returns -1. @@ -520,11 +536,23 @@ Returns the button index if there is a button with ID ``id`` in column ``column` ---- +.. _class_TreeItem_method_get_button_color: + +.. rst-class:: classref-method + +:ref:`Color<class_Color>` **get_button_color**\ (\ column\: :ref:`int<class_int>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_color>` + +Returns the color of the button with ID ``id`` in column ``column``. If the specified button does not exist, returns :ref:`Color.BLACK<class_Color_constant_BLACK>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_button_count: .. rst-class:: classref-method -:ref:`int<class_int>` **get_button_count** **(** :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_button_count**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_count>` Returns the number of buttons in column ``column``. @@ -536,7 +564,7 @@ Returns the number of buttons in column ``column``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_button_id** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| +:ref:`int<class_int>` **get_button_id**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_id>` Returns the ID for the button at index ``button_index`` in column ``column``. @@ -548,7 +576,7 @@ Returns the ID for the button at index ``button_index`` in column ``column``. .. rst-class:: classref-method -:ref:`String<class_String>` **get_button_tooltip_text** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| +:ref:`String<class_String>` **get_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_button_tooltip_text>` Returns the tooltip text for the button at index ``button_index`` in column ``column``. @@ -560,7 +588,7 @@ Returns the tooltip text for the button at index ``button_index`` in column ``co .. rst-class:: classref-method -:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **get_cell_mode** **(** :ref:`int<class_int>` column **)** |const| +:ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` **get_cell_mode**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_cell_mode>` Returns the column's cell mode. @@ -572,7 +600,7 @@ Returns the column's cell mode. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_child** **(** :ref:`int<class_int>` index **)** +:ref:`TreeItem<class_TreeItem>` **get_child**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_child>` Returns a child item by its ``index`` (see :ref:`get_child_count<class_TreeItem_method_get_child_count>`). This method is often used for iterating all children of an item. @@ -586,7 +614,7 @@ Negative indices access the children from the last one. .. rst-class:: classref-method -:ref:`int<class_int>` **get_child_count** **(** **)** +:ref:`int<class_int>` **get_child_count**\ (\ ) :ref:`🔗<class_TreeItem_method_get_child_count>` Returns the number of child items. @@ -598,7 +626,7 @@ Returns the number of child items. .. rst-class:: classref-method -:ref:`TreeItem[]<class_TreeItem>` **get_children** **(** **)** +:ref:`Array<class_Array>`\[:ref:`TreeItem<class_TreeItem>`\] **get_children**\ (\ ) :ref:`🔗<class_TreeItem_method_get_children>` Returns an array of references to the item's children. @@ -610,7 +638,7 @@ Returns an array of references to the item's children. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_custom_bg_color** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Color<class_Color>` **get_custom_bg_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_bg_color>` Returns the custom background color of column ``column``. @@ -622,7 +650,7 @@ Returns the custom background color of column ``column``. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_custom_color** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Color<class_Color>` **get_custom_color**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_color>` Returns the custom color of column ``column``. @@ -630,11 +658,23 @@ Returns the custom color of column ``column``. ---- +.. _class_TreeItem_method_get_custom_draw_callback: + +.. rst-class:: classref-method + +:ref:`Callable<class_Callable>` **get_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_draw_callback>` + +Returns the custom callback of column ``column``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_custom_font: .. rst-class:: classref-method -:ref:`Font<class_Font>` **get_custom_font** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Font<class_Font>` **get_custom_font**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font>` Returns custom font used to draw text in the column ``column``. @@ -646,7 +686,7 @@ Returns custom font used to draw text in the column ``column``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_custom_font_size** **(** :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_custom_font_size**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_custom_font_size>` Returns custom font size used to draw text in the column ``column``. @@ -658,7 +698,7 @@ Returns custom font size used to draw text in the column ``column``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_expand_right** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **get_expand_right**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_expand_right>` Returns ``true`` if ``expand_right`` is set. @@ -670,7 +710,7 @@ Returns ``true`` if ``expand_right`` is set. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_first_child** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_first_child**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_first_child>` Returns the TreeItem's first child. @@ -682,7 +722,7 @@ Returns the TreeItem's first child. .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_icon** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_icon**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon>` Returns the given column's icon :ref:`Texture2D<class_Texture2D>`. Error if no icon is set. @@ -694,7 +734,7 @@ Returns the given column's icon :ref:`Texture2D<class_Texture2D>`. Error if no i .. rst-class:: classref-method -:ref:`int<class_int>` **get_icon_max_width** **(** :ref:`int<class_int>` column **)** |const| +:ref:`int<class_int>` **get_icon_max_width**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_max_width>` Returns the maximum allowed width of the icon in the given ``column``. @@ -706,7 +746,7 @@ Returns the maximum allowed width of the icon in the given ``column``. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_icon_modulate** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Color<class_Color>` **get_icon_modulate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_modulate>` Returns the :ref:`Color<class_Color>` modulating the column's icon. @@ -718,7 +758,7 @@ Returns the :ref:`Color<class_Color>` modulating the column's icon. .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_icon_region** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Rect2<class_Rect2>` **get_icon_region**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_icon_region>` Returns the icon :ref:`Texture2D<class_Texture2D>` region as :ref:`Rect2<class_Rect2>`. @@ -730,7 +770,7 @@ Returns the icon :ref:`Texture2D<class_Texture2D>` region as :ref:`Rect2<class_R .. rst-class:: classref-method -:ref:`int<class_int>` **get_index** **(** **)** +:ref:`int<class_int>` **get_index**\ (\ ) :ref:`🔗<class_TreeItem_method_get_index>` Returns the node's order in the tree. For example, if called on the first child item the position is ``0``. @@ -742,7 +782,7 @@ Returns the node's order in the tree. For example, if called on the first child .. rst-class:: classref-method -:ref:`String<class_String>` **get_language** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_language**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_language>` Returns item's text language code. @@ -754,7 +794,7 @@ Returns item's text language code. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_metadata** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Variant<class_Variant>` **get_metadata**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_metadata>` Returns the metadata value that was set for the given column using :ref:`set_metadata<class_TreeItem_method_set_metadata>`. @@ -766,7 +806,7 @@ Returns the metadata value that was set for the given column using :ref:`set_met .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_next** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_next**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_next>` Returns the next sibling TreeItem in the tree or a null object if there is none. @@ -778,7 +818,7 @@ Returns the next sibling TreeItem in the tree or a null object if there is none. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_next_in_tree** **(** :ref:`bool<class_bool>` wrap=false **)** +:ref:`TreeItem<class_TreeItem>` **get_next_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_in_tree>` Returns the next TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. @@ -792,7 +832,7 @@ If ``wrap`` is enabled, the method will wrap around to the first element in the .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_next_visible** **(** :ref:`bool<class_bool>` wrap=false **)** +:ref:`TreeItem<class_TreeItem>` **get_next_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_next_visible>` Returns the next visible TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. @@ -806,7 +846,7 @@ If ``wrap`` is enabled, the method will wrap around to the first visible element .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_parent** **(** **)** |const| +:ref:`TreeItem<class_TreeItem>` **get_parent**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_parent>` Returns the parent TreeItem or a null object if there is none. @@ -818,7 +858,7 @@ Returns the parent TreeItem or a null object if there is none. .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_prev** **(** **)** +:ref:`TreeItem<class_TreeItem>` **get_prev**\ (\ ) :ref:`🔗<class_TreeItem_method_get_prev>` Returns the previous sibling TreeItem in the tree or a null object if there is none. @@ -830,7 +870,7 @@ Returns the previous sibling TreeItem in the tree or a null object if there is n .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_prev_in_tree** **(** :ref:`bool<class_bool>` wrap=false **)** +:ref:`TreeItem<class_TreeItem>` **get_prev_in_tree**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_in_tree>` Returns the previous TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. @@ -844,7 +884,7 @@ If ``wrap`` is enabled, the method will wrap around to the last element in the t .. rst-class:: classref-method -:ref:`TreeItem<class_TreeItem>` **get_prev_visible** **(** :ref:`bool<class_bool>` wrap=false **)** +:ref:`TreeItem<class_TreeItem>` **get_prev_visible**\ (\ wrap\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_get_prev_visible>` Returns the previous visible sibling TreeItem in the tree (in the context of a depth-first search) or a ``null`` object if there is none. @@ -858,7 +898,7 @@ If ``wrap`` is enabled, the method will wrap around to the last visible element .. rst-class:: classref-method -:ref:`float<class_float>` **get_range** **(** :ref:`int<class_int>` column **)** |const| +:ref:`float<class_float>` **get_range**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_range>` Returns the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` column. @@ -870,7 +910,7 @@ Returns the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_R .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_range_config** **(** :ref:`int<class_int>` column **)** +:ref:`Dictionary<class_Dictionary>` **get_range_config**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_get_range_config>` Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr". @@ -882,11 +922,9 @@ Returns a dictionary containing the range parameters for a given column. The key .. rst-class:: classref-method -:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override** **(** :ref:`int<class_int>` column **)** |const| - -.. container:: contribute +:ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` **get_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the BiDi algorithm override set for this cell. .. rst-class:: classref-item-separator @@ -896,11 +934,9 @@ Returns a dictionary containing the range parameters for a given column. The key .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_structured_text_bidi_override_options** **(** :ref:`int<class_int>` column **)** |const| +:ref:`Array<class_Array>` **get_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_structured_text_bidi_override_options>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns the additional BiDi options set for this cell. .. rst-class:: classref-item-separator @@ -910,7 +946,7 @@ Returns a dictionary containing the range parameters for a given column. The key .. rst-class:: classref-method -:ref:`String<class_String>` **get_suffix** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_suffix**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_suffix>` Gets the suffix string shown after the column value. @@ -922,7 +958,7 @@ Gets the suffix string shown after the column value. .. rst-class:: classref-method -:ref:`String<class_String>` **get_text** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text>` Returns the given column's text. @@ -934,7 +970,7 @@ Returns the given column's text. .. rst-class:: classref-method -:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_text_alignment** **(** :ref:`int<class_int>` column **)** |const| +:ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` **get_text_alignment**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_alignment>` Returns the given column's text alignment. @@ -946,7 +982,7 @@ Returns the given column's text alignment. .. rst-class:: classref-method -:ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction** **(** :ref:`int<class_int>` column **)** |const| +:ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_direction>` Returns item's text base writing direction. @@ -954,11 +990,23 @@ Returns item's text base writing direction. ---- +.. _class_TreeItem_method_get_text_overrun_behavior: + +.. rst-class:: classref-method + +:ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>` **get_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_text_overrun_behavior>` + +Returns the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``. By default it is :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS<class_TextServer_constant_OVERRUN_TRIM_ELLIPSIS>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_get_tooltip_text: .. rst-class:: classref-method -:ref:`String<class_String>` **get_tooltip_text** **(** :ref:`int<class_int>` column **)** |const| +:ref:`String<class_String>` **get_tooltip_text**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_get_tooltip_text>` Returns the given column's tooltip text. @@ -970,7 +1018,7 @@ Returns the given column's tooltip text. .. rst-class:: classref-method -:ref:`Tree<class_Tree>` **get_tree** **(** **)** |const| +:ref:`Tree<class_Tree>` **get_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_get_tree>` Returns the :ref:`Tree<class_Tree>` that owns this TreeItem. @@ -982,7 +1030,7 @@ Returns the :ref:`Tree<class_Tree>` that owns this TreeItem. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_any_collapsed** **(** :ref:`bool<class_bool>` only_visible=false **)** +:ref:`bool<class_bool>` **is_any_collapsed**\ (\ only_visible\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_is_any_collapsed>` Returns ``true`` if this **TreeItem**, or any of its descendants, is collapsed. @@ -996,7 +1044,7 @@ If ``only_visible`` is ``true`` it ignores non-visible **TreeItem**\ s. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_button_disabled** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index **)** |const| +:ref:`bool<class_bool>` **is_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_button_disabled>` Returns ``true`` if the button at index ``button_index`` for the given ``column`` is disabled. @@ -1008,7 +1056,7 @@ Returns ``true`` if the button at index ``button_index`` for the given ``column` .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_checked** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_checked**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_checked>` Returns ``true`` if the given ``column`` is checked. @@ -1020,11 +1068,9 @@ Returns ``true`` if the given ``column`` is checked. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_custom_set_as_button** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_custom_set_as_button**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_custom_set_as_button>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Returns ``true`` if the cell was made into a button with :ref:`set_custom_as_button<class_TreeItem_method_set_custom_as_button>`. .. rst-class:: classref-item-separator @@ -1034,7 +1080,7 @@ Returns ``true`` if the given ``column`` is checked. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_edit_multiline** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_edit_multiline**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_edit_multiline>` Returns ``true`` if the given ``column`` is multiline editable. @@ -1046,7 +1092,7 @@ Returns ``true`` if the given ``column`` is multiline editable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_editable** **(** :ref:`int<class_int>` column **)** +:ref:`bool<class_bool>` **is_editable**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_editable>` Returns ``true`` if the given ``column`` is editable. @@ -1058,7 +1104,7 @@ Returns ``true`` if the given ``column`` is editable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_indeterminate** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_indeterminate**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_indeterminate>` Returns ``true`` if the given ``column`` is indeterminate. @@ -1070,7 +1116,7 @@ Returns ``true`` if the given ``column`` is indeterminate. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_selectable** **(** :ref:`int<class_int>` column **)** |const| +:ref:`bool<class_bool>` **is_selectable**\ (\ column\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_TreeItem_method_is_selectable>` Returns ``true`` if the given ``column`` is selectable. @@ -1082,7 +1128,7 @@ Returns ``true`` if the given ``column`` is selectable. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_selected** **(** :ref:`int<class_int>` column **)** +:ref:`bool<class_bool>` **is_selected**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_is_selected>` Returns ``true`` if the given ``column`` is selected. @@ -1090,11 +1136,23 @@ Returns ``true`` if the given ``column`` is selected. ---- +.. _class_TreeItem_method_is_visible_in_tree: + +.. rst-class:: classref-method + +:ref:`bool<class_bool>` **is_visible_in_tree**\ (\ ) |const| :ref:`🔗<class_TreeItem_method_is_visible_in_tree>` + +Returns ``true`` if :ref:`visible<class_TreeItem_property_visible>` is ``true`` and all its ancestors are also visible. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_move_after: .. rst-class:: classref-method -void **move_after** **(** :ref:`TreeItem<class_TreeItem>` item **)** +|void| **move_after**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_after>` Moves this TreeItem right after the given ``item``. @@ -1108,7 +1166,7 @@ Moves this TreeItem right after the given ``item``. .. rst-class:: classref-method -void **move_before** **(** :ref:`TreeItem<class_TreeItem>` item **)** +|void| **move_before**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_move_before>` Moves this TreeItem right before the given ``item``. @@ -1122,7 +1180,7 @@ Moves this TreeItem right before the given ``item``. .. rst-class:: classref-method -void **propagate_check** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` emit_signal=true **)** +|void| **propagate_check**\ (\ column\: :ref:`int<class_int>`, emit_signal\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_TreeItem_method_propagate_check>` Propagates this item's checked status to its children and parents for the given ``column``. It is possible to process the items affected by this method call by connecting to :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>`. The order that the items affected will be processed is as follows: the item invoking this method, children of that item, and finally parents of that item. If ``emit_signal`` is ``false``, then :ref:`Tree.check_propagated_to_item<class_Tree_signal_check_propagated_to_item>` will not be emitted. @@ -1134,7 +1192,7 @@ Propagates this item's checked status to its children and parents for the given .. rst-class:: classref-method -void **remove_child** **(** :ref:`TreeItem<class_TreeItem>` child **)** +|void| **remove_child**\ (\ child\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_TreeItem_method_remove_child>` Removes the given child **TreeItem** and all its children from the :ref:`Tree<class_Tree>`. Note that it doesn't free the item from memory, so it can be reused later (see :ref:`add_child<class_TreeItem_method_add_child>`). To completely remove a **TreeItem** use :ref:`Object.free<class_Object_method_free>`. @@ -1148,7 +1206,7 @@ Removes the given child **TreeItem** and all its children from the :ref:`Tree<cl .. rst-class:: classref-method -void **select** **(** :ref:`int<class_int>` column **)** +|void| **select**\ (\ column\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_select>` Selects the given ``column``. @@ -1160,7 +1218,7 @@ Selects the given ``column``. .. rst-class:: classref-method -void **set_autowrap_mode** **(** :ref:`int<class_int>` column, :ref:`AutowrapMode<enum_TextServer_AutowrapMode>` autowrap_mode **)** +|void| **set_autowrap_mode**\ (\ column\: :ref:`int<class_int>`, autowrap_mode\: :ref:`AutowrapMode<enum_TextServer_AutowrapMode>`\ ) :ref:`🔗<class_TreeItem_method_set_autowrap_mode>` Sets the autowrap mode in the given ``column``. If set to something other than :ref:`TextServer.AUTOWRAP_OFF<class_TextServer_constant_AUTOWRAP_OFF>`, the text gets wrapped inside the cell's bounding rectangle. @@ -1172,7 +1230,7 @@ Sets the autowrap mode in the given ``column``. If set to something other than : .. rst-class:: classref-method -void **set_button** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`Texture2D<class_Texture2D>` button **)** +|void| **set_button**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, button\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_button>` Sets the given column's button :ref:`Texture2D<class_Texture2D>` at index ``button_index`` to ``button``. @@ -1184,7 +1242,7 @@ Sets the given column's button :ref:`Texture2D<class_Texture2D>` at index ``butt .. rst-class:: classref-method -void **set_button_color** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`Color<class_Color>` color **)** +|void| **set_button_color**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_button_color>` Sets the given column's button color at index ``button_index`` to ``color``. @@ -1196,7 +1254,7 @@ Sets the given column's button color at index ``button_index`` to ``color``. .. rst-class:: classref-method -void **set_button_disabled** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`bool<class_bool>` disabled **)** +|void| **set_button_disabled**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_button_disabled>` If ``true``, disables the button at index ``button_index`` in the given ``column``. @@ -1208,7 +1266,7 @@ If ``true``, disables the button at index ``button_index`` in the given ``column .. rst-class:: classref-method -void **set_button_tooltip_text** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_index, :ref:`String<class_String>` tooltip **)** +|void| **set_button_tooltip_text**\ (\ column\: :ref:`int<class_int>`, button_index\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_button_tooltip_text>` Sets the tooltip text for the button at index ``button_index`` in the given ``column``. @@ -1220,9 +1278,9 @@ Sets the tooltip text for the button at index ``button_index`` in the given ``co .. rst-class:: classref-method -void **set_cell_mode** **(** :ref:`int<class_int>` column, :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` mode **)** +|void| **set_cell_mode**\ (\ column\: :ref:`int<class_int>`, mode\: :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>`\ ) :ref:`🔗<class_TreeItem_method_set_cell_mode>` -Sets the given column's cell mode to ``mode``. See :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` constants. +Sets the given column's cell mode to ``mode``. This determines how the cell is displayed and edited. See :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` constants for details. .. rst-class:: classref-item-separator @@ -1232,7 +1290,7 @@ Sets the given column's cell mode to ``mode``. See :ref:`TreeCellMode<enum_TreeI .. rst-class:: classref-method -void **set_checked** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` checked **)** +|void| **set_checked**\ (\ column\: :ref:`int<class_int>`, checked\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_checked>` If ``checked`` is ``true``, the given ``column`` is checked. Clears column's indeterminate status. @@ -1244,7 +1302,7 @@ If ``checked`` is ``true``, the given ``column`` is checked. Clears column's ind .. rst-class:: classref-method -void **set_collapsed_recursive** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_collapsed_recursive**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_collapsed_recursive>` Collapses or uncollapses this **TreeItem** and all the descendants of this item. @@ -1256,11 +1314,9 @@ Collapses or uncollapses this **TreeItem** and all the descendants of this item. .. rst-class:: classref-method -void **set_custom_as_button** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** +|void| **set_custom_as_button**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_as_button>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Makes a cell with :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` display as a non-flat button with a :ref:`StyleBox<class_StyleBox>`. .. rst-class:: classref-item-separator @@ -1270,7 +1326,7 @@ void **set_custom_as_button** **(** :ref:`int<class_int>` column, :ref:`bool<cla .. rst-class:: classref-method -void **set_custom_bg_color** **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` color, :ref:`bool<class_bool>` just_outline=false **)** +|void| **set_custom_bg_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`, just_outline\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_custom_bg_color>` Sets the given column's custom background color and whether to just use it as an outline. @@ -1282,7 +1338,7 @@ Sets the given column's custom background color and whether to just use it as an .. rst-class:: classref-method -void **set_custom_color** **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` color **)** +|void| **set_custom_color**\ (\ column\: :ref:`int<class_int>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_color>` Sets the given column's custom color. @@ -1294,9 +1350,25 @@ Sets the given column's custom color. .. rst-class:: classref-method -void **set_custom_draw** **(** :ref:`int<class_int>` column, :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` callback **)** +|void| **set_custom_draw**\ (\ column\: :ref:`int<class_int>`, object\: :ref:`Object<class_Object>`, callback\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw>` + +**Deprecated:** Use :ref:`set_custom_draw_callback<class_TreeItem_method_set_custom_draw_callback>` instead. + +Sets the given column's custom draw callback to the ``callback`` method on ``object``. + +The method named ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TreeItem_method_set_custom_draw_callback: + +.. rst-class:: classref-method + +|void| **set_custom_draw_callback**\ (\ column\: :ref:`int<class_int>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_draw_callback>` -Sets the given column's custom draw callback to ``callback`` method on ``object``. +Sets the given column's custom draw callback. Use an empty :ref:`Callable<class_Callable>` (``Callable()``) to clear the custom callback. The cell has to be in :ref:`CELL_MODE_CUSTOM<class_TreeItem_constant_CELL_MODE_CUSTOM>` to use this feature. The ``callback`` should accept two arguments: the **TreeItem** that is drawn and its position and size as a :ref:`Rect2<class_Rect2>`. @@ -1308,7 +1380,7 @@ The ``callback`` should accept two arguments: the **TreeItem** that is drawn and .. rst-class:: classref-method -void **set_custom_font** **(** :ref:`int<class_int>` column, :ref:`Font<class_Font>` font **)** +|void| **set_custom_font**\ (\ column\: :ref:`int<class_int>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font>` Sets custom font used to draw text in the given ``column``. @@ -1320,7 +1392,7 @@ Sets custom font used to draw text in the given ``column``. .. rst-class:: classref-method -void **set_custom_font_size** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` font_size **)** +|void| **set_custom_font_size**\ (\ column\: :ref:`int<class_int>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_custom_font_size>` Sets custom font size used to draw text in the given ``column``. @@ -1332,7 +1404,7 @@ Sets custom font size used to draw text in the given ``column``. .. rst-class:: classref-method -void **set_edit_multiline** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` multiline **)** +|void| **set_edit_multiline**\ (\ column\: :ref:`int<class_int>`, multiline\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_edit_multiline>` If ``multiline`` is ``true``, the given ``column`` is multiline editable. @@ -1346,7 +1418,7 @@ If ``multiline`` is ``true``, the given ``column`` is multiline editable. .. rst-class:: classref-method -void **set_editable** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enabled **)** +|void| **set_editable**\ (\ column\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_editable>` If ``enabled`` is ``true``, the given ``column`` is editable. @@ -1358,7 +1430,7 @@ If ``enabled`` is ``true``, the given ``column`` is editable. .. rst-class:: classref-method -void **set_expand_right** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` enable **)** +|void| **set_expand_right**\ (\ column\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_expand_right>` If ``enable`` is ``true``, the given ``column`` is expanded to the right. @@ -1370,9 +1442,9 @@ If ``enable`` is ``true``, the given ``column`` is expanded to the right. .. rst-class:: classref-method -void **set_icon** **(** :ref:`int<class_int>` column, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **set_icon**\ (\ column\: :ref:`int<class_int>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_TreeItem_method_set_icon>` -Sets the given column's icon :ref:`Texture2D<class_Texture2D>`. +Sets the given cell's icon :ref:`Texture2D<class_Texture2D>`. The cell has to be in :ref:`CELL_MODE_ICON<class_TreeItem_constant_CELL_MODE_ICON>` mode. .. rst-class:: classref-item-separator @@ -1382,7 +1454,7 @@ Sets the given column's icon :ref:`Texture2D<class_Texture2D>`. .. rst-class:: classref-method -void **set_icon_max_width** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` width **)** +|void| **set_icon_max_width**\ (\ column\: :ref:`int<class_int>`, width\: :ref:`int<class_int>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_max_width>` Sets the maximum allowed width of the icon in the given ``column``. This limit is applied on top of the default size of the icon and on top of :ref:`Tree.icon_max_width<class_Tree_theme_constant_icon_max_width>`. The height is adjusted according to the icon's ratio. @@ -1394,7 +1466,7 @@ Sets the maximum allowed width of the icon in the given ``column``. This limit i .. rst-class:: classref-method -void **set_icon_modulate** **(** :ref:`int<class_int>` column, :ref:`Color<class_Color>` modulate **)** +|void| **set_icon_modulate**\ (\ column\: :ref:`int<class_int>`, modulate\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_modulate>` Modulates the given column's icon with ``modulate``. @@ -1406,7 +1478,7 @@ Modulates the given column's icon with ``modulate``. .. rst-class:: classref-method -void **set_icon_region** **(** :ref:`int<class_int>` column, :ref:`Rect2<class_Rect2>` region **)** +|void| **set_icon_region**\ (\ column\: :ref:`int<class_int>`, region\: :ref:`Rect2<class_Rect2>`\ ) :ref:`🔗<class_TreeItem_method_set_icon_region>` Sets the given column's icon's texture region. @@ -1418,7 +1490,7 @@ Sets the given column's icon's texture region. .. rst-class:: classref-method -void **set_indeterminate** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` indeterminate **)** +|void| **set_indeterminate**\ (\ column\: :ref:`int<class_int>`, indeterminate\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_indeterminate>` If ``indeterminate`` is ``true``, the given ``column`` is marked indeterminate. @@ -1432,7 +1504,7 @@ If ``indeterminate`` is ``true``, the given ``column`` is marked indeterminate. .. rst-class:: classref-method -void **set_language** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` language **)** +|void| **set_language**\ (\ column\: :ref:`int<class_int>`, language\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_language>` Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -1444,7 +1516,7 @@ Sets language code of item's text used for line-breaking and text shaping algori .. rst-class:: classref-method -void **set_metadata** **(** :ref:`int<class_int>` column, :ref:`Variant<class_Variant>` meta **)** +|void| **set_metadata**\ (\ column\: :ref:`int<class_int>`, meta\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_TreeItem_method_set_metadata>` Sets the metadata value for the given column, which can be retrieved later using :ref:`get_metadata<class_TreeItem_method_get_metadata>`. This can be used, for example, to store a reference to the original data. @@ -1456,7 +1528,7 @@ Sets the metadata value for the given column, which can be retrieved later using .. rst-class:: classref-method -void **set_range** **(** :ref:`int<class_int>` column, :ref:`float<class_float>` value **)** +|void| **set_range**\ (\ column\: :ref:`int<class_int>`, value\: :ref:`float<class_float>`\ ) :ref:`🔗<class_TreeItem_method_set_range>` Sets the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` column. @@ -1468,7 +1540,7 @@ Sets the value of a :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANG .. rst-class:: classref-method -void **set_range_config** **(** :ref:`int<class_int>` column, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`float<class_float>` step, :ref:`bool<class_bool>` expr=false **)** +|void| **set_range_config**\ (\ column\: :ref:`int<class_int>`, min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`, step\: :ref:`float<class_float>`, expr\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_TreeItem_method_set_range_config>` Sets the range of accepted values for a column. The column must be in the :ref:`CELL_MODE_RANGE<class_TreeItem_constant_CELL_MODE_RANGE>` mode. @@ -1482,7 +1554,7 @@ If ``expr`` is ``true``, the edit mode slider will use an exponential scale as w .. rst-class:: classref-method -void **set_selectable** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` selectable **)** +|void| **set_selectable**\ (\ column\: :ref:`int<class_int>`, selectable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_TreeItem_method_set_selectable>` If ``selectable`` is ``true``, the given ``column`` is selectable. @@ -1494,11 +1566,9 @@ If ``selectable`` is ``true``, the given ``column`` is selectable. .. rst-class:: classref-method -void **set_structured_text_bidi_override** **(** :ref:`int<class_int>` column, :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>` parser **)** +|void| **set_structured_text_bidi_override**\ (\ column\: :ref:`int<class_int>`, parser\: :ref:`StructuredTextParser<enum_TextServer_StructuredTextParser>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override>` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Set BiDi algorithm override for the structured text. Has effect for cells that display text. .. rst-class:: classref-item-separator @@ -1508,11 +1578,9 @@ void **set_structured_text_bidi_override** **(** :ref:`int<class_int>` column, : .. rst-class:: classref-method -void **set_structured_text_bidi_override_options** **(** :ref:`int<class_int>` column, :ref:`Array<class_Array>` args **)** - -.. container:: contribute +|void| **set_structured_text_bidi_override_options**\ (\ column\: :ref:`int<class_int>`, args\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_TreeItem_method_set_structured_text_bidi_override_options>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Set additional options for BiDi override. Has effect for cells that display text. .. rst-class:: classref-item-separator @@ -1522,7 +1590,7 @@ void **set_structured_text_bidi_override_options** **(** :ref:`int<class_int>` c .. rst-class:: classref-method -void **set_suffix** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` text **)** +|void| **set_suffix**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_suffix>` Sets a string to be shown after a column's value (for example, a unit abbreviation). @@ -1534,7 +1602,7 @@ Sets a string to be shown after a column's value (for example, a unit abbreviati .. rst-class:: classref-method -void **set_text** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` text **)** +|void| **set_text**\ (\ column\: :ref:`int<class_int>`, text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_text>` Sets the given column's text value. @@ -1546,7 +1614,7 @@ Sets the given column's text value. .. rst-class:: classref-method -void **set_text_alignment** **(** :ref:`int<class_int>` column, :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` text_alignment **)** +|void| **set_text_alignment**\ (\ column\: :ref:`int<class_int>`, text_alignment\: :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>`\ ) :ref:`🔗<class_TreeItem_method_set_text_alignment>` Sets the given column's text alignment. See :ref:`HorizontalAlignment<enum_@GlobalScope_HorizontalAlignment>` for possible values. @@ -1558,7 +1626,7 @@ Sets the given column's text alignment. See :ref:`HorizontalAlignment<enum_@Glob .. rst-class:: classref-method -void **set_text_direction** **(** :ref:`int<class_int>` column, :ref:`TextDirection<enum_Control_TextDirection>` direction **)** +|void| **set_text_direction**\ (\ column\: :ref:`int<class_int>`, direction\: :ref:`TextDirection<enum_Control_TextDirection>`\ ) :ref:`🔗<class_TreeItem_method_set_text_direction>` Sets item's text base writing direction. @@ -1566,11 +1634,23 @@ Sets item's text base writing direction. ---- +.. _class_TreeItem_method_set_text_overrun_behavior: + +.. rst-class:: classref-method + +|void| **set_text_overrun_behavior**\ (\ column\: :ref:`int<class_int>`, overrun_behavior\: :ref:`OverrunBehavior<enum_TextServer_OverrunBehavior>`\ ) :ref:`🔗<class_TreeItem_method_set_text_overrun_behavior>` + +Sets the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``. + +.. rst-class:: classref-item-separator + +---- + .. _class_TreeItem_method_set_tooltip_text: .. rst-class:: classref-method -void **set_tooltip_text** **(** :ref:`int<class_int>` column, :ref:`String<class_String>` tooltip **)** +|void| **set_tooltip_text**\ (\ column\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_TreeItem_method_set_tooltip_text>` Sets the given column's tooltip text. @@ -1582,11 +1662,9 @@ Sets the given column's tooltip text. .. rst-class:: classref-method -void **uncollapse_tree** **(** **)** - -.. container:: contribute +|void| **uncollapse_tree**\ (\ ) :ref:`🔗<class_TreeItem_method_uncollapse_tree>` - There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Uncollapses all **TreeItem**\ s necessary to reveal this **TreeItem**, i.e. all ancestor **TreeItem**\ s. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -1595,3 +1673,4 @@ void **uncollapse_tree** **(** **)** .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_trianglemesh.rst b/classes/class_trianglemesh.rst index 0c8228f9a1a..3b6844f6399 100644 --- a/classes/class_trianglemesh.rst +++ b/classes/class_trianglemesh.rst @@ -28,3 +28,4 @@ Mesh type used internally for collision calculations. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tubetrailmesh.rst b/classes/class_tubetrailmesh.rst index 4adc96da0ca..f54fdaba20e 100644 --- a/classes/class_tubetrailmesh.rst +++ b/classes/class_tubetrailmesh.rst @@ -71,12 +71,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **cap_bottom** = ``true`` +:ref:`bool<class_bool>` **cap_bottom** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_bottom>` .. rst-class:: classref-property-setget -- void **set_cap_bottom** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_cap_bottom** **(** **)** +- |void| **set_cap_bottom**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_cap_bottom**\ (\ ) If ``true``, generates a cap at the bottom of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. @@ -88,12 +88,12 @@ If ``true``, generates a cap at the bottom of the tube. This can be set to ``fal .. rst-class:: classref-property -:ref:`bool<class_bool>` **cap_top** = ``true`` +:ref:`bool<class_bool>` **cap_top** = ``true`` :ref:`🔗<class_TubeTrailMesh_property_cap_top>` .. rst-class:: classref-property-setget -- void **set_cap_top** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_cap_top** **(** **)** +- |void| **set_cap_top**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_cap_top**\ (\ ) If ``true``, generates a cap at the top of the tube. This can be set to ``false`` to speed up generation and rendering when the cap is never seen by the camera. @@ -105,12 +105,12 @@ If ``true``, generates a cap at the top of the tube. This can be set to ``false` .. rst-class:: classref-property -:ref:`Curve<class_Curve>` **curve** +:ref:`Curve<class_Curve>` **curve** :ref:`🔗<class_TubeTrailMesh_property_curve>` .. rst-class:: classref-property-setget -- void **set_curve** **(** :ref:`Curve<class_Curve>` value **)** -- :ref:`Curve<class_Curve>` **get_curve** **(** **)** +- |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ ) +- :ref:`Curve<class_Curve>` **get_curve**\ (\ ) Determines the radius of the tube along its length. The radius of a particular section ring is obtained by multiplying the baseline :ref:`radius<class_TubeTrailMesh_property_radius>` by the value of this curve at the given distance. For values smaller than ``0``, the faces will be inverted. @@ -122,12 +122,12 @@ Determines the radius of the tube along its length. The radius of a particular s .. rst-class:: classref-property -:ref:`int<class_int>` **radial_steps** = ``8`` +:ref:`int<class_int>` **radial_steps** = ``8`` :ref:`🔗<class_TubeTrailMesh_property_radial_steps>` .. rst-class:: classref-property-setget -- void **set_radial_steps** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_radial_steps** **(** **)** +- |void| **set_radial_steps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_radial_steps**\ (\ ) The number of sides on the tube. For example, a value of ``5`` means the tube will be pentagonal. Higher values result in a more detailed tube at the cost of performance. @@ -139,12 +139,12 @@ The number of sides on the tube. For example, a value of ``5`` means the tube wi .. rst-class:: classref-property -:ref:`float<class_float>` **radius** = ``0.5`` +:ref:`float<class_float>` **radius** = ``0.5`` :ref:`🔗<class_TubeTrailMesh_property_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The baseline radius of the tube. The radius of a particular section ring is obtained by multiplying this radius by the value of the :ref:`curve<class_TubeTrailMesh_property_curve>` at the given distance. @@ -156,12 +156,12 @@ The baseline radius of the tube. The radius of a particular section ring is obta .. rst-class:: classref-property -:ref:`float<class_float>` **section_length** = ``0.2`` +:ref:`float<class_float>` **section_length** = ``0.2`` :ref:`🔗<class_TubeTrailMesh_property_section_length>` .. rst-class:: classref-property-setget -- void **set_section_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_section_length** **(** **)** +- |void| **set_section_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_section_length**\ (\ ) The length of a section of the tube. @@ -173,12 +173,12 @@ The length of a section of the tube. .. rst-class:: classref-property -:ref:`int<class_int>` **section_rings** = ``3`` +:ref:`int<class_int>` **section_rings** = ``3`` :ref:`🔗<class_TubeTrailMesh_property_section_rings>` .. rst-class:: classref-property-setget -- void **set_section_rings** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_section_rings** **(** **)** +- |void| **set_section_rings**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_section_rings**\ (\ ) The number of rings in a section. The :ref:`curve<class_TubeTrailMesh_property_curve>` is sampled on each ring to determine its radius. Higher values result in a more detailed tube at the cost of performance. @@ -190,12 +190,12 @@ The number of rings in a section. The :ref:`curve<class_TubeTrailMesh_property_c .. rst-class:: classref-property -:ref:`int<class_int>` **sections** = ``5`` +:ref:`int<class_int>` **sections** = ``5`` :ref:`🔗<class_TubeTrailMesh_property_sections>` .. rst-class:: classref-property-setget -- void **set_sections** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_sections** **(** **)** +- |void| **set_sections**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_sections**\ (\ ) The total number of sections on the tube. @@ -206,3 +206,4 @@ The total number of sections on the tube. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tween.rst b/classes/class_tween.rst index 8ea12ca4506..615b14683d0 100644 --- a/classes/class_tween.rst +++ b/classes/class_tween.rst @@ -21,7 +21,7 @@ Description Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name *tween* comes from *in-betweening*, an animation technique where you specify *keyframes* and the computer interpolates the frames that appear between them. Animating something with a **Tween** is called tweening. -\ **Tween** is more suited than :ref:`AnimationPlayer<class_AnimationPlayer>` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a **Tween**; it would be difficult to do the same thing with an :ref:`AnimationPlayer<class_AnimationPlayer>` node. Tweens are also more light-weight than :ref:`AnimationPlayer<class_AnimationPlayer>`, so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped :ref:`CallbackTweener<class_CallbackTweener>` with a delay. +\ **Tween** is more suited than :ref:`AnimationPlayer<class_AnimationPlayer>` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a **Tween**; it would be difficult to do the same thing with an :ref:`AnimationPlayer<class_AnimationPlayer>` node. Tweens are also more light-weight than :ref:`AnimationPlayer<class_AnimationPlayer>`, so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a "fire-and-forget" manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped :ref:`CallbackTweener<class_CallbackTweener>` with a delay. A **Tween** can be created by using either :ref:`SceneTree.create_tween<class_SceneTree_method_create_tween>` or :ref:`Node.create_tween<class_Node_method_create_tween>`. **Tween**\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. @@ -143,7 +143,7 @@ Some :ref:`Tweener<class_Tweener>`\ s use transitions and eases. The first accep \ **Note:** Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. -\ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process<class_Node_method__process>` method would be called before the timer (or :ref:`Node._physics_process<class_Node_method__physics_process>` depending on the value passed to :ref:`set_process_mode<class_Tween_method_set_process_mode>`). +\ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process<class_Node_private_method__process>` method would be called before the tween (or :ref:`Node._physics_process<class_Node_private_method__physics_process>` depending on the value passed to :ref:`set_process_mode<class_Tween_method_set_process_mode>`). .. rst-class:: classref-reftable-group @@ -153,55 +153,55 @@ Methods .. table:: :widths: auto - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`bind_node<class_Tween_method_bind_node>` **(** :ref:`Node<class_Node>` node **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`chain<class_Tween_method_chain>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`custom_step<class_Tween_method_custom_step>` **(** :ref:`float<class_float>` delta **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_loops_left<class_Tween_method_get_loops_left>` **(** **)** |const| | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_total_elapsed_time<class_Tween_method_get_total_elapsed_time>` **(** **)** |const| | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`interpolate_value<class_Tween_method_interpolate_value>` **(** :ref:`Variant<class_Variant>` initial_value, :ref:`Variant<class_Variant>` delta_value, :ref:`float<class_float>` elapsed_time, :ref:`float<class_float>` duration, :ref:`TransitionType<enum_Tween_TransitionType>` trans_type, :ref:`EaseType<enum_Tween_EaseType>` ease_type **)** |static| | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_running<class_Tween_method_is_running>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid<class_Tween_method_is_valid>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`kill<class_Tween_method_kill>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`parallel<class_Tween_method_parallel>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pause<class_Tween_method_pause>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play<class_Tween_method_play>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_ease<class_Tween_method_set_ease>` **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_loops<class_Tween_method_set_loops>` **(** :ref:`int<class_int>` loops=0 **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_parallel<class_Tween_method_set_parallel>` **(** :ref:`bool<class_bool>` parallel=true **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_pause_mode<class_Tween_method_set_pause_mode>` **(** :ref:`TweenPauseMode<enum_Tween_TweenPauseMode>` mode **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_process_mode<class_Tween_method_set_process_mode>` **(** :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>` mode **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_speed_scale<class_Tween_method_set_speed_scale>` **(** :ref:`float<class_float>` speed **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tween<class_Tween>` | :ref:`set_trans<class_Tween_method_set_trans>` **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_Tween_method_stop>` **(** **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CallbackTweener<class_CallbackTweener>` | :ref:`tween_callback<class_Tween_method_tween_callback>` **(** :ref:`Callable<class_Callable>` callback **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`IntervalTweener<class_IntervalTweener>` | :ref:`tween_interval<class_Tween_method_tween_interval>` **(** :ref:`float<class_float>` time **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MethodTweener<class_MethodTweener>` | :ref:`tween_method<class_Tween_method_tween_method>` **(** :ref:`Callable<class_Callable>` method, :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`float<class_float>` duration **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`tween_property<class_Tween_method_tween_property>` **(** :ref:`Object<class_Object>` object, :ref:`NodePath<class_NodePath>` property, :ref:`Variant<class_Variant>` final_val, :ref:`float<class_float>` duration **)** | - +-----------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`bind_node<class_Tween_method_bind_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`chain<class_Tween_method_chain>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`custom_step<class_Tween_method_custom_step>`\ (\ delta\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_loops_left<class_Tween_method_get_loops_left>`\ (\ ) |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_total_elapsed_time<class_Tween_method_get_total_elapsed_time>`\ (\ ) |const| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`interpolate_value<class_Tween_method_interpolate_value>`\ (\ initial_value\: :ref:`Variant<class_Variant>`, delta_value\: :ref:`Variant<class_Variant>`, elapsed_time\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>`, trans_type\: :ref:`TransitionType<enum_Tween_TransitionType>`, ease_type\: :ref:`EaseType<enum_Tween_EaseType>`\ ) |static| | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_running<class_Tween_method_is_running>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid<class_Tween_method_is_valid>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`kill<class_Tween_method_kill>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`parallel<class_Tween_method_parallel>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`pause<class_Tween_method_pause>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play<class_Tween_method_play>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_ease<class_Tween_method_set_ease>`\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_loops<class_Tween_method_set_loops>`\ (\ loops\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_parallel<class_Tween_method_set_parallel>`\ (\ parallel\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_pause_mode<class_Tween_method_set_pause_mode>`\ (\ mode\: :ref:`TweenPauseMode<enum_Tween_TweenPauseMode>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_process_mode<class_Tween_method_set_process_mode>`\ (\ mode\: :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_speed_scale<class_Tween_method_set_speed_scale>`\ (\ speed\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tween<class_Tween>` | :ref:`set_trans<class_Tween_method_set_trans>`\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_Tween_method_stop>`\ (\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CallbackTweener<class_CallbackTweener>` | :ref:`tween_callback<class_Tween_method_tween_callback>`\ (\ callback\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`IntervalTweener<class_IntervalTweener>` | :ref:`tween_interval<class_Tween_method_tween_interval>`\ (\ time\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MethodTweener<class_MethodTweener>` | :ref:`tween_method<class_Tween_method_tween_method>`\ (\ method\: :ref:`Callable<class_Callable>`, from\: :ref:`Variant<class_Variant>`, to\: :ref:`Variant<class_Variant>`, duration\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PropertyTweener<class_PropertyTweener>` | :ref:`tween_property<class_Tween_method_tween_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`NodePath<class_NodePath>`, final_val\: :ref:`Variant<class_Variant>`, duration\: :ref:`float<class_float>`\ ) | + +-----------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -216,7 +216,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_Tween_signal_finished>` Emitted when the **Tween** has finished all tweening. Never emitted when the **Tween** is set to infinite looping (see :ref:`set_loops<class_Tween_method_set_loops>`). @@ -228,7 +228,7 @@ Emitted when the **Tween** has finished all tweening. Never emitted when the **T .. rst-class:: classref-signal -**loop_finished** **(** :ref:`int<class_int>` loop_count **)** +**loop_finished**\ (\ loop_count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tween_signal_loop_finished>` Emitted when a full loop is complete (see :ref:`set_loops<class_Tween_method_set_loops>`), providing the loop index. This signal is not emitted after the final loop, use :ref:`finished<class_Tween_signal_finished>` instead for this case. @@ -240,7 +240,7 @@ Emitted when a full loop is complete (see :ref:`set_loops<class_Tween_method_set .. rst-class:: classref-signal -**step_finished** **(** :ref:`int<class_int>` idx **)** +**step_finished**\ (\ idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Tween_signal_step_finished>` Emitted when one step of the **Tween** is complete, providing the step index. One step is either a single :ref:`Tweener<class_Tweener>` or a group of :ref:`Tweener<class_Tweener>`\ s running in parallel. @@ -257,7 +257,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TweenProcessMode**: +enum **TweenProcessMode**: :ref:`🔗<enum_Tween_TweenProcessMode>` .. _class_Tween_constant_TWEEN_PROCESS_PHYSICS: @@ -265,7 +265,7 @@ enum **TweenProcessMode**: :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>` **TWEEN_PROCESS_PHYSICS** = ``0`` -The **Tween** updates after each physics frame (see :ref:`Node._physics_process<class_Node_method__physics_process>`). +The **Tween** updates after each physics frame (see :ref:`Node._physics_process<class_Node_private_method__physics_process>`). .. _class_Tween_constant_TWEEN_PROCESS_IDLE: @@ -273,7 +273,7 @@ The **Tween** updates after each physics frame (see :ref:`Node._physics_process< :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>` **TWEEN_PROCESS_IDLE** = ``1`` -The **Tween** updates after each process frame (see :ref:`Node._process<class_Node_method__process>`). +The **Tween** updates after each process frame (see :ref:`Node._process<class_Node_private_method__process>`). .. rst-class:: classref-item-separator @@ -283,7 +283,7 @@ The **Tween** updates after each process frame (see :ref:`Node._process<class_No .. rst-class:: classref-enumeration -enum **TweenPauseMode**: +enum **TweenPauseMode**: :ref:`🔗<enum_Tween_TweenPauseMode>` .. _class_Tween_constant_TWEEN_PAUSE_BOUND: @@ -317,7 +317,7 @@ The **Tween** will process regardless of whether :ref:`SceneTree<class_SceneTree .. rst-class:: classref-enumeration -enum **TransitionType**: +enum **TransitionType**: :ref:`🔗<enum_Tween_TransitionType>` .. _class_Tween_constant_TRANS_LINEAR: @@ -423,7 +423,7 @@ The animation is interpolated like a spring towards the end. .. rst-class:: classref-enumeration -enum **EaseType**: +enum **EaseType**: :ref:`🔗<enum_Tween_EaseType>` .. _class_Tween_constant_EASE_IN: @@ -470,7 +470,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **bind_node** **(** :ref:`Node<class_Node>` node **)** +:ref:`Tween<class_Tween>` **bind_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_Tween_method_bind_node>` Binds this **Tween** with the given ``node``. **Tween**\ s are processed directly by the :ref:`SceneTree<class_SceneTree>`, so they run independently of the animated nodes. When you bind a :ref:`Node<class_Node>` with the **Tween**, the **Tween** will halt the animation when the object is not inside tree and the **Tween** will be automatically killed when the bound object is freed. Also :ref:`TWEEN_PAUSE_BOUND<class_Tween_constant_TWEEN_PAUSE_BOUND>` will make the pausing behavior dependent on the bound node. @@ -484,7 +484,7 @@ For a shorter way to create and bind a **Tween**, you can use :ref:`Node.create_ .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **chain** **(** **)** +:ref:`Tween<class_Tween>` **chain**\ (\ ) :ref:`🔗<class_Tween_method_chain>` Used to chain two :ref:`Tweener<class_Tweener>`\ s after :ref:`set_parallel<class_Tween_method_set_parallel>` is called with ``true``. @@ -515,7 +515,7 @@ Used to chain two :ref:`Tweener<class_Tweener>`\ s after :ref:`set_parallel<clas .. rst-class:: classref-method -:ref:`bool<class_bool>` **custom_step** **(** :ref:`float<class_float>` delta **)** +:ref:`bool<class_bool>` **custom_step**\ (\ delta\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Tween_method_custom_step>` Processes the **Tween** by the given ``delta`` value, in seconds. This is mostly useful for manual control when the **Tween** is paused. It can also be used to end the **Tween** animation immediately, by setting ``delta`` longer than the whole duration of the **Tween** animation. @@ -529,7 +529,7 @@ Returns ``true`` if the **Tween** still has :ref:`Tweener<class_Tweener>`\ s tha .. rst-class:: classref-method -:ref:`int<class_int>` **get_loops_left** **(** **)** |const| +:ref:`int<class_int>` **get_loops_left**\ (\ ) |const| :ref:`🔗<class_Tween_method_get_loops_left>` Returns the number of remaining loops for this **Tween** (see :ref:`set_loops<class_Tween_method_set_loops>`). A return value of ``-1`` indicates an infinitely looping **Tween**, and a return value of ``0`` indicates that the **Tween** has already finished. @@ -541,7 +541,7 @@ Returns the number of remaining loops for this **Tween** (see :ref:`set_loops<cl .. rst-class:: classref-method -:ref:`float<class_float>` **get_total_elapsed_time** **(** **)** |const| +:ref:`float<class_float>` **get_total_elapsed_time**\ (\ ) |const| :ref:`🔗<class_Tween_method_get_total_elapsed_time>` Returns the total time in seconds the **Tween** has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by :ref:`set_speed_scale<class_Tween_method_set_speed_scale>`, and :ref:`stop<class_Tween_method_stop>` will reset it to ``0``. @@ -555,7 +555,7 @@ Returns the total time in seconds the **Tween** has been animating (i.e. the tim .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **interpolate_value** **(** :ref:`Variant<class_Variant>` initial_value, :ref:`Variant<class_Variant>` delta_value, :ref:`float<class_float>` elapsed_time, :ref:`float<class_float>` duration, :ref:`TransitionType<enum_Tween_TransitionType>` trans_type, :ref:`EaseType<enum_Tween_EaseType>` ease_type **)** |static| +:ref:`Variant<class_Variant>` **interpolate_value**\ (\ initial_value\: :ref:`Variant<class_Variant>`, delta_value\: :ref:`Variant<class_Variant>`, elapsed_time\: :ref:`float<class_float>`, duration\: :ref:`float<class_float>`, trans_type\: :ref:`TransitionType<enum_Tween_TransitionType>`, ease_type\: :ref:`EaseType<enum_Tween_EaseType>`\ ) |static| :ref:`🔗<class_Tween_method_interpolate_value>` This method can be used for manual interpolation of a value, when you don't want **Tween** to do animating for you. It's similar to :ref:`@GlobalScope.lerp<class_@GlobalScope_method_lerp>`, but with support for custom transition and easing. @@ -577,7 +577,7 @@ This method can be used for manual interpolation of a value, when you don't want .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_running** **(** **)** +:ref:`bool<class_bool>` **is_running**\ (\ ) :ref:`🔗<class_Tween_method_is_running>` Returns whether the **Tween** is currently running, i.e. it wasn't paused and it's not finished. @@ -589,7 +589,7 @@ Returns whether the **Tween** is currently running, i.e. it wasn't paused and it .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid** **(** **)** +:ref:`bool<class_bool>` **is_valid**\ (\ ) :ref:`🔗<class_Tween_method_is_valid>` Returns whether the **Tween** is valid. A valid **Tween** is a **Tween** contained by the scene tree (i.e. the array from :ref:`SceneTree.get_processed_tweens<class_SceneTree_method_get_processed_tweens>` will contain this **Tween**). A **Tween** might become invalid when it has finished tweening, is killed, or when created with ``Tween.new()``. Invalid **Tween**\ s can't have :ref:`Tweener<class_Tweener>`\ s appended. @@ -601,7 +601,7 @@ Returns whether the **Tween** is valid. A valid **Tween** is a **Tween** contain .. rst-class:: classref-method -void **kill** **(** **)** +|void| **kill**\ (\ ) :ref:`🔗<class_Tween_method_kill>` Aborts all tweening operations and invalidates the **Tween**. @@ -613,7 +613,7 @@ Aborts all tweening operations and invalidates the **Tween**. .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **parallel** **(** **)** +:ref:`Tween<class_Tween>` **parallel**\ (\ ) :ref:`🔗<class_Tween_method_parallel>` Makes the next :ref:`Tweener<class_Tweener>` run parallelly to the previous one. @@ -650,10 +650,12 @@ You can make the **Tween** parallel by default by using :ref:`set_parallel<class .. rst-class:: classref-method -void **pause** **(** **)** +|void| **pause**\ (\ ) :ref:`🔗<class_Tween_method_pause>` Pauses the tweening. The animation can be resumed by using :ref:`play<class_Tween_method_play>`. +\ **Note:** If a Tween is paused and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens<class_SceneTree_method_get_processed_tweens>`. + .. rst-class:: classref-item-separator ---- @@ -662,7 +664,7 @@ Pauses the tweening. The animation can be resumed by using :ref:`play<class_Twee .. rst-class:: classref-method -void **play** **(** **)** +|void| **play**\ (\ ) :ref:`🔗<class_Tween_method_play>` Resumes a paused or stopped **Tween**. @@ -674,7 +676,7 @@ Resumes a paused or stopped **Tween**. .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_ease** **(** :ref:`EaseType<enum_Tween_EaseType>` ease **)** +:ref:`Tween<class_Tween>` **set_ease**\ (\ ease\: :ref:`EaseType<enum_Tween_EaseType>`\ ) :ref:`🔗<class_Tween_method_set_ease>` Sets the default ease type for :ref:`PropertyTweener<class_PropertyTweener>`\ s and :ref:`MethodTweener<class_MethodTweener>`\ s animated by this **Tween**. @@ -688,7 +690,7 @@ If not specified, the default value is :ref:`EASE_IN_OUT<class_Tween_constant_EA .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_loops** **(** :ref:`int<class_int>` loops=0 **)** +:ref:`Tween<class_Tween>` **set_loops**\ (\ loops\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_Tween_method_set_loops>` Sets the number of times the tweening sequence will be repeated, i.e. ``set_loops(2)`` will run the animation twice. @@ -704,10 +706,18 @@ Calling this method without arguments will make the **Tween** run infinitely, un .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_parallel** **(** :ref:`bool<class_bool>` parallel=true **)** +:ref:`Tween<class_Tween>` **set_parallel**\ (\ parallel\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_Tween_method_set_parallel>` If ``parallel`` is ``true``, the :ref:`Tweener<class_Tweener>`\ s appended after this method will by default run simultaneously, as opposed to sequentially. +\ **Note:** Just like with :ref:`parallel<class_Tween_method_parallel>`, the tweener added right before this method will also be part of the parallel step. + +:: + + tween.tween_property(self, "position", Vector2(300, 0), 0.5) + tween.set_parallel() + tween.tween_property(self, "modulate", Color.GREEN, 0.5) # Runs together with the position tweener. + .. rst-class:: classref-item-separator ---- @@ -716,7 +726,7 @@ If ``parallel`` is ``true``, the :ref:`Tweener<class_Tweener>`\ s appended after .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_pause_mode** **(** :ref:`TweenPauseMode<enum_Tween_TweenPauseMode>` mode **)** +:ref:`Tween<class_Tween>` **set_pause_mode**\ (\ mode\: :ref:`TweenPauseMode<enum_Tween_TweenPauseMode>`\ ) :ref:`🔗<class_Tween_method_set_pause_mode>` Determines the behavior of the **Tween** when the :ref:`SceneTree<class_SceneTree>` is paused. Check :ref:`TweenPauseMode<enum_Tween_TweenPauseMode>` for options. @@ -730,9 +740,9 @@ Default value is :ref:`TWEEN_PAUSE_BOUND<class_Tween_constant_TWEEN_PAUSE_BOUND> .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_process_mode** **(** :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>` mode **)** +:ref:`Tween<class_Tween>` **set_process_mode**\ (\ mode\: :ref:`TweenProcessMode<enum_Tween_TweenProcessMode>`\ ) :ref:`🔗<class_Tween_method_set_process_mode>` -Determines whether the **Tween** should run after process frames (see :ref:`Node._process<class_Node_method__process>`) or physics frames (see :ref:`Node._physics_process<class_Node_method__physics_process>`). +Determines whether the **Tween** should run after process frames (see :ref:`Node._process<class_Node_private_method__process>`) or physics frames (see :ref:`Node._physics_process<class_Node_private_method__physics_process>`). Default value is :ref:`TWEEN_PROCESS_IDLE<class_Tween_constant_TWEEN_PROCESS_IDLE>`. @@ -744,7 +754,7 @@ Default value is :ref:`TWEEN_PROCESS_IDLE<class_Tween_constant_TWEEN_PROCESS_IDL .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_speed_scale** **(** :ref:`float<class_float>` speed **)** +:ref:`Tween<class_Tween>` **set_speed_scale**\ (\ speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Tween_method_set_speed_scale>` Scales the speed of tweening. This affects all :ref:`Tweener<class_Tweener>`\ s and their delays. @@ -756,7 +766,7 @@ Scales the speed of tweening. This affects all :ref:`Tweener<class_Tweener>`\ s .. rst-class:: classref-method -:ref:`Tween<class_Tween>` **set_trans** **(** :ref:`TransitionType<enum_Tween_TransitionType>` trans **)** +:ref:`Tween<class_Tween>` **set_trans**\ (\ trans\: :ref:`TransitionType<enum_Tween_TransitionType>`\ ) :ref:`🔗<class_Tween_method_set_trans>` Sets the default transition type for :ref:`PropertyTweener<class_PropertyTweener>`\ s and :ref:`MethodTweener<class_MethodTweener>`\ s animated by this **Tween**. @@ -770,10 +780,12 @@ If not specified, the default value is :ref:`TRANS_LINEAR<class_Tween_constant_T .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_Tween_method_stop>` Stops the tweening and resets the **Tween** to its initial state. This will not remove any appended :ref:`Tweener<class_Tweener>`\ s. +\ **Note:** If a Tween is stopped and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens<class_SceneTree_method_get_processed_tweens>`. + .. rst-class:: classref-item-separator ---- @@ -782,7 +794,7 @@ Stops the tweening and resets the **Tween** to its initial state. This will not .. rst-class:: classref-method -:ref:`CallbackTweener<class_CallbackTweener>` **tween_callback** **(** :ref:`Callable<class_Callable>` callback **)** +:ref:`CallbackTweener<class_CallbackTweener>` **tween_callback**\ (\ callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_Tween_method_tween_callback>` Creates and appends a :ref:`CallbackTweener<class_CallbackTweener>`. This method can be used to call an arbitrary method in any object. Use :ref:`Callable.bind<class_Callable_method_bind>` to bind additional arguments for the call. @@ -831,7 +843,7 @@ Creates and appends a :ref:`CallbackTweener<class_CallbackTweener>`. This method .. rst-class:: classref-method -:ref:`IntervalTweener<class_IntervalTweener>` **tween_interval** **(** :ref:`float<class_float>` time **)** +:ref:`IntervalTweener<class_IntervalTweener>` **tween_interval**\ (\ time\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Tween_method_tween_interval>` Creates and appends an :ref:`IntervalTweener<class_IntervalTweener>`. This method can be used to create delays in the tween animation, as an alternative to using the delay in other :ref:`Tweener<class_Tweener>`\ s, or when there's no animation (in which case the **Tween** acts as a timer). ``time`` is the length of the interval, in seconds. @@ -889,7 +901,7 @@ Creates and appends an :ref:`IntervalTweener<class_IntervalTweener>`. This metho .. rst-class:: classref-method -:ref:`MethodTweener<class_MethodTweener>` **tween_method** **(** :ref:`Callable<class_Callable>` method, :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`float<class_float>` duration **)** +:ref:`MethodTweener<class_MethodTweener>` **tween_method**\ (\ method\: :ref:`Callable<class_Callable>`, from\: :ref:`Variant<class_Variant>`, to\: :ref:`Variant<class_Variant>`, duration\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Tween_method_tween_method>` Creates and appends a :ref:`MethodTweener<class_MethodTweener>`. This method is similar to a combination of :ref:`tween_callback<class_Tween_method_tween_callback>` and :ref:`tween_property<class_Tween_method_tween_property>`. It calls a method over time with a tweened value provided as an argument. The value is tweened between ``from`` and ``to`` over the time specified by ``duration``, in seconds. Use :ref:`Callable.bind<class_Callable_method_bind>` to bind additional arguments for the call. You can use :ref:`MethodTweener.set_ease<class_MethodTweener_method_set_ease>` and :ref:`MethodTweener.set_trans<class_MethodTweener_method_set_trans>` to tweak the easing and transition of the value or :ref:`MethodTweener.set_delay<class_MethodTweener_method_set_delay>` to delay the tweening. @@ -906,7 +918,7 @@ Creates and appends a :ref:`MethodTweener<class_MethodTweener>`. This method is .. code-tab:: csharp Tween tween = CreateTween(); - tween.TweenMethod(Callable.From(() => LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument. + tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // Use lambdas to bind additional arguments for the call. @@ -949,7 +961,7 @@ Creates and appends a :ref:`MethodTweener<class_MethodTweener>`. This method is .. rst-class:: classref-method -:ref:`PropertyTweener<class_PropertyTweener>` **tween_property** **(** :ref:`Object<class_Object>` object, :ref:`NodePath<class_NodePath>` property, :ref:`Variant<class_Variant>` final_val, :ref:`float<class_float>` duration **)** +:ref:`PropertyTweener<class_PropertyTweener>` **tween_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`NodePath<class_NodePath>`, final_val\: :ref:`Variant<class_Variant>`, duration\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Tween_method_tween_property>` Creates and appends a :ref:`PropertyTweener<class_PropertyTweener>`. This method tweens a ``property`` of an ``object`` between an initial value and ``final_val`` in a span of time equal to ``duration``, in seconds. The initial value by default is the property's value at the time the tweening of the :ref:`PropertyTweener<class_PropertyTweener>` starts. @@ -1002,3 +1014,4 @@ will move the sprite to position (100, 200) and then to (200, 300). If you use : .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_tweener.rst b/classes/class_tweener.rst index 63b7d8cde69..355996804c2 100644 --- a/classes/class_tweener.rst +++ b/classes/class_tweener.rst @@ -36,7 +36,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_Tweener_signal_finished>` Emitted when the **Tweener** has just finished its job. @@ -47,3 +47,4 @@ Emitted when the **Tweener** has just finished its job. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_udpserver.rst b/classes/class_udpserver.rst index 898ddd4cfbe..bf506f3dd9f 100644 --- a/classes/class_udpserver.rst +++ b/classes/class_udpserver.rst @@ -21,7 +21,7 @@ Description A simple server that opens a UDP socket and returns connected :ref:`PacketPeerUDP<class_PacketPeerUDP>` upon receiving new packets. See also :ref:`PacketPeerUDP.connect_to_host<class_PacketPeerUDP_method_connect_to_host>`. -After starting the server (:ref:`listen<class_UDPServer_method_listen>`), you will need to :ref:`poll<class_UDPServer_method_poll>` it at regular intervals (e.g. inside :ref:`Node._process<class_Node_method__process>`) for it to process new packets, delivering them to the appropriate :ref:`PacketPeerUDP<class_PacketPeerUDP>`, and taking new connections. +After starting the server (:ref:`listen<class_UDPServer_method_listen>`), you will need to :ref:`poll<class_UDPServer_method_poll>` it at regular intervals (e.g. inside :ref:`Node._process<class_Node_private_method__process>`) for it to process new packets, delivering them to the appropriate :ref:`PacketPeerUDP<class_PacketPeerUDP>`, and taking new connections. Below a small example of how it can be used: @@ -169,21 +169,21 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_local_port<class_UDPServer_method_get_local_port>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_connection_available<class_UDPServer_method_is_connection_available>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_listening<class_UDPServer_method_is_listening>` **(** **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`listen<class_UDPServer_method_listen>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_UDPServer_method_poll>` **(** **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_UDPServer_method_stop>` **(** **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PacketPeerUDP<class_PacketPeerUDP>` | :ref:`take_connection<class_UDPServer_method_take_connection>` **(** **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_local_port<class_UDPServer_method_get_local_port>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_connection_available<class_UDPServer_method_is_connection_available>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_listening<class_UDPServer_method_is_listening>`\ (\ ) |const| | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`listen<class_UDPServer_method_listen>`\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*"\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_UDPServer_method_poll>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_UDPServer_method_stop>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PacketPeerUDP<class_PacketPeerUDP>` | :ref:`take_connection<class_UDPServer_method_take_connection>`\ (\ ) | + +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -198,12 +198,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **max_pending_connections** = ``16`` +:ref:`int<class_int>` **max_pending_connections** = ``16`` :ref:`🔗<class_UDPServer_property_max_pending_connections>` .. rst-class:: classref-property-setget -- void **set_max_pending_connections** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_pending_connections** **(** **)** +- |void| **set_max_pending_connections**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_pending_connections**\ (\ ) Define the maximum number of pending connections, during :ref:`poll<class_UDPServer_method_poll>`, any new pending connection exceeding that value will be automatically dropped. Setting this value to ``0`` effectively prevents any new pending connection to be accepted (e.g. when all your players have connected). @@ -220,7 +220,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **get_local_port** **(** **)** |const| +:ref:`int<class_int>` **get_local_port**\ (\ ) |const| :ref:`🔗<class_UDPServer_method_get_local_port>` Returns the local port this server is listening to. @@ -232,7 +232,7 @@ Returns the local port this server is listening to. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_connection_available** **(** **)** |const| +:ref:`bool<class_bool>` **is_connection_available**\ (\ ) |const| :ref:`🔗<class_UDPServer_method_is_connection_available>` Returns ``true`` if a packet with a new address/port combination was received on the socket. @@ -244,7 +244,7 @@ Returns ``true`` if a packet with a new address/port combination was received on .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_listening** **(** **)** |const| +:ref:`bool<class_bool>` **is_listening**\ (\ ) |const| :ref:`🔗<class_UDPServer_method_is_listening>` Returns ``true`` if the socket is open and listening on a port. @@ -256,7 +256,7 @@ Returns ``true`` if the socket is open and listening on a port. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **listen** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)** +:ref:`Error<enum_@GlobalScope_Error>` **listen**\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*"\ ) :ref:`🔗<class_UDPServer_method_listen>` Starts the server by opening a UDP socket listening on the given ``port``. You can optionally specify a ``bind_address`` to only listen for packets sent to that address. See also :ref:`PacketPeerUDP.bind<class_PacketPeerUDP_method_bind>`. @@ -268,9 +268,9 @@ Starts the server by opening a UDP socket listening on the given ``port``. You c .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_UDPServer_method_poll>` -Call this method at regular intervals (e.g. inside :ref:`Node._process<class_Node_method__process>`) to process new packets. And packet from known address/port pair will be delivered to the appropriate :ref:`PacketPeerUDP<class_PacketPeerUDP>`, any packet received from an unknown address/port pair will be added as a pending connection (see :ref:`is_connection_available<class_UDPServer_method_is_connection_available>`, :ref:`take_connection<class_UDPServer_method_take_connection>`). The maximum number of pending connection is defined via :ref:`max_pending_connections<class_UDPServer_property_max_pending_connections>`. +Call this method at regular intervals (e.g. inside :ref:`Node._process<class_Node_private_method__process>`) to process new packets. And packet from known address/port pair will be delivered to the appropriate :ref:`PacketPeerUDP<class_PacketPeerUDP>`, any packet received from an unknown address/port pair will be added as a pending connection (see :ref:`is_connection_available<class_UDPServer_method_is_connection_available>`, :ref:`take_connection<class_UDPServer_method_take_connection>`). The maximum number of pending connection is defined via :ref:`max_pending_connections<class_UDPServer_property_max_pending_connections>`. .. rst-class:: classref-item-separator @@ -280,7 +280,7 @@ Call this method at regular intervals (e.g. inside :ref:`Node._process<class_Nod .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_UDPServer_method_stop>` Stops the server, closing the UDP socket if open. Will close all connected :ref:`PacketPeerUDP<class_PacketPeerUDP>` accepted via :ref:`take_connection<class_UDPServer_method_take_connection>` (remote peers will not be notified). @@ -292,7 +292,7 @@ Stops the server, closing the UDP socket if open. Will close all connected :ref: .. rst-class:: classref-method -:ref:`PacketPeerUDP<class_PacketPeerUDP>` **take_connection** **(** **)** +:ref:`PacketPeerUDP<class_PacketPeerUDP>` **take_connection**\ (\ ) :ref:`🔗<class_UDPServer_method_take_connection>` Returns the first pending connection (connected to the appropriate address/port). Will return ``null`` if no new connection is available. See also :ref:`is_connection_available<class_UDPServer_method_is_connection_available>`, :ref:`PacketPeerUDP.connect_to_host<class_PacketPeerUDP_method_connect_to_host>`. @@ -303,3 +303,4 @@ Returns the first pending connection (connected to the appropriate address/port) .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_undoredo.rst b/classes/class_undoredo.rst index 7ee3c1e1bc2..83b5df292aa 100644 --- a/classes/class_undoredo.rst +++ b/classes/class_undoredo.rst @@ -120,6 +120,18 @@ If you are registering multiple properties/method which depend on one another, b +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-----------------------------------------------------+-------+ + | :ref:`int<class_int>` | :ref:`max_steps<class_UndoRedo_property_max_steps>` | ``0`` | + +-----------------------+-----------------------------------------------------+-------+ + .. rst-class:: classref-reftable-group Methods @@ -128,49 +140,49 @@ Methods .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_method<class_UndoRedo_method_add_do_method>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_property<class_UndoRedo_method_add_do_property>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_do_reference<class_UndoRedo_method_add_do_reference>` **(** :ref:`Object<class_Object>` object **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_method<class_UndoRedo_method_add_undo_method>` **(** :ref:`Callable<class_Callable>` callable **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_property<class_UndoRedo_method_add_undo_property>` **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_undo_reference<class_UndoRedo_method_add_undo_reference>` **(** :ref:`Object<class_Object>` object **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_history<class_UndoRedo_method_clear_history>` **(** :ref:`bool<class_bool>` increase_version=true **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`commit_action<class_UndoRedo_method_commit_action>` **(** :ref:`bool<class_bool>` execute=true **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_action<class_UndoRedo_method_create_action>` **(** :ref:`String<class_String>` name, :ref:`MergeMode<enum_UndoRedo_MergeMode>` merge_mode=0, :ref:`bool<class_bool>` backward_undo_ops=false **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_force_keep_in_merge_ends<class_UndoRedo_method_end_force_keep_in_merge_ends>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_action_name<class_UndoRedo_method_get_action_name>` **(** :ref:`int<class_int>` id **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_current_action<class_UndoRedo_method_get_current_action>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_current_action_name<class_UndoRedo_method_get_current_action_name>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_history_count<class_UndoRedo_method_get_history_count>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_version<class_UndoRedo_method_get_version>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_redo<class_UndoRedo_method_has_redo>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_undo<class_UndoRedo_method_has_undo>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_committing_action<class_UndoRedo_method_is_committing_action>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`redo<class_UndoRedo_method_redo>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`start_force_keep_in_merge_ends<class_UndoRedo_method_start_force_keep_in_merge_ends>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`undo<class_UndoRedo_method_undo>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_method<class_UndoRedo_method_add_do_method>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_property<class_UndoRedo_method_add_do_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_do_reference<class_UndoRedo_method_add_do_reference>`\ (\ object\: :ref:`Object<class_Object>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_method<class_UndoRedo_method_add_undo_method>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_property<class_UndoRedo_method_add_undo_property>`\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_undo_reference<class_UndoRedo_method_add_undo_reference>`\ (\ object\: :ref:`Object<class_Object>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_history<class_UndoRedo_method_clear_history>`\ (\ increase_version\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`commit_action<class_UndoRedo_method_commit_action>`\ (\ execute\: :ref:`bool<class_bool>` = true\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_action<class_UndoRedo_method_create_action>`\ (\ name\: :ref:`String<class_String>`, merge_mode\: :ref:`MergeMode<enum_UndoRedo_MergeMode>` = 0, backward_undo_ops\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_force_keep_in_merge_ends<class_UndoRedo_method_end_force_keep_in_merge_ends>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_action_name<class_UndoRedo_method_get_action_name>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_current_action<class_UndoRedo_method_get_current_action>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_current_action_name<class_UndoRedo_method_get_current_action_name>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_history_count<class_UndoRedo_method_get_history_count>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_version<class_UndoRedo_method_get_version>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_redo<class_UndoRedo_method_has_redo>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_undo<class_UndoRedo_method_has_undo>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_committing_action<class_UndoRedo_method_is_committing_action>`\ (\ ) |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`redo<class_UndoRedo_method_redo>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_force_keep_in_merge_ends<class_UndoRedo_method_start_force_keep_in_merge_ends>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`undo<class_UndoRedo_method_undo>`\ (\ ) | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -185,7 +197,7 @@ Signals .. rst-class:: classref-signal -**version_changed** **(** **)** +**version_changed**\ (\ ) :ref:`🔗<class_UndoRedo_signal_version_changed>` Called when :ref:`undo<class_UndoRedo_method_undo>` or :ref:`redo<class_UndoRedo_method_redo>` was called. @@ -202,7 +214,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **MergeMode**: +enum **MergeMode**: :ref:`🔗<enum_UndoRedo_MergeMode>` .. _class_UndoRedo_constant_MERGE_DISABLE: @@ -218,7 +230,7 @@ Makes "do"/"undo" operations stay in separate actions. :ref:`MergeMode<enum_UndoRedo_MergeMode>` **MERGE_ENDS** = ``1`` -Makes so that the action's "undo" operations are from the first action created and the "do" operations are from the last subsequent action with the same name. +Merges this action with the previous one if they have the same name. Keeps only the first action's "undo" operations and the last action's "do" operations. Useful for sequential changes to a single value. .. _class_UndoRedo_constant_MERGE_ALL: @@ -226,7 +238,29 @@ Makes so that the action's "undo" operations are from the first action created a :ref:`MergeMode<enum_UndoRedo_MergeMode>` **MERGE_ALL** = ``2`` -Makes subsequent actions with the same name be merged into one. +Merges this action with the previous one if they have the same name. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_UndoRedo_property_max_steps: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **max_steps** = ``0`` :ref:`🔗<class_UndoRedo_property_max_steps>` + +.. rst-class:: classref-property-setget + +- |void| **set_max_steps**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_steps**\ (\ ) + +The maximum number of steps that can be stored in the undo/redo history. If the number of stored steps exceeds this limit, older steps are removed from history and can no longer be reached by calling :ref:`undo<class_UndoRedo_method_undo>`. A value of ``0`` or lower means no limit. .. rst-class:: classref-section-separator @@ -241,7 +275,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_do_method** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **add_do_method**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_UndoRedo_method_add_do_method>` Register a :ref:`Callable<class_Callable>` that will be called when the action is committed. @@ -253,7 +287,7 @@ Register a :ref:`Callable<class_Callable>` that will be called when the action i .. rst-class:: classref-method -void **add_do_property** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **add_do_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_UndoRedo_method_add_do_property>` Register a ``property`` that would change its value to ``value`` when the action is committed. @@ -265,9 +299,11 @@ Register a ``property`` that would change its value to ``value`` when the action .. rst-class:: classref-method -void **add_do_reference** **(** :ref:`Object<class_Object>` object **)** +|void| **add_do_reference**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_UndoRedo_method_add_do_reference>` -Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. +Register a reference to an object that will be erased if the "do" history is deleted. This is useful for objects added by the "do" action and removed by the "undo" action. + +When the "do" history is deleted, if the object is a :ref:`RefCounted<class_RefCounted>`, it will be unreferenced. Otherwise, it will be freed. Do not use for resources. :: @@ -286,7 +322,7 @@ Register a reference for "do" that will be erased if the "do" history is lost. T .. rst-class:: classref-method -void **add_undo_method** **(** :ref:`Callable<class_Callable>` callable **)** +|void| **add_undo_method**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_UndoRedo_method_add_undo_method>` Register a :ref:`Callable<class_Callable>` that will be called when the action is undone. @@ -298,7 +334,7 @@ Register a :ref:`Callable<class_Callable>` that will be called when the action i .. rst-class:: classref-method -void **add_undo_property** **(** :ref:`Object<class_Object>` object, :ref:`StringName<class_StringName>` property, :ref:`Variant<class_Variant>` value **)** +|void| **add_undo_property**\ (\ object\: :ref:`Object<class_Object>`, property\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_UndoRedo_method_add_undo_property>` Register a ``property`` that would change its value to ``value`` when the action is undone. @@ -310,9 +346,11 @@ Register a ``property`` that would change its value to ``value`` when the action .. rst-class:: classref-method -void **add_undo_reference** **(** :ref:`Object<class_Object>` object **)** +|void| **add_undo_reference**\ (\ object\: :ref:`Object<class_Object>`\ ) :ref:`🔗<class_UndoRedo_method_add_undo_reference>` + +Register a reference to an object that will be erased if the "undo" history is deleted. This is useful for objects added by the "undo" action and removed by the "do" action. -Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). +When the "undo" history is deleted, if the object is a :ref:`RefCounted<class_RefCounted>`, it will be unreferenced. Otherwise, it will be freed. Do not use for resources. :: @@ -331,7 +369,7 @@ Register a reference for "undo" that will be erased if the "undo" history is los .. rst-class:: classref-method -void **clear_history** **(** :ref:`bool<class_bool>` increase_version=true **)** +|void| **clear_history**\ (\ increase_version\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_UndoRedo_method_clear_history>` Clear the undo/redo history and associated references. @@ -345,7 +383,7 @@ Passing ``false`` to ``increase_version`` will prevent the version number from i .. rst-class:: classref-method -void **commit_action** **(** :ref:`bool<class_bool>` execute=true **)** +|void| **commit_action**\ (\ execute\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_UndoRedo_method_commit_action>` Commit the action. If ``execute`` is ``true`` (which it is by default), all "do" methods/properties are called/set when this function is called. @@ -357,7 +395,7 @@ Commit the action. If ``execute`` is ``true`` (which it is by default), all "do" .. rst-class:: classref-method -void **create_action** **(** :ref:`String<class_String>` name, :ref:`MergeMode<enum_UndoRedo_MergeMode>` merge_mode=0, :ref:`bool<class_bool>` backward_undo_ops=false **)** +|void| **create_action**\ (\ name\: :ref:`String<class_String>`, merge_mode\: :ref:`MergeMode<enum_UndoRedo_MergeMode>` = 0, backward_undo_ops\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_UndoRedo_method_create_action>` Create a new action. After this is called, do all your calls to :ref:`add_do_method<class_UndoRedo_method_add_do_method>`, :ref:`add_undo_method<class_UndoRedo_method_add_undo_method>`, :ref:`add_do_property<class_UndoRedo_method_add_do_property>`, and :ref:`add_undo_property<class_UndoRedo_method_add_undo_property>`, then commit the action with :ref:`commit_action<class_UndoRedo_method_commit_action>`. @@ -373,7 +411,7 @@ The way undo operation are ordered in actions is dictated by ``backward_undo_ops .. rst-class:: classref-method -void **end_force_keep_in_merge_ends** **(** **)** +|void| **end_force_keep_in_merge_ends**\ (\ ) :ref:`🔗<class_UndoRedo_method_end_force_keep_in_merge_ends>` Stops marking operations as to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS<class_UndoRedo_constant_MERGE_ENDS>` mode. See :ref:`start_force_keep_in_merge_ends<class_UndoRedo_method_start_force_keep_in_merge_ends>`. @@ -385,7 +423,7 @@ Stops marking operations as to be processed even if the action gets merged with .. rst-class:: classref-method -:ref:`String<class_String>` **get_action_name** **(** :ref:`int<class_int>` id **)** +:ref:`String<class_String>` **get_action_name**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_UndoRedo_method_get_action_name>` Gets the action name from its index. @@ -397,7 +435,7 @@ Gets the action name from its index. .. rst-class:: classref-method -:ref:`int<class_int>` **get_current_action** **(** **)** +:ref:`int<class_int>` **get_current_action**\ (\ ) :ref:`🔗<class_UndoRedo_method_get_current_action>` Gets the index of the current action. @@ -409,7 +447,7 @@ Gets the index of the current action. .. rst-class:: classref-method -:ref:`String<class_String>` **get_current_action_name** **(** **)** |const| +:ref:`String<class_String>` **get_current_action_name**\ (\ ) |const| :ref:`🔗<class_UndoRedo_method_get_current_action_name>` Gets the name of the current action, equivalent to ``get_action_name(get_current_action())``. @@ -421,7 +459,7 @@ Gets the name of the current action, equivalent to ``get_action_name(get_current .. rst-class:: classref-method -:ref:`int<class_int>` **get_history_count** **(** **)** +:ref:`int<class_int>` **get_history_count**\ (\ ) :ref:`🔗<class_UndoRedo_method_get_history_count>` Returns how many elements are in the history. @@ -433,7 +471,7 @@ Returns how many elements are in the history. .. rst-class:: classref-method -:ref:`int<class_int>` **get_version** **(** **)** |const| +:ref:`int<class_int>` **get_version**\ (\ ) |const| :ref:`🔗<class_UndoRedo_method_get_version>` Gets the version. Every time a new action is committed, the **UndoRedo**'s version number is increased automatically. @@ -447,7 +485,7 @@ This is useful mostly to check if something changed from a saved version. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_redo** **(** **)** |const| +:ref:`bool<class_bool>` **has_redo**\ (\ ) |const| :ref:`🔗<class_UndoRedo_method_has_redo>` Returns ``true`` if a "redo" action is available. @@ -459,7 +497,7 @@ Returns ``true`` if a "redo" action is available. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_undo** **(** **)** |const| +:ref:`bool<class_bool>` **has_undo**\ (\ ) |const| :ref:`🔗<class_UndoRedo_method_has_undo>` Returns ``true`` if an "undo" action is available. @@ -471,7 +509,7 @@ Returns ``true`` if an "undo" action is available. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_committing_action** **(** **)** |const| +:ref:`bool<class_bool>` **is_committing_action**\ (\ ) |const| :ref:`🔗<class_UndoRedo_method_is_committing_action>` Returns ``true`` if the **UndoRedo** is currently committing the action, i.e. running its "do" method or property change (see :ref:`commit_action<class_UndoRedo_method_commit_action>`). @@ -483,7 +521,7 @@ Returns ``true`` if the **UndoRedo** is currently committing the action, i.e. ru .. rst-class:: classref-method -:ref:`bool<class_bool>` **redo** **(** **)** +:ref:`bool<class_bool>` **redo**\ (\ ) :ref:`🔗<class_UndoRedo_method_redo>` Redo the last action. @@ -495,7 +533,7 @@ Redo the last action. .. rst-class:: classref-method -void **start_force_keep_in_merge_ends** **(** **)** +|void| **start_force_keep_in_merge_ends**\ (\ ) :ref:`🔗<class_UndoRedo_method_start_force_keep_in_merge_ends>` Marks the next "do" and "undo" operations to be processed even if the action gets merged with another in the :ref:`MERGE_ENDS<class_UndoRedo_constant_MERGE_ENDS>` mode. Return to normal operation using :ref:`end_force_keep_in_merge_ends<class_UndoRedo_method_end_force_keep_in_merge_ends>`. @@ -507,7 +545,7 @@ Marks the next "do" and "undo" operations to be processed even if the action get .. rst-class:: classref-method -:ref:`bool<class_bool>` **undo** **(** **)** +:ref:`bool<class_bool>` **undo**\ (\ ) :ref:`🔗<class_UndoRedo_method_undo>` Undo the last action. @@ -518,3 +556,4 @@ Undo the last action. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_uniformsetcacherd.rst b/classes/class_uniformsetcacherd.rst new file mode 100644 index 00000000000..5f3c198d611 --- /dev/null +++ b/classes/class_uniformsetcacherd.rst @@ -0,0 +1,60 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/UniformSetCacheRD.xml. + +.. _class_UniformSetCacheRD: + +UniformSetCacheRD +================= + +**Inherits:** :ref:`Object<class_Object>` + +Uniform set cache manager for Rendering Device based renderers. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Uniform set cache manager for Rendering Device based renderers. Provides a way to create a uniform set and reuse it in subsequent calls for as long as the uniform set exists. Uniform set will automatically be cleaned up when dependent objects are freed. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_cache<class_UniformSetCacheRD_method_get_cache>`\ (\ shader\: :ref:`RID<class_RID>`, set\: :ref:`int<class_int>`, uniforms\: :ref:`Array<class_Array>`\[:ref:`RDUniform<class_RDUniform>`\]\ ) |static| | + +-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_UniformSetCacheRD_method_get_cache: + +.. rst-class:: classref-method + +:ref:`RID<class_RID>` **get_cache**\ (\ shader\: :ref:`RID<class_RID>`, set\: :ref:`int<class_int>`, uniforms\: :ref:`Array<class_Array>`\[:ref:`RDUniform<class_RDUniform>`\]\ ) |static| :ref:`🔗<class_UniformSetCacheRD_method_get_cache>` + +Creates/returns a cached uniform set based on the provided uniforms for a given shader. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_upnp.rst b/classes/class_upnp.rst index edfc61c1e09..c178ce766c1 100644 --- a/classes/class_upnp.rst +++ b/classes/class_upnp.rst @@ -109,29 +109,29 @@ Methods .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_device<class_UPNP_method_add_device>` **(** :ref:`UPNPDevice<class_UPNPDevice>` device **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_port_mapping<class_UPNP_method_add_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_devices<class_UPNP_method_clear_devices>` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`delete_port_mapping<class_UPNP_method_delete_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`discover<class_UPNP_method_discover>` **(** :ref:`int<class_int>` timeout=2000, :ref:`int<class_int>` ttl=2, :ref:`String<class_String>` device_filter="InternetGatewayDevice" **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_device<class_UPNP_method_get_device>` **(** :ref:`int<class_int>` index **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_device_count<class_UPNP_method_get_device_count>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_gateway<class_UPNP_method_get_gateway>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`query_external_address<class_UPNP_method_query_external_address>` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_device<class_UPNP_method_remove_device>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_device<class_UPNP_method_set_device>` **(** :ref:`int<class_int>` index, :ref:`UPNPDevice<class_UPNPDevice>` device **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_device<class_UPNP_method_add_device>`\ (\ device\: :ref:`UPNPDevice<class_UPNPDevice>`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_port_mapping<class_UPNP_method_add_port_mapping>`\ (\ port\: :ref:`int<class_int>`, port_internal\: :ref:`int<class_int>` = 0, desc\: :ref:`String<class_String>` = "", proto\: :ref:`String<class_String>` = "UDP", duration\: :ref:`int<class_int>` = 0\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_devices<class_UPNP_method_clear_devices>`\ (\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`delete_port_mapping<class_UPNP_method_delete_port_mapping>`\ (\ port\: :ref:`int<class_int>`, proto\: :ref:`String<class_String>` = "UDP"\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`discover<class_UPNP_method_discover>`\ (\ timeout\: :ref:`int<class_int>` = 2000, ttl\: :ref:`int<class_int>` = 2, device_filter\: :ref:`String<class_String>` = "InternetGatewayDevice"\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_device<class_UPNP_method_get_device>`\ (\ index\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_device_count<class_UPNP_method_get_device_count>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`UPNPDevice<class_UPNPDevice>` | :ref:`get_gateway<class_UPNP_method_get_gateway>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`query_external_address<class_UPNP_method_query_external_address>`\ (\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_device<class_UPNP_method_remove_device>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_device<class_UPNP_method_set_device>`\ (\ index\: :ref:`int<class_int>`, device\: :ref:`UPNPDevice<class_UPNPDevice>`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -146,7 +146,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **UPNPResult**: +enum **UPNPResult**: :ref:`🔗<enum_UPNP_UPNPResult>` .. _class_UPNP_constant_UPNP_RESULT_SUCCESS: @@ -393,12 +393,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **discover_ipv6** = ``false`` +:ref:`bool<class_bool>` **discover_ipv6** = ``false`` :ref:`🔗<class_UPNP_property_discover_ipv6>` .. rst-class:: classref-property-setget -- void **set_discover_ipv6** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_discover_ipv6** **(** **)** +- |void| **set_discover_ipv6**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_discover_ipv6**\ (\ ) If ``true``, IPv6 is used for :ref:`UPNPDevice<class_UPNPDevice>` discovery. @@ -410,12 +410,12 @@ If ``true``, IPv6 is used for :ref:`UPNPDevice<class_UPNPDevice>` discovery. .. rst-class:: classref-property -:ref:`int<class_int>` **discover_local_port** = ``0`` +:ref:`int<class_int>` **discover_local_port** = ``0`` :ref:`🔗<class_UPNP_property_discover_local_port>` .. rst-class:: classref-property-setget -- void **set_discover_local_port** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_discover_local_port** **(** **)** +- |void| **set_discover_local_port**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_discover_local_port**\ (\ ) If ``0``, the local port to use for discovery is chosen automatically by the system. If ``1``, discovery will be done from the source port 1900 (same as destination port). Otherwise, the value will be used as the port. @@ -427,12 +427,12 @@ If ``0``, the local port to use for discovery is chosen automatically by the sys .. rst-class:: classref-property -:ref:`String<class_String>` **discover_multicast_if** = ``""`` +:ref:`String<class_String>` **discover_multicast_if** = ``""`` :ref:`🔗<class_UPNP_property_discover_multicast_if>` .. rst-class:: classref-property-setget -- void **set_discover_multicast_if** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_discover_multicast_if** **(** **)** +- |void| **set_discover_multicast_if**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_discover_multicast_if**\ (\ ) Multicast interface to use for discovery. Uses the default multicast interface if empty. @@ -449,7 +449,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_device** **(** :ref:`UPNPDevice<class_UPNPDevice>` device **)** +|void| **add_device**\ (\ device\: :ref:`UPNPDevice<class_UPNPDevice>`\ ) :ref:`🔗<class_UPNP_method_add_device>` Adds the given :ref:`UPNPDevice<class_UPNPDevice>` to the list of discovered devices. @@ -461,7 +461,7 @@ Adds the given :ref:`UPNPDevice<class_UPNPDevice>` to the list of discovered dev .. rst-class:: classref-method -:ref:`int<class_int>` **add_port_mapping** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const| +:ref:`int<class_int>` **add_port_mapping**\ (\ port\: :ref:`int<class_int>`, port_internal\: :ref:`int<class_int>` = 0, desc\: :ref:`String<class_String>` = "", proto\: :ref:`String<class_String>` = "UDP", duration\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_UPNP_method_add_port_mapping>` Adds a mapping to forward the external ``port`` (between 1 and 65535, although recommended to use port 1024 or above) on the default gateway (see :ref:`get_gateway<class_UPNP_method_get_gateway>`) to the ``port_internal`` on the local machine for the given protocol ``proto`` (either ``"TCP"`` or ``"UDP"``, with UDP being the default). If a port mapping for the given port and protocol combination already exists on that gateway device, this method tries to overwrite it. If that is not desired, you can retrieve the gateway manually with :ref:`get_gateway<class_UPNP_method_get_gateway>` and call :ref:`add_port_mapping<class_UPNP_method_add_port_mapping>` on it, if any. Note that forwarding a well-known port (below 1024) with UPnP may fail depending on the device. @@ -483,7 +483,7 @@ See :ref:`UPNPResult<enum_UPNP_UPNPResult>` for possible return values. .. rst-class:: classref-method -void **clear_devices** **(** **)** +|void| **clear_devices**\ (\ ) :ref:`🔗<class_UPNP_method_clear_devices>` Clears the list of discovered devices. @@ -495,7 +495,7 @@ Clears the list of discovered devices. .. rst-class:: classref-method -:ref:`int<class_int>` **delete_port_mapping** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const| +:ref:`int<class_int>` **delete_port_mapping**\ (\ port\: :ref:`int<class_int>`, proto\: :ref:`String<class_String>` = "UDP"\ ) |const| :ref:`🔗<class_UPNP_method_delete_port_mapping>` Deletes the port mapping for the given port and protocol combination on the default gateway (see :ref:`get_gateway<class_UPNP_method_get_gateway>`) if one exists. ``port`` must be a valid port between 1 and 65535, ``proto`` can be either ``"TCP"`` or ``"UDP"``. May be refused for mappings pointing to addresses other than this one, for well-known ports (below 1024), or for mappings not added via UPnP. See :ref:`UPNPResult<enum_UPNP_UPNPResult>` for possible return values. @@ -507,7 +507,7 @@ Deletes the port mapping for the given port and protocol combination on the defa .. rst-class:: classref-method -:ref:`int<class_int>` **discover** **(** :ref:`int<class_int>` timeout=2000, :ref:`int<class_int>` ttl=2, :ref:`String<class_String>` device_filter="InternetGatewayDevice" **)** +:ref:`int<class_int>` **discover**\ (\ timeout\: :ref:`int<class_int>` = 2000, ttl\: :ref:`int<class_int>` = 2, device_filter\: :ref:`String<class_String>` = "InternetGatewayDevice"\ ) :ref:`🔗<class_UPNP_method_discover>` Discovers local :ref:`UPNPDevice<class_UPNPDevice>`\ s. Clears the list of previously discovered devices. @@ -523,7 +523,7 @@ See :ref:`UPNPResult<enum_UPNP_UPNPResult>` for possible return values. .. rst-class:: classref-method -:ref:`UPNPDevice<class_UPNPDevice>` **get_device** **(** :ref:`int<class_int>` index **)** |const| +:ref:`UPNPDevice<class_UPNPDevice>` **get_device**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_UPNP_method_get_device>` Returns the :ref:`UPNPDevice<class_UPNPDevice>` at the given ``index``. @@ -535,7 +535,7 @@ Returns the :ref:`UPNPDevice<class_UPNPDevice>` at the given ``index``. .. rst-class:: classref-method -:ref:`int<class_int>` **get_device_count** **(** **)** |const| +:ref:`int<class_int>` **get_device_count**\ (\ ) |const| :ref:`🔗<class_UPNP_method_get_device_count>` Returns the number of discovered :ref:`UPNPDevice<class_UPNPDevice>`\ s. @@ -547,7 +547,7 @@ Returns the number of discovered :ref:`UPNPDevice<class_UPNPDevice>`\ s. .. rst-class:: classref-method -:ref:`UPNPDevice<class_UPNPDevice>` **get_gateway** **(** **)** |const| +:ref:`UPNPDevice<class_UPNPDevice>` **get_gateway**\ (\ ) |const| :ref:`🔗<class_UPNP_method_get_gateway>` Returns the default gateway. That is the first discovered :ref:`UPNPDevice<class_UPNPDevice>` that is also a valid IGD (InternetGatewayDevice). @@ -559,7 +559,7 @@ Returns the default gateway. That is the first discovered :ref:`UPNPDevice<class .. rst-class:: classref-method -:ref:`String<class_String>` **query_external_address** **(** **)** |const| +:ref:`String<class_String>` **query_external_address**\ (\ ) |const| :ref:`🔗<class_UPNP_method_query_external_address>` Returns the external :ref:`IP<class_IP>` address of the default gateway (see :ref:`get_gateway<class_UPNP_method_get_gateway>`) as string. Returns an empty string on error. @@ -571,7 +571,7 @@ Returns the external :ref:`IP<class_IP>` address of the default gateway (see :re .. rst-class:: classref-method -void **remove_device** **(** :ref:`int<class_int>` index **)** +|void| **remove_device**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_UPNP_method_remove_device>` Removes the device at ``index`` from the list of discovered devices. @@ -583,7 +583,7 @@ Removes the device at ``index`` from the list of discovered devices. .. rst-class:: classref-method -void **set_device** **(** :ref:`int<class_int>` index, :ref:`UPNPDevice<class_UPNPDevice>` device **)** +|void| **set_device**\ (\ index\: :ref:`int<class_int>`, device\: :ref:`UPNPDevice<class_UPNPDevice>`\ ) :ref:`🔗<class_UPNP_method_set_device>` Sets the device at ``index`` from the list of discovered devices to ``device``. @@ -594,3 +594,4 @@ Sets the device at ``index`` from the list of discovered devices to ``device``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_upnpdevice.rst b/classes/class_upnpdevice.rst index 245cb1f6c9f..d93766f1814 100644 --- a/classes/class_upnpdevice.rst +++ b/classes/class_upnpdevice.rst @@ -51,15 +51,15 @@ Methods .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_port_mapping<class_UPNPDevice_method_add_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`delete_port_mapping<class_UPNPDevice_method_delete_port_mapping>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_gateway<class_UPNPDevice_method_is_valid_gateway>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`query_external_address<class_UPNPDevice_method_query_external_address>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_port_mapping<class_UPNPDevice_method_add_port_mapping>`\ (\ port\: :ref:`int<class_int>`, port_internal\: :ref:`int<class_int>` = 0, desc\: :ref:`String<class_String>` = "", proto\: :ref:`String<class_String>` = "UDP", duration\: :ref:`int<class_int>` = 0\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`delete_port_mapping<class_UPNPDevice_method_delete_port_mapping>`\ (\ port\: :ref:`int<class_int>`, proto\: :ref:`String<class_String>` = "UDP"\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_gateway<class_UPNPDevice_method_is_valid_gateway>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`query_external_address<class_UPNPDevice_method_query_external_address>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,7 +74,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **IGDStatus**: +enum **IGDStatus**: :ref:`🔗<enum_UPNPDevice_IGDStatus>` .. _class_UPNPDevice_constant_IGD_STATUS_OK: @@ -106,6 +106,8 @@ Empty HTTP response. :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **IGD_STATUS_NO_URLS** = ``3`` +**Deprecated:** This value is no longer used. + Returned response contained no URLs. .. _class_UPNPDevice_constant_IGD_STATUS_NO_IGD: @@ -146,6 +148,8 @@ Invalid control. :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **IGD_STATUS_MALLOC_ERROR** = ``8`` +**Deprecated:** This value is no longer used. + Memory allocation error. .. _class_UPNPDevice_constant_IGD_STATUS_UNKNOWN_ERROR: @@ -169,12 +173,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **description_url** = ``""`` +:ref:`String<class_String>` **description_url** = ``""`` :ref:`🔗<class_UPNPDevice_property_description_url>` .. rst-class:: classref-property-setget -- void **set_description_url** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_description_url** **(** **)** +- |void| **set_description_url**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_description_url**\ (\ ) URL to the device description. @@ -186,12 +190,12 @@ URL to the device description. .. rst-class:: classref-property -:ref:`String<class_String>` **igd_control_url** = ``""`` +:ref:`String<class_String>` **igd_control_url** = ``""`` :ref:`🔗<class_UPNPDevice_property_igd_control_url>` .. rst-class:: classref-property-setget -- void **set_igd_control_url** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_igd_control_url** **(** **)** +- |void| **set_igd_control_url**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_igd_control_url**\ (\ ) IDG control URL. @@ -203,12 +207,12 @@ IDG control URL. .. rst-class:: classref-property -:ref:`String<class_String>` **igd_our_addr** = ``""`` +:ref:`String<class_String>` **igd_our_addr** = ``""`` :ref:`🔗<class_UPNPDevice_property_igd_our_addr>` .. rst-class:: classref-property-setget -- void **set_igd_our_addr** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_igd_our_addr** **(** **)** +- |void| **set_igd_our_addr**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_igd_our_addr**\ (\ ) Address of the local machine in the network connecting it to this **UPNPDevice**. @@ -220,12 +224,12 @@ Address of the local machine in the network connecting it to this **UPNPDevice** .. rst-class:: classref-property -:ref:`String<class_String>` **igd_service_type** = ``""`` +:ref:`String<class_String>` **igd_service_type** = ``""`` :ref:`🔗<class_UPNPDevice_property_igd_service_type>` .. rst-class:: classref-property-setget -- void **set_igd_service_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_igd_service_type** **(** **)** +- |void| **set_igd_service_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_igd_service_type**\ (\ ) IGD service type. @@ -237,12 +241,12 @@ IGD service type. .. rst-class:: classref-property -:ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **igd_status** = ``9`` +:ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **igd_status** = ``9`` :ref:`🔗<class_UPNPDevice_property_igd_status>` .. rst-class:: classref-property-setget -- void **set_igd_status** **(** :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` value **)** -- :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **get_igd_status** **(** **)** +- |void| **set_igd_status**\ (\ value\: :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>`\ ) +- :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>` **get_igd_status**\ (\ ) IGD status. See :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>`. @@ -254,12 +258,12 @@ IGD status. See :ref:`IGDStatus<enum_UPNPDevice_IGDStatus>`. .. rst-class:: classref-property -:ref:`String<class_String>` **service_type** = ``""`` +:ref:`String<class_String>` **service_type** = ``""`` :ref:`🔗<class_UPNPDevice_property_service_type>` .. rst-class:: classref-property-setget -- void **set_service_type** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_service_type** **(** **)** +- |void| **set_service_type**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_service_type**\ (\ ) Service type. @@ -276,7 +280,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **add_port_mapping** **(** :ref:`int<class_int>` port, :ref:`int<class_int>` port_internal=0, :ref:`String<class_String>` desc="", :ref:`String<class_String>` proto="UDP", :ref:`int<class_int>` duration=0 **)** |const| +:ref:`int<class_int>` **add_port_mapping**\ (\ port\: :ref:`int<class_int>`, port_internal\: :ref:`int<class_int>` = 0, desc\: :ref:`String<class_String>` = "", proto\: :ref:`String<class_String>` = "UDP", duration\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_UPNPDevice_method_add_port_mapping>` Adds a port mapping to forward the given external port on this **UPNPDevice** for the given protocol to the local machine. See :ref:`UPNP.add_port_mapping<class_UPNP_method_add_port_mapping>`. @@ -288,7 +292,7 @@ Adds a port mapping to forward the given external port on this **UPNPDevice** fo .. rst-class:: classref-method -:ref:`int<class_int>` **delete_port_mapping** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` proto="UDP" **)** |const| +:ref:`int<class_int>` **delete_port_mapping**\ (\ port\: :ref:`int<class_int>`, proto\: :ref:`String<class_String>` = "UDP"\ ) |const| :ref:`🔗<class_UPNPDevice_method_delete_port_mapping>` Deletes the port mapping identified by the given port and protocol combination on this device. See :ref:`UPNP.delete_port_mapping<class_UPNP_method_delete_port_mapping>`. @@ -300,7 +304,7 @@ Deletes the port mapping identified by the given port and protocol combination o .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_gateway** **(** **)** |const| +:ref:`bool<class_bool>` **is_valid_gateway**\ (\ ) |const| :ref:`🔗<class_UPNPDevice_method_is_valid_gateway>` Returns ``true`` if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding. @@ -312,7 +316,7 @@ Returns ``true`` if this is a valid IGD (InternetGatewayDevice) which potentiall .. rst-class:: classref-method -:ref:`String<class_String>` **query_external_address** **(** **)** |const| +:ref:`String<class_String>` **query_external_address**\ (\ ) |const| :ref:`🔗<class_UPNPDevice_method_query_external_address>` Returns the external IP address of this **UPNPDevice** or an empty string. @@ -323,3 +327,4 @@ Returns the external IP address of this **UPNPDevice** or an empty string. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_variant.rst b/classes/class_variant.rst index 4d90ce67aee..b58d325188d 100644 --- a/classes/class_variant.rst +++ b/classes/class_variant.rst @@ -28,7 +28,7 @@ In computer programming, a Variant class is a class that is designed to store a foo = "Now foo is a string!" foo = RefCounted.new() # foo is an Object var bar: int = 2 # bar is a statically typed integer. - # bar = "Uh oh! I can't make static variables become a different type!" + # bar = "Uh oh! I can't make statically typed variables become a different type!" .. code-tab:: csharp @@ -49,7 +49,7 @@ Godot tracks all scripting API variables within Variants. Without even realizing - GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types. -- C# is statically typed, but uses its own implementation of the ``Variant`` type in place of Godot's Variant class when it needs to represent a dynamic value. A ``Variant`` can be assigned any compatible type implicitly but converting requires an explicit cast. +- C# is statically typed, but uses its own implementation of the Variant type in place of Godot's **Variant** class when it needs to represent a dynamic value. C# Variant can be assigned any compatible type implicitly but converting requires an explicit cast. The global :ref:`@GlobalScope.typeof<class_@GlobalScope_method_typeof>` function returns the enumerated value of the Variant type stored in the current variable (see :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>`). @@ -62,14 +62,14 @@ The global :ref:`@GlobalScope.typeof<class_@GlobalScope_method_typeof>` function match typeof(foo): TYPE_NIL: print("foo is null") - TYPE_INTEGER: + TYPE_INT: print("foo is an integer") TYPE_OBJECT: # Note that Objects are their own special category. # To get the name of the underlying Object type, you need the `get_class()` method. print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string. - # Note also that there is not yet any way to get a script's `class_name` string easily. - # To fetch that value, you can use ProjectSettings.get_global_class_list(). + # Note that this does not get the script's `class_name` global identifier. + # If the `class_name` is needed, use `foo.get_script().get_global_name()` instead. .. code-tab:: csharp @@ -139,3 +139,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vboxcontainer.rst b/classes/class_vboxcontainer.rst index baf0830aad8..320831064d6 100644 --- a/classes/class_vboxcontainer.rst +++ b/classes/class_vboxcontainer.rst @@ -30,36 +30,7 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -- `3D Voxel Demo <https://godotengine.org/asset-library/asset/676>`__ - -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`separation<class_VBoxContainer_theme_constant_separation>` | ``4`` | - +-----------------------+------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VBoxContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``4`` - -The vertical space between the **VBoxContainer**'s elements. +- `3D Voxel Demo <https://godotengine.org/asset-library/asset/2755>`__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -68,3 +39,4 @@ The vertical space between the **VBoxContainer**'s elements. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector2.rst b/classes/class_vector2.rst index 9bb06305943..c2f41ef798a 100644 --- a/classes/class_vector2.rst +++ b/classes/class_vector2.rst @@ -10,7 +10,7 @@ Vector2 ======= -A 2D vector using floating point coordinates. +A 2D vector using floating-point coordinates. .. rst-class:: classref-introduction-group @@ -38,7 +38,7 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra <https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab>`__ -- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__ +- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__ - `All 2D Demos <https://github.com/godotengine/godot-demo-projects/tree/master/2d>`__ @@ -64,15 +64,15 @@ Constructors .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>` **(** **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>` **(** :ref:`Vector2<class_Vector2>` from **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>` **(** :ref:`Vector2i<class_Vector2i>` from **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>`\ (\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>`\ (\ from\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>`\ (\ from\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`Vector2<class_Vector2_constructor_Vector2>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -82,91 +82,103 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`abs<class_Vector2_method_abs>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`angle<class_Vector2_method_angle>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`angle_to<class_Vector2_method_angle_to>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`angle_to_point<class_Vector2_method_angle_to_point>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`aspect<class_Vector2_method_aspect>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`bezier_derivative<class_Vector2_method_bezier_derivative>` **(** :ref:`Vector2<class_Vector2>` control_1, :ref:`Vector2<class_Vector2>` control_2, :ref:`Vector2<class_Vector2>` end, :ref:`float<class_float>` t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`bezier_interpolate<class_Vector2_method_bezier_interpolate>` **(** :ref:`Vector2<class_Vector2>` control_1, :ref:`Vector2<class_Vector2>` control_2, :ref:`Vector2<class_Vector2>` end, :ref:`float<class_float>` t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`bounce<class_Vector2_method_bounce>` **(** :ref:`Vector2<class_Vector2>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`ceil<class_Vector2_method_ceil>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`clamp<class_Vector2_method_clamp>` **(** :ref:`Vector2<class_Vector2>` min, :ref:`Vector2<class_Vector2>` max **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`cross<class_Vector2_method_cross>` **(** :ref:`Vector2<class_Vector2>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`cubic_interpolate<class_Vector2_method_cubic_interpolate>` **(** :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` pre_a, :ref:`Vector2<class_Vector2>` post_b, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`cubic_interpolate_in_time<class_Vector2_method_cubic_interpolate_in_time>` **(** :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` pre_a, :ref:`Vector2<class_Vector2>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`direction_to<class_Vector2_method_direction_to>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector2_method_distance_squared_to>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to<class_Vector2_method_distance_to>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`dot<class_Vector2_method_dot>` **(** :ref:`Vector2<class_Vector2>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`floor<class_Vector2_method_floor>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`from_angle<class_Vector2_method_from_angle>` **(** :ref:`float<class_float>` angle **)** |static| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector2_method_is_equal_approx>` **(** :ref:`Vector2<class_Vector2>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector2_method_is_finite>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector2_method_is_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector2_method_is_zero_approx>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector2_method_length>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length_squared<class_Vector2_method_length_squared>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`lerp<class_Vector2_method_lerp>` **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`limit_length<class_Vector2_method_limit_length>` **(** :ref:`float<class_float>` length=1.0 **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector2_method_max_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector2_method_min_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`move_toward<class_Vector2_method_move_toward>` **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` delta **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`normalized<class_Vector2_method_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`orthogonal<class_Vector2_method_orthogonal>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`posmod<class_Vector2_method_posmod>` **(** :ref:`float<class_float>` mod **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`posmodv<class_Vector2_method_posmodv>` **(** :ref:`Vector2<class_Vector2>` modv **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`project<class_Vector2_method_project>` **(** :ref:`Vector2<class_Vector2>` b **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`reflect<class_Vector2_method_reflect>` **(** :ref:`Vector2<class_Vector2>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`rotated<class_Vector2_method_rotated>` **(** :ref:`float<class_float>` angle **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`round<class_Vector2_method_round>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`sign<class_Vector2_method_sign>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`slerp<class_Vector2_method_slerp>` **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`slide<class_Vector2_method_slide>` **(** :ref:`Vector2<class_Vector2>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`snapped<class_Vector2_method_snapped>` **(** :ref:`Vector2<class_Vector2>` step **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`abs<class_Vector2_method_abs>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`angle<class_Vector2_method_angle>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`angle_to<class_Vector2_method_angle_to>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`angle_to_point<class_Vector2_method_angle_to_point>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`aspect<class_Vector2_method_aspect>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`bezier_derivative<class_Vector2_method_bezier_derivative>`\ (\ control_1\: :ref:`Vector2<class_Vector2>`, control_2\: :ref:`Vector2<class_Vector2>`, end\: :ref:`Vector2<class_Vector2>`, t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`bezier_interpolate<class_Vector2_method_bezier_interpolate>`\ (\ control_1\: :ref:`Vector2<class_Vector2>`, control_2\: :ref:`Vector2<class_Vector2>`, end\: :ref:`Vector2<class_Vector2>`, t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`bounce<class_Vector2_method_bounce>`\ (\ n\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`ceil<class_Vector2_method_ceil>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`clamp<class_Vector2_method_clamp>`\ (\ min\: :ref:`Vector2<class_Vector2>`, max\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`clampf<class_Vector2_method_clampf>`\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`cross<class_Vector2_method_cross>`\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`cubic_interpolate<class_Vector2_method_cubic_interpolate>`\ (\ b\: :ref:`Vector2<class_Vector2>`, pre_a\: :ref:`Vector2<class_Vector2>`, post_b\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`cubic_interpolate_in_time<class_Vector2_method_cubic_interpolate_in_time>`\ (\ b\: :ref:`Vector2<class_Vector2>`, pre_a\: :ref:`Vector2<class_Vector2>`, post_b\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`direction_to<class_Vector2_method_direction_to>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector2_method_distance_squared_to>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector2_method_distance_to>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`dot<class_Vector2_method_dot>`\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`floor<class_Vector2_method_floor>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`from_angle<class_Vector2_method_from_angle>`\ (\ angle\: :ref:`float<class_float>`\ ) |static| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector2_method_is_equal_approx>`\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector2_method_is_finite>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector2_method_is_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector2_method_is_zero_approx>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector2_method_length>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length_squared<class_Vector2_method_length_squared>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`lerp<class_Vector2_method_lerp>`\ (\ to\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`limit_length<class_Vector2_method_limit_length>`\ (\ length\: :ref:`float<class_float>` = 1.0\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`max<class_Vector2_method_max>`\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector2_method_max_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`maxf<class_Vector2_method_maxf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`min<class_Vector2_method_min>`\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector2_method_min_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`minf<class_Vector2_method_minf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`move_toward<class_Vector2_method_move_toward>`\ (\ to\: :ref:`Vector2<class_Vector2>`, delta\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`normalized<class_Vector2_method_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`orthogonal<class_Vector2_method_orthogonal>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`posmod<class_Vector2_method_posmod>`\ (\ mod\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`posmodv<class_Vector2_method_posmodv>`\ (\ modv\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`project<class_Vector2_method_project>`\ (\ b\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`reflect<class_Vector2_method_reflect>`\ (\ line\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`rotated<class_Vector2_method_rotated>`\ (\ angle\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`round<class_Vector2_method_round>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`sign<class_Vector2_method_sign>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`slerp<class_Vector2_method_slerp>`\ (\ to\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`slide<class_Vector2_method_slide>`\ (\ n\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`snapped<class_Vector2_method_snapped>`\ (\ step\: :ref:`Vector2<class_Vector2>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`snappedf<class_Vector2_method_snappedf>`\ (\ step\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -176,43 +188,43 @@ Operators .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector2_operator_neq_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_Transform2D>` **(** :ref:`Transform2D<class_Transform2D>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator +<class_Vector2_operator_sum_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator -<class_Vector2_operator_dif_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector2_operator_lt_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector2_operator_lte_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector2_operator_eq_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector2_operator_gt_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector2_operator_gte_Vector2>` **(** :ref:`Vector2<class_Vector2>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_Vector2_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator unary+<class_Vector2_operator_unplus>` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator unary-<class_Vector2_operator_unminus>` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector2_operator_neq_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_Transform2D>`\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator +<class_Vector2_operator_sum_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator -<class_Vector2_operator_dif_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector2_operator_lt_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector2_operator_lte_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector2_operator_eq_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector2_operator_gt_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector2_operator_gte_Vector2>`\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_Vector2_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator unary+<class_Vector2_operator_unplus>`\ (\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator unary-<class_Vector2_operator_unminus>`\ (\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -227,7 +239,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector2_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2_method_min_axis_index>`. @@ -235,7 +247,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2_ .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector2_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2_method_min_axis_index>`. @@ -243,7 +255,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2_ .. rst-class:: classref-constant -**ZERO** = ``Vector2(0, 0)`` +**ZERO** = ``Vector2(0, 0)`` :ref:`🔗<class_Vector2_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -251,7 +263,7 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector2(1, 1)`` +**ONE** = ``Vector2(1, 1)`` :ref:`🔗<class_Vector2_constant_ONE>` One vector, a vector with all components set to ``1``. @@ -259,7 +271,7 @@ One vector, a vector with all components set to ``1``. .. rst-class:: classref-constant -**INF** = ``Vector2(inf, inf)`` +**INF** = ``Vector2(inf, inf)`` :ref:`🔗<class_Vector2_constant_INF>` Infinity vector, a vector with all components set to :ref:`@GDScript.INF<class_@GDScript_constant_INF>`. @@ -267,7 +279,7 @@ Infinity vector, a vector with all components set to :ref:`@GDScript.INF<class_@ .. rst-class:: classref-constant -**LEFT** = ``Vector2(-1, 0)`` +**LEFT** = ``Vector2(-1, 0)`` :ref:`🔗<class_Vector2_constant_LEFT>` Left unit vector. Represents the direction of left. @@ -275,7 +287,7 @@ Left unit vector. Represents the direction of left. .. rst-class:: classref-constant -**RIGHT** = ``Vector2(1, 0)`` +**RIGHT** = ``Vector2(1, 0)`` :ref:`🔗<class_Vector2_constant_RIGHT>` Right unit vector. Represents the direction of right. @@ -283,7 +295,7 @@ Right unit vector. Represents the direction of right. .. rst-class:: classref-constant -**UP** = ``Vector2(0, -1)`` +**UP** = ``Vector2(0, -1)`` :ref:`🔗<class_Vector2_constant_UP>` Up unit vector. Y is down in 2D, so this vector points -Y. @@ -291,7 +303,7 @@ Up unit vector. Y is down in 2D, so this vector points -Y. .. rst-class:: classref-constant -**DOWN** = ``Vector2(0, 1)`` +**DOWN** = ``Vector2(0, 1)`` :ref:`🔗<class_Vector2_constant_DOWN>` Down unit vector. Y is down in 2D, so this vector points +Y. @@ -308,7 +320,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **x** = ``0.0`` +:ref:`float<class_float>` **x** = ``0.0`` :ref:`🔗<class_Vector2_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -320,7 +332,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`float<class_float>` **y** = ``0.0`` +:ref:`float<class_float>` **y** = ``0.0`` :ref:`🔗<class_Vector2_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -337,7 +349,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector2<class_Vector2>` **Vector2** **(** **)** +:ref:`Vector2<class_Vector2>` **Vector2**\ (\ ) :ref:`🔗<class_Vector2_constructor_Vector2>` Constructs a default-initialized **Vector2** with all components set to ``0``. @@ -347,7 +359,7 @@ Constructs a default-initialized **Vector2** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector2<class_Vector2>` **Vector2** **(** :ref:`Vector2<class_Vector2>` from **)** +:ref:`Vector2<class_Vector2>` **Vector2**\ (\ from\: :ref:`Vector2<class_Vector2>`\ ) Constructs a **Vector2** as a copy of the given **Vector2**. @@ -357,7 +369,7 @@ Constructs a **Vector2** as a copy of the given **Vector2**. .. rst-class:: classref-constructor -:ref:`Vector2<class_Vector2>` **Vector2** **(** :ref:`Vector2i<class_Vector2i>` from **)** +:ref:`Vector2<class_Vector2>` **Vector2**\ (\ from\: :ref:`Vector2i<class_Vector2i>`\ ) Constructs a new **Vector2** from :ref:`Vector2i<class_Vector2i>`. @@ -367,7 +379,7 @@ Constructs a new **Vector2** from :ref:`Vector2i<class_Vector2i>`. .. rst-class:: classref-constructor -:ref:`Vector2<class_Vector2>` **Vector2** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** +:ref:`Vector2<class_Vector2>` **Vector2**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`\ ) Constructs a new **Vector2** from the given ``x`` and ``y``. @@ -384,7 +396,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **abs** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector2_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -396,7 +408,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`float<class_float>` **angle** **(** **)** |const| +:ref:`float<class_float>` **angle**\ (\ ) |const| :ref:`🔗<class_Vector2_method_angle>` Returns this vector's angle with respect to the positive X axis, or ``(1, 0)`` vector, in radians. @@ -414,7 +426,7 @@ Equivalent to the result of :ref:`@GlobalScope.atan2<class_@GlobalScope_method_a .. rst-class:: classref-method -:ref:`float<class_float>` **angle_to** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`float<class_float>` **angle_to**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_angle_to>` Returns the angle to the given vector, in radians. @@ -428,7 +440,7 @@ Returns the angle to the given vector, in radians. .. rst-class:: classref-method -:ref:`float<class_float>` **angle_to_point** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`float<class_float>` **angle_to_point**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_angle_to_point>` Returns the angle between the line connecting the two points and the X axis, in radians. @@ -444,7 +456,7 @@ Returns the angle between the line connecting the two points and the X axis, in .. rst-class:: classref-method -:ref:`float<class_float>` **aspect** **(** **)** |const| +:ref:`float<class_float>` **aspect**\ (\ ) |const| :ref:`🔗<class_Vector2_method_aspect>` Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2_property_x>` to :ref:`y<class_Vector2_property_y>`. @@ -456,7 +468,7 @@ Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2_prop .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **bezier_derivative** **(** :ref:`Vector2<class_Vector2>` control_1, :ref:`Vector2<class_Vector2>` control_2, :ref:`Vector2<class_Vector2>` end, :ref:`float<class_float>` t **)** |const| +:ref:`Vector2<class_Vector2>` **bezier_derivative**\ (\ control_1\: :ref:`Vector2<class_Vector2>`, control_2\: :ref:`Vector2<class_Vector2>`, end\: :ref:`Vector2<class_Vector2>`, t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_bezier_derivative>` Returns the derivative at the given ``t`` on the `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. @@ -468,7 +480,7 @@ Returns the derivative at the given ``t`` on the `Bézier curve <https://en.wiki .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **bezier_interpolate** **(** :ref:`Vector2<class_Vector2>` control_1, :ref:`Vector2<class_Vector2>` control_2, :ref:`Vector2<class_Vector2>` end, :ref:`float<class_float>` t **)** |const| +:ref:`Vector2<class_Vector2>` **bezier_interpolate**\ (\ control_1\: :ref:`Vector2<class_Vector2>`, control_2\: :ref:`Vector2<class_Vector2>`, end\: :ref:`Vector2<class_Vector2>`, t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_bezier_interpolate>` Returns the point at the given ``t`` on the `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. @@ -480,9 +492,11 @@ Returns the point at the given ``t`` on the `Bézier curve <https://en.wikipedia .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **bounce** **(** :ref:`Vector2<class_Vector2>` n **)** |const| +:ref:`Vector2<class_Vector2>` **bounce**\ (\ n\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_bounce>` -Returns a new vector "bounced off" from a plane defined by the given normal. +Returns the vector "bounced off" from a line defined by the given normal ``n`` perpendicular to the line. + +\ **Note:** :ref:`bounce<class_Vector2_method_bounce>` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -492,7 +506,7 @@ Returns a new vector "bounced off" from a plane defined by the given normal. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **ceil** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **ceil**\ (\ ) |const| :ref:`🔗<class_Vector2_method_ceil>` Returns a new vector with all components rounded up (towards positive infinity). @@ -504,7 +518,7 @@ Returns a new vector with all components rounded up (towards positive infinity). .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **clamp** **(** :ref:`Vector2<class_Vector2>` min, :ref:`Vector2<class_Vector2>` max **)** |const| +:ref:`Vector2<class_Vector2>` **clamp**\ (\ min\: :ref:`Vector2<class_Vector2>`, max\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -512,15 +526,27 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector2_method_clampf: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **clampf**\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_clampf>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2_method_cross: .. rst-class:: classref-method -:ref:`float<class_float>` **cross** **(** :ref:`Vector2<class_Vector2>` with **)** |const| +:ref:`float<class_float>` **cross**\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_cross>` Returns the 2D analog of the cross product for this vector and ``with``. -This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. +This is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area. If the two vectors are parallel this returns zero, making it useful for testing if two vectors are parallel. \ **Note:** Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog. @@ -532,7 +558,7 @@ This is the signed area of the parallelogram formed by the two vectors. If the s .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **cubic_interpolate** **(** :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` pre_a, :ref:`Vector2<class_Vector2>` post_b, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector2<class_Vector2>` **cubic_interpolate**\ (\ b\: :ref:`Vector2<class_Vector2>`, pre_a\: :ref:`Vector2<class_Vector2>`, post_b\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_cubic_interpolate>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -544,11 +570,11 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **cubic_interpolate_in_time** **(** :ref:`Vector2<class_Vector2>` b, :ref:`Vector2<class_Vector2>` pre_a, :ref:`Vector2<class_Vector2>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| +:ref:`Vector2<class_Vector2>` **cubic_interpolate_in_time**\ (\ b\: :ref:`Vector2<class_Vector2>`, pre_a\: :ref:`Vector2<class_Vector2>`, post_b\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_cubic_interpolate_in_time>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate<class_Vector2_method_cubic_interpolate>` by the time values. .. rst-class:: classref-item-separator @@ -558,7 +584,7 @@ It can perform smoother interpolation than ``cubic_interpolate()`` by the time v .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **direction_to** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`Vector2<class_Vector2>` **direction_to**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_direction_to>` Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. @@ -570,7 +596,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv .. rst-class:: classref-method -:ref:`float<class_float>` **distance_squared_to** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`float<class_float>` **distance_squared_to**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_distance_squared_to>` Returns the squared distance between this vector and ``to``. @@ -584,7 +610,7 @@ This method runs faster than :ref:`distance_to<class_Vector2_method_distance_to> .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_distance_to>` Returns the distance between this vector and ``to``. @@ -596,11 +622,11 @@ Returns the distance between this vector and ``to``. .. rst-class:: classref-method -:ref:`float<class_float>` **dot** **(** :ref:`Vector2<class_Vector2>` with **)** |const| +:ref:`float<class_float>` **dot**\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_dot>` Returns the dot product of this vector and ``with``. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. -The dot product will be ``0`` for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. +The dot product will be ``0`` for a right angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. When using unit (normalized) vectors, the result will always be between ``-1.0`` (180 degree angle) when the vectors are facing opposite directions, and ``1.0`` (0 degree angle) when the vectors are aligned. @@ -614,7 +640,7 @@ When using unit (normalized) vectors, the result will always be between ``-1.0`` .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **floor** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **floor**\ (\ ) |const| :ref:`🔗<class_Vector2_method_floor>` Returns a new vector with all components rounded down (towards negative infinity). @@ -626,7 +652,7 @@ Returns a new vector with all components rounded down (towards negative infinity .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **from_angle** **(** :ref:`float<class_float>` angle **)** |static| +:ref:`Vector2<class_Vector2>` **from_angle**\ (\ angle\: :ref:`float<class_float>`\ ) |static| :ref:`🔗<class_Vector2_method_from_angle>` Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is equivalent to doing ``Vector2(cos(angle), sin(angle))`` or ``Vector2.RIGHT.rotated(angle)``. @@ -644,7 +670,7 @@ Creates a unit **Vector2** rotated to the given ``angle`` in radians. This is eq .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Vector2<class_Vector2>` to **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ to\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_is_equal_approx>` Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. @@ -656,7 +682,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Vector2_method_is_finite>` Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -668,7 +694,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_normalized** **(** **)** |const| +:ref:`bool<class_bool>` **is_normalized**\ (\ ) |const| :ref:`🔗<class_Vector2_method_is_normalized>` Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. @@ -680,7 +706,7 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_zero_approx** **(** **)** |const| +:ref:`bool<class_bool>` **is_zero_approx**\ (\ ) |const| :ref:`🔗<class_Vector2_method_is_zero_approx>` Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx<class_@GlobalScope_method_is_zero_approx>` on each component. @@ -694,7 +720,7 @@ This method is faster than using :ref:`is_equal_approx<class_Vector2_method_is_e .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector2_method_length>` Returns the length (magnitude) of this vector. @@ -706,7 +732,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`float<class_float>` **length_squared** **(** **)** |const| +:ref:`float<class_float>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector2_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -720,7 +746,7 @@ This method runs faster than :ref:`length<class_Vector2_method_length>`, so pref .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **lerp** **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector2<class_Vector2>` **lerp**\ (\ to\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_lerp>` Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of ``0.0`` to ``1.0``, representing the amount of interpolation. @@ -732,7 +758,7 @@ Returns the result of the linear interpolation between this vector and ``to`` by .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **limit_length** **(** :ref:`float<class_float>` length=1.0 **)** |const| +:ref:`Vector2<class_Vector2>` **limit_length**\ (\ length\: :ref:`float<class_float>` = 1.0\ ) |const| :ref:`🔗<class_Vector2_method_limit_length>` Returns the vector with a maximum length by limiting its length to ``length``. @@ -740,11 +766,23 @@ Returns the vector with a maximum length by limiting its length to ``length``. ---- +.. _class_Vector2_method_max: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **max**\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2(maxf(x, with.x), maxf(y, with.y))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector2_constant_AXIS_X>`. @@ -752,11 +790,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector2_method_maxf: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **maxf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_maxf>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2(maxf(x, with), maxf(y, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_method_min: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **min**\ (\ with\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2(minf(x, with.x), minf(y, with.y))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Y<class_Vector2_constant_AXIS_Y>`. @@ -764,11 +826,23 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector2_method_minf: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **minf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_minf>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2(minf(x, with), minf(y, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2_method_move_toward: .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **move_toward** **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` delta **)** |const| +:ref:`Vector2<class_Vector2>` **move_toward**\ (\ to\: :ref:`Vector2<class_Vector2>`, delta\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_move_toward>` Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not go past the final value. @@ -780,9 +854,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **normalized** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **normalized**\ (\ ) |const| :ref:`🔗<class_Vector2_method_normalized>` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized<class_Vector2_method_is_normalized>`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized<class_Vector2_method_is_normalized>`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -794,7 +868,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **orthogonal** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **orthogonal**\ (\ ) |const| :ref:`🔗<class_Vector2_method_orthogonal>` Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length. @@ -806,7 +880,7 @@ Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **posmod** **(** :ref:`float<class_float>` mod **)** |const| +:ref:`Vector2<class_Vector2>` **posmod**\ (\ mod\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_posmod>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``mod``. @@ -818,7 +892,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **posmodv** **(** :ref:`Vector2<class_Vector2>` modv **)** |const| +:ref:`Vector2<class_Vector2>` **posmodv**\ (\ modv\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_posmodv>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``modv``'s components. @@ -830,9 +904,11 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **project** **(** :ref:`Vector2<class_Vector2>` b **)** |const| +:ref:`Vector2<class_Vector2>` **project**\ (\ b\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_project>` + +Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide<class_Vector2_method_slide>`. -Returns the result of projecting the vector onto the given vector ``b``. +\ **Note:** If the vector ``b`` is a zero vector, the components of the resulting new vector will be :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`. .. rst-class:: classref-item-separator @@ -842,9 +918,11 @@ Returns the result of projecting the vector onto the given vector ``b``. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **reflect** **(** :ref:`Vector2<class_Vector2>` n **)** |const| +:ref:`Vector2<class_Vector2>` **reflect**\ (\ line\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_reflect>` -Returns the result of reflecting the vector from a line defined by the given direction vector ``n``. +Returns the result of reflecting the vector from a line defined by the given direction vector ``line``. + +\ **Note:** :ref:`reflect<class_Vector2_method_reflect>` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` takes a normal direction which is a direction perpendicular to the line. In Godot, you specify the direction of the line directly. See also :ref:`bounce<class_Vector2_method_bounce>` which does what most engines call ``reflect()``. .. rst-class:: classref-item-separator @@ -854,7 +932,7 @@ Returns the result of reflecting the vector from a line defined by the given dir .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **rotated** **(** :ref:`float<class_float>` angle **)** |const| +:ref:`Vector2<class_Vector2>` **rotated**\ (\ angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_rotated>` Returns the result of rotating this vector by ``angle`` (in radians). See also :ref:`@GlobalScope.deg_to_rad<class_@GlobalScope_method_deg_to_rad>`. @@ -866,7 +944,7 @@ Returns the result of rotating this vector by ``angle`` (in radians). See also : .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **round** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **round**\ (\ ) |const| :ref:`🔗<class_Vector2_method_round>` Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. @@ -878,7 +956,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **sign** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector2_method_sign>` Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -890,7 +968,7 @@ Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0 .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **slerp** **(** :ref:`Vector2<class_Vector2>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector2<class_Vector2>` **slerp**\ (\ to\: :ref:`Vector2<class_Vector2>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_slerp>` Returns the result of spherical linear interpolation between this vector and ``to``, by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -904,9 +982,11 @@ This method also handles interpolating the lengths if the input vectors have dif .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **slide** **(** :ref:`Vector2<class_Vector2>` n **)** |const| +:ref:`Vector2<class_Vector2>` **slide**\ (\ n\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_slide>` + +Returns a new vector resulting from sliding this vector along a line with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project<class_Vector2_method_project>`. -Returns the result of sliding the vector along a plane defined by the given normal. +\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized<class_Vector2_method_normalized>`. .. rst-class:: classref-item-separator @@ -916,10 +996,22 @@ Returns the result of sliding the vector along a plane defined by the given norm .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **snapped** **(** :ref:`Vector2<class_Vector2>` step **)** |const| +:ref:`Vector2<class_Vector2>` **snapped**\ (\ step\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`🔗<class_Vector2_method_snapped>` Returns a new vector with each component snapped to the nearest multiple of the corresponding component in ``step``. This can also be used to round the components to an arbitrary number of decimals. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2_method_snappedf: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **snappedf**\ (\ step\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector2_method_snappedf>` + +Returns a new vector with each component snapped to the nearest multiple of ``step``. This can also be used to round the components to an arbitrary number of decimals. + .. rst-class:: classref-section-separator ---- @@ -933,7 +1025,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_neq_Vector2>` Returns ``true`` if the vectors are not equal. @@ -949,9 +1041,13 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Transform2D<class_Transform2D>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Transform2D<class_Transform2D>`\ ) :ref:`🔗<class_Vector2_operator_mul_Transform2D>` + +Inversely transforms (multiplies) the **Vector2** by the given :ref:`Transform2D<class_Transform2D>` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform2D.inverse<class_Transform2D_method_inverse>`. -Inversely transforms (multiplies) the **Vector2** by the given :ref:`Transform2D<class_Transform2D>` transformation matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform2D.affine_inverse<class_Transform2D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -961,7 +1057,7 @@ Inversely transforms (multiplies) the **Vector2** by the given :ref:`Transform2D .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_mul_Vector2>` Multiplies each component of the **Vector2** by the components of the given **Vector2**. @@ -977,7 +1073,7 @@ Multiplies each component of the **Vector2** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2_operator_mul_float>` Multiplies each component of the **Vector2** by the given :ref:`float<class_float>`. @@ -989,7 +1085,7 @@ Multiplies each component of the **Vector2** by the given :ref:`float<class_floa .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2_operator_mul_int>` Multiplies each component of the **Vector2** by the given :ref:`int<class_int>`. @@ -1001,7 +1097,7 @@ Multiplies each component of the **Vector2** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator +** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator +**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_sum_Vector2>` Adds each component of the **Vector2** by the components of the given **Vector2**. @@ -1017,7 +1113,7 @@ Adds each component of the **Vector2** by the components of the given **Vector2* .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator -** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator -**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_dif_Vector2>` Subtracts each component of the **Vector2** by the components of the given **Vector2**. @@ -1033,7 +1129,7 @@ Subtracts each component of the **Vector2** by the components of the given **Vec .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator /** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_div_Vector2>` Divides each component of the **Vector2** by the components of the given **Vector2**. @@ -1049,7 +1145,7 @@ Divides each component of the **Vector2** by the components of the given **Vecto .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2_operator_div_float>` Divides each component of the **Vector2** by the given :ref:`float<class_float>`. @@ -1061,7 +1157,7 @@ Divides each component of the **Vector2** by the given :ref:`float<class_float>` .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2_operator_div_int>` Divides each component of the **Vector2** by the given :ref:`int<class_int>`. @@ -1073,7 +1169,7 @@ Divides each component of the **Vector2** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_lt_Vector2>` Compares two **Vector2** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -1087,7 +1183,7 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_lte_Vector2>` Compares two **Vector2** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -1101,7 +1197,7 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_eq_Vector2>` Returns ``true`` if the vectors are exactly equal. @@ -1117,7 +1213,7 @@ Returns ``true`` if the vectors are exactly equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_gt_Vector2>` Compares two **Vector2** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -1131,7 +1227,7 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector2<class_Vector2>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Vector2_operator_gte_Vector2>` Compares two **Vector2** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -1145,7 +1241,7 @@ Compares two **Vector2** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. @@ -1157,7 +1253,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator unary+** **(** **)** +:ref:`Vector2<class_Vector2>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector2_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -1169,7 +1265,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator unary-** **(** **)** +:ref:`Vector2<class_Vector2>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector2_operator_unminus>` Returns the negative value of the **Vector2**. This is the same as writing ``Vector2(-v.x, -v.y)``. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative. @@ -1180,3 +1276,4 @@ Returns the negative value of the **Vector2**. This is the same as writing ``Vec .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector2i.rst b/classes/class_vector2i.rst index 07b62279a80..0f8d9b61531 100644 --- a/classes/class_vector2i.rst +++ b/classes/class_vector2i.rst @@ -56,15 +56,15 @@ Constructors .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` from **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>` **(** :ref:`Vector2<class_Vector2>` from **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>`\ (\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>`\ (\ from\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>`\ (\ from\: :ref:`Vector2<class_Vector2>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_constructor_Vector2i>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -74,25 +74,41 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`abs<class_Vector2i_method_abs>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`aspect<class_Vector2i_method_aspect>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`clamp<class_Vector2i_method_clamp>` **(** :ref:`Vector2i<class_Vector2i>` min, :ref:`Vector2i<class_Vector2i>` max **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector2i_method_length>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`length_squared<class_Vector2i_method_length_squared>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector2i_method_max_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector2i_method_min_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`sign<class_Vector2i_method_sign>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`snapped<class_Vector2i_method_snapped>` **(** :ref:`Vector2i<class_Vector2i>` step **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`abs<class_Vector2i_method_abs>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`aspect<class_Vector2i_method_aspect>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`clamp<class_Vector2i_method_clamp>`\ (\ min\: :ref:`Vector2i<class_Vector2i>`, max\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`clampi<class_Vector2i_method_clampi>`\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`distance_squared_to<class_Vector2i_method_distance_squared_to>`\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector2i_method_distance_to>`\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector2i_method_length>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`length_squared<class_Vector2i_method_length_squared>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`max<class_Vector2i_method_max>`\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector2i_method_max_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`maxi<class_Vector2i_method_maxi>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`min<class_Vector2i_method_min>`\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector2i_method_min_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`mini<class_Vector2i_method_mini>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`sign<class_Vector2i_method_sign>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`snapped<class_Vector2i_method_snapped>`\ (\ step\: :ref:`Vector2i<class_Vector2i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`snappedi<class_Vector2i_method_snappedi>`\ (\ step\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -102,45 +118,45 @@ Operators .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector2i_operator_neq_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator %<class_Vector2i_operator_mod_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator %<class_Vector2i_operator_mod_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_Vector2i_operator_mul_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2i_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_Vector2i_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator +<class_Vector2i_operator_sum_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator -<class_Vector2i_operator_dif_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator /<class_Vector2i_operator_div_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2i_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator /<class_Vector2i_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector2i_operator_lt_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector2i_operator_lte_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector2i_operator_eq_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector2i_operator_gt_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector2i_operator_gte_Vector2i>` **(** :ref:`Vector2i<class_Vector2i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_Vector2i_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator unary+<class_Vector2i_operator_unplus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`operator unary-<class_Vector2i_operator_unminus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector2i_operator_neq_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator %<class_Vector2i_operator_mod_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator %<class_Vector2i_operator_mod_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_Vector2i_operator_mul_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator *<class_Vector2i_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator *<class_Vector2i_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator +<class_Vector2i_operator_sum_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator -<class_Vector2i_operator_dif_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator /<class_Vector2i_operator_div_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`operator /<class_Vector2i_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator /<class_Vector2i_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector2i_operator_lt_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector2i_operator_lte_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector2i_operator_eq_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector2i_operator_gt_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector2i_operator_gte_Vector2i>`\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_Vector2i_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator unary+<class_Vector2i_operator_unplus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`operator unary-<class_Vector2i_operator_unminus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,7 +171,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector2i_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2i_method_min_axis_index>`. @@ -163,7 +179,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2i .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector2i_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2i_method_min_axis_index>`. @@ -171,7 +187,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2i .. rst-class:: classref-constant -**ZERO** = ``Vector2i(0, 0)`` +**ZERO** = ``Vector2i(0, 0)`` :ref:`🔗<class_Vector2i_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -179,15 +195,31 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector2i(1, 1)`` +**ONE** = ``Vector2i(1, 1)`` :ref:`🔗<class_Vector2i_constant_ONE>` One vector, a vector with all components set to ``1``. +.. _class_Vector2i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector2i(-2147483648, -2147483648)`` :ref:`🔗<class_Vector2i_constant_MIN>` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector2.INF<class_Vector2_constant_INF>`. + +.. _class_Vector2i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector2i(2147483647, 2147483647)`` :ref:`🔗<class_Vector2i_constant_MAX>` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector2.INF<class_Vector2_constant_INF>`. + .. _class_Vector2i_constant_LEFT: .. rst-class:: classref-constant -**LEFT** = ``Vector2i(-1, 0)`` +**LEFT** = ``Vector2i(-1, 0)`` :ref:`🔗<class_Vector2i_constant_LEFT>` Left unit vector. Represents the direction of left. @@ -195,7 +227,7 @@ Left unit vector. Represents the direction of left. .. rst-class:: classref-constant -**RIGHT** = ``Vector2i(1, 0)`` +**RIGHT** = ``Vector2i(1, 0)`` :ref:`🔗<class_Vector2i_constant_RIGHT>` Right unit vector. Represents the direction of right. @@ -203,7 +235,7 @@ Right unit vector. Represents the direction of right. .. rst-class:: classref-constant -**UP** = ``Vector2i(0, -1)`` +**UP** = ``Vector2i(0, -1)`` :ref:`🔗<class_Vector2i_constant_UP>` Up unit vector. Y is down in 2D, so this vector points -Y. @@ -211,7 +243,7 @@ Up unit vector. Y is down in 2D, so this vector points -Y. .. rst-class:: classref-constant -**DOWN** = ``Vector2i(0, 1)`` +**DOWN** = ``Vector2i(0, 1)`` :ref:`🔗<class_Vector2i_constant_DOWN>` Down unit vector. Y is down in 2D, so this vector points +Y. @@ -228,7 +260,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **x** = ``0`` +:ref:`int<class_int>` **x** = ``0`` :ref:`🔗<class_Vector2i_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -240,7 +272,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`int<class_int>` **y** = ``0`` +:ref:`int<class_int>` **y** = ``0`` :ref:`🔗<class_Vector2i_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -257,7 +289,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector2i<class_Vector2i>` **Vector2i** **(** **)** +:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ ) :ref:`🔗<class_Vector2i_constructor_Vector2i>` Constructs a default-initialized **Vector2i** with all components set to ``0``. @@ -267,7 +299,7 @@ Constructs a default-initialized **Vector2i** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector2i<class_Vector2i>` **Vector2i** **(** :ref:`Vector2i<class_Vector2i>` from **)** +:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ from\: :ref:`Vector2i<class_Vector2i>`\ ) Constructs a **Vector2i** as a copy of the given **Vector2i**. @@ -277,7 +309,7 @@ Constructs a **Vector2i** as a copy of the given **Vector2i**. .. rst-class:: classref-constructor -:ref:`Vector2i<class_Vector2i>` **Vector2i** **(** :ref:`Vector2<class_Vector2>` from **)** +:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ from\: :ref:`Vector2<class_Vector2>`\ ) Constructs a new **Vector2i** from the given :ref:`Vector2<class_Vector2>` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector2.ceil<class_Vector2_method_ceil>`, :ref:`Vector2.floor<class_Vector2_method_floor>` or :ref:`Vector2.round<class_Vector2_method_round>` to this constructor instead. @@ -287,7 +319,7 @@ Constructs a new **Vector2i** from the given :ref:`Vector2<class_Vector2>` by tr .. rst-class:: classref-constructor -:ref:`Vector2i<class_Vector2i>` **Vector2i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** +:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`\ ) Constructs a new **Vector2i** from the given ``x`` and ``y``. @@ -304,7 +336,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **abs** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -316,7 +348,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`float<class_float>` **aspect** **(** **)** |const| +:ref:`float<class_float>` **aspect**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_aspect>` Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2i_property_x>` to :ref:`y<class_Vector2i_property_y>`. @@ -328,7 +360,7 @@ Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2i_pro .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **clamp** **(** :ref:`Vector2i<class_Vector2i>` min, :ref:`Vector2i<class_Vector2i>` max **)** |const| +:ref:`Vector2i<class_Vector2i>` **clamp**\ (\ min\: :ref:`Vector2i<class_Vector2i>`, max\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -336,11 +368,49 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector2i_method_clampi: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **clampi**\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_clampi>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_method_distance_squared_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **distance_squared_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_distance_squared_to>` + +Returns the squared distance between this vector and ``to``. + +This method runs faster than :ref:`distance_to<class_Vector2i_method_distance_to>`, so prefer it if you need to compare vectors or need the squared distance for some formula. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_method_distance_to: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_distance_to>` + +Returns the distance between this vector and ``to``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2i_method_length: .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_length>` Returns the length (magnitude) of this vector. @@ -352,7 +422,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`int<class_int>` **length_squared** **(** **)** |const| +:ref:`int<class_int>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -362,11 +432,23 @@ This method runs faster than :ref:`length<class_Vector2i_method_length>`, so pre ---- +.. _class_Vector2i_method_max: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **max**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2i(maxi(x, with.x), maxi(y, with.y))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2i_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector2i_constant_AXIS_X>`. @@ -374,11 +456,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector2i_method_maxi: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **maxi**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_maxi>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2i(maxi(x, with), maxi(y, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_method_min: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **min**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2i(mini(x, with.x), mini(y, with.y))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2i_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Y<class_Vector2i_constant_AXIS_Y>`. @@ -386,11 +492,23 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector2i_method_mini: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **mini**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_mini>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2i(mini(x, with), mini(y, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector2i_method_sign: .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **sign** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_sign>` Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -402,10 +520,22 @@ Returns a new vector with each component set to ``1`` if it's positive, ``-1`` i .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **snapped** **(** :ref:`Vector2i<class_Vector2i>` step **)** |const| +:ref:`Vector2i<class_Vector2i>` **snapped**\ (\ step\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_snapped>` Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector2i_method_snappedi: + +.. rst-class:: classref-method + +:ref:`Vector2i<class_Vector2i>` **snappedi**\ (\ step\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_snappedi>` + +Returns a new vector with each component snapped to the closest multiple of ``step``. + .. rst-class:: classref-section-separator ---- @@ -419,7 +549,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_neq_Vector2i>` Returns ``true`` if the vectors are not equal. @@ -431,7 +561,7 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator %** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_mod_Vector2i>` Gets the remainder of each component of the **Vector2i** with the components of the given **Vector2i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -447,7 +577,7 @@ Gets the remainder of each component of the **Vector2i** with the components of .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator %** **(** :ref:`int<class_int>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_mod_int>` Gets the remainder of each component of the **Vector2i** with the given :ref:`int<class_int>`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -463,7 +593,7 @@ Gets the remainder of each component of the **Vector2i** with the given :ref:`in .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator *** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_mul_Vector2i>` Multiplies each component of the **Vector2i** by the components of the given **Vector2i**. @@ -479,7 +609,7 @@ Multiplies each component of the **Vector2i** by the components of the given **V .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2i_operator_mul_float>` Multiplies each component of the **Vector2i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector2<class_Vector2>`. @@ -495,7 +625,7 @@ Multiplies each component of the **Vector2i** by the given :ref:`float<class_flo .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_mul_int>` Multiplies each component of the **Vector2i** by the given :ref:`int<class_int>`. @@ -507,7 +637,7 @@ Multiplies each component of the **Vector2i** by the given :ref:`int<class_int>` .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator +** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator +**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_sum_Vector2i>` Adds each component of the **Vector2i** by the components of the given **Vector2i**. @@ -523,7 +653,7 @@ Adds each component of the **Vector2i** by the components of the given **Vector2 .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator -** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator -**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_dif_Vector2i>` Subtracts each component of the **Vector2i** by the components of the given **Vector2i**. @@ -539,7 +669,7 @@ Subtracts each component of the **Vector2i** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator /** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_div_Vector2i>` Divides each component of the **Vector2i** by the components of the given **Vector2i**. @@ -555,7 +685,7 @@ Divides each component of the **Vector2i** by the components of the given **Vect .. rst-class:: classref-operator -:ref:`Vector2<class_Vector2>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2i_operator_div_float>` Divides each component of the **Vector2i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector2<class_Vector2>`. @@ -571,7 +701,7 @@ Divides each component of the **Vector2i** by the given :ref:`float<class_float> .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_div_int>` Divides each component of the **Vector2i** by the given :ref:`int<class_int>`. @@ -583,7 +713,7 @@ Divides each component of the **Vector2i** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_lt_Vector2i>` Compares two **Vector2i** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -595,7 +725,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_lte_Vector2i>` Compares two **Vector2i** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -607,7 +737,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_eq_Vector2i>` Returns ``true`` if the vectors are equal. @@ -619,7 +749,7 @@ Returns ``true`` if the vectors are equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_gt_Vector2i>` Compares two **Vector2i** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -631,7 +761,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector2i<class_Vector2i>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_gte_Vector2i>` Compares two **Vector2i** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors. @@ -643,7 +773,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``. @@ -655,7 +785,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator unary+** **(** **)** +:ref:`Vector2i<class_Vector2i>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector2i_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -667,7 +797,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector2i<class_Vector2i>` **operator unary-** **(** **)** +:ref:`Vector2i<class_Vector2i>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector2i_operator_unminus>` Returns the negative value of the **Vector2i**. This is the same as writing ``Vector2i(-v.x, -v.y)``. This operation flips the direction of the vector while keeping the same magnitude. @@ -678,3 +808,4 @@ Returns the negative value of the **Vector2i**. This is the same as writing ``Ve .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector3.rst b/classes/class_vector3.rst index 9815e8d7f8d..55c07fdab80 100644 --- a/classes/class_vector3.rst +++ b/classes/class_vector3.rst @@ -10,7 +10,7 @@ Vector3 ======= -A 3D vector using floating point coordinates. +A 3D vector using floating-point coordinates. .. rst-class:: classref-introduction-group @@ -38,7 +38,7 @@ Tutorials - `3Blue1Brown Essence of Linear Algebra <https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab>`__ -- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/584>`__ +- `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__ - `All 3D Demos <https://github.com/godotengine/godot-demo-projects/tree/master/3d>`__ @@ -66,15 +66,15 @@ Constructors .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>` **(** **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>` **(** :ref:`Vector3<class_Vector3>` from **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>` **(** :ref:`Vector3i<class_Vector3i>` from **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>`\ (\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>`\ (\ from\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>`\ (\ from\: :ref:`Vector3i<class_Vector3i>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`Vector3<class_Vector3_constructor_Vector3>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`\ ) | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -84,91 +84,103 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`abs<class_Vector3_method_abs>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`angle_to<class_Vector3_method_angle_to>` **(** :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`bezier_derivative<class_Vector3_method_bezier_derivative>` **(** :ref:`Vector3<class_Vector3>` control_1, :ref:`Vector3<class_Vector3>` control_2, :ref:`Vector3<class_Vector3>` end, :ref:`float<class_float>` t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`bezier_interpolate<class_Vector3_method_bezier_interpolate>` **(** :ref:`Vector3<class_Vector3>` control_1, :ref:`Vector3<class_Vector3>` control_2, :ref:`Vector3<class_Vector3>` end, :ref:`float<class_float>` t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`bounce<class_Vector3_method_bounce>` **(** :ref:`Vector3<class_Vector3>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`ceil<class_Vector3_method_ceil>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`clamp<class_Vector3_method_clamp>` **(** :ref:`Vector3<class_Vector3>` min, :ref:`Vector3<class_Vector3>` max **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`cross<class_Vector3_method_cross>` **(** :ref:`Vector3<class_Vector3>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`cubic_interpolate<class_Vector3_method_cubic_interpolate>` **(** :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` pre_a, :ref:`Vector3<class_Vector3>` post_b, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`cubic_interpolate_in_time<class_Vector3_method_cubic_interpolate_in_time>` **(** :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` pre_a, :ref:`Vector3<class_Vector3>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`direction_to<class_Vector3_method_direction_to>` **(** :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector3_method_distance_squared_to>` **(** :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to<class_Vector3_method_distance_to>` **(** :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`dot<class_Vector3_method_dot>` **(** :ref:`Vector3<class_Vector3>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`floor<class_Vector3_method_floor>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`inverse<class_Vector3_method_inverse>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector3_method_is_equal_approx>` **(** :ref:`Vector3<class_Vector3>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector3_method_is_finite>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector3_method_is_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector3_method_is_zero_approx>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector3_method_length>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length_squared<class_Vector3_method_length_squared>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`lerp<class_Vector3_method_lerp>` **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`limit_length<class_Vector3_method_limit_length>` **(** :ref:`float<class_float>` length=1.0 **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector3_method_max_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector3_method_min_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`move_toward<class_Vector3_method_move_toward>` **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` delta **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`normalized<class_Vector3_method_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`octahedron_decode<class_Vector3_method_octahedron_decode>` **(** :ref:`Vector2<class_Vector2>` uv **)** |static| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`octahedron_encode<class_Vector3_method_octahedron_encode>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis<class_Basis>` | :ref:`outer<class_Vector3_method_outer>` **(** :ref:`Vector3<class_Vector3>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`posmod<class_Vector3_method_posmod>` **(** :ref:`float<class_float>` mod **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`posmodv<class_Vector3_method_posmodv>` **(** :ref:`Vector3<class_Vector3>` modv **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`project<class_Vector3_method_project>` **(** :ref:`Vector3<class_Vector3>` b **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`reflect<class_Vector3_method_reflect>` **(** :ref:`Vector3<class_Vector3>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`rotated<class_Vector3_method_rotated>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`round<class_Vector3_method_round>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`sign<class_Vector3_method_sign>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`signed_angle_to<class_Vector3_method_signed_angle_to>` **(** :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` axis **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`slerp<class_Vector3_method_slerp>` **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`slide<class_Vector3_method_slide>` **(** :ref:`Vector3<class_Vector3>` n **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`snapped<class_Vector3_method_snapped>` **(** :ref:`Vector3<class_Vector3>` step **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`abs<class_Vector3_method_abs>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`angle_to<class_Vector3_method_angle_to>`\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`bezier_derivative<class_Vector3_method_bezier_derivative>`\ (\ control_1\: :ref:`Vector3<class_Vector3>`, control_2\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`bezier_interpolate<class_Vector3_method_bezier_interpolate>`\ (\ control_1\: :ref:`Vector3<class_Vector3>`, control_2\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`bounce<class_Vector3_method_bounce>`\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`ceil<class_Vector3_method_ceil>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`clamp<class_Vector3_method_clamp>`\ (\ min\: :ref:`Vector3<class_Vector3>`, max\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`clampf<class_Vector3_method_clampf>`\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`cross<class_Vector3_method_cross>`\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`cubic_interpolate<class_Vector3_method_cubic_interpolate>`\ (\ b\: :ref:`Vector3<class_Vector3>`, pre_a\: :ref:`Vector3<class_Vector3>`, post_b\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`cubic_interpolate_in_time<class_Vector3_method_cubic_interpolate_in_time>`\ (\ b\: :ref:`Vector3<class_Vector3>`, pre_a\: :ref:`Vector3<class_Vector3>`, post_b\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`direction_to<class_Vector3_method_direction_to>`\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector3_method_distance_squared_to>`\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector3_method_distance_to>`\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`dot<class_Vector3_method_dot>`\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`floor<class_Vector3_method_floor>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`inverse<class_Vector3_method_inverse>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector3_method_is_equal_approx>`\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector3_method_is_finite>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector3_method_is_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector3_method_is_zero_approx>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector3_method_length>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length_squared<class_Vector3_method_length_squared>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`lerp<class_Vector3_method_lerp>`\ (\ to\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`limit_length<class_Vector3_method_limit_length>`\ (\ length\: :ref:`float<class_float>` = 1.0\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`max<class_Vector3_method_max>`\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector3_method_max_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`maxf<class_Vector3_method_maxf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`min<class_Vector3_method_min>`\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector3_method_min_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`minf<class_Vector3_method_minf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`move_toward<class_Vector3_method_move_toward>`\ (\ to\: :ref:`Vector3<class_Vector3>`, delta\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`normalized<class_Vector3_method_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`octahedron_decode<class_Vector3_method_octahedron_decode>`\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) |static| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`octahedron_encode<class_Vector3_method_octahedron_encode>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis<class_Basis>` | :ref:`outer<class_Vector3_method_outer>`\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`posmod<class_Vector3_method_posmod>`\ (\ mod\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`posmodv<class_Vector3_method_posmodv>`\ (\ modv\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`project<class_Vector3_method_project>`\ (\ b\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`reflect<class_Vector3_method_reflect>`\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`rotated<class_Vector3_method_rotated>`\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`round<class_Vector3_method_round>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`sign<class_Vector3_method_sign>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`signed_angle_to<class_Vector3_method_signed_angle_to>`\ (\ to\: :ref:`Vector3<class_Vector3>`, axis\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`slerp<class_Vector3_method_slerp>`\ (\ to\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`slide<class_Vector3_method_slide>`\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`snapped<class_Vector3_method_snapped>`\ (\ step\: :ref:`Vector3<class_Vector3>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`snappedf<class_Vector3_method_snappedf>`\ (\ step\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -178,47 +190,47 @@ Operators .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector3_operator_neq_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Basis>` **(** :ref:`Basis<class_Basis>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Quaternion>` **(** :ref:`Quaternion<class_Quaternion>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Transform3D>` **(** :ref:`Transform3D<class_Transform3D>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator +<class_Vector3_operator_sum_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator -<class_Vector3_operator_dif_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector3_operator_lt_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector3_operator_lte_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector3_operator_eq_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector3_operator_gt_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector3_operator_gte_Vector3>` **(** :ref:`Vector3<class_Vector3>` right **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_Vector3_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator unary+<class_Vector3_operator_unplus>` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator unary-<class_Vector3_operator_unminus>` **(** **)** | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector3_operator_neq_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Basis>`\ (\ right\: :ref:`Basis<class_Basis>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Quaternion>`\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Transform3D>`\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator +<class_Vector3_operator_sum_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator -<class_Vector3_operator_dif_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector3_operator_lt_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector3_operator_lte_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector3_operator_eq_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector3_operator_gt_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector3_operator_gte_Vector3>`\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_Vector3_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator unary+<class_Vector3_operator_unplus>`\ (\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator unary-<class_Vector3_operator_unminus>`\ (\ ) | + +-------------------------------+----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -233,7 +245,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector3_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector3_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3_method_min_axis_index>`. @@ -241,7 +253,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector3_ .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector3_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector3_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3_method_min_axis_index>`. @@ -249,7 +261,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector3_ .. rst-class:: classref-constant -**AXIS_Z** = ``2`` +**AXIS_Z** = ``2`` :ref:`🔗<class_Vector3_constant_AXIS_Z>` Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector3_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3_method_min_axis_index>`. @@ -257,7 +269,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector3_ .. rst-class:: classref-constant -**ZERO** = ``Vector3(0, 0, 0)`` +**ZERO** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_Vector3_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -265,7 +277,7 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector3(1, 1, 1)`` +**ONE** = ``Vector3(1, 1, 1)`` :ref:`🔗<class_Vector3_constant_ONE>` One vector, a vector with all components set to ``1``. @@ -273,7 +285,7 @@ One vector, a vector with all components set to ``1``. .. rst-class:: classref-constant -**INF** = ``Vector3(inf, inf, inf)`` +**INF** = ``Vector3(inf, inf, inf)`` :ref:`🔗<class_Vector3_constant_INF>` Infinity vector, a vector with all components set to :ref:`@GDScript.INF<class_@GDScript_constant_INF>`. @@ -281,7 +293,7 @@ Infinity vector, a vector with all components set to :ref:`@GDScript.INF<class_@ .. rst-class:: classref-constant -**LEFT** = ``Vector3(-1, 0, 0)`` +**LEFT** = ``Vector3(-1, 0, 0)`` :ref:`🔗<class_Vector3_constant_LEFT>` Left unit vector. Represents the local direction of left, and the global direction of west. @@ -289,7 +301,7 @@ Left unit vector. Represents the local direction of left, and the global directi .. rst-class:: classref-constant -**RIGHT** = ``Vector3(1, 0, 0)`` +**RIGHT** = ``Vector3(1, 0, 0)`` :ref:`🔗<class_Vector3_constant_RIGHT>` Right unit vector. Represents the local direction of right, and the global direction of east. @@ -297,7 +309,7 @@ Right unit vector. Represents the local direction of right, and the global direc .. rst-class:: classref-constant -**UP** = ``Vector3(0, 1, 0)`` +**UP** = ``Vector3(0, 1, 0)`` :ref:`🔗<class_Vector3_constant_UP>` Up unit vector. @@ -305,7 +317,7 @@ Up unit vector. .. rst-class:: classref-constant -**DOWN** = ``Vector3(0, -1, 0)`` +**DOWN** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_Vector3_constant_DOWN>` Down unit vector. @@ -313,7 +325,7 @@ Down unit vector. .. rst-class:: classref-constant -**FORWARD** = ``Vector3(0, 0, -1)`` +**FORWARD** = ``Vector3(0, 0, -1)`` :ref:`🔗<class_Vector3_constant_FORWARD>` Forward unit vector. Represents the local direction of forward, and the global direction of north. Keep in mind that the forward direction for lights, cameras, etc is different from 3D assets like characters, which face towards the camera by convention. Use :ref:`MODEL_FRONT<class_Vector3_constant_MODEL_FRONT>` and similar constants when working in 3D asset space. @@ -321,7 +333,7 @@ Forward unit vector. Represents the local direction of forward, and the global d .. rst-class:: classref-constant -**BACK** = ``Vector3(0, 0, 1)`` +**BACK** = ``Vector3(0, 0, 1)`` :ref:`🔗<class_Vector3_constant_BACK>` Back unit vector. Represents the local direction of back, and the global direction of south. @@ -329,7 +341,7 @@ Back unit vector. Represents the local direction of back, and the global directi .. rst-class:: classref-constant -**MODEL_LEFT** = ``Vector3(1, 0, 0)`` +**MODEL_LEFT** = ``Vector3(1, 0, 0)`` :ref:`🔗<class_Vector3_constant_MODEL_LEFT>` Unit vector pointing towards the left side of imported 3D assets. @@ -337,7 +349,7 @@ Unit vector pointing towards the left side of imported 3D assets. .. rst-class:: classref-constant -**MODEL_RIGHT** = ``Vector3(-1, 0, 0)`` +**MODEL_RIGHT** = ``Vector3(-1, 0, 0)`` :ref:`🔗<class_Vector3_constant_MODEL_RIGHT>` Unit vector pointing towards the right side of imported 3D assets. @@ -345,7 +357,7 @@ Unit vector pointing towards the right side of imported 3D assets. .. rst-class:: classref-constant -**MODEL_TOP** = ``Vector3(0, 1, 0)`` +**MODEL_TOP** = ``Vector3(0, 1, 0)`` :ref:`🔗<class_Vector3_constant_MODEL_TOP>` Unit vector pointing towards the top side (up) of imported 3D assets. @@ -353,7 +365,7 @@ Unit vector pointing towards the top side (up) of imported 3D assets. .. rst-class:: classref-constant -**MODEL_BOTTOM** = ``Vector3(0, -1, 0)`` +**MODEL_BOTTOM** = ``Vector3(0, -1, 0)`` :ref:`🔗<class_Vector3_constant_MODEL_BOTTOM>` Unit vector pointing towards the bottom side (down) of imported 3D assets. @@ -361,7 +373,7 @@ Unit vector pointing towards the bottom side (down) of imported 3D assets. .. rst-class:: classref-constant -**MODEL_FRONT** = ``Vector3(0, 0, 1)`` +**MODEL_FRONT** = ``Vector3(0, 0, 1)`` :ref:`🔗<class_Vector3_constant_MODEL_FRONT>` Unit vector pointing towards the front side (facing forward) of imported 3D assets. @@ -369,7 +381,7 @@ Unit vector pointing towards the front side (facing forward) of imported 3D asse .. rst-class:: classref-constant -**MODEL_REAR** = ``Vector3(0, 0, -1)`` +**MODEL_REAR** = ``Vector3(0, 0, -1)`` :ref:`🔗<class_Vector3_constant_MODEL_REAR>` Unit vector pointing towards the rear side (back) of imported 3D assets. @@ -386,7 +398,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **x** = ``0.0`` +:ref:`float<class_float>` **x** = ``0.0`` :ref:`🔗<class_Vector3_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -398,7 +410,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`float<class_float>` **y** = ``0.0`` +:ref:`float<class_float>` **y** = ``0.0`` :ref:`🔗<class_Vector3_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -410,7 +422,7 @@ The vector's Y component. Also accessible by using the index position ``[1]``. .. rst-class:: classref-property -:ref:`float<class_float>` **z** = ``0.0`` +:ref:`float<class_float>` **z** = ``0.0`` :ref:`🔗<class_Vector3_property_z>` The vector's Z component. Also accessible by using the index position ``[2]``. @@ -427,7 +439,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector3<class_Vector3>` **Vector3** **(** **)** +:ref:`Vector3<class_Vector3>` **Vector3**\ (\ ) :ref:`🔗<class_Vector3_constructor_Vector3>` Constructs a default-initialized **Vector3** with all components set to ``0``. @@ -437,7 +449,7 @@ Constructs a default-initialized **Vector3** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector3<class_Vector3>` **Vector3** **(** :ref:`Vector3<class_Vector3>` from **)** +:ref:`Vector3<class_Vector3>` **Vector3**\ (\ from\: :ref:`Vector3<class_Vector3>`\ ) Constructs a **Vector3** as a copy of the given **Vector3**. @@ -447,7 +459,7 @@ Constructs a **Vector3** as a copy of the given **Vector3**. .. rst-class:: classref-constructor -:ref:`Vector3<class_Vector3>` **Vector3** **(** :ref:`Vector3i<class_Vector3i>` from **)** +:ref:`Vector3<class_Vector3>` **Vector3**\ (\ from\: :ref:`Vector3i<class_Vector3i>`\ ) Constructs a new **Vector3** from :ref:`Vector3i<class_Vector3i>`. @@ -457,7 +469,7 @@ Constructs a new **Vector3** from :ref:`Vector3i<class_Vector3i>`. .. rst-class:: classref-constructor -:ref:`Vector3<class_Vector3>` **Vector3** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** +:ref:`Vector3<class_Vector3>` **Vector3**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`\ ) Returns a **Vector3** with the given components. @@ -474,7 +486,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **abs** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector3_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -486,7 +498,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`float<class_float>` **angle_to** **(** :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`float<class_float>` **angle_to**\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_angle_to>` Returns the unsigned minimum angle to the given vector, in radians. @@ -498,7 +510,7 @@ Returns the unsigned minimum angle to the given vector, in radians. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **bezier_derivative** **(** :ref:`Vector3<class_Vector3>` control_1, :ref:`Vector3<class_Vector3>` control_2, :ref:`Vector3<class_Vector3>` end, :ref:`float<class_float>` t **)** |const| +:ref:`Vector3<class_Vector3>` **bezier_derivative**\ (\ control_1\: :ref:`Vector3<class_Vector3>`, control_2\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_bezier_derivative>` Returns the derivative at the given ``t`` on the `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. @@ -510,7 +522,7 @@ Returns the derivative at the given ``t`` on the `Bézier curve <https://en.wiki .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **bezier_interpolate** **(** :ref:`Vector3<class_Vector3>` control_1, :ref:`Vector3<class_Vector3>` control_2, :ref:`Vector3<class_Vector3>` end, :ref:`float<class_float>` t **)** |const| +:ref:`Vector3<class_Vector3>` **bezier_interpolate**\ (\ control_1\: :ref:`Vector3<class_Vector3>`, control_2\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_bezier_interpolate>` Returns the point at the given ``t`` on the `Bézier curve <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`__ defined by this vector and the given ``control_1``, ``control_2``, and ``end`` points. @@ -522,9 +534,11 @@ Returns the point at the given ``t`` on the `Bézier curve <https://en.wikipedia .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **bounce** **(** :ref:`Vector3<class_Vector3>` n **)** |const| +:ref:`Vector3<class_Vector3>` **bounce**\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_bounce>` -Returns the vector "bounced off" from a plane defined by the given normal. +Returns the vector "bounced off" from a plane defined by the given normal ``n``. + +\ **Note:** :ref:`bounce<class_Vector3_method_bounce>` performs the operation that most engines and frameworks call ``reflect()``. .. rst-class:: classref-item-separator @@ -534,7 +548,7 @@ Returns the vector "bounced off" from a plane defined by the given normal. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **ceil** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **ceil**\ (\ ) |const| :ref:`🔗<class_Vector3_method_ceil>` Returns a new vector with all components rounded up (towards positive infinity). @@ -546,7 +560,7 @@ Returns a new vector with all components rounded up (towards positive infinity). .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **clamp** **(** :ref:`Vector3<class_Vector3>` min, :ref:`Vector3<class_Vector3>` max **)** |const| +:ref:`Vector3<class_Vector3>` **clamp**\ (\ min\: :ref:`Vector3<class_Vector3>`, max\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -554,14 +568,28 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector3_method_clampf: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **clampf**\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_clampf>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3_method_cross: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **cross** **(** :ref:`Vector3<class_Vector3>` with **)** |const| +:ref:`Vector3<class_Vector3>` **cross**\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_cross>` Returns the cross product of this vector and ``with``. +This returns a vector perpendicular to both this and ``with``, which would be the normal vector of the plane defined by the two vectors. As there are two such vectors, in opposite directions, this method returns the vector defined by a right-handed coordinate system. If the two vectors are parallel this returns an empty vector, making it useful for testing if two vectors are parallel. + .. rst-class:: classref-item-separator ---- @@ -570,7 +598,7 @@ Returns the cross product of this vector and ``with``. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **cubic_interpolate** **(** :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` pre_a, :ref:`Vector3<class_Vector3>` post_b, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector3<class_Vector3>` **cubic_interpolate**\ (\ b\: :ref:`Vector3<class_Vector3>`, pre_a\: :ref:`Vector3<class_Vector3>`, post_b\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_cubic_interpolate>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -582,11 +610,11 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **cubic_interpolate_in_time** **(** :ref:`Vector3<class_Vector3>` b, :ref:`Vector3<class_Vector3>` pre_a, :ref:`Vector3<class_Vector3>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| +:ref:`Vector3<class_Vector3>` **cubic_interpolate_in_time**\ (\ b\: :ref:`Vector3<class_Vector3>`, pre_a\: :ref:`Vector3<class_Vector3>`, post_b\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_cubic_interpolate_in_time>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate<class_Vector3_method_cubic_interpolate>` by the time values. .. rst-class:: classref-item-separator @@ -596,7 +624,7 @@ It can perform smoother interpolation than ``cubic_interpolate()`` by the time v .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **direction_to** **(** :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`Vector3<class_Vector3>` **direction_to**\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_direction_to>` Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. @@ -608,7 +636,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv .. rst-class:: classref-method -:ref:`float<class_float>` **distance_squared_to** **(** :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`float<class_float>` **distance_squared_to**\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_distance_squared_to>` Returns the squared distance between this vector and ``to``. @@ -622,7 +650,7 @@ This method runs faster than :ref:`distance_to<class_Vector3_method_distance_to> .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to** **(** :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_distance_to>` Returns the distance between this vector and ``to``. @@ -634,11 +662,11 @@ Returns the distance between this vector and ``to``. .. rst-class:: classref-method -:ref:`float<class_float>` **dot** **(** :ref:`Vector3<class_Vector3>` with **)** |const| +:ref:`float<class_float>` **dot**\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_dot>` Returns the dot product of this vector and ``with``. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. -The dot product will be ``0`` for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. +The dot product will be ``0`` for a right angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. When using unit (normalized) vectors, the result will always be between ``-1.0`` (180 degree angle) when the vectors are facing opposite directions, and ``1.0`` (0 degree angle) when the vectors are aligned. @@ -652,7 +680,7 @@ When using unit (normalized) vectors, the result will always be between ``-1.0`` .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **floor** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **floor**\ (\ ) |const| :ref:`🔗<class_Vector3_method_floor>` Returns a new vector with all components rounded down (towards negative infinity). @@ -664,7 +692,7 @@ Returns a new vector with all components rounded down (towards negative infinity .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **inverse** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **inverse**\ (\ ) |const| :ref:`🔗<class_Vector3_method_inverse>` Returns the inverse of the vector. This is the same as ``Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)``. @@ -676,7 +704,7 @@ Returns the inverse of the vector. This is the same as ``Vector3(1.0 / v.x, 1.0 .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Vector3<class_Vector3>` to **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ to\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_is_equal_approx>` Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. @@ -688,7 +716,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Vector3_method_is_finite>` Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -700,7 +728,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_normalized** **(** **)** |const| +:ref:`bool<class_bool>` **is_normalized**\ (\ ) |const| :ref:`🔗<class_Vector3_method_is_normalized>` Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. @@ -712,7 +740,7 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_zero_approx** **(** **)** |const| +:ref:`bool<class_bool>` **is_zero_approx**\ (\ ) |const| :ref:`🔗<class_Vector3_method_is_zero_approx>` Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx<class_@GlobalScope_method_is_zero_approx>` on each component. @@ -726,7 +754,7 @@ This method is faster than using :ref:`is_equal_approx<class_Vector3_method_is_e .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector3_method_length>` Returns the length (magnitude) of this vector. @@ -738,7 +766,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`float<class_float>` **length_squared** **(** **)** |const| +:ref:`float<class_float>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector3_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -752,7 +780,7 @@ This method runs faster than :ref:`length<class_Vector3_method_length>`, so pref .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **lerp** **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector3<class_Vector3>` **lerp**\ (\ to\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_lerp>` Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of ``0.0`` to ``1.0``, representing the amount of interpolation. @@ -764,7 +792,7 @@ Returns the result of the linear interpolation between this vector and ``to`` by .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **limit_length** **(** :ref:`float<class_float>` length=1.0 **)** |const| +:ref:`Vector3<class_Vector3>` **limit_length**\ (\ length\: :ref:`float<class_float>` = 1.0\ ) |const| :ref:`🔗<class_Vector3_method_limit_length>` Returns the vector with a maximum length by limiting its length to ``length``. @@ -772,11 +800,23 @@ Returns the vector with a maximum length by limiting its length to ``length``. ---- +.. _class_Vector3_method_max: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **max**\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector3(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector3_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector3_constant_AXIS_X>`. @@ -784,11 +824,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector3_method_maxf: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **maxf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_maxf>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector3(maxf(x, with), maxf(y, with), maxf(z, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_method_min: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **min**\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3(minf(x, with.x), minf(y, with.y), minf(z, with.z))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector3_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Z<class_Vector3_constant_AXIS_Z>`. @@ -796,11 +860,23 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector3_method_minf: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **minf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_minf>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3(minf(x, with), minf(y, with), minf(z, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3_method_move_toward: .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **move_toward** **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` delta **)** |const| +:ref:`Vector3<class_Vector3>` **move_toward**\ (\ to\: :ref:`Vector3<class_Vector3>`, delta\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_move_toward>` Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not go past the final value. @@ -812,9 +888,9 @@ Returns a new vector moved toward ``to`` by the fixed ``delta`` amount. Will not .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **normalized** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **normalized**\ (\ ) |const| :ref:`🔗<class_Vector3_method_normalized>` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized<class_Vector3_method_is_normalized>`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized<class_Vector3_method_is_normalized>`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -826,7 +902,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **octahedron_decode** **(** :ref:`Vector2<class_Vector2>` uv **)** |static| +:ref:`Vector3<class_Vector3>` **octahedron_decode**\ (\ uv\: :ref:`Vector2<class_Vector2>`\ ) |static| :ref:`🔗<class_Vector3_method_octahedron_decode>` Returns the **Vector3** from an octahedral-compressed form created using :ref:`octahedron_encode<class_Vector3_method_octahedron_encode>` (stored as a :ref:`Vector2<class_Vector2>`). @@ -838,7 +914,7 @@ Returns the **Vector3** from an octahedral-compressed form created using :ref:`o .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **octahedron_encode** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **octahedron_encode**\ (\ ) |const| :ref:`🔗<class_Vector3_method_octahedron_encode>` Returns the octahedral-encoded (oct32) form of this **Vector3** as a :ref:`Vector2<class_Vector2>`. Since a :ref:`Vector2<class_Vector2>` occupies 1/3 less memory compared to **Vector3**, this form of compression can be used to pass greater amounts of :ref:`normalized<class_Vector3_method_normalized>` **Vector3**\ s without increasing storage or memory requirements. See also :ref:`octahedron_decode<class_Vector3_method_octahedron_decode>`. @@ -854,7 +930,7 @@ Returns the octahedral-encoded (oct32) form of this **Vector3** as a :ref:`Vecto .. rst-class:: classref-method -:ref:`Basis<class_Basis>` **outer** **(** :ref:`Vector3<class_Vector3>` with **)** |const| +:ref:`Basis<class_Basis>` **outer**\ (\ with\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_outer>` Returns the outer product with ``with``. @@ -866,7 +942,7 @@ Returns the outer product with ``with``. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **posmod** **(** :ref:`float<class_float>` mod **)** |const| +:ref:`Vector3<class_Vector3>` **posmod**\ (\ mod\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_posmod>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``mod``. @@ -878,7 +954,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **posmodv** **(** :ref:`Vector3<class_Vector3>` modv **)** |const| +:ref:`Vector3<class_Vector3>` **posmodv**\ (\ modv\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_posmodv>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``modv``'s components. @@ -890,9 +966,11 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **project** **(** :ref:`Vector3<class_Vector3>` b **)** |const| +:ref:`Vector3<class_Vector3>` **project**\ (\ b\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_project>` + +Returns a new vector resulting from projecting this vector onto the given vector ``b``. The resulting new vector is parallel to ``b``. See also :ref:`slide<class_Vector3_method_slide>`. -Returns the result of projecting the vector onto the given vector ``b``. +\ **Note:** If the vector ``b`` is a zero vector, the components of the resulting new vector will be :ref:`@GDScript.NAN<class_@GDScript_constant_NAN>`. .. rst-class:: classref-item-separator @@ -902,9 +980,11 @@ Returns the result of projecting the vector onto the given vector ``b``. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **reflect** **(** :ref:`Vector3<class_Vector3>` n **)** |const| +:ref:`Vector3<class_Vector3>` **reflect**\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_reflect>` -Returns the result of reflecting the vector from a plane defined by the given normal ``n``. +Returns the result of reflecting the vector through a plane defined by the given normal vector ``n``. + +\ **Note:** :ref:`reflect<class_Vector3_method_reflect>` differs from what other engines and frameworks call ``reflect()``. In other engines, ``reflect()`` returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also :ref:`bounce<class_Vector3_method_bounce>` which does what most engines call ``reflect()``. .. rst-class:: classref-item-separator @@ -914,7 +994,7 @@ Returns the result of reflecting the vector from a plane defined by the given no .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **rotated** **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |const| +:ref:`Vector3<class_Vector3>` **rotated**\ (\ axis\: :ref:`Vector3<class_Vector3>`, angle\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_rotated>` Returns the result of rotating this vector around a given axis by ``angle`` (in radians). The axis must be a normalized vector. See also :ref:`@GlobalScope.deg_to_rad<class_@GlobalScope_method_deg_to_rad>`. @@ -926,7 +1006,7 @@ Returns the result of rotating this vector around a given axis by ``angle`` (in .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **round** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **round**\ (\ ) |const| :ref:`🔗<class_Vector3_method_round>` Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. @@ -938,7 +1018,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **sign** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector3_method_sign>` Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -950,7 +1030,7 @@ Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0 .. rst-class:: classref-method -:ref:`float<class_float>` **signed_angle_to** **(** :ref:`Vector3<class_Vector3>` to, :ref:`Vector3<class_Vector3>` axis **)** |const| +:ref:`float<class_float>` **signed_angle_to**\ (\ to\: :ref:`Vector3<class_Vector3>`, axis\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_signed_angle_to>` Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the ``axis``. @@ -962,7 +1042,7 @@ Returns the signed angle to the given vector, in radians. The sign of the angle .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **slerp** **(** :ref:`Vector3<class_Vector3>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector3<class_Vector3>` **slerp**\ (\ to\: :ref:`Vector3<class_Vector3>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_slerp>` Returns the result of spherical linear interpolation between this vector and ``to``, by amount ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -976,9 +1056,11 @@ This method also handles interpolating the lengths if the input vectors have dif .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **slide** **(** :ref:`Vector3<class_Vector3>` n **)** |const| +:ref:`Vector3<class_Vector3>` **slide**\ (\ n\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_slide>` + +Returns a new vector resulting from sliding this vector along a plane with normal ``n``. The resulting new vector is perpendicular to ``n``, and is equivalent to this vector minus its projection on ``n``. See also :ref:`project<class_Vector3_method_project>`. -Returns a new vector slid along a plane defined by the given normal. +\ **Note:** The vector ``n`` must be normalized. See also :ref:`normalized<class_Vector3_method_normalized>`. .. rst-class:: classref-item-separator @@ -988,10 +1070,22 @@ Returns a new vector slid along a plane defined by the given normal. .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **snapped** **(** :ref:`Vector3<class_Vector3>` step **)** |const| +:ref:`Vector3<class_Vector3>` **snapped**\ (\ step\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_Vector3_method_snapped>` Returns a new vector with each component snapped to the nearest multiple of the corresponding component in ``step``. This can also be used to round the components to an arbitrary number of decimals. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3_method_snappedf: + +.. rst-class:: classref-method + +:ref:`Vector3<class_Vector3>` **snappedf**\ (\ step\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector3_method_snappedf>` + +Returns a new vector with each component snapped to the nearest multiple of ``step``. This can also be used to round the components to an arbitrary number of decimals. + .. rst-class:: classref-section-separator ---- @@ -1005,7 +1099,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_neq_Vector3>` Returns ``true`` if the vectors are not equal. @@ -1021,9 +1115,13 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Basis<class_Basis>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Basis<class_Basis>`\ ) :ref:`🔗<class_Vector3_operator_mul_Basis>` + +Inversely transforms (multiplies) the **Vector3** by the given :ref:`Basis<class_Basis>` matrix, under the assumption that the basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -Inversely transforms (multiplies) the **Vector3** by the given :ref:`Basis<class_Basis>` matrix. +\ ``vector * basis`` is equivalent to ``basis.transposed() * vector``. See :ref:`Basis.transposed<class_Basis_method_transposed>`. + +For transforming by inverse of a non-orthonormal basis (e.g. with scaling) ``basis.inverse() * vector`` can be used instead. See :ref:`Basis.inverse<class_Basis_method_inverse>`. .. rst-class:: classref-item-separator @@ -1033,10 +1131,12 @@ Inversely transforms (multiplies) the **Vector3** by the given :ref:`Basis<class .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Quaternion<class_Quaternion>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Quaternion<class_Quaternion>`\ ) :ref:`🔗<class_Vector3_operator_mul_Quaternion>` Inversely transforms (multiplies) the **Vector3** by the given :ref:`Quaternion<class_Quaternion>`. +\ ``vector * quaternion`` is equivalent to ``quaternion.inverse() * vector``. See :ref:`Quaternion.inverse<class_Quaternion_method_inverse>`. + .. rst-class:: classref-item-separator ---- @@ -1045,9 +1145,13 @@ Inversely transforms (multiplies) the **Vector3** by the given :ref:`Quaternion< .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Transform3D<class_Transform3D>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_Vector3_operator_mul_Transform3D>` + +Inversely transforms (multiplies) the **Vector3** by the given :ref:`Transform3D<class_Transform3D>` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). + +\ ``vector * transform`` is equivalent to ``transform.inverse() * vector``. See :ref:`Transform3D.inverse<class_Transform3D_method_inverse>`. -Inversely transforms (multiplies) the **Vector3** by the given :ref:`Transform3D<class_Transform3D>` transformation matrix. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * vector`` can be used instead. See :ref:`Transform3D.affine_inverse<class_Transform3D_method_affine_inverse>`. .. rst-class:: classref-item-separator @@ -1057,7 +1161,7 @@ Inversely transforms (multiplies) the **Vector3** by the given :ref:`Transform3D .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_mul_Vector3>` Multiplies each component of the **Vector3** by the components of the given **Vector3**. @@ -1073,7 +1177,7 @@ Multiplies each component of the **Vector3** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector3_operator_mul_float>` Multiplies each component of the **Vector3** by the given :ref:`float<class_float>`. @@ -1085,7 +1189,7 @@ Multiplies each component of the **Vector3** by the given :ref:`float<class_floa .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3_operator_mul_int>` Multiplies each component of the **Vector3** by the given :ref:`int<class_int>`. @@ -1097,7 +1201,7 @@ Multiplies each component of the **Vector3** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator +** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator +**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_sum_Vector3>` Adds each component of the **Vector3** by the components of the given **Vector3**. @@ -1113,7 +1217,7 @@ Adds each component of the **Vector3** by the components of the given **Vector3* .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator -** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator -**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_dif_Vector3>` Subtracts each component of the **Vector3** by the components of the given **Vector3**. @@ -1129,7 +1233,7 @@ Subtracts each component of the **Vector3** by the components of the given **Vec .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator /** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`Vector3<class_Vector3>` **operator /**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_div_Vector3>` Divides each component of the **Vector3** by the components of the given **Vector3**. @@ -1145,7 +1249,7 @@ Divides each component of the **Vector3** by the components of the given **Vecto .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector3<class_Vector3>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector3_operator_div_float>` Divides each component of the **Vector3** by the given :ref:`float<class_float>`. @@ -1157,7 +1261,7 @@ Divides each component of the **Vector3** by the given :ref:`float<class_float>` .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector3<class_Vector3>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3_operator_div_int>` Divides each component of the **Vector3** by the given :ref:`int<class_int>`. @@ -1169,7 +1273,7 @@ Divides each component of the **Vector3** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_lt_Vector3>` Compares two **Vector3** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -1183,7 +1287,7 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_lte_Vector3>` Compares two **Vector3** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -1197,7 +1301,7 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_eq_Vector3>` Returns ``true`` if the vectors are exactly equal. @@ -1213,7 +1317,7 @@ Returns ``true`` if the vectors are exactly equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_gt_Vector3>` Compares two **Vector3** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -1227,7 +1331,7 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector3<class_Vector3>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Vector3_operator_gte_Vector3>` Compares two **Vector3** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -1241,7 +1345,7 @@ Compares two **Vector3** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. @@ -1253,7 +1357,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator unary+** **(** **)** +:ref:`Vector3<class_Vector3>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector3_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -1265,7 +1369,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator unary-** **(** **)** +:ref:`Vector3<class_Vector3>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector3_operator_unminus>` Returns the negative value of the **Vector3**. This is the same as writing ``Vector3(-v.x, -v.y, -v.z)``. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative. @@ -1276,3 +1380,4 @@ Returns the negative value of the **Vector3**. This is the same as writing ``Vec .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector3i.rst b/classes/class_vector3i.rst index f34f4a28746..51271258b43 100644 --- a/classes/class_vector3i.rst +++ b/classes/class_vector3i.rst @@ -58,15 +58,15 @@ Constructors .. table:: :widths: auto - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>` **(** **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` from **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>` **(** :ref:`Vector3<class_Vector3>` from **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` z **)** | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>`\ (\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>`\ (\ from\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>`\ (\ from\: :ref:`Vector3<class_Vector3>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`Vector3i<class_Vector3i_constructor_Vector3i>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, z\: :ref:`int<class_int>`\ ) | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -76,23 +76,39 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`abs<class_Vector3i_method_abs>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`clamp<class_Vector3i_method_clamp>` **(** :ref:`Vector3i<class_Vector3i>` min, :ref:`Vector3i<class_Vector3i>` max **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector3i_method_length>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`length_squared<class_Vector3i_method_length_squared>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector3i_method_max_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector3i_method_min_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`sign<class_Vector3i_method_sign>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`snapped<class_Vector3i_method_snapped>` **(** :ref:`Vector3i<class_Vector3i>` step **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`abs<class_Vector3i_method_abs>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`clamp<class_Vector3i_method_clamp>`\ (\ min\: :ref:`Vector3i<class_Vector3i>`, max\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`clampi<class_Vector3i_method_clampi>`\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`distance_squared_to<class_Vector3i_method_distance_squared_to>`\ (\ to\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector3i_method_distance_to>`\ (\ to\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector3i_method_length>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`length_squared<class_Vector3i_method_length_squared>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`max<class_Vector3i_method_max>`\ (\ with\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector3i_method_max_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`maxi<class_Vector3i_method_maxi>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`min<class_Vector3i_method_min>`\ (\ with\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector3i_method_min_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`mini<class_Vector3i_method_mini>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`sign<class_Vector3i_method_sign>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`snapped<class_Vector3i_method_snapped>`\ (\ step\: :ref:`Vector3i<class_Vector3i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`snappedi<class_Vector3i_method_snappedi>`\ (\ step\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -102,45 +118,45 @@ Operators .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector3i_operator_neq_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator %<class_Vector3i_operator_mod_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator %<class_Vector3i_operator_mod_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_Vector3i_operator_mul_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3i_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_Vector3i_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator +<class_Vector3i_operator_sum_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator -<class_Vector3i_operator_dif_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator /<class_Vector3i_operator_div_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3i_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator /<class_Vector3i_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector3i_operator_lt_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector3i_operator_lte_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector3i_operator_eq_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector3i_operator_gt_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector3i_operator_gte_Vector3i>` **(** :ref:`Vector3i<class_Vector3i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_Vector3i_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator unary+<class_Vector3i_operator_unplus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i<class_Vector3i>` | :ref:`operator unary-<class_Vector3i_operator_unminus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector3i_operator_neq_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator %<class_Vector3i_operator_mod_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator %<class_Vector3i_operator_mod_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_Vector3i_operator_mul_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator *<class_Vector3i_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator *<class_Vector3i_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator +<class_Vector3i_operator_sum_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator -<class_Vector3i_operator_dif_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator /<class_Vector3i_operator_div_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`operator /<class_Vector3i_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator /<class_Vector3i_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector3i_operator_lt_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector3i_operator_lte_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector3i_operator_eq_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector3i_operator_gt_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector3i_operator_gte_Vector3i>`\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_Vector3i_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator unary+<class_Vector3i_operator_unplus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i<class_Vector3i>` | :ref:`operator unary-<class_Vector3i_operator_unminus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,7 +171,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector3i_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector3i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3i_method_min_axis_index>`. @@ -163,7 +179,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector3i .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector3i_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector3i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3i_method_min_axis_index>`. @@ -171,7 +187,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector3i .. rst-class:: classref-constant -**AXIS_Z** = ``2`` +**AXIS_Z** = ``2`` :ref:`🔗<class_Vector3i_constant_AXIS_Z>` Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector3i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector3i_method_min_axis_index>`. @@ -179,7 +195,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector3i .. rst-class:: classref-constant -**ZERO** = ``Vector3i(0, 0, 0)`` +**ZERO** = ``Vector3i(0, 0, 0)`` :ref:`🔗<class_Vector3i_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -187,15 +203,31 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector3i(1, 1, 1)`` +**ONE** = ``Vector3i(1, 1, 1)`` :ref:`🔗<class_Vector3i_constant_ONE>` One vector, a vector with all components set to ``1``. +.. _class_Vector3i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector3i(-2147483648, -2147483648, -2147483648)`` :ref:`🔗<class_Vector3i_constant_MIN>` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector3.INF<class_Vector3_constant_INF>`. + +.. _class_Vector3i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector3i(2147483647, 2147483647, 2147483647)`` :ref:`🔗<class_Vector3i_constant_MAX>` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector3.INF<class_Vector3_constant_INF>`. + .. _class_Vector3i_constant_LEFT: .. rst-class:: classref-constant -**LEFT** = ``Vector3i(-1, 0, 0)`` +**LEFT** = ``Vector3i(-1, 0, 0)`` :ref:`🔗<class_Vector3i_constant_LEFT>` Left unit vector. Represents the local direction of left, and the global direction of west. @@ -203,7 +235,7 @@ Left unit vector. Represents the local direction of left, and the global directi .. rst-class:: classref-constant -**RIGHT** = ``Vector3i(1, 0, 0)`` +**RIGHT** = ``Vector3i(1, 0, 0)`` :ref:`🔗<class_Vector3i_constant_RIGHT>` Right unit vector. Represents the local direction of right, and the global direction of east. @@ -211,7 +243,7 @@ Right unit vector. Represents the local direction of right, and the global direc .. rst-class:: classref-constant -**UP** = ``Vector3i(0, 1, 0)`` +**UP** = ``Vector3i(0, 1, 0)`` :ref:`🔗<class_Vector3i_constant_UP>` Up unit vector. @@ -219,7 +251,7 @@ Up unit vector. .. rst-class:: classref-constant -**DOWN** = ``Vector3i(0, -1, 0)`` +**DOWN** = ``Vector3i(0, -1, 0)`` :ref:`🔗<class_Vector3i_constant_DOWN>` Down unit vector. @@ -227,7 +259,7 @@ Down unit vector. .. rst-class:: classref-constant -**FORWARD** = ``Vector3i(0, 0, -1)`` +**FORWARD** = ``Vector3i(0, 0, -1)`` :ref:`🔗<class_Vector3i_constant_FORWARD>` Forward unit vector. Represents the local direction of forward, and the global direction of north. @@ -235,7 +267,7 @@ Forward unit vector. Represents the local direction of forward, and the global d .. rst-class:: classref-constant -**BACK** = ``Vector3i(0, 0, 1)`` +**BACK** = ``Vector3i(0, 0, 1)`` :ref:`🔗<class_Vector3i_constant_BACK>` Back unit vector. Represents the local direction of back, and the global direction of south. @@ -252,7 +284,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **x** = ``0`` +:ref:`int<class_int>` **x** = ``0`` :ref:`🔗<class_Vector3i_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -264,7 +296,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`int<class_int>` **y** = ``0`` +:ref:`int<class_int>` **y** = ``0`` :ref:`🔗<class_Vector3i_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -276,7 +308,7 @@ The vector's Y component. Also accessible by using the index position ``[1]``. .. rst-class:: classref-property -:ref:`int<class_int>` **z** = ``0`` +:ref:`int<class_int>` **z** = ``0`` :ref:`🔗<class_Vector3i_property_z>` The vector's Z component. Also accessible by using the index position ``[2]``. @@ -293,7 +325,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector3i<class_Vector3i>` **Vector3i** **(** **)** +:ref:`Vector3i<class_Vector3i>` **Vector3i**\ (\ ) :ref:`🔗<class_Vector3i_constructor_Vector3i>` Constructs a default-initialized **Vector3i** with all components set to ``0``. @@ -303,7 +335,7 @@ Constructs a default-initialized **Vector3i** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector3i<class_Vector3i>` **Vector3i** **(** :ref:`Vector3i<class_Vector3i>` from **)** +:ref:`Vector3i<class_Vector3i>` **Vector3i**\ (\ from\: :ref:`Vector3i<class_Vector3i>`\ ) Constructs a **Vector3i** as a copy of the given **Vector3i**. @@ -313,7 +345,7 @@ Constructs a **Vector3i** as a copy of the given **Vector3i**. .. rst-class:: classref-constructor -:ref:`Vector3i<class_Vector3i>` **Vector3i** **(** :ref:`Vector3<class_Vector3>` from **)** +:ref:`Vector3i<class_Vector3i>` **Vector3i**\ (\ from\: :ref:`Vector3<class_Vector3>`\ ) Constructs a new **Vector3i** from the given :ref:`Vector3<class_Vector3>` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector3.ceil<class_Vector3_method_ceil>`, :ref:`Vector3.floor<class_Vector3_method_floor>` or :ref:`Vector3.round<class_Vector3_method_round>` to this constructor instead. @@ -323,7 +355,7 @@ Constructs a new **Vector3i** from the given :ref:`Vector3<class_Vector3>` by tr .. rst-class:: classref-constructor -:ref:`Vector3i<class_Vector3i>` **Vector3i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` z **)** +:ref:`Vector3i<class_Vector3i>` **Vector3i**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, z\: :ref:`int<class_int>`\ ) Returns a **Vector3i** with the given components. @@ -340,7 +372,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **abs** **(** **)** |const| +:ref:`Vector3i<class_Vector3i>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -352,7 +384,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **clamp** **(** :ref:`Vector3i<class_Vector3i>` min, :ref:`Vector3i<class_Vector3i>` max **)** |const| +:ref:`Vector3i<class_Vector3i>` **clamp**\ (\ min\: :ref:`Vector3i<class_Vector3i>`, max\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -360,11 +392,49 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector3i_method_clampi: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **clampi**\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector3i_method_clampi>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_method_distance_squared_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **distance_squared_to**\ (\ to\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_distance_squared_to>` + +Returns the squared distance between this vector and ``to``. + +This method runs faster than :ref:`distance_to<class_Vector3i_method_distance_to>`, so prefer it if you need to compare vectors or need the squared distance for some formula. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_method_distance_to: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_distance_to>` + +Returns the distance between this vector and ``to``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3i_method_length: .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_length>` Returns the length (magnitude) of this vector. @@ -376,7 +446,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`int<class_int>` **length_squared** **(** **)** |const| +:ref:`int<class_int>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -386,11 +456,23 @@ This method runs faster than :ref:`length<class_Vector3i_method_length>`, so pre ---- +.. _class_Vector3i_method_max: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **max**\ (\ with\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector3i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3i_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector3i_constant_AXIS_X>`. @@ -398,11 +480,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector3i_method_maxi: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **maxi**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector3i_method_maxi>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector3i(maxi(x, with), maxi(y, with), maxi(z, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_method_min: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **min**\ (\ with\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3i(mini(x, with.x), mini(y, with.y), mini(z, with.z))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3i_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Z<class_Vector3i_constant_AXIS_Z>`. @@ -410,11 +516,23 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector3i_method_mini: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **mini**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector3i_method_mini>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector3i(mini(x, with), mini(y, with), mini(z, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector3i_method_sign: .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **sign** **(** **)** |const| +:ref:`Vector3i<class_Vector3i>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector3i_method_sign>` Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -426,10 +544,22 @@ Returns a new vector with each component set to ``1`` if it's positive, ``-1`` i .. rst-class:: classref-method -:ref:`Vector3i<class_Vector3i>` **snapped** **(** :ref:`Vector3i<class_Vector3i>` step **)** |const| +:ref:`Vector3i<class_Vector3i>` **snapped**\ (\ step\: :ref:`Vector3i<class_Vector3i>`\ ) |const| :ref:`🔗<class_Vector3i_method_snapped>` Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector3i_method_snappedi: + +.. rst-class:: classref-method + +:ref:`Vector3i<class_Vector3i>` **snappedi**\ (\ step\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector3i_method_snappedi>` + +Returns a new vector with each component snapped to the closest multiple of ``step``. + .. rst-class:: classref-section-separator ---- @@ -443,7 +573,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_neq_Vector3i>` Returns ``true`` if the vectors are not equal. @@ -455,7 +585,7 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator %** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator %**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_mod_Vector3i>` Gets the remainder of each component of the **Vector3i** with the components of the given **Vector3i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -471,7 +601,7 @@ Gets the remainder of each component of the **Vector3i** with the components of .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator %** **(** :ref:`int<class_int>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator %**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3i_operator_mod_int>` Gets the remainder of each component of the **Vector3i** with the given :ref:`int<class_int>`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -487,7 +617,7 @@ Gets the remainder of each component of the **Vector3i** with the given :ref:`in .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator *** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator ***\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_mul_Vector3i>` Multiplies each component of the **Vector3i** by the components of the given **Vector3i**. @@ -503,7 +633,7 @@ Multiplies each component of the **Vector3i** by the components of the given **V .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector3<class_Vector3>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector3i_operator_mul_float>` Multiplies each component of the **Vector3i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector3<class_Vector3>`. @@ -519,7 +649,7 @@ Multiplies each component of the **Vector3i** by the given :ref:`float<class_flo .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3i_operator_mul_int>` Multiplies each component of the **Vector3i** by the given :ref:`int<class_int>`. @@ -531,7 +661,7 @@ Multiplies each component of the **Vector3i** by the given :ref:`int<class_int>` .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator +** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator +**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_sum_Vector3i>` Adds each component of the **Vector3i** by the components of the given **Vector3i**. @@ -547,7 +677,7 @@ Adds each component of the **Vector3i** by the components of the given **Vector3 .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator -** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator -**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_dif_Vector3i>` Subtracts each component of the **Vector3i** by the components of the given **Vector3i**. @@ -563,7 +693,7 @@ Subtracts each component of the **Vector3i** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator /** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator /**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_div_Vector3i>` Divides each component of the **Vector3i** by the components of the given **Vector3i**. @@ -579,7 +709,7 @@ Divides each component of the **Vector3i** by the components of the given **Vect .. rst-class:: classref-operator -:ref:`Vector3<class_Vector3>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector3<class_Vector3>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector3i_operator_div_float>` Divides each component of the **Vector3i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector3<class_Vector3>`. @@ -595,7 +725,7 @@ Divides each component of the **Vector3i** by the given :ref:`float<class_float> .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector3i<class_Vector3i>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3i_operator_div_int>` Divides each component of the **Vector3i** by the given :ref:`int<class_int>`. @@ -607,7 +737,7 @@ Divides each component of the **Vector3i** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_lt_Vector3i>` Compares two **Vector3i** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -619,7 +749,7 @@ Compares two **Vector3i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_lte_Vector3i>` Compares two **Vector3i** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -631,7 +761,7 @@ Compares two **Vector3i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_eq_Vector3i>` Returns ``true`` if the vectors are equal. @@ -643,7 +773,7 @@ Returns ``true`` if the vectors are equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_gt_Vector3i>` Compares two **Vector3i** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -655,7 +785,7 @@ Compares two **Vector3i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector3i<class_Vector3i>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_Vector3i_operator_gte_Vector3i>` Compares two **Vector3i** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors. @@ -667,7 +797,7 @@ Compares two **Vector3i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector3i_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, and ``v[2]`` is equivalent to ``v.z``. @@ -679,7 +809,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator unary+** **(** **)** +:ref:`Vector3i<class_Vector3i>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector3i_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -691,7 +821,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector3i<class_Vector3i>` **operator unary-** **(** **)** +:ref:`Vector3i<class_Vector3i>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector3i_operator_unminus>` Returns the negative value of the **Vector3i**. This is the same as writing ``Vector3i(-v.x, -v.y, -v.z)``. This operation flips the direction of the vector while keeping the same magnitude. @@ -702,3 +832,4 @@ Returns the negative value of the **Vector3i**. This is the same as writing ``Ve .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector4.rst b/classes/class_vector4.rst index 63e4537a239..4b9e7cc3418 100644 --- a/classes/class_vector4.rst +++ b/classes/class_vector4.rst @@ -10,7 +10,7 @@ Vector4 ======= -A 4D vector using floating point coordinates. +A 4D vector using floating-point coordinates. .. rst-class:: classref-introduction-group @@ -51,15 +51,15 @@ Constructors .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>` **(** :ref:`Vector4<class_Vector4>` from **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>` **(** :ref:`Vector4i<class_Vector4i>` from **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z, :ref:`float<class_float>` w **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>`\ (\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>`\ (\ from\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>`\ (\ from\: :ref:`Vector4i<class_Vector4i>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`Vector4<class_Vector4_constructor_Vector4>`\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`, w\: :ref:`float<class_float>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -69,59 +69,71 @@ Methods .. table:: :widths: auto - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`abs<class_Vector4_method_abs>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`ceil<class_Vector4_method_ceil>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`clamp<class_Vector4_method_clamp>` **(** :ref:`Vector4<class_Vector4>` min, :ref:`Vector4<class_Vector4>` max **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`cubic_interpolate<class_Vector4_method_cubic_interpolate>` **(** :ref:`Vector4<class_Vector4>` b, :ref:`Vector4<class_Vector4>` pre_a, :ref:`Vector4<class_Vector4>` post_b, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`cubic_interpolate_in_time<class_Vector4_method_cubic_interpolate_in_time>` **(** :ref:`Vector4<class_Vector4>` b, :ref:`Vector4<class_Vector4>` pre_a, :ref:`Vector4<class_Vector4>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`direction_to<class_Vector4_method_direction_to>` **(** :ref:`Vector4<class_Vector4>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector4_method_distance_squared_to>` **(** :ref:`Vector4<class_Vector4>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`distance_to<class_Vector4_method_distance_to>` **(** :ref:`Vector4<class_Vector4>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`dot<class_Vector4_method_dot>` **(** :ref:`Vector4<class_Vector4>` with **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`floor<class_Vector4_method_floor>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`inverse<class_Vector4_method_inverse>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector4_method_is_equal_approx>` **(** :ref:`Vector4<class_Vector4>` to **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector4_method_is_finite>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector4_method_is_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector4_method_is_zero_approx>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector4_method_length>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length_squared<class_Vector4_method_length_squared>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`lerp<class_Vector4_method_lerp>` **(** :ref:`Vector4<class_Vector4>` to, :ref:`float<class_float>` weight **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector4_method_max_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector4_method_min_axis_index>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`normalized<class_Vector4_method_normalized>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`posmod<class_Vector4_method_posmod>` **(** :ref:`float<class_float>` mod **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`posmodv<class_Vector4_method_posmodv>` **(** :ref:`Vector4<class_Vector4>` modv **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`round<class_Vector4_method_round>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`sign<class_Vector4_method_sign>` **(** **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`snapped<class_Vector4_method_snapped>` **(** :ref:`Vector4<class_Vector4>` step **)** |const| | - +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`abs<class_Vector4_method_abs>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`ceil<class_Vector4_method_ceil>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`clamp<class_Vector4_method_clamp>`\ (\ min\: :ref:`Vector4<class_Vector4>`, max\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`clampf<class_Vector4_method_clampf>`\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`cubic_interpolate<class_Vector4_method_cubic_interpolate>`\ (\ b\: :ref:`Vector4<class_Vector4>`, pre_a\: :ref:`Vector4<class_Vector4>`, post_b\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`cubic_interpolate_in_time<class_Vector4_method_cubic_interpolate_in_time>`\ (\ b\: :ref:`Vector4<class_Vector4>`, pre_a\: :ref:`Vector4<class_Vector4>`, post_b\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`direction_to<class_Vector4_method_direction_to>`\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_squared_to<class_Vector4_method_distance_squared_to>`\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector4_method_distance_to>`\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`dot<class_Vector4_method_dot>`\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`floor<class_Vector4_method_floor>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`inverse<class_Vector4_method_inverse>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_equal_approx<class_Vector4_method_is_equal_approx>`\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_finite<class_Vector4_method_is_finite>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_normalized<class_Vector4_method_is_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_zero_approx<class_Vector4_method_is_zero_approx>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector4_method_length>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length_squared<class_Vector4_method_length_squared>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`lerp<class_Vector4_method_lerp>`\ (\ to\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`max<class_Vector4_method_max>`\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector4_method_max_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`maxf<class_Vector4_method_maxf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`min<class_Vector4_method_min>`\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector4_method_min_axis_index>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`minf<class_Vector4_method_minf>`\ (\ with\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`normalized<class_Vector4_method_normalized>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`posmod<class_Vector4_method_posmod>`\ (\ mod\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`posmodv<class_Vector4_method_posmodv>`\ (\ modv\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`round<class_Vector4_method_round>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`sign<class_Vector4_method_sign>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`snapped<class_Vector4_method_snapped>`\ (\ step\: :ref:`Vector4<class_Vector4>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`snappedf<class_Vector4_method_snappedf>`\ (\ step\: :ref:`float<class_float>`\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -131,43 +143,43 @@ Operators .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector4_operator_neq_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_Projection>` **(** :ref:`Projection<class_Projection>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator +<class_Vector4_operator_sum_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator -<class_Vector4_operator_dif_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector4_operator_lt_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector4_operator_lte_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector4_operator_eq_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector4_operator_gt_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector4_operator_gte_Vector4>` **(** :ref:`Vector4<class_Vector4>` right **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`operator []<class_Vector4_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator unary+<class_Vector4_operator_unplus>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator unary-<class_Vector4_operator_unminus>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector4_operator_neq_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_Projection>`\ (\ right\: :ref:`Projection<class_Projection>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator +<class_Vector4_operator_sum_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator -<class_Vector4_operator_dif_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector4_operator_lt_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector4_operator_lte_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector4_operator_eq_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector4_operator_gt_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector4_operator_gte_Vector4>`\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`operator []<class_Vector4_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator unary+<class_Vector4_operator_unplus>`\ (\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator unary-<class_Vector4_operator_unminus>`\ (\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -182,7 +194,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector4_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector4_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4_method_min_axis_index>`. @@ -190,7 +202,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector4_ .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector4_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector4_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4_method_min_axis_index>`. @@ -198,7 +210,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector4_ .. rst-class:: classref-constant -**AXIS_Z** = ``2`` +**AXIS_Z** = ``2`` :ref:`🔗<class_Vector4_constant_AXIS_Z>` Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector4_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4_method_min_axis_index>`. @@ -206,7 +218,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector4_ .. rst-class:: classref-constant -**AXIS_W** = ``3`` +**AXIS_W** = ``3`` :ref:`🔗<class_Vector4_constant_AXIS_W>` Enumerated value for the W axis. Returned by :ref:`max_axis_index<class_Vector4_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4_method_min_axis_index>`. @@ -214,7 +226,7 @@ Enumerated value for the W axis. Returned by :ref:`max_axis_index<class_Vector4_ .. rst-class:: classref-constant -**ZERO** = ``Vector4(0, 0, 0, 0)`` +**ZERO** = ``Vector4(0, 0, 0, 0)`` :ref:`🔗<class_Vector4_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -222,7 +234,7 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector4(1, 1, 1, 1)`` +**ONE** = ``Vector4(1, 1, 1, 1)`` :ref:`🔗<class_Vector4_constant_ONE>` One vector, a vector with all components set to ``1``. @@ -230,7 +242,7 @@ One vector, a vector with all components set to ``1``. .. rst-class:: classref-constant -**INF** = ``Vector4(inf, inf, inf, inf)`` +**INF** = ``Vector4(inf, inf, inf, inf)`` :ref:`🔗<class_Vector4_constant_INF>` Infinity vector, a vector with all components set to :ref:`@GDScript.INF<class_@GDScript_constant_INF>`. @@ -247,7 +259,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **w** = ``0.0`` +:ref:`float<class_float>` **w** = ``0.0`` :ref:`🔗<class_Vector4_property_w>` The vector's W component. Also accessible by using the index position ``[3]``. @@ -259,7 +271,7 @@ The vector's W component. Also accessible by using the index position ``[3]``. .. rst-class:: classref-property -:ref:`float<class_float>` **x** = ``0.0`` +:ref:`float<class_float>` **x** = ``0.0`` :ref:`🔗<class_Vector4_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -271,7 +283,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`float<class_float>` **y** = ``0.0`` +:ref:`float<class_float>` **y** = ``0.0`` :ref:`🔗<class_Vector4_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -283,7 +295,7 @@ The vector's Y component. Also accessible by using the index position ``[1]``. .. rst-class:: classref-property -:ref:`float<class_float>` **z** = ``0.0`` +:ref:`float<class_float>` **z** = ``0.0`` :ref:`🔗<class_Vector4_property_z>` The vector's Z component. Also accessible by using the index position ``[2]``. @@ -300,7 +312,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector4<class_Vector4>` **Vector4** **(** **)** +:ref:`Vector4<class_Vector4>` **Vector4**\ (\ ) :ref:`🔗<class_Vector4_constructor_Vector4>` Constructs a default-initialized **Vector4** with all components set to ``0``. @@ -310,7 +322,7 @@ Constructs a default-initialized **Vector4** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector4<class_Vector4>` **Vector4** **(** :ref:`Vector4<class_Vector4>` from **)** +:ref:`Vector4<class_Vector4>` **Vector4**\ (\ from\: :ref:`Vector4<class_Vector4>`\ ) Constructs a **Vector4** as a copy of the given **Vector4**. @@ -320,7 +332,7 @@ Constructs a **Vector4** as a copy of the given **Vector4**. .. rst-class:: classref-constructor -:ref:`Vector4<class_Vector4>` **Vector4** **(** :ref:`Vector4i<class_Vector4i>` from **)** +:ref:`Vector4<class_Vector4>` **Vector4**\ (\ from\: :ref:`Vector4i<class_Vector4i>`\ ) Constructs a new **Vector4** from the given :ref:`Vector4i<class_Vector4i>`. @@ -330,7 +342,7 @@ Constructs a new **Vector4** from the given :ref:`Vector4i<class_Vector4i>`. .. rst-class:: classref-constructor -:ref:`Vector4<class_Vector4>` **Vector4** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z, :ref:`float<class_float>` w **)** +:ref:`Vector4<class_Vector4>` **Vector4**\ (\ x\: :ref:`float<class_float>`, y\: :ref:`float<class_float>`, z\: :ref:`float<class_float>`, w\: :ref:`float<class_float>`\ ) Returns a **Vector4** with the given components. @@ -347,7 +359,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **abs** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector4_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -359,7 +371,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **ceil** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **ceil**\ (\ ) |const| :ref:`🔗<class_Vector4_method_ceil>` Returns a new vector with all components rounded up (towards positive infinity). @@ -371,7 +383,7 @@ Returns a new vector with all components rounded up (towards positive infinity). .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **clamp** **(** :ref:`Vector4<class_Vector4>` min, :ref:`Vector4<class_Vector4>` max **)** |const| +:ref:`Vector4<class_Vector4>` **clamp**\ (\ min\: :ref:`Vector4<class_Vector4>`, max\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -379,11 +391,23 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector4_method_clampf: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **clampf**\ (\ min\: :ref:`float<class_float>`, max\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_clampf>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4_method_cubic_interpolate: .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **cubic_interpolate** **(** :ref:`Vector4<class_Vector4>` b, :ref:`Vector4<class_Vector4>` pre_a, :ref:`Vector4<class_Vector4>` post_b, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector4<class_Vector4>` **cubic_interpolate**\ (\ b\: :ref:`Vector4<class_Vector4>`, pre_a\: :ref:`Vector4<class_Vector4>`, post_b\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_cubic_interpolate>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. @@ -395,11 +419,11 @@ Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **cubic_interpolate_in_time** **(** :ref:`Vector4<class_Vector4>` b, :ref:`Vector4<class_Vector4>` pre_a, :ref:`Vector4<class_Vector4>` post_b, :ref:`float<class_float>` weight, :ref:`float<class_float>` b_t, :ref:`float<class_float>` pre_a_t, :ref:`float<class_float>` post_b_t **)** |const| +:ref:`Vector4<class_Vector4>` **cubic_interpolate_in_time**\ (\ b\: :ref:`Vector4<class_Vector4>`, pre_a\: :ref:`Vector4<class_Vector4>`, post_b\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`, b_t\: :ref:`float<class_float>`, pre_a_t\: :ref:`float<class_float>`, post_b_t\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_cubic_interpolate_in_time>` Performs a cubic interpolation between this vector and ``b`` using ``pre_a`` and ``post_b`` as handles, and returns the result at position ``weight``. ``weight`` is on the range of 0.0 to 1.0, representing the amount of interpolation. -It can perform smoother interpolation than ``cubic_interpolate()`` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate<class_Vector4_method_cubic_interpolate>` by the time values. .. rst-class:: classref-item-separator @@ -409,7 +433,7 @@ It can perform smoother interpolation than ``cubic_interpolate()`` by the time v .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **direction_to** **(** :ref:`Vector4<class_Vector4>` to **)** |const| +:ref:`Vector4<class_Vector4>` **direction_to**\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_direction_to>` Returns the normalized vector pointing from this vector to ``to``. This is equivalent to using ``(b - a).normalized()``. @@ -421,7 +445,7 @@ Returns the normalized vector pointing from this vector to ``to``. This is equiv .. rst-class:: classref-method -:ref:`float<class_float>` **distance_squared_to** **(** :ref:`Vector4<class_Vector4>` to **)** |const| +:ref:`float<class_float>` **distance_squared_to**\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_distance_squared_to>` Returns the squared distance between this vector and ``to``. @@ -435,7 +459,7 @@ This method runs faster than :ref:`distance_to<class_Vector4_method_distance_to> .. rst-class:: classref-method -:ref:`float<class_float>` **distance_to** **(** :ref:`Vector4<class_Vector4>` to **)** |const| +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_distance_to>` Returns the distance between this vector and ``to``. @@ -447,7 +471,7 @@ Returns the distance between this vector and ``to``. .. rst-class:: classref-method -:ref:`float<class_float>` **dot** **(** :ref:`Vector4<class_Vector4>` with **)** |const| +:ref:`float<class_float>` **dot**\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_dot>` Returns the dot product of this vector and ``with``. @@ -459,7 +483,7 @@ Returns the dot product of this vector and ``with``. .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **floor** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **floor**\ (\ ) |const| :ref:`🔗<class_Vector4_method_floor>` Returns a new vector with all components rounded down (towards negative infinity). @@ -471,7 +495,7 @@ Returns a new vector with all components rounded down (towards negative infinity .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **inverse** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **inverse**\ (\ ) |const| :ref:`🔗<class_Vector4_method_inverse>` Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)``. @@ -483,7 +507,7 @@ Returns the inverse of the vector. This is the same as ``Vector4(1.0 / v.x, 1.0 .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_equal_approx** **(** :ref:`Vector4<class_Vector4>` to **)** |const| +:ref:`bool<class_bool>` **is_equal_approx**\ (\ to\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_is_equal_approx>` Returns ``true`` if this vector and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx<class_@GlobalScope_method_is_equal_approx>` on each component. @@ -495,7 +519,7 @@ Returns ``true`` if this vector and ``to`` are approximately equal, by running : .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_finite** **(** **)** |const| +:ref:`bool<class_bool>` **is_finite**\ (\ ) |const| :ref:`🔗<class_Vector4_method_is_finite>` Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_finite<class_@GlobalScope_method_is_finite>` on each component. @@ -507,7 +531,7 @@ Returns ``true`` if this vector is finite, by calling :ref:`@GlobalScope.is_fini .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_normalized** **(** **)** |const| +:ref:`bool<class_bool>` **is_normalized**\ (\ ) |const| :ref:`🔗<class_Vector4_method_is_normalized>` Returns ``true`` if the vector is normalized, i.e. its length is approximately equal to 1. @@ -519,7 +543,7 @@ Returns ``true`` if the vector is normalized, i.e. its length is approximately e .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_zero_approx** **(** **)** |const| +:ref:`bool<class_bool>` **is_zero_approx**\ (\ ) |const| :ref:`🔗<class_Vector4_method_is_zero_approx>` Returns ``true`` if this vector's values are approximately zero, by running :ref:`@GlobalScope.is_zero_approx<class_@GlobalScope_method_is_zero_approx>` on each component. @@ -533,7 +557,7 @@ This method is faster than using :ref:`is_equal_approx<class_Vector4_method_is_e .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector4_method_length>` Returns the length (magnitude) of this vector. @@ -545,7 +569,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`float<class_float>` **length_squared** **(** **)** |const| +:ref:`float<class_float>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector4_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -559,7 +583,7 @@ This method runs faster than :ref:`length<class_Vector4_method_length>`, so pref .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **lerp** **(** :ref:`Vector4<class_Vector4>` to, :ref:`float<class_float>` weight **)** |const| +:ref:`Vector4<class_Vector4>` **lerp**\ (\ to\: :ref:`Vector4<class_Vector4>`, weight\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_lerp>` Returns the result of the linear interpolation between this vector and ``to`` by amount ``weight``. ``weight`` is on the range of ``0.0`` to ``1.0``, representing the amount of interpolation. @@ -567,11 +591,23 @@ Returns the result of the linear interpolation between this vector and ``to`` by ---- +.. _class_Vector4_method_max: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **max**\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector4(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z), maxf(w, with.w))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector4_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector4_constant_AXIS_X>`. @@ -579,11 +615,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector4_method_maxf: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **maxf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_maxf>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector4(maxf(x, with), maxf(y, with), maxf(z, with), maxf(w, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_method_min: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **min**\ (\ with\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4(minf(x, with.x), minf(y, with.y), minf(z, with.z), minf(w, with.w))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector4_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_W<class_Vector4_constant_AXIS_W>`. @@ -591,13 +651,25 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector4_method_minf: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **minf**\ (\ with\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_minf>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4(minf(x, with), minf(y, with), minf(z, with), minf(w, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4_method_normalized: .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **normalized** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **normalized**\ (\ ) |const| :ref:`🔗<class_Vector4_method_normalized>` -Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. See also :ref:`is_normalized<class_Vector4_method_is_normalized>`. +Returns the result of scaling the vector to unit length. Equivalent to ``v / v.length()``. Returns ``(0, 0, 0, 0)`` if ``v.length() == 0``. See also :ref:`is_normalized<class_Vector4_method_is_normalized>`. \ **Note:** This function may return incorrect values if the input vector length is near zero. @@ -609,7 +681,7 @@ Returns the result of scaling the vector to unit length. Equivalent to ``v / v.l .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **posmod** **(** :ref:`float<class_float>` mod **)** |const| +:ref:`Vector4<class_Vector4>` **posmod**\ (\ mod\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_posmod>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``mod``. @@ -621,7 +693,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **posmodv** **(** :ref:`Vector4<class_Vector4>` modv **)** |const| +:ref:`Vector4<class_Vector4>` **posmodv**\ (\ modv\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_posmodv>` Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_method_fposmod>` of this vector's components and ``modv``'s components. @@ -633,7 +705,7 @@ Returns a vector composed of the :ref:`@GlobalScope.fposmod<class_@GlobalScope_m .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **round** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **round**\ (\ ) |const| :ref:`🔗<class_Vector4_method_round>` Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. @@ -645,7 +717,7 @@ Returns a new vector with all components rounded to the nearest integer, with ha .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **sign** **(** **)** |const| +:ref:`Vector4<class_Vector4>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector4_method_sign>` Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0`` if it's negative, and ``0.0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -657,10 +729,22 @@ Returns a new vector with each component set to ``1.0`` if it's positive, ``-1.0 .. rst-class:: classref-method -:ref:`Vector4<class_Vector4>` **snapped** **(** :ref:`Vector4<class_Vector4>` step **)** |const| +:ref:`Vector4<class_Vector4>` **snapped**\ (\ step\: :ref:`Vector4<class_Vector4>`\ ) |const| :ref:`🔗<class_Vector4_method_snapped>` Returns a new vector with each component snapped to the nearest multiple of the corresponding component in ``step``. This can also be used to round the components to an arbitrary number of decimals. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4_method_snappedf: + +.. rst-class:: classref-method + +:ref:`Vector4<class_Vector4>` **snappedf**\ (\ step\: :ref:`float<class_float>`\ ) |const| :ref:`🔗<class_Vector4_method_snappedf>` + +Returns a new vector with each component snapped to the nearest multiple of ``step``. This can also be used to round the components to an arbitrary number of decimals. + .. rst-class:: classref-section-separator ---- @@ -674,7 +758,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_neq_Vector4>` Returns ``true`` if the vectors are not equal. @@ -690,9 +774,11 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Projection<class_Projection>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Projection<class_Projection>`\ ) :ref:`🔗<class_Vector4_operator_mul_Projection>` + +Transforms (multiplies) the **Vector4** by the transpose of the given :ref:`Projection<class_Projection>` matrix. -Inversely transforms (multiplies) the **Vector4** by the given :ref:`Projection<class_Projection>` matrix. +For transforming by inverse of a projection ``projection.inverse() * vector`` can be used instead. See :ref:`Projection.inverse<class_Projection_method_inverse>`. .. rst-class:: classref-item-separator @@ -702,7 +788,7 @@ Inversely transforms (multiplies) the **Vector4** by the given :ref:`Projection< .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_mul_Vector4>` Multiplies each component of the **Vector4** by the components of the given **Vector4**. @@ -718,7 +804,7 @@ Multiplies each component of the **Vector4** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector4_operator_mul_float>` Multiplies each component of the **Vector4** by the given :ref:`float<class_float>`. @@ -734,7 +820,7 @@ Multiplies each component of the **Vector4** by the given :ref:`float<class_floa .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4_operator_mul_int>` Multiplies each component of the **Vector4** by the given :ref:`int<class_int>`. @@ -746,7 +832,7 @@ Multiplies each component of the **Vector4** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator +** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator +**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_sum_Vector4>` Adds each component of the **Vector4** by the components of the given **Vector4**. @@ -762,7 +848,7 @@ Adds each component of the **Vector4** by the components of the given **Vector4* .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator -** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator -**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_dif_Vector4>` Subtracts each component of the **Vector4** by the components of the given **Vector4**. @@ -778,7 +864,7 @@ Subtracts each component of the **Vector4** by the components of the given **Vec .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator /** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`Vector4<class_Vector4>` **operator /**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_div_Vector4>` Divides each component of the **Vector4** by the components of the given **Vector4**. @@ -794,7 +880,7 @@ Divides each component of the **Vector4** by the components of the given **Vecto .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector4<class_Vector4>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector4_operator_div_float>` Divides each component of the **Vector4** by the given :ref:`float<class_float>`. @@ -810,7 +896,7 @@ Divides each component of the **Vector4** by the given :ref:`float<class_float>` .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector4<class_Vector4>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4_operator_div_int>` Divides each component of the **Vector4** by the given :ref:`int<class_int>`. @@ -822,7 +908,7 @@ Divides each component of the **Vector4** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_lt_Vector4>` Compares two **Vector4** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -836,7 +922,7 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_lte_Vector4>` Compares two **Vector4** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -850,7 +936,7 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_eq_Vector4>` Returns ``true`` if the vectors are exactly equal. @@ -866,7 +952,7 @@ Returns ``true`` if the vectors are exactly equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_gt_Vector4>` Compares two **Vector4** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -880,7 +966,7 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector4<class_Vector4>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector4<class_Vector4>`\ ) :ref:`🔗<class_Vector4_operator_gte_Vector4>` Compares two **Vector4** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -894,7 +980,7 @@ Compares two **Vector4** vectors by first checking if the X value of the left ve .. rst-class:: classref-operator -:ref:`float<class_float>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`float<class_float>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, ``v[2]`` is equivalent to ``v.z``, and ``v[3]`` is equivalent to ``v.w``. @@ -906,7 +992,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator unary+** **(** **)** +:ref:`Vector4<class_Vector4>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector4_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -918,7 +1004,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator unary-** **(** **)** +:ref:`Vector4<class_Vector4>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector4_operator_unminus>` Returns the negative value of the **Vector4**. This is the same as writing ``Vector4(-v.x, -v.y, -v.z, -v.w)``. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative. @@ -929,3 +1015,4 @@ Returns the negative value of the **Vector4**. This is the same as writing ``Vec .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vector4i.rst b/classes/class_vector4i.rst index 8d6b7ef8551..87bb06bdca1 100644 --- a/classes/class_vector4i.rst +++ b/classes/class_vector4i.rst @@ -21,7 +21,7 @@ A 4-element structure that can be used to represent 4D grid coordinates or any o It uses integer coordinates and is therefore preferable to :ref:`Vector4<class_Vector4>` when exact precision is required. Note that the values are limited to 32 bits, and unlike :ref:`Vector4<class_Vector4>` this cannot be configured with an engine build option. Use :ref:`int<class_int>` or :ref:`PackedInt64Array<class_PackedInt64Array>` if 64-bit values are needed. -\ **Note:** In a boolean context, a Vector4i will evaluate to ``false`` if it's equal to ``Vector4i(0, 0, 0, 0)``. Otherwise, a Vector3i will always evaluate to ``true``. +\ **Note:** In a boolean context, a Vector4i will evaluate to ``false`` if it's equal to ``Vector4i(0, 0, 0, 0)``. Otherwise, a Vector4i will always evaluate to ``true``. .. rst-class:: classref-reftable-group @@ -49,15 +49,15 @@ Constructors .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>` **(** **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` from **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>` **(** :ref:`Vector4<class_Vector4>` from **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` z, :ref:`int<class_int>` w **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>`\ (\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>`\ (\ from\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>`\ (\ from\: :ref:`Vector4<class_Vector4>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`Vector4i<class_Vector4i_constructor_Vector4i>`\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, z\: :ref:`int<class_int>`, w\: :ref:`int<class_int>`\ ) | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -67,23 +67,39 @@ Methods .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`abs<class_Vector4i_method_abs>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`clamp<class_Vector4i_method_clamp>` **(** :ref:`Vector4i<class_Vector4i>` min, :ref:`Vector4i<class_Vector4i>` max **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`length<class_Vector4i_method_length>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`length_squared<class_Vector4i_method_length_squared>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector4i_method_max_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector4i_method_min_axis_index>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`sign<class_Vector4i_method_sign>` **(** **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`snapped<class_Vector4i_method_snapped>` **(** :ref:`Vector4i<class_Vector4i>` step **)** |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`abs<class_Vector4i_method_abs>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`clamp<class_Vector4i_method_clamp>`\ (\ min\: :ref:`Vector4i<class_Vector4i>`, max\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`clampi<class_Vector4i_method_clampi>`\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`distance_squared_to<class_Vector4i_method_distance_squared_to>`\ (\ to\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`distance_to<class_Vector4i_method_distance_to>`\ (\ to\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`length<class_Vector4i_method_length>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`length_squared<class_Vector4i_method_length_squared>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`max<class_Vector4i_method_max>`\ (\ with\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`max_axis_index<class_Vector4i_method_max_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`maxi<class_Vector4i_method_maxi>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`min<class_Vector4i_method_min>`\ (\ with\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`min_axis_index<class_Vector4i_method_min_axis_index>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`mini<class_Vector4i_method_mini>`\ (\ with\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`sign<class_Vector4i_method_sign>`\ (\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`snapped<class_Vector4i_method_snapped>`\ (\ step\: :ref:`Vector4i<class_Vector4i>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`snappedi<class_Vector4i_method_snappedi>`\ (\ step\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -93,45 +109,45 @@ Operators .. table:: :widths: auto - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector4i_operator_neq_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator %<class_Vector4i_operator_mod_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator %<class_Vector4i_operator_mod_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_Vector4i_operator_mul_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4i_operator_mul_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_Vector4i_operator_mul_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator +<class_Vector4i_operator_sum_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator -<class_Vector4i_operator_dif_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator /<class_Vector4i_operator_div_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4i_operator_div_float>` **(** :ref:`float<class_float>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator /<class_Vector4i_operator_div_int>` **(** :ref:`int<class_int>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector4i_operator_lt_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector4i_operator_lte_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector4i_operator_eq_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector4i_operator_gt_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector4i_operator_gte_Vector4i>` **(** :ref:`Vector4i<class_Vector4i>` right **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`operator []<class_Vector4i_operator_idx_int>` **(** :ref:`int<class_int>` index **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator unary+<class_Vector4i_operator_unplus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector4i<class_Vector4i>` | :ref:`operator unary-<class_Vector4i_operator_unminus>` **(** **)** | - +---------------------------------+-------------------------------------------------------------------------------------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator !=<class_Vector4i_operator_neq_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator %<class_Vector4i_operator_mod_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator %<class_Vector4i_operator_mod_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_Vector4i_operator_mul_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator *<class_Vector4i_operator_mul_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator *<class_Vector4i_operator_mul_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator +<class_Vector4i_operator_sum_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator -<class_Vector4i_operator_dif_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator /<class_Vector4i_operator_div_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4<class_Vector4>` | :ref:`operator /<class_Vector4i_operator_div_float>`\ (\ right\: :ref:`float<class_float>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator /<class_Vector4i_operator_div_int>`\ (\ right\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<<class_Vector4i_operator_lt_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator \<=<class_Vector4i_operator_lte_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ==<class_Vector4i_operator_eq_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator ><class_Vector4i_operator_gt_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`operator >=<class_Vector4i_operator_gte_Vector4i>`\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`operator []<class_Vector4i_operator_idx_int>`\ (\ index\: :ref:`int<class_int>`\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator unary+<class_Vector4i_operator_unplus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ + | :ref:`Vector4i<class_Vector4i>` | :ref:`operator unary-<class_Vector4i_operator_unminus>`\ (\ ) | + +---------------------------------+----------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -146,7 +162,7 @@ Constants .. rst-class:: classref-constant -**AXIS_X** = ``0`` +**AXIS_X** = ``0`` :ref:`🔗<class_Vector4i_constant_AXIS_X>` Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector4i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4i_method_min_axis_index>`. @@ -154,7 +170,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector4i .. rst-class:: classref-constant -**AXIS_Y** = ``1`` +**AXIS_Y** = ``1`` :ref:`🔗<class_Vector4i_constant_AXIS_Y>` Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector4i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4i_method_min_axis_index>`. @@ -162,7 +178,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector4i .. rst-class:: classref-constant -**AXIS_Z** = ``2`` +**AXIS_Z** = ``2`` :ref:`🔗<class_Vector4i_constant_AXIS_Z>` Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector4i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4i_method_min_axis_index>`. @@ -170,7 +186,7 @@ Enumerated value for the Z axis. Returned by :ref:`max_axis_index<class_Vector4i .. rst-class:: classref-constant -**AXIS_W** = ``3`` +**AXIS_W** = ``3`` :ref:`🔗<class_Vector4i_constant_AXIS_W>` Enumerated value for the W axis. Returned by :ref:`max_axis_index<class_Vector4i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector4i_method_min_axis_index>`. @@ -178,7 +194,7 @@ Enumerated value for the W axis. Returned by :ref:`max_axis_index<class_Vector4i .. rst-class:: classref-constant -**ZERO** = ``Vector4i(0, 0, 0, 0)`` +**ZERO** = ``Vector4i(0, 0, 0, 0)`` :ref:`🔗<class_Vector4i_constant_ZERO>` Zero vector, a vector with all components set to ``0``. @@ -186,10 +202,26 @@ Zero vector, a vector with all components set to ``0``. .. rst-class:: classref-constant -**ONE** = ``Vector4i(1, 1, 1, 1)`` +**ONE** = ``Vector4i(1, 1, 1, 1)`` :ref:`🔗<class_Vector4i_constant_ONE>` One vector, a vector with all components set to ``1``. +.. _class_Vector4i_constant_MIN: + +.. rst-class:: classref-constant + +**MIN** = ``Vector4i(-2147483648, -2147483648, -2147483648, -2147483648)`` :ref:`🔗<class_Vector4i_constant_MIN>` + +Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector4.INF<class_Vector4_constant_INF>`. + +.. _class_Vector4i_constant_MAX: + +.. rst-class:: classref-constant + +**MAX** = ``Vector4i(2147483647, 2147483647, 2147483647, 2147483647)`` :ref:`🔗<class_Vector4i_constant_MAX>` + +Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector4.INF<class_Vector4_constant_INF>`. + .. rst-class:: classref-section-separator ---- @@ -203,7 +235,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **w** = ``0`` +:ref:`int<class_int>` **w** = ``0`` :ref:`🔗<class_Vector4i_property_w>` The vector's W component. Also accessible by using the index position ``[3]``. @@ -215,7 +247,7 @@ The vector's W component. Also accessible by using the index position ``[3]``. .. rst-class:: classref-property -:ref:`int<class_int>` **x** = ``0`` +:ref:`int<class_int>` **x** = ``0`` :ref:`🔗<class_Vector4i_property_x>` The vector's X component. Also accessible by using the index position ``[0]``. @@ -227,7 +259,7 @@ The vector's X component. Also accessible by using the index position ``[0]``. .. rst-class:: classref-property -:ref:`int<class_int>` **y** = ``0`` +:ref:`int<class_int>` **y** = ``0`` :ref:`🔗<class_Vector4i_property_y>` The vector's Y component. Also accessible by using the index position ``[1]``. @@ -239,7 +271,7 @@ The vector's Y component. Also accessible by using the index position ``[1]``. .. rst-class:: classref-property -:ref:`int<class_int>` **z** = ``0`` +:ref:`int<class_int>` **z** = ``0`` :ref:`🔗<class_Vector4i_property_z>` The vector's Z component. Also accessible by using the index position ``[2]``. @@ -256,7 +288,7 @@ Constructor Descriptions .. rst-class:: classref-constructor -:ref:`Vector4i<class_Vector4i>` **Vector4i** **(** **)** +:ref:`Vector4i<class_Vector4i>` **Vector4i**\ (\ ) :ref:`🔗<class_Vector4i_constructor_Vector4i>` Constructs a default-initialized **Vector4i** with all components set to ``0``. @@ -266,7 +298,7 @@ Constructs a default-initialized **Vector4i** with all components set to ``0``. .. rst-class:: classref-constructor -:ref:`Vector4i<class_Vector4i>` **Vector4i** **(** :ref:`Vector4i<class_Vector4i>` from **)** +:ref:`Vector4i<class_Vector4i>` **Vector4i**\ (\ from\: :ref:`Vector4i<class_Vector4i>`\ ) Constructs a **Vector4i** as a copy of the given **Vector4i**. @@ -276,7 +308,7 @@ Constructs a **Vector4i** as a copy of the given **Vector4i**. .. rst-class:: classref-constructor -:ref:`Vector4i<class_Vector4i>` **Vector4i** **(** :ref:`Vector4<class_Vector4>` from **)** +:ref:`Vector4i<class_Vector4i>` **Vector4i**\ (\ from\: :ref:`Vector4<class_Vector4>`\ ) Constructs a new **Vector4i** from the given :ref:`Vector4<class_Vector4>` by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of :ref:`Vector4.ceil<class_Vector4_method_ceil>`, :ref:`Vector4.floor<class_Vector4_method_floor>` or :ref:`Vector4.round<class_Vector4_method_round>` to this constructor instead. @@ -286,7 +318,7 @@ Constructs a new **Vector4i** from the given :ref:`Vector4<class_Vector4>` by tr .. rst-class:: classref-constructor -:ref:`Vector4i<class_Vector4i>` **Vector4i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` z, :ref:`int<class_int>` w **)** +:ref:`Vector4i<class_Vector4i>` **Vector4i**\ (\ x\: :ref:`int<class_int>`, y\: :ref:`int<class_int>`, z\: :ref:`int<class_int>`, w\: :ref:`int<class_int>`\ ) Returns a **Vector4i** with the given components. @@ -303,7 +335,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Vector4i<class_Vector4i>` **abs** **(** **)** |const| +:ref:`Vector4i<class_Vector4i>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_abs>` Returns a new vector with all components in absolute values (i.e. positive). @@ -315,7 +347,7 @@ Returns a new vector with all components in absolute values (i.e. positive). .. rst-class:: classref-method -:ref:`Vector4i<class_Vector4i>` **clamp** **(** :ref:`Vector4i<class_Vector4i>` min, :ref:`Vector4i<class_Vector4i>` max **)** |const| +:ref:`Vector4i<class_Vector4i>` **clamp**\ (\ min\: :ref:`Vector4i<class_Vector4i>`, max\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_clamp>` Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. @@ -323,11 +355,49 @@ Returns a new vector with all components clamped between the components of ``min ---- +.. _class_Vector4i_method_clampi: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **clampi**\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector4i_method_clampi>` + +Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_method_distance_squared_to: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **distance_squared_to**\ (\ to\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_distance_squared_to>` + +Returns the squared distance between this vector and ``to``. + +This method runs faster than :ref:`distance_to<class_Vector4i_method_distance_to>`, so prefer it if you need to compare vectors or need the squared distance for some formula. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_method_distance_to: + +.. rst-class:: classref-method + +:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_distance_to>` + +Returns the distance between this vector and ``to``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4i_method_length: .. rst-class:: classref-method -:ref:`float<class_float>` **length** **(** **)** |const| +:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_length>` Returns the length (magnitude) of this vector. @@ -339,7 +409,7 @@ Returns the length (magnitude) of this vector. .. rst-class:: classref-method -:ref:`int<class_int>` **length_squared** **(** **)** |const| +:ref:`int<class_int>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_length_squared>` Returns the squared length (squared magnitude) of this vector. @@ -349,11 +419,23 @@ This method runs faster than :ref:`length<class_Vector4i_method_length>`, so pre ---- +.. _class_Vector4i_method_max: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **max**\ (\ with\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_max>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector4i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z), maxi(w, with.w))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4i_method_max_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **max_axis_index** **(** **)** |const| +:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_max_axis_index>` Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector4i_constant_AXIS_X>`. @@ -361,11 +443,35 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector4i_method_maxi: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **maxi**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector4i_method_maxi>` + +Returns the component-wise maximum of this and ``with``, equivalent to ``Vector4i(maxi(x, with), maxi(y, with), maxi(z, with), maxi(w, with))``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_method_min: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **min**\ (\ with\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_min>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4i(mini(x, with.x), mini(y, with.y), mini(z, with.z), mini(w, with.w))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4i_method_min_axis_index: .. rst-class:: classref-method -:ref:`int<class_int>` **min_axis_index** **(** **)** |const| +:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_min_axis_index>` Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_W<class_Vector4i_constant_AXIS_W>`. @@ -373,11 +479,23 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all ---- +.. _class_Vector4i_method_mini: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **mini**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector4i_method_mini>` + +Returns the component-wise minimum of this and ``with``, equivalent to ``Vector4i(mini(x, with), mini(y, with), mini(z, with), mini(w, with))``. + +.. rst-class:: classref-item-separator + +---- + .. _class_Vector4i_method_sign: .. rst-class:: classref-method -:ref:`Vector4i<class_Vector4i>` **sign** **(** **)** |const| +:ref:`Vector4i<class_Vector4i>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector4i_method_sign>` Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component. @@ -389,10 +507,22 @@ Returns a new vector with each component set to ``1`` if it's positive, ``-1`` i .. rst-class:: classref-method -:ref:`Vector4i<class_Vector4i>` **snapped** **(** :ref:`Vector4i<class_Vector4i>` step **)** |const| +:ref:`Vector4i<class_Vector4i>` **snapped**\ (\ step\: :ref:`Vector4i<class_Vector4i>`\ ) |const| :ref:`🔗<class_Vector4i_method_snapped>` Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``. +.. rst-class:: classref-item-separator + +---- + +.. _class_Vector4i_method_snappedi: + +.. rst-class:: classref-method + +:ref:`Vector4i<class_Vector4i>` **snappedi**\ (\ step\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector4i_method_snappedi>` + +Returns a new vector with each component snapped to the closest multiple of ``step``. + .. rst-class:: classref-section-separator ---- @@ -406,7 +536,7 @@ Operator Descriptions .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator !=** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_neq_Vector4i>` Returns ``true`` if the vectors are not equal. @@ -418,7 +548,7 @@ Returns ``true`` if the vectors are not equal. .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator %** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator %**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_mod_Vector4i>` Gets the remainder of each component of the **Vector4i** with the components of the given **Vector4i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -434,7 +564,7 @@ Gets the remainder of each component of the **Vector4i** with the components of .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator %** **(** :ref:`int<class_int>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator %**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4i_operator_mod_int>` Gets the remainder of each component of the **Vector4i** with the the given :ref:`int<class_int>`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers. @@ -450,7 +580,7 @@ Gets the remainder of each component of the **Vector4i** with the the given :ref .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator *** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator ***\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_mul_Vector4i>` Multiplies each component of the **Vector4i** by the components of the given **Vector4i**. @@ -466,7 +596,7 @@ Multiplies each component of the **Vector4i** by the components of the given **V .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator *** **(** :ref:`float<class_float>` right **)** +:ref:`Vector4<class_Vector4>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector4i_operator_mul_float>` Multiplies each component of the **Vector4i** by the given :ref:`float<class_float>`. @@ -484,7 +614,7 @@ Returns a Vector4 value due to floating-point operations. .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator *** **(** :ref:`int<class_int>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4i_operator_mul_int>` Multiplies each component of the **Vector4i** by the given :ref:`int<class_int>`. @@ -496,7 +626,7 @@ Multiplies each component of the **Vector4i** by the given :ref:`int<class_int>` .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator +** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator +**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_sum_Vector4i>` Adds each component of the **Vector4i** by the components of the given **Vector4i**. @@ -512,7 +642,7 @@ Adds each component of the **Vector4i** by the components of the given **Vector4 .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator -** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator -**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_dif_Vector4i>` Subtracts each component of the **Vector4i** by the components of the given **Vector4i**. @@ -528,7 +658,7 @@ Subtracts each component of the **Vector4i** by the components of the given **Ve .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator /** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator /**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_div_Vector4i>` Divides each component of the **Vector4i** by the components of the given **Vector4i**. @@ -544,7 +674,7 @@ Divides each component of the **Vector4i** by the components of the given **Vect .. rst-class:: classref-operator -:ref:`Vector4<class_Vector4>` **operator /** **(** :ref:`float<class_float>` right **)** +:ref:`Vector4<class_Vector4>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector4i_operator_div_float>` Divides each component of the **Vector4i** by the given :ref:`float<class_float>`. @@ -562,7 +692,7 @@ Returns a Vector4 value due to floating-point operations. .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator /** **(** :ref:`int<class_int>` right **)** +:ref:`Vector4i<class_Vector4i>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4i_operator_div_int>` Divides each component of the **Vector4i** by the given :ref:`int<class_int>`. @@ -574,7 +704,7 @@ Divides each component of the **Vector4i** by the given :ref:`int<class_int>`. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_lt_Vector4i>` Compares two **Vector4i** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -586,7 +716,7 @@ Compares two **Vector4i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator <=** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_lte_Vector4i>` Compares two **Vector4i** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -598,7 +728,7 @@ Compares two **Vector4i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator ==** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_eq_Vector4i>` Returns ``true`` if the vectors are exactly equal. @@ -610,7 +740,7 @@ Returns ``true`` if the vectors are exactly equal. .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_gt_Vector4i>` Compares two **Vector4i** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -622,7 +752,7 @@ Compares two **Vector4i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`bool<class_bool>` **operator >=** **(** :ref:`Vector4i<class_Vector4i>` right **)** +:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector4i<class_Vector4i>`\ ) :ref:`🔗<class_Vector4i_operator_gte_Vector4i>` Compares two **Vector4i** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors. @@ -634,7 +764,7 @@ Compares two **Vector4i** vectors by first checking if the X value of the left v .. rst-class:: classref-operator -:ref:`int<class_int>` **operator []** **(** :ref:`int<class_int>` index **)** +:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector4i_operator_idx_int>` Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, ``v[1]`` is equivalent to ``v.y``, ``v[2]`` is equivalent to ``v.z``, and ``v[3]`` is equivalent to ``v.w``. @@ -646,7 +776,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x` .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator unary+** **(** **)** +:ref:`Vector4i<class_Vector4i>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector4i_operator_unplus>` Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable. @@ -658,7 +788,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, .. rst-class:: classref-operator -:ref:`Vector4i<class_Vector4i>` **operator unary-** **(** **)** +:ref:`Vector4i<class_Vector4i>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector4i_operator_unminus>` Returns the negative value of the **Vector4i**. This is the same as writing ``Vector4i(-v.x, -v.y, -v.z, -v.w)``. This operation flips the direction of the vector while keeping the same magnitude. @@ -669,3 +799,4 @@ Returns the negative value of the **Vector4i**. This is the same as writing ``Ve .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vehiclebody3d.rst b/classes/class_vehiclebody3d.rst index 76f77ca8430..c1b78483f55 100644 --- a/classes/class_vehiclebody3d.rst +++ b/classes/class_vehiclebody3d.rst @@ -30,7 +30,7 @@ This physics body implements all the physics logic needed to simulate a car. It Tutorials --------- -- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/524>`__ +- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/2752>`__ .. rst-class:: classref-reftable-group @@ -63,12 +63,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **brake** = ``0.0`` +:ref:`float<class_float>` **brake** = ``0.0`` :ref:`🔗<class_VehicleBody3D_property_brake>` .. rst-class:: classref-property-setget -- void **set_brake** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_brake** **(** **)** +- |void| **set_brake**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_brake**\ (\ ) 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 :ref:`RigidBody3D.mass<class_RigidBody3D_property_mass>` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. @@ -80,12 +80,12 @@ Slows down the vehicle by applying a braking force. The vehicle is only slowed d .. rst-class:: classref-property -:ref:`float<class_float>` **engine_force** = ``0.0`` +:ref:`float<class_float>` **engine_force** = ``0.0`` :ref:`🔗<class_VehicleBody3D_property_engine_force>` .. rst-class:: classref-property-setget -- void **set_engine_force** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_engine_force** **(** **)** +- |void| **set_engine_force**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_engine_force**\ (\ ) Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have :ref:`VehicleWheel3D.use_as_traction<class_VehicleWheel3D_property_use_as_traction>` set to ``true`` and are in contact with a surface. The :ref:`RigidBody3D.mass<class_RigidBody3D_property_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. @@ -101,12 +101,12 @@ A negative value will result in the vehicle reversing. .. rst-class:: classref-property -:ref:`float<class_float>` **steering** = ``0.0`` +:ref:`float<class_float>` **steering** = ``0.0`` :ref:`🔗<class_VehicleBody3D_property_steering>` .. rst-class:: classref-property-setget -- void **set_steering** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_steering** **(** **)** +- |void| **set_steering**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **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 :ref:`VehicleWheel3D.use_as_steering<class_VehicleWheel3D_property_use_as_steering>` set to ``true`` will automatically be rotated. @@ -119,3 +119,4 @@ The steering angle for the vehicle. Setting this to a non-zero value will result .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vehiclewheel3d.rst b/classes/class_vehiclewheel3d.rst index 7e8612be9f9..1df0021c1e3 100644 --- a/classes/class_vehiclewheel3d.rst +++ b/classes/class_vehiclewheel3d.rst @@ -28,7 +28,7 @@ A node used as a child of a :ref:`VehicleBody3D<class_VehicleBody3D>` parent to Tutorials --------- -- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/524>`__ +- `3D Truck Town Demo <https://godotengine.org/asset-library/asset/2752>`__ .. rst-class:: classref-reftable-group @@ -76,15 +76,15 @@ Methods .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`Node3D<class_Node3D>` | :ref:`get_contact_body<class_VehicleWheel3D_method_get_contact_body>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_rpm<class_VehicleWheel3D_method_get_rpm>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_skidinfo<class_VehicleWheel3D_method_get_skidinfo>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_in_contact<class_VehicleWheel3D_method_is_in_contact>` **(** **)** |const| | - +-----------------------------+-------------------------------------------------------------------------------------------+ + +-----------------------------+-------------------------------------------------------------------------------------+ + | :ref:`Node3D<class_Node3D>` | :ref:`get_contact_body<class_VehicleWheel3D_method_get_contact_body>`\ (\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_rpm<class_VehicleWheel3D_method_get_rpm>`\ (\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_skidinfo<class_VehicleWheel3D_method_get_skidinfo>`\ (\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_in_contact<class_VehicleWheel3D_method_is_in_contact>`\ (\ ) |const| | + +-----------------------------+-------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -99,12 +99,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **brake** = ``0.0`` +:ref:`float<class_float>` **brake** = ``0.0`` :ref:`🔗<class_VehicleWheel3D_property_brake>` .. rst-class:: classref-property-setget -- void **set_brake** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_brake** **(** **)** +- |void| **set_brake**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_brake**\ (\ ) Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the :ref:`RigidBody3D.mass<class_RigidBody3D_property_mass>` of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. @@ -116,12 +116,12 @@ Slows down the wheel by applying a braking force. The wheel is only slowed down .. rst-class:: classref-property -:ref:`float<class_float>` **damping_compression** = ``0.83`` +:ref:`float<class_float>` **damping_compression** = ``0.83`` :ref:`🔗<class_VehicleWheel3D_property_damping_compression>` .. rst-class:: classref-property-setget -- void **set_damping_compression** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_damping_compression** **(** **)** +- |void| **set_damping_compression**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_damping_compression**\ (\ ) The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. @@ -133,12 +133,12 @@ The damping applied to the spring when the spring is being compressed. This valu .. rst-class:: classref-property -:ref:`float<class_float>` **damping_relaxation** = ``0.88`` +:ref:`float<class_float>` **damping_relaxation** = ``0.88`` :ref:`🔗<class_VehicleWheel3D_property_damping_relaxation>` .. rst-class:: classref-property-setget -- void **set_damping_relaxation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_damping_relaxation** **(** **)** +- |void| **set_damping_relaxation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_damping_relaxation**\ (\ ) The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the :ref:`damping_compression<class_VehicleWheel3D_property_damping_compression>` property. For a :ref:`damping_compression<class_VehicleWheel3D_property_damping_compression>` value of 0.3, try a relaxation value of 0.5. @@ -150,12 +150,12 @@ The damping applied to the spring when relaxing. This value should be between 0. .. rst-class:: classref-property -:ref:`float<class_float>` **engine_force** = ``0.0`` +:ref:`float<class_float>` **engine_force** = ``0.0`` :ref:`🔗<class_VehicleWheel3D_property_engine_force>` .. rst-class:: classref-property-setget -- void **set_engine_force** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_engine_force** **(** **)** +- |void| **set_engine_force**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_engine_force**\ (\ ) Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The :ref:`RigidBody3D.mass<class_RigidBody3D_property_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. @@ -171,12 +171,12 @@ A negative value will result in the wheel reversing. .. rst-class:: classref-property -:ref:`float<class_float>` **steering** = ``0.0`` +:ref:`float<class_float>` **steering** = ``0.0`` :ref:`🔗<class_VehicleWheel3D_property_steering>` .. rst-class:: classref-property-setget -- void **set_steering** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_steering** **(** **)** +- |void| **set_steering**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_steering**\ (\ ) The steering angle for the wheel, in radians. Setting this to a non-zero value will result in the vehicle turning when it's moving. @@ -188,12 +188,12 @@ The steering angle for the wheel, in radians. Setting this to a non-zero value w .. rst-class:: classref-property -:ref:`float<class_float>` **suspension_max_force** = ``6000.0`` +:ref:`float<class_float>` **suspension_max_force** = ``6000.0`` :ref:`🔗<class_VehicleWheel3D_property_suspension_max_force>` .. rst-class:: classref-property-setget -- void **set_suspension_max_force** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_suspension_max_force** **(** **)** +- |void| **set_suspension_max_force**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_suspension_max_force**\ (\ ) The maximum force the spring can resist. This value should be higher than a quarter of the :ref:`RigidBody3D.mass<class_RigidBody3D_property_mass>` of the :ref:`VehicleBody3D<class_VehicleBody3D>` or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. @@ -205,12 +205,12 @@ The maximum force the spring can resist. This value should be higher than a quar .. rst-class:: classref-property -:ref:`float<class_float>` **suspension_stiffness** = ``5.88`` +:ref:`float<class_float>` **suspension_stiffness** = ``5.88`` :ref:`🔗<class_VehicleWheel3D_property_suspension_stiffness>` .. rst-class:: classref-property-setget -- void **set_suspension_stiffness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_suspension_stiffness** **(** **)** +- |void| **set_suspension_stiffness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_suspension_stiffness**\ (\ ) This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. @@ -222,12 +222,12 @@ This value defines the stiffness of the suspension. Use a value lower than 50 fo .. rst-class:: classref-property -:ref:`float<class_float>` **suspension_travel** = ``0.2`` +:ref:`float<class_float>` **suspension_travel** = ``0.2`` :ref:`🔗<class_VehicleWheel3D_property_suspension_travel>` .. rst-class:: classref-property-setget -- void **set_suspension_travel** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_suspension_travel** **(** **)** +- |void| **set_suspension_travel**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_suspension_travel**\ (\ ) This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. @@ -239,12 +239,12 @@ This is the distance the suspension can travel. As Godot units are equivalent to .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_as_steering** = ``false`` +:ref:`bool<class_bool>` **use_as_steering** = ``false`` :ref:`🔗<class_VehicleWheel3D_property_use_as_steering>` .. rst-class:: classref-property-setget -- void **set_use_as_steering** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_used_as_steering** **(** **)** +- |void| **set_use_as_steering**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_used_as_steering**\ (\ ) If ``true``, this wheel will be turned when the car steers. This value is used in conjunction with :ref:`VehicleBody3D.steering<class_VehicleBody3D_property_steering>` and ignored if you are using the per-wheel :ref:`steering<class_VehicleWheel3D_property_steering>` value instead. @@ -256,12 +256,12 @@ If ``true``, this wheel will be turned when the car steers. This value is used i .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_as_traction** = ``false`` +:ref:`bool<class_bool>` **use_as_traction** = ``false`` :ref:`🔗<class_VehicleWheel3D_property_use_as_traction>` .. rst-class:: classref-property-setget -- void **set_use_as_traction** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_used_as_traction** **(** **)** +- |void| **set_use_as_traction**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_used_as_traction**\ (\ ) If ``true``, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with :ref:`VehicleBody3D.engine_force<class_VehicleBody3D_property_engine_force>` and ignored if you are using the per-wheel :ref:`engine_force<class_VehicleWheel3D_property_engine_force>` value instead. @@ -273,12 +273,12 @@ If ``true``, this wheel transfers engine force to the ground to propel the vehic .. rst-class:: classref-property -:ref:`float<class_float>` **wheel_friction_slip** = ``10.5`` +:ref:`float<class_float>` **wheel_friction_slip** = ``10.5`` :ref:`🔗<class_VehicleWheel3D_property_wheel_friction_slip>` .. rst-class:: classref-property-setget -- void **set_friction_slip** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_friction_slip** **(** **)** +- |void| **set_friction_slip**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_friction_slip**\ (\ ) This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. @@ -292,12 +292,12 @@ It's best to set this to 1.0 when starting out. .. rst-class:: classref-property -:ref:`float<class_float>` **wheel_radius** = ``0.5`` +:ref:`float<class_float>` **wheel_radius** = ``0.5`` :ref:`🔗<class_VehicleWheel3D_property_wheel_radius>` .. rst-class:: classref-property-setget -- void **set_radius** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_radius** **(** **)** +- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_radius**\ (\ ) The radius of the wheel in meters. @@ -309,12 +309,12 @@ The radius of the wheel in meters. .. rst-class:: classref-property -:ref:`float<class_float>` **wheel_rest_length** = ``0.15`` +:ref:`float<class_float>` **wheel_rest_length** = ``0.15`` :ref:`🔗<class_VehicleWheel3D_property_wheel_rest_length>` .. rst-class:: classref-property-setget -- void **set_suspension_rest_length** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_suspension_rest_length** **(** **)** +- |void| **set_suspension_rest_length**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_suspension_rest_length**\ (\ ) This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. @@ -326,14 +326,14 @@ This is the distance in meters the wheel is lowered from its origin point. Don't .. rst-class:: classref-property -:ref:`float<class_float>` **wheel_roll_influence** = ``0.1`` +:ref:`float<class_float>` **wheel_roll_influence** = ``0.1`` :ref:`🔗<class_VehicleWheel3D_property_wheel_roll_influence>` .. rst-class:: classref-property-setget -- void **set_roll_influence** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_roll_influence** **(** **)** +- |void| **set_roll_influence**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_roll_influence**\ (\ ) -This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. +This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will resist body roll, while a value of 0.0 will be prone to rolling over. .. rst-class:: classref-section-separator @@ -348,7 +348,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Node3D<class_Node3D>` **get_contact_body** **(** **)** |const| +:ref:`Node3D<class_Node3D>` **get_contact_body**\ (\ ) |const| :ref:`🔗<class_VehicleWheel3D_method_get_contact_body>` Returns the contacting body node if valid in the tree, as :ref:`Node3D<class_Node3D>`. At the moment, :ref:`GridMap<class_GridMap>` is not supported so the node will be always of type :ref:`PhysicsBody3D<class_PhysicsBody3D>`. @@ -362,7 +362,7 @@ Returns ``null`` if the wheel is not in contact with a surface, or the contact b .. rst-class:: classref-method -:ref:`float<class_float>` **get_rpm** **(** **)** |const| +:ref:`float<class_float>` **get_rpm**\ (\ ) |const| :ref:`🔗<class_VehicleWheel3D_method_get_rpm>` Returns the rotational speed of the wheel in revolutions per minute. @@ -374,7 +374,7 @@ Returns the rotational speed of the wheel in revolutions per minute. .. rst-class:: classref-method -:ref:`float<class_float>` **get_skidinfo** **(** **)** |const| +:ref:`float<class_float>` **get_skidinfo**\ (\ ) |const| :ref:`🔗<class_VehicleWheel3D_method_get_skidinfo>` Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). @@ -386,7 +386,7 @@ Returns a value between 0.0 and 1.0 that indicates whether this wheel is skiddin .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_in_contact** **(** **)** |const| +:ref:`bool<class_bool>` **is_in_contact**\ (\ ) |const| :ref:`🔗<class_VehicleWheel3D_method_is_in_contact>` Returns ``true`` if this wheel is in contact with a surface. @@ -397,3 +397,4 @@ Returns ``true`` if this wheel is in contact with a surface. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vflowcontainer.rst b/classes/class_vflowcontainer.rst index cac821ed150..4651100f7c0 100644 --- a/classes/class_vflowcontainer.rst +++ b/classes/class_vflowcontainer.rst @@ -28,49 +28,6 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`h_separation<class_VFlowContainer_theme_constant_h_separation>` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`v_separation<class_VFlowContainer_theme_constant_v_separation>` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VFlowContainer_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **h_separation** = ``4`` - -The horizontal separation of children nodes. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VFlowContainer_theme_constant_v_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **v_separation** = ``4`` - -The vertical separation of children nodes. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -78,3 +35,4 @@ The vertical separation of children nodes. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_videostream.rst b/classes/class_videostream.rst index 3869a7ea4cc..ba676bba4ef 100644 --- a/classes/class_videostream.rst +++ b/classes/class_videostream.rst @@ -23,6 +23,15 @@ Description Base resource type for all video streams. Classes that derive from **VideoStream** can all be used as resource types to play back videos in :ref:`VideoStreamPlayer<class_VideoStreamPlayer>`. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Playing videos <../tutorials/animation/playing_videos>` + +- :doc:`Runtime file loading and saving <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group Properties @@ -43,9 +52,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`VideoStreamPlayback<class_VideoStreamPlayback>` | :ref:`_instantiate_playback<class_VideoStream_method__instantiate_playback>` **(** **)** |virtual| | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ + | :ref:`VideoStreamPlayback<class_VideoStreamPlayback>` | :ref:`_instantiate_playback<class_VideoStream_private_method__instantiate_playback>`\ (\ ) |virtual| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,12 +69,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **file** = ``""`` +:ref:`String<class_String>` **file** = ``""`` :ref:`🔗<class_VideoStream_property_file>` .. rst-class:: classref-property-setget -- void **set_file** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_file** **(** **)** +- |void| **set_file**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_file**\ (\ ) The video file path or URI that this **VideoStream** resource handles. @@ -80,11 +89,11 @@ For :ref:`VideoStreamTheora<class_VideoStreamTheora>`, this filename should be a Method Descriptions ------------------- -.. _class_VideoStream_method__instantiate_playback: +.. _class_VideoStream_private_method__instantiate_playback: .. rst-class:: classref-method -:ref:`VideoStreamPlayback<class_VideoStreamPlayback>` **_instantiate_playback** **(** **)** |virtual| +:ref:`VideoStreamPlayback<class_VideoStreamPlayback>` **_instantiate_playback**\ (\ ) |virtual| :ref:`🔗<class_VideoStream_private_method__instantiate_playback>` Called when the video starts playing, to initialize and return a subclass of :ref:`VideoStreamPlayback<class_VideoStreamPlayback>`. @@ -95,3 +104,4 @@ Called when the video starts playing, to initialize and return a subclass of :re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_videostreamplayback.rst b/classes/class_videostreamplayback.rst index f3c18e4897e..b0e3cf5a022 100644 --- a/classes/class_videostreamplayback.rst +++ b/classes/class_videostreamplayback.rst @@ -29,35 +29,35 @@ Methods .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_channels<class_VideoStreamPlayback_method__get_channels>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_length<class_VideoStreamPlayback_method__get_length>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_mix_rate<class_VideoStreamPlayback_method__get_mix_rate>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`_get_playback_position<class_VideoStreamPlayback_method__get_playback_position>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_texture<class_VideoStreamPlayback_method__get_texture>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_paused<class_VideoStreamPlayback_method__is_paused>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_playing<class_VideoStreamPlayback_method__is_playing>` **(** **)** |virtual| |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_play<class_VideoStreamPlayback_method__play>` **(** **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_seek<class_VideoStreamPlayback_method__seek>` **(** :ref:`float<class_float>` time **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_audio_track<class_VideoStreamPlayback_method__set_audio_track>` **(** :ref:`int<class_int>` idx **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_paused<class_VideoStreamPlayback_method__set_paused>` **(** :ref:`bool<class_bool>` paused **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stop<class_VideoStreamPlayback_method__stop>` **(** **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update<class_VideoStreamPlayback_method__update>` **(** :ref:`float<class_float>` delta **)** |virtual| | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`mix_audio<class_VideoStreamPlayback_method_mix_audio>` **(** :ref:`int<class_int>` num_frames, :ref:`PackedFloat32Array<class_PackedFloat32Array>` buffer=PackedFloat32Array(), :ref:`int<class_int>` offset=0 **)** | - +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_channels<class_VideoStreamPlayback_private_method__get_channels>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_length<class_VideoStreamPlayback_private_method__get_length>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_mix_rate<class_VideoStreamPlayback_private_method__get_mix_rate>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`_get_playback_position<class_VideoStreamPlayback_private_method__get_playback_position>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_texture<class_VideoStreamPlayback_private_method__get_texture>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_paused<class_VideoStreamPlayback_private_method__is_paused>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_playing<class_VideoStreamPlayback_private_method__is_playing>`\ (\ ) |virtual| |const| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_play<class_VideoStreamPlayback_private_method__play>`\ (\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_seek<class_VideoStreamPlayback_private_method__seek>`\ (\ time\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_audio_track<class_VideoStreamPlayback_private_method__set_audio_track>`\ (\ idx\: :ref:`int<class_int>`\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_paused<class_VideoStreamPlayback_private_method__set_paused>`\ (\ paused\: :ref:`bool<class_bool>`\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_stop<class_VideoStreamPlayback_private_method__stop>`\ (\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_update<class_VideoStreamPlayback_private_method__update>`\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`mix_audio<class_VideoStreamPlayback_method_mix_audio>`\ (\ num_frames\: :ref:`int<class_int>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), offset\: :ref:`int<class_int>` = 0\ ) | + +-----------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,11 +68,11 @@ Methods Method Descriptions ------------------- -.. _class_VideoStreamPlayback_method__get_channels: +.. _class_VideoStreamPlayback_private_method__get_channels: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_channels** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_channels**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_channels>` Returns the number of audio channels. @@ -80,11 +80,11 @@ Returns the number of audio channels. ---- -.. _class_VideoStreamPlayback_method__get_length: +.. _class_VideoStreamPlayback_private_method__get_length: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_length** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_length**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_length>` Returns the video duration in seconds, if known, or 0 if unknown. @@ -92,11 +92,11 @@ Returns the video duration in seconds, if known, or 0 if unknown. ---- -.. _class_VideoStreamPlayback_method__get_mix_rate: +.. _class_VideoStreamPlayback_private_method__get_mix_rate: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_mix_rate** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_mix_rate**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_mix_rate>` Returns the audio sample rate used for mixing. @@ -104,11 +104,11 @@ Returns the audio sample rate used for mixing. ---- -.. _class_VideoStreamPlayback_method__get_playback_position: +.. _class_VideoStreamPlayback_private_method__get_playback_position: .. rst-class:: classref-method -:ref:`float<class_float>` **_get_playback_position** **(** **)** |virtual| |const| +:ref:`float<class_float>` **_get_playback_position**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_playback_position>` Return the current playback timestamp. Called in response to the :ref:`VideoStreamPlayer.stream_position<class_VideoStreamPlayer_property_stream_position>` getter. @@ -116,11 +116,11 @@ Return the current playback timestamp. Called in response to the :ref:`VideoStre ---- -.. _class_VideoStreamPlayback_method__get_texture: +.. _class_VideoStreamPlayback_private_method__get_texture: .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **_get_texture** **(** **)** |virtual| |const| +:ref:`Texture2D<class_Texture2D>` **_get_texture**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__get_texture>` Allocates a :ref:`Texture2D<class_Texture2D>` in which decoded video frames will be drawn. @@ -128,47 +128,47 @@ Allocates a :ref:`Texture2D<class_Texture2D>` in which decoded video frames will ---- -.. _class_VideoStreamPlayback_method__is_paused: +.. _class_VideoStreamPlayback_private_method__is_paused: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_paused** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_paused**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__is_paused>` -Returns the paused status, as set by :ref:`_set_paused<class_VideoStreamPlayback_method__set_paused>`. +Returns the paused status, as set by :ref:`_set_paused<class_VideoStreamPlayback_private_method__set_paused>`. .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__is_playing: +.. _class_VideoStreamPlayback_private_method__is_playing: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_playing** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_playing**\ (\ ) |virtual| |const| :ref:`🔗<class_VideoStreamPlayback_private_method__is_playing>` -Returns the playback state, as determined by calls to :ref:`_play<class_VideoStreamPlayback_method__play>` and :ref:`_stop<class_VideoStreamPlayback_method__stop>`. +Returns the playback state, as determined by calls to :ref:`_play<class_VideoStreamPlayback_private_method__play>` and :ref:`_stop<class_VideoStreamPlayback_private_method__stop>`. .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__play: +.. _class_VideoStreamPlayback_private_method__play: .. rst-class:: classref-method -void **_play** **(** **)** |virtual| +|void| **_play**\ (\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__play>` -Called in response to :ref:`VideoStreamPlayer.autoplay<class_VideoStreamPlayer_property_autoplay>` or :ref:`VideoStreamPlayer.play<class_VideoStreamPlayer_method_play>`. Note that manual playback may also invoke :ref:`_stop<class_VideoStreamPlayback_method__stop>` multiple times before this method is called. :ref:`_is_playing<class_VideoStreamPlayback_method__is_playing>` should return true once playing. +Called in response to :ref:`VideoStreamPlayer.autoplay<class_VideoStreamPlayer_property_autoplay>` or :ref:`VideoStreamPlayer.play<class_VideoStreamPlayer_method_play>`. Note that manual playback may also invoke :ref:`_stop<class_VideoStreamPlayback_private_method__stop>` multiple times before this method is called. :ref:`_is_playing<class_VideoStreamPlayback_private_method__is_playing>` should return true once playing. .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__seek: +.. _class_VideoStreamPlayback_private_method__seek: .. rst-class:: classref-method -void **_seek** **(** :ref:`float<class_float>` time **)** |virtual| +|void| **_seek**\ (\ time\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__seek>` Seeks to ``time`` seconds. Called in response to the :ref:`VideoStreamPlayer.stream_position<class_VideoStreamPlayer_property_stream_position>` setter. @@ -176,11 +176,11 @@ Seeks to ``time`` seconds. Called in response to the :ref:`VideoStreamPlayer.str ---- -.. _class_VideoStreamPlayback_method__set_audio_track: +.. _class_VideoStreamPlayback_private_method__set_audio_track: .. rst-class:: classref-method -void **_set_audio_track** **(** :ref:`int<class_int>` idx **)** |virtual| +|void| **_set_audio_track**\ (\ idx\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__set_audio_track>` Select the audio track ``idx``. Called when playback starts, and in response to the :ref:`VideoStreamPlayer.audio_track<class_VideoStreamPlayer_property_audio_track>` setter. @@ -188,37 +188,37 @@ Select the audio track ``idx``. Called when playback starts, and in response to ---- -.. _class_VideoStreamPlayback_method__set_paused: +.. _class_VideoStreamPlayback_private_method__set_paused: .. rst-class:: classref-method -void **_set_paused** **(** :ref:`bool<class_bool>` paused **)** |virtual| +|void| **_set_paused**\ (\ paused\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__set_paused>` -Set the paused status of video playback. :ref:`_is_paused<class_VideoStreamPlayback_method__is_paused>` must return ``paused``. Called in response to the :ref:`VideoStreamPlayer.paused<class_VideoStreamPlayer_property_paused>` setter. +Set the paused status of video playback. :ref:`_is_paused<class_VideoStreamPlayback_private_method__is_paused>` must return ``paused``. Called in response to the :ref:`VideoStreamPlayer.paused<class_VideoStreamPlayer_property_paused>` setter. .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__stop: +.. _class_VideoStreamPlayback_private_method__stop: .. rst-class:: classref-method -void **_stop** **(** **)** |virtual| +|void| **_stop**\ (\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__stop>` -Stops playback. May be called multiple times before :ref:`_play<class_VideoStreamPlayback_method__play>`, or in response to :ref:`VideoStreamPlayer.stop<class_VideoStreamPlayer_method_stop>`. :ref:`_is_playing<class_VideoStreamPlayback_method__is_playing>` should return false once stopped. +Stops playback. May be called multiple times before :ref:`_play<class_VideoStreamPlayback_private_method__play>`, or in response to :ref:`VideoStreamPlayer.stop<class_VideoStreamPlayer_method_stop>`. :ref:`_is_playing<class_VideoStreamPlayback_private_method__is_playing>` should return false once stopped. .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__update: +.. _class_VideoStreamPlayback_private_method__update: .. rst-class:: classref-method -void **_update** **(** :ref:`float<class_float>` delta **)** |virtual| +|void| **_update**\ (\ delta\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_VideoStreamPlayback_private_method__update>` -Ticks video playback for ``delta`` seconds. Called every frame as long as :ref:`_is_paused<class_VideoStreamPlayback_method__is_paused>` and :ref:`_is_playing<class_VideoStreamPlayback_method__is_playing>` return true. +Ticks video playback for ``delta`` seconds. Called every frame as long as :ref:`_is_paused<class_VideoStreamPlayback_private_method__is_paused>` and :ref:`_is_playing<class_VideoStreamPlayback_private_method__is_playing>` return true. .. rst-class:: classref-item-separator @@ -228,9 +228,9 @@ Ticks video playback for ``delta`` seconds. Called every frame as long as :ref:` .. rst-class:: classref-method -:ref:`int<class_int>` **mix_audio** **(** :ref:`int<class_int>` num_frames, :ref:`PackedFloat32Array<class_PackedFloat32Array>` buffer=PackedFloat32Array(), :ref:`int<class_int>` offset=0 **)** +:ref:`int<class_int>` **mix_audio**\ (\ num_frames\: :ref:`int<class_int>`, buffer\: :ref:`PackedFloat32Array<class_PackedFloat32Array>` = PackedFloat32Array(), offset\: :ref:`int<class_int>` = 0\ ) :ref:`🔗<class_VideoStreamPlayback_method_mix_audio>` -Render ``num_frames`` audio frames (of :ref:`_get_channels<class_VideoStreamPlayback_method__get_channels>` floats each) from ``buffer``, starting from index ``offset`` in the array. Returns the number of audio frames rendered, or -1 on error. +Render ``num_frames`` audio frames (of :ref:`_get_channels<class_VideoStreamPlayback_private_method__get_channels>` floats each) from ``buffer``, starting from index ``offset`` in the array. Returns the number of audio frames rendered, or -1 on error. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -239,3 +239,4 @@ Render ``num_frames`` audio frames (of :ref:`_get_channels<class_VideoStreamPlay .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_videostreamplayer.rst b/classes/class_videostreamplayer.rst index 4a062673020..ff2dbe5acdd 100644 --- a/classes/class_videostreamplayer.rst +++ b/classes/class_videostreamplayer.rst @@ -23,10 +23,15 @@ A control used for playback of :ref:`VideoStream<class_VideoStream>` resources. Supported video formats are `Ogg Theora <https://www.theora.org/>`__ (``.ogv``, :ref:`VideoStreamTheora<class_VideoStreamTheora>`) and any format exposed via a GDExtension plugin. -\ **Note:** Due to a bug, VideoStreamPlayer does not support localization remapping yet. - \ **Warning:** On Web, video playback *will* perform poorly due to missing architecture-specific assembly optimizations. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Playing videos <../tutorials/animation/playing_videos>` + .. rst-class:: classref-reftable-group Properties @@ -67,19 +72,19 @@ Methods .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_stream_length<class_VideoStreamPlayer_method_get_stream_length>` **(** **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_stream_name<class_VideoStreamPlayer_method_get_stream_name>` **(** **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_video_texture<class_VideoStreamPlayer_method_get_video_texture>` **(** **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_playing<class_VideoStreamPlayer_method_is_playing>` **(** **)** |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | void | :ref:`play<class_VideoStreamPlayer_method_play>` **(** **)** | - +-----------------------------------+------------------------------------------------------------------------------------------------+ - | void | :ref:`stop<class_VideoStreamPlayer_method_stop>` **(** **)** | - +-----------------------------------+------------------------------------------------------------------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_stream_length<class_VideoStreamPlayer_method_get_stream_length>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_stream_name<class_VideoStreamPlayer_method_get_stream_name>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_video_texture<class_VideoStreamPlayer_method_get_video_texture>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_playing<class_VideoStreamPlayer_method_is_playing>`\ (\ ) |const| | + +-----------------------------------+------------------------------------------------------------------------------------------+ + | |void| | :ref:`play<class_VideoStreamPlayer_method_play>`\ (\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop<class_VideoStreamPlayer_method_stop>`\ (\ ) | + +-----------------------------------+------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,7 +99,7 @@ Signals .. rst-class:: classref-signal -**finished** **(** **)** +**finished**\ (\ ) :ref:`🔗<class_VideoStreamPlayer_signal_finished>` Emitted when playback is finished. @@ -111,12 +116,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **audio_track** = ``0`` +:ref:`int<class_int>` **audio_track** = ``0`` :ref:`🔗<class_VideoStreamPlayer_property_audio_track>` .. rst-class:: classref-property-setget -- void **set_audio_track** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_audio_track** **(** **)** +- |void| **set_audio_track**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_audio_track**\ (\ ) The embedded audio track to play. @@ -128,12 +133,12 @@ The embedded audio track to play. .. rst-class:: classref-property -:ref:`bool<class_bool>` **autoplay** = ``false`` +:ref:`bool<class_bool>` **autoplay** = ``false`` :ref:`🔗<class_VideoStreamPlayer_property_autoplay>` .. rst-class:: classref-property-setget -- void **set_autoplay** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_autoplay** **(** **)** +- |void| **set_autoplay**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_autoplay**\ (\ ) If ``true``, playback starts when the scene loads. @@ -145,12 +150,12 @@ If ``true``, playback starts when the scene loads. .. rst-class:: classref-property -:ref:`int<class_int>` **buffering_msec** = ``500`` +:ref:`int<class_int>` **buffering_msec** = ``500`` :ref:`🔗<class_VideoStreamPlayer_property_buffering_msec>` .. rst-class:: classref-property-setget -- void **set_buffering_msec** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_buffering_msec** **(** **)** +- |void| **set_buffering_msec**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_buffering_msec**\ (\ ) Amount of time in milliseconds to store in buffer while playing. @@ -162,12 +167,12 @@ Amount of time in milliseconds to store in buffer while playing. .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **bus** = ``&"Master"`` +:ref:`StringName<class_StringName>` **bus** = ``&"Master"`` :ref:`🔗<class_VideoStreamPlayer_property_bus>` .. rst-class:: classref-property-setget -- void **set_bus** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_bus** **(** **)** +- |void| **set_bus**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_bus**\ (\ ) Audio bus to use for sound playback. @@ -179,12 +184,12 @@ Audio bus to use for sound playback. .. rst-class:: classref-property -:ref:`bool<class_bool>` **expand** = ``false`` +:ref:`bool<class_bool>` **expand** = ``false`` :ref:`🔗<class_VideoStreamPlayer_property_expand>` .. rst-class:: classref-property-setget -- void **set_expand** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_expand** **(** **)** +- |void| **set_expand**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_expand**\ (\ ) If ``true``, the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions. @@ -196,12 +201,12 @@ If ``true``, the video scales to the control size. Otherwise, the control minimu .. rst-class:: classref-property -:ref:`bool<class_bool>` **loop** = ``false`` +:ref:`bool<class_bool>` **loop** = ``false`` :ref:`🔗<class_VideoStreamPlayer_property_loop>` .. rst-class:: classref-property-setget -- void **set_loop** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_loop** **(** **)** +- |void| **set_loop**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_loop**\ (\ ) If ``true``, the video restarts when it reaches its end. @@ -213,12 +218,12 @@ If ``true``, the video restarts when it reaches its end. .. rst-class:: classref-property -:ref:`bool<class_bool>` **paused** = ``false`` +:ref:`bool<class_bool>` **paused** = ``false`` :ref:`🔗<class_VideoStreamPlayer_property_paused>` .. rst-class:: classref-property-setget -- void **set_paused** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_paused** **(** **)** +- |void| **set_paused**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_paused**\ (\ ) If ``true``, the video is paused. @@ -230,12 +235,12 @@ If ``true``, the video is paused. .. rst-class:: classref-property -:ref:`VideoStream<class_VideoStream>` **stream** +:ref:`VideoStream<class_VideoStream>` **stream** :ref:`🔗<class_VideoStreamPlayer_property_stream>` .. rst-class:: classref-property-setget -- void **set_stream** **(** :ref:`VideoStream<class_VideoStream>` value **)** -- :ref:`VideoStream<class_VideoStream>` **get_stream** **(** **)** +- |void| **set_stream**\ (\ value\: :ref:`VideoStream<class_VideoStream>`\ ) +- :ref:`VideoStream<class_VideoStream>` **get_stream**\ (\ ) The assigned video stream. See description for supported formats. @@ -247,12 +252,12 @@ The assigned video stream. See description for supported formats. .. rst-class:: classref-property -:ref:`float<class_float>` **stream_position** +:ref:`float<class_float>` **stream_position** :ref:`🔗<class_VideoStreamPlayer_property_stream_position>` .. rst-class:: classref-property-setget -- void **set_stream_position** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_stream_position** **(** **)** +- |void| **set_stream_position**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_stream_position**\ (\ ) The current position of the stream, in seconds. @@ -266,12 +271,12 @@ The current position of the stream, in seconds. .. rst-class:: classref-property -:ref:`float<class_float>` **volume** +:ref:`float<class_float>` **volume** :ref:`🔗<class_VideoStreamPlayer_property_volume>` .. rst-class:: classref-property-setget -- void **set_volume** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volume** **(** **)** +- |void| **set_volume**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volume**\ (\ ) Audio volume as a linear value. @@ -283,12 +288,12 @@ Audio volume as a linear value. .. rst-class:: classref-property -:ref:`float<class_float>` **volume_db** = ``0.0`` +:ref:`float<class_float>` **volume_db** = ``0.0`` :ref:`🔗<class_VideoStreamPlayer_property_volume_db>` .. rst-class:: classref-property-setget -- void **set_volume_db** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_volume_db** **(** **)** +- |void| **set_volume_db**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_volume_db**\ (\ ) Audio volume in dB. @@ -305,7 +310,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float<class_float>` **get_stream_length** **(** **)** |const| +:ref:`float<class_float>` **get_stream_length**\ (\ ) |const| :ref:`🔗<class_VideoStreamPlayer_method_get_stream_length>` The length of the current stream, in seconds. @@ -319,7 +324,7 @@ The length of the current stream, in seconds. .. rst-class:: classref-method -:ref:`String<class_String>` **get_stream_name** **(** **)** |const| +:ref:`String<class_String>` **get_stream_name**\ (\ ) |const| :ref:`🔗<class_VideoStreamPlayer_method_get_stream_name>` Returns the video stream's name, or ``"<No Stream>"`` if no video stream is assigned. @@ -331,7 +336,7 @@ Returns the video stream's name, or ``"<No Stream>"`` if no video stream is assi .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_video_texture** **(** **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_video_texture**\ (\ ) |const| :ref:`🔗<class_VideoStreamPlayer_method_get_video_texture>` Returns the current frame as a :ref:`Texture2D<class_Texture2D>`. @@ -343,7 +348,7 @@ Returns the current frame as a :ref:`Texture2D<class_Texture2D>`. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_playing** **(** **)** |const| +:ref:`bool<class_bool>` **is_playing**\ (\ ) |const| :ref:`🔗<class_VideoStreamPlayer_method_is_playing>` Returns ``true`` if the video is playing. @@ -357,7 +362,7 @@ Returns ``true`` if the video is playing. .. rst-class:: classref-method -void **play** **(** **)** +|void| **play**\ (\ ) :ref:`🔗<class_VideoStreamPlayer_method_play>` Starts the video playback from the beginning. If the video is paused, this will not unpause the video. @@ -369,7 +374,7 @@ Starts the video playback from the beginning. If the video is paused, this will .. rst-class:: classref-method -void **stop** **(** **)** +|void| **stop**\ (\ ) :ref:`🔗<class_VideoStreamPlayer_method_stop>` Stops the video playback and sets the stream position to 0. @@ -382,3 +387,4 @@ Stops the video playback and sets the stream position to 0. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_videostreamtheora.rst b/classes/class_videostreamtheora.rst index 75b54240914..b331e03888d 100644 --- a/classes/class_videostreamtheora.rst +++ b/classes/class_videostreamtheora.rst @@ -30,3 +30,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_viewport.rst b/classes/class_viewport.rst index 568e442d519..a49e66d7ff7 100644 --- a/classes/class_viewport.rst +++ b/classes/class_viewport.rst @@ -21,7 +21,7 @@ Abstract base class for viewports. Encapsulates drawing and interaction with a g Description ----------- -A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too. +A **Viewport** creates a different view into the screen, or a sub-view inside another viewport. Child 2D nodes will display on it, and child Camera3D 3D nodes will render on it too. Optionally, a viewport can have its own 2D or 3D world, so it doesn't share what it draws with other viewports. @@ -40,17 +40,17 @@ Tutorials - :doc:`Viewport and canvas transforms <../tutorials/2d/2d_transforms>` -- `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__ +- `GUI in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2807>`__ -- `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__ +- `3D in 2D Viewport Demo <https://godotengine.org/asset-library/asset/2804>`__ -- `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__ +- `2D in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2803>`__ -- `Screen Capture Demo <https://godotengine.org/asset-library/asset/130>`__ +- `Screen Capture Demo <https://godotengine.org/asset-library/asset/2808>`__ -- `Dynamic Split Screen Demo <https://godotengine.org/asset-library/asset/541>`__ +- `Dynamic Split Screen Demo <https://godotengine.org/asset-library/asset/2806>`__ -- `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__ +- `3D Resolution Scaling Demo <https://godotengine.org/asset-library/asset/2805>`__ .. rst-class:: classref-reftable-group @@ -99,6 +99,8 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`physics_object_picking<class_Viewport_property_physics_object_picking>` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool<class_bool>` | :ref:`physics_object_picking_first_only<class_Viewport_property_physics_object_picking_first_only>` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`physics_object_picking_sort<class_Viewport_property_physics_object_picking_sort>` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`positional_shadow_atlas_16_bits<class_Viewport_property_positional_shadow_atlas_16_bits>` | ``true`` | @@ -133,6 +135,8 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`use_debanding<class_Viewport_property_use_debanding>` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`bool<class_bool>` | :ref:`use_hdr_2d<class_Viewport_property_use_hdr_2d>` | ``false`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`use_occlusion_culling<class_Viewport_property_use_occlusion_culling>` | ``false`` | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`bool<class_bool>` | :ref:`use_taa<class_Viewport_property_use_taa>` | ``false`` | @@ -143,6 +147,8 @@ Properties +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`Texture2D<class_Texture2D>` | :ref:`vrs_texture<class_Viewport_property_vrs_texture>` | | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ + | :ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` | :ref:`vrs_update_mode<class_Viewport_property_vrs_update_mode>` | ``1`` | + +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`World2D<class_World2D>` | :ref:`world_2d<class_Viewport_property_world_2d>` | | +-----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------+ | :ref:`World3D<class_World3D>` | :ref:`world_3d<class_Viewport_property_world_3d>` | | @@ -156,61 +162,65 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World2D<class_World2D>` | :ref:`find_world_2d<class_Viewport_method_find_world_2d>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World3D<class_World3D>` | :ref:`find_world_3d<class_Viewport_method_find_world_3d>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Camera2D<class_Camera2D>` | :ref:`get_camera_2d<class_Viewport_method_get_camera_2d>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Camera3D<class_Camera3D>` | :ref:`get_camera_3d<class_Viewport_method_get_camera_3d>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_canvas_cull_mask_bit<class_Viewport_method_get_canvas_cull_mask_bit>` **(** :ref:`int<class_int>` layer **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_final_transform<class_Viewport_method_get_final_transform>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_mouse_position<class_Viewport_method_get_mouse_position>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` | :ref:`get_positional_shadow_atlas_quadrant_subdiv<class_Viewport_method_get_positional_shadow_atlas_quadrant_subdiv>` **(** :ref:`int<class_int>` quadrant **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_render_info<class_Viewport_method_get_render_info>` **(** :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` type, :ref:`RenderInfo<enum_Viewport_RenderInfo>` info **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D<class_Transform2D>` | :ref:`get_screen_transform<class_Viewport_method_get_screen_transform>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ViewportTexture<class_ViewportTexture>` | :ref:`get_texture<class_Viewport_method_get_texture>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_viewport_rid<class_Viewport_method_get_viewport_rid>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2<class_Rect2>` | :ref:`get_visible_rect<class_Viewport_method_get_visible_rect>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`gui_get_drag_data<class_Viewport_method_gui_get_drag_data>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control<class_Control>` | :ref:`gui_get_focus_owner<class_Viewport_method_gui_get_focus_owner>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`gui_is_drag_successful<class_Viewport_method_gui_is_drag_successful>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`gui_is_dragging<class_Viewport_method_gui_is_dragging>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`gui_release_focus<class_Viewport_method_gui_release_focus>` **(** **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_input_handled<class_Viewport_method_is_input_handled>` **(** **)** |const| | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_input<class_Viewport_method_push_input>` **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` in_local_coords=false **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_text_input<class_Viewport_method_push_text_input>` **(** :ref:`String<class_String>` text **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_unhandled_input<class_Viewport_method_push_unhandled_input>` **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` in_local_coords=false **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_canvas_cull_mask_bit<class_Viewport_method_set_canvas_cull_mask_bit>` **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enable **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>` **(** **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_positional_shadow_atlas_quadrant_subdiv<class_Viewport_method_set_positional_shadow_atlas_quadrant_subdiv>` **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_mouse_cursor_state<class_Viewport_method_update_mouse_cursor_state>` **(** **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`warp_mouse<class_Viewport_method_warp_mouse>` **(** :ref:`Vector2<class_Vector2>` position **)** | - +-----------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World2D<class_World2D>` | :ref:`find_world_2d<class_Viewport_method_find_world_2d>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World3D<class_World3D>` | :ref:`find_world_3d<class_Viewport_method_find_world_3d>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera2D<class_Camera2D>` | :ref:`get_camera_2d<class_Viewport_method_get_camera_2d>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Camera3D<class_Camera3D>` | :ref:`get_camera_3d<class_Viewport_method_get_camera_3d>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_canvas_cull_mask_bit<class_Viewport_method_get_canvas_cull_mask_bit>`\ (\ layer\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Window<class_Window>`\] | :ref:`get_embedded_subwindows<class_Viewport_method_get_embedded_subwindows>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_final_transform<class_Viewport_method_get_final_transform>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_mouse_position<class_Viewport_method_get_mouse_position>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` | :ref:`get_positional_shadow_atlas_quadrant_subdiv<class_Viewport_method_get_positional_shadow_atlas_quadrant_subdiv>`\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_render_info<class_Viewport_method_get_render_info>`\ (\ type\: :ref:`RenderInfoType<enum_Viewport_RenderInfoType>`, info\: :ref:`RenderInfo<enum_Viewport_RenderInfo>`\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D<class_Transform2D>` | :ref:`get_screen_transform<class_Viewport_method_get_screen_transform>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ViewportTexture<class_ViewportTexture>` | :ref:`get_texture<class_Viewport_method_get_texture>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_viewport_rid<class_Viewport_method_get_viewport_rid>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2<class_Rect2>` | :ref:`get_visible_rect<class_Viewport_method_get_visible_rect>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`gui_get_drag_data<class_Viewport_method_gui_get_drag_data>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`gui_get_focus_owner<class_Viewport_method_gui_get_focus_owner>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control<class_Control>` | :ref:`gui_get_hovered_control<class_Viewport_method_gui_get_hovered_control>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`gui_is_drag_successful<class_Viewport_method_gui_is_drag_successful>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`gui_is_dragging<class_Viewport_method_gui_is_dragging>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`gui_release_focus<class_Viewport_method_gui_release_focus>`\ (\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_input_handled<class_Viewport_method_is_input_handled>`\ (\ ) |const| | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_input<class_Viewport_method_push_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`, in_local_coords\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_text_input<class_Viewport_method_push_text_input>`\ (\ text\: :ref:`String<class_String>`\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`push_unhandled_input<class_Viewport_method_push_unhandled_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`, in_local_coords\: :ref:`bool<class_bool>` = false\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_canvas_cull_mask_bit<class_Viewport_method_set_canvas_cull_mask_bit>`\ (\ layer\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>`\ (\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_positional_shadow_atlas_quadrant_subdiv<class_Viewport_method_set_positional_shadow_atlas_quadrant_subdiv>`\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_mouse_cursor_state<class_Viewport_method_update_mouse_cursor_state>`\ (\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`warp_mouse<class_Viewport_method_warp_mouse>`\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) | + +-----------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -225,10 +235,12 @@ Signals .. rst-class:: classref-signal -**gui_focus_changed** **(** :ref:`Control<class_Control>` node **)** +**gui_focus_changed**\ (\ node\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_Viewport_signal_gui_focus_changed>` Emitted when a Control node grabs keyboard focus. +\ **Note:** A Control node losing focus doesn't cause this signal to be emitted. + .. rst-class:: classref-item-separator ---- @@ -237,7 +249,7 @@ Emitted when a Control node grabs keyboard focus. .. rst-class:: classref-signal -**size_changed** **(** **)** +**size_changed**\ (\ ) :ref:`🔗<class_Viewport_signal_size_changed>` Emitted when the size of the viewport is changed, whether by resizing of window, or some other means. @@ -254,7 +266,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PositionalShadowAtlasQuadrantSubdiv**: +enum **PositionalShadowAtlasQuadrantSubdiv**: :ref:`🔗<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` .. _class_Viewport_constant_SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED: @@ -328,7 +340,7 @@ Represents the size of the :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewpo .. rst-class:: classref-enumeration -enum **Scaling3DMode**: +enum **Scaling3DMode**: :ref:`🔗<enum_Viewport_Scaling3DMode>` .. _class_Viewport_constant_SCALING_3D_MODE_BILINEAR: @@ -346,11 +358,19 @@ Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale<class_Viewport_property_scaling_3d_scale>`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` disables scaling. +.. _class_Viewport_constant_SCALING_3D_MODE_FSR2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **SCALING_3D_MODE_FSR2** = ``2`` + +Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using :ref:`scaling_3d_scale<class_Viewport_property_scaling_3d_scale>`. Values less than ``1.0`` will be result in the viewport being upscaled using FSR2. Values greater than ``1.0`` are not supported and bilinear downsampling will be used instead. A value of ``1.0`` will use FSR2 at native resolution as a TAA solution. + .. _class_Viewport_constant_SCALING_3D_MODE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **SCALING_3D_MODE_MAX** = ``2`` +:ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **SCALING_3D_MODE_MAX** = ``3`` Represents the size of the :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` enum. @@ -362,7 +382,7 @@ Represents the size of the :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` enu .. rst-class:: classref-enumeration -enum **MSAA**: +enum **MSAA**: :ref:`🔗<enum_Viewport_MSAA>` .. _class_Viewport_constant_MSAA_DISABLED: @@ -412,7 +432,7 @@ Represents the size of the :ref:`MSAA<enum_Viewport_MSAA>` enum. .. rst-class:: classref-enumeration -enum **ScreenSpaceAA**: +enum **ScreenSpaceAA**: :ref:`🔗<enum_Viewport_ScreenSpaceAA>` .. _class_Viewport_constant_SCREEN_SPACE_AA_DISABLED: @@ -446,7 +466,7 @@ Represents the size of the :ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` enu .. rst-class:: classref-enumeration -enum **RenderInfo**: +enum **RenderInfo**: :ref:`🔗<enum_Viewport_RenderInfo>` .. _class_Viewport_constant_RENDER_INFO_OBJECTS_IN_FRAME: @@ -488,7 +508,7 @@ Represents the size of the :ref:`RenderInfo<enum_Viewport_RenderInfo>` enum. .. rst-class:: classref-enumeration -enum **RenderInfoType**: +enum **RenderInfoType**: :ref:`🔗<enum_Viewport_RenderInfoType>` .. _class_Viewport_constant_RENDER_INFO_TYPE_VISIBLE: @@ -496,7 +516,7 @@ enum **RenderInfoType**: :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` **RENDER_INFO_TYPE_VISIBLE** = ``0`` - +Visible render pass (excluding shadows). .. _class_Viewport_constant_RENDER_INFO_TYPE_SHADOW: @@ -504,15 +524,23 @@ enum **RenderInfoType**: :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` **RENDER_INFO_TYPE_SHADOW** = ``1`` +Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. + +.. _class_Viewport_constant_RENDER_INFO_TYPE_CANVAS: + +.. rst-class:: classref-enumeration-constant + +:ref:`RenderInfoType<enum_Viewport_RenderInfoType>` **RENDER_INFO_TYPE_CANVAS** = ``2`` +Canvas item rendering. This includes all 2D rendering. .. _class_Viewport_constant_RENDER_INFO_TYPE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`RenderInfoType<enum_Viewport_RenderInfoType>` **RENDER_INFO_TYPE_MAX** = ``2`` - +:ref:`RenderInfoType<enum_Viewport_RenderInfoType>` **RENDER_INFO_TYPE_MAX** = ``3`` +Represents the size of the :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` enum. .. rst-class:: classref-item-separator @@ -522,7 +550,7 @@ enum **RenderInfoType**: .. rst-class:: classref-enumeration -enum **DebugDraw**: +enum **DebugDraw**: :ref:`🔗<enum_Viewport_DebugDraw>` .. _class_Viewport_constant_DEBUG_DRAW_DISABLED: @@ -546,7 +574,7 @@ Objects are displayed without light information. :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_LIGHTING** = ``2`` - +Objects are displayed without textures and only with lighting information. .. _class_Viewport_constant_DEBUG_DRAW_OVERDRAW: @@ -562,7 +590,7 @@ Objects are displayed semi-transparent with additive blending so you can see whe :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_WIREFRAME** = ``4`` -Objects are displayed in wireframe style. +Objects are displayed as wireframe models. .. _class_Viewport_constant_DEBUG_DRAW_NORMAL_BUFFER: @@ -570,7 +598,7 @@ Objects are displayed in wireframe style. :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_NORMAL_BUFFER** = ``5`` - +Objects are displayed without lighting information and their textures replaced by normal mapping. .. _class_Viewport_constant_DEBUG_DRAW_VOXEL_GI_ALBEDO: @@ -618,7 +646,7 @@ Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D<class_D :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_SCENE_LUMINANCE** = ``11`` - +Draws the scene luminance buffer (if available) in the upper left quadrant of the **Viewport**. .. _class_Viewport_constant_DEBUG_DRAW_SSAO: @@ -658,7 +686,9 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_SDFGI** = ``16`` +Draws the cascades used to render signed distance field global illumination (SDFGI). +Does nothing if the current environment's :ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>` is ``false`` or SDFGI is not supported on the platform. .. _class_Viewport_constant_DEBUG_DRAW_SDFGI_PROBES: @@ -666,7 +696,9 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_SDFGI_PROBES** = ``17`` +Draws the probes used for signed distance field global illumination (SDFGI). +Does nothing if the current environment's :ref:`Environment.sdfgi_enabled<class_Environment_property_sdfgi_enabled>` is ``false`` or SDFGI is not supported on the platform. .. _class_Viewport_constant_DEBUG_DRAW_GI_BUFFER: @@ -674,7 +706,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_GI_BUFFER** = ``18`` - +Draws the buffer used for global illumination (GI). .. _class_Viewport_constant_DEBUG_DRAW_DISABLE_LOD: @@ -682,7 +714,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_DISABLE_LOD** = ``19`` - +Draws all of the objects at their highest polycount, without low level of detail (LOD). .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS: @@ -690,7 +722,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_CLUSTER_OMNI_LIGHTS** = ``20`` - +Draws the cluster used by :ref:`OmniLight3D<class_OmniLight3D>` nodes to optimize light rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS: @@ -698,7 +730,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_CLUSTER_SPOT_LIGHTS** = ``21`` - +Draws the cluster used by :ref:`SpotLight3D<class_SpotLight3D>` nodes to optimize light rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_DECALS: @@ -706,7 +738,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_CLUSTER_DECALS** = ``22`` - +Draws the cluster used by :ref:`Decal<class_Decal>` nodes to optimize decal rendering. .. _class_Viewport_constant_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES: @@ -714,7 +746,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_CLUSTER_REFLECTION_PROBES** = ``23`` - +Draws the cluster used by :ref:`ReflectionProbe<class_ReflectionProbe>` nodes to optimize decal rendering. .. _class_Viewport_constant_DEBUG_DRAW_OCCLUDERS: @@ -722,7 +754,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_OCCLUDERS** = ``24`` - +Draws the buffer used for occlusion culling. .. _class_Viewport_constant_DEBUG_DRAW_MOTION_VECTORS: @@ -730,7 +762,15 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t :ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_MOTION_VECTORS** = ``25`` +Draws vector lines over the viewport to indicate the movement of pixels between frames. +.. _class_Viewport_constant_DEBUG_DRAW_INTERNAL_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw<enum_Viewport_DebugDraw>` **DEBUG_DRAW_INTERNAL_BUFFER** = ``26`` + +Draws the internal resolution buffer of the scene before post-processing is applied. .. rst-class:: classref-item-separator @@ -740,7 +780,7 @@ Draws the decal atlas used by :ref:`Decal<class_Decal>`\ s and light projector t .. rst-class:: classref-enumeration -enum **DefaultCanvasItemTextureFilter**: +enum **DefaultCanvasItemTextureFilter**: :ref:`🔗<enum_Viewport_DefaultCanvasItemTextureFilter>` .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST: @@ -748,7 +788,7 @@ enum **DefaultCanvasItemTextureFilter**: :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST** = ``0`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR: @@ -756,7 +796,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR** = ``1`` -The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: @@ -764,7 +804,9 @@ The texture filter blends between the nearest 4 pixels. Use this when you want t :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS** = ``2`` -The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS: @@ -772,7 +814,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. The faste :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS** = ``3`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX: @@ -780,7 +824,7 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_MAX** = ``4`` -Max value for :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` enum. +Represents the size of the :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` enum. .. rst-class:: classref-item-separator @@ -790,7 +834,7 @@ Max value for :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasIt .. rst-class:: classref-enumeration -enum **DefaultCanvasItemTextureRepeat**: +enum **DefaultCanvasItemTextureRepeat**: :ref:`🔗<enum_Viewport_DefaultCanvasItemTextureRepeat>` .. _class_Viewport_constant_DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_DISABLED: @@ -822,7 +866,7 @@ Flip the texture when repeating so that the edge lines up instead of abruptly ch :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` **DEFAULT_CANVAS_ITEM_TEXTURE_REPEAT_MAX** = ``3`` -Max value for :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` enum. +Represents the size of the :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` enum. .. rst-class:: classref-item-separator @@ -832,7 +876,7 @@ Max value for :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasIt .. rst-class:: classref-enumeration -enum **SDFOversize**: +enum **SDFOversize**: :ref:`🔗<enum_Viewport_SDFOversize>` .. _class_Viewport_constant_SDF_OVERSIZE_100_PERCENT: @@ -840,7 +884,7 @@ enum **SDFOversize**: :ref:`SDFOversize<enum_Viewport_SDFOversize>` **SDF_OVERSIZE_100_PERCENT** = ``0`` - +The signed distance field only covers the viewport's own rectangle. .. _class_Viewport_constant_SDF_OVERSIZE_120_PERCENT: @@ -848,7 +892,7 @@ enum **SDFOversize**: :ref:`SDFOversize<enum_Viewport_SDFOversize>` **SDF_OVERSIZE_120_PERCENT** = ``1`` - +The signed distance field is expanded to cover 20% of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_150_PERCENT: @@ -856,7 +900,7 @@ enum **SDFOversize**: :ref:`SDFOversize<enum_Viewport_SDFOversize>` **SDF_OVERSIZE_150_PERCENT** = ``2`` - +The signed distance field is expanded to cover 50% of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_200_PERCENT: @@ -864,7 +908,7 @@ enum **SDFOversize**: :ref:`SDFOversize<enum_Viewport_SDFOversize>` **SDF_OVERSIZE_200_PERCENT** = ``3`` - +The signed distance field is expanded to cover 100% (double) of the viewport's size around the borders. .. _class_Viewport_constant_SDF_OVERSIZE_MAX: @@ -872,7 +916,7 @@ enum **SDFOversize**: :ref:`SDFOversize<enum_Viewport_SDFOversize>` **SDF_OVERSIZE_MAX** = ``4`` - +Represents the size of the :ref:`SDFOversize<enum_Viewport_SDFOversize>` enum. .. rst-class:: classref-item-separator @@ -882,7 +926,7 @@ enum **SDFOversize**: .. rst-class:: classref-enumeration -enum **SDFScale**: +enum **SDFScale**: :ref:`🔗<enum_Viewport_SDFScale>` .. _class_Viewport_constant_SDF_SCALE_100_PERCENT: @@ -890,7 +934,7 @@ enum **SDFScale**: :ref:`SDFScale<enum_Viewport_SDFScale>` **SDF_SCALE_100_PERCENT** = ``0`` - +The signed distance field is rendered at full resolution. .. _class_Viewport_constant_SDF_SCALE_50_PERCENT: @@ -898,7 +942,7 @@ enum **SDFScale**: :ref:`SDFScale<enum_Viewport_SDFScale>` **SDF_SCALE_50_PERCENT** = ``1`` - +The signed distance field is rendered at half the resolution of this viewport. .. _class_Viewport_constant_SDF_SCALE_25_PERCENT: @@ -906,7 +950,7 @@ enum **SDFScale**: :ref:`SDFScale<enum_Viewport_SDFScale>` **SDF_SCALE_25_PERCENT** = ``2`` - +The signed distance field is rendered at a quarter the resolution of this viewport. .. _class_Viewport_constant_SDF_SCALE_MAX: @@ -914,7 +958,7 @@ enum **SDFScale**: :ref:`SDFScale<enum_Viewport_SDFScale>` **SDF_SCALE_MAX** = ``3`` - +Represents the size of the :ref:`SDFScale<enum_Viewport_SDFScale>` enum. .. rst-class:: classref-item-separator @@ -924,7 +968,7 @@ enum **SDFScale**: .. rst-class:: classref-enumeration -enum **VRSMode**: +enum **VRSMode**: :ref:`🔗<enum_Viewport_VRSMode>` .. _class_Viewport_constant_VRS_DISABLED: @@ -932,7 +976,7 @@ enum **VRSMode**: :ref:`VRSMode<enum_Viewport_VRSMode>` **VRS_DISABLED** = ``0`` -VRS is disabled. +Variable Rate Shading is disabled. .. _class_Viewport_constant_VRS_TEXTURE: @@ -940,7 +984,7 @@ VRS is disabled. :ref:`VRSMode<enum_Viewport_VRSMode>` **VRS_TEXTURE** = ``1`` -VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. +Variable Rate Shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. .. _class_Viewport_constant_VRS_XR: @@ -948,7 +992,7 @@ VRS uses a texture. Note, for stereoscopic use a texture atlas with a texture fo :ref:`VRSMode<enum_Viewport_VRSMode>` **VRS_XR** = ``2`` -VRS texture is supplied by the primary :ref:`XRInterface<class_XRInterface>`. +Variable Rate Shading's texture is supplied by the primary :ref:`XRInterface<class_XRInterface>`. .. _class_Viewport_constant_VRS_MAX: @@ -958,6 +1002,48 @@ VRS texture is supplied by the primary :ref:`XRInterface<class_XRInterface>`. Represents the size of the :ref:`VRSMode<enum_Viewport_VRSMode>` enum. +.. rst-class:: classref-item-separator + +---- + +.. _enum_Viewport_VRSUpdateMode: + +.. rst-class:: classref-enumeration + +enum **VRSUpdateMode**: :ref:`🔗<enum_Viewport_VRSUpdateMode>` + +.. _class_Viewport_constant_VRS_UPDATE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **VRS_UPDATE_DISABLED** = ``0`` + +The input texture for variable rate shading will not be processed. + +.. _class_Viewport_constant_VRS_UPDATE_ONCE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **VRS_UPDATE_ONCE** = ``1`` + +The input texture for variable rate shading will be processed once. + +.. _class_Viewport_constant_VRS_UPDATE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **VRS_UPDATE_ALWAYS** = ``2`` + +The input texture for variable rate shading will be processed each frame. + +.. _class_Viewport_constant_VRS_UPDATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **VRS_UPDATE_MAX** = ``3`` + +Represents the size of the :ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` enum. + .. rst-class:: classref-section-separator ---- @@ -971,12 +1057,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **audio_listener_enable_2d** = ``false`` +:ref:`bool<class_bool>` **audio_listener_enable_2d** = ``false`` :ref:`🔗<class_Viewport_property_audio_listener_enable_2d>` .. rst-class:: classref-property-setget -- void **set_as_audio_listener_2d** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_audio_listener_2d** **(** **)** +- |void| **set_as_audio_listener_2d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_audio_listener_2d**\ (\ ) If ``true``, the viewport will process 2D audio streams. @@ -988,12 +1074,12 @@ If ``true``, the viewport will process 2D audio streams. .. rst-class:: classref-property -:ref:`bool<class_bool>` **audio_listener_enable_3d** = ``false`` +:ref:`bool<class_bool>` **audio_listener_enable_3d** = ``false`` :ref:`🔗<class_Viewport_property_audio_listener_enable_3d>` .. rst-class:: classref-property-setget -- void **set_as_audio_listener_3d** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_audio_listener_3d** **(** **)** +- |void| **set_as_audio_listener_3d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_audio_listener_3d**\ (\ ) If ``true``, the viewport will process 3D audio streams. @@ -1005,12 +1091,12 @@ If ``true``, the viewport will process 3D audio streams. .. rst-class:: classref-property -:ref:`int<class_int>` **canvas_cull_mask** = ``4294967295`` +:ref:`int<class_int>` **canvas_cull_mask** = ``4294967295`` :ref:`🔗<class_Viewport_property_canvas_cull_mask>` .. rst-class:: classref-property-setget -- void **set_canvas_cull_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_canvas_cull_mask** **(** **)** +- |void| **set_canvas_cull_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_canvas_cull_mask**\ (\ ) The rendering layers in which this **Viewport** renders :ref:`CanvasItem<class_CanvasItem>` nodes. @@ -1022,12 +1108,12 @@ The rendering layers in which this **Viewport** renders :ref:`CanvasItem<class_C .. rst-class:: classref-property -:ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **canvas_item_default_texture_filter** = ``1`` +:ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **canvas_item_default_texture_filter** = ``1`` :ref:`🔗<class_Viewport_property_canvas_item_default_texture_filter>` .. rst-class:: classref-property-setget -- void **set_default_canvas_item_texture_filter** **(** :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` value **)** -- :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **get_default_canvas_item_texture_filter** **(** **)** +- |void| **set_default_canvas_item_texture_filter**\ (\ value\: :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>`\ ) +- :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` **get_default_canvas_item_texture_filter**\ (\ ) Sets the default filter mode used by :ref:`CanvasItem<class_CanvasItem>`\ s in this Viewport. See :ref:`DefaultCanvasItemTextureFilter<enum_Viewport_DefaultCanvasItemTextureFilter>` for options. @@ -1039,12 +1125,12 @@ Sets the default filter mode used by :ref:`CanvasItem<class_CanvasItem>`\ s in t .. rst-class:: classref-property -:ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` **canvas_item_default_texture_repeat** = ``0`` +:ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` **canvas_item_default_texture_repeat** = ``0`` :ref:`🔗<class_Viewport_property_canvas_item_default_texture_repeat>` .. rst-class:: classref-property-setget -- void **set_default_canvas_item_texture_repeat** **(** :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` value **)** -- :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` **get_default_canvas_item_texture_repeat** **(** **)** +- |void| **set_default_canvas_item_texture_repeat**\ (\ value\: :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>`\ ) +- :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` **get_default_canvas_item_texture_repeat**\ (\ ) Sets the default repeat mode used by :ref:`CanvasItem<class_CanvasItem>`\ s in this Viewport. See :ref:`DefaultCanvasItemTextureRepeat<enum_Viewport_DefaultCanvasItemTextureRepeat>` for options. @@ -1056,12 +1142,12 @@ Sets the default repeat mode used by :ref:`CanvasItem<class_CanvasItem>`\ s in t .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **canvas_transform** +:ref:`Transform2D<class_Transform2D>` **canvas_transform** :ref:`🔗<class_Viewport_property_canvas_transform>` .. rst-class:: classref-property-setget -- void **set_canvas_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_canvas_transform** **(** **)** +- |void| **set_canvas_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_canvas_transform**\ (\ ) The canvas transform of the viewport, useful for changing the on-screen positions of all child :ref:`CanvasItem<class_CanvasItem>`\ s. This is relative to the global canvas transform of the viewport. @@ -1073,12 +1159,12 @@ The canvas transform of the viewport, useful for changing the on-screen position .. rst-class:: classref-property -:ref:`DebugDraw<enum_Viewport_DebugDraw>` **debug_draw** = ``0`` +:ref:`DebugDraw<enum_Viewport_DebugDraw>` **debug_draw** = ``0`` :ref:`🔗<class_Viewport_property_debug_draw>` .. rst-class:: classref-property-setget -- void **set_debug_draw** **(** :ref:`DebugDraw<enum_Viewport_DebugDraw>` value **)** -- :ref:`DebugDraw<enum_Viewport_DebugDraw>` **get_debug_draw** **(** **)** +- |void| **set_debug_draw**\ (\ value\: :ref:`DebugDraw<enum_Viewport_DebugDraw>`\ ) +- :ref:`DebugDraw<enum_Viewport_DebugDraw>` **get_debug_draw**\ (\ ) The overlay mode for test rendered geometry in debug purposes. @@ -1090,12 +1176,12 @@ The overlay mode for test rendered geometry in debug purposes. .. rst-class:: classref-property -:ref:`bool<class_bool>` **disable_3d** = ``false`` +:ref:`bool<class_bool>` **disable_3d** = ``false`` :ref:`🔗<class_Viewport_property_disable_3d>` .. rst-class:: classref-property-setget -- void **set_disable_3d** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_3d_disabled** **(** **)** +- |void| **set_disable_3d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_3d_disabled**\ (\ ) Disable 3D rendering (but keep 2D rendering). @@ -1107,12 +1193,12 @@ Disable 3D rendering (but keep 2D rendering). .. rst-class:: classref-property -:ref:`float<class_float>` **fsr_sharpness** = ``0.2`` +:ref:`float<class_float>` **fsr_sharpness** = ``0.2`` :ref:`🔗<class_Viewport_property_fsr_sharpness>` .. rst-class:: classref-property-setget -- void **set_fsr_sharpness** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_fsr_sharpness** **(** **)** +- |void| **set_fsr_sharpness**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_fsr_sharpness**\ (\ ) Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference. @@ -1126,12 +1212,12 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren .. rst-class:: classref-property -:ref:`Transform2D<class_Transform2D>` **global_canvas_transform** +:ref:`Transform2D<class_Transform2D>` **global_canvas_transform** :ref:`🔗<class_Viewport_property_global_canvas_transform>` .. rst-class:: classref-property-setget -- void **set_global_canvas_transform** **(** :ref:`Transform2D<class_Transform2D>` value **)** -- :ref:`Transform2D<class_Transform2D>` **get_global_canvas_transform** **(** **)** +- |void| **set_global_canvas_transform**\ (\ value\: :ref:`Transform2D<class_Transform2D>`\ ) +- :ref:`Transform2D<class_Transform2D>` **get_global_canvas_transform**\ (\ ) The global canvas transform of the viewport. The canvas transform is relative to this. @@ -1143,12 +1229,12 @@ The global canvas transform of the viewport. The canvas transform is relative to .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui_disable_input** = ``false`` +:ref:`bool<class_bool>` **gui_disable_input** = ``false`` :ref:`🔗<class_Viewport_property_gui_disable_input>` .. rst-class:: classref-property-setget -- void **set_disable_input** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_input_disabled** **(** **)** +- |void| **set_disable_input**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_input_disabled**\ (\ ) If ``true``, the viewport will not receive input events. @@ -1160,12 +1246,12 @@ If ``true``, the viewport will not receive input events. .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui_embed_subwindows** = ``false`` +:ref:`bool<class_bool>` **gui_embed_subwindows** = ``false`` :ref:`🔗<class_Viewport_property_gui_embed_subwindows>` .. rst-class:: classref-property-setget -- void **set_embedding_subwindows** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_embedding_subwindows** **(** **)** +- |void| **set_embedding_subwindows**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_embedding_subwindows**\ (\ ) If ``true``, sub-windows (popups and dialogs) will be embedded inside application window as control-like nodes. If ``false``, they will appear as separate windows handled by the operating system. @@ -1177,12 +1263,12 @@ If ``true``, sub-windows (popups and dialogs) will be embedded inside applicatio .. rst-class:: classref-property -:ref:`bool<class_bool>` **gui_snap_controls_to_pixels** = ``true`` +:ref:`bool<class_bool>` **gui_snap_controls_to_pixels** = ``true`` :ref:`🔗<class_Viewport_property_gui_snap_controls_to_pixels>` .. rst-class:: classref-property-setget -- void **set_snap_controls_to_pixels** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_snap_controls_to_pixels_enabled** **(** **)** +- |void| **set_snap_controls_to_pixels**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_snap_controls_to_pixels_enabled**\ (\ ) If ``true``, the GUI controls on the viewport will lay pixel perfectly. @@ -1194,12 +1280,12 @@ If ``true``, the GUI controls on the viewport will lay pixel perfectly. .. rst-class:: classref-property -:ref:`bool<class_bool>` **handle_input_locally** = ``true`` +:ref:`bool<class_bool>` **handle_input_locally** = ``true`` :ref:`🔗<class_Viewport_property_handle_input_locally>` .. rst-class:: classref-property-setget -- void **set_handle_input_locally** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_handling_input_locally** **(** **)** +- |void| **set_handle_input_locally**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_handling_input_locally**\ (\ ) If ``true``, this viewport will mark incoming input events as handled by itself. If ``false``, this is instead done by the first parent viewport that is set to handle input locally. @@ -1215,12 +1301,12 @@ See also :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>` .. rst-class:: classref-property -:ref:`float<class_float>` **mesh_lod_threshold** = ``1.0`` +:ref:`float<class_float>` **mesh_lod_threshold** = ``1.0`` :ref:`🔗<class_Viewport_property_mesh_lod_threshold>` .. rst-class:: classref-property-setget -- void **set_mesh_lod_threshold** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_mesh_lod_threshold** **(** **)** +- |void| **set_mesh_lod_threshold**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_mesh_lod_threshold**\ (\ ) The automatic LOD bias to use for meshes rendered within the **Viewport** (this is analogous to :ref:`ReflectionProbe.mesh_lod_threshold<class_ReflectionProbe_property_mesh_lod_threshold>`). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to ``0.0``, automatic LOD is disabled. Increase :ref:`mesh_lod_threshold<class_Viewport_property_mesh_lod_threshold>` to improve performance at the cost of geometry detail. @@ -1236,12 +1322,12 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren .. rst-class:: classref-property -:ref:`MSAA<enum_Viewport_MSAA>` **msaa_2d** = ``0`` +:ref:`MSAA<enum_Viewport_MSAA>` **msaa_2d** = ``0`` :ref:`🔗<class_Viewport_property_msaa_2d>` .. rst-class:: classref-property-setget -- void **set_msaa_2d** **(** :ref:`MSAA<enum_Viewport_MSAA>` value **)** -- :ref:`MSAA<enum_Viewport_MSAA>` **get_msaa_2d** **(** **)** +- |void| **set_msaa_2d**\ (\ value\: :ref:`MSAA<enum_Viewport_MSAA>`\ ) +- :ref:`MSAA<enum_Viewport_MSAA>` **get_msaa_2d**\ (\ ) The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. This has no effect on shader-induced aliasing or texture aliasing. @@ -1253,12 +1339,12 @@ The multisample anti-aliasing mode for 2D/Canvas rendering. A higher number resu .. rst-class:: classref-property -:ref:`MSAA<enum_Viewport_MSAA>` **msaa_3d** = ``0`` +:ref:`MSAA<enum_Viewport_MSAA>` **msaa_3d** = ``0`` :ref:`🔗<class_Viewport_property_msaa_3d>` .. rst-class:: classref-property-setget -- void **set_msaa_3d** **(** :ref:`MSAA<enum_Viewport_MSAA>` value **)** -- :ref:`MSAA<enum_Viewport_MSAA>` **get_msaa_3d** **(** **)** +- |void| **set_msaa_3d**\ (\ value\: :ref:`MSAA<enum_Viewport_MSAA>`\ ) +- :ref:`MSAA<enum_Viewport_MSAA>` **get_msaa_3d**\ (\ ) The multisample anti-aliasing mode for 3D rendering. A higher number results in smoother edges at the cost of significantly worse performance. A value of 2 or 4 is best unless targeting very high-end systems. See also bilinear scaling 3d :ref:`scaling_3d_mode<class_Viewport_property_scaling_3d_mode>` for supersampling, which provides higher quality but is much more expensive. This has no effect on shader-induced aliasing or texture aliasing. @@ -1270,12 +1356,12 @@ The multisample anti-aliasing mode for 3D rendering. A higher number results in .. rst-class:: classref-property -:ref:`bool<class_bool>` **own_world_3d** = ``false`` +:ref:`bool<class_bool>` **own_world_3d** = ``false`` :ref:`🔗<class_Viewport_property_own_world_3d>` .. rst-class:: classref-property-setget -- void **set_use_own_world_3d** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_own_world_3d** **(** **)** +- |void| **set_use_own_world_3d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_own_world_3d**\ (\ ) If ``true``, the viewport will use a unique copy of the :ref:`World3D<class_World3D>` defined in :ref:`world_3d<class_Viewport_property_world_3d>`. @@ -1287,15 +1373,38 @@ If ``true``, the viewport will use a unique copy of the :ref:`World3D<class_Worl .. rst-class:: classref-property -:ref:`bool<class_bool>` **physics_object_picking** = ``false`` +:ref:`bool<class_bool>` **physics_object_picking** = ``false`` :ref:`🔗<class_Viewport_property_physics_object_picking>` .. rst-class:: classref-property-setget -- void **set_physics_object_picking** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_physics_object_picking** **(** **)** +- |void| **set_physics_object_picking**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_physics_object_picking**\ (\ ) If ``true``, the objects rendered by viewport become subjects of mouse picking process. +\ **Note:** The number of simultaneously pickable objects is limited to 64 and they are selected in a non-deterministic order, which can be different in each picking process. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Viewport_property_physics_object_picking_first_only: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **physics_object_picking_first_only** = ``false`` :ref:`🔗<class_Viewport_property_physics_object_picking_first_only>` + +.. rst-class:: classref-property-setget + +- |void| **set_physics_object_picking_first_only**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_physics_object_picking_first_only**\ (\ ) + +If ``true``, the input_event signal will only be sent to one physics object in the mouse picking process. If you want to get the top object only, you must also enable :ref:`physics_object_picking_sort<class_Viewport_property_physics_object_picking_sort>`. + +If ``false``, an input_event signal will be sent to all physics objects in the mouse picking process. + +This applies to 2D CanvasItem object picking only. + .. rst-class:: classref-item-separator ---- @@ -1304,17 +1413,19 @@ If ``true``, the objects rendered by viewport become subjects of mouse picking p .. rst-class:: classref-property -:ref:`bool<class_bool>` **physics_object_picking_sort** = ``false`` +:ref:`bool<class_bool>` **physics_object_picking_sort** = ``false`` :ref:`🔗<class_Viewport_property_physics_object_picking_sort>` .. rst-class:: classref-property-setget -- void **set_physics_object_picking_sort** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_physics_object_picking_sort** **(** **)** +- |void| **set_physics_object_picking_sort**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_physics_object_picking_sort**\ (\ ) If ``true``, objects receive mouse picking events sorted primarily by their :ref:`CanvasItem.z_index<class_CanvasItem_property_z_index>` and secondarily by their position in the scene tree. If ``false``, the order is undetermined. \ **Note:** This setting is disabled by default because of its potential expensive computational cost. +\ **Note:** Sorting happens after selecting the pickable objects. Because of the limitation of 64 simultaneously pickable objects, it is not guaranteed that the object with the highest :ref:`CanvasItem.z_index<class_CanvasItem_property_z_index>` receives the picking event. + .. rst-class:: classref-item-separator ---- @@ -1323,12 +1434,12 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref .. rst-class:: classref-property -:ref:`bool<class_bool>` **positional_shadow_atlas_16_bits** = ``true`` +:ref:`bool<class_bool>` **positional_shadow_atlas_16_bits** = ``true`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_16_bits>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_16_bits** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_positional_shadow_atlas_16_bits** **(** **)** +- |void| **set_positional_shadow_atlas_16_bits**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_positional_shadow_atlas_16_bits**\ (\ ) Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. @@ -1340,12 +1451,12 @@ Use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows .. rst-class:: classref-property -:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_0** = ``2`` +:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_0** = ``2`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_quad_0>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** -- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant **)** |const| +- |void| **set_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) +- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| The subdivision amount of the first quadrant on the shadow atlas. @@ -1357,12 +1468,12 @@ The subdivision amount of the first quadrant on the shadow atlas. .. rst-class:: classref-property -:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_1** = ``2`` +:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_1** = ``2`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_quad_1>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** -- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant **)** |const| +- |void| **set_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) +- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| The subdivision amount of the second quadrant on the shadow atlas. @@ -1374,12 +1485,12 @@ The subdivision amount of the second quadrant on the shadow atlas. .. rst-class:: classref-property -:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_2** = ``3`` +:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_2** = ``3`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_quad_2>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** -- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant **)** |const| +- |void| **set_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) +- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| The subdivision amount of the third quadrant on the shadow atlas. @@ -1391,12 +1502,12 @@ The subdivision amount of the third quadrant on the shadow atlas. .. rst-class:: classref-property -:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_3** = ``4`` +:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **positional_shadow_atlas_quad_3** = ``4`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_quad_3>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** -- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant **)** |const| +- |void| **set_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) +- :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| The subdivision amount of the fourth quadrant on the shadow atlas. @@ -1408,12 +1519,12 @@ The subdivision amount of the fourth quadrant on the shadow atlas. .. rst-class:: classref-property -:ref:`int<class_int>` **positional_shadow_atlas_size** = ``2048`` +:ref:`int<class_int>` **positional_shadow_atlas_size** = ``2048`` :ref:`🔗<class_Viewport_property_positional_shadow_atlas_size>` .. rst-class:: classref-property-setget -- void **set_positional_shadow_atlas_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_positional_shadow_atlas_size** **(** **)** +- |void| **set_positional_shadow_atlas_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_positional_shadow_atlas_size**\ (\ ) The shadow atlas' resolution (used for omni and spot lights). The value is rounded up to the nearest power of 2. @@ -1427,12 +1538,12 @@ The shadow atlas' resolution (used for omni and spot lights). The value is round .. rst-class:: classref-property -:ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **scaling_3d_mode** = ``0`` +:ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **scaling_3d_mode** = ``0`` :ref:`🔗<class_Viewport_property_scaling_3d_mode>` .. rst-class:: classref-property-setget -- void **set_scaling_3d_mode** **(** :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` value **)** -- :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **get_scaling_3d_mode** **(** **)** +- |void| **set_scaling_3d_mode**\ (\ value\: :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>`\ ) +- :ref:`Scaling3DMode<enum_Viewport_Scaling3DMode>` **get_scaling_3d_mode**\ (\ ) Sets scaling 3d mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. @@ -1446,12 +1557,12 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren .. rst-class:: classref-property -:ref:`float<class_float>` **scaling_3d_scale** = ``1.0`` +:ref:`float<class_float>` **scaling_3d_scale** = ``1.0`` :ref:`🔗<class_Viewport_property_scaling_3d_scale>` .. rst-class:: classref-property-setget -- void **set_scaling_3d_scale** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_scaling_3d_scale** **(** **)** +- |void| **set_scaling_3d_scale**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_scaling_3d_scale**\ (\ ) Scales the 3D render buffer based on the viewport size uses an image filter specified in :ref:`ProjectSettings.rendering/scaling_3d/mode<class_ProjectSettings_property_rendering/scaling_3d/mode>` to scale the output image to the full viewport size. Values lower than ``1.0`` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than ``1.0`` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/msaa_3d<class_ProjectSettings_property_rendering/anti_aliasing/quality/msaa_3d>` for multi-sample antialiasing, which is significantly cheaper but only smooths the edges of polygons. @@ -1467,12 +1578,12 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren .. rst-class:: classref-property -:ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` **screen_space_aa** = ``0`` +:ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` **screen_space_aa** = ``0`` :ref:`🔗<class_Viewport_property_screen_space_aa>` .. rst-class:: classref-property-setget -- void **set_screen_space_aa** **(** :ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` value **)** -- :ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` **get_screen_space_aa** **(** **)** +- |void| **set_screen_space_aa**\ (\ value\: :ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>`\ ) +- :ref:`ScreenSpaceAA<enum_Viewport_ScreenSpaceAA>` **get_screen_space_aa**\ (\ ) Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. @@ -1484,16 +1595,16 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works .. rst-class:: classref-property -:ref:`SDFOversize<enum_Viewport_SDFOversize>` **sdf_oversize** = ``1`` +:ref:`SDFOversize<enum_Viewport_SDFOversize>` **sdf_oversize** = ``1`` :ref:`🔗<class_Viewport_property_sdf_oversize>` .. rst-class:: classref-property-setget -- void **set_sdf_oversize** **(** :ref:`SDFOversize<enum_Viewport_SDFOversize>` value **)** -- :ref:`SDFOversize<enum_Viewport_SDFOversize>` **get_sdf_oversize** **(** **)** +- |void| **set_sdf_oversize**\ (\ value\: :ref:`SDFOversize<enum_Viewport_SDFOversize>`\ ) +- :ref:`SDFOversize<enum_Viewport_SDFOversize>` **get_sdf_oversize**\ (\ ) -.. container:: contribute +Controls how much of the original viewport's size should be covered by the 2D signed distance field. This SDF can be sampled in :ref:`CanvasItem<class_CanvasItem>` shaders and is also used for :ref:`GPUParticles2D<class_GPUParticles2D>` collision. Higher values allow portions of occluders located outside the viewport to still be taken into account in the generated signed distance field, at the cost of performance. If you notice particles falling through :ref:`LightOccluder2D<class_LightOccluder2D>`\ s as the occluders leave the viewport, increase this setting. - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The percentage is added on each axis and on both sides. For example, with the default :ref:`SDF_OVERSIZE_120_PERCENT<class_Viewport_constant_SDF_OVERSIZE_120_PERCENT>`, the signed distance field will cover 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). .. rst-class:: classref-item-separator @@ -1503,16 +1614,14 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works .. rst-class:: classref-property -:ref:`SDFScale<enum_Viewport_SDFScale>` **sdf_scale** = ``1`` +:ref:`SDFScale<enum_Viewport_SDFScale>` **sdf_scale** = ``1`` :ref:`🔗<class_Viewport_property_sdf_scale>` .. rst-class:: classref-property-setget -- void **set_sdf_scale** **(** :ref:`SDFScale<enum_Viewport_SDFScale>` value **)** -- :ref:`SDFScale<enum_Viewport_SDFScale>` **get_sdf_scale** **(** **)** +- |void| **set_sdf_scale**\ (\ value\: :ref:`SDFScale<enum_Viewport_SDFScale>`\ ) +- :ref:`SDFScale<enum_Viewport_SDFScale>` **get_sdf_scale**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The resolution scale to use for the 2D signed distance field. Higher values lead to a more precise and more stable signed distance field as the camera moves, at the cost of performance. .. rst-class:: classref-item-separator @@ -1522,16 +1631,14 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works .. rst-class:: classref-property -:ref:`bool<class_bool>` **snap_2d_transforms_to_pixel** = ``false`` +:ref:`bool<class_bool>` **snap_2d_transforms_to_pixel** = ``false`` :ref:`🔗<class_Viewport_property_snap_2d_transforms_to_pixel>` .. rst-class:: classref-property-setget -- void **set_snap_2d_transforms_to_pixel** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_snap_2d_transforms_to_pixel_enabled** **(** **)** - -.. container:: contribute +- |void| **set_snap_2d_transforms_to_pixel**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_snap_2d_transforms_to_pixel_enabled**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, :ref:`CanvasItem<class_CanvasItem>` nodes will internally snap to full pixels. Their position can still be sub-pixel, but the decimals will not have effect. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. .. rst-class:: classref-item-separator @@ -1541,16 +1648,14 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works .. rst-class:: classref-property -:ref:`bool<class_bool>` **snap_2d_vertices_to_pixel** = ``false`` +:ref:`bool<class_bool>` **snap_2d_vertices_to_pixel** = ``false`` :ref:`🔗<class_Viewport_property_snap_2d_vertices_to_pixel>` .. rst-class:: classref-property-setget -- void **set_snap_2d_vertices_to_pixel** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_snap_2d_vertices_to_pixel_enabled** **(** **)** +- |void| **set_snap_2d_vertices_to_pixel**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_snap_2d_vertices_to_pixel_enabled**\ (\ ) -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +If ``true``, vertices of :ref:`CanvasItem<class_CanvasItem>` nodes will snap to full pixels. Only affects the final vertex positions, not the transforms. This can lead to a crisper appearance at the cost of less smooth movement, especially when :ref:`Camera2D<class_Camera2D>` smoothing is enabled. .. rst-class:: classref-item-separator @@ -1560,16 +1665,16 @@ Sets the screen-space antialiasing method used. Screen-space antialiasing works .. rst-class:: classref-property -:ref:`float<class_float>` **texture_mipmap_bias** = ``0.0`` +:ref:`float<class_float>` **texture_mipmap_bias** = ``0.0`` :ref:`🔗<class_Viewport_property_texture_mipmap_bias>` .. rst-class:: classref-property-setget -- void **set_texture_mipmap_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_texture_mipmap_bias** **(** **)** +- |void| **set_texture_mipmap_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_texture_mipmap_bias**\ (\ ) Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). -Enabling temporal antialiasing (:ref:`use_taa<class_Viewport_property_use_taa>`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa<class_Viewport_property_screen_space_aa>`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enbled at the same time, an offset of ``-0.75`` is applied to this value. +Enabling temporal antialiasing (:ref:`use_taa<class_Viewport_property_use_taa>`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa<class_Viewport_property_screen_space_aa>`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. \ **Note:** If :ref:`scaling_3d_scale<class_Viewport_property_scaling_3d_scale>` is lower than ``1.0`` (exclusive), :ref:`texture_mipmap_bias<class_Viewport_property_texture_mipmap_bias>` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. @@ -1583,12 +1688,12 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren .. rst-class:: classref-property -:ref:`bool<class_bool>` **transparent_bg** = ``false`` +:ref:`bool<class_bool>` **transparent_bg** = ``false`` :ref:`🔗<class_Viewport_property_transparent_bg>` .. rst-class:: classref-property-setget -- void **set_transparent_background** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **has_transparent_background** **(** **)** +- |void| **set_transparent_background**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **has_transparent_background**\ (\ ) If ``true``, the viewport should render its background as transparent. @@ -1600,12 +1705,12 @@ If ``true``, the viewport should render its background as transparent. .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_debanding** = ``false`` +:ref:`bool<class_bool>` **use_debanding** = ``false`` :ref:`🔗<class_Viewport_property_use_debanding>` .. rst-class:: classref-property-setget -- void **set_use_debanding** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_debanding** **(** **)** +- |void| **set_use_debanding**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_debanding**\ (\ ) If ``true``, uses a fast post-processing filter to make banding significantly less visible in 3D. 2D rendering is *not* affected by debanding unless the :ref:`Environment.background_mode<class_Environment_property_background_mode>` is :ref:`Environment.BG_CANVAS<class_Environment_constant_BG_CANVAS>`. See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding<class_ProjectSettings_property_rendering/anti_aliasing/quality/use_debanding>`. @@ -1615,21 +1720,42 @@ In some cases, debanding may introduce a slightly noticeable dithering pattern. ---- +.. _class_Viewport_property_use_hdr_2d: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **use_hdr_2d** = ``false`` :ref:`🔗<class_Viewport_property_use_hdr_2d>` + +.. rst-class:: classref-property-setget + +- |void| **set_use_hdr_2d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_hdr_2d**\ (\ ) + +If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. + +\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_property_use_occlusion_culling: .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_occlusion_culling** = ``false`` +:ref:`bool<class_bool>` **use_occlusion_culling** = ``false`` :ref:`🔗<class_Viewport_property_use_occlusion_culling>` .. rst-class:: classref-property-setget -- void **set_use_occlusion_culling** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_occlusion_culling** **(** **)** +- |void| **set_use_occlusion_culling**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_occlusion_culling**\ (\ ) If ``true``, :ref:`OccluderInstance3D<class_OccluderInstance3D>` nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling<class_ProjectSettings_property_rendering/occlusion_culling/use_occlusion_culling>` must be set to ``true`` instead. \ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` and :ref:`GeometryInstance3D.visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>`) compared to occlusion culling. +\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. + .. rst-class:: classref-item-separator ---- @@ -1638,12 +1764,12 @@ If ``true``, :ref:`OccluderInstance3D<class_OccluderInstance3D>` nodes will be u .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_taa** = ``false`` +:ref:`bool<class_bool>` **use_taa** = ``false`` :ref:`🔗<class_Viewport_property_use_taa>` .. rst-class:: classref-property-setget -- void **set_use_taa** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_taa** **(** **)** +- |void| **set_use_taa**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_taa**\ (\ ) Enables Temporal Anti-Aliasing for this viewport. TAA works by jittering the camera and accumulating the images of the last rendered frames, motion vector rendering is used to account for camera and object motion. @@ -1657,12 +1783,12 @@ Enables Temporal Anti-Aliasing for this viewport. TAA works by jittering the cam .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_xr** = ``false`` +:ref:`bool<class_bool>` **use_xr** = ``false`` :ref:`🔗<class_Viewport_property_use_xr>` .. rst-class:: classref-property-setget -- void **set_use_xr** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_xr** **(** **)** +- |void| **set_use_xr**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_xr**\ (\ ) If ``true``, the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset. @@ -1674,12 +1800,12 @@ If ``true``, the viewport will use the primary XR interface to render XR output. .. rst-class:: classref-property -:ref:`VRSMode<enum_Viewport_VRSMode>` **vrs_mode** = ``0`` +:ref:`VRSMode<enum_Viewport_VRSMode>` **vrs_mode** = ``0`` :ref:`🔗<class_Viewport_property_vrs_mode>` .. rst-class:: classref-property-setget -- void **set_vrs_mode** **(** :ref:`VRSMode<enum_Viewport_VRSMode>` value **)** -- :ref:`VRSMode<enum_Viewport_VRSMode>` **get_vrs_mode** **(** **)** +- |void| **set_vrs_mode**\ (\ value\: :ref:`VRSMode<enum_Viewport_VRSMode>`\ ) +- :ref:`VRSMode<enum_Viewport_VRSMode>` **get_vrs_mode**\ (\ ) The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if hardware does not support VRS this property is ignored. @@ -1691,29 +1817,46 @@ The Variable Rate Shading (VRS) mode that is used for this viewport. Note, if ha .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **vrs_texture** +:ref:`Texture2D<class_Texture2D>` **vrs_texture** :ref:`🔗<class_Viewport_property_vrs_texture>` .. rst-class:: classref-property-setget -- void **set_vrs_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_vrs_texture** **(** **)** +- |void| **set_vrs_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_vrs_texture**\ (\ ) Texture to use when :ref:`vrs_mode<class_Viewport_property_vrs_mode>` is set to :ref:`VRS_TEXTURE<class_Viewport_constant_VRS_TEXTURE>`. The texture *must* use a lossless compression format so that colors can be matched precisely. The following VRS densities are mapped to various colors, with brighter colors representing a lower level of shading precision: -:: +.. code:: text - - 1x1 = rgb(0, 0, 0) - #000000 - - 1x2 = rgb(0, 85, 0) - #005500 - - 2x1 = rgb(85, 0, 0) - #550000 - - 2x2 = rgb(85, 85, 0) - #555500 - - 2x4 = rgb(85, 170, 0) - #55aa00 - - 4x2 = rgb(170, 85, 0) - #aa5500 - - 4x4 = rgb(170, 170, 0) - #aaaa00 - - 4x8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware - - 8x4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware - - 8x8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware + - 1×1 = rgb(0, 0, 0) - #000000 + - 1×2 = rgb(0, 85, 0) - #005500 + - 2×1 = rgb(85, 0, 0) - #550000 + - 2×2 = rgb(85, 85, 0) - #555500 + - 2×4 = rgb(85, 170, 0) - #55aa00 + - 4×2 = rgb(170, 85, 0) - #aa5500 + - 4×4 = rgb(170, 170, 0) - #aaaa00 + - 4×8 = rgb(170, 255, 0) - #aaff00 - Not supported on most hardware + - 8×4 = rgb(255, 170, 0) - #ffaa00 - Not supported on most hardware + - 8×8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware + +.. rst-class:: classref-item-separator + +---- + +.. _class_Viewport_property_vrs_update_mode: + +.. rst-class:: classref-property + +:ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **vrs_update_mode** = ``1`` :ref:`🔗<class_Viewport_property_vrs_update_mode>` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_update_mode**\ (\ value\: :ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>`\ ) +- :ref:`VRSUpdateMode<enum_Viewport_VRSUpdateMode>` **get_vrs_update_mode**\ (\ ) + +Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. .. rst-class:: classref-item-separator @@ -1723,12 +1866,12 @@ The texture *must* use a lossless compression format so that colors can be match .. rst-class:: classref-property -:ref:`World2D<class_World2D>` **world_2d** +:ref:`World2D<class_World2D>` **world_2d** :ref:`🔗<class_Viewport_property_world_2d>` .. rst-class:: classref-property-setget -- void **set_world_2d** **(** :ref:`World2D<class_World2D>` value **)** -- :ref:`World2D<class_World2D>` **get_world_2d** **(** **)** +- |void| **set_world_2d**\ (\ value\: :ref:`World2D<class_World2D>`\ ) +- :ref:`World2D<class_World2D>` **get_world_2d**\ (\ ) The custom :ref:`World2D<class_World2D>` which can be used as 2D environment source. @@ -1740,12 +1883,12 @@ The custom :ref:`World2D<class_World2D>` which can be used as 2D environment sou .. rst-class:: classref-property -:ref:`World3D<class_World3D>` **world_3d** +:ref:`World3D<class_World3D>` **world_3d** :ref:`🔗<class_Viewport_property_world_3d>` .. rst-class:: classref-property-setget -- void **set_world_3d** **(** :ref:`World3D<class_World3D>` value **)** -- :ref:`World3D<class_World3D>` **get_world_3d** **(** **)** +- |void| **set_world_3d**\ (\ value\: :ref:`World3D<class_World3D>`\ ) +- :ref:`World3D<class_World3D>` **get_world_3d**\ (\ ) The custom :ref:`World3D<class_World3D>` which can be used as 3D environment source. @@ -1762,7 +1905,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`World2D<class_World2D>` **find_world_2d** **(** **)** |const| +:ref:`World2D<class_World2D>` **find_world_2d**\ (\ ) |const| :ref:`🔗<class_Viewport_method_find_world_2d>` Returns the first valid :ref:`World2D<class_World2D>` for this viewport, searching the :ref:`world_2d<class_Viewport_property_world_2d>` property of itself and any Viewport ancestor. @@ -1774,7 +1917,7 @@ Returns the first valid :ref:`World2D<class_World2D>` for this viewport, searchi .. rst-class:: classref-method -:ref:`World3D<class_World3D>` **find_world_3d** **(** **)** |const| +:ref:`World3D<class_World3D>` **find_world_3d**\ (\ ) |const| :ref:`🔗<class_Viewport_method_find_world_3d>` Returns the first valid :ref:`World3D<class_World3D>` for this viewport, searching the :ref:`world_3d<class_Viewport_property_world_3d>` property of itself and any Viewport ancestor. @@ -1786,7 +1929,7 @@ Returns the first valid :ref:`World3D<class_World3D>` for this viewport, searchi .. rst-class:: classref-method -:ref:`Camera2D<class_Camera2D>` **get_camera_2d** **(** **)** |const| +:ref:`Camera2D<class_Camera2D>` **get_camera_2d**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_camera_2d>` Returns the currently active 2D camera. Returns null if there are no active cameras. @@ -1798,7 +1941,7 @@ Returns the currently active 2D camera. Returns null if there are no active came .. rst-class:: classref-method -:ref:`Camera3D<class_Camera3D>` **get_camera_3d** **(** **)** |const| +:ref:`Camera3D<class_Camera3D>` **get_camera_3d**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_camera_3d>` Returns the currently active 3D camera. @@ -1810,7 +1953,7 @@ Returns the currently active 3D camera. .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_canvas_cull_mask_bit** **(** :ref:`int<class_int>` layer **)** |const| +:ref:`bool<class_bool>` **get_canvas_cull_mask_bit**\ (\ layer\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Viewport_method_get_canvas_cull_mask_bit>` Returns an individual bit on the rendering layer mask. @@ -1818,11 +1961,25 @@ Returns an individual bit on the rendering layer mask. ---- +.. _class_Viewport_method_get_embedded_subwindows: + +.. rst-class:: classref-method + +:ref:`Array<class_Array>`\[:ref:`Window<class_Window>`\] **get_embedded_subwindows**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_embedded_subwindows>` + +Returns a list of the visible embedded :ref:`Window<class_Window>`\ s inside the viewport. + +\ **Note:** :ref:`Window<class_Window>`\ s inside other viewports will not be listed. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_get_final_transform: .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_final_transform** **(** **)** |const| +:ref:`Transform2D<class_Transform2D>` **get_final_transform**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_final_transform>` Returns the transform from the viewport's coordinate system to the embedder's coordinate system. @@ -1834,7 +1991,7 @@ Returns the transform from the viewport's coordinate system to the embedder's co .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_mouse_position** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_mouse_position**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_mouse_position>` Returns the mouse's position in this **Viewport** using the coordinate system of this **Viewport**. @@ -1846,9 +2003,9 @@ Returns the mouse's position in this **Viewport** using the coordinate system of .. rst-class:: classref-method -:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant **)** |const| +:ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` **get_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Viewport_method_get_positional_shadow_atlas_quadrant_subdiv>` -Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` of the specified quadrant. +Returns the positional shadow atlas quadrant subdivision of the specified quadrant. .. rst-class:: classref-item-separator @@ -1858,7 +2015,7 @@ Returns the :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalSh .. rst-class:: classref-method -:ref:`int<class_int>` **get_render_info** **(** :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` type, :ref:`RenderInfo<enum_Viewport_RenderInfo>` info **)** +:ref:`int<class_int>` **get_render_info**\ (\ type\: :ref:`RenderInfoType<enum_Viewport_RenderInfoType>`, info\: :ref:`RenderInfo<enum_Viewport_RenderInfo>`\ ) :ref:`🔗<class_Viewport_method_get_render_info>` Returns rendering statistics of the given type. See :ref:`RenderInfoType<enum_Viewport_RenderInfoType>` and :ref:`RenderInfo<enum_Viewport_RenderInfo>` for options. @@ -1870,7 +2027,7 @@ Returns rendering statistics of the given type. See :ref:`RenderInfoType<enum_Vi .. rst-class:: classref-method -:ref:`Transform2D<class_Transform2D>` **get_screen_transform** **(** **)** |const| +:ref:`Transform2D<class_Transform2D>` **get_screen_transform**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_screen_transform>` Returns the transform from the Viewport's coordinates to the screen coordinates of the containing window manager window. @@ -1882,11 +2039,11 @@ Returns the transform from the Viewport's coordinates to the screen coordinates .. rst-class:: classref-method -:ref:`ViewportTexture<class_ViewportTexture>` **get_texture** **(** **)** |const| +:ref:`ViewportTexture<class_ViewportTexture>` **get_texture**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_texture>` Returns the viewport's texture. -\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready<class_Node_method__ready>`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw<class_RenderingServer_signal_frame_post_draw>` signal. +\ **Note:** When trying to store the current texture (e.g. in a file), it might be completely black or outdated if used too early, especially when used in e.g. :ref:`Node._ready<class_Node_private_method__ready>`. To make sure the texture you get is correct, you can await :ref:`RenderingServer.frame_post_draw<class_RenderingServer_signal_frame_post_draw>` signal. :: @@ -1902,7 +2059,7 @@ Returns the viewport's texture. .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_viewport_rid** **(** **)** |const| +:ref:`RID<class_RID>` **get_viewport_rid**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_viewport_rid>` Returns the viewport's RID from the :ref:`RenderingServer<class_RenderingServer>`. @@ -1914,7 +2071,7 @@ Returns the viewport's RID from the :ref:`RenderingServer<class_RenderingServer> .. rst-class:: classref-method -:ref:`Rect2<class_Rect2>` **get_visible_rect** **(** **)** |const| +:ref:`Rect2<class_Rect2>` **get_visible_rect**\ (\ ) |const| :ref:`🔗<class_Viewport_method_get_visible_rect>` Returns the visible rectangle in global screen coordinates. @@ -1926,9 +2083,9 @@ Returns the visible rectangle in global screen coordinates. .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **gui_get_drag_data** **(** **)** |const| +:ref:`Variant<class_Variant>` **gui_get_drag_data**\ (\ ) |const| :ref:`🔗<class_Viewport_method_gui_get_drag_data>` -Returns the drag data from the GUI, that was previously returned by :ref:`Control._get_drag_data<class_Control_method__get_drag_data>`. +Returns the drag data from the GUI, that was previously returned by :ref:`Control._get_drag_data<class_Control_private_method__get_drag_data>`. .. rst-class:: classref-item-separator @@ -1938,7 +2095,7 @@ Returns the drag data from the GUI, that was previously returned by :ref:`Contro .. rst-class:: classref-method -:ref:`Control<class_Control>` **gui_get_focus_owner** **(** **)** |const| +:ref:`Control<class_Control>` **gui_get_focus_owner**\ (\ ) |const| :ref:`🔗<class_Viewport_method_gui_get_focus_owner>` Returns the :ref:`Control<class_Control>` having the focus within this viewport. If no :ref:`Control<class_Control>` has the focus, returns null. @@ -1946,11 +2103,25 @@ Returns the :ref:`Control<class_Control>` having the focus within this viewport. ---- +.. _class_Viewport_method_gui_get_hovered_control: + +.. rst-class:: classref-method + +:ref:`Control<class_Control>` **gui_get_hovered_control**\ (\ ) |const| :ref:`🔗<class_Viewport_method_gui_get_hovered_control>` + +Returns the :ref:`Control<class_Control>` that the mouse is currently hovering over in this viewport. If no :ref:`Control<class_Control>` has the cursor, returns null. + +Typically the leaf :ref:`Control<class_Control>` node or deepest level of the subtree which claims hover. This is very useful when used together with :ref:`Node.is_ancestor_of<class_Node_method_is_ancestor_of>` to find if the mouse is within a control tree. + +.. rst-class:: classref-item-separator + +---- + .. _class_Viewport_method_gui_is_drag_successful: .. rst-class:: classref-method -:ref:`bool<class_bool>` **gui_is_drag_successful** **(** **)** |const| +:ref:`bool<class_bool>` **gui_is_drag_successful**\ (\ ) |const| :ref:`🔗<class_Viewport_method_gui_is_drag_successful>` Returns ``true`` if the drag operation is successful. @@ -1962,7 +2133,7 @@ Returns ``true`` if the drag operation is successful. .. rst-class:: classref-method -:ref:`bool<class_bool>` **gui_is_dragging** **(** **)** |const| +:ref:`bool<class_bool>` **gui_is_dragging**\ (\ ) |const| :ref:`🔗<class_Viewport_method_gui_is_dragging>` Returns ``true`` if the viewport is currently performing a drag operation. @@ -1976,7 +2147,7 @@ Alternative to :ref:`Node.NOTIFICATION_DRAG_BEGIN<class_Node_constant_NOTIFICATI .. rst-class:: classref-method -void **gui_release_focus** **(** **)** +|void| **gui_release_focus**\ (\ ) :ref:`🔗<class_Viewport_method_gui_release_focus>` Removes the focus from the currently focused :ref:`Control<class_Control>` within this viewport. If no :ref:`Control<class_Control>` has the focus, does nothing. @@ -1988,11 +2159,11 @@ Removes the focus from the currently focused :ref:`Control<class_Control>` withi .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_input_handled** **(** **)** |const| +:ref:`bool<class_bool>` **is_input_handled**\ (\ ) |const| :ref:`🔗<class_Viewport_method_is_input_handled>` Returns whether the current :ref:`InputEvent<class_InputEvent>` has been handled. Input events are not handled until :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>` has been called during the lifetime of an :ref:`InputEvent<class_InputEvent>`. -This is usually done as part of input handling methods like :ref:`Node._input<class_Node_method__input>`, :ref:`Control._gui_input<class_Control_method__gui_input>` or others, as well as in corresponding signal handlers. +This is usually done as part of input handling methods like :ref:`Node._input<class_Node_private_method__input>`, :ref:`Control._gui_input<class_Control_private_method__gui_input>` or others, as well as in corresponding signal handlers. If :ref:`handle_input_locally<class_Viewport_property_handle_input_locally>` is set to ``false``, this method will try finding the first parent viewport that is set to handle input locally, and return its value for :ref:`is_input_handled<class_Viewport_method_is_input_handled>` instead. @@ -2004,7 +2175,7 @@ If :ref:`handle_input_locally<class_Viewport_property_handle_input_locally>` is .. rst-class:: classref-method -void **push_input** **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` in_local_coords=false **)** +|void| **push_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`, in_local_coords\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Viewport_method_push_input>` Triggers the given ``event`` in this **Viewport**. This can be used to pass an :ref:`InputEvent<class_InputEvent>` between viewports, or to locally apply inputs that were sent over the network or saved to a file. @@ -2014,15 +2185,15 @@ While this method serves a similar purpose as :ref:`Input.parse_input_event<clas Calling this method will propagate calls to child nodes for following methods in the given order: -- :ref:`Node._input<class_Node_method__input>`\ +- :ref:`Node._input<class_Node_private_method__input>`\ -- :ref:`Control._gui_input<class_Control_method__gui_input>` for :ref:`Control<class_Control>` nodes +- :ref:`Control._gui_input<class_Control_private_method__gui_input>` for :ref:`Control<class_Control>` nodes -- :ref:`Node._shortcut_input<class_Node_method__shortcut_input>`\ +- :ref:`Node._shortcut_input<class_Node_private_method__shortcut_input>`\ -- :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`\ +- :ref:`Node._unhandled_key_input<class_Node_private_method__unhandled_key_input>`\ -- :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`\ +- :ref:`Node._unhandled_input<class_Node_private_method__unhandled_input>`\ If an earlier method marks the input as handled via :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>`, any later method in this list will not be called. @@ -2036,7 +2207,7 @@ If none of the methods handle the event and :ref:`physics_object_picking<class_V .. rst-class:: classref-method -void **push_text_input** **(** :ref:`String<class_String>` text **)** +|void| **push_text_input**\ (\ text\: :ref:`String<class_String>`\ ) :ref:`🔗<class_Viewport_method_push_text_input>` Helper method which calls the ``set_text()`` method on the currently focused :ref:`Control<class_Control>`, provided that it is defined (e.g. if the focused Control is :ref:`Button<class_Button>` or :ref:`LineEdit<class_LineEdit>`). @@ -2048,21 +2219,21 @@ Helper method which calls the ``set_text()`` method on the currently focused :re .. rst-class:: classref-method -void **push_unhandled_input** **(** :ref:`InputEvent<class_InputEvent>` event, :ref:`bool<class_bool>` in_local_coords=false **)** +|void| **push_unhandled_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`, in_local_coords\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_Viewport_method_push_unhandled_input>` -Triggers the given :ref:`InputEvent<class_InputEvent>` in this **Viewport**. This can be used to pass input events between viewports, or to locally apply inputs that were sent over the network or saved to a file. +**Deprecated:** Use :ref:`push_input<class_Viewport_method_push_input>` instead. -If ``in_local_coords`` is ``false``, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If ``in_local_coords`` is ``true``, the event's position is in viewport coordinates. +Triggers the given ``event`` in this **Viewport**. This can be used to pass an :ref:`InputEvent<class_InputEvent>` between viewports, or to locally apply inputs that were sent over the network or saved to a file. -While this method serves a similar purpose as :ref:`Input.parse_input_event<class_Input_method_parse_input_event>`, it does not remap the specified ``event`` based on project settings like :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse<class_ProjectSettings_property_input_devices/pointing/emulate_touch_from_mouse>`. +If ``in_local_coords`` is ``false``, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If ``in_local_coords`` is ``true``, the event's position is in viewport coordinates. Calling this method will propagate calls to child nodes for following methods in the given order: -- :ref:`Node._shortcut_input<class_Node_method__shortcut_input>`\ +- :ref:`Node._shortcut_input<class_Node_private_method__shortcut_input>`\ -- :ref:`Node._unhandled_input<class_Node_method__unhandled_input>`\ +- :ref:`Node._unhandled_key_input<class_Node_private_method__unhandled_key_input>`\ -- :ref:`Node._unhandled_key_input<class_Node_method__unhandled_key_input>`\ +- :ref:`Node._unhandled_input<class_Node_private_method__unhandled_input>`\ If an earlier method marks the input as handled via :ref:`set_input_as_handled<class_Viewport_method_set_input_as_handled>`, any later method in this list will not be called. @@ -2070,8 +2241,6 @@ If none of the methods handle the event and :ref:`physics_object_picking<class_V \ **Note:** This method doesn't propagate input events to embedded :ref:`Window<class_Window>`\ s or :ref:`SubViewport<class_SubViewport>`\ s. -\ *Deprecated.* Use :ref:`push_input<class_Viewport_method_push_input>` instead. - .. rst-class:: classref-item-separator ---- @@ -2080,7 +2249,7 @@ If none of the methods handle the event and :ref:`physics_object_picking<class_V .. rst-class:: classref-method -void **set_canvas_cull_mask_bit** **(** :ref:`int<class_int>` layer, :ref:`bool<class_bool>` enable **)** +|void| **set_canvas_cull_mask_bit**\ (\ layer\: :ref:`int<class_int>`, enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Viewport_method_set_canvas_cull_mask_bit>` Set/clear individual bits on the rendering layer mask. This simplifies editing this **Viewport**'s layers. @@ -2092,7 +2261,7 @@ Set/clear individual bits on the rendering layer mask. This simplifies editing t .. rst-class:: classref-method -void **set_input_as_handled** **(** **)** +|void| **set_input_as_handled**\ (\ ) :ref:`🔗<class_Viewport_method_set_input_as_handled>` Stops the input from propagating further down the :ref:`SceneTree<class_SceneTree>`. @@ -2106,7 +2275,7 @@ Stops the input from propagating further down the :ref:`SceneTree<class_SceneTre .. rst-class:: classref-method -void **set_positional_shadow_atlas_quadrant_subdiv** **(** :ref:`int<class_int>` quadrant, :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>` subdiv **)** +|void| **set_positional_shadow_atlas_quadrant_subdiv**\ (\ quadrant\: :ref:`int<class_int>`, subdiv\: :ref:`PositionalShadowAtlasQuadrantSubdiv<enum_Viewport_PositionalShadowAtlasQuadrantSubdiv>`\ ) :ref:`🔗<class_Viewport_method_set_positional_shadow_atlas_quadrant_subdiv>` Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible. @@ -2118,7 +2287,7 @@ Sets the number of subdivisions to use in the specified quadrant. A higher numbe .. rst-class:: classref-method -void **update_mouse_cursor_state** **(** **)** +|void| **update_mouse_cursor_state**\ (\ ) :ref:`🔗<class_Viewport_method_update_mouse_cursor_state>` Force instantly updating the display based on the current mouse cursor position. This includes updating the mouse cursor shape and sending necessary :ref:`Control.mouse_entered<class_Control_signal_mouse_entered>`, :ref:`CollisionObject2D.mouse_entered<class_CollisionObject2D_signal_mouse_entered>`, :ref:`CollisionObject3D.mouse_entered<class_CollisionObject3D_signal_mouse_entered>` and :ref:`Window.mouse_entered<class_Window_signal_mouse_entered>` signals and their respective ``mouse_exited`` counterparts. @@ -2130,7 +2299,7 @@ Force instantly updating the display based on the current mouse cursor position. .. rst-class:: classref-method -void **warp_mouse** **(** :ref:`Vector2<class_Vector2>` position **)** +|void| **warp_mouse**\ (\ position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Viewport_method_warp_mouse>` Moves the mouse pointer to the specified position in this **Viewport** using the coordinate system of this **Viewport**. @@ -2143,3 +2312,4 @@ Moves the mouse pointer to the specified position in this **Viewport** using the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_viewporttexture.rst b/classes/class_viewporttexture.rst index e710d0ff3e2..96387139a62 100644 --- a/classes/class_viewporttexture.rst +++ b/classes/class_viewporttexture.rst @@ -19,24 +19,26 @@ Provides the content of a :ref:`Viewport<class_Viewport>` as a dynamic texture. Description ----------- -Provides the content of a :ref:`Viewport<class_Viewport>` as a dynamic :ref:`Texture2D<class_Texture2D>`. This can be used to mix controls, 2D game objects, and 3D game objects in the same scene. +A **ViewportTexture** provides the content of a :ref:`Viewport<class_Viewport>` as a dynamic :ref:`Texture2D<class_Texture2D>`. This can be used to combine the rendering of :ref:`Control<class_Control>`, :ref:`Node2D<class_Node2D>` and :ref:`Node3D<class_Node3D>` nodes. For example, you can use this texture to display a 3D scene inside a :ref:`TextureRect<class_TextureRect>`, or a 2D overlay in a :ref:`Sprite3D<class_Sprite3D>`. -To create a **ViewportTexture** in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport. +To get a **ViewportTexture** in code, use the :ref:`Viewport.get_texture<class_Viewport_method_get_texture>` method on the target viewport. -\ **Note:** When local to scene, this texture uses :ref:`Resource.setup_local_to_scene<class_Resource_method_setup_local_to_scene>` to set the proxy texture and flags in the local viewport. Local to scene **ViewportTexture**\ s will return incorrect data until the scene root is ready (see :ref:`Node.ready<class_Node_signal_ready>`). +\ **Note:** A **ViewportTexture** is always local to its scene (see :ref:`Resource.resource_local_to_scene<class_Resource_property_resource_local_to_scene>`). If the scene root is not ready, it may return incorrect data (see :ref:`Node.ready<class_Node_signal_ready>`). + +\ **Note:** Instantiating scenes containing a high-resolution **ViewportTexture** may cause noticeable stutter. .. rst-class:: classref-introduction-group Tutorials --------- -- `GUI in 3D Demo <https://godotengine.org/asset-library/asset/127>`__ +- `GUI in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2807>`__ -- `3D in 2D Demo <https://godotengine.org/asset-library/asset/128>`__ +- `3D in 2D Viewport Demo <https://godotengine.org/asset-library/asset/2804>`__ -- `2D in 3D Demo <https://godotengine.org/asset-library/asset/129>`__ +- `2D in 3D Viewport Demo <https://godotengine.org/asset-library/asset/2803>`__ -- `3D Viewport Scaling Demo <https://godotengine.org/asset-library/asset/586>`__ +- `3D Resolution Scaling Demo <https://godotengine.org/asset-library/asset/2805>`__ .. rst-class:: classref-reftable-group @@ -63,16 +65,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **viewport_path** = ``NodePath("")`` +:ref:`NodePath<class_NodePath>` **viewport_path** = ``NodePath("")`` :ref:`🔗<class_ViewportTexture_property_viewport_path>` .. rst-class:: classref-property-setget -- void **set_viewport_path_in_scene** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_viewport_path_in_scene** **(** **)** +- |void| **set_viewport_path_in_scene**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_viewport_path_in_scene**\ (\ ) -The path to the :ref:`Viewport<class_Viewport>` node to display. This is relative to the scene root, not to the node that uses the texture. +The path to the :ref:`Viewport<class_Viewport>` node to display. This is relative to the local scene root (see :ref:`Resource.get_local_scene<class_Resource_method_get_local_scene>`), **not** to the nodes that use this texture. -\ **Note:** In the editor, this path is automatically updated when the target viewport or one of its ancestors is renamed or moved. At runtime, the path may not be able to automatically update due to the inability to determine the scene root. +\ **Note:** In the editor, this path is automatically updated when the target viewport or one of its ancestors is renamed or moved. At runtime, this path may not automatically update if the scene root cannot be found. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -81,3 +83,4 @@ The path to the :ref:`Viewport<class_Viewport>` node to display. This is relativ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visibleonscreenenabler2d.rst b/classes/class_visibleonscreenenabler2d.rst index e6cf8369433..22bcbefea46 100644 --- a/classes/class_visibleonscreenenabler2d.rst +++ b/classes/class_visibleonscreenenabler2d.rst @@ -12,14 +12,18 @@ VisibleOnScreenEnabler2D **Inherits:** :ref:`VisibleOnScreenNotifier2D<class_VisibleOnScreenNotifier2D>` **<** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Automatically disables another node if not visible on screen. +A rectangular region of 2D space that, when visible on screen, enables a target node. .. rst-class:: classref-introduction-group Description ----------- -VisibleOnScreenEnabler2D detects when it is visible on screen (just like :ref:`VisibleOnScreenNotifier2D<class_VisibleOnScreenNotifier2D>`) and automatically enables or disables the target node. The target node is disabled when **VisibleOnScreenEnabler2D** is not visible on screen (including when :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` is ``false``), and enabled when the enabler is visible. The disabling is achieved by changing :ref:`Node.process_mode<class_Node_property_process_mode>`. +**VisibleOnScreenEnabler2D** contains a rectangular region of 2D space and a target node. The target node will be automatically enabled (via its :ref:`Node.process_mode<class_Node_property_process_mode>` property) when any part of this region becomes visible on the screen, and automatically disabled otherwise. This can for example be used to activate enemies only when the player approaches them. + +See :ref:`VisibleOnScreenNotifier2D<class_VisibleOnScreenNotifier2D>` if you only want to be notified when the region is visible on screen. + +\ **Note:** **VisibleOnScreenEnabler2D** uses the render culling code to determine whether it's visible on screen, so it won't function unless :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` is set to ``true``. .. rst-class:: classref-reftable-group @@ -48,7 +52,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **EnableMode**: +enum **EnableMode**: :ref:`🔗<enum_VisibleOnScreenEnabler2D_EnableMode>` .. _class_VisibleOnScreenEnabler2D_constant_ENABLE_MODE_INHERIT: @@ -87,14 +91,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>` **enable_mode** = ``0`` +:ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>` **enable_mode** = ``0`` :ref:`🔗<class_VisibleOnScreenEnabler2D_property_enable_mode>` .. rst-class:: classref-property-setget -- void **set_enable_mode** **(** :ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>` value **)** -- :ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>` **get_enable_mode** **(** **)** +- |void| **set_enable_mode**\ (\ value\: :ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>`\ ) +- :ref:`EnableMode<enum_VisibleOnScreenEnabler2D_EnableMode>` **get_enable_mode**\ (\ ) -Determines how the node is enabled. Corresponds to :ref:`ProcessMode<enum_Node_ProcessMode>`. Disabled node uses :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. +Determines how the target node is enabled. Corresponds to :ref:`ProcessMode<enum_Node_ProcessMode>`. When the node is disabled, it always uses :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. .. rst-class:: classref-item-separator @@ -104,14 +108,14 @@ Determines how the node is enabled. Corresponds to :ref:`ProcessMode<enum_Node_P .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **enable_node_path** = ``NodePath("..")`` +:ref:`NodePath<class_NodePath>` **enable_node_path** = ``NodePath("..")`` :ref:`🔗<class_VisibleOnScreenEnabler2D_property_enable_node_path>` .. rst-class:: classref-property-setget -- void **set_enable_node_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_enable_node_path** **(** **)** +- |void| **set_enable_node_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_enable_node_path**\ (\ ) -The path to the target node, relative to the **VisibleOnScreenEnabler2D**. The target node is cached; it's only assigned when setting this property (if the **VisibleOnScreenEnabler2D** is inside scene tree) and every time the **VisibleOnScreenEnabler2D** enters the scene tree. If the path is invalid, nothing will happen. +The path to the target node, relative to the **VisibleOnScreenEnabler2D**. The target node is cached; it's only assigned when setting this property (if the **VisibleOnScreenEnabler2D** is inside the scene tree) and every time the **VisibleOnScreenEnabler2D** enters the scene tree. If the path is empty, no node will be affected. If the path is invalid, an error is also generated. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -120,3 +124,4 @@ The path to the target node, relative to the **VisibleOnScreenEnabler2D**. The t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visibleonscreenenabler3d.rst b/classes/class_visibleonscreenenabler3d.rst index 814b032390a..37ef22cf1c4 100644 --- a/classes/class_visibleonscreenenabler3d.rst +++ b/classes/class_visibleonscreenenabler3d.rst @@ -12,20 +12,18 @@ VisibleOnScreenEnabler3D **Inherits:** :ref:`VisibleOnScreenNotifier3D<class_VisibleOnScreenNotifier3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -Enables certain nodes only when approximately visible. +A box-shaped region of 3D space that, when visible on screen, enables a target node. .. rst-class:: classref-introduction-group Description ----------- -The VisibleOnScreenEnabler3D will disable :ref:`RigidBody3D<class_RigidBody3D>` and :ref:`AnimationPlayer<class_AnimationPlayer>` nodes when they are not visible. It will only affect other nodes within the same scene as the VisibleOnScreenEnabler3D itself. +**VisibleOnScreenEnabler3D** contains a box-shaped region of 3D space and a target node. The target node will be automatically enabled (via its :ref:`Node.process_mode<class_Node_property_process_mode>` property) when any part of this region becomes visible on the screen, and automatically disabled otherwise. This can for example be used to activate enemies only when the player approaches them. -If you just want to receive notifications, use :ref:`VisibleOnScreenNotifier3D<class_VisibleOnScreenNotifier3D>` instead. +See :ref:`VisibleOnScreenNotifier3D<class_VisibleOnScreenNotifier3D>` if you only want to be notified when the region is visible on screen. -\ **Note:** VisibleOnScreenEnabler3D uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an :ref:`Area3D<class_Area3D>` node as a child of a :ref:`Camera3D<class_Camera3D>` node and/or :ref:`Vector3.dot<class_Vector3_method_dot>`. - -\ **Note:** VisibleOnScreenEnabler3D will not affect nodes added after scene initialization. +\ **Note:** **VisibleOnScreenEnabler3D** uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless :ref:`Node3D.visible<class_Node3D_property_visible>` is set to ``true``. .. rst-class:: classref-reftable-group @@ -54,7 +52,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **EnableMode**: +enum **EnableMode**: :ref:`🔗<enum_VisibleOnScreenEnabler3D_EnableMode>` .. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_INHERIT: @@ -62,7 +60,7 @@ enum **EnableMode**: :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **ENABLE_MODE_INHERIT** = ``0`` - +Corresponds to :ref:`Node.PROCESS_MODE_INHERIT<class_Node_constant_PROCESS_MODE_INHERIT>`. .. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_ALWAYS: @@ -70,7 +68,7 @@ enum **EnableMode**: :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **ENABLE_MODE_ALWAYS** = ``1`` - +Corresponds to :ref:`Node.PROCESS_MODE_ALWAYS<class_Node_constant_PROCESS_MODE_ALWAYS>`. .. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_WHEN_PAUSED: @@ -78,7 +76,7 @@ enum **EnableMode**: :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **ENABLE_MODE_WHEN_PAUSED** = ``2`` - +Corresponds to :ref:`Node.PROCESS_MODE_WHEN_PAUSED<class_Node_constant_PROCESS_MODE_WHEN_PAUSED>`. .. rst-class:: classref-section-separator @@ -93,16 +91,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **enable_mode** = ``0`` +:ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **enable_mode** = ``0`` :ref:`🔗<class_VisibleOnScreenEnabler3D_property_enable_mode>` .. rst-class:: classref-property-setget -- void **set_enable_mode** **(** :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` value **)** -- :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **get_enable_mode** **(** **)** - -.. container:: contribute +- |void| **set_enable_mode**\ (\ value\: :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>`\ ) +- :ref:`EnableMode<enum_VisibleOnScreenEnabler3D_EnableMode>` **get_enable_mode**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +Determines how the target node is enabled. Corresponds to :ref:`ProcessMode<enum_Node_ProcessMode>`. When the node is disabled, it always uses :ref:`Node.PROCESS_MODE_DISABLED<class_Node_constant_PROCESS_MODE_DISABLED>`. .. rst-class:: classref-item-separator @@ -112,16 +108,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`NodePath<class_NodePath>` **enable_node_path** = ``NodePath("..")`` +:ref:`NodePath<class_NodePath>` **enable_node_path** = ``NodePath("..")`` :ref:`🔗<class_VisibleOnScreenEnabler3D_property_enable_node_path>` .. rst-class:: classref-property-setget -- void **set_enable_node_path** **(** :ref:`NodePath<class_NodePath>` value **)** -- :ref:`NodePath<class_NodePath>` **get_enable_node_path** **(** **)** - -.. container:: contribute +- |void| **set_enable_node_path**\ (\ value\: :ref:`NodePath<class_NodePath>`\ ) +- :ref:`NodePath<class_NodePath>` **get_enable_node_path**\ (\ ) - There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`! +The path to the target node, relative to the **VisibleOnScreenEnabler3D**. The target node is cached; it's only assigned when setting this property (if the **VisibleOnScreenEnabler3D** is inside the scene tree) and every time the **VisibleOnScreenEnabler3D** enters the scene tree. If the path is empty, no node will be affected. If the path is invalid, an error is also generated. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -130,3 +124,4 @@ Property Descriptions .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visibleonscreennotifier2d.rst b/classes/class_visibleonscreennotifier2d.rst index e51e708ff18..37e3e0554ab 100644 --- a/classes/class_visibleonscreennotifier2d.rst +++ b/classes/class_visibleonscreennotifier2d.rst @@ -14,25 +14,25 @@ VisibleOnScreenNotifier2D **Inherited By:** :ref:`VisibleOnScreenEnabler2D<class_VisibleOnScreenEnabler2D>` -Detects when the node extents are visible on screen. +A rectangular region of 2D space that detects whether it is visible on screen. .. rst-class:: classref-introduction-group Description ----------- -The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. +:ref:`VisibleOnScreenEnabler2D<class_VisibleOnScreenEnabler2D>` represents a rectangular region of 2D space. When any part of this region becomes visible on screen or in a viewport, it will emit a :ref:`screen_entered<class_VisibleOnScreenNotifier2D_signal_screen_entered>` signal, and likewise it will emit a :ref:`screen_exited<class_VisibleOnScreenNotifier2D_signal_screen_exited>` signal when no part of it remains visible. -If you want nodes to be disabled automatically when they exit the screen, use :ref:`VisibleOnScreenEnabler2D<class_VisibleOnScreenEnabler2D>` instead. +If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler2D<class_VisibleOnScreenEnabler2D>`. -\ **Note:** VisibleOnScreenNotifier2D uses the render culling code to determine whether it's visible on screen, which also means that its :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` must be ``true`` to work correctly. +\ **Note:** **VisibleOnScreenNotifier2D** uses the render culling code to determine whether it's visible on screen, so it won't function unless :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` is set to ``true``. .. rst-class:: classref-introduction-group Tutorials --------- -- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/515>`__ +- `2D Dodge The Creeps Demo <https://godotengine.org/asset-library/asset/2712>`__ .. rst-class:: classref-reftable-group @@ -54,9 +54,9 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibleOnScreenNotifier2D_method_is_on_screen>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibleOnScreenNotifier2D_method_is_on_screen>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,7 +71,7 @@ Signals .. rst-class:: classref-signal -**screen_entered** **(** **)** +**screen_entered**\ (\ ) :ref:`🔗<class_VisibleOnScreenNotifier2D_signal_screen_entered>` Emitted when the VisibleOnScreenNotifier2D enters the screen. @@ -83,7 +83,7 @@ Emitted when the VisibleOnScreenNotifier2D enters the screen. .. rst-class:: classref-signal -**screen_exited** **(** **)** +**screen_exited**\ (\ ) :ref:`🔗<class_VisibleOnScreenNotifier2D_signal_screen_exited>` Emitted when the VisibleOnScreenNotifier2D exits the screen. @@ -100,12 +100,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Rect2<class_Rect2>` **rect** = ``Rect2(-10, -10, 20, 20)`` +:ref:`Rect2<class_Rect2>` **rect** = ``Rect2(-10, -10, 20, 20)`` :ref:`🔗<class_VisibleOnScreenNotifier2D_property_rect>` .. rst-class:: classref-property-setget -- void **set_rect** **(** :ref:`Rect2<class_Rect2>` value **)** -- :ref:`Rect2<class_Rect2>` **get_rect** **(** **)** +- |void| **set_rect**\ (\ value\: :ref:`Rect2<class_Rect2>`\ ) +- :ref:`Rect2<class_Rect2>` **get_rect**\ (\ ) The VisibleOnScreenNotifier2D's bounding rectangle. @@ -122,11 +122,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_on_screen** **(** **)** |const| +:ref:`bool<class_bool>` **is_on_screen**\ (\ ) |const| :ref:`🔗<class_VisibleOnScreenNotifier2D_method_is_on_screen>` If ``true``, the bounding rectangle is on the screen. -\ **Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. +\ **Note:** It takes one frame for the **VisibleOnScreenNotifier2D**'s visibility to be determined once added to the scene tree, so this method will always return ``false`` right after it is instantiated, before the draw pass. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -135,3 +135,4 @@ If ``true``, the bounding rectangle is on the screen. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visibleonscreennotifier3d.rst b/classes/class_visibleonscreennotifier3d.rst index 419d2b22306..d201ffa6166 100644 --- a/classes/class_visibleonscreennotifier3d.rst +++ b/classes/class_visibleonscreennotifier3d.rst @@ -14,18 +14,18 @@ VisibleOnScreenNotifier3D **Inherited By:** :ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>` -Detects approximately when the node is visible on screen. +A box-shaped region of 3D space that detects whether it is visible on screen. .. rst-class:: classref-introduction-group Description ----------- -The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a :ref:`Camera3D<class_Camera3D>`'s view. +:ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>` represents a box-shaped region of 3D space. When any part of this region becomes visible on screen or in a :ref:`Camera3D<class_Camera3D>`'s view, it will emit a :ref:`screen_entered<class_VisibleOnScreenNotifier3D_signal_screen_entered>` signal, and likewise it will emit a :ref:`screen_exited<class_VisibleOnScreenNotifier3D_signal_screen_exited>` signal when no part of it remains visible. -If you want nodes to be disabled automatically when they exit the screen, use :ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>` instead. +If you want a node to be enabled automatically when this region is visible on screen, use :ref:`VisibleOnScreenEnabler3D<class_VisibleOnScreenEnabler3D>`. -\ **Note:** VisibleOnScreenNotifier3D uses the render culling code to determine whether it's visible on screen, which also means that its :ref:`Node3D.visible<class_Node3D_property_visible>` must be ``true`` to work correctly. +\ **Note:** **VisibleOnScreenNotifier3D** uses an approximate heuristic that doesn't take walls and other occlusion into account, unless occlusion culling is used. It also won't function unless :ref:`Node3D.visible<class_Node3D_property_visible>` is set to ``true``. .. rst-class:: classref-reftable-group @@ -47,9 +47,9 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibleOnScreenNotifier3D_method_is_on_screen>` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_on_screen<class_VisibleOnScreenNotifier3D_method_is_on_screen>`\ (\ ) |const| | + +-------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -64,9 +64,9 @@ Signals .. rst-class:: classref-signal -**screen_entered** **(** **)** +**screen_entered**\ (\ ) :ref:`🔗<class_VisibleOnScreenNotifier3D_signal_screen_entered>` -Emitted when the VisibleOnScreenNotifier3D enters the screen. +Emitted when the **VisibleOnScreenNotifier3D** enters the screen. .. rst-class:: classref-item-separator @@ -76,9 +76,9 @@ Emitted when the VisibleOnScreenNotifier3D enters the screen. .. rst-class:: classref-signal -**screen_exited** **(** **)** +**screen_exited**\ (\ ) :ref:`🔗<class_VisibleOnScreenNotifier3D_signal_screen_exited>` -Emitted when the VisibleOnScreenNotifier3D exits the screen. +Emitted when the **VisibleOnScreenNotifier3D** exits the screen. .. rst-class:: classref-section-separator @@ -93,14 +93,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`AABB<class_AABB>` **aabb** = ``AABB(-1, -1, -1, 2, 2, 2)`` +:ref:`AABB<class_AABB>` **aabb** = ``AABB(-1, -1, -1, 2, 2, 2)`` :ref:`🔗<class_VisibleOnScreenNotifier3D_property_aabb>` .. rst-class:: classref-property-setget -- void **set_aabb** **(** :ref:`AABB<class_AABB>` value **)** -- :ref:`AABB<class_AABB>` **get_aabb** **(** **)** +- |void| **set_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ ) +- :ref:`AABB<class_AABB>` **get_aabb**\ (\ ) -The VisibleOnScreenNotifier3D's bounding box. +The **VisibleOnScreenNotifier3D**'s bounding box. .. rst-class:: classref-section-separator @@ -115,11 +115,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_on_screen** **(** **)** |const| +:ref:`bool<class_bool>` **is_on_screen**\ (\ ) |const| :ref:`🔗<class_VisibleOnScreenNotifier3D_method_is_on_screen>` -If ``true``, the bounding box is on the screen. +Returns ``true`` if the bounding box is on the screen. -\ **Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return ``false`` right after it is instantiated, even if it will be on screen in the draw pass. +\ **Note:** It takes one frame for the **VisibleOnScreenNotifier3D**'s visibility to be assessed once added to the scene tree, so this method will always return ``false`` right after it is instantiated. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -128,3 +128,4 @@ If ``true``, the bounding box is on the screen. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualinstance3d.rst b/classes/class_visualinstance3d.rst index c3bfc976f8e..713d99f60ff 100644 --- a/classes/class_visualinstance3d.rst +++ b/classes/class_visualinstance3d.rst @@ -12,7 +12,7 @@ VisualInstance3D **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`Decal<class_Decal>`, :ref:`FogVolume<class_FogVolume>`, :ref:`GeometryInstance3D<class_GeometryInstance3D>`, :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>`, :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>`, :ref:`Light3D<class_Light3D>`, :ref:`LightmapGI<class_LightmapGI>`, :ref:`ReflectionProbe<class_ReflectionProbe>`, :ref:`RootMotionView<class_RootMotionView>`, :ref:`VisibleOnScreenNotifier3D<class_VisibleOnScreenNotifier3D>`, :ref:`VoxelGI<class_VoxelGI>` +**Inherited By:** :ref:`Decal<class_Decal>`, :ref:`FogVolume<class_FogVolume>`, :ref:`GeometryInstance3D<class_GeometryInstance3D>`, :ref:`GPUParticlesAttractor3D<class_GPUParticlesAttractor3D>`, :ref:`GPUParticlesCollision3D<class_GPUParticlesCollision3D>`, :ref:`Light3D<class_Light3D>`, :ref:`LightmapGI<class_LightmapGI>`, :ref:`OccluderInstance3D<class_OccluderInstance3D>`, :ref:`ReflectionProbe<class_ReflectionProbe>`, :ref:`RootMotionView<class_RootMotionView>`, :ref:`VisibleOnScreenNotifier3D<class_VisibleOnScreenNotifier3D>`, :ref:`VoxelGI<class_VoxelGI>` Parent of all visual 3D nodes. @@ -47,21 +47,21 @@ Methods .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`_get_aabb<class_VisualInstance3D_method__get_aabb>` **(** **)** |virtual| |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_VisualInstance3D_method_get_aabb>` **(** **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_base<class_VisualInstance3D_method_get_base>` **(** **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID<class_RID>` | :ref:`get_instance<class_VisualInstance3D_method_get_instance>` **(** **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_layer_mask_value<class_VisualInstance3D_method_get_layer_mask_value>` **(** :ref:`int<class_int>` layer_number **)** |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_base<class_VisualInstance3D_method_set_base>` **(** :ref:`RID<class_RID>` base **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layer_mask_value<class_VisualInstance3D_method_set_layer_mask_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`_get_aabb<class_VisualInstance3D_private_method__get_aabb>`\ (\ ) |virtual| |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`get_aabb<class_VisualInstance3D_method_get_aabb>`\ (\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_base<class_VisualInstance3D_method_get_base>`\ (\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID<class_RID>` | :ref:`get_instance<class_VisualInstance3D_method_get_instance>`\ (\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_layer_mask_value<class_VisualInstance3D_method_get_layer_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_base<class_VisualInstance3D_method_set_base>`\ (\ base\: :ref:`RID<class_RID>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layer_mask_value<class_VisualInstance3D_method_set_layer_mask_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -76,12 +76,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **layers** = ``1`` +:ref:`int<class_int>` **layers** = ``1`` :ref:`🔗<class_VisualInstance3D_property_layers>` .. rst-class:: classref-property-setget -- void **set_layer_mask** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_layer_mask** **(** **)** +- |void| **set_layer_mask**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_layer_mask**\ (\ ) The render layer(s) this **VisualInstance3D** is drawn on. @@ -101,12 +101,12 @@ To adjust :ref:`layers<class_VisualInstance3D_property_layers>` more easily usin .. rst-class:: classref-property -:ref:`float<class_float>` **sorting_offset** = ``0.0`` +:ref:`float<class_float>` **sorting_offset** = ``0.0`` :ref:`🔗<class_VisualInstance3D_property_sorting_offset>` .. rst-class:: classref-property-setget -- void **set_sorting_offset** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_sorting_offset** **(** **)** +- |void| **set_sorting_offset**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_sorting_offset**\ (\ ) The amount by which the depth of this **VisualInstance3D** will be adjusted when sorting by depth. Uses the same units as the engine (which are typically meters). Adjusting it to a higher value will make the **VisualInstance3D** reliably draw on top of other **VisualInstance3D**\ s that are otherwise positioned at the same spot. To ensure it always draws on top of other objects around it (not positioned at the same spot), set the value to be greater than the distance between this **VisualInstance3D** and the other nearby **VisualInstance3D**\ s. @@ -118,12 +118,12 @@ The amount by which the depth of this **VisualInstance3D** will be adjusted when .. rst-class:: classref-property -:ref:`bool<class_bool>` **sorting_use_aabb_center** +:ref:`bool<class_bool>` **sorting_use_aabb_center** :ref:`🔗<class_VisualInstance3D_property_sorting_use_aabb_center>` .. rst-class:: classref-property-setget -- void **set_sorting_use_aabb_center** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_sorting_use_aabb_center** **(** **)** +- |void| **set_sorting_use_aabb_center**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_sorting_use_aabb_center**\ (\ ) If ``true``, the object is sorted based on the :ref:`AABB<class_AABB>` center. The object will be sorted based on the global position otherwise. @@ -138,11 +138,11 @@ The :ref:`AABB<class_AABB>` center based sorting is generally more accurate for Method Descriptions ------------------- -.. _class_VisualInstance3D_method__get_aabb: +.. _class_VisualInstance3D_private_method__get_aabb: .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **_get_aabb** **(** **)** |virtual| |const| +:ref:`AABB<class_AABB>` **_get_aabb**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualInstance3D_private_method__get_aabb>` .. container:: contribute @@ -156,7 +156,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **get_aabb** **(** **)** |const| +:ref:`AABB<class_AABB>` **get_aabb**\ (\ ) |const| :ref:`🔗<class_VisualInstance3D_method_get_aabb>` Returns the :ref:`AABB<class_AABB>` (also known as the bounding box) for this **VisualInstance3D**. @@ -168,7 +168,7 @@ Returns the :ref:`AABB<class_AABB>` (also known as the bounding box) for this ** .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_base** **(** **)** |const| +:ref:`RID<class_RID>` **get_base**\ (\ ) |const| :ref:`🔗<class_VisualInstance3D_method_get_base>` Returns the RID of the resource associated with this **VisualInstance3D**. For example, if the Node is a :ref:`MeshInstance3D<class_MeshInstance3D>`, this will return the RID of the associated :ref:`Mesh<class_Mesh>`. @@ -180,7 +180,7 @@ Returns the RID of the resource associated with this **VisualInstance3D**. For e .. rst-class:: classref-method -:ref:`RID<class_RID>` **get_instance** **(** **)** |const| +:ref:`RID<class_RID>` **get_instance**\ (\ ) |const| :ref:`🔗<class_VisualInstance3D_method_get_instance>` Returns the RID of this instance. This RID is the same as the RID returned by :ref:`RenderingServer.instance_create<class_RenderingServer_method_instance_create>`. This RID is needed if you want to call :ref:`RenderingServer<class_RenderingServer>` functions directly on this **VisualInstance3D**. @@ -192,7 +192,7 @@ Returns the RID of this instance. This RID is the same as the RID returned by :r .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_layer_mask_value** **(** :ref:`int<class_int>` layer_number **)** |const| +:ref:`bool<class_bool>` **get_layer_mask_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualInstance3D_method_get_layer_mask_value>` Returns whether or not the specified layer of the :ref:`layers<class_VisualInstance3D_property_layers>` is enabled, given a ``layer_number`` between 1 and 20. @@ -204,7 +204,7 @@ Returns whether or not the specified layer of the :ref:`layers<class_VisualInsta .. rst-class:: classref-method -void **set_base** **(** :ref:`RID<class_RID>` base **)** +|void| **set_base**\ (\ base\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_VisualInstance3D_method_set_base>` Sets the resource that is instantiated by this **VisualInstance3D**, which changes how the engine handles the **VisualInstance3D** under the hood. Equivalent to :ref:`RenderingServer.instance_set_base<class_RenderingServer_method_instance_set_base>`. @@ -216,7 +216,7 @@ Sets the resource that is instantiated by this **VisualInstance3D**, which chang .. rst-class:: classref-method -void **set_layer_mask_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** +|void| **set_layer_mask_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_VisualInstance3D_method_set_layer_mask_value>` Based on ``value``, enables or disables the specified layer in the :ref:`layers<class_VisualInstance3D_property_layers>`, given a ``layer_number`` between 1 and 20. @@ -227,3 +227,4 @@ Based on ``value``, enables or disables the specified layer in the :ref:`layers< .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshader.rst b/classes/class_visualshader.rst index 0a54c0a1606..146d43726b4 100644 --- a/classes/class_visualshader.rst +++ b/classes/class_visualshader.rst @@ -19,9 +19,14 @@ A custom shader program with a visual editor. Description ----------- -This class allows you to define a custom shader program that can be used for various materials to render objects. +This class provides a graph-like visual editor for creating a :ref:`Shader<class_Shader>`. Although **VisualShader**\ s do not require coding, they share the same logic with script shaders. They use :ref:`VisualShaderNode<class_VisualShaderNode>`\ s that can be connected to each other to control the flow of the shader. The visual shader graph is converted to a script shader behind the scenes. -The visual shader editor creates the shader. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Using VisualShaders <../tutorials/shaders/visual_shaders>` .. rst-class:: classref-reftable-group @@ -43,43 +48,47 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_node<class_VisualShader_method_add_node>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`VisualShaderNode<class_VisualShaderNode>` node, :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` id **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_varying<class_VisualShader_method_add_varying>` **(** :ref:`String<class_String>` name, :ref:`VaryingMode<enum_VisualShader_VaryingMode>` mode, :ref:`VaryingType<enum_VisualShader_VaryingType>` type **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_connect_nodes<class_VisualShader_method_can_connect_nodes>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_nodes<class_VisualShader_method_connect_nodes>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`connect_nodes_forced<class_VisualShader_method_connect_nodes_forced>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`disconnect_nodes<class_VisualShader_method_disconnect_nodes>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VisualShaderNode<class_VisualShaderNode>` | :ref:`get_node<class_VisualShader_method_get_node>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]<class_Dictionary>` | :ref:`get_node_connections<class_VisualShader_method_get_node_connections>` **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_node_list<class_VisualShader_method_get_node_list>` **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_VisualShader_method_get_node_position>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_valid_node_id<class_VisualShader_method_get_valid_node_id>` **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_varying<class_VisualShader_method_has_varying>` **(** :ref:`String<class_String>` name **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_node_connection<class_VisualShader_method_is_node_connection>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const| | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_node<class_VisualShader_method_remove_node>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_varying<class_VisualShader_method_remove_varying>` **(** :ref:`String<class_String>` name **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`replace_node<class_VisualShader_method_replace_node>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id, :ref:`StringName<class_StringName>` new_class **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_mode<class_VisualShader_method_set_mode>` **(** :ref:`Mode<enum_Shader_Mode>` mode **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_node_position<class_VisualShader_method_set_node_position>` **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` position **)** | - +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node<class_VisualShader_method_add_node>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, node\: :ref:`VisualShaderNode<class_VisualShaderNode>`, position\: :ref:`Vector2<class_Vector2>`, id\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_varying<class_VisualShader_method_add_varying>`\ (\ name\: :ref:`String<class_String>`, mode\: :ref:`VaryingMode<enum_VisualShader_VaryingMode>`, type\: :ref:`VaryingType<enum_VisualShader_VaryingType>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`attach_node_to_frame<class_VisualShader_method_attach_node_to_frame>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, frame\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_connect_nodes<class_VisualShader_method_can_connect_nodes>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_nodes<class_VisualShader_method_connect_nodes>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`connect_nodes_forced<class_VisualShader_method_connect_nodes_forced>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`detach_node_from_frame<class_VisualShader_method_detach_node_from_frame>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_nodes<class_VisualShader_method_disconnect_nodes>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VisualShaderNode<class_VisualShaderNode>` | :ref:`get_node<class_VisualShader_method_get_node>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_node_connections<class_VisualShader_method_get_node_connections>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_node_list<class_VisualShader_method_get_node_list>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_node_position<class_VisualShader_method_get_node_position>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_valid_node_id<class_VisualShader_method_get_valid_node_id>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_varying<class_VisualShader_method_has_varying>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_node_connection<class_VisualShader_method_is_node_connection>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node<class_VisualShader_method_remove_node>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_varying<class_VisualShader_method_remove_varying>`\ (\ name\: :ref:`String<class_String>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`replace_node<class_VisualShader_method_replace_node>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, new_class\: :ref:`StringName<class_StringName>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_mode<class_VisualShader_method_set_mode>`\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_node_position<class_VisualShader_method_set_node_position>`\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) | + +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -94,7 +103,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Type**: +enum **Type**: :ref:`🔗<enum_VisualShader_Type>` .. _class_VisualShader_constant_TYPE_VERTEX: @@ -192,7 +201,7 @@ Represents the size of the :ref:`Type<enum_VisualShader_Type>` enum. .. rst-class:: classref-enumeration -enum **VaryingMode**: +enum **VaryingMode**: :ref:`🔗<enum_VisualShader_VaryingMode>` .. _class_VisualShader_constant_VARYING_MODE_VERTEX_TO_FRAG_LIGHT: @@ -226,7 +235,7 @@ Represents the size of the :ref:`VaryingMode<enum_VisualShader_VaryingMode>` enu .. rst-class:: classref-enumeration -enum **VaryingType**: +enum **VaryingType**: :ref:`🔗<enum_VisualShader_VaryingType>` .. _class_VisualShader_constant_VARYING_TYPE_FLOAT: @@ -313,17 +322,17 @@ Constants .. rst-class:: classref-constant -**NODE_ID_INVALID** = ``-1`` +**NODE_ID_INVALID** = ``-1`` :ref:`🔗<class_VisualShader_constant_NODE_ID_INVALID>` -Denotes invalid **VisualShader** node. +Indicates an invalid **VisualShader** node. .. _class_VisualShader_constant_NODE_ID_OUTPUT: .. rst-class:: classref-constant -**NODE_ID_OUTPUT** = ``0`` +**NODE_ID_OUTPUT** = ``0`` :ref:`🔗<class_VisualShader_constant_NODE_ID_OUTPUT>` -Denotes output node of **VisualShader**. +Indicates an output node of **VisualShader**. .. rst-class:: classref-section-separator @@ -338,12 +347,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **graph_offset** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **graph_offset** = ``Vector2(0, 0)`` :ref:`🔗<class_VisualShader_property_graph_offset>` .. rst-class:: classref-property-setget -- void **set_graph_offset** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_graph_offset** **(** **)** +- |void| **set_graph_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_graph_offset**\ (\ ) The offset vector of the whole graph. @@ -360,7 +369,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_node** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`VisualShaderNode<class_VisualShaderNode>` node, :ref:`Vector2<class_Vector2>` position, :ref:`int<class_int>` id **)** +|void| **add_node**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, node\: :ref:`VisualShaderNode<class_VisualShaderNode>`, position\: :ref:`Vector2<class_Vector2>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_add_node>` Adds the specified ``node`` to the shader. @@ -372,7 +381,7 @@ Adds the specified ``node`` to the shader. .. rst-class:: classref-method -void **add_varying** **(** :ref:`String<class_String>` name, :ref:`VaryingMode<enum_VisualShader_VaryingMode>` mode, :ref:`VaryingType<enum_VisualShader_VaryingType>` type **)** +|void| **add_varying**\ (\ name\: :ref:`String<class_String>`, mode\: :ref:`VaryingMode<enum_VisualShader_VaryingMode>`, type\: :ref:`VaryingType<enum_VisualShader_VaryingType>`\ ) :ref:`🔗<class_VisualShader_method_add_varying>` Adds a new varying value node to the shader. @@ -380,11 +389,23 @@ Adds a new varying value node to the shader. ---- +.. _class_VisualShader_method_attach_node_to_frame: + +.. rst-class:: classref-method + +|void| **attach_node_to_frame**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, frame\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_attach_node_to_frame>` + +Attaches the given node to the given frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShader_method_can_connect_nodes: .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_connect_nodes** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const| +:ref:`bool<class_bool>` **can_connect_nodes**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShader_method_can_connect_nodes>` Returns ``true`` if the specified nodes and ports can be connected together. @@ -396,7 +417,7 @@ Returns ``true`` if the specified nodes and ports can be connected together. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_nodes** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_nodes**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_connect_nodes>` Connects the specified nodes and ports. @@ -408,7 +429,7 @@ Connects the specified nodes and ports. .. rst-class:: classref-method -void **connect_nodes_forced** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** +|void| **connect_nodes_forced**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_connect_nodes_forced>` Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly. @@ -416,11 +437,23 @@ Connects the specified nodes and ports, even if they can't be connected. Such co ---- +.. _class_VisualShader_method_detach_node_from_frame: + +.. rst-class:: classref-method + +|void| **detach_node_from_frame**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_detach_node_from_frame>` + +Detaches the given node from the frame it is attached to. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShader_method_disconnect_nodes: .. rst-class:: classref-method -void **disconnect_nodes** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** +|void| **disconnect_nodes**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_disconnect_nodes>` Connects the specified nodes and ports. @@ -432,7 +465,7 @@ Connects the specified nodes and ports. .. rst-class:: classref-method -:ref:`VisualShaderNode<class_VisualShaderNode>` **get_node** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** |const| +:ref:`VisualShaderNode<class_VisualShaderNode>` **get_node**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShader_method_get_node>` Returns the shader node instance with specified ``type`` and ``id``. @@ -444,7 +477,7 @@ Returns the shader node instance with specified ``type`` and ``id``. .. rst-class:: classref-method -:ref:`Dictionary[]<class_Dictionary>` **get_node_connections** **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| +:ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_node_connections**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| :ref:`🔗<class_VisualShader_method_get_node_connections>` Returns the list of connected nodes with the specified type. @@ -456,7 +489,7 @@ Returns the list of connected nodes with the specified type. .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_node_list** **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_node_list**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| :ref:`🔗<class_VisualShader_method_get_node_list>` Returns the list of all nodes in the shader with the specified type. @@ -468,7 +501,7 @@ Returns the list of all nodes in the shader with the specified type. .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_node_position** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** |const| +:ref:`Vector2<class_Vector2>` **get_node_position**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShader_method_get_node_position>` Returns the position of the specified node within the shader graph. @@ -480,7 +513,7 @@ Returns the position of the specified node within the shader graph. .. rst-class:: classref-method -:ref:`int<class_int>` **get_valid_node_id** **(** :ref:`Type<enum_VisualShader_Type>` type **)** |const| +:ref:`int<class_int>` **get_valid_node_id**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`\ ) |const| :ref:`🔗<class_VisualShader_method_get_valid_node_id>` Returns next valid node ID that can be added to the shader graph. @@ -492,7 +525,7 @@ Returns next valid node ID that can be added to the shader graph. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_varying** **(** :ref:`String<class_String>` name **)** |const| +:ref:`bool<class_bool>` **has_varying**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_VisualShader_method_has_varying>` Returns ``true`` if the shader has a varying with the given ``name``. @@ -504,7 +537,7 @@ Returns ``true`` if the shader has a varying with the given ``name``. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_node_connection** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` from_node, :ref:`int<class_int>` from_port, :ref:`int<class_int>` to_node, :ref:`int<class_int>` to_port **)** |const| +:ref:`bool<class_bool>` **is_node_connection**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, from_node\: :ref:`int<class_int>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`int<class_int>`, to_port\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShader_method_is_node_connection>` Returns ``true`` if the specified node and port connection exist. @@ -516,7 +549,7 @@ Returns ``true`` if the specified node and port connection exist. .. rst-class:: classref-method -void **remove_node** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id **)** +|void| **remove_node**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShader_method_remove_node>` Removes the specified node from the shader. @@ -528,7 +561,7 @@ Removes the specified node from the shader. .. rst-class:: classref-method -void **remove_varying** **(** :ref:`String<class_String>` name **)** +|void| **remove_varying**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShader_method_remove_varying>` Removes a varying value node with the given ``name``. Prints an error if a node with this name is not found. @@ -540,7 +573,7 @@ Removes a varying value node with the given ``name``. Prints an error if a node .. rst-class:: classref-method -void **replace_node** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id, :ref:`StringName<class_StringName>` new_class **)** +|void| **replace_node**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, new_class\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_VisualShader_method_replace_node>` Replaces the specified node with a node of new class type. @@ -552,7 +585,7 @@ Replaces the specified node with a node of new class type. .. rst-class:: classref-method -void **set_mode** **(** :ref:`Mode<enum_Shader_Mode>` mode **)** +|void| **set_mode**\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`\ ) :ref:`🔗<class_VisualShader_method_set_mode>` Sets the mode of this shader. @@ -564,7 +597,7 @@ Sets the mode of this shader. .. rst-class:: classref-method -void **set_node_position** **(** :ref:`Type<enum_VisualShader_Type>` type, :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` position **)** +|void| **set_node_position**\ (\ type\: :ref:`Type<enum_VisualShader_Type>`, id\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_VisualShader_method_set_node_position>` Sets the position of the specified node. @@ -575,3 +608,4 @@ Sets the position of the specified node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernode.rst b/classes/class_visualshadernode.rst index 4b8b9e04b7d..33d49987758 100644 --- a/classes/class_visualshadernode.rst +++ b/classes/class_visualshadernode.rst @@ -12,23 +12,23 @@ VisualShaderNode **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`VisualShaderNodeBillboard<class_VisualShaderNodeBillboard>`, :ref:`VisualShaderNodeClamp<class_VisualShaderNodeClamp>`, :ref:`VisualShaderNodeColorFunc<class_VisualShaderNodeColorFunc>`, :ref:`VisualShaderNodeColorOp<class_VisualShaderNodeColorOp>`, :ref:`VisualShaderNodeCompare<class_VisualShaderNodeCompare>`, :ref:`VisualShaderNodeConstant<class_VisualShaderNodeConstant>`, :ref:`VisualShaderNodeCubemap<class_VisualShaderNodeCubemap>`, :ref:`VisualShaderNodeCustom<class_VisualShaderNodeCustom>`, :ref:`VisualShaderNodeDerivativeFunc<class_VisualShaderNodeDerivativeFunc>`, :ref:`VisualShaderNodeDeterminant<class_VisualShaderNodeDeterminant>`, :ref:`VisualShaderNodeDistanceFade<class_VisualShaderNodeDistanceFade>`, :ref:`VisualShaderNodeDotProduct<class_VisualShaderNodeDotProduct>`, :ref:`VisualShaderNodeFloatFunc<class_VisualShaderNodeFloatFunc>`, :ref:`VisualShaderNodeFloatOp<class_VisualShaderNodeFloatOp>`, :ref:`VisualShaderNodeFresnel<class_VisualShaderNodeFresnel>`, :ref:`VisualShaderNodeIf<class_VisualShaderNodeIf>`, :ref:`VisualShaderNodeInput<class_VisualShaderNodeInput>`, :ref:`VisualShaderNodeIntFunc<class_VisualShaderNodeIntFunc>`, :ref:`VisualShaderNodeIntOp<class_VisualShaderNodeIntOp>`, :ref:`VisualShaderNodeIs<class_VisualShaderNodeIs>`, :ref:`VisualShaderNodeLinearSceneDepth<class_VisualShaderNodeLinearSceneDepth>`, :ref:`VisualShaderNodeMix<class_VisualShaderNodeMix>`, :ref:`VisualShaderNodeMultiplyAdd<class_VisualShaderNodeMultiplyAdd>`, :ref:`VisualShaderNodeOuterProduct<class_VisualShaderNodeOuterProduct>`, :ref:`VisualShaderNodeOutput<class_VisualShaderNodeOutput>`, :ref:`VisualShaderNodeParameter<class_VisualShaderNodeParameter>`, :ref:`VisualShaderNodeParameterRef<class_VisualShaderNodeParameterRef>`, :ref:`VisualShaderNodeParticleAccelerator<class_VisualShaderNodeParticleAccelerator>`, :ref:`VisualShaderNodeParticleConeVelocity<class_VisualShaderNodeParticleConeVelocity>`, :ref:`VisualShaderNodeParticleEmit<class_VisualShaderNodeParticleEmit>`, :ref:`VisualShaderNodeParticleEmitter<class_VisualShaderNodeParticleEmitter>`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle<class_VisualShaderNodeParticleMultiplyByAxisAngle>`, :ref:`VisualShaderNodeParticleRandomness<class_VisualShaderNodeParticleRandomness>`, :ref:`VisualShaderNodeProximityFade<class_VisualShaderNodeProximityFade>`, :ref:`VisualShaderNodeRandomRange<class_VisualShaderNodeRandomRange>`, :ref:`VisualShaderNodeRemap<class_VisualShaderNodeRemap>`, :ref:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>`, :ref:`VisualShaderNodeSample3D<class_VisualShaderNodeSample3D>`, :ref:`VisualShaderNodeScreenUVToSDF<class_VisualShaderNodeScreenUVToSDF>`, :ref:`VisualShaderNodeSDFRaymarch<class_VisualShaderNodeSDFRaymarch>`, :ref:`VisualShaderNodeSDFToScreenUV<class_VisualShaderNodeSDFToScreenUV>`, :ref:`VisualShaderNodeSmoothStep<class_VisualShaderNodeSmoothStep>`, :ref:`VisualShaderNodeStep<class_VisualShaderNodeStep>`, :ref:`VisualShaderNodeSwitch<class_VisualShaderNodeSwitch>`, :ref:`VisualShaderNodeTexture<class_VisualShaderNodeTexture>`, :ref:`VisualShaderNodeTextureSDF<class_VisualShaderNodeTextureSDF>`, :ref:`VisualShaderNodeTextureSDFNormal<class_VisualShaderNodeTextureSDFNormal>`, :ref:`VisualShaderNodeTransformCompose<class_VisualShaderNodeTransformCompose>`, :ref:`VisualShaderNodeTransformDecompose<class_VisualShaderNodeTransformDecompose>`, :ref:`VisualShaderNodeTransformFunc<class_VisualShaderNodeTransformFunc>`, :ref:`VisualShaderNodeTransformOp<class_VisualShaderNodeTransformOp>`, :ref:`VisualShaderNodeTransformVecMult<class_VisualShaderNodeTransformVecMult>`, :ref:`VisualShaderNodeUIntFunc<class_VisualShaderNodeUIntFunc>`, :ref:`VisualShaderNodeUIntOp<class_VisualShaderNodeUIntOp>`, :ref:`VisualShaderNodeUVFunc<class_VisualShaderNodeUVFunc>`, :ref:`VisualShaderNodeUVPolarCoord<class_VisualShaderNodeUVPolarCoord>`, :ref:`VisualShaderNodeVarying<class_VisualShaderNodeVarying>`, :ref:`VisualShaderNodeVectorBase<class_VisualShaderNodeVectorBase>` +**Inherited By:** :ref:`VisualShaderNodeBillboard<class_VisualShaderNodeBillboard>`, :ref:`VisualShaderNodeClamp<class_VisualShaderNodeClamp>`, :ref:`VisualShaderNodeColorFunc<class_VisualShaderNodeColorFunc>`, :ref:`VisualShaderNodeColorOp<class_VisualShaderNodeColorOp>`, :ref:`VisualShaderNodeCompare<class_VisualShaderNodeCompare>`, :ref:`VisualShaderNodeConstant<class_VisualShaderNodeConstant>`, :ref:`VisualShaderNodeCubemap<class_VisualShaderNodeCubemap>`, :ref:`VisualShaderNodeCustom<class_VisualShaderNodeCustom>`, :ref:`VisualShaderNodeDerivativeFunc<class_VisualShaderNodeDerivativeFunc>`, :ref:`VisualShaderNodeDeterminant<class_VisualShaderNodeDeterminant>`, :ref:`VisualShaderNodeDistanceFade<class_VisualShaderNodeDistanceFade>`, :ref:`VisualShaderNodeDotProduct<class_VisualShaderNodeDotProduct>`, :ref:`VisualShaderNodeFloatFunc<class_VisualShaderNodeFloatFunc>`, :ref:`VisualShaderNodeFloatOp<class_VisualShaderNodeFloatOp>`, :ref:`VisualShaderNodeFresnel<class_VisualShaderNodeFresnel>`, :ref:`VisualShaderNodeIf<class_VisualShaderNodeIf>`, :ref:`VisualShaderNodeInput<class_VisualShaderNodeInput>`, :ref:`VisualShaderNodeIntFunc<class_VisualShaderNodeIntFunc>`, :ref:`VisualShaderNodeIntOp<class_VisualShaderNodeIntOp>`, :ref:`VisualShaderNodeIs<class_VisualShaderNodeIs>`, :ref:`VisualShaderNodeLinearSceneDepth<class_VisualShaderNodeLinearSceneDepth>`, :ref:`VisualShaderNodeMix<class_VisualShaderNodeMix>`, :ref:`VisualShaderNodeMultiplyAdd<class_VisualShaderNodeMultiplyAdd>`, :ref:`VisualShaderNodeOuterProduct<class_VisualShaderNodeOuterProduct>`, :ref:`VisualShaderNodeOutput<class_VisualShaderNodeOutput>`, :ref:`VisualShaderNodeParameter<class_VisualShaderNodeParameter>`, :ref:`VisualShaderNodeParameterRef<class_VisualShaderNodeParameterRef>`, :ref:`VisualShaderNodeParticleAccelerator<class_VisualShaderNodeParticleAccelerator>`, :ref:`VisualShaderNodeParticleConeVelocity<class_VisualShaderNodeParticleConeVelocity>`, :ref:`VisualShaderNodeParticleEmit<class_VisualShaderNodeParticleEmit>`, :ref:`VisualShaderNodeParticleEmitter<class_VisualShaderNodeParticleEmitter>`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle<class_VisualShaderNodeParticleMultiplyByAxisAngle>`, :ref:`VisualShaderNodeParticleRandomness<class_VisualShaderNodeParticleRandomness>`, :ref:`VisualShaderNodeProximityFade<class_VisualShaderNodeProximityFade>`, :ref:`VisualShaderNodeRandomRange<class_VisualShaderNodeRandomRange>`, :ref:`VisualShaderNodeRemap<class_VisualShaderNodeRemap>`, :ref:`VisualShaderNodeReroute<class_VisualShaderNodeReroute>`, :ref:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>`, :ref:`VisualShaderNodeRotationByAxis<class_VisualShaderNodeRotationByAxis>`, :ref:`VisualShaderNodeSample3D<class_VisualShaderNodeSample3D>`, :ref:`VisualShaderNodeScreenNormalWorldSpace<class_VisualShaderNodeScreenNormalWorldSpace>`, :ref:`VisualShaderNodeScreenUVToSDF<class_VisualShaderNodeScreenUVToSDF>`, :ref:`VisualShaderNodeSDFRaymarch<class_VisualShaderNodeSDFRaymarch>`, :ref:`VisualShaderNodeSDFToScreenUV<class_VisualShaderNodeSDFToScreenUV>`, :ref:`VisualShaderNodeSmoothStep<class_VisualShaderNodeSmoothStep>`, :ref:`VisualShaderNodeStep<class_VisualShaderNodeStep>`, :ref:`VisualShaderNodeSwitch<class_VisualShaderNodeSwitch>`, :ref:`VisualShaderNodeTexture<class_VisualShaderNodeTexture>`, :ref:`VisualShaderNodeTextureSDF<class_VisualShaderNodeTextureSDF>`, :ref:`VisualShaderNodeTextureSDFNormal<class_VisualShaderNodeTextureSDFNormal>`, :ref:`VisualShaderNodeTransformCompose<class_VisualShaderNodeTransformCompose>`, :ref:`VisualShaderNodeTransformDecompose<class_VisualShaderNodeTransformDecompose>`, :ref:`VisualShaderNodeTransformFunc<class_VisualShaderNodeTransformFunc>`, :ref:`VisualShaderNodeTransformOp<class_VisualShaderNodeTransformOp>`, :ref:`VisualShaderNodeTransformVecMult<class_VisualShaderNodeTransformVecMult>`, :ref:`VisualShaderNodeUIntFunc<class_VisualShaderNodeUIntFunc>`, :ref:`VisualShaderNodeUIntOp<class_VisualShaderNodeUIntOp>`, :ref:`VisualShaderNodeUVFunc<class_VisualShaderNodeUVFunc>`, :ref:`VisualShaderNodeUVPolarCoord<class_VisualShaderNodeUVPolarCoord>`, :ref:`VisualShaderNodeVarying<class_VisualShaderNodeVarying>`, :ref:`VisualShaderNodeVectorBase<class_VisualShaderNodeVectorBase>`, :ref:`VisualShaderNodeWorldPositionFromDepth<class_VisualShaderNodeWorldPositionFromDepth>` -Base class for nodes in a visual shader graph. +Base class for :ref:`VisualShader<class_VisualShader>` nodes. Not related to scene nodes. .. rst-class:: classref-introduction-group Description ----------- -Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader. +Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader. .. rst-class:: classref-introduction-group Tutorials --------- -- :doc:`VisualShaders <../tutorials/shaders/visual_shaders>` +- :doc:`Using VisualShaders <../tutorials/shaders/visual_shaders>` .. rst-class:: classref-reftable-group @@ -38,9 +38,11 @@ Properties .. table:: :widths: auto - +-----------------------+-----------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`output_port_for_preview<class_VisualShaderNode_property_output_port_for_preview>` | ``-1`` | - +-----------------------+-----------------------------------------------------------------------------------------+--------+ + +-----------------------+---------------------------------------------------------------------------------------------+--------+ + | :ref:`int<class_int>` | :ref:`linked_parent_graph_frame<class_VisualShaderNode_property_linked_parent_graph_frame>` | ``-1`` | + +-----------------------+---------------------------------------------------------------------------------------------+--------+ + | :ref:`int<class_int>` | :ref:`output_port_for_preview<class_VisualShaderNode_property_output_port_for_preview>` | ``-1`` | + +-----------------------+---------------------------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -50,19 +52,21 @@ Methods .. table:: :widths: auto - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_default_input_values<class_VisualShaderNode_method_clear_default_input_values>` **(** **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_default_input_values<class_VisualShaderNode_method_get_default_input_values>` **(** **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_input_port_default_value<class_VisualShaderNode_method_get_input_port_default_value>` **(** :ref:`int<class_int>` port **)** |const| | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_input_port_default_value<class_VisualShaderNode_method_remove_input_port_default_value>` **(** :ref:`int<class_int>` port **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_input_values<class_VisualShaderNode_method_set_default_input_values>` **(** :ref:`Array<class_Array>` values **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_port_default_value<class_VisualShaderNode_method_set_input_port_default_value>` **(** :ref:`int<class_int>` port, :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` prev_value=null **)** | - +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_default_input_values<class_VisualShaderNode_method_clear_default_input_values>`\ (\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_default_input_port<class_VisualShaderNode_method_get_default_input_port>`\ (\ type\: :ref:`PortType<enum_VisualShaderNode_PortType>`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_default_input_values<class_VisualShaderNode_method_get_default_input_values>`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_input_port_default_value<class_VisualShaderNode_method_get_input_port_default_value>`\ (\ port\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_input_port_default_value<class_VisualShaderNode_method_remove_input_port_default_value>`\ (\ port\: :ref:`int<class_int>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_input_values<class_VisualShaderNode_method_set_default_input_values>`\ (\ values\: :ref:`Array<class_Array>`\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_port_default_value<class_VisualShaderNode_method_set_input_port_default_value>`\ (\ port\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, prev_value\: :ref:`Variant<class_Variant>` = null\ ) | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,7 +81,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **PortType**: +enum **PortType**: :ref:`🔗<enum_VisualShaderNode_PortType>` .. _class_VisualShaderNode_constant_PORT_TYPE_SCALAR: @@ -168,16 +172,33 @@ Represents the size of the :ref:`PortType<enum_VisualShaderNode_PortType>` enum. Property Descriptions --------------------- +.. _class_VisualShaderNode_property_linked_parent_graph_frame: + +.. rst-class:: classref-property + +:ref:`int<class_int>` **linked_parent_graph_frame** = ``-1`` :ref:`🔗<class_VisualShaderNode_property_linked_parent_graph_frame>` + +.. rst-class:: classref-property-setget + +- |void| **set_frame**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_frame**\ (\ ) + +Represents the index of the frame this node is linked to. If set to ``-1`` the node is not linked to any frame. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShaderNode_property_output_port_for_preview: .. rst-class:: classref-property -:ref:`int<class_int>` **output_port_for_preview** = ``-1`` +:ref:`int<class_int>` **output_port_for_preview** = ``-1`` :ref:`🔗<class_VisualShaderNode_property_output_port_for_preview>` .. rst-class:: classref-property-setget -- void **set_output_port_for_preview** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_output_port_for_preview** **(** **)** +- |void| **set_output_port_for_preview**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_output_port_for_preview**\ (\ ) Sets the output port index which will be showed for preview. If set to ``-1`` no port will be open for preview. @@ -194,7 +215,7 @@ Method Descriptions .. rst-class:: classref-method -void **clear_default_input_values** **(** **)** +|void| **clear_default_input_values**\ (\ ) :ref:`🔗<class_VisualShaderNode_method_clear_default_input_values>` Clears the default input ports value. @@ -202,11 +223,23 @@ Clears the default input ports value. ---- +.. _class_VisualShaderNode_method_get_default_input_port: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_default_input_port**\ (\ type\: :ref:`PortType<enum_VisualShaderNode_PortType>`\ ) |const| :ref:`🔗<class_VisualShaderNode_method_get_default_input_port>` + +Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph. + +.. rst-class:: classref-item-separator + +---- + .. _class_VisualShaderNode_method_get_default_input_values: .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_default_input_values** **(** **)** |const| +:ref:`Array<class_Array>` **get_default_input_values**\ (\ ) |const| :ref:`🔗<class_VisualShaderNode_method_get_default_input_values>` Returns an :ref:`Array<class_Array>` containing default values for all of the input ports of the node in the form ``[index0, value0, index1, value1, ...]``. @@ -218,7 +251,7 @@ Returns an :ref:`Array<class_Array>` containing default values for all of the in .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_input_port_default_value** **(** :ref:`int<class_int>` port **)** |const| +:ref:`Variant<class_Variant>` **get_input_port_default_value**\ (\ port\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShaderNode_method_get_input_port_default_value>` Returns the default value of the input ``port``. @@ -230,7 +263,7 @@ Returns the default value of the input ``port``. .. rst-class:: classref-method -void **remove_input_port_default_value** **(** :ref:`int<class_int>` port **)** +|void| **remove_input_port_default_value**\ (\ port\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNode_method_remove_input_port_default_value>` Removes the default value of the input ``port``. @@ -242,7 +275,7 @@ Removes the default value of the input ``port``. .. rst-class:: classref-method -void **set_default_input_values** **(** :ref:`Array<class_Array>` values **)** +|void| **set_default_input_values**\ (\ values\: :ref:`Array<class_Array>`\ ) :ref:`🔗<class_VisualShaderNode_method_set_default_input_values>` Sets the default input ports values using an :ref:`Array<class_Array>` of the form ``[index0, value0, index1, value1, ...]``. For example: ``[0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)]``. @@ -254,7 +287,7 @@ Sets the default input ports values using an :ref:`Array<class_Array>` of the fo .. rst-class:: classref-method -void **set_input_port_default_value** **(** :ref:`int<class_int>` port, :ref:`Variant<class_Variant>` value, :ref:`Variant<class_Variant>` prev_value=null **)** +|void| **set_input_port_default_value**\ (\ port\: :ref:`int<class_int>`, value\: :ref:`Variant<class_Variant>`, prev_value\: :ref:`Variant<class_Variant>` = null\ ) :ref:`🔗<class_VisualShaderNode_method_set_input_port_default_value>` Sets the default ``value`` for the selected input ``port``. @@ -265,3 +298,4 @@ Sets the default ``value`` for the selected input ``port``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodebillboard.rst b/classes/class_visualshadernodebillboard.rst index 2fd9828aa99..5a03dc8074e 100644 --- a/classes/class_visualshadernodebillboard.rst +++ b/classes/class_visualshadernodebillboard.rst @@ -48,7 +48,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **BillboardType**: +enum **BillboardType**: :ref:`🔗<enum_VisualShaderNodeBillboard_BillboardType>` .. _class_VisualShaderNodeBillboard_constant_BILLBOARD_TYPE_DISABLED: @@ -103,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>` **billboard_type** = ``1`` +:ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>` **billboard_type** = ``1`` :ref:`🔗<class_VisualShaderNodeBillboard_property_billboard_type>` .. rst-class:: classref-property-setget -- void **set_billboard_type** **(** :ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>` value **)** -- :ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>` **get_billboard_type** **(** **)** +- |void| **set_billboard_type**\ (\ value\: :ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>`\ ) +- :ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>` **get_billboard_type**\ (\ ) Controls how the object faces the camera. See :ref:`BillboardType<enum_VisualShaderNodeBillboard_BillboardType>`. @@ -120,12 +120,12 @@ Controls how the object faces the camera. See :ref:`BillboardType<enum_VisualSha .. rst-class:: classref-property -:ref:`bool<class_bool>` **keep_scale** = ``false`` +:ref:`bool<class_bool>` **keep_scale** = ``false`` :ref:`🔗<class_VisualShaderNodeBillboard_property_keep_scale>` .. rst-class:: classref-property-setget -- void **set_keep_scale_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_keep_scale_enabled** **(** **)** +- |void| **set_keep_scale_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_keep_scale_enabled**\ (\ ) If ``true``, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. @@ -136,3 +136,4 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodebooleanconstant.rst b/classes/class_visualshadernodebooleanconstant.rst index 32da5a46767..4285bf08347 100644 --- a/classes/class_visualshadernodebooleanconstant.rst +++ b/classes/class_visualshadernodebooleanconstant.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **constant** = ``false`` +:ref:`bool<class_bool>` **constant** = ``false`` :ref:`🔗<class_VisualShaderNodeBooleanConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_constant**\ (\ ) A boolean constant which represents a state of this node. @@ -64,3 +64,4 @@ A boolean constant which represents a state of this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodebooleanparameter.rst b/classes/class_visualshadernodebooleanparameter.rst index 3e9ffa31ee4..06823706a8a 100644 --- a/classes/class_visualshadernodebooleanparameter.rst +++ b/classes/class_visualshadernodebooleanparameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value** = ``false`` +:ref:`bool<class_bool>` **default_value** = ``false`` :ref:`🔗<class_VisualShaderNodeBooleanParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeBooleanParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeBooleanParameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeBooleanParameter_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeclamp.rst b/classes/class_visualshadernodeclamp.rst index 37cbf09ef93..e1c114721e8 100644 --- a/classes/class_visualshadernodeclamp.rst +++ b/classes/class_visualshadernodeclamp.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeClamp_OpType>` .. _class_VisualShaderNodeClamp_constant_OP_TYPE_FLOAT: @@ -117,12 +117,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeClamp_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeClamp_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeClamp_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeClamp_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeClamp_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeClamp_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeClamp_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -133,3 +133,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecolorconstant.rst b/classes/class_visualshadernodecolorconstant.rst index e4605cfe5d7..1fa8bcc8d28 100644 --- a/classes/class_visualshadernodecolorconstant.rst +++ b/classes/class_visualshadernodecolorconstant.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **constant** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **constant** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_VisualShaderNodeColorConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_constant**\ (\ ) A :ref:`Color<class_Color>` constant which represents a state of this node. @@ -64,3 +64,4 @@ A :ref:`Color<class_Color>` constant which represents a state of this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecolorfunc.rst b/classes/class_visualshadernodecolorfunc.rst index 442dbec4048..42967c9bb50 100644 --- a/classes/class_visualshadernodecolorfunc.rst +++ b/classes/class_visualshadernodecolorfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeColorFunc_Function>` .. _class_VisualShaderNodeColorFunc_constant_FUNC_GRAYSCALE: @@ -117,12 +117,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeColorFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeColorFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeColorFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeColorFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeColorFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeColorFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeColorFunc_Function>` **get_function**\ (\ ) A function to be applied to the input color. See :ref:`Function<enum_VisualShaderNodeColorFunc_Function>` for options. @@ -133,3 +133,4 @@ A function to be applied to the input color. See :ref:`Function<enum_VisualShade .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecolorop.rst b/classes/class_visualshadernodecolorop.rst index 42cd30ccf12..67d410f47df 100644 --- a/classes/class_visualshadernodecolorop.rst +++ b/classes/class_visualshadernodecolorop.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeColorOp_Operator>` .. _class_VisualShaderNodeColorOp_constant_OP_SCREEN: @@ -201,12 +201,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeColorOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeColorOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` **get_operator**\ (\ ) An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeColorOp_Operator>` for options. @@ -217,3 +217,4 @@ An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecolorparameter.rst b/classes/class_visualshadernodecolorparameter.rst index 49615665ba1..e4411cb6031 100644 --- a/classes/class_visualshadernodecolorparameter.rst +++ b/classes/class_visualshadernodecolorparameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color<class_Color>` **default_value** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **default_value** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_VisualShaderNodeColorParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`Color<class_Color>` value **)** -- :ref:`Color<class_Color>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeColorParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeColorParameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeColorParameter_pr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecomment.rst b/classes/class_visualshadernodecomment.rst index 4398f1c889b..12f7d6f5246 100644 --- a/classes/class_visualshadernodecomment.rst +++ b/classes/class_visualshadernodecomment.rst @@ -10,16 +10,18 @@ VisualShaderNodeComment ======================= -**Inherits:** :ref:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` +**Deprecated:** This class has no function anymore and only exists for compatibility. -A comment node to be placed on visual shader graph. +**Inherits:** :ref:`VisualShaderNodeFrame<class_VisualShaderNodeFrame>` **<** :ref:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +Only exists for compatibility. Use :ref:`VisualShaderNodeFrame<class_VisualShaderNodeFrame>` as a replacement. .. rst-class:: classref-introduction-group Description ----------- -A resizable rectangular area with changeable :ref:`title<class_VisualShaderNodeComment_property_title>` and :ref:`description<class_VisualShaderNodeComment_property_description>` used for better organizing of other visual shader nodes. +This node was replaced by :ref:`VisualShaderNodeFrame<class_VisualShaderNodeFrame>` and only exists to preserve compatibility. In the :ref:`VisualShader<class_VisualShader>` editor it behaves exactly like :ref:`VisualShaderNodeFrame<class_VisualShaderNodeFrame>`. .. rst-class:: classref-reftable-group @@ -29,11 +31,9 @@ Properties .. table:: :widths: auto - +-----------------------------+------------------------------------------------------------------------+---------------+ - | :ref:`String<class_String>` | :ref:`description<class_VisualShaderNodeComment_property_description>` | ``""`` | - +-----------------------------+------------------------------------------------------------------------+---------------+ - | :ref:`String<class_String>` | :ref:`title<class_VisualShaderNodeComment_property_title>` | ``"Comment"`` | - +-----------------------------+------------------------------------------------------------------------+---------------+ + +-----------------------------+------------------------------------------------------------------------+--------+ + | :ref:`String<class_String>` | :ref:`description<class_VisualShaderNodeComment_property_description>` | ``""`` | + +-----------------------------+------------------------------------------------------------------------+--------+ .. rst-class:: classref-section-separator @@ -48,31 +48,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **description** = ``""`` - -.. rst-class:: classref-property-setget - -- void **set_description** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_description** **(** **)** - -An additional description which placed below the title. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VisualShaderNodeComment_property_title: - -.. rst-class:: classref-property - -:ref:`String<class_String>` **title** = ``"Comment"`` +:ref:`String<class_String>` **description** = ``""`` :ref:`🔗<class_VisualShaderNodeComment_property_description>` .. rst-class:: classref-property-setget -- void **set_title** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_title** **(** **)** +- |void| **set_description**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_description**\ (\ ) -A title of the node. +This property only exists to preserve data authored in earlier versions of Godot. It has currently no function. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -81,3 +64,4 @@ A title of the node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecompare.rst b/classes/class_visualshadernodecompare.rst index 2a6547e763b..2487b8d05c8 100644 --- a/classes/class_visualshadernodecompare.rst +++ b/classes/class_visualshadernodecompare.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ComparisonType**: +enum **ComparisonType**: :ref:`🔗<enum_VisualShaderNodeCompare_ComparisonType>` .. _class_VisualShaderNodeCompare_constant_CTYPE_SCALAR: @@ -132,7 +132,7 @@ Represents the size of the :ref:`ComparisonType<enum_VisualShaderNodeCompare_Com .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeCompare_Function>` .. _class_VisualShaderNodeCompare_constant_FUNC_EQUAL: @@ -198,7 +198,7 @@ Represents the size of the :ref:`Function<enum_VisualShaderNodeCompare_Function> .. rst-class:: classref-enumeration -enum **Condition**: +enum **Condition**: :ref:`🔗<enum_VisualShaderNodeCompare_Condition>` .. _class_VisualShaderNodeCompare_constant_COND_ALL: @@ -237,12 +237,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **condition** = ``0`` +:ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **condition** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_condition>` .. rst-class:: classref-property-setget -- void **set_condition** **(** :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` value **)** -- :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **get_condition** **(** **)** +- |void| **set_condition**\ (\ value\: :ref:`Condition<enum_VisualShaderNodeCompare_Condition>`\ ) +- :ref:`Condition<enum_VisualShaderNodeCompare_Condition>` **get_condition**\ (\ ) Extra condition which is applied if :ref:`type<class_VisualShaderNodeCompare_property_type>` is set to :ref:`CTYPE_VECTOR_3D<class_VisualShaderNodeCompare_constant_CTYPE_VECTOR_3D>`. @@ -254,12 +254,12 @@ Extra condition which is applied if :ref:`type<class_VisualShaderNodeCompare_pro .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeCompare_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeCompare_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeCompare_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeCompare_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeCompare_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeCompare_Function>` **get_function**\ (\ ) A comparison function. See :ref:`Function<enum_VisualShaderNodeCompare_Function>` for options. @@ -271,12 +271,12 @@ A comparison function. See :ref:`Function<enum_VisualShaderNodeCompare_Function> .. rst-class:: classref-property -:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **type** = ``0`` +:ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **type** = ``0`` :ref:`🔗<class_VisualShaderNodeCompare_property_type>` .. rst-class:: classref-property-setget -- void **set_comparison_type** **(** :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` value **)** -- :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **get_comparison_type** **(** **)** +- |void| **set_comparison_type**\ (\ value\: :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>`\ ) +- :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` **get_comparison_type**\ (\ ) The type to be used in the comparison. See :ref:`ComparisonType<enum_VisualShaderNodeCompare_ComparisonType>` for options. @@ -287,3 +287,4 @@ The type to be used in the comparison. See :ref:`ComparisonType<enum_VisualShade .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeconstant.rst b/classes/class_visualshadernodeconstant.rst index f5dd8e4f513..27de2d22e25 100644 --- a/classes/class_visualshadernodeconstant.rst +++ b/classes/class_visualshadernodeconstant.rst @@ -30,3 +30,4 @@ This is an abstract class. See the derived types for descriptions of the possibl .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecubemap.rst b/classes/class_visualshadernodecubemap.rst index 28e0cac7c91..4e4b786940b 100644 --- a/classes/class_visualshadernodecubemap.rst +++ b/classes/class_visualshadernodecubemap.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Source**: +enum **Source**: :ref:`🔗<enum_VisualShaderNodeCubemap_Source>` .. _class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE: @@ -84,7 +84,7 @@ Represents the size of the :ref:`Source<enum_VisualShaderNodeCubemap_Source>` en .. rst-class:: classref-enumeration -enum **TextureType**: +enum **TextureType**: :ref:`🔗<enum_VisualShaderNodeCubemap_TextureType>` .. _class_VisualShaderNodeCubemap_constant_TYPE_DATA: @@ -100,7 +100,7 @@ No hints are added to the uniform declaration. :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **TYPE_COLOR** = ``1`` -Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. +Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. .. _class_VisualShaderNodeCubemap_constant_TYPE_NORMAL_MAP: @@ -131,12 +131,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Cubemap<class_Cubemap>` **cube_map** +:ref:`Cubemap<class_Cubemap>` **cube_map** :ref:`🔗<class_VisualShaderNodeCubemap_property_cube_map>` .. rst-class:: classref-property-setget -- void **set_cube_map** **(** :ref:`Cubemap<class_Cubemap>` value **)** -- :ref:`Cubemap<class_Cubemap>` **get_cube_map** **(** **)** +- |void| **set_cube_map**\ (\ value\: :ref:`Cubemap<class_Cubemap>`\ ) +- :ref:`Cubemap<class_Cubemap>` **get_cube_map**\ (\ ) The :ref:`Cubemap<class_Cubemap>` texture to sample when using :ref:`SOURCE_TEXTURE<class_VisualShaderNodeCubemap_constant_SOURCE_TEXTURE>` as :ref:`source<class_VisualShaderNodeCubemap_property_source>`. @@ -148,12 +148,12 @@ The :ref:`Cubemap<class_Cubemap>` texture to sample when using :ref:`SOURCE_TEXT .. rst-class:: classref-property -:ref:`Source<enum_VisualShaderNodeCubemap_Source>` **source** = ``0`` +:ref:`Source<enum_VisualShaderNodeCubemap_Source>` **source** = ``0`` :ref:`🔗<class_VisualShaderNodeCubemap_property_source>` .. rst-class:: classref-property-setget -- void **set_source** **(** :ref:`Source<enum_VisualShaderNodeCubemap_Source>` value **)** -- :ref:`Source<enum_VisualShaderNodeCubemap_Source>` **get_source** **(** **)** +- |void| **set_source**\ (\ value\: :ref:`Source<enum_VisualShaderNodeCubemap_Source>`\ ) +- :ref:`Source<enum_VisualShaderNodeCubemap_Source>` **get_source**\ (\ ) Defines which source should be used for the sampling. See :ref:`Source<enum_VisualShaderNodeCubemap_Source>` for options. @@ -165,12 +165,12 @@ Defines which source should be used for the sampling. See :ref:`Source<enum_Visu .. rst-class:: classref-property -:ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **texture_type** = ``0`` +:ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **texture_type** = ``0`` :ref:`🔗<class_VisualShaderNodeCubemap_property_texture_type>` .. rst-class:: classref-property-setget -- void **set_texture_type** **(** :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` value **)** -- :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **get_texture_type** **(** **)** +- |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>`\ ) +- :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` **get_texture_type**\ (\ ) Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeCubemap_TextureType>` for options. @@ -181,3 +181,4 @@ Defines the type of data provided by the source texture. See :ref:`TextureType<e .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecubemapparameter.rst b/classes/class_visualshadernodecubemapparameter.rst index 564a41a1395..b3d360772c4 100644 --- a/classes/class_visualshadernodecubemapparameter.rst +++ b/classes/class_visualshadernodecubemapparameter.rst @@ -28,3 +28,4 @@ Translated to ``uniform samplerCube`` in the shader language. The output value c .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecurvetexture.rst b/classes/class_visualshadernodecurvetexture.rst index 0e69e59af6f..efb32850105 100644 --- a/classes/class_visualshadernodecurvetexture.rst +++ b/classes/class_visualshadernodecurvetexture.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CurveTexture<class_CurveTexture>` **texture** +:ref:`CurveTexture<class_CurveTexture>` **texture** :ref:`🔗<class_VisualShaderNodeCurveTexture_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`CurveTexture<class_CurveTexture>` value **)** -- :ref:`CurveTexture<class_CurveTexture>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`CurveTexture<class_CurveTexture>`\ ) +- :ref:`CurveTexture<class_CurveTexture>` **get_texture**\ (\ ) The source texture. @@ -62,3 +62,4 @@ The source texture. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecurvexyztexture.rst b/classes/class_visualshadernodecurvexyztexture.rst index 3ad6b3c36ea..ad92c0fbc84 100644 --- a/classes/class_visualshadernodecurvexyztexture.rst +++ b/classes/class_visualshadernodecurvexyztexture.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CurveXYZTexture<class_CurveXYZTexture>` **texture** +:ref:`CurveXYZTexture<class_CurveXYZTexture>` **texture** :ref:`🔗<class_VisualShaderNodeCurveXYZTexture_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`CurveXYZTexture<class_CurveXYZTexture>` value **)** -- :ref:`CurveXYZTexture<class_CurveXYZTexture>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`CurveXYZTexture<class_CurveXYZTexture>`\ ) +- :ref:`CurveXYZTexture<class_CurveXYZTexture>` **get_texture**\ (\ ) The source texture. @@ -62,3 +62,4 @@ The source texture. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodecustom.rst b/classes/class_visualshadernodecustom.rst index 07623655922..ff0cc375ad8 100644 --- a/classes/class_visualshadernodecustom.rst +++ b/classes/class_visualshadernodecustom.rst @@ -44,37 +44,51 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_category<class_VisualShaderNodeCustom_method__get_category>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_code<class_VisualShaderNodeCustom_method__get_code>` **(** :ref:`String[]<class_String>` input_vars, :ref:`String[]<class_String>` output_vars, :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_description<class_VisualShaderNodeCustom_method__get_description>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_func_code<class_VisualShaderNodeCustom_method__get_func_code>` **(** :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_global_code<class_VisualShaderNodeCustom_method__get_global_code>` **(** :ref:`Mode<enum_Shader_Mode>` mode **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_input_port_count<class_VisualShaderNodeCustom_method__get_input_port_count>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_input_port_name<class_VisualShaderNodeCustom_method__get_input_port_name>` **(** :ref:`int<class_int>` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_input_port_type<class_VisualShaderNodeCustom_method__get_input_port_type>` **(** :ref:`int<class_int>` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_name<class_VisualShaderNodeCustom_method__get_name>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_output_port_count<class_VisualShaderNodeCustom_method__get_output_port_count>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_output_port_name<class_VisualShaderNodeCustom_method__get_output_port_name>` **(** :ref:`int<class_int>` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_output_port_type<class_VisualShaderNodeCustom_method__get_output_port_type>` **(** :ref:`int<class_int>` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_return_icon_type<class_VisualShaderNodeCustom_method__get_return_icon_type>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_available<class_VisualShaderNodeCustom_method__is_available>` **(** :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_highend<class_VisualShaderNodeCustom_method__is_highend>` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_category<class_VisualShaderNodeCustom_private_method__get_category>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_code<class_VisualShaderNodeCustom_private_method__get_code>`\ (\ input_vars\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], output_vars\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_default_input_port<class_VisualShaderNodeCustom_private_method__get_default_input_port>`\ (\ type\: :ref:`PortType<enum_VisualShaderNode_PortType>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_description<class_VisualShaderNodeCustom_private_method__get_description>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_func_code<class_VisualShaderNodeCustom_private_method__get_func_code>`\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_global_code<class_VisualShaderNodeCustom_private_method__get_global_code>`\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_input_port_count<class_VisualShaderNodeCustom_private_method__get_input_port_count>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`_get_input_port_default_value<class_VisualShaderNodeCustom_private_method__get_input_port_default_value>`\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_input_port_name<class_VisualShaderNodeCustom_private_method__get_input_port_name>`\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_input_port_type<class_VisualShaderNodeCustom_private_method__get_input_port_type>`\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_name<class_VisualShaderNodeCustom_private_method__get_name>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_output_port_count<class_VisualShaderNodeCustom_private_method__get_output_port_count>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_output_port_name<class_VisualShaderNodeCustom_private_method__get_output_port_name>`\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_output_port_type<class_VisualShaderNodeCustom_private_method__get_output_port_type>`\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_property_count<class_VisualShaderNodeCustom_private_method__get_property_count>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_property_default_index<class_VisualShaderNodeCustom_private_method__get_property_default_index>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_property_name<class_VisualShaderNodeCustom_private_method__get_property_name>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_property_options<class_VisualShaderNodeCustom_private_method__get_property_options>`\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`_get_return_icon_type<class_VisualShaderNodeCustom_private_method__get_return_icon_type>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_available<class_VisualShaderNodeCustom_private_method__is_available>`\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_highend<class_VisualShaderNodeCustom_private_method__is_highend>`\ (\ ) |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_option_index<class_VisualShaderNodeCustom_method_get_option_index>`\ (\ option\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -85,11 +99,11 @@ Methods Method Descriptions ------------------- -.. _class_VisualShaderNodeCustom_method__get_category: +.. _class_VisualShaderNodeCustom_private_method__get_category: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_category** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_category**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_category>` Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like ``"MyGame/MyFunctions/Noise"``. @@ -99,11 +113,11 @@ Defining this method is **optional**. If not overridden, the node will be filed ---- -.. _class_VisualShaderNodeCustom_method__get_code: +.. _class_VisualShaderNodeCustom_private_method__get_code: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_code** **(** :ref:`String[]<class_String>` input_vars, :ref:`String[]<class_String>` output_vars, :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| +:ref:`String<class_String>` **_get_code**\ (\ input_vars\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], output_vars\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_code>` Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the ``"""`` multiline string construct can be used for convenience). @@ -119,11 +133,25 @@ Defining this method is **required**. ---- -.. _class_VisualShaderNodeCustom_method__get_description: +.. _class_VisualShaderNodeCustom_private_method__get_default_input_port: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_description** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_default_input_port**\ (\ type\: :ref:`PortType<enum_VisualShaderNode_PortType>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_default_input_port>` + +Override this method to define the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph. + +Defining this method is **optional**. If not overridden, the connection will be created to the first valid port. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_description: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_get_description**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_description>` Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. @@ -133,11 +161,11 @@ Defining this method is **optional**. ---- -.. _class_VisualShaderNodeCustom_method__get_func_code: +.. _class_VisualShaderNodeCustom_private_method__get_func_code: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_func_code** **(** :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| +:ref:`String<class_String>` **_get_func_code**\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_func_code>` Override this method to add a shader code to the beginning of each shader function (once). The shader code should be returned as a string, which can have multiple lines (the ``"""`` multiline string construct can be used for convenience). @@ -151,11 +179,11 @@ Defining this method is **optional**. ---- -.. _class_VisualShaderNodeCustom_method__get_global_code: +.. _class_VisualShaderNodeCustom_private_method__get_global_code: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_global_code** **(** :ref:`Mode<enum_Shader_Mode>` mode **)** |virtual| |const| +:ref:`String<class_String>` **_get_global_code**\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_global_code>` Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the ``"""`` multiline string construct can be used for convenience). @@ -169,11 +197,11 @@ Defining this method is **optional**. ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_count: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_input_port_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_input_port_count**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_input_port_count>` Override this method to define the number of input ports of the associated custom node. @@ -183,13 +211,27 @@ Defining this method is **required**. If not overridden, the node has no input p ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_name: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_default_value: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_input_port_name** **(** :ref:`int<class_int>` port **)** |virtual| |const| +:ref:`Variant<class_Variant>` **_get_input_port_default_value**\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_input_port_default_value>` + +Override this method to define the default value for the specified input port. Prefer use this over :ref:`VisualShaderNode.set_input_port_default_value<class_VisualShaderNode_method_set_input_port_default_value>`. + +Defining this method is **required**. If not overridden, the node has no default values for their input ports. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_input_port_name: + +.. rst-class:: classref-method -Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the ``input_vars`` array in :ref:`_get_code<class_VisualShaderNodeCustom_method__get_code>`. +:ref:`String<class_String>` **_get_input_port_name**\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_input_port_name>` + +Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the ``input_vars`` array in :ref:`_get_code<class_VisualShaderNodeCustom_private_method__get_code>`. Defining this method is **optional**, but recommended. If not overridden, input ports are named as ``"in" + str(port)``. @@ -197,11 +239,11 @@ Defining this method is **optional**, but recommended. If not overridden, input ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_type: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_type: .. rst-class:: classref-method -:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_input_port_type** **(** :ref:`int<class_int>` port **)** |virtual| |const| +:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_input_port_type**\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_input_port_type>` Override this method to define the returned type of each input port of the associated custom node (see :ref:`PortType<enum_VisualShaderNode_PortType>` for possible types). @@ -211,11 +253,11 @@ Defining this method is **optional**, but recommended. If not overridden, input ---- -.. _class_VisualShaderNodeCustom_method__get_name: +.. _class_VisualShaderNodeCustom_private_method__get_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_name** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_name>` Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. @@ -225,11 +267,11 @@ Defining this method is **optional**, but recommended. If not overridden, the no ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_count: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_output_port_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_output_port_count**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_output_port_count>` Override this method to define the number of output ports of the associated custom node. @@ -239,13 +281,13 @@ Defining this method is **required**. If not overridden, the node has no output ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_name: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_name: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_output_port_name** **(** :ref:`int<class_int>` port **)** |virtual| |const| +:ref:`String<class_String>` **_get_output_port_name**\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_output_port_name>` -Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the ``output_vars`` array in :ref:`_get_code<class_VisualShaderNodeCustom_method__get_code>`. +Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the ``output_vars`` array in :ref:`_get_code<class_VisualShaderNodeCustom_private_method__get_code>`. Defining this method is **optional**, but recommended. If not overridden, output ports are named as ``"out" + str(port)``. @@ -253,11 +295,11 @@ Defining this method is **optional**, but recommended. If not overridden, output ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_type: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_type: .. rst-class:: classref-method -:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_output_port_type** **(** :ref:`int<class_int>` port **)** |virtual| |const| +:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_output_port_type**\ (\ port\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_output_port_type>` Override this method to define the returned type of each output port of the associated custom node (see :ref:`PortType<enum_VisualShaderNode_PortType>` for possible types). @@ -267,11 +309,67 @@ Defining this method is **optional**, but recommended. If not overridden, output ---- -.. _class_VisualShaderNodeCustom_method__get_return_icon_type: +.. _class_VisualShaderNodeCustom_private_method__get_property_count: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **_get_property_count**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_property_count>` + +Override this method to define the number of the properties. + +Defining this method is **optional**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_default_index: .. rst-class:: classref-method -:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_return_icon_type** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_property_default_index**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_property_default_index>` + +Override this method to define the default index of the property of the associated custom node. + +Defining this method is **optional**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_name: + +.. rst-class:: classref-method + +:ref:`String<class_String>` **_get_property_name**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_property_name>` + +Override this method to define the names of the property of the associated custom node. + +Defining this method is **optional**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_options: + +.. rst-class:: classref-method + +:ref:`PackedStringArray<class_PackedStringArray>` **_get_property_options**\ (\ index\: :ref:`int<class_int>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_property_options>` + +Override this method to define the options inside the drop-down list property of the associated custom node. + +Defining this method is **optional**. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_return_icon_type: + +.. rst-class:: classref-method + +:ref:`PortType<enum_VisualShaderNode_PortType>` **_get_return_icon_type**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__get_return_icon_type>` Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. @@ -281,11 +379,11 @@ Defining this method is **optional**. If not overridden, no return icon is shown ---- -.. _class_VisualShaderNodeCustom_method__is_available: +.. _class_VisualShaderNodeCustom_private_method__is_available: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_available** **(** :ref:`Mode<enum_Shader_Mode>` mode, :ref:`Type<enum_VisualShader_Type>` type **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_available**\ (\ mode\: :ref:`Mode<enum_Shader_Mode>`, type\: :ref:`Type<enum_VisualShader_Type>`\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__is_available>` Override this method to prevent the node to be visible in the member dialog for the certain ``mode`` (see :ref:`Mode<enum_Shader_Mode>`) and/or ``type`` (see :ref:`Type<enum_VisualShader_Type>`). @@ -295,16 +393,28 @@ Defining this method is **optional**. If not overridden, it's ``true``. ---- -.. _class_VisualShaderNodeCustom_method__is_highend: +.. _class_VisualShaderNodeCustom_private_method__is_highend: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_highend** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_highend**\ (\ ) |virtual| |const| :ref:`🔗<class_VisualShaderNodeCustom_private_method__is_highend>` Override this method to enable high-end mark in the Visual Shader Editor's members dialog. Defining this method is **optional**. If not overridden, it's ``false``. +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_method_get_option_index: + +.. rst-class:: classref-method + +:ref:`int<class_int>` **get_option_index**\ (\ option\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShaderNodeCustom_method_get_option_index>` + +Returns the selected index of the drop-down list option within a graph. You may use this function to define the specific behavior in the :ref:`_get_code<class_VisualShaderNodeCustom_private_method__get_code>` or :ref:`_get_global_code<class_VisualShaderNodeCustom_private_method__get_global_code>`. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -312,3 +422,4 @@ Defining this method is **optional**. If not overridden, it's ``false``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodederivativefunc.rst b/classes/class_visualshadernodederivativefunc.rst index 8a4e7ed38ea..4d0dfa7ca9e 100644 --- a/classes/class_visualshadernodederivativefunc.rst +++ b/classes/class_visualshadernodederivativefunc.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeDerivativeFunc_OpType>` .. _class_VisualShaderNodeDerivativeFunc_constant_OP_TYPE_SCALAR: @@ -100,7 +100,7 @@ Represents the size of the :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpTy .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeDerivativeFunc_Function>` .. _class_VisualShaderNodeDerivativeFunc_constant_FUNC_SUM: @@ -142,7 +142,7 @@ Represents the size of the :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Fu .. rst-class:: classref-enumeration -enum **Precision**: +enum **Precision**: :ref:`🔗<enum_VisualShaderNodeDerivativeFunc_Precision>` .. _class_VisualShaderNodeDerivativeFunc_constant_PRECISION_NONE: @@ -189,12 +189,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeDerivativeFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` **get_function**\ (\ ) A derivative function type. See :ref:`Function<enum_VisualShaderNodeDerivativeFunc_Function>` for options. @@ -206,12 +206,12 @@ A derivative function type. See :ref:`Function<enum_VisualShaderNodeDerivativeFu .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeDerivativeFunc_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. See :ref:`OpType<enum_VisualShaderNodeDerivativeFunc_OpType>` for options. @@ -223,12 +223,12 @@ A type of operands and returned value. See :ref:`OpType<enum_VisualShaderNodeDer .. rst-class:: classref-property -:ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` **precision** = ``0`` +:ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` **precision** = ``0`` :ref:`🔗<class_VisualShaderNodeDerivativeFunc_property_precision>` .. rst-class:: classref-property-setget -- void **set_precision** **(** :ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` value **)** -- :ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` **get_precision** **(** **)** +- |void| **set_precision**\ (\ value\: :ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>`\ ) +- :ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` **get_precision**\ (\ ) Sets the level of precision to use for the derivative function. See :ref:`Precision<enum_VisualShaderNodeDerivativeFunc_Precision>` for options. When using the GL Compatibility renderer, this setting has no effect. @@ -239,3 +239,4 @@ Sets the level of precision to use for the derivative function. See :ref:`Precis .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodedeterminant.rst b/classes/class_visualshadernodedeterminant.rst index b85ba816cdf..082fe6534c6 100644 --- a/classes/class_visualshadernodedeterminant.rst +++ b/classes/class_visualshadernodedeterminant.rst @@ -28,3 +28,4 @@ Translates to ``determinant(x)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodedistancefade.rst b/classes/class_visualshadernodedistancefade.rst index 75abdfd09eb..bfd4e974152 100644 --- a/classes/class_visualshadernodedistancefade.rst +++ b/classes/class_visualshadernodedistancefade.rst @@ -28,3 +28,4 @@ The distance fade effect fades out each pixel based on its distance to another o .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodedotproduct.rst b/classes/class_visualshadernodedotproduct.rst index 0da9ecf2f4f..280d4ac4abf 100644 --- a/classes/class_visualshadernodedotproduct.rst +++ b/classes/class_visualshadernodedotproduct.rst @@ -28,3 +28,4 @@ Translates to ``dot(a, b)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeexpression.rst b/classes/class_visualshadernodeexpression.rst index 84fe57136e9..08065ad3816 100644 --- a/classes/class_visualshadernodeexpression.rst +++ b/classes/class_visualshadernodeexpression.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **expression** = ``""`` +:ref:`String<class_String>` **expression** = ``""`` :ref:`🔗<class_VisualShaderNodeExpression_property_expression>` .. rst-class:: classref-property-setget -- void **set_expression** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_expression** **(** **)** +- |void| **set_expression**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_expression**\ (\ ) An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (``vertex``, ``fragment``, or ``light``), and thus cannot be used to declare functions, varyings, uniforms, or global constants. @@ -66,3 +66,4 @@ An expression in Godot Shading Language, which will be injected at the start of .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefaceforward.rst b/classes/class_visualshadernodefaceforward.rst index cfad3a9326e..e79f980d000 100644 --- a/classes/class_visualshadernodefaceforward.rst +++ b/classes/class_visualshadernodefaceforward.rst @@ -28,3 +28,4 @@ Translates to ``faceforward(N, I, Nref)`` in the shader language. The function h .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefloatconstant.rst b/classes/class_visualshadernodefloatconstant.rst index da21b8aaf06..2e96c00d120 100644 --- a/classes/class_visualshadernodefloatconstant.rst +++ b/classes/class_visualshadernodefloatconstant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **constant** = ``0.0`` +:ref:`float<class_float>` **constant** = ``0.0`` :ref:`🔗<class_VisualShaderNodeFloatConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_constant**\ (\ ) A floating-point constant which represents a state of this node. @@ -62,3 +62,4 @@ A floating-point constant which represents a state of this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefloatfunc.rst b/classes/class_visualshadernodefloatfunc.rst index 81f2e131e45..1cad1d664b6 100644 --- a/classes/class_visualshadernodefloatfunc.rst +++ b/classes/class_visualshadernodefloatfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeFloatFunc_Function>` .. _class_VisualShaderNodeFloatFunc_constant_FUNC_SIN: @@ -325,12 +325,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **function** = ``13`` +:ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **function** = ``13`` :ref:`🔗<class_VisualShaderNodeFloatFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` **get_function**\ (\ ) A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeFloatFunc_Function>` for options. @@ -341,3 +341,4 @@ A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNode .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefloatop.rst b/classes/class_visualshadernodefloatop.rst index b94f0caf58f..7a1c5510641 100644 --- a/classes/class_visualshadernodefloatop.rst +++ b/classes/class_visualshadernodefloatop.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeFloatOp_Operator>` .. _class_VisualShaderNodeFloatOp_constant_OP_ADD: @@ -149,12 +149,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeFloatOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` **get_operator**\ (\ ) An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeFloatOp_Operator>` for options. @@ -165,3 +165,4 @@ An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefloatparameter.rst b/classes/class_visualshadernodefloatparameter.rst index 69ee8e99497..56c7e822f25 100644 --- a/classes/class_visualshadernodefloatparameter.rst +++ b/classes/class_visualshadernodefloatparameter.rst @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Hint**: +enum **Hint**: :ref:`🔗<enum_VisualShaderNodeFloatParameter_Hint>` .. _class_VisualShaderNodeFloatParameter_constant_HINT_NONE: @@ -103,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **default_value** = ``0.0`` +:ref:`float<class_float>` **default_value** = ``0.0`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -120,12 +120,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeFloatParameter_property_default_value>`. @@ -137,12 +137,12 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeFloatParameter_pr .. rst-class:: classref-property -:ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>` **hint** = ``0`` +:ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>` **hint** = ``0`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_hint>` .. rst-class:: classref-property-setget -- void **set_hint** **(** :ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>` value **)** -- :ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>` **get_hint** **(** **)** +- |void| **set_hint**\ (\ value\: :ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>`\ ) +- :ref:`Hint<enum_VisualShaderNodeFloatParameter_Hint>` **get_hint**\ (\ ) A hint applied to the uniform, which controls the values it can take when set through the Inspector. @@ -154,12 +154,12 @@ A hint applied to the uniform, which controls the values it can take when set th .. rst-class:: classref-property -:ref:`float<class_float>` **max** = ``1.0`` +:ref:`float<class_float>` **max** = ``1.0`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_max>` .. rst-class:: classref-property-setget -- void **set_max** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_max** **(** **)** +- |void| **set_max**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_max**\ (\ ) Minimum value for range hints. Used if :ref:`hint<class_VisualShaderNodeFloatParameter_property_hint>` is set to :ref:`HINT_RANGE<class_VisualShaderNodeFloatParameter_constant_HINT_RANGE>` or :ref:`HINT_RANGE_STEP<class_VisualShaderNodeFloatParameter_constant_HINT_RANGE_STEP>`. @@ -171,12 +171,12 @@ Minimum value for range hints. Used if :ref:`hint<class_VisualShaderNodeFloatPar .. rst-class:: classref-property -:ref:`float<class_float>` **min** = ``0.0`` +:ref:`float<class_float>` **min** = ``0.0`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_min>` .. rst-class:: classref-property-setget -- void **set_min** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_min** **(** **)** +- |void| **set_min**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_min**\ (\ ) Maximum value for range hints. Used if :ref:`hint<class_VisualShaderNodeFloatParameter_property_hint>` is set to :ref:`HINT_RANGE<class_VisualShaderNodeFloatParameter_constant_HINT_RANGE>` or :ref:`HINT_RANGE_STEP<class_VisualShaderNodeFloatParameter_constant_HINT_RANGE_STEP>`. @@ -188,12 +188,12 @@ Maximum value for range hints. Used if :ref:`hint<class_VisualShaderNodeFloatPar .. rst-class:: classref-property -:ref:`float<class_float>` **step** = ``0.1`` +:ref:`float<class_float>` **step** = ``0.1`` :ref:`🔗<class_VisualShaderNodeFloatParameter_property_step>` .. rst-class:: classref-property-setget -- void **set_step** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_step** **(** **)** +- |void| **set_step**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_step**\ (\ ) Step (increment) value for the range hint with step. Used if :ref:`hint<class_VisualShaderNodeFloatParameter_property_hint>` is set to :ref:`HINT_RANGE_STEP<class_VisualShaderNodeFloatParameter_constant_HINT_RANGE_STEP>`. @@ -204,3 +204,4 @@ Step (increment) value for the range hint with step. Used if :ref:`hint<class_Vi .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeframe.rst b/classes/class_visualshadernodeframe.rst new file mode 100644 index 00000000000..631c7480d60 --- /dev/null +++ b/classes/class_visualshadernodeframe.rst @@ -0,0 +1,192 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeFrame.xml. + +.. _class_VisualShaderNodeFrame: + +VisualShaderNodeFrame +===================== + +**Inherits:** :ref:`VisualShaderNodeResizableBase<class_VisualShaderNodeResizableBase>` **<** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +**Inherited By:** :ref:`VisualShaderNodeComment<class_VisualShaderNodeComment>` + +A frame other visual shader nodes can be attached to for better organization. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A rectangular frame that can be used to group visual shader nodes together to improve organization. + +Nodes attached to the frame will move with it when it is dragged and it can automatically resize to enclose all attached nodes. + +Its title, description and color can be customized. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`attached_nodes<class_VisualShaderNodeFrame_property_attached_nodes>` | ``PackedInt32Array()`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`bool<class_bool>` | :ref:`autoshrink<class_VisualShaderNodeFrame_property_autoshrink>` | ``true`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`Color<class_Color>` | :ref:`tint_color<class_VisualShaderNodeFrame_property_tint_color>` | ``Color(0.3, 0.3, 0.3, 0.75)`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`bool<class_bool>` | :ref:`tint_color_enabled<class_VisualShaderNodeFrame_property_tint_color_enabled>` | ``false`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + | :ref:`String<class_String>` | :ref:`title<class_VisualShaderNodeFrame_property_title>` | ``"Title"`` | + +-------------------------------------------------+------------------------------------------------------------------------------------+--------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_attached_node<class_VisualShaderNodeFrame_method_add_attached_node>`\ (\ node\: :ref:`int<class_int>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_attached_node<class_VisualShaderNodeFrame_method_remove_attached_node>`\ (\ node\: :ref:`int<class_int>`\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_VisualShaderNodeFrame_property_attached_nodes: + +.. rst-class:: classref-property + +:ref:`PackedInt32Array<class_PackedInt32Array>` **attached_nodes** = ``PackedInt32Array()`` :ref:`🔗<class_VisualShaderNodeFrame_property_attached_nodes>` + +.. rst-class:: classref-property-setget + +- |void| **set_attached_nodes**\ (\ value\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) +- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_attached_nodes**\ (\ ) + +The list of nodes attached to the frame. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array<class_PackedInt32Array>` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_autoshrink: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **autoshrink** = ``true`` :ref:`🔗<class_VisualShaderNodeFrame_property_autoshrink>` + +.. rst-class:: classref-property-setget + +- |void| **set_autoshrink_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_autoshrink_enabled**\ (\ ) + +If ``true``, the frame will automatically resize to enclose all attached nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_tint_color: + +.. rst-class:: classref-property + +:ref:`Color<class_Color>` **tint_color** = ``Color(0.3, 0.3, 0.3, 0.75)`` :ref:`🔗<class_VisualShaderNodeFrame_property_tint_color>` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color**\ (\ value\: :ref:`Color<class_Color>`\ ) +- :ref:`Color<class_Color>` **get_tint_color**\ (\ ) + +The color of the frame when :ref:`tint_color_enabled<class_VisualShaderNodeFrame_property_tint_color_enabled>` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_tint_color_enabled: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **tint_color_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeFrame_property_tint_color_enabled>` + +.. rst-class:: classref-property-setget + +- |void| **set_tint_color_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_tint_color_enabled**\ (\ ) + +If ``true``, the frame will be tinted with the color specified in :ref:`tint_color<class_VisualShaderNodeFrame_property_tint_color>`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_property_title: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **title** = ``"Title"`` :ref:`🔗<class_VisualShaderNodeFrame_property_title>` + +.. rst-class:: classref-property-setget + +- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_title**\ (\ ) + +The title of the node. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_VisualShaderNodeFrame_method_add_attached_node: + +.. rst-class:: classref-method + +|void| **add_attached_node**\ (\ node\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeFrame_method_add_attached_node>` + +Adds a node to the list of nodes attached to the frame. Should not be called directly, use the :ref:`VisualShader.attach_node_to_frame<class_VisualShader_method_attach_node_to_frame>` method instead. + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeFrame_method_remove_attached_node: + +.. rst-class:: classref-method + +|void| **remove_attached_node**\ (\ node\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeFrame_method_remove_attached_node>` + +Removes a node from the list of nodes attached to the frame. Should not be called directly, use the :ref:`VisualShader.detach_node_from_frame<class_VisualShader_method_detach_node_from_frame>` method instead. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodefresnel.rst b/classes/class_visualshadernodefresnel.rst index 233e804d7b6..f7bf27cc6f1 100644 --- a/classes/class_visualshadernodefresnel.rst +++ b/classes/class_visualshadernodefresnel.rst @@ -28,3 +28,4 @@ Returns falloff based on the dot product of surface normal and view direction of .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeglobalexpression.rst b/classes/class_visualshadernodeglobalexpression.rst index f6244e9c69b..e10e4052ee8 100644 --- a/classes/class_visualshadernodeglobalexpression.rst +++ b/classes/class_visualshadernodeglobalexpression.rst @@ -28,3 +28,4 @@ Custom Godot Shader Language expression, which is placed on top of the generated .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodegroupbase.rst b/classes/class_visualshadernodegroupbase.rst index 267f01251cb..ea0c2a97dc5 100644 --- a/classes/class_visualshadernodegroupbase.rst +++ b/classes/class_visualshadernodegroupbase.rst @@ -31,49 +31,49 @@ Methods .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_input_ports<class_VisualShaderNodeGroupBase_method_clear_input_ports>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_output_ports<class_VisualShaderNodeGroupBase_method_clear_output_ports>` **(** **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_input_port_count<class_VisualShaderNodeGroupBase_method_get_input_port_count>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_inputs<class_VisualShaderNodeGroupBase_method_get_inputs>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_output_port_count<class_VisualShaderNodeGroupBase_method_get_output_port_count>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_outputs<class_VisualShaderNodeGroupBase_method_get_outputs>` **(** **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_input_port<class_VisualShaderNodeGroupBase_method_has_input_port>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_output_port<class_VisualShaderNodeGroupBase_method_has_output_port>` **(** :ref:`int<class_int>` id **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_valid_port_name<class_VisualShaderNodeGroupBase_method_is_valid_port_name>` **(** :ref:`String<class_String>` name **)** |const| | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_input_port<class_VisualShaderNodeGroupBase_method_remove_input_port>` **(** :ref:`int<class_int>` id **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_output_port<class_VisualShaderNodeGroupBase_method_remove_output_port>` **(** :ref:`int<class_int>` id **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_port_name<class_VisualShaderNodeGroupBase_method_set_input_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input_port_type<class_VisualShaderNodeGroupBase_method_set_input_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_inputs<class_VisualShaderNodeGroupBase_method_set_inputs>` **(** :ref:`String<class_String>` inputs **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_output_port_name<class_VisualShaderNodeGroupBase_method_set_output_port_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_output_port_type<class_VisualShaderNodeGroupBase_method_set_output_port_type>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_outputs<class_VisualShaderNodeGroupBase_method_set_outputs>` **(** :ref:`String<class_String>` outputs **)** | - +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_input_ports<class_VisualShaderNodeGroupBase_method_clear_input_ports>`\ (\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_output_ports<class_VisualShaderNodeGroupBase_method_clear_output_ports>`\ (\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_input_port_count<class_VisualShaderNodeGroupBase_method_get_input_port_count>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_inputs<class_VisualShaderNodeGroupBase_method_get_inputs>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_output_port_count<class_VisualShaderNodeGroupBase_method_get_output_port_count>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_outputs<class_VisualShaderNodeGroupBase_method_get_outputs>`\ (\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_input_port<class_VisualShaderNodeGroupBase_method_has_input_port>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_output_port<class_VisualShaderNodeGroupBase_method_has_output_port>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_valid_port_name<class_VisualShaderNodeGroupBase_method_is_valid_port_name>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_input_port<class_VisualShaderNodeGroupBase_method_remove_input_port>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_output_port<class_VisualShaderNodeGroupBase_method_remove_output_port>`\ (\ id\: :ref:`int<class_int>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_port_name<class_VisualShaderNodeGroupBase_method_set_input_port_name>`\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input_port_type<class_VisualShaderNodeGroupBase_method_set_input_port_type>`\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_inputs<class_VisualShaderNodeGroupBase_method_set_inputs>`\ (\ inputs\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_output_port_name<class_VisualShaderNodeGroupBase_method_set_output_port_name>`\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_output_port_type<class_VisualShaderNodeGroupBase_method_set_output_port_type>`\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_outputs<class_VisualShaderNodeGroupBase_method_set_outputs>`\ (\ outputs\: :ref:`String<class_String>`\ ) | + +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,7 +88,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_input_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** +|void| **add_input_port**\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_add_input_port>` Adds an input port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``. @@ -100,7 +100,7 @@ Adds an input port with the specified ``type`` (see :ref:`PortType<enum_VisualSh .. rst-class:: classref-method -void **add_output_port** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type, :ref:`String<class_String>` name **)** +|void| **add_output_port**\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_add_output_port>` Adds an output port with the specified ``type`` (see :ref:`PortType<enum_VisualShaderNode_PortType>`) and ``name``. @@ -112,7 +112,7 @@ Adds an output port with the specified ``type`` (see :ref:`PortType<enum_VisualS .. rst-class:: classref-method -void **clear_input_ports** **(** **)** +|void| **clear_input_ports**\ (\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_clear_input_ports>` Removes all previously specified input ports. @@ -124,7 +124,7 @@ Removes all previously specified input ports. .. rst-class:: classref-method -void **clear_output_ports** **(** **)** +|void| **clear_output_ports**\ (\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_clear_output_ports>` Removes all previously specified output ports. @@ -136,7 +136,7 @@ Removes all previously specified output ports. .. rst-class:: classref-method -:ref:`int<class_int>` **get_free_input_port_id** **(** **)** |const| +:ref:`int<class_int>` **get_free_input_port_id**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>` Returns a free input port ID which can be used in :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`. @@ -148,7 +148,7 @@ Returns a free input port ID which can be used in :ref:`add_input_port<class_Vis .. rst-class:: classref-method -:ref:`int<class_int>` **get_free_output_port_id** **(** **)** |const| +:ref:`int<class_int>` **get_free_output_port_id**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>` Returns a free output port ID which can be used in :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`. @@ -160,7 +160,7 @@ Returns a free output port ID which can be used in :ref:`add_output_port<class_V .. rst-class:: classref-method -:ref:`int<class_int>` **get_input_port_count** **(** **)** |const| +:ref:`int<class_int>` **get_input_port_count**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_input_port_count>` Returns the number of input ports in use. Alternative for :ref:`get_free_input_port_id<class_VisualShaderNodeGroupBase_method_get_free_input_port_id>`. @@ -172,7 +172,7 @@ Returns the number of input ports in use. Alternative for :ref:`get_free_input_p .. rst-class:: classref-method -:ref:`String<class_String>` **get_inputs** **(** **)** |const| +:ref:`String<class_String>` **get_inputs**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_inputs>` Returns a :ref:`String<class_String>` description of the input ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`). @@ -184,7 +184,7 @@ Returns a :ref:`String<class_String>` description of the input ports as a colon- .. rst-class:: classref-method -:ref:`int<class_int>` **get_output_port_count** **(** **)** |const| +:ref:`int<class_int>` **get_output_port_count**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_output_port_count>` Returns the number of output ports in use. Alternative for :ref:`get_free_output_port_id<class_VisualShaderNodeGroupBase_method_get_free_output_port_id>`. @@ -196,7 +196,7 @@ Returns the number of output ports in use. Alternative for :ref:`get_free_output .. rst-class:: classref-method -:ref:`String<class_String>` **get_outputs** **(** **)** |const| +:ref:`String<class_String>` **get_outputs**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_get_outputs>` Returns a :ref:`String<class_String>` description of the output ports as a colon-separated list using the format ``id,type,name;`` (see :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`). @@ -208,7 +208,7 @@ Returns a :ref:`String<class_String>` description of the output ports as a colon .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_input_port** **(** :ref:`int<class_int>` id **)** |const| +:ref:`bool<class_bool>` **has_input_port**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_has_input_port>` Returns ``true`` if the specified input port exists. @@ -220,7 +220,7 @@ Returns ``true`` if the specified input port exists. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_output_port** **(** :ref:`int<class_int>` id **)** |const| +:ref:`bool<class_bool>` **has_output_port**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_has_output_port>` Returns ``true`` if the specified output port exists. @@ -232,7 +232,7 @@ Returns ``true`` if the specified output port exists. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_valid_port_name** **(** :ref:`String<class_String>` name **)** |const| +:ref:`bool<class_bool>` **is_valid_port_name**\ (\ name\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_VisualShaderNodeGroupBase_method_is_valid_port_name>` Returns ``true`` if the specified port name does not override an existed port name and is valid within the shader. @@ -244,7 +244,7 @@ Returns ``true`` if the specified port name does not override an existed port na .. rst-class:: classref-method -void **remove_input_port** **(** :ref:`int<class_int>` id **)** +|void| **remove_input_port**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_remove_input_port>` Removes the specified input port. @@ -256,7 +256,7 @@ Removes the specified input port. .. rst-class:: classref-method -void **remove_output_port** **(** :ref:`int<class_int>` id **)** +|void| **remove_output_port**\ (\ id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_remove_output_port>` Removes the specified output port. @@ -268,7 +268,7 @@ Removes the specified output port. .. rst-class:: classref-method -void **set_input_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** +|void| **set_input_port_name**\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_input_port_name>` Renames the specified input port. @@ -280,7 +280,7 @@ Renames the specified input port. .. rst-class:: classref-method -void **set_input_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** +|void| **set_input_port_type**\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_input_port_type>` Sets the specified input port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`). @@ -292,7 +292,7 @@ Sets the specified input port's type (see :ref:`PortType<enum_VisualShaderNode_P .. rst-class:: classref-method -void **set_inputs** **(** :ref:`String<class_String>` inputs **)** +|void| **set_inputs**\ (\ inputs\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_inputs>` Defines all input ports using a :ref:`String<class_String>` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_input_port<class_VisualShaderNodeGroupBase_method_add_input_port>`). @@ -304,7 +304,7 @@ Defines all input ports using a :ref:`String<class_String>` formatted as a colon .. rst-class:: classref-method -void **set_output_port_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** +|void| **set_output_port_name**\ (\ id\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_output_port_name>` Renames the specified output port. @@ -316,7 +316,7 @@ Renames the specified output port. .. rst-class:: classref-method -void **set_output_port_type** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` type **)** +|void| **set_output_port_type**\ (\ id\: :ref:`int<class_int>`, type\: :ref:`int<class_int>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_output_port_type>` Sets the specified output port's type (see :ref:`PortType<enum_VisualShaderNode_PortType>`). @@ -328,7 +328,7 @@ Sets the specified output port's type (see :ref:`PortType<enum_VisualShaderNode_ .. rst-class:: classref-method -void **set_outputs** **(** :ref:`String<class_String>` outputs **)** +|void| **set_outputs**\ (\ outputs\: :ref:`String<class_String>`\ ) :ref:`🔗<class_VisualShaderNodeGroupBase_method_set_outputs>` Defines all output ports using a :ref:`String<class_String>` formatted as a colon-separated list: ``id,type,name;`` (see :ref:`add_output_port<class_VisualShaderNodeGroupBase_method_add_output_port>`). @@ -339,3 +339,4 @@ Defines all output ports using a :ref:`String<class_String>` formatted as a colo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeif.rst b/classes/class_visualshadernodeif.rst index 3021755ae04..6e18c538517 100644 --- a/classes/class_visualshadernodeif.rst +++ b/classes/class_visualshadernodeif.rst @@ -12,14 +12,20 @@ VisualShaderNodeIf **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Compares two floating-point numbers in order to return a required vector within the visual shader graph. +Outputs a 3D vector based on the result of a floating-point comparison within the visual shader graph. .. rst-class:: classref-introduction-group Description ----------- -First two ports are scalar floating-point numbers to compare, third is tolerance comparison amount and last three ports represents a vectors returned if ``a == b``, ``a > b`` and ``a < b`` respectively. +This visual shader node has six input ports: + +- Port **1** and **2** provide the two floating-point numbers ``a`` and ``b`` that will be compared. + +- Port **3** is the tolerance, which allows similar floating-point numbers to be considered equal. + +- Ports **4**, **5**, and **6** are the possible outputs, returned if ``a == b``, ``a > b``, or ``a < b`` respectively. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -28,3 +34,4 @@ First two ports are scalar floating-point numbers to compare, third is tolerance .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeinput.rst b/classes/class_visualshadernodeinput.rst index 1c26489150e..e4c41f7a9bd 100644 --- a/classes/class_visualshadernodeinput.rst +++ b/classes/class_visualshadernodeinput.rst @@ -48,9 +48,9 @@ Methods .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_input_real_name<class_VisualShaderNodeInput_method_get_input_real_name>` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------+ + +-----------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_input_real_name<class_VisualShaderNodeInput_method_get_input_real_name>`\ (\ ) |const| | + +-----------------------------+--------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -65,7 +65,7 @@ Signals .. rst-class:: classref-signal -**input_type_changed** **(** **)** +**input_type_changed**\ (\ ) :ref:`🔗<class_VisualShaderNodeInput_signal_input_type_changed>` Emitted when input is changed via :ref:`input_name<class_VisualShaderNodeInput_property_input_name>`. @@ -82,12 +82,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **input_name** = ``"[None]"`` +:ref:`String<class_String>` **input_name** = ``"[None]"`` :ref:`🔗<class_VisualShaderNodeInput_property_input_name>` .. rst-class:: classref-property-setget -- void **set_input_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_input_name** **(** **)** +- |void| **set_input_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_input_name**\ (\ ) One of the several input constants in lower-case style like: "vertex" (``VERTEX``) or "point_size" (``POINT_SIZE``). @@ -104,7 +104,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`String<class_String>` **get_input_real_name** **(** **)** |const| +:ref:`String<class_String>` **get_input_real_name**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeInput_method_get_input_real_name>` Returns a translated name of the current constant in the Godot Shader Language. E.g. ``"ALBEDO"`` if the :ref:`input_name<class_VisualShaderNodeInput_property_input_name>` equal to ``"albedo"``. @@ -115,3 +115,4 @@ Returns a translated name of the current constant in the Godot Shader Language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeintconstant.rst b/classes/class_visualshadernodeintconstant.rst index a66a552c211..cd50e99231e 100644 --- a/classes/class_visualshadernodeintconstant.rst +++ b/classes/class_visualshadernodeintconstant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **constant** = ``0`` +:ref:`int<class_int>` **constant** = ``0`` :ref:`🔗<class_VisualShaderNodeIntConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_constant**\ (\ ) An integer constant which represents a state of this node. @@ -62,3 +62,4 @@ An integer constant which represents a state of this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeintfunc.rst b/classes/class_visualshadernodeintfunc.rst index 9e26fff36cc..4b34e4100ac 100644 --- a/classes/class_visualshadernodeintfunc.rst +++ b/classes/class_visualshadernodeintfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeIntFunc_Function>` .. _class_VisualShaderNodeIntFunc_constant_FUNC_ABS: @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **function** = ``2`` +:ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **function** = ``2`` :ref:`🔗<class_VisualShaderNodeIntFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeIntFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` **get_function**\ (\ ) A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeIntFunc_Function>` for options. @@ -117,3 +117,4 @@ A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNode .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeintop.rst b/classes/class_visualshadernodeintop.rst index b8a0762331b..fd93ba00ca5 100644 --- a/classes/class_visualshadernodeintop.rst +++ b/classes/class_visualshadernodeintop.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeIntOp_Operator>` .. _class_VisualShaderNodeIntOp_constant_OP_ADD: @@ -165,12 +165,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeIntOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` **get_operator**\ (\ ) An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeIntOp_Operator>` for options. @@ -181,3 +181,4 @@ An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeintparameter.rst b/classes/class_visualshadernodeintparameter.rst index c1afeedf698..ee79ad55fc1 100644 --- a/classes/class_visualshadernodeintparameter.rst +++ b/classes/class_visualshadernodeintparameter.rst @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Hint**: +enum **Hint**: :ref:`🔗<enum_VisualShaderNodeIntParameter_Hint>` .. _class_VisualShaderNodeIntParameter_constant_HINT_NONE: @@ -103,12 +103,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **default_value** = ``0`` +:ref:`int<class_int>` **default_value** = ``0`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_default_value**\ (\ ) Default value of this parameter, which will be used if not set externally. :ref:`default_value_enabled<class_VisualShaderNodeIntParameter_property_default_value_enabled>` must be enabled; defaults to ``0`` otherwise. @@ -120,12 +120,12 @@ Default value of this parameter, which will be used if not set externally. :ref: .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) If ``true``, the node will have a custom default value. @@ -137,12 +137,12 @@ If ``true``, the node will have a custom default value. .. rst-class:: classref-property -:ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>` **hint** = ``0`` +:ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>` **hint** = ``0`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_hint>` .. rst-class:: classref-property-setget -- void **set_hint** **(** :ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>` value **)** -- :ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>` **get_hint** **(** **)** +- |void| **set_hint**\ (\ value\: :ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>`\ ) +- :ref:`Hint<enum_VisualShaderNodeIntParameter_Hint>` **get_hint**\ (\ ) Range hint of this node. Use it to customize valid parameter range. @@ -154,12 +154,12 @@ Range hint of this node. Use it to customize valid parameter range. .. rst-class:: classref-property -:ref:`int<class_int>` **max** = ``100`` +:ref:`int<class_int>` **max** = ``100`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_max>` .. rst-class:: classref-property-setget -- void **set_max** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max** **(** **)** +- |void| **set_max**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max**\ (\ ) The maximum value this parameter can take. :ref:`hint<class_VisualShaderNodeIntParameter_property_hint>` must be either :ref:`HINT_RANGE<class_VisualShaderNodeIntParameter_constant_HINT_RANGE>` or :ref:`HINT_RANGE_STEP<class_VisualShaderNodeIntParameter_constant_HINT_RANGE_STEP>` for this to take effect. @@ -171,12 +171,12 @@ The maximum value this parameter can take. :ref:`hint<class_VisualShaderNodeIntP .. rst-class:: classref-property -:ref:`int<class_int>` **min** = ``0`` +:ref:`int<class_int>` **min** = ``0`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_min>` .. rst-class:: classref-property-setget -- void **set_min** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_min** **(** **)** +- |void| **set_min**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_min**\ (\ ) The minimum value this parameter can take. :ref:`hint<class_VisualShaderNodeIntParameter_property_hint>` must be either :ref:`HINT_RANGE<class_VisualShaderNodeIntParameter_constant_HINT_RANGE>` or :ref:`HINT_RANGE_STEP<class_VisualShaderNodeIntParameter_constant_HINT_RANGE_STEP>` for this to take effect. @@ -188,12 +188,12 @@ The minimum value this parameter can take. :ref:`hint<class_VisualShaderNodeIntP .. rst-class:: classref-property -:ref:`int<class_int>` **step** = ``1`` +:ref:`int<class_int>` **step** = ``1`` :ref:`🔗<class_VisualShaderNodeIntParameter_property_step>` .. rst-class:: classref-property-setget -- void **set_step** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_step** **(** **)** +- |void| **set_step**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_step**\ (\ ) The step between parameter's values. Forces the parameter to be a multiple of the given value. :ref:`hint<class_VisualShaderNodeIntParameter_property_hint>` must be :ref:`HINT_RANGE_STEP<class_VisualShaderNodeIntParameter_constant_HINT_RANGE_STEP>` for this to take effect. @@ -204,3 +204,4 @@ The step between parameter's values. Forces the parameter to be a multiple of th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeis.rst b/classes/class_visualshadernodeis.rst index 01732ffa967..a065e952386 100644 --- a/classes/class_visualshadernodeis.rst +++ b/classes/class_visualshadernodeis.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeIs_Function>` .. _class_VisualShaderNodeIs_constant_FUNC_IS_INF: @@ -62,7 +62,7 @@ Comparison with ``INF`` (Infinity). :ref:`Function<enum_VisualShaderNodeIs_Function>` **FUNC_IS_NAN** = ``1`` -Comparison with ``NaN`` (Not a Number; denotes invalid numeric results, e.g. division by zero). +Comparison with ``NaN`` (Not a Number; indicates invalid numeric results, such as division by zero). .. _class_VisualShaderNodeIs_constant_FUNC_MAX: @@ -85,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeIs_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeIs_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeIs_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeIs_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeIs_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeIs_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeIs_Function>` **get_function**\ (\ ) The comparison function. See :ref:`Function<enum_VisualShaderNodeIs_Function>` for options. @@ -101,3 +101,4 @@ The comparison function. See :ref:`Function<enum_VisualShaderNodeIs_Function>` f .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodelinearscenedepth.rst b/classes/class_visualshadernodelinearscenedepth.rst index 2f1979ebbdb..a7697798b8c 100644 --- a/classes/class_visualshadernodelinearscenedepth.rst +++ b/classes/class_visualshadernodelinearscenedepth.rst @@ -28,3 +28,4 @@ This node can be used in fragment shaders. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodemix.rst b/classes/class_visualshadernodemix.rst index 6ef97977649..cef04a386d5 100644 --- a/classes/class_visualshadernodemix.rst +++ b/classes/class_visualshadernodemix.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeMix_OpType>` .. _class_VisualShaderNodeMix_constant_OP_TYPE_SCALAR: @@ -125,12 +125,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeMix_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeMix_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeMix_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeMix_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeMix_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeMix_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeMix_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -141,3 +141,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodemultiplyadd.rst b/classes/class_visualshadernodemultiplyadd.rst index a18fadfdf57..bbf6a9ababb 100644 --- a/classes/class_visualshadernodemultiplyadd.rst +++ b/classes/class_visualshadernodemultiplyadd.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeMultiplyAdd_OpType>` .. _class_VisualShaderNodeMultiplyAdd_constant_OP_TYPE_SCALAR: @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeMultiplyAdd_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeMultiplyAdd_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -117,3 +117,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeouterproduct.rst b/classes/class_visualshadernodeouterproduct.rst index 32fe7d4d7be..2fb69fbfd16 100644 --- a/classes/class_visualshadernodeouterproduct.rst +++ b/classes/class_visualshadernodeouterproduct.rst @@ -28,3 +28,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeoutput.rst b/classes/class_visualshadernodeoutput.rst index dddcc17f526..7039f579247 100644 --- a/classes/class_visualshadernodeoutput.rst +++ b/classes/class_visualshadernodeoutput.rst @@ -30,3 +30,4 @@ This visual shader node is present in all shader graphs in form of "Output" bloc .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparameter.rst b/classes/class_visualshadernodeparameter.rst index 0750b5c0020..4bb90905f30 100644 --- a/classes/class_visualshadernodeparameter.rst +++ b/classes/class_visualshadernodeparameter.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Qualifier**: +enum **Qualifier**: :ref:`🔗<enum_VisualShaderNodeParameter_Qualifier>` .. _class_VisualShaderNodeParameter_constant_QUAL_NONE: @@ -97,12 +97,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **parameter_name** = ``""`` +:ref:`String<class_String>` **parameter_name** = ``""`` :ref:`🔗<class_VisualShaderNodeParameter_property_parameter_name>` .. rst-class:: classref-property-setget -- void **set_parameter_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_parameter_name** **(** **)** +- |void| **set_parameter_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_parameter_name**\ (\ ) Name of the parameter, by which it can be accessed through the :ref:`ShaderMaterial<class_ShaderMaterial>` properties. @@ -114,12 +114,12 @@ Name of the parameter, by which it can be accessed through the :ref:`ShaderMater .. rst-class:: classref-property -:ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>` **qualifier** = ``0`` +:ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>` **qualifier** = ``0`` :ref:`🔗<class_VisualShaderNodeParameter_property_qualifier>` .. rst-class:: classref-property-setget -- void **set_qualifier** **(** :ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>` value **)** -- :ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>` **get_qualifier** **(** **)** +- |void| **set_qualifier**\ (\ value\: :ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>`\ ) +- :ref:`Qualifier<enum_VisualShaderNodeParameter_Qualifier>` **get_qualifier**\ (\ ) Defines the scope of the parameter. @@ -130,3 +130,4 @@ Defines the scope of the parameter. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparameterref.rst b/classes/class_visualshadernodeparameterref.rst index db84f4a7b1f..b7fccd267f9 100644 --- a/classes/class_visualshadernodeparameterref.rst +++ b/classes/class_visualshadernodeparameterref.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **parameter_name** = ``"[None]"`` +:ref:`String<class_String>` **parameter_name** = ``"[None]"`` :ref:`🔗<class_VisualShaderNodeParameterRef_property_parameter_name>` .. rst-class:: classref-property-setget -- void **set_parameter_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_parameter_name** **(** **)** +- |void| **set_parameter_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_parameter_name**\ (\ ) The name of the parameter which this reference points to. @@ -62,3 +62,4 @@ The name of the parameter which this reference points to. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleaccelerator.rst b/classes/class_visualshadernodeparticleaccelerator.rst index 52aade37abd..04472674966 100644 --- a/classes/class_visualshadernodeparticleaccelerator.rst +++ b/classes/class_visualshadernodeparticleaccelerator.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗<enum_VisualShaderNodeParticleAccelerator_Mode>` .. _class_VisualShaderNodeParticleAccelerator_constant_MODE_LINEAR: @@ -93,12 +93,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>` **mode** = ``0`` +:ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>` **mode** = ``0`` :ref:`🔗<class_VisualShaderNodeParticleAccelerator_property_mode>` .. rst-class:: classref-property-setget -- void **set_mode** **(** :ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>` value **)** -- :ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>` **get_mode** **(** **)** +- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>`\ ) +- :ref:`Mode<enum_VisualShaderNodeParticleAccelerator_Mode>` **get_mode**\ (\ ) Defines in what manner the particles will be accelerated. @@ -109,3 +109,4 @@ Defines in what manner the particles will be accelerated. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleboxemitter.rst b/classes/class_visualshadernodeparticleboxemitter.rst index 2e9043e5850..4485b055bb8 100644 --- a/classes/class_visualshadernodeparticleboxemitter.rst +++ b/classes/class_visualshadernodeparticleboxemitter.rst @@ -28,3 +28,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleconevelocity.rst b/classes/class_visualshadernodeparticleconevelocity.rst index b0c7f8b892e..821f1f06183 100644 --- a/classes/class_visualshadernodeparticleconevelocity.rst +++ b/classes/class_visualshadernodeparticleconevelocity.rst @@ -28,3 +28,4 @@ This node can be used in "start" step of particle shader. It defines the initial .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleemit.rst b/classes/class_visualshadernodeparticleemit.rst index 068f3459266..097848741f8 100644 --- a/classes/class_visualshadernodeparticleemit.rst +++ b/classes/class_visualshadernodeparticleemit.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **EmitFlags**: +enum **EmitFlags**: :ref:`🔗<enum_VisualShaderNodeParticleEmit_EmitFlags>` .. _class_VisualShaderNodeParticleEmit_constant_EMIT_FLAG_POSITION: @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>` **flags** = ``31`` +:ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>` **flags** = ``31`` :ref:`🔗<class_VisualShaderNodeParticleEmit_property_flags>` .. rst-class:: classref-property-setget -- void **set_flags** **(** :ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>` value **)** -- :ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>` **get_flags** **(** **)** +- |void| **set_flags**\ (\ value\: :ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>`\ ) +- :ref:`EmitFlags<enum_VisualShaderNodeParticleEmit_EmitFlags>` **get_flags**\ (\ ) Flags used to override the properties defined in the sub-emitter's process material. @@ -117,3 +117,4 @@ Flags used to override the properties defined in the sub-emitter's process mater .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleemitter.rst b/classes/class_visualshadernodeparticleemitter.rst index 76432277b62..d865211d4d3 100644 --- a/classes/class_visualshadernodeparticleemitter.rst +++ b/classes/class_visualshadernodeparticleemitter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **mode_2d** = ``false`` +:ref:`bool<class_bool>` **mode_2d** = ``false`` :ref:`🔗<class_VisualShaderNodeParticleEmitter_property_mode_2d>` .. rst-class:: classref-property-setget -- void **set_mode_2d** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_mode_2d** **(** **)** +- |void| **set_mode_2d**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_mode_2d**\ (\ ) If ``true``, the result of this emitter is projected to 2D space. By default it is ``false`` and meant for use in 3D space. @@ -64,3 +64,4 @@ If ``true``, the result of this emitter is projected to 2D space. By default it .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticlemeshemitter.rst b/classes/class_visualshadernodeparticlemeshemitter.rst index 58a7a706ef5..0d02ceafc18 100644 --- a/classes/class_visualshadernodeparticlemeshemitter.rst +++ b/classes/class_visualshadernodeparticlemeshemitter.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Mesh<class_Mesh>` **mesh** +:ref:`Mesh<class_Mesh>` **mesh** :ref:`🔗<class_VisualShaderNodeParticleMeshEmitter_property_mesh>` .. rst-class:: classref-property-setget -- void **set_mesh** **(** :ref:`Mesh<class_Mesh>` value **)** -- :ref:`Mesh<class_Mesh>` **get_mesh** **(** **)** +- |void| **set_mesh**\ (\ value\: :ref:`Mesh<class_Mesh>`\ ) +- :ref:`Mesh<class_Mesh>` **get_mesh**\ (\ ) The :ref:`Mesh<class_Mesh>` that defines emission shape. @@ -67,12 +67,12 @@ The :ref:`Mesh<class_Mesh>` that defines emission shape. .. rst-class:: classref-property -:ref:`int<class_int>` **surface_index** = ``0`` +:ref:`int<class_int>` **surface_index** = ``0`` :ref:`🔗<class_VisualShaderNodeParticleMeshEmitter_property_surface_index>` .. rst-class:: classref-property-setget -- void **set_surface_index** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_surface_index** **(** **)** +- |void| **set_surface_index**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_surface_index**\ (\ ) Index of the surface that emits particles. :ref:`use_all_surfaces<class_VisualShaderNodeParticleMeshEmitter_property_use_all_surfaces>` must be ``false`` for this to take effect. @@ -84,12 +84,12 @@ Index of the surface that emits particles. :ref:`use_all_surfaces<class_VisualSh .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_all_surfaces** = ``true`` +:ref:`bool<class_bool>` **use_all_surfaces** = ``true`` :ref:`🔗<class_VisualShaderNodeParticleMeshEmitter_property_use_all_surfaces>` .. rst-class:: classref-property-setget -- void **set_use_all_surfaces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_use_all_surfaces** **(** **)** +- |void| **set_use_all_surfaces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_use_all_surfaces**\ (\ ) If ``true``, the particles will emit from all surfaces of the mesh. @@ -100,3 +100,4 @@ If ``true``, the particles will emit from all surfaces of the mesh. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst b/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst index 4008f997609..91c8dfb79ae 100644 --- a/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst +++ b/classes/class_visualshadernodeparticlemultiplybyaxisangle.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **degrees_mode** = ``true`` +:ref:`bool<class_bool>` **degrees_mode** = ``true`` :ref:`🔗<class_VisualShaderNodeParticleMultiplyByAxisAngle_property_degrees_mode>` .. rst-class:: classref-property-setget -- void **set_degrees_mode** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_degrees_mode** **(** **)** +- |void| **set_degrees_mode**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_degrees_mode**\ (\ ) If ``true``, the angle will be interpreted in degrees instead of radians. @@ -62,3 +62,4 @@ If ``true``, the angle will be interpreted in degrees instead of radians. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleoutput.rst b/classes/class_visualshadernodeparticleoutput.rst index b8ba1d4477a..7649bc2744c 100644 --- a/classes/class_visualshadernodeparticleoutput.rst +++ b/classes/class_visualshadernodeparticleoutput.rst @@ -28,3 +28,4 @@ This node defines how particles are emitted. It allows to customize e.g. positio .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticlerandomness.rst b/classes/class_visualshadernodeparticlerandomness.rst index f2871a4462b..6cbcea20b70 100644 --- a/classes/class_visualshadernodeparticlerandomness.rst +++ b/classes/class_visualshadernodeparticlerandomness.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeParticleRandomness_OpType>` .. _class_VisualShaderNodeParticleRandomness_constant_OP_TYPE_SCALAR: @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeParticleRandomness_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeParticleRandomness_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -117,3 +117,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticleringemitter.rst b/classes/class_visualshadernodeparticleringemitter.rst index 0bc1bfae19e..59551a37772 100644 --- a/classes/class_visualshadernodeparticleringemitter.rst +++ b/classes/class_visualshadernodeparticleringemitter.rst @@ -28,3 +28,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeparticlesphereemitter.rst b/classes/class_visualshadernodeparticlesphereemitter.rst index 7d2003c5399..f5a4e93fd7e 100644 --- a/classes/class_visualshadernodeparticlesphereemitter.rst +++ b/classes/class_visualshadernodeparticlesphereemitter.rst @@ -28,3 +28,4 @@ Description .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeproximityfade.rst b/classes/class_visualshadernodeproximityfade.rst index f32907ea00a..c20796bcb12 100644 --- a/classes/class_visualshadernodeproximityfade.rst +++ b/classes/class_visualshadernodeproximityfade.rst @@ -28,3 +28,4 @@ The proximity fade effect fades out each pixel based on its distance to another .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernoderandomrange.rst b/classes/class_visualshadernoderandomrange.rst index 9f8af834d35..065465d3474 100644 --- a/classes/class_visualshadernoderandomrange.rst +++ b/classes/class_visualshadernoderandomrange.rst @@ -28,3 +28,4 @@ Random range node will output a pseudo-random scalar value in the specified rang .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernoderemap.rst b/classes/class_visualshadernoderemap.rst index 9d8ea928993..d1dc531405d 100644 --- a/classes/class_visualshadernoderemap.rst +++ b/classes/class_visualshadernoderemap.rst @@ -28,3 +28,4 @@ Remap will transform the input range into output range, e.g. you can change a `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_godotsharp.rst b/classes/class_visualshadernodereroute.rst similarity index 53% rename from classes/class_godotsharp.rst rename to classes/class_visualshadernodereroute.rst index a47a343df0e..7d8d7ee33f4 100644 --- a/classes/class_godotsharp.rst +++ b/classes/class_visualshadernodereroute.rst @@ -3,25 +3,23 @@ .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. -.. XML source: https://github.com/godotengine/godot/tree/master/modules/mono/doc_classes/GodotSharp.xml. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeReroute.xml. -.. _class_GodotSharp: +.. _class_VisualShaderNodeReroute: -GodotSharp -========== +VisualShaderNodeReroute +======================= -**Inherits:** :ref:`Object<class_Object>` +**Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -Bridge between Godot and the Mono runtime (Mono-enabled builds only). +A node that allows rerouting a connection within the visual shader graph. .. rst-class:: classref-introduction-group Description ----------- -This class is a bridge between Godot and the Mono runtime. It exposes several low-level operations and is only available in Mono-enabled Godot builds. - -See also :ref:`CSharpScript<class_CSharpScript>`. +Automatically adapts its port type to the type of the incoming connection and ensures valid connections. .. rst-class:: classref-reftable-group @@ -31,9 +29,9 @@ Methods .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_runtime_initialized<class_GodotSharp_method_is_runtime_initialized>` **(** **)** | - +-------------------------+-------------------------------------------------------------------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------------+ + | :ref:`PortType<enum_VisualShaderNode_PortType>` | :ref:`get_port_type<class_VisualShaderNodeReroute_method_get_port_type>`\ (\ ) |const| | + +-------------------------------------------------+----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -44,13 +42,13 @@ Methods Method Descriptions ------------------- -.. _class_GodotSharp_method_is_runtime_initialized: +.. _class_VisualShaderNodeReroute_method_get_port_type: .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_runtime_initialized** **(** **)** +:ref:`PortType<enum_VisualShaderNode_PortType>` **get_port_type**\ (\ ) |const| :ref:`🔗<class_VisualShaderNodeReroute_method_get_port_type>` -Returns ``true`` if the .NET runtime is initialized, ``false`` otherwise. +Returns the port type of the reroute node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -59,3 +57,4 @@ Returns ``true`` if the .NET runtime is initialized, ``false`` otherwise. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernoderesizablebase.rst b/classes/class_visualshadernoderesizablebase.rst index cbde702fa25..083ce0d4aad 100644 --- a/classes/class_visualshadernoderesizablebase.rst +++ b/classes/class_visualshadernoderesizablebase.rst @@ -12,7 +12,7 @@ VisualShaderNodeResizableBase **Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` -**Inherited By:** :ref:`VisualShaderNodeComment<class_VisualShaderNodeComment>`, :ref:`VisualShaderNodeCurveTexture<class_VisualShaderNodeCurveTexture>`, :ref:`VisualShaderNodeCurveXYZTexture<class_VisualShaderNodeCurveXYZTexture>`, :ref:`VisualShaderNodeGroupBase<class_VisualShaderNodeGroupBase>` +**Inherited By:** :ref:`VisualShaderNodeCurveTexture<class_VisualShaderNodeCurveTexture>`, :ref:`VisualShaderNodeCurveXYZTexture<class_VisualShaderNodeCurveXYZTexture>`, :ref:`VisualShaderNodeFrame<class_VisualShaderNodeFrame>`, :ref:`VisualShaderNodeGroupBase<class_VisualShaderNodeGroupBase>` Base class for resizable nodes in a visual shader graph. @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **size** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **size** = ``Vector2(0, 0)`` :ref:`🔗<class_VisualShaderNodeResizableBase_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_size**\ (\ ) The size of the node in the visual shader graph. @@ -64,3 +64,4 @@ The size of the node in the visual shader graph. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernoderotationbyaxis.rst b/classes/class_visualshadernoderotationbyaxis.rst new file mode 100644 index 00000000000..f411d3a5119 --- /dev/null +++ b/classes/class_visualshadernoderotationbyaxis.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeRotationByAxis.xml. + +.. _class_VisualShaderNodeRotationByAxis: + +VisualShaderNodeRotationByAxis +============================== + +**Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +A visual shader node that modifies the rotation of the object using a rotation matrix. + +.. rst-class:: classref-introduction-group + +Description +----------- + +RotationByAxis node will transform the vertices of a mesh with specified axis and angle in radians. It can be used to rotate an object in an arbitrary axis. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodesample3d.rst b/classes/class_visualshadernodesample3d.rst index 8cf38a22515..6b3417702af 100644 --- a/classes/class_visualshadernodesample3d.rst +++ b/classes/class_visualshadernodesample3d.rst @@ -48,7 +48,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Source**: +enum **Source**: :ref:`🔗<enum_VisualShaderNodeSample3D_Source>` .. _class_VisualShaderNodeSample3D_constant_SOURCE_TEXTURE: @@ -87,12 +87,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Source<enum_VisualShaderNodeSample3D_Source>` **source** = ``0`` +:ref:`Source<enum_VisualShaderNodeSample3D_Source>` **source** = ``0`` :ref:`🔗<class_VisualShaderNodeSample3D_property_source>` .. rst-class:: classref-property-setget -- void **set_source** **(** :ref:`Source<enum_VisualShaderNodeSample3D_Source>` value **)** -- :ref:`Source<enum_VisualShaderNodeSample3D_Source>` **get_source** **(** **)** +- |void| **set_source**\ (\ value\: :ref:`Source<enum_VisualShaderNodeSample3D_Source>`\ ) +- :ref:`Source<enum_VisualShaderNodeSample3D_Source>` **get_source**\ (\ ) An input source type. @@ -103,3 +103,4 @@ An input source type. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodescreennormalworldspace.rst b/classes/class_visualshadernodescreennormalworldspace.rst new file mode 100644 index 00000000000..d2942799f61 --- /dev/null +++ b/classes/class_visualshadernodescreennormalworldspace.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeScreenNormalWorldSpace.xml. + +.. _class_VisualShaderNodeScreenNormalWorldSpace: + +VisualShaderNodeScreenNormalWorldSpace +====================================== + +**Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +A visual shader node that unpacks the screen normal texture in World Space. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The ScreenNormalWorldSpace node allows to create outline effects. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodescreenuvtosdf.rst b/classes/class_visualshadernodescreenuvtosdf.rst index 4df8e804f91..be1964c865d 100644 --- a/classes/class_visualshadernodescreenuvtosdf.rst +++ b/classes/class_visualshadernodescreenuvtosdf.rst @@ -28,3 +28,4 @@ Translates to ``screen_uv_to_sdf(uv)`` in the shader language. If the UV port is .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodesdfraymarch.rst b/classes/class_visualshadernodesdfraymarch.rst index ce4b035d1b7..c45bb72ecbe 100644 --- a/classes/class_visualshadernodesdfraymarch.rst +++ b/classes/class_visualshadernodesdfraymarch.rst @@ -28,3 +28,4 @@ Casts a ray against the screen SDF (signed-distance field) and returns the dista .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodesdftoscreenuv.rst b/classes/class_visualshadernodesdftoscreenuv.rst index 6aab48f89e2..df616556993 100644 --- a/classes/class_visualshadernodesdftoscreenuv.rst +++ b/classes/class_visualshadernodesdftoscreenuv.rst @@ -28,3 +28,4 @@ Translates to ``sdf_to_screen_uv(sdf_pos)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodesmoothstep.rst b/classes/class_visualshadernodesmoothstep.rst index b8a4b7a8471..794bdbf9e7b 100644 --- a/classes/class_visualshadernodesmoothstep.rst +++ b/classes/class_visualshadernodesmoothstep.rst @@ -48,7 +48,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeSmoothStep_OpType>` .. _class_VisualShaderNodeSmoothStep_constant_OP_TYPE_SCALAR: @@ -127,12 +127,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeSmoothStep_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeSmoothStep_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -143,3 +143,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodestep.rst b/classes/class_visualshadernodestep.rst index 4d37fe8e3a5..5f80ee06571 100644 --- a/classes/class_visualshadernodestep.rst +++ b/classes/class_visualshadernodestep.rst @@ -48,7 +48,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeStep_OpType>` .. _class_VisualShaderNodeStep_constant_OP_TYPE_SCALAR: @@ -127,12 +127,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeStep_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeStep_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeStep_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeStep_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeStep_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeStep_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeStep_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -143,3 +143,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeswitch.rst b/classes/class_visualshadernodeswitch.rst index 55e7c9cf653..4bed971b6e1 100644 --- a/classes/class_visualshadernodeswitch.rst +++ b/classes/class_visualshadernodeswitch.rst @@ -19,7 +19,7 @@ A selector function for use within the visual shader graph. Description ----------- -Returns an associated value of the ``op_type`` type if the provided boolean value is ``true`` or ``false``. +Returns an associated value of the :ref:`op_type<class_VisualShaderNodeSwitch_property_op_type>` type if the provided boolean value is ``true`` or ``false``. .. rst-class:: classref-reftable-group @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeSwitch_OpType>` .. _class_VisualShaderNodeSwitch_constant_OP_TYPE_FLOAT: @@ -133,12 +133,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **op_type** = ``0`` +:ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **op_type** = ``0`` :ref:`🔗<class_VisualShaderNodeSwitch_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeSwitch_OpType>` **get_op_type**\ (\ ) A type of operands and returned value. @@ -149,3 +149,4 @@ A type of operands and returned value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture.rst b/classes/class_visualshadernodetexture.rst index d9c926d5f9d..7f028b5616b 100644 --- a/classes/class_visualshadernodetexture.rst +++ b/classes/class_visualshadernodetexture.rst @@ -50,7 +50,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Source**: +enum **Source**: :ref:`🔗<enum_VisualShaderNodeTexture_Source>` .. _class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE: @@ -132,7 +132,7 @@ Represents the size of the :ref:`Source<enum_VisualShaderNodeTexture_Source>` en .. rst-class:: classref-enumeration -enum **TextureType**: +enum **TextureType**: :ref:`🔗<enum_VisualShaderNodeTexture_TextureType>` .. _class_VisualShaderNodeTexture_constant_TYPE_DATA: @@ -148,7 +148,7 @@ No hints are added to the uniform declaration. :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **TYPE_COLOR** = ``1`` -Adds ``hint_albedo`` as hint to the uniform declaration for proper sRGB to linear conversion. +Adds ``source_color`` as hint to the uniform declaration for proper sRGB to linear conversion. .. _class_VisualShaderNodeTexture_constant_TYPE_NORMAL_MAP: @@ -179,12 +179,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Source<enum_VisualShaderNodeTexture_Source>` **source** = ``0`` +:ref:`Source<enum_VisualShaderNodeTexture_Source>` **source** = ``0`` :ref:`🔗<class_VisualShaderNodeTexture_property_source>` .. rst-class:: classref-property-setget -- void **set_source** **(** :ref:`Source<enum_VisualShaderNodeTexture_Source>` value **)** -- :ref:`Source<enum_VisualShaderNodeTexture_Source>` **get_source** **(** **)** +- |void| **set_source**\ (\ value\: :ref:`Source<enum_VisualShaderNodeTexture_Source>`\ ) +- :ref:`Source<enum_VisualShaderNodeTexture_Source>` **get_source**\ (\ ) Determines the source for the lookup. See :ref:`Source<enum_VisualShaderNodeTexture_Source>` for options. @@ -196,12 +196,12 @@ Determines the source for the lookup. See :ref:`Source<enum_VisualShaderNodeText .. rst-class:: classref-property -:ref:`Texture2D<class_Texture2D>` **texture** +:ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_VisualShaderNodeTexture_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture2D<class_Texture2D>` value **)** -- :ref:`Texture2D<class_Texture2D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ ) +- :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ ) The source texture, if needed for the selected :ref:`source<class_VisualShaderNodeTexture_property_source>`. @@ -213,12 +213,12 @@ The source texture, if needed for the selected :ref:`source<class_VisualShaderNo .. rst-class:: classref-property -:ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **texture_type** = ``0`` +:ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **texture_type** = ``0`` :ref:`🔗<class_VisualShaderNodeTexture_property_texture_type>` .. rst-class:: classref-property-setget -- void **set_texture_type** **(** :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` value **)** -- :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **get_texture_type** **(** **)** +- |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>`\ ) +- :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` **get_texture_type**\ (\ ) Specifies the type of the texture if :ref:`source<class_VisualShaderNodeTexture_property_source>` is set to :ref:`SOURCE_TEXTURE<class_VisualShaderNodeTexture_constant_SOURCE_TEXTURE>`. See :ref:`TextureType<enum_VisualShaderNodeTexture_TextureType>` for options. @@ -229,3 +229,4 @@ Specifies the type of the texture if :ref:`source<class_VisualShaderNodeTexture_ .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture2darray.rst b/classes/class_visualshadernodetexture2darray.rst index da69c59ab12..3b725a70229 100644 --- a/classes/class_visualshadernodetexture2darray.rst +++ b/classes/class_visualshadernodetexture2darray.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture2DArray<class_Texture2DArray>` **texture_array** +:ref:`Texture2DArray<class_Texture2DArray>` **texture_array** :ref:`🔗<class_VisualShaderNodeTexture2DArray_property_texture_array>` .. rst-class:: classref-property-setget -- void **set_texture_array** **(** :ref:`Texture2DArray<class_Texture2DArray>` value **)** -- :ref:`Texture2DArray<class_Texture2DArray>` **get_texture_array** **(** **)** +- |void| **set_texture_array**\ (\ value\: :ref:`Texture2DArray<class_Texture2DArray>`\ ) +- :ref:`Texture2DArray<class_Texture2DArray>` **get_texture_array**\ (\ ) A source texture array. Used if :ref:`VisualShaderNodeSample3D.source<class_VisualShaderNodeSample3D_property_source>` is set to :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE<class_VisualShaderNodeSample3D_constant_SOURCE_TEXTURE>`. @@ -62,3 +62,4 @@ A source texture array. Used if :ref:`VisualShaderNodeSample3D.source<class_Visu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture2darrayparameter.rst b/classes/class_visualshadernodetexture2darrayparameter.rst index 9926a6483ab..5948e52ceed 100644 --- a/classes/class_visualshadernodetexture2darrayparameter.rst +++ b/classes/class_visualshadernodetexture2darrayparameter.rst @@ -28,3 +28,4 @@ This parameter allows to provide a collection of textures for the shader. You ca .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture2dparameter.rst b/classes/class_visualshadernodetexture2dparameter.rst index 3fd2ac37abb..f7de0b5a123 100644 --- a/classes/class_visualshadernodetexture2dparameter.rst +++ b/classes/class_visualshadernodetexture2dparameter.rst @@ -28,3 +28,4 @@ Translated to ``uniform sampler2D`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture3d.rst b/classes/class_visualshadernodetexture3d.rst index 4887bd665fb..5b0ab9bc369 100644 --- a/classes/class_visualshadernodetexture3d.rst +++ b/classes/class_visualshadernodetexture3d.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Texture3D<class_Texture3D>` **texture** +:ref:`Texture3D<class_Texture3D>` **texture** :ref:`🔗<class_VisualShaderNodeTexture3D_property_texture>` .. rst-class:: classref-property-setget -- void **set_texture** **(** :ref:`Texture3D<class_Texture3D>` value **)** -- :ref:`Texture3D<class_Texture3D>` **get_texture** **(** **)** +- |void| **set_texture**\ (\ value\: :ref:`Texture3D<class_Texture3D>`\ ) +- :ref:`Texture3D<class_Texture3D>` **get_texture**\ (\ ) A source texture. Used if :ref:`VisualShaderNodeSample3D.source<class_VisualShaderNodeSample3D_property_source>` is set to :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE<class_VisualShaderNodeSample3D_constant_SOURCE_TEXTURE>`. @@ -62,3 +62,4 @@ A source texture. Used if :ref:`VisualShaderNodeSample3D.source<class_VisualShad .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexture3dparameter.rst b/classes/class_visualshadernodetexture3dparameter.rst index 9aaa1210ebd..9acd1965e79 100644 --- a/classes/class_visualshadernodetexture3dparameter.rst +++ b/classes/class_visualshadernodetexture3dparameter.rst @@ -28,3 +28,4 @@ Translated to ``uniform sampler3D`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetextureparameter.rst b/classes/class_visualshadernodetextureparameter.rst index 9ba2f704b75..6fef60d77f9 100644 --- a/classes/class_visualshadernodetextureparameter.rst +++ b/classes/class_visualshadernodetextureparameter.rst @@ -56,7 +56,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TextureType**: +enum **TextureType**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureType>` .. _class_VisualShaderNodeTextureParameter_constant_TYPE_DATA: @@ -106,7 +106,7 @@ Represents the size of the :ref:`TextureType<enum_VisualShaderNodeTextureParamet .. rst-class:: classref-enumeration -enum **ColorDefault**: +enum **ColorDefault**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_ColorDefault>` .. _class_VisualShaderNodeTextureParameter_constant_COLOR_DEFAULT_WHITE: @@ -148,7 +148,7 @@ Represents the size of the :ref:`ColorDefault<enum_VisualShaderNodeTextureParame .. rst-class:: classref-enumeration -enum **TextureFilter**: +enum **TextureFilter**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureFilter>` .. _class_VisualShaderNodeTextureParameter_constant_FILTER_DEFAULT: @@ -164,7 +164,7 @@ Sample the texture using the filter determined by the node this shader is attach :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_NEAREST** = ``1`` -The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. +The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR: @@ -172,7 +172,7 @@ The texture filter reads from the nearest pixel only. The simplest and fastest m :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_LINEAR** = ``2`` -The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style. +The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP: @@ -180,7 +180,9 @@ The texture filter blends between the nearest four pixels. Use this for most cas :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_NEAREST_MIPMAP** = ``3`` -The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. +The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look pixelated from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP: @@ -188,7 +190,9 @@ The texture filter reads from the nearest pixel in the nearest mipmap. This is t :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_LINEAR_MIPMAP** = ``4`` -The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. +The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``). This makes the texture look smooth from up close, and smooth from a distance. + +Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to :ref:`Camera2D<class_Camera2D>` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP_ANISOTROPIC: @@ -196,9 +200,9 @@ The texture filter blends between the nearest 4 pixels and between the nearest 2 :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_NEAREST_MIPMAP_ANISOTROPIC** = ``5`` -The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. +The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP>` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_NEAREST_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_NEAREST_MIPMAP>` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP_ANISOTROPIC: @@ -206,9 +210,9 @@ The texture filter reads from the nearest pixel, but selects a mipmap based on t :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **FILTER_LINEAR_MIPMAP_ANISOTROPIC** = ``6`` -The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. +The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if :ref:`ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter<class_ProjectSettings_property_rendering/textures/default_filters/use_nearest_mipmap_filter>` is ``true``) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting :ref:`ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level<class_ProjectSettings_property_rendering/textures/default_filters/anisotropic_filtering_level>`. -\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP>` is usually more appropriate. +\ **Note:** This texture filter is rarely useful in 2D projects. :ref:`FILTER_LINEAR_MIPMAP<class_VisualShaderNodeTextureParameter_constant_FILTER_LINEAR_MIPMAP>` is usually more appropriate in this case. .. _class_VisualShaderNodeTextureParameter_constant_FILTER_MAX: @@ -226,7 +230,7 @@ Represents the size of the :ref:`TextureFilter<enum_VisualShaderNodeTextureParam .. rst-class:: classref-enumeration -enum **TextureRepeat**: +enum **TextureRepeat**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureRepeat>` .. _class_VisualShaderNodeTextureParameter_constant_REPEAT_DEFAULT: @@ -268,7 +272,7 @@ Represents the size of the :ref:`TextureRepeat<enum_VisualShaderNodeTextureParam .. rst-class:: classref-enumeration -enum **TextureSource**: +enum **TextureSource**: :ref:`🔗<enum_VisualShaderNodeTextureParameter_TextureSource>` .. _class_VisualShaderNodeTextureParameter_constant_SOURCE_NONE: @@ -323,12 +327,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **color_default** = ``0`` +:ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **color_default** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_color_default>` .. rst-class:: classref-property-setget -- void **set_color_default** **(** :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` value **)** -- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **get_color_default** **(** **)** +- |void| **set_color_default**\ (\ value\: :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>`\ ) +- :ref:`ColorDefault<enum_VisualShaderNodeTextureParameter_ColorDefault>` **get_color_default**\ (\ ) Sets the default color if no texture is assigned to the uniform. @@ -340,12 +344,12 @@ Sets the default color if no texture is assigned to the uniform. .. rst-class:: classref-property -:ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **texture_filter** = ``0`` +:ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **texture_filter** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_filter>` .. rst-class:: classref-property-setget -- void **set_texture_filter** **(** :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` value **)** -- :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **get_texture_filter** **(** **)** +- |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>`\ ) +- :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` **get_texture_filter**\ (\ ) Sets the texture filtering mode. See :ref:`TextureFilter<enum_VisualShaderNodeTextureParameter_TextureFilter>` for options. @@ -357,12 +361,12 @@ Sets the texture filtering mode. See :ref:`TextureFilter<enum_VisualShaderNodeTe .. rst-class:: classref-property -:ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **texture_repeat** = ``0`` +:ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **texture_repeat** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_repeat>` .. rst-class:: classref-property-setget -- void **set_texture_repeat** **(** :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` value **)** -- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **get_texture_repeat** **(** **)** +- |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>`\ ) +- :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` **get_texture_repeat**\ (\ ) Sets the texture repeating mode. See :ref:`TextureRepeat<enum_VisualShaderNodeTextureParameter_TextureRepeat>` for options. @@ -374,12 +378,12 @@ Sets the texture repeating mode. See :ref:`TextureRepeat<enum_VisualShaderNodeTe .. rst-class:: classref-property -:ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **texture_source** = ``0`` +:ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **texture_source** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_source>` .. rst-class:: classref-property-setget -- void **set_texture_source** **(** :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` value **)** -- :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **get_texture_source** **(** **)** +- |void| **set_texture_source**\ (\ value\: :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>`\ ) +- :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` **get_texture_source**\ (\ ) Sets the texture source mode. Used for reading from the screen, depth, or normal_roughness texture. See :ref:`TextureSource<enum_VisualShaderNodeTextureParameter_TextureSource>` for options. @@ -391,12 +395,12 @@ Sets the texture source mode. Used for reading from the screen, depth, or normal .. rst-class:: classref-property -:ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **texture_type** = ``0`` +:ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **texture_type** = ``0`` :ref:`🔗<class_VisualShaderNodeTextureParameter_property_texture_type>` .. rst-class:: classref-property-setget -- void **set_texture_type** **(** :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` value **)** -- :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **get_texture_type** **(** **)** +- |void| **set_texture_type**\ (\ value\: :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>`\ ) +- :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` **get_texture_type**\ (\ ) Defines the type of data provided by the source texture. See :ref:`TextureType<enum_VisualShaderNodeTextureParameter_TextureType>` for options. @@ -407,3 +411,4 @@ Defines the type of data provided by the source texture. See :ref:`TextureType<e .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetextureparametertriplanar.rst b/classes/class_visualshadernodetextureparametertriplanar.rst index 9c2deaf3843..d16059d6b4f 100644 --- a/classes/class_visualshadernodetextureparametertriplanar.rst +++ b/classes/class_visualshadernodetextureparametertriplanar.rst @@ -28,3 +28,4 @@ Performs a lookup operation on the texture provided as a uniform for the shader, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexturesdf.rst b/classes/class_visualshadernodetexturesdf.rst index 0f3a9cff5a4..032664f7389 100644 --- a/classes/class_visualshadernodetexturesdf.rst +++ b/classes/class_visualshadernodetexturesdf.rst @@ -28,3 +28,4 @@ Translates to ``texture_sdf(sdf_pos)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetexturesdfnormal.rst b/classes/class_visualshadernodetexturesdfnormal.rst index 87f75a59265..917297ccfcf 100644 --- a/classes/class_visualshadernodetexturesdfnormal.rst +++ b/classes/class_visualshadernodetexturesdfnormal.rst @@ -28,3 +28,4 @@ Translates to ``texture_sdf_normal(sdf_pos)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformcompose.rst b/classes/class_visualshadernodetransformcompose.rst index f7e9dd54d8d..e83cef68e75 100644 --- a/classes/class_visualshadernodetransformcompose.rst +++ b/classes/class_visualshadernodetransformcompose.rst @@ -19,7 +19,7 @@ Composes a :ref:`Transform3D<class_Transform3D>` from four :ref:`Vector3<class_V Description ----------- -Creates a 4x4 transform matrix using four vectors of type ``vec3``. Each vector is one row in the matrix and the last column is a ``vec4(0, 0, 0, 1)``. +Creates a 4×4 transform matrix using four vectors of type ``vec3``. Each vector is one row in the matrix and the last column is a ``vec4(0, 0, 0, 1)``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -28,3 +28,4 @@ Creates a 4x4 transform matrix using four vectors of type ``vec3``. Each vector .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformconstant.rst b/classes/class_visualshadernodetransformconstant.rst index 1b140cbf24f..ce0a2578985 100644 --- a/classes/class_visualshadernodetransformconstant.rst +++ b/classes/class_visualshadernodetransformconstant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **constant** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **constant** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_VisualShaderNodeTransformConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_constant**\ (\ ) A :ref:`Transform3D<class_Transform3D>` constant which represents the state of this node. @@ -62,3 +62,4 @@ A :ref:`Transform3D<class_Transform3D>` constant which represents the state of t .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformdecompose.rst b/classes/class_visualshadernodetransformdecompose.rst index 21add3494e2..a44c3d0a190 100644 --- a/classes/class_visualshadernodetransformdecompose.rst +++ b/classes/class_visualshadernodetransformdecompose.rst @@ -19,7 +19,7 @@ Decomposes a :ref:`Transform3D<class_Transform3D>` into four :ref:`Vector3<class Description ----------- -Takes a 4x4 transform matrix and decomposes it into four ``vec3`` values, one from each row of the matrix. +Takes a 4×4 transform matrix and decomposes it into four ``vec3`` values, one from each row of the matrix. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -28,3 +28,4 @@ Takes a 4x4 transform matrix and decomposes it into four ``vec3`` values, one fr .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformfunc.rst b/classes/class_visualshadernodetransformfunc.rst index 6329aac5f67..25ebffe71a9 100644 --- a/classes/class_visualshadernodetransformfunc.rst +++ b/classes/class_visualshadernodetransformfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeTransformFunc_Function>` .. _class_VisualShaderNodeTransformFunc_constant_FUNC_INVERSE: @@ -85,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeTransformFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeTransformFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` **get_function**\ (\ ) The function to be computed. See :ref:`Function<enum_VisualShaderNodeTransformFunc_Function>` for options. @@ -101,3 +101,4 @@ The function to be computed. See :ref:`Function<enum_VisualShaderNodeTransformFu .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformop.rst b/classes/class_visualshadernodetransformop.rst index 68abde4054a..9c0f8ee792e 100644 --- a/classes/class_visualshadernodetransformop.rst +++ b/classes/class_visualshadernodetransformop.rst @@ -19,7 +19,7 @@ A :ref:`Transform3D<class_Transform3D>` operator to be used within the visual sh Description ----------- -Applies :ref:`operator<class_VisualShaderNodeTransformOp_property_operator>` to two transform (4x4 matrices) inputs. +Applies :ref:`operator<class_VisualShaderNodeTransformOp_property_operator>` to two transform (4×4 matrices) inputs. .. rst-class:: classref-reftable-group @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeTransformOp_Operator>` .. _class_VisualShaderNodeTransformOp_constant_OP_AxB: @@ -141,12 +141,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeTransformOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` **get_operator**\ (\ ) The type of the operation to be performed on the transforms. See :ref:`Operator<enum_VisualShaderNodeTransformOp_Operator>` for options. @@ -157,3 +157,4 @@ The type of the operation to be performed on the transforms. See :ref:`Operator< .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformparameter.rst b/classes/class_visualshadernodetransformparameter.rst index ca5e54bfaab..89856467f6f 100644 --- a/classes/class_visualshadernodetransformparameter.rst +++ b/classes/class_visualshadernodetransformparameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Transform3D<class_Transform3D>` **default_value** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D<class_Transform3D>` **default_value** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗<class_VisualShaderNodeTransformParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`Transform3D<class_Transform3D>` value **)** -- :ref:`Transform3D<class_Transform3D>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`Transform3D<class_Transform3D>`\ ) +- :ref:`Transform3D<class_Transform3D>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeTransformParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeTransformParameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeTransformParamete .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodetransformvecmult.rst b/classes/class_visualshadernodetransformvecmult.rst index 11e189b2c3b..722cf0c4984 100644 --- a/classes/class_visualshadernodetransformvecmult.rst +++ b/classes/class_visualshadernodetransformvecmult.rst @@ -19,7 +19,7 @@ Multiplies a :ref:`Transform3D<class_Transform3D>` and a :ref:`Vector3<class_Vec Description ----------- -A multiplication operation on a transform (4x4 matrix) and a vector, with support for different multiplication operators. +A multiplication operation on a transform (4×4 matrix) and a vector, with support for different multiplication operators. .. rst-class:: classref-reftable-group @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeTransformVecMult_Operator>` .. _class_VisualShaderNodeTransformVecMult_constant_OP_AxB: @@ -101,12 +101,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeTransformVecMult_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` **get_operator**\ (\ ) The multiplication type to be performed. See :ref:`Operator<enum_VisualShaderNodeTransformVecMult_Operator>` for options. @@ -117,3 +117,4 @@ The multiplication type to be performed. See :ref:`Operator<enum_VisualShaderNod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuintconstant.rst b/classes/class_visualshadernodeuintconstant.rst index eda432e59b7..d458e4061cd 100644 --- a/classes/class_visualshadernodeuintconstant.rst +++ b/classes/class_visualshadernodeuintconstant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **constant** = ``0`` +:ref:`int<class_int>` **constant** = ``0`` :ref:`🔗<class_VisualShaderNodeUIntConstant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_constant**\ (\ ) An unsigned integer constant which represents a state of this node. @@ -62,3 +62,4 @@ An unsigned integer constant which represents a state of this node. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuintfunc.rst b/classes/class_visualshadernodeuintfunc.rst index f5bada1eadc..c13c5407368 100644 --- a/classes/class_visualshadernodeuintfunc.rst +++ b/classes/class_visualshadernodeuintfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeUIntFunc_Function>` .. _class_VisualShaderNodeUIntFunc_constant_FUNC_NEGATE: @@ -85,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeUIntFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeUIntFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` **get_function**\ (\ ) A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNodeUIntFunc_Function>` for options. @@ -101,3 +101,4 @@ A function to be applied to the scalar. See :ref:`Function<enum_VisualShaderNode .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuintop.rst b/classes/class_visualshadernodeuintop.rst index 77c25c5c1db..2e1b7d52c6d 100644 --- a/classes/class_visualshadernodeuintop.rst +++ b/classes/class_visualshadernodeuintop.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeUIntOp_Operator>` .. _class_VisualShaderNodeUIntOp_constant_OP_ADD: @@ -165,12 +165,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeUIntOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` **get_operator**\ (\ ) An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNodeUIntOp_Operator>` for options. @@ -181,3 +181,4 @@ An operator to be applied to the inputs. See :ref:`Operator<enum_VisualShaderNod .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuintparameter.rst b/classes/class_visualshadernodeuintparameter.rst index 81d7a492ae0..d16711c5f00 100644 --- a/classes/class_visualshadernodeuintparameter.rst +++ b/classes/class_visualshadernodeuintparameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`int<class_int>` **default_value** = ``0`` +:ref:`int<class_int>` **default_value** = ``0`` :ref:`🔗<class_VisualShaderNodeUIntParameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_default_value**\ (\ ) Default value of this parameter, which will be used if not set externally. :ref:`default_value_enabled<class_VisualShaderNodeUIntParameter_property_default_value_enabled>` must be enabled; defaults to ``0`` otherwise. @@ -65,12 +65,12 @@ Default value of this parameter, which will be used if not set externally. :ref: .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeUIntParameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) If ``true``, the node will have a custom default value. @@ -81,3 +81,4 @@ If ``true``, the node will have a custom default value. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuvfunc.rst b/classes/class_visualshadernodeuvfunc.rst index d47b64841c5..a66ed3c36a6 100644 --- a/classes/class_visualshadernodeuvfunc.rst +++ b/classes/class_visualshadernodeuvfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeUVFunc_Function>` .. _class_VisualShaderNodeUVFunc_constant_FUNC_PANNING: @@ -85,12 +85,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeUVFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeUVFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeUVFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeUVFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` **get_function**\ (\ ) A function to be applied to the texture coordinates. See :ref:`Function<enum_VisualShaderNodeUVFunc_Function>` for options. @@ -101,3 +101,4 @@ A function to be applied to the texture coordinates. See :ref:`Function<enum_Vis .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeuvpolarcoord.rst b/classes/class_visualshadernodeuvpolarcoord.rst index 85943b1164b..92b5ab568a0 100644 --- a/classes/class_visualshadernodeuvpolarcoord.rst +++ b/classes/class_visualshadernodeuvpolarcoord.rst @@ -28,3 +28,4 @@ UV polar coord node will transform UV values into polar coordinates, with specif .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevarying.rst b/classes/class_visualshadernodevarying.rst index 3ebad00c5f7..0cbdfbf4bbb 100644 --- a/classes/class_visualshadernodevarying.rst +++ b/classes/class_visualshadernodevarying.rst @@ -50,12 +50,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`String<class_String>` **varying_name** = ``"[None]"`` +:ref:`String<class_String>` **varying_name** = ``"[None]"`` :ref:`🔗<class_VisualShaderNodeVarying_property_varying_name>` .. rst-class:: classref-property-setget -- void **set_varying_name** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_varying_name** **(** **)** +- |void| **set_varying_name**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_varying_name**\ (\ ) Name of the variable. Must be unique. @@ -67,12 +67,12 @@ Name of the variable. Must be unique. .. rst-class:: classref-property -:ref:`VaryingType<enum_VisualShader_VaryingType>` **varying_type** = ``0`` +:ref:`VaryingType<enum_VisualShader_VaryingType>` **varying_type** = ``0`` :ref:`🔗<class_VisualShaderNodeVarying_property_varying_type>` .. rst-class:: classref-property-setget -- void **set_varying_type** **(** :ref:`VaryingType<enum_VisualShader_VaryingType>` value **)** -- :ref:`VaryingType<enum_VisualShader_VaryingType>` **get_varying_type** **(** **)** +- |void| **set_varying_type**\ (\ value\: :ref:`VaryingType<enum_VisualShader_VaryingType>`\ ) +- :ref:`VaryingType<enum_VisualShader_VaryingType>` **get_varying_type**\ (\ ) Type of the variable. Determines where the variable can be accessed. @@ -83,3 +83,4 @@ Type of the variable. Determines where the variable can be accessed. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevaryinggetter.rst b/classes/class_visualshadernodevaryinggetter.rst index 928fe3ebf39..709cf2195f2 100644 --- a/classes/class_visualshadernodevaryinggetter.rst +++ b/classes/class_visualshadernodevaryinggetter.rst @@ -28,3 +28,4 @@ Outputs a value of a varying defined in the shader. You need to first create a v .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevaryingsetter.rst b/classes/class_visualshadernodevaryingsetter.rst index 714ef3d8bec..bee8018aac0 100644 --- a/classes/class_visualshadernodevaryingsetter.rst +++ b/classes/class_visualshadernodevaryingsetter.rst @@ -28,3 +28,4 @@ Inputs a value to a varying defined in the shader. You need to first create a va .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec2constant.rst b/classes/class_visualshadernodevec2constant.rst index 6e75e7d04ff..e7393756169 100644 --- a/classes/class_visualshadernodevec2constant.rst +++ b/classes/class_visualshadernodevec2constant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **constant** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **constant** = ``Vector2(0, 0)`` :ref:`🔗<class_VisualShaderNodeVec2Constant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_constant**\ (\ ) A :ref:`Vector2<class_Vector2>` constant which represents the state of this node. @@ -62,3 +62,4 @@ A :ref:`Vector2<class_Vector2>` constant which represents the state of this node .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec2parameter.rst b/classes/class_visualshadernodevec2parameter.rst index 3876e2fff41..d7f58109d4e 100644 --- a/classes/class_visualshadernodevec2parameter.rst +++ b/classes/class_visualshadernodevec2parameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **default_value** = ``Vector2(0, 0)`` +:ref:`Vector2<class_Vector2>` **default_value** = ``Vector2(0, 0)`` :ref:`🔗<class_VisualShaderNodeVec2Parameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeVec2Parameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeVec2Parameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeVec2Parameter_pro .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec3constant.rst b/classes/class_visualshadernodevec3constant.rst index 2e6db594b19..ca898b18955 100644 --- a/classes/class_visualshadernodevec3constant.rst +++ b/classes/class_visualshadernodevec3constant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **constant** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **constant** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_VisualShaderNodeVec3Constant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_constant**\ (\ ) A :ref:`Vector3<class_Vector3>` constant which represents the state of this node. @@ -62,3 +62,4 @@ A :ref:`Vector3<class_Vector3>` constant which represents the state of this node .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec3parameter.rst b/classes/class_visualshadernodevec3parameter.rst index 06b5da1990d..ee1c6f96bbf 100644 --- a/classes/class_visualshadernodevec3parameter.rst +++ b/classes/class_visualshadernodevec3parameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **default_value** = ``Vector3(0, 0, 0)`` +:ref:`Vector3<class_Vector3>` **default_value** = ``Vector3(0, 0, 0)`` :ref:`🔗<class_VisualShaderNodeVec3Parameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeVec3Parameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeVec3Parameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeVec3Parameter_pro .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec4constant.rst b/classes/class_visualshadernodevec4constant.rst index 3c104ce3b9c..d53d379cc1d 100644 --- a/classes/class_visualshadernodevec4constant.rst +++ b/classes/class_visualshadernodevec4constant.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Quaternion<class_Quaternion>` **constant** = ``Quaternion(0, 0, 0, 1)`` +:ref:`Quaternion<class_Quaternion>` **constant** = ``Quaternion(0, 0, 0, 1)`` :ref:`🔗<class_VisualShaderNodeVec4Constant_property_constant>` .. rst-class:: classref-property-setget -- void **set_constant** **(** :ref:`Quaternion<class_Quaternion>` value **)** -- :ref:`Quaternion<class_Quaternion>` **get_constant** **(** **)** +- |void| **set_constant**\ (\ value\: :ref:`Quaternion<class_Quaternion>`\ ) +- :ref:`Quaternion<class_Quaternion>` **get_constant**\ (\ ) A 4D vector (represented as a :ref:`Quaternion<class_Quaternion>`) constant which represents the state of this node. @@ -62,3 +62,4 @@ A 4D vector (represented as a :ref:`Quaternion<class_Quaternion>`) constant whic .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevec4parameter.rst b/classes/class_visualshadernodevec4parameter.rst index 5f0b22e9c2a..7a5147e1006 100644 --- a/classes/class_visualshadernodevec4parameter.rst +++ b/classes/class_visualshadernodevec4parameter.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector4<class_Vector4>` **default_value** = ``Vector4(0, 0, 0, 0)`` +:ref:`Vector4<class_Vector4>` **default_value** = ``Vector4(0, 0, 0, 0)`` :ref:`🔗<class_VisualShaderNodeVec4Parameter_property_default_value>` .. rst-class:: classref-property-setget -- void **set_default_value** **(** :ref:`Vector4<class_Vector4>` value **)** -- :ref:`Vector4<class_Vector4>` **get_default_value** **(** **)** +- |void| **set_default_value**\ (\ value\: :ref:`Vector4<class_Vector4>`\ ) +- :ref:`Vector4<class_Vector4>` **get_default_value**\ (\ ) A default value to be assigned within the shader. @@ -65,12 +65,12 @@ A default value to be assigned within the shader. .. rst-class:: classref-property -:ref:`bool<class_bool>` **default_value_enabled** = ``false`` +:ref:`bool<class_bool>` **default_value_enabled** = ``false`` :ref:`🔗<class_VisualShaderNodeVec4Parameter_property_default_value_enabled>` .. rst-class:: classref-property-setget -- void **set_default_value_enabled** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_default_value_enabled** **(** **)** +- |void| **set_default_value_enabled**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_default_value_enabled**\ (\ ) Enables usage of the :ref:`default_value<class_VisualShaderNodeVec4Parameter_property_default_value>`. @@ -81,3 +81,4 @@ Enables usage of the :ref:`default_value<class_VisualShaderNodeVec4Parameter_pro .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorbase.rst b/classes/class_visualshadernodevectorbase.rst index d42aca5346f..331aa2d43ea 100644 --- a/classes/class_visualshadernodevectorbase.rst +++ b/classes/class_visualshadernodevectorbase.rst @@ -48,7 +48,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **OpType**: +enum **OpType**: :ref:`🔗<enum_VisualShaderNodeVectorBase_OpType>` .. _class_VisualShaderNodeVectorBase_constant_OP_TYPE_VECTOR_2D: @@ -95,12 +95,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>` **op_type** = ``1`` +:ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>` **op_type** = ``1`` :ref:`🔗<class_VisualShaderNodeVectorBase_property_op_type>` .. rst-class:: classref-property-setget -- void **set_op_type** **(** :ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>` value **)** -- :ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>` **get_op_type** **(** **)** +- |void| **set_op_type**\ (\ value\: :ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>`\ ) +- :ref:`OpType<enum_VisualShaderNodeVectorBase_OpType>` **get_op_type**\ (\ ) A vector type that this operation is performed on. @@ -111,3 +111,4 @@ A vector type that this operation is performed on. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorcompose.rst b/classes/class_visualshadernodevectorcompose.rst index 735d988345a..c10e062029b 100644 --- a/classes/class_visualshadernodevectorcompose.rst +++ b/classes/class_visualshadernodevectorcompose.rst @@ -28,3 +28,4 @@ Creates a ``vec2``, ``vec3`` or ``vec4`` using scalar values that can be provide .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectordecompose.rst b/classes/class_visualshadernodevectordecompose.rst index 5ba6a330530..4544ceb555f 100644 --- a/classes/class_visualshadernodevectordecompose.rst +++ b/classes/class_visualshadernodevectordecompose.rst @@ -28,3 +28,4 @@ Takes a ``vec2``, ``vec3`` or ``vec4`` and decomposes it into scalar values that .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectordistance.rst b/classes/class_visualshadernodevectordistance.rst index 147c49c4355..14bdf9f37a3 100644 --- a/classes/class_visualshadernodevectordistance.rst +++ b/classes/class_visualshadernodevectordistance.rst @@ -30,3 +30,4 @@ Translated to ``distance(p0, p1)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorfunc.rst b/classes/class_visualshadernodevectorfunc.rst index a8507384f4f..b1e437c1a9e 100644 --- a/classes/class_visualshadernodevectorfunc.rst +++ b/classes/class_visualshadernodevectorfunc.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Function**: +enum **Function**: :ref:`🔗<enum_VisualShaderNodeVectorFunc_Function>` .. _class_VisualShaderNodeVectorFunc_constant_FUNC_NORMALIZE: @@ -333,12 +333,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` **function** = ``0`` +:ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` **function** = ``0`` :ref:`🔗<class_VisualShaderNodeVectorFunc_property_function>` .. rst-class:: classref-property-setget -- void **set_function** **(** :ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` value **)** -- :ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` **get_function** **(** **)** +- |void| **set_function**\ (\ value\: :ref:`Function<enum_VisualShaderNodeVectorFunc_Function>`\ ) +- :ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` **get_function**\ (\ ) The function to be performed. See :ref:`Function<enum_VisualShaderNodeVectorFunc_Function>` for options. @@ -349,3 +349,4 @@ The function to be performed. See :ref:`Function<enum_VisualShaderNodeVectorFunc .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorlen.rst b/classes/class_visualshadernodevectorlen.rst index 44ccf60b2d8..3f49c5c9981 100644 --- a/classes/class_visualshadernodevectorlen.rst +++ b/classes/class_visualshadernodevectorlen.rst @@ -28,3 +28,4 @@ Translated to ``length(p0)`` in the shader language. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorop.rst b/classes/class_visualshadernodevectorop.rst index 305516d39e2..a83763e58f8 100644 --- a/classes/class_visualshadernodevectorop.rst +++ b/classes/class_visualshadernodevectorop.rst @@ -46,7 +46,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Operator**: +enum **Operator**: :ref:`🔗<enum_VisualShaderNodeVectorOp_Operator>` .. _class_VisualShaderNodeVectorOp_constant_OP_ADD: @@ -165,12 +165,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` **operator** = ``0`` +:ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` **operator** = ``0`` :ref:`🔗<class_VisualShaderNodeVectorOp_property_operator>` .. rst-class:: classref-property-setget -- void **set_operator** **(** :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` value **)** -- :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` **get_operator** **(** **)** +- |void| **set_operator**\ (\ value\: :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>`\ ) +- :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` **get_operator**\ (\ ) The operator to be used. See :ref:`Operator<enum_VisualShaderNodeVectorOp_Operator>` for options. @@ -181,3 +181,4 @@ The operator to be used. See :ref:`Operator<enum_VisualShaderNodeVectorOp_Operat .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodevectorrefract.rst b/classes/class_visualshadernodevectorrefract.rst index f32fff90b44..02b30c7e7e3 100644 --- a/classes/class_visualshadernodevectorrefract.rst +++ b/classes/class_visualshadernodevectorrefract.rst @@ -28,3 +28,4 @@ Translated to ``refract(I, N, eta)`` in the shader language, where ``I`` is the .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_visualshadernodeworldpositionfromdepth.rst b/classes/class_visualshadernodeworldpositionfromdepth.rst new file mode 100644 index 00000000000..f74eb94e6bd --- /dev/null +++ b/classes/class_visualshadernodeworldpositionfromdepth.rst @@ -0,0 +1,31 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VisualShaderNodeWorldPositionFromDepth.xml. + +.. _class_VisualShaderNodeWorldPositionFromDepth: + +VisualShaderNodeWorldPositionFromDepth +====================================== + +**Inherits:** :ref:`VisualShaderNode<class_VisualShaderNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>` + +A visual shader node that calculates the position of the pixel in world space using the depth texture. + +.. rst-class:: classref-introduction-group + +Description +----------- + +The WorldPositionFromDepth node reconstructs the depth position of the pixel in world space. This can be used to obtain world space UVs for projection mapping like Caustics. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_voxelgi.rst b/classes/class_voxelgi.rst index 7cbc3918da2..e473c3bdce0 100644 --- a/classes/class_voxelgi.rst +++ b/classes/class_voxelgi.rst @@ -34,9 +34,9 @@ Description Tutorials --------- -- :doc:`VoxelGI <../tutorials/3d/global_illumination/using_voxel_gi>` +- :doc:`Using Voxel global illumination <../tutorials/3d/global_illumination/using_voxel_gi>` -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -64,11 +64,11 @@ Methods .. table:: :widths: auto - +------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`bake<class_VoxelGI_method_bake>` **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`debug_bake<class_VoxelGI_method_debug_bake>` **(** **)** | - +------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`bake<class_VoxelGI_method_bake>`\ (\ from_node\: :ref:`Node<class_Node>` = null, create_visual_debug\: :ref:`bool<class_bool>` = false\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`debug_bake<class_VoxelGI_method_debug_bake>`\ (\ ) | + +--------+-------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,7 +83,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Subdiv**: +enum **Subdiv**: :ref:`🔗<enum_VoxelGI_Subdiv>` .. _class_VoxelGI_constant_SUBDIV_64: @@ -138,12 +138,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** +:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** :ref:`🔗<class_VoxelGI_property_camera_attributes>` .. rst-class:: classref-property-setget -- void **set_camera_attributes** **(** :ref:`CameraAttributes<class_CameraAttributes>` value **)** -- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes** **(** **)** +- |void| **set_camera_attributes**\ (\ value\: :ref:`CameraAttributes<class_CameraAttributes>`\ ) +- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes**\ (\ ) The :ref:`CameraAttributes<class_CameraAttributes>` resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the **VoxelGI** will have banding artifacts or may have over-exposure artifacts. @@ -155,12 +155,12 @@ The :ref:`CameraAttributes<class_CameraAttributes>` resource that specifies expo .. rst-class:: classref-property -:ref:`VoxelGIData<class_VoxelGIData>` **data** +:ref:`VoxelGIData<class_VoxelGIData>` **data** :ref:`🔗<class_VoxelGI_property_data>` .. rst-class:: classref-property-setget -- void **set_probe_data** **(** :ref:`VoxelGIData<class_VoxelGIData>` value **)** -- :ref:`VoxelGIData<class_VoxelGIData>` **get_probe_data** **(** **)** +- |void| **set_probe_data**\ (\ value\: :ref:`VoxelGIData<class_VoxelGIData>`\ ) +- :ref:`VoxelGIData<class_VoxelGIData>` **get_probe_data**\ (\ ) The :ref:`VoxelGIData<class_VoxelGIData>` resource that holds the data for this **VoxelGI**. @@ -172,12 +172,12 @@ The :ref:`VoxelGIData<class_VoxelGIData>` resource that holds the data for this .. rst-class:: classref-property -:ref:`Vector3<class_Vector3>` **size** = ``Vector3(20, 20, 20)`` +:ref:`Vector3<class_Vector3>` **size** = ``Vector3(20, 20, 20)`` :ref:`🔗<class_VoxelGI_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector3<class_Vector3>` value **)** -- :ref:`Vector3<class_Vector3>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector3<class_Vector3>`\ ) +- :ref:`Vector3<class_Vector3>` **get_size**\ (\ ) The size of the area covered by the **VoxelGI**. If you make the size larger without increasing the subdivisions with :ref:`subdiv<class_VoxelGI_property_subdiv>`, the size of each cell will increase and result in lower detailed lighting. @@ -191,12 +191,12 @@ The size of the area covered by the **VoxelGI**. If you make the size larger wit .. rst-class:: classref-property -:ref:`Subdiv<enum_VoxelGI_Subdiv>` **subdiv** = ``1`` +:ref:`Subdiv<enum_VoxelGI_Subdiv>` **subdiv** = ``1`` :ref:`🔗<class_VoxelGI_property_subdiv>` .. rst-class:: classref-property-setget -- void **set_subdiv** **(** :ref:`Subdiv<enum_VoxelGI_Subdiv>` value **)** -- :ref:`Subdiv<enum_VoxelGI_Subdiv>` **get_subdiv** **(** **)** +- |void| **set_subdiv**\ (\ value\: :ref:`Subdiv<enum_VoxelGI_Subdiv>`\ ) +- :ref:`Subdiv<enum_VoxelGI_Subdiv>` **get_subdiv**\ (\ ) Number of times to subdivide the grid that the **VoxelGI** operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance. @@ -213,7 +213,7 @@ Method Descriptions .. rst-class:: classref-method -void **bake** **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)** +|void| **bake**\ (\ from_node\: :ref:`Node<class_Node>` = null, create_visual_debug\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_VoxelGI_method_bake>` Bakes the effect from all :ref:`GeometryInstance3D<class_GeometryInstance3D>`\ s marked with :ref:`GeometryInstance3D.GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>` and :ref:`Light3D<class_Light3D>`\ s marked with either :ref:`Light3D.BAKE_STATIC<class_Light3D_constant_BAKE_STATIC>` or :ref:`Light3D.BAKE_DYNAMIC<class_Light3D_constant_BAKE_DYNAMIC>`. If ``create_visual_debug`` is ``true``, after baking the light, this will generate a :ref:`MultiMesh<class_MultiMesh>` that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the **VoxelGI**'s data and debug any issues that may be occurring. @@ -229,7 +229,7 @@ Bakes the effect from all :ref:`GeometryInstance3D<class_GeometryInstance3D>`\ s .. rst-class:: classref-method -void **debug_bake** **(** **)** +|void| **debug_bake**\ (\ ) :ref:`🔗<class_VoxelGI_method_debug_bake>` Calls :ref:`bake<class_VoxelGI_method_bake>` with ``create_visual_debug`` enabled. @@ -240,3 +240,4 @@ Calls :ref:`bake<class_VoxelGI_method_bake>` with ``create_visual_debug`` enable .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_voxelgidata.rst b/classes/class_voxelgidata.rst index bc14248c553..a45bccc41ed 100644 --- a/classes/class_voxelgidata.rst +++ b/classes/class_voxelgidata.rst @@ -28,7 +28,7 @@ Description Tutorials --------- -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -62,21 +62,21 @@ Methods .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`allocate<class_VoxelGIData_method_allocate>` **(** :ref:`Transform3D<class_Transform3D>` to_cell_xform, :ref:`AABB<class_AABB>` aabb, :ref:`Vector3<class_Vector3>` octree_size, :ref:`PackedByteArray<class_PackedByteArray>` octree_cells, :ref:`PackedByteArray<class_PackedByteArray>` data_cells, :ref:`PackedByteArray<class_PackedByteArray>` distance_field, :ref:`PackedInt32Array<class_PackedInt32Array>` level_counts **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB<class_AABB>` | :ref:`get_bounds<class_VoxelGIData_method_get_bounds>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data_cells<class_VoxelGIData_method_get_data_cells>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_level_counts<class_VoxelGIData_method_get_level_counts>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_octree_cells<class_VoxelGIData_method_get_octree_cells>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3<class_Vector3>` | :ref:`get_octree_size<class_VoxelGIData_method_get_octree_size>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D<class_Transform3D>` | :ref:`get_to_cell_xform<class_VoxelGIData_method_get_to_cell_xform>` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`allocate<class_VoxelGIData_method_allocate>`\ (\ to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3<class_Vector3>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB<class_AABB>` | :ref:`get_bounds<class_VoxelGIData_method_get_bounds>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data_cells<class_VoxelGIData_method_get_data_cells>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_level_counts<class_VoxelGIData_method_get_level_counts>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_octree_cells<class_VoxelGIData_method_get_octree_cells>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3<class_Vector3>` | :ref:`get_octree_size<class_VoxelGIData_method_get_octree_size>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D<class_Transform3D>` | :ref:`get_to_cell_xform<class_VoxelGIData_method_get_to_cell_xform>`\ (\ ) |const| | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,12 +91,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **bias** = ``1.5`` +:ref:`float<class_float>` **bias** = ``1.5`` :ref:`🔗<class_VoxelGIData_property_bias>` .. rst-class:: classref-property-setget -- void **set_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_bias** **(** **)** +- |void| **set_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_bias**\ (\ ) The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. To prioritize hiding self-reflections over lighting quality, set :ref:`bias<class_VoxelGIData_property_bias>` to ``0.0`` and :ref:`normal_bias<class_VoxelGIData_property_normal_bias>` to a value between ``1.0`` and ``2.0``. @@ -108,12 +108,12 @@ The normal bias to use for indirect lighting and reflections. Higher values redu .. rst-class:: classref-property -:ref:`float<class_float>` **dynamic_range** = ``2.0`` +:ref:`float<class_float>` **dynamic_range** = ``2.0`` :ref:`🔗<class_VoxelGIData_property_dynamic_range>` .. rst-class:: classref-property-setget -- void **set_dynamic_range** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_dynamic_range** **(** **)** +- |void| **set_dynamic_range**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_dynamic_range**\ (\ ) The dynamic range to use (``1.0`` represents a low dynamic range scene brightness). Higher values can be used to provide brighter indirect lighting, at the cost of more visible color banding in dark areas (both in indirect lighting and reflections). To avoid color banding, it's recommended to use the lowest value that does not result in visible light clipping. @@ -125,12 +125,12 @@ The dynamic range to use (``1.0`` represents a low dynamic range scene brightnes .. rst-class:: classref-property -:ref:`float<class_float>` **energy** = ``1.0`` +:ref:`float<class_float>` **energy** = ``1.0`` :ref:`🔗<class_VoxelGIData_property_energy>` .. rst-class:: classref-property-setget -- void **set_energy** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_energy** **(** **)** +- |void| **set_energy**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_energy**\ (\ ) The energy of the indirect lighting and reflections produced by the :ref:`VoxelGI<class_VoxelGI>` node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation<class_VoxelGIData_property_propagation>` while increasing :ref:`energy<class_VoxelGIData_property_energy>` at the same time. See also :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>` which influences the indirect lighting's effective brightness. @@ -142,12 +142,12 @@ The energy of the indirect lighting and reflections produced by the :ref:`VoxelG .. rst-class:: classref-property -:ref:`bool<class_bool>` **interior** = ``false`` +:ref:`bool<class_bool>` **interior** = ``false`` :ref:`🔗<class_VoxelGIData_property_interior>` .. rst-class:: classref-property-setget -- void **set_interior** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_interior** **(** **)** +- |void| **set_interior**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_interior**\ (\ ) If ``true``, :ref:`Environment<class_Environment>` lighting is ignored by the :ref:`VoxelGI<class_VoxelGI>` node. If ``false``, :ref:`Environment<class_Environment>` lighting is taken into account by the :ref:`VoxelGI<class_VoxelGI>` node. :ref:`Environment<class_Environment>` lighting updates in real-time, which means it can be changed without having to bake the :ref:`VoxelGI<class_VoxelGI>` node again. @@ -159,12 +159,12 @@ If ``true``, :ref:`Environment<class_Environment>` lighting is ignored by the :r .. rst-class:: classref-property -:ref:`float<class_float>` **normal_bias** = ``0.0`` +:ref:`float<class_float>` **normal_bias** = ``0.0`` :ref:`🔗<class_VoxelGIData_property_normal_bias>` .. rst-class:: classref-property-setget -- void **set_normal_bias** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_normal_bias** **(** **)** +- |void| **set_normal_bias**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_normal_bias**\ (\ ) The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also :ref:`bias<class_VoxelGIData_property_bias>`. To prioritize hiding self-reflections over lighting quality, set :ref:`bias<class_VoxelGIData_property_bias>` to ``0.0`` and :ref:`normal_bias<class_VoxelGIData_property_normal_bias>` to a value between ``1.0`` and ``2.0``. @@ -176,12 +176,12 @@ The normal bias to use for indirect lighting and reflections. Higher values redu .. rst-class:: classref-property -:ref:`float<class_float>` **propagation** = ``0.5`` +:ref:`float<class_float>` **propagation** = ``0.5`` :ref:`🔗<class_VoxelGIData_property_propagation>` .. rst-class:: classref-property-setget -- void **set_propagation** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_propagation** **(** **)** +- |void| **set_propagation**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_propagation**\ (\ ) The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation<class_VoxelGIData_property_propagation>` while increasing :ref:`energy<class_VoxelGIData_property_energy>` at the same time. See also :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>` which influences the indirect lighting's effective brightness. @@ -193,12 +193,12 @@ The multiplier to use when light bounces off a surface. Higher values result in .. rst-class:: classref-property -:ref:`bool<class_bool>` **use_two_bounces** = ``true`` +:ref:`bool<class_bool>` **use_two_bounces** = ``true`` :ref:`🔗<class_VoxelGIData_property_use_two_bounces>` .. rst-class:: classref-property-setget -- void **set_use_two_bounces** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_using_two_bounces** **(** **)** +- |void| **set_use_two_bounces**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_using_two_bounces**\ (\ ) If ``true``, performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>`, adjust :ref:`propagation<class_VoxelGIData_property_propagation>` and :ref:`energy<class_VoxelGIData_property_energy>`. @@ -215,7 +215,7 @@ Method Descriptions .. rst-class:: classref-method -void **allocate** **(** :ref:`Transform3D<class_Transform3D>` to_cell_xform, :ref:`AABB<class_AABB>` aabb, :ref:`Vector3<class_Vector3>` octree_size, :ref:`PackedByteArray<class_PackedByteArray>` octree_cells, :ref:`PackedByteArray<class_PackedByteArray>` data_cells, :ref:`PackedByteArray<class_PackedByteArray>` distance_field, :ref:`PackedInt32Array<class_PackedInt32Array>` level_counts **)** +|void| **allocate**\ (\ to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3<class_Vector3>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_VoxelGIData_method_allocate>` .. container:: contribute @@ -229,7 +229,7 @@ void **allocate** **(** :ref:`Transform3D<class_Transform3D>` to_cell_xform, :re .. rst-class:: classref-method -:ref:`AABB<class_AABB>` **get_bounds** **(** **)** |const| +:ref:`AABB<class_AABB>` **get_bounds**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_bounds>` Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which should match :ref:`VoxelGI.size<class_VoxelGI_property_size>` after being baked (which only contains the size as a :ref:`Vector3<class_Vector3>`). @@ -243,7 +243,7 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_data_cells** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **get_data_cells**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_data_cells>` .. container:: contribute @@ -257,7 +257,7 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. rst-class:: classref-method -:ref:`PackedInt32Array<class_PackedInt32Array>` **get_level_counts** **(** **)** |const| +:ref:`PackedInt32Array<class_PackedInt32Array>` **get_level_counts**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_level_counts>` .. container:: contribute @@ -271,7 +271,7 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. rst-class:: classref-method -:ref:`PackedByteArray<class_PackedByteArray>` **get_octree_cells** **(** **)** |const| +:ref:`PackedByteArray<class_PackedByteArray>` **get_octree_cells**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_octree_cells>` .. container:: contribute @@ -285,7 +285,7 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. rst-class:: classref-method -:ref:`Vector3<class_Vector3>` **get_octree_size** **(** **)** |const| +:ref:`Vector3<class_Vector3>` **get_octree_size**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_octree_size>` .. container:: contribute @@ -299,7 +299,7 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. rst-class:: classref-method -:ref:`Transform3D<class_Transform3D>` **get_to_cell_xform** **(** **)** |const| +:ref:`Transform3D<class_Transform3D>` **get_to_cell_xform**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_to_cell_xform>` .. container:: contribute @@ -312,3 +312,4 @@ Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vscrollbar.rst b/classes/class_vscrollbar.rst index c33be5a0699..15397d09d00 100644 --- a/classes/class_vscrollbar.rst +++ b/classes/class_vscrollbar.rst @@ -30,180 +30,11 @@ Properties :widths: auto +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_horizontal | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_horizontal>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_horizontal | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_horizontal>`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement<class_VScrollBar_theme_icon_decrement>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_highlight<class_VScrollBar_theme_icon_decrement_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`decrement_pressed<class_VScrollBar_theme_icon_decrement_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment<class_VScrollBar_theme_icon_increment>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_highlight<class_VScrollBar_theme_icon_increment_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`increment_pressed<class_VScrollBar_theme_icon_increment_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber<class_VScrollBar_theme_style_grabber>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_highlight<class_VScrollBar_theme_style_grabber_highlight>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_pressed<class_VScrollBar_theme_style_grabber_pressed>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll<class_VScrollBar_theme_style_scroll>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`scroll_focus<class_VScrollBar_theme_style_scroll_focus>` | - +-----------------------------------+-----------------------------------------------------------------------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VScrollBar_theme_icon_decrement: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement** - -Icon used as a button to scroll the :ref:`ScrollBar<class_ScrollBar>` up. Supports custom step using the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` property. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_decrement_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement_highlight** - -Displayed when the mouse cursor hovers over the decrement button. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_decrement_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **decrement_pressed** - -Displayed when the decrement button is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment** - -Icon used as a button to scroll the :ref:`ScrollBar<class_ScrollBar>` down. Supports custom step using the :ref:`ScrollBar.custom_step<class_ScrollBar_property_custom_step>` property. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment_highlight** - -Displayed when the mouse cursor hovers over the increment button. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **increment_pressed** - -Displayed when the increment button is being pressed. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber** - -Used as texture for the grabber, the draggable element representing current scroll. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_highlight** - -Used when the mouse hovers over the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_pressed** - -Used when the grabber is being dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_scroll: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **scroll** - -Used as background of this :ref:`ScrollBar<class_ScrollBar>`. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_scroll_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **scroll_focus** - -Used as background when the :ref:`ScrollBar<class_ScrollBar>` has the GUI focus. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -211,3 +42,4 @@ Used as background when the :ref:`ScrollBar<class_ScrollBar>` has the GUI focus. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vseparator.rst b/classes/class_vseparator.rst index ade81a36d94..d82c7f210e6 100644 --- a/classes/class_vseparator.rst +++ b/classes/class_vseparator.rst @@ -21,49 +21,6 @@ Description A vertical separator used for separating other controls that are arranged **horizontally**. **VSeparator** is purely visual and normally drawn as a :ref:`StyleBoxLine<class_StyleBoxLine>`. -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`separation<class_VSeparator_theme_constant_separation>` | ``4`` | - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`separator<class_VSeparator_theme_style_separator>` | | - +---------------------------------+---------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSeparator_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``4`` - -The width of the area covered by the separator. Effectively works like a minimum width. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSeparator_theme_style_separator: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **separator** - -The style for the separator line. Works best with :ref:`StyleBoxLine<class_StyleBoxLine>` (remember to enable :ref:`StyleBoxLine.vertical<class_StyleBoxLine_property_vertical>`). - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -71,3 +28,4 @@ The style for the separator line. Works best with :ref:`StyleBoxLine<class_Style .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vslider.rst b/classes/class_vslider.rst index 368fe136e69..4b56ae24bd3 100644 --- a/classes/class_vslider.rst +++ b/classes/class_vslider.rst @@ -30,152 +30,11 @@ Properties :widths: auto +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_horizontal | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_horizontal>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_horizontal | ``0`` (overrides :ref:`Control<class_Control_property_size_flags_horizontal>`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`SizeFlags<enum_Control_SizeFlags>`\> | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | + | |bitfield|\[:ref:`SizeFlags<enum_Control_SizeFlags>`\] | size_flags_vertical | ``1`` (overrides :ref:`Control<class_Control_property_size_flags_vertical>`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`center_grabber<class_VSlider_theme_constant_center_grabber>` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int<class_int>` | :ref:`grabber_offset<class_VSlider_theme_constant_grabber_offset>` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_VSlider_theme_icon_grabber>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_disabled<class_VSlider_theme_icon_grabber_disabled>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber_highlight<class_VSlider_theme_icon_grabber_highlight>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`tick<class_VSlider_theme_icon_tick>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area<class_VSlider_theme_style_grabber_area>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`grabber_area_highlight<class_VSlider_theme_style_grabber_area_highlight>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`slider<class_VSlider_theme_style_slider>` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSlider_theme_constant_center_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **center_grabber** = ``0`` - -Boolean constant. If ``1``, the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_constant_grabber_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **grabber_offset** = ``0`` - -Horizontal offset of the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber** - -The texture for the grabber (the draggable element). - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber_disabled** - -The texture for the grabber when it's disabled. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber_highlight** - -The texture for the grabber when it's focused. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_tick: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **tick** - -The texture for the ticks, visible when :ref:`Slider.tick_count<class_Slider_property_tick_count>` is greater than 0. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_grabber_area: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_area** - -The background of the area below the grabber. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_grabber_area_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **grabber_area_highlight** - -The background of the area below the grabber that displays when it's being hovered or focused. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_slider: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox<class_StyleBox>` **slider** - -The background for the whole slider. Determines the width of the ``grabber_area``. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -183,3 +42,4 @@ The background for the whole slider. Determines the width of the ``grabber_area` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_vsplitcontainer.rst b/classes/class_vsplitcontainer.rst index c68225bff7f..774a7c500aa 100644 --- a/classes/class_vsplitcontainer.rst +++ b/classes/class_vsplitcontainer.rst @@ -28,77 +28,6 @@ Tutorials - :doc:`Using Containers <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`autohide<class_VSplitContainer_theme_constant_autohide>` | ``1`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`minimum_grab_thickness<class_VSplitContainer_theme_constant_minimum_grab_thickness>` | ``6`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int<class_int>` | :ref:`separation<class_VSplitContainer_theme_constant_separation>` | ``12`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`grabber<class_VSplitContainer_theme_icon_grabber>` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSplitContainer_theme_constant_autohide: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **autohide** = ``1`` - -Boolean value. If 1 (``true``), the grabber will hide automatically when it isn't under the cursor. If 0 (``false``), it's always visible. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_constant_minimum_grab_thickness: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **minimum_grab_thickness** = ``6`` - -The minimum thickness of the area users can click on to grab the splitting line. If :ref:`separation<class_VSplitContainer_theme_constant_separation>` or :ref:`grabber<class_VSplitContainer_theme_icon_grabber>`'s thickness are too small, this ensure that the splitting line can still be dragged. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int<class_int>` **separation** = ``12`` - -The space between sides of the container. - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D<class_Texture2D>` **grabber** - -The icon used for the grabber drawn in the middle area. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` @@ -106,3 +35,4 @@ The icon used for the grabber drawn in the middle area. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_weakref.rst b/classes/class_weakref.rst index 4d59894aab7..3108846706f 100644 --- a/classes/class_weakref.rst +++ b/classes/class_weakref.rst @@ -29,9 +29,9 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------+ - | :ref:`Variant<class_Variant>` | :ref:`get_ref<class_WeakRef_method_get_ref>` **(** **)** |const| | - +-------------------------------+------------------------------------------------------------------+ + +-------------------------------+------------------------------------------------------------+ + | :ref:`Variant<class_Variant>` | :ref:`get_ref<class_WeakRef_method_get_ref>`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -46,7 +46,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant<class_Variant>` **get_ref** **(** **)** |const| +:ref:`Variant<class_Variant>` **get_ref**\ (\ ) |const| :ref:`🔗<class_WeakRef_method_get_ref>` Returns the :ref:`Object<class_Object>` this weakref is referring to. Returns ``null`` if that object no longer exists. @@ -57,3 +57,4 @@ Returns the :ref:`Object<class_Object>` this weakref is referring to. Returns `` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webrtcdatachannel.rst b/classes/class_webrtcdatachannel.rst index 6486ccf5b0d..0623a5e53e3 100644 --- a/classes/class_webrtcdatachannel.rst +++ b/classes/class_webrtcdatachannel.rst @@ -38,31 +38,31 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_WebRTCDataChannel_method_close>` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_buffered_amount<class_WebRTCDataChannel_method_get_buffered_amount>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_id<class_WebRTCDataChannel_method_get_id>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_label<class_WebRTCDataChannel_method_get_label>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_max_packet_life_time<class_WebRTCDataChannel_method_get_max_packet_life_time>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_max_retransmits<class_WebRTCDataChannel_method_get_max_retransmits>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_protocol<class_WebRTCDataChannel_method_get_protocol>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` | :ref:`get_ready_state<class_WebRTCDataChannel_method_get_ready_state>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_negotiated<class_WebRTCDataChannel_method_is_negotiated>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_ordered<class_WebRTCDataChannel_method_is_ordered>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_WebRTCDataChannel_method_poll>` **(** **)** | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`was_string_packet<class_WebRTCDataChannel_method_was_string_packet>` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_WebRTCDataChannel_method_close>`\ (\ ) | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_buffered_amount<class_WebRTCDataChannel_method_get_buffered_amount>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_id<class_WebRTCDataChannel_method_get_id>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_label<class_WebRTCDataChannel_method_get_label>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_max_packet_life_time<class_WebRTCDataChannel_method_get_max_packet_life_time>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_max_retransmits<class_WebRTCDataChannel_method_get_max_retransmits>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_protocol<class_WebRTCDataChannel_method_get_protocol>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` | :ref:`get_ready_state<class_WebRTCDataChannel_method_get_ready_state>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_negotiated<class_WebRTCDataChannel_method_is_negotiated>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_ordered<class_WebRTCDataChannel_method_is_ordered>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_WebRTCDataChannel_method_poll>`\ (\ ) | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`was_string_packet<class_WebRTCDataChannel_method_was_string_packet>`\ (\ ) |const| | + +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -77,7 +77,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **WriteMode**: +enum **WriteMode**: :ref:`🔗<enum_WebRTCDataChannel_WriteMode>` .. _class_WebRTCDataChannel_constant_WRITE_MODE_TEXT: @@ -103,7 +103,7 @@ Tells the channel to send data over this channel as binary. An external peer (no .. rst-class:: classref-enumeration -enum **ChannelState**: +enum **ChannelState**: :ref:`🔗<enum_WebRTCDataChannel_ChannelState>` .. _class_WebRTCDataChannel_constant_STATE_CONNECTING: @@ -150,12 +150,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **write_mode** = ``1`` +:ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **write_mode** = ``1`` :ref:`🔗<class_WebRTCDataChannel_property_write_mode>` .. rst-class:: classref-property-setget -- void **set_write_mode** **(** :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` value **)** -- :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **get_write_mode** **(** **)** +- |void| **set_write_mode**\ (\ value\: :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>`\ ) +- :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **get_write_mode**\ (\ ) The transfer mode to use when sending outgoing packet. Either text or binary. @@ -172,7 +172,7 @@ Method Descriptions .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_WebRTCDataChannel_method_close>` Closes this data channel, notifying the other peer. @@ -184,7 +184,7 @@ Closes this data channel, notifying the other peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_buffered_amount** **(** **)** |const| +:ref:`int<class_int>` **get_buffered_amount**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_buffered_amount>` Returns the number of bytes currently queued to be sent over this channel. @@ -196,7 +196,7 @@ Returns the number of bytes currently queued to be sent over this channel. .. rst-class:: classref-method -:ref:`int<class_int>` **get_id** **(** **)** |const| +:ref:`int<class_int>` **get_id**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_id>` Returns the ID assigned to this channel during creation (or auto-assigned during negotiation). @@ -210,7 +210,7 @@ If the channel is not negotiated out-of-band the ID will only be available after .. rst-class:: classref-method -:ref:`String<class_String>` **get_label** **(** **)** |const| +:ref:`String<class_String>` **get_label**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_label>` Returns the label assigned to this channel during creation. @@ -222,7 +222,7 @@ Returns the label assigned to this channel during creation. .. rst-class:: classref-method -:ref:`int<class_int>` **get_max_packet_life_time** **(** **)** |const| +:ref:`int<class_int>` **get_max_packet_life_time**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_max_packet_life_time>` Returns the ``maxPacketLifeTime`` value assigned to this channel during creation. @@ -236,7 +236,7 @@ Will be ``65535`` if not specified. .. rst-class:: classref-method -:ref:`int<class_int>` **get_max_retransmits** **(** **)** |const| +:ref:`int<class_int>` **get_max_retransmits**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_max_retransmits>` Returns the ``maxRetransmits`` value assigned to this channel during creation. @@ -250,7 +250,7 @@ Will be ``65535`` if not specified. .. rst-class:: classref-method -:ref:`String<class_String>` **get_protocol** **(** **)** |const| +:ref:`String<class_String>` **get_protocol**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_protocol>` Returns the sub-protocol assigned to this channel during creation. An empty string if not specified. @@ -262,7 +262,7 @@ Returns the sub-protocol assigned to this channel during creation. An empty stri .. rst-class:: classref-method -:ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` **get_ready_state** **(** **)** |const| +:ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` **get_ready_state**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_get_ready_state>` Returns the current state of this channel, see :ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>`. @@ -274,7 +274,7 @@ Returns the current state of this channel, see :ref:`ChannelState<enum_WebRTCDat .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_negotiated** **(** **)** |const| +:ref:`bool<class_bool>` **is_negotiated**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_is_negotiated>` Returns ``true`` if this channel was created with out-of-band configuration. @@ -286,7 +286,7 @@ Returns ``true`` if this channel was created with out-of-band configuration. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_ordered** **(** **)** |const| +:ref:`bool<class_bool>` **is_ordered**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_is_ordered>` Returns ``true`` if this channel was created with ordering enabled (default). @@ -298,7 +298,7 @@ Returns ``true`` if this channel was created with ordering enabled (default). .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_WebRTCDataChannel_method_poll>` Reserved, but not used for now. @@ -310,7 +310,7 @@ Reserved, but not used for now. .. rst-class:: classref-method -:ref:`bool<class_bool>` **was_string_packet** **(** **)** |const| +:ref:`bool<class_bool>` **was_string_packet**\ (\ ) |const| :ref:`🔗<class_WebRTCDataChannel_method_was_string_packet>` Returns ``true`` if the last received packet was transferred as text. See :ref:`write_mode<class_WebRTCDataChannel_property_write_mode>`. @@ -321,3 +321,4 @@ Returns ``true`` if the last received packet was transferred as text. See :ref:` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webrtcdatachannelextension.rst b/classes/class_webrtcdatachannelextension.rst index 8ac2aa8b967..fcca3ba51f4 100644 --- a/classes/class_webrtcdatachannelextension.rst +++ b/classes/class_webrtcdatachannelextension.rst @@ -24,43 +24,43 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close<class_WebRTCDataChannelExtension_method__close>` **(** **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_WebRTCDataChannelExtension_method__get_available_packet_count>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_buffered_amount<class_WebRTCDataChannelExtension_method__get_buffered_amount>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_id<class_WebRTCDataChannelExtension_method__get_id>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_label<class_WebRTCDataChannelExtension_method__get_label>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_max_packet_life_time<class_WebRTCDataChannelExtension_method__get_max_packet_life_time>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_WebRTCDataChannelExtension_method__get_max_packet_size>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`_get_max_retransmits<class_WebRTCDataChannelExtension_method__get_max_retransmits>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_WebRTCDataChannelExtension_method__get_packet>` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`_get_protocol<class_WebRTCDataChannelExtension_method__get_protocol>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` | :ref:`_get_ready_state<class_WebRTCDataChannelExtension_method__get_ready_state>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` | :ref:`_get_write_mode<class_WebRTCDataChannelExtension_method__get_write_mode>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_negotiated<class_WebRTCDataChannelExtension_method__is_negotiated>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_is_ordered<class_WebRTCDataChannelExtension_method__is_ordered>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_WebRTCDataChannelExtension_method__poll>` **(** **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_WebRTCDataChannelExtension_method__put_packet>` **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_write_mode<class_WebRTCDataChannelExtension_method__set_write_mode>` **(** :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` p_write_mode **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`_was_string_packet<class_WebRTCDataChannelExtension_method__was_string_packet>` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_close<class_WebRTCDataChannelExtension_private_method__close>`\ (\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_available_packet_count<class_WebRTCDataChannelExtension_private_method__get_available_packet_count>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_buffered_amount<class_WebRTCDataChannelExtension_private_method__get_buffered_amount>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_id<class_WebRTCDataChannelExtension_private_method__get_id>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_label<class_WebRTCDataChannelExtension_private_method__get_label>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_max_packet_life_time<class_WebRTCDataChannelExtension_private_method__get_max_packet_life_time>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_max_packet_size<class_WebRTCDataChannelExtension_private_method__get_max_packet_size>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`_get_max_retransmits<class_WebRTCDataChannelExtension_private_method__get_max_retransmits>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_get_packet<class_WebRTCDataChannelExtension_private_method__get_packet>`\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`_get_protocol<class_WebRTCDataChannelExtension_private_method__get_protocol>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` | :ref:`_get_ready_state<class_WebRTCDataChannelExtension_private_method__get_ready_state>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` | :ref:`_get_write_mode<class_WebRTCDataChannelExtension_private_method__get_write_mode>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_negotiated<class_WebRTCDataChannelExtension_private_method__is_negotiated>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_is_ordered<class_WebRTCDataChannelExtension_private_method__is_ordered>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_WebRTCDataChannelExtension_private_method__poll>`\ (\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_put_packet<class_WebRTCDataChannelExtension_private_method__put_packet>`\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_write_mode<class_WebRTCDataChannelExtension_private_method__set_write_mode>`\ (\ p_write_mode\: :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>`\ ) |virtual| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`_was_string_packet<class_WebRTCDataChannelExtension_private_method__was_string_packet>`\ (\ ) |virtual| |const| | + +----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -71,11 +71,11 @@ Methods Method Descriptions ------------------- -.. _class_WebRTCDataChannelExtension_method__close: +.. _class_WebRTCDataChannelExtension_private_method__close: .. rst-class:: classref-method -void **_close** **(** **)** |virtual| +|void| **_close**\ (\ ) |virtual| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__close>` .. container:: contribute @@ -85,11 +85,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_available_packet_count: +.. _class_WebRTCDataChannelExtension_private_method__get_available_packet_count: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_available_packet_count** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_available_packet_count**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_available_packet_count>` .. container:: contribute @@ -99,11 +99,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_buffered_amount: +.. _class_WebRTCDataChannelExtension_private_method__get_buffered_amount: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_buffered_amount** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_buffered_amount**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_buffered_amount>` .. container:: contribute @@ -113,11 +113,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_id: +.. _class_WebRTCDataChannelExtension_private_method__get_id: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_id** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_id**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_id>` .. container:: contribute @@ -127,11 +127,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_label: +.. _class_WebRTCDataChannelExtension_private_method__get_label: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_label** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_label**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_label>` .. container:: contribute @@ -141,11 +141,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_max_packet_life_time: +.. _class_WebRTCDataChannelExtension_private_method__get_max_packet_life_time: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_max_packet_life_time** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_max_packet_life_time**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_max_packet_life_time>` .. container:: contribute @@ -155,11 +155,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_max_packet_size: +.. _class_WebRTCDataChannelExtension_private_method__get_max_packet_size: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_max_packet_size** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_max_packet_size**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_max_packet_size>` .. container:: contribute @@ -169,11 +169,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_max_retransmits: +.. _class_WebRTCDataChannelExtension_private_method__get_max_retransmits: .. rst-class:: classref-method -:ref:`int<class_int>` **_get_max_retransmits** **(** **)** |virtual| |const| +:ref:`int<class_int>` **_get_max_retransmits**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_max_retransmits>` .. container:: contribute @@ -183,11 +183,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_packet: +.. _class_WebRTCDataChannelExtension_private_method__get_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_get_packet** **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_get_packet**\ (\ r_buffer\: ``const uint8_t **``, r_buffer_size\: ``int32_t*``\ ) |virtual| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_packet>` .. container:: contribute @@ -197,11 +197,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_protocol: +.. _class_WebRTCDataChannelExtension_private_method__get_protocol: .. rst-class:: classref-method -:ref:`String<class_String>` **_get_protocol** **(** **)** |virtual| |const| +:ref:`String<class_String>` **_get_protocol**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_protocol>` .. container:: contribute @@ -211,11 +211,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_ready_state: +.. _class_WebRTCDataChannelExtension_private_method__get_ready_state: .. rst-class:: classref-method -:ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` **_get_ready_state** **(** **)** |virtual| |const| +:ref:`ChannelState<enum_WebRTCDataChannel_ChannelState>` **_get_ready_state**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_ready_state>` .. container:: contribute @@ -225,11 +225,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__get_write_mode: +.. _class_WebRTCDataChannelExtension_private_method__get_write_mode: .. rst-class:: classref-method -:ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **_get_write_mode** **(** **)** |virtual| |const| +:ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` **_get_write_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__get_write_mode>` .. container:: contribute @@ -239,11 +239,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__is_negotiated: +.. _class_WebRTCDataChannelExtension_private_method__is_negotiated: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_negotiated** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_negotiated**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__is_negotiated>` .. container:: contribute @@ -253,11 +253,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__is_ordered: +.. _class_WebRTCDataChannelExtension_private_method__is_ordered: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_is_ordered** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_is_ordered**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__is_ordered>` .. container:: contribute @@ -267,11 +267,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__poll: +.. _class_WebRTCDataChannelExtension_private_method__poll: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_poll** **(** **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_poll**\ (\ ) |virtual| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__poll>` .. container:: contribute @@ -281,11 +281,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__put_packet: +.. _class_WebRTCDataChannelExtension_private_method__put_packet: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_put_packet** **(** const uint8_t* p_buffer, :ref:`int<class_int>` p_buffer_size **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_put_packet**\ (\ p_buffer\: ``const uint8_t*``, p_buffer_size\: :ref:`int<class_int>`\ ) |virtual| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__put_packet>` .. container:: contribute @@ -295,11 +295,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCDataChannelExtension_method__set_write_mode: +.. _class_WebRTCDataChannelExtension_private_method__set_write_mode: .. rst-class:: classref-method -void **_set_write_mode** **(** :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>` p_write_mode **)** |virtual| +|void| **_set_write_mode**\ (\ p_write_mode\: :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode>`\ ) |virtual| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__set_write_mode>` .. container:: contribute @@ -309,11 +309,11 @@ void **_set_write_mode** **(** :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode> ---- -.. _class_WebRTCDataChannelExtension_method__was_string_packet: +.. _class_WebRTCDataChannelExtension_private_method__was_string_packet: .. rst-class:: classref-method -:ref:`bool<class_bool>` **_was_string_packet** **(** **)** |virtual| |const| +:ref:`bool<class_bool>` **_was_string_packet**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCDataChannelExtension_private_method__was_string_packet>` .. container:: contribute @@ -326,3 +326,4 @@ void **_set_write_mode** **(** :ref:`WriteMode<enum_WebRTCDataChannel_WriteMode> .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webrtcmultiplayerpeer.rst b/classes/class_webrtcmultiplayerpeer.rst index 1dc714aaf60..73da750ea2e 100644 --- a/classes/class_webrtcmultiplayerpeer.rst +++ b/classes/class_webrtcmultiplayerpeer.rst @@ -35,23 +35,23 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_peer<class_WebRTCMultiplayerPeer_method_add_peer>` **(** :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>` peer, :ref:`int<class_int>` peer_id, :ref:`int<class_int>` unreliable_lifetime=1 **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_WebRTCMultiplayerPeer_method_create_client>` **(** :ref:`int<class_int>` peer_id, :ref:`Array<class_Array>` channels_config=[] **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_mesh<class_WebRTCMultiplayerPeer_method_create_mesh>` **(** :ref:`int<class_int>` peer_id, :ref:`Array<class_Array>` channels_config=[] **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_WebRTCMultiplayerPeer_method_create_server>` **(** :ref:`Array<class_Array>` channels_config=[] **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_peer<class_WebRTCMultiplayerPeer_method_get_peer>` **(** :ref:`int<class_int>` peer_id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary<class_Dictionary>` | :ref:`get_peers<class_WebRTCMultiplayerPeer_method_get_peers>` **(** **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_peer<class_WebRTCMultiplayerPeer_method_has_peer>` **(** :ref:`int<class_int>` peer_id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_peer<class_WebRTCMultiplayerPeer_method_remove_peer>` **(** :ref:`int<class_int>` peer_id **)** | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_peer<class_WebRTCMultiplayerPeer_method_add_peer>`\ (\ peer\: :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>`, peer_id\: :ref:`int<class_int>`, unreliable_lifetime\: :ref:`int<class_int>` = 1\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_WebRTCMultiplayerPeer_method_create_client>`\ (\ peer_id\: :ref:`int<class_int>`, channels_config\: :ref:`Array<class_Array>` = []\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_mesh<class_WebRTCMultiplayerPeer_method_create_mesh>`\ (\ peer_id\: :ref:`int<class_int>`, channels_config\: :ref:`Array<class_Array>` = []\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_WebRTCMultiplayerPeer_method_create_server>`\ (\ channels_config\: :ref:`Array<class_Array>` = []\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_peer<class_WebRTCMultiplayerPeer_method_get_peer>`\ (\ peer_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary<class_Dictionary>` | :ref:`get_peers<class_WebRTCMultiplayerPeer_method_get_peers>`\ (\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_peer<class_WebRTCMultiplayerPeer_method_has_peer>`\ (\ peer_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_peer<class_WebRTCMultiplayerPeer_method_remove_peer>`\ (\ peer_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -66,7 +66,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **add_peer** **(** :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>` peer, :ref:`int<class_int>` peer_id, :ref:`int<class_int>` unreliable_lifetime=1 **)** +:ref:`Error<enum_@GlobalScope_Error>` **add_peer**\ (\ peer\: :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>`, peer_id\: :ref:`int<class_int>`, unreliable_lifetime\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_add_peer>` Add a new peer to the mesh with the given ``peer_id``. The :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>` must be in state :ref:`WebRTCPeerConnection.STATE_NEW<class_WebRTCPeerConnection_constant_STATE_NEW>`. @@ -80,7 +80,7 @@ Three channels will be created for reliable, unreliable, and ordered transport. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_client** **(** :ref:`int<class_int>` peer_id, :ref:`Array<class_Array>` channels_config=[] **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_client**\ (\ peer_id\: :ref:`int<class_int>`, channels_config\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_create_client>` Initialize the multiplayer peer as a client with the given ``peer_id`` (must be between 2 and 2147483647). In this mode, you should only call :ref:`add_peer<class_WebRTCMultiplayerPeer_method_add_peer>` once and with ``peer_id`` of ``1``. This mode enables :ref:`MultiplayerPeer.is_server_relay_supported<class_MultiplayerPeer_method_is_server_relay_supported>`, allowing the upper :ref:`MultiplayerAPI<class_MultiplayerAPI>` layer to perform peer exchange and packet relaying. @@ -94,7 +94,7 @@ You can optionally specify a ``channels_config`` array of :ref:`TransferMode<enu .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_mesh** **(** :ref:`int<class_int>` peer_id, :ref:`Array<class_Array>` channels_config=[] **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_mesh**\ (\ peer_id\: :ref:`int<class_int>`, channels_config\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_create_mesh>` Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) with the given ``peer_id`` (must be between 1 and 2147483647). @@ -106,7 +106,7 @@ Initialize the multiplayer peer as a mesh (i.e. all peers connect to each other) .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_server** **(** :ref:`Array<class_Array>` channels_config=[] **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_server**\ (\ channels_config\: :ref:`Array<class_Array>` = []\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_create_server>` Initialize the multiplayer peer as a server (with unique ID of ``1``). This mode enables :ref:`MultiplayerPeer.is_server_relay_supported<class_MultiplayerPeer_method_is_server_relay_supported>`, allowing the upper :ref:`MultiplayerAPI<class_MultiplayerAPI>` layer to perform peer exchange and packet relaying. @@ -120,7 +120,7 @@ You can optionally specify a ``channels_config`` array of :ref:`TransferMode<enu .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_peer** **(** :ref:`int<class_int>` peer_id **)** +:ref:`Dictionary<class_Dictionary>` **get_peer**\ (\ peer_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_get_peer>` Returns a dictionary representation of the peer with given ``peer_id`` with three keys. ``"connection"`` containing the :ref:`WebRTCPeerConnection<class_WebRTCPeerConnection>` to this peer, ``"channels"`` an array of three :ref:`WebRTCDataChannel<class_WebRTCDataChannel>`, and ``"connected"`` a boolean representing if the peer connection is currently connected (all three channels are open). @@ -132,7 +132,7 @@ Returns a dictionary representation of the peer with given ``peer_id`` with thre .. rst-class:: classref-method -:ref:`Dictionary<class_Dictionary>` **get_peers** **(** **)** +:ref:`Dictionary<class_Dictionary>` **get_peers**\ (\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_get_peers>` Returns a dictionary which keys are the peer ids and values the peer representation as in :ref:`get_peer<class_WebRTCMultiplayerPeer_method_get_peer>`. @@ -144,7 +144,7 @@ Returns a dictionary which keys are the peer ids and values the peer representat .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_peer** **(** :ref:`int<class_int>` peer_id **)** +:ref:`bool<class_bool>` **has_peer**\ (\ peer_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_has_peer>` Returns ``true`` if the given ``peer_id`` is in the peers map (it might not be connected though). @@ -156,7 +156,7 @@ Returns ``true`` if the given ``peer_id`` is in the peers map (it might not be c .. rst-class:: classref-method -void **remove_peer** **(** :ref:`int<class_int>` peer_id **)** +|void| **remove_peer**\ (\ peer_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebRTCMultiplayerPeer_method_remove_peer>` Remove the peer with given ``peer_id`` from the mesh. If the peer was connected, and :ref:`MultiplayerPeer.peer_connected<class_MultiplayerPeer_signal_peer_connected>` was emitted for it, then :ref:`MultiplayerPeer.peer_disconnected<class_MultiplayerPeer_signal_peer_disconnected>` will be emitted. @@ -167,3 +167,4 @@ Remove the peer with given ``peer_id`` from the mesh. If the peer was connected, .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webrtcpeerconnection.rst b/classes/class_webrtcpeerconnection.rst index 310b3f82385..66914170673 100644 --- a/classes/class_webrtcpeerconnection.rst +++ b/classes/class_webrtcpeerconnection.rst @@ -23,7 +23,7 @@ Description A WebRTC connection between the local computer and a remote peer. Provides an interface to connect, maintain and monitor the connection. -Setting up a WebRTC connection between two peers from now on) may not seem a trivial task, but it can be broken down into 3 main steps: +Setting up a WebRTC connection between two peers may not seem a trivial task, but it can be broken down into 3 main steps: - The peer that wants to initiate the connection (``A`` from now on) creates an offer and send it to the other peer (``B`` from now on). @@ -41,31 +41,31 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_ice_candidate<class_WebRTCPeerConnection_method_add_ice_candidate>` **(** :ref:`String<class_String>` media, :ref:`int<class_int>` index, :ref:`String<class_String>` name **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_WebRTCPeerConnection_method_close>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` | :ref:`create_data_channel<class_WebRTCPeerConnection_method_create_data_channel>` **(** :ref:`String<class_String>` label, :ref:`Dictionary<class_Dictionary>` options={} **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_offer<class_WebRTCPeerConnection_method_create_offer>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` | :ref:`get_connection_state<class_WebRTCPeerConnection_method_get_connection_state>` **(** **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` | :ref:`get_gathering_state<class_WebRTCPeerConnection_method_get_gathering_state>` **(** **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` | :ref:`get_signaling_state<class_WebRTCPeerConnection_method_get_signaling_state>` **(** **)** |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`initialize<class_WebRTCPeerConnection_method_initialize>` **(** :ref:`Dictionary<class_Dictionary>` configuration={} **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_WebRTCPeerConnection_method_poll>` **(** **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_default_extension<class_WebRTCPeerConnection_method_set_default_extension>` **(** :ref:`StringName<class_StringName>` extension_class **)** |static| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_local_description<class_WebRTCPeerConnection_method_set_local_description>` **(** :ref:`String<class_String>` type, :ref:`String<class_String>` sdp **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_remote_description<class_WebRTCPeerConnection_method_set_remote_description>` **(** :ref:`String<class_String>` type, :ref:`String<class_String>` sdp **)** | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_ice_candidate<class_WebRTCPeerConnection_method_add_ice_candidate>`\ (\ media\: :ref:`String<class_String>`, index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_WebRTCPeerConnection_method_close>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` | :ref:`create_data_channel<class_WebRTCPeerConnection_method_create_data_channel>`\ (\ label\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_offer<class_WebRTCPeerConnection_method_create_offer>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` | :ref:`get_connection_state<class_WebRTCPeerConnection_method_get_connection_state>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` | :ref:`get_gathering_state<class_WebRTCPeerConnection_method_get_gathering_state>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` | :ref:`get_signaling_state<class_WebRTCPeerConnection_method_get_signaling_state>`\ (\ ) |const| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`initialize<class_WebRTCPeerConnection_method_initialize>`\ (\ configuration\: :ref:`Dictionary<class_Dictionary>` = {}\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_WebRTCPeerConnection_method_poll>`\ (\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_default_extension<class_WebRTCPeerConnection_method_set_default_extension>`\ (\ extension_class\: :ref:`StringName<class_StringName>`\ ) |static| | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_local_description<class_WebRTCPeerConnection_method_set_local_description>`\ (\ type\: :ref:`String<class_String>`, sdp\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`set_remote_description<class_WebRTCPeerConnection_method_set_remote_description>`\ (\ type\: :ref:`String<class_String>`, sdp\: :ref:`String<class_String>`\ ) | + +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,7 +80,7 @@ Signals .. rst-class:: classref-signal -**data_channel_received** **(** :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` channel **)** +**data_channel_received**\ (\ channel\: :ref:`WebRTCDataChannel<class_WebRTCDataChannel>`\ ) :ref:`🔗<class_WebRTCPeerConnection_signal_data_channel_received>` Emitted when a new in-band channel is received, i.e. when the channel was created with ``negotiated: false`` (default). @@ -94,7 +94,7 @@ The object will be an instance of :ref:`WebRTCDataChannel<class_WebRTCDataChanne .. rst-class:: classref-signal -**ice_candidate_created** **(** :ref:`String<class_String>` media, :ref:`int<class_int>` index, :ref:`String<class_String>` name **)** +**ice_candidate_created**\ (\ media\: :ref:`String<class_String>`, index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebRTCPeerConnection_signal_ice_candidate_created>` Emitted when a new ICE candidate has been created. The three parameters are meant to be passed to the remote peer over the signaling server. @@ -106,7 +106,7 @@ Emitted when a new ICE candidate has been created. The three parameters are mean .. rst-class:: classref-signal -**session_description_created** **(** :ref:`String<class_String>` type, :ref:`String<class_String>` sdp **)** +**session_description_created**\ (\ type\: :ref:`String<class_String>`, sdp\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebRTCPeerConnection_signal_session_description_created>` Emitted after a successful call to :ref:`create_offer<class_WebRTCPeerConnection_method_create_offer>` or :ref:`set_remote_description<class_WebRTCPeerConnection_method_set_remote_description>` (when it generates an answer). The parameters are meant to be passed to :ref:`set_local_description<class_WebRTCPeerConnection_method_set_local_description>` on this object, and sent to the remote peer over the signaling server. @@ -123,7 +123,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ConnectionState**: +enum **ConnectionState**: :ref:`🔗<enum_WebRTCPeerConnection_ConnectionState>` .. _class_WebRTCPeerConnection_constant_STATE_NEW: @@ -181,7 +181,7 @@ The peer connection is closed (after calling :ref:`close<class_WebRTCPeerConnect .. rst-class:: classref-enumeration -enum **GatheringState**: +enum **GatheringState**: :ref:`🔗<enum_WebRTCPeerConnection_GatheringState>` .. _class_WebRTCPeerConnection_constant_GATHERING_STATE_NEW: @@ -215,7 +215,7 @@ The ICE agent has finished gathering candidates. If something happens that requi .. rst-class:: classref-enumeration -enum **SignalingState**: +enum **SignalingState**: :ref:`🔗<enum_WebRTCPeerConnection_SignalingState>` .. _class_WebRTCPeerConnection_constant_SIGNALING_STATE_STABLE: @@ -278,7 +278,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **add_ice_candidate** **(** :ref:`String<class_String>` media, :ref:`int<class_int>` index, :ref:`String<class_String>` name **)** +:ref:`Error<enum_@GlobalScope_Error>` **add_ice_candidate**\ (\ media\: :ref:`String<class_String>`, index\: :ref:`int<class_int>`, name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebRTCPeerConnection_method_add_ice_candidate>` Add an ice candidate generated by a remote peer (and received over the signaling server). See :ref:`ice_candidate_created<class_WebRTCPeerConnection_signal_ice_candidate_created>`. @@ -290,7 +290,7 @@ Add an ice candidate generated by a remote peer (and received over the signaling .. rst-class:: classref-method -void **close** **(** **)** +|void| **close**\ (\ ) :ref:`🔗<class_WebRTCPeerConnection_method_close>` Close the peer connection and all data channels associated with it. @@ -304,7 +304,7 @@ Close the peer connection and all data channels associated with it. .. rst-class:: classref-method -:ref:`WebRTCDataChannel<class_WebRTCDataChannel>` **create_data_channel** **(** :ref:`String<class_String>` label, :ref:`Dictionary<class_Dictionary>` options={} **)** +:ref:`WebRTCDataChannel<class_WebRTCDataChannel>` **create_data_channel**\ (\ label\: :ref:`String<class_String>`, options\: :ref:`Dictionary<class_Dictionary>` = {}\ ) :ref:`🔗<class_WebRTCPeerConnection_method_create_data_channel>` Returns a new :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` (or ``null`` on failure) with given ``label`` and optionally configured via the ``options`` dictionary. This method can only be called when the connection is in state :ref:`STATE_NEW<class_WebRTCPeerConnection_constant_STATE_NEW>`. @@ -336,7 +336,7 @@ Valid ``options`` are: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_offer** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_offer**\ (\ ) :ref:`🔗<class_WebRTCPeerConnection_method_create_offer>` Creates a new SDP offer to start a WebRTC connection with a remote peer. At least one :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` must have been created before calling this method. @@ -350,7 +350,7 @@ If this functions returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` .. rst-class:: classref-method -:ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` **get_connection_state** **(** **)** |const| +:ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` **get_connection_state**\ (\ ) |const| :ref:`🔗<class_WebRTCPeerConnection_method_get_connection_state>` Returns the connection state. See :ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>`. @@ -362,7 +362,7 @@ Returns the connection state. See :ref:`ConnectionState<enum_WebRTCPeerConnectio .. rst-class:: classref-method -:ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` **get_gathering_state** **(** **)** |const| +:ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` **get_gathering_state**\ (\ ) |const| :ref:`🔗<class_WebRTCPeerConnection_method_get_gathering_state>` Returns the ICE :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` of the connection. This lets you detect, for example, when collection of ICE candidates has finished. @@ -374,9 +374,9 @@ Returns the ICE :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` .. rst-class:: classref-method -:ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` **get_signaling_state** **(** **)** |const| +:ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` **get_signaling_state**\ (\ ) |const| :ref:`🔗<class_WebRTCPeerConnection_method_get_signaling_state>` -Returns the :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` on the local end of the connection while connecting or reconnecting to another peer. +Returns the signaling state on the local end of the connection while connecting or reconnecting to another peer. .. rst-class:: classref-item-separator @@ -386,7 +386,7 @@ Returns the :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` on t .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **initialize** **(** :ref:`Dictionary<class_Dictionary>` configuration={} **)** +:ref:`Error<enum_@GlobalScope_Error>` **initialize**\ (\ configuration\: :ref:`Dictionary<class_Dictionary>` = {}\ ) :ref:`🔗<class_WebRTCPeerConnection_method_initialize>` Re-initialize this peer connection, closing any previously active connection, and going back to state :ref:`STATE_NEW<class_WebRTCPeerConnection_constant_STATE_NEW>`. A dictionary of ``configuration`` options can be passed to configure the peer connection. @@ -415,9 +415,9 @@ Valid ``configuration`` options are: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)** +:ref:`Error<enum_@GlobalScope_Error>` **poll**\ (\ ) :ref:`🔗<class_WebRTCPeerConnection_method_poll>` -Call this method frequently (e.g. in :ref:`Node._process<class_Node_method__process>` or :ref:`Node._physics_process<class_Node_method__physics_process>`) to properly receive signals. +Call this method frequently (e.g. in :ref:`Node._process<class_Node_private_method__process>` or :ref:`Node._physics_process<class_Node_private_method__physics_process>`) to properly receive signals. .. rst-class:: classref-item-separator @@ -427,7 +427,7 @@ Call this method frequently (e.g. in :ref:`Node._process<class_Node_method__proc .. rst-class:: classref-method -void **set_default_extension** **(** :ref:`StringName<class_StringName>` extension_class **)** |static| +|void| **set_default_extension**\ (\ extension_class\: :ref:`StringName<class_StringName>`\ ) |static| :ref:`🔗<class_WebRTCPeerConnection_method_set_default_extension>` Sets the ``extension_class`` as the default :ref:`WebRTCPeerConnectionExtension<class_WebRTCPeerConnectionExtension>` returned when creating a new **WebRTCPeerConnection**. @@ -439,7 +439,7 @@ Sets the ``extension_class`` as the default :ref:`WebRTCPeerConnectionExtension< .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **set_local_description** **(** :ref:`String<class_String>` type, :ref:`String<class_String>` sdp **)** +:ref:`Error<enum_@GlobalScope_Error>` **set_local_description**\ (\ type\: :ref:`String<class_String>`, sdp\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebRTCPeerConnection_method_set_local_description>` Sets the SDP description of the local peer. This should be called in response to :ref:`session_description_created<class_WebRTCPeerConnection_signal_session_description_created>`. @@ -453,7 +453,7 @@ After calling this function the peer will start emitting :ref:`ice_candidate_cre .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **set_remote_description** **(** :ref:`String<class_String>` type, :ref:`String<class_String>` sdp **)** +:ref:`Error<enum_@GlobalScope_Error>` **set_remote_description**\ (\ type\: :ref:`String<class_String>`, sdp\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebRTCPeerConnection_method_set_remote_description>` Sets the SDP description of the remote peer. This should be called with the values generated by a remote peer and received over the signaling server. @@ -468,3 +468,4 @@ If ``type`` is ``"answer"`` the peer will start emitting :ref:`ice_candidate_cre .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webrtcpeerconnectionextension.rst b/classes/class_webrtcpeerconnectionextension.rst index 4f40090e223..1328db08825 100644 --- a/classes/class_webrtcpeerconnectionextension.rst +++ b/classes/class_webrtcpeerconnectionextension.rst @@ -24,29 +24,29 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_add_ice_candidate<class_WebRTCPeerConnectionExtension_method__add_ice_candidate>` **(** :ref:`String<class_String>` p_sdp_mid_name, :ref:`int<class_int>` p_sdp_mline_index, :ref:`String<class_String>` p_sdp_name **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close<class_WebRTCPeerConnectionExtension_method__close>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` | :ref:`_create_data_channel<class_WebRTCPeerConnectionExtension_method__create_data_channel>` **(** :ref:`String<class_String>` p_label, :ref:`Dictionary<class_Dictionary>` p_config **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_create_offer<class_WebRTCPeerConnectionExtension_method__create_offer>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` | :ref:`_get_connection_state<class_WebRTCPeerConnectionExtension_method__get_connection_state>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` | :ref:`_get_gathering_state<class_WebRTCPeerConnectionExtension_method__get_gathering_state>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` | :ref:`_get_signaling_state<class_WebRTCPeerConnectionExtension_method__get_signaling_state>` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_initialize<class_WebRTCPeerConnectionExtension_method__initialize>` **(** :ref:`Dictionary<class_Dictionary>` p_config **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_WebRTCPeerConnectionExtension_method__poll>` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_local_description<class_WebRTCPeerConnectionExtension_method__set_local_description>` **(** :ref:`String<class_String>` p_type, :ref:`String<class_String>` p_sdp **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_remote_description<class_WebRTCPeerConnectionExtension_method__set_remote_description>` **(** :ref:`String<class_String>` p_type, :ref:`String<class_String>` p_sdp **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_add_ice_candidate<class_WebRTCPeerConnectionExtension_private_method__add_ice_candidate>`\ (\ p_sdp_mid_name\: :ref:`String<class_String>`, p_sdp_mline_index\: :ref:`int<class_int>`, p_sdp_name\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_close<class_WebRTCPeerConnectionExtension_private_method__close>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebRTCDataChannel<class_WebRTCDataChannel>` | :ref:`_create_data_channel<class_WebRTCPeerConnectionExtension_private_method__create_data_channel>`\ (\ p_label\: :ref:`String<class_String>`, p_config\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_create_offer<class_WebRTCPeerConnectionExtension_private_method__create_offer>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` | :ref:`_get_connection_state<class_WebRTCPeerConnectionExtension_private_method__get_connection_state>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` | :ref:`_get_gathering_state<class_WebRTCPeerConnectionExtension_private_method__get_gathering_state>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` | :ref:`_get_signaling_state<class_WebRTCPeerConnectionExtension_private_method__get_signaling_state>`\ (\ ) |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_initialize<class_WebRTCPeerConnectionExtension_private_method__initialize>`\ (\ p_config\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_poll<class_WebRTCPeerConnectionExtension_private_method__poll>`\ (\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_local_description<class_WebRTCPeerConnectionExtension_private_method__set_local_description>`\ (\ p_type\: :ref:`String<class_String>`, p_sdp\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`_set_remote_description<class_WebRTCPeerConnectionExtension_private_method__set_remote_description>`\ (\ p_type\: :ref:`String<class_String>`, p_sdp\: :ref:`String<class_String>`\ ) |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -57,11 +57,11 @@ Methods Method Descriptions ------------------- -.. _class_WebRTCPeerConnectionExtension_method__add_ice_candidate: +.. _class_WebRTCPeerConnectionExtension_private_method__add_ice_candidate: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_add_ice_candidate** **(** :ref:`String<class_String>` p_sdp_mid_name, :ref:`int<class_int>` p_sdp_mline_index, :ref:`String<class_String>` p_sdp_name **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_add_ice_candidate**\ (\ p_sdp_mid_name\: :ref:`String<class_String>`, p_sdp_mline_index\: :ref:`int<class_int>`, p_sdp_name\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__add_ice_candidate>` .. container:: contribute @@ -71,11 +71,11 @@ Method Descriptions ---- -.. _class_WebRTCPeerConnectionExtension_method__close: +.. _class_WebRTCPeerConnectionExtension_private_method__close: .. rst-class:: classref-method -void **_close** **(** **)** |virtual| +|void| **_close**\ (\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__close>` .. container:: contribute @@ -85,11 +85,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__create_data_channel: +.. _class_WebRTCPeerConnectionExtension_private_method__create_data_channel: .. rst-class:: classref-method -:ref:`WebRTCDataChannel<class_WebRTCDataChannel>` **_create_data_channel** **(** :ref:`String<class_String>` p_label, :ref:`Dictionary<class_Dictionary>` p_config **)** |virtual| +:ref:`WebRTCDataChannel<class_WebRTCDataChannel>` **_create_data_channel**\ (\ p_label\: :ref:`String<class_String>`, p_config\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__create_data_channel>` .. container:: contribute @@ -99,11 +99,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__create_offer: +.. _class_WebRTCPeerConnectionExtension_private_method__create_offer: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_create_offer** **(** **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_create_offer**\ (\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__create_offer>` .. container:: contribute @@ -113,11 +113,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__get_connection_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_connection_state: .. rst-class:: classref-method -:ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` **_get_connection_state** **(** **)** |virtual| |const| +:ref:`ConnectionState<enum_WebRTCPeerConnection_ConnectionState>` **_get_connection_state**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__get_connection_state>` .. container:: contribute @@ -127,11 +127,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__get_gathering_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_gathering_state: .. rst-class:: classref-method -:ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` **_get_gathering_state** **(** **)** |virtual| |const| +:ref:`GatheringState<enum_WebRTCPeerConnection_GatheringState>` **_get_gathering_state**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__get_gathering_state>` .. container:: contribute @@ -141,11 +141,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__get_signaling_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_signaling_state: .. rst-class:: classref-method -:ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` **_get_signaling_state** **(** **)** |virtual| |const| +:ref:`SignalingState<enum_WebRTCPeerConnection_SignalingState>` **_get_signaling_state**\ (\ ) |virtual| |const| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__get_signaling_state>` .. container:: contribute @@ -155,11 +155,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__initialize: +.. _class_WebRTCPeerConnectionExtension_private_method__initialize: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_initialize** **(** :ref:`Dictionary<class_Dictionary>` p_config **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_initialize**\ (\ p_config\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__initialize>` .. container:: contribute @@ -169,11 +169,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__poll: +.. _class_WebRTCPeerConnectionExtension_private_method__poll: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_poll** **(** **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_poll**\ (\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__poll>` .. container:: contribute @@ -183,11 +183,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__set_local_description: +.. _class_WebRTCPeerConnectionExtension_private_method__set_local_description: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_set_local_description** **(** :ref:`String<class_String>` p_type, :ref:`String<class_String>` p_sdp **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_set_local_description**\ (\ p_type\: :ref:`String<class_String>`, p_sdp\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__set_local_description>` .. container:: contribute @@ -197,11 +197,11 @@ void **_close** **(** **)** |virtual| ---- -.. _class_WebRTCPeerConnectionExtension_method__set_remote_description: +.. _class_WebRTCPeerConnectionExtension_private_method__set_remote_description: .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **_set_remote_description** **(** :ref:`String<class_String>` p_type, :ref:`String<class_String>` p_sdp **)** |virtual| +:ref:`Error<enum_@GlobalScope_Error>` **_set_remote_description**\ (\ p_type\: :ref:`String<class_String>`, p_sdp\: :ref:`String<class_String>`\ ) |virtual| :ref:`🔗<class_WebRTCPeerConnectionExtension_private_method__set_remote_description>` .. container:: contribute @@ -214,3 +214,4 @@ void **_close** **(** **)** |virtual| .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_websocketmultiplayerpeer.rst b/classes/class_websocketmultiplayerpeer.rst index 2ec1fa173b2..468205a0072 100644 --- a/classes/class_websocketmultiplayerpeer.rst +++ b/classes/class_websocketmultiplayerpeer.rst @@ -53,17 +53,17 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_WebSocketMultiplayerPeer_method_create_client>` **(** :ref:`String<class_String>` url, :ref:`TLSOptions<class_TLSOptions>` tls_client_options=null **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_WebSocketMultiplayerPeer_method_create_server>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*", :ref:`TLSOptions<class_TLSOptions>` tls_server_options=null **)** | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WebSocketPeer<class_WebSocketPeer>` | :ref:`get_peer<class_WebSocketMultiplayerPeer_method_get_peer>` **(** :ref:`int<class_int>` peer_id **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_peer_address<class_WebSocketMultiplayerPeer_method_get_peer_address>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_peer_port<class_WebSocketMultiplayerPeer_method_get_peer_port>` **(** :ref:`int<class_int>` id **)** |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_client<class_WebSocketMultiplayerPeer_method_create_client>`\ (\ url\: :ref:`String<class_String>`, tls_client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_server<class_WebSocketMultiplayerPeer_method_create_server>`\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*", tls_server_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebSocketPeer<class_WebSocketPeer>` | :ref:`get_peer<class_WebSocketMultiplayerPeer_method_get_peer>`\ (\ peer_id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_peer_address<class_WebSocketMultiplayerPeer_method_get_peer_address>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_peer_port<class_WebSocketMultiplayerPeer_method_get_peer_port>`\ (\ id\: :ref:`int<class_int>`\ ) |const| | + +-------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -78,15 +78,17 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **handshake_headers** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **handshake_headers** = ``PackedStringArray()`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_handshake_headers>` .. rst-class:: classref-property-setget -- void **set_handshake_headers** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_handshake_headers** **(** **)** +- |void| **set_handshake_headers**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_handshake_headers**\ (\ ) The extra headers to use during handshake. See :ref:`WebSocketPeer.handshake_headers<class_WebSocketPeer_property_handshake_headers>` for more details. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -95,12 +97,12 @@ The extra headers to use during handshake. See :ref:`WebSocketPeer.handshake_hea .. rst-class:: classref-property -:ref:`float<class_float>` **handshake_timeout** = ``3.0`` +:ref:`float<class_float>` **handshake_timeout** = ``3.0`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_handshake_timeout>` .. rst-class:: classref-property-setget -- void **set_handshake_timeout** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_handshake_timeout** **(** **)** +- |void| **set_handshake_timeout**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_handshake_timeout**\ (\ ) The maximum time each peer can stay in a connecting state before being dropped. @@ -112,12 +114,12 @@ The maximum time each peer can stay in a connecting state before being dropped. .. rst-class:: classref-property -:ref:`int<class_int>` **inbound_buffer_size** = ``65535`` +:ref:`int<class_int>` **inbound_buffer_size** = ``65535`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_inbound_buffer_size>` .. rst-class:: classref-property-setget -- void **set_inbound_buffer_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_inbound_buffer_size** **(** **)** +- |void| **set_inbound_buffer_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_inbound_buffer_size**\ (\ ) The inbound buffer size for connected peers. See :ref:`WebSocketPeer.inbound_buffer_size<class_WebSocketPeer_property_inbound_buffer_size>` for more details. @@ -129,12 +131,12 @@ The inbound buffer size for connected peers. See :ref:`WebSocketPeer.inbound_buf .. rst-class:: classref-property -:ref:`int<class_int>` **max_queued_packets** = ``2048`` +:ref:`int<class_int>` **max_queued_packets** = ``2048`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_max_queued_packets>` .. rst-class:: classref-property-setget -- void **set_max_queued_packets** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_queued_packets** **(** **)** +- |void| **set_max_queued_packets**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_queued_packets**\ (\ ) The maximum number of queued packets for connected peers. See :ref:`WebSocketPeer.max_queued_packets<class_WebSocketPeer_property_max_queued_packets>` for more details. @@ -146,12 +148,12 @@ The maximum number of queued packets for connected peers. See :ref:`WebSocketPee .. rst-class:: classref-property -:ref:`int<class_int>` **outbound_buffer_size** = ``65535`` +:ref:`int<class_int>` **outbound_buffer_size** = ``65535`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_outbound_buffer_size>` .. rst-class:: classref-property-setget -- void **set_outbound_buffer_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_outbound_buffer_size** **(** **)** +- |void| **set_outbound_buffer_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_outbound_buffer_size**\ (\ ) The outbound buffer size for connected peers. See :ref:`WebSocketPeer.outbound_buffer_size<class_WebSocketPeer_property_outbound_buffer_size>` for more details. @@ -163,15 +165,17 @@ The outbound buffer size for connected peers. See :ref:`WebSocketPeer.outbound_b .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **supported_protocols** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **supported_protocols** = ``PackedStringArray()`` :ref:`🔗<class_WebSocketMultiplayerPeer_property_supported_protocols>` .. rst-class:: classref-property-setget -- void **set_supported_protocols** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_supported_protocols** **(** **)** +- |void| **set_supported_protocols**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_supported_protocols**\ (\ ) The supported WebSocket sub-protocols. See :ref:`WebSocketPeer.supported_protocols<class_WebSocketPeer_property_supported_protocols>` for more details. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-section-separator ---- @@ -185,7 +189,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_client** **(** :ref:`String<class_String>` url, :ref:`TLSOptions<class_TLSOptions>` tls_client_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_client**\ (\ url\: :ref:`String<class_String>`, tls_client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_WebSocketMultiplayerPeer_method_create_client>` Starts a new multiplayer client connecting to the given ``url``. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client<class_TLSOptions_method_client>` and :ref:`TLSOptions.client_unsafe<class_TLSOptions_method_client_unsafe>`. @@ -199,7 +203,7 @@ Starts a new multiplayer client connecting to the given ``url``. TLS certificate .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **create_server** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*", :ref:`TLSOptions<class_TLSOptions>` tls_server_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **create_server**\ (\ port\: :ref:`int<class_int>`, bind_address\: :ref:`String<class_String>` = "*", tls_server_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_WebSocketMultiplayerPeer_method_create_server>` Starts a new multiplayer server listening on the given ``port``. You can optionally specify a ``bind_address``, and provide valid ``tls_server_options`` to use TLS. See :ref:`TLSOptions.server<class_TLSOptions_method_server>`. @@ -211,7 +215,7 @@ Starts a new multiplayer server listening on the given ``port``. You can optiona .. rst-class:: classref-method -:ref:`WebSocketPeer<class_WebSocketPeer>` **get_peer** **(** :ref:`int<class_int>` peer_id **)** |const| +:ref:`WebSocketPeer<class_WebSocketPeer>` **get_peer**\ (\ peer_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebSocketMultiplayerPeer_method_get_peer>` Returns the :ref:`WebSocketPeer<class_WebSocketPeer>` associated to the given ``peer_id``. @@ -223,7 +227,7 @@ Returns the :ref:`WebSocketPeer<class_WebSocketPeer>` associated to the given `` .. rst-class:: classref-method -:ref:`String<class_String>` **get_peer_address** **(** :ref:`int<class_int>` id **)** |const| +:ref:`String<class_String>` **get_peer_address**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebSocketMultiplayerPeer_method_get_peer_address>` Returns the IP address of the given peer. @@ -235,7 +239,7 @@ Returns the IP address of the given peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_peer_port** **(** :ref:`int<class_int>` id **)** |const| +:ref:`int<class_int>` **get_peer_port**\ (\ id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebSocketMultiplayerPeer_method_get_peer_port>` Returns the remote port of the given peer. @@ -246,3 +250,4 @@ Returns the remote port of the given peer. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_websocketpeer.rst b/classes/class_websocketpeer.rst index 1cc7542a615..c7d7d73de46 100644 --- a/classes/class_websocketpeer.rst +++ b/classes/class_websocketpeer.rst @@ -84,39 +84,39 @@ Methods .. table:: :widths: auto - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`accept_stream<class_WebSocketPeer_method_accept_stream>` **(** :ref:`StreamPeer<class_StreamPeer>` stream **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close<class_WebSocketPeer_method_close>` **(** :ref:`int<class_int>` code=1000, :ref:`String<class_String>` reason="" **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_url<class_WebSocketPeer_method_connect_to_url>` **(** :ref:`String<class_String>` url, :ref:`TLSOptions<class_TLSOptions>` tls_client_options=null **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_close_code<class_WebSocketPeer_method_get_close_code>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_close_reason<class_WebSocketPeer_method_get_close_reason>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_connected_host<class_WebSocketPeer_method_get_connected_host>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_connected_port<class_WebSocketPeer_method_get_connected_port>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_current_outbound_buffered_amount<class_WebSocketPeer_method_get_current_outbound_buffered_amount>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`State<enum_WebSocketPeer_State>` | :ref:`get_ready_state<class_WebSocketPeer_method_get_ready_state>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_requested_url<class_WebSocketPeer_method_get_requested_url>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_selected_protocol<class_WebSocketPeer_method_get_selected_protocol>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`poll<class_WebSocketPeer_method_poll>` **(** **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send<class_WebSocketPeer_method_send>` **(** :ref:`PackedByteArray<class_PackedByteArray>` message, :ref:`WriteMode<enum_WebSocketPeer_WriteMode>` write_mode=1 **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_text<class_WebSocketPeer_method_send_text>` **(** :ref:`String<class_String>` message **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_no_delay<class_WebSocketPeer_method_set_no_delay>` **(** :ref:`bool<class_bool>` enabled **)** | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`was_string_packet<class_WebSocketPeer_method_was_string_packet>` **(** **)** |const| | - +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`accept_stream<class_WebSocketPeer_method_accept_stream>`\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`close<class_WebSocketPeer_method_close>`\ (\ code\: :ref:`int<class_int>` = 1000, reason\: :ref:`String<class_String>` = ""\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_to_url<class_WebSocketPeer_method_connect_to_url>`\ (\ url\: :ref:`String<class_String>`, tls_client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_close_code<class_WebSocketPeer_method_get_close_code>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_close_reason<class_WebSocketPeer_method_get_close_reason>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_connected_host<class_WebSocketPeer_method_get_connected_host>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_connected_port<class_WebSocketPeer_method_get_connected_port>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_current_outbound_buffered_amount<class_WebSocketPeer_method_get_current_outbound_buffered_amount>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`State<enum_WebSocketPeer_State>` | :ref:`get_ready_state<class_WebSocketPeer_method_get_ready_state>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_requested_url<class_WebSocketPeer_method_get_requested_url>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_selected_protocol<class_WebSocketPeer_method_get_selected_protocol>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`poll<class_WebSocketPeer_method_poll>`\ (\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send<class_WebSocketPeer_method_send>`\ (\ message\: :ref:`PackedByteArray<class_PackedByteArray>`, write_mode\: :ref:`WriteMode<enum_WebSocketPeer_WriteMode>` = 1\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`send_text<class_WebSocketPeer_method_send_text>`\ (\ message\: :ref:`String<class_String>`\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_no_delay<class_WebSocketPeer_method_set_no_delay>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`was_string_packet<class_WebSocketPeer_method_was_string_packet>`\ (\ ) |const| | + +----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,7 +131,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **WriteMode**: +enum **WriteMode**: :ref:`🔗<enum_WebSocketPeer_WriteMode>` .. _class_WebSocketPeer_constant_WRITE_MODE_TEXT: @@ -157,7 +157,7 @@ Specifies that WebSockets messages should be transferred as binary payload (any .. rst-class:: classref-enumeration -enum **State**: +enum **State**: :ref:`🔗<enum_WebSocketPeer_State>` .. _class_WebSocketPeer_constant_STATE_CONNECTING: @@ -204,17 +204,19 @@ Property Descriptions .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **handshake_headers** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **handshake_headers** = ``PackedStringArray()`` :ref:`🔗<class_WebSocketPeer_property_handshake_headers>` .. rst-class:: classref-property-setget -- void **set_handshake_headers** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_handshake_headers** **(** **)** +- |void| **set_handshake_headers**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_handshake_headers**\ (\ ) The extra HTTP headers to be sent during the WebSocket handshake. \ **Note:** Not supported in Web exports due to browsers' restrictions. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-item-separator ---- @@ -223,12 +225,12 @@ The extra HTTP headers to be sent during the WebSocket handshake. .. rst-class:: classref-property -:ref:`int<class_int>` **inbound_buffer_size** = ``65535`` +:ref:`int<class_int>` **inbound_buffer_size** = ``65535`` :ref:`🔗<class_WebSocketPeer_property_inbound_buffer_size>` .. rst-class:: classref-property-setget -- void **set_inbound_buffer_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_inbound_buffer_size** **(** **)** +- |void| **set_inbound_buffer_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_inbound_buffer_size**\ (\ ) The size of the input buffer in bytes (roughly the maximum amount of memory that will be allocated for the inbound packets). @@ -240,12 +242,12 @@ The size of the input buffer in bytes (roughly the maximum amount of memory that .. rst-class:: classref-property -:ref:`int<class_int>` **max_queued_packets** = ``2048`` +:ref:`int<class_int>` **max_queued_packets** = ``2048`` :ref:`🔗<class_WebSocketPeer_property_max_queued_packets>` .. rst-class:: classref-property-setget -- void **set_max_queued_packets** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_max_queued_packets** **(** **)** +- |void| **set_max_queued_packets**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_max_queued_packets**\ (\ ) The maximum amount of packets that will be allowed in the queues (both inbound and outbound). @@ -257,12 +259,12 @@ The maximum amount of packets that will be allowed in the queues (both inbound a .. rst-class:: classref-property -:ref:`int<class_int>` **outbound_buffer_size** = ``65535`` +:ref:`int<class_int>` **outbound_buffer_size** = ``65535`` :ref:`🔗<class_WebSocketPeer_property_outbound_buffer_size>` .. rst-class:: classref-property-setget -- void **set_outbound_buffer_size** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_outbound_buffer_size** **(** **)** +- |void| **set_outbound_buffer_size**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_outbound_buffer_size**\ (\ ) The size of the input buffer in bytes (roughly the maximum amount of memory that will be allocated for the outbound packets). @@ -274,15 +276,17 @@ The size of the input buffer in bytes (roughly the maximum amount of memory that .. rst-class:: classref-property -:ref:`PackedStringArray<class_PackedStringArray>` **supported_protocols** = ``PackedStringArray()`` +:ref:`PackedStringArray<class_PackedStringArray>` **supported_protocols** = ``PackedStringArray()`` :ref:`🔗<class_WebSocketPeer_property_supported_protocols>` .. rst-class:: classref-property-setget -- void **set_supported_protocols** **(** :ref:`PackedStringArray<class_PackedStringArray>` value **)** -- :ref:`PackedStringArray<class_PackedStringArray>` **get_supported_protocols** **(** **)** +- |void| **set_supported_protocols**\ (\ value\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) +- :ref:`PackedStringArray<class_PackedStringArray>` **get_supported_protocols**\ (\ ) The WebSocket sub-protocols allowed during the WebSocket handshake. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray<class_PackedStringArray>` for more details. + .. rst-class:: classref-section-separator ---- @@ -296,7 +300,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **accept_stream** **(** :ref:`StreamPeer<class_StreamPeer>` stream **)** +:ref:`Error<enum_@GlobalScope_Error>` **accept_stream**\ (\ stream\: :ref:`StreamPeer<class_StreamPeer>`\ ) :ref:`🔗<class_WebSocketPeer_method_accept_stream>` Accepts a peer connection performing the HTTP handshake as a WebSocket server. The ``stream`` must be a valid TCP stream retrieved via :ref:`TCPServer.take_connection<class_TCPServer_method_take_connection>`, or a TLS stream accepted via :ref:`StreamPeerTLS.accept_stream<class_StreamPeerTLS_method_accept_stream>`. @@ -310,7 +314,7 @@ Accepts a peer connection performing the HTTP handshake as a WebSocket server. T .. rst-class:: classref-method -void **close** **(** :ref:`int<class_int>` code=1000, :ref:`String<class_String>` reason="" **)** +|void| **close**\ (\ code\: :ref:`int<class_int>` = 1000, reason\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_WebSocketPeer_method_close>` Closes this WebSocket connection. ``code`` is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). ``reason`` is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes). If ``code`` is negative, the connection will be closed immediately without notifying the remote peer. @@ -326,7 +330,7 @@ Closes this WebSocket connection. ``code`` is the status code for the closure (s .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **connect_to_url** **(** :ref:`String<class_String>` url, :ref:`TLSOptions<class_TLSOptions>` tls_client_options=null **)** +:ref:`Error<enum_@GlobalScope_Error>` **connect_to_url**\ (\ url\: :ref:`String<class_String>`, tls_client_options\: :ref:`TLSOptions<class_TLSOptions>` = null\ ) :ref:`🔗<class_WebSocketPeer_method_connect_to_url>` Connects to the given URL. TLS certificates will be verified against the hostname when connecting using the ``wss://`` protocol. You can pass the optional ``tls_client_options`` parameter to customize the trusted certification authorities, or disable the common name verification. See :ref:`TLSOptions.client<class_TLSOptions_method_client>` and :ref:`TLSOptions.client_unsafe<class_TLSOptions_method_client_unsafe>`. @@ -340,7 +344,7 @@ Connects to the given URL. TLS certificates will be verified against the hostnam .. rst-class:: classref-method -:ref:`int<class_int>` **get_close_code** **(** **)** |const| +:ref:`int<class_int>` **get_close_code**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_close_code>` Returns the received WebSocket close frame status code, or ``-1`` when the connection was not cleanly closed. Only call this method when :ref:`get_ready_state<class_WebSocketPeer_method_get_ready_state>` returns :ref:`STATE_CLOSED<class_WebSocketPeer_constant_STATE_CLOSED>`. @@ -352,7 +356,7 @@ Returns the received WebSocket close frame status code, or ``-1`` when the conne .. rst-class:: classref-method -:ref:`String<class_String>` **get_close_reason** **(** **)** |const| +:ref:`String<class_String>` **get_close_reason**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_close_reason>` Returns the received WebSocket close frame status reason string. Only call this method when :ref:`get_ready_state<class_WebSocketPeer_method_get_ready_state>` returns :ref:`STATE_CLOSED<class_WebSocketPeer_constant_STATE_CLOSED>`. @@ -364,7 +368,7 @@ Returns the received WebSocket close frame status reason string. Only call this .. rst-class:: classref-method -:ref:`String<class_String>` **get_connected_host** **(** **)** |const| +:ref:`String<class_String>` **get_connected_host**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_connected_host>` Returns the IP address of the connected peer. @@ -378,7 +382,7 @@ Returns the IP address of the connected peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_connected_port** **(** **)** |const| +:ref:`int<class_int>` **get_connected_port**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_connected_port>` Returns the remote port of the connected peer. @@ -392,7 +396,7 @@ Returns the remote port of the connected peer. .. rst-class:: classref-method -:ref:`int<class_int>` **get_current_outbound_buffered_amount** **(** **)** |const| +:ref:`int<class_int>` **get_current_outbound_buffered_amount**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_current_outbound_buffered_amount>` Returns the current amount of data in the outbound websocket buffer. **Note:** Web exports use WebSocket.bufferedAmount, while other platforms use an internal buffer. @@ -404,7 +408,7 @@ Returns the current amount of data in the outbound websocket buffer. **Note:** W .. rst-class:: classref-method -:ref:`State<enum_WebSocketPeer_State>` **get_ready_state** **(** **)** |const| +:ref:`State<enum_WebSocketPeer_State>` **get_ready_state**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_ready_state>` Returns the ready state of the connection. See :ref:`State<enum_WebSocketPeer_State>`. @@ -416,7 +420,7 @@ Returns the ready state of the connection. See :ref:`State<enum_WebSocketPeer_St .. rst-class:: classref-method -:ref:`String<class_String>` **get_requested_url** **(** **)** |const| +:ref:`String<class_String>` **get_requested_url**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_requested_url>` Returns the URL requested by this peer. The URL is derived from the ``url`` passed to :ref:`connect_to_url<class_WebSocketPeer_method_connect_to_url>` or from the HTTP headers when acting as server (i.e. when using :ref:`accept_stream<class_WebSocketPeer_method_accept_stream>`). @@ -428,7 +432,7 @@ Returns the URL requested by this peer. The URL is derived from the ``url`` pass .. rst-class:: classref-method -:ref:`String<class_String>` **get_selected_protocol** **(** **)** |const| +:ref:`String<class_String>` **get_selected_protocol**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_get_selected_protocol>` Returns the selected WebSocket sub-protocol for this connection or an empty string if the sub-protocol has not been selected yet. @@ -440,7 +444,7 @@ Returns the selected WebSocket sub-protocol for this connection or an empty stri .. rst-class:: classref-method -void **poll** **(** **)** +|void| **poll**\ (\ ) :ref:`🔗<class_WebSocketPeer_method_poll>` Updates the connection state and receive incoming packets. Call this function regularly to keep it in a clean state. @@ -452,7 +456,7 @@ Updates the connection state and receive incoming packets. Call this function re .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **send** **(** :ref:`PackedByteArray<class_PackedByteArray>` message, :ref:`WriteMode<enum_WebSocketPeer_WriteMode>` write_mode=1 **)** +:ref:`Error<enum_@GlobalScope_Error>` **send**\ (\ message\: :ref:`PackedByteArray<class_PackedByteArray>`, write_mode\: :ref:`WriteMode<enum_WebSocketPeer_WriteMode>` = 1\ ) :ref:`🔗<class_WebSocketPeer_method_send>` Sends the given ``message`` using the desired ``write_mode``. When sending a :ref:`String<class_String>`, prefer using :ref:`send_text<class_WebSocketPeer_method_send_text>`. @@ -464,7 +468,7 @@ Sends the given ``message`` using the desired ``write_mode``. When sending a :re .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **send_text** **(** :ref:`String<class_String>` message **)** +:ref:`Error<enum_@GlobalScope_Error>` **send_text**\ (\ message\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebSocketPeer_method_send_text>` Sends the given ``message`` using WebSocket text mode. Prefer this method over :ref:`PacketPeer.put_packet<class_PacketPeer_method_put_packet>` when interacting with third-party text-based API (e.g. when using :ref:`JSON<class_JSON>` formatted messages). @@ -476,7 +480,7 @@ Sends the given ``message`` using WebSocket text mode. Prefer this method over : .. rst-class:: classref-method -void **set_no_delay** **(** :ref:`bool<class_bool>` enabled **)** +|void| **set_no_delay**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_WebSocketPeer_method_set_no_delay>` Disable Nagle's algorithm on the underling TCP socket (default). See :ref:`StreamPeerTCP.set_no_delay<class_StreamPeerTCP_method_set_no_delay>` for more information. @@ -490,7 +494,7 @@ Disable Nagle's algorithm on the underling TCP socket (default). See :ref:`Strea .. rst-class:: classref-method -:ref:`bool<class_bool>` **was_string_packet** **(** **)** |const| +:ref:`bool<class_bool>` **was_string_packet**\ (\ ) |const| :ref:`🔗<class_WebSocketPeer_method_was_string_packet>` Returns ``true`` if the last received packet was sent as a text payload. See :ref:`WriteMode<enum_WebSocketPeer_WriteMode>`. @@ -501,3 +505,4 @@ Returns ``true`` if the last received packet was sent as a text payload. See :re .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_webxrinterface.rst b/classes/class_webxrinterface.rst index 5b26677f6d6..de4deb8f978 100644 --- a/classes/class_webxrinterface.rst +++ b/classes/class_webxrinterface.rst @@ -75,9 +75,10 @@ Here's the minimum code required to start an immersive VR session: # supported. webxr_interface.requested_reference_space_types = 'bounded-floor, local-floor, local' # In order to use 'local-floor' or 'bounded-floor' we must also - # mark the features as required or optional. + # mark the features as required or optional. By including 'hand-tracking' + # as an optional feature, it will be enabled if supported. webxr_interface.required_features = 'local-floor' - webxr_interface.optional_features = 'bounded-floor' + webxr_interface.optional_features = 'bounded-floor, hand-tracking' # This will return false if we're unable to even request the session, # however, it can still fail asynchronously later in the process, so we @@ -94,7 +95,10 @@ Here's the minimum code required to start an immersive VR session: # This will be the reference space type you ultimately got, out of the # types that you requested above. This is useful if you want the game to # work a little differently in 'bounded-floor' versus 'local-floor'. - print ("Reference space type: " + webxr_interface.reference_space_type) + print("Reference space type: ", webxr_interface.reference_space_type) + # This will be the list of features that were successfully enabled + # (except on browsers that don't support this property). + print("Enabled features: ", webxr_interface.enabled_features) func _webxr_session_ended(): $Button.visible = true @@ -128,6 +132,8 @@ Properties .. table:: :widths: auto + +-----------------------------+-------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`enabled_features<class_WebXRInterface_property_enabled_features>` | +-----------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`String<class_String>` | :ref:`optional_features<class_WebXRInterface_property_optional_features>` | +-----------------------------+-------------------------------------------------------------------------------------------------------+ @@ -150,21 +156,21 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_WebXRInterface_method_get_available_display_refresh_rates>` **(** **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_display_refresh_rate<class_WebXRInterface_method_get_display_refresh_rate>` **(** **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TargetRayMode<enum_WebXRInterface_TargetRayMode>` | :ref:`get_input_source_target_ray_mode<class_WebXRInterface_method_get_input_source_target_ray_mode>` **(** :ref:`int<class_int>` input_source_id **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRPositionalTracker<class_XRPositionalTracker>` | :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_tracker>` **(** :ref:`int<class_int>` input_source_id **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_input_source_active<class_WebXRInterface_method_is_input_source_active>` **(** :ref:`int<class_int>` input_source_id **)** |const| | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`is_session_supported<class_WebXRInterface_method_is_session_supported>` **(** :ref:`String<class_String>` session_mode **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_display_refresh_rate<class_WebXRInterface_method_set_display_refresh_rate>` **(** :ref:`float<class_float>` refresh_rate **)** | - +---------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array<class_Array>` | :ref:`get_available_display_refresh_rates<class_WebXRInterface_method_get_available_display_refresh_rates>`\ (\ ) |const| | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_display_refresh_rate<class_WebXRInterface_method_get_display_refresh_rate>`\ (\ ) |const| | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TargetRayMode<enum_WebXRInterface_TargetRayMode>` | :ref:`get_input_source_target_ray_mode<class_WebXRInterface_method_get_input_source_target_ray_mode>`\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRControllerTracker<class_XRControllerTracker>` | :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_tracker>`\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_input_source_active<class_WebXRInterface_method_is_input_source_active>`\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`is_session_supported<class_WebXRInterface_method_is_session_supported>`\ (\ session_mode\: :ref:`String<class_String>`\ ) | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_display_refresh_rate<class_WebXRInterface_method_set_display_refresh_rate>`\ (\ refresh_rate\: :ref:`float<class_float>`\ ) | + +---------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -179,7 +185,7 @@ Signals .. rst-class:: classref-signal -**display_refresh_rate_changed** **(** **)** +**display_refresh_rate_changed**\ (\ ) :ref:`🔗<class_WebXRInterface_signal_display_refresh_rate_changed>` Emitted after the display's refresh rate has changed. @@ -191,7 +197,7 @@ Emitted after the display's refresh rate has changed. .. rst-class:: classref-signal -**reference_space_reset** **(** **)** +**reference_space_reset**\ (\ ) :ref:`🔗<class_WebXRInterface_signal_reference_space_reset>` Emitted to indicate that the reference space has been reset or reconfigured. @@ -207,7 +213,7 @@ See `WebXR's XRReferenceSpace reset event <https://developer.mozilla.org/en-US/d .. rst-class:: classref-signal -**select** **(** :ref:`int<class_int>` input_source_id **)** +**select**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_select>` Emitted after one of the input sources has finished its "primary action". @@ -221,7 +227,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**selectend** **(** :ref:`int<class_int>` input_source_id **)** +**selectend**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_selectend>` Emitted when one of the input sources has finished its "primary action". @@ -235,7 +241,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**selectstart** **(** :ref:`int<class_int>` input_source_id **)** +**selectstart**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_selectstart>` Emitted when one of the input source has started its "primary action". @@ -249,7 +255,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**session_ended** **(** **)** +**session_ended**\ (\ ) :ref:`🔗<class_WebXRInterface_signal_session_ended>` Emitted when the user ends the WebXR session (which can be done using UI from the browser or device). @@ -263,7 +269,7 @@ At this point, you should do ``get_viewport().use_xr = false`` to instruct Godot .. rst-class:: classref-signal -**session_failed** **(** :ref:`String<class_String>` message **)** +**session_failed**\ (\ message\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebXRInterface_signal_session_failed>` Emitted by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` if the session fails to start. @@ -277,7 +283,7 @@ Emitted by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` if .. rst-class:: classref-signal -**session_started** **(** **)** +**session_started**\ (\ ) :ref:`🔗<class_WebXRInterface_signal_session_started>` Emitted by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` if the session is successfully started. @@ -291,7 +297,7 @@ At this point, it's safe to do ``get_viewport().use_xr = true`` to instruct Godo .. rst-class:: classref-signal -**session_supported** **(** :ref:`String<class_String>` session_mode, :ref:`bool<class_bool>` supported **)** +**session_supported**\ (\ session_mode\: :ref:`String<class_String>`, supported\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_WebXRInterface_signal_session_supported>` Emitted by :ref:`is_session_supported<class_WebXRInterface_method_is_session_supported>` to indicate if the given ``session_mode`` is supported or not. @@ -303,7 +309,7 @@ Emitted by :ref:`is_session_supported<class_WebXRInterface_method_is_session_sup .. rst-class:: classref-signal -**squeeze** **(** :ref:`int<class_int>` input_source_id **)** +**squeeze**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_squeeze>` Emitted after one of the input sources has finished its "primary squeeze action". @@ -317,7 +323,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**squeezeend** **(** :ref:`int<class_int>` input_source_id **)** +**squeezeend**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_squeezeend>` Emitted when one of the input sources has finished its "primary squeeze action". @@ -331,7 +337,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**squeezestart** **(** :ref:`int<class_int>` input_source_id **)** +**squeezestart**\ (\ input_source_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WebXRInterface_signal_squeezestart>` Emitted when one of the input sources has started its "primary squeeze action". @@ -345,7 +351,7 @@ Use :ref:`get_input_source_tracker<class_WebXRInterface_method_get_input_source_ .. rst-class:: classref-signal -**visibility_state_changed** **(** **)** +**visibility_state_changed**\ (\ ) :ref:`🔗<class_WebXRInterface_signal_visibility_state_changed>` Emitted when :ref:`visibility_state<class_WebXRInterface_property_visibility_state>` has changed. @@ -362,7 +368,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TargetRayMode**: +enum **TargetRayMode**: :ref:`🔗<enum_WebXRInterface_TargetRayMode>` .. _class_WebXRInterface_constant_TARGET_RAY_MODE_UNKNOWN: @@ -405,16 +411,36 @@ Target ray from touch screen, mouse or other tactile input device. Property Descriptions --------------------- +.. _class_WebXRInterface_property_enabled_features: + +.. rst-class:: classref-property + +:ref:`String<class_String>` **enabled_features** :ref:`🔗<class_WebXRInterface_property_enabled_features>` + +.. rst-class:: classref-property-setget + +- :ref:`String<class_String>` **get_enabled_features**\ (\ ) + +A comma-separated list of features that were successfully enabled by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. + +This may include features requested by setting :ref:`required_features<class_WebXRInterface_property_required_features>` and :ref:`optional_features<class_WebXRInterface_property_optional_features>`, and will only be available after :ref:`session_started<class_WebXRInterface_signal_session_started>` has been emitted. + +\ **Note:** This may not be support by all web browsers, in which case it will be an empty string. + +.. rst-class:: classref-item-separator + +---- + .. _class_WebXRInterface_property_optional_features: .. rst-class:: classref-property -:ref:`String<class_String>` **optional_features** +:ref:`String<class_String>` **optional_features** :ref:`🔗<class_WebXRInterface_property_optional_features>` .. rst-class:: classref-property-setget -- void **set_optional_features** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_optional_features** **(** **)** +- |void| **set_optional_features**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_optional_features**\ (\ ) A comma-seperated list of optional features used by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. @@ -422,7 +448,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType>`__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features<class_WebXRInterface_property_required_features>` or :ref:`optional_features<class_WebXRInterface_property_optional_features>`. +Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType>`__, or include other features like ``"hand-tracking"`` to enable hand tracking. .. rst-class:: classref-item-separator @@ -432,11 +458,11 @@ Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozil .. rst-class:: classref-property -:ref:`String<class_String>` **reference_space_type** +:ref:`String<class_String>` **reference_space_type** :ref:`🔗<class_WebXRInterface_property_reference_space_type>` .. rst-class:: classref-property-setget -- :ref:`String<class_String>` **get_reference_space_type** **(** **)** +- :ref:`String<class_String>` **get_reference_space_type**\ (\ ) The reference space type (from the list of requested types set in the :ref:`requested_reference_space_types<class_WebXRInterface_property_requested_reference_space_types>` property), that was ultimately used by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. @@ -450,12 +476,12 @@ Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozil .. rst-class:: classref-property -:ref:`String<class_String>` **requested_reference_space_types** +:ref:`String<class_String>` **requested_reference_space_types** :ref:`🔗<class_WebXRInterface_property_requested_reference_space_types>` .. rst-class:: classref-property-setget -- void **set_requested_reference_space_types** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_requested_reference_space_types** **(** **)** +- |void| **set_requested_reference_space_types**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_requested_reference_space_types**\ (\ ) A comma-seperated list of reference space types used by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. @@ -473,12 +499,12 @@ Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozil .. rst-class:: classref-property -:ref:`String<class_String>` **required_features** +:ref:`String<class_String>` **required_features** :ref:`🔗<class_WebXRInterface_property_required_features>` .. rst-class:: classref-property-setget -- void **set_required_features** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_required_features** **(** **)** +- |void| **set_required_features**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_required_features**\ (\ ) A comma-seperated list of required features used by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. @@ -486,7 +512,7 @@ If a user's browser or device doesn't support one of the given features, initial This doesn't have any effect on the interface when already initialized. -Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType>`__. If you want to use a particular reference space type, it must be listed in either :ref:`required_features<class_WebXRInterface_property_required_features>` or :ref:`optional_features<class_WebXRInterface_property_optional_features>`. +Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpaceType>`__, or include other features like ``"hand-tracking"`` to enable hand tracking. .. rst-class:: classref-item-separator @@ -496,12 +522,12 @@ Possible values come from `WebXR's XRReferenceSpaceType <https://developer.mozil .. rst-class:: classref-property -:ref:`String<class_String>` **session_mode** +:ref:`String<class_String>` **session_mode** :ref:`🔗<class_WebXRInterface_property_session_mode>` .. rst-class:: classref-property-setget -- void **set_session_mode** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_session_mode** **(** **)** +- |void| **set_session_mode**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_session_mode**\ (\ ) The session mode used by :ref:`XRInterface.initialize<class_XRInterface_method_initialize>` when setting up the WebXR session. @@ -517,11 +543,11 @@ Possible values come from `WebXR's XRSessionMode <https://developer.mozilla.org/ .. rst-class:: classref-property -:ref:`String<class_String>` **visibility_state** +:ref:`String<class_String>` **visibility_state** :ref:`🔗<class_WebXRInterface_property_visibility_state>` .. rst-class:: classref-property-setget -- :ref:`String<class_String>` **get_visibility_state** **(** **)** +- :ref:`String<class_String>` **get_visibility_state**\ (\ ) Indicates if the WebXR session's imagery is visible to the user. @@ -540,7 +566,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Array<class_Array>` **get_available_display_refresh_rates** **(** **)** |const| +:ref:`Array<class_Array>` **get_available_display_refresh_rates**\ (\ ) |const| :ref:`🔗<class_WebXRInterface_method_get_available_display_refresh_rates>` Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the web browser and after the interface has been initialized. @@ -552,7 +578,7 @@ Returns display refresh rates supported by the current HMD. Only returned if thi .. rst-class:: classref-method -:ref:`float<class_float>` **get_display_refresh_rate** **(** **)** |const| +:ref:`float<class_float>` **get_display_refresh_rate**\ (\ ) |const| :ref:`🔗<class_WebXRInterface_method_get_display_refresh_rate>` Returns the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It may not report an accurate value until after using :ref:`set_display_refresh_rate<class_WebXRInterface_method_set_display_refresh_rate>`. @@ -564,7 +590,7 @@ Returns the display refresh rate for the current HMD. Not supported on all HMDs .. rst-class:: classref-method -:ref:`TargetRayMode<enum_WebXRInterface_TargetRayMode>` **get_input_source_target_ray_mode** **(** :ref:`int<class_int>` input_source_id **)** |const| +:ref:`TargetRayMode<enum_WebXRInterface_TargetRayMode>` **get_input_source_target_ray_mode**\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebXRInterface_method_get_input_source_target_ray_mode>` Returns the target ray mode for the given ``input_source_id``. @@ -578,9 +604,9 @@ This can help interpret the input coming from that input source. See `XRInputSou .. rst-class:: classref-method -:ref:`XRPositionalTracker<class_XRPositionalTracker>` **get_input_source_tracker** **(** :ref:`int<class_int>` input_source_id **)** |const| +:ref:`XRControllerTracker<class_XRControllerTracker>` **get_input_source_tracker**\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebXRInterface_method_get_input_source_tracker>` -Gets an :ref:`XRPositionalTracker<class_XRPositionalTracker>` for the given ``input_source_id``. +Gets an :ref:`XRControllerTracker<class_XRControllerTracker>` for the given ``input_source_id``. In the context of WebXR, an input source can be an advanced VR controller like the Oculus Touch or Index controllers, or even a tap on the screen, a spoken voice command or a button press on the device itself. When a non-traditional input source is used, interpret the position and orientation of the :ref:`XRPositionalTracker<class_XRPositionalTracker>` as a ray pointing at the object the user wishes to interact with. @@ -606,7 +632,7 @@ Use this method to get information about the input source that triggered one of .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_input_source_active** **(** :ref:`int<class_int>` input_source_id **)** |const| +:ref:`bool<class_bool>` **is_input_source_active**\ (\ input_source_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WebXRInterface_method_is_input_source_active>` Returns ``true`` if there is an active input source with the given ``input_source_id``. @@ -618,7 +644,7 @@ Returns ``true`` if there is an active input source with the given ``input_sourc .. rst-class:: classref-method -void **is_session_supported** **(** :ref:`String<class_String>` session_mode **)** +|void| **is_session_supported**\ (\ session_mode\: :ref:`String<class_String>`\ ) :ref:`🔗<class_WebXRInterface_method_is_session_supported>` Checks if the given ``session_mode`` is supported by the user's browser. @@ -634,7 +660,7 @@ This method returns nothing, instead it emits the :ref:`session_supported<class_ .. rst-class:: classref-method -void **set_display_refresh_rate** **(** :ref:`float<class_float>` refresh_rate **)** +|void| **set_display_refresh_rate**\ (\ refresh_rate\: :ref:`float<class_float>`\ ) :ref:`🔗<class_WebXRInterface_method_set_display_refresh_rate>` Sets the display refresh rate for the current HMD. Not supported on all HMDs and browsers. It won't take effect right away until after :ref:`display_refresh_rate_changed<class_WebXRInterface_signal_display_refresh_rate_changed>` is emitted. @@ -645,3 +671,4 @@ Sets the display refresh rate for the current HMD. Not supported on all HMDs and .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_window.rst b/classes/class_window.rst index 3c12ec2bcaa..bf0a89c2cf9 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -48,14 +48,20 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i<class_Vector2i>` | :ref:`content_scale_size<class_Window_property_content_scale_size>` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` | :ref:`content_scale_stretch<class_Window_property_content_scale_stretch>` | ``0`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`int<class_int>` | :ref:`current_screen<class_Window_property_current_screen>` | | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool<class_bool>` | :ref:`exclusive<class_Window_property_exclusive>` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool<class_bool>` | :ref:`extend_to_title<class_Window_property_extend_to_title>` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`force_native<class_Window_property_force_native>` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` | :ref:`initial_position<class_Window_property_initial_position>` | ``0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`keep_title_visible<class_Window_property_keep_title_visible>` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i<class_Vector2i>` | :ref:`max_size<class_Window_property_max_size>` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i<class_Vector2i>` | :ref:`min_size<class_Window_property_min_size>` | ``Vector2i(0, 0)`` | @@ -80,6 +86,8 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool<class_bool>` | :ref:`transient<class_Window_property_transient>` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool<class_bool>` | :ref:`transient_to_focused<class_Window_property_transient_to_focused>` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool<class_bool>` | :ref:`transparent<class_Window_property_transparent>` | ``false`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`bool<class_bool>` | :ref:`unfocusable<class_Window_property_unfocusable>` | ``false`` | @@ -99,147 +107,151 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Color<class_Color>` color **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` constant **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Font<class_Font>` font **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` font_size **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`child_controls_changed<class_Window_method_child_controls_changed>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_position_with_decorations<class_Window_method_get_position_with_decorations>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size_with_decorations<class_Window_method_get_size_with_decorations>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color<class_Color>` | :ref:`get_theme_color<class_Window_method_get_theme_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_theme_constant<class_Window_method_get_theme_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font<class_Font>` | :ref:`get_theme_font<class_Window_method_get_theme_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D<class_Texture2D>` | :ref:`get_theme_icon<class_Window_method_get_theme_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StyleBox<class_StyleBox>` | :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_window_id<class_Window_method_get_window_id>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grab_focus<class_Window_method_grab_focus>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_color<class_Window_method_has_theme_color>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_color_override<class_Window_method_has_theme_color_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_constant<class_Window_method_has_theme_constant>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_constant_override<class_Window_method_has_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_font<class_Window_method_has_theme_font>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_font_override<class_Window_method_has_theme_font_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_font_size<class_Window_method_has_theme_font_size>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_font_size_override<class_Window_method_has_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_icon<class_Window_method_has_theme_icon>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_icon_override<class_Window_method_has_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox<class_Window_method_has_theme_stylebox>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox_override<class_Window_method_has_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide<class_Window_method_hide>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>` **(** **)** |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_foreground<class_Window_method_move_to_foreground>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup<class_Window_method_popup>` **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered<class_Window_method_popup_centered>` **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>` **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.8 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_exclusive<class_Window_method_popup_exclusive>` **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_exclusive_centered<class_Window_method_popup_exclusive_centered>` **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>` **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>` **(** :ref:`Node<class_Node>` from_node, :ref:`float<class_float>` ratio=0.8 **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_exclusive_on_parent<class_Window_method_popup_exclusive_on_parent>` **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` parent_rect **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_on_parent<class_Window_method_popup_on_parent>` **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>` **(** :ref:`StringName<class_StringName>` name **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_attention<class_Window_method_request_attention>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_size<class_Window_method_reset_size>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag<class_Window_method_set_flag>` **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_active<class_Window_method_set_ime_active>` **(** :ref:`bool<class_bool>` active **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_position<class_Window_method_set_ime_position>` **(** :ref:`Vector2i<class_Vector2i>` position **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layout_direction<class_Window_method_set_layout_direction>` **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>` **(** :ref:`bool<class_bool>` unparent **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>` **(** :ref:`bool<class_bool>` enable **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show<class_Window_method_show>` **(** **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`_get_contents_minimum_size<class_Window_private_method__get_contents_minimum_size>`\ (\ ) |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`can_draw<class_Window_method_can_draw>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`child_controls_changed<class_Window_method_child_controls_changed>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2<class_Vector2>` | :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`get_flag<class_Window_method_get_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayoutDirection<enum_Window_LayoutDirection>` | :ref:`get_layout_direction<class_Window_method_get_layout_direction>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_position_with_decorations<class_Window_method_get_position_with_decorations>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i<class_Vector2i>` | :ref:`get_size_with_decorations<class_Window_method_get_size_with_decorations>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color<class_Color>` | :ref:`get_theme_color<class_Window_method_get_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_theme_constant<class_Window_method_get_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float<class_float>` | :ref:`get_theme_default_base_scale<class_Window_method_get_theme_default_base_scale>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`get_theme_default_font<class_Window_method_get_theme_default_font>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_theme_default_font_size<class_Window_method_get_theme_default_font_size>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font<class_Font>` | :ref:`get_theme_font<class_Window_method_get_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D<class_Texture2D>` | :ref:`get_theme_icon<class_Window_method_get_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox<class_StyleBox>` | :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_window_id<class_Window_method_get_window_id>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`grab_focus<class_Window_method_grab_focus>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_focus<class_Window_method_has_focus>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_color<class_Window_method_has_theme_color>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_color_override<class_Window_method_has_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_constant<class_Window_method_has_theme_constant>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_constant_override<class_Window_method_has_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_font<class_Window_method_has_theme_font>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_font_override<class_Window_method_has_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_font_size<class_Window_method_has_theme_font_size>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_font_size_override<class_Window_method_has_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_icon<class_Window_method_has_theme_icon>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_icon_override<class_Window_method_has_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox<class_Window_method_has_theme_stylebox>`\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_theme_stylebox_override<class_Window_method_has_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hide<class_Window_method_hide>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_embedded<class_Window_method_is_embedded>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_layout_rtl<class_Window_method_is_layout_rtl>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_maximize_allowed<class_Window_method_is_maximize_allowed>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_using_font_oversampling<class_Window_method_is_using_font_oversampling>`\ (\ ) |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_to_center<class_Window_method_move_to_center>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_to_foreground<class_Window_method_move_to_foreground>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup<class_Window_method_popup>`\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_centered<class_Window_method_popup_centered>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>`\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>`\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_exclusive<class_Window_method_popup_exclusive>`\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_exclusive_centered<class_Window_method_popup_exclusive_centered>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_exclusive_centered_clamped<class_Window_method_popup_exclusive_centered_clamped>`\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_exclusive_centered_ratio<class_Window_method_popup_exclusive_centered_ratio>`\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_exclusive_on_parent<class_Window_method_popup_exclusive_on_parent>`\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_on_parent<class_Window_method_popup_on_parent>`\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`request_attention<class_Window_method_request_attention>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reset_size<class_Window_method_reset_size>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_flag<class_Window_method_set_flag>`\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ime_active<class_Window_method_set_ime_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_ime_position<class_Window_method_set_ime_position>`\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_layout_direction<class_Window_method_set_layout_direction>`\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when_invisible>`\ (\ unparent\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>`\ (\ enable\: :ref:`bool<class_bool>`\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show<class_Window_method_show>`\ (\ ) | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -252,7 +264,7 @@ Theme Properties +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`Color<class_Color>` | :ref:`title_color<class_Window_theme_color_title_color>` | ``Color(0.875, 0.875, 0.875, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(1, 1, 1, 1)`` | + | :ref:`Color<class_Color>` | :ref:`title_outline_modulate<class_Window_theme_color_title_outline_modulate>` | ``Color(0, 0, 0, 1)`` | +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int<class_int>` | :ref:`close_h_offset<class_Window_theme_constant_close_h_offset>` | ``18`` | +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------------------+ @@ -290,7 +302,7 @@ Signals .. rst-class:: classref-signal -**about_to_popup** **(** **)** +**about_to_popup**\ (\ ) :ref:`🔗<class_Window_signal_about_to_popup>` Emitted right after :ref:`popup<class_Window_method_popup>` call, before the **Window** appears or does anything. @@ -302,7 +314,7 @@ Emitted right after :ref:`popup<class_Window_method_popup>` call, before the **W .. rst-class:: classref-signal -**close_requested** **(** **)** +**close_requested**\ (\ ) :ref:`🔗<class_Window_signal_close_requested>` Emitted when the **Window**'s close button is pressed or when :ref:`popup_window<class_Window_property_popup_window>` is enabled and user clicks outside the window. @@ -316,7 +328,7 @@ This signal can be used to handle window closing, e.g. by connecting it to :ref: .. rst-class:: classref-signal -**dpi_changed** **(** **)** +**dpi_changed**\ (\ ) :ref:`🔗<class_Window_signal_dpi_changed>` Emitted when the **Window**'s DPI changes as a result of OS-level changes (e.g. moving the window from a Retina display to a lower resolution one). @@ -330,7 +342,7 @@ Emitted when the **Window**'s DPI changes as a result of OS-level changes (e.g. .. rst-class:: classref-signal -**files_dropped** **(** :ref:`PackedStringArray<class_PackedStringArray>` files **)** +**files_dropped**\ (\ files\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) :ref:`🔗<class_Window_signal_files_dropped>` Emitted when files are dragged from the OS file manager and dropped in the game window. The argument is a list of file paths. @@ -354,7 +366,7 @@ Example usage: .. rst-class:: classref-signal -**focus_entered** **(** **)** +**focus_entered**\ (\ ) :ref:`🔗<class_Window_signal_focus_entered>` Emitted when the **Window** gains focus. @@ -366,7 +378,7 @@ Emitted when the **Window** gains focus. .. rst-class:: classref-signal -**focus_exited** **(** **)** +**focus_exited**\ (\ ) :ref:`🔗<class_Window_signal_focus_exited>` Emitted when the **Window** loses its focus. @@ -378,7 +390,7 @@ Emitted when the **Window** loses its focus. .. rst-class:: classref-signal -**go_back_requested** **(** **)** +**go_back_requested**\ (\ ) :ref:`🔗<class_Window_signal_go_back_requested>` Emitted when a go back request is sent (e.g. pressing the "Back" button on Android), right after :ref:`Node.NOTIFICATION_WM_GO_BACK_REQUEST<class_Node_constant_NOTIFICATION_WM_GO_BACK_REQUEST>`. @@ -390,9 +402,9 @@ Emitted when a go back request is sent (e.g. pressing the "Back" button on Andro .. rst-class:: classref-signal -**mouse_entered** **(** **)** +**mouse_entered**\ (\ ) :ref:`🔗<class_Window_signal_mouse_entered>` -Emitted when the mouse cursor enters the **Window**'s area, regardless if it's currently focused or not. +Emitted when the mouse cursor enters the **Window**'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or windows, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not. .. rst-class:: classref-item-separator @@ -402,9 +414,9 @@ Emitted when the mouse cursor enters the **Window**'s area, regardless if it's c .. rst-class:: classref-signal -**mouse_exited** **(** **)** +**mouse_exited**\ (\ ) :ref:`🔗<class_Window_signal_mouse_exited>` -Emitted when the mouse cursor exits the **Window**'s area (including when it's hovered over another window on top of this one). +Emitted when the mouse cursor leaves the **Window**'s visible area, that is not occluded behind other :ref:`Control<class_Control>`\ s or windows, provided its :ref:`Viewport.gui_disable_input<class_Viewport_property_gui_disable_input>` is ``false`` and regardless if it's currently focused or not. .. rst-class:: classref-item-separator @@ -414,7 +426,7 @@ Emitted when the mouse cursor exits the **Window**'s area (including when it's h .. rst-class:: classref-signal -**theme_changed** **(** **)** +**theme_changed**\ (\ ) :ref:`🔗<class_Window_signal_theme_changed>` Emitted when the :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` notification is sent. @@ -426,7 +438,7 @@ Emitted when the :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICA .. rst-class:: classref-signal -**titlebar_changed** **(** **)** +**titlebar_changed**\ (\ ) :ref:`🔗<class_Window_signal_titlebar_changed>` Emitted when window title bar decorations are changed, e.g. macOS window enter/exit full screen mode, or extend-to-title flag is changed. @@ -438,7 +450,7 @@ Emitted when window title bar decorations are changed, e.g. macOS window enter/e .. rst-class:: classref-signal -**visibility_changed** **(** **)** +**visibility_changed**\ (\ ) :ref:`🔗<class_Window_signal_visibility_changed>` Emitted when **Window** is made visible or disappears. @@ -450,7 +462,7 @@ Emitted when **Window** is made visible or disappears. .. rst-class:: classref-signal -**window_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** +**window_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) :ref:`🔗<class_Window_signal_window_input>` Emitted when the **Window** is currently focused and receives any input, passing the received event as an argument. The event's position, if present, is in the embedder's coordinate system. @@ -467,7 +479,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Mode**: +enum **Mode**: :ref:`🔗<enum_Window_Mode>` .. _class_Window_constant_MODE_WINDOWED: @@ -499,9 +511,15 @@ Maximized window mode, i.e. **Window** will occupy whole screen area except task :ref:`Mode<enum_Window_Mode>` **MODE_FULLSCREEN** = ``3`` -Full screen window mode. Note that this is not *exclusive* full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. +Full screen mode with full multi-window support. + +Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + +\ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color<class_ProjectSettings_property_rendering/environment/defaults/default_clear_color>` color. + +\ **On macOS:** A new desktop is used to display the running project. -Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. +\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. .. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN: @@ -509,11 +527,17 @@ Regardless of the platform, enabling full screen will change the window size to :ref:`Mode<enum_Window_Mode>` **MODE_EXCLUSIVE_FULLSCREEN** = ``4`` -Exclusive full screen window mode. This mode is implemented on Windows only. On other platforms, it is equivalent to :ref:`MODE_FULLSCREEN<class_Window_constant_MODE_FULLSCREEN>`. +A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). -Only one window in exclusive full screen mode can be visible on a given screen at a time. If multiple windows are in exclusive full screen mode for the same screen, the last one being set to this mode takes precedence. +Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. -Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. +\ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. + +\ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. + +\ **On Linux (X11):** Exclusive full screen mode bypasses compositor. + +\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. .. rst-class:: classref-item-separator @@ -523,7 +547,7 @@ Regardless of the platform, enabling full screen will change the window size to .. rst-class:: classref-enumeration -enum **Flags**: +enum **Flags**: :ref:`🔗<enum_Window_Flags>` .. _class_Window_constant_FLAG_RESIZE_DISABLED: @@ -615,7 +639,7 @@ Max value of the :ref:`Flags<enum_Window_Flags>`. .. rst-class:: classref-enumeration -enum **ContentScaleMode**: +enum **ContentScaleMode**: :ref:`🔗<enum_Window_ContentScaleMode>` .. _class_Window_constant_CONTENT_SCALE_MODE_DISABLED: @@ -649,7 +673,7 @@ The content will be rendered at the base size and then scaled to the target size .. rst-class:: classref-enumeration -enum **ContentScaleAspect**: +enum **ContentScaleAspect**: :ref:`🔗<enum_Window_ContentScaleAspect>` .. _class_Window_constant_CONTENT_SCALE_ASPECT_IGNORE: @@ -695,11 +719,37 @@ The content's aspect will be preserved. If the target size has different aspect ---- +.. _enum_Window_ContentScaleStretch: + +.. rst-class:: classref-enumeration + +enum **ContentScaleStretch**: :ref:`🔗<enum_Window_ContentScaleStretch>` + +.. _class_Window_constant_CONTENT_SCALE_STRETCH_FRACTIONAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0`` + +The content will be stretched according to a fractional factor. This fills all the space available in the window, but allows "pixel wobble" to occur due to uneven pixel scaling. + +.. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **CONTENT_SCALE_STRETCH_INTEGER** = ``1`` + +The content will be stretched only according to an integer factor, preserving sharp pixels. This may leave a black background visible on the window's edges depending on the window size. + +.. rst-class:: classref-item-separator + +---- + .. _enum_Window_LayoutDirection: .. rst-class:: classref-enumeration -enum **LayoutDirection**: +enum **LayoutDirection**: :ref:`🔗<enum_Window_LayoutDirection>` .. _class_Window_constant_LAYOUT_DIRECTION_INHERITED: @@ -741,7 +791,7 @@ Right-to-left layout direction. .. rst-class:: classref-enumeration -enum **WindowInitialPosition**: +enum **WindowInitialPosition**: :ref:`🔗<enum_Window_WindowInitialPosition>` .. _class_Window_constant_WINDOW_INITIAL_POSITION_ABSOLUTE: @@ -804,7 +854,7 @@ Constants .. rst-class:: classref-constant -**NOTIFICATION_VISIBILITY_CHANGED** = ``30`` +**NOTIFICATION_VISIBILITY_CHANGED** = ``30`` :ref:`🔗<class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED>` Emitted when **Window**'s visibility changes, right before :ref:`visibility_changed<class_Window_signal_visibility_changed>`. @@ -812,7 +862,7 @@ Emitted when **Window**'s visibility changes, right before :ref:`visibility_chan .. rst-class:: classref-constant -**NOTIFICATION_THEME_CHANGED** = ``32`` +**NOTIFICATION_THEME_CHANGED** = ``32`` :ref:`🔗<class_Window_constant_NOTIFICATION_THEME_CHANGED>` Sent when the node needs to refresh its theme items. This happens in one of the following cases: @@ -837,12 +887,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool<class_bool>` **always_on_top** = ``false`` +:ref:`bool<class_bool>` **always_on_top** = ``false`` :ref:`🔗<class_Window_property_always_on_top>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the window will be on top of all other windows. Does not work if :ref:`transient<class_Window_property_transient>` is enabled. @@ -854,12 +904,14 @@ If ``true``, the window will be on top of all other windows. Does not work if :r .. rst-class:: classref-property -:ref:`bool<class_bool>` **auto_translate** = ``true`` +:ref:`bool<class_bool>` **auto_translate** = ``true`` :ref:`🔗<class_Window_property_auto_translate>` .. rst-class:: classref-property-setget -- void **set_auto_translate** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_auto_translating** **(** **)** +- |void| **set_auto_translate**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_auto_translating**\ (\ ) + +**Deprecated:** Use :ref:`Node.auto_translate_mode<class_Node_property_auto_translate_mode>` instead. Toggles if any text should automatically change to its translated version depending on the current locale. @@ -871,12 +923,12 @@ Toggles if any text should automatically change to its translated version depend .. rst-class:: classref-property -:ref:`bool<class_bool>` **borderless** = ``false`` +:ref:`bool<class_bool>` **borderless** = ``false`` :ref:`🔗<class_Window_property_borderless>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the window will have no borders. @@ -888,12 +940,12 @@ If ``true``, the window will have no borders. .. rst-class:: classref-property -:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect** = ``0`` +:ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **content_scale_aspect** = ``0`` :ref:`🔗<class_Window_property_content_scale_aspect>` .. rst-class:: classref-property-setget -- void **set_content_scale_aspect** **(** :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` value **)** -- :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **get_content_scale_aspect** **(** **)** +- |void| **set_content_scale_aspect**\ (\ value\: :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>`\ ) +- :ref:`ContentScaleAspect<enum_Window_ContentScaleAspect>` **get_content_scale_aspect**\ (\ ) Specifies how the content's aspect behaves when the **Window** is resized. The base aspect is determined by :ref:`content_scale_size<class_Window_property_content_scale_size>`. @@ -905,12 +957,12 @@ Specifies how the content's aspect behaves when the **Window** is resized. The b .. rst-class:: classref-property -:ref:`float<class_float>` **content_scale_factor** = ``1.0`` +:ref:`float<class_float>` **content_scale_factor** = ``1.0`` :ref:`🔗<class_Window_property_content_scale_factor>` .. rst-class:: classref-property-setget -- void **set_content_scale_factor** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_content_scale_factor** **(** **)** +- |void| **set_content_scale_factor**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_content_scale_factor**\ (\ ) Specifies the base scale of **Window**'s content when its :ref:`size<class_Window_property_size>` is equal to :ref:`content_scale_size<class_Window_property_content_scale_size>`. @@ -922,12 +974,12 @@ Specifies the base scale of **Window**'s content when its :ref:`size<class_Windo .. rst-class:: classref-property -:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode** = ``0`` +:ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **content_scale_mode** = ``0`` :ref:`🔗<class_Window_property_content_scale_mode>` .. rst-class:: classref-property-setget -- void **set_content_scale_mode** **(** :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` value **)** -- :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **get_content_scale_mode** **(** **)** +- |void| **set_content_scale_mode**\ (\ value\: :ref:`ContentScaleMode<enum_Window_ContentScaleMode>`\ ) +- :ref:`ContentScaleMode<enum_Window_ContentScaleMode>` **get_content_scale_mode**\ (\ ) Specifies how the content is scaled when the **Window** is resized. @@ -939,12 +991,12 @@ Specifies how the content is scaled when the **Window** is resized. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **content_scale_size** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **content_scale_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_content_scale_size>` .. rst-class:: classref-property-setget -- void **set_content_scale_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_content_scale_size** **(** **)** +- |void| **set_content_scale_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_content_scale_size**\ (\ ) Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, **Window**'s content will be scaled when the window is resized to a different size. @@ -952,16 +1004,33 @@ Base size of the content (i.e. nodes that are drawn inside the window). If non-z ---- +.. _class_Window_property_content_scale_stretch: + +.. rst-class:: classref-property + +:ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **content_scale_stretch** = ``0`` :ref:`🔗<class_Window_property_content_scale_stretch>` + +.. rst-class:: classref-property-setget + +- |void| **set_content_scale_stretch**\ (\ value\: :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>`\ ) +- :ref:`ContentScaleStretch<enum_Window_ContentScaleStretch>` **get_content_scale_stretch**\ (\ ) + +The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`content_scale_factor<class_Window_property_content_scale_factor>` is applied, in addition to the automatic scale factor determined by :ref:`content_scale_size<class_Window_property_content_scale_size>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_current_screen: .. rst-class:: classref-property -:ref:`int<class_int>` **current_screen** +:ref:`int<class_int>` **current_screen** :ref:`🔗<class_Window_property_current_screen>` .. rst-class:: classref-property-setget -- void **set_current_screen** **(** :ref:`int<class_int>` value **)** -- :ref:`int<class_int>` **get_current_screen** **(** **)** +- |void| **set_current_screen**\ (\ value\: :ref:`int<class_int>`\ ) +- :ref:`int<class_int>` **get_current_screen**\ (\ ) The screen the window is currently on. @@ -973,12 +1042,12 @@ The screen the window is currently on. .. rst-class:: classref-property -:ref:`bool<class_bool>` **exclusive** = ``false`` +:ref:`bool<class_bool>` **exclusive** = ``false`` :ref:`🔗<class_Window_property_exclusive>` .. rst-class:: classref-property-setget -- void **set_exclusive** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_exclusive** **(** **)** +- |void| **set_exclusive**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_exclusive**\ (\ ) If ``true``, the **Window** will be in exclusive mode. Exclusive windows are always on top of their parent and will block all input going to the parent **Window**. @@ -992,12 +1061,12 @@ Needs :ref:`transient<class_Window_property_transient>` enabled to work. .. rst-class:: classref-property -:ref:`bool<class_bool>` **extend_to_title** = ``false`` +:ref:`bool<class_bool>` **extend_to_title** = ``false`` :ref:`🔗<class_Window_property_extend_to_title>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the **Window** contents is expanded to the full size of the window, window title bar is transparent. @@ -1009,16 +1078,33 @@ If ``true``, the **Window** contents is expanded to the full size of the window, ---- +.. _class_Window_property_force_native: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **force_native** = ``false`` :ref:`🔗<class_Window_property_force_native>` + +.. rst-class:: classref-property-setget + +- |void| **set_force_native**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_force_native**\ (\ ) + +If ``true``, native window will be used regardless of parent viewport and project settings. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_initial_position: .. rst-class:: classref-property -:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **initial_position** = ``0`` +:ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **initial_position** = ``0`` :ref:`🔗<class_Window_property_initial_position>` .. rst-class:: classref-property-setget -- void **set_initial_position** **(** :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` value **)** -- :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **get_initial_position** **(** **)** +- |void| **set_initial_position**\ (\ value\: :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>`\ ) +- :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` **get_initial_position**\ (\ ) Specifies the initial type of position for the **Window**. See :ref:`WindowInitialPosition<enum_Window_WindowInitialPosition>` constants. @@ -1026,16 +1112,33 @@ Specifies the initial type of position for the **Window**. See :ref:`WindowIniti ---- +.. _class_Window_property_keep_title_visible: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **keep_title_visible** = ``false`` :ref:`🔗<class_Window_property_keep_title_visible>` + +.. rst-class:: classref-property-setget + +- |void| **set_keep_title_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_keep_title_visible**\ (\ ) + +If ``true``, the **Window** width is expanded to keep the title bar text fully visible. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_max_size: .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **max_size** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **max_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_max_size>` .. rst-class:: classref-property-setget -- void **set_max_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_max_size** **(** **)** +- |void| **set_max_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_max_size**\ (\ ) If non-zero, the **Window** can't be resized to be bigger than this size. @@ -1049,12 +1152,12 @@ If non-zero, the **Window** can't be resized to be bigger than this size. .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **min_size** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **min_size** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_min_size>` .. rst-class:: classref-property-setget -- void **set_min_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_min_size** **(** **)** +- |void| **set_min_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_min_size**\ (\ ) If non-zero, the **Window** can't be resized to be smaller than this size. @@ -1068,12 +1171,12 @@ If non-zero, the **Window** can't be resized to be smaller than this size. .. rst-class:: classref-property -:ref:`Mode<enum_Window_Mode>` **mode** = ``0`` +:ref:`Mode<enum_Window_Mode>` **mode** = ``0`` :ref:`🔗<class_Window_property_mode>` .. rst-class:: classref-property-setget -- void **set_mode** **(** :ref:`Mode<enum_Window_Mode>` value **)** -- :ref:`Mode<enum_Window_Mode>` **get_mode** **(** **)** +- |void| **set_mode**\ (\ value\: :ref:`Mode<enum_Window_Mode>`\ ) +- :ref:`Mode<enum_Window_Mode>` **get_mode**\ (\ ) Set's the window's current mode. @@ -1089,12 +1192,12 @@ Set's the window's current mode. .. rst-class:: classref-property -:ref:`bool<class_bool>` **mouse_passthrough** = ``false`` +:ref:`bool<class_bool>` **mouse_passthrough** = ``false`` :ref:`🔗<class_Window_property_mouse_passthrough>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, all mouse events will be passed to the underlying window of the same application. See also :ref:`mouse_passthrough_polygon<class_Window_property_mouse_passthrough_polygon>`. @@ -1110,12 +1213,12 @@ If ``true``, all mouse events will be passed to the underlying window of the sam .. rst-class:: classref-property -:ref:`PackedVector2Array<class_PackedVector2Array>` **mouse_passthrough_polygon** = ``PackedVector2Array()`` +:ref:`PackedVector2Array<class_PackedVector2Array>` **mouse_passthrough_polygon** = ``PackedVector2Array()`` :ref:`🔗<class_Window_property_mouse_passthrough_polygon>` .. rst-class:: classref-property-setget -- void **set_mouse_passthrough_polygon** **(** :ref:`PackedVector2Array<class_PackedVector2Array>` value **)** -- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_mouse_passthrough_polygon** **(** **)** +- |void| **set_mouse_passthrough_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ ) +- :ref:`PackedVector2Array<class_PackedVector2Array>` **get_mouse_passthrough_polygon**\ (\ ) Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. @@ -1154,6 +1257,8 @@ Passing an empty array will disable passthrough support (all mouse events will b \ **Note:** This property is implemented on Linux (X11), macOS and Windows. +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details. + .. rst-class:: classref-item-separator ---- @@ -1162,17 +1267,15 @@ Passing an empty array will disable passthrough support (all mouse events will b .. rst-class:: classref-property -:ref:`bool<class_bool>` **popup_window** = ``false`` +:ref:`bool<class_bool>` **popup_window** = ``false`` :ref:`🔗<class_Window_property_popup_window>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the **Window** will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless :ref:`exclusive<class_Window_property_exclusive>` is enabled). -\ **Note:** This property only works with native windows. - .. rst-class:: classref-item-separator ---- @@ -1181,12 +1284,12 @@ If ``true``, the **Window** will be considered a popup. Popups are sub-windows t .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` +:ref:`Vector2i<class_Vector2i>` **position** = ``Vector2i(0, 0)`` :ref:`🔗<class_Window_property_position>` .. rst-class:: classref-property-setget -- void **set_position** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_position** **(** **)** +- |void| **set_position**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_position**\ (\ ) The window's position in pixels. @@ -1202,12 +1305,12 @@ If :ref:`ProjectSettings.display/window/subwindows/embed_subwindows<class_Projec .. rst-class:: classref-property -:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(100, 100)`` +:ref:`Vector2i<class_Vector2i>` **size** = ``Vector2i(100, 100)`` :ref:`🔗<class_Window_property_size>` .. rst-class:: classref-property-setget -- void **set_size** **(** :ref:`Vector2i<class_Vector2i>` value **)** -- :ref:`Vector2i<class_Vector2i>` **get_size** **(** **)** +- |void| **set_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ ) +- :ref:`Vector2i<class_Vector2i>` **get_size**\ (\ ) The window's size in pixels. @@ -1219,12 +1322,12 @@ The window's size in pixels. .. rst-class:: classref-property -:ref:`Theme<class_Theme>` **theme** +:ref:`Theme<class_Theme>` **theme** :ref:`🔗<class_Window_property_theme>` .. rst-class:: classref-property-setget -- void **set_theme** **(** :ref:`Theme<class_Theme>` value **)** -- :ref:`Theme<class_Theme>` **get_theme** **(** **)** +- |void| **set_theme**\ (\ value\: :ref:`Theme<class_Theme>`\ ) +- :ref:`Theme<class_Theme>` **get_theme**\ (\ ) The :ref:`Theme<class_Theme>` resource this node and all its :ref:`Control<class_Control>` and **Window** children use. If a child node has its own :ref:`Theme<class_Theme>` resource set, theme items are merged with child's definitions having higher priority. @@ -1238,12 +1341,12 @@ The :ref:`Theme<class_Theme>` resource this node and all its :ref:`Control<class .. rst-class:: classref-property -:ref:`StringName<class_StringName>` **theme_type_variation** = ``&""`` +:ref:`StringName<class_StringName>` **theme_type_variation** = ``&""`` :ref:`🔗<class_Window_property_theme_type_variation>` .. rst-class:: classref-property-setget -- void **set_theme_type_variation** **(** :ref:`StringName<class_StringName>` value **)** -- :ref:`StringName<class_StringName>` **get_theme_type_variation** **(** **)** +- |void| **set_theme_type_variation**\ (\ value\: :ref:`StringName<class_StringName>`\ ) +- :ref:`StringName<class_StringName>` **get_theme_type_variation**\ (\ ) The name of a theme type variation used by this **Window** to look up its own theme items. See :ref:`Control.theme_type_variation<class_Control_property_theme_type_variation>` for more details. @@ -1255,12 +1358,12 @@ The name of a theme type variation used by this **Window** to look up its own th .. rst-class:: classref-property -:ref:`String<class_String>` **title** = ``""`` +:ref:`String<class_String>` **title** = ``""`` :ref:`🔗<class_Window_property_title>` .. rst-class:: classref-property-setget -- void **set_title** **(** :ref:`String<class_String>` value **)** -- :ref:`String<class_String>` **get_title** **(** **)** +- |void| **set_title**\ (\ value\: :ref:`String<class_String>`\ ) +- :ref:`String<class_String>` **get_title**\ (\ ) The window's title. If the **Window** is native, title styles set in :ref:`Theme<class_Theme>` will have no effect. @@ -1272,12 +1375,12 @@ The window's title. If the **Window** is native, title styles set in :ref:`Theme .. rst-class:: classref-property -:ref:`bool<class_bool>` **transient** = ``false`` +:ref:`bool<class_bool>` **transient** = ``false`` :ref:`🔗<class_Window_property_transient>` .. rst-class:: classref-property-setget -- void **set_transient** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_transient** **(** **)** +- |void| **set_transient**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_transient**\ (\ ) If ``true``, the **Window** is transient, i.e. it's considered a child of another **Window**. The transient window will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. @@ -1287,22 +1390,39 @@ Note that behavior might be different depending on the platform. ---- +.. _class_Window_property_transient_to_focused: + +.. rst-class:: classref-property + +:ref:`bool<class_bool>` **transient_to_focused** = ``false`` :ref:`🔗<class_Window_property_transient_to_focused>` + +.. rst-class:: classref-property-setget + +- |void| **set_transient_to_focused**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_transient_to_focused**\ (\ ) + +If ``true``, and the **Window** is :ref:`transient<class_Window_property_transient>`, this window will (at the time of becoming visible) become transient to the currently focused window instead of the immediate parent window in the hierarchy. Note that the transient parent is assigned at the time this window becomes visible, so changing it afterwards has no effect until re-shown. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_transparent: .. rst-class:: classref-property -:ref:`bool<class_bool>` **transparent** = ``false`` +:ref:`bool<class_bool>` **transparent** = ``false`` :ref:`🔗<class_Window_property_transparent>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the **Window**'s background can be transparent. This is best used with embedded windows. \ **Note:** Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. -\ **Note:** This property has no effect if either :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>`, or the window's :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` is set to ``false``. +\ **Note:** This property has no effect if :ref:`ProjectSettings.display/window/per_pixel_transparency/allowed<class_ProjectSettings_property_display/window/per_pixel_transparency/allowed>` is set to ``false``. .. rst-class:: classref-item-separator @@ -1312,12 +1432,12 @@ If ``true``, the **Window**'s background can be transparent. This is best used w .. rst-class:: classref-property -:ref:`bool<class_bool>` **unfocusable** = ``false`` +:ref:`bool<class_bool>` **unfocusable** = ``false`` :ref:`🔗<class_Window_property_unfocusable>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the **Window** can't be focused nor interacted with. It can still be visible. @@ -1329,12 +1449,12 @@ If ``true``, the **Window** can't be focused nor interacted with. It can still b .. rst-class:: classref-property -:ref:`bool<class_bool>` **unresizable** = ``false`` +:ref:`bool<class_bool>` **unresizable** = ``false`` :ref:`🔗<class_Window_property_unresizable>` .. rst-class:: classref-property-setget -- void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** -- :ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +- |void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| If ``true``, the window can't be resized. Minimize and maximize buttons are disabled. @@ -1346,12 +1466,12 @@ If ``true``, the window can't be resized. Minimize and maximize buttons are disa .. rst-class:: classref-property -:ref:`bool<class_bool>` **visible** = ``true`` +:ref:`bool<class_bool>` **visible** = ``true`` :ref:`🔗<class_Window_property_visible>` .. rst-class:: classref-property-setget -- void **set_visible** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_visible** **(** **)** +- |void| **set_visible**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_visible**\ (\ ) If ``true``, the window is visible. @@ -1363,12 +1483,12 @@ If ``true``, the window is visible. .. rst-class:: classref-property -:ref:`bool<class_bool>` **wrap_controls** = ``false`` +:ref:`bool<class_bool>` **wrap_controls** = ``false`` :ref:`🔗<class_Window_property_wrap_controls>` .. rst-class:: classref-property-setget -- void **set_wrap_controls** **(** :ref:`bool<class_bool>` value **)** -- :ref:`bool<class_bool>` **is_wrapping_controls** **(** **)** +- |void| **set_wrap_controls**\ (\ value\: :ref:`bool<class_bool>`\ ) +- :ref:`bool<class_bool>` **is_wrapping_controls**\ (\ ) If ``true``, the window's size will automatically update when a child node is added or removed, ignoring :ref:`min_size<class_Window_property_min_size>` if the new size is bigger. @@ -1383,11 +1503,23 @@ If ``false``, you need to call :ref:`child_controls_changed<class_Window_method_ Method Descriptions ------------------- +.. _class_Window_private_method__get_contents_minimum_size: + +.. rst-class:: classref-method + +:ref:`Vector2<class_Vector2>` **_get_contents_minimum_size**\ (\ ) |virtual| |const| :ref:`🔗<class_Window_private_method__get_contents_minimum_size>` + +Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_add_theme_color_override: .. rst-class:: classref-method -void **add_theme_color_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Color<class_Color>` color **)** +|void| **add_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`, color\: :ref:`Color<class_Color>`\ ) :ref:`🔗<class_Window_method_add_theme_color_override>` Creates a local override for a theme :ref:`Color<class_Color>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override<class_Window_method_remove_theme_color_override>`. @@ -1401,7 +1533,7 @@ See also :ref:`get_theme_color<class_Window_method_get_theme_color>` and :ref:`C .. rst-class:: classref-method -void **add_theme_constant_override** **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` constant **)** +|void| **add_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`, constant\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_constant_override>` Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override<class_Window_method_remove_theme_constant_override>`. @@ -1415,7 +1547,7 @@ See also :ref:`get_theme_constant<class_Window_method_get_theme_constant>`. .. rst-class:: classref-method -void **add_theme_font_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Font<class_Font>` font **)** +|void| **add_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`, font\: :ref:`Font<class_Font>`\ ) :ref:`🔗<class_Window_method_add_theme_font_override>` Creates a local override for a theme :ref:`Font<class_Font>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override<class_Window_method_remove_theme_font_override>`. @@ -1429,7 +1561,7 @@ See also :ref:`get_theme_font<class_Window_method_get_theme_font>`. .. rst-class:: classref-method -void **add_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name, :ref:`int<class_int>` font_size **)** +|void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`, font_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Window_method_add_theme_font_size_override>` Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override<class_Window_method_remove_theme_font_size_override>`. @@ -1443,7 +1575,7 @@ See also :ref:`get_theme_font_size<class_Window_method_get_theme_font_size>`. .. rst-class:: classref-method -void **add_theme_icon_override** **(** :ref:`StringName<class_StringName>` name, :ref:`Texture2D<class_Texture2D>` texture **)** +|void| **add_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`, texture\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_Window_method_add_theme_icon_override>` Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override<class_Window_method_remove_theme_icon_override>`. @@ -1457,7 +1589,7 @@ See also :ref:`get_theme_icon<class_Window_method_get_theme_icon>`. .. rst-class:: classref-method -void **add_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name, :ref:`StyleBox<class_StyleBox>` stylebox **)** +|void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`, stylebox\: :ref:`StyleBox<class_StyleBox>`\ ) :ref:`🔗<class_Window_method_add_theme_stylebox_override>` Creates a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override<class_Window_method_remove_theme_stylebox_override>`. @@ -1471,7 +1603,7 @@ See also :ref:`get_theme_stylebox<class_Window_method_get_theme_stylebox>` and : .. rst-class:: classref-method -void **begin_bulk_theme_override** **(** **)** +|void| **begin_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_begin_bulk_theme_override>` Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED<class_Window_constant_NOTIFICATION_THEME_CHANGED>` until :ref:`end_bulk_theme_override<class_Window_method_end_bulk_theme_override>` is called. @@ -1483,7 +1615,7 @@ Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_C .. rst-class:: classref-method -:ref:`bool<class_bool>` **can_draw** **(** **)** |const| +:ref:`bool<class_bool>` **can_draw**\ (\ ) |const| :ref:`🔗<class_Window_method_can_draw>` Returns whether the window is being drawn to the screen. @@ -1495,7 +1627,7 @@ Returns whether the window is being drawn to the screen. .. rst-class:: classref-method -void **child_controls_changed** **(** **)** +|void| **child_controls_changed**\ (\ ) :ref:`🔗<class_Window_method_child_controls_changed>` Requests an update of the **Window** size to fit underlying :ref:`Control<class_Control>` nodes. @@ -1507,7 +1639,7 @@ Requests an update of the **Window** size to fit underlying :ref:`Control<class_ .. rst-class:: classref-method -void **end_bulk_theme_override** **(** **)** +|void| **end_bulk_theme_override**\ (\ ) :ref:`🔗<class_Window_method_end_bulk_theme_override>` Ends a bulk theme override update. See :ref:`begin_bulk_theme_override<class_Window_method_begin_bulk_theme_override>`. @@ -1519,9 +1651,11 @@ Ends a bulk theme override update. See :ref:`begin_bulk_theme_override<class_Win .. rst-class:: classref-method -:ref:`Vector2<class_Vector2>` **get_contents_minimum_size** **(** **)** |const| +:ref:`Vector2<class_Vector2>` **get_contents_minimum_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_contents_minimum_size>` + +Returns the combined minimum size from the child :ref:`Control<class_Control>` nodes of the window. Use :ref:`child_controls_changed<class_Window_method_child_controls_changed>` to update it when child nodes have changed. -Returns the combined minimum size from the child :ref:`Control<class_Control>` nodes of the window. Use :ref:`child_controls_changed<class_Window_method_child_controls_changed>` to update it when children nodes have changed. +The value returned by this method can be overridden with :ref:`_get_contents_minimum_size<class_Window_private_method__get_contents_minimum_size>`. .. rst-class:: classref-item-separator @@ -1531,7 +1665,7 @@ Returns the combined minimum size from the child :ref:`Control<class_Control>` n .. rst-class:: classref-method -:ref:`bool<class_bool>` **get_flag** **(** :ref:`Flags<enum_Window_Flags>` flag **)** |const| +:ref:`bool<class_bool>` **get_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`\ ) |const| :ref:`🔗<class_Window_method_get_flag>` Returns ``true`` if the ``flag`` is set. @@ -1543,7 +1677,7 @@ Returns ``true`` if the ``flag`` is set. .. rst-class:: classref-method -:ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction** **(** **)** |const| +:ref:`LayoutDirection<enum_Window_LayoutDirection>` **get_layout_direction**\ (\ ) |const| :ref:`🔗<class_Window_method_get_layout_direction>` Returns layout direction and text writing direction. @@ -1555,10 +1689,12 @@ Returns layout direction and text writing direction. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_position_with_decorations** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_position_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_position_with_decorations>` Returns the window's position including its border. +\ **Note:** If :ref:`visible<class_Window_property_visible>` is ``false``, this method returns the same value as :ref:`position<class_Window_property_position>`. + .. rst-class:: classref-item-separator ---- @@ -1567,10 +1703,12 @@ Returns the window's position including its border. .. rst-class:: classref-method -:ref:`Vector2i<class_Vector2i>` **get_size_with_decorations** **(** **)** |const| +:ref:`Vector2i<class_Vector2i>` **get_size_with_decorations**\ (\ ) |const| :ref:`🔗<class_Window_method_get_size_with_decorations>` Returns the window's size including its border. +\ **Note:** If :ref:`visible<class_Window_property_visible>` is ``false``, this method returns the same value as :ref:`size<class_Window_property_size>`. + .. rst-class:: classref-item-separator ---- @@ -1579,7 +1717,7 @@ Returns the window's size including its border. .. rst-class:: classref-method -:ref:`Color<class_Color>` **get_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`Color<class_Color>` **get_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_color>` Returns a :ref:`Color<class_Color>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a color item with the specified ``name`` and ``theme_type``. @@ -1593,7 +1731,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for mor .. rst-class:: classref-method -:ref:`int<class_int>` **get_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`int<class_int>` **get_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_constant>` Returns a constant from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a constant item with the specified ``name`` and ``theme_type``. @@ -1607,7 +1745,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for mor .. rst-class:: classref-method -:ref:`float<class_float>` **get_theme_default_base_scale** **(** **)** |const| +:ref:`float<class_float>` **get_theme_default_base_scale**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_base_scale>` Returns the default base scale value from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_base_scale<class_Theme_property_default_base_scale>` value. @@ -1621,7 +1759,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`Font<class_Font>` **get_theme_default_font** **(** **)** |const| +:ref:`Font<class_Font>` **get_theme_default_font**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font>` Returns the default font from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_font<class_Theme_property_default_font>` value. @@ -1635,7 +1773,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`int<class_int>` **get_theme_default_font_size** **(** **)** |const| +:ref:`int<class_int>` **get_theme_default_font_size**\ (\ ) |const| :ref:`🔗<class_Window_method_get_theme_default_font_size>` Returns the default font size value from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a valid :ref:`Theme.default_font_size<class_Theme_property_default_font_size>` value. @@ -1649,7 +1787,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`Font<class_Font>` **get_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`Font<class_Font>` **get_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font>` Returns a :ref:`Font<class_Font>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a font item with the specified ``name`` and ``theme_type``. @@ -1663,7 +1801,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`int<class_int>` **get_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`int<class_int>` **get_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_font_size>` Returns a font size from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a font size item with the specified ``name`` and ``theme_type``. @@ -1677,7 +1815,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`Texture2D<class_Texture2D>` **get_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`Texture2D<class_Texture2D>` **get_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_icon>` Returns an icon from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has an icon item with the specified ``name`` and ``theme_type``. @@ -1691,7 +1829,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`StyleBox<class_StyleBox>` **get_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`StyleBox<class_StyleBox>` **get_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_get_theme_stylebox>` Returns a :ref:`StyleBox<class_StyleBox>` from the first matching :ref:`Theme<class_Theme>` in the tree if that :ref:`Theme<class_Theme>` has a stylebox item with the specified ``name`` and ``theme_type``. @@ -1705,7 +1843,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`int<class_int>` **get_window_id** **(** **)** |const| +:ref:`int<class_int>` **get_window_id**\ (\ ) |const| :ref:`🔗<class_Window_method_get_window_id>` Returns the ID of the window. @@ -1717,7 +1855,7 @@ Returns the ID of the window. .. rst-class:: classref-method -void **grab_focus** **(** **)** +|void| **grab_focus**\ (\ ) :ref:`🔗<class_Window_method_grab_focus>` Causes the window to grab focus, allowing it to receive user input. @@ -1729,7 +1867,7 @@ Causes the window to grab focus, allowing it to receive user input. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_focus** **(** **)** |const| +:ref:`bool<class_bool>` **has_focus**\ (\ ) |const| :ref:`🔗<class_Window_method_has_focus>` Returns ``true`` if the window is focused. @@ -1741,7 +1879,7 @@ Returns ``true`` if the window is focused. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_color** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_color**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_color>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a color item with the specified ``name`` and ``theme_type``. @@ -1755,7 +1893,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_color_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_color_override>` Returns ``true`` if there is a local override for a theme :ref:`Color<class_Color>` with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1769,7 +1907,7 @@ See :ref:`add_theme_color_override<class_Window_method_add_theme_color_override> .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_constant** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_constant**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a constant item with the specified ``name`` and ``theme_type``. @@ -1783,7 +1921,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_constant_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_constant_override>` Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1797,7 +1935,7 @@ See :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_ove .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_font** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_font**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a font item with the specified ``name`` and ``theme_type``. @@ -1811,7 +1949,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_font_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_override>` Returns ``true`` if there is a local override for a theme :ref:`Font<class_Font>` with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1825,7 +1963,7 @@ See :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>`. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_font_size** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_font_size**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a font size item with the specified ``name`` and ``theme_type``. @@ -1839,7 +1977,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_font_size_override>` Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1853,7 +1991,7 @@ See :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_o .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_icon** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_icon**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has an icon item with the specified ``name`` and ``theme_type``. @@ -1867,7 +2005,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_icon_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_icon_override>` Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1881,7 +2019,7 @@ See :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>`. .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_stylebox** **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` theme_type="" **)** |const| +:ref:`bool<class_bool>` **has_theme_stylebox**\ (\ name\: :ref:`StringName<class_StringName>`, theme_type\: :ref:`StringName<class_StringName>` = &""\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox>` Returns ``true`` if there is a matching :ref:`Theme<class_Theme>` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. @@ -1895,7 +2033,7 @@ See :ref:`Control.get_theme_color<class_Control_method_get_theme_color>` for det .. rst-class:: classref-method -:ref:`bool<class_bool>` **has_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name **)** |const| +:ref:`bool<class_bool>` **has_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_Window_method_has_theme_stylebox_override>` Returns ``true`` if there is a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name`` in this :ref:`Control<class_Control>` node. @@ -1909,7 +2047,7 @@ See :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_ove .. rst-class:: classref-method -void **hide** **(** **)** +|void| **hide**\ (\ ) :ref:`🔗<class_Window_method_hide>` Hides the window. This is not the same as minimized state. Hidden window can't be interacted with and needs to be made visible with :ref:`show<class_Window_method_show>`. @@ -1921,7 +2059,7 @@ Hides the window. This is not the same as minimized state. Hidden window can't b .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_embedded** **(** **)** |const| +:ref:`bool<class_bool>` **is_embedded**\ (\ ) |const| :ref:`🔗<class_Window_method_is_embedded>` Returns ``true`` if the window is currently embedded in another window. @@ -1933,7 +2071,7 @@ Returns ``true`` if the window is currently embedded in another window. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_layout_rtl** **(** **)** |const| +:ref:`bool<class_bool>` **is_layout_rtl**\ (\ ) |const| :ref:`🔗<class_Window_method_is_layout_rtl>` Returns ``true`` if layout is right-to-left. @@ -1945,7 +2083,7 @@ Returns ``true`` if layout is right-to-left. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_maximize_allowed** **(** **)** |const| +:ref:`bool<class_bool>` **is_maximize_allowed**\ (\ ) |const| :ref:`🔗<class_Window_method_is_maximize_allowed>` Returns ``true`` if the window can be maximized (the maximize button is enabled). @@ -1957,7 +2095,7 @@ Returns ``true`` if the window can be maximized (the maximize button is enabled) .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_using_font_oversampling** **(** **)** |const| +:ref:`bool<class_bool>` **is_using_font_oversampling**\ (\ ) |const| :ref:`🔗<class_Window_method_is_using_font_oversampling>` Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversampling<class_Window_method_set_use_font_oversampling>`. @@ -1965,13 +2103,27 @@ Returns ``true`` if font oversampling is enabled. See :ref:`set_use_font_oversam ---- +.. _class_Window_method_move_to_center: + +.. rst-class:: classref-method + +|void| **move_to_center**\ (\ ) :ref:`🔗<class_Window_method_move_to_center>` + +Centers a native window on the current screen and an embedded window on its embedder :ref:`Viewport<class_Viewport>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_move_to_foreground: .. rst-class:: classref-method -void **move_to_foreground** **(** **)** +|void| **move_to_foreground**\ (\ ) :ref:`🔗<class_Window_method_move_to_foreground>` + +**Deprecated:** Use :ref:`grab_focus<class_Window_method_grab_focus>` instead. -Moves the **Window** on top of other windows and focuses it. +Causes the window to grab focus, allowing it to receive user input. .. rst-class:: classref-item-separator @@ -1981,7 +2133,7 @@ Moves the **Window** on top of other windows and focuses it. .. rst-class:: classref-method -void **popup** **(** :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** +|void| **popup**\ (\ rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup>` Shows the **Window** and makes it transient (see :ref:`transient<class_Window_property_transient>`). If ``rect`` is provided, it will be set as the **Window**'s size. Fails if called on the main window. @@ -1993,7 +2145,7 @@ Shows the **Window** and makes it transient (see :ref:`transient<class_Window_pr .. rst-class:: classref-method -void **popup_centered** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** +|void| **popup_centered**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_centered>` Popups the **Window** at the center of the current screen, with optionally given minimum size. If the **Window** is embedded, it will be centered in the parent :ref:`Viewport<class_Viewport>` instead. @@ -2007,7 +2159,7 @@ Popups the **Window** at the center of the current screen, with optionally given .. rst-class:: classref-method -void **popup_centered_clamped** **(** :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** +|void| **popup_centered_clamped**\ (\ minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_centered_clamped>` Popups the **Window** centered inside its parent **Window**. ``fallback_ratio`` determines the maximum size of the **Window**, in relation to its parent. @@ -2021,7 +2173,7 @@ Popups the **Window** centered inside its parent **Window**. ``fallback_ratio`` .. rst-class:: classref-method -void **popup_centered_ratio** **(** :ref:`float<class_float>` ratio=0.8 **)** +|void| **popup_centered_ratio**\ (\ ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_centered_ratio>` If **Window** is embedded, popups the **Window** centered inside its embedder and sets its size as a ``ratio`` of embedder's size. @@ -2035,7 +2187,7 @@ If **Window** is a native window, popups the **Window** centered inside the scre .. rst-class:: classref-method -void **popup_exclusive** **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` rect=Rect2i(0, 0, 0, 0) **)** +|void| **popup_exclusive**\ (\ from_node\: :ref:`Node<class_Node>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive>` Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup<class_Window_method_popup>` on it. The dialog must have no current parent, otherwise the method fails. @@ -2049,7 +2201,7 @@ See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when .. rst-class:: classref-method -void **popup_exclusive_centered** **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0) **)** +|void| **popup_exclusive_centered**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered>` Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered<class_Window_method_popup_centered>` on it. The dialog must have no current parent, otherwise the method fails. @@ -2063,7 +2215,7 @@ See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when .. rst-class:: classref-method -void **popup_exclusive_centered_clamped** **(** :ref:`Node<class_Node>` from_node, :ref:`Vector2i<class_Vector2i>` minsize=Vector2i(0, 0), :ref:`float<class_float>` fallback_ratio=0.75 **)** +|void| **popup_exclusive_centered_clamped**\ (\ from_node\: :ref:`Node<class_Node>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_clamped>` Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_clamped<class_Window_method_popup_centered_clamped>` on it. The dialog must have no current parent, otherwise the method fails. @@ -2077,7 +2229,7 @@ See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when .. rst-class:: classref-method -void **popup_exclusive_centered_ratio** **(** :ref:`Node<class_Node>` from_node, :ref:`float<class_float>` ratio=0.8 **)** +|void| **popup_exclusive_centered_ratio**\ (\ from_node\: :ref:`Node<class_Node>`, ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_Window_method_popup_exclusive_centered_ratio>` Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_ratio<class_Window_method_popup_centered_ratio>` on it. The dialog must have no current parent, otherwise the method fails. @@ -2091,7 +2243,7 @@ See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when .. rst-class:: classref-method -void **popup_exclusive_on_parent** **(** :ref:`Node<class_Node>` from_node, :ref:`Rect2i<class_Rect2i>` parent_rect **)** +|void| **popup_exclusive_on_parent**\ (\ from_node\: :ref:`Node<class_Node>`, parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_exclusive_on_parent>` Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_on_parent<class_Window_method_popup_on_parent>` on it. The dialog must have no current parent, otherwise the method fails. @@ -2105,7 +2257,7 @@ See also :ref:`set_unparent_when_invisible<class_Window_method_set_unparent_when .. rst-class:: classref-method -void **popup_on_parent** **(** :ref:`Rect2i<class_Rect2i>` parent_rect **)** +|void| **popup_on_parent**\ (\ parent_rect\: :ref:`Rect2i<class_Rect2i>`\ ) :ref:`🔗<class_Window_method_popup_on_parent>` Popups the **Window** with a position shifted by parent **Window**'s position. If the **Window** is embedded, has the same effect as :ref:`popup<class_Window_method_popup>`. @@ -2117,7 +2269,7 @@ Popups the **Window** with a position shifted by parent **Window**'s position. I .. rst-class:: classref-method -void **remove_theme_color_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_color_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_color_override>` Removes a local override for a theme :ref:`Color<class_Color>` with the specified ``name`` previously added by :ref:`add_theme_color_override<class_Window_method_add_theme_color_override>` or via the Inspector dock. @@ -2129,7 +2281,7 @@ Removes a local override for a theme :ref:`Color<class_Color>` with the specifie .. rst-class:: classref-method -void **remove_theme_constant_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_constant_override>` Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override<class_Window_method_add_theme_constant_override>` or via the Inspector dock. @@ -2141,7 +2293,7 @@ Removes a local override for a theme constant with the specified ``name`` previo .. rst-class:: classref-method -void **remove_theme_font_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_font_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_override>` Removes a local override for a theme :ref:`Font<class_Font>` with the specified ``name`` previously added by :ref:`add_theme_font_override<class_Window_method_add_theme_font_override>` or via the Inspector dock. @@ -2153,7 +2305,7 @@ Removes a local override for a theme :ref:`Font<class_Font>` with the specified .. rst-class:: classref-method -void **remove_theme_font_size_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_font_size_override>` Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override<class_Window_method_add_theme_font_size_override>` or via the Inspector dock. @@ -2165,7 +2317,7 @@ Removes a local override for a theme font size with the specified ``name`` previ .. rst-class:: classref-method -void **remove_theme_icon_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_icon_override>` Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override<class_Window_method_add_theme_icon_override>` or via the Inspector dock. @@ -2177,7 +2329,7 @@ Removes a local override for a theme icon with the specified ``name`` previously .. rst-class:: classref-method -void **remove_theme_stylebox_override** **(** :ref:`StringName<class_StringName>` name **)** +|void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName<class_StringName>`\ ) :ref:`🔗<class_Window_method_remove_theme_stylebox_override>` Removes a local override for a theme :ref:`StyleBox<class_StyleBox>` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override<class_Window_method_add_theme_stylebox_override>` or via the Inspector dock. @@ -2189,7 +2341,7 @@ Removes a local override for a theme :ref:`StyleBox<class_StyleBox>` with the sp .. rst-class:: classref-method -void **request_attention** **(** **)** +|void| **request_attention**\ (\ ) :ref:`🔗<class_Window_method_request_attention>` Tells the OS that the **Window** needs an attention. This makes the window stand out in some way depending on the system, e.g. it might blink on the task bar. @@ -2201,7 +2353,7 @@ Tells the OS that the **Window** needs an attention. This makes the window stand .. rst-class:: classref-method -void **reset_size** **(** **)** +|void| **reset_size**\ (\ ) :ref:`🔗<class_Window_method_reset_size>` Resets the size to the minimum size, which is the max of :ref:`min_size<class_Window_property_min_size>` and (if :ref:`wrap_controls<class_Window_property_wrap_controls>` is enabled) :ref:`get_contents_minimum_size<class_Window_method_get_contents_minimum_size>`. This is equivalent to calling ``set_size(Vector2i())`` (or any size below the minimum). @@ -2213,7 +2365,7 @@ Resets the size to the minimum size, which is the max of :ref:`min_size<class_Wi .. rst-class:: classref-method -void **set_flag** **(** :ref:`Flags<enum_Window_Flags>` flag, :ref:`bool<class_bool>` enabled **)** +|void| **set_flag**\ (\ flag\: :ref:`Flags<enum_Window_Flags>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_flag>` Sets a specified window flag. @@ -2225,7 +2377,7 @@ Sets a specified window flag. .. rst-class:: classref-method -void **set_ime_active** **(** :ref:`bool<class_bool>` active **)** +|void| **set_ime_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_ime_active>` If ``active`` is ``true``, enables system's native IME (Input Method Editor). @@ -2237,7 +2389,7 @@ If ``active`` is ``true``, enables system's native IME (Input Method Editor). .. rst-class:: classref-method -void **set_ime_position** **(** :ref:`Vector2i<class_Vector2i>` position **)** +|void| **set_ime_position**\ (\ position\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Window_method_set_ime_position>` Moves IME to the given position. @@ -2249,7 +2401,7 @@ Moves IME to the given position. .. rst-class:: classref-method -void **set_layout_direction** **(** :ref:`LayoutDirection<enum_Window_LayoutDirection>` direction **)** +|void| **set_layout_direction**\ (\ direction\: :ref:`LayoutDirection<enum_Window_LayoutDirection>`\ ) :ref:`🔗<class_Window_method_set_layout_direction>` Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). @@ -2261,7 +2413,7 @@ Sets layout direction and text writing direction. Right-to-left layouts are nece .. rst-class:: classref-method -void **set_unparent_when_invisible** **(** :ref:`bool<class_bool>` unparent **)** +|void| **set_unparent_when_invisible**\ (\ unparent\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_unparent_when_invisible>` If ``unparent`` is ``true``, the window is automatically unparented when going invisible. @@ -2275,7 +2427,7 @@ If ``unparent`` is ``true``, the window is automatically unparented when going i .. rst-class:: classref-method -void **set_use_font_oversampling** **(** :ref:`bool<class_bool>` enable **)** +|void| **set_use_font_oversampling**\ (\ enable\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_Window_method_set_use_font_oversampling>` Enables font oversampling. This makes fonts look better when they are scaled up. @@ -2287,7 +2439,7 @@ Enables font oversampling. This makes fonts look better when they are scaled up. .. rst-class:: classref-method -void **show** **(** **)** +|void| **show**\ (\ ) :ref:`🔗<class_Window_method_show>` Makes the **Window** appear. This enables interactions with the **Window** and doesn't change any of its property other than visibility (unlike e.g. :ref:`popup<class_Window_method_popup>`). @@ -2304,7 +2456,7 @@ Theme Property Descriptions .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` +:ref:`Color<class_Color>` **title_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_Window_theme_color_title_color>` The color of the title's text. @@ -2316,7 +2468,7 @@ The color of the title's text. .. rst-class:: classref-themeproperty -:ref:`Color<class_Color>` **title_outline_modulate** = ``Color(1, 1, 1, 1)`` +:ref:`Color<class_Color>` **title_outline_modulate** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_Window_theme_color_title_outline_modulate>` The color of the title's text outline. @@ -2328,7 +2480,7 @@ The color of the title's text outline. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **close_h_offset** = ``18`` +:ref:`int<class_int>` **close_h_offset** = ``18`` :ref:`🔗<class_Window_theme_constant_close_h_offset>` Horizontal position offset of the close button. @@ -2340,7 +2492,7 @@ Horizontal position offset of the close button. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **close_v_offset** = ``24`` +:ref:`int<class_int>` **close_v_offset** = ``24`` :ref:`🔗<class_Window_theme_constant_close_v_offset>` Vertical position offset of the close button. @@ -2352,7 +2504,7 @@ Vertical position offset of the close button. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **resize_margin** = ``4`` +:ref:`int<class_int>` **resize_margin** = ``4`` :ref:`🔗<class_Window_theme_constant_resize_margin>` Defines the outside margin at which the window border can be grabbed with mouse and resized. @@ -2364,7 +2516,7 @@ Defines the outside margin at which the window border can be grabbed with mouse .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **title_height** = ``36`` +:ref:`int<class_int>` **title_height** = ``36`` :ref:`🔗<class_Window_theme_constant_title_height>` Height of the title bar. @@ -2376,7 +2528,7 @@ Height of the title bar. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **title_outline_size** = ``0`` +:ref:`int<class_int>` **title_outline_size** = ``0`` :ref:`🔗<class_Window_theme_constant_title_outline_size>` The size of the title outline. @@ -2388,7 +2540,7 @@ The size of the title outline. .. rst-class:: classref-themeproperty -:ref:`Font<class_Font>` **title_font** +:ref:`Font<class_Font>` **title_font** :ref:`🔗<class_Window_theme_font_title_font>` The font used to draw the title. @@ -2400,7 +2552,7 @@ The font used to draw the title. .. rst-class:: classref-themeproperty -:ref:`int<class_int>` **title_font_size** +:ref:`int<class_int>` **title_font_size** :ref:`🔗<class_Window_theme_font_size_title_font_size>` The size of the title font. @@ -2412,7 +2564,7 @@ The size of the title font. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **close** +:ref:`Texture2D<class_Texture2D>` **close** :ref:`🔗<class_Window_theme_icon_close>` The icon for the close button. @@ -2424,7 +2576,7 @@ The icon for the close button. .. rst-class:: classref-themeproperty -:ref:`Texture2D<class_Texture2D>` **close_pressed** +:ref:`Texture2D<class_Texture2D>` **close_pressed** :ref:`🔗<class_Window_theme_icon_close_pressed>` The icon for the close button when it's being pressed. @@ -2436,7 +2588,7 @@ The icon for the close button when it's being pressed. .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **embedded_border** +:ref:`StyleBox<class_StyleBox>` **embedded_border** :ref:`🔗<class_Window_theme_style_embedded_border>` The background style used when the **Window** is embedded. Note that this is drawn only under the window's content, excluding the title. For proper borders and title bar style, you can use ``expand_margin_*`` properties of :ref:`StyleBoxFlat<class_StyleBoxFlat>`. @@ -2450,7 +2602,7 @@ The background style used when the **Window** is embedded. Note that this is dra .. rst-class:: classref-themeproperty -:ref:`StyleBox<class_StyleBox>` **embedded_unfocused_border** +:ref:`StyleBox<class_StyleBox>` **embedded_unfocused_border** :ref:`🔗<class_Window_theme_style_embedded_unfocused_border>` The background style used when the **Window** is embedded and unfocused. @@ -2461,3 +2613,4 @@ The background style used when the **Window** is embedded and unfocused. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_workerthreadpool.rst b/classes/class_workerthreadpool.rst index 6e2cda3d480..8aa1dbc4af8 100644 --- a/classes/class_workerthreadpool.rst +++ b/classes/class_workerthreadpool.rst @@ -83,21 +83,21 @@ Methods .. table:: :widths: auto - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_group_task<class_WorkerThreadPool_method_add_group_task>` **(** :ref:`Callable<class_Callable>` action, :ref:`int<class_int>` elements, :ref:`int<class_int>` tasks_needed=-1, :ref:`bool<class_bool>` high_priority=false, :ref:`String<class_String>` description="" **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`add_task<class_WorkerThreadPool_method_add_task>` **(** :ref:`Callable<class_Callable>` action, :ref:`bool<class_bool>` high_priority=false, :ref:`String<class_String>` description="" **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_group_processed_element_count<class_WorkerThreadPool_method_get_group_processed_element_count>` **(** :ref:`int<class_int>` group_id **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_group_task_completed<class_WorkerThreadPool_method_is_group_task_completed>` **(** :ref:`int<class_int>` group_id **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_task_completed<class_WorkerThreadPool_method_is_task_completed>` **(** :ref:`int<class_int>` task_id **)** |const| | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`wait_for_group_task_completion<class_WorkerThreadPool_method_wait_for_group_task_completion>` **(** :ref:`int<class_int>` group_id **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`wait_for_task_completion<class_WorkerThreadPool_method_wait_for_task_completion>` **(** :ref:`int<class_int>` task_id **)** | - +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_group_task<class_WorkerThreadPool_method_add_group_task>`\ (\ action\: :ref:`Callable<class_Callable>`, elements\: :ref:`int<class_int>`, tasks_needed\: :ref:`int<class_int>` = -1, high_priority\: :ref:`bool<class_bool>` = false, description\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`add_task<class_WorkerThreadPool_method_add_task>`\ (\ action\: :ref:`Callable<class_Callable>`, high_priority\: :ref:`bool<class_bool>` = false, description\: :ref:`String<class_String>` = ""\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_group_processed_element_count<class_WorkerThreadPool_method_get_group_processed_element_count>`\ (\ group_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_group_task_completed<class_WorkerThreadPool_method_is_group_task_completed>`\ (\ group_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_task_completed<class_WorkerThreadPool_method_is_task_completed>`\ (\ task_id\: :ref:`int<class_int>`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`wait_for_group_task_completion<class_WorkerThreadPool_method_wait_for_group_task_completion>`\ (\ group_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`wait_for_task_completion<class_WorkerThreadPool_method_wait_for_task_completion>`\ (\ task_id\: :ref:`int<class_int>`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,7 +112,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int<class_int>` **add_group_task** **(** :ref:`Callable<class_Callable>` action, :ref:`int<class_int>` elements, :ref:`int<class_int>` tasks_needed=-1, :ref:`bool<class_bool>` high_priority=false, :ref:`String<class_String>` description="" **)** +:ref:`int<class_int>` **add_group_task**\ (\ action\: :ref:`Callable<class_Callable>`, elements\: :ref:`int<class_int>`, tasks_needed\: :ref:`int<class_int>` = -1, high_priority\: :ref:`bool<class_bool>` = false, description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_WorkerThreadPool_method_add_group_task>` Adds ``action`` as a group task to be executed by the worker threads. The :ref:`Callable<class_Callable>` will be called a number of times based on ``elements``, with the first thread calling it with the value ``0`` as a parameter, and each consecutive execution incrementing this value by 1 until it reaches ``element - 1``. @@ -120,6 +120,8 @@ The number of threads the task is distributed to is defined by ``tasks_needed``, Returns a group task ID that can be used by other methods. +\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion<class_WorkerThreadPool_method_wait_for_task_completion>` or :ref:`wait_for_group_task_completion<class_WorkerThreadPool_method_wait_for_group_task_completion>` at some point so that any allocated resources inside the task can be cleaned up. + .. rst-class:: classref-item-separator ---- @@ -128,12 +130,14 @@ Returns a group task ID that can be used by other methods. .. rst-class:: classref-method -:ref:`int<class_int>` **add_task** **(** :ref:`Callable<class_Callable>` action, :ref:`bool<class_bool>` high_priority=false, :ref:`String<class_String>` description="" **)** +:ref:`int<class_int>` **add_task**\ (\ action\: :ref:`Callable<class_Callable>`, high_priority\: :ref:`bool<class_bool>` = false, description\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_WorkerThreadPool_method_add_task>` Adds ``action`` as a task to be executed by a worker thread. ``high_priority`` determines if the task has a high priority or a low priority (default). You can optionally provide a ``description`` to help with debugging. Returns a task ID that can be used by other methods. +\ **Warning:** Every task must be waited for completion using :ref:`wait_for_task_completion<class_WorkerThreadPool_method_wait_for_task_completion>` or :ref:`wait_for_group_task_completion<class_WorkerThreadPool_method_wait_for_group_task_completion>` at some point so that any allocated resources inside the task can be cleaned up. + .. rst-class:: classref-item-separator ---- @@ -142,7 +146,7 @@ Returns a task ID that can be used by other methods. .. rst-class:: classref-method -:ref:`int<class_int>` **get_group_processed_element_count** **(** :ref:`int<class_int>` group_id **)** |const| +:ref:`int<class_int>` **get_group_processed_element_count**\ (\ group_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WorkerThreadPool_method_get_group_processed_element_count>` Returns how many times the :ref:`Callable<class_Callable>` of the group task with the given ID has already been executed by the worker threads. @@ -156,10 +160,12 @@ Returns how many times the :ref:`Callable<class_Callable>` of the group task wit .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_group_task_completed** **(** :ref:`int<class_int>` group_id **)** |const| +:ref:`bool<class_bool>` **is_group_task_completed**\ (\ group_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WorkerThreadPool_method_is_group_task_completed>` Returns ``true`` if the group task with the given ID is completed. +\ **Note:** You should only call this method between adding the group task and awaiting its completion. + .. rst-class:: classref-item-separator ---- @@ -168,10 +174,12 @@ Returns ``true`` if the group task with the given ID is completed. .. rst-class:: classref-method -:ref:`bool<class_bool>` **is_task_completed** **(** :ref:`int<class_int>` task_id **)** |const| +:ref:`bool<class_bool>` **is_task_completed**\ (\ task_id\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_WorkerThreadPool_method_is_task_completed>` Returns ``true`` if the task with the given ID is completed. +\ **Note:** You should only call this method between adding the task and awaiting its completion. + .. rst-class:: classref-item-separator ---- @@ -180,7 +188,7 @@ Returns ``true`` if the task with the given ID is completed. .. rst-class:: classref-method -void **wait_for_group_task_completion** **(** :ref:`int<class_int>` group_id **)** +|void| **wait_for_group_task_completion**\ (\ group_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WorkerThreadPool_method_wait_for_group_task_completion>` Pauses the thread that calls this method until the group task with the given ID is completed. @@ -192,7 +200,7 @@ Pauses the thread that calls this method until the group task with the given ID .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **wait_for_task_completion** **(** :ref:`int<class_int>` task_id **)** +:ref:`Error<enum_@GlobalScope_Error>` **wait_for_task_completion**\ (\ task_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_WorkerThreadPool_method_wait_for_task_completion>` Pauses the thread that calls this method until the task with the given ID is completed. @@ -200,7 +208,7 @@ Returns :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` if the task could Returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER<class_@GlobalScope_constant_ERR_INVALID_PARAMETER>` if a task with the passed ID does not exist (maybe because it was already awaited and disposed of). -Returns :ref:`@GlobalScope.ERR_BUSY<class_@GlobalScope_constant_ERR_BUSY>` if the call is made from another running task and, due to task scheduling, the task to await is at a lower level in the call stack and therefore can't progress. This is an advanced situation that should only matter when some tasks depend on others. +Returns :ref:`@GlobalScope.ERR_BUSY<class_@GlobalScope_constant_ERR_BUSY>` if the call is made from another running task and, due to task scheduling, there's potential for deadlocking (e.g., the task to await may be at a lower level in the call stack and therefore can't progress). This is an advanced situation that should only matter when some tasks depend on others (in the current implementation, the tricky case is a task trying to wait on an older one). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -209,3 +217,4 @@ Returns :ref:`@GlobalScope.ERR_BUSY<class_@GlobalScope_constant_ERR_BUSY>` if th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_world2d.rst b/classes/class_world2d.rst index 48dd71d1b67..4413b96eda5 100644 --- a/classes/class_world2d.rst +++ b/classes/class_world2d.rst @@ -59,11 +59,11 @@ Property Descriptions .. rst-class:: classref-property -:ref:`RID<class_RID>` **canvas** +:ref:`RID<class_RID>` **canvas** :ref:`🔗<class_World2D_property_canvas>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_canvas** **(** **)** +- :ref:`RID<class_RID>` **get_canvas**\ (\ ) The :ref:`RID<class_RID>` of this world's canvas resource. Used by the :ref:`RenderingServer<class_RenderingServer>` for 2D drawing. @@ -75,13 +75,13 @@ The :ref:`RID<class_RID>` of this world's canvas resource. Used by the :ref:`Ren .. rst-class:: classref-property -:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **direct_space_state** +:ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **direct_space_state** :ref:`🔗<class_World2D_property_direct_space_state>` .. rst-class:: classref-property-setget -- :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **get_direct_space_state** **(** **)** +- :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **get_direct_space_state**\ (\ ) -Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process<class_Node_method__physics_process>` in the main thread. +Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process<class_Node_private_method__physics_process>` in the main thread. .. rst-class:: classref-item-separator @@ -91,11 +91,11 @@ Direct access to the world's physics 2D space state. Used for querying current a .. rst-class:: classref-property -:ref:`RID<class_RID>` **navigation_map** +:ref:`RID<class_RID>` **navigation_map** :ref:`🔗<class_World2D_property_navigation_map>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_navigation_map** **(** **)** +- :ref:`RID<class_RID>` **get_navigation_map**\ (\ ) The :ref:`RID<class_RID>` of this world's navigation map. Used by the :ref:`NavigationServer2D<class_NavigationServer2D>`. @@ -107,11 +107,11 @@ The :ref:`RID<class_RID>` of this world's navigation map. Used by the :ref:`Navi .. rst-class:: classref-property -:ref:`RID<class_RID>` **space** +:ref:`RID<class_RID>` **space** :ref:`🔗<class_World2D_property_space>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_space** **(** **)** +- :ref:`RID<class_RID>` **get_space**\ (\ ) The :ref:`RID<class_RID>` of this world's physics space resource. Used by the :ref:`PhysicsServer2D<class_PhysicsServer2D>` for 2D physics, treating it as both a space and an area. @@ -122,3 +122,4 @@ The :ref:`RID<class_RID>` of this world's physics space resource. Used by the :r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_world3d.rst b/classes/class_world3d.rst index 0e66f4ca58e..db863832d08 100644 --- a/classes/class_world3d.rst +++ b/classes/class_world3d.rst @@ -65,12 +65,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** +:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** :ref:`🔗<class_World3D_property_camera_attributes>` .. rst-class:: classref-property-setget -- void **set_camera_attributes** **(** :ref:`CameraAttributes<class_CameraAttributes>` value **)** -- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes** **(** **)** +- |void| **set_camera_attributes**\ (\ value\: :ref:`CameraAttributes<class_CameraAttributes>`\ ) +- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes**\ (\ ) The default :ref:`CameraAttributes<class_CameraAttributes>` resource to use if none set on the :ref:`Camera3D<class_Camera3D>`. @@ -82,13 +82,13 @@ The default :ref:`CameraAttributes<class_CameraAttributes>` resource to use if n .. rst-class:: classref-property -:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **direct_space_state** +:ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **direct_space_state** :ref:`🔗<class_World3D_property_direct_space_state>` .. rst-class:: classref-property-setget -- :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **get_direct_space_state** **(** **)** +- :ref:`PhysicsDirectSpaceState3D<class_PhysicsDirectSpaceState3D>` **get_direct_space_state**\ (\ ) -Direct access to the world's physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process<class_Node_method__physics_process>` in the main thread. +Direct access to the world's physics 3D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to :ref:`Node._physics_process<class_Node_private_method__physics_process>` in the main thread. .. rst-class:: classref-item-separator @@ -98,12 +98,12 @@ Direct access to the world's physics 3D space state. Used for querying current a .. rst-class:: classref-property -:ref:`Environment<class_Environment>` **environment** +:ref:`Environment<class_Environment>` **environment** :ref:`🔗<class_World3D_property_environment>` .. rst-class:: classref-property-setget -- void **set_environment** **(** :ref:`Environment<class_Environment>` value **)** -- :ref:`Environment<class_Environment>` **get_environment** **(** **)** +- |void| **set_environment**\ (\ value\: :ref:`Environment<class_Environment>`\ ) +- :ref:`Environment<class_Environment>` **get_environment**\ (\ ) The World3D's :ref:`Environment<class_Environment>`. @@ -115,12 +115,12 @@ The World3D's :ref:`Environment<class_Environment>`. .. rst-class:: classref-property -:ref:`Environment<class_Environment>` **fallback_environment** +:ref:`Environment<class_Environment>` **fallback_environment** :ref:`🔗<class_World3D_property_fallback_environment>` .. rst-class:: classref-property-setget -- void **set_fallback_environment** **(** :ref:`Environment<class_Environment>` value **)** -- :ref:`Environment<class_Environment>` **get_fallback_environment** **(** **)** +- |void| **set_fallback_environment**\ (\ value\: :ref:`Environment<class_Environment>`\ ) +- :ref:`Environment<class_Environment>` **get_fallback_environment**\ (\ ) The World3D's fallback environment will be used if :ref:`environment<class_World3D_property_environment>` fails or is missing. @@ -132,11 +132,11 @@ The World3D's fallback environment will be used if :ref:`environment<class_World .. rst-class:: classref-property -:ref:`RID<class_RID>` **navigation_map** +:ref:`RID<class_RID>` **navigation_map** :ref:`🔗<class_World3D_property_navigation_map>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_navigation_map** **(** **)** +- :ref:`RID<class_RID>` **get_navigation_map**\ (\ ) The :ref:`RID<class_RID>` of this world's navigation map. Used by the :ref:`NavigationServer3D<class_NavigationServer3D>`. @@ -148,11 +148,11 @@ The :ref:`RID<class_RID>` of this world's navigation map. Used by the :ref:`Navi .. rst-class:: classref-property -:ref:`RID<class_RID>` **scenario** +:ref:`RID<class_RID>` **scenario** :ref:`🔗<class_World3D_property_scenario>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_scenario** **(** **)** +- :ref:`RID<class_RID>` **get_scenario**\ (\ ) The World3D's visual scenario. @@ -164,11 +164,11 @@ The World3D's visual scenario. .. rst-class:: classref-property -:ref:`RID<class_RID>` **space** +:ref:`RID<class_RID>` **space** :ref:`🔗<class_World3D_property_space>` .. rst-class:: classref-property-setget -- :ref:`RID<class_RID>` **get_space** **(** **)** +- :ref:`RID<class_RID>` **get_space**\ (\ ) The World3D's physics space. @@ -179,3 +179,4 @@ The World3D's physics space. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_worldboundaryshape2d.rst b/classes/class_worldboundaryshape2d.rst index 7df38521e85..27f0f15b4a7 100644 --- a/classes/class_worldboundaryshape2d.rst +++ b/classes/class_worldboundaryshape2d.rst @@ -48,12 +48,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float<class_float>` **distance** = ``0.0`` +:ref:`float<class_float>` **distance** = ``0.0`` :ref:`🔗<class_WorldBoundaryShape2D_property_distance>` .. rst-class:: classref-property-setget -- void **set_distance** **(** :ref:`float<class_float>` value **)** -- :ref:`float<class_float>` **get_distance** **(** **)** +- |void| **set_distance**\ (\ value\: :ref:`float<class_float>`\ ) +- :ref:`float<class_float>` **get_distance**\ (\ ) The distance from the origin to the line, expressed in terms of :ref:`normal<class_WorldBoundaryShape2D_property_normal>` (according to its direction and magnitude). Actual absolute distance from the origin to the line can be calculated as ``abs(distance) / normal.length()``. @@ -67,14 +67,14 @@ In the scalar equation of the line ``ax + by = d``, this is ``d``, while the ``( .. rst-class:: classref-property -:ref:`Vector2<class_Vector2>` **normal** = ``Vector2(0, -1)`` +:ref:`Vector2<class_Vector2>` **normal** = ``Vector2(0, -1)`` :ref:`🔗<class_WorldBoundaryShape2D_property_normal>` .. rst-class:: classref-property-setget -- void **set_normal** **(** :ref:`Vector2<class_Vector2>` value **)** -- :ref:`Vector2<class_Vector2>` **get_normal** **(** **)** +- |void| **set_normal**\ (\ value\: :ref:`Vector2<class_Vector2>`\ ) +- :ref:`Vector2<class_Vector2>` **get_normal**\ (\ ) -The line's normal, typically a unit vector. Its direction indicates the non-colliding half-plane. Can be of any length but zero. Defaults to ``Vector2.UP``. +The line's normal, typically a unit vector. Its direction indicates the non-colliding half-plane. Can be of any length but zero. Defaults to :ref:`Vector2.UP<class_Vector2_constant_UP>`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -83,3 +83,4 @@ The line's normal, typically a unit vector. Its direction indicates the non-coll .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_worldboundaryshape3d.rst b/classes/class_worldboundaryshape3d.rst index 62d4d912a24..2b3b11222e5 100644 --- a/classes/class_worldboundaryshape3d.rst +++ b/classes/class_worldboundaryshape3d.rst @@ -46,12 +46,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Plane<class_Plane>` **plane** = ``Plane(0, 1, 0, 0)`` +:ref:`Plane<class_Plane>` **plane** = ``Plane(0, 1, 0, 0)`` :ref:`🔗<class_WorldBoundaryShape3D_property_plane>` .. rst-class:: classref-property-setget -- void **set_plane** **(** :ref:`Plane<class_Plane>` value **)** -- :ref:`Plane<class_Plane>` **get_plane** **(** **)** +- |void| **set_plane**\ (\ value\: :ref:`Plane<class_Plane>`\ ) +- :ref:`Plane<class_Plane>` **get_plane**\ (\ ) The :ref:`Plane<class_Plane>` used by the **WorldBoundaryShape3D** for collision. @@ -62,3 +62,4 @@ The :ref:`Plane<class_Plane>` used by the **WorldBoundaryShape3D** for collision .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_worldenvironment.rst b/classes/class_worldenvironment.rst index d957c6a09b2..3d149e818e5 100644 --- a/classes/class_worldenvironment.rst +++ b/classes/class_worldenvironment.rst @@ -1,5 +1,8 @@ :github_url: hide +.. meta:: + :keywords: background, sky + .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. @@ -32,11 +35,9 @@ Tutorials - :doc:`Environment and post-processing <../tutorials/3d/environment_and_post_processing>` -- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/123>`__ - -- `2D HDR Demo <https://godotengine.org/asset-library/asset/110>`__ +- `3D Material Testers Demo <https://godotengine.org/asset-library/asset/2742>`__ -- `Third Person Shooter Demo <https://godotengine.org/asset-library/asset/678>`__ +- `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__ .. rst-class:: classref-reftable-group @@ -49,6 +50,8 @@ Properties +-------------------------------------------------+-----------------------------------------------------------------------------+ | :ref:`CameraAttributes<class_CameraAttributes>` | :ref:`camera_attributes<class_WorldEnvironment_property_camera_attributes>` | +-------------------------------------------------+-----------------------------------------------------------------------------+ + | :ref:`Compositor<class_Compositor>` | :ref:`compositor<class_WorldEnvironment_property_compositor>` | + +-------------------------------------------------+-----------------------------------------------------------------------------+ | :ref:`Environment<class_Environment>` | :ref:`environment<class_WorldEnvironment_property_environment>` | +-------------------------------------------------+-----------------------------------------------------------------------------+ @@ -65,12 +68,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** +:ref:`CameraAttributes<class_CameraAttributes>` **camera_attributes** :ref:`🔗<class_WorldEnvironment_property_camera_attributes>` .. rst-class:: classref-property-setget -- void **set_camera_attributes** **(** :ref:`CameraAttributes<class_CameraAttributes>` value **)** -- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes** **(** **)** +- |void| **set_camera_attributes**\ (\ value\: :ref:`CameraAttributes<class_CameraAttributes>`\ ) +- :ref:`CameraAttributes<class_CameraAttributes>` **get_camera_attributes**\ (\ ) The default :ref:`CameraAttributes<class_CameraAttributes>` resource to use if none set on the :ref:`Camera3D<class_Camera3D>`. @@ -78,16 +81,33 @@ The default :ref:`CameraAttributes<class_CameraAttributes>` resource to use if n ---- +.. _class_WorldEnvironment_property_compositor: + +.. rst-class:: classref-property + +:ref:`Compositor<class_Compositor>` **compositor** :ref:`🔗<class_WorldEnvironment_property_compositor>` + +.. rst-class:: classref-property-setget + +- |void| **set_compositor**\ (\ value\: :ref:`Compositor<class_Compositor>`\ ) +- :ref:`Compositor<class_Compositor>` **get_compositor**\ (\ ) + +The default :ref:`Compositor<class_Compositor>` resource to use if none set on the :ref:`Camera3D<class_Camera3D>`. + +.. rst-class:: classref-item-separator + +---- + .. _class_WorldEnvironment_property_environment: .. rst-class:: classref-property -:ref:`Environment<class_Environment>` **environment** +:ref:`Environment<class_Environment>` **environment** :ref:`🔗<class_WorldEnvironment_property_environment>` .. rst-class:: classref-property-setget -- void **set_environment** **(** :ref:`Environment<class_Environment>` value **)** -- :ref:`Environment<class_Environment>` **get_environment** **(** **)** +- |void| **set_environment**\ (\ value\: :ref:`Environment<class_Environment>`\ ) +- :ref:`Environment<class_Environment>` **get_environment**\ (\ ) The :ref:`Environment<class_Environment>` resource used by this **WorldEnvironment**, defining the default properties. @@ -98,3 +118,4 @@ The :ref:`Environment<class_Environment>` resource used by this **WorldEnvironme .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_x509certificate.rst b/classes/class_x509certificate.rst index ffe0dbf26b3..e7814580293 100644 --- a/classes/class_x509certificate.rst +++ b/classes/class_x509certificate.rst @@ -23,6 +23,13 @@ The X509Certificate class represents an X509 certificate. Certificates can be lo They can be used as the server certificate in :ref:`StreamPeerTLS.accept_stream<class_StreamPeerTLS_method_accept_stream>` (along with the proper :ref:`CryptoKey<class_CryptoKey>`), and to specify the only certificate that should be accepted when connecting to a TLS server via :ref:`StreamPeerTLS.connect_to_stream<class_StreamPeerTLS_method_connect_to_stream>`. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`SSL certificates <../tutorials/networking/ssl_certificates>` + .. rst-class:: classref-reftable-group Methods @@ -31,15 +38,15 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_X509Certificate_method_load>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_from_string<class_X509Certificate_method_load_from_string>` **(** :ref:`String<class_String>` string **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_X509Certificate_method_save>` **(** :ref:`String<class_String>` path **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`save_to_string<class_X509Certificate_method_save_to_string>` **(** **)** | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load<class_X509Certificate_method_load>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_from_string<class_X509Certificate_method_load_from_string>`\ (\ string\: :ref:`String<class_String>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save<class_X509Certificate_method_save>`\ (\ path\: :ref:`String<class_String>`\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`save_to_string<class_X509Certificate_method_save_to_string>`\ (\ ) | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,7 +61,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **load**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_X509Certificate_method_load>` Loads a certificate from ``path`` ("\*.crt" file). @@ -66,7 +73,7 @@ Loads a certificate from ``path`` ("\*.crt" file). .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **load_from_string** **(** :ref:`String<class_String>` string **)** +:ref:`Error<enum_@GlobalScope_Error>` **load_from_string**\ (\ string\: :ref:`String<class_String>`\ ) :ref:`🔗<class_X509Certificate_method_load_from_string>` Loads a certificate from the given ``string``. @@ -78,7 +85,7 @@ Loads a certificate from the given ``string``. .. rst-class:: classref-method -:ref:`Error<enum_@GlobalScope_Error>` **save** **(** :ref:`String<class_String>` path **)** +:ref:`Error<enum_@GlobalScope_Error>` **save**\ (\ path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_X509Certificate_method_save>` Saves a certificate to the given ``path`` (should be a "\*.crt" file). @@ -90,7 +97,7 @@ Saves a certificate to the given ``path`` (should be a "\*.crt" file). .. rst-class:: classref-method -:ref:`String<class_String>` **save_to_string** **(** **)** +:ref:`String<class_String>` **save_to_string**\ (\ ) :ref:`🔗<class_X509Certificate_method_save_to_string>` Returns a string representation of the certificate, or an empty string if the certificate is invalid. @@ -101,3 +108,4 @@ Returns a string representation of the certificate, or an empty string if the ce .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xmlparser.rst b/classes/class_xmlparser.rst index 79fd73c8cfe..6fe88965d4c 100644 --- a/classes/class_xmlparser.rst +++ b/classes/class_xmlparser.rst @@ -14,8 +14,6 @@ XMLParser Provides a low-level interface for creating parsers for XML files. -Low-level class for creating parsers for `XML <https://en.wikipedia.org/wiki/XML>`__ files. - .. rst-class:: classref-introduction-group Description @@ -23,6 +21,45 @@ Description Provides a low-level interface for creating parsers for `XML <https://en.wikipedia.org/wiki/XML>`__ files. This class can serve as base to make custom XML parsers. +To parse XML, you must open a file with the :ref:`open<class_XMLParser_method_open>` method or a buffer with the :ref:`open_buffer<class_XMLParser_method_open_buffer>` method. Then, the :ref:`read<class_XMLParser_method_read>` method must be called to parse the next nodes. Most of the methods take into consideration the currently parsed node. + +Here is an example of using **XMLParser** to parse an SVG file (which is based on XML), printing each element and its attributes as a dictionary: + + +.. tabs:: + + .. code-tab:: gdscript + + var parser = XMLParser.new() + parser.open("path/to/file.svg") + while parser.read() != ERR_FILE_EOF: + if parser.get_node_type() == XMLParser.NODE_ELEMENT: + var node_name = parser.get_node_name() + var attributes_dict = {} + for idx in range(parser.get_attribute_count()): + attributes_dict[parser.get_attribute_name(idx)] = parser.get_attribute_value(idx) + print("The ", node_name, " element has the following attributes: ", attributes_dict) + + .. code-tab:: csharp + + var parser = new XmlParser(); + parser.Open("path/to/file.svg"); + while (parser.Read() != Error.FileEof) + { + if (parser.GetNodeType() == XmlParser.NodeType.Element) + { + var nodeName = parser.GetNodeName(); + var attributesDict = new Godot.Collections.Dictionary(); + for (int idx = 0; idx < parser.GetAttributeCount(); idx++) + { + attributesDict[parser.GetAttributeName(idx)] = parser.GetAttributeValue(idx); + } + GD.Print($"The {nodeName} element has the following attributes: {attributesDict}"); + } + } + + + .. rst-class:: classref-reftable-group Methods @@ -31,41 +68,41 @@ Methods .. table:: :widths: auto - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_attribute_count<class_XMLParser_method_get_attribute_count>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_attribute_name<class_XMLParser_method_get_attribute_name>` **(** :ref:`int<class_int>` idx **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_attribute_value<class_XMLParser_method_get_attribute_value>` **(** :ref:`int<class_int>` idx **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_current_line<class_XMLParser_method_get_current_line>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_named_attribute_value<class_XMLParser_method_get_named_attribute_value>` **(** :ref:`String<class_String>` name **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_named_attribute_value_safe<class_XMLParser_method_get_named_attribute_value_safe>` **(** :ref:`String<class_String>` name **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_node_data<class_XMLParser_method_get_node_data>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String<class_String>` | :ref:`get_node_name<class_XMLParser_method_get_node_name>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int<class_int>` | :ref:`get_node_offset<class_XMLParser_method_get_node_offset>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodeType<enum_XMLParser_NodeType>` | :ref:`get_node_type<class_XMLParser_method_get_node_type>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`has_attribute<class_XMLParser_method_has_attribute>` **(** :ref:`String<class_String>` name **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool<class_bool>` | :ref:`is_empty<class_XMLParser_method_is_empty>` **(** **)** |const| | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`open<class_XMLParser_method_open>` **(** :ref:`String<class_String>` file **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`open_buffer<class_XMLParser_method_open_buffer>` **(** :ref:`PackedByteArray<class_PackedByteArray>` buffer **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`read<class_XMLParser_method_read>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`seek<class_XMLParser_method_seek>` **(** :ref:`int<class_int>` position **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skip_section<class_XMLParser_method_skip_section>` **(** **)** | - +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_attribute_count<class_XMLParser_method_get_attribute_count>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_attribute_name<class_XMLParser_method_get_attribute_name>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_attribute_value<class_XMLParser_method_get_attribute_value>`\ (\ idx\: :ref:`int<class_int>`\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_current_line<class_XMLParser_method_get_current_line>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_named_attribute_value<class_XMLParser_method_get_named_attribute_value>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_named_attribute_value_safe<class_XMLParser_method_get_named_attribute_value_safe>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_node_data<class_XMLParser_method_get_node_data>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String<class_String>` | :ref:`get_node_name<class_XMLParser_method_get_node_name>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int<class_int>` | :ref:`get_node_offset<class_XMLParser_method_get_node_offset>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodeType<enum_XMLParser_NodeType>` | :ref:`get_node_type<class_XMLParser_method_get_node_type>`\ (\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`has_attribute<class_XMLParser_method_has_attribute>`\ (\ name\: :ref:`String<class_String>`\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool<class_bool>` | :ref:`is_empty<class_XMLParser_method_is_empty>`\ (\ ) |const| | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`open<class_XMLParser_method_open>`\ (\ file\: :ref:`String<class_String>`\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`open_buffer<class_XMLParser_method_open_buffer>`\ (\ buffer\: :ref:`PackedByteArray<class_PackedByteArray>`\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`read<class_XMLParser_method_read>`\ (\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`seek<class_XMLParser_method_seek>`\ (\ position\: :ref:`int<class_int>`\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`skip_section<class_XMLParser_method_skip_section>`\ (\ ) | + +------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,7 +117,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **NodeType**: +enum **NodeType**: :ref:`🔗<enum_XMLParser_NodeType>` .. _class_XMLParser_constant_NODE_NONE: @@ -96,7 +133,7 @@ There's no node (no file or buffer opened). :ref:`NodeType<enum_XMLParser_NodeType>` **NODE_ELEMENT** = ``1`` -Element (tag). +An element node type, also known as a tag, e.g. ``<title>``. .. _class_XMLParser_constant_NODE_ELEMENT_END: @@ -104,7 +141,7 @@ Element (tag). :ref:`NodeType<enum_XMLParser_NodeType>` **NODE_ELEMENT_END** = ``2`` -End of element. +An end of element node type, e.g. ````. .. _class_XMLParser_constant_NODE_TEXT: @@ -112,7 +149,7 @@ End of element. :ref:`NodeType` **NODE_TEXT** = ``3`` -Text node. +A text node type, i.e. text that is not inside an element. This includes whitespace. .. _class_XMLParser_constant_NODE_COMMENT: @@ -120,7 +157,7 @@ Text node. :ref:`NodeType` **NODE_COMMENT** = ``4`` -Comment node. +A comment node type, e.g. ````. .. _class_XMLParser_constant_NODE_CDATA: @@ -128,7 +165,7 @@ Comment node. :ref:`NodeType` **NODE_CDATA** = ``5`` -CDATA content. +A node type for CDATA (Character Data) sections, e.g. ````. .. _class_XMLParser_constant_NODE_UNKNOWN: @@ -136,7 +173,7 @@ CDATA content. :ref:`NodeType` **NODE_UNKNOWN** = ``6`` -Unknown node. +An unknown node type. .. rst-class:: classref-section-separator @@ -151,9 +188,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **get_attribute_count** **(** **)** |const| +:ref:`int` **get_attribute_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of attributes in the currently parsed element. -Gets the number of attributes in the current element. +\ **Note:** If this method is used while the currently parsed node is not :ref:`NODE_ELEMENT` or :ref:`NODE_ELEMENT_END`, this count will not be updated and will still reflect the last element. .. rst-class:: classref-item-separator @@ -163,9 +202,9 @@ Gets the number of attributes in the current element. .. rst-class:: classref-method -:ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** |const| +:ref:`String` **get_attribute_name**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` -Gets the name of the attribute specified by the ``idx`` index. +Returns the name of an attribute of the currently parsed element, specified by the ``idx`` index. .. rst-class:: classref-item-separator @@ -175,9 +214,9 @@ Gets the name of the attribute specified by the ``idx`` index. .. rst-class:: classref-method -:ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** |const| +:ref:`String` **get_attribute_value**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` -Gets the value of the attribute specified by the ``idx`` index. +Returns the value of an attribute of the currently parsed element, specified by the ``idx`` index. .. rst-class:: classref-item-separator @@ -187,9 +226,9 @@ Gets the value of the attribute specified by the ``idx`` index. .. rst-class:: classref-method -:ref:`int` **get_current_line** **(** **)** |const| +:ref:`int` **get_current_line**\ (\ ) |const| :ref:`🔗` -Gets the current line in the parsed file, counting from 0. +Returns the current line in the parsed file, counting from 0. .. rst-class:: classref-item-separator @@ -199,9 +238,9 @@ Gets the current line in the parsed file, counting from 0. .. rst-class:: classref-method -:ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** |const| +:ref:`String` **get_named_attribute_value**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` -Gets the value of a certain attribute of the current element by ``name``. This will raise an error if the element has no such attribute. +Returns the value of an attribute of the currently parsed element, specified by its ``name``. This method will raise an error if the element has no such attribute. .. rst-class:: classref-item-separator @@ -211,9 +250,9 @@ Gets the value of a certain attribute of the current element by ``name``. This w .. rst-class:: classref-method -:ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** |const| +:ref:`String` **get_named_attribute_value_safe**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` -Gets the value of a certain attribute of the current element by ``name``. This will return an empty :ref:`String` if the attribute is not found. +Returns the value of an attribute of the currently parsed element, specified by its ``name``. This method will return an empty string if the element has no such attribute. .. rst-class:: classref-item-separator @@ -223,9 +262,9 @@ Gets the value of a certain attribute of the current element by ``name``. This w .. rst-class:: classref-method -:ref:`String` **get_node_data** **(** **)** |const| +:ref:`String` **get_node_data**\ (\ ) |const| :ref:`🔗` -Gets the contents of a text node. This will raise an error in any other type of node. +Returns the contents of a text node. This method will raise an error if the current parsed node is of any other type. .. rst-class:: classref-item-separator @@ -235,9 +274,11 @@ Gets the contents of a text node. This will raise an error in any other type of .. rst-class:: classref-method -:ref:`String` **get_node_name** **(** **)** |const| +:ref:`String` **get_node_name**\ (\ ) |const| :ref:`🔗` + +Returns the name of a node. This method will raise an error if the currently parsed node is a text node. -Gets the name of the current element node. This will raise an error if the current node type is neither :ref:`NODE_ELEMENT` nor :ref:`NODE_ELEMENT_END`. +\ **Note:** The content of a :ref:`NODE_CDATA` node and the comment string of a :ref:`NODE_COMMENT` node are also considered names. .. rst-class:: classref-item-separator @@ -247,9 +288,9 @@ Gets the name of the current element node. This will raise an error if the curre .. rst-class:: classref-method -:ref:`int` **get_node_offset** **(** **)** |const| +:ref:`int` **get_node_offset**\ (\ ) |const| :ref:`🔗` -Gets the byte offset of the current node since the beginning of the file or buffer. +Returns the byte offset of the currently parsed node since the beginning of the file or buffer. This is usually equivalent to the number of characters before the read position. .. rst-class:: classref-item-separator @@ -259,9 +300,9 @@ Gets the byte offset of the current node since the beginning of the file or buff .. rst-class:: classref-method -:ref:`NodeType` **get_node_type** **(** **)** +:ref:`NodeType` **get_node_type**\ (\ ) :ref:`🔗` -Gets the type of the current node. Compare with :ref:`NodeType` constants. +Returns the type of the current node. Compare with :ref:`NodeType` constants. .. rst-class:: classref-item-separator @@ -271,9 +312,9 @@ Gets the type of the current node. Compare with :ref:`NodeType` **has_attribute** **(** :ref:`String` name **)** |const| +:ref:`bool` **has_attribute**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` -Check whether the current element has a certain attribute. +Returns ``true`` if the currently parsed element has an attribute with the ``name``. .. rst-class:: classref-item-separator @@ -283,9 +324,9 @@ Check whether the current element has a certain attribute. .. rst-class:: classref-method -:ref:`bool` **is_empty** **(** **)** |const| +:ref:`bool` **is_empty**\ (\ ) |const| :ref:`🔗` -Check whether the current element is empty (this only works for completely empty tags, e.g. ````). +Returns ``true`` if the currently parsed element is empty, e.g. ````. .. rst-class:: classref-item-separator @@ -295,9 +336,9 @@ Check whether the current element is empty (this only works for completely empty .. rst-class:: classref-method -:ref:`Error` **open** **(** :ref:`String` file **)** +:ref:`Error` **open**\ (\ file\: :ref:`String`\ ) :ref:`🔗` -Opens an XML ``file`` for parsing. This returns an error code. +Opens an XML ``file`` for parsing. This method returns an error code. .. rst-class:: classref-item-separator @@ -307,9 +348,9 @@ Opens an XML ``file`` for parsing. This returns an error code. .. rst-class:: classref-method -:ref:`Error` **open_buffer** **(** :ref:`PackedByteArray` buffer **)** +:ref:`Error` **open_buffer**\ (\ buffer\: :ref:`PackedByteArray`\ ) :ref:`🔗` -Opens an XML raw ``buffer`` for parsing. This returns an error code. +Opens an XML raw ``buffer`` for parsing. This method returns an error code. .. rst-class:: classref-item-separator @@ -319,9 +360,9 @@ Opens an XML raw ``buffer`` for parsing. This returns an error code. .. rst-class:: classref-method -:ref:`Error` **read** **(** **)** +:ref:`Error` **read**\ (\ ) :ref:`🔗` -Reads the next node of the file. This returns an error code. +Parses the next node in the file. This method returns an error code. .. rst-class:: classref-item-separator @@ -331,9 +372,9 @@ Reads the next node of the file. This returns an error code. .. rst-class:: classref-method -:ref:`Error` **seek** **(** :ref:`int` position **)** +:ref:`Error` **seek**\ (\ position\: :ref:`int`\ ) :ref:`🔗` -Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. +Moves the buffer cursor to a certain offset (since the beginning) and reads the next node there. This method returns an error code. .. rst-class:: classref-item-separator @@ -343,9 +384,9 @@ Moves the buffer cursor to a certain offset (since the beginning) and read the n .. rst-class:: classref-method -void **skip_section** **(** **)** +|void| **skip_section**\ (\ ) :ref:`🔗` -Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element. +Skips the current section. If the currently parsed node contains more inner nodes, they will be ignored and the cursor will go to the closing of the current element. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -354,3 +395,4 @@ Skips the current section. If the node contains other elements, they will be ign .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xranchor3d.rst b/classes/class_xranchor3d.rst index 8fb9ca261c2..5af1357d395 100644 --- a/classes/class_xranchor3d.rst +++ b/classes/class_xranchor3d.rst @@ -19,12 +19,19 @@ An anchor point in AR space. Description ----------- -The **XRAnchor3D** 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. +The **XRAnchor3D** point is an :ref:`XRNode3D` 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; the nodes will simply remain on 0,0,0 until a plane is recognized. 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. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + .. rst-class:: classref-reftable-group Methods @@ -33,11 +40,11 @@ Methods .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------+ - | :ref:`Plane` | :ref:`get_plane` **(** **)** |const| | - +-------------------------------+-------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_size` **(** **)** |const| | - +-------------------------------+-------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------+ + | :ref:`Plane` | :ref:`get_plane`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_size`\ (\ ) |const| | + +-------------------------------+-------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +59,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Plane` **get_plane** **(** **)** |const| +:ref:`Plane` **get_plane**\ (\ ) |const| :ref:`🔗` Returns a plane aligned with our anchor; handy for intersection testing. @@ -64,7 +71,7 @@ Returns a plane aligned with our anchor; handy for intersection testing. .. rst-class:: classref-method -:ref:`Vector3` **get_size** **(** **)** |const| +:ref:`Vector3` **get_size**\ (\ ) |const| :ref:`🔗` Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table. @@ -75,3 +82,4 @@ Returns the estimated size of the plane that was detected. Say when the anchor r .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrbodymodifier3d.rst b/classes/class_xrbodymodifier3d.rst new file mode 100644 index 00000000000..13768cfcb82 --- /dev/null +++ b/classes/class_xrbodymodifier3d.rst @@ -0,0 +1,189 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRBodyModifier3D.xml. + +.. _class_XRBodyModifier3D: + +XRBodyModifier3D +================ + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A node for driving body meshes from :ref:`XRBodyTracker` data. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This node uses body tracking data from an :ref:`XRBodyTracker` to pose the skeleton of a body mesh. + +Positioning of the body is performed by creating an :ref:`XRNode3D` ancestor of the body mesh driven by the same :ref:`XRBodyTracker`. + +The body tracking position-data is scaled by :ref:`Skeleton3D.motion_scale` when applied to the skeleton, which can be used to adjust the tracked body to match the scale of the body model. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------------------------------------+-------------------------------------------------------------------+---------------------------+ + | :ref:`StringName` | :ref:`body_tracker` | ``&"/user/body_tracker"`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------+---------------------------+ + | |bitfield|\[:ref:`BodyUpdate`\] | :ref:`body_update` | ``7`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------+---------------------------+ + | :ref:`BoneUpdate` | :ref:`bone_update` | ``0`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------+---------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_XRBodyModifier3D_BodyUpdate: + +.. rst-class:: classref-enumeration + +flags **BodyUpdate**: :ref:`🔗` + +.. _class_XRBodyModifier3D_constant_BODY_UPDATE_UPPER_BODY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyUpdate` **BODY_UPDATE_UPPER_BODY** = ``1`` + +The skeleton's upper body joints are updated. + +.. _class_XRBodyModifier3D_constant_BODY_UPDATE_LOWER_BODY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyUpdate` **BODY_UPDATE_LOWER_BODY** = ``2`` + +The skeleton's lower body joints are updated. + +.. _class_XRBodyModifier3D_constant_BODY_UPDATE_HANDS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyUpdate` **BODY_UPDATE_HANDS** = ``4`` + +The skeleton's hand joints are updated. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_XRBodyModifier3D_BoneUpdate: + +.. rst-class:: classref-enumeration + +enum **BoneUpdate**: :ref:`🔗` + +.. _class_XRBodyModifier3D_constant_BONE_UPDATE_FULL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_FULL** = ``0`` + +The skeleton's bones are fully updated (both position and rotation) to match the tracked bones. + +.. _class_XRBodyModifier3D_constant_BONE_UPDATE_ROTATION_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_ROTATION_ONLY** = ``1`` + +The skeleton's bones are only rotated to align with the tracked bones, preserving bone length. + +.. _class_XRBodyModifier3D_constant_BONE_UPDATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_MAX** = ``2`` + +Represents the size of the :ref:`BoneUpdate` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRBodyModifier3D_property_body_tracker: + +.. rst-class:: classref-property + +:ref:`StringName` **body_tracker** = ``&"/user/body_tracker"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_body_tracker**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_body_tracker**\ (\ ) + +The name of the :ref:`XRBodyTracker` registered with :ref:`XRServer` to obtain the body tracking data from. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyModifier3D_property_body_update: + +.. rst-class:: classref-property + +|bitfield|\[:ref:`BodyUpdate`\] **body_update** = ``7`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_body_update**\ (\ value\: |bitfield|\[:ref:`BodyUpdate`\]\ ) +- |bitfield|\[:ref:`BodyUpdate`\] **get_body_update**\ (\ ) + +Specifies the body parts to update. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyModifier3D_property_bone_update: + +.. rst-class:: classref-property + +:ref:`BoneUpdate` **bone_update** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_bone_update**\ (\ value\: :ref:`BoneUpdate`\ ) +- :ref:`BoneUpdate` **get_bone_update**\ (\ ) + +Specifies the type of updates to perform on the bones. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrbodytracker.rst b/classes/class_xrbodytracker.rst new file mode 100644 index 00000000000..4d7b877ec90 --- /dev/null +++ b/classes/class_xrbodytracker.rst @@ -0,0 +1,875 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRBodyTracker.xml. + +.. _class_XRBodyTracker: + +XRBodyTracker +============= + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`XRPositionalTracker` **<** :ref:`XRTracker` **<** :ref:`RefCounted` **<** :ref:`Object` + +A tracked body in XR. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A body tracking system will create an instance of this object and add it to the :ref:`XRServer`. This tracking system will then obtain skeleton data, convert it to the Godot Humanoid skeleton and store this data on the **XRBodyTracker** object. + +Use :ref:`XRBodyModifier3D` to animate a body mesh using body tracking data. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------+--------------------------------------------------------------------------+--------------------------------------------------------------------+ + | |bitfield|\[:ref:`BodyFlags`\] | :ref:`body_flags` | ``0`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+--------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_tracking_data` | ``false`` | + +--------------------------------------------------------------+--------------------------------------------------------------------------+--------------------------------------------------------------------+ + | :ref:`TrackerType` | type | ``32`` (overrides :ref:`XRTracker`) | + +--------------------------------------------------------------+--------------------------------------------------------------------------+--------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`JointFlags`\] | :ref:`get_joint_flags`\ (\ joint\: :ref:`Joint`\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_joint_transform`\ (\ joint\: :ref:`Joint`\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_flags`\ (\ joint\: :ref:`Joint`, flags\: |bitfield|\[:ref:`JointFlags`\]\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_joint_transform`\ (\ joint\: :ref:`Joint`, transform\: :ref:`Transform3D`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_XRBodyTracker_BodyFlags: + +.. rst-class:: classref-enumeration + +flags **BodyFlags**: :ref:`🔗` + +.. _class_XRBodyTracker_constant_BODY_FLAG_UPPER_BODY_SUPPORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyFlags` **BODY_FLAG_UPPER_BODY_SUPPORTED** = ``1`` + +Upper body tracking supported. + +.. _class_XRBodyTracker_constant_BODY_FLAG_LOWER_BODY_SUPPORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyFlags` **BODY_FLAG_LOWER_BODY_SUPPORTED** = ``2`` + +Lower body tracking supported. + +.. _class_XRBodyTracker_constant_BODY_FLAG_HANDS_SUPPORTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BodyFlags` **BODY_FLAG_HANDS_SUPPORTED** = ``4`` + +Hand tracking supported. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_XRBodyTracker_Joint: + +.. rst-class:: classref-enumeration + +enum **Joint**: :ref:`🔗` + +.. _class_XRBodyTracker_constant_JOINT_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_ROOT** = ``0`` + +Root joint. + +.. _class_XRBodyTracker_constant_JOINT_HIPS: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_HIPS** = ``1`` + +Hips joint. + +.. _class_XRBodyTracker_constant_JOINT_SPINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_SPINE** = ``2`` + +Spine joint. + +.. _class_XRBodyTracker_constant_JOINT_CHEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_CHEST** = ``3`` + +Chest joint. + +.. _class_XRBodyTracker_constant_JOINT_UPPER_CHEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_UPPER_CHEST** = ``4`` + +Upper chest joint. + +.. _class_XRBodyTracker_constant_JOINT_NECK: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_NECK** = ``5`` + +Neck joint. + +.. _class_XRBodyTracker_constant_JOINT_HEAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_HEAD** = ``6`` + +Head joint. + +.. _class_XRBodyTracker_constant_JOINT_HEAD_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_HEAD_TIP** = ``7`` + +Head tip joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_SHOULDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_SHOULDER** = ``8`` + +Left shoulder joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_UPPER_ARM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_UPPER_ARM** = ``9`` + +Left upper arm joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_LOWER_ARM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_LOWER_ARM** = ``10`` + +Left lower arm joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_SHOULDER: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_SHOULDER** = ``11`` + +Right shoulder joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_UPPER_ARM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_UPPER_ARM** = ``12`` + +Right upper arm joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_LOWER_ARM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_LOWER_ARM** = ``13`` + +Right lower arm joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_UPPER_LEG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_UPPER_LEG** = ``14`` + +Left upper leg joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_LOWER_LEG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_LOWER_LEG** = ``15`` + +Left lower leg joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_FOOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_FOOT** = ``16`` + +Left foot joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_TOES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_TOES** = ``17`` + +Left toes joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_UPPER_LEG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_UPPER_LEG** = ``18`` + +Right upper leg joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_LOWER_LEG: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_LOWER_LEG** = ``19`` + +Right lower leg joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_FOOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_FOOT** = ``20`` + +Right foot joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_TOES: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_TOES** = ``21`` + +Right toes joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_HAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_HAND** = ``22`` + +Left hand joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PALM** = ``23`` + +Left palm joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_WRIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_WRIST** = ``24`` + +Left wrist joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_THUMB_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_THUMB_METACARPAL** = ``25`` + +Left thumb metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_THUMB_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_THUMB_PHALANX_PROXIMAL** = ``26`` + +Left thumb phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_THUMB_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_THUMB_PHALANX_DISTAL** = ``27`` + +Left thumb phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_THUMB_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_THUMB_TIP** = ``28`` + +Left thumb tip joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_INDEX_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_INDEX_FINGER_METACARPAL** = ``29`` + +Left index finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_INDEX_FINGER_PHALANX_PROXIMAL** = ``30`` + +Left index finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_INDEX_FINGER_PHALANX_INTERMEDIATE** = ``31`` + +Left index finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_INDEX_FINGER_PHALANX_DISTAL** = ``32`` + +Left index finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_INDEX_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_INDEX_FINGER_TIP** = ``33`` + +Left index finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_MIDDLE_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_MIDDLE_FINGER_METACARPAL** = ``34`` + +Left middle finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_MIDDLE_FINGER_PHALANX_PROXIMAL** = ``35`` + +Left middle finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_MIDDLE_FINGER_PHALANX_INTERMEDIATE** = ``36`` + +Left middle finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_MIDDLE_FINGER_PHALANX_DISTAL** = ``37`` + +Left middle finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_MIDDLE_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_MIDDLE_FINGER_TIP** = ``38`` + +Left middle finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_RING_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_RING_FINGER_METACARPAL** = ``39`` + +Left ring finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_RING_FINGER_PHALANX_PROXIMAL** = ``40`` + +Left ring finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_RING_FINGER_PHALANX_INTERMEDIATE** = ``41`` + +Left ring finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_RING_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_RING_FINGER_PHALANX_DISTAL** = ``42`` + +Left ring finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_RING_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_RING_FINGER_TIP** = ``43`` + +Left ring finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PINKY_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PINKY_FINGER_METACARPAL** = ``44`` + +Left pinky finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PINKY_FINGER_PHALANX_PROXIMAL** = ``45`` + +Left pinky finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PINKY_FINGER_PHALANX_INTERMEDIATE** = ``46`` + +Left pinky finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PINKY_FINGER_PHALANX_DISTAL** = ``47`` + +Left pinky finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_LEFT_PINKY_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_LEFT_PINKY_FINGER_TIP** = ``48`` + +Left pinky finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_HAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_HAND** = ``49`` + +Right hand joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PALM** = ``50`` + +Right palm joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_WRIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_WRIST** = ``51`` + +Right wrist joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_THUMB_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_THUMB_METACARPAL** = ``52`` + +Right thumb metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_THUMB_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_THUMB_PHALANX_PROXIMAL** = ``53`` + +Right thumb phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_THUMB_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_THUMB_PHALANX_DISTAL** = ``54`` + +Right thumb phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_THUMB_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_THUMB_TIP** = ``55`` + +Right thumb tip joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_INDEX_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_INDEX_FINGER_METACARPAL** = ``56`` + +Right index finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_INDEX_FINGER_PHALANX_PROXIMAL** = ``57`` + +Right index finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_INDEX_FINGER_PHALANX_INTERMEDIATE** = ``58`` + +Right index finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_INDEX_FINGER_PHALANX_DISTAL** = ``59`` + +Right index finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_INDEX_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_INDEX_FINGER_TIP** = ``60`` + +Right index finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_MIDDLE_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_MIDDLE_FINGER_METACARPAL** = ``61`` + +Right middle finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_MIDDLE_FINGER_PHALANX_PROXIMAL** = ``62`` + +Right middle finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_MIDDLE_FINGER_PHALANX_INTERMEDIATE** = ``63`` + +Right middle finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_MIDDLE_FINGER_PHALANX_DISTAL** = ``64`` + +Right middle finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_MIDDLE_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_MIDDLE_FINGER_TIP** = ``65`` + +Right middle finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_RING_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_RING_FINGER_METACARPAL** = ``66`` + +Right ring finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_RING_FINGER_PHALANX_PROXIMAL** = ``67`` + +Right ring finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_RING_FINGER_PHALANX_INTERMEDIATE** = ``68`` + +Right ring finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_RING_FINGER_PHALANX_DISTAL** = ``69`` + +Right ring finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_RING_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_RING_FINGER_TIP** = ``70`` + +Right ring finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PINKY_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PINKY_FINGER_METACARPAL** = ``71`` + +Right pinky finger metacarpal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PINKY_FINGER_PHALANX_PROXIMAL** = ``72`` + +Right pinky finger phalanx proximal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PINKY_FINGER_PHALANX_INTERMEDIATE** = ``73`` + +Right pinky finger phalanx intermediate joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PINKY_FINGER_PHALANX_DISTAL** = ``74`` + +Right pinky finger phalanx distal joint. + +.. _class_XRBodyTracker_constant_JOINT_RIGHT_PINKY_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_RIGHT_PINKY_FINGER_TIP** = ``75`` + +Right pinky finger tip joint. + +.. _class_XRBodyTracker_constant_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`Joint` **JOINT_MAX** = ``76`` + +Represents the size of the :ref:`Joint` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_XRBodyTracker_JointFlags: + +.. rst-class:: classref-enumeration + +flags **JointFlags**: :ref:`🔗` + +.. _class_XRBodyTracker_constant_JOINT_FLAG_ORIENTATION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointFlags` **JOINT_FLAG_ORIENTATION_VALID** = ``1`` + +The joint's orientation data is valid. + +.. _class_XRBodyTracker_constant_JOINT_FLAG_ORIENTATION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointFlags` **JOINT_FLAG_ORIENTATION_TRACKED** = ``2`` + +The joint's orientation is actively tracked. May not be set if tracking has been temporarily lost. + +.. _class_XRBodyTracker_constant_JOINT_FLAG_POSITION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointFlags` **JOINT_FLAG_POSITION_VALID** = ``4`` + +The joint's position data is valid. + +.. _class_XRBodyTracker_constant_JOINT_FLAG_POSITION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`JointFlags` **JOINT_FLAG_POSITION_TRACKED** = ``8`` + +The joint's position is actively tracked. May not be set if tracking has been temporarily lost. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRBodyTracker_property_body_flags: + +.. rst-class:: classref-property + +|bitfield|\[:ref:`BodyFlags`\] **body_flags** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_body_flags**\ (\ value\: |bitfield|\[:ref:`BodyFlags`\]\ ) +- |bitfield|\[:ref:`BodyFlags`\] **get_body_flags**\ (\ ) + +The type of body tracking data captured. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyTracker_property_has_tracking_data: + +.. rst-class:: classref-property + +:ref:`bool` **has_tracking_data** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_has_tracking_data**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_has_tracking_data**\ (\ ) + +If ``true``, the body tracking data is valid. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_XRBodyTracker_method_get_joint_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`JointFlags`\] **get_joint_flags**\ (\ joint\: :ref:`Joint`\ ) |const| :ref:`🔗` + +Returns flags about the validity of the tracking data for the given body joint (see :ref:`JointFlags`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyTracker_method_get_joint_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D` **get_joint_transform**\ (\ joint\: :ref:`Joint`\ ) |const| :ref:`🔗` + +Returns the transform for the given body joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyTracker_method_set_joint_flags: + +.. rst-class:: classref-method + +|void| **set_joint_flags**\ (\ joint\: :ref:`Joint`, flags\: |bitfield|\[:ref:`JointFlags`\]\ ) :ref:`🔗` + +Sets flags about the validity of the tracking data for the given body joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRBodyTracker_method_set_joint_transform: + +.. rst-class:: classref-method + +|void| **set_joint_transform**\ (\ joint\: :ref:`Joint`, transform\: :ref:`Transform3D`\ ) :ref:`🔗` + +Sets the transform for the given body joint. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrcamera3d.rst b/classes/class_xrcamera3d.rst index 5f795fec90a..b48e455be69 100644 --- a/classes/class_xrcamera3d.rst +++ b/classes/class_xrcamera3d.rst @@ -37,3 +37,4 @@ Tutorials .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrcontroller3d.rst b/classes/class_xrcontroller3d.rst index 6c270f2f95a..9c6da2a530d 100644 --- a/classes/class_xrcontroller3d.rst +++ b/classes/class_xrcontroller3d.rst @@ -42,17 +42,17 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_float` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_input` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TrackerHand` | :ref:`get_tracker_hand` **(** **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_vector2` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_button_pressed` **(** :ref:`StringName` name **)** |const| | - +----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_float`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_input`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TrackerHand` | :ref:`get_tracker_hand`\ (\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_vector2`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_button_pressed`\ (\ name\: :ref:`StringName`\ ) |const| | + +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,7 +67,7 @@ Signals .. rst-class:: classref-signal -**button_pressed** **(** :ref:`String` name **)** +**button_pressed**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Emitted when a button on this controller is pressed. @@ -79,7 +79,7 @@ Emitted when a button on this controller is pressed. .. rst-class:: classref-signal -**button_released** **(** :ref:`String` name **)** +**button_released**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Emitted when a button on this controller is released. @@ -91,7 +91,7 @@ Emitted when a button on this controller is released. .. rst-class:: classref-signal -**input_float_changed** **(** :ref:`String` name, :ref:`float` value **)** +**input_float_changed**\ (\ name\: :ref:`String`, value\: :ref:`float`\ ) :ref:`🔗` Emitted when a trigger or similar input on this controller changes value. @@ -103,10 +103,22 @@ Emitted when a trigger or similar input on this controller changes value. .. rst-class:: classref-signal -**input_vector2_changed** **(** :ref:`String` name, :ref:`Vector2` value **)** +**input_vector2_changed**\ (\ name\: :ref:`String`, value\: :ref:`Vector2`\ ) :ref:`🔗` Emitted when a thumbstick or thumbpad on this controller is moved. +.. rst-class:: classref-item-separator + +---- + +.. _class_XRController3D_signal_profile_changed: + +.. rst-class:: classref-signal + +**profile_changed**\ (\ role\: :ref:`String`\ ) :ref:`🔗` + +Emitted when the interaction profile on this controller is changed. + .. rst-class:: classref-section-separator ---- @@ -120,7 +132,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **get_float** **(** :ref:`StringName` name **)** |const| +:ref:`float` **get_float**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns a numeric value for the input with the given ``name``. This is used for triggers and grip sensors. @@ -132,7 +144,7 @@ Returns a numeric value for the input with the given ``name``. This is used for .. rst-class:: classref-method -:ref:`Variant` **get_input** **(** :ref:`StringName` name **)** |const| +:ref:`Variant` **get_input**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns a :ref:`Variant` for the input with the given ``name``. This works for any input type, the variant will be typed according to the actions configuration. @@ -144,7 +156,7 @@ Returns a :ref:`Variant` for the input with the given ``name``. T .. rst-class:: classref-method -:ref:`TrackerHand` **get_tracker_hand** **(** **)** |const| +:ref:`TrackerHand` **get_tracker_hand**\ (\ ) |const| :ref:`🔗` Returns the hand holding this controller, if known. See :ref:`TrackerHand`. @@ -156,7 +168,7 @@ Returns the hand holding this controller, if known. See :ref:`TrackerHand` **get_vector2** **(** :ref:`StringName` name **)** |const| +:ref:`Vector2` **get_vector2**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns a :ref:`Vector2` for the input with the given ``name``. This is used for thumbsticks and thumbpads found on many controllers. @@ -168,7 +180,7 @@ Returns a :ref:`Vector2` for the input with the given ``name``. T .. rst-class:: classref-method -:ref:`bool` **is_button_pressed** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **is_button_pressed**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if the button with the given ``name`` is pressed. @@ -179,3 +191,4 @@ Returns ``true`` if the button with the given ``name`` is pressed. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrcontrollertracker.rst b/classes/class_xrcontrollertracker.rst new file mode 100644 index 00000000000..3e8ebcc31af --- /dev/null +++ b/classes/class_xrcontrollertracker.rst @@ -0,0 +1,54 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRControllerTracker.xml. + +.. _class_XRControllerTracker: + +XRControllerTracker +=================== + +**Inherits:** :ref:`XRPositionalTracker` **<** :ref:`XRTracker` **<** :ref:`RefCounted` **<** :ref:`Object` + +A tracked controller. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An instance of this object represents a controller that is tracked. + +As controllers are turned on and the :ref:`XRInterface` detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`XRServer`. + +The :ref:`XRController3D` consumes objects of this type and should be used in your project. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+------+-------------------------------------------------------------------+ + | :ref:`TrackerType` | type | ``2`` (overrides :ref:`XRTracker`) | + +-----------------------------------------------+------+-------------------------------------------------------------------+ + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrfacemodifier3d.rst b/classes/class_xrfacemodifier3d.rst new file mode 100644 index 00000000000..7c32c288d5e --- /dev/null +++ b/classes/class_xrfacemodifier3d.rst @@ -0,0 +1,97 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRFaceModifier3D.xml. + +.. _class_XRFaceModifier3D: + +XRFaceModifier3D +================ + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A node for driving standard face meshes from :ref:`XRFaceTracker` weights. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This node applies weights from a :ref:`XRFaceTracker` to a mesh with supporting face blend shapes. + +The `Unified Expressions `__ blend shapes are supported, as well as ARKit and SRanipal blend shapes. + +The node attempts to identify blend shapes based on name matching. Blend shapes should match the names listed in the `Unified Expressions Compatibility `__ chart. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------------------+-------------------------------------------------------------------+---------------------------+ + | :ref:`StringName` | :ref:`face_tracker` | ``&"/user/face_tracker"`` | + +-------------------------------------+-------------------------------------------------------------------+---------------------------+ + | :ref:`NodePath` | :ref:`target` | ``NodePath("")`` | + +-------------------------------------+-------------------------------------------------------------------+---------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRFaceModifier3D_property_face_tracker: + +.. rst-class:: classref-property + +:ref:`StringName` **face_tracker** = ``&"/user/face_tracker"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_face_tracker**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_face_tracker**\ (\ ) + +The :ref:`XRFaceTracker` path. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRFaceModifier3D_property_target: + +.. rst-class:: classref-property + +:ref:`NodePath` **target** = ``NodePath("")`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_target**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_target**\ (\ ) + +The :ref:`NodePath` of the face :ref:`MeshInstance3D`. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrfacetracker.rst b/classes/class_xrfacetracker.rst new file mode 100644 index 00000000000..be5a535f057 --- /dev/null +++ b/classes/class_xrfacetracker.rst @@ -0,0 +1,1290 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRFaceTracker.xml. + +.. _class_XRFaceTracker: + +XRFaceTracker +============= + +**Experimental:** This class may be changed or removed in future versions. + +**Inherits:** :ref:`XRTracker` **<** :ref:`RefCounted` **<** :ref:`Object` + +A tracked face. + +.. rst-class:: classref-introduction-group + +Description +----------- + +An instance of this object represents a tracked face and its corresponding blend shapes. The blend shapes come from the `Unified Expressions `__ standard, and contain extended details and visuals for each blend shape. Additionally the `Tracking Standard Comparison `__ page documents the relationship between Unified Expressions and other standards. + +As face trackers are turned on they are registered with the :ref:`XRServer`. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+----------------------------------------------------------------+--------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`blend_shapes` | ``PackedFloat32Array()`` | + +-----------------------------------------------------+----------------------------------------------------------------+--------------------------------------------------------------------+ + | :ref:`TrackerType` | type | ``64`` (overrides :ref:`XRTracker`) | + +-----------------------------------------------------+----------------------------------------------------------------+--------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_shape`\ (\ blend_shape\: :ref:`BlendShapeEntry`\ ) |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_blend_shape`\ (\ blend_shape\: :ref:`BlendShapeEntry`, weight\: :ref:`float`\ ) | + +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_XRFaceTracker_BlendShapeEntry: + +.. rst-class:: classref-enumeration + +enum **BlendShapeEntry**: :ref:`🔗` + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_OUT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_OUT_RIGHT** = ``0`` + +Right eye looks outwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_IN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_IN_RIGHT** = ``1`` + +Right eye looks inwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_UP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_UP_RIGHT** = ``2`` + +Right eye looks upwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_DOWN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_DOWN_RIGHT** = ``3`` + +Right eye looks downwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_OUT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_OUT_LEFT** = ``4`` + +Left eye looks outwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_IN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_IN_LEFT** = ``5`` + +Left eye looks inwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_UP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_UP_LEFT** = ``6`` + +Left eye looks upwards. + +.. _class_XRFaceTracker_constant_FT_EYE_LOOK_DOWN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_LOOK_DOWN_LEFT** = ``7`` + +Left eye looks downwards. + +.. _class_XRFaceTracker_constant_FT_EYE_CLOSED_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CLOSED_RIGHT** = ``8`` + +Closes the right eyelid. + +.. _class_XRFaceTracker_constant_FT_EYE_CLOSED_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CLOSED_LEFT** = ``9`` + +Closes the left eyelid. + +.. _class_XRFaceTracker_constant_FT_EYE_SQUINT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_SQUINT_RIGHT** = ``10`` + +Squeezes the right eye socket muscles. + +.. _class_XRFaceTracker_constant_FT_EYE_SQUINT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_SQUINT_LEFT** = ``11`` + +Squeezes the left eye socket muscles. + +.. _class_XRFaceTracker_constant_FT_EYE_WIDE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_WIDE_RIGHT** = ``12`` + +Right eyelid widens beyond relaxed. + +.. _class_XRFaceTracker_constant_FT_EYE_WIDE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_WIDE_LEFT** = ``13`` + +Left eyelid widens beyond relaxed. + +.. _class_XRFaceTracker_constant_FT_EYE_DILATION_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_DILATION_RIGHT** = ``14`` + +Dilates the right eye pupil. + +.. _class_XRFaceTracker_constant_FT_EYE_DILATION_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_DILATION_LEFT** = ``15`` + +Dilates the left eye pupil. + +.. _class_XRFaceTracker_constant_FT_EYE_CONSTRICT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CONSTRICT_RIGHT** = ``16`` + +Constricts the right eye pupil. + +.. _class_XRFaceTracker_constant_FT_EYE_CONSTRICT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CONSTRICT_LEFT** = ``17`` + +Constricts the left eye pupil. + +.. _class_XRFaceTracker_constant_FT_BROW_PINCH_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_PINCH_RIGHT** = ``18`` + +Right eyebrow pinches in. + +.. _class_XRFaceTracker_constant_FT_BROW_PINCH_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_PINCH_LEFT** = ``19`` + +Left eyebrow pinches in. + +.. _class_XRFaceTracker_constant_FT_BROW_LOWERER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_LOWERER_RIGHT** = ``20`` + +Outer right eyebrow pulls down. + +.. _class_XRFaceTracker_constant_FT_BROW_LOWERER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_LOWERER_LEFT** = ``21`` + +Outer left eyebrow pulls down. + +.. _class_XRFaceTracker_constant_FT_BROW_INNER_UP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_INNER_UP_RIGHT** = ``22`` + +Inner right eyebrow pulls up. + +.. _class_XRFaceTracker_constant_FT_BROW_INNER_UP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_INNER_UP_LEFT** = ``23`` + +Inner left eyebrow pulls up. + +.. _class_XRFaceTracker_constant_FT_BROW_OUTER_UP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_OUTER_UP_RIGHT** = ``24`` + +Outer right eyebrow pulls up. + +.. _class_XRFaceTracker_constant_FT_BROW_OUTER_UP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_OUTER_UP_LEFT** = ``25`` + +Outer left eyebrow pulls up. + +.. _class_XRFaceTracker_constant_FT_NOSE_SNEER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NOSE_SNEER_RIGHT** = ``26`` + +Right side face sneers. + +.. _class_XRFaceTracker_constant_FT_NOSE_SNEER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NOSE_SNEER_LEFT** = ``27`` + +Left side face sneers. + +.. _class_XRFaceTracker_constant_FT_NASAL_DILATION_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_DILATION_RIGHT** = ``28`` + +Right side nose canal dilates. + +.. _class_XRFaceTracker_constant_FT_NASAL_DILATION_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_DILATION_LEFT** = ``29`` + +Left side nose canal dilates. + +.. _class_XRFaceTracker_constant_FT_NASAL_CONSTRICT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_CONSTRICT_RIGHT** = ``30`` + +Right side nose canal constricts. + +.. _class_XRFaceTracker_constant_FT_NASAL_CONSTRICT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_CONSTRICT_LEFT** = ``31`` + +Left side nose canal constricts. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SQUINT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SQUINT_RIGHT** = ``32`` + +Raises the right side cheek. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SQUINT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SQUINT_LEFT** = ``33`` + +Raises the left side cheek. + +.. _class_XRFaceTracker_constant_FT_CHEEK_PUFF_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_PUFF_RIGHT** = ``34`` + +Puffs the right side cheek. + +.. _class_XRFaceTracker_constant_FT_CHEEK_PUFF_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_PUFF_LEFT** = ``35`` + +Puffs the left side cheek. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SUCK_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SUCK_RIGHT** = ``36`` + +Sucks in the right side cheek. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SUCK_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SUCK_LEFT** = ``37`` + +Sucks in the left side cheek. + +.. _class_XRFaceTracker_constant_FT_JAW_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_OPEN** = ``38`` + +Opens jawbone. + +.. _class_XRFaceTracker_constant_FT_MOUTH_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_CLOSED** = ``39`` + +Closes the mouth. + +.. _class_XRFaceTracker_constant_FT_JAW_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_RIGHT** = ``40`` + +Pushes jawbone right. + +.. _class_XRFaceTracker_constant_FT_JAW_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_LEFT** = ``41`` + +Pushes jawbone left. + +.. _class_XRFaceTracker_constant_FT_JAW_FORWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_FORWARD** = ``42`` + +Pushes jawbone forward. + +.. _class_XRFaceTracker_constant_FT_JAW_BACKWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_BACKWARD** = ``43`` + +Pushes jawbone backward. + +.. _class_XRFaceTracker_constant_FT_JAW_CLENCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_CLENCH** = ``44`` + +Flexes jaw muscles. + +.. _class_XRFaceTracker_constant_FT_JAW_MANDIBLE_RAISE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_JAW_MANDIBLE_RAISE** = ``45`` + +Raises the jawbone. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_UPPER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_UPPER_RIGHT** = ``46`` + +Upper right lip part tucks in the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_UPPER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_UPPER_LEFT** = ``47`` + +Upper left lip part tucks in the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_LOWER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_LOWER_RIGHT** = ``48`` + +Lower right lip part tucks in the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_LOWER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_LOWER_LEFT** = ``49`` + +Lower left lip part tucks in the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_CORNER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_CORNER_RIGHT** = ``50`` + +Right lip corner folds into the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_CORNER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_CORNER_LEFT** = ``51`` + +Left lip corner folds into the mouth. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_UPPER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_UPPER_RIGHT** = ``52`` + +Upper right lip part pushes into a funnel. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_UPPER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_UPPER_LEFT** = ``53`` + +Upper left lip part pushes into a funnel. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_LOWER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_LOWER_RIGHT** = ``54`` + +Lower right lip part pushes into a funnel. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_LOWER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_LOWER_LEFT** = ``55`` + +Lower left lip part pushes into a funnel. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_UPPER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_UPPER_RIGHT** = ``56`` + +Upper right lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_UPPER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_UPPER_LEFT** = ``57`` + +Upper left lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_LOWER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_LOWER_RIGHT** = ``58`` + +Lower right lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_LOWER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_LOWER_LEFT** = ``59`` + +Lower left lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_UP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_UP_RIGHT** = ``60`` + +Upper right part of the lip pulls up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_UP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_UP_LEFT** = ``61`` + +Upper left part of the lip pulls up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LOWER_DOWN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LOWER_DOWN_RIGHT** = ``62`` + +Lower right part of the lip pulls up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LOWER_DOWN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LOWER_DOWN_LEFT** = ``63`` + +Lower left part of the lip pulls up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_DEEPEN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_DEEPEN_RIGHT** = ``64`` + +Upper right lip part pushes in the cheek. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_DEEPEN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_DEEPEN_LEFT** = ``65`` + +Upper left lip part pushes in the cheek. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_RIGHT** = ``66`` + +Moves upper lip right. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_LEFT** = ``67`` + +Moves upper lip left. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LOWER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LOWER_RIGHT** = ``68`` + +Moves lower lip right. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LOWER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LOWER_LEFT** = ``69`` + +Moves lower lip left. + +.. _class_XRFaceTracker_constant_FT_MOUTH_CORNER_PULL_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_CORNER_PULL_RIGHT** = ``70`` + +Right lip corner pulls diagonally up and out. + +.. _class_XRFaceTracker_constant_FT_MOUTH_CORNER_PULL_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_CORNER_PULL_LEFT** = ``71`` + +Left lip corner pulls diagonally up and out. + +.. _class_XRFaceTracker_constant_FT_MOUTH_CORNER_SLANT_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_CORNER_SLANT_RIGHT** = ``72`` + +Right corner lip slants up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_CORNER_SLANT_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_CORNER_SLANT_LEFT** = ``73`` + +Left corner lip slants up. + +.. _class_XRFaceTracker_constant_FT_MOUTH_FROWN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_FROWN_RIGHT** = ``74`` + +Right corner lip pulls down. + +.. _class_XRFaceTracker_constant_FT_MOUTH_FROWN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_FROWN_LEFT** = ``75`` + +Left corner lip pulls down. + +.. _class_XRFaceTracker_constant_FT_MOUTH_STRETCH_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_STRETCH_RIGHT** = ``76`` + +Mouth corner lip pulls out and down. + +.. _class_XRFaceTracker_constant_FT_MOUTH_STRETCH_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_STRETCH_LEFT** = ``77`` + +Mouth corner lip pulls out and down. + +.. _class_XRFaceTracker_constant_FT_MOUTH_DIMPLE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_DIMPLE_RIGHT** = ``78`` + +Right lip corner is pushed backwards. + +.. _class_XRFaceTracker_constant_FT_MOUTH_DIMPLE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_DIMPLE_LEFT** = ``79`` + +Left lip corner is pushed backwards. + +.. _class_XRFaceTracker_constant_FT_MOUTH_RAISER_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_RAISER_UPPER** = ``80`` + +Raises and slightly pushes out the upper mouth. + +.. _class_XRFaceTracker_constant_FT_MOUTH_RAISER_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_RAISER_LOWER** = ``81`` + +Raises and slightly pushes out the lower mouth. + +.. _class_XRFaceTracker_constant_FT_MOUTH_PRESS_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_PRESS_RIGHT** = ``82`` + +Right side lips press and flatten together vertically. + +.. _class_XRFaceTracker_constant_FT_MOUTH_PRESS_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_PRESS_LEFT** = ``83`` + +Left side lips press and flatten together vertically. + +.. _class_XRFaceTracker_constant_FT_MOUTH_TIGHTENER_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_TIGHTENER_RIGHT** = ``84`` + +Right side lips squeeze together horizontally. + +.. _class_XRFaceTracker_constant_FT_MOUTH_TIGHTENER_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_TIGHTENER_LEFT** = ``85`` + +Left side lips squeeze together horizontally. + +.. _class_XRFaceTracker_constant_FT_TONGUE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_OUT** = ``86`` + +Tongue visibly sticks out of the mouth. + +.. _class_XRFaceTracker_constant_FT_TONGUE_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_UP** = ``87`` + +Tongue points upwards. + +.. _class_XRFaceTracker_constant_FT_TONGUE_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_DOWN** = ``88`` + +Tongue points downwards. + +.. _class_XRFaceTracker_constant_FT_TONGUE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_RIGHT** = ``89`` + +Tongue points right. + +.. _class_XRFaceTracker_constant_FT_TONGUE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_LEFT** = ``90`` + +Tongue points left. + +.. _class_XRFaceTracker_constant_FT_TONGUE_ROLL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_ROLL** = ``91`` + +Sides of the tongue funnel, creating a roll. + +.. _class_XRFaceTracker_constant_FT_TONGUE_BLEND_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_BLEND_DOWN** = ``92`` + +Tongue arches up then down inside the mouth. + +.. _class_XRFaceTracker_constant_FT_TONGUE_CURL_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_CURL_UP** = ``93`` + +Tongue arches down then up inside the mouth. + +.. _class_XRFaceTracker_constant_FT_TONGUE_SQUISH: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_SQUISH** = ``94`` + +Tongue squishes together and thickens. + +.. _class_XRFaceTracker_constant_FT_TONGUE_FLAT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_FLAT** = ``95`` + +Tongue flattens and thins out. + +.. _class_XRFaceTracker_constant_FT_TONGUE_TWIST_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_TWIST_RIGHT** = ``96`` + +Tongue tip rotates clockwise, with the rest following gradually. + +.. _class_XRFaceTracker_constant_FT_TONGUE_TWIST_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_TONGUE_TWIST_LEFT** = ``97`` + +Tongue tip rotates counter-clockwise, with the rest following gradually. + +.. _class_XRFaceTracker_constant_FT_SOFT_PALATE_CLOSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_SOFT_PALATE_CLOSE** = ``98`` + +Inner mouth throat closes. + +.. _class_XRFaceTracker_constant_FT_THROAT_SWALLOW: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_THROAT_SWALLOW** = ``99`` + +The Adam's apple visibly swallows. + +.. _class_XRFaceTracker_constant_FT_NECK_FLEX_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NECK_FLEX_RIGHT** = ``100`` + +Right side neck visibly flexes. + +.. _class_XRFaceTracker_constant_FT_NECK_FLEX_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NECK_FLEX_LEFT** = ``101`` + +Left side neck visibly flexes. + +.. _class_XRFaceTracker_constant_FT_EYE_CLOSED: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CLOSED** = ``102`` + +Closes both eye lids. + +.. _class_XRFaceTracker_constant_FT_EYE_WIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_WIDE** = ``103`` + +Widens both eye lids. + +.. _class_XRFaceTracker_constant_FT_EYE_SQUINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_SQUINT** = ``104`` + +Squints both eye lids. + +.. _class_XRFaceTracker_constant_FT_EYE_DILATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_DILATION** = ``105`` + +Dilates both pupils. + +.. _class_XRFaceTracker_constant_FT_EYE_CONSTRICT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_EYE_CONSTRICT** = ``106`` + +Constricts both pupils. + +.. _class_XRFaceTracker_constant_FT_BROW_DOWN_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_DOWN_RIGHT** = ``107`` + +Pulls the right eyebrow down and in. + +.. _class_XRFaceTracker_constant_FT_BROW_DOWN_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_DOWN_LEFT** = ``108`` + +Pulls the left eyebrow down and in. + +.. _class_XRFaceTracker_constant_FT_BROW_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_DOWN** = ``109`` + +Pulls both eyebrows down and in. + +.. _class_XRFaceTracker_constant_FT_BROW_UP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_UP_RIGHT** = ``110`` + +Right brow appears worried. + +.. _class_XRFaceTracker_constant_FT_BROW_UP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_UP_LEFT** = ``111`` + +Left brow appears worried. + +.. _class_XRFaceTracker_constant_FT_BROW_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_BROW_UP** = ``112`` + +Both brows appear worried. + +.. _class_XRFaceTracker_constant_FT_NOSE_SNEER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NOSE_SNEER** = ``113`` + +Entire face sneers. + +.. _class_XRFaceTracker_constant_FT_NASAL_DILATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_DILATION** = ``114`` + +Both nose canals dilate. + +.. _class_XRFaceTracker_constant_FT_NASAL_CONSTRICT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_NASAL_CONSTRICT** = ``115`` + +Both nose canals constrict. + +.. _class_XRFaceTracker_constant_FT_CHEEK_PUFF: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_PUFF** = ``116`` + +Puffs both cheeks. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SUCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SUCK** = ``117`` + +Sucks in both cheeks. + +.. _class_XRFaceTracker_constant_FT_CHEEK_SQUINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_CHEEK_SQUINT** = ``118`` + +Raises both cheeks. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_UPPER** = ``119`` + +Tucks in the upper lips. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK_LOWER** = ``120`` + +Tucks in the lower lips. + +.. _class_XRFaceTracker_constant_FT_LIP_SUCK: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_SUCK** = ``121`` + +Tucks in both lips. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_UPPER** = ``122`` + +Funnels in the upper lips. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL_LOWER** = ``123`` + +Funnels in the lower lips. + +.. _class_XRFaceTracker_constant_FT_LIP_FUNNEL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_FUNNEL** = ``124`` + +Funnels in both lips. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_UPPER** = ``125`` + +Upper lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER_LOWER** = ``126`` + +Lower lip part pushes outwards. + +.. _class_XRFaceTracker_constant_FT_LIP_PUCKER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_LIP_PUCKER** = ``127`` + +Lips push outwards. + +.. _class_XRFaceTracker_constant_FT_MOUTH_UPPER_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_UPPER_UP** = ``128`` + +Raises the upper lips. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LOWER_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LOWER_DOWN** = ``129`` + +Lowers the lower lips. + +.. _class_XRFaceTracker_constant_FT_MOUTH_OPEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_OPEN** = ``130`` + +Mouth opens, revealing teeth. + +.. _class_XRFaceTracker_constant_FT_MOUTH_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_RIGHT** = ``131`` + +Moves mouth right. + +.. _class_XRFaceTracker_constant_FT_MOUTH_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_LEFT** = ``132`` + +Moves mouth left. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SMILE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SMILE_RIGHT** = ``133`` + +Right side of the mouth smiles. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SMILE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SMILE_LEFT** = ``134`` + +Left side of the mouth smiles. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SMILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SMILE** = ``135`` + +Mouth expresses a smile. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SAD_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SAD_RIGHT** = ``136`` + +Right side of the mouth expresses sadness. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SAD_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SAD_LEFT** = ``137`` + +Left side of the mouth expresses sadness. + +.. _class_XRFaceTracker_constant_FT_MOUTH_SAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_SAD** = ``138`` + +Mouth expresses sadness. + +.. _class_XRFaceTracker_constant_FT_MOUTH_STRETCH: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_STRETCH** = ``139`` + +Mouth stretches. + +.. _class_XRFaceTracker_constant_FT_MOUTH_DIMPLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_DIMPLE** = ``140`` + +Lip corners dimple. + +.. _class_XRFaceTracker_constant_FT_MOUTH_TIGHTENER: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_TIGHTENER** = ``141`` + +Mouth tightens. + +.. _class_XRFaceTracker_constant_FT_MOUTH_PRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MOUTH_PRESS** = ``142`` + +Mouth presses together. + +.. _class_XRFaceTracker_constant_FT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BlendShapeEntry` **FT_MAX** = ``143`` + +Represents the size of the :ref:`BlendShapeEntry` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRFaceTracker_property_blend_shapes: + +.. rst-class:: classref-property + +:ref:`PackedFloat32Array` **blend_shapes** = ``PackedFloat32Array()`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_blend_shapes**\ (\ value\: :ref:`PackedFloat32Array`\ ) +- :ref:`PackedFloat32Array` **get_blend_shapes**\ (\ ) + +The array of face blend shape weights with indices corresponding to the :ref:`BlendShapeEntry` enum. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedFloat32Array` for more details. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_XRFaceTracker_method_get_blend_shape: + +.. rst-class:: classref-method + +:ref:`float` **get_blend_shape**\ (\ blend_shape\: :ref:`BlendShapeEntry`\ ) |const| :ref:`🔗` + +Returns the requested face blend shape weight. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRFaceTracker_method_set_blend_shape: + +.. rst-class:: classref-method + +|void| **set_blend_shape**\ (\ blend_shape\: :ref:`BlendShapeEntry`, weight\: :ref:`float`\ ) :ref:`🔗` + +Sets a face blend shape weight. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrhandmodifier3d.rst b/classes/class_xrhandmodifier3d.rst new file mode 100644 index 00000000000..d94d2c5a45c --- /dev/null +++ b/classes/class_xrhandmodifier3d.rst @@ -0,0 +1,134 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRHandModifier3D.xml. + +.. _class_XRHandModifier3D: + +XRHandModifier3D +================ + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A node for driving hand meshes from :ref:`XRHandTracker` data. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This node uses hand tracking data from an :ref:`XRHandTracker` to pose the skeleton of a hand mesh. + +Positioning of hands is performed by creating an :ref:`XRNode3D` ancestor of the hand mesh driven by the same :ref:`XRHandTracker`. + +The hand tracking position-data is scaled by :ref:`Skeleton3D.motion_scale` when applied to the skeleton, which can be used to adjust the tracked hand to match the scale of the hand model. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------------+ + | :ref:`BoneUpdate` | :ref:`bone_update` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------------+ + | :ref:`StringName` | :ref:`hand_tracker` | ``&"/user/hand_tracker/left"`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_XRHandModifier3D_BoneUpdate: + +.. rst-class:: classref-enumeration + +enum **BoneUpdate**: :ref:`🔗` + +.. _class_XRHandModifier3D_constant_BONE_UPDATE_FULL: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_FULL** = ``0`` + +The skeleton's bones are fully updated (both position and rotation) to match the tracked bones. + +.. _class_XRHandModifier3D_constant_BONE_UPDATE_ROTATION_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_ROTATION_ONLY** = ``1`` + +The skeleton's bones are only rotated to align with the tracked bones, preserving bone length. + +.. _class_XRHandModifier3D_constant_BONE_UPDATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`BoneUpdate` **BONE_UPDATE_MAX** = ``2`` + +Represents the size of the :ref:`BoneUpdate` enum. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRHandModifier3D_property_bone_update: + +.. rst-class:: classref-property + +:ref:`BoneUpdate` **bone_update** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_bone_update**\ (\ value\: :ref:`BoneUpdate`\ ) +- :ref:`BoneUpdate` **get_bone_update**\ (\ ) + +Specifies the type of updates to perform on the bones. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandModifier3D_property_hand_tracker: + +.. rst-class:: classref-property + +:ref:`StringName` **hand_tracker** = ``&"/user/hand_tracker/left"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_hand_tracker**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_hand_tracker**\ (\ ) + +The name of the :ref:`XRHandTracker` registered with :ref:`XRServer` to obtain the hand tracking data from. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrhandtracker.rst b/classes/class_xrhandtracker.rst new file mode 100644 index 00000000000..9aeb48e332c --- /dev/null +++ b/classes/class_xrhandtracker.rst @@ -0,0 +1,583 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRHandTracker.xml. + +.. _class_XRHandTracker: + +XRHandTracker +============= + +**Inherits:** :ref:`XRPositionalTracker` **<** :ref:`XRTracker` **<** :ref:`RefCounted` **<** :ref:`Object` + +A tracked hand in XR. + +.. rst-class:: classref-introduction-group + +Description +----------- + +A hand tracking system will create an instance of this object and add it to the :ref:`XRServer`. This tracking system will then obtain skeleton data, convert it to the Godot Humanoid hand skeleton and store this data on the **XRHandTracker** object. + +Use :ref:`XRHandModifier3D` to animate a hand mesh using hand tracking data. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`TrackerHand` | hand | ``1`` (overrides :ref:`XRPositionalTracker`) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`HandTrackingSource` | :ref:`hand_tracking_source` | ``0`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_tracking_data` | ``false`` | + +------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+ + | :ref:`TrackerType` | type | ``16`` (overrides :ref:`XRTracker`) | + +------------------------------------------------------------------+--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_angular_velocity`\ (\ joint\: :ref:`HandJoint`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`HandJointFlags`\] | :ref:`get_hand_joint_flags`\ (\ joint\: :ref:`HandJoint`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_linear_velocity`\ (\ joint\: :ref:`HandJoint`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_hand_joint_radius`\ (\ joint\: :ref:`HandJoint`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_hand_joint_transform`\ (\ joint\: :ref:`HandJoint`\ ) |const| | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hand_joint_angular_velocity`\ (\ joint\: :ref:`HandJoint`, angular_velocity\: :ref:`Vector3`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hand_joint_flags`\ (\ joint\: :ref:`HandJoint`, flags\: |bitfield|\[:ref:`HandJointFlags`\]\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hand_joint_linear_velocity`\ (\ joint\: :ref:`HandJoint`, linear_velocity\: :ref:`Vector3`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hand_joint_radius`\ (\ joint\: :ref:`HandJoint`, radius\: :ref:`float`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hand_joint_transform`\ (\ joint\: :ref:`HandJoint`, transform\: :ref:`Transform3D`\ ) | + +------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_XRHandTracker_HandTrackingSource: + +.. rst-class:: classref-enumeration + +enum **HandTrackingSource**: :ref:`🔗` + +.. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_UNKNOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_UNKNOWN** = ``0`` + +The source of hand tracking data is unknown. + +.. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_UNOBSTRUCTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_UNOBSTRUCTED** = ``1`` + +The source of hand tracking data is unobstructed, meaning that an accurate method of hand tracking is used. These include optical hand tracking, data gloves, etc. + +.. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_CONTROLLER: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_CONTROLLER** = ``2`` + +The source of hand tracking data is a controller, meaning that joint positions are inferred from controller inputs. + +.. _class_XRHandTracker_constant_HAND_TRACKING_SOURCE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandTrackingSource` **HAND_TRACKING_SOURCE_MAX** = ``3`` + +Represents the size of the :ref:`HandTrackingSource` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_XRHandTracker_HandJoint: + +.. rst-class:: classref-enumeration + +enum **HandJoint**: :ref:`🔗` + +.. _class_XRHandTracker_constant_HAND_JOINT_PALM: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PALM** = ``0`` + +Palm joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_WRIST: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_WRIST** = ``1`` + +Wrist joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_THUMB_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_THUMB_METACARPAL** = ``2`` + +Thumb metacarpal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_THUMB_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_THUMB_PHALANX_PROXIMAL** = ``3`` + +Thumb phalanx proximal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_THUMB_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_THUMB_PHALANX_DISTAL** = ``4`` + +Thumb phalanx distal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_THUMB_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_THUMB_TIP** = ``5`` + +Thumb tip joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_INDEX_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_INDEX_FINGER_METACARPAL** = ``6`` + +Index finger metacarpal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_INDEX_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_INDEX_FINGER_PHALANX_PROXIMAL** = ``7`` + +Index finger phalanx proximal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_INDEX_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_INDEX_FINGER_PHALANX_INTERMEDIATE** = ``8`` + +Index finger phalanx intermediate joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_INDEX_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_INDEX_FINGER_PHALANX_DISTAL** = ``9`` + +Index finger phalanx distal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_INDEX_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_INDEX_FINGER_TIP** = ``10`` + +Index finger tip joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MIDDLE_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MIDDLE_FINGER_METACARPAL** = ``11`` + +Middle finger metacarpal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MIDDLE_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MIDDLE_FINGER_PHALANX_PROXIMAL** = ``12`` + +Middle finger phalanx proximal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MIDDLE_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MIDDLE_FINGER_PHALANX_INTERMEDIATE** = ``13`` + +Middle finger phalanx intermediate joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MIDDLE_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MIDDLE_FINGER_PHALANX_DISTAL** = ``14`` + +Middle finger phalanx distal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MIDDLE_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MIDDLE_FINGER_TIP** = ``15`` + +Middle finger tip joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_RING_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_RING_FINGER_METACARPAL** = ``16`` + +Ring finger metacarpal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_RING_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_RING_FINGER_PHALANX_PROXIMAL** = ``17`` + +Ring finger phalanx proximal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_RING_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_RING_FINGER_PHALANX_INTERMEDIATE** = ``18`` + +Ring finger phalanx intermediate joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_RING_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_RING_FINGER_PHALANX_DISTAL** = ``19`` + +Ring finger phalanx distal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_RING_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_RING_FINGER_TIP** = ``20`` + +Ring finger tip joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_PINKY_FINGER_METACARPAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PINKY_FINGER_METACARPAL** = ``21`` + +Pinky finger metacarpal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_PINKY_FINGER_PHALANX_PROXIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PINKY_FINGER_PHALANX_PROXIMAL** = ``22`` + +Pinky finger phalanx proximal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_PINKY_FINGER_PHALANX_INTERMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PINKY_FINGER_PHALANX_INTERMEDIATE** = ``23`` + +Pinky finger phalanx intermediate joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_PINKY_FINGER_PHALANX_DISTAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PINKY_FINGER_PHALANX_DISTAL** = ``24`` + +Pinky finger phalanx distal joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_PINKY_FINGER_TIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_PINKY_FINGER_TIP** = ``25`` + +Pinky finger tip joint. + +.. _class_XRHandTracker_constant_HAND_JOINT_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJoint` **HAND_JOINT_MAX** = ``26`` + +Represents the size of the :ref:`HandJoint` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_XRHandTracker_HandJointFlags: + +.. rst-class:: classref-enumeration + +flags **HandJointFlags**: :ref:`🔗` + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_ORIENTATION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_ORIENTATION_VALID** = ``1`` + +The hand joint's orientation data is valid. + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_ORIENTATION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_ORIENTATION_TRACKED** = ``2`` + +The hand joint's orientation is actively tracked. May not be set if tracking has been temporarily lost. + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_POSITION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_POSITION_VALID** = ``4`` + +The hand joint's position data is valid. + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_POSITION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_POSITION_TRACKED** = ``8`` + +The hand joint's position is actively tracked. May not be set if tracking has been temporarily lost. + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_LINEAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_LINEAR_VELOCITY_VALID** = ``16`` + +The hand joint's linear velocity data is valid. + +.. _class_XRHandTracker_constant_HAND_JOINT_FLAG_ANGULAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_FLAG_ANGULAR_VELOCITY_VALID** = ``32`` + +The hand joint's angular velocity data is valid. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRHandTracker_property_hand_tracking_source: + +.. rst-class:: classref-property + +:ref:`HandTrackingSource` **hand_tracking_source** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_hand_tracking_source**\ (\ value\: :ref:`HandTrackingSource`\ ) +- :ref:`HandTrackingSource` **get_hand_tracking_source**\ (\ ) + +The source of the hand tracking data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_property_has_tracking_data: + +.. rst-class:: classref-property + +:ref:`bool` **has_tracking_data** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_has_tracking_data**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_has_tracking_data**\ (\ ) + +If ``true``, the hand tracking data is valid. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_XRHandTracker_method_get_hand_joint_angular_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_hand_joint_angular_velocity**\ (\ joint\: :ref:`HandJoint`\ ) |const| :ref:`🔗` + +Returns the angular velocity for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_get_hand_joint_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`HandJointFlags`\] **get_hand_joint_flags**\ (\ joint\: :ref:`HandJoint`\ ) |const| :ref:`🔗` + +Returns flags about the validity of the tracking data for the given hand joint (see :ref:`HandJointFlags`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_get_hand_joint_linear_velocity: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_hand_joint_linear_velocity**\ (\ joint\: :ref:`HandJoint`\ ) |const| :ref:`🔗` + +Returns the linear velocity for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_get_hand_joint_radius: + +.. rst-class:: classref-method + +:ref:`float` **get_hand_joint_radius**\ (\ joint\: :ref:`HandJoint`\ ) |const| :ref:`🔗` + +Returns the radius of the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_get_hand_joint_transform: + +.. rst-class:: classref-method + +:ref:`Transform3D` **get_hand_joint_transform**\ (\ joint\: :ref:`HandJoint`\ ) |const| :ref:`🔗` + +Returns the transform for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_set_hand_joint_angular_velocity: + +.. rst-class:: classref-method + +|void| **set_hand_joint_angular_velocity**\ (\ joint\: :ref:`HandJoint`, angular_velocity\: :ref:`Vector3`\ ) :ref:`🔗` + +Sets the angular velocity for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_set_hand_joint_flags: + +.. rst-class:: classref-method + +|void| **set_hand_joint_flags**\ (\ joint\: :ref:`HandJoint`, flags\: |bitfield|\[:ref:`HandJointFlags`\]\ ) :ref:`🔗` + +Sets flags about the validity of the tracking data for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_set_hand_joint_linear_velocity: + +.. rst-class:: classref-method + +|void| **set_hand_joint_linear_velocity**\ (\ joint\: :ref:`HandJoint`, linear_velocity\: :ref:`Vector3`\ ) :ref:`🔗` + +Sets the linear velocity for the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_set_hand_joint_radius: + +.. rst-class:: classref-method + +|void| **set_hand_joint_radius**\ (\ joint\: :ref:`HandJoint`, radius\: :ref:`float`\ ) :ref:`🔗` + +Sets the radius of the given hand joint. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRHandTracker_method_set_hand_joint_transform: + +.. rst-class:: classref-method + +|void| **set_hand_joint_transform**\ (\ joint\: :ref:`HandJoint`, transform\: :ref:`Transform3D`\ ) :ref:`🔗` + +Sets the transform for the given hand joint. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrinterface.rst b/classes/class_xrinterface.rst index e9c8d4494b4..ce3e8e907a7 100644 --- a/classes/class_xrinterface.rst +++ b/classes/class_xrinterface.rst @@ -40,13 +40,15 @@ Properties .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`ar_is_anchor_detection_enabled` | ``false`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`interface_is_primary` | ``false`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ - | :ref:`PlayAreaMode` | :ref:`xr_play_area_mode` | ``0`` | - +----------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`ar_is_anchor_detection_enabled` | ``false`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`EnvironmentBlendMode` | :ref:`environment_blend_mode` | ``0`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`interface_is_primary` | ``false`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ + | :ref:`PlayAreaMode` | :ref:`xr_play_area_mode` | ``0`` | + +--------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -56,51 +58,51 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_camera_feed_id` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_capabilities` **(** **)** |const| | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_name` **(** **)** |const| | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_play_area` **(** **)** |const| | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Projection` | :ref:`get_projection_for_view` **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` near, :ref:`float` far **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_render_target_size` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_supported_environment_blend_modes` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_system_info` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TrackingStatus` | :ref:`get_tracking_status` **(** **)** |const| | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_view_count` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`initialize` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_initialized` **(** **)** |const| | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_passthrough_enabled` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_passthrough_supported` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`set_environment_blend_mode` **(** :ref:`EnvironmentBlendMode` mode **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`set_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`start_passthrough` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_passthrough` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`supports_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`uninitialize` **(** **)** | - +--------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_camera_feed_id`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_capabilities`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_name`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_play_area`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Projection` | :ref:`get_projection_for_view`\ (\ view\: :ref:`int`, aspect\: :ref:`float`, near\: :ref:`float`, far\: :ref:`float`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_render_target_size`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_supported_environment_blend_modes`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_system_info`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TrackingStatus` | :ref:`get_tracking_status`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_transform_for_view`\ (\ view\: :ref:`int`, cam_transform\: :ref:`Transform3D`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_view_count`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`initialize`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_initialized`\ (\ ) |const| | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_passthrough_enabled`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_passthrough_supported`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_environment_blend_mode`\ (\ mode\: :ref:`EnvironmentBlendMode`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`set_play_area_mode`\ (\ mode\: :ref:`PlayAreaMode`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`start_passthrough`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_passthrough`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`supports_play_area_mode`\ (\ mode\: :ref:`PlayAreaMode`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`trigger_haptic_pulse`\ (\ action_name\: :ref:`String`, tracker_name\: :ref:`StringName`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`uninitialize`\ (\ ) | + +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -115,7 +117,7 @@ Signals .. rst-class:: classref-signal -**play_area_changed** **(** :ref:`int` mode **)** +**play_area_changed**\ (\ mode\: :ref:`int`\ ) :ref:`🔗` Emitted when the play area is changed. This can be a result of the player resetting the boundary or entering a new play area, the player changing the play area mode, the world scale changing or the player resetting their headset orientation. @@ -132,7 +134,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **Capabilities**: +enum **Capabilities**: :ref:`🔗` .. _class_XRInterface_constant_XR_NONE: @@ -198,7 +200,7 @@ This interface outputs to an external device. If the main viewport is used, the .. rst-class:: classref-enumeration -enum **TrackingStatus**: +enum **TrackingStatus**: :ref:`🔗` .. _class_XRInterface_constant_XR_NORMAL_TRACKING: @@ -248,7 +250,7 @@ Tracking is not functional (camera not plugged in or obscured, lighthouses turne .. rst-class:: classref-enumeration -enum **PlayAreaMode**: +enum **PlayAreaMode**: :ref:`🔗` .. _class_XRInterface_constant_XR_PLAY_AREA_UNKNOWN: @@ -288,7 +290,7 @@ Player is free to move around, full positional tracking. :ref:`PlayAreaMode` **XR_PLAY_AREA_STAGE** = ``4`` -Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space, :ref:`XRServer.center_on_hmd` disabled. +Same as :ref:`XR_PLAY_AREA_ROOMSCALE` but origin point is fixed to the center of the physical space. In this mode, system-level recentering may be disabled, requiring the use of :ref:`XRServer.center_on_hmd`. .. rst-class:: classref-item-separator @@ -298,7 +300,7 @@ Same as :ref:`XR_PLAY_AREA_ROOMSCALE` .. _class_XRInterface_constant_XR_ENV_BLEND_MODE_OPAQUE: @@ -337,12 +339,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **ar_is_anchor_detection_enabled** = ``false`` +:ref:`bool` **ar_is_anchor_detection_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_anchor_detection_is_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **get_anchor_detection_is_enabled** **(** **)** +- |void| **set_anchor_detection_is_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_anchor_detection_is_enabled**\ (\ ) On an AR interface, ``true`` if anchor detection is enabled. @@ -350,16 +352,33 @@ On an AR interface, ``true`` if anchor detection is enabled. ---- +.. _class_XRInterface_property_environment_blend_mode: + +.. rst-class:: classref-property + +:ref:`EnvironmentBlendMode` **environment_blend_mode** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- :ref:`bool` **set_environment_blend_mode**\ (\ mode\: :ref:`EnvironmentBlendMode`\ ) +- :ref:`EnvironmentBlendMode` **get_environment_blend_mode**\ (\ ) + +Specify how XR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRInterface_property_interface_is_primary: .. rst-class:: classref-property -:ref:`bool` **interface_is_primary** = ``false`` +:ref:`bool` **interface_is_primary** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_primary** **(** :ref:`bool` value **)** -- :ref:`bool` **is_primary** **(** **)** +- |void| **set_primary**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_primary**\ (\ ) ``true`` if this is the primary interface. @@ -371,12 +390,12 @@ On an AR interface, ``true`` if anchor detection is enabled. .. rst-class:: classref-property -:ref:`PlayAreaMode` **xr_play_area_mode** = ``0`` +:ref:`PlayAreaMode` **xr_play_area_mode** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`bool` **set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** -- :ref:`PlayAreaMode` **get_play_area_mode** **(** **)** +- :ref:`bool` **set_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode`\ ) +- :ref:`PlayAreaMode` **get_play_area_mode**\ (\ ) The play area mode for this interface. @@ -393,7 +412,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **get_camera_feed_id** **(** **)** +:ref:`int` **get_camera_feed_id**\ (\ ) :ref:`🔗` If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the :ref:`CameraServer` for this interface. @@ -405,7 +424,7 @@ If this is an AR interface that requires displaying a camera feed as the backgro .. rst-class:: classref-method -:ref:`int` **get_capabilities** **(** **)** |const| +:ref:`int` **get_capabilities**\ (\ ) |const| :ref:`🔗` Returns a combination of :ref:`Capabilities` flags providing information about the capabilities of this interface. @@ -417,9 +436,9 @@ Returns a combination of :ref:`Capabilities` flag .. rst-class:: classref-method -:ref:`StringName` **get_name** **(** **)** |const| +:ref:`StringName` **get_name**\ (\ ) |const| :ref:`🔗` -Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc). +Returns the name of this interface (``"OpenXR"``, ``"OpenVR"``, ``"OpenHMD"``, ``"ARKit"``, etc.). .. rst-class:: classref-item-separator @@ -429,9 +448,9 @@ Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc). .. rst-class:: classref-method -:ref:`PackedVector3Array` **get_play_area** **(** **)** |const| +:ref:`PackedVector3Array` **get_play_area**\ (\ ) |const| :ref:`🔗` -Returns an array of vectors that denotes the physical play area mapped to the virtual space around the :ref:`XROrigin3D` point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available. +Returns an array of vectors that represent the physical play area mapped to the virtual space around the :ref:`XROrigin3D` point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available. .. rst-class:: classref-item-separator @@ -441,7 +460,7 @@ Returns an array of vectors that denotes the physical play area mapped to the vi .. rst-class:: classref-method -:ref:`Projection` **get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` near, :ref:`float` far **)** +:ref:`Projection` **get_projection_for_view**\ (\ view\: :ref:`int`, aspect\: :ref:`float`, near\: :ref:`float`, far\: :ref:`float`\ ) :ref:`🔗` Returns the projection matrix for a view/eye. @@ -453,7 +472,7 @@ Returns the projection matrix for a view/eye. .. rst-class:: classref-method -:ref:`Vector2` **get_render_target_size** **(** **)** +:ref:`Vector2` **get_render_target_size**\ (\ ) :ref:`🔗` Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. @@ -465,7 +484,7 @@ Returns the resolution at which we should render our intermediate results before .. rst-class:: classref-method -:ref:`Array` **get_supported_environment_blend_modes** **(** **)** +:ref:`Array` **get_supported_environment_blend_modes**\ (\ ) :ref:`🔗` Returns the an array of supported environment blend modes, see :ref:`EnvironmentBlendMode`. @@ -477,7 +496,7 @@ Returns the an array of supported environment blend modes, see :ref:`Environment .. rst-class:: classref-method -:ref:`Dictionary` **get_system_info** **(** **)** +:ref:`Dictionary` **get_system_info**\ (\ ) :ref:`🔗` Returns a :ref:`Dictionary` with extra system info. Interfaces are expected to return ``XRRuntimeName`` and ``XRRuntimeVersion`` providing info about the used XR runtime. Additional entries may be provided specific to an interface. @@ -491,7 +510,7 @@ Returns a :ref:`Dictionary` with extra system info. Interfaces .. rst-class:: classref-method -:ref:`TrackingStatus` **get_tracking_status** **(** **)** |const| +:ref:`TrackingStatus` **get_tracking_status**\ (\ ) |const| :ref:`🔗` If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. @@ -503,7 +522,7 @@ If supported, returns the status of our tracking. This will allow you to provide .. rst-class:: classref-method -:ref:`Transform3D` **get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** +:ref:`Transform3D` **get_transform_for_view**\ (\ view\: :ref:`int`, cam_transform\: :ref:`Transform3D`\ ) :ref:`🔗` Returns the transform for a view/eye. @@ -519,7 +538,7 @@ Returns the transform for a view/eye. .. rst-class:: classref-method -:ref:`int` **get_view_count** **(** **)** +:ref:`int` **get_view_count**\ (\ ) :ref:`🔗` Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic. @@ -531,7 +550,7 @@ Returns the number of views that need to be rendered for this device. 1 for Mono .. rst-class:: classref-method -:ref:`bool` **initialize** **(** **)** +:ref:`bool` **initialize**\ (\ ) :ref:`🔗` 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. @@ -551,9 +570,9 @@ While currently not used, you can activate additional interfaces. You may wish t .. rst-class:: classref-method -:ref:`bool` **is_initialized** **(** **)** |const| +:ref:`bool` **is_initialized**\ (\ ) |const| :ref:`🔗` -Is ``true`` if this interface has been initialized. +Returns ``true`` if this interface has been initialized. .. rst-class:: classref-item-separator @@ -563,9 +582,11 @@ Is ``true`` if this interface has been initialized. .. rst-class:: classref-method -:ref:`bool` **is_passthrough_enabled** **(** **)** +:ref:`bool` **is_passthrough_enabled**\ (\ ) :ref:`🔗` + +**Deprecated:** Check if :ref:`environment_blend_mode` is :ref:`XR_ENV_BLEND_MODE_ALPHA_BLEND`, instead. -Is ``true`` if passthrough is enabled. +Returns ``true`` if passthrough is enabled. .. rst-class:: classref-item-separator @@ -575,9 +596,11 @@ Is ``true`` if passthrough is enabled. .. rst-class:: classref-method -:ref:`bool` **is_passthrough_supported** **(** **)** +:ref:`bool` **is_passthrough_supported**\ (\ ) :ref:`🔗` -Is ``true`` if this interface supports passthrough. +**Deprecated:** Check that :ref:`XR_ENV_BLEND_MODE_ALPHA_BLEND` is supported using :ref:`get_supported_environment_blend_modes`, instead. + +Returns ``true`` if this interface supports passthrough. .. rst-class:: classref-item-separator @@ -587,27 +610,27 @@ Is ``true`` if this interface supports passthrough. .. rst-class:: classref-method -:ref:`bool` **set_environment_blend_mode** **(** :ref:`EnvironmentBlendMode` mode **)** +:ref:`bool` **set_environment_blend_mode**\ (\ mode\: :ref:`EnvironmentBlendMode`\ ) :ref:`🔗` Sets the active environment blend mode. -\ ``mode`` is the :ref:`EnvironmentBlendMode` starting with the next frame. +\ ``mode`` is the environment blend mode starting with the next frame. \ **Note:** Not all runtimes support all environment blend modes, so it is important to check this at startup. For example: :: - func _ready(): - var xr_interface: XRInterface = XRServer.find_interface("OpenXR") - if xr_interface and xr_interface.is_initialized(): - var vp: Viewport = get_viewport() - vp.use_xr = true - var acceptable_modes = [ XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE ] - var modes = xr_interface.get_supported_environment_blend_modes() - for mode in acceptable_modes: - if mode in modes: - xr_interface.set_environment_blend_mode(mode) - break + func _ready(): + var xr_interface: XRInterface = XRServer.find_interface("OpenXR") + if xr_interface and xr_interface.is_initialized(): + var vp: Viewport = get_viewport() + vp.use_xr = true + var acceptable_modes = [XRInterface.XR_ENV_BLEND_MODE_OPAQUE, XRInterface.XR_ENV_BLEND_MODE_ADDITIVE] + var modes = xr_interface.get_supported_environment_blend_modes() + for mode in acceptable_modes: + if mode in modes: + xr_interface.set_environment_blend_mode(mode) + break .. rst-class:: classref-item-separator @@ -617,10 +640,12 @@ Sets the active environment blend mode. .. rst-class:: classref-method -:ref:`bool` **set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** +:ref:`bool` **set_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode`\ ) :ref:`🔗` Sets the active play area mode, will return ``false`` if the mode can't be used with this interface. +\ **Note:** Changing this after the interface has already been initialized can be jarring for the player, so it's recommended to recenter on the HMD with :ref:`XRServer.center_on_hmd` (if switching to :ref:`XR_PLAY_AREA_STAGE`) or make the switch during a scene change. + .. rst-class:: classref-item-separator ---- @@ -629,7 +654,9 @@ Sets the active play area mode, will return ``false`` if the mode can't be used .. rst-class:: classref-method -:ref:`bool` **start_passthrough** **(** **)** +:ref:`bool` **start_passthrough**\ (\ ) :ref:`🔗` + +**Deprecated:** Set the :ref:`environment_blend_mode` to :ref:`XR_ENV_BLEND_MODE_ALPHA_BLEND`, instead. Starts passthrough, will return ``false`` if passthrough couldn't be started. @@ -643,7 +670,9 @@ Starts passthrough, will return ``false`` if passthrough couldn't be started. .. rst-class:: classref-method -void **stop_passthrough** **(** **)** +|void| **stop_passthrough**\ (\ ) :ref:`🔗` + +**Deprecated:** Set the :ref:`environment_blend_mode` to :ref:`XR_ENV_BLEND_MODE_OPAQUE`, instead. Stops passthrough. @@ -655,7 +684,7 @@ Stops passthrough. .. rst-class:: classref-method -:ref:`bool` **supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** +:ref:`bool` **supports_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode`\ ) :ref:`🔗` Call this to find out if a given play area mode is supported by this interface. @@ -667,7 +696,7 @@ Call this to find out if a given play area mode is supported by this interface. .. rst-class:: classref-method -void **trigger_haptic_pulse** **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** +|void| **trigger_haptic_pulse**\ (\ action_name\: :ref:`String`, tracker_name\: :ref:`StringName`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) :ref:`🔗` Triggers a haptic pulse on a device associated with this interface. @@ -683,7 +712,7 @@ Triggers a haptic pulse on a device associated with this interface. .. rst-class:: classref-method -void **uninitialize** **(** **)** +|void| **uninitialize**\ (\ ) :ref:`🔗` Turns the interface off. @@ -694,3 +723,4 @@ Turns the interface off. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrinterfaceextension.rst b/classes/class_xrinterfaceextension.rst index 3ba8a436756..c3fd406e0dd 100644 --- a/classes/class_xrinterfaceextension.rst +++ b/classes/class_xrinterfaceextension.rst @@ -21,6 +21,13 @@ Description External XR interface plugins should inherit from this class. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + .. rst-class:: classref-reftable-group Methods @@ -29,79 +36,79 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_frame` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_get_anchor_detection_is_enabled` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_camera_feed_id` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_camera_transform` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_capabilities` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_color_texture` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_depth_texture` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_name` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`_get_play_area` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PlayAreaMode` | :ref:`_get_play_area_mode` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array` | :ref:`_get_projection_for_view` **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_render_target_size` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_suggested_pose_names` **(** :ref:`StringName` tracker_name **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_system_info` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TrackingStatus` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_velocity_texture` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_view_count` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_vrs_texture` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_initialize` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_initialized` **(** **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_post_draw_viewport` **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_pre_draw_viewport` **(** :ref:`RID` render_target **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pre_render` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_anchor_detection_is_enabled` **(** :ref:`bool` enabled **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_set_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_supports_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_uninitialize` **(** **)** |virtual| | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_blit` **(** :ref:`RID` render_target, :ref:`Rect2` src_rect, :ref:`Rect2i` dst_rect, :ref:`bool` use_layer, :ref:`int` layer, :ref:`bool` apply_lens_distortion, :ref:`Vector2` eye_center, :ref:`float` k1, :ref:`float` k2, :ref:`float` upscale, :ref:`float` aspect_ratio **)** | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_texture` **(** **)** | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_depth_texture` **(** **)** | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_render_target_texture` **(** :ref:`RID` render_target **)** | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_velocity_texture` **(** **)** | - +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_end_frame`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_get_anchor_detection_is_enabled`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_camera_feed_id`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_camera_transform`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_capabilities`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_color_texture`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_depth_texture`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_name`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`_get_play_area`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PlayAreaMode` | :ref:`_get_play_area_mode`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat64Array` | :ref:`_get_projection_for_view`\ (\ view\: :ref:`int`, aspect\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_render_target_size`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_suggested_pose_names`\ (\ tracker_name\: :ref:`StringName`\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_system_info`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TrackingStatus` | :ref:`_get_tracking_status`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_transform_for_view`\ (\ view\: :ref:`int`, cam_transform\: :ref:`Transform3D`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_velocity_texture`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_view_count`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_vrs_texture`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_initialize`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_initialized`\ (\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_post_draw_viewport`\ (\ render_target\: :ref:`RID`, screen_rect\: :ref:`Rect2`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_pre_draw_viewport`\ (\ render_target\: :ref:`RID`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_pre_render`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_anchor_detection_is_enabled`\ (\ enabled\: :ref:`bool`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_set_play_area_mode`\ (\ mode\: :ref:`PlayAreaMode`\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_play_area_mode`\ (\ mode\: :ref:`PlayAreaMode`\ ) |virtual| |const| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_trigger_haptic_pulse`\ (\ action_name\: :ref:`String`, tracker_name\: :ref:`StringName`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_uninitialize`\ (\ ) |virtual| | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_blit`\ (\ render_target\: :ref:`RID`, src_rect\: :ref:`Rect2`, dst_rect\: :ref:`Rect2i`, use_layer\: :ref:`bool`, layer\: :ref:`int`, apply_lens_distortion\: :ref:`bool`, eye_center\: :ref:`Vector2`, k1\: :ref:`float`, k2\: :ref:`float`, upscale\: :ref:`float`, aspect_ratio\: :ref:`float`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_color_texture`\ (\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_depth_texture`\ (\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_render_target_texture`\ (\ render_target\: :ref:`RID`\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_velocity_texture`\ (\ ) | + +--------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,11 +119,11 @@ Methods Method Descriptions ------------------- -.. _class_XRInterfaceExtension_method__end_frame: +.. _class_XRInterfaceExtension_private_method__end_frame: .. rst-class:: classref-method -void **_end_frame** **(** **)** |virtual| +|void| **_end_frame**\ (\ ) |virtual| :ref:`🔗` Called if interface is active and queues have been submitted. @@ -124,11 +131,11 @@ Called if interface is active and queues have been submitted. ---- -.. _class_XRInterfaceExtension_method__get_anchor_detection_is_enabled: +.. _class_XRInterfaceExtension_private_method__get_anchor_detection_is_enabled: .. rst-class:: classref-method -:ref:`bool` **_get_anchor_detection_is_enabled** **(** **)** |virtual| |const| +:ref:`bool` **_get_anchor_detection_is_enabled**\ (\ ) |virtual| |const| :ref:`🔗` Return ``true`` if anchor detection is enabled for this interface. @@ -136,11 +143,11 @@ Return ``true`` if anchor detection is enabled for this interface. ---- -.. _class_XRInterfaceExtension_method__get_camera_feed_id: +.. _class_XRInterfaceExtension_private_method__get_camera_feed_id: .. rst-class:: classref-method -:ref:`int` **_get_camera_feed_id** **(** **)** |virtual| |const| +:ref:`int` **_get_camera_feed_id**\ (\ ) |virtual| |const| :ref:`🔗` Returns the camera feed ID for the :ref:`CameraFeed` registered with the :ref:`CameraServer` that should be presented as the background on an AR capable device (if applicable). @@ -148,11 +155,11 @@ Returns the camera feed ID for the :ref:`CameraFeed` registere ---- -.. _class_XRInterfaceExtension_method__get_camera_transform: +.. _class_XRInterfaceExtension_private_method__get_camera_transform: .. rst-class:: classref-method -:ref:`Transform3D` **_get_camera_transform** **(** **)** |virtual| +:ref:`Transform3D` **_get_camera_transform**\ (\ ) |virtual| :ref:`🔗` Returns the :ref:`Transform3D` that positions the :ref:`XRCamera3D` in the world. @@ -160,11 +167,11 @@ Returns the :ref:`Transform3D` that positions the :ref:`XRCam ---- -.. _class_XRInterfaceExtension_method__get_capabilities: +.. _class_XRInterfaceExtension_private_method__get_capabilities: .. rst-class:: classref-method -:ref:`int` **_get_capabilities** **(** **)** |virtual| |const| +:ref:`int` **_get_capabilities**\ (\ ) |virtual| |const| :ref:`🔗` Returns the capabilities of this interface. @@ -172,11 +179,11 @@ Returns the capabilities of this interface. ---- -.. _class_XRInterfaceExtension_method__get_color_texture: +.. _class_XRInterfaceExtension_private_method__get_color_texture: .. rst-class:: classref-method -:ref:`RID` **_get_color_texture** **(** **)** |virtual| +:ref:`RID` **_get_color_texture**\ (\ ) |virtual| :ref:`🔗` Return color texture into which to render (if applicable). @@ -184,11 +191,11 @@ Return color texture into which to render (if applicable). ---- -.. _class_XRInterfaceExtension_method__get_depth_texture: +.. _class_XRInterfaceExtension_private_method__get_depth_texture: .. rst-class:: classref-method -:ref:`RID` **_get_depth_texture** **(** **)** |virtual| +:ref:`RID` **_get_depth_texture**\ (\ ) |virtual| :ref:`🔗` Return depth texture into which to render (if applicable). @@ -196,11 +203,11 @@ Return depth texture into which to render (if applicable). ---- -.. _class_XRInterfaceExtension_method__get_name: +.. _class_XRInterfaceExtension_private_method__get_name: .. rst-class:: classref-method -:ref:`StringName` **_get_name** **(** **)** |virtual| |const| +:ref:`StringName` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` Returns the name of this interface. @@ -208,35 +215,35 @@ Returns the name of this interface. ---- -.. _class_XRInterfaceExtension_method__get_play_area: +.. _class_XRInterfaceExtension_private_method__get_play_area: .. rst-class:: classref-method -:ref:`PackedVector3Array` **_get_play_area** **(** **)** |virtual| |const| +:ref:`PackedVector3Array` **_get_play_area**\ (\ ) |virtual| |const| :ref:`🔗` -Returns an :ref:`PackedVector3Array` that denotes the play areas boundaries (if applicable). +Returns a :ref:`PackedVector3Array` that represents the play areas boundaries (if applicable). .. rst-class:: classref-item-separator ---- -.. _class_XRInterfaceExtension_method__get_play_area_mode: +.. _class_XRInterfaceExtension_private_method__get_play_area_mode: .. rst-class:: classref-method -:ref:`PlayAreaMode` **_get_play_area_mode** **(** **)** |virtual| |const| +:ref:`PlayAreaMode` **_get_play_area_mode**\ (\ ) |virtual| |const| :ref:`🔗` -Returns the :ref:`PlayAreaMode` that sets up our play area. +Returns the play area mode that sets up our play area. .. rst-class:: classref-item-separator ---- -.. _class_XRInterfaceExtension_method__get_projection_for_view: +.. _class_XRInterfaceExtension_private_method__get_projection_for_view: .. rst-class:: classref-method -:ref:`PackedFloat64Array` **_get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| +:ref:`PackedFloat64Array` **_get_projection_for_view**\ (\ view\: :ref:`int`, aspect\: :ref:`float`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) |virtual| :ref:`🔗` Returns the projection matrix for the given view as a :ref:`PackedFloat64Array`. @@ -244,11 +251,11 @@ Returns the projection matrix for the given view as a :ref:`PackedFloat64Array` **_get_render_target_size** **(** **)** |virtual| +:ref:`Vector2` **_get_render_target_size**\ (\ ) |virtual| :ref:`🔗` Returns the size of our render target for this interface, this overrides the size of the :ref:`Viewport` marked as the xr viewport. @@ -256,11 +263,11 @@ Returns the size of our render target for this interface, this overrides the siz ---- -.. _class_XRInterfaceExtension_method__get_suggested_pose_names: +.. _class_XRInterfaceExtension_private_method__get_suggested_pose_names: .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_suggested_pose_names** **(** :ref:`StringName` tracker_name **)** |virtual| |const| +:ref:`PackedStringArray` **_get_suggested_pose_names**\ (\ tracker_name\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` Returns a :ref:`PackedStringArray` with pose names configured by this interface. Note that user configuration can override this list. @@ -268,11 +275,11 @@ Returns a :ref:`PackedStringArray` with pose names conf ---- -.. _class_XRInterfaceExtension_method__get_suggested_tracker_names: +.. _class_XRInterfaceExtension_private_method__get_suggested_tracker_names: .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_suggested_tracker_names** **(** **)** |virtual| |const| +:ref:`PackedStringArray` **_get_suggested_tracker_names**\ (\ ) |virtual| |const| :ref:`🔗` Returns a :ref:`PackedStringArray` with tracker names configured by this interface. Note that user configuration can override this list. @@ -280,23 +287,23 @@ Returns a :ref:`PackedStringArray` with tracker names c ---- -.. _class_XRInterfaceExtension_method__get_system_info: +.. _class_XRInterfaceExtension_private_method__get_system_info: .. rst-class:: classref-method -:ref:`Dictionary` **_get_system_info** **(** **)** |virtual| |const| +:ref:`Dictionary` **_get_system_info**\ (\ ) |virtual| |const| :ref:`🔗` -Returns a :ref:`Dictionary` with system informationr elated to this interface. +Returns a :ref:`Dictionary` with system information related to this interface. .. rst-class:: classref-item-separator ---- -.. _class_XRInterfaceExtension_method__get_tracking_status: +.. _class_XRInterfaceExtension_private_method__get_tracking_status: .. rst-class:: classref-method -:ref:`TrackingStatus` **_get_tracking_status** **(** **)** |virtual| |const| +:ref:`TrackingStatus` **_get_tracking_status**\ (\ ) |virtual| |const| :ref:`🔗` Returns a :ref:`TrackingStatus` specifying the current status of our tracking. @@ -304,11 +311,11 @@ Returns a :ref:`TrackingStatus` specifying the ---- -.. _class_XRInterfaceExtension_method__get_transform_for_view: +.. _class_XRInterfaceExtension_private_method__get_transform_for_view: .. rst-class:: classref-method -:ref:`Transform3D` **_get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| +:ref:`Transform3D` **_get_transform_for_view**\ (\ view\: :ref:`int`, cam_transform\: :ref:`Transform3D`\ ) |virtual| :ref:`🔗` Returns a :ref:`Transform3D` for a given view. @@ -316,11 +323,11 @@ Returns a :ref:`Transform3D` for a given view. ---- -.. _class_XRInterfaceExtension_method__get_velocity_texture: +.. _class_XRInterfaceExtension_private_method__get_velocity_texture: .. rst-class:: classref-method -:ref:`RID` **_get_velocity_texture** **(** **)** |virtual| +:ref:`RID` **_get_velocity_texture**\ (\ ) |virtual| :ref:`🔗` Return velocity texture into which to render (if applicable). @@ -328,11 +335,11 @@ Return velocity texture into which to render (if applicable). ---- -.. _class_XRInterfaceExtension_method__get_view_count: +.. _class_XRInterfaceExtension_private_method__get_view_count: .. rst-class:: classref-method -:ref:`int` **_get_view_count** **(** **)** |virtual| +:ref:`int` **_get_view_count**\ (\ ) |virtual| :ref:`🔗` Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic. @@ -340,11 +347,11 @@ Returns the number of views this interface requires, 1 for mono, 2 for stereosco ---- -.. _class_XRInterfaceExtension_method__get_vrs_texture: +.. _class_XRInterfaceExtension_private_method__get_vrs_texture: .. rst-class:: classref-method -:ref:`RID` **_get_vrs_texture** **(** **)** |virtual| +:ref:`RID` **_get_vrs_texture**\ (\ ) |virtual| :ref:`🔗` .. container:: contribute @@ -354,11 +361,11 @@ Returns the number of views this interface requires, 1 for mono, 2 for stereosco ---- -.. _class_XRInterfaceExtension_method__initialize: +.. _class_XRInterfaceExtension_private_method__initialize: .. rst-class:: classref-method -:ref:`bool` **_initialize** **(** **)** |virtual| +:ref:`bool` **_initialize**\ (\ ) |virtual| :ref:`🔗` Initializes the interface, returns ``true`` on success. @@ -366,11 +373,11 @@ Initializes the interface, returns ``true`` on success. ---- -.. _class_XRInterfaceExtension_method__is_initialized: +.. _class_XRInterfaceExtension_private_method__is_initialized: .. rst-class:: classref-method -:ref:`bool` **_is_initialized** **(** **)** |virtual| |const| +:ref:`bool` **_is_initialized**\ (\ ) |virtual| |const| :ref:`🔗` Returns ``true`` if this interface has been initialized. @@ -378,11 +385,11 @@ Returns ``true`` if this interface has been initialized. ---- -.. _class_XRInterfaceExtension_method__post_draw_viewport: +.. _class_XRInterfaceExtension_private_method__post_draw_viewport: .. rst-class:: classref-method -void **_post_draw_viewport** **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| +|void| **_post_draw_viewport**\ (\ render_target\: :ref:`RID`, screen_rect\: :ref:`Rect2`\ ) |virtual| :ref:`🔗` Called after the XR :ref:`Viewport` draw logic has completed. @@ -390,11 +397,11 @@ Called after the XR :ref:`Viewport` draw logic has completed. ---- -.. _class_XRInterfaceExtension_method__pre_draw_viewport: +.. _class_XRInterfaceExtension_private_method__pre_draw_viewport: .. rst-class:: classref-method -:ref:`bool` **_pre_draw_viewport** **(** :ref:`RID` render_target **)** |virtual| +:ref:`bool` **_pre_draw_viewport**\ (\ render_target\: :ref:`RID`\ ) |virtual| :ref:`🔗` Called if this is our primary **XRInterfaceExtension** before we start processing a :ref:`Viewport` for every active XR :ref:`Viewport`, returns ``true`` if that viewport should be rendered. An XR interface may return ``false`` if the user has taken off their headset and we can pause rendering. @@ -402,11 +409,11 @@ Called if this is our primary **XRInterfaceExtension** before we start processin ---- -.. _class_XRInterfaceExtension_method__pre_render: +.. _class_XRInterfaceExtension_private_method__pre_render: .. rst-class:: classref-method -void **_pre_render** **(** **)** |virtual| +|void| **_pre_render**\ (\ ) |virtual| :ref:`🔗` Called if this **XRInterfaceExtension** is active before rendering starts. Most XR interfaces will sync tracking at this point in time. @@ -414,11 +421,11 @@ Called if this **XRInterfaceExtension** is active before rendering starts. Most ---- -.. _class_XRInterfaceExtension_method__process: +.. _class_XRInterfaceExtension_private_method__process: .. rst-class:: classref-method -void **_process** **(** **)** |virtual| +|void| **_process**\ (\ ) |virtual| :ref:`🔗` Called if this **XRInterfaceExtension** is active before our physics and game process is called. Most XR interfaces will update its :ref:`XRPositionalTracker`\ s at this point in time. @@ -426,11 +433,11 @@ Called if this **XRInterfaceExtension** is active before our physics and game pr ---- -.. _class_XRInterfaceExtension_method__set_anchor_detection_is_enabled: +.. _class_XRInterfaceExtension_private_method__set_anchor_detection_is_enabled: .. rst-class:: classref-method -void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled **)** |virtual| +|void| **_set_anchor_detection_is_enabled**\ (\ enabled\: :ref:`bool`\ ) |virtual| :ref:`🔗` Enables anchor detection on this interface if supported. @@ -438,11 +445,11 @@ Enables anchor detection on this interface if supported. ---- -.. _class_XRInterfaceExtension_method__set_play_area_mode: +.. _class_XRInterfaceExtension_private_method__set_play_area_mode: .. rst-class:: classref-method -:ref:`bool` **_set_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| +:ref:`bool` **_set_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode`\ ) |virtual| |const| :ref:`🔗` Set the play area mode for this interface. @@ -450,11 +457,11 @@ Set the play area mode for this interface. ---- -.. _class_XRInterfaceExtension_method__supports_play_area_mode: +.. _class_XRInterfaceExtension_private_method__supports_play_area_mode: .. rst-class:: classref-method -:ref:`bool` **_supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| +:ref:`bool` **_supports_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode`\ ) |virtual| |const| :ref:`🔗` Returns ``true`` if this interface supports this play area mode. @@ -462,11 +469,11 @@ Returns ``true`` if this interface supports this play area mode. ---- -.. _class_XRInterfaceExtension_method__trigger_haptic_pulse: +.. _class_XRInterfaceExtension_private_method__trigger_haptic_pulse: .. rst-class:: classref-method -void **_trigger_haptic_pulse** **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| +|void| **_trigger_haptic_pulse**\ (\ action_name\: :ref:`String`, tracker_name\: :ref:`StringName`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) |virtual| :ref:`🔗` Triggers a haptic pulse to be emitted on the specified tracker. @@ -474,11 +481,11 @@ Triggers a haptic pulse to be emitted on the specified tracker. ---- -.. _class_XRInterfaceExtension_method__uninitialize: +.. _class_XRInterfaceExtension_private_method__uninitialize: .. rst-class:: classref-method -void **_uninitialize** **(** **)** |virtual| +|void| **_uninitialize**\ (\ ) |virtual| :ref:`🔗` Uninitialize the interface. @@ -490,7 +497,7 @@ Uninitialize the interface. .. rst-class:: classref-method -void **add_blit** **(** :ref:`RID` render_target, :ref:`Rect2` src_rect, :ref:`Rect2i` dst_rect, :ref:`bool` use_layer, :ref:`int` layer, :ref:`bool` apply_lens_distortion, :ref:`Vector2` eye_center, :ref:`float` k1, :ref:`float` k2, :ref:`float` upscale, :ref:`float` aspect_ratio **)** +|void| **add_blit**\ (\ render_target\: :ref:`RID`, src_rect\: :ref:`Rect2`, dst_rect\: :ref:`Rect2i`, use_layer\: :ref:`bool`, layer\: :ref:`int`, apply_lens_distortion\: :ref:`bool`, eye_center\: :ref:`Vector2`, k1\: :ref:`float`, k2\: :ref:`float`, upscale\: :ref:`float`, aspect_ratio\: :ref:`float`\ ) :ref:`🔗` Blits our render results to screen optionally applying lens distortion. This can only be called while processing ``_commit_views``. @@ -502,7 +509,7 @@ Blits our render results to screen optionally applying lens distortion. This can .. rst-class:: classref-method -:ref:`RID` **get_color_texture** **(** **)** +:ref:`RID` **get_color_texture**\ (\ ) :ref:`🔗` .. container:: contribute @@ -516,7 +523,7 @@ Blits our render results to screen optionally applying lens distortion. This can .. rst-class:: classref-method -:ref:`RID` **get_depth_texture** **(** **)** +:ref:`RID` **get_depth_texture**\ (\ ) :ref:`🔗` .. container:: contribute @@ -530,7 +537,7 @@ Blits our render results to screen optionally applying lens distortion. This can .. rst-class:: classref-method -:ref:`RID` **get_render_target_texture** **(** :ref:`RID` render_target **)** +:ref:`RID` **get_render_target_texture**\ (\ render_target\: :ref:`RID`\ ) :ref:`🔗` Returns a valid :ref:`RID` for a texture to which we should render the current frame if supported by the interface. @@ -542,7 +549,7 @@ Returns a valid :ref:`RID` for a texture to which we should render th .. rst-class:: classref-method -:ref:`RID` **get_velocity_texture** **(** **)** +:ref:`RID` **get_velocity_texture**\ (\ ) :ref:`🔗` .. container:: contribute @@ -555,3 +562,4 @@ Returns a valid :ref:`RID` for a texture to which we should render th .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrnode3d.rst b/classes/class_xrnode3d.rst index bdb91adebfb..675e6db7b89 100644 --- a/classes/class_xrnode3d.rst +++ b/classes/class_xrnode3d.rst @@ -23,6 +23,13 @@ Description This node can be bound to a specific pose of a :ref:`XRPositionalTracker` and will automatically have its :ref:`Node3D.transform` updated by the :ref:`XRServer`. Nodes of this type must be added as children of the :ref:`XROrigin3D` node. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + .. rst-class:: classref-reftable-group Properties @@ -31,11 +38,13 @@ Properties .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------+----------------+ - | :ref:`StringName` | :ref:`pose` | ``&"default"`` | - +-------------------------------------+-------------------------------------------------+----------------+ - | :ref:`StringName` | :ref:`tracker` | ``&""`` | - +-------------------------------------+-------------------------------------------------+----------------+ + +-------------------------------------+---------------------------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`pose` | ``&"default"`` | + +-------------------------------------+---------------------------------------------------------------------+----------------+ + | :ref:`bool` | :ref:`show_when_tracked` | ``false`` | + +-------------------------------------+---------------------------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`tracker` | ``&""`` | + +-------------------------------------+---------------------------------------------------------------------+----------------+ .. rst-class:: classref-reftable-group @@ -45,15 +54,32 @@ Methods .. table:: :widths: auto - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_has_tracking_data` **(** **)** |const| | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_is_active` **(** **)** |const| | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRPose` | :ref:`get_pose` **(** **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** | - +-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_has_tracking_data`\ (\ ) |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_is_active`\ (\ ) |const| | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRPose` | :ref:`get_pose`\ (\ ) | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`trigger_haptic_pulse`\ (\ action_name\: :ref:`String`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Signals +------- + +.. _class_XRNode3D_signal_tracking_changed: + +.. rst-class:: classref-signal + +**tracking_changed**\ (\ tracking\: :ref:`bool`\ ) :ref:`🔗` + +Emitted when the :ref:`tracker` starts or stops receiving updated tracking data for the :ref:`pose` being tracked. The ``tracking`` argument indicates whether the tracker is getting updated tracking data. .. rst-class:: classref-section-separator @@ -68,12 +94,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`StringName` **pose** = ``&"default"`` +:ref:`StringName` **pose** = ``&"default"`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_pose_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_pose_name** **(** **)** +- |void| **set_pose_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_pose_name**\ (\ ) The name of the pose we're bound to. Which poses a tracker supports is not known during design time. @@ -83,16 +109,33 @@ Godot defines number of standard pose names such as ``aim`` and ``grip`` but oth ---- +.. _class_XRNode3D_property_show_when_tracked: + +.. rst-class:: classref-property + +:ref:`bool` **show_when_tracked** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_show_when_tracked**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_show_when_tracked**\ (\ ) + +Enables showing the node when tracking starts, and hiding the node when tracking is lost. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRNode3D_property_tracker: .. rst-class:: classref-property -:ref:`StringName` **tracker** = ``&""`` +:ref:`StringName` **tracker** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tracker** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_tracker** **(** **)** +- |void| **set_tracker**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_tracker**\ (\ ) The name of the tracker we're bound to. Which trackers are available is not known during design time. @@ -111,7 +154,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`bool` **get_has_tracking_data** **(** **)** |const| +:ref:`bool` **get_has_tracking_data**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the :ref:`tracker` has current tracking data for the :ref:`pose` being tracked. @@ -123,7 +166,7 @@ Returns ``true`` if the :ref:`tracker` has curr .. rst-class:: classref-method -:ref:`bool` **get_is_active** **(** **)** |const| +:ref:`bool` **get_is_active**\ (\ ) |const| :ref:`🔗` Returns ``true`` if the :ref:`tracker` has been registered and the :ref:`pose` is being tracked. @@ -135,7 +178,7 @@ Returns ``true`` if the :ref:`tracker` has been .. rst-class:: classref-method -:ref:`XRPose` **get_pose** **(** **)** +:ref:`XRPose` **get_pose**\ (\ ) :ref:`🔗` Returns the :ref:`XRPose` containing the current state of the pose being tracked. This gives access to additional properties of this pose. @@ -147,7 +190,7 @@ Returns the :ref:`XRPose` containing the current state of the pose .. rst-class:: classref-method -void **trigger_haptic_pulse** **(** :ref:`String` action_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** +|void| **trigger_haptic_pulse**\ (\ action_name\: :ref:`String`, frequency\: :ref:`float`, amplitude\: :ref:`float`, duration_sec\: :ref:`float`, delay_sec\: :ref:`float`\ ) :ref:`🔗` Triggers a haptic pulse on a device associated with this interface. @@ -160,3 +203,4 @@ Triggers a haptic pulse on a device associated with this interface. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrorigin3d.rst b/classes/class_xrorigin3d.rst index 31c8aaab479..bb1b2731a27 100644 --- a/classes/class_xrorigin3d.rst +++ b/classes/class_xrorigin3d.rst @@ -21,11 +21,11 @@ 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 XRCamera3D, XRController3D and XRAnchor3D nodes should be direct children of this node for spatial tracking to work correctly. +Multiple origin points can be added to the scene tree, but only one can used at a time. All the :ref:`XRCamera3D`, :ref:`XRController3D`, and :ref:`XRAnchor3D` 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 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. -For example, if your character is driving a car, the XROrigin3D node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. +For example, if your character is driving a car, the **XROrigin3D** node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. .. rst-class:: classref-introduction-group @@ -61,14 +61,14 @@ Property Descriptions .. rst-class:: classref-property -:ref:`bool` **current** = ``false`` +:ref:`bool` **current** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_current** **(** :ref:`bool` value **)** -- :ref:`bool` **is_current** **(** **)** +- |void| **set_current**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_current**\ (\ ) -Is this XROrigin3D node the current origin used by the :ref:`XRServer`? +If ``true``, this origin node is currently being used by the :ref:`XRServer`. Only one origin point can be used at a time. .. rst-class:: classref-item-separator @@ -78,16 +78,14 @@ Is this XROrigin3D node the current origin used by the :ref:`XRServer` **world_scale** = ``1.0`` +:ref:`float` **world_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_world_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_world_scale** **(** **)** +- |void| **set_world_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_world_scale**\ (\ ) -Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. - -\ **Note:** This method is a passthrough to the :ref:`XRServer` itself. +The scale of the game world compared to the real world. This is the same as :ref:`XRServer.world_scale`. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -96,3 +94,4 @@ Allows you to adjust the scale to your game's units. Most AR/VR platforms assume .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrpose.rst b/classes/class_xrpose.rst index d95d5d0bfbf..026ac18c5c3 100644 --- a/classes/class_xrpose.rst +++ b/classes/class_xrpose.rst @@ -23,6 +23,13 @@ XR runtimes often identify multiple locations on devices such as controllers tha Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + .. rst-class:: classref-reftable-group Properties @@ -53,9 +60,9 @@ Methods .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_adjusted_transform` **(** **)** |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_adjusted_transform`\ (\ ) |const| | + +---------------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,7 +77,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TrackingConfidence**: +enum **TrackingConfidence**: :ref:`🔗` .. _class_XRPose_constant_XR_TRACKING_CONFIDENCE_NONE: @@ -94,7 +101,7 @@ Tracking information may be inaccurate or estimated. For example, with inside ou :ref:`TrackingConfidence` **XR_TRACKING_CONFIDENCE_HIGH** = ``2`` -Tracking information is deemed accurate and up to date. +Tracking information is considered accurate and up to date. .. rst-class:: classref-section-separator @@ -109,12 +116,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **angular_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_angular_velocity** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_angular_velocity** **(** **)** +- |void| **set_angular_velocity**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_angular_velocity**\ (\ ) The angular velocity for this pose. @@ -126,12 +133,12 @@ The angular velocity for this pose. .. rst-class:: classref-property -:ref:`bool` **has_tracking_data** = ``false`` +:ref:`bool` **has_tracking_data** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_has_tracking_data** **(** :ref:`bool` value **)** -- :ref:`bool` **get_has_tracking_data** **(** **)** +- |void| **set_has_tracking_data**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_has_tracking_data**\ (\ ) If ``true`` our tracking data is up to date. If ``false`` we're no longer receiving new tracking data and our state is whatever that last valid state was. @@ -143,12 +150,12 @@ If ``true`` our tracking data is up to date. If ``false`` we're no longer receiv .. rst-class:: classref-property -:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` +:ref:`Vector3` **linear_velocity** = ``Vector3(0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_linear_velocity** **(** :ref:`Vector3` value **)** -- :ref:`Vector3` **get_linear_velocity** **(** **)** +- |void| **set_linear_velocity**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_linear_velocity**\ (\ ) The linear velocity of this pose. @@ -160,12 +167,12 @@ The linear velocity of this pose. .. rst-class:: classref-property -:ref:`StringName` **name** = ``&""`` +:ref:`StringName` **name** = ``&""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_name** **(** **)** +- |void| **set_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_name**\ (\ ) The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects :ref:`XRInterface`\ s to implement: @@ -185,12 +192,12 @@ The name of this pose. Pose names are often driven by an action map setup by the .. rst-class:: classref-property -:ref:`TrackingConfidence` **tracking_confidence** = ``0`` +:ref:`TrackingConfidence` **tracking_confidence** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tracking_confidence** **(** :ref:`TrackingConfidence` value **)** -- :ref:`TrackingConfidence` **get_tracking_confidence** **(** **)** +- |void| **set_tracking_confidence**\ (\ value\: :ref:`TrackingConfidence`\ ) +- :ref:`TrackingConfidence` **get_tracking_confidence**\ (\ ) The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is. @@ -202,12 +209,12 @@ The tracking confidence for this pose, provides insight on how accurate the spat .. rst-class:: classref-property -:ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_transform** **(** :ref:`Transform3D` value **)** -- :ref:`Transform3D` **get_transform** **(** **)** +- |void| **set_transform**\ (\ value\: :ref:`Transform3D`\ ) +- :ref:`Transform3D` **get_transform**\ (\ ) The transform containing the original and transform as reported by the XR runtime. @@ -224,7 +231,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Transform3D` **get_adjusted_transform** **(** **)** |const| +:ref:`Transform3D` **get_adjusted_transform**\ (\ ) |const| :ref:`🔗` Returns the :ref:`transform` with world scale and our reference frame applied. This is the transform used to position :ref:`XRNode3D` objects. @@ -235,3 +242,4 @@ Returns the :ref:`transform` with world scale a .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrpositionaltracker.rst b/classes/class_xrpositionaltracker.rst index b2f2ad96dee..5afb3a82a29 100644 --- a/classes/class_xrpositionaltracker.rst +++ b/classes/class_xrpositionaltracker.rst @@ -10,7 +10,9 @@ XRPositionalTracker =================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`XRTracker` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`XRBodyTracker`, :ref:`XRControllerTracker`, :ref:`XRHandTracker` A tracked object. @@ -23,7 +25,7 @@ An instance of this object represents a device that is tracked, such as a contro As controllers are turned on and the :ref:`XRInterface` detects them, instances of this object are automatically added to this list of active tracking objects accessible through the :ref:`XRServer`. -The :ref:`XRController3D` and :ref:`XRAnchor3D` both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them. +The :ref:`XRNode3D` and :ref:`XRAnchor3D` both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDExtension-based interfaces can interact with them. .. rst-class:: classref-introduction-group @@ -40,17 +42,11 @@ Properties .. table:: :widths: auto - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ - | :ref:`String` | :ref:`description` | ``""`` | - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ - | :ref:`TrackerHand` | :ref:`hand` | ``0`` | - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ - | :ref:`StringName` | :ref:`name` | ``&"Unknown"`` | - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ - | :ref:`String` | :ref:`profile` | ``""`` | - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ - | :ref:`TrackerType` | :ref:`type` | ``128`` | - +----------------------------------------------------------+--------------------------------------------------------------------+----------------+ + +----------------------------------------------------------+------------------------------------------------------------+--------+ + | :ref:`TrackerHand` | :ref:`hand` | ``0`` | + +----------------------------------------------------------+------------------------------------------------------------+--------+ + | :ref:`String` | :ref:`profile` | ``""`` | + +----------------------------------------------------------+------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -60,19 +56,19 @@ Methods .. table:: :widths: auto - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_input` **(** :ref:`StringName` name **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRPose` | :ref:`get_pose` **(** :ref:`StringName` name **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_pose` **(** :ref:`StringName` name **)** |const| | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`invalidate_pose` **(** :ref:`StringName` name **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_input` **(** :ref:`StringName` name, :ref:`Variant` value **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_pose` **(** :ref:`StringName` name, :ref:`Transform3D` transform, :ref:`Vector3` linear_velocity, :ref:`Vector3` angular_velocity, :ref:`TrackingConfidence` tracking_confidence **)** | - +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_input`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRPose` | :ref:`get_pose`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_pose`\ (\ name\: :ref:`StringName`\ ) |const| | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`invalidate_pose`\ (\ name\: :ref:`StringName`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_input`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pose`\ (\ name\: :ref:`StringName`, transform\: :ref:`Transform3D`, linear_velocity\: :ref:`Vector3`, angular_velocity\: :ref:`Vector3`, tracking_confidence\: :ref:`TrackingConfidence`\ ) | + +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -87,7 +83,7 @@ Signals .. rst-class:: classref-signal -**button_pressed** **(** :ref:`String` name **)** +**button_pressed**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Emitted when a button on this tracker is pressed. Note that many XR runtimes allow other inputs to be mapped to buttons. @@ -99,7 +95,7 @@ Emitted when a button on this tracker is pressed. Note that many XR runtimes all .. rst-class:: classref-signal -**button_released** **(** :ref:`String` name **)** +**button_released**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Emitted when a button on this tracker is released. @@ -111,7 +107,7 @@ Emitted when a button on this tracker is released. .. rst-class:: classref-signal -**input_float_changed** **(** :ref:`String` name, :ref:`float` value **)** +**input_float_changed**\ (\ name\: :ref:`String`, value\: :ref:`float`\ ) :ref:`🔗` Emitted when a trigger or similar input on this tracker changes value. @@ -123,7 +119,7 @@ Emitted when a trigger or similar input on this tracker changes value. .. rst-class:: classref-signal -**input_vector2_changed** **(** :ref:`String` name, :ref:`Vector2` vector **)** +**input_vector2_changed**\ (\ name\: :ref:`String`, vector\: :ref:`Vector2`\ ) :ref:`🔗` Emitted when a thumbstick or thumbpad on this tracker moves. @@ -135,7 +131,7 @@ Emitted when a thumbstick or thumbpad on this tracker moves. .. rst-class:: classref-signal -**pose_changed** **(** :ref:`XRPose` pose **)** +**pose_changed**\ (\ pose\: :ref:`XRPose`\ ) :ref:`🔗` Emitted when the state of a pose tracked by this tracker changes. @@ -143,11 +139,23 @@ Emitted when the state of a pose tracked by this tracker changes. ---- +.. _class_XRPositionalTracker_signal_pose_lost_tracking: + +.. rst-class:: classref-signal + +**pose_lost_tracking**\ (\ pose\: :ref:`XRPose`\ ) :ref:`🔗` + +Emitted when a pose tracked by this tracker stops getting updated tracking data. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRPositionalTracker_signal_profile_changed: .. rst-class:: classref-signal -**profile_changed** **(** :ref:`String` role **)** +**profile_changed**\ (\ role\: :ref:`String`\ ) :ref:`🔗` Emitted when the profile of our tracker changes. @@ -164,7 +172,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TrackerHand**: +enum **TrackerHand**: :ref:`🔗` .. _class_XRPositionalTracker_constant_TRACKER_HAND_UNKNOWN: @@ -190,6 +198,14 @@ This tracker is the left hand controller. This tracker is the right hand controller. +.. _class_XRPositionalTracker_constant_TRACKER_HAND_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerHand` **TRACKER_HAND_MAX** = ``3`` + +Represents the size of the :ref:`TrackerHand` enum. + .. rst-class:: classref-section-separator ---- @@ -199,33 +215,16 @@ This tracker is the right hand controller. Property Descriptions --------------------- -.. _class_XRPositionalTracker_property_description: - -.. rst-class:: classref-property - -:ref:`String` **description** = ``""`` - -.. rst-class:: classref-property-setget - -- void **set_tracker_desc** **(** :ref:`String` value **)** -- :ref:`String` **get_tracker_desc** **(** **)** - -The description of this tracker. - -.. rst-class:: classref-item-separator - ----- - .. _class_XRPositionalTracker_property_hand: .. rst-class:: classref-property -:ref:`TrackerHand` **hand** = ``0`` +:ref:`TrackerHand` **hand** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tracker_hand** **(** :ref:`TrackerHand` value **)** -- :ref:`TrackerHand` **get_tracker_hand** **(** **)** +- |void| **set_tracker_hand**\ (\ value\: :ref:`TrackerHand`\ ) +- :ref:`TrackerHand` **get_tracker_hand**\ (\ ) Defines which hand this tracker relates to. @@ -233,57 +232,19 @@ Defines which hand this tracker relates to. ---- -.. _class_XRPositionalTracker_property_name: - -.. rst-class:: classref-property - -:ref:`StringName` **name** = ``&"Unknown"`` - -.. rst-class:: classref-property-setget - -- void **set_tracker_name** **(** :ref:`StringName` value **)** -- :ref:`StringName` **get_tracker_name** **(** **)** - -The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the :ref:`XRInterface` to implement if applicable: - -- ``left_hand`` identifies the controller held in the players left hand - -- ``right_hand`` identifies the controller held in the players right hand - -.. rst-class:: classref-item-separator - ----- - .. _class_XRPositionalTracker_property_profile: .. rst-class:: classref-property -:ref:`String` **profile** = ``""`` +:ref:`String` **profile** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_tracker_profile** **(** :ref:`String` value **)** -- :ref:`String` **get_tracker_profile** **(** **)** +- |void| **set_tracker_profile**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_tracker_profile**\ (\ ) The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked. -.. rst-class:: classref-item-separator - ----- - -.. _class_XRPositionalTracker_property_type: - -.. rst-class:: classref-property - -:ref:`TrackerType` **type** = ``128`` - -.. rst-class:: classref-property-setget - -- void **set_tracker_type** **(** :ref:`TrackerType` value **)** -- :ref:`TrackerType` **get_tracker_type** **(** **)** - -The type of tracker. - .. rst-class:: classref-section-separator ---- @@ -297,7 +258,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Variant` **get_input** **(** :ref:`StringName` name **)** |const| +:ref:`Variant` **get_input**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +**Deprecated:** Use through :ref:`XRControllerTracker`. Returns an input for this tracker. It can return a boolean, float or :ref:`Vector2` value depending on whether the input is a button, trigger or thumbstick/thumbpad. @@ -309,7 +272,7 @@ Returns an input for this tracker. It can return a boolean, float or :ref:`Vecto .. rst-class:: classref-method -:ref:`XRPose` **get_pose** **(** :ref:`StringName` name **)** |const| +:ref:`XRPose` **get_pose**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the current :ref:`XRPose` state object for the bound ``name`` pose. @@ -321,7 +284,7 @@ Returns the current :ref:`XRPose` state object for the bound ``nam .. rst-class:: classref-method -:ref:`bool` **has_pose** **(** :ref:`StringName` name **)** |const| +:ref:`bool` **has_pose**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns ``true`` if the tracker is available and is currently tracking the bound ``name`` pose. @@ -333,9 +296,9 @@ Returns ``true`` if the tracker is available and is currently tracking the bound .. rst-class:: classref-method -void **invalidate_pose** **(** :ref:`StringName` name **)** +|void| **invalidate_pose**\ (\ name\: :ref:`StringName`\ ) :ref:`🔗` -Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we loose tracking or just remain at their last known position. +Marks this pose as invalid, we don't clear the last reported state but it allows users to decide if trackers need to be hidden if we lose tracking or just remain at their last known position. .. rst-class:: classref-item-separator @@ -345,7 +308,9 @@ Marks this pose as invalid, we don't clear the last reported state but it allows .. rst-class:: classref-method -void **set_input** **(** :ref:`StringName` name, :ref:`Variant` value **)** +|void| **set_input**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`🔗` + +**Deprecated:** Use through :ref:`XRControllerTracker`. Changes the value for the given input. This method is called by a :ref:`XRInterface` implementation and should not be used directly. @@ -357,7 +322,7 @@ Changes the value for the given input. This method is called by a :ref:`XRInterf .. rst-class:: classref-method -void **set_pose** **(** :ref:`StringName` name, :ref:`Transform3D` transform, :ref:`Vector3` linear_velocity, :ref:`Vector3` angular_velocity, :ref:`TrackingConfidence` tracking_confidence **)** +|void| **set_pose**\ (\ name\: :ref:`StringName`, transform\: :ref:`Transform3D`, linear_velocity\: :ref:`Vector3`, angular_velocity\: :ref:`Vector3`, tracking_confidence\: :ref:`TrackingConfidence`\ ) :ref:`🔗` Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a :ref:`XRInterface` implementation and should not be used directly. @@ -368,3 +333,4 @@ Sets the transform, linear velocity, angular velocity and tracking confidence fo .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrserver.rst b/classes/class_xrserver.rst index a32116e915f..d1721cc7086 100644 --- a/classes/class_xrserver.rst +++ b/classes/class_xrserver.rst @@ -52,33 +52,35 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_interface` **(** :ref:`XRInterface` interface **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_tracker` **(** :ref:`XRPositionalTracker` tracker **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`center_on_hmd` **(** :ref:`RotationMode` rotation_mode, :ref:`bool` keep_height **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRInterface` | :ref:`find_interface` **(** :ref:`String` name **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_hmd_transform` **(** **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRInterface` | :ref:`get_interface` **(** :ref:`int` idx **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_interface_count` **(** **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`get_interfaces` **(** **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`get_reference_frame` **(** **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`XRPositionalTracker` | :ref:`get_tracker` **(** :ref:`StringName` tracker_name **)** |const| | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_trackers` **(** :ref:`int` tracker_types **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_interface` **(** :ref:`XRInterface` interface **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_tracker` **(** :ref:`XRPositionalTracker` tracker **)** | - +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_interface`\ (\ interface\: :ref:`XRInterface`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_tracker`\ (\ tracker\: :ref:`XRTracker`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`center_on_hmd`\ (\ rotation_mode\: :ref:`RotationMode`, keep_height\: :ref:`bool`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_reference_frame`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRInterface` | :ref:`find_interface`\ (\ name\: :ref:`String`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_hmd_transform`\ (\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRInterface` | :ref:`get_interface`\ (\ idx\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_interface_count`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_interfaces`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`get_reference_frame`\ (\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`XRTracker` | :ref:`get_tracker`\ (\ tracker_name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_trackers`\ (\ tracker_types\: :ref:`int`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_interface`\ (\ interface\: :ref:`XRInterface`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_tracker`\ (\ tracker\: :ref:`XRTracker`\ ) | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -93,7 +95,7 @@ Signals .. rst-class:: classref-signal -**interface_added** **(** :ref:`StringName` interface_name **)** +**interface_added**\ (\ interface_name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when a new interface has been added. @@ -105,7 +107,7 @@ Emitted when a new interface has been added. .. rst-class:: classref-signal -**interface_removed** **(** :ref:`StringName` interface_name **)** +**interface_removed**\ (\ interface_name\: :ref:`StringName`\ ) :ref:`🔗` Emitted when an interface is removed. @@ -113,11 +115,23 @@ Emitted when an interface is removed. ---- +.. _class_XRServer_signal_reference_frame_changed: + +.. rst-class:: classref-signal + +**reference_frame_changed**\ (\ ) :ref:`🔗` + +Emitted when the reference frame transform changes. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRServer_signal_tracker_added: .. rst-class:: classref-signal -**tracker_added** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** +**tracker_added**\ (\ tracker_name\: :ref:`StringName`, type\: :ref:`int`\ ) :ref:`🔗` Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using :ref:`XRAnchor3D`\ s for an AR solution, it is important to react to this signal to add the appropriate :ref:`XRController3D` or :ref:`XRAnchor3D` nodes related to this new tracker. @@ -129,7 +143,7 @@ Emitted when a new tracker has been added. If you don't use a fixed number of co .. rst-class:: classref-signal -**tracker_removed** **(** :ref:`StringName` tracker_name, :ref:`int` type **)** +**tracker_removed**\ (\ tracker_name\: :ref:`StringName`, type\: :ref:`int`\ ) :ref:`🔗` Emitted when a tracker is removed. You should remove any :ref:`XRController3D` or :ref:`XRAnchor3D` points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). @@ -141,7 +155,7 @@ Emitted when a tracker is removed. You should remove any :ref:`XRController3D` tracker_name, :ref:`int` type **)** +**tracker_updated**\ (\ tracker_name\: :ref:`StringName`, type\: :ref:`int`\ ) :ref:`🔗` Emitted when an existing tracker has been updated. This can happen if the user switches controllers. @@ -158,7 +172,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **TrackerType**: +enum **TrackerType**: :ref:`🔗` .. _class_XRServer_constant_TRACKER_HEAD: @@ -192,6 +206,30 @@ The tracker tracks the location of a base station. The tracker tracks the location and size of an AR anchor. +.. _class_XRServer_constant_TRACKER_HAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_HAND** = ``16`` + +The tracker tracks the location and joints of a hand. + +.. _class_XRServer_constant_TRACKER_BODY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_BODY** = ``32`` + +The tracker tracks the location and joints of a body. + +.. _class_XRServer_constant_TRACKER_FACE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TrackerType` **TRACKER_FACE** = ``64`` + +The tracker tracks the expressions of a face. + .. _class_XRServer_constant_TRACKER_ANY_KNOWN: .. rst-class:: classref-enumeration-constant @@ -224,7 +262,7 @@ Used internally to select all trackers. .. rst-class:: classref-enumeration -enum **RotationMode**: +enum **RotationMode**: :ref:`🔗` .. _class_XRServer_constant_RESET_FULL_ROTATION: @@ -263,12 +301,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`XRInterface` **primary_interface** +:ref:`XRInterface` **primary_interface** :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_primary_interface** **(** :ref:`XRInterface` value **)** -- :ref:`XRInterface` **get_primary_interface** **(** **)** +- |void| **set_primary_interface**\ (\ value\: :ref:`XRInterface`\ ) +- :ref:`XRInterface` **get_primary_interface**\ (\ ) The primary :ref:`XRInterface` currently bound to the **XRServer**. @@ -280,12 +318,12 @@ The primary :ref:`XRInterface` currently bound to the **XRSer .. rst-class:: classref-property -:ref:`Transform3D` **world_origin** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` +:ref:`Transform3D` **world_origin** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_world_origin** **(** :ref:`Transform3D` value **)** -- :ref:`Transform3D` **get_world_origin** **(** **)** +- |void| **set_world_origin**\ (\ value\: :ref:`Transform3D`\ ) +- :ref:`Transform3D` **get_world_origin**\ (\ ) The current origin of our tracking space in the virtual world. This is used by the renderer to properly position the camera with new tracking data. @@ -299,14 +337,14 @@ The current origin of our tracking space in the virtual world. This is used by t .. rst-class:: classref-property -:ref:`float` **world_scale** = ``1.0`` +:ref:`float` **world_scale** = ``1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- void **set_world_scale** **(** :ref:`float` value **)** -- :ref:`float` **get_world_scale** **(** **)** +- |void| **set_world_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_world_scale**\ (\ ) -Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. +The scale of the game world compared to the real world. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter. .. rst-class:: classref-section-separator @@ -321,7 +359,7 @@ Method Descriptions .. rst-class:: classref-method -void **add_interface** **(** :ref:`XRInterface` interface **)** +|void| **add_interface**\ (\ interface\: :ref:`XRInterface`\ ) :ref:`🔗` Registers an :ref:`XRInterface` object. @@ -333,9 +371,9 @@ Registers an :ref:`XRInterface` object. .. rst-class:: classref-method -void **add_tracker** **(** :ref:`XRPositionalTracker` tracker **)** +|void| **add_tracker**\ (\ tracker\: :ref:`XRTracker`\ ) :ref:`🔗` -Registers a new :ref:`XRPositionalTracker` that tracks a spatial location in real space. +Registers a new :ref:`XRTracker` that tracks a physical object. .. rst-class:: classref-item-separator @@ -345,7 +383,7 @@ Registers a new :ref:`XRPositionalTracker` that track .. rst-class:: classref-method -void **center_on_hmd** **(** :ref:`RotationMode` rotation_mode, :ref:`bool` keep_height **)** +|void| **center_on_hmd**\ (\ rotation_mode\: :ref:`RotationMode`, keep_height\: :ref:`bool`\ ) :ref:`🔗` This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. @@ -363,11 +401,23 @@ You should call this method after a few seconds have passed. For example, when t ---- +.. _class_XRServer_method_clear_reference_frame: + +.. rst-class:: classref-method + +|void| **clear_reference_frame**\ (\ ) :ref:`🔗` + +Clears the reference frame that was set by previous calls to :ref:`center_on_hmd`. + +.. rst-class:: classref-item-separator + +---- + .. _class_XRServer_method_find_interface: .. rst-class:: classref-method -:ref:`XRInterface` **find_interface** **(** :ref:`String` name **)** |const| +:ref:`XRInterface` **find_interface**\ (\ name\: :ref:`String`\ ) |const| :ref:`🔗` Finds an interface by its ``name``. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. @@ -379,7 +429,7 @@ Finds an interface by its ``name``. For example, if your project uses capabiliti .. rst-class:: classref-method -:ref:`Transform3D` **get_hmd_transform** **(** **)** +:ref:`Transform3D` **get_hmd_transform**\ (\ ) :ref:`🔗` Returns the primary interface's transformation. @@ -391,7 +441,7 @@ Returns the primary interface's transformation. .. rst-class:: classref-method -:ref:`XRInterface` **get_interface** **(** :ref:`int` idx **)** |const| +:ref:`XRInterface` **get_interface**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` Returns the interface registered at the given ``idx`` index in the list of interfaces. @@ -403,7 +453,7 @@ Returns the interface registered at the given ``idx`` index in the list of inter .. rst-class:: classref-method -:ref:`int` **get_interface_count** **(** **)** |const| +:ref:`int` **get_interface_count**\ (\ ) |const| :ref:`🔗` Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns ``true``. @@ -415,7 +465,7 @@ Returns the number of interfaces currently registered with the AR/VR server. If .. rst-class:: classref-method -:ref:`Dictionary[]` **get_interfaces** **(** **)** |const| +:ref:`Array`\[:ref:`Dictionary`\] **get_interfaces**\ (\ ) |const| :ref:`🔗` Returns a list of available interfaces the ID and name of each interface. @@ -427,7 +477,7 @@ Returns a list of available interfaces the ID and name of each interface. .. rst-class:: classref-method -:ref:`Transform3D` **get_reference_frame** **(** **)** |const| +:ref:`Transform3D` **get_reference_frame**\ (\ ) |const| :ref:`🔗` Returns the reference frame transform. Mostly used internally and exposed for GDExtension build interfaces. @@ -439,7 +489,7 @@ Returns the reference frame transform. Mostly used internally and exposed for GD .. rst-class:: classref-method -:ref:`XRPositionalTracker` **get_tracker** **(** :ref:`StringName` tracker_name **)** |const| +:ref:`XRTracker` **get_tracker**\ (\ tracker_name\: :ref:`StringName`\ ) |const| :ref:`🔗` Returns the positional tracker with the given ``tracker_name``. @@ -451,7 +501,7 @@ Returns the positional tracker with the given ``tracker_name``. .. rst-class:: classref-method -:ref:`Dictionary` **get_trackers** **(** :ref:`int` tracker_types **)** +:ref:`Dictionary` **get_trackers**\ (\ tracker_types\: :ref:`int`\ ) :ref:`🔗` Returns a dictionary of trackers for ``tracker_types``. @@ -463,7 +513,7 @@ Returns a dictionary of trackers for ``tracker_types``. .. rst-class:: classref-method -void **remove_interface** **(** :ref:`XRInterface` interface **)** +|void| **remove_interface**\ (\ interface\: :ref:`XRInterface`\ ) :ref:`🔗` Removes this ``interface``. @@ -475,9 +525,9 @@ Removes this ``interface``. .. rst-class:: classref-method -void **remove_tracker** **(** :ref:`XRPositionalTracker` tracker **)** +|void| **remove_tracker**\ (\ tracker\: :ref:`XRTracker`\ ) :ref:`🔗` -Removes this positional ``tracker``. +Removes this ``tracker``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` @@ -486,3 +536,4 @@ Removes this positional ``tracker``. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrtracker.rst b/classes/class_xrtracker.rst new file mode 100644 index 00000000000..63219a3b862 --- /dev/null +++ b/classes/class_xrtracker.rst @@ -0,0 +1,126 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRTracker.xml. + +.. _class_XRTracker: + +XRTracker +========= + +**Inherits:** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`XRFaceTracker`, :ref:`XRPositionalTracker` + +A tracked object. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This object is the base of all XR trackers. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`XR documentation index <../tutorials/xr/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------------------------------+----------------------------------------------------------+----------------+ + | :ref:`String` | :ref:`description` | ``""`` | + +-----------------------------------------------+----------------------------------------------------------+----------------+ + | :ref:`StringName` | :ref:`name` | ``&"Unknown"`` | + +-----------------------------------------------+----------------------------------------------------------+----------------+ + | :ref:`TrackerType` | :ref:`type` | ``128`` | + +-----------------------------------------------+----------------------------------------------------------+----------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRTracker_property_description: + +.. rst-class:: classref-property + +:ref:`String` **description** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tracker_desc**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_tracker_desc**\ (\ ) + +The description of this tracker. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRTracker_property_name: + +.. rst-class:: classref-property + +:ref:`StringName` **name** = ``&"Unknown"`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tracker_name**\ (\ value\: :ref:`StringName`\ ) +- :ref:`StringName` **get_tracker_name**\ (\ ) + +The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the :ref:`XRInterface` to implement if applicable: + +- ``head`` identifies the :ref:`XRPositionalTracker` of the players head + +- ``left_hand`` identifies the :ref:`XRControllerTracker` in the players left hand + +- ``right_hand`` identifies the :ref:`XRControllerTracker` in the players right hand + +- ``/user/hand_tracker/left`` identifies the :ref:`XRHandTracker` for the players left hand + +- ``/user/hand_tracker/right`` identifies the :ref:`XRHandTracker` for the players right hand + +- ``/user/body_tracker`` identifies the :ref:`XRBodyTracker` for the players body + +- ``/user/face_tracker`` identifies the :ref:`XRFaceTracker` for the players face + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRTracker_property_type: + +.. rst-class:: classref-property + +:ref:`TrackerType` **type** = ``128`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tracker_type**\ (\ value\: :ref:`TrackerType`\ ) +- :ref:`TrackerType` **get_tracker_type**\ (\ ) + +The type of tracker. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_xrvrs.rst b/classes/class_xrvrs.rst new file mode 100644 index 00000000000..2bfabac8587 --- /dev/null +++ b/classes/class_xrvrs.rst @@ -0,0 +1,115 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/XRVRS.xml. + +.. _class_XRVRS: + +XRVRS +===== + +**Inherits:** :ref:`Object` + +Helper class for XR interfaces that generates VRS images. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This class is used by various XR interfaces to generate VRS textures that can be used to speed up rendering. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------+------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`vrs_min_radius` | ``20.0`` | + +---------------------------+------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`vrs_strength` | ``1.0`` | + +---------------------------+------------------------------------------------------------+----------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`make_vrs_texture`\ (\ target_size\: :ref:`Vector2`, eye_foci\: :ref:`PackedVector2Array`\ ) | + +-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_XRVRS_property_vrs_min_radius: + +.. rst-class:: classref-property + +:ref:`float` **vrs_min_radius** = ``20.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_min_radius**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_vrs_min_radius**\ (\ ) + +The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + +.. rst-class:: classref-item-separator + +---- + +.. _class_XRVRS_property_vrs_strength: + +.. rst-class:: classref-property + +:ref:`float` **vrs_strength** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_vrs_strength**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_vrs_strength**\ (\ ) + +The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_XRVRS_method_make_vrs_texture: + +.. rst-class:: classref-method + +:ref:`RID` **make_vrs_texture**\ (\ target_size\: :ref:`Vector2`, eye_foci\: :ref:`PackedVector2Array`\ ) :ref:`🔗` + +Generates the VRS texture based on a render ``target_size`` adjusted by our VRS tile size. For each eyes focal point passed in ``eye_foci`` a layer is created. Focal point should be in NDC. + +The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_zippacker.rst b/classes/class_zippacker.rst index 04c2512fbc6..2b8b9461125 100644 --- a/classes/class_zippacker.rst +++ b/classes/class_zippacker.rst @@ -43,17 +43,17 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`close` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`close_file` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`open` **(** :ref:`String` path, :ref:`ZipAppend` append=0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`start_file` **(** :ref:`String` path **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`write_file` **(** :ref:`PackedByteArray` data **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`close`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`close_file`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open`\ (\ path\: :ref:`String`, append\: :ref:`ZipAppend` = 0\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`start_file`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`write_file`\ (\ data\: :ref:`PackedByteArray`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,7 +68,7 @@ Enumerations .. rst-class:: classref-enumeration -enum **ZipAppend**: +enum **ZipAppend**: :ref:`🔗` .. _class_ZIPPacker_constant_APPEND_CREATE: @@ -107,7 +107,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **close** **(** **)** +:ref:`Error` **close**\ (\ ) :ref:`🔗` Closes the underlying resources used by this instance. @@ -119,7 +119,7 @@ Closes the underlying resources used by this instance. .. rst-class:: classref-method -:ref:`Error` **close_file** **(** **)** +:ref:`Error` **close_file**\ (\ ) :ref:`🔗` Stops writing to a file within the archive. @@ -133,7 +133,7 @@ It will fail if there is no open file. .. rst-class:: classref-method -:ref:`Error` **open** **(** :ref:`String` path, :ref:`ZipAppend` append=0 **)** +:ref:`Error` **open**\ (\ path\: :ref:`String`, append\: :ref:`ZipAppend` = 0\ ) :ref:`🔗` Opens a zip file for writing at the given path using the specified write mode. @@ -147,7 +147,7 @@ This must be called before everything else. .. rst-class:: classref-method -:ref:`Error` **start_file** **(** :ref:`String` path **)** +:ref:`Error` **start_file**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Starts writing to a file within the archive. Only one file can be written at the same time. @@ -161,7 +161,7 @@ Must be called after :ref:`open`. .. rst-class:: classref-method -:ref:`Error` **write_file** **(** :ref:`PackedByteArray` data **)** +:ref:`Error` **write_file**\ (\ data\: :ref:`PackedByteArray`\ ) :ref:`🔗` Write the given ``data`` to the file. @@ -174,3 +174,4 @@ Needs to be called after :ref:`start_file`. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_zipreader.rst b/classes/class_zipreader.rst index 015e3a424a8..a97bb716d6f 100644 --- a/classes/class_zipreader.rst +++ b/classes/class_zipreader.rst @@ -40,15 +40,17 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`close` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_files` **(** **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`open` **(** :ref:`String` path **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`read_file` **(** :ref:`String` path, :ref:`bool` case_sensitive=true **)** | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`close`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`file_exists`\ (\ path\: :ref:`String`, case_sensitive\: :ref:`bool` = true\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_files`\ (\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`read_file`\ (\ path\: :ref:`String`, case_sensitive\: :ref:`bool` = true\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -63,7 +65,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **close** **(** **)** +:ref:`Error` **close**\ (\ ) :ref:`🔗` Closes the underlying resources used by this instance. @@ -71,11 +73,25 @@ Closes the underlying resources used by this instance. ---- +.. _class_ZIPReader_method_file_exists: + +.. rst-class:: classref-method + +:ref:`bool` **file_exists**\ (\ path\: :ref:`String`, case_sensitive\: :ref:`bool` = true\ ) :ref:`🔗` + +Returns ``true`` if the file exists in the loaded zip archive. + +Must be called after :ref:`open`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ZIPReader_method_get_files: .. rst-class:: classref-method -:ref:`PackedStringArray` **get_files** **(** **)** +:ref:`PackedStringArray` **get_files**\ (\ ) :ref:`🔗` Returns the list of names of all files in the loaded archive. @@ -89,7 +105,7 @@ Must be called after :ref:`open`. .. rst-class:: classref-method -:ref:`Error` **open** **(** :ref:`String` path **)** +:ref:`Error` **open**\ (\ path\: :ref:`String`\ ) :ref:`🔗` Opens the zip archive at the given ``path`` and reads its file index. @@ -101,7 +117,7 @@ Opens the zip archive at the given ``path`` and reads its file index. .. rst-class:: classref-method -:ref:`PackedByteArray` **read_file** **(** :ref:`String` path, :ref:`bool` case_sensitive=true **)** +:ref:`PackedByteArray` **read_file**\ (\ path\: :ref:`String`, case_sensitive\: :ref:`bool` = true\ ) :ref:`🔗` Loads the whole content of a file in the loaded zip archive into memory and returns it. @@ -114,3 +130,4 @@ Must be called after :ref:`open`. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/index.rst b/classes/index.rst index 63a6fd92c16..fd3c02edabc 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -1,4 +1,5 @@ :github_url: hide +:allow_comments: False .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. @@ -32,6 +33,7 @@ Nodes class_animatablebody3d class_animatedsprite2d class_animatedsprite3d + class_animationmixer class_animationplayer class_animationtree class_area2d @@ -116,6 +118,8 @@ Nodes class_gpuparticlescollisionsdf3d class_gpuparticlescollisionsphere3d class_graphedit + class_graphelement + class_graphframe class_graphnode class_gridcontainer class_gridmap @@ -168,10 +172,15 @@ Nodes class_node3d class_occluderinstance3d class_omnilight3d + class_openxrcompositionlayer + class_openxrcompositionlayercylinder + class_openxrcompositionlayerequirect + class_openxrcompositionlayerquad class_openxrhand class_optionbutton class_panel class_panelcontainer + class_parallax2d class_parallaxbackground class_parallaxlayer class_path2d @@ -180,6 +189,7 @@ Nodes class_pathfollow3d class_physicalbone2d class_physicalbone3d + class_physicalbonesimulator3d class_physicsbody2d class_physicsbody3d class_pinjoint2d @@ -214,6 +224,7 @@ Nodes class_skeleton2d class_skeleton3d class_skeletonik3d + class_skeletonmodifier3d class_slider class_sliderjoint3d class_softbody3d @@ -226,6 +237,7 @@ Nodes class_spritebase3d class_staticbody2d class_staticbody3d + class_statusindicator class_subviewport class_subviewportcontainer class_tabbar @@ -235,6 +247,7 @@ Nodes class_textureprogressbar class_texturerect class_tilemap + class_tilemaplayer class_timer class_touchscreenbutton class_tree @@ -257,8 +270,11 @@ Nodes class_window class_worldenvironment class_xranchor3d + class_xrbodymodifier3d class_xrcamera3d class_xrcontroller3d + class_xrfacemodifier3d + class_xrhandmodifier3d class_xrnode3d class_xrorigin3d @@ -311,6 +327,7 @@ Resources class_audioeffecteq21 class_audioeffecteq6 class_audioeffectfilter + class_audioeffecthardlimiter class_audioeffecthighpassfilter class_audioeffecthighshelffilter class_audioeffectlimiter @@ -326,11 +343,14 @@ Resources class_audioeffectstereoenhance class_audiostream class_audiostreamgenerator + class_audiostreaminteractive class_audiostreammicrophone class_audiostreammp3 class_audiostreamoggvorbis + class_audiostreamplaylist class_audiostreampolyphonic class_audiostreamrandomizer + class_audiostreamsynchronized class_audiostreamwav class_basematerial3d class_bitmap @@ -350,6 +370,8 @@ Resources class_capsuleshape3d class_circleshape2d class_codehighlighter + class_compositor + class_compositoreffect class_compressedcubemap class_compressedcubemaparray class_compressedtexture2d @@ -376,6 +398,8 @@ Resources class_editorsyntaxhighlighter class_environment class_fastnoiselite + class_fbxdocument + class_fbxstate class_fogmaterial class_font class_fontfile @@ -437,6 +461,7 @@ Resources class_missingresource class_multimesh class_navigationmesh + class_navigationmeshsourcegeometrydata2d class_navigationmeshsourcegeometrydata3d class_navigationpolygon class_noise @@ -522,8 +547,14 @@ Resources class_texture class_texture2d class_texture2darray + class_texture2darrayrd + class_texture2drd class_texture3d + class_texture3drd + class_texturecubemaparrayrd + class_texturecubemaprd class_texturelayered + class_texturelayeredrd class_theme class_tilemappattern class_tileset @@ -565,6 +596,7 @@ Resources class_visualshadernodefloatfunc class_visualshadernodefloatop class_visualshadernodefloatparameter + class_visualshadernodeframe class_visualshadernodefresnel class_visualshadernodeglobalexpression class_visualshadernodegroupbase @@ -596,8 +628,11 @@ Resources class_visualshadernodeproximityfade class_visualshadernoderandomrange class_visualshadernoderemap + class_visualshadernodereroute class_visualshadernoderesizablebase + class_visualshadernoderotationbyaxis class_visualshadernodesample3d + class_visualshadernodescreennormalworldspace class_visualshadernodescreenuvtosdf class_visualshadernodesdfraymarch class_visualshadernodesdftoscreenuv @@ -644,6 +679,7 @@ Resources class_visualshadernodevectorlen class_visualshadernodevectorop class_visualshadernodevectorrefract + class_visualshadernodeworldpositionfromdepth class_voxelgidata class_world2d class_world3d @@ -665,12 +701,17 @@ Other objects class_astargrid2d class_audioeffectinstance class_audioeffectspectrumanalyzerinstance + class_audiosample + class_audiosampleplayback class_audioserver class_audiostreamgeneratorplayback class_audiostreamplayback + class_audiostreamplaybackinteractive class_audiostreamplaybackoggvorbis + class_audiostreamplaybackplaylist class_audiostreamplaybackpolyphonic class_audiostreamplaybackresampled + class_audiostreamplaybacksynchronized class_callbacktweener class_camerafeed class_cameraserver @@ -705,8 +746,9 @@ Other objects class_editorresourcetooltipplugin class_editorsceneformatimporter class_editorsceneformatimporterblend - class_editorsceneformatimporterfbx + class_editorsceneformatimporterfbx2gltf class_editorsceneformatimportergltf + class_editorsceneformatimporterufbx class_editorscenepostimport class_editorscenepostimportplugin class_editorscript @@ -723,10 +765,10 @@ Other objects class_engineprofiler class_expression class_fileaccess + class_framebuffercacherd class_gdextensionmanager class_geometry2d class_geometry3d - class_godotsharp class_hashingcontext class_hmaccontext class_httpclient @@ -758,6 +800,7 @@ Other objects class_multiplayerpeer class_multiplayerpeerextension class_mutex + class_nativemenu class_navigationmeshgenerator class_navigationpathqueryparameters2d class_navigationpathqueryparameters3d @@ -769,6 +812,9 @@ Other objects class_node3dgizmo class_offlinemultiplayerpeer class_oggpacketsequenceplayback + class_openxrapiextension + class_openxrextensionwrapperextension + class_openxrinteractionprofilemetadata class_openxrinterface class_os class_packeddatacontainerref @@ -824,8 +870,18 @@ Other objects class_refcounted class_regex class_regexmatch + class_renderdata + class_renderdataextension + class_renderdatard class_renderingdevice class_renderingserver + class_renderscenebuffers + class_renderscenebuffersconfiguration + class_renderscenebuffersextension + class_renderscenebuffersrd + class_renderscenedata + class_renderscenedataextension + class_renderscenedatard class_resource class_resourceformatloader class_resourceformatsaver @@ -884,6 +940,7 @@ Other objects class_tweener class_udpserver class_undoredo + class_uniformsetcacherd class_upnp class_upnpdevice class_weakref @@ -897,11 +954,17 @@ Other objects class_webxrinterface class_workerthreadpool class_xmlparser + class_xrbodytracker + class_xrcontrollertracker + class_xrfacetracker + class_xrhandtracker class_xrinterface class_xrinterfaceextension class_xrpose class_xrpositionaltracker class_xrserver + class_xrtracker + class_xrvrs class_zippacker class_zipreader @@ -945,8 +1008,9 @@ Editor-only class_editorresourcetooltipplugin class_editorsceneformatimporter class_editorsceneformatimporterblend - class_editorsceneformatimporterfbx + class_editorsceneformatimporterfbx2gltf class_editorsceneformatimportergltf + class_editorsceneformatimporterufbx class_editorscenepostimport class_editorscenepostimportplugin class_editorscript @@ -991,6 +1055,7 @@ Variant types class_packedstringarray class_packedvector2array class_packedvector3array + class_packedvector4array class_plane class_projection class_quaternion